summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build_cmake.yml10
-rw-r--r--doc/docblocks.doc186
-rw-r--r--filesystem/filesystem.hpp324
-rw-r--r--src/classdef.cpp5
-rw-r--r--src/commentcnv.l36
-rw-r--r--src/commentscan.l2
-rwxr-xr-xsrc/configgen.py67
-rw-r--r--src/context.cpp602
-rw-r--r--src/context.h38
-rw-r--r--src/dirdef.cpp8
-rw-r--r--src/docparser.cpp1
-rw-r--r--src/docparser.h6
-rw-r--r--src/doxygen.cpp61
-rw-r--r--src/filedef.cpp2
-rw-r--r--src/groupdef.cpp2
-rw-r--r--src/htmldocvisitor.cpp7
-rw-r--r--src/htmlgen.cpp109
-rw-r--r--src/htmlgen.h1
-rw-r--r--src/index.cpp42
-rw-r--r--src/lexcode.l24
-rw-r--r--src/lexscanner.l26
-rw-r--r--src/memberdef.cpp15
-rw-r--r--src/memberdef.h2
-rw-r--r--src/namespacedef.cpp52
-rw-r--r--src/namespacedef.h2
-rw-r--r--src/pre.l50
-rw-r--r--src/pycode.l2
-rw-r--r--src/pyscanner.l34
-rw-r--r--src/qcstring.h13
-rw-r--r--src/resourcemgr.cpp10
-rw-r--r--src/resourcemgr.h2
-rw-r--r--src/scanner.l48
-rw-r--r--src/searchindex.cpp1
-rwxr-xr-xsrc/template.cpp311
-rw-r--r--src/template.h17
-rw-r--r--templates/html/dynsections_tooltips.js6
-rw-r--r--templates/html/header.html8
-rw-r--r--templates/html/htmlallmembers.tpl3
-rw-r--r--templates/html/htmlannotated.tpl2
-rw-r--r--templates/html/htmlbase.tpl136
-rw-r--r--templates/html/htmlclass.tpl6
-rw-r--r--templates/html/htmlclasses.tpl38
-rw-r--r--templates/html/htmldeclcomp.tpl3
-rw-r--r--templates/html/htmldirtree.tpl17
-rw-r--r--templates/html/htmlexamples.tpl2
-rw-r--r--templates/html/htmlfiles.tpl2
-rw-r--r--templates/html/htmlhierarchy.tpl2
-rw-r--r--templates/html/htmlindexpages.tpl2
-rw-r--r--templates/html/htmljsmenudata.tpl66
-rw-r--r--templates/html/htmljsmenuletterdata.tpl15
-rw-r--r--templates/html/htmljsnavpage.tpl20
-rw-r--r--templates/html/htmljsnavtree.tpl40
-rw-r--r--templates/html/htmljssearchdata.tpl27
-rw-r--r--templates/html/htmljssearchindex.tpl10
-rw-r--r--templates/html/htmllayout.tpl54
-rw-r--r--templates/html/htmlmemberindex.tpl16
-rw-r--r--templates/html/htmlmembersindex.tpl20
-rw-r--r--templates/html/htmlmemdecl.tpl2
-rw-r--r--templates/html/htmlmodules.tpl2
-rw-r--r--templates/html/htmlnamespaces.tpl2
-rw-r--r--templates/html/htmlpage.tpl4
-rw-r--r--templates/html/htmlpages.tpl2
-rw-r--r--templates/html/htmlsearchresult.tpl7
-rw-r--r--templates/html/htmltabs.tpl2
-rw-r--r--templates/html/nomatches.tpl13
65 files changed, 1850 insertions, 797 deletions
diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml
index bf207bc..ff3d62a 100644
--- a/.github/workflows/build_cmake.yml
+++ b/.github/workflows/build_cmake.yml
@@ -103,13 +103,19 @@ jobs:
run: |
sudo apt remove llvm-8 clang-8 libclang-common-8-dev clang-format-8 libllvm8
sudo apt remove llvm-9 llvm-9-dev llvm-9-tools llvm-9-runtime clang-9 libclang-common-9-dev clang-format-9 libllvm9
+ #sudo apt remove llvm-10 llvm-10-dev llvm-10-tools llvm-10-runtime clang-10 clang-format-10 libclang-common-10-dev libclang-cpp10 libclang1-10 libllvm10
sudo apt remove llvm-11 llvm-11-dev llvm-11-tools llvm-11-runtime clang-11 clang-format-11 libclang-common-11-dev libclang-cpp11 libclang1-11 libllvm11
+ sudo apt remove llvm-12 llvm-12-dev llvm-12-tools llvm-12-runtime clang-12 clang-format-12 libclang-common-12-dev libclang-cpp12 libclang1-12 libllvm12
sudo apt-get autoremove
sudo apt-get clean
- #sudo apt install libclang-9-dev libclang-common-9-dev
- sudo apt install libclang-10-dev libclang-common-10-dev
+ sudo apt install libclang-common-10-dev libclang-10-dev
apt list --installed | egrep '(clang|llvm)'
ls -d /usr/lib/llvm-*/include/
+ sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 100
+ sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 100
+ ls -al /usr/bin/clang++
+ ls -al /etc/alternatives/clang++
+ which clang++
clang++ -v
if: matrix.config.os == 'ubuntu-20.04'
diff --git a/doc/docblocks.doc b/doc/docblocks.doc
index ac81bec..92bf3df 100644
--- a/doc/docblocks.doc
+++ b/doc/docblocks.doc
@@ -1,12 +1,12 @@
/******************************************************************************
*
- *
+ *
*
* Copyright (C) 1997-2015 by 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
+ * 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.
*
@@ -19,35 +19,35 @@
This chapter covers two topics:
1. How to put comments in your code such that doxygen incorporates them in
- the documentation it generates.
+ the documentation it generates.
This is further detailed in the \ref specialblock "next section".
2. Ways to structure the contents of a comment block such that the output
looks good, as explained in section \ref docstructure.
-\section specialblock Special comment blocks
+\section specialblock Special comment blocks
-A special comment block is a C or C++ style comment block with some
+A special comment block is a C or C++ style comment block with some
additional markings, so doxygen knows it is a piece of structured text that
needs to end up in the generated documentation. The \ref cppblock "next" section
presents the various styles supported by doxygen.
-For Python, VHDL, and Fortran code there are different commenting
+For Python, VHDL, and Fortran code there are different commenting
conventions, which can be found in sections \ref pythonblocks, \ref vhdlblocks, and
\ref fortranblocks respectively.
\subsection cppblock Comment blocks for C-like languages (C/C++/C#/Objective-C/PHP/Java)
-For each entity in the code there are two (or in some cases three) types of descriptions,
+For each entity in the code there are two (or in some cases three) types of descriptions,
which together form the documentation for that entity; a *brief* description and *detailed*
description, both are optional. For methods and functions there is also a third
-type of description, the so called *in body* description, which consists of
+type of description, the so called *in body* description, which consists of
the concatenation of all comment blocks found within the body of the method or function.
Having more than one brief or detailed description is allowed (but not recommended,
as the order in which the descriptions will appear is not specified).
As the name suggest, a brief description is
-a short one-liner, whereas the detailed description provides longer,
+a short one-liner, whereas the detailed description provides longer,
more detailed documentation. An "in body" description can also act as a detailed
description or can describe a collection of implementation details.
For the HTML output brief descriptions are also
@@ -64,7 +64,7 @@ block starting with two *'s, like this:
*/
\endverbatim
-<li> or you can use the Qt style and add an exclamation mark (!)
+<li> or you can use the Qt style and add an exclamation mark (!)
after the opening of a C-style comment block, as shown in this example:
\verbatim
@@ -83,8 +83,8 @@ In both cases the intermediate *'s are optional, so
is also valid.
-<li> A third alternative is to use a block of <i>at least two</i> C++ comment
-lines, where each line starts with an additional slash or an
+<li> A third alternative is to use a block of <i>at least two</i> C++ comment
+lines, where each line starts with an additional slash or an
exclamation mark. Here are examples of the two cases:
\verbatim
@@ -146,8 +146,8 @@ as long as JAVADOC_BANNER = YES is used.
For the brief description there are also several possibilities:
<ol>
-<li>One could use the \ref cmdbrief "\\brief" command with one of the
-above comment blocks. This command ends at the end of a paragraph,
+<li>One could use the \ref cmdbrief "\\brief" command with one of the
+above comment blocks. This command ends at the end of a paragraph,
so the detailed description follows after an empty line.
Here is an example:
@@ -160,8 +160,8 @@ Here is an example:
*/
\endverbatim
-<li>If \ref cfg_javadoc_autobrief "JAVADOC_AUTOBRIEF" is set to \c YES
- in the configuration file,
+<li>If \ref cfg_javadoc_autobrief "JAVADOC_AUTOBRIEF" is set to \c YES
+ in the configuration file,
then using Javadoc style comment
blocks will automatically start a brief description which ends at the
first dot followed by a space or new line. Here is an example:
@@ -177,7 +177,7 @@ The option has the same effect for multi-line special C++ comments:
/// here.
\endverbatim
-<li>A third option is to use a special C++ style comment which does not
+<li>A third option is to use a special C++ style comment which does not
span more than one line. Here are two examples:
\verbatim
/// Brief description.
@@ -189,11 +189,11 @@ or
\verbatim
//! Brief description.
-//! Detailed description
+//! Detailed description
//! starts here.
\endverbatim
-Note the blank line in the last example, which is required to separate the
+Note the blank line in the last example, which is required to separate the
brief description from the block containing the detailed description. The
\ref cfg_javadoc_autobrief "JAVADOC_AUTOBRIEF" should also be set to \c NO
for this case.
@@ -216,40 +216,40 @@ on the order in which doxygen parses the code.
Unlike most other documentation systems, doxygen also allows you to put
-the documentation of members (including global functions) in front of
-the \e definition. This way the documentation can be placed in the source
-file instead of the header file. This keeps the header file compact, and allows the
+the documentation of members (including global functions) in front of
+the \e definition. This way the documentation can be placed in the source
+file instead of the header file. This keeps the header file compact, and allows the
implementer of the members more direct access to the documentation.
As a compromise the brief description could be placed before the
declaration and the detailed description before the member definition.
-\subsubsection memberdoc Putting documentation after members
+\subsubsection memberdoc Putting documentation after members
If you want to document the members of a file, struct, union, class, or enum,
-it is sometimes desired to place the documentation block after the member
+it is sometimes desired to place the documentation block after the member
instead of before. For this purpose you have to put an additional \< marker
-in the comment block. Note that this also works for the parameters
+in the comment block. Note that this also works for the parameters
of a function.
Here are some examples:
\verbatim
int var; /*!< Detailed description after the member */
\endverbatim
-This block can be used to put a Qt style detailed
+This block can be used to put a Qt style detailed
documentation block \e after a member. Other ways to do the
same are:
\verbatim
int var; /**< Detailed description after the member */
\endverbatim
-or
+or
\verbatim
int var; //!< Detailed description after the member
- //!<
+ //!<
\endverbatim
-or
+or
\verbatim
int var; ///< Detailed description after the member
- ///<
+ ///<
\endverbatim
Most often one only wants to put a brief description after a member.
@@ -263,16 +263,16 @@ int var; ///< Brief description after the member
\endverbatim
For functions one can use the \ref cmdparam "\@param" command to document the parameters
-and then use <code>[in]</code>, <code>[out]</code>, <code>[in,out]</code>
-to document the direction. For inline documentation this is also possible
+and then use <code>[in]</code>, <code>[out]</code>, <code>[in,out]</code>
+to document the direction. For inline documentation this is also possible
by starting with the direction attribute, e.g.
\verbatim
void foo(int v /**< [in] docs for input parameter v. */);
\endverbatim
-Note that these blocks have the same structure and meaning as the
-special comment blocks in the previous section
-only the \< indicates that the member is
+Note that these blocks have the same structure and meaning as the
+special comment blocks in the previous section
+only the \< indicates that the member is
located in front of the block instead of after the block.
Here is an example of the use of these comment blocks:
@@ -288,11 +288,15 @@ Here is an example of the use of these comment blocks:
\warning These blocks can only be used to document \e members and \e parameters.
They cannot be used to document files, classes, unions, structs,
- groups, namespaces and enums themselves. Furthermore, the structural
- commands mentioned in the next section
- (like <code>\\class</code>) are not allowed
+ groups, namespaces, macros, and enums themselves. Furthermore, the structural
+ commands mentioned in the next section
+ (like <code>\\class</code>) are not allowed
inside these comment blocks.
+\warning Be careful using this construct as part of a macro definition, because when \ref cfg_macro_expansion "MACRO_EXPANSION" is set to `YES`
+ at the places where the macro is applied, also the comment will be substituted
+ and this comment is then used as documentation for the last item encountered and not for the macro definition itself!
+
\subsubsection docexamples Examples
Here is an example of a documented piece of C++ code using the Qt style:
@@ -306,15 +310,15 @@ Here is an example of a documented piece of C++ code using the Qt style:
for the corresponding \mbox{\LaTeX} documentation that is generated by doxygen.
\endlatexonly
-The brief descriptions are included in the member overview of a
-class, namespace or file and are printed using a small italic font
-(this description can be hidden by setting
-\ref cfg_brief_member_desc "BRIEF_MEMBER_DESC" to \c NO in
-the configuration file). By default the brief descriptions become the first
-sentence of the detailed descriptions
-(but this can be changed by setting the \ref cfg_repeat_brief "REPEAT_BRIEF"
-tag to \c NO). Both the brief and the detailed descriptions are optional
-for the Qt style.
+The brief descriptions are included in the member overview of a
+class, namespace or file and are printed using a small italic font
+(this description can be hidden by setting
+\ref cfg_brief_member_desc "BRIEF_MEMBER_DESC" to \c NO in
+the configuration file). By default the brief descriptions become the first
+sentence of the detailed descriptions
+(but this can be changed by setting the \ref cfg_repeat_brief "REPEAT_BRIEF"
+tag to \c NO). Both the brief and the detailed descriptions are optional
+for the Qt style.
By default a Javadoc style documentation block behaves the same way as a
Qt style documentation block. This is not according the Javadoc specification
@@ -328,7 +332,7 @@ Here is an example:
/** Brief description (e.g.\ using only a few words). Details follow. */
\endverbatim
-Here is the same piece of code as shown above, this time documented using the
+Here is the same piece of code as shown above, this time documented using the
Javadoc style and \ref cfg_javadoc_autobrief "JAVADOC_AUTOBRIEF" set to YES:
\include jdstyle.cpp
\htmlonly
@@ -346,25 +350,25 @@ block to automatically be treated as a brief description, one may set
\subsubsection structuralcommands Documentation at other places
-In the examples in the previous section the comment blocks were always located *in
+In the examples in the previous section the comment blocks were always located *in
front* of the declaration or definition of a file, class or namespace or *in
-front* or *after* one of its members.
-Although this is often comfortable, there may sometimes be reasons to put the
-documentation somewhere else. For documenting a file this is even
-required since there is no such thing as "in front of a file".
+front* or *after* one of its members.
+Although this is often comfortable, there may sometimes be reasons to put the
+documentation somewhere else. For documenting a file this is even
+required since there is no such thing as "in front of a file".
-Doxygen allows you to put your documentation blocks practically
-anywhere (the exception is inside the body of a function or inside a
-normal C style comment block).
+Doxygen allows you to put your documentation blocks practically
+anywhere (the exception is inside the body of a function or inside a
+normal C style comment block).
The price you pay for not putting the
-documentation block directly before (or after) an item is the need to put a
+documentation block directly before (or after) an item is the need to put a
structural command inside the documentation block, which leads to some
duplication of information. So in practice you should \e avoid the use of
structural commands \e unless other requirements force you to do so.
-Structural commands (like \ref cmd_intro "all other commands") start with a backslash
-(<tt>\\</tt>), or an at-sign (<tt>\@</tt>) if you prefer Javadoc style,
+Structural commands (like \ref cmd_intro "all other commands") start with a backslash
+(<tt>\\</tt>), or an at-sign (<tt>\@</tt>) if you prefer Javadoc style,
followed by a command name and one or more parameters.
For instance, if you want to document the class \c Test in the example
above, you could have also put the following documentation block somewhere
@@ -393,22 +397,22 @@ Other structural commands are:
<li>\c \\package to document a Java package.
<li>\c \\interface to document an IDL interface.
</ul>
-See section \ref commands for detailed information about these and many other
-commands.
+See section \ref commands for detailed information about these and many other
+commands.
-To document a member of a C++ class, you must also document the class
-itself. The same holds for namespaces. To document a global C function,
-typedef, enum or preprocessor definition you must first document the file
-that contains it (usually this will be a header file, because that file
+To document a member of a C++ class, you must also document the class
+itself. The same holds for namespaces. To document a global C function,
+typedef, enum or preprocessor definition you must first document the file
+that contains it (usually this will be a header file, because that file
contains the information that is exported to other source files).
@attention Let's repeat that, because it is often overlooked:
to document global objects (functions, typedefs, enum, macros, etc), you
-<em>must</em> document the file in which they are defined. In other words,
+<em>must</em> document the file in which they are defined. In other words,
there <em>must</em> at least be a \verbatim /*! \file */ \endverbatim
or a \verbatim /** @file */ \endverbatim line in this file.
-Here is an example of a C header named \c structcmd.h that is documented
+Here is an example of a C header named \c structcmd.h that is documented
using structural commands:
\include structcmd.h
\htmlonly
@@ -421,8 +425,8 @@ using structural commands:
\endlatexonly
Because each comment block in the example above contains a structural command, all
- the comment blocks could be moved to another location or input file
- (the source file for instance), without affecting the generated
+ the comment blocks could be moved to another location or input file
+ (the source file for instance), without affecting the generated
documentation. The disadvantage of this approach is that prototypes are
duplicated, so all changes have to be made twice! Because of this you
should first consider if this is really needed, and avoid structural
@@ -432,7 +436,7 @@ using structural commands:
When you place a comment block in a file with one of the following extensions
`.dox`, `.txt`, `.doc`, `.md` or `.markdown` or when the extension maps to
- `md` by means of the \ref cfg_extension_mapping "EXTENSION_MAPPING"
+ `md` by means of the \ref cfg_extension_mapping "EXTENSION_MAPPING"
then doxygen will hide this file from the file list.
If you have a file that doxygen cannot parse but still would like to document it,
@@ -451,7 +455,7 @@ the script can be found in the path set via \ref cfg_example_path "EXAMPLE_PATH"
\subsection pythonblocks Comment blocks in Python
-For Python there is a standard way of documenting the code using
+For Python there is a standard way of documenting the code using
so called documentation strings (<tt>"""</tt>). Such strings are stored in \c __doc__
and can be retrieved at runtime. Doxygen will extract such comments
and assume they have to be represented in a preformatted way.
@@ -466,17 +470,17 @@ and assume they have to be represented in a preformatted way.
for the corresponding \mbox{\LaTeX} documentation that is generated by doxygen.
\endlatexonly
-\note When using <tt>\"\"\"</tt> none of doxygen's \ref cmd_intro "special commands"
+\note When using <tt>\"\"\"</tt> none of doxygen's \ref cmd_intro "special commands"
are supported and the text is shown as verbatim text see \ref cmdverbatim "\\verbatim".
To have the doxygen's \ref cmd_intro "special commands" and have the text as regular
-documentation instead of <tt>\"\"\"</tt> use <tt>\"\"\"!</tt> or set
+documentation instead of <tt>\"\"\"</tt> use <tt>\"\"\"!</tt> or set
\ref cfg_python_docstring "PYTHON_DOCSTRING" to \c NO in the configuration file.
\note Instead of <tt>\"\"\"</tt> one can also use <tt>'''</tt>.
-There is also another way to document Python code using comments that
-start with "##". These type of comment blocks are more in line with the
-way documentation blocks work for the other languages supported by doxygen
-and this also allows the use of special commands.
+There is also another way to document Python code using comments that
+start with "##". These type of comment blocks are more in line with the
+way documentation blocks work for the other languages supported by doxygen
+and this also allows the use of special commands.
Here is the same example again but now using doxygen style comments:
@@ -490,9 +494,9 @@ Here is the same example again but now using doxygen style comments:
for the corresponding \mbox{\LaTeX} documentation that is generated by doxygen.
\endlatexonly
-Since python looks more like Java than like C or C++, you should set
+Since python looks more like Java than like C or C++, you should set
\ref cfg_optimize_output_java "OPTIMIZE_OUTPUT_JAVA" to \c YES in the
-configuration file.
+configuration file.
\subsection vhdlblocks Comment blocks in VHDL
@@ -541,12 +545,12 @@ By setting `EXTENSION_MAPPING = f=FortranFixed f90=FortranFree` files with
extension \c f are interpreted as fixed format Fortran code and files with
extension \c f90 are interpreted as free format Fortran code.
-For Fortran "!>" or "!<" starts a comment and "!!" or "!>" can be used to
+For Fortran "!>" or "!<" starts a comment and "!!" or "!>" can be used to
continue an one line comment into a multi-line comment.
Here is an example of a documented Fortran subroutine:
\code{.f}
- !> Build the restriction matrix for the aggregation
+ !> Build the restriction matrix for the aggregation
!! method.
!! @param aggr information about the aggregates
!! @todo Handle special case
@@ -581,21 +585,21 @@ In this section we look at the contents of the comment block itself.
Doxygen supports various styles of formatting your comments.
-The simplest form is to use plain text. This will appear as-is in the output
+The simplest form is to use plain text. This will appear as-is in the output
and is ideal for a short description.
-For longer descriptions you often will find the
-need for some more structure, like a block of verbatim text, a list, or a
-simple table. For this doxygen supports the
-<a href="https://daringfireball.net/projects/markdown/syntax">Markdown</a>
+For longer descriptions you often will find the
+need for some more structure, like a block of verbatim text, a list, or a
+simple table. For this doxygen supports the
+<a href="https://daringfireball.net/projects/markdown/syntax">Markdown</a>
syntax, including parts of the
<a href="https://michelf.ca/projects/php-markdown/extra/">Markdown Extra</a>
-extension.
+extension.
-Markdown is designed to be very easy to read and write.
+Markdown is designed to be very easy to read and write.
Its formatting is inspired by plain text mail.
Markdown works great for simple, generic formatting, like an introduction
-page for your project. Doxygen also supports reading of markdown files
+page for your project. Doxygen also supports reading of markdown files
directly. For more details see chapter \ref markdown.
For programming language specific formatting doxygen has two
@@ -607,7 +611,7 @@ forms of additional markup on top of Markdown formatting.
as specified in the <a href="http://standards.iso.org/ittf/PubliclyAvailableStandards/c042926_ISO_IEC_23270_2006(E).zip">C# standard</a>.
See \ref xmlcmds for the XML commands supported by doxygen.
-If this is still not enough doxygen also supports a \ref htmlcmds "subset" of
+If this is still not enough doxygen also supports a \ref htmlcmds "subset" of
the <a href="https://en.wikipedia.org/wiki/HTML">HTML</a> markup language.
\htmlonly
diff --git a/filesystem/filesystem.hpp b/filesystem/filesystem.hpp
index e4e0e27..6cbc892 100644
--- a/filesystem/filesystem.hpp
+++ b/filesystem/filesystem.hpp
@@ -74,6 +74,9 @@
#elif defined(__EMSCRIPTEN__)
#define GHC_OS_WEB
#include <wasi/api.h>
+#elif defined(__QNX__)
+#define GHC_OS_QNX
+#define GHC_NO_DIRENT_D_TYPE
#else
#error "Operating system currently not supported!"
#endif
@@ -240,6 +243,9 @@
#define GHC_HAS_STD_EXPERIMENTAL_STRING_VIEW
#elif defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)) && (__cplusplus >= 201402)
#define GHC_HAS_STD_EXPERIMENTAL_STRING_VIEW
+#elif defined(__GLIBCXX__) && defined(_GLIBCXX_USE_DUAL_ABI) && (__cplusplus >= 201402)
+// macro _GLIBCXX_USE_DUAL_ABI is always defined in libstdc++ from gcc-5 and newer
+#define GHC_HAS_STD_EXPERIMENTAL_STRING_VIEW
#endif
#if defined(GHC_HAS_STD_STRING_VIEW)
@@ -295,7 +301,7 @@
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// ghc::filesystem version in decimal (major * 10000 + minor * 100 + patch)
-#define GHC_FILESYSTEM_VERSION 10504L
+#define GHC_FILESYSTEM_VERSION 10506L
#if !defined(GHC_WITH_EXCEPTIONS) && (defined(__EXCEPTIONS) || defined(__cpp_exceptions) || defined(_CPPUNWIND))
#define GHC_WITH_EXCEPTIONS
@@ -351,7 +357,7 @@ bool has_executable_extension(const path& p);
}
#endif
-// 30.10.8 class path
+// [fs.class.path] class path
class GHC_FS_API_CLASS path
#if defined(GHC_OS_WINDOWS) && !defined(GHC_WIN_DISABLE_WSTRING_STORAGE_TYPE)
#define GHC_USE_WCHAR_T
@@ -372,7 +378,7 @@ public:
using string_type = std::basic_string<value_type>;
using path_helper_base<value_type>::preferred_separator;
- // 30.10.10.1 enumeration format
+ // [fs.enum.path.format] enumeration format
/// The path format in which the constructor argument is given.
enum format {
generic_format, ///< The generic format, internally used by
@@ -408,12 +414,24 @@ public:
template <typename T1, typename T2 = void>
using path_type = typename std::enable_if<!std::is_same<path, T1>::value, path>::type;
template <typename T>
+#if defined(__cpp_lib_char8_t) && !defined(GHC_FILESYSTEM_ENFORCE_CPP17_API)
+ using path_from_string =
+ typename std::enable_if<_is_basic_string<T>::value || std::is_same<char const*, typename std::decay<T>::type>::value || std::is_same<char*, typename std::decay<T>::type>::value || std::is_same<char8_t const*, typename std::decay<T>::type>::value ||
+ std::is_same<char8_t*, typename std::decay<T>::type>::value || std::is_same<char16_t const*, typename std::decay<T>::type>::value || std::is_same<char16_t*, typename std::decay<T>::type>::value ||
+ std::is_same<char32_t const*, typename std::decay<T>::type>::value || std::is_same<char32_t*, typename std::decay<T>::type>::value || std::is_same<wchar_t const*, typename std::decay<T>::type>::value ||
+ std::is_same<wchar_t*, typename std::decay<T>::type>::value,
+ path>::type;
+ template <typename T>
+ using path_type_EcharT = typename std::enable_if<std::is_same<T, char>::value || std::is_same<T, char8_t>::value || std::is_same<T, char16_t>::value || std::is_same<T, char32_t>::value || std::is_same<T, wchar_t>::value, path>::type;
+#else
using path_from_string = typename std::enable_if<_is_basic_string<T>::value || std::is_same<char const*, typename std::decay<T>::type>::value || std::is_same<char*, typename std::decay<T>::type>::value ||
- std::is_same<wchar_t const*, typename std::decay<T>::type>::value || std::is_same<wchar_t*, typename std::decay<T>::type>::value,
- path>::type;
+ std::is_same<char16_t const*, typename std::decay<T>::type>::value || std::is_same<char16_t*, typename std::decay<T>::type>::value || std::is_same<char32_t const*, typename std::decay<T>::type>::value ||
+ std::is_same<char32_t*, typename std::decay<T>::type>::value || std::is_same<wchar_t const*, typename std::decay<T>::type>::value || std::is_same<wchar_t*, typename std::decay<T>::type>::value,
+ path>::type;
template <typename T>
using path_type_EcharT = typename std::enable_if<std::is_same<T, char>::value || std::is_same<T, char16_t>::value || std::is_same<T, char32_t>::value || std::is_same<T, wchar_t>::value, path>::type;
- // 30.10.8.4.1 constructors and destructor
+#endif
+ // [fs.path.construct] constructors and destructor
path() noexcept;
path(const path& p);
path(path&& p) noexcept;
@@ -430,7 +448,7 @@ public:
#endif
~path();
- // 30.10.8.4.2 assignments
+ // [fs.path.assign] assignments
path& operator=(const path& p);
path& operator=(path&& p) noexcept;
path& operator=(string_type&& source);
@@ -442,7 +460,7 @@ public:
template <class InputIterator>
path& assign(InputIterator first, InputIterator last);
- // 30.10.8.4.3 appends
+ // [fs.path.append] appends
path& operator/=(const path& p);
template <class Source>
path& operator/=(const Source& source);
@@ -451,7 +469,7 @@ public:
template <class InputIterator>
path& append(InputIterator first, InputIterator last);
- // 30.10.8.4.4 concatenation
+ // [fs.path.concat] concatenation
path& operator+=(const path& x);
path& operator+=(const string_type& x);
#ifdef GHC_WITH_STRING_VIEW
@@ -468,7 +486,7 @@ public:
template <class InputIterator>
path& concat(InputIterator first, InputIterator last);
- // 30.10.8.4.5 modifiers
+ // [fs.path.modifiers] modifiers
void clear() noexcept;
path& make_preferred();
path& remove_filename();
@@ -476,7 +494,7 @@ public:
path& replace_extension(const path& replacement = path());
void swap(path& rhs) noexcept;
- // 30.10.8.4.6 native format observers
+ // [fs.path.native.obs] native format observers
const string_type& native() const noexcept;
const value_type* c_str() const noexcept;
operator string_type() const;
@@ -492,7 +510,7 @@ public:
std::u16string u16string() const;
std::u32string u32string() const;
- // 30.10.8.4.7 generic format observers
+ // [fs.path.generic.obs] generic format observers
template <class EcharT, class traits = std::char_traits<EcharT>, class Allocator = std::allocator<EcharT>>
std::basic_string<EcharT, traits, Allocator> generic_string(const Allocator& a = Allocator()) const;
std::string generic_string() const;
@@ -505,7 +523,7 @@ public:
std::u16string generic_u16string() const;
std::u32string generic_u32string() const;
- // 30.10.8.4.8 compare
+ // [fs.path.compare] compare
int compare(const path& p) const noexcept;
int compare(const string_type& s) const;
#ifdef GHC_WITH_STRING_VIEW
@@ -513,7 +531,7 @@ public:
#endif
int compare(const value_type* s) const;
- // 30.10.8.4.9 decomposition
+ // [fs.path.decompose] decomposition
path root_name() const;
path root_directory() const;
path root_path() const;
@@ -523,7 +541,7 @@ public:
path stem() const;
path extension() const;
- // 30.10.8.4.10 query
+ // [fs.path.query] query
bool empty() const noexcept;
bool has_root_name() const;
bool has_root_directory() const;
@@ -536,12 +554,12 @@ public:
bool is_absolute() const;
bool is_relative() const;
- // 30.10.8.4.11 generation
+ // [fs.path.gen] generation
path lexically_normal() const;
path lexically_relative(const path& base) const;
path lexically_proximate(const path& base) const;
- // 30.10.8.5 iterators
+ // [fs.path.itr] iterators
class iterator;
using const_iterator = iterator;
iterator begin() const;
@@ -594,7 +612,7 @@ private:
#endif
};
-// 30.10.8.6 path non-member functions
+// [fs.path.nonmember] path non-member functions
GHC_FS_API void swap(path& lhs, path& rhs) noexcept;
GHC_FS_API size_t hash_value(const path& p) noexcept;
#ifdef GHC_HAS_THREEWAY_COMP
@@ -608,13 +626,13 @@ GHC_FS_API bool operator>(const path& lhs, const path& rhs) noexcept;
GHC_FS_API bool operator>=(const path& lhs, const path& rhs) noexcept;
GHC_FS_API path operator/(const path& lhs, const path& rhs);
-// 30.10.8.6.1 path inserter and extractor
+// [fs.path.io] path inserter and extractor
template <class charT, class traits>
std::basic_ostream<charT, traits>& operator<<(std::basic_ostream<charT, traits>& os, const path& p);
template <class charT, class traits>
std::basic_istream<charT, traits>& operator>>(std::basic_istream<charT, traits>& is, path& p);
-// 30.10.8.6.2 path factory functions
+// [pfs.path.factory] path factory functions
template <class Source, typename = path::path_from_string<Source>>
#if defined(__cpp_lib_char8_t) && !defined(GHC_FILESYSTEM_ENFORCE_CPP17_API)
[[deprecated("use ghc::filesystem::path::path() with std::u8string instead")]]
@@ -626,7 +644,7 @@ template <class InputIterator>
#endif
path u8path(InputIterator first, InputIterator last);
-// 30.10.9 class filesystem_error
+// [fs.class.filesystem_error] class filesystem_error
class GHC_FS_API_CLASS filesystem_error : public std::system_error
{
public:
@@ -683,7 +701,8 @@ struct space_info
uintmax_t available;
};
-// 30.10.10, enumerations
+// [fs.enum] enumerations
+// [fs.enum.file_type]
enum class file_type {
none,
not_found,
@@ -697,6 +716,7 @@ enum class file_type {
unknown,
};
+// [fs.enum.perms]
enum class perms : uint16_t {
none = 0,
@@ -724,6 +744,7 @@ enum class perms : uint16_t {
unknown = 0xffff
};
+// [fs.enum.perm.opts]
enum class perm_options : uint16_t {
replace = 3,
add = 1,
@@ -731,6 +752,7 @@ enum class perm_options : uint16_t {
nofollow = 4,
};
+// [fs.enum.copy.opts]
enum class copy_options : uint16_t {
none = 0,
@@ -750,17 +772,18 @@ enum class copy_options : uint16_t {
#endif
};
+// [fs.enum.dir.opts]
enum class directory_options : uint16_t {
none = 0,
follow_directory_symlink = 1,
skip_permission_denied = 2,
};
-// 30.10.11 class file_status
+// [fs.class.file_status] class file_status
class GHC_FS_API_CLASS file_status
{
public:
- // 30.10.11.1 constructors and destructor
+ // [fs.file_status.cons] constructors and destructor
file_status() noexcept;
explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
file_status(const file_status&) noexcept;
@@ -769,10 +792,10 @@ public:
// assignments:
file_status& operator=(const file_status&) noexcept;
file_status& operator=(file_status&&) noexcept;
- // 30.10.11.3 modifiers
+ // [fs.file_status.mods] modifiers
void type(file_type ft) noexcept;
void permissions(perms prms) noexcept;
- // 30.10.11.2 observers
+ // [fs.file_status.obs] observers
file_type type() const noexcept;
perms permissions() const noexcept;
friend bool operator==(const file_status& lhs, const file_status& rhs) noexcept { return lhs.type() == rhs.type() && lhs.permissions() == rhs.permissions(); }
@@ -783,11 +806,11 @@ private:
using file_time_type = std::chrono::time_point<std::chrono::system_clock>;
-// 30.10.12 Class directory_entry
+// [fs.class.directory_entry] Class directory_entry
class GHC_FS_API_CLASS directory_entry
{
public:
- // 30.10.12.1 constructors and destructor
+ // [fs.dir.entry.cons] constructors and destructor
directory_entry() noexcept = default;
directory_entry(const directory_entry&) = default;
directory_entry(directory_entry&&) noexcept = default;
@@ -801,7 +824,7 @@ public:
directory_entry& operator=(const directory_entry&) = default;
directory_entry& operator=(directory_entry&&) noexcept = default;
- // 30.10.12.2 modifiers
+ // [fs.dir.entry.mods] modifiers
#ifdef GHC_WITH_EXCEPTIONS
void assign(const path& p);
void replace_filename(const path& p);
@@ -811,7 +834,7 @@ public:
void replace_filename(const path& p, std::error_code& ec);
void refresh(std::error_code& ec) noexcept;
- // 30.10.12.3 observers
+ // [fs.dir.entry.obs] observers
const filesystem::path& path() const noexcept;
operator const filesystem::path&() const noexcept;
#ifdef GHC_WITH_EXCEPTIONS
@@ -876,7 +899,7 @@ private:
time_t _last_write_time = 0;
};
-// 30.10.13 Class directory_iterator
+// [fs.class.directory.iterator] Class directory_iterator
class GHC_FS_API_CLASS directory_iterator
{
public:
@@ -901,7 +924,7 @@ public:
using pointer = const directory_entry*;
using reference = const directory_entry&;
- // 30.10.13.1 member functions
+ // [fs.dir.itr.members] member functions
directory_iterator() noexcept;
#ifdef GHC_WITH_EXCEPTIONS
explicit directory_iterator(const path& p);
@@ -921,7 +944,7 @@ public:
#endif
directory_iterator& increment(std::error_code& ec) noexcept;
- // other members as required by 27.2.3, input iterators
+ // other members as required by [input.iterators]
#ifdef GHC_WITH_EXCEPTIONS
proxy operator++(int)
{
@@ -939,11 +962,11 @@ private:
std::shared_ptr<impl> _impl;
};
-// 30.10.13.2 directory_iterator non-member functions
+// [fs.dir.itr.nonmembers] directory_iterator non-member functions
GHC_FS_API directory_iterator begin(directory_iterator iter) noexcept;
GHC_FS_API directory_iterator end(const directory_iterator&) noexcept;
-// 30.10.14 class recursive_directory_iterator
+// [fs.class.re.dir.itr] class recursive_directory_iterator
class GHC_FS_API_CLASS recursive_directory_iterator
{
public:
@@ -953,7 +976,7 @@ public:
using pointer = const directory_entry*;
using reference = const directory_entry&;
- // 30.10.14.1 constructors and destructor
+ // [fs.rec.dir.itr.members] constructors and destructor
recursive_directory_iterator() noexcept;
#ifdef GHC_WITH_EXCEPTIONS
explicit recursive_directory_iterator(const path& p);
@@ -965,7 +988,7 @@ public:
recursive_directory_iterator(recursive_directory_iterator&& rhs) noexcept;
~recursive_directory_iterator();
- // 30.10.14.1 observers
+ // [fs.rec.dir.itr.members] observers
directory_options options() const;
int depth() const;
bool recursion_pending() const;
@@ -973,7 +996,7 @@ public:
const directory_entry& operator*() const;
const directory_entry* operator->() const;
- // 30.10.14.1 modifiers recursive_directory_iterator&
+ // [fs.rec.dir.itr.members] modifiers recursive_directory_iterator&
recursive_directory_iterator& operator=(const recursive_directory_iterator& rhs);
recursive_directory_iterator& operator=(recursive_directory_iterator&& rhs) noexcept;
#ifdef GHC_WITH_EXCEPTIONS
@@ -987,7 +1010,7 @@ public:
void pop(std::error_code& ec);
void disable_recursion_pending();
- // other members as required by 27.2.3, input iterators
+ // other members as required by [input.iterators]
#ifdef GHC_WITH_EXCEPTIONS
directory_iterator::proxy operator++(int)
{
@@ -1014,11 +1037,11 @@ private:
std::shared_ptr<recursive_directory_iterator_impl> _impl;
};
-// 30.10.14.2 directory_iterator non-member functions
+// [fs.rec.dir.itr.nonmembers] directory_iterator non-member functions
GHC_FS_API recursive_directory_iterator begin(recursive_directory_iterator iter) noexcept;
GHC_FS_API recursive_directory_iterator end(const recursive_directory_iterator&) noexcept;
-// 30.10.15 filesystem operations
+// [fs.op.funcs] filesystem operations
#ifdef GHC_WITH_EXCEPTIONS
GHC_FS_API path absolute(const path& p);
GHC_FS_API path canonical(const path& p);
@@ -1980,56 +2003,70 @@ GHC_INLINE file_status file_status_from_st_mode(T mode)
#endif
}
-GHC_INLINE path resolveSymlink(const path& p, std::error_code& ec)
-{
#ifdef GHC_OS_WINDOWS
#ifndef REPARSE_DATA_BUFFER_HEADER_SIZE
- typedef struct _REPARSE_DATA_BUFFER
+typedef struct _REPARSE_DATA_BUFFER
+{
+ ULONG ReparseTag;
+ USHORT ReparseDataLength;
+ USHORT Reserved;
+ union
{
- ULONG ReparseTag;
- USHORT ReparseDataLength;
- USHORT Reserved;
- union
+ struct
+ {
+ USHORT SubstituteNameOffset;
+ USHORT SubstituteNameLength;
+ USHORT PrintNameOffset;
+ USHORT PrintNameLength;
+ ULONG Flags;
+ WCHAR PathBuffer[1];
+ } SymbolicLinkReparseBuffer;
+ struct
+ {
+ USHORT SubstituteNameOffset;
+ USHORT SubstituteNameLength;
+ USHORT PrintNameOffset;
+ USHORT PrintNameLength;
+ WCHAR PathBuffer[1];
+ } MountPointReparseBuffer;
+ struct
{
- struct
- {
- USHORT SubstituteNameOffset;
- USHORT SubstituteNameLength;
- USHORT PrintNameOffset;
- USHORT PrintNameLength;
- ULONG Flags;
- WCHAR PathBuffer[1];
- } SymbolicLinkReparseBuffer;
- struct
- {
- USHORT SubstituteNameOffset;
- USHORT SubstituteNameLength;
- USHORT PrintNameOffset;
- USHORT PrintNameLength;
- WCHAR PathBuffer[1];
- } MountPointReparseBuffer;
- struct
- {
- UCHAR DataBuffer[1];
- } GenericReparseBuffer;
- } DUMMYUNIONNAME;
- } REPARSE_DATA_BUFFER;
+ UCHAR DataBuffer[1];
+ } GenericReparseBuffer;
+ } DUMMYUNIONNAME;
+} REPARSE_DATA_BUFFER;
#ifndef MAXIMUM_REPARSE_DATA_BUFFER_SIZE
#define MAXIMUM_REPARSE_DATA_BUFFER_SIZE (16 * 1024)
#endif
#endif
+GHC_INLINE std::shared_ptr<REPARSE_DATA_BUFFER> getReparseData(const path& p, std::error_code& ec)
+{
std::shared_ptr<void> file(CreateFileW(GHC_NATIVEWP(p), 0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, 0, OPEN_EXISTING, FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS, 0), CloseHandle);
if (file.get() == INVALID_HANDLE_VALUE) {
ec = detail::make_system_error();
- return path();
+ return nullptr;
}
std::shared_ptr<REPARSE_DATA_BUFFER> reparseData((REPARSE_DATA_BUFFER*)std::calloc(1, MAXIMUM_REPARSE_DATA_BUFFER_SIZE), std::free);
ULONG bufferUsed;
- path result;
if (DeviceIoControl(file.get(), FSCTL_GET_REPARSE_POINT, 0, 0, reparseData.get(), MAXIMUM_REPARSE_DATA_BUFFER_SIZE, &bufferUsed, 0)) {
- if (IsReparseTagMicrosoft(reparseData->ReparseTag)) {
+ return reparseData;
+ }
+ else {
+ ec = detail::make_system_error();
+ }
+ return nullptr;
+}
+#endif
+
+GHC_INLINE path resolveSymlink(const path& p, std::error_code& ec)
+{
+#ifdef GHC_OS_WINDOWS
+ path result;
+ auto reparseData = detail::getReparseData(p, ec);
+ if (!ec) {
+ if (reparseData && IsReparseTagMicrosoft(reparseData->ReparseTag)) {
switch (reparseData->ReparseTag) {
case IO_REPARSE_TAG_SYMLINK: {
auto printName = std::wstring(&reparseData->SymbolicLinkReparseBuffer.PathBuffer[reparseData->SymbolicLinkReparseBuffer.PrintNameOffset / sizeof(WCHAR)], reparseData->SymbolicLinkReparseBuffer.PrintNameLength / sizeof(WCHAR));
@@ -2047,16 +2084,14 @@ GHC_INLINE path resolveSymlink(const path& p, std::error_code& ec)
break;
}
case IO_REPARSE_TAG_MOUNT_POINT:
- result = std::wstring(&reparseData->MountPointReparseBuffer.PathBuffer[reparseData->MountPointReparseBuffer.SubstituteNameOffset / sizeof(WCHAR)], reparseData->MountPointReparseBuffer.SubstituteNameLength / sizeof(WCHAR));
+ result = detail::getFullPathName(GHC_NATIVEWP(p), ec);
+ //result = std::wstring(&reparseData->MountPointReparseBuffer.PathBuffer[reparseData->MountPointReparseBuffer.SubstituteNameOffset / sizeof(WCHAR)], reparseData->MountPointReparseBuffer.SubstituteNameLength / sizeof(WCHAR));
break;
default:
break;
}
}
}
- else {
- ec = detail::make_system_error();
- }
return result;
#else
size_t bufferSize = 256;
@@ -2106,13 +2141,35 @@ GHC_INLINE uintmax_t hard_links_from_INFO<BY_HANDLE_FILE_INFORMATION>(const BY_H
}
template <typename INFO>
-GHC_INLINE file_status status_from_INFO(const path& p, const INFO* info, std::error_code&, uintmax_t* sz = nullptr, time_t* lwt = nullptr)
+GHC_INLINE DWORD reparse_tag_from_INFO(const INFO*)
+{
+ return 0;
+}
+
+template <>
+GHC_INLINE DWORD reparse_tag_from_INFO(const WIN32_FIND_DATAW* info)
+{
+ return info->dwReserved0;
+}
+
+template <typename INFO>
+GHC_INLINE file_status status_from_INFO(const path& p, const INFO* info, std::error_code& ec, uintmax_t* sz = nullptr, time_t* lwt = nullptr)
{
file_type ft = file_type::unknown;
- if ((info->dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)) {
- ft = file_type::symlink;
+ if (sizeof(INFO) == sizeof(WIN32_FIND_DATAW)) {
+ if (detail::reparse_tag_from_INFO(info) == IO_REPARSE_TAG_SYMLINK) {
+ ft = file_type::symlink;
+ }
}
else {
+ if ((info->dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)) {
+ auto reparseData = detail::getReparseData(p, ec);
+ if (!ec && reparseData && IsReparseTagMicrosoft(reparseData->ReparseTag) && reparseData->ReparseTag == IO_REPARSE_TAG_SYMLINK) {
+ ft = file_type::symlink;
+ }
+ }
+ }
+ if (ft == file_type::unknown) {
if ((info->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
ft = file_type::directory;
}
@@ -2161,9 +2218,6 @@ GHC_INLINE file_status symlink_status_ex(const path& p, std::error_code& ec, uin
if (nhl) {
*nhl = 0;
}
- if (attr.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) {
- fs.type(file_type::symlink);
- }
}
if (detail::is_not_found_error(ec)) {
return file_status(file_type::not_found);
@@ -2201,15 +2255,18 @@ GHC_INLINE file_status status_ex(const path& p, std::error_code& ec, file_status
ec = detail::make_system_error();
}
else if (attr.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) {
- path target = resolveSymlink(p, ec);
- file_status result;
- if (!ec && !target.empty()) {
- if (sls) {
- *sls = status_from_INFO(p, &attr, ec);
+ auto reparseData = detail::getReparseData(p, ec);
+ if (!ec && reparseData && IsReparseTagMicrosoft(reparseData->ReparseTag) && reparseData->ReparseTag == IO_REPARSE_TAG_SYMLINK) {
+ path target = resolveSymlink(p, ec);
+ file_status result;
+ if (!ec && !target.empty()) {
+ if (sls) {
+ *sls = status_from_INFO(p, &attr, ec);
+ }
+ return detail::status_ex(target, ec, nullptr, sz, nhl, lwt, recurse_count + 1);
}
- return detail::status_ex(target, ec, nullptr, sz, nhl, lwt, recurse_count + 1);
+ return file_status(file_type::unknown);
}
- return file_status(file_type::unknown);
}
if (ec) {
if (detail::is_not_found_error(ec)) {
@@ -2299,7 +2356,7 @@ GHC_INLINE u8arguments::u8arguments(int& argc, char**& argv)
}
//-----------------------------------------------------------------------------
-// 30.10.8.4.1 constructors and destructor
+// [fs.path.construct] constructors and destructor
GHC_INLINE path::path() noexcept {}
@@ -2354,7 +2411,7 @@ inline path::path(InputIterator first, InputIterator last, const std::locale& lo
GHC_INLINE path::~path() {}
//-----------------------------------------------------------------------------
-// 30.10.8.4.2 assignments
+// [fs.path.assign] assignments
GHC_INLINE path& path::operator=(const path& p)
{
@@ -2427,7 +2484,7 @@ inline path& path::assign(InputIterator first, InputIterator last)
#ifdef GHC_EXPAND_IMPL
//-----------------------------------------------------------------------------
-// 30.10.8.4.3 appends
+// [fs.path.append] appends
GHC_INLINE path& path::operator/=(const path& p)
{
@@ -2508,7 +2565,7 @@ inline path& path::append(InputIterator first, InputIterator last)
#ifdef GHC_EXPAND_IMPL
//-----------------------------------------------------------------------------
-// 30.10.8.4.4 concatenation
+// [fs.path.concat] concatenation
GHC_INLINE path& path::operator+=(const path& x)
{
@@ -2590,7 +2647,7 @@ inline path& path::concat(InputIterator first, InputIterator last)
#ifdef GHC_EXPAND_IMPL
//-----------------------------------------------------------------------------
-// 30.10.8.4.5 modifiers
+// [fs.path.modifiers] modifiers
GHC_INLINE void path::clear() noexcept
{
_path.clear();
@@ -2640,7 +2697,7 @@ GHC_INLINE void path::swap(path& rhs) noexcept
}
//-----------------------------------------------------------------------------
-// 30.10.8.4.6, native format observers
+// [fs.path.native.obs] native format observers
GHC_INLINE const path::string_type& path::native() const noexcept
{
return _path;
@@ -2723,7 +2780,7 @@ GHC_INLINE std::u32string path::u32string() const
#endif // GHC_EXPAND_IMPL
//-----------------------------------------------------------------------------
-// 30.10.8.4.7, generic format observers
+// [fs.path.generic.obs] generic format observers
template <class EcharT, class traits, class Allocator>
inline std::basic_string<EcharT, traits, Allocator> path::generic_string(const Allocator& a) const
{
@@ -2803,7 +2860,7 @@ GHC_INLINE std::u32string path::generic_u32string() const
}
//-----------------------------------------------------------------------------
-// 30.10.8.4.8, compare
+// [fs.path.compare] compare
GHC_INLINE int path::compare(const path& p) const noexcept
{
#ifdef LWG_2936_BEHAVIOUR
@@ -2877,7 +2934,7 @@ GHC_INLINE int path::compare(const value_type* s) const
}
//-----------------------------------------------------------------------------
-// 30.10.8.4.9, decomposition
+// [fs.path.decompose] decomposition
#ifdef GHC_OS_WINDOWS
GHC_INLINE void path::handle_prefixes()
{
@@ -3009,7 +3066,7 @@ GHC_INLINE bool has_executable_extension(const path& p)
#endif
//-----------------------------------------------------------------------------
-// 30.10.8.4.10, query
+// [fs.path.query] query
GHC_INLINE bool path::empty() const noexcept
{
return _path.empty();
@@ -3072,7 +3129,7 @@ GHC_INLINE bool path::is_relative() const
}
//-----------------------------------------------------------------------------
-// 30.10.8.4.11, generation
+// [fs.path.gen] generation
GHC_INLINE path path::lexically_normal() const
{
path dest;
@@ -3148,7 +3205,7 @@ GHC_INLINE path path::lexically_proximate(const path& base) const
}
//-----------------------------------------------------------------------------
-// 30.10.8.5, iterators
+// [fs.path.itr] iterators
GHC_INLINE path::iterator::iterator() {}
GHC_INLINE path::iterator::iterator(const path& p, const impl_string_type::const_iterator& pos)
@@ -3301,7 +3358,7 @@ GHC_INLINE path::iterator path::end() const
}
//-----------------------------------------------------------------------------
-// 30.10.8.6, path non-member functions
+// [fs.path.nonmember] path non-member functions
GHC_INLINE void swap(path& lhs, path& rhs) noexcept
{
swap(lhs._path, rhs._path);
@@ -3359,7 +3416,7 @@ GHC_INLINE path operator/(const path& lhs, const path& rhs)
#endif // GHC_EXPAND_IMPL
//-----------------------------------------------------------------------------
-// 30.10.8.6.1 path inserter and extractor
+// [fs.path.io] path inserter and extractor
template <class charT, class traits>
inline std::basic_ostream<charT, traits>& operator<<(std::basic_ostream<charT, traits>& os, const path& p)
{
@@ -3416,7 +3473,7 @@ inline std::basic_istream<charT, traits>& operator>>(std::basic_istream<charT, t
#ifdef GHC_EXPAND_IMPL
//-----------------------------------------------------------------------------
-// 30.10.9 Class filesystem_error
+// [fs.class.filesystem_error] Class filesystem_error
GHC_INLINE filesystem_error::filesystem_error(const std::string& what_arg, std::error_code ec)
: std::system_error(ec, what_arg)
, _what_arg(what_arg)
@@ -3466,7 +3523,7 @@ GHC_INLINE const char* filesystem_error::what() const noexcept
}
//-----------------------------------------------------------------------------
-// 30.10.15, filesystem operations
+// [fs.op.funcs] filesystem operations
#ifdef GHC_WITH_EXCEPTIONS
GHC_INLINE path absolute(const path& p)
{
@@ -4629,6 +4686,13 @@ GHC_INLINE bool remove(const path& p, std::error_code& ec) noexcept
}
ec = detail::make_system_error(error);
}
+ else if(attr & FILE_ATTRIBUTE_READONLY) {
+ auto new_attr = attr & ~static_cast<DWORD>(FILE_ATTRIBUTE_READONLY);
+ if(!SetFileAttributesW(cstr, new_attr)) {
+ auto error = ::GetLastError();
+ ec = detail::make_system_error(error);
+ }
+ }
if (!ec) {
if (attr & FILE_ATTRIBUTE_DIRECTORY) {
if (!RemoveDirectoryW(cstr)) {
@@ -4940,8 +5004,8 @@ GHC_INLINE path weakly_canonical(const path& p, std::error_code& ec) noexcept
}
//-----------------------------------------------------------------------------
-// 30.10.11 class file_status
-// 30.10.11.1 constructors and destructor
+// [fs.class.file_status] class file_status
+// [fs.file_status.cons] constructors and destructor
GHC_INLINE file_status::file_status() noexcept
: file_status(file_type::none)
{
@@ -4982,7 +5046,7 @@ GHC_INLINE file_status& file_status::operator=(file_status&& rhs) noexcept
return *this;
}
-// 30.10.11.3 modifiers
+// [fs.file_status.mods] modifiers
GHC_INLINE void file_status::type(file_type ft) noexcept
{
_type = ft;
@@ -4993,7 +5057,7 @@ GHC_INLINE void file_status::permissions(perms prms) noexcept
_perms = prms;
}
-// 30.10.11.2 observers
+// [fs.file_status.obs] observers
GHC_INLINE file_type file_status::type() const noexcept
{
return _type;
@@ -5005,8 +5069,8 @@ GHC_INLINE perms file_status::permissions() const noexcept
}
//-----------------------------------------------------------------------------
-// 30.10.12 class directory_entry
-// 30.10.12.1 constructors and destructor
+// [fs.class.directory_entry] class directory_entry
+// [fs.dir.entry.cons] constructors and destructor
// directory_entry::directory_entry() noexcept = default;
// directory_entry::directory_entry(const directory_entry&) = default;
// directory_entry::directory_entry(directory_entry&&) noexcept = default;
@@ -5040,7 +5104,7 @@ GHC_INLINE directory_entry::~directory_entry() {}
// directory_entry& directory_entry::operator=(const directory_entry&) = default;
// directory_entry& directory_entry::operator=(directory_entry&&) noexcept = default;
-// 30.10.12.2 directory_entry modifiers
+// [fs.dir.entry.mods] directory_entry modifiers
#ifdef GHC_WITH_EXCEPTIONS
GHC_INLINE void directory_entry::assign(const filesystem::path& p)
{
@@ -5089,7 +5153,7 @@ GHC_INLINE void directory_entry::refresh(std::error_code& ec) noexcept
#endif
}
-// 30.10.12.3 directory_entry observers
+// [fs.dir.entry.obs] directory_entry observers
GHC_INLINE const filesystem::path& directory_entry::path() const noexcept
{
return _path;
@@ -5369,7 +5433,7 @@ GHC_INLINE bool directory_entry::operator>=(const directory_entry& rhs) const no
}
//-----------------------------------------------------------------------------
-// 30.10.13 class directory_iterator
+// [fs.class.directory_iterator] class directory_iterator
#ifdef GHC_OS_WINDOWS
class directory_iterator::impl
@@ -5534,8 +5598,13 @@ public:
} while (skip || std::strcmp(_entry->d_name, ".") == 0 || std::strcmp(_entry->d_name, "..") == 0);
}
}
+
void copyToDirEntry()
{
+#ifdef GHC_NO_DIRENT_D_TYPE
+ _dir_entry._symlink_status = file_status();
+ _dir_entry._status = file_status();
+#else
_dir_entry._symlink_status.permissions(perms::unknown);
switch(_entry->d_type) {
case DT_BLK: _dir_entry._symlink_status.type(file_type::block); break;
@@ -5545,6 +5614,7 @@ public:
case DT_LNK: _dir_entry._symlink_status.type(file_type::symlink); break;
case DT_REG: _dir_entry._symlink_status.type(file_type::regular); break;
case DT_SOCK: _dir_entry._symlink_status.type(file_type::socket); break;
+ case DT_UNKNOWN: _dir_entry._symlink_status.type(file_type::none); break;
default: _dir_entry._symlink_status.type(file_type::unknown); break;
}
if (_entry->d_type != DT_LNK) {
@@ -5554,6 +5624,7 @@ public:
_dir_entry._status.type(file_type::none);
_dir_entry._status.permissions(perms::unknown);
}
+#endif
_dir_entry._file_size = static_cast<uintmax_t>(-1);
_dir_entry._hard_link_count = static_cast<uintmax_t>(-1);
_dir_entry._last_write_time = 0;
@@ -5567,7 +5638,7 @@ public:
};
#endif
-// 30.10.13.1 member functions
+// [fs.dir.itr.members] member functions
GHC_INLINE directory_iterator::directory_iterator() noexcept
: _impl(new impl(path(), directory_options::none))
{
@@ -5670,7 +5741,7 @@ GHC_INLINE bool directory_iterator::operator!=(const directory_iterator& rhs) co
return _impl->_dir_entry._path != rhs._impl->_dir_entry._path;
}
-// 30.10.13.2 directory_iterator non-member functions
+// [fs.dir.itr.nonmembers] directory_iterator non-member functions
GHC_INLINE directory_iterator begin(directory_iterator iter) noexcept
{
@@ -5683,7 +5754,7 @@ GHC_INLINE directory_iterator end(const directory_iterator&) noexcept
}
//-----------------------------------------------------------------------------
-// 30.10.14 class recursive_directory_iterator
+// [fs.class.rec.dir.itr] class recursive_directory_iterator
GHC_INLINE recursive_directory_iterator::recursive_directory_iterator() noexcept
: _impl(new recursive_directory_iterator_impl(directory_options::none, true))
@@ -5729,7 +5800,7 @@ GHC_INLINE recursive_directory_iterator::recursive_directory_iterator(recursive_
GHC_INLINE recursive_directory_iterator::~recursive_directory_iterator() {}
-// 30.10.14.1 observers
+// [fs.rec.dir.itr.members] observers
GHC_INLINE directory_options recursive_directory_iterator::options() const
{
return _impl->_options;
@@ -5755,7 +5826,7 @@ GHC_INLINE const directory_entry* recursive_directory_iterator::operator->() con
return &(*(_impl->_dir_iter_stack.top()));
}
-// 30.10.14.1 modifiers recursive_directory_iterator&
+// [fs.rec.dir.itr.members] modifiers recursive_directory_iterator&
GHC_INLINE recursive_directory_iterator& recursive_directory_iterator::operator=(const recursive_directory_iterator& rhs)
{
_impl = rhs._impl;
@@ -5782,8 +5853,11 @@ GHC_INLINE recursive_directory_iterator& recursive_directory_iterator::operator+
GHC_INLINE recursive_directory_iterator& recursive_directory_iterator::increment(std::error_code& ec) noexcept
{
- bool isDir = (*this)->is_directory(ec);
- bool isSymLink = !ec && (*this)->is_symlink(ec);
+ bool isSymLink = (*this)->is_symlink(ec);
+ bool isDir = !ec && (*this)->is_directory(ec);
+ if(isSymLink && detail::is_not_found_error(ec)) {
+ ec.clear();
+ }
if(!ec) {
if (recursion_pending() && isDir && (!isSymLink || (options() & directory_options::follow_directory_symlink) != directory_options::none)) {
_impl->_dir_iter_stack.push(directory_iterator((*this)->path(), _impl->_options, ec));
@@ -5834,7 +5908,7 @@ GHC_INLINE void recursive_directory_iterator::disable_recursion_pending()
_impl->_recursion_pending = false;
}
-// other members as required by 27.2.3, input iterators
+// other members as required by [input.iterators]
GHC_INLINE bool recursive_directory_iterator::operator==(const recursive_directory_iterator& rhs) const
{
return _impl->_dir_iter_stack.top() == rhs._impl->_dir_iter_stack.top();
@@ -5845,7 +5919,7 @@ GHC_INLINE bool recursive_directory_iterator::operator!=(const recursive_directo
return _impl->_dir_iter_stack.top() != rhs._impl->_dir_iter_stack.top();
}
-// 30.10.14.2 directory_iterator non-member functions
+// [fs.rec.dir.itr.nonmembers] directory_iterator non-member functions
GHC_INLINE recursive_directory_iterator begin(recursive_directory_iterator iter) noexcept
{
return iter;
diff --git a/src/classdef.cpp b/src/classdef.cpp
index 9f2fe12..7c46c3a 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -2893,7 +2893,7 @@ void ClassDefImpl::writeMemberList(OutputList &ol) const
first = false;
}
ol.writeString(" <tr");
- if ((idx&1)==0) ol.writeString(" class=\"even\"");
+ if ((idx&1)==0) ol.writeString(" class=\"even\""); else ol.writeString(" class=\"odd\"");
idx++;
ol.writeString("><td class=\"entry\">");
if (cd->isObjectiveC())
@@ -2951,7 +2951,7 @@ void ClassDefImpl::writeMemberList(OutputList &ol) const
first = false;
}
ol.writeString(" <tr bgcolor=\"#f0f0f0\"");
- if ((idx&1)==0) ol.writeString(" class=\"even\"");
+ if ((idx&1)==0) ol.writeString(" class=\"even\""); else ol.writeString(" class=\"odd\"");
idx++;
ol.writeString("><td class=\"entry\">");
if (cd->isObjectiveC())
@@ -3406,6 +3406,7 @@ void ClassDefImpl::mergeMembers()
{
// merge the members in the base class of this inheritance branch first
bClass->mergeMembers();
+ if (bClass->getLanguage()==SrcLangExt_Python) continue; // python does not have member overloading, see issue 8480
const MemberNameInfoLinkedMap &srcMnd = bClass->memberNameInfoLinkedMap();
MemberNameInfoLinkedMap &dstMnd = m_impl->allMemberNameInfoLinkedMap;
diff --git a/src/commentcnv.l b/src/commentcnv.l
index d331fa4..aaf1162 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -134,6 +134,7 @@ MAILADR ("mailto:")?[a-z_A-Z0-9.+-]+"@"[a-z_A-Z0-9-]+("."[a-z_A-Z0-9\-]+)+[a-z
%x SkipChar
%x SComment
%x CComment
+%x CNComment
%x Verbatim
%x VerbatimCode
%x ReadLine
@@ -346,7 +347,10 @@ SLASHopt [/]*
yyextra->nestingCount=1;
clearCommentStack(yyscanner); /* to be on the save side */
copyToOutput(yyscanner,yytext,(int)yyleng);
- BEGIN(CComment);
+ if (yyextra->specialComment)
+ BEGIN(CComment);
+ else
+ BEGIN(CNComment);
yyextra->commentStack.push(yyextra->lineNr);
}
<Scan>"#"("#")? {
@@ -402,8 +406,8 @@ SLASHopt [/]*
yyextra->commentStack.push(yyextra->lineNr);
}
}
-<CComment,ReadLine>{MAILADR} |
-<CComment,ReadLine>"<"{MAILADR}">" { // Mail address, to prevent seeing e.g x@code-factory.org as start of a code block
+<CComment,CNComment,ReadLine>{MAILADR} |
+<CComment,CNComment,ReadLine>"<"{MAILADR}">" { // Mail address, to prevent seeing e.g x@code-factory.org as start of a code block
copyToOutput(yyscanner,yytext,(int)yyleng);
}
<CComment>"{@code"/[ \t\n] {
@@ -618,10 +622,10 @@ SLASHopt [/]*
copyToOutput(yyscanner,yytext,(int)yyleng);
}
-<CComment>[^ `~<\\!@*\n{\"\/]* { /* anything that is not a '*' or command */
+<CComment,CNComment>[^ `~<\\!@*\n{\"\/]* { /* anything that is not a '*' or command */
copyToOutput(yyscanner,yytext,(int)yyleng);
}
-<CComment>"*"+[^*\/\\@\n{\"]* { /* stars without slashes */
+<CComment,CNComment>"*"+[^*\/\\@\n{\"]* { /* stars without slashes */
copyToOutput(yyscanner,yytext,(int)yyleng);
}
<CComment>"\"\"\"" { /* end of Python docstring */
@@ -637,7 +641,7 @@ SLASHopt [/]*
BEGIN(Scan);
}
}
-<CComment>\n { /* new line in comment */
+<CComment,CNComment>\n { /* new line in comment */
copyToOutput(yyscanner,yytext,(int)yyleng);
/* in case of Fortran always end of comment */
if (yyextra->lang==SrcLangExt_Fortran)
@@ -645,7 +649,7 @@ SLASHopt [/]*
BEGIN(Scan);
}
}
-<CComment>"/"+"*" { /* nested C comment */
+<CComment,CNComment>"/"+"*" { /* nested C comment */
if (yyextra->lang==SrcLangExt_Python ||
yyextra->lang==SrcLangExt_Markdown)
{
@@ -655,7 +659,7 @@ SLASHopt [/]*
yyextra->commentStack.push(yyextra->lineNr);
copyToOutput(yyscanner,yytext,(int)yyleng);
}
-<CComment>"*"+"/" { /* end of C comment */
+<CComment,CNComment>"*"+"/" { /* end of C comment */
if (yyextra->lang==SrcLangExt_Python ||
yyextra->lang==SrcLangExt_Markdown)
{
@@ -676,8 +680,8 @@ SLASHopt [/]*
}
}
}
- /* Python an VHDL share CComment, so special attention for ending comments is required */
-<CComment>"\n"/[ \t]*"#" {
+ /* Python an VHDL share CComment,CNComment, so special attention for ending comments is required */
+<CComment,CNComment>"\n"/[ \t]*"#" {
if (yyextra->lang!=SrcLangExt_VHDL)
{
REJECT;
@@ -696,7 +700,7 @@ SLASHopt [/]*
}
}
}
-<CComment>"\n"/[ \t]*"-" {
+<CComment,CNComment>"\n"/[ \t]*"-" {
if (yyextra->lang!=SrcLangExt_Python || yyextra->pythonDocString)
{
REJECT;
@@ -707,7 +711,7 @@ SLASHopt [/]*
BEGIN(Scan);
}
}
-<CComment>"\n"/[ \t]*[^ \t#\-] {
+<CComment,CNComment>"\n"/[ \t]*[^ \t#\-] {
if (yyextra->lang==SrcLangExt_Python)
{
if (yyextra->pythonDocString)
@@ -739,18 +743,18 @@ SLASHopt [/]*
}
}
/* removed for bug 674842 (bug was introduced in rev 768)
-<CComment>"'" {
+<CComment,CNComment>"'" {
yyextra->charContext = YY_START;
copyToOutput(yyscanner,yytext,(int)yyleng);
BEGIN(SkipChar);
}
-<CComment>"\"" {
+<CComment,CNComment>"\"" {
yyextra->stringContext = YY_START;
copyToOutput(yyscanner,yytext,(int)yyleng);
BEGIN(SkipString);
}
*/
-<CComment>. {
+<CComment,CNComment>. {
copyToOutput(yyscanner,yytext,(int)yyleng);
}
<SComment>^[ \t]*{CPPC}"/"{SLASHopt}/\n {
@@ -838,7 +842,7 @@ SLASHopt [/]*
copyToOutput(yyscanner,yytext,(int)yyleng);
BEGIN(yyextra->readLineCtx);
}
-<CComment,ReadLine>[\\@][\\@][~a-z_A-Z][a-z_A-Z0-9]*[ \t]* { // escaped command
+<CComment,CNComment,ReadLine>[\\@][\\@][~a-z_A-Z][a-z_A-Z0-9]*[ \t]* { // escaped command
copyToOutput(yyscanner,yytext,(int)yyleng);
}
<CComment,ReadLine>[\\@]"cond"/[^a-z_A-Z0-9] { // conditional section
diff --git a/src/commentscan.l b/src/commentscan.l
index 23a0471..2bc1b55 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -1479,7 +1479,7 @@ STopt [^\n@\\]*
/* ----- handle arguments of the preformatted block commands ------- */
-<FormatBlock>{CMD}("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endrtfonly"|"endmanonly"|"enddot"|"endcode"|"endmsc"|"endvhdlflow")/{NW} { // possible ends
+<FormatBlock>{CMD}("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endrtfonly"|"endmanonly"|"enddot"|"endcode"|"endmsc")/{NW} { // possible ends
addOutput(yyscanner,yytext);
if (&yytext[4]==yyextra->blockName) // found end of the block
{
diff --git a/src/configgen.py b/src/configgen.py
index 5c4c39a..b7736c4 100755
--- a/src/configgen.py
+++ b/src/configgen.py
@@ -696,34 +696,35 @@ def main():
print(" static ConfigValues &instance() { static ConfigValues theInstance; return theInstance; }")
for n in elem.childNodes:
if n.nodeType == Node.ELEMENT_NODE:
- if (n.nodeName == "group"):
+ if n.nodeName == "group":
parseGroupMapGetter(n)
for n in elem.childNodes:
if n.nodeType == Node.ELEMENT_NODE:
- if (n.nodeName == "group"):
+ if n.nodeName == "group":
parseGroupMapSetter(n)
print(" void init();")
- print(" struct Info");
- print(" {");
- print(" enum Type { Bool, Int, String, List, Unknown };");
- print(" Info(Type t,bool ConfigValues::*b) : type(t), value(b) {}");
- print(" Info(Type t,int ConfigValues::*i) : type(t), value(i) {}");
- print(" Info(Type t,QCString ConfigValues::*s) : type(t), value(s) {}");
- print(" Info(Type t,StringVector ConfigValues::*l) : type(t), value(l) {}");
- print(" Type type;");
- print(" union Item");
- print(" {");
- print(" Item(bool ConfigValues::*v) : b(v) {}");
- print(" Item(int ConfigValues::*v) : i(v) {}");
- print(" Item(QCString ConfigValues::*v) : s(v) {}");
- print(" Item(StringVector ConfigValues::*v) : l(v) {}");
- print(" bool ConfigValues::*b;");
- print(" int ConfigValues::*i;");
- print(" QCString ConfigValues::*s;");
- print(" StringVector ConfigValues::*l;");
- print(" } value;");
- print(" };");
- print(" const Info *get(const QCString &tag) const;");
+ print(" StringVector fields() const;")
+ print(" struct Info")
+ print(" {")
+ print(" enum Type { Bool, Int, String, List, Unknown };")
+ print(" Info(Type t,bool ConfigValues::*b) : type(t), value(b) {}")
+ print(" Info(Type t,int ConfigValues::*i) : type(t), value(i) {}")
+ print(" Info(Type t,QCString ConfigValues::*s) : type(t), value(s) {}")
+ print(" Info(Type t,StringVector ConfigValues::*l) : type(t), value(l) {}")
+ print(" Type type;")
+ print(" union Item")
+ print(" {")
+ print(" Item(bool ConfigValues::*v) : b(v) {}")
+ print(" Item(int ConfigValues::*v) : i(v) {}")
+ print(" Item(QCString ConfigValues::*v) : s(v) {}")
+ print(" Item(StringVector ConfigValues::*v) : l(v) {}")
+ print(" bool ConfigValues::*b;")
+ print(" int ConfigValues::*i;")
+ print(" QCString ConfigValues::*s;")
+ print(" StringVector ConfigValues::*l;")
+ print(" } value;")
+ print(" };")
+ print(" const Info *get(const QCString &tag) const;")
print(" private:")
for n in elem.childNodes:
if n.nodeType == Node.ELEMENT_NODE:
@@ -765,6 +766,26 @@ def main():
if (n.nodeName == "group"):
parseGroupInit(n)
print("}")
+ print("")
+ print("StringVector ConfigValues::fields() const")
+ print("{")
+ print(" return {");
+ first=True
+ for n in elem.childNodes:
+ if n.nodeType == Node.ELEMENT_NODE:
+ if (n.nodeName == "group"):
+ for c in n.childNodes:
+ if c.nodeType == Node.ELEMENT_NODE:
+ name = c.getAttribute('id')
+ type = c.getAttribute('type')
+ if type!='obsolete':
+ if not first:
+ print(",")
+ first=False
+ sys.stdout.write(' "'+name+'"')
+ print("")
+ print(" };")
+ print("}")
elif (sys.argv[1] == "-cpp"):
print("/* WARNING: This file is generated!")
print(" * Do not edit this file, but edit config.xml instead and run")
diff --git a/src/context.cpp b/src/context.cpp
index 2ae62a0..6835d98 100644
--- a/src/context.cpp
+++ b/src/context.cpp
@@ -279,6 +279,17 @@ class PropertyMapper
return it!=m_map.end() ? (*it->second)(obj) : TemplateVariant();
}
+ StringVector fields() const
+ {
+ StringVector result;
+ for (const auto &kv : m_map)
+ {
+ result.push_back(kv.first);
+ }
+ std::sort(result.begin(),result.end());
+ return result;
+ }
+
private:
std::unordered_map<std::string,std::unique_ptr<PropertyFuncIntf>> m_map;
};
@@ -364,6 +375,11 @@ TemplateVariant ConfigContext::get(const QCString &name) const
return result;
}
+StringVector ConfigContext::fields() const
+{
+ return ConfigValues::instance().fields();
+}
+
//------------------------------------------------------------------------
//%% struct Doxygen: global information
@@ -379,9 +395,13 @@ class DoxygenContext::Private
{
return dateToString(TRUE);
}
- TemplateVariant maxJaxCodeFile() const
+ TemplateVariant mathJaxCodeFile() const
{
- return m_cache.maxJaxCodeFile;
+ return m_cache.mathJaxCodeFile;
+ }
+ TemplateVariant mathJaxMacros() const
+ {
+ return m_cache.mathJaxMacros;
}
Private()
{
@@ -393,7 +413,9 @@ class DoxygenContext::Private
//%% string date
s_inst.addProperty("date", &Private::date);
//%% string maxJaxCodeFile
- s_inst.addProperty("mathJaxCodeFile", &Private::maxJaxCodeFile);
+ s_inst.addProperty("mathJaxCodeFile", &Private::mathJaxCodeFile);
+ //%% string maxJaxMacros
+ s_inst.addProperty("mathJaxMacros", &Private::mathJaxMacros);
init=TRUE;
}
}
@@ -401,11 +423,19 @@ class DoxygenContext::Private
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
private:
struct Cachable
{
- Cachable() { maxJaxCodeFile=fileToString(Config_getString(MATHJAX_CODEFILE)); }
- QCString maxJaxCodeFile;
+ Cachable() {
+ mathJaxCodeFile=fileToString(Config_getString(MATHJAX_CODEFILE));
+ mathJaxMacros=HtmlGenerator::getMathJaxMacros();
+ }
+ QCString mathJaxCodeFile;
+ QCString mathJaxMacros;
};
mutable Cachable m_cache;
static PropertyMapper<DoxygenContext::Private> s_inst;
@@ -430,6 +460,11 @@ TemplateVariant DoxygenContext::get(const QCString &n) const
return p->get(n);
}
+StringVector DoxygenContext::fields() const
+{
+ return p->fields();
+}
+
//------------------------------------------------------------------------
//%% struct Translator: translation methods
@@ -1019,6 +1054,10 @@ class TranslateContext::Private
{
return HtmlHelp::getLanguageString();
}
+ TemplateVariant code() const
+ {
+ return theTranslator->trCode();
+ }
Private()
{
static bool init=FALSE;
@@ -1214,6 +1253,8 @@ class TranslateContext::Private
s_inst.addProperty("examplesDescription",&Private::examplesDescription);
//%% string langstring
s_inst.addProperty("langString", &Private::langString);
+ //%% string code
+ s_inst.addProperty("code", &Private::code);
init=TRUE;
}
@@ -1227,6 +1268,10 @@ class TranslateContext::Private
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
private:
bool m_javaOpt;
bool m_fortranOpt;
@@ -1253,6 +1298,11 @@ TemplateVariant TranslateContext::get(const QCString &n) const
return p->get(n);
}
+StringVector TranslateContext::fields() const
+{
+ return p->fields();
+}
+
static TemplateVariant parseDoc(const Definition *def,const QCString &file,int line,
const QCString &relPath,const QCString &docStr,bool isBrief)
{
@@ -1698,6 +1748,10 @@ class IncludeInfoContext::Private
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant isLocal() const
{
bool isIDLorJava = m_lang==SrcLangExt_IDL || m_lang==SrcLangExt_Java;
@@ -1749,6 +1803,12 @@ TemplateVariant IncludeInfoContext::get(const QCString &n) const
{
return p->get(n);
}
+
+StringVector IncludeInfoContext::fields() const
+{
+ return p->fields();
+}
+
//%% }
//------------------------------------------------------------------------
@@ -1881,6 +1941,10 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant title() const
{
return TemplateVariant(m_classDef->title());
@@ -2652,6 +2716,11 @@ TemplateVariant ClassContext::get(const QCString &n) const
return p->get(n);
}
+StringVector ClassContext::fields() const
+{
+ return p->fields();
+}
+
//------------------------------------------------------------------------
//%% struct Namespace(Symbol): namespace information
@@ -2698,6 +2767,10 @@ class NamespaceContext::Private : public DefinitionContext<NamespaceContext::Pri
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant title() const
{
return TemplateVariant(m_namespaceDef->title());
@@ -2943,6 +3016,11 @@ TemplateVariant NamespaceContext::get(const QCString &n) const
return p->get(n);
}
+StringVector NamespaceContext::fields() const
+{
+ return p->fields();
+}
+
//------------------------------------------------------------------------
//%% struct File(Symbol): file information
@@ -2999,6 +3077,10 @@ class FileContext::Private : public DefinitionContext<FileContext::Private>
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant title() const
{
return m_fileDef->title();
@@ -3395,6 +3477,11 @@ TemplateVariant FileContext::get(const QCString &n) const
return p->get(n);
}
+StringVector FileContext::fields() const
+{
+ return p->fields();
+}
+
//------------------------------------------------------------------------
//%% struct Dir(Symbol): directory information
@@ -3427,6 +3514,10 @@ class DirContext::Private : public DefinitionContext<DirContext::Private>
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant title() const
{
return TemplateVariant(m_dirDef->shortTitle());
@@ -3584,6 +3675,11 @@ TemplateVariant DirContext::get(const QCString &n) const
return p->get(n);
}
+StringVector DirContext::fields() const
+{
+ return p->fields();
+}
+
//------------------------------------------------------------------------
//%% struct Page(Symbol): page information
@@ -3612,6 +3708,10 @@ class PageContext::Private : public DefinitionContext<PageContext::Private>
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant title() const
{
if (m_isMainPage)
@@ -3717,6 +3817,11 @@ TemplateVariant PageContext::get(const QCString &n) const
return p->get(n);
}
+StringVector PageContext::fields() const
+{
+ return p->fields();
+}
+
//------------------------------------------------------------------------
class TextGeneratorHtml : public TextGeneratorIntf
@@ -4063,6 +4168,10 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant fieldType() const
{
return createLinkedText(m_memberDef,relPathAsString(),m_memberDef->fieldType());
@@ -5164,6 +5273,10 @@ TemplateVariant MemberContext::get(const QCString &n) const
return p->get(n);
}
+StringVector MemberContext::fields() const
+{
+ return p->fields();
+}
//------------------------------------------------------------------------
@@ -5229,6 +5342,10 @@ class ModuleContext::Private : public DefinitionContext<ModuleContext::Private>
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant title() const
{
return TemplateVariant(m_groupDef->groupTitle());
@@ -5675,6 +5792,11 @@ TemplateVariant ModuleContext::get(const QCString &n) const
return p->get(n);
}
+StringVector ModuleContext::fields() const
+{
+ return p->fields();
+}
+
//------------------------------------------------------------------------
//%% list ClassList[Class] : list of classes
@@ -5753,6 +5875,10 @@ class ClassIndexContext::Private
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant list() const
{
if (!m_cache.classes)
@@ -5840,6 +5966,11 @@ TemplateVariant ClassIndexContext::get(const QCString &n) const
return p->get(n);
}
+StringVector ClassIndexContext::fields() const
+{
+ return p->fields();
+}
+
//------------------------------------------------------------------------
static int computeMaxDepth(const TemplateListIntf *list)
@@ -5945,6 +6076,10 @@ class ClassHierarchyContext::Private
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant tree() const
{
return m_classTree.get();
@@ -6053,6 +6188,11 @@ TemplateVariant ClassHierarchyContext::get(const QCString &name) const
return p->get(name);
}
+StringVector ClassHierarchyContext::fields() const
+{
+ return p->fields();
+}
+
//------------------------------------------------------------------------
//%% struct NestingNode: node is a nesting relation tree
@@ -6066,6 +6206,7 @@ class NestingNodeContext::Private
: m_parent(parent), m_def(d), m_level(level), m_index(index)
{
m_children.reset(NestingContext::alloc(thisNode,level+1));
+ m_members.reset(NestingContext::alloc(thisNode,level+1));
static bool init=FALSE;
if (!init)
{
@@ -6073,6 +6214,8 @@ class NestingNodeContext::Private
s_inst.addProperty("is_leaf_node",&Private::isLeafNode);
//%% Nesting children: list of nested classes/namespaces
s_inst.addProperty("children",&Private::children);
+ //%% Nesting children: list of nested classes/namespaces
+ s_inst.addProperty("members",&Private::members);
//%% [optional] Class class: class info (if this node represents a class)
s_inst.addProperty("class",&Private::getClass);
//%% [optional] Namespace namespace: namespace info (if this node represents a namespace)
@@ -6085,6 +6228,8 @@ class NestingNodeContext::Private
s_inst.addProperty("page",&Private::getPage);
//%% [optional] Module module: module info (if this node represents a module)
s_inst.addProperty("module",&Private::getModule);
+ //%% [optional] Member member: member info (if this node represents a member)
+ s_inst.addProperty("member",&Private::getMember);
//%% int id
s_inst.addProperty("id",&Private::id);
//%% string level
@@ -6107,11 +6252,16 @@ class NestingNodeContext::Private
addDirFiles(visitedClasses);
addPages(visitedClasses);
addModules(visitedClasses);
+ addMembers(visitedClasses);
}
TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant isLeafNode() const
{
return m_children->count()==0;
@@ -6120,6 +6270,10 @@ class NestingNodeContext::Private
{
return m_children.get();
}
+ TemplateVariant members() const
+ {
+ return m_members.get();
+ }
TemplateVariant getClass() const
{
if (!m_cache.classContext && m_def->definitionType()==Definition::TypeClass)
@@ -6210,6 +6364,21 @@ class NestingNodeContext::Private
return TemplateVariant(FALSE);
}
}
+ TemplateVariant getMember() const
+ {
+ if (!m_cache.memberContext && m_def->definitionType()==Definition::TypeMember)
+ {
+ m_cache.memberContext.reset(MemberContext::alloc(toMemberDef(m_def)));
+ }
+ if (m_cache.memberContext)
+ {
+ return m_cache.memberContext.get();
+ }
+ else
+ {
+ return TemplateVariant(FALSE);
+ }
+ }
TemplateVariant level() const
{
return m_level;
@@ -6272,26 +6441,26 @@ class NestingNodeContext::Private
void addClasses(bool inherit, bool hideSuper,ClassDefSet &visitedClasses)
{
const ClassDef *cd = toClassDef(m_def);
- if (cd && inherit)
+ if (cd)
{
- bool hasChildren = visitedClasses.find(cd)==visitedClasses.end() &&
- !hideSuper && classHasVisibleChildren(cd);
- if (hasChildren)
+ if (inherit)
{
- visitedClasses.insert(cd);
- if (cd->getLanguage()==SrcLangExt_VHDL)
- {
- m_children->addDerivedClasses(cd->baseClasses(),false,visitedClasses);
- }
- else
+ bool hasChildren = visitedClasses.find(cd)==visitedClasses.end() &&
+ !hideSuper && classHasVisibleChildren(cd);
+ if (hasChildren)
{
- m_children->addDerivedClasses(cd->subClasses(),false,visitedClasses);
+ visitedClasses.insert(cd);
+ if (cd->getLanguage()==SrcLangExt_VHDL)
+ {
+ m_children->addDerivedClasses(cd->baseClasses(),false,visitedClasses);
+ }
+ else
+ {
+ m_children->addDerivedClasses(cd->subClasses(),false,visitedClasses);
+ }
}
}
- }
- else
- {
- if (cd)
+ else
{
m_children->addClasses(cd->getClasses(),FALSE,visitedClasses);
}
@@ -6300,13 +6469,16 @@ class NestingNodeContext::Private
void addNamespaces(bool addClasses,ClassDefSet &visitedClasses)
{
const NamespaceDef *nd = toNamespaceDef(m_def);
- if (nd && !nd->getNamespaces().empty())
- {
- m_children->addNamespaces(nd->getNamespaces(),FALSE,addClasses,visitedClasses);
- }
- if (addClasses && nd)
+ if (nd)
{
- m_children->addClasses(nd->getClasses(),FALSE,visitedClasses);
+ if (!nd->getNamespaces().empty())
+ {
+ m_children->addNamespaces(nd->getNamespaces(),FALSE,addClasses,visitedClasses);
+ }
+ if (addClasses)
+ {
+ m_children->addClasses(nd->getClasses(),FALSE,visitedClasses);
+ }
}
}
void addDirFiles(ClassDefSet &visitedClasses)
@@ -6334,10 +6506,53 @@ class NestingNodeContext::Private
m_children->addModules(gd->getSubGroups(),visitedClasses);
}
}
+ void addMembers(ClassDefSet &visitedClasses)
+ {
+ if (m_def->definitionType()==Definition::TypeNamespace)
+ {
+ // add namespace members
+ for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
+ {
+ if (lde->kind()==LayoutDocEntry::MemberDef)
+ {
+ const LayoutDocEntryMemberDef *lmd = (const LayoutDocEntryMemberDef*)lde.get();
+ const MemberList *ml = toNamespaceDef(m_def)->getMemberList(lmd->type);
+ m_members->addMembers(ml,visitedClasses);
+ }
+ }
+ }
+ else if (m_def->definitionType()==Definition::TypeClass)
+ {
+ // add class members
+ for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
+ {
+ if (lde->kind()==LayoutDocEntry::MemberDef)
+ {
+ const LayoutDocEntryMemberDef *lmd = (const LayoutDocEntryMemberDef*)lde.get();
+ const MemberList *ml = toClassDef(m_def)->getMemberList(lmd->type);
+ m_members->addMembers(ml,visitedClasses);
+ }
+ }
+ }
+ else if (m_def->definitionType()==Definition::TypeFile)
+ {
+ // add class members
+ for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::File))
+ {
+ if (lde->kind()==LayoutDocEntry::MemberDef)
+ {
+ const LayoutDocEntryMemberDef *lmd = (const LayoutDocEntryMemberDef*)lde.get();
+ const MemberList *ml = toFileDef(m_def)->getMemberList(lmd->type);
+ m_members->addMembers(ml,visitedClasses);
+ }
+ }
+ }
+ }
private:
const NestingNodeContext *m_parent;
const Definition *m_def;
SharedPtr<NestingContext> m_children;
+ SharedPtr<NestingContext> m_members;
int m_level;
int m_index;
struct Cachable
@@ -6348,6 +6563,7 @@ class NestingNodeContext::Private
SharedPtr<FileContext> fileContext;
SharedPtr<PageContext> pageContext;
SharedPtr<ModuleContext> moduleContext;
+ SharedPtr<MemberContext> memberContext;
ScopedPtr<TemplateVariant> brief;
};
mutable Cachable m_cache;
@@ -6375,6 +6591,11 @@ TemplateVariant NestingNodeContext::get(const QCString &n) const
return p->get(n);
}
+StringVector NestingNodeContext::fields() const
+{
+ return p->fields();
+}
+
QCString NestingNodeContext::id() const
{
return p->id().toString();
@@ -6485,7 +6706,8 @@ class NestingContext::Private : public GenericNodeListContext
{
if (fd->getDirDef()==0) // top level file
{
- append(NestingNodeContext::alloc(m_parent,fd.get(),m_index,m_level,FALSE,FALSE,FALSE,visitedClasses));
+ NestingNodeContext *nnc = NestingNodeContext::alloc(m_parent,fd.get(),m_index,m_level,FALSE,FALSE,FALSE,visitedClasses);
+ append(nnc);
m_index++;
}
}
@@ -6495,7 +6717,8 @@ class NestingContext::Private : public GenericNodeListContext
{
for (const auto &fd : fList)
{
- append(NestingNodeContext::alloc(m_parent,fd,m_index,m_level,FALSE,FALSE,FALSE,visitedClasses));
+ NestingNodeContext *nnc=NestingNodeContext::alloc(m_parent,fd,m_index,m_level,FALSE,FALSE,FALSE,visitedClasses);
+ append(nnc);
m_index++;
}
}
@@ -6605,6 +6828,21 @@ class NestingContext::Private : public GenericNodeListContext
}
}
}
+ void addMembers(const MemberList *ml,ClassDefSet &visitedClasses)
+ {
+ if (ml)
+ {
+ for (const auto &md : *ml)
+ {
+ if (md->visibleInIndex())
+ {
+ NestingNodeContext *nnc = NestingNodeContext::alloc(m_parent,md,m_index,m_level+1,TRUE,TRUE,FALSE,visitedClasses);
+ append(nnc);
+ m_index++;
+ }
+ }
+ }
+ }
private:
const NestingNodeContext *m_parent;
@@ -6708,6 +6946,11 @@ void NestingContext::addDerivedClasses(const BaseClassList &bcl,bool hideSuper,C
p->addDerivedClasses(bcl,hideSuper,visitedClasses);
}
+void NestingContext::addMembers(const MemberList *ml,ClassDefSet &visitedClasses)
+{
+ p->addMembers(ml,visitedClasses);
+}
+
//------------------------------------------------------------------------
//%% struct ClassTree: Class nesting relations
@@ -6740,6 +6983,10 @@ class ClassTreeContext::Private
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant tree() const
{
return m_classTree.get();
@@ -6828,6 +7075,11 @@ TemplateVariant ClassTreeContext::get(const QCString &name) const
return p->get(name);
}
+StringVector ClassTreeContext::fields() const
+{
+ return p->fields();
+}
+
//------------------------------------------------------------------------
//%% list NamespaceList[Namespace] : list of namespaces
@@ -6904,6 +7156,10 @@ class NamespaceTreeContext::Private
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant tree() const
{
return m_namespaceTree.get();
@@ -6994,6 +7250,12 @@ TemplateVariant NamespaceTreeContext::get(const QCString &name) const
return p->get(name);
}
+StringVector NamespaceTreeContext::fields() const
+{
+ return p->fields();
+}
+
+
//------------------------------------------------------------------------
//%% list FileList[File] : list of files
@@ -7174,6 +7436,10 @@ class FileTreeContext::Private
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant tree() const
{
return m_dirFileTree.get();
@@ -7249,6 +7515,11 @@ TemplateVariant FileTreeContext::get(const QCString &name) const
return p->get(name);
}
+StringVector FileTreeContext::fields() const
+{
+ return p->fields();
+}
+
//------------------------------------------------------------------------
//%% struct PageTree: tree of related pages
@@ -7282,6 +7553,10 @@ class PageTreeContext::Private
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant tree() const
{
return m_pageTree.get();
@@ -7357,6 +7632,11 @@ TemplateVariant PageTreeContext::get(const QCString &name) const
return p->get(name);
}
+StringVector PageTreeContext::fields() const
+{
+ return p->fields();
+}
+
//------------------------------------------------------------------------
//%% list PageList[Page]: list of pages
@@ -7524,6 +7804,10 @@ class ModuleTreeContext::Private
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant tree() const
{
return m_moduleTree.get();
@@ -7599,6 +7883,11 @@ TemplateVariant ModuleTreeContext::get(const QCString &name) const
return p->get(name);
}
+StringVector ModuleTreeContext::fields() const
+{
+ return p->fields();
+}
+
//------------------------------------------------------------------------
//%% struct NavPathElem: list of examples page
@@ -7624,6 +7913,10 @@ class NavPathElemContext::Private
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant isLinkable() const
{
return m_def->isLinkable();
@@ -7693,6 +7986,10 @@ TemplateVariant NavPathElemContext::get(const QCString &name) const
return p->get(name);
}
+StringVector NavPathElemContext::fields() const
+{
+ return p->fields();
+}
//------------------------------------------------------------------------
@@ -7726,6 +8023,10 @@ class ExampleTreeContext::Private
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant tree() const
{
return m_exampleTree.get();
@@ -7801,6 +8102,11 @@ TemplateVariant ExampleTreeContext::get(const QCString &name) const
return p->get(name);
}
+StringVector ExampleTreeContext::fields() const
+{
+ return p->fields();
+}
+
//------------------------------------------------------------------------
//%% struct GlobalsIndex: list of examples page
@@ -7835,6 +8141,10 @@ class GlobalsIndexContext::Private
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
typedef bool (MemberDef::*MemberFunc)() const;
TemplateVariant getMembersFiltered(SharedPtr<TemplateList> &listRef,MemberFunc filter) const
{
@@ -7954,6 +8264,12 @@ TemplateVariant GlobalsIndexContext::get(const QCString &name) const
return p->get(name);
}
+StringVector GlobalsIndexContext::fields() const
+{
+ return p->fields();
+}
+
+
//------------------------------------------------------------------------
//%% struct ClassMembersIndex: list of examples page
@@ -7988,6 +8304,10 @@ class ClassMembersIndexContext::Private
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
typedef bool (MemberDef::*MemberFunc)() const;
TemplateVariant getMembersFiltered(SharedPtr<TemplateList> &listRef,MemberFunc filter) const
{
@@ -8109,6 +8429,11 @@ TemplateVariant ClassMembersIndexContext::get(const QCString &name) const
return p->get(name);
}
+StringVector ClassMembersIndexContext::fields() const
+{
+ return p->fields();
+}
+
//------------------------------------------------------------------------
//%% struct NamespaceMembersIndex: list of examples page
@@ -8143,6 +8468,10 @@ class NamespaceMembersIndexContext::Private
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
typedef bool (MemberDef::*MemberFunc)() const;
TemplateVariant getMembersFiltered(SharedPtr<TemplateList> &listRef,MemberFunc filter) const
{
@@ -8261,6 +8590,11 @@ TemplateVariant NamespaceMembersIndexContext::get(const QCString &name) const
return p->get(name);
}
+StringVector NamespaceMembersIndexContext::fields() const
+{
+ return p->fields();
+}
+
//------------------------------------------------------------------------
//%% struct InheritanceGraph: a connected graph representing part of the overall inheritance tree
@@ -8281,6 +8615,10 @@ class InheritanceGraphContext::Private
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant graph() const
{
TextStream t;
@@ -8322,6 +8660,10 @@ TemplateVariant InheritanceGraphContext::get(const QCString &name) const
return p->get(name);
}
+StringVector InheritanceGraphContext::fields() const
+{
+ return p->fields();
+}
//------------------------------------------------------------------------
@@ -8344,6 +8686,10 @@ class InheritanceNodeContext::Private
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant getClass() const
{
if (!m_classContext)
@@ -8381,6 +8727,11 @@ TemplateVariant InheritanceNodeContext::get(const QCString &name) const
return p->get(name);
}
+StringVector InheritanceNodeContext::fields() const
+{
+ return p->fields();
+}
+
//------------------------------------------------------------------------
//%% list InheritanceList[InheritanceNode] : list of inherited classes
@@ -8528,6 +8879,10 @@ class MemberInfoContext::Private
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant protection() const
{
switch (m_memberInfo->prot())
@@ -8592,6 +8947,10 @@ TemplateVariant MemberInfoContext::get(const QCString &name) const
return p->get(name);
}
+StringVector MemberInfoContext::fields() const
+{
+ return p->fields();
+}
//------------------------------------------------------------------------
@@ -8680,6 +9039,10 @@ class MemberGroupInfoContext::Private
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant members() const
{
if (!m_cache.memberListContext)
@@ -8764,6 +9127,11 @@ TemplateVariant MemberGroupInfoContext::get(const QCString &name) const
return p->get(name);
}
+StringVector MemberGroupInfoContext::fields() const
+{
+ return p->fields();
+}
+
//------------------------------------------------------------------------
//%% list MemberGroupList[MemberGroupInfo] : list of member groups
@@ -8854,6 +9222,10 @@ class MemberListInfoContext::Private
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant members() const
{
if (!m_cache.memberListContext)
@@ -8936,6 +9308,11 @@ TemplateVariant MemberListInfoContext::get(const QCString &name) const
return p->get(name);
}
+StringVector MemberListInfoContext::fields() const
+{
+ return p->fields();
+}
+
//------------------------------------------------------------------------
//%% struct InheritedMemberInfo: inherited member information
@@ -8961,6 +9338,10 @@ class InheritedMemberInfoContext::Private
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
virtual ~Private()
{
delete m_memberList;
@@ -9030,6 +9411,11 @@ TemplateVariant InheritedMemberInfoContext::get(const QCString &name) const
return p->get(name);
}
+StringVector InheritedMemberInfoContext::fields() const
+{
+ return p->fields();
+}
+
//------------------------------------------------------------------------
//%% list InheritedMemberList[InheritedMemberInfo] : list of inherited classes
@@ -9193,6 +9579,10 @@ class ArgumentContext::Private
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant type() const
{
return createLinkedText(m_def,m_relPath,m_argument.type);
@@ -9271,6 +9661,11 @@ TemplateVariant ArgumentContext::get(const QCString &name) const
return p->get(name);
}
+StringVector ArgumentContext::fields() const
+{
+ return p->fields();
+}
+
//------------------------------------------------------------------------
//%% list ArgumentList[Argument] : list of inherited classes
@@ -9360,6 +9755,10 @@ class SymbolContext::Private
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant fileName() const
{
return m_def->getOutputFileBase();
@@ -9377,61 +9776,82 @@ class SymbolContext::Private
const Definition *prevScope = prev ? prev->getOuterScope() : 0;
const MemberDef *md = toMemberDef(m_def);
bool isFunctionLike = md && (md->isFunction() || md->isSlot() || md->isSignal());
- bool overloadedFunction = isFunctionLike &&
- ((prevScope!=0 && scope==prevScope) || (scope && scope==nextScope));
- QCString prefix;
- if (md) prefix=md->localName();
- if (overloadedFunction) // overloaded member function
- {
- prefix+=md->argsString();
- // show argument list to disambiguate overloaded functions
- }
- else if (md && isFunctionLike) // unique member function
- {
- prefix+="()"; // only to show it is a function
- }
- bool found=FALSE;
+ bool overloadedFunction = ((prevScope!=0 && scope==prevScope) || (scope && scope==nextScope)) &&
+ md && (md->isFunction() || md->isSlot());
+
QCString name;
- if (m_def->definitionType()==Definition::TypeClass)
+ if (prev==0 && next==0) // unique name
{
- name = m_def->displayName();
- found = TRUE;
- }
- else if (m_def->definitionType()==Definition::TypeNamespace)
- {
- name = m_def->displayName();
- found = TRUE;
- }
- else if (scope==0 || scope==Doxygen::globalScope) // in global scope
- {
- if (md)
+ if (scope!=Doxygen::globalScope)
+ {
+ name = scope->name();
+ }
+ else if (md)
{
const FileDef *fd = md->getBodyDef();
if (fd==0) fd = md->getFileDef();
if (fd)
{
- if (!prefix.isEmpty()) prefix+=": ";
- name = prefix + convertToXML(fd->localName());
- found = TRUE;
+ name = fd->localName();
}
}
}
- else if (md && (md->getClassDef() || md->getNamespaceDef()))
- // member in class or namespace scope
- {
- SrcLangExt lang = md->getLanguage();
- name = m_def->getOuterScope()->qualifiedName()
- + getLanguageSpecificSeparator(lang) + prefix;
- found = TRUE;
- }
- else if (scope) // some thing else? -> show scope
- {
- name = prefix + convertToXML(scope->name());
- found = TRUE;
- }
- if (!found) // fallback
+ else
{
- name = prefix + "("+theTranslator->trGlobalNamespace()+")";
+
+ QCString prefix;
+ if (md) prefix=md->localName();
+ if (overloadedFunction) // overloaded member function
+ {
+ prefix+=md->argsString();
+ // show argument list to disambiguate overloaded functions
+ }
+ else if (md && isFunctionLike) // unique member function
+ {
+ prefix+="()"; // only to show it is a function
+ }
+ bool found=FALSE;
+ if (m_def->definitionType()==Definition::TypeClass)
+ {
+ name = m_def->displayName();
+ found = TRUE;
+ }
+ else if (m_def->definitionType()==Definition::TypeNamespace)
+ {
+ name = m_def->displayName();
+ found = TRUE;
+ }
+ else if (scope==0 || scope==Doxygen::globalScope) // in global scope
+ {
+ if (md)
+ {
+ const FileDef *fd = md->getBodyDef();
+ if (fd==0) fd = md->getFileDef();
+ if (fd)
+ {
+ if (!prefix.isEmpty()) prefix+=": ";
+ name = prefix + convertToXML(fd->localName());
+ found = TRUE;
+ }
+ }
+ }
+ else if (md && (md->resolveAlias()->getClassDef() || md->resolveAlias()->getNamespaceDef()))
+ // member in class or namespace scope
+ {
+ SrcLangExt lang = md->getLanguage();
+ name = m_def->getOuterScope()->qualifiedName()
+ + getLanguageSpecificSeparator(lang) + prefix;
+ found = TRUE;
+ }
+ else if (scope) // some thing else? -> show scope
+ {
+ name = prefix + convertToXML(scope->name());
+ found = TRUE;
+ }
+ if (!found) // fallback
+ {
+ name = prefix + "("+theTranslator->trGlobalNamespace()+")";
+ }
}
return name;
}
@@ -9465,6 +9885,11 @@ TemplateVariant SymbolContext::get(const QCString &name) const
return p->get(name);
}
+StringVector SymbolContext::fields() const
+{
+ return p->fields();
+}
+
//------------------------------------------------------------------------
//%% list SymbolList[Symbol] : list of search symbols with the same name
@@ -9537,6 +9962,10 @@ class SymbolGroupContext::Private
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant id() const
{
return searchId(*m_start);
@@ -9584,6 +10013,11 @@ TemplateVariant SymbolGroupContext::get(const QCString &name) const
return p->get(name);
}
+StringVector SymbolGroupContext::fields() const
+{
+ return p->fields();
+}
+
//------------------------------------------------------------------------
//%% list SymbolGroupList[SymbolGroup] : list of search groups one per by name
@@ -9600,7 +10034,10 @@ class SymbolGroupListContext::Private : public GenericNodeListContext
QCString name = searchName(*it);
if (name!=lastName)
{
- append(SymbolGroupContext::alloc(it_begin,it));
+ if (it!=it_begin)
+ {
+ append(SymbolGroupContext::alloc(it_begin,it));
+ }
it_begin = it;
lastName = name;
}
@@ -9664,6 +10101,10 @@ class SymbolIndexContext::Private
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant name() const
{
return m_name;
@@ -9711,6 +10152,11 @@ TemplateVariant SymbolIndexContext::get(const QCString &name) const
return p->get(name);
}
+StringVector SymbolIndexContext::fields() const
+{
+ return p->fields();
+}
+
//------------------------------------------------------------------------
//%% list SymbolIndices[SymbolIndex] : list of search indices one per by type
@@ -9775,6 +10221,10 @@ class SearchIndexContext::Private
{
return s_inst.get(this,n);
}
+ StringVector fields() const
+ {
+ return s_inst.fields();
+ }
TemplateVariant name() const
{
return m_info.name;
@@ -9820,6 +10270,12 @@ TemplateVariant SearchIndexContext::get(const QCString &name) const
return p->get(name);
}
+StringVector SearchIndexContext::fields() const
+{
+ return p->fields();
+}
+
+
//------------------------------------------------------------------------
//%% list SearchIndices[SearchIndex] : list of search indices one per by type
diff --git a/src/context.h b/src/context.h
index 1fb934e..bff4903 100644
--- a/src/context.h
+++ b/src/context.h
@@ -135,6 +135,7 @@ class ConfigContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -154,6 +155,7 @@ class DoxygenContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -173,6 +175,7 @@ class TranslateContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -217,6 +220,7 @@ class IncludeInfoContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -259,6 +263,7 @@ class ClassContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -278,6 +283,7 @@ class NamespaceContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -297,6 +303,7 @@ class FileContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -315,6 +322,7 @@ class DirContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -335,6 +343,7 @@ class PageContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -354,6 +363,7 @@ class MemberContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -374,6 +384,7 @@ class ModuleContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -414,6 +425,7 @@ class ClassIndexContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -434,6 +446,7 @@ class InheritanceGraphContext : public RefCountedContext, public TemplateStructI
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -454,6 +467,7 @@ class ClassInheritanceNodeContext : public RefCountedContext, public TemplateStr
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -496,6 +510,7 @@ class ClassHierarchyContext : public RefCountedContext, public TemplateStructInt
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -520,6 +535,7 @@ class NestingNodeContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -562,6 +578,7 @@ class NestingContext : public RefCountedContext, public TemplateListIntf
void addModules(const GroupList &modules,ClassDefSet &visitedClasses);
void addClassHierarchy(const ClassLinkedMap &clLinkedMap,ClassDefSet &visitedClasses);
void addDerivedClasses(const BaseClassList &bcl,bool hideSuper,ClassDefSet &visitedClasses);
+ void addMembers(const MemberList *ml,ClassDefSet &visitedClasses);
private:
NestingContext(const NestingNodeContext *parent,int level);
@@ -579,6 +596,7 @@ class ClassTreeContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -619,6 +637,7 @@ class NamespaceTreeContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -680,6 +699,7 @@ class FileTreeContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -722,6 +742,7 @@ class PageTreeContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -741,6 +762,7 @@ class ModuleNodeContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -784,6 +806,7 @@ class ModuleTreeContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -825,6 +848,7 @@ class ExampleTreeContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -844,6 +868,7 @@ class GlobalsIndexContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -863,6 +888,7 @@ class ClassMembersIndexContext : public RefCountedContext, public TemplateStruct
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -882,6 +908,7 @@ class NamespaceMembersIndexContext : public RefCountedContext, public TemplateSt
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -901,6 +928,7 @@ class NavPathElemContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -922,6 +950,7 @@ class InheritanceNodeContext : public RefCountedContext, public TemplateStructIn
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -992,6 +1021,7 @@ class MemberGroupInfoContext : public RefCountedContext, public TemplateStructIn
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -1043,6 +1073,7 @@ class MemberListInfoContext : public RefCountedContext, public TemplateStructInt
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -1064,6 +1095,7 @@ class MemberInfoContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -1084,6 +1116,7 @@ class InheritedMemberInfoContext : public RefCountedContext, public TemplateStru
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -1148,6 +1181,7 @@ class ArgumentContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -1192,6 +1226,7 @@ class SymbolContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -1237,6 +1272,7 @@ class SymbolGroupContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -1281,6 +1317,7 @@ class SymbolIndexContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -1323,6 +1360,7 @@ class SearchIndexContext : public RefCountedContext, public TemplateStructIntf
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
diff --git a/src/dirdef.cpp b/src/dirdef.cpp
index 1814b51..f4354a4 100644
--- a/src/dirdef.cpp
+++ b/src/dirdef.cpp
@@ -341,7 +341,7 @@ void DirDefImpl::writeSubDirList(OutputList &ol)
if (dd->hasDocumentation() || dd->getFiles().empty())
{
ol.startMemberDeclaration();
- ol.startMemberItem(dd->getOutputFileBase(),0);
+ ol.startMemberItem(dd->anchor(),0);
ol.parseText(theTranslator->trDir(FALSE,TRUE)+" ");
ol.insertMemberAlign();
ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),QCString(),dd->shortName());
@@ -359,7 +359,7 @@ void DirDefImpl::writeSubDirList(OutputList &ol)
);
ol.endMemberDescription();
}
- ol.endMemberDeclaration(QCString(),QCString());
+ ol.endMemberDeclaration(dd->anchor(),QCString());
}
}
@@ -390,7 +390,7 @@ void DirDefImpl::writeFileList(OutputList &ol)
if (fd->hasDocumentation())
{
ol.startMemberDeclaration();
- ol.startMemberItem(fd->getOutputFileBase(),0);
+ ol.startMemberItem(fd->anchor(),0);
ol.docify(theTranslator->trFile(FALSE,TRUE)+" ");
ol.insertMemberAlign();
if (fd->isLinkable())
@@ -429,7 +429,7 @@ void DirDefImpl::writeFileList(OutputList &ol)
);
ol.endMemberDescription();
}
- ol.endMemberDeclaration(QCString(),QCString());
+ ol.endMemberDeclaration(fd->anchor(),QCString());
}
}
ol.endMemberList();
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 331355f..4e316a8 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -6771,6 +6771,7 @@ reparsetoken:
}
else
{
+ m_children.push_back(std::make_unique<DocWord>(this,g_token->name));
warn_doc_error(g_fileName,getDoctokinizerLineNr(),"Unsupported symbol %s found",
qPrint(g_token->name));
}
diff --git a/src/docparser.h b/src/docparser.h
index 2117cbb..f256c56 100644
--- a/src/docparser.h
+++ b/src/docparser.h
@@ -642,7 +642,11 @@ class DocFormula : public DocNode
QCString relPath() const { return m_relPath; }
int id() const { return m_id; }
void accept(DocVisitor *v) override { v->visit(this); }
- bool isInline() { return m_text.length()>1 ? !(m_text.at(0)=='\\' && (m_text.at(1)=='{' || m_text.at(1)=='[')): TRUE; }
+ bool isInline() {
+ if (m_text.length()>1 && m_text.at(0)=='\\' && m_text.at(1)=='[') return false;
+ if (m_text.length()>7 && m_text.startsWith("\\begin{")) return false;
+ return true;
+ }
private:
QCString m_name;
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 51fcd16..a54be26 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -741,7 +741,7 @@ static Definition *buildScopeFromQualifiedName(const QCString &name_,SrcLangExt
else if (nd==0 && cd==0 && fullScope.find('<')==-1) // scope is not known and could be a namespace!
{
// introduce bogus namespace
- //printf("++ adding dummy namespace %s to %s tagInfo=%p\n",qPrint(nsName),qPrint(prevScope->name()),tagInfo);
+ //printf("++ adding dummy namespace %s to %s tagInfo=%p\n",qPrint(nsName),qPrint(prevScope->name()),(void*)tagInfo);
NamespaceDefMutable *newNd=
toNamespaceDefMutable(
Doxygen::namespaceLinkedMap->add(fullScope,
@@ -1686,6 +1686,11 @@ static void buildNamespaceList(const Entry *root)
// file definition containing the namespace nd
FileDef *fd=root->fileDef();
+ if (nd->isArtificial())
+ {
+ nd->setArtificial(FALSE); // found namespace explicitly, so cannot be artificial
+ nd->setDefFile(root->fileName,root->startLine,root->startColumn);
+ }
// insert the namespace in the file definition
if (fd) fd->insertNamespace(nd);
addNamespaceToGroups(root,nd);
@@ -1971,15 +1976,16 @@ static void buildListOfUsingDecls(const Entry *root)
}
-static void findUsingDeclarations(const Entry *root)
+static void findUsingDeclarations(const Entry *root,bool filterPythonPackages)
{
if (root->section==Entry::USINGDECL_SEC &&
- !(root->parent()->section&Entry::COMPOUND_MASK) // not a class/struct member
+ !(root->parent()->section&Entry::COMPOUND_MASK) && // not a class/struct member
+ (!filterPythonPackages || (root->lang==SrcLangExt_Python && root->fileName.endsWith("__init__.py")))
)
{
//printf("Found using declaration %s at line %d of %s inside section %x\n",
// qPrint(root->name),root->startLine,qPrint(root->fileName),
- // rootNav->parent()->section());
+ // root->parent()->section);
if (!root->name.isEmpty())
{
ClassDefMutable *usingCd = 0;
@@ -2018,7 +2024,7 @@ static void findUsingDeclarations(const Entry *root)
usingCd = toClassDefMutable(Doxygen::hiddenClassLinkedMap->find(name)); // check if it is already hidden
}
- //printf("%s -> %p\n",qPrint(root->name),usingCd);
+ //printf("%s -> %p\n",qPrint(root->name),(void*)usingCd);
if (usingCd==0) // definition not in the input => add an artificial class
{
Debug::print(Debug::Classes,0," New using class '%s' (sec=0x%08x)! #tArgLists=%d\n",
@@ -2054,7 +2060,7 @@ static void findUsingDeclarations(const Entry *root)
}
}
}
- for (const auto &e : root->children()) findUsingDeclarations(e.get());
+ for (const auto &e : root->children()) findUsingDeclarations(e.get(),filterPythonPackages);
}
//----------------------------------------------------------------------
@@ -7668,6 +7674,7 @@ static void computeMemberRelations()
// qPrint(argListToString(mdAl))
// );
if (
+ bmd->getLanguage()==SrcLangExt_Python ||
matchArguments2(bmd->getOuterScope(),bmd->getFileDef(),&bmdAl,
md->getOuterScope(), md->getFileDef(), &mdAl,
TRUE
@@ -9842,7 +9849,6 @@ static std::string resolveSymlink(const std::string &path)
return Dir::cleanDirPath(result.str());
}
-static std::mutex g_pathsVisitedMutex;
static StringUnorderedSet g_pathsVisited(1009);
//----------------------------------------------------------------------------
@@ -9869,15 +9875,24 @@ static void readDir(FileInfo *fi,
{
paths->insert(dirName);
}
+ //printf("%s isSymLink()=%d\n",qPrint(dirName),fi->isSymLink());
if (fi->isSymLink())
{
dirName = resolveSymlink(dirName);
- if (dirName.empty()) return; // recursive symlink
+ if (dirName.empty())
+ {
+ //printf("RECURSIVE SYMLINK: %s\n",qPrint(dirName));
+ return; // recursive symlink
+ }
+ }
- std::lock_guard<std::mutex> lock(g_pathsVisitedMutex);
- if (g_pathsVisited.find(dirName)!=g_pathsVisited.end()) return; // already visited path
- g_pathsVisited.insert(dirName);
+ if (g_pathsVisited.find(dirName)!=g_pathsVisited.end())
+ {
+ //printf("PATH ALREADY VISITED: %s\n",qPrint(dirName));
+ return; // already visited path
}
+ g_pathsVisited.insert(dirName);
+
Dir dir(dirName);
msg("Searching for files in directory %s\n", qPrint(fi->absFilePath()));
//printf("killSet=%p count=%d\n",killSet,killSet ? (int)killSet->count() : -1);
@@ -9903,19 +9918,21 @@ static void readDir(FileInfo *fi,
)
{
std::string name=cfi.fileName();
+ std::string path=cfi.dirPath()+"/";
+ std::string fullName=path+name;
if (fnMap)
{
- std::unique_ptr<FileDef> fd { createFileDef(QCString(cfi.dirPath()+"/"),QCString(name)) };
+ std::unique_ptr<FileDef> fd { createFileDef(QCString(path),QCString(name)) };
FileName *fn=0;
if (!name.empty())
{
- fn = fnMap->add(QCString(name),QCString(cfi.absFilePath()));
+ fn = fnMap->add(QCString(name),QCString(fullName));
fn->push_back(std::move(fd));
}
}
- if (resultList) resultList->push_back(cfi.absFilePath());
- if (resultSet) resultSet->insert(cfi.absFilePath());
- if (killSet) killSet->insert(cfi.absFilePath());
+ if (resultList) resultList->push_back(fullName);
+ if (resultSet) resultSet->insert(fullName);
+ if (killSet) killSet->insert(fullName);
}
else if (recursive &&
(!Config_getBool(EXCLUDE_SYMLINKS) || !cfi.isSymLink()) &&
@@ -9930,6 +9947,13 @@ static void readDir(FileInfo *fi,
}
}
}
+ if (resultList)
+ {
+ // sort the resulting list to make the order platform independent.
+ std::sort(resultList->begin(),
+ resultList->end(),
+ [](const auto &f1,const auto &f2) { return qstricmp(f1.c_str(),f2.c_str())<0; });
+ }
}
@@ -9954,6 +9978,8 @@ void readFileOrDirectory(const QCString &s,
// strip trailing slashes
if (s.isEmpty()) return;
+ g_pathsVisited.clear();
+
FileInfo fi(s.str());
//printf("readFileOrDirectory(%s)\n",s);
{
@@ -11510,7 +11536,8 @@ void parseInput()
g_s.begin("Searching for members imported via using declarations...\n");
// this should be after buildTypedefList in order to properly import
// used typedefs
- findUsingDeclarations(root.get());
+ findUsingDeclarations(root.get(),TRUE); // do for python packages first
+ findUsingDeclarations(root.get(),FALSE); // then the rest
g_s.end();
g_s.begin("Searching for included using directives...\n");
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 7149b97..842808e 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -790,7 +790,7 @@ void FileDefImpl::writeSummaryLinks(OutputList &ol) const
ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
- else if (lde->kind()==LayoutDocEntry::FileNamespaces && m_namespaces.declVisible())
+ else if (lde->kind()==LayoutDocEntry::FileNamespaces && m_namespaces.declVisible(false))
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "namespaces";
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index a1ed4d5..7670d27 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -1059,7 +1059,7 @@ void GroupDefImpl::writeSummaryLinks(OutputList &ol) const
{
if ((lde->kind()==LayoutDocEntry::GroupClasses && m_classes.declVisible()) ||
(lde->kind()==LayoutDocEntry::GroupConcepts && m_concepts.declVisible()) ||
- (lde->kind()==LayoutDocEntry::GroupNamespaces && m_namespaces.declVisible()) ||
+ (lde->kind()==LayoutDocEntry::GroupNamespaces && m_namespaces.declVisible(false)) ||
(lde->kind()==LayoutDocEntry::GroupFiles && !m_fileList.empty()) ||
(lde->kind()==LayoutDocEntry::GroupNestedGroups && !m_groups.empty()) ||
(lde->kind()==LayoutDocEntry::GroupDirs && !m_dirList.empty())
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index e4ec0d6..cfc1b91 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -1266,7 +1266,12 @@ void HtmlDocVisitor::visitPre(DocPara *p)
//printf(" needsTag=%d\n",needsTag);
// write the paragraph tag (if needed)
if (needsTag)
- m_t << "<p class=\"" << contexts[t] << "\"" << htmlAttribsToString(p->attribs()) << ">";
+ {
+ if (strlen(contexts[t]))
+ m_t << "<p class=\"" << contexts[t] << "\"" << htmlAttribsToString(p->attribs()) << ">";
+ else
+ m_t << "<p " << htmlAttribsToString(p->attribs()) << ">";
+ }
}
void HtmlDocVisitor::visitPost(DocPara *p)
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index ad8782b..86825e4 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -449,17 +449,25 @@ static QCString substituteHtmlKeywords(const QCString &str,
if (mathJaxVersion == "MathJax_3")
{
- mathJaxJs += "<script>\n"
- " window.MathJax = {\n"
- " options: {\n"
- " ignoreHtmlClass: 'tex2jax_ignore',\n"
- " processHtmlClass: 'tex2jax_process'\n"
- " },\n";
+ mathJaxJs += "<script src=\"https://polyfill.io/v3/polyfill.min.js?features=es6\"></script>\n"
+ "<script type=\"text/javascript\">\n"
+ "window.MathJax = {\n"
+ " options: {\n"
+ " ignoreHtmlClass: 'tex2jax_ignore',\n"
+ " processHtmlClass: 'tex2jax_process'\n"
+ " }";
const StringVector &mathJaxExtensions = Config_getList(MATHJAX_EXTENSIONS);
if (!mathJaxExtensions.empty() || !g_latex_macro.isEmpty())
{
- mathJaxJs+= " tex: {\n"
- " packages: ['base'";
+ mathJaxJs+= ",\n"
+ " tex: {\n"
+ " macros: {";
+ if (!g_latex_macro.isEmpty())
+ {
+ mathJaxJs += g_latex_macro+" ";
+ }
+ mathJaxJs+="},\n"
+ " packages: ['base','configmacros'";
if (!g_latex_macro.isEmpty())
{
mathJaxJs+= ",'newcommand'";
@@ -469,49 +477,30 @@ static QCString substituteHtmlKeywords(const QCString &str,
mathJaxJs+= ",'"+QCString(s.c_str())+"'";
}
mathJaxJs += "]\n"
- " },\n"
- " tex: {\n"
- " macros: {}\n"
- " }\n";
+ " }\n";
}
- mathJaxJs += " };\n";
- mathJaxJs += "</script>\n";
-
- if (!g_latex_macro.isEmpty())
+ else
{
- mathJaxJs += "<script>\n"
- " Object.assign(MathJax.tex.macros, {\n";
- mathJaxJs += g_latex_macro;
- mathJaxJs += "\n"
- " });\n"
- "</script>\n";
+ mathJaxJs += "\n";
}
-
+ mathJaxJs += "};\n";
// MATHJAX_CODEFILE
if (!g_mathjax_code.isEmpty())
{
- mathJaxJs += "<script>\n";
mathJaxJs += g_mathjax_code;
mathJaxJs += "\n";
- mathJaxJs += "</script>\n";
}
+ mathJaxJs += "</script>\n";
-
- mathJaxJs += "<script type=\"text/javascript\" id=\"MathJax-script\" async=\"async\" src=\"" + path;
- if (mathJaxFormat == "chtml")
- {
- mathJaxJs += "es5/tex-chtml.js\"></script>\n" ;
- }
- else if (mathJaxFormat == "SVG")
- {
- mathJaxJs += "es5/tex-svg.js\"></script>\n" ;
- }
+ mathJaxJs += "<script type=\"text/javascript\" id=\"MathJax-script\" async=\"async\" src=\"" +
+ path + "es5/tex-" + mathJaxFormat.lower() + ".js\">";
+ mathJaxJs+="</script>\n";
}
- else
+ else // MathJax v2
{
mathJaxJs = "<script type=\"text/x-mathjax-config\">\n"
- " MathJax.Hub.Config({\n"
- " extensions: [\"tex2jax.js\"";
+ "MathJax.Hub.Config({\n"
+ " extensions: [\"tex2jax.js\"";
const StringVector &mathJaxExtensions = Config_getList(MATHJAX_EXTENSIONS);
for (const auto &s : mathJaxExtensions)
{
@@ -522,25 +511,21 @@ static QCString substituteHtmlKeywords(const QCString &str,
mathJaxFormat = "HTML-CSS";
}
mathJaxJs += "],\n"
- " jax: [\"input/TeX\",\"output/"+mathJaxFormat+"\"],\n"
- "});\n";
+ " jax: [\"input/TeX\",\"output/"+mathJaxFormat+"\"],\n";
+ if (!g_latex_macro.isEmpty())
+ {
+ mathJaxJs += " TeX: { Macros: {\n";
+ mathJaxJs += g_latex_macro;
+ mathJaxJs += "\n"
+ " } }\n";
+ }
+ mathJaxJs += "});\n";
if (!g_mathjax_code.isEmpty())
{
mathJaxJs += g_mathjax_code;
mathJaxJs += "\n";
}
mathJaxJs += "</script>\n";
- if (!g_latex_macro.isEmpty())
- {
- mathJaxJs += "<script type=\"text/x-mathjax-config\">\n"
- " MathJax.Hub.Config({\n"
- " TeX: { Macros: {\n";
- mathJaxJs += g_latex_macro;
- mathJaxJs += "\n"
- " } }\n"
- "});\n"
- "</script>\n";
- }
mathJaxJs += "<script type=\"text/javascript\" async=\"async\" src=\"" + path + "MathJax.js\"></script>\n";
}
}
@@ -999,13 +984,7 @@ void HtmlGenerator::init()
t << mgr.getAsString("dynsections.js");
if (Config_getBool(SOURCE_BROWSER) && Config_getBool(SOURCE_TOOLTIPS))
{
- t <<
- "\n$(document).ready(function() {\n"
- " $('.code,.codeRef').each(function() {\n"
- " $(this).data('powertip',$('#a'+$(this).attr('href').replace(/.*\\//,'').replace(/[^a-z_A-Z0-9]/g,'_')).html());\n"
- " $(this).powerTip({ placement: 's', smartPlacement: true, mouseOnToPopup: true });\n"
- " });\n"
- "});\n";
+ t << mgr.getAsString("dynsections_tooltips.js");
}
}
}
@@ -2501,7 +2480,7 @@ static void writeDefaultQuickLinks(TextStream &t,bool compact,
t << "<script type=\"text/javascript\" src=\"" << relPath << "menudata.js\"></script>\n";
t << "<script type=\"text/javascript\" src=\"" << relPath << "menu.js\"></script>\n";
t << "<script type=\"text/javascript\">\n";
- t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n";
+ t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n";
t << "$(function() {\n";
t << " initMenu('" << relPath << "',"
<< (searchEngine?"true":"false") << ","
@@ -2516,14 +2495,13 @@ static void writeDefaultQuickLinks(TextStream &t,bool compact,
}
else
{
- t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n";
t << " $(document).ready(function() {\n"
<< " if ($('.searchresults').length > 0) { searchBox.DOMSearchField().focus(); }\n"
<< " });\n";
}
}
t << "});\n";
- t << "/* @license-end */";
+ t << "/* @license-end */\n";
t << "</script>\n";
t << "<div id=\"main-nav\"></div>\n";
}
@@ -2894,14 +2872,14 @@ void HtmlGenerator::startHeaderSection()
void HtmlGenerator::startTitleHead(const QCString &)
{
- m_t << " <div class=\"headertitle\">\n";
+ m_t << " <div class=\"headertitle\">";
startTitle();
}
void HtmlGenerator::endTitleHead(const QCString &,const QCString &)
{
endTitle();
- m_t << " </div>\n";
+ m_t << "</div>\n";
}
void HtmlGenerator::endHeaderSection()
@@ -3074,3 +3052,8 @@ void HtmlGenerator::addWord(const QCString &word,bool hiPriority)
Doxygen::searchIndex->addWord(word,hiPriority);
}
}
+
+QCString HtmlGenerator::getMathJaxMacros()
+{
+ return getConvertLatexMacro();
+}
diff --git a/src/htmlgen.h b/src/htmlgen.h
index 845f259..c66e622 100644
--- a/src/htmlgen.h
+++ b/src/htmlgen.h
@@ -83,6 +83,7 @@ class HtmlGenerator : public OutputGenerator
static void writeExternalSearchPage();
static QCString writeLogoAsString(const QCString &path);
static QCString writeSplitBarAsString(const QCString &name,const QCString &relpath);
+ static QCString getMathJaxMacros();
// ---- CodeOutputInterface
void codify(const QCString &text)
diff --git a/src/index.cpp b/src/index.cpp
index 99942f1..de50cc5 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -289,18 +289,6 @@ void endFileWithNavPath(const Definition *d,OutputList &ol)
//----------------------------------------------------------------------
-static bool memberVisibleInIndex(const MemberDef *md)
-{
- bool isAnonymous = md->isAnonymous();
- bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
- bool extractStatic = Config_getBool(EXTRACT_STATIC);
- return (!isAnonymous &&
- (!hideUndocMembers || md->hasDocumentation()) &&
- (!md->isStatic() || extractStatic) &&
- md->isLinkable()
- );
-}
-
static void writeMemberToIndex(const Definition *def,const MemberDef *md,bool addToIndex)
{
bool isAnonymous = md->isAnonymous();
@@ -388,7 +376,7 @@ void addMembersToIndex(T *def,LayoutDocManager::LayoutPart part,
{
for (const auto &md : *ml)
{
- if (memberVisibleInIndex(md))
+ if (md->visibleInIndex())
{
writeMemberToIndex(def,md,addToIndex);
}
@@ -1611,7 +1599,7 @@ static int countVisibleMembers(const NamespaceDef *nd)
{
for (const auto &md : *ml)
{
- if (memberVisibleInIndex(md))
+ if (md->visibleInIndex())
{
count++;
}
@@ -1634,8 +1622,8 @@ static void writeNamespaceMembers(const NamespaceDef *nd,bool addToIndex)
{
for (const auto &md : *ml)
{
- //printf(" member %s visible=%d\n",qPrint(md->name()),memberVisibleInIndex(md));
- if (memberVisibleInIndex(md))
+ //printf(" member %s visible=%d\n",qPrint(md->name()),md->visibleInIndex());
+ if (md->visibleInIndex())
{
writeMemberToIndex(nd,md,addToIndex);
}
@@ -2180,7 +2168,9 @@ static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct
// write character heading
ol.writeString("<dt class=\"alphachar\">");
QCString s = letterToLabel(cl.first.c_str());
- ol.writeString("<a name=\"letter_");
+ ol.writeString("<a id=\"letter_");
+ ol.writeString(s);
+ ol.writeString("\" name=\"letter_");
ol.writeString(s);
ol.writeString("\">");
ol.writeString(cl.first.c_str());
@@ -2511,10 +2501,10 @@ static void writeClassLinkForMember(OutputList &ol,const MemberDef *md,const QCS
const ClassDef *cd=md->getClassDef();
if ( cd && prevClassName!=cd->displayName())
{
- ol.docify(separator);
+ ol.writeString(separator);
ol.writeObjectLink(md->getReference(),md->getOutputFileBase(),md->anchor(),
cd->displayName());
- ol.writeString("\n");
+ //ol.writeString("\n");
prevClassName = cd->displayName();
}
}
@@ -2525,10 +2515,10 @@ static void writeFileLinkForMember(OutputList &ol,const MemberDef *md,const QCSt
const FileDef *fd=md->getFileDef();
if (fd && prevFileName!=fd->name())
{
- ol.docify(separator);
+ ol.writeString(separator);
ol.writeObjectLink(md->getReference(),md->getOutputFileBase(),md->anchor(),
fd->name());
- ol.writeString("\n");
+ //ol.writeString("\n");
prevFileName = fd->name();
}
}
@@ -2539,10 +2529,10 @@ static void writeNamespaceLinkForMember(OutputList &ol,const MemberDef *md,const
const NamespaceDef *nd=md->getNamespaceDef();
if (nd && prevNamespaceName!=nd->displayName())
{
- ol.docify(separator);
+ ol.writeString(separator);
ol.writeObjectLink(md->getReference(),md->getOutputFileBase(),md->anchor(),
nd->displayName());
- ol.writeString("\n");
+ //ol.writeString("\n");
prevNamespaceName = nd->displayName();
}
}
@@ -2625,11 +2615,11 @@ static void writeMemberList(OutputList &ol,bool useSections,const std::string &p
firstItem=FALSE;
ol.docify(name);
if (isFunc) ol.docify("()");
- ol.writeString("\n");
+ //ol.writeString("\n");
// link to class
prevDefName="";
- sep = ": ";
+ sep = "&#160;:&#160;";
prevName = name.data()+startIndex;
}
else // same entry
@@ -3512,7 +3502,7 @@ static void writeExampleIndex(OutputList &ol)
}
}
ol.endItemListItem();
- ol.writeString("\n");
+ //ol.writeString("\n");
}
ol.endItemList();
diff --git a/src/lexcode.l b/src/lexcode.l
index 59b05b7..7400bc9 100644
--- a/src/lexcode.l
+++ b/src/lexcode.l
@@ -727,10 +727,18 @@ NONLopt [^\n]*
<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
yyextra->CCodeBuffer += yytext;
yyextra->docBlockName=&yytext[1];
+ if (yyextra->docBlockName.at(1)=='[')
+ {
+ yyextra->docBlockName.at(1)=']';
+ }
if (yyextra->docBlockName.at(1)=='{')
{
yyextra->docBlockName.at(1)='}';
}
+ if (yyextra->docBlockName.at(1)=='(')
+ {
+ yyextra->docBlockName.at(1)=')';
+ }
yyextra->fencedSize=0;
yyextra->nestedComment=FALSE;
BEGIN(DocCopyBlock);
@@ -742,7 +750,14 @@ NONLopt [^\n]*
yyextra->nestedComment=FALSE;
BEGIN(DocCopyBlock);
}
-<DocBlock>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!)
+<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] { // verbatim type command (which could contain nested comments!)
+ yyextra->CCodeBuffer += yytext;
+ yyextra->docBlockName="uml";
+ yyextra->fencedSize=0;
+ yyextra->nestedComment=FALSE;
+ BEGIN(DocCopyBlock);
+ }
+<DocBlock>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!)
yyextra->CCodeBuffer += yytext;
yyextra->docBlockName=&yytext[1];
yyextra->fencedSize=0;
@@ -796,9 +811,12 @@ NONLopt [^\n]*
}
<DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") {
yyextra->CCodeBuffer += yytext;
- BEGIN(DocBlock);
+ if (yyextra->docBlockName==&yytext[1])
+ {
+ BEGIN(DocBlock);
+ }
}
-<DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block
+<DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block
yyextra->CCodeBuffer += yytext;
if (&yytext[4]==yyextra->docBlockName)
{
diff --git a/src/lexscanner.l b/src/lexscanner.l
index 2b6b3a0..b02bf8e 100644
--- a/src/lexscanner.l
+++ b/src/lexscanner.l
@@ -709,10 +709,18 @@ NONLopt [^\n]*
<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
yyextra->cCodeBuffer += yytext;
yyextra->docBlockName=&yytext[1];
+ if (yyextra->docBlockName.at(1)=='[')
+ {
+ yyextra->docBlockName.at(1)=']';
+ }
if (yyextra->docBlockName.at(1)=='{')
{
yyextra->docBlockName.at(1)='}';
}
+ if (yyextra->docBlockName.at(1)=='(')
+ {
+ yyextra->docBlockName.at(1)=')';
+ }
yyextra->fencedSize=0;
yyextra->nestedComment=FALSE;
BEGIN(DocCopyBlock);
@@ -724,7 +732,14 @@ NONLopt [^\n]*
yyextra->nestedComment=FALSE;
BEGIN(DocCopyBlock);
}
-<DocBlock>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!)
+<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] { // verbatim type command (which could contain nested comments!)
+ yyextra->cCodeBuffer += yytext;
+ yyextra->docBlockName="uml";
+ yyextra->fencedSize=0;
+ yyextra->nestedComment=FALSE;
+ BEGIN(DocCopyBlock);
+ }
+<DocBlock>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!)
yyextra->cCodeBuffer += yytext;
yyextra->docBlockName=&yytext[1];
yyextra->fencedSize=0;
@@ -777,11 +792,14 @@ NONLopt [^\n]*
}
<DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") {
yyextra->cCodeBuffer += yytext;
- BEGIN(DocBlock);
+ if (yyextra->docBlockName==&yytext[1])
+ {
+ BEGIN(DocBlock);
+ }
}
-<DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block
+<DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block
yyextra->cCodeBuffer += yytext;
- if (&yytext[4]==yyextra->docBlockName)
+ if (yyextra->docBlockName==&yytext[4])
{
BEGIN(DocBlock);
}
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index af05535..7133641 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -321,6 +321,7 @@ class MemberDefImpl : public DefinitionMixin<MemberDefMutable>
virtual void writeTagFile(TextStream &) const;
virtual void warnIfUndocumented() const;
virtual void warnIfUndocumentedParams() const;
+ virtual bool visibleInIndex() const;
virtual void detectUndocumentedParams(bool hasParamCommand,bool hasReturnCommand) const;
virtual MemberDefMutable *createTemplateInstanceMember(const ArgumentList &formalArgs,
const std::unique_ptr<ArgumentList> &actualArgs) const;
@@ -744,6 +745,8 @@ class MemberDefAliasImpl : public DefinitionAliasMixin<MemberDef>
{ return getMdAlias()->getDeclColumn(); }
virtual QCString requiresClause() const
{ return getMdAlias()->requiresClause(); }
+ virtual bool visibleInIndex() const
+ { return getMdAlias()->visibleInIndex(); }
virtual void warnIfUndocumented() const {}
virtual void warnIfUndocumentedParams() const {}
@@ -3844,6 +3847,18 @@ void MemberDefImpl::warnIfUndocumented() const
warnIfUndocumentedParams();
}
}
+
+bool MemberDefImpl::visibleInIndex() const
+{
+ bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
+ bool extractStatic = Config_getBool(EXTRACT_STATIC);
+ return (!isAnonymous() &&
+ (!hideUndocMembers || hasDocumentation()) &&
+ (!isStatic() || extractStatic) &&
+ isLinkable()
+ );
+}
+
static QCString stripTrailingReturn(const QCString &trailRet)
{
QCString ret = trailRet;
diff --git a/src/memberdef.h b/src/memberdef.h
index 1d1e744..ca745a0 100644
--- a/src/memberdef.h
+++ b/src/memberdef.h
@@ -285,9 +285,11 @@ class MemberDef : public Definition
virtual void detectUndocumentedParams(bool hasParamCommand,bool hasReturnCommand) const = 0;
virtual void warnIfUndocumented() const = 0;
virtual void warnIfUndocumentedParams() const = 0;
+ virtual bool visibleInIndex() const = 0;
// TODO: this is not a getter, should be passed at construction
virtual void setMemberGroup(MemberGroup *grp) = 0;
+
};
class MemberDefMutable : public DefinitionMutable, public MemberDef
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index 58d0ff0..f3ec7ae 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -839,13 +839,20 @@ void NamespaceDefImpl::writeSummaryLinks(OutputList &ol) const
ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
- else if (lde->kind()==LayoutDocEntry::NamespaceNestedNamespaces && namespaces.declVisible())
+ else if (lde->kind()==LayoutDocEntry::NamespaceNestedNamespaces && namespaces.declVisible(false))
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "namespaces";
ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
+ else if (lde->kind()==LayoutDocEntry::NamespaceNestedConstantGroups && namespaces.declVisible(true))
+ {
+ const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
+ QCString label = "constantgroups";
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
+ first=FALSE;
+ }
else if (lde->kind()==LayoutDocEntry::NamespaceConcepts && m_concepts.declVisible())
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
@@ -1270,28 +1277,9 @@ void NamespaceDefImpl::combineUsingRelations(NamespaceDefSet &visitedNamespaces)
//-------------------------------------------------------------------------------
-bool NamespaceLinkedRefMap::declVisible() const
-{
- for (const auto &nd : *this)
- {
- if (nd->isLinkable())
- {
- return TRUE;
- }
- }
- return FALSE;
-}
-
-void NamespaceLinkedRefMap::writeDeclaration(OutputList &ol,const QCString &title,
- bool const isConstantGroup,bool localName)
+bool NamespaceLinkedRefMap::declVisible(bool isConstantGroup) const
{
-
-
- if (empty()) return; // no namespaces in the list
-
- if (Config_getBool(OPTIMIZE_OUTPUT_VHDL)) return;
-
- bool found=FALSE;
+ bool found=false;
for (const auto &nd : *this)
{
if (nd->isLinkable() && nd->hasDocumentation())
@@ -1301,7 +1289,7 @@ void NamespaceLinkedRefMap::writeDeclaration(OutputList &ol,const QCString &titl
{
if (isConstantGroup == nd->isConstantGroup())
{
- found=TRUE;
+ found=true;
break;
}
}
@@ -1311,15 +1299,27 @@ void NamespaceLinkedRefMap::writeDeclaration(OutputList &ol,const QCString &titl
{
err("Internal inconsistency: constant group but not IDL?\n");
}
- found=TRUE;
+ found=true;
break;
}
}
}
- if (!found) return; // no linkable namespaces in the list
+ return found;
+}
+
+void NamespaceLinkedRefMap::writeDeclaration(OutputList &ol,const QCString &title,
+ bool const isConstantGroup,bool localName)
+{
+
+
+ if (empty()) return; // no namespaces in the list
+
+ if (Config_getBool(OPTIMIZE_OUTPUT_VHDL)) return;
+
+ if (!declVisible(isConstantGroup)) return;
// write list of namespaces
- ol.startMemberHeader("namespaces");
+ ol.startMemberHeader(isConstantGroup ? "constantgroups" : "namespaces");
//bool javaOpt = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
//bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
ol.parseText(title);
diff --git a/src/namespacedef.h b/src/namespacedef.h
index 3c80470..46d2b1e 100644
--- a/src/namespacedef.h
+++ b/src/namespacedef.h
@@ -47,7 +47,7 @@ class NamespaceLinkedRefMap : public LinkedRefMap<const NamespaceDef>
public:
void writeDeclaration(OutputList &ol,const QCString &title,
bool isConstantGroup=false, bool localName=FALSE);
- bool declVisible() const;
+ bool declVisible(bool isContantGroup) const;
};
/** An abstract interface of a namespace symbol. */
diff --git a/src/pre.l b/src/pre.l
index 7b48ca7..3e9e1df 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -3241,48 +3241,32 @@ static void initPredefined(yyscan_t yyscanner,const QCString &fileName)
) // predefined function macro definition
{
static const reg::Ex reId(R"(\a\w*)");
- reg::Iterator end;
- bool varArgs = false;
- int count = 0;
std::map<std::string,int> argMap;
- if (ds.substr(i_obrace+1,i_cbrace-i_obrace-1)=="...")
+ std::string args = ds.substr(i_obrace+1,i_cbrace-i_obrace-1); // part between ( and )
+ bool hasVarArgs = args.find("...")!=std::string::npos;
+ //printf("predefined function macro '%s'\n",ds.c_str());
+ int count = 0;
+ reg::Iterator arg_it(args,reId,0);
+ reg::Iterator arg_end;
+ // gather the formal arguments in a dictionary
+ for (; arg_it!=arg_end; ++arg_it)
{
- varArgs = true;
- argMap.emplace("__VA_ARGS__",count);
- count++;
+ argMap.emplace(arg_it->str(),count++);
}
- else
+ if (hasVarArgs) // add the variable argument if present
{
- size_t i=i_obrace+1;
- //printf("predefined function macro '%s'\n",ds.c_str());
- reg::Iterator it(ds,reId,i);
- // gather the formal arguments in a dictionary
- while (i<i_cbrace && it!=end)
- {
- const auto &match = *it;
- size_t pi = match.position();
- size_t l = match.length();
- if (l>0) // see bug375037
- {
- argMap.emplace(match.str(),count);
- count++;
- i=pi+l;
- }
- else
- {
- i++;
- }
- ++it;
- }
+ argMap.emplace("__VA_ARGS__",count++);
}
+
// strip definition part
std::string definition;
std::string in=ds.substr(i_equals+1);
reg::Iterator re_it(in,reId);
+ reg::Iterator re_end;
size_t i=0;
// substitute all occurrences of formal arguments by their
// corresponding markers
- for (; re_it!=end; ++re_it)
+ for (; re_it!=re_end; ++re_it)
{
const auto &match = *re_it;
size_t pi = match.position();
@@ -3317,11 +3301,11 @@ static void initPredefined(yyscan_t yyscanner,const QCString &fileName)
def.nonRecursive = nonRecursive;
def.fileDef = state->yyFileDef;
def.fileName = fileName;
- def.varArgs = varArgs;
+ def.varArgs = hasVarArgs;
state->contextDefines.insert(std::make_pair(def.name.str(),def));
- //printf("#define '%s' '%s' #nargs=%d\n",
- // qPrint(def->name),qPrint(def->definition),def->nargs);
+ //printf("#define '%s' '%s' #nargs=%d hasVarArgs=%d\n",
+ // qPrint(def.name),qPrint(def.definition),def.nargs,def.varArgs);
}
}
else if (!ds.empty()) // predefined non-function macro definition
diff --git a/src/pycode.l b/src/pycode.l
index 6acf333..f24c8c9 100644
--- a/src/pycode.l
+++ b/src/pycode.l
@@ -183,7 +183,7 @@ LONGSTRINGCHAR [^\\"']
ESCAPESEQ ("\\")(.)
LONGSTRINGITEM ({LONGSTRINGCHAR}|{ESCAPESEQ})
SMALLQUOTE ("\"\""|"\""|"'"|"''")
-LONGSTRINGBLOCK ({LONGSTRINGITEM}+|{SMALLQUOTE})
+LONGSTRINGBLOCK ({LONGSTRINGITEM}|{SMALLQUOTE})
SHORTSTRING ("'"{SHORTSTRINGITEM}*"'"|'"'{SHORTSTRINGITEM}*'"')
SHORTSTRINGITEM ({SHORTSTRINGCHAR}|{ESCAPESEQ})
diff --git a/src/pyscanner.l b/src/pyscanner.l
index 4f331c9..a34dc18 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -180,7 +180,7 @@ LONGSTRINGCHAR [^\\"']
ESCAPESEQ ("\\")(.)
LONGSTRINGITEM ({LONGSTRINGCHAR}|{ESCAPESEQ})
SMALLQUOTE ("\"\""|"\""|"'"|"''")
-LONGSTRINGBLOCK ({LONGSTRINGITEM}+|{SMALLQUOTE})
+LONGSTRINGBLOCK ({LONGSTRINGITEM}|{SMALLQUOTE})
SHORTSTRING ("'"{SHORTSTRINGITEM}*"'"|'"'{SHORTSTRINGITEM}*'"')
SHORTSTRINGITEM ({SHORTSTRINGCHAR}|{ESCAPESEQ})
@@ -1838,18 +1838,26 @@ static void parseMain(yyscan_t yyscanner, const QCString &fileName,const char *f
yyextra->moduleScope+=baseName;
}
- yyextra->current = std::make_shared<Entry>();
- initEntry(yyscanner);
- yyextra->current->name = yyextra->moduleScope;
- yyextra->current->section = Entry::NAMESPACE_SEC;
- yyextra->current->type = "namespace";
- yyextra->current->fileName = yyextra->yyFileName;
- yyextra->current->startLine = yyextra->yyLineNr;
- yyextra->current->bodyLine = yyextra->yyLineNr;
-
- yyextra->current_root = yyextra->current;
-
- rt->moveToSubEntryAndRefresh(yyextra->current);
+ // add namespaces for each scope
+ QCString scope = yyextra->moduleScope;
+ int startPos = 0;
+ int pos;
+ do
+ {
+ pos = scope.find("::",startPos);
+ startPos=pos+2;
+ if (pos==-1) pos=(int)scope.length();
+ yyextra->current = std::make_shared<Entry>();
+ initEntry(yyscanner);
+ yyextra->current->name = scope.left(pos);
+ yyextra->current->section = Entry::NAMESPACE_SEC;
+ yyextra->current->type = "namespace";
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->current_root = yyextra->current;
+ rt->moveToSubEntryAndRefresh(yyextra->current);
+ } while (pos<(int)scope.length());
initParser(yyscanner);
diff --git a/src/qcstring.h b/src/qcstring.h
index ba5ac95..0b23071 100644
--- a/src/qcstring.h
+++ b/src/qcstring.h
@@ -398,6 +398,19 @@ class QCString
return m_rep.rfind(s.str(),0)==0; // looking "backward" starting and ending at index 0
}
+ bool endsWith(const char *s) const
+ {
+ if (m_rep.empty() || s==0) return s==0;
+ size_t l = strlen(s);
+ return m_rep.length()>=l && m_rep.compare(m_rep.length()-l, l, s, l)==0;
+ }
+
+ bool endsWith(const QCString &s) const
+ {
+ size_t l = s.length();
+ return m_rep.length()>=l && m_rep.compare(m_rep.length()-l, l, s.str())==0;
+ }
+
#define HAS_IMPLICIT_CAST_TO_PLAIN_C_STRING 0
#if HAS_IMPLICIT_CAST_TO_PLAIN_C_STRING
/** Converts the string to a plain C string */
diff --git a/src/resourcemgr.cpp b/src/resourcemgr.cpp
index 161e480..fb52d99 100644
--- a/src/resourcemgr.cpp
+++ b/src/resourcemgr.cpp
@@ -76,9 +76,11 @@ bool ResourceMgr::writeCategory(const QCString &categoryName,const QCString &tar
return TRUE;
}
-bool ResourceMgr::copyResourceAs(const QCString &name,const QCString &targetDir,const QCString &targetName) const
+bool ResourceMgr::copyResourceAs(const QCString &name,const QCString &targetDir,const QCString &targetName,bool append) const
{
std::string pathName = targetDir.str()+"/"+targetName.str();
+ std::ios_base::openmode mode = std::ofstream::out | std::ofstream::binary;
+ if (append) mode |= std::ofstream::app;
const Resource *res = get(name);
if (res)
{
@@ -86,7 +88,7 @@ bool ResourceMgr::copyResourceAs(const QCString &name,const QCString &targetDir,
{
case Resource::Verbatim:
{
- std::ofstream f(pathName,std::ofstream::out | std::ofstream::binary);
+ std::ofstream f(pathName,mode);
bool ok=false;
if (f.is_open())
{
@@ -137,7 +139,7 @@ bool ResourceMgr::copyResourceAs(const QCString &name,const QCString &targetDir,
break;
case Resource::CSS:
{
- std::ofstream t(pathName,std::ofstream::out | std::ofstream::binary);
+ std::ofstream t(pathName,mode);
if (t.is_open())
{
QCString buf(res->size+1);
@@ -157,7 +159,7 @@ bool ResourceMgr::copyResourceAs(const QCString &name,const QCString &targetDir,
break;
case Resource::SVG:
{
- std::ofstream t(pathName,std::ostream::out | std::ofstream::binary);
+ std::ofstream t(pathName,mode);
if (t.is_open())
{
QCString buf(res->size+1);
diff --git a/src/resourcemgr.h b/src/resourcemgr.h
index 7978e09..3c4c1b3 100644
--- a/src/resourcemgr.h
+++ b/src/resourcemgr.h
@@ -48,7 +48,7 @@ class ResourceMgr
bool copyResource(const QCString &name,const QCString &targetDir) const;
/** Copies a registered resource to a given target directory under a given target name */
- bool copyResourceAs(const QCString &name,const QCString &targetDir,const QCString &targetName) const;
+ bool copyResourceAs(const QCString &name,const QCString &targetDir,const QCString &targetName, bool append=false) const;
/** Gets the resource data as a C string */
QCString getAsString(const QCString &name) const;
diff --git a/src/scanner.l b/src/scanner.l
index 00fa3b4..5dd31ab 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -1955,7 +1955,7 @@ NONLopt [^\n]*
//printf("Found %s\n",qPrint(yyextra->current->name));
BEGIN( ReadFuncArgType ) ;
}
- else if (yyextra->sharpCount<=0)
+ else
{
yyextra->current->name+="(";
yyextra->roundCount++;
@@ -4534,7 +4534,12 @@ NONLopt [^\n]*
unput(yyextra->lastCopyArgChar);
BEGIN( yyextra->lastCommentInArgContext );
}
-<CopyArgCommentLine>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!)
+<CopyArgCommentLine>{CMD}"startuml"/[^a-z_A-Z0-9\-] { // verbatim type command (which could contain nested comments!)
+ yyextra->docBlockName="uml";
+ yyextra->fullArgString+=yytext;
+ BEGIN(CopyArgVerbatim);
+ }
+<CopyArgCommentLine>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!)
yyextra->docBlockName=&yytext[1];
yyextra->fullArgString+=yytext;
BEGIN(CopyArgVerbatim);
@@ -4543,7 +4548,7 @@ NONLopt [^\n]*
yyextra->docBlockName=&yytext[1];
if (yyextra->docBlockName.at(1)=='[')
{
- yyextra->docBlockName.at(1)='}';
+ yyextra->docBlockName.at(1)=']';
}
if (yyextra->docBlockName.at(1)=='{')
{
@@ -4556,9 +4561,9 @@ NONLopt [^\n]*
yyextra->fullArgString+=yytext;
BEGIN(CopyArgVerbatim);
}
-<CopyArgVerbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endcode"|"f$"|"f]"|"f}"|"f)")/[^a-z_A-Z0-9\-] { // end of verbatim block
+<CopyArgVerbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"ebdmsc"|"enduml"|"endcode"|"f$"|"f]"|"f}"|"f)")/[^a-z_A-Z0-9\-] { // end of verbatim block
yyextra->fullArgString+=yytext;
- if (yytext[1]=='f') // end of formula
+ if (yytext[1]=='f' && yyextra->docBlockName==&yytext[1])
{
BEGIN(CopyArgCommentLine);
}
@@ -6556,10 +6561,18 @@ NONLopt [^\n]*
<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
yyextra->docBlock << yytext;
yyextra->docBlockName=&yytext[1];
+ if (yyextra->docBlockName.at(1)=='[')
+ {
+ yyextra->docBlockName.at(1)=']';
+ }
if (yyextra->docBlockName.at(1)=='{')
{
yyextra->docBlockName.at(1)='}';
}
+ if (yyextra->docBlockName.at(1)=='(')
+ {
+ yyextra->docBlockName.at(1)=')';
+ }
yyextra->fencedSize=0;
yyextra->nestedComment=FALSE;
BEGIN(DocCopyBlock);
@@ -6571,7 +6584,14 @@ NONLopt [^\n]*
yyextra->nestedComment=FALSE;
BEGIN(DocCopyBlock);
}
-<DocBlock>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!)
+<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!)
+ yyextra->docBlock << yytext;
+ yyextra->docBlockName="uml";
+ yyextra->fencedSize=0;
+ yyextra->nestedComment=FALSE;
+ BEGIN(DocCopyBlock);
+ }
+<DocBlock>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!)
yyextra->docBlock << yytext;
yyextra->docBlockName=&yytext[1];
yyextra->fencedSize=0;
@@ -6637,9 +6657,12 @@ NONLopt [^\n]*
}
<DocCopyBlock>[\\@]("f$"|"f]"|"f}"|"f)") {
yyextra->docBlock << yytext;
- BEGIN(DocBlock);
+ if (yyextra->docBlockName==&yytext[1])
+ {
+ BEGIN(DocBlock);
+ }
}
-<DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block
+<DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"enduml"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block
yyextra->docBlock << yytext;
if (&yytext[4]==yyextra->docBlockName)
{
@@ -7561,6 +7584,15 @@ static void parseMain(yyscan_t yyscanner,
{
BEGIN( FindMembersPHP );
}
+ else if ( yyextra->insideJava ) // add default java.lang package scope
+ {
+ yyextra->current->name="java::lang"; // '::' is used in doxygen's internal representation as a scope separator
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->section=Entry::USINGDIR_SEC;
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
+ initEntry(yyscanner);
+ BEGIN( FindMembers );
+ }
else
{
BEGIN( FindMembers );
diff --git a/src/searchindex.cpp b/src/searchindex.cpp
index cf09e67..f87cd33 100644
--- a/src/searchindex.cpp
+++ b/src/searchindex.cpp
@@ -1214,6 +1214,7 @@ void writeJavaScriptSearchIndex()
t << "</html>\n";
}
}
+
Doxygen::indexList->addStyleSheetFile("search/search.js");
}
diff --git a/src/template.cpp b/src/template.cpp
index 82b35f7..e1d9c79 100755
--- a/src/template.cpp
+++ b/src/template.cpp
@@ -98,30 +98,33 @@ static std::vector<QCString> split(const QCString &str,const QCString &sep,
/** Strips spaces surrounding `=` from string \a in, so
* `foo = 10 bar=5 baz= 'hello'` will become `foo=10 bar=5 baz='hello'`
*/
-static QCString removeSpacesAroundEquals(const QCString &s)
+static void removeSpacesAroundEquals(QCString &s)
{
- if (s.isEmpty()) return s;
- QCString result(s);
- const char *p=s.data();
- char *q = result.rawData();
- char c;
- while ((c=*p++))
+ //printf(">removeSpacesAroundEquals(%s)\n",qPrint(s));
+ uint i=0, dstIdx=0, l=s.length();
+ while (i<l)
{
- if (c==' ') // found a space, see if there is a = as well
+ char c = s[i++];
+ if (c==' ')
{
- const char *t = p;
- bool found=FALSE;
- while (*t==' ' || *t=='=') { if (*t++=='=') found=TRUE; }
- if (found)
+ bool found=false;
+ // look ahead for space or '='
+ uint j=i;
+ while (j<l && (s[j]==' '|| s[j]=='='))
+ {
+ if (s[j]=='=') found=true;
+ j++;
+ }
+ if (found) // found a '=', write it without spaces
{
- c='=';
- p=t; // move p to end of '\s*=\s*' sequence
+ c = '=';
+ i=j;
}
}
- *q++=c;
+ s[dstIdx++]=c;
}
- if (q<p) result.resize(static_cast<uint>(q-result.data())+1);
- return result;
+ s.resize(dstIdx+1);
+ //printf("<removeSpacesAroundEquals(%s)\n",qPrint(s));
}
//----------------------------------------------------------------------------
@@ -130,9 +133,9 @@ static QCString removeSpacesAroundEquals(const QCString &s)
static QCString replace(const QCString &s,char csrc,char cdst)
{
QCString result = s;
- for (char *p=result.data();*p;p++)
+ for (uint i=0;i<result.length();i++)
{
- if (*p==csrc) *p=cdst;
+ if (result[i]==csrc) result[i]=cdst;
}
return result;
}
@@ -288,6 +291,17 @@ TemplateVariant TemplateStruct::get(const QCString &name) const
return it!=p->fields.end() ? it->second : TemplateVariant();
}
+StringVector TemplateStruct::fields() const
+{
+ StringVector result;
+ for (const auto &kv : p->fields)
+ {
+ result.push_back(kv.first);
+ }
+ std::sort(result.begin(),result.end());
+ return result;
+}
+
TemplateStruct *TemplateStruct::alloc()
{
return new TemplateStruct;
@@ -514,6 +528,7 @@ class TemplateContextImpl : public TemplateContext
void push();
void pop();
void set(const QCString &name,const TemplateVariant &v);
+ void update(const QCString &name,const TemplateVariant &v);
TemplateVariant get(const QCString &name) const;
const TemplateVariant *getRef(const QCString &name) const;
void setOutputDirectory(const QCString &dir)
@@ -1078,14 +1093,14 @@ class FilterAlphaIndex
private:
struct ListElem
{
- ListElem(uint k,const TemplateVariant &v) : key(k), value(v) {}
- QCString key;
+ ListElem(std::string k,const TemplateVariant &v) : key(k), value(v) {}
+ std::string key;
TemplateVariant value;
};
- static QCString keyToLabel(const QCString &startLetter)
+ static QCString keyToLabel(const char *startLetter)
{
- if (startLetter.isEmpty()) return startLetter;
- const char *p = startLetter.data();
+ //printf(">keyToLabel(%s)\n",qPrint(startLetter));
+ const char *p = startLetter;
char c = *p;
QCString result;
if (c<127 && c>31) // printable ASCII character
@@ -1102,16 +1117,14 @@ class FilterAlphaIndex
result+=hex[((unsigned char)c)&0xf];
}
}
+ //printf("<keyToLabel(%s)\n",qPrint(result));
return result;
}
- static uint determineSortKey(TemplateStructIntf *s,const QCString &attribName)
+ static std::string determineSortKey(TemplateStructIntf *s,const QCString &attribName)
{
TemplateVariant v = s->get(attribName);
int index = getPrefixIndex(v.toString());
- return getUnicodeForUTF8CharAt(
- convertUTF8ToUpper(
- getUTF8CharAt(v.toString().str(),index)
- ),0);
+ return convertUTF8ToUpper(getUTF8CharAt(v.toString().str(),index));
}
public:
@@ -1134,7 +1147,7 @@ class FilterAlphaIndex
TemplateStructIntf *s = item.toStruct();
if (s)
{
- uint sortKey = determineSortKey(s,args.toString());
+ std::string sortKey = determineSortKey(s,args.toString());
sortList.emplace_back(sortKey,item);
//printf("sortKey=%s\n",qPrint(sortKey));
}
@@ -1147,7 +1160,7 @@ class FilterAlphaIndex
[](const auto &lhs,const auto &rhs) { return lhs.key < rhs.key; });
// create an index from the sorted list
- QCString letter;
+ std::string letter;
TemplateStruct *indexNode = 0;
TemplateList *indexList = 0;
for (const auto &elem : sortList)
@@ -1158,7 +1171,7 @@ class FilterAlphaIndex
indexNode = TemplateStruct::alloc();
indexList = TemplateList::alloc();
indexNode->set("letter", elem.key);
- indexNode->set("label", keyToLabel(elem.key));
+ indexNode->set("label", keyToLabel(elem.key.c_str()));
indexNode->set("items",indexList);
result->append(indexNode);
letter=elem.key;
@@ -1282,6 +1295,72 @@ class FilterIsAbsoluteURL
//--------------------------------------------------------------------
+/** @brief The implementation of the "lower" filter */
+class FilterLower
+{
+ public:
+ static TemplateVariant apply(const TemplateVariant &v,const TemplateVariant &)
+ {
+ if (v.isValid() && v.type()==TemplateVariant::String)
+ {
+ return v.toString().lower();
+ }
+ return v;
+ }
+};
+
+//--------------------------------------------------------------------
+
+/** @brief The implementation of the "upper" filter */
+class FilterUpper
+{
+ public:
+ static TemplateVariant apply(const TemplateVariant &v,const TemplateVariant &)
+ {
+ if (v.isValid() && v.type()==TemplateVariant::String)
+ {
+ return v.toString().upper();
+ }
+ return v;
+ }
+};
+
+//--------------------------------------------------------------------
+
+/** @brief The implementation of the "upper" filter */
+class FilterHex
+{
+ public:
+ static TemplateVariant apply(const TemplateVariant &v,const TemplateVariant &)
+ {
+ if (v.isValid())
+ {
+ return QCString().sprintf("%x",v.toInt());
+ }
+ return v;
+ }
+};
+
+
+//--------------------------------------------------------------------
+
+/** @brief The implementation of the "e" filter */
+class FilterEscape
+{
+ public:
+ static TemplateVariant apply(const TemplateVariant &v,const TemplateVariant &)
+ {
+ if (v.isValid() && v.type()==TemplateVariant::String)
+ {
+ return convertToHtml(v.toString());
+ }
+ return v;
+ }
+};
+
+
+//--------------------------------------------------------------------
+
/** @brief The implementation of the "decodeURL" filter
* The leading character is removed from the value in case it is a ^ or !.
* - ^ is used to encode a absolute URL
@@ -1357,9 +1436,13 @@ class TemplateFilterFactory
// register a handlers for each filter we support
static TemplateFilterFactory::AutoRegister<FilterAdd> fAdd("add");
static TemplateFilterFactory::AutoRegister<FilterGet> fGet("get");
+static TemplateFilterFactory::AutoRegister<FilterHex> fHex("hex");
static TemplateFilterFactory::AutoRegister<FilterRaw> fRaw("raw");
static TemplateFilterFactory::AutoRegister<FilterList> fList("list");
+static TemplateFilterFactory::AutoRegister<FilterLower> fLower("lower");
+static TemplateFilterFactory::AutoRegister<FilterUpper> fUpper("upper");
static TemplateFilterFactory::AutoRegister<FilterAppend> fAppend("append");
+static TemplateFilterFactory::AutoRegister<FilterEscape> fEscape("escape");
static TemplateFilterFactory::AutoRegister<FilterLength> fLength("length");
static TemplateFilterFactory::AutoRegister<FilterNoWrap> fNoWrap("nowrap");
static TemplateFilterFactory::AutoRegister<FilterFlatten> fFlatten("flatten");
@@ -1409,7 +1492,7 @@ class ExprAstVariable : public ExprAst
{
public:
ExprAstVariable(const QCString &name) : m_name(name)
- { TRACE(("ExprAstVariable(%s)\n",name)); }
+ { TRACE(("ExprAstVariable(%s)\n",name.data())); }
const QCString &name() const { return m_name; }
virtual TemplateVariant resolve(TemplateContext *c)
{
@@ -1461,7 +1544,7 @@ class ExprAstFilter : public ExprAst
{
public:
ExprAstFilter(const QCString &name,ExprAst *arg) : m_name(name), m_arg(arg)
- { TRACE(("ExprAstFilter(%s)\n",name)); }
+ { TRACE(("ExprAstFilter(%s)\n",name.data())); }
~ExprAstFilter() { delete m_arg; }
const QCString &name() const { return m_name; }
TemplateVariant apply(const TemplateVariant &v,TemplateContext *c)
@@ -1506,7 +1589,7 @@ class ExprAstLiteral : public ExprAst
{
public:
ExprAstLiteral(const QCString &lit) : m_literal(lit)
- { TRACE(("ExprAstLiteral(%s)\n",lit)); }
+ { TRACE(("ExprAstLiteral(%s)\n",lit.data())); }
const QCString &literal() const { return m_literal; }
virtual TemplateVariant resolve(TemplateContext *) { return TemplateVariant(m_literal); }
private:
@@ -1969,6 +2052,7 @@ class ExpressionParser
{
warn(m_parser->templateName(),m_line,"unexpected operator '%s' in expression",
Operator::toString(m_curToken.op));
+ abort();
}
break;
default:
@@ -2261,8 +2345,8 @@ class ExpressionParser
m_curToken.id = s;
p++;
}
- //TRACE(("token type=%d op=%d num=%d id=%s\n",
- // m_curToken.type,m_curToken.op,m_curToken.num,qPrint(m_curToken.id)));
+ TRACE(("token type=%d op=%d num=%d id=%s\n",
+ m_curToken.type,m_curToken.op,m_curToken.num,qPrint(m_curToken.id)));
m_tokenStream = p;
return TRUE;
@@ -2305,6 +2389,7 @@ class TemplateStructWeakRef : public TemplateStructIntf
public:
TemplateStructWeakRef(TemplateStructIntf *ref) : m_ref(ref), m_refCount(0) {}
virtual TemplateVariant get(const QCString &name) const { return m_ref->get(name); }
+ virtual StringVector fields() const { return m_ref->fields(); }
virtual int addRef() { return ++m_refCount; }
virtual int release() { int count=--m_refCount; if (count<=0) { delete this; } return count; }
private:
@@ -2382,6 +2467,23 @@ void TemplateContextImpl::set(const QCString &name,const TemplateVariant &v)
ctx.insert(std::make_pair(name.str(),v));
}
+void TemplateContextImpl::update(const QCString &name,const TemplateVariant &v)
+{
+ int depth=0;
+ for (auto &ctx : m_contextStack)
+ {
+ auto it = ctx.find(name.str());
+ if (it!=ctx.end())
+ {
+ ctx.erase(it);
+ ctx.insert(std::make_pair(name.str(),v));
+ return;
+ }
+ depth++;
+ }
+ warn(m_templateName,m_line,"requesting update for non-existing variable '%s'",qPrint(name));
+}
+
TemplateVariant TemplateContextImpl::get(const QCString &name) const
{
int i=name.find('.');
@@ -3544,21 +3646,16 @@ class TemplateNodeInclude : public TemplateNodeCreator<TemplateNodeInclude>
static void stripLeadingWhiteSpace(QCString &s)
{
- const char *src = s.data();
- if (src)
+ uint i=0, dstIdx=0, l=s.length();
+ bool skipSpaces=true;
+ while (i<l)
{
- char *dst = s.rawData();
- char c;
- bool skipSpaces=TRUE;
- while ((c=*src++))
- {
- if (c=='\n') { *dst++=c; skipSpaces=TRUE; }
- else if (c==' ' && skipSpaces) {}
- else { *dst++=c; skipSpaces=FALSE; }
- }
- *dst='\0';
- s.resize( (int)(dst - src) + 1 );
+ char c = s[i++];
+ if (c=='\n') { s[dstIdx++]=c; skipSpaces=true; }
+ else if (c==' ' && skipSpaces) {}
+ else { s[dstIdx++] = c; skipSpaces=false; }
}
+ s.resize(dstIdx+1);
}
/** @brief Class representing an 'create' tag in a template */
@@ -3945,7 +4042,8 @@ class TemplateNodeWith : public TemplateNodeCreator<TemplateNodeWith>
{
TRACE(("{TemplateNodeWith(%s)\n",qPrint(data)));
ExpressionParser expParser(parser,line);
- QCString filteredData = removeSpacesAroundEquals(data);
+ QCString filteredData = data;
+ removeSpacesAroundEquals(filteredData);
std::vector<QCString> args = split(filteredData," ");
auto it = args.begin();
while (it!=args.end())
@@ -4114,6 +4212,52 @@ class TemplateNodeSet : public TemplateNodeCreator<TemplateNodeSet>
//----------------------------------------------------------
+/** @brief Class representing an 'update' tag in a template */
+class TemplateNodeUpdate : public TemplateNodeCreator<TemplateNodeUpdate>
+{
+ struct Mapping
+ {
+ Mapping(const QCString &n,ExprAst *e) : name(n), value(e) {}
+ ~Mapping() { }
+ QCString name;
+ ExprAst *value = 0;
+ };
+ public:
+ TemplateNodeUpdate(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
+ : TemplateNodeCreator<TemplateNodeUpdate>(parser,parent,line)
+ {
+ TRACE(("{TemplateNodeUpdate(%s)\n",qPrint(data)));
+ ExpressionParser expParser(parser,line);
+ // data format: name=expression
+ int j=data.find('=');
+ ExprAst *expr = 0;
+ if (j>0 && (expr = expParser.parse(data.mid(j+1))))
+ {
+ m_mapping = std::make_unique<Mapping>(data.left(j),expr);
+ }
+ TRACE(("}TemplateNodeUpdate(%s)\n",qPrint(data)));
+ }
+ ~TemplateNodeUpdate()
+ {
+ }
+ void render(TextStream &, TemplateContext *c)
+ {
+ TemplateContextImpl *ci = dynamic_cast<TemplateContextImpl*>(c);
+ if (ci==0) return; // should not happen
+ ci->setLocation(m_templateName,m_line);
+ if (m_mapping)
+ {
+ TemplateVariant value = m_mapping->value->resolve(c);
+ ci->update(m_mapping->name,value);
+ }
+ }
+ private:
+ std::unique_ptr<Mapping> m_mapping;
+};
+
+
+//----------------------------------------------------------
+
/** @brief Class representing an 'spaceless' tag in a template */
class TemplateNodeSpaceless : public TemplateNodeCreator<TemplateNodeSpaceless>
{
@@ -4313,6 +4457,12 @@ class TemplateNodeResource : public TemplateNodeCreator<TemplateNodeResource>
m_resExpr = ep.parse(data.left(i)); // part before as
m_asExpr = ep.parse(data.mid(i+4)); // part after as
}
+ else if ((i=data.find(" append "))!=-1) // resource a appends to b
+ {
+ m_resExpr = ep.parse(data.left(i)); // part before append
+ m_asExpr = ep.parse(data.mid(i+8)); // part after append
+ m_append = true;
+ }
else // resource a
{
m_resExpr = ep.parse(data);
@@ -4345,11 +4495,12 @@ class TemplateNodeResource : public TemplateNodeCreator<TemplateNodeResource>
QCString targetFile = m_asExpr->resolve(c).toString();
mkpath(ci,targetFile.str());
if (targetFile.isEmpty())
- { ci->warn(m_templateName,m_line,"invalid parameter at right side of 'as' for resource command\n");
+ {
+ ci->warn(m_templateName,m_line,"invalid parameter at right side of '%s' for resource command\n", m_append ? "append" : "as");
}
else
{
- ResourceMgr::instance().copyResourceAs(resourceFile,outputDirectory,targetFile);
+ ResourceMgr::instance().copyResourceAs(resourceFile,outputDirectory,targetFile,m_append);
}
}
else
@@ -4362,6 +4513,7 @@ class TemplateNodeResource : public TemplateNodeCreator<TemplateNodeResource>
private:
ExprAst *m_resExpr = 0;
ExprAst *m_asExpr = 0;
+ bool m_append = false;
};
//----------------------------------------------------------
@@ -4477,6 +4629,7 @@ static TemplateNodeFactory::AutoRegister<TemplateNodeRange> autoRefRange
static TemplateNodeFactory::AutoRegister<TemplateNodeExtend> autoRefExtend("extend");
static TemplateNodeFactory::AutoRegister<TemplateNodeCreate> autoRefCreate("create");
static TemplateNodeFactory::AutoRegister<TemplateNodeRepeat> autoRefRepeat("repeat");
+static TemplateNodeFactory::AutoRegister<TemplateNodeUpdate> autoRefUpdate("update");
static TemplateNodeFactory::AutoRegister<TemplateNodeInclude> autoRefInclude("include");
static TemplateNodeFactory::AutoRegister<TemplateNodeMarkers> autoRefMarkers("markers");
static TemplateNodeFactory::AutoRegister<TemplateNodeTabbing> autoRefTabbing("tabbing");
@@ -4797,7 +4950,7 @@ void TemplateLexer::addToken(TemplateTokenStream &tokens,
{
if (startPos<endPos)
{
- int len = endPos-startPos+1;
+ int len = endPos-startPos;
QCString text = data.mid(startPos,len);
if (type!=TemplateToken::Text) text = text.stripWhiteSpace();
tokens.push_back(std::make_unique<TemplateToken>(type,text,line));
@@ -4822,8 +4975,8 @@ void TemplateParser::parse(
while (hasNextToken())
{
auto tok = takeNextToken();
- //printf("%p:Token type=%d data='%s' line=%d\n",
- // parent,tok->type,qPrint(tok->data),tok->line);
+ TRACE(("%p:Token type=%d data='%s' line=%d\n",
+ (void*)parent,tok->type,qPrint(tok->data),tok->line));
switch(tok->type)
{
case TemplateToken::Text:
@@ -5178,4 +5331,50 @@ void TemplateEngine::setTemplateDir(const QCString &dirName)
p->setTemplateDir(dirName);
}
+//-----------------------------------------------------------------------------------------
+
+QCString TemplateVariant::listToString() const
+{
+ QCString result="[";
+ TemplateListIntf *list = toList();
+ if (list)
+ {
+ bool first=true;
+ TemplateVariant ve;
+ TemplateListIntf::ConstIterator *it = list->createIterator();
+ for (it->toFirst();it->current(ve);it->toNext())
+ {
+ if (!first) result+=",\n";
+ result+="'"+ve.toString()+"'";
+ first=false;
+ }
+ delete it;
+ }
+ result+="]";
+ return result;
+}
+
+QCString TemplateVariant::structToString() const
+{
+ QCString result="{";
+ TemplateStructIntf *strukt = toStruct();
+ if (strukt)
+ {
+ bool first=true;
+ for (const auto &s : strukt->fields())
+ {
+ if (!first) result+=",";
+ result+=s;
+ if (dynamic_cast<TemplateStructWeakRef*>(strukt)==0) // avoid endless recursion
+ {
+ result+=":'";
+ result+=strukt->get(QCString(s)).toString();
+ result+="'";
+ }
+ first=false;
+ }
+ }
+ result+="}";
+ return result;
+}
diff --git a/src/template.h b/src/template.h
index dee063d..7d803a3 100644
--- a/src/template.h
+++ b/src/template.h
@@ -19,6 +19,7 @@
#include <vector>
#include "qcstring.h"
+#include "containers.h"
class TemplateListIntf;
class TemplateStructIntf;
@@ -28,7 +29,7 @@ class TextStream;
/** @defgroup template_api Template API
*
* This is the API for a
- * <a href="https://docs.djangoproject.com/en/1.6/topics/templates/">Django</a>
+ * <a href="https://www.djangoproject.com/">Django</a>
* compatible template system written in C++.
* It is somewhat inspired by Stephen Kelly's
* <a href="http://www.gitorious.org/grantlee/pages/Home">Grantlee</a>.
@@ -175,6 +176,9 @@ class TemplateVariant
/** Constructs a new variant with a string value \a s. */
TemplateVariant(const QCString &s,bool raw=FALSE) : m_type(String), m_strVal(s), m_strukt(0), m_raw(raw) {}
+ /** Constructs a new variant with a string value \a s. */
+ TemplateVariant(const std::string &s,bool raw=FALSE) : m_type(String), m_strVal(s), m_strukt(0), m_raw(raw) {}
+
/** Constructs a new variant with a struct value \a s.
* @note. The variant will hold a reference to the object.
*/
@@ -228,6 +232,9 @@ class TemplateVariant
}
}
+ QCString listToString() const;
+ QCString structToString() const;
+
/** Returns the variant as a string. */
QCString toString() const
{
@@ -237,8 +244,8 @@ class TemplateVariant
case Bool: return m_boolVal ? "true" : "false";
case Integer: return QCString().setNum(m_intVal);
case String: return m_strVal;
- case Struct: return "[struct]";
- case List: return "[list]";
+ case Struct: return structToString();
+ case List: return listToString();
case Function: return "[function]";
}
return QCString();
@@ -414,6 +421,9 @@ class TemplateStructIntf
*/
virtual TemplateVariant get(const QCString &name) const = 0;
+ /** Return the list of fields. */
+ virtual StringVector fields() const = 0;
+
/** Increase object's reference count */
virtual int addRef() = 0;
@@ -428,6 +438,7 @@ class TemplateStruct : public TemplateStructIntf
public:
// TemplateStructIntf methods
virtual TemplateVariant get(const QCString &name) const;
+ virtual StringVector fields() const;
virtual int addRef();
virtual int release();
diff --git a/templates/html/dynsections_tooltips.js b/templates/html/dynsections_tooltips.js
new file mode 100644
index 0000000..ddc333a
--- /dev/null
+++ b/templates/html/dynsections_tooltips.js
@@ -0,0 +1,6 @@
+$(document).ready(function() {
+ $('.code,.codeRef').each(function() {
+ $(this).data('powertip',$('#a'+$(this).attr('href').replace(/.*\//,'').replace(/[^a-z_A-Z0-9]/g,'_')).html());
+ $(this).powerTip({ placement: 's', smartPlacement: true, mouseOnToPopup: true });
+ });
+});
diff --git a/templates/html/header.html b/templates/html/header.html
index c3bcc04..8db982e 100644
--- a/templates/html/header.html
+++ b/templates/html/header.html
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen $doxygenversion"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
@@ -22,9 +22,11 @@ $mathjax
$extrastylesheet
</head>
<body>
-<!--BEGIN FULL_SIDEBAR-->
+<!--BEGIN DISABLE_INDEX-->
+ <!--BEGIN FULL_SIDEBAR-->
<div id="side-nav" class="ui-resizable side-nav-resizable"><!-- do not remove this div, it is closed by doxygen! -->
-<!--END FULL_SIDEBAR-->
+ <!--END FULL_SIDEBAR-->
+<!--END DISABLE_INDEX-->
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
diff --git a/templates/html/htmlallmembers.tpl b/templates/html/htmlallmembers.tpl
index b44110d..ed34131 100644
--- a/templates/html/htmlallmembers.tpl
+++ b/templates/html/htmlallmembers.tpl
@@ -9,8 +9,7 @@
<p>{{ tr.theListOfAllMembers }} <a class="el" href="{{ compound.fileName }}{{ config.HTML_FILE_EXTENSION }}">{{ compound.name }}</a>{{ tr.incInheritedMembers }}</p>
<table class="directory">
{% for mi in compound.allMembersList %}
- <tr class="{% cycle 'even' 'odd' %}">
- {% spaceless %}
+ <tr class="{% cycle 'even' 'odd' %}">{% spaceless %}
{% with member=mi.member %}
{% if member.language=='objc' %}
<td class="entry">
diff --git a/templates/html/htmlannotated.tpl b/templates/html/htmlannotated.tpl
index c5faa14..e3b8442 100644
--- a/templates/html/htmlannotated.tpl
+++ b/templates/html/htmlannotated.tpl
@@ -4,7 +4,7 @@
<div class="textblock">
{{ tr.classListDescription }}
</div>
-{% indexentry nav name=tr.classes file=page.fileName anchor='' isReference=False %}
+{% indexentry nav name=tr.classList file=page.fileName anchor='' isReference=False separateIndex=True %}
{% opensubindex nav %}
{% with tree=classTree %}
{% include 'htmldirtree.tpl' %}
diff --git a/templates/html/htmlbase.tpl b/templates/html/htmlbase.tpl
index f021ddd..39bfa8a 100644
--- a/templates/html/htmlbase.tpl
+++ b/templates/html/htmlbase.tpl
@@ -3,11 +3,14 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen {{ doxygen.version }}"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
-<title>{{ config.PROJECT_NAME }}: {{ page.title }}</title>
+<title>{% if config.PROJECT_NAME %}{{ config.PROJECT_NAME }}: {% endif %}{{ page.title }}</title>
<link href="{{ page.relPath }}tabs.css" rel="stylesheet" type="text/css"/>
+{% if config.DISABLE_INDEX and config.FULL_SIDEBAR %}
+<script type="text/javascript">var page_layout=1;</script>
+{% endif %}
<script type="text/javascript" src="{{ page.relPath }}jquery.js"></script>
<script type="text/javascript" src="{{ page.relPath }}dynsections.js"></script>
{% if config.GENERATE_TREEVIEW %}
@@ -15,22 +18,6 @@
<script type="text/javascript" src="{{ page.relPath }}resize.js"></script>
<script type="text/javascript" src="{{ page.relPath }}navtreedata.js"></script>
<script type="text/javascript" src="{{ page.relPath }}navtree.js"></script>
-<script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- $(document).ready(initResizable);
- /* @license-end */
-</script>
-{% endif %}
-{% if not config.DISABLE_INDEX %}
-<script type="text/javascript" src="menudata.js"></script>
-<script type="text/javascript" src="menu.js"></script>
-<script type="text/javascript">
-/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
-$(function() {
- initMenu('',{% if config.SEARCHENGINE %}true{% else %}false{% endif %},'{{ tr.search }}');
-});
-/* @license-end */
-</script>
{% endif %}
{% if config.SEARCHENGINE %}
<link href="{{ page.relPath }}search/search.css" rel="stylesheet" type="text/css"/>
@@ -40,30 +27,53 @@ $(function() {
<script type="text/javascript" src="{{ page.relPath }}search/search.js"></script>
{% if config.SERVER_BASED_SEARCH %}
<script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
+ /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function() {
if ($('.searchresults').length > 0) { searchBox.DOMSearchField().focus(); }
});
- /* @license-end */
+ /* @license-end */
</script>
<link rel="search" href="{{ page.relPath }}search-opensearch.php?v=opensearch.xml" type="application/opensearchdescription+xml" title="{{ config.PROJECT_NAME }}"/>
- {% else %}
+ {% elif config.DISABLE_INDEX or not config.HTML_DYNAMIC_MENUS %}
<script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
+ /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function() { init_search(); });
- /* @license-end */
+ /* @license-end */
</script>
{% endif %}
{% endif %}
{% if config.USE_MATHJAX %}
+{% if config.MATHJAX_VERSION=="MathJax_3" %}
+<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
+<script type="text/javascript">
+window.MathJax = {
+ options: {
+ ignoreHtmlClass: 'tex2jax_ignore',
+ processHtmlClass: 'tex2jax_process'
+ },
+ tex: {
+{% if doxygen.mathJaxMacros %}
+ macros: { {{ doxygen.mathJaxMacros|raw }} },
+{% endif %}
+ packages: ['base','configmacros'{% if doxygen.mathJaxMacros %},'newcommand'{% endif %}{% for ext in config.MATHJAX_EXTENSIONS %},'{{ ext }}'{% endfor %}]
+ }
+};
+{{ doxygen.mathJaxCodeFile }}
+</script>
+<script type="text/javascript" id="MathJax-script" async="async" src="{{ config.MATHJAX_RELPATH }}{% if config.MATHJAX_RELPATH|relative %}{{ page.relPath }}{% endif %}es5/tex-{{ config.MATHJAX_FORMAT|lower }}.js"></script>
+{% else %}{# MathJax_2 #}
<script type="text/x-mathjax-config">
- MathJax.Hub.Config({
- extensions: ["tex2jax.js"{% for ext in config.MATHJAX_EXTENSIONS %}, "{{ ext }}"{% endfor %}],
- jax: ["input/TeX","output/{{ config.MATHJAX_FORMAT|default:'HTML-CSS' }}"],
+MathJax.Hub.Config({
+ extensions: ["tex2jax.js"{% for ext in config.MATHJAX_EXTENSIONS %}, "{{ ext }}.js"{% endfor %}],
+ jax: ["input/TeX","output/{{ config.MATHJAX_FORMAT|default:'HTML-CSS' }}"],
+{% if doxygen.mathJaxMacros %}
+ TeX: { Macros: { {{ doxygen.mathJaxMacros|raw }} } }
+{% endif %}
});
{{ doxygen.mathJaxCodeFile }}
</script>
-<script type="text/javascript" src="{{ config.MATHJAX_RELPATH }}{% if config.MATHJAX_RELPATH|relative %}{{ page.relPath }}{% endif %}MathJax.js"></script>
+<script type="text/javascript" async="async" src="{{ config.MATHJAX_RELPATH }}{% if config.MATHJAX_RELPATH|relative %}{{ page.relPath }}{% endif %}MathJax.js"></script>
+{% endif %}{# MathJax_3 #}
{% endif %}{# MathJax #}
<link href="{{ page.relPath }}{{ config.HTML_STYLESHEET|default:'doxygen.css' }}" rel="stylesheet" type="text/css" />
{% if config.HTML_EXTRA_STYLESHEET %}
@@ -72,6 +82,9 @@ $(function() {
</head>
<body>
{% endblock %}
+{% if config.DISABLE_INDEX and config.FULL_SIDEBAR %}
+<div id="side-nav" class="ui-resizable side-nav-resizable"><!-- do not remove this div, it is closed by doxygen! -->
+{% endif %}
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
{% block titlearea %}
{% if config.PROJECT_NAME or config.PROJECT_BRIEF or config.PROJECT_LOGO or config.DISABLE_INDEX and config.SEARCHENGINE %}
@@ -82,12 +95,9 @@ $(function() {
{% if config.PROJECT_LOGO %}
<td id="projectlogo"><img alt="Logo" src="{{ page.relPath }}{{ config.PROJECT_LOGO|stripPath }}"/></td>
{% endif %}
- <td style="padding-left: 0.5em;">
+ <td id="projectalign" style="padding-left: 0.5em;">
{% if config.PROJECT_NAME %}
- <div id="projectname">{{ config.PROJECT_NAME }}
- {% if config.PROJECT_NUMBER %}
- <span id="projectnumber">{{ config.PROJECT_NUMBER }}</span>
- {% endif %}
+ <div id="projectname">{{ config.PROJECT_NAME }}{% if config.PROJECT_NUMBER %}<span id="projectnumber">&#160;{{ config.PROJECT_NUMBER }}</span>{% endif %}
</div>
{% endif %}
{% if config.PROJECT_BRIEF %}
@@ -95,7 +105,13 @@ $(function() {
{% endif %}
</td>
{% if config.DISABLE_INDEX and config.SEARCHENGINE %}{# search box is part of title area #}
+ {% if config.GENERATE_TREEVIEW and config.FULL_SIDEBAR %}{# search box separate row #}
+ </tr>
+ <tr>
+ <td colspan="2">
+ {% else %}
<td>
+ {% endif %}
{% if config.SERVER_BASED_SEARCH %}
<div id="MSearchBox" class="MSearchBoxInactive">
<div class="left">
@@ -139,27 +155,45 @@ $(function() {
{% block search %}
{% if config.SEARCHENGINE %}
<script type="text/javascript">
-/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
-var searchBox = new SearchBox("searchBox", "{{ page.relPath }}search",false,'{{ tr.search }}');
+/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
+ var searchBox = new SearchBox("searchBox", "{{ page.relPath }}search",false,'{{ tr.search }}','{{ config.HTML_FILE_EXTENSION }}');
/* @license-end */
</script>
{% endif %}
{% endblock %}
{% block tabs %}
-{% if not config.DISABLE_INDEX %}
+{% if config.HTML_DYNAMIC_MENUS %}
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
+$(function() {
+ initMenu('{{ page.relPath }}',{% if config.SEARCHENGINE %}true{% else %}false{% endif %},{% if config.SERVER_BASED_SEARCH %}true{% else %}false{% endif %},{% if config.EXTERNAL_SEARCH %}'search{{ config.HTML_FILE_EXTENSION }}'{% else %}'search.php'{% endif %},'{{ tr.search }}');
+ {% if config.SEARCHENGINE %}
+ $(document).ready(function() { {% if not config.SERVER_BASED_SEARCH %}init_search();{% else %}if ($('.searchresults').length > 0) { searchBox.DOMSearchField().focus(); } {% endif %}});
+ {% endif %}
+});
+/* @license-end */
+</script>
<div id="main-nav"></div>
{% endif %}
+
+{% if not config.DISABLE_INDEX and not config.HTML_DYNAMIC_MENUS %}
+{% include 'htmltabs.tpl' %}
+{% endif %}
+</div><!-- top -->
+
{% endblock %}
{% block navpath %}
{% endblock %}
-
-</div><!-- top -->
{% block splitbar %}
{% if config.GENERATE_TREEVIEW %}
+{% if not config.DISABLE_INDEX or not config.FULL_SIDEBAR %}
<div id="side-nav" class="ui-resizable side-nav-resizable">
+{% endif %}
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
@@ -170,8 +204,8 @@ var searchBox = new SearchBox("searchBox", "{{ page.relPath }}search",false,'{{
</div>
</div>
<script type="text/javascript">
-/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
-$(document).ready(function(){initNavTree('{{ page.fileName }}{% if page_postfix %}{{ page_postfix }}{% endif %}{{ config.HTML_FILE_EXTENSION }}','{{ page.relPath }}');});
+/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
+$(document).ready(function(){initNavTree('{{ page.fileName }}{% if page_postfix %}{{ page_postfix }}{% endif %}{{ config.HTML_FILE_EXTENSION }}','{{ page.relPath }}'); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
@@ -181,13 +215,15 @@ $(document).ready(function(){initNavTree('{{ page.fileName }}{% if page_postfix
{% block searchInfo %}
{% if config.SEARCHENGINE and not config.SERVER_BASED_SEARCH %}
<!-- window showing the filter options -->
-<div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()"
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
-<iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
</iframe>
</div>
{% endif %}
@@ -195,20 +231,22 @@ $(document).ready(function(){initNavTree('{{ page.fileName }}{% if page_postfix
<div class="header">
{% block title %}
- <div class="headertitle"><div class="title">{{ page.title }}</div></div>
+<div class="headertitle">
+<div class="title">{{ page.title }}</div></div>
{% endblock %}
-</div>
+</div><!-- header -->
{% block content %}
{% endblock %}
{% block endsplitbar %}
{% if config.GENERATE_TREEVIEW %}
-</div><!-- content -->
+</div><!-- doc-content -->
{% endif %}
{% endblock %}
{% block footer %}
+<!-- start footer part -->
{% if config.GENERATE_TREEVIEW %}
<div id="nav-path" class="navpath">{# id is needed for treeview function! #}
<ul>
@@ -233,14 +271,8 @@ $(document).ready(function(){initNavTree('{{ page.fileName }}{% if page_postfix
</div>
{% else %}
<hr class="footer"/><address class="footer"><small>
-{% if config.HTML_TIMESTAMP %}
-{{ tr.generatedAt:doxygen.date,config.PROJECT_NAME }}
-{% else %}
-{{ tr.generatedBy }}
-{% endif %}
-&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="{{ page.relPath }}doxygen.svg" width="104" height="31" alt="doxygen"/></a>
- {{ doxygen.version }}
- </small></address>
+{% if config.HTML_TIMESTAMP %}{{ tr.generatedAt:doxygen.date,config.PROJECT_NAME }}{% else %}{{ tr.generatedBy }}{% endif %}&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="{{ page.relPath }}doxygen.svg" width="104" height="31" alt="doxygen"/></a> {{ doxygen.version }}
+</small></address>
{% endif %}
</body>
</html>
diff --git a/templates/html/htmlclass.tpl b/templates/html/htmlclass.tpl
index 9a2b494..d5175af 100644
--- a/templates/html/htmlclass.tpl
+++ b/templates/html/htmlclass.tpl
@@ -429,7 +429,7 @@
{{ compound.generatedFromFiles }}
<ul>
{% for file in compound.usedFiles %}
- <li>{% if file.sourceFileName %}
+ <li>{% if file.sourceFileName and file.isLinkable %}
<a class="el" href="{{ file.sourceFileName }}{{ config.HTML_FILE_EXTENSION }}">
{% endif %}
{% if not file.sourceFileName and file.isLinkable %}
@@ -440,7 +440,7 @@
{% else %}
{{ file.name|stripPath }}
{% endif %}
- {% if file.sourceFileName or file.isLinkable %}
+ {% if file.isLinkable %}
</a>
{% endif %}
{% if file.versionInfo %} {{ file.versionInfo }}{% endif %}
@@ -448,6 +448,6 @@
{% endfor %}
</ul>
{% endif %}
-</div>
+</div><!-- contents -->
{% endblock %}
diff --git a/templates/html/htmlclasses.tpl b/templates/html/htmlclasses.tpl
index c00ce32..3e556a2 100644
--- a/templates/html/htmlclasses.tpl
+++ b/templates/html/htmlclasses.tpl
@@ -1,9 +1,6 @@
{% extend 'htmlbase.tpl' %}
{% block content %}
<div class="contents">
-<div class="textblock">
-{% indexentry nav name=tr.classIndex file=page.fileName anchor='' isReference=False %}
-</div>
{% with index=classIndex.list|alphaIndex:'name' %}
{# quick index at top #}
<div class="qindex">
@@ -14,33 +11,22 @@
{% endif %}
{% endfor %}
</div>
+ {% indexentry nav name=tr.classIndex file=page.fileName anchor='' isReference=False separateIndex=False %}
{# multi column index #}
- <div class="classindex" style="column-count:{{ config.COLS_IN_ALPHA_INDEX }};-moz-column-count:{{ config.COLS_IN_ALPHA_INDEX }};-webkit-column-count:{{ config.COLS_IN_ALPHA_INDEX}}">
+ <div class="classindex">
{% for section in index %}
- <ul>
+ <dl class="classindex {% cycle 'even' 'odd' %}">
{% for cls in section.items %}
- <li>
- <span class="ai">
- {% if forloop.first %}
- <a name="letter_{{ section.label }}"></a>
- <span class="ah">&#160;&#160;{{ section.letter }}&#160;&#160;</span><br/>
- {% endif %}
- {% with obj=cls text=cls.name %}
- {% include 'htmlobjlink.tpl' %}
- {% endwith %}
- </span>
- </li>
+ {% if forloop.first %}
+ <dt class="alphachar"><a id="letter_{{ section.label }}" name="letter_{{ section.label }}">{{ section.letter }}</a></dt>
+ {% endif %}
+ <dd>
+ {% with obj=cls text=cls.name %}
+ {% include 'htmlobjlink.tpl' %}
+ {% endwith %}
+ </dd>
{% endfor %}
- </ul>
- {% endfor %}
- </div><!-- classindex -->
- {# quick index at bottom #}
- <div class="qindex">
- {% for section in index %}
- <a class="qindex" href="#letter_{{ section.label }}">{{ section.letter }}</a>
- {% if not forloop.last %}
- &#160;|&#160;
- {% endif %}
+ </dl>
{% endfor %}
</div>
{% endwith %}
diff --git a/templates/html/htmldeclcomp.tpl b/templates/html/htmldeclcomp.tpl
index 3ae90b8..5f6fe60 100644
--- a/templates/html/htmldeclcomp.tpl
+++ b/templates/html/htmldeclcomp.tpl
@@ -15,6 +15,7 @@
{% include 'htmlobjlink.tpl' %}
{% endwith %}
{% endif %}
+ {% if nc.sourceFileName and nc.isLinkable %}<a class="el" href="{{ nc.sourceFileName }}{{ config.HTML_FILE_EXTENSION }}">[{{ tr.code }}]</a>{% endif %}
</td></tr>
{# brief description #}
{% if nc.brief %}
@@ -25,7 +26,7 @@
{% endif %}
<br/></td></tr>
{% endif %}
- <tr class="separator:{{ nc.anchor}}"><td class="memSeparator" colspan="2">&#160;</td></tr>
+ <tr class="separator:{{ nc.anchor }}"><td class="memSeparator" colspan="2">&#160;</td></tr>
{% endfor %}
</table>
{% endif %}
diff --git a/templates/html/htmldirtree.tpl b/templates/html/htmldirtree.tpl
index a6b9b21..f1b4fcf 100644
--- a/templates/html/htmldirtree.tpl
+++ b/templates/html/htmldirtree.tpl
@@ -11,7 +11,12 @@
{# the table with entries #}
<table class="directory">
{% recursetree tree.tree %}
- {% indexentry nav name=node.name file=node.fileName anchor=node.anchor isReference=node.isReference externalReference=node.externalReference %}
+ {% if node.isLinkable %}
+ {% indexentry nav name=node.name file=node.fileName anchor=node.anchor isReference=node.isReference externalReference=node.externalReference separateIndex=True %}
+ {% else %}
+ {% indexentry nav name=node.name file='' anchor=node.anchor isReference=False separateIndex=False %}
+ {% endif %}
+ {% if not node.member %}
{% spaceless %}
<tr id="row_{{ node.id }}" class="{% cycle 'even' 'odd' %}"{%if node.level>tree.preferredDepth %} style="display:none;"{% endif %}>
<td class="entry">
@@ -47,6 +52,16 @@
{% opensubindex nav %}
{{ children }}
{% closesubindex nav %}
+ {% spaceless %}
+ {% if node.members %}
+ {% opensubindex nav %}
+ {% for member in node.members %}
+ {% indexentry nav name=member.name file=member.fileName anchor=member.anchor isReference=member.isReference externalReference=member.externalReference separateIndex=False %}
+ {% endfor %}
+ {% closesubindex nav %}
+ {% endif %}
+ {% endspaceless %}
+ {% endif %}
{% endrecursetree %}
</table>
</div><!-- directory -->
diff --git a/templates/html/htmlexamples.tpl b/templates/html/htmlexamples.tpl
index 58392df..18384e2 100644
--- a/templates/html/htmlexamples.tpl
+++ b/templates/html/htmlexamples.tpl
@@ -4,7 +4,7 @@
<div class="textblock">
{{ tr.examplesDescription }}
</div>
-{% indexentry nav name=tr.examples file=page.fileName anchor='' isReference=False %}
+{% indexentry nav name=tr.examples file=page.fileName anchor='' isReference=False separateIndex=False %}
{% opensubindex nav %}
{% with tree=exampleTree %}
{% include 'htmldirtree.tpl' %}
diff --git a/templates/html/htmlfiles.tpl b/templates/html/htmlfiles.tpl
index 55799ca..1c784dc 100644
--- a/templates/html/htmlfiles.tpl
+++ b/templates/html/htmlfiles.tpl
@@ -4,7 +4,7 @@
<div class="textblock">
{{ tr.fileListDescription }}
</div>
-{% indexentry nav name=tr.fileList file=page.fileName anchor='' isReference=False %}
+{% indexentry nav name=tr.fileList file=page.fileName anchor='' isReference=False separateIndex=True %}
{% opensubindex nav %}
{% with tree=fileTree %}
{% include 'htmldirtree.tpl' %}
diff --git a/templates/html/htmlhierarchy.tpl b/templates/html/htmlhierarchy.tpl
index ff10172..df01709 100644
--- a/templates/html/htmlhierarchy.tpl
+++ b/templates/html/htmlhierarchy.tpl
@@ -7,7 +7,7 @@
<p><a href="inherits{{ config.HTML_FILE_EXTENSION }}">{{ tr.gotoGraphicalHierarchy }}</a></p>
{% endif %}
</div>
-{% indexentry nav name=tr.classHierarchy file=page.fileName anchor='' isReference=False %}
+{% indexentry nav name=tr.classHierarchy file=page.fileName anchor='' isReference=False separateIndex=True %}
{% opensubindex nav %}
{% with tree=classHierarchy %}
{% include 'htmldirtree.tpl' %}
diff --git a/templates/html/htmlindexpages.tpl b/templates/html/htmlindexpages.tpl
index 2886a69..eacf122 100644
--- a/templates/html/htmlindexpages.tpl
+++ b/templates/html/htmlindexpages.tpl
@@ -9,7 +9,7 @@
{% for sect in index %}
{% with letter=sect.letter %}
{% set page_postfix=section|append:'_'|append:sect.label %}
- {% indexentry nav name=letter file=page.fileName|append:page_postfix anchor='' isReference=False %}
+ {% indexentry nav name=letter file=page.fileName|append:page_postfix anchor='' isReference=False separateIndex=False %}
{# create index pages for all globals starting with a specific letter #}
{% create page.fileName|append:page_postfix|append:config.HTML_FILE_EXTENSION from template %}
{% endwith %}
diff --git a/templates/html/htmljsmenudata.tpl b/templates/html/htmljsmenudata.tpl
index 3db8bd4..2d0a53e 100644
--- a/templates/html/htmljsmenudata.tpl
+++ b/templates/html/htmljsmenudata.tpl
@@ -1,39 +1,40 @@
/*
- @licstart The following is the entire license notice for the
- JavaScript code in this file.
+ @licstart The following is the entire license notice for the JavaScript code in this file.
- Copyright (C) 1997-2017 by Dimitri van Heesch
+ The MIT License (MIT)
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ Copyright (C) 1997-2020 by Dimitri van Heesch
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ and associated documentation files (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ The above copyright notice and this permission notice shall be included in all copies or
+ substantial portions of the Software.
- @licend The above is the entire license notice
- for the JavaScript code in this file
- */
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ @licend The above is the entire license notice for the JavaScript code in this file
+*/
var menudata={children:[
-{text:'{{ tr.mainPage }}',url:'index{{ config.HTML_FILE_EXTENSION }}'}
+{text:"{{ tr.mainPage }}",url:"index{{ config.HTML_FILE_EXTENSION }}"}
{% if pageTree.tree %}
-,{text:'{{ tr.pages }}',url:'pages{{ config.HTML_FILE_EXTENSION }}'}
+,{text:"{{ tr.pages }}",url:"pages{{ config.HTML_FILE_EXTENSION }}"}
{% endif %}
{% if moduleTree.tree %}
-,{text:'{{ tr.modules }}',url:'modules{{ config.HTML_FILE_EXTENSION }}'}
+,{text:"{{ tr.modules }}",url:"modules{{ config.HTML_FILE_EXTENSION }}"}
{% endif %}
{% if namespaceList %}
-,{text:'{{ tr.namespaces }}',url:'namespaces{{ config.HTML_FILE_EXTENSION }}',children:[
- {text:'{{ tr.namespaceList }}',url:'namespaces{{ config.HTML_FILE_EXTENSION }}'}
+,{text:"{{ tr.namespaces }}",url:'namespaces{{ config.HTML_FILE_EXTENSION }}",children:[
+ {text:"{{ tr.namespaceList }}",url:'namespaces{{ config.HTML_FILE_EXTENSION }}"}
{% if namespaceMembersIndex.all %}
-,{text:'{{ tr.namespaceMembers }}',url:'namespacemembers{{ config.HTML_FILE_EXTENSION }}',children:[
+,{text:"{{ tr.namespaceMembers }}",url:'namespacemembers{{ config.HTML_FILE_EXTENSION }}",children:[
{% with page=namespaceMembersIndex %}
{% include 'htmljsmenumembersdata.tpl' %}
{% endwith %}
@@ -42,13 +43,14 @@ var menudata={children:[
]}
{% endif %}
{% if classList %}
-,{text:'{{ tr.classes }}',url:'annotated{{ config.HTML_FILE_EXTENSION }}',children:[
- {text:'{{ tr.classList }}',url:'annotated{{ config.HTML_FILE_EXTENSION }}'}
-{% if classHierarchy.tree %}
-,{text:'{{ tr.classHierarchy }}',url:'hierarchy{{ config.HTML_FILE_EXTENSION }}'}
+,{text:"{{ tr.classes }}",url:"annotated{{ config.HTML_FILE_EXTENSION }}",children:[
+ {text:"{{ tr.classList }}",url:"annotated{{ config.HTML_FILE_EXTENSION }}"}
+,{text:"{{ tr.classIndex }}",url:"classes{{ config.HTML_FILE_EXTENSION }}"}
+{% if classHierarchy.tree and classHierarchy.maxDepth>1 %}
+,{text:"{{ tr.classHierarchy }}",url:"hierarchy{{ config.HTML_FILE_EXTENSION }}"}
{% endif %}
{% if classMembersIndex.all %}
-,{text:'{{ tr.classMembers }}',url:'functions{{ config.HTML_FILE_EXTENSION }}',children:[
+,{text:"{{ tr.classMembers }}",url:"functions{{ config.HTML_FILE_EXTENSION }}",children:[
{% with page=classMembersIndex %}
{% include 'htmljsmenumembersdata.tpl' %}
{% endwith %}
@@ -57,10 +59,10 @@ var menudata={children:[
]}
{% endif %}
{% if fileList %}
-,{text:'{{ tr.files }}',url:'files{{ config.HTML_FILE_EXTENSION }}',children[
- {text:'{{ tr.fileList }}',url:'files{{ config.HTML_FILE_EXTENSION }}'}
+,{text:"{{ tr.files }}",url:"files{{ config.HTML_FILE_EXTENSION }}",children:[
+ {text:"{{ tr.fileList }}",url:"files{{ config.HTML_FILE_EXTENSION }}"}
{% if globalsIndex.all %}
-,{text:'{{ tr.fileMembers }}',url'globals{{ config.HTML_FILE_EXTENSION }}',children:[
+,{text:"{{ tr.fileMembers }}",url:"globals{{ config.HTML_FILE_EXTENSION }}",children:[
{% with page=globalsIndex %}
{% include 'htmljsmenumembersdata.tpl' %}
{% endwith %}
@@ -69,6 +71,6 @@ var menudata={children:[
]}
{% endif %}
{% if exampleTree.tree %}
-,{text:'{{ tr.examples }}',url:'examples{{ config.HTML_FILE_EXTENSION }}'}
+,{text:"{{ tr.examples }}",url:"examples{{ config.HTML_FILE_EXTENSION }}"}
{% endif %}
]}
diff --git a/templates/html/htmljsmenuletterdata.tpl b/templates/html/htmljsmenuletterdata.tpl
index ded3402..e1c5679 100644
--- a/templates/html/htmljsmenuletterdata.tpl
+++ b/templates/html/htmljsmenuletterdata.tpl
@@ -1,10 +1,19 @@
{# inputs: page, list, section, text #}
-{text:'{{ text }}',url:'{{ page.fileName }}{{ section }}{{ config.HTML_FILE_EXTENSION }}'
-{% if list|length>maxItemsForMultiPageList %}
+{text:"{{ text }}",url:"{{ page.fileName }}{{ section }}{{ config.HTML_FILE_EXTENSION }}"
+{% if list|length>maxItemsForFlatList %}
,children:[
{% with index=list|alphaIndex:'name' %}
{% for sect in index %}
- {text:'{{ sect.letter }}',url:'{{ page.fileName }}{{ section }}_{{ sect.label }}{{ config.HTML_FILE_EXTENSION }}'}{% if not forloop.last %},{% endif %}
+ {% spaceless %}
+ {text:"{{ sect.letter }}",url:"
+ {% if list|length<=maxItemsForMultiPageList %}
+ {{ page.fileName }}{{ section }}{{ config.HTML_FILE_EXTENSION }}#index_{{ sect.label }}"
+ {% else %}
+ {{ page.fileName }}{{ section }}_{{ sect.label }}{{ config.HTML_FILE_EXTENSION }}"
+ {% endif %}
+ }
+ {% endspaceless %}
+ {% if not forloop.last %},{% endif %}
{% endfor %}
{% endwith %}
]
diff --git a/templates/html/htmljsnavpage.tpl b/templates/html/htmljsnavpage.tpl
new file mode 100644
index 0000000..9d9881d
--- /dev/null
+++ b/templates/html/htmljsnavpage.tpl
@@ -0,0 +1,20 @@
+var {{ varName }} =
+[
+{% recursetree node.children %}
+ {% set varName=node.file %}
+ {% if node.anchor %}
+ {% update varName=varName|append:'_'|append:node.anchor %}
+ {% endif %}
+ {% if node.parent %}
+ {% if node.parent.file==node.file %}
+ {% update varName=varName|append:'_dup' %}
+ {% endif %}
+ {% endif %}
+[ "{{ node.name }}",{% if node.file %}"{% if node.isReference %}{{ node.externalReference }}{% endif %}{{ node.file|decodeURL }}{{ config.HTML_FILE_EXTENSION }}{% if node.anchor %}#{{ node.anchor }}{% endif %}"{% else %}null{% endif %},{% if not node.is_leaf_node %}{% if node.separateIndex %}"{{ varName }}"{% else %} [
+ {{ children }}
+ ]{% endif %}{% else %} null{% endif %} ]{% if not node.last %},{% endif %}
+ {% if node.separateIndex %}
+ {% create varName|append:'.js' from 'htmljsnavpage.tpl' %}
+ {% endif %}
+{% endrecursetree %}
+];
diff --git a/templates/html/htmljsnavtree.tpl b/templates/html/htmljsnavtree.tpl
index 947b980..fef1819 100644
--- a/templates/html/htmljsnavtree.tpl
+++ b/templates/html/htmljsnavtree.tpl
@@ -1,9 +1,45 @@
+/*
+ @licstart The following is the entire license notice for the JavaScript code in this file.
+
+ The MIT License (MIT)
+
+ Copyright (C) 1997-2020 by Dimitri van Heesch
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ and associated documentation files (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all copies or
+ substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ @licend The above is the entire license notice for the JavaScript code in this file
+*/
var NAVTREE =
[
{% recursetree index.nav %}
- [ "{{ node.name }}", {% if node.file %}"{% if node.isReference %}{{ node.externalReference }}{% endif %}{{ node.file|decodeURL }}{{ config.HTML_FILE_EXTENSION }}{% if node.anchor %}#{{ node.anchor }}{% endif %}"{% else %}null{% endif %},{% if not node.is_leaf_node %} [
+ {% set varName=node.file %}
+ {% if node.anchor %}
+ {% update varName=varName|append:'_'|append:node.anchor %}
+ {% endif %}
+ {% if node.parent %}
+ {% if node.parent.file==node.file %}
+ {% update varName=varName|append:'_dup' %}
+ {% endif %}
+ {% endif %}
+[ "{{ node.name }}",{% if node.file %}"{% if node.isReference %}{{ node.externalReference }}{% endif %}{{ node.file|decodeURL }}{{ config.HTML_FILE_EXTENSION }}{% if node.anchor %}#{{ node.anchor }}{% endif %}"{% else %}null{% endif %},{% if not node.is_leaf_node %}{% if node.separateIndex %}"{{ varName }}"{% else %} [
{{ children }}
- ]{% else %} null{% endif %} ]{% if not node.last %},{% endif %}
+ ]{% endif %}{% else %} null{% endif %} ]{% if not node.last %},{% endif %}
+ {% if node.separateIndex %}
+ {% create varName|append:'.js' from 'htmljsnavpage.tpl' %}
+ {% endif %}
{% endrecursetree %}
];
diff --git a/templates/html/htmljssearchdata.tpl b/templates/html/htmljssearchdata.tpl
index 802795e..5146bae 100644
--- a/templates/html/htmljssearchdata.tpl
+++ b/templates/html/htmljssearchdata.tpl
@@ -2,30 +2,21 @@
var indexSectionsWithContent =
{
{% set count=0 %}
-{% for idx in searchIndices %}
- {% if idx.symbolIndices %}
- {{ count }}:"{% for si in idx.symbolIndices %}{{ si.letter }}{% endfor %}"{%if not forloop.last %},{% endif %}
- {% set count=count+1 %}
- {% endif %}
-{% endfor %}
+{% for idx in searchIndices %}{% if idx.symbolIndices %}{% if count>0 %},
+{% endif %} {{ count }}:"{% for si in idx.symbolIndices %}{{ si.letter }}{% endfor %}"{% set count=count+1 %}{% endif %}{% endfor %}
};
+
var indexSectionNames =
{
{% set count=0 %}
-{% for idx in searchIndices %}
- {% if idx.symbolIndices %}
- {{ count }}:"{{ idx.name }}"{% if not forloop.last %},{% endif %}
- {% set count=count+1 %}
- {% endif %}
-{% endfor %}
+{% for idx in searchIndices %}{% if idx.symbolIndices %}{% if count>0 %},
+{% endif %} {{ count }}:"{{ idx.name }}"{% set count=count+1 %}{% endif %}{% endfor %}
};
+
var indexSectionLabels =
{
{% set count=0 %}
-{% for idx in searchIndices %}
- {% if idx.symbolIndices %}
- {{ count }}:"{{ idx.text }}"{% if not forloop.last %},{% endif %}
- {% set count=count+1 %}
- {% endif %}
-{% endfor %}
+{% for idx in searchIndices %}{% if idx.symbolIndices %}{% if count>0 %},
+{% endif %} {{ count }}:"{{ idx.text }}"{% set count=count+1 %}{% endif %}{% endfor %}
};
+
diff --git a/templates/html/htmljssearchindex.tpl b/templates/html/htmljssearchindex.tpl
index a16fa4f..c963434 100644
--- a/templates/html/htmljssearchindex.tpl
+++ b/templates/html/htmljssearchindex.tpl
@@ -1,15 +1,13 @@
{# input: si symbolIndex #}
var searchData =
[
-{% for group in si.symbolGroups %}['{{ group.id }}',['{{ group.name }}',
-{% for sym in group.symbols %}
-{% spaceless %}
-['{{ sym.relPath }}{{ sym.fileName }}{{ config.HTML_FILE_EXTENSION }}{% if sym.anchor %}#{{ sym.anchor }}{% endif %}',
+{% for group in si.symbolGroups %} ['{{ group.id }}_{{ symbolCount }}',['{{ group.name }}',{% spaceless %}{% for sym in group.symbols %}['{{ sym.relPath }}{{ sym.fileName }}{{ config.HTML_FILE_EXTENSION }}{% if sym.anchor %}#{{ sym.anchor }}{% endif %}',
{% if not config.EXT_LINKS_IN_WINDOW %}1{% else %}0{% endif %},
-'{{ sym.scope|nowrap }}']
-{% endspaceless %}
+'{{ sym.scope|nowrap|escape }}']
{% if not forloop.last %},{% endif %}
{% endfor %}
+{% update symbolCount=symbolCount+1 %}
+{% endspaceless %}
]]{% if not forloop.last %},{% endif %}
{% endfor %}
];
diff --git a/templates/html/htmllayout.tpl b/templates/html/htmllayout.tpl
index b79f835..f96de7e 100644
--- a/templates/html/htmllayout.tpl
+++ b/templates/html/htmllayout.tpl
@@ -3,9 +3,16 @@
{# ---- copy fixed resources to the output ----- #}
{% resource 'doxygen.css' %}
-{% resource 'tabs.css' %}
+{% if config.HTML_DYNAMIC_MENUS %}
+ {% resource 'tabs.css' %}
+{% else %}
+ {% resource 'fixed_tabs.css' as 'tabs.css' %}
+{% endif %}
{% resource 'jquery.js' %}
-{% resource 'dynsections.js %}
+{% resource 'dynsections.js' %}
+{% if config.SOURCE_BROWSER and config.SOURCE_TOOLTIPS %}
+{% resource 'dynsections_tooltips.js' append 'dynsections.js' %}
+{% endif %}
{% resource 'tab_a.lum' %}
{% resource 'tab_b.lum' %}
{% resource 'tab_h.lum' %}
@@ -23,9 +30,11 @@
{% resource 'nav_f.lum' %}
{% resource 'nav_g.png' %}
{% resource 'nav_h.lum' %}
+{% if config.GENERATE_TREEVIEW %}
{% resource 'navtree.css' %}
{% resource 'navtree.js' %}
{% resource 'resize.js' %}
+{% endif %}
{% resource 'menu.js' %}
{% resource 'doc.luma' %}
{% resource 'folderopen.luma' %}
@@ -37,10 +46,20 @@
{% resource 'search_m.png' as 'search/search_m.png' %}
{% resource 'search_r.png' as 'search/search_r.png' %}
{% if config.DISABLE_INDEX %}
- {% resource 'search_noidx.css' as 'search/search.css' %}
+ {% if config.GENERATE_TREEVIEW and config.FULL_SIDEBAR %}
+ {% resource 'search_sidebar.css' as 'search/search.css' %}
+ {% else %}
+ {% resource 'search_nomenu.css' as 'search/search.css' %}
+ {% endif %}
{% else %}
- {% resource 'search.css' as 'search/search.css' %}
+ {% if not config.HTML_DYNAMIC_MENUS %}
+ {% resource 'search_fixedtabs.css' as 'search/search.css' %}
+ {% else %}
+ {% resource 'search.css' as 'search/search.css' %}
+ {% endif %}
{% endif %}
+{% resource 'search_common.css' append 'search/search.css' %}
+{% create 'search/nomatches.html' from 'nomatches.tpl' %}
{% if config.SERVER_BASED_SEARCH %}
{# server side search resources #}
@@ -56,7 +75,9 @@
{% endif %}
{# interactive SVGs #}
-{% resource 'svgpan.js' %}
+{% if config.INTERACTIVE_SVG %}
+ {% resource 'svgpan.js' %}
+{% endif %}
{# -------------------------------------------------- #}
@@ -68,7 +89,11 @@
{% set page_postfix='' %}
{# open the global navigation index #}
-{% indexentry nav name=tr.mainPage file='index' anchor='' isReference=False %}
+{% if config.PROJECT_NAME %}
+ {% indexentry nav name=config.PROJECT_NAME file='index' anchor='' isReference=False separateIndex=False %}
+{% else %}
+ {% indexentry nav name=tr.mainPage file='index' anchor='' isReference=False separateIndex=False %}
+{% endif %}
{% opensubindex nav %}
{# ----------- HTML DOCUMENTATION PAGES ------------ #}
@@ -158,7 +183,7 @@
{# --- namespaces --- #}
{% if namespaceList %}
- {% indexentry nav name=tr.namespaces file='' anchor='' isReference=False %}
+ {% indexentry nav name=tr.namespaces file='namespaces' anchor='' isReference=False separateIndex=False %}
{% opensubindex nav %}
{% if namespaceTree.tree %}
@@ -170,7 +195,7 @@
{# write symbol indices for namespace members #}
{% if namespaceMembersIndex.all %}
{% with page=namespaceMembersIndex scope='namespace' template='htmlnsmembers.tpl' %}
- {% indexentry nav name=tr.namespaceMembers file=page.fileName anchor='' isReference=False %}
+ {% indexentry nav name=tr.namespaceMembers file=page.fileName anchor='' isReference=False separateIndex=False %}
{% include 'htmlmembersindex.tpl' %}
{% endwith %}
{% endif %}
@@ -180,7 +205,7 @@
{# --- classes --- #}
{% if classList %}
- {% indexentry nav name=tr.classes file='' anchor='' isReference=False %}
+ {% indexentry nav name=tr.classes file='annotated'|append:config.HTML_FILE_EXTENSION anchor='' isReference=False separateIndex=False %}
{% opensubindex nav %}
{# write the annotated class list #}
@@ -198,7 +223,7 @@
{% endif %}
{# write the class inheritance hierarchy #}
- {% if classHierarchy.tree %}
+ {% if classHierarchy.tree and classHierarchy.maxDepth>1 %}
{% with page=classHierarchy %}
{% create classHierarchy.fileName|append:config.HTML_FILE_EXTENSION from 'htmlhierarchy.tpl' %}
{% if config.HAVE_DOT and config.GRAPHICAL_HIERARCHY %}
@@ -212,7 +237,7 @@
{# write symbol indices for class members #}
{% if classMembersIndex.all %}
{% with page=classMembersIndex scope='class' template='htmlclmembers.tpl' %}
- {% indexentry nav name=tr.classMembers file=page.fileName anchor='' isReference=False %}
+ {% indexentry nav name=tr.classMembers file=page.fileName anchor='' isReference=False separateIndex=False %}
{% include 'htmlmembersindex.tpl' %}
{% endwith %}
{% endif %}
@@ -222,7 +247,7 @@
{# --- files --- #}
{% if fileList %}
- {% indexentry nav name=tr.files file='' anchor='' isReference=False %}
+ {% indexentry nav name=tr.files file='files' anchor='' isReference=False separateIndex=False %}
{% opensubindex nav %}
{# write the directory/file hierarchy #}
@@ -235,7 +260,7 @@
{# write symbol indices for global namespace #}
{% if globalsIndex.all %}
{% with page=globalsIndex scope='file' template='htmlflmembers.tpl' %}
- {% indexentry nav name=tr.fileMembers file=page.fileName anchor='' isReference=False %}
+ {% indexentry nav name=tr.fileMembers file=page.fileName anchor='' isReference=False separateIndex=False %}
{% include 'htmlmembersindex.tpl' %}
{% endwith %}
{% endif %}
@@ -256,9 +281,10 @@
{# write search data #}
{% if config.SEARCHENGINE and not config.SERVER_BASED_SEARCH %}
{% create 'search/searchdata.js' from 'htmljssearchdata.tpl' %}
+ {% set symbolCount=0 %}
{% for idx in searchIndices %}
{% for si in idx.symbolIndices %}
- {% with baseName=si.name|append:'_'|append:forloop.counter0 %}
+ {% with hexCount=forloop.counter0|hex baseName=si.name|append:'_'|append:hexCount %}
{% create baseName|prepend:'search/'|append:config.HTML_FILE_EXTENSION from 'htmlsearchresult.tpl' %}
{% create baseName|prepend:'search/'|append:'.js' from 'htmljssearchindex.tpl' %}
{% endwith %}
diff --git a/templates/html/htmlmemberindex.tpl b/templates/html/htmlmemberindex.tpl
index 216dd31..504219c 100644
--- a/templates/html/htmlmemberindex.tpl
+++ b/templates/html/htmlmemberindex.tpl
@@ -7,24 +7,22 @@
{% for section in index %}
{% if not singleList or letter=='' or section.letter==letter %}
{% if not singleList %}
- <a class="anchor" id="{{ section.label }}"></a><h3>- {{ section.letter }} -</h3>
+ <a class="anchor" id="index_{{ section.label|lower }}"></a><h3>- {{ section.letter|lower }} -</h3>
<ul>
{% endif %}
{% for nameList in section.items|groupBy:'name' %}
- {% spaceless %}
{% for item in nameList|listsort:'{{item.file.name}}' %}
+ {% spaceless %}
{% if forloop.first %}
- <li>{{ item.name }}{% if (item.isFunction or item.isSignal or item.isSlot) and not item.isObjCMethod %}(){% endif %}&#160;:&#160;
- {% endif %}
+ <li>{{ item.name }}{% if (item.isFunction or item.isSignal or item.isSlot) and not item.isObjCMethod %}(){% endif %}&#160;:&#160;{% endif %}
{% with obj=item scope=item|get:scope text=scope.name %}
{% include 'htmlobjlink.tpl' %}
{% endwith %}
- {% if not forloop.last %},&#160;
- {% else %}
- </li>
- {% endif %}
+ {% if not forloop.last %},
+ {% else %}</li>{% endif %}
+ {% endspaceless %}
+
{% endfor %}
- {% endspaceless %}
{% endfor %}
{% if not singleList %}
</ul>
diff --git a/templates/html/htmlmembersindex.tpl b/templates/html/htmlmembersindex.tpl
index 700bce2..46a3cfd 100644
--- a/templates/html/htmlmembersindex.tpl
+++ b/templates/html/htmlmembersindex.tpl
@@ -2,13 +2,13 @@
{% opensubindex nav %}
{# all members #}
{% with list=page.all section='' %}
- {% indexentry nav name=tr.all file=page.fileName|append:page_postfix anchor='' isReference=False %}
+ {% indexentry nav name=tr.all file=page.fileName|append:page_postfix anchor='' isReference=False separateIndex=False %}
{% include 'htmlindexpages.tpl' %}
{% endwith %}
{# functions #}
{% if page.functions %}
{% set page_postfix='_func' %}
- {% indexentry nav name=tr.functions file=page.fileName|append:page_postfix anchor='' isReference=False %}
+ {% indexentry nav name=tr.functions file=page.fileName|append:page_postfix anchor='' isReference=False separateIndex=False %}
{% with list=page.functions section=page_postfix %}
{% include 'htmlindexpages.tpl' %}
{% endwith %}
@@ -16,7 +16,7 @@
{# variables #}
{% if page.variables %}
{% set page_postfix='_vars' %}
- {% indexentry nav name=tr.variables file=page.fileName|append:page_postfix anchor='' isReference=False %}
+ {% indexentry nav name=tr.variables file=page.fileName|append:page_postfix anchor='' isReference=False separateIndex=False %}
{% with list=page.variables section=page_postfix %}
{% include 'htmlindexpages.tpl' %}
{% endwith %}
@@ -24,7 +24,7 @@
{# typedefs #}
{% if page.typedefs %}
{% set page_postfix='_type' %}
- {% indexentry nav name=tr.typedefs file=page.fileName|append:page_postfix anchor='' isReference=False %}
+ {% indexentry nav name=tr.typedefs file=page.fileName|append:page_postfix anchor='' isReference=False separateIndex=False %}
{% with list=page.typedefs section=page_postfix %}
{% include 'htmlindexpages.tpl' %}
{% endwith %}
@@ -32,7 +32,7 @@
{# enums #}
{% if page.enums %}
{% set page_postfix='_enum' %}
- {% indexentry nav name=tr.enums file=page.fileName|append:page_postfix anchor='' isReference=False %}
+ {% indexentry nav name=tr.enums file=page.fileName|append:page_postfix anchor='' isReference=False separateIndex=False %}
{% with list=page.enums section=page_postfix %}
{% include 'htmlindexpages.tpl' %}
{% endwith %}
@@ -40,7 +40,7 @@
{# enumValues #}
{% if page.enumValues %}
{% set page_postfix='_eval' %}
- {% indexentry nav name=tr.enumValues file=page.fileName|append:page_postfix anchor='' isReference=False %}
+ {% indexentry nav name=tr.enumValues file=page.fileName|append:page_postfix anchor='' isReference=False separateIndex=False %}
{% with list=page.enumValues section=page_postfix %}
{% include 'htmlindexpages.tpl' %}
{% endwith %}
@@ -48,7 +48,7 @@
{# macros #}
{% if page.macros %}
{% set page_postfix='_defs' %}
- {% indexentry nav name=tr.macros file=page.fileName|append:page_postfix anchor='' isReference=False %}
+ {% indexentry nav name=tr.macros file=page.fileName|append:page_postfix anchor='' isReference=False separateIndex=False %}
{% with list=page.macros section=page_postfix %}
{% include 'htmlindexpages.tpl' %}
{% endwith %}
@@ -56,7 +56,7 @@
{# properties #}
{% if page.properties %}
{% set page_postfix='_prop' %}
- {% indexentry nav name=tr.properties file=page.fileName|append:page_postfix anchor='' isReference=False %}
+ {% indexentry nav name=tr.properties file=page.fileName|append:page_postfix anchor='' isReference=False separateIndex=False %}
{% with list=page.properties section=page_postfix %}
{% include 'htmlindexpages.tpl' %}
{% endwith %}
@@ -64,7 +64,7 @@
{# events #}
{% if page.events %}
{% set page_postfix='_evnt' %}
- {% indexentry nav name=tr.events file=page.fileName|append:page_postfix anchor='' isReference=False %}
+ {% indexentry nav name=tr.events file=page.fileName|append:page_postfix anchor='' isReference=False separateIndex=False %}
{% with list=page.events section=page_postfix %}
{% include 'htmlindexpages.tpl' %}
{% endwith %}
@@ -72,7 +72,7 @@
{# related #}
{% if page.related %}
{% set page_postfix='_rela' %}
- {% indexentry nav name=tr.related file=page.fileName|append:page_postfix anchor='' isReference=False %}
+ {% indexentry nav name=tr.related file=page.fileName|append:page_postfix anchor='' isReference=False separateIndex=False %}
{% with list=page.related section=page_postfix %}
{% include 'htmlindexpages.tpl' %}
{% endwith %}
diff --git a/templates/html/htmlmemdecl.tpl b/templates/html/htmlmemdecl.tpl
index c7894d8..4f859f7 100644
--- a/templates/html/htmlmemdecl.tpl
+++ b/templates/html/htmlmemdecl.tpl
@@ -64,7 +64,7 @@
{% spaceless %}
template&lt;
{% for targ in member.templateArgs %}
- {{ targ.type }} {{ targ.name }}{% if targ.defVal %} = {{ targ.defval }}{% endif %}{% if not forloop.last %}, {% endif %}
+ {{ targ.type }} {{ targ.name }}{% if targ.defVal %} = {{ targ.defVal }}{% endif %}{% if not forloop.last %}, {% endif %}
{% endfor %}
{% endspaceless %} &gt;
</td></tr><tr class="memitem:{{ member.anchor }}{% if inheritId %} inherit {{ inheritId }}{% endif %}"><td class="memTemplItemLeft" align="right" valign="top">
diff --git a/templates/html/htmlmodules.tpl b/templates/html/htmlmodules.tpl
index 5431032..c4e84fd 100644
--- a/templates/html/htmlmodules.tpl
+++ b/templates/html/htmlmodules.tpl
@@ -4,7 +4,7 @@
<div class="textblock">
{{ tr.modulesDescription }}
</div>
-{% indexentry nav name=tr.modules file=page.fileName anchor='' isReference=False %}
+{% indexentry nav name=tr.modules file=page.fileName anchor='' isReference=False separateIndex=False %}
{% opensubindex nav %}
{% with tree=moduleTree %}
{% include 'htmldirtree.tpl' %}
diff --git a/templates/html/htmlnamespaces.tpl b/templates/html/htmlnamespaces.tpl
index b7e7b9d..c3b8b3b 100644
--- a/templates/html/htmlnamespaces.tpl
+++ b/templates/html/htmlnamespaces.tpl
@@ -4,7 +4,7 @@
<div class="textblock">
{{ tr.namespaceListDescription }}
</div>
-{% indexentry nav name=tr.namespaceList file=page.fileName anchor='' isReference=False %}
+{% indexentry nav name=tr.namespaceList file=page.fileName anchor='' isReference=False separateIndex=False %}
{% opensubindex nav %}
{% with tree=namespaceTree %}
{% include 'htmldirtree.tpl' %}
diff --git a/templates/html/htmlpage.tpl b/templates/html/htmlpage.tpl
index 7547ed5..74396e7 100644
--- a/templates/html/htmlpage.tpl
+++ b/templates/html/htmlpage.tpl
@@ -33,7 +33,7 @@
<ul>
<li><a href="{{ page.relPath }}annotated{{ config.HTML_FILE_EXTENSION }}"><span>{{ tr.classList }}</span></a></li>
<li><a href="{{ page.relPath }}classes{{ config.HTML_FILE_EXTENSION }}"><span>{{ tr.classIndex }}</span></a></li>
- {% if classHierarchy.tree %}
+ {% if classHierarchy.tree and classHierarchy.maxDepth>1 %}
<li><a href="{{ page.relPath }}hierarchy{{ config.HTML_FILE_EXTENSION }}"><span>{{ tr.classHierarchy }} </span></a></li>
{% endif %}
{% if classMembersIndex.all %}
@@ -50,7 +50,7 @@
</ul>
</li>
{% endif %}
-{% if exampleList.items %}
+{% if exampleList %}
<li><a href="{{ page.relPath }}examples{{ config.HTML_FILE_EXTENSION }}"><span>{{ tr.examples }}</span></a>
{% endif %}
</ul>
diff --git a/templates/html/htmlpages.tpl b/templates/html/htmlpages.tpl
index 5e3778d..0f12603 100644
--- a/templates/html/htmlpages.tpl
+++ b/templates/html/htmlpages.tpl
@@ -4,7 +4,7 @@
<div class="textblock">
{{ tr.relatedPagesDesc }}
</div>
-{% indexentry nav name=tr.pages file=page.fileName anchor='' isReference=False %}
+{% indexentry nav name=tr.pages file=page.fileName anchor='' isReference=False separateIndex=False %}
{% opensubindex nav %}
{% with tree=pageTree %}
{% include 'htmldirtree.tpl' %}
diff --git a/templates/html/htmlsearchresult.tpl b/templates/html/htmlsearchresult.tpl
index 139faf2..9174196 100644
--- a/templates/html/htmlsearchresult.tpl
+++ b/templates/html/htmlsearchresult.tpl
@@ -1,6 +1,7 @@
{# input: baseName #}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html><head><title></title>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen {{ doxygen.version }}"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
@@ -12,14 +13,14 @@
<div class="SRStatus" id="Loading">{{ tr.loading }}</div>
<div id="SRResults"></div>
<script type="text/javascript">
-/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
+/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
createResults();
/* @license-end */
</script>
<div class="SRStatus" id="Searching">{{ tr.searching }}</div>
<div class="SRStatus" id="NoMatches">{{ tr.noMatches }}</div>
<script type="text/javascript">
-/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
+/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
diff --git a/templates/html/htmltabs.tpl b/templates/html/htmltabs.tpl
index b8632cb..7ade5f1 100644
--- a/templates/html/htmltabs.tpl
+++ b/templates/html/htmltabs.tpl
@@ -81,7 +81,7 @@
{% if page.highlight=='classes' %}
<li{% if page.subhighlight=='classlist' %} class="current"{% endif %}><a href="{{ page.relPath }}annotated{{ config.HTML_FILE_EXTENSION }}"><span>{{ tr.classList|nowrap }}</span></a></li>
<li{% if page.subhighlight=='classindex' %} class="current"{% endif %}><a href="{{ page.relPath }}classes{{ config.HTML_FILE_EXTENSION }}"><span>{{ tr.classIndex|nowrap }}</span></a></li>
- {% if classHierarchy.tree %}
+ {% if classHierarchy.tree and classHierarchy.maxDepth>1 %}
<li{% if page.subhighlight=='classhierarchy' %} class="current"{% endif %}><a href="{{ page.relPath }}hierarchy{{ config.HTML_FILE_EXTENSION }}"><span>{{ tr.classHierarchy|nowrap }}</span></a></li>
{% endif %}
{% if classMembersIndex.all %}
diff --git a/templates/html/nomatches.tpl b/templates/html/nomatches.tpl
new file mode 100644
index 0000000..94af265
--- /dev/null
+++ b/templates/html/nomatches.tpl
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="NoMatches">{{ tr.noMatches }}</div>
+</div>
+</body>
+</html>