Changeset 9348 for code/trunk/src/modules/pickup/Pickup.h
- Timestamp:
- Aug 30, 2012, 11:08:17 PM (12 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:ignore
-
old new 1 .project 1 2 build 2 3 codeblocks 4 dependencies 3 5 vs 4 dependencies
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
code/trunk/src/modules/pickup/Pickup.h
r8108 r9348 105 105 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 106 106 107 virtual const std::string& getRepresentationName() const 108 { return this->representationName_; } 109 107 110 /** 108 111 @brief Get the activation type of the Pickup. 109 112 @return Returns the activation type of the Pickup. 110 113 */ 111 inline pickupActivationType::Value getActivationType Direct(void) const114 inline pickupActivationType::Value getActivationType(void) const 112 115 { return this->activationType_; } 113 116 /** … … 115 118 @return Returns the duration type of the Pickup. 116 119 */ 117 inline pickupDurationType::Value getDurationType Direct(void) const120 inline pickupDurationType::Value getDurationType(void) const 118 121 { return this->durationType_; } 119 122 120 const std::string& getActivationType (void) const; //!< Get the activation type of the Pickup.121 const std::string& getDurationType (void) const; //!< Get the duration type of the Pickup.123 const std::string& getActivationTypeAsString(void) const; //!< Get the activation type of the Pickup. 124 const std::string& getDurationTypeAsString(void) const; //!< Get the duration type of the Pickup. 122 125 123 126 /** … … 126 129 */ 127 130 inline bool isImmediate(void) const 128 { return this->getActivationType Direct() == pickupActivationType::immediate; }131 { return this->getActivationType() == pickupActivationType::immediate; } 129 132 /** 130 133 @brief Get whether the activation type is 'onUse'. … … 132 135 */ 133 136 inline bool isOnUse(void) const 134 { return this->getActivationType Direct() == pickupActivationType::onUse; }137 { return this->getActivationType() == pickupActivationType::onUse; } 135 138 /** 136 139 @brief Get whether the duration type is 'once'. … … 138 141 */ 139 142 inline bool isOnce(void) const 140 { return this->getDurationType Direct() == pickupDurationType::once; }143 { return this->getDurationType() == pickupDurationType::once; } 141 144 /** 142 145 @brief Get whether the duration type is 'continuous'. … … 144 147 */ 145 148 inline bool isContinuous(void) const 146 { return this->getDurationType Direct() == pickupDurationType::continuous; }149 { return this->getDurationType() == pickupDurationType::continuous; } 147 150 148 151 virtual void changedPickedUp(void); //!< Should be called when the pickup has transited from picked up to dropped or the other way around. 149 virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the OrxonoxClass.150 152 151 153 protected: 152 v oid initializeIdentifier(void);154 virtual bool createSpawner(void); //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable. 153 155 154 virtual bool createSpawner(void); //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable. 156 /** 157 @brief Sets the representation name which refers to the name of the PickupRepresentation that is used to represent this pickup. 158 */ 159 inline void setRepresentationName(const std::string& name) 160 { this->representationName_ = name; } 155 161 156 162 /** … … 158 164 @param type The activation type of the Pickup. 159 165 */ 160 inline void setActivationType Direct(pickupActivationType::Value type)166 inline void setActivationType(pickupActivationType::Value type) 161 167 { this->activationType_ = type; } 162 168 /** … … 164 170 @param type The duration type of the Pickup. 165 171 */ 166 inline void setDurationType Direct(pickupDurationType::Value type)172 inline void setDurationType(pickupDurationType::Value type) 167 173 { this->durationType_ = type; } 168 174 169 void setActivationType (const std::string& type); //!< Set the activation type of the Pickup.170 void setDurationType (const std::string& type); //!< Set the duration type of the Pickup.175 void setActivationTypeAsString(const std::string& type); //!< Set the activation type of the Pickup. 176 void setDurationTypeAsString(const std::string& type); //!< Set the duration type of the Pickup. 171 177 172 178 private: 173 179 void initialize(void); //!< Initializes the member variables. 174 180 181 std::string representationName_; //!< The name of the associated PickupRepresentation. 175 182 pickupActivationType::Value activationType_; //!< The activation type of the Pickup. 176 183 pickupDurationType::Value durationType_; //!< The duration type of the Pickup.
Note: See TracChangeset
for help on using the changeset viewer.