INode Class Reference

Interface declaration for objects that want to implement a "Tree" type data structure. More...

Inherited by MXANode.

Inheritance diagram for INode:

Inheritance graph
[legend]
List of all members.

Public Types

enum  Type {
  Root, FileVersion, FileType, DataModel,
  DataRoot, DataDimensions, Dimension, DataRecords,
  Record, MetaData, Required, UserDefined,
  DataPath, Data, Dataset
}
 Types that an INode can take. More...

Public Member Functions

 INode ()
virtual ~INode ()
virtual void setNodeType (int32 nodeType)=0
 Accessor for NodeType iVar Sets the Node Type.
virtual int32 getNodeType ()=0
 Gets the node type.
virtual std::string getNodeTypeString ()=0
 Returns the node type as a string.
virtual void setNodeName (std::string nodeName)=0
 Sets the node name.
virtual std::string getNodeName ()=0
 Returns the Name of this node.
virtual void setParent (INodeWeakPtr parent)=0
 Accessor for Parent iVar Sets the Parent node.
virtual INodeWeakPtr getParent ()=0
 Returns the Parent Node.
virtual void setUniqueId (int32 aValue)=0
 Setter for property guid.
virtual int32 getUniqueId ()=0
 Getter for property guid.
virtual void resetGUIDValue ()=0
 Resets the GUID value for this node.
virtual int32 getNumChildren () const=0
 Returns the number of Children of this node.
virtual bool hasChildren () const=0
 Returns TRUE if this node has children.
virtual void addChild (INodePtr child)=0
 Adds a child to this node.
virtual void removeChild (int index)=0
 Removes a child from this node.
virtual void removeChild (INode *child)=0
 Removes the given child from this node.
virtual int32 indexOfChild (INode *child)=0
 Returns the index of a specific child.
virtual INodePtr getChildAt (int32 index)=0
 Returns a specific child of this node based on a given index.
virtual INodes & getChildren ()=0
 Returns a reference to the children of this node.
virtual void removeAttribute (std::string attrName)=0
 Removes an Attribute from this node.
virtual void printNodeTree (int32 depth=0)=0
 prints the node and the children of this node
virtual void printNode (std::ostream &os, int32 indentSize=0)=0
 prints the node and the children of this node

Static Public Member Functions

static std::string getNodeTypeAsString (int32 nodeType)
 Static function to return a human readable string of the Node Type.

Detailed Description

Interface declaration for objects that want to implement a "Tree" type data structure.

Author:
Mike Jackson
Date:
March 2007
Version:
Revision
1.2


Member Enumeration Documentation

enum INode::Type

Types that an INode can take.

Enumerator:
Root 
FileVersion 
FileType 
DataModel 
DataRoot 
DataDimensions 
Dimension 
DataRecords 
Record 
MetaData 
Required 
UserDefined 
DataPath 
Data 
Dataset 

Reimplemented in MXANode.


Constructor & Destructor Documentation

INode::INode (  )  [inline]

virtual INode::~INode (  )  [inline, virtual]


Member Function Documentation

virtual void INode::setNodeType ( int32  nodeType  )  [pure virtual]

Accessor for NodeType iVar Sets the Node Type.

Parameters:
nodeType The type of node, from the Type Enumeration

Implemented in MXANode.

virtual int32 INode::getNodeType (  )  [pure virtual]

Gets the node type.

Returns:
The node type

Implemented in MXANode.

virtual std::string INode::getNodeTypeString (  )  [pure virtual]

Returns the node type as a string.

Returns:
The Node type as a string

Implemented in MXANode.

static std::string INode::getNodeTypeAsString ( int32  nodeType  )  [inline, static]

Static function to return a human readable string of the Node Type.

Parameters:
nodeType One of the Type Enumerations
Returns:
String description of the node type

Reimplemented in MXANode.

virtual void INode::setNodeName ( std::string  nodeName  )  [pure virtual]

Sets the node name.

Parameters:
nodeName The name to give to this node

Implemented in MXANode.

virtual std::string INode::getNodeName (  )  [pure virtual]

Returns the Name of this node.

Implemented in MXANode.

virtual void INode::setParent ( INodeWeakPtr  parent  )  [pure virtual]

Accessor for Parent iVar Sets the Parent node.

Parameters:
parent The Parent node for this node

virtual INodeWeakPtr INode::getParent (  )  [pure virtual]

Returns the Parent Node.

Implemented in MXANode.

virtual void INode::setUniqueId ( int32  aValue  )  [pure virtual]

Setter for property guid.

Parameters:
aValue The new value to set for property guid

Implemented in MXANode.

virtual int32 INode::getUniqueId (  )  [pure virtual]

Getter for property guid.

Returns:
The value of guid

Implemented in MXANode.

virtual void INode::resetGUIDValue (  )  [pure virtual]

Resets the GUID value for this node.

Implemented in MXANode.

virtual int32 INode::getNumChildren (  )  const [pure virtual]

Returns the number of Children of this node.

Implemented in MXANode.

virtual bool INode::hasChildren (  )  const [pure virtual]

Returns TRUE if this node has children.

Implemented in MXANode.

virtual void INode::addChild ( INodePtr  child  )  [pure virtual]

Adds a child to this node.

Parameters:
child The child to add to this node

virtual void INode::removeChild ( int  index  )  [pure virtual]

Removes a child from this node.

Parameters:
index The index of the child to remove

Implemented in MXANode.

virtual void INode::removeChild ( INode child  )  [pure virtual]

Removes the given child from this node.

Parameters:
child The child to remove

virtual int32 INode::indexOfChild ( INode child  )  [pure virtual]

Returns the index of a specific child.

Parameters:
child The child object whose index we are interested in

virtual INodePtr INode::getChildAt ( int32  index  )  [pure virtual]

Returns a specific child of this node based on a given index.

Parameters:
index The index of the child to return
Returns:
The index of the child

Implemented in MXANode.

virtual INodes& INode::getChildren (  )  [pure virtual]

Returns a reference to the children of this node.

Implemented in MXANode.

virtual void INode::removeAttribute ( std::string  attrName  )  [pure virtual]

Removes an Attribute from this node.

Parameters:
attrName The name of the attribute to remove

Implemented in MXANode.

virtual void INode::printNodeTree ( int32  depth = 0  )  [pure virtual]

prints the node and the children of this node

Parameters:
depth The amount of indentation space

Implemented in MXANode.

virtual void INode::printNode ( std::ostream &  os,
int32  indentSize = 0 
) [pure virtual]

prints the node and the children of this node

Parameters:
os An ostream to print the node to
indentSize The amount of indentation space

Implemented in MXANode.


The documentation for this class was generated from the following file:
Generated on Tue Nov 17 18:43:14 2009 for MXADataModel by  doxygen 1.5.2