Put this function first so we can reference the code in doxygen using @skip ! @brief Check whether IntegerNode class invariant is true @param [in] doRecurse If true, also check invariants of all children or sub-objects recursively. @param [in] doUpcast If true, also check invariants of the generic Node class. @details This function checks at least the assertions in the documented class invariant
| 55 | @throw ::ErrorInvarianceViolation or any other E57 ErrorCode |
| 56 | */ |
| 57 | void IntegerNode::checkInvariant( bool doRecurse, bool doUpcast ) const |
| 58 | { |
| 59 | E57_UNUSED( doRecurse ); |
| 60 | |
| 61 | // If destImageFile not open, can't test invariant (almost every call would throw) |
| 62 | if ( !destImageFile().isOpen() ) |
| 63 | { |
| 64 | return; |
| 65 | } |
| 66 | |
| 67 | // If requested, call Node::checkInvariant |
| 68 | if ( doUpcast ) |
| 69 | { |
| 70 | static_cast<Node>( *this ).checkInvariant( false, false ); |
| 71 | } |
| 72 | |
| 73 | if ( value() < minimum() || value() > maximum() ) |
| 74 | { |
| 75 | throw E57_EXCEPTION1( ErrorInvarianceViolation ); |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | /*! |
| 80 | @class e57::IntegerNode |