A parameter class. More...
#include <Param.hh>
Public Member Functions | |
Param (Param *_newParam) | |
Constructor. | |
virtual | ~Param () |
Destructor. | |
virtual Param * | Clone () const =0 |
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) |
virtual std::string | GetAsString () const |
Get the type. | |
virtual std::string | GetDefaultAsString () const |
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 |
virtual void | Reset ()=0 |
Reset the parameter. | |
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. | |
virtual bool | SetFromString (const std::string &) |
Set the parameter value from a string. | |
template<typename T > | |
void | SetUpdateFunc (T _updateFunc) |
Update function. | |
virtual void | Update ()=0 |
Protected Attributes | |
std::string | description |
std::string | key |
bool | required |
bool | set |
std::string | typeName |
boost::function< boost::any()> | updateFunc |
A parameter class.
sdf::Param::Param | ( | Param * | _newParam | ) |
Constructor.
|
virtual |
Destructor.
|
pure virtual |
Implemented in sdf::ParamT< T >, and sdf::ParamT< std::string >.
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 | ) |
|
inlinevirtual |
Get the type.
Reimplemented in sdf::ParamT< T >, and sdf::ParamT< std::string >.
|
inlinevirtual |
Reimplemented in sdf::ParamT< T >, and sdf::ParamT< std::string >.
std::string sdf::Param::GetDescription | ( | ) | const |
Get the description of the parameter.
|
inline |
References key.
Referenced by sdf::ParamT< std::string >::Clone(), and sdf::ParamT< std::string >::Set().
|
inline |
References required.
|
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 |
|
pure virtual |
Reset the parameter.
Implemented in sdf::ParamT< T >, and sdf::ParamT< std::string >.
bool sdf::Param::Set | ( | const bool & | _value | ) |
Referenced by sdf::ParamT< std::string >::Update().
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.
|
inlinevirtual |
Set the parameter value from a string.
Reimplemented in sdf::ParamT< T >, and sdf::ParamT< std::string >.
|
inline |
Update function.
References updateFunc.
|
pure virtual |
Implemented in sdf::ParamT< T >, and sdf::ParamT< std::string >.
|
protected |
Referenced by sdf::ParamT< std::string >::Clone(), and sdf::ParamT< std::string >::ParamT().
|
protected |
Referenced by GetKey(), sdf::ParamT< std::string >::ParamT(), and sdf::ParamT< std::string >::Set().
|
protected |
|
protected |
|
protected |
Referenced by sdf::ParamT< std::string >::Clone(), and sdf::ParamT< std::string >::ParamT().
|
protected |
Referenced by SetUpdateFunc(), and sdf::ParamT< std::string >::Update().