6 #ifndef handleCreator_H_
7 #define handleCreator_H_
16 #include <vlutil/vlFedTarget.h>
18 #pragma warning(disable : 4302)
20 #if defined(DtIFSPEC13)
27 #define DEFINE_HANDLE_MAKER(HandleKind) \
28 inline RTI::HandleKind make##HandleKind(Dt##HandleKind handle) \
30 return (RTI::HandleKind)(handle); \
33 inline Dt##HandleKind make##HandleKind##Impl( \
34 const RTI::HandleKind& handle) \
36 return (Dt##HandleKind)(handle); \
59 #include <vlutil/vlFedTarget.h>
69 #define DEFINE_HANDLE_CLASS_FRIEND(HandleKind) \
71 class HandleKind##Friend \
74 HandleKind##Friend(); \
75 static RTI_API::HandleKind HandleKind(Dt##HandleKind handleValue); \
76 static RTI_API::HandleKind HandleKind( \
77 RTI_API::VariableLengthData const & encodedValue); \
78 static HandleKind##Implementation const* getImplementation( \
79 RTI_API::HandleKind const& handle); \
80 static HandleKind##Implementation* getImplementation( \
81 RTI_API::HandleKind& handle); \
84 inline HandleKind##Friend::HandleKind##Friend() \
88 inline RTI_API::HandleKind HandleKind##Friend::HandleKind( \
89 Dt##HandleKind handleValue) \
91 return RTI_API::HandleKind((HandleKind##Implementation*)handleValue); \
94 inline RTI_API::HandleKind HandleKind##Friend::HandleKind( \
95 RTI_API::VariableLengthData const & encodedValue) \
97 return RTI_API::HandleKind(encodedValue); \
100 inline HandleKind##Implementation const * \
101 HandleKind##Friend::getImplementation(RTI_API::HandleKind const& handle) \
103 return handle.getImplementation(); \
106 inline HandleKind##Implementation* \
107 HandleKind##Friend::getImplementation(RTI_API::HandleKind & handle) \
109 return handle.getImplementation(); \
114 #define DEFINE_FILL_HANDLE_SET_IMPL(HandleKind) \
116 inline void fill##HandleKind##SetImpl( \
117 RTI_API::HandleKind##Set const & rtiHandleSet, \
118 Dt##HandleKind##StdSet & internHandleSet) \
120 for (RTI_API::HandleKind##Set::const_iterator iter = rtiHandleSet.begin(); \
121 iter != rtiHandleSet.end(); \
124 internHandleSet.insert(make##HandleKind##Impl(*iter)); \
136 #if !defined(DtIFSPEC1516) && !defined(DtIFSPEC1516E)
147 static RTI_API::MessageRetractionHandle
MessageRetractionHandle(RTI_API::VariableLengthData
const & encodedValue);
163 RTI_API::VariableLengthData
const & encodedValue)
165 return RTI_API::MessageRetractionHandle(encodedValue);
169 RTI_API::MessageRetractionHandle
const& handle)
171 return handle.getImplementation();
175 RTI_API::MessageRetractionHandle & handle)
177 return handle.getImplementation();
187 #define DEFINE_HANDLE_MAKERS(HandleKind) \
189 inline RTI_API::HandleKind make##HandleKind( \
190 RTI_API::VariableLengthData const & encodedValue) \
192 return RTI_API::HandleKind##Friend::HandleKind(encodedValue); \
195 inline Dt##HandleKind make##HandleKind##Impl(const RTI_API::HandleKind& handle) \
197 return (Dt##HandleKind)RTI_API::HandleKind##Friend::getImplementation(handle);\
200 inline RTI_API::HandleKind make##HandleKind(Dt##HandleKind handle) \
202 return RTI_API::HandleKind##Friend::HandleKind(handle); \
248 #define DEFINE_FILL_HANDLE_SET(HandleKind) \
250 inline void fill##HandleKind##Set( \
251 Dt##HandleKind##StdSet const & internHandleSet, \
252 RTI_API::HandleKind##Set & rtiHandleSet) \
254 for (Dt##HandleKind##StdSet::const_iterator iter = internHandleSet.begin();\
255 iter != internHandleSet.end(); \
258 rtiHandleSet.insert(make##HandleKind(*iter)); \
281 #if defined(DtIFSPEC13)
291 #elif defined(DtIFSPEC1516) || defined(DtIFSPEC1516E)
311 return RTI_API::TransportationTypeHandleFriend::TransportationTypeHandle(handle);
316 return RTI_API::TransportationTypeHandleFriend::TransportationTypeHandle(encodedValue);
321 #if defined(DtIFSPEC13)
324 return MAKRti::DtOrderType(order);
334 return (order ==
RTI_API::RECEIVE) ? MAKRti::DtReceive : MAKRti::DtTimestamp;
Handle ObjectHandle
Definition: RTItypes13.h:116
OrderType
Definition: datatypes.pb.h:472
MessageRetractionHandleFriend()
Definition: handleCreator.h:152
static MessageRetractionHandleImplementation const * getImplementation(RTI_API::MessageRetractionHandle const &handle)
Definition: handleCreator.h:168
Definition: datatypes.pb.h:474
RTI_API::TransportationTypeHandle makeTransportationType(DtTransportHandle handle)
Definition: handleCreator.h:309
ULong InteractionClassHandle
Definition: RTItypes13.h:106
TransportationType
Definition: rtiAmbassadorFedProBase.h:43
Handle ParameterHandle
Definition: RTItypes13.h:114
RTI_API::MessageRetractionHandle makeMessageRetractionHandle(RTI_API::VariableLengthData const &encodedValue)
Definition: handleCreator.h:214
TransportationHandle TransportType
Definition: RTItypes13.h:124
static RTI_API::MessageRetractionHandle MessageRetractionHandle(DtMessageRetractionHandle handleValue)
Definition: handleCreator.h:156
DtHandle DtTransportationTypeHandle
Definition: internalTypes.h:61
#define DEFINE_HANDLE_CLASS_FRIEND(HandleKind)
HLA 1516(X) handles require a friend class to help with converting between handles and implementation...
Definition: handleCreator.h:69
RTI_API::OrderType makeOrderType(MAKRti::DtOrderType order)
Definition: handleCreator.h:337
DtTransportHandle makeTransportationTypeImpl(RTI_API::TransportationTypeHandle handle)
!DtIFSPEC13
Definition: handleCreator.h:304
RTI_API::MessageRetractionHandle makeMessageRetraction(RTI_API::VariableLengthData const &encodedValue)
Definition: handleCreator.h:235
#define DEFINE_FILL_HANDLE_SET(HandleKind)
Definition: handleCreator.h:248
Handle DimensionHandle
Definition: RTItypes13.h:118
DtHandle DtFederateHandle
Definition: internalTypes.h:46
DtHandle DtObjectInstanceHandle
Definition: internalTypes.h:50
DtHandle DtTransportHandle
Definition: internalTypes.h:59
Specific message retraction handle class that doesn't fit the structure of the other handle class imp...
Definition: handleCreator.h:142
#define DEFINE_HANDLE_MAKERS(HandleKind)
Define functions to create handles from the implementation type (or from an encoded value) and vice v...
Definition: handleCreator.h:187
#define DEFINE_FILL_HANDLE_SET_IMPL(HandleKind)
Macro defines a function to fill an internal handle set from a 1516 handle set.
Definition: handleCreator.h:114
Definition: msgRetractHandleImpl.h:30
ULong FederateHandle
Definition: RTItypes13.h:120
Definition: internalTypes.h:84
DtMessageRetractionHandle makeMessageRetractionHandleImpl(RTI_API::MessageRetractionHandle handle)
Definition: handleCreator.h:219
Definition: datatypes.pb.h:473
ULong ObjectClassHandle
Definition: RTItypes13.h:104
The declaration of internal types.
DtMessageRetractionHandle const & value() const
Definition: msgRetractHandleImpl.h:178
Handle AttributeHandle
Definition: RTItypes13.h:112
MAKRti::DtOrderType makeOrderTypeImpl(RTI_API::OrderType order)
Definition: handleCreator.h:332