MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
discObjMsg.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2001 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: discObjMsg.h,v $ $Revision: 1.8 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #ifndef DtDiscObjMsg_H_
13 #define DtDiscObjMsg_H_
14 
15 #include "rtiMsg.h"
16 #include "netDiscObjMsg.h"
17 
18 class DtConnectionMgr;
19 class DtDiscObjMsg;
20 
21 typedef void (*DtDiscObjCb)(const DtDiscObjMsg& msg, void* usr);
22 
24 {
25 public:
26 
28  DtDiscObjMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
29 
31  DtObjectInstanceHandle objHandleValue,
32  DtObjectClassHandle classHandleValue,
33  DtFederateHandle owner,
34  bool removeDiscoverValue,
35  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
36 
38  DtDiscObjMsg(const DtNetDiscObjMsg* netRepMsg,
39  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
40 
42  virtual ~DtDiscObjMsg();
43 
45  virtual DtRtiMsg* clone(bool copy = true) const;
46 
48  virtual void set(
49  DtObjectInstanceHandle objHandleValue,
50  DtObjectClassHandle classHandleValue,
51  DtFederateHandle owner,
52  bool removeDiscoverValue);
53 
55  virtual void setObjHandle(DtObjectInstanceHandle objHandle);
56  virtual void setObjHandles(const std::set<DtObjectInstanceHandle>& objHandles);
57  virtual void getObjHandles(std::vector<DtObjectInstanceHandle>& objHandles) const;
58 
60  virtual void setClassHandle(DtObjectClassHandle hand);
61  virtual DtObjectClassHandle classHandle() const;
62 
65  virtual void setOwnerHandle(DtFederateHandle owner);
66  virtual DtFederateHandle ownerHandle() const;
67 
71  virtual void setRemoveDiscover(bool removeDiscoverValue);
72  virtual bool removeDiscover() 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  DtDiscObjCb cb, void *usr);
89  static void removeCallback(DtConnectionMgr *conn,
90  DtDiscObjCb cb, void *usr);
91 
92 protected:
93 
95  virtual DtNetDiscObjMsg* netDiscObjMsg();
96  virtual const DtNetDiscObjMsg* netDiscObjMsg() const;
97 
100 
102  virtual int minSize() const;
103 
105  virtual void setObjHandleCount( unsigned long count );
106  virtual unsigned long objHandleCount() const;
107 
109  virtual const DtNetU32* objHandlesPtr() const;
110  virtual DtNetU32* objHandlesPtr();
111 
112 
114  virtual DtDiscObjMsg* self() const;
115 };
116 
117 
119 {
120  return const_cast<DtDiscObjMsg*>( this );
121 }
122 
123 #endif
124 

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)