diff options
Diffstat (limited to 'testing')
-rw-r--r-- | testing/073/073__typed__enum_8cpp.xml | 96 | ||||
-rw-r--r-- | testing/073_typed_enum.cpp | 18 |
2 files changed, 114 insertions, 0 deletions
diff --git a/testing/073/073__typed__enum_8cpp.xml b/testing/073/073__typed__enum_8cpp.xml index 7e68f3e..9d6947e 100644 --- a/testing/073/073__typed__enum_8cpp.xml +++ b/testing/073/073__typed__enum_8cpp.xml @@ -15,6 +15,102 @@ </inbodydescription> <location file="073_typed_enum.cpp" line="7" column="1" bodyfile="073_typed_enum.cpp" bodystart="7" bodyend="7"/> </memberdef> + <memberdef kind="enum" id="073__typed__enum_8cpp_1a2890437f40d5bcd72710a06cd6a934f5" prot="public" static="no" strong="yes"> + <type>unsigned char</type> + <name>Mem</name> + <enumvalue id="073__typed__enum_8cpp_1a2890437f40d5bcd72710a06cd6a934f5a2ad9d63b69c4a10a5cc9cad923133bc4" prot="public"> + <name>Bottom</name> + <initializer>= 0</initializer> + <briefdescription> + </briefdescription> + <detaileddescription> + </detaileddescription> + </enumvalue> + <enumvalue id="073__typed__enum_8cpp_1a2890437f40d5bcd72710a06cd6a934f5ac946366be0e03f425017b1a97b4a7fbb" prot="public"> + <name>NotMem</name> + <initializer>= 1U << 0</initializer> + <briefdescription> + </briefdescription> + <detaileddescription> + </detaileddescription> + </enumvalue> + <enumvalue id="073__typed__enum_8cpp_1a2890437f40d5bcd72710a06cd6a934f5a165d3d525f6d0cbd55e42cc3058cafcc" prot="public"> + <name>Ptr</name> + <initializer>= 1U << 1</initializer> + <briefdescription> + </briefdescription> + <detaileddescription> + </detaileddescription> + </enumvalue> + <enumvalue id="073__typed__enum_8cpp_1a2890437f40d5bcd72710a06cd6a934f5abd34ea97de15a451a2117e2e4cd49c12" prot="public"> + <name>Lval</name> + <initializer>= 1U << 2</initializer> + <briefdescription> + </briefdescription> + <detaileddescription> + </detaileddescription> + </enumvalue> + <enumvalue id="073__typed__enum_8cpp_1a2890437f40d5bcd72710a06cd6a934f5adba5553473d129a7985fb532dc249ff4" prot="public"> + <name>Mem</name> + <initializer>= Ptr | Lval</initializer> + <briefdescription> + </briefdescription> + <detaileddescription> + </detaileddescription> + </enumvalue> + <enumvalue id="073__typed__enum_8cpp_1a2890437f40d5bcd72710a06cd6a934f5aa4ffdcf0dc1f31b9acaf295d75b51d00" prot="public"> + <name>Top</name> + <initializer>= NotMem | Mem</initializer> + <briefdescription> + </briefdescription> + <detaileddescription> + </detaileddescription> + </enumvalue> + <briefdescription> + <para>Strongly types enum when values that has the same name as the enum. </para> + </briefdescription> + <detaileddescription> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="073_typed_enum.cpp" line="10" column="1" bodyfile="073_typed_enum.cpp" bodystart="10" bodyend="17"/> + </memberdef> + <memberdef kind="enum" id="073__typed__enum_8cpp_1a06fc87d81c62e9abb8790b6e5713c55b" prot="public" static="no" strong="no"> + <type/> + <name>@0</name> + <enumvalue id="073__typed__enum_8cpp_1a06fc87d81c62e9abb8790b6e5713c55ba52c998ad250c15a855ff5559e6d0d1d6" prot="public"> + <name>Unnamed1</name> + <briefdescription> + </briefdescription> + <detaileddescription> + </detaileddescription> + </enumvalue> + <briefdescription> + </briefdescription> + <detaileddescription> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="073_typed_enum.cpp" line="19" column="1" bodyfile="073_typed_enum.cpp" bodystart="19" bodyend="21"/> + </memberdef> + <memberdef kind="enum" id="073__typed__enum_8cpp_1adf764cbdea00d65edcd07bb9953ad2b7" prot="public" static="no" strong="no"> + <type/> + <name>@1</name> + <enumvalue id="073__typed__enum_8cpp_1adf764cbdea00d65edcd07bb9953ad2b7a7b130af0c5cb18bfee8c60994fe1d5ee" prot="public"> + <name>Unnamed2</name> + <briefdescription> + </briefdescription> + <detaileddescription> + </detaileddescription> + </enumvalue> + <briefdescription> + </briefdescription> + <detaileddescription> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="073_typed_enum.cpp" line="23" column="1" bodyfile="073_typed_enum.cpp" bodystart="23" bodyend="25"/> + </memberdef> </sectiondef> <briefdescription> </briefdescription> diff --git a/testing/073_typed_enum.cpp b/testing/073_typed_enum.cpp index 0818463..7248c96 100644 --- a/testing/073_typed_enum.cpp +++ b/testing/073_typed_enum.cpp @@ -5,3 +5,21 @@ /** @brief A strongly-typed enum */ enum class E: unsigned short {}; + +/** @brief Strongly types enum when values that has the same name as the enum */ +enum class Mem : unsigned char { + Bottom = 0, + NotMem = 1U << 0, + Ptr = 1U << 1, + Lval = 1U << 2, + Mem = Ptr | Lval, + Top = NotMem | Mem, +}; + +enum { + Unnamed1 +}; + +enum { + Unnamed2 +}; |