VoltAir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups Pages
Public Member Functions | List of all members
VariantConverterBase< T > Class Template Reference

Base template class for VariantConverter. More...

Inheritance diagram for VariantConverterBase< T >:
VariantConverter< T >

Public Member Functions

QVariant toVariant (const T &value)
 Returns value converted as a QVariant. More...
 

Detailed Description

template<typename T>
class VariantConverterBase< T >

Base template class for VariantConverter.

This class defines a base implementation for the toVariant() method which is valid for any template type T for which there exists a corresponding QVariant constructor.

Template Parameters
Templatetype to convert to and from QVariant
See also
VariantConverter

Member Function Documentation

template<typename T>
QVariant VariantConverterBase< T >::toVariant ( const T &  value)
inline

Returns value converted as a QVariant.

Note
This default implementation can only convert T types which are valid types for the QVariant constructor. All other types wished to be converted need to use template specialization.
Parameters
valueValue to convert