-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathdeprecation.h
More file actions
27 lines (21 loc) · 819 Bytes
/
deprecation.h
File metadata and controls
27 lines (21 loc) · 819 Bytes
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
#ifndef PYTHONRUNNER_UTILS_H
#define PYTHONRUNNER_UTILS_H
#include <string_view>
#include <pybind11/pybind11.h>
namespace mo2::python {
/**
* @brief Show a deprecation warning.
*
* This methods will print a warning in MO2 log containing the location of
* the call to the deprecated function. If show_once is true, the
* deprecation warning will only be logged the first time the function is
* called at this location.
*
* @param name Name of the deprecated function.
* @param message Deprecation message.
* @param show_once Only show the message once per call location.
*/
void show_deprecation_warning(std::string_view name, std::string_view message = "",
bool show_once = true);
} // namespace mo2::python
#endif