diff options
Diffstat (limited to 'src/variant.h')
| -rw-r--r-- | src/variant.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/variant.h b/src/variant.h index 809aab9..5482ee3 100644 --- a/src/variant.h +++ b/src/variant.h | |||
| @@ -98,9 +98,15 @@ namespace Bu | |||
| 98 | public: | 98 | public: |
| 99 | Variant(); | 99 | Variant(); |
| 100 | Variant( const Variant &v ); | 100 | Variant( const Variant &v ); |
| 101 | template<class t> | ||
| 102 | Variant( const t &v ) : | ||
| 103 | pCore( new VariantType<t>() ) | ||
| 104 | { | ||
| 105 | (*dynamic_cast<VariantType<t> *>(pCore)) = v; | ||
| 106 | } | ||
| 101 | virtual ~Variant(); | 107 | virtual ~Variant(); |
| 102 | 108 | ||
| 103 | bool isSet(); | 109 | bool isSet() const; |
| 104 | Bu::FString toString() const; | 110 | Bu::FString toString() const; |
| 105 | const std::type_info &getType() const; | 111 | const std::type_info &getType() const; |
| 106 | 112 | ||
