wxArt2D
prfl.cpp
1 /*! \file general/src/prfl.cpp
2  \author Michael Sögtrop
3  \date Created 08/05/2004
4 
5  Copyright: 2004-2004 (c) Michael Sögtrop
6 
7  Licence: wxWidgets Licence
8 
9  RCS-ID: $Id: prfl.cpp,v 1.2 2005/06/27 19:52:43 titato Exp $
10 */
11 
12 ///////////////////////////////////////////////////////////////////////////////
13 //
14 // .h Includedateien
15 // In diesen Dateien darf kein Aufruf von new erfolgen
16 //
17 ///////////////////////////////////////////////////////////////////////////////
18 
19 #include "a2dprec.h"
20 
21 #ifdef __BORLANDC__
22 #pragma hdrstop
23 #endif
24 
25 #ifndef WX_PRECOMP
26 #include "wx/wx.h"
27 #endif
28 
29 #include "wx/genart/prfl.h"
30 
31 ///////////////////////////////////////////////////////////////////////////////
32 //
33 // .inl Includedateien
34 // In diesen Dateien darf kein new Operator deklariert werden
35 //
36 ///////////////////////////////////////////////////////////////////////////////
37 
38 ///////////////////////////////////////////////////////////////////////////////
39 //
40 // Speicherschutz unter Debug fuer Implemenatation
41 //
42 ///////////////////////////////////////////////////////////////////////////////
43 
44 #ifdef _DEBUG
45 #undef THIS_FILE
46 static char THIS_FILE[] = __FILE__;
47 #endif
48 
49 //*****************************************************************************
50 //*
51 //* Klasse a2dProfiler: Erzeugungs und Vernichtungsoperatoren
52 //*
53 //*****************************************************************************
54 
55 ///////////////////////////////////////////////////////////////////////////////
56 //
57 // Standard-Erzeugungsoperator
58 //
59 ///////////////////////////////////////////////////////////////////////////////
60 
61 a2dProfiler::a2dProfiler( const wxString& idIn )
62 {
63  id = idIn;
64  nmbrActv++;
65 }
66 
67 ///////////////////////////////////////////////////////////////////////////////
68 //
69 // Vernichtungsoperator
70 //
71 ///////////////////////////////////////////////////////////////////////////////
72 
74 {
75  nmbrActv--;
76  if( !nmbrActv )
77  {
78  }
79 }
80 
81 //*****************************************************************************
82 //*
83 //* Klasse a2dProfiler: Zugriffsfunktionen
84 //*
85 //*****************************************************************************
86 
87 //*****************************************************************************
88 //*
89 //* Klasse a2dProfiler: Verarbeitungsfunktionen
90 //*
91 //*****************************************************************************
92 
93 ///////////////////////////////////////////////////////////////////////////////
94 //
95 // Öffnet die Profile-Datei, wenn sie noch nicht offen ist
96 //
97 ///////////////////////////////////////////////////////////////////////////////
98 
100 {
101  if( !prflFile.IsOpened() )
102  {
103  prflFile.Open( wxT( "Profile.log" ), wxT( "a" ) );
104  if ( prflFile.IsOpened() )
105  {
106  wxString str = wxT( "\n\nProfile-Id |Count |Total Gigacycles|Avg. Cycles/call\n" );
107  prflFile.Write( str );
108  }
109  }
110 }
111 
112 //*****************************************************************************
113 //*
114 //* Klasse a2dProfiler: interne Funktionen
115 //*
116 //*****************************************************************************
117 
118 //*****************************************************************************
119 //*
120 //* Klasse a2dProfiler: statische Variablen
121 //*
122 //*****************************************************************************
123 
124 // Bei der Initialisierung verläßt man sich auf die 0-Vorinitialisierung
125 
static void OpenPrflFile()
opens the profiling data file, if not yet open.
Definition: prfl.cpp:99
~a2dProfiler()
destructor
Definition: prfl.cpp:73
a2dProfiler(const wxString &idIn)
constructor
Definition: prfl.cpp:61
static int nmbrActv
Number of aktive PrflCnt ( the last one closes the file. )
Definition: prfl.h:68
profiling classes
prfl.cpp Source File -- Sun Oct 12 2014 17:04:23 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation