summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--INSTALL4
-rw-r--r--Makefile.in2
-rw-r--r--README4
-rw-r--r--addon/doxmlparser/include/doxmlintf.h7
-rw-r--r--addon/doxmlparser/src/compoundhandler.cpp22
-rw-r--r--addon/doxmlparser/src/compoundhandler.h1
-rwxr-xr-xconfigure2
-rw-r--r--doc/commands.doc1
-rw-r--r--doc/install.doc42
-rw-r--r--libmd5/md5.c2
-rw-r--r--qtools/qglobal.h5
-rw-r--r--qtools/qregexp.cpp2
-rw-r--r--qtools/qwaitcondition_unix.cpp3
-rw-r--r--src/arguments.cpp79
-rw-r--r--src/arguments.h13
-rw-r--r--src/classdef.cpp188
-rw-r--r--src/classdef.h11
-rw-r--r--src/classlist.cpp3
-rw-r--r--src/code.l94
-rw-r--r--src/commentcnv.l2
-rw-r--r--src/commentscan.l31
-rw-r--r--src/compound.xsd3
-rw-r--r--src/compound_xsd.h3
-rw-r--r--src/config.l10
-rw-r--r--src/constexp.l1
-rw-r--r--src/declinfo.l2
-rw-r--r--src/defargs.l54
-rw-r--r--src/definition.cpp80
-rw-r--r--src/definition.h3
-rw-r--r--src/dirdef.cpp16
-rw-r--r--src/docparser.cpp4
-rw-r--r--src/doctokenizer.l1
-rw-r--r--src/dot.cpp4
-rw-r--r--src/doxygen.cpp297
-rw-r--r--src/doxygen.css20
-rw-r--r--src/doxygen_css.h20
-rw-r--r--src/entry.cpp22
-rw-r--r--src/entry.h8
-rw-r--r--src/filedef.cpp20
-rw-r--r--src/fortrancode.l1
-rw-r--r--src/fortranscanner.l9
-rw-r--r--src/ftvhelp.cpp5
-rw-r--r--src/groupdef.cpp42
-rw-r--r--src/groupdef.h1
-rw-r--r--src/htmlgen.cpp465
-rw-r--r--src/htmlgen.h82
-rw-r--r--src/htmlhelp.cpp2
-rw-r--r--src/index.cpp40
-rw-r--r--src/indexlog.cpp152
-rw-r--r--src/indexlog.h57
-rw-r--r--src/latexgen.cpp2
-rw-r--r--src/latexgen.h4
-rw-r--r--src/layout.cpp234
-rw-r--r--src/layout.h21
-rw-r--r--src/libdoxygen.pro.in2
-rw-r--r--src/mangen.h4
-rw-r--r--src/markdown.cpp32
-rw-r--r--src/marshal.cpp50
-rw-r--r--src/memberdef.cpp461
-rw-r--r--src/memberdef.h12
-rw-r--r--src/memberlist.cpp2
-rw-r--r--src/namespacedef.cpp17
-rw-r--r--src/navtree.js26
-rw-r--r--src/navtree_js.h26
-rw-r--r--src/outputgen.h10
-rw-r--r--src/outputlist.h8
-rw-r--r--src/portable.cpp2
-rw-r--r--src/portable.h2
-rw-r--r--src/portable_c.c4
-rw-r--r--src/pycode.l1
-rw-r--r--src/pyscanner.l1
-rw-r--r--src/rtfgen.cpp14
-rw-r--r--src/rtfgen.h4
-rw-r--r--src/scanner.l321
-rw-r--r--src/tclscanner.l1
-rw-r--r--src/translator.h12
-rw-r--r--src/translator_adapter.h31
-rw-r--r--src/translator_cn.h2
-rw-r--r--src/translator_cz.h2
-rw-r--r--src/translator_de.h2
-rw-r--r--src/translator_en.h63
-rw-r--r--src/translator_eo.h2
-rw-r--r--src/translator_es.h2
-rw-r--r--src/translator_hr.h2
-rw-r--r--src/translator_it.h2
-rw-r--r--src/translator_jp.h36
-rw-r--r--src/translator_nl.h62
-rw-r--r--src/translator_pl.h2
-rw-r--r--src/translator_sk.h2
-rw-r--r--src/translatordecoder.h20
-rw-r--r--src/util.cpp49
-rw-r--r--src/util.h2
-rw-r--r--src/vhdlcode.l1
-rw-r--r--src/vhdldocgen.cpp2
-rw-r--r--src/vhdlscanner.l2
-rw-r--r--src/xmlgen.cpp4
-rwxr-xr-xtmake/lib/macosx-c++/tmake.conf2
97 files changed, 2372 insertions, 1135 deletions
diff --git a/INSTALL b/INSTALL
index 50bc952..58975e6 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,7 +1,7 @@
-DOXYGEN Version 1.8.1.2
+DOXYGEN Version 1.8.1.2-20120729
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.
--------
-Dimitri van Heesch (12 July 2012)
+Dimitri van Heesch (29 July 2012)
diff --git a/Makefile.in b/Makefile.in
index 62e4ff9..67a2ba0 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -129,7 +129,7 @@ rpmbinary: dist
ctags:
- ctags -f tags src addon/doxywizard qtools
+ ctags -R -f tags src addon/doxywizard qtools
FORCE:
diff --git a/README b/README
index 96b01f7..5108969 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-DOXYGEN Version 1.8.1.2
+DOXYGEN Version 1.8.1.2_20120729
Please read INSTALL for compilation instructions.
@@ -26,4 +26,4 @@ forum.
Enjoy,
-Dimitri van Heesch (dimitri@stack.nl) (12 July 2012)
+Dimitri van Heesch (dimitri@stack.nl) (29 July 2012)
diff --git a/addon/doxmlparser/include/doxmlintf.h b/addon/doxmlparser/include/doxmlintf.h
index 88cb2e3..2314021 100644
--- a/addon/doxmlparser/include/doxmlintf.h
+++ b/addon/doxmlparser/include/doxmlintf.h
@@ -1070,6 +1070,13 @@ class IPage : public ICompound
virtual const IDocTitle *title() const = 0;
};
+/** \brief Interface to a directory in the object model. */
+class IDir : public ICompound
+{
+ public:
+ virtual ICompoundIterator *nestedCompounds() const = 0;
+};
+
/*! Root node of the object model. */
class IDoxygen
{
diff --git a/addon/doxmlparser/src/compoundhandler.cpp b/addon/doxmlparser/src/compoundhandler.cpp
index 78fe10a..71d50cb 100644
--- a/addon/doxmlparser/src/compoundhandler.cpp
+++ b/addon/doxmlparser/src/compoundhandler.cpp
@@ -507,15 +507,19 @@ ICompound *CompoundHandler::toICompound() const
{
switch (m_kind)
{
- case IClass::Class: return (IClass *)this;
- case IStruct::Struct: return (IStruct *)this;
- case IUnion::Union: return (IUnion *)this;
- case IException::Exception: return (IException *)this;
- case IInterface::Interface: return (IInterface *)this;
- case INamespace::Namespace: return (INamespace *)this;
- case IFile::File: return (IFile *)this;
- case IGroup::Group: return (IGroup *)this;
- case IPage::Page: return (IPage *)this;
+ case ICompound::Class: return (IClass *)this;
+ case ICompound::Struct: return (IStruct *)this;
+ case ICompound::Union: return (IUnion *)this;
+ case ICompound::Interface: return (IInterface *)this;
+ case ICompound::Protocol: return (IClass *)this;
+ case ICompound::Category: return (IClass *)this;
+ case ICompound::Exception: return (IException *)this;
+ case ICompound::File: return (IFile *)this;
+ case ICompound::Namespace: return (INamespace *)this;
+ case ICompound::Group: return (IGroup *)this;
+ case ICompound::Page: return (IPage *)this;
+ case ICompound::Example: return (IPage *)this;
+ case ICompound::Dir: return (IDir *)this;
default: return 0;
}
return 0;
diff --git a/addon/doxmlparser/src/compoundhandler.h b/addon/doxmlparser/src/compoundhandler.h
index 9c081ed..dea7d42 100644
--- a/addon/doxmlparser/src/compoundhandler.h
+++ b/addon/doxmlparser/src/compoundhandler.h
@@ -110,6 +110,7 @@ class CompoundHandler : public IClass,
public IFile,
public IGroup,
public IPage,
+ public IDir,
public BaseHandler<CompoundHandler>
{
friend class RelatedCompound;
diff --git a/configure b/configure
index 3ce38f7..3dd0baa 100755
--- a/configure
+++ b/configure
@@ -20,7 +20,7 @@ doxygen_version_minor=8
doxygen_version_revision=1.2
#NOTE: Setting version_mmn to "NO" will omit mmn info from the package.
-doxygen_version_mmn=NO
+doxygen_version_mmn=20120729
bin_dirs=`echo $PATH | sed -e "s/:/ /g"`
diff --git a/doc/commands.doc b/doc/commands.doc
index 1fdf971..66eabd9 100644
--- a/doc/commands.doc
+++ b/doc/commands.doc
@@ -600,6 +600,7 @@ Structural indicators
\sa section \ref cmdendinternal "\\endinternal".
+
<hr>
\section cmdmainpage \\mainpage [(title)]
diff --git a/doc/install.doc b/doc/install.doc
index d076cf3..d8a75a2 100644
--- a/doc/install.doc
+++ b/doc/install.doc
@@ -135,33 +135,33 @@ Compilation is now done by performing the following steps:
\section install_bin_unix Installing the binaries on UNIX
- After the compilation of the source code do a <code>make install</code>
- to install doxygen. If you downloaded the binary distribution for UNIX,
- type:
+After the compilation of the source code do a <code>make install</code>
+to install doxygen. If you downloaded the binary distribution for UNIX,
+type:
- ./configure
- make install
+ ./configure
+ make install
- Binaries are installed into the directory <code>\<prefix\>/bin</code>.
- Use <code>make install_docs</code> to install the
- documentation and examples into <code>\<docdir\>/doxygen</code>.
+Binaries are installed into the directory <code>\<prefix\>/bin</code>.
+Use <code>make install_docs</code> to install the
+documentation and examples into <code>\<docdir\>/doxygen</code>.
- <code>\<prefix\></code> defaults to <code>/usr/local</code> but can be changed with
- the <code>--prefix</code> option of the configure script.
- The default <code>\<docdir\></code> directory is
- <code>\<prefix\>/share/doc/packages</code> and can be changed with
- the <code>--docdir</code> option of the configure script.
+<code>\<prefix\></code> defaults to <code>/usr/local</code> but can be changed with
+the <code>--prefix</code> option of the configure script.
+The default <code>\<docdir\></code> directory is
+<code>\<prefix\>/share/doc/packages</code> and can be changed with
+the <code>--docdir</code> option of the configure script.
- Alternatively, you can also copy the binaries from the <code>bin</code>
- directory manually to some <code>bin</code> directory in your search path.
- This is sufficient to use doxygen.
+Alternatively, you can also copy the binaries from the <code>bin</code>
+directory manually to some <code>bin</code> directory in your search path.
+This is sufficient to use doxygen.
- \note You need the GNU install tool for this to work (it is part of
- the coreutils package). Other install tools may put the binaries in
- the wrong directory!
+\note You need the GNU install tool for this to work (it is part of
+the coreutils package). Other install tools may put the binaries in
+the wrong directory!
- If you have a RPM or DEP package, then please follow the
- standard installation procedure that is required for these packages.
+If you have a RPM or DEP package, then please follow the
+standard installation procedure that is required for these packages.
\section unix_problems Known compilation problems for UNIX
diff --git a/libmd5/md5.c b/libmd5/md5.c
index 0763598..5210d92 100644
--- a/libmd5/md5.c
+++ b/libmd5/md5.c
@@ -164,7 +164,7 @@ MD5Final(md5byte digest[16], struct MD5Context *ctx)
byteSwap(ctx->buf, 4);
memcpy(digest, ctx->buf, 16);
- memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
+ memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
}
#ifndef ASM_MD5
diff --git a/qtools/qglobal.h b/qtools/qglobal.h
index 18d56ab..9a97015 100644
--- a/qtools/qglobal.h
+++ b/qtools/qglobal.h
@@ -92,7 +92,10 @@
# if !defined(MAC_OS_X_VERSION_10_7)
# define MAC_OS_X_VERSION_10_7 MAC_OS_X_VERSION_10_6 + 10
# endif
-# if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_7)
+# if !defined(MAC_OS_X_VERSION_10_8)
+# define MAC_OS_X_VERSION_10_8 MAC_OS_X_VERSION_10_7 + 10
+# endif
+# if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_8)
# warning "This version of Mac OS X is unsupported"
# endif
#elif defined(MSDOS) || defined(_MSDOS) || defined(__MSDOS__)
diff --git a/qtools/qregexp.cpp b/qtools/qregexp.cpp
index b151558..2b3770c 100644
--- a/qtools/qregexp.cpp
+++ b/qtools/qregexp.cpp
@@ -826,7 +826,7 @@ static uint char_val( const char **str, uint *strlength ) // get char value
}
-#if defined(DEBUG)
+#if 0 //defined(DEBUG)
static uint *dump( uint *p )
{
while ( *p != END ) {
diff --git a/qtools/qwaitcondition_unix.cpp b/qtools/qwaitcondition_unix.cpp
index aa22a4b..d1ff27e 100644
--- a/qtools/qwaitcondition_unix.cpp
+++ b/qtools/qwaitcondition_unix.cpp
@@ -51,8 +51,9 @@ static void report_error(int code, const char *where, const char *what)
qWarning("%s: %s failure: %d", where, what, code);
}
-struct QWaitConditionPrivate
+class QWaitConditionPrivate
{
+ public:
pthread_mutex_t mutex;
pthread_cond_t cond;
int waiters;
diff --git a/src/arguments.cpp b/src/arguments.cpp
index 128223b..2acf855 100644
--- a/src/arguments.cpp
+++ b/src/arguments.cpp
@@ -1,4 +1,6 @@
#include "arguments.h"
+#include "marshal.h"
+#include <assert.h>
/*! the argument list is documented if one of its
* arguments is documented
@@ -15,3 +17,80 @@ bool ArgumentList::hasDocumentation() const
return hasDocs;
}
+ArgumentList *ArgumentList::deepCopy() const
+{
+ ArgumentList *argList = new ArgumentList;
+ argList->setAutoDelete(TRUE);
+
+ QListIterator<Argument> ali(*this);
+ Argument *a;
+ for (;(a=ali.current());++ali)
+ {
+ argList->append(new Argument(*a));
+ }
+ argList->constSpecifier = constSpecifier;
+ argList->volatileSpecifier = volatileSpecifier;
+ argList->pureSpecifier = pureSpecifier;
+ argList->trailingReturnType = trailingReturnType;
+
+ return argList;
+}
+
+ArgumentList *ArgumentList::unmarshal(StorageIntf *s)
+{
+ uint i;
+ uint count = unmarshalUInt(s);
+ if (count==NULL_LIST) return 0; // null list
+ ArgumentList *result = new ArgumentList;
+ assert(count<1000000);
+ //printf("unmarshalArgumentList: %d\n",count);
+ for (i=0;i<count;i++)
+ {
+ Argument *a = new Argument;
+ a->attrib = unmarshalQCString(s);
+ a->type = unmarshalQCString(s);
+ a->canType = unmarshalQCString(s);
+ a->name = unmarshalQCString(s);
+ a->array = unmarshalQCString(s);
+ a->defval = unmarshalQCString(s);
+ a->docs = unmarshalQCString(s);
+ result->append(a);
+ }
+ result->constSpecifier = unmarshalBool(s);
+ result->volatileSpecifier = unmarshalBool(s);
+ result->pureSpecifier = unmarshalBool(s);
+ result->trailingReturnType = unmarshalQCString(s);
+ return result;
+}
+
+void ArgumentList::marshal(StorageIntf *s,ArgumentList *argList)
+{
+ if (argList==0)
+ {
+ marshalUInt(s,NULL_LIST); // null pointer representation
+ }
+ else
+ {
+ marshalUInt(s,argList->count());
+ if (argList->count()>0)
+ {
+ ArgumentListIterator ali(*argList);
+ Argument *a;
+ for (ali.toFirst();(a=ali.current());++ali)
+ {
+ marshalQCString(s,a->attrib);
+ marshalQCString(s,a->type);
+ marshalQCString(s,a->canType);
+ marshalQCString(s,a->name);
+ marshalQCString(s,a->array);
+ marshalQCString(s,a->defval);
+ marshalQCString(s,a->docs);
+ }
+ }
+ marshalBool(s,argList->constSpecifier);
+ marshalBool(s,argList->volatileSpecifier);
+ marshalBool(s,argList->pureSpecifier);
+ marshalQCString(s,argList->trailingReturnType);
+ }
+}
+
diff --git a/src/arguments.h b/src/arguments.h
index c5ca942..42fd7bc 100644
--- a/src/arguments.h
+++ b/src/arguments.h
@@ -19,6 +19,8 @@
#include "qtbc.h"
#include <qlist.h>
+class StorageIntf;
+
/*! \brief This class contains the information about the argument of a
* function or template
*
@@ -71,7 +73,7 @@ struct Argument
/*! \brief This class represents an function or template argument list.
*
* This class also stores some information about member that is typically
- * put after the argument list, such as wether the member is const,
+ * put after the argument list, such as whether the member is const,
* volatile or pure virtual.
*/
class ArgumentList : public QList<Argument>
@@ -85,6 +87,9 @@ class ArgumentList : public QList<Argument>
{ setAutoDelete(TRUE); }
/*! Destroys the argument list */
~ArgumentList() {}
+ /*! Makes a deep copy of this object */
+ ArgumentList *deepCopy() const;
+ /*! Does any argument of this list have documentation? */
bool hasDocumentation() const;
/*! Does the member modify the state of the class? default: FALSE. */
bool constSpecifier;
@@ -92,6 +97,12 @@ class ArgumentList : public QList<Argument>
bool volatileSpecifier;
/*! Is this a pure virtual member? default: FALSE */
bool pureSpecifier;
+ /*! C++11 style Trailing return type? */
+ QCString trailingReturnType;
+ /*! C++11 defaulted method */
+
+ static ArgumentList *unmarshal(StorageIntf *s);
+ static void marshal(StorageIntf *s,ArgumentList *argList);
};
typedef QListIterator<Argument> ArgumentListIterator;
diff --git a/src/classdef.cpp b/src/classdef.cpp
index 68f8b06..947d7d3 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -179,6 +179,8 @@ class ClassDefImpl
/** Does this class represent a Java style enum? */
bool isJavaEnum;
+
+ int spec;
};
void ClassDefImpl::init(const char *defFileName, const char *name,
@@ -222,6 +224,7 @@ void ClassDefImpl::init(const char *defFileName, const char *name,
arrowOperator = 0;
taggedInnerClasses = 0;
tagLessRef = 0;
+ spec=0;
//QCString ns;
//extractNamespaceName(name,className,ns);
//printf("m_name=%s m_className=%s ns=%s\n",m_name.data(),m_className.data(),ns.data());
@@ -329,7 +332,7 @@ QCString ClassDef::displayName(bool includeScope) const
return n;
}
-// inserts a base class in the inheritance list
+// inserts a base/super class in the inheritance list
void ClassDef::insertBaseClass(ClassDef *cd,const char *n,Protection p,
Specifier s,const char *t)
{
@@ -344,7 +347,7 @@ void ClassDef::insertBaseClass(ClassDef *cd,const char *n,Protection p,
m_impl->isSimple = FALSE;
}
-// inserts a sub class in the inherited list
+// inserts a derived/sub class in the inherited-by list
void ClassDef::insertSubClass(ClassDef *cd,Protection p,
Specifier s,const char *t)
{
@@ -1460,8 +1463,9 @@ void ClassDef::writeSummaryLinks(OutputList &ol)
LayoutDocManager::instance().docEntries(LayoutDocManager::Class));
LayoutDocEntry *lde;
bool first=TRUE;
+ SrcLangExt lang = getLanguage();
- if (getLanguage()!=SrcLangExt_VHDL)
+ if (lang!=SrcLangExt_VHDL)
{
for (eli.toFirst();(lde=eli.current());++eli)
{
@@ -1471,7 +1475,7 @@ void ClassDef::writeSummaryLinks(OutputList &ol)
)
{
LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
- ol.writeSummaryLink(0,"nested-classes",ls->title,first);
+ ol.writeSummaryLink(0,"nested-classes",ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::ClassAllMembersLink &&
@@ -1488,7 +1492,7 @@ void ClassDef::writeSummaryLinks(OutputList &ol)
MemberList * ml = getMemberList(lmd->type);
if (ml && ml->declVisible())
{
- ol.writeSummaryLink(0,ml->listTypeAsString(),lmd->title,first);
+ ol.writeSummaryLink(0,ml->listTypeAsString(),lmd->title(lang),first);
first=FALSE;
}
}
@@ -1585,6 +1589,8 @@ void ClassDef::writeInlineDocumentation(OutputList &ol)
}
ol.popGeneratorState();
+ SrcLangExt lang=getLanguage();
+
// part 2: the header and detailed description
for (eli.toFirst();(lde=eli.current());++eli)
{
@@ -1610,7 +1616,7 @@ void ClassDef::writeInlineDocumentation(OutputList &ol)
case LayoutDocEntry::MemberDecl:
{
LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde;
- if (!isSimple) writeMemberDeclarations(ol,lmd->type,lmd->title,lmd->subscript,TRUE);
+ if (!isSimple) writeMemberDeclarations(ol,lmd->type,lmd->title(lang),lmd->subtitle(lang),TRUE);
}
break;
case LayoutDocEntry::MemberGroups:
@@ -1631,7 +1637,7 @@ void ClassDef::writeInlineDocumentation(OutputList &ol)
}
else
{
- writeMemberDocumentation(ol,lmd->type,lmd->title,TRUE);
+ writeMemberDocumentation(ol,lmd->type,lmd->title(lang),TRUE);
}
}
break;
@@ -1740,6 +1746,7 @@ void ClassDef::writeDeclarationLink(OutputList &ol,bool &found,const char *heade
Doxygen::tagFile << " <class kind=\"" << compoundTypeString()
<< "\">" << convertToXML(name()) << "</class>" << endl;
}
+ ol.startMemberDeclaration();
ol.startMemberItem(anchor(),FALSE);
QCString ctype = compoundTypeString();
QCString cname;
@@ -1796,7 +1803,32 @@ void ClassDef::writeDeclarationLink(OutputList &ol,bool &found,const char *heade
}
ol.endMemberDescription();
}
+ ol.endMemberDeclaration(anchor(),0);
+ }
+}
+
+void ClassDef::addClassAttributes(OutputList &ol)
+{
+ QStrList sl;
+ if (isFinal()) sl.append("final");
+ if (isSealed()) sl.append("sealed");
+ if (isAbstract()) sl.append("abstract");
+
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Html);
+ if (sl.count()>0)
+ {
+ ol.startLabels();
+ const char *s=sl.first();
+ while (s)
+ {
+ const char *ns = sl.next();
+ ol.writeLabel(s,ns==0);
+ s=ns;
+ }
+ ol.endLabels();
}
+ ol.popGeneratorState();
}
void ClassDef::writeDocumentationContents(OutputList &ol,const QCString &pageTitle)
@@ -1820,6 +1852,8 @@ void ClassDef::writeDocumentationContents(OutputList &ol,const QCString &pageTit
//---------------------------------------- start flexible part -------------------------------
+ SrcLangExt lang = getLanguage();
+
QListIterator<LayoutDocEntry> eli(
LayoutDocManager::instance().docEntries(LayoutDocManager::Class));
LayoutDocEntry *lde;
@@ -1851,13 +1885,13 @@ void ClassDef::writeDocumentationContents(OutputList &ol,const QCString &pageTit
case LayoutDocEntry::MemberDecl:
{
LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde;
- writeMemberDeclarations(ol,lmd->type,lmd->title,lmd->subscript);
+ writeMemberDeclarations(ol,lmd->type,lmd->title(lang),lmd->subtitle(lang));
}
break;
case LayoutDocEntry::ClassNestedClasses:
{
LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
- writeNestedClasses(ol,ls->title);
+ writeNestedClasses(ol,ls->title(lang));
}
break;
case LayoutDocEntry::MemberDeclEnd:
@@ -1866,7 +1900,7 @@ void ClassDef::writeDocumentationContents(OutputList &ol,const QCString &pageTit
case LayoutDocEntry::DetailedDesc:
{
LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
- writeDetailedDescription(ol,pageType,exampleFlag,ls->title);
+ writeDetailedDescription(ol,pageType,exampleFlag,ls->title(lang));
}
break;
case LayoutDocEntry::MemberDefStart:
@@ -1878,7 +1912,7 @@ void ClassDef::writeDocumentationContents(OutputList &ol,const QCString &pageTit
case LayoutDocEntry::MemberDef:
{
LayoutDocEntryMemberDef *lmd = (LayoutDocEntryMemberDef*)lde;
- writeMemberDocumentation(ol,lmd->type,lmd->title);
+ writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
}
break;
case LayoutDocEntry::MemberDefEnd:
@@ -1967,6 +2001,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
startTitle(ol,getOutputFileBase(),this);
ol.parseText(pageTitle);
+ addClassAttributes(ol);
addGroupListToTitle(ol,this);
endTitle(ol,getOutputFileBase(),displayName());
writeDocumentationContents(ol,pageTitle);
@@ -2484,7 +2519,7 @@ bool ClassDef::isLinkableInProject() const
(!m_impl->isLocal || extractLocal) && /* local */
(hasDocumentation() || !hideUndoc) && /* documented */
(!m_impl->isStatic || extractStatic) && /* static */
- !isReference(); /* not an external reference */
+ !isReference(); /* not an external reference */
}
}
@@ -2513,7 +2548,7 @@ bool ClassDef::isVisibleInHierarchy()
// and not an anonymous compound
name().find('@')==-1 &&
// not an artificially introduced class
- !isArtificial() &&
+ /*!isArtificial() &&*/ // 1.8.2: allowed these to appear
// and not privately inherited
protectionLevelVisible(m_impl->prot) &&
// documented or shown anyway or documentation is external
@@ -2837,9 +2872,39 @@ void ClassDef::mergeCategory(ClassDef *category)
// in case extract local methods is not enabled we don't add the methods
// of the category in case it is defined in the .m file.
if (makePrivate && !extractLocalMethods) return;
+ bool isExtension = category->isExtension();
category->setCategoryOf(this);
- category->setArtificial(TRUE);
+ if (isExtension)
+ {
+ category->setArtificial(TRUE);
+
+ // copy base classes/protocols from extension
+ if (category->baseClasses())
+ {
+ BaseClassListIterator bcli(*category->baseClasses());
+ BaseClassDef *bcd;
+ for ( ; (bcd=bcli.current()) ; ++bcli )
+ {
+ insertBaseClass(bcd->classDef,bcd->usedName,bcd->prot,bcd->virt,bcd->templSpecifiers);
+ // correct bcd->classDef so that they do no longer derive from
+ // category, but from this class!
+ if (bcd->classDef->subClasses())
+ {
+ BaseClassListIterator scli(*bcd->classDef->subClasses());
+ BaseClassDef *scd;
+ for ( ; (scd=scli.current()) ; ++scli )
+ {
+ if (scd->classDef==category)
+ {
+ scd->classDef=this;
+ }
+ }
+ }
+ }
+ }
+
+ }
// make methods private for categories defined in the .m file
//printf("%s::mergeCategory makePrivate=%d\n",name().data(),makePrivate);
@@ -2856,14 +2921,24 @@ void ClassDef::mergeCategory(ClassDef *category)
if (dstMni) // method is already defined in the class
{
//printf("Existing member %s\n",srcMni->memberName());
- // TODO: we should remove the other member and insert this one.
- MemberInfo *mi = dstMni->getFirst();
- if (mi)
+ MemberInfo *dstMi = dstMni->getFirst();
+ MemberInfo *srcMi = srcMni->getFirst();
+ //if (dstMi)
+ //{
+ // Protection prot = dstMi->prot;
+ // if (makePrivate || isExtension)
+ // {
+ // prot = Private;
+ // removeMemberFromLists(dstMi->memberDef);
+ // internalInsertMember(dstMi->memberDef,prot,FALSE);
+ // }
+ //}
+ if (srcMi && dstMi)
{
- Protection prot = mi->prot;
- if (makePrivate) prot = Private;
- removeMemberFromLists(mi->memberDef);
- internalInsertMember(mi->memberDef,prot,FALSE);
+ combineDeclarationAndDefinition(srcMi->memberDef,dstMi->memberDef);
+ dstMi->memberDef->setCategory(category);
+ dstMi->memberDef->setCategoryRelation(srcMi->memberDef);
+ srcMi->memberDef->setCategoryRelation(dstMi->memberDef);
}
}
else // new method name
@@ -2880,15 +2955,42 @@ void ClassDef::mergeCategory(ClassDef *category)
{
//printf("Adding '%s'\n",mi->memberDef->name().data());
Protection prot = mi->prot;
- if (makePrivate) prot = Private;
- MemberInfo *newMi=new MemberInfo(mi->memberDef,prot,mi->virt,mi->inherited);
+ //if (makePrivate) prot = Private;
+ MemberDef *newMd = mi->memberDef->deepCopy();
+ //printf("Copying member %s\n",mi->memberDef->name().data());
+ newMd->moveTo(this);
+
+ MemberInfo *newMi=new MemberInfo(newMd,prot,mi->virt,mi->inherited);
newMi->scopePath=mi->scopePath;
newMi->ambigClass=mi->ambigClass;
newMi->ambiguityResolutionScope=mi->ambiguityResolutionScope;
newMni->append(newMi);
- mi->memberDef->moveTo(this);
- mi->memberDef->setCategory(category);
- internalInsertMember(mi->memberDef,prot,FALSE);
+
+ // also add the newly created member to the global members list
+ if (newMd)
+ {
+ MemberName *mn;
+ QCString name = newMd->name();
+ if ((mn=Doxygen::memberNameSDict->find(name)))
+ {
+ mn->append(newMd);
+ }
+ else
+ {
+ mn = new MemberName(newMd->name());
+ mn->append(newMd);
+ Doxygen::memberNameSDict->append(name,mn);
+ }
+ }
+
+ newMd->setCategory(category);
+ newMd->setCategoryRelation(mi->memberDef);
+ mi->memberDef->setCategoryRelation(newMd);
+ if (makePrivate || isExtension)
+ {
+ newMd->makeImplementationDetail();
+ }
+ internalInsertMember(newMd,prot,FALSE);
}
// add it to the dictionary
@@ -3926,7 +4028,7 @@ void ClassDef::writeAdditionalInheritedMembers(OutputList &ol)
if (ml==0 || ml->numDecMembers()==0)
{
QPtrDict<void> visited(17);
- writeInheritedMemberDeclarations(ol,lmd->type,lmd->title,this,TRUE,&visited);
+ writeInheritedMemberDeclarations(ol,lmd->type,lmd->title(getLanguage()),this,TRUE,&visited);
}
}
}
@@ -4175,7 +4277,17 @@ bool ClassDef::isTemplateArgument() const
bool ClassDef::isAbstract() const
{
- return m_impl->isAbstract;
+ return m_impl->isAbstract || (m_impl->spec&Entry::Abstract);
+}
+
+bool ClassDef::isFinal() const
+{
+ return m_impl->spec&Entry::Final;
+}
+
+bool ClassDef::isSealed() const
+{
+ return m_impl->spec&Entry::Sealed;
}
bool ClassDef::isObjectiveC() const
@@ -4328,9 +4440,9 @@ bool ClassDef::isEmbeddedInOuterScope() const
);
//printf("%s::isEmbeddedInOuterScope(): inlineGroupedClasses=%d "
// "inlineSimpleClasses=%d partOfGroups()=%p m_impl->isSimple=%d "
- // "getOuterScope()=%p b1=%d b2=%d\n",
+ // "getOuterScope()=%s b1=%d b2=%d\n",
// name().data(),inlineGroupedClasses,inlineSimpleClasses,
- // partOfGroups().pointer(),m_impl->isSimple,getOuterScope(),b1,b2);
+ // partOfGroups().pointer(),m_impl->isSimple,getOuterScope()?getOuterScope()->name().data():"<none>",b1,b2);
return b1 || b2; // either reason will do
}
@@ -4372,3 +4484,19 @@ bool ClassDef::isJavaEnum() const
{
return m_impl->isJavaEnum;
}
+
+void ClassDef::setClassSpecifier(int spec)
+{
+ m_impl->spec = spec;
+}
+
+bool ClassDef::isExtension() const
+{
+ QCString n = name();
+ int si = n.find('(');
+ int ei = n.find(')');
+ bool b = ei>si && n.mid(si+1,ei-si-1).stripWhiteSpace().isEmpty();
+ return b;
+}
+
+
diff --git a/src/classdef.h b/src/classdef.h
index 033162e..e1fa0e5 100644
--- a/src/classdef.h
+++ b/src/classdef.h
@@ -244,6 +244,15 @@ class ClassDef : public Definition
/** Returns TRUE if this class is implemented in C# */
bool isCSharp() const;
+ /** Returns TRUE if this class is marked as final */
+ bool isFinal() const;
+
+ /** Returns TRUE if this class is marked as sealed */
+ bool isSealed() const;
+
+ /** Returns TRUE if this class represents an Objective-C 2.0 extension (nameless category) */
+ bool isExtension() const;
+
/** Returns the class of which this is a category (Objective-C only) */
ClassDef *categoryOf() const;
@@ -303,6 +312,7 @@ class ClassDef : public Definition
void setIsStatic(bool b);
void setCompoundType(CompoundType t);
void setClassName(const char *name);
+ void setClassSpecifier(int spec);
void setTemplateArguments(ArgumentList *al);
void setTemplateBaseClassNames(QDict<int> *templateNames);
@@ -387,6 +397,7 @@ class ClassDef : public Definition
int countInheritedDecMembers(MemberList::ListType lt);
int countAdditionalInheritedMembers();
void writeAdditionalInheritedMembers(OutputList &ol);
+ void addClassAttributes(OutputList &ol);
ClassDefImpl *m_impl;
diff --git a/src/classlist.cpp b/src/classlist.cpp
index b85b178..188664b 100644
--- a/src/classlist.cpp
+++ b/src/classlist.cpp
@@ -96,6 +96,7 @@ bool ClassSDict::declVisible(const ClassDef::CompoundType *filter) const
void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *filter,
const char *header,bool localNames)
{
+ static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");
if (count()>0)
{
ClassSDict::Iterator sdi(*this);
@@ -105,6 +106,8 @@ void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *f
{
//printf(" ClassSDict::writeDeclaration for %s\n",cd->name().data());
if (cd->name().find('@')==-1 &&
+ !cd->isExtension() &&
+ (cd->protection()!=Private || extractPrivate) &&
(filter==0 || *filter==cd->compoundType())
)
{
diff --git a/src/code.l b/src/code.l
index edf91d4..6668486 100644
--- a/src/code.l
+++ b/src/code.l
@@ -89,6 +89,7 @@ static bool g_insideBody;
static int g_bodyCurlyCount;
static QCString g_saveName;
static QCString g_saveType;
+static QCString g_delimiter;
static int g_bracketCount = 0;
static int g_curlyCount = 0;
@@ -880,7 +881,7 @@ static bool getLinkInScope(const QCString &c, // scope
if (getDefs(c,m,"()",md,cd,fd,nd,gd,FALSE,g_sourceFileDef,FALSE,g_forceTagReference) &&
md->isLinkable() && (!varOnly || md->isVariable()))
{
- //printf("found it!\n");
+ //printf("found it %s!\n",md->qualifiedName().data());
if (g_exampleBlock)
{
QCString anchor;
@@ -1302,6 +1303,10 @@ static void generateFunctionLink(CodeOutputInterface &ol,const char *funcName)
ClassDef *ccd=0;
QCString locScope=g_classScope;
QCString locFunc=removeRedundantWhiteSpace(funcName);
+ QCString funcScope;
+ QCString funcWithScope=locFunc;
+ QCString funcWithFullScope=locFunc;
+ QCString fullScope=locScope;
//fprintf(stdout,"*** locScope=%s locFunc=%s\n",locScope.data(),locFunc.data());
int len=2;
int i=locFunc.findRev("::");
@@ -1323,14 +1328,7 @@ static void generateFunctionLink(CodeOutputInterface &ol,const char *funcName)
if (i==-1) i=locFunc.findRev("\\"),len=1; // for PHP
if (i>0)
{
- if (locScope.isEmpty())
- {
- locScope=locFunc.left(i);
- }
- else
- {
- locScope+="::"+locFunc.left(i);
- }
+ funcScope=locFunc.left(i);
locFunc=locFunc.right(locFunc.length()-i-len).stripWhiteSpace();
int ts=locScope.find('<'); // start of template
int te=locScope.findRev('>'); // end of template
@@ -1340,9 +1338,28 @@ static void generateFunctionLink(CodeOutputInterface &ol,const char *funcName)
// remove template from scope
locScope=locScope.left(ts)+locScope.right(locScope.length()-te-1);
}
+ ts=funcScope.find('<'); // start of template
+ te=funcScope.findRev('>'); // end of template
+ //printf("ts=%d te=%d\n",ts,te);
+ if (ts!=-1 && te!=-1 && te>ts)
+ {
+ // remove template from scope
+ funcScope=funcScope.left(ts)+funcScope.right(funcScope.length()-te-1);
+ }
+ if (!funcScope.isEmpty())
+ {
+ funcWithScope = funcScope+"::"+locFunc;
+ if (!locScope.isEmpty())
+ {
+ fullScope=locScope+"::"+funcScope;
+ }
+ }
+ if (!locScope.isEmpty())
+ {
+ funcWithFullScope = locScope+"::"+funcWithScope;
+ }
}
- //printf("generateFunctionLink(%s) classScope=`%s'\n",locFunc.data(),locScope.data());
- if (!locScope.isEmpty() && (ccd=g_codeClassSDict->find(locScope)))
+ if (!fullScope.isEmpty() && (ccd=g_codeClassSDict->find(fullScope)))
{
//printf("using classScope %s\n",g_classScope.data());
if (ccd->baseClasses())
@@ -1357,7 +1374,22 @@ static void generateFunctionLink(CodeOutputInterface &ol,const char *funcName)
}
}
}
- if (!getLink(locScope,locFunc,ol,funcName))
+ if (!locScope.isEmpty() && fullScope!=locScope && (ccd=g_codeClassSDict->find(locScope)))
+ {
+ //printf("using classScope %s\n",g_classScope.data());
+ if (ccd->baseClasses())
+ {
+ BaseClassListIterator bcli(*ccd->baseClasses());
+ for ( ; bcli.current() ; ++bcli)
+ {
+ if (getLink(bcli.current()->classDef->name(),funcWithScope,ol,funcName))
+ {
+ goto exit;
+ }
+ }
+ }
+ }
+ if (!getLink(locScope,funcWithScope,ol,funcName))
{
generateClassOrGlobalLink(ol,funcName);
}
@@ -1782,7 +1814,7 @@ SCOPEPREFIX ({ID}{TEMPLIST}?{BN}*{SEP}{BN}*)+
KEYWORD_OBJC ("@public"|"@private"|"@protected"|"@class"|"@implementation"|"@interface"|"@end"|"@selector"|"@protocol"|"@optional"|"@required"|"@throw"|"@synthesize"|"@property")
KEYWORD ("asm"|"__assume"|"auto"|"class"|"const"|"delete"|"enum"|"explicit"|"extern"|"false"|"friend"|"gcnew"|"gcroot"|"get"|"inline"|"internal"|"mutable"|"namespace"|"new"|"nullptr"|"override"|"operator"|"pin_ptr"|"private"|"protected"|"public"|"raise"|"register"|"remove"|"self"|"set"|"sizeof"|"static"|"struct"|"__super"|"function"|"template"|"generic"|"this"|"true"|"typedef"|"typeid"|"typename"|"union"|"using"|"virtual"|"volatile"|"abstract"|"final"|"import"|"synchronized"|"transient"|{KEYWORD_OBJC})
FLOWKW ("break"|"case"|"catch"|"continue"|"default"|"do"|"else"|"finally"|"for"|"foreach"|"for each"|"goto"|"if"|"return"|"switch"|"throw"|"throws"|"try"|"while"|"@try"|"@catch"|"@finally")
-TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"object"|"short"|"signed"|"unsigned"|"void"|"wchar_t"|"size_t"|"boolean"|"id"|"SEL"|"string")
+TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"object"|"short"|"signed"|"unsigned"|"void"|"wchar_t"|"size_t"|"boolean"|"id"|"SEL"|"string"|"nullptr")
CASTKW ("const_cast"|"dynamic_cast"|"reinterpret_cast"|"static_cast")
CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^' \\\n]{1,4}"'"))
ARITHOP "+"|"-"|"/"|"*"|"%"|"--"|"++"
@@ -1790,6 +1822,9 @@ ASSIGNOP "="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|"&="|"^="|"|="
LOGICOP "=="|"!="|">"|"<"|">="|"<="|"&&"|"||"|"!"
BITOP "&"|"|"|"^"|"<<"|">>"|"~"
OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
+RAWBEGIN (u|U|L|u8)?R\"[^ \t\(\)\\]{0,16}"("
+RAWEND ")"[^ \t\(\)\\]{0,16}\"
+
%option noyywrap
%x SkipString
@@ -1823,6 +1858,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
%x ObjCSkipStr
%x OldStyleArgs
%x UsingName
+%x RawString
%%
@@ -2130,6 +2166,14 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
generateClassOrGlobalLink(*g_code,yytext);
BEGIN( ClassVar );
}
+<ClassName>{ID}{B}*"("{ID}")" { // Obj-C category
+ g_curClassName=removeRedundantWhiteSpace(yytext);
+ g_scopeStack.push(CLASSBLOCK);
+ pushScope(g_curClassName);
+ addType();
+ generateClassOrGlobalLink(*g_code,yytext);
+ BEGIN( ClassVar );
+ }
<PackageName>{ID}("."{ID})* {
g_curClassName=substitute(yytext,".","::");
//printf("found package: %s\n",g_curClassName.data());
@@ -2502,6 +2546,18 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
g_name+=yytext;
BEGIN( FuncCall );
}
+<FuncCall,Body,MemberCall,MemberCall2,SkipInits>{RAWBEGIN} {
+ QCString text=yytext;
+ int i=text.find('R');
+ g_code->codify(text.left(i+1));
+ startFontClass("stringliteral");
+ g_code->codify(yytext+i+1);
+ g_lastStringContext=YY_START;
+ g_inForEachExpression = FALSE;
+ g_delimiter = yytext+i+2;
+ g_delimiter=g_delimiter.left(g_delimiter.length()-1);
+ BEGIN( RawString );
+ }
<FuncCall,Body,MemberCall,MemberCall2,SkipInits>\" {
startFontClass("stringliteral");
g_code->codify(yytext);
@@ -2538,6 +2594,18 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
<SkipString,SkipStringS>\\. {
g_code->codify(yytext);
}
+<RawString>{RAWEND} {
+ g_code->codify(yytext);
+ QCString delimiter = yytext+1;
+ delimiter=delimiter.left(delimiter.length()-1);
+ if (delimiter==g_delimiter)
+ {
+ BEGIN( g_lastStringContext );
+ }
+ }
+<RawString>[^)]+ { g_code->codify(yytext); }
+<RawString>. { g_code->codify(yytext); }
+<RawString>\n { codifyLines(yytext); }
<SkipVerbString>[^"\n]+ {
g_code->codify(yytext);
}
diff --git a/src/commentcnv.l b/src/commentcnv.l
index 869b122..20744e1 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -36,6 +36,8 @@
#include <assert.h>
+#define YY_NO_INPUT 1
+
#define ADDCHAR(c) g_outBuf->addChar(c)
#define ADDARRAY(a,s) g_outBuf->addArray(a,s)
diff --git a/src/commentscan.l b/src/commentscan.l
index b44bd70..2d814eb 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -47,6 +47,8 @@
#include "cite.h"
#include "markdown.h"
+#define YY_NO_INPUT 1
+
// forward declarations
static bool handleBrief(const QCString &);
static bool handleFn(const QCString &);
@@ -533,7 +535,14 @@ static void addXRefItem(const char *listName,const char *itemTitle,
RefItem *item = refList->getRefItem(lii->itemId);
ASSERT(item!=0);
item->text += " <p>";
- item->text += outputXRef;
+ if (Doxygen::markdownSupport)
+ {
+ item->text += processMarkdown(yyFileName,current,outputXRef);
+ }
+ else
+ {
+ item->text += outputXRef;
+ }
//printf("%s: text +=%s\n",listName,item->text.data());
}
else // new item
@@ -548,7 +557,14 @@ static void addXRefItem(const char *listName,const char *itemTitle,
sprintf(anchorLabel,"_%s%06d",listName,itemId);
RefItem *item = refList->getRefItem(itemId);
ASSERT(item!=0);
- item->text = outputXRef;
+ if (Doxygen::markdownSupport)
+ {
+ item->text = processMarkdown(yyFileName,current,outputXRef);
+ }
+ else
+ {
+ item->text = outputXRef;
+ }
item->listAnchor = anchorLabel;
docEntry->addSpecialListItem(listName,itemId);
QCString cmdString;
@@ -835,7 +851,9 @@ DL [dD][lL]
IMG [iI][mM][gG]
HR [hH][rR]
PARA [pP][aA][rR][aA]
+CODE [cC][oO][dD][eE]
DETAILEDHTML {PRE}|{UL}|{TABLE}|{OL}|{DL}|{P}|[Hh][1-6]|{IMG}|{HR}|{PARA}
+DETAILEDHTMLOPT {CODE}
BN [ \t\n\r]
BL [ \t\r]*"\n"
B [ \t]
@@ -955,6 +973,14 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
// continue with the same input
REJECT;
}
+<Comment>"<"{DETAILEDHTMLOPT}{ATTR}">" { // HTML command that ends a brief description
+ if (current->lang==SrcLangExt_CSharp)
+ {
+ setOutput(OutputDoc);
+ }
+ // continue with the same input
+ REJECT;
+ }
<Comment>"<summary>" { // start of a .NET XML style brief description
setOutput(OutputBrief);
addOutput(yytext);
@@ -2323,6 +2349,7 @@ static bool handleDeprecated(const QCString &)
static bool handleXRefItem(const QCString &)
{
+ newXRefKind = XRef_Item;
BEGIN(XRefItemParam1);
return FALSE;
}
diff --git a/src/compound.xsd b/src/compound.xsd
index 5549b03..d8e2589 100644
--- a/src/compound.xsd
+++ b/src/compound.xsd
@@ -40,6 +40,9 @@
<xsd:attribute name="id" type="xsd:string" />
<xsd:attribute name="kind" type="DoxCompoundKind" />
<xsd:attribute name="prot" type="DoxProtectionKind" />
+ <xsd:attribute name="final" type="DoxBool" use="optional"/>
+ <xsd:attribute name="sealed" type="DoxBool" use="optional"/>
+ <xsd:attribute name="abstract" type="DoxBool" use="optional"/>
</xsd:complexType>
<xsd:complexType name="listofallmembersType">
diff --git a/src/compound_xsd.h b/src/compound_xsd.h
index 6d60a1d..7d0a9d4 100644
--- a/src/compound_xsd.h
+++ b/src/compound_xsd.h
@@ -40,6 +40,9 @@
" <xsd:attribute name=\"id\" type=\"xsd:string\" />\n"
" <xsd:attribute name=\"kind\" type=\"DoxCompoundKind\" />\n"
" <xsd:attribute name=\"prot\" type=\"DoxProtectionKind\" />\n"
+" <xsd:attribute name=\"final\" type=\"DoxBool\" use=\"optional\"/>\n"
+" <xsd:attribute name=\"sealed\" type=\"DoxBool\" use=\"optional\"/>\n"
+" <xsd:attribute name=\"abstract\" type=\"DoxBool\" use=\"optional\"/>\n"
" </xsd:complexType>\n"
"\n"
" <xsd:complexType name=\"listofallmembersType\">\n"
diff --git a/src/config.l b/src/config.l
index d19f233..3b2c426 100644
--- a/src/config.l
+++ b/src/config.l
@@ -43,6 +43,8 @@
#undef Config_getEnum
#undef Config_getBool
+#define YY_NO_INPUT 1
+
// use in-class definitions
#define Config_getString(val) getString(__FILE__,__LINE__,val)
#define Config_getInt(val) getInt(__FILE__,__LINE__,val)
@@ -463,8 +465,8 @@ static QCString configStringRecode(
}
size_t iLeft=(size_t)inputSize;
size_t oLeft=(size_t)outputSize;
- const char *inputPtr = str.data();
- char *outputPtr = output.data();
+ char *inputPtr = str.data();
+ char *outputPtr = output.data();
if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft))
{
outputSize-=(int)oLeft;
@@ -904,7 +906,7 @@ static void substEnvVarsInStrList(QStrList &sl)
if (!wasQuoted) /* as a result of the expansion, a single string
may have expanded into a list, which we'll
- add to sl. If the orginal string already
+ add to sl. If the original string already
contained multiple elements no further
splitting is done to allow quoted items with spaces! */
{
@@ -1484,7 +1486,7 @@ void Config::check()
bool b5 = Config_getBool("SKIP_FUNCTION_MACROS");
bool b6 = Config_getBool("EXTRACT_PACKAGE");
const char *s1,*s2,*s3,*s4,*s5,*s6;
- if (b1) s1=" INLINDE_INHERITED_MEMB = NO (was YES)\n"; else s1="";
+ if (b1) s1=" INLINE_INHERITED_MEMB = NO (was YES)\n"; else s1="";
if (b2) s2=" INHERIT_DOCS = NO (was YES)\n"; else s2="";
if (!b3) s3=" HIDE_SCOPE_NAMES = YES (was NO)\n"; else s3="";
if (!b4) s4=" EXTRACT_PRIVATE = YES (was NO)\n"; else s4="";
diff --git a/src/constexp.l b/src/constexp.l
index fae99cf..fda1f04 100644
--- a/src/constexp.l
+++ b/src/constexp.l
@@ -23,6 +23,7 @@
#include "ce_parse.h" // generated header file
#define YY_NEVER_INTERACTIVE 1
+#define YY_NO_INPUT 1
QCString g_strToken;
CPPValue g_resultValue;
diff --git a/src/declinfo.l b/src/declinfo.l
index 746aaae..dd3f6f8 100644
--- a/src/declinfo.l
+++ b/src/declinfo.l
@@ -28,6 +28,8 @@
#include "declinfo.h"
#include "util.h"
#include "message.h"
+
+#define YY_NO_INPUT 1
/* -----------------------------------------------------------------
*
diff --git a/src/defargs.l b/src/defargs.l
index 7044cc6..26ab91a 100644
--- a/src/defargs.l
+++ b/src/defargs.l
@@ -58,6 +58,7 @@
#include "arguments.h"
#define YY_NEVER_INTERACTIVE 1
+#define YY_NO_INPUT 1
/* -----------------------------------------------------------------
* state variables
@@ -79,6 +80,7 @@ static int g_argCurlyCount;
static int g_readArgContext;
static int g_lastDocContext;
static int g_lastDocChar;
+static QCString g_delimiter;
/* -----------------------------------------------------------------
*/
@@ -100,11 +102,14 @@ static int yyread(char *buf,int max_size)
B [ \t]
ID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*
+RAWBEGIN (u|U|L|u8)?R\"[^ \t\(\)\\]{0,16}"("
+RAWEND ")"[^ \t\(\)\\]{0,16}\"
%option noyywrap
%x Start
%x CopyArgString
+%x CopyRawString
%x CopyArgRound
%x CopyArgRound2
%x CopyArgSharp
@@ -115,6 +120,7 @@ ID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*
%x FuncQual
%x ReadDocBlock
%x ReadDocLine
+%x TrailingReturn
%%
@@ -137,6 +143,13 @@ ID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*
<ReadFuncArgDef>"'"\\[0-7]{1,3}"'" { g_curArgDefValue+=yytext; }
<ReadFuncArgDef>"'"\\."'" { g_curArgDefValue+=yytext; }
<ReadFuncArgDef>"'"."'" { g_curArgDefValue+=yytext; }
+<ReadFuncArgDef>{RAWBEGIN} { g_curArgDefValue+=yytext;
+ QCString text=yytext;
+ int i=text.find('"');
+ g_delimiter = yytext+i+1;
+ g_delimiter=g_delimiter.left(g_delimiter.length()-1);
+ BEGIN( CopyRawString );
+ }
<ReadFuncArgDef>\" {
g_curArgDefValue+=*yytext;
BEGIN( CopyArgString );
@@ -222,6 +235,11 @@ ID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*
BEGIN( g_readArgContext );
}
}
+<CopyArgRound>")"/{B}* {
+ *g_copyArgValue += *yytext;
+ if (g_argRoundCount>0) g_argRoundCount--;
+ else BEGIN( g_readArgContext );
+ }
<CopyArgSharp>"<" {
g_argSharpCount++;
*g_copyArgValue += *yytext;
@@ -235,7 +253,7 @@ ID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*
g_argCurlyCount++;
*g_copyArgValue += *yytext;
}
-<CopyArgSharp>"}" {
+<CopyArgCurly>"}" {
*g_copyArgValue += *yytext;
if (g_argCurlyCount>0) g_argCurlyCount--;
else BEGIN( g_readArgContext );
@@ -243,6 +261,15 @@ ID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*
<CopyArgString>\\. {
g_curArgDefValue+=yytext;
}
+<CopyRawString>{RAWEND} {
+ g_curArgDefValue+=yytext;
+ QCString delimiter = yytext+1;
+ delimiter=delimiter.left(delimiter.length()-1);
+ if (delimiter==g_delimiter)
+ {
+ BEGIN( ReadFuncArgDef );
+ }
+ }
<CopyArgString>\" {
g_curArgDefValue+=*yytext;
BEGIN( ReadFuncArgDef );
@@ -385,7 +412,7 @@ ID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*
<ReadFuncArgDef,CopyArgString>"->"|">="|">>" {
g_curArgDefValue+=yytext;
}
-<ReadFuncArgDef,CopyArgString>. {
+<ReadFuncArgDef,CopyArgString,CopyRawString>. {
g_curArgDefValue+=*yytext;
}
<CopyArgRound,CopyArgRound2,CopyArgSharp,CopyArgCurly>{ID} {
@@ -401,9 +428,24 @@ ID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*
<FuncQual>"volatile" {
g_argList->volatileSpecifier=TRUE;
}
-<FuncQual>"="{B}*"0" {
+<FuncQual,TrailingReturn>"="{B}*"0" {
g_argList->pureSpecifier=TRUE;
+ BEGIN(FuncQual);
}
+<FuncQual>"->" { // C++11 trailing return type
+ g_argList->trailingReturnType=" -> ";
+ BEGIN(TrailingReturn);
+ }
+<TrailingReturn>{B}/("final"|"override"){B}* {
+ unput(*yytext);
+ BEGIN(FuncQual);
+ }
+<TrailingReturn>. {
+ g_argList->trailingReturnType+=yytext;
+ }
+<TrailingReturn>\n {
+ g_argList->trailingReturnType+=yytext;
+ }
<FuncQual>")"{B}*"["[^]]*"]" { // for functions returning a pointer to an array,
// i.e. ")[]" in "int (*f(int))[4]" with argsString="(int))[4]"
g_extraTypeChars=yytext;
@@ -447,8 +489,10 @@ ID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*
*/
/*! Converts an argument string into an ArgumentList.
- * \param argsString the list of Arguments.
- * \param al a reference to resulting argument list pointer.
+ * \param[in] argsString the list of Arguments.
+ * \param[out] al a reference to resulting argument list pointer.
+ * \param[out] extraTypeChars point to string to which trailing characters
+ * for complex types are written to
*/
void stringToArgumentList(const char *argsString,ArgumentList* al,QCString *extraTypeChars)
diff --git a/src/definition.cpp b/src/definition.cpp
index 8e9b0be..03678f5 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -292,6 +292,85 @@ Definition::Definition(const char *df,int dl,
}
}
+Definition::Definition(const Definition &d) : DefinitionIntf(), LockableObj()
+{
+ m_name = d.m_name;
+ m_defLine = d.m_defLine;
+ m_impl = new DefinitionImpl;
+ *m_impl = *d.m_impl;
+ m_impl->sectionDict = 0;
+ m_impl->sourceRefByDict = 0;
+ m_impl->sourceRefsDict = 0;
+ m_impl->partOfGroups = 0;
+ m_impl->xrefListItems = 0;
+ m_impl->brief = 0;
+ m_impl->details = 0;
+ m_impl->body = 0;
+ m_impl->inbodyDocs = 0;
+ if (d.m_impl->sectionDict)
+ {
+ m_impl->sectionDict = new SectionDict(17);
+ SDict<SectionInfo>::Iterator it(*d.m_impl->sectionDict);
+ SectionInfo *si;
+ for (it.toFirst();(si=it.current());++it)
+ {
+ m_impl->sectionDict->append(si->label,si);
+ }
+ }
+ if (d.m_impl->sourceRefByDict)
+ {
+ m_impl->sourceRefByDict = new MemberSDict;
+ MemberSDict::IteratorDict it(*d.m_impl->sourceRefByDict);
+ MemberDef *md;
+ for (it.toFirst();(md=it.current());++it)
+ {
+ m_impl->sourceRefByDict->append(it.currentKey(),md);
+ }
+ }
+ if (d.m_impl->sourceRefsDict)
+ {
+ m_impl->sourceRefsDict = new MemberSDict;
+ MemberSDict::IteratorDict it(*d.m_impl->sourceRefsDict);
+ MemberDef *md;
+ for (it.toFirst();(md=it.current());++it)
+ {
+ m_impl->sourceRefsDict->append(it.currentKey(),md);
+ }
+ }
+ if (d.m_impl->partOfGroups)
+ {
+ GroupListIterator it(*d.m_impl->partOfGroups);
+ GroupDef *gd;
+ for (it.toFirst();(gd=it.current());++it)
+ {
+ makePartOfGroup(gd);
+ }
+ }
+ if (d.m_impl->xrefListItems)
+ {
+ setRefItems(d.m_impl->xrefListItems);
+ }
+ if (d.m_impl->brief)
+ {
+ m_impl->brief = new BriefInfo(*d.m_impl->brief);
+ }
+ if (d.m_impl->details)
+ {
+ m_impl->details = new DocInfo(*d.m_impl->details);
+ }
+ if (d.m_impl->body)
+ {
+ m_impl->body = new BodyInfo(*d.m_impl->body);
+ }
+ if (d.m_impl->inbodyDocs)
+ {
+ m_impl->details = new DocInfo(*d.m_impl->inbodyDocs);
+ }
+
+ m_isSymbol = d.m_isSymbol;
+ if (m_isSymbol) addToMap(m_name,this);
+}
+
Definition::~Definition()
{
if (m_isSymbol)
@@ -1297,6 +1376,7 @@ QCString Definition::qualifiedName() const
void Definition::setOuterScope(Definition *d)
{
makeResident();
+ //printf("%s::setOuterScope(%s)\n",name().data(),d?d->name().data():"<none>");
if (m_impl->outerScope!=d)
{
m_impl->qualifiedName.resize(0); // flush cached scope name
diff --git a/src/definition.h b/src/definition.h
index 33a5bbb..563fb61 100644
--- a/src/definition.h
+++ b/src/definition.h
@@ -336,8 +336,9 @@ class Definition : public DefinitionIntf, public LockableObj
void lock() const {}
void unlock() const {}
- private:
+ Definition(const Definition &d);
+ private:
static void addToMap(const char *name,Definition *d);
static void removeFromMap(Definition *d);
diff --git a/src/dirdef.cpp b/src/dirdef.cpp
index 953f3ba..ad403f0 100644
--- a/src/dirdef.cpp
+++ b/src/dirdef.cpp
@@ -18,8 +18,8 @@ static int g_dirCount=0;
DirDef::DirDef(const char *path) : Definition(path,1,path)
{
+ bool fullPathNames = Config_getBool("FULL_PATH_NAMES");
// get display name (stipping the paths mentioned in STRIP_FROM_PATH)
- m_dispName = stripFromPath(path);
// get short name (last part of path)
m_shortName = path;
m_diskName = path;
@@ -33,6 +33,11 @@ DirDef::DirDef(const char *path) : Definition(path,1,path)
m_shortName = m_shortName.mid(pi+1);
}
setLocalName(m_shortName);
+ m_dispName = fullPathNames ? stripFromPath(path) : m_shortName;
+ if (m_dispName.at(m_dispName.length()-1)=='/')
+ { // strip trailing /
+ m_dispName = m_dispName.left(m_dispName.length()-1);
+ }
m_fileList = new FileList;
m_usedDirs = new QDict<UsedDir>(257);
@@ -198,7 +203,7 @@ void DirDef::writeDirectoryGraph(OutputList &ol)
ol.disable(OutputGenerator::Man);
//ol.startParagraph();
ol.startDirDepGraph();
- ol.parseText(theTranslator->trDirDepGraph(displayName()));
+ ol.parseText(theTranslator->trDirDepGraph(shortName()));
ol.endDirDepGraph(dirDep);
//ol.endParagraph();
ol.enableAll();
@@ -218,6 +223,7 @@ void DirDef::writeSubDirList(OutputList &ol)
DirDef *dd=m_subdirs.first();
while (dd)
{
+ ol.startMemberDeclaration();
ol.startMemberItem(dd->getOutputFileBase(),0);
ol.parseText(theTranslator->trDir(FALSE,TRUE)+" ");
ol.insertMemberAlign();
@@ -239,6 +245,7 @@ void DirDef::writeSubDirList(OutputList &ol)
);
ol.endMemberDescription();
}
+ ol.endMemberDeclaration(0,0);
dd=m_subdirs.next();
}
@@ -258,6 +265,7 @@ void DirDef::writeFileList(OutputList &ol)
FileDef *fd=m_fileList->first();
while (fd)
{
+ ol.startMemberDeclaration();
ol.startMemberItem(fd->getOutputFileBase(),0);
ol.docify(theTranslator->trFile(FALSE,TRUE)+" ");
ol.insertMemberAlign();
@@ -300,6 +308,7 @@ void DirDef::writeFileList(OutputList &ol)
);
ol.endMemberDescription();
}
+ ol.endMemberDeclaration(0,0);
fd=m_fileList->next();
}
ol.endMemberList();
@@ -353,6 +362,7 @@ void DirDef::writeDocumentation(OutputList &ol)
//---------------------------------------- start flexible part -------------------------------
+ SrcLangExt lang = getLanguage();
QListIterator<LayoutDocEntry> eli(
LayoutDocManager::instance().docEntries(LayoutDocManager::Directory));
LayoutDocEntry *lde;
@@ -381,7 +391,7 @@ void DirDef::writeDocumentation(OutputList &ol)
case LayoutDocEntry::DetailedDesc:
{
LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
- writeDetailedDescription(ol,ls->title);
+ writeDetailedDescription(ol,ls->title(lang));
}
break;
case LayoutDocEntry::ClassIncludes:
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 876fede..4e25bfb 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -397,7 +397,7 @@ static void checkArgumentName(const QCString &name,bool isParam)
}
/*! Checks if the parameters that have been specified using \@param are
- * indeed all paramters.
+ * indeed all parameters.
* Must be called after checkArgumentName() has been called for each
* argument.
*/
@@ -1838,7 +1838,7 @@ void DocInclude::parse()
break;
case Snippet:
readTextFileByName(m_file,m_text);
- // check here for the existance of the blockId inside the file, so we
+ // check here for the existence of the blockId inside the file, so we
// only generate the warning once.
int count;
if (!m_blockId.isEmpty() && (count=m_text.contains(m_blockId.data()))!=2)
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index 396216d..a030f80 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -36,6 +36,7 @@
#include "portable.h"
#define YY_NEVER_INTERACTIVE 1
+#define YY_NO_INPUT 1
//--------------------------------------------------------------------------
diff --git a/src/dot.cpp b/src/dot.cpp
index 8db1025..5d6cfbd 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -349,7 +349,7 @@ static QCString replaceRef(const QCString &buf,const QCString relPath,
* references followed by a $ and then the URL.
* \param context the context (file, class, or namespace) in which the
* map file was found
- * \returns TRUE if succesful.
+ * \returns TRUE if successful.
*/
static bool convertMapFile(FTextStream &t,const char *mapName,
const QCString relPath, bool urlOnly=FALSE,
@@ -1774,7 +1774,7 @@ void DotNode::writeBox(FTextStream &t,
static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
if (!dotTransparent)
{
- ClassDef* ccd=this->m_classDef;
+ ClassDef* ccd=m_classDef;
t << ",color=\"" << labCol << "\", fillcolor=\"";
if (ccd && vhdlOpt && (VhdlDocGen::VhdlClasses)ccd->protection()==VhdlDocGen::ARCHITECTURECLASS)
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index dd90915..26784f5 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -52,7 +52,6 @@
#include "debug.h"
#include "htmlhelp.h"
#include "qhp.h"
-#include "indexlog.h"
#include "ftvhelp.h"
#include "defargs.h"
#include "rtfgen.h"
@@ -1216,6 +1215,7 @@ static void addClassToContext(EntryNav *rootNav)
cd->setLanguage(root->lang);
cd->setHidden(root->hidden);
cd->setArtificial(root->artificial);
+ cd->setClassSpecifier(root->spec);
cd->setTypeConstraints(root->typeConstr);
//printf("new ClassDef %s tempArgList=%p specScope=%s\n",fullName.data(),root->tArgList,root->scopeSpec.data());
@@ -1357,8 +1357,8 @@ static void resolveClassNestingRelations()
void distributeClassGroupRelations()
{
- static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES");
- if (!inlineGroupedClasses) return;
+ //static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES");
+ //if (!inlineGroupedClasses) return;
//printf("** distributeClassGroupRelations()\n");
ClassSDict::Iterator cli(*Doxygen::classSDict);
@@ -1406,11 +1406,13 @@ static ClassDef *createTagLessInstance(ClassDef *rootCd,ClassDef *templ,const QC
cd->setLanguage(templ->getLanguage());
cd->setBodySegment(templ->getStartBodyLine(),templ->getEndBodyLine());
cd->setBodyDef(templ->getBodyDef());
+
cd->setOuterScope(rootCd->getOuterScope());
if (rootCd->getOuterScope()!=Doxygen::globalScope)
{
rootCd->getOuterScope()->addInnerCompound(cd);
}
+
FileDef *fd = templ->getFileDef();
if (fd)
{
@@ -1867,6 +1869,7 @@ static void buildListOfUsingDecls(EntryNav *rootNav)
Entry *root = rootNav->entry();
QCString name = substitute(root->name,".","::");
+
if (g_usingDeclarations.find(name)==0)
{
FileDef *fd = rootNav->fileDef();
@@ -2132,11 +2135,25 @@ static MemberDef *addVariableToClass(
{
if (related || mtype==MemberDef::Friend || Config_getBool("HIDE_SCOPE_NAMES"))
{
- def=root->type+" "+name+root->args;
+ if (root->spec&Entry::Alias) // turn 'typedef B A' into 'using A = B'
+ {
+ def="using "+name+" = "+root->type.mid(7);
+ }
+ else
+ {
+ def=root->type+" "+name+root->args;
+ }
}
else
{
- def=root->type+" "+qualScope+scopeSeparator+name+root->args;
+ if (root->spec&Entry::Alias) // turn 'typedef B C::A' into 'using C::A = B'
+ {
+ def="using "+qualScope+scopeSeparator+name+" = "+root->type.mid(7);
+ }
+ else
+ {
+ def=root->type+" "+qualScope+scopeSeparator+name+root->args;
+ }
}
}
else
@@ -2189,7 +2206,7 @@ static MemberDef *addVariableToClass(
root->fileName,root->startLine,
root->type,name,root->args,0,
prot,Normal,root->stat,related,
- mtype,0,0);
+ mtype,root->tArgLists ? root->tArgLists->last() : 0,0);
md->setTagInfo(rootNav->tagInfo());
md->setMemberClass(cd); // also sets outer scope (i.e. getOuterScope())
//md->setDefFile(root->fileName);
@@ -2326,10 +2343,17 @@ static MemberDef *addVariableToFile(
{
SrcLangExt lang = nd->getLanguage();
QCString sep=getLanguageSpecificSeparator(lang);
-
+
if (!root->type.isEmpty())
{
- def=root->type+" "+nd->name()+sep+name+root->args;
+ if (root->spec&Entry::Alias) // turn 'typedef B NS::A' into 'using NS::A = B'
+ {
+ def="using "+nd->name()+sep+name+" = "+root->type;
+ }
+ else // normal member
+ {
+ def=root->type+" "+nd->name()+sep+name+root->args;
+ }
}
else
{
@@ -2341,9 +2365,20 @@ static MemberDef *addVariableToFile(
if (!root->type.isEmpty() && !root->name.isEmpty())
{
if (name.at(0)=='@') // dummy variable representing anonymous union
+ {
def=root->type;
+ }
else
- def=root->type+" "+name+root->args;
+ {
+ if (root->spec&Entry::Alias) // turn 'typedef B A' into 'using A = B'
+ {
+ def="using "+root->name+" = "+root->type.mid(7);
+ }
+ else // normal member
+ {
+ def=root->type+" "+name+root->args;
+ }
+ }
}
else
{
@@ -2407,8 +2442,9 @@ static MemberDef *addVariableToFile(
root->fileName,root->startLine,
root->type,name,root->args,0,
Public, Normal,root->stat,Member,
- mtype,0,0);
+ mtype,root->tArgLists ? root->tArgLists->last() : 0,0);
md->setTagInfo(rootNav->tagInfo());
+ md->setMemberSpecifiers(root->spec);
md->setDocumentation(root->doc,root->docFile,root->docLine);
md->setBriefDescription(root->brief,root->briefFile,root->briefLine);
md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine);
@@ -2654,7 +2690,7 @@ static void addVariable(EntryNav *rootNav,int isFuncPtr=-1)
else
{
int i=isFuncPtr;
- if (i==-1) i=findFunctionPtr(root->type,root->lang); // for typedefs isFuncPtr is not yet set
+ if (i==-1 && (root->spec&Entry::Alias)==0) i=findFunctionPtr(root->type,root->lang); // for typedefs isFuncPtr is not yet set
Debug::print(Debug::Variables,0," functionPtr? %s\n",i!=-1?"yes":"no");
if (i!=-1) // function pointer
{
@@ -2913,7 +2949,7 @@ static void addMethodToClass(EntryNav *rootNav,ClassDef *cd,
}
if (cd->getLanguage()==SrcLangExt_Cpp && // only C has pointers
- !root->type.isEmpty() && i!=-1) // function variable
+ !root->type.isEmpty() && (root->spec&Entry::Alias)==0 && i!=-1) // function variable
{
root->args+=root->type.right(root->type.length()-i-l);
root->type=root->type.left(i+l);
@@ -3572,33 +3608,6 @@ static void findFriends()
//----------------------------------------------------------------------
-static void transferArgumentDocumentation(ArgumentList *decAl,ArgumentList *defAl)
-{
- if (decAl && defAl)
- {
- ArgumentListIterator decAli(*decAl);
- ArgumentListIterator defAli(*defAl);
- Argument *decA,*defA;
- for (decAli.toFirst(),defAli.toFirst();
- (decA=decAli.current()) && (defA=defAli.current());
- ++decAli,++defAli)
- {
- //printf("Argument decA->name=%s (doc=%s) defA->name=%s (doc=%s)\n",
- // decA->name.data(),decA->docs.data(),
- // defA->name.data(),defA->docs.data()
- // );
- if (decA->docs.isEmpty() && !defA->docs.isEmpty())
- {
- decA->docs = defA->docs.copy();
- }
- else if (defA->docs.isEmpty() && !decA->docs.isEmpty())
- {
- defA->docs = decA->docs.copy();
- }
- }
- }
-}
-
static void transferFunctionDocumentation()
{
//printf("---- transferFunctionDocumentation()\n");
@@ -3614,7 +3623,6 @@ static void transferFunctionDocumentation()
/* find a matching function declaration and definition for this function */
for (;(mdec=mni1.current());++mni1)
{
- //printf("mdec=%s isPrototype()=%d\n",mdec->name().data(),mdec->isPrototype());
if (mdec->isPrototype() ||
(mdec->isVariable() && mdec->isExternal())
)
@@ -3622,128 +3630,7 @@ static void transferFunctionDocumentation()
MemberNameIterator mni2(*mn);
for (;(mdef=mni2.current());++mni2)
{
- if (
- (mdef->isFunction() && !mdef->isStatic() && !mdef->isPrototype()) ||
- (mdef->isVariable() && !mdef->isExternal() && !mdef->isStatic())
- )
- {
- //printf("mdef=(%p,%s) mdec=(%p,%s)\n",
- // mdef, mdef ? mdef->name().data() : "",
- // mdec, mdec ? mdec->name().data() : "");
-
- LockingPtr<ArgumentList> mdefAl = mdef->argumentList();
- LockingPtr<ArgumentList> mdecAl = mdec->argumentList();
- if (matchArguments2(mdef->getOuterScope(),mdef->getFileDef(),mdefAl.pointer(),
- mdec->getOuterScope(),mdec->getFileDef(),mdecAl.pointer(),
- TRUE
- )
- ) /* match found */
- {
- //printf("Found member %s: definition in %s (doc=`%s') and declaration in %s (doc=`%s')\n",
- // mn->memberName(),
- // mdef->getFileDef()->name().data(),mdef->documentation().data(),
- // mdec->getFileDef()->name().data(),mdec->documentation().data()
- // );
-
- // first merge argument documentation
- transferArgumentDocumentation(mdecAl.pointer(),mdefAl.pointer());
-
- /* copy documentation between function definition and declaration */
- if (!mdec->briefDescription().isEmpty())
- {
- mdef->setBriefDescription(mdec->briefDescription(),mdec->briefFile(),mdec->briefLine());
- }
- else if (!mdef->briefDescription().isEmpty())
- {
- mdec->setBriefDescription(mdef->briefDescription(),mdef->briefFile(),mdef->briefLine());
- }
- if (!mdef->documentation().isEmpty())
- {
- //printf("transfering docs mdef->mdec (%s->%s)\n",mdef->argsString(),mdec->argsString());
- mdec->setDocumentation(mdef->documentation(),mdef->docFile(),mdef->docLine());
- mdec->setDocsForDefinition(mdef->isDocsForDefinition());
- if (mdefAl!=0)
- {
- ArgumentList *mdefAlComb = new ArgumentList;
- stringToArgumentList(mdef->argsString(),mdefAlComb);
- transferArgumentDocumentation(mdefAl.pointer(),mdefAlComb);
- mdec->setArgumentList(mdefAlComb);
- }
- }
- else if (!mdec->documentation().isEmpty())
- {
- //printf("transfering docs mdec->mdef (%s->%s)\n",mdec->argsString(),mdef->argsString());
- mdef->setDocumentation(mdec->documentation(),mdec->docFile(),mdec->docLine());
- mdef->setDocsForDefinition(mdec->isDocsForDefinition());
- if (mdecAl!=0)
- {
- ArgumentList *mdecAlComb = new ArgumentList;
- stringToArgumentList(mdec->argsString(),mdecAlComb);
- transferArgumentDocumentation(mdecAl.pointer(),mdecAlComb);
- mdef->setDeclArgumentList(mdecAlComb);
- }
- }
- if (!mdef->inbodyDocumentation().isEmpty())
- {
- mdec->setInbodyDocumentation(mdef->inbodyDocumentation(),mdef->inbodyFile(),mdef->inbodyLine());
- }
- else if (!mdec->inbodyDocumentation().isEmpty())
- {
- mdef->setInbodyDocumentation(mdec->inbodyDocumentation(),mdec->inbodyFile(),mdec->inbodyLine());
- }
- if (mdec->getStartBodyLine()!=-1 && mdef->getStartBodyLine()==-1)
- {
- //printf("body mdec->mdef %d-%d\n",mdec->getStartBodyLine(),mdef->getEndBodyLine());
- mdef->setBodySegment(mdec->getStartBodyLine(),mdec->getEndBodyLine());
- mdef->setBodyDef(mdec->getBodyDef());
- //mdef->setBodyMember(mdec);
- }
- else if (mdef->getStartBodyLine()!=-1 && mdec->getStartBodyLine()==-1)
- {
- //printf("body mdef->mdec %d-%d\n",mdef->getStartBodyLine(),mdec->getEndBodyLine());
- mdec->setBodySegment(mdef->getStartBodyLine(),mdef->getEndBodyLine());
- mdec->setBodyDef(mdef->getBodyDef());
- //mdec->setBodyMember(mdef);
- }
- mdec->mergeMemberSpecifiers(mdef->getMemberSpecifiers());
- mdef->mergeMemberSpecifiers(mdec->getMemberSpecifiers());
-
-
- // copy group info.
- if (mdec->getGroupDef()==0 && mdef->getGroupDef()!=0)
- {
- mdec->setGroupDef(mdef->getGroupDef(),
- mdef->getGroupPri(),
- mdef->docFile(),
- mdef->docLine(),
- mdef->hasDocumentation(),
- mdef
- );
- }
- else if (mdef->getGroupDef()==0 && mdec->getGroupDef()!=0)
- {
- mdef->setGroupDef(mdec->getGroupDef(),
- mdec->getGroupPri(),
- mdec->docFile(),
- mdec->docLine(),
- mdec->hasDocumentation(),
- mdec
- );
- }
-
-
- mdec->mergeRefItems(mdef);
- mdef->mergeRefItems(mdec);
-
- mdef->setMemberDeclaration(mdec);
- mdec->setMemberDefinition(mdef);
-
- mdef->enableCallGraph(mdec->hasCallGraph() || mdef->hasCallGraph());
- mdef->enableCallerGraph(mdec->hasCallerGraph() || mdef->hasCallerGraph());
- mdec->enableCallGraph(mdec->hasCallGraph() || mdef->hasCallGraph());
- mdec->enableCallerGraph(mdec->hasCallerGraph() || mdef->hasCallerGraph());
- }
- }
+ combineDeclarationAndDefinition(mdec,mdef);
}
}
}
@@ -4184,11 +4071,14 @@ static void findBaseClassesForClass(
// find a documented base class in the correct scope
if (!findClassRelation(rootNav,context,instanceCd,&tbi,templateNames,DocumentedOnly,isArtificial))
{
- if (!Config_getBool("HIDE_UNDOC_RELATIONS"))
- {
+ // 1.8.2: decided to show inheritance relations even if not documented,
+ // we do make them artificial, so they do not appear in the index
+ //if (!Config_getBool("HIDE_UNDOC_RELATIONS"))
+ bool b = Config_getBool("HIDE_UNDOC_RELATIONS") ? TRUE : isArtificial;
+ //{
// no documented base class -> try to find an undocumented one
- findClassRelation(rootNav,context,instanceCd,&tbi,templateNames,Undocumented,isArtificial);
- }
+ findClassRelation(rootNav,context,instanceCd,&tbi,templateNames,Undocumented,b);
+ //}
}
}
else if (mode==TemplateInstances)
@@ -4641,6 +4531,10 @@ static bool findClassRelation(
baseClass->setLanguage(root->lang);
}
}
+ if (biName.right(2)=="-p")
+ {
+ biName="<"+biName.left(biName.length()-2)+">";
+ }
// add base class to this class
cd->insertBaseClass(baseClass,biName,bi->prot,bi->virt,templSpec);
// add this class as super class to the base class
@@ -4648,6 +4542,10 @@ static bool findClassRelation(
// the undocumented base was found in this file
baseClass->insertUsedFile(root->fileName);
baseClass->setOuterScope(Doxygen::globalScope);
+ if (baseClassName.right(2)=="-p")
+ {
+ baseClass->setCompoundType(ClassDef::Protocol);
+ }
return TRUE;
}
else
@@ -4801,7 +4699,8 @@ static void computeClassRelations()
{
findBaseClassesForClass(rootNav,cd,cd,cd,DocumentedOnly,FALSE);
}
- if ((cd==0 || (!cd->hasDocumentation() && !cd->isReference())) &&
+ int numMembers = cd && cd->memberNameInfoSDict() ? cd->memberNameInfoSDict()->count() : 0;
+ if ((cd==0 || (!cd->hasDocumentation() && !cd->isReference())) && numMembers>0 &&
bName.right(2)!="::")
{
if (!root->name.isEmpty() && root->name.find('@')==-1 && // normal name
@@ -5463,9 +5362,12 @@ static void substituteTemplatesInArgList(
da=dst->next();
}
}
- dst->constSpecifier = src->constSpecifier;
- dst->volatileSpecifier = src->volatileSpecifier;
- dst->pureSpecifier = src->pureSpecifier;
+ dst->constSpecifier = src->constSpecifier;
+ dst->volatileSpecifier = src->volatileSpecifier;
+ dst->pureSpecifier = src->pureSpecifier;
+ dst->trailingReturnType = substituteTemplatesInString(
+ srcTempArgLists,dstTempArgLists,
+ funcTempArgs,src->trailingReturnType);
//printf("substituteTemplatesInArgList: replacing %s with %s\n",
// argListToString(src).data(),argListToString(dst).data()
// );
@@ -5905,6 +5807,11 @@ static void findMember(EntryNav *rootNav,
cd,fd,root->argList,
TRUE);
+ if (md->getLanguage()==SrcLangExt_ObjC && md->isVariable() && (root->section&Entry::FUNCTION_SEC))
+ {
+ matching = FALSE; // don't match methods and attributes with the same name
+ }
+
Debug::print(Debug::FindMembers,0,
"6. match results of matchArguments2 = %d\n",matching);
@@ -6765,6 +6672,7 @@ static void findEnums(EntryNav *rootNav)
if (!isGlobal) md->setMemberClass(cd); else md->setFileDef(fd);
md->setBodySegment(root->bodyLine,root->endBodyLine);
md->setBodyDef(rootNav->fileDef());
+ md->setEnumBaseType(root->args);
//printf("Enum %s definition at line %d of %s: protection=%d\n",
// root->name.data(),root->bodyLine,root->fileName.data(),root->protection);
md->addSectionsToDefinition(root->anchors);
@@ -6775,15 +6683,22 @@ static void findEnums(EntryNav *rootNav)
md->setRefItems(root->sli);
//printf("found enum %s nd=%p\n",name.data(),nd);
bool defSet=FALSE;
+
+ QCString baseType = root->args;
+ if (!baseType.isEmpty())
+ {
+ baseType.prepend(" : ");
+ }
+
if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@')
{
if (isRelated || Config_getBool("HIDE_SCOPE_NAMES"))
{
- md->setDefinition(name);
+ md->setDefinition(name+baseType);
}
else
{
- md->setDefinition(nd->name()+"::"+name);
+ md->setDefinition(nd->name()+"::"+name+baseType);
}
//printf("definition=%s\n",md->definition());
defSet=TRUE;
@@ -6796,7 +6711,7 @@ static void findEnums(EntryNav *rootNav)
// or class.
if (isGlobal)
{
- if (!defSet) md->setDefinition(name);
+ if (!defSet) md->setDefinition(name+baseType);
if (fd==0 && rootNav->parent())
{
fd=rootNav->parent()->fileDef();
@@ -6811,11 +6726,11 @@ static void findEnums(EntryNav *rootNav)
{
if (isRelated || Config_getBool("HIDE_SCOPE_NAMES"))
{
- md->setDefinition(name);
+ md->setDefinition(name+baseType);
}
else
{
- md->setDefinition(cd->name()+"::"+name);
+ md->setDefinition(cd->name()+"::"+name+baseType);
}
cd->insertMember(md);
cd->insertUsedFile(root->fileName);
@@ -7374,7 +7289,9 @@ static void computeMemberRelations()
// mcd->name().data(),md->name().data(),md,
// bmcd->name().data(),bmd->name().data(),bmd
// );
- if (md!=bmd && bmcd && mcd && bmcd!=mcd && mcd->isBaseClass(bmcd,TRUE))
+ if (md!=bmd && bmd->virtualness()!=Normal && md->isFunction() &&
+ bmcd && mcd && mcd->isLinkable() && bmcd->isLinkable() &&
+ bmcd!=mcd && mcd->isBaseClass(bmcd,TRUE))
{
//printf(" derived scope\n");
LockingPtr<ArgumentList> bmdAl = bmd->argumentList();
@@ -7390,27 +7307,17 @@ static void computeMemberRelations()
)
)
{
- //printf(" match found!\n");
- if (mcd && bmcd &&
- mcd->isLinkable() && bmcd->isLinkable() && md->isFunction() &&
- classInheritedProtectionLevel(mcd,bmcd)!=Private &&
- md->protection()!=Private
+ MemberDef *rmd;
+ if ((rmd=md->reimplements())==0 ||
+ minClassDistance(mcd,bmcd)<minClassDistance(mcd,rmd->getClassDef())
)
{
- MemberDef *rmd;
- if ((rmd=md->reimplements())==0 ||
- minClassDistance(mcd,bmcd)<minClassDistance(mcd,rmd->getClassDef())
- )
- {
- //printf("setting (new) reimplements member\n");
- md->setReimplements(bmd);
- }
- //printf("%s: add reimplements member %s\n",mcd->name().data(),bmcd->name().data());
- //md->setImplements(bmd);
- //printf("%s: add reimplementedBy member %s\n",bmcd->name().data(),mcd->name().data());
- bmd->insertReimplementedBy(md);
+ //printf("setting (new) reimplements member\n");
+ md->setReimplements(bmd);
}
- }
+ //printf("%s: add reimplementedBy member %s\n",bmcd->name().data(),mcd->name().data());
+ bmd->insertReimplementedBy(md);
+ }
}
}
bmd = mn->next();
@@ -10488,10 +10395,10 @@ void parseInput()
findDocumentedEnumValues();
msg("Computing member relations...\n");
+ mergeCategories();
computeMemberRelations();
msg("Building full member lists recursively...\n");
- mergeCategories();
buildCompleteMemberLists();
msg("Adding members to member groups.\n");
diff --git a/src/doxygen.css b/src/doxygen.css
index 9078ffa..b48c40c 100644
--- a/src/doxygen.css
+++ b/src/doxygen.css
@@ -455,8 +455,11 @@ table.memberdecls {
color: #555;
}
-.memItemLeft, .memItemRight, .memTemplParams {
- border-bottom: 1px solid ##E2;
+.memSeparator {
+ border-bottom: 1px solid #DEE4F0;
+ line-height: 1px;
+ margin: 0px;
+ padding: 0px;
}
.memItemLeft, .memTemplItemLeft {
@@ -470,6 +473,7 @@ table.memberdecls {
.memTemplParams {
color: ##60;
white-space: nowrap;
+ font-size: 80%;
}
/* @end */
@@ -648,12 +652,13 @@ span.mlabel {
border-right:1px solid ##CC;
border-bottom:1px solid ##CC;
text-shadow: none;
- color: white;
- margin-right: 4px;
- padding: 2px 3px;
- border-radius: 3px;
- font-size: 7pt;
+ color: white;
+ margin-right: 4px;
+ padding: 2px 3px;
+ border-radius: 3px;
+ font-size: 7pt;
white-space: nowrap;
+ vertical-align: middle;
}
@@ -824,6 +829,7 @@ table.fieldtable {
font-size: 11px;
background-image:url('tab_b.png');
background-repeat:repeat-x;
+ background-position: 0 -5px;
height:30px;
line-height:30px;
color:##9b;
diff --git a/src/doxygen_css.h b/src/doxygen_css.h
index 831887a..8251ff5 100644
--- a/src/doxygen_css.h
+++ b/src/doxygen_css.h
@@ -455,8 +455,11 @@
" color: #555;\n"
"}\n"
"\n"
-".memItemLeft, .memItemRight, .memTemplParams {\n"
-" border-bottom: 1px solid ##E2;\n"
+".memSeparator {\n"
+" border-bottom: 1px solid #DEE4F0;\n"
+" line-height: 1px;\n"
+" margin: 0px;\n"
+" padding: 0px;\n"
"}\n"
"\n"
".memItemLeft, .memTemplItemLeft {\n"
@@ -470,6 +473,7 @@
".memTemplParams {\n"
" color: ##60;\n"
" white-space: nowrap;\n"
+" font-size: 80%;\n"
"}\n"
"\n"
"/* @end */\n"
@@ -648,12 +652,13 @@
" border-right:1px solid ##CC;\n"
" border-bottom:1px solid ##CC;\n"
" text-shadow: none;\n"
-" color: white;\n"
-" margin-right: 4px;\n"
-" padding: 2px 3px;\n"
-" border-radius: 3px;\n"
-" font-size: 7pt;\n"
+" color: white;\n"
+" margin-right: 4px;\n"
+" padding: 2px 3px;\n"
+" border-radius: 3px;\n"
+" font-size: 7pt;\n"
" white-space: nowrap;\n"
+" vertical-align: middle;\n"
"}\n"
"\n"
"\n"
@@ -824,6 +829,7 @@
" font-size: 11px;\n"
" background-image:url('tab_b.png');\n"
" background-repeat:repeat-x;\n"
+" background-position: 0 -5px;\n"
" height:30px;\n"
" line-height:30px;\n"
" color:##9b;\n"
diff --git a/src/entry.cpp b/src/entry.cpp
index 01c9742..cf3634b 100644
--- a/src/entry.cpp
+++ b/src/entry.cpp
@@ -81,8 +81,7 @@ Entry::Entry(const Entry &e)
virt = e.virt;
args = e.args;
bitfields = e.bitfields;
- argList = new ArgumentList;
- argList->setAutoDelete(TRUE);
+ argList = e.argList->deepCopy();
tArgLists = 0;
program = e.program;
initializer = e.initializer;
@@ -169,27 +168,10 @@ Entry::Entry(const Entry &e)
anchors->append(new SectionInfo(*s));
}
- // deep copy argument list
- QListIterator<Argument> ali(*e.argList);
- Argument *a;
- for (;(a=ali.current());++ali)
- {
- argList->append(new Argument(*a));
- }
- argList->constSpecifier = e.argList->constSpecifier;
- argList->volatileSpecifier = e.argList->volatileSpecifier;
- argList->pureSpecifier = e.argList->pureSpecifier;
-
// deep copy type contraint list
if (e.typeConstr)
{
- typeConstr = new ArgumentList;
- typeConstr->setAutoDelete(TRUE);
- QListIterator<Argument> tcli(*e.typeConstr);
- for (;(a=tcli.current());++tcli)
- {
- typeConstr->append(new Argument(*a));
- }
+ typeConstr = e.typeConstr->deepCopy();
}
// deep copy template argument lists
diff --git a/src/entry.h b/src/entry.h
index d881386..8598564 100644
--- a/src/entry.h
+++ b/src/entry.h
@@ -140,9 +140,11 @@ class Entry
Strong = 0x00400000,
Weak = 0x00800000,
Unretained = 0x01000000,
- Composition = 0x02000000,
- Aggregation = 0x04000000,
- Association = 0x08000000
+ Alias = 0x02000000,
+ ConstExp = 0x04000000,
+ Default = 0x08000000,
+ Delete = 0x10000000,
+ NoExcept = 0x20000000
};
enum ClassSpecifier
{
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 0566df6..7ae4689 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -167,7 +167,7 @@ void FileDef::findSectionsInDocumentation()
void FileDef::writeDetailedDescription(OutputList &ol,const QCString &title)
{
if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) ||
- !documentation().isEmpty() ||
+ !documentation().stripWhiteSpace().isEmpty() || // avail empty section
(Config_getBool("SOURCE_BROWSER") && getStartBodyLine()!=-1 && getBodyDef())
)
{
@@ -487,6 +487,7 @@ void FileDef::writeSummaryLinks(OutputList &ol)
LayoutDocManager::instance().docEntries(LayoutDocManager::File));
LayoutDocEntry *lde;
bool first=TRUE;
+ SrcLangExt lang=getLanguage();
for (eli.toFirst();(lde=eli.current());++eli)
{
if ((lde->kind()==LayoutDocEntry::FileClasses && classSDict && classSDict->declVisible()) ||
@@ -495,7 +496,7 @@ void FileDef::writeSummaryLinks(OutputList &ol)
{
LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
QCString label = lde->kind()==LayoutDocEntry::FileClasses ? "nested-classes" : "namespaces";
- ol.writeSummaryLink(0,label,ls->title,first);
+ ol.writeSummaryLink(0,label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::MemberDecl)
@@ -504,7 +505,7 @@ void FileDef::writeSummaryLinks(OutputList &ol)
MemberList * ml = getMemberList(lmd->type);
if (ml && ml->declVisible())
{
- ol.writeSummaryLink(0,ml->listTypeAsString(),lmd->title,first);
+ ol.writeSummaryLink(0,ml->listTypeAsString(),lmd->title(lang),first);
first=FALSE;
}
}
@@ -602,6 +603,7 @@ void FileDef::writeDocumentation(OutputList &ol)
//---------------------------------------- start flexible part -------------------------------
+ SrcLangExt lang = getLanguage();
QListIterator<LayoutDocEntry> eli(
LayoutDocManager::instance().docEntries(LayoutDocManager::File));
LayoutDocEntry *lde;
@@ -630,13 +632,13 @@ void FileDef::writeDocumentation(OutputList &ol)
case LayoutDocEntry::FileClasses:
{
LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
- writeClassDeclarations(ol,ls->title);
+ writeClassDeclarations(ol,ls->title(lang));
}
break;
case LayoutDocEntry::FileNamespaces:
{
LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
- writeNamespaceDeclarations(ol,ls->title);
+ writeNamespaceDeclarations(ol,ls->title(lang));
}
break;
case LayoutDocEntry::MemberGroups:
@@ -645,7 +647,7 @@ void FileDef::writeDocumentation(OutputList &ol)
case LayoutDocEntry::MemberDecl:
{
LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde;
- writeMemberDeclarations(ol,lmd->type,lmd->title);
+ writeMemberDeclarations(ol,lmd->type,lmd->title(lang));
}
break;
case LayoutDocEntry::MemberDeclEnd:
@@ -654,7 +656,7 @@ void FileDef::writeDocumentation(OutputList &ol)
case LayoutDocEntry::DetailedDesc:
{
LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
- writeDetailedDescription(ol,ls->title);
+ writeDetailedDescription(ol,ls->title(lang));
}
break;
case LayoutDocEntry::MemberDefStart:
@@ -666,7 +668,7 @@ void FileDef::writeDocumentation(OutputList &ol)
case LayoutDocEntry::MemberDef:
{
LayoutDocEntryMemberDef *lmd = (LayoutDocEntryMemberDef*)lde;
- writeMemberDocumentation(ol,lmd->type,lmd->title);
+ writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
}
break;
case LayoutDocEntry::MemberDefEnd:
@@ -985,7 +987,7 @@ void FileDef::addSourceRef(int line,Definition *d,MemberDef *md)
srcDefDict->insert(line,d);
if (md) srcMemberDict->insert(line,md);
//printf("Adding member %s with anchor %s at line %d to file %s\n",
- // md->name().data(),md->anchor().data(),line,name().data());
+ // md?md->name().data():"<none>",md?md->anchor().data():"<none>",line,name().data());
}
}
diff --git a/src/fortrancode.l b/src/fortrancode.l
index f21d8b6..e9fefea 100644
--- a/src/fortrancode.l
+++ b/src/fortrancode.l
@@ -47,6 +47,7 @@
#define YY_NEVER_INTERACTIVE 1
#define YY_NO_TOP_STATE 1
+#define YY_NO_INPUT 1
//--------------------------------------------------------------------------------
diff --git a/src/fortranscanner.l b/src/fortranscanner.l
index a5902a8..69f6143 100644
--- a/src/fortranscanner.l
+++ b/src/fortranscanner.l
@@ -67,8 +67,7 @@
#include "arguments.h"
#define YY_NEVER_INTERACTIVE 1
-
-class Arguments;
+#define YY_NO_INPUT 1
enum ScanVar { V_IGNORE, V_VARIABLE, V_PARAMETER};
enum InterfaceType { IF_NONE, IF_SPECIFIC, IF_GENERIC, IF_ABSTRACT };
@@ -205,7 +204,6 @@ static void scanner_abort();
static void startScope(Entry *scope);
static bool endScope(Entry *scope, bool isGlobalRoot=FALSE);
-static QCString getFullName(Entry *e);
//static bool isTypeName(QCString name);
static void resolveModuleProcedures(QList<Entry> &moduleProcedures, Entry *current_root);
static int getAmpersandAtTheStart(const char *buf, int length);
@@ -1856,6 +1854,7 @@ static bool endScope(Entry *scope, bool isGlobalRoot)
return TRUE;
}
+#if 0
//! Return full name of the entry. Sometimes we must combine several names recursively.
static QCString getFullName(Entry *e)
{
@@ -1866,6 +1865,7 @@ static QCString getFullName(Entry *e)
return getFullName(e->parent())+"::"+name;
}
+#endif
static int yyread(char *buf,int max_size)
{
@@ -2104,7 +2104,9 @@ static void subrHandleCommentBlock(const QCString &doc,bool brief)
}
//----------------------------------------------------------------------------
+#if 0
static int level=0;
+
static void debugCompounds(Entry *rt) // print Entry structure (for debugging)
{
level++;
@@ -2117,6 +2119,7 @@ static void debugCompounds(Entry *rt) // print Entry structure (for debugging)
}
level--;
}
+#endif
static void parseMain(const char *fileName,const char *fileBuf,Entry *rt)
diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp
index 76f31ab..dee8c0b 100644
--- a/src/ftvhelp.cpp
+++ b/src/ftvhelp.cpp
@@ -885,7 +885,8 @@ static void generateBriefDoc(FTextStream &t,Definition *def)
{
DocNode *root = validatingParseDoc(def->briefFile(),def->briefLine(),
def,0,brief,FALSE,FALSE,0,TRUE,TRUE);
- HtmlGenerator htmlGen;
+ QCString relPath = relativePathToRoot(def->getOutputFileBase());
+ HtmlCodeGenerator htmlGen(t,relPath);
HtmlDocVisitor *visitor = new HtmlDocVisitor(t,htmlGen,0);
root->accept(visitor);
delete visitor;
@@ -1257,6 +1258,8 @@ static void generateJSNavTree(const QList<FTVNode> &nodeList)
tsidx << "};" << endl;
t << endl << "];" << endl;
}
+ t << endl << "var SYNCONMSG = '" << theTranslator->trPanelSynchronisationTooltip(FALSE) << "';";
+ t << endl << "var SYNCOFFMSG = '" << theTranslator->trPanelSynchronisationTooltip(TRUE) << "';";
t << endl << navtree_script;
}
}
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index 910d2b5..c257501 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -135,6 +135,7 @@ void GroupDef::addFile(const FileDef *def)
{
static bool sortBriefDocs = Config_getBool("SORT_BRIEF_DOCS");
if (def->isHidden()) return;
+ updateLanguage(def);
if (sortBriefDocs)
fileList->inSort(def);
else
@@ -145,6 +146,7 @@ bool GroupDef::addClass(const ClassDef *cd)
{
static bool sortBriefDocs = Config_getBool("SORT_BRIEF_DOCS");
if (cd->isHidden()) return FALSE;
+ updateLanguage(cd);
if (classSDict->find(cd->qualifiedName())==0)
{
QCString qn = cd->qualifiedName();
@@ -192,6 +194,7 @@ bool GroupDef::addNamespace(const NamespaceDef *def)
{
static bool sortBriefDocs = Config_getBool("SORT_BRIEF_DOCS");
if (def->isHidden()) return FALSE;
+ updateLanguage(def);
if (namespaceSDict->find(def->name())==0)
{
if (sortBriefDocs)
@@ -252,6 +255,7 @@ void GroupDef::addMembersToMemberGroup()
bool GroupDef::insertMember(MemberDef *md,bool docOnly)
{
if (md->isHidden()) return FALSE;
+ updateLanguage(md);
//printf("GroupDef(%s)::insertMember(%s)\n", title.data(), md->name().data());
MemberNameInfo *mni=0;
if ((mni=(*allMemberNameInfoSDict)[md->name()]))
@@ -651,6 +655,7 @@ void GroupDef::writeFiles(OutputList &ol,const QCString &title)
FileDef *fd=fileList->first();
while (fd)
{
+ ol.startMemberDeclaration();
ol.startMemberItem(fd->getOutputFileBase(),0);
ol.docify(theTranslator->trFile(FALSE,TRUE)+" ");
ol.insertMemberAlign();
@@ -666,6 +671,7 @@ void GroupDef::writeFiles(OutputList &ol,const QCString &title)
ol.parseDoc(briefFile(),briefLine(),fd,0,fd->briefDescription(),FALSE,FALSE,0,TRUE,FALSE);
ol.endMemberDescription();
}
+ ol.endMemberDeclaration(0,0);
fd=fileList->next();
}
ol.endMemberList();
@@ -706,6 +712,7 @@ void GroupDef::writeNestedGroups(OutputList &ol,const QCString &title)
{
if (gd->isVisible())
{
+ ol.startMemberDeclaration();
ol.startMemberItem(gd->getOutputFileBase(),0);
//ol.docify(theTranslator->trGroup(FALSE,TRUE));
//ol.docify(" ");
@@ -722,6 +729,7 @@ void GroupDef::writeNestedGroups(OutputList &ol,const QCString &title)
ol.parseDoc(briefFile(),briefLine(),gd,0,gd->briefDescription(),FALSE,FALSE,0,TRUE,FALSE);
ol.endMemberDescription();
}
+ ol.endMemberDeclaration(0,0);
}
gd=groupList->next();
}
@@ -741,6 +749,7 @@ void GroupDef::writeDirs(OutputList &ol,const QCString &title)
DirDef *dd=dirList->first();
while (dd)
{
+ ol.startMemberDeclaration();
ol.startMemberItem(dd->getOutputFileBase(),0);
ol.parseText(theTranslator->trDir(FALSE,TRUE));
ol.insertMemberAlign();
@@ -756,6 +765,7 @@ void GroupDef::writeDirs(OutputList &ol,const QCString &title)
ol.parseDoc(briefFile(),briefLine(),dd,0,dd->briefDescription(),FALSE,FALSE,0,TRUE,FALSE);
ol.endMemberDescription();
}
+ ol.endMemberDeclaration(0,0);
dd=dirList->next();
}
@@ -871,6 +881,7 @@ void GroupDef::writeSummaryLinks(OutputList &ol)
LayoutDocManager::instance().docEntries(LayoutDocManager::Group));
LayoutDocEntry *lde;
bool first=TRUE;
+ SrcLangExt lang = getLanguage();
for (eli.toFirst();(lde=eli.current());++eli)
{
if ((lde->kind()==LayoutDocEntry::GroupClasses && classSDict->declVisible()) ||
@@ -886,7 +897,7 @@ void GroupDef::writeSummaryLinks(OutputList &ol)
lde->kind()==LayoutDocEntry::GroupFiles ? "files" :
lde->kind()==LayoutDocEntry::GroupNestedGroups ? "groups" :
"dirs";
- ol.writeSummaryLink(0,label,ls->title,first);
+ ol.writeSummaryLink(0,label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::MemberDecl)
@@ -895,7 +906,7 @@ void GroupDef::writeSummaryLinks(OutputList &ol)
MemberList * ml = getMemberList(lmd->type);
if (ml && ml->declVisible())
{
- ol.writeSummaryLink(0,ml->listTypeAsString(),lmd->title,first);
+ ol.writeSummaryLink(0,ml->listTypeAsString(),lmd->title(lang),first);
first=FALSE;
}
}
@@ -950,6 +961,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
//---------------------------------------- start flexible part -------------------------------
+ SrcLangExt lang=getLanguage();
QListIterator<LayoutDocEntry> eli(
LayoutDocManager::instance().docEntries(LayoutDocManager::Group));
LayoutDocEntry *lde;
@@ -966,7 +978,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
case LayoutDocEntry::GroupClasses:
{
LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
- writeClasses(ol,ls->title);
+ writeClasses(ol,ls->title(lang));
}
break;
case LayoutDocEntry::GroupInlineClasses:
@@ -977,7 +989,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
case LayoutDocEntry::GroupNamespaces:
{
LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
- writeNamespaces(ol,ls->title);
+ writeNamespaces(ol,ls->title(lang));
}
break;
case LayoutDocEntry::MemberGroups:
@@ -986,7 +998,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
case LayoutDocEntry::MemberDecl:
{
LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde;
- writeMemberDeclarations(ol,lmd->type,lmd->title);
+ writeMemberDeclarations(ol,lmd->type,lmd->title(lang));
}
break;
case LayoutDocEntry::MemberDeclEnd:
@@ -995,7 +1007,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
case LayoutDocEntry::DetailedDesc:
{
LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
- writeDetailedDescription(ol,ls->title);
+ writeDetailedDescription(ol,ls->title(lang));
}
break;
case LayoutDocEntry::MemberDefStart:
@@ -1004,7 +1016,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
case LayoutDocEntry::MemberDef:
{
LayoutDocEntryMemberDef *lmd = (LayoutDocEntryMemberDef*)lde;
- writeMemberDocumentation(ol,lmd->type,lmd->title);
+ writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
}
break;
case LayoutDocEntry::MemberDefEnd:
@@ -1013,7 +1025,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
case LayoutDocEntry::GroupNestedGroups:
{
LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
- writeNestedGroups(ol,ls->title);
+ writeNestedGroups(ol,ls->title(lang));
}
break;
case LayoutDocEntry::GroupPageDocs:
@@ -1022,13 +1034,13 @@ void GroupDef::writeDocumentation(OutputList &ol)
case LayoutDocEntry::GroupDirs:
{
LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
- writeDirs(ol,ls->title);
+ writeDirs(ol,ls->title(lang));
}
break;
case LayoutDocEntry::GroupFiles:
{
LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
- writeFiles(ol,ls->title);
+ writeFiles(ol,ls->title(lang));
}
break;
case LayoutDocEntry::GroupGraph:
@@ -1482,3 +1494,13 @@ bool GroupDef::isLinkable() const
return hasUserDocumentation();
}
+// let the "programming language" for a group depend on what is inserted into it.
+// First item that has an associated languages determines the language for the whole group.
+void GroupDef::updateLanguage(const Definition *d)
+{
+ if (getLanguage()==SrcLangExt_Unknown && d->getLanguage()!=SrcLangExt_Unknown)
+ {
+ setLanguage(d->getLanguage());
+ }
+}
+
diff --git a/src/groupdef.h b/src/groupdef.h
index 6b41979..5f9752b 100644
--- a/src/groupdef.h
+++ b/src/groupdef.h
@@ -132,6 +132,7 @@ class GroupDef : public Definition
void endMemberDocumentation(OutputList &ol);
void writeAuthorSection(OutputList &ol);
void writeSummaryLinks(OutputList &ol);
+ void updateLanguage(const Definition *);
QCString title; // title of the group
bool titleSet; // true if title is not the same as the name
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index e475263..1c5c3a6 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -105,7 +105,7 @@ static QCString g_footer;
//------------------------- Pictures for the Tabs ------------------------
-// active
+// active tab background luma
static unsigned char tab_a_png[36] =
{
31, 42, 59, 69, 73, 74, 75, 77, 77,
@@ -114,13 +114,22 @@ static unsigned char tab_a_png[36] =
96, 96, 97, 98, 98, 99, 99, 99, 100
};
-// normal background
+// normal tab background luma
static unsigned char tab_b_png[36] =
{
- 240, 239, 238, 237, 235, 234, 234, 232, 231,
- 229, 228, 227, 224, 224, 221, 219, 218, 217,
- 214, 212, 210, 209, 206, 203, 202, 200, 198,
- 196, 195, 193, 192, 190, 189, 188, 188, 188
+ 221, 231, 238, 236, 233, 230, 228, 225, 224,
+ 221, 220, 218, 217, 216, 215, 214, 213, 212,
+ 212, 194, 195, 196, 197, 198, 199, 200, 201,
+ 202, 204, 206, 208, 210, 214, 216, 203, 185
+};
+
+// hovering tab background luma
+static unsigned char tab_h_png[36] =
+{
+ 181, 191, 198, 196, 193, 190, 188, 185, 184,
+ 181, 180, 178, 177, 176, 175, 174, 173, 172,
+ 172, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 164, 166, 168, 170, 174, 176, 163, 145
};
// shadowed header
@@ -142,16 +151,7 @@ static unsigned char func_header_png[56] =
228, 228, 228, 229, 229, 229, 229, 229
};
-// hovering
-static unsigned char tab_h_png[36] =
-{
- 199, 198, 196, 196, 195, 194, 193, 192, 189,
- 188, 187, 184, 184, 181, 180, 178, 176, 173,
- 171, 169, 166, 164, 163, 161, 159, 156, 155,
- 153, 152, 149, 148, 147, 145, 145, 150, 161
-};
-
-// separator
+// tab separator
static unsigned char tab_s_png[36] =
{
187, 186, 185, 183, 182, 181, 180, 178, 176,
@@ -160,7 +160,7 @@ static unsigned char tab_s_png[36] =
138, 136, 134, 131, 131, 128, 126, 125, 124
};
-
+// breadcrumbs luma
static unsigned char bc_s_png[240] =
{
150,187,187,148,148,148,148,148,
@@ -195,6 +195,7 @@ static unsigned char bc_s_png[240] =
111,134,106,106,106,106,106,106
};
+// breadcrumbs alpha map
static unsigned char bc_s_a_png[240] =
{
241,241, 21, 0, 0, 0, 0, 0,
@@ -229,6 +230,7 @@ static unsigned char bc_s_a_png[240] =
211,201, 0, 0, 0, 0, 0, 0
};
+// doxygen logo luma
static unsigned char doxygen_png[3224] =
{
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
@@ -264,6 +266,7 @@ static unsigned char doxygen_png[3224] =
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
};
+// doxygen logo alpha map
static unsigned char doxygen_a_png[3224] =
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -1196,12 +1199,205 @@ static QCString substituteHtmlKeywords(const QCString &s,
return result;
}
-//------------------------- Pictures for the Tabs ------------------------
+//--------------------------------------------------------------------------
+
+HtmlCodeGenerator::HtmlCodeGenerator()
+ : m_streamSet(FALSE), m_col(0)
+{
+}
+
+HtmlCodeGenerator::HtmlCodeGenerator(FTextStream &t,const QCString &relPath)
+ : m_col(0), m_relPath(relPath)
+{
+ setTextStream(t);
+}
+
+void HtmlCodeGenerator::setTextStream(FTextStream &t)
+{
+ m_streamSet = t.device()!=0;
+ m_t.setDevice(t.device());
+}
+
+void HtmlCodeGenerator::setRelativePath(const QCString &path)
+{
+ m_relPath = path;
+}
+
+void HtmlCodeGenerator::codify(const char *str)
+{
+ static int tabSize = Config_getInt("TAB_SIZE");
+ if (str)
+ {
+ const char *p=str;
+ char c;
+ int spacesToNextTabStop;
+ while (*p)
+ {
+ c=*p++;
+ switch(c)
+ {
+ case '\t': spacesToNextTabStop =
+ tabSize - (m_col%tabSize);
+ m_t << Doxygen::spaces.left(spacesToNextTabStop);
+ m_col+=spacesToNextTabStop;
+ break;
+ case '\n': m_t << "\n"; m_col=0;
+ break;
+ case '\r': break;
+ case '<': m_t << "&lt;"; m_col++;
+ break;
+ case '>': m_t << "&gt;"; m_col++;
+ break;
+ case '&': m_t << "&amp;"; m_col++;
+ break;
+ case '\'': m_t << "&#39;"; m_col++; // &apos; is not valid XHTML
+ break;
+ case '"': m_t << "&quot;"; m_col++;
+ break;
+ case '\\':
+ if (*p=='<')
+ { m_t << "&lt;"; p++; }
+ else if (*p=='>')
+ { m_t << "&gt;"; p++; }
+ else
+ m_t << "\\";
+ m_col++;
+ break;
+ default: m_t << c;
+ m_col++;
+ break;
+ }
+ }
+ }
+}
+
+void HtmlCodeGenerator::docify(const char *str)
+{
+ if (str)
+ {
+ const char *p=str;
+ char c;
+ while (*p)
+ {
+ c=*p++;
+ switch(c)
+ {
+ case '<': m_t << "&lt;"; break;
+ case '>': m_t << "&gt;"; break;
+ case '&': m_t << "&amp;"; break;
+ case '"': m_t << "&quot;"; break;
+ case '\\':
+ if (*p=='<')
+ { m_t << "&lt;"; p++; }
+ else if (*p=='>')
+ { m_t << "&gt;"; p++; }
+ else
+ m_t << "\\";
+ break;
+ default: m_t << c;
+ }
+ }
+ }
+}
+
+void HtmlCodeGenerator::writeLineNumber(const char *ref,const char *filename,
+ const char *anchor,int l)
+{
+ QCString lineNumber,lineAnchor;
+ lineNumber.sprintf("%5d",l);
+ lineAnchor.sprintf("l%05d",l);
+
+ if (filename)
+ {
+ startCodeAnchor(lineAnchor);
+ writeCodeLink(ref,filename,anchor,lineNumber,0);
+ endCodeAnchor();
+ }
+ else
+ {
+ startCodeAnchor(lineAnchor);
+ codify(lineNumber);
+ endCodeAnchor();
+ }
+ m_t << "&#160;";
+}
+
+
+void HtmlCodeGenerator::writeCodeLink(const char *ref,const char *f,
+ const char *anchor, const char *name,
+ const char *tooltip)
+{
+ if (!m_streamSet) return;
+ //printf("writeCodeLink(ref=%s,f=%s,anchor=%s,name=%s,tooltip=%s)\n",ref,f,anchor,name,tooltip);
+ if (ref)
+ {
+ m_t << "<a class=\"codeRef\" ";
+ m_t << externalLinkTarget() << externalRef(m_relPath,ref,FALSE);
+ }
+ else
+ {
+ m_t << "<a class=\"code\" ";
+ }
+ m_t << "href=\"";
+ m_t << externalRef(m_relPath,ref,TRUE);
+ if (f) m_t << f << Doxygen::htmlFileExtension;
+ if (anchor) m_t << "#" << anchor;
+ m_t << "\"";
+ if (tooltip) m_t << " title=\"" << tooltip << "\"";
+ m_t << ">";
+ docify(name);
+ m_t << "</a>";
+ m_col+=strlen(name);
+}
+
+void HtmlCodeGenerator::startCodeLine(bool hasLineNumbers)
+{
+ if (!hasLineNumbers) m_t << "<div class=\"line\">";
+ m_col=0;
+}
+
+void HtmlCodeGenerator::endCodeLine()
+{
+ m_t << "</div>\n";
+}
+
+void HtmlCodeGenerator::startCodeAnchor(const char *label)
+{
+ m_t << "<div class=\"line\">";
+ m_t << "<a name=\"" << label << "\"></a><span class=\"lineno\">";
+}
+
+void HtmlCodeGenerator::endCodeAnchor()
+{
+ m_t << "</span>";
+}
+
+
+void HtmlCodeGenerator::startFontClass(const char *s)
+{
+ if (m_streamSet) m_t << "<span class=\"" << s << "\">";
+}
+
+void HtmlCodeGenerator::endFontClass()
+{
+ if (m_streamSet) m_t << "</span>";
+}
+
+void HtmlCodeGenerator::writeCodeAnchor(const char *anchor)
+{
+ if (m_streamSet) m_t << "<a name=\"" << anchor << "\"></a>";
+}
+
+void HtmlCodeGenerator::linkableSymbol(int,const char *,Definition *,Definition *)
+{
+}
+
+
+//--------------------------------------------------------------------------
HtmlGenerator::HtmlGenerator() : OutputGenerator()
{
dir=Config_getString("HTML_OUTPUT");
- col=0;
m_emptySection=FALSE;
}
@@ -1321,27 +1517,27 @@ void HtmlGenerator::writeSearchData(const char *dir)
Doxygen::indexList.addStyleSheetFile("search/search.css");
}
-
-
void HtmlGenerator::writeStyleSheetFile(QFile &file)
{
FTextStream t(&file);
t << replaceColorMarkers(defaultStyleSheet);
}
-void HtmlGenerator::writeHeaderFile(QFile &file, const char *cssname)
+void HtmlGenerator::writeHeaderFile(QFile &file, const char * /*cssname*/)
{
FTextStream t(&file);
+ QCString contents(defaultHtmlHeader);
+ t << contents;
- QString relPathStr = "$relpath$";
+// QString relPathStr = "$relpath$";
- QCString id(file.name().utf8());
- if (id.right(Doxygen::htmlFileExtension.length())==Doxygen::htmlFileExtension)
- {
- id=id.left(id.length()-Doxygen::htmlFileExtension.length());
- }
+// QCString id(file.name().utf8());
+// if (id.right(Doxygen::htmlFileExtension.length())==Doxygen::htmlFileExtension)
+// {
+// id=id.left(id.length()-Doxygen::htmlFileExtension.length());
+// }
- t << substitute(defaultHtmlHeader, "$stylesheet", cssname);
+// t << substitute(defaultHtmlHeader, "$stylesheet", cssname);
}
void HtmlGenerator::writeFooterFile(QFile &file)
@@ -1351,13 +1547,6 @@ void HtmlGenerator::writeFooterFile(QFile &file)
t << contents;
}
-//static void generateDynamicSections(FTextStream &t,const QCString &relPath)
-//{
-// t << "<script type=\"text/javascript\" src=\"" << relPath
-// << "dynsections.js\"></script>\n";
-//}
-
-
void HtmlGenerator::startFile(const char *name,const char *,
const char *title)
{
@@ -1371,6 +1560,8 @@ void HtmlGenerator::startFile(const char *name,const char *,
fileName+=Doxygen::htmlFileExtension;
}
startPlainFile(fileName);
+ m_codeGen.setTextStream(t);
+ m_codeGen.setRelativePath(relPath);
Doxygen::indexList.addIndexFile(fileName);
//if (Config_getBool("GENERATE_HTMLHELP"))
//{
@@ -1630,32 +1821,6 @@ void HtmlGenerator::writeObjectLink(const char *ref,const char *f,
t << "</a>";
}
-void HtmlGenerator::writeCodeLink(const char *ref,const char *f,
- const char *anchor, const char *name,
- const char *tooltip)
-{
- //printf("writeCodeLink(ref=%s,f=%s,anchor=%s,name=%s,tooltip=%s)\n",ref,f,anchor,name,tooltip);
- if (ref)
- {
- t << "<a class=\"codeRef\" ";
- t << externalLinkTarget() << externalRef(relPath,ref,FALSE);
- }
- else
- {
- t << "<a class=\"code\" ";
- }
- t << "href=\"";
- t << externalRef(relPath,ref,TRUE);
- if (f) t << f << Doxygen::htmlFileExtension;
- if (anchor) t << "#" << anchor;
- t << "\"";
- if (tooltip) t << " title=\"" << tooltip << "\"";
- t << ">";
- docify(name);
- t << "</a>";
- col+=strlen(name);
-}
-
void HtmlGenerator::startTextLink(const char *f,const char *anchor)
{
t << "<a href=\"";
@@ -1778,59 +1943,6 @@ void HtmlGenerator::docify(const char *str,bool inHtmlComment)
}
}
-void HtmlGenerator::codify(const char *str)
-{
- //docify(str);
- //static char spaces[]=" ";
- if (str)
- {
- const char *p=str;
- char c;
- int spacesToNextTabStop;
- while (*p)
- {
- c=*p++;
- switch(c)
- {
- case '\t': spacesToNextTabStop =
- Config_getInt("TAB_SIZE") - (col%Config_getInt("TAB_SIZE"));
- t << Doxygen::spaces.left(spacesToNextTabStop);
- col+=spacesToNextTabStop;
- break;
- case '\n': t << "\n"; col=0;
- break;
- //case '\n': t << "<br>"; col=0;
- // break;
- case '\r': break;
- case '<': t << "&lt;"; col++;
- break;
- case '>': t << "&gt;"; col++;
- break;
- case '&': t << "&amp;"; col++;
- break;
- case '\'': t << "&#39;"; col++; // &apos; is not valid HTML
- break;
- case '"': t << "&quot;"; col++;
- break;
- //case ' ': t << "&#160;"; col++;
- // break;
- case '\\':
- if (*p=='<')
- { t << "&lt;"; p++; }
- else if (*p=='>')
- { t << "&gt;"; p++; }
- else
- t << "\\";
- col++;
- break;
- default: t << c;
- col++;
- break;
- }
- }
- }
-}
-
void HtmlGenerator::writeChar(char c)
{
char cs[2];
@@ -1974,40 +2086,29 @@ void HtmlGenerator::endMemberList()
void HtmlGenerator::startMemberItem(const char *anchor,int annoType,const char *inheritId)
{
DBG_HTML(t << "<!-- startMemberItem() -->" << endl)
- //if (Config_getBool("HTML_ALIGN_MEMBERS"))
- //{
- if (m_emptySection)
- {
- t << "<table class=\"memberdecls\">" << endl;
- m_emptySection=FALSE;
- }
- t << "<tr class=\"memitem:" << anchor;
- if (inheritId)
- {
- t << " inherit " << inheritId;
- }
- t << "\">";
- switch(annoType)
- {
- case 0: t << "<td class=\"memItemLeft\" align=\"right\" valign=\"top\">"; break;
- case 1: t << "<td class=\"memItemLeft\" >"; break;
- case 2: t << "<td class=\"memItemLeft\" valign=\"top\">"; break;
- default: t << "<td class=\"memTemplParams\" colspan=\"2\">"; break;
- }
- //}
- //else
- //{
- // t << "<li>";
- //}
+ if (m_emptySection)
+ {
+ t << "<table class=\"memberdecls\">" << endl;
+ m_emptySection=FALSE;
+ }
+ t << "<tr class=\"memitem:" << anchor;
+ if (inheritId)
+ {
+ t << " inherit " << inheritId;
+ }
+ t << "\">";
+ switch(annoType)
+ {
+ case 0: t << "<td class=\"memItemLeft\" align=\"right\" valign=\"top\">"; break;
+ case 1: t << "<td class=\"memItemLeft\" >"; break;
+ case 2: t << "<td class=\"memItemLeft\" valign=\"top\">"; break;
+ default: t << "<td class=\"memTemplParams\" colspan=\"2\">"; break;
+ }
}
void HtmlGenerator::endMemberItem()
{
- //DBG_HTML(t << "<!-- endMemberItem(" << (int)inGroup << "," << fileName << "," << headerName << " -->" << endl)
- //if (Config_getBool("HTML_ALIGN_MEMBERS"))
- //{
- t << "</td></tr>";
- //}
+ t << "</td></tr>";
t << endl;
}
@@ -2015,13 +2116,15 @@ void HtmlGenerator::startMemberTemplateParams()
{
}
-void HtmlGenerator::endMemberTemplateParams(const char *anchor)
+void HtmlGenerator::endMemberTemplateParams(const char *anchor,const char *inheritId)
{
- //if (Config_getBool("HTML_ALIGN_MEMBERS"))
- //{
- t << "</td></tr>" << endl;
- t << "<tr class=\"memitem:" << anchor << "\"><td class=\"memTemplItemLeft\" align=\"right\" valign=\"top\">";
- //}
+ t << "</td></tr>" << endl;
+ t << "<tr class=\"memitem:" << anchor;
+ if (inheritId)
+ {
+ t << " inherit " << inheritId;
+ }
+ t << "\"><td class=\"memTemplItemLeft\" align=\"right\" valign=\"top\">";
}
@@ -3147,59 +3250,14 @@ void HtmlGenerator::writeInheritedSectionTitle(
classLink+=relPath;
}
classLink+=file+Doxygen::htmlFileExtension+a;
- classLink+=QCString("\">")+name+"</a>";
+ classLink+=QCString("\">")+convertToHtml(name,FALSE)+"</a>";
t << "<tr class=\"inherit_header " << id << "\">"
<< "<td colspan=\"2\" onclick=\"javascript:toggleInherit('" << id << "')\">"
- << "<img src=\"" << relPath << "closed.png\" alt=\"-\"/>&nbsp;"
- << theTranslator->trInheritedFrom(title,classLink)
+ << "<img src=\"" << relPath << "closed.png\" alt=\"-\"/>&#160;"
+ << theTranslator->trInheritedFrom(convertToHtml(title,FALSE),classLink)
<< "</td></tr>" << endl;
}
-void HtmlGenerator::startCodeLine(bool hasLineNumbers)
-{
- if (!hasLineNumbers) t << "<div class=\"line\">";
- col=0;
-}
-
-void HtmlGenerator::endCodeLine()
-{
- //codify("\n");
- t << "</div>\n";
-}
-
-void HtmlGenerator::startCodeAnchor(const char *label)
-{
- t << "<div class=\"line\">";
- t << "<a name=\"" << label << "\"></a><span class=\"lineno\">";
-}
-
-void HtmlGenerator::endCodeAnchor()
-{
- t << "</span>";
-}
-
-void HtmlGenerator::writeLineNumber(const char *ref,const char *filename,
- const char *anchor,int l)
-{
- QCString lineNumber,lineAnchor;
- lineNumber.sprintf("%5d",l);
- lineAnchor.sprintf("l%05d",l);
-
- if (filename)
- {
- startCodeAnchor(lineAnchor);
- writeCodeLink(ref,filename,anchor,lineNumber,0);
- endCodeAnchor();
- }
- else
- {
- startCodeAnchor(lineAnchor);
- codify(lineNumber);
- endCodeAnchor();
- }
- t << "&#160;";
-}
-
void HtmlGenerator::writeSummaryLink(const char *file,const char *anchor,const char *title,bool first)
{
if (first)
@@ -3226,4 +3284,13 @@ void HtmlGenerator::writeSummaryLink(const char *file,const char *anchor,const c
t << "</a>";
}
+void HtmlGenerator::endMemberDeclaration(const char *anchor,const char *inheritId)
+{
+ t << "<tr class=\"separator:" << anchor;
+ if (inheritId)
+ {
+ t << " inherit " << inheritId;
+ }
+ t << "\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n";
+}
diff --git a/src/htmlgen.h b/src/htmlgen.h
index 9680372..9560382 100644
--- a/src/htmlgen.h
+++ b/src/htmlgen.h
@@ -20,6 +20,7 @@
#include "qtbc.h"
#include "outputgen.h"
+#include "ftextstream.h"
//#define PREFRAG_START "<div class=\"fragment\"><pre class=\"fragment\">"
//#define PREFRAG_END "</pre></div>"
@@ -27,7 +28,35 @@
#define PREFRAG_END "</div><!-- fragment -->"
class QFile;
-class FTextStream;
+
+class HtmlCodeGenerator : public CodeOutputInterface
+{
+ public:
+ HtmlCodeGenerator(FTextStream &t,const QCString &relPath);
+ HtmlCodeGenerator();
+ void setTextStream(FTextStream &t);
+ void setRelativePath(const QCString &path);
+ void codify(const char *text);
+ void writeCodeLink(const char *ref,const char *file,
+ const char *anchor,const char *name,
+ const char *tooltip);
+ void writeLineNumber(const char *,const char *,const char *,int);
+ void startCodeLine(bool);
+ void endCodeLine();
+ void startCodeAnchor(const char *label);
+ void endCodeAnchor();
+ void startFontClass(const char *s);
+ void endFontClass();
+ void writeCodeAnchor(const char *anchor);
+ void linkableSymbol(int,const char *,Definition *,Definition *);
+
+ private:
+ void docify(const char *str);
+ bool m_streamSet;
+ FTextStream m_t;
+ int m_col;
+ QCString m_relPath;
+};
/** Generator for HTML output */
class HtmlGenerator : public OutputGenerator
@@ -55,6 +84,34 @@ class HtmlGenerator : public OutputGenerator
bool isEnabled(OutputType o) { return (o==Html && active); }
OutputGenerator *get(OutputType o) { return (o==Html) ? this : 0; }
+ // ---- CodeOutputInterface
+ void codify(const char *text)
+ { m_codeGen.codify(text); }
+ void writeCodeLink(const char *ref,const char *file,
+ const char *anchor,const char *name,
+ const char *tooltip)
+ { m_codeGen.writeCodeLink(ref,file,anchor,name,tooltip); }
+ void writeLineNumber(const char *ref,const char *file,const char *anchor,int lineNumber)
+ { m_codeGen.writeLineNumber(ref,file,anchor,lineNumber); }
+ void startCodeLine(bool hasLineNumbers)
+ { m_codeGen.startCodeLine(hasLineNumbers); }
+ void endCodeLine()
+ { m_codeGen.endCodeLine(); }
+ void startCodeAnchor(const char *label)
+ { m_codeGen.startCodeAnchor(label); }
+ void endCodeAnchor()
+ { m_codeGen.endCodeAnchor(); }
+ void startFontClass(const char *s)
+ { m_codeGen.startFontClass(s); }
+ void endFontClass()
+ { m_codeGen.endFontClass(); }
+ void writeCodeAnchor(const char *anchor)
+ { m_codeGen.writeCodeAnchor(anchor); }
+ void linkableSymbol(int line,const char *symName,
+ Definition *symDef,Definition *context)
+ { m_codeGen.linkableSymbol(line,symName,symDef,context); }
+ // ---------------------------
+
void printDoc(DocNode *,const char *);
void startFile(const char *name,const char *manName,const char *title);
@@ -90,12 +147,10 @@ class HtmlGenerator : public OutputGenerator
void startIndexItem(const char *ref,const char *file);
void endIndexItem(const char *ref,const char *file);
void docify(const char *text);
- void codify(const char *text);
+
void writeObjectLink(const char *ref,const char *file,
const char *anchor,const char *name);
- void writeCodeLink(const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip);
+
void startTextLink(const char *file,const char *anchor);
void endTextLink();
void startHtmlLink(const char *url);
@@ -126,7 +181,7 @@ class HtmlGenerator : public OutputGenerator
void startMemberItem(const char *anchor,int,const char *inheritId);
void endMemberItem();
void startMemberTemplateParams();
- void endMemberTemplateParams(const char *anchor);
+ void endMemberTemplateParams(const char *anchor,const char *inheritId);
void startMemberGroupHeader(bool);
void endMemberGroupHeader();
@@ -138,6 +193,8 @@ class HtmlGenerator : public OutputGenerator
void insertMemberAlign(bool);
void startMemberDescription(const char *anchor,const char *inheritId);
void endMemberDescription();
+ void startMemberDeclaration() {}
+ void endMemberDeclaration(const char *anchor,const char *inheritId);
void writeInheritedSectionTitle(const char *id, const char *ref,
const char *file, const char *anchor,
const char *title,const char *name);
@@ -147,9 +204,6 @@ class HtmlGenerator : public OutputGenerator
{ t << "<a name=\"" << name <<"\" id=\"" << name << "\"></a>"; }
void startCodeFragment() { t << PREFRAG_START; }
void endCodeFragment() { t << PREFRAG_END; }
- void writeLineNumber(const char *,const char *,const char *,int);
- void startCodeLine(bool);
- void endCodeLine();
void startEmphasis() { t << "<em>"; }
void endEmphasis() { t << "</em>"; }
void startBold() { t << "<b>"; }
@@ -168,8 +222,6 @@ class HtmlGenerator : public OutputGenerator
const char *anchor,const char *name,
const char *args);
void endDoxyAnchor(const char *fName,const char *anchor);
- void startCodeAnchor(const char *label);
- void endCodeAnchor();
void writeLatexSpacing() {}
void writeStartAnnoItem(const char *type,const char *file,
const char *path,const char *name);
@@ -270,16 +322,10 @@ class HtmlGenerator : public OutputGenerator
void startInlineMemberDoc();
void endInlineMemberDoc();
- void startFontClass(const char *s) { t << "<span class=\"" << s << "\">"; }
- void endFontClass() { t << "</span>"; }
-
void startLabels();
void writeLabel(const char *l,bool isLast);
void endLabels();
- void writeCodeAnchor(const char *anchor)
- { t << "<a name=\"" << anchor << "\"></a>"; }
- void linkableSymbol(int,const char *,Definition *,Definition *) {}
//static void generateSectionImages();
@@ -293,9 +339,9 @@ class HtmlGenerator : public OutputGenerator
HtmlGenerator &operator=(const HtmlGenerator &g);
HtmlGenerator(const HtmlGenerator &g);
- int col;
int m_sectionCount;
bool m_emptySection;
+ HtmlCodeGenerator m_codeGen;
};
#endif
diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp
index 86d4e42..2569c58 100644
--- a/src/htmlhelp.cpp
+++ b/src/htmlhelp.cpp
@@ -610,7 +610,7 @@ QCString HtmlHelp::recode(const QCString &s)
QCString output(oSize);
size_t iLeft = iSize;
size_t oLeft = oSize;
- const char *iPtr = s.data();
+ char *iPtr = s.data();
char *oPtr = output.data();
if (!portable_iconv(m_fromUtf8,&iPtr,&iLeft,&oPtr,&oLeft))
{
diff --git a/src/index.cpp b/src/index.cpp
index 387aa54..257f5aa 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -384,11 +384,12 @@ void addMembersToIndex(T *def,LayoutDocManager::LayoutPart part,
ClassSDict::Iterator it(*classes);
for (;(cd=it.current());++it)
{
- if (cd->isLinkable())
+ if (cd->isLinkable() && (cd->partOfGroups()==0 || def->definitionType()==Definition::TypeGroup))
{
bool isNestedClass = def->definitionType()==Definition::TypeClass;
addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(FALSE),cd->anchor(),
- addToIndex && isNestedClass,preventSeparateIndex);
+ addToIndex && isNestedClass,
+ preventSeparateIndex || cd->isEmbeddedInOuterScope());
}
}
}
@@ -1374,7 +1375,7 @@ void writeClassTree(ClassSDict *clDict,FTVHelp *ftv,bool addToIndex,bool globalO
ftv->addContentsItem(count>0,cd->displayName(FALSE),cd->getReference(),
cd->getOutputFileBase(),cd->anchor(),FALSE,TRUE,cd);
if (addToIndex &&
- !cd->isEmbeddedInOuterScope() &&
+ cd->partOfGroups()==0 &&
(cd->getOuterScope()==0 ||
cd->getOuterScope()->definitionType()!=Definition::TypeClass
)
@@ -1402,7 +1403,7 @@ static bool containsVisibleChild(NamespaceDef *nd,bool includeClasses)
NamespaceDef *cnd;
for (cnli.toFirst();(cnd=cnli.current());++cnli)
{
- if (cnd->isLinkable() && cnd->localName().find('@')!=-1)
+ if (cnd->isLinkable() && cnd->localName().find('@')==-1)
{
return TRUE;
}
@@ -3158,6 +3159,7 @@ bool writeMemberNavIndex(FTextStream &t,
//----------------------------------------------------------------------------
+#if 0
static bool writeFullNavIndex(FTextStream &t, LayoutNavEntry *root,int indent,bool &first)
{
static struct NavEntryCountMap
@@ -3239,6 +3241,7 @@ static bool writeFullNavIndex(FTextStream &t, LayoutNavEntry *root,int indent,bo
}
return found;
}
+#endif
//----------------------------------------------------------------------------
@@ -3563,21 +3566,24 @@ static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp*
ClassDef *cd;
for (;(cd=it.current());++it)
{
- bool nestedClassInSameGroup =
- cd->getOuterScope() && cd->getOuterScope()->definitionType()==Definition::TypeClass &&
- cd->getOuterScope()->partOfGroups()!=0 && cd->getOuterScope()->partOfGroups()->contains(gd);
- if (cd->isVisible() && !nestedClassInSameGroup)
+ //bool nestedClassInSameGroup =
+ // cd->getOuterScope() && cd->getOuterScope()->definitionType()==Definition::TypeClass &&
+ // cd->getOuterScope()->partOfGroups()!=0 && cd->getOuterScope()->partOfGroups()->contains(gd);
+ //printf("===== GroupClasses: %s visible=%d nestedClassInSameGroup=%d\n",cd->name().data(),cd->isVisible(),nestedClassInSameGroup);
+ if (cd->isVisible() /*&& !nestedClassInSameGroup*/)
{
- if (cd->isLinkable() && cd->isEmbeddedInOuterScope())
- {
+ //if (cd->isEmbeddedInOuterScope())
+ //{
+ //printf("add class & members %d\n",addToIndex);
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);
- }
+ //}
+ //else // only index the class, not its members
+ //{
+ // printf("%s: add class only\n",cd->name().data());
+ // Doxygen::indexList.addContentsItem(FALSE,
+ // cd->displayName(TRUE),cd->getReference(),
+ // cd->getOutputFileBase(),cd->anchor(),addToIndex,TRUE);
+ //}
}
}
}
diff --git a/src/indexlog.cpp b/src/indexlog.cpp
deleted file mode 100644
index 5fb67f5..0000000
--- a/src/indexlog.cpp
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright (C) 2008 by Sebastian Pipping.
- * Copyright (C) 2008 Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- * Documents produced by Doxygen are derivative works derived from the
- * input used in their production; they are not affected by this license.
- *
- * Sebastian Pipping <sebastian@pipping.org>
- */
-
-#include "indexlog.h"
-#include "message.h"
-#include "config.h"
-
-#include <qstring.h>
-#include <qfile.h>
-
-
-IndexLog::IndexLog()
-{
-}
-
-IndexLog::~IndexLog()
-{
-}
-
-void IndexLog::initialize()
-{
- char const * const attributes[] =
- { "xmlns",
- "http://doxygen.org/xmlns/indexlog/1/0/",
- NULL
- };
- m_out.open("log", attributes);
-
- openMethodCall("initialize");
- closeMethodCall();
-}
-
-void IndexLog::finalize()
-{
- openMethodCall("finalize");
- closeMethodCall();
- m_out.close("log");
- QCString fileName = Config_getString("HTML_OUTPUT")+"/index.log.xml";
- QFile file(fileName);
- if (!file.open(IO_WriteOnly))
- {
- err("Could not open file %s for writing\n", fileName.data());
- exit(1);
- }
- m_out.dumpTo(file);
- file.flush();
- file.close();
-}
-
-void IndexLog::incContentsDepth()
-{
- openMethodCall("incContentsDepth");
- closeMethodCall();
-}
-
-void IndexLog::decContentsDepth()
-{
- openMethodCall("decContentsDepth");
- closeMethodCall();
-}
-
-void IndexLog::addContentsItem(bool isDir, char const * name,
- char const * ref, char const * file,
- char const * anchor)
-{
- openMethodCall("addContentsItem");
- addBoolParameter("isDir", isDir);
- addStringParameter("name", name);
- addStringParameter("ref", ref);
- addStringParameter("file", file);
- addStringParameter("anchor", anchor);
- closeMethodCall();
-}
-
-void IndexLog::addIndexItem(char const * level1, char const * level2,
- char const * contRef, char const * memRef,
- char const * anchor, const MemberDef * md)
-{
- openMethodCall("addIndexItem");
- addStringParameter("level1", level1);
- addStringParameter("level2", level2);
- addStringParameter("contRef", contRef);
- addStringParameter("memRef", memRef);
- addStringParameter("anchor", anchor);
- addMemberDefParameter("md", md);
- closeMethodCall();
-}
-
-void IndexLog::addIndexFile(char const * name)
-{
- openMethodCall("addIndexFile");
- addStringParameter("name", name);
- closeMethodCall();
-}
-
-void IndexLog::openMethodCall(char const * methodName)
-{
- m_out.setCompressionEnabled(true);
- m_out.open("call");
- m_out.openCloseContent("method", methodName);
-}
-
-void IndexLog::addPrimitiveParameter(char const * parameterName,
- char const * value)
-{
- m_out.open("param");
- m_out.openCloseContent("name", parameterName);
- if (value != NULL)
- {
- m_out.openCloseContent("value", value);
- }
- m_out.close("param");
-}
-
-void IndexLog::addBoolParameter(char const * parameterName, bool value)
-{
- addPrimitiveParameter(parameterName, value ? "true" : "false");
-}
-
-void IndexLog::addStringParameter(char const * parameterName,
- char const * value)
-{
- addPrimitiveParameter(parameterName, value);
-}
-
-void IndexLog::addMemberDefParameter(char const * parameterName,
- const MemberDef * /*value*/)
-{
- m_out.open("param");
- m_out.openCloseContent("name", parameterName);
- m_out.close("param");
-}
-
-void IndexLog::closeMethodCall()
-{
- m_out.setCompressionEnabled(false);
- m_out.close("call");
-}
-
diff --git a/src/indexlog.h b/src/indexlog.h
deleted file mode 100644
index 6875971..0000000
--- a/src/indexlog.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2008 by Sebastian Pipping.
- * Copyright (C) 2008 Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- * Documents produced by Doxygen are derivative works derived from the
- * input used in their production; they are not affected by this license.
- *
- * Sebastian Pipping <sebastian@pipping.org>
- */
-
-#ifndef INDEXLOG_H
-#define INDEXLOG_H
-
-#include "index.h"
-#include "qhpxmlwriter.h"
-
-class IndexLog : public IndexIntf
-{
- public:
- IndexLog();
- ~IndexLog();
-
- // BEGIN IndexIntf
- void initialize();
- void finalize();
- void incContentsDepth();
- void decContentsDepth();
- void addContentsItem(bool isDir, const char *name, const char *ref,
- const char *file, const char *anchor);
- void addIndexItem(const char *level1, const char *level2,
- const char *contRef, const char *memRef,
- const char *anchor, const MemberDef * md);
- void addIndexFile(const char *name);
- // END IndexIntf
-
- private:
- void openMethodCall(char const * methodName);
- void addPrimitiveParameter(char const * parameterName,
- char const * value);
- void addBoolParameter(char const * parameterName, bool value);
- void addStringParameter(char const * parameterName,
- char const * value);
- void addMemberDefParameter(char const * parameterName,
- const MemberDef * value);
- void closeMethodCall();
-
- QhpXmlWriter m_out;
-};
-
-#endif // INDEXLOG_H
-
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index e940541..3fce01c 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -2097,7 +2097,7 @@ void LatexGenerator::startMemberTemplateParams()
}
}
-void LatexGenerator::endMemberTemplateParams(const char *)
+void LatexGenerator::endMemberTemplateParams(const char *,const char *)
{
if (templateMemberItem)
{
diff --git a/src/latexgen.h b/src/latexgen.h
index 63e0de6..6a92867 100644
--- a/src/latexgen.h
+++ b/src/latexgen.h
@@ -117,7 +117,7 @@ class LatexGenerator : public OutputGenerator
void startMemberItem(const char *,int,const char *);
void endMemberItem();
void startMemberTemplateParams();
- void endMemberTemplateParams(const char *);
+ void endMemberTemplateParams(const char *,const char *);
void startMemberGroupHeader(bool);
void endMemberGroupHeader();
@@ -165,6 +165,8 @@ class LatexGenerator : public OutputGenerator
void endSmall() { t << "\\normalsize "; }
void startMemberDescription(const char *,const char *);
void endMemberDescription();
+ void startMemberDeclaration() {}
+ void endMemberDeclaration(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["; }
diff --git a/src/layout.cpp b/src/layout.cpp
index ecf4340..2045609 100644
--- a/src/layout.cpp
+++ b/src/layout.cpp
@@ -23,6 +23,7 @@
#include "util.h"
#include "doxygen.h"
+#include <assert.h>
#include <qxml.h>
#include <qfile.h>
#include <qstring.h>
@@ -33,6 +34,20 @@ static const char layout_default[] =
#include "layout_default.h"
;
+#define ADD_OPTION(langId,text) "|"+QCString().setNum(langId)+"="+text
+
+#define COMPILE_FOR_1_OPTION(def,langId1,text1) \
+ def+ADD_OPTION(langId1,text1)
+
+#define COMPILE_FOR_2_OPTIONS(def,langId1,text1,langId2,text2) \
+ COMPILE_FOR_1_OPTION(def,langId1,text1)+ADD_OPTION(langId2,text2)
+
+#define COMPILE_FOR_3_OPTIONS(def,langId1,text1,langId2,text2,langId3,text3) \
+ COMPILE_FOR_2_OPTIONS(def,langId1,text1,langId2,text2)+ADD_OPTION(langId3,text3)
+
+#define COMPILE_FOR_4_OPTIONS(def,langId1,text1,langId2,text2,langId3,text3,langId4,text4) \
+ COMPILE_FOR_3_OPTIONS(def,langId1,text1,langId2,text2,langId3,text3)+ADD_OPTION(langId4,text4)
+
static bool elemIsVisible(const QXmlAttributes &attrib,bool defVal=TRUE)
{
QCString visible = convertToQCString(attrib.value("visible"));
@@ -244,9 +259,9 @@ class LayoutParser : public QXmlDefaultHandler
m_part = -1; // invalid
m_rootNav = 0;
- bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
- bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
- bool javaOpt = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
+ //bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
+ //bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
+ //bool javaOpt = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
// start & end handlers
m_sHandler.insert("doxygenlayout",
@@ -290,10 +305,11 @@ class LayoutParser : public QXmlDefaultHandler
new StartElementHandlerKind(this,LayoutDocEntry::MemberGroups,&LayoutParser::startSimpleEntry));
m_sHandler.insert("class/memberdecl/nestedclasses",
new StartElementHandlerSection(this,LayoutDocEntry::ClassNestedClasses,&LayoutParser::startSectionEntry,
- vhdlOpt ? VhdlDocGen::trVhdlType(VhdlDocGen::ENTITY,FALSE) :
- fortranOpt ? theTranslator->trDataTypes() :
- theTranslator->trCompounds()
- ));
+ COMPILE_FOR_2_OPTIONS(
+ theTranslator->trCompounds(),
+ SrcLangExt_VHDL,VhdlDocGen::trVhdlType(VhdlDocGen::ENTITY,FALSE),
+ SrcLangExt_Fortran,theTranslator->trDataTypes()
+ )));
m_sHandler.insert("class/memberdecl/publictypes",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
MemberList::pubTypes,theTranslator->trPublicTypes()));
@@ -305,10 +321,18 @@ class LayoutParser : public QXmlDefaultHandler
MemberList::signals,theTranslator->trSignals()));
m_sHandler.insert("class/memberdecl/publicmethods",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
- MemberList::pubMethods,theTranslator->trPublicMembers()));
+ MemberList::pubMethods,
+ COMPILE_FOR_1_OPTION(
+ theTranslator->trPublicMembers(),
+ SrcLangExt_ObjC,theTranslator->trInstanceMethods()
+ )));
m_sHandler.insert("class/memberdecl/publicstaticmethods",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
- MemberList::pubStaticMethods,theTranslator->trStaticPublicMembers()));
+ MemberList::pubStaticMethods,
+ COMPILE_FOR_1_OPTION(
+ theTranslator->trStaticPublicMembers(),
+ SrcLangExt_ObjC,theTranslator->trClassMethods()
+ )));
m_sHandler.insert("class/memberdecl/publicattributes",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
MemberList::pubAttribs,theTranslator->trPublicAttribs()));
@@ -385,9 +409,10 @@ class LayoutParser : public QXmlDefaultHandler
new StartElementHandler(this,&LayoutParser::startMemberDef));
m_sHandler.insert("class/memberdef/inlineclasses",
new StartElementHandlerSection(this,LayoutDocEntry::ClassInlineClasses,&LayoutParser::startSectionEntry,
- fortranOpt ? theTranslator->trTypeDocumentation() :
- theTranslator->trClassDocumentation()
- ));
+ COMPILE_FOR_1_OPTION(
+ theTranslator->trClassDocumentation(),
+ SrcLangExt_Fortran,theTranslator->trTypeDocumentation()
+ )));
m_sHandler.insert("class/memberdef/typedefs",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
MemberList::typedefMembers,theTranslator->trMemberTypedefDocumentation()));
@@ -400,9 +425,11 @@ class LayoutParser : public QXmlDefaultHandler
m_sHandler.insert("class/memberdef/functions",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
MemberList::functionMembers,
- fortranOpt ?
- theTranslator->trMemberFunctionDocumentationFortran() :
- theTranslator->trMemberFunctionDocumentation()));
+ COMPILE_FOR_2_OPTIONS(
+ theTranslator->trMemberFunctionDocumentation(),
+ SrcLangExt_ObjC,theTranslator->trMethodDocumentation(),
+ SrcLangExt_Fortran,theTranslator->trMemberFunctionDocumentationFortran()
+ )));
m_sHandler.insert("class/memberdef/related",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
MemberList::relatedMembers,theTranslator->trRelatedFunctionDocumentation()));
@@ -435,16 +462,19 @@ class LayoutParser : public QXmlDefaultHandler
new StartElementHandler(this,&LayoutParser::startMemberDecl));
m_sHandler.insert("namespace/memberdecl/nestednamespaces",
new StartElementHandlerSection(this,LayoutDocEntry::NamespaceNestedNamespaces,&LayoutParser::startSectionEntry,
- javaOpt || vhdlOpt ? theTranslator->trPackages() :
- fortranOpt ? theTranslator->trModules() :
- theTranslator->trNamespaces()
- ));
+ COMPILE_FOR_3_OPTIONS(
+ theTranslator->trNamespaces(),
+ SrcLangExt_Java,theTranslator->trPackages(),
+ SrcLangExt_VHDL,theTranslator->trPackages(),
+ SrcLangExt_Fortran,theTranslator->trModules()
+ )));
m_sHandler.insert("namespace/memberdecl/classes",
new StartElementHandlerSection(this,LayoutDocEntry::NamespaceClasses,&LayoutParser::startSectionEntry,
- vhdlOpt ? VhdlDocGen::trVhdlType(VhdlDocGen::ENTITY,FALSE) :
- fortranOpt ? theTranslator->trDataTypes() :
- theTranslator->trCompounds()
- ));
+ COMPILE_FOR_2_OPTIONS(
+ theTranslator->trCompounds(),
+ SrcLangExt_VHDL,VhdlDocGen::trVhdlType(VhdlDocGen::ENTITY,FALSE),
+ SrcLangExt_Fortran,theTranslator->trDataTypes()
+ )));
m_sHandler.insert("namespace/memberdecl/membergroups",
new StartElementHandlerKind(this,LayoutDocEntry::MemberGroups,&LayoutParser::startSimpleEntry));
m_sHandler.insert("namespace/memberdecl/typedefs",
@@ -456,9 +486,11 @@ class LayoutParser : public QXmlDefaultHandler
m_sHandler.insert("namespace/memberdecl/functions",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
MemberList::decFuncMembers,
- fortranOpt ? theTranslator->trSubprograms() :
- vhdlOpt ? VhdlDocGen::trFunctionAndProc() :
- theTranslator->trFunctions()));
+ COMPILE_FOR_2_OPTIONS(
+ theTranslator->trFunctions(),
+ SrcLangExt_Fortran,theTranslator->trSubprograms(),
+ SrcLangExt_VHDL,VhdlDocGen::trFunctionAndProc()
+ )));
m_sHandler.insert("namespace/memberdecl/variables",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
MemberList::decVarMembers,theTranslator->trVariables()));
@@ -468,9 +500,10 @@ class LayoutParser : public QXmlDefaultHandler
new StartElementHandler(this,&LayoutParser::startMemberDef));
m_sHandler.insert("namespace/memberdef/inlineclasses",
new StartElementHandlerSection(this,LayoutDocEntry::NamespaceInlineClasses,&LayoutParser::startSectionEntry,
- fortranOpt ? theTranslator->trTypeDocumentation() :
- theTranslator->trClassDocumentation()
- ));
+ COMPILE_FOR_1_OPTION(
+ theTranslator->trClassDocumentation(),
+ SrcLangExt_Fortran,theTranslator->trTypeDocumentation()
+ )));
m_sHandler.insert("namespace/memberdef/typedefs",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
MemberList::docTypedefMembers,theTranslator->trTypedefDocumentation()));
@@ -480,9 +513,10 @@ class LayoutParser : public QXmlDefaultHandler
m_sHandler.insert("namespace/memberdef/functions",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
MemberList::docFuncMembers,
- fortranOpt ?
- theTranslator->trSubprogramDocumentation() :
- theTranslator->trFunctionDocumentation()));
+ COMPILE_FOR_1_OPTION(
+ theTranslator->trFunctionDocumentation(),
+ SrcLangExt_Fortran,theTranslator->trSubprogramDocumentation()
+ )));
m_sHandler.insert("namespace/memberdef/variables",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
MemberList::docVarMembers,theTranslator->trVariableDocumentation()));
@@ -515,16 +549,18 @@ class LayoutParser : public QXmlDefaultHandler
new StartElementHandler(this,&LayoutParser::startMemberDecl));
m_sHandler.insert("file/memberdecl/classes",
new StartElementHandlerSection(this,LayoutDocEntry::FileClasses,&LayoutParser::startSectionEntry,
- vhdlOpt ? VhdlDocGen::trVhdlType(VhdlDocGen::ENTITY,FALSE) :
- fortranOpt ? theTranslator->trDataTypes() :
- theTranslator->trCompounds()
- ));
+ COMPILE_FOR_2_OPTIONS(
+ theTranslator->trCompounds(),
+ SrcLangExt_VHDL,VhdlDocGen::trVhdlType(VhdlDocGen::ENTITY,FALSE),
+ SrcLangExt_Fortran,theTranslator->trDataTypes()
+ )));
m_sHandler.insert("file/memberdecl/namespaces",
new StartElementHandlerSection(this,LayoutDocEntry::FileNamespaces,&LayoutParser::startSectionEntry,
- javaOpt ? theTranslator->trPackages() :
- fortranOpt ? theTranslator->trModules() :
- theTranslator->trNamespaces()
- ));
+ COMPILE_FOR_2_OPTIONS(
+ theTranslator->trNamespaces(),
+ SrcLangExt_Java,theTranslator->trPackages(),
+ SrcLangExt_Fortran,theTranslator->trModules()
+ )));
m_sHandler.insert("file/memberdecl/defines",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
MemberList::decDefineMembers,theTranslator->trDefines()));
@@ -537,9 +573,11 @@ class LayoutParser : public QXmlDefaultHandler
m_sHandler.insert("file/memberdecl/functions",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
MemberList::decFuncMembers,
- fortranOpt ? theTranslator->trSubprograms() :
- vhdlOpt ? VhdlDocGen::trFunctionAndProc() :
- theTranslator->trFunctions())) ;
+ COMPILE_FOR_2_OPTIONS(
+ theTranslator->trFunctions(),
+ SrcLangExt_Fortran,theTranslator->trSubprograms(),
+ SrcLangExt_VHDL,VhdlDocGen::trFunctionAndProc()
+ )));
m_sHandler.insert("file/memberdecl/variables",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
MemberList::decVarMembers,theTranslator->trVariables()));
@@ -550,9 +588,10 @@ class LayoutParser : public QXmlDefaultHandler
new StartElementHandler(this,&LayoutParser::startMemberDef));
m_sHandler.insert("file/memberdef/inlineclasses",
new StartElementHandlerSection(this,LayoutDocEntry::FileInlineClasses,&LayoutParser::startSectionEntry,
- fortranOpt ? theTranslator->trTypeDocumentation() :
- theTranslator->trClassDocumentation()
- ));
+ COMPILE_FOR_1_OPTION(
+ theTranslator->trClassDocumentation(),
+ SrcLangExt_Fortran,theTranslator->trTypeDocumentation()
+ )));
m_sHandler.insert("file/memberdef/defines",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
MemberList::docDefineMembers,theTranslator->trDefineDocumentation()));
@@ -566,7 +605,10 @@ class LayoutParser : public QXmlDefaultHandler
m_sHandler.insert("file/memberdef/functions",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
MemberList::docFuncMembers,
- fortranOpt ? theTranslator->trSubprogramDocumentation() : theTranslator->trFunctionDocumentation()));
+ COMPILE_FOR_1_OPTION(
+ theTranslator->trFunctionDocumentation(),
+ SrcLangExt_Fortran,theTranslator->trSubprogramDocumentation()
+ )));
m_sHandler.insert("file/memberdef/variables",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
MemberList::docVarMembers,theTranslator->trVariableDocumentation()));
@@ -593,16 +635,18 @@ class LayoutParser : public QXmlDefaultHandler
new StartElementHandler(this,&LayoutParser::startMemberDecl));
m_sHandler.insert("group/memberdecl/classes",
new StartElementHandlerSection(this,LayoutDocEntry::GroupClasses,&LayoutParser::startSectionEntry,
- vhdlOpt ? VhdlDocGen::trVhdlType(VhdlDocGen::ENTITY,FALSE) :
- fortranOpt ? theTranslator->trDataTypes() :
- theTranslator->trCompounds()
- ));
+ COMPILE_FOR_2_OPTIONS(
+ theTranslator->trCompounds(),
+ SrcLangExt_VHDL,VhdlDocGen::trVhdlType(VhdlDocGen::ENTITY,FALSE),
+ SrcLangExt_Fortran,theTranslator->trDataTypes()
+ )));
m_sHandler.insert("group/memberdecl/namespaces",
new StartElementHandlerSection(this,LayoutDocEntry::GroupNamespaces,&LayoutParser::startSectionEntry,
- javaOpt ? theTranslator->trPackages() :
- fortranOpt ? theTranslator->trModules() :
- theTranslator->trNamespaces()
- ));
+ COMPILE_FOR_2_OPTIONS(
+ theTranslator->trNamespaces(),
+ SrcLangExt_Java,theTranslator->trPackages(),
+ SrcLangExt_Fortran,theTranslator->trModules()
+ )));
m_sHandler.insert("group/memberdecl/dirs",
new StartElementHandlerSection(this,LayoutDocEntry::GroupDirs,&LayoutParser::startSectionEntry,
theTranslator->trDirectories()
@@ -631,9 +675,11 @@ class LayoutParser : public QXmlDefaultHandler
m_sHandler.insert("group/memberdecl/functions",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
MemberList::decFuncMembers,
- fortranOpt ? theTranslator->trSubprograms() :
- vhdlOpt ? VhdlDocGen::trFunctionAndProc() :
- theTranslator->trFunctions()));
+ COMPILE_FOR_2_OPTIONS(
+ theTranslator->trFunctions(),
+ SrcLangExt_Fortran,theTranslator->trSubprograms(),
+ SrcLangExt_VHDL,VhdlDocGen::trFunctionAndProc()
+ )));
m_sHandler.insert("group/memberdecl/variables",
new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry,
MemberList::decVarMembers,theTranslator->trVariables()));
@@ -666,9 +712,10 @@ class LayoutParser : public QXmlDefaultHandler
new StartElementHandlerKind(this,LayoutDocEntry::GroupPageDocs,&LayoutParser::startSimpleEntry));
m_sHandler.insert("group/memberdef/inlineclasses",
new StartElementHandlerSection(this,LayoutDocEntry::GroupInlineClasses,&LayoutParser::startSectionEntry,
- fortranOpt ? theTranslator->trTypeDocumentation() :
- theTranslator->trClassDocumentation()
- ));
+ COMPILE_FOR_1_OPTION(
+ theTranslator->trClassDocumentation(),
+ SrcLangExt_Fortran,theTranslator->trTypeDocumentation()
+ )));
m_sHandler.insert("group/memberdef/defines",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
MemberList::docDefineMembers,theTranslator->trDefineDocumentation()));
@@ -684,9 +731,10 @@ class LayoutParser : public QXmlDefaultHandler
m_sHandler.insert("group/memberdef/functions",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
MemberList::docFuncMembers,
- fortranOpt?
- theTranslator->trSubprogramDocumentation():
- theTranslator->trFunctionDocumentation()));
+ COMPILE_FOR_1_OPTION(
+ theTranslator->trFunctionDocumentation(),
+ SrcLangExt_Fortran,theTranslator->trSubprogramDocumentation()
+ )));
m_sHandler.insert("group/memberdef/variables",
new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry,
MemberList::docVarMembers,theTranslator->trVariableDocumentation()));
@@ -1326,3 +1374,61 @@ void writeDefaultLayoutFile(const char *fileName)
QTextStream t(&f);
t << layout_default;
}
+
+//----------------------------------------------------------------------------------
+
+// Convert input to a title.
+// The format of input can be a simple title "A title" or in case there are different
+// titles for some programming languages they can take the following form:
+// "A title|16=Another title|8=Yet Another title"
+// where the number is a value of SrcLangExt in decimal notation (i.e. 16=Java, 8=IDL).
+QCString extractLanguageSpecificTitle(const QCString &input,SrcLangExt lang)
+{
+ int i,s=0,e=input.find('|');
+ if (e==-1) return input; // simple title case
+ int e1=e;
+ while (e!=-1) // look for 'number=title' pattern separated by '|'
+ {
+ s=e+1;
+ e=input.find('|',s);
+ i=input.find('=',s);
+ assert(i>s);
+ int key=input.mid(s,i-s).toInt();
+ if (key==(int)lang) // found matching key
+ {
+ if (e==-1) e=input.length();
+ return input.mid(i+1,e-i-1);
+ }
+ }
+ return input.left(e1); // fallback, no explicit language key found
+}
+
+//----------------------------------------------------------------------------------
+
+QCString LayoutDocEntrySection::title(SrcLangExt lang) const
+{
+ return extractLanguageSpecificTitle(m_title,lang);
+}
+
+//----------------------------------------------------------------------------------
+
+QCString LayoutDocEntryMemberDecl::title(SrcLangExt lang) const
+{
+ return extractLanguageSpecificTitle(m_title,lang);
+}
+
+QCString LayoutDocEntryMemberDecl::subtitle(SrcLangExt lang) const
+{
+ return extractLanguageSpecificTitle(m_subscript,lang);
+}
+
+//----------------------------------------------------------------------------------
+
+QCString LayoutDocEntryMemberDef::title(SrcLangExt lang) const
+{
+ return extractLanguageSpecificTitle(m_title,lang);
+}
+
+
+
+
diff --git a/src/layout.h b/src/layout.h
index 4602ce4..3425a4c 100644
--- a/src/layout.h
+++ b/src/layout.h
@@ -78,8 +78,10 @@ struct LayoutDocEntrySimple : LayoutDocEntry
struct LayoutDocEntrySection: public LayoutDocEntrySimple
{
LayoutDocEntrySection(Kind k,const QCString &tl) :
- LayoutDocEntrySimple(k), title(tl) {}
- QCString title;
+ LayoutDocEntrySimple(k), m_title(tl) {}
+ QCString title(SrcLangExt lang) const;
+private:
+ QCString m_title;
};
/** @brief Represents of a member declaration list with configurable title and subtitle. */
@@ -87,23 +89,28 @@ struct LayoutDocEntryMemberDecl: public LayoutDocEntry
{
LayoutDocEntryMemberDecl(MemberList::ListType tp,
const QCString &tl,const QCString &ss)
- : type(tp), title(tl),subscript(ss) {}
+ : type(tp), m_title(tl), m_subscript(ss) {}
Kind kind() const { return MemberDecl; }
MemberList::ListType type;
- QCString title;
- QCString subscript;
+ QCString title(SrcLangExt lang) const;
+ QCString subtitle(SrcLangExt lang) const;
+private:
+ QCString m_title;
+ QCString m_subscript;
};
/** @brief Represents of a member definition list with configurable title. */
struct LayoutDocEntryMemberDef: public LayoutDocEntry
{
LayoutDocEntryMemberDef(MemberList::ListType tp,const QCString &tl)
- : type(tp), title(tl) {}
+ : type(tp), m_title(tl) {}
Kind kind() const { return MemberDef; }
MemberList::ListType type;
- QCString title;
+ QCString title(SrcLangExt lang) const;
+private:
+ QCString m_title;
};
/** @brief Base class for the layout of a navigation item at the top of the HTML pages. */
diff --git a/src/libdoxygen.pro.in b/src/libdoxygen.pro.in
index ca6fec6..6008f0f 100644
--- a/src/libdoxygen.pro.in
+++ b/src/libdoxygen.pro.in
@@ -61,7 +61,6 @@ HEADERS = arguments.h \
htmldocvisitor.h \
htmlgen.h \
htmlhelp.h \
- indexlog.h \
image.h \
index.h \
index_xsd.h \
@@ -211,7 +210,6 @@ SOURCES = arguments.cpp \
htmldocvisitor.cpp \
htmlgen.cpp \
htmlhelp.cpp \
- indexlog.cpp \
image.cpp \
index.cpp \
language.cpp \
diff --git a/src/mangen.h b/src/mangen.h
index 27656a7..b997c63 100644
--- a/src/mangen.h
+++ b/src/mangen.h
@@ -115,7 +115,7 @@ class ManGenerator : public OutputGenerator
void startMemberItem(const char *,int,const char *);
void endMemberItem();
void startMemberTemplateParams() {}
- void endMemberTemplateParams(const char *) {}
+ void endMemberTemplateParams(const char *,const char *) {}
void startMemberGroupHeader(bool);
void endMemberGroupHeader();
@@ -161,6 +161,8 @@ 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 startMemberDeclaration() {}
+ void endMemberDeclaration(const char *,const char *) {}
void writeInheritedSectionTitle(const char *,const char *,const char *,
const char *,const char *,const char *) {}
void startDescList(SectionTypes);
diff --git a/src/markdown.cpp b/src/markdown.cpp
index adcac4e..d69e05c 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -2007,14 +2007,14 @@ static QCString processBlocks(const QCString &s,int indent)
//printf("Found FencedCodeBlock lang='%s' start=%d end=%d code={%s}\n",
// lang.data(),blockStart,blockEnd,QCString(data+pi+blockStart).left(blockEnd-blockStart).data());
if (!lang.isEmpty() && lang.at(0)=='.') lang=lang.mid(1);
- if (lang.isEmpty()) out.addStr("@verbatim"); else out.addStr("@code");
+ out.addStr("@code");
if (!lang.isEmpty())
{
out.addStr("{"+lang+"}");
}
out.addStr(data+pi+blockStart,blockEnd-blockStart);
out.addStr("\n");
- if (lang.isEmpty()) out.addStr("@endverbatim"); else out.addStr("@endcode");
+ out.addStr("@endcode");
i=pi+blockOffset;
pi=-1;
end=i+1;
@@ -2144,6 +2144,22 @@ static QCString detab(const QCString &s,int &refIndent)
QCString processMarkdown(const QCString &fileName,Entry *e,const QCString &input)
{
+ static bool init=FALSE;
+ if (!init)
+ {
+ // setup callback table for special characters
+ g_actions[(unsigned int)'_']=processEmphasis;
+ g_actions[(unsigned int)'*']=processEmphasis;
+ g_actions[(unsigned int)'`']=processCodeSpan;
+ g_actions[(unsigned int)'\\']=processSpecialCommand;
+ g_actions[(unsigned int)'@']=processSpecialCommand;
+ g_actions[(unsigned int)'[']=processLink;
+ g_actions[(unsigned int)'!']=processLink;
+ g_actions[(unsigned int)'<']=processHtmlTag;
+ g_actions[(unsigned int)'-']=processNmdash;
+ init=TRUE;
+ }
+
g_linkRefs.setAutoDelete(TRUE);
g_linkRefs.clear();
g_current = e;
@@ -2160,18 +2176,8 @@ QCString processMarkdown(const QCString &fileName,Entry *e,const QCString &input
// then process block items (headers, rules, and code blocks, references)
s = processBlocks(s,refIndent);
//printf("======== Blocks =========\n---- output -----\n%s\n---------\n",s.data());
- int size=s.length();
- g_actions['_']=processEmphasis;
- g_actions['*']=processEmphasis;
- g_actions['`']=processCodeSpan;
- g_actions['\\']=processSpecialCommand;
- g_actions['@']=processSpecialCommand;
- g_actions['[']=processLink;
- g_actions['!']=processLink;
- g_actions['<']=processHtmlTag;
- g_actions['-']=processNmdash;
// finally process the inline markup (links, emphasis and code spans)
- processInline(out,s,size);
+ processInline(out,s,s.length());
out.addChar(0);
Debug::print(Debug::Markdown,0,"======== Markdown =========\n---- input ------- \n%s\n---- output -----\n%s\n---------\n",input.data(),out.get());
return out.get();
diff --git a/src/marshal.cpp b/src/marshal.cpp
index 3ef97b8..daf1850 100644
--- a/src/marshal.cpp
+++ b/src/marshal.cpp
@@ -55,32 +55,7 @@ void marshalQGString(StorageIntf *s,const QGString &str)
void marshalArgumentList(StorageIntf *s,ArgumentList *argList)
{
- if (argList==0)
- {
- marshalUInt(s,NULL_LIST); // null pointer representation
- }
- else
- {
- marshalUInt(s,argList->count());
- if (argList->count()>0)
- {
- ArgumentListIterator ali(*argList);
- Argument *a;
- for (ali.toFirst();(a=ali.current());++ali)
- {
- marshalQCString(s,a->attrib);
- marshalQCString(s,a->type);
- marshalQCString(s,a->canType);
- marshalQCString(s,a->name);
- marshalQCString(s,a->array);
- marshalQCString(s,a->defval);
- marshalQCString(s,a->docs);
- }
- }
- marshalBool(s,argList->constSpecifier);
- marshalBool(s,argList->volatileSpecifier);
- marshalBool(s,argList->pureSpecifier);
- }
+ ArgumentList::marshal(s,argList);
}
void marshalArgumentLists(StorageIntf *s,QList<ArgumentList> *argLists)
@@ -488,28 +463,7 @@ QGString unmarshalQGString(StorageIntf *s)
ArgumentList *unmarshalArgumentList(StorageIntf *s)
{
- uint i;
- uint count = unmarshalUInt(s);
- if (count==NULL_LIST) return 0; // null list
- ArgumentList *result = new ArgumentList;
- assert(count<1000000);
- //printf("unmarshalArgumentList: %d\n",count);
- for (i=0;i<count;i++)
- {
- Argument *a = new Argument;
- a->attrib = unmarshalQCString(s);
- a->type = unmarshalQCString(s);
- a->canType = unmarshalQCString(s);
- a->name = unmarshalQCString(s);
- a->array = unmarshalQCString(s);
- a->defval = unmarshalQCString(s);
- a->docs = unmarshalQCString(s);
- result->append(a);
- }
- result->constSpecifier = unmarshalBool(s);
- result->volatileSpecifier = unmarshalBool(s);
- result->pureSpecifier = unmarshalBool(s);
- return result;
+ return ArgumentList::unmarshal(s);
}
QList<ArgumentList> *unmarshalArgumentLists(StorageIntf *s)
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 69abf7a..75486a0 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -325,6 +325,17 @@ static bool writeDefArgumentList(OutputList &ol,ClassDef *cd,
{
ol.docify(" volatile");
}
+ if (!defArgList->trailingReturnType.isEmpty())
+ {
+ linkifyText(TextGeneratorOLImpl(ol), // out
+ cd, // scope
+ md->getBodyDef(), // fileScope
+ md, // self
+ defArgList->trailingReturnType, // text
+ FALSE // autoBreak
+ );
+
+ }
return TRUE;
}
@@ -417,6 +428,7 @@ class MemberDefImpl
QCString exception; // exceptions that can be thrown
QCString initializer; // initializer
QCString extraTypeChars; // extra type info found after the argument list
+ QCString enumBaseType; // base type of the enum (C++11)
int initLines; // number of lines in the initializer
int memSpec; // The specifiers present for this member
@@ -486,6 +498,7 @@ class MemberDefImpl
// definition.
// FALSE => block is put before declaration.
ClassDef *category;
+ MemberDef *categoryRelation;
};
MemberDefImpl::MemberDefImpl() :
@@ -498,7 +511,8 @@ MemberDefImpl::MemberDefImpl() :
typeConstraints(0),
defTmpArgLists(0),
classSectionSDict(0),
- category(0)
+ category(0),
+ categoryRelation(0)
{
}
@@ -573,14 +587,7 @@ void MemberDefImpl::init(Definition *def,
// copy function template arguments (if any)
if (tal)
{
- tArgList = new ArgumentList;
- tArgList->setAutoDelete(TRUE);
- ArgumentListIterator ali(*tal);
- Argument *a;
- for (;(a=ali.current());++ali)
- {
- tArgList->append(new Argument(*a));
- }
+ tArgList = tal->deepCopy();
}
else
{
@@ -590,19 +597,7 @@ void MemberDefImpl::init(Definition *def,
// copy function definition arguments (if any)
if (al)
{
- defArgList = new ArgumentList;
- defArgList->setAutoDelete(TRUE);
- ArgumentListIterator ali(*al);
- Argument *a;
- for (;(a=ali.current());++ali)
- {
- //printf("copy argument %s (doc=%s)\n",a->name.data(),a->docs.data());
- defArgList->append(new Argument(*a));
- }
- defArgList->constSpecifier = al->constSpecifier;
- defArgList->volatileSpecifier = al->volatileSpecifier;
- defArgList->pureSpecifier = al->pureSpecifier;
- //printf("defArgList(%p)->constSpecifier=%d\n",defArgList,defArgList->constSpecifier);
+ defArgList = al->deepCopy();
}
else
{
@@ -677,6 +672,92 @@ MemberDef::MemberDef(const char *df,int dl,
m_isDestructorCached = 0;
}
+MemberDef::MemberDef(const MemberDef &md) : Definition(md)
+{
+ m_storagePos=-1;
+ m_cacheHandle=-1;
+ m_impl = new MemberDefImpl;
+ m_flushPending = FALSE;
+ m_isLinkableCached = 0;
+ m_isConstructorCached = 0;
+ m_isDestructorCached = 0;
+}
+
+MemberDef *MemberDef::deepCopy() const
+{
+ makeResident();
+ //MemberDef *result = new MemberDef(getDefFileName(),getDefLine(),name());
+ MemberDef *result = new MemberDef(*this);
+ // first copy everything by reference
+ *result->m_impl = *m_impl;
+ // clear pointers owned by object
+ result->m_impl->redefinedBy= 0;
+ result->m_impl->exampleSDict=0;
+ result->m_impl->enumFields=0;
+ result->m_impl->defArgList=0;
+ result->m_impl->tArgList=0;
+ result->m_impl->typeConstraints=0;
+ result->m_impl->defTmpArgLists=0;
+ result->m_impl->classSectionSDict=0;
+ result->m_impl->declArgList=0;
+ // replace pointers owned by the object by deep copies
+ if (m_impl->redefinedBy)
+ {
+ MemberListIterator mli(*m_impl->redefinedBy);
+ MemberDef *md;
+ for (mli.toFirst();(md=mli.current());++mli)
+ {
+ result->insertReimplementedBy(md);
+ }
+ }
+ if (m_impl->exampleSDict)
+ {
+ ExampleSDict::Iterator it(*m_impl->exampleSDict);
+ Example *e;
+ for (it.toFirst();(e=it.current());++it)
+ {
+ result->addExample(e->anchor,e->name,e->file);
+ }
+ }
+ if (m_impl->enumFields)
+ {
+ MemberListIterator mli(*m_impl->redefinedBy);
+ MemberDef *md;
+ for (mli.toFirst();(md=mli.current());++mli)
+ {
+ result->insertEnumField(md);
+ }
+ }
+ if (m_impl->defArgList)
+ {
+ result->m_impl->defArgList = m_impl->defArgList->deepCopy();
+ }
+ if (m_impl->tArgList)
+ {
+ result->m_impl->tArgList = m_impl->tArgList->deepCopy();
+ }
+ if (m_impl->typeConstraints)
+ {
+ result->m_impl->typeConstraints = m_impl->typeConstraints->deepCopy();
+ }
+ result->setDefinitionTemplateParameterLists(m_impl->defTmpArgLists);
+ if (m_impl->classSectionSDict)
+ {
+ result->m_impl->classSectionSDict = new SDict<MemberList>(7);
+ SDict<MemberList>::IteratorDict it(*m_impl->classSectionSDict);
+ MemberList *ml;
+ for (it.toFirst();(ml=it.current());++it)
+ {
+ result->m_impl->classSectionSDict->append(it.currentKey(),ml);
+ }
+ }
+ if (m_impl->declArgList)
+ {
+ result->m_impl->declArgList = m_impl->declArgList->deepCopy();
+ }
+ return result;
+}
+
void MemberDef::moveTo(Definition *scope)
{
setOuterScope(scope);
@@ -926,6 +1007,7 @@ void MemberDef::_computeLinkableInProject()
{
//printf("has template master\n");
m_isLinkableCached = m_impl->templateMaster->isLinkableInProject() ? 2 : 1;
+ return;
}
if (name().isEmpty() || name().at(0)=='@')
{
@@ -1338,6 +1420,8 @@ void MemberDef::writeDeclaration(OutputList &ol,
// search for the last anonymous scope in the member type
ClassDef *annoClassDef=getClassDefOfAnonymousType();
+ ol.startMemberDeclaration();
+
// start a new member declaration
bool isAnonymous = annoClassDef || m_impl->annMemb || m_impl->annEnumType;
///printf("startMemberItem for %s\n",name().data());
@@ -1379,12 +1463,16 @@ void MemberDef::writeDeclaration(OutputList &ol,
{
if (!isAnonymous) ol.startMemberTemplateParams();
writeTemplatePrefix(ol,m_impl->tArgList);
- if (!isAnonymous) ol.endMemberTemplateParams(anchor());
+ if (!isAnonymous) ol.endMemberTemplateParams(anchor(),inheritId);
}
// *** write type
QCString ltype(m_impl->type);
if (m_impl->mtype==Typedef) ltype.prepend("typedef ");
+ if (isAlias())
+ {
+ ltype="using";
+ }
// strip `friend' keyword from ltype
ltype.stripPrefix("friend ");
static QRegExp r("@[0-9]+");
@@ -1574,7 +1662,6 @@ void MemberDef::writeDeclaration(OutputList &ol,
s_indentLevel
);
}
-
// *** write exceptions
if (excpString())
{
@@ -1594,7 +1681,8 @@ void MemberDef::writeDeclaration(OutputList &ol,
{
if (!isDefine())
{
- ol.writeString(" = ");
+ //ol.writeString(" = ");
+ ol.writeString(" ");
linkifyText(TextGeneratorOLImpl(ol),d,getBodyDef(),this,m_impl->initializer.simplifyWhiteSpace());
}
else
@@ -1603,8 +1691,14 @@ void MemberDef::writeDeclaration(OutputList &ol,
linkifyText(TextGeneratorOLImpl(ol),d,getBodyDef(),this,m_impl->initializer);
}
}
+ else if (isAlias()) // using template alias
+ {
+ ol.writeString(" = ");
+ linkifyText(TextGeneratorOLImpl(ol),d,getBodyDef(),this,m_impl->type);
+ }
+
- if (isObjCMethod() && isImplementation())
+ if ((isObjCMethod() || isObjCProperty()) && isImplementation())
{
ol.startTypewriter();
ol.docify(" [implementation]");
@@ -1699,6 +1793,9 @@ void MemberDef::writeDeclaration(OutputList &ol,
ol.popGeneratorState();
ol.endMemberDescription();
}
+
+ ol.endMemberDeclaration(anchor(),inheritId);
+
warnIfUndocumented();
}
@@ -1790,11 +1887,13 @@ bool MemberDef::isDetailedSectionVisible(bool inGroup,bool inFile) const
void MemberDef::_getLabels(QStrList &sl,Definition *container) const
{
+ static bool inlineInfo = Config_getBool("INLINE_INFO");
+
Specifier lvirt=virtualness();
if ((!isObjCMethod() || isOptional() || isRequired()) &&
(protection()!=Public || lvirt!=Normal ||
isFriend() || isRelated() ||
- (isInline() && Config_getBool("INLINE_INFO")) ||
+ (isInline() && inlineInfo) ||
isSignal() || isSlot() ||
isStatic() ||
(m_impl->classDef && m_impl->classDef!=container && container->definitionType()==TypeClass) ||
@@ -1859,6 +1958,13 @@ void MemberDef::_getLabels(QStrList &sl,Definition *container) const
else if (lvirt==Pure) sl.append("pure virtual");
if (isSignal()) sl.append("signal");
if (isSlot()) sl.append("slot");
+ if (isDefault()) sl.append("default");
+ if (isDelete()) sl.append("delete");
+ if (isNoExcept()) sl.append("noexcept");
+ }
+ if (isObjCProperty() && isImplementation())
+ {
+ sl.append("implementation");
}
}
if (m_impl->classDef &&
@@ -2062,6 +2168,59 @@ void MemberDef::_writeReimplementedBy(OutputList &ol)
}
}
+void MemberDef::_writeCategoryRelation(OutputList &ol)
+{
+ if (m_impl->classDef) // this should be a member of a class/category
+ {
+ //printf("%s: category %s relation %s class=%s categoryOf=%s\n",
+ // name().data(),
+ // m_impl->category ? m_impl->category->name().data() : "<none>",
+ // m_impl->categoryRelation ? m_impl->categoryRelation->name().data() : "<none>",
+ // m_impl->classDef->name().data(),
+ // m_impl->classDef->categoryOf() ? m_impl->classDef->categoryOf()->name().data() : "<none>"
+ // );
+ QCString text;
+ QCString ref;
+ QCString file;
+ QCString anc;
+ QCString name;
+ int i=-1;
+ if (m_impl->categoryRelation && m_impl->categoryRelation->isLinkable())
+ {
+ if (m_impl->category)
+ {
+ // this member is in a normal class and implements method categoryRelation from category
+ // so link to method 'categoryRelation' with 'provided by category 'category' text.
+ text = theTranslator->trProvidedByCategory();
+ name = m_impl->category->displayName();
+ }
+ else if (m_impl->classDef->categoryOf())
+ {
+ // this member is part of a category so link to the corresponding class member of the class we extend
+ // so link to method 'categoryRelation' with 'extends class 'classDef->categoryOf()'
+ text = theTranslator->trExtendsClass();
+ name = m_impl->classDef->categoryOf()->displayName();
+ }
+ i=text.find("@1");
+ if (i!=-1)
+ {
+ MemberDef *md = m_impl->categoryRelation;
+ ref = md->getReference();
+ file = md->getOutputFileBase();
+ anc = md->anchor();
+ }
+ }
+ if (i!=-1 && !name.isEmpty())
+ {
+ ol.startParagraph();
+ ol.parseText(text.left(i));
+ ol.writeObjectLink(ref,file,anc,name);
+ ol.parseText(text.mid(i+2));
+ ol.endParagraph();
+ }
+ }
+}
+
void MemberDef::_writeExamples(OutputList &ol)
{
// write the list of examples that use this member
@@ -2418,8 +2577,10 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
{
if (!isDefine())
{
- ol.docify(" = ");
- linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),this,m_impl->initializer.simplifyWhiteSpace());
+ //ol.docify(" = ");
+ ol.docify(" ");
+ QCString init = m_impl->initializer.simplifyWhiteSpace();
+ linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),this,init);
}
else
{
@@ -2599,6 +2760,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
_writeEnumValues(ol,container,cfname,ciname,cname);
_writeReimplements(ol);
_writeReimplementedBy(ol);
+ _writeCategoryRelation(ol);
_writeExamples(ol);
_writeTypeConstraints(ol);
writeSourceDef(ol,cname);
@@ -2956,7 +3118,7 @@ void MemberDef::setAnchor(const char *a)
{
makeResident();
//anc=a;
- a=a;
+ (void)a;
QCString memAnchor = name();
if (!m_impl->args.isEmpty()) memAnchor+=m_impl->args;
@@ -3038,18 +3200,17 @@ MemberDef *MemberDef::createTemplateInstanceMember(
ArgumentList *actualArgList = 0;
if (m_impl->defArgList)
{
- actualArgList = new ArgumentList;
- ArgumentListIterator ali(*m_impl->defArgList);
+ actualArgList = m_impl->defArgList->deepCopy();
+
+ // replace formal arguments with actuals
+ ArgumentListIterator ali(*actualArgList);
Argument *arg;
for (;(arg=ali.current());++ali)
{
- Argument *actArg = new Argument(*arg);
- actArg->type = substituteTemplateArgumentsInString(actArg->type,formalArgs,actualArgs);
- actualArgList->append(actArg);
+ arg->type = substituteTemplateArgumentsInString(arg->type,formalArgs,actualArgs);
}
- actualArgList->constSpecifier = m_impl->defArgList->constSpecifier;
- actualArgList->volatileSpecifier = m_impl->defArgList->volatileSpecifier;
- actualArgList->pureSpecifier = m_impl->defArgList->pureSpecifier;
+ actualArgList->trailingReturnType =
+ substituteTemplateArgumentsInString(actualArgList->trailingReturnType,formalArgs,actualArgs);
}
QCString methodName=name();
@@ -3102,10 +3263,12 @@ void MemberDef::setInitializer(const char *initializer)
{
makeResident();
m_impl->initializer=initializer;
- int p=m_impl->initializer.length()-1;
+ int l=m_impl->initializer.length();
+ int p=l-1;
while (p>=0 && isspace((uchar)m_impl->initializer.at(p))) p--;
m_impl->initializer=m_impl->initializer.left(p+1);
m_impl->initLines=m_impl->initializer.contains('\n');
+ //printf("%s::setInitializer(%s)\n",name().data(),m_impl->initializer.data());
}
void MemberDef::addListReference(Definition *)
@@ -3357,6 +3520,13 @@ void MemberDef::writeEnumDeclaration(OutputList &typeDecl,
typeDecl.endBold();
}
typeDecl.writeChar(' ');
+ if (!m_impl->enumBaseType.isEmpty())
+ {
+ typeDecl.writeChar(':');
+ typeDecl.writeChar(' ');
+ typeDecl.docify(m_impl->enumBaseType);
+ typeDecl.writeChar(' ');
+ }
}
uint enumValuesPerLine = (uint)Config_getInt("ENUM_VALUES_PER_LINE");
@@ -3406,7 +3576,8 @@ void MemberDef::writeEnumDeclaration(OutputList &typeDecl,
}
if (fmd->hasOneLineInitializer()) // enum value has initializer
{
- typeDecl.writeString(" = ");
+ //typeDecl.writeString(" = ");
+ typeDecl.writeString(" ");
typeDecl.parseText(fmd->initializer());
}
}
@@ -3963,6 +4134,31 @@ bool MemberDef::isUnretained() const
return (m_impl->memSpec&Entry::Unretained)!=0;
}
+bool MemberDef::isAlias() const
+{
+ makeResident();
+ return (m_impl->memSpec&Entry::Alias)!=0;
+}
+
+bool MemberDef::isDefault() const
+{
+ makeResident();
+ return (m_impl->memSpec&Entry::Default)!=0;
+}
+
+bool MemberDef::isDelete() const
+{
+ makeResident();
+ return (m_impl->memSpec&Entry::Delete)!=0;
+}
+
+bool MemberDef::isNoExcept() const
+{
+ makeResident();
+ return (m_impl->memSpec&Entry::NoExcept)!=0;
+}
+
+
bool MemberDef::isImplementation() const
{
@@ -4386,6 +4582,30 @@ void MemberDef::setCategory(ClassDef *def)
m_impl->category = def;
}
+MemberDef *MemberDef::categoryRelation() const
+{
+ makeResident();
+ return m_impl->categoryRelation;
+}
+
+void MemberDef::setCategoryRelation(MemberDef *md)
+{
+ makeResident();
+ m_impl->categoryRelation = md;
+}
+
+void MemberDef::setEnumBaseType(const QCString &type)
+{
+ makeResident();
+ m_impl->enumBaseType = type;
+}
+
+QCString MemberDef::enumBaseType() const
+{
+ makeResident();
+ return m_impl->enumBaseType;
+}
+
void MemberDef::cacheTypedefVal(ClassDef*val, const QCString & templSpec, const QCString &resolvedType)
{
@@ -4477,6 +4697,7 @@ void MemberDef::flushToDisk() const
marshalObjPointer (Doxygen::symbolStorage,m_impl->relatedAlso);
marshalExampleSDict (Doxygen::symbolStorage,m_impl->exampleSDict);
marshalQCString (Doxygen::symbolStorage,m_impl->type);
+ marshalQCString (Doxygen::symbolStorage,m_impl->enumBaseType);
marshalQCString (Doxygen::symbolStorage,m_impl->accessorType);
marshalObjPointer (Doxygen::symbolStorage,m_impl->accessorClass);
marshalQCString (Doxygen::symbolStorage,m_impl->args);
@@ -4536,6 +4757,7 @@ void MemberDef::flushToDisk() const
marshalBool (Doxygen::symbolStorage,m_impl->groupHasDocs);
marshalBool (Doxygen::symbolStorage,m_impl->docsForDefinition);
marshalObjPointer (Doxygen::symbolStorage,m_impl->category);
+ marshalObjPointer (Doxygen::symbolStorage,m_impl->categoryRelation);
marshalUInt(Doxygen::symbolStorage,END_MARKER);
// function doesn't modify the object conceptually but compiler doesn't know this.
@@ -4578,6 +4800,7 @@ void MemberDef::loadFromDisk() const
m_impl->relatedAlso = (ClassDef*)unmarshalObjPointer (Doxygen::symbolStorage);
m_impl->exampleSDict = unmarshalExampleSDict (Doxygen::symbolStorage);
m_impl->type = unmarshalQCString (Doxygen::symbolStorage);
+ m_impl->enumBaseType = unmarshalQCString (Doxygen::symbolStorage);
m_impl->accessorType = unmarshalQCString (Doxygen::symbolStorage);
m_impl->accessorClass = (ClassDef*)unmarshalObjPointer (Doxygen::symbolStorage);
m_impl->args = unmarshalQCString (Doxygen::symbolStorage);
@@ -4637,6 +4860,7 @@ void MemberDef::loadFromDisk() const
m_impl->groupHasDocs = unmarshalBool (Doxygen::symbolStorage);
m_impl->docsForDefinition = unmarshalBool (Doxygen::symbolStorage);
m_impl->category = (ClassDef*)unmarshalObjPointer (Doxygen::symbolStorage);
+ m_impl->categoryRelation = (MemberDef*)unmarshalObjPointer (Doxygen::symbolStorage);
marker = unmarshalUInt(Doxygen::symbolStorage);
assert(marker==END_MARKER);
@@ -4730,3 +4954,160 @@ QCString MemberDef::displayName(bool) const
{
return Definition::name();
}
+
+//----------------
+
+static void transferArgumentDocumentation(ArgumentList *decAl,ArgumentList *defAl)
+{
+ if (decAl && defAl)
+ {
+ ArgumentListIterator decAli(*decAl);
+ ArgumentListIterator defAli(*defAl);
+ Argument *decA,*defA;
+ for (decAli.toFirst(),defAli.toFirst();
+ (decA=decAli.current()) && (defA=defAli.current());
+ ++decAli,++defAli)
+ {
+ //printf("Argument decA->name=%s (doc=%s) defA->name=%s (doc=%s)\n",
+ // decA->name.data(),decA->docs.data(),
+ // defA->name.data(),defA->docs.data()
+ // );
+ if (decA->docs.isEmpty() && !defA->docs.isEmpty())
+ {
+ decA->docs = defA->docs.copy();
+ }
+ else if (defA->docs.isEmpty() && !decA->docs.isEmpty())
+ {
+ defA->docs = decA->docs.copy();
+ }
+ }
+ }
+}
+
+void combineDeclarationAndDefinition(MemberDef *mdec,MemberDef *mdef)
+{
+ //printf("mdec=%s isPrototype()=%d\n",mdec->name().data(),mdec->isPrototype());
+ if (
+ (mdef->isFunction() && !mdef->isStatic() && !mdef->isPrototype()) ||
+ (mdef->isVariable() && !mdef->isExternal() && !mdef->isStatic())
+ )
+ {
+ //printf("mdef=(%p,%s) mdec=(%p,%s)\n",
+ // mdef, mdef ? mdef->name().data() : "",
+ // mdec, mdec ? mdec->name().data() : "");
+
+ LockingPtr<ArgumentList> mdefAl = mdef->argumentList();
+ LockingPtr<ArgumentList> mdecAl = mdec->argumentList();
+ if (matchArguments2(mdef->getOuterScope(),mdef->getFileDef(),mdefAl.pointer(),
+ mdec->getOuterScope(),mdec->getFileDef(),mdecAl.pointer(),
+ TRUE
+ )
+ ) /* match found */
+ {
+ //printf("Found member %s: definition in %s (doc=`%s') and declaration in %s (doc=`%s')\n",
+ // mn->memberName(),
+ // mdef->getFileDef()->name().data(),mdef->documentation().data(),
+ // mdec->getFileDef()->name().data(),mdec->documentation().data()
+ // );
+
+ // first merge argument documentation
+ transferArgumentDocumentation(mdecAl.pointer(),mdefAl.pointer());
+
+ /* copy documentation between function definition and declaration */
+ if (!mdec->briefDescription().isEmpty())
+ {
+ mdef->setBriefDescription(mdec->briefDescription(),mdec->briefFile(),mdec->briefLine());
+ }
+ else if (!mdef->briefDescription().isEmpty())
+ {
+ mdec->setBriefDescription(mdef->briefDescription(),mdef->briefFile(),mdef->briefLine());
+ }
+ if (!mdef->documentation().isEmpty())
+ {
+ //printf("transfering docs mdef->mdec (%s->%s)\n",mdef->argsString(),mdec->argsString());
+ mdec->setDocumentation(mdef->documentation(),mdef->docFile(),mdef->docLine());
+ mdec->setDocsForDefinition(mdef->isDocsForDefinition());
+ if (mdefAl!=0)
+ {
+ ArgumentList *mdefAlComb = new ArgumentList;
+ stringToArgumentList(mdef->argsString(),mdefAlComb);
+ transferArgumentDocumentation(mdefAl.pointer(),mdefAlComb);
+ mdec->setArgumentList(mdefAlComb);
+ }
+ }
+ else if (!mdec->documentation().isEmpty())
+ {
+ //printf("transfering docs mdec->mdef (%s->%s)\n",mdec->argsString(),mdef->argsString());
+ mdef->setDocumentation(mdec->documentation(),mdec->docFile(),mdec->docLine());
+ mdef->setDocsForDefinition(mdec->isDocsForDefinition());
+ if (mdecAl!=0)
+ {
+ ArgumentList *mdecAlComb = new ArgumentList;
+ stringToArgumentList(mdec->argsString(),mdecAlComb);
+ transferArgumentDocumentation(mdecAl.pointer(),mdecAlComb);
+ mdef->setDeclArgumentList(mdecAlComb);
+ }
+ }
+ if (!mdef->inbodyDocumentation().isEmpty())
+ {
+ mdec->setInbodyDocumentation(mdef->inbodyDocumentation(),mdef->inbodyFile(),mdef->inbodyLine());
+ }
+ else if (!mdec->inbodyDocumentation().isEmpty())
+ {
+ mdef->setInbodyDocumentation(mdec->inbodyDocumentation(),mdec->inbodyFile(),mdec->inbodyLine());
+ }
+ if (mdec->getStartBodyLine()!=-1 && mdef->getStartBodyLine()==-1)
+ {
+ //printf("body mdec->mdef %d-%d\n",mdec->getStartBodyLine(),mdef->getEndBodyLine());
+ mdef->setBodySegment(mdec->getStartBodyLine(),mdec->getEndBodyLine());
+ mdef->setBodyDef(mdec->getBodyDef());
+ //mdef->setBodyMember(mdec);
+ }
+ else if (mdef->getStartBodyLine()!=-1 && mdec->getStartBodyLine()==-1)
+ {
+ //printf("body mdef->mdec %d-%d\n",mdef->getStartBodyLine(),mdec->getEndBodyLine());
+ mdec->setBodySegment(mdef->getStartBodyLine(),mdef->getEndBodyLine());
+ mdec->setBodyDef(mdef->getBodyDef());
+ //mdec->setBodyMember(mdef);
+ }
+ mdec->mergeMemberSpecifiers(mdef->getMemberSpecifiers());
+ mdef->mergeMemberSpecifiers(mdec->getMemberSpecifiers());
+
+
+ // copy group info.
+ if (mdec->getGroupDef()==0 && mdef->getGroupDef()!=0)
+ {
+ mdec->setGroupDef(mdef->getGroupDef(),
+ mdef->getGroupPri(),
+ mdef->docFile(),
+ mdef->docLine(),
+ mdef->hasDocumentation(),
+ mdef
+ );
+ }
+ else if (mdef->getGroupDef()==0 && mdec->getGroupDef()!=0)
+ {
+ mdef->setGroupDef(mdec->getGroupDef(),
+ mdec->getGroupPri(),
+ mdec->docFile(),
+ mdec->docLine(),
+ mdec->hasDocumentation(),
+ mdec
+ );
+ }
+
+
+ mdec->mergeRefItems(mdef);
+ mdef->mergeRefItems(mdec);
+
+ mdef->setMemberDeclaration(mdec);
+ mdec->setMemberDefinition(mdef);
+
+ mdef->enableCallGraph(mdec->hasCallGraph() || mdef->hasCallGraph());
+ mdef->enableCallerGraph(mdec->hasCallerGraph() || mdef->hasCallerGraph());
+ mdec->enableCallGraph(mdec->hasCallGraph() || mdef->hasCallGraph());
+ mdec->enableCallerGraph(mdec->hasCallerGraph() || mdef->hasCallerGraph());
+ }
+ }
+}
+
diff --git a/src/memberdef.h b/src/memberdef.h
index a3c6dc7..8850035 100644
--- a/src/memberdef.h
+++ b/src/memberdef.h
@@ -68,6 +68,7 @@ class MemberDef : public Definition
~MemberDef();
DefType definitionType() const { return TypeMember; }
// move this member into a different scope
+ MemberDef *deepCopy() const;
void moveTo(Definition *);
//-----------------------------------------------------------------------------------
@@ -159,6 +160,10 @@ class MemberDef : public Definition
bool isSealed() const;
bool isImplementation() const;
bool isExternal() const;
+ bool isAlias() const;
+ bool isDefault() const;
+ bool isDelete() const;
+ bool isNoExcept() const;
bool isTemplateSpecialization() const;
bool hasDocumentedParams() const;
bool hasDocumentedReturnType() const;
@@ -196,6 +201,8 @@ class MemberDef : public Definition
bool isDocsForDefinition() const;
MemberDef *getEnumScope() const;
LockingPtr< MemberList > enumFieldList() const;
+ void setEnumBaseType(const QCString &type);
+ QCString enumBaseType() const;
bool hasExamples();
LockingPtr<ExampleSDict> getExamples() const;
@@ -235,6 +242,7 @@ class MemberDef : public Definition
MemberDef *getGroupAlias() const;
ClassDef *category() const;
+ MemberDef *categoryRelation() const;
QCString displayName(bool=TRUE) const;
@@ -334,6 +342,7 @@ class MemberDef : public Definition
void copyArgumentNames(MemberDef *bmd);
void setCategory(ClassDef *);
+ void setCategoryRelation(MemberDef *);
void setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace=TRUE);
void setBriefDescription(const char *b,const char *briefFile,int briefLine);
@@ -387,6 +396,7 @@ class MemberDef : public Definition
void _writeEnumValues(OutputList &ol,Definition *container,
const QCString &cfname,const QCString &ciname,
const QCString &cname);
+ void _writeCategoryRelation(OutputList &ol);
static int s_indentLevel;
// disable copying of member defs
@@ -406,4 +416,6 @@ class MemberDef : public Definition
uchar m_isDestructorCached; // 0 = not cached, 1=FALSE, 2=TRUE
};
+void combineDeclarationAndDefinition(MemberDef *mdec,MemberDef *mdef);
+
#endif
diff --git a/src/memberlist.cpp b/src/memberlist.cpp
index 327db76..2810be2 100644
--- a/src/memberlist.cpp
+++ b/src/memberlist.cpp
@@ -365,6 +365,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
ol.startMemberList();
first=FALSE;
}
+ ol.startMemberDeclaration();
ol.startMemberItem(md->anchor(),0,inheritId);
ol.writeString("enum ");
ol.insertMemberAlign();
@@ -391,6 +392,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
}
ol.endMemberDescription();
}
+ ol.endMemberDeclaration(md->anchor(),inheritId);
}
md->warnIfUndocumented();
break;
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index 6bbba31..36876db 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -389,6 +389,7 @@ void NamespaceDef::writeSummaryLinks(OutputList &ol)
LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace));
LayoutDocEntry *lde;
bool first=TRUE;
+ SrcLangExt lang = getLanguage();
for (eli.toFirst();(lde=eli.current());++eli)
{
if ((lde->kind()==LayoutDocEntry::NamespaceClasses && classSDict && classSDict->declVisible()) ||
@@ -397,7 +398,7 @@ void NamespaceDef::writeSummaryLinks(OutputList &ol)
{
LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
QCString label = lde->kind()==LayoutDocEntry::NamespaceClasses ? "nested-classes" : "namespaces";
- ol.writeSummaryLink(0,label,ls->title,first);
+ ol.writeSummaryLink(0,label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()== LayoutDocEntry::MemberDecl)
@@ -406,7 +407,7 @@ void NamespaceDef::writeSummaryLinks(OutputList &ol)
MemberList * ml = getMemberList(lmd->type);
if (ml && ml->declVisible())
{
- ol.writeSummaryLink(0,ml->listTypeAsString(),lmd->title,first);
+ ol.writeSummaryLink(0,ml->listTypeAsString(),lmd->title(lang),first);
first=FALSE;
}
}
@@ -489,13 +490,13 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
case LayoutDocEntry::NamespaceClasses:
{
LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
- writeClassDeclarations(ol,ls->title);
+ writeClassDeclarations(ol,ls->title(lang));
}
break;
case LayoutDocEntry::NamespaceNestedNamespaces:
{
LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
- writeNamespaceDeclarations(ol,ls->title);
+ writeNamespaceDeclarations(ol,ls->title(lang));
}
break;
case LayoutDocEntry::MemberGroups:
@@ -504,7 +505,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
case LayoutDocEntry::MemberDecl:
{
LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde;
- writeMemberDeclarations(ol,lmd->type,lmd->title);
+ writeMemberDeclarations(ol,lmd->type,lmd->title(lang));
}
break;
case LayoutDocEntry::MemberDeclEnd:
@@ -513,7 +514,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
case LayoutDocEntry::DetailedDesc:
{
LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
- writeDetailedDescription(ol,ls->title);
+ writeDetailedDescription(ol,ls->title(lang));
}
break;
case LayoutDocEntry::MemberDefStart:
@@ -525,7 +526,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
case LayoutDocEntry::MemberDef:
{
LayoutDocEntryMemberDef *lmd = (LayoutDocEntryMemberDef*)lde;
- writeMemberDocumentation(ol,lmd->type,lmd->title);
+ writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
}
break;
case LayoutDocEntry::MemberDefEnd:
@@ -852,6 +853,7 @@ void NamespaceSDict::writeDeclaration(OutputList &ol,const char *title,bool loca
if (nd->isLinkable())
{
SrcLangExt lang = nd->getLanguage();
+ ol.startMemberDeclaration();
ol.startMemberItem(nd->getOutputFileBase(),0);
if (lang==SrcLangExt_Java || lang==SrcLangExt_CSharp)
{
@@ -887,6 +889,7 @@ void NamespaceSDict::writeDeclaration(OutputList &ol,const char *title,bool loca
ol.parseDoc(nd->briefFile(),nd->briefLine(),nd,0,nd->briefDescription(),FALSE,FALSE,0,TRUE);
ol.endMemberDescription();
}
+ ol.endMemberDeclaration(0,0);
}
}
ol.endMemberList();
diff --git a/src/navtree.js b/src/navtree.js
index 4fb2c87..5549d7f 100644
--- a/src/navtree.js
+++ b/src/navtree.js
@@ -22,9 +22,15 @@ function stripPath2(uri)
function localStorageSupported()
{
- return 'localStorage' in window && window['localStorage'] !== null;
+ try {
+ return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem;
+ }
+ catch(e) {
+ return false;
+ }
}
+
function storeLink(link)
{
if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) {
@@ -411,16 +417,26 @@ function navTo(o,root,hash,relpath)
}
}
+function showSyncOff(n,relpath)
+{
+ n.html('<img src="'+relpath+'sync_off.png" title="'+SYNCOFFMSG+'"/>');
+}
+
+function showSyncOn(n,relpath)
+{
+ n.html('<img src="'+relpath+'sync_on.png"/ title="'+SYNCONMSG+'">');
+}
+
function toggleSyncButton(relpath)
{
var navSync = $('#nav-sync');
if (navSync.hasClass('sync')) {
navSync.removeClass('sync');
- navSync.html('<img src="'+relpath+'sync_off.png"/>');
+ showSyncOff(navSync,relpath);
storeLink(stripPath2($(location).attr('pathname'))+$(location).attr('hash'));
} else {
navSync.addClass('sync');
- navSync.html('<img src="'+relpath+'sync_on.png"/>');
+ showSyncOn(navSync,relpath);
deleteLink();
}
}
@@ -448,10 +464,10 @@ function initNavTree(toroot,relpath)
if (localStorageSupported()) {
var navSync = $('#nav-sync');
if (cachedLink()) {
- navSync.html('<img src="'+relpath+'sync_off.png"/>');
+ showSyncOff(navSync,relpath);
navSync.removeClass('sync');
} else {
- navSync.html('<img src="'+relpath+'sync_on.png"/>');
+ showSyncOn(navSync,relpath);
}
navSync.click(function(){ toggleSyncButton(relpath); });
}
diff --git a/src/navtree_js.h b/src/navtree_js.h
index fee88b3..aa57a13 100644
--- a/src/navtree_js.h
+++ b/src/navtree_js.h
@@ -22,9 +22,15 @@
"\n"
"function localStorageSupported()\n"
"{\n"
-" return 'localStorage' in window && window['localStorage'] !== null;\n"
+" try {\n"
+" return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem;\n"
+" }\n"
+" catch(e) {\n"
+" return false;\n"
+" }\n"
"}\n"
"\n"
+"\n"
"function storeLink(link)\n"
"{\n"
" if (!$(\"#nav-sync\").hasClass('sync') && localStorageSupported()) {\n"
@@ -411,16 +417,26 @@
" }\n"
"}\n"
"\n"
+"function showSyncOff(n,relpath)\n"
+"{\n"
+" n.html('<img src=\"'+relpath+'sync_off.png\" title=\"'+SYNCOFFMSG+'\"/>');\n"
+"}\n"
+"\n"
+"function showSyncOn(n,relpath)\n"
+"{\n"
+" n.html('<img src=\"'+relpath+'sync_on.png\"/ title=\"'+SYNCONMSG+'\">');\n"
+"}\n"
+"\n"
"function toggleSyncButton(relpath)\n"
"{\n"
" var navSync = $('#nav-sync');\n"
" if (navSync.hasClass('sync')) {\n"
" navSync.removeClass('sync');\n"
-" navSync.html('<img src=\"'+relpath+'sync_off.png\"/>');\n"
+" showSyncOff(navSync,relpath);\n"
" storeLink(stripPath2($(location).attr('pathname'))+$(location).attr('hash'));\n"
" } else {\n"
" navSync.addClass('sync');\n"
-" navSync.html('<img src=\"'+relpath+'sync_on.png\"/>');\n"
+" showSyncOn(navSync,relpath);\n"
" deleteLink();\n"
" }\n"
"}\n"
@@ -448,10 +464,10 @@
" if (localStorageSupported()) {\n"
" var navSync = $('#nav-sync');\n"
" if (cachedLink()) {\n"
-" navSync.html('<img src=\"'+relpath+'sync_off.png\"/>');\n"
+" showSyncOff(navSync,relpath);\n"
" navSync.removeClass('sync');\n"
" } else {\n"
-" navSync.html('<img src=\"'+relpath+'sync_on.png\"/>');\n"
+" showSyncOn(navSync,relpath);\n"
" }\n"
" navSync.click(function(){ toggleSyncButton(relpath); });\n"
" }\n"
diff --git a/src/outputgen.h b/src/outputgen.h
index 793f7d3..3bff797 100644
--- a/src/outputgen.h
+++ b/src/outputgen.h
@@ -97,8 +97,8 @@ class BaseOutputDocInterface : public CodeOutputInterface
Examples
};
- virtual void parseDoc(const char *,int, const char *,MemberDef *,
- const QCString &,bool) {}
+ //virtual void parseDoc(const char *,int, const char *,MemberDef *,
+ // const QCString &,bool) {}
virtual void parseText(const QCString &) {}
/*! Start of a bullet list: e.g. \c \<ul\> in html. startItemListItem() is
@@ -343,7 +343,7 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void startMemberItem(const char *,int,const char *) = 0;
virtual void endMemberItem() = 0;
virtual void startMemberTemplateParams() = 0;
- virtual void endMemberTemplateParams(const char *) = 0;
+ virtual void endMemberTemplateParams(const char *,const char *) = 0;
virtual void startMemberGroupHeader(bool) = 0;
virtual void endMemberGroupHeader() = 0;
virtual void startMemberGroupDocs() = 0;
@@ -364,6 +364,8 @@ 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 startMemberDeclaration() = 0;
+ virtual void endMemberDeclaration(const char *anchor,const char *inheritId) = 0;
virtual void writeInheritedSectionTitle(const char *id,const char *ref,
const char *file,const char *anchor,
const char *title,const char *name) = 0;
@@ -478,7 +480,7 @@ class OutputDocInterface : public BaseOutputDocInterface
/*! Enables a specific output format (useful for OutputList only) */
virtual void enable(OutputGenerator::OutputType o) = 0;
- /*! Check whether a specific output format is currenly enabled
+ /*! Check whether a specific output format is currently enabled
* (useful for OutputList only)
*/
virtual bool isEnabled(OutputGenerator::OutputType o) = 0;
diff --git a/src/outputlist.h b/src/outputlist.h
index be26f99..72662a5 100644
--- a/src/outputlist.h
+++ b/src/outputlist.h
@@ -213,8 +213,8 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::endMemberItem); }
void startMemberTemplateParams()
{ forall(&OutputGenerator::startMemberTemplateParams); }
- void endMemberTemplateParams(const char *anchor)
- { forall(&OutputGenerator::endMemberTemplateParams,anchor); }
+ void endMemberTemplateParams(const char *anchor,const char *inheritId)
+ { forall(&OutputGenerator::endMemberTemplateParams,anchor,inheritId); }
void startMemberGroupHeader(bool b)
{ forall(&OutputGenerator::startMemberGroupHeader,b); }
void endMemberGroupHeader()
@@ -305,6 +305,10 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startMemberDescription,anchor,inheritId); }
void endMemberDescription()
{ forall(&OutputGenerator::endMemberDescription); }
+ void startMemberDeclaration()
+ { forall(&OutputGenerator::startMemberDeclaration); }
+ void endMemberDeclaration(const char *anchor,const char *inheritId)
+ { forall(&OutputGenerator::endMemberDeclaration,anchor,inheritId); }
void writeInheritedSectionTitle(const char *id, const char *ref,
const char *file, const char *anchor,
const char *title,const char *name)
diff --git a/src/portable.cpp b/src/portable.cpp
index f2d1166..49f7bf1 100644
--- a/src/portable.cpp
+++ b/src/portable.cpp
@@ -49,7 +49,7 @@ int portable_system(const char *command,const char *args,bool commandHasConsole
#endif
#if !defined(_WIN32) || defined(__CYGWIN__)
- commandHasConsole=commandHasConsole;
+ (void)commandHasConsole;
/*! taken from the system() manpage on my Linux box */
int pid,status=0;
diff --git a/src/portable.h b/src/portable.h
index f698e32..de798dd 100644
--- a/src/portable.h
+++ b/src/portable.h
@@ -37,7 +37,7 @@ void portable_sleep(int ms);
extern "C" {
void * portable_iconv_open(const char* tocode, const char* fromcode);
- size_t portable_iconv (void *cd, const char** inbuf, size_t *inbytesleft,
+ size_t portable_iconv (void *cd, char** inbuf, size_t *inbytesleft,
char* * outbuf, size_t *outbytesleft);
int portable_iconv_close (void *cd);
}
diff --git a/src/portable_c.c b/src/portable_c.c
index ab33639..05bb4bd 100644
--- a/src/portable_c.c
+++ b/src/portable_c.c
@@ -11,8 +11,8 @@ void * portable_iconv_open(const char* tocode, const char* fromcode)
return iconv_open(tocode,fromcode);
}
-size_t portable_iconv (void *cd, const char** inbuf, size_t *inbytesleft,
- char** outbuf, size_t *outbytesleft)
+size_t portable_iconv (void *cd, char** inbuf, size_t *inbytesleft,
+ char** outbuf, size_t *outbytesleft)
{
return iconv((iconv_t)cd,inbuf,inbytesleft,outbuf,outbytesleft);
}
diff --git a/src/pycode.l b/src/pycode.l
index c2720cf..255e2f4 100644
--- a/src/pycode.l
+++ b/src/pycode.l
@@ -39,6 +39,7 @@
#include "searchindex.h"
#define YY_NEVER_INTERACTIVE 1
+#define YY_NO_INPUT 1
static ClassSDict g_codeClassSDict(17);
static QCString g_curClassName;
diff --git a/src/pyscanner.l b/src/pyscanner.l
index 93110cb..8c6c8ed 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -53,6 +53,7 @@
#include "arguments.h"
#define YY_NEVER_INTERACTIVE 1
+#define YY_NO_INPUT 1
/* -----------------------------------------------------------------
*
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index 63049a8..579f933 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -212,7 +212,7 @@ void RTFGenerator::beginRTFDocument()
t <<"{\\rtf1\\ansi\\ansicpg" << theTranslator->trRTFansicp();
t <<"\\uc1 \\deff0\\deflang1033\\deflangfe1033\n";
- DBG_RTF(t <<"{\\comment Begining font list}\n")
+ DBG_RTF(t <<"{\\comment Beginning font list}\n")
t <<"{\\fonttbl ";
t <<"{\\f0\\froman\\fcharset" << theTranslator->trRTFCharSet();
t <<"\\fprq2{\\*\\panose 02020603050405020304}Times New Roman;}\n";
@@ -1840,7 +1840,7 @@ void RTFGenerator::endClassDiagram(const ClassDiagram &d,
void RTFGenerator::startMemberItem(const char *,int,const char *)
{
DBG_RTF(t <<"{\\comment startMemberItem }" << endl)
- t << rtf_Style_Reset << rtf_BList_DepthStyle() << endl; // set style to apropriate depth
+ t << rtf_Style_Reset << rtf_BList_DepthStyle() << endl; // set style to appropriate depth
}
void RTFGenerator::endMemberItem()
@@ -2291,7 +2291,7 @@ static void encodeForOutput(FTextStream &t,const QCString &s)
{
size_t iLeft=l;
size_t oLeft=enc.size();
- const char *inputPtr = s.data();
+ char *inputPtr = s.data();
char *outputPtr = enc.data();
if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft))
{
@@ -2415,14 +2415,14 @@ void RTFGenerator::endDotGraph(const DotClassGraph &g)
{
newParagraph();
- QCString fileName =
+ QCString fn =
g.writeGraph(t,BITMAP,Config_getString("RTF_OUTPUT"),fileName,relPath,TRUE,FALSE);
// display the file
t << "{" << endl;
t << rtf_Style_Reset << endl;
t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
- t << fileName << "." << Config_getEnum("DOT_IMAGE_FORMAT");
+ t << fn << "." << Config_getEnum("DOT_IMAGE_FORMAT");
t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "}" << endl;
newParagraph();
@@ -2490,14 +2490,14 @@ void RTFGenerator::endDirDepGraph(const DotDirDeps &g)
{
newParagraph();
- QCString fileName = g.writeGraph(t,BITMAP,Config_getString("RTF_OUTPUT"),
+ QCString fn = g.writeGraph(t,BITMAP,Config_getString("RTF_OUTPUT"),
fileName,relPath,FALSE);
// display the file
t << "{" << endl;
t << rtf_Style_Reset << endl;
t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
- t << fileName << "." << Config_getEnum("DOT_IMAGE_FORMAT");
+ t << fn << "." << Config_getEnum("DOT_IMAGE_FORMAT");
t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "}" << endl;
DBG_RTF(t << "{\\comment (endDirDepGraph)}" << endl)
diff --git a/src/rtfgen.h b/src/rtfgen.h
index d93d77c..3ec4929 100644
--- a/src/rtfgen.h
+++ b/src/rtfgen.h
@@ -115,7 +115,7 @@ class RTFGenerator : public OutputGenerator
void startMemberItem(const char *,int,const char *);
void endMemberItem();
void startMemberTemplateParams() {}
- void endMemberTemplateParams(const char *) {}
+ void endMemberTemplateParams(const char *,const char *) {}
void insertMemberAlign(bool) {}
void writeRuler() { rtfwriteRuler_thin(); }
@@ -157,6 +157,8 @@ class RTFGenerator : public OutputGenerator
void startMemberDescription(const char *,const char *);
void endMemberDescription();
+ void startMemberDeclaration() {}
+ void endMemberDeclaration(const char *,const char *) {}
void writeInheritedSectionTitle(const char *,const char *,const char *,
const char *,const char *,const char *) {}
void startDescList(SectionTypes);
diff --git a/src/scanner.l b/src/scanner.l
index e819877..c494902 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -45,6 +45,7 @@
#include "arguments.h"
#define YY_NEVER_INTERACTIVE 1
+#define YY_NO_INPUT 1
/* -----------------------------------------------------------------
*
@@ -69,6 +70,7 @@ static int lastClassTemplSpecContext;
static int lastPreLineCtrlContext;
static int lastSkipVerbStringContext;
static int lastCommentInArgContext;
+static int lastRawStringContext;
static int lastCSConstraint;
static int lastHereDocContext;
static int lastDefineContext;
@@ -119,6 +121,7 @@ static bool insidePHP = FALSE; //!< processing PHP code?
static bool insideObjC = FALSE; //!< processing Objective C code?
static bool insideCli = FALSE; //!< processing C++/CLI code?
static bool insideJS = FALSE; //!< processing JavaScript code?
+static bool insideCpp = TRUE; //!< processing C/C++ code
static bool insideCppQuote = FALSE;
static bool insideProtocolList = FALSE;
@@ -137,11 +140,13 @@ static char lastCopyArgChar;
static QCString *pCopyQuotedString;
static QCString *pCopyRoundString;
static QCString *pCopyCurlyString;
+static QCString *pCopyRawString;
static QGString *pCopyCurlyGString;
static QGString *pCopyRoundGString;
static QGString *pCopyQuotedGString;
static QGString *pCopyHereDocGString;
+static QGString *pCopyRawGString;
static QGString *pSkipVerbString;
static QStack<Grouping> autoGroupStack;
@@ -177,7 +182,7 @@ static QCString idlProp;
static bool g_lexInit = FALSE;
static bool externC;
-static QCString g_hereDocId;
+static QCString g_delimiter;
static int g_column;
@@ -365,6 +370,7 @@ static void setContext()
insidePHP = language==SrcLangExt_PHP;
insideObjC = language==SrcLangExt_ObjC;
insideJS = language==SrcLangExt_JS;
+ insideCpp = language==SrcLangExt_Cpp;
if ( insidePHP )
{
useOverrideCommands = TRUE;
@@ -606,6 +612,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
IDLATTR ("["[^\]]*"]"){BN}*
TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
+RAWBEGIN (u|U|L|u8)?R\"[^ \t\(\)\\]{0,16}"("
+RAWEND ")"[^ \t\(\)\\]{0,16}\"
%option noyywrap
@@ -627,6 +635,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
%x BasesProt
%x NextSemi
%x BitFields
+%x EnumBaseType
%x FindMembers
%x FindMembersPHP
%x FindMemberName
@@ -637,12 +646,14 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
%x ExcpRound
%x ExcpList
%x FuncQual
+%x TrailingReturn
%x Operator
%x Array
%x ReadBody
%x ReadNSBody
%x ReadBodyIntf
%x Using
+%x UsingAlias
%x UsingDirective
%x SkipCurly
%x SkipCurlyCpp
@@ -661,6 +672,8 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
%x SkipRound
%x SkipSquare
%x SkipRemainder
+%x StaticAssert
+%x DeclType
%x TypedefName
%x TryFunctionBlock
%x TryFunctionBlockEnd
@@ -729,6 +742,8 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
%x HereDocEnd
%x CopyHereDoc
%x CopyHereDocEnd
+%x RawString
+%x RawGString
%x IDLAttribute
%x IDLProp
@@ -805,6 +820,11 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
unput(*yytext);
BEGIN( FindMembers );
}
+<EnumBaseType>[{;,] {
+ current->args = current->args.simplifyWhiteSpace();
+ unput(*yytext);
+ BEGIN( ClassVar );
+ }
<FindMembers>"<?php" { // PHP code with unsupported extension?
insidePHP = TRUE;
}
@@ -1758,29 +1778,6 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
aliasName.resize(0);
}
<PHPUse,PHPUseAs>[,;] {
- /*
- if (!aliasName.isEmpty())
- {
- int i=aliasName.findRev('\\');
- if (i!=-1)
- {
- QCString an = removeRedundantWhiteSpace(
- substitute(aliasName,"\\","::"));
- printf("PHP: adding use relation: %s->%s\n",aliasName.mid(i+1).data(),an.data());
- Doxygen::namespaceAliasDict.insert(aliasName.mid(i+1),
- new QCString(an));
- current->name = an;
- current->fileName = yyFileName;
- current->section=Entry::USINGDECL_SEC;
- current_root->addSubEntry(current);
- current = new Entry ;
- initEntry();
- }
- else if (i==0)
- {
- }
- }
- */
if (*yytext==',')
{
BEGIN(PHPUse);
@@ -1831,7 +1828,9 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
current->name=yytext;
current->fileName = yyFileName;
current->section=Entry::USINGDECL_SEC;
+ current->startLine = yyLineNr;
current_root->addSubEntry(current);
+ previous = current;
current = new Entry ;
if (insideCS) /* Hack: in C# a using declaration and
directive have the same syntax, so we
@@ -1848,6 +1847,26 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
initEntry();
BEGIN(Using);
}
+<Using>"=" { // C++11 style template alias?
+ BEGIN(UsingAlias);
+ }
+<UsingAlias>";" {
+ previous->section=Entry::VARIABLE_SEC;
+ previous->type = "typedef "+previous->args;
+ previous->type=previous->type.simplifyWhiteSpace();
+ previous->args.resize(0);
+ previous->name=previous->name.stripWhiteSpace();
+ previous->bodyLine = yyLineNr;
+ previous->spec |= Entry::Alias;
+ BEGIN(FindMembers);
+ }
+<UsingAlias>. {
+ previous->args+=yytext;
+ }
+<UsingAlias>\n {
+ previous->args+=yytext;
+ lineCount();
+ }
<UsingDirective>{SCOPENAME} { current->name=removeRedundantWhiteSpace(yytext);
current->fileName = yyFileName;
current->section=Entry::USINGDIR_SEC;
@@ -1979,25 +1998,25 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
REJECT;
}
<CopyHereDoc>{ID} { // PHP heredoc
- g_hereDocId = yytext;
+ g_delimiter = yytext;
*pCopyHereDocGString += yytext;
BEGIN(CopyHereDocEnd);
}
<CopyHereDoc>"'"{ID}/"'" { // PHP nowdoc
- g_hereDocId = &yytext[1];
+ g_delimiter = &yytext[1];
*pCopyHereDocGString += yytext;
BEGIN(CopyHereDocEnd);
}
<HereDoc>{ID} { // PHP heredoc
- g_hereDocId = yytext;
+ g_delimiter = yytext;
BEGIN(HereDocEnd);
}
<HereDoc>"'"{ID}/"'" { // PHP nowdoc
- g_hereDocId = &yytext[1];
+ g_delimiter = &yytext[1];
BEGIN(HereDocEnd);
}
<HereDocEnd>^{ID} { // id at start of the line could mark the end of the block
- if (g_hereDocId==yytext) // it is the end marker
+ if (g_delimiter==yytext) // it is the end marker
{
BEGIN(lastHereDocContext);
}
@@ -2005,7 +2024,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
<HereDocEnd>. { }
<CopyHereDocEnd>^{ID} { // id at start of the line could mark the end of the block
*pCopyHereDocGString += yytext;
- if (g_hereDocId==yytext) // it is the end marker
+ if (g_delimiter==yytext) // it is the end marker
{
BEGIN(lastHereDocContext);
}
@@ -2116,6 +2135,17 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
current->name="this";
BEGIN(CSIndexer);
}
+ else if (insideCpp && strcmp(yytext,"static_assert")==0)
+ {
+ // C++11 static_assert
+ BEGIN(StaticAssert);
+ }
+ else if (insideCpp && strcmp(yytext,"decltype")==0)
+ {
+ // C++11 decltype(x)
+ current->type+=yytext;
+ BEGIN(DeclType);
+ }
else
{
if (YY_START==FindMembers)
@@ -2194,6 +2224,28 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
}
}
}
+<StaticAssert>"(" {
+ lastSkipRoundContext = FindMembers;
+ roundCount=1;
+ BEGIN(SkipRound);
+ }
+<StaticAssert>{BN}+ { lineCount(); }
+<StaticAssert>. { // variable with static_assert as name?
+ unput(*yytext);
+ BEGIN(FindMembers);
+ }
+<DeclType>"(" {
+ current->type+=yytext;
+ lastRoundContext=FindMembers;
+ pCopyRoundString=&current->type;
+ roundCount=0;
+ BEGIN(CopyRound);
+ }
+<DeclType>{BN}+ { lineCount(); }
+<DeclType>. {
+ unput(*yytext);
+ BEGIN(FindMembers);
+ }
<CSIndexer>"["[^\n\]]*"]" {
current->name+=removeRedundantWhiteSpace(yytext);
BEGIN(FindMembers);
@@ -2392,7 +2444,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
current->name += yytext ;
addType( current );
}
-<FindMembers,MemberSpec,Function,NextSemi,BitFields,ReadInitializer,OldStyleArgs>";"{BN}*("/**"|"//!"|"/*!"|"///")"<" {
+<FindMembers,MemberSpec,Function,NextSemi,EnumBaseType,BitFields,ReadInitializer,OldStyleArgs>";"{BN}*("/**"|"//!"|"/*!"|"///")"<" {
lineCount();
if (current->bodyLine==-1)
{
@@ -2404,6 +2456,12 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
( yytext[yyleng-2]=='!' && Config_getBool("QT_AUTOBRIEF") );
docBlock.resize(0);
docBlockTerm = ';';
+ if (YY_START==EnumBaseType && current->section==Entry::ENUM_SEC)
+ {
+ current->bitfields = ":"+current->args;
+ current->args.resize(0);
+ current->section=Entry::VARIABLE_SEC;
+ }
if (yytext[yyleng-3]=='/')
{
startCommentBlock(TRUE);
@@ -2415,7 +2473,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
BEGIN( DocBlock );
}
}
-<MemberSpec,FindFields,FindMembers,NextSemi,BitFields,ReadInitializer,OldStyleArgs>","{BN}*("/**"|"//!"|"/*!"|"///")"<" {
+<MemberSpec,FindFields,FindMembers,NextSemi,EnumBaseType,BitFields,ReadInitializer,OldStyleArgs>","{BN}*("/**"|"//!"|"/*!"|"///")"<" {
lineCount();
docBlockContext = YY_START;
docBlockInBody = FALSE;
@@ -2423,6 +2481,12 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
( yytext[yyleng-2]=='!' && Config_getBool("QT_AUTOBRIEF") );
docBlock.resize(0);
docBlockTerm = ',';
+ if (YY_START==EnumBaseType && current->section==Entry::ENUM_SEC)
+ {
+ current->bitfields = ":"+current->args;
+ current->args.resize(0);
+ current->section=Entry::VARIABLE_SEC;
+ }
if (yytext[yyleng-3]=='/')
{
startCommentBlock(TRUE);
@@ -2515,6 +2579,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
}
<FindMembers>"=" { // in PHP code this could also be due to "<?="
current->bodyLine = yyLineNr;
+ current->initializer = yytext;
lastInitializerContext = YY_START;
initBracketCount=0;
BEGIN(ReadInitializer);
@@ -2563,6 +2628,66 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
current->initializer+=*yytext;
}
}
+<ReadInitializer>{RAWBEGIN} { // C++11 raw string
+ if (!insideCpp)
+ {
+ REJECT;
+ }
+ else
+ {
+ QCString text=yytext;
+ current->initializer+=text;
+ int i=text.find('"');
+ g_delimiter = yytext+i+1;
+ g_delimiter=g_delimiter.left(g_delimiter.length()-1);
+ lastRawStringContext = YY_START;
+ pCopyRawGString = &current->initializer;
+ BEGIN(RawGString);
+ //printf("RawGString delimiter='%s'\n",delimiter.data());
+ }
+ }
+<RawGString>{RAWEND} {
+ *pCopyRawGString+=yytext;
+ QCString delimiter = yytext+1;
+ delimiter=delimiter.left(delimiter.length()-1);
+ if (delimiter==g_delimiter)
+ {
+ BEGIN(lastRawStringContext);
+ }
+ }
+<RawGString>[^)]+ {
+ *pCopyRawGString+=yytext;
+ }
+<RawGString>. {
+ *pCopyRawGString+=yytext;
+ }
+<RawGString>\n {
+ *pCopyRawGString+=yytext;
+ lineCount();
+ }
+<RawString>{RAWEND} {
+ *pCopyRawString+=yytext;
+ fullArgString+=yytext;
+ QCString delimiter = yytext+1;
+ delimiter=delimiter.left(delimiter.length()-1);
+ if (delimiter==g_delimiter)
+ {
+ BEGIN(lastRawStringContext);
+ }
+ }
+<RawString>[^)]+ {
+ *pCopyRawString+=yytext;
+ fullArgString+=yytext;
+ }
+<RawString>. {
+ *pCopyRawString+=yytext;
+ fullArgString+=yytext;
+ }
+<RawString>\n {
+ *pCopyRawString+=yytext;
+ fullArgString+=yytext;
+ lineCount();
+ }
<ReadInitializer>\" {
if (insideIDL && insideCppQuote)
{
@@ -2571,7 +2696,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
else
{
lastStringContext=YY_START;
- current->initializer=yytext;
+ current->initializer+=yytext;
pCopyQuotedGString=&current->initializer;
BEGIN(CopyGString);
}
@@ -2928,8 +3053,14 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
<BitFields>. {
current->bitfields+=*yytext;
}
+<EnumBaseType>. {
+ current->args+=*yytext;
+ }
+<EnumBaseType>\n {
+ lineCount();
+ }
<FindMembers>[;,] {
- QCString oldType = current->type.copy();
+ QCString oldType = current->type;
if (current->bodyLine==-1)
{
current->bodyLine = yyLineNr;
@@ -3145,11 +3276,13 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
unput('(');
lastInitializerContext = YY_START;
initBracketCount=0;
+ current->initializer = "=";
BEGIN(ReadInitializer);
}
<FindFields>"=" {
lastInitializerContext = YY_START;
initBracketCount=0;
+ current->initializer = yytext;
BEGIN(ReadInitializer);
}
<FindFields>";" {
@@ -3347,7 +3480,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
}
else
{
- if (!isTypedef && cn.find('@')==-1) // not typedef or unnamed struct
+ if (!isTypedef) // not typedef
{
// enabled the next two lines for bug 623424
current->doc.resize(0);
@@ -3538,6 +3671,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
varEntry->doc = current->doc.copy();
varEntry->brief = current->brief.copy();
varEntry->mGrpId = current->mGrpId;
+ varEntry->initializer = current->initializer;
// deep copy group list
QListIterator<Grouping> gli(*current->groups);
@@ -3595,6 +3729,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
<MemberSpec>"=" {
lastInitializerContext=YY_START;
initBracketCount=0;
+ current->initializer = yytext;
BEGIN(ReadInitializer);
/* BEGIN(MemberSpecSkip); */
}
@@ -3818,6 +3953,15 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
fullArgString+=" ";
lineCount();
}
+<ReadFuncArgType,CopyArgRound,CopyArgSharp,ReadTempArgs>{RAWBEGIN} {
+ g_delimiter = yytext+2;
+ g_delimiter=g_delimiter.left(g_delimiter.length()-1);
+ lastRawStringContext = YY_START;
+ pCopyRawString = copyArgString;
+ *pCopyRawString+=yytext;
+ fullArgString+=yytext;
+ BEGIN(RawString);
+ }
<ReadFuncArgType,CopyArgRound,CopyArgSharp,ReadTempArgs>\" {
*copyArgString+=*yytext;
fullArgString+=*yytext;
@@ -4115,10 +4259,17 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
current->virt = Pure;
current->args += " override ";
}
-<FuncQual>{BN}*"override"{BN}* { // overridden virtual member function
+<FuncQual,TrailingReturn>{BN}*"override"{BN}* { // C++11 overridden virtual member function
lineCount() ;
current->spec |= Entry::Override;
current->args += " override ";
+ BEGIN(FuncQual);
+ }
+<FuncQual,TrailingReturn>{BN}*"final"{BN}* { // C++11 final method
+ lineCount() ;
+ current->spec |= Entry::Final;
+ current->args += " final ";
+ BEGIN(FuncQual);
}
<FuncQual>{BN}*"sealed"{BN}* { // sealed member function
lineCount() ;
@@ -4140,12 +4291,49 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
current->args += " volatile ";
current->argList->volatileSpecifier=TRUE;
}
-<FuncQual>{BN}*"="{BN}*"0"{BN}* { // pure virtual member function
+<FuncQual>{BN}*"noexcept"{BN}* { // volatile member function
+ lineCount() ;
+ current->args += " noexcept ";
+ current->spec |= Entry::NoExcept;
+ }
+<FuncQual,TrailingReturn>{BN}*"="{BN}*"0"{BN}* { // pure virtual member function
lineCount() ;
current->args += " = 0";
current->virt = Pure;
current->argList->pureSpecifier=TRUE;
+ BEGIN(FuncQual);
}
+<FuncQual,TrailingReturn>{BN}*"="{BN}*"delete"{BN}* { // C++11 explicitly delete member
+ lineCount();
+ current->args += " = delete";
+ current->spec |= Entry::Delete;
+ BEGIN(FuncQual);
+ }
+<FuncQual,TrailingReturn>{BN}*"="{BN}*"default"{BN}* { // C++11 explicitly defaulted constructor/assignment operator
+ lineCount();
+ current->args += " = default";
+ current->spec |= Entry::Default;
+ BEGIN(FuncQual);
+ }
+<FuncQual>{BN}*"->"{BN}* {
+ lineCount();
+ current->argList->trailingReturnType = " -> ";
+ current->args += " -> ";
+ BEGIN(TrailingReturn);
+ }
+<TrailingReturn>[{;] {
+ unput(*yytext);
+ BEGIN(FuncQual);
+ }
+<TrailingReturn>. {
+ current->argList->trailingReturnType+=yytext;
+ current->args+=yytext;
+ }
+<TrailingReturn>\n {
+ lineCount();
+ current->argList->trailingReturnType+=yytext;
+ current->args+=' ';
+ }
<FuncRound,FuncFunc>{BN}*","{BN}* {
lineCount() ;
current->args += ", " ;
@@ -4171,6 +4359,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
// typically an initialized function pointer
lastInitializerContext=YY_START;
initBracketCount=0;
+ current->initializer = yytext;
BEGIN(ReadInitializer);
}
}
@@ -4463,7 +4652,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
}
}
}
-<SkipInits>"{" {
+<SkipInits>"{" { // C++11 style initializer
//addToBody(yytext);
//lastCurlyContext = FindMembers;
//curlyCount=0;
@@ -4751,6 +4940,17 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
current->name += yytext;
}
<CompoundName>{SCOPENAME}{BN}*";" { // forward declaration
+ if (current->tArgLists && current->tArgLists->count()>0)
+ {
+ // found a forward template declaration, this has
+ // a purpose of its own
+ current->name = yytext;
+ current->name=current->name.left(current->name.length()-1).stripWhiteSpace();
+ //printf("template class declaration for %s!\n",current->name.data());
+ current_root->addSubEntry(current);
+ current = new Entry;
+ }
+
unput(';');
current->reset();
initEntry();
@@ -4859,14 +5059,18 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
lastCSConstraint = YY_START;
BEGIN( CSConstraintName );
}
- else if (insideCli && strcmp(yytext,"abstract"))
+ else if (insideCli && strcmp(yytext,"abstract")==0)
{
current->spec|=Entry::Abstract;
}
- else if (insideCli && strcmp(yytext,"sealed"))
+ else if (insideCli && strcmp(yytext,"sealed")==0)
{
current->spec|=Entry::Sealed;
}
+ else if (strcmp(yytext,"final")==0)
+ {
+ current->spec|=Entry::Final;
+ }
else
{
if (current->section == Entry::ENUM_SEC)
@@ -4957,6 +5161,14 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
<ClassCategory>{ID} {
current->name+=yytext;
}
+<ClassCategory>")"/{BN}*"{" {
+ current->name+=')';
+ BEGIN( ClassVar );
+ }
+<ClassCategory>")"/{BN}*"<" {
+ current->name+=')';
+ BEGIN( ObjCProtocolList );
+ }
<ClassCategory>")" {
current->name+=')';
if ((current->section & Entry::Protocol) ||
@@ -4972,10 +5184,11 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
BEGIN( ClassVar );
}
<ClassVar>":" {
- if (current->section == Entry::VARIABLE_SEC) // enum a b:2, see bug 313527
+ if (current->section==Entry::ENUM_SEC) // enum E:2, see bug 313527,
+ // or C++11 style enum: 'E : unsigned int {...}'
{
- BEGIN(BitFields);
- current->bitfields+=":";
+ current->args.resize(0);
+ BEGIN(EnumBaseType);
}
else
{
@@ -5478,13 +5691,21 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
}
else
{
- needsSemi = TRUE;
- current->type.resize(0);
- current->name.resize(0);
- current->args.resize(0);
- current->argList->clear();
- curlyCount=0;
- BEGIN( SkipCurlyBlock );
+ // pre C++11 code -> ignore the initializer
+ //needsSemi = TRUE;
+ //current->type.resize(0);
+ //current->name.resize(0);
+ //current->args.resize(0);
+ //current->argList->clear();
+ //curlyCount=0;
+ //BEGIN( SkipCurlyBlock );
+
+ // C++11 style initializer list
+ current->bodyLine = yyLineNr;
+ current->initializer = yytext;
+ lastInitializerContext = YY_START;
+ initBracketCount=1;
+ BEGIN(ReadInitializer);
}
}
}
diff --git a/src/tclscanner.l b/src/tclscanner.l
index 0749012..7db791a 100644
--- a/src/tclscanner.l
+++ b/src/tclscanner.l
@@ -49,6 +49,7 @@
#include "arguments.h"
#define YY_NEVER_INTERACTIVE 1
+#define YY_NO_INPUT 1
#define MAX_INCLUDE_DEPTH 10
diff --git a/src/translator.h b/src/translator.h
index 7b0e571..f89f771 100644
--- a/src/translator.h
+++ b/src/translator.h
@@ -518,6 +518,18 @@ class Translator
virtual QCString trInheritedFrom(const char *members,const char *what) = 0;
virtual QCString trAdditionalInheritedMembers() = 0;
+//////////////////////////////////////////////////////////////////////////
+// new since 1.8.2
+//////////////////////////////////////////////////////////////////////////
+
+ virtual QCString trPanelSynchronisationTooltip(bool enable) = 0;
+ virtual QCString trProvidedByCategory() = 0;
+ virtual QCString trExtendsClass() = 0;
+ virtual QCString trClassMethods() = 0;
+ virtual QCString trInstanceMethods() = 0;
+ virtual QCString trMethodDocumentation() = 0;
+ virtual QCString trDesignOverview() = 0;
+
};
#endif
diff --git a/src/translator_adapter.h b/src/translator_adapter.h
index f58c25d..adfcdf8 100644
--- a/src/translator_adapter.h
+++ b/src/translator_adapter.h
@@ -40,10 +40,39 @@ class TranslatorAdapterBase : public Translator
};
+class TranslatorAdapter_1_8_2 : public TranslatorAdapterBase
+{
+ public:
+ virtual QCString updateNeededMessage()
+ { return createUpdateNeededMessage(idLanguage(),"release 1.8.2"); }
+
+ virtual QCString trPanelSynchronisationTooltip(bool enable)
+ { return english.trPanelSynchronisationTooltip(enable); }
+
+ virtual QCString trProvidedByCategory()
+ { return english.trProvidedByCategory(); }
+
+ virtual QCString trExtendsClass()
+ { return english.trExtendsClass(); }
+
+ virtual QCString trClassMethods()
+ { return english.trClassMethods(); }
+
+ virtual QCString trInstanceMethods()
+ { return english.trInstanceMethods(); }
+
+ virtual QCString trMethodDocumentation()
+ { return english.trMethodDocumentation(); }
+
+ virtual QCString trDesignOverview()
+ { return english.trDesignOverview(); }
+};
+
+
/** Adapter class for languages that only contain translations upto
* version 1.8.0.
*/
-class TranslatorAdapter_1_8_0 : public TranslatorAdapterBase
+class TranslatorAdapter_1_8_0 : public TranslatorAdapter_1_8_2
{
public:
virtual QCString updateNeededMessage()
diff --git a/src/translator_cn.h b/src/translator_cn.h
index 103dd00..94a40dc 100644
--- a/src/translator_cn.h
+++ b/src/translator_cn.h
@@ -24,7 +24,7 @@
*/
#define CN_SPC " "
-class TranslatorChinese : public Translator
+class TranslatorChinese : public TranslatorAdapter_1_8_2
{
public:
/*! Used for identification of the language. The identification
diff --git a/src/translator_cz.h b/src/translator_cz.h
index 77675f9..ecff92d 100644
--- a/src/translator_cz.h
+++ b/src/translator_cz.h
@@ -83,7 +83,7 @@
// something else. It is difficult to find the general translation
// for all kinds in the Czech language.
-class TranslatorCzech : public Translator
+class TranslatorCzech : public TranslatorAdapter_1_8_2
{
public:
// --- Language control methods -------------------
diff --git a/src/translator_de.h b/src/translator_de.h
index 28e70fe..4f75879 100644
--- a/src/translator_de.h
+++ b/src/translator_de.h
@@ -133,7 +133,7 @@
#ifndef TRANSLATOR_DE_H
#define TRANSLATOR_DE_H
-class TranslatorGerman : public Translator
+class TranslatorGerman : public TranslatorAdapter_1_8_2
{
public:
diff --git a/src/translator_en.h b/src/translator_en.h
index 76b03a7..bc51760 100644
--- a/src/translator_en.h
+++ b/src/translator_en.h
@@ -1925,6 +1925,69 @@ class TranslatorEnglish : public Translator
{ return "Additional Inherited Members"; }
//////////////////////////////////////////////////////////////////////////
+// new since 1.8.2
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a tooltip for the toggle button that appears in the
+ * navigation tree in the HTML output when GENERATE_TREEVIEW is
+ * enabled. This tooltip explains the meaning of the button.
+ */
+ virtual QCString trPanelSynchronisationTooltip(bool enable)
+ {
+ QCString opt = enable ? "enable" : "disable";
+ return "click to "+opt+" panel synchronisation";
+ }
+
+ /*! Used in a method of an Objective-C class that is declared in a
+ * a category. Note that the @1 marker is required and is replaced
+ * by a link.
+ */
+ virtual QCString trProvidedByCategory()
+ {
+ return "Provided by category @1.";
+ }
+
+ /*! Used in a method of an Objective-C category that extends a class.
+ * Note that the @1 marker is required and is replaced by a link to
+ * the class method.
+ */
+ virtual QCString trExtendsClass()
+ {
+ return "Extends class @1.";
+ }
+
+ /*! Used as the header of a list of class methods in Objective-C.
+ * These are similar to static public member functions in C++.
+ */
+ virtual QCString trClassMethods()
+ {
+ return "Class Methods";
+ }
+
+ /*! Used as the header of a list of instance methods in Objective-C.
+ * These are similar to public member functions in C++.
+ */
+ virtual QCString trInstanceMethods()
+ {
+ return "Instance Methods";
+ }
+
+ /*! Used as the header of the member functions of an Objective-C class.
+ */
+ virtual QCString trMethodDocumentation()
+ {
+ return "Method Documentation";
+ }
+
+ /*! Used as the title of the design overview picture created for the
+ * VHDL output.
+ */
+ virtual QCString trDesignOverview()
+ {
+ return "Design Overview";
+ }
+
+//////////////////////////////////////////////////////////////////////////
};
diff --git a/src/translator_eo.h b/src/translator_eo.h
index be6f24d..65e495a 100644
--- a/src/translator_eo.h
+++ b/src/translator_eo.h
@@ -42,7 +42,7 @@
Translator class (by the local maintainer) when the localized
translator is made up-to-date again.
*/
-class TranslatorEsperanto : public Translator
+class TranslatorEsperanto : public TranslatorAdapter_1_8_2
{
public:
diff --git a/src/translator_es.h b/src/translator_es.h
index 42c3f5b..eb34b52 100644
--- a/src/translator_es.h
+++ b/src/translator_es.h
@@ -33,7 +33,7 @@
*/
-class TranslatorSpanish : public Translator
+class TranslatorSpanish : public TranslatorAdapter_1_8_2
{
public:
diff --git a/src/translator_hr.h b/src/translator_hr.h
index 8e8a46e..6c22919 100644
--- a/src/translator_hr.h
+++ b/src/translator_hr.h
@@ -83,7 +83,7 @@
#ifndef TRANSLATOR_HR_H
#define TRANSLATOR_HR_H
-class TranslatorCroatian : public Translator
+class TranslatorCroatian : public TranslatorAdapter_1_8_2
{
private:
diff --git a/src/translator_it.h b/src/translator_it.h
index bc3cad8..701c7ec 100644
--- a/src/translator_it.h
+++ b/src/translator_it.h
@@ -85,7 +85,7 @@
#ifndef TRANSLATOR_IT_H
#define TRANSLATOR_IT_H
-class TranslatorItalian : public Translator
+class TranslatorItalian : public TranslatorAdapter_1_8_2
{
public:
diff --git a/src/translator_jp.h b/src/translator_jp.h
index 1ba24bc..8278abe 100644
--- a/src/translator_jp.h
+++ b/src/translator_jp.h
@@ -1215,10 +1215,8 @@ class TranslatorJapanese : public TranslatorAdapter_1_6_0
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trClass(bool first_capital, bool singular)
+ virtual QCString trClass(bool /*first_capital*/, bool /*singular*/)
{
- first_capital = first_capital;
- singular = singular;
QCString result(decode("クラス"));
return result;
}
@@ -1227,10 +1225,8 @@ class TranslatorJapanese : public TranslatorAdapter_1_6_0
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trFile(bool first_capital, bool singular)
+ virtual QCString trFile(bool /*first_capital*/, bool /*singular*/)
{
- first_capital = first_capital;
- singular = singular;
QCString result(decode("ファイル"));
return result;
}
@@ -1239,10 +1235,8 @@ class TranslatorJapanese : public TranslatorAdapter_1_6_0
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trNamespace(bool first_capital, bool singular)
+ virtual QCString trNamespace(bool /*first_capital*/, bool /*singular*/)
{
- first_capital = first_capital;
- singular = singular;
QCString result(decode("ネームスペース"));
return result;
}
@@ -1251,10 +1245,8 @@ class TranslatorJapanese : public TranslatorAdapter_1_6_0
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trGroup(bool first_capital, bool singular)
+ virtual QCString trGroup(bool /*first_capital*/, bool /*singular*/)
{
- first_capital = first_capital;
- singular = singular;
QCString result(decode("グループ"));
return result;
}
@@ -1263,10 +1255,8 @@ class TranslatorJapanese : public TranslatorAdapter_1_6_0
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trPage(bool first_capital, bool singular)
+ virtual QCString trPage(bool /*first_capital*/, bool /*singular*/)
{
- first_capital = first_capital;
- singular = singular;
QCString result(decode("ページ"));
return result;
}
@@ -1275,10 +1265,8 @@ class TranslatorJapanese : public TranslatorAdapter_1_6_0
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trMember(bool first_capital, bool singular)
+ virtual QCString trMember(bool /*first_capital*/, bool /*singular*/)
{
- first_capital = first_capital;
- singular = singular;
QCString result(decode("メンバ"));
return result;
}
@@ -1287,10 +1275,8 @@ class TranslatorJapanese : public TranslatorAdapter_1_6_0
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trField(bool first_capital, bool singular)
+ virtual QCString trField(bool /*first_capital*/, bool /*singular*/)
{
- first_capital = first_capital;
- singular = singular;
QCString result(decode("フィールド"));
return result;
}
@@ -1299,10 +1285,8 @@ class TranslatorJapanese : public TranslatorAdapter_1_6_0
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trGlobal(bool first_capital, bool singular)
+ virtual QCString trGlobal(bool /*first_capital*/, bool /*singular*/)
{
- first_capital = first_capital;
- singular = singular;
QCString result(decode("グローバル"));
return result;
}
@@ -1313,10 +1297,8 @@ class TranslatorJapanese : public TranslatorAdapter_1_6_0
/*! This text is generated when the \\author command is used and
* for the author section in man pages. */
- virtual QCString trAuthor(bool first_capital, bool singular)
+ virtual QCString trAuthor(bool /*first_capital*/, bool /*singular*/)
{
- first_capital = first_capital;
- singular = singular;
QCString result(decode("作者"));
return result;
}
diff --git a/src/translator_nl.h b/src/translator_nl.h
index b966760..db724db 100644
--- a/src/translator_nl.h
+++ b/src/translator_nl.h
@@ -1507,6 +1507,68 @@ class TranslatorDutch : public Translator
virtual QCString trAdditionalInheritedMembers()
{ return "Additionele Overge&euml;rfde Members"; }
+//////////////////////////////////////////////////////////////////////////
+// new since 1.8.2
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a tooltip for the toggle button that appears in the
+ * navigation tree in the HTML output when GENERATE_TREEVIEW is
+ * enabled. This tooltip explains the meaning of the button.
+ */
+ virtual QCString trPanelSynchronisationTooltip(bool enable)
+ {
+ QCString opt = enable ? "in" : "uit";
+ return "klik hier de paneel synchronisatie "+opt+" the schakelen";
+ }
+
+ /*! Used in a method of an Objective-C class that is declared in a
+ * a category. Note that the @1 marker is required and is replaced
+ * by a link.
+ */
+ virtual QCString trProvidedByCategory()
+ {
+ return "Wordt aangeboden door category @1.";
+ }
+
+ /*! Used in a method of an Objective-C category that extends a class.
+ * Note that the @1 marker is required and is replaced by a link to
+ * the class method.
+ */
+ virtual QCString trExtendsClass()
+ {
+ return "Uitbereiding van klasse @1.";
+ }
+
+ /*! Used as the header of a list of class methods in Objective-C.
+ * These are similar to static public member functions in C++.
+ */
+ virtual QCString trClassMethods()
+ {
+ return "Klasse Methoden";
+ }
+
+ /*! Used as the header of a list of instance methods in Objective-C.
+ * These are similar to public member functions in C++.
+ */
+ virtual QCString trInstanceMethods()
+ {
+ return "Instantie Methoden";
+ }
+
+ /*! Used as the header of the member functions of an Objective-C class.
+ */
+ virtual QCString trMethodDocumentation()
+ {
+ return "Methode Documentatie";
+ }
+
+ /*! Used as the title of the design overview picture created for the
+ * VHDL output.
+ */
+ virtual QCString trDesignOverview()
+ {
+ return "Ontwerp Overzicht";
+ }
};
#endif
diff --git a/src/translator_pl.h b/src/translator_pl.h
index 2e7bf05..a6e25c2 100644
--- a/src/translator_pl.h
+++ b/src/translator_pl.h
@@ -22,7 +22,7 @@
#ifndef TRANSLATOR_PL_H
#define TRANSLATOR_PL_H
-class TranslatorPolish : public Translator
+class TranslatorPolish : public TranslatorAdapter_1_8_2
{
public:
diff --git a/src/translator_sk.h b/src/translator_sk.h
index 19d5358..162a32d 100644
--- a/src/translator_sk.h
+++ b/src/translator_sk.h
@@ -30,7 +30,7 @@
#ifndef TRANSLATOR_SK_H
#define TRANSLATOR_SK_H
-class TranslatorSlovak : public Translator
+class TranslatorSlovak : public TranslatorAdapter_1_8_2
{
public:
// --- Language control methods -------------------
diff --git a/src/translatordecoder.h b/src/translatordecoder.h
index 1e22244..bf22df1 100644
--- a/src/translatordecoder.h
+++ b/src/translatordecoder.h
@@ -66,7 +66,7 @@ class TranslatorDecoder : public Translator
QCString output(oSize);
size_t iLeft = iSize;
size_t oLeft = oSize;
- const char *iPtr = s.data();
+ char *iPtr = s.data();
char *oPtr = output.data();
if (!portable_iconv(cd,&iPtr,&iLeft,&oPtr,&oLeft))
{
@@ -769,6 +769,24 @@ class TranslatorDecoder : public Translator
QCString trAdditionalInheritedMembers()
{ return toUtf8(m_translator->trAdditionalInheritedMembers()); }
+//////////////////////////////////////////////////////////////////////////
+// new since 1.8.2
+//////////////////////////////////////////////////////////////////////////
+
+ QCString trPanelSynchronisationTooltip(bool enable)
+ { return toUtf8(m_translator->trPanelSynchronisationTooltip(enable)); }
+ QCString trProvidedByCategory()
+ { return toUtf8(m_translator->trProvidedByCategory()); }
+ QCString trExtendsClass()
+ { return toUtf8(m_translator->trExtendsClass()); }
+ QCString trClassMethods()
+ { return toUtf8(m_translator->trClassMethods()); }
+ QCString trInstanceMethods()
+ { return toUtf8(m_translator->trInstanceMethods()); }
+ QCString trMethodDocumentation()
+ { return toUtf8(m_translator->trMethodDocumentation()); }
+ QCString trDesignOverview()
+ { return toUtf8(m_translator->trDesignOverview()); }
//////////////////////////////////////////////////////////////////////////
private:
diff --git a/src/util.cpp b/src/util.cpp
index b77b32c..2546d47 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -1749,11 +1749,13 @@ nextChar:
vsp=0;
}
else if (!isspace((uchar)c) || // not a space
- ( i>0 && i<l-1 && // internal character
- (isId(s.at(i-1)) || s.at(i-1)==')' || s.at(i-1)==',' || s.at(i-1)=='>' || s.at(i-1)==']')
- && (isId(s.at(i+1)) || (i<l-2 && s.at(i+1)=='$' && isId(s.at(i+2)))
- || (i<l-3 && s.at(i+1)=='&' && s.at(i+2)=='$' && isId(s.at(i+3))))
- )
+ ( i>0 && i<l-1 && // internal character
+ (isId(s.at(i-1)) || s.at(i-1)==')' || s.at(i-1)==',' || s.at(i-1)=='>' || s.at(i-1)==']') &&
+ (isId(s.at(i+1)) ||
+ (i<l-2 && s.at(i+1)=='$' && isId(s.at(i+2))) ||
+ (i<l-3 && s.at(i+1)=='&' && s.at(i+2)=='$' && isId(s.at(i+3)))
+ )
+ )
)
{
if (c=='*' || c=='&' || c=='@' || c=='$')
@@ -1767,6 +1769,14 @@ nextChar:
growBuf.addChar(' ');
}
}
+ else if (c=='-')
+ {
+ uint rl=growBuf.getPos();
+ if (rl>0 && growBuf.at(rl-1)==')' && i<l-1 && s.at(i+1)=='>') // trailing return type ')->' => ') ->'
+ {
+ growBuf.addChar(' ');
+ }
+ }
growBuf.addChar(c);
if (cliSupport &&
(c=='^' || c=='%') && i>1 && isId(s.at(i-1)) &&
@@ -2076,6 +2086,8 @@ QCString argListToString(ArgumentList *al,bool useCanonicalType,bool showDefVals
result+=")";
if (al->constSpecifier) result+=" const";
if (al->volatileSpecifier) result+=" volatile";
+ if (!al->trailingReturnType.isEmpty()) result+=" -> "+al->trailingReturnType;
+ if (al->pureSpecifier) result+=" =0";
return removeRedundantWhiteSpace(result);
}
@@ -2261,7 +2273,7 @@ QCString transcodeCharacterStringToUTF8(const QCString &input)
{
size_t iLeft=inputSize;
size_t oLeft=outputSize;
- const char *inputPtr = input.data();
+ char *inputPtr = input.data();
char *outputPtr = output.data();
if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft))
{
@@ -5853,27 +5865,6 @@ QCString substituteTemplateArgumentsInString(
return result.stripWhiteSpace();
}
-
-/*! Makes a deep copy of argument list \a src. Will allocate memory, that
- * is owned by the caller.
- */
-ArgumentList *copyArgumentList(const ArgumentList *src)
-{
- ASSERT(src!=0);
- ArgumentList *dst = new ArgumentList;
- dst->setAutoDelete(TRUE);
- ArgumentListIterator tali(*src);
- Argument *a;
- for (;(a=tali.current());++tali)
- {
- dst->append(new Argument(*a));
- }
- dst->constSpecifier = src->constSpecifier;
- dst->volatileSpecifier = src->volatileSpecifier;
- dst->pureSpecifier = src->pureSpecifier;
- return dst;
-}
-
/*! Makes a deep copy of the list of argument lists \a srcLists.
* Will allocate memory, that is owned by the caller.
*/
@@ -5886,7 +5877,7 @@ QList<ArgumentList> *copyArgumentLists(const QList<ArgumentList> *srcLists)
ArgumentList *sl;
for (;(sl=sli.current());++sli)
{
- dstLists->append(copyArgumentList(sl));
+ dstLists->append(sl->deepCopy());
}
return dstLists;
}
@@ -7041,7 +7032,7 @@ static int transcodeCharacterBuffer(const char *fileName,BufStr &srcBuf,int size
BufStr tmpBuf(tmpBufSize);
size_t iLeft=size;
size_t oLeft=tmpBufSize;
- const char *srcPtr = srcBuf.data();
+ char *srcPtr = srcBuf.data();
char *dstPtr = tmpBuf.data();
uint newSize=0;
if (!portable_iconv(cd, &srcPtr, &iLeft, &dstPtr, &oLeft))
diff --git a/src/util.h b/src/util.h
index 994c3fb..6e1ebcc 100644
--- a/src/util.h
+++ b/src/util.h
@@ -266,8 +266,6 @@ QCString substituteTemplateArgumentsInString(
ArgumentList *formalArgs,
ArgumentList *actualArgs);
-ArgumentList *copyArgumentList(const ArgumentList *src);
-
QList<ArgumentList> *copyArgumentLists(const QList<ArgumentList> *srcLists);
QCString stripTemplateSpecifiersFromScope(const QCString &fullName,
diff --git a/src/vhdlcode.l b/src/vhdlcode.l
index ab2f3b6..f8da699 100644
--- a/src/vhdlcode.l
+++ b/src/vhdlcode.l
@@ -43,6 +43,7 @@
#include "arguments.h"
#define YY_NEVER_INTERACTIVE 1
+#define YY_NO_INPUT 1
// Toggle for some debugging info
//#define DBG_CTX(x) fprintf x
diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp
index 5321e47..a2eb4b8 100644
--- a/src/vhdldocgen.cpp
+++ b/src/vhdldocgen.cpp
@@ -2830,7 +2830,7 @@ bool VhdlDocGen::findConstraintFile(LayoutNavEntry *lne)
if (Config_getBool("HAVE_DOT") && Config_getEnum("DOT_IMAGE_FORMAT")=="svg")
{
- QCString ov("Design Overview"); // TODO: translate me
+ QCString ov = theTranslator->trDesignOverview();
QCString ofile("vhdl_design_overview");
LayoutNavEntry *oo=new LayoutNavEntry( lne,LayoutNavEntry::MainPage,true,ofile,ov,"");
kk->addChild(oo);
diff --git a/src/vhdlscanner.l b/src/vhdlscanner.l
index 3637a33..c92c6ce 100644
--- a/src/vhdlscanner.l
+++ b/src/vhdlscanner.l
@@ -66,6 +66,8 @@
#include <qmap.h>
#include "entry.h"
+#define YY_NO_INPUT 1
+
extern void vhdlParse(); // defined in vhdlparser.y
static bool g_lexInit = FALSE;
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 9475470..5c71cd6 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -1220,6 +1220,7 @@ static void generateXMLForClass(ClassDef *cd,FTextStream &ti)
if (cd->isHidden()) return; // skip hidden classes.
if (cd->name().find('@')!=-1) return; // skip anonymous compounds.
if (cd->templateMaster()!=0) return; // skip generated template instances.
+ if (cd->isArtificial()) return; // skip artificially created classes
msg("Generating XML output for class %s\n",cd->name().data());
@@ -1249,6 +1250,9 @@ static void generateXMLForClass(ClassDef *cd,FTextStream &ti)
case Private: t << "private"; break;
case Package: t << "package"; break;
}
+ if (cd->isFinal()) t << "\" final=\"yes";
+ if (cd->isSealed()) t << "\" sealed=\"yes";
+ if (cd->isAbstract()) t << "\" abstract=\"yes";
t << "\">" << endl;
t << " <compoundname>";
writeXMLString(t,cd->name());
diff --git a/tmake/lib/macosx-c++/tmake.conf b/tmake/lib/macosx-c++/tmake.conf
index 3c2cd24..0230328 100755
--- a/tmake/lib/macosx-c++/tmake.conf
+++ b/tmake/lib/macosx-c++/tmake.conf
@@ -9,7 +9,7 @@ CONFIG = qt warn_on release
TMAKE_CC = cc
TMAKE_CFLAGS = -pipe
-TMAKE_CFLAGS_WARN_ON = -Wall -W
+TMAKE_CFLAGS_WARN_ON = -Wall -W -Wno-deprecated-declarations -Wno-invalid-source-encoding
TMAKE_CFLAGS_WARN_OFF =
TMAKE_CFLAGS_RELEASE = -O2
TMAKE_CFLAGS_DEBUG = -g -fstack-protector