Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 24, 2009, 8:58:27 PM (15 years ago)
Author:
landauf
Message:

some cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/libraries/core/Identifier.cc

    r5780 r5783  
    6666        this->bHasConsoleCommands_ = false;
    6767
    68         this->children_ = new std::set<const Identifier*>();
    69         this->directChildren_ = new std::set<const Identifier*>();
    70 
    7168        // Default network ID is the class ID
    7269        this->networkID_ = this->classID_;
     
    7875    Identifier::~Identifier()
    7976    {
    80         delete this->children_;
    81         delete this->directChildren_;
    8277        delete this->objects_;
    8378
     
    165160            {
    166161                // Tell the parent we're one of it's children
    167                 (*it)->getChildrenIntern().insert((*it)->getChildrenIntern().end(), this);
     162                (*it)->children_.insert((*it)->children_.end(), this);
    168163
    169164                // Erase all parents of our parent from our direct-parent-list
     
    187182            {
    188183                // Tell the parent we're one of it's direct children
    189                 (*it)->getDirectChildrenIntern().insert((*it)->getDirectChildrenIntern().end(), this);
     184                (*it)->directChildren_.insert((*it)->directChildren_.end(), this);
    190185
    191186                // Create the super-function dependencies
     
    201196    {
    202197        COUT(3) << "*** Identifier: Create class-hierarchy" << std::endl;
    203         std::map<std::string, Identifier*>::const_iterator it;
    204         it = Identifier::getStringIdentifierMap().begin();
    205         Identifier::getStringIdentifierMap().begin()->second->startCreatingHierarchy();
    206         for (it = Identifier::getStringIdentifierMap().begin(); it != Identifier::getStringIdentifierMap().end(); ++it)
     198        Identifier::startCreatingHierarchy();
     199        for (std::map<std::string, Identifier*>::const_iterator it = Identifier::getStringIdentifierMap().begin(); it != Identifier::getStringIdentifierMap().end(); ++it)
    207200        {
    208201            // To create the new branch of the class-hierarchy, we create a new object and delete it afterwards.
     
    213206            }
    214207        }
    215         Identifier::getStringIdentifierMap().begin()->second->stopCreatingHierarchy();
     208        Identifier::stopCreatingHierarchy();
    216209        COUT(3) << "*** Identifier: Finished class-hierarchy creation" << std::endl;
    217210    }
     
    315308    bool Identifier::isParentOf(const Identifier* identifier) const
    316309    {
    317         return (this->children_->find(identifier) != this->children_->end());
     310        return (this->children_.find(identifier) != this->children_.end());
    318311    }
    319312
     
    324317    bool Identifier::isDirectParentOf(const Identifier* identifier) const
    325318    {
    326         return (this->directChildren_->find(identifier) != this->directChildren_->end());
     319        return (this->directChildren_.find(identifier) != this->directChildren_.end());
    327320    }
    328321
Note: See TracChangeset for help on using the changeset viewer.