Main Page
Namespaces
Classes
Files
File List
File Members
unittest
alpha
simple.cpp
Go to the documentation of this file.
1
/* Simple test with boost::python.
2
* Declare and bind three function, returning char*, string, and Eigen::Vector. The last
3
* function raises and error at runtime due to inadequate binding.
4
*/
5
6
#include <string>
7
8
#include "
eigenpy/fwd.hpp
"
9
10
11
char
const
*
testchar
()
12
{
13
return
"Yay char!"
;
14
}
15
16
std::string
teststr
()
17
{
18
return
"Yay str!"
;
19
}
20
21
Eigen::VectorXd
testeigenvec
()
22
{
23
Eigen::VectorXd
v
(555);
24
return
v
;
25
}
26
27
28
BOOST_PYTHON_MODULE
(libsimple)
29
{
30
using namespace
boost::python
;
31
def(
"char"
,
testchar
);
32
def(
"str"
,
teststr
);
33
def(
"eigenvec"
,
testeigenvec
);
34
}
BOOST_PYTHON_MODULE
BOOST_PYTHON_MODULE(libsimple)
Definition:
simple.cpp:28
testchar
char const * testchar()
Definition:
simple.cpp:11
fwd.hpp
testeigenvec
Eigen::VectorXd testeigenvec()
Definition:
simple.cpp:21
teststr
std::string teststr()
Definition:
simple.cpp:16
boost::python
Definition:
details.hpp:22
test_geometry.v
v
Definition:
test_geometry.py:21
eigenpy
Author(s): Justin Carpentier, Nicolas Mansard
autogenerated on Sat Apr 17 2021 02:37:59