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