- Timestamp:
- Jun 9, 2010, 9:32:58 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation3/src/modules/pickup/PickupCollection.cc
r7094 r7127 42 42 namespace orxonox 43 43 { 44 44 45 45 CreateFactory(PickupCollection); 46 46 … … 52 52 { 53 53 RegisterObject(PickupCollection); 54 54 55 55 this->pickupCollectionIdentifier_ = new PickupCollectionIdentifier(this); 56 56 } 57 57 58 58 /** 59 59 @brief … … 69 69 } 70 70 } 71 71 72 72 /** 73 73 @brief … … 77 77 { 78 78 SUPER(PickupCollection, XMLPort, xmlelement, mode); 79 79 80 80 XMLPortObject(PickupCollection, Pickupable, "pickupables", addPickupable, getPickupable, xmlelement, mode); 81 81 82 82 this->initializeIdentifier(); 83 83 } 84 84 85 85 /** 86 86 @brief … … 94 94 } 95 95 } 96 96 97 97 /** 98 98 @brief … … 103 103 { 104 104 SUPER(PickupCollection, changedUsed); 105 105 106 106 //! Change used for all Pickupables this PickupCollection consists of. 107 107 for(std::vector<WeakPtr<Pickupable> >::iterator it = this->pickups_.begin(); it != this->pickups_.end(); it++) … … 110 110 } 111 111 } 112 112 113 113 /** 114 114 @brief … … 119 119 { 120 120 SUPER(PickupCollection, changedCarrier); 121 121 122 122 //! Change the PickupCarrier for all Pickupables this PickupCollection consists of. 123 123 for(std::vector<WeakPtr<Pickupable> >::iterator it = this->pickups_.begin(); it != this->pickups_.end(); it++) … … 126 126 } 127 127 } 128 128 129 129 /** 130 130 @brief … … 135 135 { 136 136 SUPER(PickupCollection, changedPickedUp); 137 137 138 138 //! Change the pickedUp status for all Pickupables this PickupCollection consists of. 139 139 for(std::vector<WeakPtr<Pickupable> >::iterator it = this->pickups_.begin(); it != this->pickups_.end(); it++) … … 142 142 } 143 143 } 144 144 145 145 /** 146 146 @brief … … 154 154 if(item == NULL) 155 155 item = new PickupCollection(this); 156 156 157 157 SUPER(PickupCollection, clone, item); 158 158 159 159 PickupCollection* pickup = dynamic_cast<PickupCollection*>(item); 160 160 //! Clone all Pickupables this PickupCollection consist of. … … 167 167 pickup->initializeIdentifier(); 168 168 } 169 169 170 170 /** 171 171 @brief … … 183 183 return false; 184 184 } 185 185 186 186 return true; 187 187 } 188 188 189 189 /** 190 190 @brief … … 198 198 return this->pickupCollectionIdentifier_; 199 199 } 200 200 201 201 /** 202 202 @brief … … 211 211 if(pickup == NULL) 212 212 return false; 213 213 214 214 WeakPtr<Pickupable> ptr = pickup; //!< Create a weak pointer to be able to test in the constructor if the Pointer is still valid. 215 215 this->pickups_.push_back(ptr); 216 216 return true; 217 217 } 218 218 219 219 /** 220 220 @brief … … 229 229 return this->pickups_[index].get(); 230 230 } 231 231 232 232 /** 233 233 @brief … … 245 245 return true; 246 246 } 247 247 248 248 }
Note: See TracChangeset
for help on using the changeset viewer.