E57 Foundation API v1.1.312  Aug. 10, 2011
void checkInvariant ( bool  doRecurse = true,
bool  doDowncast = true 
)

Check whether Node class invariant is true.

Parameters:
[in]doRecurseIf true, also check invariants of all children or sub-objects recursively.
[in]doDowncastIf true, also check any invariants of the actual derived type in addition to the generic node invariants.

This function checks at least the assertions in the documented class invariant description (see class reference page for this object). Other internal invariants that are implementation-dependent may also be checked. If any invariant clause is violated, an E57Exception with errorCode of E57_ERROR_INVARIANCE_VIOLATION is thrown.

Specifying doRecurse=true only makes sense if doDowncast=true is also specified (the generic Node has no way to access any children). Checking the invariant recursively may be expensive if the tree is large, so should be used judiciously, in debug versions of the application.

Postcondition:
No visible state is modified.
Exceptions:
E57_ERROR_INVARIANCE_VIOLATIONor any other E57 ErrorCode
See also:
CheckInvariant.cpp example, Class Invariant section in Node, IntegerNode::checkInvariant, ScaledIntegerNode::checkInvariant, FloatNode::checkInvariant, BlobNode::checkInvariant, StructureNode::checkInvariant, VectorNode::checkInvariant, CompressedVectorNode::checkInvariant
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines