| 83 | |
| 84 | template<typename ValueType> |
| 85 | ValueType* castType(bool _throw = true) const |
| 86 | { |
| 87 | if (this->getType() == typeid(ValueType)) |
| 88 | return &static_cast<Any::Holder<ValueType>*>(this->mContent.get())->held; |
| 89 | MYGUI_ASSERT( |
| 90 | !_throw, |
| 91 | "Bad cast from type '" << getType().name() << "' to '" << typeid(ValueType).name() << "'"); |
| 92 | return nullptr; |
| 93 | } |
| 94 | |
| 95 | bool compare(const Any& other) const; |
| 96 |