Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8866 for code/trunk/src


Ignore:
Timestamp:
Aug 24, 2011, 3:28:55 PM (13 years ago)
Author:
dafrick
Message:

Moved clone base method into Pickupable to avoid ambiguity.

Location:
code/trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/OrxonoxClass.h

    r8858 r8866  
    115115            bool isDirectParentOf(const OrxonoxClass* object);
    116116
    117             virtual void clone(OrxonoxClass*& item) {}
    118 
    119117            /// Returns the number of @ref orxonox::SmartPtr "smart pointers" that point to this object.
    120118            inline unsigned int getReferenceCount() const
     
    197195    };
    198196
    199     SUPER_FUNCTION(11, OrxonoxClass, clone, false);
    200197}
    201198
  • code/trunk/src/libraries/core/Super.h

    r8863 r8866  
    566566        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
    567567
    568         SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(11, clone, true, OrxonoxClass* item)
     568        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(11, clone, true, OrxonoxClass*& item)
    569569            (item)
    570570        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
  • code/trunk/src/orxonox/interfaces/Pickupable.cc

    r8858 r8866  
    346346    /**
    347347    @brief
    348         Creates a duplicate of the input OrxonoxClass.
    349         This method needs to be implemented by any Class inheriting from Pickupable.
    350     @param item
    351         A reference to a pointer to the OrxonoxClass that is to be duplicated.
    352     */
    353     void Pickupable::clone(OrxonoxClass*& item)
    354     {
    355         SUPER(Pickupable, clone, item);
    356     }
    357 
    358     /**
    359     @brief
    360348        Method to transcribe a Pickupable as a Rewardable to the player.
    361349    @param player
  • code/trunk/src/orxonox/interfaces/Pickupable.h

    r7552 r8866  
    137137
    138138            Pickupable* clone(void); //!< Creates a duplicate of the Pickupable.
    139             virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
     139            /**
     140            @brief Creates a duplicate of the input OrxonoxClass.
     141                   This method needs to be implemented by any Class inheriting from Pickupable.
     142            @param item A reference to a pointer to the OrxonoxClass that is to be duplicated.
     143            */
     144            virtual void clone(OrxonoxClass*& item) {}
    140145
    141146            /**
     
    200205    SUPER_FUNCTION(12, Pickupable, changedCarrier, false);
    201206    SUPER_FUNCTION(13, Pickupable, changedPickedUp, false);
     207    SUPER_FUNCTION(11, Pickupable, clone, false);
    202208}
    203209
Note: See TracChangeset for help on using the changeset viewer.