00001 #ifndef LOGGER_H 00002 #define LOGGER_H 00003 00004 #define LONG_NAMES 0 00005 00006 #include "string" 00007 #include "algorithm" 00008 #include "globals.h" 00009 00010 extern Globals global_vars; 00011 00012 inline void DMP_H(const char * msg) 00013 { 00014 global_vars.dmp_h << msg; 00015 } 00016 00017 inline void DMP_S(const char * msg) 00018 { 00019 global_vars.dmp_s << msg; 00020 } 00021 00022 00023 inline void TO(const char * msg) 00024 { 00025 //AfxMessageBox(msg); 00026 global_vars.err << MSG_ERROR << msg << "\n" << MSG_NORMAL; 00027 } 00028 00029 inline void TO(const CString msg) { TO( (LPCTSTR) msg); } 00030 inline void TO(const std::string msg) { TO( msg.c_str()); } 00031 inline void DMP(const std::string& msg) { DMP( msg.c_str() ); } 00032 inline void DMP_H(const std::string& msg) { DMP_H( msg.c_str() ); } 00033 inline void DMP_S(const std::string& msg) { DMP_S( msg.c_str() ); } 00034 00035 00036 bool existsFile( const char * src_name); 00037 bool fileExists( const char * file_name); 00038 int makeFileCopy( const char * src_name, const char * dst_name); 00039 int makeFileMove( const char * src_name, const char * dst_name); 00040 std::string shortFileName( const std::string& long_name); 00041 std::string cutExtension( const std::string& filename); 00042 std::string capitalizeString( const std::string& name); 00043 bool directoryExists( const char * dir); 00044 bool directoryCreate( const char * dir); 00045 00046 #endif // LOGGER_H