28 #ifndef CASA_DYNBUFFER_H
29 #define CASA_DYNBUFFER_H
124 void remove (
uInt nrOfBuffer=1);
181 n =
newbuf (nrOfValues, valueSize);
184 curuselen_p += n*valueSize;
uInt alloc(uInt nrOfValues, uInt valueSize, Char *&ptr)
Allocate buffer space for nrOfValues values of size valueSize bytes, and return the pointer ptr to th...
Block< uInt > uselen_p
used length per buffer
uInt bufsz_p
size of 1st buffer and min.
void nextstart()
Prepare for data retrieval (set up for looping through the buffers).
uInt curuselen_p
used length of current buffer
uInt curtotlen_p
total length of current buffer
~DynBuffer()
Remove the whole buffer, i.e.
Block< uInt > totlen_p
total length per buffer
DynBuffer(uInt nrOfBytes=4096)
Allocate a first buffer of the specified number of bytes (default 4096).
uInt newbuf(uInt nrOfValues, uInt valueSize)
Get the next buffer for storing nrOfValues values of size valueSize bytes, and return the number of v...
bool Bool
Define the standard types used by Casacore.
void allocstart()
Prepare for storing data (re-initialize the buffer)
Int curbuf_p
current buffernr
Store data in dynamically allocated buffers.
Char * curbufptr_p
pointer to current buffer
Int nrbuf_p
nr of buffers allocated
Int maxnrbuf_p
size of Blocks
Int nextbuf_p
buffernr for next function
Bool next(uInt &usedLength, Char *&ptr)
Get the pointer to the next buffer and its used length in bytes.
PtrBlock< Char * > bufptr_p
pointer to buffer
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.