![]() |
MAK RTIspy API Documentation for HLA 1516
|
Stores the cached connections which the Assistant can provide to components if necessary. More...
Collaboration diagram for DtConnectionCache:Public Member Functions | |
| DtConnectionCache (const MAKRti::DtFilename &xmlFile) | |
| Constructor. | |
| virtual | ~DtConnectionCache () |
| Destructor. | |
| virtual bool | writeToFile () |
| Writes the cache to the default XML file specified at creation. | |
| virtual bool | writeToFile (const MAKRti::DtFilename &xmlFile) |
| Writes the cache to the specified XML file. Returns true if successful. | |
| virtual std::ostream & | print (std::ostream &ostr) const |
| Prints the cache to the given output stream. | |
| virtual void | getConnections (DtRtiConnectionAndConfiguration &connsAndConfigs) |
| Retrieve the connections. | |
| virtual bool | setConnections (const DtRtiConnectionAndConfiguration &conns) |
| Set the connections. Returns true on success. | |
| virtual void | clearConnections () |
| Clear all connections. | |
| virtual bool | fileWasRead () const |
| Returns true if the cache file was found and read. | |
| virtual bool | getFileVersion (MAKRti::DtString &version) const |
| Returns the RTI version of the file that was read. | |
| virtual bool | isCacheVersionOld () const |
| Was the cache read from an older file version? | |
Protected Member Functions | |
| virtual void | getRtiexecConnectionsFromEnv (DtRtiConnectionAndConfiguration &connsAndConfigs) |
| Retrieve the rtiexec connections from the XML environment. | |
| virtual void | getLightweightConnectionsFromEnv (DtRtiConnectionAndConfiguration &connsAndConfigs) |
| Retrieve the lightweight connections from the XML environment. | |
| virtual void | getConfigurationsFromEnv (DtRtiConnectionAndConfiguration &connsAndConfigs) |
| Retrieves the configurations from the XML environment. | |
| virtual MAKRti::DtEnvValueSP | addConnectionToEnv (const DtRtiConnectionInfoDataPair &conn) |
| Add a connection/config to the XML environment. | |
| virtual MAKRti::DtEnvValueSP | addConfigurationToEnv (const DtRtiConfigurationInfoDataPair &config) |
| virtual void | removeConnectionFromEnv (const DtRtiConnectionInfoDataPair &conn) |
| Remove a connection from the XML environment. | |
| virtual void | removeConfigurationFromEnv (const DtRtiConfigurationInfoDataPair &config) |
| void | setConnFromEnv (DtRtiConnectionInfoDataPair &conn, MAKRti::DtEnvValueSP val) |
| Sets the connection info from the environment value. | |
| void | setConfigFromEnv (DtRtiConfigurationInfoDataPair &config, MAKRti::DtEnvValueSP val) |
| Sets the connection info from the environment value. | |
| bool | parseFile (const MAKRti::DtFilename &filename) |
| Build document starting from existing file Non-virtual since this may be called from the constructor. | |
Protected Attributes | |
| MAKRti::DtEnvironment | myEnvironment |
| The cached license 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. | |
| MAKRti::DtString | myReadFileVersion |
| The version of the file that was read. | |
| bool | myFileWasRead |
| Indicates whether a cache file was found and read. | |
Static Protected Attributes | |
Predefined lightweight connection information | |
| static MAKRti::DtString | thePredefinedLightweightConnName |
| The predefined lightweight connection name. | |
| static DtRtiConnectionInfo | thePredefinedLightweightConn |
| The predefined lightweight connection. | |
| static MAKRti::DtString | thePredefinedLightweightConfigName |
| The predefined lightweight configuration name. | |
| static DtRtiConnectionConfigurationInfo | thePredefinedLightweightConfig |
| The predefined lightweight configuration. | |
Predefined rtiexec connection information | |
| static MAKRti::DtString | thePredefinedRtiexecConnName |
| The predefined rtiexec connection name. | |
| static DtRtiConnectionInfo | thePredefinedRtiexecConn |
| The predefined rtiexec connection. | |
| static MAKRti::DtString | thePredefinedRtiexecConfigName |
| The predefined rtiexec configuration name. | |
| static DtRtiConnectionConfigurationInfo | thePredefinedRtiexecConfig |
| The predefined rtiexec configuration. | |
Predefined lightweight loopback connection information | |
| static MAKRti::DtString | thePredefinedLightweightLoopbackConnName |
| The predefined lightweight loopback connection name. | |
| static DtRtiConnectionInfo | thePredefinedLightweightLoopbackConn |
| The predefined lightweight loopback connection. | |
| static MAKRti::DtString | thePredefinedLightweightLoopbackConfigName |
| The predefined lightweight loopback configuration name. | |
| static DtRtiConnectionConfigurationInfo | thePredefinedLightweightLoopbackConfig |
| The predefined lightweight loopback configuration. | |
Predefined rtiexec loopback connection information | |
| static MAKRti::DtString | thePredefinedRtiexecLoopbackConnName |
| The predefined rtiexec loopback connection name. | |
| static DtRtiConnectionInfo | thePredefinedRtiexecLoopbackConn |
| The predefined rtiexec loopback connection. | |
| static MAKRti::DtString | thePredefinedRtiexecLoopbackConfigName |
| The predefined rtiexec loopback configuration name. | |
| static DtRtiConnectionConfigurationInfo | thePredefinedRtiexecLoopbackConfig |
| The predefined rtiexec loopback configuration. | |
Private Member Functions | |
| DtConnectionCache (const DtConnectionCache &) | |
| Copy and assignment not allowed. | |
| DtConnectionCache & | operator= (const DtConnectionCache &) |
Stores the cached connections which the Assistant can provide to components if necessary.
Handles reading and loading this information from an XML file.
| DtConnectionCache::DtConnectionCache | ( | const MAKRti::DtFilename & | xmlFile | ) |
Constructor.
Creates an Assistant connections cache from the given XML file. If the file cannot be found, an empty cache is created. In this case the file name will be saved as the default file if the cache needs to be written later.
References DtConnectionsVersionString, myEnvironment, myFileWasRead, myReadFileVersion, and myXmlFile.
|
virtual |
Destructor.
|
private |
Copy and assignment not allowed.
|
protectedvirtual |
References DtConnectionsChosenString, DtConnectionsConfigString, DtConnectionsFullyCompliantString, and myEnvironment.
Referenced by setConnections().
|
protectedvirtual |
Add a connection/config to the XML environment.
References DtConnectionsAdditionalForwarderConnString, DtConnectionsBestEffortIPString, DtConnectionsBestEffortPortString, DtConnectionsChosenString, DtConnectionsForwarderPortString, DtConnectionsGivenNameString, DtConnectionsHostString, DtConnectionsLightweightString, DtConnectionsNetworkInterfaceAddrString, DtConnectionsOwnerHostString, DtConnectionsReliableIPString, DtConnectionsReliablePortString, DtConnectionsRtiExecString, and myEnvironment.
Referenced by setConnections().
|
virtual |
Clear all connections.
References DtConnectionsConnectionString, and myEnvironment.
|
virtual |
Returns true if the cache file was found and read.
References myFileWasRead.
|
protectedvirtual |
Retrieves the configurations from the XML environment.
References DtRtiConnectionAndConfiguration::addConfiguration(), DtRtiConnectionAndConfiguration::connections(), DtConnectionsConfigString, myEnvironment, setConfigFromEnv(), DtRtiConnectionAndConfiguration::setConnectionConfigMapping(), thePredefinedLightweightConfig, thePredefinedLightweightConfigName, thePredefinedLightweightLoopbackConfig, thePredefinedLightweightLoopbackConfigName, thePredefinedRtiexecConfig, thePredefinedRtiexecConfigName, thePredefinedRtiexecLoopbackConfig, and thePredefinedRtiexecLoopbackConfigName.
Referenced by getConnections().
|
virtual |
Retrieve the connections.
References getConfigurationsFromEnv(), getLightweightConnectionsFromEnv(), and getRtiexecConnectionsFromEnv().
|
virtual |
Returns the RTI version of the file that was read.
Returns false if no file was read.
References myFileWasRead, and myReadFileVersion.
Referenced by isCacheVersionOld().
|
protectedvirtual |
Retrieve the lightweight connections from the XML environment.
References DtRtiConnectionAndConfiguration::addConnection(), DtConnectionsLightweightString, DtGetLocalHostName(), DtRtiAssociatedConnectionData::DtUnknownState, DtRtiConnectionAndConfiguration::findConnection(), myEnvironment, DtRtiAssociatedConnectionData::setConnectionState(), setConnFromEnv(), DtRtiAssociatedConnectionData::setIsChosen(), DtRtiAssociatedConnectionData::setIsPredefined(), DtRtiAssociatedConnectionData::setIsSaved(), DtRtiAssociatedConnectionData::setName(), DtRtiAssociatedConnectionData::setOptionalForwarderToConnectTo(), DtRtiAssociatedConnectionData::setOwnerHost(), thePredefinedLightweightConn, thePredefinedLightweightConnName, thePredefinedLightweightLoopbackConn, thePredefinedLightweightLoopbackConnName, and DtRtiConnectionAndConfiguration::updateConnectionAssociatedDataOnly().
Referenced by getConnections().
|
protectedvirtual |
Retrieve the rtiexec connections from the XML environment.
References DtRtiConnectionAndConfiguration::addConnection(), DtConnectionsRtiExecString, DtGetLocalHostName(), DtRtiAssociatedConnectionData::DtUnknownState, DtRtiConnectionAndConfiguration::findConnection(), myEnvironment, DtRtiAssociatedConnectionData::setConnectionState(), setConnFromEnv(), DtRtiAssociatedConnectionData::setIsChosen(), DtRtiAssociatedConnectionData::setIsPredefined(), DtRtiAssociatedConnectionData::setIsSaved(), DtRtiAssociatedConnectionData::setName(), DtRtiAssociatedConnectionData::setOptionalForwarderToConnectTo(), DtRtiAssociatedConnectionData::setOwnerHost(), thePredefinedRtiexecConn, thePredefinedRtiexecConnName, thePredefinedRtiexecLoopbackConn, thePredefinedRtiexecLoopbackConnName, and DtRtiConnectionAndConfiguration::updateConnectionAssociatedDataOnly().
Referenced by getConnections().
|
virtual |
Was the cache read from an older file version?
References DtRtiVersionNumber, and getFileVersion().
|
private |
|
protected |
Build document starting from existing file Non-virtual since this may be called from the constructor.
|
virtual |
|
protectedvirtual |
References DtConnectionsConfigString, and myEnvironment.
|
protectedvirtual |
Remove a connection from the XML environment.
References DtConnectionsLightweightString, DtConnectionsRtiExecString, and myEnvironment.
|
protected |
Sets the connection info from the environment value.
References DtConnectionsChosenString, DtConnectionsFullyCompliantString, and myEnvironment.
Referenced by getConfigurationsFromEnv().
|
virtual |
Set the connections. Returns true on success.
References addConfigurationToEnv(), addConnectionToEnv(), DtRtiConnectionAndConfiguration::configs(), DtRtiConnectionAndConfiguration::connections(), DtConnectionsVersionString, DtRtiVersionNumber, and myEnvironment.
|
protected |
Sets the connection info from the environment value.
References DtConnectionsAdditionalForwarderConnString, DtConnectionsBestEffortIPString, DtConnectionsBestEffortPortString, DtConnectionsChosenString, DtConnectionsForwarderPortString, DtConnectionsGivenNameString, DtConnectionsHostString, DtConnectionsNetworkInterfaceAddrString, DtConnectionsOwnerHostString, DtConnectionsPortString, DtConnectionsReliableIPString, DtConnectionsReliablePortString, DtDefaultInterfaceAddr(), DtGetLocalHostName(), and myEnvironment.
Referenced by getLightweightConnectionsFromEnv(), and getRtiexecConnectionsFromEnv().
|
virtual |
Writes the cache to the default XML file specified at creation.
Returns true if successful.
References myXmlFile.
|
virtual |
Writes the cache to the specified XML file. Returns true if successful.
References myEnvironment, and myXmlWriter.
|
protected |
The cached license environment.
Referenced by addConfigurationToEnv(), addConnectionToEnv(), clearConnections(), DtConnectionCache(), getConfigurationsFromEnv(), getLightweightConnectionsFromEnv(), getRtiexecConnectionsFromEnv(), print(), removeConfigurationFromEnv(), removeConnectionFromEnv(), setConfigFromEnv(), setConnections(), setConnFromEnv(), and writeToFile().
|
protected |
Indicates whether a cache file was found and read.
Referenced by DtConnectionCache(), fileWasRead(), and getFileVersion().
|
protected |
The version of the file that was read.
Referenced by DtConnectionCache(), and getFileVersion().
|
protected |
The name of the default XML file to read from and write to.
Referenced by DtConnectionCache(), and writeToFile().
|
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.
Referenced by writeToFile().
|
staticprotected |
The predefined lightweight configuration.
Referenced by getConfigurationsFromEnv().
|
staticprotected |
The predefined lightweight configuration name.
Referenced by getConfigurationsFromEnv().
|
staticprotected |
The predefined lightweight connection.
Referenced by getLightweightConnectionsFromEnv().
|
staticprotected |
The predefined lightweight connection name.
Referenced by getLightweightConnectionsFromEnv().
|
staticprotected |
The predefined lightweight loopback configuration.
Referenced by getConfigurationsFromEnv().
|
staticprotected |
The predefined lightweight loopback configuration name.
Referenced by getConfigurationsFromEnv().
|
staticprotected |
The predefined lightweight loopback connection.
Referenced by getLightweightConnectionsFromEnv().
|
staticprotected |
The predefined lightweight loopback connection name.
Referenced by getLightweightConnectionsFromEnv().
|
staticprotected |
The predefined rtiexec configuration.
Referenced by getConfigurationsFromEnv().
|
staticprotected |
The predefined rtiexec configuration name.
Referenced by getConfigurationsFromEnv().
|
staticprotected |
The predefined rtiexec connection.
Referenced by getRtiexecConnectionsFromEnv().
|
staticprotected |
The predefined rtiexec connection name.
Referenced by getRtiexecConnectionsFromEnv().
|
staticprotected |
The predefined rtiexec loopback configuration.
Referenced by getConfigurationsFromEnv().
|
staticprotected |
The predefined rtiexec loopback configuration name.
Referenced by getConfigurationsFromEnv().
|
staticprotected |
The predefined rtiexec loopback connection.
Referenced by getRtiexecConnectionsFromEnv().
|
staticprotected |
The predefined rtiexec loopback connection name.
Referenced by getRtiexecConnectionsFromEnv().