1 /*****************************************************************************
4 ** Name: trace.cpp Class for trace
5 ** Programmer: Kevin Rosenberg
6 ** Date Started: June 2000
8 ** This is part of the CTSim program
9 ** Copyright (C) 1983-2000 Kevin Rosenberg
11 ** $Id: trace.cpp,v 1.1 2000/07/20 11:17:31 kevin Exp $
13 ** This program is free software; you can redistribute it and/or modify
14 ** it under the terms of the GNU General Public License (version 2) as
15 ** published by the Free Software Foundation.
17 ** This program is distributed in the hope that it will be useful,
18 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ** GNU General Public License for more details.
22 ** You should have received a copy of the GNU General Public License
23 ** along with this program; if not, write to the Free Software
24 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 ******************************************************************************/
29 const char TraceLevel::TRACE_NONE_STR[]= "none";
30 const char TraceLevel::TRACE_TEXT_STR[]= "text";
31 const char TraceLevel::TRACE_PHM_STR[]= "phm";
32 const char TraceLevel::TRACE_RAYS_STR[]= "rays";
33 const char TraceLevel::TRACE_PLOT_STR[]= "plot";
34 const char TraceLevel::TRACE_CLIPPING_STR[]= "clipping";
38 TraceLevel::convertTraceNameToID (const char *traceString)
40 TraceID traceID = TRACE_INVALID;
42 if (strcasecmp (traceString, TRACE_NONE_STR) == 0)
44 else if (strcasecmp (traceString, TRACE_TEXT_STR) == 0)
46 else if (strcasecmp (traceString, TRACE_PHM_STR) == 0)
48 else if (strcasecmp (traceString, TRACE_PLOT_STR) == 0)
50 else if (strcasecmp (traceString, TRACE_CLIPPING_STR) == 0)
51 traceID = TRACE_CLIPPING;
52 else if (strcasecmp (traceString, TRACE_RAYS_STR) == 0)