54 #ifndef _GAMS_ALGORITHMS_CONTROLLER_ALGORITHM_FACTORY_H_
55 #define _GAMS_ALGORITHMS_CONTROLLER_ALGORITHM_FACTORY_H_
57 #include "madara/utility/Refcounter.h"
64 #include "madara/knowledge/KnowledgeBase.h"
91 madara::knowledge::KnowledgeBase * knowledge = 0,
109 void add(
const std::vector <std::string> & aliases,
119 const madara::knowledge::KnowledgeMap & args = madara::knowledge::KnowledgeMap());
Copyright(c) 2014-2018 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.
The controller's algorithm factory.
~AlgorithmFactoryRepository()
Destructor.
AlgorithmFactoryRepository(madara::knowledge::KnowledgeBase *knowledge=0, variables::Sensors *sensors=0, platforms::BasePlatform *platform=0, variables::Self *self=0, variables::Agents *agents=0)
Constructor.
AlgorithmFactoryMap factory_map_
a map of all aliases to factories
void initialize_default_mappings(void)
Initializes factories for all supported GAMS algorithms.
variables::Self * self_
self-referencing variables
bool init_finished_
flag for seeing if an init defaultshas stopped
platforms::BasePlatform * platform_
platform variables
BaseAlgorithm * create(const std::string &type, const madara::knowledge::KnowledgeMap &args=madara::knowledge::KnowledgeMap())
Creates an algorithm.
void set_sensors(variables::Sensors *sensors)
Sets the map of sensor names to sensor information.
bool init_started_
flag for seeing if an init defaults has started
variables::Agents * agents_
list of agents participating in the swarm
variables::Sensors * sensors_
sensor variables
void set_platform(platforms::BasePlatform *platform)
Sets the map of platform names to platform information.
madara::knowledge::KnowledgeBase * knowledge_
knowledge base containing variables
void set_agents(variables::Agents *agents)
Sets list of agents participating in swarm.
void add(const std::vector< std::string > &aliases, AlgorithmFactory *factory)
Adds an algorithm factory.
void set_knowledge(madara::knowledge::KnowledgeBase *knowledge)
Sets the knowledge base.
void set_self(variables::Self *self)
Sets self-referencing variables.
Base class for algorithm factories that classes derived from.
The base class that algorithms in GAMS use.
A container for self referencing information.
GAMS_EXPORT AlgorithmFactoryRepository * global_algorithm_factory()
A globally accessible algorithm factory.
std::map< std::string, AlgorithmFactory * > AlgorithmFactoryMap
Convenience typedef for a map of aliases to factories.
std::map< std::string, Sensor * > Sensors
a map of sensor names to the sensor information
std::vector< Agent > Agents
An array of agent knowledge.
Contains all GAMS-related tools, classes and code.