Changeset 241
- Timestamp:
- Nov 25, 2007, 3:24:17 AM (17 years ago)
- Location:
- code/branches/objecthierarchie/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchie/src/Identifier.cc
r239 r241 14 14 this->directChildren_ = new IdentifierList; 15 15 this->allChildren_ = new IdentifierList; 16 this->directParents_ = new IdentifierList;17 this->allParents_ = new IdentifierList;18 16 } 19 17 … … 24 22 delete this->directChildren_; 25 23 delete this->allChildren_; 26 delete this->directParents_;27 delete this->allParents_;28 24 } 29 25 … … 44 40 while (temp1) 45 41 { 46 temp2 = temp1->identifier_->directParents_ ->first_;42 temp2 = temp1->identifier_->directParents_.first_; 47 43 while (temp2) 48 44 { … … 66 62 if (temp1->bDirect_) 67 63 { 68 this->directParents_ ->add(temp1->identifier_);69 temp1->identifier_-> directChildren_->add(this);64 this->directParents_.add(temp1->identifier_); 65 temp1->identifier_->getDirectChildren().add(this); 70 66 } 71 67 72 this->allParents_ ->add(temp1->identifier_);73 temp1->identifier_-> allChildren_->add(this);68 this->allParents_.add(temp1->identifier_); 69 temp1->identifier_->getAllChildren().add(this); 74 70 75 71 temp1 = temp1->next_; … … 80 76 bool Identifier::isA(const Identifier* identifier) const 81 77 { 82 return (identifier == this || this->allParents_ ->isInList(identifier));78 return (identifier == this || this->allParents_.isInList(identifier)); 83 79 } 84 80 … … 90 86 bool Identifier::isChildOf(const Identifier* identifier) const 91 87 { 92 return this->allParents_ ->isInList(identifier);88 return this->allParents_.isInList(identifier); 93 89 } 94 90 95 91 bool Identifier::isDirectChildOf(const Identifier* identifier) const 96 92 { 97 return this->directParents_ ->isInList(identifier);93 return this->directParents_.isInList(identifier); 98 94 } 99 95 -
code/branches/objecthierarchie/src/Identifier.h
r239 r241 39 39 40 40 const std::string& getName() const { return this->name_; } 41 const IdentifierList *getDirectParents() const { return this->directParents_; }42 const IdentifierList *getAllParents() const { return this->allParents_; }43 const IdentifierList* getDirectChildren() const { returnthis->directChildren_; }44 const IdentifierList* getAllChildren() const { returnthis->allChildren_; }41 const IdentifierList& getDirectParents() const { return this->directParents_; } 42 const IdentifierList& getAllParents() const { return this->allParents_; } 43 IdentifierList& getDirectChildren() const { return *this->directChildren_; } 44 IdentifierList& getAllChildren() const { return *this->allChildren_; } 45 45 46 46 static bool isCreatingHierarchy() { return (hierarchyCreatingCounter_s > 0); } … … 68 68 } 69 69 70 IdentifierList *directParents_;71 IdentifierList *allParents_;70 IdentifierList directParents_; 71 IdentifierList allParents_; 72 72 IdentifierList* directChildren_; 73 73 IdentifierList* allChildren_; … … 221 221 this->objects_->remove(object, bIterateForwards); 222 222 223 IdentifierListElement* temp = this->directParents_ ->first_;223 IdentifierListElement* temp = this->directParents_.first_; 224 224 while (temp) 225 225 { -
code/branches/objecthierarchie/src/IdentifierList.cc
r240 r241 60 60 } 61 61 62 bool IdentifierList::isInList(const Identifier* identifier) 62 bool IdentifierList::isInList(const Identifier* identifier) const 63 63 { 64 64 IdentifierListElement* temp = this->first_; -
code/branches/objecthierarchie/src/IdentifierList.h
r240 r241 26 26 void add(const Identifier* identifier); 27 27 void remove(const Identifier* identifier); 28 bool isInList(const Identifier* identifier) ;28 bool isInList(const Identifier* identifier) const; 29 29 std::string toString() const; 30 30
Note: See TracChangeset
for help on using the changeset viewer.