Dune Core Modules (2.3.1)

bartonnackmanifcheck.hh
Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
13//- Dune includes
15
16#ifdef CHECK_INTERFACE_IMPLEMENTATION
17#undef CHECK_INTERFACE_IMPLEMENTATION
18#endif
19#ifdef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION
20#undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION
21#endif
22
23#ifdef NDEBUG
24#define CHECK_INTERFACE_IMPLEMENTATION(dummy)
25#else
26#define CHECK_INTERFACE_IMPLEMENTATION(__interface_method_to_call__) \
27 {\
28 static bool call = false; \
29 if( call == true ) \
30 DUNE_THROW(NotImplemented,"Interface method not implemented!");\
31 call = true; \
32 try { \
33 (__interface_method_to_call__); \
34 call = false; \
35 } \
36 catch ( ... ) \
37 { \
38 call = false; \
39 throw; \
40 } \
41 }
42#endif
43
49#ifdef NDEBUG
50#define CHECK_AND_CALL_INTERFACE_IMPLEMENTATION(__interface_method_to_call__) \
51 (__interface_method_to_call__)
52#else
53#define CHECK_AND_CALL_INTERFACE_IMPLEMENTATION(__interface_method_to_call__) \
54 CHECK_INTERFACE_IMPLEMENTATION(__interface_method_to_call__)
55#endif
A few common exception classes.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 12, 23:30, 2024)