31 #if defined(__MINGW32CE__) 37 #include "swe_binarybuf.h" 38 #include "swe_cstring.h" 46 static std::ostream* os;
47 static std::string id;
53 static void init(
const std::string &,
const char* =
nullptr);
79 if(os) *os << std::endl;
83 template<
typename Value>
96 std::string shortPrettyName(
const std::string &);
101 int setEnvironment(
const char* name,
const char* value);
102 const char* environment(
const char*);
105 void* openLib(
const std::string &);
106 void closeLib(
void*);
107 void* procAddressLib(
void*,
const std::string &);
108 const char* suffixLib(
void);
111 bool makeDirectory(
const std::string &);
112 std::string concatePath(
const std::string &,
const std::string &);
113 std::string concatePath(
const std::string &,
const std::string &,
const std::string &);
114 std::string concatePath(
const StringList &);
115 StringList findFiles(
const std::string &,
const std::string & =
"",
bool sensitive =
false);
116 StringList readDir(
const std::string &,
bool fullpath =
true);
118 std::string dirname(
const std::string &);
119 std::string basename(
const std::string &);
121 std::string nulFile(
void);
122 std::string homeDirectory(
const std::string &);
123 StringList shareDirectories(
const std::string &);
125 void assetsInit(
void);
129 bool isFile(
const std::string &,
bool writable =
false);
130 bool isDirectory(
const std::string &,
bool writable =
false);
131 int remove(
const std::string &);
133 void setLocale(
int,
const char*);
134 std::string messageLocale(
int length );
136 bool saveFile(
const BinaryBuf &,
const std::string &,
int offset = 0 );
137 BinaryBuf readFile(
const std::string &,
size_t offset = 0,
size_t size = 0);
139 bool saveString2File(
const std::string &,
const std::string &);
140 bool readFile2String(
const std::string &, std::string &);
142 int GetCommandOptions(
int argc,
char*
const argv[],
const char* optstring);
143 char* GetOptionsArgument(
void);
145 bool isEmbeded(
void);
146 size_t memoryUsage(
void);
151 #define COUT(x) SWE::LogWrapper() << x << "\n"; 153 #if defined(SWE_DEBUG_MESSAGES) || defined(SWE_DEBUG) 154 #if defined(__WIN32__) || (__MINGW32__) 155 #define PRETTY(x, y) COUT(SWE::String::time() << ": " << x << "\t" << SWE::shortPrettyName(__PRETTY_FUNCTION__) << ": " << y) 156 #define VERBOSE(x) { PRETTY("[VERBOSE]", x); } 157 #define ERROR(x) { PRETTY("[ERROR]", x); } 158 #define FIXME(x) { PRETTY("[FIXME]", x); } 159 #define DEBUGN(x,n){ if(n <= SWE::Engine::debugMode()) PRETTY("[DEBUG]", x); } 162 #define PRETTY3(x, y, c) COUT(SWE::String::time() << ": " << x << "\t\x1B[35m" << SWE::shortPrettyName(__PRETTY_FUNCTION__) << ": " << c << y << "\033[0m") 163 #define PRETTY(x, y) PRETTY3(x, y, "\x1B[36m") 164 #define VERBOSE(x) { PRETTY("\x1B[31m[VERBOSE]", x); } 165 #define ERROR(x) { PRETTY3("\x1B[93m[ERROR]", x, "\x1B[93m"); } 166 #define FIXME(x) { PRETTY("\x1B[32m[FIXME]", x); } 167 #define DEBUG(x) { if(SWE::Engine::debugMode()) PRETTY("\x1B[34m[DEBUG]", x); } 168 #define DEBUGN(x,n){ if(n <= SWE::Engine::debugMode()) PRETTY("\x1B[34m[DEBUG]", x); } 171 #define PRETTY(x, y) COUT(SWE::String::time() << ": " << x << "\t" << SWE::shortPrettyName(__PRETTY_FUNCTION__) << ": " << y) 172 #define VERBOSE(x) { PRETTY("[VERBOSE]", x); } 173 #define ERROR(x) { PRETTY("[ERROR]", x); } 174 #define FIXME(x) { PRETTY("[FIXME]", x); } Definition: swe_systems.h:43
пространство SWE.
Definition: swe_binarybuf.cpp:30