X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=include%2Ftrace.h;h=fd2d1d134612b5de6f63d0a642f1bdf1855b40a8;hp=64826e9a47ab6b5e97ec471b231eff7f1e2e4fec;hb=9f29c8b32c972db1178d6f8551d5cd57ceb67083;hpb=1e88cf0f7fa4f690ea9f110e8ed3f2b5338d0a10 diff --git a/include/trace.h b/include/trace.h index 64826e9..fd2d1d1 100644 --- a/include/trace.h +++ b/include/trace.h @@ -1,25 +1,52 @@ +/***************************************************************************** +** FILE IDENTIFICATION +** +** Name: trace.h +** Purpose: Header file for Trace class +** Author: Kevin Rosenberg +** Date Started: Oct 2000 +** +** This is part of the CTSim program +** Copyright (c) 1983-2001 Kevin Rosenberg +** +** $Id: trace.h,v 1.8 2001/01/28 19:10:18 kevin Exp $ +** +** This program is free software; you can redistribute it and/or modify +** it under the terms of the GNU General Public License (version 2) as +** published by the Free Software Foundation. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; if not, write to the Free Software +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +******************************************************************************/ + #ifndef TRACE_H #define TRACE_H -static const int TRACE_INVALID = 0xFFFF; -static const int TRACE_NONE = 0x0000; -static const int TRACE_TEXT = 0x0001; -static const int TRACE_PHM = 0x0002; -static const int TRACE_RAYS = 0x0004; -static const int TRACE_PLOT = 0x0008; -static const int TRACE_CLIPPING = 0x0010; -class TraceLevel +class Trace { public: - static const char TRACE_NONE_STR[]; - static const char TRACE_TEXT_STR[]; - static const char TRACE_PHM_STR[]; - static const char TRACE_RAYS_STR[]; - static const char TRACE_PLOT_STR[]; - static const char TRACE_CLIPPING_STR[]; - - TraceLevel (const char* const traceString); + static const int TRACE_INVALID; + static const int TRACE_NONE; + static const int TRACE_CONSOLE; + static const int TRACE_PHANTOM; + static const int TRACE_PROJECTIONS; + static const int TRACE_PLOT; + static const int TRACE_CLIPPING; + + static const int BIT_CONSOLE; + static const int BIT_PHANTOM; + static const int BIT_PROJECTIONS; + static const int BIT_PLOT; + static const int BIT_CLIPPING; + + Trace (const char* const traceString); void addTrace (const char* const traceString); @@ -28,12 +55,23 @@ class TraceLevel int getTraceLevel(void) const { return m_traceLevel; } static int convertTraceNameToID (const char* traceName); + static const char* convertTraceIDToTitle (int idTrace); + static const char* convertTraceIDToName (int idTrace); + + static const int getTraceCount() {return s_iTraceCount;} + static const char** getTraceNameArray() {return s_aszTraceName;} + static const char** getTraceTitleArray() {return s_aszTraceTitle;} private: int m_traceLevel; bool addTraceElements (const char* const traceString); + + static const char* s_aszTraceName[]; + static const char* s_aszTraceTitle[]; + static const int s_iTraceCount; + };