XMLConfigNode Class Reference
[Server]
#include <XMLConfig.hh>
Detailed Description
Class encapsulating a single xml nodePublic Member Functions | |
XMLConfigNode (XMLConfig *cfg, XMLConfigNode *parent, xmlNodePtr xmlNode, xmlDocPtr xmlDoc) | |
~XMLConfigNode () | |
std::string | GetName () |
std::string | GetNSPrefix () |
XMLConfigNode * | GetNext () |
XMLConfigNode * | GetNext (std::string name) |
XMLConfigNode * | GetNextByNSPrefix (std::string name) |
XMLConfigNode * | GetChild () |
XMLConfigNode * | GetChild (std::string name) |
XMLConfigNode * | GetChildByNSPrefix (std::string prefix) |
XMLConfigNode * | Rewind () |
void | Print () |
std::string | GetValue () |
std::string | GetString (std::string key, std::string def, int require=0) |
unsigned char | GetChar (std::string key, char def, int require=0) |
std::string | GetFilename (std::string key, std::string def, int require=0) |
int | GetInt (std::string key, int def, int require=0) |
double | GetDouble (std::string key, double def, int require=0) |
float | GetFloat (std::string key, float def, int require=0) |
bool | GetBool (std::string key, bool def, int require=0) |
double | GetLength (std::string key, double def, int require=0) |
gazebo::Time | GetTime (std::string key, double def, int require=0) |
Vector3 | GetVector3 (std::string key, Vector3 def) |
Vector2< double > | GetVector2d (std::string key, Vector2< double > def) |
Vector2< int > | GetVector2i (std::string key, Vector2< int > def) |
Quatern | GetRotation (std::string key, Quatern def) |
std::string | GetTupleString (std::string key, int index, std::string def) |
int | GetTupleInt (std::string key, int index, int def) |
double | GetTupleDouble (std::string key, int index, double def) |
double | GetTupleLength (std::string key, int index, double def) |
double | GetTupleAngle (std::string key, int index, double def) |
Protected Member Functions | |
xmlChar * | GetNodeValue (std::string key) |
Constructor & Destructor Documentation
XMLConfigNode | ( | XMLConfig * | cfg, | |
XMLConfigNode * | parent, | |||
xmlNodePtr | xmlNode, | |||
xmlDocPtr | xmlDoc | |||
) |
Constructor
~XMLConfigNode | ( | ) |
Destructors
Member Function Documentation
std::string GetName | ( | ) |
Get the node name
std::string GetNSPrefix | ( | ) |
Get the name space prefix
XMLConfigNode* GetNext | ( | ) |
Get the next sibling of this node
XMLConfigNode* GetNext | ( | std::string | name | ) |
Get next by name
XMLConfigNode* GetNextByNSPrefix | ( | std::string | name | ) |
Get next node by namespace prefix
XMLConfigNode* GetChild | ( | ) |
Get the first child of this node
XMLConfigNode* GetChild | ( | std::string | name | ) |
Get a child based on a name. Returns null if not found
XMLConfigNode* GetChildByNSPrefix | ( | std::string | prefix | ) |
Get the first child with the specified namespace prefix
XMLConfigNode* Rewind | ( | ) |
Move child pointer back to beginning
void Print | ( | ) |
Print (for debugging purposes)
std::string GetValue | ( | ) |
Return the value of the current node
std::string GetString | ( | std::string | key, | |
std::string | def, | |||
int | require = 0 | |||
) |
Get an attribute string value
unsigned char GetChar | ( | std::string | key, | |
char | def, | |||
int | require = 0 | |||
) |
Get a attribute character value
std::string GetFilename | ( | std::string | key, | |
std::string | def, | |||
int | require = 0 | |||
) |
Get a file name. Always returns an absolute path. If the filename is entered as a relative path, we prepend the world file path.
int GetInt | ( | std::string | key, | |
int | def, | |||
int | require = 0 | |||
) |
Get an integer
double GetDouble | ( | std::string | key, | |
double | def, | |||
int | require = 0 | |||
) |
Get a double
float GetFloat | ( | std::string | key, | |
float | def, | |||
int | require = 0 | |||
) |
Get a float
bool GetBool | ( | std::string | key, | |
bool | def, | |||
int | require = 0 | |||
) |
Get a boolean
double GetLength | ( | std::string | key, | |
double | def, | |||
int | require = 0 | |||
) |
Get an attribute length value (return value in meters)
gazebo::Time GetTime | ( | std::string | key, | |
double | def, | |||
int | require = 0 | |||
) |
Get an attribute time value (return value in seconds)
Get a two dimensional double vector
std::string GetTupleString | ( | std::string | key, | |
int | index, | |||
std::string | def | |||
) |
Get an attribute tuple value
int GetTupleInt | ( | std::string | key, | |
int | index, | |||
int | def | |||
) |
Get an attribute tuple int value
double GetTupleDouble | ( | std::string | key, | |
int | index, | |||
double | def | |||
) |
Get an attribute tuple double value
double GetTupleLength | ( | std::string | key, | |
int | index, | |||
double | def | |||
) |
Get an attribute tuple length value (return value in meters)
double GetTupleAngle | ( | std::string | key, | |
int | index, | |||
double | def | |||
) |
Get an attribute tuple angle value (return value in radians)
xmlChar* GetNodeValue | ( | std::string | key | ) | [protected] |
Get a node's value, which is either a attribute or child node value.
The documentation for this class was generated from the following file: