Alex Bikfalvi
SimStream Documentation
Headers.h
00001 #pragma once 00002 00003 #define _CRTDBG_MAP_ALLOC 00004 #define _CRT_RAND_S 00005 00006 #ifdef _WINDOWS 00007 #ifndef _WIN32_WINNT 00008 #define _WIN32_WINNT 0x0600 00009 #endif 00010 #endif 00011 00012 #ifdef _WINDOWS 00013 #include <crtdbg.h> 00014 #endif 00015 #include <stdlib.h> 00016 #include <iostream> 00017 #include <fstream> 00018 #include <malloc.h> 00019 #include <assert.h> 00020 #include <stdio.h> 00021 #include <math.h> 00022 #include <string.h> 00023 #include <time.h> 00024 #include <list> 00025 #include <map> 00026 #include <set> 00027 #include <vector> 00028 #include <queue> 00029 #include <fstream> 00030 00031 #include "IDelegate.h" 00032 #include "Delegate.h" 00033 #include "Event.h" 00034 #include "ICall.h" 00035 #include "Call.h" 00036 #include "Platform.h" 00037 00038 using namespace std; 00039 00040 #ifdef _LINUX 00041 #define __int8 char 00042 #define __int16 short 00043 #define __int32 int 00044 #define __int64 long long 00045 #endif 00046 00047 #define __bitrate double 00048 #define __time double 00049 #define __byte unsigned __int8 00050 #define __bits unsigned __int64 00051 00052 #define __uint8 unsigned __int8 00053 #define __uint16 unsigned __int16 00054 #define __uint32 unsigned __int32 00055 #define __uint64 unsigned __int64 00056 00057 #ifdef _DEBUG 00058 #define type_cast dynamic_cast 00059 #else 00060 #define type_cast static_cast 00061 #endif 00062 00063 #define TIME_UNIT ((__time)1) 00064 #define TIME_INVALID ((__time)-1) 00065 #define RATE_UNIT ((__bitrate)1000) 00066 00067 #if defined(_WINDOWS) && defined(_DEBUG) 00068 #define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__) 00069 #define new DEBUG_NEW 00070 #endif 00071 00072 #define error(msg) { printf(msg); exit(-1); } 00073 #define warn(msg) { printf(msg); } 00074 00075 #if defined(_RELEASEASSERT) || defined(_RELEASELOG) 00076 #ifdef assert 00077 #undef assert 00078 #endif 00079 #define assert(x) {if(!(x)) { printf("\nError in file %s at line %u", __FILE__, __LINE__); __debugbreak(); } } 00080 #endif 00081 00082 #if defined(_DEBUG) || defined(_RELEASELOG) 00083 #define DETRAND 00084 #endif 00085 00086 #ifdef _WINDOWS 00087 #define FILE_OPEN(file, name, mode) fopen_s(&file, name, mode) 00088 #else 00089 #define FILE_OPEN(file, name, mode) ((file = fopen(name, mode)) == NULL) 00090 #endif
Last updated: February 8, 2011