|
WorldFileNode Class ReferenceClass 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.
|
WorldFileNode * | GetNext () |
| Get the next sibling of this node.
|
WorldFileNode * | GetChild () |
| Get the first child of this node.
|
WorldFileNode * | GetChild (const char *name) |
| Get a child based on a name.
|
WorldFileNode * | GetChildByNSPrefix (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 |
( |
|
) |
|
|
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.
|
|
Get the next sibling of this node.
For internal use only.
|
|
Get the first child of this node.
For internal use only.
|
|
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] |
|
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 |
|
) |
|
|
double WorldFileNode::GetDouble |
( |
const char * |
key, |
|
|
double |
def, |
|
|
int |
require = 0 |
|
) |
|
|
bool WorldFileNode::GetBool |
( |
const char * |
key, |
|
|
bool |
def, |
|
|
int |
require = 0 |
|
) |
|
|
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).
|
void WorldFileNode::SetPosition |
( |
const char * |
key, |
|
|
GzVector |
v |
|
) |
|
|
void WorldFileNode::SetRotation |
( |
const char * |
key, |
|
|
GzQuatern |
v |
|
) |
|
|
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
The documentation for this class was generated from the following files:
|