D:/WorkDir/SugoiProjects/SugoiTracer/include/SugoiTracer/config.h

Go to the documentation of this file.
00001 /* LICENSE_BEGIN
00002 SutoiTracer library supply support profiling functions, class, or evet simple 
00003 piece of code. It is part of the SugoiEngine project.
00004 Copyright (C) 2006 Allusse Yannick (yannick dot allusse at laposte dot net)
00005 
00006 
00007 This program is free software; you can redistribute it and/or
00008 modify it under the terms of the GNU General Public License
00009 as published by the Free Software Foundation; either version 2
00010 of the License, or (at your option) any later version.
00011 
00012 This program is distributed in the hope that it will be useful,
00013 but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 GNU General Public License for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with this program; if not, write to the Free Software
00019 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00020 LICENSE_END
00021 */
00022 #ifndef _SG_TRC_CONFIG_H
00023 #define _SG_TRC_CONFIG_H
00024 
00025 //===========================================
00026 //BASIC preprocessor definitions
00027 //===========================================
00028 
00029 //Compatibility with some MS VS 2003 project where command __cplusplus is restricted...
00030         #ifdef _CPP
00031                 #ifndef __cplusplus
00032                         #define __cplusplus 1
00033                 #endif
00034         #else
00035         #endif
00036 
00037 #ifdef _WIN32
00038         #ifdef _SG_TRC
00039                 #define _SG_TRC_DLL_EXPORT __declspec(dllexport)
00040         #else
00041                 #define _SG_TRC_DLL_EXPORT __declspec(dllimport)
00042                 #ifdef  NDEBUG
00043                         #pragma comment(lib ,"SugoiTracer.lib")
00044                 #else
00045                         #pragma comment(lib ,"SugoiTracerd.lib")
00046                 #endif
00047         #endif
00048         #ifdef _VCC2005
00049                 //#define _CRT_SECURE_NO_DEPRECATE // To disable deprecation (!)
00050                 #pragma warning(once : 4996) //some C++ functions were declared deprecated, show only once by function. 
00051         #endif
00052 #else
00053 
00054 #endif
00055 
00056 #define _SG_TRC_INLINE inline
00057 
00058 //===========================================
00059 
00060 
00061 //==========================================
00062 //      contants
00063 //==========================================
00064 #define _SG_TRC_MAX_NBR_FCT                     512
00065 #define _SG_TRC_MAX_NBR_RECORDS         512
00066 #define _SG_TRC_MAX_NBR_TIMES           512
00067 //==========================================
00068 #define _SG_TRC_SVG                                     0
00069 
00070 //includes =================================
00071 #include <SugoiTools\config.h>
00072 
00073 #ifdef __cplusplus
00074         
00075         #include <SugoiTools\cl_base_obj.h>
00076         #include <SugoiTools\cl_template_manager.h>
00077         #include <SugoiTools\xml.h>
00078 
00079         #ifdef _WIN32
00080                 #include <winsock.h>
00081         #else
00082                 #include <sys/h>
00083                 typedef long int LONGLONG;
00084         #endif
00085 
00086         using namespace SGE;    
00087 
00088         namespace SG_TRC{
00089                 //Pre-definitions of class...
00090                 template <typename TracerType> class CL_FUNCT_TRC;
00091                 template <typename TracerType> class CL_TEMP_TRACER;
00092                 template <typename TracerType> class CL_TRACER;
00093                 template <typename TracerType> class CL_TRACER_RECORD;
00094                 template <typename TracerType> class CL_CLASS_TRACER;
00095                 template <typename TracerType> class TTCL_APPLI_TRACER;
00096                 class CL_TRACE_BASE_PARAMS;
00097 
00098                 //Pre-definitions of Type...
00099                 /*#if _SG_TLS_SMARTPTR
00100                         typedef template <typename TracerType> SGE::CSmartPtr<CL_CLASS_TRACER<TracerType> >     TplClassHdle;
00101                         typedef template <typename TracerType> SGE::CSmartPtr<CL_CLASS_TRACER<TracerType> >     TplFctHdle;
00102                 #else
00103                         typedef CL_CLASS_TRACER<TracerType>*    TplClassHdle;
00104                         typedef CL_CLASS_TRACER<TracerType>*    TplFctHdle;
00105                 #endif
00106                 */
00107 
00108                 typedef class CL_TimerVal SG_TRC_Default_Trc_Type;
00109                 #define SG_TRC_Default_Trc_Type CL_TimerVal //CL_Virtual_Record
00110 
00111                 #define SG_TRC_FUNCT_BY_TIME            SG_TRC::CL_FUNCT_TRC<SG_TRC::SG_TRC_Default_Trc_Type>
00112                 #define SG_TRC_APPLY_BY_TIME            SG_TRC::TTCL_APPLI_TRACER<SG_TRC::SG_TRC_Default_Trc_Type>
00113                 typedef CL_TEMP_TRACER<SG_TRC_Default_Trc_Type> SG_TRC_TEMP_TRACER_BY_TIME;
00114 
00115 
00116                 #define _BENCH_GL(FctName, Fct, Param, SizeX, SizeY)Fct;
00117                 #define _BENCH(FctName, Fct, Param, SizeX, SizeY)Fct;
00118 
00119                 //==============================================
00120 
00121 
00122                 //==========================================
00123                 //extern char Indentstring[MaxIndentSize];
00124 
00125                 //Maccro definition 
00126 
00127 
00128                 /*
00129                 #define _SG_TRC_FCT_BENCH(FctName, Params){\
00130                         static SG_TRC_FUNCT_BY_TIME = TTCL_APPLI_TRACER<CL_TimerVal>::MainAppliTracer->AddFunct(FctName);\
00131                         SG_TRC_TEMP_TRACER_BY_TIME (ThisFct, NULL);\
00132                 }
00133                 */
00134 
00135                 #define _SG_TRC_FCT_BENCH(FctPtr, Fct, Params){\
00136                         SG_TRC_TEMP_TRACER_BY_TIME (ThisFct, NULL);\
00137                         Fct;\
00138                 }
00139 
00140                 #define _SG_TRC_FCT_BENCH2(FctName, Fct, Params){\
00141                         CL_FUNCT_TRC<CL_TimerVal>       *ThisFct = this->ARTimeTracer->AddFunct (FctName);\
00142                         SG_TRC_TEMP_TRACER_BY_TIME trace(ThisFct, NULL);\
00143                         Fct;\
00144                 }
00145 
00146                 #if 0
00147                 #define _SG_TRC_CREATE_CLASS_BENCH(FctName, Params){\
00148                         SG_Assert(ClassTracer, "No CL_CLASS_TRACER set for this class!");\
00149                         static SG_TRC_FUNCT_BY_TIME = ClassTracer->AddFunct(FctName);\
00150                         SG_TRC_TEMP_TRACER_BY_TIME trace(ThisFct, NULL);\
00151                 }
00152                 #endif
00153 
00154                 #if _SG_TLS_BENCHMARK
00155                 #define _SG_TRC_CREATE_CLASS_BENCH(ClassName){\
00156                 if (!ClassTracer)\
00157                                 {\
00158                                         TTCL_APPLI_TRACER<CL_TimerVal>::MainAppliTracer->ClassManager->Add(#ClassName);\
00159                                         SG_Assert(ClassTracer = TTCL_APPLI_TRACER<CL_TimerVal>::MainAppliTracer->ClassManager->GetLastAdded(), "Error while adding new class tracer!");\
00160                                 }\
00161                 }
00162                 #else
00163                 #define _SG_TRC_CREATE_CLASS_BENCH(ClassName)
00164                 #endif
00165 
00166                 
00167                 #if _SG_TRC_SVG
00168                   
00169                 //Benchmarking results using SVG
00173 
00174 
00175                 #define _CVG_SVG_CREATE_FILES 1
00176 
00180                 #define _CVG_SVG_CONVERT_TO_PNG _CVG_SVG_CREATE_FILES
00181 
00182                 #define _CVG_SVG_BATIK_RASTERIZER_PATH  "C:\\Program Files\\GPUCV v0.0.2\\resources\\bin\\batik-1.6\\batik-rasterizer.jar"//"..\\resources\\bin\\batik-1.6\\batik-rasterizer.jar"
00183 
00184                 #define _CVG_SVG_EXPORT_PATH  "svg"
00187                 #define _CVG_SVG_BATIK_RASTERIZER_SIZE "-w 450 -h 320 "
00188  // end of SVG_GRP
00189                 #endif// 0
00190         };//namespace SG_TRC
00191 #endif//__cplusplus
00192 
00193 
00194 #endif /_SG_TRC_CONFIG_H

Generated on Mon Mar 19 23:16:20 2007 for SugoiTracer by  doxygen 1.4.6-NO