- Timestamp:
- Dec 25, 2009, 1:18:03 PM (15 years ago)
- Location:
- code/branches/pickup2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup2
- Property svn:mergeinfo changed
-
code/branches/pickup2/src/libraries/core/ClassTreeMask.cc
r5929 r6412 291 291 void ClassTreeMask::add(const Identifier* subclass, bool bInclude, bool overwrite, bool clean) 292 292 { 293 if (!subclass) 294 return; 293 295 // Check if the given subclass is a child of our root-class 294 296 if (subclass->isA(this->root_->getClass())) … … 320 322 void ClassTreeMask::add(ClassTreeMaskNode* node, const Identifier* subclass, bool bInclude, bool overwrite) 321 323 { 324 if (!subclass) 325 return; 322 326 // Check if the current node contains exactly the subclass we want to add 323 327 if (subclass == node->getClass()) … … 395 399 void ClassTreeMask::addSingle(const Identifier* subclass, bool bInclude, bool clean) 396 400 { 401 if (!subclass) 402 return; 397 403 for (std::set<const Identifier*>::const_iterator it = subclass->getDirectChildrenBegin(); it != subclass->getDirectChildrenEnd(); ++it) 398 404 this->add(*it, this->isIncluded(*it), false, false); … … 428 434 bool ClassTreeMask::isIncluded(ClassTreeMaskNode* node, const Identifier* subclass) const 429 435 { 436 if (!subclass) 437 return false; 430 438 // Check if the searched subclass is of the same type as the class in the current node or a derivative 431 439 if (subclass->isA(node->getClass())) … … 816 824 // Calculate the prefix: + means included, - means excluded 817 825 if (it->isIncluded()) 818 out << "+";826 out << '+'; 819 827 else 820 out << "-";828 out << '-'; 821 829 822 830 // Put the name of the corresponding class on the stream 823 out << it->getClass()->getName() << " ";831 out << it->getClass()->getName() << ' '; 824 832 } 825 833 … … 850 858 // If there is a first subclass, move the object-iterator to the first object of this class. Else go to the end 851 859 if (this->subclassIterator_ != this->subclasses_.end()) 852 this->objectIterator_ = (*this->subclassIterator_).first->getObjects()->begin();860 this->objectIterator_ = this->subclassIterator_->first->getObjects()->begin(); 853 861 else 854 862 this->objectIterator_ = ObjectList<BaseObject>::end(); 855 863 856 864 // Check if the iterator points on a valid object. If not, go to the next object by calling ++ 857 if (!this->objectIterator_ || ( (*this->subclassIterator_).second && !this->objectIterator_->isExactlyA((*this->subclassIterator_).first)))865 if (!this->objectIterator_ || (this->subclassIterator_->second && !this->objectIterator_->isExactlyA(this->subclassIterator_->first))) 858 866 this->operator++(); 859 867 … … 882 890 // Check if there really is a next class. If yes, move the object-iterator to the first object 883 891 if (this->subclassIterator_ != this->subclasses_.end()) 884 this->objectIterator_ = (*this->subclassIterator_).first->getObjects()->begin();892 this->objectIterator_ = this->subclassIterator_->first->getObjects()->begin(); 885 893 else 886 894 return (*this); … … 888 896 889 897 // Repeat this until we reach a valid object or the end 890 } while ( (*this->subclassIterator_).second && !this->objectIterator_->isExactlyA((*this->subclassIterator_).first));898 } while (this->subclassIterator_->second && !this->objectIterator_->isExactlyA(this->subclassIterator_->first)); 891 899 } 892 900 return (*this);
Note: See TracChangeset
for help on using the changeset viewer.