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

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?
virtual DtNetU128 rawUuid () const

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 void getForeignConnectionsFromEnv (DtRtiConnectionAndConfiguration &connsAndConfigs)
 Get Foreign connections from the XML environment.
virtual MAKRti::DtEnvValueSP addConnectionToEnv (const DtRtiConnectionInfoDataPair &conn)
 Add a connection to the XML environment.
virtual MAKRti::DtEnvValueSP addConfigurationToEnv (const DtRtiConfigurationInfoDataPair &config)
 Add a configuration to the XML environment.
virtual MAKRti::DtEnvValueSP addForeignConnectionToEnv (const DtAssistantConnectionStruct &foreignConnection)
 Add a foreign connection to the XML environment.
virtual void removeConnectionFromEnv (const DtRtiConnectionInfoDataPair &conn)
 Remove a connection from the XML environment.
virtual void removeConfigurationFromEnv (const DtRtiConfigurationInfoDataPair &config)
 Remove a configuration from the XML environment.
virtual void removeForeignConnectionsFromEnv (const DtHostNameAddress &foreignConnection)
 Remove a foreign connection to the XML environment.
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.
MAKRti::DtString myUuid
 The uuid 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.

virtual DtConnectionCache::~DtConnectionCache ( )
virtual

Destructor.

DtConnectionCache::DtConnectionCache ( const DtConnectionCache )
private

Copy and assignment not allowed.

Member Function Documentation

virtual MAKRti::DtEnvValueSP DtConnectionCache::addConfigurationToEnv ( const DtRtiConfigurationInfoDataPair config)
protectedvirtual

Add a configuration to the XML environment.

virtual MAKRti::DtEnvValueSP DtConnectionCache::addConnectionToEnv ( const DtRtiConnectionInfoDataPair conn)
protectedvirtual

Add a connection to the XML environment.

virtual MAKRti::DtEnvValueSP DtConnectionCache::addForeignConnectionToEnv ( const DtAssistantConnectionStruct foreignConnection)
protectedvirtual

Add a foreign connection to the XML environment.

virtual void DtConnectionCache::clearConnections ( )
virtual

Clear all connections.

virtual bool DtConnectionCache::fileWasRead ( ) const
virtual

Returns true if the cache file was found and read.

virtual void DtConnectionCache::getConfigurationsFromEnv ( DtRtiConnectionAndConfiguration connsAndConfigs)
protectedvirtual

Retrieves the configurations from the XML environment.

virtual void DtConnectionCache::getConnections ( DtRtiConnectionAndConfiguration connsAndConfigs)
virtual

Retrieve the connections.

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.

virtual void DtConnectionCache::getForeignConnectionsFromEnv ( DtRtiConnectionAndConfiguration connsAndConfigs)
protectedvirtual

Get Foreign connections from the XML environment.

virtual void DtConnectionCache::getLightweightConnectionsFromEnv ( DtRtiConnectionAndConfiguration connsAndConfigs)
protectedvirtual

Retrieve the lightweight connections from the XML environment.

virtual void DtConnectionCache::getRtiexecConnectionsFromEnv ( DtRtiConnectionAndConfiguration connsAndConfigs)
protectedvirtual

Retrieve the rtiexec connections from the XML environment.

virtual bool DtConnectionCache::isCacheVersionOld ( ) const
virtual

Was the cache read from an older file version?

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.

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

Prints the cache to the given output stream.

Referenced by operator<<().

virtual DtNetU128 DtConnectionCache::rawUuid ( ) const
virtual
virtual void DtConnectionCache::removeConfigurationFromEnv ( const DtRtiConfigurationInfoDataPair config)
protectedvirtual

Remove a configuration from the XML environment.

virtual void DtConnectionCache::removeConnectionFromEnv ( const DtRtiConnectionInfoDataPair conn)
protectedvirtual

Remove a connection from the XML environment.

virtual void DtConnectionCache::removeForeignConnectionsFromEnv ( const DtHostNameAddress foreignConnection)
protectedvirtual

Remove a foreign connection to the XML environment.

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

Sets the connection info from the environment value.

virtual bool DtConnectionCache::setConnections ( const DtRtiConnectionAndConfiguration conns)
virtual

Set the connections. Returns true on success.

void DtConnectionCache::setConnFromEnv ( DtRtiConnectionInfoDataPair conn,
MAKRti::DtEnvValueSP  val 
)
protected

Sets the connection info from the environment value.

virtual bool DtConnectionCache::writeToFile ( )
virtual

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

Returns true if successful.

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

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

Member Data Documentation

MAKRti::DtEnvironment DtConnectionCache::myEnvironment
protected

The cached license environment.

bool DtConnectionCache::myFileWasRead
protected

Indicates whether a cache file was found and read.

MAKRti::DtString DtConnectionCache::myReadFileVersion
protected

The version of the file that was read.

MAKRti::DtString DtConnectionCache::myUuid
protected

The uuid of the file that was read.

MAKRti::DtFilename DtConnectionCache::myXmlFile
protected

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

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.

DtRtiConnectionConfigurationInfo DtConnectionCache::thePredefinedLightweightConfig
staticprotected

The predefined lightweight configuration.

MAKRti::DtString DtConnectionCache::thePredefinedLightweightConfigName
staticprotected

The predefined lightweight configuration name.

DtRtiConnectionInfo DtConnectionCache::thePredefinedLightweightConn
staticprotected

The predefined lightweight connection.

MAKRti::DtString DtConnectionCache::thePredefinedLightweightConnName
staticprotected

The predefined lightweight connection name.

DtRtiConnectionConfigurationInfo DtConnectionCache::thePredefinedLightweightLoopbackConfig
staticprotected

The predefined lightweight loopback configuration.

MAKRti::DtString DtConnectionCache::thePredefinedLightweightLoopbackConfigName
staticprotected

The predefined lightweight loopback configuration name.

DtRtiConnectionInfo DtConnectionCache::thePredefinedLightweightLoopbackConn
staticprotected

The predefined lightweight loopback connection.

MAKRti::DtString DtConnectionCache::thePredefinedLightweightLoopbackConnName
staticprotected

The predefined lightweight loopback connection name.

DtRtiConnectionConfigurationInfo DtConnectionCache::thePredefinedRtiexecConfig
staticprotected

The predefined rtiexec configuration.

MAKRti::DtString DtConnectionCache::thePredefinedRtiexecConfigName
staticprotected

The predefined rtiexec configuration name.

DtRtiConnectionInfo DtConnectionCache::thePredefinedRtiexecConn
staticprotected

The predefined rtiexec connection.

MAKRti::DtString DtConnectionCache::thePredefinedRtiexecConnName
staticprotected

The predefined rtiexec connection name.

DtRtiConnectionConfigurationInfo DtConnectionCache::thePredefinedRtiexecLoopbackConfig
staticprotected

The predefined rtiexec loopback configuration.

MAKRti::DtString DtConnectionCache::thePredefinedRtiexecLoopbackConfigName
staticprotected

The predefined rtiexec loopback configuration name.

DtRtiConnectionInfo DtConnectionCache::thePredefinedRtiexecLoopbackConn
staticprotected

The predefined rtiexec loopback connection.

MAKRti::DtString DtConnectionCache::thePredefinedRtiexecLoopbackConnName
staticprotected

The predefined rtiexec loopback connection name.


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

Document ID: Generated on Mon Jul 9 10:30:41 EDT 2018 from SVN revision 190224
Copyright © 2005-2018 VT MÄK Inc. All Rights Reserved (www.mak.com)