All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | Friends | List of all members
sdf::ParamT< T > Class Template Reference

Templatized parameter class. More...

#include <Param.hh>

Inheritance diagram for sdf::ParamT< T >:
Inheritance graph
[legend]

Public Member Functions

 ParamT (const std::string &_key, const std::string &_default, bool _required, const std::string &_typeName="", const std::string &_description="")
 Constructor.
 
virtual ~ParamT ()
 Destructor.
 
virtual ParamClone () const
 
virtual std::string GetAsString () const
 Get the parameter value as a string.
 
virtual std::string GetDefaultAsString () const
 
GetDefaultValue () const
 Get the value.
 
GetValue () const
 Get the value.
 
operator* () const
 
virtual void Reset ()
 Reset to default value.
 
virtual bool Set (const std::string &_str)
 Set the parameter value from a string.
 
virtual bool SetFromString (const std::string &_value)
 Set the parameter value from a string.
 
void SetValue (const T &_value)
 Set the value of the parameter.
 
virtual void Update ()
 Update param value.
 
- Public Member Functions inherited from sdf::Param
 Param (Param *_newParam)
 Constructor.
 
virtual ~Param ()
 Destructor.
 
bool Get (bool &_value)
 
bool Get (int &_value)
 
bool Get (unsigned int &_value)
 
bool Get (float &_value)
 
bool Get (double &_value)
 
bool Get (char &_value)
 
bool Get (std::string &_value)
 
bool Get (gazebo::math::Vector3 &_value)
 
bool Get (gazebo::math::Vector2i &_value)
 
bool Get (gazebo::math::Vector2d &_value)
 
bool Get (gazebo::math::Quaternion &_value)
 
bool Get (gazebo::math::Pose &_value)
 
bool Get (gazebo::common::Color &_value)
 
bool Get (gazebo::common::Time &_value)
 
std::string GetDescription () const
 Get the description of the parameter.
 
const std::string & GetKey () const
 
bool GetRequired () const
 
bool GetSet () const
 Return true if the parameter has been set.
 
std::string GetTypeName () const
 
bool IsBool () const
 
bool IsChar () const
 
bool IsColor () const
 
bool IsDouble () const
 
bool IsFloat () const
 
bool IsInt () const
 
bool IsPose () const
 
bool IsQuaternion () const
 
bool IsStr () const
 
bool IsTime () const
 
bool IsUInt () const
 
bool IsVector2d () const
 
bool IsVector2i () const
 
bool IsVector3 () const
 
bool Set (const bool &_value)
 
bool Set (const int &_value)
 
bool Set (const unsigned int &_value)
 
bool Set (const float &_value)
 
bool Set (const double &_value)
 
bool Set (const char &_value)
 
bool Set (const std::string &_value)
 
bool Set (const char *_value)
 
bool Set (const gazebo::math::Vector3 &_value)
 
bool Set (const gazebo::math::Vector2i &_value)
 
bool Set (const gazebo::math::Vector2d &_value)
 
bool Set (const gazebo::math::Quaternion &_value)
 
bool Set (const gazebo::math::Pose &_value)
 
bool Set (const gazebo::common::Color &_value)
 
bool Set (const gazebo::common::Time &_value)
 
void SetDescription (const std::string &_desc)
 Set the description of the parameter.
 
template<typename T >
void SetUpdateFunc (T _updateFunc)
 Update function.
 

Protected Attributes

defaultValue
 
value
 
- Protected Attributes inherited from sdf::Param
std::string description
 
std::string key
 
bool required
 
bool set
 
std::string typeName
 
boost::function< boost::any()> updateFunc
 

Friends

std::ostream & operator<< (std::ostream &_out, const ParamT< T > &_p)
 

Detailed Description

template<typename T>
class sdf::ParamT< T >

Templatized parameter class.

Constructor & Destructor Documentation

template<typename T>
sdf::ParamT< T >::ParamT ( const std::string &  _key,
const std::string &  _default,
bool  _required,
const std::string &  _typeName = "",
const std::string &  _description = "" 
)
inline

Constructor.

template<typename T>
virtual sdf::ParamT< T >::~ParamT ( )
inlinevirtual

Destructor.

Member Function Documentation

template<typename T>
virtual Param* sdf::ParamT< T >::Clone ( ) const
inlinevirtual

Implements sdf::Param.

template<typename T>
virtual std::string sdf::ParamT< T >::GetAsString ( ) const
inlinevirtual

Get the parameter value as a string.

Reimplemented from sdf::Param.

Referenced by sdf::ParamT< std::string >::Clone().

template<typename T>
virtual std::string sdf::ParamT< T >::GetDefaultAsString ( ) const
inlinevirtual

Reimplemented from sdf::Param.

template<typename T>
T sdf::ParamT< T >::GetDefaultValue ( ) const
inline

Get the value.

template<typename T>
T sdf::ParamT< T >::GetValue ( ) const
inline

Get the value.

template<typename T>
T sdf::ParamT< T >::operator* ( ) const
inline
template<typename T>
virtual void sdf::ParamT< T >::Reset ( )
inlinevirtual

Reset to default value.

Implements sdf::Param.

template<typename T>
virtual bool sdf::ParamT< T >::Set ( const std::string &  _str)
inlinevirtual

Set the parameter value from a string.

Referenced by sdf::ParamT< std::string >::ParamT(), and sdf::ParamT< std::string >::SetFromString().

template<typename T>
virtual bool sdf::ParamT< T >::SetFromString ( const std::string &  _value)
inlinevirtual

Set the parameter value from a string.

Reimplemented from sdf::Param.

template<typename T>
void sdf::ParamT< T >::SetValue ( const T &  _value)
inline

Set the value of the parameter.

template<typename T>
virtual void sdf::ParamT< T >::Update ( )
inlinevirtual

Update param value.

Implements sdf::Param.

Friends And Related Function Documentation

template<typename T>
std::ostream& operator<< ( std::ostream &  _out,
const ParamT< T > &  _p 
)
friend

Member Data Documentation

template<typename T>
T sdf::ParamT< T >::defaultValue
protected
template<typename T>
T sdf::ParamT< T >::value
protected

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