-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvariables.h
33 lines (27 loc) · 1.43 KB
/
variables.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
#pragma once
#include "genpybind.h"
#define GENPYBIND_TEST_MEMBERS \
static int static_field; \
static const int static_const_field = 2; \
static constexpr int static_constexpr_field = 3; \
GENPYBIND(readonly) \
static int static_readonly_field; \
GENPYBIND(writable(false)) \
static int static_writable_false_field; \
\
int field = 1; \
const int const_field = 2; \
GENPYBIND(readonly) \
int readonly_field = 4; \
GENPYBIND(writable(false)) \
int writable_false_field = 5;
struct GENPYBIND(visible) SomeStruct {
GENPYBIND_TEST_MEMBERS
};
class GENPYBIND(visible) SomeClass {
public:
GENPYBIND_TEST_MEMBERS
};
#undef GENPYBIND_TEST_MEMBERS
extern int var GENPYBIND(visible);
extern const int const_var GENPYBIND(visible);