vrecko
virtual reality framework
 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 
26 public:
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;
92  bool bOpenData;
93  bool bOpenFrame;
95 
96 };
97 
98 };
99 
100 #endif