E57 Foundation API v1.1.312  Aug. 10, 2011
unsigned read ( )

Request transfer of blocks of data from CompressedVectorNode into previously designated destination buffers.

The SourceDestBuffers used are previously designated either in CompressedVectorNode::reader where this object was created, or in the last call to CompressedVectorReader::read(std::vector<SourceDestBuffer>&) where new buffers were designated. The function will always return the full number of records requested (the capacity of the SourceDestBuffers) unless it has reached the end of the CompressedVectorNode, in which case it will return less than the capacity of the SourceDestBuffers. Partial reads will store the records at the beginning of the SourceDestBuffers. It is not an error to call this function after all records in the CompressedVectorNode have been read (the function returns 0).

If a conversion or bounds error occurs during the transfer, the CompressedVectorReader is left in an undocumented state (it can't be used any further). If a file I/O or checksum error occurs during the transfer, both the CompressedVectorReader and the associated ImageFile are left in an undocumented state (they can't be used any further).

The API user is responsible for ensuring that the underlying memory buffers represented in the SourceDestBuffers still exist when this function is called. The E57 Foundation Implementation cannot detect that a memory buffer been destroyed.

Precondition:
The associated ImageFile must be open.
This CompressedVectorReader must be open (i.e isOpen())
Returns:
The number of records read.
Exceptions:
E57_ERROR_IMAGEFILE_NOT_OPEN
E57_ERROR_READER_NOT_OPEN
E57_ERROR_CONVERSION_REQUIREDThis CompressedVectorReader in undocumented state
E57_ERROR_VALUE_NOT_REPRESENTABLEThis CompressedVectorReader in undocumented state
E57_ERROR_SCALED_VALUE_NOT_REPRESENTABLEThis CompressedVectorReader in undocumented state
E57_ERROR_REAL64_TOO_LARGEThis CompressedVectorReader in undocumented state
E57_ERROR_EXPECTING_NUMERICThis CompressedVectorReader in undocumented state
E57_ERROR_EXPECTING_USTRINGThis CompressedVectorReader in undocumented state
E57_ERROR_BAD_CV_PACKETThis CompressedVectorReader, associated ImageFile in undocumented state
E57_ERROR_LSEEK_FAILEDThis CompressedVectorReader, associated ImageFile in undocumented state
E57_ERROR_READ_FAILEDThis CompressedVectorReader, associated ImageFile in undocumented state
E57_ERROR_BAD_CHECKSUMThis CompressedVectorReader, associated ImageFile in undocumented state
E57_ERROR_INTERNALAll objects in undocumented state
See also:
SourceDestBufferNumericCreate.cpp example, CompressedVectorReader::read(std::vector<SourceDestBuffer>&), CompressedVectorNode::reader, SourceDestBuffer, CompressedVectorReader::read(std::vector<SourceDestBuffer>&)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines