MAK Data Logger API Documentation for DIS
Home
Modules
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
libsrc
lgrCore
lgrFileFormatProvider.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 1992-2010 VT MAK
3
** All rights reserved.
4
******************************************************************************/
5
8
9
#ifndef lgrFileFormatProvider_H_
10
#define lgrFileFormatProvider_H_
11
12
#include "
lgrCore.h
"
13
#include "
lgrGenericFileFormats.h
"
14
#include <map>
15
16
namespace
MAKLogger
17
{
18
class
DtLoggerFile;
19
class
DtLgrFileFormatter;
20
22
typedef
DtLgrFileFormatter
* (*FormatCreator)(
DtLoggerFile
* file);
23
27
class
DT_DLL_LGRCORE
DtLgrFileFormatProvider
28
{
29
public
:
30
32
static
DtLgrFileFormatProvider
& globalInstance();
33
34
protected
:
36
DtLgrFileFormatProvider
();
37
38
public
:
40
~
DtLgrFileFormatProvider
();
41
43
int
latestVersion()
const
;
44
47
DtLgrFileFormatter
* createFormatter(
DtLoggerFile
*)
const
;
48
50
void
registerFormat(
int
fileVersion,
FormatCreator
function
);
51
57
void
useGenericFormat(
bool
use,
int
fileVersion = 0);
58
60
void
setLatestFileFormat(
int
fileVersion);
61
62
protected
:
64
static
DtLgrFileFormatProvider
theGlobalInstance
;
65
67
typedef
std::map<int,FormatCreator>
FormatterCreatorMap
;
68
70
FormatterCreatorMap
myCreatorMap
;
71
72
bool
myUseGenericFormatCreator
;
73
75
int
myLoggerFileVersion
;
76
78
int
myLatestFileFormat
;
79
};
80
static
FormatCreator
genericFormatCreator
= &
DtLgrGenericFileFormats::createGenericFileFormat
;
81
}
82
83
#endif
Document ID: Generated on Thu Apr 10 18:53:01 EDT 2014 from SVN revision 138105
Copyright © 2005-2012 VT MÄK. All Rights Reserved (
www.mak.com
)