g2o
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
g2o::Property< T > Class Template Reference

#include <property.h>

Inheritance diagram for g2o::Property< T >:
Inheritance graph
[legend]
Collaboration diagram for g2o::Property< T >:
Collaboration graph
[legend]

Public Types

typedef T ValueType
 

Public Member Functions

 Property (const std::string &name_)
 
 Property (const std::string &name_, const T &v)
 
void setValue (const T &v)
 
const T & value () const
 
virtual std::string toString () const
 
virtual bool fromString (const std::string &s)
 
- Public Member Functions inherited from g2o::BaseProperty
 BaseProperty (const std::string &name_)
 
virtual ~BaseProperty ()
 
const std::string & name ()
 

Protected Attributes

_value
 
- Protected Attributes inherited from g2o::BaseProperty
std::string _name
 

Detailed Description

template<typename T>
class g2o::Property< T >

Definition at line 52 of file property.h.

Member Typedef Documentation

◆ ValueType

template<typename T >
typedef T g2o::Property< T >::ValueType

Definition at line 54 of file property.h.

Constructor & Destructor Documentation

◆ Property() [1/2]

template<typename T >
g2o::Property< T >::Property ( const std::string &  name_)
inline

Definition at line 55 of file property.h.

55: BaseProperty(name_) {}
BaseProperty(const std::string &name_)
Definition property.cpp:39

◆ Property() [2/2]

template<typename T >
g2o::Property< T >::Property ( const std::string &  name_,
const T &  v 
)
inline

Definition at line 56 of file property.h.

57 : BaseProperty(name_), _value(v) {}

Member Function Documentation

◆ fromString()

template<typename T >
virtual bool g2o::Property< T >::fromString ( const std::string &  s)
inlinevirtual

Implements g2o::BaseProperty.

Definition at line 65 of file property.h.

65 {
66 bool status = convertString(s, _value);
67 return status;
68 }
bool convertString(const std::string &s, T &x, bool failIfLeftoverChars=true)

References g2o::Property< T >::_value, and g2o::convertString().

◆ setValue()

template<typename T >
void g2o::Property< T >::setValue ( const T &  v)
inline

◆ toString()

template<typename T >
virtual std::string g2o::Property< T >::toString ( ) const
inlinevirtual

Implements g2o::BaseProperty.

Definition at line 60 of file property.h.

60 {
61 std::stringstream sstr;
62 sstr << _value;
63 return sstr.str();
64 }

References g2o::Property< T >::_value.

◆ value()

template<typename T >
const T & g2o::Property< T >::value ( ) const
inline

Member Data Documentation

◆ _value

template<typename T >
T g2o::Property< T >::_value
protected

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