-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathexample.h
61 lines (47 loc) · 1.06 KB
/
example.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#pragma once
#define EXPORT __declspec(dllexport)
namespace example
{
class EXPORT A
{
enum enum_A_1 {};
enum enum_A_2 : char {}; // Enum with char real type
void function_A_1(enum_A_1) {}
void function_A_2(enum_A_2) {}
};
namespace BC // nested namespace
{
enum enum_BC_1 {};
enum enum_BC_2 {}; // Unused
union EXPORT U // Union
{
int i;
char c;
};
struct EXPORT B
{
virtual ~B() = default;
};
struct EXPORT C : public B
{
virtual ~C() = default;
virtual void virtual_function_C_1(enum_BC_1) {}
virtual void virtual_function_C_2(U) {}
};
}
struct EXPORT D : protected A, public BC::C
{
virtual ~D() = default;
virtual void virtual_function_D_1() {}
virtual void virtual_function_D_2(int) {}
};
class E : public D
{
enum enum_E_1 {};
enum enum_E_2 {};
EXPORT static void static_function_E_0(enum_E_2) {}
EXPORT void function_E_1(enum_E_1) {}
/* */ void function_E_2(enum_E_2) {}
virtual ~E() = default;
};
}