XIOS
1.0
Xml I/O Server
Page principale
Espaces de nommage
Classes
Fichiers
Liste des fichiers
Membres de fichier
Tout
Classes
Espaces de nommage
Fichiers
Fonctions
Variables
Définitions de type
Énumérations
Valeurs énumérées
Amis
Macros
buffer_out.cpp
Aller à la documentation de ce fichier.
1
#include "
xios_spl.hpp
"
2
#include "
buffer_out.hpp
"
3
4
5
namespace
xios
6
{
7
CBufferOut::CBufferOut
(
void
* buffer,
size_t
size)
8
{
9
own
=false ;
10
realloc
(buffer,size) ;
11
}
12
13
CBufferOut::CBufferOut
(
void
)
14
{
15
own
=false ;
16
realloc
(0,0) ;
17
}
18
19
CBufferOut::CBufferOut
(
size_t
size)
20
{
21
own
=false ;
22
realloc
(size) ;
23
}
24
25
void
CBufferOut::realloc
(
size_t
size)
26
{
27
realloc
(
new
char
[size],size) ;
28
own
=true ;
29
}
30
31
void
CBufferOut::realloc
(
void
* buffer,
size_t
size)
32
{
33
if
(
own
)
delete
[]
begin
;
34
begin
=(
char
*)buffer ;
35
size_
=size ;
36
end
=
begin
+
size_
;
37
count_
=0 ;
38
current
=
begin
;
39
own
=false ;
40
}
41
42
bool
CBufferOut::advance
(
size_t
n) {
return
advance<char>(n); }
43
44
void
*
CBufferOut::ptr
(
void
)
45
{
46
return
current
;
47
}
48
49
size_t
CBufferOut::remain
(
void
)
50
{
51
return
size_
-
count_
;
52
}
53
54
size_t
CBufferOut::count
(
void
)
55
{
56
return
count_
;
57
}
58
59
size_t
CBufferOut::bufferSize
(
void
)
60
{
61
return
size_
;
62
}
63
64
CBufferOut::~CBufferOut
()
65
{
66
if
(
own
)
delete
[]
begin
;
67
}
68
69
}
70
71
72
xios::CBufferOut::count
size_t count(void)
Definition:
buffer_out.cpp:54
xios::CBufferOut::size_
size_t size_
Definition:
buffer_out.hpp:57
xios::CBufferOut::count_
size_t count_
Definition:
buffer_out.hpp:56
xios::CBufferOut::end
char * end
Definition:
buffer_out.hpp:55
xios_spl.hpp
xios
#define xios(arg)
Definition:
xios_fortran_prefix.hpp:4
xios::CBufferOut::bufferSize
size_t bufferSize(void)
Definition:
buffer_out.cpp:59
xios::CBufferOut::own
bool own
Definition:
buffer_out.hpp:58
xios::CBufferOut::~CBufferOut
~CBufferOut()
Definition:
buffer_out.cpp:64
xios::CBufferOut::advance
bool advance(size_t n)
Definition:
buffer_out.cpp:42
xios::CBufferOut::CBufferOut
CBufferOut(void)
Definition:
buffer_out.cpp:13
xios::CBufferOut::begin
char * begin
Definition:
buffer_out.hpp:53
xios::CBufferOut::remain
size_t remain(void)
Definition:
buffer_out.cpp:49
xios::CBufferOut::ptr
void * ptr(void)
Definition:
buffer_out.cpp:44
xios::CBufferOut::realloc
void realloc(size_t size)
Definition:
buffer_out.cpp:25
buffer_out.hpp
xios::CBufferOut::current
char * current
Definition:
buffer_out.hpp:54
src
buffer_out.cpp
Généré le Vendredi Juin 14 2019 16:00:09 pour XIOS par
1.8.5