Statistics
| Branch: | Revision:

root / scout / libscout / src / BehaviorList.template.h @ c9638ad1

History | View | Annotate | Download (531 Bytes)

1
#ifndef _BEHAVIOR_LIST_H_
2
#define _BEHAVIOR_LIST_H_
3

    
4
#include "Behavior.h"
5
#include "Sensors.h"
6
#include "AUTOGEN_BEHAVIOR_LAST_PATH"
7

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

    
10
typedef Behavior* (* behavior_func)(std::string, Sensors*);
11

    
12
class BehaviorList
13
{
14
  public:
15
  std::vector<behavior_func> behavior_list;
16

    
17
  //Constructor. Initializes behavior_list
18
  BehaviorList();
19
  //Destructor. Frees behavior_list;
20
  ~BehaviorList();
21
};
22

    
23
#endif