MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
savRespMsg.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1998 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: savRespMsg.h,v $ $Revision: 1.7 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #ifndef DtSaveResponseMsg_H_
13 #define DtSaveResponseMsg_H_
14 
15 #include "rtiMsg.h"
16 #include "netSavRespMsg.h"
17 
18 class DtConnectionMgr;
19 class DtSaveResponseMsg;
20 typedef void (*DtSaveResponseCb)(const DtSaveResponseMsg& inter, void* usr);
21 
23 {
27 };
28 
30 {
31 public:
32 
34  DtSaveResponseMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
35 
36  DtSaveResponseMsg(DtFederateHandle requestingFederateVal,
37  unsigned short requestIDValue,
38  const char* labelVal,
39  DtSaveResponseFlag flag,
40  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
41 
43  DtSaveResponseMsg(const DtNetSaveResponseMsg* netRepMsg,
44  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
45 
47  virtual ~DtSaveResponseMsg();
48 
50  virtual DtRtiMsg* clone(bool copy = true) const;
51 
53  virtual void set(DtFederateHandle requestingFederateVal, unsigned short requestIDValue, const char* theLabel,
54  DtSaveResponseFlag flag, bool adjustBufferSize = true);
55 
57  void setRequestingFederate(DtFederateHandle requestingFederateVal);
58  DtFederateHandle requestingFederate() const;
59 
61  virtual void setRequestID(unsigned short requestIDValue);
62  virtual unsigned short requestID() const;
63 
65  virtual void setLabel(const char* label, bool adjustBufferSize = true);
66 
68  virtual const char* label() const;
69 
71  void setResponseFlag(DtSaveResponseFlag flag);
72  DtSaveResponseFlag responseFlag() const;
73 
75  virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const;
76 
77 public:
78 
80  static DtRtiMsg* create(const DtNetMsgHeader* initial,
81  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
82 
84  static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
85 
87  static void addCallback(DtConnectionMgr* conn,
88  DtSaveResponseCb cb, void* usr);
89  static void removeCallback(DtConnectionMgr* conn,
90  DtSaveResponseCb cb, void* usr);
91 
92 protected:
93 
95  virtual DtNetSaveResponseMsg* netSaveResponseMsg();
96  virtual const DtNetSaveResponseMsg* netSaveResponseMsg() const;
97 
100 
102  virtual char* labelPtr();
103 
105  virtual void setLabelSize(int size);
106  virtual int labelSize() const;
107 
109  virtual int minSize(const char* theLabel=NULL) const;
110 
112  virtual DtSaveResponseMsg* self() const;
113 
114 };
115 
116 
118 {
119  return const_cast<DtSaveResponseMsg*>( this );
120 }
121 
122 #endif
123 
DtRtiMsgKind
Definition: rtiMsgKind.h:9
Definition: netRtiMsgHdr.h:23
Definition: savRespMsg.h:29
Definition: fedTimeFactory.h:73
virtual void printData(DtLogicalTimeFactory *logicalTimeFactory) const
DtSaveResponseFlag
Definition: savRespMsg.h:22
Definition: netSavRespMsg.h:19
virtual DtSaveResponseMsg * self() const
Casts away const-ness.
Definition: savRespMsg.h:117
Definition: savRespMsg.h:26
#define NULL
Definition: baseTypes13.h:8
Instances of DtConnectionMgr manage the communication objects that the RTI will use to either communi...
Definition: connectMgr.h:67
DtRtiMsg is the base class for messages between RTI components.
Definition: rtiMsg.h:34
DtHandle DtFederateHandle
Definition: internalTypes.h:46
virtual DtRtiMsg * clone(bool copy=true) const =0
Return a copy/empty object of the same type as this.
virtual DtRtiMsgKind internalDtRtiMsgKind()=0
#define DT_DLL_LRC
Definition: rtiMsConfig.h:155
Definition: savRespMsg.h:24
Definition: savRespMsg.h:25
void(* DtSaveResponseCb)(const DtSaveResponseMsg &inter, void *usr)
Definition: savRespMsg.h:20

Document ID: Generated on Sun Jul 20 16:15:30 EDT 2025 from SVN revision 277985
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)