MAK RTIspy API Documentation for HLA 1516
 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 "internalTypes.h"
17 #include <mtl/environment.h>
18 #include <mtl/envXmlWriter.h>
19 #include <vlutil/vlString.h>
20 #include <vlutil/vlFilename.h>
21 #include <iosfwd>
22 
27 {
28 public:
29 
34  DtBaseConfig( const MAKRti::DtFilename& xmlFile );
35 
37  virtual ~DtBaseConfig();
38 
40  virtual void writeToFile();
41 
43  virtual void writeToFile( const MAKRti::DtFilename& xmlFile );
44 
47  virtual bool getFileVersion( MAKRti::DtString& version ) const;
48 
50  virtual bool isFileVersionOld() const;
51 
53  virtual void needsUpdate();
54 
56  virtual std::ostream& print( std::ostream& ostr ) const;
57 
58 private:
59 
61  DtBaseConfig( const DtBaseConfig& );
62  DtBaseConfig& operator=( const DtBaseConfig& );
63 
64 protected:
65 
67  virtual void setDefaultConfig() = 0;
68 
72  MAKRti::DtEnvValueSP setParam( const MAKRti::DtString& name, const MAKRti::DtString& val,
73  const MAKRti::DtString& comment = MAKRti::DtString::nullString() );
74 
76  MAKRti::DtEnvValueSP getParam( const MAKRti::DtString& name );
77 
78 protected:
79 
81  MAKRti::DtEnvironment myEnvironment;
82 
86  DtUniquePtr< MAKRti::DtEnvXMLWriter > myXmlWriter;
87 
89  MAKRti::DtFilename myXmlFile;
90 
94 
96  MAKRti::DtString myReadFileVersion;
97 
100 
101 };
102 
103 inline std::ostream& operator<<( std::ostream& ostr, const DtBaseConfig& config )
104 {
105  return config.print( ostr );
106 }
107 
108 #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:93
std::ostream & operator<<(std::ostream &ostr, const DtAssistantConfig &config)
Definition: assistantConfig.h:85
MAKRti::DtEnvironment myEnvironment
The Base configuration environment.
Definition: baseConfig.h:81
MAKRti::DtFilename myXmlFile
The name of the default XML file to read from and write to.
Definition: baseConfig.h:89
Stores the base configuration information and handles saving and loading this information from an XML...
Definition: baseConfig.h:26
bool myFileWasRead
Indicates whether a cache file was found and read.
Definition: baseConfig.h:99
DtUniquePtr< MAKRti::DtEnvXMLWriter > myXmlWriter
Document writer - used to convert the document to XML in memory or file myXmlWriter is persistent so ...
Definition: baseConfig.h:86
MAKRti::DtString myReadFileVersion
The version of the file that was read.
Definition: baseConfig.h:96
The declaration of internal types.
#define DT_DLL_RTIUTIL
Definition: rtiMsConfig.h:160

Document ID: Generated on Sun Jul 20 16:15:30 EDT 2025 from SVN revision 277985
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)