Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 20, 2007, 8:38:53 PM (16 years ago)
Author:
landauf
Message:
  • *cough* fixed another small bug in the object-list *cough*
  • made the object-list a template, to avoid a dynamic_cast in the Iterator
File:
1 edited

Legend:

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

    r221 r224  
    1111    {
    1212        this->bCreatedOneObject_ = false;
    13 //        this->directParents_ = new IdentifierList();
    14 //        this->allParents_ = new IdentifierList();
    15 //        this->directChildren_ = new IdentifierList();
    16 //        this->allChildren_ = new IdentifierList();
    17 //        this->objects_ = new ObjectList();
    1813    }
    1914
    2015    Identifier::~Identifier()
    2116    {
    22 //        delete this->directParents_;
    23 //        delete this->allParents_;
    24 //        delete this->directChildren_;
    25 //        delete this->allChildren_;
    26 //        delete this->objects_;
    2717        delete &this->name_;
    2818    }
     
    7666    }
    7767
    78     void Identifier::addObject(OrxonoxClass* object)
    79     {
    80         std::cout << "*** Added object to " << this->name_ << "-list.\n";
    81         this->objects_.add(object);
    82     }
    83 
    84     void Identifier::removeObject(OrxonoxClass* object)
    85     {
    86         bool bIterateForwards = !Identifier::isCreatingHierarchy();
    87 
    88         if (bIterateForwards)
    89             std::cout << "*** Removed object from " << this->name_ << "-list, iterating forwards.\n";
    90         else
    91             std::cout << "*** Removed object from " << this->name_ << "-list, iterating backwards.\n";
    92 
    93         this->objects_.remove(object, bIterateForwards);
    94 
    95         IdentifierListElement* temp = this->directParents_.first_;
    96         while (temp)
    97         {
    98             temp->identifier_->removeObject(object);
    99             temp = temp->next_;
    100         }
    101     }
    102 
    10368    bool Identifier::isA(Identifier* identifier)
    10469    {
Note: See TracChangeset for help on using the changeset viewer.