1
2
3
4
5
6 #ifndef SNGCM_AST_SPECIFIER_INCLUDED
7 #define SNGCM_AST_SPECIFIER_INCLUDED
8 #include <sngcm/ast/AstApi.hpp>
9 #include <string>
10 #include <stdint.h>
11
12 namespace sngcm { namespace ast {
13
14 enum class Specifiers : int32_t
15 {
16 none= 0,
17 public_= 1 << 0,
18 protected_= 1 << 1,
19 private_= 1 << 2,
20 internal_= 1 << 3,
21 static_= 1 << 4,
22 virtual_= 1 << 5,
23 override_= 1 << 6,
24 abstract_= 1 << 7,
25 inline_= 1 << 8,
26 explicit_= 1 << 9,
27 external_= 1 << 10,
28 suppress_= 1 << 11,
29 default_= 1 << 12,
30 constexpr_= 1 << 13,
31 cdecl_= 1 << 14,
32 nothrow_= 1 << 15,
33 throw_= 1 << 16,
34 new_= 1 << 17,
35 const_= 1 << 18,
36 unit_test_= 1 << 19,
37 winapi= 1 << 20,
38 access_= public_ | protected_ | private_ | internal_
39 };
40
41 inline Specifiers operator|(Specifiers left, Specifiers right)
42 {
43 return static_cast<Specifiers>(static_cast<int32_t>(left) | static_cast<int32_t>(right));
44 }
45
46 inline Specifiers operator&(Specifiers left, Specifiers right)
47 {
48 return static_cast<Specifiers>(static_cast<int32_t>(left) & static_cast<int32_t>(right));
49 }
50
51 inline Specifiers operator~(Specifiers operand)
52 {
53 return static_cast<Specifiers>(~static_cast<int32_t>(operand));
54 }
55
56 bool StaticConstructorSpecifiers(Specifiers specifiers);
57
58 std::string SpecifierStr(Specifiers specifiers);
59
60 } }
61
62 #endif // SNGCM_AST_SPECIFIER_INCLUDED