g2o
|
a collection of properties mapping from name to the property itself More...
#include <property.h>
Public Types | |
typedef std::map< std::string, BaseProperty * > | BaseClass |
typedef BaseClass::iterator | PropertyMapIterator |
typedef BaseClass::const_iterator | PropertyMapConstIterator |
Public Member Functions | |
~PropertyMap () | |
bool | addProperty (BaseProperty *p) |
bool | eraseProperty (const std::string &name_) |
template<typename P > | |
P * | getProperty (const std::string &name_) |
template<typename P > | |
const P * | getProperty (const std::string &name_) const |
template<typename P > | |
P * | makeProperty (const std::string &name_, const typename P::ValueType &v) |
bool | updatePropertyFromString (const std::string &name, const std::string &value) |
bool | updateMapFromString (const std::string &values) |
void | writeToCSV (std::ostream &os) const |
a collection of properties mapping from name to the property itself
Definition at line 76 of file property.h.
typedef std::map<std::string, BaseProperty*> g2o::PropertyMap::BaseClass |
Definition at line 79 of file property.h.
typedef BaseClass::const_iterator g2o::PropertyMap::PropertyMapConstIterator |
Definition at line 81 of file property.h.
typedef BaseClass::iterator g2o::PropertyMap::PropertyMapIterator |
Definition at line 80 of file property.h.
g2o::PropertyMap::~PropertyMap | ( | ) |
Definition at line 58 of file property.cpp.
bool g2o::PropertyMap::addProperty | ( | BaseProperty * | p | ) |
add a property to the map
Definition at line 44 of file property.cpp.
References g2o::BaseProperty::name().
bool g2o::PropertyMap::eraseProperty | ( | const std::string & | name_ | ) |
remove a property from the map
Definition at line 49 of file property.cpp.
|
inline |
return a property by its name
Definition at line 99 of file property.h.
|
inline |
Definition at line 107 of file property.h.
|
inline |
create a property and insert it
Definition at line 119 of file property.h.
References values.
Referenced by main(), g2o::OptimizationAlgorithmDogleg::OptimizationAlgorithmDogleg(), g2o::OptimizationAlgorithmLevenberg::OptimizationAlgorithmLevenberg(), g2o::OptimizationAlgorithmWithHessian::OptimizationAlgorithmWithHessian(), and g2o::DrawAction::refreshPropertyPtrs().
bool g2o::PropertyMap::updateMapFromString | ( | const std::string & | values | ) |
update the map based on a name=value string, e.g., name1=val1,name2=val2
Definition at line 88 of file property.cpp.
References __PRETTY_FUNCTION__, g2o::BaseProperty::name(), g2o::strSplit(), and g2o::trim().
Referenced by g2o::OptimizationAlgorithm::updatePropertiesFromString().
bool g2o::PropertyMap::updatePropertyFromString | ( | const std::string & | name, |
const std::string & | value | ||
) |
update a specfic property with a new value
Definition at line 65 of file property.cpp.
void g2o::PropertyMap::writeToCSV | ( | std::ostream & | os | ) | const |
Definition at line 74 of file property.cpp.
References g2o::BaseProperty::name(), and g2o::BaseProperty::toString().
Referenced by main().