Coin Logo http://www.sim.no/
http://www.coin3d.org/

SoProfilingReportGenerator.h
00001 #ifndef COIN_SOPROFILINGREPORTGENERATOR_H
00002 #define COIN_SOPROFILINGREPORTGENERATOR_H
00003 
00004 /**************************************************************************\
00005  *
00006  *  This file is part of the Coin 3D visualization library.
00007  *  Copyright (C) by Kongsberg Oil & Gas Technologies.
00008  *
00009  *  This library is free software; you can redistribute it and/or
00010  *  modify it under the terms of the GNU General Public License
00011  *  ("GPL") version 2 as published by the Free Software Foundation.
00012  *  See the file LICENSE.GPL at the root directory of this source
00013  *  distribution for additional information about the GNU GPL.
00014  *
00015  *  For using Coin with software that can not be combined with the GNU
00016  *  GPL, and for taking advantage of the additional benefits of our
00017  *  support services, please contact Kongsberg Oil & Gas Technologies
00018  *  about acquiring a Coin Professional Edition License.
00019  *
00020  *  See http://www.coin3d.org/ for more information.
00021  *
00022  *  Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
00023  *  http://www.sim.no/  sales@sim.no  coin-support@coin3d.org
00024  *
00025 \**************************************************************************/
00026 
00027 #include <Inventor/SbBasic.h>
00028 
00029 class SbProfilingData;
00030 class SbProfilingReportSortCriteria;   // opaque internal
00031 class SbProfilingReportPrintCriteria;  // opaque internal
00032 
00033 class COIN_DLL_API SoProfilingReportGenerator {
00034 public:
00035   static void init(void);
00036 
00037   enum Constants { TERMINATE_ARGLIST = -1 };
00038 
00039   enum Column {
00040     NAME,
00041     TYPE,
00042     COUNT,
00043     TIME_SECS,
00044     TIME_SECS_MAX,
00045     TIME_SECS_AVG,
00046     TIME_MSECS,
00047     TIME_MSECS_MAX,
00048     TIME_MSECS_AVG,
00049     TIME_PERCENT,
00050     TIME_PERCENT_MAX,
00051     TIME_PERCENT_AVG,
00052     MEM_BYTES,
00053     MEM_KILOBYTES,
00054     GFX_MEM_BYTES,
00055     GFX_MEM_KILOBYTES
00056   };
00057 
00058   enum SortOrder {
00059     TIME_ASC,
00060     TIME_DES,
00061     TIME_MAX_ASC,
00062     TIME_MAX_DES,
00063     TIME_AVG_ASC,
00064     TIME_AVG_DES,
00065     COUNT_ASC,
00066     COUNT_DES,
00067     ALPHANUMERIC_ASC,
00068     ALPHANUMERIC_DES,
00069     MEM_ASC,
00070     MEM_DES,
00071     GFX_MEM_ASC,
00072     GFX_MEM_DES
00073   };
00074 
00075   enum DataCategorization {
00076     TYPES,
00077     NAMES,
00078     NODES
00079   };
00080 
00081   enum CallbackResponse {
00082     CONTINUE,
00083     STOP
00084   };
00085 
00086   static SbProfilingReportSortCriteria * getReportSortCriteria(SortOrder order, ...);
00087   static SbProfilingReportSortCriteria * getDefaultReportSortCriteria(DataCategorization category);
00088   static SbProfilingReportPrintCriteria * getReportPrintCriteria(Column col, ...);
00089   static SbProfilingReportPrintCriteria * getDefaultReportPrintCriteria(DataCategorization category);
00090   static void freeCriteria(SbProfilingReportSortCriteria * criteria);
00091   static void freeCriteria(SbProfilingReportPrintCriteria * criteria);
00092 
00093   typedef CallbackResponse ReportCB(void * userdata, int entrynum, const char * text);
00094  
00095   static void generate(const SbProfilingData & data,
00096                        DataCategorization categorization,
00097                        SbProfilingReportSortCriteria * sort,
00098                        SbProfilingReportPrintCriteria * print,
00099                        int count,
00100                        SbBool addheader,
00101                        ReportCB * reportcallback,
00102                        void * userdata);
00103 
00104   static CallbackResponse stdoutCB(void * userdata, int entrynum, const char * text);
00105   static CallbackResponse stderrCB(void * userdata, int entrynum, const char * text);
00106 
00107 }; // SoProfilingReportGenerator
00108 
00109 #endif // !COIN_SOPROFILINGREPORTGENERATOR_H

Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.

Generated on Thu Apr 28 2011 03:43:06 for Coin by Doxygen 1.7.4.