72 template<
typename T>
AJAVariant & operator = (
const T inRHS)
77 mStringValue = v.mStringValue;
82 inline operator bool()
const {
return AsBool();}
83 inline operator float()
const {
return AsFloat();}
84 inline operator double()
const {
return AsDouble();}
85 inline operator int8_t()
const {
return AsInt8();}
86 inline operator uint8_t()
const {
return AsUInt8();}
87 inline operator int16_t()
const {
return AsInt16();}
88 inline operator uint16_t()
const {
return AsUInt16();}
89 inline operator int32_t()
const {
return AsInt32();}
90 inline operator uint32_t()
const {
return AsUInt32();}
91 inline operator int64_t()
const {
return AsInt64();}
92 inline operator uint64_t()
const {
return AsUInt64();}
93 inline operator std::string()
const {
return AsString();}
97 bool IsNumeric()
const;
98 bool IsUnsigned()
const;
99 bool IsSigned()
const;
105 inline bool GetBool()
const {
return mUnion.mBooleanValue;}
111 inline float GetFloat()
const {
return mUnion.mFloatValue;}
117 inline double GetDouble()
const {
return mUnion.mDoubleValue;}
123 inline int8_t
GetInt8()
const {
return mUnion.mInt8Value;}
129 inline uint8_t
GetUInt8()
const {
return mUnion.mUInt8Value;}
135 inline int16_t
GetInt16()
const {
return mUnion.mInt16Value;}
141 inline uint16_t
GetUInt16()
const {
return mUnion.mUInt16Value;}
147 inline int32_t
GetInt32()
const {
return mUnion.mInt32Value;}
153 inline uint32_t
GetUInt32()
const {
return mUnion.mUInt32Value;}
159 inline int64_t
GetInt64()
const {
return mUnion.mInt64Value;}
165 inline uint64_t
GetUInt64()
const {
return mUnion.mUInt64Value;}
171 inline const std::string &
GetString()
const {
return mStringValue;}
255 float AsFloat()
const;
260 double AsDouble()
const;
265 int8_t AsInt8()
const;
270 uint8_t AsUInt8()
const;
275 int16_t AsInt16()
const;
280 uint16_t AsUInt16()
const;
285 int32_t AsInt32()
const;
290 uint32_t AsUInt32()
const;
295 int64_t AsInt64()
const;
300 uint64_t AsUInt64()
const;
305 std::string AsString()
const;
325 std::string mStringValue;
330 #endif // AJA_VARIANT_H