<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>Crystal Space 1.2.1: csutil/profile.h Source File (Crystal Space 1.2.1 Public API Reference)</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <table border="0" cellpadding="0" cellspacing="0" width="100%" class="head"> <tr height="59"> <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td> <td class="head"><h2>Public API Reference</h2></td> </tr> <tr height="11"> <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td> </tr> </table> <div class="content"> <!-- Generated by Doxygen 1.5.3 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="classes.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> </ul> </div> <h1>csutil/profile.h</h1><a href="csutil_2profile_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> <a name="l00002"></a>00002 <span class="comment"> Copyright (C) 2005 by Jorrit Tyberghein</span> <a name="l00003"></a>00003 <span class="comment"></span> <a name="l00004"></a>00004 <span class="comment"> This library is free software; you can redistribute it and/or</span> <a name="l00005"></a>00005 <span class="comment"> modify it under the terms of the GNU Library General Public</span> <a name="l00006"></a>00006 <span class="comment"> License as published by the Free Software Foundation; either</span> <a name="l00007"></a>00007 <span class="comment"> version 2 of the License, or (at your option) any later version.</span> <a name="l00008"></a>00008 <span class="comment"></span> <a name="l00009"></a>00009 <span class="comment"> This library is distributed in the hope that it will be useful,</span> <a name="l00010"></a>00010 <span class="comment"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00011"></a>00011 <span class="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> <a name="l00012"></a>00012 <span class="comment"> Library General Public License for more details.</span> <a name="l00013"></a>00013 <span class="comment"></span> <a name="l00014"></a>00014 <span class="comment"> You should have received a copy of the GNU Library General Public</span> <a name="l00015"></a>00015 <span class="comment"> License along with this library; if not, write to the Free</span> <a name="l00016"></a>00016 <span class="comment"> Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span> <a name="l00017"></a>00017 <span class="comment">*/</span> <a name="l00018"></a>00018 <a name="l00019"></a>00019 <span class="preprocessor">#ifdef CS_COMPILER_GCC</span> <a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor"> #warning Profiler support from csutil/profile.h has been deprecated. \</span> <a name="l00021"></a>00021 <span class="preprocessor">Check ivaria/profile.h for new interface.</span> <a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#ifdef CS_COMPILER_MSVC</span> <a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor"> #pragma message ("Profiler support from csutil/profile.h has been deprecated. \</span> <a name="l00025"></a>00025 <span class="preprocessor">Check ivaria/profile.h for new interface.")</span> <a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00027"></a>00027 <span class="preprocessor"></span> <a name="l00028"></a>00028 <span class="preprocessor">#ifndef __CS_UTIL_PROFILE_H__</span> <a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define __CS_UTIL_PROFILE_H__</span> <a name="l00030"></a>00030 <span class="preprocessor"></span> <a name="l00034"></a>00034 <span class="preprocessor">#include "csextern.h"</span> <a name="l00035"></a>00035 <span class="preprocessor">#include "<a class="code" href="csutil_2array_8h.html" title="Generic Array Template.">csutil/array.h</a>"</span> <a name="l00036"></a>00036 <span class="preprocessor">#include "<a class="code" href="csstring_8h.html" title="String utility class.">csutil/csstring.h</a>"</span> <a name="l00037"></a>00037 <span class="preprocessor">#include "<a class="code" href="scf__implementation_8h.html" title="Crystal Space Shared Class Facility (SCF) - implementation creation support.">csutil/scf_implementation.h</a>"</span> <a name="l00038"></a>00038 <span class="preprocessor">#include "<a class="code" href="ivaria_2profile_8h.html" title="Interface and helper macros for performance profiler.">ivaria/profile.h</a>"</span> <a name="l00039"></a>00039 <a name="l00040"></a>00040 <span class="preprocessor">#include "<a class="code" href="msvc__deprecated__warn__off_8h.html" title="Disable MSVC deprecated warnings.">csutil/win32/msvc_deprecated_warn_off.h</a>"</span> <a name="l00041"></a>00041 <a name="l00045"></a><a class="code" href="structcsProfileInfo.html">00045</a> <span class="keyword">struct </span><a class="code" href="cssysdef_8h.html#91e256b131a2cf6b4b9db8830a0c88f4" title="A variant of CS_DEPRECATED_TYPE that also emits the message msg on compilers that...">CS_DEPRECATED_TYPE_MSG</a>("Old profiling discontinued; check docs <span class="keywordflow">for</span> <span class="keyword">new</span> API<span class="stringliteral">")</span> <a name="l00046"></a>00046 <span class="stringliteral">csProfileInfo</span> <a name="l00047"></a>00047 <span class="stringliteral">{</span> <a name="l00048"></a><a class="code" href="structcsProfileInfo.html#be4dd5deb5c9e5afd96c1a032afc45fc">00048</a> <span class="stringliteral"> const char* token;</span> <a name="l00049"></a><a class="code" href="structcsProfileInfo.html#7d5e0d6ec695bcdb852c8543a7e28525">00049</a> <span class="stringliteral"> const char* file;</span> <a name="l00050"></a><a class="code" href="structcsProfileInfo.html#a0a352e02a28ad9aef012f12663b4109">00050</a> <span class="stringliteral"> int line;</span> <a name="l00051"></a><a class="code" href="structcsProfileInfo.html#c4432b7fc7861a446f0c82301fb16de7">00051</a> <span class="stringliteral"> uint32* ptr_count;</span> <a name="l00052"></a><a class="code" href="structcsProfileInfo.html#42e006613467d35f0cdc45f123f8182d">00052</a> <span class="stringliteral"> uint32* ptr_time;</span> <a name="l00053"></a><a class="code" href="structcsProfileInfo.html#47cc4fe82978fe27d80d17a64454d8aa">00053</a> <span class="stringliteral"> uint32* ptr_timemin;</span> <a name="l00054"></a><a class="code" href="structcsProfileInfo.html#e94fd5838da34d9a5e3fa24ff0400e46">00054</a> <span class="stringliteral"> uint32* ptr_timemax;</span> <a name="l00055"></a>00055 <span class="stringliteral">};</span> <a name="l00056"></a>00056 <span class="stringliteral"></span> <a name="l00060"></a><a class="code" href="classcsProfiler.html">00060</a> <span class="stringliteral">class CS_DEPRECATED_TYPE_MSG("</span>Old profiling discontinued; check docs <span class="keywordflow">for</span> <span class="keyword">new</span> API<span class="stringliteral">")</span> <a name="l00061"></a>00061 <span class="stringliteral">csProfiler : public scfImplementation0<csProfiler></span> <a name="l00062"></a>00062 <span class="stringliteral">{</span> <a name="l00063"></a>00063 <span class="stringliteral">public:</span> <a name="l00064"></a><a class="code" href="classcsProfiler.html#bcfcf36431ea21dfeefa348e327933b2">00064</a> <span class="stringliteral"> csArray<csProfileInfo> profile_info;</span> <a name="l00065"></a><a class="code" href="classcsProfiler.html#c727d3d64cc94ad2c7db739fc878912d">00065</a> <span class="stringliteral"> csArray<CS::Debug::ProfileZone*> profile_zones;</span> <a name="l00066"></a><a class="code" href="classcsProfiler.html#856113186c4a6f8570a3ea77f15e998c">00066</a> <span class="stringliteral"> csArray<CS::Debug::ProfileCounter*> profile_counters;</span> <a name="l00067"></a>00067 <span class="stringliteral"></span> <a name="l00068"></a>00068 <span class="stringliteral">public:</span> <a name="l00069"></a><a class="code" href="classcsProfiler.html#ed5f994244d5d364b1682b8d5439875c">00069</a> <span class="stringliteral"> csProfiler () : scfImplementationType (this) {}</span> <a name="l00070"></a><a class="code" href="classcsProfiler.html#605f0d13fa75f1e17b6bc4252edb133b">00070</a> <span class="stringliteral"> virtual ~csProfiler () {}</span> <a name="l00071"></a>00071 <span class="stringliteral"></span> <a name="l00072"></a>00072 <span class="stringliteral"> // Dummies to keep class compiling</span> <a name="l00073"></a><a class="code" href="classcsProfiler.html#0b7f0c89a2db710b44d57d70486b2146">00073</a> <span class="stringliteral"> void Reset () {}</span> <a name="l00074"></a><a class="code" href="classcsProfiler.html#379cca0a5065424756c952df6a37f8a0">00074</a> <span class="stringliteral"> CS::Debug::ProfileZone* GetProfileZone (const char* zonename)</span> <a name="l00075"></a>00075 <span class="stringliteral"> { return 0; }</span> <a name="l00076"></a><a class="code" href="classcsProfiler.html#8102a81a3b8937e5f3427ed345bf7e44">00076</a> <span class="stringliteral"> CS::Debug::ProfileCounter* GetProfileCounter (const char* countername)</span> <a name="l00077"></a>00077 <span class="stringliteral"> { return 0; }</span> <a name="l00078"></a><a class="code" href="classcsProfiler.html#f587c40aa82f451450d8ba4c50749949">00078</a> <span class="stringliteral"> const csArray<CS::Debug::ProfileZone*>& GetProfileZones ()</span> <a name="l00079"></a>00079 <span class="stringliteral"> { return profile_zones; }</span> <a name="l00080"></a><a class="code" href="classcsProfiler.html#c235301e22b0483a8debea498446bc24">00080</a> <span class="stringliteral"> const csArray<CS::Debug::ProfileCounter*>& GetProfileCounters ()</span> <a name="l00081"></a>00081 <span class="stringliteral"> { return profile_counters; }</span> <a name="l00082"></a>00082 <span class="stringliteral">};</span> <a name="l00083"></a>00083 <span class="stringliteral"></span> <a name="l00084"></a>00084 <span class="stringliteral">namespace CS</span> <a name="l00085"></a>00085 <span class="stringliteral">{</span> <a name="l00086"></a>00086 <span class="stringliteral"> namespace Macros</span> <a name="l00087"></a>00087 <span class="stringliteral"> {</span> <a name="l00088"></a>00088 <span class="stringliteral"> CS_DEPRECATED_TYPE_MSG("</span>Old profiling discontinued; check docs <span class="keywordflow">for</span> <span class="keyword">new</span> API<span class="stringliteral">")</span> <a name="l00089"></a><a class="code" href="namespaceCS_1_1Macros.html#31d062df987b8e7550bd740fbccfe678">00089</a> <span class="stringliteral"> inline void CS_PROFTIME() {}</span> <a name="l00090"></a>00090 <span class="stringliteral"> CS_DEPRECATED_TYPE_MSG("</span>Old profiling discontinued; check docs <span class="keywordflow">for</span> <span class="keyword">new</span> API<span class="stringliteral">")</span> <a name="l00091"></a><a class="code" href="namespaceCS_1_1Macros.html#f2538e2373bc6d19c5dcca2feb062fa9">00091</a> <span class="stringliteral"> inline void CS_PROFRESET() {}</span> <a name="l00092"></a>00092 <span class="stringliteral"> CS_DEPRECATED_TYPE_MSG("</span>Old profiling discontinued; check docs <span class="keywordflow">for</span> <span class="keyword">new</span> API<span class="stringliteral">")</span> <a name="l00093"></a><a class="code" href="namespaceCS_1_1Macros.html#51012830ac377d4d1d2351d98b68b7d2">00093</a> <span class="stringliteral"> inline void CS_PROFDUMP() {}</span> <a name="l00094"></a>00094 <span class="stringliteral"> CS_DEPRECATED_TYPE_MSG("</span>Old profiling discontinued; check docs <span class="keywordflow">for</span> <span class="keyword">new</span> API<span class="stringliteral">")</span> <a name="l00095"></a><a class="code" href="namespaceCS_1_1Macros.html#4b03d7b7a6c7de8e246b2ab01aef4e32">00095</a> <span class="stringliteral"> inline void CS_PROFSTART() {}</span> <a name="l00096"></a>00096 <span class="stringliteral"> CS_DEPRECATED_TYPE_MSG("</span>Old profiling discontinued; check docs <span class="keywordflow">for</span> <span class="keyword">new</span> API<span class="stringliteral">")</span> <a name="l00097"></a><a class="code" href="namespaceCS_1_1Macros.html#becd254b39b804cdf485d8f1c03b4339">00097</a> <span class="stringliteral"> inline void CS_PROFSTOP() {}</span> <a name="l00098"></a>00098 <span class="stringliteral"> } // namespace Macros</span> <a name="l00099"></a>00099 <span class="stringliteral">} // namespace CS</span> <a name="l00100"></a>00100 <span class="stringliteral"></span> <a name="l00104"></a><a class="code" href="csutil_2profile_8h.html#d68adf13367683e84331ec93a480e6c5">00104</a> <span class="stringliteral">#define CS_PROFTIME(v) CS::Macros::CS_PROFTIME(); v = 0</span> <a name="l00108"></a><a class="code" href="csutil_2profile_8h.html#0ba686052d0df8a8cb3d197621697df8">00108</a> <span class="stringliteral">#define CS_PROFRESET(a) CS::Macros::CS_PROFRESET()</span> <a name="l00112"></a><a class="code" href="csutil_2profile_8h.html#ca10c7ee5979cfa5ca97f171b8b173c1">00112</a> <span class="stringliteral">#define CS_PROFDUMP(a) CS::Macros::CS_PROFDUMP()</span> <a name="l00116"></a><a class="code" href="csutil_2profile_8h.html#10dfe885a32819ea1f2b8824d18e703a">00116</a> <span class="stringliteral">#define CS_PROFSTART(a,b) CS::Macros::CS_PROFSTART()</span> <a name="l00120"></a><a class="code" href="csutil_2profile_8h.html#366ee234d300524966ad362f2662b815">00120</a> <span class="stringliteral">#define CS_PROFSTOP(a) CS::Macros::CS_PROFSTOP()</span> <a name="l00121"></a>00121 <span class="stringliteral"></span> <a name="l00122"></a>00122 <span class="stringliteral">#include "</span>csutil/win32/msvc_deprecated_warn_on.h<span class="stringliteral">"</span> <a name="l00123"></a>00123 <span class="stringliteral"></span> <a name="l00124"></a>00124 <span class="stringliteral">#endif //__CS_UTIL_PROFILE_H__</span> <a name="l00125"></a>00125 <span class="stringliteral"></span> </pre></div><hr size="1"><address><small>Generated for Crystal Space 1.2.1 by <a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 </small></address> </div></body> </html>