From 169cad806ea795e5c425fd397aa0de54cbc0a81e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 29 Nov 2017 18:51:39 +0100 Subject: Provide information about enum type "strongness" in the XML output. There's a new boolean `strong` attribute on the `` element that defines whether the enum is a classic or a strong one. Tests were updated to verify both cases. --- src/xmlgen.cpp | 7 +++++++ templates/xml/compound.xsd | 1 + testing/018/018__def_8c.xml | 2 +- testing/068/068__typed__enum_8cpp.xml | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index 3b81408..5196eef 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -668,6 +668,13 @@ static void generateXMLForMember(MemberDef *md,FTextStream &ti,FTextStream &t,De t << "\""; } + if (md->memberType() == MemberType_Enumeration) + { + t << " strong=\""; + if (md->isStrong()) t << "yes"; else t << "no"; + t << "\""; + } + if (md->memberType() == MemberType_Variable) { //ArgumentList *al = md->argumentList(); diff --git a/templates/xml/compound.xsd b/templates/xml/compound.xsd index 8affc20..0720823 100644 --- a/templates/xml/compound.xsd +++ b/templates/xml/compound.xsd @@ -146,6 +146,7 @@ + diff --git a/testing/018/018__def_8c.xml b/testing/018/018__def_8c.xml index 8bc5c09..5f42767 100644 --- a/testing/018/018__def_8c.xml +++ b/testing/018/018__def_8c.xml @@ -17,7 +17,7 @@ - + E diff --git a/testing/068/068__typed__enum_8cpp.xml b/testing/068/068__typed__enum_8cpp.xml index d6f1058..880bf14 100644 --- a/testing/068/068__typed__enum_8cpp.xml +++ b/testing/068/068__typed__enum_8cpp.xml @@ -3,7 +3,7 @@ 068_typed_enum.cpp - + unsigned short E -- cgit v0.12