IMP  2.1.0
The Integrative Modeling Platform
base/deprecation.h
Go to the documentation of this file.
1 /**
2  * \file IMP/base/deprecation.h
3  * \brief Control display of deprecation information.
4  *
5  * Copyright 2007-2013 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPBASE_DEPRECATION_H
10 #define IMPBASE_DEPRECATION_H
11 
12 #include <IMP/base/base_config.h>
13 
14 IMPBASE_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 IMPBASEEXPORT void set_deprecation_warnings(bool tf);
21 
22 /** Toggle whether an exception is thrown when a deprecated
23  method is used.
24  */
25 IMPBASEEXPORT void set_deprecation_exceptions(bool tf);
26 
27 /** Break in this method in gdb to find deprecated uses at runtime. */
28 IMPBASEEXPORT void handle_use_deprecated(std::string message);
29 
30 IMPBASE_END_NAMESPACE
31 
32 #endif /* IMPBASE_DEPRECATION_H */
void handle_use_deprecated(std::string message)
void set_deprecation_exceptions(bool tf)
void set_deprecation_warnings(bool tf)
Toggle printing of warnings on using deprecated classes.