vrecko
virtual reality framework
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
BenchmarkWriter.h
Go to the documentation of this file.
1
#ifndef BENCHMARKWRITER_H
2
#define BENCHMARKWRITER_H
3
4
#include <winbase.h>
5
6
namespace
vrecko {
7
25
class
BenchmarkWriter
{
26
public
:
27
BenchmarkWriter
();
28
~BenchmarkWriter
();
29
31
void
setWriting
(
bool
bValue);
32
33
inline
bool
writingAllowed
() {
return
bWriting
; };
34
35
// PHASE 1
37
bool
openFile
(
const
char
* pFileName = NULL);
38
39
bool
isOpened
() {
return
bOpenMain
; };
40
41
// PHASE 2
42
bool
writeInfoStart
();
43
45
bool
writeInfoLine
(
const
char
* pText, ...);
46
47
bool
writeInfoEnd
();
48
49
// PHASE 3
50
bool
writeSettingsStart
();
51
53
bool
writeParam
(
const
char
* pName,
const
char
* pValue);
54
56
bool
writeParam
(
const
char
* pName,
float
fValue);
57
58
bool
writeSettingsEnd
();
59
60
// PHASE 4
61
bool
writeDataStart
();
62
63
// PHASE 5
64
bool
writeFrameStart
(
unsigned
int
dwTime);
65
67
bool
writeCounter
(
const
char
* pName,
float
fValue);
68
69
bool
writeFrameEnd
();
70
71
// PHASE 6
72
bool
writeMiscStatsStart
();
73
bool
writeRunTime
(
unsigned
int
dwTime);
74
bool
writeFramesRendered
(
unsigned
int
dwNum);
75
bool
writeMiscStatsEnd
();
76
77
// PHASE 7
78
bool
writeDataEnd
();
79
80
// PHASE 8
81
bool
closeFile
();
82
83
protected
:
84
FILE *
file
;
85
86
bool
bWriting
;
87
88
// which sections are opened:
89
bool
bOpenMain
;
90
bool
bOpenInfo
;
91
bool
bOpenSettings
;
92
bool
bOpenData
;
93
bool
bOpenFrame
;
94
bool
bOpenMiscStats
;
95
96
};
97
98
};
99
100
#endif
include
vrecko
BenchmarkWriter.h
Generated on Tue Feb 19 2013 10:23:41 for vrecko by
1.8.3.1