Changeset 7494 for code/trunk/src/orxonox/interfaces/Pickupable.h
- Timestamp:
- Sep 28, 2010, 5:31:59 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/interfaces/Pickupable.h
r7456 r7494 50 50 @brief 51 51 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 52 57 @author 53 58 Damian 'Mozork' Frick … … 63 68 64 69 /** 65 @brief Get whether the pickupis currently in use or not.66 @return Returns true if the pickupis 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. 67 72 */ 68 73 inline bool isUsed(void) { return this->used_; } // tolua_export 69 74 /** 70 @brief Should be called when the pickuphas 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. 71 76 Any Class overwriting this method must call its SUPER function by adding SUPER(Classname, changedUsed); to their changdeUsed method. 72 77 */ … … 74 79 75 80 /** 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. 78 83 */ 79 84 inline PickupCarrier* getCarrier(void) 80 85 { return this->carrier_; } 81 86 /** 82 @brief Should be called when the pickuphas changed its PickupCarrier.87 @brief Should be called when the Pickupable has changed its PickupCarrier. 83 88 Any Class overwriting this method must call its SUPER function by adding SUPER(Classname, changedCarrier); to their changedCarrier method. 84 89 */ … … 91 96 inline bool isPickedUp(void) { return this->pickedUp_; } // tolua_export 92 97 /** 93 @brief Should be called when the pickuphas 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. 94 99 Any Class overwriting this method must call its SUPER function by adding SUPER(Classname, changedPickedUp); to their changedPickedUp method. 95 100 */ … … 119 124 bool drop(bool createSpawner = true); //!< Can be called to drop a Pickupable. 120 125 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. 122 127 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. 125 130 126 131 Pickupable* clone(void); //!< Creates a duplicate of the Pickupable. … … 137 142 bool setPickedUp(bool pickedUp); //!< Helper method to set the Pickupable to either picked up or not picked up. 138 143 //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. 140 145 141 146 //TODO: private? 142 147 virtual void carrierDestroyed(void); //!< Is called by the PickupCarrier when it is being destroyed. 143 148 144 void destroy(void); //!< Is called internally within the pickupmodule to destroy pickups.149 void destroy(void); //!< Is called internally within the Pickupable module to destroy pickups. 145 150 146 151 protected: … … 187 192 }; // tolua_export 188 193 194 //! SUPER functions. 189 195 SUPER_FUNCTION(10, Pickupable, changedUsed, false); 190 196 SUPER_FUNCTION(12, Pickupable, changedCarrier, false);
Note: See TracChangeset
for help on using the changeset viewer.