GAMS  1.4.0
AlgorithmFactory.h
Go to the documentation of this file.
1 
54 #ifndef _GAMS_ALGORITHMS_ALGORITHM_FACTORY_H_
55 #define _GAMS_ALGORITHMS_ALGORITHM_FACTORY_H_
56 
59 #include "gams/variables/Self.h"
60 #include "gams/variables/Sensor.h"
61 #include "gams/variables/Agent.h"
62 #include "madara/knowledge/KnowledgeBase.h"
63 
64 namespace gams
65 {
66  namespace algorithms
67  {
73  {
74  public:
79 
83  virtual ~AlgorithmFactory();
84 
95  virtual BaseAlgorithm * create(
96  const madara::knowledge::KnowledgeMap & args,
97  madara::knowledge::KnowledgeBase * knowledge,
98  platforms::BasePlatform * platform,
99  variables::Sensors * sensors,
100  variables::Self * self,
101  variables::Agents * agents) = 0;
102 
108 
113  void set_knowledge(madara::knowledge::KnowledgeBase * knowledge);
114 
120 
125  void set_self(variables::Self * self);
126 
132 
133  protected:
134 
136  madara::knowledge::KnowledgeBase * knowledge_;
137 
140 
143 
146 
149  };
150  }
151 }
152 
153 #endif // _GAMS_ALGORITHMS_ALGORITHM_FACTORY_H_
Copyright(c) 2014-2018 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.
#define GAMS_EXPORT
Definition: GamsExport.h:20
Copyright(c) 2014 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.
Base class for algorithm factories that classes derived from.
void set_agents(variables::Agents *agents)
Sets list of agents participating in swarm.
variables::Self * self_
self-referencing variables
variables::Sensors * sensors_
sensor variables
variables::Agents * agents_
list of agents participating in the swarm
virtual BaseAlgorithm * create(const madara::knowledge::KnowledgeMap &args, madara::knowledge::KnowledgeBase *knowledge, platforms::BasePlatform *platform, variables::Sensors *sensors, variables::Self *self, variables::Agents *agents)=0
Creates an algorithm.
platforms::BasePlatform * platform_
platform variables
void set_self(variables::Self *self)
Sets self-referencing variables.
madara::knowledge::KnowledgeBase * knowledge_
knowledge base containing variables
void set_knowledge(madara::knowledge::KnowledgeBase *knowledge)
Sets the knowledge base.
void set_sensors(variables::Sensors *sensors)
Sets the map of sensor names to sensor information.
void set_platform(platforms::BasePlatform *platform)
Sets the map of platform names to platform information.
virtual ~AlgorithmFactory()
Destructor.
The base class that algorithms in GAMS use.
Definition: BaseAlgorithm.h:95
The base platform for all platforms to use.
Definition: BasePlatform.h:113
A container for self referencing information.
Definition: Self.h:70
std::map< std::string, Sensor * > Sensors
a map of sensor names to the sensor information
Definition: Sensor.h:238
std::vector< Agent > Agents
An array of agent knowledge.
Definition: Agent.h:246
Contains all GAMS-related tools, classes and code.