Project

General

Profile

Revision bda6eaa0

IDbda6eaa0e2f45e7c4070510fb836f24e375ddc80
Parent bf68fc90
Child 6ebee82c

Added by Alex Zirbel about 11 years ago

Removed BehaviorList.cpp and h, since they are autogenerated.

View differences:

scout/libscout/src/BehaviorList.cpp
1
/**
2
 ******************************************************************************
3
 * WARNING: THIS IS AN AUTOGENERATED FILE!
4
 *
5
 * Editing this file is USELESS. It will be overwritten during the build.
6
 * To properly edit this file, edit its corresponding *.template.* file, which
7
 * a script run by CMake uses to generate this file.
8
 *
9
 * This file was generated via rules in src/generate_behavior_lists.py.
10
 *
11
 * Please see that file for a description of syntax and procedure for
12
 * creating auto-generated files.
13
 *
14
 * THIS WARNING IS LONG TO MAKE SURE IT GETS YOUR ATTENTION!
15
 * THANK YOU.
16
 *****************************************************************************
17
 */
18

  
19
#include "BehaviorList.h"
20

  
21
BehaviorList::BehaviorList()
22
{
23
  behavior_list.push_back(behavior<pause_scout>);
24
  behavior_list.push_back(behavior<Odometry>);
25
  behavior_list.push_back(behavior<draw_ccw_circle>);
26
  behavior_list.push_back(behavior<draw_cw_circle>);
27
  behavior_list.push_back(behavior<line_follow>);
28
  behavior_list.push_back(behavior<navigationMap>);
29
  behavior_list.push_back(behavior<wl_test>);
30
  behavior_list.push_back(behavior<Odometry_new>);
31
  behavior_list.push_back(behavior<Scheduler>);
32
  behavior_list.push_back(behavior<WH_Robot>);
33
  behavior_list.push_back(behavior<maze_solve>);
34
  behavior_list.push_back(behavior<maze_solve_simple>);
35
  behavior_list.push_back(behavior<smart_runaround>);
36
  return;
37
}
38

  
39
BehaviorList::~BehaviorList()
40
{
41
  while(!behavior_list.empty())
42
    behavior_list.pop_back();
43
}
scout/libscout/src/BehaviorList.h
1
/**
2
 ******************************************************************************
3
 * WARNING: THIS IS AN AUTOGENERATED FILE!
4
 *
5
 * Editing this file is USELESS. It will be overwritten during the build.
6
 * To properly edit this file, edit its corresponding *.template.* file, which
7
 * a script run by CMake uses to generate this file.
8
 *
9
 * This file was generated via rules in src/generate_behavior_lists.py.
10
 *
11
 * Please see that file for a description of syntax and procedure for
12
 * creating auto-generated files.
13
 *
14
 * THIS WARNING IS LONG TO MAKE SURE IT GETS YOUR ATTENTION!
15
 * THANK YOU.
16
 *****************************************************************************
17
 */
18

  
19
#ifndef _BEHAVIOR_LIST_H_
20
#define _BEHAVIOR_LIST_H_
21

  
22
#include "Behavior.h"
23
#include "Sensors.h"
24
#include "behaviors/pause_scout.h"
25
#include "behaviors/Odometry.h"
26
#include "behaviors/draw_ccw_circle.h"
27
#include "behaviors/draw_cw_circle.h"
28
#include "behaviors/line_follow.h"
29
#include "behaviors/navigationMap.h"
30
#include "behaviors/wl_test.h"
31
#include "test_behaviors/Odometry_new.h"
32
#include "test_behaviors/Scheduler.h"
33
#include "test_behaviors/WH_Robot.h"
34
#include "test_behaviors/maze_solve.h"
35
#include "test_behaviors/maze_solve_simple.h"
36
#include "test_behaviors/smart_runaround.h"
37

  
38
template<typename T> Behavior* behavior(std::string scoutname, Sensors* sensors){ return (Behavior*)new T(scoutname, sensors); } 
39

  
40
typedef Behavior* (* behavior_func)(std::string, Sensors*);
41

  
42
class BehaviorList
43
{
44
  public:
45
  std::vector<behavior_func> behavior_list;
46

  
47
  //Constructor. Initializes behavior_list
48
  BehaviorList();
49
  //Destructor. Frees behavior_list;
50
  ~BehaviorList();
51
};
52

  
53
#endif

Also available in: Unified diff