IMP logo
IMP Reference Guide  2.17.0
The Integrative Modeling Platform
deprecation.h
Go to the documentation of this file.
1 /**
2  * \file IMP/deprecation.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_H
10 #define IMPKERNEL_DEPRECATION_H
11 
12 #include <IMP/kernel_config.h>
13 
14 IMPKERNEL_BEGIN_NAMESPACE
15 
16 //! Toggle printing of warnings on using deprecated classes
17 /** If set to true (the default) a warning is printed every
18  time a class marked as deprecated is used.
19  */
20 IMPKERNELEXPORT void set_deprecation_warnings(bool tf);
21 
22 //! Toggle whether an exception is thrown when a deprecated method is used.
23 IMPKERNELEXPORT void set_deprecation_exceptions(bool tf);
24 
25 //! Get whether an exception is thrown when a deprecated method is used.
26 IMPKERNELEXPORT bool get_deprecation_exceptions();
27 
28 //! Break in this method in gdb to find deprecated uses at runtime.
29 IMPKERNELEXPORT void handle_use_deprecated(std::string message);
30 
31 IMPKERNEL_END_NAMESPACE
32 
33 #endif /* IMPKERNEL_DEPRECATION_H */
void handle_use_deprecated(std::string message)
Break in this method in gdb to find deprecated uses at runtime.
void set_deprecation_warnings(bool tf)
Toggle printing of warnings on using deprecated classes.
void set_deprecation_exceptions(bool tf)
Toggle whether an exception is thrown when a deprecated method is used.
bool get_deprecation_exceptions()
Get whether an exception is thrown when a deprecated method is used.