Orxonox  0.0.5 Codename: Arcturus
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
orxonox::ClassTreeMaskNode Class Reference

The ClassTreeMaskNode is a node in the internal tree of the ClassTreeMask, containing the rules of the mask. More...

#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/core/ClassTreeMask.h>

Public Member Functions

 ClassTreeMaskNode (const Identifier *subclass, bool bIncluded=true)
 Constructor: Creates the node, sets the subclass and the rule. More...
 
 ~ClassTreeMaskNode ()
 Destructor: Deletes all subnodes. More...
 
void addSubnode (ClassTreeMaskNode *subnode)
 Adds a new subnode to the list of subnodes. More...
 
void exclude (bool overwrite=true)
 Sets the rule for the node to "excluded". More...
 
const IdentifiergetClass () const
 Returns the Identifier of the class the rule refers to. More...
 
bool hasSubnodes () const
 Returns true if the node has some subnodes. More...
 
void include (bool overwrite=true)
 Sets the rule for the node to "included". More...
 
bool isExcluded () const
 Tells if the rule is "excluded" or not. More...
 
bool isIncluded () const
 Tells if the rule is "included" or not. More...
 
void setIncluded (bool bIncluded, bool overwrite=true)
 Sets the rule for the node to a given value and erases all following rules. More...
 

Private Member Functions

void deleteAllSubnodes ()
 Deletes all subnodes of this node. More...
 

Private Attributes

bool bIncluded_
 The rule: included or excluded. More...
 
const Identifiersubclass_
 The Identifier of the subclass the rule refers to. More...
 
std::list< ClassTreeMaskNode * > subnodes_
 A list containing all subnodes of this node. More...
 

Friends

class ClassTreeMask
 
class ClassTreeMaskIterator
 
class ClassTreeMaskObjectIterator
 

Detailed Description

The ClassTreeMaskNode is a node in the internal tree of the ClassTreeMask, containing the rules of the mask.

The ClassTreeMaskNode is used to store the rule (included or excluded) for a given class (described by the corresponding Identifier). The nodes are used in the internal tree of ClassTreeMask. To build a tree, they store a list of all subnodes.

Constructor & Destructor Documentation

orxonox::ClassTreeMaskNode::ClassTreeMaskNode ( const Identifier subclass,
bool  bIncluded = true 
)

Constructor: Creates the node, sets the subclass and the rule.

Parameters
subclassThe subclass the rule refers to
bIncludedThe rule: included (true) or excluded (false)
orxonox::ClassTreeMaskNode::~ClassTreeMaskNode ( )

Destructor: Deletes all subnodes.

Member Function Documentation

void orxonox::ClassTreeMaskNode::addSubnode ( ClassTreeMaskNode subnode)

Adds a new subnode to the list of subnodes.

void orxonox::ClassTreeMaskNode::deleteAllSubnodes ( )
private

Deletes all subnodes of this node.

void orxonox::ClassTreeMaskNode::exclude ( bool  overwrite = true)

Sets the rule for the node to "excluded".

Parameters
overwriteTrue = overwrite previously added rules for inheriting classes
const Identifier* orxonox::ClassTreeMaskNode::getClass ( ) const
inline

Returns the Identifier of the class the rule refers to.

bool orxonox::ClassTreeMaskNode::hasSubnodes ( ) const
inline

Returns true if the node has some subnodes.

void orxonox::ClassTreeMaskNode::include ( bool  overwrite = true)

Sets the rule for the node to "included".

Parameters
overwriteTrue = overwrite previously added rules for inheriting classes
bool orxonox::ClassTreeMaskNode::isExcluded ( ) const
inline

Tells if the rule is "excluded" or not.

bool orxonox::ClassTreeMaskNode::isIncluded ( ) const
inline

Tells if the rule is "included" or not.

void orxonox::ClassTreeMaskNode::setIncluded ( bool  bIncluded,
bool  overwrite = true 
)

Sets the rule for the node to a given value and erases all following rules.

Parameters
bIncludedThe rule: included (true) or excluded (false)
overwriteTrue = overwrite previously added rules for inheriting classes

Friends And Related Function Documentation

friend class ClassTreeMask
friend
friend class ClassTreeMaskIterator
friend
friend class ClassTreeMaskObjectIterator
friend

Member Data Documentation

bool orxonox::ClassTreeMaskNode::bIncluded_
private

The rule: included or excluded.

const Identifier* orxonox::ClassTreeMaskNode::subclass_
private

The Identifier of the subclass the rule refers to.

std::list<ClassTreeMaskNode*> orxonox::ClassTreeMaskNode::subnodes_
private

A list containing all subnodes of this node.


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