MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
baseConfig.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2008 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: baseConfig.h,v $ $Revision: 1.3 $ $State: Exp $
7 *******************************************************************************/
8 
11 
12 #ifndef DtBaseConfig_H_
13 #define DtBaseConfig_H_
14 
15 #include "rtiMsConfig.h"
16 #include <mtl/environment.h>
17 #include <mtl/envXmlWriter.h>
18 #include <vlutil/vlString.h>
19 #include <vlutil/vlFilename.h>
20 #include <iosfwd>
21 
26 {
27 public:
28 
33  DtBaseConfig( const MAKRti::DtFilename& xmlFile );
34 
36  virtual ~DtBaseConfig();
37 
39  virtual void writeToFile();
40 
42  virtual void writeToFile( const MAKRti::DtFilename& xmlFile );
43 
46  virtual bool getFileVersion( MAKRti::DtString& version ) const;
47 
49  virtual bool isFileVersionOld() const;
50 
52  virtual void needsUpdate();
53 
55  virtual std::ostream& print( std::ostream& ostr ) const;
56 
57 private:
58 
60  DtBaseConfig( const DtBaseConfig& );
61  DtBaseConfig& operator=( const DtBaseConfig& );
62 
63 protected:
64 
66  virtual void setDefaultConfig() = 0;
67 
71  MAKRti::DtEnvValueSP setParam( const MAKRti::DtString& name, const MAKRti::DtString& val,
72  const MAKRti::DtString& comment = MAKRti::DtString::nullString() );
73 
75  MAKRti::DtEnvValueSP getParam( const MAKRti::DtString& name );
76 
77 protected:
78 
80  MAKRti::DtEnvironment myEnvironment;
81 
85  std::auto_ptr< MAKRti::DtEnvXMLWriter > myXmlWriter;
86 
88  MAKRti::DtFilename myXmlFile;
89 
93 
95  MAKRti::DtString myReadFileVersion;
96 
99 
100 };
101 
102 inline std::ostream& operator<<( std::ostream& ostr, const DtBaseConfig& config )
103 {
104  return config.print( ostr );
105 }
106 
107 #endif // DtBaseConfig_H_
virtual std::ostream & print(std::ostream &ostr) const
Prints the configuration to the given output stream.
bool myUpdatedSinceWrite
Flag indicating if the environment has changed since the last time it was written to the default file...
Definition: baseConfig.h:92
std::ostream & operator<<(std::ostream &ostr, const DtAssistantConfig &config)
Definition: assistantConfig.h:85
MAKRti::DtEnvironment myEnvironment
The Base configuration environment.
Definition: baseConfig.h:80
std::auto_ptr< MAKRti::DtEnvXMLWriter > myXmlWriter
Document writer - used to convert the document to XML in memory or file myXmlWriter is persistent so ...
Definition: baseConfig.h:85
MAKRti::DtFilename myXmlFile
The name of the default XML file to read from and write to.
Definition: baseConfig.h:88
Stores the base configuration information and handles saving and loading this information from an XML...
Definition: baseConfig.h:25
bool myFileWasRead
Indicates whether a cache file was found and read.
Definition: baseConfig.h:98
MAKRti::DtString myReadFileVersion
The version of the file that was read.
Definition: baseConfig.h:95
#define DT_DLL_RTIUTIL
Definition: rtiMsConfig.h:127

Document ID: Generated on Thu May 11 15:55:32 EDT 2023 from SVN revision 254743
Copyright © 2005-2020 MAK Technologies Inc. All Rights Reserved (www.mak.com)