Changeset 1940 for code/branches/objecthierarchy/src/core/ClassFactory.h
- Timestamp:
- Oct 18, 2008, 10:58:46 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/core/ClassFactory.h
r1747 r1940 55 55 { 56 56 public: 57 static bool create(const std::string& name );57 static bool create(const std::string& name, bool bLoadable = true); 58 58 BaseObject* fabricate(); 59 59 … … 68 68 /** 69 69 @brief Adds the ClassFactory to the Identifier of the same type and the Identifier to the Factory. 70 @param name The name of the class 71 @param bLoadable True if the class can be loaded through XML 70 72 @return Always true (this is needed because the compiler only allows assignments before main()) 71 73 */ 72 74 template <class T> 73 bool ClassFactory<T>::create(const std::string& name )75 bool ClassFactory<T>::create(const std::string& name, bool bLoadable) 74 76 { 75 77 COUT(4) << "*** ClassFactory: Create entry for " << name << " in Factory." << std::endl; 76 78 ClassIdentifier<T>::getIdentifier(name)->addFactory(new ClassFactory<T>); 79 ClassIdentifier<T>::getIdentifier()->setLoadable(bLoadable); 77 80 Factory::add(name, ClassIdentifier<T>::getIdentifier()); 78 81
Note: See TracChangeset
for help on using the changeset viewer.