ionflux.org | Impressum

Ionflux::Tools::NodeReference Class Reference
[Data handling]

Tree node reference. More...

#include <NodeReference.hpp>

List of all members.

Public Member Functions

 NodeReference ()
 Constructor.
 NodeReference (const std::string &refExpr)
 Constructor.
virtual ~NodeReference ()
 Destructor.
virtual void setFromRef (const std::string &refExpr)
 Initialize from reference.
virtual void setValue (const std::string &newValue)
 Set value.
virtual void setType (int newType)
 Set type.
virtual void setSubscript (bool newSubscript)
 Set subscript flag.
virtual std::string getValue () const
 Get value.
virtual int getType () const
 Get type.
virtual bool isSubscript () const
 Get subscript flag.
virtual void clear ()
 Make this an empty (invalid) node reference.
virtual void printDebugInfo () const
 Print debug information.

Static Public Attributes

static const int REF_INVALID = 0
 Reference type: Invalid.
static const int REF_NAME = 1
 Reference type: Node name.
static const int REF_ID = 2
 Reference type: Node ID.
static const int REF_PATH = 3
 Reference type: Tree path.
static const int REF_EMPTY = 4
 Reference type: Empty.

Protected Attributes

std::string value
 Value of the reference (either name or ID of the node).
int type
 Reference type.
bool subscript
 Whether this reference has been generated from a subscript.


Detailed Description

Tree node reference.

A tree node reference specifies a tree node, relative to its parent node, in human readable form. A tree node reference may be generated from a child node ID, a node name, or a fully qualified tree path (i.e. a data entry).


Constructor & Destructor Documentation

Ionflux::Tools::NodeReference::NodeReference  ) 
 

Constructor.

Construct new NodeReference object.

Ionflux::Tools::NodeReference::NodeReference const std::string &  refExpr  ) 
 

Constructor.

Creates a node reference from a reference expression. This may be either a child node ID, a node name, or a fully qualified tree path (i.e. data entry).

Parameters:
refExpr Reference expression.

Ionflux::Tools::NodeReference::~NodeReference  )  [virtual]
 

Destructor.

Destruct NodeReference object.


Member Function Documentation

void Ionflux::Tools::NodeReference::clear  )  [virtual]
 

Make this an empty (invalid) node reference.

int Ionflux::Tools::NodeReference::getType  )  const [virtual]
 

Get type.

Returns:
Reference type.

std::string Ionflux::Tools::NodeReference::getValue  )  const [virtual]
 

Get value.

Returns:
Value (name or ID) of the reference.

bool Ionflux::Tools::NodeReference::isSubscript  )  const [virtual]
 

Get subscript flag.

Returns:
true if the reference is a subscript, false otherwise.

void Ionflux::Tools::NodeReference::printDebugInfo  )  const [virtual]
 

Print debug information.

void Ionflux::Tools::NodeReference::setFromRef const std::string &  refExpr  )  [virtual]
 

Initialize from reference.

Initializes the node reference from a reference expression. This may be either a child node ID, a node name, or a fully qualified tree path (i.e. data entry).

Note: This function does not initialize the subscript flag.

Parameters:
refExpr Reference expression.

void Ionflux::Tools::NodeReference::setSubscript bool  newSubscript  )  [virtual]
 

Set subscript flag.

Sets the subscript flag. This should be set to true if this reference has been generated from a subscript.

Parameters:
newSubscript Subscript flag.

void Ionflux::Tools::NodeReference::setType int  newType  )  [virtual]
 

Set type.

Sets the reference type.

Parameters:
newType Reference type.

void Ionflux::Tools::NodeReference::setValue const std::string &  newValue  )  [virtual]
 

Set value.

Sets the reference value.

Parameters:
newValue Reference value.


Member Data Documentation

const int Ionflux::Tools::NodeReference::REF_EMPTY = 4 [static]
 

Reference type: Empty.

const int Ionflux::Tools::NodeReference::REF_ID = 2 [static]
 

Reference type: Node ID.

const int Ionflux::Tools::NodeReference::REF_INVALID = 0 [static]
 

Reference type: Invalid.

const int Ionflux::Tools::NodeReference::REF_NAME = 1 [static]
 

Reference type: Node name.

const int Ionflux::Tools::NodeReference::REF_PATH = 3 [static]
 

Reference type: Tree path.

bool Ionflux::Tools::NodeReference::subscript [protected]
 

Whether this reference has been generated from a subscript.

int Ionflux::Tools::NodeReference::type [protected]
 

Reference type.

std::string Ionflux::Tools::NodeReference::value [protected]
 

Value of the reference (either name or ID of the node).


The documentation for this class was generated from the following files:
Generated on Tue Mar 14 21:09:05 2006 for Ionflux Tools Class Library (iftools) by  doxygen 1.4.6