Panda3D
Main Page
Classes
Files
File List
All
Classes
Functions
Variables
Enumerations
panda
src
nativenet
membuffer.h
1
#ifndef __MEMBUFFER_GM_H__
2
#define __MEMBUFFER_GM_H__
3
// RHH
4
////////////////////////////////////////////////////////////////////
5
// Class : GmMemBuf
6
// Description : this a base class designed to be used to for items that will
7
// share portions of a memorty buufer and want to avoid copying the data
8
//
9
// Use if the class wants ot allow for refrence in place of data arrays..
10
// ** be carefull could be dangerous **
11
//
12
// GmCoreMessage
13
// GmRingBuffer
14
//
15
//
16
////////////////////////////////////////////////////////////////////
17
class
EXPCL_PANDA_NATIVENET
MemBuffer
18
{
19
public
:
20
inline
MemBuffer
(
void
);
21
inline
MemBuffer
(
size_t
len);
22
inline
MemBuffer
(
char
* data,
size_t
len);
23
virtual
~
MemBuffer
();
24
inline
void
SetBuffer(
char
* data,
size_t
len);
25
inline
void
GrowBuffer(
size_t
len);
26
inline
size_t
GetBufferSize(
void
)
const
;
27
inline
char
* GetBuffer(
void
);
28
inline
const
char
* GetBuffer(
void
)
const
;
29
inline
bool
InBufferRange(
char
* );
30
protected
:
31
bool
_BufferLocal;
// indicates responsibility of managment of the data
32
size_t
_BufferLen;
// the length of the data
33
char
* _Buffer;
// the data
34
35
inline
void
ClearBuffer(
void
);
36
inline
void
AllocBuffer(
size_t
len);
37
};
38
39
40
#include "membuffer.i"
41
42
43
#endif //__MEMBUFFER_GM_H__
44
MemBuffer
this a base class designed to be used to for items that will share portions of a memorty buufer and w...
Definition:
membuffer.h:17
Generated on Mon Feb 1 2016 13:44:29 for Panda3D by
1.8.5