-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCoreDeclHelpers.h
More file actions
35 lines (33 loc) · 1.51 KB
/
CoreDeclHelpers.h
File metadata and controls
35 lines (33 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
///////////////////////////////////////////////////////////////////////////////
// PROJECT: Micro-Manager
// SUBSYSTEM: MMCore
//-----------------------------------------------------------------------------
// DESCRIPTION: Declaration helper macros
//
// COPYRIGHT: 2026 Board of Regents of the University of Wisconsin System
//
// LICENSE: This file is distributed under the "Lesser GPL" (LGPL) license.
// License text is included with the source distribution.
//
// This file is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// IN NO EVENT SHALL THE COPYRIGHT OWNER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES.
#pragma once
// At the moment we rely on C++ dynamic exception specifiers (deprecated in
// C++11, removed in C++17) to tell SWIG-Java which exceptions may be thrown by
// API functions. But to avoid warnings and errors from the C++ compiler, we
// hide them behind a macro.
// Also hide 'noexcept' from SWIG 3.x, which doesn't support that keyword.
#ifdef SWIG
# define MMCORE_LEGACY_THROW(ex) throw (ex)
# define MMCORE_NOEXCEPT throw ()
# define MMCORE_DEPRECATED
#else
# define MMCORE_LEGACY_THROW(ex)
# define MMCORE_NOEXCEPT noexcept
# define MMCORE_DEPRECATED [[deprecated]]
#endif