Home
FAQ
Player
Utilities
Stage
Gazebo
Contrib
Documentation
Publications
Contributors
Users

Project
Download
Bugs/Feedback
Mailing lists

Radish

Old news
Old stuff

WorldFileNode Class Reference

Class encapsulating a single file node. More...

#include <WorldFile.hh>

List of all members.

Public Member Functions

 WorldFileNode (WorldFile *file, WorldFileNode *parent, xmlNodePtr xmlNode, xmlDocPtr xmlDoc)
 Standard constructor.
 ~WorldFileNode ()
 Standard destructor.
const char * GetName ()
 Get the node name.
const char * GetNSPrefix ()
 Get the name space prefix.
WorldFileNodeGetNext ()
 Get the next sibling of this node.
WorldFileNodeGetChild ()
 Get the first child of this node.
WorldFileNodeGetChild (const char *name)
 Get a child based on a name.
WorldFileNodeGetChildByNSPrefix (const char *prefix)
 Get the first child with the specified namespace prefix.
void Print ()
 Print node contents (for debugging purposes); recursive.
bool WarnUnused ()
 Do a recursive check for unused nodes.
bool IsDefined (const char *key)
 See if a node exists.
const char * GetString (const char *key, const char *def, int require=0)
 Get an attribute string value.
void SetString (const char *key, const char *v)
 Set an attribute string value.
const char * GetFilename (const char *key, const char *def, int require=0)
 Get a file name.
const char * SearchFilename (const char *key, const char *path, const char *def, int require=0)
 Search for a filename across multiple paths.
int GetInt (const char *key, int def, int require=0)
 Get an integer.
double GetDouble (const char *key, double def, int require=0)
 Get a double.
bool GetBool (const char *key, bool def, int require=0)
 Get a boolean.
double GetLength (const char *key, double def, int require=0)
 Get an attribute length value (return value in meters).
double GetAngle (const char *key, double def, int require=0)
 Get an attribute angle value (return value in radians).
double GetTime (const char *key, double def, int require=0)
 Get an attribute time value (return value in seconds).
GzVector GetPosition (const char *key, GzVector def)
 Read a position.
void SetPosition (const char *key, GzVector v)
 Write a position.
GzQuatern GetRotation (const char *key, GzQuatern def)
 Read a rotation.
void SetRotation (const char *key, GzQuatern v)
 Write a rotation.
GzColor GetColor (const char *key, GzColor def)
 Read a color.
const char * GetTupleString (const char *key, int index, const char *def)
 Get an attribute tuple value.
double GetTupleDouble (const char *key, int index, double def)
 Get an attribute tuple double value.
int GetTupleInt (const char *key, int index, int def)
 Get an attribute tuple int value.
double GetTupleLength (const char *key, int index, double def)
 Get an attribute tuple length value (return value in meters).
double GetTupleAngle (const char *key, int index, double def)
 Get an attribute tuple angle value (return value in radians).

Friends

class WorldFile


Detailed Description

Class encapsulating a single file node.


Constructor & Destructor Documentation

WorldFileNode::WorldFileNode WorldFile file,
WorldFileNode parent,
xmlNodePtr  xmlNode,
xmlDocPtr  xmlDoc
 

Standard constructor.

For internal use only.

WorldFileNode::~WorldFileNode  ) 
 

Standard destructor.


Member Function Documentation

const char * WorldFileNode::GetName  ) 
 

Get the node name.

For internal use only.

const char * WorldFileNode::GetNSPrefix  ) 
 

Get the name space prefix.

For internal use only.

WorldFileNode * WorldFileNode::GetNext  ) 
 

Get the next sibling of this node.

For internal use only.

WorldFileNode * WorldFileNode::GetChild  ) 
 

Get the first child of this node.

For internal use only.

WorldFileNode * WorldFileNode::GetChild const char *  name  ) 
 

Get a child based on a name.

For internal use only.

Returns:
Returns null if not found.

WorldFileNode * WorldFileNode::GetChildByNSPrefix const char *  prefix  ) 
 

Get the first child with the specified namespace prefix.

For internal use only.

void WorldFileNode::Print  ) 
 

Print node contents (for debugging purposes); recursive.

bool WorldFileNode::WarnUnused  ) 
 

Do a recursive check for unused nodes.

bool WorldFileNode::IsDefined const char *  key  )  [inline]
 

See if a node exists.

const char * WorldFileNode::GetString const char *  key,
const char *  def,
int  require = 0
 

Get an attribute string value.

void WorldFileNode::SetString const char *  key,
const char *  v
 

Set an attribute string value.

const char * WorldFileNode::GetFilename const char *  key,
const char *  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.

Deprecated:
Use SearchFilename instead.

const char * WorldFileNode::SearchFilename const char *  key,
const char *  path,
const char *  def,
int  require = 0
 

Search for a filename across multiple paths.

Parameters:
key Key
path Additional search path (may be NULL).
def Default value
require Set to 1 if this is a required field (i.e., no default value). For relative filenames, the search path is: current dir, worldfile dir, dir given by path argument.

int WorldFileNode::GetInt const char *  key,
int  def,
int  require = 0
 

Get an integer.

double WorldFileNode::GetDouble const char *  key,
double  def,
int  require = 0
 

Get a double.

bool WorldFileNode::GetBool const char *  key,
bool  def,
int  require = 0
 

Get a boolean.

double WorldFileNode::GetLength const char *  key,
double  def,
int  require = 0
 

Get an attribute length value (return value in meters).

double WorldFileNode::GetAngle const char *  key,
double  def,
int  require = 0
 

Get an attribute angle value (return value in radians).

double WorldFileNode::GetTime const char *  key,
double  def,
int  require = 0
 

Get an attribute time value (return value in seconds).

GzVector WorldFileNode::GetPosition const char *  key,
GzVector  def
 

Read a position.

void WorldFileNode::SetPosition const char *  key,
GzVector  v
 

Write a position.

GzQuatern WorldFileNode::GetRotation const char *  key,
GzQuatern  def
 

Read a rotation.

void WorldFileNode::SetRotation const char *  key,
GzQuatern  v
 

Write a rotation.

GzColor WorldFileNode::GetColor const char *  key,
GzColor  def
 

Read a color.

const char * WorldFileNode::GetTupleString const char *  key,
int  index,
const char *  def
 

Get an attribute tuple value.

double WorldFileNode::GetTupleDouble const char *  key,
int  index,
double  def
 

Get an attribute tuple double value.

int WorldFileNode::GetTupleInt const char *  key,
int  index,
int  def
 

Get an attribute tuple int value.

double WorldFileNode::GetTupleLength const char *  key,
int  index,
double  def
 

Get an attribute tuple length value (return value in meters).

double WorldFileNode::GetTupleAngle const char *  key,
int  index,
double  def
 

Get an attribute tuple angle value (return value in radians).


Friends And Related Function Documentation

friend class WorldFile [friend]
 


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


Last updated $Date: 2004/12/21 01:49:15 $
Generated on Sun May 22 18:39:09 2005 for Gazebo by doxygen 1.4.2