The controller's platform factory.
More...
#include <PlatformFactoryRepository.h>
The controller's platform factory.
Definition at line 75 of file PlatformFactoryRepository.h.
◆ PlatformFactoryRepository()
Constructor.
- Parameters
-
knowledge | knowledge base |
sensors | map of sensor names to sensor information |
platforms | map of platform names to platform information |
self | agent variables that describe self state |
◆ ~PlatformFactoryRepository()
gams::platforms::PlatformFactoryRepository::~PlatformFactoryRepository |
( |
| ) |
|
◆ add()
void gams::platforms::PlatformFactoryRepository::add |
( |
const std::vector< std::string > & |
aliases, |
|
|
PlatformFactory * |
factory |
|
) |
| |
Adds an algorithm factory.
- Parameters
-
aliases | the named aliases for the factory. All aliases will be converted to lower case |
factory | the factory for creating an algorithm |
- Returns
- the new algorithm
◆ create()
BasePlatform* gams::platforms::PlatformFactoryRepository::create |
( |
const std::string & |
type, |
|
|
const madara::knowledge::KnowledgeMap & |
args = madara::knowledge::KnowledgeMap() |
|
) |
| |
Creates a platform.
- Parameters
-
type | type of platform to create |
args | a vector of Knowledge Record arguments |
- Returns
- the new platform
◆ exists()
bool gams::platforms::PlatformFactoryRepository::exists |
( |
const std::string & |
prefix | ) |
const |
Checks if a platform type exists in the repository.
- Parameters
-
- Returns
- true, if the platform has a factory associated with it
◆ initialize_default_mappings()
void gams::platforms::PlatformFactoryRepository::initialize_default_mappings |
( |
void |
| ) |
|
Initializes factories for all supported GAMS algorithms.
◆ set_knowledge()
void gams::platforms::PlatformFactoryRepository::set_knowledge |
( |
madara::knowledge::KnowledgeBase * |
knowledge | ) |
|
Sets the knowledge base.
- Parameters
-
knowledge | the knowledge base to use |
◆ set_platforms()
Sets the map of platform names to platform information.
- Parameters
-
platforms | map of platform names to platform information |
◆ set_self()
void gams::platforms::PlatformFactoryRepository::set_self |
( |
variables::Self * |
self | ) |
|
Sets self-referencing variables.
- Parameters
-
self | self-referencing variables |
◆ set_sensors()
void gams::platforms::PlatformFactoryRepository::set_sensors |
( |
variables::Sensors * |
sensors | ) |
|
Sets the map of sensor names to sensor information.
- Parameters
-
sensors | map of sensor names to sensor information |
◆ factory_map_
FactoryMap gams::platforms::PlatformFactoryRepository::factory_map_ |
|
private |
◆ knowledge_
madara::knowledge::KnowledgeBase* gams::platforms::PlatformFactoryRepository::knowledge_ |
|
private |
◆ platforms_
◆ self_
◆ sensors_
The documentation for this class was generated from the following file: