|
g2o
|
map id to parameters More...
#include <parameter_container.h>


Public Types | |
| typedef std::map< int, Parameter * > | BaseClass |
Public Member Functions | |
| ParameterContainer (bool isMainStorage_=true) | |
| virtual | ~ParameterContainer () |
| bool | addParameter (Parameter *p) |
| add parameter to the container | |
| Parameter * | getParameter (int id) |
| return a parameter based on its ID | |
| const Parameter * | getParameter (int id) const |
| return a parameter based on its ID | |
| Parameter * | detachParameter (int id) |
| remove a parameter from the container, i.e., the user now owns the pointer | |
| virtual bool | read (std::istream &is, const std::map< std::string, std::string > *renamedMap=0) |
| read parameters from a stream | |
| virtual bool | write (std::ostream &os) const |
| write the data to a stream | |
| bool | isMainStorage () const |
| void | clear () |
Protected Attributes | |
| bool | _isMainStorage |
map id to parameters
Definition at line 41 of file parameter_container.h.
| typedef std::map<int, Parameter*> g2o::ParameterContainer::BaseClass |
Definition at line 43 of file parameter_container.h.
| g2o::ParameterContainer::ParameterContainer | ( | bool | isMainStorage_ = true | ) |
create a container for the parameters.
| isMainStorage_ | pointers to the parameters are owned by this container, i.e., freed in its constructor |
Definition at line 43 of file parameter_container.cpp.
|
virtual |
| bool g2o::ParameterContainer::addParameter | ( | Parameter * | p | ) |
add parameter to the container
Definition at line 56 of file parameter_container.cpp.
References g2o::Parameter::id().
Referenced by read().
| void g2o::ParameterContainer::clear | ( | ) |
Definition at line 46 of file parameter_container.cpp.
References _isMainStorage.
Referenced by g2o::OptimizableGraph::clearParameters(), and ~ParameterContainer().
| Parameter * g2o::ParameterContainer::detachParameter | ( | int | id | ) |
remove a parameter from the container, i.e., the user now owns the pointer
Definition at line 76 of file parameter_container.cpp.
| Parameter * g2o::ParameterContainer::getParameter | ( | int | id | ) |
return a parameter based on its ID
Definition at line 64 of file parameter_container.cpp.
| const Parameter * g2o::ParameterContainer::getParameter | ( | int | id | ) | const |
return a parameter based on its ID
Definition at line 70 of file parameter_container.cpp.
|
inline |
|
virtual |
read parameters from a stream
Definition at line 95 of file parameter_container.cpp.
References __PRETTY_FUNCTION__, addParameter(), g2o::Factory::construct(), g2o::HyperGraph::HyperGraphElement::elementType(), G2O_ERROR, g2o::Factory::instance(), g2o::Parameter::read(), g2o::readLine(), and g2o::Parameter::setId().
|
virtual |
write the data to a stream
Definition at line 84 of file parameter_container.cpp.
References g2o::Factory::instance(), and g2o::Factory::tag().
|
protected |
Definition at line 72 of file parameter_container.h.
Referenced by clear(), and isMainStorage().