MAK RTIspy API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
connectionsCache.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2008 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: connectionsCache.h,v $ $Revision: 1.18 $ $State: Exp $
7 *******************************************************************************/
8 
11 
12 #ifndef DtConnectionCache_H_
13 #define DtConnectionCache_H_
14 
15 #include <mtl/environment.h>
16 #include <mtl/envXmlWriter.h>
17 #include <vlutil/vlString.h>
18 #include <vlutil/vlFilename.h>
19 #include <iosfwd>
20 
24 
26 
31 {
32 public:
33 
38  DtConnectionCache( const MAKRti::DtFilename& xmlFile );
39 
41  virtual ~DtConnectionCache();
42 
45  virtual bool writeToFile();
46 
48  virtual bool writeToFile( const MAKRti::DtFilename& xmlFile );
49 
51  virtual std::ostream& print( std::ostream& ostr ) const;
52 
54  virtual void getConnections( DtRtiConnectionAndConfiguration& connsAndConfigs );
55 
57  virtual bool setConnections( const DtRtiConnectionAndConfiguration& conns );
58 
60  virtual void clearConnections();
61 
63  virtual bool fileWasRead() const;
64 
67  virtual bool getFileVersion( MAKRti::DtString& version ) const;
68 
70  virtual bool isCacheVersionOld() const;
71 
72  virtual DtNetU128 rawUuid() const;
73 
74 private:
75 
78  DtConnectionCache& operator=( const DtConnectionCache& );
79 
80 protected:
81 
83  virtual void getRtiexecConnectionsFromEnv( DtRtiConnectionAndConfiguration& connsAndConfigs );
84 
86  virtual void getLightweightConnectionsFromEnv( DtRtiConnectionAndConfiguration& connsAndConfigs );
87 
89  virtual void getConfigurationsFromEnv( DtRtiConnectionAndConfiguration& connsAndConfigs );
90 
92  virtual void getForeignConnectionsFromEnv( DtRtiConnectionAndConfiguration& connsAndConfigs );
93 
95  virtual MAKRti::DtEnvValueSP addConnectionToEnv( const DtRtiConnectionInfoDataPair& conn );
96 
98  virtual MAKRti::DtEnvValueSP addConfigurationToEnv( const DtRtiConfigurationInfoDataPair& config );
99 
101  virtual MAKRti::DtEnvValueSP addForeignConnectionToEnv(const DtAssistantConnectionStruct& foreignConnection);
102 
104  virtual void removeConnectionFromEnv( const DtRtiConnectionInfoDataPair& conn );
105 
107  virtual void removeConfigurationFromEnv( const DtRtiConfigurationInfoDataPair& config );
108 
110  virtual void removeForeignConnectionsFromEnv( const DtHostNameAddress& foreignConnection );
111 
113  void setConnFromEnv( DtRtiConnectionInfoDataPair& conn,
114  MAKRti::DtEnvValueSP val );
115 
117  void setConfigFromEnv( DtRtiConfigurationInfoDataPair& config,
118  MAKRti::DtEnvValueSP val );
119 
122  bool parseFile( const MAKRti::DtFilename& filename );
123 
124 protected:
125 
127  MAKRti::DtEnvironment myEnvironment;
128 
132  DtUniquePtr< MAKRti::DtEnvXMLWriter > myXmlWriter;
133 
135  MAKRti::DtFilename myXmlFile;
136 
138  MAKRti::DtString myReadFileVersion;
139 
141  MAKRti::DtString myUuid;
142 
145 
146 
148 
149  static MAKRti::DtString thePredefinedLightweightConnName;
151 
154 
156  static MAKRti::DtString thePredefinedLightweightConfigName;
157 
161 
163 
164  static MAKRti::DtString thePredefinedRtiexecConnName;
166 
169 
171  static MAKRti::DtString thePredefinedRtiexecConfigName;
172 
176 
178 
179  static MAKRti::DtString thePredefinedLightweightLoopbackConnName;
181 
184 
187 
191 
193 
194  static MAKRti::DtString thePredefinedRtiexecLoopbackConnName;
196 
199 
201  static MAKRti::DtString thePredefinedRtiexecLoopbackConfigName;
202 
206 
207 };
208 
209 inline std::ostream& operator<<( std::ostream& ostr, const DtConnectionCache& cache )
210 {
211  return cache.print( ostr );
212 }
213 
214 #endif // DtConnectionCache_H_
static DtRtiConnectionInfo thePredefinedRtiexecLoopbackConn
The predefined rtiexec loopback connection.
Definition: connectionsCache.h:198
static MAKRti::DtString thePredefinedRtiexecConfigName
The predefined rtiexec configuration name.
Definition: connectionsCache.h:171
static MAKRti::DtString thePredefinedRtiexecLoopbackConfigName
The predefined rtiexec loopback configuration name.
Definition: connectionsCache.h:201
Contains the DtRtiConnectionAndConfiguration class declaration.
MAKRti::DtString myReadFileVersion
The version of the file that was read.
Definition: connectionsCache.h:138
static DtRtiConnectionConfigurationInfo thePredefinedLightweightLoopbackConfig
The predefined lightweight loopback configuration.
Definition: connectionsCache.h:189
This file contains the declaration of DtRtiConnectionInfo.
std::pair< DtRtiConnectionInfo, DtRtiAssociatedConnectionData > DtRtiConnectionInfoDataPair
Pair of connection with associated data.
Definition: assistantConnectionInfo.h:29
Structure Remote Assistant to be displayed.
Definition: assistantInfo.h:39
Contains the DtRtiConnectionConfigurationInfo class declaration.
virtual std::ostream & print(std::ostream &ostr) const
Prints the cache to the given output stream.
bool myFileWasRead
Indicates whether a cache file was found and read.
Definition: connectionsCache.h:144
std::ostream & operator<<(std::ostream &ostr, const DtAssistantConfig &config)
Definition: assistantConfig.h:85
MAKRti::DtEnvironment myEnvironment
The cached license environment.
Definition: connectionsCache.h:127
Stores the cached connections which the Assistant can provide to components if necessary.
Definition: connectionsCache.h:30
static DtRtiConnectionConfigurationInfo thePredefinedLightweightConfig
The predefined lightweight configuration.
Definition: connectionsCache.h:159
static MAKRti::DtString thePredefinedLightweightConfigName
The predefined lightweight configuration name.
Definition: connectionsCache.h:156
static DtRtiConnectionInfo thePredefinedLightweightLoopbackConn
The predefined lightweight loopback connection.
Definition: connectionsCache.h:183
std::pair< DtRtiConnectionConfigurationInfo, DtRtiAssociatedConfigurationData > DtRtiConfigurationInfoDataPair
Pair of configuration with associated data.
Definition: assistantConnectionConfigurationInfo.h:58
DtHostNameAddress stores information on a host, input as either hostname, IP address, or both.
Definition: hostNameAddress.h:23
MAKRti::DtString myUuid
The uuid of the file that was read.
Definition: connectionsCache.h:141
Stores the information on an RTI configuration known by the Assistant.
Definition: assistantConnectionConfigurationInfo.h:61
static DtRtiConnectionConfigurationInfo thePredefinedRtiexecLoopbackConfig
The predefined rtiexec loopback configuration.
Definition: connectionsCache.h:204
static DtRtiConnectionInfo thePredefinedLightweightConn
The predefined lightweight connection.
Definition: connectionsCache.h:153
static MAKRti::DtString thePredefinedLightweightLoopbackConfigName
The predefined lightweight loopback configuration name.
Definition: connectionsCache.h:186
#define DT_DLL_ASSISTANTAPP
Definition: rtiMsConfig.h:151
Stores the information on an RTI connection and possibly matching configuration known by the Assistan...
Definition: connectionAndConfiguration.h:22
DtUniquePtr< MAKRti::DtEnvXMLWriter > myXmlWriter
Document writer - used to convert the document to XML in memory or file myXmlWriter is persistent so ...
Definition: connectionsCache.h:132
static DtRtiConnectionInfo thePredefinedRtiexecConn
The predefined rtiexec connection.
Definition: connectionsCache.h:168
static DtRtiConnectionConfigurationInfo thePredefinedRtiexecConfig
The predefined rtiexec configuration.
Definition: connectionsCache.h:174
Stores the information on an RTI connection known by the Assistant.
Definition: assistantConnectionInfo.h:36
MAKRti::DtFilename myXmlFile
The name of the default XML file to read from and write to.
Definition: connectionsCache.h:135

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)