MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lgrFileFormatProvider.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2025 MAK Technologies, Inc
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #ifndef lgrFileFormatProvider_H_
10 #define lgrFileFormatProvider_H_
11 
12 #include <lgrCore/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 
28  {
29  public:
30 
32  static DtLgrFileFormatProvider& globalInstance();
33 
34  protected:
37 
38  public:
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:
65 
67  typedef std::map<int,FormatCreator> FormatterCreatorMap;
68 
71 
73 
76 
79  };
81 }
82 
83 #endif
static FormatCreator genericFormatCreator
Definition: lgrFileFormatProvider.h:80
int myLatestFileFormat
The latest file format.
Definition: lgrFileFormatProvider.h:78
DtLgrFileFormatter *(* FormatCreator)(DtLoggerFile *file)
Typedef creator function for readability.
Definition: lgrFileFormatProvider.h:22
An abstract logger file formatter.
Definition: lgrFileFormatter.h:33
bool myUseGenericFormatCreator
Definition: lgrFileFormatProvider.h:72
std::map< int, FormatCreator > FormatterCreatorMap
The type of map for storing creators.
Definition: lgrFileFormatProvider.h:67
#define DT_DLL_LGRCORE
Definition: lgrCore.h:19
static DtLgrFileFormatter * createGenericFileFormat(DtLoggerFile *file)
Contains MAKLogger::DtLgrGenericFileFormat subclass of MAKLogger::DtLgrEntityTrackingFormat.
FormatterCreatorMap myCreatorMap
The map which stores the version and functions.
Definition: lgrFileFormatProvider.h:70
static DtLgrFileFormatProvider theGlobalInstance
the global instance.
Definition: lgrFileFormatProvider.h:64
int myLoggerFileVersion
Logger file version used for generic formatter.
Definition: lgrFileFormatProvider.h:75
Base logger class which represents the basic Logger file.
Definition: loggerFile.h:25
The class responsible for managing file formats and creating formatters for files.
Definition: lgrFileFormatProvider.h:27
Contains lgrCore library definitions.

Document ID: Generated on Thu Dec 18 15:35:09 EST 2025 from SVN revision 282494
Copyright © 2024 MAK Technologies. All Rights Reserved (www.mak.com)