diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-10-30 20:57:53 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-10-30 20:57:53 (GMT) |
commit | c6d6555a949e86be5c859311eb4db5dcc092c258 (patch) | |
tree | dd06bd100b0bd88b6ee40c8464efac800a749c32 /addon/doxmlparser/test | |
parent | 7c34dd2b1594925d0a012e9ba290bf9c80574db5 (diff) | |
download | Doxygen-c6d6555a949e86be5c859311eb4db5dcc092c258.zip Doxygen-c6d6555a949e86be5c859311eb4db5dcc092c258.tar.gz Doxygen-c6d6555a949e86be5c859311eb4db5dcc092c258.tar.bz2 |
Release-1.2.18-20021030
Diffstat (limited to 'addon/doxmlparser/test')
-rw-r--r-- | addon/doxmlparser/test/main.cpp | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/addon/doxmlparser/test/main.cpp b/addon/doxmlparser/test/main.cpp index 7ac7720..067dfc9 100644 --- a/addon/doxmlparser/test/main.cpp +++ b/addon/doxmlparser/test/main.cpp @@ -16,6 +16,7 @@ #include <stdio.h> #include <stdlib.h> #include <doxmlintf.h> +#include <qstring.h> /*! Dumps the contents of a hyperlinked text fragment as plain text to the * output. @@ -390,6 +391,15 @@ void DumpDoc(IDoc *doc,int level) InPrint(("<preformatted/>\n")); } break; + case IDoc::Verbatim: + { + InPrint(("<verbatim>\n")); + IDocVerbatim *vt = dynamic_cast<IDocVerbatim*>(doc); + ASSERT(vt!=0); + InPrint(("%s",vt->text()->latin1())); + InPrint(("<verbatim/>\n")); + } + break; case IDoc::Symbol: { IDocSymbol *sym = dynamic_cast<IDocSymbol*>(doc); @@ -540,14 +550,22 @@ int main(int argc,char **argv) } mri->release(); - IEnumValueIterator *evi = mem->enumValues(); - IEnumValue *ev; - for (evi->toFirst();(ev=evi->current());evi->toNext()) + if (mem->kind()==IMember::Enum) // we have found an enum { - printf(" Enum value `%s' init=`%s'\n", - ev->name()->latin1(),ev->initializer()->latin1()); + IEnum *e = dynamic_cast<IEnum*>(mem); + IMemberIterator *evi = e->enumValues(); // get the enum values + IMember *mev; + for (evi->toFirst();(mev=evi->current());evi->toNext()) + { + IEnumValue *ev = dynamic_cast<IEnumValue*>(mev); + ILinkedTextIterator *lti = ev->initializer(); + QString init = linkedTextToString(lti); + lti->release(); + printf(" Enum value `%s' init=`%s'\n", + ev->name()->latin1(),init.latin1()); + } + evi->release(); } - evi->release(); pli = mem->templateParameters(); if (pli) |