Changeset 1543
- Timestamp:
- Jun 5, 2008, 2:18:14 PM (17 years ago)
- Location:
- code/trunk
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/core/CMakeLists.txt
r1535 r1543 1 1 SET(CORE_SRC_FILES 2 BaseObject.cc3 ClassTreeMask.cc4 2 ConfigFileManager.cc 5 3 ConfigValueContainer.cc 6 4 Core.cc 7 5 Error.cc 8 Executor.cc 9 Factory.cc 10 Identifier.cc 11 IdentifierDistributor.cc 6 Language.cc 7 OrxonoxClass.cc 12 8 OutputBuffer.cc 13 Shell.cc14 CommandExecutor.cc15 CommandEvaluation.cc16 ConsoleCommand.cc17 ArgumentCompletionFunctions.cc18 ConsoleCommandCompilation.cc19 Language.cc20 Loader.cc21 MetaObjectList.cc22 Namespace.cc23 NamespaceNode.cc24 OrxonoxClass.cc25 9 OutputHandler.cc 26 10 Script.cc 27 11 SignalHandler.cc 12 13 # command 14 ArgumentCompletionFunctions.cc 15 CommandEvaluation.cc 16 CommandExecutor.cc 17 ConsoleCommand.cc 18 ConsoleCommandCompilation.cc 19 Executor.cc 20 21 # hierarchy 22 Factory.cc 23 Identifier.cc 24 MetaObjectList.cc 25 26 # level 27 BaseObject.cc 28 ClassTreeMask.cc 29 Loader.cc 30 Namespace.cc 31 NamespaceNode.cc 32 XMLPort.cc 33 34 # shell 35 IRC.cc 36 Shell.cc 28 37 TclBind.cc 29 XMLPort.cc30 38 TclThreadManager.cc 31 IRC.cc32 39 40 # input 33 41 input/Button.cc 34 42 input/CalibratorCallback.cc -
code/trunk/src/core/ClassFactory.h
r1505 r1543 74 74 { 75 75 COUT(4) << "*** ClassFactory: Create entry for " << name << " in Factory." << std::endl; 76 Class Manager<T>::getIdentifier()->addFactory(new ClassFactory<T>);77 Factory::add(name, Class Manager<T>::getIdentifier());76 ClassIdentifier<T>::getIdentifier()->addFactory(new ClassFactory<T>); 77 Factory::add(name, ClassIdentifier<T>::getIdentifier()); 78 78 79 79 return true; -
code/trunk/src/core/ClassManager.h
r1505 r1543 1 /*2 * ORXONOX - the hottest 3D action shooter ever to exist3 * > www.orxonox.net <4 *5 *6 * License notice:7 *8 * This program is free software; you can redistribute it and/or9 * modify it under the terms of the GNU General Public License10 * as published by the Free Software Foundation; either version 211 * of the License, or (at your option) any later version.12 *13 * This program is distributed in the hope that it will be useful,14 * but WITHOUT ANY WARRANTY; without even the implied warranty of15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the16 * GNU General Public License for more details.17 *18 * You should have received a copy of the GNU General Public License19 * along with this program; if not, write to the Free Software20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.21 *22 * Author:23 * Fabian 'x3n' Landau24 * Co-authors:25 * ...26 *27 */28 29 /**30 @file ClassManager.h31 @brief Definition and Implementation of the ClassManager template.32 33 The ClassManager is a helper-class for ClassIdentifier. Because ClassIdentifiers must34 be unique, they are created through the IdentifierDistributor-class to assure the35 uniqueness of the ClassIdentifier. But accessing Identifiers through IdentifierDistributor36 is slow, because it uses strings and a map. Thats why we use the ClassManager-template: It's37 a singleton like ClassIdentifier, but it doesn't hurt if there are multiple instances in38 different libraries, because they all store the same pointer to the unique ClassIdentifier39 which they've retrieved through IdentifierDistributor.40 */41 42 #ifndef _ClassManager_H__43 #define _ClassManager_H__44 45 #include "CorePrereqs.h"46 47 #include <string>48 49 #include "Identifier.h"50 #include "IdentifierDistributor.h"51 #include "Debug.h"52 53 namespace orxonox54 {55 //! ClassManager is a helper class to allow faster access on the ClassIdentifiers.56 /**57 Because accessing the IdentifierDistributor is slow, the ClassManager accesses it once58 and stores the result in a member-variable. IdentifierDistributor assures the uniqueness59 of the ClassIdentifier, even if there are multiple instances of the ClassManager-template60 in different libraries.61 */62 template <class T>63 class ClassManager64 {65 public:66 static ClassManager<T>* getSingleton();67 static ClassIdentifier<T>* getIdentifier();68 static const std::string& getName();69 70 private:71 ClassManager();72 ClassManager(const ClassIdentifier<T>& identifier) {} // don't copy73 ~ClassManager() {} // don't delete74 75 bool bInitialized_; //!< This is false until the ClassIdentifier gets assigned76 ClassIdentifier<T>* identifier_; //!< The unique ClassIdentifier for the class T77 };78 79 /**80 @brief Constructor: Marks the ClassManager as uninitialized.81 */82 template <class T>83 ClassManager<T>::ClassManager()84 {85 this->bInitialized_ = false;86 }87 88 /**89 @brief Returns the one and only instance of this class for the template parameter T.90 @return The instance91 */92 template <class T>93 ClassManager<T>* ClassManager<T>::getSingleton()94 {95 static ClassManager<T> theOneAndOnlyInstance = ClassManager<T>();96 return &theOneAndOnlyInstance;97 }98 99 /**100 @brief Creates the only instance of this class for the template class T and retrieves a unique Identifier for the given name.101 @return The unique Identifier102 */103 template <class T>104 ClassIdentifier<T>* ClassManager<T>::getIdentifier()105 {106 // Check if the ClassManager is already initialized107 if (!ClassManager<T>::getSingleton()->bInitialized_)108 {109 // Get the name of the class110 std::string name = typeid(T).name();111 112 // It's not -> retrieve the ClassIdentifier through IdentifierDistributor113 COUT(4) << "*** ClassManager: Request Identifier Singleton for " << name << "." << std::endl;114 115 // First create a ClassIdentifier in case there's no instance existing yet116 ClassIdentifier<T>* temp = new ClassIdentifier<T>();117 118 // Ask the IdentifierDistributor for the unique ClassIdentifier119 ClassManager<T>::getSingleton()->identifier_ = (ClassIdentifier<T>*)IdentifierDistributor::getIdentifier(name, temp);120 121 // If the retrieved Identifier differs from our proposal, we don't need the proposal any more122 if (temp != ClassManager<T>::getSingleton()->identifier_)123 {124 COUT(4) << "*** ClassManager: Requested Identifier for " << name << " was already existing and got assigned." << std::endl;125 126 // Delete the unnecessary proposal127 delete temp;128 }129 else130 {131 COUT(4) << "*** ClassManager: Requested Identifier for " << name << " was not yet existing and got created." << std::endl;132 }133 134 ClassManager<T>::getSingleton()->bInitialized_ = true;135 }136 137 // Finally return the unique ClassIdentifier138 return ClassManager<T>::getSingleton()->identifier_;139 }140 141 /**142 @brief Returns the name of the class the ClassManager belongs to.143 @return The name144 */145 template <class T>146 const std::string& ClassManager<T>::getName()147 {148 static std::string unknownClassName = std::string("unknown");149 150 if (ClassManager<T>::getSingleton()->bInitialized_)151 return ClassManager<T>::getSingleton()->identifier_->getName();152 else153 return unknownClassName;154 }155 }156 157 #endif /* _ClassManager_H__ */ -
code/trunk/src/core/ClassTreeMask.cc
r1505 r1543 266 266 ClassTreeMask::ClassTreeMask() 267 267 { 268 this->root_ = new ClassTreeMaskNode(Class Manager<BaseObject>::getIdentifier(), true);268 this->root_ = new ClassTreeMaskNode(ClassIdentifier<BaseObject>::getIdentifier(), true); 269 269 } 270 270 … … 275 275 ClassTreeMask::ClassTreeMask(const ClassTreeMask& other) 276 276 { 277 this->root_ = new ClassTreeMaskNode(Class Manager<BaseObject>::getIdentifier(), true);277 this->root_ = new ClassTreeMaskNode(ClassIdentifier<BaseObject>::getIdentifier(), true); 278 278 for (ClassTreeMaskIterator it = other.root_; it; ++it) 279 279 this->add(it->getClass(), it->isIncluded(), false); … … 435 435 { 436 436 delete this->root_; 437 this->root_ = new ClassTreeMaskNode(Class Manager<BaseObject>::getIdentifier(), true);437 this->root_ = new ClassTreeMaskNode(ClassIdentifier<BaseObject>::getIdentifier(), true); 438 438 } 439 439 -
code/trunk/src/core/CommandEvaluation.cc
r1505 r1543 29 29 #include "CommandEvaluation.h" 30 30 #include "ConsoleCommand.h" 31 #include "Identifier.h" 31 32 #include "Debug.h" 32 33 #include "util/String.h" -
code/trunk/src/core/ConfigFileManager.cc
r1505 r1543 529 529 for (std::map<std::string, Identifier*>::const_iterator it = Identifier::getIdentifierMapBegin(); it != Identifier::getIdentifierMapEnd(); ++it) 530 530 { 531 if ((*it).second->hasConfigValues() /* && (*it).second != Class Manager<KeyBinder>::getIdentifier()*/)531 if ((*it).second->hasConfigValues() /* && (*it).second != ClassIdentifier<KeyBinder>::getIdentifier()*/) 532 532 { 533 533 for (std::map<std::string, ConfigValueContainer*>::const_iterator it2 = (*it).second->getConfigValueMapBegin(); it2 != (*it).second->getConfigValueMapEnd(); ++it2) -
code/trunk/src/core/ConfigValueIncludes.h
r1505 r1543 63 63 */ 64 64 #define SetConfigValueGeneric(classname, varname, defvalue) \ 65 orxonox::ConfigValueContainer* container##varname = Class Manager<classname>::getIdentifier()->getConfigValueContainer(#varname); \65 orxonox::ConfigValueContainer* container##varname = ClassIdentifier<classname>::getIdentifier()->getConfigValueContainer(#varname); \ 66 66 if (!container##varname) \ 67 67 { \ 68 container##varname = new orxonox::ConfigValueContainer(CFT_Settings, Class Manager<classname>::getIdentifier(), #varname, varname = defvalue); \69 Class Manager<classname>::getIdentifier()->addConfigValueContainer(#varname, container##varname); \68 container##varname = new orxonox::ConfigValueContainer(CFT_Settings, ClassIdentifier<classname>::getIdentifier(), #varname, varname = defvalue); \ 69 ClassIdentifier<classname>::getIdentifier()->addConfigValueContainer(#varname, container##varname); \ 70 70 } \ 71 71 container##varname->getValue(&varname) -
code/trunk/src/core/ConsoleCommand.h
r1534 r1543 42 42 43 43 #define SetConsoleCommandGeneric(fakevariable, classname, command, bCreateShortcut) \ 44 orxonox::ConsoleCommand& fakevariable = orxonox::Class Manager<classname>::getIdentifier()->addConsoleCommand(command, bCreateShortcut)44 orxonox::ConsoleCommand& fakevariable = orxonox::ClassIdentifier<classname>::getIdentifier()->addConsoleCommand(command, bCreateShortcut) 45 45 46 46 -
code/trunk/src/core/CoreIncludes.h
r1505 r1543 44 44 45 45 #include "Identifier.h" 46 #include "ClassManager.h"47 46 #include "Factory.h" 48 47 #include "ClassFactory.h" … … 56 55 */ 57 56 #define InternRegisterObject(ClassName, bRootClass) \ 58 this->setIdentifier(orxonox::Class Manager<ClassName>::getIdentifier()->registerClass(this->getParents(), #ClassName, bRootClass)); \57 this->setIdentifier(orxonox::ClassIdentifier<ClassName>::getIdentifier()->registerClass(this->getParents(), #ClassName, bRootClass)); \ 59 58 if (orxonox::Identifier::isCreatingHierarchy() && this->getParents()) \ 60 59 this->getParents()->insert(this->getParents()->end(), this->getIdentifier()); \ 61 orxonox::Class Manager<ClassName>::getIdentifier()->addObject(this); \60 orxonox::ClassIdentifier<ClassName>::getIdentifier()->addObject(this); \ 62 61 if (orxonox::Identifier::isCreatingHierarchy()) \ 63 62 return … … 93 92 */ 94 93 #define Class(ClassName) \ 95 Class Manager<ClassName>::getIdentifier()94 ClassIdentifier<ClassName>::getIdentifier() 96 95 97 96 /** -
code/trunk/src/core/CorePrereqs.h
r1535 r1543 97 97 template <class T> 98 98 class ClassIdentifier; 99 template <class T>100 class ClassManager;101 99 class ClassTreeMask; 102 100 class ClassTreeMaskIterator; … … 124 122 class FunctorStatic; 125 123 class Identifier; 126 class IdentifierDistributor;127 124 class IRC; 128 125 template <class T> -
code/trunk/src/core/Identifier.cc
r1505 r1543 73 73 delete this->children_; 74 74 delete this->directChildren_; 75 } 76 77 /** 78 @brief Returns an identifier by name and adds it if not available 79 @param name The name of the identifier as typeid().name() suggests 80 @param proposal A pointer to a newly created identifier for the case of non existance in the map 81 @return The identifier (unique instance) 82 */ 83 Identifier *Identifier::getIdentifier(std::string &name, Identifier *proposal) 84 { 85 static std::map<std::string, Identifier*> identifiers; //!< The map to store all Identifiers. 86 std::map<std::string, Identifier*>::const_iterator it = identifiers.find(name); 87 if (it == identifiers.end()) 88 { 89 // there isn't an entry yet, put the proposal in it 90 identifiers[name] = proposal; 91 } 92 else 93 { 94 // this happens when a template exists twice --> delete the proposal 95 delete proposal; 96 } 97 return identifiers[name]; 75 98 } 76 99 -
code/trunk/src/core/Identifier.h
r1505 r1543 253 253 } 254 254 255 static Identifier* getIdentifier(std::string &name, Identifier *proposal); 256 255 257 std::set<const Identifier*> parents_; //!< The parents of the class the Identifier belongs to 256 258 std::set<const Identifier*>* children_; //!< The children of the class the Identifier belongs to … … 288 290 289 291 To be really sure that not more than exactly one object exists (even with libraries), 290 ClassIdentifiers are only created by IdentifierDistributor. 291 292 You can access the ClassIdentifiers created by IdentifierDistributor through the 293 ClassManager singletons. 292 ClassIdentifiers are stored in the Identifier Singleton. 294 293 */ 295 294 template <class T> 296 295 class ClassIdentifier : public Identifier 297 296 { 298 template <class TT>299 friend class ClassManager;300 301 297 public: 302 298 ClassIdentifier<T>* registerClass(std::set<const Identifier*>* parents, const std::string& name, bool bRootClass); … … 316 312 void addXMLPortObjectContainer(const std::string& sectionname, XMLPortObjectContainer* container); 317 313 314 static ClassIdentifier<T> *getIdentifier(); 315 318 316 private: 319 317 ClassIdentifier(); … … 325 323 std::map<std::string, XMLPortClassParamContainer<T>*> xmlportParamContainers_; //!< All loadable parameters 326 324 std::map<std::string, XMLPortClassObjectContainer<T, class O>*> xmlportObjectContainers_; //!< All attachable objects 325 326 static ClassIdentifier<T> *classIdentifier_s; 327 327 }; 328 329 template <class T> 330 ClassIdentifier<T> *ClassIdentifier<T>::classIdentifier_s = 0; 328 331 329 332 /** … … 365 368 366 369 /** 370 @brief Creates the only instance of this class for the template class T and retrieves a unique Identifier for the given name. 371 @return The unique Identifier 372 */ 373 template <class T> 374 ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier() 375 { 376 // check if the static field has already been filled 377 if (ClassIdentifier<T>::classIdentifier_s == 0) 378 { 379 // Get the name of the class 380 std::string name = typeid(T).name(); 381 382 // create a new identifier anyway. Will be deleted in Identifier::getIdentifier if not used. 383 ClassIdentifier<T> *proposal = new ClassIdentifier<T>(); 384 385 // Get the entry from the map 386 ClassIdentifier<T>::classIdentifier_s = (ClassIdentifier<T>*)Identifier::getIdentifier(name, proposal); 387 } 388 389 // Finally return the unique ClassIdentifier 390 return ClassIdentifier<T>::classIdentifier_s; 391 } 392 393 /** 367 394 @brief Sets the name of the class. 368 395 @param name The name … … 472 499 SubclassIdentifier() 473 500 { 474 this->identifier_ = Class Manager<T>::getIdentifier();501 this->identifier_ = ClassIdentifier<T>::getIdentifier(); 475 502 } 476 503 … … 491 518 SubclassIdentifier<T>& operator=(Identifier* identifier) 492 519 { 493 if (!identifier->isA(Class Manager<T>::getIdentifier()))520 if (!identifier->isA(ClassIdentifier<T>::getIdentifier())) 494 521 { 495 522 COUT(1) << "An error occurred in SubclassIdentifier (Identifier.h):" << std::endl; 496 COUT(1) << "Error: Class " << identifier->getName() << " is not a " << Class Manager<T>::getIdentifier()->getName() << "!" << std::endl;497 COUT(1) << "Error: SubclassIdentifier<" << Class Manager<T>::getIdentifier()->getName() << "> = Class(" << identifier->getName() << ") is forbidden." << std::endl;523 COUT(1) << "Error: Class " << identifier->getName() << " is not a " << ClassIdentifier<T>::getIdentifier()->getName() << "!" << std::endl; 524 COUT(1) << "Error: SubclassIdentifier<" << ClassIdentifier<T>::getIdentifier()->getName() << "> = Class(" << identifier->getName() << ") is forbidden." << std::endl; 498 525 COUT(1) << "Aborting..." << std::endl; 499 526 abort(); … … 541 568 { 542 569 COUT(1) << "An error occurred in SubclassIdentifier (Identifier.h):" << std::endl; 543 COUT(1) << "Error: Class " << this->identifier_->getName() << " is not a " << Class Manager<T>::getIdentifier()->getName() << "!" << std::endl;570 COUT(1) << "Error: Class " << this->identifier_->getName() << " is not a " << ClassIdentifier<T>::getIdentifier()->getName() << "!" << std::endl; 544 571 COUT(1) << "Error: Couldn't fabricate a new Object." << std::endl; 545 572 COUT(1) << "Aborting..." << std::endl; -
code/trunk/src/core/IdentifierDistributor.cc
r1505 r1543 1 /*2 * ORXONOX - the hottest 3D action shooter ever to exist3 * > www.orxonox.net <4 *5 *6 * License notice:7 *8 * This program is free software; you can redistribute it and/or9 * modify it under the terms of the GNU General Public License10 * as published by the Free Software Foundation; either version 211 * of the License, or (at your option) any later version.12 *13 * This program is distributed in the hope that it will be useful,14 * but WITHOUT ANY WARRANTY; without even the implied warranty of15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the16 * GNU General Public License for more details.17 *18 * You should have received a copy of the GNU General Public License19 * along with this program; if not, write to the Free Software20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.21 *22 * Author:23 * Fabian 'x3n' Landau24 * Co-authors:25 * ...26 *27 */28 29 /**30 @file IdentifierDistributor.cc31 @brief Implementation of the IdentifierDistributor class.32 */33 34 #include "IdentifierDistributor.h"35 #include "Identifier.h"36 37 namespace orxonox38 {39 /**40 @brief Returns the only instance of a ClassIdentifier for a given class.41 @param name The name of the class42 @param proposal A proposal for the ClassIdentifier in case there is no entry yet.43 @return The unique ClassIdentifier44 */45 Identifier* IdentifierDistributor::getIdentifier(const std::string& name, Identifier* proposal)46 {47 // Create the only instance of the IdentifierDistributor-singleton48 static IdentifierDistributor theOneAndOnlyInstance = IdentifierDistributor();49 50 // Look for an entry in the map51 std::map<std::string, Identifier*>::const_iterator it = theOneAndOnlyInstance.identifiers_.find(name);52 if (it != theOneAndOnlyInstance.identifiers_.end())53 {54 // There is already an entry: return it55 return (*it).second;56 }57 else58 {59 // There is no entry: put the proposal into the map and return it60 theOneAndOnlyInstance.identifiers_[name] = proposal;61 return proposal;62 }63 }64 } -
code/trunk/src/core/IdentifierDistributor.h
r1505 r1543 1 /*2 * ORXONOX - the hottest 3D action shooter ever to exist3 * > www.orxonox.net <4 *5 *6 * License notice:7 *8 * This program is free software; you can redistribute it and/or9 * modify it under the terms of the GNU General Public License10 * as published by the Free Software Foundation; either version 211 * of the License, or (at your option) any later version.12 *13 * This program is distributed in the hope that it will be useful,14 * but WITHOUT ANY WARRANTY; without even the implied warranty of15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the16 * GNU General Public License for more details.17 *18 * You should have received a copy of the GNU General Public License19 * along with this program; if not, write to the Free Software20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.21 *22 * Author:23 * Fabian 'x3n' Landau24 * Co-authors:25 * ...26 *27 */28 29 /**30 @file IdentifierDistributor.h31 @brief Definition of the IdentifierDistributor class32 33 The IdentifierDistributor makes sure that only one instance of ClassIdentifier for each34 template parameter T exists. All Identifiers are stored in a map with their name.35 IdentifierDistributor is a singleton class, it can't be created or deleted directly.36 */37 38 #ifndef _IdentifierDistributor_H__39 #define _IdentifierDistributor_H__40 41 #include "CorePrereqs.h"42 43 #include <map>44 45 namespace orxonox46 {47 //! The Identifier Distributor stores all Identifiers and makes sure there are no ambiguities.48 class _CoreExport IdentifierDistributor49 {50 public:51 static Identifier* getIdentifier(const std::string& name, Identifier* proposal);52 53 private:54 IdentifierDistributor() {}; // Don't create55 IdentifierDistributor(const IdentifierDistributor& distributor); // Don't copy56 ~IdentifierDistributor() {} // Don't delete57 58 std::map<std::string, Identifier*> identifiers_; //!< The map to store all Identifiers.59 };60 }61 62 #endif /* _IdentifierDistributor_H__ */ -
code/trunk/src/core/Iterator.h
r1505 r1543 64 64 { 65 65 this->element_ = 0; 66 Class Manager<T>::getIdentifier()->getObjects()->registerIterator(this);66 ClassIdentifier<T>::getIdentifier()->getObjects()->registerIterator(this); 67 67 } 68 68 … … 74 74 { 75 75 this->element_ = element; 76 Class Manager<T>::getIdentifier()->getObjects()->registerIterator(this);76 ClassIdentifier<T>::getIdentifier()->getObjects()->registerIterator(this); 77 77 } 78 78 … … 82 82 ~Iterator() 83 83 { 84 Class Manager<T>::getIdentifier()->getObjects()->unregisterIterator(this);84 ClassIdentifier<T>::getIdentifier()->getObjects()->unregisterIterator(this); 85 85 } 86 86 -
code/trunk/src/core/MetaObjectList.h
r1505 r1543 89 89 MetaObjectListElement<T>::~MetaObjectListElement() 90 90 { 91 COUT(5) << "*** MetaObjectList: Removing Object from " << Class Manager<T>::getIdentifier()->getName() << "-list." << std::endl;91 COUT(5) << "*** MetaObjectList: Removing Object from " << ClassIdentifier<T>::getIdentifier()->getName() << "-list." << std::endl; 92 92 this->list_->notifyIterators(this->element_); 93 93 -
code/trunk/src/core/ObjectList.h
r1505 r1543 44 44 45 45 #include "Iterator.h" 46 #include " ClassManager.h"46 #include "Identifier.h" 47 47 48 48 namespace orxonox … … 95 95 /** @brief Returns the first element in the list. @return The first element */ 96 96 inline static Iterator<T> start() 97 { return Iterator<T>(Class Manager<T>::getIdentifier()->getObjects()->first_); }97 { return Iterator<T>(ClassIdentifier<T>::getIdentifier()->getObjects()->first_); } 98 98 99 99 /** @brief Returns the first element in the list. @return The first element */ 100 100 inline static Iterator<T> begin() 101 { return Iterator<T>(Class Manager<T>::getIdentifier()->getObjects()->first_); }101 { return Iterator<T>(ClassIdentifier<T>::getIdentifier()->getObjects()->first_); } 102 102 103 103 /** @brief Returns the last element in the list. @return The last element */ 104 104 inline static Iterator<T> end() 105 { return Iterator<T>(Class Manager<T>::getIdentifier()->getObjects()->last_); }105 { return Iterator<T>(ClassIdentifier<T>::getIdentifier()->getObjects()->last_); } 106 106 107 107 inline void registerIterator(Iterator<T>* iterator) -
code/trunk/src/core/input/KeyBinder.cc
r1538 r1543 265 265 { 266 266 // config value stuff 267 ConfigValueContainer* cont = Class Manager<KeyBinder>::getIdentifier()->getConfigValueContainer(button.name_);267 ConfigValueContainer* cont = ClassIdentifier<KeyBinder>::getIdentifier()->getConfigValueContainer(button.name_); 268 268 if (!cont) 269 269 { 270 cont = new ConfigValueContainer(CFT_Keybindings, Class Manager<KeyBinder>::getIdentifier(), button.name_, "");271 Class Manager<KeyBinder>::getIdentifier()->addConfigValueContainer(button.name_, cont);270 cont = new ConfigValueContainer(CFT_Keybindings, ClassIdentifier<KeyBinder>::getIdentifier(), button.name_, ""); 271 ClassIdentifier<KeyBinder>::getIdentifier()->addConfigValueContainer(button.name_, cont); 272 272 } 273 273 std::string old = button.bindingString_; -
code/trunk/src/orxonox/OrxonoxStableHeaders.h
r1535 r1543 59 59 #include <OgreMath.h> 60 60 #include <OgreMatrix3.h> 61 #include <OgreMatrix4.h> 62 #include <OgreMesh.h> 61 63 #include <OgreOverlay.h> 62 64 #include <OgreOverlayElement.h> … … 70 72 #include <OgreSceneManager.h> 71 73 #include <OgreSceneNode.h> 74 #include <OgreString.h> 72 75 #include <OgreStringConverter.h> 73 76 #include <OgreTextureManager.h> … … 84 87 85 88 #include "ois/OIS.h" 89 #include "cpptcl/CppTcl.h" 90 #include "tinyxml/ticpp.h" 91 #include "tinyxml/tinyxml.h" 86 92 87 //#include "util/Convert.h"93 #include "util/Convert.h" 88 94 #include "util/Math.h" 89 //#include "util/Multitype.h" 90 //#include "util/MultiTypeMath.h" 91 //#include "util/MultiTypePrimitive.h" 92 //#include "util/MultiTypeString.h" 95 #include "util/Multitype.h" 96 #include "util/MultiTypeMath.h" 93 97 #include "util/Sleep.h" 94 98 #include "util/String.h" 95 99 #include "util/SubString.h" 96 //#include "util/XMLIncludes.h" 97 #include "tinyxml/ticpp.h" 98 #include "tinyxml/tinyxml.h" 100 #include "util/XMLIncludes.h" 99 101 100 102 #include "core/BaseObject.h" 101 //#include "core/CommandExecutor.h"102 //#include "core/CoreIncludes.h"103 //#include "core/ConfigValueIncludes.h"103 #include "core/ConsoleCommand.h" 104 #include "core/CoreIncludes.h" 105 #include "core/ConfigValueIncludes.h" 104 106 #include "core/Debug.h" 105 //#include "core/Executor.h" 106 //#include "core/XMLPort.h" 107 #include "core/OutputBuffer.h" 108 #include "core/OutputHandler.h" 109 #include "core/Executor.h" 110 #include "core/XMLPort.h" 107 111 108 112 #include "network/Synchronisable.h" 109 113 110 #include " OrxonoxPrereqs.h"114 #include "tools/Mesh.h" 111 115 #include "tools/Timer.h" 116 #include "objects/Model.h" 112 117 #include "objects/Tickable.h" 113 #include "objects/Model.h"114 118 #include "objects/WorldEntity.h" 115 119 -
code/trunk/visual_studio/vc8/core.vcproj
r1535 r1543 236 236 </File> 237 237 <File 238 RelativePath="..\..\src\core\IdentifierDistributor.cc"239 >240 </File>241 <File242 238 RelativePath="..\..\src\core\MetaObjectList.cc" 243 239 > … … 498 494 </File> 499 495 <File 500 RelativePath="..\..\src\core\ClassManager.h"501 >502 </File>503 <File504 496 RelativePath="..\..\src\core\CoreIncludes.h" 505 497 > … … 511 503 <File 512 504 RelativePath="..\..\src\core\Identifier.h" 513 >514 </File>515 <File516 RelativePath="..\..\src\core\IdentifierDistributor.h"517 505 > 518 506 </File>
Note: See TracChangeset
for help on using the changeset viewer.