Changeset 11071 for code/trunk/src/libraries/core/ClassTreeMask.h
- Timestamp:
- Jan 17, 2016, 10:29:21 PM (9 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/core/ClassTreeMask.h
r10693 r11071 152 152 ClassTreeMaskNode* operator*() const; 153 153 ClassTreeMaskNode* operator->() const; 154 operator bool() const;154 explicit operator bool() const; 155 155 bool operator==(ClassTreeMaskNode* compare) const; 156 156 bool operator!=(ClassTreeMaskNode* compare) const; 157 157 158 158 private: 159 std::stack<std::pair<std::list<ClassTreeMaskNode*>::iterator, std::list<ClassTreeMaskNode*>::iterator> 159 std::stack<std::pair<std::list<ClassTreeMaskNode*>::iterator, std::list<ClassTreeMaskNode*>::iterator>> nodes_; ///< A stack to store list-iterators 160 160 std::list<ClassTreeMaskNode*> rootlist_; ///< A list for internal use (it only stores the root-node) 161 161 }; … … 211 211 inline const ClassTreeMask& begin() const { return (*this); } 212 212 /// End of the ClassTreeMaskObjectIterator. 213 inline BaseObject* end() const { return 0; }213 inline BaseObject* end() const { return nullptr; } 214 214 215 215 ClassTreeMask& operator=(const ClassTreeMask& other); … … 276 276 public: 277 277 /// Default-constructor: Does nothing. 278 inline ClassTreeMaskObjectIterator() {}278 inline ClassTreeMaskObjectIterator() = default; 279 279 /// Copy-Constructor: Initializes the iterator from another ClassTreeMask. 280 280 inline ClassTreeMaskObjectIterator(const ClassTreeMask& mask) { (*this) = mask; } … … 285 285 286 286 /// Returns true if the ClassTreeMaskObjectIterator points at the given object. 287 inline bool operator==(BaseObject* pointer) const { return (this->objectIterator_ && (*this->objectIterator_) == pointer) || (!this->objectIterator_ && pointer == 0); }287 inline bool operator==(BaseObject* pointer) const { return (this->objectIterator_ && (*this->objectIterator_) == pointer) || (!this->objectIterator_ && pointer == nullptr); } 288 288 /// Returns true if the ClassTreeMaskObjectIterator doesn't point at the given object. 289 inline bool operator!=(BaseObject* pointer) const { return (this->objectIterator_ && (*this->objectIterator_) != pointer) || (!this->objectIterator_ && pointer != 0); }289 inline bool operator!=(BaseObject* pointer) const { return (this->objectIterator_ && (*this->objectIterator_) != pointer) || (!this->objectIterator_ && pointer != nullptr); } 290 290 /// Returns true if the ClassTreeMaskObjectIterator hasn't already reached the end. 291 inline operator bool() const { return (this->objectIterator_); }291 inline explicit operator bool() const { return this->objectIterator_.operator bool(); } 292 292 /// Returns the object the ClassTreeMaskObjectIterator currently points at. 293 293 inline BaseObject* operator*() const { return (*this->objectIterator_); } … … 298 298 void create(ClassTreeMaskNode* node); 299 299 300 std::list<std::pair<const Identifier*, bool> 301 std::list<std::pair<const Identifier*, bool> 302 Iterator<BaseObject> 300 std::list<std::pair<const Identifier*, bool>> subclasses_; ///< A list of all Identifiers through which objects the iterator should iterate 301 std::list<std::pair<const Identifier*, bool>>::iterator subclassIterator_; ///< The current class of the iterator 302 Iterator<BaseObject> objectIterator_; ///< The current object of the iterator 303 303 }; 304 304 }
Note: See TracChangeset
for help on using the changeset viewer.