Overture
Version 25
Main Page
Namespaces
Classes
Files
File List
File Members
Overture.v25.d
include
DataBaseBuffer.h
Go to the documentation of this file.
1
#ifndef DATA_BASE_BUFFER_H
2
#define DATA_BASE_BUFFER_H
3
4
#include "
GenericDataBase.h
"
5
6
class
DataBaseBuffer
7
{
8
enum
9
{
10
openForReading,
11
notOpen,
12
openForWriting
13
} streamIs;
14
15
const
float
floatMagicNumber;
// these numbers separate entries in the stream buffers
16
const
int
intMagicNumber;
17
const
double
doubleMagicNumber;
18
19
#ifdef OV_USE_HDF5
20
GenericDataBase
*array_db;
21
#endif
22
23
public
:
24
DataBaseBuffer
();
25
~DataBaseBuffer
();
26
27
bool
isOpen
()
const
;
28
29
void
openBuffer
(
GenericDataBase
& db,
const
GenericDataBase::InputOutputMode
& mode);
30
void
closeBuffer
(
GenericDataBase
& db );
31
32
33
int
putToBuffer
(
const
int
& size,
const
char
*data );
34
int
putToBuffer
(
const
int
& size,
const
int
*data );
35
int
putToBuffer
(
const
int
& size,
const
float
*data );
36
int
putToBuffer
(
const
int
& size,
const
double
*data );
37
#ifdef OV_BOOL_DEFINED
38
int
putToBuffer
(
const
int
& size,
const
bool
*data );
39
#endif
40
41
int
getFromBuffer
(
const
int
& size,
char
*data );
42
int
getFromBuffer
(
const
int
& size,
int
*data );
43
int
getFromBuffer
(
const
int
& size,
float
*data );
44
int
getFromBuffer
(
const
int
& size,
double
*data );
45
#ifdef OV_BOOL_DEFINED
46
int
getFromBuffer
(
const
int
& size,
bool
*data );
47
#endif
48
49
#ifdef OV_USE_HDF5
50
int
putToBuffer
(
const
intSerialArray & a );
51
int
putToBuffer
(
const
floatSerialArray & a );
52
int
putToBuffer
(
const
doubleSerialArray & a );
53
54
int
getFromBuffer
( intSerialArray & a );
55
int
getFromBuffer
( floatSerialArray & a );
56
int
getFromBuffer
( doubleSerialArray & a );
57
58
int
putDistributedToBuffer
(
const
intArray & a );
59
int
putDistributedToBuffer
(
const
floatArray & a );
60
int
putDistributedToBuffer
(
const
doubleArray & a );
61
62
int
getDistributedFromBuffer
( intArray & a );
63
int
getDistributedFromBuffer
( floatArray & a );
64
int
getDistributedFromBuffer
( doubleArray & a );
65
66
#endif
67
68
int
fp
,
ip
,
dp
;
// buffer pointers
69
int
floatBufferSize
,
intBufferSize
,
doubleBufferSize
;
70
int
floatBufferSizeIncrement
,
intBufferSizeIncrement
,
doubleBufferSizeIncrement
;
71
floatSerialArray
floatBuffer
;
72
intSerialArray
intBuffer
;
73
doubleSerialArray
doubleBuffer
;
74
aString
OvertureVersion
;
75
76
#ifdef OV_USE_HDF5
77
int
numberOfArrays
;
78
#endif
79
};
80
81
#endif
Generated on Fri Jan 4 2013 10:17:50 for Overture by
1.8.3