[Orxonox-commit 5707] r10367 - in code/branches/core7/src/libraries/core: . class

landauf at orxonox.net landauf at orxonox.net
Wed Apr 15 22:37:18 CEST 2015


Author: landauf
Date: 2015-04-15 22:37:17 +0200 (Wed, 15 Apr 2015)
New Revision: 10367

Modified:
   code/branches/core7/src/libraries/core/ClassTreeMask.cc
   code/branches/core7/src/libraries/core/class/Identifier.h
Log:
removed some functions which were (almost) unused

Modified: code/branches/core7/src/libraries/core/ClassTreeMask.cc
===================================================================
--- code/branches/core7/src/libraries/core/ClassTreeMask.cc	2015-04-15 20:11:15 UTC (rev 10366)
+++ code/branches/core7/src/libraries/core/ClassTreeMask.cc	2015-04-15 20:37:17 UTC (rev 10367)
@@ -292,7 +292,7 @@
         else
         {
             // No it's not: Search for classes inheriting from the given class and add the rules for them
-            for (std::set<const Identifier*>::const_iterator it = subclass->getDirectChildrenBegin(); it != subclass->getDirectChildrenEnd(); ++it)
+            for (std::set<const Identifier*>::const_iterator it = subclass->getDirectChildren().begin(); it != subclass->getDirectChildren().end(); ++it)
                 if ((*it)->isA(this->root_->getClass()))
                     if (overwrite || (!this->nodeExists(*it))) // If we don't want to overwrite, only add nodes that don't already exist
                         this->add(this->root_, *it, bInclude, overwrite);
@@ -391,7 +391,7 @@
     {
         if (!subclass)
             return;
-        for (std::set<const Identifier*>::const_iterator it = subclass->getDirectChildrenBegin(); it != subclass->getDirectChildrenEnd(); ++it)
+        for (std::set<const Identifier*>::const_iterator it = subclass->getDirectChildren().begin(); it != subclass->getDirectChildren().end(); ++it)
             this->add(*it, this->isIncluded(*it), false, false);
 
         this->add(subclass, bInclude, false, clean);
@@ -942,7 +942,7 @@
                                 this->subclasses_.insert(this->subclasses_.end(), std::pair<const Identifier*, bool>(*it2, true));
 
                                 // Insert all directChildren of the directChild
-                                directChildren.insert((*it2)->getDirectChildrenBegin(), (*it2)->getDirectChildrenEnd());
+                                directChildren.insert((*it2)->getDirectChildren().begin(), (*it2)->getDirectChildren().end());
 
                                 // Restart the scan with the expanded set of directChildren
                                 goto scanChildren;

Modified: code/branches/core7/src/libraries/core/class/Identifier.h
===================================================================
--- code/branches/core7/src/libraries/core/class/Identifier.h	2015-04-15 20:11:15 UTC (rev 10366)
+++ code/branches/core7/src/libraries/core/class/Identifier.h	2015-04-15 20:37:17 UTC (rev 10367)
@@ -160,31 +160,12 @@
 
             /// Returns the parents of the class the Identifier belongs to.
             inline const std::set<const Identifier*>& getParents() const { return this->parents_; }
-            /// Returns the begin-iterator of the parents-list.
-            inline std::set<const Identifier*>::const_iterator getParentsBegin() const { return this->parents_.begin(); }
-            /// Returns the end-iterator of the parents-list.
-            inline std::set<const Identifier*>::const_iterator getParentsEnd() const { return this->parents_.end(); }
-
             /// Returns the children of the class the Identifier belongs to.
             inline const std::set<const Identifier*>& getChildren() const { return this->children_; }
-            /// Returns the begin-iterator of the children-list.
-            inline std::set<const Identifier*>::const_iterator getChildrenBegin() const { return this->children_.begin(); }
-            /// Returns the end-iterator of the children-list.
-            inline std::set<const Identifier*>::const_iterator getChildrenEnd() const { return this->children_.end(); }
-
             /// Returns the direct parents of the class the Identifier belongs to.
             inline const std::set<const Identifier*>& getDirectParents() const { return this->directParents_; }
-            /// Returns the begin-iterator of the direct-parents-list.
-            inline std::set<const Identifier*>::const_iterator getDirectParentsBegin() const { return this->directParents_.begin(); }
-            /// Returns the end-iterator of the direct-parents-list.
-            inline std::set<const Identifier*>::const_iterator getDirectParentsEnd() const { return this->directParents_.end(); }
-
             /// Returns the direct children the class the Identifier belongs to.
             inline const std::set<const Identifier*>& getDirectChildren() const { return this->directChildren_; }
-            /// Returns the begin-iterator of the direct-children-list.
-            inline std::set<const Identifier*>::const_iterator getDirectChildrenBegin() const { return this->directChildren_.begin(); }
-            /// Returns the end-iterator of the direct-children-list.
-            inline std::set<const Identifier*>::const_iterator getDirectChildrenEnd() const { return this->directChildren_.end(); }
 
 
             /////////////////////////
@@ -441,7 +422,7 @@
             this->setConfigValues(*it, *it);
 
         if (updateChildren)
-            for (std::set<const Identifier*>::const_iterator it = this->getChildrenBegin(); it != this->getChildrenEnd(); ++it)
+            for (std::set<const Identifier*>::const_iterator it = this->getChildren().begin(); it != this->getChildren().end(); ++it)
                 (*it)->updateConfigValues(false);
     }
 




More information about the Orxonox-commit mailing list