MAK RTIspy API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
nameReservedMsg.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2003 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: nameReservedMsg.h,v $ $Revision: 1.6 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #ifndef DtNameReservedMsg_H_
13 #define DtNameReservedMsg_H_
14 
15 #include "rtiMsConfig.h"
16 #include <string>
17 #include "rtiMsg.h"
18 #include "netRtiMsgHdr.h"
19 
20 class DtConnectionMgr;
22 class DtNameReservedMsg;
23 typedef void (*DtNameReservedCb)(const DtNameReservedMsg& inter, void* usr);
24 
26 {
27 public:
28 
30  DtNameReservedMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
31 
33  DtFederateHandle fedHandle,
34  char const * objectName,
35  bool succeeded,
36  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
37 
39  DtNameReservedMsg(DtNetReserveNameMsg const * netRepMsg,
40  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
41 
43  virtual ~DtNameReservedMsg();
44 
46  virtual DtRtiMsg* clone(bool copy = true) const;
47 
49  virtual void set(DtFederateHandle fedHandle, char const * objectName,
50  bool succeeded);
51 
53  virtual DtFederateHandle requestingFederate() const;
54  virtual void setRequestingFederate(DtFederateHandle fedHandle);
55 
57  virtual char const * objectName() const;
58  virtual void setObjectName(char const * objectName);
59 
61  virtual bool result() const;
62  virtual void setResult(bool succeeded);
63 
65  virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const;
66 
67 public:
68 
70  static DtRtiMsg* create(const DtNetMsgHeader* initial,
71  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
72 
74  static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
75 
77  static void addCallback(DtConnectionMgr* conn,
78  DtNameReservedCb cb, void* usr, bool isMomCallback=false);
79  static void removeCallback(DtConnectionMgr* conn,
80  DtNameReservedCb cb, void* usr, bool isMomCallback=false);
81 
82 protected:
83 
85  virtual DtNetReserveNameMsg* netNameReservedMsg();
86  virtual DtNetReserveNameMsg const * netNameReservedMsg() const;
87 
90 
92  virtual int minSize(char const * objectName) const;
93 
95  virtual char* namePtr() const;
96 
97 };
98 
99 #endif
100 
DtRtiMsgKind
Definition: rtiMsgKind.h:9
Definition: netRtiMsgHdr.h:23
!DtIFSPEC1516
Definition: fedTimeFactory.h:190
virtual void printData(DtLogicalTimeFactory *logicalTimeFactory) const
Definition: netReserveMsg.h:19
Definition: nameReservedMsg.h:25
void(* DtNameReservedCb)(const DtNameReservedMsg &inter, void *usr)
Definition: nameReservedMsg.h:23
Instances of DtConnectionMgr manage the communication objects that the RTI will use to either communi...
Definition: connectMgr.h:60
DtRtiMsg is the base class for messages between RTI components.
Definition: rtiMsg.h:45
DtHandle DtFederateHandle
Definition: internalTypes.h:29
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:126

Document ID: Generated on Mon Sep 7 15:40:32 EDT 2020 from SVN revision 217499
Copyright © 2005-2020 MAK Technologies Inc. All Rights Reserved (www.mak.com)