Templatized parameter class. More...
#include <Param.hh>
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 Param * | Clone () const |
virtual std::string | GetAsString () const |
Get the parameter value as a string. | |
virtual std::string | GetDefaultAsString () const |
T | GetDefaultValue () const |
Get the value. | |
T | GetValue () const |
Get the value. | |
T | 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 | |
T | defaultValue |
T | 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) |
Templatized parameter class.
|
inline |
Constructor.
|
inlinevirtual |
Destructor.
|
inlinevirtual |
Implements sdf::Param.
|
inlinevirtual |
Get the parameter value as a string.
Reimplemented from sdf::Param.
Referenced by sdf::ParamT< std::string >::Clone().
|
inlinevirtual |
Reimplemented from sdf::Param.
|
inline |
Get the value.
|
inline |
Get the value.
|
inline |
|
inlinevirtual |
Reset to default value.
Implements sdf::Param.
|
inlinevirtual |
Set the parameter value from a string.
Referenced by sdf::ParamT< std::string >::ParamT(), and sdf::ParamT< std::string >::SetFromString().
|
inlinevirtual |
Set the parameter value from a string.
Reimplemented from sdf::Param.
|
inline |
Set the value of the parameter.
|
inlinevirtual |
Update param value.
Implements sdf::Param.
|
friend |
|
protected |
|
protected |