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

A parameter class. More...

#include <Param.hh>

Inheritance diagram for sdf::Param:
Inheritance graph
[legend]

Public Member Functions

 Param (Param *_newParam) GAZEBO_DEPRECATED(1.6)
 Constructor.
virtual ~Param () GAZEBO_DEPRECATED(1.6)
 Destructor.
virtual boost::shared_ptr< ParamClone () const GAZEBO_DEPRECATED(1.6)=0
template<typename T >
bool Get (T &_value)
 Get the value of the parameter.
bool Get (bool &_value) GAZEBO_DEPRECATED(1.6)
bool Get (int &_value) GAZEBO_DEPRECATED(1.6)
bool Get (unsigned int &_value) GAZEBO_DEPRECATED(1.6)
bool Get (float &_value) GAZEBO_DEPRECATED(1.6)
bool Get (double &_value) GAZEBO_DEPRECATED(1.6)
bool Get (char &_value) GAZEBO_DEPRECATED(1.6)
bool Get (std::string &_value) GAZEBO_DEPRECATED(1.6)
bool Get (gazebo::math::Vector3 &_value) GAZEBO_DEPRECATED(1.6)
bool Get (gazebo::math::Vector2i &_value) GAZEBO_DEPRECATED(1.6)
bool Get (gazebo::math::Vector2d &_value) GAZEBO_DEPRECATED(1.6)
bool Get (gazebo::math::Quaternion &_value) GAZEBO_DEPRECATED(1.6)
bool Get (gazebo::math::Pose &_value) GAZEBO_DEPRECATED(1.6)
bool Get (gazebo::common::Color &_value) GAZEBO_DEPRECATED(1.6)
bool Get (gazebo::common::Time &_value) GAZEBO_DEPRECATED(1.6)
virtual std::string GetAsString () const GAZEBO_DEPRECATED(1.6)
 Get the type.
virtual std::string GetDefaultAsString () const GAZEBO_DEPRECATED(1.6)
std::string GetDescription () const GAZEBO_DEPRECATED(1.6)
 Get the description of the parameter.
const std::string & GetKey () const GAZEBO_DEPRECATED(1.6)
bool GetRequired () const GAZEBO_DEPRECATED(1.6)
bool GetSet () const GAZEBO_DEPRECATED(1.6)
 Return true if the parameter has been set.
std::string GetTypeName () const GAZEBO_DEPRECATED(1.6)
bool IsBool () const GAZEBO_DEPRECATED(1.6)
bool IsChar () const GAZEBO_DEPRECATED(1.6)
bool IsColor () const GAZEBO_DEPRECATED(1.6)
bool IsDouble () const GAZEBO_DEPRECATED(1.6)
bool IsFloat () const GAZEBO_DEPRECATED(1.6)
bool IsInt () const GAZEBO_DEPRECATED(1.6)
bool IsPose () const GAZEBO_DEPRECATED(1.6)
bool IsQuaternion () const GAZEBO_DEPRECATED(1.6)
bool IsStr () const GAZEBO_DEPRECATED(1.6)
bool IsTime () const GAZEBO_DEPRECATED(1.6)
bool IsUInt () const GAZEBO_DEPRECATED(1.6)
bool IsVector2d () const GAZEBO_DEPRECATED(1.6)
bool IsVector2i () const GAZEBO_DEPRECATED(1.6)
bool IsVector3 () const GAZEBO_DEPRECATED(1.6)
virtual void Reset () GAZEBO_DEPRECATED(1.6)=0
 Reset the parameter.
bool Set (const bool &_value) GAZEBO_DEPRECATED(1.6)
bool Set (const int &_value) GAZEBO_DEPRECATED(1.6)
bool Set (const unsigned int &_value) GAZEBO_DEPRECATED(1.6)
bool Set (const float &_value) GAZEBO_DEPRECATED(1.6)
bool Set (const double &_value) GAZEBO_DEPRECATED(1.6)
bool Set (const char &_value) GAZEBO_DEPRECATED(1.6)
bool Set (const std::string &_value) GAZEBO_DEPRECATED(1.6)
bool Set (const char *_value) GAZEBO_DEPRECATED(1.6)
bool Set (const gazebo::math::Vector3 &_value) GAZEBO_DEPRECATED(1.6)
bool Set (const gazebo::math::Vector2i &_value) GAZEBO_DEPRECATED(1.6)
bool Set (const gazebo::math::Vector2d &_value) GAZEBO_DEPRECATED(1.6)
bool Set (const gazebo::math::Quaternion &_value) GAZEBO_DEPRECATED(1.6)
bool Set (const gazebo::math::Pose &_value) GAZEBO_DEPRECATED(1.6)
bool Set (const gazebo::common::Color &_value) GAZEBO_DEPRECATED(1.6)
bool Set (const gazebo::common::Time &_value) GAZEBO_DEPRECATED(1.6)
void SetDescription (const std::string &_desc) GAZEBO_DEPRECATED(1.6)
 Set the description of the parameter.
virtual bool SetFromString (const std::string &) GAZEBO_DEPRECATED(1.6)
 Set the parameter value from a string.
template<typename T >
void SetUpdateFunc (T _updateFunc)
 Update function.
virtual void Update () GAZEBO_DEPRECATED(1.6)=0

Protected Attributes

std::string description
std::string key
bool required
bool set
std::string typeName
boost::function< boost::any()> updateFunc

Detailed Description

A parameter class.

Constructor & Destructor Documentation

sdf::Param::Param ( Param _newParam)

Constructor.

virtual sdf::Param::~Param ( )
virtual

Destructor.

Member Function Documentation

virtual boost::shared_ptr<Param> sdf::Param::Clone ( ) const
pure virtual
template<typename T >
bool sdf::Param::Get ( T &  _value)
inline

Get the value of the parameter.

Parameters
[out]_valueThe value of the parameter.
Returns
True if parameter was successfully cast to the value type passed in.

References GetAsString(), gzerr, key, and typeName.

bool sdf::Param::Get ( bool &  _value)
bool sdf::Param::Get ( int &  _value)
bool sdf::Param::Get ( unsigned int &  _value)
bool sdf::Param::Get ( float &  _value)
bool sdf::Param::Get ( double &  _value)
bool sdf::Param::Get ( char &  _value)
bool sdf::Param::Get ( std::string &  _value)
bool sdf::Param::Get ( gazebo::math::Vector3 _value)
bool sdf::Param::Get ( gazebo::math::Vector2i _value)
bool sdf::Param::Get ( gazebo::math::Vector2d _value)
bool sdf::Param::Get ( gazebo::math::Quaternion _value)
bool sdf::Param::Get ( gazebo::math::Pose _value)
bool sdf::Param::Get ( gazebo::common::Color _value)
bool sdf::Param::Get ( gazebo::common::Time _value)
virtual std::string sdf::Param::GetAsString ( ) const
inlinevirtual

Get the type.

Reimplemented in sdf::ParamT< T >, and sdf::ParamT< std::string >.

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

virtual std::string sdf::Param::GetDefaultAsString ( ) const
inlinevirtual
std::string sdf::Param::GetDescription ( ) const

Get the description of the parameter.

const std::string& sdf::Param::GetKey ( ) const
inline
bool sdf::Param::GetRequired ( ) const
inline

References required.

bool sdf::Param::GetSet ( ) const
inline

Return true if the parameter has been set.

std::string sdf::Param::GetTypeName ( ) const
bool sdf::Param::IsBool ( ) const
bool sdf::Param::IsChar ( ) const
bool sdf::Param::IsColor ( ) const
bool sdf::Param::IsDouble ( ) const
bool sdf::Param::IsFloat ( ) const
bool sdf::Param::IsInt ( ) const
bool sdf::Param::IsPose ( ) const
bool sdf::Param::IsQuaternion ( ) const
bool sdf::Param::IsStr ( ) const
bool sdf::Param::IsTime ( ) const
bool sdf::Param::IsUInt ( ) const
bool sdf::Param::IsVector2d ( ) const
bool sdf::Param::IsVector2i ( ) const
bool sdf::Param::IsVector3 ( ) const
virtual void sdf::Param::Reset ( )
pure virtual

Reset the parameter.

Implemented in sdf::ParamT< T >, and sdf::ParamT< std::string >.

bool sdf::Param::Set ( const bool &  _value)
bool sdf::Param::Set ( const int &  _value)
bool sdf::Param::Set ( const unsigned int &  _value)
bool sdf::Param::Set ( const float &  _value)
bool sdf::Param::Set ( const double &  _value)
bool sdf::Param::Set ( const char &  _value)
bool sdf::Param::Set ( const std::string &  _value)
bool sdf::Param::Set ( const char *  _value)
bool sdf::Param::Set ( const gazebo::math::Vector3 _value)
bool sdf::Param::Set ( const gazebo::math::Vector2i _value)
bool sdf::Param::Set ( const gazebo::math::Vector2d _value)
bool sdf::Param::Set ( const gazebo::math::Quaternion _value)
bool sdf::Param::Set ( const gazebo::math::Pose _value)
bool sdf::Param::Set ( const gazebo::common::Color _value)
bool sdf::Param::Set ( const gazebo::common::Time _value)
void sdf::Param::SetDescription ( const std::string &  _desc)

Set the description of the parameter.

virtual bool sdf::Param::SetFromString ( const std::string &  )
inlinevirtual

Set the parameter value from a string.

Reimplemented in sdf::ParamT< T >, and sdf::ParamT< std::string >.

template<typename T >
void sdf::Param::SetUpdateFunc ( _updateFunc)
inline

Update function.

References updateFunc.

virtual void sdf::Param::Update ( )
pure virtual

Member Data Documentation

std::string sdf::Param::description
protected
std::string sdf::Param::key
protected

Referenced by Get(), and GetKey().

bool sdf::Param::required
protected
bool sdf::Param::set
protected
std::string sdf::Param::typeName
protected

Referenced by Get().

boost::function<boost::any ()> sdf::Param::updateFunc
protected

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