Panda3D
 All Classes Functions Variables Enumerations
pnotify.I
1 // Filename: notify.I
2 // Created by: drose (28Feb00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 
16 ////////////////////////////////////////////////////////////////////
17 // Function: Notify::has_assert_failed
18 // Access: Public
19 // Description: Returns true if an assertion test has failed (and not
20 // been ignored) since the last call to
21 // clear_assert_failed().
22 //
23 // When an assertion test fails, the assert handler
24 // may decide either to abort, return, or ignore the
25 // assertion. Naturally, if it decides to abort, this
26 // flag is irrelevant. If it chooses to ignore the
27 // assertion, the flag is not set. However, if the
28 // assert handler chooses to return out of the
29 // function (the normal case), it will also set this
30 // flag to indicate that an assertion failure has
31 // occurred.
32 //
33 // This will also be the behavior in the absence of a
34 // user-defined assert handler.
35 ////////////////////////////////////////////////////////////////////
36 INLINE bool Notify::
38  return _assert_failed;
39 }
40 
41 ////////////////////////////////////////////////////////////////////
42 // Function: Notify::get_assert_error_message
43 // Access: Public
44 // Description: Returns the error message that corresponds to the
45 // assertion that most recently failed.
46 ////////////////////////////////////////////////////////////////////
47 INLINE const string &Notify::
49  return _assert_error_message;
50 }
51 
52 ////////////////////////////////////////////////////////////////////
53 // Function: Notify::clear_assert_failed
54 // Access: Public
55 // Description: Resets the assert_failed flag that is set whenever an
56 // assertion test fails. See has_assert_failed().
57 ////////////////////////////////////////////////////////////////////
58 INLINE void Notify::
60  _assert_failed = false;
61 }
void clear_assert_failed()
Resets the assert_failed flag that is set whenever an assertion test fails.
Definition: pnotify.I:59
bool has_assert_failed() const
Returns true if an assertion test has failed (and not been ignored) since the last call to clear_asse...
Definition: pnotify.I:37
const string & get_assert_error_message() const
Returns the error message that corresponds to the assertion that most recently failed.
Definition: pnotify.I:48