summaryrefslogtreecommitdiffstats
path: root/addon/doxmlparser/test
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-10-30 20:57:53 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-10-30 20:57:53 (GMT)
commitc6d6555a949e86be5c859311eb4db5dcc092c258 (patch)
treedd06bd100b0bd88b6ee40c8464efac800a749c32 /addon/doxmlparser/test
parent7c34dd2b1594925d0a012e9ba290bf9c80574db5 (diff)
downloadDoxygen-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.cpp30
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)