GAMS  1.4.0
gams::groups::GroupFactoryRepository Class Reference

A repository for group factories. More...

#include <GroupFactoryRepository.h>

Public Member Functions

 GroupFactoryRepository (madara::knowledge::KnowledgeBase *knowledge=0)
 Constructor. More...
 
virtual ~GroupFactoryRepository ()
 Destructor. More...
 
void add (GroupType type, GroupFactory *factory)
 Adds an algorithm factory. More...
 
GroupBasecreate (const std::string &prefix)
 Creates a group based on group prefix in the knowledge base. More...
 
GroupBasecreate (GroupType type)
 Creates a group based on type. More...
 
void set_knowledge (madara::knowledge::KnowledgeBase *knowledge)
 Sets the knowledge base. More...
 

Protected Member Functions

void init (void)
 Initializes factories for all supported GAMS groups. More...
 

Protected Attributes

GroupFactoryMap factory_map_
 a mapping of types to group factories More...
 
madara::knowledge::KnowledgeBase * knowledge_
 knowledge base containing variables More...
 

Detailed Description

A repository for group factories.

Definition at line 76 of file GroupFactoryRepository.h.

Constructor & Destructor Documentation

◆ GroupFactoryRepository()

gams::groups::GroupFactoryRepository::GroupFactoryRepository ( madara::knowledge::KnowledgeBase *  knowledge = 0)

Constructor.

Parameters
knowledgea knowledge base to look into for group prefixes

◆ ~GroupFactoryRepository()

virtual gams::groups::GroupFactoryRepository::~GroupFactoryRepository ( )
virtual

Destructor.

Member Function Documentation

◆ add()

void gams::groups::GroupFactoryRepository::add ( GroupType  type,
GroupFactory factory 
)

Adds an algorithm factory.

Parameters
typethe type number for this factory
factorythe factory for creating an algorithm
Returns
the new algorithm

◆ create() [1/2]

GroupBase* gams::groups::GroupFactoryRepository::create ( const std::string &  prefix)

Creates a group based on group prefix in the knowledge base.

Parameters
prefixthe name of the group(e.g. group.protectors)
Returns
the new group

◆ create() [2/2]

GroupBase* gams::groups::GroupFactoryRepository::create ( GroupType  type)

Creates a group based on type.

Parameters
typethe type of the group(
See also
GroupTypes)
Returns
the new group

◆ init()

void gams::groups::GroupFactoryRepository::init ( void  )
protected

Initializes factories for all supported GAMS groups.

◆ set_knowledge()

void gams::groups::GroupFactoryRepository::set_knowledge ( madara::knowledge::KnowledgeBase *  knowledge)

Sets the knowledge base.

Parameters
knowledgethe knowledge base to use

Member Data Documentation

◆ factory_map_

GroupFactoryMap gams::groups::GroupFactoryRepository::factory_map_
protected

a mapping of types to group factories

Definition at line 130 of file GroupFactoryRepository.h.

◆ knowledge_

madara::knowledge::KnowledgeBase* gams::groups::GroupFactoryRepository::knowledge_
protected

knowledge base containing variables

Definition at line 127 of file GroupFactoryRepository.h.


The documentation for this class was generated from the following file: