VR-Link API Documentation for HLA 1516
appSettings.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 
00006 
00008 
00009 #ifndef appSettings_H_
00010 #define appSettings_H_
00011 
00012 #include "varGroup.h"
00013 #include "envReader.h"
00014 
00015 #ifdef DtUSE_UTILITIES_NAMESPACE
00016 namespace DtUSE_UTILITIES_NAMESPACE
00017 {
00018 #endif
00019 
00020 
00021 class DtString;
00022 class DtBaseVar;
00023 class DtEnvironment;
00024 
00025 
00026 class DT_DLL_MTL DtApplicationSettings : public DtVariableGroup
00027 {
00028 public:   
00029    DtApplicationSettings(const DtString& applicationName, 
00030       const DtString& appVersion,
00031       const DtString& implicitGroupName = "settings");
00032 
00033    void setChangeOnce(bool flag);
00034    virtual bool changeOnce() const;
00035 
00036    void parseCommandLine(int argc,char** argv,
00037 #ifdef _WIN32
00038       bool pressAnyKey = true);
00039 #else
00040       bool pressAnyKey = false);
00041 #endif
00042    bool loadConfigFile(const DtString& filename);
00043 
00044    bool loadMtlFile(const DtString& filename);
00045    bool loadXmlFile(const DtString& filename);
00046 
00047    void saveConfigFile(const DtString& filename,const DtString& schemaName,
00048       bool generateSchemaFile = false);
00049    void generateConfigFileSchema(const DtString& filename) const;      
00050    void generateElements( DtEnvironment worker ) const;
00051    void addBaseVar(DtBaseConfigVariable* var);   
00052 
00053 protected:
00054    bool readFileIntoEnvironment(const DtString& filename, 
00055       DtEnvReader& reader);
00056 
00057 protected:
00058    DtString myAppName;
00059    DtString myAppVersion;
00060    DtVariableGroup* myRootGroup;
00061    bool myChangeOnceFlag;
00062 };
00063 
00064 #ifdef DtUSE_UTILITIES_NAMESPACE
00065 }
00066 #endif
00067 
00068 #endif

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)