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.h

    r5779 r5783  
    138138
    139139            /** @brief Returns the children of the class the Identifier belongs to. @return The list of all children */
    140             inline const std::set<const Identifier*>& getChildren() const { return (*this->children_); }
     140            inline const std::set<const Identifier*>& getChildren() const { return this->children_; }
    141141            /** @brief Returns the begin-iterator of the children-list. @return The begin-iterator */
    142             inline std::set<const Identifier*>::const_iterator getChildrenBegin() const { return this->children_->begin(); }
     142            inline std::set<const Identifier*>::const_iterator getChildrenBegin() const { return this->children_.begin(); }
    143143            /** @brief Returns the end-iterator of the children-list. @return The end-iterator */
    144             inline std::set<const Identifier*>::const_iterator getChildrenEnd() const { return this->children_->end(); }
     144            inline std::set<const Identifier*>::const_iterator getChildrenEnd() const { return this->children_.end(); }
    145145
    146146            /** @brief Returns the direct parents of the class the Identifier belongs to. @return The list of all direct parents */
     
    152152
    153153            /** @brief Returns the direct children the class the Identifier belongs to. @return The list of all direct children */
    154             inline const std::set<const Identifier*>& getDirectChildren() const { return (*this->directChildren_); }
     154            inline const std::set<const Identifier*>& getDirectChildren() const { return this->directChildren_; }
    155155            /** @brief Returns the begin-iterator of the direct-children-list. @return The begin-iterator */
    156             inline std::set<const Identifier*>::const_iterator getDirectChildrenBegin() const { return this->directChildren_->begin(); }
     156            inline std::set<const Identifier*>::const_iterator getDirectChildrenBegin() const { return this->directChildren_.begin(); }
    157157            /** @brief Returns the end-iterator of the direct-children-list. @return The end-iterator */
    158             inline std::set<const Identifier*>::const_iterator getDirectChildrenEnd() const { return this->directChildren_->end(); }
     158            inline std::set<const Identifier*>::const_iterator getDirectChildrenEnd() const { return this->directChildren_.end(); }
    159159
    160160
     
    296296
    297297            /** @brief Returns the children of the class the Identifier belongs to. @return The list of all children */
    298             inline std::set<const Identifier*>& getChildrenIntern() const { return (*this->children_); }
     298            inline std::set<const Identifier*>& getChildrenIntern() const { return this->children_; }
    299299            /** @brief Returns the direct children of the class the Identifier belongs to. @return The list of all direct children */
    300             inline std::set<const Identifier*>& getDirectChildrenIntern() const { return (*this->directChildren_); }
     300            inline std::set<const Identifier*>& getDirectChildrenIntern() const { return this->directChildren_; }
    301301
    302302            ObjectListBase* objects_;                                      //!< The list of all objects of this class
    303303
    304304        private:
    305             /**
    306                 @brief Increases the hierarchyCreatingCounter_s variable, causing all new objects to store their parents.
    307             */
    308             inline static void startCreatingHierarchy()
    309             {
    310                 hierarchyCreatingCounter_s++;
    311                 COUT(4) << "*** Identifier: Increased Hierarchy-Creating-Counter to " << hierarchyCreatingCounter_s << std::endl;
    312             }
    313 
    314             /**
    315                 @brief Decreases the hierarchyCreatingCounter_s variable, causing the objects to stop storing their parents.
    316             */
    317             inline static void stopCreatingHierarchy()
    318             {
    319                 hierarchyCreatingCounter_s--;
    320                 COUT(4) << "*** Identifier: Decreased Hierarchy-Creating-Counter to " << hierarchyCreatingCounter_s << std::endl;
    321             }
     305            /** @brief Increases the hierarchyCreatingCounter_s variable, causing all new objects to store their parents. */
     306            inline static void startCreatingHierarchy() { hierarchyCreatingCounter_s++; }
     307            /** @brief Decreases the hierarchyCreatingCounter_s variable, causing the objects to stop storing their parents. */
     308            inline static void stopCreatingHierarchy()  { hierarchyCreatingCounter_s--; }
    322309
    323310            static std::map<std::string, Identifier*>& getTypeIDIdentifierMap();
     
    326313
    327314            std::set<const Identifier*> parents_;                          //!< The parents of the class the Identifier belongs to
    328             std::set<const Identifier*>* children_;                        //!< The children of the class the Identifier belongs to
     315            mutable std::set<const Identifier*> children_;                 //!< The children of the class the Identifier belongs to
    329316
    330317            std::set<const Identifier*> directParents_;                    //!< The direct parents of the class the Identifier belongs to
    331             std::set<const Identifier*>* directChildren_;                  //!< The direct children of the class the Identifier belongs to
     318            mutable std::set<const Identifier*> directChildren_;           //!< The direct children of the class the Identifier belongs to
    332319
    333320            bool bCreatedOneObject_;                                       //!< True if at least one object of the given type was created (used to determine the need of storing the parents)
Note: See TracChangeset for help on using the changeset viewer.