E57 Foundation API v1.1.312  Aug. 10, 2011
VectorNode ( ImageFile  destImageFile,
bool  allowHeteroChildren = false 
) [explicit]

Create a new empty Vector node.

Parameters:
[in]destImageFileThe ImageFile where the new node will eventually be stored.
[in]allowHeteroChildrenWill child elements of differing types be allowed in this VectorNode.

A VectorNode is a ordered container of E57 nodes. The destImageFile indicates which ImageFile the VectorNode 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 VectorNode to the destImageFile. It is an error to attempt to attach the VectorNode to a different ImageFile.

If allowHeteroChildren is false, then the children that are appended to the VectorNode must be identical in every visible characteristic except the stored values. These visible characteristics include number of children (for StructureNode and VectorNode descendents), number of records/prototypes/codecs (for CompressedVectorNode), minimum/maximum attributes (for IntegerNode, ScaledIntegerNode, FloatNode), byteCount (for BlobNode), scale/offset (for ScaledIntegerNode), and all elementNames. The enforcement of this homogeneity rule begins when the second child is appended to the VectorNode, thus it is not an error to modify a child of a homogeneous VectorNode containing only one child.

If allowHeteroChildren is true, then the types of the children of the VectorNode are completely unconstrained.

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).
Returns:
A smart VectorNode handle referencing the underlying object.
Exceptions:
E57_ERROR_IMAGEFILE_NOT_OPEN
E57_ERROR_INTERNALAll objects in undocumented state
See also:
VectorCreate.cpp example, VectorFunctions.cpp example, Node, VectorNode::allowHeteroChildren, E57_ERROR_HOMOGENEOUS_VIOLATION
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines