MAK RTIspy API Documentation for HLA 1516
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 
29 {
30 public:
31 
36  DtConnectionCache( const MAKRti::DtFilename& xmlFile );
37 
39  virtual ~DtConnectionCache();
40 
43  virtual bool writeToFile();
44 
46  virtual bool writeToFile( const MAKRti::DtFilename& xmlFile );
47 
49  virtual std::ostream& print( std::ostream& ostr ) const;
50 
52  virtual void getConnections( DtRtiConnectionAndConfiguration& connsAndConfigs );
53 
55  virtual bool setConnections( const DtRtiConnectionAndConfiguration& conns );
56 
58  virtual void clearConnections();
59 
61  virtual bool fileWasRead() const;
62 
65  virtual bool getFileVersion( MAKRti::DtString& version ) const;
66 
68  virtual bool isCacheVersionOld() const;
69 
70 private:
71 
74  DtConnectionCache& operator=( const DtConnectionCache& );
75 
76 protected:
77 
79  virtual void getRtiexecConnectionsFromEnv( DtRtiConnectionAndConfiguration& connsAndConfigs );
80 
82  virtual void getLightweightConnectionsFromEnv( DtRtiConnectionAndConfiguration& connsAndConfigs );
83 
85  virtual void getConfigurationsFromEnv( DtRtiConnectionAndConfiguration& connsAndConfigs );
86 
88  virtual MAKRti::DtEnvValueSP addConnectionToEnv( const DtRtiConnectionInfoDataPair& conn );
89  virtual MAKRti::DtEnvValueSP addConfigurationToEnv( const DtRtiConfigurationInfoDataPair& config );
90 
92  virtual void removeConnectionFromEnv( const DtRtiConnectionInfoDataPair& conn );
93  virtual void removeConfigurationFromEnv( const DtRtiConfigurationInfoDataPair& config );
94 
96  void setConnFromEnv( DtRtiConnectionInfoDataPair& conn,
97  MAKRti::DtEnvValueSP val );
98 
100  void setConfigFromEnv( DtRtiConfigurationInfoDataPair& config,
101  MAKRti::DtEnvValueSP val );
102 
105  bool parseFile( const MAKRti::DtFilename& filename );
106 
107 protected:
108 
110  MAKRti::DtEnvironment myEnvironment;
111 
115  std::auto_ptr< MAKRti::DtEnvXMLWriter > myXmlWriter;
116 
118  MAKRti::DtFilename myXmlFile;
119 
121  MAKRti::DtString myReadFileVersion;
122 
125 
126 
128 
129 
130  static MAKRti::DtString thePredefinedLightweightConnName;
131 
134 
136  static MAKRti::DtString thePredefinedLightweightConfigName;
137 
141 
143 
144 
145  static MAKRti::DtString thePredefinedRtiexecConnName;
146 
149 
151  static MAKRti::DtString thePredefinedRtiexecConfigName;
152 
156 
158 
159 
161 
164 
167 
171 
173 
174 
175  static MAKRti::DtString thePredefinedRtiexecLoopbackConnName;
176 
179 
181  static MAKRti::DtString thePredefinedRtiexecLoopbackConfigName;
182 
186 
187 };
188 
189 inline std::ostream& operator<<( std::ostream& ostr, const DtConnectionCache& cache )
190 {
191  return cache.print( ostr );
192 }
193 
194 #endif // DtConnectionCache_H_

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)