DUNE PDELab (2.8)

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:
22//- Dune includes
24
25#ifdef CHECK_INTERFACE_IMPLEMENTATION
26#undef CHECK_INTERFACE_IMPLEMENTATION
27#endif
28#ifdef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION
29#undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION
30#endif
31
32#if defined NDEBUG || !defined DUNE_INTERFACECHECK
33#define CHECK_INTERFACE_IMPLEMENTATION(dummy)
34#else
35#define CHECK_INTERFACE_IMPLEMENTATION(__interface_method_to_call__) \
36 {\
37 static bool call = false; \
38 if( call == true ) \
39 DUNE_THROW(NotImplemented,"Interface method not implemented!");\
40 call = true; \
41 try { \
42 (__interface_method_to_call__); \
43 call = false; \
44 } \
45 catch ( ... ) \
46 { \
47 call = false; \
48 throw; \
49 } \
50 }
51#endif
52
58#if defined NDEBUG || !defined DUNE_INTERFACECHECK
59#define CHECK_AND_CALL_INTERFACE_IMPLEMENTATION(__interface_method_to_call__) \
60 (__interface_method_to_call__)
61#else
62#define CHECK_AND_CALL_INTERFACE_IMPLEMENTATION(__interface_method_to_call__) \
63 CHECK_INTERFACE_IMPLEMENTATION(__interface_method_to_call__)
64#endif
A few common exception classes.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 21, 23:30, 2024)