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
|
|
| void | RCU::Check::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: as requested requires: file != 0 requires: line != 0 requires: type < typeNum requires: error != 0 availability: experts only
|
| template<class T> |
| void | RCU::Check::testInvariantVoid (const void *object) |
| template<class T> |
| TestInvariant | RCU::Check::invariant_tester (T *object) |
| | effects: create the right invariant testing object returns: the tester
|
◆ RCU_ASSERT
Value:
#define RCU_CHECK(type, condition, message)
effects: perform a check guarantee: strong failures: !condition
Definition at line 222 of file Assert.h.
222#define RCU_ASSERT(x) \
223 RCU_CHECK (assert_hard, x, #x)
◆ RCU_ASSERT0
Value:
Definition at line 226 of file Assert.h.
226#define RCU_ASSERT0(y) \
227 RCU_CHECK (assert_hard, 0, y)
◆ RCU_ASSERT0_NOIMP
| #define RCU_ASSERT0_NOIMP |
( |
| y | ) |
|
Value:
Definition at line 194 of file Assert.h.
194#define RCU_ASSERT0_NOIMP(y) \
195 RCU_CHECK (assert_noimp, 0, y)
◆ RCU_ASSERT0_SOFT
| #define RCU_ASSERT0_SOFT |
( |
| y | ) |
|
Value:
Definition at line 171 of file Assert.h.
171#define RCU_ASSERT0_SOFT(y) \
172 RCU_CHECK (assert_soft, 0, y)
◆ RCU_ASSERT2
| #define RCU_ASSERT2 |
( |
| x, |
|
|
| y ) |
Value:
Definition at line 224 of file Assert.h.
224#define RCU_ASSERT2(x,y) \
225 RCU_CHECK (assert_hard, x, y)
◆ RCU_ASSERT2_NOIMP
| #define RCU_ASSERT2_NOIMP |
( |
| x, |
|
|
| y ) |
Value:
Definition at line 192 of file Assert.h.
192#define RCU_ASSERT2_NOIMP(x,y) \
193 RCU_CHECK (assert_noimp, x, y)
◆ RCU_ASSERT2_SLOW
| #define RCU_ASSERT2_SLOW |
( |
| x, |
|
|
| y ) |
Value:
Definition at line 316 of file Assert.h.
316#define RCU_ASSERT2_SLOW(x,y) \
317 (void) 0
◆ RCU_ASSERT2_SOFT
| #define RCU_ASSERT2_SOFT |
( |
| x, |
|
|
| y ) |
Value:
Definition at line 169 of file Assert.h.
169#define RCU_ASSERT2_SOFT(x,y) \
170 RCU_CHECK (assert_soft, x, y)
◆ RCU_ASSERT_NOIMP
| #define RCU_ASSERT_NOIMP |
( |
| x | ) |
|
Value:
Definition at line 190 of file Assert.h.
190#define RCU_ASSERT_NOIMP(x) \
191 RCU_CHECK (assert_noimp, x, #x)
◆ RCU_ASSERT_SLOW
| #define RCU_ASSERT_SLOW |
( |
| x | ) |
|
Value:
Definition at line 314 of file Assert.h.
314#define RCU_ASSERT_SLOW(x) \
315 (void) 0
◆ RCU_ASSERT_SOFT
| #define RCU_ASSERT_SOFT |
( |
| x | ) |
|
Value:
Definition at line 167 of file Assert.h.
167#define RCU_ASSERT_SOFT(x) \
168 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 231 of file Assert.h.
231#define RCU_CHANGE_INVARIANT(x) \
232 ::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 320 of file Assert.h.
320#define RCU_CHANGE_INVARIANT_SLOW(x) \
321 (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 144 of file Assert.h.
144#define RCU_CHECK(type,condition,message) \
145 (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 148 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 235 of file Assert.h.
235#define RCU_DESTROY_INVARIANT(x) \
236 (x)->testInvariant ()
◆ RCU_DESTROY_INVARIANT_SLOW
| #define RCU_DESTROY_INVARIANT_SLOW |
( |
| x | ) |
|
Value:
Definition at line 324 of file Assert.h.
324#define RCU_DESTROY_INVARIANT_SLOW(x) \
325 (void) 0
◆ RCU_INVARIANT
| #define RCU_INVARIANT |
( |
| x | ) |
|
Value:
Definition at line 201 of file Assert.h.
201#define RCU_INVARIANT(x) \
202 RCU_CHECK (invariant, x, #x)
◆ RCU_INVARIANT0
| #define RCU_INVARIANT0 |
( |
| y | ) |
|
Value:
Definition at line 205 of file Assert.h.
205#define RCU_INVARIANT0(y) \
206 RCU_CHECK (invariant, 0, y)
◆ RCU_INVARIANT2
| #define RCU_INVARIANT2 |
( |
| x, |
|
|
| y ) |
Value:
Definition at line 203 of file Assert.h.
203#define RCU_INVARIANT2(x,y) \
204 RCU_CHECK (invariant, x, y)
◆ RCU_NEW_INVARIANT
| #define RCU_NEW_INVARIANT |
( |
| x | ) |
|
Value:
Definition at line 233 of file Assert.h.
233#define RCU_NEW_INVARIANT(x) \
234 (x)->testInvariant ()
◆ RCU_NEW_INVARIANT_SLOW
| #define RCU_NEW_INVARIANT_SLOW |
( |
| x | ) |
|
Value:
Definition at line 322 of file Assert.h.
322#define RCU_NEW_INVARIANT_SLOW(x) \
323 (void) 0
◆ RCU_PROVIDE
Value:
Definition at line 215 of file Assert.h.
215#define RCU_PROVIDE(x) \
216 RCU_CHECK (provide_hard, x, #x)
◆ RCU_PROVIDE0
| #define RCU_PROVIDE0 |
( |
| y | ) |
|
Value:
Definition at line 219 of file Assert.h.
219#define RCU_PROVIDE0(y) \
220 RCU_CHECK (provide_hard, 0, y)
◆ RCU_PROVIDE0_NOIMP
| #define RCU_PROVIDE0_NOIMP |
( |
| y | ) |
|
Value:
Definition at line 187 of file Assert.h.
187#define RCU_PROVIDE0_NOIMP(y) \
188 RCU_CHECK (provide_noimp, 0, y)
◆ RCU_PROVIDE0_SOFT
| #define RCU_PROVIDE0_SOFT |
( |
| y | ) |
|
Value:
Definition at line 164 of file Assert.h.
164#define RCU_PROVIDE0_SOFT(y) \
165 RCU_CHECK (provide_soft, 0, y)
◆ RCU_PROVIDE2
| #define RCU_PROVIDE2 |
( |
| x, |
|
|
| y ) |
Value:
Definition at line 217 of file Assert.h.
217#define RCU_PROVIDE2(x,y) \
218 RCU_CHECK (provide_hard, x, y)
◆ RCU_PROVIDE2_NOIMP
| #define RCU_PROVIDE2_NOIMP |
( |
| x, |
|
|
| y ) |
Value:
Definition at line 185 of file Assert.h.
185#define RCU_PROVIDE2_NOIMP(x,y) \
186 RCU_CHECK (provide_noimp, x, y)
◆ RCU_PROVIDE2_SLOW
| #define RCU_PROVIDE2_SLOW |
( |
| x, |
|
|
| y ) |
Value:
Definition at line 312 of file Assert.h.
312#define RCU_PROVIDE2_SLOW(x,y) \
313 (void) 0
◆ RCU_PROVIDE2_SOFT
| #define RCU_PROVIDE2_SOFT |
( |
| x, |
|
|
| y ) |
Value:
Definition at line 162 of file Assert.h.
162#define RCU_PROVIDE2_SOFT(x,y) \
163 RCU_CHECK (provide_soft, x, y)
◆ RCU_PROVIDE_NOIMP
| #define RCU_PROVIDE_NOIMP |
( |
| x | ) |
|
Value:
Definition at line 183 of file Assert.h.
183#define RCU_PROVIDE_NOIMP(x) \
184 RCU_CHECK (provide_noimp, x, #x)
◆ RCU_PROVIDE_SLOW
| #define RCU_PROVIDE_SLOW |
( |
| x | ) |
|
Value:
Definition at line 310 of file Assert.h.
310#define RCU_PROVIDE_SLOW(x) \
311 (void) 0
◆ RCU_PROVIDE_SOFT
| #define RCU_PROVIDE_SOFT |
( |
| x | ) |
|
Value:
Definition at line 160 of file Assert.h.
160#define RCU_PROVIDE_SOFT(x) \
161 RCU_CHECK (provide_soft, x, #x)
◆ RCU_READ_INVARIANT
| #define RCU_READ_INVARIANT |
( |
| x | ) |
|
Value:
Definition at line 229 of file Assert.h.
229#define RCU_READ_INVARIANT(x) \
230 (x)->testInvariant ()
◆ RCU_READ_INVARIANT_SLOW
| #define RCU_READ_INVARIANT_SLOW |
( |
| x | ) |
|
Value:
Definition at line 318 of file Assert.h.
318#define RCU_READ_INVARIANT_SLOW(x) \
319 (void) 0
◆ RCU_REQUIRE
Value:
Definition at line 208 of file Assert.h.
208#define RCU_REQUIRE(x) \
209 RCU_CHECK (require_hard, x, #x)
◆ RCU_REQUIRE0
| #define RCU_REQUIRE0 |
( |
| y | ) |
|
Value:
Definition at line 212 of file Assert.h.
212#define RCU_REQUIRE0(y) \
213 RCU_CHECK (require_hard, 0, y)
◆ RCU_REQUIRE0_NOIMP
| #define RCU_REQUIRE0_NOIMP |
( |
| y | ) |
|
Value:
Definition at line 180 of file Assert.h.
180#define RCU_REQUIRE0_NOIMP(y) \
181 RCU_CHECK (require_noimp, 0, y)
◆ RCU_REQUIRE0_SOFT
| #define RCU_REQUIRE0_SOFT |
( |
| y | ) |
|
Value:
Definition at line 157 of file Assert.h.
157#define RCU_REQUIRE0_SOFT(y) \
158 RCU_CHECK (require_soft, 0, y)
◆ RCU_REQUIRE2
| #define RCU_REQUIRE2 |
( |
| x, |
|
|
| y ) |
Value:
Definition at line 210 of file Assert.h.
210#define RCU_REQUIRE2(x,y) \
211 RCU_CHECK (require_hard, x, y)
◆ RCU_REQUIRE2_NOIMP
| #define RCU_REQUIRE2_NOIMP |
( |
| x, |
|
|
| y ) |
Value:
Definition at line 178 of file Assert.h.
178#define RCU_REQUIRE2_NOIMP(x,y) \
179 RCU_CHECK (require_noimp, x, y)
◆ RCU_REQUIRE2_SLOW
| #define RCU_REQUIRE2_SLOW |
( |
| x, |
|
|
| y ) |
Value:
Definition at line 308 of file Assert.h.
308#define RCU_REQUIRE2_SLOW(x,y) \
309 (void) 0
◆ RCU_REQUIRE2_SOFT
| #define RCU_REQUIRE2_SOFT |
( |
| x, |
|
|
| y ) |
Value:
Definition at line 155 of file Assert.h.
155#define RCU_REQUIRE2_SOFT(x,y) \
156 RCU_CHECK (require_soft, x, y)
◆ RCU_REQUIRE_NOIMP
| #define RCU_REQUIRE_NOIMP |
( |
| x | ) |
|
Value:
Definition at line 176 of file Assert.h.
176#define RCU_REQUIRE_NOIMP(x) \
177 RCU_CHECK (require_noimp, x, #x)
◆ RCU_REQUIRE_SLOW
| #define RCU_REQUIRE_SLOW |
( |
| x | ) |
|
Value:
Definition at line 306 of file Assert.h.
306#define RCU_REQUIRE_SLOW(x) \
307 (void) 0
◆ RCU_REQUIRE_SOFT
| #define RCU_REQUIRE_SOFT |
( |
| x | ) |
|
Value:
Definition at line 153 of file Assert.h.
153#define RCU_REQUIRE_SOFT(x) \
154 RCU_CHECK (require_soft, x, #x)
◆ ROOTCORE_PACKAGE
| #define ROOTCORE_PACKAGE 0 |