00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #if !defined(PS_TRACE_H)
00017 #define PS_TRACE_H 1
00018
00019 #define PS_UNKNOWN_TRACE_LEVEL -9999 // we don't know this name's level
00020 #define PS_DEFAULT_TRACE_LEVEL -1
00021 #define PS_THE_OTHER_DEFAULT_TRACE_LEVEL 0
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #if defined(PS_NO_TRACE)
00032 # define psTrace(facil, level, ...) (void)0
00033
00034 # define p_psTrace(facil, level, ...) (void)0
00035
00036 # define psTraceSetLevel(facil,level) 0
00037 # define psTraceGetLevel(facil) 0
00038 # define psTraceReset() (void)0
00039 # define psTraceFree() (void)0
00040 # define psTracePrintLevels() (void)0
00041
00042 # define psTraceSetDestination(fp) (void)0
00043
00044 # else
00045
00046
00047
00048
00049
00050 typedef struct p_psComponent
00051 {
00052 const char *name;
00053 psS32 level;
00054 bool p_psSpecified;
00055 psS32 n;
00056 struct p_psComponent* *subcomp;
00057 }
00058 p_psComponent;
00059
00060 #ifdef DOXYGEN
00061 void psTrace(const char *facil,
00062 psS32 myLevel,
00063 ...)
00064 ;
00065 #else
00066
00067 void p_psTrace(const char *facil,
00068 psS32 myLevel,
00069 ...)
00070 ;
00071
00072 #ifndef SWIG
00073 #define psTrace(facil, level, ...) p_psTrace(facil, level, __VA_ARGS__)
00074 #endif
00075
00076 #endif
00077
00078
00079 psBool psTraceSetLevel(const char *facil,
00080 psS32 level)
00081 ;
00082
00083
00084 psS32 psTraceGetLevel(const char *facil)
00085 ;
00086
00087
00088 void psTraceReset();
00089
00090
00091 void psTracePrintLevels(void);
00092
00093
00094 void psTraceSetDestination(FILE * fp);
00095
00096
00097
00098 #endif
00099
00100 #endif