62 lines
2.4 KiB
Plaintext
62 lines
2.4 KiB
Plaintext
// Filename: notify.I
|
|
// Created by: drose (28Feb00)
|
|
//
|
|
////////////////////////////////////////////////////////////////////
|
|
//
|
|
// PANDA 3D SOFTWARE
|
|
// Copyright (c) Carnegie Mellon University. All rights reserved.
|
|
//
|
|
// All use of this software is subject to the terms of the revised BSD
|
|
// license. You should have received a copy of this license along
|
|
// with this source code in a file named "LICENSE."
|
|
//
|
|
////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: Notify::has_assert_failed
|
|
// Access: Public
|
|
// Description: Returns true if an assertion test has failed (and not
|
|
// been ignored) since the last call to
|
|
// clear_assert_failed().
|
|
//
|
|
// When an assertion test fails, the assert handler
|
|
// may decide either to abort, return, or ignore the
|
|
// assertion. Naturally, if it decides to abort, this
|
|
// flag is irrelevant. If it chooses to ignore the
|
|
// assertion, the flag is not set. However, if the
|
|
// assert handler chooses to return out of the
|
|
// function (the normal case), it will also set this
|
|
// flag to indicate that an assertion failure has
|
|
// occurred.
|
|
//
|
|
// This will also be the behavior in the absence of a
|
|
// user-defined assert handler.
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE bool Notify::
|
|
has_assert_failed() const {
|
|
return _assert_failed;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: Notify::get_assert_error_message
|
|
// Access: Public
|
|
// Description: Returns the error message that corresponds to the
|
|
// assertion that most recently failed.
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE const string &Notify::
|
|
get_assert_error_message() const {
|
|
return _assert_error_message;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: Notify::clear_assert_failed
|
|
// Access: Public
|
|
// Description: Resets the assert_failed flag that is set whenever an
|
|
// assertion test fails. See has_assert_failed().
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE void Notify::
|
|
clear_assert_failed() {
|
|
_assert_failed = false;
|
|
}
|