Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

common.h

Go to the documentation of this file.
00001 00002 00003 #ifndef __types_h__ 00004 #define __types_h__ 00005 00006 00007 #include <vector> 00008 #include <map> 00009 #include <list> 00010 #include <string> 00011 #include <iostream> 00012 #include <cassert> 00013 #include <cmath> 00014 00015 00016 typedef unsigned char uChar; 00017 typedef unsigned short uShort; 00018 typedef unsigned int uInt; 00019 00020 00021 00022 static const uInt g_max_uInt = (1<<(sizeof(uInt)*8))-1; 00023 static const int g_max_int = (1<<(sizeof(uInt)*8))-1; 00024 static const uChar g_max_uChar = (1<<(sizeof(uChar)*8))-1; 00025 static const char g_max_char = (1<<(sizeof(char)*8-1))-1; 00026 static const uShort g_max_uShort = (1<<(sizeof(uShort)*8))-1; 00027 00028 00029 #define ASSERT(TEST, INFO) assert((TEST) && INFO) 00030 00031 00032 #ifdef NO_WARNINGS 00033 #define WARN(INFO) (void(0)); 00034 #else 00035 #define WARN(INFO) std::cerr << "Warning: " << INFO << std::endl; 00036 #endif 00037 00038 00039 #define WARN_IF(TEST, INFO) if(TEST) WARN("[ " #INFO " ]"); 00040 00041 00042 #ifdef NO_MESSAGES 00043 #define MSG(INFO) (void(0)); 00044 #else 00045 #define MSG(INFO) std::cout << "-- " INFO << std::endl; 00046 #endif 00047 00048 00049 #define MSG_IF(TEST, INFO) if(TEST) MSG(INFO); 00050 00051 00052 00053 typedef uChar instruction; 00054 typedef uInt threadId; 00055 typedef uInt processId; 00056 typedef uInt address; 00057 00058 00059 00060 #endif 00061

Generated on Sun Mar 6 22:12:28 2005 for virtualMachine03 by doxygen 1.3.7