Go to the source code of this file.
|
| namespace | RCU |
| | This module defines a variety of assert style macros.
|
| namespace | RCU::Check |
|
| #define | ROOTCORE_PACKAGE 0 |
| #define | RCU_CHECK(type, condition, message) |
| | effects: perform a check guarantee: strong failures: !condition
|
| #define | RCU_CHECK_JOIN2(a, b) |
| | effects: join together two tokens
|
| #define | RCU_CHECK_JOIN2_HIDDEN(a, b) |
| #define | RCU_REQUIRE_SOFT(x) |
| #define | RCU_REQUIRE2_SOFT(x, y) |
| #define | RCU_REQUIRE0_SOFT(y) |
| #define | RCU_PROVIDE_SOFT(x) |
| #define | RCU_PROVIDE2_SOFT(x, y) |
| #define | RCU_PROVIDE0_SOFT(y) |
| #define | RCU_ASSERT_SOFT(x) |
| #define | RCU_ASSERT2_SOFT(x, y) |
| #define | RCU_ASSERT0_SOFT(y) |
| #define | RCU_REQUIRE_NOIMP(x) |
| #define | RCU_REQUIRE2_NOIMP(x, y) |
| #define | RCU_REQUIRE0_NOIMP(y) |
| #define | RCU_PROVIDE_NOIMP(x) |
| #define | RCU_PROVIDE2_NOIMP(x, y) |
| #define | RCU_PROVIDE0_NOIMP(y) |
| #define | RCU_ASSERT_NOIMP(x) |
| #define | RCU_ASSERT2_NOIMP(x, y) |
| #define | RCU_ASSERT0_NOIMP(y) |
| #define | RCU_INVARIANT(x) |
| #define | RCU_INVARIANT2(x, y) |
| #define | RCU_INVARIANT0(y) |
| #define | RCU_REQUIRE(x) |
| #define | RCU_REQUIRE2(x, y) |
| #define | RCU_REQUIRE0(y) |
| #define | RCU_PROVIDE(x) |
| #define | RCU_PROVIDE2(x, y) |
| #define | RCU_PROVIDE0(y) |
| #define | RCU_ASSERT(x) |
| #define | RCU_ASSERT2(x, y) |
| #define | RCU_ASSERT0(y) |
| #define | RCU_READ_INVARIANT(x) |
| #define | RCU_CHANGE_INVARIANT(x) |
| #define | RCU_NEW_INVARIANT(x) |
| #define | RCU_DESTROY_INVARIANT(x) |
| #define | RCU_REQUIRE_SLOW(x) |
| #define | RCU_REQUIRE2_SLOW(x, y) |
| #define | RCU_PROVIDE_SLOW(x) |
| #define | RCU_PROVIDE2_SLOW(x, y) |
| #define | RCU_ASSERT_SLOW(x) |
| #define | RCU_ASSERT2_SLOW(x, y) |
| #define | RCU_READ_INVARIANT_SLOW(x) |
| #define | RCU_CHANGE_INVARIANT_SLOW(x) |
| #define | RCU_NEW_INVARIANT_SLOW(x) |
| #define | RCU_DESTROY_INVARIANT_SLOW(x) |
|
| typedef void(* | RCU::Check::TestInvariantFunction) (const void *object) |
| | effects: apply the test invariant method on an object guarantee: no-fail availability: experts only rationale: this is a templated wrapper for the class specific invariant testers
|
◆ RCU_ASSERT
Value:
#define RCU_CHECK(type, condition, message)
effects: perform a check guarantee: strong failures: !condition
Definition at line 217 of file Assert.h.
217#define RCU_ASSERT(x) \
218 RCU_CHECK (assert_hard, x, #x)
◆ RCU_ASSERT0
Value:
Definition at line 221 of file Assert.h.
221#define RCU_ASSERT0(y) \
222 RCU_CHECK (assert_hard, 0, y)
◆ RCU_ASSERT0_NOIMP
| #define RCU_ASSERT0_NOIMP |
( |
| y | ) |
|
Value:
Definition at line 189 of file Assert.h.
189#define RCU_ASSERT0_NOIMP(y) \
190 RCU_CHECK (assert_noimp, 0, y)
◆ RCU_ASSERT0_SOFT
| #define RCU_ASSERT0_SOFT |
( |
| y | ) |
|
Value:
Definition at line 166 of file Assert.h.
166#define RCU_ASSERT0_SOFT(y) \
167 RCU_CHECK (assert_soft, 0, y)
◆ RCU_ASSERT2
| #define RCU_ASSERT2 |
( |
| x, |
|
|
| y ) |
Value:
Definition at line 219 of file Assert.h.
219#define RCU_ASSERT2(x,y) \
220 RCU_CHECK (assert_hard, x, y)
◆ RCU_ASSERT2_NOIMP
| #define RCU_ASSERT2_NOIMP |
( |
| x, |
|
|
| y ) |
Value:
Definition at line 187 of file Assert.h.
187#define RCU_ASSERT2_NOIMP(x,y) \
188 RCU_CHECK (assert_noimp, x, y)
◆ RCU_ASSERT2_SLOW
| #define RCU_ASSERT2_SLOW |
( |
| x, |
|
|
| y ) |
Value:
Definition at line 311 of file Assert.h.
311#define RCU_ASSERT2_SLOW(x,y) \
312 (void) 0
◆ RCU_ASSERT2_SOFT
| #define RCU_ASSERT2_SOFT |
( |
| x, |
|
|
| y ) |
Value:
Definition at line 164 of file Assert.h.
164#define RCU_ASSERT2_SOFT(x,y) \
165 RCU_CHECK (assert_soft, x, y)
◆ RCU_ASSERT_NOIMP
| #define RCU_ASSERT_NOIMP |
( |
| x | ) |
|
Value:
Definition at line 185 of file Assert.h.
185#define RCU_ASSERT_NOIMP(x) \
186 RCU_CHECK (assert_noimp, x, #x)
◆ RCU_ASSERT_SLOW
| #define RCU_ASSERT_SLOW |
( |
| x | ) |
|
Value:
Definition at line 309 of file Assert.h.
309#define RCU_ASSERT_SLOW(x) \
310 (void) 0
◆ RCU_ASSERT_SOFT
| #define RCU_ASSERT_SOFT |
( |
| x | ) |
|
Value:
Definition at line 162 of file Assert.h.
162#define RCU_ASSERT_SOFT(x) \
163 RCU_CHECK (assert_soft, x, #x)
◆ RCU_CHANGE_INVARIANT
| #define RCU_CHANGE_INVARIANT |
( |
| x | ) |
|
Value:
#define RCU_CHECK_JOIN2(a, b)
effects: join together two tokens
TestInvariant invariant_tester(T *object)
effects: create the right invariant testing object returns: the tester
Definition at line 226 of file Assert.h.
226#define RCU_CHANGE_INVARIANT(x) \
227 ::RCU::Check::TestInvariant RCU_CHECK_JOIN2 (invariant, __LINE__) = ::RCU::Check::invariant_tester (x);
◆ RCU_CHANGE_INVARIANT_SLOW
| #define RCU_CHANGE_INVARIANT_SLOW |
( |
| x | ) |
|
Value:
Definition at line 315 of file Assert.h.
315#define RCU_CHANGE_INVARIANT_SLOW(x) \
316 (void) 0
◆ RCU_CHECK
| #define RCU_CHECK |
( |
| type, |
|
|
| condition, |
|
|
| message ) |
Value:
void fail(const char *package, const char *file, unsigned line, Type type, const char *error)
effects: report the error and abort either by exception or assert like guarantee: all-fail failures: ...
effects: perform a check guarantee: strong failures: !condition
Definition at line 139 of file Assert.h.
139#define RCU_CHECK(type,condition,message) \
140 (condition) ? (void) 0 : ::RCU::Check::fail (ROOTCORE_PACKAGE, __FILE__, __LINE__, ::RCU::Check::type, message)
◆ RCU_CHECK_JOIN2
| #define RCU_CHECK_JOIN2 |
( |
| a, |
|
|
| b ) |
Value:
#define RCU_CHECK_JOIN2_HIDDEN(a, b)
effects: join together two tokens
Definition at line 143 of file Assert.h.
◆ RCU_CHECK_JOIN2_HIDDEN
| #define RCU_CHECK_JOIN2_HIDDEN |
( |
| a, |
|
|
| b ) |
◆ RCU_DESTROY_INVARIANT
| #define RCU_DESTROY_INVARIANT |
( |
| x | ) |
|
Value:
Definition at line 230 of file Assert.h.
230#define RCU_DESTROY_INVARIANT(x) \
231 (x)->testInvariant ()
◆ RCU_DESTROY_INVARIANT_SLOW
| #define RCU_DESTROY_INVARIANT_SLOW |
( |
| x | ) |
|
Value:
Definition at line 319 of file Assert.h.
319#define RCU_DESTROY_INVARIANT_SLOW(x) \
320 (void) 0
◆ RCU_INVARIANT
| #define RCU_INVARIANT |
( |
| x | ) |
|
Value:
Definition at line 196 of file Assert.h.
196#define RCU_INVARIANT(x) \
197 RCU_CHECK (invariant, x, #x)
◆ RCU_INVARIANT0
| #define RCU_INVARIANT0 |
( |
| y | ) |
|
Value:
Definition at line 200 of file Assert.h.
200#define RCU_INVARIANT0(y) \
201 RCU_CHECK (invariant, 0, y)
◆ RCU_INVARIANT2
| #define RCU_INVARIANT2 |
( |
| x, |
|
|
| y ) |
Value:
Definition at line 198 of file Assert.h.
198#define RCU_INVARIANT2(x,y) \
199 RCU_CHECK (invariant, x, y)
◆ RCU_NEW_INVARIANT
| #define RCU_NEW_INVARIANT |
( |
| x | ) |
|
Value:
Definition at line 228 of file Assert.h.
228#define RCU_NEW_INVARIANT(x) \
229 (x)->testInvariant ()
◆ RCU_NEW_INVARIANT_SLOW
| #define RCU_NEW_INVARIANT_SLOW |
( |
| x | ) |
|
Value:
Definition at line 317 of file Assert.h.
317#define RCU_NEW_INVARIANT_SLOW(x) \
318 (void) 0
◆ RCU_PROVIDE
Value:
Definition at line 210 of file Assert.h.
210#define RCU_PROVIDE(x) \
211 RCU_CHECK (provide_hard, x, #x)
◆ RCU_PROVIDE0
| #define RCU_PROVIDE0 |
( |
| y | ) |
|
Value:
Definition at line 214 of file Assert.h.
214#define RCU_PROVIDE0(y) \
215 RCU_CHECK (provide_hard, 0, y)
◆ RCU_PROVIDE0_NOIMP
| #define RCU_PROVIDE0_NOIMP |
( |
| y | ) |
|
Value:
Definition at line 182 of file Assert.h.
182#define RCU_PROVIDE0_NOIMP(y) \
183 RCU_CHECK (provide_noimp, 0, y)
◆ RCU_PROVIDE0_SOFT
| #define RCU_PROVIDE0_SOFT |
( |
| y | ) |
|
Value:
Definition at line 159 of file Assert.h.
159#define RCU_PROVIDE0_SOFT(y) \
160 RCU_CHECK (provide_soft, 0, y)
◆ RCU_PROVIDE2
| #define RCU_PROVIDE2 |
( |
| x, |
|
|
| y ) |
Value:
Definition at line 212 of file Assert.h.
212#define RCU_PROVIDE2(x,y) \
213 RCU_CHECK (provide_hard, x, y)
◆ RCU_PROVIDE2_NOIMP
| #define RCU_PROVIDE2_NOIMP |
( |
| x, |
|
|
| y ) |
Value:
Definition at line 180 of file Assert.h.
180#define RCU_PROVIDE2_NOIMP(x,y) \
181 RCU_CHECK (provide_noimp, x, y)
◆ RCU_PROVIDE2_SLOW
| #define RCU_PROVIDE2_SLOW |
( |
| x, |
|
|
| y ) |
Value:
Definition at line 307 of file Assert.h.
307#define RCU_PROVIDE2_SLOW(x,y) \
308 (void) 0
◆ RCU_PROVIDE2_SOFT
| #define RCU_PROVIDE2_SOFT |
( |
| x, |
|
|
| y ) |
Value:
Definition at line 157 of file Assert.h.
157#define RCU_PROVIDE2_SOFT(x,y) \
158 RCU_CHECK (provide_soft, x, y)
◆ RCU_PROVIDE_NOIMP
| #define RCU_PROVIDE_NOIMP |
( |
| x | ) |
|
Value:
Definition at line 178 of file Assert.h.
178#define RCU_PROVIDE_NOIMP(x) \
179 RCU_CHECK (provide_noimp, x, #x)
◆ RCU_PROVIDE_SLOW
| #define RCU_PROVIDE_SLOW |
( |
| x | ) |
|
Value:
Definition at line 305 of file Assert.h.
305#define RCU_PROVIDE_SLOW(x) \
306 (void) 0
◆ RCU_PROVIDE_SOFT
| #define RCU_PROVIDE_SOFT |
( |
| x | ) |
|
Value:
Definition at line 155 of file Assert.h.
155#define RCU_PROVIDE_SOFT(x) \
156 RCU_CHECK (provide_soft, x, #x)
◆ RCU_READ_INVARIANT
| #define RCU_READ_INVARIANT |
( |
| x | ) |
|
Value:
Definition at line 224 of file Assert.h.
224#define RCU_READ_INVARIANT(x) \
225 (x)->testInvariant ()
◆ RCU_READ_INVARIANT_SLOW
| #define RCU_READ_INVARIANT_SLOW |
( |
| x | ) |
|
Value:
Definition at line 313 of file Assert.h.
313#define RCU_READ_INVARIANT_SLOW(x) \
314 (void) 0
◆ RCU_REQUIRE
Value:
Definition at line 203 of file Assert.h.
203#define RCU_REQUIRE(x) \
204 RCU_CHECK (require_hard, x, #x)
◆ RCU_REQUIRE0
| #define RCU_REQUIRE0 |
( |
| y | ) |
|
Value:
Definition at line 207 of file Assert.h.
207#define RCU_REQUIRE0(y) \
208 RCU_CHECK (require_hard, 0, y)
◆ RCU_REQUIRE0_NOIMP
| #define RCU_REQUIRE0_NOIMP |
( |
| y | ) |
|
Value:
Definition at line 175 of file Assert.h.
175#define RCU_REQUIRE0_NOIMP(y) \
176 RCU_CHECK (require_noimp, 0, y)
◆ RCU_REQUIRE0_SOFT
| #define RCU_REQUIRE0_SOFT |
( |
| y | ) |
|
Value:
Definition at line 152 of file Assert.h.
152#define RCU_REQUIRE0_SOFT(y) \
153 RCU_CHECK (require_soft, 0, y)
◆ RCU_REQUIRE2
| #define RCU_REQUIRE2 |
( |
| x, |
|
|
| y ) |
Value:
Definition at line 205 of file Assert.h.
205#define RCU_REQUIRE2(x,y) \
206 RCU_CHECK (require_hard, x, y)
◆ RCU_REQUIRE2_NOIMP
| #define RCU_REQUIRE2_NOIMP |
( |
| x, |
|
|
| y ) |
Value:
Definition at line 173 of file Assert.h.
173#define RCU_REQUIRE2_NOIMP(x,y) \
174 RCU_CHECK (require_noimp, x, y)
◆ RCU_REQUIRE2_SLOW
| #define RCU_REQUIRE2_SLOW |
( |
| x, |
|
|
| y ) |
Value:
Definition at line 303 of file Assert.h.
303#define RCU_REQUIRE2_SLOW(x,y) \
304 (void) 0
◆ RCU_REQUIRE2_SOFT
| #define RCU_REQUIRE2_SOFT |
( |
| x, |
|
|
| y ) |
Value:
Definition at line 150 of file Assert.h.
150#define RCU_REQUIRE2_SOFT(x,y) \
151 RCU_CHECK (require_soft, x, y)
◆ RCU_REQUIRE_NOIMP
| #define RCU_REQUIRE_NOIMP |
( |
| x | ) |
|
Value:
Definition at line 171 of file Assert.h.
171#define RCU_REQUIRE_NOIMP(x) \
172 RCU_CHECK (require_noimp, x, #x)
◆ RCU_REQUIRE_SLOW
| #define RCU_REQUIRE_SLOW |
( |
| x | ) |
|
Value:
Definition at line 301 of file Assert.h.
301#define RCU_REQUIRE_SLOW(x) \
302 (void) 0
◆ RCU_REQUIRE_SOFT
| #define RCU_REQUIRE_SOFT |
( |
| x | ) |
|
Value:
Definition at line 148 of file Assert.h.
148#define RCU_REQUIRE_SOFT(x) \
149 RCU_CHECK (require_soft, x, #x)
◆ ROOTCORE_PACKAGE
| #define ROOTCORE_PACKAGE 0 |