DUNE-FEM (unstable)

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:
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
24//- Dune includes
26
27#ifdef CHECK_INTERFACE_IMPLEMENTATION
28#undef CHECK_INTERFACE_IMPLEMENTATION
29#endif
30#ifdef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION
31#undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION
32#endif
33
34#if defined NDEBUG || !defined DUNE_INTERFACECHECK
35#define CHECK_INTERFACE_IMPLEMENTATION(dummy)
36#else
37#define CHECK_INTERFACE_IMPLEMENTATION(__interface_method_to_call__) \
38 {\
39 static bool call = false; \
40 if( call == true ) \
41 DUNE_THROW(NotImplemented,"Interface method not implemented!");\
42 call = true; \
43 try { \
44 (__interface_method_to_call__); \
45 call = false; \
46 } \
47 catch ( ... ) \
48 { \
49 call = false; \
50 throw; \
51 } \
52 }
53#endif
54
60#if defined NDEBUG || !defined DUNE_INTERFACECHECK
61#define CHECK_AND_CALL_INTERFACE_IMPLEMENTATION(__interface_method_to_call__) \
62 (__interface_method_to_call__)
63#else
64#define CHECK_AND_CALL_INTERFACE_IMPLEMENTATION(__interface_method_to_call__) \
65 CHECK_INTERFACE_IMPLEMENTATION(__interface_method_to_call__)
66#endif
A few common exception classes.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 21, 23:30, 2024)