Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 806


Ignore:
Timestamp:
Feb 12, 2008, 4:43:22 PM (16 years ago)
Author:
landauf
Message:

cleanup

Location:
code/branches/core/src/orxonox
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core/src/orxonox/Orxonox.cc

    r804 r806  
    206206  {
    207207    //TODO: start modules
    208     ogre_->startRender();
     208//    ogre_->startRender();
    209209    //TODO: run engine
    210210    Factory::createClassHierarchy();
    211     createScene();
    212     setupScene();
    213     setupInputSystem();
     211//    createScene();
     212//    setupScene();
     213//    setupInputSystem();
    214214    if(mode_!=CLIENT){ // remove this in future ---- presentation hack
    215215    }
     
    829829        test13_2.exclude(Class(A3B2C2));
    830830
    831 //        TestClassTreeMask(test13_1);
    832 std::cout << "1_0: " << ClassIdentifier<BaseObject>::getIdentifier() << std::endl;
    833 
     831        TestClassTreeMask(test13_1);
    834832        TestClassTreeMask(test13_2);
    835833
  • code/branches/core/src/orxonox/core/ClassManager.h

    r805 r806  
    5252
    5353            bool bInitialized_;
    54 //            std::string name_;
    5554            ClassIdentifier<T>* identifier_;
    5655    };
     
    6564    }
    6665
     66    /**
     67        @brief Returns the one and only instance of this class for the template parameter T.
     68        @return The instance
     69    */
    6770    template <class T>
    6871    ClassManager<T>* ClassManager<T>::getSingleton()
  • code/branches/core/src/orxonox/core/ClassTreeMask.cc

    r805 r806  
    237237    bool ClassTreeMask::isIncluded(ClassTreeMaskNode* node, const Identifier* subclass) const
    238238    {
    239 std::cout << "1_1: " << subclass->getName() << " (" << subclass << ") / " << node->getClass()->getName() << " (" << node->getClass() << ")" << std::endl;
     239//std::cout << "1_1: " << subclass->getName() << " (" << subclass << ") / " << node->getClass()->getName() << " (" << node->getClass() << ")" << std::endl;
    240240        // Check if the searched subclass is of the same type as the class in the current node or a derivative
    241241        if (subclass->isA(node->getClass()))
    242242        {
    243 std::cout << "1_2\n";
     243//std::cout << "1_2\n";
    244244            // Check for the special case
    245245            if (subclass == node->getClass())
    246246            {
    247 std::cout << "1_3\n";
     247//std::cout << "1_3\n";
    248248                return node->isIncluded();
    249249            }
    250250
    251 std::cout << "1_4\n";
     251//std::cout << "1_4\n";
    252252            // Go through the list of subnodes and look for a node containing the searched subclass
    253253            for (std::list<ClassTreeMaskNode*>::iterator it = node->subnodes_.begin(); it != node->subnodes_.end(); ++it)
     
    255255                    return isIncluded(*it, subclass);
    256256
    257 std::cout << "1_5\n";
     257//std::cout << "1_5\n";
    258258            // There is no subnode containing our class -> the rule of the current node takes in effect
    259259            return node->isIncluded();
     
    261261        else
    262262        {
    263 std::cout << "1_6\n";
     263//std::cout << "1_6\n";
    264264            // The class is not included in the mask: return false
    265265            return false;
  • code/branches/core/src/orxonox/core/Identifier.cc

    r805 r806  
    117117
    118118    /**
    119         @returns a reference to the Identifier map, containing all Identifiers.
    120     *//*
    121     std::map<std::string, Identifier*>& Identifier::getIdentifierMap()
    122     {
    123         static std::map<std::string, Identifier*> identifierMapStaticReference = std::map<std::string, Identifier*>();
    124         return identifierMapStaticReference;
    125     }*/
    126 
    127     /**
    128119        @returns true, if the Identifier is at least of the given type.
    129120        @param identifier The identifier to compare with
  • code/branches/core/src/orxonox/core/Identifier.h

    r805 r806  
    106106            bool isParentOf(const Identifier* identifier) const;
    107107
    108 //            static std::map<std::string, Identifier*>& getIdentifierMap();
    109 
    110108            /** @brief Removes all objects of the corresponding class. */
    111109            virtual void removeObjects() const = 0;
     
    192190            ClassIdentifier<T>* registerClass(const IdentifierList* parents, const std::string& name, bool bRootClass);
    193191            void addObject(T* object);
    194 //            static ClassIdentifier<T>* getIdentifier();
    195192            void removeObjects() const;
    196193            void setName(const std::string& name);
     
    244241
    245242    /**
    246         @brief Creates the only instance of this class for the template class T.
    247         @return The Identifier itself
    248     *//*
    249     template <class T>
    250     ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier()
    251     {
    252         static ClassIdentifier<T> theOneAndOnlyInstance = ClassIdentifier<T>();
    253         static bool bIdentifierCreated = false;
    254 
    255         if (!bIdentifierCreated)
    256         {
    257             COUT(4) << "*** Create Identifier Singleton." << std::endl;
    258             bIdentifierCreated = true;
    259         }
    260 
    261         return &theOneAndOnlyInstance;
    262     }
    263 */
    264     /**
    265243        @brief Sets the name of the class.
    266244        @param name The name
     
    269247    void ClassIdentifier<T>::setName(const std::string& name)
    270248    {
    271 //        // Make sure we didn't already set the name, to avoid duplicate entries in the Identifier map
    272249        if (!this->bSetName_)
    273250        {
    274251            this->name_ = name;
    275 //            this->getIdentifierMap().insert(std::pair<std::string, Identifier*>(name, this));
    276252            this->bSetName_ = true;
    277253        }
Note: See TracChangeset for help on using the changeset viewer.