Changeset 6497 for code/branches/pickup3/src
- Timestamp:
- Mar 8, 2010, 9:17:22 PM (15 years ago)
- Location:
- code/branches/pickup3/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup3/src/libraries/core/OrxonoxClass.h
r6466 r6497 109 109 bool isDirectParentOf(const OrxonoxClass* object); 110 110 111 virtual void clone(OrxonoxClass* item) {}111 virtual void clone(OrxonoxClass*& item) {} 112 112 113 113 inline unsigned int getReferenceCount() const -
code/branches/pickup3/src/modules/pickup/Pickup.cc
r6480 r6497 188 188 SUPER(Pickup, changedCarrier); 189 189 190 COUT(1) << "Changed Carrier: " << this->isPickedUp() << this->isImmediate() << std::endl; 190 191 //! Sets the Pickup to used if the Pickup has activation type 'immediate' and gets picked up. 191 192 if(this->getCarrier() != NULL && this->isPickedUp() && this->isImmediate()) … … 201 202 Returns the clone of this pickup as a pointer to a Pickupable. 202 203 */ 203 void Pickup::clone(OrxonoxClass* item)204 void Pickup::clone(OrxonoxClass*& item) 204 205 { 205 206 if(item == NULL) -
code/branches/pickup3/src/modules/pickup/Pickup.h
r6475 r6497 119 119 virtual void changedCarrier(void); //!< Should be called when the pickup has transited from picked up to dropped or the other way around. 120 120 121 virtual void clone(OrxonoxClass* item); //!< Creates a duplicate of the Pickup.121 virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the Pickup. 122 122 123 123 protected: -
code/branches/pickup3/src/modules/pickup/PickupCollection.cc
r6480 r6497 161 161 162 162 //TODO: Steal description from Pickupable. 163 void PickupCollection::clone(OrxonoxClass* item)163 void PickupCollection::clone(OrxonoxClass*& item) 164 164 { 165 165 if(item == NULL) -
code/branches/pickup3/src/modules/pickup/PickupCollection.h
r6475 r6497 62 62 virtual void changedCarrier(void); 63 63 64 virtual void clone(OrxonoxClass* item);64 virtual void clone(OrxonoxClass*& item); 65 65 66 66 virtual const PickupIdentifier* getPickupIdentifier(void); -
code/branches/pickup3/src/modules/pickup/items/HealthPickup.cc
r6496 r6497 280 280 A pointer to the Orxonox class. 281 281 */ 282 void HealthPickup::clone(OrxonoxClass* item)282 void HealthPickup::clone(OrxonoxClass*& item) 283 283 { 284 284 if(item == NULL) -
code/branches/pickup3/src/modules/pickup/items/HealthPickup.h
r6496 r6497 74 74 75 75 virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around. 76 virtual void clone(OrxonoxClass* item); //!< Creates a duplicate of the input OrxonoxClass.76 virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass. 77 77 78 78 /** -
code/branches/pickup3/src/orxonox/interfaces/Pickupable.cc
r6492 r6497 172 172 173 173 COUT(4) << "Pickupable (&" << this << ") got picked up by a PickupCarrier (&" << carrier << ")." << std::endl; 174 this->setPickedUp(true); 174 175 this->setCarrier(carrier); 175 this->setPickedUp(true);176 176 return true; 177 177 } … … 231 231 Pickupable* Pickupable::clone(void) 232 232 { 233 Pickupable* pickup = NULL; 234 this->clone(pickup); 233 OrxonoxClass* item = NULL; 234 this->clone(item); 235 236 Pickupable* pickup = dynamic_cast<Pickupable*>(item); 235 237 236 238 COUT(4) << "Pickupable (&" << this << ") cloned. Clone is new Pickupable (&" << pickup << ")." << std::endl; … … 246 248 */ 247 249 //TODO: Specify how the implementation must be done in detail. 248 void Pickupable::clone(OrxonoxClass* item)250 void Pickupable::clone(OrxonoxClass*& item) 249 251 { 250 252 SUPER(Pickupable, clone, item); -
code/branches/pickup3/src/orxonox/interfaces/Pickupable.h
r6490 r6497 102 102 103 103 Pickupable* clone(void); //!< Creates a duplicate of the Pickupable. 104 virtual void clone(OrxonoxClass* item); //!< Creates a duplicate of the input OrxonoxClass.104 virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass. 105 105 106 106 /**
Note: See TracChangeset
for help on using the changeset viewer.