CFx SDK Documentation
2020SP3
SDK
CFx
dd_inc
OdPerfTimer.h
Go to the documentation of this file.
1
// Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3
// All rights reserved.
4
//
5
// This software and its documentation and related materials are owned by
6
// the Alliance. The software may only be incorporated into application
7
// programs owned by members of the Alliance, subject to a signed
8
// Membership Agreement and Supplemental Software License Agreement with the
9
// Alliance. The structure and organization of this software are the valuable
10
// trade secrets of the Alliance and its suppliers. The software is also
11
// protected by copyright law and international treaty provisions. Application
12
// programs incorporating this software must include the following statement
13
// with their copyright notices:
14
//
15
// This application incorporates Teigha(R) software pursuant to a license
16
// agreement with Open Design Alliance.
17
// Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18
// All rights reserved.
19
//
20
// By use of this software, its documentation or related materials, you
21
// acknowledge and accept the above terms.
23
24
// AMark : PerfTest timing classes
25
26
#ifndef _OdPerfTimer_INCLUDED_
27
#define _OdPerfTimer_INCLUDED_
28
29
30
#include "
OdPlatformSettings.h
"
31
#include "
TD_PackPush.h
"
32
38
class
FIRSTDLL_EXPORT
OdPerfTimerBase
39
{
40
protected
:
41
struct
InternalData
42
{
43
OdInt64
started
;
44
OdInt64
stopped
;
45
OdInt64
freq
;
46
OdUInt8
flags[4];
47
InternalData
()
48
: started(0)
49
, stopped(0)
50
, freq(0)
51
{
52
flags[0] = flags[1] = flags[2] = flags[3] = 0;
53
}
54
} gData;
55
InternalData
*
data
;
56
public
:
57
OdPerfTimerBase
() :
data
(&gData) { }
58
59
virtual
~OdPerfTimerBase
() { }
60
virtual
void
initialize
() = 0;
61
virtual
void
destroy
() = 0;
65
virtual
void
clear
() = 0;
69
virtual
void
start
() = 0;
73
virtual
void
stop
() = 0;
77
virtual
double
countedSec
() = 0;
81
virtual
OdUInt32
countedMSec
() = 0;
85
virtual
double
permanentSec
() = 0;
89
virtual
OdUInt32
permanentMSec
() = 0;
93
virtual
bool
isStarted
() = 0;
94
95
static
OdPerfTimerBase
*
createTiming
();
96
static
void
destroyTiming
(
OdPerfTimerBase
*ptr);
97
};
98
104
class
FIRSTDLL_EXPORT
OdPerfTimerWrapper
105
{
106
OdPerfTimerWrapper
(
const
OdPerfTimerWrapper
& );
107
OdPerfTimerWrapper
& operator=(
const
OdPerfTimerWrapper
& );
108
OdPerfTimerBase
* m_pTimer;
109
public
:
110
111
OdPerfTimerWrapper
()
112
{
113
m_pTimer =
OdPerfTimerBase::createTiming
();
114
}
115
116
~OdPerfTimerWrapper
()
117
{
118
OdPerfTimerBase::destroyTiming
( m_pTimer );
119
}
120
121
OdPerfTimerBase
*
getTimer
()
122
{
123
return
m_pTimer;
124
}
125
};
126
127
#include "
TD_PackPop.h
"
128
129
#endif
FIRSTDLL_EXPORT
#define FIRSTDLL_EXPORT
Definition:
RootExport.h:39
OdPerfTimerBase::permanentMSec
virtual OdUInt32 permanentMSec()=0
OdPerfTimerBase::permanentSec
virtual double permanentSec()=0
OdUInt8
unsigned char OdUInt8
Definition:
OdPlatformSettings.h:759
OdPerfTimerWrapper
Definition:
OdPerfTimer.h:105
OdInt64
Definition:
Int64.h:43
OdPerfTimerBase::OdPerfTimerBase
OdPerfTimerBase()
Definition:
OdPerfTimer.h:57
OdPerfTimerBase::InternalData::freq
OdInt64 freq
Definition:
OdPerfTimer.h:45
OdPerfTimerBase::isStarted
virtual bool isStarted()=0
OdPerfTimerBase::~OdPerfTimerBase
virtual ~OdPerfTimerBase()
Definition:
OdPerfTimer.h:59
OdPerfTimerBase::createTiming
static OdPerfTimerBase * createTiming()
TD_PackPop.h
OdUInt32
unsigned int OdUInt32
Definition:
OdPlatformSettings.h:783
data
GLint GLenum GLsizei GLsizei GLint GLsizei const void * data
Definition:
gles2_ext.h:110
OdPerfTimerBase::start
virtual void start()=0
OdPerfTimerBase::InternalData
Definition:
OdPerfTimer.h:42
OdPerfTimerBase::countedMSec
virtual OdUInt32 countedMSec()=0
OdPerfTimerBase::InternalData::stopped
OdInt64 stopped
Definition:
OdPerfTimer.h:44
OdPerfTimerBase
Definition:
OdPerfTimer.h:39
OdPerfTimerBase::stop
virtual void stop()=0
OdPerfTimerBase::destroyTiming
static void destroyTiming(OdPerfTimerBase *ptr)
OdPerfTimerWrapper::getTimer
OdPerfTimerBase * getTimer()
Definition:
OdPerfTimer.h:121
OdPerfTimerBase::InternalData::InternalData
InternalData()
Definition:
OdPerfTimer.h:47
OdPerfTimerWrapper::OdPerfTimerWrapper
OdPerfTimerWrapper()
Definition:
OdPerfTimer.h:111
OdPlatformSettings.h
TD_PackPush.h
OdPerfTimerBase::destroy
virtual void destroy()=0
OdPerfTimerBase::data
InternalData * data
Definition:
OdPerfTimer.h:55
OdPerfTimerWrapper::~OdPerfTimerWrapper
~OdPerfTimerWrapper()
Definition:
OdPerfTimer.h:116
OdPerfTimerBase::clear
virtual void clear()=0
OdPerfTimerBase::initialize
virtual void initialize()=0
OdPerfTimerBase::InternalData::started
OdInt64 started
Definition:
OdPerfTimer.h:43
OdPerfTimerBase::countedSec
virtual double countedSec()=0
Generated on Mon Oct 12 2020 11:49:43