Changeset 10374 for code/branches/core7/src/libraries
- Timestamp:
- Apr 19, 2015, 10:04:35 PM (10 years ago)
- Location:
- code/branches/core7/src/libraries/core
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/core/CoreIncludes.h
r10362 r10374 255 255 { this->parents_.push_back(new InheritsFromClass<T>()); return *this; } 256 256 257 inline StaticallyInitializedIdentifier& virtualBase() 258 { this->identifier_->setVirtualBase(true); return *this; } 259 257 260 private: 258 261 Identifier* identifier_; -
code/branches/core7/src/libraries/core/class/Identifiable.cc
r9667 r10374 41 41 namespace orxonox 42 42 { 43 RegisterClassNoArgs(Identifiable) ;43 RegisterClassNoArgs(Identifiable).virtualBase(); 44 44 45 45 /** -
code/branches/core7/src/libraries/core/class/Identifier.cc
r10372 r10374 56 56 this->bInitialized_ = false; 57 57 this->bLoadable_ = false; 58 this->bIsVirtualBase_ = false; 58 59 59 60 this->bHasConfigValues_ = false; -
code/branches/core7/src/libraries/core/class/Identifier.h
r10373 r10374 138 138 /// Set the class to be loadable through XML or not. 139 139 inline void setLoadable(bool bLoadable) { this->bLoadable_ = bLoadable; } 140 141 /// Returns true if child classes should inherit virtually from this class. 142 inline bool isVirtualBase() const { return this->bIsVirtualBase_; } 143 /// Defines if child classes should inherit virtually from this class. 144 inline void setVirtualBase(bool bIsVirtualBase) { this->bIsVirtualBase_ = bIsVirtualBase; } 140 145 141 146 /// Returns true if the Identifier was completely initialized. … … 218 223 bool bInitialized_; //!< Is true if the Identifier was completely initialized 219 224 bool bLoadable_; //!< False = it's not permitted to load the object through XML 225 bool bIsVirtualBase_; //!< If true, it is recommended to inherit virtually from this class. This changes the order of initialization of child classes, thus this information is necessary to check the class hierarchy. 220 226 std::string name_; //!< The name of the class the Identifier belongs to 221 227 Factory* factory_; //!< The Factory, able to create new objects of the given class (if available) -
code/branches/core7/src/libraries/core/class/OrxonoxInterface.cc
r9667 r10374 32 32 namespace orxonox 33 33 { 34 RegisterClassNoArgs(OrxonoxInterface) ;34 RegisterClassNoArgs(OrxonoxInterface).virtualBase(); 35 35 36 36 OrxonoxInterface::OrxonoxInterface() -
code/branches/core7/src/libraries/core/config/Configurable.cc
r9667 r10374 32 32 namespace orxonox 33 33 { 34 RegisterClassNoArgs(Configurable) ;34 RegisterClassNoArgs(Configurable).virtualBase(); 35 35 36 36 Configurable::Configurable() -
code/branches/core7/src/libraries/core/object/Listable.cc
r9667 r10374 39 39 namespace orxonox 40 40 { 41 RegisterClass(Listable) ;41 RegisterClass(Listable).virtualBase(); 42 42 43 43 /**
Note: See TracChangeset
for help on using the changeset viewer.