00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef SUGOI_TOOLS_TOOLS_h
00031 #define SUGOI_TOOLS_TOOLS_h
00032
00033
00034 #include "SugoiTools\config.h"
00035 #include "SugoiTools\exceptions.h"
00036
00037
00038 namespace SGE{
00039 _SG_TLS_EXPORT std::string StringToUpper(std::string &_s);
00040 _SG_TLS_EXPORT std::string StringToLower(std::string &_s);
00041 _SG_TLS_EXPORT void ParseFilePath(const std::string &_SourceName, std::string *_path, std::string *_name);
00042 _SG_TLS_EXPORT void ParseFileType(const std::string &_SourceName, std::string *_name, std::string *_type);
00043
00049 template <typename Type>
00050 std::string ToCharStr(const Type & _Val)
00051 {
00052 std::ostringstream oss;
00053 oss << _Val;
00054 return oss.str();
00055 };
00056
00057
00058
00059
00060
00061
00062
00063
00068 _SG_TLS_EXPORT void Terminate(int _MsgID, std::string _MsgError="", char * _file=NULL, long _line = 0);
00069
00070 #define TERMINATE_APP(MSG_ID, MSG){\
00071 {Terminate(MSG_ID, MSG, __FILE__, __LINE__);}}
00072
00073 #define NOMINMAX
00074
00075
00076 _SG_TLS_EXPORT HINSTANCE DLLLoad(const char * _DLLNAME, const char * _DLLPath = NULL);
00077 _SG_TLS_EXPORT void DLLClose(HINSTANCE & _DllInstance);
00078
00084 _SG_TLS_EXPORT FARPROC DLLGetProcAddress(HINSTANCE & _DllInstance, const char * _ProcName);
00085
00086 };
00087 #endif//SUGOI_TOOLS_TOOLS_h