#include <system.h>
Static Public Member Functions | |
| static void | vdebugPrint (const char *format, va_list args) |
| static void | debugPrint (const char *format,...) |
| static const char * | strptime (const char *buf, const char *format, tm *tm) |
| static long | getLastOSErrorCode () |
| static void | displayErrorMessage (const char *title, const char *message) |
| static unsigned long | getOSTimeSeconds () |
| static void | yieldThread () |
| static void | sleep (unsigned long milliseconds) |
| static void | atomicIncrement (volatile unsigned long &v, CriticalSection *varCS=systemCS) |
| static void | atomicDecrement (volatile unsigned long &v, CriticalSection *varCS=systemCS) |
| static int | initializeSockets () |
| static void | cleanupSockets () |
| static int | closeSocket (SOCKET s) |
| static SOCKET | accept (SOCKET s, struct sockaddr *addr, int *addrlen) |
| static CriticalSection * | createCriticalSection () |
| static LIFOCriticalSection * | createLIFOCriticalSection () |
| static LIFOSemaphore * | createLIFOSemaphore (unsigned long initCount=0L) |
Private Member Functions | |
| System () | |
Static Private Attributes | |
| static CriticalSection * | systemCS = createCriticalSection() |
Definition at line 44 of file system.h.
| System::System | ( | ) | [inline, private] |
| void System::vdebugPrint | ( | const char * | format, | |
| va_list | args | |||
| ) | [static] |
Definition at line 108 of file system.cpp.
Referenced by debugPrint().
00109 { 00110 char buffer[1024]; 00111 _vsnprintf( buffer, sizeof(buffer)-4, format, args ); 00112 buffer[sizeof(buffer)-2] = '\0'; 00113 strcat(buffer, "\n"); 00114 OutputDebugString((LPCTSTR)buffer); 00115 }
| void System::debugPrint | ( | const char * | format, | |
| ... | ||||
| ) | [static] |
Definition at line 117 of file system.cpp.
References vdebugPrint().
00118 { 00119 if(format) 00120 { 00121 va_list args; 00122 va_start(args, format); 00123 vdebugPrint(format, args); 00124 va_end(args); 00125 } 00126 else 00127 { 00128 assert(format); 00129 } 00130 }
| static const char* System::strptime | ( | const char * | buf, | |
| const char * | format, | |||
| tm * | tm | |||
| ) | [static] |
| long System::getLastOSErrorCode | ( | void | ) | [static] |
| void System::displayErrorMessage | ( | const char * | title, | |
| const char * | message | |||
| ) | [static] |
Definition at line 157 of file system.cpp.
00158 { 00159 MessageBox( NULL, 00160 message, 00161 title, 00162 MB_OK | 00163 MB_SETFOREGROUND | 00164 //MB_DEFAULT_DESKTOP_ONLY or MB_SERVICE_NOTIFICATION 00165 MB_ICONERROR ); 00166 }
| unsigned long System::getOSTimeSeconds | ( | void | ) | [static] |
| void System::yieldThread | ( | ) | [static] |
| void System::sleep | ( | unsigned long | milliseconds | ) | [static] |
| void System::atomicIncrement | ( | volatile unsigned long & | v, | |
| CriticalSection * | varCS = systemCS | |||
| ) | [static] |
| void System::atomicDecrement | ( | volatile unsigned long & | v, | |
| CriticalSection * | varCS = systemCS | |||
| ) | [static] |
| int System::initializeSockets | ( | ) | [static] |
| void System::cleanupSockets | ( | ) | [static] |
| int System::closeSocket | ( | SOCKET | s | ) | [static] |
| SOCKET System::accept | ( | SOCKET | s, | |
| struct sockaddr * | addr, | |||
| int * | addrlen | |||
| ) | [static] |
Definition at line 132 of file system.cpp.
00133 { 00134 return( ::accept( s, addr, addrlen ) ); 00135 }
| static CriticalSection* System::createCriticalSection | ( | ) | [inline, static] |
| static LIFOCriticalSection* System::createLIFOCriticalSection | ( | ) | [inline, static] |
| static LIFOSemaphore* System::createLIFOSemaphore | ( | unsigned long | initCount = 0L |
) | [inline, static] |
CriticalSection * System::systemCS = createCriticalSection() [static, private] |
1.5.5