MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
resRepMsg.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1998 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: resRepMsg.h,v $ $Revision: 1.10 $ $State: Exp $
7 *******************************************************************************/
8 
11 
12 #ifndef DtRestoreReplyMsg_H_
13 #define DtRestoreReplyMsg_H_
14 
15 #include "rtiMsg.h"
16 #include "netResRep.h"
17 
18 
19 class DtConnectionMgr;
20 class DtRestoreReplyMsg;
21 typedef void (*DtRestoreReplyCb)(const DtRestoreReplyMsg& msg, void* usr);
22 
23 
25 {
26 public:
27 
28  enum replyCodes
29  {
30  DT_RESTORE_OK = 0,
31  DT_RESTORE_NO_LABEL = 1,
32  DT_RESTORE_WRONG_CONFIG = 2,
33  DT_RESTORE_IN_PROCESS = 3
34  };
35 
37  DtRestoreReplyMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
38 
41  const char* theLabel,
42  const replyCodes response,
43  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
44 
46  DtRestoreReplyMsg(const DtNetRestoreReplyMsg* netRepMsg,
47  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
48 
50  virtual ~DtRestoreReplyMsg();
51 
53  virtual DtRtiMsg* clone(bool copy = true) const;
54 
56  virtual void setLabel(const char* label);
57  virtual const char* label() const;
58 
60  virtual void setReply(const replyCodes value);
61  virtual replyCodes reply() const;
62 
64  virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const;
65 
70  virtual unsigned long destinationID() const;
71  virtual void setDestinationID(unsigned long destinationIDValue);
72 
73 public:
74 
76  static DtRtiMsg* create(const DtNetMsgHeader* initial,
77  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
79  static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
80 
82  static void addCallback(DtConnectionMgr *conn,
83  DtRestoreReplyCb cb, void *usr);
84  static void removeCallback(DtConnectionMgr *conn,
85  DtRestoreReplyCb cb, void *usr);
86 
87 protected:
89  virtual char* labelPtr();
90 
92  virtual int labelFieldSize() const;
93 
95  virtual DtNetRestoreReplyMsg* netRestoreReplyMsg();
96  virtual const DtNetRestoreReplyMsg* netRestoreReplyMsg() const;
97 
100 
102  virtual int minSize(const char* theLabel=NULL) const;
103 
105  virtual void setLabelSize(int size);
106  virtual int labelSize() const;
107 
109  virtual DtRestoreReplyMsg* self() const;
110 
111 
112 
113 protected:
114 
115  char* myLabel;
116 };
117 
119 {
120  return const_cast<DtRestoreReplyMsg*>( this );
121 }
122 
123 #endif

Document ID: Generated on Wed Mar 11 20:26:49 EDT 2015 from SVN revision 150939
Copyright © 2005-2015 VT MÄK Inc. All Rights Reserved (www.mak.com)