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

SDF Element class. More...

#include <SDF.hh>

Public Member Functions

 Element ()
virtual ~Element () GAZEBO_DEPRECATED(1.6)
void AddAttribute (const std::string &_key, const std::string &_type, const std::string &_defaultvalue, bool _required, const std::string &_description="") GAZEBO_DEPRECATED(1.6)
ElementPtr AddElement (const std::string &_name) GAZEBO_DEPRECATED(1.6)
void AddElementDescription (ElementPtr _elem) GAZEBO_DEPRECATED(1.6)
 Add a new element description.
void AddValue (const std::string &_type, const std::string &_defaultValue, bool _required, const std::string &_description="") GAZEBO_DEPRECATED(1.6)
void ClearElements () GAZEBO_DEPRECATED(1.6)
 Remove all child elements.
boost::shared_ptr< ElementClone () const GAZEBO_DEPRECATED(1.6)
void Copy (const ElementPtr _elem) GAZEBO_DEPRECATED(1.6)
 Copy values from an Element.
template<typename T >
Get (const std::string &_key="")
ParamPtr GetAttribute (const std::string &_key) GAZEBO_DEPRECATED(1.6)
 Get the param of an attribute.
ParamPtr GetAttribute (unsigned int _index) const GAZEBO_DEPRECATED(1.6)
 Get an attribute using an index.
unsigned int GetAttributeCount () const GAZEBO_DEPRECATED(1.6)
 Get the number of attributes.
bool GetAttributeSet (const std::string &_key) GAZEBO_DEPRECATED(1.6)
 Return true if the attribute was set (i.e. not default value)
bool GetCopyChildren () const GAZEBO_DEPRECATED(1.6)
std::string GetDescription () const GAZEBO_DEPRECATED(1.6)
 Get a text description of the element.
ElementPtr GetElement (const std::string &_name) const GAZEBO_DEPRECATED(1.6)
ElementPtr GetElement (const std::string &_name) GAZEBO_DEPRECATED(1.6)
ElementPtr GetElementDescription (unsigned int _index) const GAZEBO_DEPRECATED(1.6)
 Get an element description using an index.
ElementPtr GetElementDescription (const std::string &_key) const GAZEBO_DEPRECATED(1.6)
 Get an element descriptio using a key.
unsigned int GetElementDescriptionCount () const GAZEBO_DEPRECATED(1.6)
 Get the number of element descriptions.
ElementPtr GetElementImpl (const std::string &_name) const GAZEBO_DEPRECATED(1.6)
ElementPtr GetFirstElement () const GAZEBO_DEPRECATED(1.6)
std::string GetInclude () const GAZEBO_DEPRECATED(1.6)
const std::string & GetName () const GAZEBO_DEPRECATED(1.6)
ElementPtr GetNextElement (const std::string &_name="") const GAZEBO_DEPRECATED(1.6)
ElementPtr GetParent () const GAZEBO_DEPRECATED(1.6)
const std::string & GetRequired () const GAZEBO_DEPRECATED(1.6)
ParamPtr GetValue () GAZEBO_DEPRECATED(1.6)
 Get the param of the elements value.
bool GetValueBool (const std::string &_key="") GAZEBO_DEPRECATED(1.6)
char GetValueChar (const std::string &_key="") GAZEBO_DEPRECATED(1.6)
gazebo::common::Color GetValueColor (const std::string &_key="") GAZEBO_DEPRECATED(1.6)
double GetValueDouble (const std::string &_key="") GAZEBO_DEPRECATED(1.6)
float GetValueFloat (const std::string &_key="") GAZEBO_DEPRECATED(1.6)
int GetValueInt (const std::string &_key="") GAZEBO_DEPRECATED(1.6)
gazebo::math::Pose GetValuePose (const std::string &_key="") GAZEBO_DEPRECATED(1.6)
gazebo::math::Quaternion GetValueQuaternion (const std::string &_key="") GAZEBO_DEPRECATED(1.6)
std::string GetValueString (const std::string &_key="") GAZEBO_DEPRECATED(1.6)
gazebo::common::Time GetValueTime (const std::string &_key="") GAZEBO_DEPRECATED(1.6)
unsigned int GetValueUInt (const std::string &_key="") GAZEBO_DEPRECATED(1.6)
gazebo::math::Vector2d GetValueVector2d (const std::string &_key="") GAZEBO_DEPRECATED(1.6)
gazebo::math::Vector3 GetValueVector3 (const std::string &_key="") GAZEBO_DEPRECATED(1.6)
bool HasAttribute (const std::string &_key) GAZEBO_DEPRECATED(1.6)
bool HasElement (const std::string &_name) const GAZEBO_DEPRECATED(1.6)
bool HasElementDescription (const std::string &_name) GAZEBO_DEPRECATED(1.6)
 Return true if an element description exists.
void InsertElement (ElementPtr _elem) GAZEBO_DEPRECATED(1.6)
void PrintDescription (std::string _prefix) GAZEBO_DEPRECATED(1.6)
void PrintDocLeftPane (std::string &_html, int _spacing, int &_index) GAZEBO_DEPRECATED(1.6)
 Helper function for SDF::PrintDoc.
void PrintDocRightPane (std::string &_html, int _spacing, int &_index) GAZEBO_DEPRECATED(1.6)
 Helper function for SDF::PrintDoc.
void PrintValues (std::string _prefix) GAZEBO_DEPRECATED(1.6)
void PrintWiki (std::string _prefix) GAZEBO_DEPRECATED(1.6)
void RemoveChild (ElementPtr _child) GAZEBO_DEPRECATED(1.6)
 Remove a child element.
void RemoveFromParent () GAZEBO_DEPRECATED(1.6)
 Remove this element from its parent.
void Reset () GAZEBO_DEPRECATED(1.6)
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 SetCopyChildren (bool _value) GAZEBO_DEPRECATED(1.6)
void SetDescription (const std::string &_desc) GAZEBO_DEPRECATED(1.6)
 Set a text description for the element.
void SetInclude (const std::string &_filename) GAZEBO_DEPRECATED(1.6)
void SetName (const std::string &_name) GAZEBO_DEPRECATED(1.6)
void SetParent (const ElementPtr _parent) GAZEBO_DEPRECATED(1.6)
void SetRequired (const std::string &_req) GAZEBO_DEPRECATED(1.6)
std::string ToString (const std::string &_prefix) const GAZEBO_DEPRECATED(1.6)
void Update () GAZEBO_DEPRECATED(1.6)

Detailed Description

SDF Element class.

Constructor & Destructor Documentation

sdf::Element::Element ( )
virtual sdf::Element::~Element ( )
virtual

Member Function Documentation

void sdf::Element::AddAttribute ( const std::string &  _key,
const std::string &  _type,
const std::string &  _defaultvalue,
bool  _required,
const std::string &  _description = "" 
)
ElementPtr sdf::Element::AddElement ( const std::string &  _name)
void sdf::Element::AddElementDescription ( ElementPtr  _elem)

Add a new element description.

void sdf::Element::AddValue ( const std::string &  _type,
const std::string &  _defaultValue,
bool  _required,
const std::string &  _description = "" 
)
void sdf::Element::ClearElements ( )

Remove all child elements.

boost::shared_ptr<Element> sdf::Element::Clone ( ) const
void sdf::Element::Copy ( const ElementPtr  _elem)

Copy values from an Element.

template<typename T >
T sdf::Element::Get ( const std::string &  _key = "")
inline
ParamPtr sdf::Element::GetAttribute ( const std::string &  _key)

Get the param of an attribute.

Parameters
_keythe name of the attribute

Referenced by Get().

ParamPtr sdf::Element::GetAttribute ( unsigned int  _index) const

Get an attribute using an index.

unsigned int sdf::Element::GetAttributeCount ( ) const

Get the number of attributes.

bool sdf::Element::GetAttributeSet ( const std::string &  _key)

Return true if the attribute was set (i.e. not default value)

bool sdf::Element::GetCopyChildren ( ) const
std::string sdf::Element::GetDescription ( ) const

Get a text description of the element.

ElementPtr sdf::Element::GetElement ( const std::string &  _name) const
ElementPtr sdf::Element::GetElement ( const std::string &  _name)
ElementPtr sdf::Element::GetElementDescription ( unsigned int  _index) const

Get an element description using an index.

Referenced by Get().

ElementPtr sdf::Element::GetElementDescription ( const std::string &  _key) const

Get an element descriptio using a key.

unsigned int sdf::Element::GetElementDescriptionCount ( ) const

Get the number of element descriptions.

ElementPtr sdf::Element::GetElementImpl ( const std::string &  _name) const

Referenced by Get().

ElementPtr sdf::Element::GetFirstElement ( ) const
std::string sdf::Element::GetInclude ( ) const
const std::string& sdf::Element::GetName ( ) const
ElementPtr sdf::Element::GetNextElement ( const std::string &  _name = "") const
ElementPtr sdf::Element::GetParent ( ) const
const std::string& sdf::Element::GetRequired ( ) const
ParamPtr sdf::Element::GetValue ( )

Get the param of the elements value.

bool sdf::Element::GetValueBool ( const std::string &  _key = "")
char sdf::Element::GetValueChar ( const std::string &  _key = "")
gazebo::common::Color sdf::Element::GetValueColor ( const std::string &  _key = "")
double sdf::Element::GetValueDouble ( const std::string &  _key = "")
float sdf::Element::GetValueFloat ( const std::string &  _key = "")
int sdf::Element::GetValueInt ( const std::string &  _key = "")
gazebo::math::Pose sdf::Element::GetValuePose ( const std::string &  _key = "")
gazebo::math::Quaternion sdf::Element::GetValueQuaternion ( const std::string &  _key = "")
std::string sdf::Element::GetValueString ( const std::string &  _key = "")
gazebo::common::Time sdf::Element::GetValueTime ( const std::string &  _key = "")
unsigned int sdf::Element::GetValueUInt ( const std::string &  _key = "")
gazebo::math::Vector2d sdf::Element::GetValueVector2d ( const std::string &  _key = "")
gazebo::math::Vector3 sdf::Element::GetValueVector3 ( const std::string &  _key = "")
bool sdf::Element::HasAttribute ( const std::string &  _key)
bool sdf::Element::HasElement ( const std::string &  _name) const

Referenced by Get().

bool sdf::Element::HasElementDescription ( const std::string &  _name)

Return true if an element description exists.

Referenced by Get().

void sdf::Element::InsertElement ( ElementPtr  _elem)
void sdf::Element::PrintDescription ( std::string  _prefix)
void sdf::Element::PrintDocLeftPane ( std::string &  _html,
int  _spacing,
int &  _index 
)

Helper function for SDF::PrintDoc.

This generates the SDF html documentation.

Parameters
[out]_htmlAccumulated HTML for output.
[in]_spacingAmount of spacing for this element.
[in]_indexUnique index for this element.
void sdf::Element::PrintDocRightPane ( std::string &  _html,
int  _spacing,
int &  _index 
)

Helper function for SDF::PrintDoc.

This generates the SDF html documentation.

Parameters
[out]_htmlAccumulated HTML for output
[in]_spacingAmount of spacing for this element.
void sdf::Element::PrintValues ( std::string  _prefix)
void sdf::Element::PrintWiki ( std::string  _prefix)
void sdf::Element::RemoveChild ( ElementPtr  _child)

Remove a child element.

Parameters
[in]_childPointer to the child to remove.
void sdf::Element::RemoveFromParent ( )

Remove this element from its parent.

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

Set a text description for the element.

void sdf::Element::SetInclude ( const std::string &  _filename)
void sdf::Element::SetName ( const std::string &  _name)
void sdf::Element::SetParent ( const ElementPtr  _parent)
void sdf::Element::SetRequired ( const std::string &  _req)
std::string sdf::Element::ToString ( const std::string &  _prefix) const
void sdf::Element::Update ( )

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