MAK RTIspy API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
DtBaseConfig Class Referenceabstract

Stores the base configuration information and handles saving and loading this information from an XML file. More...

+ Inheritance diagram for DtBaseConfig:
+ Collaboration diagram for DtBaseConfig:

Public Member Functions

 DtBaseConfig (const MAKRti::DtFilename &xmlFile)
 Constructor. More...
 
virtual ~DtBaseConfig ()
 Destructor. More...
 
virtual void writeToFile ()
 Writes the configuration to the default XML file specified at creation. More...
 
virtual void writeToFile (const MAKRti::DtFilename &xmlFile)
 Writes the configuration to the specified XML file. More...
 
virtual bool getFileVersion (MAKRti::DtString &version) const
 Returns the RTI version of the file that was read. More...
 
virtual bool isFileVersionOld () const
 is the file read version different than the current version More...
 
virtual void needsUpdate ()
 sets the update flag More...
 
virtual std::ostream & print (std::ostream &ostr) const
 Prints the configuration to the given output stream. More...
 

Protected Member Functions

virtual void setDefaultConfig ()=0
 Sets the default configuration. More...
 
MAKRti::DtEnvValueSP setParam (const MAKRti::DtString &name, const MAKRti::DtString &val, const MAKRti::DtString &comment=MAKRti::DtString::nullString())
 Sets (or adds) the given parameter to the configuration. More...
 
MAKRti::DtEnvValueSP getParam (const MAKRti::DtString &name)
 Gets the parameter with the given name. More...
 

Protected Attributes

MAKRti::DtEnvironment myEnvironment
 The Base configuration environment. More...
 
DtUniquePtr
< MAKRti::DtEnvXMLWriter > 
myXmlWriter
 Document writer - used to convert the document to XML in memory or file myXmlWriter is persistent so that the XML memory buffer does not re-allocate as often. More...
 
MAKRti::DtFilename myXmlFile
 The name of the default XML file to read from and write to. More...
 
bool myUpdatedSinceWrite
 Flag indicating if the environment has changed since the last time it was written to the default file. More...
 
MAKRti::DtString myReadFileVersion
 The version of the file that was read. More...
 
bool myFileWasRead
 Indicates whether a cache file was found and read. More...
 

Private Member Functions

 DtBaseConfig (const DtBaseConfig &)
 Copy and assignment not allowed. More...
 
DtBaseConfigoperator= (const DtBaseConfig &)
 

Detailed Description

Stores the base configuration information and handles saving and loading this information from an XML file.

Constructor & Destructor Documentation

DtBaseConfig::DtBaseConfig ( const MAKRti::DtFilename &  xmlFile)

Constructor.

Creates an Base configuration from the given XML file. If the file cannot be found, a default configuration is created. In this case the file name will be saved as the default file if the configuration needs to be written later.

virtual DtBaseConfig::~DtBaseConfig ( )
virtual

Destructor.

DtBaseConfig::DtBaseConfig ( const DtBaseConfig )
private

Copy and assignment not allowed.

Member Function Documentation

virtual bool DtBaseConfig::getFileVersion ( MAKRti::DtString &  version) const
virtual

Returns the RTI version of the file that was read.

Returns false if no file was read.

MAKRti::DtEnvValueSP DtBaseConfig::getParam ( const MAKRti::DtString &  name)
protected

Gets the parameter with the given name.

virtual bool DtBaseConfig::isFileVersionOld ( ) const
virtual

is the file read version different than the current version

virtual void DtBaseConfig::needsUpdate ( )
virtual

sets the update flag

DtBaseConfig& DtBaseConfig::operator= ( const DtBaseConfig )
private
virtual std::ostream& DtBaseConfig::print ( std::ostream &  ostr) const
virtual

Prints the configuration to the given output stream.

Referenced by operator<<().

virtual void DtBaseConfig::setDefaultConfig ( )
protectedpure virtual

Sets the default configuration.

Implemented in DtExecConfig, DtAssistantConfig, and DtForwarderConfig.

MAKRti::DtEnvValueSP DtBaseConfig::setParam ( const MAKRti::DtString &  name,
const MAKRti::DtString &  val,
const MAKRti::DtString &  comment = MAKRti::DtString::nullString() 
)
protected

Sets (or adds) the given parameter to the configuration.

An optional comment may be specified, but it will only be added if the parameter is new.

virtual void DtBaseConfig::writeToFile ( )
virtual

Writes the configuration to the default XML file specified at creation.

virtual void DtBaseConfig::writeToFile ( const MAKRti::DtFilename &  xmlFile)
virtual

Writes the configuration to the specified XML file.

Member Data Documentation

MAKRti::DtEnvironment DtBaseConfig::myEnvironment
protected

The Base configuration environment.

bool DtBaseConfig::myFileWasRead
protected

Indicates whether a cache file was found and read.

MAKRti::DtString DtBaseConfig::myReadFileVersion
protected

The version of the file that was read.

bool DtBaseConfig::myUpdatedSinceWrite
protected

Flag indicating if the environment has changed since the last time it was written to the default file.

MAKRti::DtFilename DtBaseConfig::myXmlFile
protected

The name of the default XML file to read from and write to.

DtUniquePtr< MAKRti::DtEnvXMLWriter > DtBaseConfig::myXmlWriter
protected

Document writer - used to convert the document to XML in memory or file myXmlWriter is persistent so that the XML memory buffer does not re-allocate as often.


The documentation for this class was generated from the following file:

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)