PassiveProjectionTreeNode Class Reference

A node of the passive projection tree. More...

#include <passiveprojectiontreenode.h>

Collaboration diagram for PassiveProjectionTreeNode:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PassiveProjectionTreeNode ()
 Constructor.
 PassiveProjectionTreeNode (PassiveProjectionTreeNode *_parent, PathStepExpression *_label)
 Constructor.
virtual ~PassiveProjectionTreeNode ()
void registerPath (PathExpression *path, unsigned pos)
 Registers a path to the passive projection tree node.
void print (OutputStream &dos)
 Prints the path expression node.
PassiveProjectionTreeNodegetParent ()
 Returns the parent of this passive projection tree node.
vector
< PassiveProjectionTreeNode * > * 
getChildren ()
 Returns the children of this PassiveProjectionTreeNode.
PathStepExpressiongetLabel ()
 Returns the label of the passive projection tree node.

Private Member Functions

void print (OutputStream &dos, unsigned indents)
 Prints the path expression node fixed indent.

Private Attributes

PassiveProjectionTreeNodeparent
 Pointer to the parent of this passive projection tree node.
PathStepExpressionlabel
 The path step expression associated with this node.
vector
< PassiveProjectionTreeNode * > 
children


Detailed Description

A node of the passive projection tree.

Each node in the passive projection tree describes exactly one path step (i.e., is labeled with a path step or NULL, for the root).

Author:
Michael Schmidt

Gunnar Jehl

Version:
2.1
License:
Software License Agreement (BSD License)

Definition at line 54 of file passiveprojectiontreenode.h.


Constructor & Destructor Documentation

PassiveProjectionTreeNode::PassiveProjectionTreeNode (  ) 

Constructor.

Constructor - creating object for the root node.

Definition at line 37 of file passiveprojectiontreenode.cpp.

Referenced by registerPath().

PassiveProjectionTreeNode::PassiveProjectionTreeNode ( PassiveProjectionTreeNode _parent,
PathStepExpression _label 
)

Constructor.

Constructor - creating object for a labeled passive projection tree node.

Parameters:
[in] _parent The designated parent of this node.
[in] _label The designated label of this node.

Definition at line 41 of file passiveprojectiontreenode.cpp.

PassiveProjectionTreeNode::~PassiveProjectionTreeNode (  )  [virtual]

Destructor.

Definition at line 45 of file passiveprojectiontreenode.cpp.

References children, and label.


Member Function Documentation

vector< PassiveProjectionTreeNode * > * PassiveProjectionTreeNode::getChildren (  )  [inline]

Returns the children of this PassiveProjectionTreeNode.

The children are all stored in member childre.

Return values:
vector<PassiveProjectionTreeNode*>* Pointer to the vector containing the children of the curren PassiveProjectionTreeNode.

Definition at line 106 of file passiveprojectiontreenode.h.

Referenced by PassiveProjectionTreeConfiguration::applyTag().

PathStepExpression * PassiveProjectionTreeNode::getLabel (  )  [inline]

Returns the label of the passive projection tree node.

Note that the label of the root node is NULL.

Return values:
PathStepExpression* Pointer to the PathStepExpression label.

Definition at line 115 of file passiveprojectiontreenode.h.

References label.

Referenced by PassiveProjectionTreeConfiguration::applyTag().

PassiveProjectionTreeNode * PassiveProjectionTreeNode::getParent (  )  [inline]

Returns the parent of this passive projection tree node.

Returns NULL for the root node.

Return values:
PassiveProjectionTreeNode* Pointer to the parent node of the current ProjectionTreeNode, if it exists, NULL otherwise.

Definition at line 98 of file passiveprojectiontreenode.h.

References parent.

void PassiveProjectionTreeNode::print ( OutputStream dos,
unsigned  indents 
) [private]

Prints the path expression node fixed indent.

Help function of public print() method.

Parameters:
[in] dos Refernece to the (debug) OutputStream.
[in] indents Number of indent characters.
Return values:
void 

Definition at line 87 of file passiveprojectiontreenode.cpp.

References children, incrementIndents(), label, NEWLINE, resetIndents(), and writeIndents().

void PassiveProjectionTreeNode::print ( OutputStream dos  ) 

Prints the path expression node.

This method is for debugging purpose only.

Parameters:
[in] dos Reference to the (debug) OutputStream.
Return values:
void 

Definition at line 82 of file passiveprojectiontreenode.cpp.

References resetIndents().

Referenced by PassiveProjectionTree::print().

void PassiveProjectionTreeNode::registerPath ( PathExpression path,
unsigned  pos 
)

Registers a path to the passive projection tree node.

The path is automatically inserted at the right position.

Parameters:
[in] path The path to be registered.
[in] pos The current position within the path
Return values:
void 

Definition at line 52 of file passiveprojectiontreenode.cpp.

References children, PathExpression::getPathStepAt(), PathStepExpression::isSyntacticallyEqualTo(), PassiveProjectionTreeNode(), and registerPath().

Referenced by registerPath(), and PassiveProjectionTree::registerPath().


Member Data Documentation

The children of this passive projection tree node.

Definition at line 145 of file passiveprojectiontreenode.h.

Referenced by print(), registerPath(), and ~PassiveProjectionTreeNode().

The path step expression associated with this node.

Is NULL for the root node.

Definition at line 139 of file passiveprojectiontreenode.h.

Referenced by getLabel(), print(), and ~PassiveProjectionTreeNode().

Pointer to the parent of this passive projection tree node.

Is NULL for the root node.

Definition at line 133 of file passiveprojectiontreenode.h.

Referenced by getParent().


Generated on Sun May 24 20:20:27 2009 for G(arbage) C(ollected) X(Query) Engine by  doxygen 1.5.9