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>

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

Public Member Functions

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

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 ( )
Element* sdf::Element::Clone ( ) const
void sdf::Element::Copy ( const ElementPtr  _elem)

Copy values from an Element.

ParamPtr sdf::Element::GetAttribute ( const std::string &  _key)

Get the param of an attribute.

Parameters
_keythe name of the attribute
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.

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
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
bool sdf::Element::HasElementDescription ( const std::string &  _name)

Return true if an element description exists.

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 
)

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::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: