home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
develop.4f1ba46383,2024/09/07
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
include
IMP
version 20240907.develop.4f1ba46383
deprecation_macros.h
Go to the documentation of this file.
1
/**
2
* \file IMP/deprecation_macros.h
3
* \brief Control display of deprecation information.
4
*
5
* Copyright 2007-2022 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef IMPKERNEL_DEPRECATION_MACROS_H
10
#define IMPKERNEL_DEPRECATION_MACROS_H
11
12
#include <IMP/kernel_config.h>
13
#include "
deprecation.h
"
14
15
#if !defined(SWIG)
16
17
/** Used to implement deprecation support. See the
18
[IMP deprecation policy](@ref deprecation).*/
19
#define IMP_DEPRECATED_MACRO(version, help_message) \
20
IMP_PRAGMA(message("This macro is deprecated as of IMP " #version \
21
": " help_message))
22
23
/** Used to implement deprecation support. See the
24
[IMP deprecation policy](@ref deprecation).*/
25
#define IMP_DEPRECATED_OBJECT_RUNTIME_WARNING(version, help_message) \
26
{ \
27
std::ostringstream oss; \
28
oss << "Object " << get_module_name() << "::" << get_type_name() \
29
<< " is deprecated. " << help_message << std::endl; \
30
IMP::handle_use_deprecated(oss.str()); \
31
}
32
33
/** Used to implement deprecation support. See the
34
[IMP deprecation policy](@ref deprecation).*/
35
#define IMP_DEPRECATED_VALUE_RUNTIME_WARNING(version, help_message) \
36
{ \
37
std::ostringstream oss; \
38
oss << "Class " << get_module_name() << "::" << IMP_CURRENT_FUNCTION \
39
<< " is deprecated. " << help_message << std::endl; \
40
IMP::handle_use_deprecated(oss.str()); \
41
}
42
43
/** Used to implement deprecation support. See the
44
[IMP deprecation policy](@ref deprecation).*/
45
#define IMP_DEPRECATED_FUNCTION_RUNTIME_WARNING(version, help_message) \
46
{ \
47
std::ostringstream oss; \
48
oss << "Function " << IMP_CURRENT_PRETTY_FUNCTION << " is deprecated. " \
49
<< help_message << std::endl; \
50
IMP::handle_use_deprecated(oss.str()); \
51
}
52
53
/** Used to implement deprecation support. See the
54
[IMP deprecation policy](@ref deprecation).*/
55
#define IMP_DEPRECATED_METHOD_RUNTIME_WARNING(version, help_message) \
56
{ \
57
std::ostringstream oss; \
58
oss << "Method " << IMP_CURRENT_PRETTY_FUNCTION << " is deprecated. " \
59
<< "WARNING: " << help_message << std::endl; \
60
IMP::handle_use_deprecated(oss.str()); \
61
}
62
63
#define IMP_DEPRECATED_FUNCTION_DEF(version, message)
64
65
#endif // SWIG
66
67
#endif
/* IMPKERNEL_DEPRECATION_MACROS_H */
deprecation.h
Control display of deprecation information.