Ion
|
The VariantTypeResolver struct allows users of the Variant class to determine which type defined by a particular Variant can be used to store a value of a particular type. More...
#include "varianttyperesolver.h"
Public Types | |
typedef internal::ResolverHelper < VariantType, TypeToResolve, TypeToResolve >::Type | Type |
The VariantTypeResolver struct allows users of the Variant class to determine which type defined by a particular Variant can be used to store a value of a particular type.
For a defined Variant type T, VariantTypeResolver<VariantType, T>::Type will be T if T is one of the defined types or is a type derived from one of the defined types. Note that other type conversions are not allowed.
For example, suppose you have: typedef Variant<int, double, BaseClass> MyVariant;
Then: VariantTypeResolver<MyVariant, int>::Type will be int because int is one of the defined types. VariantTypeResolver<MyVariant, double>::Type will be double for the same reason. VariantTypeResolver<MyVariant, float>::Type will be void, because float is not one of the defined types (and no conversions are allowed). VariantTypeResolver<MyVariant, BaseClass>::Type will be BaseClass. VariantTypeResolver<MyVariant, DerivedClass>::Type will be BaseClass if DerivedClass is derived from BaseClass.
Definition at line 139 of file varianttyperesolver.h.
typedef internal::ResolverHelper< VariantType, TypeToResolve, TypeToResolve>::Type ion::base::VariantTypeResolver< VariantType, TypeToResolve >::Type |
Definition at line 141 of file varianttyperesolver.h.