create vertices and edges based on TAGs in, for example, a file More...
#include <factory.h>
Public Member Functions | |
HyperGraph::HyperGraphElement * | construct (const std::string &tag) |
void | fillKnownTypes (std::vector< std::string > &types) |
bool | knowsTag (const std::string &tag) |
void | printRegisteredTypes (std::ostream &os, bool comment=false) |
void | registerType (const std::string &tag, AbstractHyperGraphElementCreator *c) |
const std::string & | tag (HyperGraph::HyperGraphElement *v) |
return the TAG given a vertex | |
Static Public Member Functions | |
static void | destroy () |
free the instance | |
static Factory * | instance () |
return the instance | |
Protected Types | |
typedef std::map< std::string, AbstractHyperGraphElementCreator * > | CreatorMap |
typedef std::map< std::string, std::string > | TagLookup |
Protected Member Functions | |
Factory () | |
~Factory () | |
Protected Attributes | |
CreatorMap | creator |
look-up map for the existing creators | |
TagLookup | tagLookup |
reverse look-up, class name to tag | |
Static Private Attributes | |
static Factory * | factoryInstance = 0 |
create vertices and edges based on TAGs in, for example, a file
typedef std::map<std::string, AbstractHyperGraphElementCreator*> g2o::Factory::CreatorMap [protected] |
typedef std::map<std::string, std::string> g2o::Factory::TagLookup [protected] |
g2o::Factory::Factory | ( | ) | [protected] |
Definition at line 31 of file factory.cpp.
g2o::Factory::~Factory | ( | ) | [protected] |
Definition at line 35 of file factory.cpp.
HyperGraph::HyperGraphElement * g2o::Factory::construct | ( | const std::string & | tag | ) |
construct a vertex based on its tag
Definition at line 67 of file factory.cpp.
void g2o::Factory::destroy | ( | ) | [static] |
free the instance
Definition at line 98 of file factory.cpp.
void g2o::Factory::fillKnownTypes | ( | std::vector< std::string > & | types | ) |
get a list of all known types
Definition at line 86 of file factory.cpp.
Factory * g2o::Factory::instance | ( | ) | [static] |
return the instance
Definition at line 41 of file factory.cpp.
bool g2o::Factory::knowsTag | ( | const std::string & | tag | ) |
return whether the factory knows this tag or not
Definition at line 93 of file factory.cpp.
void g2o::Factory::printRegisteredTypes | ( | std::ostream & | os, |
bool | comment = false |
||
) |
print a list of the known registered types to the given stream
Definition at line 104 of file factory.cpp.
void g2o::Factory::registerType | ( | const std::string & | tag, |
AbstractHyperGraphElementCreator * | c | ||
) |
register a tag for a specific creator
Definition at line 50 of file factory.cpp.
const std::string & g2o::Factory::tag | ( | HyperGraph::HyperGraphElement * | v | ) |
return the TAG given a vertex
Definition at line 77 of file factory.cpp.
CreatorMap g2o::Factory::creator [protected] |
Factory * g2o::Factory::factoryInstance = 0 [static, private] |
TagLookup g2o::Factory::tagLookup [protected] |