VR-Link API Documentation for HLA Evolved
rtiCompatibility.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *******************************************************************************/
5 #pragma once
6 
7 #if DtHLA
8 
9 
10 
11 #include <vlutil/vlMachineTypes.h>
12 #include <iosfwd>
13 
20 
21 #if DtHLA_1516
22 
23  #if DtHLA_1516_EVOLVED
24 
25  #include <RTI/RTI1516.h>
26 
27 
29  DT_DLL_VL std::ostream& operator<<
30  (std::ostream& os, const rti1516e::ObjectInstanceHandle& handle);
31 
33  DT_DLL_VL std::ostream& operator<<
34  (std::ostream& os, const rti1516e::ObjectClassHandle& handle);
35 
37  DT_DLL_VL std::ostream& operator<<
38  (std::ostream& os, const rti1516e::InteractionClassHandle& handle);
39 
41  DT_DLL_VL std::ostream& operator<<
42  (std::ostream& os, const rti1516e::AttributeHandle& handle);
43 
45  DT_DLL_VL std::ostream& operator<<
46  (std::ostream& os, const rti1516e::ParameterHandle& handle);
47 
49  DT_DLL_VL std::ostream& operator<<
50  (std::ostream& os, const rti1516e::Exception& exception);
51 
54  namespace rti1516e {
55 
66  template <typename HandleType, typename MapType>
67  class CompatibleHandleValuePairSet
68  {
69  public:
70 
71  CompatibleHandleValuePairSet(MapType *AHVM);
72  CompatibleHandleValuePairSet(const MapType *AHVM);
73  ~CompatibleHandleValuePairSet();
74 
75  unsigned long size() const ;
76  HandleType getHandle( unsigned long i) const ;
77  unsigned long getValueLength( unsigned long i) const ;
78  void getValue(unsigned long i, char* buffer, unsigned long &valueLength) const ;
79  char *getValuePointer(unsigned long i, unsigned long &valueLength) const ;
80  void add(HandleType h, const char* buffer, unsigned long valueLength);
81  void remove(HandleType h);
82  void empty();
83 
84  protected:
85 
86  void updateCachedIterator(unsigned long i) const;
87 
88  MapType *myMap;
89  mutable int myLastPlace;
90  mutable typename MapType::iterator myLastMapPosition;
91  };
92 
93 
96  typedef CompatibleHandleValuePairSet<AttributeHandle, AttributeHandleValueMap>
97  AttributeHandleValuePairSet;
98 
99  typedef CompatibleHandleValuePairSet<ParameterHandle, ParameterHandleValueMap>
100  ParameterHandleValuePairSet;
101 
102 
104  typedef unsigned long ULong;
105  typedef ObjectInstanceHandle ObjectHandle;
106 
107  };
108 
109  #else
110 
111  #include <RTI/RTI1516.h>
112 
113 
115  DT_DLL_VL std::ostream& operator<<
116  (std::ostream& os, const rti1516::ObjectInstanceHandle& handle);
117 
119  DT_DLL_VL std::ostream& operator<<
120  (std::ostream& os, const rti1516::ObjectClassHandle& handle);
121 
123  DT_DLL_VL std::ostream& operator<<
124  (std::ostream& os, const rti1516::InteractionClassHandle& handle);
125 
127  DT_DLL_VL std::ostream& operator<<
128  (std::ostream& os, const rti1516::AttributeHandle& handle);
129 
131  DT_DLL_VL std::ostream& operator<<
132  (std::ostream& os, const rti1516::ParameterHandle& handle);
133 
135  DT_DLL_VL std::ostream& operator<<
136  (std::ostream& os, const rti1516::Exception& exception);
137 
140  namespace rti1516 {
141 
152  template <typename HandleType, typename MapType>
153  class CompatibleHandleValuePairSet
154  {
155  public:
156 
157  CompatibleHandleValuePairSet(MapType *AHVM);
158  CompatibleHandleValuePairSet(const MapType *AHVM);
159  ~CompatibleHandleValuePairSet();
160 
161  inline unsigned long size() const ;
162  inline HandleType getHandle( unsigned long i) const ;
163  inline unsigned long getValueLength( unsigned long i) const ;
164  inline void getValue(unsigned long i, char* buffer, unsigned long &valueLength) const ;
165  inline char *getValuePointer(unsigned long i, unsigned long &valueLength) const ;
166  inline void add(HandleType h, const char* buffer, unsigned long valueLength);
167  inline void remove(HandleType h);
168  inline void empty();
169 
170  protected:
171 
172  void updateCachedIterator(unsigned long i) const;
173 
174  MapType *myMap;
175  mutable int myLastPlace;
176  mutable typename MapType::iterator myLastMapPosition;
177  };
178 
179 
182  typedef CompatibleHandleValuePairSet<AttributeHandle, AttributeHandleValueMap>
183  AttributeHandleValuePairSet;
184 
185  typedef CompatibleHandleValuePairSet<ParameterHandle, ParameterHandleValueMap>
186  ParameterHandleValuePairSet;
187 
188 
190  typedef unsigned long ULong;
191  typedef ObjectInstanceHandle ObjectHandle;
192 
193  };
194 
195  #endif //DtHLA_1516_EVOLVED
196 
197 #define INCLUDE_rtiCompataibility_inl_
198  #include "rtiCompatibility.inl"
199 #undef INCLUDE_rtiCompataibility_inl_
200 
201 #else // DtHLA_1516
202 
203  #include <RTI.hh>
204 
205  #if !defined(_WIN32) && !defined(RTI_USES_STD_FSTREAM) && !defined(__darwin__)
206  DT_DLL_VL std::ostream& operator<< (std::ostream& os, const RTI::Exception& exception);
207  #endif
208 
209 #endif // DtHLA_1516
210 
211 
212 #endif // if DtHLA
213 

Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)