summaryrefslogtreecommitdiffstats
path: root/addon/doxmlparser/test
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-04-01 15:21:13 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-04-01 15:21:13 (GMT)
commitde20cde3d47c58a69c25afe75e4c476d61dbe631 (patch)
tree3a293a9effd1e75fc51a16da348b000001756267 /addon/doxmlparser/test
parent21587da40824d8609575284f0ee0fac90c972f27 (diff)
downloadDoxygen-de20cde3d47c58a69c25afe75e4c476d61dbe631.zip
Doxygen-de20cde3d47c58a69c25afe75e4c476d61dbe631.tar.gz
Doxygen-de20cde3d47c58a69c25afe75e4c476d61dbe631.tar.bz2
Release-1.2.15
Diffstat (limited to 'addon/doxmlparser/test')
-rw-r--r--addon/doxmlparser/test/main.cpp84
1 files changed, 83 insertions, 1 deletions
diff --git a/addon/doxmlparser/test/main.cpp b/addon/doxmlparser/test/main.cpp
index 9c97db9..457d881 100644
--- a/addon/doxmlparser/test/main.cpp
+++ b/addon/doxmlparser/test/main.cpp
@@ -140,6 +140,10 @@ void DumpDoc(IDoc *doc)
{
IDocSimpleSect *ss = dynamic_cast<IDocSimpleSect*>(doc);
ASSERT(ss!=0);
+ printf(" --- simplesect type=%s --- \n",ss->typeString().data());
+ DumpDoc(ss->title());
+ DumpDoc(ss->description());
+ printf(" --- end simplesect --- \n");
}
break;
case IDoc::Title:
@@ -158,8 +162,12 @@ void DumpDoc(IDoc *doc)
break;
case IDoc::Ref:
{
- IDocRef *ref = dynamic_cast<IDocRef*>(ref);
+ IDocRef *ref = dynamic_cast<IDocRef*>(doc);
ASSERT(ref!=0);
+ printf(" ref=%p\n",ref);
+ printf(" --- ref id=%s text=%s --- \n",
+ ref->refId().data(),ref->text().data());
+ printf(" --- end ref --- \n");
}
break;
case IDoc::VariableList:
@@ -312,6 +320,43 @@ void DumpDoc(IDoc *doc)
}
}
+void DumpGraph(IGraph *graph)
+{
+ if (graph==0) { printf(" --- no graph ---\n"); return; }
+ printf(" --- graph ----\n");
+ INodeIterator *ni = graph->nodes();
+ INode *node;
+ for (ni->toFirst();(node=ni->current());ni->toNext())
+ {
+ printf(" --- node id=%s label=%s linkId=%s\n",
+ node->id().data(),
+ node->label().data(),
+ node->linkId().data()
+ );
+ IChildNodeIterator *cni = node->children();
+ IChildNode *cn;
+ for (cni->toFirst();(cn=cni->current());cni->toNext())
+ {
+ printf(" + child id=%s label=%s relation=%s\n",
+ cn->node()->id().data(),
+ cn->node()->label().data(),
+ cn->relationString().data()
+ );
+ IEdgeLabelIterator *eli = cn->edgeLabels();
+ IEdgeLabel *el;
+ for (eli->toFirst();(el=eli->current());eli->toNext())
+ {
+ printf(" edgeLabel=%s\n",el->label().data());
+ }
+ eli->release();
+ }
+ cni->release();
+ }
+ ni->release();
+ printf(" --- end graph ----\n");
+
+}
+
int main(int argc,char **argv)
{
if (argc!=2)
@@ -322,6 +367,8 @@ int main(int argc,char **argv)
IDoxygen *dox = createObjectModel();
+ dox->setDebugLevel(0);
+
if (!dox->readXMLDir(argv[1]))
{
printf("Error reading %s/index.xml\n",argv[1]);
@@ -422,6 +469,41 @@ int main(int argc,char **argv)
printf("===== detailed description ==== \n");
DumpDoc(doc);
}
+
+ if (comp->kind()==ICompound::Class)
+ {
+ IClass *cls = dynamic_cast<IClass*>(comp);
+ ASSERT(cls!=0);
+
+ printf("==== inheritance graph ==== \n");
+ DumpGraph(cls->inheritanceGraph());
+
+ printf("==== collabration graph ==== \n");
+ DumpGraph(cls->collaborationGraph());
+
+ printf("==== base classes ==== \n");
+ IRelatedCompoundIterator *bcli = cls->baseClasses();
+ IRelatedCompound *bClass;
+ for (bcli->toFirst();(bClass=bcli->current());bcli->toNext())
+ {
+ ICompound *bc = bClass->compound();
+ printf(" + class %s\n",bc->name().data());
+ bc->release();
+ }
+ bcli->release();
+
+ printf("==== derived classes ==== \n");
+ IRelatedCompoundIterator *dcli = cls->derivedClasses();
+ IRelatedCompound *dClass;
+ for (dcli->toFirst();(dClass=dcli->current());dcli->toNext())
+ {
+ ICompound *dc = dClass->compound();
+ printf(" + class %s\n",dc->name().data());
+ dc->release();
+ }
+ dcli->release();
+ }
+
comp->release();
}
cli->release();