VR-Link API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 #include <cstring>
14 
21 
22 #if DtHLA_1516
23 
24  #if DtHLA_1516_EVOLVED
25 
26  #include <RTI/RTI1516.h>
27 
28 
30  DT_DLL_VL std::ostream& operator<<
31  (std::ostream& os, const rti1516e::ObjectInstanceHandle& handle);
32 
34  DT_DLL_VL std::ostream& operator<<
35  (std::ostream& os, const rti1516e::ObjectClassHandle& handle);
36 
38  DT_DLL_VL std::ostream& operator<<
39  (std::ostream& os, const rti1516e::InteractionClassHandle& handle);
40 
42  DT_DLL_VL std::ostream& operator<<
43  (std::ostream& os, const rti1516e::AttributeHandle& handle);
44 
46  DT_DLL_VL std::ostream& operator<<
47  (std::ostream& os, const rti1516e::ParameterHandle& handle);
48 
50  DT_DLL_VL std::ostream& operator<<
51  (std::ostream& os, const rti1516e::Exception& exception);
52 
55  namespace rti1516e {
56 
67  template <typename HandleType, typename MapType>
68  class CompatibleHandleValuePairSet
69  {
70  public:
71 
72  CompatibleHandleValuePairSet(MapType *AHVM);
73  CompatibleHandleValuePairSet(const MapType *AHVM);
74  ~CompatibleHandleValuePairSet();
75 
76  unsigned long size() const ;
77  HandleType getHandle( unsigned long i) const ;
78  unsigned long getValueLength( unsigned long i) const ;
79  void getValue(unsigned long i, char* buffer, unsigned long &valueLength) const ;
80  char *getValuePointer(unsigned long i, unsigned long &valueLength) const ;
81  void add(HandleType h, const char* buffer, unsigned long valueLength);
82  void remove(HandleType h);
83  void empty();
84 
85  protected:
86 
87  void updateCachedIterator(unsigned long i) const;
88 
89  MapType *myMap;
90  mutable int myLastPlace;
91  mutable typename MapType::iterator myLastMapPosition;
92  };
93 
94 
97  typedef CompatibleHandleValuePairSet<AttributeHandle, AttributeHandleValueMap>
99 
100  typedef CompatibleHandleValuePairSet<ParameterHandle, ParameterHandleValueMap>
102 
103 
105  typedef unsigned long ULong;
106  typedef ObjectInstanceHandle ObjectHandle;
107 
108  };
109 
110  #else
111 
112  #include <RTI/RTI1516.h>
113 
114 
116  DT_DLL_VL std::ostream& operator<<
117  (std::ostream& os, const rti1516::ObjectInstanceHandle& handle);
118 
120  DT_DLL_VL std::ostream& operator<<
121  (std::ostream& os, const rti1516::ObjectClassHandle& handle);
122 
124  DT_DLL_VL std::ostream& operator<<
125  (std::ostream& os, const rti1516::InteractionClassHandle& handle);
126 
128  DT_DLL_VL std::ostream& operator<<
129  (std::ostream& os, const rti1516::AttributeHandle& handle);
130 
132  DT_DLL_VL std::ostream& operator<<
133  (std::ostream& os, const rti1516::ParameterHandle& handle);
134 
136  DT_DLL_VL std::ostream& operator<<
137  (std::ostream& os, const rti1516::Exception& exception);
138 
141  namespace rti1516 {
142 
153  template <typename HandleType, typename MapType>
155  {
156  public:
157 
158  CompatibleHandleValuePairSet(MapType *AHVM);
159  CompatibleHandleValuePairSet(const MapType *AHVM);
161 
162  inline unsigned long size() const ;
163  inline HandleType getHandle( unsigned long i) const ;
164  inline unsigned long getValueLength( unsigned long i) const ;
165  inline void getValue(unsigned long i, char* buffer, unsigned long &valueLength) const ;
166  inline char *getValuePointer(unsigned long i, unsigned long &valueLength) const ;
167  inline void add(HandleType h, const char* buffer, unsigned long valueLength);
168  inline void remove(HandleType h);
169  inline void empty();
170 
171  protected:
172 
173  void updateCachedIterator(unsigned long i) const;
174 
175  MapType *myMap;
176  mutable int myLastPlace;
177  mutable typename MapType::iterator myLastMapPosition;
178  };
179 
180 
185 
188 
189 
191  typedef unsigned long ULong;
192  typedef ObjectInstanceHandle ObjectHandle;
193 
194  };
195 
196  #endif //DtHLA_1516_EVOLVED
197 
198 #define INCLUDE_rtiCompataibility_inl_
199  #include "rtiCompatibility.inl"
200 #undef INCLUDE_rtiCompataibility_inl_
201 
202 #else // DtHLA_1516
203 
204  #include <RTI.hh>
205 
206  #if !defined(_WIN32) && !defined(RTI_USES_STD_FSTREAM) && !defined(__darwin__)
207  DT_DLL_VL std::ostream& operator<< (std::ostream& os, const RTI::Exception& exception);
208  #endif
209 
210 #endif // DtHLA_1516
211 
212 
213 #endif // if DtHLA
214 

Document ID: Generated on Mon Jun 22 21:18:40 EDT 2020 from SVN revision 213785
Copyright © 2005-2018 MAK Technologies. All Rights Reserved (www.mak.com)