E57 Foundation API v1.1.312  Aug. 10, 2011
CompressedVectorNode ( ImageFile  destImageFile,
Node  prototype,
VectorNode  codecs 
) [explicit]

Create an empty CompressedVectorNode, for writing, that will store records specified by the prototype.

Parameters:
[in]destImageFileThe ImageFile where the new node will eventually be stored.
[in]prototypeA tree that describes the fields in each record of the CompressedVectorNode.
[in]codecsA VectorNode describing which codecs should be used for each field described in the prototype.

The destImageFile indicates which ImageFile the CompressedVectorNode 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 CompressedVectorNode to the destImageFile. It is an error to attempt to attach the CompressedVectorNode to a different ImageFile. The CompressedVectorNode may not be written to until it is attached to the destImageFile tree.

The prototype may be any tree consisting of only the following node types: IntegerNode, ScaledIntegerNode, FloatNode, StringNode, StructureNode, or VectorNode (i.e. CompressedVectorNode and BlobNode are not allowed). See CompressedVectorNode for discussion about the prototype argument.

The codecs must be a heterogeneous VectorNode with children as specified in the ASTM E57 data format standard. Since currently only one codec is supported (bitPackCodec), and it is the default, passing an empty VectorNode will specify that all record fields will be encoded with bitPackCodec.

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).
prototype must be an unattached root node (i.e. !prototype.isAttached() && prototype.isRoot())
prototype cannot contain BlobNodes or CompressedVectorNodes.
codecs must be an unattached root node (i.e. !codecs.isAttached() && codecs.isRoot())
Postcondition:
prototype.isAttached()
codecs.isAttached()
Returns:
A smart CompressedVectorNode handle referencing the underlying object.
Exceptions:
E57_ERROR_IMAGEFILE_NOT_OPEN
E57_ERROR_FILE_IS_READ_ONLY
E57_ERROR_BAD_PROTOTYPE
E57_ERROR_BAD_CODECS
E57_ERROR_ALREADY_HAS_PARENT
E57_ERROR_DIFFERENT_DEST_IMAGEFILE
E57_ERROR_INTERNALAll objects in undocumented state
See also:
CompressedVectorCreate.cpp example, SourceDestBuffer, Node, CompressedVectorNode::reader, CompressedVectorNode::writer
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines