#include <src/core/ClassTreeMask.h>
Public Member Functions | |
void | addSubnode (ClassTreeMaskNode *subnode) |
Adds a new subnode to the list of subnodes. | |
ClassTreeMaskNode (const Identifier *subclass, bool bIncluded=true) | |
Constructor: Creates the node, sets the subclass and the rule. | |
void | exclude (bool overwrite=true) |
Sets the rule for the node to "excluded". | |
const Identifier * | getClass () const |
Returns the Identifier of the class the rule refers to. | |
bool | hasSubnodes () const |
Returns true if the Node has some subnodes. | |
void | include (bool overwrite=true) |
Sets the rule for the node to "included". | |
bool | isExcluded () const |
Tells if the rule is "excluded" or not. | |
bool | isIncluded () const |
Tells if the rule is "included" or not. | |
void | setIncluded (bool bIncluded, bool overwrite=true) |
Sets the rule for the node to a given value and erases all following rules. | |
~ClassTreeMaskNode () | |
Destructor: Deletes all subnodes. | |
Private Member Functions | |
void | deleteAllSubnodes () |
Deletes all subnodes of this node. | |
Private Attributes | |
bool | bIncluded_ |
The rule: included or excluded. | |
const Identifier * | subclass_ |
The Identifier of the subclass the rule refers to. | |
std::list< ClassTreeMaskNode * > | subnodes_ |
A list containing all subnodes in the tree. | |
Friends | |
class | ClassTreeMask |
class | ClassTreeMaskIterator |
class | ClassTreeMaskObjectIterator |
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.
orxonox::ClassTreeMaskNode::ClassTreeMaskNode | ( | const Identifier * | subclass, | |
bool | bIncluded = true | |||
) |
Constructor: Creates the node, sets the subclass and the rule.
subclass | The subclass the rule refers to | |
bIncluded | The rule: included (true) or excluded (false) |
References bIncluded_, and subclass_.
orxonox::ClassTreeMaskNode::~ClassTreeMaskNode | ( | ) |
void orxonox::ClassTreeMaskNode::addSubnode | ( | ClassTreeMaskNode * | subnode | ) |
Adds a new subnode to the list of subnodes.
subnode | The new subnode |
References subnodes_.
Referenced by orxonox::ClassTreeMask::add().
void orxonox::ClassTreeMaskNode::deleteAllSubnodes | ( | ) | [private] |
Deletes all subnodes of this node.
References subnodes_.
Referenced by setIncluded(), and ~ClassTreeMaskNode().
void orxonox::ClassTreeMaskNode::exclude | ( | bool | overwrite = true |
) |
Sets the rule for the node to "excluded".
overwrite | True = overwrite previously added rules for inheriting classes |
References setIncluded().
const Identifier* orxonox::ClassTreeMaskNode::getClass | ( | ) | const [inline] |
Returns the Identifier of the class the rule refers to.
Referenced by orxonox::ClassTreeMask::add(), orxonox::ClassTreeMaskObjectIterator::create(), and orxonox::ClassTreeMask::isIncluded().
bool orxonox::ClassTreeMaskNode::hasSubnodes | ( | ) | const [inline] |
Returns true if the Node has some subnodes.
Referenced by orxonox::ClassTreeMaskObjectIterator::create().
void orxonox::ClassTreeMaskNode::include | ( | bool | overwrite = true |
) |
Sets the rule for the node to "included".
overwrite | True = overwrite previously added rules for inheriting classes |
References setIncluded().
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.
Referenced by orxonox::ClassTreeMask::clean(), orxonox::ClassTreeMaskObjectIterator::create(), and orxonox::ClassTreeMask::isIncluded().
void orxonox::ClassTreeMaskNode::setIncluded | ( | bool | bIncluded, | |
bool | overwrite = true | |||
) |
Sets the rule for the node to a given value and erases all following rules.
bIncluded | The rule: included (true) or excluded (false) | |
overwrite | True = overwrite previously added rules for inheriting classes |
References bIncluded_, and deleteAllSubnodes().
Referenced by orxonox::ClassTreeMask::add(), exclude(), and include().
friend class ClassTreeMask [friend] |
friend class ClassTreeMaskIterator [friend] |
friend class ClassTreeMaskObjectIterator [friend] |
bool orxonox::ClassTreeMaskNode::bIncluded_ [private] |
const Identifier* orxonox::ClassTreeMaskNode::subclass_ [private] |
std::list<ClassTreeMaskNode*> orxonox::ClassTreeMaskNode::subnodes_ [private] |
A list containing all subnodes in the tree.
Referenced by orxonox::ClassTreeMask::add(), addSubnode(), orxonox::ClassTreeMask::clean(), orxonox::ClassTreeMaskObjectIterator::create(), deleteAllSubnodes(), and orxonox::ClassTreeMask::isIncluded().