forked from kljohann/genpybind-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexpose_as.h
43 lines (28 loc) · 815 Bytes
/
expose_as.h
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
#pragma once
#include "genpybind.h"
struct GENPYBIND(visible) X {
int xfield;
};
struct Y {
int yfield = 42;
};
enum class GENPYBIND(expose_as("enum")) some_enum { A, B, C };
extern X const x GENPYBIND(expose_as(x_instance));
class GENPYBIND(visible, expose_as(Dummy)) dummy {
public:
dummy(int value);
typedef X type GENPYBIND(expose_as("typedef"));
static bool function() GENPYBIND(expose_as("static"));
GENPYBIND(expose_as(constant_))
static constexpr bool constant = true;
bool member GENPYBIND(expose_as(member_));
GENPYBIND(expose_as(__hash__))
int hash() const;
GENPYBIND(expose_as(__int__))
operator int() const;
typedef Y y_type GENPYBIND(opaque, expose_as("y_type_"));
private:
int m_value;
};
GENPYBIND(visible, expose_as(free_function_))
void free_function();