E57 Foundation API v1.1.312  Aug. 10, 2011
ScaledIntegerNode ( ImageFile  destImageFile,
int64_t  rawValue,
int64_t  minimum,
int64_t  maximum,
double  scale = 1.0,
double  offset = 0.0 
) [explicit]

Create an E57 element for storing a fixed point number.

Parameters:
[in]destImageFileThe ImageFile where the new node will eventually be stored.
[in]rawValueThe raw integer value of the element.
[in]minimumThe smallest rawValue that the element may take.
[in]maximumThe largest rawWalue that the element may take.
[in]scaleThe scaling factor used to compute scaledValue from rawValue.
[in]offsetThe offset factor used to compute scaledValue from rawValue.

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

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

Warning: it is an error to give an rawValue outside the minimum / maximum bounds, even if the ScaledIntegerNode is destined to be used in a CompressedVectorNode prototype (where the rawValue will be ignored). If the ScaledIntegerNode is to be used in a prototype, it is recommended to specify a rawValue = 0 if 0 is within bounds, or a rawValue = 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 <= rawValue <= maximum
scale != 0
Returns:
A smart ScaledIntegerNode 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:
ScaledIntegerCreate.cpp example, ScaledIntegerNode::rawValue, Node, CompressedVectorNode, CompressedVectorNode::prototype
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines