types.h File Reference

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 QStringstorage::type_name (const T &=T())
const QStringstorage::typeid_to_name (TYPES id)
TYPES storage::typename_to_id (const QString &name)

Detailed Description

This file contains all the utilities to convert froom type to type.

Definition in file types.h.


Define Documentation

#define FOR_ALL_TYPEIDS ( macro   ) 
Value:
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)

Definition at line 80 of file types.h.

#define FOR_ALL_TYPES ( macro   ) 
Value:
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)

Definition at line 42 of file types.h.

#define FOR_ALL_TYPES_NOSTRING ( macro   ) 
Value:
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)

Definition at line 62 of file types.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Fri May 31 15:37:53 2013 for VVE by  doxygen 1.6.3