TS_CPP
An efficient & easy to use implementation of a Symbol table used in most compilers
Loading...
Searching...
No Matches
TSConfig.h
1
/*
2
*
3
* This header configures the level of verbosity of the TSManager module
4
* Verbose level can range from TS_LEVEL_MUTE (No messages) to TS_LEVEL_DEBUG (All messages)
5
* To set the level of verbosity, modify macro TS_PRINT_MESSAGES_LEVEL a few lines below
6
*
7
*/
8
9
#ifndef TS_TSCONFIG_H
10
#define TS_TSCONFIG_H
11
12
namespace
TS_CPP
{
13
14
#define STRINGIFY(x) #x
15
#define TOSTRING(x) STRINGIFY(x)
16
#define AT " AT " __FILE__ ":" TOSTRING(__LINE__)
17
18
#define TS_LEVEL_DEBUG 3
19
#define TS_LEVEL_INFO 2
20
#define TS_LEVEL_ERROR 1
21
#define TS_LEVEL_MUTE 0
22
23
#ifndef TS_DISPLACEMENT_ATTR_NAME
25
#define TS_DISPLACEMENT_ATTR_NAME "Despl"
26
#endif
27
28
#ifndef TS_SIZE_ATTR_NAME
30
#define TS_SIZE_ATTR_NAME "Size"
31
#endif
32
33
#ifndef TS_PRINT_MESSAGES_LEVEL
35
#define TS_PRINT_MESSAGES_LEVEL TS_LEVEL_ERROR
// CHANGE THIS LINE TO SET THE LEVEL OF PRINT MESSAGES
36
#endif
37
38
#ifndef TS_NULLSTRINGREPLACEMENT
40
#define TS_NULLSTRINGREPLACEMENT "'-'"
41
#endif
42
43
#if TS_PRINT_MESSAGES_LEVEL == TS_LEVEL_DEBUG
44
#define tsdebug(...) {fprintf(stderr,"TS_DEBUG: "); fprintf(stderr, __VA_ARGS__); fprintf(stderr,"\n"); fflush(stderr);}
45
#else
46
#define tsdebug(...)
47
#endif
48
49
#if TS_PRINT_MESSAGES_LEVEL >= TS_LEVEL_INFO
50
#define tsinfo(...) {fprintf(stderr,"TS_INFO: "); fprintf(stderr, __VA_ARGS__); fprintf(stderr,"\n"); fflush(stderr);}
51
#else
52
#define tsinfo(...)
53
#endif
54
55
#if TS_PRINT_MESSAGES_LEVEL >= TS_LEVEL_ERROR
56
#define tserror(...) {fprintf(stderr,"TS_ERROR:" AT "; "); fprintf(stderr, __VA_ARGS__); fprintf(stderr,"\n"); fflush(stderr);}
57
#else
58
#define tserror(...)
59
#endif
60
61
}
62
63
#endif
//TS_TSCONFIG_H
TS_CPP
Definition
AttributeValue.h:10
Include
TSConfig.h
Generated by
1.11.0