00001 #ifndef DDC_common_h 00002 #define DDC_common_h 00003 00004 #include "ddcConfig.h" /*-- moo --*/ 00005 00006 00007 enum DDCErrorEnum 00008 { errUnknown = 0, 00009 errReadOccurrenceFile = 1, 00010 errProcessMorphology = 2, 00011 errUnknownPath = 3, 00012 errParseError = 4, 00013 errReadSourceFile = 5, 00014 errTimeoutElapsed = 6 00015 }; 00016 00017 00018 inline string GetDDCErrorString(DDCErrorEnum ErrorCode) 00019 { 00020 switch (ErrorCode) { 00021 case errUnknown: return "No error"; 00022 case errReadOccurrenceFile: return "cannot read an index file"; 00023 case errProcessMorphology: return "an exception in morphology"; 00024 case errUnknownPath: return "bad path for index files"; 00025 case errParseError: return "cannot parse the input query"; 00026 case errReadSourceFile: return "cannot read a source file"; 00027 case errTimeoutElapsed: return "timeout elapsed"; 00028 }; 00029 return "Unknown error code"; 00030 00031 }; 00032 00033 const char globalTableItemsDelim = '\x2'; 00034 00035 00036 const string DDCVersion = "Dialing DWDS Concordance (DDC), Version " PACKAGE_VERSION "\n"; /*-- moo --*/ 00037 00038 00039 #endif