E57 Foundation API v1.1.312  Aug. 10, 2011
FloatNode ( ImageFile  destImageFile,
double  value = 0.0,
FloatPrecision  precision = E57_DOUBLE,
double  minimum = E57_DOUBLE_MIN,
double  maximum = E57_DOUBLE_MAX 
) [explicit]

Create an E57 element for storing an double precision IEEE floating point number.

Parameters:
[in]destImageFileThe ImageFile where the new node will eventually be stored.
[in]valueThe double precision IEEE floating point value of the element.
[in]precisionThe precision of IEEE floating point to use. May be E57_SINGLE or E57_DOUBLE.
[in]minimumThe smallest value that the value may take.
[in]maximumThe largest value that the value may take.

An FloatNode stores an IEEE floating point number and a lower and upper bound. The FloatNode class corresponds to the ASTM E57 standard Float element. See the class discussion at bottom of FloatNode page for more details.

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

There is only one FloatNode constructor that handles both E57_SINGLE and E57_DOUBLE precision cases. If precision = E57_SINGLE, then the object will silently round the double precision value to the nearest representable single precision value. In this case, the lower bits will be lost, and if the value is outside the representable range of a single precision number, the exponent may be changed. The same is true for the minimum and maximum arguments.

Warning: it is an error to give an value outside the minimum / maximum bounds, even if the FloatNode is destined to be used in a CompressedVectorNode prototype (where the value will be ignored). If the FloatNode 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 FloatNode 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:
FloatCreate.cpp example, FloatPrecision, FloatNode::value, Node, CompressedVectorNode, CompressedVectorNode::prototype
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines