aboutsummaryrefslogtreecommitdiff
path: root/source/20-codegen-compiler/test/examples/TestEnum.hpp.txt
blob: 30c36c067f100835c358724d2c89fa795d6ee2d4 (plain)
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
enum MyEnum {
	EnumElement1,
	EnumElement2,
	EnumElement3,
};
BRUSSEL_ENUM(MyEnum, ToString FromString);

// Let's also test enum class
enum class CountedEnumAll {
	CEA_Foo,
	CEA_Bar,
	CEA_COUNT,
};
BRUSSEL_ENUM(CountedEnumAll, ToString FromString);

enum CountedEnum {
	CE_Foo,
	CE_Bar,
	CE_FooBar,
	CE_COUNT,
};
BRUSSEL_ENUM(CountedEnum, ToString FromString ExcludeHeuristics);

namespace MyNamespace {
enum class MyNamespacedEnum {
	MNE_Foo,
	MNE_Bar,
};
BRUSSEL_ENUM(MyNamespacedEnum, ToString FromString ExcludeHeuristics);

namespace details {
	enum MyNamespacedEnum {
		MNE_Foo,
		MNE_Bar,
	};
	BRUSSEL_ENUM(MyNamespacedEnum, ToString FromString ExcludeHeuristics);
}
}

namespace foo::details {
enum Enum {
};
BRUSSEL_ENUM(Enum, ToString FromString ExcludeHeuristics);
}