E57 Foundation API v1.1.312  Aug. 10, 2011
SourceDestBuffer ( ImageFile  destImageFile,
const ustring  pathName,
std::vector< ustring > *  b 
)

Designate vector of strings to transfer data to/from a CompressedVector as 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 created vector of ustrings to transfer from/to.

This overloaded form of the SourceDestBuffer constructor declares a vector<ustring> to be the source/destination of a transfer of StringNode 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 b->size() must match capacity of all other SourceDestBuffers that will participate in a transfer with a CompressedVectorNode (string or any other type of buffer). In a read into the SourceDestBuffer, the previous contents of the strings in the vector are lost, and the memory space is potentially freed. The b->size() of the vector will not be changed. It is an error to request a read/write of more records that b->size() (just as it would be for buffers of integer types). The API user is responsible for ensuring that the lifetime of the b vector exceeds the time that it is used in transfers (i.e. the E57 Foundation Implementation cannot detect that the buffer been destroyed).

Precondition:
b.size() must be > 0.
The destImageFile must be open (i.e. destImageFile.isOpen() must be true).
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:
SourceDestBufferStringCreate.cpp example, SourceDestBufferNumericCreate.cpp example, SourceDestBuffer::doConversion for discussion on representations compatible with string SourceDestBuffers.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines