Changeset 7547 for code/trunk/src/orxonox/interfaces/Pickupable.h
- Timestamp:
- Oct 16, 2010, 12:37:09 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/interfaces/Pickupable.h
r7504 r7547 51 51 An Interface (or more precisely an abstract class) to model and represent different (all kinds of) pickups. 52 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.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 54 55 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. … … 57 57 @author 58 58 Damian 'Mozork' Frick 59 60 @ingroup Pickup 59 61 */ 60 62 class _OrxonoxExport Pickupable : virtual public OrxonoxClass, public Rewardable … … 70 72 @return Returns true if the Pickupable is currently in use. 71 73 */ 72 inline bool isUsed(void) 74 inline bool isUsed(void) const 73 75 { return this->used_; } 74 76 /** … … 94 96 @return Returns true if the Pickupable is currently picked up, false if not. 95 97 */ 96 inline bool isPickedUp(void) 98 inline bool isPickedUp(void) const 97 99 { return this->pickedUp_; } 98 100 /** … … 106 108 @return Returns true if it can be used. 107 109 */ 108 inline bool isUsable(void) 110 inline bool isUsable(void) const 109 111 { return this->enabled_; } 110 112 … … 113 115 @return Returns true if it can be unused. 114 116 */ 115 inline bool isUnusable(void) 117 inline bool isUnusable(void) const 116 118 { return this->enabled_; } 117 119 … … 121 123 @return Returns true if the Pickupable is enabled. 122 124 */ 123 inline bool isEnabled(void) 125 inline bool isEnabled(void) const 124 126 { return this->enabled_; } 125 127 … … 127 129 bool drop(bool createSpawner = true); //!< Can be called to drop a Pickupable. 128 130 129 virtual bool isTarget( PickupCarrier* carrier) const; //!< Get whether the given PickupCarrier is a target of this Pickupable.131 virtual bool isTarget(const PickupCarrier* carrier) const; //!< Get whether the given PickupCarrier is a target of this Pickupable. 130 132 bool isTarget(const Identifier* identifier) const; //!< Get whether a given class, represented by the input Identifier, is a target of this Pickupable. 131 133 bool addTarget(PickupCarrier* target); //!< Add a PickupCarrier as target of this Pickupable. … … 139 141 @return Returns a pointer to the PickupIdentifier of this Pickupable. 140 142 */ 141 virtual const PickupIdentifier* getPickupIdentifier(void) 143 virtual const PickupIdentifier* getPickupIdentifier(void) const 142 144 { return this->pickupIdentifier_; } 143 145
Note: See TracChangeset
for help on using the changeset viewer.