VR-Link API Documentation for HLA 1.3
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
include
mtl
applicationSettings.h
Go to the documentation of this file.
1
/****************************************************************************
2
* Copyright (c) 2013 VT MAK
3
* All rights reserved.
4
****************************************************************************/
5
9
10
#pragma once
11
12
#include "
variableGroup.h
"
13
#include "
envReader.h
"
14
15
#ifdef DtUSE_UTILITIES_NAMESPACE
16
namespace
DtUSE_UTILITIES_NAMESPACE
17
{
18
#endif
19
20
class
DtString
;
21
class
DtBaseVar;
22
class
DtEnvironment
;
23
24
class
DT_DLL_MTL
DtApplicationSettings
:
public
DtVariableGroup
25
{
26
public
:
27
28
DtApplicationSettings
(
const
DtString
& applicationName,
29
const
DtString
& appVersion,
const
DtString
& implicitGroupName =
"settings"
);
30
31
virtual
~
DtApplicationSettings
();
32
33
void
setChangeOnce(
bool
flag );
34
virtual
bool
changeOnce()
const
;
35
36
void
parseCommandLine(
int
argc,
char
** argv,
37
#ifdef _WIN32
38
bool
pressAnyKey =
true
);
39
#else
40
bool
pressAnyKey = false );
41
#endif
42
bool
loadConfigFile(
const
DtString
& filename );
43
44
bool
loadMtlFile(
const
DtString
& filename );
45
bool
loadXmlFile(
const
DtString
& filename );
46
47
void
saveConfigFile(
const
DtString
& filename,
const
DtString
& schemaName,
48
bool
generateSchemaFile =
false
);
49
void
generateConfigFileSchema(
const
DtString
& filename )
const
;
50
void
generateElements(
DtEnvironment
worker )
const
;
51
void
addBaseVar(
DtBaseConfigVariable
* var );
52
53
const
DtString
& applicationName()
const
;
54
const
DtString
& applicationVersion()
const
;
55
56
protected
:
57
58
bool
readFileIntoEnvironment(
const
DtString
& filename,
59
DtEnvReader
& reader );
60
61
protected
:
62
64
DtApplicationSettings
(
const
DtApplicationSettings
& other );
65
67
DtApplicationSettings
& operator = (
const
DtApplicationSettings
& other );
68
69
protected
:
70
71
DtString
myAppName
;
72
DtString
myAppVersion
;
73
DtVariableGroup
*
myRootGroup
;
74
bool
myChangeOnceFlag
;
75
76
};
77
78
#ifdef DtUSE_UTILITIES_NAMESPACE
79
}
80
#endif
Document ID: Generated on Wed Oct 23 22:25:48 EDT 2013 from SVN revision 132765
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)