Drake
Drake C++ Documentation
deprecation_pybind.h File Reference

Detailed Description

Provides access to Python deprecation utilities from C++.

For example usages, please see deprecation_example/cc_module_py.cc.

#include <memory>
#include <optional>
#include <string>
#include <utility>
#include "drake/bindings/pydrake/common/wrap_function.h"
#include "drake/bindings/pydrake/pydrake_pybind.h"
Include dependency graph for deprecation_pybind.h:

Namespaces

 drake
 
 drake::pydrake
 For more high-level information, see the Python Bindings technical notes.
 

Functions

void DeprecateAttribute (py::object cls, py::str name, py::str message, std::optional< std::string > date={})
 Deprecates an attribute name of a class cls. More...
 
void WarnDeprecated (py::str message, std::optional< std::string > date={})
 Raises a deprecation warning. More...
 
template<typename Func >
auto WrapDeprecated (py::str message, Func &&func)
 Wraps any callable (function pointer, method pointer, lambda, etc.) to emit a deprecation message. More...
 
template<typename Class , typename... Args>
auto py_init_deprecated (py::str message)
 Deprecated wrapping of py::init<>. More...
 
template<typename Func >
auto py_init_deprecated (py::str message, Func &&func)
 Deprecated wrapping of py::init(factory). More...
 
template<typename Class >
auto DeprecatedParamInit (py::str message)
 The deprecated flavor of ParamInit<>. More...