This file contains all the utilities to convert froom type to type. More...
#include <config.h>
#include <QString>
#include <string>
Go to the source code of this file.
Classes | |
struct | storage::ConvertType< From, To > |
Convert object of type from to object of type to. More... | |
struct | storage::TypeTraits< T > |
Defines main traits for types directly handled. More... | |
Namespaces | |
namespace | storage |
Namespace containing all functions and classes related to VVE persistence. | |
Defines | |
#define | CONVERT_FROM_STRING(type) template <> struct ConvertType<std::string,type> { bool operator()(const std::string&, type&) const; }; |
#define | CONVERT_FROM_STRING(type) template <> struct ConvertType<QString,type> { bool operator()(const QString&, type&) const; }; |
#define | CONVERT_TO_STRING(type) template <> struct ConvertType<type,std::string> { bool operator()(const type& from, std::string& to) const; }; |
#define | CONVERT_TO_STRING(type) template <> struct ConvertType<type,QString> { bool operator()(const type& from, QString& to) const; }; |
#define | FOR_ALL_TYPEIDS(macro) |
#define | FOR_ALL_TYPES(macro) |
#define | FOR_ALL_TYPES_NOSTRING(macro) |
#define | NB_STORAGE_TYPES 17 |
Enumerations | |
enum | NUMBER_CLASS { SIGNED_INTEGER, UNSIGNED_INTEGER, FLOATING_POINT, CHAR, NOT_A_NUMBER } |
enum | TYPES { T_INVALID = -1, T_BOOL = 0, T_WCHART, T_CHAR, T_SIGNED_CHAR, T_UNSIGNED_CHAR, T_SHORT, T_UNSIGNED_SHORT, T_INT, T_UNSIGNED_INT, T_LONG, T_UNSIGNED_LONG, T_LONG_LONG, T_UNSIGNED_LONG_LONG, T_FLOAT, T_DOUBLE, T_LONG_DOUBLE, T_STRING } |
Functions | |
template<typename From , typename To > | |
bool | storage::convert_type (const From &from, To &to) |
Function converting from to to . | |
TYPES | storage::find_type (NUMBER_CLASS klass, size_t bytes) |
bool | storage::isStrictConversion (TYPES from, TYPES to) |
template<typename T > | |
TYPES | storage::type_id (const T &=T()) |
template<typename T > | |
const QString & | storage::type_name (const T &=T()) |
const QString & | storage::typeid_to_name (TYPES id) |
TYPES | storage::typename_to_id (const QString &name) |
This file contains all the utilities to convert froom type to type.
Definition in file types.h.
#define FOR_ALL_TYPEIDS | ( | macro | ) |
macro(T_BOOL,bool) \ macro(T_WCHART,wchar_t) \ macro(T_CHAR,char) \ macro(T_SIGNED_CHAR,signed char) \ macro(T_UNSIGNED_CHAR,unsigned char) \ macro(T_SHORT,short) \ macro(T_UNSIGNED_SHORT,unsigned short) \ macro(T_INT,int) \ macro(T_UNSIGNED_INT,unsigned int) \ macro(T_LONG,long) \ macro(T_UNSIGNED_LONG,unsigned long) \ macro(T_LONG_LONG,long long) \ macro(T_UNSIGNED_LONG_LONG,unsigned long long) \ macro(T_FLOAT,float) \ macro(T_DOUBLE,double) \ macro(T_LONG_DOUBLE,long double) \ macro(T_STRING,QString)
#define FOR_ALL_TYPES | ( | macro | ) |
macro(bool) \ macro(wchar_t) \ macro(char) \ macro(signed char) \ macro(unsigned char) \ macro(short) \ macro(unsigned short) \ macro(int) \ macro(unsigned int) \ macro(long) \ macro(unsigned long) \ macro(long long) \ macro(unsigned long long) \ macro(float) \ macro(double) \ macro(long double) \ macro(std::string) \ macro(QString)
#define FOR_ALL_TYPES_NOSTRING | ( | macro | ) |
macro(bool) \ macro(wchar_t) \ macro(char) \ macro(signed char) \ macro(unsigned char) \ macro(short) \ macro(unsigned short) \ macro(int) \ macro(unsigned int) \ macro(long) \ macro(unsigned long) \ macro(long long) \ macro(unsigned long long) \ macro(float) \ macro(double) \ macro(long double)