BearParser
Portable Executable parsing library (from PE-bear)
Toggle main menu visibility
Main Page
Namespaces
Namespace List
Namespace Members
All
Functions
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
z
~
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
~
Variables
a
b
c
d
e
f
i
l
m
n
o
p
r
s
t
w
x
Enumerations
a
d
e
f
l
o
r
s
t
w
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
z
Related Symbols
b
d
e
i
l
p
r
s
Files
File List
File Members
All
_
a
b
d
f
g
i
l
m
o
p
r
s
t
u
Functions
Variables
Typedefs
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Loading...
Searching...
No Matches
parser
include
bearparser
ByteBuffer.h
Go to the documentation of this file.
1
#pragma once
2
#include "
AbstractByteBuffer.h
"
3
4
#define DEFAULT_PADDING 2
5
6
class
ByteBuffer
:
public
AbstractByteBuffer
7
{
8
public
:
9
ByteBuffer
(
bufsize_t
v_size,
bufsize_t
padding
=
DEFAULT_PADDING
);
10
ByteBuffer
(BYTE *v_content,
bufsize_t
v_size,
bufsize_t
padding
=
DEFAULT_PADDING
);
11
ByteBuffer
(
AbstractByteBuffer
*sourceBuf,
offset_t
offset,
bufsize_t
size,
bufsize_t
padding
=
DEFAULT_PADDING
);
12
13
virtual
~ByteBuffer
();
14
15
virtual
bufsize_t
getContentSize
() {
return
contentSize
; }
16
virtual
BYTE*
getContent
() {
return
content
; }
17
virtual
bool
resize
(
bufsize_t
newSize);
18
19
virtual
bool
isResized
() {
return
originalSize
!=
contentSize
; }
20
21
protected
:
22
BYTE*
allocContent
(
bufsize_t
v_size,
bufsize_t
padding
);
23
24
BYTE *
content
;
25
bufsize_t
contentSize
;
26
bufsize_t
padding
;
27
28
bufsize_t
originalSize
;
29
};
6
class
ByteBuffer
:
public
AbstractByteBuffer
{
…
};
30
AbstractByteBuffer.h
bufsize_t
uint32_t bufsize_t
Definition
AbstractByteBuffer.h:14
offset_t
uint64_t offset_t
Definition
AbstractByteBuffer.h:17
DEFAULT_PADDING
#define DEFAULT_PADDING
Definition
ByteBuffer.h:4
AbstractByteBuffer
Definition
AbstractByteBuffer.h:32
ByteBuffer
Definition
ByteBuffer.h:7
ByteBuffer::getContent
virtual BYTE * getContent()
Definition
ByteBuffer.h:16
ByteBuffer::getContentSize
virtual bufsize_t getContentSize()
Definition
ByteBuffer.h:15
ByteBuffer::isResized
virtual bool isResized()
Definition
ByteBuffer.h:19
ByteBuffer::originalSize
bufsize_t originalSize
Definition
ByteBuffer.h:28
ByteBuffer::content
BYTE * content
Definition
ByteBuffer.h:24
ByteBuffer::~ByteBuffer
virtual ~ByteBuffer()
Definition
ByteBuffer.cpp:83
ByteBuffer::contentSize
bufsize_t contentSize
Definition
ByteBuffer.h:25
ByteBuffer::ByteBuffer
ByteBuffer(bufsize_t v_size, bufsize_t padding=DEFAULT_PADDING)
Definition
ByteBuffer.cpp:3
ByteBuffer::allocContent
BYTE * allocContent(bufsize_t v_size, bufsize_t padding)
Definition
ByteBuffer.cpp:45
ByteBuffer::padding
bufsize_t padding
Definition
ByteBuffer.h:26
ByteBuffer::resize
virtual bool resize(bufsize_t newSize)
Definition
ByteBuffer.cpp:57
Generated by
1.12.0