Classes | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Private Attributes | List of all members
g2o::Factory Class Reference

create vertices and edges based on TAGs in, for example, a file More...

#include <factory.h>

Classes

class  CreatorInformation
 

Public Member Functions

HyperGraph::HyperGraphElementconstruct (const std::string &tag) const
 
HyperGraph::HyperGraphElementconstruct (const std::string &tag, const HyperGraph::GraphElemBitset &elemsToConstruct) const
 
void fillKnownTypes (std::vector< std::string > &types) const
 
bool knowsTag (const std::string &tag, int *elementType=0) const
 
void printRegisteredTypes (std::ostream &os, bool comment=false) const
 
void registerType (const std::string &tag, AbstractHyperGraphElementCreator *c)
 
const std::string & tag (const HyperGraph::HyperGraphElement *v) const
 return the TAG given a vertex More...
 
void unregisterType (const std::string &tag)
 

Static Public Member Functions

static void destroy ()
 free the instance More...
 
static Factoryinstance ()
 return the instance More...
 

Protected Types

typedef std::map< std::string, CreatorInformation * > 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 More...
 
TagLookup _tagLookup
 reverse look-up, class name to tag More...
 

Static Private Attributes

static FactoryfactoryInstance = 0
 

Detailed Description

create vertices and edges based on TAGs in, for example, a file

Definition at line 49 of file factory.h.

Member Typedef Documentation

typedef std::map<std::string, CreatorInformation*> g2o::Factory::CreatorMap
protected

Definition at line 118 of file factory.h.

typedef std::map<std::string, std::string> g2o::Factory::TagLookup
protected

Definition at line 119 of file factory.h.

Constructor & Destructor Documentation

g2o::Factory::Factory ( )
protected

Definition at line 45 of file factory.cpp.

g2o::Factory::~Factory ( )
protected

Definition at line 49 of file factory.cpp.

Member Function Documentation

HyperGraph::HyperGraphElement * g2o::Factory::construct ( const std::string &  tag) const

construct a graph element based on its tag

Definition at line 147 of file factory.cpp.

HyperGraph::HyperGraphElement * g2o::Factory::construct ( const std::string &  tag,
const HyperGraph::GraphElemBitset elemsToConstruct 
) const

construct a graph element based on its tag, but only if it's type (a bitmask) matches. A bitmask without any bit set will construct any item. Otherwise a bit has to be set to allow construction of a graph element.

Definition at line 204 of file factory.cpp.

void g2o::Factory::destroy ( )
static

free the instance

Definition at line 186 of file factory.cpp.

void g2o::Factory::fillKnownTypes ( std::vector< std::string > &  types) const

get a list of all known types

Definition at line 166 of file factory.cpp.

Factory * g2o::Factory::instance ( )
static

return the instance

Definition at line 61 of file factory.cpp.

bool g2o::Factory::knowsTag ( const std::string &  tag,
int *  elementType = 0 
) const

return whether the factory knows this tag or not

Definition at line 173 of file factory.cpp.

void g2o::Factory::printRegisteredTypes ( std::ostream &  os,
bool  comment = false 
) const

print a list of the known registered types to the given stream

Definition at line 192 of file factory.cpp.

void g2o::Factory::registerType ( const std::string &  tag,
AbstractHyperGraphElementCreator c 
)

register a tag for a specific creator

Definition at line 73 of file factory.cpp.

const std::string & g2o::Factory::tag ( const HyperGraph::HyperGraphElement v) const

return the TAG given a vertex

Definition at line 157 of file factory.cpp.

void g2o::Factory::unregisterType ( const std::string &  tag)

unregister a tag for a specific creator

Definition at line 128 of file factory.cpp.

Member Data Documentation

CreatorMap g2o::Factory::_creator
protected

look-up map for the existing creators

Definition at line 123 of file factory.h.

TagLookup g2o::Factory::_tagLookup
protected

reverse look-up, class name to tag

Definition at line 124 of file factory.h.

Factory * g2o::Factory::factoryInstance = 0
staticprivate

Definition at line 127 of file factory.h.


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


orb_slam2_with_maps_odom
Author(s): teng zhang
autogenerated on Fri Sep 25 2020 03:24:47