Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 28, 2010, 5:31:59 PM (14 years ago)
Author:
dafrick
Message:

Some documenting and cleaning up/re-organization in pickups module.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/interfaces/Pickupable.h

    r7456 r7494  
    5050    @brief
    5151        An Interface (or more precisely an abstract class) to model and represent different (all kinds of) pickups.
     52
     53        Pickups (@ref orxonox:Pickupable "Pickupables") are objects that (quite unsurprisingly) can be picked up. Additionally they can be used and unused (transition from used to not used), and also dropped.
     54
     55        A class of Pickups can incorporate many different types of pickups (see @ref orxonox::PickupIdentifier "PickupIdentifier"), each type is uniquely defined by a @ref orxonox::PickupIdentifier "PickupIdentifier". Each pickup has such an identifier identiying its type. This means that two pickups of the same type have identifiers which are equal.
     56
    5257    @author
    5358        Damian 'Mozork' Frick
     
    6368
    6469            /**
    65             @brief Get whether the pickup is currently in use or not.
    66             @return Returns true if the pickup is currently in use.
     70            @brief Get whether the Pickupable is currently in use or not.
     71            @return Returns true if the Pickupable is currently in use.
    6772            */
    6873            inline bool isUsed(void) { return this->used_; }  // tolua_export
    6974            /**
    70             @brief  Should be called when the pickup has transited from used to unused or the other way around.
     75            @brief  Should be called when the Pickupable has transited from used to unused or the other way around.
    7176                    Any Class overwriting this method must call its SUPER function by adding SUPER(Classname, changedUsed); to their changdeUsed method.
    7277            */
     
    7479
    7580            /**
    76             @brief Get the carrier of the pickup.
    77             @return Returns a pointer to the carrier of the pickup.
     81            @brief Get the carrier of the Pickupable.
     82            @return Returns a pointer to the carrier of the Pickupable.
    7883            */
    7984            inline PickupCarrier* getCarrier(void)
    8085                { return this->carrier_; }
    8186            /**
    82             @brief Should be called when the pickup has changed its PickupCarrier.
     87            @brief Should be called when the Pickupable has changed its PickupCarrier.
    8388                   Any Class overwriting this method must call its SUPER function by adding SUPER(Classname, changedCarrier); to their changedCarrier method.
    8489            */
     
    9196            inline bool isPickedUp(void) { return this->pickedUp_; }  // tolua_export
    9297            /**
    93             @brief  Should be called when the pickup has transited from picked up to dropped or the other way around.
     98            @brief  Should be called when the Pickupable has transited from picked up to dropped or the other way around.
    9499                    Any Class overwriting this method must call its SUPER function by adding SUPER(Classname, changedPickedUp); to their changedPickedUp method.
    95100            */
     
    119124            bool drop(bool createSpawner = true); //!< Can be called to drop a Pickupable.
    120125
    121             virtual bool isTarget(PickupCarrier* carrier) const; //!< Get whether the given PickupCarrier is a target of this pickup.
     126            virtual bool isTarget(PickupCarrier* carrier) const; //!< Get whether the given PickupCarrier is a target of this Pickupable.
    122127            bool isTarget(const Identifier* identifier) const; //!< Get whether a given class, represented by the input Identifier, is a target of this Pickupable.
    123             bool addTarget(PickupCarrier* target); //!< Add a PickupCarrier as target of this pickup.
    124             bool addTarget(Identifier* identifier); //!< Add a class, representetd by the input Identifier, as target of this pickup.
     128            bool addTarget(PickupCarrier* target); //!< Add a PickupCarrier as target of this Pickupable.
     129            bool addTarget(Identifier* identifier); //!< Add a class, representetd by the input Identifier, as target of this Pickupable.
    125130
    126131            Pickupable* clone(void); //!< Creates a duplicate of the Pickupable.
     
    137142            bool setPickedUp(bool pickedUp); //!< Helper method to set the Pickupable to either picked up or not picked up.
    138143            //TODO: private?
    139             bool setCarrier(PickupCarrier* carrier, bool tell = true); //!< Sets the carrier of the pickup.
     144            bool setCarrier(PickupCarrier* carrier, bool tell = true); //!< Sets the carrier of the Pickupable.
    140145
    141146            //TODO: private?
    142147            virtual void carrierDestroyed(void); //!< Is called by the PickupCarrier when it is being destroyed.
    143148
    144             void destroy(void); //!< Is called internally within the pickup module to destroy pickups.
     149            void destroy(void); //!< Is called internally within the Pickupable module to destroy pickups.
    145150
    146151        protected:
     
    187192    };  // tolua_export
    188193
     194    //! SUPER functions.
    189195    SUPER_FUNCTION(10, Pickupable, changedUsed, false);
    190196    SUPER_FUNCTION(12, Pickupable, changedCarrier, false);
Note: See TracChangeset for help on using the changeset viewer.