E57 Foundation API v1.1.312  Aug. 10, 2011
void write ( std::vector< SourceDestBuffer > &  sbufs,
const size_t  recordCount 
)

Request transfer of block of data to CompressedVectorNode from given source buffers.

Parameters:
[in]sbufsVector of memory buffers that hold data to be written to a CompressedVectorNode.
[in]recordCountNumber of records to write.

The sbufs must all have the same capacity. The sbufs capacity must be >= recordCount. The specified sbufs must have same number of elements as previously designated SourceDestBuffer vector. The each SourceDestBuffer within sbufs must be identical to the previously designated SourceDestBuffer except for capacity and buffer address.

The sbufs locations are saved so that a later call to CompressedVectorWriter::write(unsigned) can be used without having to re-specify the SourceDestBuffers.

If a conversion or bounds error occurs during the transfer, the CompressedVectorWriter is left in an undocumented state (it can't be used any further), and all previously written records are deleted from the the associated CompressedVectorNode which will then have zero children. If a file I/O or checksum error occurs during the transfer, both this CompressedVectorWriter and the associated ImageFile are left in an undocumented state (they can't be used any further).

Warning: If CompressedVectorWriter::close is not called before the CompressedVectorWriter destructor is invoked, all writes to the CompressedVectorNode will be lost (it will have zero children).

Precondition:
The associated ImageFile must be open.
This CompressedVectorWriter must be open (i.e isOpen())
Exceptions:
E57_ERROR_BAD_API_ARGUMENT
E57_ERROR_IMAGEFILE_NOT_OPEN
E57_ERROR_WRITER_NOT_OPEN
E57_ERROR_PATH_UNDEFINED
E57_ERROR_NO_BUFFER_FOR_ELEMENT
E57_ERROR_BUFFER_SIZE_MISMATCH
E57_ERROR_BUFFER_DUPLICATE_PATHNAME
E57_ERROR_CONVERSION_REQUIREDThis CompressedVectorWriter in undocumented state, associated ImageFile modified but consistent.
E57_ERROR_VALUE_OUT_OF_BOUNDSThis CompressedVectorWriter in undocumented state, associated ImageFile modified but consistent.
E57_ERROR_VALUE_NOT_REPRESENTABLEThis CompressedVectorWriter in undocumented state, associated ImageFile modified but consistent.
E57_ERROR_SCALED_VALUE_NOT_REPRESENTABLEThis CompressedVectorWriter in undocumented state, associated ImageFile modified but consistent.
E57_ERROR_REAL64_TOO_LARGEThis CompressedVectorWriter in undocumented state, associated ImageFile modified but consistent.
E57_ERROR_EXPECTING_NUMERICThis CompressedVectorWriter in undocumented state, associated ImageFile modified but consistent.
E57_ERROR_EXPECTING_USTRINGThis CompressedVectorWriter in undocumented state, associated ImageFile modified but consistent.
E57_ERROR_LSEEK_FAILEDThis CompressedVectorWriter, associated ImageFile in undocumented state
E57_ERROR_READ_FAILEDThis CompressedVectorWriter, associated ImageFile in undocumented state
E57_ERROR_WRITE_FAILEDThis CompressedVectorWriter, associated ImageFile in undocumented state
E57_ERROR_BAD_CHECKSUMThis CompressedVectorWriter, associated ImageFile in undocumented state
E57_ERROR_INTERNALAll objects in undocumented state
See also:
SourceDestBufferNumericCreate.cpp example, CompressedVectorWriter::write(unsigned), CompressedVectorNode::writer, CompressedVectorWriter::close, SourceDestBuffer, E57Exception
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines