MAK RTIspy API Documentation for HLA 1516
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions

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.
DtConnectionCacheoperator= (const DtConnectionCache &)

Detailed Description

Stores the cached connections which the Assistant can provide to components if necessary.

Handles reading and loading this information from an XML file.

Constructor & Destructor Documentation

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.

DtConnectionCache::~DtConnectionCache ( )
virtual

Destructor.

DtConnectionCache::DtConnectionCache ( const DtConnectionCache )
private

Copy and assignment not allowed.

Member Function Documentation

MAKRti::DtEnvValueSP DtConnectionCache::addConfigurationToEnv ( const DtRtiConfigurationInfoDataPair config)
protectedvirtual
MAKRti::DtEnvValueSP DtConnectionCache::addConnectionToEnv ( const DtRtiConnectionInfoDataPair conn)
protectedvirtual
void DtConnectionCache::clearConnections ( )
virtual

Clear all connections.

References DtConnectionsConnectionString, and myEnvironment.

bool DtConnectionCache::fileWasRead ( ) const
virtual

Returns true if the cache file was found and read.

References myFileWasRead.

void DtConnectionCache::getConfigurationsFromEnv ( DtRtiConnectionAndConfiguration connsAndConfigs)
protectedvirtual
void DtConnectionCache::getConnections ( DtRtiConnectionAndConfiguration connsAndConfigs)
virtual
bool DtConnectionCache::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 isCacheVersionOld().

void DtConnectionCache::getLightweightConnectionsFromEnv ( DtRtiConnectionAndConfiguration connsAndConfigs)
protectedvirtual
void DtConnectionCache::getRtiexecConnectionsFromEnv ( DtRtiConnectionAndConfiguration connsAndConfigs)
protectedvirtual
bool DtConnectionCache::isCacheVersionOld ( ) const
virtual

Was the cache read from an older file version?

References DtRtiVersionNumber, and getFileVersion().

DtConnectionCache& DtConnectionCache::operator= ( const DtConnectionCache )
private
bool DtConnectionCache::parseFile ( const MAKRti::DtFilename &  filename)
protected

Build document starting from existing file Non-virtual since this may be called from the constructor.

std::ostream & DtConnectionCache::print ( std::ostream &  ostr) const
virtual

Prints the cache to the given output stream.

References myEnvironment.

Referenced by operator<<().

void DtConnectionCache::removeConfigurationFromEnv ( const DtRtiConfigurationInfoDataPair config)
protectedvirtual
void DtConnectionCache::removeConnectionFromEnv ( const DtRtiConnectionInfoDataPair conn)
protectedvirtual

Remove a connection from the XML environment.

References DtConnectionsLightweightString, DtConnectionsRtiExecString, and myEnvironment.

void DtConnectionCache::setConfigFromEnv ( DtRtiConfigurationInfoDataPair config,
MAKRti::DtEnvValueSP  val 
)
protected

Sets the connection info from the environment value.

References DtConnectionsChosenString, DtConnectionsFullyCompliantString, and myEnvironment.

Referenced by getConfigurationsFromEnv().

bool DtConnectionCache::setConnections ( const DtRtiConnectionAndConfiguration conns)
virtual
void DtConnectionCache::setConnFromEnv ( DtRtiConnectionInfoDataPair conn,
MAKRti::DtEnvValueSP  val 
)
protected
bool DtConnectionCache::writeToFile ( )
virtual

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

Returns true if successful.

References myXmlFile.

bool DtConnectionCache::writeToFile ( const MAKRti::DtFilename &  xmlFile)
virtual

Writes the cache to the specified XML file. Returns true if successful.

References myEnvironment, and myXmlWriter.

Member Data Documentation

MAKRti::DtEnvironment DtConnectionCache::myEnvironment
protected
bool DtConnectionCache::myFileWasRead
protected

Indicates whether a cache file was found and read.

Referenced by DtConnectionCache(), fileWasRead(), and getFileVersion().

MAKRti::DtString DtConnectionCache::myReadFileVersion
protected

The version of the file that was read.

Referenced by DtConnectionCache(), and getFileVersion().

MAKRti::DtFilename DtConnectionCache::myXmlFile
protected

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

Referenced by DtConnectionCache(), and writeToFile().

std::auto_ptr< MAKRti::DtEnvXMLWriter > DtConnectionCache::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.

Referenced by writeToFile().

DtRtiConnectionConfigurationInfo DtConnectionCache::thePredefinedLightweightConfig
staticprotected

The predefined lightweight configuration.

Referenced by getConfigurationsFromEnv().

MAKRti::DtString DtConnectionCache::thePredefinedLightweightConfigName
staticprotected

The predefined lightweight configuration name.

Referenced by getConfigurationsFromEnv().

DtRtiConnectionInfo DtConnectionCache::thePredefinedLightweightConn
staticprotected

The predefined lightweight connection.

Referenced by getLightweightConnectionsFromEnv().

MAKRti::DtString DtConnectionCache::thePredefinedLightweightConnName
staticprotected

The predefined lightweight connection name.

Referenced by getLightweightConnectionsFromEnv().

DtRtiConnectionConfigurationInfo DtConnectionCache::thePredefinedLightweightLoopbackConfig
staticprotected

The predefined lightweight loopback configuration.

Referenced by getConfigurationsFromEnv().

MAKRti::DtString DtConnectionCache::thePredefinedLightweightLoopbackConfigName
staticprotected

The predefined lightweight loopback configuration name.

Referenced by getConfigurationsFromEnv().

DtRtiConnectionInfo DtConnectionCache::thePredefinedLightweightLoopbackConn
staticprotected

The predefined lightweight loopback connection.

Referenced by getLightweightConnectionsFromEnv().

MAKRti::DtString DtConnectionCache::thePredefinedLightweightLoopbackConnName
staticprotected

The predefined lightweight loopback connection name.

Referenced by getLightweightConnectionsFromEnv().

DtRtiConnectionConfigurationInfo DtConnectionCache::thePredefinedRtiexecConfig
staticprotected

The predefined rtiexec configuration.

Referenced by getConfigurationsFromEnv().

MAKRti::DtString DtConnectionCache::thePredefinedRtiexecConfigName
staticprotected

The predefined rtiexec configuration name.

Referenced by getConfigurationsFromEnv().

DtRtiConnectionInfo DtConnectionCache::thePredefinedRtiexecConn
staticprotected

The predefined rtiexec connection.

Referenced by getRtiexecConnectionsFromEnv().

MAKRti::DtString DtConnectionCache::thePredefinedRtiexecConnName
staticprotected

The predefined rtiexec connection name.

Referenced by getRtiexecConnectionsFromEnv().

DtRtiConnectionConfigurationInfo DtConnectionCache::thePredefinedRtiexecLoopbackConfig
staticprotected

The predefined rtiexec loopback configuration.

Referenced by getConfigurationsFromEnv().

MAKRti::DtString DtConnectionCache::thePredefinedRtiexecLoopbackConfigName
staticprotected

The predefined rtiexec loopback configuration name.

Referenced by getConfigurationsFromEnv().

DtRtiConnectionInfo DtConnectionCache::thePredefinedRtiexecLoopbackConn
staticprotected

The predefined rtiexec loopback connection.

Referenced by getRtiexecConnectionsFromEnv().

MAKRti::DtString DtConnectionCache::thePredefinedRtiexecLoopbackConnName
staticprotected

The predefined rtiexec loopback connection name.

Referenced by getRtiexecConnectionsFromEnv().


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

Document ID: Generated on Fri Mar 14 19:08:55 EDT 2014 from SVN revision 137085
Copyright © 2005-2014 VT MÄK Inc. All Rights Reserved (www.mak.com)