MAK RTIspy API Documentation for HLA Evolved
 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, bool succeeded, bool adjustBufferSize = true);
50 
52  virtual DtFederateHandle requestingFederate() const;
53  virtual void setRequestingFederate(DtFederateHandle fedHandle);
54 
56  virtual char const * objectName() const;
57  virtual void setObjectName(char const * objectName, bool adjustBufferSize = true);
58 
60  virtual bool result() const;
61  virtual void setResult(bool succeeded);
62 
64  virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const;
65 
66 public:
67 
69  static DtRtiMsg* create(const DtNetMsgHeader* initial,
70  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
71 
73  static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
74 
76  static void addCallback(DtConnectionMgr* conn,
77  DtNameReservedCb cb, void* usr, bool isMomCallback=false);
78  static void removeCallback(DtConnectionMgr* conn,
79  DtNameReservedCb cb, void* usr, bool isMomCallback=false);
80 
81 protected:
82 
84  virtual DtNetReserveNameMsg* netNameReservedMsg();
85  virtual DtNetReserveNameMsg const * netNameReservedMsg() const;
86 
89 
91  virtual int minSize(char const * objectName = nullptr) const;
92 
94  virtual char* namePtr() const;
95 
96 };
97 
98 #endif
99 
DtRtiMsgKind
Definition: rtiMsgKind.h:9
Definition: netRtiMsgHdr.h:23
Definition: fedTimeFactory.h:73
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: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

Document ID: Generated on Wed Jul 8 16:20:32 EDT 2026 from SVN revision 291616
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)