copasi API  0.1
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
CCopasiNode< _Data > Class Template Reference

#include <CCopasiNode.h>

List of all members.

Public Types

typedef _Data Data

Public Member Functions

 CCopasiNode (CCopasiNode< Data > *pParent=NULL)
 CCopasiNode (const CCopasiNode< Data > &src)
 CCopasiNode (const Data &data, CCopasiNode< Data > *pParent=NULL)
virtual ~CCopasiNode ()
virtual const DatagetData () const
virtual bool setData (const Data &data)
CCopasiNode< Data > * getParent ()
const CCopasiNode< Data > * getParent () const
virtual bool addChild (CCopasiNode< Data > *pChild, CCopasiNode< Data > *pAfter=NULL)
virtual bool removeChild (CCopasiNode< Data > *pChild)
CCopasiNode< Data > * getChild ()
const CCopasiNode< Data > * getChild () const
CCopasiNode< Data > * getSibling ()
const CCopasiNode< Data > * getSibling () const
CCopasiNode< Data > * getNext ()
const CCopasiNode< Data > * getNext () const
CCopasiNode< Data > * getNextNonChild ()
const CCopasiNode< Data > * getNextNonChild () const

Protected Member Functions

bool setParent (CCopasiNode< Data > *pParent)
bool setChild (CCopasiNode< Data > *pChild)
bool setSibling (CCopasiNode< Data > *pSibling)
bool deleteChildren ()

Protected Attributes

Data mData

Detailed Description

template<class _Data>
class CCopasiNode< _Data >

CCopasiNode class. The class CCopasiNode is describes a node of the CCopasiTree.

Created for COPASI by Stefan Hoops 2003 The class CCopasiNode is the interface used by the template class CCopasiTree< class Node> to manage the nodes of a tree. Actual implementation of nodes must be derived from CCopasiNode for the tree to operate properly.


Member Typedef Documentation

template<class _Data>
typedef _Data CCopasiNode< _Data >::Data

Constructor & Destructor Documentation

template<class _Data>
CCopasiNode< _Data >::CCopasiNode ( CCopasiNode< Data > *  pParent = NULL) [inline]

Default constructor.

Parameters:
CCopasiNode<Data > * pParent (default: NULL)
template<class _Data>
CCopasiNode< _Data >::CCopasiNode ( const CCopasiNode< Data > &  src) [inline]

Copy constructor.

Parameters:
constCCopasiNode< Data > & src
template<class _Data>
CCopasiNode< _Data >::CCopasiNode ( const Data data,
CCopasiNode< Data > *  pParent = NULL 
) [inline]

Specific constructor.

Parameters:
constData & data
CCopasiNode<Data > * pParent (default: NULL)
template<class _Data>
virtual CCopasiNode< _Data >::~CCopasiNode ( ) [inline, virtual]

Destructor. Note: Within a tree the parent of this node has to be corrected.


Member Function Documentation

template<class _Data>
virtual bool CCopasiNode< _Data >::addChild ( CCopasiNode< Data > *  pChild,
CCopasiNode< Data > *  pAfter = NULL 
) [inline, virtual]

Add a child to a node. If pAfter == this the child will be inserted at the front of the list of children.

Parameters:
CCopasiNode<Data > * pChild
CCopasiNode<Data > * pAfter (default: NULL appended to the list of children)
Returns:
bool Success

Reimplemented in CEvaluationNodeCall, and CEvaluationNodeVector.

template<class _Data>
bool CCopasiNode< _Data >::deleteChildren ( ) [inline, protected]
template<class _Data>
CCopasiNode< Data >* CCopasiNode< _Data >::getChild ( ) [inline]

Retrieve the child of a node.

Returns:
CCopasiNode< Data > * pChild
template<class _Data>
const CCopasiNode< Data >* CCopasiNode< _Data >::getChild ( ) const [inline]

Retrieve the child of a node.

Returns:
const CCopasiNode< Data > * pChild
template<class _Data>
virtual const Data& CCopasiNode< _Data >::getData ( ) const [inline, virtual]

Retrieve the data of the Node.

Returns:
Data data

Reimplemented in CEvaluationNodeObject.

template<class _Data>
CCopasiNode< Data >* CCopasiNode< _Data >::getNext ( ) [inline]

Retrieve a pointer to the next node, which is either a child, a sibling, or an ancestor. The nodes are evaluated in that order and the first non NULL pointer is returned. If all evaluate to NULL, NULL will be returned.

Returns:
CCopasiNode< Data > * pNext
template<class _Data>
const CCopasiNode< Data >* CCopasiNode< _Data >::getNext ( ) const [inline]

Retrieve a pointer to the next node, which is either a child, a sibling, or an ancestor. The nodes are evaluated in that order and the first non NULL pointer is returned. If all evaluate to NULL, NULL will be returned.

Returns:
const CCopasiNode< Data > * pNext
template<class _Data>
CCopasiNode< Data >* CCopasiNode< _Data >::getNextNonChild ( ) [inline]

Retrieve a pointer to the next node, which is not a child node This is either a sibling or an ancestor. The nodes are evaluated in that order and the first non NULL pointer is returned. If all evaluate to NULL, NULL will be returned.

Returns:
CCopasiNode< Data > * pNextNonChild
template<class _Data>
const CCopasiNode< Data >* CCopasiNode< _Data >::getNextNonChild ( ) const [inline]

Retrieve a pointer to the next node, which is not a child node This is either a sibling or an ancestor. The nodes are evaluated in that order and the first non NULL pointer is returned. If all evaluate to NULL, NULL will be returned.

Returns:
const CCopasiNode< Data > * pNextNonChild
template<class _Data>
CCopasiNode< Data >* CCopasiNode< _Data >::getParent ( ) [inline]

Retrieve the parent of a Node.

Returns:
CCopasiNode< Data > * pParent
template<class _Data>
const CCopasiNode< Data >* CCopasiNode< _Data >::getParent ( ) const [inline]

Retrieve the parent of a Node.

Returns:
const CCopasiNode< Data > * pParent
template<class _Data>
CCopasiNode< Data >* CCopasiNode< _Data >::getSibling ( ) [inline]

Retrieve the sibling of a node.

Returns:
CCopasiNode< Data > * pSibling
template<class _Data>
const CCopasiNode< Data >* CCopasiNode< _Data >::getSibling ( ) const [inline]

Retrieve the sibling of a node.

Returns:
const CCopasiNode< Data > * pSibling
template<class _Data>
virtual bool CCopasiNode< _Data >::removeChild ( CCopasiNode< Data > *  pChild) [inline, virtual]

Remove a child from a node.

Parameters:
CCopasiNode<Data > * pChild
Returns:
bool Success

Reimplemented in CEvaluationNodeCall.

template<class _Data>
bool CCopasiNode< _Data >::setChild ( CCopasiNode< Data > *  pChild) [inline, protected]

Set the child of a node.

Parameters:
CCopasiNode<Data > * pChild
Returns:
bool Success
template<class _Data>
virtual bool CCopasiNode< _Data >::setData ( const Data data) [inline, virtual]

Set the data of the Node.

Parameters:
constData & data
Returns:
bool success

Reimplemented in CEvaluationNodeObject.

template<class _Data>
bool CCopasiNode< _Data >::setParent ( CCopasiNode< Data > *  pParent) [inline, protected]

Set the parent of a Node.

Parameters:
CCopasiNode<Data > * pParent
Returns:
bool Success
template<class _Data>
bool CCopasiNode< _Data >::setSibling ( CCopasiNode< Data > *  pSibling) [inline, protected]

Set the sibling of a node.

Parameters:
CCopasiNode<Data > * pSibling
Returns:
bool Success

Member Data Documentation

template<class _Data>
Data CCopasiNode< _Data >::mData [protected]

The data content of the node;


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines