Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
wdebug.h File Reference
#include "wstypes.h"
#include <iostream>
#include "sem4.h"
#include "odevice.h"
#include "streamer.h"
#include "xtime.h"
#include "timezone.h"
#include "filed.h"

Go to the source code of this file.

Classes

class  MsgManager
 

Macros

#define USE_DEBUG_SEM
 
#define IN   const
 
#define DEBUGLOCK   DebugLibSemaphore.Wait()
 
#define DEBUGUNLOCK   DebugLibSemaphore.Post()
 
#define INFMSG(X)
 
#define WRNMSG(X)
 
#define ERRMSG(X)
 
#define INFSTREAM(X)
 
#define WRNSTREAM(X)
 
#define ERRSTREAM(X)
 
#define DBG(X)
 
#define DBGSTREAM(X)
 
#define PVAR(v)
 
#define DBGMSG(X)
 
#define VERBOSE(X)
 

Variables

Sem4 DebugLibSemaphore
 

Macro Definition Documentation

◆ DBG

#define DBG ( X)

Definition at line 178 of file wdebug.h.

◆ DBGMSG

#define DBGMSG ( X)
Value:
{}

Definition at line 181 of file wdebug.h.

◆ DBGSTREAM

#define DBGSTREAM ( X)
Value:
{}

Definition at line 179 of file wdebug.h.

◆ DEBUGLOCK

#define DEBUGLOCK   DebugLibSemaphore.Wait()

Definition at line 93 of file wdebug.h.

◆ DEBUGUNLOCK

#define DEBUGUNLOCK   DebugLibSemaphore.Post()

Definition at line 94 of file wdebug.h.

◆ ERRMSG

#define ERRMSG ( X)
Value:
{\
char timebuf[40]; \
Xtime now; \
now -= TimezoneOffset(); \
now.FormatTime(timebuf, "mm/dd/yy hh:mm:ss"); \
(*(MsgManager::errorStream())) << "ERR " << timebuf << " [" << \
__FILE__ << " " << __LINE__ << "] " << X << endl; \
}
static ostream * errorStream(void)
Definition wdebug.cpp:140
Definition xtime.h:56
bit8 FormatTime(char *out, char *format)
Definition xtime.cpp:315
int TimezoneOffset(void)
Definition timezone.cpp:66
#define DEBUGUNLOCK
Definition wdebug.h:94
#define DEBUGLOCK
Definition wdebug.h:93

Definition at line 130 of file wdebug.h.

◆ ERRSTREAM

#define ERRSTREAM ( X)
Value:

Definition at line 163 of file wdebug.h.

◆ IN

#define IN   const

Definition at line 70 of file wdebug.h.

◆ INFMSG

#define INFMSG ( X)
Value:
{\
char timebuf[40]; \
Xtime now; \
now -= TimezoneOffset(); \
now.FormatTime(timebuf, "mm/dd/yy hh:mm:ss"); \
(*(MsgManager::infoStream())) << "INF " << timebuf << " [" << \
__FILE__ << " " << __LINE__ << "] " << X << endl; \
}
static ostream * infoStream(void)
Definition wdebug.cpp:130

Definition at line 102 of file wdebug.h.

◆ INFSTREAM

#define INFSTREAM ( X)
Value:

Definition at line 145 of file wdebug.h.

◆ PVAR

#define PVAR ( v)
Value:
{}

Definition at line 180 of file wdebug.h.

◆ USE_DEBUG_SEM

#define USE_DEBUG_SEM

Definition at line 56 of file wdebug.h.

◆ VERBOSE

#define VERBOSE ( X)
Value:
{}

Definition at line 182 of file wdebug.h.

◆ WRNMSG

#define WRNMSG ( X)
Value:
{\
char timebuf[40]; \
Xtime now; \
now -= TimezoneOffset(); \
now.FormatTime(timebuf, "mm/dd/yy hh:mm:ss"); \
(*(MsgManager::warnStream())) << "WRN " << timebuf << " [" << \
__FILE__ << " " << __LINE__ << "] " << X << endl; \
}
static ostream * warnStream(void)
Definition wdebug.cpp:135

Definition at line 116 of file wdebug.h.

◆ WRNSTREAM

#define WRNSTREAM ( X)
Value:

Definition at line 154 of file wdebug.h.

Variable Documentation

◆ DebugLibSemaphore

Sem4 DebugLibSemaphore
extern

Definition at line 46 of file wdebug.cpp.