BOSS
7.0.4
BESIII Offline Software System
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
w
x
z
Typedefs
b
c
d
e
g
h
i
l
m
n
o
p
r
s
t
v
Enumerations
_
e
f
g
h
i
l
m
o
p
r
s
t
Enumerator
a
b
c
d
e
f
i
k
l
m
n
o
p
r
s
t
u
w
x
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
v
w
Enumerations
b
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
v
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Related Functions
:
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
w
x
Files
File List
File Members
All
!
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
!
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
!
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
p
q
r
s
t
u
v
w
z
Enumerations
d
e
g
h
p
r
s
t
Enumerator
a
b
c
d
e
f
g
h
i
k
m
n
o
p
r
s
t
u
w
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
InstallArea/include/DistBossUtil/DistBossUtil/AutoEnlargeBuffer.h
Go to the documentation of this file.
1
#ifndef AUTO_ENLARGE_BUFFER_H
2
#define AUTO_ENLARGE_BUFFER_H
3
4
#include <stdlib.h>
5
#include <string.h>
//for memcpy
6
7
class
AutoEnlargeBuffer
8
{
9
public :
10
11
inline
AutoEnlargeBuffer
(
int
size
= 128*1024);
12
13
inline
~AutoEnlargeBuffer
();
14
15
inline
void
copy
(
void
*src,
int
size
);
16
17
inline
int
size
() {
return
m_size; }
18
inline
void
*
data
() {
return
m_buffer; }
19
20
21
private
:
22
23
int
m_SIZE;
24
int
m_size;
25
void
* m_buffer;
26
};
27
28
inline
AutoEnlargeBuffer::AutoEnlargeBuffer
(
int
size)
29
: m_SIZE( size ),
30
m_size( 0 )
31
{
32
m_buffer = malloc(
size
);
33
}
34
35
inline
AutoEnlargeBuffer::~AutoEnlargeBuffer
()
36
{
37
free( m_buffer );
38
}
39
40
inline
void
AutoEnlargeBuffer::copy
(
void
*src,
int
size)
41
{
42
if
(
size
> m_SIZE ) {
43
do
{
44
m_SIZE *= 2;
45
}
46
while
(
size
> m_SIZE );
47
48
free( m_buffer );
49
m_buffer = malloc(m_SIZE);
50
}
51
52
m_size =
size
;
53
memcpy(m_buffer, src,
size
);
54
}
55
56
#endif
private
#define private
Definition:
Event/RootEventData/RootEventData-00-03-80/RootEventData/RootEventData_rootcint.cxx:11
AutoEnlargeBuffer
Definition:
DistBoss/DistBossUtil/DistBossUtil-00-00-04/DistBossUtil/AutoEnlargeBuffer.h:8
AutoEnlargeBuffer::~AutoEnlargeBuffer
~AutoEnlargeBuffer()
AutoEnlargeBuffer::size
int size()
Definition:
DistBoss/DistBossUtil/DistBossUtil-00-00-04/DistBossUtil/AutoEnlargeBuffer.h:17
AutoEnlargeBuffer::AutoEnlargeBuffer
AutoEnlargeBuffer(int size=128 *1024)
AutoEnlargeBuffer::copy
void copy(void *src, int size)
AutoEnlargeBuffer::data
void * data()
Definition:
InstallArea/include/DistBossUtil/DistBossUtil/AutoEnlargeBuffer.h:18
source
InstallArea
include
DistBossUtil
DistBossUtil
AutoEnlargeBuffer.h
Generated by
1.9.6