Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 19, 2007, 11:01:25 PM (16 years ago)
Author:
landauf
Message:
  • fixed a small bug in the object hierarchy
  • new objects are now added to all class-lists they're derived from (until now they were only added to the list of their class). this means: i'm replacing the tree-structure by a mountain-one, which costs more memory but allows faster iteration.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchie/src/Identifier.cc

    r219 r220  
    7878    void Identifier::addObject(OrxonoxClass* object)
    7979    {
    80         std::cout << "*** Added " << this->name_ << " to list.\n";
     80        std::cout << "*** Added object to " << this->name_ << "-list.\n";
    8181        this->objects_.add(object);
    8282    }
     
    8484    void Identifier::removeObject(OrxonoxClass* object)
    8585    {
    86         std::cout << "*** Removed " << this->name_ << " from list.\n";
     86        std::cout << "*** Removed object from " << this->name_ << "-list.\n";
    8787        this->objects_.remove(object);
     88
     89        IdentifierListElement* temp = this->directParents_.first_;
     90        while (temp)
     91        {
     92            temp->identifier_->removeObject(object);
     93            temp = temp->next_;
     94        }
    8895    }
    8996
Note: See TracChangeset for help on using the changeset viewer.