[Orxonox-commit 4195] r8866 - in code/trunk/src: libraries/core orxonox/interfaces

dafrick at orxonox.net dafrick at orxonox.net
Wed Aug 24 15:28:55 CEST 2011


Author: dafrick
Date: 2011-08-24 15:28:55 +0200 (Wed, 24 Aug 2011)
New Revision: 8866

Modified:
   code/trunk/src/libraries/core/OrxonoxClass.h
   code/trunk/src/libraries/core/Super.h
   code/trunk/src/orxonox/interfaces/Pickupable.cc
   code/trunk/src/orxonox/interfaces/Pickupable.h
Log:
Moved clone base method into Pickupable to avoid ambiguity.


Modified: code/trunk/src/libraries/core/OrxonoxClass.h
===================================================================
--- code/trunk/src/libraries/core/OrxonoxClass.h	2011-08-24 12:58:24 UTC (rev 8865)
+++ code/trunk/src/libraries/core/OrxonoxClass.h	2011-08-24 13:28:55 UTC (rev 8866)
@@ -114,8 +114,6 @@
             bool isParentOf(const OrxonoxClass* object);
             bool isDirectParentOf(const OrxonoxClass* object);
 
-            virtual void clone(OrxonoxClass*& item) {}
-
             /// Returns the number of @ref orxonox::SmartPtr "smart pointers" that point to this object.
             inline unsigned int getReferenceCount() const
                 { return this->referenceCount_; }
@@ -196,7 +194,6 @@
             virtual void objectDeleted() = 0;
     };
 
-    SUPER_FUNCTION(11, OrxonoxClass, clone, false);
 }
 
 #endif /* _OrxonoxClass_H__ */

Modified: code/trunk/src/libraries/core/Super.h
===================================================================
--- code/trunk/src/libraries/core/Super.h	2011-08-24 12:58:24 UTC (rev 8865)
+++ code/trunk/src/libraries/core/Super.h	2011-08-24 13:28:55 UTC (rev 8866)
@@ -565,7 +565,7 @@
             ()
         SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
 
-        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(11, clone, true, OrxonoxClass* item)
+        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(11, clone, true, OrxonoxClass*& item)
             (item)
         SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
 

Modified: code/trunk/src/orxonox/interfaces/Pickupable.cc
===================================================================
--- code/trunk/src/orxonox/interfaces/Pickupable.cc	2011-08-24 12:58:24 UTC (rev 8865)
+++ code/trunk/src/orxonox/interfaces/Pickupable.cc	2011-08-24 13:28:55 UTC (rev 8866)
@@ -345,18 +345,6 @@
 
     /**
     @brief
-        Creates a duplicate of the input OrxonoxClass.
-        This method needs to be implemented by any Class inheriting from Pickupable.
-    @param item
-        A reference to a pointer to the OrxonoxClass that is to be duplicated.
-    */
-    void Pickupable::clone(OrxonoxClass*& item)
-    {
-        SUPER(Pickupable, clone, item);
-    }
-
-    /**
-    @brief
         Method to transcribe a Pickupable as a Rewardable to the player.
     @param player
         A pointer to the PlayerInfo, do whatever you want with it.

Modified: code/trunk/src/orxonox/interfaces/Pickupable.h
===================================================================
--- code/trunk/src/orxonox/interfaces/Pickupable.h	2011-08-24 12:58:24 UTC (rev 8865)
+++ code/trunk/src/orxonox/interfaces/Pickupable.h	2011-08-24 13:28:55 UTC (rev 8866)
@@ -136,7 +136,12 @@
             bool addTarget(Identifier* identifier); //!< Add a class, representetd by the input Identifier, as target of this Pickupable.
 
             Pickupable* clone(void); //!< Creates a duplicate of the Pickupable.
-            virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
+            /**
+            @brief Creates a duplicate of the input OrxonoxClass.
+                   This method needs to be implemented by any Class inheriting from Pickupable.
+            @param item A reference to a pointer to the OrxonoxClass that is to be duplicated.
+            */
+            virtual void clone(OrxonoxClass*& item) {}
 
             /**
             @brief Get the PickupIdentifier of this Pickupable.
@@ -199,6 +204,7 @@
     SUPER_FUNCTION(10, Pickupable, changedUsed, false);
     SUPER_FUNCTION(12, Pickupable, changedCarrier, false);
     SUPER_FUNCTION(13, Pickupable, changedPickedUp, false);
+    SUPER_FUNCTION(11, Pickupable, clone, false);
 }
 
 #endif /* _Pickupable_H__ */




More information about the Orxonox-commit mailing list