Debian Codegraph @

include/trace.h

raw
1 /*****************************************************************************
2 ** FILE IDENTIFICATION
3 **
4 ** Name: trace.h
5 ** Purpose: Header file for Trace class
6 ** Author: Kevin Rosenberg
7 ** Date Started: Oct 2000
8 **
9 ** This is part of the CTSim program
10 ** Copyright (c) 1983-2009 Kevin Rosenberg
11 **
12 ** This program is free software; you can redistribute it and/or modify
13 ** it under the terms of the GNU General Public License (version 2) as
14 ** published by the Free Software Foundation.
15 **
16 ** This program is distributed in the hope that it will be useful,
17 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ** GNU General Public License for more details.
20 **
21 ** You should have received a copy of the GNU General Public License
22 ** along with this program; if not, write to the Free Software
23 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 ******************************************************************************/
25
26 #ifndef TRACE_H
27 #define TRACE_H
28
29
30 class Trace
31 {
32 public:
33 static const int TRACE_INVALID;
34 static const int TRACE_NONE;
35 static const int TRACE_CONSOLE;
36 static const int TRACE_PHANTOM;
37 static const int TRACE_PROJECTIONS;
38 static const int TRACE_PLOT;
39 static const int TRACE_CLIPPING;
40
41 static const int BIT_CONSOLE;
42 static const int BIT_PHANTOM;
43 static const int BIT_PROJECTIONS;
44 static const int BIT_PLOT;
45 static const int BIT_CLIPPING;
46
47 Trace (const char* const traceString);
48
49 void addTrace (const char* const traceString);
50
51 bool isTrace (const char* const traceQuery) const;
52
53 int getTraceLevel(void) const { return m_traceLevel; }
54
55 static int convertTraceNameToID (const char* traceName);
56 static const char* convertTraceIDToTitle (int idTrace);
57 static const char* convertTraceIDToName (int idTrace);
58
59 static const int getTraceCount() {return s_iTraceCount;}
60 static const char** getTraceNameArray() {return s_aszTraceName;}
61 static const char** getTraceTitleArray() {return s_aszTraceTitle;}
62
63 private:
64
65 int m_traceLevel;
66
67 bool addTraceElements (const char* const traceString);
68
69 static const char* s_aszTraceName[];
70 static const char* s_aszTraceTitle[];
71 static const int s_iTraceCount;
72
73 };
74
75
76 #endif
77