g2o
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 51 of file property.h.

Member Typedef Documentation

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

Definition at line 53 of file property.h.

Constructor & Destructor Documentation

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

Definition at line 54 of file property.h.

54 : BaseProperty(name_){}
BaseProperty(const std::string name_)
Definition: property.cpp:39
template<typename T>
g2o::Property< T >::Property ( const std::string &  name_,
const T &  v 
)
inline

Definition at line 55 of file property.h.

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

Member Function Documentation

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

Implements g2o::BaseProperty.

Definition at line 64 of file property.h.

65  {
66  bool status = convertString(s, _value);
67  return status;
68  }
bool convertString(const std::string &s, T &x)
template<typename T>
void g2o::Property< T >::setValue ( const T &  v)
inline
template<typename T>
virtual std::string g2o::Property< T >::toString ( ) const
inlinevirtual

Implements g2o::BaseProperty.

Definition at line 58 of file property.h.

59  {
60  std::stringstream sstr;
61  sstr << _value;
62  return sstr.str();
63  }
template<typename T>
const T& g2o::Property< T >::value ( ) const
inline

Member Data Documentation

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

Definition at line 70 of file property.h.


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