MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
messageFactory.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1998 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: messageFactory.h,v $ $Revision: 1.2 $ $State: Exp $
7 *********************************************************************/
8 
9 #ifndef DtMessageFactory_H_
10 #define DtMessageFactory_H_
11 
15 
16 
17 #include <vlutil/vlBaseMsg.h>
18 #include <map>
19 #include <cstddef>
20 
32 template <typename T_Message, typename T_MessageKind, typename T_NetworkHeader>
34 {
35 public:
36 
41  typedef T_Message* (*DtReceiveMessageCreator)(
42  const T_NetworkHeader* packet, MAKRti::DtBufferPtr buffer);
43 
46  typedef T_Message* (*DtSendMessageCreator)(MAKRti::DtBufferPtr buffer);
47 
49  typedef std::map<T_MessageKind, DtReceiveMessageCreator> DtReceiveCreatorMap;
50 
52  typedef std::map<T_MessageKind, DtSendMessageCreator> DtSendCreatorMap;
53 
54 public:
55 
58 
61 
64 
67 
75  T_Message* create(T_MessageKind kind,
76  MAKRti::DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
77 
78 
83 
92  T_Message* create(const T_NetworkHeader* packet,
93  MAKRti::DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
94 
100  DtSendMessageCreator addSendCreator(T_MessageKind kind,
101  DtSendMessageCreator creator);
102 
108  DtReceiveMessageCreator addRecvCreator(T_MessageKind kind,
109  DtReceiveMessageCreator creator);
110 
113  void addCreators(T_MessageKind kind,
114  DtReceiveMessageCreator rCreator, DtSendMessageCreator sCreator);
115 
117  int packetGood(const T_NetworkHeader* packet) const;
118 
119 public:
120 
122  static int dfltPacketGood(const T_NetworkHeader* packet);
123 
124 protected:
125 
128 
131 };
132 
133 #include "messageFactory.inl"
134 
135 #endif

Document ID: Generated on Fri Sep 27 00:57:56 EDT 2019 from SVN revision 201708
Copyright © 2005-2018 VT MÄK Inc. All Rights Reserved (www.mak.com)