-
Notifications
You must be signed in to change notification settings - Fork 1
/
wrap_example.i
50 lines (39 loc) · 1.31 KB
/
wrap_example.i
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/* ----------------------------------------------------------------------------
* GTSAM Copyright 2010, Georgia Tech Research Corporation,
* Atlanta, Georgia 30332-0415
* All Rights Reserved
* Authors: Frank Dellaert, et al. (see THANKS for the full author list)
*
* See LICENSE for the license information
* -------------------------------------------------------------------------- */
/**
* @file wrap_example.i
* @brief Example wrapper interface file for Python
* @author Varun Agrawal
* @author Fan Jiang
*/
// This is an interface file for automatic Python wrapper generation.
// See gtsam.h for full documentation and more examples.
#include <src/greeting.h>
// The namespace should be the same as in the c++ source code.
namespace wrap_example {
class Greeting {
Greeting();
Greeting(const string& s);
// We can wrap class variables but only if they are `public`
string name;
void sayHello() const;
void takeAPointer(const double@ d) const;
void printOptional(boost::optional<string> s = nullptr);
void sayGoodbye(wrap_example::Greeting* x) const;
wrap_example::Greeting operator+(const wrap_example::Greeting& other) const;
};
template<T = {string, double}, R = {double}>
R CoolFunction(const T& s);
enum Pet {
Dog,
Cat,
Hamster,
Goldfish
};
} // namespace wrap_example