summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/classdef.cpp61
-rw-r--r--src/classdef.h114
-rw-r--r--src/classlist.h4
-rw-r--r--src/cmdmapper.cpp26
-rw-r--r--src/cmdmapper.h28
-rw-r--r--src/commentcnv.l5
-rw-r--r--src/commentscan.l30
-rw-r--r--src/compound.xsd2
-rw-r--r--src/compound_xsd.h2
-rw-r--r--src/config.h26
-rw-r--r--src/config.xml4
-rw-r--r--src/configoptions.cpp4
-rw-r--r--src/cppvalue.h3
-rw-r--r--src/dbusxmlscanner.cpp1
-rw-r--r--src/dbusxmlscanner.h2
-rw-r--r--src/debug.cpp2
-rw-r--r--src/debug.h1
-rw-r--r--src/define.h7
-rw-r--r--src/definition.cpp25
-rw-r--r--src/definition.h27
-rw-r--r--src/diagram.cpp102
-rw-r--r--src/diagram.h102
-rw-r--r--src/dirdef.cpp72
-rw-r--r--src/dirdef.h13
-rw-r--r--src/docparser.cpp35
-rw-r--r--src/docparser.h126
-rw-r--r--src/docsets.h3
-rw-r--r--src/doctokenizer.h1
-rw-r--r--src/doctokenizer.l2
-rw-r--r--src/dot.cpp2
-rw-r--r--src/dot.h24
-rw-r--r--src/doxygen.cpp101
-rw-r--r--src/doxygen.css27
-rw-r--r--src/doxygen.md59
-rw-r--r--src/doxygen_css.h27
-rw-r--r--src/eclipsehelp.h3
-rw-r--r--src/entry.h23
-rw-r--r--src/example.h2
-rw-r--r--src/filedef.cpp1
-rw-r--r--src/filedef.h28
-rw-r--r--src/filename.h5
-rw-r--r--src/formula.h4
-rw-r--r--src/fortrancode.l16
-rw-r--r--src/ftvhelp.cpp107
-rw-r--r--src/ftvhelp.h2
-rw-r--r--src/groupdef.h6
-rw-r--r--src/growbuf.h1
-rw-r--r--src/htags.h1
-rw-r--r--src/htmldocvisitor.cpp4
-rw-r--r--src/htmlgen.cpp20
-rw-r--r--src/htmlgen.h7
-rw-r--r--src/htmlhelp.cpp6
-rw-r--r--src/htmlhelp.h3
-rw-r--r--src/image.cpp1
-rw-r--r--src/image.h2
-rw-r--r--src/index.cpp158
-rw-r--r--src/index.h24
-rw-r--r--src/latexdocvisitor.cpp134
-rw-r--r--src/latexgen.h4
-rw-r--r--src/mangen.h4
-rw-r--r--src/markdown.cpp10
-rw-r--r--src/memberdef.cpp27
-rw-r--r--src/memberdef.h11
-rw-r--r--src/membergroup.h21
-rw-r--r--src/memberlist.cpp7
-rw-r--r--src/memberlist.h4
-rw-r--r--src/membername.h8
-rw-r--r--src/namespacedef.cpp4
-rw-r--r--src/namespacedef.h7
-rw-r--r--src/navtree.js48
-rw-r--r--src/navtree_js.h48
-rw-r--r--src/outputgen.h15
-rw-r--r--src/outputlist.cpp13
-rw-r--r--src/outputlist.h16
-rw-r--r--src/pagedef.h3
-rw-r--r--src/reflist.h6
-rw-r--r--src/rtfgen.h4
-rw-r--r--src/scanner.l78
-rw-r--r--src/searchindex.cpp5
-rw-r--r--src/section.h2
-rw-r--r--src/sortdict.h8
-rw-r--r--src/tagreader.cpp26
-rw-r--r--src/translator.h1
-rw-r--r--src/translator_adapter.h23
-rw-r--r--src/translator_id.h2
-rw-r--r--src/translator_sr.h2
-rw-r--r--src/translatordecoder.h1
-rw-r--r--src/util.cpp9
-rw-r--r--src/util.h5
-rw-r--r--src/vhdldocgen.cpp481
-rw-r--r--src/vhdldocgen.h21
-rw-r--r--src/vhdlparser.y36
-rw-r--r--src/vhdlscanner.h25
-rw-r--r--src/vhdlscanner.l127
-rw-r--r--src/xmlgen.cpp13
95 files changed, 1705 insertions, 1048 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp
index 43ffdb5..1aa20e1 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -42,12 +42,7 @@
//-----------------------------------------------------------------------------
-//static inline MemberList *createNewMemberList(MemberList::ListType lt)
-//{
-// MemberList *result = new MemberList(lt);
-// return result;
-//}
-
+/** Private data associated with a ClassDef object. */
class ClassDefImpl
{
public:
@@ -296,7 +291,7 @@ QCString ClassDef::getMemberListFileName() const
return convertNameToFile(compoundTypeString()+name()+"-members");
}
-QCString ClassDef::displayName() const
+QCString ClassDef::displayName(bool includeScope) const
{
//static bool optimizeOutputForJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
SrcLangExt lang = getLanguage();
@@ -308,7 +303,14 @@ QCString ClassDef::displayName() const
}
else
{
- n=qualifiedNameWithTemplateParameters();
+ if (includeScope)
+ {
+ n=qualifiedNameWithTemplateParameters();
+ }
+ else
+ {
+ n=className();
+ }
}
QCString sep=getLanguageSpecificSeparator(lang);
if (sep!="::")
@@ -3819,9 +3821,8 @@ int ClassDef::countInheritedDecMembersRec(MemberList::ListType lt,
MemberList *ml = icd->getMemberList((MemberList::ListType)lt1);
if (ml)
{
- //ml->countDecMembers();
- //count+=ml->numDecMembers();
- count+=ml->countInheritableMembers(inheritedFrom);
+ //count+=ml->countInheritableMembers(inheritedFrom);
+ count+=icd->countMembersIncludingGrouped((MemberList::ListType)lt1,inheritedFrom,TRUE);
count+=icd->countInheritedDecMembersRec((MemberList::ListType)lt1,inheritedFrom);
}
if (lt2!=-1)
@@ -3829,15 +3830,15 @@ int ClassDef::countInheritedDecMembersRec(MemberList::ListType lt,
ml = icd->getMemberList((MemberList::ListType)lt2);
if (ml)
{
- //ml->countDecMembers();
- //count+=ml->numDecMembers();
- count+=ml->countInheritableMembers(inheritedFrom);
+ //count+=ml->countInheritableMembers(inheritedFrom);
+ count+=icd->countMembersIncludingGrouped((MemberList::ListType)lt2,inheritedFrom,TRUE);
count+=icd->countInheritedDecMembersRec((MemberList::ListType)lt2,inheritedFrom);
}
}
ibcd=m_impl->inherits->next();
}
}
+#if 0
if (m_impl->memberGroupSDict)
{
MemberGroupSDict::Iterator mgli(*m_impl->memberGroupSDict);
@@ -3850,6 +3851,7 @@ int ClassDef::countInheritedDecMembersRec(MemberList::ListType lt,
}
}
}
+#endif
return count;
}
@@ -3859,11 +3861,11 @@ int ClassDef::countInheritedDecMembers(MemberList::ListType lt)
MemberList *ml = getMemberList(lt);
if (ml)
{
- //ml->countDecMembers();
- //count = ml->numDecMembers();
- count=ml->countInheritableMembers(this);
+ count = ml->countInheritableMembers(this);
}
if (count==0) // for this class the member list is empty
+ // see if we need to create a section for it under
+ // Additional Inherited Members
{
count = countInheritedDecMembersRec(lt,this);
}
@@ -3897,7 +3899,7 @@ int ClassDef::countAdditionalInheritedMembers()
void ClassDef::writeAdditionalInheritedMembers(OutputList &ol)
{
- //printf("writeAdditionalInheritedMembers()\n");
+ //printf("**** writeAdditionalInheritedMembers()\n");
QListIterator<LayoutDocEntry> eli(
LayoutDocManager::instance().docEntries(LayoutDocManager::Class));
LayoutDocEntry *lde;
@@ -3917,30 +3919,31 @@ void ClassDef::writeAdditionalInheritedMembers(OutputList &ol)
}
int ClassDef::countMembersIncludingGrouped(MemberList::ListType lt,
- ClassDef *inheritedFrom)
+ ClassDef *inheritedFrom,bool additional)
{
int count=0;
MemberList *ml = getMemberList(lt);
if (ml)
{
- //ml->countDecMembers();
- //count=ml->numDecMembers();
count=ml->countInheritableMembers(inheritedFrom);
}
+ //printf("%s:countMembersIncludingGrouped: count=%d\n",name().data(),count);
if (m_impl->memberGroupSDict)
{
MemberGroupSDict::Iterator mgli(*m_impl->memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
{
- if (!mg->allMembersInSameSection() || !m_impl->subGrouping) // group is in its own section
+ bool hasOwnSection = !mg->allMembersInSameSection() ||
+ !m_impl->subGrouping; // group is in its own section
+ if ((additional && hasOwnSection) || (!additional && !hasOwnSection))
{
count+=mg->countGroupedInheritedMembers(lt);
}
}
}
- //printf("%s:countMembersIncludingGrouped(%s)=%d\n",
- // name().data(),ml?ml->listTypeAsString().data():"<none>",count);
+ //printf("%s:countMembersIncludingGrouped(lt=%d,%s)=%d\n",
+ // name().data(),lt,ml?ml->listTypeAsString().data():"<none>",count);
return count;
}
@@ -3951,7 +3954,9 @@ void ClassDef::writeInheritedMemberDeclarations(OutputList &ol,
{
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
- bool process = countMembersIncludingGrouped(lt,inheritedFrom)>0;
+ bool process = countMembersIncludingGrouped(lt,inheritedFrom,FALSE)>0;
+ //printf("%s: writeInheritedMemberDec: lt=%d process=%d invert=%d\n",
+ // name().data(),lt,process,invert);
if (process^invert)
{
if (m_impl->inherits)
@@ -3964,7 +3969,10 @@ void ClassDef::writeInheritedMemberDeclarations(OutputList &ol,
int lt1,lt2;
convertProtectionLevel(lt,ibcd->prot,&lt1,&lt2);
//printf("%s:convert %d->(%d,%d)\n",icd->name().data(),lt,lt1,lt2);
- if (visitedClasses->find(icd)!=0) return;
+ if (visitedClasses->find(icd)!=0)
+ {
+ return; // already processed before (in case of multiple inheritance)
+ }
visitedClasses->insert(icd,icd);
if (lt1!=-1)
{
@@ -4024,7 +4032,6 @@ void ClassDef::addGroupedInheritedMembers(OutputList &ol,MemberList::ListType lt
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
{
- //printf(" candidate %s\n",mg->header().data());
if (!mg->allMembersInSameSection() || !m_impl->subGrouping) // group is in its own section
{
mg->addGroupedInheritedMembers(ol,this,lt,inheritedFrom,inheritId);
diff --git a/src/classdef.h b/src/classdef.h
index 246404c..e7d5fb5 100644
--- a/src/classdef.h
+++ b/src/classdef.h
@@ -48,7 +48,7 @@ class StringDict;
struct IncludeInfo;
class ClassDefImpl;
-/*! \brief This class contains all information about a compound.
+/** A model of a compound symbol.
*
* A compound can be a class, struct, union, interface, or exception.
* \note This class should be renamed to CompoundDef
@@ -56,7 +56,7 @@ class ClassDefImpl;
class ClassDef : public Definition
{
public:
- /*! The various compound types */
+ /** The various compound types */
enum CompoundType { Class, //=Entry::CLASS_SEC,
Struct, //=Entry::STRUCT_SEC,
Union, //=Entry::UNION_SEC,
@@ -66,7 +66,7 @@ class ClassDef : public Definition
Exception //=Entry::EXCEPTION_SEC
};
- /*! Creates a new compound definition.
+ /** Creates a new compound definition.
* \param fileName full path and file name in which this compound was
* found.
* \param startLine line number where the definition of this compound
@@ -88,121 +88,121 @@ class ClassDef : public Definition
const char *name,CompoundType ct,
const char *ref=0,const char *fName=0,
bool isSymbol=TRUE,bool isJavaEnum=FALSE);
- /*! Destroys a compound definition. */
+ /** Destroys a compound definition. */
~ClassDef();
//-----------------------------------------------------------------------------------
// --- getters
//-----------------------------------------------------------------------------------
- /*! Used for RTTI, this is a class */
+ /** Used for RTTI, this is a class */
DefType definitionType() const { return TypeClass; }
- /*! Returns the unique base name (without extension) of the class's file on disk */
+ /** Returns the unique base name (without extension) of the class's file on disk */
QCString getOutputFileBase() const;
QCString getInstanceOutputFileBase() const;
QCString getFileBase() const;
- /*! Returns the base name for the source code file */
+ /** Returns the base name for the source code file */
QCString getSourceFileBase() const;
- /*! If this class originated from a tagfile, this will return the tag file reference */
+ /** If this class originated from a tagfile, this will return the tag file reference */
QCString getReference() const;
- /*! Returns TRUE if this class is imported via a tag file */
+ /** Returns TRUE if this class is imported via a tag file */
bool isReference() const;
- /*! Returns TRUE if this is a local class definition, see EXTRACT_LOCAL_CLASSES */
+ /** Returns TRUE if this is a local class definition, see EXTRACT_LOCAL_CLASSES */
bool isLocal() const;
- /*! returns the classes nested into this class */
+ /** returns the classes nested into this class */
ClassSDict *getClassSDict();
- /*! returns TRUE if this class has documentation */
+ /** returns TRUE if this class has documentation */
bool hasDocumentation() const;
- /*! Returns the name as it is appears in the documentation */
- QCString displayName() const;
+ /** Returns the name as it is appears in the documentation */
+ QCString displayName(bool includeScope=TRUE) const;
- /*! Returns the type of compound this is, i.e. class/struct/union/.. */
+ /** Returns the type of compound this is, i.e. class/struct/union/.. */
CompoundType compoundType() const;
- /*! Returns the type of compound as a string */
+ /** Returns the type of compound as a string */
QCString compoundTypeString() const;
- /*! Returns the list of base classes from which this class directly
+ /** Returns the list of base classes from which this class directly
* inherits.
*/
BaseClassList *baseClasses() const;
- /*! Returns the list of sub classes that directly derive from this class
+ /** Returns the list of sub classes that directly derive from this class
*/
BaseClassList *subClasses() const;
- /*! Returns a dictionary of all members. This includes any inherited
+ /** Returns a dictionary of all members. This includes any inherited
* members. Members are sorted alphabetically.
*/
MemberNameInfoSDict *memberNameInfoSDict() const;
- /*! Return the protection level (Public,Protected,Private) in which
+ /** Return the protection level (Public,Protected,Private) in which
* this compound was found.
*/
Protection protection() const;
- /*! returns TRUE iff a link is possible to this item within this project.
+ /** returns TRUE iff a link is possible to this item within this project.
*/
bool isLinkableInProject() const;
- /*! return TRUE iff a link to this class is possible (either within
+ /** return TRUE iff a link to this class is possible (either within
* this project, or as a cross-reference to another project).
*/
bool isLinkable() const;
- /*! the class is visible in a class diagram, or class hierarchy */
+ /** the class is visible in a class diagram, or class hierarchy */
bool isVisibleInHierarchy();
- /*! Returns the template arguments of this class
+ /** Returns the template arguments of this class
* Will return 0 if not applicable.
*/
ArgumentList *templateArguments() const;
- /*! Returns the namespace this compound is in, or 0 if it has a global
+ /** Returns the namespace this compound is in, or 0 if it has a global
* scope.
*/
NamespaceDef *getNamespaceDef() const;
- /*! Returns the file in which this compound's definition can be found.
+ /** Returns the file in which this compound's definition can be found.
* Should not return 0 (but it might be a good idea to check anyway).
*/
FileDef *getFileDef() const;
- /*! Returns the Java package this class is in or 0 if not applicable.
+ /** Returns the Java package this class is in or 0 if not applicable.
*/
MemberDef *getMemberByName(const QCString &) const;
- /*! Returns TRUE iff \a bcd is a direct or indirect base class of this
+ /** Returns TRUE iff \a bcd is a direct or indirect base class of this
* class. This function will recusively traverse all branches of the
* inheritance tree.
*/
bool isBaseClass(ClassDef *bcd,bool followInstances,int level=0);
- /*! returns TRUE iff \a md is a member of this class or of the
+ /** returns TRUE iff \a md is a member of this class or of the
* the public/protected members of a base class
*/
bool isAccessibleMember(MemberDef *md);
- /*! Returns a sorted dictionary with all template instances found for
+ /** Returns a sorted dictionary with all template instances found for
* this template class. Returns 0 if not a template or no instances.
*/
QDict<ClassDef> *getTemplateInstances() const;
- /*! Returns the template master of which this class is an instance.
+ /** Returns the template master of which this class is an instance.
* Returns 0 if not applicable.
*/
ClassDef *templateMaster() const;
- /*! Returns TRUE if this class is a template */
+ /** Returns TRUE if this class is a template */
bool isTemplate() const;
IncludeInfo *includeInfo() const;
@@ -215,13 +215,13 @@ class ClassDef : public Definition
bool isTemplateArgument() const;
- /*! Returns the definition of a nested compound if
+ /** Returns the definition of a nested compound if
* available, or 0 otherwise.
* @param name The name of the nested compound
*/
virtual Definition *findInnerCompound(const char *name);
- /*! Returns the template parameter lists that form the template
+ /** Returns the template parameter lists that form the template
* declaration of this class.
*
* Example: <code>template<class T> class TC {};</code>
@@ -233,32 +233,32 @@ class ClassDef : public Definition
QCString qualifiedNameWithTemplateParameters(
QList<ArgumentList> *actualParams=0) const;
- /*! Returns TRUE if there is at least one pure virtual member in this
+ /** Returns TRUE if there is at least one pure virtual member in this
* class.
*/
bool isAbstract() const;
- /*! Returns TRUE if this class is implemented in Objective-C */
+ /** Returns TRUE if this class is implemented in Objective-C */
bool isObjectiveC() const;
- /*! Returns TRUE if this class is implemented in C# */
+ /** Returns TRUE if this class is implemented in C# */
bool isCSharp() const;
- /*! Returns the class of which this is a category (Objective-C only) */
+ /** Returns the class of which this is a category (Objective-C only) */
ClassDef *categoryOf() const;
- /*! Returns the name of the class including outer classes, but not
+ /** Returns the name of the class including outer classes, but not
* including namespaces.
*/
QCString className() const;
- /*! Returns the members in the list identified by \a lt */
+ /** Returns the members in the list identified by \a lt */
MemberList *getMemberList(MemberList::ListType lt);
- /*! Returns the list containing the list of members sorted per type */
+ /** Returns the list containing the list of members sorted per type */
const QList<MemberList> &getMemberLists() const;
- /*! Returns the member groups defined for this class */
+ /** Returns the member groups defined for this class */
MemberGroupSDict *getMemberGroupSDict() const;
QDict<int> *getTemplateBaseClassNames() const;
@@ -342,6 +342,7 @@ class ClassDef : public Definition
void removeMemberFromLists(MemberDef *md);
void addGroupedInheritedMembers(OutputList &ol,MemberList::ListType lt,
ClassDef *inheritedFrom,const QCString &inheritId);
+ int countMembersIncludingGrouped(MemberList::ListType lt,ClassDef *inheritedFrom,bool additional);
bool visited;
@@ -386,13 +387,12 @@ class ClassDef : public Definition
int countInheritedDecMembers(MemberList::ListType lt);
int countAdditionalInheritedMembers();
void writeAdditionalInheritedMembers(OutputList &ol);
- int countMembersIncludingGrouped(MemberList::ListType lt,ClassDef *inheritedFrom);
ClassDefImpl *m_impl;
};
-/*! \brief Class that contains information about a usage relation.
+/** Class that contains information about a usage relation.
*/
struct UsesClassDef
{
@@ -412,21 +412,21 @@ struct UsesClassDef
accessors->insert(s,(void *)666);
}
}
- /*! Class definition that this relation uses. */
+ /** Class definition that this relation uses. */
ClassDef *classDef;
- /*! Dictionary of member variable names that form the edge labels of the
+ /** Dictionary of member variable names that form the edge labels of the
* usage relation.
*/
QDict<void> *accessors;
- /*! Template arguments used for the base class */
+ /** Template arguments used for the base class */
QCString templSpecifiers;
bool containment;
};
-/*! \brief Dictionary of usage relations.
+/** Dictionary of usage relations.
*/
class UsesClassDict : public QDict<UsesClassDef>
{
@@ -435,7 +435,7 @@ class UsesClassDict : public QDict<UsesClassDef>
~UsesClassDict() {}
};
-/*! \brief Iterator class to iterate over a dictionary of usage relations.
+/** Iterator class to iterate over a dictionary of usage relations.
*/
class UsesClassDictIterator : public QDictIterator<UsesClassDef>
{
@@ -445,7 +445,7 @@ class UsesClassDictIterator : public QDictIterator<UsesClassDef>
~UsesClassDictIterator() {}
};
-/*! \brief Class that contains information about an inheritance relation.
+/** Class that contains information about an inheritance relation.
*/
struct BaseClassDef
{
@@ -453,29 +453,29 @@ struct BaseClassDef
Specifier v,const char *t) :
classDef(cd), usedName(n), prot(p), virt(v), templSpecifiers(t) {}
- /*! Class definition that this relation inherits from. */
+ /** Class definition that this relation inherits from. */
ClassDef *classDef;
- /*! name used in the inheritance list
+ /** name used in the inheritance list
* (may be a typedef name instead of the class name)
*/
QCString usedName;
- /*! Protection level of the inheritance relation:
+ /** Protection level of the inheritance relation:
* Public, Protected, or Private
*/
Protection prot;
- /*! Virtualness of the inheritance relation:
+ /** Virtualness of the inheritance relation:
* Normal, or Virtual
*/
Specifier virt;
- /*! Template arguments used for the base class */
+ /** Template arguments used for the base class */
QCString templSpecifiers;
};
-/*! \brief list of base classes
+/** List of base classes.
*
* The classes are alphabetically sorted on name if inSort() is used.
*/
@@ -494,7 +494,7 @@ class BaseClassList : public QList<BaseClassDef>
}
};
-/*! \brief Iterator for a list of base classes
+/** Iterator for a list of base classes.
*/
class BaseClassListIterator : public QListIterator<BaseClassDef>
{
diff --git a/src/classlist.h b/src/classlist.h
index 9b76c39..71a62b6 100644
--- a/src/classlist.h
+++ b/src/classlist.h
@@ -26,6 +26,7 @@
class Definition;
+/** A list of ClassDef objects. */
class ClassList : public QList<ClassDef>
{
public:
@@ -35,12 +36,14 @@ class ClassList : public QList<ClassDef>
int compareItems(GCI item1,GCI item2);
};
+/** An iterator for ClassDef objects in a ClassList. */
class ClassListIterator : public QListIterator<ClassDef>
{
public:
ClassListIterator(const ClassList &list);
};
+/** An unsorted dictionary of ClassDef objects. */
class ClassDict : public QDict<ClassDef>
{
public:
@@ -48,6 +51,7 @@ class ClassDict : public QDict<ClassDef>
~ClassDict() {}
};
+/** A sorted dictionary of ClassDef objects. */
class ClassSDict : public SDict<ClassDef>
{
public:
diff --git a/src/cmdmapper.cpp b/src/cmdmapper.cpp
index c4379e3..9a723c2 100644
--- a/src/cmdmapper.cpp
+++ b/src/cmdmapper.cpp
@@ -18,6 +18,13 @@
#include "cmdmapper.h"
+/** Call representing a mapping from a command name to a command ID. */
+struct CommandMap
+{
+ const char *cmdName;
+ int cmdId;
+};
+
CommandMap cmdMap[] =
{
{ "a", CMD_EMPHASIS },
@@ -198,6 +205,25 @@ CommandMap htmlTagMap[] =
Mapper *Mappers::cmdMapper = new Mapper(cmdMap,TRUE);
Mapper *Mappers::htmlTagMapper = new Mapper(htmlTagMap,FALSE);
+int Mapper::map(const char *n)
+{
+ QCString name=n;
+ if (!m_cs) name=name.lower();
+ int *result;
+ return !name.isEmpty() && (result=m_map.find(name)) ? *result: 0;
+}
+
+Mapper::Mapper(const CommandMap *cm,bool caseSensitive) : m_map(89), m_cs(caseSensitive)
+{
+ m_map.setAutoDelete(TRUE);
+ const CommandMap *p = cm;
+ while (p->cmdName)
+ {
+ m_map.insert(p->cmdName,new int(p->cmdId));
+ p++;
+ }
+}
+
void Mappers::freeMappers()
{
delete cmdMapper; cmdMapper = 0;
diff --git a/src/cmdmapper.h b/src/cmdmapper.h
index deb5f50..c53e2b1 100644
--- a/src/cmdmapper.h
+++ b/src/cmdmapper.h
@@ -21,11 +21,7 @@
#include <qdict.h>
-struct CommandMap
-{
- const char *cmdName;
- int cmdId;
-};
+struct CommandMap;
const int SIMPLESECT_BIT = 0x1000;
@@ -187,32 +183,18 @@ enum HtmlTagType
XML_INHERITDOC = XML_CmdMask + 22
};
+/** Class representing a mapping from command names to command IDs. */
class Mapper
{
public:
- int map(const char *n)
- {
- QCString name=n;
- if (!m_cs) name=name.lower();
- int *result;
- return !name.isEmpty() && (result=m_map.find(name)) ? *result: 0;
- }
-
- Mapper(const CommandMap *cm,bool caseSensitive) : m_map(89), m_cs(caseSensitive)
- {
- m_map.setAutoDelete(TRUE);
- const CommandMap *p = cm;
- while (p->cmdName)
- {
- m_map.insert(p->cmdName,new int(p->cmdId));
- p++;
- }
- }
+ int map(const char *n);
+ Mapper(const CommandMap *cm,bool caseSensitive);
private:
QDict<int> m_map;
bool m_cs;
};
+/** Class representing a namespace for the doxygen and HTML command mappers. */
struct Mappers
{
static void freeMappers();
diff --git a/src/commentcnv.l b/src/commentcnv.l
index f986531..689c274 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -107,12 +107,13 @@ static void replaceCommentMarker(const char *s,int len)
}
if (blanks>0)
{
- while (blanks>1)
+ while (blanks>2)
{
ADDCHAR(' ');
blanks--;
}
- ADDCHAR('*');
+ if (blanks>1) ADDCHAR('*');
+ ADDCHAR(' ');
}
// copy comment line to output
ADDARRAY(p,len-(p-s));
diff --git a/src/commentscan.l b/src/commentscan.l
index c7e36a5..26c381f 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -957,11 +957,18 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
}
<Comment>"<summary>" { // start of a .NET XML style brief description
setOutput(OutputBrief);
+ addOutput(yytext);
+ }
+<Comment>"<remarks>" { // start of a .NET XML style detailed description
+ setOutput(OutputDoc);
+ addOutput(yytext);
}
-<Comment>"<remarks>"|"</summary>" { // start of a .NET XML style detailed description
+<Comment>"</summary>" { // start of a .NET XML style detailed description
+ addOutput(yytext);
setOutput(OutputDoc);
}
<Comment>"</remarks>" { // end of a brief or detailed description
+ addOutput(yytext);
}
<Comment>{RCSTAG} { // RCS tag which end a brief description
setOutput(OutputDoc);
@@ -988,6 +995,9 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
// this command forces the end of brief description
setOutput(OutputDoc);
}
+ int i=0;
+ while (yytext[i]==' ' || yytext[i]=='\t') i++;
+ if (i>0) addOutput(QCString(yytext).left(i));
if (cmdPtr->func && cmdPtr->func(cmdName))
{
// implicit split of the comment block into two
@@ -1010,7 +1020,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
{
// command without handler, to be processed
// later by parsedoc.cpp
- addOutput(yytext);
+ addOutput(yytext+i);
}
}
else // command not relevant
@@ -1315,7 +1325,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
<ClassDocArg2>. { // ignore other stuff
}
-<ClassDocArg3>[<]?{FILE}?[>]? { // third argument; include file name
+<ClassDocArg3>[<"]?{FILE}?[">]? { // third argument; include file name
current->includeName = yytext;
BEGIN( Comment );
}
@@ -2331,7 +2341,7 @@ static bool handleMemberOf(const QCString &)
static bool handleRefItem(const QCString &)
{
- addOutput(" @refitem ");
+ addOutput("@refitem ");
BEGIN(LineParam);
return FALSE;
}
@@ -2339,7 +2349,7 @@ static bool handleRefItem(const QCString &)
static bool handleSection(const QCString &s)
{
setOutput(OutputDoc);
- addOutput(" @"+s+" ");
+ addOutput("@"+s+" ");
BEGIN(SectionLabel);
if (s=="section") g_sectionLevel=1;
else if (s=="subsection") g_sectionLevel=2;
@@ -2358,28 +2368,28 @@ static bool handleSubpage(const QCString &s)
warn(yyFileName,yyLineNr,
"warning: found \\subpage command in a comment block that is not marked as a page!");
}
- addOutput(" @"+s+" ");
+ addOutput("@"+s+" ");
BEGIN(SubpageLabel);
return FALSE;
}
static bool handleAnchor(const QCString &s)
{
- addOutput(" @"+s+" ");
+ addOutput("@"+s+" ");
BEGIN(AnchorLabel);
return FALSE;
}
static bool handleCite(const QCString &s)
{
- addOutput(" @"+s+" ");
+ addOutput("@"+s+" ");
BEGIN(CiteLabel);
return FALSE;
}
static bool handleFormatBlock(const QCString &s)
{
- addOutput(" @"+s+" ");
+ addOutput("@"+s+" ");
//printf("handleFormatBlock(%s)\n",s.data());
blockName=s;
g_commentCount=0;
@@ -2389,7 +2399,7 @@ static bool handleFormatBlock(const QCString &s)
static bool handleAddIndex(const QCString &)
{
- addOutput(" @addindex ");
+ addOutput("@addindex ");
BEGIN(LineParam);
return FALSE;
}
diff --git a/src/compound.xsd b/src/compound.xsd
index 406f6f5..4007382 100644
--- a/src/compound.xsd
+++ b/src/compound.xsd
@@ -825,6 +825,8 @@
<xsd:enumeration value="retain"/>
<xsd:enumeration value="copy"/>
<xsd:enumeration value="assign"/>
+ <xsd:enumeration value="weak"/>
+ <xsd:enumeration value="strong"/>
</xsd:restriction>
</xsd:simpleType>
diff --git a/src/compound_xsd.h b/src/compound_xsd.h
index 5e04417..eb4d978 100644
--- a/src/compound_xsd.h
+++ b/src/compound_xsd.h
@@ -825,6 +825,8 @@
" <xsd:enumeration value=\"retain\"/>\n"
" <xsd:enumeration value=\"copy\"/>\n"
" <xsd:enumeration value=\"assign\"/>\n"
+" <xsd:enumeration value=\"weak\"/>\n"
+" <xsd:enumeration value=\"strong\"/>\n"
" </xsd:restriction>\n"
" </xsd:simpleType>\n"
"\n"
diff --git a/src/config.h b/src/config.h
index ccbf713..d18e87d 100644
--- a/src/config.h
+++ b/src/config.h
@@ -27,8 +27,7 @@
#include "ftextstream.h"
-/*! \brief Abstract base class for any configuration option.
- *
+/** Abstract base class for any configuration option.
*/
class ConfigOption
{
@@ -92,8 +91,7 @@ class ConfigOption
OptionType m_kind;
};
-/*! \brief Section marker for grouping the configuration options
- *
+/** Section marker for grouping the configuration options.
*/
class ConfigInfo : public ConfigOption
{
@@ -117,8 +115,7 @@ class ConfigInfo : public ConfigOption
void substEnvVars() {}
};
-/*! \brief Option of the list type.
- *
+/** Class respresenting a list type option.
*/
class ConfigList : public ConfigOption
{
@@ -155,8 +152,7 @@ class ConfigList : public ConfigOption
WidgetType m_widgetType;
};
-/*! \brief Option of the enum type.
- *
+/** Class representing an enum type option.
*/
class ConfigEnum : public ConfigOption
{
@@ -197,8 +193,7 @@ class ConfigEnum : public ConfigOption
QCString m_defValue;
};
-/*! \brief Option of the string type.
- *
+/** Class representing a string type option.
*/
class ConfigString : public ConfigOption
{
@@ -240,8 +235,7 @@ class ConfigString : public ConfigOption
WidgetType m_widgetType;
};
-/*! \brief Option of the integer type.
- *
+/** Class representing an integer type option.
*/
class ConfigInt : public ConfigOption
{
@@ -291,8 +285,7 @@ class ConfigInt : public ConfigOption
QCString m_valueString;
};
-/*! \brief Option of the boolean type.
- *
+/** Class representing a Boolean type option.
*/
class ConfigBool : public ConfigOption
{
@@ -337,8 +330,7 @@ class ConfigBool : public ConfigOption
QCString m_valueString;
};
-/*! \brief Section marker for obsolete options
- *
+/** Section marker for obsolete options
*/
class ConfigObsolete : public ConfigOption
{
@@ -358,7 +350,7 @@ class ConfigObsolete : public ConfigOption
#define Config_getEnum(val) Config::instance()->getEnum(__FILE__,__LINE__,val)
#define Config_getBool(val) Config::instance()->getBool(__FILE__,__LINE__,val)
-/*! \brief Singleton for configuration variables.
+/** Singleton for configuration variables.
*
* This object holds the global static variables
* read from a user-supplied configuration file.
diff --git a/src/config.xml b/src/config.xml
index e455ffd..b59b213 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -541,7 +541,7 @@ is used as the file version. See the manual for examples.
<option type='string' id='LAYOUT_FILE' format='file' docs='
The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
by doxygen. The layout file controls the global structure of the generated
-output files in an output format independent way. The create the layout file
+output files in an output format independent way. To create the layout file
that represents doxygen&apos;s defaults, run doxygen with the -l option.
You can optionally specify a file name after the option, if omitted
DoxygenLayout.xml will be used as the name of the layout file.
@@ -763,7 +763,7 @@ of functions and classes directly in the documentation.
<option type='bool' id='STRIP_CODE_COMMENTS' docs='
Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
doxygen to hide any special comment blocks from generated source code
-fragments. Normal C and C++ comments will always remain visible.
+fragments. Normal C, C++ and Fortran comments will always remain visible.
' defval='1'/>
<option type='bool' id='REFERENCED_BY_RELATION' docs='
If the REFERENCED_BY_RELATION tag is set to YES
diff --git a/src/configoptions.cpp b/src/configoptions.cpp
index 9ae97af..462de19 100644
--- a/src/configoptions.cpp
+++ b/src/configoptions.cpp
@@ -778,7 +778,7 @@ void addConfigOptions(Config *cfg)
"LAYOUT_FILE",
"The LAYOUT_FILE tag can be used to specify a layout file which will be parsed\n"
"by doxygen. The layout file controls the global structure of the generated\n"
- "output files in an output format independent way. The create the layout file\n"
+ "output files in an output format independent way. To create the layout file\n"
"that represents doxygen's defaults, run doxygen with the -l option.\n"
"You can optionally specify a file name after the option, if omitted\n"
"DoxygenLayout.xml will be used as the name of the layout file."
@@ -1076,7 +1076,7 @@ void addConfigOptions(Config *cfg)
"STRIP_CODE_COMMENTS",
"Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct\n"
"doxygen to hide any special comment blocks from generated source code\n"
- "fragments. Normal C and C++ comments will always remain visible.",
+ "fragments. Normal C, C++ and Fortran comments will always remain visible.",
TRUE
);
//----
diff --git a/src/cppvalue.h b/src/cppvalue.h
index d3e2a1d..7289ce0 100644
--- a/src/cppvalue.h
+++ b/src/cppvalue.h
@@ -22,11 +22,10 @@
#include <stdio.h>
#include <qglobal.h>
+/** A class representing a C-preprocessor value. */
class CPPValue
{
public:
-
-
enum Type { Int, Float };
CPPValue(long val=0) : type(Int) { v.l = val; }
diff --git a/src/dbusxmlscanner.cpp b/src/dbusxmlscanner.cpp
index f116d5e..ddfe9ac 100644
--- a/src/dbusxmlscanner.cpp
+++ b/src/dbusxmlscanner.cpp
@@ -64,6 +64,7 @@
const QString EXTENSION_URI("http://psiamp.org/dtd/doxygen_dbusxml.dtd");
+/** DBus implementation of the generic QXmlDefaultHandler. */
class DBusXMLHandler : public QXmlDefaultHandler
{
public:
diff --git a/src/dbusxmlscanner.h b/src/dbusxmlscanner.h
index fd48cbc..545071c 100644
--- a/src/dbusxmlscanner.h
+++ b/src/dbusxmlscanner.h
@@ -20,7 +20,7 @@
#include "parserintf.h"
-/** \brief D-Bus XML parser.
+/** D-Bus XML parser.
*
* This is the D-Bus XML parser for doxygen.
*/
diff --git a/src/debug.cpp b/src/debug.cpp
index 1c3c1c1..8757be2 100644
--- a/src/debug.cpp
+++ b/src/debug.cpp
@@ -25,6 +25,7 @@
//------------------------------------------------------------------------
+/** Helper struct representing a mapping from debug label to a debug ID */
struct LabelMap
{
const char *name;
@@ -49,6 +50,7 @@ static LabelMap s_labels[] =
{ 0, (Debug::DebugMask)0 }
};
+/** Class representing a mapping from debug labels to debug IDs. */
class LabelMapper
{
public:
diff --git a/src/debug.h b/src/debug.h
index f624628..c3d78de 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -19,6 +19,7 @@
#ifndef _DEBUG_H
#define _DEBUG_H
+/** Class containing a print function for diagnostics. */
class Debug
{
public:
diff --git a/src/define.h b/src/define.h
index b5e4f6e..6579403 100644
--- a/src/define.h
+++ b/src/define.h
@@ -24,6 +24,7 @@
class FileDef;
+/** A class representing a macro definition. */
class Define
{
public:
@@ -47,6 +48,7 @@ class Define
bool nonRecursive;
};
+/** A list of Define objects. */
class DefineList : public QList<Define>
{
public:
@@ -58,6 +60,7 @@ class DefineList : public QList<Define>
}
};
+/** A list of Define objects associated with a specific name. */
class DefineName : public QList<Define>
{
public:
@@ -73,6 +76,7 @@ class DefineName : public QList<Define>
QCString name;
};
+/** A list of DefineName objects. */
class DefineNameList : public QList<DefineName>
{
public:
@@ -85,7 +89,10 @@ class DefineNameList : public QList<DefineName>
}
};
+/** An unsorted dictionary of Define objects. */
typedef QDict<Define> DefineDict;
+
+/** A sorted dictionary of DefineName object. */
typedef QDict<DefineName> DefineNameDict;
#endif
diff --git a/src/definition.cpp b/src/definition.cpp
index e1f7d60..1631c16 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -44,6 +44,8 @@
//-----------------------------------------------------------------------------------------
+
+/** Private data associated with a Definition object. */
class DefinitionImpl
{
public:
@@ -669,6 +671,7 @@ static bool readCodeFragment(const char *fileName,
int &startLine,int &endLine,QCString &result)
{
static bool filterSourceFiles = Config_getBool("FILTER_SOURCE_FILES");
+ static int tabSize = Config_getInt("TAB_SIZE");
//printf("readCodeFragment(%s,%d,%d)\n",fileName,startLine,endLine);
if (fileName==0 || fileName[0]==0) return FALSE; // not a valid file name
QCString filter = getFileFilter(fileName,TRUE);
@@ -717,7 +720,7 @@ static bool readCodeFragment(const char *fileName,
}
else if (c=='\t')
{
- col+=Config_getInt("TAB_SIZE") - (col%Config_getInt("TAB_SIZE"));
+ col+=tabSize - (col%tabSize);
}
else if (pc=='/' && c=='/') // skip single line comment
{
@@ -1448,12 +1451,12 @@ QCString Definition::navigationPathAsString() const
{
if (definitionType()==Definition::TypeGroup && ((const GroupDef*)this)->groupTitle())
{
- result+="<a class=\"el\" href=\""+getOutputFileBase()+Doxygen::htmlFileExtension+"\">"+
+ result+="<a class=\"el\" href=\"$relpath$"+getOutputFileBase()+Doxygen::htmlFileExtension+"\">"+
((const GroupDef*)this)->groupTitle()+"</a>";
}
else if (definitionType()==Definition::TypePage && !((const PageDef*)this)->title().isEmpty())
{
- result+="<a class=\"el\" href=\""+getOutputFileBase()+Doxygen::htmlFileExtension+"\">"+
+ result+="<a class=\"el\" href=\"$relpath$"+getOutputFileBase()+Doxygen::htmlFileExtension+"\">"+
((const PageDef*)this)->title()+"</a>";
}
else if (definitionType()==Definition::TypeClass)
@@ -1463,13 +1466,13 @@ QCString Definition::navigationPathAsString() const
{
name = name.left(name.length()-2);
}
- result+="<a class=\"el\" href=\""+getOutputFileBase()+Doxygen::htmlFileExtension;
+ result+="<a class=\"el\" href=\"$relpath$"+getOutputFileBase()+Doxygen::htmlFileExtension;
if (!anchor().isEmpty()) result+="#"+anchor();
result+="\">"+name+"</a>";
}
else
{
- result+="<a class=\"el\" href=\""+getOutputFileBase()+Doxygen::htmlFileExtension+"\">"+
+ result+="<a class=\"el\" href=\"$relpath$"+getOutputFileBase()+Doxygen::htmlFileExtension+"\">"+
m_impl->localName+"</a>";
}
}
@@ -1486,11 +1489,13 @@ void Definition::writeNavigationPath(OutputList &ol) const
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
- ol.writeString("<div id=\"nav-path\" class=\"navpath\">\n");
- ol.writeString(" <ul>\n");
- ol.writeString(navigationPathAsString());
- ol.writeString(" </ul>\n");
- ol.writeString("</div>\n");
+ QCString navPath;
+ navPath += "<div id=\"nav-path\" class=\"navpath\">\n"
+ " <ul>\n";
+ navPath += navigationPathAsString();
+ navPath += " </ul>\n"
+ "</div>\n";
+ ol.writeNavigationPath(navPath);
ol.popGeneratorState();
}
diff --git a/src/definition.h b/src/definition.h
index 116208c..33a5bbb 100644
--- a/src/definition.h
+++ b/src/definition.h
@@ -38,15 +38,7 @@ struct SectionInfo;
class Definition;
class DefinitionImpl;
-#if 0
-struct ReachableDefinition
-{
- ReachableDefinition(Definition *d,int dist) : def(d), distance(dist) {}
- Definition *def;
- int distance;
-};
-#endif
-
+/** Data associated with a detailed description. */
struct DocInfo
{
QCString doc;
@@ -54,6 +46,7 @@ struct DocInfo
QCString file;
};
+/** Data associated with a brief description. */
struct BriefInfo
{
QCString doc;
@@ -62,14 +55,15 @@ struct BriefInfo
QCString file;
};
+/** Data associated with description found in the body. */
struct BodyInfo
{
- int startLine; // line number of the start of the definition
- int endLine; // line number of the end of the definition
- FileDef *fileDef; // file definition containing the function body
+ int startLine; //!< line number of the start of the definition
+ int endLine; //!< line number of the end of the definition
+ FileDef *fileDef; //!< file definition containing the function body
};
-/*! Abstract interface for a Definition or DefinitionList */
+/** Abstract interface for a Definition or DefinitionList */
class DefinitionIntf
{
public:
@@ -92,7 +86,8 @@ class DefinitionIntf
virtual DefType definitionType() const = 0;
};
-/*! The common base class of all entity definitions found in the sources.
+/** The common base class of all entity definitions found in the sources.
+ *
* This can be a class or a member function, or a file, or a namespace, etc.
* Use definitionType() to find which type of definition this is.
*/
@@ -117,7 +112,7 @@ class Definition : public DefinitionIntf, public LockableObj
const QCString& name() const { return m_name; }
/*! Returns the name of the definition as it appears in the output */
- virtual QCString displayName() const = 0;
+ virtual QCString displayName(bool includeScope=TRUE) const = 0;
/*! Returns the local name without any scope qualifiers. */
QCString localName() const;
@@ -362,6 +357,7 @@ class Definition : public DefinitionIntf, public LockableObj
int m_defLine;
};
+/** A list of Definition objects. */
class DefinitionList : public QList<Definition>, public DefinitionIntf
{
public:
@@ -376,6 +372,7 @@ class DefinitionList : public QList<Definition>, public DefinitionIntf
};
+/** An iterator for Definition objects in a DefinitionList. */
class DefinitionListIterator : public QListIterator<Definition>
{
public:
diff --git a/src/diagram.cpp b/src/diagram.cpp
index 07fb4aa..fe6f1f5 100644
--- a/src/diagram.cpp
+++ b/src/diagram.cpp
@@ -36,6 +36,108 @@
//-----------------------------------------------------------------------------
+class DiagramItemList;
+
+/** Class representing a single node in the built-in class diagram */
+class DiagramItem
+{
+ public:
+ DiagramItem(DiagramItem *p,int number,ClassDef *cd,
+ Protection prot,Specifier virt,const char *ts);
+ ~DiagramItem();
+ QCString label() const;
+ QCString fileName() const;
+ DiagramItem *parentItem() { return parent; }
+ DiagramItemList *getChildren() { return children; }
+ void move(int dx,int dy) { x+=dx; y+=dy; }
+ int xPos() const { return x; }
+ int yPos() const { return y; }
+ int avgChildPos() const;
+ int numChildren() const;
+ void addChild(DiagramItem *di);
+ int number() const { return num; }
+ Protection protection() const { return prot; }
+ Specifier virtualness() const { return virt; }
+ void putInList() { inList=TRUE; }
+ bool isInList() const { return inList; }
+ ClassDef *getClassDef() const { return classDef; }
+ private:
+ DiagramItemList *children;
+ DiagramItem *parent;
+ int x,y;
+ int num;
+ Protection prot;
+ Specifier virt;
+ QCString templSpec;
+ bool inList;
+ ClassDef *classDef;
+};
+
+/** Class representing a list of DiagramItem object. */
+class DiagramItemList : public QList<DiagramItem>
+{
+ public:
+ DiagramItemList() : QList<DiagramItem>() {}
+ ~DiagramItemList() {}
+};
+
+/** Class representing a row in the built-in class diagram */
+class DiagramRow : public QList<DiagramItem>
+{
+ public:
+ DiagramRow(TreeDiagram *d,int l) : QList<DiagramItem>()
+ {
+ diagram=d;
+ level=l;
+ setAutoDelete(TRUE);
+ }
+ void insertClass(DiagramItem *parent,ClassDef *cd,bool doBases,
+ Protection prot,Specifier virt,const char *ts);
+ uint number() { return level; }
+ private:
+ TreeDiagram *diagram;
+ uint level;
+};
+
+/** Class representing iterator for the rows in the built-in class diagram. */
+class DiagramRowIterator : public QListIterator<DiagramRow>
+{
+ public:
+ DiagramRowIterator(const QList<DiagramRow> &d)
+ : QListIterator<DiagramRow>(d) {}
+};
+
+/** Class represeting the tree layout for the built-in class diagram. */
+class TreeDiagram : public QList<DiagramRow>
+{
+ public:
+ TreeDiagram(ClassDef *root,bool doBases);
+ ~TreeDiagram();
+ void computeLayout();
+ uint computeRows();
+ //uint computeCols();
+ void moveChildren(DiagramItem *root,int dx);
+ void computeExtremes(uint *labelWidth,uint *xpos);
+ void drawBoxes(FTextStream &t,Image *image,
+ bool doBase,bool bitmap,
+ uint baseRows,uint superRows,
+ uint cellWidth,uint cellHeight,
+ QCString relPath="",
+ bool generateMap=TRUE);
+ void drawConnectors(FTextStream &t,Image *image,
+ bool doBase,bool bitmap,
+ uint baseRows,uint superRows,
+ uint cellWidth,uint cellheight);
+ private:
+ bool layoutTree(DiagramItem *root,int row);
+ TreeDiagram &operator=(const TreeDiagram &);
+ TreeDiagram(const TreeDiagram &);
+};
+
+
+
+//-----------------------------------------------------------------------------
+
const uint maxTreeWidth = 8;
const int gridWidth = 100;
const int gridHeight = 100;
diff --git a/src/diagram.h b/src/diagram.h
index 3e2cac2..e26f16c 100644
--- a/src/diagram.h
+++ b/src/diagram.h
@@ -16,108 +16,17 @@
*
*/
+#ifndef DIAGRAM_H
+#define DIAGRAM_H
+
#include "qtbc.h"
#include "types.h"
class ClassDef;
-class DiagramRow;
class TreeDiagram;
-class ClassDiagram;
-class DiagramItemList;
-class Image;
class FTextStream;
-class DiagramItem
-{
- public:
- DiagramItem(DiagramItem *p,int number,ClassDef *cd,
- Protection prot,Specifier virt,const char *ts);
- ~DiagramItem();
- QCString label() const;
- QCString fileName() const;
- DiagramItem *parentItem() { return parent; }
- DiagramItemList *getChildren() { return children; }
- void move(int dx,int dy) { x+=dx; y+=dy; }
- int xPos() const { return x; }
- int yPos() const { return y; }
- int avgChildPos() const;
- int numChildren() const;
- void addChild(DiagramItem *di);
- int number() const { return num; }
- Protection protection() const { return prot; }
- Specifier virtualness() const { return virt; }
- void putInList() { inList=TRUE; }
- bool isInList() const { return inList; }
- ClassDef *getClassDef() const { return classDef; }
- private:
- DiagramItemList *children;
- DiagramItem *parent;
- int x,y;
- int num;
- Protection prot;
- Specifier virt;
- QCString templSpec;
- bool inList;
- ClassDef *classDef;
-};
-
-class DiagramItemList : public QList<DiagramItem>
-{
- public:
- DiagramItemList() : QList<DiagramItem>() {}
- ~DiagramItemList() {}
-};
-
-class DiagramRow : public QList<DiagramItem>
-{
- public:
- DiagramRow(TreeDiagram *d,int l) : QList<DiagramItem>()
- {
- diagram=d;
- level=l;
- setAutoDelete(TRUE);
- }
- void insertClass(DiagramItem *parent,ClassDef *cd,bool doBases,
- Protection prot,Specifier virt,const char *ts);
- uint number() { return level; }
- private:
- TreeDiagram *diagram;
- uint level;
-};
-
-class DiagramRowIterator : public QListIterator<DiagramRow>
-{
- public:
- DiagramRowIterator(const QList<DiagramRow> &d)
- : QListIterator<DiagramRow>(d) {}
-};
-
-class TreeDiagram : public QList<DiagramRow>
-{
- public:
- TreeDiagram(ClassDef *root,bool doBases);
- ~TreeDiagram();
- void computeLayout();
- uint computeRows();
- //uint computeCols();
- void moveChildren(DiagramItem *root,int dx);
- void computeExtremes(uint *labelWidth,uint *xpos);
- void drawBoxes(FTextStream &t,Image *image,
- bool doBase,bool bitmap,
- uint baseRows,uint superRows,
- uint cellWidth,uint cellHeight,
- QCString relPath="",
- bool generateMap=TRUE);
- void drawConnectors(FTextStream &t,Image *image,
- bool doBase,bool bitmap,
- uint baseRows,uint superRows,
- uint cellWidth,uint cellheight);
- private:
- bool layoutTree(DiagramItem *root,int row);
- TreeDiagram &operator=(const TreeDiagram &);
- TreeDiagram(const TreeDiagram &);
-};
-
+/** Class representing a built-in class diagram. */
class ClassDiagram
{
public:
@@ -131,3 +40,6 @@ class ClassDiagram
TreeDiagram *base;
TreeDiagram *super;
};
+
+#endif
+
diff --git a/src/dirdef.cpp b/src/dirdef.cpp
index 4ee4a9a..1114bb8 100644
--- a/src/dirdef.cpp
+++ b/src/dirdef.cpp
@@ -887,79 +887,7 @@ void computeDirDependencies()
dir->computeDependencies();
}
-#if 0
- printf("-------------------------------------------------------------\n");
- // print dependencies (for debugging)
- for (sdi.toFirst();(dir=sdi.current());++sdi)
- {
- if (dir->usedDirs())
- {
- QDictIterator<UsedDir> udi(*dir->usedDirs());
- UsedDir *usedDir;
- for (udi.toFirst();(usedDir=udi.current());++udi)
- {
- printf("%s depends on %s due to ",
- dir->shortName().data(),usedDir->dir()->shortName().data());
- QDictIterator<FileDef> fdi(usedDir->files());
- FileDef *fd;
- for (fdi.toFirst();(fd=fdi.current());++fdi)
- {
- printf("%s ",fd->name().data());
- }
- printf("\n");
- }
- }
- }
- printf("^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^\n");
-#endif
-}
-
-#if 0
-void writeDirDependencyGraph(const char *dirName)
-{
- QString path;
- DirDef *dir;
- DirSDict::Iterator sdi(*Doxygen::directories);
- QFile htmlPage(QCString(dirName)+"/dirdeps.html");
- if (htmlPage.open(IO_WriteOnly))
- {
- QTextStream out(&htmlPage);
- out << "<html><body>";
- for (sdi.toFirst();(dir=sdi.current());++sdi)
- {
- path=dirName;
- path+="/";
- path+=dir->getOutputFileBase();
- path+="_dep.dot";
- out << "<h4>" << dir->displayName() << "</h4>" << endl;
- out << "<img src=\"" << dir->getOutputFileBase() << "_dep.gif\">" << endl;
- QFile f(path);
- if (f.open(IO_WriteOnly))
- {
- QTextStream t(&f);
- dir->writeDepGraph(t);
- }
- f.close();
-
- QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT");
- QCString outFile = QCString(dirName)+"/"+
- dir->getOutputFileBase()+"_dep."+imgExt;
- DotRunner dotRun(path);
- dotRun.addJob(imgExt,outFile);
- dotRun.run();
-
- //QCString dotArgs(4096);
- //dotArgs.sprintf("%s -Tgif -o %s",path.data(),outFile.data());
- //if (portable_system(Config_getString("DOT_PATH")+"dot",dotArgs,FALSE)!=0)
- //{
- // err("Problems running dot. Check your installation!\n");
- //}
- }
- out << "</body></html>";
- }
- htmlPage.close();
}
-#endif
void generateDirDocs(OutputList &ol)
{
diff --git a/src/dirdef.h b/src/dirdef.h
index e7a6b0e..9a5346c 100644
--- a/src/dirdef.h
+++ b/src/dirdef.h
@@ -34,14 +34,14 @@ class FTextStream;
class DirDef;
-/** A list of directories */
+/** A list of directories. */
class DirList : public QList<DirDef>
{
public:
int compareItems(GCI item1,GCI item2);
};
-/** A directory */
+/** A model of a directory symbol. */
class DirDef : public Definition
{
public:
@@ -54,7 +54,7 @@ class DirDef : public Definition
QCString anchor() const { return QCString(); }
bool isLinkableInProject() const;
bool isLinkable() const;
- QCString displayName() const { return m_dispName; }
+ QCString displayName(bool=TRUE) const { return m_dispName; }
QCString shortName() const { return m_shortName; }
void addSubDir(DirDef *subdir);
FileList * getFiles() const { return m_fileList; }
@@ -105,6 +105,7 @@ class DirDef : public Definition
QDict<UsedDir> *m_usedDirs;
};
+/** Class representing a pair of FileDef objects */
class FilePair
{
public:
@@ -116,6 +117,7 @@ class FilePair
FileDef *m_dst;
};
+/** A sorted dictionary of FilePair objects. */
class FilePairDict : public SDict<FilePair>
{
public:
@@ -123,7 +125,7 @@ class FilePairDict : public SDict<FilePair>
int compareItems(GCI item1,GCI item2);
};
-/** Usage information of a directory . */
+/** Usage information of a directory. */
class UsedDir
{
public:
@@ -141,7 +143,7 @@ class UsedDir
bool m_inherited;
};
-/** A usage relation between two direction. */
+/** A usage relation between two directories. */
class DirRelation
{
public:
@@ -163,6 +165,7 @@ inline int DirList::compareItems(GCI item1,GCI item2)
return stricmp(((DirDef *)item1)->shortName(),((DirDef *)item2)->shortName());
}
+/** A sorted dictionary of DirDef objects. */
class DirSDict : public SDict<DirDef>
{
public:
diff --git a/src/docparser.cpp b/src/docparser.cpp
index abf0943..4beb405 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -74,6 +74,7 @@ static const char *sectionLevelToName[] =
static Definition * g_scope;
static QCString g_context;
static bool g_inSeeBlock;
+static bool g_xmlComment;
static bool g_insideHtmlLink;
static QStack<DocNode> g_nodeStack;
static QStack<DocStyleChange> g_styleStack;
@@ -95,12 +96,15 @@ static QCString g_includeFileText;
static uint g_includeFileOffset;
static uint g_includeFileLength;
-// parser's context to store all global variables
+
+/** Parser's context to store all global variables.
+ */
struct DocParserContext
{
Definition *scope;
QCString context;
bool inSeeBlock;
+ bool xmlComment;
bool insideHtmlLink;
QStack<DocNode> nodeStack;
QStack<DocStyleChange> styleStack;
@@ -140,6 +144,7 @@ static void docParserPushContext(bool saveParamInfo=TRUE)
ctx->scope = g_scope;
ctx->context = g_context;
ctx->inSeeBlock = g_inSeeBlock;
+ ctx->xmlComment = g_xmlComment;
ctx->insideHtmlLink = g_insideHtmlLink;
ctx->nodeStack = g_nodeStack;
ctx->styleStack = g_styleStack;
@@ -177,6 +182,7 @@ static void docParserPopContext(bool keepParamInfo=FALSE)
g_scope = ctx->scope;
g_context = ctx->context;
g_inSeeBlock = ctx->inSeeBlock;
+ g_xmlComment = ctx->xmlComment;
g_insideHtmlLink = ctx->insideHtmlLink;
g_nodeStack = ctx->nodeStack;
g_styleStack = ctx->styleStack;
@@ -646,20 +652,6 @@ static bool insideTable(DocNode *n)
//---------------------------------------------------------------------------
-///*! Returns TRUE iff node n is a child of a language node */
-//static bool insideLang(DocNode *n)
-//{
-// while (n)
-// {
-// if (n->kind()==DocNode::Kind_Language) return TRUE;
-// n=n->parent();
-// }
-// return FALSE;
-//}
-
-
-//---------------------------------------------------------------------------
-
/*! Looks for a documentation block with name commandName in the current
* context (g_context). The resulting documentation string is
* put in pDoc, the definition in which the documentation was found is
@@ -3593,13 +3585,15 @@ int DocHtmlTable::parseXml()
return retval==RetVal_EndTable ? RetVal_OK : retval;
}
+/** Helper class to compute the grid for an HTML style table */
struct ActiveRowSpan
{
ActiveRowSpan(int rows,int col) : rowsLeft(rows), column(col) {}
int rowsLeft;
- int column;
+ int column;
};
+/** List of ActiveRowSpan classes. */
typedef QList<ActiveRowSpan> RowSpanList;
/** determines the location of all cells in a grid, resolving row and
@@ -5577,8 +5571,9 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta
handleStyleEnter(this,m_children,DocStyleChange::Bold,&g_token->attribs);
break;
case HTML_CODE:
- if (getLanguageFromFileName(g_fileName)==SrcLangExt_CSharp)
- // for C# code we treat <code> as an XML tag
+ if (getLanguageFromFileName(g_fileName)==SrcLangExt_CSharp || g_xmlComment)
+ // for C# source or inside a <summary> or <remark> section we
+ // treat <code> as an XML tag (so similar to @code)
{
doctokenizerYYsetStateXmlCode();
retval = handleStartCode();
@@ -5719,6 +5714,8 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta
case XML_SUMMARY:
case XML_REMARKS:
+ g_xmlComment=TRUE;
+ // fall through
case XML_VALUE:
case XML_PARA:
if (!m_children.isEmpty())
@@ -6860,6 +6857,7 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
g_styleStack.clear();
g_initialStyleStack.clear();
g_inSeeBlock = FALSE;
+ g_xmlComment = FALSE;
g_insideHtmlLink = FALSE;
g_includeFileText = "";
g_includeFileOffset = 0;
@@ -6923,6 +6921,7 @@ DocNode *validatingParseText(const char *input)
g_styleStack.clear();
g_initialStyleStack.clear();
g_inSeeBlock = FALSE;
+ g_xmlComment = FALSE;
g_insideHtmlLink = FALSE;
g_includeFileText = "";
g_includeFileOffset = 0;
diff --git a/src/docparser.h b/src/docparser.h
index ad5dd03..ab7c523 100644
--- a/src/docparser.h
+++ b/src/docparser.h
@@ -79,7 +79,7 @@ void docFindSections(const char *input,
//---------------------------------------------------------------------------
-/*! @brief Abstract node interface with type information. */
+/** Abstract node interface with type information. */
class DocNode
{
public:
@@ -167,7 +167,7 @@ class DocNode
bool m_insidePre;
};
-/*! @brief Default accept implementation for compound nodes in the abstract
+/** Default accept implementation for compound nodes in the abstract
* syntax tree.
*/
template<class T> class CompAccept
@@ -191,7 +191,7 @@ template<class T> class CompAccept
};
-/*! @brief Node representing a word
+/** Node representing a word
*/
class DocWord : public DocNode
{
@@ -205,7 +205,7 @@ class DocWord : public DocNode
QCString m_word;
};
-/*! @brief Node representing a word that can be linked to something
+/** Node representing a word that can be linked to something
*/
class DocLinkedWord : public DocNode
{
@@ -231,7 +231,7 @@ class DocLinkedWord : public DocNode
QCString m_tooltip;
};
-/*! @brief Node representing an URL (or email address) */
+/** Node representing an URL (or email address) */
class DocURL : public DocNode
{
public:
@@ -247,7 +247,7 @@ class DocURL : public DocNode
bool m_isEmail;
};
-/*! @brief Node representing a line break */
+/** Node representing a line break */
class DocLineBreak : public DocNode
{
public:
@@ -258,7 +258,7 @@ class DocLineBreak : public DocNode
private:
};
-/*! @brief Node representing a horizonal ruler */
+/** Node representing a horizonal ruler */
class DocHorRuler : public DocNode
{
public:
@@ -269,7 +269,7 @@ class DocHorRuler : public DocNode
private:
};
-/*! @brief Node representing an anchor */
+/** Node representing an anchor */
class DocAnchor : public DocNode
{
public:
@@ -284,7 +284,7 @@ class DocAnchor : public DocNode
QCString m_file;
};
-/*! @brief Node representing a citation of some bibliographic reference */
+/** Node representing a citation of some bibliographic reference */
class DocCite : public DocNode
{
public:
@@ -306,7 +306,7 @@ class DocCite : public DocNode
};
-/*! @brief Node representing a style change */
+/** Node representing a style change */
class DocStyleChange : public DocNode
{
public:
@@ -333,7 +333,7 @@ class DocStyleChange : public DocNode
HtmlAttribList m_attribs;
};
-/*! @brief Node representing a special symbol */
+/** Node representing a special symbol */
class DocSymbol : public DocNode
{
public:
@@ -355,7 +355,7 @@ class DocSymbol : public DocNode
char m_letter;
};
-/*! @brief Node representing some amount of white space */
+/** Node representing some amount of white space */
class DocWhiteSpace : public DocNode
{
public:
@@ -368,7 +368,7 @@ class DocWhiteSpace : public DocNode
QCString m_chars;
};
-/*! @brief Node representing a verbatim, unparsed text fragment */
+/** Node representing a verbatim, unparsed text fragment */
class DocVerbatim : public DocNode
{
public:
@@ -397,7 +397,7 @@ class DocVerbatim : public DocNode
};
-/*! @brief Node representing an included text block from file */
+/** Node representing an included text block from file */
class DocInclude : public DocNode
{
public:
@@ -436,7 +436,7 @@ class DocInclude : public DocNode
QCString m_blockId;
};
-/*! @brief Node representing a include/dontinclude operator block */
+/** Node representing a include/dontinclude operator block */
class DocIncOperator : public DocNode
{
public:
@@ -471,7 +471,7 @@ class DocIncOperator : public DocNode
QCString m_exampleFile;
};
-/*! @brief Node representing an item of a cross-referenced list */
+/** Node representing an item of a cross-referenced list */
class DocFormula : public DocNode
{
public:
@@ -491,7 +491,7 @@ class DocFormula : public DocNode
int m_id;
};
-/*! @brief Node representing an entry in the index. */
+/** Node representing an entry in the index. */
class DocIndexEntry : public DocNode
{
public:
@@ -512,8 +512,8 @@ class DocIndexEntry : public DocNode
//-----------------------------------------------------------------------
-/*! @brief Node representing a copy of documentation block. */
-class DocCopy : /*public CompAccept<DocCopy>,*/ public DocNode
+/** Node representing a copy of documentation block. */
+class DocCopy : public DocNode
{
public:
DocCopy(DocNode *parent,const QCString &link,bool copyBrief,bool copyDetails)
@@ -530,7 +530,7 @@ class DocCopy : /*public CompAccept<DocCopy>,*/ public DocNode
bool m_copyDetails;
};
-/*! @brief Node representing an auto List */
+/** Node representing an auto List */
class DocAutoList : public CompAccept<DocAutoList>, public DocNode
{
public:
@@ -548,7 +548,7 @@ class DocAutoList : public CompAccept<DocAutoList>, public DocNode
int m_depth;
};
-/*! @brief Node representing an item of a auto list */
+/** Node representing an item of a auto list */
class DocAutoListItem : public CompAccept<DocAutoListItem>, public DocNode
{
public:
@@ -565,7 +565,7 @@ class DocAutoListItem : public CompAccept<DocAutoListItem>, public DocNode
-/*! @brief Node representing a simple section title */
+/** Node representing a simple section title */
class DocTitle : public CompAccept<DocTitle>, public DocNode
{
public:
@@ -578,11 +578,10 @@ class DocTitle : public CompAccept<DocTitle>, public DocNode
private:
};
-/*! @brief Node representing an item of a cross-referenced list */
+/** Node representing an item of a cross-referenced list */
class DocXRefItem : public CompAccept<DocXRefItem>, public DocNode
{
public:
- //enum Type { Bug, Test, Todo, Deprecated };
DocXRefItem(DocNode *parent,int id,const char *key);
Kind kind() const { return Kind_XRefItem; }
QCString file() const { return m_file; }
@@ -602,7 +601,7 @@ class DocXRefItem : public CompAccept<DocXRefItem>, public DocNode
QCString m_relPath;
};
-/*! @brief Node representing an image */
+/** Node representing an image */
class DocImage : public CompAccept<DocImage>, public DocNode
{
public:
@@ -631,7 +630,7 @@ class DocImage : public CompAccept<DocImage>, public DocNode
QCString m_url;
};
-/*! @brief Node representing a dot file */
+/** Node representing a dot file */
class DocDotFile : public CompAccept<DocDotFile>, public DocNode
{
public:
@@ -655,7 +654,7 @@ class DocDotFile : public CompAccept<DocDotFile>, public DocNode
QCString m_context;
};
-/*! @brief Node representing a msc file */
+/** Node representing a msc file */
class DocMscFile : public CompAccept<DocMscFile>, public DocNode
{
public:
@@ -680,7 +679,7 @@ class DocMscFile : public CompAccept<DocMscFile>, public DocNode
};
-/*! @brief Node representing a link to some item */
+/** Node representing a link to some item */
class DocLink : public CompAccept<DocLink>, public DocNode
{
public:
@@ -701,7 +700,7 @@ class DocLink : public CompAccept<DocLink>, public DocNode
QCString m_refText;
};
-/*! @brief Node representing a reference to some item */
+/** Node representing a reference to some item */
class DocRef : public CompAccept<DocRef>, public DocNode
{
public:
@@ -730,7 +729,7 @@ class DocRef : public CompAccept<DocRef>, public DocNode
QCString m_text;
};
-/*! @brief Node representing an internal reference to some item */
+/** Node representing an internal reference to some item */
class DocInternalRef : public CompAccept<DocInternalRef>, public DocNode
{
public:
@@ -748,24 +747,7 @@ class DocInternalRef : public CompAccept<DocInternalRef>, public DocNode
QCString m_anchor;
};
-/*! @brief Node representing a Language specific section */
-//class DocLanguage : public CompAccept<DocLanguage>, public DocNode
-//{
-// public:
-// DocLanguage(DocNode *parent,const QCString &id) :
-// m_parent(parent), m_id(id) {}
-// QCString id() const { return m_id; }
-// Kind kind() const { return Kind_Language; }
-// DocNode *parent() const { return m_parent; }
-// void accept(DocVisitor *v) { CompAccept<DocLanguage>::accept(this,v); }
-// int parse();
-//
-// private:
-// DocNode * m_parent;
-// QCString m_id;
-//};
-
-/*! @brief Node representing a Hypertext reference */
+/** Node representing a Hypertext reference */
class DocHRef : public CompAccept<DocHRef>, public DocNode
{
public:
@@ -785,7 +767,7 @@ class DocHRef : public CompAccept<DocHRef>, public DocNode
QCString m_relPath;
};
-/*! @brief Node Html heading */
+/** Node Html heading */
class DocHtmlHeader : public CompAccept<DocHtmlHeader>, public DocNode
{
public:
@@ -802,7 +784,7 @@ class DocHtmlHeader : public CompAccept<DocHtmlHeader>, public DocNode
HtmlAttribList m_attribs;
};
-/*! @brief Node representing a Html description item */
+/** Node representing a Html description item */
class DocHtmlDescTitle : public CompAccept<DocHtmlDescTitle>, public DocNode
{
public:
@@ -817,7 +799,7 @@ class DocHtmlDescTitle : public CompAccept<DocHtmlDescTitle>, public DocNode
HtmlAttribList m_attribs;
};
-/*! @brief Node representing a Html description list */
+/** Node representing a Html description list */
class DocHtmlDescList : public CompAccept<DocHtmlDescList>, public DocNode
{
public:
@@ -832,7 +814,7 @@ class DocHtmlDescList : public CompAccept<DocHtmlDescList>, public DocNode
HtmlAttribList m_attribs;
};
-/*! @brief Node representing a normal section */
+/** Node representing a normal section */
class DocSection : public CompAccept<DocSection>, public DocNode
{
public:
@@ -855,7 +837,7 @@ class DocSection : public CompAccept<DocSection>, public DocNode
QCString m_file;
};
-/*! @brief Node representing a reference to a section */
+/** Node representing a reference to a section */
class DocSecRefItem : public CompAccept<DocSecRefItem>, public DocNode
{
public:
@@ -874,7 +856,7 @@ class DocSecRefItem : public CompAccept<DocSecRefItem>, public DocNode
QCString m_anchor;
};
-/*! @brief Node representing a list of section references */
+/** Node representing a list of section references */
class DocSecRefList : public CompAccept<DocSecRefList>, public DocNode
{
public:
@@ -886,7 +868,7 @@ class DocSecRefList : public CompAccept<DocSecRefList>, public DocNode
private:
};
-/*! @brief Node representing an internal section of documentation */
+/** Node representing an internal section of documentation */
class DocInternal : public CompAccept<DocInternal>, public DocNode
{
public:
@@ -898,7 +880,7 @@ class DocInternal : public CompAccept<DocInternal>, public DocNode
private:
};
-/*! @brief Node representing a simple list */
+/** Node representing a simple list */
class DocSimpleList : public CompAccept<DocSimpleList>, public DocNode
{
public:
@@ -910,7 +892,7 @@ class DocSimpleList : public CompAccept<DocSimpleList>, public DocNode
private:
};
-/*! @brief Node representing a Html list */
+/** Node representing a Html list */
class DocHtmlList : public CompAccept<DocHtmlList>, public DocNode
{
public:
@@ -929,7 +911,7 @@ class DocHtmlList : public CompAccept<DocHtmlList>, public DocNode
HtmlAttribList m_attribs;
};
-/*! Node representing a simple section */
+/** Node representing a simple section */
class DocSimpleSect : public CompAccept<DocSimpleSect>, public DocNode
{
public:
@@ -954,7 +936,7 @@ class DocSimpleSect : public CompAccept<DocSimpleSect>, public DocNode
DocTitle * m_title;
};
-/*! Node representing a separator between two simple sections of the
+/** Node representing a separator between two simple sections of the
* same type.
*/
class DocSimpleSectSep : public DocNode
@@ -967,7 +949,7 @@ class DocSimpleSectSep : public DocNode
private:
};
-/*! Node representing a parameter section */
+/** Node representing a parameter section */
class DocParamSect : public CompAccept<DocParamSect>, public DocNode
{
friend class DocParamList;
@@ -998,7 +980,7 @@ class DocParamSect : public CompAccept<DocParamSect>, public DocNode
bool m_hasTypeSpecifier;
};
-/*! Node representing a paragraph in the documentation tree */
+/** Node representing a paragraph in the documentation tree */
class DocPara : public CompAccept<DocPara>, public DocNode
{
public:
@@ -1042,7 +1024,7 @@ class DocPara : public CompAccept<DocPara>, public DocNode
bool m_isLast;
};
-/*! @brief Node representing a parameter list. */
+/** Node representing a parameter list. */
class DocParamList : public DocNode
{
public:
@@ -1084,7 +1066,7 @@ class DocParamList : public DocNode
bool m_isLast;
};
-/*! @brief Node representing a simple list item */
+/** Node representing a simple list item */
class DocSimpleListItem : public DocNode
{
public:
@@ -1104,7 +1086,7 @@ class DocSimpleListItem : public DocNode
DocPara *m_paragraph;
};
-/*! @brief Node representing a HTML list item */
+/** Node representing a HTML list item */
class DocHtmlListItem : public CompAccept<DocHtmlListItem>, public DocNode
{
public:
@@ -1122,7 +1104,7 @@ class DocHtmlListItem : public CompAccept<DocHtmlListItem>, public DocNode
int m_itemNum;
};
-/*! @brief Node representing a HTML description data */
+/** Node representing a HTML description data */
class DocHtmlDescData : public CompAccept<DocHtmlDescData>, public DocNode
{
public:
@@ -1136,7 +1118,7 @@ class DocHtmlDescData : public CompAccept<DocHtmlDescData>, public DocNode
HtmlAttribList m_attribs;
};
-/*! @brief Node representing a HTML table cell */
+/** Node representing a HTML table cell */
class DocHtmlCell : public CompAccept<DocHtmlCell>, public DocNode
{
friend class DocHtmlTable;
@@ -1173,7 +1155,7 @@ class DocHtmlCell : public CompAccept<DocHtmlCell>, public DocNode
int m_colIdx;
};
-/*! @brief Node representing a HTML table caption */
+/** Node representing a HTML table caption */
class DocHtmlCaption : public CompAccept<DocHtmlCaption>, public DocNode
{
public:
@@ -1189,7 +1171,7 @@ class DocHtmlCaption : public CompAccept<DocHtmlCaption>, public DocNode
bool m_atTop;
};
-/*! @brief Node representing a HTML table row */
+/** Node representing a HTML table row */
class DocHtmlRow : public CompAccept<DocHtmlRow>, public DocNode
{
friend class DocHtmlTable;
@@ -1216,7 +1198,7 @@ class DocHtmlRow : public CompAccept<DocHtmlRow>, public DocNode
int m_rowIdx;
};
-/*! @brief Node representing a HTML table */
+/** Node representing a HTML table */
class DocHtmlTable : public CompAccept<DocHtmlTable>, public DocNode
{
public:
@@ -1239,7 +1221,7 @@ class DocHtmlTable : public CompAccept<DocHtmlTable>, public DocNode
int m_numCols;
};
-/*! @brief Node representing an HTML blockquote */
+/** Node representing an HTML blockquote */
class DocHtmlBlockQuote : public CompAccept<DocHtmlBlockQuote>, public DocNode
{
public:
@@ -1254,7 +1236,7 @@ class DocHtmlBlockQuote : public CompAccept<DocHtmlBlockQuote>, public DocNode
HtmlAttribList m_attribs;
};
-/*! @brief Root node of a text fragment */
+/** Root node of a text fragment */
class DocText : public CompAccept<DocText>, public DocNode
{
public:
@@ -1264,7 +1246,7 @@ class DocText : public CompAccept<DocText>, public DocNode
void parse();
};
-/*! @brief Root node of documentation tree */
+/** Root node of documentation tree */
class DocRoot : public CompAccept<DocRoot>, public DocNode
{
public:
diff --git a/src/docsets.h b/src/docsets.h
index 977991e..799e289 100644
--- a/src/docsets.h
+++ b/src/docsets.h
@@ -25,7 +25,8 @@
class QFile;
class Definition;
-/*! A class that generates docset files.
+/** A class that generates docset files.
+ *
* These files can be used to create context help
* for use within Apple's Xcode 3.0 development environment
*/
diff --git a/src/doctokenizer.h b/src/doctokenizer.h
index 35fdbe2..5036f19 100644
--- a/src/doctokenizer.h
+++ b/src/doctokenizer.h
@@ -63,6 +63,7 @@ enum Tokens
RetVal_EndBlockQuote = 0x10014
};
+/** @brief Data associated with a token used by the comment block parser. */
struct TokenInfo
{
// unknown token
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index d9f845a..ae4c173 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -490,7 +490,7 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}
return TK_LISTITEM;
}
}
-<St_Para>({BLANK}*\n)+{OLISTITEM} { /* list item on next line */
+<St_Para>{BLANK}*\n{OLISTITEM} { /* list item on next line */
if (!Doxygen::markdownSupport)
{
REJECT;
diff --git a/src/dot.cpp b/src/dot.cpp
index a4cef13..9deae32 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -195,6 +195,7 @@ static const char *umlEdgeStyleMap[] =
"solid" // usage
};
+/** Helper struct holding the properties of a edge in a dot graph. */
struct EdgeProperties
{
const char * const *edgeColorMap;
@@ -746,6 +747,7 @@ static bool checkDeliverables(const QCString &file1,
//--------------------------------------------------------------------
+/** Class representing a list of DotNode objects. */
class DotNodeList : public QList<DotNode>
{
public:
diff --git a/src/dot.h b/src/dot.h
index e4acd5a..ddcd1c3 100644
--- a/src/dot.h
+++ b/src/dot.h
@@ -42,7 +42,7 @@ class DotRunnerQueue;
enum GraphOutputFormat { BITMAP , EPS };
-/** @brief Attributes of an edge of a dot graph */
+/** Attributes of an edge of a dot graph */
struct EdgeInfo
{
enum Colors { Blue=0, Green=1, Red=2, Purple=3, Grey=4, Orange=5 };
@@ -56,7 +56,7 @@ struct EdgeInfo
int m_labColor;
};
-/** @brief A node in a dot graph */
+/** A node in a dot graph */
class DotNode
{
public:
@@ -138,7 +138,7 @@ inline int DotNode::findParent( DotNode *n )
return m_parents->find(n);
}
-/** @brief Represents a graphical class hierarchy */
+/** Represents a graphical class hierarchy */
class DotGfxHierarchyTable
{
public:
@@ -156,7 +156,7 @@ class DotGfxHierarchyTable
DotNodeList *m_rootSubgraphs;
};
-/** @brief Representation of a class inheritance or dependency graph */
+/** Representation of a class inheritance or dependency graph */
class DotClassGraph
{
public:
@@ -188,7 +188,7 @@ class DotClassGraph
bool m_lrRank;
};
-/** @brief Representation of an include dependency graph */
+/** Representation of an include dependency graph */
class DotInclDepGraph
{
public:
@@ -215,7 +215,7 @@ class DotInclDepGraph
bool m_inverse;
};
-/** @brief Representation of an call graph */
+/** Representation of an call graph */
class DotCallGraph
{
public:
@@ -242,7 +242,7 @@ class DotCallGraph
Definition * m_scope;
};
-/** @brief Representation of an directory dependency graph */
+/** Representation of an directory dependency graph */
class DotDirDeps
{
public:
@@ -260,7 +260,7 @@ class DotDirDeps
DirDef *m_dir;
};
-/** @brief Representation of a group collaboration graph */
+/** Representation of a group collaboration graph */
class DotGroupCollaboration
{
public :
@@ -318,7 +318,7 @@ class DotGroupCollaboration
QList<Edge> m_edges;
};
-/** @brief Helper class to run dot from doxygen.
+/** Helper class to run dot from doxygen.
*/
class DotRunner
{
@@ -358,7 +358,7 @@ class DotRunner
CleanupItem m_cleanupItem;
};
-/** @brief Helper class to insert a set of map file into an output file */
+/** Helper class to insert a set of map file into an output file */
class DotFilePatcher
{
public:
@@ -389,6 +389,7 @@ class DotFilePatcher
QCString m_patchFile;
};
+/** Queue of dot jobs to run. */
class DotRunnerQueue
{
public:
@@ -401,6 +402,7 @@ class DotRunnerQueue
mutable QMutex m_mutex;
};
+/** Worker thread to execute a dot run */
class DotWorkerThread : public QThread
{
public:
@@ -413,7 +415,7 @@ class DotWorkerThread : public QThread
QList<DotRunner::CleanupItem> m_cleanupItems;
};
-/** @brief singleton that manages dot relation actions */
+/** Singleton that manages dot relation actions */
class DotManager
{
public:
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index fad7102..d942656 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -235,7 +235,7 @@ static void findMember(EntryNav *rootNav,
bool isFunc
);
-
+/** A struct contained the data for an STL class */
struct STLInfo
{
const char *className;
@@ -821,6 +821,7 @@ static void addIncludeFile(ClassDef *cd,FileDef *ifd,Entry *root)
if (!iName.isEmpty()) // user specified include file
{
if (iName.at(0)=='<') local=FALSE; // explicit override
+ else if (iName.at(0)=='"') local=TRUE;
if (iName.at(0)=='"' || iName.at(0)=='<')
{
iName=iName.mid(1,iName.length()-2); // strip quotes or brackets
@@ -2356,12 +2357,16 @@ static MemberDef *addVariableToFile(
)
// variable already in the scope
{
+ bool isPHPArray = md->getLanguage()==SrcLangExt_PHP &&
+ md->argsString()!=root->args &&
+ root->args.find('[')!=-1;
+ bool staticsInDifferentFiles =
+ root->stat && md->isStatic() &&
+ root->fileName!=md->getDefFileName();
+
if (md->getFileDef() &&
- ! // not a php array
- (
- (md->getLanguage()==SrcLangExt_PHP) &&
- (md->argsString()!=root->args && root->args.find('[')!=-1)
- )
+ !isPHPArray && // not a php array
+ !staticsInDifferentFiles
)
// not a php array variable
{
@@ -2835,7 +2840,7 @@ static void buildTypedefList(EntryNav *rootNav)
static void buildVarList(EntryNav *rootNav)
{
- //printf("buildVarList(%s)\n",rootNav->name().data());
+ //printf("buildVarList(%s) section=%08x\n",rootNav->name().data(),rootNav->section());
int isFuncPtr=-1;
if (!rootNav->name().isEmpty() &&
(rootNav->type().isEmpty() || g_compoundKeywordDict.find(rootNav->type())==0) &&
@@ -2877,11 +2882,18 @@ static void addMethodToClass(EntryNav *rootNav,ClassDef *cd,
Entry *root = rootNav->entry();
FileDef *fd=rootNav->fileDef();
- int l,i=-1;
+ int l;
static QRegExp re("([a-z_A-Z0-9: ]*[ &*]+[ ]*");
+ int ts=root->type.find('<');
+ int te=root->type.findRev('>');
+ int i=re.match(root->type,0,&l);
+ if (i!=-1 && ts!=-1 && ts<te && ts<i && i<te) // avoid changing A<int(int*)>, see bug 677315
+ {
+ i=-1;
+ }
if (cd->getLanguage()==SrcLangExt_Cpp && // only C has pointers
- !root->type.isEmpty() && (i=re.match(root->type,0,&l))!=-1) // function variable
+ !root->type.isEmpty() && i!=-1) // function variable
{
root->args+=root->type.right(root->type.length()-i-l);
root->type=root->type.left(i+l);
@@ -3113,12 +3125,17 @@ static void buildFunctionList(EntryNav *rootNav)
}
static QRegExp re("([a-z_A-Z0-9: ]*[ &*]+[ ]*");
+ int ts=root->type.find('<');
+ int te=root->type.findRev('>');
+ int ti;
if (!rootNav->parent()->name().isEmpty() &&
(rootNav->parent()->section() & Entry::COMPOUND_MASK) &&
cd &&
// do some fuzzy things to exclude function pointers
(root->type.isEmpty() ||
- (root->type.find(re,0)==-1 || root->args.find(")[")!=-1) || // type contains ..(..* and args not )[.. -> function pointer
+ ((ti=root->type.find(re,0))==-1 || // type does not contain ..(..*
+ (ts!=-1 && ts<te && ts<ti && ti<te) || // outside of < ... >
+ root->args.find(")[")!=-1) || // and args not )[.. -> function pointer
root->type.find(")(")!=-1 || root->type.find("operator")!=-1 || // type contains ..)(.. and not "operator"
cd->getLanguage()!=SrcLangExt_Cpp // language other than C
)
@@ -3181,11 +3198,16 @@ static void buildFunctionList(EntryNav *rootNav)
sameNumTemplateArgs = FALSE;
}
}
+
+ bool staticsInDifferentFiles =
+ root->stat && md->isStatic() && root->fileName!=md->getDefFileName();
+
if (
matchArguments2(md->getOuterScope(),mfd,mdAl.pointer(),
rnd ? rnd : Doxygen::globalScope,rfd,root->argList,
FALSE) &&
- sameNumTemplateArgs
+ sameNumTemplateArgs &&
+ !staticsInDifferentFiles
)
{
GroupDef *gd=0;
@@ -5231,7 +5253,6 @@ static bool findGlobalMember(EntryNav *rootNav,
}
}
-
//printf("%s<->%s\n",
// argListToString(md->argumentList()).data(),
// argListToString(root->argList).data());
@@ -5255,7 +5276,7 @@ static bool findGlobalMember(EntryNav *rootNav,
}
}
}
- if (!found && root->relatesType != Duplicate) // no match
+ if (!found && root->relatesType != Duplicate && root->section==Entry::FUNCTION_SEC) // no match
{
QCString fullFuncDecl=decl;
if (root->argList) fullFuncDecl+=argListToString(root->argList,TRUE);
@@ -5263,12 +5284,13 @@ static bool findGlobalMember(EntryNav *rootNav,
QCString("warning: no matching file member found for \n")+substitute(fullFuncDecl,"%","%%");
if (mn->count()>0)
{
- warnMsg+="Possible candidates:\n";
+ warnMsg+="\nPossible candidates:\n";
for (mni.toFirst();(md=mni.current());++mni)
{
- warnMsg+=" ";
+ warnMsg+=" '";
warnMsg+=substitute(md->declaration(),"%","%%");
- warnMsg+='\n';
+ warnMsg+="' at line "+QCString().setNum(md->getDefLine())+
+ " of file"+md->getDefFileName()+"\n";
}
}
warn(root->fileName,root->startLine,warnMsg);
@@ -6003,7 +6025,7 @@ static void findMember(EntryNav *rootNav,
LockingPtr<ArgumentList> templAl = md->templateArguments();
if (templAl!=0)
{
- warnMsg+=" template ";
+ warnMsg+=" 'template ";
warnMsg+=tempArgListToString(templAl.pointer());
warnMsg+='\n';
}
@@ -6020,9 +6042,8 @@ static void findMember(EntryNav *rootNav,
warnMsg+=md->argsString();
if (noMatchCount>1)
{
- QCString lineFile;
- lineFile.sprintf(" at line %d of file ",md->getDefLine());
- warnMsg+=lineFile+md->getDefFileName();
+ warnMsg+="' at line "+QCString().setNum(md->getDefLine()) +
+ " of file "+md->getDefFileName();
}
warnMsg+='\n';
@@ -8785,20 +8806,6 @@ static void copyExtraFiles()
//! parse the list of input files
static void parseFiles(Entry *root,EntryNav *rootNav)
{
-#if 0
- void *cd = 0;
- QCString inpEncoding = Config_getString("INPUT_ENCODING");
- bool needsTranscoding = !inpEncoding.isEmpty();
- if (needsTranscoding)
- {
- if (!(cd = portable_iconv_open("UTF-8", inpEncoding)))
- {
- err("error: unsupported character enconding: '%s'",inpEncoding.data());
- exit(1);
- }
- }
-#endif
-
QCString *s=g_inputFiles.first();
while (s)
{
@@ -10293,18 +10300,6 @@ void parseInput()
* Parse source files *
**************************************************************************/
- //printNavTree(rootNav,0);
-
- // we are done with input scanning now, so free up the buffers used by flex
- // (can be around 4MB)
- preFreeScanner();
- scanFreeScanner();
- pyscanFreeScanner();
-
- //delete rootNav;
- //g_storage.close();
- //exit(1);
-
if (Config_getBool("BUILTIN_STL_SUPPORT"))
{
addSTLClasses(rootNav);
@@ -10312,6 +10307,13 @@ void parseInput()
parseFiles(root,rootNav);
g_storage->close();
+
+ // we are done with input scanning now, so free up the buffers used by flex
+ // (can be around 4MB)
+ preFreeScanner();
+ scanFreeScanner();
+ pyscanFreeScanner();
+
if (!g_storage->open(IO_ReadOnly))
{
err("Failed to open temporary storage file %s for reading",
@@ -10530,6 +10532,13 @@ void parseInput()
msg("Adding members to index pages...\n");
addMembersToIndex();
+
+ if (Config_getBool("OPTIMIZE_OUTPUT_VHDL") &&
+ Config_getBool("HAVE_DOT") &&
+ Config_getEnum("DOT_IMAGE_FORMAT")=="svg")
+ {
+ VhdlDocGen::writeOverview();
+ }
}
void generateOutput()
diff --git a/src/doxygen.css b/src/doxygen.css
index 32d4d9c..6ce8bb9 100644
--- a/src/doxygen.css
+++ b/src/doxygen.css
@@ -184,8 +184,24 @@ div.line {
padding-left: 53px;
padding-bottom: 0px;
margin: 0px;
+ -webkit-transition-property: background-color, box-shadow;
+ -webkit-transition-duration: 0.5s;
+ -moz-transition-property: background-color, box-shadow;
+ -moz-transition-duration: 0.5s;
+ -ms-transition-property: background-color, box-shadow;
+ -ms-transition-duration: 0.5s;
+ -o-transition-property: background-color, box-shadow;
+ -o-transition-duration: 0.5s;
+ transition-property: background-color, box-shadow;
+ transition-duration: 0.5s;
}
+div.line.glow {
+ background-color: cyan;
+ box-shadow: 0 0 10px cyan;
+}
+
+
span.lineno {
padding-right: 4px;
text-align: right;
@@ -486,6 +502,8 @@ table.memberdecls {
-ms-transition: box-shadow 0.5s linear;
-o-transition: box-shadow 0.5s linear;
transition: box-shadow 0.5s linear;
+ display: table !important;
+ width: 100%;
}
.memitem.glow {
@@ -575,6 +593,9 @@ dl.reflist dd {
.paramname em {
font-style: normal;
}
+.paramname code {
+ line-height: 14px;
+}
.params, .retval, .exception, .tparams {
margin-left: 0px;
@@ -662,6 +683,10 @@ div.directory {
outline:none;
}
+.directory td.entry a img {
+ border: none;
+}
+
.directory td.desc {
width: 100%;
padding-left: 6px;
@@ -857,9 +882,7 @@ div.summary a
div.ingroups
{
- margin-left: 5px;
font-size: 8pt;
- padding-left: 5px;
width: 50%;
text-align: left;
}
diff --git a/src/doxygen.md b/src/doxygen.md
new file mode 100644
index 0000000..6931329
--- /dev/null
+++ b/src/doxygen.md
@@ -0,0 +1,59 @@
+Doxygen Internals {#mainpage}
+=================
+
+Introduction
+------------
+
+This page provides a high-level overview of the internals of doxygen, with
+links to the relevant parts of the code.
+
+The generic starting point of the application is ofcource the main() function.
+
+Configuration options
+---------------------
+
+Configuration file data is stored in singleton class Config and can be
+accessed using wrapper macros
+Config_getString(), Config_getInt(), Config_getList(),
+Config_getEnum(), and Config_getBool() depending on the type of the
+option.
+
+The format of the configuration file (options and types) is defined
+by the file `config.xml`. As part of the build process,
+the python script `configgen.py` will create a file configoptions.cpp
+from this, which serves as the input for the configuration file parser
+that is invoked using Config::parse()
+
+Gathering Input files
+---------------------
+
+After the configuration is known, the input files are searched using
+searchInputFiles() and any tag files are read using readTagFile()
+
+Parsing Input files
+-------------------
+
+The function parseFiles() takes care of parsing all files.
+It uses the ParserManager singleton factory to create a suitable parser object
+for each file. Each parser implements the abstract interface ParserInterface.
+
+If the parser indicates it needs preprocessing
+via ParserInterface::needsPreprocessing(), doxygen will call preprocessFile()
+on the file before calling ParserInterface::parseInput().
+
+The result of parsing is a tree of Entry objects
+These Entry objects are wrapped in a EntryNav object and stored on disk using
+Entry::createNavigationIndex() on the root node of the tree.
+
+Each Entry object roughly contains the raw data for a symbol and is later
+converted into a Definition object.
+
+When a parser finds a special comment block in the input, it will do a first
+pass parsing via parseCommentBlock(). During this pass the comment block
+is split into multiple parts if needed. Some data that is later needed is
+extracted like section labels, xref items, and formulas.
+Also Markdown markup is processed using processMarkdown() during this pass.
+
+
+
+
diff --git a/src/doxygen_css.h b/src/doxygen_css.h
index e883f8e..0c4f9c1 100644
--- a/src/doxygen_css.h
+++ b/src/doxygen_css.h
@@ -184,8 +184,24 @@
" padding-left: 53px;\n"
" padding-bottom: 0px;\n"
" margin: 0px;\n"
+" -webkit-transition-property: background-color, box-shadow;\n"
+" -webkit-transition-duration: 0.5s;\n"
+" -moz-transition-property: background-color, box-shadow;\n"
+" -moz-transition-duration: 0.5s;\n"
+" -ms-transition-property: background-color, box-shadow;\n"
+" -ms-transition-duration: 0.5s;\n"
+" -o-transition-property: background-color, box-shadow;\n"
+" -o-transition-duration: 0.5s;\n"
+" transition-property: background-color, box-shadow;\n"
+" transition-duration: 0.5s;\n"
"}\n"
"\n"
+"div.line.glow {\n"
+" background-color: cyan;\n"
+" box-shadow: 0 0 10px cyan;\n"
+"}\n"
+"\n"
+"\n"
"span.lineno {\n"
" padding-right: 4px;\n"
" text-align: right;\n"
@@ -486,6 +502,8 @@
" -ms-transition: box-shadow 0.5s linear;\n"
" -o-transition: box-shadow 0.5s linear;\n"
" transition: box-shadow 0.5s linear;\n"
+" display: table !important;\n"
+" width: 100%;\n"
"}\n"
"\n"
".memitem.glow {\n"
@@ -575,6 +593,9 @@
".paramname em {\n"
" font-style: normal;\n"
"}\n"
+".paramname code {\n"
+" line-height: 14px;\n"
+"}\n"
"\n"
".params, .retval, .exception, .tparams {\n"
" margin-left: 0px;\n"
@@ -662,6 +683,10 @@
" outline:none;\n"
"}\n"
"\n"
+".directory td.entry a img {\n"
+" border: none;\n"
+"}\n"
+"\n"
".directory td.desc {\n"
" width: 100%;\n"
" padding-left: 6px;\n"
@@ -857,9 +882,7 @@
"\n"
"div.ingroups\n"
"{\n"
-" margin-left: 5px;\n"
" font-size: 8pt;\n"
-" padding-left: 5px;\n"
" width: 50%;\n"
" text-align: left;\n"
"}\n"
diff --git a/src/eclipsehelp.h b/src/eclipsehelp.h
index cbae366..2531a9f 100644
--- a/src/eclipsehelp.h
+++ b/src/eclipsehelp.h
@@ -32,8 +32,7 @@
class QFile;
class Definition;
-/*!
- * \brief Generator of Eclipse help files
+/** Generator for Eclipse help files.
*
* This class generates the Eclipse specific help files.
* These files can be used to generate a help plugin readable
diff --git a/src/entry.h b/src/entry.h
index d312cec..9a39963 100644
--- a/src/entry.h
+++ b/src/entry.h
@@ -33,7 +33,7 @@ class StorageIntf;
class ArgumentList;
struct ListItemInfo;
-/*! \brief This class stores information about an inheritance relation
+/** This class stores information about an inheritance relation
*/
struct BaseInfo
{
@@ -45,8 +45,8 @@ struct BaseInfo
Specifier virt; //!< virtualness
};
-/*! \brief This struct is used to capture the tag file information
- * for an Entry.
+/** This struct is used to capture the tag file information
+ * for an Entry.
*/
struct TagInfo
{
@@ -55,8 +55,8 @@ struct TagInfo
QCString anchor;
};
-/*! \brief Represents an unstructured piece of information, about an
- * entity found in the sources.
+/** Represents an unstructured piece of information, about an
+ * entity found in the sources.
*
* parseMain() in scanner.l will generate a tree of these
* entries.
@@ -137,9 +137,11 @@ class Entry
Copy = 0x00080000,
Retain = 0x00100000,
Assign = 0x00200000,
- Composition = 0x00400000,
- Aggregation = 0x00800000,
- Association = 0x01000000
+ Strong = 0x00400000,
+ Weak = 0x00800000,
+ Composition = 0x01000000,
+ Aggregation = 0x02000000,
+ Association = 0x04000000
};
enum ClassSpecifier
{
@@ -299,6 +301,11 @@ class Entry
Entry &operator=(const Entry &);
};
+/** Wrapper for a node in the Entry tree.
+ *
+ * Allows navigating through the Entry tree and load and storing Entry
+ * objects persistently to disk.
+ */
class EntryNav
{
public:
diff --git a/src/example.h b/src/example.h
index a780326..2ee1429 100644
--- a/src/example.h
+++ b/src/example.h
@@ -24,6 +24,7 @@
class ClassDef;
class MemberName;
+/** Data associated with an example. */
struct Example
{
QCString anchor;
@@ -31,6 +32,7 @@ struct Example
QCString file;
};
+/** A sorted dictionary of Example objects. */
class ExampleSDict : public SDict<Example>
{
public:
diff --git a/src/filedef.cpp b/src/filedef.cpp
index c0aa4cf..674cc89 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -40,6 +40,7 @@
//---------------------------------------------------------------------------
+/** Class implementing CodeOutputInterface by throwing away everything. */
class DevNullCodeDocInterface : public CodeOutputInterface
{
public:
diff --git a/src/filedef.h b/src/filedef.h
index 08b8480..2368b36 100644
--- a/src/filedef.h
+++ b/src/filedef.h
@@ -40,6 +40,7 @@ class MemberGroupSDict;
class PackageDef;
class DirDef;
+/** Class representing the data associated with a \#include statement. */
struct IncludeInfo
{
IncludeInfo() { fileDef=0; local=FALSE; indirect=FALSE; }
@@ -51,16 +52,14 @@ struct IncludeInfo
bool indirect;
};
-/*! \class FileDef filedef.h
- \brief A File definition.
-
- An object of this class contains all file information that is gathered.
- This includes the members and compounds defined in the file.
-
- The member writeDocumentation() can be used to generate the page of
- documentation to HTML and LaTeX.
-*/
-
+/** A model of a file symbol.
+ *
+ * An object of this class contains all file information that is gathered.
+ * This includes the members and compounds defined in the file.
+ *
+ * The member writeDocumentation() can be used to generate the page of
+ * documentation to HTML and LaTeX.
+ */
class FileDef : public Definition
{
friend class FileName;
@@ -80,7 +79,7 @@ class FileDef : public Definition
else
return Definition::name();
}
- QCString displayName() const { return name(); }
+ QCString displayName(bool=TRUE) const { return name(); }
QCString fileName() const { return filename; }
QCString getOutputFileBase() const
@@ -221,8 +220,6 @@ class FileDef : public Definition
QIntDict<Definition> *srcDefDict;
QIntDict<MemberDef> *srcMemberDict;
bool isSource;
- //bool m_isJava;
- //bool m_isCSharp;
QCString fileVersion;
PackageDef *package;
DirDef *dir;
@@ -233,7 +230,7 @@ class FileDef : public Definition
bool m_subGrouping;
};
-
+/** Class representing a list of FileDef objects. */
class FileList : public QList<FileDef>
{
public:
@@ -273,6 +270,7 @@ class OutputNameDict : public QDict<FileList>
class Directory;
+/** Class representing an entry (file or sub directory) in a directory */
class DirEntry
{
public:
@@ -303,6 +301,7 @@ class DirEntry
bool m_isLast;
};
+/** Class representing a directory tree of DirEntry objects. */
class Directory : public DirEntry
{
public:
@@ -319,7 +318,6 @@ class Directory : public DirEntry
QList<DirEntry> m_children;
};
-//void generateFileTree(QTextStream &t);
void generateFileTree();
#endif
diff --git a/src/filename.h b/src/filename.h
index 29e90c0..e305e0e 100644
--- a/src/filename.h
+++ b/src/filename.h
@@ -22,6 +22,7 @@
#include <qdict.h>
#include "filedef.h"
+/** Class representing all files with a certain base name */
class FileName : public FileList
{
public:
@@ -37,12 +38,14 @@ class FileName : public FileList
QCString fName;
};
+/** Iterator for FileDef objects in a FileName list. */
class FileNameIterator : public QListIterator<FileDef>
{
public:
FileNameIterator(const FileName &list);
};
+/** Class representing a list of FileName objects. */
class FileNameList : public QList<FileName>
{
public:
@@ -52,12 +55,14 @@ class FileNameList : public QList<FileName>
int compareItems(GCI item1,GCI item2);
};
+/** Iterator for FileName objects in a FileNameList. */
class FileNameListIterator : public QListIterator<FileName>
{
public:
FileNameListIterator( const FileNameList &list );
};
+/** Unsorted dictionary of FileName objects. */
class FileNameDict : public QDict<FileName>
{
public:
diff --git a/src/formula.h b/src/formula.h
index ca68e6e..a912b76 100644
--- a/src/formula.h
+++ b/src/formula.h
@@ -22,6 +22,7 @@
#include <qlist.h>
#include <qdict.h>
+/** Class representing a formula in the output. */
class Formula
{
public:
@@ -35,12 +36,14 @@ class Formula
QCString form;
};
+/** A list of Formula objects. */
class FormulaList : public QList<Formula>
{
public:
void generateBitmaps(const char *path);
};
+/** Iterator for Formula objects in a FormulaList. */
class FormulaListIterator : public QListIterator<Formula>
{
public:
@@ -48,6 +51,7 @@ class FormulaListIterator : public QListIterator<Formula>
QListIterator<Formula>(l) {}
};
+/** Unsorted dictionary of Formula objects. */
class FormulaDict : public QDict<Formula>
{
public:
diff --git a/src/fortrancode.l b/src/fortrancode.l
index 4de3bf2..d8c788e 100644
--- a/src/fortrancode.l
+++ b/src/fortrancode.l
@@ -270,6 +270,7 @@ static void codifyLines(char *text)
char *p=text,*sp=p;
char c;
bool done=FALSE;
+ const char * tmp_currentFontClass = g_currentFontClass;
while (!done)
{
sp=p;
@@ -284,6 +285,10 @@ static void codifyLines(char *text)
{
startCodeLine();
}
+ if (tmp_currentFontClass)
+ {
+ startFontClass(tmp_currentFontClass);
+ }
}
else
{
@@ -923,7 +928,12 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA
}
/*-------- comments ---------------------------------------------------*/
-<Start>\n?{BS}"!>" { // start comment line or comment block
+<Start>\n?{BS}"!>"|"!<" { // start comment line or comment block
+ yy_push_state(YY_START);
+ BEGIN(DocBlock);
+ docBlock=yytext;
+ }
+<Declaration>{BS}"!<" { // start comment line or comment block
yy_push_state(YY_START);
BEGIN(DocBlock);
docBlock=yytext;
@@ -932,7 +942,7 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA
<DocBlock>.* { // contents of current comment line
docBlock+=yytext;
}
-<DocBlock>"\n"{BS}("!>"|"!"+) { //| comment block (next line is also comment line)
+<DocBlock>"\n"{BS}("!>"|"!<"|"!!") { //| comment block (next line is also comment line)
docBlock+=yytext;
}
<DocBlock>"\n" { // comment block ends at the end of this line
@@ -956,7 +966,7 @@ PREFIX (RECURSIVE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,2}(RECURSIVE|PURE|ELEMENTA
yy_pop_state();
}
-<*>"!"[^>\n].*|"!"$ { // normal comment
+<*>"!"[^><\n].*|"!"$ { // normal comment
if(YY_START == String) REJECT; // ignore in strings
startFontClass("comment");
codifyLines(yytext);
diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp
index 85caa36..c180c4e 100644
--- a/src/ftvhelp.cpp
+++ b/src/ftvhelp.cpp
@@ -722,7 +722,7 @@ void FTVHelp::addContentsItem(bool isDir,
Definition *def
)
{
- //printf("addContentsItem(%s,%s,%s,%s)\n",name,ref,file,anchor);
+ //printf("%p: m_indent=%d addContentsItem(%s,%s,%s,%s)\n",this,m_indent,name,ref,file,anchor);
QList<FTVNode> *nl = &m_indentNodes[m_indent];
FTVNode *newNode = new FTVNode(isDir,ref,file,anchor,name,separateIndex,addToNavIndex,def);
if (!nl->isEmpty())
@@ -1053,9 +1053,18 @@ static void generateJSLink(FTextStream &t,FTVNode *n)
}
}
+static QCString convertFileId2Var(const QCString &fileId)
+{
+ QCString varId = fileId;
+ int i=varId.findRev('/');
+ if (i>=0) varId = varId.mid(i+1);
+ return substitute(varId,"-","_");
+}
+
static bool generateJSTree(NavIndexEntryList &navIndex,FTextStream &t,
const QList<FTVNode> &nl,int level,bool &first)
{
+ static QCString htmlOutput = Config_getString("HTML_OUTPUT");
QCString indentStr;
indentStr.fill(' ',level*2);
bool found=FALSE;
@@ -1088,18 +1097,14 @@ static bool generateJSTree(NavIndexEntryList &navIndex,FTextStream &t,
{
QCString fileId = n->file;
if (dupOfParent(n)) fileId+="_dup";
- QFile f(Config_getString("HTML_OUTPUT")+"/"+fileId+".js");
+ QFile f(htmlOutput+"/"+fileId+".js");
if (f.open(IO_WriteOnly))
{
FTextStream tt(&f);
- QCString varId = fileId;
- int i=fileId.findRev('/');
- if (i>=0) varId = varId.mid(i+1);
- tt << "var " << varId << " =" << endl;
+ tt << "var " << convertFileId2Var(fileId) << " =" << endl;
generateJSTree(navIndex,tt,n->children,1,firstChild);
tt << endl << "];";
}
- // write file name without extension as marker
t << "\"" << fileId << "\" ]";
}
else // no children
@@ -1167,54 +1172,54 @@ static void generateJSNavTree(const QList<FTVNode> &nodeList)
t << "]" << endl;
else
t << endl << " ] ]" << endl;
- t << "];" << endl;
- t << endl << navtree_script;
- }
-
- // write the navigation index (and sub-indices)
- navIndex.sort();
- int subIndex=0;
- int elemCount=0;
- const int maxElemCount=250;
- QFile fidx(htmlOutput+"/navtreeindex.js");
- QFile fsidx(htmlOutput+"/navtreeindex0.js");
- if (fidx.open(IO_WriteOnly) && fsidx.open(IO_WriteOnly))
- {
- FTextStream tidx(&fidx);
- FTextStream tsidx(&fsidx);
- tidx << "var NAVTREEINDEX =" << endl;
- tidx << "[" << endl;
- tsidx << "var NAVTREEINDEX" << subIndex << " =" << endl;
- tsidx << "{" << endl;
- QListIterator<NavIndexEntry> li(navIndex);
- NavIndexEntry *e;
- for (li.toFirst();(e=li.current());) // for each entry
+ t << "];" << endl << endl;
+
+ // write the navigation index (and sub-indices)
+ navIndex.sort();
+ int subIndex=0;
+ int elemCount=0;
+ const int maxElemCount=250;
+ //QFile fidx(htmlOutput+"/navtreeindex.js");
+ QFile fsidx(htmlOutput+"/navtreeindex0.js");
+ if (/*fidx.open(IO_WriteOnly) &&*/ fsidx.open(IO_WriteOnly))
{
- if (elemCount==0)
- {
- tidx << "\"" << e->url << "\"," << endl;
- }
- tsidx << "\"" << e->url << "\":[" << e->path << "]";
- ++li;
- if (li.current()) tsidx << ","; // not last entry
- tsidx << endl;
-
- elemCount++;
- if (li.current() && elemCount>=maxElemCount) // switch to new sub-index
+ //FTextStream tidx(&fidx);
+ FTextStream tsidx(&fsidx);
+ t << "var NAVTREEINDEX =" << endl;
+ t << "[" << endl;
+ tsidx << "var NAVTREEINDEX" << subIndex << " =" << endl;
+ tsidx << "{" << endl;
+ QListIterator<NavIndexEntry> li(navIndex);
+ NavIndexEntry *e;
+ for (li.toFirst();(e=li.current());) // for each entry
{
- tsidx << "};" << endl;
- elemCount=0;
- fsidx.close();
- subIndex++;
- fsidx.setName(htmlOutput+"/navtreeindex"+QCString().setNum(subIndex)+".js");
- if (!fsidx.open(IO_WriteOnly)) break;
- tsidx.setDevice(&fsidx);
- tsidx << "var NAVTREEINDEX" << subIndex << " =" << endl;
- tsidx << "{" << endl;
+ if (elemCount==0)
+ {
+ t << "\"" << e->url << "\"," << endl;
+ }
+ tsidx << "\"" << e->url << "\":[" << e->path << "]";
+ ++li;
+ if (li.current()) tsidx << ","; // not last entry
+ tsidx << endl;
+
+ elemCount++;
+ if (li.current() && elemCount>=maxElemCount) // switch to new sub-index
+ {
+ tsidx << "};" << endl;
+ elemCount=0;
+ fsidx.close();
+ subIndex++;
+ fsidx.setName(htmlOutput+"/navtreeindex"+QCString().setNum(subIndex)+".js");
+ if (!fsidx.open(IO_WriteOnly)) break;
+ tsidx.setDevice(&fsidx);
+ tsidx << "var NAVTREEINDEX" << subIndex << " =" << endl;
+ tsidx << "{" << endl;
+ }
}
+ tsidx << "};" << endl;
+ t << "];" << endl;
}
- tsidx << "};" << endl;
- tidx << "];" << endl;
+ t << endl << navtree_script;
}
}
diff --git a/src/ftvhelp.h b/src/ftvhelp.h
index 1169238..8f24b3d 100644
--- a/src/ftvhelp.h
+++ b/src/ftvhelp.h
@@ -34,7 +34,7 @@ class Definition;
struct FTVNode;
class FTextStream;
-/*! A class that generates a dynamic tree view side panel.
+/** A class that generates a dynamic tree view side panel.
*/
class FTVHelp : public IndexIntf
{
diff --git a/src/groupdef.h b/src/groupdef.h
index 5c83b81..6b41979 100644
--- a/src/groupdef.h
+++ b/src/groupdef.h
@@ -42,6 +42,7 @@ class DirList;
class FTVHelp;
class Entry;
+/** A model of a group of symbols. */
class GroupDef : public Definition
{
public:
@@ -50,7 +51,7 @@ class GroupDef : public Definition
DefType definitionType() const { return TypeGroup; }
QCString getOutputFileBase() const;
QCString anchor() const { return QCString(); }
- QCString displayName() const { return hasGroupTitle() ? title : Definition::name(); }
+ QCString displayName(bool=TRUE) const { return hasGroupTitle() ? title : Definition::name(); }
const char *groupTitle() const { return title; }
void setGroupTitle( const char *newtitle );
bool hasGroupTitle( ) const { return titleSet; }
@@ -153,6 +154,7 @@ class GroupDef : public Definition
};
+/** A sorted dictionary of GroupDef objects. */
class GroupSDict : public SDict<GroupDef>
{
public:
@@ -164,6 +166,7 @@ class GroupSDict : public SDict<GroupDef>
}
};
+/** A list of GroupDef objects. */
class GroupList : public QList<GroupDef>
{
public:
@@ -173,6 +176,7 @@ class GroupList : public QList<GroupDef>
}
};
+/** An iterator for GroupDef objects in a GroupList. */
class GroupListIterator : public QListIterator<GroupDef>
{
public:
diff --git a/src/growbuf.h b/src/growbuf.h
index 6798692..f1bf315 100644
--- a/src/growbuf.h
+++ b/src/growbuf.h
@@ -4,6 +4,7 @@
#include <stdlib.h>
#include <string.h>
+/** Class representing a string buffer optimised for growing. */
class GrowBuf
{
public:
diff --git a/src/htags.h b/src/htags.h
index 458adec..4a164a6 100644
--- a/src/htags.h
+++ b/src/htags.h
@@ -17,6 +17,7 @@
class QCString;
+/** This class is a namespace for HTAGS related functions */
struct Htags
{
static bool useHtags;
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index c3bdd9f..e048858 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -572,8 +572,8 @@ void HtmlDocVisitor::visit(DocFormula *f)
m_t << "\" alt=\"";
filterQuotedCdataAttr(f->text());
m_t << "\"";
- /// @todo cache image dimensions on formula generation and give height/width
- /// for faster preloading and better rendering of the page
+ // TODO: cache image dimensions on formula generation and give height/width
+ // for faster preloading and better rendering of the page
m_t << " src=\"" << f->relPath() << f->name() << ".png\"/>";
}
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index 63bff45..6cf31ad 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -2722,6 +2722,11 @@ void HtmlGenerator::writeSplitBar(const char *name)
t << writeSplitBarAsString(name,relPath);
}
+void HtmlGenerator::writeNavigationPath(const char *s)
+{
+ t << substitute(s,"$relpath$",relPath);
+}
+
void HtmlGenerator::startContents()
{
t << "<div class=\"contents\">" << endl;
@@ -3037,14 +3042,21 @@ void HtmlGenerator::endLabels()
t << "</span>";
}
-void HtmlGenerator::writeInheritedSectionTitle(const char *id,
- const char *file,const char *anchor,const char *title,
- const char *name)
+void HtmlGenerator::writeInheritedSectionTitle(
+ const char *id, const char *ref,
+ const char *file, const char *anchor,
+ const char *title, const char *name)
{
DBG_HTML(t << "<!-- writeInheritedSectionTitle -->" << endl;)
QCString a = anchor;
if (!a.isEmpty()) a.prepend("#");
- QCString classLink = QCString("<a class=\"el\" href=\"")+correctURL(file,relPath)+Doxygen::htmlFileExtension+a+"\">"+name+"</a>";
+ QCString classLink = QCString("<a class=\"el\" href=\"");
+ if (ref)
+ {
+ classLink+= externalLinkTarget() + externalRef(relPath,ref,TRUE);
+ }
+ classLink+=file+Doxygen::htmlFileExtension+a;
+ classLink+=QCString("\">")+name+"</a>";
t << "<tr class=\"inherit_header " << id << "\">"
<< "<td colspan=\"2\" onclick=\"javascript:toggleInherit('" << id << "')\">"
<< "<img src=\"" << relPath << "closed.png\" alt=\"-\"/>&nbsp;"
diff --git a/src/htmlgen.h b/src/htmlgen.h
index 58c534c..83599f4 100644
--- a/src/htmlgen.h
+++ b/src/htmlgen.h
@@ -29,6 +29,7 @@
class QFile;
class FTextStream;
+/** Generator for HTML output */
class HtmlGenerator : public OutputGenerator
{
public:
@@ -137,8 +138,9 @@ class HtmlGenerator : public OutputGenerator
void insertMemberAlign(bool);
void startMemberDescription(const char *anchor,const char *inheritId);
void endMemberDescription();
- void writeInheritedSectionTitle(const char *id,const char *file,
- const char *anchor,const char *title,const char *name);
+ void writeInheritedSectionTitle(const char *id, const char *ref,
+ const char *file, const char *anchor,
+ const char *title,const char *name);
void writeRuler() { t << "<hr/>"; }
void writeAnchor(const char *,const char *name)
@@ -200,6 +202,7 @@ class HtmlGenerator : public OutputGenerator
void startQuickIndices() {}
void endQuickIndices();
void writeSplitBar(const char *name);
+ void writeNavigationPath(const char *s);
void writeLogo();
void writeQuickLinks(bool compact,HighlightedItem hli,const char *file);
void startContents();
diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp
index 2860296..86d4e42 100644
--- a/src/htmlhelp.cpp
+++ b/src/htmlhelp.cpp
@@ -34,6 +34,7 @@
//----------------------------------------------------------------------------
+/** Class representing a field in the HTML help index. */
struct IndexField
{
QCString name;
@@ -43,6 +44,7 @@ struct IndexField
bool reversed;
};
+/** Sorted dictionary of IndexField objects. */
class IndexFieldSDict : public SDict<IndexField>
{
public:
@@ -54,8 +56,8 @@ class IndexFieldSDict : public SDict<IndexField>
}
};
-/*! A helper class for HtmlHelp that manages a two level index in
- * alphabetical order
+/** A helper class for HtmlHelp that manages a two level index in
+ * alphabetical order.
*/
class HtmlHelpIndex
{
diff --git a/src/htmlhelp.h b/src/htmlhelp.h
index 669dd24..524f8f1 100644
--- a/src/htmlhelp.h
+++ b/src/htmlhelp.h
@@ -30,7 +30,8 @@ class QFile;
class Definition;
class HtmlHelpIndex;
-/*! A class that generated the HTML Help specific files.
+/** A class that generated the HTML Help specific files.
+ *
* These files can be used with the Microsoft HTML Help workshop
* to generate compressed HTML files (.chm).
*/
diff --git a/src/image.cpp b/src/image.cpp
index 20fa868..8afab58 100644
--- a/src/image.cpp
+++ b/src/image.cpp
@@ -25,6 +25,7 @@
typedef unsigned char Byte;
+/** Helper struct representing a RGBA color */
struct Color
{
Byte red;
diff --git a/src/image.h b/src/image.h
index a73be0d..5fb98e6 100644
--- a/src/image.h
+++ b/src/image.h
@@ -20,6 +20,7 @@
#define _IMAGE_H
#include <qglobal.h>
+/** Class representing a bitmap image generated by doxygen. */
class Image
{
public:
@@ -49,6 +50,7 @@ class Image
uchar *data;
};
+/** Class representing a bitmap image colored based on hue/sat/gamma settings. */
class ColoredImage
{
public:
diff --git a/src/index.cpp b/src/index.cpp
index ea240f4..b2301a2 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -288,10 +288,16 @@ void endFileWithNavPath(Definition *d,OutputList &ol)
}
//----------------------------------------------------------------------
-template<class T> void addMembersToIndex(T *def,LayoutDocManager::LayoutPart part,const QCString &name,const QCString &anchor,bool addToIndex=TRUE)
+template<class T>
+void addMembersToIndex(T *def,LayoutDocManager::LayoutPart part,
+ const QCString &name,const QCString &anchor,
+ bool addToIndex=TRUE,bool preventSeparateIndex=FALSE)
{
bool hasMembers = def->getMemberLists().count()>0 || def->getMemberGroupSDict()!=0;
- Doxygen::indexList.addContentsItem(hasMembers,name,def->getReference(),def->getOutputFileBase(),anchor,hasMembers,addToIndex);
+ Doxygen::indexList.addContentsItem(hasMembers,name,
+ def->getReference(),def->getOutputFileBase(),anchor,
+ hasMembers && !preventSeparateIndex,
+ addToIndex);
int numClasses=0;
ClassSDict *classes = def->getClassSDict();
if (classes)
@@ -321,19 +327,41 @@ template<class T> void addMembersToIndex(T *def,LayoutDocManager::LayoutPart par
MemberDef *md;
for (mi.toFirst();(md=mi.current());++mi)
{
+ LockingPtr<MemberList> enumList = md->enumFieldList();
+ bool isDir = enumList!=0 && md->isEnumerate();
if (md->name().find('@')==-1)
{
if (md->getOuterScope()==def)
{
- Doxygen::indexList.addContentsItem(FALSE,
+ Doxygen::indexList.addContentsItem(isDir,
md->name(),md->getReference(),md->getOutputFileBase(),md->anchor(),FALSE,addToIndex);
}
else // inherited member
{
- Doxygen::indexList.addContentsItem(FALSE,
+ Doxygen::indexList.addContentsItem(isDir,
md->name(),def->getReference(),def->getOutputFileBase(),md->anchor(),FALSE,addToIndex);
}
}
+ if (isDir)
+ {
+ Doxygen::indexList.incContentsDepth();
+ MemberListIterator emli(*enumList);
+ MemberDef *emd;
+ for (emli.toFirst();(emd=emli.current());++emli)
+ {
+ if (emd->getOuterScope()==def)
+ {
+ Doxygen::indexList.addContentsItem(FALSE,
+ emd->name(),emd->getReference(),emd->getOutputFileBase(),emd->anchor(),FALSE,addToIndex);
+ }
+ else // inherited member
+ {
+ Doxygen::indexList.addContentsItem(FALSE,
+ emd->name(),def->getReference(),def->getOutputFileBase(),emd->anchor(),FALSE,addToIndex);
+ }
+ }
+ Doxygen::indexList.decContentsDepth();
+ }
}
}
}
@@ -351,8 +379,8 @@ template<class T> void addMembersToIndex(T *def,LayoutDocManager::LayoutPart par
if (cd->isLinkable())
{
bool isNestedClass = def->definitionType()==Definition::TypeClass;
- addMembersToIndex(cd,LayoutDocManager::Class,cd->className(),cd->anchor(),
- addToIndex && isNestedClass);
+ addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(FALSE),cd->anchor(),
+ addToIndex && isNestedClass,preventSeparateIndex);
}
}
}
@@ -526,6 +554,12 @@ static bool fileVisibleInIndex(FileDef *fd,bool &genSourceFile)
);
}
+static bool classVisibleInIndex(ClassDef *cd)
+{
+ static bool allExternals = Config_getBool("ALLEXTERNALS");
+ return (allExternals && cd->isLinkable()) || cd->isLinkableInProject();
+}
+
//----------------------------------------------------------------------------
static void writeDirTreeNode(OutputList &ol, DirDef *dd, int level, FTVHelp* ftv,bool addToIndex)
{
@@ -616,7 +650,7 @@ static void writeDirTreeNode(OutputList &ol, DirDef *dd, int level, FTVHelp* ftv
ol.parseText(fd->displayName());
ol.endIndexItem(reference,outputBase);
ol.endIndexListItem();
- if (ftv)
+ if (ftv && doc)
{
ftv->addContentsItem(FALSE,
fd->displayName(),
@@ -705,7 +739,7 @@ static void writeDirHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex)
ftv->addContentsItem(FALSE,fd->displayName(),
reference, outputBase, 0,
FALSE,FALSE,fd);
- if (addToIndex)
+ if (addToIndex && doc)
{
addMembersToIndex(fd,LayoutDocManager::File,
fd->displayName(),QCString());
@@ -918,9 +952,11 @@ static void writeHierarchicalIndex(OutputList &ol)
ol.pushGeneratorState();
//2.{
ol.disable(OutputGenerator::Html);
+ Doxygen::indexList.disable();
writeClassHierarchy(ol,0,addToIndex);
+ Doxygen::indexList.enable();
ol.popGeneratorState();
//2.}
@@ -1256,9 +1292,9 @@ void writeClassTree(ClassSDict *clDict,FTVHelp *ftv,bool addToIndex,bool globalO
}
if (!globalOnly ||
- cd->getOuterScope()==0 ||
- cd->getOuterScope()==Doxygen::globalScope
- )
+ cd->getOuterScope()==0 ||
+ cd->getOuterScope()==Doxygen::globalScope
+ )
{
int count=0;
if (cd->getClassSDict())
@@ -1273,14 +1309,18 @@ void writeClassTree(ClassSDict *clDict,FTVHelp *ftv,bool addToIndex,bool globalO
}
}
}
- if (cd->isLinkableInProject() && cd->templateMaster()==0)
+ if (classVisibleInIndex(cd) && cd->templateMaster()==0)
{
- ftv->addContentsItem(count>0,cd->className(),cd->getReference(),
- cd->getOutputFileBase(),0,FALSE,TRUE,cd);
+ ftv->addContentsItem(count>0,cd->displayName(FALSE),cd->getReference(),
+ cd->getOutputFileBase(),cd->anchor(),FALSE,TRUE,cd);
if (addToIndex &&
- (cd->getOuterScope()==0 || cd->getOuterScope()->definitionType()!=Definition::TypeClass))
+ !cd->isEmbeddedInOuterScope() &&
+ (cd->getOuterScope()==0 ||
+ cd->getOuterScope()->definitionType()!=Definition::TypeClass
+ )
+ )
{
- addMembersToIndex(cd,LayoutDocManager::Class,cd->className(),cd->anchor());
+ addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(FALSE),cd->anchor());
}
if (count>0)
{
@@ -1303,8 +1343,8 @@ static void writeNamespaceTree(NamespaceSDict *nsDict,FTVHelp *ftv,
NamespaceDef *nd;
for (nli.toFirst();(nd=nli.current());++nli)
{
- if (!rootOnly || (nd->isLinkableInProject() &&
- nd->getOuterScope()==Doxygen::globalScope))
+ if (/*nd->isLinkableInProject() && */
+ (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
{
int count=0;
if (nd->getNamespaceSDict())
@@ -1337,30 +1377,29 @@ static void writeNamespaceTree(NamespaceSDict *nsDict,FTVHelp *ftv,
count+=classCount;
}
- if (nd->getLanguage()==SrcLangExt_VHDL)
+
+ QCString ref;
+ QCString file;
+ if (nd->isLinkableInProject())
{
- QCString q=nd->getOutputFileBase().replace(0,strlen("namespace"),"class");
- ftv->addContentsItem(count>0,nd->localName(),nd->getReference(),q,0,FALSE,TRUE,nd);
- }
- else
- {
- ftv->addContentsItem(count>0,nd->localName(),nd->getReference(),
- nd->getOutputFileBase(),0,FALSE,TRUE,nd);
+ ref = nd->getReference();
+ file = nd->getOutputFileBase();
+ if (nd->getLanguage()==SrcLangExt_VHDL) // UGLY HACK
+ {
+ file=file.replace(0,strlen("namespace"),"class");
+ }
}
+ ftv->addContentsItem(count>0,nd->localName(),ref,file,0,FALSE,TRUE,nd);
+
if (addToIndex)
{
- if (nd->getLanguage()==SrcLangExt_VHDL) // UGLY HACK
- {
- QCString q=nd->getOutputFileBase().replace(0,strlen("namespace"),"class");
- Doxygen::indexList.addContentsItem(count>0,nd->localName(),nd->getReference(),q,QCString(),count>0,showClasses);
- }
- else
- {
- Doxygen::indexList.addContentsItem(count>0,nd->localName(),nd->getReference(),nd->getOutputFileBase(),QCString(),count>0,showClasses);
- }
+ Doxygen::indexList.addContentsItem(count>0,nd->localName(),ref,file,QCString(),
+ count>0 && !file.isEmpty(),addToIndex);
}
+ //printf("*** writeNamespaceTree count=%d addToIndex=%d showClasses=%d classCount=%d\n",
+ // count,addToIndex,showClasses,classCount);
if (count>0)
{
if (addToIndex) Doxygen::indexList.incContentsDepth();
@@ -1594,6 +1633,7 @@ static QCString letterToLabel(char startLetter)
//----------------------------------------------------------------------------
+/** Special class list where sorting takes IGNORE_PREFIX into account. */
class PrefixIgnoreClassList : public ClassList
{
public:
@@ -1608,6 +1648,7 @@ public:
}
};
+/** Class representing a cell in the alphabetical class index. */
class AlphaIndexTableCell
{
public:
@@ -1629,12 +1670,14 @@ class AlphaIndexTableCell
int m_col;
};
+/** Class representing a row in the alphabetical class index. */
class AlphaIndexTableRows : public QList<AlphaIndexTableCell>
{
public:
AlphaIndexTableRows() { setAutoDelete(TRUE); }
};
+/** Iterator for the cells in a row of the alphabetical class index. */
class AlphaIndexTableRowsIterator : public QListIterator<AlphaIndexTableCell>
{
public:
@@ -1642,6 +1685,7 @@ class AlphaIndexTableRowsIterator : public QListIterator<AlphaIndexTableCell>
QListIterator<AlphaIndexTableCell>(list) {}
};
+/** Class representing the columns in the alphabetical class index. */
class AlphaIndexTableColumns : public QList<AlphaIndexTableRows>
{
public:
@@ -1839,10 +1883,6 @@ static void writeAlphabeticalClassList(OutputList &ol)
{
nsDispName=namesp;
}
- if (cname.right(2)=="-g" || cname.right(2)=="-p")
- {
- cname = cname.left(cname.length()-2);
- }
ol.writeObjectLink(cd->getReference(),
cd->getOutputFileBase(),cd->anchor(),cname);
@@ -1909,7 +1949,7 @@ static void writeAlphabeticalIndex(OutputList &ol)
if (addToIndex)
{
- Doxygen::indexList.addContentsItem(TRUE,title,0,"classes",0,TRUE,TRUE);
+ Doxygen::indexList.addContentsItem(FALSE,title,0,"classes",0,FALSE,TRUE);
}
ol.startContents();
@@ -1961,9 +2001,11 @@ static void writeAnnotatedIndex(OutputList &ol)
// ---------------
ol.pushGeneratorState();
ol.disable(OutputGenerator::Html);
+ Doxygen::indexList.disable();
writeAnnotatedClassList(ol);
+ Doxygen::indexList.enable();
ol.popGeneratorState();
// ---------------
@@ -2380,6 +2422,7 @@ static void writeQuickMemberIndex(OutputList &ol,
//----------------------------------------------------------------------------
+/** Helper class representing a class member in the navigation menu. */
struct CmhlInfo
{
CmhlInfo(const char *fn,const char *t) : fname(fn), title(t) {}
@@ -2559,6 +2602,7 @@ static void writeClassMemberIndex(OutputList &ol)
//----------------------------------------------------------------------------
+/** Helper class representing a file member in the navigation menu. */
struct FmhlInfo
{
FmhlInfo(const char *fn,const char *t) : fname(fn), title(t) {}
@@ -2729,6 +2773,7 @@ static void writeFileMemberIndex(OutputList &ol)
//----------------------------------------------------------------------------
+/** Helper class representing a namespace member in the navigation menu. */
struct NmhlInfo
{
NmhlInfo(const char *fn,const char *t) : fname(fn), title(t) {}
@@ -3418,11 +3463,29 @@ static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp*
MemberDef *md;
for (mi.toFirst();(md=mi.current());++mi)
{
+ LockingPtr<MemberList> enumList = md->enumFieldList();
+ bool isDir = enumList!=0 && md->isEnumerate();
if (md->isVisible() && md->name().find('@')==-1)
{
- Doxygen::indexList.addContentsItem(FALSE,
+ Doxygen::indexList.addContentsItem(isDir,
md->name(),md->getReference(),
- md->getOutputFileBase(),md->anchor(),FALSE);
+ md->getOutputFileBase(),md->anchor(),FALSE,addToIndex);
+ }
+ if (isDir)
+ {
+ Doxygen::indexList.incContentsDepth();
+ MemberListIterator emli(*enumList);
+ MemberDef *emd;
+ for (emli.toFirst();(emd=emli.current());++emli)
+ {
+ if (emd->isVisible())
+ {
+ Doxygen::indexList.addContentsItem(FALSE,
+ emd->name(),emd->getReference(),emd->getOutputFileBase(),
+ emd->anchor(),FALSE,addToIndex);
+ }
+ }
+ Doxygen::indexList.decContentsDepth();
}
}
}
@@ -3435,9 +3498,16 @@ static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp*
{
if (cd->isVisible())
{
- Doxygen::indexList.addContentsItem(FALSE,
+ if (cd->isLinkable() && cd->isEmbeddedInOuterScope())
+ {
+ addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(FALSE),cd->anchor(),addToIndex,TRUE);
+ }
+ else // only index the class, not its members
+ {
+ Doxygen::indexList.addContentsItem(FALSE,
cd->localName(),cd->getReference(),
cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE);
+ }
}
}
}
@@ -3634,9 +3704,11 @@ static void writeGroupIndex(OutputList &ol)
// 2.{
ol.pushGeneratorState();
ol.disable(OutputGenerator::Html);
+ Doxygen::indexList.disable();
writeGroupHierarchy(ol,0,FALSE);
+ Doxygen::indexList.enable();
ol.popGeneratorState();
// 2.}
diff --git a/src/index.h b/src/index.h
index 9bb98b6..050350f 100644
--- a/src/index.h
+++ b/src/index.h
@@ -107,10 +107,16 @@ class IndexList : public IndexIntf
public:
/** Creates a list of indexes */
- IndexList() { m_intfs.setAutoDelete(TRUE); }
+ IndexList() { m_intfs.setAutoDelete(TRUE); m_enabled=TRUE; }
/** Add an index generator to the list */
void addIndex(IndexIntf *intf)
{ m_intfs.append(intf); }
+ void disable()
+ { m_enabled = FALSE; }
+ void enable()
+ { m_enabled = TRUE; }
+ bool isEnabled() const
+ { return m_enabled; }
// IndexIntf implementation
void initialize()
@@ -118,24 +124,26 @@ class IndexList : public IndexIntf
void finalize()
{ foreach(&IndexIntf::finalize); }
void incContentsDepth()
- { foreach(&IndexIntf::incContentsDepth); }
+ { if (m_enabled) foreach(&IndexIntf::incContentsDepth); }
void decContentsDepth()
- { foreach(&IndexIntf::decContentsDepth); }
+ { if (m_enabled) foreach(&IndexIntf::decContentsDepth); }
void addContentsItem(bool isDir, const char *name, const char *ref,
const char *file, const char *anchor,bool separateIndex=FALSE,bool addToNavIndex=FALSE,
Definition *def=0)
- { foreach<bool,const char *,const char *,const char *,const char*,bool,bool,Definition *>
+ { if (m_enabled) foreach<bool,const char *,const char *,const char *,const char*,bool,bool,Definition *>
(&IndexIntf::addContentsItem,isDir,name,ref,file,anchor,separateIndex,addToNavIndex,def); }
void addIndexItem(Definition *context,MemberDef *md,const char *title=0)
- { foreach<Definition *,MemberDef *>
+ { if (m_enabled) foreach<Definition *,MemberDef *>
(&IndexIntf::addIndexItem,context,md,title); }
void addIndexFile(const char *name)
- { foreach<const char *>(&IndexIntf::addIndexFile,name); }
+ { if (m_enabled) foreach<const char *>(&IndexIntf::addIndexFile,name); }
void addImageFile(const char *name)
- { foreach<const char *>(&IndexIntf::addImageFile,name); }
+ { if (m_enabled) foreach<const char *>(&IndexIntf::addImageFile,name); }
void addStyleSheetFile(const char *name)
- { foreach<const char *>(&IndexIntf::addStyleSheetFile,name); }
+ { if (m_enabled) foreach<const char *>(&IndexIntf::addStyleSheetFile,name); }
+ private:
+ bool m_enabled;
};
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index d86b5fc..7d326cb 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -60,121 +60,6 @@ static const char *getSectionName(int level)
return secLabels[QMIN(maxLevels-1,l)];
}
-#if 0
-static int rowspan(DocHtmlCell *cell)
-{
- int retval = 0;
- HtmlAttribList attrs = cell->attribs();
- uint i;
- for (i=0; i<attrs.count(); ++i)
- {
- if (attrs.at(i)->name.lower()=="rowspan")
- {
- retval = attrs.at(i)->value.toInt();
- break;
- }
- }
- return retval;
-}
-
-static int colspan(DocHtmlCell *cell)
-{
- int retval = 1;
- HtmlAttribList attrs = cell->attribs();
- uint i;
- for (i=0; i<attrs.count(); ++i)
- {
- if (attrs.at(i)->name.lower()=="colspan")
- {
- retval = QMAX(1,attrs.at(i)->value.toInt());
- break;
- }
- }
- return retval;
-}
-
-static int align(DocHtmlCell *cell)
-{
- HtmlAttribList attrs = cell->attribs();
- uint i;
- for (i=0; i<attrs.count(); ++i)
- {
- if (attrs.at(i)->name.lower()=="align")
- {
- if (attrs.at(i)->value.lower()=="center")
- return 1;
- else if (attrs.at(i)->value.lower()=="right")
- return 2;
- else return 0;
- }
- }
- return 0;
-}
-
-struct ActiveRowSpan
-{
- ActiveRowSpan(int rows,int col) : rowsLeft(rows), column(col) {}
- int rowsLeft;
- int column;
-};
-
-typedef QList<ActiveRowSpan> RowSpanList;
-
-static int determineNumCols(DocHtmlTable *table)
-{
- RowSpanList rowSpans;
- rowSpans.setAutoDelete(TRUE);
- int maxCols=0;
- int rowIdx=1;
- QListIterator<DocNode> li(table->children());
- DocNode *rowNode;
- for (li.toFirst();(rowNode=li.current());++li)
- {
- int colIdx=1;
- int cells=0;
- if (rowNode->kind()==DocNode::Kind_HtmlRow)
- {
- uint i;
- DocHtmlRow *row = (DocHtmlRow*)rowNode;
- QListIterator<DocNode> rli(row->children());
- DocNode *cellNode;
- for (rli.toFirst();(cellNode=rli.current());++rli)
- {
- if (cellNode->kind()==DocNode::Kind_HtmlCell)
- {
- DocHtmlCell *cell = (DocHtmlCell*)cellNode;
- int rs = rowspan(cell);
- int cs = colspan(cell);
-
- for (i=0;i<rowSpans.count();i++)
- {
- if (rowSpans.at(i)->rowsLeft>0 &&
- rowSpans.at(i)->column==colIdx)
- {
- colIdx=rowSpans.at(i)->column+1;
- cells++;
- }
- }
- if (rs>0) rowSpans.append(new ActiveRowSpan(rs,colIdx));
- cell->setRowIndex(rowIdx);
- cell->setColumnIndex(colIdx);
- colIdx+=cs;
- cells++;
- }
- }
- for (i=0;i<rowSpans.count();i++)
- {
- if (rowSpans.at(i)->rowsLeft>0) rowSpans.at(i)->rowsLeft--;
- }
- row->setVisibleCells(cells);
- rowIdx++;
- }
- if (colIdx-1>maxCols) maxCols=colIdx-1;
- }
- return maxCols;
-}
-#endif
-
QCString LatexDocVisitor::escapeMakeIndexChars(const char *s)
{
QCString result;
@@ -1363,25 +1248,6 @@ void LatexDocVisitor::visitPost(DocSecRefList *)
m_t << "\\normalsize" << endl;
}
-//void LatexDocVisitor::visitPre(DocLanguage *l)
-//{
-// QCString langId = Config_getEnum("OUTPUT_LANGUAGE");
-// if (l->id().lower()!=langId.lower())
-// {
-// pushEnabled();
-// m_hide = TRUE;
-// }
-//}
-//
-//void LatexDocVisitor::visitPost(DocLanguage *l)
-//{
-// QCString langId = Config_getEnum("OUTPUT_LANGUAGE");
-// if (l->id().lower()!=langId.lower())
-// {
-// popEnabled();
-// }
-//}
-
void LatexDocVisitor::visitPre(DocParamSect *s)
{
if (m_hide) return;
diff --git a/src/latexgen.h b/src/latexgen.h
index 254632f..cd47ac3 100644
--- a/src/latexgen.h
+++ b/src/latexgen.h
@@ -22,6 +22,7 @@
class QFile;
+/** Generator for LaTeX output. */
class LatexGenerator : public OutputGenerator
{
public:
@@ -164,7 +165,7 @@ class LatexGenerator : public OutputGenerator
void endSmall() { t << "\\normalsize "; }
void startMemberDescription(const char *,const char *);
void endMemberDescription();
- void writeInheritedSectionTitle(const char *,const char *,
+ void writeInheritedSectionTitle(const char *,const char *,const char *,
const char *,const char *,const char *) {}
void startDescList(SectionTypes) { t << "\\begin{Desc}\n\\item["; }
void endDescList() { t << "\\end{Desc}" << endl; }
@@ -187,6 +188,7 @@ class LatexGenerator : public OutputGenerator
void startQuickIndices() {}
void endQuickIndices() {}
void writeSplitBar(const char *) {}
+ void writeNavigationPath(const char *) {}
void writeLogo() {}
void writeQuickLinks(bool,HighlightedItem,const char*) {}
void startContents() {}
diff --git a/src/mangen.h b/src/mangen.h
index 7187e5d..fe951ad 100644
--- a/src/mangen.h
+++ b/src/mangen.h
@@ -22,6 +22,7 @@
class QFile;
+/** Generator for Man page output. */
class ManGenerator : public OutputGenerator
{
public:
@@ -160,7 +161,7 @@ class ManGenerator : public OutputGenerator
void endSmall() {}
void startMemberDescription(const char *,const char *) { t << "\n.RI \"\\fI"; firstCol=FALSE; }
void endMemberDescription() { t << "\\fP\""; firstCol=FALSE; }
- void writeInheritedSectionTitle(const char *,const char *,
+ void writeInheritedSectionTitle(const char *,const char *,const char *,
const char *,const char *,const char *) {}
void startDescList(SectionTypes);
void endDescList() {}
@@ -184,6 +185,7 @@ class ManGenerator : public OutputGenerator
void startQuickIndices() {}
void endQuickIndices() {}
void writeSplitBar(const char *) {}
+ void writeNavigationPath(const char *) {}
void writeLogo() {}
void writeQuickLinks(bool,HighlightedItem,const char *) {}
void startContents() {}
diff --git a/src/markdown.cpp b/src/markdown.cpp
index bb1a5a3..559828f 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -1339,6 +1339,11 @@ static bool isCodeBlock(const char *data,int offset,int size,int &indent)
//printf(">isCodeBlock: line is not indented enough %d<4\n",indent0);
return FALSE;
}
+ if (indent0>=size || data[indent0]=='\n') // empty line does not start a code block
+ {
+ //printf("only spaces at the end of a comment block\n");
+ return FALSE;
+ }
i=offset;
int nl=0;
@@ -1382,8 +1387,8 @@ static bool isCodeBlock(const char *data,int offset,int size,int &indent)
{
return FALSE;
}
- //printf(">isCodeBlock global indent %d>=%d+4=%d\n",
- // indent0,indent,indent0>=indent+4);
+ //printf(">isCodeBlock global indent %d>=%d+4=%d nl=%d\n",
+ // indent0,indent,indent0>=indent+4,nl);
return indent0>=indent+codeBlockIndent;
}
}
@@ -2121,6 +2126,7 @@ static QCString detab(const QCString &s,int &refIndent)
}
if (minIndent!=maxIndent) refIndent=minIndent; else refIndent=0;
out.addChar(0);
+ //printf("detab refIndent=%d\n",refIndent);
return out.get();
}
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 539b621..8591ca3 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -1837,9 +1837,16 @@ void MemberDef::_getLabels(QStrList &sl,Definition *container) const
if (isNew()) sl.append("new");
if (isOptional()) sl.append("optional");
if (isRequired()) sl.append("required");
+
+ if (isNonAtomic()) sl.append("nonatomic");
+ else if (isObjCProperty()) sl.append("atomic");
+
+ // mutual exclusive Objective 2.0 property attributes
if (isAssign()) sl.append("assign");
else if (isCopy()) sl.append("copy");
else if (isRetain()) sl.append("retain");
+ else if (isWeak()) sl.append("weak");
+ else if (isStrong()) sl.append("strong");
if (!isObjCMethod())
{
@@ -2774,8 +2781,9 @@ void MemberDef::warnIfUndocumented()
// name().data(),prot);
if ((!hasUserDocumentation() && !extractAll) &&
!isFriendClass() &&
- name().find('@')==-1 && d->name().find('@')==-1 &&
- protectionLevelVisible(m_impl->prot)
+ name().find('@')==-1 && d && d->name().find('@')==-1 &&
+ protectionLevelVisible(m_impl->prot) &&
+ !isReference()
)
{
warn_undoc(getDefFileName(),getDefLine(),"warning: Member %s%s (%s) of %s %s is not documented.",
@@ -3854,6 +3862,17 @@ bool MemberDef::isRetain() const
return (m_impl->memSpec&Entry::Retain)!=0;
}
+bool MemberDef::isWeak() const
+{
+ makeResident();
+ return (m_impl->memSpec&Entry::Weak)!=0;
+}
+
+bool MemberDef::isStrong() const
+{
+ makeResident();
+ return (m_impl->memSpec&Entry::Strong)!=0;
+}
bool MemberDef::isImplementation() const
{
@@ -4613,3 +4632,7 @@ void MemberDef::unlock() const
}
}
+QCString MemberDef::displayName(bool) const
+{
+ return Definition::name();
+}
diff --git a/src/memberdef.h b/src/memberdef.h
index 8c916cb..3658ac3 100644
--- a/src/memberdef.h
+++ b/src/memberdef.h
@@ -40,12 +40,7 @@ class QTextStream;
class ArgumentList;
class MemberDefImpl;
-struct SourceReference
-{
- FileDef *fd;
- QCString anchor;
-};
-
+/** A model of a class/file/namespace member symbol. */
class MemberDef : public Definition
{
public:
@@ -157,6 +152,8 @@ class MemberDef : public Definition
bool isCopy() const;
bool isAssign() const;
bool isRetain() const;
+ bool isWeak() const;
+ bool isStrong() const;
bool isNew() const;
bool isSealed() const;
bool isImplementation() const;
@@ -238,7 +235,7 @@ class MemberDef : public Definition
ClassDef *category() const;
- QCString displayName() const { return Definition::name(); }
+ QCString displayName(bool=TRUE) const;
//-----------------------------------------------------------------------------------
// ---- setters -----
diff --git a/src/membergroup.h b/src/membergroup.h
index fdd219b..6f0aa43 100644
--- a/src/membergroup.h
+++ b/src/membergroup.h
@@ -36,6 +36,7 @@ class Definition;
class StorageIntf;
struct ListItemInfo;
+/** A class representing a group of members. */
class MemberGroup
{
public:
@@ -106,10 +107,12 @@ class MemberGroup
QList<ListItemInfo> *m_xrefListItems;
};
+/** A list of MemberGroup objects. */
class MemberGroupList : public QList<MemberGroup>
{
};
+/** An iterator for MemberGroup objects in a MemberGroupList. */
class MemberGroupListIterator : public QListIterator<MemberGroup>
{
public:
@@ -117,6 +120,7 @@ class MemberGroupListIterator : public QListIterator<MemberGroup>
QListIterator<MemberGroup>(l) {}
};
+/** A sorted dictionary of MemberGroup objects. */
class MemberGroupSDict : public SIntDict<MemberGroup>
{
public:
@@ -128,7 +132,7 @@ class MemberGroupSDict : public SIntDict<MemberGroup>
}
};
-
+/** Data collected for a member group */
struct MemberGroupInfo
{
MemberGroupInfo() : m_sli(0) {}
@@ -141,19 +145,4 @@ struct MemberGroupInfo
QList<ListItemInfo> *m_sli;
};
-//class MemberGroupDict : public QIntDict<MemberGroup>
-//{
-// public:
-// MemberGroupDict(int size) : QIntDict<MemberGroup>(size) {}
-// ~MemberGroupDict() {}
-//};
-
-//class MemberGroupDictIterator : public QIntDictIterator<MemberGroup>
-//{
-// public:
-// MemberGroupDictIterator(const MemberGroupDict &d) :
-// QIntDictIterator<MemberGroup>(d) {}
-// ~MemberGroupDictIterator() {}
-//};
-
#endif
diff --git a/src/memberlist.cpp b/src/memberlist.cpp
index c11c6b4..0d74cd6 100644
--- a/src/memberlist.cpp
+++ b/src/memberlist.cpp
@@ -491,7 +491,9 @@ void MemberList::writeDeclarations(OutputList &ol,
int num = numDecMembers();
if (inheritedFrom)
{
- if ( cd && !optimizeVhdl && countInheritableMembers(inheritedFrom)>0 )
+ //if ( cd && !optimizeVhdl && countInheritableMembers(inheritedFrom)>0 )
+ if ( cd && !optimizeVhdl && cd->countMembersIncludingGrouped(
+ m_listType,inheritedFrom,TRUE)>0 )
{
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
@@ -499,7 +501,8 @@ void MemberList::writeDeclarations(OutputList &ol,
stripPath(cd->getOutputFileBase());
if (title)
{
- ol.writeInheritedSectionTitle(inheritId,cd->getOutputFileBase(),
+ ol.writeInheritedSectionTitle(inheritId,cd->getReference(),
+ cd->getOutputFileBase(),
cd->anchor(),title,cd->displayName());
}
ol.popGeneratorState();
diff --git a/src/memberlist.h b/src/memberlist.h
index facf54f..2c46f02 100644
--- a/src/memberlist.h
+++ b/src/memberlist.h
@@ -27,6 +27,7 @@ class MemberGroup;
class MemberGroupList;
class StorageIntf;
+/** A list of MemberDef objects. */
class MemberList : public QList<MemberDef>
{
public:
@@ -180,6 +181,7 @@ class MemberList : public QList<MemberDef>
bool m_needsSorting;
};
+/** An iterator for MemberDef objects in a MemberList. */
class MemberListIterator : public QListIterator<MemberDef>
{
public:
@@ -187,6 +189,7 @@ class MemberListIterator : public QListIterator<MemberDef>
virtual ~MemberListIterator() {}
};
+/** An unsorted dictionary of MemberDef objects. */
class MemberDict : public QDict<MemberDef>
{
public:
@@ -194,6 +197,7 @@ class MemberDict : public QDict<MemberDef>
virtual ~MemberDict() {}
};
+/** A sorted dictionary of MemberDef objects. */
class MemberSDict : public SDict<MemberDef>
{
public:
diff --git a/src/membername.h b/src/membername.h
index e5fbaa3..68a5293 100644
--- a/src/membername.h
+++ b/src/membername.h
@@ -22,6 +22,7 @@
#include "memberdef.h"
#include "sortdict.h"
+/** Class representing all MemberDef objects with the same name */
class MemberName : public QList<MemberDef>
{
public:
@@ -34,12 +35,14 @@ class MemberName : public QList<MemberDef>
QCString name;
};
+/** Iterator for MemberDef objects in a MemberName list. */
class MemberNameIterator : public QListIterator<MemberDef>
{
public:
MemberNameIterator( const MemberName &list);
};
+/** Sorted dictionary of MemberName objects. */
class MemberNameSDict : public SDict<MemberName>
{
public:
@@ -49,6 +52,7 @@ class MemberNameSDict : public SDict<MemberName>
int compareItems(GCI item1,GCI item2);
};
+/** Data associated with a MemberDef in an inheritance relation. */
struct MemberInfo
{
MemberInfo(MemberDef *md,Protection p,Specifier v,bool inh) :
@@ -63,6 +67,7 @@ struct MemberInfo
ClassDef *ambigClass;
};
+/** Class representing all MemberInfo objects with the same name */
class MemberNameInfo : public QList<MemberInfo>
{
public:
@@ -74,6 +79,7 @@ class MemberNameInfo : public QList<MemberInfo>
QCString name;
};
+/** Iterator for MemberInfo objects in a MemberNameInfo list. */
class MemberNameInfoIterator : public QListIterator<MemberInfo>
{
public:
@@ -81,7 +87,7 @@ class MemberNameInfoIterator : public QListIterator<MemberInfo>
: QListIterator<MemberInfo>(mnii) {}
};
-
+/** Sorted dictionary of MemberNameInfo objects. */
class MemberNameInfoSDict : public SDict<MemberNameInfo>
{
public:
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index 22ca7a3..ccc80c3 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -739,9 +739,9 @@ void NamespaceDef::addListReferences()
}
}
-QCString NamespaceDef::displayName() const
+QCString NamespaceDef::displayName(bool includeScope) const
{
- QCString result=name();
+ QCString result=includeScope ? name() : localName();
SrcLangExt lang = getLanguage();
QCString sep = getLanguageSpecificSeparator(lang);
if (sep!="::")
diff --git a/src/namespacedef.h b/src/namespacedef.h
index 52a4e85..a88b5db 100644
--- a/src/namespacedef.h
+++ b/src/namespacedef.h
@@ -34,6 +34,7 @@ class NamespaceList;
class MemberGroupSDict;
class NamespaceSDict;
+/** A model of a namespace symbol. */
class NamespaceDef : public Definition
{
public:
@@ -61,7 +62,7 @@ class NamespaceDef : public Definition
void addUsingDeclaration(Definition *def);
SDict<Definition> *getUsedClasses() const { return usingDeclList; }
void combineUsingRelations();
- QCString displayName() const;
+ QCString displayName(bool=TRUE) const;
QCString localName() const;
bool isLinkableInProject() const;
@@ -123,6 +124,7 @@ class NamespaceDef : public Definition
bool m_subGrouping;
};
+/** A list of NamespaceDef objects. */
class NamespaceList : public QList<NamespaceDef>
{
public:
@@ -135,6 +137,7 @@ class NamespaceList : public QList<NamespaceDef>
}
};
+/** An iterator for NamespaceDef objects in a NamespaceList. */
class NamespaceListIterator : public QListIterator<NamespaceDef>
{
public:
@@ -142,6 +145,7 @@ class NamespaceListIterator : public QListIterator<NamespaceDef>
QListIterator<NamespaceDef>(l) {}
};
+/** An unsorted dictionary of NamespaceDef objects. */
class NamespaceDict : public QDict<NamespaceDef>
{
public:
@@ -149,6 +153,7 @@ class NamespaceDict : public QDict<NamespaceDef>
~NamespaceDict() {}
};
+/** A sorted dictionary of NamespaceDef objects. */
class NamespaceSDict : public SDict<NamespaceDef>
{
public:
diff --git a/src/navtree.js b/src/navtree.js
index edaaee3..1b4931c 100644
--- a/src/navtree.js
+++ b/src/navtree.js
@@ -1,11 +1,10 @@
-var navTreeIndex;
var navTreeSubIndices = new Array();
function getData(varName)
{
var i = varName.lastIndexOf('/');
var n = i>=0 ? varName.substring(i+1) : varName;
- return eval(n);
+ return eval(n.replace(/\-/g,'_'));
}
function stripPath(uri)
@@ -246,11 +245,13 @@ function highlightAnchor()
if (anchor.parent().attr('class')=='memItemLeft'){
var rows = $('.memberdecls tr[class$="'+
window.location.hash.substring(1)+'"]');
- glowEffect(rows.children(),300);
+ glowEffect(rows.children(),300); // member without details
+ } else if (anchor.parents().slice(2).prop('tagName')=='TR') {
+ glowEffect(anchor.parents('div.memitem'),1000); // enum value
} else if (anchor.parent().is(":header")) {
- glowEffect(anchor.parent(),1000);
+ glowEffect(anchor.parent(),1000); // section header
} else {
- glowEffect(anchor.next(),1000);
+ glowEffect(anchor.next(),1000); // normal member
}
}
@@ -329,52 +330,43 @@ function getNode(o, po)
}
}
-function gotoNode(o,subIndex,root,hash)
+function gotoNode(o,subIndex,root,hash,relpath)
{
var nti = navTreeSubIndices[subIndex][root+hash];
o.breadcrumbs = nti ? nti : navTreeSubIndices[subIndex][root];
- if (o.breadcrumbs)
- {
+ if (!o.breadcrumbs && root!=NAVTREE[0][1]) { // fallback: show index
+ navTo(o,NAVTREE[0][1],"",relpath);
+ $('.item').removeClass('selected');
+ $('.item').removeAttr('id');
+ }
+ if (o.breadcrumbs) {
o.breadcrumbs.unshift(0); // add 0 for root node
showNode(o, o.node, 0);
}
}
-function gotoSubIndex(o,root,hash,relpath)
+function navTo(o,root,hash,relpath)
{
- if (hash.match(/^#l\d+$/))
- {
+ if (hash.match(/^#l\d+$/)) {
+ var anchor=$('a[name='+hash.substring(1)+']');
+ glowEffect(anchor.parent(),1000); // line number
hash=''; // strip line number anchors
}
var url=root+hash;
var i=-1;
- while (navTreeIndex[i+1]<=url) i++;
+ while (NAVTREEINDEX[i+1]<=url) i++;
if (navTreeSubIndices[i]) {
- gotoNode(o,i,root,hash)
+ gotoNode(o,i,root,hash,relpath)
} else {
getScript(relpath+'navtreeindex'+i,function(){
navTreeSubIndices[i] = eval('NAVTREEINDEX'+i);
if (navTreeSubIndices[i]) {
- gotoNode(o,i,root,hash);
+ gotoNode(o,i,root,hash,relpath);
}
},true);
}
}
-function navTo(o,root,hash,relpath)
-{
- if (navTreeIndex){
- gotoSubIndex(o,root,hash,relpath);
- } else {
- getScript(relpath+"navtreeindex",function(){
- navTreeIndex = eval('NAVTREEINDEX');
- if (navTreeIndex){
- gotoSubIndex(o,root,hash,relpath);
- }
- },true);
- }
-}
-
function initNavTree(toroot,relpath)
{
var o = new Object();
diff --git a/src/navtree_js.h b/src/navtree_js.h
index 9f9e996..e243466 100644
--- a/src/navtree_js.h
+++ b/src/navtree_js.h
@@ -1,11 +1,10 @@
-"var navTreeIndex;\n"
"var navTreeSubIndices = new Array();\n"
"\n"
"function getData(varName)\n"
"{\n"
" var i = varName.lastIndexOf('/');\n"
" var n = i>=0 ? varName.substring(i+1) : varName;\n"
-" return eval(n);\n"
+" return eval(n.replace(/\\-/g,'_'));\n"
"}\n"
"\n"
"function stripPath(uri)\n"
@@ -246,11 +245,13 @@
" if (anchor.parent().attr('class')=='memItemLeft'){\n"
" var rows = $('.memberdecls tr[class$=\"'+\n"
" window.location.hash.substring(1)+'\"]');\n"
-" glowEffect(rows.children(),300);\n"
+" glowEffect(rows.children(),300); // member without details\n"
+" } else if (anchor.parents().slice(2).prop('tagName')=='TR') {\n"
+" glowEffect(anchor.parents('div.memitem'),1000); // enum value\n"
" } else if (anchor.parent().is(\":header\")) {\n"
-" glowEffect(anchor.parent(),1000);\n"
+" glowEffect(anchor.parent(),1000); // section header\n"
" } else {\n"
-" glowEffect(anchor.next(),1000);\n"
+" glowEffect(anchor.next(),1000); // normal member\n"
" }\n"
"}\n"
"\n"
@@ -329,52 +330,43 @@
" }\n"
"}\n"
"\n"
-"function gotoNode(o,subIndex,root,hash)\n"
+"function gotoNode(o,subIndex,root,hash,relpath)\n"
"{\n"
" var nti = navTreeSubIndices[subIndex][root+hash];\n"
" o.breadcrumbs = nti ? nti : navTreeSubIndices[subIndex][root];\n"
-" if (o.breadcrumbs)\n"
-" {\n"
+" if (!o.breadcrumbs && root!=NAVTREE[0][1]) { // fallback: show index\n"
+" navTo(o,NAVTREE[0][1],\"\",relpath);\n"
+" $('.item').removeClass('selected');\n"
+" $('.item').removeAttr('id');\n"
+" }\n"
+" if (o.breadcrumbs) {\n"
" o.breadcrumbs.unshift(0); // add 0 for root node\n"
" showNode(o, o.node, 0);\n"
" }\n"
"}\n"
"\n"
-"function gotoSubIndex(o,root,hash,relpath)\n"
+"function navTo(o,root,hash,relpath)\n"
"{\n"
-" if (hash.match(/^#l\\d+$/)) \n"
-" {\n"
+" if (hash.match(/^#l\\d+$/)) {\n"
+" var anchor=$('a[name='+hash.substring(1)+']');\n"
+" glowEffect(anchor.parent(),1000); // line number\n"
" hash=''; // strip line number anchors\n"
" }\n"
" var url=root+hash;\n"
" var i=-1;\n"
-" while (navTreeIndex[i+1]<=url) i++;\n"
+" while (NAVTREEINDEX[i+1]<=url) i++;\n"
" if (navTreeSubIndices[i]) {\n"
-" gotoNode(o,i,root,hash)\n"
+" gotoNode(o,i,root,hash,relpath)\n"
" } else {\n"
" getScript(relpath+'navtreeindex'+i,function(){\n"
" navTreeSubIndices[i] = eval('NAVTREEINDEX'+i);\n"
" if (navTreeSubIndices[i]) {\n"
-" gotoNode(o,i,root,hash);\n"
+" gotoNode(o,i,root,hash,relpath);\n"
" }\n"
" },true);\n"
" }\n"
"}\n"
"\n"
-"function navTo(o,root,hash,relpath)\n"
-"{\n"
-" if (navTreeIndex){\n"
-" gotoSubIndex(o,root,hash,relpath);\n"
-" } else {\n"
-" getScript(relpath+\"navtreeindex\",function(){\n"
-" navTreeIndex = eval('NAVTREEINDEX');\n"
-" if (navTreeIndex){\n"
-" gotoSubIndex(o,root,hash,relpath);\n"
-" }\n"
-" },true);\n"
-" } \n"
-"}\n"
-"\n"
"function initNavTree(toroot,relpath)\n"
"{\n"
" var o = new Object();\n"
diff --git a/src/outputgen.h b/src/outputgen.h
index 7493a60..e41c1a6 100644
--- a/src/outputgen.h
+++ b/src/outputgen.h
@@ -38,7 +38,7 @@ class MemberDef;
class GroupDef;
class Definition;
-/*! \brief Output interface for code parser.
+/** Output interface for code parser.
*/
class CodeOutputInterface
{
@@ -76,7 +76,7 @@ class CodeOutputInterface
Definition *symDef,Definition *context) = 0;
};
-/*! \brief Base Interface used for generating output outside of the
+/** Base Interface used for generating output outside of the
* comment blocks.
*
* This abstract class is used by output generation functions
@@ -263,7 +263,7 @@ class BaseOutputDocInterface : public CodeOutputInterface
virtual void endSubsubsection() = 0;
};
-/*! \brief Abstract output generator.
+/** Abstract output generator.
*
* Subclass this class to add support for a new output format
*/
@@ -364,9 +364,9 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void writeEndAnnoItem(const char *name) = 0;
virtual void startMemberDescription(const char *anchor,const char *inheritId) = 0;
virtual void endMemberDescription() = 0;
- virtual void writeInheritedSectionTitle(const char *id,
- const char *file,const char *anchor,
- const char *title,const char *name) = 0;
+ virtual void writeInheritedSectionTitle(const char *id,const char *ref,
+ const char *file,const char *anchor,
+ const char *title,const char *name) = 0;
virtual void startIndent() = 0;
virtual void endIndent() = 0;
virtual void writeSynopsis() = 0;
@@ -386,6 +386,7 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void startQuickIndices() = 0;
virtual void endQuickIndices() = 0;
virtual void writeSplitBar(const char *) = 0;
+ virtual void writeNavigationPath(const char *) = 0;
virtual void writeLogo() = 0;
virtual void writeQuickLinks(bool compact,HighlightedItem hli,const char *file) = 0;
virtual void startContents() = 0;
@@ -440,7 +441,7 @@ class OutputGenerator : public BaseOutputDocInterface
OutputGenerator &operator=(const OutputGenerator &o);
};
-/*! \brief Interface used for generating documentation.
+/** Interface used for generating documentation.
*
* This abstract class is used by several functions
* to generate the output for a specific format.
diff --git a/src/outputlist.cpp b/src/outputlist.cpp
index 8a1947c..d184b58 100644
--- a/src/outputlist.cpp
+++ b/src/outputlist.cpp
@@ -273,6 +273,18 @@ void OutputList::forall(void (OutputGenerator::*func)(a1,a2,a3,a4,a5),a1,a2,a3,a
} \
}
+// six arguments
+#define FORALL6(a1,a2,a3,a4,a5,a6,p1,p2,p3,p4,p5,p6) \
+void OutputList::forall(void (OutputGenerator::*func)(a1,a2,a3,a4,a5,a6),a1,a2,a3,a4,a5,a6) \
+{ \
+ OutputGenerator *og=outputs->first(); \
+ while (og) \
+ { \
+ if (og->isEnabled()) (og->*func)(p1,p2,p3,p4,p5,p6); \
+ og=outputs->next(); \
+ } \
+}
+
// now instantiate only the ones we need.
FORALL1(const char *a1,a1)
@@ -312,6 +324,7 @@ FORALL4(const char *a1,const char *a2,const char *a3,const char *a4,a1,a2,a3,a4)
FORALL4(const char *a1,const char *a2,const char *a3,int a4,a1,a2,a3,a4)
FORALL5(const char *a1,const char *a2,const char *a3,const char *a4,const char *a5,a1,a2,a3,a4,a5)
FORALL5(const char *a1,const char *a2,const char *a3,const char *a4,bool a5,a1,a2,a3,a4,a5)
+FORALL6(const char *a1,const char *a2,const char *a3,const char *a4,const char *a5,const char *a6,a1,a2,a3,a4,a5,a6)
//--------------------------------------------------------------------------
diff --git a/src/outputlist.h b/src/outputlist.h
index a7a4f84..b7bb5a3 100644
--- a/src/outputlist.h
+++ b/src/outputlist.h
@@ -33,6 +33,8 @@
void forall(void (OutputGenerator::*func)(arg1,arg2,arg3,arg4),arg1,arg2,arg3,arg4)
#define FORALLPROTO5(arg1,arg2,arg3,arg4,arg5) \
void forall(void (OutputGenerator::*func)(arg1,arg2,arg3,arg4,arg5),arg1,arg2,arg3,arg4,arg5)
+#define FORALLPROTO6(arg1,arg2,arg3,arg4,arg5,arg6) \
+ void forall(void (OutputGenerator::*func)(arg1,arg2,arg3,arg4,arg5,arg6),arg1,arg2,arg3,arg4,arg5,arg6)
class ClassDiagram;
class DotClassGraph;
@@ -42,6 +44,9 @@ class DotGfxHierarchyTable;
class SectionDict;
class DotGroupCollaboration;
+/** Class representing a list of output generators that are written to
+ * in parallel.
+ */
class OutputList : public OutputDocInterface
{
public:
@@ -299,9 +304,11 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startMemberDescription,anchor,inheritId); }
void endMemberDescription()
{ forall(&OutputGenerator::endMemberDescription); }
- void writeInheritedSectionTitle(const char *id,const char *file,
- const char *anchor,const char *title,const char *name)
- { forall(&OutputGenerator::writeInheritedSectionTitle,id,file,anchor,title,name); }
+ void writeInheritedSectionTitle(const char *id, const char *ref,
+ const char *file, const char *anchor,
+ const char *title,const char *name)
+ { forall(&OutputGenerator::writeInheritedSectionTitle,id,ref,
+ file,anchor,title,name); }
void startSimpleSect(SectionTypes t,const char *file,const char *anchor,
const char *title)
{ forall(&OutputGenerator::startSimpleSect,t,file,anchor,title); }
@@ -337,6 +344,8 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::endQuickIndices); }
void writeSplitBar(const char *name)
{ forall(&OutputGenerator::writeSplitBar,name); }
+ void writeNavigationPath(const char *s)
+ { forall(&OutputGenerator::writeNavigationPath,s); }
void writeLogo()
{ forall(&OutputGenerator::writeLogo); }
void writeQuickLinks(bool compact,HighlightedItem hli,const char *file)
@@ -519,6 +528,7 @@ class OutputList : public OutputDocInterface
FORALLPROTO4(const char *,const char *,const char *,bool);
FORALLPROTO5(const char *,const char *,const char *,const char *,const char *);
FORALLPROTO5(const char *,const char *,const char *,const char *,bool);
+ FORALLPROTO6(const char *,const char *,const char *,const char *,const char *,const char *);
OutputList(const OutputList &ol);
QList<OutputGenerator> *outputs;
diff --git a/src/pagedef.h b/src/pagedef.h
index 54aab2e..b157731 100644
--- a/src/pagedef.h
+++ b/src/pagedef.h
@@ -21,6 +21,7 @@
class PageSDict;
class OutputList;
+/** @brief A model of a page symbol. */
class PageDef : public Definition
{
public:
@@ -57,7 +58,7 @@ class PageDef : public Definition
bool showToc() const { return m_showToc; }
void setPageScope(Definition *d){ m_pageScope = d; }
Definition *getPageScope() const { return m_pageScope; }
- QCString displayName() const { return !m_title.isEmpty() ? m_title : Definition::name(); }
+ QCString displayName(bool=TRUE) const { return !m_title.isEmpty() ? m_title : Definition::name(); }
void writeDocumentation(OutputList &ol);
diff --git a/src/reflist.h b/src/reflist.h
index 90c95c8..742a7f9 100644
--- a/src/reflist.h
+++ b/src/reflist.h
@@ -24,7 +24,7 @@
#include <qlist.h>
#include "sortdict.h"
-/*! This struct represents an item in the list of references. */
+/** This struct represents an item in the list of references. */
struct RefItem
{
RefItem() /*: written(FALSE)*/ {}
@@ -39,7 +39,7 @@ struct RefItem
QList<RefItem> extraItems; //!< more items belonging to the same entity
};
-/*! List of items sorted by title */
+/** List of items sorted by title */
class SortedRefItems : public SDict<RefItem>
{
public:
@@ -53,7 +53,7 @@ class SortedRefItems : public SDict<RefItem>
}
};
-/*! @brief List of cross-referenced items
+/** List of cross-referenced items
*
* This class represents a list of items that are put
* at a certain point in the documentation by some special command
diff --git a/src/rtfgen.h b/src/rtfgen.h
index 7f92b26..628eb6d 100644
--- a/src/rtfgen.h
+++ b/src/rtfgen.h
@@ -22,6 +22,7 @@
class QFile;
+/** Generator for RTF output. */
class RTFGenerator : public OutputGenerator
{
public:
@@ -156,7 +157,7 @@ class RTFGenerator : public OutputGenerator
void startMemberDescription(const char *,const char *);
void endMemberDescription();
- void writeInheritedSectionTitle(const char *,const char *,
+ void writeInheritedSectionTitle(const char *,const char *,const char *,
const char *,const char *,const char *) {}
void startDescList(SectionTypes);
void startSimpleSect(SectionTypes,const char *,const char *,const char *);
@@ -179,6 +180,7 @@ class RTFGenerator : public OutputGenerator
void startQuickIndices() {}
void endQuickIndices() {}
void writeSplitBar(const char *) {}
+ void writeNavigationPath(const char *) {}
void writeLogo() {}
void writeQuickLinks(bool,HighlightedItem,const char *) {}
void startContents() {}
diff --git a/src/scanner.l b/src/scanner.l
index 1a40548..ed55b41 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -179,6 +179,8 @@ static bool externC;
static QCString g_hereDocId;
+static int g_column;
+
//-----------------------------------------------------------------------------
// forward declarations
@@ -274,8 +276,31 @@ static void initEntry()
static void lineCount()
{
- for( const char* c = yytext ; *c ; ++c )
- yyLineNr += (*c == '\n') ;
+ static int tabSize = Config_getInt("TAB_SIZE");
+ const char *p;
+ for (p = yytext ; *p ; ++p )
+ {
+ if (*p=='\n')
+ yyLineNr++,g_column=0;
+ else if (*p=='\t')
+ g_column+=tabSize - (g_column&tabSize);
+ else
+ g_column++;
+ }
+}
+
+static inline int computeIndent(const char *s,int startIndent)
+{
+ int col=startIndent;
+ static int tabSize=Config_getInt("TAB_SIZE");
+ const char *p=s;
+ char c;
+ while ((c=*p++))
+ {
+ if (c=='\t') col+=tabSize-(col%tabSize);
+ else col++;
+ }
+ return col;
}
static void addType( Entry* current )
@@ -1187,7 +1212,15 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
current->spec&=~Entry::Assign;
current->spec|=Entry::Copy;
}
-<ObjCPropAttr>"nonatmic" {
+<ObjCPropAttr>"weak" {
+ current->spec&=~Entry::Assign;
+ current->spec|=Entry::Weak;
+ }
+<ObjCPropAttr>"strong" {
+ current->spec&=~Entry::Assign;
+ current->spec|=Entry::Strong;
+ }
+<ObjCPropAttr>"nonatomic" {
current->spec|=Entry::NonAtomic;
}
<ObjCPropAttr>")" {
@@ -4299,10 +4332,20 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
if (*yytext!=';' || (current_root->section&Entry::COMPOUND_MASK) )
{
int tempArg=current->name.find('<');
+ int ts=current->type.find('<');
+ int te=current->type.findRev('>');
+ int ti=current->type.find(re,0);
+
+ // bug677315: A<int(void *, char *)> get(); is not a function pointer
+ bool isFunction = ti==-1 || // not a (...*...) pattern
+ (ts!=-1 && ts<te && ts<ti && ti<te); // (...*...) is part of a template argument list
+
+ //printf("type=%s ts=%d te=%d ti=%d isFunction=%d\n",
+ // current->type.data(),ts,te,ti,isFunction);
QCString tempName;
if (tempArg==-1) tempName=current->name; else tempName=current->name.left(tempArg);
if (!current->type.isEmpty() &&
- (current->type.find(re,0)!=-1 || current->type.left(8)=="typedef "))
+ (!isFunction || current->type.left(8)=="typedef "))
{
//printf("Scanner.l: found in class variable: `%s' `%s' `%s'\n", current->type.data(),current->name.data(),current->args.data());
if (isTypedef && current->type.left(8)!="typedef ")
@@ -5329,8 +5372,17 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
current->docFile = yyFileName;
docBlockContext = YY_START;
docBlockInBody = YY_START==SkipCurly;
- docBlockAutoBrief = Config_getBool("JAVADOC_AUTOBRIEF");
+ static bool javadocAutoBrief = Config_getBool("JAVADOC_AUTOBRIEF");
+ static bool markdownSupport = Config_getBool("MARKDOWN_SUPPORT");
+ docBlockAutoBrief = javadocAutoBrief;
docBlock.resize(0);
+ if (markdownSupport)
+ {
+ QCString indent;
+ indent.fill(' ',computeIndent(yytext,g_column));
+ docBlock+=indent;
+ }
+
if (docBlockAutoBrief)
{
current->briefLine = yyLineNr;
@@ -5471,6 +5523,13 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
BEGIN(docBlockContext);
}
<DocBlock>^{B}*("//")?{B}*"*"+/[^//a-z_A-Z0-9*] { // start of a comment line
+ static bool markdownSupport = Config_getBool("MARKDOWN_SUPPORT");
+ if (markdownSupport)
+ {
+ QCString indent;
+ indent.fill(' ',computeIndent(yytext,0));
+ docBlock+=indent;
+ }
}
<DocBlock>^{B}*("//"){B}* { // strip embedded C++ comments if at the start of a line
}
@@ -5558,6 +5617,12 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
{
REJECT;
}
+ else
+ {
+ QCString indent;
+ indent.fill(' ',computeIndent(yytext,0));
+ docBlock+=indent;
+ }
}
<DocCopyBlock>[^\<@/*\]\$\\\n]+ { // any character that is not special
docBlock+=yytext;
@@ -5861,6 +5926,7 @@ static void parseCompounds(Entry *rt)
// init scanner state
padCount=0;
//depthIf = 0;
+ g_column=0;
inputString = ce->program;
inputPosition = 0;
scanYYrestart( scanYYin ) ;
@@ -5962,6 +6028,7 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt)
inputString = fileBuf;
inputPosition = 0;
g_inputFromFile = FALSE;
+ g_column = 0;
//anonCount = 0; // don't reset per file
//depthIf = 0;
@@ -6063,6 +6130,7 @@ static void parsePrototype(const QCString &text)
// set new string
inputString = text;
inputPosition = 0;
+ g_column = 0;
g_inputFromFile = FALSE;
scanYYrestart( scanYYin );
BEGIN(Prototype);
diff --git a/src/searchindex.cpp b/src/searchindex.cpp
index 532b692..dfad6b1 100644
--- a/src/searchindex.cpp
+++ b/src/searchindex.cpp
@@ -106,9 +106,8 @@ void SearchIndex::addWord(const char *word,bool hiPriority,bool recurse)
{
static QRegExp nextPart("[_a-z:][A-Z]");
//printf("SearchIndex::addWord(%s,%d)\n",word,hiPriority);
- QCString wStr(word);
- if (wStr.isEmpty()) return;
- wStr=wStr.lower();
+ if (word==0 || word[0]=='\0') return;
+ QCString wStr = QCString(word).lower();
IndexWord *w = m_words[wStr];
if (w==0)
{
diff --git a/src/section.h b/src/section.h
index 556cad0..3ee8474 100644
--- a/src/section.h
+++ b/src/section.h
@@ -26,6 +26,7 @@
class Definition;
+/** Class representing a section in a page */
struct SectionInfo
{
enum SectionType { Page = 0,
@@ -58,6 +59,7 @@ struct SectionInfo
int level;
};
+/** Unsorted dictionary of SectionInfo objects. */
class SectionDict : public SDict<SectionInfo>
{
public:
diff --git a/src/sortdict.h b/src/sortdict.h
index 088d5ef..564453f 100644
--- a/src/sortdict.h
+++ b/src/sortdict.h
@@ -74,7 +74,7 @@ const uint SDict_primes[] =
template<class T> class SDict;
template<class T> class SIntDict;
-/*! internal wrapper class that redirects compareItems() to the
+/** internal wrapper class that redirects compareItems() to the
* dictionary
*/
template<class T>
@@ -91,7 +91,7 @@ class SList : public QList<T>
SDict<T> *m_owner;
};
-/*! Ordered dictionary of elements of type T.
+/** Ordered dictionary of elements of type T.
* Internally uses a QList<T> and a QDict<T>.
*/
template<class T>
@@ -422,7 +422,7 @@ class SDict
};
};
-/*! internal wrapper class that redirects compareItems() to the
+/** internal wrapper class that redirects compareItems() to the
* dictionary
*/
template<class T>
@@ -439,7 +439,7 @@ class SIntList : public QList<T>
SIntDict<T> *m_owner;
};
-/*! Ordered dictionary of elements of type T.
+/** Ordered dictionary of elements of type T.
* Internally uses a QList<T> and a QIntDict<T>.
*/
template<class T>
diff --git a/src/tagreader.cpp b/src/tagreader.cpp
index 01c1fe4..8cfdb7b 100644
--- a/src/tagreader.cpp
+++ b/src/tagreader.cpp
@@ -38,7 +38,7 @@
#include "arguments.h"
//#include "reflist.h"
-/*! Information about an linkable anchor */
+/** Information about an linkable anchor */
class TagAnchorInfo
{
public:
@@ -47,6 +47,7 @@ class TagAnchorInfo
QCString fileName;
};
+/** List of TagAnchorInfo objects. */
class TagAnchorInfoList : public QList<TagAnchorInfo>
{
public:
@@ -54,7 +55,7 @@ class TagAnchorInfoList : public QList<TagAnchorInfo>
virtual ~TagAnchorInfoList() {}
};
-/*! Container for member specific info that can be read from a tagfile */
+/** Container for member specific info that can be read from a tagfile */
class TagMemberInfo
{
public:
@@ -71,7 +72,7 @@ class TagMemberInfo
bool isStatic;
};
-/*! Container for class specific info that can be read from a tagfile */
+/** Container for class specific info that can be read from a tagfile */
class TagClassInfo
{
public:
@@ -89,7 +90,7 @@ class TagClassInfo
bool isObjC;
};
-/*! Container for namespace specific info that can be read from a tagfile */
+/** Container for namespace specific info that can be read from a tagfile */
class TagNamespaceInfo
{
public:
@@ -102,7 +103,7 @@ class TagNamespaceInfo
QList<TagMemberInfo> members;
};
-/*! Container for package specific info that can be read from a tagfile */
+/** Container for package specific info that can be read from a tagfile */
class TagPackageInfo
{
public:
@@ -114,6 +115,7 @@ class TagPackageInfo
QStringList classList;
};
+/** Container for include info that can be read from a tagfile */
class TagIncludeInfo
{
public:
@@ -124,7 +126,7 @@ class TagIncludeInfo
bool isImported;
};
-/*! Container for file specific info that can be read from a tagfile */
+/** Container for file specific info that can be read from a tagfile */
class TagFileInfo
{
public:
@@ -139,7 +141,7 @@ class TagFileInfo
QList<TagIncludeInfo> includes;
};
-/*! Container for group specific info that can be read from a tagfile */
+/** Container for group specific info that can be read from a tagfile */
class TagGroupInfo
{
public:
@@ -157,7 +159,7 @@ class TagGroupInfo
QStringList dirList;
};
-/*! Container for page specific info that can be read from a tagfile */
+/** Container for page specific info that can be read from a tagfile */
class TagPageInfo
{
public:
@@ -167,7 +169,7 @@ class TagPageInfo
TagAnchorInfoList docAnchors;
};
-/*! Container for directory specific info that can be read from a tagfile */
+/** Container for directory specific info that can be read from a tagfile */
class TagDirInfo
{
public:
@@ -179,7 +181,8 @@ class TagDirInfo
TagAnchorInfoList docAnchors;
};
-/*! Tag file parser.
+/** Tag file parser.
+ *
* Reads an XML-structured tagfile and builds up the structure in
* memory. The method buildLists() is used to transfer/translate
* the structures to the doxygen engine.
@@ -826,7 +829,8 @@ class TagFileParser : public QXmlDefaultHandler
QCString m_inputFileName;
};
-/*! Error handler for the XML tag file parser.
+/** Error handler for the XML tag file parser.
+ *
* Basically dumps all fatal error to stderr using err().
*/
class TagFileErrorHandler : public QXmlErrorHandler
diff --git a/src/translator.h b/src/translator.h
index 784ad93..7b0e571 100644
--- a/src/translator.h
+++ b/src/translator.h
@@ -23,6 +23,7 @@
#include "util.h"
#include "config.h"
+/** Abstract base class for all translatable text fragments. */
class Translator
{
private:
diff --git a/src/translator_adapter.h b/src/translator_adapter.h
index 5955c33..f58c25d 100644
--- a/src/translator_adapter.h
+++ b/src/translator_adapter.h
@@ -3,7 +3,7 @@
#include "version.h"
-/*! \brief Base of the translator adapter tree
+/** Base of the translator adapter tree.
*
* This abstract class provides access to the english
* translations, to be used as a substitute for not implemented
@@ -40,6 +40,9 @@ class TranslatorAdapterBase : public Translator
};
+/** Adapter class for languages that only contain translations upto
+ * version 1.8.0.
+ */
class TranslatorAdapter_1_8_0 : public TranslatorAdapterBase
{
public:
@@ -69,6 +72,9 @@ class TranslatorAdapter_1_8_0 : public TranslatorAdapterBase
};
+/** Adapter class for languages that only contain translations upto
+ * version 1.7.5.
+ */
class TranslatorAdapter_1_7_5 : public TranslatorAdapter_1_8_0
{
public:
@@ -85,6 +91,9 @@ class TranslatorAdapter_1_7_5 : public TranslatorAdapter_1_8_0
{ return english.trDirDepGraph(name); }
};
+/** Adapter class for languages that only contain translations upto
+ * version 1.6.3.
+ */
class TranslatorAdapter_1_6_3 : public TranslatorAdapter_1_7_5
{
public:
@@ -103,6 +112,9 @@ class TranslatorAdapter_1_6_3 : public TranslatorAdapter_1_7_5
{ return english.trDateTime(year,month,day,dayOfWeek,hour,minutes,seconds,includeTime); }
};
+/** Adapter class for languages that only contain translations upto
+ * version 1.6.0.
+ */
class TranslatorAdapter_1_6_0 : public TranslatorAdapter_1_6_3
{
public:
@@ -125,6 +137,9 @@ class TranslatorAdapter_1_6_0 : public TranslatorAdapter_1_6_3
{ return english.trNoMatches(); }
};
+/** Adapter class for languages that only contain translations upto
+ * version 1.5.4
+ */
class TranslatorAdapter_1_5_4 : public TranslatorAdapter_1_6_0
{
public:
@@ -201,6 +216,9 @@ class TranslatorAdapter_1_5_4 : public TranslatorAdapter_1_6_0
{ return english.trTypeConstraints(); }
};
+/** Adapter class for languages that only contain translations upto
+ * version 1.4.6
+ */
class TranslatorAdapter_1_4_6 : public TranslatorAdapter_1_5_4
{
public:
@@ -217,6 +235,9 @@ class TranslatorAdapter_1_4_6 : public TranslatorAdapter_1_5_4
}
};
+/** Adapter class for languages that only contain translations upto
+ * version 1.4.1
+ */
class TranslatorAdapter_1_4_1 : public TranslatorAdapter_1_4_6
{
public:
diff --git a/src/translator_id.h b/src/translator_id.h
index 887ae7f..6519b0f 100644
--- a/src/translator_id.h
+++ b/src/translator_id.h
@@ -18,7 +18,7 @@
#ifndef TRANSLATOR_ID_H
#define TRANSLATOR_ID_H
-/**
+/*
* Translasi berikut didasarkan pada versi translator_en.h dalam
* Doxygen 1.7.5.1.
*
diff --git a/src/translator_sr.h b/src/translator_sr.h
index 15d6700..a04be56 100644
--- a/src/translator_sr.h
+++ b/src/translator_sr.h
@@ -1589,7 +1589,7 @@ private:
{ return "Dokumentacija funkcija i procedura"; }
/*! This is put above each page as a link to the list of annotated data types (Fortran). */
- /*! @todo Koji je prevod za Compound u Fortran kontekstu */
+ /* TODO: Koji je prevod za Compound u Fortran kontekstu */
virtual QCString trCompoundListFortran()
{ return "Složeni tipovi podataka"; }
diff --git a/src/translatordecoder.h b/src/translatordecoder.h
index 70bc474..1e22244 100644
--- a/src/translatordecoder.h
+++ b/src/translatordecoder.h
@@ -21,6 +21,7 @@
#include "translator.h"
#include "portable.h"
+/** Decoder adapter for translator file that are not yet UTF-8 encoded. */
class TranslatorDecoder : public Translator
{
public:
diff --git a/src/util.cpp b/src/util.cpp
index 76aea95..4ea20a7 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -850,6 +850,9 @@ bool accessibleViaUsingNamespace(const NamespaceSDict *nl,
const int MAX_STACK_SIZE = 1000;
+/** Helper class representing the stack of items considered while resolving
+ * the scope.
+ */
class AccessStack
{
public:
@@ -907,6 +910,7 @@ class AccessStack
}
private:
+ /** Element in the stack. */
struct AccessElem
{
Definition *scope;
@@ -4665,6 +4669,7 @@ QCString substituteClassNames(const QCString &s)
//----------------------------------------------------------------------
+/** Cache element for the file name to FileDef mapping cache. */
struct FindFileCacheElem
{
FindFileCacheElem(FileDef *fd,bool ambig) : fileDef(fd), isAmbig(ambig) {}
@@ -5122,6 +5127,10 @@ done:
}
//printf("extractNamespace `%s' => `%s|%s'\n",scopeName.data(),
// className.data(),namespaceName.data());
+ if (className.right(2)=="-g" || className.right(2)=="-p")
+ {
+ className = className.left(className.length()-2);
+ }
return;
}
diff --git a/src/util.h b/src/util.h
index a93d5b3..4c8933f 100644
--- a/src/util.h
+++ b/src/util.h
@@ -18,7 +18,7 @@
#ifndef UTIL_H
#define UTIL_H
-/*! \file util.h
+/*! \file
* \brief A bunch of utility functions.
*/
@@ -61,6 +61,7 @@ class FTextStream;
//--------------------------------------------------------------------
+/** Abstract interface for a hyperlinked text fragment. */
class TextGeneratorIntf
{
public:
@@ -72,6 +73,7 @@ class TextGeneratorIntf
) const = 0;
};
+/** Implements TextGeneratorIntf for an OutputDocInterface stream. */
class TextGeneratorOLImpl : public TextGeneratorIntf
{
public:
@@ -381,6 +383,7 @@ QCString externalLinkTarget();
QCString externalRef(const QCString &relPath,const QCString &ref,bool href);
int nextUtf8CharPosition(const QCString &utf8Str,int len,int startPos);
+/** Data associated with a HSV colored image. */
struct ColoredImgDataItem
{
const char *name;
diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp
index 04c1135..ab0d243 100644
--- a/src/vhdldocgen.cpp
+++ b/src/vhdldocgen.cpp
@@ -46,7 +46,7 @@
#include "vhdlscanner.h"
#include "layout.h"
#include "arguments.h"
-
+#include "portable.h"
#define theTranslator_vhdlType VhdlDocGen::trVhdlType
@@ -58,30 +58,450 @@ static QDict<QCString> g_xilinxUcfDict(17,FALSE);
static void initUCF(Entry* root,const char* type,QCString & qcs,int line,QCString & fileName,QCString & brief);
static void writeUCFLink(const MemberDef* mdef,OutputList &ol);
-static void assignConfiguration(ConfNode* ,QCString);
-static void assignBinding(ConfNode* conf,QCString label);
+static void assignConfiguration(VhdlConfNode* ,QCString);
+static void assignBinding(VhdlConfNode* conf,QCString label);
static void addInstance(ClassDef* entity, ClassDef* arch, ClassDef *inst,Entry *cur,ClassDef* archBind=NULL);
-#if 0
-static ConfNode* findConfiguration(QCString config)
+//---------- create svg -------------------------------------------------------------
+static void createSVG();
+static void startDot(FTextStream &t);
+static void startTable(FTextStream &t,const QCString &className);
+static QList<MemberDef>* getPorts(ClassDef *cd);
+static void writeVhdlEntityToolTip(FTextStream& t,ClassDef *cd);
+static void endDot(FTextStream &t);
+static void writeTable(QList<MemberDef>* port,FTextStream & t);
+static void endTabel(FTextStream &t);
+static void writeClassToDot(FTextStream &t,ClassDef* cd);
+static void writeVhdlDotLink(FTextStream &t,const QCString &a,const QCString &b,const QCString &style);
+static void writeVhdlPortToolTip(FTextStream& t,QList<MemberDef>* port,ClassDef *cd);
+
+
+
+
+
+//--------------------------------------------------------------------------------------------------
+static void codify(FTextStream &t,const char *str)
{
- QList<ConfNode> confList= getVhdlConfiguration();
- uint size=confList.count();
- if (size==0) return NULL;
- for (uint i=0;i<size;i++)
+ if (str)
+ {
+ const char *p=str;
+ char c;
+ while (*p)
+ {
+ c=*p++;
+ switch(c)
+ {
+ case '<': t << "&lt;";
+ break;
+ case '>': t << "&gt;";
+ break;
+ case '&': t << "&amp;";
+ break;
+ case '\'': t << "&#39;";
+ break;
+ case '"': t << "&quot;";
+ break;
+ default: t << c;
+ break;
+ }
+ }
+ }
+}
+
+static void createSVG()
+{
+ QCString ov =Config_getString("HTML_OUTPUT");
+ QCString dir="-o "+ov+"/vhdl_design_overview.html";
+ ov+="/vhdl_design.dot ";
+
+ QRegExp ep("[\\s]");
+ QCString vlargs="-Tsvg "+ov+dir ;
+
+ if (portable_system("dot",vlargs)!=0)
+ {
+ err("could not create dot file");
+ }
+}
+
+// Creates a svg image. All in/out/inout ports are shown with brief description and direction.
+// Brief descriptions for entities are shown too.
+void VhdlDocGen::writeOverview()
+{
+ ClassSDict::Iterator cli(*Doxygen::classSDict);
+ ClassDef *cd;
+ bool found=false;
+ for ( ; (cd=cli.current()) ; ++cli )
{
- ConfNode* conf= (ConfNode *)confList.at(i);
- QCString entity=VhdlDocGen::getIndexWord(conf->confVhdl.data(),1);
- if (entity==config)
+ if ((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ENTITYCLASS )
{
- return conf;
+ found=true;
+ break;
}
}
- return NULL;
+ if (!found) return;
+
+ QCString ov =Config_getString("HTML_OUTPUT");
+ QCString fileName=ov+"/vhdl_design.dot";
+ QFile f(fileName);
+ QStringList qli;
+ FTextStream t(&f);
+
+ if (!f.open(IO_WriteOnly))
+ {
+ fprintf(stderr,"Warning: Cannot open file %s for writing\n",fileName.data());
+ return;
+ }
+
+ startDot(t);
+
+ for (cli.toFirst() ; (cd=cli.current()) ; ++cli )
+ {
+ if ((VhdlDocGen::VhdlClasses)cd->protection()!=VhdlDocGen::ENTITYCLASS )
+ {
+ continue;
+ }
+
+ QList<MemberDef>* port= getPorts(cd);
+ if (port==0)
+ {
+ continue;
+ }
+ if (port->count()==0)
+ {
+ delete port;
+ port=NULL;
+ continue;
+ }
+
+ startTable(t,cd->name());
+ writeClassToDot(t,cd);
+ writeTable(port,t);
+ endTabel(t);
+
+ writeVhdlPortToolTip(t,port,cd);
+ writeVhdlEntityToolTip(t,cd);
+ delete port;
+
+ BaseClassList *bl=cd->baseClasses();
+ if (bl)
+ {
+ BaseClassListIterator bcli(*bl);
+ BaseClassDef *bcd;
+ for ( ; (bcd=bcli.current()) ; ++bcli )
+ {
+ ClassDef *bClass=bcd->classDef;
+ QCString dotn=cd->name()+":";
+ dotn+=cd->name();
+ QCString csc=bClass->name()+":";
+ csc+=bClass->name();
+ // fprintf(stderr,"\n <%s| %s>",dotn.data(),csc.data());
+ writeVhdlDotLink(t,dotn,csc,0);
+ }
+ }// if bl
+ }// for
+
+ endDot(t);
+ // writePortLinks(t);
+ f.close();
+ createSVG();
}
-#endif
+
+//------------------------------------------------------------------------------------------------------------------------------------------------------
+
+static void startDot(FTextStream &t)
+{
+ t << " digraph G { \n";
+ t << "rankdir=LR \n";
+ t << "concentrate=true\n";
+ t << "stylesheet=\"doxygen.css\"\n";
+}
+
+static void endDot(FTextStream &t)
+{
+ t <<" } \n";
+}
+
+static void startTable(FTextStream &t,const QCString &className)
+{
+ t << className <<" [ shape=none , fontname=\"arial\", fontcolor=\"blue\" , \n";
+ t << "label=<<TABLE BORDER=\"0\" CELLBORDER=\"1\" CELLSPACING=\"0\">\n";
+}
+
+static void writeVhdlDotLink(FTextStream &t,
+ const QCString &a,const QCString &b,const QCString &style)
+{
+ t << a << "->" << b;
+ if (!style.isEmpty())
+ {
+ t << "[style=" << style << "];\n";
+ }
+ t << "\n";
+}
+
+
+static QCString formatBriefNote(const QCString &brief,ClassDef * cd)
+{
+ QRegExp ep("[\n]");
+ QCString vForm;
+ QCString repl("<BR ALIGN=\"LEFT\"/>");
+ QCString file=cd->getDefFileName();
+
+ int k=cd->briefLine();
+
+ QStringList qsl=QStringList::split(ep,brief);
+ for(uint j=0;j<qsl.count();j++)
+ {
+ QCString qcs=qsl[j].data();
+ vForm+=parseCommentAsText(cd,NULL,qcs,file,k);
+ k++;
+ vForm+='\n';
+ }
+
+ vForm.replace(ep,repl.data());
+ return vForm;
+}
+
+
+static void writeVhdlPortToolTip(FTextStream& t,QList<MemberDef>* port,ClassDef *cd)
+{
+
+ uint len=port->count();
+ MemberDef *md;
+ return; //????
+
+ for (uint j=0;j<len;j++)
+ {
+ md=(MemberDef*)port->at(j);
+ QCString brief=md->briefDescriptionAsTooltip();
+ if (brief.isEmpty()) continue;
+
+ QCString node="node";
+ node+=VhdlDocGen::getRecordNumber();
+ t << node <<"[shape=box margin=0.1, label=<\n";
+ t<<"<TABLE BORDER=\"0\" CELLBORDER=\"1\" CELLSPACING=\"0\" CELLPADDING=\"2\" >\n ";
+ t<<"<TR><TD BGCOLOR=\"lightcyan\"> ";
+ t<<brief;
+ t<<" </TD></TR></TABLE>>];";
+ QCString dotn=cd->name()+":";
+ dotn+=md->name();
+ // writeVhdlDotLink(t,dotn,node,"dotted");
+ }
+}
+
+
+static void writeVhdlEntityToolTip(FTextStream& t,ClassDef *cd)
+{
+
+ QCString brief=cd->briefDescription();
+
+ if (brief.isEmpty()) return;
+
+ brief=formatBriefNote(brief,cd);
+
+ QCString node="node";
+ node+=VhdlDocGen::getRecordNumber();
+ t << node <<"[shape=none margin=0.1, label=<\n";
+ t << "<TABLE BORDER=\"0\" CELLBORDER=\"1\" CELLSPACING=\"0\" CELLPADDING=\"2\" >\n ";
+ t << "<TR><TD BGCOLOR=\"lightcyan\"> ";
+ t << brief;
+ t << " </TD></TR></TABLE>>];";
+ QCString dotn=cd->name()+":";
+ dotn+=cd->name();
+ writeVhdlDotLink(t,dotn,node,"dotted");
+}
+
+static void writeColumn(FTextStream &t,MemberDef *md,bool start)
+{
+ QCString toolTip;
+
+ static QRegExp reg("[%]");
+ bool bidir=(md!=0 &&( stricmp(md->typeString(),"inout")==0));
+
+ if (md)
+ {
+ toolTip=md->briefDescriptionAsTooltip();
+ if (!toolTip.isEmpty())
+ {
+ QCString largs = md->argsString();
+ if (!largs.isEmpty())
+ largs=largs.replace(reg," ");
+ toolTip+=" [";
+ toolTip+=largs;
+ toolTip+="]";
+ }
+ }
+ if (start)
+ {
+ t <<"<TR>\n";
+ }
+
+ t << "<TD ALIGN=\"LEFT\" ";
+ if (md)
+ {
+ t << "href=\"";
+ t << md->getOutputFileBase()<< Doxygen::htmlFileExtension;
+ t << "#" << md->anchor();
+ t<<"\" ";
+
+ t<<" TOOLTIP=\"";
+ if(!toolTip.isEmpty())
+ codify(t,toolTip.data());
+ else{
+ QCString largs = md->argsString();
+ if(!largs.isEmpty()){
+ largs=largs.replace(reg," ");
+ codify(t,largs.data());
+ }
+ }
+ t << "\" ";
+
+ t << " PORT=\"";
+ t << md->name();
+ t << "\" ";
+ }
+ if (!toolTip.isEmpty())
+ {
+ // if (!toolTip.isEmpty())
+
+ if (bidir)
+ t << "BGCOLOR=\"orange\">";
+ else
+ t << "BGCOLOR=\"azure\">";
+ }
+ else if (bidir)
+ {
+ t << "BGCOLOR=\"pink\">";
+ }
+ else
+ {
+ t << "BGCOLOR=\"lightgrey\">";
+ }
+ if (md)
+ {
+ t << md->name();
+ }
+ else
+ {
+ t << " \n";
+ }
+ t << "</TD>\n";
+
+ if (!start)
+ {
+ t << "</TR>\n";
+ }
+}
+
+static void endTabel(FTextStream &t)
+{
+ t << "</TABLE>>\n";
+ t << "] \n";
+}
+
+static void writeClassToDot(FTextStream &t,ClassDef* cd)
+{
+ t << "<TR><TD COLSPAN=\"2\" BGCOLOR=\"yellow\" ";
+ t << "PORT=\"";
+ t << cd->name();
+ t << "\" ";
+ t << "href=\"";
+ t << cd->getOutputFileBase() << Doxygen::htmlFileExtension;
+ t << "\" ";
+ t << ">";
+ t << cd->name();
+ t << " </TD></TR>\n";
+}
+
+static QList<MemberDef>* getPorts(ClassDef *cd)
+{
+ MemberDef* md;
+ QList<MemberDef> *portList=new QList<MemberDef>;
+ MemberList *ml=cd->getMemberList(MemberList::variableMembers);
+
+ if (ml==0) return NULL;
+
+ MemberListIterator fmni(*ml);
+
+ for (fmni.toFirst();(md=fmni.current());++fmni)
+ {
+ if (md->getMemberSpecifiers()==VhdlDocGen::PORT)
+ {
+ portList->append(md);
+ }
+ }
+
+ return portList;
+}
+
+//writeColumn(FTextStream &t,QCString name,bool start)
+
+static void writeTable(QList<MemberDef>* port,FTextStream & t)
+{
+ QCString space(" ");
+ MemberDef *md;
+ uint len=port->count();
+
+ QList<MemberDef> inPorts;
+ QList<MemberDef> outPorts;
+
+ uint j;
+ for (j=0;j<len;j++)
+ {
+ md=(MemberDef*)port->at(j);
+ QCString qc=md->typeString();
+ if(qc=="in")
+ {
+ inPorts.append(md);
+ }
+ else
+ {
+ outPorts.append(md);
+ }
+ }
+
+ int inp = inPorts.count();
+ int outp = outPorts.count();
+ int maxLen;
+
+ if (inp>=outp)
+ {
+ maxLen=inp;
+ }
+ else
+ {
+ maxLen=outp;
+ }
+
+ int i;
+ for(i=0;i<maxLen;i++)
+ {
+ //write inports
+ if (i<inp)
+ {
+ md=(MemberDef*)inPorts.at(i);
+ writeColumn(t,md,true);
+ }
+ else
+ {
+ writeColumn(t,NULL,true);
+ }
+
+ if (i<outp)
+ {
+ md=(MemberDef*)outPorts.at(i);
+ writeColumn(t,md,false);
+ }
+ else
+ {
+ writeColumn(t,NULL,false);
+ }
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
VhdlDocGen::VhdlDocGen()
{
@@ -1643,12 +2063,12 @@ void VhdlDocGen::writeVHDLDeclaration(MemberDef* mdef,OutputList &ol,
case VhdlDocGen::LIBRARY:
writeLink(mdef,ol);
ol.insertMemberAlign();
- if (largs=="context")
- {
- VhdlDocGen::writeRecorUnit(ltype,ol,mdef);
- }
+ if (largs=="context")
+ {
+ VhdlDocGen::writeRecorUnit(ltype,ol,mdef);
+ }
- break;
+ break;
case VhdlDocGen::GENERIC:
case VhdlDocGen::PORT:
@@ -2216,7 +2636,7 @@ void VhdlDocGen::writeSource(MemberDef *mdef,OutputList& ol,QCString & cname)
ol.insertMemberAlign();
QCString q=qsl[j].utf8();
VhdlDocGen::writeFormatString(q,ol,mdef);
- ol.docify("\n");
+ ol.lineBreak();
}
ol.endCodeFragment();
@@ -2407,6 +2827,15 @@ bool VhdlDocGen::findConstraintFile(LayoutNavEntry *lne)
// LayoutNavEntry *kks = kk->parent();// find(LayoutNavEntry::Files);
QCString file;
QCString co("Constraints");
+
+ if (Config_getBool("HAVE_DOT") && Config_getEnum("DOT_IMAGE_FORMAT")=="svg")
+ {
+ QCString ov("Design Overview"); // TODO: translate me
+ QCString ofile("vhdl_design_overview");
+ LayoutNavEntry *oo=new LayoutNavEntry( lne,LayoutNavEntry::MainPage,true,ofile,ov,"");
+ kk->addChild(oo);
+ }
+
while (fn)
{
FileDef *fd=fn->first();
@@ -2512,7 +2941,7 @@ ClassDef* VhdlDocGen::findArchitecture(QCString identifier, QCString entity_nam
//@param isInlineConf
//@param confN List of configurations
-void assignBinding(ConfNode * conf,QCString label)
+void assignBinding(VhdlConfNode * conf,QCString label)
{
QList<Entry> instList= getVhdlInstList();
QListIterator<Entry> eli(instList);
@@ -2592,7 +3021,7 @@ void assignBinding(ConfNode * conf,QCString label)
}//assignBinding
-void assignConfiguration(ConfNode* rootNode,QCString label)
+void assignConfiguration(VhdlConfNode* rootNode,QCString label)
{
if (rootNode==NULL) return;
uint iter;
@@ -2609,7 +3038,7 @@ void assignConfiguration(ConfNode* rootNode,QCString label)
for(iter=0;iter<rootNode->confN.count();iter++)
{
- ConfNode* conf= (ConfNode *)rootNode->confN.at(iter);
+ VhdlConfNode* conf= (VhdlConfNode *)rootNode->confN.at(iter);
assignConfiguration(conf,label);
}
}
@@ -2632,10 +3061,10 @@ void VhdlDocGen::computeVhdlComponentRelations()
QCString entity,inst,arch,vhd;
- QList<ConfNode> confList = getVhdlConfiguration();
+ QList<VhdlConfNode> confList = getVhdlConfiguration();
for (uint iter=0;iter<confList.count(); iter++)
{
- ConfNode* conf= (ConfNode *)confList.at(iter);
+ VhdlConfNode* conf= (VhdlConfNode *)confList.at(iter);
assignConfiguration(conf,"");
}
diff --git a/src/vhdldocgen.h b/src/vhdldocgen.h
index 19d1a9b..bb62f3f 100644
--- a/src/vhdldocgen.h
+++ b/src/vhdldocgen.h
@@ -26,28 +26,12 @@
#include "layout.h"
#include "memberlist.h"
-class QStringList;
class Entry;
-class ClassSDict;
-class FileStorage;
-class EntryNav;
class ClassDef;
class MemberDef;
struct Argument;
-// wrapper class for the vhdl parser
-class MyParserVhdl
-{
- public:
- uint iFileSize;
-
- ~MyParserVhdl(){}
- MyParserVhdl(){}
-
- int parse(MyParserVhdl*);
- int doLex();
- };
-
+/** Class for generating documentation specific for VHDL */
class VhdlDocGen
{
public:
@@ -276,6 +260,9 @@ class VhdlDocGen
static QCString parseForBinding(QCString & entity,QCString & arch);
static void addBaseClass(ClassDef* cd,ClassDef *ent);
+ static void writeOverview(OutputList &ol);
+ static void writeOverview();
+
private:
static void findAllArchitectures(QList<QCString>& ql,const ClassDef *cd);
static bool compareArgList(ArgumentList*,ArgumentList*);
diff --git a/src/vhdlparser.y b/src/vhdlparser.y
index cda97a4..82f68a7 100644
--- a/src/vhdlparser.y
+++ b/src/vhdlparser.y
@@ -63,9 +63,9 @@ struct YYMM
#include "arguments.h"
//-----------------------------variables ---------------------------------------------------------------------------
-static MyParserVhdl* myconv=0;
+//static VhdlParser* myconv=0;
-static struct s_contVhdl s_str;
+static VhdlContainer s_str;
static QList<Entry>instFiles;
static int yyLineNr;
static Entry* lastCompound;
@@ -80,8 +80,8 @@ static int levelCounter;
static QCString confName;
static QCString genLabels;
-static QList<ConfNode> configL;
-static ConfNode* currNode;
+static QList<VhdlConfNode> configL;
+static VhdlConfNode* currNode;
static int currP=0;
@@ -1245,7 +1245,7 @@ attribute_spec: t_ATTRIBUTE t_Identifier t_OF entity_spec t_IS expr t_Semicolon
addVhdlType($2,getParsedLine(t_ATTRIBUTE),Entry::VARIABLE_SEC,VhdlDocGen::ATTRIBUTE,0,oo.data());
}
-entity_spec : entity_name_list signature t_Colon entity_class
+entity_spec : entity_name_list signature t_Colon entity_class { $$=$1+$2+":"+$4;}
entity_name_list: designator entity_name_list_1 { $$=$1+" "+$2; }
entity_name_list: t_OTHERS { $$="others"; }
@@ -1263,7 +1263,7 @@ entity_class: t_LABEL { $$="label"; }
entity_class: t_TYPE { $$="type"; }
entity_class: t_SUBTYPE { $$="subtype"; }
entity_class: t_PROCEDURE { $$="procedure"; }
-entity_class: t_FUNCTION { $$=""; }
+entity_class: t_FUNCTION { $$="function"; }
entity_class: t_SIGNAL { $$="signal"; }
entity_class: t_VARIABLE { $$="variable"; }
entity_class: t_CONSTANT { $$="constant"; }
@@ -2071,18 +2071,18 @@ void vhdlScanYYerror(const char* /*str*/)
// exit(0);
}
-int MyParserVhdl::parse(MyParserVhdl* conv)
+void vhdlParse()
{
- myconv=conv;
- return vhdlScanYYparse();
+// //myconv=conv;
+ vhdlScanYYparse();
}
-int lex(void)
-{
- return myconv->doLex();
-}
+//int lex(void)
+//{
+// return myconv->doLex();
+//}
-struct s_contVhdl* getVhdlCont()
+VhdlContainer* getVhdlCont()
{
return &s_str;
}
@@ -2094,7 +2094,7 @@ Entry* getVhdlCompound()
return NULL;
}
-QList<ConfNode>& getVhdlConfiguration() { return configL; }
+QList<VhdlConfNode>& getVhdlConfiguration() { return configL; }
static void addCompInst(char *n, char* instName, char* comp,int iLine)
{
@@ -2152,7 +2152,7 @@ static void popConfig()
static void addConfigureNode(const char* a,const char*b, bool isRoot,bool isLeave,bool inlineConf)
{
- struct ConfNode* co;
+ VhdlConfNode* co;
QCString ent,arch,lab;
ent=a;
lab = VhdlDocGen::parseForConfig(ent,arch);
@@ -2163,7 +2163,7 @@ static void addConfigureNode(const char* a,const char*b, bool isRoot,bool isLeav
lab=VhdlDocGen::parseForBinding(ent,arch);
}
- co=new ConfNode(a,b,confName.data());
+ co=new VhdlConfNode(a,b,confName.data());
if (inlineConf)
{
co->isInlineConf=TRUE;
@@ -2185,7 +2185,7 @@ static void addConfigureNode(const char* a,const char*b, bool isRoot,bool isLeav
else
{
assert(0);
- co=new ConfNode(a,b,confName.data());
+ co=new VhdlConfNode(a,b,confName.data());
currNode->addNode(co);
}
}// addConfigure
diff --git a/src/vhdlscanner.h b/src/vhdlscanner.h
index fe75539..b245c78 100644
--- a/src/vhdlscanner.h
+++ b/src/vhdlscanner.h
@@ -40,7 +40,7 @@ class MemberDef;
class QStringList;
-/** \brief VHDL parser using state-based lexical scanning.
+/** VHDL parser using state-based lexical scanning.
*
* This is the VHDL language parser for doxygen.
*/
@@ -68,8 +68,8 @@ class VHDLLanguageScanner : public ParserInterface
void parsePrototype(const char *text);
};
-// container for vhdlscanner
-struct s_contVhdl
+/** Container for vhdlscanner */
+struct VhdlContainer
{
int yyLineNr; // current line no
int iLine; // line no of last t_identifier
@@ -78,10 +78,11 @@ struct s_contVhdl
Entry* root; // root
};
-struct ConfNode
+/** Configuation node for VHDL */
+struct VhdlConfNode
{
- ConfNode *prevNode;
- ConfNode(const char* a,const char* b,const char* config)
+ VhdlConfNode *prevNode;
+ VhdlConfNode(const char* a,const char* b,const char* config)
{
arch=a; // architecture e.g. for iobuffer
binding=b; // binding e.g. use entiy work.xxx(bev)
@@ -95,14 +96,14 @@ struct ConfNode
QCString confVhdl;
QCString arch;
QCString binding;
- QList<ConfNode> confN;
+ QList<VhdlConfNode> confN;
bool isBind;
bool isInlineConf;
bool isRoot;
- void addNode(ConfNode* n) { confN.append(n); }
+ void addNode(VhdlConfNode* n) { confN.append(n); }
bool isBinding() { return binding.isEmpty(); }
-} ;
+};
// returns the current conpound entity,architecture, package,package body
Entry* getVhdlCompound();
@@ -114,7 +115,7 @@ void newVhdlEntry();
void initVhdlParser();
-struct s_contVhdl* getVhdlCont();
+struct VhdlContainer* getVhdlCont();
// returns the parsed line
// @ param object index of vhdl keyword like t_Identifier t_Entity
@@ -122,11 +123,13 @@ int getParsedLine(int object);
void vhdlscanFreeScanner();
+void vhdlParse();
+
// return the list of component instantiations e.g. foo: component bar
QList<Entry> & getVhdlInstList();
// returns the list of found configurations
-QList<ConfNode>& getVhdlConfiguration();
+QList<VhdlConfNode>& getVhdlConfiguration();
void isVhdlDocPending();
#endif
diff --git a/src/vhdlscanner.l b/src/vhdlscanner.l
index fb9b9c3..3637a33 100644
--- a/src/vhdlscanner.l
+++ b/src/vhdlscanner.l
@@ -66,31 +66,24 @@
#include <qmap.h>
#include "entry.h"
-static MyParserVhdl *pconv;
+extern void vhdlParse(); // defined in vhdlparser.y
static bool g_lexInit = FALSE;
static ParserInterface *g_thisParser;
-static struct s_contVhdl* yycont=NULL;
+static VhdlContainer* yycont=NULL;
static Entry* current_root;
static Entry gBlock;
static int yyLineNr =1;
-//static int yyPrevLine=1;
-//static int yyEndLine=1;
static int g_lastCommentContext;
static int inputPosition;
-//static int defineLineContinue=0;
static int startComment;
-//static int iSize=0;
static QCString inputVhdlString;
static QFile inputFile;
static QCString yyFileName;
static QList<QCString> qlist;
-
static QCString lastLetter;
-//static int totLines=0;
-//static bool multLineComment=FALSE;
static bool doxComment=FALSE; // doxygen comment ?
static QCString strComment;
static int iDocLine=-1;
@@ -99,14 +92,12 @@ static int num_chars;
static int prevToken;
static int iCodeLen;
-//static const char * g_inputString; //!< the code fragment as text
-//static int g_inputLines=0; //!<number of line in the code fragment
-//static bool g_needsTermination;
-static QMap<QCString, int> keyMap;
-
+static QMap<QCString, int> keyMap;
+static QList<Entry> lineEntry;
+static bool checkMultiComment(QCString& qcs,int line);
static void handleCommentBlock(const QCString &doc,bool brief);
static void mapLibPackage(const Entry* ce);
-static Entry* getEntryAtLine(const Entry* ce,int line);
+static QList<Entry>* getEntryAtLine(const Entry* ce,int line);
static bool addLibUseClause(const QCString &type);
static Entry* oldEntry;
static bool varr=FALSE;
@@ -554,18 +545,8 @@ BR [ \t\n\r]
startComment=yyLineNr;
g_lastCommentContext=YY_START;
}
-
- Entry* pTemp=getEntryAtLine(current_root,len);
- if (pTemp)
- { // found one line comment, add it to the entry on this line
- pTemp->briefLine=yyLineNr;
- pTemp->brief+=vhdlScanYYtext;
- pTemp->briefFile=yyFileName;
- pTemp->fileName = yyFileName;
-
- VhdlDocGen::prepareComment(pTemp->brief);
- }
- else
+
+ if(!checkMultiComment(qc,len))
{
strComment+=vhdlScanYYtext;
}
@@ -629,29 +610,17 @@ BR [ \t\n\r]
}
//printf("--> handleCommentBlock line %d\n",yyLineNr);
- Entry* pTemp=getEntryAtLine(current_root,yyLineNr);
-
if (!isEndCode && index==-1)
- {
- int j=qcs.find("--!");
- qcs=qcs.right(qcs.length()-3-j);
-
- if (pTemp)
- {
- pTemp->briefLine=yyLineNr;
- pTemp->fileName = yyFileName;
- qcs=qcs.stripWhiteSpace();
- pTemp->brief+=qcs;
+ {
+ int j=qcs.find("--!");
+ qcs=qcs.right(qcs.length()-3-j);
- pTemp->briefFile=yyFileName;
- iDocLine=-1;
- }
- else
- {
- handleCommentBlock(qcs,TRUE);
- }
- }//endcode
- }
+ if(!checkMultiComment(qcs,yyLineNr))
+ {
+ handleCommentBlock(qcs,TRUE);
+ }
+ }//endcode
+ }
<*>"/*" {
strComment+=vhdlScanYYtext;
@@ -757,12 +726,12 @@ void VHDLLanguageScanner::parsePrototype(const char *text)
}
// do parsing
-int MyParserVhdl::doLex()
-{
- int token=vhdlScanYYlex();
- //fprintf(stderr,"\ntoken: %d at line: %d",token,yyLineNr);
- return token;
-}
+//int VhdlParser::doLex()
+//{
+// int token=vhdlScanYYlex();
+// //fprintf(stderr,"\ntoken: %d at line: %d",token,yyLineNr);
+// return token;
+//}
void VHDLLanguageScanner::parseInput(const char *fileName,const char *fileBuf,Entry *root)
{
@@ -803,11 +772,8 @@ void VHDLLanguageScanner::parseInput(const char *fileName,const char *fileBuf,En
inputVhdlString=fileBuf;
yyLineNr=1;
current_root=root;
- pconv=new MyParserVhdl();
groupEnterFile(fileName,yyLineNr);
- pconv->parse(pconv);
- // resetScanner(NULL,pconv);
- delete pconv;
+ vhdlParse();
Entry* curr=getCurrentVhdlEntry(); // delete last current
delete curr;
curr=0;
@@ -945,9 +911,13 @@ static void handleCommentBlock(const QCString &doc,bool brief)
oldEntry=current;
if (brief)
+ {
current->briefLine = iDocLine;
+ }
else
+ {
current->docLine = iDocLine;
+ }
// printf("parseCommentBlock file<%s>\n [%s]\n",yyFileName.data(),doc.data());
while (parseCommentBlock(
@@ -970,7 +940,7 @@ static void handleCommentBlock(const QCString &doc,bool brief)
}
if (needsEntry)
{
- if(varr)
+ if (varr)
{
varr=FALSE;
current->name=varName;
@@ -985,25 +955,22 @@ static void handleCommentBlock(const QCString &doc,bool brief)
strComment.resize(0);
}
-// returns the vhdl type parsed at line xxx
-static Entry* getEntryAtLine(const Entry* ce,int line)
+// returns the vhdl parsed types at line xxx
+QList<Entry>* getEntryAtLine(const Entry* ce,int line)
{
EntryListIterator eli(*ce->children());
- Entry *found=0;
Entry *rt;
for (;(rt=eli.current());++eli)
{
if (rt->bodyLine==line)
{
- found=rt;
+ lineEntry.insert(0,rt);
} // if
- if (!found)
- {
- found=getEntryAtLine(rt,line);
- }
+
+ getEntryAtLine(rt,line);
}
- return found;
-}// getEntryAtLine
+ return &lineEntry;
+}
// token index in vhdlparser.hpp 258..416
int getParsedLine(int object)
@@ -1022,3 +989,25 @@ void isVhdlDocPending()
handleCommentBlock(str_doc.doc,str_doc.brief);
iDocLine=-1;
}
+
+static bool checkMultiComment(QCString& qcs,int line)
+{
+ QList<Entry> *pTemp=getEntryAtLine(current_root,line);
+
+ if (pTemp->isEmpty()) return false;
+
+ int ii=pTemp->count();
+ qcs.stripPrefix("--!");
+ while (!pTemp->isEmpty())
+ {
+ Entry *e=(Entry*)pTemp->first();
+ e->briefLine=line;
+ e->brief+=qcs;
+ iDocLine=-1;
+ pTemp->removeFirst();
+ ii=pTemp->count();
+ }
+ return true;
+}
+
+
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index b75a2f0..9475470 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -60,6 +60,7 @@ static const char compound_xsd[] =
//------------------
+/** Helper class mapping MemberList::ListType to a string representing */
class XmlSectionMapper : public QIntDict<char>
{
public:
@@ -193,6 +194,7 @@ void writeXMLLink(FTextStream &t,const char *extRef,const char *compoundId,
t << "</ref>";
}
+/** Implements TextGeneratorIntf for an XML stream. */
class TextGeneratorXMLImpl : public TextGeneratorIntf
{
public:
@@ -212,6 +214,7 @@ class TextGeneratorXMLImpl : public TextGeneratorIntf
FTextStream &m_t;
};
+/** Helper class representing a stack of objects stored by value */
template<class T> class ValStack
{
public:
@@ -265,7 +268,7 @@ template<class T> class ValStack
int m_size;
};
-
+/** Generator for producing XML formatted source code. */
class XMLCodeGenerator : public CodeOutputInterface
{
public:
@@ -733,12 +736,14 @@ static void generateXMLForMember(MemberDef *md,FTextStream &ti,FTextStream &t,De
if (md->isSettable()) t << "yes"; else t << "no";
t << "\"";
- if (md->isAssign() || md->isCopy() || md->isRetain())
+ if (md->isAssign() || md->isCopy() || md->isRetain() || md->isStrong() || md->isWeak())
{
t << " accessor=\"";
- if (md->isAssign()) t << "assign";
- else if (md->isCopy()) t << "copy";
+ if (md->isAssign()) t << "assign";
+ else if (md->isCopy()) t << "copy";
else if (md->isRetain()) t << "retain";
+ else if (md->isStrong()) t << "strong";
+ else if (md->isWeak()) t << "weak";
t << "\"";
}
}