E57 Foundation API v1.1.312  Aug. 10, 2011
BlobNode ( ImageFile  destImageFile,
int64_t  byteCount 
) [explicit]

Create an element for storing a sequence of bytes with an opaque format.

Parameters:
[in]destImageFileThe ImageFile where the new node will eventually be stored.
[in]byteCountThe number of bytes reserved in the ImageFile for holding the blob.

The BlobNode class corresponds to the ASTM E57 standard Blob element. See the class discussion at bottom of BlobNode page for more details.

The E57 Foundation Implementation may pre-allocate disk space in the ImageFile to store the declared length of the blob. The disk must have enough free space to store byteCount bytes of data. The data of a newly created BlobNode is initialized to zero.

The destImageFile indicates which ImageFile the BlobNode will eventually be attached to. A node is attached to an ImageFile by adding it underneath the predefined root of the ImageFile (gotten from ImageFile::root). It is not an error to fail to attach the BlobNode to the destImageFile. It is an error to attempt to attach the BlobNode to a different ImageFile.

Precondition:
The destImageFile must be open (i.e. destImageFile.isOpen() must be true).
The destImageFile must have been opened in write mode (i.e. destImageFile.isWritable() must be true).
byteCount >= 0
Returns:
A smart BlobNode handle referencing the underlying object.
Exceptions:
E57_ERROR_BAD_API_ARGUMENT
E57_ERROR_IMAGEFILE_NOT_OPEN
E57_ERROR_FILE_IS_READ_ONLY
E57_ERROR_INTERNALAll objects in undocumented state
See also:
BlobCreate.cpp example, Node, BlobNode::read, BlobNode::write
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines