Changeset 2180 for code/branches/overlay
- Timestamp:
- Nov 12, 2008, 12:55:14 AM (16 years ago)
- Location:
- code/branches/overlay/src/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/overlay/src/util/MultiType.cc
r2087 r2180 43 43 switch (type) 44 44 { 45 case MT_null: 46 this->reset(); return true; 45 47 case MT_char: 46 48 return this->convert<char>(); break; -
code/branches/overlay/src/util/MultiType.h
r2087 r2180 301 301 302 302 /** @brief Current content gets deleted. New type is MT_null */ 303 inline void reset() { if (this->value_) this->value_->reset(); } 304 305 template <typename T> inline void setType() { this->assignValue(T()); } /** @brief Resets the value and changes the internal type to T. */ 306 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. */ 307 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. */ 303 inline void reset() { if (this->value_) delete this->value_; this->value_ = 0; } 304 /** @brief Current content gets overridden with default zero value */ 305 inline void resetValue() { if (this->value_) this->value_->reset(); } 306 307 template <typename T> inline void setType() { this->assignValue(T()); } /** @brief Resets the value and changes the internal type to T. */ 308 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. */ 309 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. */ 308 310 309 311 /** @brief Returns the current type. */
Note: See TracChangeset
for help on using the changeset viewer.