Changeset 806 for code/branches/core
- Timestamp:
- Feb 12, 2008, 4:43:22 PM (17 years ago)
- Location:
- code/branches/core/src/orxonox
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core/src/orxonox/Orxonox.cc
r804 r806 206 206 { 207 207 //TODO: start modules 208 ogre_->startRender();208 // ogre_->startRender(); 209 209 //TODO: run engine 210 210 Factory::createClassHierarchy(); 211 createScene();212 setupScene();213 setupInputSystem();211 // createScene(); 212 // setupScene(); 213 // setupInputSystem(); 214 214 if(mode_!=CLIENT){ // remove this in future ---- presentation hack 215 215 } … … 829 829 test13_2.exclude(Class(A3B2C2)); 830 830 831 // TestClassTreeMask(test13_1); 832 std::cout << "1_0: " << ClassIdentifier<BaseObject>::getIdentifier() << std::endl; 833 831 TestClassTreeMask(test13_1); 834 832 TestClassTreeMask(test13_2); 835 833 -
code/branches/core/src/orxonox/core/ClassManager.h
r805 r806 52 52 53 53 bool bInitialized_; 54 // std::string name_;55 54 ClassIdentifier<T>* identifier_; 56 55 }; … … 65 64 } 66 65 66 /** 67 @brief Returns the one and only instance of this class for the template parameter T. 68 @return The instance 69 */ 67 70 template <class T> 68 71 ClassManager<T>* ClassManager<T>::getSingleton() -
code/branches/core/src/orxonox/core/ClassTreeMask.cc
r805 r806 237 237 bool ClassTreeMask::isIncluded(ClassTreeMaskNode* node, const Identifier* subclass) const 238 238 { 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; 240 240 // Check if the searched subclass is of the same type as the class in the current node or a derivative 241 241 if (subclass->isA(node->getClass())) 242 242 { 243 std::cout << "1_2\n";243 //std::cout << "1_2\n"; 244 244 // Check for the special case 245 245 if (subclass == node->getClass()) 246 246 { 247 std::cout << "1_3\n";247 //std::cout << "1_3\n"; 248 248 return node->isIncluded(); 249 249 } 250 250 251 std::cout << "1_4\n";251 //std::cout << "1_4\n"; 252 252 // Go through the list of subnodes and look for a node containing the searched subclass 253 253 for (std::list<ClassTreeMaskNode*>::iterator it = node->subnodes_.begin(); it != node->subnodes_.end(); ++it) … … 255 255 return isIncluded(*it, subclass); 256 256 257 std::cout << "1_5\n";257 //std::cout << "1_5\n"; 258 258 // There is no subnode containing our class -> the rule of the current node takes in effect 259 259 return node->isIncluded(); … … 261 261 else 262 262 { 263 std::cout << "1_6\n";263 //std::cout << "1_6\n"; 264 264 // The class is not included in the mask: return false 265 265 return false; -
code/branches/core/src/orxonox/core/Identifier.cc
r805 r806 117 117 118 118 /** 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 /**128 119 @returns true, if the Identifier is at least of the given type. 129 120 @param identifier The identifier to compare with -
code/branches/core/src/orxonox/core/Identifier.h
r805 r806 106 106 bool isParentOf(const Identifier* identifier) const; 107 107 108 // static std::map<std::string, Identifier*>& getIdentifierMap();109 110 108 /** @brief Removes all objects of the corresponding class. */ 111 109 virtual void removeObjects() const = 0; … … 192 190 ClassIdentifier<T>* registerClass(const IdentifierList* parents, const std::string& name, bool bRootClass); 193 191 void addObject(T* object); 194 // static ClassIdentifier<T>* getIdentifier();195 192 void removeObjects() const; 196 193 void setName(const std::string& name); … … 244 241 245 242 /** 246 @brief Creates the only instance of this class for the template class T.247 @return The Identifier itself248 *//*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 /**265 243 @brief Sets the name of the class. 266 244 @param name The name … … 269 247 void ClassIdentifier<T>::setName(const std::string& name) 270 248 { 271 // // Make sure we didn't already set the name, to avoid duplicate entries in the Identifier map272 249 if (!this->bSetName_) 273 250 { 274 251 this->name_ = name; 275 // this->getIdentifierMap().insert(std::pair<std::string, Identifier*>(name, this));276 252 this->bSetName_ = true; 277 253 }
Note: See TracChangeset
for help on using the changeset viewer.