VR-Link API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
applicationSettings.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2015 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <mtl/variableGroup.h>
13 #include <mtl/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 
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  bool 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 
65 
67  DtApplicationSettings& operator = ( const DtApplicationSettings& other );
68 
69 protected:
70 
75 
76 };
77 
78 #ifdef DtUSE_UTILITIES_NAMESPACE
79 }
80 #endif

Document ID: Generated on Mon Feb 6 18:36:34 EST 2017 from SVN revision 173107
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)