Main Page | Namespace List | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

CmdTreeNode Class Reference

Represents a node of a command tree, which is either a command prototype or a subtree. More...

#include <cmdtreenode.h>

Inheritance diagram for CmdTreeNode:

AttribsTree CameraTree ColourTree DispListTree DispTree FogTree GlutTree InitTree LightTree MaterialTree MatrixTree PrimitsTree ProjectionTree TransTree List of all members.

Public Member Functions

 CmdTreeNode (const QString &name, QPtrList< CmdTreeNode > *subTree=NULL, void(*funcPtr)(const QStringList &)=NULL, SuperPtrList< CmdParam > *params=NULL)
 ~CmdTreeNode ()
const QString & name () const
QPtrList< CmdTreeNode > * subTree ()
void(* funcPtr ())(const QStringList &)
QPtrList< CmdParam > * params ()
void setName (QString name)
void setSubTree (QPtrList< CmdTreeNode > *subTree)
void setFuncPtr (void(*funcPtr)(const QStringList &))
void setParams (QPtrList< CmdParam > *params)
void exec (const QStringList &paramValues) const
QString toString () const

Static Public Member Functions

CmdTreeNodefindNode (QPtrList< CmdTreeNode > *tree, QString name)

Protected Attributes

QString myName
QPtrList< CmdTreeNode > * mySubTree
void(* myFuncPtr )(const QStringList &)
QPtrList< CmdParam > * myParams

Detailed Description

Represents a node of a command tree, which is either a command prototype or a subtree.

Note: There is NO cmdtree class, as the tree is entirely made up of these nodes.

Note: This uses QPtrList's autodelete on the mySubTree and myParams! (if they exist)


Constructor & Destructor Documentation

CmdTreeNode::CmdTreeNode const QString &  name,
QPtrList< CmdTreeNode > *  subTree = NULL,
void(*  funcPtr)(const QStringList &) = NULL,
SuperPtrList< CmdParam > *  params = NULL
 

CmdTreeNode::~CmdTreeNode  ) 
 


Member Function Documentation

void CmdTreeNode::exec const QStringList &  paramValues  )  const [inline]
 

CmdTreeNode * CmdTreeNode::findNode QPtrList< CmdTreeNode > *  tree,
QString  name
[static]
 

Find an an item by its textual name in a given command group.

This is designed to be used by the insert command operation, where a certian command may need to be found for initialization.

Note: This method is recursive.

Note: This will only return the FIRST occurance.

Note: This is static - so that it can be used directly on an object of type QPtrList<CmdTreeNode>

void( * CmdTreeNode::funcPtr  )  [inline]
 

const QString& CmdTreeNode::name  )  const [inline]
 

QPtrList<CmdParam>* CmdTreeNode::params  )  [inline]
 

void CmdTreeNode::setFuncPtr void(*  funcPtr)(const QStringList &)  )  [inline]
 

void CmdTreeNode::setName QString  name  )  [inline]
 

void CmdTreeNode::setParams QPtrList< CmdParam > *  params  )  [inline]
 

void CmdTreeNode::setSubTree QPtrList< CmdTreeNode > *  subTree  )  [inline]
 

QPtrList<CmdTreeNode>* CmdTreeNode::subTree  )  [inline]
 

QString CmdTreeNode::toString  )  const
 

Get the string representation of the command - its prototype.


Member Data Documentation

void(* CmdTreeNode::myFuncPtr)(const QStringList&) [protected]
 

QString CmdTreeNode::myName [protected]
 

QPtrList<CmdParam>* CmdTreeNode::myParams [protected]
 

QPtrList<CmdTreeNode>* CmdTreeNode::mySubTree [protected]
 


The documentation for this class was generated from the following files:
Generated on Fri Feb 27 12:01:40 2004 for Glitch by doxygen 1.3.2