forked from pspdev/prxtool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
output.h
36 lines (31 loc) · 848 Bytes
/
output.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/***************************************************************
* PRXTool : Utility for PSP executables.
* (c) TyRaNiD 2k5
*
* output.h - Definition of a class to handle textual output.
***************************************************************/
#ifndef __OUTPUT_H__
#define __OUTPUT_H__
enum OutputLevel
{
LEVEL_INFO = 0,
LEVEL_WARNING = 1,
LEVEL_ERROR = 2,
LEVEL_DEBUG = 3
};
typedef void (*OutputHandler)(OutputLevel level, const char *szDebug);
class COutput
{
/* Enables debug output */
static bool m_blDebug;
static OutputHandler m_fnOutput;
COutput() {};
~COutput() {};
public:
static void SetDebug(bool blDebug);
static bool GetDebug();
static void SetOutputHandler(OutputHandler fn);
static void Puts(OutputLevel level, const char *str);
static void Printf(OutputLevel level, const char *str, ...);
};
#endif