MAK RTIspy API Documentation for HLA Evolved
creRespMsg.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1998 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: creRespMsg.h,v $ $Revision: 1.18 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #ifndef DtCreateResponseMsg_H_
13 #define DtCreateResponseMsg_H_
14 
15 #include "rtiMsg.h"
16 #include "netRtiMsgHdr.h"
17 #include "netCrRespMsg.h"
18 
19 class DtConnectionMgr;
21 typedef void (*DtCreateResponseCb)(const DtCreateResponseMsg& inter, void* usr);
22 
24 {
30 };
31 
33 {
34 public:
35 
37  DtCreateResponseMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
38 
39  DtCreateResponseMsg(unsigned long ID,
41  MAKRti::DtString const & errorString,
42  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
43 
46  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
47 
49  virtual ~DtCreateResponseMsg();
50 
52  virtual DtRtiMsg* clone(bool copy = true) const;
53 
55  virtual void set(unsigned long ID,
56  DtCreateResponseFlag flag, MAKRti::DtString const & errorString);
57 
59  void setDestinationID( const unsigned long ID );
60  const unsigned long destinationID() const;
61 
63  void setResponseFlag(DtCreateResponseFlag flag);
64  DtCreateResponseFlag responseFlag() const;
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  DtCreateResponseCb cb, void* usr);
81  static void removeCallback(DtConnectionMgr* conn,
82  DtCreateResponseCb cb, void* usr);
83 
84  void setErrorString( MAKRti::DtString const & errorStr );
85  MAKRti::DtString errorString() const;
86  char* errorStringPtr();
87  const char* errorStringPtr() const;
88  void setErrorStringSize( unsigned long size );
89  unsigned long errorStringSize() const;
90 
91 protected:
92 
94  virtual DtNetCreateResponseMsg* netCreateResponseMsg();
95  virtual const DtNetCreateResponseMsg* netCreateResponseMsg() const;
96 
99 
101  virtual int minSize() const;
102 
104  virtual DtCreateResponseMsg* self() const;
105 };
106 
107 
109 {
110  return const_cast<DtCreateResponseMsg*>( this );
111 }
112 
113 #endif
114 

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)