unittest
deprecation_policy.cpp
Go to the documentation of this file.
1
#include "
eigenpy/eigenpy.hpp
"
2
#include "
eigenpy/deprecation-policy.hpp
"
3
4
#include <iostream>
5
6
namespace
bp
=
boost::python
;
7
using
eigenpy::DeprecationType
;
8
9
void
some_deprecated_function
() {
10
std::cout <<
"Calling this should produce a warning"
<< std::endl;
11
}
12
13
void
some_future_deprecated_function
() {
14
std::cout
15
<<
"Calling this should produce a warning about a future deprecation"
16
<< std::endl;
17
}
18
19
class
X
{
20
public
:
21
void
deprecated_member_function
() {}
22
};
23
24
BOOST_PYTHON_MODULE
(deprecation_policy) {
25
bp::def(
"some_deprecated_function"
,
some_deprecated_function
,
26
eigenpy::deprecated_function<DeprecationType::DEPRECATION>
());
27
bp::def(
"some_future_deprecated_function"
,
some_future_deprecated_function
,
28
eigenpy::deprecated_function<DeprecationType::FUTURE>
());
29
30
bp::class_<X>(
"X"
, bp::init<>(bp::args(
"self"
)))
31
.def(
"deprecated_member_function"
, &
X::deprecated_member_function
,
32
eigenpy::deprecated_member<>
());
33
}
boost::python
Definition:
alignment.hpp:49
eigenpy::deprecated_member
Definition:
deprecation-policy.hpp:71
X::deprecated_member_function
void deprecated_member_function()
Definition:
deprecation_policy.cpp:21
deprecation-policy.hpp
eigenpy::DeprecationType
DeprecationType
Definition:
deprecation-policy.hpp:12
BOOST_PYTHON_MODULE
BOOST_PYTHON_MODULE(deprecation_policy)
Definition:
deprecation_policy.cpp:24
some_deprecated_function
void some_deprecated_function()
Definition:
deprecation_policy.cpp:9
some_future_deprecated_function
void some_future_deprecated_function()
Definition:
deprecation_policy.cpp:13
eigenpy.hpp
X
Definition:
deprecation_policy.cpp:19
eigenpy::deprecated_function
Definition:
deprecation-policy.hpp:61
eigenpy
Author(s): Justin Carpentier, Nicolas Mansard
autogenerated on Sat Nov 2 2024 02:14:45