00001 00002 #ifndef MESSAGESH 00003 #define MESSAGESH 00004 #include <string> 00005 //--------------------------------------------------------------------------- 00025 const int MESSAGE_SIZE = 250; 00027 struct modelMsg { 00028 int iMessageCode; 00029 char cMoreInfo[MESSAGE_SIZE], 00031 cFunction[MESSAGE_SIZE]; 00033 }; 00034 00036 struct modelErr { 00037 int iErrorCode; 00038 char cMoreInfo[MESSAGE_SIZE], 00040 cFunction[MESSAGE_SIZE]; 00042 }; 00043 00044 //***************************************** 00045 // Message and error codes - which these are 00046 // depends on the structure they are passed in 00047 //***************************************** 00048 00049 const int UNKNOWN = 0; 00050 const int NO_MESSAGE = 1; 00052 //Commands - these will probably never be used as errors 00053 const int PAUSE_RUN = 2; 00054 const int RUN = 3; 00055 const int INPUT_FILE = 4; 00056 const int QUIT = 5; 00058 //For communicating model status 00059 const int MODEL_READY = 6; 00060 const int MODEL_NOT_READY = 7; 00061 const int MODEL_PAUSED = 8; 00062 const int RUN_COMPLETE = 9; 00063 const int COMMAND_DONE = 10; 00064 const int INFO = 11; 00067 //Runtime error codes 00068 const int BAD_ARGUMENT = 12; 00070 const int BAD_COMMAND = 13; 00072 const int CANT_FIND_OBJECT= 14; 00073 const int TREE_WRONG_TYPE = 15; 00074 const int ACCESS_VIOLATION= 16; 00076 //File error codes 00077 const int BAD_FILE = 17; 00079 const int BAD_FILE_TYPE = 18; 00080 const int BAD_XML_FILE = 19; 00081 const int NEED_FILE = 20; 00083 //Data errors - add'l data should have name of data piece 00084 const int DATA_MISSING = 21; 00085 const int BAD_DATA = 22; 00087 const int DATA_READ_ONLY = 23; 00088 const int ILLEGAL_OP = 24; 00090 //--------------------------------------------------------------------------- 00091 #endif