Assertions.
More...
Go to the source code of this file.
Classes |
| class | base::AssertException |
| | Exception thrown when ASSERT*() evaluates false. More...
|
Namespaces |
| namespace | base |
| | Library of base code.
|
| namespace | base::RESTRICT |
| | Internal.
|
Defines |
| #define | ASSERT(COND) base::RESTRICT::Assert( (COND), __FILE__, __LINE__ ) |
| #define | ASSERT2(COND) |
| #define | ASSERT_UNLESS_EXITING(COND) base::RESTRICT::AssertUnlessExiting( (COND), __FILE__, __LINE__ ) |
| #define | ASSERT_RUN_ONCE {{ PERSISTENT int once = 0; ++once; ASSERT( once == 1 ); }} |
| #define | ASSERT_ONE_INSTANCE_CTOR(INSTANCE_COUNT) {{ ASSERT( (INSTANCE_COUNT) == 0 ); ++(INSTANCE_COUNT); }} |
| #define | ASSERT_ONE_INSTANCE_DTOR(INSTANCE_COUNT) {{ ASSERT( (INSTANCE_COUNT) == 1 ); --(INSTANCE_COUNT); }} |
| #define | ASSERT_OR_RETURN(COND) {{ ASSERT( (COND) ); if ( !(COND) ) return; }} |
| #define | ASSERT_OR_RETURN_VAL(COND, VAL) {{ ASSERT( (COND) ); if ( !(COND) ) return (VAL); }} |
| #define | ASSERT_OR_GOTO(COND, LABEL) {{ ASSERT( (COND) ); if ( !(COND) ) goto (LABEL); }} |
Functions |
| void | base::RESTRICT::Assert (bool cond, const char *fileName, int fileLine) |
| void | base::RESTRICT::AssertUnlessExiting (bool cond, const char *fileName, int fileLine) |
| NO_INLINE void | base::ASSERT_STACK_OBJECT (const void *obj) |
| NO_INLINE void | base::ASSERT_PERSISTENT_OBJECT (const void *obj) |
Detailed Description
Assertions.
- LastChangedDate:
- 2011-04-23 21:07:07 -0400 (Sat, 23 Apr 2011)
- Author:
- Jim E. Brooks http://www.palomino3d.org
Define Documentation
| #define ASSERT |
( |
|
COND |
) |
base::RESTRICT::Assert( (COND), __FILE__, __LINE__ ) |
| #define ASSERT_ONE_INSTANCE_CTOR |
( |
|
INSTANCE_COUNT |
) |
{{ ASSERT( (INSTANCE_COUNT) == 0 ); ++(INSTANCE_COUNT); }} |
| #define ASSERT_ONE_INSTANCE_DTOR |
( |
|
INSTANCE_COUNT |
) |
{{ ASSERT( (INSTANCE_COUNT) == 1 ); --(INSTANCE_COUNT); }} |
| #define ASSERT_OR_GOTO |
( |
|
COND, |
|
|
|
LABEL | |
|
) |
| | {{ ASSERT( (COND) ); if ( !(COND) ) goto (LABEL); }} |
| #define ASSERT_OR_RETURN |
( |
|
COND |
) |
{{ ASSERT( (COND) ); if ( !(COND) ) return; }} |
| #define ASSERT_OR_RETURN_VAL |
( |
|
COND, |
|
|
|
VAL | |
|
) |
| | {{ ASSERT( (COND) ); if ( !(COND) ) return (VAL); }} |
| #define ASSERT_RUN_ONCE {{ PERSISTENT int once = 0; ++once; ASSERT( once == 1 ); }} |
| #define ASSERT_UNLESS_EXITING |
( |
|
COND |
) |
base::RESTRICT::AssertUnlessExiting( (COND), __FILE__, __LINE__ ) |