[Orxonox-commit 5702] r10362 - in code/branches/core7/src: libraries/core libraries/network libraries/network/synchronisable libraries/tools/interfaces modules/docking modules/objects/collisionshapes modules/pickup modules/questsystem modules/questsystem/effects orxonox/chat orxonox/collisionshapes orxonox/gamestates orxonox/infos orxonox/interfaces orxonox/sound orxonox/weaponsystem orxonox/worldentities

landauf at orxonox.net landauf at orxonox.net
Sun Apr 12 23:07:14 CEST 2015


Author: landauf
Date: 2015-04-12 23:07:14 +0200 (Sun, 12 Apr 2015)
New Revision: 10362

Modified:
   code/branches/core7/src/libraries/core/Core.cc
   code/branches/core7/src/libraries/core/CoreIncludes.h
   code/branches/core7/src/libraries/core/ViewportEventListener.cc
   code/branches/core7/src/libraries/core/WindowEventListener.cc
   code/branches/core7/src/libraries/core/XMLNameListener.cc
   code/branches/core7/src/libraries/network/ClientConnectionListener.cc
   code/branches/core7/src/libraries/network/NetworkFunction.cc
   code/branches/core7/src/libraries/network/synchronisable/Synchronisable.cc
   code/branches/core7/src/libraries/tools/interfaces/ToolsInterfaceCompilation.cc
   code/branches/core7/src/modules/docking/DockingAnimation.cc
   code/branches/core7/src/modules/docking/DockingEffect.cc
   code/branches/core7/src/modules/objects/collisionshapes/AbstractRadiusHeightCollisionShape.cc
   code/branches/core7/src/modules/pickup/CollectiblePickup.cc
   code/branches/core7/src/modules/questsystem/Quest.cc
   code/branches/core7/src/modules/questsystem/QuestEffect.cc
   code/branches/core7/src/modules/questsystem/effects/ChangeQuestStatus.cc
   code/branches/core7/src/orxonox/chat/ChatManager.cc
   code/branches/core7/src/orxonox/collisionshapes/CollisionShape.cc
   code/branches/core7/src/orxonox/gamestates/GSLevel.cc
   code/branches/core7/src/orxonox/infos/PlayerInfo.cc
   code/branches/core7/src/orxonox/interfaces/InterfaceCompilation.cc
   code/branches/core7/src/orxonox/interfaces/PickupCarrier.cc
   code/branches/core7/src/orxonox/interfaces/Pickupable.cc
   code/branches/core7/src/orxonox/interfaces/RadarViewable.cc
   code/branches/core7/src/orxonox/sound/BaseSound.cc
   code/branches/core7/src/orxonox/weaponsystem/WeaponMode.cc
   code/branches/core7/src/orxonox/worldentities/WorldEntity.cc
Log:
use static identifier initializer to store the inheritance definition of abstract classes. this prevents that identifiers are used (via Class(Name)) before they are properly initialized.

Modified: code/branches/core7/src/libraries/core/Core.cc
===================================================================
--- code/branches/core7/src/libraries/core/Core.cc	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/libraries/core/Core.cc	2015-04-12 21:07:14 UTC (rev 10362)
@@ -93,7 +93,7 @@
 #endif
 
     // register Core as an abstract class to avoid problems if the class hierarchy is created within Core-constructor
-    RegisterAbstractClass(Core).inheritsFrom(Class(Configurable));
+    RegisterAbstractClass(Core).inheritsFrom<Configurable>();
 
     Core::Core(const std::string& cmdLine)
         : pathConfig_(NULL)
@@ -516,7 +516,7 @@
     }
 
 
-    RegisterAbstractClass(DevModeListener).inheritsFrom(Class(Listable));
+    RegisterAbstractClass(DevModeListener).inheritsFrom<Listable>();
 
     DevModeListener::DevModeListener()
     {

Modified: code/branches/core7/src/libraries/core/CoreIncludes.h
===================================================================
--- code/branches/core7/src/libraries/core/CoreIncludes.h	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/libraries/core/CoreIncludes.h	2015-04-12 21:07:14 UTC (rev 10362)
@@ -126,7 +126,7 @@
     @param ClassName The name of the class
 */
 #define RegisterClassWithFactory(ClassName, FactoryInstance, bLoadable) \
-    Identifier& _##ClassName##Identifier = (new orxonox::SI_I(orxonox::registerClass<ClassName>(#ClassName, FactoryInstance, bLoadable)))->getIdentifier()
+    orxonox::SI_I& _##ClassName##Identifier = (*new orxonox::SI_I(orxonox::registerClass<ClassName>(#ClassName, FactoryInstance, bLoadable)))
 
 /**
     @brief Registers a newly created object in the framework. Has to be called at the beginning of the constructor of @a ClassName.
@@ -212,18 +212,51 @@
         return ClassIdentifier<T>::getIdentifier();
     }
 
+
+
+
+    /**
+     * The static initializer stores the parent classes of this identifier. The corresponding identifiers are later loaded. This prevents identifiers from
+     * being used before they are completely initialized.
+     */
     class _CoreExport StaticallyInitializedIdentifier : public StaticallyInitializedInstance
     {
+        struct InheritsFrom
+        {
+            virtual ~InheritsFrom() {}
+            virtual Identifier* getParent() = 0;
+        };
+
+        template <class T>
+        struct InheritsFromClass : public InheritsFrom
+        {
+            virtual Identifier* getParent() { return Class(T); }
+        };
+
         public:
             StaticallyInitializedIdentifier(Identifier* identifier) : identifier_(identifier) {}
+            ~StaticallyInitializedIdentifier()
+            {
+                for (size_t i = 0; i < this->parents_.size(); ++i)
+                    delete parents_[i];
+            }
 
-            virtual void load() {}
+            virtual void load()
+            {
+                for (size_t i = 0; i < this->parents_.size(); ++i)
+                    this->identifier_->inheritsFrom(this->parents_[i]->getParent());
+            }
 
             inline Identifier& getIdentifier()
                 { return *this->identifier_; }
 
+            template <class T>
+            inline StaticallyInitializedIdentifier& inheritsFrom()
+                { this->parents_.push_back(new InheritsFromClass<T>()); return *this; }
+
         private:
             Identifier* identifier_;
+            std::vector<InheritsFrom*> parents_;
     };
 
     typedef StaticallyInitializedIdentifier SI_I;

Modified: code/branches/core7/src/libraries/core/ViewportEventListener.cc
===================================================================
--- code/branches/core7/src/libraries/core/ViewportEventListener.cc	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/libraries/core/ViewportEventListener.cc	2015-04-12 21:07:14 UTC (rev 10362)
@@ -31,7 +31,7 @@
 
 namespace orxonox
 {
-    RegisterAbstractClass(ViewportEventListener).inheritsFrom(Class(Listable));
+    RegisterAbstractClass(ViewportEventListener).inheritsFrom<Listable>();
 
     ViewportEventListener::ViewportEventListener()
     {

Modified: code/branches/core7/src/libraries/core/WindowEventListener.cc
===================================================================
--- code/branches/core7/src/libraries/core/WindowEventListener.cc	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/libraries/core/WindowEventListener.cc	2015-04-12 21:07:14 UTC (rev 10362)
@@ -34,7 +34,7 @@
     unsigned int WindowEventListener::windowWidth_s  = 0;
     unsigned int WindowEventListener::windowHeight_s = 0;
 
-    RegisterAbstractClass(WindowEventListener).inheritsFrom(Class(Listable));
+    RegisterAbstractClass(WindowEventListener).inheritsFrom<Listable>();
 
     WindowEventListener::WindowEventListener()
     {

Modified: code/branches/core7/src/libraries/core/XMLNameListener.cc
===================================================================
--- code/branches/core7/src/libraries/core/XMLNameListener.cc	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/libraries/core/XMLNameListener.cc	2015-04-12 21:07:14 UTC (rev 10362)
@@ -31,7 +31,7 @@
 
 namespace orxonox
 {
-    RegisterAbstractClass(XMLNameListener).inheritsFrom(Class(Listable));
+    RegisterAbstractClass(XMLNameListener).inheritsFrom<Listable>();
 
     XMLNameListener::XMLNameListener()
     {

Modified: code/branches/core7/src/libraries/network/ClientConnectionListener.cc
===================================================================
--- code/branches/core7/src/libraries/network/ClientConnectionListener.cc	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/libraries/network/ClientConnectionListener.cc	2015-04-12 21:07:14 UTC (rev 10362)
@@ -34,7 +34,7 @@
 
 namespace orxonox
 {
-    RegisterAbstractClass(ClientConnectionListener).inheritsFrom(Class(Listable));
+    RegisterAbstractClass(ClientConnectionListener).inheritsFrom<Listable>();
 
     ClientConnectionListener::ClientConnectionListener()
     {

Modified: code/branches/core7/src/libraries/network/NetworkFunction.cc
===================================================================
--- code/branches/core7/src/libraries/network/NetworkFunction.cc	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/libraries/network/NetworkFunction.cc	2015-04-12 21:07:14 UTC (rev 10362)
@@ -37,9 +37,9 @@
   std::map<uint32_t, NetworkMemberFunctionBase*> NetworkMemberFunctionBase::idMap_;
 
   // no suitable factory for NetworkFunctionBase (and children), so we declare it abstract
-  RegisterAbstractClass(NetworkFunctionBase).inheritsFrom(Class(Listable));
-  RegisterAbstractClass(NetworkFunctionStatic).inheritsFrom(Class(NetworkFunctionBase));
-  RegisterAbstractClass(NetworkMemberFunctionBase).inheritsFrom(Class(NetworkFunctionBase));
+  RegisterAbstractClass(NetworkFunctionBase).inheritsFrom<Listable>();
+  RegisterAbstractClass(NetworkFunctionStatic).inheritsFrom<NetworkFunctionBase>();
+  RegisterAbstractClass(NetworkMemberFunctionBase).inheritsFrom<NetworkFunctionBase>();
 
   NetworkFunctionBase::NetworkFunctionBase(const std::string& name)
   {

Modified: code/branches/core7/src/libraries/network/synchronisable/Synchronisable.cc
===================================================================
--- code/branches/core7/src/libraries/network/synchronisable/Synchronisable.cc	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/libraries/network/synchronisable/Synchronisable.cc	2015-04-12 21:07:14 UTC (rev 10362)
@@ -44,7 +44,7 @@
 
   uint8_t Synchronisable::state_=0x1; // detemines wheter we are server (default) or client
 
-  RegisterAbstractClass(Synchronisable).inheritsFrom(Class(OrxonoxInterface));
+  RegisterAbstractClass(Synchronisable).inheritsFrom<OrxonoxInterface>();
 
   /**
   * Constructor:

Modified: code/branches/core7/src/libraries/tools/interfaces/ToolsInterfaceCompilation.cc
===================================================================
--- code/branches/core7/src/libraries/tools/interfaces/ToolsInterfaceCompilation.cc	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/libraries/tools/interfaces/ToolsInterfaceCompilation.cc	2015-04-12 21:07:14 UTC (rev 10362)
@@ -45,7 +45,7 @@
     //----------------------------
     float TimeFactorListener::timefactor_s = 1.0f;
 
-    RegisterAbstractClass(TimeFactorListener).inheritsFrom(Class(Listable));
+    RegisterAbstractClass(TimeFactorListener).inheritsFrom<Listable>();
 
     TimeFactorListener::TimeFactorListener()
     {
@@ -66,7 +66,7 @@
     //----------------------------
     // Tickable
     //----------------------------
-    RegisterAbstractClass(Tickable).inheritsFrom(Class(OrxonoxInterface));
+    RegisterAbstractClass(Tickable).inheritsFrom<OrxonoxInterface>();
 
     /**
         @brief Constructor: Registers the object in the Tickable-list

Modified: code/branches/core7/src/modules/docking/DockingAnimation.cc
===================================================================
--- code/branches/core7/src/modules/docking/DockingAnimation.cc	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/modules/docking/DockingAnimation.cc	2015-04-12 21:07:14 UTC (rev 10362)
@@ -38,7 +38,7 @@
 
 namespace orxonox
 {
-    RegisterAbstractClass(DockingAnimation).inheritsFrom(Class(BaseObject));
+    RegisterAbstractClass(DockingAnimation).inheritsFrom<BaseObject>();
 
     DockingAnimation::DockingAnimation(Context* context) : BaseObject(context)
     {

Modified: code/branches/core7/src/modules/docking/DockingEffect.cc
===================================================================
--- code/branches/core7/src/modules/docking/DockingEffect.cc	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/modules/docking/DockingEffect.cc	2015-04-12 21:07:14 UTC (rev 10362)
@@ -36,7 +36,7 @@
 
 namespace orxonox
 {
-    RegisterAbstractClass(DockingEffect).inheritsFrom(Class(BaseObject));
+    RegisterAbstractClass(DockingEffect).inheritsFrom<BaseObject>();
 
     DockingEffect::DockingEffect(Context* context) : BaseObject(context)
     {

Modified: code/branches/core7/src/modules/objects/collisionshapes/AbstractRadiusHeightCollisionShape.cc
===================================================================
--- code/branches/core7/src/modules/objects/collisionshapes/AbstractRadiusHeightCollisionShape.cc	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/modules/objects/collisionshapes/AbstractRadiusHeightCollisionShape.cc	2015-04-12 21:07:14 UTC (rev 10362)
@@ -39,7 +39,7 @@
 
 namespace orxonox
 {
-    RegisterAbstractClass(AbstractRadiusHeightCollisionShape).inheritsFrom(Class(CollisionShape));
+    RegisterAbstractClass(AbstractRadiusHeightCollisionShape).inheritsFrom<CollisionShape>();
 
     /**
     @brief

Modified: code/branches/core7/src/modules/pickup/CollectiblePickup.cc
===================================================================
--- code/branches/core7/src/modules/pickup/CollectiblePickup.cc	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/modules/pickup/CollectiblePickup.cc	2015-04-12 21:07:14 UTC (rev 10362)
@@ -39,7 +39,7 @@
 
 namespace orxonox
 {
-    RegisterAbstractClass(CollectiblePickup).inheritsFrom(Class(Pickupable));
+    RegisterAbstractClass(CollectiblePickup).inheritsFrom<Pickupable>();
 
     /**
     @brief

Modified: code/branches/core7/src/modules/questsystem/Quest.cc
===================================================================
--- code/branches/core7/src/modules/questsystem/Quest.cc	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/modules/questsystem/Quest.cc	2015-04-12 21:07:14 UTC (rev 10362)
@@ -44,7 +44,7 @@
 
 namespace orxonox
 {
-    RegisterAbstractClass(Quest).inheritsFrom(Class(QuestItem));
+    RegisterAbstractClass(Quest).inheritsFrom<QuestItem>();
 
     /**
     @brief

Modified: code/branches/core7/src/modules/questsystem/QuestEffect.cc
===================================================================
--- code/branches/core7/src/modules/questsystem/QuestEffect.cc	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/modules/questsystem/QuestEffect.cc	2015-04-12 21:07:14 UTC (rev 10362)
@@ -36,7 +36,7 @@
 
 namespace orxonox
 {
-    RegisterAbstractClass(QuestEffect).inheritsFrom(Class(BaseObject));
+    RegisterAbstractClass(QuestEffect).inheritsFrom<BaseObject>();
 
     /**
     @brief

Modified: code/branches/core7/src/modules/questsystem/effects/ChangeQuestStatus.cc
===================================================================
--- code/branches/core7/src/modules/questsystem/effects/ChangeQuestStatus.cc	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/modules/questsystem/effects/ChangeQuestStatus.cc	2015-04-12 21:07:14 UTC (rev 10362)
@@ -41,7 +41,7 @@
 
 namespace orxonox
 {
-    RegisterAbstractClass(ChangeQuestStatus).inheritsFrom(Class(QuestEffect));
+    RegisterAbstractClass(ChangeQuestStatus).inheritsFrom<QuestEffect>();
 
     /**
     @brief

Modified: code/branches/core7/src/orxonox/chat/ChatManager.cc
===================================================================
--- code/branches/core7/src/orxonox/chat/ChatManager.cc	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/orxonox/chat/ChatManager.cc	2015-04-12 21:07:14 UTC (rev 10362)
@@ -112,7 +112,7 @@
     //////////////////////////////////////////////////////////////////////////
     // ChatListener                                                         //
     //////////////////////////////////////////////////////////////////////////
-    RegisterAbstractClass(ChatListener).inheritsFrom(Class(Listable));
+    RegisterAbstractClass(ChatListener).inheritsFrom<Listable>();
 
     ChatListener::ChatListener()
     {

Modified: code/branches/core7/src/orxonox/collisionshapes/CollisionShape.cc
===================================================================
--- code/branches/core7/src/orxonox/collisionshapes/CollisionShape.cc	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/orxonox/collisionshapes/CollisionShape.cc	2015-04-12 21:07:14 UTC (rev 10362)
@@ -43,7 +43,7 @@
 
 namespace orxonox
 {
-    RegisterAbstractClass(CollisionShape).inheritsFrom(Class(BaseObject)).inheritsFrom(Class(Synchronisable));
+    RegisterAbstractClass(CollisionShape).inheritsFrom<BaseObject>().inheritsFrom<Synchronisable>();
 
     /**
     @brief

Modified: code/branches/core7/src/orxonox/gamestates/GSLevel.cc
===================================================================
--- code/branches/core7/src/orxonox/gamestates/GSLevel.cc	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/orxonox/gamestates/GSLevel.cc	2015-04-12 21:07:14 UTC (rev 10362)
@@ -251,7 +251,7 @@
 
     ///////////////////////////////////////////////////////////////////////////
 
-    RegisterAbstractClass(GSLevelMemento).inheritsFrom(Class(OrxonoxInterface));
+    RegisterAbstractClass(GSLevelMemento).inheritsFrom<OrxonoxInterface>();
 
     GSLevelMemento::GSLevelMemento()
     {

Modified: code/branches/core7/src/orxonox/infos/PlayerInfo.cc
===================================================================
--- code/branches/core7/src/orxonox/infos/PlayerInfo.cc	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/orxonox/infos/PlayerInfo.cc	2015-04-12 21:07:14 UTC (rev 10362)
@@ -39,7 +39,7 @@
 
 namespace orxonox
 {
-    RegisterAbstractClass(PlayerInfo).inheritsFrom(Class(Info));
+    RegisterAbstractClass(PlayerInfo).inheritsFrom<Info>();
 
     PlayerInfo::PlayerInfo(Context* context) : Info(context)
     {

Modified: code/branches/core7/src/orxonox/interfaces/InterfaceCompilation.cc
===================================================================
--- code/branches/core7/src/orxonox/interfaces/InterfaceCompilation.cc	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/orxonox/interfaces/InterfaceCompilation.cc	2015-04-12 21:07:14 UTC (rev 10362)
@@ -49,7 +49,7 @@
     //----------------------------
     // GametypeMessageListener
     //----------------------------
-    RegisterAbstractClass(GametypeMessageListener).inheritsFrom(Class(OrxonoxInterface));
+    RegisterAbstractClass(GametypeMessageListener).inheritsFrom<OrxonoxInterface>();
 
     GametypeMessageListener::GametypeMessageListener()
     {
@@ -59,7 +59,7 @@
     //----------------------------
     // PlayerTrigger
     //----------------------------
-    RegisterAbstractClass(PlayerTrigger).inheritsFrom(Class(OrxonoxInterface));
+    RegisterAbstractClass(PlayerTrigger).inheritsFrom<OrxonoxInterface>();
 
     PlayerTrigger::PlayerTrigger()
     {
@@ -79,7 +79,7 @@
     //----------------------------
     // RadarListener
     //----------------------------
-    RegisterAbstractClass(RadarListener).inheritsFrom(Class(OrxonoxInterface));
+    RegisterAbstractClass(RadarListener).inheritsFrom<OrxonoxInterface>();
 
     RadarListener::RadarListener()
     {
@@ -89,7 +89,7 @@
     //----------------------------
     // TeamColourable
     //----------------------------
-    RegisterAbstractClass(TeamColourable).inheritsFrom(Class(OrxonoxInterface));
+    RegisterAbstractClass(TeamColourable).inheritsFrom<OrxonoxInterface>();
 
     TeamColourable::TeamColourable()
     {
@@ -99,7 +99,7 @@
     //----------------------------
     // Rewardable
     //----------------------------
-    RegisterAbstractClass(Rewardable).inheritsFrom(Class(OrxonoxInterface));
+    RegisterAbstractClass(Rewardable).inheritsFrom<OrxonoxInterface>();
 
     Rewardable::Rewardable()
     {

Modified: code/branches/core7/src/orxonox/interfaces/PickupCarrier.cc
===================================================================
--- code/branches/core7/src/orxonox/interfaces/PickupCarrier.cc	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/orxonox/interfaces/PickupCarrier.cc	2015-04-12 21:07:14 UTC (rev 10362)
@@ -40,7 +40,7 @@
 
 namespace orxonox
 {
-    RegisterAbstractClass(PickupCarrier).inheritsFrom(Class(OrxonoxInterface));
+    RegisterAbstractClass(PickupCarrier).inheritsFrom<OrxonoxInterface>();
 
     /**
     @brief

Modified: code/branches/core7/src/orxonox/interfaces/Pickupable.cc
===================================================================
--- code/branches/core7/src/orxonox/interfaces/Pickupable.cc	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/orxonox/interfaces/Pickupable.cc	2015-04-12 21:07:14 UTC (rev 10362)
@@ -45,7 +45,7 @@
 
 namespace orxonox
 {
-    RegisterAbstractClass(Pickupable).inheritsFrom(Class(OrxonoxInterface)).inheritsFrom(Class(Rewardable));
+    RegisterAbstractClass(Pickupable).inheritsFrom<OrxonoxInterface>().inheritsFrom<Rewardable>();
 
     /**
     @brief

Modified: code/branches/core7/src/orxonox/interfaces/RadarViewable.cc
===================================================================
--- code/branches/core7/src/orxonox/interfaces/RadarViewable.cc	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/orxonox/interfaces/RadarViewable.cc	2015-04-12 21:07:14 UTC (rev 10362)
@@ -37,7 +37,7 @@
 
 namespace orxonox
 {
-    RegisterAbstractClass(RadarViewable).inheritsFrom(Class(OrxonoxInterface));
+    RegisterAbstractClass(RadarViewable).inheritsFrom<OrxonoxInterface>();
 
     /**
         @brief Constructor.

Modified: code/branches/core7/src/orxonox/sound/BaseSound.cc
===================================================================
--- code/branches/core7/src/orxonox/sound/BaseSound.cc	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/orxonox/sound/BaseSound.cc	2015-04-12 21:07:14 UTC (rev 10362)
@@ -42,7 +42,7 @@
 
 namespace orxonox
 {
-    RegisterAbstractClass(BaseSound).inheritsFrom(Class(Listable));
+    RegisterAbstractClass(BaseSound).inheritsFrom<Listable>();
 
     BaseSound::BaseSound()
         : bPooling_(false)

Modified: code/branches/core7/src/orxonox/weaponsystem/WeaponMode.cc
===================================================================
--- code/branches/core7/src/orxonox/weaponsystem/WeaponMode.cc	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/orxonox/weaponsystem/WeaponMode.cc	2015-04-12 21:07:14 UTC (rev 10362)
@@ -44,7 +44,7 @@
 
 namespace orxonox
 {
-    RegisterAbstractClass(WeaponMode).inheritsFrom(Class(BaseObject));
+    RegisterAbstractClass(WeaponMode).inheritsFrom<BaseObject>();
 
     WeaponMode::WeaponMode(Context* context) : BaseObject(context)
     {

Modified: code/branches/core7/src/orxonox/worldentities/WorldEntity.cc
===================================================================
--- code/branches/core7/src/orxonox/worldentities/WorldEntity.cc	2015-04-12 21:05:10 UTC (rev 10361)
+++ code/branches/core7/src/orxonox/worldentities/WorldEntity.cc	2015-04-12 21:07:14 UTC (rev 10362)
@@ -60,7 +60,7 @@
     BOOST_STATIC_ASSERT((int)Ogre::Node::TS_PARENT == (int)WorldEntity::Parent);
     BOOST_STATIC_ASSERT((int)Ogre::Node::TS_WORLD  == (int)WorldEntity::World);
 
-    RegisterAbstractClass(WorldEntity).inheritsFrom(Class(BaseObject)).inheritsFrom(Class(Synchronisable));
+    RegisterAbstractClass(WorldEntity).inheritsFrom<BaseObject>().inheritsFrom<Synchronisable>();
 
     /**
     @brief




More information about the Orxonox-commit mailing list