VR-Link API Documentation for HLA Evolved
vlBaseMsg.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
8 #pragma once
9 
10 #include "vlMachineTypes.h"
11 
12 #ifdef DtUSE_UTILITIES_NAMESPACE
13 namespace DtUSE_UTILITIES_NAMESPACE
14 {
15 #endif
16 
17 typedef struct DtBufferPlaceHolder *DtBufferPtr;
18 #define DtUSE_INTERNAL_BUFFER_REP 0
19 #ifdef DtUSE_UTILITIES_NAMESPACE
20 #define DtUSE_INTERNAL_BUFFER (DtUSE_UTILITIES_NAMESPACE::DtBufferPtr(0))
21 #else
22 #define DtUSE_INTERNAL_BUFFER (DtBufferPtr(0))
23 #endif
24 
28 {
29 public:
30 
32  virtual ~DtBaseMsg();
33 
35  DtBaseMsg(const DtBaseMsg& msg,
37 
39  DtBaseMsg &operator=(const DtBaseMsg& msg);
40 
42  virtual const char* netRep() const;
43 
45  virtual int length() const;
46 
47 protected:
48 
51  DtBaseMsg();
52 
53  void initMsg(int size, DtBufferPtr bufferPtr);
54  void initMsg(const void *initial,
55  int size, DtBufferPtr bufferPtr);
56 
62  virtual void changeSize(int size);
63 
67  virtual void insertBytes(int offset, int numBytes);
68 
72  virtual void insertBytes(void *address, int numBytes);
73 
76  virtual void deleteBytes(int offset, int numBytes);
77 
81  virtual void deleteBytes(void *address, int numBytes);
82 
84  virtual void clearAll();
85 
89  virtual void *newInternalBuffer(int size);
90 
93  virtual void sizeChanged(int size) = 0;
94 
95 protected:
96 
97  void *myNetMsg;
101 };
102 
103 
104 inline const char* DtBaseMsg::netRep() const
105 {
106  return (char*) myNetMsg;
107 }
108 
109 #ifdef DtUSE_UTILITIES_NAMESPACE
110 }
111 #endif

Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)