VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
commentRPdu.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2013 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 
9 
10 #pragma once
11 
12 #if DtDIS
13 
14 #include "hostStructs.h"
15 #include "pduWithData.h"
16 #include <vlpi/idTypeMap.h>
17 #include "packets/commentRP.h"
18 #include "exerciseConn.h"
19 
20 
22 
24 typedef void (*DtCommentRPduCb)(DtCommentRPdu* pdu, void* usr);
25 
30 {
31 public:
34  DtCommentRPdu(const DtNetCommentRPdu* initial,
35  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER, DtPduFactory* pduFactory = 0);
36  DtCommentRPdu(const DtEntityIdentifier& sender,
37  const DtEntityIdentifier& receiver,
38  const char* message,
40  DtCommentRPdu(const DtCommentRPdu& orig);
41 
43  virtual ~DtCommentRPdu();
44 
47 
49  virtual void setComment(const char* message, int size);
50 
51 public:
54  static DtPdu* create(const DtNetPacket* initial,
55  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER, DtPduFactory* pduFactory = 0);
56 
59  static void addCallback(DtExerciseConn* conn,
60  DtCommentRPduCb cb, void* usr);
61  static void removeCallback(DtExerciseConn* conn,
62  DtCommentRPduCb cb, void* usr);
63 
64 protected:
67  void setCommentInternal(const char* message, int size);
68 
70  virtual DtPduKind internalGetPduKind() const;
71 
73  virtual DtNetDataPduTail* dataSection() const;
74 
75 protected:
76 
77  static const int theStaticSize;
78 
79 };
80 
82 {
83  return DtCommentRPduKind;
84 }
85 
86 #endif

Document ID: Generated on Mon Apr 8 04:49:21 EDT 2019 from SVN revision 197403
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)