Changeset 2662 for code/trunk/src/util/MultiType.h
- Timestamp:
- Feb 14, 2009, 10:17:35 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/util
- Property svn:mergeinfo changed
/code/branches/network/src/util (added) merged: 2356 /code/branches/network64/src/util (added) merged: 2245 /code/branches/objecthierarchy2/src/util (added) merged: 2257,2259,2343-2345,2361 /code/branches/overlay/src/util (added) merged: 2180 /code/branches/physics/src/util (added) merged: 2192,2298,2305,2424 /code/branches/physics_merge/src/util (added) merged: 2442 /code/branches/pickups2/src/util (added) merged: 2136 /code/branches/presentation/src/util (added) merged: 2371,2420,2459,2485,2492-2493,2500,2535,2541-2542,2560
- Property svn:mergeinfo changed
-
code/trunk/src/util/MultiType.h
r2171 r2662 305 305 306 306 /** @brief Current content gets deleted. New type is MT_null */ 307 inline void reset() { if (this->value_) this->value_->reset(); } 308 309 template <typename T> inline void setType() { this->assignValue(T()); } /** @brief Resets the value and changes the internal type to T. */ 310 inline void setType(const MultiType& other) { this->setType(other.getType()); } /** @brief Resets the value and changes the internal type to the type of the other MultiType. */ 311 inline void setType(MT_Type type) { this->reset(); this->convert(type); this->reset(); } /** @brief Resets the value and changes the internal type to the given type. */ 307 inline void reset() { if (this->value_) delete this->value_; this->value_ = 0; } 308 /** @brief Current content gets overridden with default zero value */ 309 inline void resetValue() { if (this->value_) this->value_->reset(); } 310 311 template <typename T> inline void setType() { this->assignValue(T()); } /** @brief Resets the value and changes the internal type to T. */ 312 inline void setType(const MultiType& other) { this->setType(other.getType()); } /** @brief Resets the value and changes the internal type to the type of the other MultiType. */ 313 inline void setType(MT_Type type) { this->reset(); this->convert(type); this->resetValue(); } /** @brief Resets the value and changes the internal type to the given type. */ 312 314 313 315 /** @brief Returns the current type. */
Note: See TracChangeset
for help on using the changeset viewer.