GeoTessCPP
2.1
Software to facilitate storage and retrieval of 3D information about the Earth.
|
#include <IFStreamBinary.h>
Public Member Functions | |
IFStreamBinary () | |
IFStreamBinary (bool align) | |
IFStreamBinary (const string &filename) | |
IFStreamBinary (const string &filename, int num_bytes) | |
IFStreamBinary (string *str) | |
IFStreamBinary (const IFStreamBinary &db) | |
virtual | ~IFStreamBinary () |
void | boundaryAlignmentOff () |
void | boundaryAlignmentOn () |
void | byteOrderReverseOff () |
void | byteOrderReverseOn () |
void | clear () |
void | decrementPos (int decrement=1) |
void | dumpBuffer () |
int | getCapacity () const |
const string & | getData () const |
const string & | getFileName () const |
int | getPos () const |
char * | getPosPointer () |
char * | getPosPointer (int pos) |
void | incrementPos (int increment=1) |
bool | isBoundaryAlignmentOn () const |
bool | isByteOrderReversalOn () const |
IFStreamBinary & | operator= (const IFStreamBinary &db) |
bool | readBool () |
bool | readBool (int pos) |
void | readBoolArray (bool *array, int num_bools) |
byte | readByte () |
byte | readByte (int pos) |
void | readByteArray (byte *array, int num_bs) |
void | readCharArray (string &s, int num_chars) |
void | readCharArray (char *array, int num_chars) |
double | readDouble () |
double | readDouble (int pos) |
void | readDoubleArray (double *array, int num_doubles) |
double | readDoubleNC () |
float | readFloat () |
float | readFloat (int pos) |
void | readFloatArray (float *array, int num_floats) |
float | readFloatNC () |
void | readFromFile (const string &filename) |
void | readFromFile (const string &filename, int num_bytes) |
void | readFromFile (ifstream &ifs, int num_bytes) |
int | readInt () |
int | readInt (int pos) |
void | readIntArray (int *array, int num_ints) |
int | readIntNC () |
LONG_INT | readLong () |
LONG_INT | readLong (int pos) |
void | readLongArray (LONG_INT *array, int num_longs) |
LONG_INT | readLongNC () |
short | readShort () |
short | readShort (int pos) |
void | readShortArray (short *array, int num_shorts) |
short | readShortNC () |
string | readString () |
void | readString (string &s) |
void | readType (string &s) |
void | readType (bool &b) |
void | readType (byte &b) |
void | readType (short &s) |
void | readType (int &i) |
void | readType (LONG_INT &l) |
void | readType (float &f) |
void | readType (double &d) |
void | readTypeArray (string &array, int num_chars) |
void | readTypeArray (bool *array, int num_bools) |
void | readTypeArray (byte *array, int num_bs) |
void | readTypeArray (short *array, int num_shorts) |
void | readTypeArray (int *array, int num_ints) |
void | readTypeArray (LONG_INT *array, int num_longs) |
void | readTypeArray (float *array, int num_floats) |
void | readTypeArray (double *array, int num_doubles) |
void | reserve (int sze) |
void | resetPos () |
void | reSize (int spc) |
void | setBoundaryAlignment (bool align) |
void | setByteOrderReverse (bool bor) |
void | setMemoryCapacityIncrement (int mci) |
void | setPosToEnd () |
int | size () |
void | writeBool (bool b) |
void | writeBool (bool b, int pos) |
void | writeBoolArray (const bool *array, int num_bools) |
void | writeBoolNC (bool b) |
void | writeByte (byte b) |
void | writeByte (byte b, int pos) |
void | writeByteArray (const byte *array, int num_bytes) |
void | writeByteNC (byte b) |
void | writeCharArray (const char *array, int num_chars) |
void | writeDouble (double d) |
void | writeDouble (double d, int pos) |
void | writeDoubleArray (const double *array, int num_doubles) |
void | writeDoubleNC (double d) |
void | writeFloat (float f) |
void | writeFloat (float f, int pos) |
void | writeFloatArray (const float *array, int num_floats) |
void | writeFloatNC (float f) |
void | writeInt (int i) |
void | writeInt (int i, int pos) |
void | writeIntArray (const int *array, int num_ints) |
void | writeIntNC (int i) |
void | writeLong (LONG_INT l) |
void | writeLong (LONG_INT l, int pos) |
void | writeLongArray (const LONG_INT *array, int num_longs) |
void | writeLongNC (LONG_INT l) |
void | writeShort (short i) |
void | writeShort (short i, int pos) |
void | writeShortArray (const short *array, int num_ints) |
void | writeShortNC (short i) |
void | writeString (const string &str) |
void | writeString (const char *char_string) |
void | writeToFile (const string &filename) |
void | writeToFile (ofstream &ofs) |
void | writeType (const string &str) |
void | writeType (const char *char_string) |
void | writeType (bool b) |
void | writeType (byte b) |
void | writeType (short i) |
void | writeType (int i) |
void | writeType (LONG_INT l) |
void | writeType (float f) |
void | writeType (double d) |
void | writeTypeArray (const bool *array, int num_bools) |
void | writeTypeArray (const byte *array, int num_bytes) |
void | writeTypeArray (const short *array, int num_ints) |
void | writeTypeArray (const int *array, int num_ints) |
void | writeTypeArray (const LONG_INT *array, int num_longs) |
void | writeTypeArray (const float *array, int num_floats) |
void | writeTypeArray (const double *array, int num_doubles) |
Static Public Member Functions | |
static string | className () |
static int | classSize () |
static bool | exists (const string &filename) |
Protected Member Functions | |
void | align2Byte () |
void | align4Byte () |
void | align8Byte () |
void | checkBufferSize (int sincr) |
Static Protected Member Functions | |
static void | reverseBO2 (char *d) |
static void | reverseBO2Array (int n, char *a) |
static void | reverseBO4 (char *d) |
static void | reverseBO4Array (int n, char *a) |
static void | reverseBO8 (char *d) |
static void | reverseBO8Array (int n, char *a) |
static void | reverseBOArray (int n, char *a, int s) |
Protected Attributes | |
bool | bAlign |
string * | bData |
int | bDataPos |
string | bFileName |
int | bMemIncr |
bool | bOwnStr |
bool | bReverse |
int | bSize |
Opens a file for binary read and write access. The read portion is configured to parse binary files using standard readType(...) functionality.
Functionality is provided to read elemental, strings, booleans, bytes, shorts, ints, longs, floats, or doubles, as-well-as array input forms of each (except strings). The binary file can be read in intrinsic alignment form (somewhat faster) where doubles and longs are assumed to be read (and written) along 8 bytes boundaries, floats and ints are aligned on 4 byte boundaries, and shorts are aligned on a 2 byte boundary. A little/big-endian byte reversal flag can be set to reverse the byte structure if necessary.
geotess::IFStreamBinary::IFStreamBinary | ( | ) |
Public Default Constructor.
geotess::IFStreamBinary::IFStreamBinary | ( | bool | align | ) |
Standard constructor that sets the padding (alignment) option to align.
geotess::IFStreamBinary::IFStreamBinary | ( | const string & | filename | ) |
Standard constructor creates a new IFStreamBinary and opens reads its buffer from the input filename
geotess::IFStreamBinary::IFStreamBinary | ( | const string & | filename, |
int | num_bytes | ||
) |
Standard constructor creates a new IFStreamBinary and opens reads its buffer from the input filename
geotess::IFStreamBinary::IFStreamBinary | ( | string * | str | ) |
Standard constructor that uses a provided string ptr as the data container.
geotess::IFStreamBinary::IFStreamBinary | ( | const IFStreamBinary & | db | ) |
Copy Constructor.
|
virtual |
Public destructor
|
inlineprotected |
Ensure that the buffer position pointer (dbDataPos) is aligned on a 4 byte boundary.
|
inlineprotected |
Ensure that the buffer position pointer (dbDataPos) is aligned on a 4 byte boundary.
|
inlineprotected |
Ensure that the buffer position pointer (dbDataPos) is aligned on a 8 byte boundary.
|
inline |
Turns off intrinsic boundary alignment.
|
inline |
Turns on intrinsic boundary alignment.
|
inline |
Turns off byte order reversal.
|
inline |
Turns on byte order reversal.
|
inlineprotected |
This function checks to make sure that the buffer is large enough to contain sincr more bytes ... if not it is resized so that it can.
|
inlinestatic |
|
inlinestatic |
|
inline |
Clears the buffer.
|
inline |
Decrement the iterator position.
void geotess::IFStreamBinary::dumpBuffer | ( | ) |
Debug dump of the data.
|
static |
Static function that returns true if the input filename exists.
|
inline |
Return the allocated capacity of this IFStreamBinary.
|
inline |
Return a const reference to 'this' IFStreamBinarys data.
|
inline |
Return the file name with which this binary reader was opened
|
inline |
Get the current iterator position.
|
inline |
Return a pointer at the current iterator location in the IFStreamBinary data.
|
inline |
Return a pointer to position pos in 'this' IFStreamBinarys data.
|
inline |
Increment the iterator position.
|
inline |
Returns true if the byte order in reads and writes is reversed for all 2, 4, or 8 byte intrinsincs (short, int, long, float, double, etc.).
|
inline |
Returns true if the byte order in reads and writes is reversed for all 2, 4, or 8 byte intrinsincs (short, int, long, float, double, etc.).
IFStreamBinary& geotess::IFStreamBinary::operator= | ( | const IFStreamBinary & | db | ) |
Assignment operator
|
inline |
Read bool data. readBool() reads one bool from the IFStreamBinary and updates buffer iterator. The second form specifies where to read but does not update the iterator. The last form reads num_bool into the input array. readType is for templatization and behaves like readBool(). Similarly, readTypeArray behaves as readBoolArray.
Read in a single bool and return it.
|
inline |
Read in a single bool starting at the input position and return it. Don't check for alignment.
|
inline |
Read in num_bools into the input array.
|
inline |
Read byte data. readByte() reads one byte from the IFStreamBinary and updates buffer iterator. The second form specifies where to read but does not update the iterator. The last form reads num_bytes into the input array. readType is for templatization and behaves like readByte(). Similarly, readTypeArray behaves as readByteArray.
Read in a single byte and return it.
|
inline |
Read in a single byte starting at the input position and return it. Don't check for alignment.
|
inline |
Read in num_bytes into the input array.
|
inline |
Read in num_chars to the string s
|
inline |
Read in num_chars to the presized character array
|
inline |
Read double data. readDouble() reads one double from the IFStreamBinary and updates buffer iterator. The second form is like the first except that byte alignment is assumed to be ok (not checked). The third form specifies where to read but does not update the iterator or check alignment. The last form reads num_doubles into the input array. readType is for templatization and behaves like readDouble(). Similarly, readTypeArray behaves as readDoubleArray.
Read in a single double and return it.
|
inline |
Read in a single double starting at the input position and return it. Don't check for alignment.
|
inline |
Read in num_doubles into the input array.
|
inline |
Read in a single double and return it. Don't check for alignment.
|
inline |
Read float data. readFloat() reads one float from the IFStreamBinary and updates buffer iterator. The second form is like the first except that byte alignment is assumed to be ok (not checked). The third form specifies where to read but does not update the iterator or check alignment. The last form reads num_floats into the input array. readType is for templatization and behaves like readFloat(). Similarly, readTypeArray behaves as readFloatArray.
Read in a single float and return it.
|
inline |
Read in a single float starting at the input position and return it. Don't check for alignment.
|
inline |
Read in num_floats into the input array.
|
inline |
Read in a single float and return it. Don't check for alignment.
void geotess::IFStreamBinary::readFromFile | ( | const string & | filename | ) |
Read and fills the buffer from the input file name.
void geotess::IFStreamBinary::readFromFile | ( | const string & | filename, |
int | num_bytes | ||
) |
Read num_bytes from input file (Partial read).
void geotess::IFStreamBinary::readFromFile | ( | ifstream & | ifs, |
int | num_bytes | ||
) |
Reads num_bytes data from the input ifstream into this buffer. the read begins at position file_pos in the input stream. Reads num_bytes data from the input ifstream into this buffer.
|
inline |
Read int data. readInt() reads one int from the IFStreamBinary and updates buffer iterator. The second form is like the first except that byte alignment is assumed to be ok (not checked). The third form specifies where to read but does not update the iterator or check alignment. The last form reads num_ints into the input array. readType is for templatization and behaves like readInt(). Similarly, readTypeArray behaves as readIntArray.
Read in a single int and return it.
|
inline |
Read in a single int starting at the input position and return it. Don't check for alignment.
|
inline |
Read in num_ints into the input array.
|
inline |
Read in a single int and return it. Don't check for alignment.
|
inline |
Read long data. readLong() reads one long from the IFStreamBinary and updates buffer iterator. The second form is like the first except that byte alignment is assumed to be ok (not checked). The third form specifies where to read but does not update the iterator or check alignment. The last form reads num_longs into the input array. readType is for templatization and behaves like readLong(). Similarly, readTypeArray behaves as readLongArray.
Read in a single long and return it.
|
inline |
Read in a single long starting at the input position and return it. Don't check for alignment.
|
inline |
Read in num_longs into the input array.
|
inline |
Read in a single long and return it. Don't check for alignment.
|
inline |
Read short data. readShort() reads one short from the IFStreamBinary and updates buffer iterator. The second form is like the first except that byte alignment is assumed to be ok (not checked). The third form specifies where to read but does not update the iterator or check alignment. The last form reads num_shorts into the input array. readType is for templatization and behaves like readShort(). Similarly, readTypeArray behaves as readShortArray.
Read in a single short and return it.
|
inline |
Read in a single short starting at the input position and return it. Don't check for alignment.
|
inline |
Read in num_shorts into the input array.
|
inline |
Read in a single short and return it. Don't check for alignment.
|
inline |
Read string data. readString() assumes the string length immediately precedes the string data. readString(string& s) is the same as the first but assigns the string to the input reference. The next two functions read in num_chars and assign them into the input string reference s, or presized character array, respectively. The functions readType* are for templatized access.
Read in a single string and return it.
|
inline |
Read in a string and assign it to s.
|
inline |
Read in a string and assign it to s.
|
inline |
Read in a single bool and assign to s.
|
inline |
Read in a single byte and assign to s.
|
inline |
Read in a single short and assign to s.
|
inline |
Read in a single int and assign to i.
|
inline |
Read in a single long and assign to l.
|
inline |
Read in a single float and assign to f.
|
inline |
Read in a single double and assign to d.
|
inline |
Read in num_chars to the string s
|
inline |
Read in num_bools into the input array.
|
inline |
Read in num_bytes into the input array.
|
inline |
Read in num_shorts into the input array.
|
inline |
Read in num_ints into the input array.
|
inline |
Read in num_longs into the input array.
|
inline |
Read in num_floats into the input array.
|
inline |
Read in num_doubles into the input array.
|
inline |
Sets the storage capacity. Attained on next required resize.
|
inline |
Reset the current iterator position to the beginning of the buffer.
|
inline |
This function allocates spc bytes in the buffer. Used to minimize reallocation.
|
inlinestaticprotected |
Reverses byte order of d. d is assumed to point to an 2 byte element.
|
staticprotected |
|
inlinestaticprotected |
Reverses byte order of d. d is assumed to point to an 4 byte element.
|
staticprotected |
|
inlinestaticprotected |
Reverses byte order of d. d is assumed to point to an 8 byte element.
|
staticprotected |
|
staticprotected |
|
inline |
Sets the intrinsic boundary alignment flag to align.
|
inline |
Sets the byte order reverse flag to bor.
|
inline |
Set the amount of memory increase (bytes) for bData everytime it's current capacity is exceeded (defaults to 1MB = 1000000).
|
inline |
Set the current iterator position to the end of the buffer.
|
inline |
Returns the IFStreamBinary size.
|
inline |
Write bool data. writeBool writes one byte to the IFStreamBinary and updates buffer iterator. The second form is like the first except that sufficient buffer size is not checked. The third form simply writes the data at the input position (pos) but does not check for buffer size, nor does it update the internal buffer iterator. The last method writes num_bools from the input array into 'this' IFStreamBinary. writeType is for templatization and behaves like writeBool. Similarly, writeTypeArray behaves like writeBoolArray.
Write the input bool at the current buffer position. Ensure alignment and sufficient buffer size. Increment the internal buffer position on exit.
|
inline |
Write the input bool at the input buffer position. Don't check for alignment or sufficient buffer size. Don't update the internal buffer position.
|
inline |
Write num_bools from the input bool array to the output buffer.
|
inline |
Write the input bool at the current buffer position. Don't check for alignment or sufficient buffer size. Increment the internal buffer position on exit.
|
inline |
Write byte data. writeByte writes one byte to the IFStreamBinary and updates buffer iterator. The second form is like the first except that sufficient buffer size is not checked. The third form simply writes the data at the input position (pos) but does not check for buffer size, nor does it update the internal buffer iterator. The last method writes num_bytes from the input array into 'this' IFStreamBinary. writeType is for templatization and behaves like writeByte. Similarly, writeTypeArray behaves like writeByteArray.
Write the input byte at the current buffer position. Ensure alignment and sufficient buffer size. Increment the internal buffer position on exit.
|
inline |
Write the input byte at the input buffer position. Don't check for alignment or sufficient buffer size. Don't update the internal buffer position.
|
inline |
Write num_bytes from the input byte array to the output buffer.
|
inline |
Write the input byte at the current buffer position. Don't check for alignment or sufficient buffer size. Increment the internal buffer position on exit.
|
inline |
Write num_chars from the input character array to the output buffer.
|
inline |
Write double data. writeDouble writes one double to the IFStreamBinary and updates buffer iterator. The second form is like the first except that byte alignment and sufficient buffer size are not checked. The third form simply writes the data at the input position (pos) but does not check for alignment, buffer size, nor does it update the internal buffer iterator. The last method writes num_doubles from the input array into 'this' IFStreamBinary. writeType is for templatization and behaves like writeDouble. Similarly, writeTypeArray behaves like writeDoubleArray.
Write the input double at the current buffer position. Ensure alignment and sufficient buffer size. Increment the internal buffer position on exit.
|
inline |
Write the input double at the input buffer position. Don't check for alignment or sufficient buffer size. Don't update the internal buffer position.
|
inline |
Write num_doubles from the input double array to the output buffer.
|
inline |
Write the input double at the current buffer position. Don't check for alignment or sufficient buffer size. Increment the internal buffer position on exit.
|
inline |
Write float data. writeFloat writes one float to the IFStreamBinary and updates buffer iterator. The second form is like the first except that byte alignment and sufficient buffer size are not checked. The third form simply writes the data at the input position (pos) but does not check for alignment, buffer size, nor does it update the internal buffer iterator. The last method writes num_floats from the input array into 'this' IFStreamBinary. writeType is for templatization and behaves like writeFloat. Similarly, writeTypeArray behaves like writeFloatArray.
Write the input float at the current buffer position. Ensure alignment and sufficient buffer size. Increment the internal buffer position on exit.
|
inline |
Write the input float at the input buffer position. Don't check for alignment or sufficient buffer size. Don't update the internal buffer position.
|
inline |
Write num_floats from the input float array to the output buffer.
|
inline |
Write the input float at the current buffer position. Don't check for alignment or sufficient buffer size. Increment the internal buffer position on exit.
|
inline |
Write int data. writeInt writes one int to the IFStreamBinary and updates buffer iterator. The second form is like the first except that byte alignment and sufficient buffer size are not checked. The third form simply writes the data at the input position (pos) but does not check for alignment, buffer size, nor does it update the internal buffer iterator. The last method writes num_ints from the input array into 'this' IFStreamBinary. writeType is for templatization and behaves like writeInt. Similarly, writeTypeArray behaves like writeIntArray.
Write the input int at the current buffer position. Ensure alignment and sufficient buffer size. Increment the internal buffer position on exit.
|
inline |
Write the input int at the input buffer position. Don't check for alignment or sufficient buffer size. Don't update the internal buffer position.
|
inline |
Write num_ints from the input int array to the output buffer.
|
inline |
Write the input int at the current buffer position. Don't check for alignment or sufficient buffer size. Increment the internal buffer position on exit.
|
inline |
Write long data. writeLong writes one long to the IFStreamBinary and updates buffer iterator. The second form is like the first except that byte alignment and sufficient buffer size are not checked. The third form simply writes the data at the input position (pos) but does not check for alignment, buffer size, nor does it update the internal buffer iterator. The last method writes num_longs from the input array into 'this' IFStreamBinary. writeType is for templatization and behaves like writeLong. Similarly, writeTypeArray behaves like writeLongArray.
Write the input long at the current buffer position. Ensure alignment and sufficient buffer size. Increment the internal buffer position on exit.
|
inline |
Write the input long at the input buffer position. Don't check for alignment or sufficient buffer size. Don't update the internal buffer position.
|
inline |
Write num_longs from the input long array to the output buffer.
|
inline |
Write the input long at the current buffer position. Don't check for alignment or sufficient buffer size. Increment the internal buffer position on exit.
|
inline |
Write short data. writeShort writes one short to the IFStreamBinary and updates buffer iterator. The second form is like the first except that byte alignment and sufficient buffer size are not checked. The third form simply writes the data at the input position (pos) but does not check for alignment, buffer size, nor does it update the internal buffer iterator. The last method writes num_shorts from the input array into 'this' IFStreamBinary. writeType is for templatization and behaves like writeShort. Similarly, writeTypeArray behaves like writeShortArray.
Write the input short at the current buffer position. Ensure alignment and sufficient buffer size. Increment the internal buffer position on exit.
|
inline |
Write the input short at the input buffer position. Don't check for alignment or sufficient buffer size. Don't update the internal buffer position.
|
inline |
Write num_shorts from the input short array to the output buffer.
|
inline |
Write the input short at the current buffer position. Don't check for alignment or sufficient buffer size. Increment the internal buffer position on exit.
|
inline |
Write string data to 'this' IFStreamBinary. The two writeString functions first writes the the input string length immediately followed by the string data. The next function writes num_chars from the input character array into 'this' IFStreamBinary. readType is for templatization and behaves like readString(). Similarly, readTypeArray behaves like readCharArray.
Write the input string at the current buffer position. Ensure alignment and sufficient buffer size. Increment the internal buffer position on exit. Both the string size (int) and the strings data are written.
|
inline |
Write the null terminated character string at the current buffer position. Ensure alignment and sufficient buffer size. Increment the internal buffer position on exit. Both the string size (int) and its data are written.
void geotess::IFStreamBinary::writeToFile | ( | const string & | filename | ) |
Write the buffer to the output file name.
void geotess::IFStreamBinary::writeToFile | ( | ofstream & | ofs | ) |
Write the buffer to the output stream.
|
inline |
Write the input string at the current buffer position. Ensure alignment and sufficient buffer size. Increment the internal buffer position on exit. Both the string size (int) and the strings data are written.
|
inline |
Write the null terminated character string at the current buffer position. Ensure alignment and sufficient buffer size. Increment the internal buffer position on exit. Both the string size (int) and its data are written.
|
inline |
Write the input bool at the current buffer position. Ensure alignment and sufficient buffer size. Increment the internal buffer position on exit.
|
inline |
Write the input byte at the current buffer position. Ensure alignment and sufficient buffer size. Increment the internal buffer position on exit.
|
inline |
Write the input short at the current buffer position. Ensure alignment and sufficient buffer size. Increment the internal buffer position on exit.
|
inline |
Write the input int at the current buffer position. Ensure alignment and sufficient buffer size. Increment the internal buffer position on exit.
|
inline |
Write the input long at the current buffer position. Ensure alignment and sufficient buffer size. Increment the internal buffer position on exit.
|
inline |
Write the input float at the current buffer position. Ensure alignment and sufficient buffer size. Increment the internal buffer position on exit.
|
inline |
Write the input double at the current buffer position. Ensure alignment and sufficient buffer size. Increment the internal buffer position on exit.
|
inline |
Write num_bools from the input bool array to the output buffer.
|
inline |
Write num_bytes from the input byte array to the output buffer.
|
inline |
Write num_shorts from the input short array to the output buffer.
|
inline |
Write num_ints from the input int array to the output buffer.
|
inline |
Write num_longs from the input long array to the output buffer.
|
inline |
Write num_floats from the input float array to the output buffer.
|
inline |
Write num_doubles from the input double array to the output buffer.
|
protected |
A boolean, that if true, maintains 4 and 8 byte alignment in support of double alignment compilation.
|
protected |
A string object is used to contain the actual data.
|
protected |
The current iterator position in the data container (dbData).
|
protected |
|
protected |
|
protected |
A boolean, that if true, indicates the storage string for this IFStreamBinary is owned and therefore deleted when the IFStreamBinary is deleted.
|
protected |
A boolean, that if true, reverses the byte order of all 2, 4, and 8 byte intrinsics (shorts, ints, long, floats, doubles, etc.). This flag is set by client using this IFStreamBinary (default to false ... no reversal). The flag is used to convert byte order between big- and little- endian formats.
|
protected |
The current size of the data container.