Coin  4.0.3
Coin3D core library
Loading...
Searching...
No Matches
SoProfilerTopEngine.h
1#ifndef COIN_SOPROFILERTOPENGINE_H
2#define COIN_SOPROFILERTOPENGINE_H
3
4/**************************************************************************\
5 * Copyright (c) Kongsberg Oil & Gas Technologies AS
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are
10 * met:
11 *
12 * Redistributions of source code must retain the above copyright notice,
13 * this list of conditions and the following disclaimer.
14 *
15 * Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 *
19 * Neither the name of the copyright holder nor the names of its
20 * contributors may be used to endorse or promote products derived from
21 * this software without specific prior written permission.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34\**************************************************************************/
35
36#include <Inventor/engines/SoSubEngine.h>
37#include <Inventor/engines/SoEngine.h>
38#include <Inventor/engines/SoEngineOutput.h>
39#include <Inventor/fields/SoSFInt32.h>
40#include <Inventor/fields/SoSFFloat.h>
41#include <Inventor/fields/SoSFEnum.h>
42#include <Inventor/fields/SoMFName.h>
43#include <Inventor/fields/SoMFEnum.h>
44#include <Inventor/fields/SoMFTime.h>
45#include <Inventor/fields/SoMFUInt32.h>
46#include <Inventor/tools/SbPimplPtr.h>
47
48class SoProfilerTopEngineP;
49
50class COIN_DLL_API SoProfilerTopEngine : public SoEngine {
51 typedef SoEngine inherited;
52 SO_ENGINE_HEADER(SoProfilerTopEngine);
53
54public:
55 static void initClass(void);
57
58 enum Column {
59 NAME,
60 COUNT,
61 TIME_SECS,
62 TIME_SECS_MAX,
63 TIME_SECS_AVG,
64 TIME_MSECS,
65 TIME_MSECS_MAX,
66 TIME_MSECS_AVG,
67 TIME_PERCENT,
68 TIME_PERCENT_MAX,
69 TIME_PERCENT_AVG
70 };
71
72 enum SortOrder {
73 TIME_DEC,
74 TIME_MAX_DEC,
75 TIME_AVG_DEC,
76 COUNT_DEC_TIME_DEC,
77 COUNT_DEC_TIME_MAX_DEC,
78 COUNT_DEC_TIME_AVG_DEC,
79 ALPHANUMERIC_INC
80 };
81
82 // inputs
83 SoMFName statisticsNames;
84 SoMFTime statisticsTimings;
85 SoMFTime statisticsTimingsMax;
86 SoMFUInt32 statisticsCounts;
87
88 // output-related
89 SoMFEnum columns; // [ NAME, COUNT, TIME_MSECS, TIME_PERCENT ]
90 SoSFEnum sortOrder; // TIME_DEC
91 SoSFInt32 maxLines; // 16
92 SoSFFloat decay; // 0.0 ([0.0 - 1.0>)
93
94 // result
95 SoEngineOutput prettyText; // SoMFString
96
97protected:
98 virtual ~SoProfilerTopEngine(void);
99
100 virtual void evaluate(void);
101
102private:
104
105 SoProfilerTopEngine(const SoProfilerTopEngine & rhs); // disable
106 SoProfilerTopEngine & operator = (const SoProfilerTopEngine & rhs); // disable
107
108}; // SoProfilerTopEngine
109
110#endif // !COIN_SOPROFILERTOPENGINE_H
Definition SbPimplPtr.h:55
The SoEngineOutput class is the output slots in SoEngine instances.
Definition SoEngineOutput.h:45
SoEngine is the base class for Coin engines.
Definition SoEngine.h:43
static void initClass(void)
Sets up initialization for data common to all instances of this class, like submitting necessary info...
Definition SoEngine.cpp:162
virtual void evaluate(void)=0
The SoMFEnum class is a container for a set of enumerated values.
Definition SoMFEnum.h:39
The SoMFName class is a container for SbName values.
Definition SoMFName.h:40
The SoMFTime class is a container for SbTime values.
Definition SoMFTime.h:40
The SoMFUInt32 class is a container for 32-bit unsigned integer values.
Definition SoMFUInt32.h:39
The SoProfilerTopEngine class is yet to be documented.
Definition SoProfilerTopEngine.h:50
The SoSFEnum class is a container for an enum value.
Definition SoSFEnum.h:40
The SoSFFloat class is a container for a floating point value.
Definition SoSFFloat.h:39
The SoSFInt32 class is a container for a 32-bit integer value.
Definition SoSFInt32.h:39