common.h File Reference

Type definitions and helper macros which aren't part of Standard C++. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define BREAKPOINT
#define ASSERT(c)   (void)((c)||AssertFailed(__FILE__,__LINE__))
#define ASSERT_DEBUG(c)
#define ASSERT_COMPILE(c)   void assert_compile(int assert_compile[(c)?1:-1])
#define offsetof(type, member)   ((size_t)(&((type*)256)->member)-256)

Typedefs

typedef unsigned char uint8_t
typedef unsigned short uint16_t
typedef unsigned int uint32_t
typedef ulonglong uint64_t
typedef signed char int8_t
typedef signed short int16_t
typedef signed int int32_t
typedef longlong int64_t
typedef int intptr_t
typedef unsigned int uintptr_t
typedef int64_t intmax_t
typedef uint64_t uintmax_t
typedef uintptr_t size_t
typedef intptr_t ptrdiff_t

Functions

void * operator new (size_t, void *ptr) throw ()
void operator delete (void *, void *) throw ()

Detailed Description

Type definitions and helper macros which aren't part of Standard C++.

Version:
2007-01-17
  • Fixed definition of offsetof to work on GGC 4.
  • Added global placement new operator for constructing an object at a specified address.

Definition in file common.h.


Define Documentation

#define BREAKPOINT

Invoke debugger

Definition at line 99 of file common.h.

#define ASSERT (  )     (void)((c)||AssertFailed(__FILE__,__LINE__))

Assert that expression 'c' is true

Definition at line 103 of file common.h.

#define ASSERT_DEBUG (  ) 

Assert that expression 'c' is true (when compiled for debugging)

Definition at line 115 of file common.h.

#define ASSERT_COMPILE (  )     void assert_compile(int assert_compile[(c)?1:-1])

Assert, at compile time, that expression 'c' is true.

Definition at line 121 of file common.h.

#define offsetof ( type,
member   )     ((size_t)(&((type*)256)->member)-256)

Calculate address offset of member within a type.

Definition at line 159 of file common.h.


Function Documentation

void* operator new ( size_t  ,
void *  ptr 
) throw ()

Global placement new operator for constructing an object at a specified address.

Definition at line 180 of file common.h.

void operator delete ( void *  ,
void *   
) throw ()

Global placement delete operator.

Definition at line 186 of file common.h.


Generated by  doxygen 1.6.1