A collection of static methods for common tasks.
More...
#include <Utilities.hh>
|
static bool | SdfParamBool (sdf::Element &_sdf, const std::string &_paramName, const bool _defaultVal) |
| Extract a named bool parameter from an SDF element. More...
|
|
static double | SdfParamDouble (sdf::Element &_sdf, const std::string &_paramName, const double _defaultVal) |
| Extract a named double parameter from an SDF element. More...
|
|
static size_t | SdfParamSizeT (sdf::Element &_sdf, const std::string &_paramName, const size_t _defaultVal) |
| Extract a named size_t parameter from an SDF element. More...
|
|
static std::string | SdfParamString (sdf::Element &_sdf, const std::string &_paramName, const std::string &_defaultVal) |
| Extract a named string parameter from an SDF element. More...
|
|
static ignition::math::Vector2d | SdfParamVector2 (sdf::Element &_sdf, const std::string &_paramName, const ignition::math::Vector2d _defaultVal) |
| Extract a named Vector2 parameter from an SDF element. More...
|
|
static ignition::math::Vector3d | SdfParamVector3 (sdf::Element &_sdf, const std::string &_paramName, const ignition::math::Vector3d _defaultVal) |
| Extract a named Vector3 parameter from an SDF element. More...
|
|
A collection of static methods for common tasks.
Definition at line 51 of file Utilities.hh.
bool asv::Utilities::SdfParamBool |
( |
sdf::Element & |
_sdf, |
|
|
const std::string & |
_paramName, |
|
|
const bool |
_defaultVal |
|
) |
| |
|
static |
Extract a named bool parameter from an SDF element.
- Parameters
-
[in] | _sdf | A reference to the SDF Element tree. |
[in] | _paramName | The parameter name as it appears in SDF. |
[in] | _defaultVal | A default value for the parameter. |
- Returns
- The parameter value (or default value if not found).
Definition at line 57 of file Utilities.cc.
double asv::Utilities::SdfParamDouble |
( |
sdf::Element & |
_sdf, |
|
|
const std::string & |
_paramName, |
|
|
const double |
_defaultVal |
|
) |
| |
|
static |
Extract a named double parameter from an SDF element.
- Parameters
-
[in] | _sdf | A reference to the SDF Element tree. |
[in] | _paramName | The parameter name as it appears in SDF. |
[in] | _defaultVal | A default value for the parameter. |
- Returns
- The parameter value (or default value if not found).
Definition at line 69 of file Utilities.cc.
size_t asv::Utilities::SdfParamSizeT |
( |
sdf::Element & |
_sdf, |
|
|
const std::string & |
_paramName, |
|
|
const size_t |
_defaultVal |
|
) |
| |
|
static |
Extract a named size_t parameter from an SDF element.
- Parameters
-
[in] | _sdf | A reference to the SDF Element tree. |
[in] | _paramName | The parameter name as it appears in SDF. |
[in] | _defaultVal | A default value for the parameter. |
- Returns
- The parameter value (or default value if not found).
Definition at line 63 of file Utilities.cc.
std::string asv::Utilities::SdfParamString |
( |
sdf::Element & |
_sdf, |
|
|
const std::string & |
_paramName, |
|
|
const std::string & |
_defaultVal |
|
) |
| |
|
static |
Extract a named string parameter from an SDF element.
- Parameters
-
[in] | _sdf | A reference to the SDF Element tree. |
[in] | _paramName | The parameter name as it appears in SDF. |
[in] | _defaultVal | A default value for the parameter. |
- Returns
- The parameter value (or default value if not found).
Definition at line 75 of file Utilities.cc.
ignition::math::Vector2d asv::Utilities::SdfParamVector2 |
( |
sdf::Element & |
_sdf, |
|
|
const std::string & |
_paramName, |
|
|
const ignition::math::Vector2d |
_defaultVal |
|
) |
| |
|
static |
Extract a named Vector2 parameter from an SDF element.
- Parameters
-
[in] | _sdf | A reference to the SDF Element tree. |
[in] | _paramName | The parameter name as it appears in SDF. |
[in] | _defaultVal | A default value for the parameter. |
- Returns
- The parameter value (or default value if not found).
Definition at line 81 of file Utilities.cc.
ignition::math::Vector3d asv::Utilities::SdfParamVector3 |
( |
sdf::Element & |
_sdf, |
|
|
const std::string & |
_paramName, |
|
|
const ignition::math::Vector3d |
_defaultVal |
|
) |
| |
|
static |
Extract a named Vector3 parameter from an SDF element.
- Parameters
-
[in] | _sdf | A reference to the SDF Element tree. |
[in] | _paramName | The parameter name as it appears in SDF. |
[in] | _defaultVal | A default value for the parameter. |
- Returns
- The parameter value (or default value if not found).
Definition at line 87 of file Utilities.cc.
The documentation for this class was generated from the following files: