E57 Foundation API v1.1.312  Aug. 10, 2011
IntegerNode ( ImageFile  destImageFile,
int64_t  value = 0,
int64_t  minimum = E57_INT64_MIN,
int64_t  maximum = E57_INT64_MAX 
) [explicit]

Create an E57 element for storing a integer value.

Parameters:
[in]destImageFileThe ImageFile where the new node will eventually be stored.
[in]valueThe integer value of the element.
[in]minimumThe smallest value that the element may take.
[in]maximumThe largest value that the element may take.

An IntegerNode stores an integer value, and a lower and upper bound. The IntegerNode class corresponds to the ASTM E57 standard Integer element. See the class discussion at bottom of IntegerNode page for more details.

The destImageFile indicates which ImageFile the IntegerNode 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 IntegerNode to the destImageFile. It is an error to attempt to attach the IntegerNode to a different ImageFile.

Warning: it is an error to give an value outside the minimum / maximum bounds, even if the IntegerNode is destined to be used in a CompressedVectorNode prototype (where the value will be ignored). If the IntegerNode is to be used in a prototype, it is recommended to specify a value = 0 if 0 is within bounds, or a value = minimum if 0 is not within bounds.

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).
minimum <= value <= maximum
Returns:
A smart IntegerNode handle referencing the underlying object.
Exceptions:
E57_ERROR_BAD_API_ARGUMENT
E57_ERROR_IMAGEFILE_NOT_OPEN
E57_ERROR_FILE_IS_READ_ONLY
E57_ERROR_VALUE_OUT_OF_BOUNDS
E57_ERROR_INTERNALAll objects in undocumented state
See also:
IntegerCreate.cpp example, IntegerNode::value, Node, CompressedVectorNode, CompressedVectorNode::prototype
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines