PLearn 0.1
Classes | Namespaces | Defines | Functions
TypeTraits.h File Reference
#include <string>
#include <vector>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <nspr/prlong.h>
#include <plearn/base/pl_stdint.h>
Include dependency graph for TypeTraits.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  PLearn::TypeTraits< T >
 TypeTraits provides a type-information mechanism for C++ types. More...
class  PLearn::TypeTraits< T * >
class  PLearn::TypeTraits< T const >
class  PLearn::TypeTraits< string >
class  PLearn::TypeTraits< std::vector< T > >
class  PLearn::TypeTraits< std::list< T > >
class  PLearn::TypeTraits< std::pair< T, U > >
class  PLearn::TypeTraits< std::map< T, U > >
class  PLearn::TypeTraits< std::set< T > >
class  PLearn::TypeTraits< std::priority_queue< T > >

Namespaces

namespace  PLearn
 

< for swap


Defines

#define DECLARE_TYPE_TRAITS_FOR_BASETYPE(T, LITTLE_ENDIAN_TYPECODE, BIG_ENDIAN_TYPECODE)
#define DECLARE_TYPE_TRAITS_FOR_INTTYPE(T)
#define DECLARE_TYPE_TRAITS_FOR_UINTTYPE(T)
#define DECLARE_TYPE_TRAITS(T)

Functions

 PLearn::DECLARE_TYPE_TRAITS_FOR_BASETYPE (void, 0xFF, 0xFF)
 PLearn::DECLARE_TYPE_TRAITS_FOR_BASETYPE (float, 0x0E, 0x0F)
 PLearn::DECLARE_TYPE_TRAITS_FOR_BASETYPE (double, 0x10, 0x11)
 PLearn::DECLARE_TYPE_TRAITS_FOR_BASETYPE (bool, 0x30, 0x30)
 PLearn::DECLARE_TYPE_TRAITS_FOR_INTTYPE (char)
 PLearn::DECLARE_TYPE_TRAITS_FOR_INTTYPE (signed char)
 PLearn::DECLARE_TYPE_TRAITS_FOR_INTTYPE (short)
 PLearn::DECLARE_TYPE_TRAITS_FOR_INTTYPE (int)
 PLearn::DECLARE_TYPE_TRAITS_FOR_INTTYPE (long)
 PLearn::DECLARE_TYPE_TRAITS_FOR_UINTTYPE (unsigned char)
 PLearn::DECLARE_TYPE_TRAITS_FOR_UINTTYPE (unsigned long long)

Detailed Description

Definition in file TypeTraits.h.


Define Documentation

#define DECLARE_TYPE_TRAITS (   T)
Value:
template<>                                              \
class TypeTraits<T>                                     \
{                                                       \
public:                                                 \
  static inline string name()                           \
  { return #T; }                                        \
                                                        \
  static inline unsigned char little_endian_typecode()  \
  { return 0xFF; }                                      \
                                                        \
  static inline unsigned char big_endian_typecode()     \
  { return 0xFF; }                                      \
}

Definition at line 228 of file TypeTraits.h.

#define DECLARE_TYPE_TRAITS_FOR_BASETYPE (   T,
  LITTLE_ENDIAN_TYPECODE,
  BIG_ENDIAN_TYPECODE 
)
Value:
template<>                                                                              \
class TypeTraits<T>                                                                     \
{                                                                                       \
public:                                                                                 \
  static inline string name()                                                           \
  { return #T; }                                                                        \
                                                                                        \
  static inline unsigned char little_endian_typecode()                                  \
  { return LITTLE_ENDIAN_TYPECODE; }                                                    \
                                                                                        \
  static inline unsigned char big_endian_typecode()                                     \
  { return BIG_ENDIAN_TYPECODE; }                                                       \
}

Definition at line 127 of file TypeTraits.h.

#define DECLARE_TYPE_TRAITS_FOR_INTTYPE (   T)

Definition at line 142 of file TypeTraits.h.

#define DECLARE_TYPE_TRAITS_FOR_UINTTYPE (   T)

Definition at line 185 of file TypeTraits.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines