Open Inventor Reference
MeVis/ThirdParty/Sources/Inventor/inventor/lib/mevis/include/Inventor/SoProfiling.h
Go to the documentation of this file.
00001 /*
00002  *
00003  *  Copyright (C) 2013 MeVis Medical Solutions AG,  All Rights Reserved.
00004  *
00005  *  This library is free software; you can redistribute it and/or
00006  *  modify it under the terms of the GNU Lesser General Public
00007  *  License as published by the Free Software Foundation; either
00008  *  version 2.1 of the License, or (at your option) any later version.
00009  *
00010  *  This library is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  *  Lesser General Public License for more details.
00014  *
00015  *  Further, this software is distributed without any warranty that it is
00016  *  free of the rightful claim of any third person regarding infringement
00017  *  or the like.  Any license provided herein, whether implied or
00018  *  otherwise, applies only to this software file.  Patent licenses, if
00019  *  any, provided herein do not apply to combinations of this program with
00020  *  other software, or any other product whatsoever.
00021  *
00022  *  You should have received a copy of the GNU Lesser General Public
00023  *  License along with this library; if not, write to the Free Software
00024  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025  *
00026  *  Contact information: MeVis Medical Solutions AG
00027  *  Universitätsallee 29, D-28359 Bremen, GERMANY, or:
00028  *
00029  *  http://www.mevis.de
00030  *
00031  */
00032 
00033 /*
00034  * Copyright (C) 2013 MeVis Medical Solutions AG
00035  *
00036  *   \file    SoProfiling.h
00037  *   \author  Florian Link
00038  *   \date    02/2013
00039  */
00040 
00041 #ifndef  _SO_PROFILING_
00042 #define  _SO_PROFILING_
00043 
00044 #include <Inventor/system/SbSystem.h>
00045 #include <Inventor/SbBasic.h>
00046 
00047 #define OIV_HAS_PROFILING
00048 
00049 class SoAction;
00050 class SoField;
00051 class SoFieldContainer;
00052 
00055 class INVENTOR_API SoProfiling
00056 {
00057 
00059 
00060   typedef void EnterScopeApplyActionCB(SoAction* action);
00061   typedef void EnterScopeFieldNotifyCB(SoField* action);
00062   typedef void EnterScopeFieldContainerNotifyCB(SoFieldContainer* action);
00063   typedef void EnterScopeProcessDelayQueueCB();
00064   typedef void EnterScopeProcessTimerQueueCB();
00065 
00069   typedef void LeaveScopeCB();
00071 
00072 public:
00074   static bool isEnabled() { return _enabled; }
00076   static void setEnabled(bool flag) { _enabled = flag; }
00077 
00078 
00080 
00081   static void setEnterScopeApplyActionCB(EnterScopeApplyActionCB* cb) { _enterScopeApplyActionCB = cb; }
00082   static void setEnterScopeFieldNotifyCB(EnterScopeFieldNotifyCB* cb) { _enterScopeFieldNotifyCB = cb; }
00083   static void setEnterScopeFieldContainerNotifyCB(EnterScopeFieldContainerNotifyCB* cb) { _enterScopeFieldContainerNotifyCB = cb; }
00084   static void setEnterScopeProcessDelayQueueCB(EnterScopeProcessDelayQueueCB* cb) { _enterScopeProcessDelayQueueCB = cb; }
00085   static void setEnterScopeProcessTimerQueueCB(EnterScopeProcessTimerQueueCB* cb) { _enterScopeProcessTimerQueueCB = cb; }
00086   static void setLeaveScopeCB(LeaveScopeCB* cb) { _leaveScopeCB = cb; }
00088 
00090 
00091   static EnterScopeApplyActionCB* getEnterScopeApplyActionCB() { return _enterScopeApplyActionCB; }
00092   static EnterScopeFieldNotifyCB* getEnterScopeFieldNotifyCB() { return _enterScopeFieldNotifyCB; }
00093   static EnterScopeFieldContainerNotifyCB* getEnterScopeFieldContainerNotifyCB() { return _enterScopeFieldContainerNotifyCB; }
00094   static EnterScopeProcessDelayQueueCB* getEnterScopeProcessDelayQueueCB() { return _enterScopeProcessDelayQueueCB; }
00095   static EnterScopeProcessTimerQueueCB* getEnterScopeProcessTimerQueueCB() { return _enterScopeProcessTimerQueueCB; }
00096   static LeaveScopeCB* getLeaveScopeCB() { return _leaveScopeCB; }
00098 
00099 private:
00100 
00101   static bool _enabled;
00102 
00103   static EnterScopeApplyActionCB* _enterScopeApplyActionCB;
00104   static EnterScopeFieldNotifyCB* _enterScopeFieldNotifyCB;
00105   static EnterScopeFieldContainerNotifyCB* _enterScopeFieldContainerNotifyCB;
00106   static EnterScopeProcessDelayQueueCB* _enterScopeProcessDelayQueueCB;
00107   static EnterScopeProcessTimerQueueCB* _enterScopeProcessTimerQueueCB;
00108   static LeaveScopeCB* _leaveScopeCB;
00109     
00110 };
00111 
00112 #endif