wxArt2D
prflenbl.h
Go to the documentation of this file.
1 /*! \file wx/genart/prflenbl.h
2  \brief profiling classes
3  \author Michael Sögtrop
4  \date Created 08/05/2004
5 
6  Copyright: 2004-2004 (c) Michael Sögtrop
7 
8  Licence: wxWidgets Licence
9 
10  RCS-ID: $Id: prflenbl.h,v 1.6 2005/08/16 16:47:52 titato Exp $
11 */
12 //
13 // Zusammenfassung der Anwendungsdetails der Klasse a2dProfiler
14 //
15 // Profiling ist nur eingeschaltet, wenn das macro PRFL_ENBL definiert ist
16 // oder wenn die Datei PrflEnbl.h includiert wird.
17 //
18 // siehe auch:
19 // prflCnt.h
20 // prflCntHstg.h
21 // prflTmr.h
22 //
23 ///////////////////////////////////////////////////////////////////////////////
24 
25 #if(defined(TRACE_H))
26 #pragma message(__FILE__)
27 #endif
28 
29 ///////////////////////////////////////////////////////////////////////////////
30 //
31 // Schutz gegen doppelte Einbindung
32 //
33 ///////////////////////////////////////////////////////////////////////////////
34 
35 #if(!defined(PrflEnbl_H))
36 #define PrflEnbl_H
37 
38 ///////////////////////////////////////////////////////////////////////////////
39 //
40 // Test der vorausgesetzten include Dateien
41 //
42 ///////////////////////////////////////////////////////////////////////////////
43 
44 #if(!defined(Prfl_H))
45 #error Please include 'prfl.h' before including prflenbl.h
46 #endif
47 
48 
49 //*****************************************************************************
50 //*
51 //* Einschalten des Profiling
52 //*
53 //*****************************************************************************
54 
55 #undef PRFL_DUMP
56 #define PRFL_DUMP a2dProfiler::PrflDump
57 
58 #undef PRFL_CNT
59 #undef PRFL_CNT_DCLR
60 #undef PRFL_CNT_CNT
61 #define PRFL_CNT(id) {static a2dProfilerCount prfl_##id(#id); prfl_##id.Cnt();}
62 #define PRFL_CNT_DCLR(id) {static a2dProfilerCount prfl_##id(#id);}
63 #define PRFL_CNT_CNT(id) {prfl_##id.Cnt();}
64 
65 #undef PRFL_CNT_HSTG
66 #define PRFL_CNT_HSTG(id,hstg,hstgMin,hstgMax) {static a2dProfilerHistogram prfl_##id(#id,hstgMin,hstgMax); prfl_##id.Cnt(hstg);}
67 
68 #undef PRFL_CNT_MEAN
69 #define PRFL_CNT_MEAN(id,val) {static a2dProfilerMean prfl_##id(_T(#id)); prfl_##id.Cnt(val);}
70 
71 #undef PRFL_BGN_TMR
72 #undef PRFL_END_TMR
73 #undef PRFL_AUTO_TMR
74 #define PRFL_BGN_TMR(id) static a2dProfilerTimer prfl_##id(_T(#id)); prfl_##id.BgnBlck();
75 #define PRFL_END_TMR(id) prfl_##id.EndBlck();
76 #define PRFL_AUTO_TMR(id) static a2dProfilerTimer prfl_auto1_##id(_T(#id)); a2dProfilerTimer::SPrflTmrAuto prfl_auto2_##id(&prfl_auto1_##id);
77 
78 #undef PRFL_BGN_TMR_MIN
79 #undef PRFL_END_TMR_MIN
80 #define PRFL_BGN_TMR_MIN(id) static CPrflTmrMin prfl_##id(_T(#id)); prfl_##id.BgnBlck();
81 #define PRFL_END_TMR_MIN(id) prfl_##id.EndBlck();
82 
83 #define PRFL_ENBL
84 
85 #endif // PrflEnbl_H
prflenbl.h Source File -- Sun Oct 12 2014 17:04:23 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation