Changeset 803 for code/branches/core/src/orxonox/core/ClassTreeMask.h
- Timestamp:
- Feb 12, 2008, 1:30:43 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core/src/orxonox/core/ClassTreeMask.h
r802 r803 30 30 31 31 #include <list> 32 #include <stack> 32 33 33 34 #include "CorePrereqs.h" … … 38 39 { 39 40 friend class ClassTreeMask; 41 friend class ClassTreeMaskIterator; 40 42 41 43 public: … … 60 62 }; 61 63 64 class ClassTreeMaskIterator 65 { 66 public: 67 ClassTreeMaskIterator(ClassTreeMaskNode* node); 68 ~ClassTreeMaskIterator(); 69 70 ClassTreeMaskIterator& operator++(); 71 ClassTreeMaskNode* operator*() const; 72 ClassTreeMaskNode* operator->() const; 73 operator bool(); 74 bool operator==(ClassTreeMaskNode* compare); 75 bool operator!=(ClassTreeMaskNode* compare); 76 77 private: 78 std::stack<std::pair<std::list<ClassTreeMaskNode*>::iterator, std::list<ClassTreeMaskNode*>::iterator> > nodes_; 79 }; 80 62 81 class ClassTreeMask 63 82 { … … 70 89 void add(const Identifier* subclass, bool bInclude); 71 90 void reset(); 91 void clean(); 72 92 73 bool isIncluded(const Identifier* subclass); 74 bool isExcluded(const Identifier* subclass); 93 bool isIncluded(const Identifier* subclass) const; 94 bool isExcluded(const Identifier* subclass) const; 95 96 ClassTreeMask operator+(const ClassTreeMask& other) const; 97 ClassTreeMask operator*(const ClassTreeMask& other) const; 98 ClassTreeMask operator!() const; 99 ClassTreeMask operator-(const ClassTreeMask& other) const; 100 101 ClassTreeMask operator&(const ClassTreeMask& other) const; 102 ClassTreeMask operator|(const ClassTreeMask& other) const; 103 ClassTreeMask operator^(const ClassTreeMask& other) const; 104 ClassTreeMask operator~() const; 75 105 76 106 private: 77 107 void add(ClassTreeMaskNode* node, const Identifier* subclass, bool bInclude); 78 bool isIncluded(ClassTreeMaskNode* node, const Identifier* subclass); 108 bool isIncluded(ClassTreeMaskNode* node, const Identifier* subclass) const; 109 void clean(ClassTreeMaskNode* node); 79 110 80 111 ClassTreeMaskNode* root_;
Note: See TracChangeset
for help on using the changeset viewer.