TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
sophist.h File Reference

Go to the source code of this file.

Macros

#define SOPHIST_compiletime_assert(name, val)   typedef int SOPHIST__assert##name[(val) ? 1 : -1]
 
#define SOPHIST_has_64   0
 
#define SOPHIST_pointer64   0
 
#define SOPHIST_little_endian   1
 
#define SOPHIST_big_endian   2
 
#define SOPHIST_endian   SOPHIST_big_endian
 

Typedefs

typedef signed char SOPHIST_int8
 
typedef unsigned char SOPHIST_uint8
 
typedef signed short SOPHIST_int16
 
typedef unsigned short SOPHIST_uint16
 
typedef signed int SOPHIST_int32
 
typedef unsigned int SOPHIST_uint32
 
typedef SOPHIST_int32 SOPHIST_intptr
 
typedef SOPHIST_uint32 SOPHIST_uintptr
 

Functions

 SOPHIST_compiletime_assert (int8, sizeof(SOPHIST_int8)==1)
 
 SOPHIST_compiletime_assert (uint16, sizeof(SOPHIST_int16)==2)
 
 SOPHIST_compiletime_assert (int32, sizeof(SOPHIST_int32)==4)
 
 SOPHIST_compiletime_assert (uint32, sizeof(SOPHIST_uint32)==4)
 
 SOPHIST_compiletime_assert (pointer64, sizeof(void *)<=4)
 
 SOPHIST_compiletime_assert (intptr, sizeof(SOPHIST_intptr)==sizeof(char *))
 

Macro Definition Documentation

#define SOPHIST_big_endian   2
#define SOPHIST_compiletime_assert (   name,
  val 
)    typedef int SOPHIST__assert##name[(val) ? 1 : -1]
#define SOPHIST_endian   SOPHIST_big_endian
#define SOPHIST_has_64   0
#define SOPHIST_little_endian   1
#define SOPHIST_pointer64   0

Typedef Documentation

typedef signed short SOPHIST_int16
typedef signed int SOPHIST_int32
typedef signed char SOPHIST_int8
typedef unsigned short SOPHIST_uint16
typedef unsigned int SOPHIST_uint32
typedef unsigned char SOPHIST_uint8

Function Documentation

SOPHIST_compiletime_assert ( int8  ,
sizeof(SOPHIST_int8 = =1 
)
SOPHIST_compiletime_assert ( uint16  ,
sizeof(SOPHIST_int16 = =2 
)
SOPHIST_compiletime_assert ( int32  ,
sizeof(SOPHIST_int32 = =4 
)
SOPHIST_compiletime_assert ( uint32  ,
sizeof(SOPHIST_uint32 = =4 
)
SOPHIST_compiletime_assert ( pointer64  ,
sizeof(void *)<=  4 
)
SOPHIST_compiletime_assert ( intptr  ,
sizeof(SOPHIST_intptr = =sizeof(char *) 
)