![]() |
MAK RTIspy API Documentation for HLA Evolved
|
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. | |
| virtual | ~DtBaseConfig () |
| Destructor. | |
| virtual void | writeToFile () |
| Writes the configuration to the default XML file specified at creation. | |
| virtual void | writeToFile (const MAKRti::DtFilename &xmlFile) |
| Writes the configuration to the specified XML file. | |
| virtual bool | getFileVersion (MAKRti::DtString &version) const |
| Returns the RTI version of the file that was read. | |
| virtual bool | isFileVersionOld () const |
| is the file read version different than the current version | |
| virtual void | needsUpdate () |
| sets the update flag | |
| virtual std::ostream & | print (std::ostream &ostr) const |
| Prints the configuration to the given output stream. | |
Protected Member Functions | |
| virtual void | setDefaultConfig ()=0 |
| Sets the default configuration. | |
| 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. | |
| MAKRti::DtEnvValueSP | getParam (const MAKRti::DtString &name) |
| Gets the parameter with the given name. | |
Protected Attributes | |
| MAKRti::DtEnvironment | myEnvironment |
| The Base configuration environment. | |
| std::auto_ptr < 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. | |
| MAKRti::DtFilename | myXmlFile |
| The name of the default XML file to read from and write to. | |
| bool | myUpdatedSinceWrite |
| Flag indicating if the environment has changed since the last time it was written to the default file. | |
| MAKRti::DtString | myReadFileVersion |
| The version of the file that was read. | |
| bool | myFileWasRead |
| Indicates whether a cache file was found and read. | |
Private Member Functions | |
| DtBaseConfig (const DtBaseConfig &) | |
| Copy and assignment not allowed. | |
| DtBaseConfig & | operator= (const DtBaseConfig &) |
Stores the base configuration information and handles saving and loading this information from an XML file.
| 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.
| DtBaseConfig::~DtBaseConfig | ( | ) | [virtual] |
Destructor.
| DtBaseConfig::DtBaseConfig | ( | const DtBaseConfig & | ) | [private] |
Copy and assignment not allowed.
| 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.
References myFileWasRead, and myReadFileVersion.
Referenced by isFileVersionOld().
| DtEnvValueSP DtBaseConfig::getParam | ( | const MAKRti::DtString & | name | ) | [protected] |
Gets the parameter with the given name.
References myEnvironment.
Referenced by DtExecConfig::constrainedColumnInfo(), DtExecConfig::currentTimeColumnInfo(), DtExecConfig::federateHandleColumnInfo(), DtExecConfig::federateNameColumnInfo(), DtExecConfig::federationFederateColumnInfo(), DtExecConfig::hlaVersionColumnInfo(), DtExecConfig::ipAddressColumnInfo(), DtExecConfig::lBTSColumnInfo(), DtExecConfig::lookaheadColumnInfo(), DtExecConfig::regulatingColumnInfo(), DtForwarderConfig::rtiForwarderConsoleVisible(), DtForwarderConfig::rtiNCVTreeInformation(), DtExecConfig::testCountColumnInfo(), DtExecConfig::testStatusColumnInfo(), and DtExecConfig::wwwSpyColumnInfo().
| bool DtBaseConfig::isFileVersionOld | ( | ) | const [virtual] |
is the file read version different than the current version
References DtRtiVersionNumber, and getFileVersion().
| void DtBaseConfig::needsUpdate | ( | ) | [virtual] |
sets the update flag
References myUpdatedSinceWrite.
| DtBaseConfig& DtBaseConfig::operator= | ( | const DtBaseConfig & | ) | [private] |
| std::ostream & DtBaseConfig::print | ( | std::ostream & | ostr | ) | const [virtual] |
Prints the configuration to the given output stream.
References myEnvironment.
Referenced by operator<<().
| virtual void DtBaseConfig::setDefaultConfig | ( | ) | [protected, pure virtual] |
Sets the default configuration.
Implemented in DtExecConfig, and DtForwarderConfig.
| 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.
References myEnvironment.
Referenced by DtExecConfig::setConstrainedColumnInfoPosition(), DtExecConfig::setConstrainedColumnInfoVisible(), DtExecConfig::setCurrentTimeColumnInfoPosition(), DtExecConfig::setCurrentTimeColumnInfoVisible(), DtExecConfig::setFederateHandleColumnInfoPosition(), DtExecConfig::setFederateHandleColumnInfoVisible(), DtExecConfig::setFederateNameColumnInfoPosition(), DtExecConfig::setFederateNameColumnInfoVisible(), DtExecConfig::setFederationFederateColumnInfoPosition(), DtExecConfig::setFederationFederateColumnInfoVisible(), DtExecConfig::setHlaVersionColumnInfoPosition(), DtExecConfig::setHlaVersionColumnInfoVisible(), DtExecConfig::setIpAddressColumnInfoPosition(), DtExecConfig::setIpAddressColumnInfoVisible(), DtExecConfig::setLBTSColumnInfoPosition(), DtExecConfig::setLBTSColumnInfoVisible(), DtExecConfig::setLookaheadColumnInfoPosition(), DtExecConfig::setLookaheadColumnInfoVisible(), DtForwarderConfig::setNCVTreeInformation(), DtExecConfig::setRegulatingColumnInfoPosition(), DtExecConfig::setRegulatingColumnInfoVisible(), DtForwarderConfig::setRtiForwarderConsoleVisible(), DtExecConfig::setTestCountColumnInfoPosition(), DtExecConfig::setTestCountColumnInfoVisible(), DtExecConfig::setTestStatusColumnInfoPosition(), DtExecConfig::setTestStatusColumnInfoVisible(), DtExecConfig::setWwwSpyColumnInfoPosition(), and DtExecConfig::setWwwSpyColumnInfoVisible().
| void DtBaseConfig::writeToFile | ( | ) | [virtual] |
Writes the configuration to the default XML file specified at creation.
References myUpdatedSinceWrite, and myXmlFile.
| virtual void DtBaseConfig::writeToFile | ( | const MAKRti::DtFilename & | xmlFile | ) | [virtual] |
Writes the configuration to the specified XML file.
MAKRti::DtEnvironment DtBaseConfig::myEnvironment [protected] |
The Base configuration environment.
Referenced by getParam(), print(), and setParam().
bool DtBaseConfig::myFileWasRead [protected] |
Indicates whether a cache file was found and read.
Referenced by getFileVersion().
MAKRti::DtString DtBaseConfig::myReadFileVersion [protected] |
The version of the file that was read.
Referenced by getFileVersion().
bool DtBaseConfig::myUpdatedSinceWrite [protected] |
Flag indicating if the environment has changed since the last time it was written to the default file.
Referenced by needsUpdate(), DtExecConfig::setConstrainedColumnInfoPosition(), DtExecConfig::setConstrainedColumnInfoVisible(), DtExecConfig::setCurrentTimeColumnInfoPosition(), DtExecConfig::setCurrentTimeColumnInfoVisible(), DtExecConfig::setFederateHandleColumnInfoPosition(), DtExecConfig::setFederateHandleColumnInfoVisible(), DtExecConfig::setFederateNameColumnInfoPosition(), DtExecConfig::setFederateNameColumnInfoVisible(), DtExecConfig::setFederationFederateColumnInfoPosition(), DtExecConfig::setFederationFederateColumnInfoVisible(), DtExecConfig::setHlaVersionColumnInfoPosition(), DtExecConfig::setHlaVersionColumnInfoVisible(), DtExecConfig::setIpAddressColumnInfoPosition(), DtExecConfig::setIpAddressColumnInfoVisible(), DtExecConfig::setLBTSColumnInfoPosition(), DtExecConfig::setLBTSColumnInfoVisible(), DtExecConfig::setLookaheadColumnInfoPosition(), DtExecConfig::setLookaheadColumnInfoVisible(), DtExecConfig::setRegulatingColumnInfoPosition(), DtExecConfig::setRegulatingColumnInfoVisible(), DtForwarderConfig::setRtiForwarderConsoleVisible(), DtExecConfig::setTestCountColumnInfoPosition(), DtExecConfig::setTestCountColumnInfoVisible(), DtExecConfig::setTestStatusColumnInfoPosition(), DtExecConfig::setTestStatusColumnInfoVisible(), DtExecConfig::setWwwSpyColumnInfoPosition(), DtExecConfig::setWwwSpyColumnInfoVisible(), and writeToFile().
MAKRti::DtFilename DtBaseConfig::myXmlFile [protected] |
The name of the default XML file to read from and write to.
Referenced by writeToFile().
std::auto_ptr< 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.