Panda3D
direct
src
dcparser
dcPackData.h
Go to the documentation of this file.
1
/**
2
* PANDA 3D SOFTWARE
3
* Copyright (c) Carnegie Mellon University. All rights reserved.
4
*
5
* All use of this software is subject to the terms of the revised BSD
6
* license. You should have received a copy of this license along
7
* with this source code in a file named "LICENSE."
8
*
9
* @file dcPackData.h
10
* @author drose
11
* @date 2004-06-15
12
*/
13
14
#ifndef DCPACKDATA_H
15
#define DCPACKDATA_H
16
17
#include "
dcbase.h
"
18
19
/**
20
* This is a block of data that receives the results of DCPacker.
21
*/
22
class
EXPCL_DIRECT_DCPARSER
DCPackData
{
23
PUBLISHED:
24
INLINE
DCPackData
();
25
INLINE ~
DCPackData
();
26
27
INLINE
void
clear();
28
29
public
:
30
INLINE
void
append_data(
const
char
*buffer,
size_t
size);
31
INLINE
char
*get_write_pointer(
size_t
size);
32
INLINE
void
append_junk(
size_t
size);
33
INLINE
void
rewrite_data(
size_t
position,
const
char
*buffer,
size_t
size);
34
INLINE
char
*get_rewrite_pointer(
size_t
position,
size_t
size);
35
36
PUBLISHED:
37
INLINE std::string get_string()
const
;
38
INLINE
size_t
get_length()
const
;
39
public
:
40
INLINE
const
char
*get_data()
const
;
41
INLINE
char
*take_data();
42
43
private
:
44
void
set_used_length(
size_t
size);
45
46
private
:
47
char
*_buffer;
48
size_t
_allocated_size;
49
size_t
_used_length;
50
};
51
52
#include "
dcPackData.I
"
53
54
#endif
dcPackData.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
DCPackData
This is a block of data that receives the results of DCPacker.
Definition:
dcPackData.h:22
dcbase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Generated on Sun Dec 27 2020 13:22:44 for Panda3D by
1.8.20