E57 Foundation API v1.1.312  Aug. 10, 2011
SourceDestBuffer ( ImageFile  destImageFile,
const ustring  pathName,
int16_t *  b,
const size_t  capacity,
bool  doConversion = false,
bool  doScaling = false,
size_t  stride = sizeof(int16_t) 
)

Designate buffers to transfer data to/from a CompressedVectorNode in a block.

Parameters:
[in]destImageFileThe ImageFile where the new node will eventually be stored.
[in]pathNameThe pathname of the field in CompressedVectorNode that will transfer data to/from.
[in]bThe caller allocated memory buffer.
[in]capacityThe total number of memory elements in buffer b.
[in]doConversionWill a conversion be attempted between memory and ImageFile representations.
[in]doScalingIn a ScaledInteger field, do memory elements hold scaled values, if false they hold raw values.
[in]strideThe number of bytes between memory elements. If zero, defaults to sizeof memory element.

This overloaded form of the SourceDestBuffer constructor declares a buffer b to be the source/destination of a transfer of values stored in a CompressedVectorNode.

The pathName will be used to identify a Node in the prototype that will get/receive data from this buffer. The pathName may be an absolute path name (e.g. "/cartesianX") or a path name relative to the root of the prototype (i.e. the absolute path name without the leading "/", for example: "cartesianX").

The type of b is used to determine the MemoryRepresentation of the SourceDestBuffer. The buffer b may be used for multiple block transfers. See discussions of operation of SourceDestBuffer attributes in SourceDestBuffer::memoryRepresentation, SourceDestBuffer::capacity, SourceDestBuffer::doConversion, and SourceDestBuffer::doScaling, and SourceDestBuffer::stride.

The API user is responsible for ensuring that the lifetime of the b memory buffer exceeds the time that it is used in transfers (i.e. the E57 Foundation Implementation cannot detect that the buffer been destroyed).

The capacity must match the capacity of all other SourceDestBuffers that will participate in a transfer with a CompressedVectorNode.

Precondition:
The destImageFile must be open (i.e. destImageFile.isOpen() must be true).
The stride must be >= sizeof(*b)
Returns:
A smart SourceDestBuffer handle referencing the underlying object.
Exceptions:
E57_ERROR_BAD_API_ARGUMENT
E57_ERROR_BAD_PATH_NAME
E57_ERROR_BAD_BUFFER
E57_ERROR_IMAGEFILE_NOT_OPEN
E57_ERROR_INTERNALAll objects in undocumented state
See also:
SourceDestBufferNumericCreate.cpp example, SourceDestVufferStringCreate.cpp example, ImageFile::reader, ImageFile::writer, CompressedVectorReader::read(std::vector<SourceDestBuffer>&), CompressedVectorWriter::write(std::vector<SourceDestBuffer>&)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines