ATLAS Offline Software
Loading...
Searching...
No Matches
Assert.h File Reference
Include dependency graph for Assert.h:

Go to the source code of this file.

Classes

struct  RCU::Check::TestInvariant

Namespaces

namespace  RCU
 This module defines a variety of assert style macros.
namespace  RCU::Check

Macros

#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)

Typedefs

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

Enumerations

enum  RCU::Check::Type {
  RCU::Check::assert_soft , RCU::Check::assert_hard , RCU::Check::assert_noimp , RCU::Check::require_soft ,
  RCU::Check::require_hard , RCU::Check::require_noimp , RCU::Check::provide_soft , RCU::Check::provide_hard ,
  RCU::Check::provide_noimp , RCU::Check::invariant
}

Functions

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

Variables

const int RCU::Check::typeNum = invariant + 1

Macro Definition Documentation

◆ RCU_ASSERT

#define RCU_ASSERT ( x)
Value:
RCU_CHECK (assert_hard, x, #x)
#define RCU_CHECK(type, condition, message)
effects: perform a check guarantee: strong failures: !condition
Definition Assert.h:139
#define x

Definition at line 217 of file Assert.h.

217#define RCU_ASSERT(x) \
218 RCU_CHECK (assert_hard, x, #x)

◆ RCU_ASSERT0

#define RCU_ASSERT0 ( y)
Value:
RCU_CHECK (assert_hard, 0, y)
#define y

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:
RCU_CHECK (assert_noimp, 0, y)

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:
RCU_CHECK (assert_soft, 0, y)

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:
RCU_CHECK (assert_hard, x, y)

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:
RCU_CHECK (assert_noimp, x, y)

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:
(void) 0

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:
RCU_CHECK (assert_soft, x, y)

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:
RCU_CHECK (assert_noimp, x, #x)

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:
(void) 0

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:
RCU_CHECK (assert_soft, x, #x)

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
Definition Assert.h:143
TestInvariant invariant_tester(T *object)
effects: create the right invariant testing object returns: the tester
Definition Assert.h:121

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:
(void) 0

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:
(condition) ? (void) 0 : ::RCU::Check::fail (ROOTCORE_PACKAGE, __FILE__, __LINE__, ::RCU::Check::type, message)
#define ROOTCORE_PACKAGE
Definition Assert.h:133
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: ...
Definition Assert.cxx:64

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)
Definition Assert.h:144
static Double_t a

effects: join together two tokens

Definition at line 143 of file Assert.h.

◆ RCU_CHECK_JOIN2_HIDDEN

#define RCU_CHECK_JOIN2_HIDDEN ( a,
b )
Value:
a ## b

Definition at line 144 of file Assert.h.

◆ RCU_DESTROY_INVARIANT

#define RCU_DESTROY_INVARIANT ( x)
Value:
(x)->testInvariant ()

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:
(void) 0

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:
RCU_CHECK (invariant, x, #x)

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:
RCU_CHECK (invariant, 0, y)

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:
RCU_CHECK (invariant, x, y)

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:
(x)->testInvariant ()

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:
(void) 0

Definition at line 317 of file Assert.h.

317#define RCU_NEW_INVARIANT_SLOW(x) \
318 (void) 0

◆ RCU_PROVIDE

#define RCU_PROVIDE ( x)
Value:
RCU_CHECK (provide_hard, x, #x)

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:
RCU_CHECK (provide_hard, 0, y)

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:
RCU_CHECK (provide_noimp, 0, y)

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:
RCU_CHECK (provide_soft, 0, y)

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:
RCU_CHECK (provide_hard, x, y)

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:
RCU_CHECK (provide_noimp, x, y)

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:
(void) 0

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:
RCU_CHECK (provide_soft, x, y)

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:
RCU_CHECK (provide_noimp, x, #x)

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:
(void) 0

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:
RCU_CHECK (provide_soft, x, #x)

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:
(x)->testInvariant ()

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:
(void) 0

Definition at line 313 of file Assert.h.

313#define RCU_READ_INVARIANT_SLOW(x) \
314 (void) 0

◆ RCU_REQUIRE

#define RCU_REQUIRE ( x)
Value:
RCU_CHECK (require_hard, x, #x)

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:
RCU_CHECK (require_hard, 0, y)

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:
RCU_CHECK (require_noimp, 0, y)

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:
RCU_CHECK (require_soft, 0, y)

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:
RCU_CHECK (require_hard, x, y)

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:
RCU_CHECK (require_noimp, x, y)

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:
(void) 0

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:
RCU_CHECK (require_soft, x, y)

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:
RCU_CHECK (require_noimp, x, #x)

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:
(void) 0

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:
RCU_CHECK (require_soft, x, #x)

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

Definition at line 133 of file Assert.h.