summaryrefslogtreecommitdiffstats
path: root/addon
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2005-08-06 11:48:27 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2005-08-06 11:48:27 (GMT)
commitbedb86023002aa3985c914d330f54314d211bdc0 (patch)
tree340cca67808f566b0c458391835834e717e26a61 /addon
parent64c0fdd7432f5d9ddd815fbb459c651f6933a2ea (diff)
downloadDoxygen-bedb86023002aa3985c914d330f54314d211bdc0.zip
Doxygen-bedb86023002aa3985c914d330f54314d211bdc0.tar.gz
Doxygen-bedb86023002aa3985c914d330f54314d211bdc0.tar.bz2
Release-1.4.4-20050806
Diffstat (limited to 'addon')
-rw-r--r--addon/doxmlparser/include/doxmlintf.h15
-rw-r--r--addon/doxmlparser/src/compoundhandler.cpp76
-rw-r--r--addon/doxmlparser/src/compoundhandler.h95
-rw-r--r--addon/doxmlparser/src/dochandler.cpp49
-rw-r--r--addon/doxmlparser/src/dochandler.h5
-rw-r--r--addon/doxmlparser/src/doxmlintf.h15
-rw-r--r--addon/doxmlparser/src/memberhandler.cpp4
-rw-r--r--addon/doxmlparser/src/memberhandler.h129
-rw-r--r--addon/doxmlparser/src/paramhandler.cpp2
-rw-r--r--addon/doxmlparser/src/paramhandler.h19
-rw-r--r--addon/doxmlparser/src/sectionhandler.cpp15
-rw-r--r--addon/doxmlparser/src/sectionhandler.h19
12 files changed, 257 insertions, 186 deletions
diff --git a/addon/doxmlparser/include/doxmlintf.h b/addon/doxmlparser/include/doxmlintf.h
index 52db174..79dc763 100644
--- a/addon/doxmlparser/include/doxmlintf.h
+++ b/addon/doxmlparser/include/doxmlintf.h
@@ -486,6 +486,7 @@ class IDocRoot : public IDoc
{
public:
virtual IDocIterator *contents() const = 0;
+ virtual IDocInternal *internal() const = 0;
};
class IDocIterator
@@ -601,6 +602,7 @@ class IMember
virtual ILinkedTextIterator *exceptions() const = 0;
virtual IMemberReferenceIterator *references() const = 0;
virtual IMemberReferenceIterator *referencedBy() const = 0;
+ virtual const IString *bodyFile() const = 0;
virtual int bodyStart() const = 0;
virtual int bodyEnd() const = 0;
virtual const IString * definitionFile() const = 0;
@@ -730,6 +732,7 @@ class ISection
Signals, //!< Qt Signals
DCOPFuncs, //!< KDE-DCOP interface functions
Properties, //!< IDL properties
+ Events, //!< C# events
PubStatFuncs, //!< Public static member functions
PubStatAttribs, //!< Public static attributes
ProTypes, //!< Protected member typedefs
@@ -764,6 +767,11 @@ class ISection
/*! Returns what kind of section this is */
virtual SectionKind kind() const = 0;
+
+ /*! Returns the description attached to this section (for user defined
+ * sections, also known as member groups).
+ */
+ virtual IDocRoot *description() const = 0;
/*! Returns an iterator for the members of this section */
virtual IMemberIterator *members() const = 0;
@@ -834,9 +842,10 @@ class ICompound
public:
/*! Represents the kind of compounds recognised by doxygen. */
enum CompoundKind { Invalid=0,
- Class, Struct, Union, Interface, Exception,
- Namespace, File, Group, Page
+ Class, Struct, Union, Interface, Protocol, Category,
+ Exception, File, Namespace, Group, Page, Example, Dir
};
+
/*! Returns the name of this compound */
virtual const IString * name() const = 0;
@@ -907,6 +916,7 @@ class IRelatedCompound
virtual ICompound *compound() const = 0;
virtual Protection protection() const = 0;
virtual Kind kind() const = 0;
+ virtual const IString *name() const = 0;
};
@@ -934,6 +944,7 @@ class IClass : public ICompound
virtual IParamIterator *templateParameters() const = 0;
virtual const IString *locationFile() const = 0;
virtual int locationLine() const = 0;
+ virtual const IString *locationBodyFile() const = 0;
virtual int locationBodyStartLine() const = 0;
virtual int locationBodyEndLine() const = 0;
diff --git a/addon/doxmlparser/src/compoundhandler.cpp b/addon/doxmlparser/src/compoundhandler.cpp
index 411f114..5bdf160 100644
--- a/addon/doxmlparser/src/compoundhandler.cpp
+++ b/addon/doxmlparser/src/compoundhandler.cpp
@@ -130,19 +130,19 @@ class CompoundTypeMap
CompoundTypeMap()
{
m_map.setAutoDelete(TRUE);
- m_map.insert("class",new int(ICompound::Class));
- m_map.insert("struct",new int(ICompound::Struct));
- m_map.insert("union",new int(ICompound::Union));
+ m_map.insert("class", new int(ICompound::Class));
+ m_map.insert("struct", new int(ICompound::Struct));
+ m_map.insert("union", new int(ICompound::Union));
m_map.insert("interface",new int(ICompound::Interface));
- m_map.insert("protocol",new int(ICompound::Interface));
- m_map.insert("category",new int(ICompound::Interface));
+ m_map.insert("protocol", new int(ICompound::Protocol));
+ m_map.insert("category", new int(ICompound::Category));
m_map.insert("exception",new int(ICompound::Exception));
- m_map.insert("file",new int(ICompound::File));
+ m_map.insert("file", new int(ICompound::File));
m_map.insert("namespace",new int(ICompound::Namespace));
- m_map.insert("group",new int(ICompound::Group));
- m_map.insert("page",new int(ICompound::Page));
- m_map.insert("example",new int(ICompound::Page));
- m_map.insert("dir",new int(ICompound::Page));
+ m_map.insert("group", new int(ICompound::Group));
+ m_map.insert("page", new int(ICompound::Page));
+ m_map.insert("example", new int(ICompound::Example));
+ m_map.insert("dir", new int(ICompound::Dir));
}
virtual ~CompoundTypeMap()
{
@@ -176,18 +176,27 @@ void compoundhandler_exit()
//----------------------------------------------------------------------------
CompoundHandler::CompoundHandler(const QString &xmlDir)
- : m_brief(0), m_detailed(0), m_programListing(0),
- m_xmlDir(xmlDir), m_refCount(1), m_memberDict(257), m_memberNameDict(257),
- m_mainHandler(0), m_inheritanceGraph(0), m_collaborationGraph(0),
- m_includeDependencyGraph(0), m_includedByDependencyGraph(0), m_templateParamList(0),
- m_titleHandler(0), m_members(0)
+ : m_titleHandler(0),
+ m_includeDependencyGraph(0),
+ m_includedByDependencyGraph(0),
+ m_templateParamList(0),
+ m_brief(0),
+ m_detailed(0),
+ m_inheritanceGraph(0),
+ m_collaborationGraph(0),
+ m_programListing(0),
+ m_members(0),
+ m_xmlDir(xmlDir),
+ m_refCount(1),
+ m_memberDict(257),
+ m_memberNameDict(257),
+ m_mainHandler(0)
{
m_superClasses.setAutoDelete(TRUE);
m_subClasses.setAutoDelete(TRUE);
m_sections.setAutoDelete(TRUE);
m_memberNameDict.setAutoDelete(TRUE);
m_innerCompounds.setAutoDelete(TRUE);
- m_params.setAutoDelete(TRUE);
m_includes.setAutoDelete(TRUE);
m_includedBy.setAutoDelete(TRUE);
@@ -202,11 +211,11 @@ CompoundHandler::CompoundHandler(const QString &xmlDir)
addStartHandler("title",this,&CompoundHandler::startTitle);
- addStartHandler("basecompoundref",this,&CompoundHandler::addSuperClass);
- addEndHandler("basecompoundref");
+ addStartHandler("basecompoundref",this,&CompoundHandler::startSuperClass);
+ addEndHandler("basecompoundref",this,&CompoundHandler::endSuperClass);
- addStartHandler("derivedcompoundref",this,&CompoundHandler::addSubClass);
- addEndHandler("derivedcompoundref");
+ addStartHandler("derivedcompoundref",this,&CompoundHandler::startSubClass);
+ addEndHandler("derivedcompoundref",this,&CompoundHandler::endSubClass);
addStartHandler("includes",this,&CompoundHandler::startIncludes);
addStartHandler("includedby",this,&CompoundHandler::startIncludedBy);
@@ -312,9 +321,9 @@ void CompoundHandler::startIncludedBy(const QXmlAttributes& attrib)
void CompoundHandler::startCompound(const QXmlAttributes& attrib)
{
- m_id = attrib.value("id");
+ m_id = attrib.value("id");
m_kindString = attrib.value("kind");
- m_kind = s_typeMap->map(m_kindString);
+ m_kind = s_typeMap->map(m_kindString);
m_protection = attrib.value("prot");
debug(2,"startCompound(id=`%s' type=`%s')\n",m_id.data(),m_kindString.data());
}
@@ -326,10 +335,11 @@ void CompoundHandler::endCompound()
void CompoundHandler::startLocation(const QXmlAttributes& attrib)
{
- m_defFile = attrib.value("file");
- m_defLine = attrib.value("line").toInt();
+ m_defFile = attrib.value("file");
+ m_defLine = attrib.value("line").toInt();
+ m_defBodyFile = attrib.value("bodyfile");
m_defBodyStart = attrib.value("bodystart").toInt();
- m_defBodyEnd = attrib.value("bodyend").toInt();
+ m_defBodyEnd = attrib.value("bodyend").toInt();
}
void CompoundHandler::endCompoundName()
@@ -380,7 +390,7 @@ void CompoundHandler::startListOfAllMembers(const QXmlAttributes& attrib)
m_members->startListOfAllMembers(attrib);
}
-void CompoundHandler::addSuperClass(const QXmlAttributes& attrib)
+void CompoundHandler::startSuperClass(const QXmlAttributes& attrib)
{
IRelatedCompound::Protection prot = IRelatedCompound::Public;
QString protString = attrib.value("prot");
@@ -407,9 +417,15 @@ void CompoundHandler::addSuperClass(const QXmlAttributes& attrib)
protString.data(),
kindString.data());
m_superClasses.append(sc);
+ m_curString = "";
+}
+
+void CompoundHandler::endSuperClass()
+{
+ m_superClasses.getLast()->setName(m_curString);
}
-void CompoundHandler::addSubClass(const QXmlAttributes& attrib)
+void CompoundHandler::startSubClass(const QXmlAttributes& attrib)
{
IRelatedCompound::Protection prot = IRelatedCompound::Public;
QString protString = attrib.value("prot");
@@ -431,6 +447,12 @@ void CompoundHandler::addSubClass(const QXmlAttributes& attrib)
protString.data(),
kindString.data());
m_subClasses.append(sc);
+ m_curString = "";
+}
+
+void CompoundHandler::endSubClass()
+{
+ m_subClasses.getLast()->setName(m_curString);
}
void CompoundHandler::startTitle(const QXmlAttributes& attrib)
diff --git a/addon/doxmlparser/src/compoundhandler.h b/addon/doxmlparser/src/compoundhandler.h
index 59ad7ce..ad8e2c8 100644
--- a/addon/doxmlparser/src/compoundhandler.h
+++ b/addon/doxmlparser/src/compoundhandler.h
@@ -36,7 +36,7 @@ class TemplateParamListHandler;
class TitleHandler;
class ListOfAllMembersHandler;
-class IncludeHandler : public IInclude, public BaseHandler<IncludeHandler>\
+class IncludeHandler : public IInclude, public BaseHandler<IncludeHandler>
{
public:
IncludeHandler(IBaseHandler *parent,const char *endtag);
@@ -55,9 +55,9 @@ class IncludeHandler : public IInclude, public BaseHandler<IncludeHandler>\
private:
IBaseHandler *m_parent;
- StringImpl m_name;
- StringImpl m_refId;
- bool m_isLocal;
+ StringImpl m_name; // element's content
+ StringImpl m_refId; // refid
+ bool m_isLocal; // local
};
class IncludeIterator : public BaseIterator<IIncludeIterator,IInclude,IncludeHandler>
@@ -78,16 +78,19 @@ class RelatedCompound : public IRelatedCompound
) :
m_parent(parent), m_id(id), m_protection(prot), m_kind(kind) {}
virtual ~RelatedCompound() {}
+ void setName(const QString &str) { m_name = str; }
virtual ICompound *compound() const;
virtual Protection protection() const { return m_protection; }
virtual Kind kind() const { return m_kind; }
+ virtual const IString *name() const { return &m_name; }
private:
CompoundHandler *m_parent;
- QString m_id;
- Protection m_protection;
- Kind m_kind;
+ QString m_id; // refid
+ Protection m_protection; // prot
+ Kind m_kind; // virt
+ StringImpl m_name; // element's content
};
class RelatedCompoundIterator : public BaseIterator<IRelatedCompoundIterator,IRelatedCompound,RelatedCompound>
@@ -114,8 +117,10 @@ class CompoundHandler : public IClass,
public:
virtual void startSection(const QXmlAttributes& attrib);
virtual void startCompound(const QXmlAttributes& attrib);
- virtual void addSuperClass(const QXmlAttributes& attrib);
- virtual void addSubClass(const QXmlAttributes& attrib);
+ virtual void startSuperClass(const QXmlAttributes& attrib);
+ virtual void endSuperClass();
+ virtual void startSubClass(const QXmlAttributes& attrib);
+ virtual void endSubClass();
virtual void endCompound();
virtual void endCompoundName();
virtual void startBriefDesc(const QXmlAttributes& attrib);
@@ -168,6 +173,7 @@ class CompoundHandler : public IClass,
ICompoundIterator *nestedGroup() const;
const IString *locationFile() const { return &m_defFile; }
int locationLine() const { return m_defLine; }
+ const IString *locationBodyFile() const { return &m_defBodyFile; }
int locationBodyStartLine() const { return m_defBodyStart; }
int locationBodyEndLine() const { return m_defBodyEnd; }
IMemberReferenceIterator *members() const;
@@ -183,38 +189,45 @@ class CompoundHandler : public IClass,
const IDocTitle *title() const;
private:
- QList<RelatedCompound> m_superClasses;
- QList<RelatedCompound> m_subClasses;
- QList<SectionHandler> m_sections;
- QList<ParamHandler> m_params;
- QList<IncludeHandler> m_includes;
- QList<IncludeHandler> m_includedBy;
- DocHandler* m_brief;
- DocHandler* m_detailed;
- ProgramListingHandler* m_programListing;
- StringImpl m_id;
- StringImpl m_protection;
- StringImpl m_kindString;
- CompoundKind m_kind;
- StringImpl m_name;
- StringImpl m_defFile;
- int m_defLine;
- int m_defBodyStart;
- int m_defBodyEnd;
- QString m_xmlDir;
- int m_refCount;
- QDict<MemberHandler> m_memberDict;
- QDict<QList<MemberHandler> > m_memberNameDict;
- MainHandler* m_mainHandler;
- GraphHandler* m_inheritanceGraph;
- GraphHandler* m_collaborationGraph;
- GraphHandler* m_includeDependencyGraph;
- GraphHandler* m_includedByDependencyGraph;
- QList<QString> m_innerCompounds;
- ProgramListingHandler* m_source;
- TemplateParamListHandler* m_templateParamList;
- TitleHandler* m_titleHandler;
- ListOfAllMembersHandler* m_members;
+ // XML elements:
+ // -------------
+ StringImpl m_name; // compoundname
+ TitleHandler* m_titleHandler; // title
+ QList<RelatedCompound> m_subClasses; // basecompoundref
+ QList<RelatedCompound> m_superClasses; // derivedcompoundref
+ QList<IncludeHandler> m_includes; // includes
+ QList<IncludeHandler> m_includedBy; // includedBy
+ GraphHandler* m_includeDependencyGraph; // incdepgraph
+ GraphHandler* m_includedByDependencyGraph; // invincdepgraph
+ QList<QString> m_innerCompounds; // innerdir/innerfile/innerclass/innernamespace/innergroup
+ TemplateParamListHandler* m_templateParamList; // templateparamlist
+ QList<SectionHandler> m_sections; // sectiondef
+ DocHandler* m_brief; // briefdescription
+ DocHandler* m_detailed; // detaileddescription
+ GraphHandler* m_inheritanceGraph; // inheritancegraph
+ GraphHandler* m_collaborationGraph; // collaborationgraph
+ ProgramListingHandler* m_programListing; // programlisting
+ // location
+ StringImpl m_defFile; // - file
+ int m_defLine; // - line
+ StringImpl m_defBodyFile; // - bodyfile
+ int m_defBodyStart; // - bodystart
+ int m_defBodyEnd; // - bodyend
+ ListOfAllMembersHandler* m_members; // listofallmember
+
+ // XML attributes:
+ // ---------------
+ StringImpl m_id; // id
+ CompoundKind m_kind; // kind
+ StringImpl m_kindString; // kind as a string
+ StringImpl m_protection; // prot
+
+ // local variables
+ QString m_xmlDir; // directory where the info is found
+ int m_refCount; // object reference counter
+ QDict<MemberHandler> m_memberDict; // id->member lookup
+ QDict<QList<MemberHandler> > m_memberNameDict; // name->memberlist lookup
+ MainHandler* m_mainHandler; // parent object
};
void compoundhandler_init();
diff --git a/addon/doxmlparser/src/dochandler.cpp b/addon/doxmlparser/src/dochandler.cpp
index 11af311..ba562ef 100644
--- a/addon/doxmlparser/src/dochandler.cpp
+++ b/addon/doxmlparser/src/dochandler.cpp
@@ -1679,28 +1679,37 @@ ParagraphHandler::ParagraphHandler(IBaseHandler *parent)
m_children.setAutoDelete(TRUE);
m_markupHandler = new MarkupHandler(m_children,m_curString);
+
+ // preformatted
setFallBackHandler(m_markupHandler);
addEndHandler("para",this,&ParagraphHandler::endParagraph);
- addStartHandler("itemizedlist",this,&ParagraphHandler::startItemizedList);
+ addStartHandler("linebreak",this,&ParagraphHandler::startLineBreak);
+ addStartHandler("hruler",this,&ParagraphHandler::startHRuler);
+ addStartHandler("programlisting",this,&ParagraphHandler::startProgramListing);
+ addStartHandler("verbatim",this,&ParagraphHandler::startVerbatim);
+ addStartHandler("indexentry",this,&ParagraphHandler::startIndexEntry);
addStartHandler("orderedlist",this,&ParagraphHandler::startOrderedList);
- addStartHandler("parameterlist",this,&ParagraphHandler::startParameterList);
+ addStartHandler("itemizedlist",this,&ParagraphHandler::startItemizedList);
addStartHandler("simplesect",this,&ParagraphHandler::startSimpleSect);
- addStartHandler("ref",this,&ParagraphHandler::startRef);
+ // TODO: title
addStartHandler("variablelist",this,&ParagraphHandler::startVariableList);
- addStartHandler("hruler",this,&ParagraphHandler::startHRuler);
- addStartHandler("linebreak",this,&ParagraphHandler::startLineBreak);
+ addStartHandler("table",this,&ParagraphHandler::startTable);
+ // TODO: heading
+ addStartHandler("image",this,&ParagraphHandler::startImage);
+ addStartHandler("dotfile",this,&ParagraphHandler::startDotFile);
+ addStartHandler("toclist",this,&ParagraphHandler::startTocList);
+ // TODO: language???
+ addStartHandler("parameterlist",this,&ParagraphHandler::startParameterList);
+ // TODO: xrefsect
+ addStartHandler("copydoc",this,&ParagraphHandler::startCopyDoc);
+
+ addStartHandler("ref",this,&ParagraphHandler::startRef);
addStartHandler("ulink",this,&ParagraphHandler::startULink);
addStartHandler("email",this,&ParagraphHandler::startEMail);
addStartHandler("link",this,&ParagraphHandler::startLink);
- addStartHandler("programlisting",this,&ParagraphHandler::startProgramListing);
addStartHandler("formula",this,&ParagraphHandler::startFormula);
- addStartHandler("image",this,&ParagraphHandler::startImage);
- addStartHandler("dotfile",this,&ParagraphHandler::startDotFile);
- addStartHandler("indexentry",this,&ParagraphHandler::startIndexEntry);
- addStartHandler("table",this,&ParagraphHandler::startTable);
- addStartHandler("verbatim",this,&ParagraphHandler::startVerbatim);
addStartHandler("latexonly",this,&ParagraphHandler::startHtmlOnly);
addStartHandler("htmlonly",this,&ParagraphHandler::startLatexOnly);
addStartHandler("umlaut",this,&ParagraphHandler::startUmlaut);
@@ -1714,8 +1723,6 @@ ParagraphHandler::ParagraphHandler(IBaseHandler *parent)
addStartHandler("nbsp",this,&ParagraphHandler::startNbsp);
addStartHandler("copy",this,&ParagraphHandler::startCopy);
addStartHandler("anchor",this,&ParagraphHandler::startAnchor);
- addStartHandler("copydoc",this,&ParagraphHandler::startCopyDoc);
- addStartHandler("toclist",this,&ParagraphHandler::startTocList);
}
ParagraphHandler::~ParagraphHandler()
@@ -2170,12 +2177,13 @@ DocHandler::DocHandler(IBaseHandler *parent) : m_parent(parent)
addEndHandler("briefdescription",this,&DocHandler::endDoc);
addEndHandler("detaileddescription",this,&DocHandler::endDoc);
addEndHandler("inbodydescription",this,&DocHandler::endDoc);
- addEndHandler("internal");
+ //addEndHandler("internal"); // TODO: implement this as a section
+ addStartHandler("internal",this,&DocHandler::startInternal);
addStartHandler("para",this,&DocHandler::startParagraph);
addStartHandler("sect1",this,&DocHandler::startSect1);
addStartHandler("title",this,&DocHandler::startTitle);
- addStartHandler("internal");
+ //addStartHandler("internal");
}
DocHandler::~DocHandler()
@@ -2215,8 +2223,19 @@ void DocHandler::startTitle(const QXmlAttributes& attrib)
m_children.append(titleHandler);
}
+void DocHandler::startInternal(const QXmlAttributes& attrib)
+{
+ m_internal = new DocInternalHandler(this,1);
+ m_internal->startInternal(attrib);
+}
+
IDocIterator *DocHandler::contents() const
{
return new DocIterator(*this);
}
+IDocInternal *DocHandler::internal() const
+{
+ return m_internal;
+}
+
diff --git a/addon/doxmlparser/src/dochandler.h b/addon/doxmlparser/src/dochandler.h
index 25fed50..922624d 100644
--- a/addon/doxmlparser/src/dochandler.h
+++ b/addon/doxmlparser/src/dochandler.h
@@ -1311,7 +1311,7 @@ class DocInternalSubIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,
/*! \brief Node representing a documentation block.
*
*/
-// children: para, title, sect1, sect2, sect3
+// children: para, title, sect1, internal
class DocHandler : public DocRootImpl, public BaseHandler<DocHandler>
{
friend class DocIterator;
@@ -1321,6 +1321,7 @@ class DocHandler : public DocRootImpl, public BaseHandler<DocHandler>
virtual void startParagraph(const QXmlAttributes& attrib);
virtual void startSect1(const QXmlAttributes& attrib);
virtual void startTitle(const QXmlAttributes& attrib);
+ virtual void startInternal(const QXmlAttributes& attrib);
DocHandler(IBaseHandler *parent);
virtual ~DocHandler();
@@ -1328,10 +1329,12 @@ class DocHandler : public DocRootImpl, public BaseHandler<DocHandler>
// IDocRoot
virtual Kind kind() const { return DocImpl::Root; }
virtual IDocIterator *contents() const;
+ virtual IDocInternal *internal() const;
private:
IBaseHandler *m_parent;
QList<DocImpl> m_children;
+ DocInternalHandler *m_internal;
};
class DocIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>
diff --git a/addon/doxmlparser/src/doxmlintf.h b/addon/doxmlparser/src/doxmlintf.h
index 52db174..79dc763 100644
--- a/addon/doxmlparser/src/doxmlintf.h
+++ b/addon/doxmlparser/src/doxmlintf.h
@@ -486,6 +486,7 @@ class IDocRoot : public IDoc
{
public:
virtual IDocIterator *contents() const = 0;
+ virtual IDocInternal *internal() const = 0;
};
class IDocIterator
@@ -601,6 +602,7 @@ class IMember
virtual ILinkedTextIterator *exceptions() const = 0;
virtual IMemberReferenceIterator *references() const = 0;
virtual IMemberReferenceIterator *referencedBy() const = 0;
+ virtual const IString *bodyFile() const = 0;
virtual int bodyStart() const = 0;
virtual int bodyEnd() const = 0;
virtual const IString * definitionFile() const = 0;
@@ -730,6 +732,7 @@ class ISection
Signals, //!< Qt Signals
DCOPFuncs, //!< KDE-DCOP interface functions
Properties, //!< IDL properties
+ Events, //!< C# events
PubStatFuncs, //!< Public static member functions
PubStatAttribs, //!< Public static attributes
ProTypes, //!< Protected member typedefs
@@ -764,6 +767,11 @@ class ISection
/*! Returns what kind of section this is */
virtual SectionKind kind() const = 0;
+
+ /*! Returns the description attached to this section (for user defined
+ * sections, also known as member groups).
+ */
+ virtual IDocRoot *description() const = 0;
/*! Returns an iterator for the members of this section */
virtual IMemberIterator *members() const = 0;
@@ -834,9 +842,10 @@ class ICompound
public:
/*! Represents the kind of compounds recognised by doxygen. */
enum CompoundKind { Invalid=0,
- Class, Struct, Union, Interface, Exception,
- Namespace, File, Group, Page
+ Class, Struct, Union, Interface, Protocol, Category,
+ Exception, File, Namespace, Group, Page, Example, Dir
};
+
/*! Returns the name of this compound */
virtual const IString * name() const = 0;
@@ -907,6 +916,7 @@ class IRelatedCompound
virtual ICompound *compound() const = 0;
virtual Protection protection() const = 0;
virtual Kind kind() const = 0;
+ virtual const IString *name() const = 0;
};
@@ -934,6 +944,7 @@ class IClass : public ICompound
virtual IParamIterator *templateParameters() const = 0;
virtual const IString *locationFile() const = 0;
virtual int locationLine() const = 0;
+ virtual const IString *locationBodyFile() const = 0;
virtual int locationBodyStartLine() const = 0;
virtual int locationBodyEndLine() const = 0;
diff --git a/addon/doxmlparser/src/memberhandler.cpp b/addon/doxmlparser/src/memberhandler.cpp
index fe0f5ac..74d1347 100644
--- a/addon/doxmlparser/src/memberhandler.cpp
+++ b/addon/doxmlparser/src/memberhandler.cpp
@@ -154,7 +154,8 @@ void EnumValueHandler::startDetailedDesc(const QXmlAttributes& attrib)
//------------------------------------------------------------------------------
MemberHandler::MemberHandler(IBaseHandler *parent)
- : m_parent(parent), m_compound(0), m_brief(0), m_detailed(0), m_inbody(0)
+ : m_brief(0), m_detailed(0), m_inbody(0),
+ m_compound(0), m_section(0), m_parent(parent)
{
//printf("MemberHandler::MemberHandler() %p\n",this);
addEndHandler("memberdef",this,&MemberHandler::endMember);
@@ -310,6 +311,7 @@ void MemberHandler::startInbodyDesc(const QXmlAttributes& attrib)
void MemberHandler::startLocation(const QXmlAttributes& attrib)
{
m_defFile = attrib.value("file");
+ m_bodyFile = attrib.value("bodyfile");
QCString s;
s = attrib.value("line");
if (!s.isEmpty()) m_defLine=s.toInt();
diff --git a/addon/doxmlparser/src/memberhandler.h b/addon/doxmlparser/src/memberhandler.h
index 750c5e3..19eacbd 100644
--- a/addon/doxmlparser/src/memberhandler.h
+++ b/addon/doxmlparser/src/memberhandler.h
@@ -61,53 +61,6 @@ class MemberReferenceIterator : public BaseIterator<IMemberReferenceIterator,IMe
BaseIterator<IMemberReferenceIterator,IMemberReference,MemberReference>(list) {}
};
-
-#if 0
-class EnumValueHandler : public IEnumValue, public BaseHandler<EnumValueHandler>
-{
- public:
- virtual void startName(const QXmlAttributes& attrib);
- virtual void endName();
- virtual void startInitializer(const QXmlAttributes& attrib);
- virtual void endInitializer();
- virtual void startEnumValue(const QXmlAttributes& attrib);
- virtual void endEnumValue();
- virtual void startBriefDesc(const QXmlAttributes& attrib);
- virtual void startDetailedDesc(const QXmlAttributes& attrib);
-
- // IEnumValue
- virtual const IString *name() const { return &m_name; }
- virtual ILinkedTextIterator *initializer() const
- { return new LinkedTextIterator(m_initializer); }
-
- void setName(const QString &name) { m_name=name; }
-
- virtual ~EnumValueHandler();
- EnumValueHandler(IBaseHandler *parent);
-
- virtual IDocRoot *briefDescription() const
- { return m_brief; }
- virtual IDocRoot *detailedDescription() const
- { return m_detailed; }
-
- private:
- StringImpl m_name;
- QList<LinkedTextImpl> m_initializer;
- IBaseHandler *m_parent;
- DocHandler *m_brief;
- DocHandler *m_detailed;
- LinkedTextHandler *m_linkedTextHandler;
-};
-
-class EnumValueIterator : public BaseIterator<IEnumValueIterator,IEnumValue,EnumValueHandler>
-{
- public:
- EnumValueIterator(const QList<EnumValueHandler> &list) :
- BaseIterator<IEnumValueIterator,IEnumValue,EnumValueHandler>(list) {}
-};
-#endif
-
-
class MemberHandler : public IDefine,
public IProperty,
public IVariable,
@@ -206,6 +159,8 @@ class MemberHandler : public IDefine,
virtual IMemberReferenceIterator *referencedBy() const;
virtual ILinkedTextIterator *initializer() const;
virtual ILinkedTextIterator *exceptions() const;
+ virtual const IString *bodyFile() const
+ { return &m_bodyFile; }
virtual int bodyStart() const
{ return m_bodyStart; }
virtual int bodyEnd() const
@@ -229,48 +184,56 @@ class MemberHandler : public IDefine,
void setSectionHandler(SectionHandler *s);
private:
- IBaseHandler *m_parent;
+ // XML elements:
+ // -----------------
+ QList<ParamHandler> m_templateParams; // templateparamlist
+ QList<LinkedTextImpl> m_type; // type
+ StringImpl m_definition; // definition
+ StringImpl m_argsstring; // argsstring
+ StringImpl m_name; // name
+ StringImpl m_read; // read
+ StringImpl m_write; // write
+ MemberReference *m_reimplements; // reimplements
+ QList<MemberReference> m_reimplementedBy; // reimplementedby
+ QList<ParamHandler> m_params; // param
+ QList<MemberHandler> m_enumValues; // enumvalue
+ QList<LinkedTextImpl> m_initializer; // initializer
+ QList<LinkedTextImpl> m_exception; // exceptions
+ DocHandler *m_brief; // briefdescription
+ DocHandler *m_detailed; // detaileddescription
+ DocHandler *m_inbody; // inbodydescription
+ // location
+ StringImpl m_defFile; // - file
+ int m_defLine; // - line
+ StringImpl m_bodyFile; // - bodyfile
+ int m_bodyStart; // - bodystart
+ int m_bodyEnd; // - bodyend
+ QList<MemberReference> m_references; // references
+ QList<MemberReference> m_referencedBy; // referencedby
+
+ // XML attributes:
+ // ---------------
+ MemberKind m_kind; // kind
+ StringImpl m_kindString; // kind as a string
+ StringImpl m_id; // id
+ StringImpl m_protection; // prot
+ bool m_isStatic; // static
+ bool m_isConst; // const
+ bool m_isExplicit; // explicit
+ bool m_isInline; // inline
+ StringImpl m_virtualness; // virt
+ bool m_isVolatile; // volatile
+ bool m_isMutable; // mutable
+ bool m_isReadable; // readable
+ bool m_isWritable; // writable
+
CompoundHandler *m_compound;
SectionHandler *m_section;
- MemberKind m_kind;
- StringImpl m_kindString;
- StringImpl m_id;
- StringImpl m_protection;
- StringImpl m_virtualness;
StringImpl m_typeString;
- QList<LinkedTextImpl> m_type;
- QList<LinkedTextImpl> m_initializer;
- QList<LinkedTextImpl> m_exception;
- StringImpl m_name;
- StringImpl m_read;
- StringImpl m_write;
- StringImpl m_definition;
- StringImpl m_argsstring;
- DocHandler *m_brief;
- DocHandler *m_detailed;
- DocHandler *m_inbody;
- QList<ParamHandler> m_params;
- QList<ParamHandler> m_templateParams;
- QList<MemberReference> m_references;
- QList<MemberReference> m_referencedBy;
- MemberReference *m_reimplements;
- QList<MemberReference> m_reimplementedBy;
- StringImpl m_defFile;
- int m_defLine;
- int m_bodyStart;
- int m_bodyEnd;
- bool m_isConst;
- bool m_isVolatile;
LinkedTextHandler *m_linkedTextHandler;
- QList<MemberHandler> m_enumValues;
bool m_insideTemplateParamList;
bool m_hasTemplateParamList;
- bool m_isStatic;
- bool m_isExplicit;
- bool m_isInline;
- bool m_isMutable;
- bool m_isReadable;
- bool m_isWritable;
+ IBaseHandler *m_parent;
};
class MemberIterator : public BaseIteratorVia<IMemberIterator,
diff --git a/addon/doxmlparser/src/paramhandler.cpp b/addon/doxmlparser/src/paramhandler.cpp
index 8281265..0084c80 100644
--- a/addon/doxmlparser/src/paramhandler.cpp
+++ b/addon/doxmlparser/src/paramhandler.cpp
@@ -50,7 +50,7 @@ void TemplateParamListHandler::endTemplateParamList()
///////////////////////////////////////////////////////////////////////////////////////////////////////
-ParamHandler::ParamHandler(IBaseHandler *parent) : m_parent(parent), m_brief(0)
+ParamHandler::ParamHandler(IBaseHandler *parent) : m_brief(0), m_parent(parent)
{
addEndHandler("param",this,&ParamHandler::endParam);
diff --git a/addon/doxmlparser/src/paramhandler.h b/addon/doxmlparser/src/paramhandler.h
index 0148714..d1194ac 100644
--- a/addon/doxmlparser/src/paramhandler.h
+++ b/addon/doxmlparser/src/paramhandler.h
@@ -56,14 +56,19 @@ class ParamHandler : public IParam, public BaseHandler<ParamHandler>
virtual IDocRoot *briefDescription() const;
private:
+
+ // XML elements:
+ // -------------
+ QList<LinkedTextImpl> m_type; // type
+ StringImpl m_declName; // declname
+ StringImpl m_defName; // defname
+ StringImpl m_array; // array
+ QList<LinkedTextImpl> m_defVal; // defval
+ DocHandler *m_brief; // briefdescription
+
+ StringImpl m_attrib; // TODO: not yet in XML output
+
IBaseHandler *m_parent;
- DocHandler *m_brief;
- QList<LinkedTextImpl> m_type;
- StringImpl m_declName;
- StringImpl m_defName;
- StringImpl m_attrib;
- StringImpl m_array;
- QList<LinkedTextImpl> m_defVal;
LinkedTextHandler *m_linkedTextHandler;
};
diff --git a/addon/doxmlparser/src/sectionhandler.cpp b/addon/doxmlparser/src/sectionhandler.cpp
index 18d6b19..973d990 100644
--- a/addon/doxmlparser/src/sectionhandler.cpp
+++ b/addon/doxmlparser/src/sectionhandler.cpp
@@ -17,6 +17,7 @@
#include "compoundhandler.h"
#include "sectionhandler.h"
#include "memberhandler.h"
+#include "dochandler.h"
#include "debug.h"
class SectionTypeMap
@@ -33,6 +34,7 @@ class SectionTypeMap
m_map.insert("signal",new int(ISection::Signals));
m_map.insert("dcop-func",new int(ISection::DCOPFuncs));
m_map.insert("property",new int(ISection::Properties));
+ m_map.insert("event",new int(ISection::Events));
m_map.insert("public-static-func",new int(ISection::PubStatFuncs));
m_map.insert("public-static-attrib",new int(ISection::PubStatAttribs));
m_map.insert("protected-type",new int(ISection::ProTypes));
@@ -95,6 +97,7 @@ SectionHandler::SectionHandler(IBaseHandler *parent) : m_parent(parent)
addStartHandler("memberdef",this,&SectionHandler::startMember);
addStartHandler("header",this,&SectionHandler::startHeader);
addEndHandler("header",this,&SectionHandler::endHeader);
+ addStartHandler("description",this,&SectionHandler::startDescription);
}
SectionHandler::~SectionHandler()
@@ -110,6 +113,13 @@ void SectionHandler::startSection(const QXmlAttributes& attrib)
debug(2,"section kind=`%s'\n",m_kindString.data());
}
+void SectionHandler::startDescription(const QXmlAttributes& attrib)
+{
+ DocHandler *docHandler = new DocHandler(this);
+ docHandler->startDoc(attrib);
+ m_description = docHandler;
+}
+
void SectionHandler::endSection()
{
m_parent->setDelegate(0);
@@ -146,6 +156,11 @@ void SectionHandler::initialize(CompoundHandler *ch)
}
}
+IDocRoot *SectionHandler::description() const
+{
+ return m_description;
+}
+
IMemberIterator *SectionHandler::members() const
{
return new MemberIterator(m_members);
diff --git a/addon/doxmlparser/src/sectionhandler.h b/addon/doxmlparser/src/sectionhandler.h
index 3be4ee8..46a072f 100644
--- a/addon/doxmlparser/src/sectionhandler.h
+++ b/addon/doxmlparser/src/sectionhandler.h
@@ -23,8 +23,6 @@
#include "basehandler.h"
-class MainHandler;
-
class SectionIterator :
public BaseIterator<ISectionIterator,ISection,SectionHandler>
{
@@ -40,6 +38,7 @@ class SectionHandler : public IUserDefined, public BaseHandler<SectionHandler>
virtual void startMember(const QXmlAttributes& attrib);
virtual void startHeader(const QXmlAttributes& attrib);
virtual void startSection(const QXmlAttributes& attrib);
+ virtual void startDescription(const QXmlAttributes& attrib);
virtual void endSection();
virtual void endHeader();
@@ -51,6 +50,7 @@ class SectionHandler : public IUserDefined, public BaseHandler<SectionHandler>
{ return &m_kindString; }
virtual SectionKind kind() const
{ return m_kind; }
+ IDocRoot *description() const;
virtual IMemberIterator *members() const;
virtual bool isStatic() const
{
@@ -83,10 +83,17 @@ class SectionHandler : public IUserDefined, public BaseHandler<SectionHandler>
private:
IBaseHandler *m_parent;
- SectionKind m_kind;
- StringImpl m_kindString;
- StringImpl m_header;
- QList<MemberHandler> m_members;
+
+ // XML elements:
+ // -------------
+ StringImpl m_header; // header
+ DocHandler* m_description; // description
+ QList<MemberHandler> m_members; // memberdef
+
+ // XML attributes:
+ // ---------------
+ SectionKind m_kind; // kind
+ StringImpl m_kindString; // kind as a string
};
void sectionhandler_init();