MAK RTIspy API Documentation for HLA 1516
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 #if defined(DtIFSPEC1516) || defined(DtIFSPEC1516E)
16 
17 #include "rtiMsConfig.h"
18 #include <string>
19 #include "rtiMsg.h"
20 #include "netRtiMsgHdr.h"
21 
22 class DtConnectionMgr;
24 class DtNameReservedMsg;
25 typedef void (*DtNameReservedCb)(const DtNameReservedMsg& inter, void* usr);
26 
27 class DT_DLL_LRC DtNameReservedMsg : public DtRtiMsg
28 {
29 public:
30 
32  DtNameReservedMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
33 
34  DtNameReservedMsg(
35  DtFederateHandle fedHandle,
36  char const * objectName,
37  bool succeeded,
38  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
39 
41  DtNameReservedMsg(DtNetReserveNameMsg const * netRepMsg,
42  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
43 
45  virtual ~DtNameReservedMsg();
46 
48  virtual DtRtiMsg* clone(bool copy = true) const;
49 
51  virtual void set(DtFederateHandle fedHandle, char const * objectName,
52  bool succeeded);
53 
55  virtual DtFederateHandle requestingFederate() const;
56  virtual void setRequestingFederate(DtFederateHandle fedHandle);
57 
59  virtual char const * objectName() const;
60  virtual void setObjectName(char const * objectName);
61 
63  virtual bool result() const;
64  virtual void setResult(bool succeeded);
65 
67  virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const;
68 
69 public:
70 
72  static DtRtiMsg* create(const DtNetMsgHeader* initial,
73  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
74 
76  static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
77 
79  static void addCallback(DtConnectionMgr* conn,
80  DtNameReservedCb cb, void* usr, bool isMomCallback=false);
81  static void removeCallback(DtConnectionMgr* conn,
82  DtNameReservedCb cb, void* usr, bool isMomCallback=false);
83 
84 protected:
85 
87  virtual DtNetReserveNameMsg* netNameReservedMsg();
88  virtual DtNetReserveNameMsg const * netNameReservedMsg() const;
89 
92 
94  virtual int minSize(char const * objectName) const;
95 
97  virtual char* namePtr() const;
98 
99 };
100 
101 #endif
102 #endif
103 

Document ID: Generated on Tue May 7 16:26:47 EDT 2013 from SVN revision 126903
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)