Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ITreeNode< Implementation > Class Template Reference

Interface for a Node in a generic tree structure.Note that a static_cast to TreeNode<Implementation> is sometimes needed for compilation in VS2012 where Implementation has 'uses' for Children or Parent since these fields will then have protected access in the subclass. More...

#include <ionTreeNode.h>

Public Member Functions

Implementation const *const GetParent () const
 
std::set< Implementation * > const & GetChildren () const
 
void AddChild (Implementation *child)
 
void RemoveChild (Implementation *child)
 
void SetParent (Implementation *parent)
 
void RemoveAllChildren ()
 
void Remove ()
 
template<typename Return >
void RecurseOnChildren (Return(Implementation::*Function)())
 
template<typename Return , typename P1 >
void RecurseOnChildren (Return(Implementation::*Function)(P1), P1 p1)
 
template<typename Return , typename P1 , typename P2 >
void RecurseOnChildren (Return(Implementation::*Function)(P1, P2), P1 p1, P2 p2)
 
virtual ~ITreeNode ()
 

Protected Member Functions

 ITreeNode ()
 

Protected Attributes

Implementation * Parent
 
std::set< Implementation * > Children
 

Detailed Description

template<typename Implementation>
class ITreeNode< Implementation >

Interface for a Node in a generic tree structure.

Note that a static_cast to TreeNode<Implementation> is sometimes needed for compilation in VS2012 where Implementation has 'uses' for Children or Parent since these fields will then have protected access in the subclass.

Constructor & Destructor Documentation

template<typename Implementation >
virtual ITreeNode< Implementation >::~ITreeNode ( )
inlinevirtual
template<typename Implementation >
ITreeNode< Implementation >::ITreeNode ( )
inlineprotected

Member Function Documentation

template<typename Implementation >
void ITreeNode< Implementation >::AddChild ( Implementation *  child)
inline
template<typename Implementation >
std::set<Implementation *> const& ITreeNode< Implementation >::GetChildren ( ) const
inline
template<typename Implementation >
Implementation const* const ITreeNode< Implementation >::GetParent ( ) const
inline
template<typename Implementation >
template<typename Return >
void ITreeNode< Implementation >::RecurseOnChildren ( Return(Implementation::*)()  Function)
inline
template<typename Implementation >
template<typename Return , typename P1 >
void ITreeNode< Implementation >::RecurseOnChildren ( Return(Implementation::*)(P1)  Function,
P1  p1 
)
inline
template<typename Implementation >
template<typename Return , typename P1 , typename P2 >
void ITreeNode< Implementation >::RecurseOnChildren ( Return(Implementation::*)(P1, P2)  Function,
P1  p1,
P2  p2 
)
inline
template<typename Implementation >
void ITreeNode< Implementation >::Remove ( )
inline
template<typename Implementation >
void ITreeNode< Implementation >::RemoveAllChildren ( )
inline
template<typename Implementation >
void ITreeNode< Implementation >::RemoveChild ( Implementation *  child)
inline
template<typename Implementation >
void ITreeNode< Implementation >::SetParent ( Implementation *  parent)
inline

Member Data Documentation

template<typename Implementation >
std::set<Implementation *> ITreeNode< Implementation >::Children
protected
template<typename Implementation >
Implementation* ITreeNode< Implementation >::Parent
protected

The documentation for this class was generated from the following file: