- use_sqlite3 Add support for sqlite3 output [experimental].
- use_libclang Add support for libclang parsing.
- win_static Link with /MT in stead of /MD on windows.
-- english_only Only compile in support for the English language.
-- force_qt4 Forces doxywizard to build using Qt4 even if Qt5 is installed
+- force_qt=<vers> Forces doxywizard to build using the specified major version, this can be Qt5 or Qt6
An option can be turned on, by adding -D<option>=ON as a command line option, this can be
done when generating the initial build files, but also afterwards, i.e. to enable building
option(use_libclang "Add support for libclang parsing." OFF)
option(static_libclang "Link to a statically compiled version of LLVM/libclang." OFF)
option(win_static "Link with /MT in stead of /MD on windows" OFF)
-option(english_only "Only compile in support for the English language" OFF)
-option(force_qt4 "Forces doxywizard to build using Qt4 even if Qt5 is installed" OFF)
+option(enable_console "Enable that executables on Windows get the CONSOLE bit set for the doxywizard executable [development]" OFF)
option(enable_coverage "Enable coverage reporting for gcc/clang [development]" OFF)
+set(force_qt CACHE INTERNAL "Forces doxywizard to build using the specified major version, this can be Qt5 or Qt6")
+set_property(CACHE force_qt PROPERTY STRINGS OFF Qt6 Qt5)
+
SET(enlarge_lex_buffers "262144" CACHE INTERNAL "Sets the lex input and read buffers to the specified size")
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
set(sqlite3 "1" CACHE INTERNAL "used in settings.h")
endif()
-set(MACOS_VERSION_MIN 10.9)
+set(MACOS_VERSION_MIN 10.14)
if (use_libclang)
set(clang "1" CACHE INTERNAL "used in settings.h")
find_package(LLVM CONFIG REQUIRED)
find_package(Clang CONFIG REQUIRED)
- if (CMAKE_SYSTEM MATCHES "Darwin")
- set(MACOS_VERSION_MIN 10.14)
+endif()
+if (build_wizard)
+ if (force_qt STREQUAL "Qt6")
+ if (CMAKE_SYSTEM MATCHES "Darwin")
+ set(MACOS_VERSION_MIN 10.15)
+ endif()
endif()
endif()
-# use C++14 standard for compiling (libclang option requires it)
-set(CMAKE_CXX_STANDARD 14)
+# use C++17 standard for compiling
+set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS ON)
endif()
if (WIN32)
- if ((NOT CMAKE_GENERATOR MATCHES "MinGW Makefiles") AND
- (NOT CMAKE_GENERATOR MATCHES "MSYS Makefiles") AND
- (NOT CMAKE_GENERATOR MATCHES "Unix Makefiles"))
+ if (MSVC)
if (NOT ICONV_DIR)
set(ICONV_DIR "${PROJECT_SOURCE_DIR}/winbuild")
endif()
set(CMAKE_REQUIRED_DEFINITIONS "-DLIBICONV_STATIC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") # needed for language.cpp on 64bit
add_definitions(-DLIBICONV_STATIC -D_CRT_SECURE_NO_WARNINGS)
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
endif()
if (CMAKE_GENERATOR MATCHES "NMake Makefiles")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
endif()
endif()
if (CMAKE_SYSTEM_NAME MATCHES "CYGWIN")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wa,-mbig-obj")
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og")
+
+ if (CMAKE_BUILD_TYPE STREQUAL "")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O1")
+ endif()
+endif()
+
+if (CMAKE_SYSTEM_NAME MATCHES "Windows")
+ if ((CMAKE_GENERATOR MATCHES "MinGW Makefiles") OR
+ (CMAKE_GENERATOR MATCHES "MSYS Makefiles") OR
+ (CMAKE_GENERATOR MATCHES "Unix Makefiles"))
+
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og")
+
+ if (CMAKE_BUILD_TYPE STREQUAL "")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O1")
+ endif()
+ endif()
endif()
if(POLICY CMP0063)
find_program(DOT NAMES dot)
find_package(PythonInterp REQUIRED)
find_package(FLEX REQUIRED)
+if (FLEX_VERSION VERSION_LESS 2.5.37)
+ message(SEND_ERROR "Doxygen requires at least flex version 2.5.37 (installed: ${FLEX_VERSION})")
+endif()
find_package(BISON REQUIRED)
if (BISON_VERSION VERSION_LESS 2.7)
message(SEND_ERROR "Doxygen requires at least bison version 2.7 (installed: ${BISON_VERSION})")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${EXECUTABLE_OUTPUT_PATH})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${EXECUTABLE_OUTPUT_PATH})
-# gather lang codes for translation
-file(GLOB lang_files RELATIVE "${PROJECT_SOURCE_DIR}/src" "${PROJECT_SOURCE_DIR}/src/translator_??.h")
-if (english_only) # user only wants English
- set(lcodes "ENONLY")
-else ()
- set(lcodes "")
- foreach (_lang ${lang_files})
- string(REGEX REPLACE "translator_(.*).h" "\\1" _lang_code ${_lang})
- string(TOUPPER ${_lang_code} lang_code)
- list(APPEND lcodes "${lang_code}")
- endforeach()
-endif()
-set(LANG_CODES ${lcodes} CACHE STRING "List of language codes for which translations should be compiled in")
-
if (win_static)
set(CompilerFlags
CMAKE_CXX_FLAGS
PROJECT_LOGO =
OUTPUT_DIRECTORY = doxygen_docs
CREATE_SUBDIRS = YES
+CREATE_SUBDIRS_LEVEL = 8
ALLOW_UNICODE_NAMES = NO
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
is already working on support for that language, you will be
assigned as the maintainer for the language. I'll create a
list on Doxygen's homepage, so everyone knows who is doing what.
-2) Create a copy of translator_en.h and name it
+2) Edit src/config.xml:
+ - find the <option> with id='OUTPUT_LANGUAGE'
+ - add a new value with your language and an optional description:
+ <value name='YourLanguage' desc='(only for disambiguation)'/>
+3) Create a copy of translator_en.h and name it
translator_<your_2_letter_country_code>.h
I'll use xx in the rest of this document.
-3) Edit language.cpp:
- - Add a #include<translator_xx.h>
+4) Edit language.cpp:
+ - Add an include block:
+
+ #include "translator_xx.h"
+
- In setTranslator() add
-
- else if (L_EQUAL("your_language_name"))
- {
- theTranslator = new TranslatorYourLanguage;
- }
-
- after the if { ... }
-4) Edit libdoxygen.pro.in and add translator_xx.h to the HEADERS line.
+
+ case OUTPUT_LANGUAGE_t::YourLanguage: theTranslator = new TranslatorYourLanguage; break;
+
5) Edit translator_xx.h:
- Change TRANSLATOR_EN_H to TRANSLATOR_XX_H (in both the #include line and
the #define line).
- Change TranslatorEnglish to TranslatorYourLanguage
- In the member idLanguage() change "english" into the name of your
- language (use lower case characters only). Depending on the language you
- may also wish to change the member functions latexLanguageSupportCommand()
- and idLanguageCharset().
+ language (use lower case characters only). Set the trISOLang() and
+ getLanguageString() return values to match your language as well. Depending on the
+ language you may also wish to change the member function latexLanguageSupportCommand().
- Edit all the strings that are returned by the members that start
with tr. Try to match punctuation and capitals!
To enter special characters (with accents) you can:
- a) Enter them directly if your keyboard supports that and you are
- using a Latin-1 font.
- Doxygen will translate the characters to proper Latex and
- leave the Html and man output for what it is (which is fine, if
- idLanguageCharset() is set correctly).
- b) Use html codes like ä for an a with an umlaut (i.e. ä).
+ a) Enter them directly and store the files using UTF-8 encoding.
+ b) Use html codes like ä for an a with an umlaut (i.e. ä).
See the HTML specification for the codes.
-6) Run configure and make again from the root of the distribution,
- in order to regenerate the Makefiles.
+6) Change to your build directory and build again in order to regenerate the binary e.g.:
+
+ cd path/where/you/build
+ cmake --build .
+
7) Now you can use OUTPUT_LANGUAGE = your_language_name
in the config file to generate output in your language.
8) Send translator_xx.h to me so I can add it to doxygen.
Doxygen is the de facto standard tool for generating documentation from
annotated C++ sources, but it also supports other popular programming
languages such as C, Objective-C, C#, PHP, Java, Python, IDL
-(Corba, Microsoft, and UNO/OpenOffice flavors), Fortran, VHDL,
-and to some extent D.
+(Corba, Microsoft, and UNO/OpenOffice flavors), Fortran,
+and to some extent D. Doxygen also supports the hardware description language VHDL.
Doxygen can help you in three ways:
# IPython is available from http://ipython.scipy.org/.
#
-## from IPython.Shell import IPShellEmbed
-## args = ''
-## ipshell = IPShellEmbed(args,
-## banner = 'Dropping into IPython',
-## exit_msg = 'Leaving Interpreter, back to program.')
+# # from IPython.Shell import IPShellEmbed
+# # args = ''
+# # ipshell = IPShellEmbed(args,
+# # banner = 'Dropping into IPython',
+# # exit_msg = 'Leaving Interpreter, back to program.')
# Then use the following line where and when you want to drop into the
# IPython shell:
class docImageFileType(GeneratedsSuper):
+ """The mentioned file will be located in the directory as specified by
+ XML_OUTPUT"""
__hash__ = GeneratedsSuper.__hash__
subclass = None
superclass = None
# IPython is available from http://ipython.scipy.org/.
#
-## from IPython.Shell import IPShellEmbed
-## args = ''
-## ipshell = IPShellEmbed(args,
-## banner = 'Dropping into IPython',
-## exit_msg = 'Leaving Interpreter, back to program.')
+# # from IPython.Shell import IPShellEmbed
+# # args = ''
+# # ipshell = IPShellEmbed(args,
+# # banner = 'Dropping into IPython',
+# # exit_msg = 'Leaving Interpreter, back to program.')
# Then use the following line where and when you want to drop into the
# IPython shell:
#!/usr/bin/python
#
-# Copyright (C) 1997-202i by Dimitri van Heesch.
+# Copyright (C) 1997-2022 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
lineStr = ""
for line in inputFile:
line = line.rstrip()
+ line = re.sub(r'##','# #',line)
line = re.sub(r'# Python.*','#',line)
line = re.sub(r"('-o', ').*(/addon/doxmlparser/doxmlparser)","\\1...\\2",line)
# python 2 slips the u in ...
add_executable(doxyapp
doxyapp.cpp
)
+include(ApplyEditbin)
+apply_editbin(doxyapp console)
add_sanitizers(doxyapp)
if (use_libclang)
add_executable(doxyparse
doxyparse.cpp
)
+
+include(ApplyEditbin)
+apply_editbin(doxyparse console)
add_sanitizers(doxyparse)
if (use_libclang)
* update debian/changelog, commit, push
* create git tag, push to github analizo/doxyparse
* build on amd64 and i386 archs, upload tar.gz to github
- * tar -zcf doxyparse_<VERSION>_amd64.tar.gz -C bin/ doxyparse
- * tar -zcf doxyparse_<VERSION>_i386.tar.gz -C bin/ doxyparse
+ * `tar -zcf doxyparse_<VERSION>_amd64.tar.gz -C bin/ doxyparse`
+ * `tar -zcf doxyparse_<VERSION>_i386.tar.gz -C bin/ doxyparse`
* build debian packages for amd64 and i386, update analizo.org repository
* (see analizo.github.io/README.md file for updating repository instructions)
* upload the deb files to github release tag also
add_executable(doxyindexer
doxyindexer.cpp
)
+
target_link_libraries(doxyindexer
${XAPIAN_LIBRARIES}
${ZLIB_LIBRARIES}
add_executable(doxysearch.cgi
doxysearch.cpp
)
+
target_link_libraries(doxysearch.cgi
doxygen_version
${XAPIAN_LIBRARIES}
${WIN_EXTRA_LIBS}
)
+include(ApplyEditbin)
+apply_editbin(doxyindexer console)
+apply_editbin(doxysearch.cgi console)
+
+
install(TARGETS doxyindexer doxysearch.cgi DESTINATION bin)
/******************************************************************************
*
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
+ * Copyright (C) 1997-2022 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.
*
return sResult;
}
-/** return list of strings that result when splitting \a s using
- * delimiter \a delim
+/** return list of strings that result when splitting \a s using
+ * delimiter \a delim
*/
-static std::vector<std::string> split(const std::string &s, char delim)
+static std::vector<std::string> split(const std::string &s, char delim)
{
std::vector<std::string> elems;
std::stringstream ss(s);
}
/** Returns a list of text \a fragments from \a s containing one or
- * more \a words. The list is sorted according to the
+ * more \a words. The list is sorted according to the
* number of occurrences of words within the fragment.
- */
+ */
static void highlighter(const std::string &s,
const std::vector<std::string> &words,
std::vector<Fragment> &fragments)
size_t pos=0;
size_t i;
std::string word = *it;
- while ((i=s.find(word,pos))!=std::string::npos)
+ while ((i=s.find(word,pos))!=std::string::npos)
{
positions.push_back(WordPosition(i,j));
pos=i+word.length();
else
{
std::string startFragment,endFragment;
- size_t bi=i-(fragLen-wl)/2;
+ int bi=static_cast<int>(i)-static_cast<int>((fragLen-wl)/2);
size_t ei=i+wl+(fragLen-wl)/2;
int occ=0;
if (bi<0) { ei-=bi; bi=0; } else startFragment=dots;
- if (ei>sl) { ei=sl; } else endFragment=dots;
+ if (ei>sl) { ei=sl; } else endFragment=dots;
while (bi>0 && !isspace(s[bi])) bi--; // round to start of the word
while (ei<sl && !isspace(s[ei])) ei++; // round to end of the word
// highlight any word in s between indexes bi and ei
if (kv.size()==2)
{
std::string val = uriDecode(kv[1]);
- if (kv[0]=="q") searchFor = val;
+ if (kv[0]=="q") searchFor = val;
else if (kv[0]=="n") num = fromString<int>(val);
else if (kv[0]=="p") page = fromString<int>(val);
else if (kv[0]=="cb") callback = val;
// write results as JSONP
std::cout << callback.c_str() << "(";
- std::cout << "{" << std::endl
+ std::cout << "{" << std::endl
<< " \"hits\":" << hits << "," << std::endl
<< " \"first\":" << offset << "," << std::endl
<< " \"count\":" << num << "," << std::endl
<< " \"items\":[" << std::endl;
// foreach search result
unsigned int o = offset;
- for (Xapian::MSetIterator i = matches.begin(); i != matches.end(); ++i,++o)
+ for (Xapian::MSetIterator i = matches.begin(); i != matches.end(); ++i,++o)
{
std::vector<Fragment> hl;
Xapian::Document doc = i.get_document();
std::cout << std::endl;
}
std::cout << " ]" << std::endl << "})" << std::endl;
- }
+ }
catch (const Xapian::Error &e) // Xapian exception
{
showError(callback,e.get_description());
- }
+ }
catch (...) // Any other exception
{
showError(callback,"Unknown Exception!");
-# search for Qt5
-if (NOT force_qt4)
+if (force_qt STREQUAL "Qt5" OR NOT force_qt)
find_package(Qt5Core QUIET CONFIG)
if (Qt5Core_FOUND)
message(STATUS "Using Qt5")
find_package(Qt5 COMPONENTS Widgets Gui Xml)
macro(qt_wrap_cpp)
- qt5_wrap_cpp(${ARGN})
+ qt5_wrap_cpp(${ARGN})
endmacro()
macro(qt_add_resources)
- qt5_add_resources(${ARGN})
+ qt5_add_resources(${ARGN})
endmacro()
+ else()
+ if (NOT force_qt)
+ find_package(Qt6Core QUIET CONFIG)
+ if (Qt6Core_FOUND)
+ message(STATUS "Using Qt6")
+ find_package(Qt6 COMPONENTS Widgets Gui Xml)
+ macro(qt_wrap_cpp)
+ qt6_wrap_cpp(${ARGN})
+ endmacro()
+ macro(qt_add_resources)
+ qt6_add_resources(${ARGN})
+ endmacro()
+ else()
+ message(FATAL_ERROR "Qt5 nor Qt6 found")
+ endif()
+ else()
+ message(FATAL_ERROR "Qt5 not found")
+ endif()
endif()
-endif()
-# fallback to Qt4
-if (NOT Qt5Core_FOUND)
- if (NOT force_qt4)
- message(STATUS "Qt5 not found, searching for Qt4 instead...")
+else()
+ find_package(Qt6Core QUIET CONFIG)
+ if (Qt6Core_FOUND)
+ message(STATUS "Using Qt6")
+ find_package(Qt6 COMPONENTS Widgets Gui Xml)
+ macro(qt_wrap_cpp)
+ qt6_wrap_cpp(${ARGN})
+ endmacro()
+ macro(qt_add_resources)
+ qt6_add_resources(${ARGN})
+ endmacro()
else()
- message(STATUS "Using Qt4")
+ message(FATAL_ERROR "Qt6 not found")
endif()
- find_package(Qt4 REQUIRED COMPONENTS QtCore QtXml QtGui)
- macro(qt_wrap_cpp)
- qt4_wrap_cpp(${ARGN})
- endmacro()
- macro(qt_add_resources)
- qt4_add_resources(${ARGN})
- endmacro()
endif()
include_directories(
file(MAKE_DIRECTORY ${GENERATED_SRC_WIZARD})
add_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DUNICODE)
-if (NOT Qt5Core_FOUND)
+if (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND)
include(${QT_USE_FILE})
endif()
#endif" )
set_source_files_properties(${GENERATED_SRC_WIZARD}/settings.h PROPERTIES GENERATED 1)
-# generate version.cpp
-add_custom_command(
- COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/version.py ${VERSION} > ${GENERATED_SRC_WIZARD}/version.cpp
- DEPENDS ${PROJECT_SOURCE_DIR}/VERSION ${PROJECT_SOURCE_DIR}/src/version.py
- OUTPUT ${GENERATED_SRC_WIZARD}/version.cpp
-)
-set_source_files_properties(${GENERATED_SRC_WIZARD}/version.cpp PROPERTIES GENERATED 1)
-
# generate configdoc.cpp
add_custom_command(
COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/configgen.py -wiz ${PROJECT_SOURCE_DIR}/src/config.xml > ${GENERATED_SRC_WIZARD}/configdoc.cpp
set_property(TARGET doxywizard PROPERTY WIN32_EXECUTABLE true)
+include(ApplyEditbin)
+if (enable_console)
+apply_editbin(doxywizard console)
+else()
+apply_editbin(doxywizard windows)
+endif()
+
if(Qt5Core_FOUND)
target_link_libraries(doxywizard Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Xml doxygen_version)
else()
+if(Qt6Core_FOUND)
+ target_link_libraries(doxywizard Qt6::Core Qt6::Gui Qt6::Widgets Qt6::Xml doxygen_version)
+else()
target_link_libraries(doxywizard ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} doxygen_version)
endif()
+endif()
install(TARGETS doxywizard DESTINATION bin)
--- /dev/null
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2022 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
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ */
+
+#ifndef ADAPTER_H
+#define ADAPTER_H
+
+#include <memory>
+#include <QtGlobal>
+#include <QString>
+#include <QTextStream>
+#include <QPointF>
+#include <QMouseEvent>
+
+/** @file
+ * @brief compatibility adapters for Qt5/Qt6 support.
+ */
+
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
+#include <QTextCodec>
+class TextCodecAdapter
+{
+ public:
+ TextCodecAdapter(const QByteArray &name)
+ {
+ m_codec = QTextCodec::codecForName(name);
+ if (m_codec==0) // fallback: use UTF-8
+ {
+ m_codec = QTextCodec::codecForName("UTF-8");
+ }
+ }
+ QByteArray encode(const QString &input) { return m_codec ? m_codec->fromUnicode(input) : input.toLatin1(); }
+ QString decode(const QByteArray &input) { return m_codec ? m_codec->toUnicode(input) : QString::fromLatin1(input); }
+ void applyToStream(QTextStream &t) { t.setCodec(m_codec); }
+ bool isValid() const { return m_codec!=0; }
+ private:
+ QTextCodec *m_codec = 0; // object is owned by Qt
+};
+#else // Qt6+
+#include <QStringEncoder>
+#include <QStringDecoder>
+#include <QStringConverter>
+class TextCodecAdapter
+{
+ public:
+ TextCodecAdapter(const QByteArray &name)
+ {
+ auto encodingOpt = QStringConverter::encodingForName(name);
+ if (encodingOpt)
+ {
+ m_encoding = *encodingOpt;
+ }
+ m_encoder = std::make_unique<QStringEncoder>(m_encoding);
+ m_decoder = std::make_unique<QStringDecoder>(m_encoding);
+ }
+ QByteArray encode(const QString &input) { return m_encoder ? m_encoder->encode(input) : input.toLatin1(); }
+ QString decode(const QByteArray &input) { return m_decoder ? m_decoder->decode(input) : QString::fromLatin1(input); }
+ void applyToStream(QTextStream &t) { t.setEncoding(m_encoding); }
+ bool isValid() const { return m_decoder!=0; }
+ private:
+ std::unique_ptr<QStringEncoder> m_encoder;
+ std::unique_ptr<QStringDecoder> m_decoder;
+ QStringConverter::Encoding m_encoding = QStringConverter::Utf8;
+
+};
+#endif
+
+inline qreal getMouseYPositionFromEvent(QMouseEvent *m)
+{
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
+ return m->y();
+#else
+ return m->position().y();
+#endif
+}
+
+
+#endif
* Copyright (C) 1997-2019 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.
*
#include <QHash>
#include <QString>
+#include "adapter.h"
+
class Input;
class QTextStream;
-class QTextCodec;
bool parseConfig(
const QString &fileName,
const QHash<QString,Input *> &options
);
-void writeStringValue(QTextStream &t,QTextCodec *codec,const QString &s);
+void writeStringValue(QTextStream &t,TextCodecAdapter *codec,const QString &s);
// directly copied from ../../src/config.h to be consistent
enum
#include <QString>
#include <QVariant>
#include <QStack>
-#include <QTextCodec>
#include <QByteArray>
#include <QFileInfo>
#include <QStringList>
-#include <QRegExp>
+#include <QRegularExpression>
#include <QTextStream>
#include <QMessageBox>
static QVariant *g_arg;
static Input *g_curOption=0;
static QByteArray g_str;
-static QTextCodec *g_codec = QTextCodec::codecForName("UTF-8");
+static std::unique_ptr<TextCodecAdapter> g_codec = std::make_unique<TextCodecAdapter>("UTF-8");
static QString g_codecName = QString::fromLatin1("UTF-8");
static QString g_cmd;
static bool g_isEnum;
Input *option = g_options->value(QString::fromLatin1("DOXYFILE_ENCODING"));
if (option && option->value().toString()!=g_codecName)
{
- QTextCodec *newCodec = QTextCodec::codecForName(option->value().toString().toLatin1());
- if (newCodec)
+ auto newCodec = std::make_unique<TextCodecAdapter>(option->value().toString().toLatin1());
+ if (newCodec->isValid())
{
- g_codec = newCodec;
+ g_codec.swap(newCodec);
g_codecName = option->value().toString();
}
}
if (g_isEnum)
{
InputString *cur = dynamic_cast<InputString *>(g_curOption);
- *g_arg = cur->checkEnumVal(g_codec->toUnicode(result));
+ *g_arg = cur->checkEnumVal(g_codec->decode(result));
}
else
{
- *g_arg = QVariant(g_codec->toUnicode(result));
+ *g_arg = QVariant(g_codec->decode(result));
}
// update encoding
if (!elemStr.isEmpty())
{
//printf("Processed list element '%s'\n",e.data());
- *g_arg = QVariant(g_arg->toStringList() << g_codec->toUnicode(elemStr));
+ *g_arg = QVariant(g_arg->toStringList() << g_codec->decode(elemStr));
elemStr="";
}
};
/*-------------- TAG start ---------------*/
-<Start>[a-z_A-Z][a-z_A-Z0-9]*[ \t]*"=" { g_cmd = g_codec->toUnicode(yytext);
+<Start>[a-z_A-Z][a-z_A-Z0-9]*[ \t]*"=" {
+ g_cmd = g_codec->decode(yytext);
g_cmd=g_cmd.left(g_cmd.length()-1).trimmed();
g_curOption = g_options->value(g_cmd);
if (g_curOption==0) // oops not known
}
}
}
-<Start>[a-z_A-Z][a-z_A-Z0-9]*[ \t]*"+=" { g_cmd=g_codec->toUnicode(yytext);
+<Start>[a-z_A-Z][a-z_A-Z0-9]*[ \t]*"+=" {
+ g_cmd=g_codec->decode(yytext);
g_cmd=g_cmd.left(g_cmd.length()-2).trimmed();
g_curOption = g_options->value(g_cmd);
if (g_curOption==0) // oops not known
/* include a config file */
<Start>"@INCLUDE"[ \t]*"=" { BEGIN(Include);}
<Include>([^ \"\t\r\n]+)|("\""[^\n\"]+"\"") {
- readIncludeFile(g_codec->toUnicode(yytext));
+ readIncludeFile(g_codec->decode(yytext));
BEGIN(Start);
}
<<EOF>> {
static void substEnvVarsInString(QString &s)
{
- static QRegExp re(QString::fromLatin1("\\$\\([a-z_A-Z0-9]+\\)"));
+ static QRegularExpression re(QString::fromLatin1("\\$\\([a-z_A-Z0-9]+\\)"));
if (s.isEmpty()) return;
int p=0;
int i,l;
//printf("substEnvVarInString(%s) start\n",qPrintable(s));
- while ((i=re.indexIn(s,p))!=-1)
+
+ QRegularExpressionMatch match;
+ while ((i=s.indexOf(re,p,&match))!=-1)
{
- l = re.matchedLength();
+ l = match.capturedLength();
//printf("Found environment var s.mid(%d,%d)='%s'\n",i+2,l-3,qPrintable(s.mid(i+2,l-3)));
- QString env=g_codec->toUnicode(getenv(s.mid(i+2,l-3).toLatin1()));
+ QString env=g_codec->decode(getenv(s.mid(i+2,l-3).toLatin1()));
substEnvVarsInString(env); // recursively expand variables if needed.
s = s.left(i)+env+s.right(s.length()-i-l);
p=i+env.length(); // next time start at the end of the expanded string
// search for a "word"
for (i=0;i<l;i++)
{
- QChar c=0;
+ QChar c;
// skip until start of new word
while (i<l && ((c=result.at(i))==QChar::fromLatin1(' ') || c==QChar::fromLatin1('\t'))) i++;
p=i; // p marks the start index of the word
return true;
}
-void writeStringValue(QTextStream &t,QTextCodec *codec,const QString &s)
+void writeStringValue(QTextStream &t,TextCodecAdapter *codec,const QString &s)
{
QChar c;
bool needsEscaping=false;
bool needsHashEscaping=false;
// convert the string back to it original encoding
- //QByteArray se = codec->fromUnicode(s);
- t.setCodec(codec);
+ codec->applyToStream(t);
const QChar *p=s.data();
if (!s.isEmpty() && !p->isNull())
{
#include <QDesktopServices>
#include <QUrl>
#include <QTextStream>
+#include <QRegularExpression>
#include <QDebug>
+#include <QDate>
-#ifdef WIN32
+#ifdef _WIN32
#include <windows.h>
#endif
{
QMenu *file = menuBar()->addMenu(tr("File"));
file->addAction(tr("Open..."),
- this, SLOT(openConfig()), Qt::CTRL+Qt::Key_O);
+ this, SLOT(openConfig()), Qt::CTRL|Qt::Key_O);
m_recentMenu = file->addMenu(tr("Open recent"));
file->addAction(tr("Save"),
- this, SLOT(saveConfig()), Qt::CTRL+Qt::Key_S);
+ this, SLOT(saveConfig()), Qt::CTRL|Qt::Key_S);
file->addAction(tr("Save as..."),
- this, SLOT(saveConfigAs()), Qt::SHIFT+Qt::CTRL+Qt::Key_S);
+ this, SLOT(saveConfigAs()), Qt::SHIFT|Qt::CTRL|Qt::Key_S);
file->addAction(tr("Quit"),
- this, SLOT(quit()), Qt::CTRL+Qt::Key_Q);
+ this, SLOT(quit()), Qt::CTRL|Qt::Key_Q);
QMenu *settings = menuBar()->addMenu(tr("Settings"));
m_resetDefault = settings->addAction(tr("Reset to factory defaults"),
QString::fromLatin1(qVersion());
}
t << QString::fromLatin1(")</center><p><br>"
- "<center>Written by<br> Dimitri van Heesch<br>© 2000-2021</center><p>"
- "</qt>");
+ "<center>Written by<br> Dimitri van Heesch<br>© 2000-");
+ t << QDate::currentDate().year();
+ t << QString::fromLatin1("</center><p></qt>");
QMessageBox::about(this,tr("Doxygen GUI"),msg);
}
{
QMessageBox::warning(this,
tr("Error saving"),
- tr("Error: cannot open the file ")+fileName+tr(" for writing!\n")+
- tr("Reason given: ")+f.error());
+ QString(tr("Error: cannot open the file "))+fileName+tr(" for writing!\n")+
+ tr("Reason given: ")+QString::number(f.error()));
return;
}
QTextStream t(&f);
+ t.device()->setTextModeEnabled(false);
m_expert->writeConfig(t,false,false);
updateConfigFileName(fileName);
m_modified = false;
void MainWindow::loadSettings()
{
- QVariant geometry = m_settings.value(QString::fromLatin1("main/geometry"), QVariant::Invalid);
- QVariant state = m_settings.value(QString::fromLatin1("main/state"), QVariant::Invalid);
- QVariant wizState = m_settings.value(QString::fromLatin1("wizard/state"), QVariant::Invalid);
- QVariant loadSettings = m_settings.value(QString::fromLatin1("wizard/loadsettings"), QVariant::Invalid);
- QVariant workingDir = m_settings.value(QString::fromLatin1("wizard/workingdir"), QVariant::Invalid);
+ QVariant geometry = m_settings.value(QString::fromLatin1("main/geometry"));
+ QVariant state = m_settings.value(QString::fromLatin1("main/state"));
+ QVariant wizState = m_settings.value(QString::fromLatin1("wizard/state"));
+ QVariant loadSettings = m_settings.value(QString::fromLatin1("wizard/loadsettings"));
+ QVariant workingDir = m_settings.value(QString::fromLatin1("wizard/workingdir"));
- if (geometry !=QVariant::Invalid) restoreGeometry(geometry.toByteArray());
- if (state !=QVariant::Invalid) restoreState (state.toByteArray());
- if (wizState !=QVariant::Invalid) m_wizard->restoreState(wizState.toByteArray());
- if (loadSettings!=QVariant::Invalid && loadSettings.toBool())
+ if (!geometry.isNull()) restoreGeometry(geometry.toByteArray());
+ if (!state.isNull()) restoreState (state.toByteArray());
+ if (!wizState.isNull()) m_wizard->restoreState(wizState.toByteArray());
+ if (!loadSettings.isNull() && loadSettings.toBool())
{
m_expert->loadSettings(&m_settings);
- if (workingDir!=QVariant::Invalid && QDir(workingDir.toString()).exists())
+ if (!workingDir.isNull() && QDir(workingDir.toString()).exists())
{
setWorkingDir(workingDir.toString());
}
m_runProcess->setWorkingDirectory(m_workingDir->text());
QStringList env=QProcess::systemEnvironment();
// set PWD environment variable to m_workingDir
- env.replaceInStrings(QRegExp(QString::fromLatin1("^PWD=(.*)"),Qt::CaseInsensitive),
+ env.replaceInStrings(QRegularExpression(QString::fromLatin1("^PWD=(.*)"),QRegularExpression::CaseInsensitiveOption),
QString::fromLatin1("PWD=")+m_workingDir->text());
m_runProcess->setEnvironment(env);
QStringList args;
-#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
- QStringList runOptions = m_runOptions->text().split(QLatin1Char(' '),Qt::SkipEmptyParts);
-#else
+#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList runOptions = m_runOptions->text().split(QLatin1Char(' '),QString::SkipEmptyParts);
+#else
+ QStringList runOptions = m_runOptions->text().split(QLatin1Char(' '),Qt::SkipEmptyParts);
#endif
args << runOptions;
}
QTextStream t(m_runProcess);
m_expert->writeConfig(t,false,false);
+ t.flush();
m_runProcess->closeWriteChannel();
if (m_runProcess->state() == QProcess::NotRunning)
{
text1 += text;
m_outputLog->clear();
-#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
m_outputLog->append(APPQT(text1.toHtmlEscaped().trimmed()));
-#else
- m_outputLog->append(APPQT(Qt::escape(text1).trimmed()));
-#endif
}
}
}
QString indexFile = m_expert->getHtmlOutputIndex(m_workingDir->text());
QFileInfo fi(indexFile);
// TODO: the following doesn't seem to work with IE
-#ifdef WIN32
+#ifdef _WIN32
//QString indexUrl(QString::fromLatin1("file:///"));
ShellExecute(NULL, L"open", (LPCWSTR)fi.absoluteFilePath().utf16(), NULL, NULL, SW_SHOWNORMAL);
#else
#include <QMessageBox>
#include <QSettings>
#include <QTextStream>
-#include <QTextCodec>
#include <QFileInfo>
+#include <QRegularExpression>
#define SA(x) QString::fromLatin1(x)
// Remove / replace doxygen markup strings
// the regular expressions are hard to read so the intention will be given
// Note: see also configgen.py in the src directory for other doxygen parts
- QRegExp regexp;
+ QRegularExpression regexp;
// remove \n at end and replace by a space
regexp.setPattern(SA("\\n$"));
docs.replace(regexp,SA(" "));
parseConfig(fileName,m_options);
}
-void Expert::saveTopic(QTextStream &t,QDomElement &elem,QTextCodec *codec,
+void Expert::saveTopic(QTextStream &t,QDomElement &elem,TextCodecAdapter *codec,
bool brief,bool condensed)
{
if (!brief)
t << convertToComment(m_header);
}
- QTextCodec *codec = 0;
Input *option = m_options[QString::fromLatin1("DOXYFILE_ENCODING")];
- if (option)
- {
- codec = QTextCodec::codecForName(option->value().toString().toLatin1());
- if (codec==0) // fallback: use UTF-8
- {
- codec = QTextCodec::codecForName("UTF-8");
- }
- }
+ TextCodecAdapter codec(option->value().toString().toLatin1());
QDomElement childElem = m_rootElement.firstChildElement();
while (!childElem.isNull())
{
if (childElem.tagName()==SA("group"))
{
- saveTopic(t,childElem,codec,brief,condensed);
+ saveTopic(t,childElem,&codec,brief,condensed);
}
childElem = childElem.nextSiblingElement();
}
* Copyright (C) 1997-2019 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.
*
#include <QHash>
#include "docintf.h"
+#include "adapter.h"
class QTreeWidget;
class QTreeWidgetItem;
class QStackedWidget;
class QSettings;
class QTextBrowser;
-class QTextCodec;
class QPushButton;
class Input;
// DocIntf methods
void setHeader(const char *name);
void add(const char *name,const char *doc);
-
+
public slots:
void activateTopic(QTreeWidgetItem *,QTreeWidgetItem *);
QWidget *createTopicWidget(QDomElement &elem);
private:
void createTopics(const QDomElement &);
- void saveTopic(QTextStream &t,QDomElement &elem,QTextCodec *codec,bool brief,bool dondensed);
+ void saveTopic(QTextStream &t,QDomElement &elem,TextCodecAdapter *codec,bool brief,bool dondensed);
QSplitter *m_splitter;
QTextBrowser *m_helper;
* Copyright (C) 1997-2019 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.
*
{
Q_OBJECT
public:
- HelpLabel(const QString &text) : QLabel(text)
- { setContextMenuPolicy(Qt::CustomContextMenu);
+ HelpLabel(const QString &text) : QLabel(text)
+ { setContextMenuPolicy(Qt::CustomContextMenu);
connect(this,SIGNAL(customContextMenuRequested(const QPoint&)),
this,SLOT(showMenu(const QPoint&)));
}
}
}
protected:
- void enterEvent( QEvent * event ) { enter(); QLabel::enterEvent(event); }
+ void enterEvent(
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
+ QEvent * event
+#else
+ QEnterEvent * event
+#endif
+ ) { enter(); QLabel::enterEvent(event); }
};
#endif
* Copyright (C) 1997-2019 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.
*
#define INPUT_H
#include <QVariant>
+#include "adapter.h"
class QTextStream;
-class QTextCodec;
+class QTextStream;
class Input
{
virtual void updateDependencies() = 0;
virtual void reset() = 0;
virtual bool isDefault() = 0;
- virtual void writeValue(QTextStream &t,QTextCodec *codec) = 0;
+ virtual void writeValue(QTextStream &t,TextCodecAdapter *codec) = 0;
virtual void setTemplateDocs(const QString &docs) = 0;
virtual bool isEmpty() { return false; };
};
#include <QCheckBox>
#include <QTextStream>
-#include <QTextCodec>
#include <QGridLayout>
InputBool::InputBool( QGridLayout *layout, int &row,
setValue(m_default);
}
-void InputBool::writeValue(QTextStream &t,QTextCodec *codec)
+void InputBool::writeValue(QTextStream &t,TextCodecAdapter *codec)
{
if (m_state)
- t << codec->fromUnicode(QString::fromLatin1("YES"));
+ t << codec->encode(QString::fromLatin1("YES"));
else
- t << codec->fromUnicode(QString::fromLatin1("NO"));
+ t << codec->encode(QString::fromLatin1("NO"));
}
bool InputBool::isDefault()
void setEnabled(bool);
void updateDependencies();
bool isDefault();
- void writeValue(QTextStream &t,QTextCodec *codec);
+ void writeValue(QTextStream &t,TextCodecAdapter *codec);
void setTemplateDocs(const QString &docs) { m_tdocs = docs; }
static bool convertToBool(const QVariant &v,bool &isValid);
setValue(m_default);
}
-void InputInt::writeValue(QTextStream &t,QTextCodec *)
+void InputInt::writeValue(QTextStream &t,TextCodecAdapter *)
{
t << m_val;
}
void setEnabled(bool);
void updateDependencies() {}
bool isDefault();
- void writeValue(QTextStream &t,QTextCodec *codec);
+ void writeValue(QTextStream &t,TextCodecAdapter *codec);
void setTemplateDocs(const QString &docs) { m_tdocs = docs; }
public slots:
#ifndef INPUTOBSOLETE_H
#define INPUTOBSOLETE_H
+#include "input.h"
+
class InputObsolete : public Input
{
public:
void updateDependencies() {}
void reset() {}
bool isDefault() { return false; }
- void writeValue(QTextStream &,QTextCodec *) {}
+ void writeValue(QTextStream &,TextCodecAdapter *) {}
void setTemplateDocs(const QString &) {}
bool isEmpty() { return false; };
Kind orgKind() const { return m_orgKind; }
#include <QToolBar>
#include <QFileInfo>
#include <QFileDialog>
-#include <QTextCodec>
class NoWheelComboBox : public QComboBox
{
if (m_le) connect( m_le, SIGNAL(textChanged(const QString&)),
this, SLOT(setValue(const QString&)) );
- if (m_com) connect( m_com, SIGNAL(activated(const QString &)),
+ if (m_com) connect( m_com, SIGNAL(textActivated(const QString &)),
this, SLOT(setValue(const QString &)) );
m_str = s+QChar::fromLatin1('!'); // force update
setValue(s);
setDefault();
}
-void InputString::writeValue(QTextStream &t,QTextCodec *codec)
+void InputString::writeValue(QTextStream &t,TextCodecAdapter *codec)
{
writeStringValue(t,codec,m_str);
}
* Copyright (C) 1997-2019 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.
*
Q_OBJECT
public:
- enum StringMode { StringFree=0,
- StringFile=1,
- StringDir=2,
+ enum StringMode { StringFree=0,
+ StringFile=1,
+ StringDir=2,
StringFixed=3,
StringImage=4,
StringFileDir=5
};
InputString( QGridLayout *layout,int &row,
- const QString &id, const QString &s,
+ const QString &id, const QString &s,
StringMode m,
const QString &docs,
const QString &absPath = QString() );
void setEnabled(bool);
void updateDependencies() {}
bool isDefault();
- void writeValue(QTextStream &t,QTextCodec *codec);
+ void writeValue(QTextStream &t,TextCodecAdapter *codec);
void setTemplateDocs(const QString &docs) { m_tdocs = docs; }
bool isEmpty() { return m_str.isEmpty(); }
QString checkEnumVal(const QString &value);
QString m_default;
StringMode m_sm;
QStringList m_values;
- int m_index;
+ int m_index;
QVariant m_value;
QString m_docs;
QString m_id;
#include <QFileInfo>
#include <QFileDialog>
#include <QTextStream>
-#include <QTextCodec>
InputStrList::InputStrList( QGridLayout *layout,int &row,
const QString & id,
void InputStrList::browseFiles()
{
QString path = QFileInfo(MainWindow::instance().configFileName()).path();
- QStringList fileNames = QFileDialog::getOpenFileNames();
+ QStringList fileNames = QFileDialog::getOpenFileNames();
if (!fileNames.isEmpty())
{
}
void InputStrList::browseDir()
-{
+{
QString path = QFileInfo(MainWindow::instance().configFileName()).path();
- QString dirName = QFileDialog::getExistingDirectory();
+ QString dirName = QFileDialog::getExistingDirectory();
if (!dirName.isNull())
{
setValue(m_default);
}
-void InputStrList::writeValue(QTextStream &t,QTextCodec *codec)
+void InputStrList::writeValue(QTextStream &t,TextCodecAdapter *codec)
{
bool first=true;
foreach (QString s, m_strList)
* Copyright (C) 1997-2019 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.
*
class QLineEdit;
class QPushButton;
class QListWidget;
-class QStringList;
class QGridLayout;
class QAction;
void setEnabled(bool);
void updateDependencies() {}
bool isDefault();
- void writeValue(QTextStream &t,QTextCodec *codec);
+ void writeValue(QTextStream &t,TextCodecAdapter *codec);
void setTemplateDocs(const QString &docs) { m_tdocs = docs; }
bool isEmpty();
void showHelp(Input *);
private slots:
- void addString();
- void delString();
- void updateString();
+ void addString();
+ void delString();
+ void updateString();
void selectText(const QString &s);
void browseFiles();
void browseDir();
#include <QStackedWidget>
#include <qdrawutil.h>
+
// options configurable via the wizard
#define STR_PROJECT_NAME QString::fromLatin1("PROJECT_NAME")
#define STR_PROJECT_LOGO QString::fromLatin1("PROJECT_LOGO")
void ColorPicker::mouseMoveEvent(QMouseEvent *m)
{
- if (m_mode==Hue) setHue(y2hue(m->y()));
- else if (m_mode==Saturation) setSat(y2sat(m->y()));
- else setGam(y2gam(m->y()));
+ if (m_mode==Hue) setHue(y2hue(getMouseYPositionFromEvent(m)));
+ else if (m_mode==Saturation) setSat(y2sat(getMouseYPositionFromEvent(m)));
+ else setGam(y2gam(getMouseYPositionFromEvent(m)));
}
void ColorPicker::mousePressEvent(QMouseEvent *m)
{
- if (m_mode==Hue) setHue(y2hue(m->y()));
- else if (m_mode==Saturation) setSat(y2sat(m->y()));
- else setGam(y2gam(m->y()));
+ if (m_mode==Hue) setHue(y2hue(getMouseYPositionFromEvent(m)));
+ else if (m_mode==Saturation) setSat(y2sat(getMouseYPositionFromEvent(m)));
+ else setGam(y2gam(getMouseYPositionFromEvent(m)));
}
void ColorPicker::setHue(int h)
Step1::Step1(Wizard *wizard,const QHash<QString,Input*> &modelData) : m_wizard(wizard), m_modelData(modelData)
{
QVBoxLayout *layout = new QVBoxLayout(this);
- layout->setMargin(4);
+ layout->setContentsMargins(4,4,4,4);
layout->setSpacing(8);
QLabel *l = new QLabel(this);
l->setText(tr("Provide some information "
connect(m_crossRef,SIGNAL(stateChanged(int)),
SLOT(changeCrossRefState(int)));
+#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_optimizeLangGroup,SIGNAL(buttonClicked(int)),
SLOT(optimizeFor(int)));
connect(m_extractModeGroup,SIGNAL(buttonClicked(int)),
SLOT(extractMode(int)));
+#else
+ connect(m_optimizeLangGroup,SIGNAL(idClicked(int)),
+ SLOT(optimizeFor(int)));
+ connect(m_extractModeGroup,SIGNAL(idClicked(int)),
+ SLOT(extractMode(int)));
+#endif
}
connect(m_xmlEnabled,SIGNAL(stateChanged(int)),SLOT(setXmlEnabled(int)));
connect(m_docbookEnabled,SIGNAL(stateChanged(int)),SLOT(setDocbookEnabled(int)));
connect(m_searchEnabled,SIGNAL(stateChanged(int)),SLOT(setSearchEnabled(int)));
- connect(m_htmlOptionsGroup,SIGNAL(buttonClicked(int)),
- SLOT(setHtmlOptions(int)));
- connect(m_texOptionsGroup,SIGNAL(buttonClicked(int)),
- SLOT(setLatexOptions(int)));
+#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
+ connect(m_htmlOptionsGroup,SIGNAL(buttonClicked(int)),SLOT(setHtmlOptions(int)));
+ connect(m_texOptionsGroup,SIGNAL(buttonClicked(int)),SLOT(setLatexOptions(int)));
+#else
+ connect(m_htmlOptionsGroup,SIGNAL(idClicked(int)),SLOT(setHtmlOptions(int)));
+ connect(m_texOptionsGroup,SIGNAL(idClicked(int)),SLOT(setLatexOptions(int)));
+#endif
connect(m_tuneColor,SIGNAL(clicked()),SLOT(tuneColorDialog()));
}
m_dotCollaboration->setChecked(true);
gbox->setRowStretch(6,1);
+#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_diagramModeGroup,SIGNAL(buttonClicked(int)),
this,SLOT(diagramModeChanged(int)));
+#else
+ connect(m_diagramModeGroup,SIGNAL(idClicked(int)),
+ this,SLOT(diagramModeChanged(int)));
+#endif
connect(m_dotClass,SIGNAL(stateChanged(int)),
this,SLOT(setClassGraphEnabled(int)));
connect(m_dotCollaboration,SIGNAL(stateChanged(int)),
--- /dev/null
+# helper script for Windows to run editbin.exe on a generated executable
+function(apply_editbin target_name target_type)
+if (WIN32)
+ find_program(EDITBIN editbin)
+ if(EDITBIN)
+ set(EDITBIN_FLAGS /nologo /OSVERSION:5.1)
+ if (${target_type} STREQUAL "console")
+ set(EDITBIN_FLAGS ${EDITBIN_FLAGS} /SUBSYSTEM:CONSOLE,6.00)
+ elseif (${target_type} STREQUAL "windows")
+ set(EDITBIN_FLAGS ${EDITBIN_FLAGS} /SUBSYSTEM:WINDOWS,6.00)
+ endif()
+ add_custom_command(
+ TARGET ${target_name}
+ POST_BUILD
+ COMMAND "${EDITBIN}" ${EDITBIN_FLAGS} "$<TARGET_FILE:${target_name}>"
+ VERBATIM)
+ endif()
+ endif()
+endfunction()
+++ /dev/null
-if(${CMAKE_ARGC} GREATER 2)
- if ("${CMAKE_ARGV4}" STREQUAL "ENONLY")
- file(APPEND ${CMAKE_ARGV3} " #define ENGLISH_ONLY\n")
- else()
- math(EXPR UPTO ${CMAKE_ARGC}-1)
- foreach(i RANGE 4 ${UPTO})
- file(APPEND ${CMAKE_ARGV3} " #define LANG_${CMAKE_ARGV${i}}\n")
- endforeach()
- endif()
-endif()
-
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Generate documentation from C, C++, Java, Python and other languages")
set(CPACK_PACKAGE_DESCRIPTION "Doxygen is the de facto standard tool for generating documentation from annotated C++ sources.
But many other popular programming languages are supported:
- C, Objective-C, C#, PHP, Java, Python, Fortran, VHDL, D (some extent) and IDL (Corba, Microsoft, and UNO/OpenOffice flavors).
+ C, Objective-C, C#, PHP, Java, Python, Fortran, D (some extent), and IDL (Corba, Microsoft, and UNO/OpenOffice flavors).
+ Doxygen also supports the hardware description language VHDL.
.
Three usages:
.
include (${TOP}/cmake/version.cmake)
string(TIMESTAMP DATE "%d-%m-%Y")
+string(TIMESTAMP YEAR "%Y")
find_package(PythonInterp REQUIRED)
find_program(EPSTOPDF NAMES epstopdf )
# doc/language.doc (see tag Doxyfile:INPUT)
add_custom_command(
COMMAND ${PYTHON_EXECUTABLE} translator.py ${PROJECT_SOURCE_DIR}
- DEPENDS ${PROJECT_SOURCE_DIR}/doc/maintainers.txt ${PROJECT_SOURCE_DIR}/doc/language.tpl ${PROJECT_BINARY_DIR}/doc/translator.py ${LANG_FILES}
+ DEPENDS ${PROJECT_SOURCE_DIR}/VERSION ${PROJECT_SOURCE_DIR}/doc/maintainers.txt ${PROJECT_SOURCE_DIR}/doc/language.tpl ${PROJECT_BINARY_DIR}/doc/translator.py ${LANG_FILES}
OUTPUT language.doc
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/doc
)
STRIP_CODE_COMMENTS = NO
HTML_STYLESHEET = doxygen_manual.css
HTML_EXTRA_FILES = doxygen_logo.svg
+HTML_EXTRA_FILES += translator_report.txt
ALIASES = LaTeX="\f({\LaTeX}\f)"
ALIASES += TeX="\f({\TeX}\f)"
ALIASES += forceNewPage="\latexonly \newpage \endlatexonly"
HTML_OUTPUT = chm
GENERATE_HTMLHELP = YES
GENERATE_TREEVIEW = NO
+ HTML_DYNAMIC_MENUS = NO
HHC_LOCATION = "$(HTML_HELP_COMPILER)"
CHM_FILE = index.chm
BINARY_TOC = YES
are different from the standard doxygen configuration file settings one can run the
doxygen command: with the `-x` option and the name of the configuration file (default
is `Doxyfile`). The output will be a list of the not default settings (in `Doxyfile`
-format).
+format). Alternatively also `-x_noenv` is possible which is identical to the `-x`
+option but without replacing the environment variables.
\htmlonly
Return to the <a href="index.html">index</a>.
/** \page changelog Changelog
\tableofcontents{html,latex}
\section log_1_9 1.9 Series
+\subsection log_1_9_4 Release 1.9.4
+\htmlonly
+<b>(release date 05-05-2022)</b>
+</p>
+<h3>Bug fixes</h3>
+<ul>
+<li>bug 334859 HTMLHELP: Underscore in chm file name prevents linking between chm files [<a href="https://github.com/doxygen/doxygen/commit/9c9e42fb0b46d59dda6f0131eb66769566420802">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/fc5e62b0da9712ff9e74198a7531882b2b3ebd16">view</a>]</li>
+<li>bug 711041 Undocumented "enum" values in TOC of qhp files causes tag-mismatch and corrupt TOC [<a href="https://github.com/doxygen/doxygen/commit/aea1ce8cc2eac9a3148b43c4961aca60f78f964b">view</a>]</li>
+<li>bug 783768 QCH files: classes & their constructors get conflicting keyword handling [<a href="https://github.com/doxygen/doxygen/commit/7fc52b556d6c1925a3b16052762e084368a95427">view</a>]</li>
+<li>bug_445536 Select folder for STRIP_FROM_PATH [<a href="https://github.com/doxygen/doxygen/commit/130ccf1c0e6ac8c257fba53b60a56a725bfb2be5">view</a>]</li>
+<li>bug_644899 New diagram implementing environment [<a href="https://github.com/doxygen/doxygen/commit/3d4421a368814df803184b11f5e7caca32c34f9f">view</a>], and [<a href="https://github.com/doxygen/doxygen/commit/b3e3ccd1c29c814e29e50d3ee1574ea545bfb0b6">view</a>]</li>
+<li>bug_698167 HIDE_SCOPE_NAMES does not hide namespace scope for functions within it [<a href="https://github.com/doxygen/doxygen/commit/e9325bfb7d48dd965c418e9a9e0b26888911c24d">view</a>]</li>
+<li>bug_711041 Undocumented "enum" values in TOC of qhp files causes tag-mismatch and corrupt TOC. [<a href="https://github.com/doxygen/doxygen/commit/1e51265d8b86fa476743b5cbad653b917b7171b0">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/545c3ab899a11520fe6cd1a964b5d5e869a33cf6">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/909c0d2a6b44de8ccf9e2e60455edc256e089de5">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/6382">#6382</a> computational time issue of Java generics [<a href="https://github.com/doxygen/doxygen/commit/53fcef6dfa281262e14927c67b81e8658b3c664c">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/6d99c858fd799a2cfa5b8237bd60b6b01fa67588">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/6992">#6992</a> Automatic Coverity run [<a href="https://github.com/doxygen/doxygen/commit/12f9bc0d1da68270646f3b31f3ea6d03acb97661">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/32cc55cc607ff76f9528057558d0cafe58ce3702">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/4fff2f24e975b905e5e488857bd607f436035c89">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/5ccca7c6c17b3f4d757222821d1211191de3fc35">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/638bed45c59237d9204aa6a82e6bb7338cbd57c6">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/65ee43a9fa9bc2170419e04a93bcb1b84b0298c4">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/6b95109c1ee690c19fcc300a3457e8a99ad1fe3a">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/790a7f37f075e5e640e78fadaba1f0e739661c28">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/7bad4314347110998c58ce285ddd52b07080129e">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/aa9482e8b391586c1b11ace981ff52ed926ff341">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/e1998ecdbb55c42d476981dd50b8a0a39bd6ef27">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/ec9a6a9cdc2c4d6263e02674c1c8bf2950fcd5ac">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/ee2e5bd7c9419f33b8bbae31d4651011bcb404e7">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/f2ce5c819854bb524100c0f0f7069909c380533a">view</a>], and [<a href="https://github.com/doxygen/doxygen/commit/a57140cbcd29ae9ff57066d2c3bdaf0899682db3">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/7543">#7543</a> Support PlantUML in Markdown [<a href="https://github.com/doxygen/doxygen/commit/a41d0a7516173339fbb4270ffe185a6282b23c85">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/7873">#7873</a> Combining `///`-style comments with macros containing @cond/@endcond causes a preprocessor error [<a href="https://github.com/doxygen/doxygen/commit/85a96aee93346765126abe02234bfe4d83c0e6ae">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8355">#8355</a> Doxywizard 1.9.x doesn't start up properly [<a href="https://github.com/doxygen/doxygen/commit/facf7a9f0d89a8912b75fce65587708f709bca1e">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8487">#8487</a> Doxygen doesn't generate links to C# classes in different namespaces [<a href="https://github.com/doxygen/doxygen/commit/2976b67adcd1e2d3a787533566d93915ea237065">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/54dd8c74d68df10428e473edd34a43e4f337d158">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8784">#8784</a> CLANG_ASSISTED_PARSING tries to parse markdown files [<a href="https://github.com/doxygen/doxygen/commit/81a28d571999a9196658866e6fdf4b0a66857422">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9003">#9003</a> Button Show HTML-Output doesn't work [<a href="https://github.com/doxygen/doxygen/commit/227952da7562a6f13da2a9d19c3cdc93812bc2de">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9005">#9005</a> Function prototype matching @fn command, but link between both is not made [<a href="https://github.com/doxygen/doxygen/commit/3b39913c33979be99353d44a17824f34c47f814b">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9006">#9006</a> Doxygen 1.9.3 replaces '--' with '&ndash;' inside formula alias [<a href="https://github.com/doxygen/doxygen/commit/070bbdcd7523dcbe88d8131556635717f82a937d">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9007">#9007</a> Using DOT_PATH with a symlink for dot does not always work [<a href="https://github.com/doxygen/doxygen/commit/b14342e6a030717c8db1119307d5645433db634b">view</a>], and [<a href="https://github.com/doxygen/doxygen/commit/17043618954dd1a3567c771e3ddac3fb48c54cdc">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9027">#9027</a> SEARCHDATA_FILE (searchdata.xml) keyword elements blank [<a href="https://github.com/doxygen/doxygen/commit/cca136711119bf4a062dfcd0d06dbf0a95caf2fd">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9028">#9028</a> DoxyVerb environment should terminate the previous paragraph before changing paragraph formatting [<a href="https://github.com/doxygen/doxygen/commit/97b0474b2b80d77c21c06646810e2161c6d2d1a7">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9045">#9045</a> wrong grammar/spelling in german html Output [<a href="https://github.com/doxygen/doxygen/commit/b1d50a6c27c1815414307ae789c1943ecebae490">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9051">#9051</a> Wrong "Related page" generating in 1.9.3 (works good in 1.9.1!) from *.md files [<a href="https://github.com/doxygen/doxygen/commit/12caea43df2bcc1b1346f93db37d332cf358eb82">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/477b51227d2e719ba2860ec2f0cccfd6e0a4c787">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9054">#9054</a> Feature Request: Doxywizard: Customize Doxyfile Line Endings [<a href="https://github.com/doxygen/doxygen/commit/5275c42164db7d0c792fa80d8f6a7a82b1e499f2">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9055">#9055</a> Objective C method / property attribute decoration confuses parsing [<a href="https://github.com/doxygen/doxygen/commit/fa66d5e245b1a31aed26b20b100cfe26cdc75471">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9058">#9058</a> Strip leading spaces in QHP file [<a href="https://github.com/doxygen/doxygen/commit/7d91d52da37c2deb41c14580f9bcb461b7aa8874">view</a>], [<a href="https://github.com/doxygen/doxygen/commit/295258114da92cb9f7677b16e31cd062106d6689">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9070">#9070</a> Doxygen is not showing all called functions in graph plot [<a href="https://github.com/doxygen/doxygen/commit/63e6c8baa1446e73f5f50c563af4beb9af9e5b37">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/75fe5dcd9aabd38319eb4e8f0520f5f96a8bb1d5">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9074">#9074</a> Menubar Links not Parsed Correctly [<a href="https://github.com/doxygen/doxygen/commit/a06eb69b494d20a0e8abff5e28d6efc898f04bbb">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9075">#9075</a> .html Extension Removed from Tag File URLs [<a href="https://github.com/doxygen/doxygen/commit/7a218f3e7bf524f9342aa03572f6b04112961c73">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9094">#9094</a> Wrong QHP index structure [<a href="https://github.com/doxygen/doxygen/commit/15dae504a167d838873053cc96417d8beae78df7">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/427e0a44c55bbb066429d815fb2420769931a0db">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9124">#9124</a> Latex: Does not properly compile when PROJECT_BRIEF contains commas [<a href="https://github.com/doxygen/doxygen/commit/c8595bf9572b13c060265b199e0e3d159de601cf">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9127">#9127</a> Doxywizard truncates standard input passed to doxygen process. [<a href="https://github.com/doxygen/doxygen/commit/f8f363de8b2b13b70328df3e78f805bca4fa2f1d">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9135">#9135</a> Qhelpgenerator debug mode [<a href="https://github.com/doxygen/doxygen/commit/8820a773f86d10a556bb693efb969e5e4fbf8498">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9136">#9136</a> master does not compile on Mac 12.2.1 [<a href="https://github.com/doxygen/doxygen/commit/473feb0ded087051ead9fb07dcc7b4192ee169b4">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9138">#9138</a> QHP index contains duplicated file entries [<a href="https://github.com/doxygen/doxygen/commit/f1e207abc9cec319793dea61ab990d866293bfed">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9143">#9143</a> warning file-line format in Possible candidates [<a href="https://github.com/doxygen/doxygen/commit/87b8810eb94bb234df8d0c5fc5ffba2c4f0d5a96">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9144">#9144</a> problem with matching function when using namespace [<a href="https://github.com/doxygen/doxygen/commit/ff56170ef5373a6cfe0732359f99b21f12578aa1">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9148">#9148</a> No uniquely matching class member, but no candidates are printed. [<a href="https://github.com/doxygen/doxygen/commit/b81ef4d433445de75404689f3d8c06853bb39b5f">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9155">#9155</a> Doxygen crash with NUM_PROC_THREADS>1 [<a href="https://github.com/doxygen/doxygen/commit/2064d196cb5bb3809a864eea8e0e9372ba49c9d1">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/5481d6e3ef0040c508a72f70de5305668c7d86ca">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/66d1936b37aef795b194096e5172fc3c770d1728">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9157">#9157</a> Codebase static analysis shows some potential leaks and nullptr access [<a href="https://github.com/doxygen/doxygen/commit/d44f5361242380cd2b68a825bfb3c69bd21d357e">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9158">#9158</a> Python: Two classes in one file, second class documentation block copied into its class method block [<a href="https://github.com/doxygen/doxygen/commit/b35457467426e163739a9587f536b0466590a45a">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9171">#9171</a> XML output for dot file uses relative path in 1.9.3 [<a href="https://github.com/doxygen/doxygen/commit/6af20bea6642fc80804752a8eacc8b2427592591">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9187">#9187</a> doxygen -x_noenv option to not expand environment variables [<a href="https://github.com/doxygen/doxygen/commit/1b8ca6a341e1845cf0bac07443ad1b9473b7fa8b">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/412c4fb95645f02b20579ad975bb6e9e65c4a318">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9190">#9190</a> DOC: Mention -x switch in the "Support" page [<a href="https://github.com/doxygen/doxygen/commit/c0562a85518cf55f7d125e41e7b982750b8f2d01">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/e0f5c9fde01df0320c6355e517e494fdbc6a271e">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9192">#9192</a> "Packages" has a "Packages" in the tree [<a href="https://github.com/doxygen/doxygen/commit/9fc86bf3cdea17c7e527b4ff1946903558cd3629">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9195">#9195</a> fix for warning: documentation for unknown define [<a href="https://github.com/doxygen/doxygen/commit/9cd1b64089c5667768c0ce97c0a09fe23a4fa6d6">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9200">#9200</a> Doxygen cannot resolve link to HTML anchor page [<a href="https://github.com/doxygen/doxygen/commit/fec62a54cd9845216c705fcf17cb0c309a661d0d">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9211">#9211</a> @file is confused by symlinks (regression since 1.9.1) [<a href="https://github.com/doxygen/doxygen/commit/62bea90229c56e71d1fe150cb4b19d5e4fc6e9e0">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9217">#9217</a> Can't load MathJax 3 extensions [<a href="https://github.com/doxygen/doxygen/commit/fd820edf9f28187f7494a10f78658beb2ee59ca4">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9229">#9229</a> Crash with Segmentation fault in ClassDefImpl::mergeMembers [<a href="https://github.com/doxygen/doxygen/commit/5930ab780102c0bef4d05b8f058a6503a91f1b56">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9234">#9234</a> NUM_PROC_THREADS not being honored when processing input [<a href="https://github.com/doxygen/doxygen/commit/9abc310b4ac11d3d4cdeeabab25dbb0cd949ccc7">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9241">#9241</a> Undocumented external namespaces from .tags files are shown in output Namespace index [<a href="https://github.com/doxygen/doxygen/commit/27dcc1c3b6cbcb3da77485a03a47905315cc9556">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9243">#9243</a> GHC_NO_DIRENT_D_TYPE should be defined on Solaris [<a href="https://github.com/doxygen/doxygen/commit/f751ce0d514def462798352827515126c45037a5">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9251">#9251</a> HTML extensions stripped from DOT SVG links with tagfiles [<a href="https://github.com/doxygen/doxygen/commit/475805b0ab7e6c847776fcd16847b4bf9484f75f">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9254">#9254</a> Missing first word of page in case of existing \page command in markdown [<a href="https://github.com/doxygen/doxygen/commit/c4b2d6522d3a57528679a99d7bb8bdb87844a468">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9257">#9257</a> Build Error regarding vhdlparser [<a href="https://github.com/doxygen/doxygen/commit/f1cc0da77fed56e3a37ad615be73769d8453cdff">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9264">#9264</a> Markdown tables not rendered for parameters [<a href="https://github.com/doxygen/doxygen/commit/7ee2df86f3fa4f4694ecf0dfd7dcca9f98c9ca84">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9266">#9266</a> doxygen runtime went from 10minutes to >14hours (lots of using namespace) [<a href="https://github.com/doxygen/doxygen/commit/9b262a41ec2b1bcc2b64f7364730d164eeb3f2f5">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9269">#9269</a> Not able to compile with MSYS2/mingw (file too big) [<a href="https://github.com/doxygen/doxygen/commit/55f11dbddfcd4da29f582c88bb8d018be4e334c8">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/897b75f886c00ab8c12a54a8337b45602e069cfb">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/9fce084d836a1c803ca52b47fd2db9bc1add1556">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9274">#9274</a> Automatic links not working in examples that use C++ source [Potential Bug] [<a href="https://github.com/doxygen/doxygen/commit/32eb490b42996a7db3405e898ecb2065238ba4a8">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/4d3c07dc1a332264c5fdeb0154d2a507f6e6efb8">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/d1236eff5d4495a7849e09e92d97c338461cb57d">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/d18ed15d1dcc724ab16e50233d4aa80ce18aac8e">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9276">#9276</a> File-Line is omitted when suggesting possible candidates depending on noMatchCount [<a href="https://github.com/doxygen/doxygen/commit/fc978eb5c745aa7c0e86753c66be446d5010d2d7">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9284">#9284</a> Clicking external link within search results with EXT_LINKS_IN_WINDOW=YES opens the link in the search results box [<a href="https://github.com/doxygen/doxygen/commit/de8648aa311dc7dbdf822f40308af012004d3a67">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9296">#9296</a> gives up after seeing egregiously complex template code [<a href="https://github.com/doxygen/doxygen/commit/5afa52055e83df65a2f80c7e26674e4bc00e2a42">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9298">#9298</a> Segfault in Fortran parser (heap use after free) [<a href="https://github.com/doxygen/doxygen/commit/2efb03e8cc1e2dfd1720e8d22380486404a57683">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/39cf489a9df2c8f125dc1cc247bdb347019f6f50">view</a>]</li>
+<li>Recognize type= as variable in Fortran [<a href="https://github.com/doxygen/doxygen/commit/daa4742c3fa6697ed247b397b8ceac3c258440c8">view</a>]</li>
+<li>Concept mising in the layout description [<a href="https://github.com/doxygen/doxygen/commit/3931e45744da9877c84b4d7dfb37ae0de8d07bcd">view</a>]</li>
+<li>Detecting end of body in python [<a href="https://github.com/doxygen/doxygen/commit/64573247f87ba6d172928910e08a7a211d645642">view</a>]</li>
+<li>SHOW_FILES=NO could cause broken links for grouped files [<a href="https://github.com/doxygen/doxygen/commit/7f514f1822de413da25bd5a6eba8938a3483e793">view</a>]</li>
+<li>Source code was missing line anchors in the HTML output when using libclang [<a href="https://github.com/doxygen/doxygen/commit/84dd40b014ff2df3c1c150819a3265dd1004f7b3">view</a>]</li>
+<li>Updated Hindi Locale ID (LCID): 0x439 Hindi [<a href="https://github.com/doxygen/doxygen/commit/d266f73b011c91f4b9f637e82818bc379be68ad3">view</a>]</li>
+<li>INCLUDE_PATH is not recursive [<a href="https://github.com/doxygen/doxygen/commit/395875cd0e2db37512ee747eda738ebb383fdf2f">view</a>]</li>
+<li>Spurious colon in the output [<a href="https://github.com/doxygen/doxygen/commit/f16ea5e2ca173ce97d9432c51c8bc385ed9ad1fb">view</a>]</li>
+<li>Global enum incorporates values from an enum class [<a href="https://github.com/doxygen/doxygen/commit/d2ef091b51e168c1d8708828f2ac920fa734ec51">view</a>]</li>
+<li>Incorrect check on a list item. [<a href="https://github.com/doxygen/doxygen/commit/d4acdc311501a56e4600671dac46d702f2847642">view</a>]</li>
+<li>Incorrect doxygen help information [<a href="https://github.com/doxygen/doxygen/commit/73022bc6bb475fb784543c94ebceea5d2bd5ed92">view</a>]</li>
+<li>Incorrect line number in warning message [<a href="https://github.com/doxygen/doxygen/commit/1ffd4ea6cffa90e17bc3672204947bc7ac961faa">view</a>]</li>
+<li>Incorrect macro file name in LaTeX [<a href="https://github.com/doxygen/doxygen/commit/0cedb76aba53b4e9fe9e5c4a1f20a3738a5e7cae">view</a>]</li>
+<li>Incorrect protection for test 28 [<a href="https://github.com/doxygen/doxygen/commit/b8f209bb67b68b45ccdb97ecb499b714922c56d0">view</a>]</li>
+<li>Incorrect representation of some items in HTMLHELP [<a href="https://github.com/doxygen/doxygen/commit/968e10e90f769d86423ef0fe2f2867038ccdd248">view</a>]</li>
+<li>Incorrect version in language documentation [<a href="https://github.com/doxygen/doxygen/commit/7a5da99de366eb7e0402eb1e5b3fe478bee6be07">view</a>]</li>
+<li>Don't create anchor for \name command [<a href="https://github.com/doxygen/doxygen/commit/7b6405bd09044049a6060ae7bbc236abd2d4043e">view</a>]</li>
+<li>add missing newline in docu [<a href="https://github.com/doxygen/doxygen/commit/21e7c76c5793ca873aa206a73b4d4af76270d12f">view</a>]</li>
+<li>synchronize man and help messages [<a href="https://github.com/doxygen/doxygen/commit/81416b7987d4e51fb85ce908cf52ba52162c6fd9">view</a>]</li>
+</ul>
+<h3>Features</h3>
+<ul>
+<li>Add CINDEX_NO_EXPORTS option when linking against static libclang [<a href="https://github.com/doxygen/doxygen/commit/dc2950946033e9dab125e389af6eafc3d1f73eac">view</a>]</li>
+<li>Introduce CREATE_SUBDIRS_LEVEL [<a href="https://github.com/doxygen/doxygen/commit/e8ea84e2d3566a2f393075e59e87d94c86dc0944">view</a>]</li>
+<li>Add for the xml output also xml to the markdown image representation. [<a href="https://github.com/doxygen/doxygen/commit/57ed3a06ca9f19ef0c1288e2d94860188b403c2b">view</a>]</li>
+<li>Adding Qt6 support [<a href="https://github.com/doxygen/doxygen/commit/dbdfdb0a0c61b9c08fce05612df4fe0648a6f6fc">view</a>]</li>
+<li>Update Bulgarian translation [<a href="https://github.com/doxygen/doxygen/commit/6eb2680e1e53301c7a1eaacd9fb23461b70dd1de">view</a>]</li>
+<li>Better translation for trPackageMembers [<a href="https://github.com/doxygen/doxygen/commit/6fcfb6719653e449a8b1ca3581d384d30cf750fa">view</a>]</li>
+<li>Refer to chapter Grouping with GROUP_GRAPHS [<a href="https://github.com/doxygen/doxygen/commit/1539717c2d6be506335fcf7027f00ad599a13955">view</a>]</li>
+<li>HTMLHELP warning on using svg as image format for graphs [<a href="https://github.com/doxygen/doxygen/commit/a20629cc9b421d8f3245279fe057cc6832e19ba4">view</a>]</li>
+<li>mention doxygen debugging flags on the web [<a href="https://github.com/doxygen/doxygen/commit/8d22cf173972ced76f4a30fb02737ccd1a7436e8">view</a>]</li>
+<li>mention how to get additional usage flags [<a href="https://github.com/doxygen/doxygen/commit/a44ba5d5883cb52c540b85025b9023b4aa5ade6d">view</a>]</li>
+</ul>
+<h3>Deprecated functionality</h3>
+<ul>
+<li>Dropping Qt4 support [<a href="https://github.com/doxygen/doxygen/commit/dbdfdb0a0c61b9c08fce05612df4fe0648a6f6fc">view</a>]</li>
+<li>Restrict usable flex version to 2.6.4 and higher [<a href="https://github.com/doxygen/doxygen/commit/75b503e915b58dfd6ad7c7aaa79bc89ee7b99fce">view</a>], and [<a href="https://github.com/doxygen/doxygen/commit/a7f047daaceb1cb675bd523d7e8cb2b3a3d99938">view</a>]</li>
+<li>Update to require JavaCC 7.0.6 or higher [<a href="https://github.com/doxygen/doxygen/commit/bb352ce8c3a34964e6213ef3ce120208ec84d345">view</a>]</li>
+<li>C++17 compiler is now required to compile doxygen [<a href="https://github.com/doxygen/doxygen/commit/7ff9879dd7c3e727fac106e0e8722b3657460362">view</a>]</li>
+</ul>
+<h3>Refactoring and cleanup</h3>
+<ul>
+<li>Add null pointer checks for dynamic casts of LayoutDocEntry objects [<a href="https://github.com/doxygen/doxygen/commit/3471e0de20a48243e9cbfb566f8a522f70491e56">view</a>]</li>
+<li>Add test possibility to check the structure of the index.qhp file [<a href="https://github.com/doxygen/doxygen/commit/1255f5b14d7dea0afba0e6866ba927bfdc928dd9">view</a>]</li>
+<li>Add try-catch around DocParser's destructor to avoid coverity warning [<a href="https://github.com/doxygen/doxygen/commit/57efad44bfc02744ba5fd8ea820b54a2443e3771">view</a>]</li>
+<li>Added GHC_OS_SOLARIS [<a href="https://github.com/doxygen/doxygen/commit/933c0ecb0fdf41054451889ce94115e63ab83333">view</a>]</li>
+<li>Added missing include and remove redundant code [<a href="https://github.com/doxygen/doxygen/commit/f4882b1066f2502612ad8b5dd7c29cba6bb98aba">view</a>]</li>
+<li>Added support for Bulgarian [<a href="https://github.com/doxygen/doxygen/commit/426f4404d8d560f8c84253afc8c1729c57e5d648">view</a>]</li>
+<li>Added translation for the Hindi-language and signed up as a maintainer for the same. [<a href="https://github.com/doxygen/doxygen/commit/1534ef192d99815bd0ee4aeae6a52c1091f8fd08">view</a>]</li>
+<li>Adjustments according to the new README [<a href="https://github.com/doxygen/doxygen/commit/3d3441e1e1a958a22de15473f24eb13bf7d5ac74">view</a>]</li>
+<li>Align latex commands [<a href="https://github.com/doxygen/doxygen/commit/3940dc04520131fec6b0afb1b358fcb22e36531a">view</a>]</li>
+<li>Allow multi-threaded computation of tooltips [<a href="https://github.com/doxygen/doxygen/commit/120dd03340bee5d88a8c12f48fc8ca133357f385">view</a>]</li>
+<li>Automatically set copyright year in doxygen man page [<a href="https://github.com/doxygen/doxygen/commit/cfb44552b60dae37cb61e41101edcd785fd585d0">view</a>]</li>
+<li>Automatically show correct year in about box [<a href="https://github.com/doxygen/doxygen/commit/a6c76f5c2b01ae4ee4420647f17b84262f5cdf09">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/f46c6dfa71c0b2f0c5d36af0de19c5d304ec3d34">view</a>]</li>
+<li>Avoid compiler error on systems where size_t==unsigned int [<a href="https://github.com/doxygen/doxygen/commit/c9dc0665be9ab94d1dbcdfc5aa76cbfa6c633699">view</a>]</li>
+<li>Correcting default settings when running HTMLHELP [<a href="https://github.com/doxygen/doxygen/commit/aca38d3548b7fe32e4a04daa69cf92e8f90dc246">view</a>]</li>
+<li>Determination of fixed source form. [<a href="https://github.com/doxygen/doxygen/commit/f46f51027e09fc9ce86b5668ed13267c91e54fb0">view</a>]</li>
+<li>Downgrade stale translator warning to message [<a href="https://github.com/doxygen/doxygen/commit/4c47b238edf4f94894ff70f6b32904e142f159a7">view</a>]</li>
+<li>Enable always all languages [<a href="https://github.com/doxygen/doxygen/commit/d82e1d958e40ed726f407b4f707360d76086cf42">view</a>]</li>
+<li>Enable the equal sign in the file mask [<a href="https://github.com/doxygen/doxygen/commit/52fb1299dfa4e26d9b80967c79ffb87482fd8e8e">view</a>]</li>
+<li>Error when generating documentation with formulas a second time [<a href="https://github.com/doxygen/doxygen/commit/a5d1038a94ef446ce4cb3235aa9a9d4cf290a853">view</a>]</li>
+<li>Extended support for language specified in markdown fenced code blocks [<a href="https://github.com/doxygen/doxygen/commit/dbe1662757bd49a7e5e14af5092a71fb14d5ea21">view</a>]</li>
+<li>Fix build with MinGW and Ninja [<a href="https://github.com/doxygen/doxygen/commit/76df6dee6825591520f386b85f15014600377362">view</a>]</li>
+<li>Fix debug prints [<a href="https://github.com/doxygen/doxygen/commit/99e997dbf4d6ea1337e17a835ee201360f506ee9">view</a>]</li>
+<li>Fix e-mail obfuscation issue in the manual [<a href="https://github.com/doxygen/doxygen/commit/adddb8236f9e29bdf9b8093d01bf4ccbb23506ef">view</a>]</li>
+<li>Fix for merge issue [<a href="https://github.com/doxygen/doxygen/commit/a9849c12122d6cf347654ab089a6b50ea719639b">view</a>]</li>
+<li>Fix for translator.py to deal with =default destructor [<a href="https://github.com/doxygen/doxygen/commit/e18f715eb55121a4219d00bc4d824cebf1fb504b">view</a>]</li>
+<li>Fix for unsigned int issue [<a href="https://github.com/doxygen/doxygen/commit/5c86da0d0cb200aa201e47c0c5c5397c990ce6b2">view</a>]</li>
+<li>Fix multi-threading issues if SERVER_BASED_SEARCH=YES [<a href="https://github.com/doxygen/doxygen/commit/13d327a6bedead7109513a0c81831a7e36ddd187">view</a>]</li>
+<li>Fix potential stack overflow [<a href="https://github.com/doxygen/doxygen/commit/346a923255ce8bc9d791fcd350a9130c208c5ed4">view</a>]</li>
+<li>Fix repeated words [<a href="https://github.com/doxygen/doxygen/commit/7ae7c75e85b9dfe853ef2700985a0191173b855e">view</a>]</li>
+<li>Fixed potential crash in case cached item was already purged [<a href="https://github.com/doxygen/doxygen/commit/fe58686503d386afb5269e7a2799c0457c743092">view</a>]</li>
+<li>Fixed regression that introduced an invalid </p> in HTML [<a href="https://github.com/doxygen/doxygen/commit/d8cddb48b16cac672ed9faa945beb5cfcfd5bc6e">view</a>]</li>
+<li>Fixed version check and did some simplifications and refactoring [<a href="https://github.com/doxygen/doxygen/commit/9fcecacd04a1c54349c50cb1157766f1f276bc4e">view</a>]</li>
+<li>Handling enums in settings that double as boolean [<a href="https://github.com/doxygen/doxygen/commit/2b6127983f172cc7c505eb944157346e2e9926e0">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/911ac5e141796fede97d5e9ff493a2de1a3536e5">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/cfdab46857bec8b43efb54650ab4703d7a8311e0">view</a>]</li>
+<li>Handling of value of visible attribute [<a href="https://github.com/doxygen/doxygen/commit/461004cde53a208d99407c887592ff66688e2955">view</a>]</li>
+<li>Interaction of tests for xhtml and qhp [<a href="https://github.com/doxygen/doxygen/commit/627a53f009b809127275572ea4a471ae7b12817f">view</a>]</li>
+<li>Line numbers not shown in gray in source code [<a href="https://github.com/doxygen/doxygen/commit/f0178841468ecbbd204c9cf508563033da07c303">view</a>]</li>
+<li>Make better use of capture ranges [<a href="https://github.com/doxygen/doxygen/commit/b207447be611edef4e4cf0695af1ee9a05d7ea6f">view</a>]</li>
+<li>Make boolean representation mapping part of ConfigValues::Info [<a href="https://github.com/doxygen/doxygen/commit/64d56b919d00da70ab6bf13080c131ebfa60f197">view</a>]</li>
+<li>Making Windows executable large address aware [<a href="https://github.com/doxygen/doxygen/commit/7a2733877c9e81c04c9d941701e32b6a8d5c5fc1">view</a>]</li>
+<li>Making tag information better available [<a href="https://github.com/doxygen/doxygen/commit/100c80e708d7414f641751db547a797ce340035f">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/8271e2838c34be5ed5b186c9c5c2f09f69d952e1">view</a>]</li>
+<li>Minor optimisation [<a href="https://github.com/doxygen/doxygen/commit/2c76059d714ea6f2a179578966021df9e365a2a6">view</a>]</li>
+<li>Missing <VERSION> in description of doxyparse [<a href="https://github.com/doxygen/doxygen/commit/b561499ea5fdd087a704a7eb855d3847cc8e26d5">view</a>]</li>
+<li>Missing part of output due to wrong emoji command [<a href="https://github.com/doxygen/doxygen/commit/41211ab75ed074154c6463e81cc4db51e24febc6">view</a>]</li>
+<li>Modernize LANGUAGE.HOWTO [<a href="https://github.com/doxygen/doxygen/commit/6414dcc8fe57d2e0cd3bd3e4167b836d66e7303e">view</a>]</li>
+<li>Move editbin logic to a separate cmake file [<a href="https://github.com/doxygen/doxygen/commit/a627cf8eb6b068f74dc400318e8083ee10a9f941">view</a>]</li>
+<li>Moving punctuation dependency to translator [<a href="https://github.com/doxygen/doxygen/commit/29de244d9027a79e3eb381355eba598b9760b207">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/6d867aff4759e27df0484515775f76cd88badcb9">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/8e0e2cc77c4bd094ce35ebf24c6bb9ffb3b59382">view</a>]</li>
+<li>Prevent running coverity scan when no commit are made [<a href="https://github.com/doxygen/doxygen/commit/e982244ae0f1f3efabb7358350dae0ceec6924aa">view</a>]</li>
+<li>Problem compiling under Cygwin [<a href="https://github.com/doxygen/doxygen/commit/f43f7b2b42269b210b2407a0861c21cbde879614">view</a>]</li>
+<li>QCString: make str() accessor return a const& [<a href="https://github.com/doxygen/doxygen/commit/652eeb3e3afb6866b686aac3bff8ec448543fa3e">view</a>]</li>
+<li>QCString: slightly faster mid [<a href="https://github.com/doxygen/doxygen/commit/da1e3a55212ad14effc0f8feacb2ed69aed17237">view</a>]</li>
+<li>Reduce number of calls into visited map [<a href="https://github.com/doxygen/doxygen/commit/2951d19f2da16f47387cd139d779f643b31e61f3">view</a>]</li>
+<li>Reduced code duplication, optimized performance [<a href="https://github.com/doxygen/doxygen/commit/6b2d43c46e5a438ce19e5659b1dda7c0be2ed5c8">view</a>], and [<a href="https://github.com/doxygen/doxygen/commit/b1f80f0ebe11de77a14a48ac48054cd4bcbf8e66">view</a>]</li>
+<li>Refactoring: Moved duplicated functionality into BufStr [<a href="https://github.com/doxygen/doxygen/commit/ccf63a98c6546beace01b5c93608d6feef3acde1">view</a>]</li>
+<li>Refactoring: clean up destructors [<a href="https://github.com/doxygen/doxygen/commit/24e6b6d307efd3dc03c141f834f6c9e3ec1fff85">view</a>]</li>
+<li>Refactoring: implement visitors using std::visit and std::variant [<a href="https://github.com/doxygen/doxygen/commit/4f2fc757546bcd486d8c212a03e683c39edc8c32">view</a>]</li>
+<li>Refactoring: reimplemented tagreader structures [<a href="https://github.com/doxygen/doxygen/commit/e3cd97e904f57c13564facfbc5856ce813ad4acc">view</a>]</li>
+<li>Refactoring: remove unneeded class OutputDocInterface [<a href="https://github.com/doxygen/doxygen/commit/ba02563c30124d4b5a3ac8aa2d32b6ef0582e977">view</a>]</li>
+<li>Refactoring: replace custom variant class by std::variant [<a href="https://github.com/doxygen/doxygen/commit/d280c603c0141070e09a0e79ccb4c0855de85b92">view</a>]</li>
+<li>Refactoring: replace old style casts [<a href="https://github.com/doxygen/doxygen/commit/446038e8e475bfd17836163d26e0d58c40a5fdbb">view</a>], [<a href="https://github.com/doxygen/doxygen/commit/d9bc62b9316f5da492f3f19d22e818489a9f634c">view</a>], and [<a href="https://github.com/doxygen/doxygen/commit/a4688ad1685087c42213c87629be7cb8a0e0a8b0">view</a>]</li>
+<li>Refactoring: split docparser [<a href="https://github.com/doxygen/doxygen/commit/1f71539b6e9282f005d24f0f801857976ff088d7">view</a>]</li>
+<li>Reference to non existing anchor with "More..." [<a href="https://github.com/doxygen/doxygen/commit/f33248f625f6201d23354f8288f8aa93148fc308">view</a>]</li>
+<li>Reinstate warnings about stale translations [<a href="https://github.com/doxygen/doxygen/commit/69c08865ebfb724f9a1e160da012b603a3dff35c">view</a>]</li>
+<li>Remove retrieval of the process count for tests [<a href="https://github.com/doxygen/doxygen/commit/84fcea9c217ce3329562cb27fcbbb1f6dd9e6bf8">view</a>]</li>
+<li>Removed unused function in configgen.py [<a href="https://github.com/doxygen/doxygen/commit/3993f4dce1d1649556e0f0d6b3a353380153d4e2">view</a>]</li>
+<li>Removing obsolete functions [<a href="https://github.com/doxygen/doxygen/commit/f290f81da9ab9353cd60f46f4c2f92b7a7d24ab8">view</a>]</li>
+<li>Replace static Config_Get... by just Config_get... [<a href="https://github.com/doxygen/doxygen/commit/a07ca8b68afa3ee72230c1b1c4635f08e7b150bc">view</a>]</li>
+<li>Replaced DocNode::kind() by dynamic_cast checks [<a href="https://github.com/doxygen/doxygen/commit/fcadb697534eef370f563d89f04ad32cd9ba5b97">view</a>]</li>
+<li>Replaced conditional sections by adapter and fixed some signals [<a href="https://github.com/doxygen/doxygen/commit/5238029f7cb168ee98b450f46f27ffa1e2e677a3">view</a>]</li>
+<li>Simplified documentation and implementation a bit [<a href="https://github.com/doxygen/doxygen/commit/690b49209ecc6a8af3159da14a1adade85824ee1">view</a>]</li>
+<li>Split of javascript search index into separate files [<a href="https://github.com/doxygen/doxygen/commit/3f2fb8942e9ceddc1005e81d0d56659ed0ab50c6">view</a>]</li>
+<li>Trace statement in markdown.cpp [<a href="https://github.com/doxygen/doxygen/commit/5f8394900986e921e2f2ac9ee5abdce535f8d917">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/b8e078db5240ebb3992da710acdfba3e15cc13ab">view</a>]</li>
+<li>Uniform retrieval file definition [<a href="https://github.com/doxygen/doxygen/commit/115fb315b7c0a6e6dced3e968a4db896c0f09961">view</a>]</li>
+<li>Uniform retrieval of language code by means of translator unit [<a href="https://github.com/doxygen/doxygen/commit/c66a5bf4bbb501e40682cf5b0cecc35252a67ff1">view</a>]</li>
+<li>clarify what the last comments in man refer to [<a href="https://github.com/doxygen/doxygen/commit/77a76e5316c2548ef5e3fd6c92d372b7c5af0504">view</a>]</li>
+<li>optional command variables and align mkidx and latex command approaches [<a href="https://github.com/doxygen/doxygen/commit/20b78586a30919b5dc1956faa99fa68dc8603567">view</a>]</li>
+<li>pass const& of LinkedRefMap to prevent creating temporary copies [<a href="https://github.com/doxygen/doxygen/commit/f5057a2ae57615993cd9d835b985b3f382d9a6e9">view</a>]</li>
+</ul>
+<p>
+\endhtmlonly
+
\subsection log_1_9_3 Release 1.9.3
\htmlonly
<b>(release date 31-12-2021)</b>
<li>bug_791832 [<a href="https://github.com/doxygen/doxygen/commit/42912711ea3d7bb2fa0a7aa1871a13b2de2e9989">view</a>]</li>
<li>bug_792690 Spaces MAKEINDEX_CMD_NAME don't work the same as other config options [<a href="https://github.com/doxygen/doxygen/commit/f5e6c90a978777e3426db7d8d894b26f50484580">view</a>]</li>
<li>bug_796673 doxygen markdown engine disallow parentheses in image title [<a href="https://github.com/doxygen/doxygen/commit/cf2bf5c164f3f569fcf2682ff5ac077caa302093">view</a>]</li>
-<li>issue #7434 Error in LaTeX output of doxygen documentation of VHDL [<a href="https://github.com/doxygen/doxygen/commit/6743b2fd418b433fe3835900a95055e454468217">view</a>]</li>
-<li>issue #7687 Write directory dependency graphs recursively. [<a href="https://github.com/doxygen/doxygen/commit/6fee7e8650c8eec32990fbb714ddc43bf2aa6c34">view</a>]</li>
-<li>issue #7807 Incorrect handling of triple backticks with specifying language. [<a href="https://github.com/doxygen/doxygen/commit/48888bf7e47fa8fb3258aa38f0a558682858a396">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/a7d403098bddff8c0feca6c562ba05f03b5ab2ae">view</a>]</li>
-<li>issue #8528 Markdown links to Markdown pages with explicit page command are broken [<a href="https://github.com/doxygen/doxygen/commit/a36c9943ffe2e64954c1370a6bd9ce33aaf54cec">view</a>]</li>
-<li>issue #8590 XML: Issue with spacing around <programlisting> [<a href="https://github.com/doxygen/doxygen/commit/6c5b9295509e9cf189c91f9d1cabf41249dbd4bb">view</a>]</li>
-<li>issue #8724 @ingroup not working with concepts [<a href="https://github.com/doxygen/doxygen/commit/20fd82817cb91f9d8fdbfa5c636a176f17320b7d">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/93ab156f1ee4546396e04a3c7f4d13f74691fe8e">view</a>]</li>
-<li>issue #8726 Confused by C++20 trailing requires-clause [<a href="https://github.com/doxygen/doxygen/commit/4bf942faa3128099a4fbc47162e11b0545487fd5">view</a>]</li>
-<li>issue #8730 Read from invalid IncludeInfo object (version 1.9.2, Ubuntu 20.04) [<a href="https://github.com/doxygen/doxygen/commit/afd308219d0f0ac764fe56922c3f492a2772fa13">view</a>]</li>
-<li>issue #8734 @note with @parblock within a table data cell breaks the HTML output [<a href="https://github.com/doxygen/doxygen/commit/f3a396295800e17896bab0cf2c17b9d6d433c3b3">view</a>]</li>
-<li>issue #8738 Fixed sizes in project area of HTML output [<a href="https://github.com/doxygen/doxygen/commit/47dec8a1c3ed4468ec36be103bf0aa5d682c6040">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/815aebca80369b6ad9bcdfd075c72ab74c1f8f19">view</a>]</li>
-<li>issue #8743 <tt> missinterpreted [<a href="https://github.com/doxygen/doxygen/commit/0629f588a634b76e9fbad96e20d31d6900d26603">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/ec8f340cda0b391a14253cad202f40c7ffe4e1ca">view</a>]</li>
-<li>issue #8747 Improve output with WARN_AS_ERROR = FAIL_ON_WARNINGS [<a href="https://github.com/doxygen/doxygen/commit/174e23565a50b0b8dc333ff16a40de93b62793f1">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/bce44eef3037114760aa242362122b024536220d">view</a>]</li>
-<li>issue #8750 Crashes with 1.9.2 on Ubuntu 21.04 [<a href="https://github.com/doxygen/doxygen/commit/04d9e4c78389265a6e02e1c5fa221dab6eef81cf">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/1a2744d0cca9f5b1f2cfa749f6d004a376a6ee02">view</a>]</li>
-<li>issue #8752 Generated filenames depend on undefined behaviour - doxygen output not reproducible [<a href="https://github.com/doxygen/doxygen/commit/44e27fa3eac7658f93571a9b9556fd65400f85af">view</a>]</li>
-<li>issue #8753 qhp file corrupt when subsection with no parent section [<a href="https://github.com/doxygen/doxygen/commit/c6861973edb147d261ed9375a115a45ce81c4ea8">view</a>]</li>
-<li>issue #8755 :: lost in nested names when using markdown [<a href="https://github.com/doxygen/doxygen/commit/dd97018dca2f2c118cd0f813392ed81b1a98b2f4">view</a>]</li>
-<li>issue #8757 Segfault when using external search engine [<a href="https://github.com/doxygen/doxygen/commit/2b76fc789be10c82922bb687591ee39fda92e425">view</a>]</li>
-<li>issue #8767 Order of pages in the tree view changes from 1.9.1 to 1.9.2 [<a href="https://github.com/doxygen/doxygen/commit/8ee309708beb0a410e56fb4133849ed8197d3bcf">view</a>]</li>
-<li>issue #8785 Markdown runs on <PRE> if class attribute is specified [<a href="https://github.com/doxygen/doxygen/commit/29c0286f879812a08c7203d3d02fb039eea082b6">view</a>]</li>
-<li>issue #8789 qhp/qch broken in master [<a href="https://github.com/doxygen/doxygen/commit/89afdcc22e2f18962c067eb8e641506c826b5a9a">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/fed7b6ffb2f8007bd6155017f9edd7256f0940de">view</a>]</li>
-<li>issue #8802 Nested \cond sections are not started (#8804) [<a href="https://github.com/doxygen/doxygen/commit/ee8f3fb7a2ed74ee30ae3202707617e97f6641ff">view</a>]</li>
-<li>issue #8811 Incorrect xml tags in source code listing (XML output) [<a href="https://github.com/doxygen/doxygen/commit/1f2097e81af7d2b6f22863b3f3fafc792ff68629">view</a>]</li>
-<li>issue #8815 fix group close [<a href="https://github.com/doxygen/doxygen/commit/e0147ebc533ba75ad2fcd518a5be6ef8b174dacc">view</a>]</li>
-<li>issue #8817 If \if, \else or \endif is in a list, the subsequent list entry is not formatted as list entry but in "raw format" [<a href="https://github.com/doxygen/doxygen/commit/6f26d1fabb982ddecbf889dcaf7f358fb77305d1">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/8e57e86fc882c11cf040edd85fa36b3444136736">view</a>]</li>
-<li>issue #8838 export "something" { } wrong parsing [<a href="https://github.com/doxygen/doxygen/commit/1cf26658b7dc6c4e16acbcc2c912fea4acbd39c5">view</a>]</li>
-<li>issue #8851 Python call graph is not completely correct [<a href="https://github.com/doxygen/doxygen/commit/b614cedd61218caf9902ba6779871520ba102813">view</a>]</li>
-<li>issue #8853 LaTeX generated output fails to compile [<a href="https://github.com/doxygen/doxygen/commit/79ee7e60f69db208d6a22662adf752b24016351a">view</a>]</li>
-<li>issue #8854 Class hierarchy diagram is not correct, if inherited from Python built-in class ABC [<a href="https://github.com/doxygen/doxygen/commit/6e7c2861eeaad89c8c9b79241689a3ee3ede2f20">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/9ef185a76bd6e8fd40b2fe14405ae8c1ea500156">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/e9b2a97863881c6fce0836bb61863b1160178d57">view</a>]</li>
-<li>issue #8854 Class hierarchy diagram is not correct, if inherited from Python built-in class ABC [<a href="https://github.com/doxygen/doxygen/commit/be7752e5e273321089bac4f07f66d0305580f837">view</a>]</li>
-<li>issue #8855 Unable to build 1.9.2 [<a href="https://github.com/doxygen/doxygen/commit/5c3a4ad2773fc911b341b36b00528603afbe1602">view</a>]</li>
-<li>issue #8864 Markdown Tables cannot merge cells both horizontally and vertically [<a href="https://github.com/doxygen/doxygen/commit/ce5421c3709a7d225e964226ee178b24e251c130">view</a>]</li>
-<li>issue #8867 Fortran source file that contains the character literal "import" or 'import' [<a href="https://github.com/doxygen/doxygen/commit/53ee06da134bce394f854ea691dd39e673ca0d29">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/ed749f55f4dbf9c911ddf585676f0f39e17f5b6f">view</a>]</li>
-<li>issue #8882 Java: Issue with virtual as identifier [<a href="https://github.com/doxygen/doxygen/commit/18c18e680f3938554ffeeedac029d10d3670f364">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/84e13392fb5a70d84ede80df65241963561d1933">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/da6dc3d35718d6d6c186540fb87ce4b2cdb6fb1c">view</a>]</li>
-<li>issue #8884 Java: Issue with dotted annotations [<a href="https://github.com/doxygen/doxygen/commit/fcf8823a132ed47c436acbe267fdc731df848b65">view</a>]</li>
-<li>issue #8889 ".html_html" attached to some url links when linking to external library [<a href="https://github.com/doxygen/doxygen/commit/f6c66d9e5d703733e5da7c4c0b15323bbe7eb722">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/fce99519dbc4571f5191fe61bcaeffbbce9a2949">view</a>]</li>
-<li>issue #8889 Extra ".html" attached to some url links when linking to external library [<a href="https://github.com/doxygen/doxygen/commit/4cca8d10c2fc18f390c8e4811535fae507dc7e8b">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/be62dae734e5c84e16959eb1aec0b1be9c241aa0">view</a>]</li>
-<li>issue #8895 [bisected]Directory dependency graph has stopped working [<a href="https://github.com/doxygen/doxygen/commit/bc9031924d0e8e8ae964ee7c5450be78b3abc3d5">view</a>]</li>
-<li>issue #8898 c#: Inherit documentation from interface property (not working as no docs displayed) [<a href="https://github.com/doxygen/doxygen/commit/fad9afdf78aedd968d8b8ebb00aae29e93a362ab">view</a>]</li>
-<li>issue #8903 Overload of function template can cause docs to be repeated [<a href="https://github.com/doxygen/doxygen/commit/566284bf3971c77283e02465129055a401a9f631">view</a>]</li>
-<li>issue #8905 Documentation: WARN_NO_PARAMDOC not disabled by EXTRACT_ALL? [<a href="https://github.com/doxygen/doxygen/commit/0377430a85d0fbced3092e3ddd52c8fe3dde47dd">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/137e97587926eef120009cc9008e37198ef76fc1">view</a>]</li>
-<li>issue #8909 Build error with git head GCC (version 12, Nov 2021) [<a href="https://github.com/doxygen/doxygen/commit/f0e049e546f15b3fcdae987b86858de409da5516">view</a>]</li>
-<li>issue #8911 Undocumented function with C++ requires clause [<a href="https://github.com/doxygen/doxygen/commit/e55dae5c9bca0a95934fe7c3c6dbba9c63142c92">view</a>]</li>
-<li>issue #8914 Double Square Bracket – somewhere – stop Doxygen [<a href="https://github.com/doxygen/doxygen/commit/78929f9919f134fc6d7cb2166ed8aab2cbf28588">view</a>]</li>
-<li>issue #8918 \emoji does not support emoji with ZWJ [<a href="https://github.com/doxygen/doxygen/commit/50e31fffcb3ccf9403a8c48b427d2876f137b23b">view</a>]</li>
-<li>issue #8921 Overloaded function (with templates as change) is not displayed in html page [<a href="https://github.com/doxygen/doxygen/commit/225160928d545c0768842558624aa654f6fab906">view</a>]</li>
-<li>issue #8924 Horizontal scroll bar missing in HTML for wide class="dotgraph" objects [<a href="https://github.com/doxygen/doxygen/commit/590198b416cd53313d150428d2f912586065ea0d">view</a>]</li>
-<li>issue #8925 Java: Issue with enum parsing (xml output) [<a href="https://github.com/doxygen/doxygen/commit/4651b949112d5086dc12b403ac1d55d93406df1b">view</a>]</li>
-<li>issue #8932 XML output: table caption doesn't have ID [<a href="https://github.com/doxygen/doxygen/commit/58b39b6505012709786d998ac597775e0e63b2eb">view</a>]</li>
-<li>issue #8933 Return type "unsigned int constexpr" not parsed properly [<a href="https://github.com/doxygen/doxygen/commit/078a4bb89f3d995c802ab512bd7e03cd444793b5">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/fe6c5d3191d14a079e694333c3e55ce33ecc677e">view</a>]</li>
-<li>issue #8934 documentation 'DEP' s.b. 'DEB' [<a href="https://github.com/doxygen/doxygen/commit/2faa40f914b3070ba8ed7ed429af7781b5887103">view</a>]</li>
-<li>issue #8935 'make docs' fails when building PDF [<a href="https://github.com/doxygen/doxygen/commit/71bc09e2e47bab26619f0067133b7cf604ccd933">view</a>]</li>
-<li>issue #8940 Not parsing #if correctly in C++ [<a href="https://github.com/doxygen/doxygen/commit/aaa48c8a451951148750a11c7992c55c0a605fd6">view</a>]</li>
-<li>issue #8948 collaboration diagram should include smart pointer members [<a href="https://github.com/doxygen/doxygen/commit/5f3730769399fbbb82cbebb77e3b0bab3600095b">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/e64a05126d4393c111d9fb9872a76b33371272e8">view</a>]</li>
-<li>issue #8953 Improve markdown image handling [<a href="https://github.com/doxygen/doxygen/commit/5bb622158e33aac19d23068c08f434aaced60b4c">view</a>]</li>
-<li>issue #8956 Section links in markdown mainpage not working [<a href="https://github.com/doxygen/doxygen/commit/3a4db857340aeff18dcd57291e036809a0273449">view</a>]</li>
-<li>issue #8965 Allow other names for plantuml.jar [<a href="https://github.com/doxygen/doxygen/commit/9dd215f0404dfe4d8c869e95de904a37f1878b18">view</a>]</li>
-<li>issue #8973 Incorrect citations for entries with double dash and for cross references [<a href="https://github.com/doxygen/doxygen/commit/f03ccd841357324a4ab5440f055e405e671e6371">view</a>]</li>
-<li>issue #9857 C# incorrect interpretation of '?'-operators [<a href="https://github.com/doxygen/doxygen/commit/57b531137ad0a6106c77c2dc57c1249c6e3ad6b9">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/7434">#7434</a> Error in LaTeX output of doxygen documentation of VHDL [<a href="https://github.com/doxygen/doxygen/commit/6743b2fd418b433fe3835900a95055e454468217">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/7687">#7687</a> Write directory dependency graphs recursively. [<a href="https://github.com/doxygen/doxygen/commit/6fee7e8650c8eec32990fbb714ddc43bf2aa6c34">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/7807">#7807</a> Incorrect handling of triple backticks with specifying language. [<a href="https://github.com/doxygen/doxygen/commit/48888bf7e47fa8fb3258aa38f0a558682858a396">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/a7d403098bddff8c0feca6c562ba05f03b5ab2ae">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8528">#8528</a> Markdown links to Markdown pages with explicit page command are broken [<a href="https://github.com/doxygen/doxygen/commit/a36c9943ffe2e64954c1370a6bd9ce33aaf54cec">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8590">#8590</a> XML: Issue with spacing around <programlisting> [<a href="https://github.com/doxygen/doxygen/commit/6c5b9295509e9cf189c91f9d1cabf41249dbd4bb">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8724">#8724</a> @ingroup not working with concepts [<a href="https://github.com/doxygen/doxygen/commit/20fd82817cb91f9d8fdbfa5c636a176f17320b7d">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/93ab156f1ee4546396e04a3c7f4d13f74691fe8e">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8726">#8726</a> Confused by C++20 trailing requires-clause [<a href="https://github.com/doxygen/doxygen/commit/4bf942faa3128099a4fbc47162e11b0545487fd5">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8730">#8730</a> Read from invalid IncludeInfo object (version 1.9.2, Ubuntu 20.04) [<a href="https://github.com/doxygen/doxygen/commit/afd308219d0f0ac764fe56922c3f492a2772fa13">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8734">#8734</a> @note with @parblock within a table data cell breaks the HTML output [<a href="https://github.com/doxygen/doxygen/commit/f3a396295800e17896bab0cf2c17b9d6d433c3b3">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8738">#8738</a> Fixed sizes in project area of HTML output [<a href="https://github.com/doxygen/doxygen/commit/47dec8a1c3ed4468ec36be103bf0aa5d682c6040">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/815aebca80369b6ad9bcdfd075c72ab74c1f8f19">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8743">#8743</a> <tt> missinterpreted [<a href="https://github.com/doxygen/doxygen/commit/0629f588a634b76e9fbad96e20d31d6900d26603">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/ec8f340cda0b391a14253cad202f40c7ffe4e1ca">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8747">#8747</a> Improve output with WARN_AS_ERROR = FAIL_ON_WARNINGS [<a href="https://github.com/doxygen/doxygen/commit/174e23565a50b0b8dc333ff16a40de93b62793f1">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/bce44eef3037114760aa242362122b024536220d">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8750">#8750</a> Crashes with 1.9.2 on Ubuntu 21.04 [<a href="https://github.com/doxygen/doxygen/commit/04d9e4c78389265a6e02e1c5fa221dab6eef81cf">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/1a2744d0cca9f5b1f2cfa749f6d004a376a6ee02">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8752">#8752</a> Generated filenames depend on undefined behaviour - doxygen output not reproducible [<a href="https://github.com/doxygen/doxygen/commit/44e27fa3eac7658f93571a9b9556fd65400f85af">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8753">#8753</a> qhp file corrupt when subsection with no parent section [<a href="https://github.com/doxygen/doxygen/commit/c6861973edb147d261ed9375a115a45ce81c4ea8">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8755">#8755</a> :: lost in nested names when using markdown [<a href="https://github.com/doxygen/doxygen/commit/dd97018dca2f2c118cd0f813392ed81b1a98b2f4">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8757">#8757</a> Segfault when using external search engine [<a href="https://github.com/doxygen/doxygen/commit/2b76fc789be10c82922bb687591ee39fda92e425">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8767">#8767</a> Order of pages in the tree view changes from 1.9.1 to 1.9.2 [<a href="https://github.com/doxygen/doxygen/commit/8ee309708beb0a410e56fb4133849ed8197d3bcf">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8785">#8785</a> Markdown runs on <PRE> if class attribute is specified [<a href="https://github.com/doxygen/doxygen/commit/29c0286f879812a08c7203d3d02fb039eea082b6">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8789">#8789</a> qhp/qch broken in master [<a href="https://github.com/doxygen/doxygen/commit/89afdcc22e2f18962c067eb8e641506c826b5a9a">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/fed7b6ffb2f8007bd6155017f9edd7256f0940de">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8802">#8802</a> Nested \cond sections are not started (#8804) [<a href="https://github.com/doxygen/doxygen/commit/ee8f3fb7a2ed74ee30ae3202707617e97f6641ff">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8811">#8811</a> Incorrect xml tags in source code listing (XML output) [<a href="https://github.com/doxygen/doxygen/commit/1f2097e81af7d2b6f22863b3f3fafc792ff68629">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8815">#8815</a> fix group close [<a href="https://github.com/doxygen/doxygen/commit/e0147ebc533ba75ad2fcd518a5be6ef8b174dacc">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8817">#8817</a> If \if, \else or \endif is in a list, the subsequent list entry is not formatted as list entry but in "raw format" [<a href="https://github.com/doxygen/doxygen/commit/6f26d1fabb982ddecbf889dcaf7f358fb77305d1">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/8e57e86fc882c11cf040edd85fa36b3444136736">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8838">#8838</a> export "something" { } wrong parsing [<a href="https://github.com/doxygen/doxygen/commit/1cf26658b7dc6c4e16acbcc2c912fea4acbd39c5">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8851">#8851</a> Python call graph is not completely correct [<a href="https://github.com/doxygen/doxygen/commit/b614cedd61218caf9902ba6779871520ba102813">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8853">#8853</a> LaTeX generated output fails to compile [<a href="https://github.com/doxygen/doxygen/commit/79ee7e60f69db208d6a22662adf752b24016351a">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8854">#8854</a> Class hierarchy diagram is not correct, if inherited from Python built-in class ABC [<a href="https://github.com/doxygen/doxygen/commit/6e7c2861eeaad89c8c9b79241689a3ee3ede2f20">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/9ef185a76bd6e8fd40b2fe14405ae8c1ea500156">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/e9b2a97863881c6fce0836bb61863b1160178d57">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8854">#8854</a> Class hierarchy diagram is not correct, if inherited from Python built-in class ABC [<a href="https://github.com/doxygen/doxygen/commit/be7752e5e273321089bac4f07f66d0305580f837">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8855">#8855</a> Unable to build 1.9.2 [<a href="https://github.com/doxygen/doxygen/commit/5c3a4ad2773fc911b341b36b00528603afbe1602">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8864">#8864</a> Markdown Tables cannot merge cells both horizontally and vertically [<a href="https://github.com/doxygen/doxygen/commit/ce5421c3709a7d225e964226ee178b24e251c130">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8867">#8867</a> Fortran source file that contains the character literal "import" or 'import' [<a href="https://github.com/doxygen/doxygen/commit/53ee06da134bce394f854ea691dd39e673ca0d29">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/ed749f55f4dbf9c911ddf585676f0f39e17f5b6f">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8882">#8882</a> Java: Issue with virtual as identifier [<a href="https://github.com/doxygen/doxygen/commit/18c18e680f3938554ffeeedac029d10d3670f364">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/84e13392fb5a70d84ede80df65241963561d1933">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/da6dc3d35718d6d6c186540fb87ce4b2cdb6fb1c">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8884">#8884</a> Java: Issue with dotted annotations [<a href="https://github.com/doxygen/doxygen/commit/fcf8823a132ed47c436acbe267fdc731df848b65">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8889">#8889</a> ".html_html" attached to some url links when linking to external library [<a href="https://github.com/doxygen/doxygen/commit/f6c66d9e5d703733e5da7c4c0b15323bbe7eb722">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/fce99519dbc4571f5191fe61bcaeffbbce9a2949">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8889">#8889</a> Extra ".html" attached to some url links when linking to external library [<a href="https://github.com/doxygen/doxygen/commit/4cca8d10c2fc18f390c8e4811535fae507dc7e8b">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/be62dae734e5c84e16959eb1aec0b1be9c241aa0">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8895">#8895</a> [bisected]Directory dependency graph has stopped working [<a href="https://github.com/doxygen/doxygen/commit/bc9031924d0e8e8ae964ee7c5450be78b3abc3d5">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8898">#8898</a> c#: Inherit documentation from interface property (not working as no docs displayed) [<a href="https://github.com/doxygen/doxygen/commit/fad9afdf78aedd968d8b8ebb00aae29e93a362ab">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8903">#8903</a> Overload of function template can cause docs to be repeated [<a href="https://github.com/doxygen/doxygen/commit/566284bf3971c77283e02465129055a401a9f631">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8905">#8905</a> Documentation: WARN_NO_PARAMDOC not disabled by EXTRACT_ALL? [<a href="https://github.com/doxygen/doxygen/commit/0377430a85d0fbced3092e3ddd52c8fe3dde47dd">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/137e97587926eef120009cc9008e37198ef76fc1">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8909">#8909</a> Build error with git head GCC (version 12, Nov 2021) [<a href="https://github.com/doxygen/doxygen/commit/f0e049e546f15b3fcdae987b86858de409da5516">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8911">#8911</a> Undocumented function with C++ requires clause [<a href="https://github.com/doxygen/doxygen/commit/e55dae5c9bca0a95934fe7c3c6dbba9c63142c92">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8914">#8914</a> Double Square Bracket – somewhere – stop Doxygen [<a href="https://github.com/doxygen/doxygen/commit/78929f9919f134fc6d7cb2166ed8aab2cbf28588">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8918">#8918</a> \emoji does not support emoji with ZWJ [<a href="https://github.com/doxygen/doxygen/commit/50e31fffcb3ccf9403a8c48b427d2876f137b23b">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8921">#8921</a> Overloaded function (with templates as change) is not displayed in html page [<a href="https://github.com/doxygen/doxygen/commit/225160928d545c0768842558624aa654f6fab906">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8924">#8924</a> Horizontal scroll bar missing in HTML for wide class="dotgraph" objects [<a href="https://github.com/doxygen/doxygen/commit/590198b416cd53313d150428d2f912586065ea0d">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8925">#8925</a> Java: Issue with enum parsing (xml output) [<a href="https://github.com/doxygen/doxygen/commit/4651b949112d5086dc12b403ac1d55d93406df1b">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8932">#8932</a> XML output: table caption doesn't have ID [<a href="https://github.com/doxygen/doxygen/commit/58b39b6505012709786d998ac597775e0e63b2eb">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8933">#8933</a> Return type "unsigned int constexpr" not parsed properly [<a href="https://github.com/doxygen/doxygen/commit/078a4bb89f3d995c802ab512bd7e03cd444793b5">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/fe6c5d3191d14a079e694333c3e55ce33ecc677e">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8934">#8934</a> documentation 'DEP' s.b. 'DEB' [<a href="https://github.com/doxygen/doxygen/commit/2faa40f914b3070ba8ed7ed429af7781b5887103">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8935">#8935</a> 'make docs' fails when building PDF [<a href="https://github.com/doxygen/doxygen/commit/71bc09e2e47bab26619f0067133b7cf604ccd933">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8940">#8940</a> Not parsing #if correctly in C++ [<a href="https://github.com/doxygen/doxygen/commit/aaa48c8a451951148750a11c7992c55c0a605fd6">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8948">#8948</a> collaboration diagram should include smart pointer members [<a href="https://github.com/doxygen/doxygen/commit/5f3730769399fbbb82cbebb77e3b0bab3600095b">view</a>], [<a href="http://github.com/doxygen/doxygen/commit/e64a05126d4393c111d9fb9872a76b33371272e8">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8953">#8953</a> Improve markdown image handling [<a href="https://github.com/doxygen/doxygen/commit/5bb622158e33aac19d23068c08f434aaced60b4c">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8956">#8956</a> Section links in markdown mainpage not working [<a href="https://github.com/doxygen/doxygen/commit/3a4db857340aeff18dcd57291e036809a0273449">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8965">#8965</a> Allow other names for plantuml.jar [<a href="https://github.com/doxygen/doxygen/commit/9dd215f0404dfe4d8c869e95de904a37f1878b18">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/8973">#8973</a> Incorrect citations for entries with double dash and for cross references [<a href="https://github.com/doxygen/doxygen/commit/f03ccd841357324a4ab5440f055e405e671e6371">view</a>]</li>
+<li>issue <a href="https://github.com/doxygen/doxygen/issues/9857">#9857</a> C# incorrect interpretation of '?'-operators [<a href="https://github.com/doxygen/doxygen/commit/57b531137ad0a6106c77c2dc57c1249c6e3ad6b9">view</a>]</li>
<li>Coloring of the nodes in the inheritance graph [<a href="https://github.com/doxygen/doxygen/commit/2ef002d0524ae060123eea88b225b83ac63addb7">view</a>]</li>
<li>Fixed problem with large HTML tooltips running of the web page. [<a href="https://github.com/doxygen/doxygen/commit/a179fde5bf00f8639f7fe5f69ac13b7e70270818">view</a>]</li>
<li>Coverity: logically dead code [<a href="https://github.com/doxygen/doxygen/commit/69b27d69a1bac6373e4ddada24c6459d6c5fc08a">view</a>]</li>
\section cmdraisewarning \\raisewarning ( text to be shown as warning )
\addindex \\raisewarning
- All the text, excluding the command, till the end of the line is is literally shown
+ All the text, excluding the command, till the end of the line is literally shown
as a documentation warning. The text, including the command, is removed from the output.
The command will most commonly be used in combination with \ref cfg_aliases "ALIASES"
to show a specific warning.
<namespace>
...
</namespace>
+ <concept>
+ ...
+ </concept>
<file>
...
</file>
documented classes, structs, unions, and interfaces.
- The \c namespace element represents the layout of all pages generated for
documented namespaces (and also Java packages).
+- The \c concept element represents the layout of all pages generated for
+ documented concepts.
- The \c file element represents the layout of all pages generated for
documented files.
- The \c group element represents the layout of all pages generated for
This should not be misinterpreted with the doxygen commands \ref cmdauthor
"\\author" or \ref cmdauthors "\\authors" that generate an author paragraph
inside a detailed description.
+</dl>
+The following generic elements are possible for each page except the concept page:
+<dl>
<dt>\c memberdecl
<dd>Represents the quick overview of members on a page (member declarations).
This elements has child elements per type of member list.
extracted.
</dl>
+The concept page has the following specific elements:
+<dl>
+<dt>\c includes
+ <dd>Represents the include file needed to obtain the definition for
+ this class.
+<dt>\c definition
+ <dd>Represents the definition of the concept
+</dl>
+
The file page has the following specific elements:
<dl>
<dt>\c includes
Make sure that the script is explicitly listed in the \ref cfg_input "INPUT" or
that \ref cfg_file_patterns "FILE_PATTERNS" includes the `.sh` extension and the
-the script can be found in the path set via \ref cfg_example_path "EXAMPLE_PATH".
+script can be found in the path set via \ref cfg_example_path "EXAMPLE_PATH".
\subsection pythonblocks Comment blocks in Python
.PP
You can use doxygen in a number of ways:
.TP
-1) Use doxygen to generate a template configuration file:
+1) Use doxygen to generate a template configuration file*:
.IP
doxygen [-s] \fB\-g\fR [configName]
-.TP
-2) Use doxygen to update an old configuration file:
+.TP
+2) Use doxygen to update an old configuration file*:
.IP
doxygen [-s] \fB\-u\fR [configName]
.TP
-3) Use doxygen to generate documentation using an existing configuration file:
+3) Use doxygen to generate documentation using an existing configuration file*:
.IP
doxygen [configName]
.TP
4) Use doxygen to generate a template file controlling the layout of the generated documentation:
.IP
-doxygen -l [layoutFileName]
+doxygen \fB\-l\fR [layoutFileName]
.IP
-In case layoutFileName is omitted layoutFileName.xml will be used as filename.
-If - is used for layoutFileName doxygen will write to standard output.
+.RS 0
+ In case layoutFileName is omitted DoxygenLayout.xml will be used as filename.
+ If - is used for layoutFileName doxygen will write to standard output.
+.RE
.TP
5) Use doxygen to generate a template style sheet file for RTF, HTML or Latex.
.IP
RTF:
doxygen \fB\-e\fR rtf extensionsFile
.IP
-If - is used for extensionsFile doxygen will write to standard output.
+.RS 0
+ If - is used for extensionsFile doxygen will write to standard output.
+.RE
.TP
7) Use doxygen to compare the used configuration file with the template configuration file
.IP
doxygen \fB\-x\fR [configFile]
.TP
+ Use doxygen to compare the used configuration file with the template configuration file
+.RS 0
+ without replacing the environment variables
+.RE
+.IP
+doxygen \fB\-x_noenv\fR [configFile]
+.TP
8) Use doxygen to show a list of built-in emojis.
.IP
doxygen \fB\-f\fR emoji outputFileName
.IP
-If - is used for outputFileName doxygen will write to standard output.
+.RS 0
+ If - is used for outputFileName doxygen will write to standard output.
+.RE
+.PP
+.RS 0
+*) If \fB\-s\fR is specified the comments of the configuration items in the config file will be omitted.
+ If configName is omitted 'Doxyfile' will be used as a default.
+ If - is used for configFile doxygen will write / read the configuration to /from standard output / input.
+.RE
+.PP
+If \fB\-q\fR is used for a doxygen documentation run, doxygen will see this as if QUIET=YES has been set.
+.PP
+\fB\-v\fR print version string, \fB\-V\fR print extended version information
+.PP
+\fB\-h\fR,\fB\-?\fR prints usage help information
+.PP
+doxygen \fB\-d\fR prints additional usage flags for debugging purposes
.PP
-If \fB\-s\fR is specified the comments in the config file will be omitted.
-If configName is omitted `Doxyfile' will be used as a default.
-If - is used for configFile doxygen will write / read the configuration to /from standard output / input.
.SH AUTHOR
-Doxygen version @VERSION@, Copyright Dimitri van Heesch 1997-2019
+Doxygen version @VERSION@, Copyright Dimitri van Heesch 1997-@YEAR@
.SH SEE ALSO
doxywizard(1).
text-align: center
}
+span.obfuscator {
+ display: none;
+}
/* @end */
file then you can use the optional \c -s option. This can use be
used in combination with the \c -u option, to add or strip the
documentation from an existing configuration file.
- Please use the \c -s option if you send me a configuration file
- as part of a bug report!
+ To get a minimal configuration file use the \c -x or \-x_noenv option to
+ show only the differences from the default doxygen configuration file.
+ Please use the \c -s or \c -x or \c -x_noenv option if you send me a
+ configuration file as part of a bug report or post an issue on GitHub!
+ (see also: \ref bug_reports "How to report a bug")
<li> To make doxygen read/write to standard input/output instead of from/to
a file, use \c - for the file name.
</ul>
called \c b.chm, the
link in \c a.chm must have the following format:
\verbatim
-<a href="b.chm::/file.html">
+<a href="mk:@MSITStore:b.chm::/file.html">
\endverbatim
Unfortunately this only works if both compressed HTML files are in the same
directory.
\c a.chm and the \c index.chm for project \e b into \c b.chm. In the
configuration file for project \e a you write:
\verbatim
-TAGFILES = b.tag=b.chm::
+TAGFILES = b.tag=mk:@MSITStore:b.chm::
\endverbatim
\section faq_html I don't like the quick index that is put above each HTML page, what do I do?
Doxygen is the de facto standard tool for generating documentation from
annotated C++ sources, but it also supports other popular programming
languages such as C, Objective-C, C#, PHP, Java, Python, IDL
-(Corba, Microsoft, and UNO/OpenOffice flavors), Fortran, VHDL and to some extent D.
+(Corba, Microsoft, and UNO/OpenOffice flavors), Fortran, and to some extent D.
+Doxygen also supports the hardware description language VHDL.
Doxygen can help you in three ways:
<ol>
<li>Qt Software's GUI toolkit
<a href="https://www.qt.io/developers">Qt</A>
\addindex Qt
- version 4.3 or higher (including Qt 5).
+ version 5.14 or higher (including Qt 6).
This is needed to build the GUI front-end doxywizard.
<li>A \LaTeX distribution: for instance
<a href="http://www.tug.org/interest.html#free">TeX Live</a>
<code>cmake</code> tries to determine the platform you use, and will look
for the requires tools. It will report if something is missing.
- If you have Qt-4.3 or higher installed and want to build the GUI
+ If you have Qt-5.14 or higher installed and want to build the GUI
front-end, you should enable it as follows:
cmake -Dbuild_wizard=YES ..
cmake can be downloaded from https://cmake.org/download/
\addindex cmake
-At the moment only the express version of Visual Studio 2015 and 2017 are tested,
+At the moment only the community version of Visual Studio 2019 is tested,
but other version might also work.
Alternatively, you can compile doxygen
nmake
\endverbatim
-Note that compiling Doxywizard requires Qt 4.3 or newer
+Note that compiling Doxywizard requires Qt 5.14 or newer
(see https://www.qt.io/developers).
Also read the next section for additional tools you may need to install to run
<li>Edit `doxygen/src/language.cpp`:
Add the following code:
\verbatim
-#ifdef LANG_XX
#include<translator_xx.h>
-#endif
\endverbatim
- Remember to use the same symbol `LANG_XX` that was added to `doxygen/src/lang_cfg.h`.
<p>Now, in <code>setTranslator()</code> add
\verbatim
-#ifdef LANG_XX
- else if (L_EQUAL("your_language_name"))
- {
- theTranslator = new TranslatorYourLanguage;
- }
-#endif
+ case OUTPUT_LANGUAGE_t::YourLanguage: theTranslator = new TranslatorYourLanguage; break;
\endverbatim
- after the <code>if { ... }</code>. I.e., it must be placed after the code
- for creating the English translator at the beginning, and before the
- <code>else { ... }</code> part that creates the translator for the
- default language (English again).
<li>Edit <code>doxygen/src/translator_xx.h</code>:
<ul>
<li>Use the UTF-8 capable editor and open the file using the UTF-8 mode.
<li>Build the documentation by giving the appropriate build command (like: `make docs`).
<li>Now you can use <code>OUTPUT_LANGUAGE = your_language_name</code>
in the config file to generate output in your language.
-<li>Send <code>translator_xx.h</code> to me so I can add it to doxygen.
+<li>The preferred way is to clone the doxygen repository at GitHub and make a Pull Request.
+ Alternatively send <code>translator_xx.h</code> to me so I can add it to doxygen.
Send also your name and e-mail address to be included in the
- \c maintainers.txt list. You can also clone the doxygen repository
- at GitHub and make a Pull Request later.
+ \c maintainers.txt list.
</ol>
The information is stored in the translator report ASCII file
(\c %(translatorReportFileName)s).
-\htmlonly If you compiled this documentation
-from sources and if you have also doxygen sources available the
-link %(translatorReportLink)s should be valid.\endhtmlonly
+\htmlonly You can find this file as %(translatorReportLink)s.\endhtmlonly
Looking at the base class of the language translator, the script
guesses also the status of the translator -- see the last column of
TranslatorBrazilian
Fabio "FJTC" Jun Takada Chino: jun-chino at uol dot com dot br
+TranslatorBulgarian
+Kiril Kirilov: kpkirilov at abv dot bg
+
TranslatorCatalan
Maximiliano Pin: max dot pin at bitroit dot com
Albert Mora: [unreachable] amora at iua dot upf dot es
TranslatorGreek
Paul Gessos: gessos dot paul at yahoo dot gr
+TranslatorHindi
+Harsh Rathod: hrathore50 at ymail dot com
+
TranslatorHungarian
Ákos Kiss: akiss at users dot sourceforge dot net
Földvári György: [unreachable] foldvari lost at cyberspace
TranslatorVietnamese
Dang Minh Tuan: tuanvietkey at gmail dot com
-
also a fenced code block
```
+For the image formats `dot`, `msc` and `plantuml` the fenced block will be shown as
+an image provided the image format is enabled (see \ref cfg_have_dot "HAVE_DOT" and
+\ref cfg_plantuml_jar_path "PLANTUML_JAR_PATH"), otherwise it is shown as plain code.
+
+Example:
+~~~~~~{.unparsed}
+```plantuml
+Alice -> Bob
+```
+~~~~~~
+or
+~~~~~~{.unparsed}
+```plantuml
+@startuml
+Alice -> Bob
+@enduml
+```
+~~~~~~
+
\subsection md_header_id Header Id Attributes
Standard Markdown has no support for labeling headers, which
<p>Please report any bugs or problems you find in the Perl Module
backend or the Perl Module-based \LaTeX generator to the
-doxygen-develop mailing list. Suggestions are welcome as well.
+<a href="https://github.com/doxygen/doxygen/issues">doxygen issue tracker</a>.
+Suggestions are welcome as well (see also: \ref bug_reports "How to report a bug").
\section using_perlmod_fmt Usage
-<p>When the \ref cfg_generate_perlmod "GENERATE_PERLMOD" tag is enabled in the Doxyfile,
+<p>When the \ref cfg_generate_perlmod "GENERATE_PERLMOD" tag is enabled in the `Doxyfile`,
running doxygen generates a number of files in the `perlmod/`
subdirectory of your output directory. These files are the following:
\ref doxymodel_format "below" for details.
<li>`doxyrules.make`: This file contains the make rules to build
-and clean the files that are generated from the Doxyfile. Also
+and clean the files that are generated from the `Doxyfile`. Also
contains the paths to those files and other relevant information. This
file is intended to be included by your own Makefile.
</ul>
-<p>To make use of the documentation stored in DoxyDocs.pm you can use
+<p>To make use of the documentation stored in `DoxyDocs.pm` you can use
one of the default Perl Module-based generators provided by doxygen
(at the moment this includes the Perl Module-based \LaTeX generator,
see \ref perlmod_latex "below") or write your own customized
<li>`doxylatex-template.pl`: This Perl script uses `DoxyModel.pm`
to generate `doxytemplate.tex`, a \TeX file defining default
-values for some macros. doxytemplate.tex is included by
+values for some macros. `doxytemplate.tex` is included by
doxyformat.tex to avoid the need of explicitly defining some macros.
<li>`doxylatex.tex`: This is a very simple \LaTeX document that
-loads some packages and includes doxyformat.tex and doxydocs.tex. This
+loads some packages and includes `doxyformat.tex` and `doxydocs.tex`. This
document is \LaTeX'ed to produce the PDF and DVI documentation by the
rules added to `doxyrules.make`.
<li>Set both \ref cfg_generate_perlmod "GENERATE_PERLMOD" and
\ref cfg_perlmod_latex "PERLMOD_LATEX" tags to
-\c YES in your Doxyfile.
+\c YES in your `Doxyfile`.
-<li>Run doxygen on your Doxyfile:
+<li>Run doxygen on your `Doxyfile`:
<pre>doxygen Doxyfile</pre>
\image html infoflow.png "Doxygen information flow"
\image latex infoflow.eps "Doxygen information flow" width=14cm
-\section step0 Step 0: Check if doxygen supports your programming language
+\section step0 Step 0: Check if doxygen supports your programming/hardware description language
-First, assure that your programming language has a reasonable chance of being
-recognized by doxygen. These languages are supported by default: C, C++, Lex, C#,
-Objective-C, IDL, Java, VHDL, PHP, Python, Fortran and D. It
-is possible to configure certain file type extensions to use certain parsers:
+First, assure that your programming/hardware description language has a reasonable chance of being
+recognized by doxygen. These programming languages are supported by default: C, C++, Lex, C#,
+Objective-C, IDL, Java, PHP, Python, Fortran and D. Doxygen also supports the hardware description
+language VHDL by default. It is possible to configure certain file type extensions to use certain parsers:
see the \ref cfg_extension_mapping "Configuration/ExtensionMappings" for details.
Also, completely different languages can be supported by using preprocessor
programs: see the <a href="https://www.doxygen.org/helpers.html">Helpers page</a>
else:\r
self.__unexpectedToken(status, tokenId, tokenLineNo)\r
\r
- elif status == 8: # zero expected\r
- if tokenId == 'num' and tokenStr == '0':\r
+ elif status == 8: # zero expected (or default for the destructor)\r
+ if (tokenId == 'num' and tokenStr == '0') or (tokenId == 'id' and tokenStr == 'default'):\r
status = 9\r
else:\r
self.__unexpectedToken(status, tokenId, tokenLineNo)\r
assert False\r
\r
assert(uniPrototype not in self.prototypeDic)\r
- # Insert new dictionary item.\r
- self.prototypeDic[uniPrototype] = prototype\r
+ # Insert new dictionary item, unless they have a default in translator.h\r
+ if (not (prototype=="virtual QCString latexDocumentPost()" or\r
+ prototype=="virtual QCString latexDocumentPre()" or\r
+ prototype=="virtual QCString latexCommandName()" or\r
+ prototype=="virtual QCString latexFont()" or\r
+ prototype=="virtual QCString latexFontenc()" or\r
+ prototype=="virtual bool needsPunctuation()")):\r
+ self.prototypeDic[uniPrototype] = prototype\r
status = 2 # body consumed\r
methodId = None # outside of any method\r
elif tokenId == 'lcurly':\r
"""Checks the modtime of files and generates language.doc."""\r
self.__loadMaintainers()\r
\r
+ # Check the last modification time of the VERSION file.\r
+ fVerName = os.path.join(self.org_doxy_path, "VERSION")\r
+ tim = os.path.getmtime(fVerName)\r
+ if tim > self.lastModificationTime:\r
+ self.lastModificationTime = tim\r
+\r
# Check the last modification time of the template file. It is the\r
# last file from the group that decide whether the documentation\r
# should or should not be generated.\r
tplDic['supportedLangReadableStr'] = self.supportedLangReadableStr\r
tplDic['translatorReportFileName'] = self.translatorReportFileName\r
\r
- ahref = '<a href="../doc/' + self.translatorReportFileName\r
- ahref += '"\n><code>doxygen/doc/' + self.translatorReportFileName\r
- ahref += '</code></a>'\r
+ ahref = '<a href="' + self.translatorReportFileName\r
+ ahref += '"\n><code>' + self.translatorReportFileName + '</code></a>'\r
tplDic['translatorReportLink'] = ahref\r
tplDic['numLangStr'] = str(self.numLang)\r
\r
/******************************************************************************
*
- *
+ *
*
* 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.
*
<li>Since it is impossible to test all possible code fragments, it is
very well possible, that some valid piece of C/C++ code is not handled
properly. If you find such a piece, please send it to me, so I can
- improve doxygen's parsing capabilities. Try to make the piece of code
+ improve doxygen's parsing capabilities. Try to make the piece of code
you send as small as possible, to help me narrow down the search.
<li>Doxygen does not work properly if there are multiple classes, structs
or unions with the same name in your code. It should not crash however,
rather it should ignore all of the classes with the same name except one.
<li>Some commands do not work inside the arguments of other commands.
- Inside a HTML link (i.e. \ref htmltag_A_HREF "\<A HREF=\"...\"\>"...\ref htmltag_endA "\</A\>") for instance
+ Inside a HTML link (i.e. \ref htmltag_A_HREF "\<A HREF=\"...\"\>"...\ref htmltag_endA "\</A\>") for instance
other commands (including other HTML commands) do not work!
- The sectioning commands are an important exception.
-<li>Redundant braces can confuse doxygen in some cases.
+ The sectioning commands are an important exception.
+<li>Redundant braces can confuse doxygen in some cases.
For example:
\verbatim
void f (int);
\verbatim
const int (a);
\endverbatim
- is also seen as a function declaration with name
+ is also seen as a function declaration with name
<code>int</code>, because only the syntax is analyzed,
not the semantics. If the redundant braces can be detected, as in
\verbatim
moment. I'll try to improve this in the future. But even with these
improvements not everything can be properly linked to the corresponding
documentation, because of possible ambiguities or lack of
- information about the context in which the code fragment is found.
-<li>It is not possible to insert a non-member function f in a class A
- using the \ref cmdrelates "\\relates" or \ref cmdrelatesalso "\\relatesalso"
+ information about the context in which the code fragment is found.
+<li>It is not possible to insert a non-member function f in a class A
+ using the \ref cmdrelates "\\relates" or \ref cmdrelatesalso "\\relatesalso"
command, if class A already
has a member with name f and the same argument list.
<li>There is only very limited support for member specialization at the
moment. It only works if there is a specialized template class as
well.
<li>Not all special commands are properly translated to RTF.
-<li>Version 1.8.6 of dot (and maybe earlier versions too) do not
+<li>Version 1.8.6 of dot (and maybe earlier versions too) do not
generate proper map files, causing the graphs that doxygen generates
not to be properly clickable.
-<li>PHP only: Doxygen requires that all PHP statements (i.e. code) is
+<li>PHP only: Doxygen requires that all PHP statements (i.e. code) is
wrapped in a functions/methods, otherwise you may run into parse problems.
</ul>
\section howtohelp How to Help
-The development of doxygen highly depends on your input!
+The development of doxygen highly depends on your input!
If you are trying doxygen let me know what you think of it (do you
miss certain features?). Even if you decide not to use it, please let me
-know why.
+know why.
\section bug_reports How to report a bug
Bugs are tracked in GitHub's <a href="https://github.com/doxygen/doxygen/issues">issue tracker</a>.
-Before submitting a
+Before submitting a
<a href="https://github.com/doxygen/doxygen/issues/new">new bug</a>,
first <a href="https://github.com/doxygen/doxygen/issues">search</a>
through the database if the same bug has already been submitted by others.
-If you believe you have found a new bug,
+If you believe you have found a new bug,
please <a href="https://github.com/doxygen/doxygen/issues/new">report it</a>.
If you are unsure whether or not something is a bug, please ask help first
at <a href="https://stackoverflow.com/questions/tagged/doxygen">Stack Overflow</a>
using the `doxygen` label.
-If you send only a (vague) description of a bug, you are usually not very
-helpful and it will cost me much more time to figure out what you mean.
+If you send only a (vague) description of a bug, you are usually not very
+helpful and it will cost me much more time to figure out what you mean.
In the worst-case your bug report may even be completely ignored by me, so
-always try to include the following information in your bug report:
-- The version of doxygen you are using (for instance 1.5.3, use
+always try to include the following information in your bug report:
+- The version of doxygen you are using (for instance 1.5.3, use
`doxygen --version` if you are not sure or `doxygen --Version` for a bit
more information).
-- The name and version number of your operating system (for instance
+- The name and version number of your operating system (for instance
Ubuntu Linux 18.04 LTS)
-- It is usually a good idea to send along the configuration file as well,
+- It is usually a good idea to send along the configuration file as well,
but please use doxygen with the <code>-s</code> flag while generating it
to keep it small (use <code>doxygen -s -u [configName]</code> to strip
- the comments from an existing configuration file).
-- The easiest (and often the only) way for me to fix bugs is if you can
+ the comments from an existing configuration file. Better even to use the
+ <code>-x</code> or the <code>-x_noenv</code> flag on the used <code>[configName]</code> to
+ get the differences between the used settings and the doxygen default settings, so
+ <code>doxygen -x [configName]</code>).
+- The easiest (and often the only) way for me to fix bugs is if you can
attach a small example demonstrating the problem you have to the bug report, so I can
reproduce it on my machine. Please make sure the example is valid
- source code (could potentially compile) and that the problem is really
- captured by the example (I often get examples that do not trigger the
+ source code (could potentially compile) and that the problem is really
+ captured by the example (I often get examples that do not trigger the
actual bug!). If you intend to send more than one file please zip or tar
the files together into a single file for easier processing.
- Note that when reporting a new bug you'll get a chance to attach a file to it
+ Note that when reporting a new bug you'll get a chance to attach a file to it
only \e after submitting the initial bug description.
-
-You can (and are encouraged to) add a patch for a bug. If you do so
-please use PATCH as a keyword in the bug entry form.
-
-If you have ideas how to fix existing bugs and limitations please discuss them on
-the <a href="http://sourceforge.net/mail/?group_id=5971">developers mailing list</a>
-(subscription required). Patches can also be sent directly to doxygen@gmail.com if
+- Before submitting, consider also running doxygen with some debugging flags,
+ run `doxygen -d` for all flags. The option `preprocessor` might give you hints
+ on how doxygen is understanding your input files.
+
+You can (and are encouraged to) add a patch for a
+<a href="https://github.com/doxygen/doxygen/issues">reported bug</a>.
+If you do so, please use "issue #NUMBER TITLE" as a title in the
+<a href="https://github.com/doxygen/doxygen/compare">pull request form</a>,
+where "NUMBER" and "TITLE" refer to the associated issue on GitHub.
+
+If you have ideas how to fix existing bugs and limitations please discuss them on
+the <a href="http://sourceforge.net/mail/?group_id=5971">developers mailing list</a>
+(subscription required). Patches can also be sent directly to doxygen@gmail.com if
you prefer not to send them via the bug tracker or mailing list.
For patches please use
#elif defined(_WIN32)
#define GHC_OS_WINDOWS
#define GHC_OS_WIN32
+#elif defined(__sun) && defined(__SVR4)
+#define GHC_OS_SOLARIS
+#define GHC_NO_DIRENT_D_TYPE
#elif defined(__CYGWIN__)
#define GHC_OS_CYGWIN
#elif defined(__svr4__)
#endif
-void MD5Buffer (const unsigned char *buf,unsigned int len,unsigned char sig[16])
+void MD5Buffer (const char *buf,unsigned int len,unsigned char sig[16])
{
struct MD5Context md5;
MD5Init(&md5);
- MD5Update(&md5,buf,len);
+ MD5Update(&md5,(const md5byte*)buf,len);
MD5Final(sig,&md5);
}
void MD5Init(struct MD5Context *context);
void MD5Update(struct MD5Context *context, md5byte const *buf, unsigned len);
void MD5Final(unsigned char digest[16], struct MD5Context *context);
-void MD5Buffer (const unsigned char *buf,unsigned int len,unsigned char sig[16]);
+void MD5Buffer (const char *buf,unsigned int len,unsigned char sig[16]);
void MD5SigToString(unsigned char sig[16],char str[33]);
#ifdef __cplusplus
)
set_source_files_properties(${GENERATED_SRC}/ce_parse.h PROPERTIES GENERATED 1)
-# lang_cfg.h
-add_custom_command(
- COMMENT "Generating ${GENERATED_SRC}/lang_cfg.h"
- COMMAND ${CMAKE_COMMAND} -P ${PROJECT_SOURCE_DIR}/cmake/lang_cfg.cmake ${GENERATED_SRC}/lang_cfg.h ${LANG_CODES}
- DEPENDS ${LANGUAGE_FILES}
- OUTPUT ${GENERATED_SRC}/lang_cfg.h
-)
-set_source_files_properties(${GENERATED_SRC}/lang_cfg.h PROPERTIES GENERATED 1)
-
# all resource files
if (${CMAKE_VERSION} VERSION_EQUAL "3.11.0" OR ${CMAKE_VERSION} VERSION_GREATER "3.11.0")
file(GLOB RESOURCES CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR}/templates/*/*)
)
add_library(doxycfg STATIC
- ${GENERATED_SRC}/lang_cfg.h
${GENERATED_SRC}/configvalues.h
${GENERATED_SRC}/configimpl.cpp
${GENERATED_SRC}/configimpl.l.h
#
${GENERATED_SRC}/ce_parse.cpp
# custom generated files
- ${GENERATED_SRC}/lang_cfg.h
${GENERATED_SRC}/configvalues.h
${GENERATED_SRC}/ce_parse.h
${GENERATED_SRC}/resources.cpp
docbookgen.cpp
docbookvisitor.cpp
docgroup.cpp
+ docnode.cpp
docparser.cpp
docsets.cpp
docvisitor.cpp
plantuml.cpp
qcstring.cpp
qhp.cpp
- qhpxmlwriter.cpp
reflist.cpp
regex.cpp
resourcemgr.cpp
rtfgen.cpp
rtfstyle.cpp
searchindex.cpp
+ searchindex_js.cpp
sqlite3gen.cpp
stlsupport.cpp
symbolresolver.cpp
add_executable(doxygen
main.cpp
)
+
+# enable to monitor compilation times
+#set_property(TARGET doxymain PROPERTY RULE_LAUNCH_COMPILE "${CMAKE_COMMAND} -E time")
+
+include(ApplyEditbin)
+apply_editbin(doxygen console)
+
add_sanitizers(doxygen)
if (use_libclang)
add_definitions(${LLVM_DEFINITIONS})
if (static_libclang)
set(CLANG_LIBS libclang clangTooling)
+ add_definitions(-DCINDEX_NO_EXPORTS)
else() # dynamically linked version of clang
llvm_config(doxymain USE_SHARED support)
set(CLANG_LIBS libclang clang-cpp)
class BufStr
{
public:
- BufStr(uint size)
+ BufStr(size_t size)
: m_size(size), m_writeOffset(0), m_spareRoom(10240), m_buf(0)
{
- m_buf = (char *)calloc(size,1);
+ m_buf = static_cast<char *>(calloc(size,1));
}
~BufStr()
{
makeRoomFor(1);
m_buf[m_writeOffset++]=c;
}
- void addArray(const char *a,uint len)
+ void addArray(const char *a,size_t len)
{
makeRoomFor(len);
memcpy(m_buf+m_writeOffset,a,len);
m_writeOffset+=len;
}
- void skip(uint s)
+ void skip(size_t s)
{
makeRoomFor(s);
m_writeOffset+=s;
}
- void shrink( uint newlen )
+ void shrink( size_t newlen )
{
m_writeOffset=newlen;
resize(newlen);
}
- void resize( uint newlen )
+ void resize( size_t newlen )
{
- uint oldsize = m_size;
+ size_t oldsize = m_size;
m_size=newlen;
if (m_writeOffset>=m_size) // offset out of range -> enlarge
{
m_size=m_writeOffset+m_spareRoom;
}
- m_buf = (char *)realloc(m_buf,m_size);
+ m_buf = static_cast<char *>(realloc(m_buf,m_size));
if (m_size>oldsize)
{
memset(m_buf+oldsize,0,m_size-oldsize);
}
}
- uint size() const
+ size_t size() const
{
return m_size;
}
{
return m_buf;
}
- char &at(uint i) const
+ char &at(size_t i) const
{
return m_buf[i];
}
{
return m_buf;
}
- uint curPos() const
+ size_t curPos() const
{
return m_writeOffset;
}
- void dropFromStart(uint bytes)
+ void dropFromStart(size_t bytes)
{
if (bytes>m_size) bytes=m_size;
if (bytes>0) qmemmove(m_buf,m_buf+bytes,m_size-bytes);
m_size-=bytes;
m_writeOffset-=bytes;
}
+ void addTerminalCharIfMissing(char c)
+ {
+ if (m_buf && m_writeOffset>1 && m_buf[m_writeOffset-2]!=c && m_buf[m_writeOffset-1]=='\0')
+ {
+ // add missing terminal character and 0 terminator
+ m_buf[m_writeOffset-1] = '\n';
+ addChar('\0');
+ }
+ else if (m_buf && m_writeOffset>0 && m_buf[m_writeOffset-1]!='\0' && m_buf[m_writeOffset-1]!=c)
+ {
+ // add missing terminal character without 0 terminator
+ addChar(c);
+ }
+ }
private:
- void makeRoomFor(uint size)
+ void makeRoomFor(size_t size)
{
if (m_writeOffset+size>=m_size)
{
resize(m_size+size+m_spareRoom);
}
}
- uint m_size;
- uint m_writeOffset;
- const uint m_spareRoom; // 10Kb extra room to avoid frequent resizing
+ size_t m_size;
+ size_t m_writeOffset;
+ const size_t m_spareRoom; // 10Kb extra room to avoid frequent resizing
char *m_buf;
};
}
//! Inserts \a value under \a key in the cache
- V *insert(const K &key,V &&value)
+ [[maybe_unused]] V *insert(const K &key,V &&value)
{
- // remove item if it already exists
- remove(key);
- // store new item
+ // reuse item if it already exists
+ auto it = m_cacheItemMap.find(key);
+ if (it != m_cacheItemMap.end())
+ {
+ // move the item to the front of the list
+ m_cacheItemList.splice(m_cacheItemList.begin(),
+ m_cacheItemList,
+ it->second);
+ std::exchange(it->second->second,value);
+ return &it->second->second;
+ }
+ // create new item
m_cacheItemList.push_front(kv_pair(key,std::move(value)));
V *result = &m_cacheItemList.front().second;
m_cacheItemMap[key] = m_cacheItemList.begin();
}
//! Inserts \a value under \a key in the cache
- V *insert(const K &key,const V &value)
+ [[maybe_unused]] V *insert(const K &key,const V &value)
{
- // remove item if it already exists
- remove(key);
+ // reuse item if it already exists
+ auto it = m_cacheItemMap.find(key);
+ if (it != m_cacheItemMap.end())
+ {
+ // move the item to the front of the list
+ m_cacheItemList.splice(m_cacheItemList.begin(),
+ m_cacheItemList,
+ it->second);
+ it->second->second = value;
+ return &it->second->second;
+ }
// store new item
m_cacheItemList.push_front(kv_pair(key,value));
V *result = &m_cacheItemList.front().second;
const_iterator end() const { return m_cacheItemList.cend(); }
private:
+ // remove least recently used item if cache is full
void resize()
{
if (m_cacheItemMap.size() > m_capacity)
m_cacheItemList.pop_back();
}
}
+
size_t m_capacity;
// list of items in the cache, sorted by most to least recently used.
std::list<kv_pair> m_cacheItemList;
{
if (k!=-1)
{
- citeName = line.mid((uint)(j),(uint)(k-j));
+ citeName = line.mid(static_cast<size_t>(j),static_cast<size_t>(k-j));
}
else
{
- citeName = line.mid((uint)(j));
+ citeName = line.mid(static_cast<size_t>(j));
}
citeName = citeName.stripWhiteSpace();
j = 0;
int k = line.find('}',i);
if (j>i && k>j)
{
- QCString crossrefName = line.mid((uint)(j+1),(uint)(k-j-1));
+ QCString crossrefName = line.mid(static_cast<size_t>(j+1),static_cast<uint>(k-j-1));
// check if the reference with the cross reference is used
// insert cross reference when cross reference has not yet been added.
if ((p->entries.find(citeName.str())!=p->entries.end()) &&
int k=line.find("]</a>");
if (j!=-1 && k!=-1)
{
- uint ui=(uint)i;
- uint uj=(uint)j;
- uint uk=(uint)k;
+ size_t ui=static_cast<size_t>(i);
+ size_t uj=static_cast<size_t>(j);
+ size_t uk=static_cast<size_t>(k);
QCString label = line.mid(ui+14,uj-ui-14);
QCString number = line.mid(uj+2,uk-uj-1);
line = line.left(ui+14) + label + line.right(line.length()-uj);
/// Citation-related data.
struct CiteInfo
{
- virtual ~CiteInfo() {}
+ virtual ~CiteInfo() = default;
virtual QCString label() const = 0;
virtual QCString text() const = 0;
};
static QCString detab(const QCString &s)
{
- static int tabSize = Config_getInt(TAB_SIZE);
+ int tabSize = Config_getInt(TAB_SIZE);
GrowBuf out;
int size = s.length();
const char *data = s.data();
clang_option_len = command[command.size()-1].CommandLine.size();
}
}
- char **argv = (char**)malloc(sizeof(char*)*
+ char **argv = static_cast<char**>(malloc(sizeof(char*)*
(4+Doxygen::inputPaths.size()+
includePath.size()+
clangOptions.size()+
- clang_option_len));
+ clang_option_len)));
if (!command.empty() )
{
std::vector<std::string> options = command[command.size()-1].CommandLine;
case DetectedLang::ObjCpp: argv[argc++]=qstrdup("objective-c++"); break;
}
- // provide the input and and its dependencies as unsaved files so we can
+ // provide the input and its dependencies as unsaved files so we can
// pass the filtered versions
argv[argc++]=qstrdup(fileName.data());
}
ClangTUParser::~ClangTUParser()
{
//printf("ClangTUParser::~ClangTUParser() this=%p\n",this);
- static bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING);
+ bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING);
if (!clangAssistedParsing) return;
if (p->tu)
{
//printf("ClangParser::lookup(%d,%s)\n",line,symbol);
std::string result;
if (symbol==0) return result;
- static bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING);
+ bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING);
if (!clangAssistedParsing) return result;
auto getCurrentTokenLine = [=]() -> uint
void ClangTUParser::writeLineNumber(CodeOutputInterface &ol,const FileDef *fd,uint line,bool writeLineAnchor)
{
const Definition *d = fd ? fd->getSourceDefinition(line) : 0;
- if (d && d->isLinkable())
+ if (d && fd->isLinkable())
{
p->currentLine=line;
const MemberDef *md = fd->getSourceMember(line);
if (c=='\n')
{
line++;
- int l = (int)(p-sp-1);
+ int l = static_cast<int>(p-sp-1);
column=l+1;
- char *tmp = (char*)malloc(l+1);
+ char *tmp = static_cast<char *>(malloc(l+1));
memcpy(tmp,sp,l);
tmp[l]='\0';
ol.codify(tmp);
const Definition *d,
const char *text)
{
- static bool sourceTooltips = Config_getBool(SOURCE_TOOLTIPS);
+ bool sourceTooltips = Config_getBool(SOURCE_TOOLTIPS);
p->tooltipManager.addTooltip(ol,d);
QCString ref = d->getReference();
QCString file = d->getOutputFileBase();
}
bool inlineCodeFragment = false;
bool done=FALSE;
- char *p=(char *)text;
+ const char *p=text;
while (!done)
{
- char *sp=p;
+ const char *sp=p;
char c;
while ((c=*p++) && c!='\n') { column++; }
if (c=='\n')
{
line++;
- *(p-1)='\0';
//printf("writeCodeLink(%s,%s,%s,%s)\n",ref,file,anchor,sp);
- ol.writeCodeLink(d->codeSymbolType(),ref,file,anchor,sp,tooltip);
+ ol.writeCodeLink(d->codeSymbolType(),ref,file,anchor,QCString(sp,p-sp-1),tooltip);
ol.endCodeLine();
ol.startCodeLine(TRUE);
writeLineNumber(ol,fd,line,inlineCodeFragment);
QCString lineNumber,lineAnchor;
bool inlineCodeFragment = false;
ol.startCodeLine(TRUE);
- writeLineNumber(ol,fd,line,inlineCodeFragment);
+ writeLineNumber(ol,fd,line,!inlineCodeFragment);
for (unsigned int i=0;i<p->numTokens;i++)
{
CXSourceLocation start = clang_getTokenLocation(p->tu, p->tokens[i]);
line++;
ol.endCodeLine();
ol.startCodeLine(TRUE);
- writeLineNumber(ol,fd,line,inlineCodeFragment);
+ writeLineNumber(ol,fd,line,!inlineCodeFragment);
}
while (column<c) { ol.codify(" "); column++; }
CXString tokenString = clang_getTokenSpelling(p->tu, p->tokens[i]);
static QCString makeQualifiedNameWithTemplateParameters(const ClassDef *cd,
const ArgumentLists *actualParams,uint *actualParamIndex)
{
- //static bool optimizeOutputJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
+ //bool optimizeOutputJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
bool hideScopeNames = Config_getBool(HIDE_SCOPE_NAMES);
//printf("qualifiedNameWithTemplateParameters() localName=%s\n",qPrint(localName()));
QCString scName;
static QCString makeDisplayName(const ClassDef *cd,bool includeScope)
{
- //static bool optimizeOutputForJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
+ //bool optimizeOutputForJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
SrcLangExt lang = cd->getLanguage();
- //static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
QCString n;
if (lang==SrcLangExt_VHDL)
{
Specifier s,const QCString &t)
{
//printf("*** insert sub class %s into %s\n",qPrint(cd->name()),qPrint(name()));
- static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
+ bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
if (!extractPrivate && cd->protection()==Private) return;
m_impl->inheritedBy.push_back(BaseClassDef(cd,QCString(),p,s,t));
m_impl->isSimple = FALSE;
void ClassDefImpl::writeDetailedDocumentationBody(OutputList &ol) const
{
- static bool repeatBrief = Config_getBool(REPEAT_BRIEF);
+ bool repeatBrief = Config_getBool(REPEAT_BRIEF);
ol.startTextBlock();
bool ClassDefImpl::hasDetailedDescription() const
{
- static bool repeatBrief = Config_getBool(REPEAT_BRIEF);
- static bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
+ bool repeatBrief = Config_getBool(REPEAT_BRIEF);
+ bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
return ((!briefDescription().isEmpty() && repeatBrief) ||
!documentation().isEmpty() ||
(sourceBrowser && getStartBodyLine()!=-1 && getBodyDef()));
void ClassDefImpl::writeInheritanceGraph(OutputList &ol) const
{
- static bool haveDot = Config_getBool(HAVE_DOT);
- static auto classGraph = Config_getEnum(CLASS_GRAPH);
+ bool haveDot = Config_getBool(HAVE_DOT);
+ auto classGraph = Config_getEnum(CLASS_GRAPH);
if (classGraph == CLASS_GRAPH_t::NO) return;
// count direct inheritance relations
ol.startParagraph();
writeMarkerList(ol,
- theTranslator->trInheritsList((int)m_impl->inherits.size()).str(),
+ theTranslator->trInheritsList(static_cast<int>(m_impl->inherits.size())).str(),
m_impl->inherits.size(),
replaceFunc);
ol.endParagraph();
ol.startParagraph();
writeMarkerList(ol,
- theTranslator->trInheritedByList((int)m_impl->inheritedBy.size()).str(),
+ theTranslator->trInheritedByList(static_cast<int>(m_impl->inheritedBy.size())).str(),
m_impl->inheritedBy.size(),
replaceFunc);
ol.endParagraph();
void ClassDefImpl::endMemberDeclarations(OutputList &ol) const
{
//printf("%s: ClassDefImpl::endMemberDeclarations()\n",qPrint(name()));
- static bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
+ bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
if (!inlineInheritedMembers && countAdditionalInheritedMembers()>0)
{
ol.startMemberHeader("inherited");
m_impl->innerClasses.declVisible()
)
{
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- ol.writeSummaryLink(QCString(),"nested-classes",ls->title(lang),first);
- first=FALSE;
+ const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
+ if (ls)
+ {
+ ol.writeSummaryLink(QCString(),"nested-classes",ls->title(lang),first);
+ first=FALSE;
+ }
}
else if (lde->kind()==LayoutDocEntry::ClassAllMembersLink &&
!m_impl->allMemberNameInfoLinkedMap.empty() &&
ol.writeSummaryLink(getMemberListFileName(),"all-members-list",theTranslator->trListOfAllMembers(),first);
first=FALSE;
}
- else if (lde->kind()== LayoutDocEntry::MemberDecl)
+ else if (lde->kind()==LayoutDocEntry::MemberDecl)
{
- const LayoutDocEntryMemberDecl *lmd = (const LayoutDocEntryMemberDecl*)lde.get();
- MemberList * ml = getMemberList(lmd->type);
- if (ml && ml->declVisible())
+ const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
+ if (lmd)
{
- ol.writeSummaryLink(QCString(),MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first);
- first=FALSE;
+ MemberList * ml = getMemberList(lmd->type);
+ if (ml && ml->declVisible())
+ {
+ ol.writeSummaryLink(QCString(),MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first);
+ first=FALSE;
+ }
}
}
}
break;
case LayoutDocEntry::MemberDecl:
{
- const LayoutDocEntryMemberDecl *lmd = (const LayoutDocEntryMemberDecl*)lde.get();
- MemberList * ml = getMemberList(lmd->type);
- if (ml)
+ const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
+ if (lmd)
{
- ml->writeTagFile(tagFile);
+ MemberList * ml = getMemberList(lmd->type);
+ if (ml)
+ {
+ ml->writeTagFile(tagFile);
+ }
}
}
break;
break;
case LayoutDocEntry::MemberDecl:
{
- ClassDefSet visitedClasses;
- const LayoutDocEntryMemberDecl *lmd = (const LayoutDocEntryMemberDecl*)lde.get();
- if (!isSimple) writeMemberDeclarations(ol,visitedClasses,lmd->type,lmd->title(lang),lmd->subtitle(lang),TRUE);
+ const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
+ if (lmd)
+ {
+ ClassDefSet visitedClasses;
+ if (!isSimple) writeMemberDeclarations(ol,visitedClasses,lmd->type,lmd->title(lang),lmd->subtitle(lang),TRUE);
+ }
}
break;
case LayoutDocEntry::MemberGroups:
break;
case LayoutDocEntry::MemberDef:
{
- const LayoutDocEntryMemberDef *lmd = (const LayoutDocEntryMemberDef*)lde.get();
- if (isSimple)
+ const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
+ if (lmd)
{
- writeSimpleMemberDocumentation(ol,lmd->type);
- }
- else
- {
- writeMemberDocumentation(ol,lmd->type,lmd->title(lang),TRUE);
+ if (isSimple)
+ {
+ writeSimpleMemberDocumentation(ol,lmd->type);
+ }
+ else
+ {
+ writeMemberDocumentation(ol,lmd->type,lmd->title(lang),TRUE);
+ }
}
}
break;
{
// TODO: clean up this mess by moving it to
// the output generators...
- static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
- static bool rtfHyperlinks = Config_getBool(RTF_HYPERLINKS);
- static bool usePDFLatex = Config_getBool(USE_PDFLATEX);
+ bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
+ bool rtfHyperlinks = Config_getBool(RTF_HYPERLINKS);
+ bool usePDFLatex = Config_getBool(USE_PDFLATEX);
// HTML only
ol.pushGeneratorState();
bool ClassDefImpl::visibleInParentsDeclList() const
{
- static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
- static bool hideUndocClasses = Config_getBool(HIDE_UNDOC_CLASSES);
- static bool extractLocalClasses = Config_getBool(EXTRACT_LOCAL_CLASSES);
+ bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
+ bool hideUndocClasses = Config_getBool(HIDE_UNDOC_CLASSES);
+ bool extractLocalClasses = Config_getBool(EXTRACT_LOCAL_CLASSES);
bool linkable = isLinkable();
return (!isAnonymous() && !isExtension() &&
(protection()!=::Private || extractPrivate) &&
void ClassDefImpl::writeDeclarationLink(OutputList &ol,bool &found,const QCString &header,bool localNames) const
{
- //static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
- //static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
- static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
+ //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
SrcLangExt lang = getLanguage();
if (visibleInParentsDeclList())
{
{
ol.writeString(" ");
ol.insertMemberAlign();
- ol.writeString(VhdlDocGen::getProtectionName((VhdlDocGen::VhdlClasses)protection()));
+ ol.writeString(VhdlDocGen::getProtectionName(VhdlDocGen::convert(protection())));
}
ol.endMemberItem();
// add the brief description if available
if (!briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
{
- std::unique_ptr<IDocParser> parser { createDocParser() };
- std::unique_ptr<DocRoot> rootNode { validatingParseDoc(*parser.get(),
+ auto parser { createDocParser() };
+ auto ast { validatingParseDoc(*parser.get(),
briefFile(),briefLine(),this,0,
briefDescription(),FALSE,FALSE,
QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
- if (rootNode && !rootNode->isEmpty())
+ if (!ast->isEmpty())
{
ol.startMemberDescription(anchor());
- ol.writeDoc(rootNode.get(),this,0);
+ ol.writeDoc(ast.get(),this,0);
if (isLinkableInProject())
{
writeMoreLink(ol,anchor());
case LayoutDocEntry::MemberDecl:
{
ClassDefSet visitedClasses;
- const LayoutDocEntryMemberDecl *lmd = (const LayoutDocEntryMemberDecl*)lde.get();
- writeMemberDeclarations(ol,visitedClasses,lmd->type,lmd->title(lang),lmd->subtitle(lang));
+ const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
+ if (lmd)
+ {
+ writeMemberDeclarations(ol,visitedClasses,lmd->type,lmd->title(lang),lmd->subtitle(lang));
+ }
}
break;
case LayoutDocEntry::ClassNestedClasses:
{
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeNestedClasses(ol,ls->title(lang));
+ const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
+ if (ls)
+ {
+ writeNestedClasses(ol,ls->title(lang));
+ }
}
break;
case LayoutDocEntry::MemberDeclEnd:
break;
case LayoutDocEntry::DetailedDesc:
{
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeDetailedDescription(ol,pageType,exampleFlag,ls->title(lang));
+ const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
+ if (ls)
+ {
+ writeDetailedDescription(ol,pageType,exampleFlag,ls->title(lang));
+ }
}
break;
case LayoutDocEntry::MemberDefStart:
break;
case LayoutDocEntry::MemberDef:
{
- const LayoutDocEntryMemberDef *lmd = (const LayoutDocEntryMemberDef*)lde.get();
- writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
+ const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
+ if (lmd)
+ {
+ writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
+ }
}
break;
case LayoutDocEntry::MemberDefEnd:
// write all documentation for this class
void ClassDefImpl::writeDocumentation(OutputList &ol) const
{
- static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
- //static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
- //static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
- static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
+ bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
+ //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
QCString pageTitle = title();
HighlightedItem hli;
void ClassDefImpl::writeQuickMemberLinks(OutputList &ol,const MemberDef *currentMd) const
{
- static bool createSubDirs=Config_getBool(CREATE_SUBDIRS);
+ bool createSubDirs=Config_getBool(CREATE_SUBDIRS);
ol.writeString(" <div class=\"navtab\">\n");
ol.writeString(" <table>\n");
// write the list of all (inherited) members for this class
void ClassDefImpl::writeMemberList(OutputList &ol) const
{
- static bool cOpt = Config_getBool(OPTIMIZE_OUTPUT_FOR_C);
- //static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
- static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
- static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
+ bool cOpt = Config_getBool(OPTIMIZE_OUTPUT_FOR_C);
+ //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
+ bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
if (m_impl->allMemberNameInfoLinkedMap.empty() || cOpt) return;
// only for HTML
ol.pushGeneratorState();
void ClassDefImpl::addTypeConstraint(const QCString &typeConstraint,const QCString &type)
{
//printf("addTypeConstraint(%s,%s)\n",qPrint(type),qPrint(typeConstraint));
- static bool hideUndocRelation = Config_getBool(HIDE_UNDOC_RELATIONS);
+ bool hideUndocRelation = Config_getBool(HIDE_UNDOC_RELATIONS);
if (typeConstraint.isEmpty() || type.isEmpty()) return;
SymbolResolver resolver(getFileDef());
ClassDefMutable *cd = resolver.resolveClassMutable(this,typeConstraint);
addTypeConstraint(typeConstraint,a.type);
p=i+1;
}
- typeConstraint = a.typeConstraint.right(a.typeConstraint.length()-(uint)p).stripWhiteSpace();
+ typeConstraint = a.typeConstraint.right(a.typeConstraint.length()-p).stripWhiteSpace();
addTypeConstraint(typeConstraint,a.type);
}
}
{
if (lde->kind()==LayoutDocEntry::MemberDecl)
{
- const LayoutDocEntryMemberDecl *lmd = (const LayoutDocEntryMemberDecl*)lde.get();
- writePlainMemberDeclaration(ol,lmd->type,inGroup,indentLevel,inheritedFrom,inheritId);
+ const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
+ if (lmd)
+ {
+ writePlainMemberDeclaration(ol,lmd->type,inGroup,indentLevel,inheritedFrom,inheritId);
+ }
}
}
}
/*! a link to this class is possible within this project */
bool ClassDefImpl::isLinkableInProject() const
{
- static bool extractLocal = Config_getBool(EXTRACT_LOCAL_CLASSES);
- static bool extractStatic = Config_getBool(EXTRACT_STATIC);
- static bool hideUndoc = Config_getBool(HIDE_UNDOC_CLASSES);
+ bool extractLocal = Config_getBool(EXTRACT_LOCAL_CLASSES);
+ bool extractStatic = Config_getBool(EXTRACT_STATIC);
+ bool hideUndoc = Config_getBool(HIDE_UNDOC_CLASSES);
if (m_impl->templateMaster)
{
return m_impl->templateMaster->isLinkableInProject();
{
if (m_impl->membersMerged) return;
- //static bool optimizeOutputForJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
- //static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ //bool optimizeOutputForJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
+ //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
SrcLangExt lang = getLanguage();
QCString sep=getLanguageSpecificSeparator(lang,TRUE);
uint sepLen = sep.length();
m_impl->membersMerged=TRUE;
//printf(" mergeMembers for %s\n",qPrint(name()));
- static bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
- static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
+ bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
+ bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
for (const auto &bcd : baseClasses())
{
ClassDefMutable *bClass=toClassDefMutable(bcd.classDef);
found=matchArguments2(
srcMd->getOuterScope(),srcMd->getFileDef(),&srcAl,
dstMd->getOuterScope(),dstMd->getFileDef(),&dstAl,
- TRUE
+ TRUE,getLanguage()
);
//printf(" Yes, matching (%s<->%s): %d\n",
// qPrint(argListToString(srcMd->argumentList())),
// qPrint(dstMd->name()),
// qPrint(dstMi->scopePath.left(dstMi->scopePath.find("::")+2));
- QCString scope=dstMi->scopePath().left((uint)dstMi->scopePath().find(sep)+sepLen);
+ QCString scope=dstMi->scopePath().left(dstMi->scopePath().find(sep)+sepLen);
if (scope!=dstMi->ambiguityResolutionScope().left(scope.length()))
{
dstMi->setAmbiguityResolutionScope(scope+dstMi->ambiguityResolutionScope());
// qPrint(dstMd->name()),
// qPrint(dstMi->scopePath.left(dstMi->scopePath.find("::")+2));
- QCString scope=dstMi->scopePath().left((uint)dstMi->scopePath().find(sep)+sepLen);
+ QCString scope=dstMi->scopePath().left(dstMi->scopePath().find(sep)+sepLen);
if (scope!=dstMi->ambiguityResolutionScope().left(scope.length()))
{
dstMi->setAmbiguityResolutionScope(dstMi->ambiguityResolutionScope()+scope);
ClassDefMutable *category = toClassDefMutable(cat);
if (category)
{
- static bool extractLocalMethods = Config_getBool(EXTRACT_LOCAL_METHODS);
+ bool extractLocalMethods = Config_getBool(EXTRACT_LOCAL_METHODS);
bool makePrivate = category->isLocal();
// in case extract local methods is not enabled we don't add the methods
// of the category in case it is defined in the .m file.
void ClassDefImpl::addUsedClass(ClassDef *cd,const QCString &accessName,
Protection prot)
{
- static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
- static bool umlLook = Config_getBool(UML_LOOK);
+ bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
+ bool umlLook = Config_getBool(UML_LOOK);
if (prot==Private && !extractPrivate) return;
//printf("%s::addUsedClass(%s,%s)\n",qPrint(name()),qPrint(cd->name()),accessName);
void ClassDefImpl::addUsedByClass(ClassDef *cd,const QCString &accessName,
Protection prot)
{
- static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
- static bool umlLook = Config_getBool(UML_LOOK);
+ bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
+ bool umlLook = Config_getBool(UML_LOOK);
if (prot==Private && !extractPrivate) return;
//printf("%s::addUsedByClass(%s,%s)\n",qPrint(name()),qPrint(cd->name()),accessName);
//
QCString ClassDefImpl::getOutputFileBase() const
{
- static bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
- static bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
+ bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
+ bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
if (!Doxygen::generatingXmlOutput)
{
Definition *scope=0;
void ClassDefImpl::addMemberToList(MemberListType lt,const MemberDef *md,bool isBrief)
{
- static bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
- static bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
+ bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
+ bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
const auto &ml = m_impl->memberLists.get(lt,MemberListContainer::Class);
ml->setNeedsSorting((isBrief && sortBriefDocs) || (!isBrief && sortMemberDocs));
ml->push_back(md);
//printf("%s: countMemberDeclarations for %d and %d\n",qPrint(name()),lt,lt2);
int count=0;
MemberList * ml = getMemberList(lt);
- MemberList * ml2 = getMemberList((MemberListType)lt2);
+ MemberList * ml2 = getMemberList(static_cast<MemberListType>(lt2));
if (getLanguage()!=SrcLangExt_VHDL) // use specific declarations function
{
if (ml)
for (const auto &mg : m_impl->memberGroups)
{
count+=mg->countGroupedInheritedMembers(lt);
- if (lt2!=-1) count+=mg->countGroupedInheritedMembers((MemberListType)lt2);
+ if (lt2!=-1) count+=mg->countGroupedInheritedMembers(static_cast<MemberListType>(lt2));
}
}
- static bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
+ bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
if (!inlineInheritedMembers) // show inherited members as separate lists
{
count+=countInheritedDecMembers(lt,inheritedFrom,invert,showAlways,visitedClasses);
{
if (lde->kind()==LayoutDocEntry::MemberDecl)
{
- const LayoutDocEntryMemberDecl *lmd = (const LayoutDocEntryMemberDecl*)lde.get();
- MemberList * ml = getMemberList(lmd->type);
- if (ml)
+ const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
+ if (lmd)
{
- ml->setAnonymousEnumType();
+ MemberList * ml = getMemberList(lmd->type);
+ if (ml)
+ {
+ ml->setAnonymousEnumType();
+ }
}
}
else if (lde->kind()==LayoutDocEntry::MemberGroups)
visitedClasses.insert(icd); // guard for multiple virtual inheritance
if (lt1!=-1)
{
- inhCount+=icd->countMemberDeclarations((MemberListType)lt1,inheritedFrom,lt2,FALSE,TRUE,visitedClasses);
+ inhCount+=icd->countMemberDeclarations(static_cast<MemberListType>(lt1),inheritedFrom,lt2,FALSE,TRUE,visitedClasses);
}
}
}
{
if (lde->kind()==LayoutDocEntry::MemberDecl)
{
- const LayoutDocEntryMemberDecl *lmd = (const LayoutDocEntryMemberDecl*)lde.get();
- if (lmd->type==type)
+ const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
+ if (lmd && lmd->type==type)
{
title = lmd->title(lang);
subtitle = lmd->subtitle(lang);
{
if (lde->kind()==LayoutDocEntry::MemberDecl)
{
- const LayoutDocEntryMemberDecl *lmd = (const LayoutDocEntryMemberDecl*)lde.get();
- if (lmd->type!=MemberListType_friends) // friendship is not inherited
+ const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
+ if (lmd && lmd->type!=MemberListType_friends) // friendship is not inherited
{
ClassDefSet visited;
totalCount+=countInheritedDecMembers(lmd->type,this,TRUE,FALSE,visited);
{
if (lde->kind()==LayoutDocEntry::MemberDecl)
{
- const LayoutDocEntryMemberDecl *lmd = (const LayoutDocEntryMemberDecl*)lde.get();
- if (lmd->type!=MemberListType_friends)
+ const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
+ if (lmd && lmd->type!=MemberListType_friends)
{
ClassDefSet visited;
writeInheritedMemberDeclarations(ol,visited,lmd->type,-1,lmd->title(getLanguage()),this,TRUE,FALSE);
visitedClasses.insert(icd); // guard for multiple virtual inheritance
if (lt1!=-1)
{
- icd->writeMemberDeclarations(ol,visitedClasses,(MemberListType)lt1,
+ icd->writeMemberDeclarations(ol,visitedClasses,static_cast<MemberListType>(lt1),
title,QCString(),FALSE,inheritedFrom,lt2,FALSE,TRUE);
}
}
{
//printf("%s: ClassDefImpl::writeMemberDeclarations lt=%d lt2=%d\n",qPrint(name()),lt,lt2);
MemberList * ml = getMemberList(lt);
- MemberList * ml2 = getMemberList((MemberListType)lt2);
+ MemberList * ml2 = getMemberList(static_cast<MemberListType>(lt2));
if (getLanguage()==SrcLangExt_VHDL) // use specific declarations function
{
static const ClassDef *cdef;
//printf(" writeDeclaration type=%d count=%d\n",lt2,ml2->numDecMembers());
ml2->writeDeclarations(ol,this,0,0,0,tt,st,FALSE,showInline,inheritedFrom,lt);
}
- static bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
+ bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
if (!inlineInheritedMembers) // show inherited members as separate lists
{
writeInheritedMemberDeclarations(ol,visitedClasses,lt,lt2,title,
bool ClassDefImpl::isEmbeddedInOuterScope() const
{
- static bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
- static bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
+ bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
+ bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
Definition *container = getOuterScope();
Singleton, //=Entry::CLASS_SEC
};
- virtual ~ClassDef() {}
-
//-----------------------------------------------------------------------------------
// --- getters
//-----------------------------------------------------------------------------------
void ClassLinkedRefMap::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *filter,
const QCString &header,bool localNames) const
{
- static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
+ bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
bool found=FALSE;
for (const auto &cd : *this)
{
void ClassLinkedRefMap::writeDocumentation(OutputList &ol,const Definition * container) const
{
- static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
- static bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
- static bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
+ bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
+ bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
if (!inlineGroupedClasses && !inlineSimpleClasses) return;
bool found=FALSE;
std::unordered_map< int, QCString> commentMap;
int braceCount=0;
+ using UsingContext = std::map<std::string,const NamespaceDef*>;
+
VariableContext theVarContext;
+ UsingContext theUsingContext;
CallContext theCallContext;
SymbolResolver symbolResolver;
TooltipManager tooltipManager;
const QCString &text);
static void addType(yyscan_t yyscanner);
static void addParmType(yyscan_t yyscanner);
-static void addUsingDirective(yyscan_t yyscanner,const char *name);
+static void addUsingDirective(yyscan_t yyscanner,const QCString &name);
static void setParameterList(yyscan_t yyscanner,const MemberDef *md);
static const ClassDef *stripClassName(yyscan_t yyscanner,const QCString &s,const Definition *d);
static const MemberDef *setCallContextForVar(yyscan_t yyscanner,const QCString &name);
static std::mutex g_docCrossReferenceMutex;
static std::mutex g_addExampleMutex;
static std::mutex g_countFlowKeywordsMutex;
-static std::mutex g_usingDirectiveMutex;
/* -----------------------------------------------------------------
*/
endFontClass(yyscanner);
BEGIN(UsingName);
}
+<Body>"using"{BN}+ {
+ startFontClass(yyscanner,"keyword");
+ codifyLines(yyscanner,yytext);
+ endFontClass(yyscanner);
+ BEGIN(UsingName);
+ }
<ConceptName>{ID}("::"{ID})* {
- addUsingDirective(yyscanner,yytext);
generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
}
<ConceptName>"=" { codifyLines(yyscanner,yytext); BEGIN(Body); }
-<UsingName>{ID}("::"{ID})* {
- addUsingDirective(yyscanner,yytext);
+<UsingName>{ID}(("::"|"."){ID})* {
+ addUsingDirective(yyscanner,substitute(yytext,".","::"));
generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
BEGIN(Body);
}
generateFunctionLink(yyscanner,*yyextra->code,yytext);
yyextra->name+=yytext;
}
+<Body>{ID}("."{ID})+/{BN}+ { // CSharp/Java scope
+ if (yyextra->lang==SrcLangExt_CSharp || yyextra->lang==SrcLangExt_Java)
+ {
+ addType(yyscanner);
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
+ yyextra->name+=yytext;
+ }
+ else
+ {
+ REJECT;
+ }
+ }
<Body>{SCOPENAME}/{B}* { // p->func()
if (startsWithKeyword(yytext,"typedef")) REJECT;
addType(yyscanner);
ltype = ltype.right(ltype.length()-6);
}
if (ltype.isEmpty() || lname.isEmpty()) return;
+ ltype = substitute(ltype,".","::");
DBG_CTX((stderr,"** addVariable trying: type='%s' name='%s' currentDefinition=%s\n",
qPrint(ltype),qPrint(lname),yyextra->currentDefinition?qPrint(yyextra->currentDefinition->name()):"<none>"));
auto it = yyextra->codeClassMap.find(ltype.str());
}
else
{
- const ClassDef *varDef = yyextra->symbolResolver.resolveClass(yyextra->currentDefinition,ltype);
- int i=0;
- if (varDef)
+ auto findVariableType = [&yyscanner,&yyg,<ype,&lname,&name](const Definition *d) -> const ClassDef *
{
- DBG_CTX((stderr,"** addVariable type='%s' name='%s'\n",qPrint(ltype),qPrint(lname)));
- yyextra->theVarContext.addVariable(lname,ScopedTypeVariant(varDef)); // add it to a list
- }
- else if ((i=ltype.find('<'))!=-1)
+ const ClassDef *varDef = yyextra->symbolResolver.resolveClass(d,ltype);
+ int i=0;
+ if (varDef)
+ {
+ DBG_CTX((stderr,"** addVariable type='%s' name='%s'\n",qPrint(ltype),qPrint(lname)));
+ yyextra->theVarContext.addVariable(lname,ScopedTypeVariant(varDef)); // add it to a list
+ }
+ else if ((i=ltype.find('<'))!=-1)
+ {
+ // probably a template class
+ QCString typeName(ltype.left(i));
+ addVariable(yyscanner,typeName,name);
+ }
+ return varDef;
+ };
+ const ClassDef *varDef = findVariableType(yyextra->currentDefinition);
+ if (varDef==0) // also check via using directive
{
- // probably a template class
- QCString typeName(ltype.left(i));
- addVariable(yyscanner,typeName,name);
+ for (const auto &kv : yyextra->theUsingContext)
+ {
+ varDef = findVariableType(kv.second);
+ if (varDef!=0) break;
+ }
}
- else
+ if (varDef==0)
{
if (!yyextra->theVarContext.atGlobalScope()) // for local variables add a dummy entry so the name
// is hidden to avoid false links to global variables with the same name
yyextra->parmName.resize(0) ;
}
-// TODO: make this have a scope only effect, at least not modifying the FileDef object.
-static void addUsingDirective(yyscan_t yyscanner,const char *name)
+static void addUsingDirective(yyscan_t yyscanner,const QCString &name)
{
- std::lock_guard<std::mutex> lock(g_usingDirectiveMutex);
+ //printf("AddUsingDirective(%s)\n",qPrint(name));
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- if (yyextra->sourceFileDef && name)
+ if (yyextra->sourceFileDef && !name.isEmpty())
{
const NamespaceDef *nd = Doxygen::namespaceLinkedMap->find(name);
if (nd)
{
- const_cast<FileDef*>(yyextra->sourceFileDef)->addUsingDirective(nd);
+ yyextra->theUsingContext.insert(std::make_pair(name.str(),nd));
}
}
}
bool varOnly)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- int i=0;
QCString className=clName;
if (!className.isEmpty() && className[0]=='~') // correct for matching negated values i.s.o. destructors.
{
}
else if (yyextra->lang==SrcLangExt_CSharp || yyextra->lang==SrcLangExt_Java)
{
- className = substitute(className,".","::"); // for PHP namespaces
+ className = substitute(className,".","::"); // for C#/Java namespaces
}
const ScopedTypeVariant *lcd=0;
const ClassDef *cd=0;
DBG_CTX((stderr,"generateClassOrGlobalLink(className=%s)\n",qPrint(className)));
if (!yyextra->isPrefixedWithThis || (lcd=yyextra->theVarContext.findVariable(className))==0) // not a local variable
{
- const Definition *d = yyextra->currentDefinition;
- DBG_CTX((stderr,"d=%s yyextra->sourceFileDef=%s\n",d?qPrint(d->name()):"<none>",yyextra->sourceFileDef?qPrint(yyextra->sourceFileDef->name()):"<none>"));
- cd = yyextra->symbolResolver.resolveClass(d,className);
- md = yyextra->symbolResolver.getTypedef();
- DBG_CTX((stderr,"non-local variable name=%s cd=%s md=%s!\n",
- qPrint(className),cd?qPrint(cd->name()):"<none>",
- md?qPrint(md->name()):"<none>"));
- i=className.find('<');
+ int i=className.find('<');
QCString bareName = className;
if (i!=-1) bareName = bareName.left(i);
- if (cd==0 && md==0 && i!=-1)
+
+ auto checkForClass = [&yyg,&bareName,&className](const Definition *d,
+ const ClassDef *&cd_,const MemberDef *&md_)
+ {
+ cd_ = yyextra->symbolResolver.resolveClass(d,className);
+ md_ = yyextra->symbolResolver.getTypedef();
+ DBG_CTX((stderr,"non-local variable name=%s cd=%s md=%s!\n",
+ qPrint(className),cd_?qPrint(cd_->name()):"<none>",
+ md_?qPrint(md_->name()):"<none>"));
+ if (cd_==0 && md_==0 && !bareName.isEmpty())
+ {
+ DBG_CTX((stderr,"bareName=%s\n",qPrint(bareName)));
+ if (bareName!=className)
+ {
+ cd_ = yyextra->symbolResolver.resolveClass(d,bareName); // try unspecialized version
+ md_ = yyextra->symbolResolver.getTypedef();
+ }
+ }
+ };
+ const Definition *d = yyextra->currentDefinition;
+ DBG_CTX((stderr,"d=%s yyextra->sourceFileDef=%s\n",d?qPrint(d->name()):"<none>",yyextra->sourceFileDef?qPrint(yyextra->sourceFileDef->name()):"<none>"));
+ checkForClass(d,cd,md);
+ if (cd==0 && md==0 && d && d->definitionType()==Definition::TypeClass)
+ {
+ const FileDef *fd = toClassDef(d)->getFileDef();
+ if (fd)
+ {
+ // also check for using directive in the file that defines this class
+ for (const auto &nd : fd->getUsedNamespaces())
+ {
+ checkForClass(nd,cd,md);
+ if (cd!=0 || md!=0) break;
+ }
+ }
+ }
+ if (cd==0 && md==0)
{
- DBG_CTX((stderr,"bareName=%s\n",qPrint(bareName)));
- if (bareName!=className)
+ // also check via using directive
+ for (const auto &kv : yyextra->theUsingContext)
{
- cd = yyextra->symbolResolver.resolveClass(d,bareName); // try unspecialized version
- md = yyextra->symbolResolver.getTypedef();
+ checkForClass(kv.second,cd,md);
+ if (cd!=0 || md!=0) break;
}
}
+
const NamespaceDef *nd = getResolvedNamespace(className);
if (nd && nd->isLinkable())
{
if (md==0) // not found as a typedef
{
md = setCallContextForVar(yyscanner,clName);
- DBG_CTX((stderr,"setCallContextForVar(%s) md=%p yyextra->currentDefinition=%p\n",qPrint(clName),(void*)md,(void*)yyextra->currentDefinition));
+ DBG_CTX((stderr,"setCallContextForVar(%s) md=%p yyextra->currentDefinition=%s\n",qPrint(clName),(void*)md,yyextra->currentDefinition ? qPrint(yyextra->currentDefinition->name()) : "<none>"));
if (md && yyextra->currentDefinition)
{
DBG_CTX((stderr,"%s accessible from %s? %d md->getOuterScope=%s\n",
QCString funcWithScope=locFunc;
QCString funcWithFullScope=locFunc;
QCString fullScope=locScope;
- DBG_CTX((stdout,"*** locScope=%s locFunc=%s\n",qPrint(locScope),qPrint(locFunc)));
+ DBG_CTX((stderr,"*** locScope=%s locFunc=%s\n",qPrint(locScope),qPrint(locFunc)));
int len=2;
int i=locFunc.findRev("::");
if (yyextra->currentMemberDef && yyextra->currentMemberDef->resolveAlias()->getClassDef() &&
static bool skipLanguageSpecificKeyword(yyscan_t yyscanner,const char *keyword)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- static std::unordered_set<std::string> non_cpp_keywords = {
+ static const std::unordered_set<std::string> non_cpp_keywords = {
"__assume", "__super", "abstract", "function",
"gcnew", "gcroot", "generic", "get",
"internal", "null", "pin_ptr", "raise",
"remove", "self", "set", "transient"};
- static std::unordered_set<std::string> non_java_keywords = {
+ static const std::unordered_set<std::string> non_java_keywords = {
"alignas", "alignof", "and", "and_eq", "asm",
"atomic_cancel", "atomic_commit", "atomic_noexcept", "auto", "bitand",
"bitor", "bool", "char8_t", "char16_t", "char32_t",
if (s.isEmpty()) return;
- printlex(yy_flex_debug, TRUE, __FILE__, fd ? qPrint(fd->fileName()): NULL);
+ printlex(yy_flex_debug, TRUE, __FILE__, fd ? qPrint(fd->fileName()): !exName.isEmpty() ? qPrint(exName) : NULL);
yyextra->code = &od;
yyextra->inputString = s.data();
{
setCurrentDoc(yyscanner,"l00001");
}
- yyextra->currentDefinition = getResolvedNamespace(className);
+ yyextra->currentDefinition = searchCtx ? searchCtx : getResolvedNamespace(className);
yyextra->currentMemberDef = 0;
yyextra->searchingForBody = exBlock;
yyextra->insideBody = FALSE;
copyToOutput(yyscanner,yytext,(int)yyleng);
yyextra->inSpecialComment=FALSE;
yyextra->inRoseComment=FALSE;
+ yyextra->readLineCtx = Scan; // reset, otherwise there will be problems with:
+ // static void handleCondSectionId
BEGIN(Scan);
}
<ReadLine>{CCS}"*" {
static inline int computeIndent(const char *s)
{
int col=0;
- static int tabSize=Config_getInt(TAB_SIZE);
+ int tabSize=Config_getInt(TAB_SIZE);
const char *p=s;
char c;
while ((c=*p++))
bool markdownSupport = TRUE;
QCString raiseWarning;
+
+ QCString htmlAnchorStr;
+ bool htmlAnchor = false;
};
%}
/* start command character */
-CMD ("\\"|"@")
+CMD ("\\"|"@")
XREFCMD {CMD}("bug"|"deprecated"|"test"|"todo"|"xrefitem")
PRE [pP][rR][eE]
-TABLE [tT][aA][bB][lL][eE]
-P [pP]
+TABLE [tT][aA][bB][lL][eE]
+P [pP]
UL [uU][lL]
-OL [oO][lL]
-DL [dD][lL]
+OL [oO][lL]
+DL [dD][lL]
IMG [iI][mM][gG]
HR [hH][rR]
PARA [pP][aA][rR][aA]
DETAILEDHTMLOPT {CODE}
SUMMARY [sS][uU][mM][mM][aA][rR][yY]
REMARKS [rR][eE][mM][aA][rR][kK][sS]
+AHTML [aA]{BN}*
+ANCHTML ([iI][dD]|[nN][aA][mM][eE])"="("\""{LABELID}"\""|"'"{LABELID}"'"|{LABELID})
BN [ \t\n\r]
BL [ \t\r]*"\n"
B [ \t]
ATTR ({B}+[^>\n]*)?
DOCNL "\n"|"\\ilinebr"
LC "\\"{B}*"\n"
-NW [^a-z_A-Z0-9]
-FILESCHAR [a-z_A-Z0-9\x80-\xFF\\:\\\/\-\+@&#]
-FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+@&#]
+NW [^a-z_A-Z0-9]
+FILESCHAR [a-z_A-Z0-9\x80-\xFF\\:\\\/\-\+=@&#]
+FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+=@&#]
FILE ({FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)*)|("\""[^\n\"]*"\"")
ID [$a-z_A-Z\x80-\xFF][$a-z_A-Z0-9\x80-\xFF]*
LABELID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF\-]*
%x ReadFormulaLong
%x AnchorLabel
%x HtmlComment
+%x HtmlA
%x SkipLang
%x CiteLabel
%x CopyDoc
if (yyextra->HTMLDetails) yyextra->HTMLDetails--;
addOutput(yyscanner,yytext);
}
+<Comment>"<"{AHTML} { // potential start of HTML anchor, see issue 9200
+ yyextra->htmlAnchorStr = yytext;
+ yyextra->htmlAnchor = false;
+ BEGIN(HtmlA);
+ }
+<HtmlA>{ANCHTML} { // only labels that can be converted to doxygen anchor
+ yyextra->htmlAnchorStr += yytext;
+ QCString tag(yytext);
+ int s=tag.find("=");
+ char c=tag[s+1];
+ QCString id;
+ if (c=='\'' || c=='"') // valid start
+ {
+ int e=tag.find(c,s+2);
+ if (e!=-1) // found matching end
+ {
+ id=tag.mid(s+2,e-s-2); // extract id
+ addAnchor(yyscanner,id);
+ }
+ }
+ else
+ {
+ id=tag.mid(s+1);
+ addAnchor(yyscanner,id);
+ }
+ if (!id.isEmpty() && !yyextra->htmlAnchor)
+ {
+ // only use first analogous to what is in docparser
+ addOutput(yyscanner,"@anchor ");
+ addOutput(yyscanner,id.data());
+ addOutput(yyscanner," ");
+ yyextra->htmlAnchor = true;
+ }
+ }
+<HtmlA>("\""[^\n\"]*"\""|"'"[^\n']*"'") {
+ yyextra->htmlAnchorStr += yytext;
+ }
+<HtmlA>">"|"/>" {
+ if (!yyextra->htmlAnchor)
+ {
+ addOutput(yyscanner,yyextra->htmlAnchorStr);
+ addOutput(yyscanner,yytext);
+ }
+ else
+ {
+ if (yyleng == 1) // to keep <a></a> pairs, otherwise single </a> present
+ {
+ addOutput(yyscanner,"<a>");
+ }
+ }
+ BEGIN(Comment);
+ }
+<HtmlA>{DOCNL} { // newline
+ yyextra->htmlAnchorStr += yytext;
+ if (*yytext == '\n') yyextra->lineNr++;
+ }
+<HtmlA>. { // catch-all for anything else
+ yyextra->htmlAnchorStr += yytext;
+ }
<Comment>"<"{SUMMARY}">" { // start of a .NET XML style brief description
if (!yyextra->HTMLDetails) setOutput(yyscanner,OutputBrief);
addOutput(yyscanner,yytext);
<Comment>{B}*{CMD}"~"[a-z_A-Z-]* { // language switch command
QCString langId = QCString(yytext).stripWhiteSpace().mid(2);
if (!langId.isEmpty() &&
- qstricmp(Config_getEnumAsString(OUTPUT_LANGUAGE).data(),langId.data())!=0)
+ qstricmp(Config_getEnumAsString(OUTPUT_LANGUAGE),langId)!=0)
{ // enable language specific section
+ if (!Config_isAvailableEnum(OUTPUT_LANGUAGE,langId))
+ {
+ warn(yyextra->fileName,yyextra->lineNr,
+ "non supported language '%s' specified in '%s'",langId.data(),QCString(yytext).stripWhiteSpace().data());
+ }
BEGIN(SkipLang);
}
}
addOutput(yyscanner,'\n');
BEGIN( Comment );
}
+<SubpageLabel>. {
+ unput(yytext[0]);
+ BEGIN( Comment );
+ }
<SubpageTitle>{DOCNL} { // no title, end command
addOutput(yyscanner,yytext);
BEGIN( Comment );
<SkipLang>[\\@]"~"[a-zA-Z-]* { /* language switch */
QCString langId(&yytext[2]);
- if (langId.isEmpty() ||
- qstricmp(Config_getEnumAsString(OUTPUT_LANGUAGE).data(),langId.data())==0)
+ if (!langId.isEmpty() && !Config_isAvailableEnum(OUTPUT_LANGUAGE,langId))
+ {
+ warn(yyextra->fileName,yyextra->lineNr,
+ "non supported language '%s' specified in '%s'",langId.data(),QCString(yytext).stripWhiteSpace().data());
+ }
+ else if (langId.isEmpty() ||
+ qstricmp(Config_getEnumAsString(OUTPUT_LANGUAGE),langId)==0)
{ // enable language specific section
BEGIN(Comment);
}
}
/*
-<*>. { fprintf(stderr,"Lex scanner %s %sdefault rule for state %s: #%s#\n", __FILE__,yyextra->fileName ? ("(" + yyextra->fileName +") ").data(): "",stateToString(YY_START),yytext);}
-<*>\n { fprintf(stderr,"Lex scanner %s %sdefault rule newline for state %s.\n", __FILE__, yyextra->fileName ? ("(" + yyextra->fileName +") ").data(): "",stateToString(YY_START));}
- */
+<*>. { fprintf(stderr,"Lex scanner %s %sdefault rule for state %s: #%s#\n", __FILE__,!yyextra->fileName.isEmpty() ? ("(" + yyextra->fileName +") ").data(): "",stateToString(YY_START),yytext);}
+<*>\n { fprintf(stderr,"Lex scanner %s %sdefault rule newline for state %s.\n", __FILE__, !yyextra->fileName.isEmpty() ? ("(" + yyextra->fileName +") ").data(): "",stateToString(YY_START));}
+ */
%%
std::unique_lock<std::mutex> lock(g_formulaMutex);
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
QCString formLabel;
- QCString fText=yyextra->formulaText.simplifyWhiteSpace();
- int id = FormulaManager::instance().addFormula(fText.str());
+ int id = FormulaManager::instance().addFormula(yyextra->formulaText.str());
formLabel.sprintf("\\_form#%d",id);
for (int i=0;i<yyextra->formulaNewLines;i++) formLabel+="@_fakenl"; // add fake newlines to
// keep the warnings
{
if (hasBriefDescription())
{
- std::unique_ptr<IDocParser> parser { createDocParser() };
- std::unique_ptr<DocRoot> rootNode { validatingParseDoc(
+ auto parser { createDocParser() };
+ auto ast { validatingParseDoc(
*parser.get(),briefFile(),briefLine(),this,0,
briefDescription(),TRUE,FALSE,
QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
- if (rootNode && !rootNode->isEmpty())
+ if (!ast->isEmpty())
{
ol.startParagraph();
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Man);
ol.writeString(" - ");
ol.popGeneratorState();
- ol.writeDoc(rootNode.get(),this,0);
+ ol.writeDoc(ast.get(),this,0);
ol.pushGeneratorState();
ol.disable(OutputGenerator::RTF);
ol.writeString(" \n");
void ConceptDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title) const
{
- static bool repeatBrief = Config_getBool(REPEAT_BRIEF);
+ bool repeatBrief = Config_getBool(REPEAT_BRIEF);
if (hasDetailedDescription())
{
ol.pushGeneratorState();
void ConceptDefImpl::writeDocumentation(OutputList &ol)
{
- static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
+ bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
QCString pageTitle = theTranslator->trConceptReference(displayName());
startFile(ol,getOutputFileBase(),name(),pageTitle,HLI_ConceptVisible,!generateTreeView);
for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Concept))
{
+ const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
switch (lde->kind())
{
case LayoutDocEntry::BriefDesc:
writeBriefDescription(ol);
break;
case LayoutDocEntry::ConceptDefinition:
- {
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeDefinition(ol,ls->title(getLanguage()));
- }
+ if (ls) writeDefinition(ol,ls->title(getLanguage()));
break;
case LayoutDocEntry::DetailedDesc:
- {
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeDetailedDescription(ol,ls->title(getLanguage()));
- }
+ if (ls) writeDetailedDescription(ol,ls->title(getLanguage()));
break;
case LayoutDocEntry::AuthorSection:
writeAuthorSection(ol);
// add the brief description if available
if (!briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
{
- std::unique_ptr<IDocParser> parser { createDocParser() };
- std::unique_ptr<DocRoot> rootNode { validatingParseDoc(
+ auto parser { createDocParser() };
+ auto ast { validatingParseDoc(
*parser.get(),briefFile(),briefLine(),this,0,
briefDescription(),FALSE,FALSE,
QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
- if (rootNode && !rootNode->isEmpty())
+ if (!ast->isEmpty())
{
ol.startMemberDescription(anchor());
- ol.writeDoc(rootNode.get(),this,0);
+ ol.writeDoc(ast.get(),this,0);
ol.endMemberDescription();
}
}
static bool isAlphaNumSpec(const char c)
{
- return isAlpha(c) || (c>='0' && c<='9') || c=='-' || c=='.' || (((unsigned char)c)>=0x80);
+ return isAlpha(c) || (c>='0' && c<='9') || c=='-' || c=='.' || (static_cast<unsigned char>(c)>=0x80);
}
/**
#define Config_updateInt(name,value) (ConfigValues::instance().update_##name(value));
#define Config_updateEnum(name,value) (ConfigValues::instance().update_##name(value));
#define Config_updateList(name,...) (ConfigValues::instance().update_##name(__VA_ARGS__));
+
+#define Config_isAvailableEnum(name,value) (ConfigValues::instance().isAvailable_##name(value))
//#endif
//! @}
+enum class DoxyfileSettings { Full, Compressed, CompressedNoEnv };
class TextStream;
/** \brief Public function to deal with the configuration file. */
/*! Writes a the differences between the current configuration and the
* template configuration to stream \a t.
*/
- void compareDoxyfile(TextStream &t);
+ void compareDoxyfile(TextStream &t, DoxyfileSettings diffList);
/*! Writes a the used settings of the current configuration as XML format
* to stream \a t.
/*! Post processed the parsed data. Replaces raw string values by the actual values.
* and replaces environment variables.
* \param clearHeaderAndFooter set to TRUE when writing header and footer templates.
- * \param compare signals if we in Doxyfile compare (`-x`) mode are or not. Influences
- * setting of the default value.
+ * \param compare signals if we in Doxyfile compare (`-x` or `-x_noenv`) mode are or not.
+ * Influences setting of the default value and replacement of environment variables.
*/
- void postProcess(bool clearHeaderAndFooter, bool compare = FALSE);
+ void postProcess(bool clearHeaderAndFooter, DoxyfileSettings compare = DoxyfileSettings::Full);
/*! Check the validity of the parsed options and correct or warn the user where needed.
* \param quiet setting for the QUIET option (can have been overruled by means of a command line option)
TAG += value [value, ...]
\endverbatim
Values that contain spaces should be placed between quotes (\" \").
+<br>
+Note:<br>
+Use doxygen to compare the used configuration file with the template configuration file:
+\verbatim
+ doxygen -x [configFile]
+\endverbatim
+Use doxygen to compare the used configuration file with the template configuration file
+without replacing the environment variables:
+\verbatim
+ doxygen -x_noenv [configFile]
+\endverbatim
]]>
</docs>
</header>
<docs>
<![CDATA[
If the \c CREATE_SUBDIRS tag is set to \c YES then doxygen will create
- 4096 sub-directories (in 2 levels) under the output directory of each output
+ up to 4096 sub-directories (in 2 levels) under the output directory of each output
format and will distribute the generated files over these directories.
Enabling this option can be useful when feeding doxygen a huge amount of source
files, where putting all generated files in the same directory would otherwise
causes performance problems for the file system.
+ Adapt \c CREATE_SUBDIRS_LEVEL to control the number of sub-directories.
+]]>
+ </docs>
+ </option>
+ <option type='int' id='CREATE_SUBDIRS_LEVEL' minval='0' maxval='8' defval='8'
+ depends='CREATE_SUBDIRS'>
+ <docs>
+<![CDATA[
+ Controls the number of sub-directories that will be created when \c CREATE_SUBDIRS tag
+ is set to \c YES. Level 0 represents 16 directories, and every level increment
+ doubles the number of directories, resulting in 4096 directories at level 8 which is the
+ default and also the maximum value. The sub-directories are organized in 2 levels, the first
+ level always has a fixed numer of 16 directories.
]]>
</docs>
</option>
<value name='Arabic'/>
<value name='Armenian'/>
<value name='Brazilian'/>
+ <value name='Bulgarian'/>
<value name='Catalan'/>
<value name='Chinese'/>
<value name='Chinese-Traditional'/>
<value name='French'/>
<value name='German'/>
<value name='Greek'/>
+ <value name='Hindi'/>
<value name='Hungarian'/>
<value name='Indonesian'/>
<value name='Italian'/>
]]>
</docs>
</option>
- <option type='list' id='STRIP_FROM_PATH' format='string' depends='FULL_PATH_NAMES'>
+ <option type='list' id='STRIP_FROM_PATH' format='dir' depends='FULL_PATH_NAMES'>
<docs>
<![CDATA[
The \c STRIP_FROM_PATH tag
]]>
</docs>
</option>
- <option type='list' id='STRIP_FROM_INC_PATH' format='string'>
+ <option type='list' id='STRIP_FROM_INC_PATH' format='dir'>
<docs>
<![CDATA[
The \c STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
<option type='int' id='NUM_PROC_THREADS' defval='1' minval='0' maxval='32'>
<docs>
<![CDATA[
- The \c NUM_PROC_THREADS specifies the number threads doxygen is allowed to use during
+ The \c NUM_PROC_THREADS specifies the number of threads doxygen is allowed to use during
processing. When set to \c 0 doxygen will based this on the number of cores
available in the system. You can set it explicitly to a value larger than 0
to get more control over the balance between CPU load and processing speed.
whose names only differ in casing), the option must be set to \c YES to properly deal with such files
in case they appear in the input.
- For filesystems that are not case sensitive the option should be be set to \c NO to properly
+ For filesystems that are not case sensitive the option should be set to \c NO to properly
deal with output files written for symbols that only differ in casing, such as for two classes,
one named \c CLASS and the other named \c Class, and to also support references to files without
having to specify the exact matching casing.
Optionally the format may contain
<code>$version</code>, which will be replaced by the version of the file (if it could
be obtained via \ref cfg_file_version_filter "FILE_VERSION_FILTER")
+
+ \sa \ref cfg_warn_line_format "WARN_LINE_FORMAT"
+]]>
+ </docs>
+ </option>
+ <option type='string' id='WARN_LINE_FORMAT' format='string' defval='at line $line of file $file'>
+ <docs>
+<![CDATA[
+ In the `$text` part of the \ref cfg_warn_format "WARN_FORMAT" command it is
+ possible that a reference to a more specific place is given. To make it easier
+ to jump to this place (outside of doxygen) the user can define a custom
+ "cut" / "paste" string.
+
+ Example:
+ \verbatim
+ WARN_LINE_FORMAT = "'vi $file +$line'"
+ \endverbatim
+
+ \sa \ref cfg_warn_format "WARN_FORMAT"
]]>
</docs>
</option>
The \c WARN_LOGFILE tag can be used to specify a file to which warning
and error messages should be written. If left blank the output is written
to standard error (`stderr`). In case the file specified cannot be opened for
- writing the warning and error messages are written to standard error. When as
+ writing the warning and error messages are written to standard error. When as
file `-` is specified the warning and error messages are written to standard output
(`stdout`).
]]>
With \c MATHJAX_VERSION it is possible to specify the MathJax version to be used.
Note that the different versions of MathJax have different requirements with regards to
the different settings, so it is possible that also other MathJax settings have to be changed
- when switching between the different MathJax versions.
+ when switching between the different MathJax versions.
]]>
</docs>
<value name="MathJax_2"/>
version of the word "Bibliography".
This setting is typically used in combination with the block name `CITATIONS_PRESENT`.
<dt><code>$latexbibstyle</code><dd>will be replaced with the latex bib style to be used as
- as set by \ref cfg_latex_bib_style "LATEX_BIB_STYLE", in case nothing is set the bib style
+ set by \ref cfg_latex_bib_style "LATEX_BIB_STYLE", in case nothing is set the bib style
`plain` is used.
This setting is typically used in combination with the block name `CITATIONS_PRESENT`.
<dt><code>$latexbibfiles</code><dd>will be replaced by the comma separated list of `bib`. files
The \c INCLUDE_PATH tag can be used to specify one or more directories that
contain include files that are not input files but should be processed by
the preprocessor.
+
+ Note that the \c INCLUDE_PATH is not recursive, so the setting of \ref cfg_recursive "RECURSIVE"
+ has no effect here.
]]>
</docs>
</option>
will be shown as texts / links.
]]>
</docs>
- <value name="NO" />
- <value name="YES" />
- <value name="TEXT" />
- <value name="GRAPH" />
+ <value name="NO" bool_representation="NO" />
+ <value name="YES" bool_representation="YES" />
+ <value name="TEXT" bool_representation="YES" />
+ <value name="GRAPH" bool_representation="YES" />
</option>
<option type='bool' id='COLLABORATION_GRAPH' defval='1' depends='HAVE_DOT'>
<docs>
<![CDATA[
If the \c GROUP_GRAPHS tag is set to \c YES then doxygen
will generate a graph for groups, showing the direct groups dependencies.
+
+ See also the chapter \ref grouping "Grouping" in the manual.
]]>
</docs>
</option>
]]>
</docs>
</option>
- <option type='string' id='DOT_PATH' format='dir' defval='' depends='HAVE_DOT'>
+ <option type='string' id='DOT_PATH' format='filedir' defval='' depends='HAVE_DOT'>
<docs>
<![CDATA[
The \c DOT_PATH tag can be used to specify the path where the \c dot tool can be found.
docC = transformDocs(doc)
return docC;
+
def parseOption(node):
# Handling part for Doxyfile
name = node.getAttribute('id')
type = n.getAttribute('type')
name = n.getAttribute('id')
if type=='enum':
- print(" %-22s update_%-46s { m_%s = %s(v); return v; }" % (name+'_t',name+'('+name+'_t '+' v)',name,name+'_enum2str'))
+ print(" [[maybe_unused]] %-22s update_%-46s { m_%s = %s(v); return v; }" % (name+'_t',name+'('+name+'_t '+' v)',name,name+'_enum2str'))
elif type in map:
- print(" %-22s update_%-46s { m_%s = v; return m_%s; }" % (map[type],name+'('+map[type]+' v)',name,name))
+ print(" [[maybe_unused]] %-22s update_%-46s { m_%s = v; return m_%s; }" % (map[type],name+'('+map[type]+' v)',name,name))
if len(setting) > 0:
print("#endif")
+def parseGroupMapAvailable(node):
+ for n in node.childNodes:
+ if n.nodeType == Node.ELEMENT_NODE:
+ setting = n.getAttribute('setting')
+ type = n.getAttribute('type')
+ name = n.getAttribute('id')
+ if type=='enum':
+ if len(setting) > 0:
+ print("#if %s" % (setting))
+ print(" %-22s isAvailable_%-41s { return v.lower() == %s_enum2str(%s_str2enum(v)).lower(); }" % ('bool',name+'(QCString v)',name,name));
+ if len(setting) > 0:
+ print("#endif")
+
def parseGroupMapVar(node):
map = { 'bool':'bool', 'string':'QCString', 'enum':'QCString', 'int':'int', 'list':'StringVector' }
for n in node.childNodes:
if len(setting) > 0:
print("#endif")
+def getEnum2BoolMapping(node):
+ def escape(value):
+ return re.sub(r'[^\w]','_',value)
+ mapping = []
+ for nv in node.childNodes:
+ if nv.nodeName == "value":
+ name = nv.getAttribute("name")
+ bool_rep = nv.getAttribute("bool_representation")
+ if name and bool_rep:
+ bool_value = "true" if bool_rep and bool_rep.upper() == 'YES' else "false"
+ mapping.append( "{{ \"{0}\", \"{1}\" }}".format(escape(name),bool_value))
+ return mapping
+
def parseGroupMapInit(node):
map = { 'bool':'Bool', 'string':'String', 'enum':'String', 'int':'Int', 'list':'List' }
for n in node.childNodes:
type = n.getAttribute('type')
name = n.getAttribute('id')
if type in map:
- print(" { %-25s Info{ %-13s &ConfigValues::m_%s }}," % ('\"'+name+'\",','Info::'+map[type]+',',name))
+ if type == "enum":
+ mappingStr = "{%s}" % (', '.join(getEnum2BoolMapping(n)))
+ print(" { %-26s Info{ %-13s &ConfigValues::m_%-23s %s}}," % ('\"'+name+'\",','Info::'+map[type]+',',name+",", mappingStr))
+ else:
+ print(" { %-26s Info{ %-13s &ConfigValues::m_%-24s}}," % ('\"'+name+'\",','Info::'+map[type]+',',name))
if len(setting) > 0:
print("#endif")
if n.nodeType == Node.ELEMENT_NODE:
if n.nodeName == "group":
parseGroupMapSetter(n)
+ for n in elem.childNodes:
+ if n.nodeType == Node.ELEMENT_NODE:
+ if n.nodeName == "group":
+ parseGroupMapAvailable(n)
print(" void init();")
print(" StringVector fields() const;")
print(" struct Info")
print(" {")
print(" enum Type { Bool, Int, String, List, Unknown };")
+ print(" using Enum2BoolMap = std::unordered_map<std::string,bool>;");
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,QCString ConfigValues::*s, Enum2BoolMap boolMap = {}) : type(t), value(s), m_boolMap(boolMap) {}")
print(" Info(Type t,StringVector ConfigValues::*l) : type(t), value(l) {}")
print(" Type type;")
print(" union Item")
print(" QCString ConfigValues::*s;")
print(" StringVector ConfigValues::*l;")
print(" } value;")
+ print(" bool getBooleanRepresentation() const;")
+ print(" private:")
+ print(" Enum2BoolMap m_boolMap;")
print(" };")
print(" const Info *get(const QCString &tag) const;")
+ print("")
print(" private:")
for n in elem.childNodes:
if n.nodeType == Node.ELEMENT_NODE:
print("")
print(" };")
print("}")
+ print("")
+ print("bool ConfigValues::Info::getBooleanRepresentation() const")
+ print("{")
+ print(" if (!m_boolMap.empty())")
+ print(" {")
+ print(" auto it = m_boolMap.find((ConfigValues::instance().*(value.s)).str());")
+ print(" if (it!=m_boolMap.end())")
+ print(" {")
+ print(" return it->second;");
+ print(" }")
+ print(" }")
+ print(" return false;")
+ 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")
void substEnvVars() {}
};
-/** Class respresenting a list type option.
+/** Class representing a list type option.
*/
class ConfigList : public ConfigOption
{
#include "version.h"
#include "portable.h"
#include "message.h"
-#include "lang_cfg.h"
#include "language.h"
#include "configoptions.h"
#include "fileinfo.h"
{
config_term("%s<%d>: Internal error: Requested option %s not of string type!\n",fileName,num,name);
}
- return *((ConfigString *)it->second)->valueRef();
+ return *(dynamic_cast<ConfigString *>(it->second))->valueRef();
}
StringVector &ConfigImpl::getList(const char *fileName,int num,const char *name) const
{
config_term("%s<%d>: Internal error: Requested option %s not of list type!\n",fileName,num,name);
}
- return *((ConfigList *)it->second)->valueRef();
+ return *(dynamic_cast<ConfigList *>(it->second))->valueRef();
}
QCString &ConfigImpl::getEnum(const char *fileName,int num,const char *name) const
{
config_term("%s<%d>: Internal error: Requested option %s not of enum type!\n",fileName,num,name);
}
- return *((ConfigEnum *)it->second)->valueRef();
+ return *(dynamic_cast<ConfigEnum *>(it->second))->valueRef();
}
int &ConfigImpl::getInt(const char *fileName,int num,const char *name) const
{
config_term("%s<%d>: Internal error: Requested option %s not of integer type!\n",fileName,num,name);
}
- return *((ConfigInt *)it->second)->valueRef();
+ return *(dynamic_cast<ConfigInt *>(it->second))->valueRef();
}
bool &ConfigImpl::getBool(const char *fileName,int num,const char *name) const
{
config_term("%s<%d>: Internal error: Requested option %s not of boolean type!\n",fileName,num,name);
}
- return *((ConfigBool *)it->second)->valueRef();
+ return *(dynamic_cast<ConfigBool *>(it->second))->valueRef();
}
/* ------------------------------------------ */
else
{
//assert(g_includeStack.current()->newState==YY_CURRENT_BUFFER);
- return (yy_size_t)fread(buf,1,max_size,g_includeStack.back()->filePtr);
+ return static_cast<yy_size_t>(fread(buf,1,max_size,g_includeStack.back()->filePtr));
}
}
const QCString &outputEncoding)
{
if (inputEncoding.isEmpty() || outputEncoding.isEmpty() || inputEncoding==outputEncoding) return str;
- int inputSize=str.length();
- int outputSize=inputSize*4+1;
+ size_t inputSize=str.length();
+ size_t outputSize=inputSize*4+1;
QCString output(outputSize);
void *cd = portable_iconv_open(outputEncoding.data(),inputEncoding.data());
- if (cd==(void *)(-1))
+ if (cd==reinterpret_cast<void *>(-1))
{
config_term("Error: unsupported character conversion: '%s'->'%s'\n",
qPrint(inputEncoding),qPrint(outputEncoding));
}
- size_t iLeft=(size_t)inputSize;
- size_t oLeft=(size_t)outputSize;
+ size_t iLeft=inputSize;
+ size_t oLeft=outputSize;
const char *inputPtr = str.data();
char *outputPtr = output.rawData();
if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft))
{
- outputSize-=(int)oLeft;
+ outputSize-=oLeft;
output.resize(outputSize+1);
output.at(outputSize)='\0';
//printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,qPrint(srcBuf));
static void checkEncoding()
{
- ConfigString *option = (ConfigString*)g_config->get("DOXYFILE_ENCODING");
+ ConfigString *option = dynamic_cast<ConfigString*>(g_config->get("DOXYFILE_ENCODING"));
g_encoding = *option->valueRef();
}
BEGIN(SkipInvalid);
break;
case ConfigOption::O_List:
- g_list = ((ConfigList *)option)->valueRef();
+ g_list = dynamic_cast<ConfigList *>(option)->valueRef();
g_list->clear();
g_listStr="";
BEGIN(GetStrList);
break;
case ConfigOption::O_Enum:
- g_string = ((ConfigEnum *)option)->valueRef();
+ g_string = dynamic_cast<ConfigEnum *>(option)->valueRef();
g_string->resize(0);
BEGIN(GetString);
break;
case ConfigOption::O_String:
- g_string = ((ConfigString *)option)->valueRef();
+ g_string = dynamic_cast<ConfigString *>(option)->valueRef();
g_string->resize(0);
BEGIN(GetString);
break;
case ConfigOption::O_Int:
- g_string = ((ConfigInt *)option)->valueStringRef();
+ g_string = dynamic_cast<ConfigInt *>(option)->valueStringRef();
g_string->resize(0);
BEGIN(GetString);
break;
case ConfigOption::O_Bool:
- g_string = ((ConfigBool *)option)->valueStringRef();
+ g_string = dynamic_cast<ConfigBool *>(option)->valueStringRef();
g_string->resize(0);
BEGIN(GetString);
break;
" To avoid this warning please remove this line from your configuration "
"file or upgrade it using \"doxygen -u\"\n", qPrint(g_cmd),g_yyLineNr,qPrint(g_yyFileName));
}
- ((ConfigObsolete*)option)->markAsPresent();
- if (((ConfigObsolete*)option)->orgType()==ConfigOption::O_List)
+ dynamic_cast<ConfigObsolete*>(option)->markAsPresent();
+ if (dynamic_cast<ConfigObsolete*>(option)->orgType()==ConfigOption::O_List)
{
- g_list = ((ConfigObsolete*)option)->valueListRef();
+ g_list = dynamic_cast<ConfigObsolete*>(option)->valueListRef();
g_list->clear();
g_listStr="";
BEGIN(GetStrList);
}
else
{
- g_string = ((ConfigObsolete*)option)->valueStringRef();
+ g_string = dynamic_cast<ConfigObsolete*>(option)->valueStringRef();
g_string->resize(0);
BEGIN(GetString);
}
BEGIN(SkipInvalid);
break;
case ConfigOption::O_List:
- g_list = ((ConfigList *)option)->valueRef();
+ g_list = dynamic_cast<ConfigList *>(option)->valueRef();
g_listStr="";
BEGIN(GetStrList);
break;
config_warn("Tag '%s' at line %d of file %s has become obsolete.\n"
"To avoid this warning please update your configuration "
"file using \"doxygen -u\"\n", qPrint(g_cmd),g_yyLineNr,qPrint(g_yyFileName));
- if (((ConfigObsolete*)option)->orgType()==ConfigOption::O_List)
+ if (dynamic_cast<ConfigObsolete*>(option)->orgType()==ConfigOption::O_List)
{
- g_list = ((ConfigObsolete*)option)->valueListRef();
+ g_list = dynamic_cast<ConfigObsolete*>(option)->valueListRef();
g_listStr="";
BEGIN(GetStrList);
}
checkList(Config_getList(EXTRA_SEARCH_MAPPINGS),"EXTRA_SEARCH_MAPPING",TRUE,TRUE);
}
+ int numThreads = Config_getInt(NUM_PROC_THREADS);
+ if (numThreads==0)
+ {
+ numThreads = static_cast<int>(std::thread::hardware_concurrency());
+ Config_updateInt(NUM_PROC_THREADS,numThreads);
+ }
+
//------------------------
// check for settings that are inconsistent with having GENERATE_HTMLHELP enabled
const char *depOption = "GENERATE_HTMLHELP";
adjustBoolSetting( depOption, "GENERATE_TREEVIEW", false );
adjustBoolSetting( depOption, "SEARCHENGINE", false );
+ adjustBoolSetting( depOption, "HTML_DYNAMIC_MENUS", false );
+ adjustBoolSetting( depOption, "HTML_DYNAMIC_SECTIONS",false );
adjustStringSetting(depOption, "HTML_FILE_EXTENSION", ".html");
}
Config_updateInt(DOT_NUM_THREADS,dotNumThreads);
//------------------------
- // check dot path
- QCString dotPath = Config_getString(DOT_PATH);
- if (!dotPath.isEmpty())
- {
- FileInfo fi(dotPath.str());
- if (fi.exists() && fi.isFile()) // user specified path + exec
- {
- dotPath=fi.dirPath(TRUE)+"/";
- }
- else
- {
- QCString dotExe = dotPath+"/dot"+Portable::commandExtension();
- FileInfo dp(dotExe.str());
- if (!dp.exists() || !dp.isFile())
- {
- warn_uncond("the dot tool could not be found at %s\n",qPrint(dotPath));
- dotPath="";
- }
- else
- {
- dotPath=dp.dirPath(TRUE)+"/";
- }
- }
-#if defined(_WIN32) // convert slashes
- uint i=0,l=dotPath.length();
- for (i=0;i<l;i++) if (dotPath.at(i)=='/') dotPath.at(i)='\\';
-#endif
- Config_updateString(DOT_PATH,dotPath);
- }
-
- //------------------------
// check plantuml path
QCString plantumlJarPath = Config_getString(PLANTUML_JAR_PATH);
if (!plantumlJarPath.isEmpty())
ConfigImpl::instance()->writeTemplate(t,shortList,update);
}
-void Config::compareDoxyfile(TextStream &t)
+void Config::compareDoxyfile(TextStream &t,DoxyfileSettings diffList)
{
- postProcess(FALSE, TRUE);
+ postProcess(FALSE, diffList);
ConfigImpl::instance()->compareDoxyfile(t);
}
// Internally we use the default format UTF-8 and
// when updating etc. the output is in this format as well and not in the read format
- ConfigString *option = (ConfigString*)g_config->get("DOXYFILE_ENCODING");
+ ConfigString *option = dynamic_cast<ConfigString*>(g_config->get("DOXYFILE_ENCODING"));
option->init();
return parseRes;
}
-void Config::postProcess(bool clearHeaderAndFooter, bool compare)
+void Config::postProcess(bool clearHeaderAndFooter, DoxyfileSettings diffList)
{
- ConfigImpl::instance()->substituteEnvironmentVars();
- if (!compare)ConfigImpl::instance()->emptyValueToDefault();
+ if (diffList != DoxyfileSettings::CompressedNoEnv) ConfigImpl::instance()->substituteEnvironmentVars();
+ if (diffList == DoxyfileSettings::Full)ConfigImpl::instance()->emptyValueToDefault();
ConfigImpl::instance()->convertStrToVal();
// avoid bootstrapping issues when the g_config file already
static yy_size_t yyread(char *buf,yy_size_t max_size,yyscan_t yyscanner)
{
- struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t *yyg = static_cast<struct yyguts_t*>(yyscanner);
yy_size_t c=0;
while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
{
//printf("Result: %ld\n",(long)g_resultValue);
printlex(yy_flex_debug, false, __FILE__, fileName);
- bool result = (long)yyextra->resultValue!=0;
+ bool result = static_cast<long>(yyextra->resultValue)!=0;
return result;
}
*/
T &get(const TOwner *owner) const
{
- // create a lamda function to create the cached data
+ // create a lambda function to create the cached data
auto creatorFunc = [this,owner]() { m_item = (owner->*creator)(); };
// use std::call_once to let one thread invoke the creator func
std::call_once(m_cache_flag, creatorFunc);
{
public:
GenericConstIterator(const TemplateVariantList &list) : m_list(list) {}
- virtual ~GenericConstIterator() {}
void toFirst()
{
m_index=0;
}
// TemplateListIntf methods
- uint count() const
+ size_t count() const
{
- return static_cast<uint>(m_children.size());
+ return m_children.size();
}
- TemplateVariant at(uint index) const
+ TemplateVariant at(size_t index) const
{
TemplateVariant result;
if (index<count())
{
if (m_javaOpt || m_vhdlOpt)
{
- return theTranslator->trPackages();
+ return theTranslator->trPackageList();
}
else if (m_fortranOpt || m_sliceOpt)
{
{
if (m_javaOpt || m_vhdlOpt)
{
- return theTranslator->trPackageMembers();
+ return theTranslator->trPackageFunctions();
}
else if (m_fortranOpt || m_sliceOpt)
{
}
TemplateVariant fileMembersDescription() const
{
- static bool extractAll = Config_getBool(EXTRACT_ALL);
+ bool extractAll = Config_getBool(EXTRACT_ALL);
return theTranslator->trFileMembersDescription(extractAll);
}
TemplateVariant namespaceMembersDescription() const
{
- static bool extractAll = Config_getBool(EXTRACT_ALL);
+ bool extractAll = Config_getBool(EXTRACT_ALL);
return theTranslator->trNamespaceMemberDescription(extractAll);
}
TemplateVariant classHierarchyDescription() const
}
TemplateVariant classMembersDescription() const
{
- static bool extractAll = Config_getBool(EXTRACT_ALL);
- static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ bool extractAll = Config_getBool(EXTRACT_ALL);
+ bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
if (fortranOpt)
{
return theTranslator->trCompoundMembersDescriptionFortran(extractAll);
}
TemplateVariant functions() const
{
- static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
- static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
return fortranOpt ? theTranslator->trSubprograms() :
vhdlOpt ? theTranslator->trFunctionAndProc() :
theTranslator->trFunctions();
}
TemplateVariant variables() const
{
- static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
+ bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
return sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables();
}
TemplateVariant typedefs() const
}
TemplateVariant langString() const
{
- return HtmlHelp::getLanguageString();
+ return theTranslator->getLanguageString();
}
TemplateVariant code() const
{
const QCString &relPath,const QCString &docStr,bool isBrief)
{
TemplateVariant result;
- std::unique_ptr<IDocParser> parser { createDocParser() };
- std::unique_ptr<DocRoot> root { validatingParseDoc(
- *parser.get(),file,line,def,0,docStr,TRUE,FALSE,
- QCString(),isBrief,FALSE,Config_getBool(MARKDOWN_SUPPORT))
- };
- TextStream ts;
- switch (g_globals.outputFormat)
+ auto parser { createDocParser() };
+ auto ast { validatingParseDoc(*parser.get(),file,line,def,0,docStr,TRUE,FALSE,
+ QCString(),isBrief,FALSE,Config_getBool(MARKDOWN_SUPPORT))
+ };
+ const DocNodeAST *astImpl = dynamic_cast<DocNodeAST*>(ast.get());
+ if (astImpl)
{
- case ContextOutputFormat_Html:
- {
- HtmlCodeGenerator codeGen(ts,relPath);
- HtmlDocVisitor visitor(ts,codeGen,def);
- root->accept(&visitor);
- }
- break;
- case ContextOutputFormat_Latex:
- {
- LatexCodeGenerator codeGen(ts,relPath,file);
- LatexDocVisitor visitor(ts,codeGen,def->getDefFileExtension(),FALSE);
- root->accept(&visitor);
- }
- break;
- // TODO: support other generators
- default:
- err("context.cpp: output format not yet supported\n");
- break;
+ TextStream ts;
+ switch (g_globals.outputFormat)
+ {
+ case ContextOutputFormat_Html:
+ {
+ HtmlCodeGenerator codeGen(ts,relPath);
+ HtmlDocVisitor visitor(ts,codeGen,def);
+ std::visit(visitor,astImpl->root);
+ }
+ break;
+ case ContextOutputFormat_Latex:
+ {
+ LatexCodeGenerator codeGen(ts,relPath,file);
+ LatexDocVisitor visitor(ts,codeGen,def->getDefFileExtension(),FALSE);
+ std::visit(visitor,astImpl->root);
+ }
+ break;
+ // TODO: support other generators
+ default:
+ err("context.cpp: output format not yet supported\n");
+ break;
+ }
+ bool isEmpty = astImpl->isEmpty();
+ if (isEmpty)
+ result = "";
+ else
+ result = TemplateVariant(ts.str().c_str(),TRUE);
}
- bool isEmpty = root->isEmpty();
- if (isEmpty)
- result = "";
- else
- result = TemplateVariant(ts.str().c_str(),TRUE);
return result;
}
static TemplateVariant parseCode(const FileDef *fd,const QCString &relPath)
{
- static bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES);
+ bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES);
auto intf = Doxygen::parserManager->getCodeParser(fd->getDefFileExtension());
intf->resetCodeParserState();
TextStream t;
m_sourceDef = TemplateImmutableList::alloc( {} );
}
}
- virtual ~DefinitionContext() {}
+ virtual ~DefinitionContext() = default;
protected:
// Property getters
QCString relPathAsString() const
{
- static bool createSubdirs = Config_getBool(CREATE_SUBDIRS);
+ bool createSubdirs = Config_getBool(CREATE_SUBDIRS);
return createSubdirs ? QCString("../../") : QCString("");
}
virtual TemplateVariant relPath() const { return relPathAsString(); }
}
protected:
- struct Cachable : public Definition::Cookie
+ struct Cachable
{
using DC = DefinitionContext<T>;
CachedItem<TemplateVariant, DC, &DC::createDetails> details;
}
// TemplateListIntf
-uint IncludeInfoListContext::count() const
+size_t IncludeInfoListContext::count() const
{
return p->count();
}
-TemplateVariant IncludeInfoListContext::at(uint index) const
+TemplateVariant IncludeInfoListContext::at(size_t index) const
{
return p->at(index);
}
m_classDef(cd)
{
}
- virtual ~Private() {}
// TemplateStructIntf methods
TemplateVariant get(const QCString &n) const { return s_inst.get(this,n); }
TemplateVariant hasInheritanceDiagram() const
{
bool result=FALSE;
- static bool haveDot = Config_getBool(HAVE_DOT);
- static auto classGraph = Config_getEnum(CLASS_GRAPH);
+ bool haveDot = Config_getBool(HAVE_DOT);
+ auto classGraph = Config_getEnum(CLASS_GRAPH);
bool classGraphEnabled = classGraph==CLASS_GRAPH_t::YES || classGraph==CLASS_GRAPH_t::GRAPH;
if (haveDot && classGraphEnabled)
TemplateVariant inheritanceDiagram() const
{
TextStream t;
- static bool haveDot = Config_getBool(HAVE_DOT);
- static auto classGraph = Config_getEnum(CLASS_GRAPH);
+ bool haveDot = Config_getBool(HAVE_DOT);
+ auto classGraph = Config_getEnum(CLASS_GRAPH);
bool classGraphEnabled = classGraph==CLASS_GRAPH_t::YES || classGraph==CLASS_GRAPH_t::GRAPH;
if (haveDot && classGraphEnabled)
}
TemplateVariant hasCollaborationDiagram() const
{
- static bool haveDot = Config_getBool(HAVE_DOT);
+ bool haveDot = Config_getBool(HAVE_DOT);
return haveDot && !getCollaborationGraph()->isTrivial();
}
TemplateVariant collaborationDiagram() const
{
- static bool haveDot = Config_getBool(HAVE_DOT);
+ bool haveDot = Config_getBool(HAVE_DOT);
TextStream t;
if (haveDot)
{
}
TemplateVariant createPackageMethods() const
{
- return createMemberList(MemberListType_pacMethods,theTranslator->trPackageMembers());
+ return createMemberList(MemberListType_pacMethods,theTranslator->trPackageFunctions());
}
TemplateVariant createPackageStaticMethods() const
{
- return createMemberList(MemberListType_pacStaticMethods,theTranslator->trStaticPackageMembers());
+ return createMemberList(MemberListType_pacStaticMethods,theTranslator->trStaticPackageFunctions());
}
TemplateVariant createPackageAttributes() const
{
ctx->addMemberList(m_classDef,MemberListType_proAttribs,theTranslator->trProtectedAttribs());
ctx->addMemberList(m_classDef,MemberListType_proStaticAttribs,theTranslator->trStaticProtectedAttribs());
ctx->addMemberList(m_classDef,MemberListType_pacTypes,theTranslator->trPackageTypes());
- ctx->addMemberList(m_classDef,MemberListType_pacMethods,theTranslator->trPackageMembers());
- ctx->addMemberList(m_classDef,MemberListType_pacStaticMethods,theTranslator->trStaticPackageMembers());
+ ctx->addMemberList(m_classDef,MemberListType_pacMethods,theTranslator->trPackageFunctions());
+ ctx->addMemberList(m_classDef,MemberListType_pacStaticMethods,theTranslator->trStaticPackageFunctions());
ctx->addMemberList(m_classDef,MemberListType_pacAttribs,theTranslator->trPackageAttribs());
ctx->addMemberList(m_classDef,MemberListType_pacStaticAttribs,theTranslator->trStaticPackageAttribs());
ctx->addMemberList(m_classDef,MemberListType_properties,theTranslator->trProperties());
m_namespaceDef(nd)
{
}
- virtual ~Private() {}
// TemplateStructIntf methods
TemplateVariant get(const QCString &n) const { return s_inst.get(this,n); }
private:
TemplateVariant createClasses() const
{
- static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
+ bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
TemplateVariantList classList;
classList.reserve(m_namespaceDef->getClasses().size());
for (const auto &cd : m_namespaceDef->getClasses())
}
TemplateVariant createVariables() const
{
- static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
+ bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
return createMemberList(MemberListType_decVarMembers, sliceOpt ? theTranslator->trConstants() :
theTranslator->trVariables());
}
}
TemplateVariant createDetailedVariables() const
{
- static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
+ bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
return createMemberList(MemberListType_docVarMembers, sliceOpt ? theTranslator->trConstantDocumentation() :
theTranslator->trVariableDocumentation());
}
{
if (fd==0) abort();
}
- virtual ~Private() {}
// TemplateStructIntf methods
TemplateVariant get(const QCString &n) const { return s_inst.get(this,n); }
TemplateVariant hasIncludeGraph() const
{
- static bool haveDot = Config_getBool(HAVE_DOT);
+ bool haveDot = Config_getBool(HAVE_DOT);
DotInclDepGraphPtr incGraph = getIncludeGraph();
return (haveDot && !incGraph->isTooBig() && !incGraph->isTrivial());
}
TemplateVariant includeGraph() const
{
- static bool haveDot = Config_getBool(HAVE_DOT);
+ bool haveDot = Config_getBool(HAVE_DOT);
TextStream t;
if (haveDot)
{
}
TemplateVariant hasIncludedByGraph() const
{
- static bool haveDot = Config_getBool(HAVE_DOT);
+ bool haveDot = Config_getBool(HAVE_DOT);
DotInclDepGraphPtr incGraph = getIncludedByGraph();
return (haveDot && !incGraph->isTooBig() && !incGraph->isTrivial());
}
TemplateVariant includedByGraph() const
{
- static bool haveDot = Config_getBool(HAVE_DOT);
+ bool haveDot = Config_getBool(HAVE_DOT);
TextStream t;
if (haveDot)
{
}
TemplateVariant createVariables() const
{
- static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
+ bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
return createMemberList(MemberListType_decVarMembers, sliceOpt ? theTranslator->trConstants() :
theTranslator->trVariables());
}
Private(const DirDef *dd) : DefinitionContext<DirContext::Private>(dd) , m_dirDef(dd)
{
}
- virtual ~Private() {}
// TemplateStructIntf methods
TemplateVariant get(const QCString &n) const { return s_inst.get(this,n); }
TemplateVariant hasDirGraph() const
{
bool result=FALSE;
- static bool haveDot = Config_getBool(HAVE_DOT);
- static bool dirGraph = Config_getBool(DIRECTORY_GRAPH);
+ bool haveDot = Config_getBool(HAVE_DOT);
+ bool dirGraph = Config_getBool(DIRECTORY_GRAPH);
if (haveDot && dirGraph)
{
DotDirDepsPtr graph = getDirDepsGraph();
TemplateVariant dirGraph() const
{
TextStream t;
- static bool haveDot = Config_getBool(HAVE_DOT);
- static bool dirGraph = Config_getBool(DIRECTORY_GRAPH);
+ bool haveDot = Config_getBool(HAVE_DOT);
+ bool dirGraph = Config_getBool(DIRECTORY_GRAPH);
if (haveDot && dirGraph)
{
DotDirDepsPtr graph = getDirDepsGraph();
m_isExample(isExample)
{
}
- virtual ~Private() {}
// TemplateStructIntf methods
TemplateVariant get(const QCString &n) const { return s_inst.get(this,n); }
const QCString &anchor,const QCString &text
) const
{
- static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
+ bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
if (ref.isEmpty() && pdfHyperlinks)
{
m_ts << "\\mbox{\\hyperlink{";
return 0;
}
private:
- TextGeneratorFactory() {}
- virtual ~TextGeneratorFactory() {}
+ TextGeneratorFactory() = default;
+ virtual ~TextGeneratorFactory() = default;
};
TemplateVariant createLinkedText(const Definition *def,const QCString &relPath,const QCString &text)
Private(const MemberDef *md) : DefinitionContext<MemberContext::Private>(md) , m_memberDef(md)
{
}
- virtual ~Private() {}
// TemplateStructIntf methods
TemplateVariant get(const QCString &n) const { return s_inst.get(this,n); }
}
TemplateVariant hasCallGraph() const
{
- static bool haveDot = Config_getBool(HAVE_DOT);
+ bool haveDot = Config_getBool(HAVE_DOT);
if (m_memberDef->hasCallGraph() && haveDot &&
(m_memberDef->isFunction() || m_memberDef->isSlot() || m_memberDef->isSignal()))
{
}
TemplateVariant hasCallerGraph() const
{
- static bool haveDot = Config_getBool(HAVE_DOT);
+ bool haveDot = Config_getBool(HAVE_DOT);
if (m_memberDef->hasCallerGraph() && haveDot &&
(m_memberDef->isFunction() || m_memberDef->isSlot() || m_memberDef->isSignal()))
{
m_conceptDef(cd)
{
}
- virtual ~Private() {}
// TemplateStructIntf methods
TemplateVariant get(const QCString &n) const { return s_inst.get(this,n); }
TemplateVariant hasGroupGraph() const
{
bool result=FALSE;
- static bool haveDot = Config_getBool(HAVE_DOT);
- static bool groupGraphs = Config_getBool(GROUP_GRAPHS);
+ bool haveDot = Config_getBool(HAVE_DOT);
+ bool groupGraphs = Config_getBool(GROUP_GRAPHS);
if (haveDot && groupGraphs)
{
DotGroupCollaborationPtr graph = getGroupGraph();
TemplateVariant groupGraph() const
{
TextStream t;
- static bool haveDot = Config_getBool(HAVE_DOT);
- static bool groupGraphs = Config_getBool(GROUP_GRAPHS);
+ bool haveDot = Config_getBool(HAVE_DOT);
+ bool groupGraphs = Config_getBool(GROUP_GRAPHS);
if (haveDot && groupGraphs)
{
DotGroupCollaborationPtr graph = getGroupGraph();
}
TemplateVariant createVariables() const
{
- static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
+ bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
return createMemberList(MemberListType_decVarMembers, sliceOpt ? theTranslator->trConstants() :
theTranslator->trVariables());
}
for (const auto &cd : classLinkedMap)
{
if (cd->getLanguage()==SrcLangExt_VHDL &&
- ((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::PACKAGECLASS ||
- (VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::PACKBODYCLASS)
+ (VhdlDocGen::convert(cd->protection())==VhdlDocGen::PACKAGECLASS ||
+ VhdlDocGen::convert(cd->protection())==VhdlDocGen::PACKBODYCLASS)
) // no architecture
{
continue;
}
// TemplateListIntf
-uint ClassListContext::count() const
+size_t ClassListContext::count() const
{
return p->count();
}
-TemplateVariant ClassListContext::at(uint index) const
+TemplateVariant ClassListContext::at(size_t index) const
{
return p->at(index);
}
for (const auto &cd : *Doxygen::classLinkedMap)
{
if (cd->getLanguage()==SrcLangExt_VHDL &&
- ((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::PACKAGECLASS ||
- (VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::PACKBODYCLASS)
+ (VhdlDocGen::convert(cd->protection())==VhdlDocGen::PACKAGECLASS ||
+ VhdlDocGen::convert(cd->protection())==VhdlDocGen::PACKBODYCLASS)
) // no architecture
{
continue;
}
QCString relPathAsString() const
{
- static bool createSubdirs = Config_getBool(CREATE_SUBDIRS);
+ bool createSubdirs = Config_getBool(CREATE_SUBDIRS);
return createSubdirs ? QCString("../../") : QCString("");
}
{
if (lde->kind()==LayoutDocEntry::MemberDef)
{
- const LayoutDocEntryMemberDef *lmd = (const LayoutDocEntryMemberDef*)lde.get();
- const MemberList *ml = toNamespaceDef(m_def)->getMemberList(lmd->type);
- if (ml)
+ const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
+ if (lmd)
{
- m_members->addMembers(*ml,visitedClasses);
+ const MemberList *ml = toNamespaceDef(m_def)->getMemberList(lmd->type);
+ if (ml)
+ {
+ m_members->addMembers(*ml,visitedClasses);
+ }
}
}
}
{
if (lde->kind()==LayoutDocEntry::MemberDef)
{
- const LayoutDocEntryMemberDef *lmd = (const LayoutDocEntryMemberDef*)lde.get();
- const MemberList *ml = toClassDef(m_def)->getMemberList(lmd->type);
- if (ml)
+ const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
+ if (lmd)
{
- m_members->addMembers(*ml,visitedClasses);
+ const MemberList *ml = toClassDef(m_def)->getMemberList(lmd->type);
+ if (ml)
+ {
+ m_members->addMembers(*ml,visitedClasses);
+ }
}
}
}
{
if (lde->kind()==LayoutDocEntry::MemberDef)
{
- const LayoutDocEntryMemberDef *lmd = (const LayoutDocEntryMemberDef*)lde.get();
- const MemberList *ml = toFileDef(m_def)->getMemberList(lmd->type);
- if (ml)
+ const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
+ if (lmd)
{
- m_members->addMembers(*ml,visitedClasses);
+ const MemberList *ml = toFileDef(m_def)->getMemberList(lmd->type);
+ if (ml)
+ {
+ m_members->addMembers(*ml,visitedClasses);
+ }
}
}
}
{
if (lde->kind()==LayoutDocEntry::MemberDef)
{
- const LayoutDocEntryMemberDef *lmd = (const LayoutDocEntryMemberDef*)lde.get();
- const MemberList *ml = toGroupDef(m_def)->getMemberList(lmd->type);
- if (ml)
+ const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
+ if (lmd)
{
- m_members->addMembers(*ml,visitedClasses);
+ const MemberList *ml = toGroupDef(m_def)->getMemberList(lmd->type);
+ if (ml)
+ {
+ m_members->addMembers(*ml,visitedClasses);
+ }
}
}
}
{
if (cd->getLanguage()==SrcLangExt_VHDL)
{
- if ((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::PACKAGECLASS ||
- (VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::PACKBODYCLASS
+ if (VhdlDocGen::convert(cd->protection())==VhdlDocGen::PACKAGECLASS ||
+ VhdlDocGen::convert(cd->protection())==VhdlDocGen::PACKBODYCLASS
)// no architecture
{
return;
for (const auto &bcd : bcl)
{
const ClassDef *cd=bcd.classDef;
- if (cd->getLanguage()==SrcLangExt_VHDL && (VhdlDocGen::VhdlClasses)cd->protection()!=VhdlDocGen::ENTITYCLASS)
+ if (cd->getLanguage()==SrcLangExt_VHDL && VhdlDocGen::convert(cd->protection())!=VhdlDocGen::ENTITYCLASS)
{
continue;
}
bool b;
if (cd->getLanguage()==SrcLangExt_VHDL)
{
- if ((VhdlDocGen::VhdlClasses)cd->protection()!=VhdlDocGen::ENTITYCLASS)
+ if (VhdlDocGen::convert(cd->protection())!=VhdlDocGen::ENTITYCLASS)
{
continue;
}
}
// TemplateListIntf
-uint NestingContext::count() const
+size_t NestingContext::count() const
{
return p->count();
}
-TemplateVariant NestingContext::at(uint index) const
+TemplateVariant NestingContext::at(size_t index) const
{
return p->at(index);
}
}
// TemplateListIntf
-uint ConceptListContext::count() const
+size_t ConceptListContext::count() const
{
return p->count();
}
-TemplateVariant ConceptListContext::at(uint index) const
+TemplateVariant ConceptListContext::at(size_t index) const
{
return p->at(index);
}
}
// TemplateListIntf
-uint NamespaceListContext::count() const
+size_t NamespaceListContext::count() const
{
return p->count();
}
-TemplateVariant NamespaceListContext::at(uint index) const
+TemplateVariant NamespaceListContext::at(size_t index) const
{
return p->at(index);
}
TemplateVariant preferredDepth() const { return m_preferredDepth.get(this); }
TemplateVariant title() const
{
- return Config_getBool(OPTIMIZE_OUTPUT_JAVA) ? theTranslator->trPackages() :
- Config_getBool(OPTIMIZE_OUTPUT_VHDL) ? theTranslator->trPackages() :
+ return Config_getBool(OPTIMIZE_OUTPUT_JAVA) ? theTranslator->trPackageList() :
+ Config_getBool(OPTIMIZE_OUTPUT_VHDL) ? theTranslator->trPackageList() :
Config_getBool(OPTIMIZE_FOR_FORTRAN) ? theTranslator->trModulesList() :
Config_getBool(OPTIMIZE_OUTPUT_SLICE) ? theTranslator->trModulesList() :
theTranslator->trNamespaceList();
}
// TemplateListIntf
-uint FileListContext::count() const
+size_t FileListContext::count() const
{
return p->count();
}
-TemplateVariant FileListContext::at(uint index) const
+TemplateVariant FileListContext::at(size_t index) const
{
return p->at(index);
}
}
// TemplateListIntf
-uint DirListContext::count() const
+size_t DirListContext::count() const
{
return p->count();
}
-TemplateVariant DirListContext::at(uint index) const
+TemplateVariant DirListContext::at(size_t index) const
{
return p->at(index);
}
}
// TemplateListIntf
-uint UsedFilesContext::count() const
+size_t UsedFilesContext::count() const
{
return p->count();
}
-TemplateVariant UsedFilesContext::at(uint index) const
+TemplateVariant UsedFilesContext::at(size_t index) const
{
return p->at(index);
}
}
// TemplateListIntf
-uint PageListContext::count() const
+size_t PageListContext::count() const
{
return p->count();
}
-TemplateVariant PageListContext::at(uint index) const
+TemplateVariant PageListContext::at(size_t index) const
{
return p->at(index);
}
}
// TemplateListIntf
-uint ExampleListContext::count() const
+size_t ExampleListContext::count() const
{
return p->count();
}
-TemplateVariant ExampleListContext::at(uint index) const
+TemplateVariant ExampleListContext::at(size_t index) const
{
return p->at(index);
}
}
// TemplateListIntf
-uint ModuleListContext::count() const
+size_t ModuleListContext::count() const
{
return p->count();
}
-TemplateVariant ModuleListContext::at(uint index) const
+TemplateVariant ModuleListContext::at(size_t index) const
{
return p->at(index);
}
}
QCString relPathAsString() const
{
- static bool createSubdirs = Config_getBool(CREATE_SUBDIRS);
+ bool createSubdirs = Config_getBool(CREATE_SUBDIRS);
return createSubdirs ? QCString("../../") : QCString("");
}
private:
TemplateVariant createGraph() const
{
TextStream t;
- static bool haveDot = Config_getBool(HAVE_DOT);
- static bool graphicalHierarchy = Config_getBool(GRAPHICAL_HIERARCHY);
+ bool haveDot = Config_getBool(HAVE_DOT);
+ bool graphicalHierarchy = Config_getBool(GRAPHICAL_HIERARCHY);
if (haveDot && graphicalHierarchy)
{
m_hierarchy->createGraph(m_node,t,
}
// TemplateListIntf
-uint InheritanceListContext::count() const
+size_t InheritanceListContext::count() const
{
return p->count();
}
-TemplateVariant InheritanceListContext::at(uint index) const
+TemplateVariant InheritanceListContext::at(size_t index) const
{
return p->at(index);
}
}
// TemplateListIntf
-uint MemberListContext::count() const
+size_t MemberListContext::count() const
{
return p->count();
}
-TemplateVariant MemberListContext::at(uint index) const
+TemplateVariant MemberListContext::at(size_t index) const
{
return p->at(index);
}
public:
Private(const MemberNameInfoLinkedMap &ml)
{
- static bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
+ bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
for (auto &mni : ml)
{
for (auto &mi : *mni)
}
// TemplateListIntf
-uint AllMembersListContext::count() const
+size_t AllMembersListContext::count() const
{
return p->count();
}
-TemplateVariant AllMembersListContext::at(uint index) const
+TemplateVariant AllMembersListContext::at(size_t index) const
{
return p->at(index);
}
TemplateVariant members() const { return m_members.get(this); }
TemplateVariant groupTitle() const { return m_memberGroup->header(); }
TemplateVariant groupSubtitle() const { return ""; }
- TemplateVariant groupAnchor() const { return m_memberGroup->anchor(); }
TemplateVariant memberGroups() const { return m_memberGroups.get(this); }
TemplateVariant docs() const { return m_docs.get(this); }
TemplateVariant inherited() const { return FALSE; }
{ "members", &Private::members },
{ "title", &Private::groupTitle },
{ "subtitle", &Private::groupSubtitle },
- { "anchor", &Private::groupAnchor },
{ "memberGroups", &Private::memberGroups },
{ "docs", &Private::docs },
{ "inherited", &Private::inherited }
}
// TemplateListIntf
-uint MemberGroupListContext::count() const
+size_t MemberGroupListContext::count() const
{
return p->count();
}
-TemplateVariant MemberGroupListContext::at(uint index) const
+TemplateVariant MemberGroupListContext::at(size_t index) const
{
return p->at(index);
}
MemberListType lt1,int lt2,const QCString &title,bool additionalList)
{
int count = cd->countMembersIncludingGrouped(lt1,inheritedFrom,additionalList);
- if (lt2!=-1) count += cd->countMembersIncludingGrouped((MemberListType)lt2,inheritedFrom,additionalList);
+ if (lt2!=-1) count += cd->countMembersIncludingGrouped(static_cast<MemberListType>(lt2),inheritedFrom,additionalList);
if (count>0)
{
const MemberList *ml = cd->getMemberList(lt1);
- const MemberList *ml2 = lt2!=-1 ? cd->getMemberList((MemberListType)lt2) : 0;
+ const MemberList *ml2 = lt2!=-1 ? cd->getMemberList(static_cast<MemberListType>(lt2)) : 0;
std::unique_ptr<MemberList> combinedList = std::make_unique<MemberList>(lt,MemberListContainer::Class);
addMemberListIncludingGrouped(inheritedFrom,ml,combinedList.get());
addMemberListIncludingGrouped(inheritedFrom,ml2,combinedList.get());
addMemberGroupsOfClass(inheritedFrom,cd,lt,combinedList.get());
- if (lt2!=-1) addMemberGroupsOfClass(inheritedFrom,cd,(MemberListType)lt2,combinedList.get());
+ if (lt2!=-1) addMemberGroupsOfClass(inheritedFrom,cd,static_cast<MemberListType>(lt2),combinedList.get());
append(InheritedMemberInfoContext::alloc(cd,std::move(combinedList),title));
}
}
if (lt1!=-1)
{
// add member info for members of cd with list type lt
- addInheritedMembers(inheritedFrom,icd,lt,(MemberListType)lt1,lt2,title,additionalList);
+ addInheritedMembers(inheritedFrom,icd,lt,static_cast<MemberListType>(lt1),lt2,title,additionalList);
// recurse down the inheritance tree
- findInheritedMembers(inheritedFrom,icd,(MemberListType)lt1,lt2,title,additionalList,visitedClasses);
+ findInheritedMembers(inheritedFrom,icd,static_cast<MemberListType>(lt1),lt2,title,additionalList,visitedClasses);
}
}
}
}
// TemplateListIntf
-uint InheritedMemberInfoListContext::count() const
+size_t InheritedMemberInfoListContext::count() const
{
return p->count();
}
-TemplateVariant InheritedMemberInfoListContext::at(uint index) const
+TemplateVariant InheritedMemberInfoListContext::at(size_t index) const
{
return p->at(index);
}
TemplateVariant namePart() const
{
QCString result = m_argument.attrib;
- uint l = result.length();
+ size_t l = result.length();
if (l>2 && result.at(0)=='[' && result.at(l-1)==']')
{
result = result.mid(1,l-2);
}
// TemplateListIntf
-uint ArgumentListContext::count() const
+size_t ArgumentListContext::count() const
{
return p->count();
}
-TemplateVariant ArgumentListContext::at(uint index) const
+TemplateVariant ArgumentListContext::at(size_t index) const
{
return p->at(index);
}
}
// TemplateListIntf
-uint SymbolListContext::count() const
+size_t SymbolListContext::count() const
{
return p->count();
}
-TemplateVariant SymbolListContext::at(uint index) const
+TemplateVariant SymbolListContext::at(size_t index) const
{
return p->at(index);
}
}
// TemplateListIntf
-uint SymbolGroupListContext::count() const
+size_t SymbolGroupListContext::count() const
{
return p->count();
}
-TemplateVariant SymbolGroupListContext::at(uint index) const
+TemplateVariant SymbolGroupListContext::at(size_t index) const
{
return p->at(index);
}
}
// TemplateListIntf
-uint SymbolIndicesContext::count() const
+size_t SymbolIndicesContext::count() const
{
return p->count();
}
-TemplateVariant SymbolIndicesContext::at(uint index) const
+TemplateVariant SymbolIndicesContext::at(size_t index) const
{
return p->at(index);
}
}
// TemplateListIntf
-uint SearchIndicesContext::count() const
+size_t SearchIndicesContext::count() const
{
return p->count();
}
-TemplateVariant SearchIndicesContext::at(uint index) const
+TemplateVariant SearchIndicesContext::at(size_t index) const
{
return p->at(index);
}
#include "types.h"
#include "template.h"
#include "classdef.h"
-#include "searchindex.h"
+#include "searchindex_js.h"
#include "memberlist.h"
#include "dotgfxhierarchytable.h"
{ return std::static_pointer_cast<TemplateListIntf>(std::make_shared<UsedFilesContext>(cd)); }
// TemplateListIntf
- virtual uint count() const;
- virtual TemplateVariant at(uint index) const;
+ virtual size_t count() const;
+ virtual TemplateVariant at(size_t index) const;
virtual TemplateListIntf::ConstIteratorPtr createIterator() const;
void addFile(const FileDef *fd);
{ return std::static_pointer_cast<TemplateListIntf>(std::make_shared<IncludeInfoListContext>(list,lang)); }
// TemplateListIntf
- virtual uint count() const;
- virtual TemplateVariant at(uint index) const;
+ virtual size_t count() const;
+ virtual TemplateVariant at(size_t index) const;
virtual TemplateListIntf::ConstIteratorPtr createIterator() const;
IncludeInfoListContext(const IncludeInfoList &list,SrcLangExt lang);
{ return std::static_pointer_cast<TemplateListIntf>(std::make_shared<ClassListContext>()); }
// TemplateListIntf
- virtual uint count() const;
- virtual TemplateVariant at(uint index) const;
+ virtual size_t count() const;
+ virtual TemplateVariant at(size_t index) const;
virtual TemplateListIntf::ConstIteratorPtr createIterator() const;
ClassListContext();
{ return std::static_pointer_cast<TemplateListIntf>(std::make_shared<ClassInheritanceContext>()); }
// TemplateListIntf
- virtual uint count() const;
- virtual TemplateVariant at(uint index) const;
+ virtual size_t count() const;
+ virtual TemplateVariant at(size_t index) const;
virtual TemplateListIntf::ConstIteratorPtr createIterator() const;
ClassInheritanceContext();
{ return std::static_pointer_cast<TemplateListIntf>(std::make_shared<NestingContext>(parent,type,level)); }
// TemplateListIntf
- virtual uint count() const;
- virtual TemplateVariant at(uint index) const;
+ virtual size_t count() const;
+ virtual TemplateVariant at(size_t index) const;
virtual TemplateListIntf::ConstIteratorPtr createIterator() const;
void addNamespaces(const NamespaceLinkedMap &nsLinkedMap,bool rootOnly,bool addClasses,bool addConcepts,ClassDefSet &visitedClasses);
{ return std::static_pointer_cast<TemplateListIntf>(std::make_shared<ConceptListContext>()); }
// TemplateListIntf
- virtual uint count() const;
- virtual TemplateVariant at(uint index) const;
+ virtual size_t count() const;
+ virtual TemplateVariant at(size_t index) const;
virtual TemplateListIntf::ConstIteratorPtr createIterator() const;
ConceptListContext();
{ return std::static_pointer_cast<TemplateListIntf>(std::make_shared<NamespaceListContext>()); }
// TemplateListIntf
- virtual uint count() const;
- virtual TemplateVariant at(uint index) const;
+ virtual size_t count() const;
+ virtual TemplateVariant at(size_t index) const;
virtual TemplateListIntf::ConstIteratorPtr createIterator() const;
NamespaceListContext();
{ return std::static_pointer_cast<TemplateListIntf>(std::make_shared<DirListContext>()); }
// TemplateListIntf
- virtual uint count() const;
- virtual TemplateVariant at(uint index) const;
+ virtual size_t count() const;
+ virtual TemplateVariant at(size_t index) const;
virtual TemplateListIntf::ConstIteratorPtr createIterator() const;
DirListContext();
{ return std::static_pointer_cast<TemplateListIntf>(std::make_shared<FileListContext>()); }
// TemplateListIntf
- virtual uint count() const;
- virtual TemplateVariant at(uint index) const;
+ virtual size_t count() const;
+ virtual TemplateVariant at(size_t index) const;
virtual TemplateListIntf::ConstIteratorPtr createIterator() const;
FileListContext();
{ return std::static_pointer_cast<TemplateListIntf>(std::make_shared<PageListContext>(pages)); }
// TemplateListIntf methods
- virtual uint count() const;
- virtual TemplateVariant at(uint index) const;
+ virtual size_t count() const;
+ virtual TemplateVariant at(size_t index) const;
virtual TemplateListIntf::ConstIteratorPtr createIterator() const;
void addPages(const PageLinkedMap &pages);
{ return std::static_pointer_cast<TemplateListIntf>(std::make_shared<ModuleListContext>()); }
// TemplateListIntf
- virtual uint count() const;
- virtual TemplateVariant at(uint index) const;
+ virtual size_t count() const;
+ virtual TemplateVariant at(size_t index) const;
virtual TemplateListIntf::ConstIteratorPtr createIterator() const;
void addModules(const GroupLinkedMap &);
{ return std::static_pointer_cast<TemplateListIntf>(std::make_shared<ExampleListContext>()); }
// TemplateListIntf methods
- virtual uint count() const;
- virtual TemplateVariant at(uint index) const;
+ virtual size_t count() const;
+ virtual TemplateVariant at(size_t index) const;
virtual TemplateListIntf::ConstIteratorPtr createIterator() const;
ExampleListContext();
{ return std::static_pointer_cast<TemplateListIntf>(std::make_shared<InheritanceListContext>(list,baseClasses)); }
// TemplateListIntf
- virtual uint count() const;
- virtual TemplateVariant at(uint index) const;
+ virtual size_t count() const;
+ virtual TemplateVariant at(size_t index) const;
virtual TemplateListIntf::ConstIteratorPtr createIterator() const;
InheritanceListContext(const BaseClassList &list,bool baseClasses);
{ return std::static_pointer_cast<TemplateListIntf>(std::make_shared<MemberListContext>(ml)); }
// TemplateListIntf
- virtual uint count() const;
- virtual TemplateVariant at(uint index) const;
+ virtual size_t count() const;
+ virtual TemplateVariant at(size_t index) const;
virtual TemplateListIntf::ConstIteratorPtr createIterator() const;
MemberListContext();
{ return std::static_pointer_cast<TemplateListIntf>(std::make_shared<MemberGroupListContext>(def,relPath,list,subGrouping)); }
// TemplateListIntf
- virtual uint count() const;
- virtual TemplateVariant at(uint index) const;
+ virtual size_t count() const;
+ virtual TemplateVariant at(size_t index) const;
virtual TemplateListIntf::ConstIteratorPtr createIterator() const;
MemberGroupListContext();
void addMemberList(const ClassDef *cd,MemberListType lt,const QCString &title,bool additionalList=TRUE);
// TemplateListIntf
- virtual uint count() const;
- virtual TemplateVariant at(uint index) const;
+ virtual size_t count() const;
+ virtual TemplateVariant at(size_t index) const;
virtual TemplateListIntf::ConstIteratorPtr createIterator() const;
InheritedMemberInfoListContext();
{ return std::static_pointer_cast<TemplateListIntf>(std::make_shared<AllMembersListContext>(ml)); }
// TemplateListIntf
- virtual uint count() const;
- virtual TemplateVariant at(uint index) const;
+ virtual size_t count() const;
+ virtual TemplateVariant at(size_t index) const;
virtual TemplateListIntf::ConstIteratorPtr createIterator() const;
AllMembersListContext(const MemberNameInfoLinkedMap &ml);
{ return std::static_pointer_cast<TemplateListIntf>(std::make_shared<ArgumentListContext>(al,def,relPath)); }
// TemplateListIntf
- virtual uint count() const;
- virtual TemplateVariant at(uint index) const;
+ virtual size_t count() const;
+ virtual TemplateVariant at(size_t index) const;
virtual TemplateListIntf::ConstIteratorPtr createIterator() const;
ArgumentListContext();
{ return std::static_pointer_cast<TemplateListIntf>(std::make_shared<SymbolListContext>(start,end)); }
// TemplateListIntf
- virtual uint count() const;
- virtual TemplateVariant at(uint index) const;
+ virtual size_t count() const;
+ virtual TemplateVariant at(size_t index) const;
virtual TemplateListIntf::ConstIteratorPtr createIterator() const;
SymbolListContext(const SearchIndexList::const_iterator &start,
{ return std::static_pointer_cast<TemplateListIntf>(std::make_shared<SymbolGroupListContext>(sil)); }
// TemplateListIntf
- virtual uint count() const;
- virtual TemplateVariant at(uint index) const;
+ virtual size_t count() const;
+ virtual TemplateVariant at(size_t index) const;
virtual TemplateListIntf::ConstIteratorPtr createIterator() const;
SymbolGroupListContext(const SearchIndexList &sil);
{ return std::static_pointer_cast<TemplateListIntf>(std::make_shared<SymbolIndicesContext>(info)); }
// TemplateListIntf
- virtual uint count() const;
- virtual TemplateVariant at(uint index) const;
+ virtual size_t count() const;
+ virtual TemplateVariant at(size_t index) const;
virtual TemplateListIntf::ConstIteratorPtr createIterator() const;
SymbolIndicesContext(const SearchIndexInfo &info);
{ return std::static_pointer_cast<TemplateListIntf>(std::make_shared<SearchIndicesContext>()); }
// TemplateListIntf
- virtual uint count() const;
- virtual TemplateVariant at(uint index) const;
+ virtual size_t count() const;
+ virtual TemplateVariant at(size_t index) const;
virtual TemplateListIntf::ConstIteratorPtr createIterator() const;
SearchIndicesContext();
{
switch(token[2])
{
- case 'n': return CPPValue((long)'\n');
- case 't': return CPPValue((long)'\t');
- case 'v': return CPPValue((long)'\v');
- case 'b': return CPPValue((long)'\b');
- case 'r': return CPPValue((long)'\r');
- case 'f': return CPPValue((long)'\f');
- case 'a': return CPPValue((long)'\a');
- case '\\': return CPPValue((long)'\\');
- case '?': return CPPValue((long)'\?');
- case '\'': return CPPValue((long)'\'');
- case '"': return CPPValue((long)'"');
+ case 'n': return CPPValue('\n');
+ case 't': return CPPValue('\t');
+ case 'v': return CPPValue('\v');
+ case 'b': return CPPValue('\b');
+ case 'r': return CPPValue('\r');
+ case 'f': return CPPValue('\f');
+ case 'a': return CPPValue('\a');
+ case '\\': return CPPValue('\\');
+ case '?': return CPPValue('\?');
+ case '\'': return CPPValue('\'');
+ case '"': return CPPValue('"');
case '0': // fall through
case '1': // fall through
case '2': // fall through
return CPPValue(0L);
}
}
- return CPPValue((long)token[1]);
+ return CPPValue(token[1]);
}
CPPValue parseFloat(const std::string& token)
public:
enum Type { Int, Float };
- CPPValue(long val=0) : type(Int) { v.l = val; }
- CPPValue(double val) : type(Float) { v.d = val; }
+ explicit CPPValue(char c) : type(Int) { v.l = c; }
+ explicit CPPValue(long val=0) : type(Int) { v.l = val; }
+ explicit CPPValue(double val) : type(Float) { v.d = val; }
- operator double () const { return type==Int ? (double)v.l : v.d; }
- operator long () const { return type==Int ? v.l : (long)v.d; }
+ operator double () const { return type==Int ? static_cast<double>(v.l) : v.d; }
+ operator long () const { return type==Int ? v.l : static_cast<long>(v.d); }
bool isInt() const { return type == Int; }
{ "plantuml", Debug::Plantuml },
{ "fortranfixed2free", Debug::FortranFixed2Free },
{ "cite", Debug::Cite },
- { "rtf", Debug::Rtf }
+ { "rtf", Debug::Rtf },
+ { "qhp", Debug::Qhp },
+ { "tag", Debug::Tag },
};
//------------------------------------------------------------------------
int Debug::setFlag(const QCString &lab)
{
int retVal = labelToEnumValue(lab);
- curMask = (DebugMask)(curMask | retVal);
+ curMask = static_cast<DebugMask>(curMask | retVal);
return retVal;
}
void Debug::clearFlag(const QCString &lab)
{
- curMask = (DebugMask)(curMask & ~labelToEnumValue(lab));
+ curMask = static_cast<DebugMask>(curMask & ~labelToEnumValue(lab));
}
void Debug::setPriority(int p)
FortranFixed2Free = 0x00008000,
Cite = 0x00010000,
NoLineNo = 0x00020000,
- Rtf = 0x00040000
+ Rtf = 0x00040000,
+ Qhp = 0x00080000,
+ Tag = 0x00100000,
};
static void print(DebugMask mask,int prio,const char *fmt,...);
if (isSection(type))
{
//printf(" level=%d title=%s\n",level,qPrint(si->title));
- int nextLevel = (int)type;
+ int nextLevel = static_cast<int>(type);
int i;
if (nextLevel>level)
{
// determine if there is a next level inside this item
auto it_next = std::next(it);
bool isDir = (it_next!=m_impl->sectionRefs.end()) ?
- ((int)((*it_next)->type()) > nextLevel) : FALSE;
+ (static_cast<int>((*it_next)->type()) > nextLevel) : FALSE;
Doxygen::indexList->addContentsItem(isDir,title,
getReference(),
m_impl->def->getOutputFileBase(),
// to avoid mismatches due to differences in indenting, we first remove
// double whitespaces...
QCString docStr = doc.simplifyWhiteSpace();
- MD5Buffer((const unsigned char *)docStr.data(),docStr.length(),md5_sig);
+ MD5Buffer(docStr.data(),docStr.length(),md5_sig);
MD5SigToString(md5_sig,sigStr);
//printf("%s:_docsAlreadyAdded doc='%s' sig='%s' docSigs='%s'\n",
// qPrint(name()),qPrint(doc),qPrint(sigStr),qPrint(sigList));
void DefinitionImpl::_setBriefDescription(const QCString &b,const QCString &briefFile,int briefLine)
{
- static OUTPUT_LANGUAGE_t outputLanguage = Config_getEnum(OUTPUT_LANGUAGE);
- static bool needsDot = outputLanguage!=OUTPUT_LANGUAGE_t::Japanese &&
- outputLanguage!=OUTPUT_LANGUAGE_t::Chinese &&
- outputLanguage!=OUTPUT_LANGUAGE_t::Korean;
QCString brief = b;
brief = brief.stripWhiteSpace();
brief = stripLeadingAndTrailingEmptyLines(brief,briefLine);
brief = brief.stripWhiteSpace();
if (brief.isEmpty()) return;
uint bl = brief.length();
- if (bl>0 && needsDot) // add punctuation if needed
+ if (bl>0)
{
- int c = brief.at(bl-1);
- switch(c)
+ if (!theTranslator || theTranslator->needsPunctuation()) // add punctuation if needed
{
- case '.': case '!': case '?': case '>': case ':': case ')': break;
- default:
- if (isUTF8CharUpperCase(brief.str(),0) && !lastUTF8CharIsMultibyte(brief.str())) brief+='.';
- break;
+ int c = brief.at(bl-1);
+ switch(c)
+ {
+ case '.': case '!': case '?': case '>': case ':': case ')': break;
+ default:
+ if (isUTF8CharUpperCase(brief.str(),0) && !lastUTF8CharIsMultibyte(brief.str())) brief+='.';
+ break;
+ }
}
}
FilterCache() : m_endPos(0) { }
bool getFileContents(const QCString &fileName,BufStr &str)
{
- static bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES);
+ bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES);
QCString filter = getFileFilter(fileName,TRUE);
bool usePipe = !filter.isEmpty() && filterSourceFiles;
FILE *f=0;
auto item = it->second;
//printf("getFileContents(%s): cache hit\n",qPrint(fileName));
// file already processed, get the results after filtering from the tmp file
- Debug::print(Debug::FilterOutput,0,"Reusing filter result for %s from %s at offset=%d size=%d\n",
- qPrint(fileName),qPrint(Doxygen::filterDBFileName),(int)item.filePos,(int)item.fileSize);
+ Debug::print(Debug::FilterOutput,0,"Reusing filter result for %s from %s at offset=%lld size=%zu\n",
+ qPrint(fileName),qPrint(Doxygen::filterDBFileName),item.filePos,item.fileSize);
f = Portable::fopen(Doxygen::filterDBFileName,"rb");
if (f)
{
str.resize(static_cast<uint>(item.fileSize+1));
if (Portable::fseek(f,item.filePos,SEEK_SET)==-1)
{
- err("Failed to seek to position %d in filter database file %s\n",(int)item.filePos,qPrint(Doxygen::filterDBFileName));
+ err("Failed to seek to position %d in filter database file %s\n",static_cast<int>(item.filePos),qPrint(Doxygen::filterDBFileName));
success=FALSE;
}
if (success)
size_t numBytes = fread(str.data(),1,item.fileSize,f);
if (numBytes!=item.fileSize)
{
- err("Failed to read %d bytes from position %d in filter database file %s: got %d bytes\n",
- (int)item.fileSize,(int)item.filePos,qPrint(Doxygen::filterDBFileName),(int)numBytes);
+ err("Failed to read %zu bytes from position %d in filter database file %s: got %zu bytes\n",
+ item.fileSize,static_cast<int>(item.filePos),qPrint(Doxygen::filterDBFileName),numBytes);
success=FALSE;
}
}
if (bytesRead!=bytesWritten)
{
// handle error
- err("Failed to write to filter database %s. Wrote %d out of %d bytes\n",
- qPrint(Doxygen::filterDBFileName),(int)bytesWritten,(int)bytesRead);
+ err("Failed to write to filter database %s. Wrote %zu out of %zu bytes\n",
+ qPrint(Doxygen::filterDBFileName),bytesWritten,bytesRead);
str.addChar('\0');
Portable::pclose(f);
fclose(bf);
item.fileSize = size;
// add location entry to the dictionary
m_cache.insert(std::make_pair(fileName.str(),item));
- Debug::print(Debug::FilterOutput,0,"Storing new filter result for %s in %s at offset=%d size=%d\n",
- qPrint(fileName),qPrint(Doxygen::filterDBFileName),(int)item.filePos,(int)item.fileSize);
+ Debug::print(Debug::FilterOutput,0,"Storing new filter result for %s in %s at offset=%lld size=%zu\n",
+ qPrint(fileName),qPrint(Doxygen::filterDBFileName),item.filePos,item.fileSize);
// update end of file position
m_endPos += size;
Portable::pclose(f);
int &startLine,int &endLine,QCString &result)
{
//printf("readCodeFragment(%s,startLine=%d,endLine=%d)\n",fileName,startLine,endLine);
- static bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES);
+ bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES);
QCString filter = getFileFilter(fileName,TRUE);
bool usePipe = !filter.isEmpty() && filterSourceFiles;
int tabSize = Config_getInt(TAB_SIZE);
}
else if (pc=='/' && c=='/') // skip single line comment
{
- while ((c=*p++)!='\n' && c!=0) pc=c;
+ while ((c=*p++)!='\n' && c!=0);
if (c=='\n') lineNr++,col=0;
}
else if (pc=='/' && c=='*') // skip C style comment
int braceIndex = result.findRev('}');
if (braceIndex > newLineIndex)
{
- result.truncate((uint)braceIndex+1);
+ result.truncate(static_cast<size_t>(braceIndex+1));
}
endLine=lineNr-1;
}
{
ASSERT(m_impl->def->definitionType()!=Definition::TypeFile); // file overloads this method
QCString fn;
- static bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
+ bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
if (sourceBrowser &&
m_impl->body && m_impl->body->startLine!=-1 && m_impl->body->fileDef)
{
// write file link
ol.writeObjectLink(QCString(),fn,QCString(),m_impl->body->fileDef->name());
// write text right from file marker
- ol.parseText(refText.right(refText.length()-(uint)fileMarkerPos-2));
+ ol.parseText(refText.right(refText.length()-static_cast<size_t>(fileMarkerPos)-2));
}
else // file marker before line marker
{
// write line link
ol.writeObjectLink(QCString(),fn,anchorStr,lineStr);
// write text right from linePos marker
- ol.parseText(refText.right(refText.length()-(uint)lineMarkerPos-2));
+ ol.parseText(refText.right(refText.length()-static_cast<size_t>(lineMarkerPos)-2));
}
ol.endParagraph();
}
/*! Write code of this definition into the documentation */
void DefinitionImpl::writeInlineCode(OutputList &ol,const QCString &scopeName) const
{
- static bool inlineSources = Config_getBool(INLINE_SOURCES);
+ bool inlineSources = Config_getBool(INLINE_SOURCES);
ol.pushGeneratorState();
//printf("Source Fragment %s: %d-%d bodyDef=%p\n",qPrint(name()),
// m_startBodyLine,m_endBodyLine,m_bodyDef);
const QCString &text,const std::unordered_map<std::string,const MemberDef *> &membersMap,
bool /*funcOnly*/) const
{
- static bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
- static bool refLinkSource = Config_getBool(REFERENCES_LINK_SOURCE);
if (!membersMap.empty())
{
auto members = refMapToVector(membersMap);
auto replaceFunc = [this,&members,scopeName,&ol](size_t entryIndex)
{
+ bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
+ bool refLinkSource = Config_getBool(REFERENCES_LINK_SOURCE);
const MemberDef *md=members[entryIndex];
if (md)
{
ol.parseText(text);
ol.docify(" ");
writeMarkerList(ol,
- theTranslator->trWriteList((int)members.size()).str(),
+ theTranslator->trWriteList(static_cast<int>(members.size())).str(),
members.size(),
replaceFunc);
ol.writeString(".");
bool DefinitionImpl::hasDocumentation() const
{
- static bool extractAll = Config_getBool(EXTRACT_ALL);
- //static bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
+ bool extractAll = Config_getBool(EXTRACT_ALL);
+ //bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
bool hasDocs =
(m_impl->details && !m_impl->details->doc.isEmpty()) || // has detailed docs
(m_impl->brief && !m_impl->brief->doc.isEmpty()) || // has brief description
if (isSection(type))
{
//printf(" level=%d title=%s\n",level,qPrint(si->title));
- int nextLevel = (int)type;
+ int nextLevel = static_cast<int>(type);
if (nextLevel>level)
{
for (l=level;l<nextLevel;l++)
if (l <= maxLevel) ol.writeString("</ul>\n");
}
}
- cs[0]=(char)('0'+nextLevel);
+ cs[0]=static_cast<char>('0'+nextLevel);
if (nextLevel <= maxLevel && inLi[nextLevel])
{
ol.writeString("</li>\n");
if (isSection(type))
{
//printf(" level=%d title=%s\n",level,qPrint(si->title));
- int nextLevel = (int)type;
+ int nextLevel = static_cast<int>(type);
if (nextLevel>level)
{
for (l=level;l<nextLevel;l++)
bool DefinitionImpl::hasBriefDescription() const
{
- static bool briefMemberDesc = Config_getBool(BRIEF_MEMBER_DESC);
+ bool briefMemberDesc = Config_getBool(BRIEF_MEMBER_DESC);
return !briefDescription().isEmpty() && briefMemberDesc;
}
class Definition
{
public:
- struct Cookie
- {
- virtual ~Cookie() {}
- };
-
/*! Types of derived classes */
enum DefType
{
const QCString &defFileName,int defLine,int defColumn,
const QCString &name,const char *b=0,const char *d=0,
bool isSymbol=TRUE) : m_impl(this,defFileName,defLine,defColumn,name,b,d,isSymbol) {}
- virtual ~DefinitionMixin() {}
+ virtual ~DefinitionMixin() = default;
virtual bool isAlias() const { return FALSE; }
diaArgs+=inFile;
diaArgs+="\"";
- int exitCode;
//printf("*** running: %s %s outDir:%s %s\n",qPrint(diaExe),qPrint(diaArgs),outDir,outFile);
Portable::sysTimerStart();
- if ((exitCode=Portable::system(diaExe,diaArgs,FALSE))!=0)
+ if (Portable::system(diaExe,diaArgs,FALSE)!=0)
{
err_full(srcFile,srcLine,"Problems running %s. Check your installation or look typos in you dia file %s\n",
qPrint(diaExe),qPrint(inFile));
QCString fileName() const;
DiagramItem *parentItem() { return m_parent; }
DiagramItemList getChildren() { return m_children; }
- void move(int dx,int dy) { m_x+=(uint)dx; m_y+=(uint)dy; }
+ void move(int dx,int dy) { m_x=static_cast<uint>(m_x+dx); m_y=static_cast<uint>(m_y+dy); }
uint xPos() const { return m_x; }
uint yPos() const { return m_y; }
uint avgChildPos() const;
cd,prot,virt,ts);
DiagramItem *di_ptr = di.get();
if (parent) parent->addChild(di_ptr);
- di->move((int)(m_items.size()*gridWidth),(int)(m_level*gridHeight));
+ di->move(static_cast<int>(m_items.size()*gridWidth),static_cast<int>(m_level*gridHeight));
m_items.push_back(std::move(di));
int count=0;
for (const auto &bcd : doBases ? cd->baseClasses() : cd->subClasses())
//printf("Moving children %d-%d in row %d\n",
// dil->getFirst()->number(),row->count()-1,r+1);
for (k=children.front()->number();k<row->numItems();k++)
- row->item(k)->move((int)(pPos-cPos),0);
+ {
+ row->item(k)->move(static_cast<int>(pPos-cPos),0);
+ }
moved=TRUE;
}
else if (pPos<cPos) // move parent
//printf("Moving parents %d-%d in row %d\n",
// root->number(),row->count()-1,r);
for (k=root->number();k<row->numItems();k++)
- row->item(k)->move((int)(cPos-pPos),0);
+ {
+ row->item(k)->move(static_cast<int>(cPos-pPos),0);
+ }
moved=TRUE;
}
for (const auto &di : *dr) // for each item in a row
{
if (di->isInList()) done=TRUE;
- if (maxXPos) mx=std::max(mx,(uint)di->xPos());
+ if (maxXPos) mx=std::max(mx,static_cast<uint>(di->xPos()));
if (maxLabelLen) ml=std::max(ml,Image::stringLength(di->label()));
}
if (done) break;
}
else
{
- xf = di->xPos()/(float)gridWidth;
+ xf = di->xPos()/static_cast<float>(gridWidth);
if (doBase)
{
- yf = di->yPos()/(float)gridHeight+superRows-1;
+ yf = di->yPos()/static_cast<float>(gridHeight)+superRows-1;
}
else
{
- yf = superRows-1-di->yPos()/(float)gridHeight;
+ yf = superRows-1-di->yPos()/static_cast<float>(gridHeight);
}
}
}
}
else
{
- xf=di->xPos()/(float)gridWidth;
+ xf=di->xPos()/static_cast<float>(gridWidth);
if (doBase)
{
- yf = di->yPos()/(float)gridHeight+superRows-1;
+ yf = di->yPos()/static_cast<float>(gridHeight)+superRows-1;
}
else
{
- yf = superRows-1-di->yPos()/(float)gridHeight;
+ yf = superRows-1-di->yPos()/static_cast<float>(gridHeight);
}
writeVectorBox(t,di.get(),xf,yf);
}
t << protToString(di->protection()) << "\n";
if (doBase)
{
- t << "1 " << (di->xPos()/(float)gridWidth) << " "
- << (di->yPos()/(float)gridHeight+superRows-1) << " in\n";
+ t << "1 " << (di->xPos()/static_cast<float>(gridWidth)) << " "
+ << (di->yPos()/static_cast<float>(gridHeight)+superRows-1) << " in\n";
}
else
{
- t << "0 " << (di->xPos()/(float)gridWidth) << " "
- << ((float)superRows-0.25f-di->yPos()/(float)gridHeight)
+ t << "0 " << (di->xPos()/static_cast<float>(gridWidth)) << " "
+ << (static_cast<float>(superRows)-0.25f-di->yPos()/static_cast<float>(gridHeight))
<< " in\n";
}
}
}
else
{
- xf = di->parentItem()->xPos()/(float)gridWidth;
+ xf = di->parentItem()->xPos()/static_cast<float>(gridWidth);
if (doBase)
{
- ysf = di->yPos()/(float)gridHeight+superRows-1;
+ ysf = di->yPos()/static_cast<float>(gridHeight)+superRows-1;
yf = ysf + 0.5f;
}
else
{
- ysf = (float)superRows-0.25f-di->yPos()/(float)gridHeight;
+ ysf = static_cast<float>(superRows)-0.25f-di->yPos()/static_cast<float>(gridHeight);
yf = ysf - 0.25f;
}
}
t << protToString(di->protection()) << "\n";
if (doBase)
{
- t << "1 " << di->xPos()/(float)gridWidth << " "
- << (di->yPos()/(float)gridHeight+superRows-1) << " in\n";
+ t << "1 " << di->xPos()/static_cast<float>(gridWidth) << " "
+ << (di->yPos()/static_cast<float>(gridHeight)+superRows-1) << " in\n";
}
else
{
- t << "0 " << di->xPos()/(float)gridWidth << " "
- << ((float)superRows-0.25f-di->yPos()/(float)gridHeight)
+ t << "0 " << di->xPos()/static_cast<float>(gridWidth) << " "
+ << (static_cast<float>(superRows)-0.25f-di->yPos()/static_cast<float>(gridHeight))
<< " in\n";
}
}
t << protToString(p) << "\n";
if (doBase)
{
- t << "0 " << di->xPos()/(float)gridWidth << " "
- << (di->yPos()/(float)gridHeight+superRows-1) << " out\n";
+ t << "0 " << di->xPos()/static_cast<float>(gridWidth) << " "
+ << (di->yPos()/static_cast<float>(gridHeight)+superRows-1) << " out\n";
}
else
{
- t << "1 " << di->xPos()/(float)gridWidth << " "
- << ((float)superRows-1.75f-di->yPos()/(float)gridHeight)
+ t << "1 " << di->xPos()/static_cast<float>(gridWidth) << " "
+ << (static_cast<float>(superRows)-1.75f-di->yPos()/static_cast<float>(gridHeight))
<< " out\n";
}
}
t << protToString(p) << "\n";
if (doBase)
{
- t << first->xPos()/(float)gridWidth << " "
- << last->xPos()/(float)gridWidth << " "
- << (first->yPos()/(float)gridHeight+superRows-1)
+ t << first->xPos()/static_cast<float>(gridWidth) << " "
+ << last->xPos()/static_cast<float>(gridWidth) << " "
+ << (first->yPos()/static_cast<float>(gridHeight)+superRows-1)
<< " conn\n";
}
else
{
- t << first->xPos()/(float)gridWidth << " "
- << last->xPos()/(float)gridWidth << " "
- << ((float)superRows-first->yPos()/(float)gridHeight)
+ t << first->xPos()/static_cast<float>(gridWidth) << " "
+ << last->xPos()/static_cast<float>(gridWidth) << " "
+ << (static_cast<float>(superRows)-first->yPos()/static_cast<float>(gridHeight))
<< " conn\n";
}
}
uint xsuper = superItem->xPos();
if (xbase>xsuper)
{
- superItem->move((int)(xbase-xsuper),0);
- p->super.moveChildren(superItem,(int)(xbase-xsuper));
+ superItem->move(static_cast<int>(xbase-xsuper),0);
+ p->super.moveChildren(superItem,static_cast<int>(xbase-xsuper));
}
else if (xbase<xsuper)
{
- baseItem->move((int)(xsuper-xbase),0);
- p->base.moveChildren(baseItem,(int)(xsuper-xbase));
+ baseItem->move(static_cast<int>(xsuper-xbase),0);
+ p->base.moveChildren(baseItem,static_cast<int>(xsuper-xbase));
}
}
//printf("writeFigure rows=%d cols=%d\n",rows,cols);
- QCString epsBaseName=(QCString)path+"/"+fileName;
+ QCString epsBaseName=QCString(path)+"/"+fileName;
QCString epsName=epsBaseName+".eps";
std::ofstream f(epsName.str(),std::ofstream::out | std::ofstream::binary);
if (!f.is_open())
t << "%%For: \n";
t << "%Magnification: 1.00\n";
t << "%%Orientation: Portrait\n";
- t << "%%BoundingBox: 0 0 500 " << estHeight*500.0f/(float)estWidth << "\n";
+ t << "%%BoundingBox: 0 0 500 " << estHeight*500.0f/static_cast<float>(estWidth) << "\n";
t << "%%Pages: 0\n";
t << "%%BeginSetup\n";
t << "%%EndSetup\n";
t << "/marginwidth 10 def\n";
t << "/distx 20 def\n";
t << "/disty 40 def\n";
- t << "/boundaspect " << estWidth/(float)estHeight << " def % aspect ratio of the BoundingBox (width/height)\n";
+ t << "/boundaspect " << estWidth/static_cast<float>(estHeight) << " def % aspect ratio of the BoundingBox (width/height)\n";
t << "/boundx 500 def\n";
t << "/boundy boundx boundaspect div def\n";
t << "/xspacing 0 def\n";
p->super.drawConnectors(t,&image,FALSE,TRUE,baseRows,superRows,cellWidth,cellHeight);
#define IMAGE_EXT ".png"
- image.save((QCString)path+"/"+fileName+IMAGE_EXT);
+ image.save(QCString(path)+"/"+fileName+IMAGE_EXT);
Doxygen::indexList->addImageFile(QCString(fileName)+IMAGE_EXT);
}
// convert to md5 hash
uchar md5_sig[16];
char sigStr[33];
- MD5Buffer((const unsigned char *)anchor.data(),anchor.length(),md5_sig);
+ MD5Buffer(anchor.data(),anchor.length(),md5_sig);
MD5SigToString(md5_sig,sigStr);
return sigStr;
{
if (hasBriefDescription())
{
- std::unique_ptr<IDocParser> parser { createDocParser() };
- std::unique_ptr<DocRoot> rootNode { validatingParseDoc(
+ auto parser { createDocParser() };
+ auto ast { validatingParseDoc(
*parser.get(), briefFile(),briefLine(),this,0,briefDescription(),TRUE,FALSE,
QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
- if (rootNode && !rootNode->isEmpty())
+ if (!ast->isEmpty())
{
ol.startParagraph();
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Man);
ol.writeString(" - ");
ol.popGeneratorState();
- ol.writeDoc(rootNode.get(),this,0);
+ ol.writeDoc(ast.get(),this,0);
ol.pushGeneratorState();
ol.disable(OutputGenerator::RTF);
ol.writeString(" \n");
bool DirDefImpl::hasDetailedDescription() const
{
- static bool repeatBrief = Config_getBool(REPEAT_BRIEF);
+ bool repeatBrief = Config_getBool(REPEAT_BRIEF);
return (!briefDescription().isEmpty() && repeatBrief) || !documentation().isEmpty();
}
void DirDefImpl::writeDocumentation(OutputList &ol)
{
- static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
+ bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
ol.pushGeneratorState();
QCString title=theTranslator->trDirReference(m_dispName);
break;
case LayoutDocEntry::DetailedDesc:
{
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeDetailedDescription(ol,ls->title(lang));
+ const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
+ if (ls)
+ {
+ writeDetailedDescription(ol,ls->title(lang));
+ }
}
break;
case LayoutDocEntry::ClassIncludes:
//printf(" => new file\n");
auto newUsedDir = std::make_unique<UsedDir>(dir);
newUsedDir->addFileDep(srcFd,dstFd, srcDirect, dstDirect);
- usedDir = m_usedDirs.add(dir->getOutputFileBase(),std::move(newUsedDir));
+ m_usedDirs.add(dir->getOutputFileBase(),std::move(newUsedDir));
added=TRUE;
}
if (added)
void DirRelation::writeDocumentation(OutputList &ol)
{
- static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
+ bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
{
// start will full path of first dir
path=(*it)->name();
- int i=path.findRev('/',(int)path.length()-2);
+ int i=path.findRev('/',path.length()-2);
path=path.left(i+1);
bool done=FALSE;
if (i==-1)
{
if (dirName.left(l)!=path) // dirName does not start with path
{
- i=path.findRev('/',(int)l-2);
+ i=path.findRev('/',l-2);
if (i==-1) // no unique prefix -> stop
{
path="";
{
path=dir->name();
l=path.length();
- i=path.findRev('/',(int)l-2);
+ i=path.findRev('/',l-2);
if (i==-1) // no unique prefix -> stop
{
path="";
for (const auto &dir : *Doxygen::dirLinkedMap)
{
QCString name = dir->name();
- int i=name.findRev('/',(int)name.length()-2);
+ int i=name.findRev('/',name.length()-2);
if (i>0)
{
DirDef *parent = Doxygen::dirLinkedMap->find(name.left(i+1));
class DirDef : public DefinitionMutable, public Definition
{
public:
- virtual ~DirDef() {}
-
class UsedDirLinkedMap : public LinkedMap<UsedDir> {};
// accessors
{
}
-DocbookCodeGenerator::~DocbookCodeGenerator() {}
-
void DocbookCodeGenerator::codify(const QCString &text)
{
Docbook_DB(("(codify \"%s\")\n",text));
m_col=0;
}
-void DocbookCodeGenerator::setCurrentDoc(const Definition *,const QCString &,bool)
-{
-}
-
-void DocbookCodeGenerator::addWord(const QCString &,bool)
-{
-}
-
void DocbookCodeGenerator::finish()
{
endCodeLine();
}
}
-void DocbookGenerator::writeDoc(DocNode *n,const Definition *ctx,const MemberDef *,int)
+void DocbookGenerator::writeDoc(const IDocNodeAST *ast,const Definition *ctx,const MemberDef *,int)
{
DB_GEN_C
- DocbookDocVisitor *visitor =
- new DocbookDocVisitor(m_t,*this,ctx?ctx->getDefFileExtension():QCString());
- n->accept(visitor);
- delete visitor;
+ auto astImpl = dynamic_cast<const DocNodeAST*>(ast);
+ if (astImpl)
+ {
+ auto visitor { DocbookDocVisitor(m_t,*this,ctx?ctx->getDefFileExtension():QCString()) };
+ std::visit(visitor,astImpl->root);
+ }
}
void DocbookGenerator::startParagraph(const QCString &)
{
public:
DocbookCodeGenerator(TextStream &t);
- virtual ~DocbookCodeGenerator();
void setRelativePath(const QCString &path) { m_relPath = path; }
void setSourceFileName(const QCString &sourceFileName) { m_sourceFileName = sourceFileName; }
QCString sourceFileName() { return m_sourceFileName; }
void writeCodeAnchor(const QCString &);
void writeLineNumber(const QCString &extRef,const QCString &compId,
const QCString &anchorId,int l, bool writeLineAnchor);
- void setCurrentDoc(const Definition *,const QCString &,bool);
- void addWord(const QCString &,bool);
void finish();
void startCodeFragment(const QCString &style);
void endCodeFragment(const QCString &style);
{ m_codeGen.endCodeFragment(style); }
// ---------------------------
- void writeDoc(DocNode *,const Definition *ctx,const MemberDef *md,int id);
+ void writeDoc(const IDocNodeAST *node,const Definition *ctx,const MemberDef *md,int id);
///////////////////////////////////////////////////////////////
// structural output interface
static QCString filterId(const QCString &s)
{
if (s.isEmpty()) return s;
- static GrowBuf growBuf;
+ GrowBuf growBuf;
growBuf.clear();
const char *p=s.data();
char c;
void DocbookDocVisitor::visitCaption(const DocNodeList &children)
{
- for (const auto &n : children) n->accept(this);
+ for (const auto &n : children)
+ {
+ std::visit(*this,n);
+ }
}
void DocbookDocVisitor::visitPreStart(TextStream &t,
}
DocbookDocVisitor::DocbookDocVisitor(TextStream &t,CodeOutputInterface &ci,const QCString &langExt)
- : DocVisitor(DocVisitor_Docbook), m_t(t), m_ci(ci),m_langExt(langExt)
+ : m_t(t), m_ci(ci),m_langExt(langExt)
{
DB_VIS_C
// m_t << "<section>\n";
// visitor functions for leaf nodes
//--------------------------------------
-void DocbookDocVisitor::visit(DocWord *w)
+void DocbookDocVisitor::operator()(const DocWord &w)
{
DB_VIS_C
if (m_hide) return;
- filter(w->word());
+ filter(w.word());
}
-void DocbookDocVisitor::visit(DocLinkedWord *w)
+void DocbookDocVisitor::operator()(const DocLinkedWord &w)
{
DB_VIS_C
if (m_hide) return;
- startLink(w->file(),w->anchor());
- filter(w->word());
+ startLink(w.file(),w.anchor());
+ filter(w.word());
endLink();
}
-void DocbookDocVisitor::visit(DocWhiteSpace *w)
+void DocbookDocVisitor::operator()(const DocWhiteSpace &w)
{
DB_VIS_C
if (m_hide) return;
if (m_insidePre)
{
- m_t << w->chars();
+ m_t << w.chars();
}
else
{
}
}
-void DocbookDocVisitor::visit(DocSymbol *s)
+void DocbookDocVisitor::operator()(const DocSymbol &s)
{
DB_VIS_C
if (m_hide) return;
- const char *res = HtmlEntityMapper::instance()->docbook(s->symbol());
+ const char *res = HtmlEntityMapper::instance()->docbook(s.symbol());
if (res)
{
m_t << res;
}
else
{
- err("DocBook: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(s->symbol(),TRUE));
+ err("DocBook: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(s.symbol(),TRUE));
}
}
-void DocbookDocVisitor::visit(DocEmoji *s)
+void DocbookDocVisitor::operator()(const DocEmoji &s)
{
DB_VIS_C
if (m_hide) return;
- const char *res = EmojiEntityMapper::instance()->unicode(s->index());
+ const char *res = EmojiEntityMapper::instance()->unicode(s.index());
if (res)
{
m_t << res;
}
else
{
- m_t << s->name();
+ m_t << s.name();
}
}
-void DocbookDocVisitor::visit(DocURL *u)
+void DocbookDocVisitor::operator()(const DocURL &u)
{
DB_VIS_C
if (m_hide) return;
m_t << "<link xlink:href=\"";
- if (u->isEmail()) m_t << "mailto:";
- filter(u->url());
+ if (u.isEmail()) m_t << "mailto:";
+ filter(u.url());
m_t << "\">";
- filter(u->url());
+ filter(u.url());
m_t << "</link>";
}
-void DocbookDocVisitor::visit(DocLineBreak *)
+void DocbookDocVisitor::operator()(const DocLineBreak &)
{
DB_VIS_C
if (m_hide) return;
// m_t << "\n" << "<sbr/>\n";
}
-void DocbookDocVisitor::visit(DocHorRuler *)
+void DocbookDocVisitor::operator()(const DocHorRuler &)
{
DB_VIS_C
if (m_hide) return;
m_t << "</entry></row></tbody></tgroup></informaltable>\n";
}
-void DocbookDocVisitor::visit(DocStyleChange *s)
+void DocbookDocVisitor::operator()(const DocStyleChange &s)
{
DB_VIS_C
if (m_hide) return;
- switch (s->style())
+ switch (s.style())
{
case DocStyleChange::Bold:
- if (s->enable()) m_t << "<emphasis role=\"bold\">"; else m_t << "</emphasis>";
+ if (s.enable()) m_t << "<emphasis role=\"bold\">"; else m_t << "</emphasis>";
break;
case DocStyleChange::Italic:
- if (s->enable()) m_t << "<emphasis>"; else m_t << "</emphasis>";
+ if (s.enable()) m_t << "<emphasis>"; else m_t << "</emphasis>";
break;
case DocStyleChange::Code:
- if (s->enable()) m_t << "<computeroutput>"; else m_t << "</computeroutput>";
+ if (s.enable()) m_t << "<computeroutput>"; else m_t << "</computeroutput>";
break;
case DocStyleChange::Subscript:
- if (s->enable()) m_t << "<subscript>"; else m_t << "</subscript>";
+ if (s.enable()) m_t << "<subscript>"; else m_t << "</subscript>";
break;
case DocStyleChange::Superscript:
- if (s->enable()) m_t << "<superscript>"; else m_t << "</superscript>";
+ if (s.enable()) m_t << "<superscript>"; else m_t << "</superscript>";
break;
case DocStyleChange::Center:
- if (s->enable()) m_t << "<informaltable frame='none'><tgroup cols='1'><colspec align='center'/><tbody><row><entry align='center'>";
+ if (s.enable()) m_t << "<informaltable frame='none'><tgroup cols='1'><colspec align='center'/><tbody><row><entry align='center'>";
else m_t << "</entry></row></tbody></tgroup></informaltable>";
break;
case DocStyleChange::Preformatted:
- if (s->enable())
+ if (s.enable())
{
m_t << "<literallayout>";
m_insidePre=TRUE;
case DocStyleChange::Div: /* HTML only */ break;
case DocStyleChange::Span: /* HTML only */ break;
case DocStyleChange::Details: /* emulation of the <details> tag */
- if (s->enable())
+ if (s.enable())
{
m_t << "\n";
m_t << "<para>";
}
break;
case DocStyleChange::Summary: /* emulation of the <summary> tag inside a <details> tag */
- if (s->enable()) m_t << "<emphasis role=\"bold\">"; else m_t << "</emphasis>";
+ if (s.enable()) m_t << "<emphasis role=\"bold\">"; else m_t << "</emphasis>";
break;
}
}
-void DocbookDocVisitor::visit(DocVerbatim *s)
+void DocbookDocVisitor::operator()(const DocVerbatim &s)
{
DB_VIS_C
if (m_hide) return;
QCString lang = m_langExt;
- if (!s->language().isEmpty()) // explicit language setting
+ if (!s.language().isEmpty()) // explicit language setting
{
- lang = s->language();
+ lang = s.language();
}
SrcLangExt langExt = getLanguageFromCodeLang(lang);
- switch(s->type())
+ switch(s.type())
{
case DocVerbatim::Code:
m_t << "<literallayout><computeroutput>";
- getCodeParser(m_langExt).parseCode(m_ci,s->context(),
- s->text(),
+ getCodeParser(m_langExt).parseCode(m_ci,s.context(),
+ s.text(),
langExt,
- s->isExample(),
- s->exampleFile());
+ s.isExample(),
+ s.exampleFile());
m_t << "</computeroutput></literallayout>";
break;
case DocVerbatim::Verbatim:
m_t << "<literallayout><computeroutput>";
- filter(s->text());
+ filter(s.text());
m_t << "</computeroutput></literallayout>";
break;
case DocVerbatim::JavaDocLiteral:
- filter(s->text(), true);
+ filter(s.text(), true);
break;
case DocVerbatim::JavaDocCode:
m_t << "<computeroutput>";
- filter(s->text(), true);
+ filter(s.text(), true);
m_t << "</computeroutput>";
break;
case DocVerbatim::HtmlOnly:
case DocVerbatim::XmlOnly:
break;
case DocVerbatim::DocbookOnly:
- m_t << s->text();
+ m_t << s.text();
break;
case DocVerbatim::Dot:
{
static int dotindex = 1;
QCString baseName(4096);
QCString name;
- QCString stext = s->text();
+ QCString stext = s.text();
m_t << "<para>\n";
name.sprintf("%s%d", "dot_inline_dotgraph_", dotindex);
baseName.sprintf("%s%d",
static int mscindex = 1;
QCString baseName(4096);
QCString name;
- QCString stext = s->text();
+ QCString stext = s.text();
m_t << "<para>\n";
name.sprintf("%s%d", "msc_inline_mscgraph_", mscindex);
baseName.sprintf("%s%d",
break;
case DocVerbatim::PlantUML:
{
- static QCString docbookOutput = Config_getString(DOCBOOK_OUTPUT);
- QCString baseName = PlantumlManager::instance().writePlantUMLSource(docbookOutput,s->exampleFile(),s->text(),PlantumlManager::PUML_BITMAP,s->engine(),s->srcFile(),s->srcLine());
+ QCString docbookOutput = Config_getString(DOCBOOK_OUTPUT);
+ QCString baseName = PlantumlManager::instance().writePlantUMLSource(docbookOutput,
+ s.exampleFile(),s.text(),PlantumlManager::PUML_BITMAP,
+ s.engine(),s.srcFile(),s.srcLine());
QCString shortName = baseName;
int i;
if ((i=shortName.findRev('/'))!=-1)
{
- shortName=shortName.right((int)shortName.length()-i-1);
+ shortName=shortName.right(shortName.length()-i-1);
}
m_t << "<para>\n";
writePlantUMLFile(baseName,s);
}
}
-void DocbookDocVisitor::visit(DocAnchor *anc)
+void DocbookDocVisitor::operator()(const DocAnchor &anc)
{
DB_VIS_C
if (m_hide) return;
- m_t << "<anchor xml:id=\"_" << stripPath(anc->file()) << "_1" << filterId(anc->anchor()) << "\"/>";
+ m_t << "<anchor xml:id=\"_" << stripPath(anc.file()) << "_1" << filterId(anc.anchor()) << "\"/>";
}
-void DocbookDocVisitor::visit(DocInclude *inc)
+void DocbookDocVisitor::operator()(const DocInclude &inc)
{
DB_VIS_C
if (m_hide) return;
- SrcLangExt langExt = getLanguageFromFileName(inc->extension());
- switch(inc->type())
+ SrcLangExt langExt = getLanguageFromFileName(inc.extension());
+ switch(inc.type())
{
case DocInclude::IncWithLines:
{
m_t << "<literallayout><computeroutput>";
- FileInfo cfi( inc->file().str() );
+ FileInfo cfi( inc.file().str() );
FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
- getCodeParser(inc->extension()).parseCode(m_ci,inc->context(),
- inc->text(),
+ getCodeParser(inc.extension()).parseCode(m_ci,inc.context(),
+ inc.text(),
langExt,
- inc->isExample(),
- inc->exampleFile(), fd);
+ inc.isExample(),
+ inc.exampleFile(), fd);
delete fd;
m_t << "</computeroutput></literallayout>";
}
break;
case DocInclude::Include:
m_t << "<literallayout><computeroutput>";
- getCodeParser(inc->extension()).parseCode(m_ci,inc->context(),
- inc->text(),
+ getCodeParser(inc.extension()).parseCode(m_ci,inc.context(),
+ inc.text(),
langExt,
- inc->isExample(),
- inc->exampleFile());
+ inc.isExample(),
+ inc.exampleFile());
m_t << "</computeroutput></literallayout>";
break;
case DocInclude::DontInclude:
case DocInclude::XmlInclude:
break;
case DocInclude::DocbookInclude:
- m_t << inc->text();
+ m_t << inc.text();
break;
case DocInclude::VerbInclude:
m_t << "<literallayout>";
- filter(inc->text());
+ filter(inc.text());
m_t << "</literallayout>";
break;
case DocInclude::Snippet:
m_t << "<literallayout><computeroutput>";
- getCodeParser(inc->extension()).parseCode(m_ci,
- inc->context(),
- extractBlock(inc->text(),inc->blockId()),
+ getCodeParser(inc.extension()).parseCode(m_ci,
+ inc.context(),
+ extractBlock(inc.text(),inc.blockId()),
langExt,
- inc->isExample(),
- inc->exampleFile()
+ inc.isExample(),
+ inc.exampleFile()
);
m_t << "</computeroutput></literallayout>";
break;
case DocInclude::SnipWithLines:
{
- FileInfo cfi( inc->file().str() );
+ FileInfo cfi( inc.file().str() );
FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
m_t << "<literallayout><computeroutput>";
- getCodeParser(inc->extension()).parseCode(m_ci,
- inc->context(),
- extractBlock(inc->text(),inc->blockId()),
+ getCodeParser(inc.extension()).parseCode(m_ci,
+ inc.context(),
+ extractBlock(inc.text(),inc.blockId()),
langExt,
- inc->isExample(),
- inc->exampleFile(),
+ inc.isExample(),
+ inc.exampleFile(),
fd,
- lineBlock(inc->text(),inc->blockId()),
+ lineBlock(inc.text(),inc.blockId()),
-1, // endLine
FALSE, // inlineFragment
0, // memberDef
}
}
-void DocbookDocVisitor::visit(DocIncOperator *op)
+void DocbookDocVisitor::operator()(const DocIncOperator &op)
{
DB_VIS_C
- if (op->isFirst())
+ if (op.isFirst())
{
if (!m_hide)
{
pushHidden(m_hide);
m_hide = TRUE;
}
- QCString locLangExt = getFileNameExtension(op->includeFileName());
+ QCString locLangExt = getFileNameExtension(op.includeFileName());
if (locLangExt.isEmpty()) locLangExt = m_langExt;
SrcLangExt langExt = getLanguageFromFileName(locLangExt);
- if (op->type()!=DocIncOperator::Skip)
+ if (op.type()!=DocIncOperator::Skip)
{
m_hide = popHidden();
if (!m_hide)
{
FileDef *fd = 0;
- if (!op->includeFileName().isEmpty())
+ if (!op.includeFileName().isEmpty())
{
- FileInfo cfi( op->includeFileName().str() );
+ FileInfo cfi( op.includeFileName().str() );
fd = createFileDef( cfi.dirPath(), cfi.fileName() );
}
- getCodeParser(locLangExt).parseCode(m_ci,op->context(),
- op->text(),langExt,op->isExample(),
- op->exampleFile(),
+ getCodeParser(locLangExt).parseCode(m_ci,op.context(),
+ op.text(),langExt,op.isExample(),
+ op.exampleFile(),
fd, // fileDef
- op->line(), // startLine
+ op.line(), // startLine
-1, // endLine
FALSE, // inline fragment
0, // memberDef
- op->showLineNo() // show line numbers
+ op.showLineNo() // show line numbers
);
if (fd) delete fd;
}
pushHidden(m_hide);
m_hide=TRUE;
}
- if (op->isLast())
+ if (op.isLast())
{
m_hide = popHidden();
if (!m_hide) m_t << "</programlisting>";
}
}
-void DocbookDocVisitor::visit(DocFormula *f)
+void DocbookDocVisitor::operator()(const DocFormula &f)
{
DB_VIS_C
if (m_hide) return;
- if (f->isInline()) m_t << "<inlinemediaobject>\n";
+ if (f.isInline()) m_t << "<inlinemediaobject>\n";
else m_t << " <mediaobject>\n";
m_t << " <imageobject>\n";
m_t << " <imagedata ";
- m_t << "align=\"center\" valign=\"middle\" scalefit=\"0\" fileref=\"" << f->relPath() << f->name() << ".png\"/>\n";
+ m_t << "align=\"center\" valign=\"middle\" scalefit=\"0\" fileref=\"" << f.relPath() << f.name() << ".png\"/>\n";
m_t << " </imageobject>\n";
- if (f->isInline()) m_t << "</inlinemediaobject>\n";
+ if (f.isInline()) m_t << "</inlinemediaobject>\n";
else m_t << " </mediaobject>\n";
}
-void DocbookDocVisitor::visit(DocIndexEntry *ie)
+void DocbookDocVisitor::operator()(const DocIndexEntry &ie)
{
DB_VIS_C
if (m_hide) return;
m_t << "<indexterm><primary>";
- filter(ie->entry());
+ filter(ie.entry());
m_t << "</primary></indexterm>\n";
}
-void DocbookDocVisitor::visit(DocSimpleSectSep *)
+void DocbookDocVisitor::operator()(const DocSimpleSectSep &)
{
DB_VIS_C
// m_t << "<simplesect/>";
}
-void DocbookDocVisitor::visit(DocCite *cite)
+void DocbookDocVisitor::operator()(const DocCite &cite)
{
DB_VIS_C
if (m_hide) return;
- if (!cite->file().isEmpty()) startLink(cite->file(),filterId(cite->anchor()));
- filter(cite->text());
- if (!cite->file().isEmpty()) endLink();
+ if (!cite.file().isEmpty()) startLink(cite.file(),filterId(cite.anchor()));
+ filter(cite.text());
+ if (!cite.file().isEmpty()) endLink();
}
//--------------------------------------
// visitor functions for compound nodes
//--------------------------------------
-void DocbookDocVisitor::visitPre(DocAutoList *l)
+void DocbookDocVisitor::operator()(const DocAutoList &l)
{
DB_VIS_C
if (m_hide) return;
- if (l->isEnumList())
+ if (l.isEnumList())
{
m_t << "<orderedlist>\n";
}
{
m_t << "<itemizedlist>\n";
}
-}
-
-void DocbookDocVisitor::visitPost(DocAutoList *l)
-{
-DB_VIS_C
- if (m_hide) return;
- if (l->isEnumList())
+ visitChildren(l);
+ if (l.isEnumList())
{
m_t << "</orderedlist>\n";
}
}
}
-void DocbookDocVisitor::visitPre(DocAutoListItem *)
+void DocbookDocVisitor::operator()(const DocAutoListItem &li)
{
DB_VIS_C
if (m_hide) return;
m_t << "<listitem>";
-}
-
-void DocbookDocVisitor::visitPost(DocAutoListItem *)
-{
-DB_VIS_C
- if (m_hide) return;
+ visitChildren(li);
m_t << "</listitem>";
}
-void DocbookDocVisitor::visitPre(DocPara *)
+void DocbookDocVisitor::operator()(const DocPara &p)
{
DB_VIS_C
if (m_hide) return;
m_t << "\n";
m_t << "<para>";
-}
-
-void DocbookDocVisitor::visitPost(DocPara *)
-{
-DB_VIS_C
- if (m_hide) return;
+ visitChildren(p);
m_t << "</para>";
m_t << "\n";
}
-void DocbookDocVisitor::visitPre(DocRoot *)
+void DocbookDocVisitor::operator()(const DocRoot &r)
{
DB_VIS_C
- //m_t << "<hr><h4><font color=\"red\">New parser:</font></h4>\n";
+ visitChildren(r);
}
-void DocbookDocVisitor::visitPost(DocRoot *)
-{
-DB_VIS_C
- //m_t << "<hr><h4><font color=\"red\">Old parser:</font></h4>\n";
-}
-
-void DocbookDocVisitor::visitPre(DocSimpleSect *s)
+void DocbookDocVisitor::operator()(const DocSimpleSect &s)
{
DB_VIS_C
if (m_hide) return;
- switch(s->type())
+ switch(s.type())
{
case DocSimpleSect::See:
if (m_insidePre)
case DocSimpleSect::User:
case DocSimpleSect::Rcs:
case DocSimpleSect::Unknown:
- if (s->hasTitle())
+ if (s.hasTitle())
m_t << "<formalpara>\n";
else
m_t << "<para>\n";
break;
}
-}
-void DocbookDocVisitor::visitPost(DocSimpleSect *s)
-{
-DB_VIS_C
- if (m_hide) return;
- switch(s->type())
+ if (s.title())
+ {
+ std::visit(*this,*s.title());
+ }
+ visitChildren(s);
+
+ switch(s.type())
{
case DocSimpleSect::User:
case DocSimpleSect::Rcs:
case DocSimpleSect::Unknown:
- if (s->hasTitle())
+ if (s.hasTitle())
m_t << "</formalpara>\n";
else
m_t << "</para>\n";
}
}
-void DocbookDocVisitor::visitPre(DocTitle *t)
-{
-DB_VIS_C
- if (m_hide) return;
- if (t->hasTitle()) m_t << "<title>";
-}
-
-void DocbookDocVisitor::visitPost(DocTitle *t)
+void DocbookDocVisitor::operator()(const DocTitle &t)
{
DB_VIS_C
if (m_hide) return;
- if (t->hasTitle()) m_t << "</title>";
+ if (t.hasTitle()) m_t << "<title>";
+ visitChildren(t);
+ if (t.hasTitle()) m_t << "</title>";
}
-void DocbookDocVisitor::visitPre(DocSimpleList *)
+void DocbookDocVisitor::operator()(const DocSimpleList &l)
{
DB_VIS_C
if (m_hide) return;
m_t << "<itemizedlist>\n";
-}
-
-void DocbookDocVisitor::visitPost(DocSimpleList *)
-{
-DB_VIS_C
- if (m_hide) return;
+ visitChildren(l);
m_t << "</itemizedlist>\n";
}
-void DocbookDocVisitor::visitPre(DocSimpleListItem *)
+void DocbookDocVisitor::operator()(const DocSimpleListItem &li)
{
DB_VIS_C
if (m_hide) return;
m_t << "<listitem>";
-}
-
-void DocbookDocVisitor::visitPost(DocSimpleListItem *)
-{
-DB_VIS_C
- if (m_hide) return;
+ if (li.paragraph())
+ {
+ visit(*this,*li.paragraph());
+ }
m_t << "</listitem>\n";
}
-void DocbookDocVisitor::visitPre(DocSection *s)
+void DocbookDocVisitor::operator()(const DocSection &s)
{
DB_VIS_C
if (m_hide) return;
- m_t << "<section xml:id=\"_" << stripPath(s->file());
- if (!s->anchor().isEmpty()) m_t << "_1" << s->anchor();
+ m_t << "<section xml:id=\"_" << stripPath(s.file());
+ if (!s.anchor().isEmpty()) m_t << "_1" << s.anchor();
m_t << "\">\n";
m_t << "<title>";
- filter(s->title());
+ filter(s.title());
m_t << "</title>\n";
-}
-
-void DocbookDocVisitor::visitPost(DocSection *)
-{
-DB_VIS_C
+ visitChildren(s);
m_t << "</section>\n";
}
-void DocbookDocVisitor::visitPre(DocHtmlList *s)
-{
-DB_VIS_C
- if (m_hide) return;
- // This will be handled in DocHtmlListItem
-}
-
-void DocbookDocVisitor::visitPost(DocHtmlList *s)
+void DocbookDocVisitor::operator()(const DocHtmlList &s)
{
DB_VIS_C
if (m_hide) return;
- if (s->type()==DocHtmlList::Ordered)
+ if (s.children().empty()) return;
+ // opening tag will be handled in DocHtmlListItem
+ visitChildren(s);
+ if (s.type()==DocHtmlList::Ordered)
m_t << "</orderedlist>\n";
else
m_t << "</itemizedlist>\n";
}
-void DocbookDocVisitor::visitPre(DocHtmlListItem *s)
+void DocbookDocVisitor::operator()(const DocHtmlListItem &s)
{
DB_VIS_C
if (m_hide) return;
- DocHtmlList *l = (DocHtmlList *)s->parent();
+ const DocHtmlList *l = std::get_if<DocHtmlList>(s.parent());
if (l->type()==DocHtmlList::Ordered)
{
- bool isFirst = l->children().front().get()==s;
+ bool isFirst = &std::get<DocHtmlListItem>(l->children().front())==&s;
int value = 0;
QCString type;
- for (const auto &opt : s->attribs())
+ for (const auto &opt : s.attribs())
{
if (opt.name=="value")
{
m_t << "<itemizedlist>\n";
}
m_t << "<listitem>\n";
-}
-
-void DocbookDocVisitor::visitPost(DocHtmlListItem *)
-{
-DB_VIS_C
- if (m_hide) return;
+ visitChildren(s);
m_t << "</listitem>\n";
}
-void DocbookDocVisitor::visitPre(DocHtmlDescList *)
+void DocbookDocVisitor::operator()(const DocHtmlDescList &l)
{
DB_VIS_C
if (m_hide) return;
m_t << "<variablelist>\n";
-}
-
-void DocbookDocVisitor::visitPost(DocHtmlDescList *)
-{
-DB_VIS_C
- if (m_hide) return;
+ visitChildren(l);
m_t << "</variablelist>\n";
}
-void DocbookDocVisitor::visitPre(DocHtmlDescTitle *)
+void DocbookDocVisitor::operator()(const DocHtmlDescTitle &dt)
{
DB_VIS_C
if (m_hide) return;
m_t << "<varlistentry><term>";
-}
-
-void DocbookDocVisitor::visitPost(DocHtmlDescTitle *)
-{
-DB_VIS_C
- if (m_hide) return;
+ visitChildren(dt);
m_t << "</term>\n";
}
-void DocbookDocVisitor::visitPre(DocHtmlDescData *)
+void DocbookDocVisitor::operator()(const DocHtmlDescData &dd)
{
DB_VIS_C
if (m_hide) return;
m_t << "<listitem>";
-}
-
-void DocbookDocVisitor::visitPost(DocHtmlDescData *)
-{
-DB_VIS_C
- if (m_hide) return;
+ visitChildren(dd);
m_t << "</listitem></varlistentry>\n";
}
-void DocbookDocVisitor::visitPre(DocHtmlTable *t)
+void DocbookDocVisitor::operator()(const DocHtmlTable &t)
{
DB_VIS_C
m_bodySet.push(false);
if (m_hide) return;
m_t << "<informaltable frame=\"all\">\n";
- m_t << " <tgroup cols=\"" << (unsigned int)t->numColumns() << "\" align=\"left\" colsep=\"1\" rowsep=\"1\">\n";
- for (uint i = 0; i <t->numColumns(); i++)
+ m_t << " <tgroup cols=\"" << t.numColumns() << "\" align=\"left\" colsep=\"1\" rowsep=\"1\">\n";
+ for (uint i = 0; i <t.numColumns(); i++)
{
// do something with colwidth based of cell width specification (be aware of possible colspan in the header)?
m_t << " <colspec colname='c" << i+1 << "'/>\n";
}
- if (t->hasCaption())
+ if (t.caption())
{
- DocHtmlCaption *c = t->caption();
- m_t << "<caption>";
- if (!c->file().isEmpty())
- {
- m_t << "<anchor xml:id=\"_" << stripPath(c->file()) << "_1" << filterId(c->anchor()) << "\"/>";
- }
+ std::visit(*this,*t.caption());
}
-}
-
-void DocbookDocVisitor::visitPost(DocHtmlTable *)
-{
-DB_VIS_C
- if (m_hide) return;
+ visitChildren(t);
if (m_bodySet.top()) m_t << " </tbody>\n";
m_bodySet.pop();
m_t << " </tgroup>\n";
m_t << "</informaltable>\n";
}
-void DocbookDocVisitor::visitPre(DocHtmlRow *tr)
+void DocbookDocVisitor::operator()(const DocHtmlRow &tr)
{
DB_VIS_C
m_colCnt = 0;
if (m_hide) return;
- if (tr->isHeading())
+ if (tr.isHeading())
{
if (m_bodySet.top()) m_t << "</tbody>\n";
m_bodySet.top() = false;
m_t << " <row ";
- for (const auto &opt : tr->attribs())
+ for (const auto &opt : tr.attribs())
{
if (supportedHtmlAttribute(opt.name))
{
}
}
m_t << ">\n";
-}
-
-void DocbookDocVisitor::visitPost(DocHtmlRow *tr)
-{
-DB_VIS_C
- if (m_hide) return;
+ visitChildren(tr);
m_t << "</row>\n";
- if (tr->isHeading())
+ if (tr.isHeading())
{
m_t << "</thead><tbody>\n";
m_bodySet.top() = true;
}
}
-void DocbookDocVisitor::visitPre(DocHtmlCell *c)
+void DocbookDocVisitor::operator()(const DocHtmlCell &c)
{
DB_VIS_C
m_colCnt++;
if (m_hide) return;
m_t << "<entry";
- for (const auto &opt : c->attribs())
+ for (const auto &opt : c.attribs())
{
if (opt.name=="colspan")
{
}
}
m_t << ">";
-}
-
-void DocbookDocVisitor::visitPost(DocHtmlCell *)
-{
-DB_VIS_C
- if (m_hide) return;
+ visitChildren(c);
m_t << "</entry>";
}
-void DocbookDocVisitor::visitPre(DocHtmlCaption *)
-{
-DB_VIS_C
- if (m_hide) return;
- // start of caption is handled in the DocbookDocVisitor::visitPre(DocHtmlTable *t)
-}
-
-void DocbookDocVisitor::visitPost(DocHtmlCaption *)
+void DocbookDocVisitor::operator()(const DocHtmlCaption &c)
{
DB_VIS_C
if (m_hide) return;
+ m_t << "<caption>";
+ if (!c.file().isEmpty())
+ {
+ m_t << "<anchor xml:id=\"_" << stripPath(c.file()) << "_1" << filterId(c.anchor()) << "\"/>";
+ }
+ visitChildren(c);
m_t << "</caption>\n";
}
-void DocbookDocVisitor::visitPre(DocInternal *)
+void DocbookDocVisitor::operator()(const DocInternal &i)
{
DB_VIS_C
if (m_hide) return;
- // TODO: to be implemented
+ visitChildren(i);
}
-void DocbookDocVisitor::visitPost(DocInternal *)
+void DocbookDocVisitor::operator()(const DocHRef &href)
{
DB_VIS_C
if (m_hide) return;
- // TODO: to be implemented
-}
-
-void DocbookDocVisitor::visitPre(DocHRef *href)
-{
-DB_VIS_C
- if (m_hide) return;
- if (href->url().at(0) != '#')
+ if (href.url().at(0) != '#')
{
- m_t << "<link xlink:href=\"" << convertToDocBook(href->url()) << "\">";
+ m_t << "<link xlink:href=\"" << convertToDocBook(href.url()) << "\">";
}
else
{
- startLink(href->file(),filterId(href->url().mid(1)));
+ startLink(href.file(),filterId(href.url().mid(1)));
}
-}
-
-void DocbookDocVisitor::visitPost(DocHRef *)
-{
-DB_VIS_C
- if (m_hide) return;
+ visitChildren(href);
m_t << "</link>";
}
-void DocbookDocVisitor::visitPre(DocHtmlHeader *)
+void DocbookDocVisitor::operator()(const DocHtmlHeader &h)
{
DB_VIS_C
if (m_hide) return;
m_t << "<formalpara><title>";
-}
-
-void DocbookDocVisitor::visitPost(DocHtmlHeader *)
-{
-DB_VIS_C
- if (m_hide) return;
+ visitChildren(h);
m_t << "</title></formalpara>\n";
}
-void DocbookDocVisitor::visitPre(DocImage *img)
+void DocbookDocVisitor::operator()(const DocImage &img)
{
DB_VIS_C
- if (img->type()==DocImage::DocBook)
+ if (img.type()==DocImage::DocBook)
{
if (m_hide) return;
m_t << "\n";
- QCString baseName=img->name();
+ QCString baseName=img.name();
int i;
if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
{
- baseName=baseName.right((int)baseName.length()-i-1);
+ baseName=baseName.right(baseName.length()-i-1);
}
- visitPreStart(m_t, img->children(), img->hasCaption(), img->relPath() + baseName, img->width(), img->height(), img->isInlineImage());
- }
- else
- {
- pushHidden(m_hide);
- m_hide=TRUE;
- }
-}
-
-void DocbookDocVisitor::visitPost(DocImage *img)
-{
-DB_VIS_C
- if (img->type()==DocImage::DocBook)
- {
- if (m_hide) return;
- visitPostEnd(m_t, img -> hasCaption(),img -> isInlineImage());
- // copy the image to the output dir
- QCString baseName=img->name();
- int i;
- if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
- {
- baseName=baseName.right((int)baseName.length()-i-1);
- }
- QCString m_file;
+ visitPreStart(m_t, img.children(), img.hasCaption(), img.relPath() + baseName, img.width(), img.height(), img.isInlineImage());
+ visitChildren(img);
+ visitPostEnd(m_t, img.hasCaption(),img.isInlineImage());
+ QCString file;
bool ambig;
FileDef *fd=findFileDef(Doxygen::imageNameLinkedMap, baseName, ambig);
if (fd)
{
- m_file=fd->absFilePath();
+ file=fd->absFilePath();
}
- copyFile(m_file,Config_getString(DOCBOOK_OUTPUT)+"/"+baseName);
+ copyFile(file,Config_getString(DOCBOOK_OUTPUT)+"/"+baseName);
}
- else
+ else // skip other formats
{
- m_hide = popHidden();
}
}
-void DocbookDocVisitor::visitPre(DocDotFile *df)
-{
-DB_VIS_C
- if (m_hide) return;
- if (!Config_getBool(DOT_CLEANUP)) copyFile(df->file(),Config_getString(DOCBOOK_OUTPUT)+"/"+stripPath(df->file()));
- startDotFile(df->file(),df->width(),df->height(),df->hasCaption(),df->children(),df->srcFile(),df->srcLine());
-}
-
-void DocbookDocVisitor::visitPost(DocDotFile *df)
-{
-DB_VIS_C
- if (m_hide) return;
- endDotFile(df->hasCaption());
-}
-
-void DocbookDocVisitor::visitPre(DocMscFile *df)
-{
-DB_VIS_C
- if (m_hide) return;
- if (!Config_getBool(DOT_CLEANUP)) copyFile(df->file(),Config_getString(DOCBOOK_OUTPUT)+"/"+stripPath(df->file()));
- startMscFile(df->file(),df->width(),df->height(),df->hasCaption(),df->children(),df->srcFile(),df->srcLine());
-}
-
-void DocbookDocVisitor::visitPost(DocMscFile *df)
-{
-DB_VIS_C
- if (m_hide) return;
- endMscFile(df->hasCaption());
-}
-void DocbookDocVisitor::visitPre(DocDiaFile *df)
+void DocbookDocVisitor::operator()(const DocDotFile &df)
{
DB_VIS_C
if (m_hide) return;
- if (!Config_getBool(DOT_CLEANUP)) copyFile(df->file(),Config_getString(DOCBOOK_OUTPUT)+"/"+stripPath(df->file()));
- startDiaFile(df->file(),df->width(),df->height(),df->hasCaption(),df->children(),df->srcFile(),df->srcLine());
+ if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(DOCBOOK_OUTPUT)+"/"+stripPath(df.file()));
+ startDotFile(df.file(),df.width(),df.height(),df.hasCaption(),df.children(),df.srcFile(),df.srcLine());
+ visitChildren(df);
+ endDotFile(df.hasCaption());
}
-void DocbookDocVisitor::visitPost(DocDiaFile *df)
+void DocbookDocVisitor::operator()(const DocMscFile &df)
{
DB_VIS_C
if (m_hide) return;
- endDiaFile(df->hasCaption());
+ if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(DOCBOOK_OUTPUT)+"/"+stripPath(df.file()));
+ startMscFile(df.file(),df.width(),df.height(),df.hasCaption(),df.children(),df.srcFile(),df.srcLine());
+ visitChildren(df);
+ endMscFile(df.hasCaption());
}
-void DocbookDocVisitor::visitPre(DocLink *lnk)
+void DocbookDocVisitor::operator()(const DocDiaFile &df)
{
DB_VIS_C
if (m_hide) return;
- startLink(lnk->file(),lnk->anchor());
+ if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(DOCBOOK_OUTPUT)+"/"+stripPath(df.file()));
+ startDiaFile(df.file(),df.width(),df.height(),df.hasCaption(),df.children(),df.srcFile(),df.srcLine());
+ visitChildren(df);
+ endDiaFile(df.hasCaption());
}
-void DocbookDocVisitor::visitPost(DocLink *)
+void DocbookDocVisitor::operator()(const DocLink &lnk)
{
DB_VIS_C
if (m_hide) return;
+ startLink(lnk.file(),lnk.anchor());
+ visitChildren(lnk);
endLink();
}
-void DocbookDocVisitor::visitPre(DocRef *ref)
+void DocbookDocVisitor::operator()(const DocRef &ref)
{
DB_VIS_C
if (m_hide) return;
- if (ref->isSubPage())
+ if (ref.isSubPage())
{
- startLink(QCString(),ref->anchor());
+ startLink(QCString(),ref.anchor());
}
else
{
- if (!ref->file().isEmpty()) startLink(ref->file(),ref->anchor());
+ if (!ref.file().isEmpty()) startLink(ref.file(),ref.anchor());
}
- if (!ref->hasLinkText()) filter(ref->targetTitle());
+ if (!ref.hasLinkText()) filter(ref.targetTitle());
+ visitChildren(ref);
+ if (!ref.file().isEmpty()) endLink();
}
-void DocbookDocVisitor::visitPost(DocRef *ref)
-{
-DB_VIS_C
- if (m_hide) return;
- if (!ref->file().isEmpty()) endLink();
-}
-
-void DocbookDocVisitor::visitPre(DocSecRefItem *)
+void DocbookDocVisitor::operator()(const DocSecRefItem &ref)
{
DB_VIS_C
if (m_hide) return;
//m_t << "<tocentry xml:idref=\"_" << stripPath(ref->file()) << "_1" << ref->anchor() << "\">";
m_t << "<tocentry>";
-}
-
-void DocbookDocVisitor::visitPost(DocSecRefItem *)
-{
-DB_VIS_C
- if (m_hide) return;
+ visitChildren(ref);
m_t << "</tocentry>\n";
}
-void DocbookDocVisitor::visitPre(DocSecRefList *)
+void DocbookDocVisitor::operator()(const DocSecRefList &l)
{
DB_VIS_C
if (m_hide) return;
m_t << "<toc>\n";
-}
-
-void DocbookDocVisitor::visitPost(DocSecRefList *)
-{
-DB_VIS_C
- if (m_hide) return;
+ visitChildren(l);
m_t << "</toc>\n";
}
-void DocbookDocVisitor::visitPre(DocParamSect *s)
+void DocbookDocVisitor::operator()(const DocParamSect &s)
{
DB_VIS_C
if (m_hide) return;
m_t << "\n";
m_t << " <formalpara>\n";
m_t << " <title>\n";
- switch(s->type())
+ switch(s.type())
{
case DocParamSect::Param: m_t << theTranslator->trParameters(); break;
case DocParamSect::RetVal: m_t << theTranslator->trReturnValues(); break;
m_t << " <para>\n";
m_t << " <table frame=\"all\">\n";
int ncols = 2;
- if (s->type() == DocParamSect::Param)
+ if (s.type() == DocParamSect::Param)
{
- bool hasInOutSpecs = s->hasInOutSpecifier();
- bool hasTypeSpecs = s->hasTypeSpecifier();
+ bool hasInOutSpecs = s.hasInOutSpecifier();
+ bool hasTypeSpecs = s.hasTypeSpecifier();
if (hasInOutSpecs && hasTypeSpecs) ncols += 2;
else if (hasInOutSpecs || hasTypeSpecs) ncols += 1;
}
else m_t << " <colspec colwidth=\"1*\"/>\n";
}
m_t << " <tbody>\n";
-}
-
-void DocbookDocVisitor::visitPost(DocParamSect *)
-{
-DB_VIS_C
- if (m_hide) return;
+ visitChildren(s);
m_t << " </tbody>\n";
m_t << " </tgroup>\n";
m_t << " </table>\n";
m_t << " ";
}
-void DocbookDocVisitor::visitPre(DocParamList *pl)
+void DocbookDocVisitor::operator()(const DocSeparator &sep)
{
DB_VIS_C
if (m_hide) return;
- m_t << " <row>\n";
+ m_t << " " << sep.chars() << " ";
+}
- DocParamSect *sect = 0;
- if (pl->parent() && pl->parent()->kind()==DocNode::Kind_ParamSect)
- {
- sect=(DocParamSect*)pl->parent();
- }
+void DocbookDocVisitor::operator()(const DocParamList &pl)
+{
+DB_VIS_C
+ if (m_hide) return;
+ m_t << " <row>\n";
+ const DocParamSect *sect = std::get_if<DocParamSect>(pl.parent());
if (sect && sect->hasInOutSpecifier())
{
m_t << "<entry>";
- if (pl->direction()!=DocParamSect::Unspecified)
+ if (pl.direction()!=DocParamSect::Unspecified)
{
- if (pl->direction()==DocParamSect::In)
+ if (pl.direction()==DocParamSect::In)
{
m_t << "in";
}
- else if (pl->direction()==DocParamSect::Out)
+ else if (pl.direction()==DocParamSect::Out)
{
m_t << "out";
}
- else if (pl->direction()==DocParamSect::InOut)
+ else if (pl.direction()==DocParamSect::InOut)
{
m_t << "in,out";
}
if (sect && sect->hasTypeSpecifier())
{
m_t << "<entry>";
- for (const auto &type : pl->paramTypes())
+ for (const auto &type : pl.paramTypes())
{
- if (type->kind()==DocNode::Kind_Word)
- {
- visit((DocWord*)type.get());
- }
- else if (type->kind()==DocNode::Kind_LinkedWord)
- {
- visit((DocLinkedWord*)type.get());
- }
- else if (type->kind()==DocNode::Kind_Sep)
- {
- m_t << " " << ((DocSeparator *)type.get())->chars() << " ";
- }
-
+ std::visit(*this,type);
}
m_t << "</entry>";
}
- if (pl->parameters().empty())
+ if (pl.parameters().empty())
{
m_t << "<entry></entry>\n";
}
{
m_t << "<entry>";
int cnt = 0;
- for (const auto ¶m : pl->parameters())
+ for (const auto ¶m : pl.parameters())
{
if (cnt)
{
m_t << ", ";
}
- if (param->kind()==DocNode::Kind_Word)
- {
- visit((DocWord*)param.get());
- }
- else if (param->kind()==DocNode::Kind_LinkedWord)
- {
- visit((DocLinkedWord*)param.get());
- }
+ std::visit(*this,param);
cnt++;
}
m_t << "</entry>";
}
m_t << "<entry>";
-}
-
-void DocbookDocVisitor::visitPost(DocParamList *)
-{
-DB_VIS_C
- if (m_hide) return;
+ for (const auto &par : pl.paragraphs())
+ {
+ std::visit(*this,par);
+ }
m_t << "</entry>\n";
m_t << " </row>\n";
}
-void DocbookDocVisitor::visitPre(DocXRefItem *x)
+void DocbookDocVisitor::operator()(const DocXRefItem &x)
{
DB_VIS_C
if (m_hide) return;
- if (x->title().isEmpty()) return;
+ if (x.title().isEmpty()) return;
m_t << "<para><link linkend=\"_";
- m_t << stripPath(x->file()) << "_1" << x->anchor();
+ m_t << stripPath(x.file()) << "_1" << x.anchor();
m_t << "\">";
- filter(x->title());
+ filter(x.title());
m_t << "</link>";
m_t << " ";
-}
-
-void DocbookDocVisitor::visitPost(DocXRefItem *x)
-{
-DB_VIS_C
- if (m_hide) return;
- if (x->title().isEmpty()) return;
+ visitChildren(x);
+ if (x.title().isEmpty()) return;
m_t << "</para>";
}
-void DocbookDocVisitor::visitPre(DocInternalRef *ref)
-{
-DB_VIS_C
- if (m_hide) return;
- startLink(ref->file(),ref->anchor());
-}
-
-void DocbookDocVisitor::visitPost(DocInternalRef *)
+void DocbookDocVisitor::operator()(const DocInternalRef &ref)
{
DB_VIS_C
if (m_hide) return;
+ startLink(ref.file(),ref.anchor());
+ visitChildren(ref);
endLink();
m_t << " ";
}
-void DocbookDocVisitor::visitPre(DocText *)
-{
-DB_VIS_C
- // TODO: to be implemented
-}
-
-
-void DocbookDocVisitor::visitPost(DocText *)
+void DocbookDocVisitor::operator()(const DocText &t)
{
DB_VIS_C
- // TODO: to be implemented
+ visitChildren(t);
}
-void DocbookDocVisitor::visitPre(DocHtmlBlockQuote *)
+void DocbookDocVisitor::operator()(const DocHtmlBlockQuote &q)
{
DB_VIS_C
if (m_hide) return;
m_t << "<blockquote>";
-}
-
-void DocbookDocVisitor::visitPost(DocHtmlBlockQuote *)
-{
-DB_VIS_C
- if (m_hide) return;
+ visitChildren(q);
m_t << "</blockquote>";
}
-void DocbookDocVisitor::visitPre(DocVhdlFlow *)
-{
-DB_VIS_C
- // TODO: to be implemented
-}
-
-
-void DocbookDocVisitor::visitPost(DocVhdlFlow *)
+void DocbookDocVisitor::operator()(const DocVhdlFlow &)
{
DB_VIS_C
// TODO: to be implemented
}
-void DocbookDocVisitor::visitPre(DocParBlock *)
-{
-DB_VIS_C
-}
-
-void DocbookDocVisitor::visitPost(DocParBlock *)
+void DocbookDocVisitor::operator()(const DocParBlock &b)
{
DB_VIS_C
+ if (m_hide) return;
+ visitChildren(b);
}
m_t << "</link>";
}
-void DocbookDocVisitor::writeMscFile(const QCString &baseName, DocVerbatim *s)
+void DocbookDocVisitor::writeMscFile(const QCString &baseName, const DocVerbatim &s)
{
DB_VIS_C
QCString shortName = baseName;
int i;
if ((i=shortName.findRev('/'))!=-1)
{
- shortName=shortName.right((int)shortName.length()-i-1);
+ shortName=shortName.right(shortName.length()-i-1);
}
QCString outDir = Config_getString(DOCBOOK_OUTPUT);
- writeMscGraphFromFile(baseName+".msc",outDir,shortName,MSC_BITMAP,s->srcFile(),s->srcLine());
- visitPreStart(m_t, s->children(), s->hasCaption(), s->relPath() + shortName + ".png", s->width(), s->height());
- visitCaption(s->children());
- visitPostEnd(m_t, s->hasCaption());
+ writeMscGraphFromFile(baseName+".msc",outDir,shortName,MSC_BITMAP,s.srcFile(),s.srcLine());
+ visitPreStart(m_t, s.children(), s.hasCaption(), s.relPath() + shortName + ".png", s.width(), s.height());
+ visitCaption(s.children());
+ visitPostEnd(m_t, s.hasCaption());
}
-void DocbookDocVisitor::writePlantUMLFile(const QCString &baseName, DocVerbatim *s)
+void DocbookDocVisitor::writePlantUMLFile(const QCString &baseName, const DocVerbatim &s)
{
DB_VIS_C
QCString shortName = baseName;
int i;
if ((i=shortName.findRev('/'))!=-1)
{
- shortName=shortName.right((int)shortName.length()-i-1);
+ shortName=shortName.right(shortName.length()-i-1);
}
QCString outDir = Config_getString(DOCBOOK_OUTPUT);
PlantumlManager::instance().generatePlantUMLOutput(baseName,outDir,PlantumlManager::PUML_BITMAP);
- visitPreStart(m_t, s->children(), s->hasCaption(), s->relPath() + shortName + ".png", s->width(),s->height());
- visitCaption(s->children());
- visitPostEnd(m_t, s->hasCaption());
+ visitPreStart(m_t, s.children(), s.hasCaption(), s.relPath() + shortName + ".png", s.width(),s.height());
+ visitCaption(s.children());
+ visitPostEnd(m_t, s.hasCaption());
}
void DocbookDocVisitor::startMscFile(const QCString &fileName,
int i;
if ((i=baseName.findRev('/'))!=-1)
{
- baseName=baseName.right((int)baseName.length()-i-1);
+ baseName=baseName.right(baseName.length()-i-1);
}
if ((i=baseName.find('.'))!=-1)
{
m_t << "</para>\n";
}
-void DocbookDocVisitor::writeDiaFile(const QCString &baseName, DocVerbatim *s)
+void DocbookDocVisitor::writeDiaFile(const QCString &baseName, const DocVerbatim &s)
{
DB_VIS_C
QCString shortName = baseName;
int i;
if ((i=shortName.findRev('/'))!=-1)
{
- shortName=shortName.right((int)shortName.length()-i-1);
+ shortName=shortName.right(shortName.length()-i-1);
}
QCString outDir = Config_getString(DOCBOOK_OUTPUT);
- writeDiaGraphFromFile(baseName+".dia",outDir,shortName,DIA_BITMAP,s->srcFile(),s->srcLine());
- visitPreStart(m_t, s->children(), s->hasCaption(), shortName, s->width(),s->height());
- visitCaption(s->children());
- visitPostEnd(m_t, s->hasCaption());
+ writeDiaGraphFromFile(baseName+".dia",outDir,shortName,DIA_BITMAP,s.srcFile(),s.srcLine());
+ visitPreStart(m_t, s.children(), s.hasCaption(), shortName, s.width(),s.height());
+ visitCaption(s.children());
+ visitPostEnd(m_t, s.hasCaption());
}
void DocbookDocVisitor::startDiaFile(const QCString &fileName,
int i;
if ((i=baseName.findRev('/'))!=-1)
{
- baseName=baseName.right((int)baseName.length()-i-1);
+ baseName=baseName.right(baseName.length()-i-1);
}
if ((i=baseName.find('.'))!=-1)
{
m_t << "</para>\n";
}
-void DocbookDocVisitor::writeDotFile(const QCString &baseName, DocVerbatim *s)
+void DocbookDocVisitor::writeDotFile(const QCString &baseName, const DocVerbatim &s)
{
DB_VIS_C
QCString shortName = baseName;
int i;
if ((i=shortName.findRev('/'))!=-1)
{
- shortName=shortName.right((int)shortName.length()-i-1);
+ shortName=shortName.right(shortName.length()-i-1);
}
QCString outDir = Config_getString(DOCBOOK_OUTPUT);
- writeDotGraphFromFile(baseName+".dot",outDir,shortName,GOF_BITMAP,s->srcFile(),s->srcLine());
- visitPreStart(m_t, s->children(), s->hasCaption(), s->relPath() + shortName + "." + getDotImageExtension(), s->width(),s->height());
- visitCaption(s->children());
- visitPostEnd(m_t, s->hasCaption());
+ writeDotGraphFromFile(baseName+".dot",outDir,shortName,GOF_BITMAP,s.srcFile(),s.srcLine());
+ visitPreStart(m_t, s.children(), s.hasCaption(), s.relPath() + shortName + "." + getDotImageExtension(), s.width(),s.height());
+ visitCaption(s.children());
+ visitPostEnd(m_t, s.hasCaption());
}
void DocbookDocVisitor::startDotFile(const QCString &fileName,
int i;
if ((i=baseName.findRev('/'))!=-1)
{
- baseName=baseName.right((int)baseName.length()-i-1);
+ baseName=baseName.right(baseName.length()-i-1);
}
if ((i=baseName.find('.'))!=-1)
{
#include "containers.h"
#include "docvisitor.h"
-#include "docparser.h"
+#include "docnode.h"
#include "qcstring.h"
class CodeOutputInterface;
public:
DocbookDocVisitor(TextStream &t,CodeOutputInterface &ci,const QCString &langExt);
~DocbookDocVisitor();
+ //-----------------------------------------
+ template<class T>
+ void visitChildren(const T &t)
+ {
+ for (const auto &child : t.children())
+ {
+ std::visit(*this, child);
+ }
+ }
//--------------------------------------
// visitor functions for leaf nodes
//--------------------------------------
- void visit(DocWord *);
- void visit(DocLinkedWord *);
- void visit(DocWhiteSpace *);
- void visit(DocSymbol *);
- void visit(DocEmoji *);
- void visit(DocURL *);
- void visit(DocLineBreak *);
- void visit(DocHorRuler *);
- void visit(DocStyleChange *);
- void visit(DocVerbatim *);
- void visit(DocAnchor *);
- void visit(DocInclude *);
- void visit(DocIncOperator *);
- void visit(DocFormula *);
- void visit(DocIndexEntry *);
- void visit(DocSimpleSectSep *);
- void visit(DocCite *);
+ void operator()(const DocWord &);
+ void operator()(const DocLinkedWord &);
+ void operator()(const DocWhiteSpace &);
+ void operator()(const DocSymbol &);
+ void operator()(const DocEmoji &);
+ void operator()(const DocURL &);
+ void operator()(const DocLineBreak &);
+ void operator()(const DocHorRuler &);
+ void operator()(const DocStyleChange &);
+ void operator()(const DocVerbatim &);
+ void operator()(const DocAnchor &);
+ void operator()(const DocInclude &);
+ void operator()(const DocIncOperator &);
+ void operator()(const DocFormula &);
+ void operator()(const DocIndexEntry &);
+ void operator()(const DocSimpleSectSep &);
+ void operator()(const DocCite &);
+ void operator()(const DocSeparator &);
//--------------------------------------
// visitor functions for compound nodes
//--------------------------------------
- void visitPre(DocAutoList *);
- void visitPost(DocAutoList *);
- void visitPre(DocAutoListItem *);
- void visitPost(DocAutoListItem *);
- void visitPre(DocPara *) ;
- void visitPost(DocPara *);
- void visitPre(DocRoot *);
- void visitPost(DocRoot *);
- void visitPre(DocSimpleSect *);
- void visitPost(DocSimpleSect *);
- void visitPre(DocTitle *);
- void visitPost(DocTitle *);
- void visitPre(DocSimpleList *);
- void visitPost(DocSimpleList *);
- void visitPre(DocSimpleListItem *);
- void visitPost(DocSimpleListItem *);
- void visitPre(DocSection *);
- void visitPost(DocSection *);
- void visitPre(DocHtmlList *);
- void visitPost(DocHtmlList *) ;
- void visitPre(DocHtmlListItem *);
- void visitPost(DocHtmlListItem *);
- //void visitPre(DocHtmlPre *);
- //void visitPost(DocHtmlPre *);
- void visitPre(DocHtmlDescList *);
- void visitPost(DocHtmlDescList *);
- void visitPre(DocHtmlDescTitle *);
- void visitPost(DocHtmlDescTitle *);
- void visitPre(DocHtmlDescData *);
- void visitPost(DocHtmlDescData *);
- void visitPre(DocHtmlTable *);
- void visitPost(DocHtmlTable *);
- void visitPre(DocHtmlRow *);
- void visitPost(DocHtmlRow *) ;
- void visitPre(DocHtmlCell *);
- void visitPost(DocHtmlCell *);
- void visitPre(DocHtmlCaption *);
- void visitPost(DocHtmlCaption *);
- void visitPre(DocInternal *);
- void visitPost(DocInternal *);
- void visitPre(DocHRef *);
- void visitPost(DocHRef *);
- void visitPre(DocHtmlHeader *);
- void visitPost(DocHtmlHeader *);
- void visitPre(DocImage *);
- void visitPost(DocImage *);
- void visitPre(DocDotFile *);
- void visitPost(DocDotFile *);
- void visitPre(DocMscFile *);
- void visitPost(DocMscFile *);
- void visitPre(DocDiaFile *);
- void visitPost(DocDiaFile *);
- void visitPre(DocLink *);
- void visitPost(DocLink *);
- void visitPre(DocRef *);
- void visitPost(DocRef *);
- void visitPre(DocSecRefItem *);
- void visitPost(DocSecRefItem *);
- void visitPre(DocSecRefList *);
- void visitPost(DocSecRefList *);
- //void visitPre(DocLanguage *);
- //void visitPost(DocLanguage *);
- void visitPre(DocParamSect *);
- void visitPost(DocParamSect *);
- void visitPre(DocParamList *);
- void visitPost(DocParamList *);
- void visitPre(DocXRefItem *);
- void visitPost(DocXRefItem *);
- void visitPre(DocInternalRef *);
- void visitPost(DocInternalRef *);
- void visitPre(DocText *);
- void visitPost(DocText *);
- void visitPre(DocHtmlBlockQuote *);
- void visitPost(DocHtmlBlockQuote *);
- void visitPre(DocVhdlFlow *);
- void visitPost(DocVhdlFlow *);
- void visitPre(DocParBlock *);
- void visitPost(DocParBlock *);
+ void operator()(const DocAutoList &);
+ void operator()(const DocAutoListItem &);
+ void operator()(const DocPara &) ;
+ void operator()(const DocRoot &);
+ void operator()(const DocSimpleSect &);
+ void operator()(const DocTitle &);
+ void operator()(const DocSimpleList &);
+ void operator()(const DocSimpleListItem &);
+ void operator()(const DocSection &);
+ void operator()(const DocHtmlList &);
+ void operator()(const DocHtmlListItem &);
+ void operator()(const DocHtmlDescList &);
+ void operator()(const DocHtmlDescTitle &);
+ void operator()(const DocHtmlDescData &);
+ void operator()(const DocHtmlTable &);
+ void operator()(const DocHtmlRow &);
+ void operator()(const DocHtmlCell &);
+ void operator()(const DocHtmlCaption &);
+ void operator()(const DocInternal &);
+ void operator()(const DocHRef &);
+ void operator()(const DocHtmlHeader &);
+ void operator()(const DocImage &);
+ void operator()(const DocDotFile &);
+ void operator()(const DocMscFile &);
+ void operator()(const DocDiaFile &);
+ void operator()(const DocLink &);
+ void operator()(const DocRef &);
+ void operator()(const DocSecRefItem &);
+ void operator()(const DocSecRefList &);
+ void operator()(const DocParamSect &);
+ void operator()(const DocParamList &);
+ void operator()(const DocXRefItem &);
+ void operator()(const DocInternalRef &);
+ void operator()(const DocText &);
+ void operator()(const DocHtmlBlockQuote &);
+ void operator()(const DocVhdlFlow &);
+ void operator()(const DocParBlock &);
private:
//--------------------------------------
const QCString &height, bool hasCaption,const DocNodeList &children,
const QCString &srcFile, int srcLine);
void endMscFile(bool hasCaption);
- void writeMscFile(const QCString &fileName, DocVerbatim *s);
+ void writeMscFile(const QCString &fileName, const DocVerbatim &s);
void startDiaFile(const QCString &fileName,const QCString &width,
const QCString &height, bool hasCaption,const DocNodeList &children,
const QCString &srcFile, int srcLine);
void endDiaFile(bool hasCaption);
- void writeDiaFile(const QCString &fileName, DocVerbatim *s);
+ void writeDiaFile(const QCString &fileName, const DocVerbatim &s);
void startDotFile(const QCString &fileName,const QCString &width,
const QCString &height, bool hasCaption,const DocNodeList &children,
const QCString &srcFile, int srcLine);
void endDotFile(bool hasCaption);
- void writeDotFile(const QCString &fileName, DocVerbatim *s);
- void writePlantUMLFile(const QCString &fileName, DocVerbatim *s);
+ void writeDotFile(const QCString &fileName, const DocVerbatim &s);
+ void writePlantUMLFile(const QCString &fileName, const DocVerbatim &s);
void visitPreStart(TextStream &t,
const DocNodeList &children,
bool hasCaption,
--- /dev/null
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2022 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
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#include "docnode.h"
+#include "docparser_p.h"
+#include "htmlentity.h"
+#include "emoji.h"
+#include "message.h"
+#include "doxygen.h"
+#include "cite.h"
+#include "util.h"
+#include "formula.h"
+#include "markdown.h"
+#include "pagedef.h"
+#include "namespacedef.h"
+#include "groupdef.h"
+#include "cmdmapper.h"
+#include "config.h"
+#include "vhdldocgen.h"
+#include "doctokenizer.h"
+#include "plantuml.h"
+
+// debug off
+#define DBG(x) do {} while(0)
+
+// debug to stdout
+//#define DBG(x) printf x
+
+// debug to stderr
+//#define myprintf(...) fprintf(stderr,__VA_ARGS__)
+//#define DBG(x) myprintf x
+
+#define INTERNAL_ASSERT(x) do {} while(0)
+//#define INTERNAL_ASSERT(x) if (!(x)) DBG(("INTERNAL_ASSERT(%s) failed retval=0x%x: file=%s line=%d\n",#x,retval,__FILE__,__LINE__));
+
+//---------------------------------------------------------------------------
+
+static const char *g_sectionLevelToName[] =
+{
+ "page",
+ "section",
+ "subsection",
+ "subsubsection",
+ "paragraph",
+ "subparagraph"
+};
+
+
+//---------------------------------------------------------------------------
+
+static const std::set<std::string> g_plantumlEngine {
+ "uml", "bpm", "wire", "dot", "ditaa",
+ "salt", "math", "latex", "gantt", "mindmap",
+ "wbs", "yaml", "creole", "json", "flow",
+ "board", "git"
+};
+
+//---------------------------------------------------------------------------
+
+// replaces { with < and } with > and also
+// replaces > with < and > with > within string s
+static void unescapeCRef(QCString &s)
+{
+ QCString result;
+ const char *p = s.data();
+ if (p)
+ {
+ char c;
+ while ((c=*p++))
+ {
+ if (c=='{') c='<'; else if (c=='}') c='>';
+ result+=c;
+ }
+ }
+
+ result=substitute(result,"<","<");
+ result=substitute(result,">",">");
+ s = result;
+}
+
+//---------------------------------------------------------------------------
+
+/*! Strips known html and tex extensions from \a text. */
+static QCString stripKnownExtensions(const QCString &text)
+{
+ QCString result=text;
+ if (result.right(4)==".tex")
+ {
+ result=result.left(result.length()-4);
+ }
+ else if (result.right(Doxygen::htmlFileExtension.length())==
+ QCString(Doxygen::htmlFileExtension))
+ {
+ result=result.left(result.length()-Doxygen::htmlFileExtension.length());
+ }
+ return result;
+}
+
+static void setParent(DocNodeVariant *n,DocNodeVariant *newParent)
+{
+ std::visit([&](auto &&x)->decltype(auto) { return x.setParent(newParent); }, *n);
+}
+
+//----------- DocStyleChange
+
+const char *DocStyleChange::styleString() const
+{
+ switch (m_style)
+ {
+ case DocStyleChange::Bold: return "b";
+ case DocStyleChange::Italic: return "em";
+ case DocStyleChange::Code: return "code";
+ case DocStyleChange::Center: return "center";
+ case DocStyleChange::Small: return "small";
+ case DocStyleChange::Cite: return "cite";
+ case DocStyleChange::Subscript: return "subscript";
+ case DocStyleChange::Superscript: return "superscript";
+ case DocStyleChange::Preformatted: return "pre";
+ case DocStyleChange::Div: return "div";
+ case DocStyleChange::Span: return "span";
+ case DocStyleChange::Strike: return "strike";
+ case DocStyleChange::S: return "s";
+ case DocStyleChange::Del: return "del";
+ case DocStyleChange::Underline: return "u";
+ case DocStyleChange::Ins: return "ins";
+ case DocStyleChange::Details: return "details";
+ case DocStyleChange::Summary: return "summary";
+ }
+ return "<invalid>";
+}
+
+//----------- DocSymbol
+
+HtmlEntityMapper::SymType DocSymbol::decodeSymbol(const QCString &symName)
+{
+ DBG(("decodeSymbol(%s)\n",qPrint(symName)));
+ return HtmlEntityMapper::instance()->name2sym(symName);
+}
+
+//----------- DocEmoji
+
+DocEmoji::DocEmoji(DocParser *parser,DocNodeVariant *parent,const QCString &symName) :
+ DocNode(parser,parent), m_symName(symName), m_index(-1)
+{
+ QCString locSymName = symName;
+ uint len=locSymName.length();
+ if (len>0)
+ {
+ if (locSymName.at(len-1)!=':') locSymName.append(":");
+ if (locSymName.at(0)!=':') locSymName.prepend(":");
+ }
+ m_symName = locSymName;
+ m_index = EmojiEntityMapper::instance()->symbol2index(m_symName.str());
+ if (m_index==-1)
+ {
+ warn_doc_error(parser->context.fileName,parser->tokenizer.getLineNr(),"Found unsupported emoji symbol '%s'\n",qPrint(m_symName));
+ }
+}
+
+//---------------------------------------------------------------------------
+
+DocWord::DocWord(DocParser *parser,DocNodeVariant *parent,const QCString &word) :
+ DocNode(parser,parent), m_word(word)
+{
+ //printf("new word %s url=%s\n",qPrint(word),qPrint(parser->context.searchUrl));
+ if (Doxygen::searchIndex && !parser->context.searchUrl.isEmpty())
+ {
+ parser->searchData.addWord(word,false);
+ }
+}
+
+//---------------------------------------------------------------------------
+
+DocLinkedWord::DocLinkedWord(DocParser *parser,DocNodeVariant *parent,const QCString &word,
+ const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &tooltip) :
+ DocNode(parser,parent), m_word(word), m_ref(ref),
+ m_file(file), m_relPath(parser->context.relPath), m_anchor(anchor),
+ m_tooltip(tooltip)
+{
+ //printf("DocLinkedWord: new word %s url=%s tooltip='%s'\n",
+ // qPrint(word),qPrint(parser->context.searchUrl),qPrint(tooltip));
+ if (Doxygen::searchIndex && !parser->context.searchUrl.isEmpty())
+ {
+ parser->searchData.addWord(word,false);
+ }
+}
+
+//---------------------------------------------------------------------------
+
+DocAnchor::DocAnchor(DocParser *parser,DocNodeVariant *parent,const QCString &id,bool newAnchor) : DocNode(parser,parent)
+{
+ if (id.isEmpty())
+ {
+ warn_doc_error(parser->context.fileName,parser->tokenizer.getLineNr(),"Empty anchor label");
+ return;
+ }
+
+ const CitationManager &ct = CitationManager::instance();
+ QCString anchorPrefix = ct.anchorPrefix();
+ if (id.left(anchorPrefix.length()) == anchorPrefix)
+ {
+ const CiteInfo *cite = ct.find(id.mid(anchorPrefix.length()));
+ if (cite)
+ {
+ m_file = convertNameToFile(ct.fileName(),FALSE,TRUE);
+ m_anchor = id;
+ }
+ else
+ {
+ warn_doc_error(parser->context.fileName,parser->tokenizer.getLineNr(),"Invalid cite anchor id '%s'",qPrint(id));
+ m_anchor = "invalid";
+ m_file = "invalid";
+ }
+ }
+ else if (newAnchor) // found <a name="label">
+ {
+ m_anchor = id;
+ }
+ else // found \anchor label
+ {
+ const SectionInfo *sec = SectionManager::instance().find(id);
+ if (sec)
+ {
+ //printf("Found anchor %s\n",qPrint(id));
+ m_file = sec->fileName();
+ m_anchor = sec->label();
+ }
+ else
+ {
+ warn_doc_error(parser->context.fileName,parser->tokenizer.getLineNr(),"Invalid anchor id '%s'",qPrint(id));
+ m_anchor = "invalid";
+ m_file = "invalid";
+ }
+ }
+}
+
+//---------------------------------------------------------------------------
+
+DocVerbatim::DocVerbatim(DocParser *parser,DocNodeVariant *parent,const QCString &context,
+ const QCString &text, Type t,bool isExample,
+ const QCString &exampleFile,bool isBlock,const QCString &lang)
+ : DocNode(parser,parent), p(std::make_unique<Private>(context, text, t, isExample, exampleFile, parser->context.relPath, lang, isBlock))
+{
+}
+
+
+//---------------------------------------------------------------------------
+
+void DocInclude::parse(DocNodeVariant *)
+{
+ DBG(("DocInclude::parse(file=%s,text=%s)\n",qPrint(m_file),qPrint(m_text)));
+ switch(m_type)
+ {
+ case DontIncWithLines:
+ // fall through
+ case IncWithLines:
+ // fall through
+ case Include:
+ // fall through
+ case DontInclude:
+ parser()->readTextFileByName(m_file,m_text);
+ parser()->context.includeFileName = m_file;
+ parser()->context.includeFileText = m_text;
+ parser()->context.includeFileOffset = 0;
+ parser()->context.includeFileLength = m_text.length();
+ parser()->context.includeFileLine = 0;
+ parser()->context.includeFileShowLineNo = (m_type == DontIncWithLines || m_type == IncWithLines);
+ //printf("parser->context.includeFile=<<%s>>\n",qPrint(parser->context.includeFileText));
+ break;
+ case VerbInclude:
+ // fall through
+ case HtmlInclude:
+ case LatexInclude:
+ case DocInclude::RtfInclude:
+ case DocInclude::ManInclude:
+ case DocInclude::XmlInclude:
+ case DocInclude::DocbookInclude:
+ parser()->readTextFileByName(m_file,m_text);
+ break;
+ case Snippet:
+ case SnipWithLines:
+ parser()->readTextFileByName(m_file,m_text);
+ // check here for the existence of the blockId inside the file, so we
+ // only generate the warning once.
+ int count;
+ if (!m_blockId.isEmpty() && (count=m_text.contains(m_blockId.data()))!=2)
+ {
+ warn_doc_error(parser()->context.fileName,
+ parser()->tokenizer.getLineNr(),
+ "block marked with %s for \\snippet should appear twice in file %s, found it %d times\n",
+ qPrint(m_blockId),qPrint(m_file),count);
+ }
+ break;
+ case DocInclude::SnippetDoc:
+ case DocInclude::IncludeDoc:
+ err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
+ "Please create a bug report\n",__FILE__);
+ break;
+ }
+}
+
+//---------------------------------------------------------------------------
+
+void DocIncOperator::parse(DocNodeVariant *)
+{
+ if (parser()->context.includeFileName.isEmpty())
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),
+ "No previous '\\include' or '\\dontinclude' command for '\\%s' present",
+ typeAsString());
+ }
+
+ m_includeFileName = parser()->context.includeFileName;
+ const char *p = parser()->context.includeFileText.data();
+ uint l = parser()->context.includeFileLength;
+ uint o = parser()->context.includeFileOffset;
+ int il = parser()->context.includeFileLine;
+ DBG(("DocIncOperator::parse() text=%s off=%d len=%d\n",p,o,l));
+ uint so = o,bo;
+ bool nonEmpty = FALSE;
+ switch(type())
+ {
+ case Line:
+ while (o<l)
+ {
+ char c = p[o];
+ if (c=='\n')
+ {
+ parser()->context.includeFileLine++;
+ if (nonEmpty) break; // we have a pattern to match
+ so=o+1; // no pattern, skip empty line
+ }
+ else if (!isspace(static_cast<uchar>(c))) // no white space char
+ {
+ nonEmpty=TRUE;
+ }
+ o++;
+ }
+ if (parser()->context.includeFileText.mid(so,o-so).find(m_pattern)!=-1)
+ {
+ m_line = il;
+ m_text = parser()->context.includeFileText.mid(so,o-so);
+ DBG(("DocIncOperator::parse() Line: %s\n",qPrint(m_text)));
+ }
+ parser()->context.includeFileOffset = std::min(l,o+1); // set pointer to start of new line
+ m_showLineNo = parser()->context.includeFileShowLineNo;
+ break;
+ case SkipLine:
+ while (o<l)
+ {
+ so=o;
+ while (o<l)
+ {
+ char c = p[o];
+ if (c=='\n')
+ {
+ parser()->context.includeFileLine++;
+ if (nonEmpty) break; // we have a pattern to match
+ so=o+1; // no pattern, skip empty line
+ }
+ else if (!isspace(static_cast<uchar>(c))) // no white space char
+ {
+ nonEmpty=TRUE;
+ }
+ o++;
+ }
+ if (parser()->context.includeFileText.mid(so,o-so).find(m_pattern)!=-1)
+ {
+ m_line = il;
+ m_text = parser()->context.includeFileText.mid(so,o-so);
+ DBG(("DocIncOperator::parse() SkipLine: %s\n",qPrint(m_text)));
+ break;
+ }
+ o++; // skip new line
+ }
+ parser()->context.includeFileOffset = std::min(l,o+1); // set pointer to start of new line
+ m_showLineNo = parser()->context.includeFileShowLineNo;
+ break;
+ case Skip:
+ while (o<l)
+ {
+ so=o;
+ while (o<l)
+ {
+ char c = p[o];
+ if (c=='\n')
+ {
+ parser()->context.includeFileLine++;
+ if (nonEmpty) break; // we have a pattern to match
+ so=o+1; // no pattern, skip empty line
+ }
+ else if (!isspace(static_cast<uchar>(c))) // no white space char
+ {
+ nonEmpty=TRUE;
+ }
+ o++;
+ }
+ if (parser()->context.includeFileText.mid(so,o-so).find(m_pattern)!=-1)
+ {
+ break;
+ }
+ o++; // skip new line
+ }
+ parser()->context.includeFileOffset = so; // set pointer to start of new line
+ m_showLineNo = parser()->context.includeFileShowLineNo;
+ break;
+ case Until:
+ bo=o;
+ while (o<l)
+ {
+ so=o;
+ while (o<l)
+ {
+ char c = p[o];
+ if (c=='\n')
+ {
+ parser()->context.includeFileLine++;
+ if (nonEmpty) break; // we have a pattern to match
+ so=o+1; // no pattern, skip empty line
+ }
+ else if (!isspace(static_cast<uchar>(c))) // no white space char
+ {
+ nonEmpty=TRUE;
+ }
+ o++;
+ }
+ if (parser()->context.includeFileText.mid(so,o-so).find(m_pattern)!=-1)
+ {
+ m_line = il;
+ m_text = parser()->context.includeFileText.mid(bo,o-bo);
+ DBG(("DocIncOperator::parse() Until: %s\n",qPrint(m_text)));
+ break;
+ }
+ o++; // skip new line
+ }
+ parser()->context.includeFileOffset = std::min(l,o+1); // set pointer to start of new line
+ m_showLineNo = parser()->context.includeFileShowLineNo;
+ break;
+ }
+}
+
+//---------------------------------------------------------------------------
+
+DocXRefItem::DocXRefItem(DocParser *parser,DocNodeVariant *parent,int id,const QCString &key) :
+ DocCompoundNode(parser,parent), m_id(id), m_key(key), m_relPath(parser->context.relPath)
+{
+}
+
+bool DocXRefItem::parse(DocNodeVariant *thisVariant)
+{
+ RefList *refList = RefListManager::instance().find(m_key);
+ if (refList && refList->isEnabled())
+ {
+ RefItem *item = refList->find(m_id);
+ ASSERT(item!=0);
+ if (item)
+ {
+ if (parser()->context.memberDef && parser()->context.memberDef->name().at(0)=='@')
+ {
+ m_file = "@"; // can't cross reference anonymous enum
+ m_anchor = "@";
+ }
+ else
+ {
+ m_file = refList->fileName();
+ m_anchor = item->anchor();
+ }
+ m_title = refList->sectionTitle();
+ //printf("DocXRefItem: file=%s anchor=%s title=%s\n",
+ // qPrint(m_file),qPrint(m_anchor),qPrint(m_title));
+
+ if (!item->text().isEmpty())
+ {
+ parser()->pushContext();
+ parser()->internalValidatingParseDoc(thisVariant,children(),item->text());
+ parser()->popContext();
+ }
+ }
+ return TRUE;
+ }
+ return FALSE;
+}
+
+//---------------------------------------------------------------------------
+
+DocFormula::DocFormula(DocParser *parser,DocNodeVariant *parent,int id) : DocNode(parser,parent),
+ m_relPath(parser->context.relPath)
+{
+ QCString text = FormulaManager::instance().findFormula(id);
+ if (!text.isEmpty())
+ {
+ m_id = id;
+ m_name.sprintf("form_%d",m_id);
+ m_text = text;
+ }
+ else // wrong \_form#<n> command
+ {
+ warn_doc_error(parser->context.fileName,parser->tokenizer.getLineNr(),"Wrong formula id %d",id);
+ m_id = -1;
+ }
+}
+
+//---------------------------------------------------------------------------
+
+DocSecRefItem::DocSecRefItem(DocParser *parser,DocNodeVariant *parent,const QCString &target) :
+ DocCompoundNode(parser,parent), m_target(target), m_relPath(parser->context.relPath)
+{
+}
+
+void DocSecRefItem::parse(DocNodeVariant *thisVariant)
+{
+ DBG(("DocSecRefItem::parse() start\n"));
+ auto ns = AutoNodeStack(parser(),thisVariant);
+
+ parser()->tokenizer.setStateTitle();
+ int tok;
+ while ((tok=parser()->tokenizer.lex()))
+ {
+ if (!parser()->defaultHandleToken(thisVariant,tok,children()))
+ {
+ parser()->errorHandleDefaultToken(thisVariant,tok,children(),"\\refitem");
+ }
+ }
+ parser()->tokenizer.setStatePara();
+ parser()->handlePendingStyleCommands(thisVariant,children());
+
+ if (!m_target.isEmpty())
+ {
+ SrcLangExt lang = getLanguageFromFileName(m_target);
+ const SectionInfo *sec = SectionManager::instance().find(m_target);
+ if (sec==0 && lang==SrcLangExt_Markdown) // lookup as markdown file
+ {
+ sec = SectionManager::instance().find(markdownFileNameToId(m_target));
+ }
+ if (sec) // ref to section or anchor
+ {
+ // set defaults
+ m_ref = sec->ref();
+ m_file = stripKnownExtensions(sec->fileName());
+ m_refType = Section;
+ m_anchor = sec->label();
+ m_isSubPage = false;
+ // adjust if needed
+ switch (sec->type())
+ {
+ case SectionType::Page:
+ {
+ PageDef *pd = Doxygen::pageLinkedMap->find(m_target);
+ m_isSubPage = pd && pd->hasParentPage();
+ if (!m_isSubPage)
+ {
+ m_anchor="";
+ }
+ }
+ break;
+ case SectionType::Anchor:
+ m_refType = Anchor;
+ break;
+ case SectionType::Table:
+ m_refType = Table;
+ break;
+ default:
+ break;
+ }
+ //printf("m_ref=%s,m_file=%s,type=%d\n",
+ // qPrint(m_ref),qPrint(m_file),m_refType);
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"reference to unknown section %s",
+ qPrint(m_target));
+ }
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"reference to empty target");
+ }
+
+ DBG(("DocSecRefItem::parse() end\n"));
+}
+
+//---------------------------------------------------------------------------
+
+void DocSecRefList::parse(DocNodeVariant *thisVariant)
+{
+ DBG(("DocSecRefList::parse() start\n"));
+ auto ns = AutoNodeStack(parser(),thisVariant);
+
+ int tok=parser()->tokenizer.lex();
+ // skip white space
+ while (tok==TK_WHITESPACE || tok==TK_NEWPARA) tok=parser()->tokenizer.lex();
+ // handle items
+ while (tok)
+ {
+ if (tok==TK_COMMAND_AT || tok == TK_COMMAND_BS)
+ {
+ const char *cmd_start = (tok==TK_COMMAND_AT ? "@" : "\\");
+ switch (Mappers::cmdMapper->map(parser()->context.token->name))
+ {
+ case CMD_SECREFITEM:
+ {
+ tok=parser()->tokenizer.lex();
+ if (tok!=TK_WHITESPACE)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected whitespace after \\refitem command");
+ break;
+ }
+ tok=parser()->tokenizer.lex();
+ if (tok!=TK_WORD && tok!=TK_LNKWORD)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected token %s as the argument of \\refitem",
+ DocTokenizer::tokToString(tok));
+ break;
+ }
+
+ auto vDocSecRefItem = children().append<DocSecRefItem>(parser(),thisVariant,parser()->context.token->name);
+ children().get_last<DocSecRefItem>()->parse(vDocSecRefItem);
+ }
+ break;
+ case CMD_ENDSECREFLIST:
+ goto endsecreflist;
+ default:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Illegal command %s as part of a \\secreflist",
+ qPrint(cmd_start + parser()->context.token->name));
+ goto endsecreflist;
+ }
+ }
+ else if (tok==TK_WHITESPACE)
+ {
+ // ignore whitespace
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected token %s inside section reference list",
+ DocTokenizer::tokToString(tok));
+ goto endsecreflist;
+ }
+ tok=parser()->tokenizer.lex();
+ }
+
+endsecreflist:
+ DBG(("DocSecRefList::parse() end\n"));
+}
+
+//---------------------------------------------------------------------------
+
+DocInternalRef::DocInternalRef(DocParser *parser,DocNodeVariant *parent,const QCString &ref)
+ : DocCompoundNode(parser,parent), m_relPath(parser->context.relPath)
+{
+ int i=ref.find('#');
+ if (i!=-1)
+ {
+ m_anchor = ref.right(static_cast<int>(ref.length())-i-1);
+ m_file = ref.left(i);
+ }
+ else
+ {
+ m_file = ref;
+ }
+}
+
+void DocInternalRef::parse(DocNodeVariant *thisVariant)
+{
+ auto ns = AutoNodeStack(parser(),thisVariant);
+ DBG(("DocInternalRef::parse() start\n"));
+
+ int tok;
+ while ((tok=parser()->tokenizer.lex()))
+ {
+ if (!parser()->defaultHandleToken(thisVariant,tok,children()))
+ {
+ parser()->errorHandleDefaultToken(thisVariant,tok,children(),"\\ref");
+ }
+ }
+
+ parser()->handlePendingStyleCommands(thisVariant,children());
+ DBG(("DocInternalRef::parse() end\n"));
+}
+
+//---------------------------------------------------------------------------
+
+DocRef::DocRef(DocParser *parser,DocNodeVariant *parent,const QCString &target,const QCString &context) :
+ DocCompoundNode(parser,parent), m_refType(Unknown), m_isSubPage(FALSE)
+{
+ const Definition *compound = 0;
+ QCString anchor;
+ //printf("DocRef::DocRef(target=%s,context=%s)\n",qPrint(target),qPrint(context));
+ ASSERT(!target.isEmpty());
+ SrcLangExt lang = getLanguageFromFileName(target);
+ m_relPath = parser->context.relPath;
+ const SectionInfo *sec = SectionManager::instance().find(target);
+ if (sec==0 && lang==SrcLangExt_Markdown) // lookup as markdown file
+ {
+ sec = SectionManager::instance().find(markdownFileNameToId(target));
+ }
+ if (sec) // ref to section or anchor
+ {
+ PageDef *pd = 0;
+ if (sec->type()==SectionType::Page)
+ {
+ pd = Doxygen::pageLinkedMap->find(target);
+ }
+ m_text = sec->title();
+ if (m_text.isEmpty()) m_text = sec->label();
+
+ m_ref = sec->ref();
+ m_file = stripKnownExtensions(sec->fileName());
+ if (sec->type()==SectionType::Anchor)
+ {
+ m_refType = Anchor;
+ }
+ else if (sec->type()==SectionType::Table)
+ {
+ m_refType = Table;
+ }
+ else
+ {
+ m_refType = Section;
+ }
+ m_isSubPage = pd && pd->hasParentPage();
+ if (sec->type()!=SectionType::Page || m_isSubPage) m_anchor = sec->label();
+ //printf("m_text=%s,m_ref=%s,m_file=%s,type=%d\n",
+ // qPrint(m_text),qPrint(m_ref),qPrint(m_file),m_refType);
+ return;
+ }
+ else if (resolveLink(context,target,TRUE,&compound,anchor))
+ {
+ bool isFile = compound ?
+ (compound->definitionType()==Definition::TypeFile ||
+ compound->definitionType()==Definition::TypePage ? TRUE : FALSE) :
+ FALSE;
+ m_text = linkToText(compound?compound->getLanguage():SrcLangExt_Unknown,target,isFile);
+ m_anchor = anchor;
+ if (compound && compound->isLinkable()) // ref to compound
+ {
+ if (anchor.isEmpty() && /* compound link */
+ compound->definitionType()==Definition::TypeGroup && /* is group */
+ !toGroupDef(compound)->groupTitle().isEmpty() /* with title */
+ )
+ {
+ m_text=(toGroupDef(compound))->groupTitle(); // use group's title as link
+ }
+ else if (compound->definitionType()==Definition::TypeMember &&
+ toMemberDef(compound)->isObjCMethod())
+ {
+ // Objective C Method
+ const MemberDef *member = toMemberDef(compound);
+ bool localLink = parser->context.memberDef ? member->getClassDef()==parser->context.memberDef->getClassDef() : FALSE;
+ m_text = member->objCMethodName(localLink,parser->context.inSeeBlock);
+ }
+
+ m_file = compound->getOutputFileBase();
+ m_ref = compound->getReference();
+ //printf("isFile=%d compound=%s (%d)\n",isFile,qPrint(compound->name()),
+ // compound->definitionType());
+ return;
+ }
+ else if (compound && compound->definitionType()==Definition::TypeFile &&
+ toFileDef(compound)->generateSourceFile()
+ ) // undocumented file that has source code we can link to
+ {
+ m_file = compound->getSourceFileBase();
+ m_ref = compound->getReference();
+ return;
+ }
+ }
+ m_text = target;
+ warn_doc_error(parser->context.fileName,parser->tokenizer.getLineNr(),"unable to resolve reference to '%s' for \\ref command",
+ qPrint(target));
+}
+
+static void flattenParagraphs(DocNodeVariant *root,DocNodeList &children)
+{
+ DocNodeList newChildren;
+ for (auto &dn : children)
+ {
+ DocPara *para = std::get_if<DocPara>(&dn);
+ if (para)
+ {
+ //// move the children of the paragraph to the end of the newChildren list
+ newChildren.move_append(para->children());
+ }
+ }
+
+ // replace the children list by the newChildren list
+ children.clear();
+ children.move_append(newChildren);
+ // reparent the children
+ for (auto &cn : children)
+ {
+ setParent(&cn,root);
+ }
+}
+
+void DocRef::parse(DocNodeVariant *thisVariant)
+{
+ auto ns = AutoNodeStack(parser(),thisVariant);
+ DBG(("DocRef::parse() start\n"));
+
+ int tok;
+ while ((tok=parser()->tokenizer.lex()))
+ {
+ if (!parser()->defaultHandleToken(thisVariant,tok,children()))
+ {
+ switch (tok)
+ {
+ case TK_HTMLTAG:
+ break;
+ default:
+ parser()->errorHandleDefaultToken(thisVariant,tok,children(),"\\ref");
+ break;
+ }
+ }
+ }
+
+ if (children().empty() && !m_text.isEmpty())
+ {
+ parser()->context.insideHtmlLink=TRUE;
+ parser()->pushContext();
+ parser()->internalValidatingParseDoc(thisVariant,children(),m_text);
+ parser()->popContext();
+ parser()->context.insideHtmlLink=FALSE;
+ flattenParagraphs(thisVariant,children());
+ }
+
+ parser()->handlePendingStyleCommands(thisVariant,children());
+}
+
+//---------------------------------------------------------------------------
+
+DocCite::DocCite(DocParser *parser,DocNodeVariant *parent,const QCString &target,const QCString &) : DocNode(parser,parent)
+{
+ size_t numBibFiles = Config_getList(CITE_BIB_FILES).size();
+ //printf("DocCite::DocCite(target=%s)\n",qPrint(target));
+ ASSERT(!target.isEmpty());
+ m_relPath = parser->context.relPath;
+ const CitationManager &ct = CitationManager::instance();
+ const CiteInfo *cite = ct.find(target);
+ //printf("cite=%p text='%s' numBibFiles=%d\n",cite,cite?qPrint(cite->text):"<null>",numBibFiles);
+ if (numBibFiles>0 && cite && !cite->text().isEmpty()) // ref to citation
+ {
+ m_text = cite->text();
+ m_ref = "";
+ m_anchor = ct.anchorPrefix()+cite->label();
+ m_file = convertNameToFile(ct.fileName(),FALSE,TRUE);
+ //printf("CITE ==> m_text=%s,m_ref=%s,m_file=%s,m_anchor=%s\n",
+ // qPrint(m_text),qPrint(m_ref),qPrint(m_file),qPrint(m_anchor));
+ return;
+ }
+ m_text = target;
+ if (numBibFiles==0)
+ {
+ warn_doc_error(parser->context.fileName,parser->tokenizer.getLineNr(),"\\cite command found but no bib files specified via CITE_BIB_FILES!");
+ }
+ else if (cite==0)
+ {
+ warn_doc_error(parser->context.fileName,parser->tokenizer.getLineNr(),"unable to resolve reference to '%s' for \\cite command",
+ qPrint(target));
+ }
+ else
+ {
+ warn_doc_error(parser->context.fileName,parser->tokenizer.getLineNr(),"\\cite command to '%s' does not have an associated number",
+ qPrint(target));
+ }
+}
+
+//---------------------------------------------------------------------------
+
+DocLink::DocLink(DocParser *parser,DocNodeVariant *parent,const QCString &target) : DocCompoundNode(parser,parent)
+{
+ const Definition *compound = 0;
+ QCString anchor;
+ m_refText = target;
+ m_relPath = parser->context.relPath;
+ if (!m_refText.isEmpty() && m_refText.at(0)=='#')
+ {
+ m_refText = m_refText.right(m_refText.length()-1);
+ }
+ if (resolveLink(parser->context.context,stripKnownExtensions(target),parser->context.inSeeBlock,&compound,anchor))
+ {
+ m_anchor = anchor;
+ if (compound && compound->isLinkable())
+ {
+ m_file = compound->getOutputFileBase();
+ m_ref = compound->getReference();
+ }
+ else if (compound && compound->definitionType()==Definition::TypeFile &&
+ (toFileDef(compound))->generateSourceFile()
+ ) // undocumented file that has source code we can link to
+ {
+ m_file = compound->getSourceFileBase();
+ m_ref = compound->getReference();
+ }
+ return;
+ }
+
+ // bogus link target
+ warn_doc_error(parser->context.fileName,parser->tokenizer.getLineNr(),"unable to resolve link to '%s' for \\link command",
+ qPrint(target));
+}
+
+
+QCString DocLink::parse(DocNodeVariant *thisVariant,bool isJavaLink,bool isXmlLink)
+{
+ QCString result;
+ auto ns = AutoNodeStack(parser(),thisVariant);
+ DBG(("DocLink::parse() start\n"));
+
+ int tok;
+ while ((tok=parser()->tokenizer.lex()))
+ {
+ if (!parser()->defaultHandleToken(thisVariant,tok,children(),FALSE))
+ {
+ const char *cmd_start = "\\";
+ switch (tok)
+ {
+ case TK_COMMAND_AT:
+ cmd_start = "@";
+ // fall through
+ case TK_COMMAND_BS:
+ switch (Mappers::cmdMapper->map(parser()->context.token->name))
+ {
+ case CMD_ENDLINK:
+ if (isJavaLink)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"{@link.. ended with @endlink command");
+ }
+ goto endlink;
+ default:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Illegal command %s as part of a \\link",
+ qPrint(cmd_start + parser()->context.token->name));
+ break;
+ }
+ break;
+ case TK_SYMBOL:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unsupported symbol %s found as part of a \\link",
+ qPrint(parser()->context.token->name));
+ break;
+ case TK_HTMLTAG:
+ if (parser()->context.token->name!="see" || !isXmlLink)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected xml/html command %s found as part of a \\link",
+ qPrint(parser()->context.token->name));
+ }
+ goto endlink;
+ case TK_LNKWORD:
+ case TK_WORD:
+ if (isJavaLink) // special case to detect closing }
+ {
+ QCString w = parser()->context.token->name;
+ int p;
+ if (w=="}")
+ {
+ goto endlink;
+ }
+ else if ((p=w.find('}'))!=-1)
+ {
+ uint l=w.length();
+ children().append<DocWord>(parser(),thisVariant,w.left(p));
+ if (static_cast<uint>(p)<l-1) // something left after the } (for instance a .)
+ {
+ result=w.right(static_cast<int>(l)-p-1);
+ }
+ goto endlink;
+ }
+ }
+ children().append<DocWord>(parser(),thisVariant,parser()->context.token->name);
+ break;
+ default:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected token %s",
+ DocTokenizer::tokToString(tok));
+ break;
+ }
+ }
+ }
+ if (tok==0)
+ {
+ warn_doc_error(parser()->context.fileName,
+ parser()->tokenizer.getLineNr(),
+ "Unexpected end of comment while inside link command\n");
+ }
+endlink:
+
+ if (children().empty()) // no link text
+ {
+ children().append<DocWord>(parser(),thisVariant,m_refText);
+ }
+
+ parser()->handlePendingStyleCommands(thisVariant,children());
+ DBG(("DocLink::parse() end\n"));
+ return result;
+}
+
+
+//---------------------------------------------------------------------------
+
+DocDotFile::DocDotFile(DocParser *parser,DocNodeVariant *parent,const QCString &name,const QCString &context,
+ const QCString &srcFile,int srcLine) :
+ DocDiagramFileBase(parser,parent,name,context,srcFile,srcLine)
+{
+ p->relPath = parser->context.relPath;
+}
+
+bool DocDotFile::parse(DocNodeVariant *thisVariant)
+{
+ bool ok = false;
+ parser()->defaultHandleTitleAndSize(CMD_DOTFILE,thisVariant,children(),p->width,p->height);
+
+ bool ambig;
+ FileDef *fd = findFileDef(Doxygen::dotFileNameLinkedMap,p->name,ambig);
+ if (fd==0 && p->name.right(4)!=".dot") // try with .dot extension as well
+ {
+ fd = findFileDef(Doxygen::dotFileNameLinkedMap,p->name+".dot",ambig);
+ }
+ if (fd)
+ {
+ p->file = fd->absFilePath();
+ ok = true;
+ if (ambig)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"included dot file name %s is ambiguous.\n"
+ "Possible candidates:\n%s",qPrint(p->name),
+ qPrint(showFileDefMatches(Doxygen::dotFileNameLinkedMap,p->name))
+ );
+ }
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"included dot file %s is not found "
+ "in any of the paths specified via DOTFILE_DIRS!",qPrint(p->name));
+ }
+ return ok;
+}
+
+DocMscFile::DocMscFile(DocParser *parser,DocNodeVariant *parent,const QCString &name,const QCString &context,
+ const QCString &srcFile, int srcLine) :
+ DocDiagramFileBase(parser,parent,name,context,srcFile,srcLine)
+{
+ p->relPath = parser->context.relPath;
+}
+
+bool DocMscFile::parse(DocNodeVariant *thisVariant)
+{
+ bool ok = false;
+ parser()->defaultHandleTitleAndSize(CMD_MSCFILE,thisVariant,children(),p->width,p->height);
+
+ bool ambig;
+ FileDef *fd = findFileDef(Doxygen::mscFileNameLinkedMap,p->name,ambig);
+ if (fd==0 && p->name.right(4)!=".msc") // try with .msc extension as well
+ {
+ fd = findFileDef(Doxygen::mscFileNameLinkedMap,p->name+".msc",ambig);
+ }
+ if (fd)
+ {
+ p->file = fd->absFilePath();
+ ok = true;
+ if (ambig)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"included msc file name %s is ambiguous.\n"
+ "Possible candidates:\n%s",qPrint(p->name),
+ qPrint(showFileDefMatches(Doxygen::mscFileNameLinkedMap,p->name))
+ );
+ }
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"included msc file %s is not found "
+ "in any of the paths specified via MSCFILE_DIRS!",qPrint(p->name));
+ }
+ return ok;
+}
+
+//---------------------------------------------------------------------------
+
+DocDiaFile::DocDiaFile(DocParser *parser,DocNodeVariant *parent,const QCString &name,const QCString &context,
+ const QCString &srcFile,int srcLine) :
+ DocDiagramFileBase(parser,parent,name,context,srcFile,srcLine)
+{
+ p->relPath = parser->context.relPath;
+}
+
+bool DocDiaFile::parse(DocNodeVariant *thisVariant)
+{
+ bool ok = false;
+ parser()->defaultHandleTitleAndSize(CMD_DIAFILE,thisVariant,children(),p->width,p->height);
+
+ bool ambig;
+ FileDef *fd = findFileDef(Doxygen::diaFileNameLinkedMap,p->name,ambig);
+ if (fd==0 && p->name.right(4)!=".dia") // try with .dia extension as well
+ {
+ fd = findFileDef(Doxygen::diaFileNameLinkedMap,p->name+".dia",ambig);
+ }
+ if (fd)
+ {
+ p->file = fd->absFilePath();
+ ok = true;
+ if (ambig)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"included dia file name %s is ambiguous.\n"
+ "Possible candidates:\n%s",qPrint(p->name),
+ qPrint(showFileDefMatches(Doxygen::diaFileNameLinkedMap,p->name))
+ );
+ }
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"included dia file %s is not found "
+ "in any of the paths specified via DIAFILE_DIRS!",qPrint(p->name));
+ }
+ return ok;
+}
+
+//---------------------------------------------------------------------------
+
+DocVhdlFlow::DocVhdlFlow(DocParser *parser,DocNodeVariant *parent) : DocCompoundNode(parser,parent)
+{
+}
+
+void DocVhdlFlow::parse(DocNodeVariant *thisVariant)
+{
+ auto ns = AutoNodeStack(parser(),thisVariant);
+ DBG(("DocVhdlFlow::parse() start\n"));
+
+ parser()->tokenizer.setStateTitle();
+ int tok;
+ while ((tok=parser()->tokenizer.lex()))
+ {
+ if (!parser()->defaultHandleToken(thisVariant,tok,children()))
+ {
+ parser()->errorHandleDefaultToken(thisVariant,tok,children(),"\\vhdlflow");
+ }
+ }
+ tok=parser()->tokenizer.lex();
+
+ parser()->tokenizer.setStatePara();
+ parser()->handlePendingStyleCommands(thisVariant,children());
+
+ DBG(("DocVhdlFlow::parse() end\n"));
+ VhdlDocGen::createFlowChart(parser()->context.memberDef);
+}
+
+
+//---------------------------------------------------------------------------
+
+DocImage::DocImage(DocParser *parser,DocNodeVariant *parent,const HtmlAttribList &attribs,const QCString &name,
+ Type t,const QCString &url, bool inlineImage) :
+ DocCompoundNode(parser,parent), p(std::make_unique<Private>(attribs, name, t, parser->context.relPath, url, inlineImage))
+{
+}
+
+bool DocImage::isSVG() const
+{
+ QCString locName = p->url.isEmpty() ? p->name : p->url;
+ int len = static_cast<int>(locName.length());
+ int fnd = locName.find('?'); // ignore part from ? until end
+ if (fnd==-1) fnd=len;
+ return fnd>=4 && locName.mid(fnd-4,4)==".svg";
+}
+
+void DocImage::parse(DocNodeVariant *thisVariant)
+{
+ parser()->defaultHandleTitleAndSize(CMD_IMAGE,thisVariant,children(),p->width,p->height);
+}
+
+
+//---------------------------------------------------------------------------
+
+int DocHtmlHeader::parse(DocNodeVariant *thisVariant)
+{
+ int retval=RetVal_OK;
+ auto ns = AutoNodeStack(parser(),thisVariant);
+ DBG(("DocHtmlHeader::parse() start\n"));
+
+ int tok;
+ while ((tok=parser()->tokenizer.lex()))
+ {
+ if (!parser()->defaultHandleToken(thisVariant,tok,children()))
+ {
+ switch (tok)
+ {
+ case TK_HTMLTAG:
+ {
+ int tagId=Mappers::htmlTagMapper->map(parser()->context.token->name);
+ if (tagId==HTML_H1 && parser()->context.token->endTag) // found </h1> tag
+ {
+ if (m_level!=1)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"<h%d> ended with </h1>",
+ m_level);
+ }
+ goto endheader;
+ }
+ else if (tagId==HTML_H2 && parser()->context.token->endTag) // found </h2> tag
+ {
+ if (m_level!=2)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"<h%d> ended with </h2>",
+ m_level);
+ }
+ goto endheader;
+ }
+ else if (tagId==HTML_H3 && parser()->context.token->endTag) // found </h3> tag
+ {
+ if (m_level!=3)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"<h%d> ended with </h3>",
+ m_level);
+ }
+ goto endheader;
+ }
+ else if (tagId==HTML_H4 && parser()->context.token->endTag) // found </h4> tag
+ {
+ if (m_level!=4)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"<h%d> ended with </h4>",
+ m_level);
+ }
+ goto endheader;
+ }
+ else if (tagId==HTML_H5 && parser()->context.token->endTag) // found </h5> tag
+ {
+ if (m_level!=5)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"<h%d> ended with </h5>",
+ m_level);
+ }
+ goto endheader;
+ }
+ else if (tagId==HTML_H6 && parser()->context.token->endTag) // found </h6> tag
+ {
+ if (m_level!=6)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"<h%d> ended with </h6>",
+ m_level);
+ }
+ goto endheader;
+ }
+ else if (tagId==HTML_A)
+ {
+ if (!parser()->context.token->endTag)
+ {
+ parser()->handleAHref(thisVariant,children(),parser()->context.token->attribs);
+ }
+ }
+ else if (tagId==HTML_BR)
+ {
+ children().append<DocLineBreak>(parser(),thisVariant,parser()->context.token->attribs);
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected html tag <%s%s> found within <h%d> context",
+ parser()->context.token->endTag?"/":"",qPrint(parser()->context.token->name),m_level);
+ }
+ }
+ break;
+ default:
+ char tmp[20];
+ sprintf(tmp,"<h%d>tag",m_level);
+ parser()->errorHandleDefaultToken(thisVariant,tok,children(),tmp);
+ }
+ }
+ }
+ if (tok==0)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected end of comment while inside"
+ " <h%d> tag\n",m_level);
+ }
+endheader:
+ parser()->handlePendingStyleCommands(thisVariant,children());
+ DBG(("DocHtmlHeader::parse() end\n"));
+ return retval;
+}
+//---------------------------------------------------------------------------
+
+int DocHRef::parse(DocNodeVariant *thisVariant)
+{
+ int retval=RetVal_OK;
+ auto ns = AutoNodeStack(parser(),thisVariant);
+ DBG(("DocHRef::parse() start\n"));
+
+ int tok;
+ while ((tok=parser()->tokenizer.lex()))
+ {
+ if (!parser()->defaultHandleToken(thisVariant,tok,children()))
+ {
+ switch (tok)
+ {
+ case TK_HTMLTAG:
+ {
+ int tagId=Mappers::htmlTagMapper->map(parser()->context.token->name);
+ if (tagId==HTML_A && parser()->context.token->endTag) // found </a> tag
+ {
+ goto endhref;
+ }
+ else if (tagId==HTML_BR)
+ {
+ children().append<DocLineBreak>(parser(),thisVariant,parser()->context.token->attribs);
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected html tag <%s%s> found within <a href=...> context",
+ parser()->context.token->endTag?"/":"",qPrint(parser()->context.token->name));
+ }
+ }
+ break;
+ default:
+ parser()->errorHandleDefaultToken(thisVariant,tok,children(),"<a>..</a> block");
+ break;
+ }
+ }
+ }
+ if (tok==0)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected end of comment while inside"
+ " <a href=...> tag");
+ }
+endhref:
+ parser()->handlePendingStyleCommands(thisVariant,children());
+ DBG(("DocHRef::parse() end\n"));
+ return retval;
+}
+
+//---------------------------------------------------------------------------
+
+int DocInternal::parse(DocNodeVariant *thisVariant,int level)
+{
+ int retval=RetVal_OK;
+ auto ns = AutoNodeStack(parser(),thisVariant);
+ DBG(("DocInternal::parse() start\n"));
+
+ // first parse any number of paragraphs
+ bool isFirst=TRUE;
+ DocPara *lastPar=0;
+ do
+ {
+ auto vDocPara = children().append<DocPara>(parser(),thisVariant);
+ DocPara *par = children().get_last<DocPara>();
+ if (isFirst) { par->markFirst(); isFirst=FALSE; }
+ retval=par->parse(vDocPara);
+ if (!par->isEmpty())
+ {
+ if (lastPar) lastPar->markLast(FALSE);
+ lastPar=par;
+ }
+ else
+ {
+ children().pop_back();
+ }
+ if (retval==TK_LISTITEM)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Invalid list item found");
+ }
+ } while (retval!=0 &&
+ retval!=RetVal_Section &&
+ retval!=RetVal_Subsection &&
+ retval!=RetVal_Subsubsection &&
+ retval!=RetVal_Paragraph &&
+ retval!=RetVal_EndInternal
+ );
+ if (lastPar) lastPar->markLast();
+
+ // then parse any number of level-n sections
+ while ((level==1 && retval==RetVal_Section) ||
+ (level==2 && retval==RetVal_Subsection) ||
+ (level==3 && retval==RetVal_Subsubsection) ||
+ (level==4 && retval==RetVal_Paragraph)
+ )
+ {
+ auto vDocSection = children().append<DocSection>(parser(),thisVariant,
+ std::min(level+Doxygen::subpageNestingLevel,5),
+ parser()->context.token->sectionId);
+ retval = children().get_last<DocSection>()->parse(vDocSection);
+ }
+
+ if (retval==RetVal_Internal)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"\\internal command found inside internal section");
+ }
+
+ DBG(("DocInternal::parse() end: retval=%s\n",DocTokenizer::retvalToString(retval)));
+ return retval;
+}
+
+//---------------------------------------------------------------------------
+
+int DocIndexEntry::parse(DocNodeVariant *thisVariant)
+{
+ int retval=RetVal_OK;
+ auto ns = AutoNodeStack(parser(),thisVariant);
+ DBG(("DocIndexEntry::parse() start\n"));
+ int tok=parser()->tokenizer.lex();
+ if (tok!=TK_WHITESPACE)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected whitespace after \\addindex command");
+ goto endindexentry;
+ }
+ parser()->tokenizer.setStateTitle();
+ m_entry="";
+ while ((tok=parser()->tokenizer.lex()))
+ {
+ switch (tok)
+ {
+ case TK_WHITESPACE:
+ m_entry+=" ";
+ break;
+ case TK_WORD:
+ case TK_LNKWORD:
+ m_entry+=parser()->context.token->name;
+ break;
+ case TK_SYMBOL:
+ {
+ HtmlEntityMapper::SymType s = DocSymbol::decodeSymbol(parser()->context.token->name);
+ switch (s)
+ {
+ case HtmlEntityMapper::Sym_BSlash: m_entry+='\\'; break;
+ case HtmlEntityMapper::Sym_At: m_entry+='@'; break;
+ case HtmlEntityMapper::Sym_Less: m_entry+='<'; break;
+ case HtmlEntityMapper::Sym_Greater: m_entry+='>'; break;
+ case HtmlEntityMapper::Sym_Amp: m_entry+='&'; break;
+ case HtmlEntityMapper::Sym_Dollar: m_entry+='$'; break;
+ case HtmlEntityMapper::Sym_Hash: m_entry+='#'; break;
+ case HtmlEntityMapper::Sym_Percent: m_entry+='%'; break;
+ case HtmlEntityMapper::Sym_apos: m_entry+='\''; break;
+ case HtmlEntityMapper::Sym_Quot: m_entry+='"'; break;
+ case HtmlEntityMapper::Sym_lsquo: m_entry+='`'; break;
+ case HtmlEntityMapper::Sym_rsquo: m_entry+='\''; break;
+ case HtmlEntityMapper::Sym_ldquo: m_entry+="``"; break;
+ case HtmlEntityMapper::Sym_rdquo: m_entry+="''"; break;
+ case HtmlEntityMapper::Sym_ndash: m_entry+="--"; break;
+ case HtmlEntityMapper::Sym_mdash: m_entry+="---"; break;
+ default:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected symbol found as argument of \\addindex");
+ break;
+ }
+ }
+ break;
+ case TK_COMMAND_AT:
+ // fall through
+ case TK_COMMAND_BS:
+ switch (Mappers::cmdMapper->map(parser()->context.token->name))
+ {
+ case CMD_BSLASH: m_entry+='\\'; break;
+ case CMD_AT: m_entry+='@'; break;
+ case CMD_LESS: m_entry+='<'; break;
+ case CMD_GREATER: m_entry+='>'; break;
+ case CMD_AMP: m_entry+='&'; break;
+ case CMD_DOLLAR: m_entry+='$'; break;
+ case CMD_HASH: m_entry+='#'; break;
+ case CMD_DCOLON: m_entry+="::"; break;
+ case CMD_PERCENT: m_entry+='%'; break;
+ case CMD_NDASH: m_entry+="--"; break;
+ case CMD_MDASH: m_entry+="---"; break;
+ case CMD_QUOTE: m_entry+='"'; break;
+ case CMD_PUNT: m_entry+='.'; break;
+ case CMD_PLUS: m_entry+='+'; break;
+ case CMD_MINUS: m_entry+='-'; break;
+ case CMD_EQUAL: m_entry+='='; break;
+ default:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected command %s found as argument of \\addindex",
+ qPrint(parser()->context.token->name));
+ break;
+ }
+ break;
+ default:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected token %s",
+ DocTokenizer::tokToString(tok));
+ break;
+ }
+ }
+ parser()->tokenizer.setStatePara();
+ m_entry = m_entry.stripWhiteSpace();
+endindexentry:
+ DBG(("DocIndexEntry::parse() end retval=%s\n",DocTokenizer::retvalToString(retval)));
+ return retval;
+}
+
+//---------------------------------------------------------------------------
+
+DocHtmlCaption::DocHtmlCaption(DocParser *parser,DocNodeVariant *parent,const HtmlAttribList &attribs)
+ : DocCompoundNode(parser,parent)
+{
+ m_hasCaptionId = FALSE;
+ for (const auto &opt : attribs)
+ {
+ if (opt.name=="id" && !opt.value.isEmpty()) // interpret id attribute as an anchor
+ {
+ const SectionInfo *sec = SectionManager::instance().find(opt.value);
+ if (sec)
+ {
+ //printf("Found anchor %s\n",qPrint(id));
+ m_file = sec->fileName();
+ m_anchor = sec->label();
+ m_hasCaptionId = TRUE;
+ }
+ else
+ {
+ warn_doc_error(parser->context.fileName,parser->tokenizer.getLineNr(),"Invalid caption id '%s'",qPrint(opt.value));
+ }
+ }
+ else // copy attribute
+ {
+ m_attribs.push_back(opt);
+ }
+ }
+}
+
+int DocHtmlCaption::parse(DocNodeVariant *thisVariant)
+{
+ int retval=0;
+ auto ns = AutoNodeStack(parser(),thisVariant);
+ DBG(("DocHtmlCaption::parse() start\n"));
+ int tok;
+ while ((tok=parser()->tokenizer.lex()))
+ {
+ if (!parser()->defaultHandleToken(thisVariant,tok,children()))
+ {
+ switch (tok)
+ {
+ case TK_HTMLTAG:
+ {
+ int tagId=Mappers::htmlTagMapper->map(parser()->context.token->name);
+ if (tagId==HTML_CAPTION && parser()->context.token->endTag) // found </caption> tag
+ {
+ retval = RetVal_OK;
+ goto endcaption;
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected html tag <%s%s> found within <caption> context",
+ parser()->context.token->endTag?"/":"",qPrint(parser()->context.token->name));
+ }
+ }
+ break;
+ default:
+ parser()->errorHandleDefaultToken(thisVariant,tok,children(),"<caption> tag");
+ break;
+ }
+ }
+ }
+ if (tok==0)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected end of comment while inside"
+ " <caption> tag");
+ }
+endcaption:
+ parser()->handlePendingStyleCommands(thisVariant,children());
+ DBG(("DocHtmlCaption::parse() end\n"));
+ return retval;
+}
+
+//---------------------------------------------------------------------------
+
+int DocHtmlCell::parse(DocNodeVariant *thisVariant)
+{
+ int retval=RetVal_OK;
+ auto ns = AutoNodeStack(parser(),thisVariant);
+ DBG(("DocHtmlCell::parse() start\n"));
+
+ // parse one or more paragraphs
+ bool isFirst=TRUE;
+ DocPara *par=0;
+ do
+ {
+ auto vDocPara = children().append<DocPara>(parser(),thisVariant);
+ par = children().get_last<DocPara>();
+ if (isFirst) { par->markFirst(); isFirst=FALSE; }
+ retval=par->parse(vDocPara);
+ if (retval==TK_HTMLTAG)
+ {
+ int tagId=Mappers::htmlTagMapper->map(parser()->context.token->name);
+ if (tagId==HTML_TD && parser()->context.token->endTag) // found </td> tag
+ {
+ retval=TK_NEWPARA; // ignore the tag
+ }
+ else if (tagId==HTML_TH && parser()->context.token->endTag) // found </th> tag
+ {
+ retval=TK_NEWPARA; // ignore the tag
+ }
+ }
+ }
+ while ((retval==TK_NEWPARA) || (retval==RetVal_EndParBlock));
+ if (par) par->markLast();
+
+ DBG(("DocHtmlCell::parse() end\n"));
+ return retval;
+}
+
+int DocHtmlCell::parseXml(DocNodeVariant *thisVariant)
+{
+ int retval=RetVal_OK;
+ auto ns = AutoNodeStack(parser(),thisVariant);
+ DBG(("DocHtmlCell::parseXml() start\n"));
+
+ // parse one or more paragraphs
+ bool isFirst=TRUE;
+ DocPara *par=0;
+ do
+ {
+ auto vDocPara = children().append<DocPara>(parser(),thisVariant);
+ par = children().get_last<DocPara>();
+ if (isFirst) { par->markFirst(); isFirst=FALSE; }
+ retval=par->parse(vDocPara);
+ if (retval==TK_HTMLTAG)
+ {
+ int tagId=Mappers::htmlTagMapper->map(parser()->context.token->name);
+ if (tagId==XML_ITEM && parser()->context.token->endTag) // found </item> tag
+ {
+ retval=TK_NEWPARA; // ignore the tag
+ }
+ else if (tagId==XML_DESCRIPTION && parser()->context.token->endTag) // found </description> tag
+ {
+ retval=TK_NEWPARA; // ignore the tag
+ }
+ }
+ }
+ while (retval==TK_NEWPARA);
+ if (par) par->markLast();
+
+ DBG(("DocHtmlCell::parseXml() end\n"));
+ return retval;
+}
+
+uint DocHtmlCell::rowSpan() const
+{
+ for (const auto &attr : attribs())
+ {
+ if (attr.name.lower()=="rowspan")
+ {
+ return attr.value.toUInt();
+ }
+ }
+ return 0;
+}
+
+uint DocHtmlCell::colSpan() const
+{
+ for (const auto &attr : attribs())
+ {
+ if (attr.name.lower()=="colspan")
+ {
+ return std::max(1u,attr.value.toUInt());
+ }
+ }
+ return 1;
+}
+
+DocHtmlCell::Alignment DocHtmlCell::alignment() const
+{
+ for (const auto &attr : attribs())
+ {
+ QCString attrName = attr.name.lower();
+ QCString attrValue = attr.value.lower();
+ if (attrName=="align")
+ {
+ if (attrValue=="center")
+ return Center;
+ else if (attrValue=="right")
+ return Right;
+ else return Left;
+ }
+ else if (attrName=="class" && attrValue.startsWith("markdowntable"))
+ {
+ if (attrValue=="markdowntableheadcenter")
+ return Center;
+ else if (attrValue=="markdowntableheadright")
+ return Right;
+ else if (attrValue=="markdowntableheadleft")
+ return Left;
+ else if (attrValue=="markdowntableheadnone")
+ return Center;
+ else if (attrValue=="markdowntablebodycenter")
+ return Center;
+ else if (attrValue=="markdowntablebodyright")
+ return Right;
+ else if (attrValue=="markdowntablebodyleft")
+ return Left;
+ else if (attrValue=="markdowntablebodynone")
+ return Left;
+ else return Left;
+ }
+ }
+ return Left;
+}
+
+DocHtmlCell::Valignment DocHtmlCell::valignment() const
+{
+ for (const auto &attr : attribs())
+ {
+ QCString attrName = attr.name.lower();
+ QCString attrValue = attr.value.lower();
+ if (attrName=="valign")
+ {
+ if (attrValue=="top")
+ return Top;
+ else if (attrValue=="bottom")
+ return Bottom;
+ else if (attrValue=="middle")
+ return Middle;
+ else return Middle;
+ }
+ }
+ return Middle;
+}
+
+//---------------------------------------------------------------------------
+
+bool DocHtmlRow::isHeading() const
+{ // a row is a table heading if all cells are marked as such
+ bool heading=TRUE;
+ for (const auto &n : children())
+ {
+ const DocHtmlCell *cell = std::get_if<DocHtmlCell>(&n);
+ if (cell && !cell->isHeading())
+ {
+ heading = FALSE;
+ break;
+ }
+ }
+ return !children().empty() && heading;
+}
+
+int DocHtmlRow::parse(DocNodeVariant *thisVariant)
+{
+ int retval=RetVal_OK;
+ auto ns = AutoNodeStack(parser(),thisVariant);
+ DBG(("DocHtmlRow::parse() start\n"));
+
+ bool isHeading=FALSE;
+ bool isFirst=TRUE;
+ DocHtmlCell *cell=0;
+
+ // get next token
+ int tok=parser()->tokenizer.lex();
+ // skip whitespace
+ while (tok==TK_WHITESPACE || tok==TK_NEWPARA) tok=parser()->tokenizer.lex();
+ // should find a html tag now
+ if (tok==TK_HTMLTAG)
+ {
+ int tagId=Mappers::htmlTagMapper->map(parser()->context.token->name);
+ if (tagId==HTML_TD && !parser()->context.token->endTag) // found <td> tag
+ {
+ }
+ else if (tagId==HTML_TH && !parser()->context.token->endTag) // found <th> tag
+ {
+ isHeading=TRUE;
+ }
+ else // found some other tag
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected <td> or <th> tag but "
+ "found <%s> instead!",qPrint(parser()->context.token->name));
+ parser()->tokenizer.pushBackHtmlTag(parser()->context.token->name);
+ goto endrow;
+ }
+ }
+ else if (tok==0) // premature end of comment
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected end of comment while looking"
+ " for a html description title");
+ goto endrow;
+ }
+ else // token other than html token
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected <td> or <th> tag but found %s token instead!",
+ DocTokenizer::tokToString(tok));
+ goto endrow;
+ }
+
+ // parse one or more cells
+ do
+ {
+ auto vDocHtmlCell = children().append<DocHtmlCell>(parser(),thisVariant,
+ parser()->context.token->attribs,
+ isHeading);
+ cell = children().get_last<DocHtmlCell>();
+ cell->markFirst(isFirst);
+ isFirst=FALSE;
+ retval=cell->parse(vDocHtmlCell);
+ isHeading = retval==RetVal_TableHCell;
+ }
+ while (retval==RetVal_TableCell || retval==RetVal_TableHCell);
+ cell->markLast(TRUE);
+
+endrow:
+ DBG(("DocHtmlRow::parse() end\n"));
+ return retval;
+}
+
+int DocHtmlRow::parseXml(DocNodeVariant *thisVariant,bool isHeading)
+{
+ int retval=RetVal_OK;
+ auto ns = AutoNodeStack(parser(),thisVariant);
+ DBG(("DocHtmlRow::parseXml() start\n"));
+
+ bool isFirst=TRUE;
+ DocHtmlCell *cell=0;
+
+ // get next token
+ int tok=parser()->tokenizer.lex();
+ // skip whitespace
+ while (tok==TK_WHITESPACE || tok==TK_NEWPARA) tok=parser()->tokenizer.lex();
+ // should find a html tag now
+ if (tok==TK_HTMLTAG)
+ {
+ int tagId=Mappers::htmlTagMapper->map(parser()->context.token->name);
+ if (tagId==XML_TERM && !parser()->context.token->endTag) // found <term> tag
+ {
+ }
+ else if (tagId==XML_DESCRIPTION && !parser()->context.token->endTag) // found <description> tag
+ {
+ }
+ else // found some other tag
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected <term> or <description> tag but "
+ "found <%s> instead!",qPrint(parser()->context.token->name));
+ parser()->tokenizer.pushBackHtmlTag(parser()->context.token->name);
+ goto endrow;
+ }
+ }
+ else if (tok==0) // premature end of comment
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected end of comment while looking"
+ " for a html description title");
+ goto endrow;
+ }
+ else // token other than html token
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected <td> or <th> tag but found %s token instead!",
+ DocTokenizer::tokToString(tok));
+ goto endrow;
+ }
+
+ do
+ {
+ auto vDocHtmlCell = children().append<DocHtmlCell>(parser(),thisVariant,parser()->context.token->attribs,isHeading);
+ cell = children().get_last<DocHtmlCell>();
+ cell->markFirst(isFirst);
+ isFirst=FALSE;
+ retval=cell->parseXml(vDocHtmlCell);
+ }
+ while (retval==RetVal_TableCell || retval==RetVal_TableHCell);
+ cell->markLast(TRUE);
+
+endrow:
+ DBG(("DocHtmlRow::parseXml() end\n"));
+ return retval;
+}
+
+//---------------------------------------------------------------------------
+
+bool DocHtmlTable::hasCaption() const
+{
+ return m_caption!=nullptr;
+}
+
+const DocNodeVariant *DocHtmlTable::caption() const
+{
+ return m_caption.get();
+}
+
+const DocNodeVariant *DocHtmlTable::firstRow() const
+{
+ if (!children().empty() && std::holds_alternative<DocHtmlRow>(children().front()))
+ {
+ return &children().front();
+ }
+ return 0;
+}
+
+int DocHtmlTable::parse(DocNodeVariant *thisVariant)
+{
+ int retval=RetVal_OK;
+ auto ns = AutoNodeStack(parser(),thisVariant);
+ DBG(("DocHtmlTable::parse() start\n"));
+
+getrow:
+ // get next token
+ int tok=parser()->tokenizer.lex();
+ // skip whitespace
+ while (tok==TK_WHITESPACE || tok==TK_NEWPARA) tok=parser()->tokenizer.lex();
+ // should find a html tag now
+ if (tok==TK_HTMLTAG)
+ {
+ int tagId=Mappers::htmlTagMapper->map(parser()->context.token->name);
+ if (tagId==HTML_TR && !parser()->context.token->endTag) // found <tr> tag
+ {
+ // no caption, just rows
+ retval=RetVal_TableRow;
+ }
+ else if (tagId==HTML_CAPTION && !parser()->context.token->endTag) // found <caption> tag
+ {
+ if (m_caption)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"table already has a caption, found another one");
+ }
+ else
+ {
+ m_caption = std::make_unique<DocNodeVariant>(
+ DocHtmlCaption(parser(),thisVariant,parser()->context.token->attribs));
+ retval=std::get<DocHtmlCaption>(*m_caption).parse(m_caption.get());
+
+ if (retval==RetVal_OK) // caption was parsed ok
+ {
+ goto getrow;
+ }
+ }
+ }
+ else // found wrong token
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected <tr> or <caption> tag but "
+ "found <%s%s> instead!", parser()->context.token->endTag ? "/" : "", qPrint(parser()->context.token->name));
+ }
+ }
+ else if (tok==0) // premature end of comment
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected end of comment while looking"
+ " for a <tr> or <caption> tag");
+ }
+ else // token other than html token
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected <tr> tag but found %s token instead!",
+ DocTokenizer::tokToString(tok));
+ }
+
+ // parse one or more rows
+ while (retval==RetVal_TableRow)
+ {
+ auto vDocHtmlRow = children().append<DocHtmlRow>(parser(),thisVariant,parser()->context.token->attribs);
+ retval = children().get_last<DocHtmlRow>()->parse(vDocHtmlRow);
+ }
+
+ computeTableGrid();
+
+ DBG(("DocHtmlTable::parse() end\n"));
+ return retval==RetVal_EndTable ? RetVal_OK : retval;
+}
+
+int DocHtmlTable::parseXml(DocNodeVariant *thisVariant)
+{
+ int retval=RetVal_OK;
+ auto ns = AutoNodeStack(parser(),thisVariant);
+ DBG(("DocHtmlTable::parseXml() start\n"));
+
+ // get next token
+ int tok=parser()->tokenizer.lex();
+ // skip whitespace
+ while (tok==TK_WHITESPACE || tok==TK_NEWPARA) tok=parser()->tokenizer.lex();
+ // should find a html tag now
+ int tagId=0;
+ bool isHeader=FALSE;
+ if (tok==TK_HTMLTAG)
+ {
+ tagId=Mappers::htmlTagMapper->map(parser()->context.token->name);
+ if (tagId==XML_ITEM && !parser()->context.token->endTag) // found <item> tag
+ {
+ retval=RetVal_TableRow;
+ }
+ if (tagId==XML_LISTHEADER && !parser()->context.token->endTag) // found <listheader> tag
+ {
+ retval=RetVal_TableRow;
+ isHeader=TRUE;
+ }
+ }
+
+ // parse one or more rows
+ while (retval==RetVal_TableRow)
+ {
+ auto vDocHtmlRow = children().append<DocHtmlRow>(parser(),thisVariant,parser()->context.token->attribs);
+ DocHtmlRow *tr = children().get_last<DocHtmlRow>();
+ retval=tr->parseXml(vDocHtmlRow,isHeader);
+ isHeader=FALSE;
+ }
+
+ computeTableGrid();
+
+ DBG(("DocHtmlTable::parseXml() end\n"));
+ tagId=Mappers::htmlTagMapper->map(parser()->context.token->name);
+ return tagId==XML_LIST && parser()->context.token->endTag ? RetVal_OK : retval;
+}
+
+/** Helper class to compute the grid for an HTML style table */
+struct ActiveRowSpan
+{
+ ActiveRowSpan(uint rows,uint col) : rowsLeft(rows), column(col) {}
+ uint rowsLeft;
+ uint column;
+};
+
+/** List of ActiveRowSpan classes. */
+typedef std::vector<ActiveRowSpan> RowSpanList;
+
+/** determines the location of all cells in a grid, resolving row and
+ column spans. For each the total number of visible cells is computed,
+ and the total number of visible columns over all rows is stored.
+ */
+void DocHtmlTable::computeTableGrid()
+{
+ //printf("computeTableGrid()\n");
+ RowSpanList rowSpans;
+ uint maxCols=0;
+ uint rowIdx=1;
+ for (auto &rowNode : children())
+ {
+ uint colIdx=1;
+ uint cells=0;
+ DocHtmlRow *row = std::get_if<DocHtmlRow>(&rowNode);
+ if (row)
+ {
+ size_t i;
+ for (auto &cellNode : row->children())
+ {
+ DocHtmlCell *cell = std::get_if<DocHtmlCell>(&cellNode);
+ if (cell)
+ {
+ uint rs = cell->rowSpan();
+ uint cs = cell->colSpan();
+
+ for (i=0;i<rowSpans.size();i++)
+ {
+ if (rowSpans[i].rowsLeft>0 &&
+ rowSpans[i].column==colIdx)
+ {
+ colIdx=rowSpans[i].column+1;
+ cells++;
+ }
+ }
+ if (rs>0) rowSpans.emplace_back(rs,colIdx);
+ //printf("found cell at (%d,%d)\n",rowIdx,colIdx);
+ cell->setRowIndex(rowIdx);
+ cell->setColumnIndex(colIdx);
+ colIdx+=cs;
+ cells++;
+ }
+ }
+ for (i=0;i<rowSpans.size();i++)
+ {
+ if (rowSpans[i].rowsLeft>0) rowSpans[i].rowsLeft--;
+ }
+ row->setVisibleCells(cells);
+ row->setRowIndex(rowIdx);
+ rowIdx++;
+ }
+ if (colIdx-1>maxCols) maxCols=colIdx-1;
+ }
+ m_numCols = maxCols;
+}
+
+//---------------------------------------------------------------------------
+
+int DocHtmlDescTitle::parse(DocNodeVariant *thisVariant)
+{
+ int retval=0;
+ auto ns = AutoNodeStack(parser(),thisVariant);
+ DBG(("DocHtmlDescTitle::parse() start\n"));
+
+ int tok;
+ while ((tok=parser()->tokenizer.lex()))
+ {
+ if (!parser()->defaultHandleToken(thisVariant,tok,children()))
+ {
+ const char *cmd_start = "\\";
+ switch (tok)
+ {
+ case TK_COMMAND_AT:
+ cmd_start = "@";
+ // fall through
+ case TK_COMMAND_BS:
+ {
+ QCString cmdName=parser()->context.token->name;
+ bool isJavaLink=FALSE;
+ switch (Mappers::cmdMapper->map(cmdName))
+ {
+ case CMD_REF:
+ {
+ tok=parser()->tokenizer.lex();
+ if (tok!=TK_WHITESPACE)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected whitespace after \\%s command",
+ qPrint(parser()->context.token->name));
+ }
+ else
+ {
+ parser()->tokenizer.setStateRef();
+ tok=parser()->tokenizer.lex(); // get the reference id
+ if (tok!=TK_WORD)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected token %s as the argument of \\%s command",
+ DocTokenizer::tokToString(tok),qPrint(cmdName));
+ }
+ else
+ {
+ auto vDocRef = children().append<DocRef>(parser(),thisVariant,parser()->context.token->name,parser()->context.context);
+ children().get_last<DocRef>()->parse(vDocRef);
+ }
+ parser()->tokenizer.setStatePara();
+ }
+ }
+ break;
+ case CMD_JAVALINK:
+ isJavaLink=TRUE;
+ // fall through
+ case CMD_LINK:
+ {
+ tok=parser()->tokenizer.lex();
+ if (tok!=TK_WHITESPACE)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected whitespace after \\%s command",
+ qPrint(cmdName));
+ }
+ else
+ {
+ parser()->tokenizer.setStateLink();
+ tok=parser()->tokenizer.lex();
+ if (tok!=TK_WORD)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected token %s as the argument of \\%s command",
+ DocTokenizer::tokToString(tok),qPrint(cmdName));
+ }
+ else
+ {
+ parser()->tokenizer.setStatePara();
+ auto vDocLink = children().append<DocLink>(parser(),thisVariant,parser()->context.token->name);
+ DocLink *lnk = children().get_last<DocLink>();
+ QCString leftOver = lnk->parse(vDocLink,isJavaLink);
+ if (!leftOver.isEmpty())
+ {
+ children().append<DocWord>(parser(),thisVariant,leftOver);
+ }
+ }
+ }
+ }
+
+ break;
+ default:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Illegal command %s found as part of a <dt> tag",
+ qPrint(cmd_start + parser()->context.token->name));
+ }
+ }
+ break;
+ case TK_SYMBOL:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unsupported symbol \\%s found as part of a <dt> tag",
+ qPrint(parser()->context.token->name));
+ break;
+ case TK_HTMLTAG:
+ {
+ int tagId=Mappers::htmlTagMapper->map(parser()->context.token->name);
+ if (tagId==HTML_DD && !parser()->context.token->endTag) // found <dd> tag
+ {
+ retval = RetVal_DescData;
+ goto endtitle;
+ }
+ else if (tagId==HTML_DT && parser()->context.token->endTag)
+ {
+ // ignore </dt> tag.
+ }
+ else if (tagId==HTML_DT)
+ {
+ // missing <dt> tag.
+ retval = RetVal_DescTitle;
+ goto endtitle;
+ }
+ else if (tagId==HTML_DL && parser()->context.token->endTag)
+ {
+ retval=RetVal_EndDesc;
+ goto endtitle;
+ }
+ else if (tagId==HTML_A)
+ {
+ if (!parser()->context.token->endTag)
+ {
+ parser()->handleAHref(thisVariant,children(),parser()->context.token->attribs);
+ }
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected html tag <%s%s> found within <dt> context",
+ parser()->context.token->endTag?"/":"",qPrint(parser()->context.token->name));
+ }
+ }
+ break;
+ default:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected token %s found as part of a <dt> tag",
+ DocTokenizer::tokToString(tok));
+ break;
+ }
+ }
+ }
+ if (tok==0)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected end of comment while inside"
+ " <dt> tag");
+ }
+endtitle:
+ parser()->handlePendingStyleCommands(thisVariant,children());
+ DBG(("DocHtmlDescTitle::parse() end\n"));
+ return retval;
+}
+
+//---------------------------------------------------------------------------
+
+int DocHtmlDescData::parse(DocNodeVariant *thisVariant)
+{
+ m_attribs = parser()->context.token->attribs;
+ int retval=0;
+ auto ns = AutoNodeStack(parser(),thisVariant);
+ DBG(("DocHtmlDescData::parse() start\n"));
+
+ bool isFirst=TRUE;
+ DocPara *par=0;
+ do
+ {
+ auto vDocPara = children().append<DocPara>(parser(),thisVariant);
+ par = children().get_last<DocPara>();
+ if (isFirst) { par->markFirst(); isFirst=FALSE; }
+ retval=par->parse(vDocPara);
+ }
+ while (retval==TK_NEWPARA);
+ if (par) par->markLast();
+
+ DBG(("DocHtmlDescData::parse() end\n"));
+ return retval;
+}
+
+//---------------------------------------------------------------------------
+
+int DocHtmlDescList::parse(DocNodeVariant *thisVariant)
+{
+ int retval=RetVal_OK;
+ auto ns = AutoNodeStack(parser(),thisVariant);
+ DBG(("DocHtmlDescList::parse() start\n"));
+
+ // get next token
+ int tok=parser()->tokenizer.lex();
+ // skip whitespace
+ while (tok==TK_WHITESPACE || tok==TK_NEWPARA) tok=parser()->tokenizer.lex();
+ // should find a html tag now
+ if (tok==TK_HTMLTAG)
+ {
+ int tagId=Mappers::htmlTagMapper->map(parser()->context.token->name);
+ if (tagId==HTML_DT && !parser()->context.token->endTag) // found <dt> tag
+ {
+ // continue
+ }
+ else // found some other tag
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected <dt> tag but "
+ "found <%s> instead!",qPrint(parser()->context.token->name));
+ parser()->tokenizer.pushBackHtmlTag(parser()->context.token->name);
+ goto enddesclist;
+ }
+ }
+ else if (tok==0) // premature end of comment
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected end of comment while looking"
+ " for a html description title");
+ goto enddesclist;
+ }
+ else // token other than html token
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected <dt> tag but found %s token instead!",
+ DocTokenizer::tokToString(tok));
+ goto enddesclist;
+ }
+
+ do
+ {
+ auto vDocHtmlDescTitle = children().append<DocHtmlDescTitle>(parser(),thisVariant,parser()->context.token->attribs);
+ DocHtmlDescTitle *dt = children().get_last<DocHtmlDescTitle>();
+ auto vDocHtmlDescData = children().append<DocHtmlDescData>(parser(),thisVariant);
+ DocHtmlDescData *dd = children().get_last<DocHtmlDescData>();
+ retval=dt->parse(vDocHtmlDescTitle);
+ if (retval==RetVal_DescData)
+ {
+ retval=dd->parse(vDocHtmlDescData);
+ }
+ else if (retval!=RetVal_DescTitle)
+ {
+ // error
+ break;
+ }
+ } while (retval==RetVal_DescTitle);
+
+ if (retval==0)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected end of comment while inside <dl> block");
+ }
+
+enddesclist:
+
+ DBG(("DocHtmlDescList::parse() end\n"));
+ return retval==RetVal_EndDesc ? RetVal_OK : retval;
+}
+
+//---------------------------------------------------------------------------
+
+int DocHtmlListItem::parse(DocNodeVariant *thisVariant)
+{
+ DBG(("DocHtmlListItem::parse() start\n"));
+ int retval=0;
+ auto ns = AutoNodeStack(parser(),thisVariant);
+
+ // parse one or more paragraphs
+ bool isFirst=TRUE;
+ DocPara *par=0;
+ do
+ {
+ auto vDocPara = children().append<DocPara>(parser(),thisVariant);
+ par = children().get_last<DocPara>();
+ if (isFirst) { par->markFirst(); isFirst=FALSE; }
+ retval=par->parse(vDocPara);
+ }
+ while (retval==TK_NEWPARA);
+ if (par) par->markLast();
+
+ DBG(("DocHtmlListItem::parse() end retval=%s\n",DocTokenizer::retvalToString(retval)));
+ return retval;
+}
+
+int DocHtmlListItem::parseXml(DocNodeVariant *thisVariant)
+{
+ DBG(("DocHtmlListItem::parseXml() start\n"));
+ int retval=0;
+ auto ns = AutoNodeStack(parser(),thisVariant);
+
+ // parse one or more paragraphs
+ bool isFirst=TRUE;
+ DocPara *par=0;
+ do
+ {
+ auto vDocPara = children().append<DocPara>(parser(),thisVariant);
+ par = children().get_last<DocPara>();
+ if (isFirst) { par->markFirst(); isFirst=FALSE; }
+ retval=par->parse(vDocPara);
+ if (retval==0) break;
+
+ //printf("new item: retval=%x parser()->context.token->name=%s parser()->context.token->endTag=%d\n",
+ // retval,qPrint(parser()->context.token->name),parser()->context.token->endTag);
+ if (retval==RetVal_ListItem)
+ {
+ break;
+ }
+ }
+ while (retval!=RetVal_CloseXml);
+
+ if (par) par->markLast();
+
+ DBG(("DocHtmlListItem::parseXml() end retval=%s\n",DocTokenizer::retvalToString(retval)));
+ return retval;
+}
+
+//---------------------------------------------------------------------------
+
+int DocHtmlList::parse(DocNodeVariant *thisVariant)
+{
+ DBG(("DocHtmlList::parse() start\n"));
+ int retval=RetVal_OK;
+ int num=1;
+ auto ns = AutoNodeStack(parser(),thisVariant);
+
+ // get next token
+ int tok=parser()->tokenizer.lex();
+ // skip whitespace and paragraph breaks
+ while (tok==TK_WHITESPACE || tok==TK_NEWPARA) tok=parser()->tokenizer.lex();
+ // should find a html tag now
+ if (tok==TK_HTMLTAG)
+ {
+ int tagId=Mappers::htmlTagMapper->map(parser()->context.token->name);
+ if (tagId==HTML_LI && !parser()->context.token->endTag) // found <li> tag
+ {
+ // ok, we can go on.
+ }
+ else if (((m_type==Unordered && tagId==HTML_UL) ||
+ (m_type==Ordered && tagId==HTML_OL)
+ ) && parser()->context.token->endTag
+ ) // found empty list
+ {
+ // add dummy item to obtain valid HTML
+ children().append<DocHtmlListItem>(parser(),thisVariant,HtmlAttribList(),1);
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"empty list!");
+ retval = RetVal_EndList;
+ goto endlist;
+ }
+ else // found some other tag
+ {
+ // add dummy item to obtain valid HTML
+ children().append<DocHtmlListItem>(parser(),thisVariant,HtmlAttribList(),1);
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected <li> tag but "
+ "found <%s%s> instead!",parser()->context.token->endTag?"/":"",qPrint(parser()->context.token->name));
+ parser()->tokenizer.pushBackHtmlTag(parser()->context.token->name);
+ goto endlist;
+ }
+ }
+ else if (tok==0) // premature end of comment
+ {
+ // add dummy item to obtain valid HTML
+ children().append<DocHtmlListItem>(parser(),thisVariant,HtmlAttribList(),1);
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected end of comment while looking"
+ " for a html list item");
+ goto endlist;
+ }
+ else // token other than html token
+ {
+ // add dummy item to obtain valid HTML
+ children().append<DocHtmlListItem>(parser(),thisVariant,HtmlAttribList(),1);
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected <li> tag but found %s token instead!",
+ DocTokenizer::tokToString(tok));
+ goto endlist;
+ }
+
+ do
+ {
+ auto vDocHtmlListItem = children().append<DocHtmlListItem>(parser(),thisVariant,parser()->context.token->attribs,num++);
+ DocHtmlListItem *li = children().get_last<DocHtmlListItem>();
+ retval=li->parse(vDocHtmlListItem);
+ } while (retval==RetVal_ListItem);
+
+ if (retval==0)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected end of comment while inside <%cl> block",
+ m_type==Unordered ? 'u' : 'o');
+ }
+
+endlist:
+ DBG(("DocHtmlList::parse() end retval=%s\n",DocTokenizer::retvalToString(retval)));
+ return retval==RetVal_EndList ? RetVal_OK : retval;
+}
+
+int DocHtmlList::parseXml(DocNodeVariant *thisVariant)
+{
+ DBG(("DocHtmlList::parseXml() start\n"));
+ int retval=RetVal_OK;
+ int num=1;
+ auto ns = AutoNodeStack(parser(),thisVariant);
+
+ // get next token
+ int tok=parser()->tokenizer.lex();
+ // skip whitespace and paragraph breaks
+ while (tok==TK_WHITESPACE || tok==TK_NEWPARA) tok=parser()->tokenizer.lex();
+ // should find a html tag now
+ if (tok==TK_HTMLTAG)
+ {
+ int tagId=Mappers::htmlTagMapper->map(parser()->context.token->name);
+ //printf("parser()->context.token->name=%s parser()->context.token->endTag=%d\n",qPrint(parser()->context.token->name),parser()->context.token->endTag);
+ if (tagId==XML_ITEM && !parser()->context.token->endTag) // found <item> tag
+ {
+ // ok, we can go on.
+ }
+ else // found some other tag
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected <item> tag but "
+ "found <%s> instead!",qPrint(parser()->context.token->name));
+ parser()->tokenizer.pushBackHtmlTag(parser()->context.token->name);
+ goto endlist;
+ }
+ }
+ else if (tok==0) // premature end of comment
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected end of comment while looking"
+ " for a html list item");
+ goto endlist;
+ }
+ else // token other than html token
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected <item> tag but found %s token instead!",
+ DocTokenizer::tokToString(tok));
+ goto endlist;
+ }
+
+ do
+ {
+ auto vDocHtmlListItem = children().append<DocHtmlListItem>(parser(),thisVariant,parser()->context.token->attribs,num++);
+ DocHtmlListItem *li = children().get_last<DocHtmlListItem>();
+ retval=li->parseXml(vDocHtmlListItem);
+ if (retval==0) break;
+ //printf("retval=%x parser()->context.token->name=%s\n",retval,qPrint(parser()->context.token->name));
+ } while (retval==RetVal_ListItem);
+
+ if (retval==0)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected end of comment while inside <list type=\"%s\"> block",
+ m_type==Unordered ? "bullet" : "number");
+ }
+
+endlist:
+ DBG(("DocHtmlList::parseXml() end retval=%s\n",DocTokenizer::retvalToString(retval)));
+ return retval==RetVal_EndList ||
+ (retval==RetVal_CloseXml || parser()->context.token->name=="list") ?
+ RetVal_OK : retval;
+}
+
+//--------------------------------------------------------------------------
+
+int DocHtmlBlockQuote::parse(DocNodeVariant *thisVariant)
+{
+ DBG(("DocHtmlBlockQuote::parse() start\n"));
+ int retval=0;
+ auto ns = AutoNodeStack(parser(),thisVariant);
+
+ // parse one or more paragraphs
+ bool isFirst=TRUE;
+ DocPara *par=0;
+ do
+ {
+ auto vDocPara = children().append<DocPara>(parser(),thisVariant);
+ par = children().get_last<DocPara>();
+ if (isFirst) { par->markFirst(); isFirst=FALSE; }
+ retval=par->parse(vDocPara);
+ }
+ while (retval==TK_NEWPARA);
+ if (par) par->markLast();
+
+ DBG(("DocHtmlBlockQuote::parse() end retval=%s\n",DocTokenizer::retvalToString(retval)));
+ return (retval==RetVal_EndBlockQuote) ? RetVal_OK : retval;
+}
+
+//---------------------------------------------------------------------------
+
+int DocParBlock::parse(DocNodeVariant *thisVariant)
+{
+ DBG(("DocParBlock::parse() start\n"));
+ int retval=0;
+ auto ns = AutoNodeStack(parser(),thisVariant);
+
+ // parse one or more paragraphs
+ bool isFirst=TRUE;
+ DocPara *par=0;
+ do
+ {
+ auto vDocPara = children().append<DocPara>(parser(),thisVariant);
+ par = children().get_last<DocPara>();
+ if (isFirst) { par->markFirst(); isFirst=FALSE; }
+ retval=par->parse(vDocPara);
+ }
+ while (retval==TK_NEWPARA);
+ if (par) par->markLast();
+
+ DBG(("DocParBlock::parse() end retval=%s\n",DocTokenizer::retvalToString(retval)));
+ return (retval==RetVal_EndBlockQuote) ? RetVal_OK : retval;
+}
+
+//---------------------------------------------------------------------------
+
+DocSimpleListItem::DocSimpleListItem(DocParser *parser,DocNodeVariant *parent)
+ : DocNode(parser,parent)
+{
+}
+
+
+int DocSimpleListItem::parse(DocNodeVariant *thisVariant)
+{
+ auto ns = AutoNodeStack(parser(),thisVariant);
+ m_paragraph = std::make_unique<DocNodeVariant>(DocPara(parser(),thisVariant));
+ DocPara *par = &std::get<DocPara>(*m_paragraph);
+ int rv=par->parse(m_paragraph.get());
+ par->markFirst();
+ par->markLast();
+ return rv;
+}
+
+//--------------------------------------------------------------------------
+
+int DocSimpleList::parse(DocNodeVariant *thisVariant)
+{
+ auto ns = AutoNodeStack(parser(),thisVariant);
+ int rv;
+ do
+ {
+ auto vDocSimpleListItem = children().append<DocSimpleListItem>(parser(),thisVariant);
+ DocSimpleListItem *li = children().get_last<DocSimpleListItem>();
+ rv=li->parse(vDocSimpleListItem);
+ } while (rv==RetVal_ListItem);
+ return (rv!=TK_NEWPARA) ? rv : RetVal_OK;
+}
+
+//--------------------------------------------------------------------------
+
+DocAutoListItem::DocAutoListItem(DocParser *parser,DocNodeVariant *parent,int indent,int num)
+ : DocCompoundNode(parser,parent), m_indent(indent), m_itemNum(num)
+{
+}
+
+int DocAutoListItem::parse(DocNodeVariant *thisVariant)
+{
+ int retval = RetVal_OK;
+ auto ns = AutoNodeStack(parser(),thisVariant);
+
+ // first parse any number of paragraphs
+ bool isFirst=TRUE;
+ DocPara *lastPar=0;
+ do
+ {
+ auto vDocPara = children().append<DocPara>(parser(),thisVariant);
+ DocPara *par = children().get_last<DocPara>();
+ if (isFirst) { par->markFirst(); isFirst=FALSE; }
+ retval=par->parse(vDocPara);
+ if (!par->isEmpty())
+ {
+ if (lastPar) lastPar->markLast(FALSE);
+ lastPar=par;
+ }
+ else
+ {
+ children().pop_back();
+ }
+ // next paragraph should be more indented than the - marker to belong
+ // to this item
+ } while (retval==TK_NEWPARA && parser()->context.token->indent>m_indent);
+ if (lastPar) lastPar->markLast();
+
+ //printf("DocAutoListItem: retval=%d indent=%d\n",retval,parser()->context.token->indent);
+ return retval;
+}
+
+//--------------------------------------------------------------------------
+
+DocAutoList::DocAutoList(DocParser *parser,DocNodeVariant *parent,int indent,bool isEnumList,
+ int depth) :
+ DocCompoundNode(parser,parent), m_indent(indent), m_isEnumList(isEnumList),
+ m_depth(depth)
+{
+}
+
+int DocAutoList::parse(DocNodeVariant *thisVariant)
+{
+ int retval = RetVal_OK;
+ int num=1;
+ auto ns = AutoNodeStack(parser(),thisVariant);
+ parser()->tokenizer.startAutoList();
+ // first item or sub list => create new list
+ do
+ {
+ if (parser()->context.token->id!=-1) // explicitly numbered list
+ {
+ num=parser()->context.token->id; // override num with real number given
+ }
+ auto vDocAutoListItem = children().append<DocAutoListItem>(parser(),thisVariant,m_indent,num++);
+ DocAutoListItem *li = children().get_last<DocAutoListItem>();
+ retval=li->parse(vDocAutoListItem);
+ //printf("DocAutoList::parse(): retval=0x%x parser()->context.token->indent=%d m_indent=%d "
+ // "m_isEnumList=%d parser()->context.token->isEnumList=%d parser()->context.token->name=%s\n",
+ // retval,parser()->context.token->indent,m_indent,m_isEnumList,parser()->context.token->isEnumList,
+ // qPrint(parser()->context.token->name));
+ //printf("num=%d parser()->context.token->id=%d\n",num,parser()->context.token->id);
+ }
+ while (retval==TK_LISTITEM && // new list item
+ m_indent==parser()->context.token->indent && // at same indent level
+ m_isEnumList==parser()->context.token->isEnumList && // of the same kind
+ (parser()->context.token->id==-1 || parser()->context.token->id>=num) // increasing number (or no number)
+ );
+
+ parser()->tokenizer.endAutoList();
+ return retval;
+}
+
+//--------------------------------------------------------------------------
+
+void DocTitle::parse(DocNodeVariant *thisVariant)
+{
+ DBG(("DocTitle::parse() start\n"));
+ auto ns = AutoNodeStack(parser(),thisVariant);
+ parser()->tokenizer.setStateTitle();
+ int tok;
+ while ((tok=parser()->tokenizer.lex()))
+ {
+ if (!parser()->defaultHandleToken(thisVariant,tok,children()))
+ {
+ parser()->errorHandleDefaultToken(thisVariant,tok,children(),"title section");
+ }
+ }
+ parser()->tokenizer.setStatePara();
+ parser()->handlePendingStyleCommands(thisVariant,children());
+ DBG(("DocTitle::parse() end\n"));
+}
+
+void DocTitle::parseFromString(DocNodeVariant *thisVariant,const QCString &text)
+{
+ children().append<DocWord>(parser(),thisVariant,text);
+}
+
+//--------------------------------------------------------------------------
+
+DocSimpleSect::DocSimpleSect(DocParser *parser,DocNodeVariant *parent,Type t) :
+ DocCompoundNode(parser,parent), m_type(t)
+{
+}
+
+bool DocSimpleSect::hasTitle() const
+{
+ return m_title && std::get<DocTitle>(*m_title).hasTitle();
+}
+
+int DocSimpleSect::parse(DocNodeVariant *thisVariant,bool userTitle,bool needsSeparator)
+{
+ DBG(("DocSimpleSect::parse() start\n"));
+ auto ns = AutoNodeStack(parser(),thisVariant);
+
+ // handle case for user defined title
+ if (userTitle)
+ {
+ m_title = std::make_unique<DocNodeVariant>(DocTitle(parser(),thisVariant));
+ DocTitle *title = &std::get<DocTitle>(*m_title);
+ title->parse(m_title.get());
+ }
+
+ // add new paragraph as child
+ if (!children().empty() && std::holds_alternative<DocPara>(children().back()))
+ {
+ std::get<DocPara>(children().back()).markLast(FALSE);
+ }
+ bool markFirst = children().empty();
+ if (needsSeparator)
+ {
+ children().append<DocSimpleSectSep>(parser(),thisVariant);
+ }
+ auto vDocPara = children().append<DocPara>(parser(),thisVariant);
+ DocPara *par = children().get_last<DocPara>();
+ if (markFirst)
+ {
+ par->markFirst();
+ }
+ par->markLast();
+
+ // parse the contents of the paragraph
+ int retval = par->parse(vDocPara);
+
+ DBG(("DocSimpleSect::parse() end retval=%d\n",retval));
+ return retval; // 0==EOF, TK_NEWPARA, TK_LISTITEM, TK_ENDLIST, RetVal_SimpleSec
+}
+
+int DocSimpleSect::parseRcs(DocNodeVariant *thisVariant)
+{
+ DBG(("DocSimpleSect::parseRcs() start\n"));
+ auto ns = AutoNodeStack(parser(),thisVariant);
+
+ m_title = std::make_unique<DocNodeVariant>(DocTitle(parser(),thisVariant));
+ DocTitle *title = &std::get<DocTitle>(*m_title);
+ title->parseFromString(thisVariant,parser()->context.token->name);
+
+ QCString text = parser()->context.token->text;
+ parser()->pushContext(); // this will create a new parser->context.token
+ parser()->internalValidatingParseDoc(thisVariant,children(),text);
+ parser()->popContext(); // this will restore the old parser->context.token
+
+ DBG(("DocSimpleSect::parseRcs()\n"));
+ return RetVal_OK;
+}
+
+int DocSimpleSect::parseXml(DocNodeVariant *thisVariant)
+{
+ DBG(("DocSimpleSect::parse() start\n"));
+ auto ns = AutoNodeStack(parser(),thisVariant);
+
+ int retval = RetVal_OK;
+ for (;;)
+ {
+ // add new paragraph as child
+ if (!children().empty() && std::holds_alternative<DocPara>(children().back()))
+ {
+ std::get<DocPara>(children().back()).markLast(false);
+ }
+ bool markFirst = children().empty();
+ auto vDocPara = children().append<DocPara>(parser(),thisVariant);
+ DocPara *par = children().get_last<DocPara>();
+ if (markFirst)
+ {
+ par->markFirst();
+ }
+ par->markLast();
+
+ // parse the contents of the paragraph
+ retval = par->parse(vDocPara);
+ if (retval == 0) break;
+ if (retval == RetVal_CloseXml)
+ {
+ retval = RetVal_OK;
+ break;
+ }
+ }
+
+ DBG(("DocSimpleSect::parseXml() end retval=%d\n",retval));
+ return retval;
+}
+
+void DocSimpleSect::appendLinkWord(DocNodeVariant *thisVariant,const QCString &word)
+{
+ DocPara *p=0;
+ if (children().empty() || (p=std::get_if<DocPara>(&children().back()))==0)
+ {
+ children().append<DocPara>(parser(),thisVariant);
+ p = children().get_last<DocPara>();
+ }
+ else
+ {
+ // Comma-separate <seealso> links.
+ p->injectToken(thisVariant,TK_WORD,",");
+ p->injectToken(thisVariant,TK_WHITESPACE," ");
+ }
+
+ parser()->context.inSeeBlock=TRUE;
+ p->injectToken(thisVariant,TK_LNKWORD,word);
+ parser()->context.inSeeBlock=FALSE;
+}
+
+QCString DocSimpleSect::typeString() const
+{
+ switch (m_type)
+ {
+ case Unknown: break;
+ case See: return "see";
+ case Return: return "return";
+ case Author: // fall through
+ case Authors: return "author";
+ case Version: return "version";
+ case Since: return "since";
+ case Date: return "date";
+ case Note: return "note";
+ case Warning: return "warning";
+ case Pre: return "pre";
+ case Post: return "post";
+ case Copyright: return "copyright";
+ case Invar: return "invariant";
+ case Remark: return "remark";
+ case Attention: return "attention";
+ case User: return "user";
+ case Rcs: return "rcs";
+ }
+ return "unknown";
+}
+
+//--------------------------------------------------------------------------
+
+int DocParamList::parse(DocNodeVariant *thisVariant,const QCString &cmdName)
+{
+ int retval=RetVal_OK;
+ DBG(("DocParamList::parse() start\n"));
+ auto ns = AutoNodeStack(parser(),thisVariant);
+ DocNodeVariant *vDocPara = 0;
+ DocPara *par=0;
+ QCString saveCmdName = cmdName;
+
+ int tok=parser()->tokenizer.lex();
+ if (tok!=TK_WHITESPACE)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected whitespace after \\%s command",
+ qPrint(saveCmdName));
+ retval=RetVal_EndParBlock;
+ goto endparamlist;
+ }
+ parser()->tokenizer.setStateParam();
+ tok=parser()->tokenizer.lex();
+ while (tok==TK_WORD) /* there is a parameter name */
+ {
+ if (m_type==DocParamSect::Param)
+ {
+ int typeSeparator = parser()->context.token->name.find('#'); // explicit type position
+ if (typeSeparator!=-1)
+ {
+ parser()->handleParameterType(thisVariant,m_paramTypes,parser()->context.token->name.left(typeSeparator));
+ parser()->context.token->name = parser()->context.token->name.mid(typeSeparator+1);
+ parser()->context.hasParamCommand=TRUE;
+ parser()->checkArgumentName();
+ if (parent() && std::holds_alternative<DocParamSect>(*parent()))
+ {
+ std::get<DocParamSect>(*parent()).m_hasTypeSpecifier=true;
+ }
+ }
+ else
+ {
+ parser()->context.hasParamCommand=TRUE;
+ parser()->checkArgumentName();
+ }
+ }
+ else if (m_type==DocParamSect::RetVal)
+ {
+ parser()->context.hasReturnCommand=TRUE;
+ parser()->checkRetvalName();
+ }
+ //m_params.append(parser()->context.token->name);
+ parser()->handleLinkedWord(thisVariant,m_params);
+ tok=parser()->tokenizer.lex();
+ }
+ parser()->tokenizer.setStatePara();
+ if (tok==0) /* premature end of comment block */
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected end of comment block while parsing the "
+ "argument of command %s",qPrint(saveCmdName));
+ retval=RetVal_EndParBlock;
+ goto endparamlist;
+ }
+ if (tok!=TK_WHITESPACE) /* premature end of comment block */
+ {
+ if (tok!=TK_NEWPARA) /* empty param description */
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected token %s in comment block while parsing the "
+ "argument of command %s",DocTokenizer::tokToString(tok),qPrint(saveCmdName));
+ }
+ retval=RetVal_EndParBlock;
+ goto endparamlist;
+ }
+
+ vDocPara = m_paragraphs.append<DocPara>(parser(),thisVariant);
+ par = m_paragraphs.get_last<DocPara>();
+ retval = par->parse(vDocPara);
+ par->markFirst();
+ par->markLast();
+
+endparamlist:
+ DBG(("DocParamList::parse() end retval=%d\n",retval));
+ return retval;
+}
+
+int DocParamList::parseXml(DocNodeVariant *thisVariant,const QCString ¶mName)
+{
+ int retval=RetVal_OK;
+ DBG(("DocParamList::parseXml() start\n"));
+ auto ns = AutoNodeStack(parser(),thisVariant);
+
+ parser()->context.token->name = paramName;
+ if (m_type==DocParamSect::Param)
+ {
+ parser()->context.hasParamCommand=TRUE;
+ parser()->checkArgumentName();
+ }
+ else if (m_type==DocParamSect::RetVal)
+ {
+ parser()->context.hasReturnCommand=TRUE;
+ parser()->checkRetvalName();
+ }
+
+ parser()->handleLinkedWord(thisVariant,m_params);
+
+ do
+ {
+ auto vDocPara = m_paragraphs.append<DocPara>(parser(),thisVariant);
+ DocPara *par = m_paragraphs.get_last<DocPara>();
+ retval = par->parse(vDocPara);
+ if (par->isEmpty()) // avoid adding an empty paragraph for the whitespace
+ // after </para> and before </param>
+ {
+ m_paragraphs.pop_back();
+ break;
+ }
+ else // append the paragraph to the list
+ {
+ if (!m_paragraphs.empty())
+ {
+ m_paragraphs.get_last<DocPara>()->markLast(FALSE);
+ }
+ bool markFirst = m_paragraphs.empty();
+ par = &std::get<DocPara>(m_paragraphs.back());
+ if (markFirst)
+ {
+ par->markFirst();
+ }
+ par->markLast();
+ }
+
+ if (retval == 0) break;
+
+ } while (retval==RetVal_CloseXml &&
+ Mappers::htmlTagMapper->map(parser()->context.token->name)!=XML_PARAM &&
+ Mappers::htmlTagMapper->map(parser()->context.token->name)!=XML_TYPEPARAM &&
+ Mappers::htmlTagMapper->map(parser()->context.token->name)!=XML_EXCEPTION);
+
+
+ if (retval==0) /* premature end of comment block */
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unterminated param or exception tag");
+ }
+ else
+ {
+ retval=RetVal_OK;
+ }
+
+ DBG(("DocParamList::parse() end retval=%d\n",retval));
+ return retval;
+}
+
+//--------------------------------------------------------------------------
+
+int DocParamSect::parse(DocNodeVariant *thisVariant,const QCString &cmdName,bool xmlContext, Direction d)
+{
+ int retval=RetVal_OK;
+ DBG(("DocParamSect::parse() start\n"));
+ auto ns = AutoNodeStack(parser(),thisVariant);
+
+ if (d!=Unspecified)
+ {
+ m_hasInOutSpecifier=TRUE;
+ }
+
+ if (!children().empty() && std::holds_alternative<DocParamList>(children().back()))
+ {
+ DocParamList &lastPl = std::get<DocParamList>(children().back());
+ lastPl.markLast(false);
+ }
+ bool markFirst = children().empty();
+ auto vDocParamList = children().append<DocParamList>(parser(),thisVariant,m_type,d);
+ DocParamList *pl = children().get_last<DocParamList>();
+ if (markFirst)
+ {
+ pl->markFirst();
+ }
+ pl->markLast();
+ if (xmlContext)
+ {
+ retval = pl->parseXml(vDocParamList,cmdName);
+ }
+ else
+ {
+ retval = pl->parse(vDocParamList,cmdName);
+ }
+ if (retval==RetVal_EndParBlock)
+ {
+ retval = RetVal_OK;
+ }
+
+ DBG(("DocParamSect::parse() end retval=%d\n",retval));
+ return retval;
+}
+
+//--------------------------------------------------------------------------
+
+DocPara::DocPara(DocParser *parser,DocNodeVariant *parent) :
+ DocCompoundNode(parser,parent),
+ m_isFirst(FALSE), m_isLast(FALSE)
+{
+}
+
+int DocPara::handleSimpleSection(DocNodeVariant *thisVariant,
+ DocSimpleSect::Type t, bool xmlContext)
+{
+ DocSimpleSect *ss=0;
+ DocNodeVariant *vDocSimpleSect = 0;
+ bool needsSeparator = FALSE;
+ if (!children().empty() && // has previous element
+ (ss=children().get_last<DocSimpleSect>()) && // was a simple sect
+ ss->type()==t && // of same type
+ t!=DocSimpleSect::User) // but not user defined
+ {
+ vDocSimpleSect = &children().back();
+ // append to previous section
+ needsSeparator = TRUE;
+ }
+ else // start new section
+ {
+ vDocSimpleSect = children().append<DocSimpleSect>(parser(),thisVariant,t);
+ ss = children().get_last<DocSimpleSect>();
+ }
+ int rv = RetVal_OK;
+ if (xmlContext)
+ {
+ return ss->parseXml(vDocSimpleSect);
+ }
+ else
+ {
+ rv = ss->parse(vDocSimpleSect,t==DocSimpleSect::User,needsSeparator);
+ }
+ return (rv!=TK_NEWPARA) ? rv : RetVal_OK;
+}
+
+int DocPara::handleParamSection(DocNodeVariant *thisVariant,
+ const QCString &cmdName,
+ DocParamSect::Type t,
+ bool xmlContext=FALSE,
+ int direction=DocParamSect::Unspecified)
+{
+ DocParamSect *ps = 0;
+ DocNodeVariant *vDocParamSect = 0;
+ if (!children().empty() && // previous element
+ (ps=children().get_last<DocParamSect>()) && // was a param sect
+ ps->type()==t) // of same type
+ {
+ // append to previous section
+ vDocParamSect = &children().back();
+ }
+ else // start new section
+ {
+ vDocParamSect = children().append<DocParamSect>(parser(),thisVariant,t);
+ ps = children().get_last<DocParamSect>();
+ }
+ int rv=ps->parse(vDocParamSect,cmdName,xmlContext,
+ static_cast<DocParamSect::Direction>(direction));
+ return (rv!=TK_NEWPARA) ? rv : RetVal_OK;
+}
+
+void DocPara::handleCite(DocNodeVariant *thisVariant)
+{
+ // get the argument of the cite command.
+ int tok=parser()->tokenizer.lex();
+ if (tok!=TK_WHITESPACE)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected whitespace after \\%s command",
+ qPrint("cite"));
+ return;
+ }
+ parser()->tokenizer.setStateCite();
+ tok=parser()->tokenizer.lex();
+ if (tok==0)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected end of comment block while parsing the "
+ "argument of command %s\n", qPrint("cite"));
+ return;
+ }
+ else if (tok!=TK_WORD && tok!=TK_LNKWORD)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected token %s as the argument of %s",
+ DocTokenizer::tokToString(tok),qPrint("cite"));
+ return;
+ }
+ parser()->context.token->sectionId = parser()->context.token->name;
+ children().append<DocCite>(
+ parser(),thisVariant,parser()->context.token->name,parser()->context.context);
+
+ parser()->tokenizer.setStatePara();
+}
+
+void DocPara::handleEmoji(DocNodeVariant *thisVariant)
+{
+ // get the argument of the emoji command.
+ int tok=parser()->tokenizer.lex();
+ if (tok!=TK_WHITESPACE)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected whitespace after \\%s command",
+ qPrint("emoji"));
+ return;
+ }
+ parser()->tokenizer.setStateEmoji();
+ tok=parser()->tokenizer.lex();
+ if (tok==0)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"no emoji name given or unexpected end of comment block while parsing the "
+ "argument of command %s", qPrint("emoji"));
+ parser()->tokenizer.setStatePara();
+ return;
+ }
+ else if (tok!=TK_WORD)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected token %s as the argument of %s",
+ DocTokenizer::tokToString(tok),qPrint("emoji"));
+ parser()->tokenizer.setStatePara();
+ return;
+ }
+ children().append<DocEmoji>(parser(),thisVariant,parser()->context.token->name);
+ parser()->tokenizer.setStatePara();
+}
+
+int DocPara::handleXRefItem(DocNodeVariant *thisVariant)
+{
+ int retval=parser()->tokenizer.lex();
+ ASSERT(retval==TK_WHITESPACE);
+ parser()->tokenizer.setStateXRefItem();
+ retval=parser()->tokenizer.lex();
+ if (retval==RetVal_OK)
+ {
+ auto vDocXRefItem = children().append<DocXRefItem>(parser(),thisVariant,
+ parser()->context.token->id,parser()->context.token->name);
+ DocXRefItem *ref = children().get_last<DocXRefItem>();
+ if (!ref->parse(vDocXRefItem))
+ {
+ children().pop_back();
+ }
+ }
+ parser()->tokenizer.setStatePara();
+ return retval;
+}
+
+void DocPara::handleIline(DocNodeVariant *)
+{
+ parser()->tokenizer.setStateIline();
+ int tok = parser()->tokenizer.lex();
+ if (tok!=TK_WORD)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"invalid argument for command '\\iline'\n");
+ return;
+ }
+ parser()->tokenizer.setStatePara();
+}
+
+void DocPara::handleIncludeOperator(DocNodeVariant *thisVariant,const QCString &cmdName,DocIncOperator::Type t)
+{
+ QCString saveCmdName = cmdName;
+ DBG(("handleIncludeOperator(%s)\n",qPrint(saveCmdName)));
+ int tok=parser()->tokenizer.lex();
+ if (tok!=TK_WHITESPACE)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected whitespace after \\%s command",
+ qPrint(saveCmdName));
+ return;
+ }
+ parser()->tokenizer.setStatePattern();
+ tok=parser()->tokenizer.lex();
+ parser()->tokenizer.setStatePara();
+ if (tok==0)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected end of comment block while parsing the "
+ "argument of command %s", qPrint(saveCmdName));
+ return;
+ }
+ else if (tok!=TK_WORD)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected token %s as the argument of %s",
+ DocTokenizer::tokToString(tok),qPrint(saveCmdName));
+ return;
+ }
+ auto it1 = children().size()>=1 ? std::prev(children().end()) : children().end();
+ auto it2 = children().size()>=2 ? std::prev(it1) : children().end();
+ DocNodeVariant *n1 = it1!=children().end() ? &(*it1) : 0;
+ DocNodeVariant *n2 = it2!=children().end() ? &(*it2) : 0;
+ children().append<DocIncOperator>(parser(),thisVariant,t,
+ parser()->context.token->name,
+ parser()->context.context,
+ parser()->context.isExample,
+ parser()->context.exampleName);
+ DocIncOperator *op = children().get_last<DocIncOperator>();
+ DocIncOperator *n1_docIncOp = std::get_if<DocIncOperator>(n1);
+ DocWhiteSpace *n1_docWs = std::get_if<DocWhiteSpace >(n1);
+ DocIncOperator *n2_docIncOp = std::get_if<DocIncOperator>(n2);
+ bool isFirst = !n1 || // no last node
+ (!n1_docIncOp && !n1_docWs) || // last node is not operator or whitespace
+ (n1_docWs && n2 && !n2_docIncOp); // last node is not operator
+ op->markFirst(isFirst);
+ op->markLast(true);
+ if (n1_docIncOp)
+ {
+ n1_docIncOp->markLast(false);
+ }
+ else if (n1_docWs && n2_docIncOp)
+ {
+ n2_docIncOp->markLast(false);
+ }
+ op->parse(&children().back());
+}
+
+template<class T>
+void DocPara::handleFile(DocNodeVariant *thisVariant,const QCString &cmdName)
+{
+ QCString saveCmdName = cmdName;
+ int tok=parser()->tokenizer.lex();
+ if (tok!=TK_WHITESPACE)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected whitespace after \\%s command",
+ qPrint(saveCmdName));
+ return;
+ }
+ parser()->tokenizer.setStateFile();
+ tok=parser()->tokenizer.lex();
+ parser()->tokenizer.setStatePara();
+ if (tok!=TK_WORD)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected token %s as the argument of %s",
+ DocTokenizer::tokToString(tok),qPrint(saveCmdName));
+ return;
+ }
+ QCString name = parser()->context.token->name;
+ auto vT = children().append<T>(parser(),thisVariant,name,
+ parser()->context.context,
+ parser()->context.fileName,
+ parser()->tokenizer.getLineNr());
+ auto df = children().get_last<T>();
+ if (!df->parse(vT))
+ {
+ children().pop_back();
+ }
+}
+
+void DocPara::handleVhdlFlow(DocNodeVariant *thisVariant)
+{
+ auto vDocVhdlFlow = children().append<DocVhdlFlow>(parser(),thisVariant);
+ children().get_last<DocVhdlFlow>()->parse(vDocVhdlFlow);
+}
+
+void DocPara::handleLink(DocNodeVariant *thisVariant,const QCString &cmdName,bool isJavaLink)
+{
+ QCString saveCmdName = cmdName;
+ int tok=parser()->tokenizer.lex();
+ if (tok!=TK_WHITESPACE)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected whitespace after \\%s command",
+ qPrint(saveCmdName));
+ return;
+ }
+ parser()->tokenizer.setStateLink();
+ tok=parser()->tokenizer.lex();
+ if (tok!=TK_WORD)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"%s as the argument of %s",
+ DocTokenizer::tokToString(tok),qPrint(saveCmdName));
+ return;
+ }
+ if (saveCmdName == "javalink")
+ {
+ children().append<DocStyleChange>(parser(),thisVariant,
+ parser()->context.nodeStack.size(),
+ DocStyleChange::Code,cmdName,TRUE);
+ }
+ parser()->tokenizer.setStatePara();
+ auto vDocLink = children().append<DocLink>(parser(),thisVariant,parser()->context.token->name);
+ DocLink *lnk = children().get_last<DocLink>();
+ if (saveCmdName == "javalink")
+ {
+ children().append<DocStyleChange>(parser(),thisVariant,
+ parser()->context.nodeStack.size(),
+ DocStyleChange::Code,cmdName,FALSE);
+ }
+ QCString leftOver = lnk->parse(vDocLink,isJavaLink);
+ if (!leftOver.isEmpty())
+ {
+ children().append<DocWord>(parser(),thisVariant,leftOver);
+ }
+}
+
+void DocPara::handleRef(DocNodeVariant *thisVariant,const QCString &cmdName)
+{
+ QCString saveCmdName = cmdName;
+ DBG(("handleRef(%s)\n",qPrint(saveCmdName)));
+ DocNodeVariant *vDocRef = 0;
+ int tok=parser()->tokenizer.lex();
+ if (tok!=TK_WHITESPACE)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected whitespace after \\%s command",
+ qPrint(saveCmdName));
+ return;
+ }
+ parser()->tokenizer.setStateRef();
+ tok=parser()->tokenizer.lex(); // get the reference id
+ if (tok!=TK_WORD)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected token %s as the argument of %s",
+ DocTokenizer::tokToString(tok),qPrint(saveCmdName));
+ goto endref;
+ }
+ vDocRef = children().append<DocRef>(parser(),thisVariant,
+ parser()->context.token->name,
+ parser()->context.context);
+ children().get_last<DocRef>()->parse(vDocRef);
+endref:
+ parser()->tokenizer.setStatePara();
+}
+
+void DocPara::handleInclude(DocNodeVariant *thisVariant,const QCString &cmdName,DocInclude::Type t)
+{
+ DBG(("handleInclude(%s)\n",qPrint(cmdName)));
+ QCString saveCmdName = cmdName;
+ int tok=parser()->tokenizer.lex();
+ bool isBlock = false;
+ if (tok==TK_WORD && parser()->context.token->name=="{")
+ {
+ parser()->tokenizer.setStateOptions();
+ tok=parser()->tokenizer.lex();
+ parser()->tokenizer.setStatePara();
+ StringVector optList=split(parser()->context.token->name.str(),",");
+ auto contains = [&optList](const char *kw)
+ {
+ return std::find(optList.begin(),optList.end(),kw)!=optList.end();
+ };
+ if (t==DocInclude::Include && contains("lineno"))
+ {
+ t = DocInclude::IncWithLines;
+ }
+ else if (t==DocInclude::Snippet && contains("lineno"))
+ {
+ t = DocInclude::SnipWithLines;
+ }
+ else if (t==DocInclude::DontInclude && contains("lineno"))
+ {
+ t = DocInclude::DontIncWithLines;
+ }
+ else if (t==DocInclude::Include && contains("doc"))
+ {
+ t = DocInclude::IncludeDoc;
+ }
+ else if (t==DocInclude::Snippet && contains("doc"))
+ {
+ t = DocInclude::SnippetDoc;
+ }
+ tok=parser()->tokenizer.lex();
+ if (tok!=TK_WHITESPACE)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected whitespace after \\%s command",
+ qPrint(saveCmdName));
+ return;
+ }
+ }
+ else if (tok==TK_WORD && parser()->context.token->name=="[")
+ {
+ parser()->tokenizer.setStateBlock();
+ tok=parser()->tokenizer.lex();
+ isBlock = (parser()->context.token->name.stripWhiteSpace() == "block");
+ parser()->tokenizer.setStatePara();
+ tok=parser()->tokenizer.lex();
+ }
+ else if (tok!=TK_WHITESPACE)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected whitespace after \\%s command",
+ qPrint(saveCmdName));
+ return;
+ }
+ parser()->tokenizer.setStateFile();
+ tok=parser()->tokenizer.lex();
+ parser()->tokenizer.setStatePara();
+ if (tok==0)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected end of comment block while parsing the "
+ "argument of command %s",qPrint(saveCmdName));
+ return;
+ }
+ else if (tok!=TK_WORD)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected token %s as the argument of %s",
+ DocTokenizer::tokToString(tok),qPrint(saveCmdName));
+ return;
+ }
+ QCString fileName = parser()->context.token->name;
+ QCString blockId;
+ if (t==DocInclude::Snippet || t==DocInclude::SnipWithLines || t==DocInclude::SnippetDoc)
+ {
+ if (fileName == "this") fileName=parser()->context.fileName;
+ parser()->tokenizer.setStateSnippet();
+ tok=parser()->tokenizer.lex();
+ parser()->tokenizer.setStatePara();
+ if (tok!=TK_WORD)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected block identifier, but found token %s instead while parsing the %s command",
+ DocTokenizer::tokToString(tok),qPrint(saveCmdName));
+ return;
+ }
+ blockId = "["+parser()->context.token->name+"]";
+ }
+
+ // This is the only place to handle the \includedoc and \snippetdoc commands,
+ // as the content is included here as if it is really here.
+ if (t==DocInclude::IncludeDoc || t==DocInclude::SnippetDoc)
+ {
+ QCString inc_text;
+ int inc_line = 1;
+ parser()->readTextFileByName(fileName,inc_text);
+ if (t==DocInclude::SnippetDoc)
+ {
+ int count;
+ if (!blockId.isEmpty() && (count=inc_text.contains(blockId.data()))!=2)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"block marked with %s for \\snippet should appear twice in file %s, found it %d times\n",
+ qPrint(blockId),qPrint(fileName),count);
+ }
+ inc_line = lineBlock(inc_text, blockId);
+ inc_text = extractBlock(inc_text, blockId);
+ }
+
+ Markdown markdown(fileName,inc_line);
+ QCString strippedDoc = stripIndentation(inc_text);
+ QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(strippedDoc,inc_line) : strippedDoc;
+
+ parser()->pushContext();
+ parser()->context.fileName = fileName;
+ parser()->tokenizer.setLineNr(inc_line);
+ parser()->internalValidatingParseDoc(thisVariant,children(),processedDoc);
+ parser()->popContext();
+ }
+ else
+ {
+ auto vDocInclude = children().append<DocInclude>(parser(),thisVariant,fileName,
+ parser()->context.context,t,
+ parser()->context.isExample,
+ parser()->context.exampleName,
+ blockId,isBlock);
+ children().get_last<DocInclude>()->parse(vDocInclude);
+ }
+}
+
+void DocPara::handleSection(DocNodeVariant *,const QCString &cmdName)
+{
+ QCString saveCmdName = cmdName;
+ // get the argument of the section command.
+ int tok=parser()->tokenizer.lex();
+ if (tok!=TK_WHITESPACE)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected whitespace after \\%s command",
+ qPrint(saveCmdName));
+ return;
+ }
+ tok=parser()->tokenizer.lex();
+ if (tok==0)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected end of comment block while parsing the "
+ "argument of command %s\n", qPrint(saveCmdName));
+ return;
+ }
+ else if (tok!=TK_WORD && tok!=TK_LNKWORD)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected token %s as the argument of %s",
+ DocTokenizer::tokToString(tok),qPrint(saveCmdName));
+ return;
+ }
+ parser()->context.token->sectionId = parser()->context.token->name;
+ parser()->tokenizer.setStateSkipTitle();
+ parser()->tokenizer.lex();
+ parser()->tokenizer.setStatePara();
+}
+
+int DocPara::handleHtmlHeader(DocNodeVariant *thisVariant,
+ const HtmlAttribList &tagHtmlAttribs,int level)
+{
+ auto vDocHtmlHeader = children().append<DocHtmlHeader>(parser(),thisVariant,tagHtmlAttribs,level);
+ int retval = children().get_last<DocHtmlHeader>()->parse(vDocHtmlHeader);
+ return (retval==RetVal_OK) ? TK_NEWPARA : retval;
+}
+
+// For XML tags whose content is stored in attributes rather than
+// contained within the element, we need a way to inject the attribute
+// text into the current paragraph.
+bool DocPara::injectToken(DocNodeVariant *thisVariant,int tok,const QCString &tokText)
+{
+ parser()->context.token->name = tokText;
+ return parser()->defaultHandleToken(thisVariant,tok,children());
+}
+
+int DocPara::handleStartCode(DocNodeVariant *thisVariant)
+{
+ int retval = parser()->tokenizer.lex();
+ QCString lang = parser()->context.token->name;
+ if (!lang.isEmpty() && lang.at(0)!='.')
+ {
+ lang="."+lang;
+ }
+ if (parser()->context.xmlComment)
+ {
+ parser()->context.token->verb = substitute(substitute(parser()->context.token->verb,"<","<"),">",">");
+ }
+ // search for the first non-whitespace line, index is stored in li
+ int i=0,li=0,l=parser()->context.token->verb.length();
+ while (i<l && (parser()->context.token->verb.at(i)==' ' || parser()->context.token->verb.at(i)=='\n'))
+ {
+ if (parser()->context.token->verb.at(i)=='\n') li=i+1;
+ i++;
+ }
+ children().append<DocVerbatim>(parser(),thisVariant,
+ parser()->context.context,
+ stripIndentation(parser()->context.token->verb.mid(li)),
+ DocVerbatim::Code,
+ parser()->context.isExample,
+ parser()->context.exampleName,
+ FALSE,lang);
+ if (retval==0) warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"code section ended without end marker");
+ parser()->tokenizer.setStatePara();
+ return retval;
+}
+
+void DocPara::handleInheritDoc(DocNodeVariant *thisVariant)
+{
+ if (parser()->context.memberDef) // inheriting docs from a member
+ {
+ const MemberDef *reMd = parser()->context.memberDef->reimplements();
+ if (reMd) // member from which was inherited.
+ {
+ const MemberDef *thisMd = parser()->context.memberDef;
+ //printf("{InheritDocs:%s=>%s}\n",qPrint(parser()->context.memberDef->qualifiedName()),qPrint(reMd->qualifiedName()));
+ parser()->pushContext();
+ parser()->context.scope=reMd->getOuterScope();
+ if (parser()->context.scope!=Doxygen::globalScope)
+ {
+ parser()->context.context=parser()->context.scope->name();
+ }
+ parser()->context.memberDef=reMd;
+ while (!parser()->context.styleStack.empty()) parser()->context.styleStack.pop();
+ while (!parser()->context.nodeStack.empty()) parser()->context.nodeStack.pop();
+ parser()->context.copyStack.push_back(reMd);
+ parser()->internalValidatingParseDoc(thisVariant,children(),reMd->briefDescription());
+ parser()->internalValidatingParseDoc(thisVariant,children(),reMd->documentation());
+ parser()->context.copyStack.pop_back();
+ auto hasParamCommand = parser()->context.hasParamCommand;
+ auto hasReturnCommand = parser()->context.hasReturnCommand;
+ auto retvalsFound = parser()->context.retvalsFound;
+ auto paramsFound = parser()->context.paramsFound;
+ parser()->popContext();
+ parser()->context.hasParamCommand = hasParamCommand;
+ parser()->context.hasReturnCommand = hasReturnCommand;
+ parser()->context.retvalsFound = retvalsFound;
+ parser()->context.paramsFound = paramsFound;
+ parser()->context.memberDef = thisMd;
+ }
+ }
+}
+
+
+int DocPara::handleCommand(DocNodeVariant *thisVariant,const QCString &cmdName, const int tok)
+{
+ DBG(("handleCommand(%s)\n",qPrint(cmdName)));
+ int retval = RetVal_OK;
+ int cmdId = Mappers::cmdMapper->map(cmdName);
+ switch (cmdId)
+ {
+ case CMD_UNKNOWN:
+ children().append<DocWord>(parser(),thisVariant,TK_COMMAND_CHAR(tok) + cmdName);
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Found unknown command '%s%s'",TK_COMMAND_CHAR(tok),qPrint(cmdName));
+ break;
+ case CMD_EMPHASIS:
+ children().append<DocStyleChange>(parser(),thisVariant,parser()->context.nodeStack.size(),DocStyleChange::Italic,cmdName,TRUE);
+ retval=parser()->handleStyleArgument(thisVariant,children(),cmdName);
+ children().append<DocStyleChange>(parser(),thisVariant,parser()->context.nodeStack.size(),DocStyleChange::Italic,cmdName,FALSE);
+ if (retval!=TK_WORD) children().append<DocWhiteSpace>(parser(),thisVariant," ");
+ break;
+ case CMD_BOLD:
+ children().append<DocStyleChange>(parser(),thisVariant,parser()->context.nodeStack.size(),DocStyleChange::Bold,cmdName,TRUE);
+ retval=parser()->handleStyleArgument(thisVariant,children(),cmdName);
+ children().append<DocStyleChange>(parser(),thisVariant,parser()->context.nodeStack.size(),DocStyleChange::Bold,cmdName,FALSE);
+ if (retval!=TK_WORD) children().append<DocWhiteSpace>(parser(),thisVariant," ");
+ break;
+ case CMD_CODE:
+ children().append<DocStyleChange>(parser(),thisVariant,parser()->context.nodeStack.size(),DocStyleChange::Code,cmdName,TRUE);
+ retval=parser()->handleStyleArgument(thisVariant,children(),cmdName);
+ children().append<DocStyleChange>(parser(),thisVariant,parser()->context.nodeStack.size(),DocStyleChange::Code,cmdName,FALSE);
+ if (retval!=TK_WORD) children().append<DocWhiteSpace>(parser(),thisVariant," ");
+ break;
+ case CMD_BSLASH:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_BSlash);
+ break;
+ case CMD_AT:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_At);
+ break;
+ case CMD_LESS:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Less);
+ break;
+ case CMD_GREATER:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Greater);
+ break;
+ case CMD_AMP:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Amp);
+ break;
+ case CMD_DOLLAR:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Dollar);
+ break;
+ case CMD_HASH:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Hash);
+ break;
+ case CMD_PIPE:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Pipe);
+ break;
+ case CMD_DCOLON:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_DoubleColon);
+ break;
+ case CMD_PERCENT:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Percent);
+ break;
+ case CMD_NDASH:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Minus);
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Minus);
+ break;
+ case CMD_MDASH:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Minus);
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Minus);
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Minus);
+ break;
+ case CMD_QUOTE:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Quot);
+ break;
+ case CMD_PUNT:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Dot);
+ break;
+ case CMD_PLUS:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Plus);
+ break;
+ case CMD_MINUS:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Minus);
+ break;
+ case CMD_EQUAL:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Equal);
+ break;
+ case CMD_SA:
+ parser()->context.inSeeBlock=TRUE;
+ retval = handleSimpleSection(thisVariant,DocSimpleSect::See);
+ parser()->context.inSeeBlock=FALSE;
+ break;
+ case CMD_RETURN:
+ retval = handleSimpleSection(thisVariant,DocSimpleSect::Return);
+ parser()->context.hasReturnCommand=TRUE;
+ break;
+ case CMD_AUTHOR:
+ retval = handleSimpleSection(thisVariant,DocSimpleSect::Author);
+ break;
+ case CMD_AUTHORS:
+ retval = handleSimpleSection(thisVariant,DocSimpleSect::Authors);
+ break;
+ case CMD_VERSION:
+ retval = handleSimpleSection(thisVariant,DocSimpleSect::Version);
+ break;
+ case CMD_SINCE:
+ retval = handleSimpleSection(thisVariant,DocSimpleSect::Since);
+ break;
+ case CMD_DATE:
+ retval = handleSimpleSection(thisVariant,DocSimpleSect::Date);
+ break;
+ case CMD_NOTE:
+ retval = handleSimpleSection(thisVariant,DocSimpleSect::Note);
+ break;
+ case CMD_WARNING:
+ retval = handleSimpleSection(thisVariant,DocSimpleSect::Warning);
+ break;
+ case CMD_PRE:
+ retval = handleSimpleSection(thisVariant,DocSimpleSect::Pre);
+ break;
+ case CMD_POST:
+ retval = handleSimpleSection(thisVariant,DocSimpleSect::Post);
+ break;
+ case CMD_COPYRIGHT:
+ retval = handleSimpleSection(thisVariant,DocSimpleSect::Copyright);
+ break;
+ case CMD_INVARIANT:
+ retval = handleSimpleSection(thisVariant,DocSimpleSect::Invar);
+ break;
+ case CMD_REMARK:
+ retval = handleSimpleSection(thisVariant,DocSimpleSect::Remark);
+ break;
+ case CMD_ATTENTION:
+ retval = handleSimpleSection(thisVariant,DocSimpleSect::Attention);
+ break;
+ case CMD_PAR:
+ retval = handleSimpleSection(thisVariant,DocSimpleSect::User);
+ break;
+ case CMD_LI:
+ {
+ auto vDocSimpleList = children().append<DocSimpleList>(parser(),thisVariant);
+ retval = children().get_last<DocSimpleList>()->parse(vDocSimpleList);
+ }
+ break;
+ case CMD_SECTION:
+ {
+ handleSection(thisVariant,cmdName);
+ retval = RetVal_Section;
+ }
+ break;
+ case CMD_SUBSECTION:
+ {
+ handleSection(thisVariant,cmdName);
+ retval = RetVal_Subsection;
+ }
+ break;
+ case CMD_SUBSUBSECTION:
+ {
+ handleSection(thisVariant,cmdName);
+ retval = RetVal_Subsubsection;
+ }
+ break;
+ case CMD_PARAGRAPH:
+ {
+ handleSection(thisVariant,cmdName);
+ retval = RetVal_Paragraph;
+ }
+ break;
+ case CMD_STARTCODE:
+ {
+ parser()->tokenizer.setStateCode();
+ retval = handleStartCode(thisVariant);
+ }
+ break;
+ case CMD_HTMLONLY:
+ {
+ parser()->tokenizer.setStateHtmlOnly();
+ retval = parser()->tokenizer.lex();
+ children().append<DocVerbatim>(parser(),thisVariant,parser()->context.context,parser()->context.token->verb,DocVerbatim::HtmlOnly,parser()->context.isExample,parser()->context.exampleName,parser()->context.token->name=="block");
+ if (retval==0) warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"htmlonly section ended without end marker");
+ parser()->tokenizer.setStatePara();
+ }
+ break;
+ case CMD_MANONLY:
+ {
+ parser()->tokenizer.setStateManOnly();
+ retval = parser()->tokenizer.lex();
+ children().append<DocVerbatim>(parser(),thisVariant,parser()->context.context,parser()->context.token->verb,DocVerbatim::ManOnly,parser()->context.isExample,parser()->context.exampleName);
+ if (retval==0) warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"manonly section ended without end marker");
+ parser()->tokenizer.setStatePara();
+ }
+ break;
+ case CMD_RTFONLY:
+ {
+ parser()->tokenizer.setStateRtfOnly();
+ retval = parser()->tokenizer.lex();
+ children().append<DocVerbatim>(parser(),thisVariant,parser()->context.context,parser()->context.token->verb,DocVerbatim::RtfOnly,parser()->context.isExample,parser()->context.exampleName);
+ if (retval==0) warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"rtfonly section ended without end marker");
+ parser()->tokenizer.setStatePara();
+ }
+ break;
+ case CMD_LATEXONLY:
+ {
+ parser()->tokenizer.setStateLatexOnly();
+ retval = parser()->tokenizer.lex();
+ children().append<DocVerbatim>(parser(),thisVariant,parser()->context.context,parser()->context.token->verb,DocVerbatim::LatexOnly,parser()->context.isExample,parser()->context.exampleName);
+ if (retval==0) warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"latexonly section ended without end marker");
+ parser()->tokenizer.setStatePara();
+ }
+ break;
+ case CMD_XMLONLY:
+ {
+ parser()->tokenizer.setStateXmlOnly();
+ retval = parser()->tokenizer.lex();
+ children().append<DocVerbatim>(parser(),thisVariant,parser()->context.context,parser()->context.token->verb,DocVerbatim::XmlOnly,parser()->context.isExample,parser()->context.exampleName);
+ if (retval==0) warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"xmlonly section ended without end marker");
+ parser()->tokenizer.setStatePara();
+ }
+ break;
+ case CMD_DBONLY:
+ {
+ parser()->tokenizer.setStateDbOnly();
+ retval = parser()->tokenizer.lex();
+ children().append<DocVerbatim>(parser(),thisVariant,parser()->context.context,parser()->context.token->verb,DocVerbatim::DocbookOnly,parser()->context.isExample,parser()->context.exampleName);
+ if (retval==0) warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"docbookonly section ended without end marker");
+ parser()->tokenizer.setStatePara();
+ }
+ break;
+ case CMD_ILITERAL:
+ {
+ DocVerbatim::Type t = DocVerbatim::JavaDocLiteral;
+ parser()->tokenizer.setStateILiteralOpt();
+ retval = parser()->tokenizer.lex();
+
+ QCString fullMatch = parser()->context.token->verb;
+ int idx = fullMatch.find('{');
+ int idxEnd = fullMatch.find("}",idx+1);
+ StringVector optList;
+ if (idx != -1) // options present
+ {
+ QCString optStr = fullMatch.mid(idx+1,idxEnd-idx-1).stripWhiteSpace();
+ optList = split(optStr.str(),",");
+ for (const auto &opt : optList)
+ {
+ if (opt.empty()) continue;
+ QCString locOpt(opt);
+ locOpt = locOpt.stripWhiteSpace().lower();
+ if (locOpt == "code")
+ {
+ t = DocVerbatim::JavaDocCode;
+ }
+ else if (!locOpt.isEmpty())
+ {
+ warn(parser()->context.fileName,parser()->tokenizer.getLineNr(), "Unknown option '%s' for '\\iliteral'",qPrint(opt));
+ }
+ }
+ }
+
+ parser()->tokenizer.setStateILiteral();
+ retval = parser()->tokenizer.lex();
+ children().append<DocVerbatim>(parser(),thisVariant,parser()->context.context,parser()->context.token->verb,t,parser()->context.isExample,parser()->context.exampleName);
+ if (retval==0)
+ {
+ if (t == DocVerbatim::JavaDocCode)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"javadoc code section ended without end marker");
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"javadoc literal section ended without end marker");
+ }
+ }
+ parser()->tokenizer.setStatePara();
+ }
+ break;
+ case CMD_VERBATIM:
+ {
+ parser()->tokenizer.setStateVerbatim();
+ retval = parser()->tokenizer.lex();
+ children().append<DocVerbatim>(parser(),thisVariant,parser()->context.context,parser()->context.token->verb,DocVerbatim::Verbatim,parser()->context.isExample,parser()->context.exampleName);
+ if (retval==0) warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"verbatim section ended without end marker");
+ parser()->tokenizer.setStatePara();
+ }
+ break;
+ case CMD_DOT:
+ {
+ auto vDocVerbatim = children().append<DocVerbatim>(parser(),thisVariant,
+ parser()->context.context,
+ parser()->context.token->verb,
+ DocVerbatim::Dot,
+ parser()->context.isExample,
+ parser()->context.exampleName);
+ DocVerbatim *dv = children().get_last<DocVerbatim>();
+ parser()->tokenizer.setStatePara();
+ QCString width,height;
+ parser()->defaultHandleTitleAndSize(CMD_DOT,vDocVerbatim,dv->children(),width,height);
+ parser()->tokenizer.setStateDot();
+ retval = parser()->tokenizer.lex();
+ dv->setText(parser()->context.token->verb);
+ dv->setWidth(width);
+ dv->setHeight(height);
+ dv->setLocation(parser()->context.fileName,parser()->tokenizer.getLineNr());
+ if (!Config_getBool(HAVE_DOT))
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"ignoring \\dot command because HAVE_DOT is not set");
+ children().pop_back();
+ }
+ if (retval==0) warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"dot section ended without end marker");
+ parser()->tokenizer.setStatePara();
+ }
+ break;
+ case CMD_MSC:
+ {
+ auto vDocVerbatim = children().append<DocVerbatim>(parser(),thisVariant,
+ parser()->context.context,
+ parser()->context.token->verb,
+ DocVerbatim::Msc,
+ parser()->context.isExample,
+ parser()->context.exampleName);
+ DocVerbatim *dv = children().get_last<DocVerbatim>();
+ parser()->tokenizer.setStatePara();
+ QCString width,height;
+ parser()->defaultHandleTitleAndSize(CMD_MSC,vDocVerbatim,dv->children(),width,height);
+ parser()->tokenizer.setStateMsc();
+ retval = parser()->tokenizer.lex();
+ dv->setText(parser()->context.token->verb);
+ dv->setWidth(width);
+ dv->setHeight(height);
+ dv->setLocation(parser()->context.fileName,parser()->tokenizer.getLineNr());
+ if (retval==0)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"msc section ended without end marker");
+ }
+ parser()->tokenizer.setStatePara();
+ }
+ break;
+ case CMD_STARTUML:
+ {
+ QCString jarPath = Config_getString(PLANTUML_JAR_PATH);
+ parser()->tokenizer.setStatePlantUMLOpt();
+ retval = parser()->tokenizer.lex();
+ QCString fullMatch = parser()->context.token->sectionId;
+ QCString sectionId = "";
+ int idx = fullMatch.find('{');
+ int idxEnd = fullMatch.find("}",idx+1);
+ StringVector optList;
+ QCString engine;
+ if (idx != -1) // options present
+ {
+ QCString optStr = fullMatch.mid(idx+1,idxEnd-idx-1).stripWhiteSpace();
+ optList = split(optStr.str(),",");
+ for (const auto &opt : optList)
+ {
+ if (opt.empty()) continue;
+ bool found = false;
+ QCString locOpt(opt);
+ locOpt = locOpt.stripWhiteSpace().lower();
+ if (g_plantumlEngine.find(locOpt.str())!=g_plantumlEngine.end())
+ {
+ if (!engine.isEmpty())
+ {
+ warn(parser()->context.fileName,parser()->tokenizer.getLineNr(), "Multiple definition of engine for '\\startuml'");
+ }
+ engine = locOpt;
+ found = true;
+ }
+ if (!found)
+ {
+ if (sectionId.isEmpty())
+ {
+ sectionId = opt;
+ }
+ else
+ {
+ warn(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Multiple use of filename for '\\startuml'");
+ }
+ }
+ }
+ }
+ else
+ {
+ sectionId = parser()->context.token->sectionId;
+ }
+ if (engine.isEmpty()) engine = "uml";
+
+ if (sectionId.isEmpty())
+ {
+ parser()->tokenizer.setStatePlantUMLOpt();
+ retval = parser()->tokenizer.lex();
+ assert(retval==RetVal_OK);
+
+ sectionId = parser()->context.token->sectionId;
+ sectionId = sectionId.stripWhiteSpace();
+ }
+
+ QCString plantFile(sectionId);
+ auto vDocVerbatim = children().append<DocVerbatim>(parser(),thisVariant,
+ parser()->context.context,
+ parser()->context.token->verb,
+ DocVerbatim::PlantUML,
+ FALSE,plantFile);
+ DocVerbatim *dv = children().get_last<DocVerbatim>();
+ dv->setEngine(engine);
+ parser()->tokenizer.setStatePara();
+ QCString width,height;
+ parser()->defaultHandleTitleAndSize(CMD_STARTUML,vDocVerbatim,dv->children(),width,height);
+ parser()->tokenizer.setStatePlantUML();
+ retval = parser()->tokenizer.lex();
+ int line = 0;
+ QCString trimmedVerb = stripLeadingAndTrailingEmptyLines(parser()->context.token->verb,line);
+ if (engine == "ditaa")
+ {
+ dv->setUseBitmap(true);
+ }
+ else if (engine == "uml")
+ {
+ int i = trimmedVerb.find('\n');
+ QCString firstLine = i==-1 ? trimmedVerb : trimmedVerb.left(i);
+ if (firstLine.stripWhiteSpace() == "ditaa") dv->setUseBitmap(true);
+ }
+ dv->setText(trimmedVerb);
+ dv->setWidth(width);
+ dv->setHeight(height);
+ dv->setLocation(parser()->context.fileName,parser()->tokenizer.getLineNr());
+ if (jarPath.isEmpty())
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"ignoring \\startuml command because PLANTUML_JAR_PATH is not set");
+ children().pop_back();
+ }
+ if (retval==0) warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"startuml section ended without end marker");
+ parser()->tokenizer.setStatePara();
+ }
+ break;
+ case CMD_ENDPARBLOCK:
+ retval=RetVal_EndParBlock;
+ break;
+ case CMD_ENDCODE:
+ case CMD_ENDHTMLONLY:
+ case CMD_ENDMANONLY:
+ case CMD_ENDRTFONLY:
+ case CMD_ENDLATEXONLY:
+ case CMD_ENDXMLONLY:
+ case CMD_ENDDBONLY:
+ case CMD_ENDLINK:
+ case CMD_ENDVERBATIM:
+ case CMD_ENDILITERAL:
+ case CMD_ENDDOT:
+ case CMD_ENDMSC:
+ case CMD_ENDUML:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected command %s",qPrint(parser()->context.token->name));
+ break;
+ case CMD_PARAM:
+ retval = handleParamSection(thisVariant,cmdName,DocParamSect::Param,FALSE,parser()->context.token->paramDir);
+ break;
+ case CMD_TPARAM:
+ retval = handleParamSection(thisVariant,cmdName,DocParamSect::TemplateParam,FALSE,parser()->context.token->paramDir);
+ break;
+ case CMD_RETVAL:
+ retval = handleParamSection(thisVariant,cmdName,DocParamSect::RetVal);
+ break;
+ case CMD_EXCEPTION:
+ retval = handleParamSection(thisVariant,cmdName,DocParamSect::Exception);
+ break;
+ case CMD_XREFITEM:
+ retval = handleXRefItem(thisVariant);
+ break;
+ case CMD_LINEBREAK:
+ {
+ children().append<DocLineBreak>(parser(),thisVariant);
+ }
+ break;
+ case CMD_ANCHOR:
+ {
+ parser()->handleAnchor(thisVariant,children());
+ }
+ break;
+ case CMD_ADDINDEX:
+ {
+ auto vDocIndexEntry = children().append<DocIndexEntry>(parser(),thisVariant,
+ parser()->context.scope!=Doxygen::globalScope?parser()->context.scope:0,
+ parser()->context.memberDef);
+ retval = children().get_last<DocIndexEntry>()->parse(vDocIndexEntry);
+ }
+ break;
+ case CMD_INTERNAL:
+ retval = RetVal_Internal;
+ break;
+ case CMD_ENDINTERNAL:
+ retval = RetVal_EndInternal;
+ break;
+ case CMD_PARBLOCK:
+ {
+ auto vDocParBlock = children().append<DocParBlock>(parser(),thisVariant);
+ retval = children().get_last<DocParBlock>()->parse(vDocParBlock);
+ }
+ break;
+ case CMD_COPYDOC: // fall through
+ case CMD_COPYBRIEF: // fall through
+ case CMD_COPYDETAILS:
+ //retval = RetVal_CopyDoc;
+ // these commands should already be resolved by processCopyDoc()
+ break;
+ case CMD_INCLUDE:
+ handleInclude(thisVariant,cmdName,DocInclude::Include);
+ break;
+ case CMD_INCWITHLINES:
+ handleInclude(thisVariant,cmdName,DocInclude::IncWithLines);
+ break;
+ case CMD_DONTINCLUDE:
+ handleInclude(thisVariant,cmdName,DocInclude::DontInclude);
+ break;
+ case CMD_HTMLINCLUDE:
+ handleInclude(thisVariant,cmdName,DocInclude::HtmlInclude);
+ break;
+ case CMD_LATEXINCLUDE:
+ handleInclude(thisVariant,cmdName,DocInclude::LatexInclude);
+ break;
+ case CMD_RTFINCLUDE:
+ handleInclude(thisVariant,cmdName,DocInclude::RtfInclude);
+ break;
+ case CMD_MANINCLUDE:
+ handleInclude(thisVariant,cmdName,DocInclude::ManInclude);
+ break;
+ case CMD_XMLINCLUDE:
+ handleInclude(thisVariant,cmdName,DocInclude::XmlInclude);
+ break;
+ case CMD_DOCBOOKINCLUDE:
+ handleInclude(thisVariant,cmdName,DocInclude::DocbookInclude);
+ break;
+ case CMD_VERBINCLUDE:
+ handleInclude(thisVariant,cmdName,DocInclude::VerbInclude);
+ break;
+ case CMD_SNIPPET:
+ handleInclude(thisVariant,cmdName,DocInclude::Snippet);
+ break;
+ case CMD_SNIPWITHLINES:
+ handleInclude(thisVariant,cmdName,DocInclude::SnipWithLines);
+ break;
+ case CMD_INCLUDEDOC:
+ handleInclude(thisVariant,cmdName,DocInclude::IncludeDoc);
+ break;
+ case CMD_SNIPPETDOC:
+ handleInclude(thisVariant,cmdName,DocInclude::SnippetDoc);
+ break;
+ case CMD_SKIP:
+ handleIncludeOperator(thisVariant,cmdName,DocIncOperator::Skip);
+ break;
+ case CMD_UNTIL:
+ handleIncludeOperator(thisVariant,cmdName,DocIncOperator::Until);
+ break;
+ case CMD_SKIPLINE:
+ handleIncludeOperator(thisVariant,cmdName,DocIncOperator::SkipLine);
+ break;
+ case CMD_LINE:
+ handleIncludeOperator(thisVariant,cmdName,DocIncOperator::Line);
+ break;
+ case CMD_IMAGE:
+ parser()->handleImage(thisVariant,children());
+ break;
+ case CMD_DOTFILE:
+ if (!Config_getBool(HAVE_DOT))
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),
+ "ignoring \\dotfile command because HAVE_DOT is not set");
+ }
+ else
+ {
+ handleFile<DocDotFile>(thisVariant,cmdName);
+ }
+ break;
+ case CMD_VHDLFLOW:
+ handleVhdlFlow(thisVariant);
+ break;
+ case CMD_MSCFILE:
+ handleFile<DocMscFile>(thisVariant,cmdName);
+ break;
+ case CMD_DIAFILE:
+ handleFile<DocDiaFile>(thisVariant,cmdName);
+ break;
+ case CMD_LINK:
+ handleLink(thisVariant,cmdName,FALSE);
+ break;
+ case CMD_JAVALINK:
+ handleLink(thisVariant,cmdName,TRUE);
+ break;
+ case CMD_CITE:
+ handleCite(thisVariant);
+ break;
+ case CMD_EMOJI:
+ handleEmoji(thisVariant);
+ break;
+ case CMD_REF: // fall through
+ case CMD_SUBPAGE:
+ handleRef(thisVariant,cmdName);
+ break;
+ case CMD_SECREFLIST:
+ {
+ auto vDocSecRefList = children().append<DocSecRefList>(parser(),thisVariant);
+ children().get_last<DocSecRefList>()->parse(vDocSecRefList);
+ }
+ break;
+ case CMD_SECREFITEM:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected command %s",qPrint(parser()->context.token->name));
+ break;
+ case CMD_ENDSECREFLIST:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected command %s",qPrint(parser()->context.token->name));
+ break;
+ case CMD_FORMULA:
+ {
+ children().append<DocFormula>(parser(),thisVariant,parser()->context.token->id);
+ }
+ break;
+ //case CMD_LANGSWITCH:
+ // retval = handleLanguageSwitch();
+ // break;
+ case CMD_INTERNALREF:
+ //warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"unexpected command %s",qPrint(parser()->context.token->name));
+ {
+ parser()->handleInternalRef(thisVariant,children());
+ parser()->tokenizer.setStatePara();
+ }
+ break;
+ case CMD_INHERITDOC:
+ handleInheritDoc(thisVariant);
+ break;
+ case CMD_ILINE:
+ handleIline(thisVariant);
+ break;
+ default:
+ // we should not get here!
+ ASSERT(0);
+ break;
+ }
+ INTERNAL_ASSERT(retval==0 || retval==RetVal_OK || retval==RetVal_SimpleSec ||
+ retval==TK_LISTITEM || retval==TK_ENDLIST || retval==TK_NEWPARA ||
+ retval==RetVal_Section || retval==RetVal_EndList ||
+ retval==RetVal_Internal || retval==RetVal_SwitchLang ||
+ retval==RetVal_EndInternal
+ );
+ DBG(("handleCommand(%s) end retval=%s\n",qPrint(cmdName),DocTokenizer::retvalToString(retval)));
+ return retval;
+}
+
+static bool findAttribute(const HtmlAttribList &tagHtmlAttribs,
+ const char *attrName,
+ QCString *result)
+{
+
+ for (const auto &opt : tagHtmlAttribs)
+ {
+ if (opt.name==attrName)
+ {
+ *result = opt.value;
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+int DocPara::handleHtmlStartTag(DocNodeVariant *thisVariant,const QCString &tagName,const HtmlAttribList &tagHtmlAttribs)
+{
+ DBG(("handleHtmlStartTag(%s,%d)\n",qPrint(tagName),tagHtmlAttribs.size()));
+ int retval=RetVal_OK;
+ int tagId = Mappers::htmlTagMapper->map(tagName);
+ if (parser()->context.token->emptyTag && !(tagId&XML_CmdMask) &&
+ tagId!=HTML_UNKNOWN && tagId!=HTML_IMG && tagId!=HTML_BR && tagId!=HTML_HR && tagId!=HTML_P)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"HTML tag ('<%s/>') may not use the 'empty tag' XHTML syntax.",
+ qPrint(tagName));
+ }
+ switch (tagId)
+ {
+ case HTML_UL:
+ if (!parser()->context.token->emptyTag)
+ {
+ auto vDocHtmlList = children().append<DocHtmlList>(parser(),thisVariant,
+ tagHtmlAttribs,DocHtmlList::Unordered);
+ retval=children().get_last<DocHtmlList>()->parse(vDocHtmlList);
+ }
+ break;
+ case HTML_OL:
+ if (!parser()->context.token->emptyTag)
+ {
+ auto vDocHtmlList = children().append<DocHtmlList>(parser(),thisVariant,
+ tagHtmlAttribs,DocHtmlList::Ordered);
+ retval=children().get_last<DocHtmlList>()->parse(vDocHtmlList);
+ }
+ break;
+ case HTML_LI:
+ if (parser()->context.token->emptyTag) break;
+ if (!insideUL(thisVariant) && !insideOL(thisVariant))
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"lonely <li> tag found");
+ }
+ else
+ {
+ retval=RetVal_ListItem;
+ }
+ break;
+ case HTML_BOLD:
+ if (!parser()->context.token->emptyTag) parser()->handleStyleEnter(thisVariant,children(),DocStyleChange::Bold,tagName,&parser()->context.token->attribs);
+ break;
+ case HTML_S:
+ if (!parser()->context.token->emptyTag) parser()->handleStyleEnter(thisVariant,children(),DocStyleChange::S,tagName,&parser()->context.token->attribs);
+ break;
+ case HTML_STRIKE:
+ if (!parser()->context.token->emptyTag) parser()->handleStyleEnter(thisVariant,children(),DocStyleChange::Strike,tagName,&parser()->context.token->attribs);
+ break;
+ case HTML_DEL:
+ if (!parser()->context.token->emptyTag) parser()->handleStyleEnter(thisVariant,children(),DocStyleChange::Del,tagName,&parser()->context.token->attribs);
+ break;
+ case HTML_UNDERLINE:
+ if (!parser()->context.token->emptyTag) parser()->handleStyleEnter(thisVariant,children(),DocStyleChange::Underline,tagName,&parser()->context.token->attribs);
+ break;
+ case HTML_INS:
+ if (!parser()->context.token->emptyTag) parser()->handleStyleEnter(thisVariant,children(),DocStyleChange::Ins,tagName,&parser()->context.token->attribs);
+ break;
+ case HTML_DETAILS:
+ if (!parser()->context.token->emptyTag) parser()->handleStyleEnter(thisVariant,children(),DocStyleChange::Details,tagName,&parser()->context.token->attribs);
+ break;
+ case HTML_CODE:
+ if (parser()->context.token->emptyTag) break;
+ if (/*getLanguageFromFileName(parser()->context.fileName)==SrcLangExt_CSharp ||*/ parser()->context.xmlComment)
+ // for C# source or inside a <summary> or <remark> section we
+ // treat <code> as an XML tag (so similar to @code)
+ {
+ parser()->tokenizer.setStateXmlCode();
+ retval = handleStartCode(thisVariant);
+ }
+ else // normal HTML markup
+ {
+ parser()->handleStyleEnter(thisVariant,children(),DocStyleChange::Code,tagName,&parser()->context.token->attribs);
+ }
+ break;
+ case HTML_EMPHASIS:
+ if (!parser()->context.token->emptyTag) parser()->handleStyleEnter(thisVariant,children(),DocStyleChange::Italic,tagName,&parser()->context.token->attribs);
+ break;
+ case HTML_DIV:
+ if (!parser()->context.token->emptyTag) parser()->handleStyleEnter(thisVariant,children(),DocStyleChange::Div,tagName,&parser()->context.token->attribs);
+ break;
+ case HTML_SPAN:
+ if (!parser()->context.token->emptyTag) parser()->handleStyleEnter(thisVariant,children(),DocStyleChange::Span,tagName,&parser()->context.token->attribs);
+ break;
+ case HTML_SUB:
+ if (!parser()->context.token->emptyTag) parser()->handleStyleEnter(thisVariant,children(),DocStyleChange::Subscript,tagName,&parser()->context.token->attribs);
+ break;
+ case HTML_SUP:
+ if (!parser()->context.token->emptyTag) parser()->handleStyleEnter(thisVariant,children(),DocStyleChange::Superscript,tagName,&parser()->context.token->attribs);
+ break;
+ case HTML_CENTER:
+ if (!parser()->context.token->emptyTag) parser()->handleStyleEnter(thisVariant,children(),DocStyleChange::Center,tagName,&parser()->context.token->attribs);
+ break;
+ case HTML_SMALL:
+ if (!parser()->context.token->emptyTag) parser()->handleStyleEnter(thisVariant,children(),DocStyleChange::Small,tagName,&parser()->context.token->attribs);
+ break;
+ case HTML_CITE:
+ if (!parser()->context.token->emptyTag) parser()->handleStyleEnter(thisVariant,children(),DocStyleChange::Cite,tagName,&parser()->context.token->attribs);
+ break;
+ case HTML_PRE:
+ if (parser()->context.token->emptyTag) break;
+ parser()->handleStyleEnter(thisVariant,children(),DocStyleChange::Preformatted,tagName,&parser()->context.token->attribs);
+ setInsidePreformatted(TRUE);
+ parser()->tokenizer.setInsidePre(TRUE);
+ break;
+ case HTML_P:
+ retval=TK_NEWPARA;
+ break;
+ case HTML_DL:
+ if (!parser()->context.token->emptyTag)
+ {
+ auto vDocHtmlDescList = children().append<DocHtmlDescList>(parser(),thisVariant,tagHtmlAttribs);
+ retval=children().get_last<DocHtmlDescList>()->parse(vDocHtmlDescList);
+ }
+ break;
+ case HTML_DT:
+ retval = RetVal_DescTitle;
+ break;
+ case HTML_DD:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected tag <dd> found");
+ break;
+ case HTML_TABLE:
+ if (!parser()->context.token->emptyTag)
+ {
+ auto vDocHtmlTable = children().append<DocHtmlTable>(parser(),thisVariant,tagHtmlAttribs);
+ retval=children().get_last<DocHtmlTable>()->parse(vDocHtmlTable);
+ }
+ break;
+ case HTML_TR:
+ retval = RetVal_TableRow;
+ break;
+ case HTML_TD:
+ retval = RetVal_TableCell;
+ break;
+ case HTML_TH:
+ retval = RetVal_TableHCell;
+ break;
+ case HTML_CAPTION:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected tag <caption> found");
+ break;
+ case HTML_BR:
+ {
+ children().append<DocLineBreak>(parser(),thisVariant,tagHtmlAttribs);
+ }
+ break;
+ case HTML_HR:
+ {
+ children().append<DocHorRuler>(parser(),thisVariant,tagHtmlAttribs);
+ }
+ break;
+ case HTML_A:
+ retval = parser()->handleAHref(thisVariant,children(),tagHtmlAttribs);
+ break;
+ case HTML_H1:
+ if (!parser()->context.token->emptyTag) retval=handleHtmlHeader(thisVariant,tagHtmlAttribs,1);
+ break;
+ case HTML_H2:
+ if (!parser()->context.token->emptyTag) retval=handleHtmlHeader(thisVariant,tagHtmlAttribs,2);
+ break;
+ case HTML_H3:
+ if (!parser()->context.token->emptyTag) retval=handleHtmlHeader(thisVariant,tagHtmlAttribs,3);
+ break;
+ case HTML_H4:
+ if (!parser()->context.token->emptyTag) retval=handleHtmlHeader(thisVariant,tagHtmlAttribs,4);
+ break;
+ case HTML_H5:
+ if (!parser()->context.token->emptyTag) retval=handleHtmlHeader(thisVariant,tagHtmlAttribs,5);
+ break;
+ case HTML_H6:
+ if (!parser()->context.token->emptyTag) retval=handleHtmlHeader(thisVariant,tagHtmlAttribs,6);
+ break;
+ case HTML_IMG:
+ {
+ parser()->handleImg(thisVariant,children(),tagHtmlAttribs);
+ }
+ break;
+ case HTML_BLOCKQUOTE:
+ if (!parser()->context.token->emptyTag)
+ {
+ auto vDocHtmlBlockQuote = children().append<DocHtmlBlockQuote>(parser(),thisVariant,tagHtmlAttribs);
+ retval = children().get_last<DocHtmlBlockQuote>()->parse(vDocHtmlBlockQuote);
+ }
+ break;
+
+ case XML_SUMMARY:
+ if (insideDetails(parser()->context.styleStack))
+ {
+ if (!parser()->context.token->emptyTag) parser()->handleStyleEnter(thisVariant,children(),DocStyleChange::Summary,tagName,&parser()->context.token->attribs);
+ break;
+ }
+ case XML_REMARKS:
+ case XML_EXAMPLE:
+ parser()->context.xmlComment=TRUE;
+ // fall through
+ case XML_VALUE:
+ case XML_PARA:
+ if (!children().empty())
+ {
+ retval = TK_NEWPARA;
+ }
+ break;
+ case XML_DESCRIPTION:
+ if (insideTable(thisVariant))
+ {
+ retval=RetVal_TableCell;
+ }
+ break;
+ case XML_C:
+ parser()->handleStyleEnter(thisVariant,children(),DocStyleChange::Code,tagName,&parser()->context.token->attribs);
+ break;
+ case XML_PARAM:
+ case XML_TYPEPARAM:
+ {
+ parser()->context.xmlComment=TRUE;
+ QCString paramName;
+ if (findAttribute(tagHtmlAttribs,"name",¶mName))
+ {
+ if (paramName.isEmpty())
+ {
+ if (Config_getBool(WARN_NO_PARAMDOC))
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"empty 'name' attribute for <param%s> tag.",tagId==XML_PARAM?"":"type");
+ }
+ }
+ else
+ {
+ retval = handleParamSection(thisVariant, paramName,
+ tagId==XML_PARAM ? DocParamSect::Param : DocParamSect::TemplateParam,
+ TRUE);
+ }
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Missing 'name' attribute from <param%s> tag.",tagId==XML_PARAM?"":"type");
+ }
+ }
+ break;
+ case XML_PARAMREF:
+ case XML_TYPEPARAMREF:
+ {
+ QCString paramName;
+ if (findAttribute(tagHtmlAttribs,"name",¶mName))
+ {
+ //printf("paramName=%s\n",qPrint(paramName));
+ children().append<DocStyleChange>(parser(),thisVariant,parser()->context.nodeStack.size(),DocStyleChange::Italic,tagName,TRUE);
+ children().append<DocWord>(parser(),thisVariant,paramName);
+ children().append<DocStyleChange>(parser(),thisVariant,parser()->context.nodeStack.size(),DocStyleChange::Italic,tagName,FALSE);
+ if (retval!=TK_WORD) children().append<DocWhiteSpace>(parser(),thisVariant," ");
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Missing 'name' attribute from <param%sref> tag.",tagId==XML_PARAMREF?"":"type");
+ }
+ }
+ break;
+ case XML_EXCEPTION:
+ {
+ parser()->context.xmlComment=TRUE;
+ QCString exceptName;
+ if (findAttribute(tagHtmlAttribs,"cref",&exceptName))
+ {
+ unescapeCRef(exceptName);
+ retval = handleParamSection(thisVariant,exceptName,DocParamSect::Exception,TRUE);
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Missing 'cref' attribute from <exception> tag.");
+ }
+ }
+ break;
+ case XML_ITEM:
+ case XML_LISTHEADER:
+ if (insideTable(thisVariant))
+ {
+ retval=RetVal_TableRow;
+ }
+ else if (insideUL(thisVariant) || insideOL(thisVariant))
+ {
+ retval=RetVal_ListItem;
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"lonely <item> tag found");
+ }
+ break;
+ case XML_RETURNS:
+ parser()->context.xmlComment=TRUE;
+ retval = handleSimpleSection(thisVariant,DocSimpleSect::Return,TRUE);
+ parser()->context.hasReturnCommand=TRUE;
+ break;
+ case XML_TERM:
+ //children().push_back(std::make_unique<DocStyleChange>(this,parser()->context.nodeStack.size(),DocStyleChange::Bold,TRUE));
+ if (insideTable(thisVariant))
+ {
+ retval=RetVal_TableCell;
+ }
+ break;
+ case XML_SEE:
+ // I'm not sure if <see> is the same as <seealso> or if it
+ // should you link a member without producing a section. The
+ // C# specification is extremely vague about this (but what else
+ // can we expect from Microsoft...)
+ {
+ QCString cref;
+ //printf("XML_SEE: empty tag=%d\n",parser()->context.token->emptyTag);
+ if (findAttribute(tagHtmlAttribs,"cref",&cref))
+ {
+ unescapeCRef(cref);
+ if (parser()->context.token->emptyTag) // <see cref="..."/> style
+ {
+ bool inSeeBlock = parser()->context.inSeeBlock;
+ parser()->context.token->name = cref;
+ parser()->context.inSeeBlock = TRUE;
+ parser()->handleLinkedWord(thisVariant,children(),TRUE);
+ parser()->context.inSeeBlock = inSeeBlock;
+ }
+ else // <see cref="...">...</see> style
+ {
+ //DocRef *ref = new DocRef(this,cref);
+ //children().append(ref);
+ //ref->parse();
+ parser()->tokenizer.setStatePara();
+ auto vDocLink = children().append<DocLink>(parser(),thisVariant,cref);
+ DocLink *lnk = children().get_last<DocLink>();
+ QCString leftOver = lnk->parse(vDocLink,FALSE,TRUE);
+ if (!leftOver.isEmpty())
+ {
+ children().append<DocWord>(parser(),thisVariant,leftOver);
+ }
+ }
+ }
+ else if (findAttribute(tagHtmlAttribs,"langword",&cref)) // <see langword="..."/> or <see langword="..."></see>
+ {
+ bool inSeeBlock = parser()->context.inSeeBlock;
+ parser()->context.token->name = cref;
+ parser()->context.inSeeBlock = TRUE;
+ children().append<DocStyleChange>(parser(),thisVariant,parser()->context.nodeStack.size(),DocStyleChange::Code,tagName,TRUE);
+ parser()->handleLinkedWord(thisVariant,children(),TRUE);
+ children().append<DocStyleChange>(parser(),thisVariant,parser()->context.nodeStack.size(),DocStyleChange::Code,tagName,FALSE);
+ parser()->context.inSeeBlock = inSeeBlock;
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Missing 'cref' or 'langword' attribute from <see> tag.");
+ }
+ }
+ break;
+ case XML_SEEALSO:
+ {
+ parser()->context.xmlComment=TRUE;
+ QCString cref;
+ if (findAttribute(tagHtmlAttribs,"cref",&cref))
+ {
+ unescapeCRef(cref);
+ // Look for an existing "see" section
+ DocNodeVariant *vss=0;
+ for (auto &n : children())
+ {
+ DocSimpleSect *candidate = std::get_if<DocSimpleSect>(&n);
+ if (candidate && candidate->type()==DocSimpleSect::See)
+ {
+ vss = &n;
+ }
+ }
+
+ if (!vss) // start new section
+ {
+ vss = children().append<DocSimpleSect>(parser(),thisVariant,DocSimpleSect::See);
+ }
+
+ std::get<DocSimpleSect>(*vss).appendLinkWord(vss,cref);
+ retval = RetVal_OK;
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Missing 'cref' attribute from <seealso> tag.");
+ }
+ }
+ break;
+ case XML_LIST:
+ {
+ QCString type;
+ findAttribute(tagHtmlAttribs,"type",&type);
+ DocHtmlList::Type listType = DocHtmlList::Unordered;
+ HtmlAttribList emptyList;
+ if (type=="number")
+ {
+ listType=DocHtmlList::Ordered;
+ }
+ if (type=="table")
+ {
+ auto vDocHtmlTable = children().append<DocHtmlTable>(parser(),thisVariant,emptyList);
+ retval=children().get_last<DocHtmlTable>()->parseXml(vDocHtmlTable);
+ }
+ else
+ {
+ auto vHtmlList = children().append<DocHtmlList>(parser(),thisVariant,emptyList,listType);
+ retval=children().get_last<DocHtmlList>()->parseXml(vHtmlList);
+ }
+ }
+ break;
+ case XML_INCLUDE:
+ case XML_PERMISSION:
+ // These tags are defined in .Net but are currently unsupported
+ parser()->context.xmlComment=TRUE;
+ break;
+ case HTML_UNKNOWN:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unsupported xml/html tag <%s> found", qPrint(tagName));
+ children().append<DocWord>(parser(),thisVariant, "<"+tagName+parser()->context.token->attribsStr+">");
+ break;
+ case XML_INHERITDOC:
+ handleInheritDoc(thisVariant);
+ break;
+ default:
+ // we should not get here!
+ ASSERT(0);
+ break;
+ }
+ return retval;
+}
+
+int DocPara::handleHtmlEndTag(DocNodeVariant *thisVariant,const QCString &tagName)
+{
+ DBG(("handleHtmlEndTag(%s)\n",qPrint(tagName)));
+ int tagId = Mappers::htmlTagMapper->map(tagName);
+ int retval=RetVal_OK;
+ switch (tagId)
+ {
+ case HTML_UL:
+ if (!insideUL(thisVariant))
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"found </ul> tag without matching <ul>");
+ }
+ else
+ {
+ retval=RetVal_EndList;
+ }
+ break;
+ case HTML_OL:
+ if (!insideOL(thisVariant))
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"found </ol> tag without matching <ol>");
+ }
+ else
+ {
+ retval=RetVal_EndList;
+ }
+ break;
+ case HTML_LI:
+ if (!insideLI(thisVariant))
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"found </li> tag without matching <li>");
+ }
+ else
+ {
+ // ignore </li> tags
+ }
+ break;
+ case HTML_BLOCKQUOTE:
+ retval=RetVal_EndBlockQuote;
+ break;
+ case HTML_BOLD:
+ parser()->handleStyleLeave(thisVariant,children(),DocStyleChange::Bold,tagName);
+ break;
+ case HTML_S:
+ parser()->handleStyleLeave(thisVariant,children(),DocStyleChange::S,"s");
+ break;
+ case HTML_STRIKE:
+ parser()->handleStyleLeave(thisVariant,children(),DocStyleChange::Strike,tagName);
+ break;
+ case HTML_DEL:
+ parser()->handleStyleLeave(thisVariant,children(),DocStyleChange::Del,tagName);
+ break;
+ case HTML_UNDERLINE:
+ parser()->handleStyleLeave(thisVariant,children(),DocStyleChange::Underline,tagName);
+ break;
+ case HTML_INS:
+ parser()->handleStyleLeave(thisVariant,children(),DocStyleChange::Ins,tagName);
+ break;
+ case HTML_DETAILS:
+ parser()->handleStyleLeave(thisVariant,children(),DocStyleChange::Details,tagName);
+ break;
+ case HTML_CODE:
+ parser()->handleStyleLeave(thisVariant,children(),DocStyleChange::Code,tagName);
+ break;
+ case HTML_EMPHASIS:
+ parser()->handleStyleLeave(thisVariant,children(),DocStyleChange::Italic,tagName);
+ break;
+ case HTML_DIV:
+ parser()->handleStyleLeave(thisVariant,children(),DocStyleChange::Div,tagName);
+ break;
+ case HTML_SPAN:
+ parser()->handleStyleLeave(thisVariant,children(),DocStyleChange::Span,tagName);
+ break;
+ case HTML_SUB:
+ parser()->handleStyleLeave(thisVariant,children(),DocStyleChange::Subscript,tagName);
+ break;
+ case HTML_SUP:
+ parser()->handleStyleLeave(thisVariant,children(),DocStyleChange::Superscript,tagName);
+ break;
+ case HTML_CENTER:
+ parser()->handleStyleLeave(thisVariant,children(),DocStyleChange::Center,tagName);
+ break;
+ case HTML_SMALL:
+ parser()->handleStyleLeave(thisVariant,children(),DocStyleChange::Small,tagName);
+ break;
+ case HTML_CITE:
+ parser()->handleStyleLeave(thisVariant,children(),DocStyleChange::Cite,tagName);
+ break;
+ case HTML_PRE:
+ parser()->handleStyleLeave(thisVariant,children(),DocStyleChange::Preformatted,tagName);
+ setInsidePreformatted(FALSE);
+ parser()->tokenizer.setInsidePre(FALSE);
+ break;
+ case HTML_P:
+ retval=TK_NEWPARA;
+ break;
+ case HTML_DL:
+ retval=RetVal_EndDesc;
+ break;
+ case HTML_DT:
+ // ignore </dt> tag
+ break;
+ case HTML_DD:
+ // ignore </dd> tag
+ break;
+ case HTML_TABLE:
+ retval=RetVal_EndTable;
+ break;
+ case HTML_TR:
+ // ignore </tr> tag
+ break;
+ case HTML_TD:
+ // ignore </td> tag
+ break;
+ case HTML_TH:
+ // ignore </th> tag
+ break;
+ case HTML_CAPTION:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected tag </caption> found");
+ break;
+ case HTML_BR:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Illegal </br> tag found\n");
+ break;
+ case HTML_H1:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected tag </h1> found");
+ break;
+ case HTML_H2:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected tag </h2> found");
+ break;
+ case HTML_H3:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected tag </h3> found");
+ break;
+ case HTML_H4:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected tag </h4> found");
+ break;
+ case HTML_H5:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected tag </h5> found");
+ break;
+ case HTML_H6:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected tag </h6> found");
+ break;
+ case HTML_IMG:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected tag </img> found");
+ break;
+ case HTML_HR:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Illegal </hr> tag found\n");
+ break;
+ case HTML_A:
+ //warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected tag </a> found");
+ // ignore </a> tag (can be part of <a name=...></a>
+ break;
+
+ case XML_TERM:
+ //children().push_back(std::make_unique<DocStyleChange>(this,parser()->context.nodeStack.size(),DocStyleChange::Bold,FALSE));
+ break;
+ case XML_SUMMARY:
+ if (insideDetails(parser()->context.styleStack))
+ {
+ parser()->handleStyleLeave(thisVariant,children(),DocStyleChange::Summary,tagName);
+ break;
+ }
+ case XML_REMARKS:
+ case XML_PARA:
+ case XML_VALUE:
+ case XML_EXAMPLE:
+ case XML_PARAM:
+ case XML_LIST:
+ case XML_TYPEPARAM:
+ case XML_RETURNS:
+ case XML_SEE:
+ case XML_SEEALSO:
+ case XML_EXCEPTION:
+ case XML_INHERITDOC:
+ retval = RetVal_CloseXml;
+ break;
+ case XML_C:
+ parser()->handleStyleLeave(thisVariant,children(),DocStyleChange::Code,tagName);
+ break;
+ case XML_ITEM:
+ case XML_LISTHEADER:
+ case XML_INCLUDE:
+ case XML_PERMISSION:
+ case XML_DESCRIPTION:
+ case XML_PARAMREF:
+ case XML_TYPEPARAMREF:
+ // These tags are defined in .Net but are currently unsupported
+ break;
+ case HTML_UNKNOWN:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unsupported xml/html tag </%s> found", qPrint(tagName));
+ children().append<DocWord>(parser(),thisVariant,"</"+tagName+">");
+ break;
+ default:
+ // we should not get here!
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected end tag %s\n",qPrint(tagName));
+ ASSERT(0);
+ break;
+ }
+ return retval;
+}
+
+int DocPara::parse(DocNodeVariant *thisVariant)
+{
+ DBG(("DocPara::parse() start\n"));
+ auto ns = AutoNodeStack(parser(),thisVariant);
+ // handle style commands "inherited" from the previous paragraph
+ parser()->handleInitialStyleCommands(thisVariant,children());
+ int tok;
+ int retval=0;
+ while ((tok=parser()->tokenizer.lex())) // get the next token
+ {
+reparsetoken:
+ DBG(("token %s at %d",DocTokenizer::tokToString(tok),parser()->tokenizer.getLineNr()));
+ if (tok==TK_WORD || tok==TK_LNKWORD || tok==TK_SYMBOL || tok==TK_URL ||
+ tok==TK_COMMAND_AT || tok == TK_COMMAND_BS || tok==TK_HTMLTAG
+ )
+ {
+ DBG((" name=%s",qPrint(parser()->context.token->name)));
+ }
+ DBG(("\n"));
+ switch(tok)
+ {
+ case TK_WORD:
+ children().append<DocWord>(parser(),thisVariant,parser()->context.token->name);
+ break;
+ case TK_LNKWORD:
+ parser()->handleLinkedWord(thisVariant,children());
+ break;
+ case TK_URL:
+ children().append<DocURL>(parser(),thisVariant,parser()->context.token->name,parser()->context.token->isEMailAddr);
+ break;
+ case TK_WHITESPACE:
+ {
+ // prevent leading whitespace and collapse multiple whitespace areas
+ if (insidePRE(thisVariant) || // all whitespace is relevant
+ (
+ // remove leading whitespace
+ !children().empty() &&
+ // and whitespace after certain constructs
+ !holds_one_of_alternatives<DocHtmlDescList, DocHtmlTable, DocHtmlList, DocSimpleSect,
+ DocAutoList, DocSimpleList, DocHtmlHeader, DocHtmlBlockQuote,
+ DocParamSect, DocXRefItem>(children().back())
+ )
+ )
+ {
+ children().append<DocWhiteSpace>(parser(),thisVariant,parser()->context.token->chars);
+ }
+ }
+ break;
+ case TK_LISTITEM:
+ {
+ DBG(("found list item at %d\n",parser()->context.token->indent));
+ const DocNodeVariant *n=parent();
+ while (n && !std::holds_alternative<DocAutoList>(*n)) n=::parent(n);
+ const DocAutoList *al = std::get_if<DocAutoList>(n);
+ if (al) // we found an auto list up in the hierarchy
+ {
+ DBG(("previous list item at %d\n",al->indent()));
+ if (al->indent()>=parser()->context.token->indent)
+ // new item at the same or lower indent level
+ {
+ retval=TK_LISTITEM;
+ goto endparagraph;
+ }
+ }
+
+ // determine list depth
+ int depth = 0;
+ n=parent();
+ while (n)
+ {
+ al = std::get_if<DocAutoList>(n);
+ if (al && al->isEnumList()) depth++;
+ n=::parent(n);
+ }
+
+ // first item or sub list => create new list
+ do
+ {
+ auto vDocAutoList = children().append<DocAutoList>(parser(),thisVariant,
+ parser()->context.token->indent,
+ parser()->context.token->isEnumList,depth);
+ al = children().get_last<DocAutoList>();
+ retval = children().get_last<DocAutoList>()->parse(vDocAutoList);
+ } while (retval==TK_LISTITEM && // new list
+ al->indent()==parser()->context.token->indent // at same indent level
+ );
+
+ // check the return value
+ if (retval==RetVal_SimpleSec) // auto list ended due to simple section command
+ {
+ // Reparse the token that ended the section at this level,
+ // so a new simple section will be started at this level.
+ // This is the same as unputting the last read token and continuing.
+ parser()->context.token->name = parser()->context.token->simpleSectName;
+ if (parser()->context.token->name.left(4)=="rcs:") // RCS section
+ {
+ parser()->context.token->name = parser()->context.token->name.mid(4);
+ parser()->context.token->text = parser()->context.token->simpleSectText;
+ tok = TK_RCSTAG;
+ }
+ else // other section
+ {
+ tok = TK_COMMAND_BS;
+ }
+ DBG(("reparsing command %s\n",qPrint(parser()->context.token->name)));
+ goto reparsetoken;
+ }
+ else if (retval==TK_ENDLIST)
+ {
+ if (al->indent()>parser()->context.token->indent) // end list
+ {
+ goto endparagraph;
+ }
+ else // continue with current paragraph
+ {
+ }
+ }
+ else // paragraph ended due to TK_NEWPARA, TK_LISTITEM, or EOF
+ {
+ goto endparagraph;
+ }
+ }
+ break;
+ case TK_ENDLIST:
+ DBG(("Found end of list inside of paragraph at line %d\n",parser()->tokenizer.getLineNr()));
+ if (std::get_if<DocAutoListItem>(parent()))
+ {
+ const DocAutoList *al = std::get_if<DocAutoList>(::parent(parent()));
+ if (al && al->indent()>=parser()->context.token->indent)
+ {
+ // end of list marker ends this paragraph
+ retval=TK_ENDLIST;
+ goto endparagraph;
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"End of list marker found "
+ "has invalid indent level");
+ }
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"End of list marker found without any preceding "
+ "list items");
+ }
+ break;
+ case TK_COMMAND_AT:
+ // fall through
+ case TK_COMMAND_BS:
+ {
+ // see if we have to start a simple section
+ int cmd = Mappers::cmdMapper->map(parser()->context.token->name);
+ const DocNodeVariant *n=parent();
+ while (n && !std::holds_alternative<DocSimpleSect>(*n) &&
+ !std::holds_alternative<DocParamSect>(*n))
+ {
+ n=::parent(n);
+ }
+ if (cmd&SIMPLESECT_BIT)
+ {
+ if (n) // already in a simple section
+ {
+ // simple section cannot start in this paragraph, need
+ // to unwind the stack and remember the command.
+ parser()->context.token->simpleSectName = parser()->context.token->name;
+ retval=RetVal_SimpleSec;
+ goto endparagraph;
+ }
+ }
+ // see if we are in a simple list
+ n=parent();
+ while (n && !std::holds_alternative<DocSimpleListItem>(*n)) n=::parent(n);
+ if (n)
+ {
+ if (cmd==CMD_LI)
+ {
+ retval=RetVal_ListItem;
+ goto endparagraph;
+ }
+ }
+
+ // handle the command
+ retval=handleCommand(thisVariant,parser()->context.token->name,tok);
+ DBG(("handleCommand returns %s\n",DocTokenizer::retvalToString(retval)));
+
+ // check the return value
+ if (retval==RetVal_SimpleSec)
+ {
+ // Reparse the token that ended the section at this level,
+ // so a new simple section will be started at this level.
+ // This is the same as unputting the last read token and continuing.
+ parser()->context.token->name = parser()->context.token->simpleSectName;
+ if (parser()->context.token->name.left(4)=="rcs:") // RCS section
+ {
+ parser()->context.token->name = parser()->context.token->name.mid(4);
+ parser()->context.token->text = parser()->context.token->simpleSectText;
+ tok = TK_RCSTAG;
+ }
+ else // other section
+ {
+ tok = TK_COMMAND_BS;
+ }
+ DBG(("reparsing command %s\n",qPrint(parser()->context.token->name)));
+ goto reparsetoken;
+ }
+ else if (retval>0 && retval<RetVal_OK)
+ {
+ // the command ended with a new command, reparse this token
+ tok = retval;
+ goto reparsetoken;
+ }
+ else if (retval != RetVal_OK) // end of file, end of paragraph, start or end of section
+ // or some auto list marker
+ {
+ goto endparagraph;
+ }
+ }
+ break;
+ case TK_HTMLTAG:
+ {
+ if (!parser()->context.token->endTag) // found a start tag
+ {
+ retval = handleHtmlStartTag(thisVariant,parser()->context.token->name,parser()->context.token->attribs);
+ }
+ else // found an end tag
+ {
+ retval = handleHtmlEndTag(thisVariant,parser()->context.token->name);
+ }
+ if (retval!=RetVal_OK)
+ {
+ goto endparagraph;
+ }
+ }
+ break;
+ case TK_SYMBOL:
+ {
+ HtmlEntityMapper::SymType s = DocSymbol::decodeSymbol(parser()->context.token->name);
+ if (s!=HtmlEntityMapper::Sym_Unknown)
+ {
+ children().append<DocSymbol>(parser(),thisVariant,s);
+ }
+ else
+ {
+ children().append<DocWord>(parser(),thisVariant,parser()->context.token->name);
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unsupported symbol %s found",
+ qPrint(parser()->context.token->name));
+ }
+ break;
+ }
+ case TK_NEWPARA:
+ retval=TK_NEWPARA;
+ goto endparagraph;
+ case TK_RCSTAG:
+ {
+ const DocNodeVariant *n=parent();
+ while (n && !std::holds_alternative<DocSimpleSect>(*n) &&
+ !std::holds_alternative<DocParamSect>(*n))
+ {
+ n=::parent(n);
+ }
+ if (n) // already in a simple section
+ {
+ // simple section cannot start in this paragraph, need
+ // to unwind the stack and remember the command.
+ parser()->context.token->simpleSectName = "rcs:"+parser()->context.token->name;
+ parser()->context.token->simpleSectText = parser()->context.token->text;
+ retval=RetVal_SimpleSec;
+ goto endparagraph;
+ }
+
+ // see if we are in a simple list
+ auto vDocSimpleSect = children().append<DocSimpleSect>(parser(),thisVariant,DocSimpleSect::Rcs);
+ children().get_last<DocSimpleSect>()->parseRcs(vDocSimpleSect);
+ }
+ break;
+ default:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),
+ "Found unexpected token (id=%s)\n",DocTokenizer::tokToString(tok));
+ break;
+ }
+ }
+ retval=0;
+endparagraph:
+ parser()->handlePendingStyleCommands(thisVariant,children());
+ DBG(("DocPara::parse() end retval=%s\n",DocTokenizer::retvalToString(retval)));
+ DocPara *par = std::get_if<DocPara>(parser()->context.nodeStack.top());
+ if (!parser()->context.token->endTag && par &&
+ retval==TK_NEWPARA && parser()->context.token->name.lower() == "p")
+ {
+ par->setAttribs(parser()->context.token->attribs);
+ }
+ INTERNAL_ASSERT(retval==0 || retval==TK_NEWPARA || retval==TK_LISTITEM ||
+ retval==TK_ENDLIST || retval>RetVal_OK
+ );
+
+ return retval;
+}
+
+//--------------------------------------------------------------------------
+
+int DocSection::parse(DocNodeVariant *thisVariant)
+{
+ DBG(("DocSection::parse() start %s level=%d\n",qPrint(parser()->context.token->sectionId),m_level));
+ int retval=RetVal_OK;
+ auto ns = AutoNodeStack(parser(),thisVariant);
+
+ if (!m_id.isEmpty())
+ {
+ const SectionInfo *sec = SectionManager::instance().find(m_id);
+ if (sec)
+ {
+ m_file = sec->fileName();
+ m_anchor = sec->label();
+ m_title = sec->title();
+ if (m_title.isEmpty()) m_title = sec->label();
+ }
+ }
+
+ // first parse any number of paragraphs
+ bool isFirst=TRUE;
+ DocPara *lastPar=0;
+ do
+ {
+ auto vDocPara = children().append<DocPara>(parser(),thisVariant);
+ DocPara *par = children().get_last<DocPara>();
+ if (isFirst) { par->markFirst(); isFirst=FALSE; }
+ retval=par->parse(vDocPara);
+ if (!par->isEmpty())
+ {
+ if (lastPar) lastPar->markLast(FALSE);
+ lastPar = par;
+ }
+ else
+ {
+ children().pop_back();
+ }
+ if (retval==TK_LISTITEM)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Invalid list item found");
+ }
+ if (retval==RetVal_Internal)
+ {
+ auto vDocInternal = children().append<DocInternal>(parser(),thisVariant);
+ retval = children().get_last<DocInternal>()->parse(vDocInternal,m_level+1);
+ if (retval==RetVal_EndInternal)
+ {
+ retval=RetVal_OK;
+ }
+ }
+ } while (retval!=0 &&
+ retval!=RetVal_Section &&
+ retval!=RetVal_Subsection &&
+ retval!=RetVal_Subsubsection &&
+ retval!=RetVal_Paragraph &&
+ retval!=RetVal_EndInternal
+ );
+
+ if (lastPar) lastPar->markLast();
+
+ //printf("m_level=%d <-> %d\n",m_level,Doxygen::subpageNestingLevel);
+
+ while (true)
+ {
+ if (retval==RetVal_Subsection && m_level<=Doxygen::subpageNestingLevel+1)
+ {
+ // then parse any number of nested sections
+ while (retval==RetVal_Subsection) // more sections follow
+ {
+ auto vDocSection = children().append<DocSection>(parser(),thisVariant,
+ std::min(2+Doxygen::subpageNestingLevel,5),
+ parser()->context.token->sectionId);
+ retval = children().get_last<DocSection>()->parse(vDocSection);
+ }
+ break;
+ }
+ else if (retval==RetVal_Subsubsection && m_level<=Doxygen::subpageNestingLevel+2)
+ {
+ if ((m_level<=1+Doxygen::subpageNestingLevel) && !parser()->context.token->sectionId.startsWith("autotoc_md"))
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected subsubsection command found inside %s!",g_sectionLevelToName[m_level]);
+ // then parse any number of nested sections
+ while (retval==RetVal_Subsubsection) // more sections follow
+ {
+ auto vDocSection = children().append<DocSection>(parser(),thisVariant,
+ std::min(3+Doxygen::subpageNestingLevel,5),
+ parser()->context.token->sectionId);
+ retval = children().get_last<DocSection>()->parse(vDocSection);
+ }
+ if (!(m_level<Doxygen::subpageNestingLevel+2 && retval == RetVal_Subsection)) break;
+ }
+ else if (retval==RetVal_Paragraph && m_level<=std::min(5,Doxygen::subpageNestingLevel+3))
+ {
+ if ((m_level<=2+Doxygen::subpageNestingLevel) && !parser()->context.token->sectionId.startsWith("autotoc_md"))
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected paragraph command found inside %s!",g_sectionLevelToName[m_level]);
+ // then parse any number of nested sections
+ while (retval==RetVal_Paragraph) // more sections follow
+ {
+ auto vDocSection = children().append<DocSection>(parser(),thisVariant,
+ std::min(4+Doxygen::subpageNestingLevel,5),
+ parser()->context.token->sectionId);
+ retval = children().get_last<DocSection>()->parse(vDocSection);
+ }
+ if (!(m_level<Doxygen::subpageNestingLevel+3 && (retval == RetVal_Subsection || retval == RetVal_Subsubsection))) break;
+ }
+ else
+ {
+ break;
+ }
+ }
+
+ INTERNAL_ASSERT(retval==0 ||
+ retval==RetVal_Section ||
+ retval==RetVal_Subsection ||
+ retval==RetVal_Subsubsection ||
+ retval==RetVal_Paragraph ||
+ retval==RetVal_Internal ||
+ retval==RetVal_EndInternal
+ );
+
+ DBG(("DocSection::parse() end: retval=%s\n",DocTokenizer::retvalToString(retval)));
+ return retval;
+}
+
+//--------------------------------------------------------------------------
+
+void DocText::parse(DocNodeVariant *thisVariant)
+{
+ DBG(("DocText::parse() start\n"));
+ auto ns = AutoNodeStack(parser(),thisVariant);
+ parser()->tokenizer.setStateText();
+
+ int tok;
+ while ((tok=parser()->tokenizer.lex())) // get the next token
+ {
+ switch(tok)
+ {
+ case TK_WORD:
+ children().append<DocWord>(parser(),thisVariant,parser()->context.token->name);
+ break;
+ case TK_WHITESPACE:
+ children().append<DocWhiteSpace>(parser(),thisVariant,parser()->context.token->chars);
+ break;
+ case TK_SYMBOL:
+ {
+ HtmlEntityMapper::SymType s = DocSymbol::decodeSymbol(parser()->context.token->name);
+ if (s!=HtmlEntityMapper::Sym_Unknown)
+ {
+ children().append<DocSymbol>(parser(),thisVariant,s);
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unsupported symbol %s found",
+ qPrint(parser()->context.token->name));
+ }
+ }
+ break;
+ case TK_COMMAND_AT:
+ // fall through
+ case TK_COMMAND_BS:
+ switch (Mappers::cmdMapper->map(parser()->context.token->name))
+ {
+ case CMD_BSLASH:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_BSlash);
+ break;
+ case CMD_AT:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_At);
+ break;
+ case CMD_LESS:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Less);
+ break;
+ case CMD_GREATER:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Greater);
+ break;
+ case CMD_AMP:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Amp);
+ break;
+ case CMD_DOLLAR:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Dollar);
+ break;
+ case CMD_HASH:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Hash);
+ break;
+ case CMD_DCOLON:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_DoubleColon);
+ break;
+ case CMD_PERCENT:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Percent);
+ break;
+ case CMD_NDASH:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Minus);
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Minus);
+ break;
+ case CMD_MDASH:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Minus);
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Minus);
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Minus);
+ break;
+ case CMD_QUOTE:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Quot);
+ break;
+ case CMD_PUNT:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Dot);
+ break;
+ case CMD_PLUS:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Plus);
+ break;
+ case CMD_MINUS:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Minus);
+ break;
+ case CMD_EQUAL:
+ children().append<DocSymbol>(parser(),thisVariant,HtmlEntityMapper::Sym_Equal);
+ break;
+ default:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected command '%s' found",
+ qPrint(parser()->context.token->name));
+ break;
+ }
+ break;
+ default:
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected token %s",
+ DocTokenizer::tokToString(tok));
+ break;
+ }
+ }
+
+ parser()->handleUnclosedStyleCommands();
+
+ DBG(("DocText::parse() end\n"));
+}
+
+
+//--------------------------------------------------------------------------
+
+void DocRoot::parse(DocNodeVariant *thisVariant)
+{
+ DBG(("DocRoot::parse() start\n"));
+ auto ns = AutoNodeStack(parser(),thisVariant);
+ parser()->tokenizer.setStatePara();
+ int retval=0;
+
+ // first parse any number of paragraphs
+ bool isFirst=TRUE;
+ DocPara *lastPar=0;
+ do
+ {
+ {
+ auto vDocPara = children().append<DocPara>(parser(),thisVariant);
+ DocPara *par = children().get_last<DocPara>();
+ if (isFirst) { par->markFirst(); isFirst=FALSE; }
+ retval=par->parse(vDocPara);
+ if (par->isEmpty() && par->attribs().empty())
+ {
+ children().pop_back();
+ }
+ else
+ {
+ lastPar = par;
+ }
+ }
+ if (retval==RetVal_Paragraph)
+ {
+ if (!parser()->context.token->sectionId.startsWith("autotoc_md"))
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"found paragraph command (id: '%s') outside of subsubsection context!",qPrint(parser()->context.token->sectionId));
+ }
+ while (retval==RetVal_Paragraph)
+ {
+ if (!parser()->context.token->sectionId.isEmpty())
+ {
+ const SectionInfo *sec=SectionManager::instance().find(parser()->context.token->sectionId);
+ if (sec)
+ {
+ auto vDocSection = children().append<DocSection>(parser(),thisVariant,
+ std::min(4+Doxygen::subpageNestingLevel,5),
+ parser()->context.token->sectionId);
+ retval = children().get_last<DocSection>()->parse(vDocSection);
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Invalid paragraph id '%s'; ignoring paragraph",qPrint(parser()->context.token->sectionId));
+ retval = 0;
+ }
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Missing id for paragraph; ignoring paragraph");
+ retval = 0;
+ }
+ }
+ }
+ if (retval==RetVal_Subsubsection)
+ {
+ if (!(parser()->context.token->sectionId.startsWith("autotoc_md")))
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"found subsubsection command (id: '%s') outside of subsection context!",qPrint(parser()->context.token->sectionId));
+ while (retval==RetVal_Subsubsection)
+ {
+ if (!parser()->context.token->sectionId.isEmpty())
+ {
+ const SectionInfo *sec=SectionManager::instance().find(parser()->context.token->sectionId);
+ if (sec)
+ {
+ auto vDocSection = children().append<DocSection>(parser(),thisVariant,
+ std::min(3+Doxygen::subpageNestingLevel,5),
+ parser()->context.token->sectionId);
+ retval = children().get_last<DocSection>()->parse(vDocSection);
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Invalid subsubsection id '%s'; ignoring subsubsection",qPrint(parser()->context.token->sectionId));
+ retval = 0;
+ }
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Missing id for subsubsection; ignoring subsubsection");
+ retval = 0;
+ }
+ }
+ }
+ if (retval==RetVal_Subsection)
+ {
+ if (!parser()->context.token->sectionId.startsWith("autotoc_md"))
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"found subsection command (id: '%s') outside of section context!",qPrint(parser()->context.token->sectionId));
+ }
+ while (retval==RetVal_Subsection)
+ {
+ if (!parser()->context.token->sectionId.isEmpty())
+ {
+ const SectionInfo *sec=SectionManager::instance().find(parser()->context.token->sectionId);
+ if (sec)
+ {
+ auto vDocSection = children().append<DocSection>(parser(),thisVariant,
+ std::min(2+Doxygen::subpageNestingLevel,5),
+ parser()->context.token->sectionId);
+ retval = children().get_last<DocSection>()->parse(vDocSection);
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Invalid subsection id '%s'; ignoring subsection",qPrint(parser()->context.token->sectionId));
+ retval = 0;
+ }
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Missing id for subsection; ignoring subsection");
+ retval = 0;
+ }
+ }
+ }
+ if (retval==TK_LISTITEM)
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Invalid list item found");
+ }
+ if (retval==RetVal_Internal)
+ {
+ auto vDocInternal = children().append<DocInternal>(parser(),thisVariant);
+ retval = children().get_last<DocInternal>()->parse(vDocInternal,1);
+ }
+ } while (retval!=0 && retval!=RetVal_Section);
+ if (lastPar) lastPar->markLast();
+
+ //printf("DocRoot::parse() retval=%d %d\n",retval,RetVal_Section);
+ // then parse any number of level1 sections
+ while (retval==RetVal_Section)
+ {
+ if (!parser()->context.token->sectionId.isEmpty())
+ {
+ const SectionInfo *sec=SectionManager::instance().find(parser()->context.token->sectionId);
+ if (sec)
+ {
+ auto vDocSection = children().append<DocSection>(parser(),thisVariant,
+ std::min(1+Doxygen::subpageNestingLevel,5),
+ parser()->context.token->sectionId);
+ retval = children().get_last<DocSection>()->parse(vDocSection);
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Invalid section id '%s'; ignoring section",qPrint(parser()->context.token->sectionId));
+ retval = 0;
+ }
+ }
+ else
+ {
+ warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Missing id for section; ignoring section");
+ retval = 0;
+ }
+ }
+
+ parser()->handleUnclosedStyleCommands();
+
+ DBG(("DocRoot::parse() end\n"));
+}
+
+static QCString extractCopyDocId(const char *data, uint &j, uint len)
+{
+ uint s=j;
+ int round=0;
+ bool insideDQuote=FALSE;
+ bool insideSQuote=FALSE;
+ bool found=FALSE;
+ while (j<len && !found)
+ {
+ if (!insideSQuote && !insideDQuote)
+ {
+ switch (data[j])
+ {
+ case '(': round++; break;
+ case ')': round--; break;
+ case '"': insideDQuote=TRUE; break;
+ case '\'': insideSQuote=TRUE; break;
+ case ' ': // fall through
+ case '\t': // fall through
+ case '\n':
+ found=(round==0);
+ break;
+ }
+ }
+ else if (insideSQuote) // look for single quote end
+ {
+ if (data[j]=='\'' && (j==0 || data[j]!='\\'))
+ {
+ insideSQuote=FALSE;
+ }
+ }
+ else if (insideDQuote) // look for double quote end
+ {
+ if (data[j]=='"' && (j==0 || data[j]!='\\'))
+ {
+ insideDQuote=FALSE;
+ }
+ }
+ if (!found) j++;
+ }
+ if (qstrncmp(data+j," const",6)==0)
+ {
+ j+=6;
+ }
+ else if (qstrncmp(data+j," volatile",9)==0)
+ {
+ j+=9;
+ }
+ uint e=j;
+ if (j>0 && data[j-1]=='.') { e--; } // do not include punctuation added by Definition::_setBriefDescription()
+ QCString id(data+s,e-s);
+ //printf("extractCopyDocId='%s' input='%s'\n",qPrint(id),&data[s]);
+ return id;
+}
+
+// macro to check if the input starts with a specific command.
+// note that data[i] should point to the start of the command (\ or @ character)
+// and the sizeof(str) returns the size of str including the '\0' terminator;
+// a fact we abuse to skip over the start of the command character.
+#define CHECK_FOR_COMMAND(str,action) \
+ do if ((i+sizeof(str)<len) && qstrncmp(data+i+1,str,sizeof(str)-1)==0) \
+ { j=i+sizeof(str); action; } while(0)
+
+static uint isCopyBriefOrDetailsCmd(const char *data, uint i,uint len,bool &brief)
+{
+ uint j=0;
+ if (i==0 || (data[i-1]!='@' && data[i-1]!='\\')) // not an escaped command
+ {
+ CHECK_FOR_COMMAND("copybrief",brief=TRUE); // @copybrief or \copybrief
+ CHECK_FOR_COMMAND("copydetails",brief=FALSE); // @copydetails or \copydetails
+ }
+ return j;
+}
+
+static uint isVerbatimSection(const char *data,uint i,uint len,QCString &endMarker)
+{
+ uint j=0;
+ if (i==0 || (data[i-1]!='@' && data[i-1]!='\\')) // not an escaped command
+ {
+ CHECK_FOR_COMMAND("dot",endMarker="enddot");
+ CHECK_FOR_COMMAND("code",endMarker="endcode");
+ CHECK_FOR_COMMAND("msc",endMarker="endmsc");
+ CHECK_FOR_COMMAND("verbatim",endMarker="endverbatim");
+ CHECK_FOR_COMMAND("iliteral",endMarker="endiliteral");
+ CHECK_FOR_COMMAND("latexonly",endMarker="endlatexonly");
+ CHECK_FOR_COMMAND("htmlonly",endMarker="endhtmlonly");
+ CHECK_FOR_COMMAND("xmlonly",endMarker="endxmlonly");
+ CHECK_FOR_COMMAND("rtfonly",endMarker="endrtfonly");
+ CHECK_FOR_COMMAND("manonly",endMarker="endmanonly");
+ CHECK_FOR_COMMAND("docbookonly",endMarker="enddocbookonly");
+ CHECK_FOR_COMMAND("startuml",endMarker="enduml");
+ }
+ //printf("isVerbatimSection(%s)=%d)\n",qPrint(QCString(&data[i]).left(10)),j);
+ return j;
+}
+
+static uint skipToEndMarker(const char *data,uint i,uint len,const QCString &endMarker)
+{
+ while (i<len)
+ {
+ if ((data[i]=='@' || data[i]=='\\') && // start of command character
+ (i==0 || (data[i-1]!='@' && data[i-1]!='\\'))) // that is not escaped
+ {
+ if (i+endMarker.length()+1<=len && qstrncmp(data+i+1,endMarker.data(),endMarker.length())==0)
+ {
+ return i+endMarker.length()+1;
+ }
+ }
+ i++;
+ }
+ // oops no endmarker found...
+ return i<len ? i+1 : len;
+}
+
+QCString DocParser::processCopyDoc(const char *data,uint &len)
+{
+ //printf("processCopyDoc start '%s'\n",data);
+ GrowBuf buf;
+ uint i=0;
+ while (i<len)
+ {
+ char c = data[i];
+ if (c=='@' || c=='\\') // look for a command
+ {
+ bool isBrief=TRUE;
+ uint j=isCopyBriefOrDetailsCmd(data,i,len,isBrief);
+ if (j>0)
+ {
+ // skip whitespace
+ while (j<len && (data[j]==' ' || data[j]=='\t')) j++;
+ // extract the argument
+ QCString id = extractCopyDocId(data,j,len);
+ const Definition *def = 0;
+ QCString doc,brief;
+ //printf("resolving docs='%s'\n",qPrint(id));
+ if (findDocsForMemberOrCompound(id,&doc,&brief,&def))
+ {
+ //printf("found it def=%p brief='%s' doc='%s' isBrief=%d\n",def,qPrint(brief),qPrint(doc),isBrief);
+ auto it = std::find(context.copyStack.begin(),context.copyStack.end(),def);
+ if (it==context.copyStack.end()) // definition not parsed earlier
+ {
+ context.copyStack.push_back(def);
+ if (isBrief)
+ {
+ uint l=static_cast<uint>(brief.length());
+ buf.addStr(processCopyDoc(brief.data(),l));
+ }
+ else
+ {
+ uint l=static_cast<uint>(doc.length());
+ buf.addStr(processCopyDoc(doc.data(),l));
+ }
+ context.copyStack.pop_back();
+ }
+ else
+ {
+ warn_doc_error(context.fileName,tokenizer.getLineNr(),
+ "Found recursive @copy%s or @copydoc relation for argument '%s'.\n",
+ isBrief?"brief":"details",qPrint(id));
+ }
+ }
+ else
+ {
+ warn_doc_error(context.fileName,tokenizer.getLineNr(),
+ "@copy%s or @copydoc target '%s' not found", isBrief?"brief":"details",
+ qPrint(id));
+ }
+ // skip over command
+ i=j;
+ }
+ else
+ {
+ QCString endMarker;
+ uint k = isVerbatimSection(data,i,len,endMarker);
+ if (k>0)
+ {
+ uint orgPos = i;
+ i=skipToEndMarker(data,k,len,endMarker);
+ buf.addStr(data+orgPos,i-orgPos);
+ }
+ else
+ {
+ buf.addChar(c);
+ i++;
+ }
+ }
+ }
+ else // not a command, just copy
+ {
+ buf.addChar(c);
+ i++;
+ }
+ }
+ len = static_cast<uint>(buf.getPos());
+ buf.addChar(0);
+ return buf.get();
+}
+
--- /dev/null
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2022 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
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#ifndef DOCNODE_H
+#define DOCNODE_H
+
+#include <stdio.h>
+#include <vector>
+#include <memory>
+#include <variant>
+
+#include "qcstring.h"
+#include "docvisitor.h"
+#include "docparser.h"
+#include "htmlattrib.h"
+#include "htmlentity.h"
+#include "growvector.h"
+
+class MemberDef;
+class Definition;
+class DocParser;
+
+//---------------------------------------------------------------------------
+
+#define DOC_NODES \
+/* 0 */ DN(DocWord) DN_SEP DN(DocLinkedWord) DN_SEP DN(DocURL) DN_SEP DN(DocLineBreak) DN_SEP DN(DocHorRuler) DN_SEP \
+/* 5 */ DN(DocAnchor) DN_SEP DN(DocCite) DN_SEP DN(DocStyleChange) DN_SEP DN(DocSymbol) DN_SEP DN(DocEmoji) DN_SEP \
+/* 10 */ DN(DocWhiteSpace) DN_SEP DN(DocSeparator) DN_SEP DN(DocVerbatim) DN_SEP DN(DocInclude) DN_SEP DN(DocIncOperator) DN_SEP \
+/* 15 */ DN(DocFormula) DN_SEP DN(DocIndexEntry) DN_SEP DN(DocAutoList) DN_SEP DN(DocAutoListItem) DN_SEP DN(DocTitle) DN_SEP \
+/* 20 */ DN(DocXRefItem) DN_SEP DN(DocImage) DN_SEP DN(DocDotFile) DN_SEP DN(DocMscFile) DN_SEP DN(DocDiaFile) DN_SEP \
+/* 25 */ DN(DocVhdlFlow) DN_SEP DN(DocLink) DN_SEP DN(DocRef) DN_SEP DN(DocInternalRef) DN_SEP DN(DocHRef) DN_SEP \
+/* 30 */ DN(DocHtmlHeader) DN_SEP DN(DocHtmlDescTitle) DN_SEP DN(DocHtmlDescList) DN_SEP DN(DocSection) DN_SEP DN(DocSecRefItem) DN_SEP \
+/* 35 */ DN(DocSecRefList) DN_SEP DN(DocInternal) DN_SEP DN(DocParBlock) DN_SEP DN(DocSimpleList) DN_SEP DN(DocHtmlList) DN_SEP \
+/* 40 */ DN(DocSimpleSect) DN_SEP DN(DocSimpleSectSep) DN_SEP DN(DocParamSect) DN_SEP DN(DocPara) DN_SEP DN(DocParamList) DN_SEP \
+/* 45 */ DN(DocSimpleListItem) DN_SEP DN(DocHtmlListItem) DN_SEP DN(DocHtmlDescData) DN_SEP DN(DocHtmlCell) DN_SEP DN(DocHtmlCaption) DN_SEP \
+/* 50 */ DN(DocHtmlRow) DN_SEP DN(DocHtmlTable) DN_SEP DN(DocHtmlBlockQuote) DN_SEP DN(DocText) DN_SEP DN(DocRoot) \
+
+// forward declarations
+#define DN(x) class x;
+#define DN_SEP
+DOC_NODES
+#undef DN
+#undef DN_SEP
+
+// define a variant type
+using DocNodeVariant = std::variant<
+#define DN(x) x
+#define DN_SEP ,
+DOC_NODES
+#undef DN
+#undef DN_SEP
+>;
+
+// getter functions to return the name of a doc node type
+#define DN(x) constexpr const char *docNodeName(const x &n) { return #x; }
+#define DN_SEP
+DOC_NODES
+#undef DN
+#undef DN_SEP
+
+/** Abstract node interface with type information. */
+class DocNode
+{
+ public:
+ /*! Creates a new node */
+ DocNode(DocParser *parser,DocNodeVariant *parent) : m_parser(parser), m_parent(parent) {}
+
+ // allow nodes to be moved but not copied
+ DocNode(const DocNode &) = delete;
+ DocNode &operator=(const DocNode &) = delete;
+ DocNode(DocNode &&) = default;
+ DocNode &operator=(DocNode &&) = default;
+ ~DocNode() = default;
+
+ /*! Returns the parent of this node or 0 for the root node. */
+ DocNodeVariant *parent() { return m_parent; }
+ const DocNodeVariant *parent() const { return m_parent; }
+
+ DocParser *parser() { return m_parser; }
+ const DocParser *parser() const { return m_parser; }
+
+ /*! Sets a new parent for this node. */
+ void setParent(DocNodeVariant *parent) { m_parent = parent; }
+
+ /*! Returns TRUE iff this node is inside a preformatted section */
+ bool isPreformatted() const { return m_insidePre; }
+
+ protected:
+ /*! Sets whether or not this item is inside a preformatted section */
+ void setInsidePreformatted(bool p) { m_insidePre = p; }
+ enum RefType { Unknown, Anchor, Section, Table };
+ private:
+ bool m_insidePre = false;
+ DocParser *m_parser;
+ DocNodeVariant *m_parent;
+};
+
+struct DocNodeList : public GrowVector<DocNodeVariant>
+{
+ /** Append a new DocNodeVariant to the list by constructing it with type T and
+ * parameters Args.
+ */
+ template<class T,class...Args>
+ [[maybe_unused]] DocNodeVariant *append(Args&&... args);
+
+ /** moves the element of list \a l at the end of this list.
+ * List \a l will become empty. */
+ void move_append(DocNodeList &l);
+
+ /** Returns a pointer to the last element in the list if that element exists and
+ * holds a T, otherwise nullptr is returned.
+ */
+ template<class T>
+ T *get_last();
+};
+
+/** Base class for nodes with children */
+class DocCompoundNode : public DocNode
+{
+ public:
+ DocCompoundNode(DocParser *parser,DocNodeVariant *parent)
+ : DocNode(parser,parent) {}
+ DocNodeList &children() { return m_children; }
+ const DocNodeList &children() const { return m_children; }
+
+ private:
+ DocNodeList m_children;
+};
+
+/** Node representing a word
+ */
+class DocWord : public DocNode
+{
+ public:
+ DocWord(DocParser *parser,DocNodeVariant *parent,const QCString &word);
+ QCString word() const { return m_word; }
+
+ private:
+ QCString m_word;
+};
+
+/** Node representing a word that can be linked to something
+ */
+class DocLinkedWord : public DocNode
+{
+ public:
+ DocLinkedWord(DocParser *parser,DocNodeVariant *parent,const QCString &word,
+ const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &tooltip);
+ QCString word() const { return m_word; }
+ QCString file() const { return m_file; }
+ QCString relPath() const { return m_relPath; }
+ QCString ref() const { return m_ref; }
+ QCString anchor() const { return m_anchor; }
+ QCString tooltip() const { return m_tooltip; }
+
+ private:
+ QCString m_word;
+ QCString m_ref;
+ QCString m_file;
+ QCString m_relPath;
+ QCString m_anchor;
+ QCString m_tooltip;
+};
+
+/** Node representing a URL (or email address) */
+class DocURL : public DocNode
+{
+ public:
+ DocURL(DocParser *parser,DocNodeVariant *parent,const QCString &url,bool isEmail) :
+ DocNode(parser,parent), m_url(url), m_isEmail(isEmail) {}
+ QCString url() const { return m_url; }
+ bool isEmail() const { return m_isEmail; }
+
+ private:
+ QCString m_url;
+ bool m_isEmail = false;
+};
+
+/** Node representing a line break */
+class DocLineBreak : public DocNode
+{
+ public:
+ DocLineBreak(DocParser *parser,DocNodeVariant *parent) : DocNode(parser,parent) {}
+ DocLineBreak(DocParser *parser,DocNodeVariant *parent,const HtmlAttribList &attribs)
+ : DocNode(parser,parent), m_attribs(attribs) {}
+
+ const HtmlAttribList &attribs() const { return m_attribs; }
+
+ private:
+ HtmlAttribList m_attribs;
+};
+
+/** Node representing a horizontal ruler */
+class DocHorRuler : public DocNode
+{
+ public:
+ DocHorRuler(DocParser *parser,DocNodeVariant *parent,const HtmlAttribList &attribs)
+ : DocNode(parser,parent), m_attribs(attribs) {}
+
+ const HtmlAttribList &attribs() const { return m_attribs; }
+
+ private:
+ HtmlAttribList m_attribs;
+};
+
+/** Node representing an anchor */
+class DocAnchor : public DocNode
+{
+ public:
+ DocAnchor(DocParser *parser,DocNodeVariant *parent,const QCString &id,bool newAnchor);
+ QCString anchor() const { return m_anchor; }
+ QCString file() const { return m_file; }
+
+ const HtmlAttribList &attribs() const { return m_attribs; }
+
+ private:
+ QCString m_anchor;
+ QCString m_file;
+ HtmlAttribList m_attribs;
+};
+
+/** Node representing a citation of some bibliographic reference */
+class DocCite : public DocNode
+{
+ public:
+ DocCite(DocParser *parser,DocNodeVariant *parent,const QCString &target,const QCString &context);
+ QCString file() const { return m_file; }
+ QCString relPath() const { return m_relPath; }
+ QCString ref() const { return m_ref; }
+ QCString anchor() const { return m_anchor; }
+ QCString text() const { return m_text; }
+
+ private:
+ QCString m_file;
+ QCString m_relPath;
+ QCString m_ref;
+ QCString m_anchor;
+ QCString m_text;
+};
+
+
+/** Node representing a style change */
+class DocStyleChange : public DocNode
+{
+ public:
+ enum Style { Bold = (1<<0),
+ Italic = (1<<1),
+ Code = (1<<2),
+ Center = (1<<3),
+ Small = (1<<4),
+ Subscript = (1<<5),
+ Superscript = (1<<6),
+ Preformatted = (1<<7),
+ Span = (1<<8),
+ Div = (1<<9),
+ Strike = (1<<10),
+ Underline = (1<<11),
+ Del = (1<<12),
+ Ins = (1<<13),
+ S = (1<<14),
+ Details = (1<<15),
+ Summary = (1<<16),
+ Cite = (1<<17)
+ };
+
+ DocStyleChange(DocParser *parser,DocNodeVariant *parent,size_t position,Style s,
+ const QCString &tagName,bool enable, const HtmlAttribList *attribs=0)
+ : DocNode(parser,parent), m_position(position), m_style(s), m_enable(enable)
+ {
+ if (attribs) m_attribs=*attribs;
+ m_tagName = tagName.lower();
+ }
+ Style style() const { return m_style; }
+ const char *styleString() const;
+ bool enable() const { return m_enable; }
+ size_t position() const { return m_position; }
+ const HtmlAttribList &attribs() const { return m_attribs; }
+ QCString tagName() const { return m_tagName; }
+
+ private:
+ size_t m_position = 0;
+ Style m_style = Bold;
+ bool m_enable = false;
+ HtmlAttribList m_attribs;
+ QCString m_tagName;
+};
+
+/** Node representing a special symbol */
+class DocSymbol : public DocNode
+{
+ public:
+ DocSymbol(DocParser *parser,DocNodeVariant *parent,HtmlEntityMapper::SymType s)
+ : DocNode(parser,parent), m_symbol(s) {}
+ HtmlEntityMapper::SymType symbol() const { return m_symbol; }
+ static HtmlEntityMapper::SymType decodeSymbol(const QCString &symName);
+
+ private:
+ HtmlEntityMapper::SymType m_symbol = HtmlEntityMapper::Sym_Unknown;
+};
+
+/** Node representing an emoji */
+class DocEmoji : public DocNode
+{
+ public:
+ DocEmoji(DocParser *parser,DocNodeVariant *parent,const QCString &symName);
+ QCString name() const { return m_symName; }
+ int index() const { return m_index; }
+
+ private:
+ QCString m_symName;
+ int m_index = 0;
+};
+
+/** Node representing some amount of white space */
+class DocWhiteSpace : public DocNode
+{
+ public:
+ DocWhiteSpace(DocParser *parser,DocNodeVariant *parent,const QCString &chars)
+ : DocNode(parser,parent), m_chars(chars) {}
+ QCString chars() const { return m_chars; }
+ private:
+ QCString m_chars;
+};
+
+/** Node representing a separator */
+class DocSeparator : public DocNode
+{
+ public:
+ DocSeparator(DocParser *parser,DocNodeVariant *parent,const QCString &chars)
+ : DocNode(parser,parent), m_chars(chars) {}
+ QCString chars() const { return m_chars; }
+ private:
+ QCString m_chars;
+};
+
+/** Node representing a verbatim, unparsed text fragment */
+class DocVerbatim : public DocNode
+{
+ public:
+ enum Type { Code, HtmlOnly, ManOnly, LatexOnly, RtfOnly, XmlOnly, Verbatim, Dot, Msc, DocbookOnly, PlantUML, JavaDocCode, JavaDocLiteral };
+ DocVerbatim(DocParser *parser,DocNodeVariant *parent,const QCString &context,
+ const QCString &text, Type t,bool isExample,
+ const QCString &exampleFile,bool isBlock=FALSE,const QCString &lang=QCString());
+ Type type() const { return p->type; }
+ QCString text() const { return p->text; }
+ QCString context() const { return p->context; }
+ bool isExample() const { return p->isExample; }
+ QCString exampleFile() const { return p->exampleFile; }
+ QCString relPath() const { return p->relPath; }
+ QCString language() const { return p->lang; }
+ bool isBlock() const { return p->isBlock; }
+ bool hasCaption() const { return !p->children.empty(); }
+ QCString width() const { return p->width; }
+ QCString height() const { return p->height; }
+ QCString engine() const { return p->engine; }
+ bool useBitmap() const { return p->useBitmap; }
+ const DocNodeList &children() const { return p->children; }
+ DocNodeList &children() { return p->children; }
+ QCString srcFile() const { return p->srcFile; }
+ int srcLine() const { return p->srcLine; }
+ void setText(const QCString &t) { p->text=t; }
+ void setWidth(const QCString &w) { p->width=w; }
+ void setHeight(const QCString &h) { p->height=h; }
+ void setEngine(const QCString &e) { p->engine=e; }
+ void setUseBitmap(const bool &u) { p->useBitmap=u; }
+ void setLocation(const QCString &file,int line) { p->srcFile=file; p->srcLine=line; }
+
+ private:
+ struct Private
+ {
+ Private(const QCString &context_,const QCString &text_, Type type_, bool isExample_,
+ const QCString &exampleFile_, const QCString &relPath_,const QCString &lang_, bool isBlock_)
+ : context(context_), text(text_), type(type_), isExample(isExample_),
+ exampleFile(exampleFile_), relPath(relPath_), lang(lang_), isBlock(isBlock_) {}
+ QCString context;
+ QCString text;
+ Type type = Code;
+ bool isExample;
+ QCString exampleFile;
+ QCString relPath;
+ QCString lang;
+ bool isBlock;
+ QCString width;
+ QCString height;
+ QCString engine;
+ bool useBitmap=false; // some PlantUML engines cannot output data in EPS format so bitmap format is required
+ DocNodeList children;
+ QCString srcFile;
+ int srcLine = -1;
+ };
+ std::unique_ptr<Private> p;
+};
+
+
+/** Node representing an included text block from file */
+class DocInclude : public DocNode
+{
+ public:
+ enum Type { Include, DontInclude, VerbInclude, HtmlInclude, LatexInclude,
+ IncWithLines, Snippet , IncludeDoc, SnippetDoc, SnipWithLines,
+ DontIncWithLines, RtfInclude, ManInclude, DocbookInclude, XmlInclude};
+ DocInclude(DocParser *parser,DocNodeVariant *parent,const QCString &file,
+ const QCString &context, Type t,
+ bool isExample,const QCString &exampleFile,
+ const QCString &blockId, bool isBlock)
+ : DocNode(parser,parent), m_file(file), m_context(context), m_type(t),
+ m_isExample(isExample), m_isBlock(isBlock),
+ m_exampleFile(exampleFile), m_blockId(blockId) {}
+ QCString file() const { return m_file; }
+ QCString extension() const { int i=m_file.findRev('.');
+ if (i!=-1)
+ return m_file.right(m_file.length()-static_cast<uint>(i));
+ else
+ return QCString();
+ }
+ Type type() const { return m_type; }
+ QCString text() const { return m_text; }
+ QCString context() const { return m_context; }
+ QCString blockId() const { return m_blockId; }
+ bool isExample() const { return m_isExample; }
+ QCString exampleFile() const { return m_exampleFile; }
+ bool isBlock() const { return m_isBlock; }
+ void parse(DocNodeVariant *);
+
+ private:
+ QCString m_file;
+ QCString m_context;
+ QCString m_text;
+ Type m_type;
+ bool m_isExample;
+ bool m_isBlock;
+ QCString m_exampleFile;
+ QCString m_blockId;
+};
+
+/** Node representing a include/dontinclude operator block */
+class DocIncOperator : public DocNode
+{
+ public:
+ enum Type { Line, SkipLine, Skip, Until };
+ DocIncOperator(DocParser *parser,DocNodeVariant *parent,Type t,const QCString &pat,
+ const QCString &context,bool isExample,const QCString &exampleFile)
+ : DocNode(parser,parent), m_type(t), m_pattern(pat), m_context(context),
+ m_isFirst(FALSE), m_isLast(FALSE),
+ m_isExample(isExample), m_exampleFile(exampleFile) {}
+ Type type() const { return m_type; }
+ const char *typeAsString() const
+ {
+ switch(m_type)
+ {
+ case Line: return "line";
+ case SkipLine: return "skipline";
+ case Skip: return "skip";
+ case Until: return "until";
+ }
+ return "";
+ }
+ int line() const { return m_line; }
+ bool showLineNo() const { return m_showLineNo; }
+ QCString text() const { return m_text; }
+ QCString pattern() const { return m_pattern; }
+ QCString context() const { return m_context; }
+ bool isFirst() const { return m_isFirst; }
+ bool isLast() const { return m_isLast; }
+ void markFirst(bool v=TRUE) { m_isFirst = v; }
+ void markLast(bool v=TRUE) { m_isLast = v; }
+ bool isExample() const { return m_isExample; }
+ QCString exampleFile() const { return m_exampleFile; }
+ QCString includeFileName() const { return m_includeFileName; }
+ void parse(DocNodeVariant *);
+
+ private:
+ Type m_type = Line;
+ int m_line = 0;
+ bool m_showLineNo = false;
+ QCString m_text;
+ QCString m_pattern;
+ QCString m_context;
+ bool m_isFirst = false;
+ bool m_isLast = false;
+ bool m_isExample = false;
+ QCString m_exampleFile;
+ QCString m_includeFileName;
+};
+
+/** Node representing an item of a cross-referenced list */
+class DocFormula : public DocNode
+{
+ public:
+ DocFormula(DocParser *parser,DocNodeVariant *parent,int id);
+ QCString name() const { return m_name; }
+ QCString text() const { return m_text; }
+ QCString relPath() const { return m_relPath; }
+ int id() const { return m_id; }
+ bool isInline() const
+ {
+ if (m_text.length()>1 && m_text.at(0)=='\\' && m_text.at(1)=='[') return false;
+ if (m_text.startsWith("\\begin{")) return false;
+ return true;
+ }
+
+ private:
+ QCString m_name;
+ QCString m_text;
+ QCString m_relPath;
+ int m_id = 0;
+};
+
+/** Node representing an entry in the index. */
+class DocIndexEntry : public DocNode
+{
+ public:
+ DocIndexEntry(DocParser *parser,DocNodeVariant *parent,const Definition *scope,const MemberDef *md)
+ : DocNode(parser,parent), m_scope(scope), m_member(md) {}
+ int parse(DocNodeVariant *);
+ const Definition *scope() const { return m_scope; }
+ const MemberDef *member() const { return m_member; }
+ QCString entry() const { return m_entry; }
+
+ private:
+ QCString m_entry;
+ const Definition *m_scope = 0;
+ const MemberDef *m_member = 0;
+};
+
+//-----------------------------------------------------------------------
+
+/** Node representing an auto List */
+class DocAutoList : public DocCompoundNode
+{
+ public:
+ DocAutoList(DocParser *parser,DocNodeVariant *parent,int indent,bool isEnumList,int depth);
+ bool isEnumList() const { return m_isEnumList; }
+ int indent() const { return m_indent; }
+ int depth() const { return m_depth; }
+ int parse(DocNodeVariant *);
+
+ private:
+ int m_indent = 0;
+ bool m_isEnumList = false;
+ int m_depth = 0;
+};
+
+/** Node representing an item of a auto list */
+class DocAutoListItem : public DocCompoundNode
+{
+ public:
+ DocAutoListItem(DocParser *parser,DocNodeVariant *parent,int indent,int num);
+ int itemNumber() const { return m_itemNum; }
+ int parse(DocNodeVariant *);
+
+ private:
+ int m_indent = 0;
+ int m_itemNum = 0;
+};
+
+
+
+/** Node representing a simple section title */
+class DocTitle : public DocCompoundNode
+{
+ public:
+ DocTitle(DocParser *parser,DocNodeVariant *parent) : DocCompoundNode(parser,parent) {}
+ void parse(DocNodeVariant *);
+ void parseFromString(DocNodeVariant *,const QCString &title);
+ bool hasTitle() const { return !children().empty(); }
+
+ private:
+};
+
+/** Node representing an item of a cross-referenced list */
+class DocXRefItem : public DocCompoundNode
+{
+ public:
+ DocXRefItem(DocParser *parser,DocNodeVariant *parent,int id,const QCString &key);
+ QCString file() const { return m_file; }
+ QCString anchor() const { return m_anchor; }
+ QCString title() const { return m_title; }
+ QCString relPath() const { return m_relPath; }
+ QCString key() const { return m_key; }
+ bool parse(DocNodeVariant *);
+
+ private:
+ int m_id = 0;
+ QCString m_key;
+ QCString m_file;
+ QCString m_anchor;
+ QCString m_title;
+ QCString m_relPath;
+};
+
+/** Node representing an image */
+class DocImage : public DocCompoundNode
+{
+ public:
+ enum Type { Html, Latex, Rtf, DocBook, Xml };
+ DocImage(DocParser *parser,DocNodeVariant *parent,const HtmlAttribList &attribs,
+ const QCString &name,Type t,const QCString &url=QCString(), bool inlineImage = TRUE);
+ Type type() const { return p->type; }
+ QCString name() const { return p->name; }
+ bool hasCaption() const { return !children().empty(); }
+ QCString width() const { return p->width; }
+ QCString height() const { return p->height; }
+ QCString relPath() const { return p->relPath; }
+ QCString url() const { return p->url; }
+ bool isInlineImage() const { return p->inlineImage; }
+ bool isSVG() const;
+ const HtmlAttribList &attribs() const { return p->attribs; }
+ void parse(DocNodeVariant *);
+
+ private:
+ struct Private
+ {
+ Private(const HtmlAttribList &attribs_,const QCString &name_,Type type_,
+ const QCString &relPath_, const QCString &url_,bool inlineImage_)
+ : attribs(attribs_), name(name_), type(type_),
+ relPath(relPath_), url(url_), inlineImage(inlineImage_) {}
+ HtmlAttribList attribs;
+ QCString name;
+ Type type = Html;
+ QCString width;
+ QCString height;
+ QCString relPath;
+ QCString url;
+ bool inlineImage;
+ };
+ std::unique_ptr<Private> p;
+};
+
+class DocDiagramFileBase : public DocCompoundNode
+{
+ public:
+ DocDiagramFileBase(DocParser *parser, DocNodeVariant *parent,const QCString &name,
+ const QCString &context, const QCString &srcFile,int srcLine)
+ : DocCompoundNode(parser,parent), p(std::make_unique<Private>(name, context, srcFile, srcLine)) {}
+ QCString name() const { return p->name; }
+ QCString file() const { return p->file; }
+ QCString relPath() const { return p->relPath; }
+ bool hasCaption() const { return !children().empty(); }
+ QCString width() const { return p->width; }
+ QCString height() const { return p->height; }
+ QCString context() const { return p->context; }
+ QCString srcFile() const { return p->srcFile; }
+ int srcLine() const { return p->srcLine; }
+
+ protected:
+ struct Private
+ {
+ Private(const QCString &name_,const QCString &context_,const QCString &srcFile_,int srcLine_)
+ : name(name_), context(context_), srcFile(srcFile_), srcLine(srcLine_) {}
+ QCString name;
+ QCString file;
+ QCString relPath;
+ QCString width;
+ QCString height;
+ QCString context;
+ QCString srcFile;
+ int srcLine;
+ };
+ std::unique_ptr<Private> p;
+};
+
+/** Node representing a dot file */
+class DocDotFile : public DocDiagramFileBase
+{
+ public:
+ DocDotFile(DocParser *parser,DocNodeVariant *parent,const QCString &name,const QCString &context,
+ const QCString &srcFile,int srcLine);
+ bool parse(DocNodeVariant *);
+};
+
+/** Node representing a msc file */
+class DocMscFile : public DocDiagramFileBase
+{
+ public:
+ DocMscFile(DocParser *parser,DocNodeVariant *parent,const QCString &name,const QCString &context,
+ const QCString &srcFile,int srcLine);
+ bool parse(DocNodeVariant *);
+};
+
+/** Node representing a dia file */
+class DocDiaFile : public DocDiagramFileBase
+{
+ public:
+ DocDiaFile(DocParser *parser,DocNodeVariant *parent,const QCString &name,const QCString &context,
+ const QCString &srcFile,int srcLine);
+ bool parse(DocNodeVariant *);
+};
+
+/** Node representing a VHDL flow chart */
+class DocVhdlFlow : public DocCompoundNode
+{
+ public:
+ DocVhdlFlow(DocParser *parser,DocNodeVariant *parent);
+ void parse(DocNodeVariant *);
+ bool hasCaption() const { return !children().empty(); }
+ private:
+};
+
+/** Node representing a link to some item */
+class DocLink : public DocCompoundNode
+{
+ public:
+ DocLink(DocParser *parser,DocNodeVariant *parent,const QCString &target);
+ QCString parse(DocNodeVariant *,bool,bool isXmlLink=FALSE);
+ QCString file() const { return m_file; }
+ QCString relPath() const { return m_relPath; }
+ QCString ref() const { return m_ref; }
+ QCString anchor() const { return m_anchor; }
+
+ private:
+ QCString m_file;
+ QCString m_relPath;
+ QCString m_ref;
+ QCString m_anchor;
+ QCString m_refText;
+};
+
+/** Node representing a reference to some item */
+class DocRef : public DocCompoundNode
+{
+ public:
+ DocRef(DocParser *parser,DocNodeVariant *parent,const QCString &target,const QCString &context);
+ void parse(DocNodeVariant *);
+ QCString file() const { return m_file; }
+ QCString relPath() const { return m_relPath; }
+ QCString ref() const { return m_ref; }
+ QCString anchor() const { return m_anchor; }
+ QCString targetTitle() const { return m_text; }
+ bool hasLinkText() const { return !children().empty(); }
+ bool refToAnchor() const { return m_refType==Anchor; }
+ bool refToSection() const { return m_refType==Section; }
+ bool refToTable() const { return m_refType==Table; }
+ bool isSubPage() const { return m_isSubPage; }
+
+ private:
+ RefType m_refType = Unknown;
+ bool m_isSubPage = false;
+ QCString m_file;
+ QCString m_relPath;
+ QCString m_ref;
+ QCString m_anchor;
+ QCString m_text;
+};
+
+/** Node representing an internal reference to some item */
+class DocInternalRef : public DocCompoundNode
+{
+ public:
+ DocInternalRef(DocParser *parser,DocNodeVariant *parent,const QCString &target);
+ void parse(DocNodeVariant*);
+ QCString file() const { return m_file; }
+ QCString relPath() const { return m_relPath; }
+ QCString anchor() const { return m_anchor; }
+
+ private:
+ QCString m_file;
+ QCString m_relPath;
+ QCString m_anchor;
+};
+
+/** Node representing a Hypertext reference */
+class DocHRef : public DocCompoundNode
+{
+ public:
+ DocHRef(DocParser *parser,DocNodeVariant *parent,const HtmlAttribList &attribs,const QCString &url,
+ const QCString &relPath, const QCString &file)
+ : DocCompoundNode(parser,parent), m_attribs(attribs), m_url(url),
+ m_relPath(relPath), m_file(file) {}
+ int parse(DocNodeVariant*);
+ QCString url() const { return m_url; }
+ QCString file() const { return m_file; }
+ QCString relPath() const { return m_relPath; }
+ const HtmlAttribList &attribs() const { return m_attribs; }
+
+ private:
+ HtmlAttribList m_attribs;
+ QCString m_url;
+ QCString m_relPath;
+ QCString m_file;
+};
+
+/** Node Html heading */
+class DocHtmlHeader : public DocCompoundNode
+{
+ public:
+ DocHtmlHeader(DocParser *parser,DocNodeVariant *parent,const HtmlAttribList &attribs,int level) :
+ DocCompoundNode(parser,parent), m_level(level), m_attribs(attribs) {}
+ int level() const { return m_level; }
+ const HtmlAttribList &attribs() const { return m_attribs; }
+ int parse(DocNodeVariant*);
+
+ private:
+ int m_level = 0;
+ HtmlAttribList m_attribs;
+};
+
+/** Node representing a Html description item */
+class DocHtmlDescTitle : public DocCompoundNode
+{
+ public:
+ DocHtmlDescTitle(DocParser *parser,DocNodeVariant *parent,const HtmlAttribList &attribs) :
+ DocCompoundNode(parser,parent), m_attribs(attribs) {}
+ const HtmlAttribList &attribs() const { return m_attribs; }
+ int parse(DocNodeVariant*);
+
+ private:
+ HtmlAttribList m_attribs;
+};
+
+/** Node representing a Html description list */
+class DocHtmlDescList : public DocCompoundNode
+{
+ public:
+ DocHtmlDescList(DocParser *parser,DocNodeVariant *parent,const HtmlAttribList &attribs) :
+ DocCompoundNode(parser,parent), m_attribs(attribs) {}
+ const HtmlAttribList &attribs() const { return m_attribs; }
+ int parse(DocNodeVariant*);
+
+ private:
+ HtmlAttribList m_attribs;
+};
+
+/** Node representing a normal section */
+class DocSection : public DocCompoundNode
+{
+ public:
+ DocSection(DocParser *parser,DocNodeVariant *parent,int level,const QCString &id) :
+ DocCompoundNode(parser,parent), m_level(level), m_id(id) {}
+ int level() const { return m_level; }
+ QCString title() const { return m_title; }
+ QCString anchor() const { return m_anchor; }
+ QCString id() const { return m_id; }
+ QCString file() const { return m_file; }
+ int parse(DocNodeVariant*);
+
+ private:
+ int m_level = 0;
+ QCString m_id;
+ QCString m_title;
+ QCString m_anchor;
+ QCString m_file;
+};
+
+/** Node representing a reference to a section */
+class DocSecRefItem : public DocCompoundNode
+{
+ public:
+ DocSecRefItem(DocParser *parser,DocNodeVariant *parent,const QCString &target);
+ QCString target() const { return m_target; }
+ QCString file() const { return m_file; }
+ QCString anchor() const { return m_anchor; }
+ QCString relPath() const { return m_relPath; }
+ QCString ref() const { return m_ref; }
+ bool refToTable() const { return m_refType==Table; }
+ bool isSubPage() const { return m_isSubPage; }
+ void parse(DocNodeVariant *);
+
+ private:
+ QCString m_target;
+ RefType m_refType = Unknown;
+ bool m_isSubPage = false;
+ QCString m_file;
+ QCString m_relPath;
+ QCString m_ref;
+ QCString m_anchor;
+};
+
+/** Node representing a list of section references */
+class DocSecRefList : public DocCompoundNode
+{
+ public:
+ DocSecRefList(DocParser *parser,DocNodeVariant *parent) : DocCompoundNode(parser,parent) {}
+ void parse(DocNodeVariant *);
+
+ private:
+};
+
+/** Node representing an internal section of documentation */
+class DocInternal : public DocCompoundNode
+{
+ public:
+ DocInternal(DocParser *parser,DocNodeVariant *parent) : DocCompoundNode(parser,parent) {}
+ int parse(DocNodeVariant*,int);
+
+ private:
+};
+
+/** Node representing an block of paragraphs */
+class DocParBlock : public DocCompoundNode
+{
+ public:
+ DocParBlock(DocParser *parser,DocNodeVariant *parent) : DocCompoundNode(parser,parent) {}
+ int parse(DocNodeVariant *);
+
+ private:
+};
+
+
+/** Node representing a simple list */
+class DocSimpleList : public DocCompoundNode
+{
+ public:
+ DocSimpleList(DocParser *parser,DocNodeVariant *parent) : DocCompoundNode(parser,parent) {}
+ int parse(DocNodeVariant *);
+
+ private:
+};
+
+/** Node representing a Html list */
+class DocHtmlList : public DocCompoundNode
+{
+ public:
+ enum Type { Unordered, Ordered };
+ DocHtmlList(DocParser *parser,DocNodeVariant *parent,const HtmlAttribList &attribs,Type t) :
+ DocCompoundNode(parser,parent), m_type(t), m_attribs(attribs) {}
+ Type type() const { return m_type; }
+ const HtmlAttribList &attribs() const { return m_attribs; }
+ int parse(DocNodeVariant *);
+ int parseXml(DocNodeVariant *);
+
+ private:
+ Type m_type = Unordered;
+ HtmlAttribList m_attribs;
+};
+
+/** Node representing a simple section */
+class DocSimpleSect : public DocCompoundNode
+{
+ public:
+ enum Type
+ {
+ Unknown, See, Return, Author, Authors, Version, Since, Date,
+ Note, Warning, Copyright, Pre, Post, Invar, Remark, Attention, User, Rcs
+ };
+ DocSimpleSect(DocParser *parser,DocNodeVariant *parent,Type t);
+ Type type() const { return m_type; }
+ QCString typeString() const;
+ int parse(DocNodeVariant *,bool userTitle,bool needsSeparator);
+ int parseRcs(DocNodeVariant *);
+ int parseXml(DocNodeVariant *);
+ void appendLinkWord(DocNodeVariant *,const QCString &word);
+ bool hasTitle() const;
+ const DocNodeVariant *title() const { return m_title.get(); }
+
+ private:
+ Type m_type = Unknown;
+ std::unique_ptr<DocNodeVariant> m_title;
+};
+
+/** Node representing a separator between two simple sections of the
+ * same type.
+ */
+class DocSimpleSectSep : public DocNode
+{
+ public:
+ DocSimpleSectSep(DocParser *parser,DocNodeVariant *parent) : DocNode(parser,parent) {}
+
+ private:
+};
+
+/** Node representing a parameter section */
+class DocParamSect : public DocCompoundNode
+{
+ friend class DocParamList;
+ public:
+ enum Type
+ {
+ Unknown, Param, RetVal, Exception, TemplateParam
+ };
+ enum Direction
+ {
+ In=1, Out=2, InOut=3, Unspecified=0
+ };
+ DocParamSect(DocParser *parser,DocNodeVariant *parent,Type t)
+ : DocCompoundNode(parser,parent), m_type(t), m_hasInOutSpecifier(FALSE), m_hasTypeSpecifier(FALSE)
+ {}
+ int parse(DocNodeVariant *,const QCString &cmdName,bool xmlContext,Direction d);
+ Type type() const { return m_type; }
+ bool hasInOutSpecifier() const { return m_hasInOutSpecifier; }
+ bool hasTypeSpecifier() const { return m_hasTypeSpecifier; }
+
+ private:
+ Type m_type = Unknown;
+ bool m_hasInOutSpecifier = false;
+ bool m_hasTypeSpecifier = false;
+};
+
+/** Node representing a paragraph in the documentation tree */
+class DocPara : public DocCompoundNode
+{
+ public:
+ DocPara(DocParser *parser,DocNodeVariant *parent);
+ int parse(DocNodeVariant *);
+ bool isEmpty() const { return children().empty(); }
+ void markFirst(bool v=TRUE) { m_isFirst=v; }
+ void markLast(bool v=TRUE) { m_isLast=v; }
+ bool isFirst() const { return m_isFirst; }
+ bool isLast() const { return m_isLast; }
+
+ int handleCommand(DocNodeVariant *thisVariant,const QCString &cmdName,const int tok);
+ int handleHtmlStartTag(DocNodeVariant *thisVariant,const QCString &tagName,const HtmlAttribList &tagHtmlAttribs);
+ int handleHtmlEndTag(DocNodeVariant *thisVariant,const QCString &tagName);
+ int handleSimpleSection(DocNodeVariant *thisVariant,DocSimpleSect::Type t,bool xmlContext=FALSE);
+ int handleXRefItem(DocNodeVariant *thisVariant);
+ int handleParamSection(DocNodeVariant *thisVariant,const QCString &cmdName,DocParamSect::Type t,
+ bool xmlContext,
+ int direction);
+ void handleIncludeOperator(DocNodeVariant *thisVariant,const QCString &cmdName,DocIncOperator::Type t);
+ template<class T> void handleFile(DocNodeVariant *thisVariant,const QCString &cmdName);
+ void handleInclude(DocNodeVariant *thisVariant,const QCString &cmdName,DocInclude::Type t);
+ void handleLink(DocNodeVariant *thisVariant,const QCString &cmdName,bool isJavaLink);
+ void handleCite(DocNodeVariant *thisVariant);
+ void handleEmoji(DocNodeVariant *thisVariant);
+ void handleRef(DocNodeVariant *thisVariant,const QCString &cmdName);
+ void handleSection(DocNodeVariant *thisVariant,const QCString &cmdName);
+ void handleInheritDoc(DocNodeVariant *thisVariant);
+ void handleVhdlFlow(DocNodeVariant *thisVariant);
+ void handleIline(DocNodeVariant *thisVariant);
+ int handleStartCode(DocNodeVariant *thisVariant);
+ int handleHtmlHeader(DocNodeVariant *thisVariant,const HtmlAttribList &tagHtmlAttribs,int level);
+
+ bool injectToken(DocNodeVariant *thisVariant,int tok,const QCString &tokText);
+ const HtmlAttribList &attribs() const { return m_attribs; }
+ void setAttribs(const HtmlAttribList &attribs) { m_attribs = attribs; }
+
+ private:
+ QCString m_sectionId;
+ bool m_isFirst = false;
+ bool m_isLast = false;
+ HtmlAttribList m_attribs;
+};
+
+/** Node representing a parameter list. */
+class DocParamList : public DocNode
+{
+ public:
+ DocParamList(DocParser *parser,DocNodeVariant *parent,DocParamSect::Type t,DocParamSect::Direction d)
+ : DocNode(parser,parent), m_type(t), m_dir(d) {}
+ const DocNodeList ¶meters() const { return m_params; }
+ const DocNodeList ¶mTypes() const { return m_paramTypes; }
+ const DocNodeList ¶graphs() const { return m_paragraphs; }
+ DocParamSect::Type type() const { return m_type; }
+ DocParamSect::Direction direction() const { return m_dir; }
+ void markFirst(bool b=TRUE) { m_isFirst=b; }
+ void markLast(bool b=TRUE) { m_isLast=b; }
+ bool isFirst() const { return m_isFirst; }
+ bool isLast() const { return m_isLast; }
+ int parse(DocNodeVariant *,const QCString &cmdName);
+ int parseXml(DocNodeVariant *,const QCString ¶mName);
+
+ private:
+ DocNodeList m_paragraphs;
+ DocNodeList m_params;
+ DocNodeList m_paramTypes;
+ DocParamSect::Type m_type = DocParamSect::Unknown;
+ DocParamSect::Direction m_dir = DocParamSect::Unspecified;
+ bool m_isFirst = false;
+ bool m_isLast = false;
+};
+
+/** Node representing a simple list item */
+class DocSimpleListItem : public DocNode
+{
+ public:
+ DocSimpleListItem(DocParser *parser,DocNodeVariant *parent);
+ int parse(DocNodeVariant *);
+ const DocNodeVariant *paragraph() const { return m_paragraph.get(); }
+
+ private:
+ std::unique_ptr<DocNodeVariant> m_paragraph;
+};
+
+/** Node representing a HTML list item */
+class DocHtmlListItem : public DocCompoundNode
+{
+ public:
+ DocHtmlListItem(DocParser *parser,DocNodeVariant *parent,const HtmlAttribList &attribs,int num)
+ : DocCompoundNode(parser,parent), m_attribs(attribs), m_itemNum(num) {}
+ int itemNumber() const { return m_itemNum; }
+ const HtmlAttribList &attribs() const { return m_attribs; }
+ int parse(DocNodeVariant *);
+ int parseXml(DocNodeVariant *);
+
+ private:
+ HtmlAttribList m_attribs;
+ int m_itemNum = 0;
+};
+
+/** Node representing a HTML description data */
+class DocHtmlDescData : public DocCompoundNode
+{
+ public:
+ DocHtmlDescData(DocParser *parser,DocNodeVariant *parent) : DocCompoundNode(parser,parent) {}
+ const HtmlAttribList &attribs() const { return m_attribs; }
+ int parse(DocNodeVariant *);
+
+ private:
+ HtmlAttribList m_attribs;
+};
+
+/** Node representing a HTML table cell */
+class DocHtmlCell : public DocCompoundNode
+{
+ friend class DocHtmlTable;
+ public:
+ enum Alignment { Left, Right, Center };
+ enum Valignment {Top, Middle, Bottom};
+ DocHtmlCell(DocParser *parser,DocNodeVariant *parent,const HtmlAttribList &attribs,bool isHeading) :
+ DocCompoundNode(parser,parent), m_isHeading(isHeading), m_attribs(attribs) {}
+ bool isHeading() const { return m_isHeading; }
+ bool isFirst() const { return m_isFirst; }
+ bool isLast() const { return m_isLast; }
+ void markFirst(bool v=TRUE) { m_isFirst=v; }
+ void markLast(bool v=TRUE) { m_isLast=v; }
+ const HtmlAttribList &attribs() const { return m_attribs; }
+ int parse(DocNodeVariant *);
+ int parseXml(DocNodeVariant *);
+ uint rowIndex() const { return m_rowIdx; }
+ uint columnIndex() const { return m_colIdx; }
+ uint rowSpan() const;
+ uint colSpan() const;
+ Alignment alignment() const;
+ Valignment valignment() const;
+
+ private:
+ void setRowIndex(uint idx) { m_rowIdx = idx; }
+ void setColumnIndex(uint idx) { m_colIdx = idx; }
+ bool m_isHeading = false;
+ bool m_isFirst = false;
+ bool m_isLast = false;
+ HtmlAttribList m_attribs;
+ uint m_rowIdx = static_cast<uint>(-1);
+ uint m_colIdx = static_cast<uint>(-1);
+};
+
+/** Node representing a HTML table caption */
+class DocHtmlCaption : public DocCompoundNode
+{
+ public:
+ DocHtmlCaption(DocParser *parser,DocNodeVariant *parent,const HtmlAttribList &attribs);
+ const HtmlAttribList &attribs() const { return m_attribs; }
+ int parse(DocNodeVariant *);
+ bool hasCaptionId() const { return m_hasCaptionId; }
+ QCString file() const { return m_file; }
+ QCString anchor() const { return m_anchor; }
+
+ private:
+ HtmlAttribList m_attribs;
+ bool m_hasCaptionId = false;
+ QCString m_file;
+ QCString m_anchor;
+};
+
+/** Node representing a HTML table row */
+class DocHtmlRow : public DocCompoundNode
+{
+ friend class DocHtmlTable;
+ public:
+ DocHtmlRow(DocParser *parser,DocNodeVariant *parent,const HtmlAttribList &attribs)
+ : DocCompoundNode(parser,parent), m_attribs(attribs) {}
+ size_t numCells() const { return children().size(); }
+ const HtmlAttribList &attribs() const { return m_attribs; }
+ int parse(DocNodeVariant *);
+ int parseXml(DocNodeVariant *,bool header);
+ bool isHeading() const;
+ void setVisibleCells(uint n) { m_visibleCells = n; }
+ uint visibleCells() const { return m_visibleCells; }
+ uint rowIndex() const { return m_rowIdx; }
+
+ private:
+ void setRowIndex(uint idx) { m_rowIdx = idx; }
+ HtmlAttribList m_attribs;
+ uint m_visibleCells = 0;
+ uint m_rowIdx = static_cast<uint>(-1);
+};
+
+/** Node representing a HTML table */
+class DocHtmlTable : public DocCompoundNode
+{
+ public:
+ DocHtmlTable(DocParser *parser,DocNodeVariant *parent,const HtmlAttribList &attribs)
+ : DocCompoundNode(parser,parent), m_attribs(attribs) {}
+ size_t numRows() const { return children().size(); }
+ bool hasCaption() const;
+ const HtmlAttribList &attribs() const { return m_attribs; }
+ int parse(DocNodeVariant *);
+ int parseXml(DocNodeVariant *);
+ size_t numColumns() const { return m_numCols; }
+ const DocNodeVariant *caption() const;
+ const DocNodeVariant *firstRow() const;
+
+ private:
+ void computeTableGrid();
+ std::unique_ptr<DocNodeVariant> m_caption;
+ HtmlAttribList m_attribs;
+ size_t m_numCols = 0;
+};
+
+/** Node representing an HTML blockquote */
+class DocHtmlBlockQuote : public DocCompoundNode
+{
+ public:
+ DocHtmlBlockQuote(DocParser *parser,DocNodeVariant *parent,const HtmlAttribList &attribs)
+ : DocCompoundNode(parser,parent), m_attribs(attribs) {}
+ int parse(DocNodeVariant *);
+ const HtmlAttribList &attribs() const { return m_attribs; }
+
+ private:
+ HtmlAttribList m_attribs;
+};
+
+/** Root node of a text fragment */
+class DocText : public DocCompoundNode
+{
+ public:
+ DocText(DocParser *parser) : DocCompoundNode(parser,0) {}
+ void parse(DocNodeVariant *);
+ bool isEmpty() const { return children().empty(); }
+};
+
+/** Root node of documentation tree */
+class DocRoot : public DocCompoundNode
+{
+ public:
+ DocRoot(DocParser *parser,bool indent,bool sl)
+ : DocCompoundNode(parser,0), m_indent(indent), m_singleLine(sl) {}
+ void parse(DocNodeVariant *);
+ bool indent() const { return m_indent; }
+ bool singleLine() const { return m_singleLine; }
+ bool isEmpty() const { return children().empty(); }
+
+ private:
+ bool m_indent = false;
+ bool m_singleLine = false;
+};
+
+//--------------------------------------------------------------------------------------
+
+/// returns the parent node of a given node \a n or 0 if the node has no parent.
+constexpr const DocNodeVariant *parent(const DocNodeVariant *n)
+{
+ return n ? std::visit([](auto &&x)->decltype(auto) { return x.parent(); }, *n) : nullptr;
+}
+
+namespace details
+{
+
+template<class T,class... Ts>
+struct Impl
+{
+ static constexpr bool holds_one_of_alternatives(const DocNodeVariant &v)
+ {
+ return std::holds_alternative<T>(v) || Impl<Ts...>::holds_one_of_alternatives(v);
+ }
+};
+
+template<class T>
+struct Impl<T>
+{
+ static constexpr bool holds_one_of_alternatives(const DocNodeVariant &v)
+ {
+ return std::holds_alternative<T>(v);
+ }
+};
+
+}
+
+/// returns true iff \a v holds one of types passed as template parameters
+template<class... Ts>
+constexpr bool holds_one_of_alternatives(const DocNodeVariant &v)
+{
+ return details::Impl<Ts...>::holds_one_of_alternatives(v);
+}
+
+//----------------- DocNodeList ---------------------------------------
+
+template<class T,class...Args>
+inline DocNodeVariant *DocNodeList::append(Args&&... args)
+{
+ emplace_back(T(std::forward<Args>(args)...));
+ return &back();
+}
+
+inline void DocNodeList::move_append(DocNodeList &elements)
+{
+ for (auto &&elem : elements)
+ {
+ emplace_back(std::move(elem));
+ }
+ elements.clear();
+}
+
+template<class T>
+inline T *DocNodeList::get_last()
+{
+ return std::get_if<T>(&back());
+}
+
+/// ---------------- Debug helpers -------------------------------
+
+inline const char *docNodeName(const DocNodeVariant &v)
+{
+#define DN(x) #x
+#define DN_SEP ,
+ static const char *table[] = { DOC_NODES };
+#undef DN
+#undef DN_SEP
+ return table[v.index()];
+}
+
+inline void dumpDocNodeSizes()
+{
+#define DN(x) #x
+#define DN_SEP ,
+ static const char *tableWithNames[] = { DOC_NODES };
+#undef DN
+#undef DN_SEP
+
+#define DN(x) sizeof(x)
+#define DN_SEP ,
+ static size_t tableWithSizes[] = { DOC_NODES };
+#undef DN
+#undef DN_SEP
+
+ size_t maxSize=0;
+ printf("DocNodeVariant(\n");
+ for (size_t i=0;i<sizeof(tableWithNames)/sizeof(tableWithNames[0]);i++)
+ {
+ printf(" /* %2zu */ sizeof(%s)=%zu\n",i,tableWithNames[i],tableWithSizes[i]);
+ if (tableWithSizes[i]>maxSize) maxSize = tableWithSizes[i];
+ }
+ printf(")=%zu\n",maxSize);
+}
+
+inline void dumpDocNodeList(const DocNodeList &children)
+{
+ printf("children=[\n");
+ for (const auto &child : children)
+ {
+ const DocWord *w = std::get_if<DocWord>(&child);
+ printf(" %s (%p) %s\n",docNodeName(child),(void*)&child,qPrint(w?w->word():""));
+ }
+ printf("]\n");
+}
+
+//----------------------------------------------------------------------------------
+
+/** Class representing the abstract syntax tree of a documentation block */
+class DocNodeAST : public IDocNodeAST
+{
+ public:
+ template<class DocNode>
+ DocNodeAST(DocNode &&r) : root(std::move(r)) {}
+ bool isEmpty() const override
+ {
+ if (std::holds_alternative<DocRoot>(root))
+ {
+ return std::get<DocRoot>(root).isEmpty();
+ }
+ else if (std::holds_alternative<DocText>(root))
+ {
+ return std::get<DocText>(root).isEmpty();
+ }
+ return false;
+ }
+ DocNodeVariant root;
+};
+
+#endif
/******************************************************************************
*
- * Copyright (C) 1997-2021 by Dimitri van Heesch.
+ * Copyright (C) 1997-2022 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
#include <ctype.h>
-#include "qcstring.h"
-#include "regex.h"
-#include "doxygen.h"
+#include "classlist.h"
+#include "cmdmapper.h"
+#include "config.h"
#include "debug.h"
-#include "util.h"
-#include "pagedef.h"
+#include "dir.h"
#include "docparser.h"
-#include "doctokenizer.h"
-#include "cmdmapper.h"
-#include "printdocvisitor.h"
-#include "message.h"
-#include "section.h"
-#include "searchindex.h"
-#include "language.h"
-#include "portable.h"
-#include "cite.h"
-#include "arguments.h"
-#include "vhdldocgen.h"
-#include "groupdef.h"
-#include "classlist.h"
+#include "docparser_p.h"
+#include "doxygen.h"
#include "filedef.h"
-#include "memberdef.h"
-#include "namespacedef.h"
-#include "reflist.h"
-#include "formula.h"
-#include "config.h"
-#include "growbuf.h"
-#include "markdown.h"
-#include "htmlentity.h"
-#include "emoji.h"
#include "fileinfo.h"
-#include "dir.h"
-
-#define TK_COMMAND_CHAR(token) ((token)==TK_COMMAND_AT ? "@" : "\\")
+#include "groupdef.h"
+#include "namespacedef.h"
+#include "message.h"
+#include "pagedef.h"
+#include "portable.h"
+#include "printdocvisitor.h"
+#include "util.h"
// debug off
#define DBG(x) do {} while(0)
//#define myprintf(...) fprintf(stderr,__VA_ARGS__)
//#define DBG(x) myprintf x
-#define INTERNAL_ASSERT(x) do {} while(0)
-//#define INTERNAL_ASSERT(x) if (!(x)) DBG(("INTERNAL_ASSERT(%s) failed retval=0x%x: file=%s line=%d\n",#x,retval,__FILE__,__LINE__));
-
-//---------------------------------------------------------------------------
-
-static const char *g_sectionLevelToName[] =
-{
- "page",
- "section",
- "subsection",
- "subsubsection",
- "paragraph",
- "subparagraph"
-};
-
-static const std::set<std::string> g_plantumlEngine {
- "uml", "bpm", "wire", "dot", "ditaa",
- "salt", "math", "latex", "gantt", "mindmap",
- "wbs", "yaml", "creole", "json", "flow",
- "board", "git"
-};
-
-//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
-using DefinitionStack = std::vector<const Definition *>;
-using DocNodeStack = std::stack<const DocNode *>;
-//using DocStyleChangeStack = std::stack<const DocStyleChange *>;
-
-template<typename T, typename Container = std::deque<T>>
-class iterable_stack
-: public std::stack<T, Container>
-{
- using std::stack<T, Container>::c;
-
-public:
-
- // expose just the iterators of the underlying container
- auto begin() { return std::begin(c); }
- auto end() { return std::end(c); }
-
- auto begin() const { return std::begin(c); }
- auto end() const { return std::end(c); }
-};
-using DocStyleChangeStack = iterable_stack<const DocStyleChange *>;
-
-/** Parser's context to store all global variables.
- */
-struct DocParserContext
-{
- const Definition *scope;
- QCString context;
- bool inSeeBlock;
- bool xmlComment;
- bool insideHtmlLink;
- DocNodeStack nodeStack;
- DocStyleChangeStack styleStack;
- DocStyleChangeStack initialStyleStack;
- DefinitionStack copyStack;
- QCString fileName;
- QCString relPath;
-
- bool hasParamCommand;
- bool hasReturnCommand;
- StringMultiSet retvalsFound;
- StringMultiSet paramsFound;
- const MemberDef * memberDef;
- bool isExample;
- QCString exampleName;
- QCString searchUrl;
-
- QCString includeFileName;
- QCString includeFileText;
- uint includeFileOffset;
- uint includeFileLength;
- int includeFileLine;
- bool includeFileShowLineNo;
-
- TokenInfo *token;
- int lineNo;
- bool markdownSupport;
-};
-
-class DocParser : public IDocParser
-{
- public:
- void pushContext();
- void popContext();
- void handleImg(DocNode *parent,DocNodeList &children,const HtmlAttribList &tagHtmlAttribs);
- int internalValidatingParseDoc(DocNode *parent,DocNodeList &children,
- const QCString &doc);
- QCString processCopyDoc(const char *data,uint &len);
- QCString findAndCopyImage(const QCString &fileName,DocImage::Type type, bool doWarn = true);
- void checkArgumentName();
- void checkRetvalName();
- void checkUnOrMultipleDocumentedParams();
- bool findDocsForMemberOrCompound(const QCString &commandName,
- QCString *pDoc,
- QCString *pBrief,
- const Definition **pDef);
- bool defaultHandleToken(DocNode *parent,int tok,
- DocNodeList &children,bool
- handleWord=TRUE);
- void errorHandleDefaultToken(DocNode *parent,int tok,
- DocNodeList &children,const QCString &txt);
- void defaultHandleTitleAndSize(const int cmd, DocNode *parent,
- DocNodeList &children, QCString &width,QCString &height);
- int handleStyleArgument(DocNode *parent,DocNodeList &children,
- const QCString &cmdName);
- void handleStyleEnter(DocNode *parent,DocNodeList &children, DocStyleChange::Style s,
- const QCString &tagName,const HtmlAttribList *attribs);
- void handleStyleLeave(DocNode *parent,DocNodeList &children, DocStyleChange::Style s,
- const QCString &tagName);
- void handlePendingStyleCommands(DocNode *parent,DocNodeList &children);
- void handleInitialStyleCommands(DocPara *parent,DocNodeList &children);
- int handleAHref(DocNode *parent,DocNodeList &children,const HtmlAttribList &tagHtmlAttribs);
- void handleUnclosedStyleCommands();
- void handleLinkedWord(DocNode *parent,DocNodeList &children,bool ignoreAutoLinkFlag=FALSE);
- void handleParameterType(DocNode *parent,DocNodeList &children,const QCString ¶mTypes);
- DocInternalRef *handleInternalRef(DocNode *parent);
- DocAnchor *handleAnchor(DocNode *parent);
- void readTextFileByName(const QCString &file,QCString &text);
-
- std::stack< DocParserContext > contextStack;
- DocParserContext context;
- DocTokenizer tokenizer;
-};
-
-std::unique_ptr<IDocParser> createDocParser()
+IDocParserPtr createDocParser()
{
return std::make_unique<DocParser>();
}
//---------------------------------------------------------------------------
-
-class AutoNodeStack
+DocParser::~DocParser()
{
- public:
- AutoNodeStack(DocParser &parser,const DocNode* node)
- : m_parser(parser), m_node(node) { m_parser.context.nodeStack.push(node); }
- ~AutoNodeStack() {
-#if defined(NDEBUG)
- (void)m_node;
- if (!m_parser.context.nodeStack.empty()) m_parser.context.nodeStack.pop(); // robust version that does not assert
-#else
- assert(m_parser.context.nodeStack.top()==m_node); m_parser.context.nodeStack.pop(); // error checking version
-#endif
- }
-
- private:
- DocParser &m_parser;
- const DocNode *m_node;
-};
-
-//---------------------------------------------------------------------------
+ try
+ {
+ searchData.transfer();
+ }
+ catch(...)
+ {
+ err("Unexpected exception caught in DocParser\n");
+ }
+}
-//---------------------------------------------------------------------------
void DocParser::pushContext()
{
//QCString indent;
//---------------------------------------------------------------------------
-// replaces { with < and } with > and also
-// replaces > with < and > with > within string s
-static void unescapeCRef(QCString &s)
-{
- QCString result;
- const char *p = s.data();
- if (p)
- {
- char c;
- while ((c=*p++))
- {
- if (c=='{') c='<'; else if (c=='}') c='>';
- result+=c;
- }
- }
-
- result=substitute(result,"<","<");
- result=substitute(result,">",">");
- s = result;
-}
-
-//---------------------------------------------------------------------------
-
/*! search for an image in the imageNameDict and if found
* copies the image to the output directory (which depends on the \a type
* parameter).
int i;
if ((i=result.findRev('/'))!=-1 || (i=result.findRev('\\'))!=-1)
{
- result = result.right((int)result.length()-i-1);
+ result = result.right(static_cast<int>(result.length())-i-1);
}
//printf("fileName=%s result=%s\n",fileName,qPrint(result));
QCString outputDir;
}
}
-//---------------------------------------------------------------------------
-
-/*! Strips known html and tex extensions from \a text. */
-static QCString stripKnownExtensions(const QCString &text)
-{
- QCString result=text;
- if (result.right(4)==".tex")
- {
- result=result.left(result.length()-4);
- }
- else if (result.right(Doxygen::htmlFileExtension.length())==
- QCString(Doxygen::htmlFileExtension))
- {
- result=result.left(result.length()-Doxygen::htmlFileExtension.length());
- }
- return result;
-}
-
-
-//---------------------------------------------------------------------------
-
-/*! Returns TRUE iff node n is a child of a preformatted node */
-static bool insidePRE(DocNode *n)
-{
- while (n)
- {
- if (n->isPreformatted()) return TRUE;
- n=n->parent();
- }
- return FALSE;
-}
-
-//---------------------------------------------------------------------------
-
-/*! Returns TRUE iff node n is a child of a html list item node */
-static bool insideLI(DocNode *n)
-{
- while (n)
- {
- if (n->kind()==DocNode::Kind_HtmlListItem) return TRUE;
- n=n->parent();
- }
- return FALSE;
-}
-
-//---------------------------------------------------------------------------
-
-/*! Returns TRUE iff node n is a child of a unordered html list node */
-static bool insideUL(DocNode *n)
-{
- while (n)
- {
- if (n->kind()==DocNode::Kind_HtmlList &&
- ((DocHtmlList *)n)->type()==DocHtmlList::Unordered) return TRUE;
- n=n->parent();
- }
- return FALSE;
-}
//---------------------------------------------------------------------------
-/*! Returns TRUE iff node n is a child of a ordered html list node */
-static bool insideOL(DocNode *n)
-{
- while (n)
- {
- if (n->kind()==DocNode::Kind_HtmlList &&
- ((DocHtmlList *)n)->type()==DocHtmlList::Ordered) return TRUE;
- n=n->parent();
- }
- return FALSE;
-}
-
//---------------------------------------------------------------------------
-static bool insideTable(DocNode *n)
-{
- while (n)
- {
- if (n->kind()==DocNode::Kind_HtmlTable) return TRUE;
- n=n->parent();
- }
- return FALSE;
-}
-
-static const DocStyleChange *insideDetails(DocStyleChangeStack styleStack)
-{
- const DocStyleChange *retItem = NULL;
- for (auto i : styleStack)
- {
- if (i->style() == DocStyleChange::Details) retItem = i;
- }
- return retItem;
-}
//---------------------------------------------------------------------------
/*! Looks for a documentation block with name commandName in the current
* context (g_parserContext.context). The resulting documentation string is
// for symbols we need to normalize the separator, so A#B, or A\B, or A.B becomes A::B
cmdArg = substitute(cmdArg,"#","::");
cmdArg = substitute(cmdArg,"\\","::");
- static bool extractAnonNs = Config_getBool(EXTRACT_ANON_NSPACES);
+ bool extractAnonNs = Config_getBool(EXTRACT_ANON_NSPACES);
if (extractAnonNs &&
cmdArg.startsWith("anonymous_namespace{")
)
cmdArg = substitute(cmdArg,".","::");
}
- int l=(int)cmdArg.length();
+ int l=static_cast<int>(cmdArg.length());
int funcStart=cmdArg.find('(');
if (funcStart==-1)
}
- int scopeOffset=(int)context.context.length();
+ int scopeOffset=static_cast<int>(context.context.length());
do // for each scope
{
QCString fullName=cmdArg;
}
//---------------------------------------------------------------------------
-void DocParser::errorHandleDefaultToken(DocNode *parent,int tok,
+void DocParser::errorHandleDefaultToken(DocNodeVariant *parent,int tok,
DocNodeList &children,const QCString &txt)
{
const char *cmd_start = "\\";
cmd_start = "@";
// fall through
case TK_COMMAND_BS:
- children.push_back(std::make_unique<DocWord>(*this,parent,TK_COMMAND_CHAR(tok) + context.token->name));
- warn_doc_error(context.fileName,tokenizer.getLineNr(),"Illegal command %s as part of a %s",
+ children.append<DocWord>(this,parent,TK_COMMAND_CHAR(tok) + context.token->name);
+ warn_doc_error(context.fileName,tokenizer.getLineNr(),"Illegal command %s found as part of a %s",
qPrint(cmd_start + context.token->name),qPrint(txt));
break;
case TK_SYMBOL:
- warn_doc_error(context.fileName,tokenizer.getLineNr(),"Unsupported symbol %s found found as part of a %s",
+ warn_doc_error(context.fileName,tokenizer.getLineNr(),"Unsupported symbol %s found as part of a %s",
qPrint(context.token->name), qPrint(txt));
break;
default:
- children.push_back(std::make_unique<DocWord>(*this,parent,context.token->name));
+ children.append<DocWord>(this,parent,context.token->name);
warn_doc_error(context.fileName,tokenizer.getLineNr(),"Unexpected token %s found as part of a %s",
DocTokenizer::tokToString(tok), qPrint(txt));
break;
//---------------------------------------------------------------------------
-int DocParser::handleStyleArgument(DocNode *parent,DocNodeList &children,const QCString &cmdName)
+int DocParser::handleStyleArgument(DocNodeVariant *parent,DocNodeList &children,const QCString &cmdName)
{
DBG(("handleStyleArgument(%s)\n",qPrint(cmdName)));
QCString saveCmdName = cmdName;
/*! Called when a style change starts. For instance a \<b\> command is
* encountered.
*/
-void DocParser::handleStyleEnter(DocNode *parent,DocNodeList &children,
+void DocParser::handleStyleEnter(DocNodeVariant *parent,DocNodeList &children,
DocStyleChange::Style s,const QCString &tagName,const HtmlAttribList *attribs)
{
DBG(("HandleStyleEnter\n"));
- DocStyleChange *sc= new DocStyleChange(*this,parent,(uint)context.nodeStack.size(),s,tagName,TRUE,attribs);
- children.push_back(std::unique_ptr<DocStyleChange>(sc));
- context.styleStack.push(sc);
+ children.append<DocStyleChange>(this,parent,context.nodeStack.size(),s,tagName,TRUE,attribs);
+ context.styleStack.push(&children.back());
}
/*! Called when a style change ends. For instance a \</b\> command is
* encountered.
*/
-void DocParser::handleStyleLeave(DocNode *parent,DocNodeList &children,
+void DocParser::handleStyleLeave(DocNodeVariant *parent,DocNodeList &children,
DocStyleChange::Style s,const QCString &tagName)
{
DBG(("HandleStyleLeave\n"));
QCString tagNameLower = QCString(tagName).lower();
+
+ auto topStyleChange = [](const DocStyleChangeStack &stack) -> const DocStyleChange &
+ {
+ return std::get<DocStyleChange>(*stack.top());
+ };
+
if (context.styleStack.empty() || // no style change
- context.styleStack.top()->style()!=s || // wrong style change
- context.styleStack.top()->tagName()!=tagNameLower || // wrong style change
- context.styleStack.top()->position()!=context.nodeStack.size() // wrong position
+ topStyleChange(context.styleStack).style()!=s || // wrong style change
+ topStyleChange(context.styleStack).tagName()!=tagNameLower || // wrong style change
+ topStyleChange(context.styleStack).position()!=context.nodeStack.size() // wrong position
)
{
if (context.styleStack.empty())
warn_doc_error(context.fileName,tokenizer.getLineNr(),"found </%s> tag without matching <%s>",
qPrint(tagName),qPrint(tagName));
}
- else if (context.styleStack.top()->tagName()!=tagNameLower)
+ else if (topStyleChange(context.styleStack).tagName()!=tagNameLower)
{
warn_doc_error(context.fileName,tokenizer.getLineNr(),"found </%s> tag while expecting </%s>",
- qPrint(tagName),qPrint(context.styleStack.top()->tagName()));
+ qPrint(tagName),qPrint(topStyleChange(context.styleStack).tagName()));
}
- else if (context.styleStack.top()->style()!=s)
+ else if (topStyleChange(context.styleStack).style()!=s)
{
warn_doc_error(context.fileName,tokenizer.getLineNr(),"found </%s> tag while expecting </%s>",
- qPrint(tagName),qPrint(context.styleStack.top()->tagName()));
+ qPrint(tagName),qPrint(topStyleChange(context.styleStack).tagName()));
}
else
{
- warn_doc_error(context.fileName,tokenizer.getLineNr(),"found </%s> at different nesting level (%zu) than expected (%d)",
- qPrint(tagName),context.nodeStack.size(),context.styleStack.top()->position());
+ warn_doc_error(context.fileName,tokenizer.getLineNr(),"found </%s> at different nesting level (%zu) than expected (%zu)",
+ qPrint(tagName),context.nodeStack.size(),topStyleChange(context.styleStack).position());
}
}
else // end the section
{
- children.push_back(
- std::make_unique<DocStyleChange>(
- *this,parent,(uint)context.nodeStack.size(),s,context.styleStack.top()->tagName(),FALSE));
+ children.append<DocStyleChange>(
+ this,parent,context.nodeStack.size(),s,
+ topStyleChange(context.styleStack).tagName(),FALSE);
context.styleStack.pop();
}
}
* (e.g. a <b> without a </b>). The closed styles are pushed onto a stack
* and entered again at the start of a new paragraph.
*/
-void DocParser::handlePendingStyleCommands(DocNode *parent,DocNodeList &children)
+void DocParser::handlePendingStyleCommands(DocNodeVariant *parent,DocNodeList &children)
{
if (!context.styleStack.empty())
{
- const DocStyleChange *sc = context.styleStack.top();
+ const DocStyleChange *sc = &std::get<DocStyleChange>(*context.styleStack.top());
while (sc && sc->position()>=context.nodeStack.size())
{ // there are unclosed style modifiers in the paragraph
- children.push_back(std::make_unique<DocStyleChange>(*this,parent,(uint)context.nodeStack.size(),sc->style(),sc->tagName(),FALSE));
- context.initialStyleStack.push(sc);
+ children.append<DocStyleChange>(this,parent,context.nodeStack.size(),
+ sc->style(),sc->tagName(),FALSE);
+ context.initialStyleStack.push(context.styleStack.top());
context.styleStack.pop();
- sc = !context.styleStack.empty() ? context.styleStack.top() : 0;
+ sc = !context.styleStack.empty() ? &std::get<DocStyleChange>(*context.styleStack.top()) : 0;
}
}
}
-void DocParser::handleInitialStyleCommands(DocPara *parent,DocNodeList &children)
+void DocParser::handleInitialStyleCommands(DocNodeVariant *parent,DocNodeList &children)
{
while (!context.initialStyleStack.empty())
{
- const DocStyleChange *sc = context.initialStyleStack.top();
- handleStyleEnter(parent,children,sc->style(),sc->tagName(),&sc->attribs());
+ const DocStyleChange &sc = std::get<DocStyleChange>(*context.initialStyleStack.top());
+ handleStyleEnter(parent,children,sc.style(),sc.tagName(),&sc.attribs());
context.initialStyleStack.pop();
}
}
-int DocParser::handleAHref(DocNode *parent,DocNodeList &children,
+int DocParser::handleAHref(DocNodeVariant *parent,DocNodeList &children,
const HtmlAttribList &tagHtmlAttribs)
{
uint index=0;
{
if (!opt.value.isEmpty())
{
- children.push_back(std::make_unique<DocAnchor>(*this,parent,opt.value,TRUE));
+ children.append<DocAnchor>(this,parent,opt.value,TRUE);
break; // stop looking for other tag attribs
}
else
attrList.erase(attrList.begin()+index);
QCString relPath;
if (opt.value.at(0) != '#') relPath = context.relPath;
- DocHRef *href = new DocHRef(*this,parent,attrList,opt.value,relPath,convertNameToFile(context.fileName,FALSE,TRUE));
- children.push_back(std::unique_ptr<DocHRef>(href));
+ auto vDocHRef = children.append<DocHRef>(this, parent, attrList,
+ opt.value, relPath,
+ convertNameToFile(context.fileName, FALSE, TRUE));
+ DocHRef *href = children.get_last<DocHRef>();
context.insideHtmlLink=TRUE;
- retval = href->parse();
+ retval = href->parse(vDocHRef);
context.insideHtmlLink=FALSE;
break;
}
return retval;
}
-const char *DocStyleChange::styleString() const
-{
- switch (m_style)
- {
- case DocStyleChange::Bold: return "b";
- case DocStyleChange::Italic: return "em";
- case DocStyleChange::Code: return "code";
- case DocStyleChange::Center: return "center";
- case DocStyleChange::Small: return "small";
- case DocStyleChange::Cite: return "cite";
- case DocStyleChange::Subscript: return "subscript";
- case DocStyleChange::Superscript: return "superscript";
- case DocStyleChange::Preformatted: return "pre";
- case DocStyleChange::Div: return "div";
- case DocStyleChange::Span: return "span";
- case DocStyleChange::Strike: return "strike";
- case DocStyleChange::S: return "s";
- case DocStyleChange::Del: return "del";
- case DocStyleChange::Underline: return "u";
- case DocStyleChange::Ins: return "ins";
- case DocStyleChange::Details: return "details";
- case DocStyleChange::Summary: return "summary";
- }
- return "<invalid>";
-}
-
void DocParser::handleUnclosedStyleCommands()
{
if (!context.initialStyleStack.empty())
{
- const DocStyleChange *sc = context.initialStyleStack.top();
+ QCString tagName = std::get<DocStyleChange>(*context.initialStyleStack.top()).tagName();
context.initialStyleStack.pop();
handleUnclosedStyleCommands();
warn_doc_error(context.fileName,tokenizer.getLineNr(),
"end of comment block while expecting "
- "command </%s>",qPrint(sc->tagName()));
+ "command </%s>",qPrint(tagName));
}
}
-void DocParser::handleLinkedWord(DocNode *parent,DocNodeList &children,bool ignoreAutoLinkFlag)
+void DocParser::handleLinkedWord(DocNodeVariant *parent,DocNodeList &children,bool ignoreAutoLinkFlag)
{
QCString name = linkToText(SrcLangExt_Unknown,context.token->name,TRUE);
- static bool autolinkSupport = Config_getBool(AUTOLINK_SUPPORT);
+ bool autolinkSupport = Config_getBool(AUTOLINK_SUPPORT);
if (!autolinkSupport && !ignoreAutoLinkFlag) // no autolinking -> add as normal word
{
- children.push_back(std::make_unique<DocWord>(*this,parent,name));
+ children.append<DocWord>(this,parent,name);
return;
}
bool localLink = context.memberDef ? member->getClassDef()==context.memberDef->getClassDef() : FALSE;
name = member->objCMethodName(localLink,context.inSeeBlock);
}
- children.push_back(
- std::make_unique<DocLinkedWord>(
- *this,parent,name,
+ children.append<DocLinkedWord>(
+ this,parent,name,
member->getReference(),
member->getOutputFileBase(),
member->anchor(),
- member->briefDescriptionAsTooltip()));
+ member->briefDescriptionAsTooltip());
}
else if (compound->isLinkable()) // compound link
{
{
name=toGroupDef(compound)->groupTitle();
}
- children.push_back(
- std::make_unique<DocLinkedWord>(
- *this,parent,name,
+ children.append<DocLinkedWord>(
+ this,parent,name,
compound->getReference(),
compound->getOutputFileBase(),
anchor,
- compound->briefDescriptionAsTooltip()));
+ compound->briefDescriptionAsTooltip());
}
else if (compound->definitionType()==Definition::TypeFile &&
(toFileDef(compound))->generateSourceFile()
) // undocumented file that has source code we can link to
{
- children.push_back(
- std::make_unique<DocLinkedWord>(
- *this,parent,context.token->name,
+ children.append<DocLinkedWord>(
+ this,parent,context.token->name,
compound->getReference(),
compound->getSourceFileBase(),
"",
- compound->briefDescriptionAsTooltip()));
+ compound->briefDescriptionAsTooltip());
}
else // not linkable
{
- children.push_back(std::make_unique<DocWord>(*this,parent,name));
+ children.append<DocWord>(this,parent,name);
}
}
else if (!context.insideHtmlLink && len>1 && context.token->name.at(len-1)==':')
// but Foo itself might be linkable.
context.token->name=context.token->name.left(len-1);
handleLinkedWord(parent,children,ignoreAutoLinkFlag);
- children.push_back(std::make_unique<DocWord>(*this,parent,":"));
+ children.append<DocWord>(this,parent,":");
}
else if (!context.insideHtmlLink && (cd=getClass(context.token->name+"-p")))
{
// special case 2, where the token name is not a class, but could
// be a Obj-C protocol
- children.push_back(
- std::make_unique<DocLinkedWord>(
- *this,parent,name,
+ children.append<DocLinkedWord>(
+ this,parent,name,
cd->getReference(),
cd->getOutputFileBase(),
cd->anchor(),
- cd->briefDescriptionAsTooltip()));
+ cd->briefDescriptionAsTooltip());
}
else // normal non-linkable word
{
if (context.token->name.left(1)=="#" || context.token->name.left(2)=="::")
{
warn_doc_error(context.fileName,tokenizer.getLineNr(),"explicit link request to '%s' could not be resolved",qPrint(name));
- children.push_back(std::make_unique<DocWord>(*this,parent,context.token->name));
+ children.append<DocWord>(this,parent,context.token->name);
}
else
{
- children.push_back(std::make_unique<DocWord>(*this,parent,name));
+ children.append<DocWord>(this,parent,name);
}
}
}
-void DocParser::handleParameterType(DocNode *parent,DocNodeList &children,const QCString ¶mTypes)
+void DocParser::handleParameterType(DocNodeVariant *parent,DocNodeList &children,const QCString ¶mTypes)
{
QCString name = context.token->name; // save token name
QCString name1;
ii=name1.find('[');
context.token->name=ii!=-1 ? name1.mid(0,ii) : name1; // take part without []
handleLinkedWord(parent,children);
- if (ii!=-1) children.push_back(std::make_unique<DocWord>(*this,parent,name1.mid(ii))); // add [] part
+ if (ii!=-1) children.append<DocWord>(this,parent,name1.mid(ii)); // add [] part
p=i+1;
- children.push_back(std::make_unique<DocSeparator>(*this,parent,"|"));
+ children.append<DocSeparator>(this,parent,"|");
}
name1 = paramTypes.mid(p);
ii=name1.find('[');
context.token->name=ii!=-1 ? name1.mid(0,ii) : name1;
handleLinkedWord(parent,children);
- if (ii!=-1) children.push_back(std::make_unique<DocWord>(*this,parent,name1.mid(ii)));
+ if (ii!=-1) children.append<DocWord>(this,parent,name1.mid(ii));
context.token->name = name; // restore original token name
}
-DocInternalRef *DocParser::handleInternalRef(DocNode *parent)
+void DocParser::handleInternalRef(DocNodeVariant *parent,DocNodeList &children)
{
//printf("CMD_INTERNALREF\n");
int tok=tokenizer.lex();
{
warn_doc_error(context.fileName,tokenizer.getLineNr(),"expected whitespace after \\%s command",
qPrint(tokenName));
- return 0;
+ return;
}
tokenizer.setStateInternalRef();
tok=tokenizer.lex(); // get the reference id
{
warn_doc_error(context.fileName,tokenizer.getLineNr(),"unexpected token %s as the argument of %s",
DocTokenizer::tokToString(tok),qPrint(tokenName));
- return 0;
+ return;
}
- return new DocInternalRef(*this,parent,context.token->name);
+ auto vDocInternalRef = children.append<DocInternalRef>(this,parent,context.token->name);
+ children.get_last<DocInternalRef>()->parse(vDocInternalRef);
}
-DocAnchor *DocParser::handleAnchor(DocNode *parent)
+void DocParser::handleAnchor(DocNodeVariant *parent,DocNodeList &children)
{
int tok=tokenizer.lex();
if (tok!=TK_WHITESPACE)
{
warn_doc_error(context.fileName,tokenizer.getLineNr(),"expected whitespace after \\%s command",
qPrint(context.token->name));
- return 0;
+ return;
}
tokenizer.setStateAnchor();
tok=tokenizer.lex();
{
warn_doc_error(context.fileName,tokenizer.getLineNr(),"unexpected end of comment block while parsing the "
"argument of command %s",qPrint(context.token->name));
- return 0;
+ return;
}
else if (tok!=TK_WORD && tok!=TK_LNKWORD)
{
warn_doc_error(context.fileName,tokenizer.getLineNr(),"unexpected token %s as the argument of %s",
DocTokenizer::tokToString(tok),qPrint(context.token->name));
- return 0;
+ return;
}
tokenizer.setStatePara();
- return new DocAnchor(*this,parent,context.token->name,FALSE);
+ children.append<DocAnchor>(this,parent,context.token->name,FALSE);
}
* @param[out] width the extracted width specifier
* @param[out] height the extracted height specifier
*/
-void DocParser::defaultHandleTitleAndSize(const int cmd, DocNode *parent, DocNodeList &children, QCString &width,QCString &height)
+void DocParser::defaultHandleTitleAndSize(const int cmd, DocNodeVariant *parent, DocNodeList &children, QCString &width,QCString &height)
{
- auto ns = AutoNodeStack(*this,parent);
+ auto ns = AutoNodeStack(this,parent);
// parse title
tokenizer.setStateTitle();
handlePendingStyleCommands(parent,children);
}
+void DocParser::handleImage(DocNodeVariant *parent, DocNodeList &children)
+{
+ bool inlineImage = false;
+ QCString anchorStr;
+
+ int tok=tokenizer.lex();
+ if (tok!=TK_WHITESPACE)
+ {
+ if (tok==TK_WORD)
+ {
+ if (context.token->name == "{")
+ {
+ tokenizer.setStateOptions();
+ tok=tokenizer.lex();
+ tokenizer.setStatePara();
+ StringVector optList=split(context.token->name.str(),",");
+ for (const auto &opt : optList)
+ {
+ if (opt.empty()) continue;
+ QCString locOpt(opt);
+ QCString locOptLow;
+ locOpt = locOpt.stripWhiteSpace();
+ locOptLow = locOpt.lower();
+ if (locOptLow == "inline")
+ {
+ inlineImage = true;
+ }
+ else if (locOptLow.startsWith("anchor:"))
+ {
+ if (!anchorStr.isEmpty())
+ {
+ warn_doc_error(context.fileName,tokenizer.getLineNr(),
+ "multiple use of option 'anchor' for 'image' command, ignoring: '%s'",
+ qPrint(locOpt.mid(7)));
+ }
+ else
+ {
+ anchorStr = locOpt.mid(7);
+ }
+ }
+ else
+ {
+ warn_doc_error(context.fileName,tokenizer.getLineNr(),
+ "unknown option '%s' for 'image' command specified",
+ qPrint(locOpt));
+ }
+ }
+ tok=tokenizer.lex();
+ if (tok!=TK_WHITESPACE)
+ {
+ warn_doc_error(context.fileName,tokenizer.getLineNr(),"expected whitespace after \\image command");
+ return;
+ }
+ }
+ }
+ else
+ {
+ warn_doc_error(context.fileName,tokenizer.getLineNr(),"expected whitespace after \\image command");
+ return;
+ }
+ }
+ tok=tokenizer.lex();
+ if (tok!=TK_WORD && tok!=TK_LNKWORD)
+ {
+ warn_doc_error(context.fileName,tokenizer.getLineNr(),"unexpected token %s as the argument of \\image",
+ DocTokenizer::tokToString(tok));
+ return;
+ }
+ tok=tokenizer.lex();
+ if (tok!=TK_WHITESPACE)
+ {
+ warn_doc_error(context.fileName,tokenizer.getLineNr(),"expected whitespace after \\image command");
+ return;
+ }
+ DocImage::Type t;
+ QCString imgType = context.token->name.lower();
+ if (imgType=="html") t=DocImage::Html;
+ else if (imgType=="latex") t=DocImage::Latex;
+ else if (imgType=="docbook") t=DocImage::DocBook;
+ else if (imgType=="rtf") t=DocImage::Rtf;
+ else if (imgType=="xml") t=DocImage::Xml;
+ else
+ {
+ warn_doc_error(context.fileName,tokenizer.getLineNr(),"output format `%s` specified as the first argument of "
+ "\\image command is not valid",
+ qPrint(imgType));
+ return;
+ }
+ tokenizer.setStateFile();
+ tok=tokenizer.lex();
+ tokenizer.setStatePara();
+ if (tok!=TK_WORD)
+ {
+ warn_doc_error(context.fileName,tokenizer.getLineNr(),"unexpected token %s as the argument of \\image",
+ DocTokenizer::tokToString(tok));
+ return;
+ }
+ if (!anchorStr.isEmpty())
+ {
+ children.append<DocAnchor>(this,parent,anchorStr,true);
+ }
+ HtmlAttribList attrList;
+ auto vDocImage = children.append<DocImage>(this,parent,attrList,
+ findAndCopyImage(context.token->name,t),t,"",inlineImage);
+ children.get_last<DocImage>()->parse(vDocImage);
+}
+
+
/* Helper function that deals with the most common tokens allowed in
* title like sections.
* @param parent Parent node, owner of the children list passed as
* @retval TRUE The token was handled.
* @retval FALSE The token was not handled.
*/
-bool DocParser::defaultHandleToken(DocNode *parent,int tok, DocNodeList &children,bool handleWord)
+bool DocParser::defaultHandleToken(DocNodeVariant *parent,int tok, DocNodeList &children,bool handleWord)
{
DBG(("token %s at %d",DocTokenizer::tokToString(tok),tokenizer.getLineNr()));
if (tok==TK_WORD || tok==TK_LNKWORD || tok==TK_SYMBOL || tok==TK_URL ||
switch (Mappers::cmdMapper->map(tokenName))
{
case CMD_BSLASH:
- children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_BSlash));
+ children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_BSlash);
break;
case CMD_AT:
- children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_At));
+ children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_At);
break;
case CMD_LESS:
- children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Less));
+ children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Less);
break;
case CMD_GREATER:
- children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Greater));
+ children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Greater);
break;
case CMD_AMP:
- children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Amp));
+ children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Amp);
break;
case CMD_DOLLAR:
- children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Dollar));
+ children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Dollar);
break;
case CMD_HASH:
- children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Hash));
+ children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Hash);
break;
case CMD_DCOLON:
- children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_DoubleColon));
+ children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_DoubleColon);
break;
case CMD_PERCENT:
- children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Percent));
+ children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Percent);
break;
case CMD_NDASH:
- children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Minus));
- children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Minus));
+ children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Minus);
+ children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Minus);
break;
case CMD_MDASH:
- children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Minus));
- children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Minus));
- children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Minus));
+ children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Minus);
+ children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Minus);
+ children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Minus);
break;
case CMD_QUOTE:
- children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Quot));
+ children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Quot);
break;
case CMD_PUNT:
- children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Dot));
+ children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Dot);
break;
case CMD_PLUS:
- children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Plus));
+ children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Plus);
break;
case CMD_MINUS:
- children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Minus));
+ children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Minus);
break;
case CMD_EQUAL:
- children.push_back(std::make_unique<DocSymbol>(*this,parent,DocSymbol::Sym_Equal));
+ children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Equal);
break;
case CMD_EMPHASIS:
{
- children.push_back(std::make_unique<DocStyleChange>(*this,parent,(uint)context.nodeStack.size(),DocStyleChange::Italic,tokenName,TRUE));
+ children.append<DocStyleChange>(this,parent,context.nodeStack.size(),DocStyleChange::Italic,tokenName,TRUE);
tok=handleStyleArgument(parent,children,tokenName);
- children.push_back(std::make_unique<DocStyleChange>(*this,parent,(uint)context.nodeStack.size(),DocStyleChange::Italic,tokenName,FALSE));
- if (tok!=TK_WORD) children.push_back(std::make_unique<DocWhiteSpace>(*this,parent," "));
+ children.append<DocStyleChange>(this,parent,context.nodeStack.size(),DocStyleChange::Italic,tokenName,FALSE);
+ if (tok!=TK_WORD) children.append<DocWhiteSpace>(this,parent," ");
if (tok==TK_NEWPARA) goto handlepara;
else if (tok==TK_WORD || tok==TK_HTMLTAG)
{
break;
case CMD_BOLD:
{
- children.push_back(std::make_unique<DocStyleChange>(*this,parent,(uint)context.nodeStack.size(),DocStyleChange::Bold,tokenName,TRUE));
+ children.append<DocStyleChange>(this,parent,context.nodeStack.size(),DocStyleChange::Bold,tokenName,TRUE);
tok=handleStyleArgument(parent,children,tokenName);
- children.push_back(std::make_unique<DocStyleChange>(*this,parent,(uint)context.nodeStack.size(),DocStyleChange::Bold,tokenName,FALSE));
- if (tok!=TK_WORD) children.push_back(std::make_unique<DocWhiteSpace>(*this,parent," "));
+ children.append<DocStyleChange>(this,parent,context.nodeStack.size(),DocStyleChange::Bold,tokenName,FALSE);
+ if (tok!=TK_WORD) children.append<DocWhiteSpace>(this,parent," ");
if (tok==TK_NEWPARA) goto handlepara;
else if (tok==TK_WORD || tok==TK_HTMLTAG)
{
break;
case CMD_CODE:
{
- children.push_back(std::make_unique<DocStyleChange>(*this,parent,(uint)context.nodeStack.size(),DocStyleChange::Code,tokenName,TRUE));
+ children.append<DocStyleChange>(this,parent,context.nodeStack.size(),DocStyleChange::Code,tokenName,TRUE);
tok=handleStyleArgument(parent,children,tokenName);
- children.push_back(std::make_unique<DocStyleChange>(*this,parent,(uint)context.nodeStack.size(),DocStyleChange::Code,tokenName,FALSE));
- if (tok!=TK_WORD) children.push_back(std::make_unique<DocWhiteSpace>(*this,parent," "));
+ children.append<DocStyleChange>(this,parent,context.nodeStack.size(),DocStyleChange::Code,tokenName,FALSE);
+ if (tok!=TK_WORD) children.append<DocWhiteSpace>(this,parent," ");
if (tok==TK_NEWPARA) goto handlepara;
else if (tok==TK_WORD || tok==TK_HTMLTAG)
{
{
tokenizer.setStateHtmlOnly();
tok = tokenizer.lex();
- children.push_back(std::make_unique<DocVerbatim>(*this,parent,context.context,context.token->verb,DocVerbatim::HtmlOnly,context.isExample,context.exampleName,context.token->name=="block"));
+ children.append<DocVerbatim>(this,parent,context.context,context.token->verb,DocVerbatim::HtmlOnly,context.isExample,context.exampleName,context.token->name=="block");
if (tok==0) warn_doc_error(context.fileName,tokenizer.getLineNr(),"htmlonly section ended without end marker");
tokenizer.setStatePara();
}
{
tokenizer.setStateManOnly();
tok = tokenizer.lex();
- children.push_back(std::make_unique<DocVerbatim>(*this,parent,context.context,context.token->verb,DocVerbatim::ManOnly,context.isExample,context.exampleName));
+ children.append<DocVerbatim>(this,parent,context.context,context.token->verb,DocVerbatim::ManOnly,context.isExample,context.exampleName);
if (tok==0) warn_doc_error(context.fileName,tokenizer.getLineNr(),"manonly section ended without end marker");
tokenizer.setStatePara();
}
{
tokenizer.setStateRtfOnly();
tok = tokenizer.lex();
- children.push_back(std::make_unique<DocVerbatim>(*this,parent,context.context,context.token->verb,DocVerbatim::RtfOnly,context.isExample,context.exampleName));
+ children.append<DocVerbatim>(this,parent,context.context,context.token->verb,DocVerbatim::RtfOnly,context.isExample,context.exampleName);
if (tok==0) warn_doc_error(context.fileName,tokenizer.getLineNr(),"rtfonly section ended without end marker");
tokenizer.setStatePara();
}
{
tokenizer.setStateLatexOnly();
tok = tokenizer.lex();
- children.push_back(std::make_unique<DocVerbatim>(*this,parent,context.context,context.token->verb,DocVerbatim::LatexOnly,context.isExample,context.exampleName));
+ children.append<DocVerbatim>(this,parent,context.context,context.token->verb,DocVerbatim::LatexOnly,context.isExample,context.exampleName);
if (tok==0) warn_doc_error(context.fileName,tokenizer.getLineNr(),"latexonly section ended without end marker");
tokenizer.setStatePara();
}
{
tokenizer.setStateXmlOnly();
tok = tokenizer.lex();
- children.push_back(std::make_unique<DocVerbatim>(*this,parent,context.context,context.token->verb,DocVerbatim::XmlOnly,context.isExample,context.exampleName));
+ children.append<DocVerbatim>(this,parent,context.context,context.token->verb,DocVerbatim::XmlOnly,context.isExample,context.exampleName);
if (tok==0) warn_doc_error(context.fileName,tokenizer.getLineNr(),"xmlonly section ended without end marker");
tokenizer.setStatePara();
}
{
tokenizer.setStateDbOnly();
tok = tokenizer.lex();
- children.push_back(std::make_unique<DocVerbatim>(*this,parent,context.context,context.token->verb,DocVerbatim::DocbookOnly,context.isExample,context.exampleName));
+ children.append<DocVerbatim>(this,parent,context.context,context.token->verb,DocVerbatim::DocbookOnly,context.isExample,context.exampleName);
if (tok==0) warn_doc_error(context.fileName,tokenizer.getLineNr(),"docbookonly section ended without end marker");
tokenizer.setStatePara();
}
break;
case CMD_FORMULA:
{
- children.push_back(std::make_unique<DocFormula>(*this,parent,context.token->id));
+ children.append<DocFormula>(this,parent,context.token->id);
}
break;
case CMD_ANCHOR:
{
- DocAnchor *anchor = handleAnchor(parent);
- if (anchor)
- {
- children.push_back(std::unique_ptr<DocAnchor>(anchor));
- }
+ handleAnchor(parent,children);
}
break;
case CMD_INTERNALREF:
{
- DocInternalRef *ref = handleInternalRef(parent);
- if (ref)
- {
- children.push_back(std::unique_ptr<DocInternalRef>(ref));
- ref->parse();
- }
+ handleInternalRef(parent,children);
tokenizer.setStatePara();
}
break;
}
break;
case CMD_IMAGE:
- ((DocPara *)parent) -> handleImage("image");
+ handleImage(parent,children);
break;
default:
return FALSE;
break;
case TK_SYMBOL:
{
- DocSymbol::SymType s = DocSymbol::decodeSymbol(tokenName);
- if (s!=DocSymbol::Sym_Unknown)
+ HtmlEntityMapper::SymType s = DocSymbol::decodeSymbol(tokenName);
+ if (s!=HtmlEntityMapper::Sym_Unknown)
{
- children.push_back(std::make_unique<DocSymbol>(*this,parent,s));
+ children.append<DocSymbol>(this,parent,s);
}
else
{
handlepara:
if (insidePRE(parent) || !children.empty())
{
- children.push_back(std::make_unique<DocWhiteSpace>(*this,parent,context.token->chars));
+ children.append<DocWhiteSpace>(this,parent,context.token->chars);
}
break;
case TK_LNKWORD:
case TK_WORD:
if (handleWord)
{
- children.push_back(std::make_unique<DocWord>(*this,parent,context.token->name));
+ children.append<DocWord>(this,parent,context.token->name);
}
else
return FALSE;
case TK_URL:
if (context.insideHtmlLink)
{
- children.push_back(std::make_unique<DocWord>(*this,parent,context.token->name));
+ children.append<DocWord>(this,parent,context.token->name);
}
else
{
- children.push_back(std::make_unique<DocURL>(*this,parent,context.token->name,context.token->isEMailAddr));
+ children.append<DocURL>(this,parent,context.token->name,context.token->isEMailAddr);
}
break;
default:
//---------------------------------------------------------------------------
-void DocParser::handleImg(DocNode *parent, DocNodeList &children,const HtmlAttribList &tagHtmlAttribs)
+void DocParser::handleImg(DocNodeVariant *parent, DocNodeList &children,const HtmlAttribList &tagHtmlAttribs)
{
bool found=FALSE;
uint index=0;
// and remove the src attribute
attrList.erase(attrList.begin()+index);
DocImage::Type t = DocImage::Html;
- children.push_back(
- std::make_unique<DocImage>(
- *this,parent,attrList,
+ children.append<DocImage>(
+ this,parent,attrList,
findAndCopyImage(opt.value,t,false),
- t,opt.value));
+ t,opt.value);
found = TRUE;
}
++index;
//---------------------------------------------------------------------------
-DocSymbol::SymType DocSymbol::decodeSymbol(const QCString &symName)
-{
- DBG(("decodeSymbol(%s)\n",qPrint(symName)));
- return HtmlEntityMapper::instance()->name2sym(symName);
-}
-
-//---------------------------------------------------------------------------
-
-DocEmoji::DocEmoji(DocParser &parser,DocNode *parent,const QCString &symName) :
- DocNode(parser), m_symName(symName), m_index(-1)
-{
- m_parent = parent;
- QCString locSymName = symName;
- uint len=locSymName.length();
- if (len>0)
- {
- if (locSymName.at(len-1)!=':') locSymName.append(":");
- if (locSymName.at(0)!=':') locSymName.prepend(":");
- }
- m_symName = locSymName;
- m_index = EmojiEntityMapper::instance()->symbol2index(m_symName.str());
- if (m_index==-1)
- {
- warn_doc_error(parser.context.fileName,parser.tokenizer.getLineNr(),"Found unsupported emoji symbol '%s'\n",qPrint(m_symName));
- }
-}
-
-//---------------------------------------------------------------------------
-
-int DocParser::internalValidatingParseDoc(DocNode *parent,DocNodeList &children,
+int DocParser::internalValidatingParseDoc(DocNodeVariant *parent,DocNodeList &children,
const QCString &doc)
{
int retval = RetVal_OK;
// first parse any number of paragraphs
bool isFirst=TRUE;
- DocPara *lastPar=0;
- if (!children.empty() && children.back()->kind()==DocNode::Kind_Para)
+ DocPara *lastPar=!children.empty() ? std::get_if<DocPara>(&children.back()): 0;
+ if (lastPar)
{ // last child item was a paragraph
- lastPar = (DocPara*)children.back().get();
isFirst=FALSE;
}
do
{
- DocPara *par = new DocPara(*this,parent);
+ auto vDocPara = children.append<DocPara>(this,parent);
+ DocPara *par = children.get_last<DocPara>();
if (isFirst) { par->markFirst(); isFirst=FALSE; }
- retval=par->parse();
+ retval=par->parse(vDocPara);
if (!par->isEmpty())
{
- children.push_back(std::unique_ptr<DocNode>(par));
if (lastPar) lastPar->markLast(FALSE);
lastPar=par;
}
else
{
- delete par;
+ children.pop_back();
}
} while (retval==TK_NEWPARA);
if (lastPar) lastPar->markLast();
//---------------------------------------------------------------------------
-DocWord::DocWord(DocParser &parser,DocNode *parent,const QCString &word) :
- DocNode(parser), m_word(word)
+IDocNodeASTPtr validatingParseDoc(IDocParser &parserIntf,
+ const QCString &fileName,int startLine,
+ const Definition *ctx,const MemberDef *md,
+ const QCString &input,bool indexWords,
+ bool isExample, const QCString &exampleName,
+ bool singleLine, bool linkFromIndex,
+ bool markdownSupport)
{
- m_parent = parent;
- //printf("new word %s url=%s\n",qPrint(word),qPrint(parser.context.searchUrl));
- if (Doxygen::searchIndex && !parser.context.searchUrl.isEmpty())
- {
- Doxygen::searchIndex->addWord(word,FALSE);
- }
-}
+ DocParser *parser = dynamic_cast<DocParser*>(&parserIntf);
+ assert(parser!=0);
+ if (parser==0) return 0;
+ //printf("validatingParseDoc(%s,%s)=[%s]\n",ctx?qPrint(ctx->name()):"<none>",
+ // md?qPrint(md->name()):"<none>",
+ // input);
+ //printf("========== validating %s at line %d\n",qPrint(fileName),startLine);
+ //printf("---------------- input --------------------\n%s\n----------- end input -------------------\n",qPrint(input));
+ //parser->context.token = new TokenInfo;
-//---------------------------------------------------------------------------
+ // store parser state so we can re-enter this function if needed
+ //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ parser->pushContext();
-DocLinkedWord::DocLinkedWord(DocParser &parser,DocNode *parent,const QCString &word,
- const QCString &ref,const QCString &file,
- const QCString &anchor,const QCString &tooltip) :
- DocNode(parser), m_word(word), m_ref(ref),
- m_file(file), m_relPath(parser.context.relPath), m_anchor(anchor),
- m_tooltip(tooltip)
-{
- m_parent = parent;
- //printf("DocLinkedWord: new word %s url=%s tooltip='%s'\n",
- // qPrint(word),qPrint(parser.context.searchUrl),qPrint(tooltip));
- if (Doxygen::searchIndex && !parser.context.searchUrl.isEmpty())
+ if (ctx && ctx!=Doxygen::globalScope &&
+ (ctx->definitionType()==Definition::TypeClass ||
+ ctx->definitionType()==Definition::TypeNamespace
+ )
+ )
{
- Doxygen::searchIndex->addWord(word,FALSE);
- }
-}
-
-//---------------------------------------------------------------------------
-
-DocAnchor::DocAnchor(DocParser &parser,DocNode *parent,const QCString &id,bool newAnchor) : DocNode(parser)
-{
- m_parent = parent;
- if (id.isEmpty())
- {
- warn_doc_error(parser.context.fileName,parser.tokenizer.getLineNr(),"Empty anchor label");
- return;
- }
-
- const CitationManager &ct = CitationManager::instance();
- QCString anchorPrefix = ct.anchorPrefix();
- if (id.left(anchorPrefix.length()) == anchorPrefix)
- {
- const CiteInfo *cite = ct.find(id.mid(anchorPrefix.length()));
- if (cite)
- {
- m_file = convertNameToFile(ct.fileName(),FALSE,TRUE);
- m_anchor = id;
- }
- else
- {
- warn_doc_error(parser.context.fileName,parser.tokenizer.getLineNr(),"Invalid cite anchor id '%s'",qPrint(id));
- m_anchor = "invalid";
- m_file = "invalid";
- }
- }
- else if (newAnchor) // found <a name="label">
- {
- m_anchor = id;
- }
- else // found \anchor label
- {
- const SectionInfo *sec = SectionManager::instance().find(id);
- if (sec)
- {
- //printf("Found anchor %s\n",qPrint(id));
- m_file = sec->fileName();
- m_anchor = sec->label();
- }
- else
- {
- warn_doc_error(parser.context.fileName,parser.tokenizer.getLineNr(),"Invalid anchor id '%s'",qPrint(id));
- m_anchor = "invalid";
- m_file = "invalid";
- }
- }
-}
-
-//---------------------------------------------------------------------------
-
-DocVerbatim::DocVerbatim(DocParser &parser,DocNode *parent,const QCString &context,
- const QCString &text, Type t,bool isExample,
- const QCString &exampleFile,bool isBlock,const QCString &lang)
- : DocNode(parser), m_context(context), m_text(text), m_type(t),
- m_isExample(isExample), m_exampleFile(exampleFile),
- m_relPath(parser.context.relPath), m_lang(lang), m_isBlock(isBlock)
-{
- m_parent = parent;
-}
-
-
-//---------------------------------------------------------------------------
-
-void DocInclude::parse()
-{
- DBG(("DocInclude::parse(file=%s,text=%s)\n",qPrint(m_file),qPrint(m_text)));
- switch(m_type)
- {
- case DontIncWithLines:
- // fall through
- case IncWithLines:
- // fall through
- case Include:
- // fall through
- case DontInclude:
- m_parser.readTextFileByName(m_file,m_text);
- m_parser.context.includeFileName = m_file;
- m_parser.context.includeFileText = m_text;
- m_parser.context.includeFileOffset = 0;
- m_parser.context.includeFileLength = m_text.length();
- m_parser.context.includeFileLine = 0;
- m_parser.context.includeFileShowLineNo = (m_type == DontIncWithLines || m_type == IncWithLines);
- //printf("parser.context.includeFile=<<%s>>\n",qPrint(parser.context.includeFileText));
- break;
- case VerbInclude:
- // fall through
- case HtmlInclude:
- case LatexInclude:
- case DocInclude::RtfInclude:
- case DocInclude::ManInclude:
- case DocInclude::XmlInclude:
- case DocInclude::DocbookInclude:
- m_parser.readTextFileByName(m_file,m_text);
- break;
- case Snippet:
- case SnipWithLines:
- m_parser.readTextFileByName(m_file,m_text);
- // check here for the existence of the blockId inside the file, so we
- // only generate the warning once.
- int count;
- if (!m_blockId.isEmpty() && (count=m_text.contains(m_blockId.data()))!=2)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"block marked with %s for \\snippet should appear twice in file %s, found it %d times\n",
- qPrint(m_blockId),qPrint(m_file),count);
- }
- break;
- case DocInclude::SnippetDoc:
- case DocInclude::IncludeDoc:
- err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
- "Please create a bug report\n",__FILE__);
- break;
- }
-}
-
-//---------------------------------------------------------------------------
-
-void DocIncOperator::parse()
-{
- if (m_parser.context.includeFileName.isEmpty())
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),
- "No previous '\\include' or '\\dontinclude' command for '\\%s' present",
- typeAsString());
- }
-
- m_includeFileName = m_parser.context.includeFileName;
- const char *p = m_parser.context.includeFileText.data();
- uint l = m_parser.context.includeFileLength;
- uint o = m_parser.context.includeFileOffset;
- int il = m_parser.context.includeFileLine;
- DBG(("DocIncOperator::parse() text=%s off=%d len=%d\n",p,o,l));
- uint so = o,bo;
- bool nonEmpty = FALSE;
- switch(type())
- {
- case Line:
- while (o<l)
- {
- char c = p[o];
- if (c=='\n')
- {
- m_parser.context.includeFileLine++;
- if (nonEmpty) break; // we have a pattern to match
- so=o+1; // no pattern, skip empty line
- }
- else if (!isspace((uchar)c)) // no white space char
- {
- nonEmpty=TRUE;
- }
- o++;
- }
- if (m_parser.context.includeFileText.mid(so,o-so).find(m_pattern)!=-1)
- {
- m_line = il;
- m_text = m_parser.context.includeFileText.mid(so,o-so);
- DBG(("DocIncOperator::parse() Line: %s\n",qPrint(m_text)));
- }
- m_parser.context.includeFileOffset = std::min(l,o+1); // set pointer to start of new line
- m_showLineNo = m_parser.context.includeFileShowLineNo;
- break;
- case SkipLine:
- while (o<l)
- {
- so=o;
- while (o<l)
- {
- char c = p[o];
- if (c=='\n')
- {
- m_parser.context.includeFileLine++;
- if (nonEmpty) break; // we have a pattern to match
- so=o+1; // no pattern, skip empty line
- }
- else if (!isspace((uchar)c)) // no white space char
- {
- nonEmpty=TRUE;
- }
- o++;
- }
- if (m_parser.context.includeFileText.mid(so,o-so).find(m_pattern)!=-1)
- {
- m_line = il;
- m_text = m_parser.context.includeFileText.mid(so,o-so);
- DBG(("DocIncOperator::parse() SkipLine: %s\n",qPrint(m_text)));
- break;
- }
- o++; // skip new line
- }
- m_parser.context.includeFileOffset = std::min(l,o+1); // set pointer to start of new line
- m_showLineNo = m_parser.context.includeFileShowLineNo;
- break;
- case Skip:
- while (o<l)
- {
- so=o;
- while (o<l)
- {
- char c = p[o];
- if (c=='\n')
- {
- m_parser.context.includeFileLine++;
- if (nonEmpty) break; // we have a pattern to match
- so=o+1; // no pattern, skip empty line
- }
- else if (!isspace((uchar)c)) // no white space char
- {
- nonEmpty=TRUE;
- }
- o++;
- }
- if (m_parser.context.includeFileText.mid(so,o-so).find(m_pattern)!=-1)
- {
- break;
- }
- o++; // skip new line
- }
- m_parser.context.includeFileOffset = so; // set pointer to start of new line
- m_showLineNo = m_parser.context.includeFileShowLineNo;
- break;
- case Until:
- bo=o;
- while (o<l)
- {
- so=o;
- while (o<l)
- {
- char c = p[o];
- if (c=='\n')
- {
- m_parser.context.includeFileLine++;
- if (nonEmpty) break; // we have a pattern to match
- so=o+1; // no pattern, skip empty line
- }
- else if (!isspace((uchar)c)) // no white space char
- {
- nonEmpty=TRUE;
- }
- o++;
- }
- if (m_parser.context.includeFileText.mid(so,o-so).find(m_pattern)!=-1)
- {
- m_line = il;
- m_text = m_parser.context.includeFileText.mid(bo,o-bo);
- DBG(("DocIncOperator::parse() Until: %s\n",qPrint(m_text)));
- break;
- }
- o++; // skip new line
- }
- m_parser.context.includeFileOffset = std::min(l,o+1); // set pointer to start of new line
- m_showLineNo = m_parser.context.includeFileShowLineNo;
- break;
- }
-}
-
-//---------------------------------------------------------------------------
-
-DocXRefItem::DocXRefItem(DocParser &parser,DocNode *parent,int id,const QCString &key) :
- CompAccept<DocXRefItem>(parser), m_id(id), m_key(key), m_relPath(parser.context.relPath)
-{
- m_parent = parent;
-}
-
-bool DocXRefItem::parse()
-{
- RefList *refList = RefListManager::instance().find(m_key);
- if (refList && refList->isEnabled())
- {
- RefItem *item = refList->find(m_id);
- ASSERT(item!=0);
- if (item)
- {
- if (m_parser.context.memberDef && m_parser.context.memberDef->name().at(0)=='@')
- {
- m_file = "@"; // can't cross reference anonymous enum
- m_anchor = "@";
- }
- else
- {
- m_file = refList->fileName();
- m_anchor = item->anchor();
- }
- m_title = refList->sectionTitle();
- //printf("DocXRefItem: file=%s anchor=%s title=%s\n",
- // qPrint(m_file),qPrint(m_anchor),qPrint(m_title));
-
- if (!item->text().isEmpty())
- {
- m_parser.pushContext();
- m_parser.internalValidatingParseDoc(this,m_children,item->text());
- m_parser.popContext();
- }
- }
- return TRUE;
- }
- return FALSE;
-}
-
-//---------------------------------------------------------------------------
-
-DocFormula::DocFormula(DocParser &parser,DocNode *parent,int id) : DocNode(parser),
- m_relPath(parser.context.relPath)
-{
- m_parent = parent;
- QCString text = FormulaManager::instance().findFormula(id);
- if (!text.isEmpty())
- {
- m_id = id;
- m_name.sprintf("form_%d",m_id);
- m_text = text;
- }
- else // wrong \_form#<n> command
- {
- warn_doc_error(parser.context.fileName,parser.tokenizer.getLineNr(),"Wrong formula id %d",id);
- m_id = -1;
- }
-}
-
-//---------------------------------------------------------------------------
-
-//int DocLanguage::parse()
-//{
-// int retval;
-// DBG(("DocLanguage::parse() start\n"));
-// auto ns = AutoNodeStack(m_parser,this);
-//
-// // parse one or more paragraphs
-// bool isFirst=TRUE;
-// DocPara *par=0;
-// do
-// {
-// par = new DocPara(this);
-// if (isFirst) { par->markFirst(); isFirst=FALSE; }
-// m_children.push_back(std::unique_ptr<DocPara>(par));
-// retval=par->parse();
-// }
-// while (retval==TK_NEWPARA);
-// if (par) par->markLast();
-//
-// DBG(("DocLanguage::parse() end\n"));
-// return retval;
-//}
-
-//---------------------------------------------------------------------------
-
-DocSecRefItem::DocSecRefItem(DocParser &parser,DocNode *parent,const QCString &target) :
- CompAccept<DocSecRefItem>(parser), m_target(target), m_relPath(parser.context.relPath)
-{
- m_parent = parent;
-}
-
-void DocSecRefItem::parse()
-{
- DBG(("DocSecRefItem::parse() start\n"));
- auto ns = AutoNodeStack(m_parser,this);
-
- m_parser.tokenizer.setStateTitle();
- int tok;
- while ((tok=m_parser.tokenizer.lex()))
- {
- if (!m_parser.defaultHandleToken(this,tok,m_children))
- {
- m_parser.errorHandleDefaultToken(this,tok,m_children,"\\refitem");
- }
- }
- m_parser.tokenizer.setStatePara();
- m_parser.handlePendingStyleCommands(this,m_children);
-
- if (!m_target.isEmpty())
- {
- SrcLangExt lang = getLanguageFromFileName(m_target);
- const SectionInfo *sec = SectionManager::instance().find(m_target);
- if (sec==0 && lang==SrcLangExt_Markdown) // lookup as markdown file
- {
- sec = SectionManager::instance().find(markdownFileNameToId(m_target));
- }
- if (sec) // ref to section or anchor
- {
- // set defaults
- m_ref = sec->ref();
- m_file = stripKnownExtensions(sec->fileName());
- m_refType = Section;
- m_anchor = sec->label();
- m_isSubPage = false;
- // adjust if needed
- switch (sec->type())
- {
- case SectionType::Page:
- {
- PageDef *pd = Doxygen::pageLinkedMap->find(m_target);
- m_isSubPage = pd && pd->hasParentPage();
- if (!m_isSubPage)
- {
- m_anchor="";
- }
- }
- break;
- case SectionType::Anchor:
- m_refType = Anchor;
- break;
- case SectionType::Table:
- m_refType = Table;
- break;
- default:
- break;
- }
- //printf("m_ref=%s,m_file=%s,type=%d\n",
- // qPrint(m_ref),qPrint(m_file),m_refType);
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"reference to unknown section %s",
- qPrint(m_target));
- }
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"reference to empty target");
- }
-
- DBG(("DocSecRefItem::parse() end\n"));
-}
-
-//---------------------------------------------------------------------------
-
-void DocSecRefList::parse()
-{
- DBG(("DocSecRefList::parse() start\n"));
- auto ns = AutoNodeStack(m_parser,this);
-
- int tok=m_parser.tokenizer.lex();
- // skip white space
- while (tok==TK_WHITESPACE || tok==TK_NEWPARA) tok=m_parser.tokenizer.lex();
- // handle items
- while (tok)
- {
- if (tok==TK_COMMAND_AT || tok == TK_COMMAND_BS)
- {
- const char *cmd_start = (tok==TK_COMMAND_AT ? "@" : "\\");
- switch (Mappers::cmdMapper->map(m_parser.context.token->name))
- {
- case CMD_SECREFITEM:
- {
- tok=m_parser.tokenizer.lex();
- if (tok!=TK_WHITESPACE)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected whitespace after \\refitem command");
- break;
- }
- tok=m_parser.tokenizer.lex();
- if (tok!=TK_WORD && tok!=TK_LNKWORD)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected token %s as the argument of \\refitem",
- DocTokenizer::tokToString(tok));
- break;
- }
-
- DocSecRefItem *item = new DocSecRefItem(m_parser,this,m_parser.context.token->name);
- m_children.push_back(std::unique_ptr<DocSecRefItem>(item));
- item->parse();
- }
- break;
- case CMD_ENDSECREFLIST:
- goto endsecreflist;
- default:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Illegal command %s as part of a \\secreflist",
- qPrint(cmd_start + m_parser.context.token->name));
- goto endsecreflist;
- }
- }
- else if (tok==TK_WHITESPACE)
- {
- // ignore whitespace
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected token %s inside section reference list",
- DocTokenizer::tokToString(tok));
- goto endsecreflist;
- }
- tok=m_parser.tokenizer.lex();
- }
-
-endsecreflist:
- DBG(("DocSecRefList::parse() end\n"));
-}
-
-//---------------------------------------------------------------------------
-
-DocInternalRef::DocInternalRef(DocParser &parser,DocNode *parent,const QCString &ref)
- : CompAccept<DocInternalRef>(parser), m_relPath(parser.context.relPath)
-{
- m_parent = parent;
- int i=ref.find('#');
- if (i!=-1)
- {
- m_anchor = ref.right((int)ref.length()-i-1);
- m_file = ref.left(i);
- }
- else
- {
- m_file = ref;
- }
-}
-
-void DocInternalRef::parse()
-{
- auto ns = AutoNodeStack(m_parser,this);
- DBG(("DocInternalRef::parse() start\n"));
-
- int tok;
- while ((tok=m_parser.tokenizer.lex()))
- {
- if (!m_parser.defaultHandleToken(this,tok,m_children))
- {
- m_parser.errorHandleDefaultToken(this,tok,m_children,"\\ref");
- }
- }
-
- m_parser.handlePendingStyleCommands(this,m_children);
- DBG(("DocInternalRef::parse() end\n"));
-}
-
-//---------------------------------------------------------------------------
-
-DocRef::DocRef(DocParser &parser,DocNode *parent,const QCString &target,const QCString &context) :
- CompAccept<DocRef>(parser), m_refType(Unknown), m_isSubPage(FALSE)
-{
- m_parent = parent;
- const Definition *compound = 0;
- QCString anchor;
- //printf("DocRef::DocRef(target=%s,context=%s)\n",qPrint(target),qPrint(context));
- ASSERT(!target.isEmpty());
- SrcLangExt lang = getLanguageFromFileName(target);
- m_relPath = parser.context.relPath;
- const SectionInfo *sec = SectionManager::instance().find(target);
- if (sec==0 && lang==SrcLangExt_Markdown) // lookup as markdown file
- {
- sec = SectionManager::instance().find(markdownFileNameToId(target));
- }
- if (sec) // ref to section or anchor
- {
- PageDef *pd = 0;
- if (sec->type()==SectionType::Page)
- {
- pd = Doxygen::pageLinkedMap->find(target);
- }
- m_text = sec->title();
- if (m_text.isEmpty()) m_text = sec->label();
-
- m_ref = sec->ref();
- m_file = stripKnownExtensions(sec->fileName());
- if (sec->type()==SectionType::Anchor)
- {
- m_refType = Anchor;
- }
- else if (sec->type()==SectionType::Table)
- {
- m_refType = Table;
- }
- else
- {
- m_refType = Section;
- }
- m_isSubPage = pd && pd->hasParentPage();
- if (sec->type()!=SectionType::Page || m_isSubPage) m_anchor = sec->label();
- //printf("m_text=%s,m_ref=%s,m_file=%s,type=%d\n",
- // qPrint(m_text),qPrint(m_ref),qPrint(m_file),m_refType);
- return;
- }
- else if (resolveLink(context,target,TRUE,&compound,anchor))
- {
- bool isFile = compound ?
- (compound->definitionType()==Definition::TypeFile ||
- compound->definitionType()==Definition::TypePage ? TRUE : FALSE) :
- FALSE;
- m_text = linkToText(compound?compound->getLanguage():SrcLangExt_Unknown,target,isFile);
- m_anchor = anchor;
- if (compound && compound->isLinkable()) // ref to compound
- {
- if (anchor.isEmpty() && /* compound link */
- compound->definitionType()==Definition::TypeGroup && /* is group */
- !toGroupDef(compound)->groupTitle().isEmpty() /* with title */
- )
- {
- m_text=(toGroupDef(compound))->groupTitle(); // use group's title as link
- }
- else if (compound->definitionType()==Definition::TypeMember &&
- toMemberDef(compound)->isObjCMethod())
- {
- // Objective C Method
- const MemberDef *member = toMemberDef(compound);
- bool localLink = parser.context.memberDef ? member->getClassDef()==parser.context.memberDef->getClassDef() : FALSE;
- m_text = member->objCMethodName(localLink,parser.context.inSeeBlock);
- }
-
- m_file = compound->getOutputFileBase();
- m_ref = compound->getReference();
- //printf("isFile=%d compound=%s (%d)\n",isFile,qPrint(compound->name()),
- // compound->definitionType());
- return;
- }
- else if (compound && compound->definitionType()==Definition::TypeFile &&
- toFileDef(compound)->generateSourceFile()
- ) // undocumented file that has source code we can link to
- {
- m_file = compound->getSourceFileBase();
- m_ref = compound->getReference();
- return;
- }
- }
- m_text = target;
- warn_doc_error(parser.context.fileName,parser.tokenizer.getLineNr(),"unable to resolve reference to '%s' for \\ref command",
- qPrint(target));
-}
-
-static void flattenParagraphs(DocNode *root,DocNodeList &children)
-{
- DocNodeList newChildren;
- for (const auto &dn : children)
- {
- if (dn->kind()==DocNode::Kind_Para)
- {
- DocPara *para = (DocPara*)dn.get();
- // move the children of the paragraph to the end of the newChildren list
- newChildren.insert(newChildren.end(),
- std::make_move_iterator(para->children().begin()),
- std::make_move_iterator(para->children().end()));
- }
- }
-
- // replace the children list by the newChildren list
- children.clear();
- children.insert(children.end(),
- std::make_move_iterator(newChildren.begin()),
- std::make_move_iterator(newChildren.end()));
- // reparent the children
- for (const auto &cn : children)
- {
- cn->setParent(root);
- }
-}
-
-void DocRef::parse()
-{
- auto ns = AutoNodeStack(m_parser,this);
- DBG(("DocRef::parse() start\n"));
-
- int tok;
- while ((tok=m_parser.tokenizer.lex()))
- {
- if (!m_parser.defaultHandleToken(this,tok,m_children))
- {
- switch (tok)
- {
- case TK_HTMLTAG:
- break;
- default:
- m_parser.errorHandleDefaultToken(this,tok,m_children,"\\ref");
- break;
- }
- }
- }
-
- if (m_children.empty() && !m_text.isEmpty())
- {
- m_parser.context.insideHtmlLink=TRUE;
- m_parser.pushContext();
- m_parser.internalValidatingParseDoc(this,m_children,m_text);
- m_parser.popContext();
- m_parser.context.insideHtmlLink=FALSE;
- flattenParagraphs(this,m_children);
- }
-
- m_parser.handlePendingStyleCommands(this,m_children);
-}
-
-//---------------------------------------------------------------------------
-
-DocCite::DocCite(DocParser &parser,DocNode *parent,const QCString &target,const QCString &) : DocNode(parser)
-{
- size_t numBibFiles = Config_getList(CITE_BIB_FILES).size();
- m_parent = parent;
- //printf("DocCite::DocCite(target=%s)\n",qPrint(target));
- ASSERT(!target.isEmpty());
- m_relPath = parser.context.relPath;
- const CitationManager &ct = CitationManager::instance();
- const CiteInfo *cite = ct.find(target);
- //printf("cite=%p text='%s' numBibFiles=%d\n",cite,cite?qPrint(cite->text):"<null>",numBibFiles);
- if (numBibFiles>0 && cite && !cite->text().isEmpty()) // ref to citation
- {
- m_text = cite->text();
- m_ref = "";
- m_anchor = ct.anchorPrefix()+cite->label();
- m_file = convertNameToFile(ct.fileName(),FALSE,TRUE);
- //printf("CITE ==> m_text=%s,m_ref=%s,m_file=%s,m_anchor=%s\n",
- // qPrint(m_text),qPrint(m_ref),qPrint(m_file),qPrint(m_anchor));
- return;
- }
- m_text = target;
- if (numBibFiles==0)
- {
- warn_doc_error(parser.context.fileName,parser.tokenizer.getLineNr(),"\\cite command found but no bib files specified via CITE_BIB_FILES!");
- }
- else if (cite==0)
- {
- warn_doc_error(parser.context.fileName,parser.tokenizer.getLineNr(),"unable to resolve reference to '%s' for \\cite command",
- qPrint(target));
- }
- else
- {
- warn_doc_error(parser.context.fileName,parser.tokenizer.getLineNr(),"\\cite command to '%s' does not have an associated number",
- qPrint(target));
- }
-}
-
-//---------------------------------------------------------------------------
-
-DocLink::DocLink(DocParser &parser,DocNode *parent,const QCString &target) : CompAccept<DocLink>(parser)
-{
- m_parent = parent;
- const Definition *compound = 0;
- QCString anchor;
- m_refText = target;
- m_relPath = parser.context.relPath;
- if (!m_refText.isEmpty() && m_refText.at(0)=='#')
- {
- m_refText = m_refText.right(m_refText.length()-1);
- }
- if (resolveLink(parser.context.context,stripKnownExtensions(target),parser.context.inSeeBlock,&compound,anchor))
- {
- m_anchor = anchor;
- if (compound && compound->isLinkable())
- {
- m_file = compound->getOutputFileBase();
- m_ref = compound->getReference();
- }
- else if (compound && compound->definitionType()==Definition::TypeFile &&
- (toFileDef(compound))->generateSourceFile()
- ) // undocumented file that has source code we can link to
- {
- m_file = compound->getSourceFileBase();
- m_ref = compound->getReference();
- }
- return;
- }
-
- // bogus link target
- warn_doc_error(parser.context.fileName,parser.tokenizer.getLineNr(),"unable to resolve link to '%s' for \\link command",
- qPrint(target));
-}
-
-
-QCString DocLink::parse(bool isJavaLink,bool isXmlLink)
-{
- QCString result;
- auto ns = AutoNodeStack(m_parser,this);
- DBG(("DocLink::parse() start\n"));
-
- int tok;
- while ((tok=m_parser.tokenizer.lex()))
- {
- if (!m_parser.defaultHandleToken(this,tok,m_children,FALSE))
- {
- const char *cmd_start = "\\";
- switch (tok)
- {
- case TK_COMMAND_AT:
- cmd_start = "@";
- // fall through
- case TK_COMMAND_BS:
- switch (Mappers::cmdMapper->map(m_parser.context.token->name))
- {
- case CMD_ENDLINK:
- if (isJavaLink)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"{@link.. ended with @endlink command");
- }
- goto endlink;
- default:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Illegal command %s as part of a \\link",
- qPrint(cmd_start + m_parser.context.token->name));
- break;
- }
- break;
- case TK_SYMBOL:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unsupported symbol %s found as part of a \\link",
- qPrint(m_parser.context.token->name));
- break;
- case TK_HTMLTAG:
- if (m_parser.context.token->name!="see" || !isXmlLink)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected xml/html command %s found as part of a \\link",
- qPrint(m_parser.context.token->name));
- }
- goto endlink;
- case TK_LNKWORD:
- case TK_WORD:
- if (isJavaLink) // special case to detect closing }
- {
- QCString w = m_parser.context.token->name;
- int p;
- if (w=="}")
- {
- goto endlink;
- }
- else if ((p=w.find('}'))!=-1)
- {
- uint l=w.length();
- m_children.push_back(std::make_unique<DocWord>(m_parser,this,w.left(p)));
- if ((uint)p<l-1) // something left after the } (for instance a .)
- {
- result=w.right((int)l-p-1);
- }
- goto endlink;
- }
- }
- m_children.push_back(std::make_unique<DocWord>(m_parser,this,m_parser.context.token->name));
- break;
- default:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected token %s",
- DocTokenizer::tokToString(tok));
- break;
- }
- }
- }
- if (tok==0)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected end of comment while inside"
- " link command\n");
- }
-endlink:
-
- if (m_children.empty()) // no link text
- {
- m_children.push_back(std::make_unique<DocWord>(m_parser,this,m_refText));
- }
-
- m_parser.handlePendingStyleCommands(this,m_children);
- DBG(("DocLink::parse() end\n"));
- return result;
-}
-
-
-//---------------------------------------------------------------------------
-
-DocDotFile::DocDotFile(DocParser &parser,DocNode *parent,const QCString &name,const QCString &context,
- const QCString &srcFile,int srcLine) :
- DocDiagramFileBase(parser,name,context,srcFile,srcLine)
-{
- m_relPath = parser.context.relPath;
- m_parent = parent;
-}
-
-bool DocDotFile::parse()
-{
- bool ok = false;
- m_parser.defaultHandleTitleAndSize(CMD_DOTFILE,this,m_children,m_width,m_height);
-
- bool ambig;
- FileDef *fd = findFileDef(Doxygen::dotFileNameLinkedMap,m_name,ambig);
- if (fd==0 && m_name.right(4)!=".dot") // try with .dot extension as well
- {
- fd = findFileDef(Doxygen::dotFileNameLinkedMap,m_name+".dot",ambig);
- }
- if (fd)
- {
- m_file = fd->absFilePath();
- ok = true;
- if (ambig)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"included dot file name %s is ambiguous.\n"
- "Possible candidates:\n%s",qPrint(m_name),
- qPrint(showFileDefMatches(Doxygen::dotFileNameLinkedMap,m_name))
- );
- }
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"included dot file %s is not found "
- "in any of the paths specified via DOTFILE_DIRS!",qPrint(m_name));
- }
- return ok;
-}
-
-DocMscFile::DocMscFile(DocParser &parser,DocNode *parent,const QCString &name,const QCString &context,
- const QCString &srcFile, int srcLine) :
- DocDiagramFileBase(parser,name,context,srcFile,srcLine)
-{
- m_relPath = parser.context.relPath;
- m_parent = parent;
-}
-
-bool DocMscFile::parse()
-{
- bool ok = false;
- m_parser.defaultHandleTitleAndSize(CMD_MSCFILE,this,m_children,m_width,m_height);
-
- bool ambig;
- FileDef *fd = findFileDef(Doxygen::mscFileNameLinkedMap,m_name,ambig);
- if (fd==0 && m_name.right(4)!=".msc") // try with .msc extension as well
- {
- fd = findFileDef(Doxygen::mscFileNameLinkedMap,m_name+".msc",ambig);
- }
- if (fd)
- {
- m_file = fd->absFilePath();
- ok = true;
- if (ambig)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"included msc file name %s is ambiguous.\n"
- "Possible candidates:\n%s",qPrint(m_name),
- qPrint(showFileDefMatches(Doxygen::mscFileNameLinkedMap,m_name))
- );
- }
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"included msc file %s is not found "
- "in any of the paths specified via MSCFILE_DIRS!",qPrint(m_name));
- }
- return ok;
-}
-
-//---------------------------------------------------------------------------
-
-DocDiaFile::DocDiaFile(DocParser &parser,DocNode *parent,const QCString &name,const QCString &context,
- const QCString &srcFile,int srcLine) :
- DocDiagramFileBase(parser,name,context,srcFile,srcLine)
-{
- m_relPath = parser.context.relPath;
- m_parent = parent;
-}
-
-bool DocDiaFile::parse()
-{
- bool ok = false;
- m_parser.defaultHandleTitleAndSize(CMD_DIAFILE,this,m_children,m_width,m_height);
-
- bool ambig;
- FileDef *fd = findFileDef(Doxygen::diaFileNameLinkedMap,m_name,ambig);
- if (fd==0 && m_name.right(4)!=".dia") // try with .dia extension as well
- {
- fd = findFileDef(Doxygen::diaFileNameLinkedMap,m_name+".dia",ambig);
- }
- if (fd)
- {
- m_file = fd->absFilePath();
- ok = true;
- if (ambig)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"included dia file name %s is ambiguous.\n"
- "Possible candidates:\n%s",qPrint(m_name),
- qPrint(showFileDefMatches(Doxygen::diaFileNameLinkedMap,m_name))
- );
- }
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"included dia file %s is not found "
- "in any of the paths specified via DIAFILE_DIRS!",qPrint(m_name));
- }
- return ok;
-}
-
-//---------------------------------------------------------------------------
-
-DocVhdlFlow::DocVhdlFlow(DocParser &parser,DocNode *parent) : CompAccept<DocVhdlFlow>(parser)
-{
- m_parent = parent;
-}
-
-void DocVhdlFlow::parse()
-{
- auto ns = AutoNodeStack(m_parser,this);
- DBG(("DocVhdlFlow::parse() start\n"));
-
- m_parser.tokenizer.setStateTitle();
- int tok;
- while ((tok=m_parser.tokenizer.lex()))
- {
- if (!m_parser.defaultHandleToken(this,tok,m_children))
- {
- m_parser.errorHandleDefaultToken(this,tok,m_children,"\\vhdlflow");
- }
- }
- tok=m_parser.tokenizer.lex();
-
- m_parser.tokenizer.setStatePara();
- m_parser.handlePendingStyleCommands(this,m_children);
-
- DBG(("DocVhdlFlow::parse() end\n"));
- VhdlDocGen::createFlowChart(m_parser.context.memberDef);
-}
-
-
-//---------------------------------------------------------------------------
-
-DocImage::DocImage(DocParser &parser,DocNode *parent,const HtmlAttribList &attribs,const QCString &name,
- Type t,const QCString &url, bool inlineImage) :
- CompAccept<DocImage>(parser), m_attribs(attribs), m_name(name),
- m_type(t), m_relPath(parser.context.relPath),
- m_url(url), m_inlineImage(inlineImage)
-{
- m_parent = parent;
-}
-
-bool DocImage::isSVG() const
-{
- QCString locName = m_url.isEmpty() ? m_name : m_url;
- int len = (int)locName.length();
- int fnd = locName.find('?'); // ignore part from ? until end
- if (fnd==-1) fnd=len;
- return fnd>=4 && locName.mid(fnd-4,4)==".svg";
-}
-
-void DocImage::parse()
-{
- m_parser.defaultHandleTitleAndSize(CMD_IMAGE,this,m_children,m_width,m_height);
-}
-
-
-//---------------------------------------------------------------------------
-
-int DocHtmlHeader::parse()
-{
- int retval=RetVal_OK;
- auto ns = AutoNodeStack(m_parser,this);
- DBG(("DocHtmlHeader::parse() start\n"));
-
- int tok;
- while ((tok=m_parser.tokenizer.lex()))
- {
- if (!m_parser.defaultHandleToken(this,tok,m_children))
- {
- switch (tok)
- {
- case TK_HTMLTAG:
- {
- int tagId=Mappers::htmlTagMapper->map(m_parser.context.token->name);
- if (tagId==HTML_H1 && m_parser.context.token->endTag) // found </h1> tag
- {
- if (m_level!=1)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"<h%d> ended with </h1>",
- m_level);
- }
- goto endheader;
- }
- else if (tagId==HTML_H2 && m_parser.context.token->endTag) // found </h2> tag
- {
- if (m_level!=2)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"<h%d> ended with </h2>",
- m_level);
- }
- goto endheader;
- }
- else if (tagId==HTML_H3 && m_parser.context.token->endTag) // found </h3> tag
- {
- if (m_level!=3)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"<h%d> ended with </h3>",
- m_level);
- }
- goto endheader;
- }
- else if (tagId==HTML_H4 && m_parser.context.token->endTag) // found </h4> tag
- {
- if (m_level!=4)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"<h%d> ended with </h4>",
- m_level);
- }
- goto endheader;
- }
- else if (tagId==HTML_H5 && m_parser.context.token->endTag) // found </h5> tag
- {
- if (m_level!=5)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"<h%d> ended with </h5>",
- m_level);
- }
- goto endheader;
- }
- else if (tagId==HTML_H6 && m_parser.context.token->endTag) // found </h6> tag
- {
- if (m_level!=6)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"<h%d> ended with </h6>",
- m_level);
- }
- goto endheader;
- }
- else if (tagId==HTML_A)
- {
- if (!m_parser.context.token->endTag)
- {
- m_parser.handleAHref(this,m_children,m_parser.context.token->attribs);
- }
- }
- else if (tagId==HTML_BR)
- {
- m_children.push_back(std::make_unique<DocLineBreak>(m_parser,this,m_parser.context.token->attribs));
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected html tag <%s%s> found within <h%d> context",
- m_parser.context.token->endTag?"/":"",qPrint(m_parser.context.token->name),m_level);
- }
- }
- break;
- default:
- char tmp[20];
- sprintf(tmp,"<h%d>tag",m_level);
- m_parser.errorHandleDefaultToken(this,tok,m_children,tmp);
- }
- }
- }
- if (tok==0)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected end of comment while inside"
- " <h%d> tag\n",m_level);
- }
-endheader:
- m_parser.handlePendingStyleCommands(this,m_children);
- DBG(("DocHtmlHeader::parse() end\n"));
- return retval;
-}
-//---------------------------------------------------------------------------
-
-int DocHRef::parse()
-{
- int retval=RetVal_OK;
- auto ns = AutoNodeStack(m_parser,this);
- DBG(("DocHRef::parse() start\n"));
-
- int tok;
- while ((tok=m_parser.tokenizer.lex()))
- {
- if (!m_parser.defaultHandleToken(this,tok,m_children))
- {
- switch (tok)
- {
- case TK_HTMLTAG:
- {
- int tagId=Mappers::htmlTagMapper->map(m_parser.context.token->name);
- if (tagId==HTML_A && m_parser.context.token->endTag) // found </a> tag
- {
- goto endhref;
- }
- else if (tagId==HTML_BR)
- {
- m_children.push_back(std::make_unique<DocLineBreak>(m_parser,this,m_parser.context.token->attribs));
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected html tag <%s%s> found within <a href=...> context",
- m_parser.context.token->endTag?"/":"",qPrint(m_parser.context.token->name));
- }
- }
- break;
- default:
- m_parser.errorHandleDefaultToken(this,tok,m_children,"<a>..</a> block");
- break;
- }
- }
- }
- if (tok==0)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected end of comment while inside"
- " <a href=...> tag");
- }
-endhref:
- m_parser.handlePendingStyleCommands(this,m_children);
- DBG(("DocHRef::parse() end\n"));
- return retval;
-}
-
-//---------------------------------------------------------------------------
-
-int DocInternal::parse(int level)
-{
- int retval=RetVal_OK;
- auto ns = AutoNodeStack(m_parser,this);
- DBG(("DocInternal::parse() start\n"));
-
- // first parse any number of paragraphs
- bool isFirst=TRUE;
- DocPara *lastPar=0;
- do
- {
- DocPara *par = new DocPara(m_parser,this);
- if (isFirst) { par->markFirst(); isFirst=FALSE; }
- retval=par->parse();
- if (!par->isEmpty())
- {
- m_children.push_back(std::unique_ptr<DocPara>(par));
- lastPar=par;
- }
- else
- {
- delete par;
- }
- if (retval==TK_LISTITEM)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Invalid list item found");
- }
- } while (retval!=0 &&
- retval!=RetVal_Section &&
- retval!=RetVal_Subsection &&
- retval!=RetVal_Subsubsection &&
- retval!=RetVal_Paragraph &&
- retval!=RetVal_EndInternal
- );
- if (lastPar) lastPar->markLast();
-
- // then parse any number of level-n sections
- while ((level==1 && retval==RetVal_Section) ||
- (level==2 && retval==RetVal_Subsection) ||
- (level==3 && retval==RetVal_Subsubsection) ||
- (level==4 && retval==RetVal_Paragraph)
- )
- {
- DocSection *s=new DocSection(m_parser,this,
- std::min(level+Doxygen::subpageNestingLevel,5),m_parser.context.token->sectionId);
- m_children.push_back(std::unique_ptr<DocSection>(s));
- retval = s->parse();
- }
-
- if (retval==RetVal_Internal)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"\\internal command found inside internal section");
- }
-
- DBG(("DocInternal::parse() end: retval=%s\n",DocTokenizer::retvalToString(retval)));
- return retval;
-}
-
-//---------------------------------------------------------------------------
-
-int DocIndexEntry::parse()
-{
- int retval=RetVal_OK;
- auto ns = AutoNodeStack(m_parser,this);
- DBG(("DocIndexEntry::parse() start\n"));
- int tok=m_parser.tokenizer.lex();
- if (tok!=TK_WHITESPACE)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected whitespace after \\addindex command");
- goto endindexentry;
- }
- m_parser.tokenizer.setStateTitle();
- m_entry="";
- while ((tok=m_parser.tokenizer.lex()))
- {
- switch (tok)
- {
- case TK_WHITESPACE:
- m_entry+=" ";
- break;
- case TK_WORD:
- case TK_LNKWORD:
- m_entry+=m_parser.context.token->name;
- break;
- case TK_SYMBOL:
- {
- DocSymbol::SymType s = DocSymbol::decodeSymbol(m_parser.context.token->name);
- switch (s)
- {
- case DocSymbol::Sym_BSlash: m_entry+='\\'; break;
- case DocSymbol::Sym_At: m_entry+='@'; break;
- case DocSymbol::Sym_Less: m_entry+='<'; break;
- case DocSymbol::Sym_Greater: m_entry+='>'; break;
- case DocSymbol::Sym_Amp: m_entry+='&'; break;
- case DocSymbol::Sym_Dollar: m_entry+='$'; break;
- case DocSymbol::Sym_Hash: m_entry+='#'; break;
- case DocSymbol::Sym_Percent: m_entry+='%'; break;
- case DocSymbol::Sym_apos: m_entry+='\''; break;
- case DocSymbol::Sym_Quot: m_entry+='"'; break;
- case DocSymbol::Sym_lsquo: m_entry+='`'; break;
- case DocSymbol::Sym_rsquo: m_entry+='\''; break;
- case DocSymbol::Sym_ldquo: m_entry+="``"; break;
- case DocSymbol::Sym_rdquo: m_entry+="''"; break;
- case DocSymbol::Sym_ndash: m_entry+="--"; break;
- case DocSymbol::Sym_mdash: m_entry+="---"; break;
- default:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected symbol found as argument of \\addindex");
- break;
- }
- }
- break;
- case TK_COMMAND_AT:
- // fall through
- case TK_COMMAND_BS:
- switch (Mappers::cmdMapper->map(m_parser.context.token->name))
- {
- case CMD_BSLASH: m_entry+='\\'; break;
- case CMD_AT: m_entry+='@'; break;
- case CMD_LESS: m_entry+='<'; break;
- case CMD_GREATER: m_entry+='>'; break;
- case CMD_AMP: m_entry+='&'; break;
- case CMD_DOLLAR: m_entry+='$'; break;
- case CMD_HASH: m_entry+='#'; break;
- case CMD_DCOLON: m_entry+="::"; break;
- case CMD_PERCENT: m_entry+='%'; break;
- case CMD_NDASH: m_entry+="--"; break;
- case CMD_MDASH: m_entry+="---"; break;
- case CMD_QUOTE: m_entry+='"'; break;
- case CMD_PUNT: m_entry+='.'; break;
- case CMD_PLUS: m_entry+='+'; break;
- case CMD_MINUS: m_entry+='-'; break;
- case CMD_EQUAL: m_entry+='='; break;
- default:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected command %s found as argument of \\addindex",
- qPrint(m_parser.context.token->name));
- break;
- }
- break;
- default:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected token %s",
- DocTokenizer::tokToString(tok));
- break;
- }
- }
- m_parser.tokenizer.setStatePara();
- m_entry = m_entry.stripWhiteSpace();
-endindexentry:
- DBG(("DocIndexEntry::parse() end retval=%s\n",DocTokenizer::retvalToString(retval)));
- return retval;
-}
-
-//---------------------------------------------------------------------------
-
-DocHtmlCaption::DocHtmlCaption(DocParser &parser,DocNode *parent,const HtmlAttribList &attribs)
- : CompAccept<DocHtmlCaption>(parser)
-{
- m_hasCaptionId = FALSE;
- for (const auto &opt : attribs)
- {
- if (opt.name=="id" && !opt.value.isEmpty()) // interpret id attribute as an anchor
- {
- const SectionInfo *sec = SectionManager::instance().find(opt.value);
- if (sec)
- {
- //printf("Found anchor %s\n",qPrint(id));
- m_file = sec->fileName();
- m_anchor = sec->label();
- m_hasCaptionId = TRUE;
- }
- else
- {
- warn_doc_error(parser.context.fileName,parser.tokenizer.getLineNr(),"Invalid caption id '%s'",qPrint(opt.value));
- }
- }
- else // copy attribute
- {
- m_attribs.push_back(opt);
- }
- }
- m_parent = parent;
-}
-
-int DocHtmlCaption::parse()
-{
- int retval=0;
- auto ns = AutoNodeStack(m_parser,this);
- DBG(("DocHtmlCaption::parse() start\n"));
- int tok;
- while ((tok=m_parser.tokenizer.lex()))
- {
- if (!m_parser.defaultHandleToken(this,tok,m_children))
- {
- switch (tok)
- {
- case TK_HTMLTAG:
- {
- int tagId=Mappers::htmlTagMapper->map(m_parser.context.token->name);
- if (tagId==HTML_CAPTION && m_parser.context.token->endTag) // found </caption> tag
- {
- retval = RetVal_OK;
- goto endcaption;
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected html tag <%s%s> found within <caption> context",
- m_parser.context.token->endTag?"/":"",qPrint(m_parser.context.token->name));
- }
- }
- break;
- default:
- m_parser.errorHandleDefaultToken(this,tok,m_children,"<caption> tag");
- break;
- }
- }
- }
- if (tok==0)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected end of comment while inside"
- " <caption> tag");
- }
-endcaption:
- m_parser.handlePendingStyleCommands(this,m_children);
- DBG(("DocHtmlCaption::parse() end\n"));
- return retval;
-}
-
-//---------------------------------------------------------------------------
-
-int DocHtmlCell::parse()
-{
- int retval=RetVal_OK;
- auto ns = AutoNodeStack(m_parser,this);
- DBG(("DocHtmlCell::parse() start\n"));
-
- // parse one or more paragraphs
- bool isFirst=TRUE;
- DocPara *par=0;
- do
- {
- par = new DocPara(m_parser,this);
- if (isFirst) { par->markFirst(); isFirst=FALSE; }
- m_children.push_back(std::unique_ptr<DocPara>(par));
- retval=par->parse();
- if (retval==TK_HTMLTAG)
- {
- int tagId=Mappers::htmlTagMapper->map(m_parser.context.token->name);
- if (tagId==HTML_TD && m_parser.context.token->endTag) // found </td> tag
- {
- retval=TK_NEWPARA; // ignore the tag
- }
- else if (tagId==HTML_TH && m_parser.context.token->endTag) // found </th> tag
- {
- retval=TK_NEWPARA; // ignore the tag
- }
- }
- }
- while ((retval==TK_NEWPARA) || (retval==RetVal_EndParBlock));
- if (par) par->markLast();
-
- DBG(("DocHtmlCell::parse() end\n"));
- return retval;
-}
-
-int DocHtmlCell::parseXml()
-{
- int retval=RetVal_OK;
- auto ns = AutoNodeStack(m_parser,this);
- DBG(("DocHtmlCell::parseXml() start\n"));
-
- // parse one or more paragraphs
- bool isFirst=TRUE;
- DocPara *par=0;
- do
- {
- par = new DocPara(m_parser,this);
- if (isFirst) { par->markFirst(); isFirst=FALSE; }
- m_children.push_back(std::unique_ptr<DocPara>(par));
- retval=par->parse();
- if (retval==TK_HTMLTAG)
- {
- int tagId=Mappers::htmlTagMapper->map(m_parser.context.token->name);
- if (tagId==XML_ITEM && m_parser.context.token->endTag) // found </item> tag
- {
- retval=TK_NEWPARA; // ignore the tag
- }
- else if (tagId==XML_DESCRIPTION && m_parser.context.token->endTag) // found </description> tag
- {
- retval=TK_NEWPARA; // ignore the tag
- }
- }
- }
- while (retval==TK_NEWPARA);
- if (par) par->markLast();
-
- DBG(("DocHtmlCell::parseXml() end\n"));
- return retval;
-}
-
-uint DocHtmlCell::rowSpan() const
-{
- for (const auto &attr : attribs())
- {
- if (attr.name.lower()=="rowspan")
- {
- return attr.value.toUInt();
- }
- }
- return 0;
-}
-
-uint DocHtmlCell::colSpan() const
-{
- for (const auto &attr : attribs())
- {
- if (attr.name.lower()=="colspan")
- {
- return std::max(1u,attr.value.toUInt());
- }
- }
- return 1;
-}
-
-DocHtmlCell::Alignment DocHtmlCell::alignment() const
-{
- for (const auto &attr : attribs())
- {
- QCString attrName = attr.name.lower();
- QCString attrValue = attr.value.lower();
- if (attrName=="align")
- {
- if (attrValue=="center")
- return Center;
- else if (attrValue=="right")
- return Right;
- else return Left;
- }
- else if (attrName=="class" && attrValue.startsWith("markdowntable"))
- {
- if (attrValue=="markdowntableheadcenter")
- return Center;
- else if (attrValue=="markdowntableheadright")
- return Right;
- else if (attrValue=="markdowntableheadleft")
- return Left;
- else if (attrValue=="markdowntableheadnone")
- return Center;
- else if (attrValue=="markdowntablebodycenter")
- return Center;
- else if (attrValue=="markdowntablebodyright")
- return Right;
- else if (attrValue=="markdowntablebodyleft")
- return Left;
- else if (attrValue=="markdowntablebodynone")
- return Left;
- else return Left;
- }
- }
- return Left;
-}
-
-DocHtmlCell::Valignment DocHtmlCell::valignment() const
-{
- for (const auto &attr : attribs())
- {
- QCString attrName = attr.name.lower();
- QCString attrValue = attr.value.lower();
- if (attrName=="valign")
- {
- if (attrValue=="top")
- return Top;
- else if (attrValue=="bottom")
- return Bottom;
- else if (attrValue=="middle")
- return Middle;
- else return Middle;
- }
- }
- return Middle;
-}
-
-//---------------------------------------------------------------------------
-
-int DocHtmlRow::parse()
-{
- int retval=RetVal_OK;
- auto ns = AutoNodeStack(m_parser,this);
- DBG(("DocHtmlRow::parse() start\n"));
-
- bool isHeading=FALSE;
- bool isFirst=TRUE;
- DocHtmlCell *cell=0;
-
- // get next token
- int tok=m_parser.tokenizer.lex();
- // skip whitespace
- while (tok==TK_WHITESPACE || tok==TK_NEWPARA) tok=m_parser.tokenizer.lex();
- // should find a html tag now
- if (tok==TK_HTMLTAG)
- {
- int tagId=Mappers::htmlTagMapper->map(m_parser.context.token->name);
- if (tagId==HTML_TD && !m_parser.context.token->endTag) // found <td> tag
- {
- }
- else if (tagId==HTML_TH && !m_parser.context.token->endTag) // found <th> tag
- {
- isHeading=TRUE;
- }
- else // found some other tag
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected <td> or <th> tag but "
- "found <%s> instead!",qPrint(m_parser.context.token->name));
- m_parser.tokenizer.pushBackHtmlTag(m_parser.context.token->name);
- goto endrow;
- }
- }
- else if (tok==0) // premature end of comment
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected end of comment while looking"
- " for a html description title");
- goto endrow;
- }
- else // token other than html token
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected <td> or <th> tag but found %s token instead!",
- DocTokenizer::tokToString(tok));
- goto endrow;
- }
-
- // parse one or more cells
- do
- {
- cell=new DocHtmlCell(m_parser,this,m_parser.context.token->attribs,isHeading);
- cell->markFirst(isFirst);
- isFirst=FALSE;
- m_children.push_back(std::unique_ptr<DocHtmlCell>(cell));
- retval=cell->parse();
- isHeading = retval==RetVal_TableHCell;
- }
- while (retval==RetVal_TableCell || retval==RetVal_TableHCell);
- if (cell) cell->markLast(TRUE);
-
-endrow:
- DBG(("DocHtmlRow::parse() end\n"));
- return retval;
-}
-
-int DocHtmlRow::parseXml(bool isHeading)
-{
- int retval=RetVal_OK;
- auto ns = AutoNodeStack(m_parser,this);
- DBG(("DocHtmlRow::parseXml() start\n"));
-
- bool isFirst=TRUE;
- DocHtmlCell *cell=0;
-
- // get next token
- int tok=m_parser.tokenizer.lex();
- // skip whitespace
- while (tok==TK_WHITESPACE || tok==TK_NEWPARA) tok=m_parser.tokenizer.lex();
- // should find a html tag now
- if (tok==TK_HTMLTAG)
- {
- int tagId=Mappers::htmlTagMapper->map(m_parser.context.token->name);
- if (tagId==XML_TERM && !m_parser.context.token->endTag) // found <term> tag
- {
- }
- else if (tagId==XML_DESCRIPTION && !m_parser.context.token->endTag) // found <description> tag
- {
- }
- else // found some other tag
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected <term> or <description> tag but "
- "found <%s> instead!",qPrint(m_parser.context.token->name));
- m_parser.tokenizer.pushBackHtmlTag(m_parser.context.token->name);
- goto endrow;
- }
- }
- else if (tok==0) // premature end of comment
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected end of comment while looking"
- " for a html description title");
- goto endrow;
- }
- else // token other than html token
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected <td> or <th> tag but found %s token instead!",
- DocTokenizer::tokToString(tok));
- goto endrow;
- }
-
- do
- {
- cell=new DocHtmlCell(m_parser,this,m_parser.context.token->attribs,isHeading);
- cell->markFirst(isFirst);
- isFirst=FALSE;
- m_children.push_back(std::unique_ptr<DocHtmlCell>(cell));
- retval=cell->parseXml();
- }
- while (retval==RetVal_TableCell || retval==RetVal_TableHCell);
- if (cell) cell->markLast(TRUE);
-
-endrow:
- DBG(("DocHtmlRow::parseXml() end\n"));
- return retval;
-}
-
-//---------------------------------------------------------------------------
-
-int DocHtmlTable::parse()
-{
- int retval=RetVal_OK;
- auto ns = AutoNodeStack(m_parser,this);
- DBG(("DocHtmlTable::parse() start\n"));
-
-getrow:
- // get next token
- int tok=m_parser.tokenizer.lex();
- // skip whitespace
- while (tok==TK_WHITESPACE || tok==TK_NEWPARA) tok=m_parser.tokenizer.lex();
- // should find a html tag now
- if (tok==TK_HTMLTAG)
- {
- int tagId=Mappers::htmlTagMapper->map(m_parser.context.token->name);
- if (tagId==HTML_TR && !m_parser.context.token->endTag) // found <tr> tag
- {
- // no caption, just rows
- retval=RetVal_TableRow;
- }
- else if (tagId==HTML_CAPTION && !m_parser.context.token->endTag) // found <caption> tag
- {
- if (m_caption)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"table already has a caption, found another one");
- }
- else
- {
- m_caption = new DocHtmlCaption(m_parser,this,m_parser.context.token->attribs);
- retval=m_caption->parse();
-
- if (retval==RetVal_OK) // caption was parsed ok
- {
- goto getrow;
- }
- }
- }
- else // found wrong token
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected <tr> or <caption> tag but "
- "found <%s%s> instead!", m_parser.context.token->endTag ? "/" : "", qPrint(m_parser.context.token->name));
- }
- }
- else if (tok==0) // premature end of comment
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected end of comment while looking"
- " for a <tr> or <caption> tag");
- }
- else // token other than html token
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected <tr> tag but found %s token instead!",
- DocTokenizer::tokToString(tok));
- }
-
- // parse one or more rows
- while (retval==RetVal_TableRow)
- {
- DocHtmlRow *tr=new DocHtmlRow(m_parser,this,m_parser.context.token->attribs);
- m_children.push_back(std::unique_ptr<DocHtmlRow>(tr));
- retval=tr->parse();
- }
-
- computeTableGrid();
-
- DBG(("DocHtmlTable::parse() end\n"));
- return retval==RetVal_EndTable ? RetVal_OK : retval;
-}
-
-int DocHtmlTable::parseXml()
-{
- int retval=RetVal_OK;
- auto ns = AutoNodeStack(m_parser,this);
- DBG(("DocHtmlTable::parseXml() start\n"));
-
- // get next token
- int tok=m_parser.tokenizer.lex();
- // skip whitespace
- while (tok==TK_WHITESPACE || tok==TK_NEWPARA) tok=m_parser.tokenizer.lex();
- // should find a html tag now
- int tagId=0;
- bool isHeader=FALSE;
- if (tok==TK_HTMLTAG)
- {
- tagId=Mappers::htmlTagMapper->map(m_parser.context.token->name);
- if (tagId==XML_ITEM && !m_parser.context.token->endTag) // found <item> tag
- {
- retval=RetVal_TableRow;
- }
- if (tagId==XML_LISTHEADER && !m_parser.context.token->endTag) // found <listheader> tag
- {
- retval=RetVal_TableRow;
- isHeader=TRUE;
- }
- }
-
- // parse one or more rows
- while (retval==RetVal_TableRow)
- {
- DocHtmlRow *tr=new DocHtmlRow(m_parser,this,m_parser.context.token->attribs);
- m_children.push_back(std::unique_ptr<DocHtmlRow>(tr));
- retval=tr->parseXml(isHeader);
- isHeader=FALSE;
- }
-
- computeTableGrid();
-
- DBG(("DocHtmlTable::parseXml() end\n"));
- tagId=Mappers::htmlTagMapper->map(m_parser.context.token->name);
- return tagId==XML_LIST && m_parser.context.token->endTag ? RetVal_OK : retval;
-}
-
-/** Helper class to compute the grid for an HTML style table */
-struct ActiveRowSpan
-{
- ActiveRowSpan(uint rows,uint col) : rowsLeft(rows), column(col) {}
- uint rowsLeft;
- uint column;
-};
-
-/** List of ActiveRowSpan classes. */
-typedef std::vector<ActiveRowSpan> RowSpanList;
-
-/** determines the location of all cells in a grid, resolving row and
- column spans. For each the total number of visible cells is computed,
- and the total number of visible columns over all rows is stored.
- */
-void DocHtmlTable::computeTableGrid()
-{
- //printf("computeTableGrid()\n");
- RowSpanList rowSpans;
- uint maxCols=0;
- uint rowIdx=1;
- for (const auto &rowNode : children())
- {
- uint colIdx=1;
- uint cells=0;
- if (rowNode->kind()==DocNode::Kind_HtmlRow)
- {
- size_t i;
- DocHtmlRow *row = (DocHtmlRow*)rowNode.get();
- for (const auto &cellNode : row->children())
- {
- if (cellNode->kind()==DocNode::Kind_HtmlCell)
- {
- DocHtmlCell *cell = (DocHtmlCell*)cellNode.get();
- uint rs = cell->rowSpan();
- uint cs = cell->colSpan();
-
- for (i=0;i<rowSpans.size();i++)
- {
- if (rowSpans[i].rowsLeft>0 &&
- rowSpans[i].column==colIdx)
- {
- colIdx=rowSpans[i].column+1;
- cells++;
- }
- }
- if (rs>0) rowSpans.emplace_back(rs,colIdx);
- //printf("found cell at (%d,%d)\n",rowIdx,colIdx);
- cell->setRowIndex(rowIdx);
- cell->setColumnIndex(colIdx);
- colIdx+=cs;
- cells++;
- }
- }
- for (i=0;i<rowSpans.size();i++)
- {
- if (rowSpans[i].rowsLeft>0) rowSpans[i].rowsLeft--;
- }
- row->setVisibleCells(cells);
- row->setRowIndex(rowIdx);
- rowIdx++;
- }
- if (colIdx-1>maxCols) maxCols=colIdx-1;
- }
- m_numCols = maxCols;
-}
-
-void DocHtmlTable::accept(DocVisitor *v)
-{
- v->visitPre(this);
- // for HTML output we put the caption first
- //if (m_caption && v->id()==DocVisitor_Html) m_caption->accept(v);
- // doxygen 1.8.11: always put the caption first
- if (m_caption) m_caption->accept(v);
- for (const auto &n : m_children) n->accept(v);
- // for other output formats we put the caption last
- //if (m_caption && v->id()!=DocVisitor_Html) m_caption->accept(v);
- v->visitPost(this);
-}
-
-//---------------------------------------------------------------------------
-
-int DocHtmlDescTitle::parse()
-{
- int retval=0;
- auto ns = AutoNodeStack(m_parser,this);
- DBG(("DocHtmlDescTitle::parse() start\n"));
-
- int tok;
- while ((tok=m_parser.tokenizer.lex()))
- {
- if (!m_parser.defaultHandleToken(this,tok,m_children))
- {
- const char *cmd_start = "\\";
- switch (tok)
- {
- case TK_COMMAND_AT:
- cmd_start = "@";
- // fall through
- case TK_COMMAND_BS:
- {
- QCString cmdName=m_parser.context.token->name;
- bool isJavaLink=FALSE;
- switch (Mappers::cmdMapper->map(cmdName))
- {
- case CMD_REF:
- {
- tok=m_parser.tokenizer.lex();
- if (tok!=TK_WHITESPACE)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected whitespace after \\%s command",
- qPrint(m_parser.context.token->name));
- }
- else
- {
- m_parser.tokenizer.setStateRef();
- tok=m_parser.tokenizer.lex(); // get the reference id
- if (tok!=TK_WORD)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected token %s as the argument of \\%s command",
- DocTokenizer::tokToString(tok),qPrint(cmdName));
- }
- else
- {
- DocRef *ref = new DocRef(m_parser,this,m_parser.context.token->name,m_parser.context.context);
- m_children.push_back(std::unique_ptr<DocRef>(ref));
- ref->parse();
- }
- m_parser.tokenizer.setStatePara();
- }
- }
- break;
- case CMD_JAVALINK:
- isJavaLink=TRUE;
- // fall through
- case CMD_LINK:
- {
- tok=m_parser.tokenizer.lex();
- if (tok!=TK_WHITESPACE)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected whitespace after \\%s command",
- qPrint(cmdName));
- }
- else
- {
- m_parser.tokenizer.setStateLink();
- tok=m_parser.tokenizer.lex();
- if (tok!=TK_WORD)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected token %s as the argument of \\%s command",
- DocTokenizer::tokToString(tok),qPrint(cmdName));
- }
- else
- {
- m_parser.tokenizer.setStatePara();
- DocLink *lnk = new DocLink(m_parser,this,m_parser.context.token->name);
- m_children.push_back(std::unique_ptr<DocLink>(lnk));
- QCString leftOver = lnk->parse(isJavaLink);
- if (!leftOver.isEmpty())
- {
- m_children.push_back(std::make_unique<DocWord>(m_parser,this,leftOver));
- }
- }
- }
- }
-
- break;
- default:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Illegal command %s found as part of a <dt> tag",
- qPrint(cmd_start + m_parser.context.token->name));
- }
- }
- break;
- case TK_SYMBOL:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unsupported symbol \\%s found as part of a <dt> tag",
- qPrint(m_parser.context.token->name));
- break;
- case TK_HTMLTAG:
- {
- int tagId=Mappers::htmlTagMapper->map(m_parser.context.token->name);
- if (tagId==HTML_DD && !m_parser.context.token->endTag) // found <dd> tag
- {
- retval = RetVal_DescData;
- goto endtitle;
- }
- else if (tagId==HTML_DT && m_parser.context.token->endTag)
- {
- // ignore </dt> tag.
- }
- else if (tagId==HTML_DT)
- {
- // missing <dt> tag.
- retval = RetVal_DescTitle;
- goto endtitle;
- }
- else if (tagId==HTML_DL && m_parser.context.token->endTag)
- {
- retval=RetVal_EndDesc;
- goto endtitle;
- }
- else if (tagId==HTML_A)
- {
- if (!m_parser.context.token->endTag)
- {
- m_parser.handleAHref(this,m_children,m_parser.context.token->attribs);
- }
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected html tag <%s%s> found within <dt> context",
- m_parser.context.token->endTag?"/":"",qPrint(m_parser.context.token->name));
- }
- }
- break;
- default:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected token %s found as part of a <dt> tag",
- DocTokenizer::tokToString(tok));
- break;
- }
- }
- }
- if (tok==0)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected end of comment while inside"
- " <dt> tag");
- }
-endtitle:
- m_parser.handlePendingStyleCommands(this,m_children);
- DBG(("DocHtmlDescTitle::parse() end\n"));
- return retval;
-}
-
-//---------------------------------------------------------------------------
-
-int DocHtmlDescData::parse()
-{
- m_attribs = m_parser.context.token->attribs;
- int retval=0;
- auto ns = AutoNodeStack(m_parser,this);
- DBG(("DocHtmlDescData::parse() start\n"));
-
- bool isFirst=TRUE;
- DocPara *par=0;
- do
- {
- par = new DocPara(m_parser,this);
- if (isFirst) { par->markFirst(); isFirst=FALSE; }
- m_children.push_back(std::unique_ptr<DocPara>(par));
- retval=par->parse();
- }
- while (retval==TK_NEWPARA);
- if (par) par->markLast();
-
- DBG(("DocHtmlDescData::parse() end\n"));
- return retval;
-}
-
-//---------------------------------------------------------------------------
-
-int DocHtmlDescList::parse()
-{
- int retval=RetVal_OK;
- auto ns = AutoNodeStack(m_parser,this);
- DBG(("DocHtmlDescList::parse() start\n"));
-
- // get next token
- int tok=m_parser.tokenizer.lex();
- // skip whitespace
- while (tok==TK_WHITESPACE || tok==TK_NEWPARA) tok=m_parser.tokenizer.lex();
- // should find a html tag now
- if (tok==TK_HTMLTAG)
- {
- int tagId=Mappers::htmlTagMapper->map(m_parser.context.token->name);
- if (tagId==HTML_DT && !m_parser.context.token->endTag) // found <dt> tag
- {
- // continue
- }
- else // found some other tag
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected <dt> tag but "
- "found <%s> instead!",qPrint(m_parser.context.token->name));
- m_parser.tokenizer.pushBackHtmlTag(m_parser.context.token->name);
- goto enddesclist;
- }
- }
- else if (tok==0) // premature end of comment
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected end of comment while looking"
- " for a html description title");
- goto enddesclist;
- }
- else // token other than html token
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected <dt> tag but found %s token instead!",
- DocTokenizer::tokToString(tok));
- goto enddesclist;
- }
-
- do
- {
- DocHtmlDescTitle *dt=new DocHtmlDescTitle(m_parser,this,m_parser.context.token->attribs);
- m_children.push_back(std::unique_ptr<DocHtmlDescTitle>(dt));
- DocHtmlDescData *dd=new DocHtmlDescData(m_parser,this);
- m_children.push_back(std::unique_ptr<DocHtmlDescData>(dd));
- retval=dt->parse();
- if (retval==RetVal_DescData)
- {
- retval=dd->parse();
- }
- else if (retval!=RetVal_DescTitle)
- {
- // error
- break;
- }
- } while (retval==RetVal_DescTitle);
-
- if (retval==0)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected end of comment while inside <dl> block");
- }
-
-enddesclist:
-
- DBG(("DocHtmlDescList::parse() end\n"));
- return retval==RetVal_EndDesc ? RetVal_OK : retval;
-}
-
-//---------------------------------------------------------------------------
-
-int DocHtmlListItem::parse()
-{
- DBG(("DocHtmlListItem::parse() start\n"));
- int retval=0;
- auto ns = AutoNodeStack(m_parser,this);
-
- // parse one or more paragraphs
- bool isFirst=TRUE;
- DocPara *par=0;
- do
- {
- par = new DocPara(m_parser,this);
- if (isFirst) { par->markFirst(); isFirst=FALSE; }
- m_children.push_back(std::unique_ptr<DocPara>(par));
- retval=par->parse();
- }
- while (retval==TK_NEWPARA);
- if (par) par->markLast();
-
- DBG(("DocHtmlListItem::parse() end retval=%s\n",DocTokenizer::retvalToString(retval)));
- return retval;
-}
-
-int DocHtmlListItem::parseXml()
-{
- DBG(("DocHtmlListItem::parseXml() start\n"));
- int retval=0;
- auto ns = AutoNodeStack(m_parser,this);
-
- // parse one or more paragraphs
- bool isFirst=TRUE;
- DocPara *par=0;
- do
- {
- par = new DocPara(m_parser,this);
- if (isFirst) { par->markFirst(); isFirst=FALSE; }
- m_children.push_back(std::unique_ptr<DocPara>(par));
- retval=par->parse();
- if (retval==0) break;
-
- //printf("new item: retval=%x m_parser.context.token->name=%s m_parser.context.token->endTag=%d\n",
- // retval,qPrint(m_parser.context.token->name),m_parser.context.token->endTag);
- if (retval==RetVal_ListItem)
- {
- break;
- }
- }
- while (retval!=RetVal_CloseXml);
-
- if (par) par->markLast();
-
- DBG(("DocHtmlListItem::parseXml() end retval=%s\n",DocTokenizer::retvalToString(retval)));
- return retval;
-}
-
-//---------------------------------------------------------------------------
-
-int DocHtmlList::parse()
-{
- DBG(("DocHtmlList::parse() start\n"));
- int retval=RetVal_OK;
- int num=1;
- auto ns = AutoNodeStack(m_parser,this);
-
- // get next token
- int tok=m_parser.tokenizer.lex();
- // skip whitespace and paragraph breaks
- while (tok==TK_WHITESPACE || tok==TK_NEWPARA) tok=m_parser.tokenizer.lex();
- // should find a html tag now
- if (tok==TK_HTMLTAG)
- {
- int tagId=Mappers::htmlTagMapper->map(m_parser.context.token->name);
- if (tagId==HTML_LI && !m_parser.context.token->endTag) // found <li> tag
- {
- // ok, we can go on.
- }
- else if (((m_type==Unordered && tagId==HTML_UL) ||
- (m_type==Ordered && tagId==HTML_OL)
- ) && m_parser.context.token->endTag
- ) // found empty list
- {
- // add dummy item to obtain valid HTML
- m_children.push_back(std::make_unique<DocHtmlListItem>(m_parser,this,HtmlAttribList(),1));
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"empty list!");
- retval = RetVal_EndList;
- goto endlist;
- }
- else // found some other tag
- {
- // add dummy item to obtain valid HTML
- m_children.push_back(std::make_unique<DocHtmlListItem>(m_parser,this,HtmlAttribList(),1));
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected <li> tag but "
- "found <%s%s> instead!",m_parser.context.token->endTag?"/":"",qPrint(m_parser.context.token->name));
- m_parser.tokenizer.pushBackHtmlTag(m_parser.context.token->name);
- goto endlist;
- }
- }
- else if (tok==0) // premature end of comment
- {
- // add dummy item to obtain valid HTML
- m_children.push_back(std::make_unique<DocHtmlListItem>(m_parser,this,HtmlAttribList(),1));
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected end of comment while looking"
- " for a html list item");
- goto endlist;
- }
- else // token other than html token
- {
- // add dummy item to obtain valid HTML
- m_children.push_back(std::make_unique<DocHtmlListItem>(m_parser,this,HtmlAttribList(),1));
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected <li> tag but found %s token instead!",
- DocTokenizer::tokToString(tok));
- goto endlist;
- }
-
- do
- {
- DocHtmlListItem *li=new DocHtmlListItem(m_parser,this,m_parser.context.token->attribs,num++);
- m_children.push_back(std::unique_ptr<DocHtmlListItem>(li));
- retval=li->parse();
- } while (retval==RetVal_ListItem);
-
- if (retval==0)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected end of comment while inside <%cl> block",
- m_type==Unordered ? 'u' : 'o');
- }
-
-endlist:
- DBG(("DocHtmlList::parse() end retval=%s\n",DocTokenizer::retvalToString(retval)));
- return retval==RetVal_EndList ? RetVal_OK : retval;
-}
-
-int DocHtmlList::parseXml()
-{
- DBG(("DocHtmlList::parseXml() start\n"));
- int retval=RetVal_OK;
- int num=1;
- auto ns = AutoNodeStack(m_parser,this);
-
- // get next token
- int tok=m_parser.tokenizer.lex();
- // skip whitespace and paragraph breaks
- while (tok==TK_WHITESPACE || tok==TK_NEWPARA) tok=m_parser.tokenizer.lex();
- // should find a html tag now
- if (tok==TK_HTMLTAG)
- {
- int tagId=Mappers::htmlTagMapper->map(m_parser.context.token->name);
- //printf("m_parser.context.token->name=%s m_parser.context.token->endTag=%d\n",qPrint(m_parser.context.token->name),m_parser.context.token->endTag);
- if (tagId==XML_ITEM && !m_parser.context.token->endTag) // found <item> tag
- {
- // ok, we can go on.
- }
- else // found some other tag
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected <item> tag but "
- "found <%s> instead!",qPrint(m_parser.context.token->name));
- m_parser.tokenizer.pushBackHtmlTag(m_parser.context.token->name);
- goto endlist;
- }
- }
- else if (tok==0) // premature end of comment
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected end of comment while looking"
- " for a html list item");
- goto endlist;
- }
- else // token other than html token
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected <item> tag but found %s token instead!",
- DocTokenizer::tokToString(tok));
- goto endlist;
- }
-
- do
- {
- DocHtmlListItem *li=new DocHtmlListItem(m_parser,this,m_parser.context.token->attribs,num++);
- m_children.push_back(std::unique_ptr<DocHtmlListItem>(li));
- retval=li->parseXml();
- if (retval==0) break;
- //printf("retval=%x m_parser.context.token->name=%s\n",retval,qPrint(m_parser.context.token->name));
- } while (retval==RetVal_ListItem);
-
- if (retval==0)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected end of comment while inside <list type=\"%s\"> block",
- m_type==Unordered ? "bullet" : "number");
- }
-
-endlist:
- DBG(("DocHtmlList::parseXml() end retval=%s\n",DocTokenizer::retvalToString(retval)));
- return retval==RetVal_EndList ||
- (retval==RetVal_CloseXml || m_parser.context.token->name=="list") ?
- RetVal_OK : retval;
-}
-
-//--------------------------------------------------------------------------
-
-int DocHtmlBlockQuote::parse()
-{
- DBG(("DocHtmlBlockQuote::parse() start\n"));
- int retval=0;
- auto ns = AutoNodeStack(m_parser,this);
-
- // parse one or more paragraphs
- bool isFirst=TRUE;
- DocPara *par=0;
- do
- {
- par = new DocPara(m_parser,this);
- if (isFirst) { par->markFirst(); isFirst=FALSE; }
- m_children.push_back(std::unique_ptr<DocPara>(par));
- retval=par->parse();
- }
- while (retval==TK_NEWPARA);
- if (par) par->markLast();
-
- DBG(("DocHtmlBlockQuote::parse() end retval=%s\n",DocTokenizer::retvalToString(retval)));
- return (retval==RetVal_EndBlockQuote) ? RetVal_OK : retval;
-}
-
-//---------------------------------------------------------------------------
-
-int DocParBlock::parse()
-{
- DBG(("DocParBlock::parse() start\n"));
- int retval=0;
- auto ns = AutoNodeStack(m_parser,this);
-
- // parse one or more paragraphs
- bool isFirst=TRUE;
- DocPara *par=0;
- do
- {
- par = new DocPara(m_parser,this);
- if (isFirst) { par->markFirst(); isFirst=FALSE; }
- m_children.push_back(std::unique_ptr<DocPara>(par));
- retval=par->parse();
- }
- while (retval==TK_NEWPARA);
- if (par) par->markLast();
-
- DBG(("DocParBlock::parse() end retval=%s\n",DocTokenizer::retvalToString(retval)));
- return (retval==RetVal_EndBlockQuote) ? RetVal_OK : retval;
-}
-
-//---------------------------------------------------------------------------
-
-int DocSimpleListItem::parse()
-{
- auto ns = AutoNodeStack(m_parser,this);
- int rv=m_paragraph->parse();
- m_paragraph->markFirst();
- m_paragraph->markLast();
- return rv;
-}
-
-//--------------------------------------------------------------------------
-
-int DocSimpleList::parse()
-{
- auto ns = AutoNodeStack(m_parser,this);
- int rv;
- do
- {
- DocSimpleListItem *li=new DocSimpleListItem(m_parser,this);
- m_children.push_back(std::unique_ptr<DocSimpleListItem>(li));
- rv=li->parse();
- } while (rv==RetVal_ListItem);
- return (rv!=TK_NEWPARA) ? rv : RetVal_OK;
-}
-
-//--------------------------------------------------------------------------
-
-DocAutoListItem::DocAutoListItem(DocParser &parser,DocNode *parent,int indent,int num)
- : CompAccept<DocAutoListItem>(parser), m_indent(indent), m_itemNum(num)
-{
- m_parent = parent;
-}
-
-int DocAutoListItem::parse()
-{
- int retval = RetVal_OK;
- auto ns = AutoNodeStack(m_parser,this);
-
- // first parse any number of paragraphs
- bool isFirst=TRUE;
- DocPara *lastPar=0;
- do
- {
- DocPara *par = new DocPara(m_parser,this);
- if (isFirst) { par->markFirst(); isFirst=FALSE; }
- retval=par->parse();
- if (!par->isEmpty())
- {
- m_children.push_back(std::unique_ptr<DocPara>(par));
- if (lastPar) lastPar->markLast(FALSE);
- lastPar=par;
- }
- else
- {
- delete par;
- }
- // next paragraph should be more indented than the - marker to belong
- // to this item
- } while (retval==TK_NEWPARA && m_parser.context.token->indent>m_indent);
- if (lastPar) lastPar->markLast();
-
- //printf("DocAutoListItem: retval=%d indent=%d\n",retval,m_parser.context.token->indent);
- return retval;
-}
-
-//--------------------------------------------------------------------------
-
-DocAutoList::DocAutoList(DocParser &parser,DocNode *parent,int indent,bool isEnumList,
- int depth) :
- CompAccept<DocAutoList>(parser), m_indent(indent), m_isEnumList(isEnumList),
- m_depth(depth)
-{
- m_parent = parent;
-}
-
-int DocAutoList::parse()
-{
- int retval = RetVal_OK;
- int num=1;
- auto ns = AutoNodeStack(m_parser,this);
- m_parser.tokenizer.startAutoList();
- // first item or sub list => create new list
- do
- {
- if (m_parser.context.token->id!=-1) // explicitly numbered list
- {
- num=m_parser.context.token->id; // override num with real number given
- }
- DocAutoListItem *li = new DocAutoListItem(m_parser,this,m_indent,num++);
- m_children.push_back(std::unique_ptr<DocAutoListItem>(li));
- retval=li->parse();
- //printf("DocAutoList::parse(): retval=0x%x m_parser.context.token->indent=%d m_indent=%d "
- // "m_isEnumList=%d m_parser.context.token->isEnumList=%d m_parser.context.token->name=%s\n",
- // retval,m_parser.context.token->indent,m_indent,m_isEnumList,m_parser.context.token->isEnumList,
- // qPrint(m_parser.context.token->name));
- //printf("num=%d m_parser.context.token->id=%d\n",num,m_parser.context.token->id);
- }
- while (retval==TK_LISTITEM && // new list item
- m_indent==m_parser.context.token->indent && // at same indent level
- m_isEnumList==m_parser.context.token->isEnumList && // of the same kind
- (m_parser.context.token->id==-1 || m_parser.context.token->id>=num) // increasing number (or no number)
- );
-
- m_parser.tokenizer.endAutoList();
- return retval;
-}
-
-//--------------------------------------------------------------------------
-
-void DocTitle::parse()
-{
- DBG(("DocTitle::parse() start\n"));
- auto ns = AutoNodeStack(m_parser,this);
- m_parser.tokenizer.setStateTitle();
- int tok;
- while ((tok=m_parser.tokenizer.lex()))
- {
- if (!m_parser.defaultHandleToken(this,tok,m_children))
- {
- m_parser.errorHandleDefaultToken(this,tok,m_children,"title section");
- }
- }
- m_parser.tokenizer.setStatePara();
- m_parser.handlePendingStyleCommands(this,m_children);
- DBG(("DocTitle::parse() end\n"));
-}
-
-void DocTitle::parseFromString(const QCString &text)
-{
- m_children.push_back(std::make_unique<DocWord>(m_parser,this,text));
-}
-
-//--------------------------------------------------------------------------
-
-DocSimpleSect::DocSimpleSect(DocParser &parser,DocNode *parent,Type t) :
- CompAccept<DocSimpleSect>(parser), m_type(t)
-{
- m_parent = parent;
- m_title=0;
-}
-
-DocSimpleSect::~DocSimpleSect()
-{
- delete m_title;
-}
-
-void DocSimpleSect::accept(DocVisitor *v)
-{
- v->visitPre(this);
- if (m_title) m_title->accept(v);
- for (const auto &n : m_children) n->accept(v);
- v->visitPost(this);
-}
-
-int DocSimpleSect::parse(bool userTitle,bool needsSeparator)
-{
- DBG(("DocSimpleSect::parse() start\n"));
- auto ns = AutoNodeStack(m_parser,this);
-
- // handle case for user defined title
- if (userTitle)
- {
- m_title = new DocTitle(m_parser,this);
- m_title->parse();
- }
-
- // add new paragraph as child
- DocPara *par = new DocPara(m_parser,this);
- if (m_children.empty())
- {
- par->markFirst();
- }
- else
- {
- ASSERT(m_children.back()->kind()==DocNode::Kind_Para);
- ((DocPara *)m_children.back().get())->markLast(FALSE);
- }
- par->markLast();
- if (needsSeparator) m_children.push_back(std::make_unique<DocSimpleSectSep>(m_parser,this));
- m_children.push_back(std::unique_ptr<DocPara>(par));
-
- // parse the contents of the paragraph
- int retval = par->parse();
-
- DBG(("DocSimpleSect::parse() end retval=%d\n",retval));
- return retval; // 0==EOF, TK_NEWPARA, TK_LISTITEM, TK_ENDLIST, RetVal_SimpleSec
-}
-
-int DocSimpleSect::parseRcs()
-{
- DBG(("DocSimpleSect::parseRcs() start\n"));
- auto ns = AutoNodeStack(m_parser,this);
-
- m_title = new DocTitle(m_parser,this);
- m_title->parseFromString(m_parser.context.token->name);
-
- QCString text = m_parser.context.token->text;
- m_parser.pushContext(); // this will create a new parser.context.token
- m_parser.internalValidatingParseDoc(this,m_children,text);
- m_parser.popContext(); // this will restore the old parser.context.token
-
- DBG(("DocSimpleSect::parseRcs()\n"));
- return RetVal_OK;
-}
-
-int DocSimpleSect::parseXml()
-{
- DBG(("DocSimpleSect::parse() start\n"));
- auto ns = AutoNodeStack(m_parser,this);
-
- int retval = RetVal_OK;
- for (;;)
- {
- // add new paragraph as child
- DocPara *par = new DocPara(m_parser,this);
- if (m_children.empty())
- {
- par->markFirst();
- }
- else
- {
- ASSERT(m_children.back()->kind()==DocNode::Kind_Para);
- ((DocPara *)m_children.back().get())->markLast(FALSE);
- }
- par->markLast();
- m_children.push_back(std::unique_ptr<DocPara>(par));
-
- // parse the contents of the paragraph
- retval = par->parse();
- if (retval == 0) break;
- if (retval == RetVal_CloseXml)
- {
- retval = RetVal_OK;
- break;
- }
- }
-
- DBG(("DocSimpleSect::parseXml() end retval=%d\n",retval));
- return retval;
-}
-
-void DocSimpleSect::appendLinkWord(const QCString &word)
-{
- DocPara *p;
- if (m_children.empty() || m_children.back()->kind()!=DocNode::Kind_Para)
- {
- p = new DocPara(m_parser,this);
- m_children.push_back(std::unique_ptr<DocPara>(p));
- }
- else
- {
- p = (DocPara *)m_children.back().get();
-
- // Comma-separate <seealso> links.
- p->injectToken(TK_WORD,",");
- p->injectToken(TK_WHITESPACE," ");
- }
-
- m_parser.context.inSeeBlock=TRUE;
- p->injectToken(TK_LNKWORD,word);
- m_parser.context.inSeeBlock=FALSE;
-}
-
-QCString DocSimpleSect::typeString() const
-{
- switch (m_type)
- {
- case Unknown: break;
- case See: return "see";
- case Return: return "return";
- case Author: // fall through
- case Authors: return "author";
- case Version: return "version";
- case Since: return "since";
- case Date: return "date";
- case Note: return "note";
- case Warning: return "warning";
- case Pre: return "pre";
- case Post: return "post";
- case Copyright: return "copyright";
- case Invar: return "invariant";
- case Remark: return "remark";
- case Attention: return "attention";
- case User: return "user";
- case Rcs: return "rcs";
- }
- return "unknown";
-}
-
-//--------------------------------------------------------------------------
-
-int DocParamList::parse(const QCString &cmdName)
-{
- int retval=RetVal_OK;
- DBG(("DocParamList::parse() start\n"));
- auto ns = AutoNodeStack(m_parser,this);
- DocPara *par=0;
- QCString saveCmdName = cmdName;
-
- int tok=m_parser.tokenizer.lex();
- if (tok!=TK_WHITESPACE)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected whitespace after \\%s command",
- qPrint(saveCmdName));
- retval=RetVal_EndParBlock;
- goto endparamlist;
- }
- m_parser.tokenizer.setStateParam();
- tok=m_parser.tokenizer.lex();
- while (tok==TK_WORD) /* there is a parameter name */
- {
- if (m_type==DocParamSect::Param)
- {
- int typeSeparator = m_parser.context.token->name.find('#'); // explicit type position
- if (typeSeparator!=-1)
- {
- m_parser.handleParameterType(this,m_paramTypes,m_parser.context.token->name.left(typeSeparator));
- m_parser.context.token->name = m_parser.context.token->name.mid(typeSeparator+1);
- m_parser.context.hasParamCommand=TRUE;
- m_parser.checkArgumentName();
- ((DocParamSect*)parent())->m_hasTypeSpecifier=TRUE;
- }
- else
- {
- m_parser.context.hasParamCommand=TRUE;
- m_parser.checkArgumentName();
- }
- }
- else if (m_type==DocParamSect::RetVal)
- {
- m_parser.context.hasReturnCommand=TRUE;
- m_parser.checkRetvalName();
- }
- //m_params.append(m_parser.context.token->name);
- m_parser.handleLinkedWord(this,m_params);
- tok=m_parser.tokenizer.lex();
- }
- m_parser.tokenizer.setStatePara();
- if (tok==0) /* premature end of comment block */
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected end of comment block while parsing the "
- "argument of command %s",qPrint(saveCmdName));
- retval=RetVal_EndParBlock;
- goto endparamlist;
- }
- if (tok!=TK_WHITESPACE) /* premature end of comment block */
- {
- if (tok!=TK_NEWPARA) /* empty param description */
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected token %s in comment block while parsing the "
- "argument of command %s",DocTokenizer::tokToString(tok),qPrint(saveCmdName));
- }
- retval=RetVal_EndParBlock;
- goto endparamlist;
- }
-
- par = new DocPara(m_parser,this);
- m_paragraphs.push_back(std::unique_ptr<DocPara>(par));
- retval = par->parse();
- par->markFirst();
- par->markLast();
-
-endparamlist:
- DBG(("DocParamList::parse() end retval=%d\n",retval));
- return retval;
-}
-
-int DocParamList::parseXml(const QCString ¶mName)
-{
- int retval=RetVal_OK;
- DBG(("DocParamList::parseXml() start\n"));
- auto ns = AutoNodeStack(m_parser,this);
-
- m_parser.context.token->name = paramName;
- if (m_type==DocParamSect::Param)
- {
- m_parser.context.hasParamCommand=TRUE;
- m_parser.checkArgumentName();
- }
- else if (m_type==DocParamSect::RetVal)
- {
- m_parser.context.hasReturnCommand=TRUE;
- m_parser.checkRetvalName();
- }
-
- m_parser.handleLinkedWord(this,m_params);
-
- do
- {
- DocPara *par = new DocPara(m_parser,this);
- retval = par->parse();
- if (par->isEmpty()) // avoid adding an empty paragraph for the whitespace
- // after </para> and before </param>
- {
- delete par;
- break;
- }
- else // append the paragraph to the list
- {
- if (m_paragraphs.empty())
- {
- par->markFirst();
- }
- else
- {
- m_paragraphs.back()->markLast(FALSE);
- }
- par->markLast();
- m_paragraphs.push_back(std::unique_ptr<DocPara>(par));
- }
-
- if (retval == 0) break;
-
- } while (retval==RetVal_CloseXml &&
- Mappers::htmlTagMapper->map(m_parser.context.token->name)!=XML_PARAM &&
- Mappers::htmlTagMapper->map(m_parser.context.token->name)!=XML_TYPEPARAM &&
- Mappers::htmlTagMapper->map(m_parser.context.token->name)!=XML_EXCEPTION);
-
-
- if (retval==0) /* premature end of comment block */
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unterminated param or exception tag");
- }
- else
- {
- retval=RetVal_OK;
- }
-
-
- DBG(("DocParamList::parse() end retval=%d\n",retval));
- return retval;
-}
-
-//--------------------------------------------------------------------------
-
-int DocParamSect::parse(const QCString &cmdName,bool xmlContext, Direction d)
-{
- int retval=RetVal_OK;
- DBG(("DocParamSect::parse() start\n"));
- auto ns = AutoNodeStack(m_parser,this);
-
- if (d!=Unspecified)
- {
- m_hasInOutSpecifier=TRUE;
- }
-
- DocParamList *pl = new DocParamList(m_parser,this,m_type,d);
- if (m_children.empty())
- {
- pl->markFirst();
- pl->markLast();
- }
- else
- {
- ASSERT(m_children.back()->kind()==DocNode::Kind_ParamList);
- ((DocParamList *)m_children.back().get())->markLast(FALSE);
- pl->markLast();
- }
- m_children.push_back(std::unique_ptr<DocParamList>(pl));
- if (xmlContext)
- {
- retval = pl->parseXml(cmdName);
- }
- else
- {
- retval = pl->parse(cmdName);
- }
- if (retval==RetVal_EndParBlock)
- {
- retval = RetVal_OK;
- }
-
- DBG(("DocParamSect::parse() end retval=%d\n",retval));
- return retval;
-}
-
-//--------------------------------------------------------------------------
-
-int DocPara::handleSimpleSection(DocSimpleSect::Type t, bool xmlContext)
-{
- DocSimpleSect *ss=0;
- bool needsSeparator = FALSE;
- if (!m_children.empty() && // previous element
- m_children.back()->kind()==Kind_SimpleSect && // was a simple sect
- ((DocSimpleSect *)m_children.back().get())->type()==t && // of same type
- t!=DocSimpleSect::User) // but not user defined
- {
- // append to previous section
- ss=(DocSimpleSect *)m_children.back().get();
- needsSeparator = TRUE;
- }
- else // start new section
- {
- ss=new DocSimpleSect(m_parser,this,t);
- m_children.push_back(std::unique_ptr<DocSimpleSect>(ss));
- }
- int rv = RetVal_OK;
- if (xmlContext)
- {
- return ss->parseXml();
- }
- else
- {
- rv = ss->parse(t==DocSimpleSect::User,needsSeparator);
- }
- return (rv!=TK_NEWPARA) ? rv : RetVal_OK;
-}
-
-int DocPara::handleParamSection(const QCString &cmdName,
- DocParamSect::Type t,
- bool xmlContext=FALSE,
- int direction=DocParamSect::Unspecified)
-{
- DocParamSect *ps=0;
- if (!m_children.empty() && // previous element
- m_children.back()->kind()==Kind_ParamSect && // was a param sect
- ((DocParamSect *)m_children.back().get())->type()==t) // of same type
- {
- // append to previous section
- ps=(DocParamSect *)m_children.back().get();
- }
- else // start new section
- {
- ps=new DocParamSect(m_parser,this,t);
- m_children.push_back(std::unique_ptr<DocParamSect>(ps));
- }
- int rv=ps->parse(cmdName,xmlContext,(DocParamSect::Direction)direction);
- return (rv!=TK_NEWPARA) ? rv : RetVal_OK;
-}
-
-void DocPara::handleCite()
-{
- // get the argument of the cite command.
- int tok=m_parser.tokenizer.lex();
- if (tok!=TK_WHITESPACE)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected whitespace after \\%s command",
- qPrint("cite"));
- return;
- }
- m_parser.tokenizer.setStateCite();
- tok=m_parser.tokenizer.lex();
- if (tok==0)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected end of comment block while parsing the "
- "argument of command %s\n", qPrint("cite"));
- return;
- }
- else if (tok!=TK_WORD && tok!=TK_LNKWORD)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected token %s as the argument of %s",
- DocTokenizer::tokToString(tok),qPrint("cite"));
- return;
- }
- m_parser.context.token->sectionId = m_parser.context.token->name;
- m_children.push_back(
- std::make_unique<DocCite>(
- m_parser,this,m_parser.context.token->name,m_parser.context.context));
-
- m_parser.tokenizer.setStatePara();
-}
-
-void DocPara::handleEmoji()
-{
- // get the argument of the emoji command.
- int tok=m_parser.tokenizer.lex();
- if (tok!=TK_WHITESPACE)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected whitespace after \\%s command",
- qPrint("emoji"));
- return;
- }
- m_parser.tokenizer.setStateEmoji();
- tok=m_parser.tokenizer.lex();
- if (tok==0)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected end of comment block while parsing the "
- "argument of command %s\n", qPrint("emoji"));
- return;
- }
- else if (tok!=TK_WORD)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected token %s as the argument of %s",
- DocTokenizer::tokToString(tok),qPrint("emoji"));
- return;
- }
- m_children.push_back(
- std::make_unique<DocEmoji>(
- m_parser,this,m_parser.context.token->name));
- m_parser.tokenizer.setStatePara();
-}
-
-int DocPara::handleXRefItem()
-{
- int retval=m_parser.tokenizer.lex();
- ASSERT(retval==TK_WHITESPACE);
- m_parser.tokenizer.setStateXRefItem();
- retval=m_parser.tokenizer.lex();
- if (retval==RetVal_OK)
- {
- DocXRefItem *ref = new DocXRefItem(m_parser,this,m_parser.context.token->id,m_parser.context.token->name);
- if (ref->parse())
- {
- m_children.push_back(std::unique_ptr<DocXRefItem>(ref));
- }
- else
- {
- delete ref;
- }
- }
- m_parser.tokenizer.setStatePara();
- return retval;
-}
-
-void DocPara::handleIline()
-{
- m_parser.tokenizer.setStateIline();
- int tok = m_parser.tokenizer.lex();
- if (tok!=TK_WORD)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"invalid argument for command '\\iline'\n");
- return;
- }
- m_parser.tokenizer.setStatePara();
-}
-
-void DocPara::handleIncludeOperator(const QCString &cmdName,DocIncOperator::Type t)
-{
- QCString saveCmdName = cmdName;
- DBG(("handleIncludeOperator(%s)\n",qPrint(saveCmdName)));
- int tok=m_parser.tokenizer.lex();
- if (tok!=TK_WHITESPACE)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected whitespace after \\%s command",
- qPrint(saveCmdName));
- return;
- }
- m_parser.tokenizer.setStatePattern();
- tok=m_parser.tokenizer.lex();
- m_parser.tokenizer.setStatePara();
- if (tok==0)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected end of comment block while parsing the "
- "argument of command %s", qPrint(saveCmdName));
- return;
- }
- else if (tok!=TK_WORD)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected token %s as the argument of %s",
- DocTokenizer::tokToString(tok),qPrint(saveCmdName));
- return;
- }
- DocIncOperator *op = new DocIncOperator(m_parser,this,t,m_parser.context.token->name,m_parser.context.context,m_parser.context.isExample,m_parser.context.exampleName);
- DocNode *n1 = m_children.size()>=1 ? m_children.at(m_children.size()-1).get() : 0;
- DocNode *n2 = m_children.size()>=2 ? m_children.at(m_children.size()-2).get() : 0;
- bool isFirst = n1==0 || // no last node
- (n1->kind()!=DocNode::Kind_IncOperator &&
- n1->kind()!=DocNode::Kind_WhiteSpace
- ) || // last node is not operator or whitespace
- (n1->kind()==DocNode::Kind_WhiteSpace &&
- n2!=0 && n2->kind()!=DocNode::Kind_IncOperator
- ); // previous not is not operator
- op->markFirst(isFirst);
- op->markLast(TRUE);
- if (n1!=0 && n1->kind()==DocNode::Kind_IncOperator)
- {
- ((DocIncOperator *)n1)->markLast(FALSE);
- }
- else if (n1!=0 && n1->kind()==DocNode::Kind_WhiteSpace &&
- n2!=0 && n2->kind()==DocNode::Kind_IncOperator
- )
- {
- ((DocIncOperator *)n2)->markLast(FALSE);
- }
- m_children.push_back(std::unique_ptr<DocIncOperator>(op));
- op->parse();
-}
-
-void DocPara::handleImage(const QCString &cmdName)
-{
- QCString saveCmdName = cmdName;
- bool inlineImage = false;
- QCString anchorStr;
-
- int tok=m_parser.tokenizer.lex();
- if (tok!=TK_WHITESPACE)
- {
- if (tok==TK_WORD)
- {
- if (m_parser.context.token->name == "{")
- {
- m_parser.tokenizer.setStateOptions();
- tok=m_parser.tokenizer.lex();
- m_parser.tokenizer.setStatePara();
- StringVector optList=split(m_parser.context.token->name.str(),",");
- for (const auto &opt : optList)
- {
- if (opt.empty()) continue;
- QCString locOpt(opt);
- QCString locOptLow;
- locOpt = locOpt.stripWhiteSpace();
- locOptLow = locOpt.lower();
- if (locOptLow == "inline")
- {
- inlineImage = true;
- }
- else if (locOptLow.startsWith("anchor:"))
- {
- if (!anchorStr.isEmpty())
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),
- "multiple use of option 'anchor' for '%s' command, ignoring: '%s'",
- qPrint(saveCmdName),qPrint(locOpt.mid(7)));
- }
- else
- {
- anchorStr = locOpt.mid(7);
- }
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),
- "unknown option '%s' for '%s' command specified",
- qPrint(locOpt), qPrint(saveCmdName));
- }
- }
- tok=m_parser.tokenizer.lex();
- if (tok!=TK_WHITESPACE)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected whitespace after \\%s command",
- qPrint(saveCmdName));
- return;
- }
- }
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected whitespace after \\%s command",
- qPrint(saveCmdName));
- return;
- }
- }
- tok=m_parser.tokenizer.lex();
- if (tok!=TK_WORD && tok!=TK_LNKWORD)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected token %s as the argument of %s",
- DocTokenizer::tokToString(tok),qPrint(saveCmdName));
- return;
- }
- tok=m_parser.tokenizer.lex();
- if (tok!=TK_WHITESPACE)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected whitespace after \\%s command",
- qPrint(saveCmdName));
- return;
- }
- DocImage::Type t;
- QCString imgType = m_parser.context.token->name.lower();
- if (imgType=="html") t=DocImage::Html;
- else if (imgType=="latex") t=DocImage::Latex;
- else if (imgType=="docbook") t=DocImage::DocBook;
- else if (imgType=="rtf") t=DocImage::Rtf;
- else if (imgType=="xml") t=DocImage::Xml;
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"output format `%s` specified as the first argument of "
- "%s command is not valid",
- qPrint(imgType),qPrint(saveCmdName));
- return;
- }
- m_parser.tokenizer.setStateFile();
- tok=m_parser.tokenizer.lex();
- m_parser.tokenizer.setStatePara();
- if (tok!=TK_WORD)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected token %s as the argument of %s",
- DocTokenizer::tokToString(tok),qPrint(saveCmdName));
- return;
- }
- if (!anchorStr.isEmpty())
- {
- DocAnchor *anchor = new DocAnchor(m_parser,this,anchorStr,true);
- m_children.push_back(std::unique_ptr<DocAnchor>(anchor));
- }
- HtmlAttribList attrList;
- DocImage *img = new DocImage(m_parser,this,attrList,
- m_parser.findAndCopyImage(m_parser.context.token->name,t),t,"",inlineImage);
- m_children.push_back(std::unique_ptr<DocImage>(img));
- img->parse();
-}
-
-template<class T>
-void DocPara::handleFile(const QCString &cmdName)
-{
- QCString saveCmdName = cmdName;
- int tok=m_parser.tokenizer.lex();
- if (tok!=TK_WHITESPACE)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected whitespace after \\%s command",
- qPrint(saveCmdName));
- return;
- }
- m_parser.tokenizer.setStateFile();
- tok=m_parser.tokenizer.lex();
- m_parser.tokenizer.setStatePara();
- if (tok!=TK_WORD)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected token %s as the argument of %s",
- DocTokenizer::tokToString(tok),qPrint(saveCmdName));
- return;
- }
- QCString name = m_parser.context.token->name;
- auto df = std::make_unique<T>(m_parser,this,name,m_parser.context.context,m_parser.context.fileName,m_parser.tokenizer.getLineNr());
- if (df->parse())
- {
- m_children.push_back(std::move(df));
- }
-}
-
-void DocPara::handleVhdlFlow()
-{
- DocVhdlFlow *vf = new DocVhdlFlow(m_parser,this);
- m_children.push_back(std::unique_ptr<DocVhdlFlow>(vf));
- vf->parse();
-}
-
-void DocPara::handleLink(const QCString &cmdName,bool isJavaLink)
-{
- QCString saveCmdName = cmdName;
- int tok=m_parser.tokenizer.lex();
- if (tok!=TK_WHITESPACE)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected whitespace after \\%s command",
- qPrint(saveCmdName));
- return;
- }
- m_parser.tokenizer.setStateLink();
- tok=m_parser.tokenizer.lex();
- if (tok!=TK_WORD)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"%s as the argument of %s",
- DocTokenizer::tokToString(tok),qPrint(saveCmdName));
- return;
- }
- if (saveCmdName == "javalink") m_children.push_back(std::make_unique<DocStyleChange>(m_parser,this,(uint)m_parser.context.nodeStack.size(),DocStyleChange::Code,cmdName,TRUE));
- m_parser.tokenizer.setStatePara();
- DocLink *lnk = new DocLink(m_parser,this,m_parser.context.token->name);
- m_children.push_back(std::unique_ptr<DocLink>(lnk));
- if (saveCmdName == "javalink") m_children.push_back(std::make_unique<DocStyleChange>(m_parser,this,(uint)m_parser.context.nodeStack.size(),DocStyleChange::Code,cmdName,FALSE));
- QCString leftOver = lnk->parse(isJavaLink);
- if (!leftOver.isEmpty())
- {
- m_children.push_back(std::make_unique<DocWord>(m_parser,this,leftOver));
- }
-}
-
-void DocPara::handleRef(const QCString &cmdName)
-{
- QCString saveCmdName = cmdName;
- DBG(("handleRef(%s)\n",qPrint(saveCmdName)));
- int tok=m_parser.tokenizer.lex();
- if (tok!=TK_WHITESPACE)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected whitespace after \\%s command",
- qPrint(saveCmdName));
- return;
- }
- m_parser.tokenizer.setStateRef();
- tok=m_parser.tokenizer.lex(); // get the reference id
- DocRef *ref=0;
- if (tok!=TK_WORD)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected token %s as the argument of %s",
- DocTokenizer::tokToString(tok),qPrint(saveCmdName));
- goto endref;
- }
- ref = new DocRef(m_parser,this,m_parser.context.token->name,m_parser.context.context);
- m_children.push_back(std::unique_ptr<DocRef>(ref));
- ref->parse();
-endref:
- m_parser.tokenizer.setStatePara();
-}
-
-void DocPara::handleInclude(const QCString &cmdName,DocInclude::Type t)
-{
- DBG(("handleInclude(%s)\n",qPrint(cmdName)));
- QCString saveCmdName = cmdName;
- int tok=m_parser.tokenizer.lex();
- bool isBlock = false;
- if (tok==TK_WORD && m_parser.context.token->name=="{")
- {
- m_parser.tokenizer.setStateOptions();
- tok=m_parser.tokenizer.lex();
- m_parser.tokenizer.setStatePara();
- StringVector optList=split(m_parser.context.token->name.str(),",");
- auto contains = [&optList](const char *kw)
- {
- return std::find(optList.begin(),optList.end(),kw)!=optList.end();
- };
- if (t==DocInclude::Include && contains("lineno"))
- {
- t = DocInclude::IncWithLines;
- }
- else if (t==DocInclude::Snippet && contains("lineno"))
- {
- t = DocInclude::SnipWithLines;
- }
- else if (t==DocInclude::DontInclude && contains("lineno"))
- {
- t = DocInclude::DontIncWithLines;
- }
- else if (t==DocInclude::Include && contains("doc"))
- {
- t = DocInclude::IncludeDoc;
- }
- else if (t==DocInclude::Snippet && contains("doc"))
- {
- t = DocInclude::SnippetDoc;
- }
- tok=m_parser.tokenizer.lex();
- if (tok!=TK_WHITESPACE)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected whitespace after \\%s command",
- qPrint(saveCmdName));
- return;
- }
- }
- else if (tok==TK_WORD && m_parser.context.token->name=="[")
- {
- m_parser.tokenizer.setStateBlock();
- tok=m_parser.tokenizer.lex();
- isBlock = (m_parser.context.token->name.stripWhiteSpace() == "block");
- m_parser.tokenizer.setStatePara();
- tok=m_parser.tokenizer.lex();
- }
- else if (tok!=TK_WHITESPACE)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected whitespace after \\%s command",
- qPrint(saveCmdName));
- return;
- }
- m_parser.tokenizer.setStateFile();
- tok=m_parser.tokenizer.lex();
- m_parser.tokenizer.setStatePara();
- if (tok==0)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected end of comment block while parsing the "
- "argument of command %s",qPrint(saveCmdName));
- return;
- }
- else if (tok!=TK_WORD)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected token %s as the argument of %s",
- DocTokenizer::tokToString(tok),qPrint(saveCmdName));
- return;
- }
- QCString fileName = m_parser.context.token->name;
- QCString blockId;
- if (t==DocInclude::Snippet || t==DocInclude::SnipWithLines || t==DocInclude::SnippetDoc)
- {
- if (fileName == "this") fileName=m_parser.context.fileName;
- m_parser.tokenizer.setStateSnippet();
- tok=m_parser.tokenizer.lex();
- m_parser.tokenizer.setStatePara();
- if (tok!=TK_WORD)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected block identifier, but found token %s instead while parsing the %s command",
- DocTokenizer::tokToString(tok),qPrint(saveCmdName));
- return;
- }
- blockId = "["+m_parser.context.token->name+"]";
- }
-
- // This is the only place to handle the \includedoc and \snippetdoc commands,
- // as the content is included here as if it is really here.
- if (t==DocInclude::IncludeDoc || t==DocInclude::SnippetDoc)
- {
- QCString inc_text;
- int inc_line = 1;
- m_parser.readTextFileByName(fileName,inc_text);
- if (t==DocInclude::SnippetDoc)
- {
- int count;
- if (!blockId.isEmpty() && (count=inc_text.contains(blockId.data()))!=2)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"block marked with %s for \\snippet should appear twice in file %s, found it %d times\n",
- qPrint(blockId),qPrint(fileName),count);
- }
- inc_line = lineBlock(inc_text, blockId);
- inc_text = extractBlock(inc_text, blockId);
- }
-
- Markdown markdown(fileName,inc_line);
- QCString strippedDoc = stripIndentation(inc_text);
- QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(strippedDoc,inc_line) : strippedDoc;
-
- m_parser.pushContext();
- m_parser.context.fileName = fileName;
- m_parser.tokenizer.setLineNr(inc_line);
- m_parser.internalValidatingParseDoc(this,m_children,processedDoc);
- m_parser.popContext();
- }
- else
- {
- DocInclude *inc = new DocInclude(m_parser,this,fileName,m_parser.context.context,t,m_parser.context.isExample,m_parser.context.exampleName,blockId,isBlock);
- m_children.push_back(std::unique_ptr<DocInclude>(inc));
- inc->parse();
- }
-}
-
-void DocPara::handleSection(const QCString &cmdName)
-{
- QCString saveCmdName = cmdName;
- // get the argument of the section command.
- int tok=m_parser.tokenizer.lex();
- if (tok!=TK_WHITESPACE)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected whitespace after \\%s command",
- qPrint(saveCmdName));
- return;
- }
- tok=m_parser.tokenizer.lex();
- if (tok==0)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected end of comment block while parsing the "
- "argument of command %s\n", qPrint(saveCmdName));
- return;
- }
- else if (tok!=TK_WORD && tok!=TK_LNKWORD)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected token %s as the argument of %s",
- DocTokenizer::tokToString(tok),qPrint(saveCmdName));
- return;
- }
- m_parser.context.token->sectionId = m_parser.context.token->name;
- m_parser.tokenizer.setStateSkipTitle();
- m_parser.tokenizer.lex();
- m_parser.tokenizer.setStatePara();
-}
-
-int DocPara::handleHtmlHeader(const HtmlAttribList &tagHtmlAttribs,int level)
-{
- DocHtmlHeader *header = new DocHtmlHeader(m_parser,this,tagHtmlAttribs,level);
- m_children.push_back(std::unique_ptr<DocHtmlHeader>(header));
- int retval = header->parse();
- return (retval==RetVal_OK) ? TK_NEWPARA : retval;
-}
-
-// For XML tags whose content is stored in attributes rather than
-// contained within the element, we need a way to inject the attribute
-// text into the current paragraph.
-bool DocPara::injectToken(int tok,const QCString &tokText)
-{
- m_parser.context.token->name = tokText;
- return m_parser.defaultHandleToken(this,tok,m_children);
-}
-
-int DocPara::handleStartCode()
-{
- int retval = m_parser.tokenizer.lex();
- QCString lang = m_parser.context.token->name;
- if (!lang.isEmpty() && lang.at(0)!='.')
- {
- lang="."+lang;
- }
- if (m_parser.context.xmlComment)
- {
- m_parser.context.token->verb = substitute(substitute(m_parser.context.token->verb,"<","<"),">",">");
- }
- // search for the first non-whitespace line, index is stored in li
- int i=0,li=0,l=m_parser.context.token->verb.length();
- while (i<l && (m_parser.context.token->verb.at(i)==' ' || m_parser.context.token->verb.at(i)=='\n'))
- {
- if (m_parser.context.token->verb.at(i)=='\n') li=i+1;
- i++;
- }
- m_children.push_back(std::make_unique<DocVerbatim>(m_parser,this,m_parser.context.context,stripIndentation(m_parser.context.token->verb.mid(li)),DocVerbatim::Code,m_parser.context.isExample,m_parser.context.exampleName,FALSE,lang));
- if (retval==0) warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"code section ended without end marker");
- m_parser.tokenizer.setStatePara();
- return retval;
-}
-
-void DocPara::handleInheritDoc()
-{
- if (m_parser.context.memberDef) // inheriting docs from a member
- {
- const MemberDef *reMd = m_parser.context.memberDef->reimplements();
- if (reMd) // member from which was inherited.
- {
- const MemberDef *thisMd = m_parser.context.memberDef;
- //printf("{InheritDocs:%s=>%s}\n",qPrint(m_parser.context.memberDef->qualifiedName()),qPrint(reMd->qualifiedName()));
- m_parser.pushContext();
- m_parser.context.scope=reMd->getOuterScope();
- if (m_parser.context.scope!=Doxygen::globalScope)
- {
- m_parser.context.context=m_parser.context.scope->name();
- }
- m_parser.context.memberDef=reMd;
- while (!m_parser.context.styleStack.empty()) m_parser.context.styleStack.pop();
- while (!m_parser.context.nodeStack.empty()) m_parser.context.nodeStack.pop();
- m_parser.context.copyStack.push_back(reMd);
- m_parser.internalValidatingParseDoc(this,m_children,reMd->briefDescription());
- m_parser.internalValidatingParseDoc(this,m_children,reMd->documentation());
- m_parser.context.copyStack.pop_back();
- auto hasParamCommand = m_parser.context.hasParamCommand;
- auto hasReturnCommand = m_parser.context.hasReturnCommand;
- auto retvalsFound = m_parser.context.retvalsFound;
- auto paramsFound = m_parser.context.paramsFound;
- m_parser.popContext();
- m_parser.context.hasParamCommand = hasParamCommand;
- m_parser.context.hasReturnCommand = hasReturnCommand;
- m_parser.context.retvalsFound = retvalsFound;
- m_parser.context.paramsFound = paramsFound;
- m_parser.context.memberDef = thisMd;
- }
- }
-}
-
-
-int DocPara::handleCommand(const QCString &cmdName, const int tok)
-{
- DBG(("handleCommand(%s)\n",qPrint(cmdName)));
- int retval = RetVal_OK;
- int cmdId = Mappers::cmdMapper->map(cmdName);
- switch (cmdId)
- {
- case CMD_UNKNOWN:
- m_children.push_back(std::make_unique<DocWord>(m_parser,this,TK_COMMAND_CHAR(tok) + cmdName));
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Found unknown command '%s%s'",TK_COMMAND_CHAR(tok),qPrint(cmdName));
- break;
- case CMD_EMPHASIS:
- m_children.push_back(std::make_unique<DocStyleChange>(m_parser,this,(uint)m_parser.context.nodeStack.size(),DocStyleChange::Italic,cmdName,TRUE));
- retval=m_parser.handleStyleArgument(this,m_children,cmdName);
- m_children.push_back(std::make_unique<DocStyleChange>(m_parser,this,(uint)m_parser.context.nodeStack.size(),DocStyleChange::Italic,cmdName,FALSE));
- if (retval!=TK_WORD) m_children.push_back(std::make_unique<DocWhiteSpace>(m_parser,this," "));
- break;
- case CMD_BOLD:
- m_children.push_back(std::make_unique<DocStyleChange>(m_parser,this,(uint)m_parser.context.nodeStack.size(),DocStyleChange::Bold,cmdName,TRUE));
- retval=m_parser.handleStyleArgument(this,m_children,cmdName);
- m_children.push_back(std::make_unique<DocStyleChange>(m_parser,this,(uint)m_parser.context.nodeStack.size(),DocStyleChange::Bold,cmdName,FALSE));
- if (retval!=TK_WORD) m_children.push_back(std::make_unique<DocWhiteSpace>(m_parser,this," "));
- break;
- case CMD_CODE:
- m_children.push_back(std::make_unique<DocStyleChange>(m_parser,this,(uint)m_parser.context.nodeStack.size(),DocStyleChange::Code,cmdName,TRUE));
- retval=m_parser.handleStyleArgument(this,m_children,cmdName);
- m_children.push_back(std::make_unique<DocStyleChange>(m_parser,this,(uint)m_parser.context.nodeStack.size(),DocStyleChange::Code,cmdName,FALSE));
- if (retval!=TK_WORD) m_children.push_back(std::make_unique<DocWhiteSpace>(m_parser,this," "));
- break;
- case CMD_BSLASH:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_BSlash));
- break;
- case CMD_AT:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_At));
- break;
- case CMD_LESS:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Less));
- break;
- case CMD_GREATER:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Greater));
- break;
- case CMD_AMP:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Amp));
- break;
- case CMD_DOLLAR:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Dollar));
- break;
- case CMD_HASH:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Hash));
- break;
- case CMD_PIPE:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Pipe));
- break;
- case CMD_DCOLON:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_DoubleColon));
- break;
- case CMD_PERCENT:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Percent));
- break;
- case CMD_NDASH:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Minus));
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Minus));
- break;
- case CMD_MDASH:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Minus));
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Minus));
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Minus));
- break;
- case CMD_QUOTE:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Quot));
- break;
- case CMD_PUNT:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Dot));
- break;
- case CMD_PLUS:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Plus));
- break;
- case CMD_MINUS:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Minus));
- break;
- case CMD_EQUAL:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Equal));
- break;
- case CMD_SA:
- m_parser.context.inSeeBlock=TRUE;
- retval = handleSimpleSection(DocSimpleSect::See);
- m_parser.context.inSeeBlock=FALSE;
- break;
- case CMD_RETURN:
- retval = handleSimpleSection(DocSimpleSect::Return);
- m_parser.context.hasReturnCommand=TRUE;
- break;
- case CMD_AUTHOR:
- retval = handleSimpleSection(DocSimpleSect::Author);
- break;
- case CMD_AUTHORS:
- retval = handleSimpleSection(DocSimpleSect::Authors);
- break;
- case CMD_VERSION:
- retval = handleSimpleSection(DocSimpleSect::Version);
- break;
- case CMD_SINCE:
- retval = handleSimpleSection(DocSimpleSect::Since);
- break;
- case CMD_DATE:
- retval = handleSimpleSection(DocSimpleSect::Date);
- break;
- case CMD_NOTE:
- retval = handleSimpleSection(DocSimpleSect::Note);
- break;
- case CMD_WARNING:
- retval = handleSimpleSection(DocSimpleSect::Warning);
- break;
- case CMD_PRE:
- retval = handleSimpleSection(DocSimpleSect::Pre);
- break;
- case CMD_POST:
- retval = handleSimpleSection(DocSimpleSect::Post);
- break;
- case CMD_COPYRIGHT:
- retval = handleSimpleSection(DocSimpleSect::Copyright);
- break;
- case CMD_INVARIANT:
- retval = handleSimpleSection(DocSimpleSect::Invar);
- break;
- case CMD_REMARK:
- retval = handleSimpleSection(DocSimpleSect::Remark);
- break;
- case CMD_ATTENTION:
- retval = handleSimpleSection(DocSimpleSect::Attention);
- break;
- case CMD_PAR:
- retval = handleSimpleSection(DocSimpleSect::User);
- break;
- case CMD_LI:
- {
- DocSimpleList *sl=new DocSimpleList(m_parser,this);
- m_children.push_back(std::unique_ptr<DocSimpleList>(sl));
- retval = sl->parse();
- }
- break;
- case CMD_SECTION:
- {
- handleSection(cmdName);
- retval = RetVal_Section;
- }
- break;
- case CMD_SUBSECTION:
- {
- handleSection(cmdName);
- retval = RetVal_Subsection;
- }
- break;
- case CMD_SUBSUBSECTION:
- {
- handleSection(cmdName);
- retval = RetVal_Subsubsection;
- }
- break;
- case CMD_PARAGRAPH:
- {
- handleSection(cmdName);
- retval = RetVal_Paragraph;
- }
- break;
- case CMD_STARTCODE:
- {
- m_parser.tokenizer.setStateCode();
- retval = handleStartCode();
- }
- break;
- case CMD_HTMLONLY:
- {
- m_parser.tokenizer.setStateHtmlOnly();
- retval = m_parser.tokenizer.lex();
- m_children.push_back(std::make_unique<DocVerbatim>(m_parser,this,m_parser.context.context,m_parser.context.token->verb,DocVerbatim::HtmlOnly,m_parser.context.isExample,m_parser.context.exampleName,m_parser.context.token->name=="block"));
- if (retval==0) warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"htmlonly section ended without end marker");
- m_parser.tokenizer.setStatePara();
- }
- break;
- case CMD_MANONLY:
- {
- m_parser.tokenizer.setStateManOnly();
- retval = m_parser.tokenizer.lex();
- m_children.push_back(std::make_unique<DocVerbatim>(m_parser,this,m_parser.context.context,m_parser.context.token->verb,DocVerbatim::ManOnly,m_parser.context.isExample,m_parser.context.exampleName));
- if (retval==0) warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"manonly section ended without end marker");
- m_parser.tokenizer.setStatePara();
- }
- break;
- case CMD_RTFONLY:
- {
- m_parser.tokenizer.setStateRtfOnly();
- retval = m_parser.tokenizer.lex();
- m_children.push_back(std::make_unique<DocVerbatim>(m_parser,this,m_parser.context.context,m_parser.context.token->verb,DocVerbatim::RtfOnly,m_parser.context.isExample,m_parser.context.exampleName));
- if (retval==0) warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"rtfonly section ended without end marker");
- m_parser.tokenizer.setStatePara();
- }
- break;
- case CMD_LATEXONLY:
- {
- m_parser.tokenizer.setStateLatexOnly();
- retval = m_parser.tokenizer.lex();
- m_children.push_back(std::make_unique<DocVerbatim>(m_parser,this,m_parser.context.context,m_parser.context.token->verb,DocVerbatim::LatexOnly,m_parser.context.isExample,m_parser.context.exampleName));
- if (retval==0) warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"latexonly section ended without end marker");
- m_parser.tokenizer.setStatePara();
- }
- break;
- case CMD_XMLONLY:
- {
- m_parser.tokenizer.setStateXmlOnly();
- retval = m_parser.tokenizer.lex();
- m_children.push_back(std::make_unique<DocVerbatim>(m_parser,this,m_parser.context.context,m_parser.context.token->verb,DocVerbatim::XmlOnly,m_parser.context.isExample,m_parser.context.exampleName));
- if (retval==0) warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"xmlonly section ended without end marker");
- m_parser.tokenizer.setStatePara();
- }
- break;
- case CMD_DBONLY:
- {
- m_parser.tokenizer.setStateDbOnly();
- retval = m_parser.tokenizer.lex();
- m_children.push_back(std::make_unique<DocVerbatim>(m_parser,this,m_parser.context.context,m_parser.context.token->verb,DocVerbatim::DocbookOnly,m_parser.context.isExample,m_parser.context.exampleName));
- if (retval==0) warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"docbookonly section ended without end marker");
- m_parser.tokenizer.setStatePara();
- }
- break;
- case CMD_ILITERAL:
- {
- DocVerbatim::Type t = DocVerbatim::JavaDocLiteral;
- m_parser.tokenizer.setStateILiteralOpt();
- retval = m_parser.tokenizer.lex();
-
- QCString fullMatch = m_parser.context.token->verb;
- int idx = fullMatch.find('{');
- int idxEnd = fullMatch.find("}",idx+1);
- StringVector optList;
- if (idx != -1) // options present
- {
- QCString optStr = fullMatch.mid(idx+1,idxEnd-idx-1).stripWhiteSpace();
- optList = split(optStr.str(),",");
- for (const auto &opt : optList)
- {
- if (opt.empty()) continue;
- QCString locOpt(opt);
- locOpt = locOpt.stripWhiteSpace().lower();
- if (locOpt == "code")
- {
- t = DocVerbatim::JavaDocCode;
- }
- else if (!locOpt.isEmpty())
- {
- warn(m_parser.context.fileName,m_parser.tokenizer.getLineNr(), "Unknown option '%s' for '\\iliteral'",qPrint(opt));
- }
- }
- }
-
- m_parser.tokenizer.setStateILiteral();
- retval = m_parser.tokenizer.lex();
- m_children.push_back(std::make_unique<DocVerbatim>(m_parser,this,m_parser.context.context,m_parser.context.token->verb,t,m_parser.context.isExample,m_parser.context.exampleName));
- if (retval==0)
- {
- if (t == DocVerbatim::JavaDocCode)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"javadoc code section ended without end marker");
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"javadoc literal section ended without end marker");
- }
- }
- m_parser.tokenizer.setStatePara();
- }
- break;
- case CMD_VERBATIM:
- {
- m_parser.tokenizer.setStateVerbatim();
- retval = m_parser.tokenizer.lex();
- m_children.push_back(std::make_unique<DocVerbatim>(m_parser,this,m_parser.context.context,m_parser.context.token->verb,DocVerbatim::Verbatim,m_parser.context.isExample,m_parser.context.exampleName));
- if (retval==0) warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"verbatim section ended without end marker");
- m_parser.tokenizer.setStatePara();
- }
- break;
- case CMD_DOT:
- {
- auto dv = std::make_unique<DocVerbatim>(m_parser,this,m_parser.context.context,m_parser.context.token->verb,DocVerbatim::Dot,m_parser.context.isExample,m_parser.context.exampleName);
- m_parser.tokenizer.setStatePara();
- QCString width,height;
- m_parser.defaultHandleTitleAndSize(CMD_DOT,dv.get(),dv->children(),width,height);
- m_parser.tokenizer.setStateDot();
- retval = m_parser.tokenizer.lex();
- dv->setText(m_parser.context.token->verb);
- dv->setWidth(width);
- dv->setHeight(height);
- dv->setLocation(m_parser.context.fileName,m_parser.tokenizer.getLineNr());
- if (!Config_getBool(HAVE_DOT))
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"ignoring \\dot command because HAVE_DOT is not set");
- }
- else
- {
- m_children.push_back(std::move(dv));
- }
- if (retval==0) warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"dot section ended without end marker");
- m_parser.tokenizer.setStatePara();
- }
- break;
- case CMD_MSC:
- {
- auto dv = std::make_unique<DocVerbatim>(m_parser,this,m_parser.context.context,m_parser.context.token->verb,DocVerbatim::Msc,m_parser.context.isExample,m_parser.context.exampleName);
- m_parser.tokenizer.setStatePara();
- QCString width,height;
- m_parser.defaultHandleTitleAndSize(CMD_MSC,dv.get(),dv->children(),width,height);
- m_parser.tokenizer.setStateMsc();
- retval = m_parser.tokenizer.lex();
- dv->setText(m_parser.context.token->verb);
- dv->setWidth(width);
- dv->setHeight(height);
- dv->setLocation(m_parser.context.fileName,m_parser.tokenizer.getLineNr());
- m_children.push_back(std::move(dv));
- if (retval==0) warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"msc section ended without end marker");
- m_parser.tokenizer.setStatePara();
- }
- break;
- case CMD_STARTUML:
- {
- static QCString jarPath = Config_getString(PLANTUML_JAR_PATH);
- m_parser.tokenizer.setStatePlantUMLOpt();
- retval = m_parser.tokenizer.lex();
-
- QCString fullMatch = m_parser.context.token->sectionId;
- QCString sectionId = "";
- int idx = fullMatch.find('{');
- int idxEnd = fullMatch.find("}",idx+1);
- StringVector optList;
- QCString engine;
- if (idx != -1) // options present
- {
- QCString optStr = fullMatch.mid(idx+1,idxEnd-idx-1).stripWhiteSpace();
- optList = split(optStr.str(),",");
- for (const auto &opt : optList)
- {
- if (opt.empty()) continue;
- bool found = false;
- QCString locOpt(opt);
- locOpt = locOpt.stripWhiteSpace().lower();
- if (g_plantumlEngine.find(locOpt.str())!=g_plantumlEngine.end())
- {
- if (!engine.isEmpty())
- {
- warn(m_parser.context.fileName,m_parser.tokenizer.getLineNr(), "Multiple definition of engine for '\\startuml'");
- }
- engine = locOpt;
- found = true;
- }
- if (!found)
- {
- if (sectionId.isEmpty())
- {
- sectionId = opt;
- }
- else
- {
- warn(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Multiple use of of filename for '\\startuml'");
- }
- }
- }
- }
- else
- {
- sectionId = m_parser.context.token->sectionId;
- }
- if (engine.isEmpty()) engine = "uml";
-
- if (sectionId.isEmpty())
- {
- m_parser.tokenizer.setStatePlantUMLOpt();
- retval = m_parser.tokenizer.lex();
- assert(retval==RetVal_OK);
-
- sectionId = m_parser.context.token->sectionId;
- sectionId = sectionId.stripWhiteSpace();
- }
-
- QCString plantFile(sectionId);
- DocVerbatim *dv = new DocVerbatim(m_parser,this,m_parser.context.context,m_parser.context.token->verb,DocVerbatim::PlantUML,FALSE,plantFile);
- dv->setEngine(engine);
- m_parser.tokenizer.setStatePara();
- QCString width,height;
- m_parser.defaultHandleTitleAndSize(CMD_STARTUML,dv,dv->children(),width,height);
- m_parser.tokenizer.setStatePlantUML();
- retval = m_parser.tokenizer.lex();
- int line = 0;
- QCString trimmedVerb = stripLeadingAndTrailingEmptyLines(m_parser.context.token->verb,line);
- if (engine == "ditaa")
- {
- dv->setUseBitmap(true);
- }
- else if (engine == "uml")
- {
- int i = trimmedVerb.find('\n');
- QCString firstLine = i==-1 ? trimmedVerb : trimmedVerb.left(i);
- if (firstLine.stripWhiteSpace() == "ditaa") dv->setUseBitmap(true);
- }
- dv->setText(trimmedVerb);
- dv->setWidth(width);
- dv->setHeight(height);
- dv->setLocation(m_parser.context.fileName,m_parser.tokenizer.getLineNr());
- if (jarPath.isEmpty())
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"ignoring \\startuml command because PLANTUML_JAR_PATH is not set");
- delete dv;
- }
- else
- {
- m_children.push_back(std::unique_ptr<DocVerbatim>(dv));
- }
- if (retval==0) warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"startuml section ended without end marker");
- m_parser.tokenizer.setStatePara();
- }
- break;
- case CMD_ENDPARBLOCK:
- retval=RetVal_EndParBlock;
- break;
- case CMD_ENDCODE:
- case CMD_ENDHTMLONLY:
- case CMD_ENDMANONLY:
- case CMD_ENDRTFONLY:
- case CMD_ENDLATEXONLY:
- case CMD_ENDXMLONLY:
- case CMD_ENDDBONLY:
- case CMD_ENDLINK:
- case CMD_ENDVERBATIM:
- case CMD_ENDILITERAL:
- case CMD_ENDDOT:
- case CMD_ENDMSC:
- case CMD_ENDUML:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected command %s",qPrint(m_parser.context.token->name));
- break;
- case CMD_PARAM:
- retval = handleParamSection(cmdName,DocParamSect::Param,FALSE,m_parser.context.token->paramDir);
- break;
- case CMD_TPARAM:
- retval = handleParamSection(cmdName,DocParamSect::TemplateParam,FALSE,m_parser.context.token->paramDir);
- break;
- case CMD_RETVAL:
- retval = handleParamSection(cmdName,DocParamSect::RetVal);
- break;
- case CMD_EXCEPTION:
- retval = handleParamSection(cmdName,DocParamSect::Exception);
- break;
- case CMD_XREFITEM:
- retval = handleXRefItem();
- break;
- case CMD_LINEBREAK:
- {
- m_children.push_back(std::make_unique<DocLineBreak>(m_parser,this));
- }
- break;
- case CMD_ANCHOR:
- {
- DocAnchor *anchor = m_parser.handleAnchor(this);
- if (anchor)
- {
- m_children.push_back(std::unique_ptr<DocAnchor>(anchor));
- }
- }
- break;
- case CMD_ADDINDEX:
- {
- DocIndexEntry *ie = new DocIndexEntry(m_parser,this,
- m_parser.context.scope!=Doxygen::globalScope?m_parser.context.scope:0,
- m_parser.context.memberDef);
- m_children.push_back(std::unique_ptr<DocIndexEntry>(ie));
- retval = ie->parse();
- }
- break;
- case CMD_INTERNAL:
- retval = RetVal_Internal;
- break;
- case CMD_ENDINTERNAL:
- retval = RetVal_EndInternal;
- break;
- case CMD_PARBLOCK:
- {
- DocParBlock *block = new DocParBlock(m_parser,this);
- m_children.push_back(std::unique_ptr<DocParBlock>(block));
- retval = block->parse();
- }
- break;
- case CMD_COPYDOC: // fall through
- case CMD_COPYBRIEF: // fall through
- case CMD_COPYDETAILS:
- //retval = RetVal_CopyDoc;
- // these commands should already be resolved by processCopyDoc()
- break;
- case CMD_INCLUDE:
- handleInclude(cmdName,DocInclude::Include);
- break;
- case CMD_INCWITHLINES:
- handleInclude(cmdName,DocInclude::IncWithLines);
- break;
- case CMD_DONTINCLUDE:
- handleInclude(cmdName,DocInclude::DontInclude);
- break;
- case CMD_HTMLINCLUDE:
- handleInclude(cmdName,DocInclude::HtmlInclude);
- break;
- case CMD_LATEXINCLUDE:
- handleInclude(cmdName,DocInclude::LatexInclude);
- break;
- case CMD_RTFINCLUDE:
- handleInclude(cmdName,DocInclude::RtfInclude);
- break;
- case CMD_MANINCLUDE:
- handleInclude(cmdName,DocInclude::ManInclude);
- break;
- case CMD_XMLINCLUDE:
- handleInclude(cmdName,DocInclude::XmlInclude);
- break;
- case CMD_DOCBOOKINCLUDE:
- handleInclude(cmdName,DocInclude::DocbookInclude);
- break;
- case CMD_VERBINCLUDE:
- handleInclude(cmdName,DocInclude::VerbInclude);
- break;
- case CMD_SNIPPET:
- handleInclude(cmdName,DocInclude::Snippet);
- break;
- case CMD_SNIPWITHLINES:
- handleInclude(cmdName,DocInclude::SnipWithLines);
- break;
- case CMD_INCLUDEDOC:
- handleInclude(cmdName,DocInclude::IncludeDoc);
- break;
- case CMD_SNIPPETDOC:
- handleInclude(cmdName,DocInclude::SnippetDoc);
- break;
- case CMD_SKIP:
- handleIncludeOperator(cmdName,DocIncOperator::Skip);
- break;
- case CMD_UNTIL:
- handleIncludeOperator(cmdName,DocIncOperator::Until);
- break;
- case CMD_SKIPLINE:
- handleIncludeOperator(cmdName,DocIncOperator::SkipLine);
- break;
- case CMD_LINE:
- handleIncludeOperator(cmdName,DocIncOperator::Line);
- break;
- case CMD_IMAGE:
- handleImage(cmdName);
- break;
- case CMD_DOTFILE:
- if (!Config_getBool(HAVE_DOT))
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),
- "ignoring \\dotfile command because HAVE_DOT is not set");
- }
- else
- {
- handleFile<DocDotFile>(cmdName);
- }
- break;
- case CMD_VHDLFLOW:
- handleVhdlFlow();
- break;
- case CMD_MSCFILE:
- handleFile<DocMscFile>(cmdName);
- break;
- case CMD_DIAFILE:
- handleFile<DocDiaFile>(cmdName);
- break;
- case CMD_LINK:
- handleLink(cmdName,FALSE);
- break;
- case CMD_JAVALINK:
- handleLink(cmdName,TRUE);
- break;
- case CMD_CITE:
- handleCite();
- break;
- case CMD_EMOJI:
- handleEmoji();
- break;
- case CMD_REF: // fall through
- case CMD_SUBPAGE:
- handleRef(cmdName);
- break;
- case CMD_SECREFLIST:
- {
- DocSecRefList *list = new DocSecRefList(m_parser,this);
- m_children.push_back(std::unique_ptr<DocSecRefList>(list));
- list->parse();
- }
- break;
- case CMD_SECREFITEM:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected command %s",qPrint(m_parser.context.token->name));
- break;
- case CMD_ENDSECREFLIST:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected command %s",qPrint(m_parser.context.token->name));
- break;
- case CMD_FORMULA:
- {
- m_children.push_back(
- std::make_unique<DocFormula>(
- m_parser,this,m_parser.context.token->id));
- }
- break;
- //case CMD_LANGSWITCH:
- // retval = handleLanguageSwitch();
- // break;
- case CMD_INTERNALREF:
- //warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"unexpected command %s",qPrint(m_parser.context.token->name));
- {
- DocInternalRef *ref = m_parser.handleInternalRef(this);
- if (ref)
- {
- m_children.push_back(std::unique_ptr<DocInternalRef>(ref));
- ref->parse();
- }
- m_parser.tokenizer.setStatePara();
- }
- break;
- case CMD_INHERITDOC:
- handleInheritDoc();
- break;
- case CMD_ILINE:
- handleIline();
- break;
- default:
- // we should not get here!
- ASSERT(0);
- break;
- }
- INTERNAL_ASSERT(retval==0 || retval==RetVal_OK || retval==RetVal_SimpleSec ||
- retval==TK_LISTITEM || retval==TK_ENDLIST || retval==TK_NEWPARA ||
- retval==RetVal_Section || retval==RetVal_EndList ||
- retval==RetVal_Internal || retval==RetVal_SwitchLang ||
- retval==RetVal_EndInternal
- );
- DBG(("handleCommand(%s) end retval=%s\n",qPrint(cmdName),DocTokenizer::retvalToString(retval)));
- return retval;
-}
-
-static bool findAttribute(const HtmlAttribList &tagHtmlAttribs,
- const char *attrName,
- QCString *result)
-{
-
- for (const auto &opt : tagHtmlAttribs)
- {
- if (opt.name==attrName)
- {
- *result = opt.value;
- return TRUE;
- }
- }
- return FALSE;
-}
-
-int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &tagHtmlAttribs)
-{
- DBG(("handleHtmlStartTag(%s,%d)\n",qPrint(tagName),tagHtmlAttribs.size()));
- int retval=RetVal_OK;
- int tagId = Mappers::htmlTagMapper->map(tagName);
- if (m_parser.context.token->emptyTag && !(tagId&XML_CmdMask) &&
- tagId!=HTML_UNKNOWN && tagId!=HTML_IMG && tagId!=HTML_BR && tagId!=HTML_HR && tagId!=HTML_P)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"HTML tag ('<%s/>') may not use the 'empty tag' XHTML syntax.",
- qPrint(tagName));
- }
- switch (tagId)
- {
- case HTML_UL:
- if (!m_parser.context.token->emptyTag)
- {
- DocHtmlList *list = new DocHtmlList(m_parser,this,tagHtmlAttribs,DocHtmlList::Unordered);
- m_children.push_back(std::unique_ptr<DocHtmlList>(list));
- retval=list->parse();
- }
- break;
- case HTML_OL:
- if (!m_parser.context.token->emptyTag)
- {
- DocHtmlList *list = new DocHtmlList(m_parser,this,tagHtmlAttribs,DocHtmlList::Ordered);
- m_children.push_back(std::unique_ptr<DocHtmlList>(list));
- retval=list->parse();
- }
- break;
- case HTML_LI:
- if (m_parser.context.token->emptyTag) break;
- if (!insideUL(this) && !insideOL(this))
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"lonely <li> tag found");
- }
- else
- {
- retval=RetVal_ListItem;
- }
- break;
- case HTML_BOLD:
- if (!m_parser.context.token->emptyTag) m_parser.handleStyleEnter(this,m_children,DocStyleChange::Bold,tagName,&m_parser.context.token->attribs);
- break;
- case HTML_S:
- if (!m_parser.context.token->emptyTag) m_parser.handleStyleEnter(this,m_children,DocStyleChange::S,tagName,&m_parser.context.token->attribs);
- break;
- case HTML_STRIKE:
- if (!m_parser.context.token->emptyTag) m_parser.handleStyleEnter(this,m_children,DocStyleChange::Strike,tagName,&m_parser.context.token->attribs);
- break;
- case HTML_DEL:
- if (!m_parser.context.token->emptyTag) m_parser.handleStyleEnter(this,m_children,DocStyleChange::Del,tagName,&m_parser.context.token->attribs);
- break;
- case HTML_UNDERLINE:
- if (!m_parser.context.token->emptyTag) m_parser.handleStyleEnter(this,m_children,DocStyleChange::Underline,tagName,&m_parser.context.token->attribs);
- break;
- case HTML_INS:
- if (!m_parser.context.token->emptyTag) m_parser.handleStyleEnter(this,m_children,DocStyleChange::Ins,tagName,&m_parser.context.token->attribs);
- break;
- case HTML_DETAILS:
- if (!m_parser.context.token->emptyTag) m_parser.handleStyleEnter(this,m_children,DocStyleChange::Details,tagName,&m_parser.context.token->attribs);
- break;
- case HTML_CODE:
- if (m_parser.context.token->emptyTag) break;
- if (/*getLanguageFromFileName(m_parser.context.fileName)==SrcLangExt_CSharp ||*/ m_parser.context.xmlComment)
- // for C# source or inside a <summary> or <remark> section we
- // treat <code> as an XML tag (so similar to @code)
- {
- m_parser.tokenizer.setStateXmlCode();
- retval = handleStartCode();
- }
- else // normal HTML markup
- {
- m_parser.handleStyleEnter(this,m_children,DocStyleChange::Code,tagName,&m_parser.context.token->attribs);
- }
- break;
- case HTML_EMPHASIS:
- if (!m_parser.context.token->emptyTag) m_parser.handleStyleEnter(this,m_children,DocStyleChange::Italic,tagName,&m_parser.context.token->attribs);
- break;
- case HTML_DIV:
- if (!m_parser.context.token->emptyTag) m_parser.handleStyleEnter(this,m_children,DocStyleChange::Div,tagName,&m_parser.context.token->attribs);
- break;
- case HTML_SPAN:
- if (!m_parser.context.token->emptyTag) m_parser.handleStyleEnter(this,m_children,DocStyleChange::Span,tagName,&m_parser.context.token->attribs);
- break;
- case HTML_SUB:
- if (!m_parser.context.token->emptyTag) m_parser.handleStyleEnter(this,m_children,DocStyleChange::Subscript,tagName,&m_parser.context.token->attribs);
- break;
- case HTML_SUP:
- if (!m_parser.context.token->emptyTag) m_parser.handleStyleEnter(this,m_children,DocStyleChange::Superscript,tagName,&m_parser.context.token->attribs);
- break;
- case HTML_CENTER:
- if (!m_parser.context.token->emptyTag) m_parser.handleStyleEnter(this,m_children,DocStyleChange::Center,tagName,&m_parser.context.token->attribs);
- break;
- case HTML_SMALL:
- if (!m_parser.context.token->emptyTag) m_parser.handleStyleEnter(this,m_children,DocStyleChange::Small,tagName,&m_parser.context.token->attribs);
- break;
- case HTML_CITE:
- if (!m_parser.context.token->emptyTag) m_parser.handleStyleEnter(this,m_children,DocStyleChange::Cite,tagName,&m_parser.context.token->attribs);
- break;
- case HTML_PRE:
- if (m_parser.context.token->emptyTag) break;
- m_parser.handleStyleEnter(this,m_children,DocStyleChange::Preformatted,tagName,&m_parser.context.token->attribs);
- setInsidePreformatted(TRUE);
- m_parser.tokenizer.setInsidePre(TRUE);
- break;
- case HTML_P:
- retval=TK_NEWPARA;
- break;
- case HTML_DL:
- if (!m_parser.context.token->emptyTag)
- {
- DocHtmlDescList *list = new DocHtmlDescList(m_parser,this,tagHtmlAttribs);
- m_children.push_back(std::unique_ptr<DocHtmlDescList>(list));
- retval=list->parse();
- }
- break;
- case HTML_DT:
- retval = RetVal_DescTitle;
- break;
- case HTML_DD:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected tag <dd> found");
- break;
- case HTML_TABLE:
- if (!m_parser.context.token->emptyTag)
- {
- DocHtmlTable *table = new DocHtmlTable(m_parser,this,tagHtmlAttribs);
- m_children.push_back(std::unique_ptr<DocHtmlTable>(table));
- retval=table->parse();
- }
- break;
- case HTML_TR:
- retval = RetVal_TableRow;
- break;
- case HTML_TD:
- retval = RetVal_TableCell;
- break;
- case HTML_TH:
- retval = RetVal_TableHCell;
- break;
- case HTML_CAPTION:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected tag <caption> found");
- break;
- case HTML_BR:
- {
- m_children.push_back(std::make_unique<DocLineBreak>(m_parser,this,tagHtmlAttribs));
- }
- break;
- case HTML_HR:
- {
- m_children.push_back(std::make_unique<DocHorRuler>(m_parser,this,tagHtmlAttribs));
- }
- break;
- case HTML_A:
- retval = m_parser.handleAHref(this,m_children,tagHtmlAttribs);
- break;
- case HTML_H1:
- if (!m_parser.context.token->emptyTag) retval=handleHtmlHeader(tagHtmlAttribs,1);
- break;
- case HTML_H2:
- if (!m_parser.context.token->emptyTag) retval=handleHtmlHeader(tagHtmlAttribs,2);
- break;
- case HTML_H3:
- if (!m_parser.context.token->emptyTag) retval=handleHtmlHeader(tagHtmlAttribs,3);
- break;
- case HTML_H4:
- if (!m_parser.context.token->emptyTag) retval=handleHtmlHeader(tagHtmlAttribs,4);
- break;
- case HTML_H5:
- if (!m_parser.context.token->emptyTag) retval=handleHtmlHeader(tagHtmlAttribs,5);
- break;
- case HTML_H6:
- if (!m_parser.context.token->emptyTag) retval=handleHtmlHeader(tagHtmlAttribs,6);
- break;
- case HTML_IMG:
- {
- m_parser.handleImg(this,m_children,tagHtmlAttribs);
- }
- break;
- case HTML_BLOCKQUOTE:
- if (!m_parser.context.token->emptyTag)
- {
- DocHtmlBlockQuote *block = new DocHtmlBlockQuote(m_parser,this,tagHtmlAttribs);
- m_children.push_back(std::unique_ptr<DocHtmlBlockQuote>(block));
- retval = block->parse();
- }
- break;
-
- case XML_SUMMARY:
- if (insideDetails(m_parser.context.styleStack))
- {
- if (!m_parser.context.token->emptyTag) m_parser.handleStyleEnter(this,m_children,DocStyleChange::Summary,tagName,&m_parser.context.token->attribs);
- break;
- }
- case XML_REMARKS:
- case XML_EXAMPLE:
- m_parser.context.xmlComment=TRUE;
- // fall through
- case XML_VALUE:
- case XML_PARA:
- if (!m_children.empty())
- {
- retval = TK_NEWPARA;
- }
- break;
- case XML_DESCRIPTION:
- if (insideTable(this))
- {
- retval=RetVal_TableCell;
- }
- break;
- case XML_C:
- m_parser.handleStyleEnter(this,m_children,DocStyleChange::Code,tagName,&m_parser.context.token->attribs);
- break;
- case XML_PARAM:
- case XML_TYPEPARAM:
- {
- m_parser.context.xmlComment=TRUE;
- QCString paramName;
- if (findAttribute(tagHtmlAttribs,"name",¶mName))
- {
- if (paramName.isEmpty())
- {
- if (Config_getBool(WARN_NO_PARAMDOC))
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"empty 'name' attribute for <param%s> tag.",tagId==XML_PARAM?"":"type");
- }
- }
- else
- {
- retval = handleParamSection(paramName,
- tagId==XML_PARAM ? DocParamSect::Param : DocParamSect::TemplateParam,
- TRUE);
- }
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Missing 'name' attribute from <param%s> tag.",tagId==XML_PARAM?"":"type");
- }
- }
- break;
- case XML_PARAMREF:
- case XML_TYPEPARAMREF:
- {
- QCString paramName;
- if (findAttribute(tagHtmlAttribs,"name",¶mName))
- {
- //printf("paramName=%s\n",qPrint(paramName));
- m_children.push_back(std::make_unique<DocStyleChange>(m_parser,this,(uint)m_parser.context.nodeStack.size(),DocStyleChange::Italic,tagName,TRUE));
- m_children.push_back(std::make_unique<DocWord>(m_parser,this,paramName));
- m_children.push_back(std::make_unique<DocStyleChange>(m_parser,this,(uint)m_parser.context.nodeStack.size(),DocStyleChange::Italic,tagName,FALSE));
- if (retval!=TK_WORD) m_children.push_back(std::make_unique<DocWhiteSpace>(m_parser,this," "));
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Missing 'name' attribute from <param%sref> tag.",tagId==XML_PARAMREF?"":"type");
- }
- }
- break;
- case XML_EXCEPTION:
- {
- m_parser.context.xmlComment=TRUE;
- QCString exceptName;
- if (findAttribute(tagHtmlAttribs,"cref",&exceptName))
- {
- unescapeCRef(exceptName);
- retval = handleParamSection(exceptName,DocParamSect::Exception,TRUE);
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Missing 'cref' attribute from <exception> tag.");
- }
- }
- break;
- case XML_ITEM:
- case XML_LISTHEADER:
- if (insideTable(this))
- {
- retval=RetVal_TableRow;
- }
- else if (insideUL(this) || insideOL(this))
- {
- retval=RetVal_ListItem;
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"lonely <item> tag found");
- }
- break;
- case XML_RETURNS:
- m_parser.context.xmlComment=TRUE;
- retval = handleSimpleSection(DocSimpleSect::Return,TRUE);
- m_parser.context.hasReturnCommand=TRUE;
- break;
- case XML_TERM:
- //m_children.push_back(std::make_unique<DocStyleChange>(this,(uint)m_parser.context.nodeStack.size(),DocStyleChange::Bold,TRUE));
- if (insideTable(this))
- {
- retval=RetVal_TableCell;
- }
- break;
- case XML_SEE:
- // I'm not sure if <see> is the same as <seealso> or if it
- // should you link a member without producing a section. The
- // C# specification is extremely vague about this (but what else
- // can we expect from Microsoft...)
- {
- QCString cref;
- //printf("XML_SEE: empty tag=%d\n",m_parser.context.token->emptyTag);
- if (findAttribute(tagHtmlAttribs,"cref",&cref))
- {
- unescapeCRef(cref);
- if (m_parser.context.token->emptyTag) // <see cref="..."/> style
- {
- bool inSeeBlock = m_parser.context.inSeeBlock;
- m_parser.context.token->name = cref;
- m_parser.context.inSeeBlock = TRUE;
- m_parser.handleLinkedWord(this,m_children,TRUE);
- m_parser.context.inSeeBlock = inSeeBlock;
- }
- else // <see cref="...">...</see> style
- {
- //DocRef *ref = new DocRef(this,cref);
- //m_children.append(ref);
- //ref->parse();
- m_parser.tokenizer.setStatePara();
- DocLink *lnk = new DocLink(m_parser,this,cref);
- m_children.push_back(std::unique_ptr<DocLink>(lnk));
- QCString leftOver = lnk->parse(FALSE,TRUE);
- if (!leftOver.isEmpty())
- {
- m_children.push_back(std::make_unique<DocWord>(m_parser,this,leftOver));
- }
- }
- }
- else if (findAttribute(tagHtmlAttribs,"langword",&cref)) // <see langword="..."/> or <see langword="..."></see>
- {
- bool inSeeBlock = m_parser.context.inSeeBlock;
- m_parser.context.token->name = cref;
- m_parser.context.inSeeBlock = TRUE;
- m_children.push_back(std::make_unique<DocStyleChange>(m_parser,this,(uint)m_parser.context.nodeStack.size(),DocStyleChange::Code,tagName,TRUE));
- m_parser.handleLinkedWord(this,m_children,TRUE);
- m_children.push_back(std::make_unique<DocStyleChange>(m_parser,this,(uint)m_parser.context.nodeStack.size(),DocStyleChange::Code,tagName,FALSE));
- m_parser.context.inSeeBlock = inSeeBlock;
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Missing 'cref' or 'langword' attribute from <see> tag.");
- }
- }
- break;
- case XML_SEEALSO:
- {
- m_parser.context.xmlComment=TRUE;
- QCString cref;
- if (findAttribute(tagHtmlAttribs,"cref",&cref))
- {
- unescapeCRef(cref);
- // Look for an existing "see" section
- DocSimpleSect *ss=0;
- for (const auto &n : m_children)
- {
- if (n->kind()==Kind_SimpleSect && ((DocSimpleSect *)n.get())->type()==DocSimpleSect::See)
- {
- ss = (DocSimpleSect *)n.get();
- }
- }
-
- if (!ss) // start new section
- {
- ss=new DocSimpleSect(m_parser,this,DocSimpleSect::See);
- m_children.push_back(std::unique_ptr<DocSimpleSect>(ss));
- }
-
- ss->appendLinkWord(cref);
- retval = RetVal_OK;
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Missing 'cref' attribute from <seealso> tag.");
- }
- }
- break;
- case XML_LIST:
- {
- QCString type;
- findAttribute(tagHtmlAttribs,"type",&type);
- DocHtmlList::Type listType = DocHtmlList::Unordered;
- HtmlAttribList emptyList;
- if (type=="number")
- {
- listType=DocHtmlList::Ordered;
- }
- if (type=="table")
- {
- DocHtmlTable *table = new DocHtmlTable(m_parser,this,emptyList);
- m_children.push_back(std::unique_ptr<DocHtmlTable>(table));
- retval=table->parseXml();
- }
- else
- {
- DocHtmlList *list = new DocHtmlList(m_parser,this,emptyList,listType);
- m_children.push_back(std::unique_ptr<DocHtmlList>(list));
- retval=list->parseXml();
- }
- }
- break;
- case XML_INCLUDE:
- case XML_PERMISSION:
- // These tags are defined in .Net but are currently unsupported
- m_parser.context.xmlComment=TRUE;
- break;
- case HTML_UNKNOWN:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unsupported xml/html tag <%s> found", qPrint(tagName));
- m_children.push_back(std::make_unique<DocWord>(m_parser,this, "<"+tagName+m_parser.context.token->attribsStr+">"));
- break;
- case XML_INHERITDOC:
- handleInheritDoc();
- break;
- default:
- // we should not get here!
- ASSERT(0);
- break;
- }
- return retval;
-}
-
-int DocPara::handleHtmlEndTag(const QCString &tagName)
-{
- DBG(("handleHtmlEndTag(%s)\n",qPrint(tagName)));
- int tagId = Mappers::htmlTagMapper->map(tagName);
- int retval=RetVal_OK;
- switch (tagId)
- {
- case HTML_UL:
- if (!insideUL(this))
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"found </ul> tag without matching <ul>");
- }
- else
- {
- retval=RetVal_EndList;
- }
- break;
- case HTML_OL:
- if (!insideOL(this))
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"found </ol> tag without matching <ol>");
- }
- else
- {
- retval=RetVal_EndList;
- }
- break;
- case HTML_LI:
- if (!insideLI(this))
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"found </li> tag without matching <li>");
- }
- else
- {
- // ignore </li> tags
- }
- break;
- case HTML_BLOCKQUOTE:
- retval=RetVal_EndBlockQuote;
- break;
- //case HTML_PRE:
- // if (!insidePRE(this))
- // {
- // warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"found </pre> tag without matching <pre>");
- // }
- // else
- // {
- // retval=RetVal_EndPre;
- // }
- // break;
- case HTML_BOLD:
- m_parser.handleStyleLeave(this,m_children,DocStyleChange::Bold,tagName);
- break;
- case HTML_S:
- m_parser.handleStyleLeave(this,m_children,DocStyleChange::S,"s");
- break;
- case HTML_STRIKE:
- m_parser.handleStyleLeave(this,m_children,DocStyleChange::Strike,tagName);
- break;
- case HTML_DEL:
- m_parser.handleStyleLeave(this,m_children,DocStyleChange::Del,tagName);
- break;
- case HTML_UNDERLINE:
- m_parser.handleStyleLeave(this,m_children,DocStyleChange::Underline,tagName);
- break;
- case HTML_INS:
- m_parser.handleStyleLeave(this,m_children,DocStyleChange::Ins,tagName);
- break;
- case HTML_DETAILS:
- m_parser.handleStyleLeave(this,m_children,DocStyleChange::Details,tagName);
- break;
- case HTML_CODE:
- m_parser.handleStyleLeave(this,m_children,DocStyleChange::Code,tagName);
- break;
- case HTML_EMPHASIS:
- m_parser.handleStyleLeave(this,m_children,DocStyleChange::Italic,tagName);
- break;
- case HTML_DIV:
- m_parser.handleStyleLeave(this,m_children,DocStyleChange::Div,tagName);
- break;
- case HTML_SPAN:
- m_parser.handleStyleLeave(this,m_children,DocStyleChange::Span,tagName);
- break;
- case HTML_SUB:
- m_parser.handleStyleLeave(this,m_children,DocStyleChange::Subscript,tagName);
- break;
- case HTML_SUP:
- m_parser.handleStyleLeave(this,m_children,DocStyleChange::Superscript,tagName);
- break;
- case HTML_CENTER:
- m_parser.handleStyleLeave(this,m_children,DocStyleChange::Center,tagName);
- break;
- case HTML_SMALL:
- m_parser.handleStyleLeave(this,m_children,DocStyleChange::Small,tagName);
- break;
- case HTML_CITE:
- m_parser.handleStyleLeave(this,m_children,DocStyleChange::Cite,tagName);
- break;
- case HTML_PRE:
- m_parser.handleStyleLeave(this,m_children,DocStyleChange::Preformatted,tagName);
- setInsidePreformatted(FALSE);
- m_parser.tokenizer.setInsidePre(FALSE);
- break;
- case HTML_P:
- retval=TK_NEWPARA;
- break;
- case HTML_DL:
- retval=RetVal_EndDesc;
- break;
- case HTML_DT:
- // ignore </dt> tag
- break;
- case HTML_DD:
- // ignore </dd> tag
- break;
- case HTML_TABLE:
- retval=RetVal_EndTable;
- break;
- case HTML_TR:
- // ignore </tr> tag
- break;
- case HTML_TD:
- // ignore </td> tag
- break;
- case HTML_TH:
- // ignore </th> tag
- break;
- case HTML_CAPTION:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected tag </caption> found");
- break;
- case HTML_BR:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Illegal </br> tag found\n");
- break;
- case HTML_H1:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected tag </h1> found");
- break;
- case HTML_H2:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected tag </h2> found");
- break;
- case HTML_H3:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected tag </h3> found");
- break;
- case HTML_H4:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected tag </h4> found");
- break;
- case HTML_H5:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected tag </h5> found");
- break;
- case HTML_H6:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected tag </h6> found");
- break;
- case HTML_IMG:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected tag </img> found");
- break;
- case HTML_HR:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Illegal </hr> tag found\n");
- break;
- case HTML_A:
- //warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected tag </a> found");
- // ignore </a> tag (can be part of <a name=...></a>
- break;
-
- case XML_TERM:
- //m_children.push_back(std::make_unique<DocStyleChange>(this,(uint)m_parser.context.nodeStack.size(),DocStyleChange::Bold,FALSE));
- break;
- case XML_SUMMARY:
- if (insideDetails(m_parser.context.styleStack))
- {
- m_parser.handleStyleLeave(this,m_children,DocStyleChange::Summary,tagName);
- break;
- }
- case XML_REMARKS:
- case XML_PARA:
- case XML_VALUE:
- case XML_EXAMPLE:
- case XML_PARAM:
- case XML_LIST:
- case XML_TYPEPARAM:
- case XML_RETURNS:
- case XML_SEE:
- case XML_SEEALSO:
- case XML_EXCEPTION:
- case XML_INHERITDOC:
- retval = RetVal_CloseXml;
- break;
- case XML_C:
- m_parser.handleStyleLeave(this,m_children,DocStyleChange::Code,tagName);
- break;
- case XML_ITEM:
- case XML_LISTHEADER:
- case XML_INCLUDE:
- case XML_PERMISSION:
- case XML_DESCRIPTION:
- case XML_PARAMREF:
- case XML_TYPEPARAMREF:
- // These tags are defined in .Net but are currently unsupported
- break;
- case HTML_UNKNOWN:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unsupported xml/html tag </%s> found", qPrint(tagName));
- m_children.push_back(std::make_unique<DocWord>(m_parser,this,"</"+tagName+">"));
- break;
- default:
- // we should not get here!
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected end tag %s\n",qPrint(tagName));
- ASSERT(0);
- break;
- }
- return retval;
-}
-
-int DocPara::parse()
-{
- DBG(("DocPara::parse() start\n"));
- auto ns = AutoNodeStack(m_parser,this);
- // handle style commands "inherited" from the previous paragraph
- m_parser.handleInitialStyleCommands(this,m_children);
- int tok;
- int retval=0;
- while ((tok=m_parser.tokenizer.lex())) // get the next token
- {
-reparsetoken:
- DBG(("token %s at %d",DocTokenizer::tokToString(tok),m_parser.tokenizer.getLineNr()));
- if (tok==TK_WORD || tok==TK_LNKWORD || tok==TK_SYMBOL || tok==TK_URL ||
- tok==TK_COMMAND_AT || tok == TK_COMMAND_BS || tok==TK_HTMLTAG
- )
- {
- DBG((" name=%s",qPrint(m_parser.context.token->name)));
- }
- DBG(("\n"));
- switch(tok)
- {
- case TK_WORD:
- m_children.push_back(std::make_unique<DocWord>(m_parser,this,m_parser.context.token->name));
- break;
- case TK_LNKWORD:
- m_parser.handleLinkedWord(this,m_children);
- break;
- case TK_URL:
- m_children.push_back(std::make_unique<DocURL>(m_parser,this,m_parser.context.token->name,m_parser.context.token->isEMailAddr));
- break;
- case TK_WHITESPACE:
- {
- // prevent leading whitespace and collapse multiple whitespace areas
- DocNode::Kind k;
- if (insidePRE(this) || // all whitespace is relevant
- (
- // remove leading whitespace
- !m_children.empty() &&
- // and whitespace after certain constructs
- (k=m_children.back()->kind())!=DocNode::Kind_HtmlDescList &&
- k!=DocNode::Kind_HtmlTable &&
- k!=DocNode::Kind_HtmlList &&
- k!=DocNode::Kind_SimpleSect &&
- k!=DocNode::Kind_AutoList &&
- k!=DocNode::Kind_SimpleList &&
- /*k!=DocNode::Kind_Verbatim &&*/
- k!=DocNode::Kind_HtmlHeader &&
- k!=DocNode::Kind_HtmlBlockQuote &&
- k!=DocNode::Kind_ParamSect &&
- k!=DocNode::Kind_XRefItem
- )
- )
- {
- m_children.push_back(std::make_unique<DocWhiteSpace>(m_parser,this,m_parser.context.token->chars));
- }
- }
- break;
- case TK_LISTITEM:
- {
- DBG(("found list item at %d parent=%d\n",m_parser.context.token->indent,parent()->kind()));
- DocNode *n=parent();
- while (n && n->kind()!=DocNode::Kind_AutoList) n=n->parent();
- if (n) // we found an auto list up in the hierarchy
- {
- DocAutoList *al = (DocAutoList *)n;
- DBG(("previous list item at %d\n",al->indent()));
- if (al->indent()>=m_parser.context.token->indent)
- // new item at the same or lower indent level
- {
- retval=TK_LISTITEM;
- goto endparagraph;
- }
- }
-
- // determine list depth
- int depth = 0;
- n=parent();
- while(n)
- {
- if (n->kind() == DocNode::Kind_AutoList &&
- ((DocAutoList*)n)->isEnumList()) depth++;
- n=n->parent();
- }
-
- // first item or sub list => create new list
- DocAutoList *al=0;
- do
- {
- al = new DocAutoList(m_parser,this,m_parser.context.token->indent,
- m_parser.context.token->isEnumList,depth);
- m_children.push_back(std::unique_ptr<DocAutoList>(al));
- retval = al->parse();
- } while (retval==TK_LISTITEM && // new list
- al->indent()==m_parser.context.token->indent // at same indent level
- );
-
- // check the return value
- if (retval==RetVal_SimpleSec) // auto list ended due to simple section command
- {
- // Reparse the token that ended the section at this level,
- // so a new simple section will be started at this level.
- // This is the same as unputting the last read token and continuing.
- m_parser.context.token->name = m_parser.context.token->simpleSectName;
- if (m_parser.context.token->name.left(4)=="rcs:") // RCS section
- {
- m_parser.context.token->name = m_parser.context.token->name.mid(4);
- m_parser.context.token->text = m_parser.context.token->simpleSectText;
- tok = TK_RCSTAG;
- }
- else // other section
- {
- tok = TK_COMMAND_BS;
- }
- DBG(("reparsing command %s\n",qPrint(m_parser.context.token->name)));
- goto reparsetoken;
- }
- else if (retval==TK_ENDLIST)
- {
- if (al->indent()>m_parser.context.token->indent) // end list
- {
- goto endparagraph;
- }
- else // continue with current paragraph
- {
- }
- }
- else // paragraph ended due to TK_NEWPARA, TK_LISTITEM, or EOF
- {
- goto endparagraph;
- }
- }
- break;
- case TK_ENDLIST:
- DBG(("Found end of list inside of paragraph at line %d\n",m_parser.tokenizer.getLineNr()));
- if (parent()->kind()==DocNode::Kind_AutoListItem)
- {
- ASSERT(parent()->parent()->kind()==DocNode::Kind_AutoList);
- DocAutoList *al = (DocAutoList *)parent()->parent();
- if (al->indent()>=m_parser.context.token->indent)
- {
- // end of list marker ends this paragraph
- retval=TK_ENDLIST;
- goto endparagraph;
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"End of list marker found "
- "has invalid indent level");
- }
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"End of list marker found without any preceding "
- "list items");
- }
- break;
- case TK_COMMAND_AT:
- // fall through
- case TK_COMMAND_BS:
- {
- // see if we have to start a simple section
- int cmd = Mappers::cmdMapper->map(m_parser.context.token->name);
- DocNode *n=parent();
- while (n &&
- n->kind()!=DocNode::Kind_SimpleSect &&
- n->kind()!=DocNode::Kind_ParamSect
- )
- {
- n=n->parent();
- }
- if (cmd&SIMPLESECT_BIT)
- {
- if (n) // already in a simple section
- {
- // simple section cannot start in this paragraph, need
- // to unwind the stack and remember the command.
- m_parser.context.token->simpleSectName = m_parser.context.token->name;
- retval=RetVal_SimpleSec;
- goto endparagraph;
- }
- }
- // see if we are in a simple list
- n=parent();
- while (n && n->kind()!=DocNode::Kind_SimpleListItem) n=n->parent();
- if (n)
- {
- if (cmd==CMD_LI)
- {
- retval=RetVal_ListItem;
- goto endparagraph;
- }
- }
-
- // handle the command
- retval=handleCommand(m_parser.context.token->name,tok);
- DBG(("handleCommand returns %s\n",DocTokenizer::retvalToString(retval)));
-
- // check the return value
- if (retval==RetVal_SimpleSec)
- {
- // Reparse the token that ended the section at this level,
- // so a new simple section will be started at this level.
- // This is the same as unputting the last read token and continuing.
- m_parser.context.token->name = m_parser.context.token->simpleSectName;
- if (m_parser.context.token->name.left(4)=="rcs:") // RCS section
- {
- m_parser.context.token->name = m_parser.context.token->name.mid(4);
- m_parser.context.token->text = m_parser.context.token->simpleSectText;
- tok = TK_RCSTAG;
- }
- else // other section
- {
- tok = TK_COMMAND_BS;
- }
- DBG(("reparsing command %s\n",qPrint(m_parser.context.token->name)));
- goto reparsetoken;
- }
- else if (retval==RetVal_OK)
- {
- // the command ended normally, keep scanning for new tokens.
- retval = 0;
- }
- else if (retval>0 && retval<RetVal_OK)
- {
- // the command ended with a new command, reparse this token
- tok = retval;
- goto reparsetoken;
- }
- else // end of file, end of paragraph, start or end of section
- // or some auto list marker
- {
- goto endparagraph;
- }
- }
- break;
- case TK_HTMLTAG:
- {
- if (!m_parser.context.token->endTag) // found a start tag
- {
- retval = handleHtmlStartTag(m_parser.context.token->name,m_parser.context.token->attribs);
- }
- else // found an end tag
- {
- retval = handleHtmlEndTag(m_parser.context.token->name);
- }
- if (retval==RetVal_OK)
- {
- // the command ended normally, keep scanner for new tokens.
- retval = 0;
- }
- else
- {
- goto endparagraph;
- }
- }
- break;
- case TK_SYMBOL:
- {
- DocSymbol::SymType s = DocSymbol::decodeSymbol(m_parser.context.token->name);
- if (s!=DocSymbol::Sym_Unknown)
- {
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,s));
- }
- else
- {
- m_children.push_back(std::make_unique<DocWord>(m_parser,this,m_parser.context.token->name));
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unsupported symbol %s found",
- qPrint(m_parser.context.token->name));
- }
- break;
- }
- case TK_NEWPARA:
- retval=TK_NEWPARA;
- goto endparagraph;
- case TK_RCSTAG:
- {
- DocNode *n=parent();
- while (n &&
- n->kind()!=DocNode::Kind_SimpleSect &&
- n->kind()!=DocNode::Kind_ParamSect
- )
- {
- n=n->parent();
- }
- if (n) // already in a simple section
- {
- // simple section cannot start in this paragraph, need
- // to unwind the stack and remember the command.
- m_parser.context.token->simpleSectName = "rcs:"+m_parser.context.token->name;
- m_parser.context.token->simpleSectText = m_parser.context.token->text;
- retval=RetVal_SimpleSec;
- goto endparagraph;
- }
-
- // see if we are in a simple list
- DocSimpleSect *ss=new DocSimpleSect(m_parser,this,DocSimpleSect::Rcs);
- m_children.push_back(std::unique_ptr<DocSimpleSect>(ss));
- ss->parseRcs();
- }
- break;
- default:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),
- "Found unexpected token (id=%s)\n",DocTokenizer::tokToString(tok));
- break;
- }
- }
- retval=0;
-endparagraph:
- m_parser.handlePendingStyleCommands(this,m_children);
- DBG(("DocPara::parse() end retval=%s\n",DocTokenizer::retvalToString(retval)));
- const DocNode *n = m_parser.context.nodeStack.top();
- if (!m_parser.context.token->endTag && n->kind()==DocNode::Kind_Para &&
- retval==TK_NEWPARA && m_parser.context.token->name.lower() == "p")
- {
- ((DocPara *)n)->setAttribs(m_parser.context.token->attribs);
- }
- INTERNAL_ASSERT(retval==0 || retval==TK_NEWPARA || retval==TK_LISTITEM ||
- retval==TK_ENDLIST || retval>RetVal_OK
- );
-
- return retval;
-}
-
-//--------------------------------------------------------------------------
-
-int DocSection::parse()
-{
- DBG(("DocSection::parse() start %s level=%d\n",qPrint(m_parser.context.token->sectionId),m_level));
- int retval=RetVal_OK;
- auto ns = AutoNodeStack(m_parser,this);
-
- if (!m_id.isEmpty())
- {
- const SectionInfo *sec = SectionManager::instance().find(m_id);
- if (sec)
- {
- m_file = sec->fileName();
- m_anchor = sec->label();
- m_title = sec->title();
- if (m_title.isEmpty()) m_title = sec->label();
- }
- }
-
- // first parse any number of paragraphs
- bool isFirst=TRUE;
- DocPara *lastPar=0;
- do
- {
- DocPara *par = new DocPara(m_parser,this);
- if (isFirst) { par->markFirst(); isFirst=FALSE; }
- retval=par->parse();
- if (!par->isEmpty())
- {
- m_children.push_back(std::unique_ptr<DocPara>(par));
- lastPar=par;
- }
- else
- {
- delete par;
- }
- if (retval==TK_LISTITEM)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Invalid list item found");
- }
- if (retval==RetVal_Internal)
- {
- DocInternal *in = new DocInternal(m_parser,this);
- m_children.push_back(std::unique_ptr<DocInternal>(in));
- retval = in->parse(m_level+1);
- if (retval==RetVal_EndInternal)
- {
- retval=RetVal_OK;
- }
- }
- } while (retval!=0 &&
- retval!=RetVal_Section &&
- retval!=RetVal_Subsection &&
- retval!=RetVal_Subsubsection &&
- retval!=RetVal_Paragraph &&
- retval!=RetVal_EndInternal
- );
-
- if (lastPar) lastPar->markLast();
-
- //printf("m_level=%d <-> %d\n",m_level,Doxygen::subpageNestingLevel);
-
- while (true)
- {
- if (retval==RetVal_Subsection && m_level<=Doxygen::subpageNestingLevel+1)
- {
- // then parse any number of nested sections
- while (retval==RetVal_Subsection) // more sections follow
- {
- DocSection *s=new DocSection(m_parser,this,
- std::min(2+Doxygen::subpageNestingLevel,5),m_parser.context.token->sectionId);
- m_children.push_back(std::unique_ptr<DocSection>(s));
- retval = s->parse();
- }
- break;
- }
- else if (retval==RetVal_Subsubsection && m_level<=Doxygen::subpageNestingLevel+2)
- {
- if ((m_level<=1+Doxygen::subpageNestingLevel) && !m_parser.context.token->sectionId.startsWith("autotoc_md"))
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected subsubsection command found inside %s!",g_sectionLevelToName[m_level]);
- // then parse any number of nested sections
- while (retval==RetVal_Subsubsection) // more sections follow
- {
- DocSection *s=new DocSection(m_parser,this,
- std::min(3+Doxygen::subpageNestingLevel,5),m_parser.context.token->sectionId);
- m_children.push_back(std::unique_ptr<DocSection>(s));
- retval = s->parse();
- }
- if (!(m_level<Doxygen::subpageNestingLevel+2 && retval == RetVal_Subsection)) break;
- }
- else if (retval==RetVal_Paragraph && m_level<=std::min(5,Doxygen::subpageNestingLevel+3))
- {
- if ((m_level<=2+Doxygen::subpageNestingLevel) && !m_parser.context.token->sectionId.startsWith("autotoc_md"))
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected paragraph command found inside %s!",g_sectionLevelToName[m_level]);
- // then parse any number of nested sections
- while (retval==RetVal_Paragraph) // more sections follow
- {
- DocSection *s=new DocSection(m_parser,this,
- std::min(4+Doxygen::subpageNestingLevel,5),m_parser.context.token->sectionId);
- m_children.push_back(std::unique_ptr<DocSection>(s));
- retval = s->parse();
- }
- if (!(m_level<Doxygen::subpageNestingLevel+3 && (retval == RetVal_Subsection || retval == RetVal_Subsubsection))) break;
- }
- else
- {
- break;
- }
- }
-
- INTERNAL_ASSERT(retval==0 ||
- retval==RetVal_Section ||
- retval==RetVal_Subsection ||
- retval==RetVal_Subsubsection ||
- retval==RetVal_Paragraph ||
- retval==RetVal_Internal ||
- retval==RetVal_EndInternal
- );
-
- DBG(("DocSection::parse() end: retval=%s\n",DocTokenizer::retvalToString(retval)));
- return retval;
-}
-
-//--------------------------------------------------------------------------
-
-void DocText::parse()
-{
- DBG(("DocText::parse() start\n"));
- auto ns = AutoNodeStack(m_parser,this);
- m_parser.tokenizer.setStateText();
-
- int tok;
- while ((tok=m_parser.tokenizer.lex())) // get the next token
- {
- switch(tok)
- {
- case TK_WORD:
- m_children.push_back(std::make_unique<DocWord>(m_parser,this,m_parser.context.token->name));
- break;
- case TK_WHITESPACE:
- m_children.push_back(std::make_unique<DocWhiteSpace>(m_parser,this,m_parser.context.token->chars));
- break;
- case TK_SYMBOL:
- {
- DocSymbol::SymType s = DocSymbol::decodeSymbol(m_parser.context.token->name);
- if (s!=DocSymbol::Sym_Unknown)
- {
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,s));
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unsupported symbol %s found",
- qPrint(m_parser.context.token->name));
- }
- }
- break;
- case TK_COMMAND_AT:
- // fall through
- case TK_COMMAND_BS:
- switch (Mappers::cmdMapper->map(m_parser.context.token->name))
- {
- case CMD_BSLASH:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_BSlash));
- break;
- case CMD_AT:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_At));
- break;
- case CMD_LESS:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Less));
- break;
- case CMD_GREATER:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Greater));
- break;
- case CMD_AMP:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Amp));
- break;
- case CMD_DOLLAR:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Dollar));
- break;
- case CMD_HASH:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Hash));
- break;
- case CMD_DCOLON:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_DoubleColon));
- break;
- case CMD_PERCENT:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Percent));
- break;
- case CMD_NDASH:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Minus));
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Minus));
- break;
- case CMD_MDASH:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Minus));
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Minus));
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Minus));
- break;
- case CMD_QUOTE:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Quot));
- break;
- case CMD_PUNT:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Dot));
- break;
- case CMD_PLUS:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Plus));
- break;
- case CMD_MINUS:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Minus));
- break;
- case CMD_EQUAL:
- m_children.push_back(std::make_unique<DocSymbol>(m_parser,this,DocSymbol::Sym_Equal));
- break;
- default:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected command '%s' found",
- qPrint(m_parser.context.token->name));
- break;
- }
- break;
- default:
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected token %s",
- DocTokenizer::tokToString(tok));
- break;
- }
- }
-
- m_parser.handleUnclosedStyleCommands();
-
- DBG(("DocText::parse() end\n"));
-}
-
-
-//--------------------------------------------------------------------------
-
-void DocRoot::parse()
-{
- DBG(("DocRoot::parse() start\n"));
- auto ns = AutoNodeStack(m_parser,this);
- m_parser.tokenizer.setStatePara();
- int retval=0;
-
- // first parse any number of paragraphs
- bool isFirst=TRUE;
- DocPara *lastPar=0;
- do
- {
- DocPara *par = new DocPara(m_parser,this);
- if (isFirst) { par->markFirst(); isFirst=FALSE; }
- retval=par->parse();
- if (!par->isEmpty() || !par->attribs().empty())
- {
- m_children.push_back(std::unique_ptr<DocPara>(par));
- lastPar=par;
- }
- else
- {
- delete par;
- }
- if (retval==RetVal_Paragraph)
- {
- if (!m_parser.context.token->sectionId.startsWith("autotoc_md"))
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"found paragraph command (id: '%s') outside of subsubsection context!",qPrint(m_parser.context.token->sectionId));
- }
- while (retval==RetVal_Paragraph)
- {
- if (!m_parser.context.token->sectionId.isEmpty())
- {
- const SectionInfo *sec=SectionManager::instance().find(m_parser.context.token->sectionId);
- if (sec)
- {
- DocSection *s=new DocSection(m_parser,this,
- std::min(4+Doxygen::subpageNestingLevel,5),m_parser.context.token->sectionId);
- m_children.push_back(std::unique_ptr<DocSection>(s));
- retval = s->parse();
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Invalid paragraph id '%s'; ignoring paragraph",qPrint(m_parser.context.token->sectionId));
- retval = 0;
- }
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Missing id for paragraph; ignoring paragraph");
- retval = 0;
- }
- }
- }
- if (retval==RetVal_Subsubsection)
- {
- if (!(m_parser.context.token->sectionId.startsWith("autotoc_md")))
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"found subsubsection command (id: '%s') outside of subsection context!",qPrint(m_parser.context.token->sectionId));
- while (retval==RetVal_Subsubsection)
- {
- if (!m_parser.context.token->sectionId.isEmpty())
- {
- const SectionInfo *sec=SectionManager::instance().find(m_parser.context.token->sectionId);
- if (sec)
- {
- DocSection *s=new DocSection(m_parser,this,
- std::min(3+Doxygen::subpageNestingLevel,5),m_parser.context.token->sectionId);
- m_children.push_back(std::unique_ptr<DocSection>(s));
- retval = s->parse();
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Invalid subsubsection id '%s'; ignoring subsubsection",qPrint(m_parser.context.token->sectionId));
- retval = 0;
- }
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Missing id for subsubsection; ignoring subsubsection");
- retval = 0;
- }
- }
- }
- if (retval==RetVal_Subsection)
- {
- if (!m_parser.context.token->sectionId.startsWith("autotoc_md"))
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"found subsection command (id: '%s') outside of section context!",qPrint(m_parser.context.token->sectionId));
- }
- while (retval==RetVal_Subsection)
- {
- if (!m_parser.context.token->sectionId.isEmpty())
- {
- const SectionInfo *sec=SectionManager::instance().find(m_parser.context.token->sectionId);
- if (sec)
- {
- DocSection *s=new DocSection(m_parser,this,
- std::min(2+Doxygen::subpageNestingLevel,5),m_parser.context.token->sectionId);
- m_children.push_back(std::unique_ptr<DocSection>(s));
- retval = s->parse();
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Invalid subsection id '%s'; ignoring subsection",qPrint(m_parser.context.token->sectionId));
- retval = 0;
- }
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Missing id for subsection; ignoring subsection");
- retval = 0;
- }
- }
- }
- if (retval==TK_LISTITEM)
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Invalid list item found");
- }
- if (retval==RetVal_Internal)
- {
- DocInternal *in = new DocInternal(m_parser,this);
- m_children.push_back(std::unique_ptr<DocInternal>(in));
- retval = in->parse(1);
- }
- } while (retval!=0 && retval!=RetVal_Section);
- if (lastPar) lastPar->markLast();
-
- //printf("DocRoot::parse() retval=%d %d\n",retval,RetVal_Section);
- // then parse any number of level1 sections
- while (retval==RetVal_Section)
- {
- if (!m_parser.context.token->sectionId.isEmpty())
- {
- const SectionInfo *sec=SectionManager::instance().find(m_parser.context.token->sectionId);
- if (sec)
- {
- DocSection *s=new DocSection(m_parser,this,
- std::min(1+Doxygen::subpageNestingLevel,5),m_parser.context.token->sectionId);
- m_children.push_back(std::unique_ptr<DocSection>(s));
- retval = s->parse();
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Invalid section id '%s'; ignoring section",qPrint(m_parser.context.token->sectionId));
- retval = 0;
- }
- }
- else
- {
- warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Missing id for section; ignoring section");
- retval = 0;
- }
- }
-
- m_parser.handleUnclosedStyleCommands();
-
- DBG(("DocRoot::parse() end\n"));
-}
-
-static QCString extractCopyDocId(const char *data, uint &j, uint len)
-{
- uint s=j;
- uint e=j;
- int round=0;
- bool insideDQuote=FALSE;
- bool insideSQuote=FALSE;
- bool found=FALSE;
- while (j<len && !found)
- {
- if (!insideSQuote && !insideDQuote)
- {
- switch (data[j])
- {
- case '(': round++; break;
- case ')': round--; break;
- case '"': insideDQuote=TRUE; break;
- case '\'': insideSQuote=TRUE; break;
- case ' ': // fall through
- case '\t': // fall through
- case '\n':
- found=(round==0);
- break;
- }
- }
- else if (insideSQuote) // look for single quote end
- {
- if (data[j]=='\'' && (j==0 || data[j]!='\\'))
- {
- insideSQuote=FALSE;
- }
- }
- else if (insideDQuote) // look for double quote end
- {
- if (data[j]=='"' && (j==0 || data[j]!='\\'))
- {
- insideDQuote=FALSE;
- }
- }
- if (!found) j++;
- }
- if (qstrncmp(data+j," const",6)==0)
- {
- j+=6;
- }
- else if (qstrncmp(data+j," volatile",9)==0)
- {
- j+=9;
- }
- e=j;
- if (j>0 && data[j-1]=='.') { e--; } // do not include punctuation added by Definition::_setBriefDescription()
- QCString id(data+s,e-s);
- //printf("extractCopyDocId='%s' input='%s'\n",qPrint(id),&data[s]);
- return id;
-}
-
-// macro to check if the input starts with a specific command.
-// note that data[i] should point to the start of the command (\ or @ character)
-// and the sizeof(str) returns the size of str including the '\0' terminator;
-// a fact we abuse to skip over the start of the command character.
-#define CHECK_FOR_COMMAND(str,action) \
- do if ((i+sizeof(str)<len) && qstrncmp(data+i+1,str,sizeof(str)-1)==0) \
- { j=i+sizeof(str); action; } while(0)
-
-static uint isCopyBriefOrDetailsCmd(const char *data, uint i,uint len,bool &brief)
-{
- int j=0;
- if (i==0 || (data[i-1]!='@' && data[i-1]!='\\')) // not an escaped command
- {
- CHECK_FOR_COMMAND("copybrief",brief=TRUE); // @copybrief or \copybrief
- CHECK_FOR_COMMAND("copydetails",brief=FALSE); // @copydetails or \copydetails
- }
- return j;
-}
-
-static uint isVerbatimSection(const char *data,uint i,uint len,QCString &endMarker)
-{
- int j=0;
- if (i==0 || (data[i-1]!='@' && data[i-1]!='\\')) // not an escaped command
- {
- CHECK_FOR_COMMAND("dot",endMarker="enddot");
- CHECK_FOR_COMMAND("code",endMarker="endcode");
- CHECK_FOR_COMMAND("msc",endMarker="endmsc");
- CHECK_FOR_COMMAND("verbatim",endMarker="endverbatim");
- CHECK_FOR_COMMAND("iliteral",endMarker="endiliteral");
- CHECK_FOR_COMMAND("latexonly",endMarker="endlatexonly");
- CHECK_FOR_COMMAND("htmlonly",endMarker="endhtmlonly");
- CHECK_FOR_COMMAND("xmlonly",endMarker="endxmlonly");
- CHECK_FOR_COMMAND("rtfonly",endMarker="endrtfonly");
- CHECK_FOR_COMMAND("manonly",endMarker="endmanonly");
- CHECK_FOR_COMMAND("docbookonly",endMarker="enddocbookonly");
- CHECK_FOR_COMMAND("startuml",endMarker="enduml");
- }
- //printf("isVerbatimSection(%s)=%d)\n",qPrint(QCString(&data[i]).left(10)),j);
- return j;
-}
-
-static uint skipToEndMarker(const char *data,uint i,uint len,const QCString &endMarker)
-{
- while (i<len)
- {
- if ((data[i]=='@' || data[i]=='\\') && // start of command character
- (i==0 || (data[i-1]!='@' && data[i-1]!='\\'))) // that is not escaped
- {
- if (i+endMarker.length()+1<=len && qstrncmp(data+i+1,endMarker.data(),endMarker.length())==0)
- {
- return i+endMarker.length()+1;
- }
- }
- i++;
- }
- // oops no endmarker found...
- return i<len ? i+1 : len;
-}
-
-QCString DocParser::processCopyDoc(const char *data,uint &len)
-{
- //printf("processCopyDoc start '%s'\n",data);
- GrowBuf buf;
- uint i=0;
- while (i<len)
- {
- char c = data[i];
- if (c=='@' || c=='\\') // look for a command
- {
- bool isBrief=TRUE;
- uint j=isCopyBriefOrDetailsCmd(data,i,len,isBrief);
- if (j>0)
- {
- // skip whitespace
- while (j<len && (data[j]==' ' || data[j]=='\t')) j++;
- // extract the argument
- QCString id = extractCopyDocId(data,j,len);
- const Definition *def = 0;
- QCString doc,brief;
- //printf("resolving docs='%s'\n",qPrint(id));
- if (findDocsForMemberOrCompound(id,&doc,&brief,&def))
- {
- //printf("found it def=%p brief='%s' doc='%s' isBrief=%d\n",def,qPrint(brief),qPrint(doc),isBrief);
- auto it = std::find(context.copyStack.begin(),context.copyStack.end(),def);
- if (it==context.copyStack.end()) // definition not parsed earlier
- {
- context.copyStack.push_back(def);
- if (isBrief)
- {
- uint l=brief.length();
- buf.addStr(processCopyDoc(brief.data(),l));
- }
- else
- {
- uint l=doc.length();
- buf.addStr(processCopyDoc(doc.data(),l));
- }
- context.copyStack.pop_back();
- }
- else
- {
- warn_doc_error(context.fileName,tokenizer.getLineNr(),
- "Found recursive @copy%s or @copydoc relation for argument '%s'.\n",
- isBrief?"brief":"details",qPrint(id));
- }
- }
- else
- {
- warn_doc_error(context.fileName,tokenizer.getLineNr(),
- "@copy%s or @copydoc target '%s' not found", isBrief?"brief":"details",
- qPrint(id));
- }
- // skip over command
- i=j;
- }
- else
- {
- QCString endMarker;
- uint k = isVerbatimSection(data,i,len,endMarker);
- if (k>0)
- {
- int orgPos = i;
- i=skipToEndMarker(data,k,len,endMarker);
- buf.addStr(data+orgPos,i-orgPos);
- }
- else
- {
- buf.addChar(c);
- i++;
- }
- }
- }
- else // not a command, just copy
- {
- buf.addChar(c);
- i++;
- }
- }
- len = buf.getPos();
- buf.addChar(0);
- return buf.get();
-}
-
-//---------------------------------------------------------------------------
-
-DocRoot *validatingParseDoc(IDocParser &parserIntf,
- const QCString &fileName,int startLine,
- const Definition *ctx,const MemberDef *md,
- const QCString &input,bool indexWords,
- bool isExample, const QCString &exampleName,
- bool singleLine, bool linkFromIndex,
- bool markdownSupport)
-{
- DocParser &parser = dynamic_cast<DocParser&>(parserIntf);
- //printf("validatingParseDoc(%s,%s)=[%s]\n",ctx?qPrint(ctx->name()):"<none>",
- // md?qPrint(md->name()):"<none>",
- // input);
- //printf("========== validating %s at line %d\n",qPrint(fileName),startLine);
- //printf("---------------- input --------------------\n%s\n----------- end input -------------------\n",qPrint(input));
- //parser.context.token = new TokenInfo;
-
- // store parser state so we can re-enter this function if needed
- //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
- parser.pushContext();
-
- if (ctx && ctx!=Doxygen::globalScope &&
- (ctx->definitionType()==Definition::TypeClass ||
- ctx->definitionType()==Definition::TypeNamespace
- )
- )
- {
- parser.context.context = ctx->name();
+ parser->context.context = ctx->name();
}
else if (ctx && ctx->definitionType()==Definition::TypePage)
{
const Definition *scope = (toPageDef(ctx))->getPageScope();
- if (scope && scope!=Doxygen::globalScope) parser.context.context = scope->name();
+ if (scope && scope!=Doxygen::globalScope) parser->context.context = scope->name();
}
else if (ctx && ctx->definitionType()==Definition::TypeGroup)
{
const Definition *scope = (toGroupDef(ctx))->getGroupScope();
- if (scope && scope!=Doxygen::globalScope) parser.context.context = scope->name();
+ if (scope && scope!=Doxygen::globalScope) parser->context.context = scope->name();
}
else
{
- parser.context.context = "";
+ parser->context.context = "";
}
- parser.context.scope = ctx;
+ parser->context.scope = ctx;
if (indexWords && Doxygen::searchIndex)
{
if (md)
{
- parser.context.searchUrl=md->getOutputFileBase();
- Doxygen::searchIndex->setCurrentDoc(md,md->anchor(),FALSE);
+ parser->context.searchUrl=md->getOutputFileBase();
+ parser->searchData.setCurrentDoc(md,md->anchor(),false);
}
else if (ctx)
{
- parser.context.searchUrl=ctx->getOutputFileBase();
- Doxygen::searchIndex->setCurrentDoc(ctx,ctx->anchor(),FALSE);
+ parser->context.searchUrl=ctx->getOutputFileBase();
+ parser->searchData.setCurrentDoc(ctx,ctx->anchor(),false);
}
}
else
{
- parser.context.searchUrl="";
+ parser->context.searchUrl="";
}
- parser.context.fileName = fileName;
- parser.context.relPath = (!linkFromIndex && ctx) ?
+ parser->context.fileName = fileName;
+ parser->context.relPath = (!linkFromIndex && ctx) ?
QCString(relativePathToRoot(ctx->getOutputFileBase())) :
QCString("");
- //printf("ctx->name=%s relPath=%s\n",qPrint(ctx->name()),qPrint(parser.context.relPath));
- parser.context.memberDef = md;
- while (!parser.context.nodeStack.empty()) parser.context.nodeStack.pop();
- while (!parser.context.styleStack.empty()) parser.context.styleStack.pop();
- while (!parser.context.initialStyleStack.empty()) parser.context.initialStyleStack.pop();
- parser.context.inSeeBlock = FALSE;
- parser.context.xmlComment = FALSE;
- parser.context.insideHtmlLink = FALSE;
- parser.context.includeFileText = "";
- parser.context.includeFileOffset = 0;
- parser.context.includeFileLength = 0;
- parser.context.isExample = isExample;
- parser.context.exampleName = exampleName;
- parser.context.hasParamCommand = FALSE;
- parser.context.hasReturnCommand = FALSE;
- parser.context.retvalsFound.clear();
- parser.context.paramsFound.clear();
- parser.context.markdownSupport = markdownSupport;
-
- //printf("Starting comment block at %s:%d\n",qPrint(parser.context.fileName),startLine);
- parser.tokenizer.setLineNr(startLine);
- uint ioLen = input.length();
- QCString inpStr = parser.processCopyDoc(input.data(),ioLen);
+ //printf("ctx->name=%s relPath=%s\n",qPrint(ctx->name()),qPrint(parser->context.relPath));
+ parser->context.memberDef = md;
+ while (!parser->context.nodeStack.empty()) parser->context.nodeStack.pop();
+ while (!parser->context.styleStack.empty()) parser->context.styleStack.pop();
+ while (!parser->context.initialStyleStack.empty()) parser->context.initialStyleStack.pop();
+ parser->context.inSeeBlock = FALSE;
+ parser->context.xmlComment = FALSE;
+ parser->context.insideHtmlLink = FALSE;
+ parser->context.includeFileText = "";
+ parser->context.includeFileOffset = 0;
+ parser->context.includeFileLength = 0;
+ parser->context.isExample = isExample;
+ parser->context.exampleName = exampleName;
+ parser->context.hasParamCommand = FALSE;
+ parser->context.hasReturnCommand = FALSE;
+ parser->context.retvalsFound.clear();
+ parser->context.paramsFound.clear();
+ parser->context.markdownSupport = markdownSupport;
+
+ //printf("Starting comment block at %s:%d\n",qPrint(parser->context.fileName),startLine);
+ parser->tokenizer.setLineNr(startLine);
+ uint ioLen = static_cast<uint>(input.length());
+ QCString inpStr = parser->processCopyDoc(input.data(),ioLen);
if (inpStr.isEmpty() || inpStr.at(inpStr.length()-1)!='\n')
{
inpStr+='\n';
}
//printf("processCopyDoc(in='%s' out='%s')\n",input,qPrint(inpStr));
- parser.tokenizer.init(inpStr.data(),parser.context.fileName,markdownSupport);
+ parser->tokenizer.init(inpStr.data(),parser->context.fileName,markdownSupport);
// build abstract syntax tree
- DocRoot *root = new DocRoot(parser,md!=0,singleLine);
- root->parse();
-
+ auto ast = std::make_unique<DocNodeAST>(DocRoot(parser,md!=0,singleLine));
+ std::get<DocRoot>(ast->root).parse(&ast->root);
if (Debug::isFlagSet(Debug::PrintTree))
{
// pretty print the result
- PrintDocVisitor *v = new PrintDocVisitor;
- root->accept(v);
- delete v;
+ std::visit(PrintDocVisitor{},ast->root);
}
- parser.checkUnOrMultipleDocumentedParams();
- if (parser.context.memberDef) parser.context.memberDef->detectUndocumentedParams(parser.context.hasParamCommand,parser.context.hasReturnCommand);
+ parser->checkUnOrMultipleDocumentedParams();
+ if (parser->context.memberDef) parser->context.memberDef->detectUndocumentedParams(parser->context.hasParamCommand,parser->context.hasReturnCommand);
// TODO: These should be called at the end of the program.
- //parser.tokenizer.cleanup();
+ //parser->tokenizer.cleanup();
//Mappers::cmdMapper->freeInstance();
//Mappers::htmlTagMapper->freeInstance();
// restore original parser state
- parser.popContext();
+ parser->popContext();
//printf(">>>>>> end validatingParseDoc(%s,%s)\n",ctx?qPrint(ctx->name()):"<none>",
// md?qPrint(md->name()):"<none>");
- return root;
+ return ast;
}
-DocText *validatingParseText(IDocParser &parserIntf,const QCString &input)
+IDocNodeASTPtr validatingParseText(IDocParser &parserIntf,const QCString &input)
{
- DocParser &parser = dynamic_cast<DocParser&>(parserIntf);
+ DocParser *parser = dynamic_cast<DocParser*>(&parserIntf);
+ assert(parser!=0);
+ if (parser==0) return 0;
+
// store parser state so we can re-enter this function if needed
- parser.pushContext();
+ parser->pushContext();
//printf("------------ input ---------\n%s\n"
// "------------ end input -----\n",input);
- //parser.context.token = new TokenInfo;
- parser.context.context = "";
- parser.context.fileName = "<parseText>";
- parser.context.relPath = "";
- parser.context.memberDef = 0;
- while (!parser.context.nodeStack.empty()) parser.context.nodeStack.pop();
- while (!parser.context.styleStack.empty()) parser.context.styleStack.pop();
- while (!parser.context.initialStyleStack.empty()) parser.context.initialStyleStack.pop();
- parser.context.inSeeBlock = FALSE;
- parser.context.xmlComment = FALSE;
- parser.context.insideHtmlLink = FALSE;
- parser.context.includeFileText = "";
- parser.context.includeFileOffset = 0;
- parser.context.includeFileLength = 0;
- parser.context.isExample = FALSE;
- parser.context.exampleName = "";
- parser.context.hasParamCommand = FALSE;
- parser.context.hasReturnCommand = FALSE;
- parser.context.retvalsFound.clear();
- parser.context.paramsFound.clear();
- parser.context.searchUrl="";
-
- DocText *txt = new DocText(parser);
+ //parser->context.token = new TokenInfo;
+ parser->context.context = "";
+ parser->context.fileName = "<parseText>";
+ parser->context.relPath = "";
+ parser->context.memberDef = 0;
+ while (!parser->context.nodeStack.empty()) parser->context.nodeStack.pop();
+ while (!parser->context.styleStack.empty()) parser->context.styleStack.pop();
+ while (!parser->context.initialStyleStack.empty()) parser->context.initialStyleStack.pop();
+ parser->context.inSeeBlock = FALSE;
+ parser->context.xmlComment = FALSE;
+ parser->context.insideHtmlLink = FALSE;
+ parser->context.includeFileText = "";
+ parser->context.includeFileOffset = 0;
+ parser->context.includeFileLength = 0;
+ parser->context.isExample = FALSE;
+ parser->context.exampleName = "";
+ parser->context.hasParamCommand = FALSE;
+ parser->context.hasReturnCommand = FALSE;
+ parser->context.retvalsFound.clear();
+ parser->context.paramsFound.clear();
+ parser->context.searchUrl="";
+
+
+ auto ast = std::make_unique<DocNodeAST>(DocText(parser));
if (!input.isEmpty())
{
- parser.tokenizer.setLineNr(1);
- parser.tokenizer.init(input.data(),parser.context.fileName,Config_getBool(MARKDOWN_SUPPORT));
+ parser->tokenizer.setLineNr(1);
+ parser->tokenizer.init(input.data(),parser->context.fileName,Config_getBool(MARKDOWN_SUPPORT));
// build abstract syntax tree
- txt->parse();
+ std::get<DocText>(ast->root).parse(&ast->root);
if (Debug::isFlagSet(Debug::PrintTree))
{
// pretty print the result
- PrintDocVisitor *v = new PrintDocVisitor;
- txt->accept(v);
- delete v;
+ std::visit(PrintDocVisitor{},ast->root);
}
}
// restore original parser state
- parser.popContext();
- return txt;
+ parser->popContext();
+ return ast;
}
-DocRef *createRef(IDocParser &parserIntf,const QCString &target,const QCString &context)
+IDocNodeASTPtr createRef(IDocParser &parserIntf,const QCString &target,const QCString &context)
{
- DocParser &parser = dynamic_cast<DocParser&>(parserIntf);
- return new DocRef(parser,0,target,context);
+ DocParser *parser = dynamic_cast<DocParser*>(&parserIntf);
+ assert(parser!=0);
+ if (parser==0) return 0;
+ return std::make_unique<DocNodeAST>(DocRef(parser,0,target,context));
}
void docFindSections(const QCString &input,
/******************************************************************************
*
- *
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
+ * Copyright (C) 1997-2022 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
#define DOCPARSER_H
#include <stdio.h>
-#include <vector>
#include <memory>
#include "qcstring.h"
-#include "docvisitor.h"
-#include "htmlattrib.h"
+#include "growvector.h"
-class DocNode;
class MemberDef;
class Definition;
-class MemberGroup;
//---------------------------------------------------------------------------
-// forward declared, opaque pointer
+//! @brief opaque parser interface
class IDocParser
{
public:
- virtual ~IDocParser() {}
+ virtual ~IDocParser() = default;
};
-// factory function
-std::unique_ptr<IDocParser> createDocParser();
+//! @brief pointer to parser interface
+using IDocParserPtr = std::unique_ptr<IDocParser>;
+
+//! @brief factory function to create a parser
+IDocParserPtr createDocParser();
//---------------------------------------------------------------------------
-/*! Main entry point for the documentation parser.
+//! @brief opaque representation of the abstract syntax tree (AST)
+class IDocNodeAST
+{
+ public:
+ virtual ~IDocNodeAST() = default;
+ virtual bool isEmpty() const = 0;
+};
+
+using IDocNodeASTPtr = std::unique_ptr<IDocNodeAST>;
+
+/*! Main entry point for the comment block parser.
* @param parser The parser object created via createDocParser()
* @param fileName File in which the documentation block is found (or the
* name of the example file in case isExample is TRUE).
* the relative path when making a link.
* @param markdownSupport TRUE if the input needs to take markdown markup into
* account.
- * @returns Root node of the abstract syntax tree. Ownership of the
+ * @returns An object representing the abstract syntax tree. Ownership of the
* pointer is handed over to the caller.
*/
-DocRoot *validatingParseDoc(IDocParser &parser,const QCString &fileName,int startLine,
+IDocNodeASTPtr validatingParseDoc(IDocParser &parser,const QCString &fileName,int startLine,
const Definition *context, const MemberDef *md,
const QCString &input,bool indexWords,
bool isExample,const QCString &exampleName,
/*! Main entry point for parsing simple text fragments. These
* fragments are limited to words, whitespace and symbols.
*/
-DocText *validatingParseText(IDocParser &parser,const QCString &input);
+IDocNodeASTPtr validatingParseText(IDocParser &parser,const QCString &input);
-/*! Searches for section and anchor commands in the input */
-void docFindSections(const QCString &input,
- const Definition *d,
- const QCString &fileName);
-
-DocRef *createRef(IDocParser &parser,const QCString &target,const QCString &context);
+IDocNodeASTPtr createRef(IDocParser &parser,const QCString &target,const QCString &context);
//--------------------------------------------------------------------------------
-class DocParser;
-
-/** Abstract node interface with type information. */
-class DocNode
-{
- public:
- /*! Available node types. */
- enum Kind { Kind_Root = 0,
- Kind_Word = 1,
- Kind_WhiteSpace = 2,
- Kind_Para = 3,
- Kind_AutoList = 4,
- Kind_AutoListItem = 5,
- Kind_Symbol = 6,
- Kind_URL = 7,
- Kind_StyleChange = 8,
- Kind_SimpleSect = 9,
- Kind_Title = 10,
- Kind_SimpleList = 11,
- Kind_SimpleListItem = 12,
- Kind_Section = 13,
- Kind_Verbatim = 14,
- Kind_XRefItem = 15,
- Kind_HtmlList = 16,
- Kind_HtmlListItem = 17,
- Kind_HtmlDescList = 18,
- Kind_HtmlDescData = 19,
- Kind_HtmlDescTitle = 20,
- Kind_HtmlTable = 21,
- Kind_HtmlRow = 22,
- Kind_HtmlCell = 23,
- Kind_HtmlCaption = 24,
- Kind_LineBreak = 25,
- Kind_HorRuler = 26,
- Kind_Anchor = 27,
- Kind_IndexEntry = 28,
- Kind_Internal = 29,
- Kind_HRef = 30,
- Kind_Include = 31,
- Kind_IncOperator = 32,
- Kind_HtmlHeader = 33,
- Kind_Image = 34,
- Kind_DotFile = 35,
- Kind_Link = 36,
- Kind_Ref = 37,
- Kind_Formula = 38,
- Kind_SecRefItem = 39,
- Kind_SecRefList = 40,
- Kind_SimpleSectSep = 41,
- Kind_LinkedWord = 42,
- Kind_ParamSect = 43,
- Kind_ParamList = 44,
- Kind_InternalRef = 45,
- Kind_Copy = 46,
- Kind_Text = 47,
- Kind_MscFile = 48,
- Kind_HtmlBlockQuote = 49,
- Kind_VhdlFlow = 50,
- Kind_ParBlock = 51,
- Kind_DiaFile = 52,
- Kind_Emoji = 53,
- Kind_Sep = 54
- };
- /*! Creates a new node */
- DocNode(DocParser &parser) : m_parser(parser) {}
-
- /*! Destroys a node. */
- virtual ~DocNode() {}
-
- /*! Returns the kind of node. Provides runtime type information */
- virtual Kind kind() const = 0;
-
- /*! Returns the parent of this node or 0 for the root node. */
- DocNode *parent() const { return m_parent; }
-
- /*! Sets a new parent for this node. */
- void setParent(DocNode *parent) { m_parent = parent; }
-
- /*! Acceptor function for node visitors. Part of the visitor pattern.
- * @param v Abstract visitor.
- */
- virtual void accept(DocVisitor *v) = 0;
-
- /*! Returns TRUE iff this node is inside a preformatted section */
- bool isPreformatted() const { return m_insidePre; }
-
- protected:
- /*! Sets whether or not this item is inside a preformatted section */
- void setInsidePreformatted(bool p) { m_insidePre = p; }
- DocNode *m_parent = 0;
- enum RefType { Unknown, Anchor, Section, Table };
- DocParser &m_parser;
- private:
-
- bool m_insidePre = false;
-};
-
-using DocNodeList = std::vector< std::unique_ptr<DocNode> >;
-
-/** Default accept implementation for compound nodes in the abstract
- * syntax tree.
- */
-template<class T>
-class CompAccept : public DocNode
-{
- public:
- CompAccept(DocParser &parser) : DocNode(parser) {}
- void accept(DocVisitor *v) override
- {
- T *obj = dynamic_cast<T *>(this);
- v->visitPre(obj);
- for (const auto &n : m_children) n->accept(v);
- v->visitPost(obj);
- }
- const DocNodeList &children() const { return m_children; }
- DocNodeList &children() { return m_children; }
-
- protected:
- DocNodeList m_children;
-};
-
-
-/** Node representing a word
- */
-class DocWord : public DocNode
-{
- public:
- DocWord(DocParser &parser,DocNode *parent,const QCString &word);
- QCString word() const { return m_word; }
- Kind kind() const override { return Kind_Word; }
- void accept(DocVisitor *v) override { v->visit(this); }
-
- private:
- QCString m_word;
-};
-
-/** Node representing a word that can be linked to something
- */
-class DocLinkedWord : public DocNode
-{
- public:
- DocLinkedWord(DocParser &parser,DocNode *parent,const QCString &word,
- const QCString &ref,const QCString &file,
- const QCString &anchor,const QCString &tooltip);
- QCString word() const { return m_word; }
- Kind kind() const override { return Kind_LinkedWord; }
- QCString file() const { return m_file; }
- QCString relPath() const { return m_relPath; }
- QCString ref() const { return m_ref; }
- QCString anchor() const { return m_anchor; }
- QCString tooltip() const { return m_tooltip; }
- void accept(DocVisitor *v) override { v->visit(this); }
-
- private:
- QCString m_word;
- QCString m_ref;
- QCString m_file;
- QCString m_relPath;
- QCString m_anchor;
- QCString m_tooltip;
-};
-
-/** Node representing a URL (or email address) */
-class DocURL : public DocNode
-{
- public:
- DocURL(DocParser &parser,DocNode *parent,const QCString &url,bool isEmail) :
- DocNode(parser), m_url(url), m_isEmail(isEmail) { m_parent=parent; }
- QCString url() const { return m_url; }
- Kind kind() const override { return Kind_URL; }
- void accept(DocVisitor *v) override { v->visit(this); }
- bool isEmail() const { return m_isEmail; }
-
- private:
- QCString m_url;
- bool m_isEmail = false;
-};
-
-/** Node representing a line break */
-class DocLineBreak : public DocNode
-{
- public:
- DocLineBreak(DocParser &parser,DocNode *parent) : DocNode(parser) { m_parent = parent; }
- DocLineBreak(DocParser &parser,DocNode *parent,const HtmlAttribList &attribs)
- : DocNode(parser), m_attribs(attribs) { m_parent = parent; }
- Kind kind() const override { return Kind_LineBreak; }
- void accept(DocVisitor *v) override { v->visit(this); }
-
- const HtmlAttribList &attribs() const { return m_attribs; }
-
- private:
- HtmlAttribList m_attribs;
-};
-
-/** Node representing a horizontal ruler */
-class DocHorRuler : public DocNode
-{
- public:
- DocHorRuler(DocParser &parser,DocNode *parent,const HtmlAttribList &attribs)
- : DocNode(parser), m_attribs(attribs) { m_parent = parent; }
- Kind kind() const override { return Kind_HorRuler; }
- void accept(DocVisitor *v) override { v->visit(this); }
-
- const HtmlAttribList &attribs() const { return m_attribs; }
-
- private:
- HtmlAttribList m_attribs;
-};
-
-/** Node representing an anchor */
-class DocAnchor : public DocNode
-{
- public:
- DocAnchor(DocParser &parser,DocNode *parent,const QCString &id,bool newAnchor);
- Kind kind() const override { return Kind_Anchor; }
- QCString anchor() const { return m_anchor; }
- QCString file() const { return m_file; }
- void accept(DocVisitor *v) override { v->visit(this); }
-
- const HtmlAttribList &attribs() const { return m_attribs; }
-
- private:
- QCString m_anchor;
- QCString m_file;
- HtmlAttribList m_attribs;
-};
-
-/** Node representing a citation of some bibliographic reference */
-class DocCite : public DocNode
-{
- public:
- DocCite(DocParser &parser,DocNode *parent,const QCString &target,const QCString &context);
- Kind kind() const override { return Kind_Ref; }
- QCString file() const { return m_file; }
- QCString relPath() const { return m_relPath; }
- QCString ref() const { return m_ref; }
- QCString anchor() const { return m_anchor; }
- QCString text() const { return m_text; }
- void accept(DocVisitor *v) override { v->visit(this); }
-
- private:
- QCString m_file;
- QCString m_relPath;
- QCString m_ref;
- QCString m_anchor;
- QCString m_text;
-};
-
-
-/** Node representing a style change */
-class DocStyleChange : public DocNode
-{
- public:
- enum Style { Bold = (1<<0),
- Italic = (1<<1),
- Code = (1<<2),
- Center = (1<<3),
- Small = (1<<4),
- Subscript = (1<<5),
- Superscript = (1<<6),
- Preformatted = (1<<7),
- Span = (1<<8),
- Div = (1<<9),
- Strike = (1<<10),
- Underline = (1<<11),
- Del = (1<<12),
- Ins = (1<<13),
- S = (1<<14),
- Details = (1<<15),
- Summary = (1<<16),
- Cite = (1<<17)
- };
-
- DocStyleChange(DocParser &parser,DocNode *parent,uint position,Style s,const QCString &tagName,bool enable,
- const HtmlAttribList *attribs=0) :
- DocNode(parser), m_position(position), m_style(s), m_enable(enable)
- { m_parent = parent; if (attribs) m_attribs=*attribs; m_tagName = tagName.lower();}
- Kind kind() const override { return Kind_StyleChange; }
- Style style() const { return m_style; }
- const char *styleString() const;
- bool enable() const { return m_enable; }
- uint position() const { return m_position; }
- void accept(DocVisitor *v) override { v->visit(this); }
- const HtmlAttribList &attribs() const { return m_attribs; }
- QCString tagName() const { return m_tagName; }
-
- private:
- uint m_position = 0;
- Style m_style = Bold;
- bool m_enable = false;
- HtmlAttribList m_attribs;
- QCString m_tagName;
-};
-
-/** Node representing a special symbol */
-class DocSymbol : public DocNode
-{
- public:
- enum SymType { Sym_Unknown = -1,
- Sym_nbsp, Sym_iexcl, Sym_cent, Sym_pound, Sym_curren,
- Sym_yen, Sym_brvbar, Sym_sect, Sym_uml, Sym_copy,
- Sym_ordf, Sym_laquo, Sym_not, Sym_shy, Sym_reg,
- Sym_macr, Sym_deg, Sym_plusmn, Sym_sup2, Sym_sup3,
- Sym_acute, Sym_micro, Sym_para, Sym_middot, Sym_cedil,
- Sym_sup1, Sym_ordm, Sym_raquo, Sym_frac14, Sym_frac12,
- Sym_frac34, Sym_iquest, Sym_Agrave, Sym_Aacute, Sym_Acirc,
- Sym_Atilde, Sym_Auml, Sym_Aring, Sym_AElig, Sym_Ccedil,
- Sym_Egrave, Sym_Eacute, Sym_Ecirc, Sym_Euml, Sym_Igrave,
- Sym_Iacute, Sym_Icirc, Sym_Iuml, Sym_ETH, Sym_Ntilde,
- Sym_Ograve, Sym_Oacute, Sym_Ocirc, Sym_Otilde, Sym_Ouml,
- Sym_times, Sym_Oslash, Sym_Ugrave, Sym_Uacute, Sym_Ucirc,
- Sym_Uuml, Sym_Yacute, Sym_THORN, Sym_szlig, Sym_agrave,
- Sym_aacute, Sym_acirc, Sym_atilde, Sym_auml, Sym_aring,
- Sym_aelig, Sym_ccedil, Sym_egrave, Sym_eacute, Sym_ecirc,
- Sym_euml, Sym_igrave, Sym_iacute, Sym_icirc, Sym_iuml,
- Sym_eth, Sym_ntilde, Sym_ograve, Sym_oacute, Sym_ocirc,
- Sym_otilde, Sym_ouml, Sym_divide, Sym_oslash, Sym_ugrave,
- Sym_uacute, Sym_ucirc, Sym_uuml, Sym_yacute, Sym_thorn,
- Sym_yuml, Sym_fnof, Sym_Alpha, Sym_Beta, Sym_Gamma,
- Sym_Delta, Sym_Epsilon, Sym_Zeta, Sym_Eta, Sym_Theta,
- Sym_Iota, Sym_Kappa, Sym_Lambda, Sym_Mu, Sym_Nu,
- Sym_Xi, Sym_Omicron, Sym_Pi, Sym_Rho, Sym_Sigma,
- Sym_Tau, Sym_Upsilon, Sym_Phi, Sym_Chi, Sym_Psi,
- Sym_Omega, Sym_alpha, Sym_beta, Sym_gamma, Sym_delta,
- Sym_epsilon, Sym_zeta, Sym_eta, Sym_theta, Sym_iota,
- Sym_kappa, Sym_lambda, Sym_mu, Sym_nu, Sym_xi,
- Sym_omicron, Sym_pi, Sym_rho, Sym_sigmaf, Sym_sigma,
- Sym_tau, Sym_upsilon, Sym_phi, Sym_chi, Sym_psi,
- Sym_omega, Sym_thetasym, Sym_upsih, Sym_piv, Sym_bull,
- Sym_hellip, Sym_prime, Sym_Prime, Sym_oline, Sym_frasl,
- Sym_weierp, Sym_image, Sym_real, Sym_trade, Sym_alefsym,
- Sym_larr, Sym_uarr, Sym_rarr, Sym_darr, Sym_harr,
- Sym_crarr, Sym_lArr, Sym_uArr, Sym_rArr, Sym_dArr,
- Sym_hArr, Sym_forall, Sym_part, Sym_exist, Sym_empty,
- Sym_nabla, Sym_isin, Sym_notin, Sym_ni, Sym_prod,
- Sym_sum, Sym_minus, Sym_lowast, Sym_radic, Sym_prop,
- Sym_infin, Sym_ang, Sym_and, Sym_or, Sym_cap,
- Sym_cup, Sym_int, Sym_there4, Sym_sim, Sym_cong,
- Sym_asymp, Sym_ne, Sym_equiv, Sym_le, Sym_ge,
- Sym_sub, Sym_sup, Sym_nsub, Sym_sube, Sym_supe,
- Sym_oplus, Sym_otimes, Sym_perp, Sym_sdot, Sym_lceil,
- Sym_rceil, Sym_lfloor, Sym_rfloor, Sym_lang, Sym_rang,
- Sym_loz, Sym_spades, Sym_clubs, Sym_hearts, Sym_diams,
- Sym_quot, Sym_amp, Sym_lt, Sym_gt, Sym_OElig,
- Sym_oelig, Sym_Scaron, Sym_scaron, Sym_Yuml, Sym_circ,
- Sym_tilde, Sym_ensp, Sym_emsp, Sym_thinsp, Sym_zwnj,
- Sym_zwj, Sym_lrm, Sym_rlm, Sym_ndash, Sym_mdash,
- Sym_lsquo, Sym_rsquo, Sym_sbquo, Sym_ldquo, Sym_rdquo,
- Sym_bdquo, Sym_dagger, Sym_Dagger, Sym_permil, Sym_lsaquo,
- Sym_rsaquo, Sym_euro,
-
- /* doxygen extensions */
- Sym_tm, Sym_apos,
-
- /* doxygen commands mapped */
- Sym_BSlash, Sym_At, Sym_Less, Sym_Greater, Sym_Amp,
- Sym_Dollar, Sym_Hash, Sym_DoubleColon, Sym_Percent, Sym_Pipe,
- Sym_Quot, Sym_Minus, Sym_Plus, Sym_Dot, Sym_Colon, Sym_Equal
- };
- enum PerlType { Perl_unknown = 0, Perl_string, Perl_char, Perl_symbol, Perl_umlaut,
- Perl_acute, Perl_grave, Perl_circ, Perl_slash, Perl_tilde,
- Perl_cedilla, Perl_ring
- };
- typedef struct PerlSymb {
- const char *symb;
- const PerlType type;
- }PerlSymb;
- DocSymbol(DocParser &parser,DocNode *parent,SymType s) :
- DocNode(parser), m_symbol(s) { m_parent = parent; }
- SymType symbol() const { return m_symbol; }
- Kind kind() const override { return Kind_Symbol; }
- void accept(DocVisitor *v) override { v->visit(this); }
- static SymType decodeSymbol(const QCString &symName);
-
- private:
- SymType m_symbol = Sym_Unknown;
-};
-
-/** Node representing a n emoji */
-class DocEmoji : public DocNode
-{
- public:
- DocEmoji(DocParser &parser,DocNode *parent,const QCString &symName);
- QCString name() const { return m_symName; }
- int index() const { return m_index; }
- Kind kind() const override { return Kind_Emoji; }
- void accept(DocVisitor *v) override { v->visit(this); }
-
- private:
- QCString m_symName;
- int m_index = 0;
-};
-
-/** Node representing some amount of white space */
-class DocWhiteSpace : public DocNode
-{
- public:
- DocWhiteSpace(DocParser &parser,DocNode *parent,const QCString &chars) :
- DocNode(parser), m_chars(chars) { m_parent = parent; }
- Kind kind() const override { return Kind_WhiteSpace; }
- QCString chars() const { return m_chars; }
- void accept(DocVisitor *v) override { v->visit(this); }
- private:
- QCString m_chars;
-};
-
-/** Node representing a separator */
-class DocSeparator : public DocNode
-{
- public:
- DocSeparator(DocParser &parser,DocNode *parent,const QCString &chars) :
- DocNode(parser), m_chars(chars) { m_parent = parent; }
- Kind kind() const override { return Kind_Sep; }
- QCString chars() const { return m_chars; }
- void accept(DocVisitor *) override { }
- private:
- QCString m_chars;
-};
-
-/** Node representing a verbatim, unparsed text fragment */
-class DocVerbatim : public DocNode
-{
- public:
- enum Type { Code, HtmlOnly, ManOnly, LatexOnly, RtfOnly, XmlOnly, Verbatim, Dot, Msc, DocbookOnly, PlantUML, JavaDocCode, JavaDocLiteral };
- DocVerbatim(DocParser &parser,DocNode *parent,const QCString &context,
- const QCString &text, Type t,bool isExample,
- const QCString &exampleFile,bool isBlock=FALSE,const QCString &lang=QCString());
- Kind kind() const override { return Kind_Verbatim; }
- Type type() const { return m_type; }
- QCString text() const { return m_text; }
- QCString context() const { return m_context; }
- void accept(DocVisitor *v) override { v->visit(this); }
- bool isExample() const { return m_isExample; }
- QCString exampleFile() const { return m_exampleFile; }
- QCString relPath() const { return m_relPath; }
- QCString language() const { return m_lang; }
- bool isBlock() const { return m_isBlock; }
- bool hasCaption() const { return !m_children.empty(); }
- QCString width() const { return m_width; }
- QCString height() const { return m_height; }
- QCString engine() const { return m_engine; }
- bool useBitmap() const { return m_useBitmap; }
- const DocNodeList &children() const { return m_children; }
- DocNodeList &children() { return m_children; }
- QCString srcFile() const { return m_srcFile; }
- int srcLine() const { return m_srcLine; }
- void setText(const QCString &t) { m_text=t; }
- void setWidth(const QCString &w) { m_width=w; }
- void setHeight(const QCString &h) { m_height=h; }
- void setEngine(const QCString &e) { m_engine=e; }
- void setUseBitmap(const bool &u) { m_useBitmap=u; }
- void setLocation(const QCString &file,int line) { m_srcFile=file; m_srcLine=line; }
-
- private:
- QCString m_context;
- QCString m_text;
- Type m_type = Code;
- bool m_isExample = false;
- QCString m_exampleFile;
- QCString m_relPath;
- QCString m_lang;
- bool m_isBlock = false;
- QCString m_width;
- QCString m_height;
- QCString m_engine;
- bool m_useBitmap=false; // some PlantUML engines cannot output data in EPS format so bitmap format is required
- DocNodeList m_children;
- QCString m_srcFile;
- int m_srcLine = -1;
-};
-
-
-/** Node representing an included text block from file */
-class DocInclude : public DocNode
-{
- public:
- enum Type { Include, DontInclude, VerbInclude, HtmlInclude, LatexInclude,
- IncWithLines, Snippet , IncludeDoc, SnippetDoc, SnipWithLines,
- DontIncWithLines, RtfInclude, ManInclude, DocbookInclude, XmlInclude};
- DocInclude(DocParser &parser,DocNode *parent,const QCString &file,
- const QCString &context, Type t,
- bool isExample,const QCString &exampleFile,
- const QCString &blockId, bool isBlock) :
- DocNode(parser), m_file(file), m_context(context), m_type(t),
- m_isExample(isExample), m_isBlock(isBlock),
- m_exampleFile(exampleFile), m_blockId(blockId) { m_parent = parent; }
- Kind kind() const override { return Kind_Include; }
- QCString file() const { return m_file; }
- QCString extension() const { int i=m_file.findRev('.');
- if (i!=-1)
- return m_file.right(m_file.length()-(uint)i);
- else
- return QCString();
- }
- Type type() const { return m_type; }
- QCString text() const { return m_text; }
- QCString context() const { return m_context; }
- QCString blockId() const { return m_blockId; }
- bool isExample() const { return m_isExample; }
- QCString exampleFile() const { return m_exampleFile; }
- bool isBlock() const { return m_isBlock; }
- void accept(DocVisitor *v) override { v->visit(this); }
- void parse();
-
- private:
- QCString m_file;
- QCString m_context;
- QCString m_text;
- Type m_type;
- bool m_isExample;
- bool m_isBlock;
- QCString m_exampleFile;
- QCString m_blockId;
-};
-
-/** Node representing a include/dontinclude operator block */
-class DocIncOperator : public DocNode
-{
- public:
- enum Type { Line, SkipLine, Skip, Until };
- DocIncOperator(DocParser &parser,DocNode *parent,Type t,const QCString &pat,
- const QCString &context,bool isExample,const QCString &exampleFile) :
- DocNode(parser), m_type(t), m_pattern(pat), m_context(context),
- m_isFirst(FALSE), m_isLast(FALSE),
- m_isExample(isExample), m_exampleFile(exampleFile) { m_parent = parent; }
- Kind kind() const override { return Kind_IncOperator; }
- Type type() const { return m_type; }
- const char *typeAsString() const
- {
- switch(m_type)
- {
- case Line: return "line";
- case SkipLine: return "skipline";
- case Skip: return "skip";
- case Until: return "until";
- }
- return "";
- }
- int line() const { return m_line; }
- bool showLineNo() const { return m_showLineNo; }
- QCString text() const { return m_text; }
- QCString pattern() const { return m_pattern; }
- QCString context() const { return m_context; }
- void accept(DocVisitor *v) override { v->visit(this); }
- bool isFirst() const { return m_isFirst; }
- bool isLast() const { return m_isLast; }
- void markFirst(bool v=TRUE) { m_isFirst = v; }
- void markLast(bool v=TRUE) { m_isLast = v; }
- bool isExample() const { return m_isExample; }
- QCString exampleFile() const { return m_exampleFile; }
- QCString includeFileName() const { return m_includeFileName; }
- void parse();
-
- private:
- Type m_type = Line;
- int m_line = 0;
- bool m_showLineNo = false;
- QCString m_text;
- QCString m_pattern;
- QCString m_context;
- bool m_isFirst = false;
- bool m_isLast = false;
- bool m_isExample = false;
- QCString m_exampleFile;
- QCString m_includeFileName;
-};
-
-/** Node representing an item of a cross-referenced list */
-class DocFormula : public DocNode
-{
- public:
- DocFormula(DocParser &parser,DocNode *parent,int id);
- Kind kind() const override { return Kind_Formula; }
- QCString name() const { return m_name; }
- QCString text() const { return m_text; }
- QCString relPath() const { return m_relPath; }
- int id() const { return m_id; }
- void accept(DocVisitor *v) override { v->visit(this); }
- 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;
- QCString m_text;
- QCString m_relPath;
- int m_id = 0;
-};
-
-/** Node representing an entry in the index. */
-class DocIndexEntry : public DocNode
-{
- public:
- DocIndexEntry(DocParser &parser,DocNode *parent,const Definition *scope,const MemberDef *md)
- : DocNode(parser), m_scope(scope), m_member(md){ m_parent = parent; }
- Kind kind() const override { return Kind_IndexEntry; }
- int parse();
- const Definition *scope() const { return m_scope; }
- const MemberDef *member() const { return m_member; }
- QCString entry() const { return m_entry; }
- void accept(DocVisitor *v) override { v->visit(this); }
-
- private:
- QCString m_entry;
- const Definition *m_scope = 0;
- const MemberDef *m_member = 0;
-};
-
-//-----------------------------------------------------------------------
-
-/** Node representing an auto List */
-class DocAutoList : public CompAccept<DocAutoList>
-{
- public:
- DocAutoList(DocParser &parser,DocNode *parent,int indent,bool isEnumList,int depth);
- Kind kind() const override { return Kind_AutoList; }
- bool isEnumList() const { return m_isEnumList; }
- int indent() const { return m_indent; }
- int depth() const { return m_depth; }
- int parse();
-
- private:
- int m_indent = 0;
- bool m_isEnumList = false;
- int m_depth = 0;
-};
-
-/** Node representing an item of a auto list */
-class DocAutoListItem : public CompAccept<DocAutoListItem>
-{
- public:
- DocAutoListItem(DocParser &parser,DocNode *parent,int indent,int num);
- Kind kind() const override { return Kind_AutoListItem; }
- int itemNumber() const { return m_itemNum; }
- int parse();
-
- private:
- int m_indent = 0;
- int m_itemNum = 0;
-};
-
-
-
-/** Node representing a simple section title */
-class DocTitle : public CompAccept<DocTitle>
-{
- public:
- DocTitle(DocParser &parser,DocNode *parent) : CompAccept<DocTitle>(parser) { m_parent = parent; }
- void parse();
- void parseFromString(const QCString &title);
- Kind kind() const override { return Kind_Title; }
- bool hasTitle() const { return !m_children.empty(); }
-
- private:
-};
-
-/** Node representing an item of a cross-referenced list */
-class DocXRefItem : public CompAccept<DocXRefItem>
-{
- public:
- DocXRefItem(DocParser &parser,DocNode *parent,int id,const QCString &key);
- Kind kind() const override { return Kind_XRefItem; }
- QCString file() const { return m_file; }
- QCString anchor() const { return m_anchor; }
- QCString title() const { return m_title; }
- QCString relPath() const { return m_relPath; }
- QCString key() const { return m_key; }
- bool parse();
-
- private:
- int m_id = 0;
- QCString m_key;
- QCString m_file;
- QCString m_anchor;
- QCString m_title;
- QCString m_relPath;
-};
-
-/** Node representing an image */
-class DocImage : public CompAccept<DocImage>
-{
- public:
- enum Type { Html, Latex, Rtf, DocBook, Xml };
- DocImage(DocParser &parser,DocNode *parent,const HtmlAttribList &attribs,
- const QCString &name,Type t,const QCString &url=QCString(), bool inlineImage = TRUE);
- Kind kind() const override { return Kind_Image; }
- Type type() const { return m_type; }
- QCString name() const { return m_name; }
- bool hasCaption() const { return !m_children.empty(); }
- QCString width() const { return m_width; }
- QCString height() const { return m_height; }
- QCString relPath() const { return m_relPath; }
- QCString url() const { return m_url; }
- bool isInlineImage() const { return m_inlineImage; }
- bool isSVG() const;
- const HtmlAttribList &attribs() const { return m_attribs; }
- void parse();
-
- private:
- HtmlAttribList m_attribs;
- QCString m_name;
- Type m_type = Html;
- QCString m_width;
- QCString m_height;
- QCString m_relPath;
- QCString m_url;
- bool m_inlineImage = false;
-};
-
-template<class T>
-class DocDiagramFileBase : public CompAccept<T>
-{
- public:
- DocDiagramFileBase(DocParser &parser, const QCString &name,const QCString &context,
- const QCString &srcFile,int srcLine)
- : CompAccept<T>(parser), m_name(name), m_context(context), m_srcFile(srcFile), m_srcLine(srcLine) {}
- QCString name() const { return m_name; }
- QCString file() const { return m_file; }
- QCString relPath() const { return m_relPath; }
- bool hasCaption() const { return !this->m_children.empty(); }
- QCString width() const { return m_width; }
- QCString height() const { return m_height; }
- QCString context() const { return m_context; }
- QCString srcFile() const { return m_srcFile; }
- int srcLine() const { return m_srcLine; }
-
- protected:
- QCString m_name;
- QCString m_file;
- QCString m_relPath;
- QCString m_width;
- QCString m_height;
- QCString m_context;
- QCString m_srcFile;
- int m_srcLine = -1;
-};
-
-/** Node representing a dot file */
-class DocDotFile : public DocDiagramFileBase<DocDotFile>
-{
- public:
- DocDotFile(DocParser &parser,DocNode *parent,const QCString &name,const QCString &context,
- const QCString &srcFile,int srcLine);
- Kind kind() const override { return Kind_DotFile; }
- bool parse();
-};
-
-/** Node representing a msc file */
-class DocMscFile : public DocDiagramFileBase<DocMscFile>
-{
- public:
- DocMscFile(DocParser &parser,DocNode *parent,const QCString &name,const QCString &context,
- const QCString &srcFile,int srcLine);
- Kind kind() const override { return Kind_MscFile; }
- bool parse();
-};
-
-/** Node representing a dia file */
-class DocDiaFile : public DocDiagramFileBase<DocDiaFile>
-{
- public:
- DocDiaFile(DocParser &parser,DocNode *parent,const QCString &name,const QCString &context,
- const QCString &srcFile,int srcLine);
- Kind kind() const override { return Kind_DiaFile; }
- bool parse();
-};
-
-/** Node representing a VHDL flow chart */
-class DocVhdlFlow : public CompAccept<DocVhdlFlow>
-{
- public:
- DocVhdlFlow(DocParser &parser,DocNode *parent);
- void parse();
- Kind kind() const override { return Kind_VhdlFlow; }
- bool hasCaption() { return !m_children.empty(); }
- private:
-};
-
-/** Node representing a link to some item */
-class DocLink : public CompAccept<DocLink>
-{
- public:
- DocLink(DocParser &parser,DocNode *parent,const QCString &target);
- QCString parse(bool,bool isXmlLink=FALSE);
- Kind kind() const override { return Kind_Link; }
- QCString file() const { return m_file; }
- QCString relPath() const { return m_relPath; }
- QCString ref() const { return m_ref; }
- QCString anchor() const { return m_anchor; }
-
- private:
- QCString m_file;
- QCString m_relPath;
- QCString m_ref;
- QCString m_anchor;
- QCString m_refText;
-};
-
-/** Node representing a reference to some item */
-class DocRef : public CompAccept<DocRef>
-{
- public:
- DocRef(DocParser &parser,DocNode *parent,const QCString &target,const QCString &context);
- void parse();
- Kind kind() const override { return Kind_Ref; }
- QCString file() const { return m_file; }
- QCString relPath() const { return m_relPath; }
- QCString ref() const { return m_ref; }
- QCString anchor() const { return m_anchor; }
- QCString targetTitle() const { return m_text; }
- bool hasLinkText() const { return !m_children.empty(); }
- bool refToAnchor() const { return m_refType==Anchor; }
- bool refToSection() const { return m_refType==Section; }
- bool refToTable() const { return m_refType==Table; }
- bool isSubPage() const { return m_isSubPage; }
-
- private:
- RefType m_refType = Unknown;
- bool m_isSubPage = false;
- QCString m_file;
- QCString m_relPath;
- QCString m_ref;
- QCString m_anchor;
- QCString m_text;
-};
-
-/** Node representing an internal reference to some item */
-class DocInternalRef : public CompAccept<DocInternalRef>
-{
- public:
- DocInternalRef(DocParser &parser,DocNode *parent,const QCString &target);
- void parse();
- Kind kind() const override { return Kind_Ref; }
- QCString file() const { return m_file; }
- QCString relPath() const { return m_relPath; }
- QCString anchor() const { return m_anchor; }
-
- private:
- QCString m_file;
- QCString m_relPath;
- QCString m_anchor;
-};
-
-/** Node representing a Hypertext reference */
-class DocHRef : public CompAccept<DocHRef>
-{
- public:
- DocHRef(DocParser &parser,DocNode *parent,const HtmlAttribList &attribs,const QCString &url,
- const QCString &relPath, const QCString &file) :
- CompAccept<DocHRef>(parser), m_attribs(attribs), m_url(url), m_relPath(relPath), m_file(file) { m_parent = parent; }
- int parse();
- QCString url() const { return m_url; }
- QCString file() const { return m_file; }
- QCString relPath() const { return m_relPath; }
- Kind kind() const override { return Kind_HRef; }
- const HtmlAttribList &attribs() const { return m_attribs; }
-
- private:
- HtmlAttribList m_attribs;
- QCString m_url;
- QCString m_relPath;
- QCString m_file;
-};
-
-/** Node Html heading */
-class DocHtmlHeader : public CompAccept<DocHtmlHeader>
-{
- public:
- DocHtmlHeader(DocParser &parser,DocNode *parent,const HtmlAttribList &attribs,int level) :
- CompAccept<DocHtmlHeader>(parser), m_level(level), m_attribs(attribs) { m_parent = parent; }
- int level() const { return m_level; }
- Kind kind() const override { return Kind_HtmlHeader; }
- const HtmlAttribList &attribs() const { return m_attribs; }
- int parse();
-
- private:
- int m_level = 0;
- HtmlAttribList m_attribs;
-};
-
-/** Node representing a Html description item */
-class DocHtmlDescTitle : public CompAccept<DocHtmlDescTitle>
-{
- public:
- DocHtmlDescTitle(DocParser &parser,DocNode *parent,const HtmlAttribList &attribs) :
- CompAccept<DocHtmlDescTitle>(parser), m_attribs(attribs) { m_parent = parent; }
- Kind kind() const override { return Kind_HtmlDescTitle; }
- const HtmlAttribList &attribs() const { return m_attribs; }
- int parse();
-
- private:
- HtmlAttribList m_attribs;
-};
-
-/** Node representing a Html description list */
-class DocHtmlDescList : public CompAccept<DocHtmlDescList>
-{
- public:
- DocHtmlDescList(DocParser &parser,DocNode *parent,const HtmlAttribList &attribs) :
- CompAccept<DocHtmlDescList>(parser), m_attribs(attribs) { m_parent = parent; }
- Kind kind() const override { return Kind_HtmlDescList; }
- const HtmlAttribList &attribs() const { return m_attribs; }
- int parse();
-
- private:
- HtmlAttribList m_attribs;
-};
-
-/** Node representing a normal section */
-class DocSection : public CompAccept<DocSection>
-{
- public:
- DocSection(DocParser &parser,DocNode *parent,int level,const QCString &id) :
- CompAccept<DocSection>(parser), m_level(level), m_id(id) { m_parent = parent; }
- Kind kind() const override { return Kind_Section; }
- int level() const { return m_level; }
- QCString title() const { return m_title; }
- QCString anchor() const { return m_anchor; }
- QCString id() const { return m_id; }
- QCString file() const { return m_file; }
- int parse();
-
- private:
- int m_level = 0;
- QCString m_id;
- QCString m_title;
- QCString m_anchor;
- QCString m_file;
-};
-
-/** Node representing a reference to a section */
-class DocSecRefItem : public CompAccept<DocSecRefItem>
-{
- public:
- DocSecRefItem(DocParser &parser,DocNode *parent,const QCString &target);
- Kind kind() const override { return Kind_SecRefItem; }
- QCString target() const { return m_target; }
- QCString file() const { return m_file; }
- QCString anchor() const { return m_anchor; }
- QCString relPath() const { return m_relPath; }
- QCString ref() const { return m_ref; }
- bool refToTable() const { return m_refType==Table; }
- bool isSubPage() const { return m_isSubPage; }
- void parse();
-
- private:
- QCString m_target;
- RefType m_refType = Unknown;
- bool m_isSubPage = false;
- QCString m_file;
- QCString m_relPath;
- QCString m_ref;
- QCString m_anchor;
-};
-
-/** Node representing a list of section references */
-class DocSecRefList : public CompAccept<DocSecRefList>
-{
- public:
- DocSecRefList(DocParser &parser,DocNode *parent) : CompAccept<DocSecRefList>(parser) { m_parent = parent; }
- void parse();
- Kind kind() const override { return Kind_SecRefList; }
-
- private:
-};
-
-/** Node representing an internal section of documentation */
-class DocInternal : public CompAccept<DocInternal>
-{
- public:
- DocInternal(DocParser &parser,DocNode *parent) : CompAccept<DocInternal>(parser) { m_parent = parent; }
- int parse(int);
- Kind kind() const override { return Kind_Internal; }
-
- private:
-};
-
-/** Node representing an block of paragraphs */
-class DocParBlock : public CompAccept<DocParBlock>
-{
- public:
- DocParBlock(DocParser &parser,DocNode *parent) : CompAccept<DocParBlock>(parser) { m_parent = parent; }
- int parse();
- Kind kind() const override { return Kind_ParBlock; }
-
- private:
-};
-
-
-/** Node representing a simple list */
-class DocSimpleList : public CompAccept<DocSimpleList>
-{
- public:
- DocSimpleList(DocParser &parser,DocNode *parent) : CompAccept<DocSimpleList>(parser) { m_parent = parent; }
- Kind kind() const override { return Kind_SimpleList; }
- int parse();
-
- private:
-};
-
-/** Node representing a Html list */
-class DocHtmlList : public CompAccept<DocHtmlList>
-{
- public:
- enum Type { Unordered, Ordered };
- DocHtmlList(DocParser &parser,DocNode *parent,const HtmlAttribList &attribs,Type t) :
- CompAccept<DocHtmlList>(parser), m_type(t), m_attribs(attribs) { m_parent = parent; }
- Kind kind() const override { return Kind_HtmlList; }
- Type type() const { return m_type; }
- const HtmlAttribList &attribs() const { return m_attribs; }
- int parse();
- int parseXml();
-
- private:
- Type m_type = Unordered;
- HtmlAttribList m_attribs;
-};
-
-/** Node representing a simple section */
-class DocSimpleSect : public CompAccept<DocSimpleSect>
-{
- public:
- enum Type
- {
- Unknown, See, Return, Author, Authors, Version, Since, Date,
- Note, Warning, Copyright, Pre, Post, Invar, Remark, Attention, User, Rcs
- };
- DocSimpleSect(DocParser &parser,DocNode *parent,Type t);
- virtual ~DocSimpleSect();
- Kind kind() const override { return Kind_SimpleSect; }
- Type type() const { return m_type; }
- QCString typeString() const;
- void accept(DocVisitor *v) override;
- int parse(bool userTitle,bool needsSeparator);
- int parseRcs();
- int parseXml();
- void appendLinkWord(const QCString &word);
- bool hasTitle() const { return m_title->hasTitle(); }
-
- private:
- Type m_type = Unknown;
- DocTitle * m_title = 0;
-};
-
-/** Node representing a separator between two simple sections of the
- * same type.
+/*! Searches for section and anchor commands in the input
+ * Sections found will be added to the SectionManager.
*/
-class DocSimpleSectSep : public DocNode
-{
- public:
- DocSimpleSectSep(DocParser &parser,DocNode *parent) : DocNode(parser) { m_parent = parent; }
- Kind kind() const override { return Kind_SimpleSectSep; }
- void accept(DocVisitor *v) override { v->visit(this); }
-
- private:
-};
-
-/** Node representing a parameter section */
-class DocParamSect : public CompAccept<DocParamSect>
-{
- friend class DocParamList;
- public:
- enum Type
- {
- Unknown, Param, RetVal, Exception, TemplateParam
- };
- enum Direction
- {
- In=1, Out=2, InOut=3, Unspecified=0
- };
- DocParamSect(DocParser &parser,DocNode *parent,Type t)
- : CompAccept<DocParamSect>(parser), m_type(t), m_hasInOutSpecifier(FALSE), m_hasTypeSpecifier(FALSE)
- { m_parent = parent; }
- int parse(const QCString &cmdName,bool xmlContext,Direction d);
- Kind kind() const override { return Kind_ParamSect; }
- Type type() const { return m_type; }
- bool hasInOutSpecifier() const { return m_hasInOutSpecifier; }
- bool hasTypeSpecifier() const { return m_hasTypeSpecifier; }
-
- private:
- Type m_type = Unknown;
- bool m_hasInOutSpecifier = false;
- bool m_hasTypeSpecifier = false;
-};
-
-/** Node representing a paragraph in the documentation tree */
-class DocPara : public CompAccept<DocPara>
-{
- public:
- DocPara(DocParser &parser,DocNode *parent) :
- CompAccept<DocPara>(parser), m_isFirst(FALSE), m_isLast(FALSE) { m_parent = parent; }
- int parse();
- Kind kind() const override { return Kind_Para; }
- bool isEmpty() const { return m_children.empty(); }
- void markFirst(bool v=TRUE) { m_isFirst=v; }
- void markLast(bool v=TRUE) { m_isLast=v; }
- bool isFirst() const { return m_isFirst; }
- bool isLast() const { return m_isLast; }
-
- int handleCommand(const QCString &cmdName,const int tok);
- int handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &tagHtmlAttribs);
- int handleHtmlEndTag(const QCString &tagName);
- int handleSimpleSection(DocSimpleSect::Type t,bool xmlContext=FALSE);
- int handleXRefItem();
- int handleParamSection(const QCString &cmdName,DocParamSect::Type t,
- bool xmlContext,
- int direction);
- void handleIncludeOperator(const QCString &cmdName,DocIncOperator::Type t);
- void handleImage(const QCString &cmdName);
- template<class T> void handleFile(const QCString &cmdName);
- void handleInclude(const QCString &cmdName,DocInclude::Type t);
- void handleLink(const QCString &cmdName,bool isJavaLink);
- void handleCite();
- void handleEmoji();
- void handleRef(const QCString &cmdName);
- void handleSection(const QCString &cmdName);
- void handleInheritDoc();
- void handleVhdlFlow();
- void handleIline();
- int handleStartCode();
- int handleHtmlHeader(const HtmlAttribList &tagHtmlAttribs,int level);
-
- bool injectToken(int tok,const QCString &tokText);
- const HtmlAttribList &attribs() const { return m_attribs; }
- void setAttribs(const HtmlAttribList &attribs) { m_attribs = attribs; }
-
- private:
- QCString m_sectionId;
- bool m_isFirst = false;
- bool m_isLast = false;
- HtmlAttribList m_attribs;
-};
-
-using DocParaList = std::vector< std::unique_ptr<DocPara> >;
-
-/** Node representing a parameter list. */
-class DocParamList : public DocNode
-{
- public:
- DocParamList(DocParser &parser,DocNode *parent,DocParamSect::Type t,DocParamSect::Direction d)
- : DocNode(parser), m_type(t), m_dir(d)
- {
- m_parent = parent;
- }
- virtual ~DocParamList() { }
- Kind kind() const override { return Kind_ParamList; }
- DocNodeList ¶meters() { return m_params; }
- DocNodeList ¶mTypes() { return m_paramTypes; }
- DocParamSect::Type type() const { return m_type; }
- DocParamSect::Direction direction() const { return m_dir; }
- void markFirst(bool b=TRUE) { m_isFirst=b; }
- void markLast(bool b=TRUE) { m_isLast=b; }
- bool isFirst() const { return m_isFirst; }
- bool isLast() const { return m_isLast; }
- void accept(DocVisitor *v) override
- {
- v->visitPre(this);
- for (const auto &n : m_paragraphs) n->accept(v);
- v->visitPost(this);
- }
- int parse(const QCString &cmdName);
- int parseXml(const QCString ¶mName);
-
- private:
- DocParaList m_paragraphs;
- DocNodeList m_params;
- DocNodeList m_paramTypes;
- DocParamSect::Type m_type = DocParamSect::Unknown;
- DocParamSect::Direction m_dir = DocParamSect::Unspecified;
- bool m_isFirst = false;
- bool m_isLast = false;
-};
-
-/** Node representing a simple list item */
-class DocSimpleListItem : public DocNode
-{
- public:
- DocSimpleListItem(DocParser &parser,DocNode *parent) :
- DocNode(parser) { m_paragraph=new DocPara(parser,this); m_parent = parent; }
- int parse();
- virtual ~DocSimpleListItem() { delete m_paragraph; }
- Kind kind() const override { return Kind_SimpleListItem; }
- void accept(DocVisitor *v) override
- {
- v->visitPre(this);
- m_paragraph->accept(v);
- v->visitPost(this);
- }
-
- private:
- DocPara *m_paragraph = 0;
-};
-
-/** Node representing a HTML list item */
-class DocHtmlListItem : public CompAccept<DocHtmlListItem>
-{
- public:
- DocHtmlListItem(DocParser &parser,DocNode *parent,const HtmlAttribList &attribs,int num) :
- CompAccept<DocHtmlListItem>(parser), m_attribs(attribs), m_itemNum(num) { m_parent = parent; }
- Kind kind() const override { return Kind_HtmlListItem; }
- int itemNumber() const { return m_itemNum; }
- const HtmlAttribList &attribs() const { return m_attribs; }
- int parse();
- int parseXml();
-
- private:
- HtmlAttribList m_attribs;
- int m_itemNum = 0;
-};
-
-/** Node representing a HTML description data */
-class DocHtmlDescData : public CompAccept<DocHtmlDescData>
-{
- public:
- DocHtmlDescData(DocParser &parser,DocNode *parent) : CompAccept<DocHtmlDescData>(parser) { m_parent = parent; }
- Kind kind() const override { return Kind_HtmlDescData; }
- const HtmlAttribList &attribs() const { return m_attribs; }
- int parse();
-
- private:
- HtmlAttribList m_attribs;
-};
-
-/** Node representing a HTML table cell */
-class DocHtmlCell : public CompAccept<DocHtmlCell>
-{
- friend class DocHtmlTable;
- public:
- enum Alignment { Left, Right, Center };
- enum Valignment {Top, Middle, Bottom};
- DocHtmlCell(DocParser &parser,DocNode *parent,const HtmlAttribList &attribs,bool isHeading) :
- CompAccept<DocHtmlCell>(parser), m_isHeading(isHeading), m_attribs(attribs) { m_parent = parent; }
- bool isHeading() const { return m_isHeading; }
- bool isFirst() const { return m_isFirst; }
- bool isLast() const { return m_isLast; }
- Kind kind() const override { return Kind_HtmlCell; }
- void markFirst(bool v=TRUE) { m_isFirst=v; }
- void markLast(bool v=TRUE) { m_isLast=v; }
- const HtmlAttribList &attribs() const { return m_attribs; }
- int parse();
- int parseXml();
- uint rowIndex() const { return m_rowIdx; }
- uint columnIndex() const { return m_colIdx; }
- uint rowSpan() const;
- uint colSpan() const;
- Alignment alignment() const;
- Valignment valignment() const;
-
- private:
- void setRowIndex(uint idx) { m_rowIdx = idx; }
- void setColumnIndex(uint idx) { m_colIdx = idx; }
- bool m_isHeading = false;
- bool m_isFirst = false;
- bool m_isLast = false;
- HtmlAttribList m_attribs;
- uint m_rowIdx = (uint)-1;
- uint m_colIdx = (uint)-1;
-};
-
-/** Node representing a HTML table caption */
-class DocHtmlCaption : public CompAccept<DocHtmlCaption>
-{
- public:
- DocHtmlCaption(DocParser &parser,DocNode *parent,const HtmlAttribList &attribs);
- Kind kind() const override { return Kind_HtmlCaption; }
- const HtmlAttribList &attribs() const { return m_attribs; }
- int parse();
- bool hasCaptionId() const { return m_hasCaptionId; }
- QCString file() const { return m_file; }
- QCString anchor() const { return m_anchor; }
-
- private:
- HtmlAttribList m_attribs;
- bool m_hasCaptionId = false;
- QCString m_file;
- QCString m_anchor;
-};
-
-/** Node representing a HTML table row */
-class DocHtmlRow : public CompAccept<DocHtmlRow>
-{
- friend class DocHtmlTable;
- public:
- DocHtmlRow(DocParser &parser,DocNode *parent,const HtmlAttribList &attribs)
- : CompAccept<DocHtmlRow>(parser), m_attribs(attribs) { m_parent = parent; }
- Kind kind() const override { return Kind_HtmlRow; }
- size_t numCells() const { return m_children.size(); }
- const HtmlAttribList &attribs() const { return m_attribs; }
- int parse();
- int parseXml(bool header);
- bool isHeading() const { // a row is a table heading if all cells are marked as such
- bool heading=TRUE;
- for (const auto &n : m_children)
- {
- if (n->kind()==Kind_HtmlCell)
- {
- heading = heading && ((DocHtmlCell*)n.get())->isHeading();
- }
- }
- return !m_children.empty() && heading;
- }
- void setVisibleCells(uint n) { m_visibleCells = n; }
- uint visibleCells() const { return m_visibleCells; }
- uint rowIndex() const { return m_rowIdx; }
-
- private:
- void setRowIndex(uint idx) { m_rowIdx = idx; }
- HtmlAttribList m_attribs;
- uint m_visibleCells = 0;
- uint m_rowIdx = (uint)-1;
-};
-
-/** Node representing a HTML table */
-class DocHtmlTable : public CompAccept<DocHtmlTable>
-{
- public:
- DocHtmlTable(DocParser &parser,DocNode *parent,const HtmlAttribList &attribs)
- : CompAccept<DocHtmlTable>(parser), m_attribs(attribs) { m_caption=0; m_numCols=0; m_parent = parent; }
- ~DocHtmlTable() { delete m_caption; }
- Kind kind() const override { return Kind_HtmlTable; }
- size_t numRows() const { return m_children.size(); }
- bool hasCaption() { return m_caption!=0; }
- const HtmlAttribList &attribs() const { return m_attribs; }
- int parse();
- int parseXml();
- size_t numColumns() const { return m_numCols; }
- void accept(DocVisitor *v) override;
- DocHtmlCaption *caption() const { return m_caption; }
- DocHtmlRow *firstRow() const {
- return (!m_children.empty() && m_children.front()->kind()==Kind_HtmlRow) ?
- (DocHtmlRow*)m_children.front().get() : 0;
- }
-
- private:
- void computeTableGrid();
- DocHtmlCaption *m_caption = 0;
- HtmlAttribList m_attribs;
- size_t m_numCols = 0;
-};
-
-/** Node representing an HTML blockquote */
-class DocHtmlBlockQuote : public CompAccept<DocHtmlBlockQuote>
-{
- public:
- DocHtmlBlockQuote(DocParser &parser,DocNode *parent,const HtmlAttribList &attribs)
- : CompAccept<DocHtmlBlockQuote>(parser), m_attribs(attribs) { m_parent = parent; }
- Kind kind() const override { return Kind_HtmlBlockQuote; }
- int parse();
- const HtmlAttribList &attribs() const { return m_attribs; }
-
- private:
- HtmlAttribList m_attribs;
-};
-
-/** Root node of a text fragment */
-class DocText : public CompAccept<DocText>
-{
- public:
- DocText(DocParser &parser) : CompAccept<DocText>(parser) {}
- Kind kind() const override { return Kind_Text; }
- void parse();
- bool isEmpty() const { return m_children.empty(); }
-};
-
-/** Root node of documentation tree */
-class DocRoot : public CompAccept<DocRoot>
-{
- public:
- DocRoot(DocParser &parser,bool indent,bool sl) : CompAccept<DocRoot>(parser), m_indent(indent), m_singleLine(sl) {}
- Kind kind() const override { return Kind_Root; }
- void parse();
- bool indent() const { return m_indent; }
- bool singleLine() const { return m_singleLine; }
- bool isEmpty() const { return m_children.empty(); }
-
- private:
- bool m_indent = false;
- bool m_singleLine = false;
-};
+void docFindSections(const QCString &input,
+ const Definition *d,
+ const QCString &fileName);
#endif
--- /dev/null
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2022 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
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#ifndef DOCPARSER_P_H
+#define DOCPARSER_P_H
+
+/** @file
+ * @brief Private header shared between docparser.cpp and docnode.cpp
+ */
+
+#include <cassert>
+#include <stack>
+#include <iterator>
+#include <vector>
+#include <deque>
+
+#include "containers.h"
+#include "docparser.h"
+#include "docnode.h"
+#include "doctokenizer.h"
+#include "searchindex.h"
+
+using DefinitionStack = std::vector<const Definition *>;
+using DocNodeStack = std::stack<DocNodeVariant *>;
+
+template<typename T, typename Container = std::deque<T>>
+class IterableStack : public std::stack<T, Container>
+{
+ using std::stack<T, Container>::c;
+
+public:
+
+ // expose just the iterators of the underlying container
+ auto begin() { return std::begin(c); }
+ auto end() { return std::end(c); }
+
+ auto begin() const { return std::begin(c); }
+ auto end() const { return std::end(c); }
+};
+using DocStyleChangeStack = IterableStack<const DocNodeVariant *>;
+
+/** Parser's context to store all global variables.
+ */
+struct DocParserContext
+{
+ const Definition *scope;
+ QCString context;
+ bool inSeeBlock;
+ bool xmlComment;
+ bool insideHtmlLink;
+ DocNodeStack nodeStack;
+ DocStyleChangeStack styleStack;
+ DocStyleChangeStack initialStyleStack;
+ DefinitionStack copyStack;
+ QCString fileName;
+ QCString relPath;
+
+ bool hasParamCommand;
+ bool hasReturnCommand;
+ StringMultiSet retvalsFound;
+ StringMultiSet paramsFound;
+ const MemberDef * memberDef;
+ bool isExample;
+ QCString exampleName;
+ QCString searchUrl;
+
+ QCString includeFileName;
+ QCString includeFileText;
+ uint includeFileOffset;
+ uint includeFileLength;
+ int includeFileLine;
+ bool includeFileShowLineNo;
+
+ TokenInfo *token;
+ int lineNo;
+ bool markdownSupport;
+};
+
+class DocParser : public IDocParser
+{
+ public:
+ ~DocParser();
+ void pushContext();
+ void popContext();
+ void handleImg(DocNodeVariant *parent,DocNodeList &children,const HtmlAttribList &tagHtmlAttribs);
+ int internalValidatingParseDoc(DocNodeVariant *parent,DocNodeList &children,
+ const QCString &doc);
+ QCString processCopyDoc(const char *data,uint &len);
+ QCString findAndCopyImage(const QCString &fileName,DocImage::Type type, bool doWarn = true);
+ void checkArgumentName();
+ void checkRetvalName();
+ void checkUnOrMultipleDocumentedParams();
+ bool findDocsForMemberOrCompound(const QCString &commandName,
+ QCString *pDoc,
+ QCString *pBrief,
+ const Definition **pDef);
+ bool defaultHandleToken(DocNodeVariant *parent,int tok,
+ DocNodeList &children,bool
+ handleWord=TRUE);
+ void errorHandleDefaultToken(DocNodeVariant *parent,int tok,
+ DocNodeList &children,const QCString &txt);
+ void defaultHandleTitleAndSize(const int cmd, DocNodeVariant *parent,
+ DocNodeList &children, QCString &width,QCString &height);
+ int handleStyleArgument(DocNodeVariant *parent,DocNodeList &children,
+ const QCString &cmdName);
+ void handleStyleEnter(DocNodeVariant *parent,DocNodeList &children, DocStyleChange::Style s,
+ const QCString &tagName,const HtmlAttribList *attribs);
+ void handleStyleLeave(DocNodeVariant *parent,DocNodeList &children, DocStyleChange::Style s,
+ const QCString &tagName);
+ void handlePendingStyleCommands(DocNodeVariant *parent,DocNodeList &children);
+ void handleInitialStyleCommands(DocNodeVariant *parent,DocNodeList &children);
+ int handleAHref(DocNodeVariant *parent,DocNodeList &children,const HtmlAttribList &tagHtmlAttribs);
+ void handleUnclosedStyleCommands();
+ void handleLinkedWord(DocNodeVariant *parent,DocNodeList &children,bool ignoreAutoLinkFlag=FALSE);
+ void handleParameterType(DocNodeVariant *parent,DocNodeList &children,const QCString ¶mTypes);
+ void handleInternalRef(DocNodeVariant *parent,DocNodeList &children);
+ void handleAnchor(DocNodeVariant *parent,DocNodeList &children);
+ void handleImage(DocNodeVariant *parent, DocNodeList &children);
+ void readTextFileByName(const QCString &file,QCString &text);
+
+ std::stack< DocParserContext > contextStack;
+ DocParserContext context;
+ DocTokenizer tokenizer;
+ SIDataCollection searchData;
+};
+
+//---------------------------------------------------------------------------
+
+class AutoNodeStack
+{
+ public:
+ AutoNodeStack(DocParser *parser,DocNodeVariant* node)
+ : m_parser(parser), m_node(node) { m_parser->context.nodeStack.push(node); }
+ ~AutoNodeStack() {
+#if defined(NDEBUG)
+ (void)m_node;
+ if (!m_parser->context.nodeStack.empty())
+ {
+ m_parser->context.nodeStack.pop(); // robust version that does not assert
+ }
+#else
+ assert(m_parser->context.nodeStack.top()==m_node);
+ m_parser->context.nodeStack.pop(); // error checking version
+#endif
+ }
+
+ private:
+ DocParser *m_parser;
+ const DocNodeVariant *m_node;
+};
+
+inline bool isPreformatted(const DocNodeVariant *n)
+{
+ return std::visit([](auto &&x)->decltype(auto) { return x.isPreformatted(); }, *n);
+}
+
+/*! Returns TRUE iff node n is a child of a preformatted node */
+inline bool insidePRE(const DocNodeVariant *n)
+{
+ while (n)
+ {
+ if (isPreformatted(n)) return TRUE;
+ n=parent(n);
+ }
+ return FALSE;
+}
+
+/*! Returns TRUE iff node n is a child of a html list item node */
+inline bool insideLI(const DocNodeVariant *n)
+{
+ while (n)
+ {
+ if (std::holds_alternative<DocHtmlListItem>(*n)) return TRUE;
+ n=parent(n);
+ }
+ return FALSE;
+}
+
+//---------------------------------------------------------------------------
+
+/*! Returns TRUE iff node n is a child of a unordered html list node */
+inline bool insideUL(const DocNodeVariant *n)
+{
+ while (n)
+ {
+ if (std::holds_alternative<DocHtmlList>(*n) &&
+ std::get<DocHtmlList>(*n).type()==DocHtmlList::Unordered)
+ {
+ return TRUE;
+ }
+ n=parent(n);
+ }
+ return FALSE;
+}
+
+//---------------------------------------------------------------------------
+
+/*! Returns TRUE iff node n is a child of a ordered html list node */
+inline bool insideOL(const DocNodeVariant *n)
+{
+ while (n)
+ {
+ if (std::holds_alternative<DocHtmlList>(*n) &&
+ std::get<DocHtmlList>(*n).type()==DocHtmlList::Ordered)
+ {
+ return TRUE;
+ }
+ n=parent(n);
+ }
+ return FALSE;
+}
+
+//---------------------------------------------------------------------------
+
+inline bool insideTable(const DocNodeVariant *n)
+{
+ while (n)
+ {
+ if (std::holds_alternative<DocHtmlTable>(*n)) return TRUE;
+ n=parent(n);
+ }
+ return FALSE;
+}
+
+//---------------------------------------------------------------------------
+
+inline bool insideDetails(DocStyleChangeStack styleStack)
+{
+ for (auto i : styleStack)
+ {
+ if (std::get<DocStyleChange>(*i).style() == DocStyleChange::Details) return true;
+ }
+ return false;
+}
+
+
+#endif
{
scope = nd->name();
}
- const MemberDef *declMd = md->memberDeclaration();
- if (declMd==0) declMd = md;
+ fd = md->getFileDef();
+ if (fd)
{
- fd = md->getFileDef();
- if (fd)
- {
- decl = fd->name();
- }
+ decl = fd->name();
}
writeToken(p->tts,md,type,lang,scope,md->anchor(),decl);
}
RetVal_EndParBlock = 0x10017
};
+#define TK_COMMAND_CHAR(token) ((token)==TK_COMMAND_AT ? "@" : "\\")
+
/** @brief Data associated with a token used by the comment block parser. */
struct TokenInfo
{
if (str==0 || length==std::string::npos) return 0;
size_t i;
int indent=0;
- static int tabSize=Config_getInt(TAB_SIZE);
+ int tabSize=Config_getInt(TAB_SIZE);
for (i=0;i<length;i++)
{
if (str[i]=='\t')
URLCHAR [a-z_A-Z0-9\!\~\,\:\;\'\$\?\@\&\%\#\.\-\+\/\=\x80-\xFF]
URLMASK ({URLCHAR}+([({]{URLCHAR}*[)}])?)+
URLPROTOCOL ("http:"|"https:"|"ftp:"|"ftps:"|"sftp:"|"file:"|"news:"|"irc:"|"ircs:")
-FILEICHAR [a-z_A-Z0-9\\:\\\/\-\+&#@]
-FILEECHAR [a-z_A-Z0-9\-\+&#@]
+FILEICHAR [a-z_A-Z0-9\\:\\\/\-\+=&#@]
+FILEECHAR [a-z_A-Z0-9\-\+=&#@]
FILECHARS {FILEICHAR}*{FILEECHAR}+
HFILEMASK {FILEICHAR}*("."{FILEICHAR}+)+{FILECHARS}*
VFILEMASK {FILECHARS}("."{FILECHARS})*
return TK_WORD;
}
<St_Emoji>. {
+ unput(*yytext);
return 0;
}
<St_Iline>{LINENR}/[\n\.] |
std::stack<bool> hidden;
};
-DocVisitor::DocVisitor(int id) : m_p(std::make_unique<Private>())
+DocVisitor::DocVisitor() : m_p(std::make_unique<Private>())
{
- m_p->id = id;
}
DocVisitor::~DocVisitor()
return *it->second.get();
}
-int DocVisitor::id() const
-{
- return m_p->id;
-}
-
void DocVisitor::pushHidden(bool hide)
{
m_p->hidden.push(hide);
#include "qcstring.h"
-// ids
-const int DocVisitor_Html = 0;
-const int DocVisitor_Latex = 1;
-const int DocVisitor_XML = 2;
-const int DocVisitor_RTF = 3;
-const int DocVisitor_Man = 4;
-const int DocVisitor_Text = 5;
-const int DocVisitor_Other = 6;
-const int DocVisitor_Docbook = 7;
-
-// forward declarations
-class DocWord;
-class DocWhiteSpace;
-class DocAutoList;
-class DocAutoListItem;
-class DocPara;
-class DocRoot;
-class DocSymbol;
-class DocEmoji;
-class DocURL;
-class DocStyleChange;
-class DocSimpleSect;
-class DocTitle;
-class DocSimpleList;
-class DocSimpleListItem;
-class DocSection;
-class DocVerbatim;
-class DocXRefItem;
-class DocHtmlList;
-class DocHtmlListItem;
-class DocHtmlDescList;
-class DocHtmlDescTitle;
-class DocHtmlDescData;
-class DocHtmlTable;
-class DocHtmlRow;
-class DocHtmlCell;
-class DocHtmlCaption;
-class DocLineBreak;
-class DocHorRuler;
-class DocAnchor;
-class DocIndexEntry;
-class DocInternal;
-class DocHRef;
-class DocInclude;
-class DocIncOperator;
-class DocHtmlHeader;
-class DocImage;
-class DocDotFile;
-class DocMscFile;
-class DocDiaFile;
-class DocLink;
-class DocCite;
-class DocRef;
-class DocFormula;
-class DocSecRefItem;
-class DocSecRefList;
-class DocLinkedWord;
-class DocParamSect;
-class DocParamList;
-class DocInternalRef;
-class DocText;
-class DocSimpleSectSep;
-class DocHtmlBlockQuote;
-class DocVhdlFlow;
-class DocParBlock;
class CodeParserInterface;
-/*! @brief Abstract visitor that participates in the visitor pattern.
+/*! @brief Helper base class for functionality shared by all visitors
*/
class DocVisitor
{
struct Private;
std::unique_ptr<Private> m_p;
public:
- DocVisitor(int id);
+ DocVisitor();
virtual ~DocVisitor();
- int id() const;
CodeParserInterface &getCodeParser(const QCString &langExt);
void pushHidden(bool hide);
bool popHidden();
+};
- /*! @name Visitor functions for leaf nodes
- * @{
- */
- virtual void visit(DocWord *) = 0;
- virtual void visit(DocWhiteSpace *) = 0;
- virtual void visit(DocSymbol *) = 0;
- virtual void visit(DocEmoji *) = 0;
- virtual void visit(DocURL *) = 0;
- virtual void visit(DocStyleChange *) = 0;
- virtual void visit(DocVerbatim *) = 0;
- virtual void visit(DocLineBreak *) = 0;
- virtual void visit(DocHorRuler *) = 0;
- virtual void visit(DocAnchor *) = 0;
- virtual void visit(DocInclude *) = 0;
- virtual void visit(DocIncOperator *) = 0;
- virtual void visit(DocFormula *) = 0;
- virtual void visit(DocLinkedWord *) = 0;
- virtual void visit(DocIndexEntry *) = 0;
- virtual void visit(DocSimpleSectSep *) = 0;
- virtual void visit(DocCite *) = 0;
- /*! @} */
- /*! @name Visitor functions for internal nodes
- * @{
- */
- virtual void visitPre(DocAutoList *) = 0;
- virtual void visitPost(DocAutoList *) = 0;
- virtual void visitPre(DocAutoListItem *) = 0;
- virtual void visitPost(DocAutoListItem *) = 0;
- virtual void visitPre(DocPara *) = 0;
- virtual void visitPost(DocPara *) = 0;
- virtual void visitPre(DocRoot *) = 0;
- virtual void visitPost(DocRoot *) = 0;
- virtual void visitPre(DocSimpleSect *) = 0;
- virtual void visitPost(DocSimpleSect *) = 0;
- virtual void visitPre(DocTitle *) = 0;
- virtual void visitPost(DocTitle *) = 0;
- virtual void visitPre(DocSimpleList *) = 0;
- virtual void visitPost(DocSimpleList *) = 0;
- virtual void visitPre(DocSimpleListItem *) = 0;
- virtual void visitPost(DocSimpleListItem *) = 0;
- virtual void visitPre(DocSection *) = 0;
- virtual void visitPost(DocSection *) = 0;
- virtual void visitPre(DocHtmlList *) = 0;
- virtual void visitPost(DocHtmlListItem *) = 0;
- virtual void visitPre(DocHtmlListItem *) = 0;
- virtual void visitPost(DocHtmlList *) = 0;
- virtual void visitPre(DocHtmlDescList *) = 0;
- virtual void visitPost(DocHtmlDescList *) = 0;
- virtual void visitPre(DocHtmlDescTitle *) = 0;
- virtual void visitPost(DocHtmlDescTitle *) = 0;
- virtual void visitPre(DocHtmlDescData *) = 0;
- virtual void visitPost(DocHtmlDescData *) = 0;
- virtual void visitPre(DocHtmlTable *) = 0;
- virtual void visitPost(DocHtmlRow *) = 0;
- virtual void visitPre(DocHtmlCell *) = 0;
- virtual void visitPost(DocHtmlCell *) = 0;
- virtual void visitPre(DocHtmlRow *) = 0;
- virtual void visitPost(DocHtmlTable *) = 0;
- virtual void visitPre(DocHtmlCaption *) = 0;
- virtual void visitPost(DocHtmlCaption *) = 0;
- virtual void visitPre(DocInternal *) = 0;
- virtual void visitPost(DocInternal *) = 0;
- virtual void visitPre(DocHRef *) = 0;
- virtual void visitPost(DocHRef *) = 0;
- virtual void visitPre(DocHtmlHeader *) = 0;
- virtual void visitPost(DocHtmlHeader *) = 0;
- virtual void visitPre(DocImage *) = 0;
- virtual void visitPost(DocImage *) = 0;
- virtual void visitPre(DocDotFile *) = 0;
- virtual void visitPost(DocDotFile *) = 0;
- virtual void visitPre(DocMscFile *) = 0;
- virtual void visitPost(DocMscFile *) = 0;
- virtual void visitPre(DocDiaFile *) = 0;
- virtual void visitPost(DocDiaFile *) = 0;
- virtual void visitPre(DocLink *) = 0;
- virtual void visitPost(DocLink *) = 0;
- virtual void visitPre(DocRef *) = 0;
- virtual void visitPost(DocRef *) = 0;
- virtual void visitPre(DocSecRefItem *) = 0;
- virtual void visitPost(DocSecRefItem *) = 0;
- virtual void visitPre(DocSecRefList *) = 0;
- virtual void visitPost(DocSecRefList *) = 0;
- virtual void visitPre(DocParamSect *) = 0;
- virtual void visitPost(DocParamSect *) = 0;
- virtual void visitPre(DocParamList *) = 0;
- virtual void visitPost(DocParamList *) = 0;
- virtual void visitPre(DocXRefItem *) = 0;
- virtual void visitPost(DocXRefItem *) = 0;
- virtual void visitPre(DocInternalRef *) = 0;
- virtual void visitPost(DocInternalRef *) = 0;
- virtual void visitPre(DocText *) = 0;
- virtual void visitPost(DocText *) = 0;
- virtual void visitPre(DocHtmlBlockQuote *) = 0;
- virtual void visitPost(DocHtmlBlockQuote *) = 0;
- virtual void visitPre(DocVhdlFlow *) = 0;
- virtual void visitPost(DocVhdlFlow *) = 0;
- virtual void visitPre(DocParBlock *) = 0;
- virtual void visitPost(DocParBlock *) = 0;
- /*! @} */
-};
#endif
#include <cassert>
#include <sstream>
#include <algorithm>
+#include <mutex>
#include "config.h"
#include "dot.h"
static QCString g_dotFontPath;
+static std::mutex g_dotManagerMutex;
+
static void setDotFontPath(const QCString &path)
{
ASSERT(g_dotFontPath.isEmpty());
//--------------------------------------------------------------------
-DotManager *DotManager::m_theInstance = 0;
-
DotManager *DotManager::instance()
{
- if (!m_theInstance)
- {
- m_theInstance = new DotManager;
- }
- return m_theInstance;
-}
-
-void DotManager::deleteInstance()
-{
- delete m_theInstance;
- m_theInstance=0;
+ static DotManager theInstance;
+ return &theInstance;
}
DotManager::DotManager() : m_runners(), m_filePatchers()
{
for (i=0;i<dotNumThreads;i++)
{
- std::unique_ptr<DotWorkerThread> thread = std::make_unique<DotWorkerThread>(m_queue);
+ DotWorkerThreadPtr thread(new DotWorkerThread(m_queue));
thread->start();
if (thread->isRunning())
{
DotManager::~DotManager()
{
- delete m_queue;
+ if (!Doxygen::terminating) delete m_queue;
}
DotRunner* DotManager::createRunner(const QCString &absDotName, const QCString& md5Hash)
{
+ std::lock_guard<std::mutex> lock(g_dotManagerMutex);
DotRunner* rv = nullptr;
auto const runit = m_runners.find(absDotName.str());
if (runit == m_runners.end())
DotFilePatcher *DotManager::createFilePatcher(const QCString &fileName)
{
+ std::lock_guard<std::mutex> lock(g_dotManagerMutex);
auto patcher = m_filePatchers.find(fileName.str());
if (patcher != m_filePatchers.end()) return &(patcher->second);
}
QCString imgExt = getDotImageExtension();
- QCString imgName = (QCString)outFile+"."+imgExt;
+ QCString imgName = QCString(outFile)+"."+imgExt;
QCString absImgName = QCString(d.absPath())+"/"+imgName;
QCString absOutFile = QCString(d.absPath())+"/"+outFile;
#include "dotgraph.h" // only for GraphOutputFormat
#include "dotfilepatcher.h"
#include "dotrunner.h"
+#include "doxygen.h"
class DotRunner;
class DotRunnerQueue;
class TextStream;
+using DotWorkerThreadPtr = std::unique_ptr< DotWorkerThread, NonTerminatingDeleter<DotWorkerThread > >;
+
/** Singleton that manages parallel dot invocations and patching files for embedding image maps */
class DotManager
{
public:
static DotManager *instance();
- static void deleteInstance();
+ //static void deleteInstance();
DotRunner* createRunner(const QCString& absDotName, const QCString& md5Hash);
DotFilePatcher *createFilePatcher(const QCString &fileName);
bool run() const;
DotManager();
virtual ~DotManager();
- std::map<std::string, std::unique_ptr<DotRunner>> m_runners;
- std::map<std::string, DotFilePatcher> m_filePatchers;
- static DotManager *m_theInstance;
- DotRunnerQueue *m_queue;
- std::vector< std::unique_ptr<DotWorkerThread> > m_workers;
+ std::map<std::string, std::unique_ptr<DotRunner> > m_runners;
+ std::map<std::string, DotFilePatcher> m_filePatchers;
+ DotRunnerQueue *m_queue;
+ std::vector< DotWorkerThreadPtr > m_workers;
};
void writeDotGraphFromFile(const QCString &inFile,const QCString &outDir,
const QCString &relPath,bool generateImageMap,
int graphId)
{
+ m_doNotAddImageToIndex = textFormat!=EOF_Html;
+
return DotGraph::writeGraph(out, graphFormat, textFormat, path, fileName, relPath, generateImageMap, graphId);
}
int DotCallGraph::numNodes() const
{
- return (int)m_startNode->children().size();
+ return static_cast<int>(m_startNode->children().size());
}
bool DotCallGraph::isTrivial(const MemberDef *md,bool inverse)
{
DotNodeDeque childQueue;
DotNodeDeque parentQueue;
- IntVector childTreeWidth;
- IntVector parentTreeWidth;
+ std::vector<size_t> childTreeWidth;
+ std::vector<size_t> parentTreeWidth;
childQueue.push_back(rootNode);
if (includeParents) parentQueue.push_back(rootNode);
bool firstNode=TRUE; // flag to force reprocessing rootNode in the parent loop
{
DotNode *n = childQueue.front();
childQueue.pop_front();
- int distance = n->distance();
- if (!n->isVisible() && distance<=Config_getInt(MAX_DOT_GRAPH_DEPTH)) // not yet processed
+ size_t distance = n->distance();
+ if (!n->isVisible() && distance<=static_cast<size_t>(Config_getInt(MAX_DOT_GRAPH_DEPTH))) // not yet processed
{
if (distance>0)
{
- int oldSize=(int)childTreeWidth.size();
+ size_t oldSize=childTreeWidth.size();
if (distance>oldSize)
{
- childTreeWidth.resize(std::max(childTreeWidth.size(),(size_t)distance));
- int i; for (i=oldSize;i<distance;i++) childTreeWidth[i]=0;
+ childTreeWidth.resize(std::max(childTreeWidth.size(),distance));
+ for (size_t i=oldSize;i<distance;i++) childTreeWidth[i]=0;
}
childTreeWidth[distance-1]+=n->label().length();
}
if ((!n->isVisible() || firstNode) && n->distance()<=Config_getInt(MAX_DOT_GRAPH_DEPTH)) // not yet processed
{
firstNode=FALSE;
- int distance = n->distance();
+ size_t distance = n->distance();
if (distance>0)
{
- int oldSize = (int)parentTreeWidth.size();
+ size_t oldSize = parentTreeWidth.size();
if (distance>oldSize)
{
- parentTreeWidth.resize(std::max(parentTreeWidth.size(),(size_t)distance));
- int i; for (i=oldSize;i<distance;i++) parentTreeWidth[i]=0;
+ parentTreeWidth.resize(std::max(parentTreeWidth.size(),distance));
+ for (size_t i=oldSize;i<distance;i++) parentTreeWidth[i]=0;
}
parentTreeWidth[distance-1]+=n->label().length();
}
}
}
if (Config_getBool(UML_LOOK)) return FALSE; // UML graph are always top to bottom
- int maxWidth=0;
- int maxHeight=(int)std::max(childTreeWidth.size(),parentTreeWidth.size());
- uint i;
- for (i=0;i<childTreeWidth.size();i++)
+ size_t maxWidth=0;
+ size_t maxHeight=std::max(childTreeWidth.size(),parentTreeWidth.size());
+ for (size_t i=0;i<childTreeWidth.size();i++)
{
if (childTreeWidth.at(i)>maxWidth) maxWidth=childTreeWidth.at(i);
}
- for (i=0;i<parentTreeWidth.size();i++)
+ for (size_t i=0;i<parentTreeWidth.size();i++)
{
if (parentTreeWidth.at(i)>maxWidth) maxWidth=parentTreeWidth.at(i);
}
int DotClassGraph::numNodes() const
{
- int numNodes = 0;
- numNodes+= (int)m_startNode->children().size();
+ size_t numNodes = 0;
+ numNodes+= m_startNode->children().size();
if (m_graphType==Inheritance)
{
- numNodes+= (int)m_startNode->parents().size();
+ numNodes+= m_startNode->parents().size();
}
- return numNodes;
+ return static_cast<int>(numNodes);
}
DotClassGraph::~DotClassGraph()
/** Returns a DOT color name according to the directory depth. */
static QCString getDirectoryBackgroundColor(int depthIndex)
{
- static int hue = Config_getInt(HTML_COLORSTYLE_HUE);
- static int sat = Config_getInt(HTML_COLORSTYLE_SAT);
- static int gamma = Config_getInt(HTML_COLORSTYLE_GAMMA);
+ int hue = Config_getInt(HTML_COLORSTYLE_HUE);
+ int sat = Config_getInt(HTML_COLORSTYLE_SAT);
+ int gamma = Config_getInt(HTML_COLORSTYLE_GAMMA);
assert(depthIndex>=0 && depthIndex<=Config_getInt(DIR_GRAPH_MAX_DEPTH));
- float fraction = (float)depthIndex/(float)Config_getInt(DIR_GRAPH_MAX_DEPTH);
+ float fraction = static_cast<float>(depthIndex)/static_cast<float>(Config_getInt(DIR_GRAPH_MAX_DEPTH));
const char hex[] = "0123456789abcdef";
int range = 0x40; // range from darkest color to lightest color
- int luma = 0xef-(int)(fraction*range); // interpolation
+ int luma = 0xef-static_cast<int>(fraction*range); // interpolation
double r,g,b;
ColoredImage::hsl2rgb(hue/360.0,sat/255.0,
pow(luma/255.0,gamma/100.0),&r,&g,&b);
- int red = (int)(r*255.0);
- int green = (int)(g*255.0);
- int blue = (int)(b*255.0);
+ int red = static_cast<int>(r*255.0);
+ int green = static_cast<int>(g*255.0);
+ int blue = static_cast<int>(b*255.0);
assert(red>=0 && red<=255);
assert(green>=0 && green<=255);
assert(blue>=0 && blue<=255);
size_t nrefs = udir->filePairs().size();
t << " " << dir->getOutputFileBase() << "->"
<< usedDir->getOutputFileBase();
- t << " [headlabel=\"" << (uint)nrefs << "\", labeldistance=1.5";
+ t << " [headlabel=\"" << nrefs << "\", labeldistance=1.5";
if (linkRelations)
{
t << " headhref=\"" << addHtmlExtensionIfMissing(relationName) << "\"";
#include "config.h"
#include "message.h"
#include "docparser.h"
+#include "docnode.h"
#include "doxygen.h"
#include "util.h"
#include "dot.h"
{
result=href+"=\"";
// fake ref node to resolve the url
- std::unique_ptr<IDocParser> parser { createDocParser() };
- std::unique_ptr<DocRef> df { createRef( *parser.get(), link.mid(5), context ) };
+ auto parser { createDocParser() };
+ auto dfAst { createRef( *parser.get(), link.mid(5), context ) };
+ auto dfAstImpl = dynamic_cast<const DocNodeAST*>(dfAst.get());
+ const DocRef *df = std::get_if<DocRef>(&dfAstImpl->root);
result+=externalRef(relPath,df->ref(),TRUE);
if (!df->file().isEmpty())
result += addHtmlExtensionIfMissing(df->file());
int DotFilePatcher::addMap(const QCString &mapFile,const QCString &relPath,
bool urlOnly,const QCString &context,const QCString &label)
{
- int id = (int)m_maps.size();
+ size_t id = m_maps.size();
m_maps.emplace_back(mapFile,relPath,urlOnly,context,label);
- return id;
+ return static_cast<int>(id);
}
int DotFilePatcher::addFigure(const QCString &baseName,
const QCString &figureName,bool heightCheck)
{
- int id = (int)m_maps.size();
+ size_t id = m_maps.size();
m_maps.emplace_back(figureName,"",heightCheck,"",baseName);
- return id;
+ return static_cast<int>(id);
}
int DotFilePatcher::addSVGConversion(const QCString &relPath,bool urlOnly,
const QCString &context,bool zoomable,
int graphId)
{
- int id = (int)m_maps.size();
+ size_t id = m_maps.size();
m_maps.emplace_back("",relPath,urlOnly,context,"",zoomable,graphId);
- return id;
+ return static_cast<int>(id);
}
int DotFilePatcher::addSVGObject(const QCString &baseName,
const QCString &absImgName,
const QCString &relPath)
{
- int id = (int)m_maps.size();
+ size_t id = m_maps.size();
m_maps.emplace_back(absImgName,relPath,false,"",baseName);
- return id;
+ return static_cast<int>(id);
}
bool DotFilePatcher::run() const
int mapId=-1;
t << line.left(i);
int n = sscanf(line.data()+i+1,"!-- SVG %d",&mapId);
- if (n==1 && mapId>=0 && mapId<(int)m_maps.size())
+ if (n==1 && mapId>=0 && mapId<static_cast<int>(m_maps.size()))
{
int e = std::max(line.find("--]"),line.find("-->"));
const Map &map = m_maps.at(mapId);
int mapId=-1;
t << line.left(i);
int n = sscanf(line.data()+i,"<!-- MAP %d",&mapId);
- if (n==1 && mapId>=0 && mapId<(int)m_maps.size())
+ if (n==1 && mapId>=0 && mapId<static_cast<int>(m_maps.size()))
{
TextStream tt;
const Map &map = m_maps.at(mapId);
int mapId=-1;
int n = sscanf(line.data()+i+2,"FIG %d",&mapId);
//printf("line='%s' n=%d\n",qPrint(line)+i,n);
- if (n==1 && mapId>=0 && mapId<(int)m_maps.size())
+ if (n==1 && mapId>=0 && mapId<static_cast<int>(m_maps.size()))
{
const Map &map = m_maps.at(mapId);
//printf("patching FIG %d in file %s with contents of %s\n",
{
//printf("Trying %s subClasses=%d\n",qPrint(cd->name()),cd->subClasses()->count());
if (cd->getLanguage()==SrcLangExt_VHDL &&
- (VhdlDocGen::VhdlClasses)cd->protection()!=VhdlDocGen::ENTITYCLASS
+ VhdlDocGen::convert(cd->protection())!=VhdlDocGen::ENTITYCLASS
)
{
continue;
*/
#include <sstream>
+#include <mutex>
#include "config.h"
#include "doxygen.h"
("." + getDotImageExtension()) : (Config_getBool(USE_PDFLATEX) ? ".pdf" : ".eps"));
}
+std::mutex g_dotIndexListMutex;
+
QCString DotGraph::writeGraph(
TextStream& t, // output stream for the code file (html, ...)
GraphOutputFormat gf, // bitmap(png/svg) or ps(eps/pdf)
m_regenerate = prepareDotFile();
- if (!m_doNotAddImageToIndex) Doxygen::indexList->addImageFile(imgName());
+ if (!m_doNotAddImageToIndex)
+ {
+ std::lock_guard<std::mutex> lock(g_dotIndexListMutex);
+ Doxygen::indexList->addImageFile(imgName());
+ }
generateCode(t);
char sigStr[33];
uchar md5_sig[16];
// calculate md5
- MD5Buffer((const unsigned char*)m_theGraph.data(), m_theGraph.length(), md5_sig);
+ MD5Buffer(m_theGraph.data(), m_theGraph.length(), md5_sig);
// convert result to a string
MD5SigToString(md5_sig, sigStr);
public:
DotGraph() : m_doNotAddImageToIndex(FALSE), m_noDivTag(FALSE),
m_zoomable(TRUE), m_urlOnly(FALSE) {}
- virtual ~DotGraph() {}
+ virtual ~DotGraph() = default;
protected:
/** returns node numbers. The Counter is reset by the constructor */
const QCString &path, const QCString &fileName, const QCString &relPath,
bool generateImageMap,int graphId)
{
- m_doNotAddImageToIndex = TRUE;
+ m_doNotAddImageToIndex = textFormat!=EOF_Html;
return DotGraph::writeGraph(t, graphFormat, textFormat, path, fileName, relPath, generateImageMap, graphId);
}
}
switch( eType )
{
- case thierarchy:
- arrowStyle = "dir=\"back\", style=\"solid\"";
- break;
- default:
- t << ", color=\"" << linkTypeColor[(int)eType] << "\"";
- break;
+ case thierarchy:
+ arrowStyle = "dir=\"back\", style=\"solid\"";
+ break;
+ default:
+ t << ", color=\"" << linkTypeColor[static_cast<int>(eType)] << "\"";
+ break;
}
t << ", " << arrowStyle;
t << "];\n";
int DotInclDepGraph::numNodes() const
{
- return (int)m_startNode->children().size();
+ return static_cast<int>(m_startNode->children().size());
}
void DotInclDepGraph::writeXML(TextStream &t)
}
int count=0;
- static auto dotUmlDetails = Config_getEnum(DOT_UML_DETAILS);
+ auto dotUmlDetails = Config_getEnum(DOT_UML_DETAILS);
for (const auto &mma : *ml)
{
if (mma->getClassDef() == scope &&
{
if (!ei.label().isEmpty()) // labels joined by \n
{
- int i=ei.label().find('\n');
+ int i;
int p=0;
QCString lab;
while ((i=ei.label().find('\n',p))!=-1)
//printf("DotNode::writeBox for %s\n",qPrint(m_classDef->name()));
t << "{" << convertLabel(m_label) << "\\n";
- static auto dotUmlDetails = Config_getEnum(DOT_UML_DETAILS);
+ auto dotUmlDetails = Config_getEnum(DOT_UML_DETAILS);
if (dotUmlDetails!=DOT_UML_DETAILS_t::NONE)
{
t << "|";
}
if (!m_url.isEmpty())
{
- int anchorPos = m_url.findRev('#');
+ int tagPos = m_url.findRev('$');
+ t << ",URL=\"";
+ QCString noTagURL = m_url;
+ if (tagPos!=-1)
+ {
+ t << m_url.left(tagPos);
+ noTagURL = m_url.mid(tagPos);
+ }
+ int anchorPos = noTagURL.findRev('#');
if (anchorPos==-1)
{
- t << ",URL=\"" << addHtmlExtensionIfMissing(m_url) << "\"";
+ t << addHtmlExtensionIfMissing(noTagURL) << "\"";
}
else
{
- t << ",URL=\"" << addHtmlExtensionIfMissing(m_url.left(anchorPos))
- << m_url.right(m_url.length()-anchorPos) << "\"";
+ t << addHtmlExtensionIfMissing(noTagURL.left(anchorPos))
+ << noTagURL.right(noTagURL.length()-anchorPos) << "\"";
}
}
}
#include "message.h"
#include "config.h"
#include "dir.h"
+#include "doxygen.h"
// the graphicx LaTeX has a limitation of maximum size of 16384
// To be on the save side we take it a little bit smaller i.e. 150 inch * 72 dpi
bool DotRunner::readBoundingBox(const QCString &fileName,int *width,int *height,bool isEps)
{
const char *bb = isEps ? "%%PageBoundingBox:" : "/MediaBox [";
- int bblen = (int)strlen(bb);
+ size_t bblen = strlen(bb);
FILE *f = Portable::fopen(fileName,"rb");
if (!f)
{
DotRunner::DotRunner(const QCString& absDotName, const QCString& md5Hash)
: m_file(absDotName)
, m_md5Hash(md5Hash)
- , m_dotExe(Config_getString(DOT_PATH)+"dot")
+ , m_dotExe(Doxygen::verifiedDotPath)
, m_cleanUp(Config_getBool(DOT_CLEANUP))
{
}
return;
}
auto args = QCString("-T") + format + " -o \"" + output + "\"";
- m_jobs.emplace_back(format.str(), output, args, srcFile, srcLine);
+ m_jobs.emplace_back(format, output, args, srcFile, srcLine);
}
QCString getBaseNameOfOutput(const QCString &output)
~DotWorkerThread();
void run();
void start();
- bool isRunning() { return m_thread && m_thread->joinable(); }
+ bool isRunning() const { return m_thread && m_thread->joinable(); }
void wait() { m_thread->join(); }
private:
std::unique_ptr<std::thread> m_thread;
#include "commentcnv.h"
#include "cmdmapper.h"
#include "searchindex.h"
+#include "searchindex_js.h"
#include "parserintf.h"
#include "htags.h"
#include "pycode.h"
bool Doxygen::generatingXmlOutput = FALSE;
DefinesPerFileList Doxygen::macroDefinitions;
bool Doxygen::clangAssistedParsing = FALSE;
+QCString Doxygen::verifiedDotPath;
+volatile bool Doxygen::terminating = false;
// locally accessible globals
static std::multimap< std::string, const Entry* > g_classEntries;
fullName,sec,tagName,refFileName,TRUE,root->spec&Entry::Enum) )));
if (cd)
{
- Debug::print(Debug::Classes,0," New class '%s' (sec=0x%08x)! #tArgLists=%d tagInfo=%p hidden=%d artificial=%d\n",
+ Debug::print(Debug::Classes,0," New class '%s' (sec=0x%08x)! #tArgLists=%zu tagInfo=%p hidden=%d artificial=%d\n",
qPrint(fullName),sec,root->tArgLists.size(), tagInfo,root->hidden,root->artificial);
cd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition
cd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
qualifiedName,tagName,refFileName))));
if (cd)
{
- Debug::print(Debug::Classes,0," New concept '%s' #tArgLists=%d tagInfo=%p\n",
+ Debug::print(Debug::Classes,0," New concept '%s' #tArgLists=%zu tagInfo=%p\n",
qPrint(qualifiedName),root->tArgLists.size(),tagInfo);
cd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition
cd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
void distributeClassGroupRelations()
{
- //static bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
+ //bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
//if (!inlineGroupedClasses) return;
//printf("** distributeClassGroupRelations()\n");
//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",
+ Debug::print(Debug::Classes,0," New using class '%s' (sec=0x%08x)! #tArgLists=%zu\n",
qPrint(name),root->section,root->tArgLists.size());
usingCd = toClassDefMutable(
Doxygen::hiddenClassLinkedMap->add(name,
!(bb<i && i<be) // bug665855: avoid treating "typedef A<void (T*)> type" as a function pointer
)
{
- if (pLength) *pLength=(int)l;
+ if (pLength) *pLength=static_cast<int>(l);
//printf("findFunctionPtr=%d\n",(int)i);
- return (int)i;
+ return static_cast<int>(i);
}
else
{
static void addVariable(const Entry *root,int isFuncPtr=-1)
{
- static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
+ bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
Debug::print(Debug::Variables,0,
"VARIABLE_SEC: \n"
//int anonyScopes = 0;
//bool added=FALSE;
- static bool inlineSimpleStructs = Config_getBool(INLINE_SIMPLE_STRUCTS);
+ bool inlineSimpleStructs = Config_getBool(INLINE_SIMPLE_STRUCTS);
if (si!=-1 && !inlineSimpleStructs) // anonymous scope or type
{
QCString pScope;
{
Debug::print(Debug::Functions,0,
"EXPORTED_INTERFACE_SEC:\n"
- " '%s' '%s'::'%s' '%s' relates='%s' relatesType='%d' file='%s' line='%d' bodyLine='%d' #tArgLists=%d mGrpId=%d spec=%lld proto=%d docFile=%s\n",
+ " '%s' '%s'::'%s' '%s' relates='%s' relatesType='%d' file='%s' line='%d' bodyLine='%d' #tArgLists=%zu mGrpId=%d spec=%lld proto=%d docFile=%s\n",
qPrint(root->type),
qPrint(root->parent()->name),
qPrint(root->name),
scope+=sep;
}
+ if (Config_getBool(HIDE_SCOPE_NAMES)) scope = "";
QCString def;
//QCString optArgs = root->argList.empty() ? QCString() : root->args;
if (!root->type.isEmpty())
{
Debug::print(Debug::Functions,0,
"FUNCTION_SEC:\n"
- " '%s' '%s'::'%s' '%s' relates='%s' relatesType='%d' file='%s' line='%d' bodyLine='%d' #tArgLists=%d mGrpId=%d spec=%lld proto=%d docFile=%s\n",
+ " '%s' '%s'::'%s' '%s' relates='%s' relatesType='%d' file='%s' line='%d' bodyLine='%d' #tArgLists=%zu mGrpId=%d spec=%lld proto=%d docFile=%s\n",
qPrint(root->type),
qPrint(root->parent()->name),
qPrint(root->name),
if (
matchArguments2(md->getOuterScope(),mfd,&mdAl,
rnd ? rnd : Doxygen::globalScope,rfd,&root->argList,
- FALSE) &&
+ FALSE,root->lang) &&
sameNumTemplateArgs &&
matchingReturnTypes &&
sameRequiresClause &&
(mmd->isFriend() || (mmd->isRelated() && mmd->isFunction())) &&
matchArguments2(mmd->getOuterScope(), mmd->getFileDef(), &mmd->argumentList(),
fmd->getOuterScope(), fmd->getFileDef(), &fmd->argumentList(),
- TRUE
+ TRUE,mmd->getLanguage()
)
) // if the member is related and the arguments match then the
if (
matchArguments2(mdef->getOuterScope(),mdef->getFileDef(),const_cast<ArgumentList*>(&mdefAl),
mdec->getOuterScope(),mdec->getFileDef(),const_cast<ArgumentList*>(&mdecAl),
- TRUE
+ TRUE,mdef->getLanguage()
)
) /* match found */
{
(rmd->isRelated() || rmd->isForeign()) && // related function
matchArguments2( md->getOuterScope(), md->getFileDef(), &md->argumentList(),
rmd->getOuterScope(),rmd->getFileDef(),&rmd->argumentList(),
- TRUE
+ TRUE,md->getLanguage()
)
)
{
{
//printf(" Found variable %s in class %s\n",qPrint(md->name()),qPrint(masterCd->name()));
QCString type = normalizeNonTemplateArgumentsInString(md->typeString(),masterCd,formalArgs);
- QCString typedefValue = resolveTypeDef(masterCd,type);
+ QCString typedefValue = md->getLanguage()==SrcLangExt_Java ? type : resolveTypeDef(masterCd,type);
if (!typedefValue.isEmpty())
{
type = typedefValue;
}
}
bool isATemplateArgument = templateNames.find(biName.str())!=templateNames.end();
- // make templSpec canonical
- // warning: the following line doesn't work for Mixin classes (see bug 560623)
- // templSpec = getCanonicalTemplateSpec(cd, cd->getFileDef(), templSpec);
//printf("4. found=%d\n",found);
if (found)
TemplateNameMap actualTemplateNames;
for (const auto &tn_kv : templateNames)
{
- int templIndex = tn_kv.second;
+ size_t templIndex = tn_kv.second;
Argument actArg;
bool hasActArg=FALSE;
- if (templIndex<(int)templArgs->size())
+ if (templIndex<templArgs->size())
{
actArg=templArgs->at(templIndex);
hasActArg=TRUE;
actualTemplateNames.find(actArg.type.str())==actualTemplateNames.end()
)
{
- actualTemplateNames.insert(std::make_pair(actArg.type.str(),templIndex));
+ actualTemplateNames.insert(std::make_pair(actArg.type.str(),static_cast<int>(templIndex)));
}
}
if (
matchArguments2( md->getOuterScope(), md->getFileDef(),const_cast<ArgumentList*>(&mdAl),
rscope,rfd,&root->argList,
- TRUE
+ TRUE, root->lang
)
)
{
md->isVariable() || md->isTypedef() || /* in case of function pointers */
matchArguments2(md->getOuterScope(),const_cast<const MemberDef *>(md.get())->getFileDef(),&mdAl,
rnd ? rnd : Doxygen::globalScope,fd,&root->argList,
- FALSE);
+ FALSE,root->lang);
// for template members we need to check if the number of
// template arguments is the same, otherwise we are dealing with
{
warnMsg+=" '";
warnMsg+=substitute(md->declaration(),"%","%%");
- warnMsg+="' at line "+QCString().setNum(md->getDefLine())+
- " of file "+md->getDefFileName()+"\n";
+ warnMsg+="' " + warn_line(md->getDefFileName(),md->getDefLine());
}
}
warn(root->fileName,root->startLine, "%s", qPrint(warnMsg));
matchArguments2(
md->getClassDef(),md->getFileDef(),&argList,
cd,fd,&root->argList,
- TRUE);
+ TRUE,root->lang);
if (md->getLanguage()==SrcLangExt_ObjC && md->isVariable() && (root->section&Entry::FUNCTION_SEC))
{
memType=substitute(stripTemplateSpecifiersFromScope(memType,TRUE),
className+"::",""); // see bug758900
Debug::print(Debug::FindMembers,0,
- "5b. Comparing return types '%s'<->'%s' #args %d<->%d\n",
+ "5b. Comparing return types '%s'<->'%s' #args %zu<->%zu\n",
qPrint(md->typeString()),qPrint(funcType),
md->templateArguments().size(),root->tArgLists.back().size());
if (md->templateArguments().size()!=root->tArgLists.back().size() || memType!=funcType)
root->protection,root->stat,root->virt,spec,relates);
return;
}
- if (md->argsString()==argListToString(root->argList,FALSE,FALSE))
+ if (argListToString(md->argumentList(),FALSE,FALSE) ==
+ argListToString(root->argList,FALSE,FALSE))
{ // exact argument list match -> remember
ucd = ecd = ccd;
umd = emd = cmd;
candidates++;
}
}
- static bool strictProtoMatching = Config_getBool(STRICT_PROTO_MATCHING);
+ bool strictProtoMatching = Config_getBool(STRICT_PROTO_MATCHING);
if (!strictProtoMatching)
{
if (candidates==1 && ucd && umd)
warnMsg+=fullFuncDecl;
warnMsg+='\n';
- if (candidates>0)
+ if (candidates>0 || noMatchCount>=1)
{
warnMsg+="Possible candidates:\n";
+
+ NamespaceDef *nd=0;
+ if (!namespaceName.isEmpty()) nd=getResolvedNamespace(namespaceName);
+ FileDef *fd=root->fileDef();
+
for (const auto &md : *mn)
{
const ClassDef *cd=md->getClassDef();
- if (cd!=0 && rightScopeMatch(cd->name(),className))
+ const ClassDef *tcd=findClassDefinition(fd,nd,scopeName);
+ if (tcd==0 && cd && stripAnonymousNamespaceScope(cd->name())==scopeName)
+ {
+ // don't be fooled by anonymous scopes
+ tcd=cd;
+ }
+ if (cd!=0 && (rightScopeMatch(cd->name(),className) || (cd!=tcd)))
{
const ArgumentList &templAl = md->templateArguments();
warnMsg+=" '";
if (!qScope.isEmpty())
warnMsg+=qScope+"::"+md->name();
warnMsg+=md->argsString();
- if (noMatchCount>1)
- {
- warnMsg+="' at line "+QCString().setNum(md->getDefLine()) +
- " of file "+md->getDefFileName();
- }
- else
- warnMsg += "'";
-
+ warnMsg+="' " + warn_line(md->getDefFileName(),md->getDefLine());
warnMsg+='\n';
}
}
{
Debug::print(Debug::FindMembers,0,
"findMember(root=%p,funcDecl='%s',related='%s',overload=%d,"
- "isFunc=%d mGrpId=%d #tArgList=%d "
+ "isFunc=%d mGrpId=%d #tArgList=%zu "
"spec=%lld lang=%x\n",
root,qPrint(funcDecl),qPrint(relates),overloaded,isFunc,root->mGrpId,
root->tArgLists.size(),
if (!isRelated && !strongEnum && mn) // function name already found
{
Debug::print(Debug::FindMembers,0,
- "2. member name exists (%d members with this name)\n",mn->size());
+ "2. member name exists (%zu members with this name)\n",mn->size());
if (!className.isEmpty()) // class name is valid
{
if (funcSpec.isEmpty()) // not a member specialization
className!=rmd->getOuterScope()->name() ||
!matchArguments2(rmd->getOuterScope(),rmd->getFileDef(),&rmdAl,
cd,fd,&root->argList,
- TRUE);
+ TRUE,root->lang);
if (!newMember)
{
rmd_found = rmd;
if (
matchArguments2(rmd->getOuterScope(),rmd->getFileDef(),&rmdAl,
cd,fd,&root->argList,
- TRUE)
+ TRUE,root->lang)
)
{
found=TRUE;
// qPrint(fmd->name()),qPrint(fmd->getOuterScope()->name()));
if (nd && !nd->isAnonymous())
{
- const NamespaceDef *fnd=fmd->getNamespaceDef();
- if (fnd==nd) // enum value is inside a namespace
+ if (!fmd->isStrongEnumValue()) // only non strong enum values can be globally added
{
- md->insertEnumField(fmd);
- fmd->setEnumScope(md);
+ const NamespaceDef *fnd=fmd->getNamespaceDef();
+ if (fnd==nd) // enum value is inside a namespace
+ {
+ md->insertEnumField(fmd);
+ fmd->setEnumScope(md);
+ }
}
}
else if (isGlobal)
{
- const FileDef *ffd=fmd->getFileDef();
- if (ffd==fd) // enum value has file scope
+ if (!fmd->isStrongEnumValue()) // only non strong enum values can be globally added
{
- md->insertEnumField(fmd);
- fmd->setEnumScope(md);
+ const FileDef *ffd=fmd->getFileDef();
+ if (ffd==fd) // enum value has file scope
+ {
+ md->insertEnumField(fmd);
+ fmd->setEnumScope(md);
+ }
}
}
else if (isRelated && cd) // reparent enum value to
}
else
{
- const ClassDef *fcd=fmd->getClassDef();
- if (fcd==cd) // enum value is inside a class
+ if (!fmd->isStrongEnumValue()) // only non strong enum values can be globally added
{
- //printf("Inserting enum field %s in enum scope %s\n",
- // qPrint(fmd->name()),qPrint(md->name()));
- md->insertEnumField(fmd); // add field def to list
- fmd->setEnumScope(md); // cross ref with enum name
+ const ClassDef *fcd=fmd->getClassDef();
+ if (fcd==cd) // enum value is inside a class
+ {
+ //printf("Inserting enum field %s in enum scope %s\n",
+ // qPrint(fmd->name()),qPrint(md->name()));
+ md->insertEnumField(fmd); // add field def to list
+ fmd->setEnumScope(md); // cross ref with enum name
+ }
}
}
}
{
if (pd->isLinkableInProject())
{
- Doxygen::indexList->addIndexItem(pd.get(),0,QCString(),filterTitle(pd->title().str()));
+ Doxygen::indexList->addIndexItem(pd.get(),0,QCString(),filterTitle(pd->title()));
}
}
bmd->getLanguage()==SrcLangExt_Python ||
matchArguments2(bmd->getOuterScope(),bmd->getFileDef(),&bmdAl,
md->getOuterScope(), md->getFileDef(), &mdAl,
- TRUE
+ TRUE,bmd->getLanguage()
)
)
{
static void generateFileSources()
{
+ auto processSourceFile = [](FileDef *fd,OutputList &ol,ClangTUParser *parser)
+ {
+ bool showSources = fd->generateSourceFile() && !Htags::useHtags && !g_useOutputTemplate; // sources need to be shown in the output
+ bool parseSources = !fd->isReference() && Doxygen::parseSourcesNeeded; // we needed to parse the sources even if we do not show them
+ if (showSources)
+ {
+ msg("Generating code for file %s...\n",qPrint(fd->docName()));
+ fd->writeSourceHeader(ol);
+ fd->writeSourceBody(ol,parser);
+ fd->writeSourceFooter(ol);
+ }
+ else if (parseSources)
+ {
+ msg("Parsing code for file %s...\n",qPrint(fd->docName()));
+ fd->parseSource(parser);
+ }
+ ol.indexSearchData();
+ };
if (!Doxygen::inputNameLinkedMap->empty())
{
#if USE_LIBCLANG
{
for (const auto &fd : *fn)
{
- if (fd->isSource() && !fd->isReference() &&
+ if (fd->isSource() && !fd->isReference() && fd->getLanguage()==SrcLangExt_Cpp &&
((fd->generateSourceFile() && !g_useOutputTemplate) ||
(!fd->isReference() && Doxygen::parseSourcesNeeded)
)
)
{
auto clangParser = ClangParser::instance()->createTUParser(fd.get());
- if (fd->generateSourceFile() && !g_useOutputTemplate) // sources need to be shown in the output
- {
- msg("Generating code for file %s...\n",qPrint(fd->docName()));
- clangParser->parse();
- fd->writeSourceHeader(*g_outputList);
- fd->writeSourceBody(*g_outputList,clangParser.get());
- fd->writeSourceFooter(*g_outputList);
- }
- else if (!fd->isReference() && Doxygen::parseSourcesNeeded)
- // we needed to parse the sources even if we do not show them
- {
- msg("Parsing code for file %s...\n",qPrint(fd->docName()));
- clangParser->parse();
- fd->parseSource(clangParser.get());
- }
+ clangParser->parse();
+ processSourceFile(fd.get(),*g_outputList,clangParser.get());
for (auto incFile : clangParser->filesInSameTU())
{
FileDef *ifd=findFileDef(Doxygen::inputNameLinkedMap,incFile.c_str(),ambig);
if (ifd && !ifd->isReference())
{
- if (ifd->generateSourceFile() && !g_useOutputTemplate) // sources need to be shown in the output
- {
- msg(" Generating code for file %s...\n",qPrint(ifd->docName()));
- ifd->writeSourceHeader(*g_outputList);
- ifd->writeSourceBody(*g_outputList,clangParser.get());
- ifd->writeSourceFooter(*g_outputList);
- }
- else if (!ifd->isReference() && Doxygen::parseSourcesNeeded)
- // we needed to parse the sources even if we do not show them
- {
- msg(" Parsing code for file %s...\n",qPrint(ifd->docName()));
- ifd->parseSource(clangParser.get());
- }
+ processSourceFile(ifd,*g_outputList,clangParser.get());
processedFiles.insert(incFile);
}
}
{
if (processedFiles.find(fd->absFilePath().str())==processedFiles.end()) // not yet processed
{
- if (fd->generateSourceFile() && !Htags::useHtags && !g_useOutputTemplate) // sources need to be shown in the output
+ if (fd->getLanguage()==SrcLangExt_Cpp) // C/C++ file, use clang parser
{
auto clangParser = ClangParser::instance()->createTUParser(fd.get());
- msg("Generating code for file %s...\n",qPrint(fd->docName()));
clangParser->parse();
- fd->writeSourceHeader(*g_outputList);
- fd->writeSourceBody(*g_outputList,clangParser.get());
- fd->writeSourceFooter(*g_outputList);
+ processSourceFile(fd.get(),*g_outputList,clangParser.get());
}
- else if (!fd->isReference() && Doxygen::parseSourcesNeeded)
- // we needed to parse the sources even if we do not show them
+ else // non C/C++ file, use built-in parser
{
- auto clangParser = ClangParser::instance()->createTUParser(fd.get());
- msg("Parsing code for file %s...\n",qPrint(fd->docName()));
- clangParser->parse();
- fd->writeSourceHeader(*g_outputList);
- fd->writeSourceBody(*g_outputList,clangParser.get());
- fd->writeSourceFooter(*g_outputList);
+ processSourceFile(fd.get(),*g_outputList,nullptr);
}
}
}
#endif
{
std::size_t numThreads = static_cast<std::size_t>(Config_getInt(NUM_PROC_THREADS));
- if (numThreads==0)
- {
- numThreads = std::thread::hardware_concurrency();
- }
if (numThreads>1)
{
msg("Generating code files using %zu threads.\n",numThreads);
{
bool generateSourceFile = fd->generateSourceFile() && !Htags::useHtags && !g_useOutputTemplate;
auto ctx = std::make_shared<SourceContext>(fd.get(),generateSourceFile,*g_outputList);
- if (generateSourceFile)
+ auto processFile = [ctx]()
{
- fd->writeSourceHeader(ctx->ol);
- }
- auto processFile = [ctx]() {
if (ctx->generateSourceFile)
{
msg("Generating code for file %s...\n",qPrint(ctx->fd->docName()));
ctx->fd->getAllIncludeFilesRecursively(filesInSameTu);
if (ctx->generateSourceFile) // sources need to be shown in the output
{
+ ctx->fd->writeSourceHeader(ctx->ol);
ctx->fd->writeSourceBody(ctx->ol,nullptr);
+ ctx->fd->writeSourceFooter(ctx->ol);
}
else if (!ctx->fd->isReference() && Doxygen::parseSourcesNeeded)
// we needed to parse the sources even if we do not show them
for (auto &f : results)
{
auto ctx = f.get();
- if (ctx->generateSourceFile)
- {
- ctx->fd->writeSourceFooter(ctx->ol);
- }
+ ctx->ol.indexSearchData();
}
}
else // single threaded version
{
StringVector filesInSameTu;
fd->getAllIncludeFilesRecursively(filesInSameTu);
- if (fd->generateSourceFile() && !Htags::useHtags && !g_useOutputTemplate) // sources need to be shown in the output
- {
- msg("Generating code for file %s...\n",qPrint(fd->docName()));
- fd->writeSourceHeader(*g_outputList);
- fd->writeSourceBody(*g_outputList,nullptr);
- fd->writeSourceFooter(*g_outputList);
- }
- else if (!fd->isReference() && Doxygen::parseSourcesNeeded)
- // we needed to parse the sources even if we do not show them
- {
- msg("Parsing code for file %s...\n",qPrint(fd->docName()));
- fd->parseSource(nullptr);
- }
+ processSourceFile(fd.get(),*g_outputList,nullptr);
}
}
}
if (!Doxygen::inputNameLinkedMap->empty())
{
std::size_t numThreads = static_cast<std::size_t>(Config_getInt(NUM_PROC_THREADS));
- if (numThreads==0)
- {
- numThreads = std::thread::hardware_concurrency();
- }
if (numThreads>1) // multi threaded processing
{
struct DocContext
static void computeTooltipTexts()
{
- for (const auto &kv : *Doxygen::symbolMap)
+ std::size_t numThreads = static_cast<std::size_t>(Config_getInt(NUM_PROC_THREADS));
+ if (numThreads>1)
+ {
+ ThreadPool threadPool(numThreads);
+ std::vector < std::future< void > > results;
+ // queue the work
+ for (const auto &kv : *Doxygen::symbolMap)
+ {
+ DefinitionMutable *dm = toDefinitionMutable(kv.second);
+ if (dm && !isSymbolHidden(toDefinition(dm)) && toDefinition(dm)->isLinkableInProject())
+ {
+ auto processTooltip = [dm]() {
+ dm->computeTooltip();
+ };
+ results.emplace_back(threadPool.queue(processTooltip));
+ }
+ }
+ // wait for the results
+ for (auto &f : results)
+ {
+ f.get();
+ }
+ }
+ else
{
- DefinitionMutable *dm = toDefinitionMutable(kv.second);
- if (dm && !isSymbolHidden(toDefinition(dm)) && toDefinition(dm)->isLinkableInProject())
+ for (const auto &kv : *Doxygen::symbolMap)
{
- dm->computeTooltip();
+ DefinitionMutable *dm = toDefinitionMutable(kv.second);
+ if (dm && !isSymbolHidden(toDefinition(dm)) && toDefinition(dm)->isLinkableInProject())
+ {
+ dm->computeTooltip();
+ }
}
}
}
//----------------------------------------------------------------------------
-// generate the documentation of all classes
+// generate the documentation for all classes
-static void generateClassList(const ClassLinkedMap &classList)
+static void generateDocsForClassList(const std::vector<ClassDefMutable*> &classList)
{
std::size_t numThreads = static_cast<std::size_t>(Config_getInt(NUM_PROC_THREADS));
- if (numThreads==0)
- {
- numThreads = std::thread::hardware_concurrency();
- }
if (numThreads>1) // multi threaded processing
{
struct DocContext
};
ThreadPool threadPool(numThreads);
std::vector< std::future< std::shared_ptr<DocContext> > > results;
- for (const auto &cdi : classList)
+ for (const auto &cd : classList)
{
- ClassDefMutable *cd=toClassDefMutable(cdi.get());
-
//printf("cd=%s getOuterScope=%p global=%p\n",qPrint(cd->name()),cd->getOuterScope(),Doxygen::globalScope);
- if (cd &&
- (cd->getOuterScope()==0 || // <-- should not happen, but can if we read an old tag file
+ if ((cd->getOuterScope()==0 || // <-- should not happen, but can if we read an old tag file
cd->getOuterScope()==Doxygen::globalScope // only look at global classes
) && !cd->isHidden() && !cd->isEmbeddedInOuterScope()
)
}
else // single threaded processing
{
- for (const auto &cdi : classList)
+ for (const auto &cd : classList)
{
- ClassDefMutable *cd=toClassDefMutable(cdi.get());
-
//printf("cd=%s getOuterScope=%p global=%p\n",qPrint(cd->name()),cd->getOuterScope(),Doxygen::globalScope);
- if (cd &&
- (cd->getOuterScope()==0 || // <-- should not happen, but can if we read an old tag file
+ if ((cd->getOuterScope()==0 || // <-- should not happen, but can if we read an old tag file
cd->getOuterScope()==Doxygen::globalScope // only look at global classes
) && !cd->isHidden() && !cd->isEmbeddedInOuterScope()
)
}
}
+static void addClassAndNestedClasses(std::vector<ClassDefMutable*> &list,ClassDefMutable *cd)
+{
+ list.push_back(cd);
+ for (const auto &innerCdi : cd->getClasses())
+ {
+ ClassDefMutable *innerCd = toClassDefMutable(innerCdi);
+ if (innerCd && innerCd->isLinkableInProject() && innerCd->templateMaster()==0 &&
+ protectionLevelVisible(innerCd->protection()) &&
+ !innerCd->isEmbeddedInOuterScope()
+ )
+ {
+ list.push_back(innerCd);
+ addClassAndNestedClasses(list,innerCd);
+ }
+ }
+}
+
static void generateClassDocs()
{
- generateClassList(*Doxygen::classLinkedMap);
- generateClassList(*Doxygen::hiddenClassLinkedMap);
+ std::vector<ClassDefMutable*> classList;
+ for (const auto &cdi : *Doxygen::classLinkedMap)
+ {
+ ClassDefMutable *cd = toClassDefMutable(cdi.get());
+ if (cd && (cd->getOuterScope()==0 ||
+ cd->getOuterScope()->definitionType()!=Definition::TypeClass))
+ {
+ addClassAndNestedClasses(classList,cd);
+ }
+ }
+ for (const auto &cdi : *Doxygen::hiddenClassLinkedMap)
+ {
+ ClassDefMutable *cd = toClassDefMutable(cdi.get());
+ if (cd && (cd->getOuterScope()==0 ||
+ cd->getOuterScope()->definitionType()!=Definition::TypeClass))
+ {
+ addClassAndNestedClasses(classList,cd);
+ }
+ }
+ generateDocsForClassList(classList);
}
//----------------------------------------------------------------------------
}
else if (!root->doc.isEmpty() || !root->brief.isEmpty()) // define not found
{
- static bool preEnabled = Config_getBool(ENABLE_PREPROCESSING);
+ bool preEnabled = Config_getBool(ENABLE_PREPROCESSING);
if (preEnabled)
{
warn(root->fileName,root->startLine,
PageDef *subPd = Doxygen::pageLinkedMap->find(bi.name);
if (pd==subPd)
{
- term("page defined at line %d of file %s with label %s is a direct "
+ term("page defined %s with label %s is a direct "
"subpage of itself! Please remove this cyclic dependency.\n",
- pd->docLine(),qPrint(pd->docFile()),qPrint(pd->name()));
+ qPrint(warn_line(pd->docFile(),pd->docLine())),qPrint(pd->name()));
}
else if (subPd)
{
{
if (ppd==pd.get())
{
- term("page defined at line %d of file %s with label %s is a subpage "
- "of itself! Please remove this cyclic dependency.\n",
- pd->docLine(),qPrint(pd->docFile()),qPrint(pd->name()));
+ term("page defined %s with label %s is a subpage "
+ "of itself! Please remove this cyclic dependency.\n",
+ qPrint(warn_line(pd->docFile(),pd->docLine())),qPrint(pd->name()));
}
ppd=ppd->getOuterScope();
}
static void generateNamespaceClassDocs(const ClassLinkedRefMap &classList)
{
std::size_t numThreads = static_cast<std::size_t>(Config_getInt(NUM_PROC_THREADS));
- if (numThreads==0)
- {
- numThreads = std::thread::hardware_concurrency();
- }
if (numThreads>1) // multi threaded processing
{
struct DocContext
static void generateNamespaceDocs()
{
- static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
+ bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
//writeNamespaceIndex(*g_outputList);
}
}
+static void runHtmlHelpCompiler()
+{
+ std::string oldDir = Dir::currentDirPath();
+ Dir::setCurrent(Config_getString(HTML_OUTPUT).str());
+ Portable::setShortDir();
+ Portable::sysTimerStart();
+ if (Portable::system(Config_getString(HHC_LOCATION).data(), qPrint(HtmlHelp::hhpFileName), Debug::isFlagSet(Debug::ExtCmd))!=1)
+ {
+ err("failed to run html help compiler on %s\n", qPrint(HtmlHelp::hhpFileName));
+ }
+ Portable::sysTimerStop();
+ Dir::setCurrent(oldDir);
+}
+
+static void runQHelpGenerator()
+{
+ QCString args = Qhp::qhpFileName + " -o \"" + Qhp::getQchFileName() + "\"";
+ std::string oldDir = Dir::currentDirPath();
+ Dir::setCurrent(Config_getString(HTML_OUTPUT).str());
+ Portable::sysTimerStart();
+
+ QCString qhgLocation=Config_getString(QHG_LOCATION);
+ if (Debug::isFlagSet(Debug::Qhp)) // produce info for debugging
+ {
+ // run qhelpgenerator -v and extract the Qt version used
+ QCString cmd=qhgLocation+ " -v 2>&1";
+ Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",qPrint(cmd));
+ FILE *f=Portable::popen(cmd,"r");
+ if (!f)
+ {
+ err("could not execute %s\n",qPrint(qhgLocation));
+ }
+ else
+ {
+ const size_t bufSize = 1024;
+ char inBuf[bufSize+1];
+ size_t numRead=fread(inBuf,1,bufSize,f);
+ inBuf[numRead] = '\0';
+ Debug::print(Debug::Qhp,0,inBuf);
+ Portable::pclose(f);
+
+ int qtVersion=0;
+ static const reg::Ex versionReg(R"(Qt (\d+)\.(\d+)\.(\d+))");
+ reg::Match match;
+ std::string s = inBuf;
+ if (reg::search(inBuf,match,versionReg))
+ {
+ qtVersion = 10000*QCString(match[1].str()).toInt() +
+ 100*QCString(match[2].str()).toInt() +
+ QCString(match[3].str()).toInt();
+ }
+ if (qtVersion>0 && (qtVersion<60000 || qtVersion >= 60205))
+ {
+ // dump the output of qhelpgenerator -c file.qhp
+ // Qt<6 or Qt>=6.2.5 or higher, see https://bugreports.qt.io/browse/QTBUG-101070
+ cmd=qhgLocation+ " -c " + Qhp::qhpFileName + " 2>&1";
+ Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",qPrint(cmd));
+ f=Portable::popen(cmd,"r");
+ if (!f)
+ {
+ err("could not execute %s\n",qPrint(qhgLocation));
+ }
+ else
+ {
+ std::string output;
+ while ((numRead=fread(inBuf,1,bufSize,f))>0)
+ {
+ inBuf[numRead] = '\0';
+ output += inBuf;
+ }
+ Portable::pclose(f);
+ Debug::print(Debug::Qhp,0,output.c_str());
+ }
+ }
+ }
+ }
+
+ if (Portable::system(qhgLocation, args, FALSE))
+ {
+ err("failed to run qhelpgenerator on %s\n",qPrint(Qhp::qhpFileName));
+ }
+ Portable::sysTimerStop();
+ Dir::setCurrent(oldDir);
+}
+
#if defined(_WIN32)
static QCString fixSlashes(QCString &s)
{
}
#endif
+//----------------------------------------------------------------------------
+
+static void computeVerifiedDotPath()
+{
+ // check dot path
+ QCString dotPath = Config_getString(DOT_PATH);
+ if (!dotPath.isEmpty())
+ {
+ FileInfo fi(dotPath.str());
+ if (!(fi.exists() && fi.isFile()) )// not an existing user specified path + exec
+ {
+ dotPath = dotPath+"/dot"+Portable::commandExtension();
+ FileInfo dp(dotPath.str());
+ if (!dp.exists() || !dp.isFile())
+ {
+ warn_uncond("the dot tool could not be found as '%s'\n",qPrint(dotPath));
+ dotPath = "dot";
+ dotPath += Portable::commandExtension();
+ }
+ }
+#if defined(_WIN32) // convert slashes
+ uint i=0,l=dotPath.length();
+ for (i=0;i<l;i++) if (dotPath.at(i)=='/') dotPath.at(i)='\\';
+#endif
+ }
+ else
+ {
+ dotPath = "dot";
+ dotPath += Portable::commandExtension();
+ }
+ Doxygen::verifiedDotPath = dotPath;
+}
//----------------------------------------------------------------------------
}
}
-static void compareDoxyfile()
+static void compareDoxyfile(DoxyfileSettings diffList)
{
std::ofstream f;
bool fileOpened=openOutputFile("-",f);
if (fileOpened)
{
TextStream t(&f);
- Config::compareDoxyfile(t);
+ Config::compareDoxyfile(t,diffList);
}
else
{
}
FileInfo fi(fileName.str());
- BufStr preBuf((uint)fi.size()+4096);
+ BufStr preBuf(fi.size()+4096);
if (Config_getBool(ENABLE_PREPROCESSING) &&
parser.needsPreprocessing(extension))
std::string absPath = FileInfo(s).absFilePath();
preprocessor.addSearchDir(absPath.c_str());
}
- BufStr inBuf((uint)fi.size()+4096);
+ BufStr inBuf(fi.size()+4096);
msg("Preprocessing %s...\n",qPrint(fn));
readInputFile(fileName,inBuf);
+ inBuf.addTerminalCharIfMissing('\n');
preprocessor.processFile(fileName,inBuf,preBuf);
}
else // no preprocessing
{
msg("Reading %s...\n",qPrint(fn));
readInputFile(fileName,preBuf);
- }
- if (preBuf.data() && preBuf.curPos()>0 && *(preBuf.data()+preBuf.curPos()-1)!='\n')
- {
- preBuf.addChar('\n'); // add extra newline to help parser
+ preBuf.addTerminalCharIfMissing('\n');
}
BufStr convBuf(preBuf.curPos()+1024);
std::mutex processedFilesLock;
// process source files (and their include dependencies)
std::size_t numThreads = static_cast<std::size_t>(Config_getInt(NUM_PROC_THREADS));
- if (numThreads==0)
- {
- numThreads = std::thread::hardware_concurrency();
- }
msg("Processing input using %zu threads.\n",numThreads);
ThreadPool threadPool(numThreads);
using FutureType = std::vector< std::shared_ptr<Entry> >;
bool ambig;
FileDef *fd=findFileDef(Doxygen::inputNameLinkedMap,s.c_str(),ambig);
ASSERT(fd!=0);
- if (fd->isSource() && !fd->isReference()) // this is a source file
+ if (fd->isSource() && !fd->isReference() && fd->getLanguage()==SrcLangExt_Cpp) // this is a source file
{
// lambda representing the work to executed by a thread
auto processFile = [s,&filesToProcess,&processedFilesLock,&processedFiles]() {
bool ambig;
std::vector< std::shared_ptr<Entry> > roots;
FileDef *fd=findFileDef(Doxygen::inputNameLinkedMap,s.c_str(),ambig);
- auto clangParser = ClangParser::instance()->createTUParser(fd);
auto parser { getParserForFile(s.c_str()) };
- auto fileRoot = parseFile(*parser.get(),fd,s.c_str(),clangParser.get(),true);
- roots.push_back(fileRoot);
+ bool useClang = getLanguageFromFileName(s.c_str())==SrcLangExt_Cpp;
+ if (useClang)
+ {
+ auto clangParser = ClangParser::instance()->createTUParser(fd);
+ auto fileRoot = parseFile(*parser.get(),fd,s.c_str(),clangParser.get(),true);
+ roots.push_back(fileRoot);
+ }
+ else
+ {
+ auto fileRoot = parseFile(*parser.get(),fd,s.c_str(),nullptr,true);
+ roots.push_back(fileRoot);
+ }
return roots;
};
- // dispatch the work and collect the future results
results.emplace_back(threadPool.queue(processFile));
}
}
else // normal processing
#endif
{
- std::size_t numThreads = std::thread::hardware_concurrency();
+ std::size_t numThreads = static_cast<std::size_t>(Config_getInt(NUM_PROC_THREADS));
msg("Processing input using %zu threads.\n",numThreads);
ThreadPool threadPool(numThreads);
using FutureType = std::shared_ptr<Entry>;
bool ambig;
FileDef *fd=findFileDef(Doxygen::inputNameLinkedMap,s.c_str(),ambig);
ASSERT(fd!=0);
- if (fd->isSource() && !fd->isReference()) // this is a source file
+ if (fd->isSource() && !fd->isReference() && getLanguageFromFileName(s.c_str())==SrcLangExt_Cpp) // this is a source file
{
auto clangParser = ClangParser::instance()->createTUParser(fd);
auto parser { getParserForFile(s.c_str()) };
{
bool ambig;
FileDef *fd=findFileDef(Doxygen::inputNameLinkedMap,s.c_str(),ambig);
- auto clangParser = ClangParser::instance()->createTUParser(fd);
- auto parser { getParserForFile(s.c_str()) };
- auto fileRoot = parseFile(*parser.get(),fd,s.c_str(),clangParser.get(),true);
- root->moveToSubEntryAndKeep(fileRoot);
+ if (getLanguageFromFileName(s.c_str())==SrcLangExt_Cpp) // not yet processed
+ {
+ auto clangParser = ClangParser::instance()->createTUParser(fd);
+ auto parser { getParserForFile(s.c_str()) };
+ auto fileRoot = parseFile(*parser.get(),fd,s.c_str(),clangParser.get(),true);
+ root->moveToSubEntryAndKeep(fileRoot);
+ }
+ else
+ {
+ std::unique_ptr<OutlineParserInterface> parser { getParserForFile(s.c_str()) };
+ std::shared_ptr<Entry> fileRoot = parseFile(*parser.get(),fd,s.c_str(),nullptr,true);
+ root->moveToSubEntryAndKeep(fileRoot);
+ }
processedFiles.insert(s);
}
}
QCString oldPrefix = "/";
do
{
-#ifdef WIN32
+#if defined(_WIN32)
// UNC path, skip server and share name
if (sepPos==0 && (result.left(2)=="//" || result.left(2)=="\\\\"))
sepPos = result.find('/',2);
target+=result.mid(sepPos);
}
result = Dir::cleanDirPath(target.str());
- sepPos = 0;
if (known.find(result.str())!=known.end()) return std::string(); // recursive symlink!
known.insert(result.str());
if (isRelative)
{
msg("Doxygen version %s\nCopyright Dimitri van Heesch 1997-2021\n\n",qPrint(versionString));
msg("You can use doxygen in a number of ways:\n\n");
- msg("1) Use doxygen to generate a template configuration file:\n");
+ msg("1) Use doxygen to generate a template configuration file*:\n");
msg(" %s [-s] -g [configName]\n\n",qPrint(name));
- msg("2) Use doxygen to update an old configuration file:\n");
+ msg("2) Use doxygen to update an old configuration file*:\n");
msg(" %s [-s] -u [configName]\n\n",qPrint(name));
msg("3) Use doxygen to generate documentation using an existing ");
- msg("configuration file:\n");
+ msg("configuration file*:\n");
msg(" %s [configName]\n\n",qPrint(name));
msg("4) Use doxygen to generate a template file controlling the layout of the\n");
msg(" generated documentation:\n");
msg(" %s -l [layoutFileName]\n\n",qPrint(name));
- msg(" In case layoutFileName is omitted layoutFileName.xml will be used as filename.\n");
+ msg(" In case layoutFileName is omitted DoxygenLayout.xml will be used as filename.\n");
msg(" If - is used for layoutFileName doxygen will write to standard output.\n\n");
msg("5) Use doxygen to generate a template style sheet file for RTF, HTML or Latex.\n");
msg(" RTF: %s -w rtf styleSheetFile\n",qPrint(name));
msg(" If - is used for extensionsFile doxygen will write to standard output.\n\n");
msg("7) Use doxygen to compare the used configuration file with the template configuration file\n");
msg(" %s -x [configFile]\n\n",qPrint(name));
+ msg(" Use doxygen to compare the used configuration file with the template configuration file\n");
+ msg(" without replacing the environment variables\n");
+ msg(" %s -x_noenv [configFile]\n\n",qPrint(name));
msg("8) Use doxygen to show a list of built-in emojis.\n");
msg(" %s -f emoji outputFileName\n\n",qPrint(name));
msg(" If - is used for outputFileName doxygen will write to standard output.\n\n");
- msg("If -s is specified the comments of the configuration items in the config file will be omitted.\n");
- msg("If configName is omitted 'Doxyfile' will be used as a default.\n");
- msg("If - is used for configFile doxygen will write / read the configuration to /from standard output / input.\n\n");
+ msg("*) If -s is specified the comments of the configuration items in the config file will be omitted.\n");
+ msg(" If configName is omitted 'Doxyfile' will be used as a default.\n");
+ msg(" If - is used for configFile doxygen will write / read the configuration to /from standard output / input.\n\n");
msg("If -q is used for a doxygen documentation run, doxygen will see this as if QUIET=YES has been set.\n\n");
msg("-v print version string, -V print extended version information\n");
+ msg("-h,-? prints usage help information\n");
+ msg("%s -d prints additional usage flags for debugging purposes\n",qPrint(name));
}
//----------------------------------------------------------------------------
delete Doxygen::namespaceLinkedMap;
delete Doxygen::dirLinkedMap;
delete Doxygen::symbolMap;
-
- DotManager::deleteInstance();
}
static int computeIdealCacheParam(size_t v)
QCString listName;
bool genConfig=FALSE;
bool shortList=FALSE;
- bool diffList=FALSE;
+ DoxyfileSettings diffList=DoxyfileSettings::Full;
bool updateConfig=FALSE;
int retVal;
bool quiet = false;
}
break;
case 'x':
- diffList=TRUE;
+ if (!strcmp(argv[optInd]+1,"x_noenv")) diffList=DoxyfileSettings::CompressedNoEnv;
+ else if (!strcmp(argv[optInd]+1,"x")) diffList=DoxyfileSettings::Compressed;
+ else
+ {
+ err("option should be \"-x\" or \"-x_noenv\", found: \"%s\".\n",argv[optInd]);
+ cleanUpDoxygen();
+ exit(1);
+ }
break;
case 's':
shortList=TRUE;
exit(1);
}
- if (diffList)
+ if (diffList!=DoxyfileSettings::Full)
{
Config::updateObsolete();
- compareDoxyfile();
+ compareDoxyfile(diffList);
cleanUpDoxygen();
exit(0);
}
}
killpg(0,SIGINT);
cleanUpDoxygen();
+ Doxygen::terminating=true;
exit(1);
}
#endif
return result;
}
-static QCString getQchFileName()
-{
- QCString const & qchFile = Config_getString(QCH_FILE);
- if (!qchFile.isEmpty())
- {
- return qchFile;
- }
-
- QCString const & projectName = Config_getString(PROJECT_NAME);
- QCString const & versionText = Config_getString(PROJECT_NUMBER);
-
- return QCString("../qch/")
- + (projectName.isEmpty() ? QCString("index") : projectName)
- + (versionText.isEmpty() ? QCString("") : QCString("-") + versionText)
- + QCString(".qch");
-}
-
void searchInputFiles()
{
StringUnorderedSet killSet;
&exclPatterns, // exclPatList
0, // resultList
0, // resultSet
- alwaysRecursive, // recursive
+ false, // INCLUDE_PATH isn't recursive
TRUE, // errorIfNotExist
&killSet); // killSet
}
Doxygen::clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING);
#endif
+ computeVerifiedDotPath();
+
// we would like to show the versionString earlier, but we first have to handle the configuration file
// to know the value of the QUIET setting.
QCString versionString = getFullVersion();
combineUsingRelations();
g_s.end();
+ initSearchIndexer();
g_s.begin("Adding members to index pages...\n");
addMembersToIndex();
addToIndices();
exit(0);
}
- initSearchIndexer();
-
bool generateHtml = Config_getBool(GENERATE_HTML);
bool generateLatex = Config_getBool(GENERATE_LATEX);
bool generateMan = Config_getBool(GENERATE_MAN);
g_outputList->writeStyleInfo(0); // write first part
g_s.end();
- static bool searchEngine = Config_getBool(SEARCHENGINE);
- static bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH);
+ bool searchEngine = Config_getBool(SEARCHENGINE);
+ bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH);
g_s.begin("Generating search indices...\n");
if (searchEngine && !serverBasedSearch && (generateHtml || g_useOutputTemplate))
!Config_getString(HHC_LOCATION).isEmpty())
{
g_s.begin("Running html help compiler...\n");
- std::string oldDir = Dir::currentDirPath();
- Dir::setCurrent(Config_getString(HTML_OUTPUT).str());
- Portable::setShortDir();
- Portable::sysTimerStart();
- if (Portable::system(Config_getString(HHC_LOCATION).data(), "index.hhp", Debug::isFlagSet(Debug::ExtCmd))!=1)
- {
- err("failed to run html help compiler on index.hhp\n");
- }
- Portable::sysTimerStop();
- Dir::setCurrent(oldDir);
+ runHtmlHelpCompiler();
g_s.end();
}
!Config_getString(QHG_LOCATION).isEmpty())
{
g_s.begin("Running qhelpgenerator...\n");
- QCString qhpFileName = Qhp::getQhpFileName();
- QCString qchFileName = getQchFileName();
-
- QCString args = QCString().sprintf("%s -o \"%s\"", qPrint(qhpFileName), qPrint(qchFileName));
- std::string oldDir = Dir::currentDirPath();
- Dir::setCurrent(Config_getString(HTML_OUTPUT).str());
- Portable::sysTimerStart();
- if (Portable::system(Config_getString(QHG_LOCATION).data(), args.data(), FALSE))
- {
- err("failed to run qhelpgenerator on index.qhp\n");
- }
- Portable::sysTimerStop();
- Dir::setCurrent(oldDir);
+ runQHelpGenerator();
g_s.end();
}
if (Debug::isFlagSet(Debug::Time))
{
msg("Total elapsed time: %.6f seconds\n(of which %.6f seconds waiting for external tools to finish)\n",
- ((double)Debug::elapsedTime()),
+ (static_cast<double>(Debug::elapsedTime())),
Portable::getSysElapsedTime()
);
g_s.print();
Config::deinit();
delete Doxygen::clangUsrMap;
g_successfulRun=TRUE;
+
+ //dumpDocNodeSizes();
}
static bool generatingXmlOutput;
static DefinesPerFileList macroDefinitions;
static bool clangAssistedParsing;
+ static QCString verifiedDotPath;
+ static volatile bool terminating;
};
+/** Deleter that only deletes an object if doxygen is not already terminating */
+template<class T>
+struct NonTerminatingDeleter
+{
+ void operator()(T *obj)
+ {
+ if (!Doxygen::terminating) delete obj;
+ }
+};
+
+
void initDoxygen();
void readConfiguration(int argc, char **argv);
void checkConfiguration();
Will print each comment block before and after the comment is interpreted by
the comment scanner.
- printtree<br>
- Give the results in in pretty print way, i.e. in an XML like way with each
+ Give the results in pretty print way, i.e. in an XML like way with each
level indented by a `"."` (dot).
- time<br>
Provides information of the different stages of the doxygen process.
QCString msg1 = msg; \
msg1 += "\n lexical analyzer: "; \
msg1 += getLexerFILE(); \
- if (!((struct yyguts_t*)yyscanner)->yyextra_r->fileName.isEmpty()) \
+ if (!static_cast<yyguts_t*>(yyscanner)->yyextra_r->fileName.isEmpty()) \
{ \
msg1 += " (for: "; \
- msg1 += ((struct yyguts_t*)yyscanner)->yyextra_r->fileName; \
+ msg1 += static_cast<yyguts_t*>(yyscanner)->yyextra_r->fileName; \
msg1 += ")"; \
} \
msg1 += "\n"; \
{":person_with_pouting_face:", ":pouting_face:"},
};
-static const int g_numEmojiEntities = (int)(sizeof(g_emojiEntities)/sizeof(*g_emojiEntities));
-static const int g_numEmojiCompatibilityEntities = (int)(sizeof(g_emojiCompatibilityEntities)/sizeof(*g_emojiCompatibilityEntities));
+static const size_t g_numEmojiEntities = sizeof(g_emojiEntities)/sizeof(*g_emojiEntities);
+static const size_t g_numEmojiCompatibilityEntities = sizeof(g_emojiCompatibilityEntities)/sizeof(*g_emojiCompatibilityEntities);
EmojiEntityMapper *EmojiEntityMapper::s_instance = 0;
EmojiEntityMapper::EmojiEntityMapper()
{
- for (int i = 0; i < g_numEmojiEntities; i++)
+ for (size_t i = 0; i < g_numEmojiEntities; i++)
{
- m_name2symGh.insert(std::make_pair(g_emojiEntities[i].name, i));
+ m_name2symGh.insert(std::make_pair(g_emojiEntities[i].name, static_cast<int>(i)));
}
- for (int i = 0; i < g_numEmojiCompatibilityEntities; i++)
+ for (size_t i = 0; i < g_numEmojiCompatibilityEntities; i++)
{
int ii = symbol2index(g_emojiCompatibilityEntities[i].newName);
if (ii != -1) m_name2symGh.insert(std::make_pair(g_emojiCompatibilityEntities[i].oldName, ii));
*/
void EmojiEntityMapper::writeEmojiFile(TextStream &t)
{
- for (int i = 0; i < g_numEmojiEntities; i++)
+ for (size_t i = 0; i < g_numEmojiEntities; i++)
{
t << g_emojiEntities[i].name << "\n";
}
- for (int i = 0; i < g_numEmojiCompatibilityEntities; i++)
+ for (size_t i = 0; i < g_numEmojiCompatibilityEntities; i++)
{
t << g_emojiCompatibilityEntities[i].oldName << "\n";
}
*/
const char *EmojiEntityMapper::unicode(int index) const
{
- return index>=0 && index<g_numEmojiEntities ? g_emojiEntities[index].unicode : 0;
+ return index>=0 && static_cast<size_t>(index)<g_numEmojiEntities ? g_emojiEntities[index].unicode : 0;
}
/*! @brief Access routine to the name of the Emoji entity
*/
const char *EmojiEntityMapper::name(int index) const
{
- return index>=0 && index<g_numEmojiEntities ? g_emojiEntities[index].name : 0;
+ return index>=0 && static_cast<size_t>(index)<g_numEmojiEntities ? g_emojiEntities[index].name : 0;
}
*/
void reset();
- void markAsProcessed() const { ((Entry*)(this))->section = Entry::EMPTY_SEC; }
+ void markAsProcessed() const { (const_cast<Entry*>(this))->section = Entry::EMPTY_SEC; }
void setFileDef(FileDef *fd);
FileDef *fileDef() const { return m_fileDef; }
virtual bool isIncluded(const QCString &name) const;
virtual PackageDef *packageDef() const { return m_package; }
virtual DirDef *getDirDef() const { return m_dir; }
- virtual LinkedRefMap<const NamespaceDef> getUsedNamespaces() const;
- virtual LinkedRefMap<const ClassDef> getUsedClasses() const { return m_usingDeclList; }
+ virtual const LinkedRefMap<const NamespaceDef> &getUsedNamespaces() const;
+ virtual const LinkedRefMap<const ClassDef> &getUsedClasses() const { return m_usingDeclList; }
virtual const IncludeInfoList &includeFileList() const { return m_includeList; }
virtual const IncludeInfoList &includedByFileList() const { return m_includedByList; }
virtual void getAllIncludeFilesRecursively(StringVector &incFiles) const;
*/
FileDefImpl::FileDefImpl(const QCString &p,const QCString &nm,
const QCString &lref,const QCString &dn)
- : DefinitionMixin((QCString)p+nm,1,1,nm)
+ : DefinitionMixin(QCString(p)+nm,1,1,nm,0,0,!p.isEmpty())
{
m_path=p;
m_filePath=m_path+nm;
bool FileDefImpl::hasDetailedDescription() const
{
- static bool repeatBrief = Config_getBool(REPEAT_BRIEF);
- static bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
+ bool repeatBrief = Config_getBool(REPEAT_BRIEF);
+ bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
return ((!briefDescription().isEmpty() && repeatBrief) ||
!documentation().stripWhiteSpace().isEmpty() || // avail empty section
(sourceBrowser && getStartBodyLine()!=-1 && getBodyDef())
break;
case LayoutDocEntry::MemberDecl:
{
- const LayoutDocEntryMemberDecl *lmd = (const LayoutDocEntryMemberDecl*)lde.get();
- MemberList * ml = getMemberList(lmd->type);
- if (ml)
+ const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
+ if (lmd)
{
- ml->writeTagFile(tagFile);
+ MemberList * ml = getMemberList(lmd->type);
+ if (ml)
+ {
+ ml->writeTagFile(tagFile);
+ }
}
}
break;
{
if (hasBriefDescription())
{
- std::unique_ptr<IDocParser> parser { createDocParser() };
- std::unique_ptr<DocRoot> rootNode { validatingParseDoc(*parser.get(),
- briefFile(),briefLine(),this,0,
- briefDescription(),TRUE,FALSE,
- QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
-
- if (rootNode && !rootNode->isEmpty())
+ auto parser { createDocParser() };
+ auto ast { validatingParseDoc(*parser.get(),
+ briefFile(),briefLine(),this,0,
+ briefDescription(),TRUE,FALSE,
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
+ if (!ast->isEmpty())
{
ol.startParagraph();
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Man);
ol.writeString(" - ");
ol.popGeneratorState();
- ol.writeDoc(rootNode.get(),this,0);
+ ol.writeDoc(ast.get(),this,0);
ol.pushGeneratorState();
ol.disable(OutputGenerator::RTF);
ol.writeString(" \n");
/* write user defined member groups */
for (const auto &mg : m_memberGroups)
{
- if ((!mg->allMembersInSameSection() || !m_subGrouping)
- && mg->header()!="[NOHEADER]")
+ if (!mg->allMembersInSameSection() || !m_subGrouping)
{
mg->writeDeclarations(ol,0,0,this,0);
}
SrcLangExt lang=getLanguage();
for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::File))
{
- if (lde->kind()==LayoutDocEntry::FileClasses && m_classes.declVisible())
+ const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
+ if (lde->kind()==LayoutDocEntry::FileClasses && m_classes.declVisible() && ls)
{
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "nested-classes";
ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
- else if (lde->kind()==LayoutDocEntry::FileInterfaces && m_interfaces.declVisible())
+ else if (lde->kind()==LayoutDocEntry::FileInterfaces && m_interfaces.declVisible() && ls)
{
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "interfaces";
ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
- else if (lde->kind()==LayoutDocEntry::FileStructs && m_structs.declVisible())
+ else if (lde->kind()==LayoutDocEntry::FileStructs && m_structs.declVisible() && ls)
{
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "structs";
ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
- else if (lde->kind()==LayoutDocEntry::FileExceptions && m_exceptions.declVisible())
+ else if (lde->kind()==LayoutDocEntry::FileExceptions && m_exceptions.declVisible() && ls)
{
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "exceptions";
ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
- else if (lde->kind()==LayoutDocEntry::FileNamespaces && m_namespaces.declVisible(false))
+ else if (lde->kind()==LayoutDocEntry::FileNamespaces && m_namespaces.declVisible(false) && ls)
{
- 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::FileConcepts && m_concepts.declVisible())
+ else if (lde->kind()==LayoutDocEntry::FileConcepts && m_concepts.declVisible() && ls)
{
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "concepts";
ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::MemberDecl)
{
- const LayoutDocEntryMemberDecl *lmd = (const LayoutDocEntryMemberDecl*)lde.get();
- MemberList * ml = getMemberList(lmd->type);
- if (ml && ml->declVisible())
+ const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
+ if (lmd)
{
- ol.writeSummaryLink(QCString(),MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first);
- first=FALSE;
+ MemberList * ml = getMemberList(lmd->type);
+ if (ml && ml->declVisible())
+ {
+ ol.writeSummaryLink(QCString(),MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first);
+ first=FALSE;
+ }
}
}
}
*/
void FileDefImpl::writeDocumentation(OutputList &ol)
{
- static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
+ bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
//funcList->countDecMembers();
//QCString fn = name();
SrcLangExt lang = getLanguage();
for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::File))
{
+ const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
switch (lde->kind())
{
case LayoutDocEntry::BriefDesc:
writeSourceLink(ol);
break;
case LayoutDocEntry::FileClasses:
- {
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeClassDeclarations(ol,ls->title(lang),m_classes);
- }
+ if (ls) writeClassDeclarations(ol,ls->title(lang),m_classes);
break;
case LayoutDocEntry::FileInterfaces:
- {
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeClassDeclarations(ol,ls->title(lang),m_interfaces);
- }
+ if (ls) writeClassDeclarations(ol,ls->title(lang),m_interfaces);
break;
case LayoutDocEntry::FileStructs:
- {
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeClassDeclarations(ol,ls->title(lang),m_structs);
- }
+ if (ls) writeClassDeclarations(ol,ls->title(lang),m_structs);
break;
case LayoutDocEntry::FileExceptions:
- {
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeClassDeclarations(ol,ls->title(lang),m_exceptions);
- }
+ if (ls) writeClassDeclarations(ol,ls->title(lang),m_exceptions);
break;
case LayoutDocEntry::FileConcepts:
- {
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeConcepts(ol,ls->title(lang));
- }
+ if (ls) writeConcepts(ol,ls->title(lang));
break;
case LayoutDocEntry::FileNamespaces:
- {
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeNamespaceDeclarations(ol,ls->title(lang),false);
- }
+ if (ls) writeNamespaceDeclarations(ol,ls->title(lang),false);
break;
case LayoutDocEntry::FileConstantGroups:
- {
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeNamespaceDeclarations(ol,ls->title(lang),true);
- }
+ if (ls) writeNamespaceDeclarations(ol,ls->title(lang),true);
break;
case LayoutDocEntry::MemberGroups:
writeMemberGroups(ol);
break;
case LayoutDocEntry::MemberDecl:
{
- const LayoutDocEntryMemberDecl *lmd = (const LayoutDocEntryMemberDecl*)lde.get();
- writeMemberDeclarations(ol,lmd->type,lmd->title(lang));
+ const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
+ if (lmd) writeMemberDeclarations(ol,lmd->type,lmd->title(lang));
}
break;
case LayoutDocEntry::MemberDeclEnd:
endMemberDeclarations(ol);
break;
case LayoutDocEntry::DetailedDesc:
- {
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeDetailedDescription(ol,ls->title(lang));
- }
+ if (ls) writeDetailedDescription(ol,ls->title(lang));
break;
case LayoutDocEntry::MemberDefStart:
startMemberDocumentation(ol);
break;
case LayoutDocEntry::MemberDef:
{
- const LayoutDocEntryMemberDef *lmd = (const LayoutDocEntryMemberDef*)lde.get();
- writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
+ const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
+ if (lmd) writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
}
break;
case LayoutDocEntry::MemberDefEnd:
void FileDefImpl::writeQuickMemberLinks(OutputList &ol,const MemberDef *currentMd) const
{
- static bool createSubDirs=Config_getBool(CREATE_SUBDIRS);
+ bool createSubDirs=Config_getBool(CREATE_SUBDIRS);
ol.writeString(" <div class=\"navtab\">\n");
ol.writeString(" <table>\n");
void FileDefImpl::parseSource(ClangTUParser *clangParser)
{
- static bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES);
+ bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES);
DevNullCodeDocInterface devNullIntf;
#if USE_LIBCLANG
if (Doxygen::clangAssistedParsing && clangParser &&
//printf("%p: FileDefImpl::addUsingDirective: %s:%d\n",this,qPrint(name()),usingDirList->count());
}
-LinkedRefMap<const NamespaceDef> FileDefImpl::getUsedNamespaces() const
+const LinkedRefMap<const NamespaceDef> &FileDefImpl::getUsedNamespaces() const
{
//printf("%p: FileDefImpl::getUsedNamespace: %s:%d\n",this,qPrint(name()),usingDirList?usingDirList->count():0);
return m_usingDirList;
for (auto it = unl.rbegin(); it!=unl.rend(); ++it)
{
const auto *nd = *it;
+ //printf(" adding using directive for %s\n",qPrint(nd->qualifiedName()));
m_usingDirList.prepend(nd->qualifiedName(),nd);
}
// add using declarations
bool FileDefImpl::generateSourceFile() const
{
- static bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
- static bool verbatimHeaders = Config_getBool(VERBATIM_HEADERS);
+ bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
+ bool verbatimHeaders = Config_getBool(VERBATIM_HEADERS);
return !isReference() &&
(sourceBrowser ||
(verbatimHeaders && guessSection(name())==Entry::HEADER_SEC)
}
const int bufSize=1024;
char buf[bufSize];
- int numRead = (int)fread(buf,1,bufSize-1,f);
+ int numRead = static_cast<int>(fread(buf,1,bufSize-1,f));
Portable::pclose(f);
if (numRead>0 && numRead<bufSize)
{
void FileDefImpl::addMemberToList(MemberListType lt,MemberDef *md)
{
- static bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
- static bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
+ bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
+ bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
const auto &ml = m_memberLists.get(lt,MemberListContainer::File);
ml->setNeedsSorting(
((ml->listType()&MemberListType_declarationLists) && sortBriefDocs) ||
void FileDefImpl::writeMemberDeclarations(OutputList &ol,MemberListType lt,const QCString &title)
{
- static bool optVhdl = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ bool optVhdl = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
MemberList * ml = getMemberList(lt);
if (ml)
{
bool FileDefImpl::isLinkableInProject() const
{
- static bool showFiles = Config_getBool(SHOW_FILES);
+ bool showFiles = Config_getBool(SHOW_FILES);
return hasDocumentation() && !isReference() && (showFiles || isLinkableViaGroup());
}
class FileDef : public DefinitionMutable, public Definition
{
public:
- ~FileDef() {}
-
// ----------------------------------------------------------------------
virtual DefType definitionType() const = 0;
virtual PackageDef *packageDef() const = 0;
virtual DirDef *getDirDef() const = 0;
- virtual LinkedRefMap<const NamespaceDef> getUsedNamespaces() const = 0;
- virtual LinkedRefMap<const ClassDef> getUsedClasses() const = 0;
+ virtual const LinkedRefMap<const NamespaceDef> &getUsedNamespaces() const = 0;
+ virtual const LinkedRefMap<const ClassDef> &getUsedClasses() const = 0;
virtual const IncludeInfoList &includeFileList() const = 0;
virtual const IncludeInfoList &includedByFileList() const = 0;
virtual void getAllIncludeFilesRecursively(StringVector &incFiles) const = 0;
std::string result;
std::error_code ec;
fs::path path(m_name);
- if (fs::exists(path,ec))
+ if (!path.is_relative())
{
- result = fs::canonical(path,ec).string();
+ result = path.lexically_normal().string();
}
else
{
- result = (fs::current_path(ec) / m_name).string();
+ result = (fs::current_path(ec) / m_name).lexically_normal().string();
}
correctPath(result);
return result;
#include "linkedmap.h"
#include "config.h"
+#include "utf8.h"
class FileDef;
std::string key = input;
if (!Config_getBool(CASE_SENSE_NAMES))
{
- // convert key to lower case
- std::transform(key.begin(),key.end(),key.begin(),
- [](char c){ return (char)std::tolower(c); });
+ key = convertUTF8ToLower(key);
}
return key;
}
class FileCodeParser : public CodeParserInterface
{
public:
- virtual ~FileCodeParser() {}
void parseCode(CodeOutputInterface &codeOutIntf,
const QCString &scopeName,
const QCString &input,
return DisplaySize(-1,-1);
}
StringVector formulas;
- IntMap formulaMap;
+ std::map<std::string,size_t> formulaMap;
std::map<int,DisplaySize> displaySizeMap;
};
{
uint formulaCount=0;
msg("Reading formula repository...\n");
+ std::string readLine;
std::string line;
- int lineNr=1;
- while (getline(f,line))
+ std::string prefix("\\_form#");
+ int lineNr;
+ int nextLineNr=1;
+ bool hasNextLine = !getline(f,readLine).fail();
+ while (hasNextLine)
{
+ line = readLine;
+ lineNr = nextLineNr;
+
+ // look ahead a bit because a formula can be spread over several lines
+ while ((hasNextLine = !getline(f,readLine).fail()))
+ {
+ nextLineNr+=1;
+ if (!readLine.compare(0, prefix.size(), prefix)) break;
+ line += "\n" + readLine;
+ }
+
// format: \_form#<digits>=<digits>x<digits>:formula
size_t hi=line.find('#');
size_t ei=line.find('=');
p->storeDisplaySize(id,w,h);
}
}
- lineNr++;
}
if (doCompare && formulaCount!=p->formulas.size())
{
}
t << "\\pagestyle{empty}\n";
t << "\\begin{document}\n";
- for (int i=0; i<(int)p->formulas.size(); i++)
+ for (size_t i=0; i<p->formulas.size(); i++)
{
QCString resultName;
- resultName.sprintf("form_%d.%s",i,format==Format::Vector?"svg":"png");
+ resultName.sprintf("form_%d.%s",static_cast<int>(i),format==Format::Vector?"svg":"png");
// only formulas for which no image exists are generated
FileInfo fi(resultName.str());
if (!fi.exists())
{
// we force a pagebreak after each formula
t << p->formulas[i].c_str() << "\n\\pagebreak\n\n";
- formulasToGenerate.push_back(i);
+ formulasToGenerate.push_back(static_cast<int>(i));
}
Doxygen::indexList->addImageFile(resultName);
}
if (zoomFactor<8 || zoomFactor>50) zoomFactor=10;
scaleFactor *= zoomFactor/10.0;
- int width = (int)((x2-x1)*scaleFactor+0.5);
- int height = (int)((y2-y1)*scaleFactor+0.5);
+ int width = static_cast<int>((x2-x1)*scaleFactor+0.5);
+ int height = static_cast<int>((y2-y1)*scaleFactor+0.5);
p->storeDisplaySize(pageNum,width,height);
if (format==Format::Vector)
Portable::sysTimerStop();
sprintf(args,"-q -dNOSAFER -dBATCH -dNOPAUSE -dEPSCrop -sDEVICE=pnggray -dGraphicsAlphaBits=4 -dTextAlphaBits=4 "
- "-r%d -sOutputFile=form_%d.png %s_tmp_corr.eps",(int)(scaleFactor*72),pageNum,qPrint(formBase));
+ "-r%d -sOutputFile=form_%d.png %s_tmp_corr.eps",static_cast<int>(scaleFactor*72),pageNum,qPrint(formBase));
Portable::sysTimerStart();
if (Portable::system(Portable::ghostScriptCommand(),args)!=0)
{
if (f.is_open())
{
TextStream t(&f);
- for (int i=0; i<(int)p->formulas.size(); i++)
+ for (size_t i=0; i<p->formulas.size(); i++)
{
- DisplaySize size = p->getDisplaySize(i);
+ DisplaySize size = p->getDisplaySize(static_cast<int>(i));
t << "\\_form#" << i;
if (size.width!=-1 && size.height!=-1)
{
auto it = p->formulaMap.find(formulaText);
if (it!=p->formulaMap.end()) // already stored
{
- return it->second;
+ return static_cast<int>(it->second);
}
// store new formula
- int id = (int)p->formulas.size();
- p->formulaMap.insert(std::pair<std::string,int>(formulaText,id));
+ size_t id = p->formulas.size();
+ p->formulaMap.insert(std::make_pair(formulaText,id));
p->formulas.push_back(formulaText);
- return id;
+ return static_cast<int>(id);
}
std::string FormulaManager::findFormula(int formulaId) const
{
- if (formulaId>=0 && formulaId<(int)p->formulas.size())
+ if (formulaId>=0 && formulaId<static_cast<int>(p->formulas.size()))
{
return p->formulas[formulaId];
}
yyextra->contLineNr++;
if (Config_getBool(STRIP_CODE_COMMENTS))
{
- yyextra->yyLineNr+=((QCString)yyextra->docBlock).contains('\n');
+ yyextra->yyLineNr+=yyextra->docBlock.contains('\n');
yyextra->yyLineNr+=1;
nextCodeLine(yyscanner);
yyextra->endComment=TRUE;
Definition *d,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- static bool sourceTooltips = Config_getBool(SOURCE_TOOLTIPS);
+ bool sourceTooltips = Config_getBool(SOURCE_TOOLTIPS);
yyextra->tooltipManager.addTooltip(ol,d);
QCString ref = d->getReference();
QCString file = d->getOutputFileBase();
{
endCodeLine(yyscanner);
}
- if (isExampleBlock && yyextra->sourceFileDef)
+ if (!fileDef && isExampleBlock && yyextra->sourceFileDef)
{
// delete the temporary file definition used for this example
delete yyextra->sourceFileDef;
/*------- type definition -------------------------------------------------------------------------------*/
+<ModuleBody>^{BS}type{BS}"=" {}
<Start,ModuleBody>^{BS}type/[^a-z0-9_] {
if (YY_START == Start)
{
//printf("*** %p: generateBriefDoc(%s)='%s'\n",def,qPrint(def->name()),qPrint(brief));
if (!brief.isEmpty())
{
- std::unique_ptr<IDocParser> parser { createDocParser() };
- std::unique_ptr<DocRoot> root { validatingParseDoc(*parser.get(),
- def->briefFile(),def->briefLine(),
- def,0,brief,FALSE,FALSE,
- QCString(),TRUE,TRUE,Config_getBool(MARKDOWN_SUPPORT)) };
- QCString relPath = relativePathToRoot(def->getOutputFileBase());
- HtmlCodeGenerator htmlGen(t,relPath);
- auto visitor = std::make_unique<HtmlDocVisitor>(t,htmlGen,def);
- root->accept(visitor.get());
+ auto parser { createDocParser() };
+ auto ast { validatingParseDoc(*parser.get(),
+ def->briefFile(),def->briefLine(),
+ def,0,brief,FALSE,FALSE,
+ QCString(),TRUE,TRUE,Config_getBool(MARKDOWN_SUPPORT)) };
+ const DocNodeAST *astImpl = dynamic_cast<const DocNodeAST*>(ast.get());
+ if (astImpl)
+ {
+ QCString relPath = relativePathToRoot(def->getOutputFileBase());
+ HtmlCodeGenerator htmlGen(t,relPath);
+ HtmlDocVisitor visitor(t,htmlGen,def);
+ std::visit(visitor,astImpl->root);
+ }
}
}
static bool generateJSTree(NavIndexEntryList &navIndex,TextStream &t,
const std::vector<FTVNode*> &nl,int level,bool &first)
{
- static QCString htmlOutput = Config_getString(HTML_OUTPUT);
+ QCString htmlOutput = Config_getString(HTML_OUTPUT);
QCString indentStr;
indentStr.fill(' ',level*2);
bool found=FALSE;
else
{
m_title = name();
- m_title[0]=(char)toupper(m_title[0]);
+ m_title[0]=static_cast<char>(toupper(m_title[0]));
m_titleSet = FALSE;
}
}
void GroupDefImpl::addFile(const FileDef *def)
{
- static bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
+ bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
if (def->isHidden()) return;
updateLanguage(def);
if (sortBriefDocs)
(tSrcMdAl.size()==tMdAl.size()) && // same number of template arguments
matchArguments2(srcMd->getOuterScope(),srcMd->getFileDef(),&srcMdAl,
md->getOuterScope(),md->getFileDef(),&mdAl,
- TRUE
+ TRUE,srcMd->getLanguage()
) && // matching parameters
sameScope // both are found in the same scope
)
break;
case LayoutDocEntry::MemberDecl:
{
- const LayoutDocEntryMemberDecl *lmd = (const LayoutDocEntryMemberDecl*)lde.get();
- MemberList * ml = getMemberList(lmd->type);
- if (ml)
+ const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
+ if (lmd)
{
- ml->writeTagFile(tagFile);
+ MemberList * ml = getMemberList(lmd->type);
+ if (ml)
+ {
+ ml->writeTagFile(tagFile);
+ }
}
}
break;
{
if (hasBriefDescription())
{
- std::unique_ptr<IDocParser> parser { createDocParser() };
- std::unique_ptr<DocRoot> rootNode { validatingParseDoc(*parser.get(),
- briefFile(),briefLine(),this,0,
- briefDescription(),TRUE,FALSE,
- QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
- if (rootNode && !rootNode->isEmpty())
+ auto parser { createDocParser() };
+ auto ast { validatingParseDoc(*parser.get(),
+ briefFile(),briefLine(),this,0,
+ briefDescription(),TRUE,FALSE,
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
+ if (!ast->isEmpty())
{
ol.startParagraph();
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Man);
ol.writeString(" - ");
ol.popGeneratorState();
- ol.writeDoc(rootNode.get(),this,0);
+ ol.writeDoc(ast.get(),this,0);
ol.pushGeneratorState();
ol.disable(OutputGenerator::RTF);
ol.writeString(" \n");
(lde->kind()==LayoutDocEntry::GroupDirs && !m_dirList.empty())
)
{
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- QCString label = lde->kind()==LayoutDocEntry::GroupClasses ? "nested-classes" :
- lde->kind()==LayoutDocEntry::GroupConcepts ? "concepts" :
- lde->kind()==LayoutDocEntry::GroupNamespaces ? "namespaces" :
- lde->kind()==LayoutDocEntry::GroupFiles ? "files" :
- lde->kind()==LayoutDocEntry::GroupNestedGroups ? "groups" :
- "dirs";
- ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
- first=FALSE;
+ const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
+ if (ls)
+ {
+ QCString label = lde->kind()==LayoutDocEntry::GroupClasses ? "nested-classes" :
+ lde->kind()==LayoutDocEntry::GroupConcepts ? "concepts" :
+ lde->kind()==LayoutDocEntry::GroupNamespaces ? "namespaces" :
+ lde->kind()==LayoutDocEntry::GroupFiles ? "files" :
+ lde->kind()==LayoutDocEntry::GroupNestedGroups ? "groups" :
+ "dirs";
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
+ first=FALSE;
+ }
}
else if (lde->kind()==LayoutDocEntry::MemberDecl)
{
- const LayoutDocEntryMemberDecl *lmd = (const LayoutDocEntryMemberDecl*)lde.get();
- MemberList * ml = getMemberList(lmd->type);
- if (ml && ml->declVisible())
+ const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
+ if (lmd)
{
- ol.writeSummaryLink(QCString(),MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first);
- first=FALSE;
+ MemberList * ml = getMemberList(lmd->type);
+ if (ml && ml->declVisible())
+ {
+ ol.writeSummaryLink(QCString(),MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first);
+ first=FALSE;
+ }
}
}
}
void GroupDefImpl::writeDocumentation(OutputList &ol)
{
- //static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
+ //bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
ol.pushGeneratorState();
startFile(ol,getOutputFileBase(),name(),m_title,HLI_Modules);
SrcLangExt lang=getLanguage();
for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Group))
{
+ const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
switch (lde->kind())
{
case LayoutDocEntry::BriefDesc:
startMemberDeclarations(ol);
break;
case LayoutDocEntry::GroupClasses:
- {
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeClasses(ol,ls->title(lang));
- }
+ if (ls) writeClasses(ol,ls->title(lang));
break;
case LayoutDocEntry::GroupConcepts:
- {
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeConcepts(ol,ls->title(lang));
- }
+ if (ls) writeConcepts(ol,ls->title(lang));
break;
case LayoutDocEntry::GroupInlineClasses:
- {
- writeInlineClasses(ol);
- }
+ writeInlineClasses(ol);
break;
case LayoutDocEntry::GroupNamespaces:
- {
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeNamespaces(ol,ls->title(lang));
- }
+ if (ls) writeNamespaces(ol,ls->title(lang));
break;
case LayoutDocEntry::MemberGroups:
writeMemberGroups(ol);
break;
case LayoutDocEntry::MemberDecl:
{
- const LayoutDocEntryMemberDecl *lmd = (const LayoutDocEntryMemberDecl*)lde.get();
- writeMemberDeclarations(ol,lmd->type,lmd->title(lang));
+ const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
+ if (lmd)
+ {
+ writeMemberDeclarations(ol,lmd->type,lmd->title(lang));
+ }
}
break;
case LayoutDocEntry::MemberDeclEnd:
endMemberDeclarations(ol);
break;
case LayoutDocEntry::DetailedDesc:
- {
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeDetailedDescription(ol,ls->title(lang));
- }
+ if (ls) writeDetailedDescription(ol,ls->title(lang));
break;
case LayoutDocEntry::MemberDefStart:
startMemberDocumentation(ol);
break;
case LayoutDocEntry::MemberDef:
{
- const LayoutDocEntryMemberDef *lmd = (const LayoutDocEntryMemberDef*)lde.get();
- writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
+ const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
+ if (lmd)
+ {
+ writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
+ }
}
break;
case LayoutDocEntry::MemberDefEnd:
endMemberDocumentation(ol);
break;
case LayoutDocEntry::GroupNestedGroups:
- {
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeNestedGroups(ol,ls->title(lang));
- }
+ if (ls) writeNestedGroups(ol,ls->title(lang));
break;
case LayoutDocEntry::GroupPageDocs:
writePageDocumentation(ol);
break;
case LayoutDocEntry::GroupDirs:
- {
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeDirs(ol,ls->title(lang));
- }
+ if (ls) writeDirs(ol,ls->title(lang));
break;
case LayoutDocEntry::GroupFiles:
- {
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeFiles(ol,ls->title(lang));
- }
+ if (ls) writeFiles(ol,ls->title(lang));
break;
case LayoutDocEntry::GroupGraph:
writeGroupGraph(ol);
void GroupDefImpl::writeQuickMemberLinks(OutputList &ol,const MemberDef *currentMd) const
{
- static bool createSubDirs=Config_getBool(CREATE_SUBDIRS);
+ bool createSubDirs=Config_getBool(CREATE_SUBDIRS);
ol.writeString(" <div class=\"navtab\">\n");
ol.writeString(" <table>\n");
void GroupDefImpl::addMemberToList(MemberListType lt,const MemberDef *md)
{
- static bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
- static bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
+ bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
+ bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
const auto &ml = m_memberLists.get(lt,MemberListContainer::Group);
ml->setNeedsSorting(
((ml->listType()&MemberListType_declarationLists) && sortBriefDocs) ||
void GroupDefImpl::writeMemberDeclarations(OutputList &ol,MemberListType lt,const QCString &title)
{
- static bool optimizeVhdl = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ bool optimizeVhdl = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
MemberList * ml = getMemberList(lt);
if (optimizeVhdl && ml)
bool GroupDefImpl::hasDetailedDescription() const
{
- static bool repeatBrief = Config_getBool(REPEAT_BRIEF);
+ bool repeatBrief = Config_getBool(REPEAT_BRIEF);
return ((!briefDescription().isEmpty() && repeatBrief) ||
!documentation().isEmpty() ||
!inbodyDocumentation().isEmpty()) &&
class GroupDef : public DefinitionMutable, public Definition
{
public:
- ~GroupDef() {}
-
virtual DefType definitionType() const = 0;
virtual QCString getOutputFileBase() const = 0;
virtual QCString anchor() const = 0;
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2022 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
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
#ifndef GROWBUF_H
#define GROWBUF_H
{
public:
GrowBuf() : m_str(0), m_pos(0), m_len(0) {}
- GrowBuf(uint initialSize) : m_pos(0), m_len(initialSize) { m_str=(char*)malloc(m_len); }
+ GrowBuf(size_t initialSize) : m_pos(0), m_len(initialSize) { m_str=static_cast<char*>(malloc(m_len)); }
~GrowBuf() { free(m_str); }
GrowBuf(const GrowBuf &other)
{
m_len = other.m_len;
m_pos = other.m_pos;
- m_str = (char*)malloc(m_len);
+ m_str = static_cast<char*>(malloc(m_len));
memcpy(m_str,other.m_str,m_len);
}
GrowBuf &operator=(const GrowBuf &other)
free(m_str);
m_len = other.m_len;
m_pos = other.m_pos;
- m_str = (char*)malloc(m_len);
+ m_str = static_cast<char*>(malloc(m_len));
memcpy(m_str,other.m_str,m_len);
}
return *this;
}
GrowBuf(GrowBuf &&other)
- : m_str(std::exchange(other.m_str,(char*)0))
+ : m_str(std::exchange(other.m_str,static_cast<char*>(0)))
, m_pos(std::exchange(other.m_pos,0))
, m_len(std::exchange(other.m_len,0))
{
return *this;
m_len = std::exchange(other.m_len,0);
m_pos = std::exchange(other.m_pos,0);
- m_str = std::exchange(other.m_str,(char*)0);
+ m_str = std::exchange(other.m_str,static_cast<char*>(0));
return *this;
}
- void reserve(uint size) { if (m_len<size) { m_len = size; m_str = (char*)realloc(m_str,m_len); } }
+ void reserve(size_t size) { if (m_len<size) { m_len = size; m_str = static_cast<char*>(realloc(m_str,m_len)); } }
void clear() { m_pos=0; }
- void addChar(char c) { if (m_pos>=m_len) { m_len+=GROW_AMOUNT; m_str = (char*)realloc(m_str,m_len); }
+ void addChar(char c) { if (m_pos>=m_len) { m_len+=GROW_AMOUNT; m_str = static_cast<char*>(realloc(m_str,m_len)); }
m_str[m_pos++]=c;
}
void addStr(const QCString &s) {
if (!s.isEmpty())
{
- uint l=s.length();
- if (m_pos+l>=m_len) { m_len+=l+GROW_AMOUNT; m_str = (char*)realloc(m_str,m_len); }
+ size_t l=s.length();
+ if (m_pos+l>=m_len) { m_len+=l+GROW_AMOUNT; m_str = static_cast<char*>(realloc(m_str,m_len)); }
strcpy(&m_str[m_pos],s.data());
m_pos+=l;
}
void addStr(const std::string &s) {
if (!s.empty())
{
- uint l=(uint)s.length();
- if (m_pos+l>=m_len) { m_len+=l+GROW_AMOUNT; m_str = (char*)realloc(m_str,m_len); }
+ size_t l=s.length();
+ if (m_pos+l>=m_len) { m_len+=l+GROW_AMOUNT; m_str = static_cast<char*>(realloc(m_str,m_len)); }
strcpy(&m_str[m_pos],s.c_str());
m_pos+=l;
}
void addStr(const char *s) {
if (s)
{
- uint l=(uint)strlen(s);
- if (m_pos+l>=m_len) { m_len+=l+GROW_AMOUNT; m_str = (char*)realloc(m_str,m_len); }
+ size_t l=strlen(s);
+ if (m_pos+l>=m_len) { m_len+=l+GROW_AMOUNT; m_str = static_cast<char*>(realloc(m_str,m_len)); }
strcpy(&m_str[m_pos],s);
m_pos+=l;
}
}
- void addStr(const char *s,uint n) {
+ void addStr(const char *s,size_t n) {
if (s)
{
- uint l=(uint)strlen(s);
+ size_t l=strlen(s);
if (n<l) l=n;
- if (m_pos+l>=m_len) { m_len+=l+GROW_AMOUNT; m_str = (char*)realloc(m_str,m_len); }
+ if (m_pos+l>=m_len) { m_len+=l+GROW_AMOUNT; m_str = static_cast<char*>(realloc(m_str,m_len)); }
strncpy(&m_str[m_pos],s,n);
m_pos+=l;
}
}
char *get() { return m_str; }
const char *get() const { return m_str; }
- uint getPos() const { return m_pos; }
- void setPos(uint newPos) { m_pos = newPos; }
- char at(uint i) const { return m_str[i]; }
+ size_t getPos() const { return m_pos; }
+ void setPos(size_t newPos) { m_pos = newPos; }
+ char at(size_t i) const { return m_str[i]; }
bool empty() const { return m_pos==0; }
private:
char *m_str;
- uint m_pos;
- uint m_len;
+ size_t m_pos;
+ size_t m_len;
};
#endif
--- /dev/null
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2022 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
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#ifndef GROWVECTOR_H
+#define GROWVECTOR_H
+
+#include <vector>
+#include <memory>
+#include <iterator>
+
+/** @brief std::vector like container optimised for pushing elements to the back.
+ *
+ * It differs from std::vector in that it can grow without invalidating
+ * pointers to its members just like std::deque and std::list.
+ *
+ * It differs from std::deque in that the value can be incomplete
+ * just like std::vector.
+ *
+ * It differs from std::list in that it does not need to allocate each node
+ * separately and provides random access to its members.
+ *
+ * It is implemented as a vector of chunks where each chunk is a fixed capacity vector of T.
+ */
+template<class T>
+class GrowVector
+{
+ private:
+ static const size_t chunkBits = 4; // a chunk holds 2^bits elements
+ static const size_t chunkSize = 1 << chunkBits;
+ static const size_t chunkMask = chunkSize-1;
+ struct Chunk
+ {
+ Chunk() { data.reserve(chunkSize); }
+ std::vector<T> data;
+ };
+ using ChunkPtr = std::unique_ptr<Chunk>;
+
+ public:
+ /// @brief bidirectional iterator
+ template<class C,class I>
+ class Iterator
+ {
+ public:
+ using iterator_category = std::bidirectional_iterator_tag;
+ using difference_type = std::ptrdiff_t;
+ using value_type = I;
+ using pointer = I*;
+ using reference = I&;
+
+ Iterator(C &vec,size_t pos) : m_vec(&vec), m_pos(pos) {}
+ Iterator(const Iterator &other) = default;
+ Iterator &operator=(const Iterator &other) = default;
+ reference operator*() const { return m_vec->at(m_pos); }
+ pointer operator->() { return &m_vec->at(m_pos); }
+ Iterator& operator++() { m_pos++; return *this; }
+ Iterator operator++(int) { Iterator tmp = *this; ++(*this); return tmp; }
+ Iterator& operator--() { m_pos--; return *this; }
+ Iterator operator--(int) { Iterator tmp = *this; --(*this); return tmp; }
+ friend bool operator== (const Iterator& a, const Iterator& b) { return a.m_pos == b.m_pos; };
+ friend bool operator!= (const Iterator& a, const Iterator& b) { return a.m_pos != b.m_pos; };
+
+ private:
+ C *m_vec;
+ size_t m_pos;
+ };
+ using iterator = Iterator<GrowVector,T>;
+ using const_iterator = Iterator<const GrowVector,const T>;
+
+ /// returns an iterator to the beginning
+ iterator begin() { return iterator(*this,0); }
+ /// returns an iterator to the beginning
+ const_iterator begin() const { return const_iterator(*this,0); }
+
+ /// returns an iterator to the end
+ iterator end() { return iterator(*this,size()); }
+ /// returns an iterator to the end
+ const_iterator end() const { return const_iterator(*this,size()); }
+
+ /// returns the number of elements
+ size_t size() const
+ {
+ return m_chunks.empty() ? 0 : (m_chunks.size()-1)*chunkSize +
+ m_chunks.back()->data.size();
+ }
+
+ /// adds an element to the end
+ void push_back(T &&t)
+ {
+ make_room();
+ m_chunks.back()->data.push_back(std::move(t));
+ }
+
+ /// constructs an element in-place at the end
+ template<class...Args>
+ void emplace_back(Args&&...args)
+ {
+ make_room();
+ m_chunks.back()->data.emplace_back(std::forward<Args>(args)...);
+ }
+
+ /// removes the last element
+ void pop_back()
+ {
+ m_chunks.back()->data.pop_back();
+ if (m_chunks.back()->data.size()==0) // remove chunk if empty
+ {
+ m_chunks.pop_back();
+ }
+ }
+
+ /// access specified element
+ T &at(size_t i) { return m_chunks.at(i>>chunkBits)->data.at(i&chunkMask); }
+ /// access specified element
+ const T &at(size_t i) const { return m_chunks.at(i>>chunkBits)->data.at(i&chunkMask); }
+
+ /// access the first element
+ T &front() { return m_chunks.front()->data.front(); }
+ /// access the first element
+ const T &front() const { return m_chunks.front()->data.front(); }
+
+ /// access the last element
+ T &back() { return m_chunks.back()->data.back(); }
+ /// access the last element
+ const T &back() const { return m_chunks.back()->data.back(); }
+
+ /// checks whether the container is empty
+ bool empty() const { return m_chunks.empty(); }
+
+ /// clears the contents
+ void clear() { m_chunks.clear(); }
+
+ private:
+ void make_room()
+ {
+ if (m_chunks.empty() ||
+ m_chunks.back()->data.size()==chunkSize) // add new chuck if needed
+ {
+ m_chunks.push_back(std::make_unique<Chunk>());
+ }
+ }
+ std::vector<ChunkPtr> m_chunks;
+};
+
+#endif
{
QCString url,symName=path;
QCString dir = g_inputDir.absPath();
- int dl=dir.length();
- if ((int)symName.length()>dl+1)
+ size_t dl=dir.length();
+ if (symName.length()>dl+1)
{
symName = symName.mid(dl+1);
}
return result;
}
-static bool mustBeOutsideParagraph(const DocNode *n)
-{
- switch (n->kind())
- {
- /* <ul> */
- case DocNode::Kind_HtmlList:
- case DocNode::Kind_SimpleList:
- case DocNode::Kind_AutoList:
- /* <dl> */
- case DocNode::Kind_SimpleSect:
- case DocNode::Kind_ParamSect:
- case DocNode::Kind_HtmlDescList:
- case DocNode::Kind_XRefItem:
- /* <table> */
- case DocNode::Kind_HtmlTable:
- /* <h?> */
- case DocNode::Kind_Section:
- case DocNode::Kind_HtmlHeader:
- /* \internal */
- case DocNode::Kind_Internal:
- /* <div> */
- case DocNode::Kind_Include:
- case DocNode::Kind_SecRefList:
- /* <hr> */
- case DocNode::Kind_HorRuler:
- /* CopyDoc gets paragraph markers from the wrapping DocPara node,
- * but needs to insert them for all documentation being copied to
- * preserve formatting.
- */
- case DocNode::Kind_Copy:
- /* <blockquote> */
- case DocNode::Kind_HtmlBlockQuote:
- /* \parblock */
- case DocNode::Kind_ParBlock:
- case DocNode::Kind_IncOperator:
- return TRUE;
- case DocNode::Kind_Verbatim:
- {
- DocVerbatim *dv = (DocVerbatim*)n;
- DocVerbatim::Type t = dv->type();
- if (t == DocVerbatim::JavaDocCode || t == DocVerbatim::JavaDocLiteral) return FALSE;
- return t!=DocVerbatim::HtmlOnly || dv->isBlock();
- }
- case DocNode::Kind_StyleChange:
- return ((DocStyleChange*)n)->style()==DocStyleChange::Preformatted ||
- ((DocStyleChange*)n)->style()==DocStyleChange::Div ||
- ((DocStyleChange*)n)->style()==DocStyleChange::Center;
- case DocNode::Kind_Formula:
- return !((DocFormula*)n)->isInline();
- case DocNode::Kind_Image:
- return !((DocImage*)n)->isInlineImage();
- default:
- break;
+
+
+static bool mustBeOutsideParagraph(const DocNodeVariant &n)
+{
+ //printf("mustBeOutsideParagraph(%s)=",docNodeName(n));
+ if (holds_one_of_alternatives< /* <ul> */ DocHtmlList, DocSimpleList, DocAutoList,
+ /* <dl> */ DocSimpleSect, DocParamSect, DocHtmlDescList, DocXRefItem,
+ /* <table> */ DocHtmlTable,
+ /* <h?> */ DocSection, DocHtmlHeader,
+ /* \internal */ DocInternal,
+ /* <div> */ DocInclude, DocSecRefList,
+ /* <hr> */ DocHorRuler,
+ /* <blockquote> */ DocHtmlBlockQuote,
+ /* \parblock */ DocParBlock,
+ DocIncOperator >(n))
+ {
+ return TRUE;
+ }
+ const DocVerbatim *dv = std::get_if<DocVerbatim>(&n);
+ if (dv)
+ {
+ DocVerbatim::Type t = dv->type();
+ if (t == DocVerbatim::JavaDocCode || t == DocVerbatim::JavaDocLiteral) return FALSE;
+ return t!=DocVerbatim::HtmlOnly || dv->isBlock();
+ }
+ const DocStyleChange *sc = std::get_if<DocStyleChange>(&n);
+ if (sc)
+ {
+ return sc->style()==DocStyleChange::Preformatted ||
+ sc->style()==DocStyleChange::Div ||
+ sc->style()==DocStyleChange::Center;
+ }
+ const DocFormula *df = std::get_if<DocFormula>(&n);
+ if (df)
+ {
+ return !df->isInline();
+ }
+ const DocImage *di = std::get_if<DocImage>(&n);
+ if (di)
+ {
+ return !di->isInlineImage();
}
return FALSE;
}
-static bool isDocVerbatimVisible(const DocVerbatim *s)
+static bool isDocVerbatimVisible(const DocVerbatim &s)
{
- switch(s->type())
+ switch (s.type())
{
case DocVerbatim::ManOnly:
case DocVerbatim::LatexOnly:
}
}
-static bool isDocIncludeVisible(const DocInclude *s)
+static bool isDocIncludeVisible(const DocInclude &s)
{
- switch (s->type())
+ switch (s.type())
{
case DocInclude::DontInclude:
case DocInclude::LatexInclude:
}
}
-static bool isDocIncOperatorVisible(const DocIncOperator *s)
+static bool isDocIncOperatorVisible(const DocIncOperator &s)
{
- switch (s->type())
+ switch (s.type())
{
case DocIncOperator::Skip:
return FALSE;
}
}
-static bool isInvisibleNode(const DocNode *node)
+static bool isInvisibleNode(const DocNodeVariant &node)
{
- return (node->kind()==DocNode::Kind_WhiteSpace)
- || // skip over image nodes that are not for HTML output
- (node->kind()==DocNode::Kind_Image && ((DocImage*)node)->type()!=DocImage::Html)
- || // skip over verbatim nodes that are not visible in the HTML output
- (node->kind()==DocNode::Kind_Verbatim && !isDocVerbatimVisible((DocVerbatim*)node))
- || // skip over include nodes that are not visible in the HTML output
- (node->kind()==DocNode::Kind_Include && !isDocIncludeVisible((DocInclude*)node))
- || // skip over include operator nodes that are not visible in the HTML output
- (node->kind()==DocNode::Kind_IncOperator && !isDocIncOperatorVisible((DocIncOperator*)node))
- ;
+ //printf("isInvisibleNode(%s)\n",docNodeName(node));
+ // skip over white space
+ const DocWhiteSpace *ws = std::get_if<DocWhiteSpace>(&node);
+ if (ws) return true;
+ // skip over image nodes that are not for HTML output
+ const DocImage *di = std::get_if<DocImage>(&node);
+ if (di) return di->type()!=DocImage::Html;
+ // skip over verbatim nodes that are not visible in the HTML output
+ const DocVerbatim *dv = std::get_if<DocVerbatim>(&node);
+ if (dv) return !isDocVerbatimVisible(*dv);
+ // skip over include nodes that are not visible in the HTML output
+ const DocInclude *dinc = std::get_if<DocInclude>(&node);
+ if (dinc) return !isDocIncludeVisible(*dinc);
+ const DocIncOperator *dio = std::get_if<DocIncOperator>(&node);
+ // skip over include operator nodes that are not visible in the HTML output
+ if (dio) return !isDocIncOperatorVisible(*dio);
+ return false;
}
static void mergeHtmlAttributes(const HtmlAttribList &attribs, HtmlAttribList &mergeInto)
{
for (const auto &att : attribs)
{
- auto it = std::find_if(mergeInto.begin(),mergeInto.end(),
+ auto it = std::find_if(std::begin(mergeInto),std::end(mergeInto),
[&att](const auto &opt) { return opt.name==att.name; });
- if (it!=mergeInto.end()) // attribute name already in mergeInto
+ if (it!=std::end(mergeInto)) // attribute name already in mergeInto
{
it->value = it->value + " " + att.value;
}
HtmlDocVisitor::HtmlDocVisitor(TextStream &t,CodeOutputInterface &ci,
const Definition *ctx)
- : DocVisitor(DocVisitor_Html), m_t(t), m_ci(ci), m_ctx(ctx)
+ : m_t(t), m_ci(ci), m_ctx(ctx)
{
if (ctx) m_langExt=ctx->getDefFileExtension();
}
+template<class T>
+void HtmlDocVisitor::visitCaption(TextStream &t,const T &n)
+{
+ if (n.hasCaption())
+ {
+ t << "<div class=\"caption\">\n";
+ for (const auto &child : n.children())
+ {
+ std::visit(*this, child);
+ }
+ t << "</div>\n";
+ }
+}
+
//--------------------------------------
// visitor functions for leaf nodes
//--------------------------------------
-void HtmlDocVisitor::visit(DocWord *w)
+void HtmlDocVisitor::operator()(const DocWord &w)
{
- //printf("word: %s\n",qPrint(w->word()));
if (m_hide) return;
- filter(w->word());
+ filter(w.word());
}
-void HtmlDocVisitor::visit(DocLinkedWord *w)
+void HtmlDocVisitor::operator()(const DocLinkedWord &w)
{
if (m_hide) return;
- //printf("linked word: %s\n",qPrint(w->word()));
- startLink(w->ref(),w->file(),w->relPath(),w->anchor(),w->tooltip());
- filter(w->word());
+ //printf("linked word: %s\n",qPrint(w.word()));
+ startLink(w.ref(),w.file(),w.relPath(),w.anchor(),w.tooltip());
+ filter(w.word());
endLink();
}
-void HtmlDocVisitor::visit(DocWhiteSpace *w)
+void HtmlDocVisitor::operator()(const DocWhiteSpace &w)
{
if (m_hide) return;
if (m_insidePre)
{
- m_t << w->chars();
+ m_t << w.chars();
}
else
{
}
}
-void HtmlDocVisitor::visit(DocSymbol *s)
+void HtmlDocVisitor::operator()(const DocSymbol &s)
{
if (m_hide) return;
if (m_insideTitle &&
- (s->symbol()==DocSymbol::Sym_Quot || s->symbol()==DocSymbol::Sym_quot)) // escape "'s inside title="..."
+ (s.symbol()==HtmlEntityMapper::Sym_Quot || s.symbol()==HtmlEntityMapper::Sym_quot)) // escape "'s inside title="..."
{
m_t << """;
}
else
{
- const char *res = HtmlEntityMapper::instance()->html(s->symbol());
+ const char *res = HtmlEntityMapper::instance()->html(s.symbol());
if (res)
{
m_t << res;
}
else
{
- err("HTML: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(s->symbol(),TRUE));
+ err("HTML: non supported HTML-entity found: %s\n",
+ HtmlEntityMapper::instance()->html(s.symbol(),TRUE));
}
}
}
-void HtmlDocVisitor::visit(DocEmoji *s)
+void HtmlDocVisitor::operator()(const DocEmoji &s)
{
if (m_hide) return;
- const char *res = EmojiEntityMapper::instance()->unicode(s->index());
+ const char *res = EmojiEntityMapper::instance()->unicode(s.index());
if (res)
{
- m_t << "<span class=\"emoji\">"<<res<<"</span>";
+ m_t << "<span class=\"emoji\">" << res << "</span>";
}
else
{
- m_t << s->name();
+ m_t << s.name();
}
}
}
}
-void HtmlDocVisitor::visit(DocURL *u)
+void HtmlDocVisitor::operator()(const DocURL &u)
{
if (m_hide) return;
- if (u->isEmail()) // mail address
+ if (u.isEmail()) // mail address
{
- QCString url = u->url();
+ QCString url = u.url();
// obfuscate the mail address link
writeObfuscatedMailAddress(url);
if (!Config_getBool(OBFUSCATE_EMAILS))
else // web address
{
m_t << "<a href=\"";
- m_t << u->url() << "\">";
- filter(u->url());
+ m_t << u.url() << "\">";
+ filter(u.url());
m_t << "</a>";
}
}
-void HtmlDocVisitor::visit(DocLineBreak *br)
+void HtmlDocVisitor::operator()(const DocLineBreak &br)
{
if (m_hide) return;
- m_t << "<br "<< htmlAttribsToString(br->attribs()) << " />\n";
+ m_t << "<br "<< htmlAttribsToString(br.attribs()) << " />\n";
}
-void HtmlDocVisitor::visit(DocHorRuler *hr)
+void HtmlDocVisitor::operator()(const DocHorRuler &hr)
{
if (m_hide) return;
forceEndParagraph(hr);
- m_t << "<hr "<< htmlAttribsToString(hr->attribs()) << " />\n";
+ m_t << "<hr "<< htmlAttribsToString(hr.attribs()) << " />\n";
forceStartParagraph(hr);
}
-void HtmlDocVisitor::visit(DocStyleChange *s)
+void HtmlDocVisitor::operator()(const DocStyleChange &s)
{
if (m_hide) return;
- switch (s->style())
+ switch (s.style())
{
case DocStyleChange::Bold:
- if (s->enable()) m_t << "<b" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</b>";
+ if (s.enable()) m_t << "<b" << htmlAttribsToString(s.attribs()) << ">"; else m_t << "</b>";
break;
case DocStyleChange::S:
- if (s->enable()) m_t << "<s" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</s>";
+ if (s.enable()) m_t << "<s" << htmlAttribsToString(s.attribs()) << ">"; else m_t << "</s>";
break;
case DocStyleChange::Strike:
- if (s->enable()) m_t << "<strike" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</strike>";
+ if (s.enable()) m_t << "<strike" << htmlAttribsToString(s.attribs()) << ">"; else m_t << "</strike>";
break;
case DocStyleChange::Del:
- if (s->enable()) m_t << "<del" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</del>";
+ if (s.enable()) m_t << "<del" << htmlAttribsToString(s.attribs()) << ">"; else m_t << "</del>";
break;
case DocStyleChange::Underline:
- if (s->enable()) m_t << "<u" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</u>";
+ if (s.enable()) m_t << "<u" << htmlAttribsToString(s.attribs()) << ">"; else m_t << "</u>";
break;
case DocStyleChange::Ins:
- if (s->enable()) m_t << "<ins" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</ins>";
+ if (s.enable()) m_t << "<ins" << htmlAttribsToString(s.attribs()) << ">"; else m_t << "</ins>";
break;
case DocStyleChange::Italic:
- if (s->enable()) m_t << "<em" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</em>";
+ if (s.enable()) m_t << "<em" << htmlAttribsToString(s.attribs()) << ">"; else m_t << "</em>";
break;
case DocStyleChange::Code:
- if (s->enable()) m_t << "<code" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</code>";
+ if (s.enable()) m_t << "<code" << htmlAttribsToString(s.attribs()) << ">"; else m_t << "</code>";
break;
case DocStyleChange::Subscript:
- if (s->enable()) m_t << "<sub" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</sub>";
+ if (s.enable()) m_t << "<sub" << htmlAttribsToString(s.attribs()) << ">"; else m_t << "</sub>";
break;
case DocStyleChange::Superscript:
- if (s->enable()) m_t << "<sup" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</sup>";
+ if (s.enable()) m_t << "<sup" << htmlAttribsToString(s.attribs()) << ">"; else m_t << "</sup>";
break;
case DocStyleChange::Center:
- if (s->enable())
+ if (s.enable())
{
forceEndParagraph(s);
- m_t << "<center" << htmlAttribsToString(s->attribs()) << ">";
+ m_t << "<center" << htmlAttribsToString(s.attribs()) << ">";
}
else
{
}
break;
case DocStyleChange::Small:
- if (s->enable()) m_t << "<small" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</small>";
+ if (s.enable()) m_t << "<small" << htmlAttribsToString(s.attribs()) << ">"; else m_t << "</small>";
break;
case DocStyleChange::Cite:
- if (s->enable()) m_t << "<cite" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</cite>";
+ if (s.enable()) m_t << "<cite" << htmlAttribsToString(s.attribs()) << ">"; else m_t << "</cite>";
break;
case DocStyleChange::Preformatted:
- if (s->enable())
+ if (s.enable())
{
forceEndParagraph(s);
- m_t << "<pre" << htmlAttribsToString(s->attribs()) << ">";
+ m_t << "<pre" << htmlAttribsToString(s.attribs()) << ">";
m_insidePre=TRUE;
}
else
}
break;
case DocStyleChange::Div:
- if (s->enable())
+ if (s.enable())
{
forceEndParagraph(s);
- m_t << "<div" << htmlAttribsToString(s->attribs()) << ">";
+ m_t << "<div" << htmlAttribsToString(s.attribs()) << ">";
}
else
{
}
break;
case DocStyleChange::Span:
- if (s->enable()) m_t << "<span" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</span>";
+ if (s.enable()) m_t << "<span" << htmlAttribsToString(s.attribs()) << ">"; else m_t << "</span>";
break;
case DocStyleChange::Details:
- if (s->enable()) m_t << "<details" << htmlAttribsToString(s->attribs()) << ">\n"; else m_t << "</details>\n";
+ if (s.enable()) m_t << "<details" << htmlAttribsToString(s.attribs()) << ">\n"; else m_t << "</details>\n";
break;
case DocStyleChange::Summary:
- if (s->enable()) m_t << "<summary" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</summary>";
+ if (s.enable()) m_t << "<summary" << htmlAttribsToString(s.attribs()) << ">"; else m_t << "</summary>";
break;
}
}
+///--------------------------------------------------------------------------------------
-static void visitPreCaption(TextStream &t, DocVerbatim *s)
-{
- if (s->hasCaption())
- {
- t << "<div class=\"caption\">\n";
- }
-}
-
-
-static void visitPostCaption(TextStream &t, DocVerbatim *s)
-{
- if (s->hasCaption())
- {
- t << "</div>\n";
- }
-}
-
-
-static void visitCaption(HtmlDocVisitor *parent, DocNodeList &children)
-{
- for (const auto &n : children) n->accept(parent);
-}
-
-void HtmlDocVisitor::visit(DocVerbatim *s)
+void HtmlDocVisitor::operator()(const DocVerbatim &s)
{
if (m_hide) return;
QCString lang = m_langExt;
- if (!s->language().isEmpty()) // explicit language setting
+ if (!s.language().isEmpty()) // explicit language setting
{
- lang = s->language();
+ lang = s.language();
}
SrcLangExt langExt = getLanguageFromCodeLang(lang);
- switch(s->type())
+ switch(s.type())
{
case DocVerbatim::Code:
forceEndParagraph(s);
m_ci.startCodeFragment("DoxyCode");
getCodeParser(lang).parseCode(m_ci,
- s->context(),
- s->text(),
+ s.context(),
+ s.text(),
langExt,
- s->isExample(),
- s->exampleFile(),
+ s.isExample(),
+ s.exampleFile(),
0, // fileDef
-1, // startLine
-1, // endLine
case DocVerbatim::Verbatim:
forceEndParagraph(s);
m_t << "<pre class=\"fragment\">";
- filter(s->text());
+ filter(s.text());
m_t << "</pre>";
forceStartParagraph(s);
break;
case DocVerbatim::JavaDocLiteral:
- filter(s->text(), true);
+ filter(s.text(), true);
break;
case DocVerbatim::JavaDocCode:
m_t << "<code class=\"JavaDocCode\">";
- filter(s->text(), true);
+ filter(s.text(), true);
m_t << "</code>";
break;
case DocVerbatim::HtmlOnly:
{
- if (s->isBlock()) forceEndParagraph(s);
- m_t << s->text();
- if (s->isBlock()) forceStartParagraph(s);
+ if (s.isBlock()) forceEndParagraph(s);
+ m_t << s.text();
+ if (s.isBlock()) forceStartParagraph(s);
}
break;
case DocVerbatim::ManOnly:
}
else
{
- QCString stext = s->text();
+ QCString stext = s.text();
file.write( stext.data(), stext.length() );
file.close();
m_t << "<div class=\"dotgraph\">\n";
- writeDotFile(fileName,s->relPath(),s->context(),s->srcFile(),s->srcLine());
- visitPreCaption(m_t, s);
- visitCaption(this, s->children());
- visitPostCaption(m_t, s);
+ writeDotFile(fileName,s.relPath(),s.context(),s.srcFile(),s.srcLine());
+ visitCaption(m_t, s);
m_t << "</div>\n";
if (Config_getBool(DOT_CLEANUP)) Dir().remove(fileName.str());
else
{
QCString text = "msc {";
- text+=s->text();
+ text+=s.text();
text+="}";
file.write( text.data(), text.length() );
file.close();
m_t << "<div class=\"mscgraph\">\n";
- writeMscFile(baseName+".msc",s->relPath(),s->context(),s->srcFile(),s->srcLine());
- visitPreCaption(m_t, s);
- visitCaption(this, s->children());
- visitPostCaption(m_t, s);
+ writeMscFile(baseName+".msc",s.relPath(),s.context(),s.srcFile(),s.srcLine());
+ visitCaption(m_t, s);
m_t << "</div>\n";
if (Config_getBool(DOT_CLEANUP)) Dir().remove(baseName.str()+".msc");
case DocVerbatim::PlantUML:
{
forceEndParagraph(s);
- static QCString htmlOutput = Config_getString(HTML_OUTPUT);
+ QCString htmlOutput = Config_getString(HTML_OUTPUT);
QCString imgExt = getDotImageExtension();
PlantumlManager::OutputFormat format = PlantumlManager::PUML_BITMAP; // default : PUML_BITMAP
if (imgExt=="svg")
format = PlantumlManager::PUML_SVG;
}
QCString baseName = PlantumlManager::instance().writePlantUMLSource(
- htmlOutput,s->exampleFile(),
- s->text(),format,s->engine(),s->srcFile(),s->srcLine());
+ htmlOutput,s.exampleFile(),
+ s.text(),format,s.engine(),s.srcFile(),s.srcLine());
m_t << "<div class=\"plantumlgraph\">\n";
- writePlantUMLFile(baseName,s->relPath(),s->context(),s->srcFile(),s->srcLine());
- visitPreCaption(m_t, s);
- visitCaption(this, s->children());
- visitPostCaption(m_t, s);
+ writePlantUMLFile(baseName,s.relPath(),s.context(),s.srcFile(),s.srcLine());
+ visitCaption(m_t, s);
m_t << "</div>\n";
forceStartParagraph(s);
}
}
}
-void HtmlDocVisitor::visit(DocAnchor *anc)
+void HtmlDocVisitor::operator()(const DocAnchor &anc)
{
if (m_hide) return;
- m_t << "<a class=\"anchor\" id=\"" << anc->anchor() << "\"" << htmlAttribsToString(anc->attribs()) << "></a>";
+ m_t << "<a class=\"anchor\" id=\"" << anc.anchor() << "\"" << htmlAttribsToString(anc.attribs()) << "></a>";
}
-void HtmlDocVisitor::visit(DocInclude *inc)
+void HtmlDocVisitor::operator()(const DocInclude &inc)
{
if (m_hide) return;
- SrcLangExt langExt = getLanguageFromFileName(inc->extension());
- switch(inc->type())
+ SrcLangExt langExt = getLanguageFromFileName(inc.extension());
+ switch(inc.type())
{
case DocInclude::Include:
forceEndParagraph(inc);
m_ci.startCodeFragment("DoxyCode");
- getCodeParser(inc->extension()).parseCode(m_ci,
- inc->context(),
- inc->text(),
+ getCodeParser(inc.extension()).parseCode(m_ci,
+ inc.context(),
+ inc.text(),
langExt,
- inc->isExample(),
- inc->exampleFile(),
+ inc.isExample(),
+ inc.exampleFile(),
0, // fileDef
-1, // startLine
-1, // endLine
{
forceEndParagraph(inc);
m_ci.startCodeFragment("DoxyCode");
- FileInfo cfi( inc->file().str() );
+ FileInfo cfi( inc.file().str() );
FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
- getCodeParser(inc->extension()).parseCode(m_ci,
- inc->context(),
- inc->text(),
+ getCodeParser(inc.extension()).parseCode(m_ci,
+ inc.context(),
+ inc.text(),
langExt,
- inc->isExample(),
- inc->exampleFile(),
+ inc.isExample(),
+ inc.exampleFile(),
fd, // fileDef,
-1, // start line
-1, // end line
break;
case DocInclude::HtmlInclude:
{
- if (inc->isBlock()) forceEndParagraph(inc);
- m_t << inc->text();
- if (inc->isBlock()) forceStartParagraph(inc);
+ if (inc.isBlock()) forceEndParagraph(inc);
+ m_t << inc.text();
+ if (inc.isBlock()) forceStartParagraph(inc);
}
break;
case DocInclude::VerbInclude:
forceEndParagraph(inc);
m_t << "<pre class=\"fragment\">";
- filter(inc->text());
+ filter(inc.text());
m_t << "</pre>";
forceStartParagraph(inc);
break;
{
forceEndParagraph(inc);
m_ci.startCodeFragment("DoxyCode");
- getCodeParser(inc->extension()).parseCode(m_ci,
- inc->context(),
- extractBlock(inc->text(),inc->blockId()),
+ getCodeParser(inc.extension()).parseCode(m_ci,
+ inc.context(),
+ extractBlock(inc.text(),inc.blockId()),
langExt,
- inc->isExample(),
- inc->exampleFile(),
+ inc.isExample(),
+ inc.exampleFile(),
0,
-1, // startLine
-1, // endLine
{
forceEndParagraph(inc);
m_ci.startCodeFragment("DoxyCode");
- FileInfo cfi( inc->file().str() );
+ FileInfo cfi( inc.file().str() );
FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
- getCodeParser(inc->extension()).parseCode(m_ci,
- inc->context(),
- extractBlock(inc->text(),inc->blockId()),
+ getCodeParser(inc.extension()).parseCode(m_ci,
+ inc.context(),
+ extractBlock(inc.text(),inc.blockId()),
langExt,
- inc->isExample(),
- inc->exampleFile(),
+ inc.isExample(),
+ inc.exampleFile(),
fd,
- lineBlock(inc->text(),inc->blockId()),
+ lineBlock(inc.text(),inc.blockId()),
-1, // endLine
FALSE, // inlineFragment
0, // memberDef
}
}
-void HtmlDocVisitor::visit(DocIncOperator *op)
+void HtmlDocVisitor::operator()(const DocIncOperator &op)
{
//printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
- // op->type(),op->isFirst(),op->isLast(),qPrint(op->text()));
- if (op->isFirst())
+ // op.type(),op.isFirst(),op.isLast(),qPrint(op.text()));
+ if (op.isFirst())
{
forceEndParagraph(op);
if (!m_hide) m_ci.startCodeFragment("DoxyCode");
pushHidden(m_hide);
m_hide=TRUE;
}
- QCString locLangExt = getFileNameExtension(op->includeFileName());
+ QCString locLangExt = getFileNameExtension(op.includeFileName());
if (locLangExt.isEmpty()) locLangExt = m_langExt;
SrcLangExt langExt = getLanguageFromFileName(locLangExt);
- if (op->type()!=DocIncOperator::Skip)
+ if (op.type()!=DocIncOperator::Skip)
{
m_hide = popHidden();
if (!m_hide)
{
FileDef *fd = 0;
- if (!op->includeFileName().isEmpty())
+ if (!op.includeFileName().isEmpty())
{
- FileInfo cfi( op->includeFileName().str() );
+ FileInfo cfi( op.includeFileName().str() );
fd = createFileDef( cfi.dirPath(), cfi.fileName() );
}
getCodeParser(locLangExt).parseCode(
m_ci,
- op->context(),
- op->text(),
+ op.context(),
+ op.text(),
langExt,
- op->isExample(),
- op->exampleFile(),
+ op.isExample(),
+ op.exampleFile(),
fd, // fileDef
- op->line(), // startLine
+ op.line(), // startLine
-1, // endLine
FALSE, // inline fragment
0, // memberDef
- op->showLineNo(), // show line numbers
+ op.showLineNo(), // show line numbers
m_ctx // search context
);
if (fd) delete fd;
pushHidden(m_hide);
m_hide=TRUE;
}
- if (op->isLast())
+ if (op.isLast())
{
m_hide = popHidden();
if (!m_hide) m_ci.endCodeFragment("DoxyCode");
}
}
-void HtmlDocVisitor::visit(DocFormula *f)
+void HtmlDocVisitor::operator()(const DocFormula &f)
{
if (m_hide) return;
- bool bDisplay = !f->isInline();
+ bool bDisplay = !f.isInline();
if (bDisplay)
{
forceEndParagraph(f);
if (Config_getBool(USE_MATHJAX))
{
- QCString text = f->text();
+ QCString text = f.text();
bool closeInline = FALSE;
if (!bDisplay && !text.isEmpty() && text.at(0)=='$' &&
text.at(text.length()-1)=='$')
m_t << "<img class=\"formula"
<< (bDisplay ? "Dsp" : "Inl");
m_t << "\" alt=\"";
- filterQuotedCdataAttr(f->text());
+ filterQuotedCdataAttr(f.text());
m_t << "\"";
- m_t << " src=\"" << f->relPath() << f->name();
+ m_t << " src=\"" << f.relPath() << f.name();
if (Config_getEnum(HTML_FORMULA_FORMAT)==HTML_FORMULA_FORMAT_t::svg)
{
m_t << ".svg";
{
m_t << ".png";
}
- FormulaManager::DisplaySize size = FormulaManager::instance().displaySize(f->id());
+ FormulaManager::DisplaySize size = FormulaManager::instance().displaySize(f.id());
if (size.width!=-1)
{
m_t << "\" width=\"" << size.width;
}
}
-void HtmlDocVisitor::visit(DocIndexEntry *e)
+void HtmlDocVisitor::operator()(const DocIndexEntry &e)
{
- QCString anchor = convertIndexWordToAnchor(e->entry());
- if (e->member())
+ QCString anchor = convertIndexWordToAnchor(e.entry());
+ if (e.member())
{
- anchor.prepend(e->member()->anchor()+"_");
+ anchor.prepend(e.member()->anchor()+"_");
}
m_t << "<a id=\"" << anchor << "\" name=\"" << anchor << "\"></a>";
//printf("*** DocIndexEntry: word='%s' scope='%s' member='%s'\n",
- // qPrint(e->entry()),
- // e->scope() ? qPrint(e->scope()->name()) : "<null>",
- // e->member() ? qPrint(e->member()->name()) : "<null>"
+ // qPrint(e.entry()),
+ // e.scope() ? qPrint(e.scope()->name()) : "<null>",
+ // e.member() ? qPrint(e.member()->name()) : "<null>"
// );
- Doxygen::indexList->addIndexItem(e->scope(),e->member(),anchor,e->entry());
+ Doxygen::indexList->addIndexItem(e.scope(),e.member(),anchor,e.entry());
}
-void HtmlDocVisitor::visit(DocSimpleSectSep *)
+void HtmlDocVisitor::operator()(const DocSimpleSectSep &)
{
m_t << "</dd>\n";
m_t << "<dd>\n";
}
-void HtmlDocVisitor::visit(DocCite *cite)
+void HtmlDocVisitor::operator()(const DocCite &cite)
{
if (m_hide) return;
- if (!cite->file().isEmpty())
+ if (!cite.file().isEmpty())
{
- startLink(cite->ref(),cite->file(),cite->relPath(),cite->anchor());
+ startLink(cite.ref(),cite.file(),cite.relPath(),cite.anchor());
}
else
{
m_t << "<b>[";
}
- filter(cite->text());
- if (!cite->file().isEmpty())
+ filter(cite.text());
+ if (!cite.file().isEmpty())
{
endLink();
}
//--------------------------------------
-void HtmlDocVisitor::visitPre(DocAutoList *l)
+void HtmlDocVisitor::operator()(const DocAutoList &l)
{
//printf("DocAutoList::visitPre\n");
if (m_hide) return;
forceEndParagraph(l);
- if (l->isEnumList())
+ if (l.isEnumList())
{
//
// Do list type based on depth:
// A.
// 1. (repeat)...
//
- m_t << "<ol type=\"" << types[l->depth() % NUM_HTML_LIST_TYPES] << "\">";
+ m_t << "<ol type=\"" << types[l.depth() % NUM_HTML_LIST_TYPES] << "\">";
}
else
{
m_t << "<ul>";
}
- if (!l->isPreformatted()) m_t << "\n";
-}
-
-void HtmlDocVisitor::visitPost(DocAutoList *l)
-{
- //printf("DocAutoList::visitPost\n");
- if (m_hide) return;
- if (l->isEnumList())
+ if (!l.isPreformatted()) m_t << "\n";
+ visitChildren(l);
+ if (l.isEnumList())
{
m_t << "</ol>";
}
{
m_t << "</ul>";
}
- if (!l->isPreformatted()) m_t << "\n";
+ if (!l.isPreformatted()) m_t << "\n";
forceStartParagraph(l);
}
-void HtmlDocVisitor::visitPre(DocAutoListItem *)
+void HtmlDocVisitor::operator()(const DocAutoListItem &li)
{
if (m_hide) return;
m_t << "<li>";
+ visitChildren(li);
+ m_t << "</li>";
+ if (!li.isPreformatted()) m_t << "\n";
}
-void HtmlDocVisitor::visitPost(DocAutoListItem *li)
+template<class Node>
+static bool holds_value(const Node *val,const DocNodeVariant &v)
{
- if (m_hide) return;
- m_t << "</li>";
- if (!li->isPreformatted()) m_t << "\n";
+ bool b = std::visit([&](auto &&x) {
+ //printf("holds_value val=%s (%p) v=%s (%p)\n",
+ // docNodeName(*val),(void*)val,docNodeName(v),(void *)&x);
+ return val==static_cast<const DocNode*>(&x);
+ }, v);
+ return b;
}
template<class T>
-bool isFirstChildNode(T *parent, DocNode *node)
+bool isFirstChildNode(const T *parent, const DocPara &node)
{
- return !parent->children().empty() && parent->children().front().get()==node;
+ return !parent->children().empty() && holds_value(&node,parent->children().front());
}
template<class T>
-bool isLastChildNode(T *parent, DocNode *node)
+bool isLastChildNode(const T *parent, const DocPara &node)
{
- return !parent->children().empty() && parent->children().back().get()==node;
+ return !parent->children().empty() && holds_value(&node,parent->children().back());
}
-bool isSeparatedParagraph(DocSimpleSect *parent,DocPara *par)
+bool isSeparatedParagraph(const DocSimpleSect &parent,const DocPara &par)
{
- const DocNodeList &nodes = parent->children();
- auto it = std::find_if(nodes.begin(),nodes.end(),[par](const auto &n) { return n.get()==par; });
- if (it==nodes.end()) return FALSE;
- size_t i = it - nodes.begin();
- size_t count = parent->children().size();
- if (count>1 && i==0) // first node
+ const DocNodeList &nodes = parent.children();
+ auto it = std::find_if(std::begin(nodes),std::end(nodes),[&par](const auto &n) { return holds_value(&par,n); });
+ if (it==std::end(nodes)) return FALSE;
+ size_t count = parent.children().size();
+ auto isSeparator = [](auto &&it_) { return std::get_if<DocSimpleSectSep>(&(*it_))!=0; };
+ if (count>1 && it==std::begin(nodes)) // it points to first node
{
- if (nodes.at(i+1)->kind()==DocNode::Kind_SimpleSectSep)
- {
- return TRUE;
- }
+ return isSeparator(std::next(it));
}
- else if (count>1 && i==count-1) // last node
+ else if (count>1 && it==std::prev(std::end(nodes))) // it points to last node
{
- if (nodes.at(i-1)->kind()==DocNode::Kind_SimpleSectSep)
- {
- return TRUE;
- }
+ return isSeparator(std::prev(it));
}
- else if (count>2 && i>0 && i<count-1) // intermediate node
+ else if (count>2 && it!=std::begin(nodes) && it!=std::prev(std::end(nodes))) // it points to intermediate node
{
- if (nodes.at(i-1)->kind()==DocNode::Kind_SimpleSectSep &&
- nodes.at(i+1)->kind()==DocNode::Kind_SimpleSectSep)
- {
- return TRUE;
- }
+ return isSeparator(std::prev(it)) && isSeparator(std::next(it));
}
- return FALSE;
+ return false;
}
-static int getParagraphContext(DocPara *p,bool &isFirst,bool &isLast)
+static int getParagraphContext(const DocPara &p,bool &isFirst,bool &isLast)
{
int t=0;
isFirst=FALSE;
isLast=FALSE;
- if (p && p->parent())
+ if (p.parent())
{
- switch (p->parent()->kind())
+ const auto parBlock = std::get_if<DocParBlock>(p.parent());
+ if (parBlock)
{
- case DocNode::Kind_ParBlock:
- { // hierarchy: node N -> para -> parblock -> para
- // adapt return value to kind of N
- DocNode::Kind kind = DocNode::Kind_Para;
- if ( p->parent()->parent() && p->parent()->parent()->parent() )
- {
- kind = p->parent()->parent()->parent()->kind();
- }
- isFirst=isFirstChildNode((DocParBlock*)p->parent(),p);
- isLast =isLastChildNode ((DocParBlock*)p->parent(),p);
- t=NONE;
- if (isFirst)
- {
- if (kind==DocNode::Kind_HtmlListItem ||
- kind==DocNode::Kind_SecRefItem)
- {
- t=STARTLI;
- }
- else if (kind==DocNode::Kind_HtmlDescData ||
- kind==DocNode::Kind_XRefItem ||
- kind==DocNode::Kind_SimpleSect)
- {
- t=STARTDD;
- }
- else if (kind==DocNode::Kind_HtmlCell ||
- kind==DocNode::Kind_ParamList)
- {
- t=STARTTD;
- }
- }
- if (isLast)
- {
- if (kind==DocNode::Kind_HtmlListItem ||
- kind==DocNode::Kind_SecRefItem)
- {
- t=ENDLI;
- }
- else if (kind==DocNode::Kind_HtmlDescData ||
- kind==DocNode::Kind_XRefItem ||
- kind==DocNode::Kind_SimpleSect)
- {
- t=ENDDD;
- }
- else if (kind==DocNode::Kind_HtmlCell ||
- kind==DocNode::Kind_ParamList)
- {
- t=ENDTD;
- }
- }
- if (!isFirst && !isLast)
- {
- if (kind==DocNode::Kind_HtmlListItem ||
- kind==DocNode::Kind_SecRefItem)
- {
- t=INTERLI;
- }
- else if (kind==DocNode::Kind_HtmlDescData ||
- kind==DocNode::Kind_XRefItem ||
- kind==DocNode::Kind_SimpleSect)
- {
- t=INTERDD;
- }
- else if (kind==DocNode::Kind_HtmlCell ||
- kind==DocNode::Kind_ParamList)
- {
- t=INTERTD;
- }
- }
- break;
- }
- case DocNode::Kind_AutoListItem:
- isFirst=isFirstChildNode((DocAutoListItem*)p->parent(),p);
- isLast =isLastChildNode ((DocAutoListItem*)p->parent(),p);
- t=STARTLI; // not used
- break;
- case DocNode::Kind_SimpleListItem:
- isFirst=TRUE;
- isLast =TRUE;
- t=STARTLI; // not used
- break;
- case DocNode::Kind_ParamList:
- isFirst=TRUE;
- isLast =TRUE;
- t=STARTLI; // not used
- break;
- case DocNode::Kind_HtmlListItem:
- isFirst=isFirstChildNode((DocHtmlListItem*)p->parent(),p);
- isLast =isLastChildNode ((DocHtmlListItem*)p->parent(),p);
- if (isFirst) t=STARTLI;
- if (isLast) t=ENDLI;
- if (!isFirst && !isLast) t = INTERLI;
- break;
- case DocNode::Kind_SecRefItem:
- isFirst=isFirstChildNode((DocSecRefItem*)p->parent(),p);
- isLast =isLastChildNode ((DocSecRefItem*)p->parent(),p);
- if (isFirst) t=STARTLI;
- if (isLast) t=ENDLI;
- if (!isFirst && !isLast) t = INTERLI;
- break;
- case DocNode::Kind_HtmlDescData:
- isFirst=isFirstChildNode((DocHtmlDescData*)p->parent(),p);
- isLast =isLastChildNode ((DocHtmlDescData*)p->parent(),p);
- if (isFirst) t=STARTDD;
- if (isLast) t=ENDDD;
- if (!isFirst && !isLast) t = INTERDD;
- break;
- case DocNode::Kind_XRefItem:
- isFirst=isFirstChildNode((DocXRefItem*)p->parent(),p);
- isLast =isLastChildNode ((DocXRefItem*)p->parent(),p);
- if (isFirst) t=STARTDD;
- if (isLast) t=ENDDD;
- if (!isFirst && !isLast) t = INTERDD;
- break;
- case DocNode::Kind_SimpleSect:
- isFirst=isFirstChildNode((DocSimpleSect*)p->parent(),p);
- isLast =isLastChildNode ((DocSimpleSect*)p->parent(),p);
- if (isFirst) t=STARTDD;
- if (isLast) t=ENDDD;
- if (isSeparatedParagraph((DocSimpleSect*)p->parent(),p))
- // if the paragraph is enclosed with separators it will
- // be included in <dd>..</dd> so avoid addition paragraph
- // markers
- {
- isFirst=isLast=TRUE;
- }
- if (!isFirst && !isLast) t = INTERDD;
- break;
- case DocNode::Kind_HtmlCell:
- isFirst=isFirstChildNode((DocHtmlCell*)p->parent(),p);
- isLast =isLastChildNode ((DocHtmlCell*)p->parent(),p);
- if (isFirst) t=STARTTD;
- if (isLast) t=ENDTD;
- if (!isFirst && !isLast) t = INTERTD;
- break;
- default:
- break;
+ // hierarchy: node N -> para -> parblock -> para
+ // adapt return value to kind of N
+ const DocNodeVariant *p3 = 0;
+ if (::parent(p.parent()) && ::parent(::parent(p.parent())) )
+ {
+ p3 = ::parent(::parent(p.parent()));
+ }
+ isFirst=isFirstChildNode(parBlock,p);
+ isLast =isLastChildNode (parBlock,p);
+ bool isLI = p3!=0 && holds_one_of_alternatives<DocHtmlListItem,DocSecRefItem>(*p3);
+ bool isDD = p3!=0 && holds_one_of_alternatives<DocHtmlDescData,DocXRefItem,DocSimpleSect>(*p3);
+ bool isTD = p3!=0 && holds_one_of_alternatives<DocHtmlCell,DocParamList>(*p3);
+ t=NONE;
+ if (isFirst)
+ {
+ if (isLI) t=STARTLI; else if (isDD) t=STARTDD; else if (isTD) t=STARTTD;
+ }
+ if (isLast)
+ {
+ if (isLI) t=ENDLI; else if (isDD) t=ENDDD; else if (isTD) t=ENDTD;
+ }
+ if (!isFirst && !isLast)
+ {
+ if (isLI) t=INTERLI; else if (isDD) t=INTERDD; else if (isTD) t=INTERTD;
+ }
+ return t;
+ }
+ const auto docAutoListItem = std::get_if<DocAutoListItem>(p.parent());
+ if (docAutoListItem)
+ {
+ isFirst=isFirstChildNode(docAutoListItem,p);
+ isLast =isLastChildNode (docAutoListItem,p);
+ t=STARTLI; // not used
+ return t;
+ }
+ const auto docSimpleListItem = std::get_if<DocSimpleListItem>(p.parent());
+ if (docSimpleListItem)
+ {
+ isFirst=TRUE;
+ isLast =TRUE;
+ t=STARTLI; // not used
+ return t;
+ }
+ const auto docParamList = std::get_if<DocParamList>(p.parent());
+ if (docParamList)
+ {
+ isFirst=TRUE;
+ isLast =TRUE;
+ t=STARTLI; // not used
+ return t;
+ }
+ const auto docHtmlListItem = std::get_if<DocHtmlListItem>(p.parent());
+ if (docHtmlListItem)
+ {
+ isFirst=isFirstChildNode(docHtmlListItem,p);
+ isLast =isLastChildNode (docHtmlListItem,p);
+ if (isFirst) t=STARTLI;
+ if (isLast) t=ENDLI;
+ if (!isFirst && !isLast) t = INTERLI;
+ return t;
+ }
+ const auto docSecRefItem = std::get_if<DocSecRefItem>(p.parent());
+ if (docSecRefItem)
+ {
+ isFirst=isFirstChildNode(docSecRefItem,p);
+ isLast =isLastChildNode (docSecRefItem,p);
+ if (isFirst) t=STARTLI;
+ if (isLast) t=ENDLI;
+ if (!isFirst && !isLast) t = INTERLI;
+ return t;
+ }
+ const auto docHtmlDescData = std::get_if<DocHtmlDescData>(p.parent());
+ if (docHtmlDescData)
+ {
+ isFirst=isFirstChildNode(docHtmlDescData,p);
+ isLast =isLastChildNode (docHtmlDescData,p);
+ if (isFirst) t=STARTDD;
+ if (isLast) t=ENDDD;
+ if (!isFirst && !isLast) t = INTERDD;
+ return t;
+ }
+ const auto docXRefItem = std::get_if<DocXRefItem>(p.parent());
+ if (docXRefItem)
+ {
+ isFirst=isFirstChildNode(docXRefItem,p);
+ isLast =isLastChildNode (docXRefItem,p);
+ if (isFirst) t=STARTDD;
+ if (isLast) t=ENDDD;
+ if (!isFirst && !isLast) t = INTERDD;
+ return t;
+ }
+ const auto docSimpleSect = std::get_if<DocSimpleSect>(p.parent());
+ if (docSimpleSect)
+ {
+ isFirst=isFirstChildNode(docSimpleSect,p);
+ isLast =isLastChildNode (docSimpleSect,p);
+ if (isFirst) t=STARTDD;
+ if (isLast) t=ENDDD;
+ if (isSeparatedParagraph(*docSimpleSect,p))
+ // if the paragraph is enclosed with separators it will
+ // be included in <dd>..</dd> so avoid addition paragraph
+ // markers
+ {
+ isFirst=isLast=TRUE;
+ }
+ if (!isFirst && !isLast) t = INTERDD;
+ return t;
+ }
+ const auto docHtmlCell = std::get_if<DocHtmlCell>(p.parent());
+ if (docHtmlCell)
+ {
+ isFirst=isFirstChildNode(docHtmlCell,p);
+ isLast =isLastChildNode (docHtmlCell,p);
+ if (isFirst) t=STARTTD;
+ if (isLast) t=ENDTD;
+ if (!isFirst && !isLast) t = INTERTD;
+ return t;
}
- //printf("para=%p parent()->kind=%d isFirst=%d isLast=%d t=%d\n",
- // p,p->parent()->kind(),isFirst,isLast,t);
}
return t;
}
-void HtmlDocVisitor::visitPre(DocPara *p)
+static bool determineIfNeedsTag(const DocPara &p)
{
- if (m_hide) return;
-
- //printf("DocPara::visitPre: parent of kind %d ",
- // p->parent() ? p->parent()->kind() : -1);
-
bool needsTag = FALSE;
- if (p && p->parent())
- {
- switch (p->parent()->kind())
+ if (p.parent())
+ {
+ if (holds_one_of_alternatives<DocSection,
+ DocInternal,
+ DocHtmlListItem,
+ DocHtmlDescData,
+ DocHtmlCell,
+ DocSimpleListItem,
+ DocAutoListItem,
+ DocSimpleSect,
+ DocXRefItem,
+ DocHtmlBlockQuote,
+ DocParBlock
+ >(*p.parent()))
{
- case DocNode::Kind_Section:
- case DocNode::Kind_Internal:
- case DocNode::Kind_HtmlListItem:
- case DocNode::Kind_HtmlDescData:
- case DocNode::Kind_HtmlCell:
- case DocNode::Kind_SimpleListItem:
- case DocNode::Kind_AutoListItem:
- case DocNode::Kind_SimpleSect:
- case DocNode::Kind_XRefItem:
- case DocNode::Kind_Copy:
- case DocNode::Kind_HtmlBlockQuote:
- case DocNode::Kind_ParBlock:
- needsTag = TRUE;
- break;
- case DocNode::Kind_Root:
- needsTag = !((DocRoot*)p->parent())->singleLine();
- break;
- default:
- needsTag = FALSE;
+ needsTag = TRUE;
+ }
+ else if (std::get_if<DocRoot>(p.parent()))
+ {
+ needsTag = !std::get<DocRoot>(*p.parent()).singleLine();
}
}
+ return needsTag;
+}
+
+void HtmlDocVisitor::operator()(const DocPara &p)
+{
+ if (m_hide) return;
+
+ //printf("> DocPara\n");
+ //dumpDocNodeList(p.children());
+
+ bool needsTag = determineIfNeedsTag(p);
+ //printf(" needsTag=%d\n",needsTag);
+ bool needsTagBefore = needsTag;
+ bool needsTagAfter = needsTag;
// if the first element of a paragraph is something that should be outside of
// the paragraph (<ul>,<dl>,<table>,..) then that will already started the
// paragraph and we don't need to do it here
- size_t nodeIndex = 0;
- if (p && nodeIndex<p->children().size())
+ if (!p.children().empty())
{
- while (nodeIndex<p->children().size() && isInvisibleNode(p->children().at(nodeIndex).get()))
- {
- nodeIndex++;
- }
- if (nodeIndex<p->children().size())
+ auto it = std::find_if(std::begin(p.children()),std::end(p.children()),
+ [](const auto &node) { return !isInvisibleNode(node); });
+ if (it!=std::end(p.children()))
{
- const DocNode *n = p->children().at(nodeIndex).get();
+ const DocNodeVariant &n = *it;
if (mustBeOutsideParagraph(n))
{
- needsTag = FALSE;
+ needsTagBefore = FALSE;
}
}
}
bool isLast;
t = getParagraphContext(p,isFirst,isLast);
//printf("startPara first=%d last=%d\n",isFirst,isLast);
- if (isFirst && isLast) needsTag=FALSE;
+ if (isFirst && isLast) needsTagBefore=FALSE;
- //printf(" needsTag=%d\n",needsTag);
+ //printf(" needsTagBefore=%d\n",needsTagBefore);
// write the paragraph tag (if needed)
- if (needsTag)
+ if (needsTagBefore)
{
if (strlen(contexts[t]))
- m_t << "<p class=\"" << contexts[t] << "\"" << htmlAttribsToString(p->attribs()) << ">";
+ m_t << "<p class=\"" << contexts[t] << "\"" << htmlAttribsToString(p.attribs()) << ">";
else
- m_t << "<p " << htmlAttribsToString(p->attribs()) << ">";
+ m_t << "<p " << htmlAttribsToString(p.attribs()) << ">";
}
-}
-void HtmlDocVisitor::visitPost(DocPara *p)
-{
-
- //printf("DocPara::visitPost: parent of kind %d ",
- // p->parent() ? p->parent()->kind() : -1);
-
- bool needsTag = FALSE;
- if (p->parent())
- {
- switch (p->parent()->kind())
- {
- case DocNode::Kind_Section:
- case DocNode::Kind_Internal:
- case DocNode::Kind_HtmlListItem:
- case DocNode::Kind_HtmlDescData:
- case DocNode::Kind_HtmlCell:
- case DocNode::Kind_SimpleListItem:
- case DocNode::Kind_AutoListItem:
- case DocNode::Kind_SimpleSect:
- case DocNode::Kind_XRefItem:
- case DocNode::Kind_Copy:
- case DocNode::Kind_HtmlBlockQuote:
- case DocNode::Kind_ParBlock:
- needsTag = TRUE;
- break;
- case DocNode::Kind_Root:
- needsTag = !((DocRoot*)p->parent())->singleLine();
- break;
- default:
- needsTag = FALSE;
- }
- }
+ visitChildren(p);
// if the last element of a paragraph is something that should be outside of
// the paragraph (<ul>,<dl>,<table>) then that will already have ended the
// paragraph and we don't need to do it here
- if (!p->children().empty())
+ if (!p.children().empty())
{
- int nodeIndex = static_cast<int>(p->children().size()-1);
- while (nodeIndex>=0 && isInvisibleNode(p->children().at(nodeIndex).get()))
+ auto it = std::prev(std::end(p.children()));
+ for (;;)
{
- nodeIndex--;
- }
- if (nodeIndex>=0)
- {
- const DocNode *n = p->children().at(nodeIndex).get();
- if (mustBeOutsideParagraph(n))
+ const DocNodeVariant &n = *it;
+ if (!isInvisibleNode(n))
+ {
+ if (mustBeOutsideParagraph(n))
+ {
+ needsTagAfter = FALSE;
+ }
+ // stop searching if we found a node that is visible
+ break;
+ }
+ if (it==std::begin(p.children()))
+ {
+ // stop searching if we are at the beginning of the list
+ break;
+ }
+ else
{
- needsTag = FALSE;
+ --it;
}
}
}
- bool isFirst;
- bool isLast;
- getParagraphContext(p,isFirst,isLast);
//printf("endPara first=%d last=%d\n",isFirst,isLast);
- if (isFirst && isLast) needsTag=FALSE;
-
- //printf("DocPara::visitPost needsTag=%d\n",needsTag);
-
- if (needsTag) m_t << "</p>\n";
+ if (isFirst && isLast) needsTagAfter=FALSE;
+ //printf(" needsTagAfter=%d\n",needsTagAfter);
+ if (needsTagAfter) m_t << "</p>\n";
+ //printf("< DocPara\n");
}
-void HtmlDocVisitor::visitPre(DocRoot *)
+void HtmlDocVisitor::operator()(const DocRoot &r)
{
+ //printf("> DocRoot\n");
+ //dumpDocNodeList(r.children());
+ visitChildren(r);
+ //printf("< DocRoot\n");
}
-void HtmlDocVisitor::visitPost(DocRoot *)
-{
-}
-
-void HtmlDocVisitor::visitPre(DocSimpleSect *s)
+void HtmlDocVisitor::operator()(const DocSimpleSect &s)
{
if (m_hide) return;
forceEndParagraph(s);
- m_t << "<dl class=\"section " << s->typeString() << "\"><dt>";
- switch(s->type())
+ m_t << "<dl class=\"section " << s.typeString() << "\"><dt>";
+ switch(s.type())
{
case DocSimpleSect::See:
m_t << theTranslator->trSeeAlso(); break;
case DocSimpleSect::Unknown: break;
}
- // special case 1: user defined title
- if (s->type()!=DocSimpleSect::User && s->type()!=DocSimpleSect::Rcs)
+ if (s.title())
{
- m_t << "</dt><dd>";
+ std::visit(*this,*s.title());
}
-}
-
-void HtmlDocVisitor::visitPost(DocSimpleSect *s)
-{
- if (m_hide) return;
+ m_t << "</dt><dd>";
+ visitChildren(s);
m_t << "</dd></dl>\n";
forceStartParagraph(s);
}
-void HtmlDocVisitor::visitPre(DocTitle *)
-{
-}
-
-void HtmlDocVisitor::visitPost(DocTitle *)
+void HtmlDocVisitor::operator()(const DocTitle &t)
{
if (m_hide) return;
- m_t << "</dt><dd>";
+ visitChildren(t);
}
-void HtmlDocVisitor::visitPre(DocSimpleList *sl)
+void HtmlDocVisitor::operator()(const DocSimpleList &sl)
{
if (m_hide) return;
forceEndParagraph(sl);
m_t << "<ul>";
- if (!sl->isPreformatted()) m_t << "\n";
-
-}
-
-void HtmlDocVisitor::visitPost(DocSimpleList *sl)
-{
- if (m_hide) return;
+ if (!sl.isPreformatted()) m_t << "\n";
+ visitChildren(sl);
m_t << "</ul>";
- if (!sl->isPreformatted()) m_t << "\n";
+ if (!sl.isPreformatted()) m_t << "\n";
forceStartParagraph(sl);
}
-void HtmlDocVisitor::visitPre(DocSimpleListItem *)
+void HtmlDocVisitor::operator()(const DocSimpleListItem &li)
{
if (m_hide) return;
m_t << "<li>";
-}
-
-void HtmlDocVisitor::visitPost(DocSimpleListItem *li)
-{
- if (m_hide) return;
+ if (li.paragraph())
+ {
+ visit(*this,*li.paragraph());
+ }
m_t << "</li>";
- if (!li->isPreformatted()) m_t << "\n";
+ if (!li.isPreformatted()) m_t << "\n";
}
-void HtmlDocVisitor::visitPre(DocSection *s)
+void HtmlDocVisitor::operator()(const DocSection &s)
{
if (m_hide) return;
forceEndParagraph(s);
- m_t << "<h" << s->level() << ">";
- m_t << "<a class=\"anchor\" id=\"" << s->anchor();
+ m_t << "<h" << s.level() << ">";
+ m_t << "<a class=\"anchor\" id=\"" << s.anchor();
m_t << "\"></a>\n";
- filter(convertCharEntitiesToUTF8(s->title()));
- m_t << "</h" << s->level() << ">\n";
-}
-
-void HtmlDocVisitor::visitPost(DocSection *s)
-{
+ filter(convertCharEntitiesToUTF8(s.title()));
+ m_t << "</h" << s.level() << ">\n";
+ visitChildren(s);
forceStartParagraph(s);
}
-void HtmlDocVisitor::visitPre(DocHtmlList *s)
+void HtmlDocVisitor::operator()(const DocHtmlList &s)
{
if (m_hide) return;
forceEndParagraph(s);
- if (s->type()==DocHtmlList::Ordered)
+ if (s.type()==DocHtmlList::Ordered)
{
- m_t << "<ol" << htmlAttribsToString(s->attribs());
+ m_t << "<ol" << htmlAttribsToString(s.attribs());
}
else
{
- m_t << "<ul" << htmlAttribsToString(s->attribs());
+ m_t << "<ul" << htmlAttribsToString(s.attribs());
}
m_t << ">\n";
-}
-
-void HtmlDocVisitor::visitPost(DocHtmlList *s)
-{
- if (m_hide) return;
- if (s->type()==DocHtmlList::Ordered)
+ visitChildren(s);
+ if (s.type()==DocHtmlList::Ordered)
{
m_t << "</ol>";
}
{
m_t << "</ul>";
}
- if (!s->isPreformatted()) m_t << "\n";
+ if (!s.isPreformatted()) m_t << "\n";
forceStartParagraph(s);
}
-void HtmlDocVisitor::visitPre(DocHtmlListItem *i)
-{
- if (m_hide) return;
- m_t << "<li" << htmlAttribsToString(i->attribs()) << ">";
- if (!i->isPreformatted()) m_t << "\n";
-}
-
-void HtmlDocVisitor::visitPost(DocHtmlListItem *)
+void HtmlDocVisitor::operator()(const DocHtmlListItem &i)
{
if (m_hide) return;
+ m_t << "<li" << htmlAttribsToString(i.attribs()) << ">";
+ if (!i.isPreformatted()) m_t << "\n";
+ visitChildren(i);
m_t << "</li>\n";
}
-void HtmlDocVisitor::visitPre(DocHtmlDescList *dl)
+void HtmlDocVisitor::operator()(const DocHtmlDescList &dl)
{
if (m_hide) return;
forceEndParagraph(dl);
- m_t << "<dl" << htmlAttribsToString(dl->attribs()) << ">\n";
-}
-
-void HtmlDocVisitor::visitPost(DocHtmlDescList *dl)
-{
- if (m_hide) return;
+ m_t << "<dl" << htmlAttribsToString(dl.attribs()) << ">\n";
+ visitChildren(dl);
m_t << "</dl>\n";
forceStartParagraph(dl);
}
-void HtmlDocVisitor::visitPre(DocHtmlDescTitle *dt)
-{
- if (m_hide) return;
- m_t << "<dt" << htmlAttribsToString(dt->attribs()) << ">";
-}
-
-void HtmlDocVisitor::visitPost(DocHtmlDescTitle *)
+void HtmlDocVisitor::operator()(const DocHtmlDescTitle &dt)
{
if (m_hide) return;
+ m_t << "<dt" << htmlAttribsToString(dt.attribs()) << ">";
+ visitChildren(dt);
m_t << "</dt>\n";
}
-void HtmlDocVisitor::visitPre(DocHtmlDescData *dd)
-{
- if (m_hide) return;
- m_t << "<dd" << htmlAttribsToString(dd->attribs()) << ">";
-}
-
-void HtmlDocVisitor::visitPost(DocHtmlDescData *)
+void HtmlDocVisitor::operator()(const DocHtmlDescData &dd)
{
if (m_hide) return;
+ m_t << "<dd" << htmlAttribsToString(dd.attribs()) << ">";
+ visitChildren(dd);
m_t << "</dd>\n";
}
-void HtmlDocVisitor::visitPre(DocHtmlTable *t)
+void HtmlDocVisitor::operator()(const DocHtmlTable &t)
{
if (m_hide) return;
forceEndParagraph(t);
- if (t->hasCaption())
+ if (t.caption())
{
- QCString anc = t->caption()->anchor();
+ QCString anc = std::get<DocHtmlCaption>(*t.caption()).anchor();
if (!anc.isEmpty())
{
m_t << "<a class=\"anchor\" id=\"" << anc << "\"></a>\n";
}
}
- QCString attrs = htmlAttribsToString(t->attribs());
+ QCString attrs = htmlAttribsToString(t.attribs());
if (attrs.isEmpty())
{
m_t << "<table class=\"doxtable\">\n";
}
else
{
- m_t << "<table" << htmlAttribsToString(t->attribs()) << ">\n";
+ m_t << "<table" << htmlAttribsToString(t.attribs()) << ">\n";
}
-}
-
-void HtmlDocVisitor::visitPost(DocHtmlTable *t)
-{
- if (m_hide) return;
+ if (t.caption())
+ {
+ std::visit(*this,*t.caption());
+ }
+ visitChildren(t);
m_t << "</table>\n";
forceStartParagraph(t);
}
-void HtmlDocVisitor::visitPre(DocHtmlRow *tr)
-{
- if (m_hide) return;
- m_t << "<tr" << htmlAttribsToString(tr->attribs()) << ">\n";
-}
-
-void HtmlDocVisitor::visitPost(DocHtmlRow *)
+void HtmlDocVisitor::operator()(const DocHtmlRow &tr)
{
if (m_hide) return;
+ m_t << "<tr" << htmlAttribsToString(tr.attribs()) << ">\n";
+ visitChildren(tr);
m_t << "</tr>\n";
}
-void HtmlDocVisitor::visitPre(DocHtmlCell *c)
+void HtmlDocVisitor::operator()(const DocHtmlCell &c)
{
if (m_hide) return;
- if (c->isHeading())
+ if (c.isHeading())
{
- m_t << "<th" << htmlAttribsToString(c->attribs()) << ">";
+ m_t << "<th" << htmlAttribsToString(c.attribs()) << ">";
}
else
{
- m_t << "<td" << htmlAttribsToString(c->attribs()) << ">";
+ m_t << "<td" << htmlAttribsToString(c.attribs()) << ">";
}
+ visitChildren(c);
+ if (c.isHeading()) m_t << "</th>"; else m_t << "</td>";
}
-void HtmlDocVisitor::visitPost(DocHtmlCell *c)
-{
- if (m_hide) return;
- if (c->isHeading()) m_t << "</th>"; else m_t << "</td>";
-}
-
-void HtmlDocVisitor::visitPre(DocHtmlCaption *c)
-{
- if (m_hide) return;
- m_t << "<caption" << htmlAttribsToString(c->attribs()) << ">";
-}
-
-void HtmlDocVisitor::visitPost(DocHtmlCaption *)
+void HtmlDocVisitor::operator()(const DocHtmlCaption &c)
{
if (m_hide) return;
+ m_t << "<caption" << htmlAttribsToString(c.attribs()) << ">";
+ visitChildren(c);
m_t << "</caption>\n";
}
-void HtmlDocVisitor::visitPre(DocInternal *)
+void HtmlDocVisitor::operator()(const DocInternal &i)
{
if (m_hide) return;
- //forceEndParagraph(i);
- //m_t << "<p><b>" << theTranslator->trForInternalUseOnly() << "</b></p>\n";
+ visitChildren(i);
}
-void HtmlDocVisitor::visitPost(DocInternal *)
+void HtmlDocVisitor::operator()(const DocHRef &href)
{
if (m_hide) return;
- //forceStartParagraph(i);
-}
-
-void HtmlDocVisitor::visitPre(DocHRef *href)
-{
- if (m_hide) return;
- if (href->url().left(7)=="mailto:")
+ if (href.url().left(7)=="mailto:")
{
- writeObfuscatedMailAddress(href->url().mid(7));
+ writeObfuscatedMailAddress(href.url().mid(7));
}
else
{
- QCString url = correctURL(href->url(),href->relPath());
+ QCString url = correctURL(href.url(),href.relPath());
m_t << "<a href=\"" << convertToHtml(url) << "\""
- << htmlAttribsToString(href->attribs()) << ">";
+ << htmlAttribsToString(href.attribs()) << ">";
}
-}
-
-void HtmlDocVisitor::visitPost(DocHRef *)
-{
- if (m_hide) return;
+ visitChildren(href);
m_t << "</a>";
}
-void HtmlDocVisitor::visitPre(DocHtmlHeader *header)
+void HtmlDocVisitor::operator()(const DocHtmlHeader &header)
{
if (m_hide) return;
forceEndParagraph(header);
- m_t << "<h" << header->level() << htmlAttribsToString(header->attribs()) << ">";
-}
-
-void HtmlDocVisitor::visitPost(DocHtmlHeader *header)
-{
- if (m_hide) return;
- m_t << "</h" << header->level() << ">\n";
+ m_t << "<h" << header.level() << htmlAttribsToString(header.attribs()) << ">";
+ visitChildren(header);
+ m_t << "</h" << header.level() << ">\n";
forceStartParagraph(header);
}
-void HtmlDocVisitor::visitPre(DocImage *img)
+void HtmlDocVisitor::operator()(const DocImage &img)
{
- if (img->type()==DocImage::Html)
+ if (img.type()==DocImage::Html)
{
- bool inlineImage = img->isInlineImage();
- bool typeSVG = img->isSVG();
- QCString url = img->url();
+ bool inlineImage = img.isInlineImage();
+ bool typeSVG = img.isSVG();
+ QCString url = img.url();
if (!inlineImage)
{
forceEndParagraph(img);
}
if (m_hide) return;
- QCString baseName=img->name();
+ QCString baseName=img.name();
int i;
if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
{
}
if (!inlineImage) m_t << "<div class=\"image\">\n";
QCString sizeAttribs;
- if (!img->width().isEmpty())
+ if (!img.width().isEmpty())
{
- sizeAttribs+=" width=\""+img->width()+"\"";
+ sizeAttribs+=" width=\""+img.width()+"\"";
}
- if (!img->height().isEmpty()) // link to local file
+ if (!img.height().isEmpty()) // link to local file
{
- sizeAttribs+=" height=\""+img->height()+"\"";
+ sizeAttribs+=" height=\""+img.height()+"\"";
}
- // 16 cases: url.isEmpty() | typeSVG | inlineImage | img->hasCaption()
+ // 16 cases: url.isEmpty() | typeSVG | inlineImage | img.hasCaption()
HtmlAttribList extraAttribs;
if (typeSVG)
extraAttribs.push_back(opt);
}
QCString alt;
- mergeHtmlAttributes(img->attribs(),extraAttribs);
+ mergeHtmlAttributes(img.attribs(),extraAttribs);
QCString attrs = htmlAttribsToString(extraAttribs,&alt);
QCString src;
if (url.isEmpty())
{
- src = img->relPath()+img->name();
+ src = img.relPath()+img.name();
}
else
{
- src = correctURL(url,img->relPath());
+ src = correctURL(url,img.relPath());
}
if (typeSVG && !inlineImage)
{
m_t << "/>\n";
}
}
- if (img->hasCaption())
+ if (img.hasCaption())
{
if (inlineImage)
{
{
m_t << "/>";
}
- }
- else // other format -> skip
- {
- pushHidden(m_hide);
- m_hide=TRUE;
- }
-}
-void HtmlDocVisitor::visitPost(DocImage *img)
-{
- if (img->type()==DocImage::Html)
- {
- if (m_hide) return;
- bool inlineImage = img->isInlineImage();
- if (img->hasCaption())
+ visitChildren(img);
+
+ if (img.hasCaption())
{
if (inlineImage)
{
forceStartParagraph(img);
}
}
- else // other format
+ else // other format -> skip
{
- m_hide = popHidden();
}
}
-void HtmlDocVisitor::visitPre(DocDotFile *df)
+void HtmlDocVisitor::operator()(const DocDotFile &df)
{
if (m_hide) return;
- if (!Config_getBool(DOT_CLEANUP)) copyFile(df->file(),Config_getString(HTML_OUTPUT)+"/"+stripPath(df->file()));
+ if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(HTML_OUTPUT)+"/"+stripPath(df.file()));
m_t << "<div class=\"dotgraph\">\n";
- writeDotFile(df->file(),df->relPath(),df->context(),df->srcFile(),df->srcLine());
- if (df->hasCaption())
+ writeDotFile(df.file(),df.relPath(),df.context(),df.srcFile(),df.srcLine());
+ if (df.hasCaption())
{
m_t << "<div class=\"caption\">\n";
}
-}
-
-void HtmlDocVisitor::visitPost(DocDotFile *df)
-{
- if (m_hide) return;
- if (df->hasCaption())
+ visitChildren(df);
+ if (df.hasCaption())
{
m_t << "</div>\n";
}
m_t << "</div>\n";
}
-void HtmlDocVisitor::visitPre(DocMscFile *df)
+void HtmlDocVisitor::operator()(const DocMscFile &df)
{
if (m_hide) return;
- if (!Config_getBool(DOT_CLEANUP)) copyFile(df->file(),Config_getString(HTML_OUTPUT)+"/"+stripPath(df->file()));
+ if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(HTML_OUTPUT)+"/"+stripPath(df.file()));
m_t << "<div class=\"mscgraph\">\n";
- writeMscFile(df->file(),df->relPath(),df->context(),df->srcFile(),df->srcLine());
- if (df->hasCaption())
+ writeMscFile(df.file(),df.relPath(),df.context(),df.srcFile(),df.srcLine());
+ if (df.hasCaption())
{
m_t << "<div class=\"caption\">\n";
}
-}
-void HtmlDocVisitor::visitPost(DocMscFile *df)
-{
- if (m_hide) return;
- if (df->hasCaption())
+ visitChildren(df);
+ if (df.hasCaption())
{
m_t << "</div>\n";
}
m_t << "</div>\n";
}
-void HtmlDocVisitor::visitPre(DocDiaFile *df)
+void HtmlDocVisitor::operator()(const DocDiaFile &df)
{
if (m_hide) return;
- if (!Config_getBool(DOT_CLEANUP)) copyFile(df->file(),Config_getString(HTML_OUTPUT)+"/"+stripPath(df->file()));
+ if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(HTML_OUTPUT)+"/"+stripPath(df.file()));
m_t << "<div class=\"diagraph\">\n";
- writeDiaFile(df->file(),df->relPath(),df->context(),df->srcFile(),df->srcLine());
- if (df->hasCaption())
+ writeDiaFile(df.file(),df.relPath(),df.context(),df.srcFile(),df.srcLine());
+ if (df.hasCaption())
{
m_t << "<div class=\"caption\">\n";
}
-}
-void HtmlDocVisitor::visitPost(DocDiaFile *df)
-{
- if (m_hide) return;
- if (df->hasCaption())
+ visitChildren(df);
+ if (df.hasCaption())
{
m_t << "</div>\n";
}
m_t << "</div>\n";
}
-void HtmlDocVisitor::visitPre(DocLink *lnk)
-{
- if (m_hide) return;
- startLink(lnk->ref(),lnk->file(),lnk->relPath(),lnk->anchor());
-}
-
-void HtmlDocVisitor::visitPost(DocLink *)
+void HtmlDocVisitor::operator()(const DocLink &lnk)
{
if (m_hide) return;
+ startLink(lnk.ref(),lnk.file(),lnk.relPath(),lnk.anchor());
+ visitChildren(lnk);
endLink();
}
-void HtmlDocVisitor::visitPre(DocRef *ref)
+void HtmlDocVisitor::operator()(const DocRef &ref)
{
if (m_hide) return;
- if (!ref->file().isEmpty())
+ if (!ref.file().isEmpty())
{
- // when ref->isSubPage()==TRUE we use ref->file() for HTML and
- // ref->anchor() for LaTeX/RTF
- startLink(ref->ref(),ref->file(),ref->relPath(),ref->isSubPage() ? QCString() : ref->anchor());
+ // when ref.isSubPage()==TRUE we use ref.file() for HTML and
+ // ref.anchor() for LaTeX/RTF
+ startLink(ref.ref(),ref.file(),ref.relPath(),ref.isSubPage() ? QCString() : ref.anchor());
}
- if (!ref->hasLinkText()) filter(ref->targetTitle());
-}
-
-void HtmlDocVisitor::visitPost(DocRef *ref)
-{
- if (m_hide) return;
- if (!ref->file().isEmpty()) endLink();
+ if (!ref.hasLinkText()) filter(ref.targetTitle());
+ visitChildren(ref);
+ if (!ref.file().isEmpty()) endLink();
//m_t << " ";
}
-void HtmlDocVisitor::visitPre(DocSecRefItem *ref)
+void HtmlDocVisitor::operator()(const DocSecRefItem &ref)
{
if (m_hide) return;
- if (!ref->file().isEmpty())
+ if (!ref.file().isEmpty())
{
m_t << "<li>";
- startLink(ref->ref(),ref->file(),ref->relPath(),ref->isSubPage() ? QCString() : ref->anchor());
+ startLink(ref.ref(),ref.file(),ref.relPath(),ref.isSubPage() ? QCString() : ref.anchor());
}
-}
-
-void HtmlDocVisitor::visitPost(DocSecRefItem *ref)
-{
- if (m_hide) return;
- if (!ref->file().isEmpty())
+ visitChildren(ref);
+ if (!ref.file().isEmpty())
{
endLink();
m_t << "</li>\n";
}
}
-void HtmlDocVisitor::visitPre(DocSecRefList *s)
+void HtmlDocVisitor::operator()(const DocSecRefList &s)
{
if (m_hide) return;
forceEndParagraph(s);
m_t << "<div>\n";
m_t << "<ul class=\"multicol\">\n";
-}
-
-void HtmlDocVisitor::visitPost(DocSecRefList *s)
-{
- if (m_hide) return;
+ visitChildren(s);
m_t << "</ul>\n";
m_t << "</div>\n";
forceStartParagraph(s);
}
-void HtmlDocVisitor::visitPre(DocParamSect *s)
+void HtmlDocVisitor::operator()(const DocParamSect &s)
{
if (m_hide) return;
forceEndParagraph(s);
QCString className;
QCString heading;
- switch(s->type())
+ switch(s.type())
{
case DocParamSect::Param:
heading=theTranslator->trParameters();
m_t << heading;
m_t << "</dt><dd>\n";
m_t << " <table class=\"" << className << "\">\n";
-}
-
-void HtmlDocVisitor::visitPost(DocParamSect *s)
-{
- if (m_hide) return;
+ visitChildren(s);
m_t << " </table>\n";
m_t << " </dd>\n";
m_t << "</dl>\n";
forceStartParagraph(s);
}
-void HtmlDocVisitor::visitPre(DocParamList *pl)
+void HtmlDocVisitor::operator()(const DocSeparator &s)
+{
+ if (m_hide) return;
+ m_t << " " << s.chars() << " ";
+}
+
+void HtmlDocVisitor::operator()(const DocParamList &pl)
{
//printf("DocParamList::visitPre\n");
if (m_hide) return;
m_t << " <tr>";
- DocParamSect *sect = 0;
- if (pl->parent()->kind()==DocNode::Kind_ParamSect)
- {
- sect=(DocParamSect*)pl->parent();
- }
+ const DocParamSect *sect = std::get_if<DocParamSect>(pl.parent());
if (sect && sect->hasInOutSpecifier())
{
m_t << "<td class=\"paramdir\">";
- if (pl->direction()!=DocParamSect::Unspecified)
+ if (pl.direction()!=DocParamSect::Unspecified)
{
m_t << "[";
- if (pl->direction()==DocParamSect::In)
+ if (pl.direction()==DocParamSect::In)
{
m_t << "in";
}
- else if (pl->direction()==DocParamSect::Out)
+ else if (pl.direction()==DocParamSect::Out)
{
m_t << "out";
}
- else if (pl->direction()==DocParamSect::InOut)
+ else if (pl.direction()==DocParamSect::InOut)
{
m_t << "in,out";
}
if (sect && sect->hasTypeSpecifier())
{
m_t << "<td class=\"paramtype\">";
- for (const auto &type : pl->paramTypes())
+ for (const auto &type : pl.paramTypes())
{
- if (type->kind()==DocNode::Kind_Word)
- {
- visit((DocWord*)type.get());
- }
- else if (type->kind()==DocNode::Kind_LinkedWord)
- {
- visit((DocLinkedWord*)type.get());
- }
- else if (type->kind()==DocNode::Kind_Sep)
- {
- m_t << " " << ((DocSeparator *)type.get())->chars() << " ";
- }
+ std::visit(*this,type);
}
m_t << "</td>";
}
m_t << "<td class=\"paramname\">";
bool first=TRUE;
- for (const auto ¶m : pl->parameters())
+ for (const auto ¶m : pl.parameters())
{
if (!first) m_t << ","; else first=FALSE;
- if (param->kind()==DocNode::Kind_Word)
- {
- visit((DocWord*)param.get());
- }
- else if (param->kind()==DocNode::Kind_LinkedWord)
- {
- visit((DocLinkedWord*)param.get());
- }
+ std::visit(*this,param);
}
m_t << "</td><td>";
-}
-
-void HtmlDocVisitor::visitPost(DocParamList *)
-{
- //printf("DocParamList::visitPost\n");
- if (m_hide) return;
+ for (const auto &par : pl.paragraphs())
+ {
+ std::visit(*this,par);
+ }
m_t << "</td></tr>\n";
}
-void HtmlDocVisitor::visitPre(DocXRefItem *x)
+void HtmlDocVisitor::operator()(const DocXRefItem &x)
{
if (m_hide) return;
- if (x->title().isEmpty()) return;
+ if (x.title().isEmpty()) return;
forceEndParagraph(x);
- bool anonymousEnum = x->file()=="@";
+ bool anonymousEnum = x.file()=="@";
if (!anonymousEnum)
{
- m_t << "<dl class=\"" << x->key() << "\"><dt><b><a class=\"el\" href=\""
- << x->relPath() << addHtmlExtensionIfMissing(x->file())
- << "#" << x->anchor() << "\">";
+ m_t << "<dl class=\"" << x.key() << "\"><dt><b><a class=\"el\" href=\""
+ << x.relPath() << addHtmlExtensionIfMissing(x.file())
+ << "#" << x.anchor() << "\">";
}
else
{
- m_t << "<dl class=\"" << x->key() << "\"><dt><b>";
+ m_t << "<dl class=\"" << x.key() << "\"><dt><b>";
}
- filter(x->title());
+ filter(x.title());
m_t << ":";
if (!anonymousEnum) m_t << "</a>";
m_t << "</b></dt><dd>";
-}
-
-void HtmlDocVisitor::visitPost(DocXRefItem *x)
-{
- if (m_hide) return;
- if (x->title().isEmpty()) return;
+ visitChildren(x);
+ if (x.title().isEmpty()) return;
m_t << "</dd></dl>\n";
forceStartParagraph(x);
}
-void HtmlDocVisitor::visitPre(DocInternalRef *ref)
-{
- if (m_hide) return;
- startLink(QCString(),ref->file(),ref->relPath(),ref->anchor());
-}
-
-void HtmlDocVisitor::visitPost(DocInternalRef *)
+void HtmlDocVisitor::operator()(const DocInternalRef &ref)
{
if (m_hide) return;
+ startLink(QCString(),ref.file(),ref.relPath(),ref.anchor());
+ visitChildren(ref);
endLink();
m_t << " ";
}
-void HtmlDocVisitor::visitPre(DocText *)
+void HtmlDocVisitor::operator()(const DocText &t)
{
+ visitChildren(t);
}
-void HtmlDocVisitor::visitPost(DocText *)
-{
-}
-
-void HtmlDocVisitor::visitPre(DocHtmlBlockQuote *b)
+void HtmlDocVisitor::operator()(const DocHtmlBlockQuote &b)
{
if (m_hide) return;
forceEndParagraph(b);
- QCString attrs = htmlAttribsToString(b->attribs());
- m_t << "<blockquote class=\"doxtable\"" << htmlAttribsToString(b->attribs()) << ">\n";
-}
-
-void HtmlDocVisitor::visitPost(DocHtmlBlockQuote *b)
-{
- if (m_hide) return;
+ QCString attrs = htmlAttribsToString(b.attribs());
+ m_t << "<blockquote class=\"doxtable\"" << htmlAttribsToString(b.attribs()) << ">\n";
+ visitChildren(b);
m_t << "</blockquote>\n";
forceStartParagraph(b);
}
-void HtmlDocVisitor::visitPre(DocVhdlFlow *vf)
+void HtmlDocVisitor::operator()(const DocVhdlFlow &vf)
{
if (m_hide) return;
if (VhdlDocGen::getFlowMember()) // use VHDL flow chart creator
m_t << ".svg\">";
m_t << VhdlDocGen::getFlowMember()->name();
m_t << "</a>";
- if (vf->hasCaption())
+ if (vf.hasCaption())
{
m_t << "<br />";
}
}
-}
-
-void HtmlDocVisitor::visitPost(DocVhdlFlow *vf)
-{
- if (m_hide) return;
+ visitChildren(vf);
if (VhdlDocGen::getFlowMember()) // use VHDL flow chart creator
{
m_t << "</p>";
}
}
-void HtmlDocVisitor::visitPre(DocParBlock *)
-{
- if (m_hide) return;
-}
-
-void HtmlDocVisitor::visitPost(DocParBlock *)
+void HtmlDocVisitor::operator()(const DocParBlock &pb)
{
if (m_hide) return;
+ visitChildren(pb);
}
-
-
void HtmlDocVisitor::filter(const QCString &str, const bool retainNewline)
{
if (str.isEmpty()) return;
{
baseName=baseName.left(i);
}
- static QCString outDir = Config_getString(HTML_OUTPUT);
+ QCString outDir = Config_getString(HTML_OUTPUT);
QCString imgExt = getDotImageExtension();
if (imgExt=="svg")
{
must be located outside of a paragraph, i.e. it is a center, div, or pre tag.
See also bug746162.
*/
-static bool insideStyleChangeThatIsOutsideParagraph(DocPara *para,int nodeIndex)
+static bool insideStyleChangeThatIsOutsideParagraph(const DocPara *para,
+ DocNodeList::const_iterator it)
{
//printf("insideStyleChangeThatIsOutputParagraph(index=%d)\n",nodeIndex);
int styleMask=0;
bool styleOutsideParagraph=FALSE;
- while (nodeIndex>=0 && !styleOutsideParagraph)
+ while (!styleOutsideParagraph)
{
- DocNode *n = para->children().at(nodeIndex).get();
- if (n->kind()==DocNode::Kind_StyleChange)
+ const DocNodeVariant *n = &(*it);
+ const DocStyleChange *sc = std::get_if<DocStyleChange>(n);
+ if (sc)
{
- DocStyleChange *sc = (DocStyleChange*)n;
if (!sc->enable()) // remember styles that has been closed already
{
- styleMask|=(int)sc->style();
+ styleMask|=static_cast<int>(sc->style());
}
bool paraStyle = sc->style()==DocStyleChange::Center ||
sc->style()==DocStyleChange::Div ||
sc->style()==DocStyleChange::Preformatted;
//printf("Found style change %s enabled=%d\n",sc->styleString(),sc->enable());
- if (sc->enable() && (styleMask&(int)sc->style())==0 && // style change that is still active
+ if (sc->enable() && (styleMask&static_cast<int>(sc->style()))==0 && // style change that is still active
paraStyle
)
{
styleOutsideParagraph=TRUE;
}
}
- nodeIndex--;
+ if (it!=std::begin(para->children()))
+ {
+ --it;
+ }
+ else
+ {
+ break;
+ }
}
return styleOutsideParagraph;
}
* have to be outside of the paragraph. This method will forcefully end
* the current paragraph and forceStartParagraph() will restart it.
*/
-void HtmlDocVisitor::forceEndParagraph(DocNode *n)
+template<class Node>
+void HtmlDocVisitor::forceEndParagraph(const Node &n)
{
- //printf("forceEndParagraph(%p) %d\n",n,n->kind());
- if (n->parent() && n->parent()->kind()==DocNode::Kind_Para)
+ const DocPara *para=std::get_if<DocPara>(n.parent());
+ if (para)
{
- DocPara *para = (DocPara*)n->parent();
const DocNodeList &children = para->children();
- auto it = std::find_if(children.begin(),children.end(),[n](const auto &np) { return np.get()==n; });
- if (it==children.end()) return;
- int nodeIndex = static_cast<int>(it - children.begin());
- nodeIndex--;
- if (nodeIndex<0) return; // first node in paragraph
- while (nodeIndex>=0 && isInvisibleNode(children.at(nodeIndex).get()))
+
+ //printf("forceEndParagraph\n");
+ //dumpDocNodeList(children);
+
+ auto it = std::find_if(std::begin(children),std::end(children),
+ [&n](const auto &np) { return holds_value(&n,np); });
+ if (it==std::end(children)) return;
+ if (it==std::begin(children)) return; // first node in paragraph
+ it = std::prev(it);
+ bool found=false;
+ while (!found)
+ {
+ found = !isInvisibleNode(*it);
+ if (found) break;
+ if (it!=std::begin(children))
+ {
+ --it;
+ }
+ else
+ {
+ break;
+ }
+ }
+ if (!found) return; // first visible node in paragraph
+ const DocNodeVariant &v = *it;
+ if (mustBeOutsideParagraph(v)) return; // previous node already outside paragraph context
+ bool styleOutsideParagraph=false;
+ if (it!=std::begin(children))
{
- nodeIndex--;
+ it = std::prev(it);
+ styleOutsideParagraph=insideStyleChangeThatIsOutsideParagraph(para,it);
}
- if (nodeIndex<0) return; // first visible node in paragraph
- n = children.at(nodeIndex).get();
- if (mustBeOutsideParagraph(n)) return; // previous node already outside paragraph context
- nodeIndex--;
- bool styleOutsideParagraph=insideStyleChangeThatIsOutsideParagraph(para,nodeIndex);
bool isFirst;
bool isLast;
- getParagraphContext(para,isFirst,isLast);
+ getParagraphContext(*para,isFirst,isLast);
//printf("forceEnd first=%d last=%d styleOutsideParagraph=%d\n",isFirst,isLast,styleOutsideParagraph);
if (isFirst && isLast) return;
if (styleOutsideParagraph) return;
+ //printf("adding </p>\n");
m_t << "</p>";
}
}
* have to be outside of the paragraph. This method will forcefully start
* the paragraph, that was previously ended by forceEndParagraph().
*/
-void HtmlDocVisitor::forceStartParagraph(DocNode *n)
+template<class Node>
+void HtmlDocVisitor::forceStartParagraph(const Node &n)
{
- //printf("forceStartParagraph(%p) %d\n",n,n->kind());
- if (n->parent() && n->parent()->kind()==DocNode::Kind_Para) // if we are inside a paragraph
+ //printf("> forceStartParagraph(%s)\n",docNodeName(n));
+ const DocPara *para=0;
+ if (n.parent() && (para = std::get_if<DocPara>(n.parent()))) // if we are inside a paragraph
{
- DocPara *para = (DocPara*)n->parent();
const DocNodeList &children = para->children();
- auto it = std::find_if(children.begin(),children.end(),[n](const auto &np) { return np.get()==n; });
- if (it==children.end()) return;
- int nodeIndex = static_cast<int>(it - children.begin());
- int numNodes = static_cast<int>(para->children().size());
- bool styleOutsideParagraph=insideStyleChangeThatIsOutsideParagraph(para,nodeIndex);
+
+ auto it = std::find_if(std::begin(children),
+ std::end(children),
+ [&n](const auto &np)
+ { return holds_value(&n,np); });
+ if (it==std::end(children)) return;
+ bool styleOutsideParagraph=insideStyleChangeThatIsOutsideParagraph(para,it);
+ //printf("it=%s (%p) styleOutsideParagraph=%d\n",
+ // docNodeName(*it), (void *)&*it, styleOutsideParagraph);
if (styleOutsideParagraph) return;
- nodeIndex++;
- if (nodeIndex==numNodes) return; // last node
- while (nodeIndex<numNodes && isInvisibleNode(para->children().at(nodeIndex).get()))
+ it = std::next(it);
+ while (it!=std::end(children) && isInvisibleNode(*it))
{
- nodeIndex++;
+ ++it;
}
- if (nodeIndex<numNodes)
+ if (it!=std::end(children))
{
- n = para->children().at(nodeIndex).get();
- if (mustBeOutsideParagraph(n)) return; // next element also outside paragraph
+ const DocNodeVariant &v = *it;
+ if (mustBeOutsideParagraph(v)) return; // next element also outside paragraph
}
else
{
bool needsTag = TRUE;
bool isFirst;
bool isLast;
- getParagraphContext(para,isFirst,isLast);
+ getParagraphContext(*para,isFirst,isLast);
if (isFirst && isLast) needsTag = FALSE;
//printf("forceStart first=%d last=%d needsTag=%d\n",isFirst,isLast,needsTag);
#define HTMLDOCVISITOR_H
#include "docvisitor.h"
+#include "docnode.h"
#include "qcstring.h"
class Definition;
class MemberDef;
-class DocNode;
class CodeOutputInterface;
class TextStream;
// visitor functions for leaf nodes
//--------------------------------------
- void visit(DocWord *);
- void visit(DocLinkedWord *);
- void visit(DocWhiteSpace *);
- void visit(DocSymbol *);
- void visit(DocEmoji *);
- void visit(DocURL *);
- void visit(DocLineBreak *);
- void visit(DocHorRuler *);
- void visit(DocStyleChange *);
- void visit(DocVerbatim *);
- void visit(DocAnchor *);
- void visit(DocInclude *);
- void visit(DocIncOperator *);
- void visit(DocFormula *);
- void visit(DocIndexEntry *);
- void visit(DocSimpleSectSep *);
- void visit(DocCite *);
+ void operator()(const DocWord &);
+ void operator()(const DocLinkedWord &);
+ void operator()(const DocWhiteSpace &);
+ void operator()(const DocSymbol &);
+ void operator()(const DocEmoji &);
+ void operator()(const DocURL &);
+ void operator()(const DocLineBreak &);
+ void operator()(const DocHorRuler &);
+ void operator()(const DocStyleChange &);
+ void operator()(const DocVerbatim &);
+ void operator()(const DocAnchor &);
+ void operator()(const DocInclude &);
+ void operator()(const DocIncOperator &);
+ void operator()(const DocFormula &);
+ void operator()(const DocIndexEntry &);
+ void operator()(const DocSimpleSectSep &);
+ void operator()(const DocCite &);
+ void operator()(const DocSeparator &);
//--------------------------------------
// visitor functions for compound nodes
//--------------------------------------
- void visitPre(DocAutoList *);
- void visitPost(DocAutoList *);
- void visitPre(DocAutoListItem *);
- void visitPost(DocAutoListItem *);
- void visitPre(DocPara *) ;
- void visitPost(DocPara *);
- void visitPre(DocRoot *);
- void visitPost(DocRoot *);
- void visitPre(DocSimpleSect *);
- void visitPost(DocSimpleSect *);
- void visitPre(DocTitle *);
- void visitPost(DocTitle *);
- void visitPre(DocSimpleList *);
- void visitPost(DocSimpleList *);
- void visitPre(DocSimpleListItem *);
- void visitPost(DocSimpleListItem *);
- void visitPre(DocSection *);
- void visitPost(DocSection *);
- void visitPre(DocHtmlList *);
- void visitPost(DocHtmlList *) ;
- void visitPre(DocHtmlListItem *);
- void visitPost(DocHtmlListItem *);
- void visitPre(DocHtmlDescList *);
- void visitPost(DocHtmlDescList *);
- void visitPre(DocHtmlDescTitle *);
- void visitPost(DocHtmlDescTitle *);
- void visitPre(DocHtmlDescData *);
- void visitPost(DocHtmlDescData *);
- void visitPre(DocHtmlTable *);
- void visitPost(DocHtmlTable *);
- void visitPre(DocHtmlRow *);
- void visitPost(DocHtmlRow *) ;
- void visitPre(DocHtmlCell *);
- void visitPost(DocHtmlCell *);
- void visitPre(DocHtmlCaption *);
- void visitPost(DocHtmlCaption *);
- void visitPre(DocInternal *);
- void visitPost(DocInternal *);
- void visitPre(DocHRef *);
- void visitPost(DocHRef *);
- void visitPre(DocHtmlHeader *);
- void visitPost(DocHtmlHeader *);
- void visitPre(DocImage *);
- void visitPost(DocImage *);
- void visitPre(DocDotFile *);
- void visitPost(DocDotFile *);
- void visitPre(DocMscFile *);
- void visitPost(DocMscFile *);
- void visitPre(DocDiaFile *);
- void visitPost(DocDiaFile *);
- void visitPre(DocLink *);
- void visitPost(DocLink *);
- void visitPre(DocRef *);
- void visitPost(DocRef *);
- void visitPre(DocSecRefItem *);
- void visitPost(DocSecRefItem *);
- void visitPre(DocSecRefList *);
- void visitPost(DocSecRefList *);
- void visitPre(DocParamSect *);
- void visitPost(DocParamSect *);
- void visitPre(DocParamList *);
- void visitPost(DocParamList *);
- void visitPre(DocXRefItem *);
- void visitPost(DocXRefItem *);
- void visitPre(DocInternalRef *);
- void visitPost(DocInternalRef *);
- void visitPre(DocText *);
- void visitPost(DocText *);
- void visitPre(DocHtmlBlockQuote *);
- void visitPost(DocHtmlBlockQuote *);
- void visitPre(DocVhdlFlow *);
- void visitPost(DocVhdlFlow *);
- void visitPre(DocParBlock *);
- void visitPost(DocParBlock *);
+ void operator()(const DocAutoList &);
+ void operator()(const DocAutoListItem &);
+ void operator()(const DocPara &) ;
+ void operator()(const DocRoot &);
+ void operator()(const DocSimpleSect &);
+ void operator()(const DocTitle &);
+ void operator()(const DocSimpleList &);
+ void operator()(const DocSimpleListItem &);
+ void operator()(const DocSection &);
+ void operator()(const DocHtmlList &);
+ void operator()(const DocHtmlListItem &);
+ void operator()(const DocHtmlDescList &);
+ void operator()(const DocHtmlDescTitle &);
+ void operator()(const DocHtmlDescData &);
+ void operator()(const DocHtmlTable &);
+ void operator()(const DocHtmlRow &);
+ void operator()(const DocHtmlCell &);
+ void operator()(const DocHtmlCaption &);
+ void operator()(const DocInternal &);
+ void operator()(const DocHRef &);
+ void operator()(const DocHtmlHeader &);
+ void operator()(const DocImage &);
+ void operator()(const DocDotFile &);
+ void operator()(const DocMscFile &);
+ void operator()(const DocDiaFile &);
+ void operator()(const DocLink &);
+ void operator()(const DocRef &);
+ void operator()(const DocSecRefItem &);
+ void operator()(const DocSecRefList &);
+ void operator()(const DocParamSect &);
+ void operator()(const DocParamList &);
+ void operator()(const DocXRefItem &);
+ void operator()(const DocInternalRef &);
+ void operator()(const DocText &);
+ void operator()(const DocHtmlBlockQuote &);
+ void operator()(const DocVhdlFlow &);
+ void operator()(const DocParBlock &);
private:
+ template<class T>
+ void visitChildren(const T &t)
+ {
+ for (const auto &child : t.children())
+ {
+ std::visit(*this, child);
+ }
+ }
+ template<class T>
+ void visitCaption(TextStream &t,const T &n);
+
//--------------------------------------
// helper functions
//--------------------------------------
void writePlantUMLFile(const QCString &fileName,const QCString &relPath,const QCString &context,
const QCString &srcFile,int srcLine);
- void forceEndParagraph(DocNode *n);
- void forceStartParagraph(DocNode *n);
+ template<class DocNode>
+ void forceEndParagraph(const DocNode &n);
+ template<class DocNode>
+ void forceStartParagraph(const DocNode &n);
//--------------------------------------
// state variables
//! ending ;)
static struct htmlEntityInfo
{
- DocSymbol::SymType symb;
+ HtmlEntityMapper::SymType symb;
const char *item;
const char *UTF8;
const char *html;
const char *latex;
const char *man;
const char *rtf;
- DocSymbol::PerlSymb perl;
+ HtmlEntityMapper::PerlSymb perl;
} g_htmlEntities[] =
{
#undef SYM
// helper macro to force consistent entries for the symbol and item columns
-#define SYM(s) DocSymbol::Sym_##s,"&"#s";"
+#define SYM(s) HtmlEntityMapper::Sym_##s,"&"#s";"
// HTML4 entities
// symb+item UTF-8 html xml docbook latex man rtf perl
- { SYM(nbsp), "\xc2\xa0", " ", "<nonbreakablespace/>", " ", "~", " ", "\\~", { " ", DocSymbol::Perl_char }},
- { SYM(iexcl), "\xc2\xa1", "¡", "<iexcl/>", "¡", "!`", NULL, "\\'A1", { NULL, DocSymbol::Perl_unknown }},
- { SYM(cent), "\xc2\xa2", "¢", "<cent/>", "¢", "\\textcent{}", NULL, "\\'A2", { NULL, DocSymbol::Perl_unknown }},
- { SYM(pound), "\xc2\xa3", "£", "<pound/>", "£", "{$\\pounds$}", NULL, "\\'A3", { NULL, DocSymbol::Perl_unknown }},
- { SYM(curren), "\xc2\xa4", "¤", "<curren/>", "¤", "\\textcurrency{}", NULL, "\\'A4", { NULL, DocSymbol::Perl_unknown }},
- { SYM(yen), "\xc2\xa5", "¥", "<yen/>", "¥", "{$\\yen$}", NULL, "\\'A5", { NULL, DocSymbol::Perl_unknown }},
- { SYM(brvbar), "\xc2\xa6", "¦", "<brvbar/>", "¦", "\\textbrokenbar{}", NULL, "\\'A6", { NULL, DocSymbol::Perl_unknown }},
- { SYM(sect), "\xc2\xa7", "§", "<sect/>", "<simplesect/>", "{$\\S$}", NULL, "\\'A7", { "sect", DocSymbol::Perl_symbol }},
- { SYM(uml), "\xc2\xa8", "¨", "<umlaut/>", "¨", "\\textasciidieresis{}", " \\*(4", "\\'A8", { " ", DocSymbol::Perl_umlaut }},
- { SYM(copy), "\xc2\xa9", "©", "<copy/>", "©", "\\copyright{}", "(C)", "\\'A9", { "copyright", DocSymbol::Perl_symbol }},
- { SYM(ordf), "\xc2\xaa", "ª", "<ordf/>", "ª", "\\textordfeminine{}", NULL, "\\'AA", { NULL, DocSymbol::Perl_unknown }},
- { SYM(laquo), "\xc2\xab", "«", "<laquo/>", "«", "\\guillemotleft{}", NULL, "\\'AB", { NULL, DocSymbol::Perl_unknown }},
- { SYM(not), "\xc2\xac", "¬", "<not/>", "¬", "\\textlnot", NULL, "\\'AC", { NULL, DocSymbol::Perl_unknown }},
- { SYM(shy), "\xc2\xad", "­", "<shy/>", "­", "{$\\-$}", NULL, "\\-", { NULL, DocSymbol::Perl_unknown }},
- { SYM(reg), "\xc2\xae", "®", "<registered/>", "®", "\\textregistered{}", "(R)", "\\'AE", { "registered", DocSymbol::Perl_symbol }},
- { SYM(macr), "\xc2\xaf", "¯", "<macr/>", "¯", "\\={}", NULL, "\\'AF", { NULL, DocSymbol::Perl_unknown }},
- { SYM(deg), "\xc2\xb0", "°", "<deg/>", "°", "\\textdegree{}", NULL, "\\'B0", { "deg", DocSymbol::Perl_symbol }},
- { SYM(plusmn), "\xc2\xb1", "±", "<plusmn/>", "±", "{$\\pm$}", NULL, "\\'B1", { "+/-", DocSymbol::Perl_string }},
- { SYM(sup2), "\xc2\xb2", "²", "<sup2/>", "²", "\\texttwosuperior{}", NULL, "\\'B2", { NULL, DocSymbol::Perl_unknown }},
- { SYM(sup3), "\xc2\xb3", "³", "<sup3/>", "³", "\\textthreesuperior{}", NULL, "\\'B3", { NULL, DocSymbol::Perl_unknown }},
- { SYM(acute), "\xc2\xb4", "´", "<acute/>", "´", "\\'{}", NULL, "\\'B4", { " ", DocSymbol::Perl_acute }},
- { SYM(micro), "\xc2\xb5", "µ", "<micro/>", "µ", "{$\\mu$}", NULL, "\\'B5", { NULL, DocSymbol::Perl_unknown }},
- { SYM(para), "\xc2\xb6", "¶", "<para/>", "¶", "{$\\P$}", NULL, "\\'B6", { NULL, DocSymbol::Perl_unknown }},
- { SYM(middot), "\xc2\xb7", "·", "<middot/>", "·", "\\textperiodcentered{}", NULL, "\\'B7", { NULL, DocSymbol::Perl_unknown }},
- { SYM(cedil), "\xc2\xb8", "¸", "<cedil/>", "¸", "\\c{}", " \\*,", "\\'B8", { " ", DocSymbol::Perl_cedilla }},
- { SYM(sup1), "\xc2\xb9", "¹", "<sup1/>", "¹", "\\textonesuperior{}", NULL, "\\'B9", { NULL, DocSymbol::Perl_unknown }},
- { SYM(ordm), "\xc2\xba", "º", "<ordm/>", "º", "\\textordmasculine{}", NULL, "\\'BA", { NULL, DocSymbol::Perl_unknown }},
- { SYM(raquo), "\xc2\xbb", "»", "<raquo/>", "»", "\\guillemotright{}", NULL, "\\'BB", { NULL, DocSymbol::Perl_unknown }},
- { SYM(frac14), "\xc2\xbc", "¼", "<frac14/>", "¼", "{$\\frac14$}", "1/4", "\\'BC", { NULL, DocSymbol::Perl_unknown }},
- { SYM(frac12), "\xc2\xbd", "½", "<frac12/>", "½", "{$\\frac12$}", "1/2", "\\'BD", { NULL, DocSymbol::Perl_unknown }},
- { SYM(frac34), "\xc2\xbe", "¾", "<frac34/>", "¾", "{$\\frac34$}", "3/4", "\\'BE", { NULL, DocSymbol::Perl_unknown }},
- { SYM(iquest), "\xc2\xbf", "¿", "<iquest/>", "¿", "?`", NULL, "\\'BF", { NULL, DocSymbol::Perl_unknown }},
- { SYM(Agrave), "\xc3\x80", "À", "<Agrave/>", "À", "\\`{A}", "A\\*:", "\\'C0", { "A", DocSymbol::Perl_grave }},
- { SYM(Aacute), "\xc3\x81", "Á", "<Aacute/>", "Á", "\\'{A}", "A\\*(`", "\\'C1", { "A", DocSymbol::Perl_acute }},
- { SYM(Acirc), "\xc3\x82", "Â", "<Acirc/>", "Â", "\\^{A}", "A\\*^", "\\'C2", { "A", DocSymbol::Perl_circ }},
- { SYM(Atilde), "\xc3\x83", "Ã", "<Atilde/>", "Ã", "\\~{A}", "A\\*~", "\\'C3", { "A", DocSymbol::Perl_tilde }},
- { SYM(Auml), "\xc3\x84", "Ä", "<Aumlaut/>", "Ä", "\\\"{A}", "A\\*(4", "\\'C4", { "A", DocSymbol::Perl_umlaut }},
- { SYM(Aring), "\xc3\x85", "Å", "<Aring/>", "Å", "\\AA", "A\\*o", "\\'C5", { "A", DocSymbol::Perl_ring }},
- { SYM(AElig), "\xc3\x86", "Æ", "<AElig/>", "Æ", "{\\AE}", NULL, "\\'C6", { "AElig", DocSymbol::Perl_symbol }},
- { SYM(Ccedil), "\xc3\x87", "Ç", "<Ccedil/>", "Ç", "\\c{C}", "C\\*,", "\\'C7", { "C", DocSymbol::Perl_cedilla }},
- { SYM(Egrave), "\xc3\x88", "È", "<Egrave/>", "È", "\\`{E}", "E\\*:", "\\'C8", { "E", DocSymbol::Perl_grave }},
- { SYM(Eacute), "\xc3\x89", "É", "<Eacute/>", "É", "\\'{E}", "E\\*(`", "\\'C9", { "E", DocSymbol::Perl_acute }},
- { SYM(Ecirc), "\xc3\x8a", "Ê", "<Ecirc/>", "Ê", "\\^{E}", "E\\*^", "\\'CA", { "E", DocSymbol::Perl_circ }},
- { SYM(Euml), "\xc3\x8b", "Ë", "<Eumlaut/>", "Ë", "\\\"{E}", "E\\*(4", "\\'CB", { "E", DocSymbol::Perl_umlaut }},
- { SYM(Igrave), "\xc3\x8c", "Ì", "<Igrave/>", "Ì", "\\`{I}", "I\\*:", "\\'CC", { "I", DocSymbol::Perl_grave }},
- { SYM(Iacute), "\xc3\x8d", "Í", "<Iacute/>", "Í", "\\'{I}", "I\\*(`", "\\'CD", { "I", DocSymbol::Perl_acute }},
- { SYM(Icirc), "\xc3\x8e", "Î", "<Icirc/>", "Î", "\\^{I}", "I\\*^", "\\'CE", { "I", DocSymbol::Perl_circ }},
- { SYM(Iuml), "\xc3\x8f", "Ï", "<Iumlaut/>", "Ï", "\\\"{I}", "I\\*(4", "\\'CF", { "I", DocSymbol::Perl_umlaut }},
- { SYM(ETH), "\xc3\x90", "Ð", "<ETH/>", "Ð", "\\DH", NULL, "\\'D0", { NULL, DocSymbol::Perl_unknown }},
- { SYM(Ntilde), "\xc3\x91", "Ñ", "<Ntilde/>", "Ñ", "\\~{N}", "N\\*~", "\\'D1", { "N", DocSymbol::Perl_tilde }},
- { SYM(Ograve), "\xc3\x92", "Ò", "<Ograve/>", "Ò", "\\`{O}", "O\\*:", "\\'D2", { "O", DocSymbol::Perl_grave }},
- { SYM(Oacute), "\xc3\x93", "Ó", "<Oacute/>", "Ó", "\\'{O}", "O\\*(`", "\\'D3", { "O", DocSymbol::Perl_acute }},
- { SYM(Ocirc), "\xc3\x94", "Ô", "<Ocirc/>", "Ô", "\\^{O}", "O\\*^", "\\'D4", { "O", DocSymbol::Perl_circ }},
- { SYM(Otilde), "\xc3\x95", "Õ", "<Otilde/>", "Õ", "\\~{O}", "O\\*~", "\\'D5", { "O", DocSymbol::Perl_tilde }},
- { SYM(Ouml), "\xc3\x96", "Ö", "<Oumlaut/>", "Ö", "\\\"{O}", "O\\*(4", "\\'D6", { "O", DocSymbol::Perl_umlaut }},
- { SYM(times), "\xc3\x97", "×", "<times/>", "×", "{$\\times$}", NULL, "\\'D7", { "*", DocSymbol::Perl_char }},
- { SYM(Oslash), "\xc3\x98", "Ø", "<Oslash/>", "Ø", "{\\O}", "O\x08/", "\\'D8", { "O", DocSymbol::Perl_slash }},
- { SYM(Ugrave), "\xc3\x99", "Ù", "<Ugrave/>", "Ù", "\\`{U}", "U\\*:", "\\'D9", { "U", DocSymbol::Perl_grave }},
- { SYM(Uacute), "\xc3\x9a", "Ú", "<Uacute/>", "Ú", "\\'{U}", "U\\*(`", "\\'DA", { "U", DocSymbol::Perl_acute }},
- { SYM(Ucirc), "\xc3\x9b", "Û", "<Ucirc/>", "Û", "\\^{U}", "U\\*^", "\\'DB", { "U", DocSymbol::Perl_circ }},
- { SYM(Uuml), "\xc3\x9c", "Ü", "<Uumlaut/>", "Ü", "\\\"{U}", "U\\*(4", "\\'DC", { "U", DocSymbol::Perl_umlaut }},
- { SYM(Yacute), "\xc3\x9d", "Ý", "<Yacute/>", "Ý", "\\'{Y}", "Y\\*(`", "\\'DD", { "Y", DocSymbol::Perl_acute }},
- { SYM(THORN), "\xc3\x9e", "Þ", "<THORN/>", "Þ", "\\TH", NULL, "\\'DE", { NULL, DocSymbol::Perl_unknown }},
- { SYM(szlig), "\xc3\x9f", "ß", "<szlig/>", "ß", "{\\ss}", "s\\*:", "\\'DF", { "szlig", DocSymbol::Perl_symbol }},
- { SYM(agrave), "\xc3\xa0", "à", "<agrave/>", "à", "\\`{a}", "a\\*:", "\\'E0", { "a", DocSymbol::Perl_grave }},
- { SYM(aacute), "\xc3\xa1", "á", "<aacute/>", "á", "\\'{a}", "a\\*(`", "\\'E1", { "a", DocSymbol::Perl_acute }},
- { SYM(acirc), "\xc3\xa2", "â", "<acirc/>", "â", "\\^{a}", "a\\*^", "\\'E2", { "a", DocSymbol::Perl_circ }},
- { SYM(atilde), "\xc3\xa3", "ã", "<atilde/>", "ã", "\\~{a}", "a\\*~", "\\'E3", { "a", DocSymbol::Perl_tilde }},
- { SYM(auml), "\xc3\xa4", "ä", "<aumlaut/>", "ä", "\\\"{a}", "a\\*(4", "\\'E4", { "a", DocSymbol::Perl_umlaut }},
- { SYM(aring), "\xc3\xa5", "å", "<aring/>", "å", "\\aa", "a\\*o", "\\'E5", { "a", DocSymbol::Perl_ring }},
- { SYM(aelig), "\xc3\xa6", "æ", "<aelig/>", "æ", "{\\ae}", NULL, "\\'E6", { "aelig", DocSymbol::Perl_symbol }},
- { SYM(ccedil), "\xc3\xa7", "ç", "<ccedil/>", "ç", "\\c{c}", "c\\*,", "\\'E7", { "c", DocSymbol::Perl_cedilla }},
- { SYM(egrave), "\xc3\xa8", "è", "<egrave/>", "è", "\\`{e}", "e\\*:", "\\'E8", { "e", DocSymbol::Perl_grave }},
- { SYM(eacute), "\xc3\xa9", "é", "<eacute/>", "é", "\\'{e}", "e\\*(`", "\\'E9", { "e", DocSymbol::Perl_acute }},
- { SYM(ecirc), "\xc3\xaa", "ê", "<ecirc/>", "ê", "\\^{e}", "e\\*^", "\\'EA", { "e", DocSymbol::Perl_circ }},
- { SYM(euml), "\xc3\xab", "ë", "<eumlaut/>", "ë", "\\\"{e}", "e\\*(4", "\\'EB", { "e", DocSymbol::Perl_umlaut }},
- { SYM(igrave), "\xc3\xac", "ì", "<igrave/>", "ì", "\\`{\\i}", "i\\*:", "\\'EC", { "i", DocSymbol::Perl_grave }},
- { SYM(iacute), "\xc3\xad", "í", "<iacute/>", "í", "\\'{\\i}", "i\\*(`", "\\'ED", { "i", DocSymbol::Perl_acute }},
- { SYM(icirc), "\xc3\xae", "î", "<icirc/>", "î", "\\^{\\i}", "i\\*^", "\\'EE", { "i", DocSymbol::Perl_circ }},
- { SYM(iuml), "\xc3\xaf", "ï", "<iumlaut/>", "ï", "\\\"{\\i}", "i\\*(4", "\\'EF", { "i", DocSymbol::Perl_umlaut }},
- { SYM(eth), "\xc3\xb0", "ð", "<eth/>", "ð", "\\dh", NULL, "\\'F0", { NULL, DocSymbol::Perl_unknown }},
- { SYM(ntilde), "\xc3\xb1", "ñ", "<ntilde/>", "ñ", "\\~{n}", "n\\*~", "\\'F1", { "n", DocSymbol::Perl_tilde }},
- { SYM(ograve), "\xc3\xb2", "ò", "<ograve/>", "ò", "\\`{o}", "o\\*:", "\\'F2", { "o", DocSymbol::Perl_grave }},
- { SYM(oacute), "\xc3\xb3", "ó", "<oacute/>", "ó", "\\'{o}", "o\\*(`", "\\'F3", { "o", DocSymbol::Perl_acute }},
- { SYM(ocirc), "\xc3\xb4", "ô", "<ocirc/>", "ô", "\\^{o}", "o\\*^", "\\'F4", { "o", DocSymbol::Perl_circ }},
- { SYM(otilde), "\xc3\xb5", "õ", "<otilde/>", "õ", "\\~{o}", "o\\*~", "\\'F5", { "o", DocSymbol::Perl_tilde }},
- { SYM(ouml), "\xc3\xb6", "ö", "<oumlaut/>", "ö", "\\\"{o}", "o\\*(4", "\\'F6", { "o", DocSymbol::Perl_umlaut }},
- { SYM(divide), "\xc3\xb7", "÷", "<divide/>", "÷", "{$\\div$}", NULL, "\\'F7", { NULL, DocSymbol::Perl_unknown }},
- { SYM(oslash), "\xc3\xb8", "ø", "<oslash/>", "ø", "{\\o}", "o\x08/", "\\'F8", { "o", DocSymbol::Perl_slash }},
- { SYM(ugrave), "\xc3\xb9", "ù", "<ugrave/>", "ù", "\\`{u}", "u\\*:", "\\'F9", { "u", DocSymbol::Perl_grave }},
- { SYM(uacute), "\xc3\xba", "ú", "<uacute/>", "ú", "\\'{u}", "u\\*(`", "\\'FA", { "u", DocSymbol::Perl_acute }},
- { SYM(ucirc), "\xc3\xbb", "û", "<ucirc/>", "û", "\\^{u}", "u\\*^", "\\'FB", { "u", DocSymbol::Perl_circ }},
- { SYM(uuml), "\xc3\xbc", "ü", "<uumlaut/>", "ü", "\\\"{u}", "u\\*(4", "\\'FC", { "u", DocSymbol::Perl_umlaut }},
- { SYM(yacute), "\xc3\xbd", "ý", "<yacute/>", "ý", "\\'{y}", "y\\*(`", "\\'FD", { "y", DocSymbol::Perl_acute }},
- { SYM(thorn), "\xc3\xbe", "þ", "<thorn/>", "þ", "\\th", NULL, "\\'FE", { NULL, DocSymbol::Perl_unknown }},
- { SYM(yuml), "\xc3\xbf", "ÿ", "<yumlaut/>", "ÿ", "\\\"{y}", "y\\*(4", "\\'FF", { "y", DocSymbol::Perl_umlaut }},
- { SYM(fnof), "\xc6\x92", "ƒ", "<fnof/>", "ƒ", "\\textflorin", NULL, "\\'83", { NULL, DocSymbol::Perl_unknown }},
- { SYM(Alpha), "\xce\x91", "Α", "<Alpha/>", "Α", "A", NULL, "\\u0913?", { "A", DocSymbol::Perl_char }},
- { SYM(Beta), "\xce\x92", "Β", "<Beta/>", "Β", "B", NULL, "\\u0914?", { "B", DocSymbol::Perl_char }},
- { SYM(Gamma), "\xce\x93", "Γ", "<Gamma/>", "Γ", "{$\\Gamma$}", NULL, "\\u0915?", { "Gamma", DocSymbol::Perl_symbol }},
- { SYM(Delta), "\xce\x94", "Δ", "<Delta/>", "Δ", "{$\\Delta$}", NULL, "\\u0916?", { "Delta", DocSymbol::Perl_symbol }},
- { SYM(Epsilon), "\xce\x95", "Ε", "<Epsilon/>", "Ε", "E", NULL, "\\u0917?", { "E", DocSymbol::Perl_char }},
- { SYM(Zeta), "\xce\x96", "Ζ", "<Zeta/>", "Ζ", "Z", NULL, "\\u0918?", { "Z", DocSymbol::Perl_char }},
- { SYM(Eta), "\xce\x97", "Η", "<Eta/>", "Η", "H", NULL, "\\u0919?", { "H", DocSymbol::Perl_char }},
- { SYM(Theta), "\xce\x98", "Θ", "<Theta/>", "Θ", "{$\\Theta$}", NULL, "\\u0920?", { "Theta", DocSymbol::Perl_symbol }},
- { SYM(Iota), "\xce\x99", "Ι", "<Iota/>", "Ι", "I", NULL, "\\u0921?", { "I", DocSymbol::Perl_char }},
- { SYM(Kappa), "\xce\x9a", "Κ", "<Kappa/>", "Κ", "K", NULL, "\\u0922?", { "K", DocSymbol::Perl_char }},
- { SYM(Lambda), "\xce\x9b", "Λ", "<Lambda/>", "Λ", "{$\\Lambda$}", NULL, "\\u0923?", { "Lambda", DocSymbol::Perl_symbol }},
- { SYM(Mu), "\xce\x9c", "Μ", "<Mu/>", "Μ", "M", NULL, "\\u0924?", { "M", DocSymbol::Perl_char }},
- { SYM(Nu), "\xce\x9d", "Ν", "<Nu/>", "Ν", "N", NULL, "\\u0925?", { "N", DocSymbol::Perl_char }},
- { SYM(Xi), "\xce\x9e", "Ξ", "<Xi/>", "Ξ", "{$\\Xi$}", NULL, "\\u0926?", { "Xi", DocSymbol::Perl_symbol }},
- { SYM(Omicron), "\xce\x9f", "Ο", "<Omicron/>", "Ο", "O", NULL, "\\u0927?", { "O", DocSymbol::Perl_char }},
- { SYM(Pi), "\xce\xa0", "Π", "<Pi/>", "Π", "{$\\Pi$}", NULL, "\\u0928?", { "Pi", DocSymbol::Perl_symbol }},
- { SYM(Rho), "\xce\xa1", "Ρ", "<Rho/>", "Ρ", "P", NULL, "\\u0929?", { "P", DocSymbol::Perl_char }},
- { SYM(Sigma), "\xce\xa3", "Σ", "<Sigma/>", "Σ", "{$\\Sigma$}", NULL, "\\u0931?", { "Sigma", DocSymbol::Perl_symbol }},
- { SYM(Tau), "\xce\xa4", "Τ", "<Tau/>", "Τ", "T", NULL, "\\u0932?", { "T", DocSymbol::Perl_char }},
- { SYM(Upsilon), "\xce\xa5", "Υ", "<Upsilon/>", "Υ", "{$\\Upsilon$}", NULL, "\\u0933?", { "Upsilon", DocSymbol::Perl_symbol }},
- { SYM(Phi), "\xce\xa6", "Φ", "<Phi/>", "Φ", "{$\\Phi$}", NULL, "\\u0934?", { "Phi", DocSymbol::Perl_symbol }},
- { SYM(Chi), "\xce\xa7", "Χ", "<Chi/>", "Χ", "X", NULL, "\\u0935?", { "X", DocSymbol::Perl_char }},
- { SYM(Psi), "\xce\xa8", "Ψ", "<Psi/>", "Ψ", "{$\\Psi$}", NULL, "\\u0936?", { "Psi", DocSymbol::Perl_symbol }},
- { SYM(Omega), "\xce\xa9", "Ω", "<Omega/>", "Ω", "{$\\Omega$}", NULL, "\\u0937?", { "Omega", DocSymbol::Perl_symbol }},
- { SYM(alpha), "\xce\xb1", "α", "<alpha/>", "α", "{$\\alpha$}", NULL, "\\u0945?", { "alpha", DocSymbol::Perl_symbol }},
- { SYM(beta), "\xce\xb2", "β", "<beta/>", "β", "{$\\beta$}", NULL, "\\u0946?", { "beta", DocSymbol::Perl_symbol }},
- { SYM(gamma), "\xce\xb3", "γ", "<gamma/>", "γ", "{$\\gamma$}", NULL, "\\u0947?", { "gamma", DocSymbol::Perl_symbol }},
- { SYM(delta), "\xce\xb4", "δ", "<delta/>", "δ", "{$\\delta$}", NULL, "\\u0948?", { "delta", DocSymbol::Perl_symbol }},
- { SYM(epsilon), "\xce\xb5", "ε", "<epsilon/>", "ε", "{$\\varepsilon$}", NULL, "\\u0949?", { "epsilon", DocSymbol::Perl_symbol }},
- { SYM(zeta), "\xce\xb6", "ζ", "<zeta/>", "ζ", "{$\\zeta$}", NULL, "\\u0950?", { "zeta", DocSymbol::Perl_symbol }},
- { SYM(eta), "\xce\xb7", "η", "<eta/>", "η", "{$\\eta$}", NULL, "\\u0951?", { "eta", DocSymbol::Perl_symbol }},
- { SYM(theta), "\xce\xb8", "θ", "<theta/>", "θ", "{$\\theta$}", NULL, "\\u0952?", { "theta", DocSymbol::Perl_symbol }},
- { SYM(iota), "\xce\xb9", "ι", "<iota/>", "ι", "{$\\iota$}", NULL, "\\u0953?", { "iota", DocSymbol::Perl_symbol }},
- { SYM(kappa), "\xce\xba", "κ", "<kappa/>", "κ", "{$\\kappa$}", NULL, "\\u0954?", { "kappa", DocSymbol::Perl_symbol }},
- { SYM(lambda), "\xce\xbb", "λ", "<lambda/>", "λ", "{$\\lambda$}", NULL, "\\u0955?", { "lambda", DocSymbol::Perl_symbol }},
- { SYM(mu), "\xce\xbc", "μ", "<mu/>", "μ", "{$\\mu$}", NULL, "\\u0956?", { "mu", DocSymbol::Perl_symbol }},
- { SYM(nu), "\xce\xbd", "ν", "<nu/>", "ν", "{$\\nu$}", NULL, "\\u0957?", { "nu", DocSymbol::Perl_symbol }},
- { SYM(xi), "\xce\xbe", "ξ", "<xi/>", "ξ", "{$\\xi$}", NULL, "\\u0958?", { "xi", DocSymbol::Perl_symbol }},
- { SYM(omicron), "\xce\xbf", "ο", "<omicron/>", "ο", "{$\\omicron$}", NULL, "\\u0959?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(pi), "\xcf\x80", "π", "<pi/>", "π", "{$\\pi$}", NULL, "\\u0960?", { "pi", DocSymbol::Perl_symbol }},
- { SYM(rho), "\xcf\x81", "ρ", "<rho/>", "ρ", "{$\\rho$}", NULL, "\\u0961?", { "rho", DocSymbol::Perl_symbol }},
- { SYM(sigmaf), "\xcf\x82", "ς", "<sigmaf/>", "ς", "{$\\varsigma$}", NULL, "\\u0962?", { "sigma", DocSymbol::Perl_symbol }},
- { SYM(sigma), "\xcf\x83", "σ", "<sigma/>", "σ", "{$\\sigma$}", NULL, "\\u0963?", { "sigma", DocSymbol::Perl_symbol }},
- { SYM(tau), "\xcf\x84", "τ", "<tau/>", "τ", "{$\\tau$}", NULL, "\\u0964?", { "tau", DocSymbol::Perl_symbol }},
- { SYM(upsilon), "\xcf\x85", "υ", "<upsilon/>", "υ", "{$\\upsilon$}", NULL, "\\u0965?", { "upsilon", DocSymbol::Perl_symbol }},
- { SYM(phi), "\xcf\x86", "φ", "<phi/>", "φ", "{$\\varphi$}", NULL, "\\u0966?", { "phi", DocSymbol::Perl_symbol }},
- { SYM(chi), "\xcf\x87", "χ", "<chi/>", "χ", "{$\\chi$}", NULL, "\\u0967?", { "chi", DocSymbol::Perl_symbol }},
- { SYM(psi), "\xcf\x88", "ψ", "<psi/>", "ψ", "{$\\psi$}", NULL, "\\u0968?", { "psi", DocSymbol::Perl_symbol }},
- { SYM(omega), "\xcf\x89", "ω", "<omega/>", "ω", "{$\\omega$}", NULL, "\\u0969?", { "omega", DocSymbol::Perl_symbol }},
- { SYM(thetasym), "\xcf\x91", "ϑ", "<thetasym/>", "ϑ", "{$\\vartheta$}", NULL, "\\u977?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(upsih), "\xcf\x92", "ϒ", "<upsih/>", "ϒ", "{$\\Upsilon$}", NULL, "\\u978?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(piv), "\xcf\x96", "ϖ", "<piv/>", "ϖ", "{$\\varpi$}", NULL, "\\u982?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(bull), "\xe2\x80\xa2", "•", "<bull/>", "•", "\\textbullet{}", NULL, "\\'95", { NULL, DocSymbol::Perl_unknown }},
- { SYM(hellip), "\xe2\x80\xa6", "…", "<hellip/>", "…", "{$\\dots$}", NULL, "\\'85", { NULL, DocSymbol::Perl_unknown }},
- { SYM(prime), "\xe2\x80\xb2", "′", "<prime/>", "′", "'", NULL, "\\u8242?", { "\\\'", DocSymbol::Perl_string }},
- { SYM(Prime), "\xe2\x80\xb3", "″", "<Prime/>", "″", "''", NULL, "\\u8243?", { "\"", DocSymbol::Perl_char }},
- { SYM(oline), "\xe2\x80\xbe", "‾", "<oline/>", "‾", "{$\\overline{\\,}$}", NULL, "\\u8254?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(frasl), "\xe2\x81\x84", "⁄", "<frasl/>", "⁄", "/", NULL, "\\u8260?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(weierp), "\xe2\x84\x98", "℘", "<weierp/>", "℘", "{$\\wp$}", NULL, "\\u8472?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(image), "\xe2\x84\x91", "ℑ", "<imaginary/>", "ℑ", "{$\\Im$}", NULL, "\\u8465?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(real), "\xe2\x84\x9c", "ℜ", "<real/>", "ℜ", "{$\\Re$}", NULL, "\\u8476?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(trade), "\xe2\x84\xa2", "™", "<trademark/>", "™", "\\texttrademark{}", "(TM)", "\\'99", { "trademark", DocSymbol::Perl_symbol }},
- { SYM(alefsym), "\xe2\x85\xb5", "ℵ", "<alefsym/>", "ℵ", "{$\\aleph$}", NULL, "\\u8501?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(larr), "\xe2\x86\x90", "←", "<larr/>", "←", "{$\\leftarrow$}", NULL, "\\u8592?", { "<-", DocSymbol::Perl_string }},
- { SYM(uarr), "\xe2\x86\x91", "↑", "<uarr/>", "↑", "{$\\uparrow$}", NULL, "\\u8593?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(rarr), "\xe2\x86\x92", "→", "<rarr/>", "→", "{$\\rightarrow$}", NULL, "\\u8594?", { "->", DocSymbol::Perl_string }},
- { SYM(darr), "\xe2\x86\x93", "↓", "<darr/>", "↓", "{$\\downarrow$}", NULL, "\\u8595?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(harr), "\xe2\x86\x94", "↔", "<harr/>", "↔", "{$\\leftrightarrow$}", NULL, "\\u8596?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(crarr), "\xe2\x86\xb5", "↵", "<crarr/>", "↵", "{$\\hookleftarrow$}", NULL, "\\u8629?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(lArr), "\xe2\x87\x90", "⇐", "<lArr/>", "⇐", "{$\\Leftarrow$}", NULL, "\\u8656?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(uArr), "\xe2\x87\x91", "⇑", "<uArr/>", "⇑", "{$\\Uparrow$}", NULL, "\\u8657?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(rArr), "\xe2\x87\x92", "⇒", "<rArr/>", "⇒", "{$\\Rightarrow$}", NULL, "\\u8658?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(dArr), "\xe2\x87\x93", "⇓", "<dArr/>", "⇓", "{$\\Downarrow$}", NULL, "\\u8659?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(hArr), "\xe2\x87\x94", "⇔", "<hArr/>", "⇔", "{$\\Leftrightarrow$}", NULL, "\\u8660?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(forall), "\xe2\x88\x80", "∀", "<forall/>", "∀", "{$\\forall$}", NULL, "\\u8704?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(part), "\xe2\x88\x82", "∂", "<part/>", "∂", "{$\\partial$}", NULL, "\\u8706?", { "partial", DocSymbol::Perl_symbol }},
- { SYM(exist), "\xe2\x88\x83", "∃", "<exist/>", "∃", "{$\\exists$}", NULL, "\\u8707?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(empty), "\xe2\x88\x85", "∅", "<empty/>", "∅", "{$\\emptyset$}", NULL, "\\u8709?", { "empty", DocSymbol::Perl_symbol }},
- { SYM(nabla), "\xe2\x88\x87", "∇", "<nabla/>", "∇", "{$\\nabla$}", NULL, "\\u8711?", { "nabla", DocSymbol::Perl_symbol }},
- { SYM(isin), "\xe2\x88\x88", "∈", "<isin/>", "∈", "{$\\in$}", NULL, "\\u8712?", { "in", DocSymbol::Perl_symbol }},
- { SYM(notin), "\xe2\x88\x89", "∉", "<notin/>", "∉", "{$\\notin$}", NULL, "\\u8713?", { "notin", DocSymbol::Perl_symbol }},
- { SYM(ni), "\xe2\x88\x8b", "∋", "<ni/>", "∋", "{$\\ni$}", NULL, "\\u8715?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(prod), "\xe2\x88\x8f", "∏", "<prod/>", "∏", "{$\\prod$}", NULL, "\\u8719?", { "prod", DocSymbol::Perl_symbol }},
- { SYM(sum), "\xe2\x88\x91", "∑", "<sum/>", "∑", "{$\\sum$}", NULL, "\\u8721?", { "sum", DocSymbol::Perl_symbol }},
- { SYM(minus), "\xe2\x88\x92", "−", "<minus/>", "−", "-", NULL, "\\u8722?", { "-", DocSymbol::Perl_char }},
- { SYM(lowast), "\xe2\x88\x97", "∗", "<lowast/>", "∗", "{$\\ast$}", NULL, "\\u8727?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(radic), "\xe2\x88\x9a", "√", "<radic/>", "√", "{$\\surd$}", NULL, "\\u8730?", { "sqrt", DocSymbol::Perl_symbol }},
- { SYM(prop), "\xe2\x88\x9d", "∝", "<prop/>", "∝", "{$\\propto$}", NULL, "\\u8733?", { "propto", DocSymbol::Perl_symbol }},
- { SYM(infin), "\xe2\x88\x9e", "∞", "<infin/>", "∞", "{$\\infty$}", NULL, "\\u8734?", { "inf", DocSymbol::Perl_symbol }},
- { SYM(ang), "\xe2\x88\xa0", "∠", "<ang/>", "∠", "{$\\angle$}", NULL, "\\u8736?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(and), "\xe2\x88\xa7", "∧", "<and/>", "∧", "{$\\wedge$}", NULL, "\\u8743?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(or), "\xe2\x88\xa8", "∨", "<or/>", "∨", "{$\\vee$}", NULL, "\\u8744?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(cap), "\xe2\x88\xa9", "∩", "<cap/>", "∩", "{$\\cap$}", NULL, "\\u8745?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(cup), "\xe2\x88\xaa", "∪", "<cup/>", "∪", "{$\\cup$}", NULL, "\\u8746?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(int), "\xe2\x88\xab", "∫", "<int/>", "∫", "{$\\int$}", NULL, "\\u8747?", { "int", DocSymbol::Perl_symbol }},
- { SYM(there4), "\xe2\x88\xb4", "∴", "<there4/>", "∴", "{$\\therefore$}", NULL, "\\u8756?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(sim), "\xe2\x88\xbc", "∼", "<sim/>", "∼", "{$\\sim$}", NULL, "\\u8764?", { "~", DocSymbol::Perl_char }},
- { SYM(cong), "\xe2\x89\x85", "≅", "<cong/>", "≅", "{$\\cong$}", NULL, "\\u8773?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(asymp), "\xe2\x89\x88", "≈", "<asymp/>", "≈", "{$\\approx$}", NULL, "\\u8776?", { "approx", DocSymbol::Perl_symbol }},
- { SYM(ne), "\xe2\x89\xa0", "≠", "<ne/>", "≠", "{$\\ne$}", NULL, "\\u8800?", { "!=", DocSymbol::Perl_string }},
- { SYM(equiv), "\xe2\x89\xa1", "≡", "<equiv/>", "≡", "{$\\equiv$}", NULL, "\\u8801?", { "equiv", DocSymbol::Perl_symbol }},
- { SYM(le), "\xe2\x89\xa4", "≤", "<le/>", "≤", "{$\\le$}", NULL, "\\u8804?", { "<=", DocSymbol::Perl_string }},
- { SYM(ge), "\xe2\x89\xa5", "≥", "<ge/>", "≥", "{$\\ge$}", NULL, "\\u8805?", { ">=", DocSymbol::Perl_string }},
- { SYM(sub), "\xe2\x8a\x82", "⊂", "<sub/>", "⊂", "{$\\subset$}", NULL, "\\u8834?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(sup), "\xe2\x8a\x83", "⊃", "<sup/>", "⊃", "{$\\supset$}", NULL, "\\u8835?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(nsub), "\xe2\x8a\x84", "⊄", "<nsub/>", "⊄", "{$\\not\\subset$}", NULL, "\\u8836?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(sube), "\xe2\x8a\x86", "⊆", "<sube/>", "⊆", "{$\\subseteq$}", NULL, "\\u8838?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(supe), "\xe2\x8a\x87", "⊇", "<supe/>", "⊇", "{$\\supseteq$}", NULL, "\\u8839?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(oplus), "\xe2\x8a\x95", "⊕", "<oplus/>", "⊕", "{$\\oplus$}", NULL, "\\u8853?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(otimes), "\xe2\x8a\x97", "⊗", "<otimes/>", "⊗", "{$\\otimes$}", NULL, "\\u8855?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(perp), "\xe2\x8a\xa5", "⊥", "<perp/>", "⊥", "{$\\perp$}", NULL, "\\u8869?", { "perp", DocSymbol::Perl_symbol }},
- { SYM(sdot), "\xe2\x8b\x85", "⋅", "<sdot/>", "⋅", "{$\\cdot$}", NULL, "\\u8901?", { ".", DocSymbol::Perl_char }},
- { SYM(lceil), "\xe2\x8c\x88", "⌈", "<lceil/>", "⌈", "{$\\lceil$}", NULL, "\\u8968?", { "lceil", DocSymbol::Perl_symbol }},
- { SYM(rceil), "\xe2\x8c\x89", "⌉", "<rceil/>", "⌉", "{$\\rceil$}", NULL, "\\u8969?", { "rceil", DocSymbol::Perl_symbol }},
- { SYM(lfloor), "\xe2\x8c\x8a", "⌊", "<lfloor/>", "⌊", "{$\\lfloor$}", NULL, "\\u8970?", { "lfloor", DocSymbol::Perl_symbol }},
- { SYM(rfloor), "\xe2\x8c\x8b", "⌋", "<rfloor/>", "⌋", "{$\\rfloor$}", NULL, "\\u8971?", { "rfloor", DocSymbol::Perl_symbol }},
- { SYM(lang), "\xe2\x8c\xa9", "⟨", "<lang/>", "〈", "{$\\langle$}", NULL, "\\u9001?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(rang), "\xe2\x8c\xaa", "⟩", "<rang/>", "〉", "{$\\rangle$}", NULL, "\\u9002?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(loz), "\xe2\x97\x8a", "◊", "<loz/>", "◊", "{$\\lozenge$}", NULL, "\\u9674?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(spades), "\xe2\x99\xa0", "♠", "<spades/>", "♠", "{$\\spadesuit$}", NULL, "\\u9824?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(clubs), "\xe2\x99\xa3", "♣", "<clubs/>", "♣", "{$\\clubsuit$}", NULL, "\\u9827?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(hearts), "\xe2\x99\xa5", "♥", "<hearts/>", "♥", "{$\\heartsuit$}", NULL, "\\u9829?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(diams), "\xe2\x99\xa6", "♦", "<diams/>", "♦", "{$\\diamondsuit$}", NULL, "\\u9830?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(quot), "\"", """, "\"", """, "\"{}", "\"", "\"", { "\"", DocSymbol::Perl_char }},
- { SYM(amp), "&", "&", "&", "&", "\\&", "&", "&", { "&", DocSymbol::Perl_char }},
- { SYM(lt), "<", "<", "<", "<", "<", "<", "<", { "<", DocSymbol::Perl_char }},
- { SYM(gt), ">", ">", ">", ">", ">", ">", ">", { ">", DocSymbol::Perl_char }},
- { SYM(OElig), "\xc5\x92", "Œ", "<OElig/>", "Œ", "\\OE", NULL, "\\'8C", { NULL, DocSymbol::Perl_unknown }},
- { SYM(oelig), "\xc5\x93", "œ", "<oelig/>", "œ", "\\oe", NULL, "\\'9C", { NULL, DocSymbol::Perl_unknown }},
- { SYM(Scaron), "\xc5\xa0", "Š", "<Scaron/>", "Š", "\\v{S}", NULL, "\\'8A", { NULL, DocSymbol::Perl_unknown }},
- { SYM(scaron), "\xc5\xa1", "š", "<scaron/>", "š", "\\v{s}", NULL, "\\'9A", { NULL, DocSymbol::Perl_unknown }},
- { SYM(Yuml), "\xc5\xb8", "Ÿ", "<Yumlaut/>", "Ÿ", "\\\"{Y}", "Y\\*(4", "\\'9F", { "Y", DocSymbol::Perl_umlaut }},
- { SYM(circ), "\xcb\x86", "ˆ", "<circ/>", "ˆ", "{$\\circ$}", NULL, "\\'88", { " ", DocSymbol::Perl_circ }},
- { SYM(tilde), "\xcb\x9c", "˜", "<tilde/>", "˜", "\\~{}", "~", "\\'98", { " ", DocSymbol::Perl_tilde }},
- { SYM(ensp), "\xe2\x80\x82", " ", "<ensp/>", " ", "\\enskip{}", NULL, "{\\enspace}", { NULL, DocSymbol::Perl_unknown }},
- { SYM(emsp), "\xe2\x80\x83", " ", "<emsp/>", " ", "\\quad{}", NULL, "{\\emspace}", { NULL, DocSymbol::Perl_unknown }},
- { SYM(thinsp), "\xe2\x80\x89", " ", "<thinsp/>", " ", "\\,", NULL, "{\\qmspace}", { NULL, DocSymbol::Perl_unknown }},
- { SYM(zwnj), "\xe2\x80\x8c", "‌", "<zwnj/>", "‌", "{}", NULL, "\\zwnj", { NULL, DocSymbol::Perl_unknown }},
- { SYM(zwj), "\xe2\x80\x8d", "‍", "<zwj/>", "‍", "", NULL, "\\zwj", { NULL, DocSymbol::Perl_unknown }},
- { SYM(lrm), "\xe2\x80\x8e", "‎", "<lrm/>", "‎", "", NULL, "\\ltrmark", { NULL, DocSymbol::Perl_unknown }},
- { SYM(rlm), "\xe2\x80\x8f", "‏", "<rlm/>", "‏", "", NULL, "\\rtlmark", { NULL, DocSymbol::Perl_unknown }},
- { SYM(ndash), "\xe2\x80\x93", "–", "<ndash/>", "–", "--", "--", "\\'96", { "-", DocSymbol::Perl_char }},
- { SYM(mdash), "\xe2\x80\x94", "—", "<mdash/>", "—", "---", "---", "\\'97", { "--", DocSymbol::Perl_string }},
- { SYM(lsquo), "\xe2\x80\x98", "‘", "<lsquo/>", "‘", "`", "`", "\\'91", { "\\\'", DocSymbol::Perl_string }},
- { SYM(rsquo), "\xe2\x80\x99", "’", "<rsquo/>", "’", "'", "'", "\\'92", { "\\\'", DocSymbol::Perl_string }},
- { SYM(sbquo), "\xe2\x80\x9a", "‚", "<sbquo/>", "‚", "\\quotesinglbase{}", NULL, "\\'82", { NULL, DocSymbol::Perl_unknown }},
- { SYM(ldquo), "\xe2\x80\x9c", "“", "<ldquo/>", "“", "``", "``", "\\'93", { "\"", DocSymbol::Perl_char }},
- { SYM(rdquo), "\xe2\x80\x9d", "”", "<rdquo/>", "”", "''", "''", "\\'94", { "\"", DocSymbol::Perl_char }},
- { SYM(bdquo), "\xe2\x80\x9e", "„", "<bdquo/>", "„", "\\quotedblbase{}", NULL, "\\'84", { NULL, DocSymbol::Perl_unknown }},
- { SYM(dagger), "\xe2\x80\xa0", "†", "<dagger/>", "†", "{$\\dagger$}", NULL, "\\'86", { NULL, DocSymbol::Perl_unknown }},
- { SYM(Dagger), "\xe2\x80\xa1", "‡", "<Dagger/>", "‡", "{$\\ddagger$}", NULL, "\\'87", { NULL, DocSymbol::Perl_unknown }},
- { SYM(permil), "\xe2\x80\xb0", "‰", "<permil/>", "‰", "{$\\permil{}$}", NULL, "\\'89", { NULL, DocSymbol::Perl_unknown }},
- { SYM(lsaquo), "\xe2\x80\xb9", "‹", "<lsaquo/>", "‹", "\\guilsinglleft{}", NULL, "\\'8B", { NULL, DocSymbol::Perl_unknown }},
- { SYM(rsaquo), "\xe2\x80\xba", "›", "<rsaquo/>", "›", "\\guilsinglright{}", NULL, "\\'9B", { NULL, DocSymbol::Perl_unknown }},
- { SYM(euro), "\xe2\x82\xac", "€", "<euro/>", "€", "\\texteuro{}", NULL, "\\'80", { NULL, DocSymbol::Perl_unknown }},
+ { SYM(nbsp), "\xc2\xa0", " ", "<nonbreakablespace/>", " ", "~", " ", "\\~", { " ", HtmlEntityMapper::Perl_char }},
+ { SYM(iexcl), "\xc2\xa1", "¡", "<iexcl/>", "¡", "!`", NULL, "\\'A1", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(cent), "\xc2\xa2", "¢", "<cent/>", "¢", "\\textcent{}", NULL, "\\'A2", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(pound), "\xc2\xa3", "£", "<pound/>", "£", "{$\\pounds$}", NULL, "\\'A3", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(curren), "\xc2\xa4", "¤", "<curren/>", "¤", "\\textcurrency{}", NULL, "\\'A4", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(yen), "\xc2\xa5", "¥", "<yen/>", "¥", "{$\\yen$}", NULL, "\\'A5", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(brvbar), "\xc2\xa6", "¦", "<brvbar/>", "¦", "\\textbrokenbar{}", NULL, "\\'A6", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(sect), "\xc2\xa7", "§", "<sect/>", "<simplesect/>", "{$\\S$}", NULL, "\\'A7", { "sect", HtmlEntityMapper::Perl_symbol }},
+ { SYM(uml), "\xc2\xa8", "¨", "<umlaut/>", "¨", "\\textasciidieresis{}", " \\*(4", "\\'A8", { " ", HtmlEntityMapper::Perl_umlaut }},
+ { SYM(copy), "\xc2\xa9", "©", "<copy/>", "©", "\\copyright{}", "(C)", "\\'A9", { "copyright", HtmlEntityMapper::Perl_symbol }},
+ { SYM(ordf), "\xc2\xaa", "ª", "<ordf/>", "ª", "\\textordfeminine{}", NULL, "\\'AA", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(laquo), "\xc2\xab", "«", "<laquo/>", "«", "\\guillemotleft{}", NULL, "\\'AB", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(not), "\xc2\xac", "¬", "<not/>", "¬", "\\textlnot", NULL, "\\'AC", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(shy), "\xc2\xad", "­", "<shy/>", "­", "{$\\-$}", NULL, "\\-", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(reg), "\xc2\xae", "®", "<registered/>", "®", "\\textregistered{}", "(R)", "\\'AE", { "registered", HtmlEntityMapper::Perl_symbol }},
+ { SYM(macr), "\xc2\xaf", "¯", "<macr/>", "¯", "\\={}", NULL, "\\'AF", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(deg), "\xc2\xb0", "°", "<deg/>", "°", "\\textdegree{}", NULL, "\\'B0", { "deg", HtmlEntityMapper::Perl_symbol }},
+ { SYM(plusmn), "\xc2\xb1", "±", "<plusmn/>", "±", "{$\\pm$}", NULL, "\\'B1", { "+/-", HtmlEntityMapper::Perl_string }},
+ { SYM(sup2), "\xc2\xb2", "²", "<sup2/>", "²", "\\texttwosuperior{}", NULL, "\\'B2", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(sup3), "\xc2\xb3", "³", "<sup3/>", "³", "\\textthreesuperior{}", NULL, "\\'B3", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(acute), "\xc2\xb4", "´", "<acute/>", "´", "\\'{}", NULL, "\\'B4", { " ", HtmlEntityMapper::Perl_acute }},
+ { SYM(micro), "\xc2\xb5", "µ", "<micro/>", "µ", "{$\\mu$}", NULL, "\\'B5", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(para), "\xc2\xb6", "¶", "<para/>", "¶", "{$\\P$}", NULL, "\\'B6", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(middot), "\xc2\xb7", "·", "<middot/>", "·", "\\textperiodcentered{}", NULL, "\\'B7", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(cedil), "\xc2\xb8", "¸", "<cedil/>", "¸", "\\c{}", " \\*,", "\\'B8", { " ", HtmlEntityMapper::Perl_cedilla }},
+ { SYM(sup1), "\xc2\xb9", "¹", "<sup1/>", "¹", "\\textonesuperior{}", NULL, "\\'B9", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(ordm), "\xc2\xba", "º", "<ordm/>", "º", "\\textordmasculine{}", NULL, "\\'BA", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(raquo), "\xc2\xbb", "»", "<raquo/>", "»", "\\guillemotright{}", NULL, "\\'BB", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(frac14), "\xc2\xbc", "¼", "<frac14/>", "¼", "{$\\frac14$}", "1/4", "\\'BC", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(frac12), "\xc2\xbd", "½", "<frac12/>", "½", "{$\\frac12$}", "1/2", "\\'BD", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(frac34), "\xc2\xbe", "¾", "<frac34/>", "¾", "{$\\frac34$}", "3/4", "\\'BE", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(iquest), "\xc2\xbf", "¿", "<iquest/>", "¿", "?`", NULL, "\\'BF", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(Agrave), "\xc3\x80", "À", "<Agrave/>", "À", "\\`{A}", "A\\*:", "\\'C0", { "A", HtmlEntityMapper::Perl_grave }},
+ { SYM(Aacute), "\xc3\x81", "Á", "<Aacute/>", "Á", "\\'{A}", "A\\*(`", "\\'C1", { "A", HtmlEntityMapper::Perl_acute }},
+ { SYM(Acirc), "\xc3\x82", "Â", "<Acirc/>", "Â", "\\^{A}", "A\\*^", "\\'C2", { "A", HtmlEntityMapper::Perl_circ }},
+ { SYM(Atilde), "\xc3\x83", "Ã", "<Atilde/>", "Ã", "\\~{A}", "A\\*~", "\\'C3", { "A", HtmlEntityMapper::Perl_tilde }},
+ { SYM(Auml), "\xc3\x84", "Ä", "<Aumlaut/>", "Ä", "\\\"{A}", "A\\*(4", "\\'C4", { "A", HtmlEntityMapper::Perl_umlaut }},
+ { SYM(Aring), "\xc3\x85", "Å", "<Aring/>", "Å", "\\AA", "A\\*o", "\\'C5", { "A", HtmlEntityMapper::Perl_ring }},
+ { SYM(AElig), "\xc3\x86", "Æ", "<AElig/>", "Æ", "{\\AE}", NULL, "\\'C6", { "AElig", HtmlEntityMapper::Perl_symbol }},
+ { SYM(Ccedil), "\xc3\x87", "Ç", "<Ccedil/>", "Ç", "\\c{C}", "C\\*,", "\\'C7", { "C", HtmlEntityMapper::Perl_cedilla }},
+ { SYM(Egrave), "\xc3\x88", "È", "<Egrave/>", "È", "\\`{E}", "E\\*:", "\\'C8", { "E", HtmlEntityMapper::Perl_grave }},
+ { SYM(Eacute), "\xc3\x89", "É", "<Eacute/>", "É", "\\'{E}", "E\\*(`", "\\'C9", { "E", HtmlEntityMapper::Perl_acute }},
+ { SYM(Ecirc), "\xc3\x8a", "Ê", "<Ecirc/>", "Ê", "\\^{E}", "E\\*^", "\\'CA", { "E", HtmlEntityMapper::Perl_circ }},
+ { SYM(Euml), "\xc3\x8b", "Ë", "<Eumlaut/>", "Ë", "\\\"{E}", "E\\*(4", "\\'CB", { "E", HtmlEntityMapper::Perl_umlaut }},
+ { SYM(Igrave), "\xc3\x8c", "Ì", "<Igrave/>", "Ì", "\\`{I}", "I\\*:", "\\'CC", { "I", HtmlEntityMapper::Perl_grave }},
+ { SYM(Iacute), "\xc3\x8d", "Í", "<Iacute/>", "Í", "\\'{I}", "I\\*(`", "\\'CD", { "I", HtmlEntityMapper::Perl_acute }},
+ { SYM(Icirc), "\xc3\x8e", "Î", "<Icirc/>", "Î", "\\^{I}", "I\\*^", "\\'CE", { "I", HtmlEntityMapper::Perl_circ }},
+ { SYM(Iuml), "\xc3\x8f", "Ï", "<Iumlaut/>", "Ï", "\\\"{I}", "I\\*(4", "\\'CF", { "I", HtmlEntityMapper::Perl_umlaut }},
+ { SYM(ETH), "\xc3\x90", "Ð", "<ETH/>", "Ð", "\\DH", NULL, "\\'D0", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(Ntilde), "\xc3\x91", "Ñ", "<Ntilde/>", "Ñ", "\\~{N}", "N\\*~", "\\'D1", { "N", HtmlEntityMapper::Perl_tilde }},
+ { SYM(Ograve), "\xc3\x92", "Ò", "<Ograve/>", "Ò", "\\`{O}", "O\\*:", "\\'D2", { "O", HtmlEntityMapper::Perl_grave }},
+ { SYM(Oacute), "\xc3\x93", "Ó", "<Oacute/>", "Ó", "\\'{O}", "O\\*(`", "\\'D3", { "O", HtmlEntityMapper::Perl_acute }},
+ { SYM(Ocirc), "\xc3\x94", "Ô", "<Ocirc/>", "Ô", "\\^{O}", "O\\*^", "\\'D4", { "O", HtmlEntityMapper::Perl_circ }},
+ { SYM(Otilde), "\xc3\x95", "Õ", "<Otilde/>", "Õ", "\\~{O}", "O\\*~", "\\'D5", { "O", HtmlEntityMapper::Perl_tilde }},
+ { SYM(Ouml), "\xc3\x96", "Ö", "<Oumlaut/>", "Ö", "\\\"{O}", "O\\*(4", "\\'D6", { "O", HtmlEntityMapper::Perl_umlaut }},
+ { SYM(times), "\xc3\x97", "×", "<times/>", "×", "{$\\times$}", NULL, "\\'D7", { "*", HtmlEntityMapper::Perl_char }},
+ { SYM(Oslash), "\xc3\x98", "Ø", "<Oslash/>", "Ø", "{\\O}", "O\x08/", "\\'D8", { "O", HtmlEntityMapper::Perl_slash }},
+ { SYM(Ugrave), "\xc3\x99", "Ù", "<Ugrave/>", "Ù", "\\`{U}", "U\\*:", "\\'D9", { "U", HtmlEntityMapper::Perl_grave }},
+ { SYM(Uacute), "\xc3\x9a", "Ú", "<Uacute/>", "Ú", "\\'{U}", "U\\*(`", "\\'DA", { "U", HtmlEntityMapper::Perl_acute }},
+ { SYM(Ucirc), "\xc3\x9b", "Û", "<Ucirc/>", "Û", "\\^{U}", "U\\*^", "\\'DB", { "U", HtmlEntityMapper::Perl_circ }},
+ { SYM(Uuml), "\xc3\x9c", "Ü", "<Uumlaut/>", "Ü", "\\\"{U}", "U\\*(4", "\\'DC", { "U", HtmlEntityMapper::Perl_umlaut }},
+ { SYM(Yacute), "\xc3\x9d", "Ý", "<Yacute/>", "Ý", "\\'{Y}", "Y\\*(`", "\\'DD", { "Y", HtmlEntityMapper::Perl_acute }},
+ { SYM(THORN), "\xc3\x9e", "Þ", "<THORN/>", "Þ", "\\TH", NULL, "\\'DE", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(szlig), "\xc3\x9f", "ß", "<szlig/>", "ß", "{\\ss}", "s\\*:", "\\'DF", { "szlig", HtmlEntityMapper::Perl_symbol }},
+ { SYM(agrave), "\xc3\xa0", "à", "<agrave/>", "à", "\\`{a}", "a\\*:", "\\'E0", { "a", HtmlEntityMapper::Perl_grave }},
+ { SYM(aacute), "\xc3\xa1", "á", "<aacute/>", "á", "\\'{a}", "a\\*(`", "\\'E1", { "a", HtmlEntityMapper::Perl_acute }},
+ { SYM(acirc), "\xc3\xa2", "â", "<acirc/>", "â", "\\^{a}", "a\\*^", "\\'E2", { "a", HtmlEntityMapper::Perl_circ }},
+ { SYM(atilde), "\xc3\xa3", "ã", "<atilde/>", "ã", "\\~{a}", "a\\*~", "\\'E3", { "a", HtmlEntityMapper::Perl_tilde }},
+ { SYM(auml), "\xc3\xa4", "ä", "<aumlaut/>", "ä", "\\\"{a}", "a\\*(4", "\\'E4", { "a", HtmlEntityMapper::Perl_umlaut }},
+ { SYM(aring), "\xc3\xa5", "å", "<aring/>", "å", "\\aa", "a\\*o", "\\'E5", { "a", HtmlEntityMapper::Perl_ring }},
+ { SYM(aelig), "\xc3\xa6", "æ", "<aelig/>", "æ", "{\\ae}", NULL, "\\'E6", { "aelig", HtmlEntityMapper::Perl_symbol }},
+ { SYM(ccedil), "\xc3\xa7", "ç", "<ccedil/>", "ç", "\\c{c}", "c\\*,", "\\'E7", { "c", HtmlEntityMapper::Perl_cedilla }},
+ { SYM(egrave), "\xc3\xa8", "è", "<egrave/>", "è", "\\`{e}", "e\\*:", "\\'E8", { "e", HtmlEntityMapper::Perl_grave }},
+ { SYM(eacute), "\xc3\xa9", "é", "<eacute/>", "é", "\\'{e}", "e\\*(`", "\\'E9", { "e", HtmlEntityMapper::Perl_acute }},
+ { SYM(ecirc), "\xc3\xaa", "ê", "<ecirc/>", "ê", "\\^{e}", "e\\*^", "\\'EA", { "e", HtmlEntityMapper::Perl_circ }},
+ { SYM(euml), "\xc3\xab", "ë", "<eumlaut/>", "ë", "\\\"{e}", "e\\*(4", "\\'EB", { "e", HtmlEntityMapper::Perl_umlaut }},
+ { SYM(igrave), "\xc3\xac", "ì", "<igrave/>", "ì", "\\`{\\i}", "i\\*:", "\\'EC", { "i", HtmlEntityMapper::Perl_grave }},
+ { SYM(iacute), "\xc3\xad", "í", "<iacute/>", "í", "\\'{\\i}", "i\\*(`", "\\'ED", { "i", HtmlEntityMapper::Perl_acute }},
+ { SYM(icirc), "\xc3\xae", "î", "<icirc/>", "î", "\\^{\\i}", "i\\*^", "\\'EE", { "i", HtmlEntityMapper::Perl_circ }},
+ { SYM(iuml), "\xc3\xaf", "ï", "<iumlaut/>", "ï", "\\\"{\\i}", "i\\*(4", "\\'EF", { "i", HtmlEntityMapper::Perl_umlaut }},
+ { SYM(eth), "\xc3\xb0", "ð", "<eth/>", "ð", "\\dh", NULL, "\\'F0", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(ntilde), "\xc3\xb1", "ñ", "<ntilde/>", "ñ", "\\~{n}", "n\\*~", "\\'F1", { "n", HtmlEntityMapper::Perl_tilde }},
+ { SYM(ograve), "\xc3\xb2", "ò", "<ograve/>", "ò", "\\`{o}", "o\\*:", "\\'F2", { "o", HtmlEntityMapper::Perl_grave }},
+ { SYM(oacute), "\xc3\xb3", "ó", "<oacute/>", "ó", "\\'{o}", "o\\*(`", "\\'F3", { "o", HtmlEntityMapper::Perl_acute }},
+ { SYM(ocirc), "\xc3\xb4", "ô", "<ocirc/>", "ô", "\\^{o}", "o\\*^", "\\'F4", { "o", HtmlEntityMapper::Perl_circ }},
+ { SYM(otilde), "\xc3\xb5", "õ", "<otilde/>", "õ", "\\~{o}", "o\\*~", "\\'F5", { "o", HtmlEntityMapper::Perl_tilde }},
+ { SYM(ouml), "\xc3\xb6", "ö", "<oumlaut/>", "ö", "\\\"{o}", "o\\*(4", "\\'F6", { "o", HtmlEntityMapper::Perl_umlaut }},
+ { SYM(divide), "\xc3\xb7", "÷", "<divide/>", "÷", "{$\\div$}", NULL, "\\'F7", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(oslash), "\xc3\xb8", "ø", "<oslash/>", "ø", "{\\o}", "o\x08/", "\\'F8", { "o", HtmlEntityMapper::Perl_slash }},
+ { SYM(ugrave), "\xc3\xb9", "ù", "<ugrave/>", "ù", "\\`{u}", "u\\*:", "\\'F9", { "u", HtmlEntityMapper::Perl_grave }},
+ { SYM(uacute), "\xc3\xba", "ú", "<uacute/>", "ú", "\\'{u}", "u\\*(`", "\\'FA", { "u", HtmlEntityMapper::Perl_acute }},
+ { SYM(ucirc), "\xc3\xbb", "û", "<ucirc/>", "û", "\\^{u}", "u\\*^", "\\'FB", { "u", HtmlEntityMapper::Perl_circ }},
+ { SYM(uuml), "\xc3\xbc", "ü", "<uumlaut/>", "ü", "\\\"{u}", "u\\*(4", "\\'FC", { "u", HtmlEntityMapper::Perl_umlaut }},
+ { SYM(yacute), "\xc3\xbd", "ý", "<yacute/>", "ý", "\\'{y}", "y\\*(`", "\\'FD", { "y", HtmlEntityMapper::Perl_acute }},
+ { SYM(thorn), "\xc3\xbe", "þ", "<thorn/>", "þ", "\\th", NULL, "\\'FE", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(yuml), "\xc3\xbf", "ÿ", "<yumlaut/>", "ÿ", "\\\"{y}", "y\\*(4", "\\'FF", { "y", HtmlEntityMapper::Perl_umlaut }},
+ { SYM(fnof), "\xc6\x92", "ƒ", "<fnof/>", "ƒ", "\\textflorin", NULL, "\\'83", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(Alpha), "\xce\x91", "Α", "<Alpha/>", "Α", "A", NULL, "\\u0913?", { "A", HtmlEntityMapper::Perl_char }},
+ { SYM(Beta), "\xce\x92", "Β", "<Beta/>", "Β", "B", NULL, "\\u0914?", { "B", HtmlEntityMapper::Perl_char }},
+ { SYM(Gamma), "\xce\x93", "Γ", "<Gamma/>", "Γ", "{$\\Gamma$}", NULL, "\\u0915?", { "Gamma", HtmlEntityMapper::Perl_symbol }},
+ { SYM(Delta), "\xce\x94", "Δ", "<Delta/>", "Δ", "{$\\Delta$}", NULL, "\\u0916?", { "Delta", HtmlEntityMapper::Perl_symbol }},
+ { SYM(Epsilon), "\xce\x95", "Ε", "<Epsilon/>", "Ε", "E", NULL, "\\u0917?", { "E", HtmlEntityMapper::Perl_char }},
+ { SYM(Zeta), "\xce\x96", "Ζ", "<Zeta/>", "Ζ", "Z", NULL, "\\u0918?", { "Z", HtmlEntityMapper::Perl_char }},
+ { SYM(Eta), "\xce\x97", "Η", "<Eta/>", "Η", "H", NULL, "\\u0919?", { "H", HtmlEntityMapper::Perl_char }},
+ { SYM(Theta), "\xce\x98", "Θ", "<Theta/>", "Θ", "{$\\Theta$}", NULL, "\\u0920?", { "Theta", HtmlEntityMapper::Perl_symbol }},
+ { SYM(Iota), "\xce\x99", "Ι", "<Iota/>", "Ι", "I", NULL, "\\u0921?", { "I", HtmlEntityMapper::Perl_char }},
+ { SYM(Kappa), "\xce\x9a", "Κ", "<Kappa/>", "Κ", "K", NULL, "\\u0922?", { "K", HtmlEntityMapper::Perl_char }},
+ { SYM(Lambda), "\xce\x9b", "Λ", "<Lambda/>", "Λ", "{$\\Lambda$}", NULL, "\\u0923?", { "Lambda", HtmlEntityMapper::Perl_symbol }},
+ { SYM(Mu), "\xce\x9c", "Μ", "<Mu/>", "Μ", "M", NULL, "\\u0924?", { "M", HtmlEntityMapper::Perl_char }},
+ { SYM(Nu), "\xce\x9d", "Ν", "<Nu/>", "Ν", "N", NULL, "\\u0925?", { "N", HtmlEntityMapper::Perl_char }},
+ { SYM(Xi), "\xce\x9e", "Ξ", "<Xi/>", "Ξ", "{$\\Xi$}", NULL, "\\u0926?", { "Xi", HtmlEntityMapper::Perl_symbol }},
+ { SYM(Omicron), "\xce\x9f", "Ο", "<Omicron/>", "Ο", "O", NULL, "\\u0927?", { "O", HtmlEntityMapper::Perl_char }},
+ { SYM(Pi), "\xce\xa0", "Π", "<Pi/>", "Π", "{$\\Pi$}", NULL, "\\u0928?", { "Pi", HtmlEntityMapper::Perl_symbol }},
+ { SYM(Rho), "\xce\xa1", "Ρ", "<Rho/>", "Ρ", "P", NULL, "\\u0929?", { "P", HtmlEntityMapper::Perl_char }},
+ { SYM(Sigma), "\xce\xa3", "Σ", "<Sigma/>", "Σ", "{$\\Sigma$}", NULL, "\\u0931?", { "Sigma", HtmlEntityMapper::Perl_symbol }},
+ { SYM(Tau), "\xce\xa4", "Τ", "<Tau/>", "Τ", "T", NULL, "\\u0932?", { "T", HtmlEntityMapper::Perl_char }},
+ { SYM(Upsilon), "\xce\xa5", "Υ", "<Upsilon/>", "Υ", "{$\\Upsilon$}", NULL, "\\u0933?", { "Upsilon", HtmlEntityMapper::Perl_symbol }},
+ { SYM(Phi), "\xce\xa6", "Φ", "<Phi/>", "Φ", "{$\\Phi$}", NULL, "\\u0934?", { "Phi", HtmlEntityMapper::Perl_symbol }},
+ { SYM(Chi), "\xce\xa7", "Χ", "<Chi/>", "Χ", "X", NULL, "\\u0935?", { "X", HtmlEntityMapper::Perl_char }},
+ { SYM(Psi), "\xce\xa8", "Ψ", "<Psi/>", "Ψ", "{$\\Psi$}", NULL, "\\u0936?", { "Psi", HtmlEntityMapper::Perl_symbol }},
+ { SYM(Omega), "\xce\xa9", "Ω", "<Omega/>", "Ω", "{$\\Omega$}", NULL, "\\u0937?", { "Omega", HtmlEntityMapper::Perl_symbol }},
+ { SYM(alpha), "\xce\xb1", "α", "<alpha/>", "α", "{$\\alpha$}", NULL, "\\u0945?", { "alpha", HtmlEntityMapper::Perl_symbol }},
+ { SYM(beta), "\xce\xb2", "β", "<beta/>", "β", "{$\\beta$}", NULL, "\\u0946?", { "beta", HtmlEntityMapper::Perl_symbol }},
+ { SYM(gamma), "\xce\xb3", "γ", "<gamma/>", "γ", "{$\\gamma$}", NULL, "\\u0947?", { "gamma", HtmlEntityMapper::Perl_symbol }},
+ { SYM(delta), "\xce\xb4", "δ", "<delta/>", "δ", "{$\\delta$}", NULL, "\\u0948?", { "delta", HtmlEntityMapper::Perl_symbol }},
+ { SYM(epsilon), "\xce\xb5", "ε", "<epsilon/>", "ε", "{$\\varepsilon$}", NULL, "\\u0949?", { "epsilon", HtmlEntityMapper::Perl_symbol }},
+ { SYM(zeta), "\xce\xb6", "ζ", "<zeta/>", "ζ", "{$\\zeta$}", NULL, "\\u0950?", { "zeta", HtmlEntityMapper::Perl_symbol }},
+ { SYM(eta), "\xce\xb7", "η", "<eta/>", "η", "{$\\eta$}", NULL, "\\u0951?", { "eta", HtmlEntityMapper::Perl_symbol }},
+ { SYM(theta), "\xce\xb8", "θ", "<theta/>", "θ", "{$\\theta$}", NULL, "\\u0952?", { "theta", HtmlEntityMapper::Perl_symbol }},
+ { SYM(iota), "\xce\xb9", "ι", "<iota/>", "ι", "{$\\iota$}", NULL, "\\u0953?", { "iota", HtmlEntityMapper::Perl_symbol }},
+ { SYM(kappa), "\xce\xba", "κ", "<kappa/>", "κ", "{$\\kappa$}", NULL, "\\u0954?", { "kappa", HtmlEntityMapper::Perl_symbol }},
+ { SYM(lambda), "\xce\xbb", "λ", "<lambda/>", "λ", "{$\\lambda$}", NULL, "\\u0955?", { "lambda", HtmlEntityMapper::Perl_symbol }},
+ { SYM(mu), "\xce\xbc", "μ", "<mu/>", "μ", "{$\\mu$}", NULL, "\\u0956?", { "mu", HtmlEntityMapper::Perl_symbol }},
+ { SYM(nu), "\xce\xbd", "ν", "<nu/>", "ν", "{$\\nu$}", NULL, "\\u0957?", { "nu", HtmlEntityMapper::Perl_symbol }},
+ { SYM(xi), "\xce\xbe", "ξ", "<xi/>", "ξ", "{$\\xi$}", NULL, "\\u0958?", { "xi", HtmlEntityMapper::Perl_symbol }},
+ { SYM(omicron), "\xce\xbf", "ο", "<omicron/>", "ο", "{$\\omicron$}", NULL, "\\u0959?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(pi), "\xcf\x80", "π", "<pi/>", "π", "{$\\pi$}", NULL, "\\u0960?", { "pi", HtmlEntityMapper::Perl_symbol }},
+ { SYM(rho), "\xcf\x81", "ρ", "<rho/>", "ρ", "{$\\rho$}", NULL, "\\u0961?", { "rho", HtmlEntityMapper::Perl_symbol }},
+ { SYM(sigmaf), "\xcf\x82", "ς", "<sigmaf/>", "ς", "{$\\varsigma$}", NULL, "\\u0962?", { "sigma", HtmlEntityMapper::Perl_symbol }},
+ { SYM(sigma), "\xcf\x83", "σ", "<sigma/>", "σ", "{$\\sigma$}", NULL, "\\u0963?", { "sigma", HtmlEntityMapper::Perl_symbol }},
+ { SYM(tau), "\xcf\x84", "τ", "<tau/>", "τ", "{$\\tau$}", NULL, "\\u0964?", { "tau", HtmlEntityMapper::Perl_symbol }},
+ { SYM(upsilon), "\xcf\x85", "υ", "<upsilon/>", "υ", "{$\\upsilon$}", NULL, "\\u0965?", { "upsilon", HtmlEntityMapper::Perl_symbol }},
+ { SYM(phi), "\xcf\x86", "φ", "<phi/>", "φ", "{$\\varphi$}", NULL, "\\u0966?", { "phi", HtmlEntityMapper::Perl_symbol }},
+ { SYM(chi), "\xcf\x87", "χ", "<chi/>", "χ", "{$\\chi$}", NULL, "\\u0967?", { "chi", HtmlEntityMapper::Perl_symbol }},
+ { SYM(psi), "\xcf\x88", "ψ", "<psi/>", "ψ", "{$\\psi$}", NULL, "\\u0968?", { "psi", HtmlEntityMapper::Perl_symbol }},
+ { SYM(omega), "\xcf\x89", "ω", "<omega/>", "ω", "{$\\omega$}", NULL, "\\u0969?", { "omega", HtmlEntityMapper::Perl_symbol }},
+ { SYM(thetasym), "\xcf\x91", "ϑ", "<thetasym/>", "ϑ", "{$\\vartheta$}", NULL, "\\u977?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(upsih), "\xcf\x92", "ϒ", "<upsih/>", "ϒ", "{$\\Upsilon$}", NULL, "\\u978?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(piv), "\xcf\x96", "ϖ", "<piv/>", "ϖ", "{$\\varpi$}", NULL, "\\u982?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(bull), "\xe2\x80\xa2", "•", "<bull/>", "•", "\\textbullet{}", NULL, "\\'95", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(hellip), "\xe2\x80\xa6", "…", "<hellip/>", "…", "{$\\dots$}", NULL, "\\'85", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(prime), "\xe2\x80\xb2", "′", "<prime/>", "′", "'", NULL, "\\u8242?", { "\\\'", HtmlEntityMapper::Perl_string }},
+ { SYM(Prime), "\xe2\x80\xb3", "″", "<Prime/>", "″", "''", NULL, "\\u8243?", { "\"", HtmlEntityMapper::Perl_char }},
+ { SYM(oline), "\xe2\x80\xbe", "‾", "<oline/>", "‾", "{$\\overline{\\,}$}", NULL, "\\u8254?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(frasl), "\xe2\x81\x84", "⁄", "<frasl/>", "⁄", "/", NULL, "\\u8260?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(weierp), "\xe2\x84\x98", "℘", "<weierp/>", "℘", "{$\\wp$}", NULL, "\\u8472?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(image), "\xe2\x84\x91", "ℑ", "<imaginary/>", "ℑ", "{$\\Im$}", NULL, "\\u8465?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(real), "\xe2\x84\x9c", "ℜ", "<real/>", "ℜ", "{$\\Re$}", NULL, "\\u8476?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(trade), "\xe2\x84\xa2", "™", "<trademark/>", "™", "\\texttrademark{}", "(TM)", "\\'99", { "trademark", HtmlEntityMapper::Perl_symbol }},
+ { SYM(alefsym), "\xe2\x85\xb5", "ℵ", "<alefsym/>", "ℵ", "{$\\aleph$}", NULL, "\\u8501?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(larr), "\xe2\x86\x90", "←", "<larr/>", "←", "{$\\leftarrow$}", NULL, "\\u8592?", { "<-", HtmlEntityMapper::Perl_string }},
+ { SYM(uarr), "\xe2\x86\x91", "↑", "<uarr/>", "↑", "{$\\uparrow$}", NULL, "\\u8593?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(rarr), "\xe2\x86\x92", "→", "<rarr/>", "→", "{$\\rightarrow$}", NULL, "\\u8594?", { "->", HtmlEntityMapper::Perl_string }},
+ { SYM(darr), "\xe2\x86\x93", "↓", "<darr/>", "↓", "{$\\downarrow$}", NULL, "\\u8595?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(harr), "\xe2\x86\x94", "↔", "<harr/>", "↔", "{$\\leftrightarrow$}", NULL, "\\u8596?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(crarr), "\xe2\x86\xb5", "↵", "<crarr/>", "↵", "{$\\hookleftarrow$}", NULL, "\\u8629?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(lArr), "\xe2\x87\x90", "⇐", "<lArr/>", "⇐", "{$\\Leftarrow$}", NULL, "\\u8656?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(uArr), "\xe2\x87\x91", "⇑", "<uArr/>", "⇑", "{$\\Uparrow$}", NULL, "\\u8657?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(rArr), "\xe2\x87\x92", "⇒", "<rArr/>", "⇒", "{$\\Rightarrow$}", NULL, "\\u8658?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(dArr), "\xe2\x87\x93", "⇓", "<dArr/>", "⇓", "{$\\Downarrow$}", NULL, "\\u8659?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(hArr), "\xe2\x87\x94", "⇔", "<hArr/>", "⇔", "{$\\Leftrightarrow$}", NULL, "\\u8660?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(forall), "\xe2\x88\x80", "∀", "<forall/>", "∀", "{$\\forall$}", NULL, "\\u8704?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(part), "\xe2\x88\x82", "∂", "<part/>", "∂", "{$\\partial$}", NULL, "\\u8706?", { "partial", HtmlEntityMapper::Perl_symbol }},
+ { SYM(exist), "\xe2\x88\x83", "∃", "<exist/>", "∃", "{$\\exists$}", NULL, "\\u8707?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(empty), "\xe2\x88\x85", "∅", "<empty/>", "∅", "{$\\emptyset$}", NULL, "\\u8709?", { "empty", HtmlEntityMapper::Perl_symbol }},
+ { SYM(nabla), "\xe2\x88\x87", "∇", "<nabla/>", "∇", "{$\\nabla$}", NULL, "\\u8711?", { "nabla", HtmlEntityMapper::Perl_symbol }},
+ { SYM(isin), "\xe2\x88\x88", "∈", "<isin/>", "∈", "{$\\in$}", NULL, "\\u8712?", { "in", HtmlEntityMapper::Perl_symbol }},
+ { SYM(notin), "\xe2\x88\x89", "∉", "<notin/>", "∉", "{$\\notin$}", NULL, "\\u8713?", { "notin", HtmlEntityMapper::Perl_symbol }},
+ { SYM(ni), "\xe2\x88\x8b", "∋", "<ni/>", "∋", "{$\\ni$}", NULL, "\\u8715?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(prod), "\xe2\x88\x8f", "∏", "<prod/>", "∏", "{$\\prod$}", NULL, "\\u8719?", { "prod", HtmlEntityMapper::Perl_symbol }},
+ { SYM(sum), "\xe2\x88\x91", "∑", "<sum/>", "∑", "{$\\sum$}", NULL, "\\u8721?", { "sum", HtmlEntityMapper::Perl_symbol }},
+ { SYM(minus), "\xe2\x88\x92", "−", "<minus/>", "−", "-", NULL, "\\u8722?", { "-", HtmlEntityMapper::Perl_char }},
+ { SYM(lowast), "\xe2\x88\x97", "∗", "<lowast/>", "∗", "{$\\ast$}", NULL, "\\u8727?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(radic), "\xe2\x88\x9a", "√", "<radic/>", "√", "{$\\surd$}", NULL, "\\u8730?", { "sqrt", HtmlEntityMapper::Perl_symbol }},
+ { SYM(prop), "\xe2\x88\x9d", "∝", "<prop/>", "∝", "{$\\propto$}", NULL, "\\u8733?", { "propto", HtmlEntityMapper::Perl_symbol }},
+ { SYM(infin), "\xe2\x88\x9e", "∞", "<infin/>", "∞", "{$\\infty$}", NULL, "\\u8734?", { "inf", HtmlEntityMapper::Perl_symbol }},
+ { SYM(ang), "\xe2\x88\xa0", "∠", "<ang/>", "∠", "{$\\angle$}", NULL, "\\u8736?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(and), "\xe2\x88\xa7", "∧", "<and/>", "∧", "{$\\wedge$}", NULL, "\\u8743?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(or), "\xe2\x88\xa8", "∨", "<or/>", "∨", "{$\\vee$}", NULL, "\\u8744?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(cap), "\xe2\x88\xa9", "∩", "<cap/>", "∩", "{$\\cap$}", NULL, "\\u8745?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(cup), "\xe2\x88\xaa", "∪", "<cup/>", "∪", "{$\\cup$}", NULL, "\\u8746?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(int), "\xe2\x88\xab", "∫", "<int/>", "∫", "{$\\int$}", NULL, "\\u8747?", { "int", HtmlEntityMapper::Perl_symbol }},
+ { SYM(there4), "\xe2\x88\xb4", "∴", "<there4/>", "∴", "{$\\therefore$}", NULL, "\\u8756?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(sim), "\xe2\x88\xbc", "∼", "<sim/>", "∼", "{$\\sim$}", NULL, "\\u8764?", { "~", HtmlEntityMapper::Perl_char }},
+ { SYM(cong), "\xe2\x89\x85", "≅", "<cong/>", "≅", "{$\\cong$}", NULL, "\\u8773?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(asymp), "\xe2\x89\x88", "≈", "<asymp/>", "≈", "{$\\approx$}", NULL, "\\u8776?", { "approx", HtmlEntityMapper::Perl_symbol }},
+ { SYM(ne), "\xe2\x89\xa0", "≠", "<ne/>", "≠", "{$\\ne$}", NULL, "\\u8800?", { "!=", HtmlEntityMapper::Perl_string }},
+ { SYM(equiv), "\xe2\x89\xa1", "≡", "<equiv/>", "≡", "{$\\equiv$}", NULL, "\\u8801?", { "equiv", HtmlEntityMapper::Perl_symbol }},
+ { SYM(le), "\xe2\x89\xa4", "≤", "<le/>", "≤", "{$\\le$}", NULL, "\\u8804?", { "<=", HtmlEntityMapper::Perl_string }},
+ { SYM(ge), "\xe2\x89\xa5", "≥", "<ge/>", "≥", "{$\\ge$}", NULL, "\\u8805?", { ">=", HtmlEntityMapper::Perl_string }},
+ { SYM(sub), "\xe2\x8a\x82", "⊂", "<sub/>", "⊂", "{$\\subset$}", NULL, "\\u8834?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(sup), "\xe2\x8a\x83", "⊃", "<sup/>", "⊃", "{$\\supset$}", NULL, "\\u8835?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(nsub), "\xe2\x8a\x84", "⊄", "<nsub/>", "⊄", "{$\\not\\subset$}", NULL, "\\u8836?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(sube), "\xe2\x8a\x86", "⊆", "<sube/>", "⊆", "{$\\subseteq$}", NULL, "\\u8838?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(supe), "\xe2\x8a\x87", "⊇", "<supe/>", "⊇", "{$\\supseteq$}", NULL, "\\u8839?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(oplus), "\xe2\x8a\x95", "⊕", "<oplus/>", "⊕", "{$\\oplus$}", NULL, "\\u8853?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(otimes), "\xe2\x8a\x97", "⊗", "<otimes/>", "⊗", "{$\\otimes$}", NULL, "\\u8855?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(perp), "\xe2\x8a\xa5", "⊥", "<perp/>", "⊥", "{$\\perp$}", NULL, "\\u8869?", { "perp", HtmlEntityMapper::Perl_symbol }},
+ { SYM(sdot), "\xe2\x8b\x85", "⋅", "<sdot/>", "⋅", "{$\\cdot$}", NULL, "\\u8901?", { ".", HtmlEntityMapper::Perl_char }},
+ { SYM(lceil), "\xe2\x8c\x88", "⌈", "<lceil/>", "⌈", "{$\\lceil$}", NULL, "\\u8968?", { "lceil", HtmlEntityMapper::Perl_symbol }},
+ { SYM(rceil), "\xe2\x8c\x89", "⌉", "<rceil/>", "⌉", "{$\\rceil$}", NULL, "\\u8969?", { "rceil", HtmlEntityMapper::Perl_symbol }},
+ { SYM(lfloor), "\xe2\x8c\x8a", "⌊", "<lfloor/>", "⌊", "{$\\lfloor$}", NULL, "\\u8970?", { "lfloor", HtmlEntityMapper::Perl_symbol }},
+ { SYM(rfloor), "\xe2\x8c\x8b", "⌋", "<rfloor/>", "⌋", "{$\\rfloor$}", NULL, "\\u8971?", { "rfloor", HtmlEntityMapper::Perl_symbol }},
+ { SYM(lang), "\xe2\x8c\xa9", "⟨", "<lang/>", "〈", "{$\\langle$}", NULL, "\\u9001?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(rang), "\xe2\x8c\xaa", "⟩", "<rang/>", "〉", "{$\\rangle$}", NULL, "\\u9002?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(loz), "\xe2\x97\x8a", "◊", "<loz/>", "◊", "{$\\lozenge$}", NULL, "\\u9674?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(spades), "\xe2\x99\xa0", "♠", "<spades/>", "♠", "{$\\spadesuit$}", NULL, "\\u9824?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(clubs), "\xe2\x99\xa3", "♣", "<clubs/>", "♣", "{$\\clubsuit$}", NULL, "\\u9827?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(hearts), "\xe2\x99\xa5", "♥", "<hearts/>", "♥", "{$\\heartsuit$}", NULL, "\\u9829?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(diams), "\xe2\x99\xa6", "♦", "<diams/>", "♦", "{$\\diamondsuit$}", NULL, "\\u9830?", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(quot), "\"", """, "\"", """, "\"{}", "\"", "\"", { "\"", HtmlEntityMapper::Perl_char }},
+ { SYM(amp), "&", "&", "&", "&", "\\&", "&", "&", { "&", HtmlEntityMapper::Perl_char }},
+ { SYM(lt), "<", "<", "<", "<", "<", "<", "<", { "<", HtmlEntityMapper::Perl_char }},
+ { SYM(gt), ">", ">", ">", ">", ">", ">", ">", { ">", HtmlEntityMapper::Perl_char }},
+ { SYM(OElig), "\xc5\x92", "Œ", "<OElig/>", "Œ", "\\OE", NULL, "\\'8C", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(oelig), "\xc5\x93", "œ", "<oelig/>", "œ", "\\oe", NULL, "\\'9C", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(Scaron), "\xc5\xa0", "Š", "<Scaron/>", "Š", "\\v{S}", NULL, "\\'8A", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(scaron), "\xc5\xa1", "š", "<scaron/>", "š", "\\v{s}", NULL, "\\'9A", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(Yuml), "\xc5\xb8", "Ÿ", "<Yumlaut/>", "Ÿ", "\\\"{Y}", "Y\\*(4", "\\'9F", { "Y", HtmlEntityMapper::Perl_umlaut }},
+ { SYM(circ), "\xcb\x86", "ˆ", "<circ/>", "ˆ", "{$\\circ$}", NULL, "\\'88", { " ", HtmlEntityMapper::Perl_circ }},
+ { SYM(tilde), "\xcb\x9c", "˜", "<tilde/>", "˜", "\\~{}", "~", "\\'98", { " ", HtmlEntityMapper::Perl_tilde }},
+ { SYM(ensp), "\xe2\x80\x82", " ", "<ensp/>", " ", "\\enskip{}", NULL, "{\\enspace}", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(emsp), "\xe2\x80\x83", " ", "<emsp/>", " ", "\\quad{}", NULL, "{\\emspace}", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(thinsp), "\xe2\x80\x89", " ", "<thinsp/>", " ", "\\,", NULL, "{\\qmspace}", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(zwnj), "\xe2\x80\x8c", "‌", "<zwnj/>", "‌", "{}", NULL, "\\zwnj", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(zwj), "\xe2\x80\x8d", "‍", "<zwj/>", "‍", "", NULL, "\\zwj", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(lrm), "\xe2\x80\x8e", "‎", "<lrm/>", "‎", "", NULL, "\\ltrmark", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(rlm), "\xe2\x80\x8f", "‏", "<rlm/>", "‏", "", NULL, "\\rtlmark", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(ndash), "\xe2\x80\x93", "–", "<ndash/>", "–", "--", "--", "\\'96", { "-", HtmlEntityMapper::Perl_char }},
+ { SYM(mdash), "\xe2\x80\x94", "—", "<mdash/>", "—", "---", "---", "\\'97", { "--", HtmlEntityMapper::Perl_string }},
+ { SYM(lsquo), "\xe2\x80\x98", "‘", "<lsquo/>", "‘", "`", "`", "\\'91", { "\\\'", HtmlEntityMapper::Perl_string }},
+ { SYM(rsquo), "\xe2\x80\x99", "’", "<rsquo/>", "’", "'", "'", "\\'92", { "\\\'", HtmlEntityMapper::Perl_string }},
+ { SYM(sbquo), "\xe2\x80\x9a", "‚", "<sbquo/>", "‚", "\\quotesinglbase{}", NULL, "\\'82", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(ldquo), "\xe2\x80\x9c", "“", "<ldquo/>", "“", "``", "``", "\\'93", { "\"", HtmlEntityMapper::Perl_char }},
+ { SYM(rdquo), "\xe2\x80\x9d", "”", "<rdquo/>", "”", "''", "''", "\\'94", { "\"", HtmlEntityMapper::Perl_char }},
+ { SYM(bdquo), "\xe2\x80\x9e", "„", "<bdquo/>", "„", "\\quotedblbase{}", NULL, "\\'84", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(dagger), "\xe2\x80\xa0", "†", "<dagger/>", "†", "{$\\dagger$}", NULL, "\\'86", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(Dagger), "\xe2\x80\xa1", "‡", "<Dagger/>", "‡", "{$\\ddagger$}", NULL, "\\'87", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(permil), "\xe2\x80\xb0", "‰", "<permil/>", "‰", "{$\\permil{}$}", NULL, "\\'89", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(lsaquo), "\xe2\x80\xb9", "‹", "<lsaquo/>", "‹", "\\guilsinglleft{}", NULL, "\\'8B", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(rsaquo), "\xe2\x80\xba", "›", "<rsaquo/>", "›", "\\guilsinglright{}", NULL, "\\'9B", { NULL, HtmlEntityMapper::Perl_unknown }},
+ { SYM(euro), "\xe2\x82\xac", "€", "<euro/>", "€", "\\texteuro{}", NULL, "\\'80", { NULL, HtmlEntityMapper::Perl_unknown }},
// doxygen extension to the HTML4 table of HTML entities
- { SYM(tm), "\xe2\x84\xa2", "™", "<tm/>", "™", "\\texttrademark{}", "(TM)", "\\'99", { "trademark", DocSymbol::Perl_symbol }},
- { SYM(apos), "'", "'", "'", "'", "\\textquotesingle{}", "'", "'", { "\\\'", DocSymbol::Perl_string }},
+ { SYM(tm), "\xe2\x84\xa2", "™", "<tm/>", "™", "\\texttrademark{}", "(TM)", "\\'99", { "trademark", HtmlEntityMapper::Perl_symbol }},
+ { SYM(apos), "'", "'", "'", "'", "\\textquotesingle{}", "'", "'", { "\\\'", HtmlEntityMapper::Perl_string }},
// doxygen commands represented as HTML entities
- { SYM(BSlash), "\\", "\\", "\\", "\\", "\\textbackslash{}", "\\\\", "\\\\", { "\\\\", DocSymbol::Perl_string }},
- { SYM(At), "@", "@", "@", "@", "@", "@", "@", { "@", DocSymbol::Perl_char }},
- { SYM(Less), "<", "<", "<", "<", "<", "<", "<", { "<", DocSymbol::Perl_char }},
- { SYM(Greater), ">", ">", ">", ">", ">", ">", ">", { ">", DocSymbol::Perl_char }},
- { SYM(Amp), "&", "&", "&", "&", "\\&", "&", "&", { "&", DocSymbol::Perl_char }},
- { SYM(Dollar), "$", "$", "$", "$", "\\$", "$", "$", { "$", DocSymbol::Perl_char }},
- { SYM(Hash), "#;", "#", "#", "#", "\\#", "#", "#", { "#", DocSymbol::Perl_char }},
- { SYM(DoubleColon), "::", "::", "::", "::", "::", "::", "::", { "::", DocSymbol::Perl_string }},
- { SYM(Percent), "%", "%", "%", "%", "\\%", "%", "%", { "%", DocSymbol::Perl_char }},
- { SYM(Pipe), "|", "|", "|", "|", "$|$", "|", "|", { "|", DocSymbol::Perl_char }},
- { SYM(Quot), "\"", "\"", "\"", """, "\"{}", "\"", "\"", { "\"", DocSymbol::Perl_char }},
- { SYM(Minus), "-", "-", "-", "-", "-\\/", "-", "-", { "-", DocSymbol::Perl_char }},
- { SYM(Plus), "+", "+", "+", "+", "+", "+", "+", { "+", DocSymbol::Perl_char }},
- { SYM(Dot), ".", ".", ".", ".", ".", ".", ".", { ".", DocSymbol::Perl_char }},
- { SYM(Colon), ":", ":", ":", ":", ":", ":", ":", { ":", DocSymbol::Perl_char }},
- { SYM(Equal), "=", "=", "=", "=", "=", "=", "=", { "=", DocSymbol::Perl_char }}
+ { SYM(BSlash), "\\", "\\", "\\", "\\", "\\textbackslash{}", "\\\\", "\\\\", { "\\\\", HtmlEntityMapper::Perl_string }},
+ { SYM(At), "@", "@", "@", "@", "@", "@", "@", { "@", HtmlEntityMapper::Perl_char }},
+ { SYM(Less), "<", "<", "<", "<", "<", "<", "<", { "<", HtmlEntityMapper::Perl_char }},
+ { SYM(Greater), ">", ">", ">", ">", ">", ">", ">", { ">", HtmlEntityMapper::Perl_char }},
+ { SYM(Amp), "&", "&", "&", "&", "\\&", "&", "&", { "&", HtmlEntityMapper::Perl_char }},
+ { SYM(Dollar), "$", "$", "$", "$", "\\$", "$", "$", { "$", HtmlEntityMapper::Perl_char }},
+ { SYM(Hash), "#;", "#", "#", "#", "\\#", "#", "#", { "#", HtmlEntityMapper::Perl_char }},
+ { SYM(DoubleColon), "::", "::", "::", "::", "::", "::", "::", { "::", HtmlEntityMapper::Perl_string }},
+ { SYM(Percent), "%", "%", "%", "%", "\\%", "%", "%", { "%", HtmlEntityMapper::Perl_char }},
+ { SYM(Pipe), "|", "|", "|", "|", "$|$", "|", "|", { "|", HtmlEntityMapper::Perl_char }},
+ { SYM(Quot), "\"", "\"", "\"", """, "\"{}", "\"", "\"", { "\"", HtmlEntityMapper::Perl_char }},
+ { SYM(Minus), "-", "-", "-", "-", "-\\/", "-", "-", { "-", HtmlEntityMapper::Perl_char }},
+ { SYM(Plus), "+", "+", "+", "+", "+", "+", "+", { "+", HtmlEntityMapper::Perl_char }},
+ { SYM(Dot), ".", ".", ".", ".", ".", ".", ".", { ".", HtmlEntityMapper::Perl_char }},
+ { SYM(Colon), ":", ":", ":", ":", ":", ":", ":", { ":", HtmlEntityMapper::Perl_char }},
+ { SYM(Equal), "=", "=", "=", "=", "=", "=", "=", { "=", HtmlEntityMapper::Perl_char }}
};
-static const int g_numHtmlEntities = (int)(sizeof(g_htmlEntities)/ sizeof(*g_htmlEntities));
+static const int g_numHtmlEntities = static_cast<int>(sizeof(g_htmlEntities)/ sizeof(*g_htmlEntities));
HtmlEntityMapper *HtmlEntityMapper::s_instance = 0;
* @return the UTF8 code of the HTML entity,
* in case the UTF code is unknown \c NULL is returned.
*/
-const char *HtmlEntityMapper::utf8(DocSymbol::SymType symb,bool useInPrintf) const
+const char *HtmlEntityMapper::utf8(HtmlEntityMapper::SymType symb,bool useInPrintf) const
{
- if (useInPrintf && symb==DocSymbol::Sym_Percent)
+ if (useInPrintf && symb==HtmlEntityMapper::Sym_Percent)
{
return "%%"; // escape for printf
}
* @return the html representation of the HTML entity,
* in case the html code is unknown \c NULL is returned.
*/
-const char *HtmlEntityMapper::html(DocSymbol::SymType symb,bool useInPrintf) const
+const char *HtmlEntityMapper::html(HtmlEntityMapper::SymType symb,bool useInPrintf) const
{
- if (useInPrintf && symb==DocSymbol::Sym_Percent)
+ if (useInPrintf && symb==HtmlEntityMapper::Sym_Percent)
{
return "%%"; // escape for printf
}
* @return the XML code of the HTML entity,
* in case the XML code is unknown \c NULL is returned.
*/
-const char *HtmlEntityMapper::xml(DocSymbol::SymType symb) const
+const char *HtmlEntityMapper::xml(HtmlEntityMapper::SymType symb) const
{
return g_htmlEntities[symb].xml;
}
* @return the docbook code of the HTML entity,
* in case the docbook code is unknown \c NULL is returned.
*/
-const char *HtmlEntityMapper::docbook(DocSymbol::SymType symb) const
+const char *HtmlEntityMapper::docbook(HtmlEntityMapper::SymType symb) const
{
return g_htmlEntities[symb].docbook;
}
* @return the LaTeX code of the HTML entity,
* in case the LaTeX code is unknown \c NULL is returned.
*/
-const char *HtmlEntityMapper::latex(DocSymbol::SymType symb) const
+const char *HtmlEntityMapper::latex(HtmlEntityMapper::SymType symb) const
{
return g_htmlEntities[symb].latex;
}
* @return the man of the HTML entity,
* in case the man code is unknown \c NULL is returned.
*/
-const char *HtmlEntityMapper::man(DocSymbol::SymType symb) const
+const char *HtmlEntityMapper::man(HtmlEntityMapper::SymType symb) const
{
return g_htmlEntities[symb].man;
}
* @return the RTF of the HTML entity,
* in case the RTF code is unknown \c NULL is returned.
*/
-const char *HtmlEntityMapper::rtf(DocSymbol::SymType symb) const
+const char *HtmlEntityMapper::rtf(HtmlEntityMapper::SymType symb) const
{
return g_htmlEntities[symb].rtf;
}
* @param symb Code of the requested HTML entity
* @return the pointer to perl struct with the perl code of the HTML entity,
* in case the perl code does not exists the NULL pointer is entered in the
- * \c symb field and in the `DocSymbol::Perl_unknown` in the \c type field.
+ * \c symb field and in the `HtmlEntityMapper::Perl_unknown` in the \c type field.
*/
-const DocSymbol::PerlSymb *HtmlEntityMapper::perl(DocSymbol::SymType symb) const
+const HtmlEntityMapper::PerlSymb *HtmlEntityMapper::perl(HtmlEntityMapper::SymType symb) const
{
return &g_htmlEntities[symb].perl;
}
* @brief Give code of the requested HTML entity name
* @param symName HTML entity name without \c & and \c ;
* @return the code for the requested HTML entity name,
- * in case the requested HTML item does not exist `DocSymbol::Sym_unknown` is returned.
+ * in case the requested HTML item does not exist `HtmlEntityMapper::Sym_unknown` is returned.
*/
-DocSymbol::SymType HtmlEntityMapper::name2sym(const QCString &symName) const
+HtmlEntityMapper::SymType HtmlEntityMapper::name2sym(const QCString &symName) const
{
auto it = m_name2sym.find(symName.str());
- return it!=m_name2sym.end() ? it->second : DocSymbol::Sym_Unknown;
+ return it!=m_name2sym.end() ? it->second : HtmlEntityMapper::Sym_Unknown;
}
void HtmlEntityMapper::writeXMLSchema(TextStream &t)
#include <unordered_map>
#include <string>
-#include "docparser.h"
+#include "qcstring.h"
class TextStream;
class HtmlEntityMapper
{
public:
+ enum SymType { Sym_Unknown = -1,
+ Sym_nbsp, Sym_iexcl, Sym_cent, Sym_pound, Sym_curren,
+ Sym_yen, Sym_brvbar, Sym_sect, Sym_uml, Sym_copy,
+ Sym_ordf, Sym_laquo, Sym_not, Sym_shy, Sym_reg,
+ Sym_macr, Sym_deg, Sym_plusmn, Sym_sup2, Sym_sup3,
+ Sym_acute, Sym_micro, Sym_para, Sym_middot, Sym_cedil,
+ Sym_sup1, Sym_ordm, Sym_raquo, Sym_frac14, Sym_frac12,
+ Sym_frac34, Sym_iquest, Sym_Agrave, Sym_Aacute, Sym_Acirc,
+ Sym_Atilde, Sym_Auml, Sym_Aring, Sym_AElig, Sym_Ccedil,
+ Sym_Egrave, Sym_Eacute, Sym_Ecirc, Sym_Euml, Sym_Igrave,
+ Sym_Iacute, Sym_Icirc, Sym_Iuml, Sym_ETH, Sym_Ntilde,
+ Sym_Ograve, Sym_Oacute, Sym_Ocirc, Sym_Otilde, Sym_Ouml,
+ Sym_times, Sym_Oslash, Sym_Ugrave, Sym_Uacute, Sym_Ucirc,
+ Sym_Uuml, Sym_Yacute, Sym_THORN, Sym_szlig, Sym_agrave,
+ Sym_aacute, Sym_acirc, Sym_atilde, Sym_auml, Sym_aring,
+ Sym_aelig, Sym_ccedil, Sym_egrave, Sym_eacute, Sym_ecirc,
+ Sym_euml, Sym_igrave, Sym_iacute, Sym_icirc, Sym_iuml,
+ Sym_eth, Sym_ntilde, Sym_ograve, Sym_oacute, Sym_ocirc,
+ Sym_otilde, Sym_ouml, Sym_divide, Sym_oslash, Sym_ugrave,
+ Sym_uacute, Sym_ucirc, Sym_uuml, Sym_yacute, Sym_thorn,
+ Sym_yuml, Sym_fnof, Sym_Alpha, Sym_Beta, Sym_Gamma,
+ Sym_Delta, Sym_Epsilon, Sym_Zeta, Sym_Eta, Sym_Theta,
+ Sym_Iota, Sym_Kappa, Sym_Lambda, Sym_Mu, Sym_Nu,
+ Sym_Xi, Sym_Omicron, Sym_Pi, Sym_Rho, Sym_Sigma,
+ Sym_Tau, Sym_Upsilon, Sym_Phi, Sym_Chi, Sym_Psi,
+ Sym_Omega, Sym_alpha, Sym_beta, Sym_gamma, Sym_delta,
+ Sym_epsilon, Sym_zeta, Sym_eta, Sym_theta, Sym_iota,
+ Sym_kappa, Sym_lambda, Sym_mu, Sym_nu, Sym_xi,
+ Sym_omicron, Sym_pi, Sym_rho, Sym_sigmaf, Sym_sigma,
+ Sym_tau, Sym_upsilon, Sym_phi, Sym_chi, Sym_psi,
+ Sym_omega, Sym_thetasym, Sym_upsih, Sym_piv, Sym_bull,
+ Sym_hellip, Sym_prime, Sym_Prime, Sym_oline, Sym_frasl,
+ Sym_weierp, Sym_image, Sym_real, Sym_trade, Sym_alefsym,
+ Sym_larr, Sym_uarr, Sym_rarr, Sym_darr, Sym_harr,
+ Sym_crarr, Sym_lArr, Sym_uArr, Sym_rArr, Sym_dArr,
+ Sym_hArr, Sym_forall, Sym_part, Sym_exist, Sym_empty,
+ Sym_nabla, Sym_isin, Sym_notin, Sym_ni, Sym_prod,
+ Sym_sum, Sym_minus, Sym_lowast, Sym_radic, Sym_prop,
+ Sym_infin, Sym_ang, Sym_and, Sym_or, Sym_cap,
+ Sym_cup, Sym_int, Sym_there4, Sym_sim, Sym_cong,
+ Sym_asymp, Sym_ne, Sym_equiv, Sym_le, Sym_ge,
+ Sym_sub, Sym_sup, Sym_nsub, Sym_sube, Sym_supe,
+ Sym_oplus, Sym_otimes, Sym_perp, Sym_sdot, Sym_lceil,
+ Sym_rceil, Sym_lfloor, Sym_rfloor, Sym_lang, Sym_rang,
+ Sym_loz, Sym_spades, Sym_clubs, Sym_hearts, Sym_diams,
+ Sym_quot, Sym_amp, Sym_lt, Sym_gt, Sym_OElig,
+ Sym_oelig, Sym_Scaron, Sym_scaron, Sym_Yuml, Sym_circ,
+ Sym_tilde, Sym_ensp, Sym_emsp, Sym_thinsp, Sym_zwnj,
+ Sym_zwj, Sym_lrm, Sym_rlm, Sym_ndash, Sym_mdash,
+ Sym_lsquo, Sym_rsquo, Sym_sbquo, Sym_ldquo, Sym_rdquo,
+ Sym_bdquo, Sym_dagger, Sym_Dagger, Sym_permil, Sym_lsaquo,
+ Sym_rsaquo, Sym_euro,
+
+ /* doxygen extensions */
+ Sym_tm, Sym_apos,
+
+ /* doxygen commands mapped */
+ Sym_BSlash, Sym_At, Sym_Less, Sym_Greater, Sym_Amp,
+ Sym_Dollar, Sym_Hash, Sym_DoubleColon, Sym_Percent, Sym_Pipe,
+ Sym_Quot, Sym_Minus, Sym_Plus, Sym_Dot, Sym_Colon, Sym_Equal
+ };
+ enum PerlType { Perl_unknown = 0, Perl_string, Perl_char, Perl_symbol, Perl_umlaut,
+ Perl_acute, Perl_grave, Perl_circ, Perl_slash, Perl_tilde,
+ Perl_cedilla, Perl_ring
+ };
static HtmlEntityMapper *instance();
static void deleteInstance();
- DocSymbol::SymType name2sym(const QCString &symName) const;
- const char *utf8(DocSymbol::SymType symb,bool useInPrintf=FALSE) const;
- const char *html(DocSymbol::SymType symb,bool useInPrintf=FALSE) const;
- const char *xml(DocSymbol::SymType symb) const;
- const char *docbook(DocSymbol::SymType symb) const;
- const char *latex(DocSymbol::SymType symb) const;
- const char *man(DocSymbol::SymType symb) const;
- const char *rtf(DocSymbol::SymType symb) const;
- const DocSymbol::PerlSymb *perl(DocSymbol::SymType symb) const;
+ SymType name2sym(const QCString &symName) const;
+ const char *utf8(SymType symb,bool useInPrintf=FALSE) const;
+ const char *html(SymType symb,bool useInPrintf=FALSE) const;
+ const char *xml(SymType symb) const;
+ const char *docbook(SymType symb) const;
+ const char *latex(SymType symb) const;
+ const char *man(SymType symb) const;
+ const char *rtf(SymType symb) const;
+ struct PerlSymb
+ {
+ const char *symb;
+ const PerlType type;
+ };
+ const PerlSymb *perl(SymType symb) const;
void writeXMLSchema(TextStream &t);
private:
void validate();
HtmlEntityMapper();
~HtmlEntityMapper();
static HtmlEntityMapper *s_instance;
- std::unordered_map<std::string,DocSymbol::SymType> m_name2sym;
+ std::unordered_map<std::string,SymType> m_name2sym;
};
#endif
#include "language.h"
#include "htmlhelp.h"
#include "docparser.h"
+#include "docnode.h"
#include "htmldocvisitor.h"
#include "searchindex.h"
#include "pagedef.h"
if (macrofile.isEmpty()) return "";
QCString s = fileToString(macrofile);
macrofile = FileInfo(macrofile.str()).absFilePath();
- int size = s.length();
+ size_t size = s.length();
GrowBuf out(size);
const char *data = s.data();
int line = 1;
int cnt = 0;
- int i = 0;
+ size_t i = 0;
QCString nr;
while (i < size)
{
return "";
}
i++;
- if (!qstrncmp(data + i, "newcommand", (uint)strlen("newcommand")))
+ if (!qstrncmp(data + i, "newcommand", strlen("newcommand")))
{
- i += (int)strlen("newcommand");
+ i += strlen("newcommand");
}
- else if (!qstrncmp(data + i, "renewcommand", (uint)strlen("renewcommand")))
+ else if (!qstrncmp(data + i, "renewcommand", strlen("renewcommand")))
{
- i += (int)strlen("renewcommand");
+ i += strlen("renewcommand");
}
else
{
const StringVector &mathJaxExtensions = Config_getList(MATHJAX_EXTENSIONS);
if (!mathJaxExtensions.empty() || !g_latex_macro.isEmpty())
{
- mathJaxJs+= ",\n"
- " tex: {\n"
+ mathJaxJs+= ",\n";
+ if (!mathJaxExtensions.empty())
+ {
+ bool first = true;
+ mathJaxJs+= " loader: {\n"
+ " load: [";
+ for (const auto &s : mathJaxExtensions)
+ {
+ if (!first) mathJaxJs+= ",";
+ mathJaxJs+= "'[tex]/"+QCString(s.c_str())+"'";
+ first = false;
+ }
+ mathJaxJs+= "]\n"
+ " },\n";
+ }
+ mathJaxJs+= " tex: {\n"
" macros: {";
if (!g_latex_macro.isEmpty())
{
}
Doxygen::indexList->addStyleSheetFile("jquery.js");
+
Doxygen::indexList->addStyleSheetFile("dynsections.js");
+
if (Config_getBool(INTERACTIVE_SVG))
{
Doxygen::indexList->addStyleSheetFile("svgpan.js");
}
+
+ if (!Config_getBool(DISABLE_INDEX) && Config_getBool(HTML_DYNAMIC_MENUS))
+ {
+ Doxygen::indexList->addStyleSheetFile("menu.js");
+ Doxygen::indexList->addStyleSheetFile("menudata.js");
+ }
}
}
m_t << "</dl>";
}
-void HtmlGenerator::writeDoc(DocNode *n,const Definition *ctx,const MemberDef *,int id)
+void HtmlGenerator::writeDoc(const IDocNodeAST *ast,const Definition *ctx,const MemberDef *,int id)
{
- m_codeGen.setId(id);
- HtmlDocVisitor *visitor = new HtmlDocVisitor(m_t,m_codeGen,ctx);
- n->accept(visitor);
- delete visitor;
+ const DocNodeAST *astImpl = dynamic_cast<const DocNodeAST*>(ast);
+ if (astImpl)
+ {
+ m_codeGen.setId(id);
+ HtmlDocVisitor visitor(m_t,m_codeGen,ctx);
+ std::visit(visitor,astImpl->root);
+ }
}
//---------------- helpers for index generation -----------------------------
bool searchEngine = Config_getBool(SEARCHENGINE);
bool externalSearch = Config_getBool(EXTERNAL_SEARCH);
LayoutNavEntry *root = LayoutDocManager::instance().rootNavEntry();
- LayoutNavEntry::Kind kind = (LayoutNavEntry::Kind)-1;
- LayoutNavEntry::Kind altKind = (LayoutNavEntry::Kind)-1; // fall back for the old layout file
+ LayoutNavEntry::Kind kind = LayoutNavEntry::None;
+ LayoutNavEntry::Kind altKind = LayoutNavEntry::None; // fall back for the old layout file
bool highlightParent=FALSE;
switch (hli) // map HLI enums to LayoutNavEntry::Kind enums
{
{
// find highlighted index item
LayoutNavEntry *hlEntry = root->find(kind,kind==LayoutNavEntry::UserGroup ? file : QCString());
- if (!hlEntry && altKind!=(LayoutNavEntry::Kind)-1) { hlEntry=root->find(altKind); kind=altKind; }
+ if (!hlEntry && altKind!=LayoutNavEntry::None) { hlEntry=root->find(altKind); kind=altKind; }
if (!hlEntry) // highlighted item not found in the index! -> just show the level 1 index...
{
highlightParent=TRUE;
m_t << "\"><td class=\"memSeparator\" colspan=\"2\"> </td></tr>\n";
}
-void HtmlGenerator::setCurrentDoc(const Definition *context,const QCString &anchor,bool isSourceFile)
-{
- if (Doxygen::searchIndex)
- {
- Doxygen::searchIndex->setCurrentDoc(context,anchor,isSourceFile);
- }
-}
-
-void HtmlGenerator::addWord(const QCString &word,bool hiPriority)
-{
- if (Doxygen::searchIndex)
- {
- Doxygen::searchIndex->addWord(word,hiPriority);
- }
-}
-
QCString HtmlGenerator::getMathJaxMacros()
{
return getConvertLatexMacro();
void startFontClass(const QCString &s);
void endFontClass();
void writeCodeAnchor(const QCString &anchor);
- void setCurrentDoc(const Definition *,const QCString &,bool) {}
- void addWord(const QCString &,bool) {}
void startCodeFragment(const QCString &style);
void endCodeFragment(const QCString &);
{ m_codeGen.endCodeFragment(style); }
// ---------------------------
- void setCurrentDoc(const Definition *context,const QCString &anchor,bool isSourceFile);
- void addWord(const QCString &word,bool hiPriority);
- void writeDoc(DocNode *,const Definition *,const MemberDef *,int id);
+ void writeDoc(const IDocNodeAST *node,const Definition *,const MemberDef *,int id);
void startFile(const QCString &name,const QCString &manName,const QCString &title,int id);
void writeFooter(const QCString &navPath);
QCString recode(const QCString &s)
{
- int iSize = s.length();
- int oSize = iSize*4+1;
+ size_t iSize = s.length();
+ size_t oSize = iSize*4+1;
QCString output(oSize);
size_t iLeft = iSize;
size_t oLeft = oSize;
char *oPtr = output.rawData();
if (!portable_iconv(m_fromUtf8,&iPtr,&iLeft,&oPtr,&oLeft))
{
- oSize -= (int)oLeft;
+ oSize -= oLeft;
output.resize(oSize+1);
output.at(oSize)='\0';
return output;
}
}
private:
- void *m_iconv_null = (void*)(-1);
+ void *m_iconv_null = reinterpret_cast<void*>(-1);
void *m_fromUtf8 = m_iconv_null;
};
int dc = 0;
StringSet indexFiles;
StringSet imageFiles;
+ StringSet styleFiles;
HtmlHelpRecoder recoder;
HtmlHelpIndex index;
};
{
}
-/* language codes for Html help
- 0x405 Czech
- 0x406 Danish
- 0x413 Dutch
- 0xC09 English (Australia)
- 0x809 English (Britain)
- 0x1009 English (Canada)
- 0x1809 English (Ireland)
- 0x1409 English (New Zealand)
- 0x1C09 English (South Africa)
- 0x409 English (United States)
- 0x40B Finnish
- 0x40C French
- 0x407 German
- 0x408 Greece
- 0x40E Hungarian
- 0x410 Italian
- 0x814 Norwegian
- 0x415 Polish
- 0x816 Portuguese(Portugal)
- 0x416 Portuguese(Brazil)
- 0x419 Russian
- 0x80A Spanish(Mexico)
- 0xC0A Spanish(Modern Sort)
- 0x40A Spanish(Traditional Sort)
- 0x41D Swedish
- 0x41F Turkey
- 0x411 Japanese
- 0x412 Korean
- 0x804 Chinese (PRC)
- 0x404 Chinese (Taiwan)
-
- New LCIDs:
- 0x421 Indonesian
- 0x41A Croatian
- 0x418 Romanian
- 0x424 Slovenian
- 0x41B Slovak
- 0x422 Ukrainian
- 0x81A Serbian (Serbia, Latin)
- 0x403 Catalan
- 0x426 Latvian
- 0x427 Lithuanian
- 0x436 Afrikaans
- 0x42A Vietnamese
- 0x429 Persian (Iran)
- 0xC01 Arabic (Egypt) - I don't know which version of arabic is used inside translator_ar.h ,
- so I have chosen Egypt at random
-
-*/
-static StringUnorderedMap s_languageDict =
-{
- { "czech", "0x405 Czech" },
- { "danish", "0x406 Danish" },
- { "dutch", "0x413 Dutch" },
- { "finnish", "0x40B Finnish" },
- { "french", "0x40C French" },
- { "german", "0x407 German" },
- { "greek", "0x408 Greece" },
- { "hungarian", "0x40E Hungarian" },
- { "italian", "0x410 Italian" },
- { "norwegian", "0x814 Norwegian" },
- { "polish", "0x415 Polish" },
- { "portuguese", "0x816 Portuguese(Portugal)" },
- { "brazilian", "0x416 Portuguese(Brazil)" },
- { "russian", "0x419 Russian" },
- { "spanish", "0x40A Spanish(Traditional Sort)" },
- { "swedish", "0x41D Swedish" },
- { "turkish", "0x41F Turkey" },
- { "japanese", "0x411 Japanese" },
- { "japanese-en", "0x411 Japanese" },
- { "korean", "0x412 Korean" },
- { "korean-en", "0x412 Korean" },
- { "chinese", "0x804 Chinese (PRC)" },
- { "chinese-traditional", "0x404 Chinese (Taiwan)" },
- { "indonesian", "0x421 Indonesian" },
- { "croatian", "0x41A Croatian" },
- { "romanian", "0x418 Romanian" },
- { "slovene", "0x424 Slovenian" },
- { "slovak", "0x41B Slovak" },
- { "ukrainian", "0x422 Ukrainian" },
- { "serbian", "0x81A Serbian (Serbia, Latin)" },
- { "catalan", "0x403 Catalan" },
- { "lithuanian", "0x427 Lithuanian" },
- { "afrikaans", "0x436 Afrikaans" },
- { "vietnamese", "0x42A Vietnamese" },
- { "persian", "0x429 Persian (Iran)" },
- { "arabic", "0xC01 Arabic (Egypt)" },
- { "latvian", "0x426 Latvian" },
- { "macedonian", "0x042f Macedonian (Former Yugoslav Republic of Macedonia)" },
- { "armenian", "0x42b Armenian" },
- //Code for Esperanto should be as shown below but the htmlhelp compiler 1.3 does not support this
- // (and no newer version is available).
- //So do a fallback to the default language (see getLanguageString())
- //{ "esperanto", "0x48f Esperanto" },
- { "serbian-cyrillic", "0xC1A Serbian (Serbia, Cyrillic)" }
-};
-
/*! This will create a contents file (index.hhc) and a index file (index.hhk)
* and write the header of those files.
* It also creates a project file (index.hhp)
p->recoder.initialize();
/* open the contents file */
- QCString fName = Config_getString(HTML_OUTPUT) + "/index.hhc";
+ QCString fName = Config_getString(HTML_OUTPUT) + "/" + hhcFileName;
p->cts.open(fName.str(),std::ofstream::out | std::ofstream::binary);
if (!p->cts.is_open())
{
"</OBJECT>\n"
"<UL>\n";
- /* open the contents file */
- fName = Config_getString(HTML_OUTPUT) + "/index.hhk";
+ /* open the index file */
+ fName = Config_getString(HTML_OUTPUT) + "/" + hhkFileName;
p->kts.open(fName.str(),std::ofstream::out | std::ofstream::binary);
if (!p->kts.is_open())
{
}
-
-QCString HtmlHelp::getLanguageString()
-{
- if (!theTranslator->idLanguage().isEmpty())
- {
- auto it = s_languageDict.find(theTranslator->idLanguage().str());
- if (it!=s_languageDict.end())
- {
- return QCString(it->second);
- }
- }
- // default language
- return "0x409 English (United States)";
-}
-
-
-
void HtmlHelp::Private::createProjectFile()
{
/* Write the project file */
- QCString fName = Config_getString(HTML_OUTPUT) + "/index.hhp";
+ QCString fName = Config_getString(HTML_OUTPUT) + "/" + hhpFileName;
std::ofstream t(fName.str(),std::ofstream::out | std::ofstream::binary);
if (t.is_open())
{
- const char *hhcFile = "\"index.hhc\"";
- const char *hhkFile = "\"index.hhk\"";
+ QCString hhcFile = "\"" + hhcFileName + "\"";
+ QCString hhkFile = "\"" + hhkFileName + "\"";
bool hhkPresent = index.size()>0;
if (!ctsItemPresent) hhcFile = "";
if (!hhkPresent) hhkFile = "";
}
t << "Compatibility=1.1\n"
"Full-text search=Yes\n";
- if (ctsItemPresent) t << "Contents file=index.hhc\n";
+ if (ctsItemPresent) t << "Contents file=" + hhcFileName + "\n";
t << "Default Window=main\n"
"Default topic=" << indexName << "\n";
- if (hhkPresent) t << "Index file=index.hhk\n";
- t << "Language=" << getLanguageString() << "\n";
+ if (hhkPresent) t << "Index file=" + hhkFileName + "\n";
+ t << "Language=" << theTranslator->getLanguageString() << "\n";
if (Config_getBool(BINARY_TOC)) t << "Binary TOC=YES\n";
if (Config_getBool(GENERATE_CHI)) t << "Create CHI file=YES\n";
t << "Title=" << recoder.recode(Config_getString(PROJECT_NAME)) << "\n\n";
{
t << s.c_str() << "\n";
}
+ for (auto &s : styleFiles)
+ {
+ t << s.c_str() << "\n";
+ }
t.close();
}
else
}
/*! Finalizes the HTML help. This will finish and close the
- * contents file (index.hhc) and the index file (index.hhk).
+ * htmlhelp contents file and the htmlhelp index file.
* \sa initialize()
*/
void HtmlHelp::finalize()
bool /* addToNavIndex */,
const Definition * /* def */)
{
- static bool binaryTOC = Config_getBool(BINARY_TOC);
+ bool binaryTOC = Config_getBool(BINARY_TOC);
// If we're using a binary toc then folders cannot have links.
// Tried this and I didn't see any problems, when not using
// the resetting of file and anchor the TOC works better
p->cts << "<param name=\"ImageNumber\" value=\"";
if (isDir) // added - KPW
{
- p->cts << (int)BOOK_CLOSED ;
+ p->cts << static_cast<int>(BOOK_CLOSED);
}
else
{
- p->cts << (int)TEXT;
+ p->cts << static_cast<int>(TEXT);
}
p->cts << "\">";
p->cts << "</OBJECT>\n";
{
if (md)
{
- static bool separateMemberPages = Config_getBool(SEPARATE_MEMBER_PAGES);
+ bool separateMemberPages = Config_getBool(SEPARATE_MEMBER_PAGES);
if (context==0) // global member
{
if (md->getGroupDef())
if (context==0) return; // should not happen
QCString cfname = md->getOutputFileBase();
+ QCString argStr = md->argsString();
QCString cfiname = context->getOutputFileBase();
QCString level1 = context->name();
- QCString level2 = md->name();
+ QCString level2 = md->name() + argStr;
QCString contRef = separateMemberPages ? cfname : cfiname;
QCString memRef = cfname;
QCString anchor = !sectionAnchor.isEmpty() ? sectionAnchor : md->anchor();
}
}
+void HtmlHelp::addStyleSheetFile(const QCString &fileName)
+{
+ p->styleFiles.insert(fileName.str());
+}
+
void HtmlHelp::addImageFile(const QCString &fileName)
{
p->imageFiles.insert(fileName.str());
const QCString §ionAnchor, const QCString &title);
void addIndexFile(const QCString &name);
void addImageFile(const QCString &);
- void addStyleSheetFile(const QCString &) {}
- static QCString getLanguageString();
+ void addStyleSheetFile(const QCString &);
+ static inline const QCString hhcFileName = "index.hhc";
+ static inline const QCString hhkFileName = "index.hhk";
+ static inline const QCString hhpFileName = "index.hhp";
private:
class Private;
std::unique_ptr<Private> p;
Image::Image(uint w,uint h)
{
- static int hue = Config_getInt(HTML_COLORSTYLE_HUE);
- static int sat = Config_getInt(HTML_COLORSTYLE_SAT);
- static int gamma = Config_getInt(HTML_COLORSTYLE_GAMMA);
+ int hue = Config_getInt(HTML_COLORSTYLE_HUE);
+ int sat = Config_getInt(HTML_COLORSTYLE_SAT);
+ int gamma = Config_getInt(HTML_COLORSTYLE_GAMMA);
double red1,green1,blue1;
double red2,green2,blue2;
&red2,&green2,&blue2
);
- palette[2].red = (int)(red1 * 255.0);
- palette[2].green = (int)(green1 * 255.0);
- palette[2].blue = (int)(blue1 * 255.0);
+ palette[2].red = static_cast<int>(red1 * 255.0);
+ palette[2].green = static_cast<int>(green1 * 255.0);
+ palette[2].blue = static_cast<int>(blue1 * 255.0);
- palette[3].red = (int)(red2 * 255.0);
- palette[3].green = (int)(green2 * 255.0);
- palette[3].blue = (int)(blue2 * 255.0);
+ palette[3].red = static_cast<int>(red2 * 255.0);
+ palette[3].green = static_cast<int>(green2 * 255.0);
+ palette[3].blue = static_cast<int>(blue2 * 255.0);
- m_data = new uchar[w*h];
- memset(m_data,0,w*h);
+ m_data.resize(w*h);
m_width = w;
m_height = h;
}
Image::~Image()
{
- delete[] m_data;
}
void Image::setPixel(uint x,uint y,uchar val)
bool Image::save(const QCString &fileName,int mode)
{
- static bool useTransparency = Config_getBool(FORMULA_TRANSPARENT);
+ bool useTransparency = Config_getBool(FORMULA_TRANSPARENT);
uchar* buffer;
size_t bufferSize;
LodePNG_Encoder encoder;
}
encoder.infoPng.color.colorType = 3;
encoder.infoRaw.color.colorType = 3;
- LodePNG_encode(&encoder, &buffer, &bufferSize, m_data, m_width, m_height);
+ LodePNG_encode(&encoder, &buffer, &bufferSize, &m_data[0], m_width, m_height);
LodePNG_saveFile(buffer, bufferSize, fileName.data());
free(buffer);
LodePNG_Encoder_cleanup(&encoder);
m = l + l - v;
sv = (v - m ) / v;
h *= 6.0;
- sextant = (int)h;
+ sextant = static_cast<int>(h);
fract = h - sextant;
vsf = v * sv * fract;
mid1 = m + vsf;
m_hasAlpha = alphaLevels!=0;
m_width = width;
m_height = height;
- m_data = (uchar*)malloc(width*height*4);
+ m_data.resize(width*height*4);
uint i;
for (i=0;i<width*height;i++)
{
saturation/255.0, // saturation
pow(greyLevels[i]/255.0,gamma/100.0), // luma (gamma corrected)
&red,&green,&blue);
- r = (int)(red *255.0);
- g = (int)(green*255.0);
- b = (int)(blue *255.0);
+ r = static_cast<int>(red *255.0);
+ g = static_cast<int>(green*255.0);
+ b = static_cast<int>(blue *255.0);
a = alphaLevels ? alphaLevels[i] : 255;
m_data[i*4+0]=r;
m_data[i*4+1]=g;
ColoredImage::~ColoredImage()
{
- free(m_data);
}
bool ColoredImage::save(const QCString &fileName)
LodePNG_Encoder_init(&encoder);
encoder.infoPng.color.colorType = m_hasAlpha ? 6 : 2; // 2=RGB 24 bit, 6=RGBA 32 bit
encoder.infoRaw.color.colorType = 6; // 6=RGBA 32 bit
- LodePNG_encode(&encoder, &buffer, &bufferSize, m_data, m_width, m_height);
+ LodePNG_encode(&encoder, &buffer, &bufferSize, &m_data[0], m_width, m_height);
LodePNG_saveFile(buffer, bufferSize, fileName.data());
LodePNG_Encoder_cleanup(&encoder);
free(buffer);
#ifndef IMAGE_H
#define IMAGE_H
+#include <vector>
#include "types.h"
#include "qcstring.h"
friend uint stringLength(const QCString &s);
uint width() const { return m_width; }
uint height() const { return m_height; }
- uchar *data() const { return m_data; }
static uint stringLength(const QCString &s);
private:
uint m_width;
uint m_height;
- uchar *m_data;
+ std::vector<uchar> m_data;
};
/** Class representing a bitmap image colored based on hue/sat/gamma settings. */
private:
uint m_width;
uint m_height;
- uchar *m_data;
+ std::vector<uchar> m_data;
bool m_hasAlpha;
};
void countDataStructures()
{
- static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
+ bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
annotatedClasses = countAnnotatedClasses(&annotatedClassesPrinted, ClassDef::Class); // "classes" + "annotated"
hierarchyClasses = countClassHierarchy(ClassDef::Class); // "hierarchy"
// "interfaces" + "annotated"
const QCString &title,HighlightedItem hli,bool additionalIndices,
const QCString &altSidebarName)
{
- static bool disableIndex = Config_getBool(DISABLE_INDEX);
+ bool disableIndex = Config_getBool(DISABLE_INDEX);
ol.startFile(name,manName,title);
ol.startQuickIndices();
if (!disableIndex)
void endFile(OutputList &ol,bool skipNavIndex,bool skipEndContents,
const QCString &navPath)
{
- static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
+ bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
if (!skipNavIndex)
void endFileWithNavPath(const Definition *d,OutputList &ol)
{
- static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
+ bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
QCString navPath;
if (generateTreeView)
{
const ConceptLinkedRefMap *concepts = nullptr)
{
- bool hasMembers = !def->getMemberLists().empty() || !def->getMemberGroups().empty();
- Doxygen::indexList->addContentsItem(hasMembers,name,
- def->getReference(),def->getOutputFileBase(),anchor,
- hasMembers && !preventSeparateIndex,
- addToIndex,
- def);
int numClasses=0;
for (const auto &cd : def->getClasses())
{
if (cd->isLinkable()) numConcepts++;
}
}
+ bool hasMembers = !def->getMemberLists().empty() || !def->getMemberGroups().empty() || (numClasses>0) || (numConcepts>0);
+ Doxygen::indexList->addContentsItem(hasMembers,name,
+ def->getReference(),def->getOutputFileBase(),anchor,
+ hasMembers && !preventSeparateIndex,
+ addToIndex,
+ def);
//printf("addMembersToIndex(def=%s hasMembers=%d numClasses=%d)\n",qPrint(def->name()),hasMembers,numClasses);
if (hasMembers || numClasses>0 || numConcepts>0)
{
auto kind = lde->kind();
if (kind==LayoutDocEntry::MemberDef)
{
- const LayoutDocEntryMemberDef *lmd = (const LayoutDocEntryMemberDef*)lde.get();
- MemberList *ml = def->getMemberList(lmd->type);
- if (ml)
+ const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
+ if (lmd)
{
- for (const auto &md : *ml)
+ MemberList *ml = def->getMemberList(lmd->type);
+ if (ml)
{
- if (md->visibleInIndex())
+ for (const auto &md : *ml)
{
- writeMemberToIndex(def,md,addToIndex);
+ if (md->visibleInIndex())
+ {
+ writeMemberToIndex(def,md,addToIndex);
+ }
}
}
}
{
if (cd->isLinkable() && (cd->partOfGroups().empty() || def->definitionType()==Definition::TypeGroup))
{
- static bool inlineSimpleStructs = Config_getBool(INLINE_SIMPLE_STRUCTS);
+ bool inlineSimpleStructs = Config_getBool(INLINE_SIMPLE_STRUCTS);
bool isNestedClass = def->definitionType()==Definition::TypeClass;
addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(lde->kind()==LayoutDocEntry::FileClasses),cd->anchor(),
addToIndex && (isNestedClass || (cd->isSimple() && inlineSimpleStructs)),
for (const auto &bcd : bcl)
{
ClassDef *cd=bcd.classDef;
- if (cd->getLanguage()==SrcLangExt_VHDL && (VhdlDocGen::VhdlClasses)cd->protection()!=VhdlDocGen::ENTITYCLASS)
+ if (cd->getLanguage()==SrcLangExt_VHDL && VhdlDocGen::convert(cd->protection())!=VhdlDocGen::ENTITYCLASS)
{
continue;
}
return;
}
- static bool tocExpand = TRUE; //Config_getBool(TOC_EXPAND);
+ bool tocExpand = TRUE; //Config_getBool(TOC_EXPAND);
bool isDir = !dd->subDirs().empty() || // there are subdirs
(tocExpand && // or toc expand and
!dd->getFiles().empty() // there are files
{
for (const auto &fd : dd->getFiles())
{
- //static bool allExternals = Config_getBool(ALLEXTERNALS);
+ //bool allExternals = Config_getBool(ALLEXTERNALS);
//if ((allExternals && fd->isLinkable()) || fd->isLinkableInProject())
//{
// fileCount++;
{
for (const auto &fd : dd->getFiles())
{
- //static bool allExternals = Config_getBool(ALLEXTERNALS);
- //if ((allExternals && fd->isLinkable()) || fd->isLinkableInProject())
bool doc,src;
doc = fileVisibleInIndex(fd,src);
if (doc)
{
addMembersToIndex(fd,LayoutDocManager::File,fd->displayName(),QCString(),
- TRUE,FALSE,&fd->getConcepts());
+ !fd->isLinkableViaGroup(),FALSE,&fd->getConcepts());
}
else if (src)
{
static void writeClassTreeForList(OutputList &ol,const ClassLinkedMap &cl,bool &started,FTVHelp* ftv,bool addToIndex,
ClassDef::CompoundType ct,ClassDefSet &visitedClasses)
{
- static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
+ bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
for (const auto &cd : cl)
{
//printf("class %s hasVisibleRoot=%d isVisibleInHierarchy=%d\n",
bool b;
if (cd->getLanguage()==SrcLangExt_VHDL)
{
- if ((VhdlDocGen::VhdlClasses)cd->protection()!=VhdlDocGen::ENTITYCLASS)
+ if (VhdlDocGen::convert(cd->protection())!=VhdlDocGen::ENTITYCLASS)
{
continue;
}
static int countClassesInTreeList(const ClassLinkedMap &cl, ClassDef::CompoundType ct)
{
- static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
+ bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
int count=0;
for (const auto &cd : cl)
{
{
allFiles=0;
docFiles=0;
- if (Config_getBool(SHOW_FILES))
+ for (const auto &fn : *Doxygen::inputNameLinkedMap)
{
- for (const auto &fn : *Doxygen::inputNameLinkedMap)
+ for (const auto &fd: *fn)
{
- for (const auto &fd: *fn)
+ bool doc,src;
+ doc = fileVisibleInIndex(fd.get(),src);
+ if (doc || src)
{
- bool doc,src;
- doc = fileVisibleInIndex(fd.get(),src);
- if (doc || src)
- {
- allFiles++;
- }
- if (doc)
- {
- docFiles++;
- }
+ allFiles++;
+ }
+ if (doc)
+ {
+ docFiles++;
}
}
}
static void writeFileIndex(OutputList &ol)
{
- if (documentedFiles==0) return;
+ if (documentedFiles==0 || !Config_getBool(SHOW_FILES)) return;
ol.pushGeneratorState();
ol.disable(OutputGenerator::Man);
template<class ListType>
static void writeClassTree(const ListType &cl,FTVHelp *ftv,bool addToIndex,bool globalOnly,ClassDef::CompoundType ct)
{
- static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
+ bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
for (const auto &cdi : cl)
{
const ClassDef *cd = get_pointer(cdi);
ClassDefMutable *cdm = toClassDefMutable(cd);
if (cdm && cd->getLanguage()==SrcLangExt_VHDL)
{
- if ((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::PACKAGECLASS ||
- (VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::PACKBODYCLASS
+ if (VhdlDocGen::convert(cd->protection())==VhdlDocGen::PACKAGECLASS ||
+ VhdlDocGen::convert(cd->protection())==VhdlDocGen::PACKBODYCLASS
)// no architecture
{
continue;
}
- if ((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ARCHITECTURECLASS)
+ if (VhdlDocGen::convert(cd->protection())==VhdlDocGen::ARCHITECTURECLASS)
{
QCString n=cd->name();
cdm->setClassName(n);
{
if (lde->kind()==LayoutDocEntry::MemberDef)
{
- const LayoutDocEntryMemberDef *lmd = (const LayoutDocEntryMemberDef*)lde.get();
- MemberList *ml = nd->getMemberList(lmd->type);
- if (ml)
+ const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
+ if (lmd)
{
- for (const auto &md : *ml)
+ MemberList *ml = nd->getMemberList(lmd->type);
+ if (ml)
{
- if (md->visibleInIndex())
+ for (const auto &md : *ml)
{
- count++;
+ if (md->visibleInIndex())
+ {
+ count++;
+ }
}
}
}
{
if (lde->kind()==LayoutDocEntry::MemberDef)
{
- const LayoutDocEntryMemberDef *lmd = (const LayoutDocEntryMemberDef*)lde.get();
- MemberList *ml = nd->getMemberList(lmd->type);
- if (ml)
+ const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
+ if (lmd)
{
- for (const auto &md : *ml)
+ MemberList *ml = nd->getMemberList(lmd->type);
+ if (ml)
{
- //printf(" member %s visible=%d\n",qPrint(md->name()),md->visibleInIndex());
- if (md->visibleInIndex())
+ for (const auto &md : *ml)
{
- writeMemberToIndex(nd,md,addToIndex);
+ //printf(" member %s visible=%d\n",qPrint(md->name()),md->visibleInIndex());
+ if (md->visibleInIndex())
+ {
+ writeMemberToIndex(nd,md,addToIndex);
+ }
}
}
}
{
for (const auto &nd : nsLinkedMap)
{
- writeNamespaceTreeElement(nd,ftv,rootOnly,addToIndex);
+ if (nd->isLinkableInProject())
+ {
+ writeNamespaceTreeElement(nd,ftv,rootOnly,addToIndex);
+ }
}
}
{
for (const auto &nd : nsLinkedMap)
{
- writeNamespaceTreeElement(nd.get(),ftv,rootOnly,addToIndex);
+ if (nd->isLinkableInProject())
+ {
+ writeNamespaceTreeElement(nd.get(),ftv,rootOnly,addToIndex);
+ }
}
}
static void writeClassTreeInsideNamespaceElement(const NamespaceDef *nd,FTVHelp *ftv,
bool rootOnly,bool addToIndex,ClassDef::CompoundType ct)
{
- static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
+ bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
if (!nd->isAnonymous() &&
(!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
{
static int countAnnotatedClasses(int *cp, ClassDef::CompoundType ct)
{
- static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
+ bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
int count=0;
int countPrinted=0;
for (const auto &cd : *Doxygen::classLinkedMap)
//bool addToIndex = lne==0 || lne->visible();
bool first=TRUE;
- static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
+ bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
for (const auto &cd : *Doxygen::classLinkedMap)
{
if (cd->getLanguage()==SrcLangExt_VHDL &&
- ((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::PACKAGECLASS ||
- (VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::PACKBODYCLASS)
+ (VhdlDocGen::convert(cd->protection())==VhdlDocGen::PACKAGECLASS ||
+ VhdlDocGen::convert(cd->protection())==VhdlDocGen::PACKBODYCLASS)
) // no architecture
{
continue;
ol.startIndexKey();
if (cd->getLanguage()==SrcLangExt_VHDL)
{
- QCString prot= VhdlDocGen::getProtectionName((VhdlDocGen::VhdlClasses)cd->protection());
+ QCString prot= VhdlDocGen::getProtectionName(VhdlDocGen::convert(cd->protection()));
ol.docify(prot);
ol.writeString(" ");
}
const char hex[]="0123456789abcdef";
while ((c=*p++))
{
- result+=hex[((unsigned char)c)>>4];
- result+=hex[((unsigned char)c)&0xf];
+ result+=hex[static_cast<unsigned char>(c)>>4];
+ result+=hex[static_cast<unsigned char>(c)&0xf];
}
}
return result;
// write an alphabetical index of all class with a header for each letter
static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct, int annotatedCount)
{
- static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
+ bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
// What starting letters are used
UsedIndexLetters indexLettersUsed;
continue;
if (cd->isLinkableInProject() && cd->templateMaster()==0)
{
- if (cd->getLanguage()==SrcLangExt_VHDL && !((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ENTITYCLASS ))// no architecture
+ if (cd->getLanguage()==SrcLangExt_VHDL && !(VhdlDocGen::convert(cd->protection())==VhdlDocGen::ENTITYCLASS ))// no architecture
continue;
// get the first UTF8 character (after the part that should be ignored)
{
if (sliceOpt && cd->compoundType() != ct)
continue;
- if (cd->getLanguage()==SrcLangExt_VHDL && !((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ENTITYCLASS ))// no architecture
+ if (cd->getLanguage()==SrcLangExt_VHDL && !(VhdlDocGen::convert(cd->protection())==VhdlDocGen::ENTITYCLASS ))// no architecture
continue;
if (cd->isLinkableInProject() && cd->templateMaster()==0)
const MemberIndexMap &memberIndexMap,
Definition::DefType type)
{
- int index = (int)type;
+ int index = static_cast<int>(type);
ASSERT(index<3);
typedef void (*writeLinkForMember_t)(OutputList &ol,const MemberDef *md,const QCString &separator,
if (!firstItem) ol.endItemListItem();
if (!firstSection) ol.endItemList();
QCString cs = letterToLabel(letter.c_str());
- QCString anchor=(QCString)"index_"+convertToId(cs);
- QCString title=(QCString)"- "+letter.c_str()+" -";
+ QCString anchor=QCString("index_")+convertToId(cs);
+ QCString title=QCString("- ")+letter.c_str()+" -";
ol.startSection(anchor,title,SectionType::Subsection);
ol.docify(title);
ol.endSection(anchor,SectionType::Subsection);
void addClassMemberNameToIndex(const MemberDef *md)
{
- static bool hideFriendCompounds = Config_getBool(HIDE_FRIEND_COMPOUNDS);
+ bool hideFriendCompounds = Config_getBool(HIDE_FRIEND_COMPOUNDS);
const ClassDef *cd=0;
if (md->isLinkableInProject() &&
static const CmhlInfo *getCmhlInfo(size_t hl)
{
- static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
- static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
static CmhlInfo cmhlInfo[] =
{
CmhlInfo("functions", theTranslator->trAll()),
{
if (documentedClassMembers[hl]==0) return;
- static bool disableIndex = Config_getBool(DISABLE_INDEX);
+ bool disableIndex = Config_getBool(DISABLE_INDEX);
bool multiPageIndex=FALSE;
if (documentedClassMembers[hl]>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
QCString extension=Doxygen::htmlFileExtension;
LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassMembers);
QCString title = lne ? lne->title() : theTranslator->trCompoundMembers();
- if (hl!=CMHL_All) title+=(QCString)" - "+getCmhlInfo(hl)->title;
+ if (hl!=CMHL_All) title+=QCString(" - ")+getCmhlInfo(hl)->title;
bool addToIndex = lne==0 || lne->visible();
if (addToIndex)
static const FmhlInfo *getFmhlInfo(size_t hl)
{
- static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
- static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
- static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
+ bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
static FmhlInfo fmhlInfo[] =
{
FmhlInfo("globals", theTranslator->trAll()),
{
if (documentedFileMembers[hl]==0) return;
- static bool disableIndex = Config_getBool(DISABLE_INDEX);
+ bool disableIndex = Config_getBool(DISABLE_INDEX);
bool multiPageIndex=FALSE;
if (documentedFileMembers[hl]>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
bool addToIndex = lne==0 || lne->visible();
if (documentedFileMembers[FMHL_All]>0 && addToIndex)
{
- Doxygen::indexList->addContentsItem(FALSE,lne ? lne->title() : theTranslator->trFileMembers(),QCString(),"globals",QCString());
+ Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trFileMembers(),QCString(),"globals",QCString());
Doxygen::indexList->incContentsDepth();
}
writeFileMemberIndexFiltered(ol,FMHL_All);
static const NmhlInfo *getNmhlInfo(size_t hl)
{
- static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
- static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
- static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
+ bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
static NmhlInfo nmhlInfo[] =
{
NmhlInfo("namespacemembers", theTranslator->trAll()),
{
if (documentedNamespaceMembers[hl]==0) return;
- static bool disableIndex = Config_getBool(DISABLE_INDEX);
+ bool disableIndex = Config_getBool(DISABLE_INDEX);
bool multiPageIndex=FALSE;
bool addToIndex = lne==0 || lne->visible();
if (documentedNamespaceMembers[NMHL_All]>0 && addToIndex)
{
- Doxygen::indexList->addContentsItem(FALSE,lne ? lne->title() : theTranslator->trNamespaceMembers(),QCString(),"namespacemembers",QCString());
+ Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trNamespaceMembers(),QCString(),"namespacemembers",QCString());
Doxygen::indexList->incContentsDepth();
}
//bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
ol.writeObjectLink(QCString(),n,QCString(),pd->title());
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(FALSE,filterTitle(pd->title().str()),pd->getReference(),n,QCString(),FALSE,TRUE);
+ Doxygen::indexList->addContentsItem(FALSE,filterTitle(pd->title()),pd->getReference(),n,QCString(),FALSE,TRUE);
}
}
else
static bool mainPageHasOwnTitle()
{
- static QCString projectName = Config_getString(PROJECT_NAME);
+ QCString projectName = Config_getString(PROJECT_NAME);
QCString title;
if (Doxygen::mainPage)
{
- title = filterTitle(Doxygen::mainPage->title().str());
+ title = filterTitle(Doxygen::mainPage->title());
}
return !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
}
if (pd->title().isEmpty())
pageTitle=pd->name();
else
- pageTitle=filterTitle(pd->title().str());
+ pageTitle=filterTitle(pd->title());
if (ftv)
{
DotLegendGraph gd;
gd.writeGraph(Config_getString(HTML_OUTPUT));
- bool stripCommentsStateRef = Config_getBool(STRIP_CODE_COMMENTS);
- bool oldStripCommentsState = stripCommentsStateRef;
- bool createSubdirs = Config_getBool(CREATE_SUBDIRS);
- bool oldCreateSubdirs = createSubdirs;
+ bool oldStripCommentsState = Config_getBool(STRIP_CODE_COMMENTS);
+ bool oldCreateSubdirs = Config_getBool(CREATE_SUBDIRS);
// temporarily disable the stripping of comments for our own code example!
- stripCommentsStateRef = Config_updateBool(STRIP_CODE_COMMENTS,FALSE);
+ Config_updateBool(STRIP_CODE_COMMENTS,FALSE);
// temporarily disable create subdirs for linking to our example
- createSubdirs = Config_updateBool(CREATE_SUBDIRS,FALSE);
+ Config_updateBool(CREATE_SUBDIRS,FALSE);
startFile(ol,"graph_legend",QCString(),theTranslator->trLegendTitle());
startTitle(ol,QCString());
{
if (lde->kind()==LayoutDocEntry::MemberDef && addToIndex)
{
- const LayoutDocEntryMemberDef *lmd = (const LayoutDocEntryMemberDef*)lde.get();
- MemberList *ml = gd->getMemberList(lmd->type);
- if (ml)
+ const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
+ if (lmd)
{
- for (const auto &md : *ml)
+ MemberList *ml = gd->getMemberList(lmd->type);
+ if (ml)
{
- const MemberVector &enumList = md->enumFieldList();
- isDir = !enumList.empty() && md->isEnumerate();
- if (md->isVisible() && !md->isAnonymous())
+ for (const auto &md : *ml)
{
- Doxygen::indexList->addContentsItem(isDir,
- md->qualifiedName(),md->getReference(),
- md->getOutputFileBase(),md->anchor(),FALSE,addToIndex);
- }
- if (isDir)
- {
- Doxygen::indexList->incContentsDepth();
- for (const auto &emd : enumList)
+ const MemberVector &enumList = md->enumFieldList();
+ isDir = !enumList.empty() && md->isEnumerate();
+ if (md->isVisible() && !md->isAnonymous())
{
- if (emd->isVisible())
+ Doxygen::indexList->addContentsItem(isDir,
+ md->qualifiedName(),md->getReference(),
+ md->getOutputFileBase(),md->anchor(),FALSE,addToIndex);
+ }
+ if (isDir)
+ {
+ Doxygen::indexList->incContentsDepth();
+ for (const auto &emd : enumList)
{
- Doxygen::indexList->addContentsItem(FALSE,
- emd->qualifiedName(),emd->getReference(),emd->getOutputFileBase(),
- emd->anchor(),FALSE,addToIndex);
+ if (emd->isVisible())
+ {
+ Doxygen::indexList->addContentsItem(FALSE,
+ emd->qualifiedName(),emd->getReference(),emd->getOutputFileBase(),
+ emd->anchor(),FALSE,addToIndex);
+ }
}
+ Doxygen::indexList->decContentsDepth();
}
- Doxygen::indexList->decContentsDepth();
}
}
}
{
Doxygen::indexList->addContentsItem(FALSE,
nd->displayName(),nd->getReference(),
- nd->getOutputFileBase(),QCString(),FALSE,addToIndex);
+ nd->getOutputFileBase(),QCString(),FALSE,!Config_getBool(SHOW_NAMESPACES));
}
}
}
{
Doxygen::indexList->addContentsItem(FALSE,
fd->displayName(),fd->getReference(),
- fd->getOutputFileBase(),QCString(),FALSE,FALSE);
+ fd->getOutputFileBase(),QCString(),FALSE,fd->isLinkableViaGroup());
}
}
}
static void writeIndex(OutputList &ol)
{
- static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
- static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
- static QCString projectName = Config_getString(PROJECT_NAME);
+ bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ QCString projectName = Config_getString(PROJECT_NAME);
// save old generator state
ol.pushGeneratorState();
}
else if (Doxygen::mainPage)
{
- title = filterTitle(Doxygen::mainPage->title().str());
+ title = filterTitle(Doxygen::mainPage->title());
}
QCString indexName="index";
(!projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0)
) // to avoid duplicate entries in the treeview
{
- Doxygen::indexList->addContentsItem(Doxygen::mainPage->hasSubPages(),title,QCString(),indexName,QCString(),Doxygen::mainPage->hasSubPages(),TRUE);
+ Doxygen::indexList->addContentsItem(Doxygen::mainPage->hasSubPages() || Doxygen::mainPage->hasSections(),title,QCString(),indexName,QCString(),Doxygen::mainPage->hasSubPages(),TRUE);
+ if (Doxygen::mainPage->hasSubPages()) Doxygen::indexList->incContentsDepth();
+
}
if (Doxygen::mainPage->hasSubPages() || Doxygen::mainPage->hasSections())
{
writePages(Doxygen::mainPage.get(),0);
}
+ if (!projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0 && Doxygen::mainPage->hasSubPages())
+ {
+ if (Doxygen::mainPage->hasSubPages()) Doxygen::indexList->decContentsDepth();
+ }
}
ol.startQuickIndices();
}
if (documentedPages>0)
{
- //ol.parseText(projPrefix+theTranslator->trPageDocumentation());
- //ol.endIndexSection(isPageDocumentation);
bool first=Doxygen::mainPage==0;
for (const auto &pd : *Doxygen::pageLinkedMap)
{
ol.parseText(/*projPrefix+*/theTranslator->trExceptionIndex());
ol.endIndexSection(isCompoundIndex);
}
- if (documentedFiles>0)
+ if (Config_getBool(SHOW_FILES) && documentedFiles>0)
{
ol.startIndexSection(isFileIndex);
ol.parseText(/*projPrefix+*/theTranslator->trFileIndex());
ol.parseText(/*projPrefix+*/theTranslator->trExceptionDocumentation());
ol.endIndexSection(isClassDocumentation);
}
- if (documentedFiles>0)
+ if (Config_getBool(SHOW_FILES) && documentedFiles>0)
{
ol.startIndexSection(isFileDocumentation);
ol.parseText(/*projPrefix+*/theTranslator->trFileDocumentation());
static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &entries)
{
- static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
+ bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
for (const auto &lne : entries)
{
LayoutNavEntry::Kind kind = lne->kind();
- uint index = (uint)kind;
+ size_t index = static_cast<size_t>(kind);
if (index>=indexWritten.size())
{
size_t i;
break;
case LayoutNavEntry::Namespaces:
{
- static bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
+ bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
if (showNamespaces)
{
if (documentedNamespaces>0 && addToIndex)
break;
case LayoutNavEntry::NamespaceList:
{
- static bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
+ bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
if (showNamespaces)
{
msg("Generating namespace index...\n");
break;
case LayoutNavEntry::Files:
{
- if (documentedFiles>0 && addToIndex)
+ if (Config_getBool(SHOW_FILES) && documentedFiles>0 && addToIndex)
{
Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
Doxygen::indexList->incContentsDepth();
static bool quickLinkVisible(LayoutNavEntry::Kind kind)
{
- static bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
- static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
+ bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
+ bool showFiles = Config_getBool(SHOW_FILES);
+ bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
switch (kind)
{
case LayoutNavEntry::MainPage: return TRUE;
case LayoutNavEntry::ExceptionList: return annotatedExceptions>0;
case LayoutNavEntry::ExceptionIndex: return annotatedExceptions>0;
case LayoutNavEntry::ExceptionHierarchy: return hierarchyExceptions>0;
- case LayoutNavEntry::Files: return documentedFiles>0;
- case LayoutNavEntry::FileList: return documentedFiles>0;
+ case LayoutNavEntry::Files: return documentedFiles>0 && showFiles;
+ case LayoutNavEntry::FileList: return documentedFiles>0 && showFiles;
case LayoutNavEntry::FileGlobals: return documentedFileMembers[FMHL_All]>0;
case LayoutNavEntry::Examples: return !Doxygen::exampleLinkedMap->empty();
case LayoutNavEntry::None: // should never happen, means not properly initialized
if (!firstChild) t << ",\n";
firstChild=FALSE;
QCString url = entry->url();
+ if (isURL(url)) url = "^" + url;
t << "{text:\"" << convertToJSString(entry->title()) << "\",url:\""
<< convertToJSString(url) << "\"";
bool hasChildren=FALSE;
#include <utility>
#include <vector>
#include <memory>
+#include <mutex>
#include "qcstring.h"
class IndexIntf
{
public:
- virtual ~IndexIntf() {}
+ virtual ~IndexIntf() = default;
virtual void initialize() = 0;
virtual void finalize() = 0;
virtual void incContentsDepth() = 0;
/** \brief A list of index interfaces.
*
* This class itself implements all methods of IndexIntf and
- * just forwards the calls to all items in the list.
+ * just forwards the calls to all items in the list (composite design pattern).
*/
class IndexList : public IndexIntf
{
(intf.get()->*methodPtr)(std::forward<As>(args)...);
}
}
+ // For each version with locking
+ template<class... Ts,class... As>
+ void foreach_locked(void (IndexIntf::*methodPtr)(Ts...),As&&... args)
+ {
+ std::lock_guard<std::mutex> lock(m_mutex);
+ foreach(methodPtr,std::forward<As>(args)...);
+ }
public:
/** Creates a list of indexes */
void finalize()
{ foreach(&IndexIntf::finalize); }
void incContentsDepth()
- { if (m_enabled) foreach(&IndexIntf::incContentsDepth); }
+ { if (m_enabled) foreach_locked(&IndexIntf::incContentsDepth); }
void decContentsDepth()
- { if (m_enabled) foreach(&IndexIntf::decContentsDepth); }
+ { if (m_enabled) foreach_locked(&IndexIntf::decContentsDepth); }
void addContentsItem(bool isDir, const QCString &name, const QCString &ref,
const QCString &file, const QCString &anchor,bool separateIndex=FALSE,bool addToNavIndex=FALSE,
const Definition *def=0)
- { if (m_enabled) foreach(&IndexIntf::addContentsItem,isDir,name,ref,file,anchor,separateIndex,addToNavIndex,def); }
+ { if (m_enabled) foreach_locked(&IndexIntf::addContentsItem,isDir,name,ref,file,anchor,separateIndex,addToNavIndex,def); }
void addIndexItem(const Definition *context,const MemberDef *md,const QCString §ionAnchor=QCString(),const QCString &title=QCString())
- { if (m_enabled) foreach(&IndexIntf::addIndexItem,context,md,sectionAnchor,title); }
+ { if (m_enabled) foreach_locked(&IndexIntf::addIndexItem,context,md,sectionAnchor,title); }
void addIndexFile(const QCString &name)
- { if (m_enabled) foreach(&IndexIntf::addIndexFile,name); }
+ { if (m_enabled) foreach_locked(&IndexIntf::addIndexFile,name); }
void addImageFile(const QCString &name)
- { if (m_enabled) foreach(&IndexIntf::addImageFile,name); }
+ { if (m_enabled) foreach_locked(&IndexIntf::addImageFile,name); }
void addStyleSheetFile(const QCString &name)
- { if (m_enabled) foreach(&IndexIntf::addStyleSheetFile,name); }
+ { if (m_enabled) foreach_locked(&IndexIntf::addStyleSheetFile,name); }
private:
bool m_enabled;
+ std::mutex m_mutex;
};
#include "config.h"
#include "util.h"
#include "language.h"
-#include "lang_cfg.h"
#include "vhdldocgen.h"
#include "translator.h"
#include "translator_en.h"
-#if !defined(ENGLISH_ONLY)
#include "translator_adapter.h"
-#ifdef LANG_NL
#include "translator_nl.h"
-#endif
-#ifdef LANG_AM
#include "translator_am.h"
-#endif
-#ifdef LANG_SV
#include "translator_sv.h"
-#endif
-#ifdef LANG_CZ
#include "translator_cz.h"
-#endif
-#ifdef LANG_FR
#include "translator_fr.h"
-#endif
-#ifdef LANG_ID
#include "translator_id.h"
-#endif
-#ifdef LANG_IT
#include "translator_it.h"
-#endif
-#ifdef LANG_DE
#include "translator_de.h"
-#endif
-#ifdef LANG_JP
#include "translator_jp.h"
-#endif
-#ifdef LANG_JE
#include "translator_je.h"
-#endif
-#ifdef LANG_ES
#include "translator_es.h"
-#endif
-#ifdef LANG_EO
#include "translator_eo.h"
-#endif
-#ifdef LANG_FI
#include "translator_fi.h"
-#endif
-#ifdef LANG_RU
#include "translator_ru.h"
-#endif
-#ifdef LANG_HR
#include "translator_hr.h"
-#endif
-#ifdef LANG_PL
#include "translator_pl.h"
-#endif
-#ifdef LANG_PT
#include "translator_pt.h"
-#endif
-#ifdef LANG_HU
+#include "translator_hi.h"
#include "translator_hu.h"
-#endif
-#ifdef LANG_KE
#include "translator_ke.h"
-#endif
-#ifdef LANG_KR
#include "translator_kr.h"
-#endif
-#ifdef LANG_RO
#include "translator_ro.h"
-#endif
-#ifdef LANG_SI
#include "translator_si.h"
-#endif
-#ifdef LANG_CN
#include "translator_cn.h"
-#endif
-#ifdef LANG_TW
#include "translator_tw.h"
-#endif
-#ifdef LANG_NO
#include "translator_no.h"
-#endif
-#ifdef LANG_BR
#include "translator_br.h"
-#endif
-#ifdef LANG_DK
#include "translator_dk.h"
-#endif
-#ifdef LANG_SK
#include "translator_sk.h"
-#endif
-#ifdef LANG_UA
#include "translator_ua.h"
-#endif
-#ifdef LANG_GR
#include "translator_gr.h"
-#endif
-#ifdef LANG_SR
#include "translator_sr.h"
-#endif
-#ifdef LANG_CA
#include "translator_ca.h"
-#endif
-//#ifdef LANG_JS
-//#include "translator_js.h"
-//#endif
-#ifdef LANG_LT
#include "translator_lt.h"
-#endif
-#ifdef LANG_LV
#include "translator_lv.h"
-#endif
-#ifdef LANG_ZA
#include "translator_za.h"
-#endif
-#ifdef LANG_AR
#include "translator_ar.h"
-#endif
-#ifdef LANG_FA
#include "translator_fa.h"
-#endif
-#ifdef LANG_MK
#include "translator_mk.h"
-#endif
-#ifdef LANG_SC
#include "translator_sc.h"
-#endif
-#ifdef LANG_VI
#include "translator_vi.h"
-#endif
-#ifdef LANG_TR
#include "translator_tr.h"
-#endif
-#endif // !ENGLISH_ONLY
+#include "translator_bg.h"
Translator *theTranslator=0;
switch (langName)
{
case OUTPUT_LANGUAGE_t::English: theTranslator = new TranslatorEnglish; break;
-#if !defined(ENGLISH_ONLY)
-#ifdef LANG_ZA
case OUTPUT_LANGUAGE_t::Afrikaans: theTranslator = new TranslatorAfrikaans; break;
-#endif
-#ifdef LANG_AR
case OUTPUT_LANGUAGE_t::Arabic: theTranslator = new TranslatorArabic; break;
-#endif
-#ifdef LANG_AM
case OUTPUT_LANGUAGE_t::Armenian: theTranslator = new TranslatorArmenian; break;
-#endif
-#ifdef LANG_BR
case OUTPUT_LANGUAGE_t::Brazilian: theTranslator = new TranslatorBrazilian; break;
-#endif
-#ifdef LANG_CA
+ case OUTPUT_LANGUAGE_t::Bulgarian: theTranslator = new TranslatorBulgarian; break;
case OUTPUT_LANGUAGE_t::Catalan: theTranslator = new TranslatorCatalan; break;
-#endif
-#ifdef LANG_CN
case OUTPUT_LANGUAGE_t::Chinese: theTranslator = new TranslatorChinese; break;
-#endif
-#ifdef LANG_TW
case OUTPUT_LANGUAGE_t::Chinese_Traditional: theTranslator = new TranslatorChinesetraditional; break;
-#endif
-#ifdef LANG_HR
case OUTPUT_LANGUAGE_t::Croatian: theTranslator = new TranslatorCroatian; break;
-#endif
-#ifdef LANG_CZ
case OUTPUT_LANGUAGE_t::Czech: theTranslator = new TranslatorCzech; break;
-#endif
-#ifdef LANG_DK
case OUTPUT_LANGUAGE_t::Danish: theTranslator = new TranslatorDanish; break;
-#endif
-#ifdef LANG_NL
case OUTPUT_LANGUAGE_t::Dutch: theTranslator = new TranslatorDutch; break;
-#endif
-#ifdef LANG_EO
case OUTPUT_LANGUAGE_t::Esperanto: theTranslator = new TranslatorEsperanto; break;
-#endif
-#ifdef LANG_FA
case OUTPUT_LANGUAGE_t::Farsi: theTranslator = new TranslatorPersian; break;
-#endif
-#ifdef LANG_FI
case OUTPUT_LANGUAGE_t::Finnish: theTranslator = new TranslatorFinnish; break;
-#endif
-#ifdef LANG_FR
case OUTPUT_LANGUAGE_t::French: theTranslator = new TranslatorFrench; break;
-#endif
-#ifdef LANG_DE
case OUTPUT_LANGUAGE_t::German: theTranslator = new TranslatorGerman; break;
-#endif
-#ifdef LANG_GR
case OUTPUT_LANGUAGE_t::Greek: theTranslator = new TranslatorGreek; break;
-#endif
-#ifdef LANG_HU
+ case OUTPUT_LANGUAGE_t::Hindi: theTranslator = new TranslatorHindi; break;
case OUTPUT_LANGUAGE_t::Hungarian: theTranslator = new TranslatorHungarian; break;
-#endif
-#ifdef LANG_ID
case OUTPUT_LANGUAGE_t::Indonesian: theTranslator = new TranslatorIndonesian; break;
-#endif
-#ifdef LANG_IT
case OUTPUT_LANGUAGE_t::Italian: theTranslator = new TranslatorItalian; break;
-#endif
-#ifdef LANG_JP
case OUTPUT_LANGUAGE_t::Japanese: theTranslator = new TranslatorJapanese; break;
-#endif
-#ifdef LANG_JE
case OUTPUT_LANGUAGE_t::Japanese_en: theTranslator = new TranslatorJapaneseEn; break;
-#endif
-#ifdef LANG_KR
case OUTPUT_LANGUAGE_t::Korean: theTranslator = new TranslatorKorean; break;
-#endif
-#ifdef LANG_KE
case OUTPUT_LANGUAGE_t::Korean_en: theTranslator = new TranslatorKoreanEn; break;
-#endif
-#ifdef LANG_LV
case OUTPUT_LANGUAGE_t::Latvian: theTranslator = new TranslatorLatvian; break;
-#endif
-#ifdef LANG_LT
case OUTPUT_LANGUAGE_t::Lithuanian: theTranslator = new TranslatorLithuanian; break;
-#endif
-#ifdef LANG_MK
case OUTPUT_LANGUAGE_t::Macedonian: theTranslator = new TranslatorMacedonian; break;
-#endif
-#ifdef LANG_NO
case OUTPUT_LANGUAGE_t::Norwegian: theTranslator = new TranslatorNorwegian; break;
-#endif
-#ifdef LANG_FA
case OUTPUT_LANGUAGE_t::Persian: theTranslator = new TranslatorPersian; break;
-#endif
-#ifdef LANG_PL
case OUTPUT_LANGUAGE_t::Polish: theTranslator = new TranslatorPolish; break;
-#endif
-#ifdef LANG_PT
case OUTPUT_LANGUAGE_t::Portuguese: theTranslator = new TranslatorPortuguese; break;
-#endif
-#ifdef LANG_RO
case OUTPUT_LANGUAGE_t::Romanian: theTranslator = new TranslatorRomanian; break;
-#endif
-#ifdef LANG_RU
case OUTPUT_LANGUAGE_t::Russian: theTranslator = new TranslatorRussian; break;
-#endif
-#ifdef LANG_SR
case OUTPUT_LANGUAGE_t::Serbian: theTranslator = new TranslatorSerbian; break;
-#endif
-#ifdef LANG_SC
case OUTPUT_LANGUAGE_t::Serbian_Cyrillic: theTranslator = new TranslatorSerbianCyrillic; break;
-#endif
-#ifdef LANG_SK
case OUTPUT_LANGUAGE_t::Slovak: theTranslator = new TranslatorSlovak; break;
-#endif
-#ifdef LANG_SI
case OUTPUT_LANGUAGE_t::Slovene: theTranslator = new TranslatorSlovene; break;
-#endif
-#ifdef LANG_ES
case OUTPUT_LANGUAGE_t::Spanish: theTranslator = new TranslatorSpanish; break;
-#endif
-#ifdef LANG_SV
case OUTPUT_LANGUAGE_t::Swedish: theTranslator = new TranslatorSwedish; break;
-#endif
-#ifdef LANG_TR
case OUTPUT_LANGUAGE_t::Turkish: theTranslator = new TranslatorTurkish; break;
-#endif
-#ifdef LANG_UA
case OUTPUT_LANGUAGE_t::Ukrainian: theTranslator = new TranslatorUkrainian; break;
-#endif
-#ifdef LANG_VI
case OUTPUT_LANGUAGE_t::Vietnamese: theTranslator = new TranslatorVietnamese; break;
-#endif
-#endif
}
+
+ QCString msg = theTranslator->updateNeededMessage();
+ if (!msg.isEmpty()) ::msg("%s", qPrint(msg));
}
+++ /dev/null
-#
-# This file is an aid to generate the Languages rules file.
-# usage:
-# python languages.py > ..\winbuild\Languages.rules
-#
-import os
-import re
-
-files = [f for f in os.listdir('.') if re.match(r'translator_[a-z][a-z]\.h', f)]
-new_list = []
-for f in files:
- new_list.append([f,(os.path.splitext(f)[0]).replace("translator_","").upper()])
-
-#
-# generating file is lang_cfg.py
-# the rules file has to output lang_cfg.h
-#
-print("""\
-<?xml version="1.0" encoding="utf-8"?>
-<VisualStudioToolFile
- Name="languages"
- Version="8.00"
- >
- <Rules>
- <CustomBuildRule
- Name="Languages"
- DisplayName="Settings"
- CommandLine="python $(InputPath) [AllOptions] [AdditionalOptions] > $(InpDir)/$(InputName).h"
- Outputs="$(IntDir)/$(InputName).h"
- FileExtensions="*.py"
- AdditionalDependencies=""
- ExecutionDescription="Executing languages ..."
- ShowOnlyRuleProperties="false"
- >
- <Properties>
- <EnumProperty
- Name="EnglishOnly"
- DisplayName="Use English Only"
- Description="Use English Only"
- DefaultValue="0"
- >
- <Values>
- <EnumValue
- Value="0"
- Switch=""
- DisplayName="Don't use English Only"
- />
- <EnumValue
- Value="1"
- Switch="ENONLY"
- DisplayName="Use English Only"
- />
- </Values>
- </EnumProperty>
-""")
-#
-# generate loop, English is mandatory (so cannot be chosen)
-#
-for f in new_list:
- if (f[1] != "EN"):
- # search for the language description
- fil = open(f[0], 'r')
- tmp = ""
- for line in fil:
- if "idLanguage" in line:
- tmp = line
- if "}" in line:
- break
- elif (tmp != ""):
- tmp += line
- if "}" in line:
- break
-
- tmp = tmp.replace("\n","")
- l = re.sub('[^"]*"([^"]*)".*','\\1',tmp)
- l1 = l.replace("-","")
- # capitalize first letter
- l = l.title()
- print("""\
- <EnumProperty
- Name="%s"
- DisplayName="Use %s"
- Description="Use %s"
- DefaultValue="1"
- >
- <Values>
- <EnumValue
- Value="0"
- Switch=""
- DisplayName="Don't use %s"
- />
- <EnumValue
- Value="1"
- Switch="%s"
- DisplayName="Use %s"
- />
- </Values>
- </EnumProperty>
- """ % (l1, l, l, l, f[1], l))
-
-print("""\
- </Properties>
- </CustomBuildRule>
- </Rules>
-</VisualStudioToolFile>
-""")
static const char *getSectionName(int level)
{
- static bool compactLatex = Config_getBool(COMPACT_LATEX);
+ bool compactLatex = Config_getBool(COMPACT_LATEX);
int l = level;
if (compactLatex) l++;
if (Doxygen::insideMainPage) l--;
}
}
-
-static void visitCaption(LatexDocVisitor *parent, const DocNodeList &children)
+void LatexDocVisitor::visitCaption(const DocNodeList &children)
{
- for (const auto &n : children) n->accept(parent);
+ for (const auto &n : children)
+ {
+ std::visit(*this,n);
+ }
}
QCString LatexDocVisitor::escapeMakeIndexChars(const char *s)
LatexDocVisitor::LatexDocVisitor(TextStream &t,LatexCodeGenerator &ci,
const QCString &langExt,bool insideTabbing)
- : DocVisitor(DocVisitor_Latex), m_t(t), m_ci(ci), m_insidePre(FALSE),
- m_insideItem(FALSE), m_hide(FALSE), m_hideCaption(FALSE),
+ : m_t(t), m_ci(ci), m_insidePre(FALSE),
+ m_insideItem(FALSE), m_hide(FALSE),
m_insideTabbing(insideTabbing), m_langExt(langExt)
{
}
// visitor functions for leaf nodes
//--------------------------------------
-void LatexDocVisitor::visit(DocWord *w)
+void LatexDocVisitor::operator()(const DocWord &w)
{
if (m_hide) return;
- filter(w->word());
+ filter(w.word());
}
-void LatexDocVisitor::visit(DocLinkedWord *w)
+void LatexDocVisitor::operator()(const DocLinkedWord &w)
{
if (m_hide) return;
- startLink(w->ref(),w->file(),w->anchor());
- filter(w->word());
- endLink(w->ref(),w->file(),w->anchor());
+ startLink(w.ref(),w.file(),w.anchor());
+ filter(w.word());
+ endLink(w.ref(),w.file(),w.anchor());
}
-void LatexDocVisitor::visit(DocWhiteSpace *w)
+void LatexDocVisitor::operator()(const DocWhiteSpace &w)
{
if (m_hide) return;
if (m_insidePre)
{
- m_t << w->chars();
+ m_t << w.chars();
}
else
{
}
}
-void LatexDocVisitor::visit(DocSymbol *s)
+void LatexDocVisitor::operator()(const DocSymbol &s)
{
if (m_hide) return;
bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
- const char *res = HtmlEntityMapper::instance()->latex(s->symbol());
+ const char *res = HtmlEntityMapper::instance()->latex(s.symbol());
if (res)
{
- if (((s->symbol() == DocSymbol::Sym_lt) || (s->symbol() == DocSymbol::Sym_Less))&& (!m_insidePre))
+ if (((s.symbol() == HtmlEntityMapper::Sym_lt) || (s.symbol() == HtmlEntityMapper::Sym_Less))&& (!m_insidePre))
{
if (pdfHyperlinks)
{
m_t << "$<$";
}
}
- else if (((s->symbol() == DocSymbol::Sym_gt) || (s->symbol() == DocSymbol::Sym_Greater)) && (!m_insidePre))
+ else if (((s.symbol() == HtmlEntityMapper::Sym_gt) || (s.symbol() == HtmlEntityMapper::Sym_Greater)) && (!m_insidePre))
{
if (pdfHyperlinks)
{
}
else
{
- err("LaTeX: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(s->symbol(),TRUE));
+ err("LaTeX: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(s.symbol(),TRUE));
}
}
-void LatexDocVisitor::visit(DocEmoji *s)
+void LatexDocVisitor::operator()(const DocEmoji &s)
{
if (m_hide) return;
- QCString emojiName = EmojiEntityMapper::instance()->name(s->index());
+ QCString emojiName = EmojiEntityMapper::instance()->name(s.index());
if (!emojiName.isEmpty())
{
QCString imageName=emojiName.mid(1,emojiName.length()-2); // strip : at start and end
}
else
{
- m_t << s->name();
+ m_t << s.name();
}
}
-void LatexDocVisitor::visit(DocURL *u)
+void LatexDocVisitor::operator()(const DocURL &u)
{
if (m_hide) return;
if (Config_getBool(PDF_HYPERLINKS))
{
m_t << "\\href{";
- if (u->isEmail()) m_t << "mailto:";
- m_t << latexFilterURL(u->url()) << "}";
+ if (u.isEmail()) m_t << "mailto:";
+ m_t << latexFilterURL(u.url()) << "}";
}
m_t << "{\\texttt{ ";
- filter(u->url());
+ filter(u.url());
m_t << "}}";
}
-void LatexDocVisitor::visit(DocLineBreak *)
+void LatexDocVisitor::operator()(const DocLineBreak &)
{
if (m_hide) return;
m_t << "~\\newline\n";
}
-void LatexDocVisitor::visit(DocHorRuler *)
+void LatexDocVisitor::operator()(const DocHorRuler &)
{
if (m_hide) return;
if (insideTable())
m_t << "\\DoxyHorRuler{0}\n";
}
-void LatexDocVisitor::visit(DocStyleChange *s)
+void LatexDocVisitor::operator()(const DocStyleChange &s)
{
if (m_hide) return;
- switch (s->style())
+ switch (s.style())
{
case DocStyleChange::Bold:
- if (s->enable()) m_t << "{\\bfseries{"; else m_t << "}}";
+ if (s.enable()) m_t << "{\\bfseries{"; else m_t << "}}";
break;
case DocStyleChange::S:
case DocStyleChange::Strike:
case DocStyleChange::Del:
- if (s->enable()) m_t << "\\sout{"; else m_t << "}";
+ if (s.enable()) m_t << "\\sout{"; else m_t << "}";
break;
case DocStyleChange::Underline:
case DocStyleChange::Ins:
- if (s->enable()) m_t << "\\uline{"; else m_t << "}";
+ if (s.enable()) m_t << "\\uline{"; else m_t << "}";
break;
case DocStyleChange::Italic:
- if (s->enable()) m_t << "{\\itshape "; else m_t << "}";
+ if (s.enable()) m_t << "{\\itshape "; else m_t << "}";
break;
case DocStyleChange::Code:
- if (s->enable()) m_t << "{\\ttfamily "; else m_t << "}";
+ if (s.enable()) m_t << "{\\ttfamily "; else m_t << "}";
break;
case DocStyleChange::Subscript:
- if (s->enable()) m_t << "\\textsubscript{"; else m_t << "}";
+ if (s.enable()) m_t << "\\textsubscript{"; else m_t << "}";
break;
case DocStyleChange::Superscript:
- if (s->enable()) m_t << "\\textsuperscript{"; else m_t << "}";
+ if (s.enable()) m_t << "\\textsuperscript{"; else m_t << "}";
break;
case DocStyleChange::Center:
- if (s->enable()) m_t << "\\begin{center}"; else m_t << "\\end{center} ";
+ if (s.enable()) m_t << "\\begin{center}"; else m_t << "\\end{center} ";
break;
case DocStyleChange::Small:
- if (s->enable()) m_t << "\n\\footnotesize "; else m_t << "\n\\normalsize ";
+ if (s.enable()) m_t << "\n\\footnotesize "; else m_t << "\n\\normalsize ";
break;
case DocStyleChange::Cite:
- if (s->enable()) m_t << "{\\itshape "; else m_t << "}";
+ if (s.enable()) m_t << "{\\itshape "; else m_t << "}";
break;
case DocStyleChange::Preformatted:
- if (s->enable())
+ if (s.enable())
{
m_t << "\n\\begin{DoxyPre}";
m_insidePre=TRUE;
case DocStyleChange::Div: /* HTML only */ break;
case DocStyleChange::Span: /* HTML only */ break;
case DocStyleChange::Details: /* emulation of the <details> tag */
- if (!s->enable()) m_t << "\n\n";
+ if (!s.enable()) m_t << "\n\n";
break;
case DocStyleChange::Summary: /* emulation of the <summary> tag inside a <details> tag */
- if (s->enable()) m_t << "{\\bfseries{"; else m_t << "}}";
+ if (s.enable()) m_t << "{\\bfseries{"; else m_t << "}}";
break;
}
}
-void LatexDocVisitor::visit(DocVerbatim *s)
+void LatexDocVisitor::operator()(const DocVerbatim &s)
{
if (m_hide) return;
QCString lang = m_langExt;
- if (!s->language().isEmpty()) // explicit language setting
+ if (!s.language().isEmpty()) // explicit language setting
{
- lang = s->language();
+ lang = s.language();
}
SrcLangExt langExt = getLanguageFromCodeLang(lang);
- switch(s->type())
+ switch(s.type())
{
case DocVerbatim::Code:
{
m_ci.startCodeFragment("DoxyCode");
- getCodeParser(lang).parseCode(m_ci,s->context(),s->text(),langExt,
- s->isExample(),s->exampleFile());
+ getCodeParser(lang).parseCode(m_ci,s.context(),s.text(),langExt,
+ s.isExample(),s.exampleFile());
m_ci.endCodeFragment("DoxyCode");
}
break;
case DocVerbatim::JavaDocLiteral:
- filter(s->text(), true);
+ filter(s.text(), true);
break;
case DocVerbatim::JavaDocCode:
m_t << "{\\ttfamily ";
- filter(s->text(), true);
+ filter(s.text(), true);
m_t << "}";
break;
case DocVerbatim::Verbatim:
m_t << "\\begin{DoxyVerb}";
- m_t << s->text();
+ m_t << s.text();
m_t << "\\end{DoxyVerb}\n";
break;
case DocVerbatim::HtmlOnly:
/* nothing */
break;
case DocVerbatim::LatexOnly:
- m_t << s->text();
+ m_t << s.text();
break;
case DocVerbatim::Dot:
{
}
else
{
- file.write( s->text().data(), s->text().length() );
+ file.write( s.text().data(), s.text().length() );
file.close();
- startDotFile(fileName,s->width(),s->height(),s->hasCaption(),s->srcFile(),s->srcLine());
- visitCaption(this, s->children());
- endDotFile(s->hasCaption());
+ startDotFile(fileName,s.width(),s.height(),s.hasCaption(),s.srcFile(),s.srcLine());
+ visitChildren(s);
+ endDotFile(s.hasCaption());
if (Config_getBool(DOT_CLEANUP)) Dir().remove(fileName.str());
}
else
{
QCString text = "msc {";
- text+=s->text();
+ text+=s.text();
text+="}";
file.write( text.data(), text.length() );
file.close();
{
QCString latexOutput = Config_getString(LATEX_OUTPUT);
QCString baseName = PlantumlManager::instance().writePlantUMLSource(
- latexOutput,s->exampleFile(),s->text(),
- s->useBitmap() ? PlantumlManager::PUML_BITMAP : PlantumlManager::PUML_EPS,
- s->engine(),s->srcFile(),s->srcLine());
+ latexOutput,s.exampleFile(),s.text(),
+ s.useBitmap() ? PlantumlManager::PUML_BITMAP : PlantumlManager::PUML_EPS,
+ s.engine(),s.srcFile(),s.srcLine());
writePlantUMLFile(baseName, s);
}
}
}
-void LatexDocVisitor::visit(DocAnchor *anc)
+void LatexDocVisitor::operator()(const DocAnchor &anc)
{
if (m_hide) return;
- m_t << "\\label{" << stripPath(anc->file()) << "_" << anc->anchor() << "}%\n";
- if (!anc->file().isEmpty() && Config_getBool(PDF_HYPERLINKS))
+ m_t << "\\label{" << stripPath(anc.file()) << "_" << anc.anchor() << "}%\n";
+ if (!anc.file().isEmpty() && Config_getBool(PDF_HYPERLINKS))
{
- m_t << "\\Hypertarget{" << stripPath(anc->file()) << "_" << anc->anchor()
+ m_t << "\\Hypertarget{" << stripPath(anc.file()) << "_" << anc.anchor()
<< "}%\n";
}
}
-void LatexDocVisitor::visit(DocInclude *inc)
+void LatexDocVisitor::operator()(const DocInclude &inc)
{
if (m_hide) return;
- SrcLangExt langExt = getLanguageFromFileName(inc->extension());
- switch(inc->type())
+ SrcLangExt langExt = getLanguageFromFileName(inc.extension());
+ switch(inc.type())
{
case DocInclude::IncWithLines:
{
m_ci.startCodeFragment("DoxyCodeInclude");
- FileInfo cfi( inc->file().str() );
+ FileInfo cfi( inc.file().str() );
FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
- getCodeParser(inc->extension()).parseCode(m_ci,inc->context(),
- inc->text(),
+ getCodeParser(inc.extension()).parseCode(m_ci,inc.context(),
+ inc.text(),
langExt,
- inc->isExample(),
- inc->exampleFile(),
+ inc.isExample(),
+ inc.exampleFile(),
fd, // fileDef,
-1, // start line
-1, // end line
case DocInclude::Include:
{
m_ci.startCodeFragment("DoxyCodeInclude");
- getCodeParser(inc->extension()).parseCode(m_ci,inc->context(),
- inc->text(),langExt,inc->isExample(),
- inc->exampleFile(),
+ getCodeParser(inc.extension()).parseCode(m_ci,inc.context(),
+ inc.text(),langExt,inc.isExample(),
+ inc.exampleFile(),
0, // fileDef
-1, // startLine
-1, // endLine
case DocInclude::DocbookInclude:
break;
case DocInclude::LatexInclude:
- m_t << inc->text();
+ m_t << inc.text();
break;
case DocInclude::VerbInclude:
m_t << "\n\\begin{DoxyVerbInclude}\n";
- m_t << inc->text();
+ m_t << inc.text();
m_t << "\\end{DoxyVerbInclude}\n";
break;
case DocInclude::Snippet:
{
m_ci.startCodeFragment("DoxyCodeInclude");
- getCodeParser(inc->extension()).parseCode(m_ci,
- inc->context(),
- extractBlock(inc->text(),inc->blockId()),
+ getCodeParser(inc.extension()).parseCode(m_ci,
+ inc.context(),
+ extractBlock(inc.text(),inc.blockId()),
langExt,
- inc->isExample(),
- inc->exampleFile()
+ inc.isExample(),
+ inc.exampleFile()
);
m_ci.endCodeFragment("DoxyCodeInclude");
}
break;
case DocInclude::SnipWithLines:
{
- FileInfo cfi( inc->file().str() );
+ FileInfo cfi( inc.file().str() );
FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
m_ci.startCodeFragment("DoxyCodeInclude");
- getCodeParser(inc->extension()).parseCode(m_ci,
- inc->context(),
- extractBlock(inc->text(),inc->blockId()),
+ getCodeParser(inc.extension()).parseCode(m_ci,
+ inc.context(),
+ extractBlock(inc.text(),inc.blockId()),
langExt,
- inc->isExample(),
- inc->exampleFile(),
+ inc.isExample(),
+ inc.exampleFile(),
fd,
- lineBlock(inc->text(),inc->blockId()),
+ lineBlock(inc.text(),inc.blockId()),
-1, // endLine
FALSE, // inlineFragment
0, // memberDef
}
}
-void LatexDocVisitor::visit(DocIncOperator *op)
+void LatexDocVisitor::operator()(const DocIncOperator &op)
{
//printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
- // op->type(),op->isFirst(),op->isLast(),qPrint(op->text()));
- if (op->isFirst())
+ // op.type(),op.isFirst(),op.isLast(),qPrint(op.text()));
+ if (op.isFirst())
{
if (!m_hide) m_ci.startCodeFragment("DoxyCodeInclude");
pushHidden(m_hide);
m_hide = TRUE;
}
- QCString locLangExt = getFileNameExtension(op->includeFileName());
+ QCString locLangExt = getFileNameExtension(op.includeFileName());
if (locLangExt.isEmpty()) locLangExt = m_langExt;
SrcLangExt langExt = getLanguageFromFileName(locLangExt);
- if (op->type()!=DocIncOperator::Skip)
+ if (op.type()!=DocIncOperator::Skip)
{
m_hide = popHidden();
if (!m_hide)
{
FileDef *fd = 0;
- if (!op->includeFileName().isEmpty())
+ if (!op.includeFileName().isEmpty())
{
- FileInfo cfi( op->includeFileName().str() );
+ FileInfo cfi( op.includeFileName().str() );
fd = createFileDef( cfi.dirPath(), cfi.fileName() );
}
- getCodeParser(locLangExt).parseCode(m_ci,op->context(),op->text(),langExt,
- op->isExample(),op->exampleFile(),
+ getCodeParser(locLangExt).parseCode(m_ci,op.context(),op.text(),langExt,
+ op.isExample(),op.exampleFile(),
fd, // fileDef
- op->line(), // startLine
+ op.line(), // startLine
-1, // endLine
FALSE, // inline fragment
0, // memberDef
- op->showLineNo() // show line numbers
+ op.showLineNo() // show line numbers
);
if (fd) delete fd;
}
pushHidden(m_hide);
m_hide=TRUE;
}
- if (op->isLast())
+ if (op.isLast())
{
m_hide=popHidden();
if (!m_hide) m_ci.endCodeFragment("DoxyCodeInclude");
}
}
-void LatexDocVisitor::visit(DocFormula *f)
+void LatexDocVisitor::operator()(const DocFormula &f)
{
if (m_hide) return;
- QCString s = f->text();
+ QCString s = f.text();
const char *p = s.data();
char c;
if (p)
}
}
-void LatexDocVisitor::visit(DocIndexEntry *i)
+void LatexDocVisitor::operator()(const DocIndexEntry &i)
{
if (m_hide) return;
m_t << "\\index{";
- m_t << latexEscapeLabelName(i->entry());
+ m_t << latexEscapeLabelName(i.entry());
m_t << "@{";
- m_t << latexEscapeIndexChars(i->entry());
+ m_t << latexEscapeIndexChars(i.entry());
m_t << "}}";
}
-void LatexDocVisitor::visit(DocSimpleSectSep *)
+void LatexDocVisitor::operator()(const DocSimpleSectSep &)
{
}
-void LatexDocVisitor::visit(DocCite *cite)
+void LatexDocVisitor::operator()(const DocCite &cite)
{
if (m_hide) return;
- if (!cite->file().isEmpty())
+ if (!cite.file().isEmpty())
{
- //startLink(cite->ref(),cite->file(),cite->anchor());
- QCString anchor = cite->anchor();
+ //startLink(cite.ref(),cite.file(),cite.anchor());
+ QCString anchor = cite.anchor();
QCString anchorPrefix = CitationManager::instance().anchorPrefix();
anchor = anchor.mid(anchorPrefix.length()); // strip prefix
m_t << "\\cite{" << anchor << "}";
else
{
m_t << "{\\bfseries [";
- filter(cite->text());
+ filter(cite.text());
m_t << "]}";
}
}
// visitor functions for compound nodes
//--------------------------------------
-void LatexDocVisitor::visitPre(DocAutoList *l)
+void LatexDocVisitor::operator()(const DocAutoList &l)
{
if (m_hide) return;
if (m_indentLevel>=maxIndentLevels-1) return;
- if (l->isEnumList())
+ if (l.isEnumList())
{
m_t << "\n\\begin{DoxyEnumerate}";
m_listItemInfo[indentLevel()].isEnum = true;
m_listItemInfo[indentLevel()].isEnum = false;
m_t << "\n\\begin{DoxyItemize}";
}
-}
-
-void LatexDocVisitor::visitPost(DocAutoList *l)
-{
- if (m_hide) return;
- if (m_indentLevel>=maxIndentLevels-1) return;
- if (l->isEnumList())
+ visitChildren(l);
+ if (l.isEnumList())
{
m_t << "\n\\end{DoxyEnumerate}";
}
}
}
-void LatexDocVisitor::visitPre(DocAutoListItem *)
+void LatexDocVisitor::operator()(const DocAutoListItem &li)
{
if (m_hide) return;
m_t << "\n\\item ";
incIndentLevel();
-}
-
-void LatexDocVisitor::visitPost(DocAutoListItem *)
-{
+ visitChildren(li);
decIndentLevel();
}
-void LatexDocVisitor::visitPre(DocPara *)
-{
-}
-
-void LatexDocVisitor::visitPost(DocPara *p)
+void LatexDocVisitor::operator()(const DocPara &p)
{
if (m_hide) return;
- if (!p->isLast() && // omit <p> for last paragraph
- !(p->parent() && // and for parameter sections
- p->parent()->kind()==DocNode::Kind_ParamSect
+ visitChildren(p);
+ if (!p.isLast() && // omit <p> for last paragraph
+ !(p.parent() && // and for parameter sections
+ std::get_if<DocParamSect>(p.parent())
)
) m_t << "\n\n";
}
-void LatexDocVisitor::visitPre(DocRoot *r)
-{
- //if (r->indent()) incIndentLevel();
-}
-
-void LatexDocVisitor::visitPost(DocRoot *r)
+void LatexDocVisitor::operator()(const DocRoot &r)
{
- //if (r->indent()) decIndentLevel();
+ visitChildren(r);
}
-void LatexDocVisitor::visitPre(DocSimpleSect *s)
+void LatexDocVisitor::operator()(const DocSimpleSect &s)
{
if (m_hide) return;
- switch(s->type())
+ switch(s.type())
{
case DocSimpleSect::See:
m_t << "\\begin{DoxySeeAlso}{";
case DocSimpleSect::Unknown: break;
}
- // special case 1: user defined title
- if (s->type()!=DocSimpleSect::User && s->type()!=DocSimpleSect::Rcs)
- {
- incIndentLevel();
- m_t << "}\n";
- }
- else
+ if (s.title())
{
m_insideItem=TRUE;
+ std::visit(*this,*s.title());
+ m_insideItem=FALSE;
}
-}
-
-void LatexDocVisitor::visitPost(DocSimpleSect *s)
-{
- if (m_hide) return;
- switch(s->type())
+ m_t << "}\n";
+ incIndentLevel();
+ visitChildren(s);
+ switch(s.type())
{
case DocSimpleSect::See:
m_t << "\n\\end{DoxySeeAlso}\n";
decIndentLevel();
}
-void LatexDocVisitor::visitPre(DocTitle *)
-{
-}
-
-void LatexDocVisitor::visitPost(DocTitle *)
+void LatexDocVisitor::operator()(const DocTitle &t)
{
if (m_hide) return;
- m_insideItem=FALSE;
- m_t << "}\n";
+ visitChildren(t);
}
-void LatexDocVisitor::visitPre(DocSimpleList *)
+void LatexDocVisitor::operator()(const DocSimpleList &l)
{
if (m_hide) return;
m_t << "\\begin{DoxyItemize}\n";
m_listItemInfo[indentLevel()].isEnum = false;
-}
-
-void LatexDocVisitor::visitPost(DocSimpleList *)
-{
- if (m_hide) return;
+ visitChildren(l);
m_t << "\\end{DoxyItemize}\n";
}
-void LatexDocVisitor::visitPre(DocSimpleListItem *)
+void LatexDocVisitor::operator()(const DocSimpleListItem &li)
{
if (m_hide) return;
m_t << "\\item ";
incIndentLevel();
-}
-
-void LatexDocVisitor::visitPost(DocSimpleListItem *)
-{
+ if (li.paragraph())
+ {
+ visit(*this,*li.paragraph());
+ }
decIndentLevel();
}
-void LatexDocVisitor::visitPre(DocSection *s)
+void LatexDocVisitor::operator()(const DocSection &s)
{
if (m_hide) return;
if (Config_getBool(PDF_HYPERLINKS))
{
- m_t << "\\hypertarget{" << stripPath(s->file()) << "_" << s->anchor() << "}{}";
+ m_t << "\\hypertarget{" << stripPath(s.file()) << "_" << s.anchor() << "}{}";
}
- m_t << "\\" << getSectionName(s->level()) << "{";
- filter(convertCharEntitiesToUTF8(s->title()));
- m_t << "}\\label{" << stripPath(s->file()) << "_" << s->anchor() << "}\n";
-}
-
-void LatexDocVisitor::visitPost(DocSection *)
-{
+ m_t << "\\" << getSectionName(s.level()) << "{";
+ filter(convertCharEntitiesToUTF8(s.title()));
+ m_t << "}\\label{" << stripPath(s.file()) << "_" << s.anchor() << "}\n";
+ visitChildren(s);
}
-void LatexDocVisitor::visitPre(DocHtmlList *s)
+void LatexDocVisitor::operator()(const DocHtmlList &s)
{
if (m_hide) return;
if (m_indentLevel>=maxIndentLevels-1) return;
- m_listItemInfo[indentLevel()].isEnum = s->type()==DocHtmlList::Ordered;
- if (s->type()==DocHtmlList::Ordered)
+ m_listItemInfo[indentLevel()].isEnum = s.type()==DocHtmlList::Ordered;
+ if (s.type()==DocHtmlList::Ordered)
{
bool first = true;
m_t << "\n\\begin{DoxyEnumerate}";
- for (const auto &opt : s->attribs())
+ for (const auto &opt : s.attribs())
{
if (opt.name=="type")
{
if (!first) m_t << "]\n";
}
else
+ {
m_t << "\n\\begin{DoxyItemize}";
-}
-
-void LatexDocVisitor::visitPost(DocHtmlList *s)
-{
- if (m_hide) return;
+ }
+ visitChildren(s);
if (m_indentLevel>=maxIndentLevels-1) return;
- if (s->type()==DocHtmlList::Ordered)
+ if (s.type()==DocHtmlList::Ordered)
m_t << "\n\\end{DoxyEnumerate}";
else
m_t << "\n\\end{DoxyItemize}";
}
-void LatexDocVisitor::visitPre(DocHtmlListItem *l)
+void LatexDocVisitor::operator()(const DocHtmlListItem &l)
{
if (m_hide) return;
if (m_listItemInfo[indentLevel()].isEnum)
{
- for (const auto &opt : l->attribs())
+ for (const auto &opt : l.attribs())
{
if (opt.name=="value")
{
}
m_t << "\n\\item ";
incIndentLevel();
-}
-
-void LatexDocVisitor::visitPost(DocHtmlListItem *)
-{
+ visitChildren(l);
decIndentLevel();
}
-//void LatexDocVisitor::visitPre(DocHtmlPre *)
-//{
-// m_t << "\\small\\begin{alltt}";
-// m_insidePre=TRUE;
-//}
-//void LatexDocVisitor::visitPost(DocHtmlPre *)
-//{
-// m_insidePre=FALSE;
-// m_t << "\\end{alltt}\\normalsize \n";
-//}
-
-
-static bool classEqualsReflist(const DocNode *n)
+static bool classEqualsReflist(const DocHtmlDescList &dl)
{
- if (n->kind()==DocNode::Kind_HtmlDescList)
- {
- HtmlAttribList attrs = ((DocHtmlDescList *)n)->attribs();
- auto it = std::find_if(attrs.begin(),attrs.end(),
- [](const auto &att) { return att.name=="class"; });
- if (it!=attrs.end() && it->value == "reflist") return true;
- }
+ HtmlAttribList attrs = dl.attribs();
+ auto it = std::find_if(attrs.begin(),attrs.end(),
+ [](const auto &att) { return att.name=="class"; });
+ if (it!=attrs.end() && it->value == "reflist") return true;
return false;
}
-
-static bool listIsNested(const DocNode *n)
+static bool listIsNested(const DocHtmlDescList &dl)
{
bool isNested=false;
- if (n)
- {
- if (classEqualsReflist(n)) return false;
- n = n->parent();
- }
+ const DocNodeVariant *n = dl.parent();
while (n && !isNested)
{
- if (n->kind()==DocNode::Kind_HtmlDescList)
+ if (std::get_if<DocHtmlDescList>(n))
{
- isNested = !classEqualsReflist(n);
+ isNested = !classEqualsReflist(std::get<DocHtmlDescList>(*n));
}
- n = n->parent();
+ n = ::parent(n);
}
return isNested;
}
-void LatexDocVisitor::visitPre(DocHtmlDescList *dl)
+void LatexDocVisitor::operator()(const DocHtmlDescList &dl)
{
if (m_hide) return;
- if (classEqualsReflist(dl))
+ bool eq = classEqualsReflist(dl);
+ if (eq)
{
m_t << "\n\\begin{DoxyRefList}";
}
if (listIsNested(dl)) m_t << "\n\\hfill";
m_t << "\n\\begin{DoxyDescription}";
}
-}
-
-void LatexDocVisitor::visitPost(DocHtmlDescList *dl)
-{
- if (m_hide) return;
- if (classEqualsReflist(dl))
+ visitChildren(dl);
+ if (eq)
{
m_t << "\n\\end{DoxyRefList}";
}
}
}
-void LatexDocVisitor::visitPre(DocHtmlDescTitle *)
+void LatexDocVisitor::operator()(const DocHtmlDescTitle &dt)
{
if (m_hide) return;
m_t << "\n\\item[";
m_insideItem=TRUE;
-}
-
-void LatexDocVisitor::visitPost(DocHtmlDescTitle *)
-{
- if (m_hide) return;
+ visitChildren(dt);
m_insideItem=FALSE;
m_t << "]";
}
-void LatexDocVisitor::visitPre(DocHtmlDescData *)
+void LatexDocVisitor::operator()(const DocHtmlDescData &dd)
{
incIndentLevel();
-}
-
-void LatexDocVisitor::visitPost(DocHtmlDescData *)
-{
+ visitChildren(dd);
decIndentLevel();
}
-static bool tableIsNested(const DocNode *n)
+static bool tableIsNested(const DocNodeVariant *n)
{
bool isNested=FALSE;
while (n && !isNested)
{
- isNested = n->kind()==DocNode::Kind_HtmlTable || n->kind()==DocNode::Kind_ParamSect;
- n = n->parent();
+ isNested = holds_one_of_alternatives<DocHtmlTable,DocParamSect>(*n);
+ n = ::parent(n);
}
return isNested;
}
-static void writeStartTableCommand(TextStream &t,const DocNode *n,int cols)
+static void writeStartTableCommand(TextStream &t,const DocNodeVariant *n,size_t cols)
{
if (tableIsNested(n))
{
//return isNested ? "TabularNC" : "TabularC";
}
-static void writeEndTableCommand(TextStream &t,const DocNode *n)
+static void writeEndTableCommand(TextStream &t,const DocNodeVariant *n)
{
if (tableIsNested(n))
{
//return isNested ? "TabularNC" : "TabularC";
}
-void LatexDocVisitor::visitPre(DocHtmlTable *t)
+void LatexDocVisitor::operator()(const DocHtmlTable &t)
{
if (m_hide) return;
pushTableState();
- if (t->hasCaption())
+ const DocHtmlCaption *c = t.caption() ? &std::get<DocHtmlCaption>(*t.caption()) : nullptr;
+ if (c)
{
- DocHtmlCaption *c = t->caption();
- static bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
+ bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
if (!c->file().isEmpty() && pdfHyperLinks)
{
m_t << "\\hypertarget{" << stripPath(c->file()) << "_" << c->anchor()
m_t << "\n";
}
- writeStartTableCommand(m_t,t->parent(),(uint)t->numColumns());
+ writeStartTableCommand(m_t,t.parent(),t.numColumns());
- if (t->hasCaption())
+ if (c)
{
- DocHtmlCaption *c = t->caption();
m_t << "\\caption{";
- visitCaption(this, c->children());
+ std::visit(*this, *t.caption());
m_t << "}";
m_t << "\\label{" << stripPath(c->file()) << "_" << c->anchor() << "}";
m_t << "\\\\\n";
}
- setNumCols((uint)t->numColumns());
+ setNumCols(t.numColumns());
m_t << "\\hline\n";
// check if first row is a heading and then render the row already here
// and end it with \endfirsthead (triggered via m_firstRow==TRUE)
// then repeat the row as normal and end it with \endhead (m_firstRow==FALSE)
- DocHtmlRow *firstRow = t->firstRow();
+ const DocHtmlRow *firstRow = std::get_if<DocHtmlRow>(t.firstRow());
if (firstRow && firstRow->isHeading())
{
setFirstRow(TRUE);
- DocNode *n = t->parent();
- if (!tableIsNested(n)) firstRow->accept(this);
+ if (!tableIsNested(t.parent()))
+ {
+ std::visit(*this,*t.firstRow());
+ }
setFirstRow(FALSE);
}
-}
-
-void LatexDocVisitor::visitPost(DocHtmlTable *t)
-{
- if (m_hide) return;
- writeEndTableCommand(m_t,t->parent());
+ visitChildren(t);
+ writeEndTableCommand(m_t,t.parent());
popTableState();
}
-void LatexDocVisitor::visitPre(DocHtmlCaption *c)
-{
- m_hideCaption = m_hide;
- m_hide = TRUE;
-}
-
-void LatexDocVisitor::visitPost(DocHtmlCaption *c)
+void LatexDocVisitor::operator()(const DocHtmlCaption &c)
{
- m_hide = m_hideCaption;
-}
-
-void LatexDocVisitor::visitPre(DocHtmlRow *r)
-{
- setCurrentColumn(0);
+ if (m_hide) return;
+ visitChildren(c);
}
-void LatexDocVisitor::visitPost(DocHtmlRow *row)
+void LatexDocVisitor::operator()(const DocHtmlRow &row)
{
if (m_hide) return;
+ setCurrentColumn(0);
- DocNode *n = row->parent() ->parent();
+ visitChildren(row);
- int c=currentColumn();
+ size_t c=currentColumn();
while (c<=numCols()) // end of row while inside a row span?
{
for (const auto &span : rowSpans())
{
//printf(" found row span: column=%d rs=%d cs=%d rowIdx=%d cell->rowIdx=%d i=%d c=%d\n",
- // span->column, span->rowSpan,span->colSpan,row->rowIndex(),span->cell->rowIndex(),i,c);
+ // span->column, span->rowSpan,span->colSpan,row.rowIndex(),span->cell->rowIndex(),i,c);
if (span.rowSpan>0 && span.column==c && // we are at a cell in a row span
- row->rowIndex()>span.cell->rowIndex() // but not the row that started the span
+ row.rowIndex()>span.cell.rowIndex() // but not the row that started the span
)
{
m_t << "&";
m_t << "\\\\";
- int col = 1;
+ size_t col = 1;
for (auto &span : rowSpans())
{
if (span.rowSpan>0) span.rowSpan--;
m_t << "\n";
-
- if (row->isHeading() && row->rowIndex()==1 && !tableIsNested(n))
+ const DocNodeVariant *n = ::parent(row.parent());
+ if (row.isHeading() && row.rowIndex()==1 && !tableIsNested(n))
{
if (firstRow())
{
}
}
-void LatexDocVisitor::visitPre(DocHtmlCell *c)
+void LatexDocVisitor::operator()(const DocHtmlCell &c)
{
if (m_hide) return;
- DocHtmlRow *row = 0;
- if (c->parent() && c->parent()->kind()==DocNode::Kind_HtmlRow)
- {
- row = (DocHtmlRow*)c->parent();
- }
+ const DocHtmlRow *row = std::get_if<DocHtmlRow>(c.parent());
setCurrentColumn(currentColumn()+1);
if (row && span.colSpan>1)
{
m_t << "\\multicolumn{" << span.colSpan << "}{";
- if (currentColumn() /*c->columnIndex()*/==1) // add extra | for first column
+ if (currentColumn() /*c.columnIndex()*/==1) // add extra | for first column
{
m_t << "|";
}
- m_t << "l|}{" << (c->isHeading()? "\\columncolor{\\tableheadbgcolor}" : "") << "}"; // alignment not relevant, empty column
+ m_t << "l|}{" << (c.isHeading()? "\\columncolor{\\tableheadbgcolor}" : "") << "}"; // alignment not relevant, empty column
setCurrentColumn(currentColumn()+span.colSpan);
}
else
}
}
- int cs = c->colSpan();
- int a = c->alignment();
+ int cs = c.colSpan();
+ int a = c.alignment();
if (cs>1 && row)
{
setInColSpan(TRUE);
m_t << "\\multicolumn{" << cs << "}{";
- if (c->columnIndex()==1) // add extra | for first column
+ if (c.columnIndex()==1) // add extra | for first column
{
m_t << "|";
}
break;
}
}
- int rs = c->rowSpan();
- int va = c->valignment();
+ int rs = c.rowSpan();
+ int va = c.valignment();
if (rs>0)
{
setInRowSpan(TRUE);
break;
}
//printf("adding row span: cell={r=%d c=%d rs=%d cs=%d} curCol=%d\n",
- // c->rowIndex(),c->columnIndex(),c->rowSpan(),c->colSpan(),
+ // c.rowIndex(),c.columnIndex(),c.rowSpan(),c.colSpan(),
// currentColumn());
addRowSpan(ActiveRowSpan(c,rs,cs,currentColumn()));
m_t << "{" << rs << "}{*}{";
{
m_t << "\\PBS\\raggedleft ";
}
- if (c->isHeading())
+ if (c.isHeading())
{
m_t << "\\cellcolor{\\tableheadbgcolor}\\textbf{ ";
}
{
setCurrentColumn(currentColumn()+cs-1);
}
-}
-void LatexDocVisitor::visitPost(DocHtmlCell *c)
-{
- if (m_hide) return;
- if (c->isHeading())
+ visitChildren(c);
+
+ if (c.isHeading())
{
m_t << "}";
}
setInColSpan(FALSE);
m_t << "}";
}
- if (!c->isLast()) m_t << "&";
-}
-
-void LatexDocVisitor::visitPre(DocInternal *)
-{
- if (m_hide) return;
- //m_t << "\\begin{DoxyInternal}{";
- //filter(theTranslator->trForInternalUseOnly());
- //m_t << "}\n";
+ if (!c.isLast()) m_t << "&";
}
-void LatexDocVisitor::visitPost(DocInternal *)
+void LatexDocVisitor::operator()(const DocInternal &i)
{
if (m_hide) return;
- //m_t << "\\end{DoxyInternal}\n";
+ visitChildren(i);
}
-void LatexDocVisitor::visitPre(DocHRef *href)
+void LatexDocVisitor::operator()(const DocHRef &href)
{
if (m_hide) return;
if (Config_getBool(PDF_HYPERLINKS))
{
m_t << "\\href{";
- m_t << latexFilterURL(href->url());
+ m_t << latexFilterURL(href.url());
m_t << "}";
}
m_t << "{\\texttt{ ";
-}
-
-void LatexDocVisitor::visitPost(DocHRef *)
-{
- if (m_hide) return;
+ visitChildren(href);
m_t << "}}";
}
-void LatexDocVisitor::visitPre(DocHtmlHeader *header)
-{
- if (m_hide) return;
- m_t << "\\" << getSectionName(header->level()) << "*{";
-}
-
-void LatexDocVisitor::visitPost(DocHtmlHeader *)
+void LatexDocVisitor::operator()(const DocHtmlHeader &header)
{
if (m_hide) return;
+ m_t << "\\" << getSectionName(header.level()) << "*{";
+ visitChildren(header);
m_t << "}";
}
-void LatexDocVisitor::visitPre(DocImage *img)
+
+void LatexDocVisitor::operator()(const DocImage &img)
{
- if (img->type()==DocImage::Latex)
+ if (img.type()==DocImage::Latex)
{
if (m_hide) return;
- QCString gfxName = img->name();
+ QCString gfxName = img.name();
if (gfxName.right(4)==".eps" || gfxName.right(4)==".pdf")
{
gfxName=gfxName.left(gfxName.length()-4);
}
- visitPreStart(m_t,img->hasCaption(), gfxName, img->width(), img->height(), img->isInlineImage());
+ visitPreStart(m_t,img.hasCaption(), gfxName, img.width(), img.height(), img.isInlineImage());
+ visitChildren(img);
+ visitPostEnd(m_t,img.hasCaption(), img.isInlineImage());
}
else // other format -> skip
{
- pushHidden(m_hide);
- m_hide=TRUE;
}
}
-void LatexDocVisitor::visitPost(DocImage *img)
-{
- if (img->type()==DocImage::Latex)
- {
- if (m_hide) return;
- visitPostEnd(m_t,img->hasCaption(), img->isInlineImage());
- }
- else // other format
- {
- m_hide = popHidden();
- }
-}
-
-void LatexDocVisitor::visitPre(DocDotFile *df)
+void LatexDocVisitor::operator()(const DocDotFile &df)
{
if (m_hide) return;
- if (!Config_getBool(DOT_CLEANUP)) copyFile(df->file(),Config_getString(LATEX_OUTPUT)+"/"+stripPath(df->file()));
- startDotFile(df->file(),df->width(),df->height(),df->hasCaption(),df->srcFile(),df->srcLine());
+ if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(LATEX_OUTPUT)+"/"+stripPath(df.file()));
+ startDotFile(df.file(),df.width(),df.height(),df.hasCaption(),df.srcFile(),df.srcLine());
+ visitChildren(df);
+ endDotFile(df.hasCaption());
}
-void LatexDocVisitor::visitPost(DocDotFile *df)
+void LatexDocVisitor::operator()(const DocMscFile &df)
{
if (m_hide) return;
- endDotFile(df->hasCaption());
-}
-void LatexDocVisitor::visitPre(DocMscFile *df)
-{
- if (m_hide) return;
- if (!Config_getBool(DOT_CLEANUP)) copyFile(df->file(),Config_getString(LATEX_OUTPUT)+"/"+stripPath(df->file()));
- startMscFile(df->file(),df->width(),df->height(),df->hasCaption(),df->srcFile(),df->srcLine());
+ if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(LATEX_OUTPUT)+"/"+stripPath(df.file()));
+ startMscFile(df.file(),df.width(),df.height(),df.hasCaption(),df.srcFile(),df.srcLine());
+ visitChildren(df);
+ endMscFile(df.hasCaption());
}
-void LatexDocVisitor::visitPost(DocMscFile *df)
+void LatexDocVisitor::operator()(const DocDiaFile &df)
{
if (m_hide) return;
- endMscFile(df->hasCaption());
+ if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(LATEX_OUTPUT)+"/"+stripPath(df.file()));
+ startDiaFile(df.file(),df.width(),df.height(),df.hasCaption(),df.srcFile(),df.srcLine());
+ visitChildren(df);
+ endDiaFile(df.hasCaption());
}
-void LatexDocVisitor::visitPre(DocDiaFile *df)
+void LatexDocVisitor::operator()(const DocLink &lnk)
{
if (m_hide) return;
- if (!Config_getBool(DOT_CLEANUP)) copyFile(df->file(),Config_getString(LATEX_OUTPUT)+"/"+stripPath(df->file()));
- startDiaFile(df->file(),df->width(),df->height(),df->hasCaption(),df->srcFile(),df->srcLine());
+ startLink(lnk.ref(),lnk.file(),lnk.anchor());
+ visitChildren(lnk);
+ endLink(lnk.ref(),lnk.file(),lnk.anchor());
}
-void LatexDocVisitor::visitPost(DocDiaFile *df)
-{
- if (m_hide) return;
- endDiaFile(df->hasCaption());
-}
-void LatexDocVisitor::visitPre(DocLink *lnk)
+void LatexDocVisitor::operator()(const DocRef &ref)
{
if (m_hide) return;
- startLink(lnk->ref(),lnk->file(),lnk->anchor());
-}
-
-void LatexDocVisitor::visitPost(DocLink *lnk)
-{
- if (m_hide) return;
- endLink(lnk->ref(),lnk->file(),lnk->anchor());
-}
-
-void LatexDocVisitor::visitPre(DocRef *ref)
-{
- if (m_hide) return;
- // when ref->isSubPage()==TRUE we use ref->file() for HTML and
- // ref->anchor() for LaTeX/RTF
- if (ref->isSubPage())
+ // when ref.isSubPage()==TRUE we use ref.file() for HTML and
+ // ref.anchor() for LaTeX/RTF
+ if (ref.isSubPage())
{
- startLink(ref->ref(),QCString(),ref->anchor());
+ startLink(ref.ref(),QCString(),ref.anchor());
}
else
{
- if (!ref->file().isEmpty()) startLink(ref->ref(),ref->file(),ref->anchor(),ref->refToTable());
+ if (!ref.file().isEmpty()) startLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable());
}
- if (!ref->hasLinkText()) filter(ref->targetTitle());
-}
-
-void LatexDocVisitor::visitPost(DocRef *ref)
-{
- if (m_hide) return;
- if (ref->isSubPage())
+ if (!ref.hasLinkText())
{
- endLink(ref->ref(),QCString(),ref->anchor());
+ filter(ref.targetTitle());
+ }
+ visitChildren(ref);
+ if (ref.isSubPage())
+ {
+ endLink(ref.ref(),QCString(),ref.anchor());
}
else
{
- if (!ref->file().isEmpty()) endLink(ref->ref(),ref->file(),ref->anchor(),ref->refToTable());
+ if (!ref.file().isEmpty()) endLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable());
}
}
-void LatexDocVisitor::visitPre(DocSecRefItem *ref)
+void LatexDocVisitor::operator()(const DocSecRefItem &ref)
{
if (m_hide) return;
m_t << "\\item \\contentsline{section}{";
- if (ref->isSubPage())
+ if (ref.isSubPage())
{
- startLink(ref->ref(),QCString(),ref->anchor());
+ startLink(ref.ref(),QCString(),ref.anchor());
}
else
{
- if (!ref->file().isEmpty())
+ if (!ref.file().isEmpty())
{
- startLink(ref->ref(),ref->file(),ref->anchor(),ref->refToTable());
+ startLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable());
}
}
-}
-
-void LatexDocVisitor::visitPost(DocSecRefItem *ref)
-{
- if (m_hide) return;
- if (ref->isSubPage())
+ visitChildren(ref);
+ if (ref.isSubPage())
{
- endLink(ref->ref(),QCString(),ref->anchor());
+ endLink(ref.ref(),QCString(),ref.anchor());
}
else
{
- if (!ref->file().isEmpty()) endLink(ref->ref(),ref->file(),ref->anchor(),ref->refToTable());
+ if (!ref.file().isEmpty()) endLink(ref.ref(),ref.file(),ref.anchor(),ref.refToTable());
}
m_t << "}{\\ref{";
- if (!ref->file().isEmpty()) m_t << stripPath(ref->file());
- if (!ref->file().isEmpty() && !ref->anchor().isEmpty()) m_t << "_";
- if (!ref->anchor().isEmpty()) m_t << ref->anchor();
+ if (!ref.file().isEmpty()) m_t << stripPath(ref.file());
+ if (!ref.file().isEmpty() && !ref.anchor().isEmpty()) m_t << "_";
+ if (!ref.anchor().isEmpty()) m_t << ref.anchor();
m_t << "}}{}\n";
}
-void LatexDocVisitor::visitPre(DocSecRefList *)
+void LatexDocVisitor::operator()(const DocSecRefList &l)
{
if (m_hide) return;
m_t << "\\footnotesize\n";
m_t << "\\begin{multicols}{2}\n";
m_t << "\\begin{DoxyCompactList}\n";
incIndentLevel();
-}
-
-void LatexDocVisitor::visitPost(DocSecRefList *)
-{
- if (m_hide) return;
+ visitChildren(l);
decIndentLevel();
m_t << "\\end{DoxyCompactList}\n";
m_t << "\\end{multicols}\n";
m_t << "\\normalsize\n";
}
-void LatexDocVisitor::visitPre(DocParamSect *s)
+void LatexDocVisitor::operator()(const DocParamSect &s)
{
if (m_hide) return;
- bool hasInOutSpecs = s->hasInOutSpecifier();
- bool hasTypeSpecs = s->hasTypeSpecifier();
+ bool hasInOutSpecs = s.hasInOutSpecifier();
+ bool hasTypeSpecs = s.hasTypeSpecifier();
m_ci.incUsedTableLevel();
- switch(s->type())
+ switch(s.type())
{
case DocParamSect::Param:
m_t << "\n\\begin{DoxyParams}";
incIndentLevel();
}
m_t << "}\n";
-}
-
-void LatexDocVisitor::visitPost(DocParamSect *s)
-{
- if (m_hide) return;
+ visitChildren(s);
m_ci.decUsedTableLevel();
- switch(s->type())
+ switch(s.type())
{
case DocParamSect::Param:
m_t << "\\end{DoxyParams}\n";
}
}
-void LatexDocVisitor::visitPre(DocParamList *pl)
+void LatexDocVisitor::operator()(const DocSeparator &sep)
+{
+ m_t << " " << sep.chars() << " ";
+}
+
+void LatexDocVisitor::operator()(const DocParamList &pl)
{
if (m_hide) return;
DocParamSect::Type parentType = DocParamSect::Unknown;
- DocParamSect *sect = 0;
- if (pl->parent() && pl->parent()->kind()==DocNode::Kind_ParamSect)
+ const DocParamSect *sect = std::get_if<DocParamSect>(pl.parent());
+ if (sect)
{
- parentType = ((DocParamSect*)pl->parent())->type();
- sect=(DocParamSect*)pl->parent();
+ parentType = sect->type();
}
bool useTable = parentType==DocParamSect::Param ||
parentType==DocParamSect::RetVal ||
}
if (sect && sect->hasInOutSpecifier())
{
- if (pl->direction()!=DocParamSect::Unspecified)
+ if (pl.direction()!=DocParamSect::Unspecified)
{
m_t << "\\mbox{\\texttt{ ";
- if (pl->direction()==DocParamSect::In)
+ if (pl.direction()==DocParamSect::In)
{
m_t << "in";
}
- else if (pl->direction()==DocParamSect::Out)
+ else if (pl.direction()==DocParamSect::Out)
{
m_t << "out";
}
- else if (pl->direction()==DocParamSect::InOut)
+ else if (pl.direction()==DocParamSect::InOut)
{
m_t << "in,out";
}
}
if (sect && sect->hasTypeSpecifier())
{
- for (const auto &type : pl->paramTypes())
+ for (const auto &type : pl.paramTypes())
{
- if (type->kind()==DocNode::Kind_Word)
- {
- visit((DocWord*)type.get());
- }
- else if (type->kind()==DocNode::Kind_LinkedWord)
- {
- visit((DocLinkedWord*)type.get());
- }
- else if (type->kind()==DocNode::Kind_Sep)
- {
- m_t << " " << ((DocSeparator *)type.get())->chars() << " ";
- }
+ std::visit(*this,type);
}
if (useTable) m_t << " & ";
}
m_t << "{\\em ";
bool first=TRUE;
- for (const auto ¶m : pl->parameters())
+ for (const auto ¶m : pl.parameters())
{
if (!first) m_t << ","; else first=FALSE;
m_insideItem=TRUE;
- if (param->kind()==DocNode::Kind_Word)
- {
- visit((DocWord*)param.get());
- }
- else if (param->kind()==DocNode::Kind_LinkedWord)
- {
- visit((DocLinkedWord*)param.get());
- }
+ std::visit(*this,param);
m_insideItem=FALSE;
}
m_t << "}";
{
m_t << "]";
}
-}
-
-void LatexDocVisitor::visitPost(DocParamList *pl)
-{
- if (m_hide) return;
- DocParamSect::Type parentType = DocParamSect::Unknown;
- if (pl->parent() && pl->parent()->kind()==DocNode::Kind_ParamSect)
+ for (const auto &par : pl.paragraphs())
{
- parentType = ((DocParamSect*)pl->parent())->type();
+ std::visit(*this,par);
}
- bool useTable = parentType==DocParamSect::Param ||
- parentType==DocParamSect::RetVal ||
- parentType==DocParamSect::Exception ||
- parentType==DocParamSect::TemplateParam;
if (useTable)
{
m_t << "\\\\\n"
}
}
-void LatexDocVisitor::visitPre(DocXRefItem *x)
+void LatexDocVisitor::operator()(const DocXRefItem &x)
{
- static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
+ bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
if (m_hide) return;
- if (x->title().isEmpty()) return;
+ if (x.title().isEmpty()) return;
incIndentLevel();
m_t << "\\begin{DoxyRefDesc}{";
- filter(x->title());
+ filter(x.title());
m_t << "}\n";
- bool anonymousEnum = x->file()=="@";
+ bool anonymousEnum = x.file()=="@";
m_t << "\\item[";
if (pdfHyperlinks && !anonymousEnum)
{
- m_t << "\\mbox{\\hyperlink{" << stripPath(x->file()) << "_" << x->anchor() << "}{";
+ m_t << "\\mbox{\\hyperlink{" << stripPath(x.file()) << "_" << x.anchor() << "}{";
}
else
{
m_t << "\\textbf{ ";
}
m_insideItem=TRUE;
- filter(x->title());
+ filter(x.title());
m_insideItem=FALSE;
if (pdfHyperlinks && !anonymousEnum)
{
m_t << "}";
}
m_t << "}]";
-}
-
-void LatexDocVisitor::visitPost(DocXRefItem *x)
-{
- if (m_hide) return;
- if (x->title().isEmpty()) return;
+ visitChildren(x);
+ if (x.title().isEmpty()) return;
decIndentLevel();
m_t << "\\end{DoxyRefDesc}\n";
}
-void LatexDocVisitor::visitPre(DocInternalRef *ref)
+void LatexDocVisitor::operator()(const DocInternalRef &ref)
{
if (m_hide) return;
- startLink(QCString(),ref->file(),ref->anchor());
+ startLink(QCString(),ref.file(),ref.anchor());
+ visitChildren(ref);
+ endLink(QCString(),ref.file(),ref.anchor());
}
-void LatexDocVisitor::visitPost(DocInternalRef *ref)
+void LatexDocVisitor::operator()(const DocText &t)
{
if (m_hide) return;
- endLink(QCString(),ref->file(),ref->anchor());
-}
-
-void LatexDocVisitor::visitPre(DocText *)
-{
-}
-
-void LatexDocVisitor::visitPost(DocText *)
-{
+ visitChildren(t);
}
-void LatexDocVisitor::visitPre(DocHtmlBlockQuote *)
+void LatexDocVisitor::operator()(const DocHtmlBlockQuote &q)
{
if (m_hide) return;
m_t << "\\begin{quote}\n";
incIndentLevel();
-}
-
-void LatexDocVisitor::visitPost(DocHtmlBlockQuote *)
-{
- if (m_hide) return;
+ visitChildren(q);
m_t << "\\end{quote}\n";
decIndentLevel();
}
-void LatexDocVisitor::visitPre(DocVhdlFlow *)
-{
- if (m_hide) return;
-}
-
-void LatexDocVisitor::visitPost(DocVhdlFlow *)
-{
- if (m_hide) return;
-}
-
-void LatexDocVisitor::visitPre(DocParBlock *)
+void LatexDocVisitor::operator()(const DocVhdlFlow &)
{
- if (m_hide) return;
}
-void LatexDocVisitor::visitPost(DocParBlock *)
+void LatexDocVisitor::operator()(const DocParBlock &pb)
{
if (m_hide) return;
+ visitChildren(pb);
}
void LatexDocVisitor::filter(const QCString &str, const bool retainNewLine)
void LatexDocVisitor::startLink(const QCString &ref,const QCString &file,const QCString &anchor,bool refToTable)
{
- static bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
+ bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
if (ref.isEmpty() && pdfHyperLinks) // internal PDF link
{
if (refToTable)
void LatexDocVisitor::endLink(const QCString &ref,const QCString &file,const QCString &anchor,bool refToTable)
{
m_t << "}";
- static bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
+ bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
if (ref.isEmpty() && !pdfHyperLinks)
{
m_t << "{";
}
-void LatexDocVisitor::writeMscFile(const QCString &baseName, DocVerbatim *s)
+void LatexDocVisitor::writeMscFile(const QCString &baseName, const DocVerbatim &s)
{
QCString shortName = baseName;
int i;
shortName=shortName.right(shortName.length()-i-1);
}
QCString outDir = Config_getString(LATEX_OUTPUT);
- writeMscGraphFromFile(baseName+".msc",outDir,shortName,MSC_EPS,s->srcFile(),s->srcLine());
- visitPreStart(m_t, s->hasCaption(), shortName, s->width(),s->height());
- visitCaption(this, s->children());
- visitPostEnd(m_t, s->hasCaption());
+ writeMscGraphFromFile(baseName+".msc",outDir,shortName,MSC_EPS,s.srcFile(),s.srcLine());
+ visitPreStart(m_t, s.hasCaption(), shortName, s.width(),s.height());
+ visitCaption(s.children());
+ visitPostEnd(m_t, s.hasCaption());
}
}
-void LatexDocVisitor::writeDiaFile(const QCString &baseName, DocVerbatim *s)
+void LatexDocVisitor::writeDiaFile(const QCString &baseName, const DocVerbatim &s)
{
QCString shortName = baseName;
int i;
shortName=shortName.right(shortName.length()-i-1);
}
QCString outDir = Config_getString(LATEX_OUTPUT);
- writeDiaGraphFromFile(baseName+".dia",outDir,shortName,DIA_EPS,s->srcFile(),s->srcLine());
- visitPreStart(m_t, s->hasCaption(), shortName, s->width(), s->height());
- visitCaption(this, s->children());
- visitPostEnd(m_t, s->hasCaption());
+ writeDiaGraphFromFile(baseName+".dia",outDir,shortName,DIA_EPS,s.srcFile(),s.srcLine());
+ visitPreStart(m_t, s.hasCaption(), shortName, s.width(), s.height());
+ visitCaption(s.children());
+ visitPostEnd(m_t, s.hasCaption());
}
-void LatexDocVisitor::writePlantUMLFile(const QCString &baseName, DocVerbatim *s)
+void LatexDocVisitor::writePlantUMLFile(const QCString &baseName, const DocVerbatim &s)
{
QCString shortName = baseName;
int i;
{
shortName=shortName.right(shortName.length()-i-1);
}
- if (s->useBitmap())
+ if (s.useBitmap())
{
if (shortName.find('.')==-1) shortName += ".png";
}
QCString outDir = Config_getString(LATEX_OUTPUT);
PlantumlManager::instance().generatePlantUMLOutput(baseName,outDir,
- s->useBitmap() ? PlantumlManager::PUML_BITMAP : PlantumlManager::PUML_EPS);
- visitPreStart(m_t, s->hasCaption(), shortName, s->width(), s->height());
- visitCaption(this, s->children());
- visitPostEnd(m_t, s->hasCaption());
+ s.useBitmap() ? PlantumlManager::PUML_BITMAP : PlantumlManager::PUML_EPS);
+ visitPreStart(m_t, s.hasCaption(), shortName, s.width(), s.height());
+ visitCaption(s.children());
+ visitPostEnd(m_t, s.hasCaption());
}
int LatexDocVisitor::indentLevel() const
#include "qcstring.h"
#include "docvisitor.h"
+#include "docnode.h"
class LatexCodeGenerator;
class TextStream;
// visitor functions for leaf nodes
//--------------------------------------
- void visit(DocWord *);
- void visit(DocLinkedWord *);
- void visit(DocWhiteSpace *);
- void visit(DocSymbol *);
- void visit(DocEmoji *);
- void visit(DocURL *);
- void visit(DocLineBreak *);
- void visit(DocHorRuler *);
- void visit(DocStyleChange *);
- void visit(DocVerbatim *);
- void visit(DocAnchor *);
- void visit(DocInclude *);
- void visit(DocIncOperator *);
- void visit(DocFormula *);
- void visit(DocIndexEntry *);
- void visit(DocSimpleSectSep *);
- void visit(DocCite *);
+ void operator()(const DocWord &);
+ void operator()(const DocLinkedWord &);
+ void operator()(const DocWhiteSpace &);
+ void operator()(const DocSymbol &);
+ void operator()(const DocEmoji &);
+ void operator()(const DocURL &);
+ void operator()(const DocLineBreak &);
+ void operator()(const DocHorRuler &);
+ void operator()(const DocStyleChange &);
+ void operator()(const DocVerbatim &);
+ void operator()(const DocAnchor &);
+ void operator()(const DocInclude &);
+ void operator()(const DocIncOperator &);
+ void operator()(const DocFormula &);
+ void operator()(const DocIndexEntry &);
+ void operator()(const DocSimpleSectSep &);
+ void operator()(const DocCite &);
+ void operator()(const DocSeparator &);
//--------------------------------------
// visitor functions for compound nodes
//--------------------------------------
- void visitPre(DocAutoList *);
- void visitPost(DocAutoList *);
- void visitPre(DocAutoListItem *);
- void visitPost(DocAutoListItem *);
- void visitPre(DocPara *);
- void visitPost(DocPara *);
- void visitPre(DocRoot *);
- void visitPost(DocRoot *);
- void visitPre(DocSimpleSect *);
- void visitPost(DocSimpleSect *);
- void visitPre(DocTitle *);
- void visitPost(DocTitle *);
- void visitPre(DocSimpleList *);
- void visitPost(DocSimpleList *);
- void visitPre(DocSimpleListItem *);
- void visitPost(DocSimpleListItem *);
- void visitPre(DocSection *s);
- void visitPost(DocSection *);
- void visitPre(DocHtmlList *s);
- void visitPost(DocHtmlList *s);
- void visitPre(DocHtmlListItem *);
- void visitPost(DocHtmlListItem *);
- //void visitPre(DocHtmlPre *);
- //void visitPost(DocHtmlPre *);
- void visitPre(DocHtmlDescList *);
- void visitPost(DocHtmlDescList *);
- void visitPre(DocHtmlDescTitle *);
- void visitPost(DocHtmlDescTitle *);
- void visitPre(DocHtmlDescData *);
- void visitPost(DocHtmlDescData *);
- void visitPre(DocHtmlTable *t);
- void visitPost(DocHtmlTable *t);
- void visitPre(DocHtmlCaption *);
- void visitPost(DocHtmlCaption *);
- void visitPre(DocHtmlRow *);
- void visitPost(DocHtmlRow *) ;
- void visitPre(DocHtmlCell *);
- void visitPost(DocHtmlCell *);
- void visitPre(DocInternal *);
- void visitPost(DocInternal *);
- void visitPre(DocHRef *);
- void visitPost(DocHRef *);
- void visitPre(DocHtmlHeader *);
- void visitPost(DocHtmlHeader *) ;
- void visitPre(DocImage *);
- void visitPost(DocImage *);
- void visitPre(DocDotFile *);
- void visitPost(DocDotFile *);
- void visitPre(DocMscFile *);
- void visitPost(DocMscFile *);
- void visitPre(DocDiaFile *);
- void visitPost(DocDiaFile *);
- void visitPre(DocLink *lnk);
- void visitPost(DocLink *);
- void visitPre(DocRef *ref);
- void visitPost(DocRef *);
- void visitPre(DocSecRefItem *);
- void visitPost(DocSecRefItem *);
- void visitPre(DocSecRefList *);
- void visitPost(DocSecRefList *);
- void visitPre(DocParamSect *);
- void visitPost(DocParamSect *);
- void visitPre(DocParamList *);
- void visitPost(DocParamList *);
- void visitPre(DocXRefItem *);
- void visitPost(DocXRefItem *);
- void visitPre(DocInternalRef *);
- void visitPost(DocInternalRef *);
- void visitPre(DocText *);
- void visitPost(DocText *);
- void visitPre(DocHtmlBlockQuote *);
- void visitPost(DocHtmlBlockQuote *);
- void visitPre(DocVhdlFlow *);
- void visitPost(DocVhdlFlow *);
- void visitPre(DocParBlock *);
- void visitPost(DocParBlock *);
+ void operator()(const DocAutoList &);
+ void operator()(const DocAutoListItem &);
+ void operator()(const DocPara &);
+ void operator()(const DocRoot &);
+ void operator()(const DocSimpleSect &);
+ void operator()(const DocTitle &);
+ void operator()(const DocSimpleList &);
+ void operator()(const DocSimpleListItem &);
+ void operator()(const DocSection &s);
+ void operator()(const DocHtmlList &s);
+ void operator()(const DocHtmlListItem &);
+ void operator()(const DocHtmlDescList &);
+ void operator()(const DocHtmlDescTitle &);
+ void operator()(const DocHtmlDescData &);
+ void operator()(const DocHtmlTable &t);
+ void operator()(const DocHtmlCaption &);
+ void operator()(const DocHtmlRow &);
+ void operator()(const DocHtmlCell &);
+ void operator()(const DocInternal &);
+ void operator()(const DocHRef &);
+ void operator()(const DocHtmlHeader &);
+ void operator()(const DocImage &);
+ void operator()(const DocDotFile &);
+ void operator()(const DocMscFile &);
+ void operator()(const DocDiaFile &);
+ void operator()(const DocLink &lnk);
+ void operator()(const DocRef &ref);
+ void operator()(const DocSecRefItem &);
+ void operator()(const DocSecRefList &);
+ void operator()(const DocParamSect &);
+ void operator()(const DocParamList &);
+ void operator()(const DocXRefItem &);
+ void operator()(const DocInternalRef &);
+ void operator()(const DocText &);
+ void operator()(const DocHtmlBlockQuote &);
+ void operator()(const DocVhdlFlow &);
+ void operator()(const DocParBlock &);
private:
+ template<class T>
+ void visitChildren(const T &t)
+ {
+ for (const auto &child : t.children())
+ {
+ std::visit(*this, child);
+ }
+ }
struct ActiveRowSpan
{
- ActiveRowSpan(DocHtmlCell *c,int rs,int cs,int col)
+ ActiveRowSpan(const DocHtmlCell &c,size_t rs,size_t cs,size_t col)
: cell(c), rowSpan(rs), colSpan(cs), column(col) {}
- DocHtmlCell *cell;
- int rowSpan;
- int colSpan;
- int column;
+ const DocHtmlCell &cell;
+ size_t rowSpan;
+ size_t colSpan;
+ size_t column;
};
typedef std::vector<ActiveRowSpan> RowSpanList;
const QCString &height, bool hasCaption,
const QCString &srcFile,int srcLine);
void endMscFile(bool hasCaption);
- void writeMscFile(const QCString &fileName, DocVerbatim *s);
+ void writeMscFile(const QCString &fileName, const DocVerbatim &s);
void startDiaFile(const QCString &fileName,const QCString &width,
const QCString &height, bool hasCaption,
const QCString &srcFile,int srcLine);
void endDiaFile(bool hasCaption);
- void writeDiaFile(const QCString &fileName, DocVerbatim *s);
- void writePlantUMLFile(const QCString &fileName, DocVerbatim *s);
+ void writeDiaFile(const QCString &fileName, const DocVerbatim &s);
+ void writePlantUMLFile(const QCString &fileName, const DocVerbatim &s);
+ void visitCaption(const DocNodeList &children);
void incIndentLevel();
void decIndentLevel();
bool m_insidePre;
bool m_insideItem;
bool m_hide;
- bool m_hideCaption;
bool m_insideTabbing;
QCString m_langExt;
struct TableState
{
RowSpanList rowSpans;
- int numCols = 0;
- int currentColumn = 0;
+ size_t numCols = 0;
+ size_t currentColumn = 0;
bool inRowSpan = false;
bool inColSpan = false;
bool firstRow = false;
{
m_tableStateStack.pop();
}
- int currentColumn() const
+ size_t currentColumn() const
{
return !m_tableStateStack.empty() ? m_tableStateStack.top().currentColumn : 0;
}
- void setCurrentColumn(int col)
+ void setCurrentColumn(size_t col)
{
if (!m_tableStateStack.empty()) m_tableStateStack.top().currentColumn = col;
}
- int numCols() const
+ size_t numCols() const
{
return !m_tableStateStack.empty() ? m_tableStateStack.top().numCols : 0;
}
- void setNumCols(int num)
+ void setNumCols(size_t num)
{
if (!m_tableStateStack.empty()) m_tableStateStack.top().numCols = num;
}
#include "dotincldepgraph.h"
#include "pagedef.h"
#include "docparser.h"
+#include "docnode.h"
#include "latexdocvisitor.h"
#include "dirdef.h"
#include "cite.h"
{
if (!str.isEmpty())
{
- const signed char *p=(const signed char*)str.data();
- signed char c;
+ const char *p=str.data();
+ char c;
//char cs[5];
int spacesToNextTabStop;
int tabSize = Config_getInt(TAB_SIZE);
- static THREAD_LOCAL signed char *result = NULL;
+ static THREAD_LOCAL char *result = NULL;
static THREAD_LOCAL int lresult = 0;
int i;
while ((c=*p))
if (lresult < (i + bytes + 1)) \
{ \
lresult += 512; \
- result = (signed char *)realloc(result, lresult); \
+ result = static_cast<char *>(realloc(result, lresult)); \
} \
for (int j=0; j<bytes && *p; j++) \
{ \
COPYCHAR();
}
result[i]=0; // add terminator
- filterLatexString(m_t,(const char *)result,
+ filterLatexString(m_t,result,
false, // insideTabbing
true, // insidePre
false, // insideItem
// inserted by KONNO Akihisa <konno@researchers.jp> 2002-03-05
QCString latex_command = theTranslator->latexCommandName().quoted();
QCString mkidx_command = Config_getString(MAKEINDEX_CMD_NAME).quoted();
+ QCString bibtex_command = "bibtex";
+ QCString manual_file = "refman";
+ const int latex_count = 8;
// end insertion by KONNO Akihisa <konno@researchers.jp> 2002-03-05
+ t << "LATEX_CMD?=" << latex_command << "\n"
+ << "MKIDX_CMD?=" << mkidx_command << "\n"
+ << "BIBTEX_CMD?=" << bibtex_command << "\n"
+ << "LATEX_COUNT?=" << latex_count << "\n"
+ << "MANUAL_FILE?=" << manual_file << "\n"
+ << "\n";
if (!Config_getBool(USE_PDFLATEX)) // use plain old latex
{
- t << "LATEX_CMD=" << latex_command << "\n"
- << "\n"
- << "all: refman.dvi\n"
+ t << "all: $(MANUAL_FILE).dvi\n"
<< "\n"
- << "ps: refman.ps\n"
+ << "ps: $(MANUAL_FILE).ps\n"
<< "\n"
- << "pdf: refman.pdf\n"
+ << "pdf: $(MANUAL_FILE).pdf\n"
<< "\n"
- << "ps_2on1: refman_2on1.ps\n"
+ << "ps_2on1: $(MANUAL_FILE).ps\n"
<< "\n"
- << "pdf_2on1: refman_2on1.pdf\n"
+ << "pdf_2on1: $(MANUAL_FILE).pdf\n"
<< "\n"
- << "refman.ps: refman.dvi\n"
- << "\tdvips -o refman.ps refman.dvi\n"
+ << "$(MANUAL_FILE).ps: $(MANUAL_FILE).dvi\n"
+ << "\tdvips -o $(MANUAL_FILE).ps $(MANUAL_FILE).dvi\n"
<< "\n";
- t << "refman.pdf: refman.ps\n";
- t << "\tps2pdf refman.ps refman.pdf\n\n";
- t << "refman.dvi: clean refman.tex doxygen.sty\n"
+ t << "$(MANUAL_FILE).pdf: $(MANUAL_FILE).ps\n";
+ t << "\tps2pdf $(MANUAL_FILE).ps $(MANUAL_FILE).pdf\n\n";
+ t << "$(MANUAL_FILE).dvi: clean $(MANUAL_FILE).tex doxygen.sty\n"
<< "\techo \"Running latex...\"\n"
- << "\t$(LATEX_CMD) refman.tex\n"
+ << "\t$(LATEX_CMD) $(MANUAL_FILE).tex\n"
<< "\techo \"Running makeindex...\"\n"
- << "\t" << mkidx_command << " refman.idx\n";
+ << "\t$(MKIDX_CMD) $(MANUAL_FILE).idx\n";
if (generateBib)
{
t << "\techo \"Running bibtex...\"\n";
- t << "\tbibtex refman\n";
+ t << "\t$(BIBTEX_CMD) $(MANUAL_FILE)\n";
t << "\techo \"Rerunning latex....\"\n";
- t << "\t$(LATEX_CMD) refman.tex\n";
+ t << "\t$(LATEX_CMD) $(MANUAL_FILE).tex\n";
}
t << "\techo \"Rerunning latex....\"\n"
- << "\t$(LATEX_CMD) refman.tex\n"
- << "\tlatex_count=8 ; \\\n"
- << "\twhile egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\\\n"
+ << "\t$(LATEX_CMD) $(MANUAL_FILE).tex\n"
+ << "\tlatex_count=%(LATEX_COUNT) ; \\\n"
+ << "\twhile egrep -s 'Rerun (LaTeX|to get cross-references right|to get bibliographical references right)' $(MANUAL_FILE).log && [ $$latex_count -gt 0 ] ;\\\n"
<< "\t do \\\n"
<< "\t echo \"Rerunning latex....\" ;\\\n"
- << "\t $(LATEX_CMD) refman.tex ; \\\n"
+ << "\t $(LATEX_CMD) $(MANUAL_FILE).tex ; \\\n"
<< "\t latex_count=`expr $$latex_count - 1` ;\\\n"
<< "\t done\n"
- << "\t" << mkidx_command << " refman.idx\n"
- << "\t$(LATEX_CMD) refman.tex\n\n"
- << "refman_2on1.ps: refman.ps\n"
- << "\tpsnup -2 refman.ps >refman_2on1.ps\n"
+ << "\t$(MKIDX_CMD) $(MANUAL_FILE).idx\n"
+ << "\t$(LATEX_CMD) $(MANUAL_FILE).tex\n\n"
+ << "$(MANUAL_FILE).ps: $(MANUAL_FILE).ps\n"
+ << "\tpsnup -2 $(MANUAL_FILE).ps >$(MANUAL_FILE).ps\n"
<< "\n"
- << "refman_2on1.pdf: refman_2on1.ps\n"
- << "\tps2pdf refman_2on1.ps refman_2on1.pdf\n";
+ << "$(MANUAL_FILE).pdf: $(MANUAL_FILE).ps\n"
+ << "\tps2pdf $(MANUAL_FILE).ps $(MANUAL_FILE).pdf\n";
}
else // use pdflatex for higher quality output
{
- t << "LATEX_CMD=" << latex_command << "\n"
- << "\n";
- t << "all: refman.pdf\n\n"
- << "pdf: refman.pdf\n\n";
- t << "refman.pdf: clean refman.tex\n";
- t << "\t$(LATEX_CMD) refman\n";
- t << "\t" << mkidx_command << " refman.idx\n";
+ t << "all: $(MANUAL_FILE).pdf\n\n"
+ << "pdf: $(MANUAL_FILE).pdf\n\n";
+ t << "$(MANUAL_FILE).pdf: clean $(MANUAL_FILE).tex\n";
+ t << "\t$(LATEX_CMD) $(MANUAL_FILE)\n";
+ t << "\t$(MKIDX_CMD) $(MANUAL_FILE).idx\n";
if (generateBib)
{
- t << "\tbibtex refman\n";
- t << "\t$(LATEX_CMD) refman\n";
+ t << "\t$(BIBTEX_CMD) $(MANUAL_FILE)\n";
+ t << "\t$(LATEX_CMD) $(MANUAL_FILE)\n";
}
- t << "\t$(LATEX_CMD) refman\n"
- << "\tlatex_count=8 ; \\\n"
- << "\twhile egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\\\n"
+ t << "\t$(LATEX_CMD) $(MANUAL_FILE)\n"
+ << "\tlatex_count=$(LATEX_COUNT) ; \\\n"
+ << "\twhile egrep -s 'Rerun (LaTeX|to get cross-references right|to get bibliographical references right)' $(MANUAL_FILE).log && [ $$latex_count -gt 0 ] ;\\\n"
<< "\t do \\\n"
<< "\t echo \"Rerunning latex....\" ;\\\n"
- << "\t $(LATEX_CMD) refman ;\\\n"
+ << "\t $(LATEX_CMD) $(MANUAL_FILE) ;\\\n"
<< "\t latex_count=`expr $$latex_count - 1` ;\\\n"
<< "\t done\n"
- << "\t" << mkidx_command << " refman.idx\n"
- << "\t$(LATEX_CMD) refman\n\n";
+ << "\t$(MKIDX_CMD) $(MANUAL_FILE).idx\n"
+ << "\t$(LATEX_CMD) $(MANUAL_FILE)\n\n";
}
t << "\n"
<< "clean:\n"
<< "\trm -f "
- << "*.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf\n";
+ << "*.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl $(MANUAL_FILE).pdf\n";
}
static void writeMakeBat()
QCString fileName=dir+"/make.bat";
QCString latex_command = theTranslator->latexCommandName().quoted();
QCString mkidx_command = Config_getString(MAKEINDEX_CMD_NAME).quoted();
+ QCString bibtex_command = "bibtex";
+ QCString manual_file = "refman";
+ const int latex_count = 8;
bool generateBib = !CitationManager::instance().isEmpty();
std::ofstream t(fileName.str(),std::ofstream::out | std::ofstream::binary);
if (!t.is_open())
}
t << "set Dir_Old=%cd%\r\n";
t << "cd /D %~dp0\r\n\r\n";
- t << "del /s /f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf\r\n\r\n";
+ t << "\r\n";
+ t << "set ORG_LATEX_CMD=%LATEX_CMD%\r\n";
+ t << "set ORG_MKIDX_CMD=%MKIDX_CMD%\r\n";
+ t << "set ORG_BIBTEX_CMD=%BIBTEX_CMD%\r\n";
+ t << "set ORG_LATEX_COUNT=%LATEX_COUNT%\r\n";
+ t << "set ORG_MANUAL_FILE=%MANUAL_FILE%\r\n";
+ t << "if \"X\"%LATEX_CMD% == \"X\" set LATEX_CMD=" << latex_command << "\r\n";
+ t << "if \"X\"%MKIDX_CMD% == \"X\" set MKIDX_CMD=" << mkidx_command << "\r\n";
+ t << "if \"X\"%BIBTEX_CMD% == \"X\" set BIBTEX_CMD=" << bibtex_command << "\r\n";
+ t << "if \"X\"%LATEX_COUNT% == \"X\" set LATEX_COUNT=" << latex_count << "\r\n";
+ t << "if \"X\"%MANUAL_FILE% == \"X\" set MANUAL_FILE=" << manual_file << "\r\n";
+ t << "\r\n";
+ t << "del /s /f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl %MANUAL_FILE%.pdf\r\n\r\n";
+ t << "\r\n";
if (!Config_getBool(USE_PDFLATEX)) // use plain old latex
{
- t << "set LATEX_CMD=" << latex_command << "\r\n";
- t << "%LATEX_CMD% refman.tex\r\n";
+ t << "%LATEX_CMD% %MANUAL_FILE%.tex\r\n";
t << "echo ----\r\n";
- t << mkidx_command << " refman.idx\r\n";
+ t << "%MKIDX_CMD% %MANUAL_FILE%.idx\r\n";
if (generateBib)
{
- t << "bibtex refman\r\n";
+ t << "%BIBTEX_CMD% %MANUAL_FILE%\r\n";
t << "echo ----\r\n";
- t << "\t%LATEX_CMD% refman.tex\r\n";
+ t << "\t%LATEX_CMD% %MANUAL_FILE%.tex\r\n";
}
t << "setlocal enabledelayedexpansion\r\n";
- t << "set count=8\r\n";
+ t << "set count=%LAT#EX_COUNT%\r\n";
t << ":repeat\r\n";
t << "set content=X\r\n";
- t << "for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun LaTeX\" refman.log' ) do set content=\"%%~T\"\r\n";
- t << "if !content! == X for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun to get cross-references right\" refman.log' ) do set content=\"%%~T\"\r\n";
+ t << "for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun LaTeX\" %MANUAL_FILE%.log' ) do set content=\"%%~T\"\r\n";
+ t << "if !content! == X for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun to get cross-references right\" %MANUAL_FILE%.log' ) do set content=\"%%~T\"\r\n";
+ t << "if !content! == X for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun to get bibliographical references right\" %MANUAL_FILE%.log' ) do set content=\"%%~T\"\r\n";
t << "if !content! == X goto :skip\r\n";
t << "set /a count-=1\r\n";
t << "if !count! EQU 0 goto :skip\r\n\r\n";
t << "echo ----\r\n";
- t << "%LATEX_CMD% refman.tex\r\n";
+ t << "%LATEX_CMD% %MANUAL_FILE%.tex\r\n";
t << "goto :repeat\r\n";
t << ":skip\r\n";
t << "endlocal\r\n";
- t << mkidx_command << " refman.idx\r\n";
- t << "%LATEX_CMD% refman.tex\r\n";
- t << "dvips -o refman.ps refman.dvi\r\n";
+ t << "%MKIDX_CMD% %MANUAL_FILE%.idx\r\n";
+ t << "%LATEX_CMD% %MANUAL_FILE%.tex\r\n";
+ t << "dvips -o %MANUAL_FILE%.ps %MANUAL_FILE%.dvi\r\n";
t << Portable::ghostScriptCommand();
t << " -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite "
- "-sOutputFile=refman.pdf -c save pop -f refman.ps\r\n";
+ "-sOutputFile=%MANUAL_FILE%.pdf -c save pop -f %MANUAL_FILE%.ps\r\n";
}
else // use pdflatex
{
- t << "set LATEX_CMD=" << latex_command << "\r\n";
- t << "%LATEX_CMD% refman\r\n";
+ t << "%LATEX_CMD% %MANUAL_FILE%\r\n";
t << "echo ----\r\n";
- t << mkidx_command << " refman.idx\r\n";
+ t << "%MKIDX_CMD% %MANUAL_FILE%.idx\r\n";
if (generateBib)
{
- t << "bibtex refman\r\n";
- t << "%LATEX_CMD% refman\r\n";
+ t << "%BIBTEX_CMD% %MANUAL_FILE%\r\n";
+ t << "%LATEX_CMD% %MANUAL_FILE%\r\n";
}
t << "echo ----\r\n";
- t << "%LATEX_CMD% refman\r\n\r\n";
+ t << "%LATEX_CMD% %MANUAL_FILE%\r\n\r\n";
t << "setlocal enabledelayedexpansion\r\n";
- t << "set count=8\r\n";
+ t << "set count=%LATEX_COUNT%\r\n";
t << ":repeat\r\n";
t << "set content=X\r\n";
- t << "for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun LaTeX\" refman.log' ) do set content=\"%%~T\"\r\n";
- t << "if !content! == X for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun to get cross-references right\" refman.log' ) do set content=\"%%~T\"\r\n";
+ t << "for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun LaTeX\" %MANUAL_FILE%.log' ) do set content=\"%%~T\"\r\n";
+ t << "if !content! == X for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun to get cross-references right\" %MANUAL_FILE%.log' ) do set content=\"%%~T\"\r\n";
+ t << "if !content! == X for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun to get bibliographical references right\" %MANUAL_FILE%.log' ) do set content=\"%%~T\"\r\n";
t << "if !content! == X goto :skip\r\n";
t << "set /a count-=1\r\n";
t << "if !count! EQU 0 goto :skip\r\n\r\n";
t << "echo ----\r\n";
- t << "%LATEX_CMD% refman\r\n";
+ t << "%LATEX_CMD% %MANUAL_FILE%\r\n";
t << "goto :repeat\r\n";
t << ":skip\r\n";
t << "endlocal\r\n";
- t << mkidx_command << " refman.idx\r\n";
- t << "%LATEX_CMD% refman\r\n";
- t << "cd /D %Dir_Old%\r\n";
- t << "set Dir_Old=\r\n";
- }
+ t << "%MKIDX_CMD% %MANUAL_FILE%.idx\r\n";
+ t << "%LATEX_CMD% %MANUAL_FILE%\r\n";
+ }
+ t<< "\r\n";
+ t<< "@REM reset environment\r\n";
+ t<< "cd /D %Dir_Old%\r\n";
+ t<< "set Dir_Old=\r\n";
+ t<< "set LATEX_CMD=%ORG_LATEX_CMD%\r\n";
+ t<< "set ORG_LATEX_CMD=\r\n";
+ t<< "set MKIDX_CMD=%ORG_MKIDX_CMD%\r\n";
+ t<< "set ORG_MKIDX_CMD=\r\n";
+ t<< "set BIBTEX_CMD=%ORG_BIBTEX_CMD%\r\n";
+ t<< "set ORG_BIBTEX_CMD=\r\n";
+ t<< "set MANUAL_FILE=%ORG_MANUAL_FILE%\r\n";
+ t<< "set ORG_MANUAL_FILE=\r\n";
+ t<< "set LATEX_COUNT=%ORG_LATEX_COUNT%\r\n";
+ t<< "set ORG_LATEX_COUNT=\r\n";
#endif
}
QCString latexSpecialFormulaChars = tg2.str();
QCString formulaMacrofile = Config_getString(FORMULA_MACROFILE);
+ QCString stripMacroFile;
if (!formulaMacrofile.isEmpty())
{
FileInfo fi(formulaMacrofile.str());
formulaMacrofile=fi.absFilePath();
- QCString stripMacroFile = fi.fileName();
+ stripMacroFile = fi.fileName();
copyFile(formulaMacrofile,Config_getString(LATEX_OUTPUT) + "/" + stripMacroFile);
}
result = substitute(result,"$makeindex",makeIndex());
result = substitute(result,"$extralatexpackages",extraLatexPackages);
result = substitute(result,"$latexspecialformulachars",latexSpecialFormulaChars);
- result = substitute(result,"$formulamacrofile",formulaMacrofile);
+ result = substitute(result,"$formulamacrofile",stripMacroFile);
// additional LaTeX only conditional blocks
result = selectBlock(result,"CITATIONS_PRESENT", !CitationManager::instance().isEmpty(),OutputGenerator::Latex);
if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
m_t << "{"; //Introduction}\n"
break;
- //case isPackageIndex:
- // if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
- // m_t << "{"; //Package Index}\n"
- // break;
case isModuleIndex:
if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
m_t << "{"; //Module Index}\n"
m_t << " ";
}
-void LatexGenerator::writeDoc(DocNode *n,const Definition *ctx,const MemberDef *,int)
+void LatexGenerator::writeDoc(const IDocNodeAST *ast,const Definition *ctx,const MemberDef *,int)
{
- LatexDocVisitor *visitor =
- new LatexDocVisitor(m_t,m_codeGen,ctx?ctx->getDefFileExtension():QCString(""),m_insideTabbing);
- n->accept(visitor);
- delete visitor;
+ const DocNodeAST *astImpl = dynamic_cast<const DocNodeAST*>(ast);
+ if (astImpl)
+ {
+ LatexDocVisitor visitor(m_t,m_codeGen,
+ ctx?ctx->getDefFileExtension():QCString(""),
+ m_insideTabbing);
+ std::visit(visitor,astImpl->root);
+ }
}
void LatexGenerator::startConstraintList(const QCString &header)
void startFontClass(const QCString &) override;
void endFontClass() override;
void writeCodeAnchor(const QCString &) override {}
- void setCurrentDoc(const Definition *,const QCString &,bool) override {}
- void addWord(const QCString &,bool) override {}
void startCodeFragment(const QCString &style) override;
void endCodeFragment(const QCString &style) override;
// ---------------------------
- void writeDoc(DocNode *,const Definition *ctx,const MemberDef *,int id);
+ void writeDoc(const IDocNodeAST *node,const Definition *ctx,const MemberDef *,int id);
void startFile(const QCString &name,const QCString &manName,const QCString &title,int id);
void writeSearchInfo() {}
"|"+QCString().setNum(langId5)+"="+value5;
}
-
static bool elemIsVisible(const XMLHandlers::Attributes &attrib,bool defVal=TRUE)
{
QCString visible = XMLHandlers::value(attrib,"visible");
}
else if (opt && opt->type==ConfigValues::Info::String)
{
- return ConfigValues::instance().*(opt->value.s) != "NO";
+ return opt->getBooleanRepresentation();
}
else if (!opt)
{
- err("found unsupported value %s for visible attribute in layout file\n",
- qPrint(visible));
+ err("found unsupported value '%s' for visible attribute in layout file, reverting to '%s'\n",
+ qPrint(visible),(defVal?"yes":"no"));
+ return defVal;
}
}
- return visible!="no" && visible!="0";
+ QCString visibleLow = visible.lower();
+ if (visibleLow=="no" || visibleLow=="false" || visibleLow=="0") return FALSE;
+ else if (visibleLow=="yes" || visibleLow=="true" || visibleLow=="1") return TRUE;
+ else
+ {
+ err("found unsupported value '%s' for visible attribute in layout file, reverting to '%s'\n",
+ qPrint(visible),(defVal?"yes":"no"));
+ return defVal;
+ }
}
static bool parentIsVisible(LayoutNavEntry *parent)
void startSimpleEntry(LayoutDocEntry::Kind k,const XMLHandlers::Attributes &attrib)
{
bool isVisible = elemIsVisible(attrib) && parentIsVisible(m_rootNav);
- if (m_part!=-1 && isVisible)
+ if (m_part!=LayoutDocManager::Undefined && isVisible)
{
- LayoutDocManager::instance().addEntry((LayoutDocManager::LayoutPart)m_part,
- new LayoutDocEntrySimple(k));
+ LayoutDocManager::instance().addEntry(m_part,new LayoutDocEntrySimple(k));
}
}
//printf("startSectionEntry: title='%s' userTitle='%s'\n",
// qPrint(title),qPrint(userTitle));
if (userTitle.isEmpty()) userTitle = title;
- if (m_part!=-1 && isVisible)
+ if (m_part!=LayoutDocManager::Undefined && isVisible)
{
- LayoutDocManager::instance().addEntry((LayoutDocManager::LayoutPart)m_part,
- new LayoutDocEntrySection(k,userTitle));
+ LayoutDocManager::instance().addEntry(m_part,new LayoutDocEntrySection(k,userTitle));
}
}
if (userTitle.isEmpty()) userTitle = title;
if (userSubscript.isEmpty()) userSubscript = subscript;
//printf("memberdecl: %s\n",qPrint(userTitle));
- if (m_part!=-1 /*&& isVisible*/)
+ if (m_part!=LayoutDocManager::Undefined)
{
- LayoutDocManager::instance().addEntry((LayoutDocManager::LayoutPart)m_part,
- new LayoutDocEntryMemberDecl(type,userTitle,userSubscript));
+ LayoutDocManager::instance().addEntry(m_part,new LayoutDocEntryMemberDecl(type,userTitle,userSubscript));
}
}
QCString userTitle = XMLHandlers::value(attrib,"title");
if (userTitle.isEmpty()) userTitle = title;
//printf("memberdef: %s\n",qPrint(userTitle));
- if (m_part!=-1 /*&& isVisible*/)
+ if (m_part!=LayoutDocManager::Undefined)
{
- LayoutDocManager::instance().addEntry((LayoutDocManager::LayoutPart)m_part,
+ LayoutDocManager::instance().addEntry(m_part,
new LayoutDocEntryMemberDef(type,userTitle));
}
}
void startNavEntry(const XMLHandlers::Attributes &attrib)
{
- static bool javaOpt = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
- static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
- static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
- static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
- static bool hasGraphicalHierarchy = Config_getBool(HAVE_DOT) &&
+ bool javaOpt = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
+ bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
+ bool hasGraphicalHierarchy = Config_getBool(HAVE_DOT) &&
Config_getBool(GRAPHICAL_HIERARCHY);
- static bool extractAll = Config_getBool(EXTRACT_ALL);
+ bool extractAll = Config_getBool(EXTRACT_ALL);
static struct NavEntryMap
{
const char *typeStr; // type attribute name in the XML file
{ "namespaces",
LayoutNavEntry::Namespaces,
javaOpt || vhdlOpt ? theTranslator->trPackages() : fortranOpt || sliceOpt ? theTranslator->trModules() : theTranslator->trNamespaces(),
- javaOpt || vhdlOpt ? theTranslator->trPackages() : fortranOpt || sliceOpt ? theTranslator->trModulesList() : theTranslator->trNamespaceList(),
+ javaOpt || vhdlOpt ? theTranslator->trPackageList() : fortranOpt || sliceOpt ? theTranslator->trModulesList() : theTranslator->trNamespaceList(),
javaOpt || vhdlOpt ? theTranslator->trPackageListDescription() : fortranOpt || sliceOpt ? theTranslator->trModulesListDescription(extractAll) : theTranslator->trNamespaceListDescription(extractAll),
"namespaces"
},
{ "namespacelist",
LayoutNavEntry::NamespaceList,
- javaOpt || vhdlOpt ? theTranslator->trPackages() : fortranOpt || sliceOpt ? theTranslator->trModulesList() : theTranslator->trNamespaceList(),
+ javaOpt || vhdlOpt ? theTranslator->trPackageList() : fortranOpt || sliceOpt ? theTranslator->trModulesList() : theTranslator->trNamespaceList(),
QCString(),
javaOpt || vhdlOpt ? theTranslator->trPackageListDescription() : fortranOpt || sliceOpt ? theTranslator->trModulesListDescription(extractAll) : theTranslator->trNamespaceListDescription(extractAll),
"namespaces"
theTranslator->trFileMembersDescription(extractAll),
"globals"
},
- //{ "dirs",
- // LayoutNavEntry::Dirs,
- // theTranslator->trDirectories(),
- // QCString(),
- // theTranslator->trDirDescription(),
- // "dirs"
- //},
{ "examples",
LayoutNavEntry::Examples,
theTranslator->trExamples(),
"usergroup"
},
{ 0, // end of list
- (LayoutNavEntry::Kind)0,
+ static_cast<LayoutNavEntry::Kind>(0),
QCString(),
QCString(),
QCString(),
{
LayoutDocManager::instance().clear(LayoutDocManager::Class);
m_scope="class/";
- m_part = (int)LayoutDocManager::Class;
+ m_part = LayoutDocManager::Class;
}
void endClass()
{
m_scope="";
- m_part = -1;
+ m_part = LayoutDocManager::Undefined;
}
void startNamespace(const XMLHandlers::Attributes &)
{
LayoutDocManager::instance().clear(LayoutDocManager::Namespace);
m_scope="namespace/";
- m_part = (int)LayoutDocManager::Namespace;
+ m_part = LayoutDocManager::Namespace;
}
void endNamespace()
{
m_scope="";
- m_part = -1;
+ m_part = LayoutDocManager::Undefined;
}
void startConcept(const XMLHandlers::Attributes &)
{
LayoutDocManager::instance().clear(LayoutDocManager::Concept);
m_scope="concept/";
- m_part = (int)LayoutDocManager::Concept;
+ m_part = LayoutDocManager::Concept;
}
void endConcept()
{
m_scope="";
- m_part = -1;
+ m_part = LayoutDocManager::Undefined;
}
void startFile(const XMLHandlers::Attributes &)
{
LayoutDocManager::instance().clear(LayoutDocManager::File);
m_scope="file/";
- m_part = (int)LayoutDocManager::File;
+ m_part = LayoutDocManager::File;
}
void endFile()
{
m_scope="";
- m_part = -1;
+ m_part = LayoutDocManager::Undefined;
}
void startGroup(const XMLHandlers::Attributes &)
{
LayoutDocManager::instance().clear(LayoutDocManager::Group);
m_scope="group/";
- m_part = (int)LayoutDocManager::Group;
+ m_part = LayoutDocManager::Group;
}
void endGroup()
{
m_scope="";
- m_part = -1;
+ m_part = LayoutDocManager::Undefined;
}
void startDirectory(const XMLHandlers::Attributes &)
{
LayoutDocManager::instance().clear(LayoutDocManager::Directory);
m_scope="directory/";
- m_part = (int)LayoutDocManager::Directory;
+ m_part = LayoutDocManager::Directory;
}
void endDirectory()
{
m_scope="";
- m_part = -1;
+ m_part = LayoutDocManager::Undefined;
}
void startMemberDef(const XMLHandlers::Attributes &)
{
m_scope+="memberdef/";
- if (m_part!=-1)
+ if (m_part!=LayoutDocManager::Undefined)
{
- LayoutDocManager::instance().addEntry((LayoutDocManager::LayoutPart)m_part,
- new LayoutDocEntrySimple(LayoutDocEntry::MemberDefStart));
+ LayoutDocManager::instance().addEntry(m_part,new LayoutDocEntrySimple(LayoutDocEntry::MemberDefStart));
}
}
if (i!=-1)
{
m_scope=m_scope.left(i);
- if (m_part!=-1)
+ if (m_part!=LayoutDocManager::Undefined)
{
- LayoutDocManager::instance().addEntry((LayoutDocManager::LayoutPart)m_part,
- new LayoutDocEntrySimple(LayoutDocEntry::MemberDefEnd));
+ LayoutDocManager::instance().addEntry(m_part,new LayoutDocEntrySimple(LayoutDocEntry::MemberDefEnd));
}
}
}
void startMemberDecl(const XMLHandlers::Attributes &)
{
m_scope+="memberdecl/";
- if (m_part!=-1)
+ if (m_part!=LayoutDocManager::Undefined)
{
- LayoutDocManager::instance().addEntry((LayoutDocManager::LayoutPart)m_part,
- new LayoutDocEntrySimple(LayoutDocEntry::MemberDeclStart));
+ LayoutDocManager::instance().addEntry(m_part,new LayoutDocEntrySimple(LayoutDocEntry::MemberDeclStart));
}
}
if (i!=-1)
{
m_scope=m_scope.left(i);
- if (m_part!=-1)
+ if (m_part!=LayoutDocManager::Undefined)
{
- LayoutDocManager::instance().addEntry((LayoutDocManager::LayoutPart)m_part,
- new LayoutDocEntrySimple(LayoutDocEntry::MemberDeclEnd));
+ LayoutDocManager::instance().addEntry(m_part,new LayoutDocEntrySimple(LayoutDocEntry::MemberDeclEnd));
}
}
}
~LayoutParser() { delete m_rootNav; }
QCString m_scope;
- int m_part = -1;
+ LayoutDocManager::LayoutPart m_part = LayoutDocManager::Undefined;
LayoutNavEntry *m_rootNav = 0;
bool m_invalidEntry = false;
static int m_userGroupCount;
endCb()
} },
{ "class/memberdecl/packagemethods", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_pacMethods,
- []() { return compileOptions(theTranslator->trPackageMembers()); }),
+ []() { return compileOptions(theTranslator->trPackageFunctions()); }),
endCb()
} },
{ "class/memberdecl/packagestaticmethods", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_pacStaticMethods,
- []() { return compileOptions(theTranslator->trStaticPackageMembers()); }),
+ []() { return compileOptions(theTranslator->trStaticPackageFunctions()); }),
endCb()
} },
{ "class/memberdecl/packageattributes", { startCb(&LayoutParser::startMemberDeclEntry, MemberListType_pacAttribs,
const LayoutDocEntryList &LayoutDocManager::docEntries(LayoutDocManager::LayoutPart part) const
{
- return d->docEntries[(int)part];
+ return d->docEntries[static_cast<int>(part)];
}
LayoutNavEntry* LayoutDocManager::rootNavEntry() const
void LayoutDocManager::addEntry(LayoutDocManager::LayoutPart p,LayoutDocEntry *e)
{
- d->docEntries[(int)p].push_back(std::unique_ptr<LayoutDocEntry>(e));
+ d->docEntries[static_cast<int>(p)].push_back(std::unique_ptr<LayoutDocEntry>(e));
}
void LayoutDocManager::clear(LayoutDocManager::LayoutPart p)
{
- d->docEntries[(int)p].clear();
+ d->docEntries[static_cast<int>(p)].clear();
}
void LayoutDocManager::parse(const QCString &fileName)
e=input.find('|',s);
i=input.find('=',s);
assert(i>s);
- int key=input.mid(s,i-s).toInt();
- if (key==(int)lang) // found matching key
+ size_t key=input.mid(s,i-s).toUInt();
+ if (key==lang) // found matching key
{
if (e==-1) e=input.length();
return input.mid(i+1,e-i-1);
/** @brief Base class representing a piece of a documentation page */
struct LayoutDocEntry
{
- virtual ~LayoutDocEntry() {}
+ virtual ~LayoutDocEntry() = default;
enum Kind {
// Generic items for all pages
MemberGroups,
public:
enum LayoutPart
{
+ Undefined = -1,
Class, Concept, Namespace, File, Group, Directory,
NrParts
};
//! Return a non-owning pointer to the newly added object, or to the existing object if
//! it was already inserted before under the given key.
template<class...Args>
- T *add(const char *k, Args&&... args)
+ [[maybe_unused]] T *add(const char *k, Args&&... args)
{
T *result = find(k);
if (result==nullptr)
}
template<class...Args>
- T *add(const QCString &k, Args&&... args)
+ [[maybe_unused]] T *add(const QCString &k, Args&&... args)
{
std::string key = k.str();
T *result = find(key);
//! added under the same key). Ownership is transferred.
//! Return a non-owning pointer to the newly added object, or to the existing object if
//! it was already inserted before under the given key.
- T *add(const char *k, Ptr &&ptr)
+ [[maybe_unused]] T *add(const char *k, Ptr &&ptr)
{
T *result = find(k);
if (result==nullptr)
return result;
}
- T *add(const QCString &k, Ptr &&ptr)
+ [[maybe_unused]] T *add(const QCString &k, Ptr &&ptr)
{
std::string key = k.str();
T *result = find(key);
ManDocVisitor::ManDocVisitor(TextStream &t,CodeOutputInterface &ci,
const QCString &langExt)
- : DocVisitor(DocVisitor_Man), m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE), m_firstCol(FALSE),
+ : m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE), m_firstCol(FALSE),
m_indent(0), m_langExt(langExt)
{
}
// visitor functions for leaf nodes
//--------------------------------------
-void ManDocVisitor::visit(DocWord *w)
+void ManDocVisitor::operator()(const DocWord &w)
{
if (m_hide) return;
- filter(w->word());
+ filter(w.word());
m_firstCol=FALSE;
}
-void ManDocVisitor::visit(DocLinkedWord *w)
+void ManDocVisitor::operator()(const DocLinkedWord &w)
{
if (m_hide) return;
m_t << "\\fB";
- filter(w->word());
+ filter(w.word());
m_t << "\\fP";
m_firstCol=FALSE;
}
-void ManDocVisitor::visit(DocWhiteSpace *w)
+void ManDocVisitor::operator()(const DocWhiteSpace &w)
{
if (m_hide) return;
if (m_insidePre)
{
- m_t << w->chars();
- m_firstCol=w->chars().at(w->chars().length()-1)=='\n';
+ m_t << w.chars();
+ m_firstCol=w.chars().at(w.chars().length()-1)=='\n';
}
else
{
}
}
-void ManDocVisitor::visit(DocSymbol *s)
+void ManDocVisitor::operator()(const DocSymbol &s)
{
if (m_hide) return;
- const char *res = HtmlEntityMapper::instance()->man(s->symbol());
+ const char *res = HtmlEntityMapper::instance()->man(s.symbol());
if (res)
{
m_t << res;
m_firstCol=FALSE;
}
-void ManDocVisitor::visit(DocEmoji *s)
+void ManDocVisitor::operator()(const DocEmoji &s)
{
if (m_hide) return;
- const char *res = EmojiEntityMapper::instance()->name(s->index());
+ const char *res = EmojiEntityMapper::instance()->name(s.index());
if (res)
{
m_t << res;
}
else
{
- m_t << s->name();
+ m_t << s.name();
}
m_firstCol=FALSE;
}
-void ManDocVisitor::visit(DocURL *u)
+void ManDocVisitor::operator()(const DocURL &u)
{
if (m_hide) return;
- m_t << u->url();
+ m_t << u.url();
m_firstCol=FALSE;
}
-void ManDocVisitor::visit(DocLineBreak *)
+void ManDocVisitor::operator()(const DocLineBreak &)
{
if (m_hide) return;
m_t << "\n.br\n";
m_firstCol=TRUE;
}
-void ManDocVisitor::visit(DocHorRuler *)
+void ManDocVisitor::operator()(const DocHorRuler &)
{
if (m_hide) return;
if (!m_firstCol) m_t << "\n";
m_firstCol=TRUE;
}
-void ManDocVisitor::visit(DocStyleChange *s)
+void ManDocVisitor::operator()(const DocStyleChange &s)
{
if (m_hide) return;
- switch (s->style())
+ switch (s.style())
{
case DocStyleChange::Bold:
- if (s->enable()) m_t << "\\fB"; else m_t << "\\fP";
+ if (s.enable()) m_t << "\\fB"; else m_t << "\\fP";
m_firstCol=FALSE;
break;
case DocStyleChange::S:
break;
case DocStyleChange::Underline: //underline is shown as emphasis
case DocStyleChange::Ins:
- if (s->enable()) m_t << "\\fI"; else m_t << "\\fP";
+ if (s.enable()) m_t << "\\fI"; else m_t << "\\fP";
m_firstCol=FALSE;
break;
case DocStyleChange::Italic:
- if (s->enable()) m_t << "\\fI"; else m_t << "\\fP";
+ if (s.enable()) m_t << "\\fI"; else m_t << "\\fP";
m_firstCol=FALSE;
break;
case DocStyleChange::Code:
- if (s->enable()) m_t << "\\fC"; else m_t << "\\fP";
+ if (s.enable()) m_t << "\\fC"; else m_t << "\\fP";
m_firstCol=FALSE;
break;
case DocStyleChange::Subscript:
- if (s->enable()) m_t << "\\*<"; else m_t << "\\*> ";
+ if (s.enable()) m_t << "\\*<"; else m_t << "\\*> ";
m_firstCol=FALSE;
break;
case DocStyleChange::Superscript:
- if (s->enable()) m_t << "\\*{"; else m_t << "\\*} ";
+ if (s.enable()) m_t << "\\*{"; else m_t << "\\*} ";
m_firstCol=FALSE;
break;
case DocStyleChange::Center:
/* not supported */
break;
case DocStyleChange::Preformatted:
- if (s->enable())
+ if (s.enable())
{
if (!m_firstCol) m_t << "\n";
m_t << ".PP\n";
case DocStyleChange::Div: /* HTML only */ break;
case DocStyleChange::Span: /* HTML only */ break;
case DocStyleChange::Details: /* emulation of the <details> tag */
- if (!s->enable())
+ if (!s.enable())
{
if (!m_firstCol) m_t << "\n";
m_t << ".PP\n";
}
break;
case DocStyleChange::Summary: /* emulation of the <summary> tag inside a <details> tag */
- if (s->enable()) m_t << "\\fB"; else m_t << "\\fP";
+ if (s.enable()) m_t << "\\fB"; else m_t << "\\fP";
m_firstCol=FALSE;
break;
}
}
-void ManDocVisitor::visit(DocVerbatim *s)
+void ManDocVisitor::operator()(const DocVerbatim &s)
{
if (m_hide) return;
QCString lang = m_langExt;
- if (!s->language().isEmpty()) // explicit language setting
+ if (!s.language().isEmpty()) // explicit language setting
{
- lang = s->language();
+ lang = s.language();
}
SrcLangExt langExt = getLanguageFromCodeLang(lang);
- switch (s->type())
+ switch (s.type())
{
case DocVerbatim::Code:
if (!m_firstCol) m_t << "\n";
m_t << ".PP\n";
m_t << ".nf\n";
- getCodeParser(lang).parseCode(m_ci,s->context(),s->text(),
+ getCodeParser(lang).parseCode(m_ci,s.context(),s.text(),
langExt,
- s->isExample(),s->exampleFile());
+ s.isExample(),s.exampleFile());
if (!m_firstCol) m_t << "\n";
m_t << ".fi\n";
m_t << ".PP\n";
m_firstCol=TRUE;
break;
case DocVerbatim::JavaDocLiteral:
- filter(s->text());
+ filter(s.text());
break;
case DocVerbatim::JavaDocCode:
m_t << "\\fC\n";
- filter(s->text());
+ filter(s.text());
m_t << "\\fP\n";
break;
case DocVerbatim::Verbatim:
if (!m_firstCol) m_t << "\n";
m_t << ".PP\n";
m_t << ".nf\n";
- filter(s->text());
+ filter(s.text());
if (!m_firstCol) m_t << "\n";
m_t << ".fi\n";
m_t << ".PP\n";
m_firstCol=TRUE;
break;
case DocVerbatim::ManOnly:
- m_t << s->text();
+ m_t << s.text();
break;
case DocVerbatim::HtmlOnly:
case DocVerbatim::XmlOnly:
}
}
-void ManDocVisitor::visit(DocAnchor *)
+void ManDocVisitor::operator()(const DocAnchor &)
{
/* no support for anchors in man pages */
}
-void ManDocVisitor::visit(DocInclude *inc)
+void ManDocVisitor::operator()(const DocInclude &inc)
{
if (m_hide) return;
- SrcLangExt langExt = getLanguageFromFileName(inc->extension());
- switch(inc->type())
+ SrcLangExt langExt = getLanguageFromFileName(inc.extension());
+ switch(inc.type())
{
case DocInclude::IncWithLines:
{
if (!m_firstCol) m_t << "\n";
m_t << ".PP\n";
m_t << ".nf\n";
- FileInfo cfi( inc->file().str() );
+ FileInfo cfi( inc.file().str() );
FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
- getCodeParser(inc->extension()).parseCode(m_ci,inc->context(),
- inc->text(),
+ getCodeParser(inc.extension()).parseCode(m_ci,inc.context(),
+ inc.text(),
langExt,
- inc->isExample(),
- inc->exampleFile(),
+ inc.isExample(),
+ inc.exampleFile(),
fd, // fileDef,
-1, // start line
-1, // end line
if (!m_firstCol) m_t << "\n";
m_t << ".PP\n";
m_t << ".nf\n";
- getCodeParser(inc->extension()).parseCode(m_ci,inc->context(),
- inc->text(),
+ getCodeParser(inc.extension()).parseCode(m_ci,inc.context(),
+ inc.text(),
langExt,
- inc->isExample(),
- inc->exampleFile(),
+ inc.isExample(),
+ inc.exampleFile(),
0, // fileDef
-1, // startLine
-1, // endLine
case DocInclude::DocbookInclude:
break;
case DocInclude::ManInclude:
- m_t << inc->text();
+ m_t << inc.text();
break;
case DocInclude::VerbInclude:
if (!m_firstCol) m_t << "\n";
m_t << ".PP\n";
m_t << ".nf\n";
- m_t << inc->text();
+ m_t << inc.text();
if (!m_firstCol) m_t << "\n";
m_t << ".fi\n";
m_t << ".PP\n";
if (!m_firstCol) m_t << "\n";
m_t << ".PP\n";
m_t << ".nf\n";
- getCodeParser(inc->extension()).parseCode(m_ci,
- inc->context(),
- extractBlock(inc->text(),inc->blockId()),
+ getCodeParser(inc.extension()).parseCode(m_ci,
+ inc.context(),
+ extractBlock(inc.text(),inc.blockId()),
langExt,
- inc->isExample(),
- inc->exampleFile()
+ inc.isExample(),
+ inc.exampleFile()
);
if (!m_firstCol) m_t << "\n";
m_t << ".fi\n";
if (!m_firstCol) m_t << "\n";
m_t << ".PP\n";
m_t << ".nf\n";
- FileInfo cfi( inc->file().str() );
+ FileInfo cfi( inc.file().str() );
FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
- getCodeParser(inc->extension()).parseCode(m_ci,
- inc->context(),
- extractBlock(inc->text(),inc->blockId()),
+ getCodeParser(inc.extension()).parseCode(m_ci,
+ inc.context(),
+ extractBlock(inc.text(),inc.blockId()),
langExt,
- inc->isExample(),
- inc->exampleFile(),
+ inc.isExample(),
+ inc.exampleFile(),
fd,
- lineBlock(inc->text(),inc->blockId()),
+ lineBlock(inc.text(),inc.blockId()),
-1, // endLine
FALSE, // inlineFragment
0, // memberDef
}
}
-void ManDocVisitor::visit(DocIncOperator *op)
+void ManDocVisitor::operator()(const DocIncOperator &op)
{
- QCString locLangExt = getFileNameExtension(op->includeFileName());
+ QCString locLangExt = getFileNameExtension(op.includeFileName());
if (locLangExt.isEmpty()) locLangExt = m_langExt;
SrcLangExt langExt = getLanguageFromFileName(locLangExt);
//printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
- // op->type(),op->isFirst(),op->isLast(),qPrint(op->text()));
- if (op->isFirst())
+ // op.type(),op.isFirst(),op.isLast(),qPrint(op.text()));
+ if (op.isFirst())
{
if (!m_hide)
{
pushHidden(m_hide);
m_hide = TRUE;
}
- if (op->type()!=DocIncOperator::Skip)
+ if (op.type()!=DocIncOperator::Skip)
{
m_hide = popHidden();
if (!m_hide)
{
FileDef *fd = 0;
- if (!op->includeFileName().isEmpty())
+ if (!op.includeFileName().isEmpty())
{
- FileInfo cfi( op->includeFileName().str() );
+ FileInfo cfi( op.includeFileName().str() );
fd = createFileDef( cfi.dirPath(), cfi.fileName() );
}
- getCodeParser(locLangExt).parseCode(m_ci,op->context(),op->text(),langExt,
- op->isExample(),op->exampleFile(),
+ getCodeParser(locLangExt).parseCode(m_ci,op.context(),op.text(),langExt,
+ op.isExample(),op.exampleFile(),
fd, // fileDef
- op->line(), // startLine
+ op.line(), // startLine
-1, // endLine
FALSE, // inline fragment
0, // memberDef
- op->showLineNo() // show line numbers
+ op.showLineNo() // show line numbers
);
if (fd) delete fd;
}
pushHidden(m_hide);
m_hide=TRUE;
}
- if (op->isLast())
+ if (op.isLast())
{
m_hide = popHidden();
if (!m_hide)
}
}
-void ManDocVisitor::visit(DocFormula *f)
+void ManDocVisitor::operator()(const DocFormula &f)
{
if (m_hide) return;
- m_t << f->text();
+ m_t << f.text();
}
-void ManDocVisitor::visit(DocIndexEntry *)
+void ManDocVisitor::operator()(const DocIndexEntry &)
{
}
-void ManDocVisitor::visit(DocSimpleSectSep *)
+void ManDocVisitor::operator()(const DocSimpleSectSep &)
{
}
-void ManDocVisitor::visit(DocCite *cite)
+void ManDocVisitor::operator()(const DocCite &cite)
{
if (m_hide) return;
m_t << "\\fB";
- if (cite->file().isEmpty()) m_t << "[";
- filter(cite->text());
- if (cite->file().isEmpty()) m_t << "]";
+ if (cite.file().isEmpty()) m_t << "[";
+ filter(cite.text());
+ if (cite.file().isEmpty()) m_t << "]";
m_t << "\\fP";
}
+void ManDocVisitor::operator()(const DocSeparator &s)
+{
+ if (m_hide) return;
+ m_t << s.chars();
+}
+
//--------------------------------------
// visitor functions for compound nodes
//--------------------------------------
-void ManDocVisitor::visitPre(DocAutoList *)
+void ManDocVisitor::operator()(const DocAutoList &l)
{
if (m_hide) return;
m_indent+=2;
-}
-
-void ManDocVisitor::visitPost(DocAutoList *)
-{
- if (m_hide) return;
+ visitChildren(l);
m_indent-=2;
m_t << ".PP\n";
}
-void ManDocVisitor::visitPre(DocAutoListItem *li)
+void ManDocVisitor::operator()(const DocAutoListItem &li)
{
if (m_hide) return;
QCString ws;
ws.fill(' ',m_indent-2);
if (!m_firstCol) m_t << "\n";
m_t << ".IP \"" << ws;
- if (((DocAutoList *)li->parent())->isEnumList())
+ const DocAutoList *list = std::get_if<DocAutoList>(li.parent());
+ if (list && list->isEnumList())
{
- m_t << li->itemNumber() << ".\" " << m_indent+2;
+ m_t << li.itemNumber() << ".\" " << m_indent+2;
}
else // bullet list
{
}
m_t << "\n";
m_firstCol=TRUE;
-}
-
-void ManDocVisitor::visitPost(DocAutoListItem *)
-{
- if (m_hide) return;
+ visitChildren(li);
m_t << "\n";
m_firstCol=TRUE;
}
-void ManDocVisitor::visitPre(DocPara *)
-{
-}
-
-void ManDocVisitor::visitPost(DocPara *p)
+void ManDocVisitor::operator()(const DocPara &p)
{
if (m_hide) return;
- if (!p->isLast() && // omit <p> for last paragraph
- !(p->parent() && // and for parameter sections
- p->parent()->kind()==DocNode::Kind_ParamSect
+ visitChildren(p);
+ if (!p.isLast() && // omit <p> for last paragraph
+ !(p.parent() && // and for parameter sections
+ std::get_if<DocParamSect>(p.parent())
)
)
{
}
}
-void ManDocVisitor::visitPre(DocRoot *)
+void ManDocVisitor::operator()(const DocRoot &r)
{
+ visitChildren(r);
}
-void ManDocVisitor::visitPost(DocRoot *)
-{
-}
-
-void ManDocVisitor::visitPre(DocSimpleSect *s)
+void ManDocVisitor::operator()(const DocSimpleSect &s)
{
if (m_hide) return;
if (!m_firstCol)
m_t << ".PP\n";
}
m_t << "\\fB";
- switch(s->type())
+ switch(s.type())
{
case DocSimpleSect::See:
m_t << theTranslator->trSeeAlso(); break;
}
// special case 1: user defined title
- if (s->type()!=DocSimpleSect::User && s->type()!=DocSimpleSect::Rcs)
+ if (s.title())
{
- m_t << "\\fP\n";
- m_t << ".RS 4\n";
+ std::visit(*this,*s.title());
}
-}
-
-void ManDocVisitor::visitPost(DocSimpleSect *)
-{
- if (m_hide) return;
+ m_t << "\\fP\n";
+ m_t << ".RS 4\n";
+ visitChildren(s);
if (!m_firstCol) m_t << "\n";
m_t << ".RE\n";
m_t << ".PP\n";
m_firstCol=TRUE;
}
-void ManDocVisitor::visitPre(DocTitle *)
-{
-}
-
-void ManDocVisitor::visitPost(DocTitle *)
+void ManDocVisitor::operator()(const DocTitle &t)
{
if (m_hide) return;
- m_t << "\\fP\n";
- m_t << ".RS 4\n";
+ visitChildren(t);
}
-void ManDocVisitor::visitPre(DocSimpleList *)
+void ManDocVisitor::operator()(const DocSimpleList &l)
{
if (m_hide) return;
m_indent+=2;
if (!m_firstCol) m_t << "\n";
m_t << ".PD 0\n";
-}
-
-void ManDocVisitor::visitPost(DocSimpleList *)
-{
- if (m_hide) return;
+ visitChildren(l);
m_indent-=2;
m_t << ".PP\n";
}
-void ManDocVisitor::visitPre(DocSimpleListItem *)
+void ManDocVisitor::operator()(const DocSimpleListItem &li)
{
if (m_hide) return;
QCString ws;
if (!m_firstCol) m_t << "\n";
m_t << ".IP \"" << ws << "\\(bu\" " << m_indent << "\n";
m_firstCol=TRUE;
-}
-
-void ManDocVisitor::visitPost(DocSimpleListItem *)
-{
- if (m_hide) return;
+ if (li.paragraph())
+ {
+ visit(*this,*li.paragraph());
+ }
m_t << "\n";
m_firstCol=TRUE;
}
-void ManDocVisitor::visitPre(DocSection *s)
+void ManDocVisitor::operator()(const DocSection &s)
{
if (m_hide) return;
if (!m_firstCol) m_t << "\n";
- if (s->level()==1) m_t << ".SH"; else m_t << ".SS";
+ if (s.level()==1) m_t << ".SH"; else m_t << ".SS";
m_t << " \"";
- filter(s->title());
+ filter(s.title());
m_t << "\"\n";
- if (s->level()==1) m_t << ".PP\n";
+ if (s.level()==1) m_t << ".PP\n";
m_firstCol=TRUE;
+ visitChildren(s);
}
-void ManDocVisitor::visitPost(DocSection *)
-{
-}
-
-void ManDocVisitor::visitPre(DocHtmlList *l)
+void ManDocVisitor::operator()(const DocHtmlList &l)
{
if (m_hide) return;
m_indent+=2;
m_t << ".PD 0\n";
man_listItemInfo[m_indent].number = 1;
man_listItemInfo[m_indent].type = '1';
- for (const auto &opt : l->attribs())
+ for (const auto &opt : l.attribs())
{
if (opt.name=="type")
{
if (ok) man_listItemInfo[m_indent].number = val;
}
}
-}
-
-void ManDocVisitor::visitPost(DocHtmlList *)
-{
- if (m_hide) return;
+ visitChildren(l);
m_indent-=2;
if (!m_firstCol) m_t << "\n";
m_t << ".PP\n";
}
-void ManDocVisitor::visitPre(DocHtmlListItem *li)
+void ManDocVisitor::operator()(const DocHtmlListItem &li)
{
if (m_hide) return;
QCString ws;
ws.fill(' ',m_indent-2);
if (!m_firstCol) m_t << "\n";
m_t << ".IP \"" << ws;
- if (((DocHtmlList *)li->parent())->type()==DocHtmlList::Ordered)
+ const DocHtmlList *list = std::get_if<DocHtmlList>(li.parent());
+ if (list && list->type()==DocHtmlList::Ordered)
{
- for (const auto &opt : li->attribs())
+ for (const auto &opt : li.attribs())
{
if (opt.name=="value")
{
}
m_t << "\n";
m_firstCol=TRUE;
-}
-
-void ManDocVisitor::visitPost(DocHtmlListItem *)
-{
- if (m_hide) return;
+ visitChildren(li);
m_t << "\n";
m_firstCol=TRUE;
}
-//void ManDocVisitor::visitPre(DocHtmlPre *)
-//{
-// if (!m_firstCol) m_t << "\n";
-// m_t << ".PP\n";
-// m_t << ".nf\n";
-// m_insidePre=TRUE;
-//}
-//
-//void ManDocVisitor::visitPost(DocHtmlPre *)
-//{
-// m_insidePre=FALSE;
-// if (!m_firstCol) m_t << "\n";
-// m_t << ".fi\n";
-// m_t << ".PP\n";
-// m_firstCol=TRUE;
-//}
-
-void ManDocVisitor::visitPre(DocHtmlDescList *)
-{
-}
-
-void ManDocVisitor::visitPost(DocHtmlDescList *)
+void ManDocVisitor::operator()(const DocHtmlDescList &dl)
{
if (m_hide) return;
+ visitChildren(dl);
if (!m_firstCol) m_t << "\n";
m_t << ".PP\n";
m_firstCol=TRUE;
}
-void ManDocVisitor::visitPre(DocHtmlDescTitle *)
+void ManDocVisitor::operator()(const DocHtmlDescTitle &dt)
{
if (m_hide) return;
if (!m_firstCol) m_t << "\n";
m_t << ".IP \"\\fB";
m_firstCol=FALSE;
-}
-
-void ManDocVisitor::visitPost(DocHtmlDescTitle *)
-{
- if (m_hide) return;
+ visitChildren(dt);
m_t << "\\fP\" 1c\n";
m_firstCol=TRUE;
}
-void ManDocVisitor::visitPre(DocHtmlDescData *)
-{
-}
-
-void ManDocVisitor::visitPost(DocHtmlDescData *)
-{
-}
-
-void ManDocVisitor::visitPre(DocHtmlTable *)
-{
-}
-
-void ManDocVisitor::visitPost(DocHtmlTable *)
-{
-}
-
-void ManDocVisitor::visitPre(DocHtmlCaption *)
-{
-}
-
-void ManDocVisitor::visitPost(DocHtmlCaption *)
-{
-}
-
-void ManDocVisitor::visitPre(DocHtmlRow *)
+void ManDocVisitor::operator()(const DocHtmlDescData &dd)
{
+ visitChildren(dd);
}
-void ManDocVisitor::visitPost(DocHtmlRow *)
+void ManDocVisitor::operator()(const DocHtmlTable &t)
{
+ visitChildren(t);
}
-void ManDocVisitor::visitPre(DocHtmlCell *)
+void ManDocVisitor::operator()(const DocHtmlCaption &c)
{
+ visitChildren(c);
}
-void ManDocVisitor::visitPost(DocHtmlCell *)
+void ManDocVisitor::operator()(const DocHtmlRow &r)
{
+ visitChildren(r);
}
-void ManDocVisitor::visitPre(DocInternal *)
+void ManDocVisitor::operator()(const DocHtmlCell &c)
{
- if (m_hide) return;
- //if (!m_firstCol) m_t << "\n";
- //m_t << ".PP\n";
- //m_t << "\\fB" << theTranslator->trForInternalUseOnly() << "\\fP\n";
- //m_t << ".RS 4\n";
+ visitChildren(c);
}
-void ManDocVisitor::visitPost(DocInternal *)
+void ManDocVisitor::operator()(const DocInternal &i)
{
- if (m_hide) return;
- //if (!m_firstCol) m_t << "\n";
- //m_t << ".RE\n";
- //m_t << ".PP\n";
- //m_firstCol=TRUE;
+ visitChildren(i);
}
-void ManDocVisitor::visitPre(DocHRef *)
+void ManDocVisitor::operator()(const DocHRef &href)
{
if (m_hide) return;
m_t << "\\fC";
-}
-
-void ManDocVisitor::visitPost(DocHRef *)
-{
- if (m_hide) return;
+ visitChildren(href);
m_t << "\\fP";
}
-void ManDocVisitor::visitPre(DocHtmlHeader *header)
+void ManDocVisitor::operator()(const DocHtmlHeader &header)
{
if (m_hide) return;
if (!m_firstCol) m_t << "\n";
- if (header->level()==1) m_t << ".SH"; else m_t << ".SS";
+ if (header.level()==1) m_t << ".SH"; else m_t << ".SS";
m_t << " \"";
-}
-
-void ManDocVisitor::visitPost(DocHtmlHeader *header)
-{
- if (m_hide) return;
+ visitChildren(header);
m_t << "\"\n";
- if (header->level()==1) m_t << ".PP\n";
+ if (header.level()==1) m_t << ".PP\n";
m_firstCol=TRUE;
}
-void ManDocVisitor::visitPre(DocImage *)
+void ManDocVisitor::operator()(const DocImage &)
{
}
-void ManDocVisitor::visitPost(DocImage *)
-{
-}
-
-void ManDocVisitor::visitPre(DocDotFile *)
-{
-}
-
-void ManDocVisitor::visitPost(DocDotFile *)
-{
-}
-void ManDocVisitor::visitPre(DocMscFile *)
+void ManDocVisitor::operator()(const DocDotFile &f)
{
}
-void ManDocVisitor::visitPost(DocMscFile *)
+void ManDocVisitor::operator()(const DocMscFile &)
{
}
-void ManDocVisitor::visitPre(DocDiaFile *)
+void ManDocVisitor::operator()(const DocDiaFile &)
{
}
-void ManDocVisitor::visitPost(DocDiaFile *)
-{
-}
-
-void ManDocVisitor::visitPre(DocLink *)
+void ManDocVisitor::operator()(const DocLink &dl)
{
if (m_hide) return;
m_t << "\\fB";
-}
-
-void ManDocVisitor::visitPost(DocLink *)
-{
- if (m_hide) return;
+ visitChildren(dl);
m_t << "\\fP";
}
-void ManDocVisitor::visitPre(DocRef *ref)
+void ManDocVisitor::operator()(const DocRef &ref)
{
if (m_hide) return;
m_t << "\\fB";
- if (!ref->hasLinkText()) filter(ref->targetTitle());
-}
-
-void ManDocVisitor::visitPost(DocRef *)
-{
- if (m_hide) return;
+ if (!ref.hasLinkText()) filter(ref.targetTitle());
+ visitChildren(ref);
m_t << "\\fP";
}
-void ManDocVisitor::visitPre(DocSecRefItem *)
+void ManDocVisitor::operator()(const DocSecRefItem &ref)
{
if (m_hide) return;
QCString ws;
if (!m_firstCol) m_t << "\n";
m_t << ".IP \"" << ws << "\\(bu\" " << m_indent << "\n";
m_firstCol=TRUE;
-}
-
-void ManDocVisitor::visitPost(DocSecRefItem *)
-{
- if (m_hide) return;
+ visitChildren(ref);
m_t << "\n";
m_firstCol=TRUE;
}
-void ManDocVisitor::visitPre(DocSecRefList *)
+void ManDocVisitor::operator()(const DocSecRefList &l)
{
if (m_hide) return;
m_indent+=2;
-}
-
-void ManDocVisitor::visitPost(DocSecRefList *)
-{
- if (m_hide) return;
+ visitChildren(l);
m_indent-=2;
if (!m_firstCol) m_t << "\n";
m_t << ".PP\n";
}
-void ManDocVisitor::visitPre(DocParamSect *s)
+void ManDocVisitor::operator()(const DocParamSect &s)
{
if (m_hide) return;
if (!m_firstCol)
m_t << ".PP\n";
}
m_t << "\\fB";
- switch(s->type())
+ switch(s.type())
{
case DocParamSect::Param:
m_t << theTranslator->trParameters(); break;
}
m_t << "\\fP\n";
m_t << ".RS 4\n";
-}
-
-void ManDocVisitor::visitPost(DocParamSect *)
-{
- if (m_hide) return;
+ visitChildren(s);
if (!m_firstCol) m_t << "\n";
m_t << ".RE\n";
m_t << ".PP\n";
m_firstCol=TRUE;
}
-void ManDocVisitor::visitPre(DocParamList *pl)
+void ManDocVisitor::operator()(const DocParamList &pl)
{
if (m_hide) return;
m_t << "\\fI";
bool first=TRUE;
- for (const auto ¶m : pl->parameters())
+ for (const auto ¶m : pl.parameters())
{
if (!first) m_t << ","; else first=FALSE;
- if (param->kind()==DocNode::Kind_Word)
- {
- visit((DocWord*)param.get());
- }
- else if (param->kind()==DocNode::Kind_LinkedWord)
- {
- visit((DocLinkedWord*)param.get());
- }
+ std::visit(*this,param);
}
m_t << "\\fP ";
-}
-
-void ManDocVisitor::visitPost(DocParamList *pl)
-{
- if (m_hide) return;
- if (!pl->isLast())
+ for (const auto &par : pl.paragraphs())
+ {
+ std::visit(*this,par);
+ }
+ if (!pl.isLast())
{
if (!m_firstCol) m_t << "\n";
m_t << ".br\n";
}
}
-void ManDocVisitor::visitPre(DocXRefItem *x)
+void ManDocVisitor::operator()(const DocXRefItem &x)
{
if (m_hide) return;
- if (x->title().isEmpty()) return;
+ if (x.title().isEmpty()) return;
if (!m_firstCol)
{
m_t << "\n";
m_t << ".PP\n";
}
m_t << "\\fB";
- filter(x->title());
+ filter(x.title());
m_t << "\\fP\n";
m_t << ".RS 4\n";
-}
-
-void ManDocVisitor::visitPost(DocXRefItem *x)
-{
- if (m_hide) return;
- if (x->title().isEmpty()) return;
+ visitChildren(x);
+ if (x.title().isEmpty()) return;
if (!m_firstCol) m_t << "\n";
m_t << ".RE\n";
m_t << ".PP\n";
m_firstCol=TRUE;
}
-void ManDocVisitor::visitPre(DocInternalRef *)
+void ManDocVisitor::operator()(const DocInternalRef &ref)
{
if (m_hide) return;
m_t << "\\fB";
-}
-
-void ManDocVisitor::visitPost(DocInternalRef *)
-{
- if (m_hide) return;
+ visitChildren(ref);
m_t << "\\fP";
}
-void ManDocVisitor::visitPre(DocText *)
+void ManDocVisitor::operator()(const DocText &t)
{
+ visitChildren(t);
}
-void ManDocVisitor::visitPost(DocText *)
-{
-}
-
-void ManDocVisitor::visitPre(DocHtmlBlockQuote *)
+void ManDocVisitor::operator()(const DocHtmlBlockQuote &q)
{
if (m_hide) return;
if (!m_firstCol)
m_t << ".PP\n";
}
m_t << ".RS 4\n"; // TODO: add support for nested block quotes
-}
-
-void ManDocVisitor::visitPost(DocHtmlBlockQuote *)
-{
- if (m_hide) return;
+ visitChildren(q);
if (!m_firstCol) m_t << "\n";
m_t << ".RE\n";
m_t << ".PP\n";
m_firstCol=TRUE;
}
-void ManDocVisitor::visitPre(DocVhdlFlow *)
-{
-}
-
-void ManDocVisitor::visitPost(DocVhdlFlow *)
+void ManDocVisitor::operator()(const DocVhdlFlow &)
{
}
-void ManDocVisitor::visitPre(DocParBlock *)
+void ManDocVisitor::operator()(const DocParBlock &pb)
{
+ visitChildren(pb);
}
-void ManDocVisitor::visitPost(DocParBlock *)
-{
-}
-
-
void ManDocVisitor::filter(const QCString &str)
{
if (!str.isEmpty())
#include "qcstring.h"
#include "docvisitor.h"
+#include "docnode.h"
class CodeOutputInterface;
class TextStream;
// visitor functions for leaf nodes
//--------------------------------------
- void visit(DocWord *);
- void visit(DocLinkedWord *);
- void visit(DocWhiteSpace *);
- void visit(DocSymbol *);
- void visit(DocEmoji *);
- void visit(DocURL *);
- void visit(DocLineBreak *);
- void visit(DocHorRuler *);
- void visit(DocStyleChange *);
- void visit(DocVerbatim *);
- void visit(DocAnchor *);
- void visit(DocInclude *);
- void visit(DocIncOperator *);
- void visit(DocFormula *);
- void visit(DocIndexEntry *);
- void visit(DocSimpleSectSep *);
- void visit(DocCite *);
+ void operator()(const DocWord &);
+ void operator()(const DocLinkedWord &);
+ void operator()(const DocWhiteSpace &);
+ void operator()(const DocSymbol &);
+ void operator()(const DocEmoji &);
+ void operator()(const DocURL &);
+ void operator()(const DocLineBreak &);
+ void operator()(const DocHorRuler &);
+ void operator()(const DocStyleChange &);
+ void operator()(const DocVerbatim &);
+ void operator()(const DocAnchor &);
+ void operator()(const DocInclude &);
+ void operator()(const DocIncOperator &);
+ void operator()(const DocFormula &);
+ void operator()(const DocIndexEntry &);
+ void operator()(const DocSimpleSectSep &);
+ void operator()(const DocCite &);
+ void operator()(const DocSeparator &);
//--------------------------------------
// visitor functions for compound nodes
//--------------------------------------
- void visitPre(DocAutoList *);
- void visitPost(DocAutoList *);
- void visitPre(DocAutoListItem *);
- void visitPost(DocAutoListItem *);
- void visitPre(DocPara *);
- void visitPost(DocPara *);
- void visitPre(DocRoot *);
- void visitPost(DocRoot *);
- void visitPre(DocSimpleSect *);
- void visitPost(DocSimpleSect *);
- void visitPre(DocTitle *);
- void visitPost(DocTitle *);
- void visitPre(DocSimpleList *);
- void visitPost(DocSimpleList *);
- void visitPre(DocSimpleListItem *);
- void visitPost(DocSimpleListItem *);
- void visitPre(DocSection *s);
- void visitPost(DocSection *);
- void visitPre(DocHtmlList *s);
- void visitPost(DocHtmlList *s);
- void visitPre(DocHtmlListItem *);
- void visitPost(DocHtmlListItem *);
- //void visitPre(DocHtmlPre *);
- //void visitPost(DocHtmlPre *);
- void visitPre(DocHtmlDescList *);
- void visitPost(DocHtmlDescList *);
- void visitPre(DocHtmlDescTitle *);
- void visitPost(DocHtmlDescTitle *);
- void visitPre(DocHtmlDescData *);
- void visitPost(DocHtmlDescData *);
- void visitPre(DocHtmlTable *t);
- void visitPost(DocHtmlTable *t);
- void visitPre(DocHtmlCaption *);
- void visitPost(DocHtmlCaption *);
- void visitPre(DocHtmlRow *);
- void visitPost(DocHtmlRow *) ;
- void visitPre(DocHtmlCell *);
- void visitPost(DocHtmlCell *);
- void visitPre(DocInternal *);
- void visitPost(DocInternal *);
- void visitPre(DocHRef *);
- void visitPost(DocHRef *);
- void visitPre(DocHtmlHeader *);
- void visitPost(DocHtmlHeader *) ;
- void visitPre(DocImage *);
- void visitPost(DocImage *);
- void visitPre(DocDotFile *);
- void visitPost(DocDotFile *);
- void visitPre(DocMscFile *);
- void visitPost(DocMscFile *);
- void visitPre(DocDiaFile *);
- void visitPost(DocDiaFile *);
- void visitPre(DocLink *lnk);
- void visitPost(DocLink *);
- void visitPre(DocRef *ref);
- void visitPost(DocRef *);
- void visitPre(DocSecRefItem *);
- void visitPost(DocSecRefItem *);
- void visitPre(DocSecRefList *);
- void visitPost(DocSecRefList *);
- //void visitPre(DocLanguage *);
- //void visitPost(DocLanguage *);
- void visitPre(DocParamSect *);
- void visitPost(DocParamSect *);
- void visitPre(DocParamList *);
- void visitPost(DocParamList *);
- void visitPre(DocXRefItem *);
- void visitPost(DocXRefItem *);
- void visitPre(DocInternalRef *);
- void visitPost(DocInternalRef *);
- void visitPre(DocText *);
- void visitPost(DocText *);
- void visitPre(DocHtmlBlockQuote *);
- void visitPost(DocHtmlBlockQuote *);
- void visitPre(DocVhdlFlow *);
- void visitPost(DocVhdlFlow *);
- void visitPre(DocParBlock *);
- void visitPost(DocParBlock *);
+ void operator()(const DocAutoList &);
+ void operator()(const DocAutoListItem &);
+ void operator()(const DocPara &);
+ void operator()(const DocRoot &);
+ void operator()(const DocSimpleSect &);
+ void operator()(const DocTitle &);
+ void operator()(const DocSimpleList &);
+ void operator()(const DocSimpleListItem &);
+ void operator()(const DocSection &s);
+ void operator()(const DocHtmlList &s);
+ void operator()(const DocHtmlListItem &);
+ void operator()(const DocHtmlDescList &);
+ void operator()(const DocHtmlDescTitle &);
+ void operator()(const DocHtmlDescData &);
+ void operator()(const DocHtmlTable &t);
+ void operator()(const DocHtmlCaption &);
+ void operator()(const DocHtmlRow &);
+ void operator()(const DocHtmlCell &);
+ void operator()(const DocInternal &);
+ void operator()(const DocHRef &);
+ void operator()(const DocHtmlHeader &);
+ void operator()(const DocImage &);
+ void operator()(const DocDotFile &);
+ void operator()(const DocMscFile &);
+ void operator()(const DocDiaFile &);
+ void operator()(const DocLink &lnk);
+ void operator()(const DocRef &ref);
+ void operator()(const DocSecRefItem &);
+ void operator()(const DocSecRefList &);
+ void operator()(const DocParamSect &);
+ void operator()(const DocParamList &);
+ void operator()(const DocXRefItem &);
+ void operator()(const DocInternalRef &);
+ void operator()(const DocText &);
+ void operator()(const DocHtmlBlockQuote &);
+ void operator()(const DocVhdlFlow &);
+ void operator()(const DocParBlock &);
private:
+ template<class T>
+ void visitChildren(const T &t)
+ {
+ for (const auto &child : t.children())
+ {
+ std::visit(*this, child);
+ }
+ }
//--------------------------------------
// helper functions
{
}
-void ManGenerator::writeDoc(DocNode *n,const Definition *ctx,const MemberDef *,int)
+void ManGenerator::writeDoc(const IDocNodeAST *ast,const Definition *ctx,const MemberDef *,int)
{
- ManDocVisitor *visitor = new ManDocVisitor(m_t,*this,ctx?ctx->getDefFileExtension():QCString(""));
- n->accept(visitor);
- delete visitor;
+ const DocNodeAST *astImpl = dynamic_cast<const DocNodeAST *>(ast);
+ if (astImpl)
+ {
+ auto visitor { ManDocVisitor(m_t,*this,ctx?ctx->getDefFileExtension():QCString("")) };
+ std::visit(visitor,astImpl->root);
+ }
m_firstCol=FALSE;
m_paragraph = FALSE;
}
OutputType type() const { return Man; }
- void writeDoc(DocNode *,const Definition *,const MemberDef *,int);
+ void writeDoc(const IDocNodeAST *ast,const Definition *,const MemberDef *,int);
static void init();
void cleanup();
void endLabels();
void writeCodeAnchor(const QCString &) {}
- void setCurrentDoc(const Definition *,const QCString &,bool) {}
- void addWord(const QCString &,bool) {}
private:
bool m_firstCol = true;
}
}
data_s[j++]=0;
- fprintf(IOSTREAM,"> %s data=[%s…]\n",qPrint(func),data_s);
+ fprintf(IOSTREAM,"> %s data=[%s...]\n",qPrint(func),data_s);
s_indent++;
}
}
((data[i]>='a' && data[i]<='z') || \
(data[i]>='A' && data[i]<='Z') || \
(data[i]>='0' && data[i]<='9') || \
- (((unsigned char)data[i])>=0x80)) // unicode characters
+ (static_cast<unsigned char>(data[i])>=0x80)) // unicode characters
#define extraChar(i) \
(data[i]=='-' || data[i]=='+' || data[i]=='!' || \
{
using namespace std::placeholders;
// setup callback table for special characters
- m_actions[(unsigned int)'_'] = std::bind(&Markdown::processEmphasis, this,_1,_2,_3);
- m_actions[(unsigned int)'*'] = std::bind(&Markdown::processEmphasis, this,_1,_2,_3);
- m_actions[(unsigned int)'~'] = std::bind(&Markdown::processEmphasis, this,_1,_2,_3);
- m_actions[(unsigned int)'`'] = std::bind(&Markdown::processCodeSpan, this,_1,_2,_3);
- m_actions[(unsigned int)'\\']= std::bind(&Markdown::processSpecialCommand,this,_1,_2,_3);
- m_actions[(unsigned int)'@'] = std::bind(&Markdown::processSpecialCommand,this,_1,_2,_3);
- m_actions[(unsigned int)'['] = std::bind(&Markdown::processLink, this,_1,_2,_3);
- m_actions[(unsigned int)'!'] = std::bind(&Markdown::processLink, this,_1,_2,_3);
- m_actions[(unsigned int)'<'] = std::bind(&Markdown::processHtmlTag, this,_1,_2,_3);
- m_actions[(unsigned int)'-'] = std::bind(&Markdown::processNmdash, this,_1,_2,_3);
- m_actions[(unsigned int)'"'] = std::bind(&Markdown::processQuoted, this,_1,_2,_3);
+ m_actions[static_cast<unsigned int>('_')] = std::bind(&Markdown::processEmphasis, this,_1,_2,_3);
+ m_actions[static_cast<unsigned int>('*')] = std::bind(&Markdown::processEmphasis, this,_1,_2,_3);
+ m_actions[static_cast<unsigned int>('~')] = std::bind(&Markdown::processEmphasis, this,_1,_2,_3);
+ m_actions[static_cast<unsigned int>('`')] = std::bind(&Markdown::processCodeSpan, this,_1,_2,_3);
+ m_actions[static_cast<unsigned int>('\\')]= std::bind(&Markdown::processSpecialCommand,this,_1,_2,_3);
+ m_actions[static_cast<unsigned int>('@')] = std::bind(&Markdown::processSpecialCommand,this,_1,_2,_3);
+ m_actions[static_cast<unsigned int>('[')] = std::bind(&Markdown::processLink, this,_1,_2,_3);
+ m_actions[static_cast<unsigned int>('!')] = std::bind(&Markdown::processLink, this,_1,_2,_3);
+ m_actions[static_cast<unsigned int>('<')] = std::bind(&Markdown::processHtmlTag, this,_1,_2,_3);
+ m_actions[static_cast<unsigned int>('-')] = std::bind(&Markdown::processNmdash, this,_1,_2,_3);
+ m_actions[static_cast<unsigned int>('"')] = std::bind(&Markdown::processQuoted, this,_1,_2,_3);
(void)m_lineNr; // not used yet
}
//---------- constants -------
//
-const uchar g_utf8_nbsp[3] = { 0xc2, 0xa0, 0}; // UTF-8 nbsp
-const char *g_doxy_nsbp = "&_doxy_nbsp;"; // doxygen escape command for UTF-8 nbsp
+const char *g_utf8_nbsp = "\xc2\xa0"; // UTF-8 nbsp
+const char *g_doxy_nbsp = "&_doxy_nbsp;"; // doxygen escape command for UTF-8 nbsp
const int codeBlockIndent = 4;
//---------- helpers -------
{
TRACE(result);
if (size<0) size=0;
- result = QCString(data,(uint)size);
+ result = QCString(data,static_cast<size_t>(size));
TRACE_RESULT(result);
}
// skip over spaces
while (offset_<size_ && data_[offset_]==' ') offset_++;
// skip over label
- while (offset_<size_ && (c=data_[offset_])!=' ' && c!='\n') offset_++;
+ while (offset_<size_ && (c=data_[offset_])!=' ' && c!='\\' && c!='@' && c!='\n') offset_++;
return offset_;
}
return 0;
return endOfLabel(data_,offset_,size_);
};
- static const auto endOfFunc = [](const char *data_,int offset_,int size_) -> int
+ static const auto endOfFuncLike = [](const char *data_,int offset_,int size_,bool allowSpaces) -> int
{
if (offset_<size_ && data_[offset_]==' ') // we expect a space before the name
{
char c=0;
offset_++;
// skip over spaces
- while (offset_<size_ && data_[offset_]==' ') offset_++;
- // skip over name
- while (offset_<size_ && (c=data_[offset_])!=' ' && c!='\n' && c!='(') offset_++;
+ while (offset_<size_ && data_[offset_]==' ')
+ {
+ offset_++;
+ }
+ // skip over name (and optionally type)
+ while (offset_<size_ && (c=data_[offset_])!='\n' && (allowSpaces || c!=' ') && c!='(')
+ {
+ offset_++;
+ }
if (c=='(') // find the end of the function
{
int count=1;
return 0;
};
+ static const auto endOfFunc = [](const char *data_,int offset_,int size_) -> int
+ {
+ return endOfFuncLike(data_,offset_,size_,true);
+ };
+
static const auto endOfGuard = [](const char *data_,int offset_,int size_) -> int
{
- return endOfFunc(data_,offset_,size_);
+ return endOfFuncLike(data_,offset_,size_,false);
};
static const std::unordered_map<std::string,EndCmdFunc> cmdNames =
{ "property", endOfLine },
{ "protocol", endOfLine },
{ "ref", endOfLabel },
- { "refitem", endOfLabel },
+ { "refitem", endOfLine },
{ "related", endOfLabel },
{ "relatedalso", endOfLabel },
{ "relates", endOfLabel },
return 0;
}
nlTotal += nl;
- nl = 0;
// search for optional image attributes
QCString attributes;
i++;
}
nlTotal += nl;
- nl = 0;
if (i>=size) return 0; // premature end of comment -> no attributes
int attributesEnd=i;
convertStringFragment(attributes,data+attributesStart,attributesEnd-attributesStart);
writeMarkdownImage("latex", isImageInline, explicitTitle, title, content, link, attributes, fd);
writeMarkdownImage("rtf", isImageInline, explicitTitle, title, content, link, attributes, fd);
writeMarkdownImage("docbook", isImageInline, explicitTitle, title, content, link, attributes, fd);
+ writeMarkdownImage("xml", isImageInline, explicitTitle, title, content, link, attributes, fd);
}
else
{
else if (!(forg.exists() && forg.isReadable()))
{
FileInfo fi(m_fileName.str());
- QCString mdFile = m_fileName.left(m_fileName.length()-(uint)fi.fileName().length()) + link;
+ QCString mdFile = m_fileName.left(m_fileName.length()-fi.fileName().length()) + link;
FileInfo fmd(mdFile.str());
if (fmd.exists() && fmd.isReadable())
{
void Markdown::addStrEscapeUtf8Nbsp(const char *s,int len)
{
TRACE(s);
- if (Portable::strnstr(s,g_doxy_nsbp,len)==0) // no escape needed -> fast
+ if (Portable::strnstr(s,g_doxy_nbsp,len)==0) // no escape needed -> fast
{
m_out.addStr(s,len);
}
else // escape needed -> slow
{
- m_out.addStr(substitute(QCString(s).left(len),g_doxy_nsbp,(const char *)g_utf8_nbsp));
+ m_out.addStr(substitute(QCString(s).left(len),g_doxy_nbsp,g_utf8_nbsp));
}
}
while (i<size)
{
// skip over character that do not trigger a specific action
- while (end<size && ((action=m_actions[(uchar)data[end]])==0)) end++;
+ while (end<size && ((action=m_actions[static_cast<uchar>(data[end])])==0)) end++;
// and add them to the output
m_out.addStr(data+i,end-i);
if (end>=size) break;
if (reg::search(ti,match,r2))
{
std::string id = match[1].str();
- title = title.left((int)match.position());
+ title = title.left(match.position());
//printf("found match id='%s' title=%s\n",id.c_str(),qPrint(title));
TRACE_RESULT(QCString(id));
return QCString(id);
{
if (isFencedCodeBlock(data+pi,size-pi,currentIndent,lang,blockStart,blockEnd,blockOffset))
{
- writeFencedCodeBlock(data+pi,lang.data(),blockStart,blockEnd);
+ auto addSpecialCommand = [&](const QCString &startCmd,const QCString &endCmd)
+ {
+ int cmdPos = pi+blockStart+1;
+ QCString pl = QCString(data+cmdPos).left(blockEnd-blockStart-1);
+ uint ii = 0;
+ // check for absence of start command, either @start<cmd>, or \\start<cmd>
+ while (ii<pl.length() && qisspace(pl[ii])) ii++; // skip leading whitespace
+ if (ii+startCmd.length()>=pl.length() || // no room for start command
+ (pl[ii]!='\\' && pl[ii]!='@') || // no @ or \ after whitespace
+ qstrncmp(pl.data()+ii+1,startCmd.data(),startCmd.length())!=0) // no start command
+ {
+ pl = "@"+startCmd+"\\ilinebr " + pl + " @"+endCmd;
+ }
+ processSpecialCommand(pl.data(),0,pl.length());
+ };
+
+ if (!Config_getString(PLANTUML_JAR_PATH).isEmpty() && lang=="plantuml")
+ {
+ addSpecialCommand("startuml","enduml");
+ }
+ else if (Config_getBool(HAVE_DOT) && lang=="dot")
+ {
+ addSpecialCommand("dot","enddot");
+ }
+ else if (lang=="msc") // msc is built-in
+ {
+ addSpecialCommand("msc","endmsc");
+ }
+ else // normal code block
+ {
+ writeFencedCodeBlock(data+pi,lang.data(),blockStart,blockEnd);
+ }
i=pi+blockOffset;
pi=-1;
end=i+1;
int size = s.length();
int i=0,end=0,pi=-1,ref,level;
QCString id,link,title;
- int blockIndent = indent;
// get indent for the first line
end = i+1;
{
//printf("** end of list\n");
currentIndent = indent;
- blockIndent = indent;
insideList = false;
}
newBlock = false;
//printf("** start of list\n");
insideList = true;
currentIndent = listIndent;
- blockIndent = listIndent;
}
}
else if (isEndOfList(data+i,end-i))
//printf("** end of list\n");
insideList = false;
currentIndent = listIndent;
- blockIndent = listIndent;
}
else if (isEmptyLine(data+i,end-i))
{
{
int blockStart,blockEnd,blockOffset;
QCString lang;
- blockIndent = currentIndent;
+ int blockIndent = currentIndent;
//printf("isHeaderLine(%s)=%d\n",QCString(data+i).left(size-i).data(),level);
QCString endBlockName;
if (data[i]=='@' || data[i]=='\\') endBlockName = isBlockCommand(data+i,i,size-i);
{
m_out.addChar(data[i]);
m_out.addStr(endBlockName);
- pi=i;
i+=l+1;
break;
}
// qPrint(id),qPrint(link),qPrint(title));
m_linkRefs.insert({id.lower().str(),LinkRef(link,title)});
i=ref+pi;
- pi=-1;
end=i+1;
}
else if (isFencedCodeBlock(data+pi,size-pi,currentIndent,lang,blockStart,blockEnd,blockOffset))
int minIndent=maxIndent;
while (i<size)
{
- signed char c = (signed char)data[i++];
+ char c = data[i++];
switch(c)
{
case '\t': // expand tab
int nb = isUTF8NonBreakableSpace(data);
if (nb>0)
{
- m_out.addStr(g_doxy_nsbp);
+ m_out.addStr(g_doxy_nbsp);
i+=nb-1;
}
else
}
// post processing
- QCString result = substitute(m_out.get(),g_doxy_nsbp," ");
+ QCString result = substitute(m_out.get(),g_doxy_nbsp," ");
const char *p = result.data();
if (p)
{
break;
case ExplicitPageResult::explicitPage:
{
- // look for `@page label Title\n` and capture `label`
- static const reg::Ex re(R"([\\@]page\s+(\a[\w-]*)\s*[^\n]*\n)");
+ // look for `@page label My Title\n` and capture `label` (match[1]) and ` My Title` (match[2])
+ static const reg::Ex re(R"([\\@]page\s+(\a[\w-]*)(\s*[^\n]*)\n)");
reg::Match match;
std::string s = docs.str();
if (reg::search(s,match,re))
{
QCString orgLabel = match[1].str();
QCString newLabel = markdownFileNameToId(fileName);
- size_t labelStartPos = match[1].position();
- size_t labelEndPos = labelStartPos+match[1].length();
- size_t lineLen = match.length();
- docs = docs.left(labelStartPos)+ // part before label
+ docs = docs.left(match[1].position())+ // part before label
newLabel+ // new label
- docs.mid(labelEndPos,lineLen-labelEndPos-1)+ // part between orgLabel and \n
- "\\ilinebr @anchor "+orgLabel+"\n"+ // add original anchor
+ match[2].str()+ // part between orgLabel and \n
+ "\\ilinebr @anchor "+orgLabel+"\n"+ // add original anchor plus \n of above
docs.right(docs.length()-match.length()); // add remainder of docs
}
}
virtual MemberDef *fromAnonymousMember() const;
virtual bool hasCallGraph() const;
virtual bool hasCallerGraph() const;
- virtual bool visibleMemberGroup(bool hideNoHeader) const;
virtual bool hasReferencesRelation() const;
virtual bool hasReferencedByRelation() const;
virtual const MemberDef *templateMaster() const;
{ return getMdAlias()->hasCallGraph(); }
virtual bool hasCallerGraph() const
{ return getMdAlias()->hasCallerGraph(); }
- virtual bool visibleMemberGroup(bool hideNoHeader) const
- { return getMdAlias()->visibleMemberGroup(hideNoHeader); }
virtual bool hasReferencesRelation() const
{ return getMdAlias()->hasReferencesRelation(); }
virtual bool hasReferencedByRelation() const
QCString MemberDefImpl::getOutputFileBase() const
{
- static bool separateMemberPages = Config_getBool(SEPARATE_MEMBER_PAGES);
- static bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
+ bool separateMemberPages = Config_getBool(SEPARATE_MEMBER_PAGES);
+ bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
QCString baseName;
//printf("Member: %s: templateMaster=%p group=%p classDef=%p nspace=%p fileDef=%p\n",
void MemberDefImpl::_computeLinkableInProject()
{
- static bool extractStatic = Config_getBool(EXTRACT_STATIC);
- static bool extractPrivateVirtual = Config_getBool(EXTRACT_PRIV_VIRTUAL);
+ bool extractStatic = Config_getBool(EXTRACT_STATIC);
+ bool extractPrivateVirtual = Config_getBool(EXTRACT_PRIV_VIRTUAL);
m_isLinkableCached = 2; // linkable
//printf("MemberDefImpl::isLinkableInProject(name=%s)\n",qPrint(name()));
if (isHidden())
{
if (m_isLinkableCached==0)
{
- MemberDefImpl *that = (MemberDefImpl*)this;
+ MemberDefImpl *that = const_cast<MemberDefImpl*>(this);
that->_computeLinkableInProject();
}
ASSERT(m_isLinkableCached>0);
bool onlyText) const
{
SrcLangExt lang = getLanguage();
- static bool hideScopeNames = Config_getBool(HIDE_SCOPE_NAMES);
+ bool hideScopeNames = Config_getBool(HIDE_SCOPE_NAMES);
QCString sep = getLanguageSpecificSeparator(lang,TRUE);
QCString n = name();
const ClassDef *classDef = getClassDef();
*/
bool MemberDefImpl::isBriefSectionVisible() const
{
- static bool extractStatic = Config_getBool(EXTRACT_STATIC);
- static bool extractPrivateVirtual = Config_getBool(EXTRACT_PRIV_VIRTUAL);
- static bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
- static bool briefMemberDesc = Config_getBool(BRIEF_MEMBER_DESC);
- static bool repeatBrief = Config_getBool(REPEAT_BRIEF);
- static bool hideFriendCompounds = Config_getBool(HIDE_FRIEND_COMPOUNDS);
+ bool extractStatic = Config_getBool(EXTRACT_STATIC);
+ bool extractPrivateVirtual = Config_getBool(EXTRACT_PRIV_VIRTUAL);
+ bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
+ bool briefMemberDesc = Config_getBool(BRIEF_MEMBER_DESC);
+ bool repeatBrief = Config_getBool(REPEAT_BRIEF);
+ bool hideFriendCompounds = Config_getBool(HIDE_FRIEND_COMPOUNDS);
//printf("Member %s grpId=%d docs=%s file=%s args=%s\n",
// qPrint(name()),
bool endAnonScopeNeeded=FALSE;
if (reg::search(stype,match,r)) // member has an anonymous type
{
- int i = (int)match.position();
- int l = (int)match.length();
+ int i = static_cast<int>(match.position());
+ int l = static_cast<int>(match.length());
//printf("annoClassDef=%p annMemb=%p scopeName='%s' anonymous='%s'\n",
// annoClassDef,annMemb,qPrint(cname),qPrint(ltype.mid(i,l)));
// *** write name
if (!isAnonymous()) // hide anonymous stuff
{
- static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
- static bool extractPrivateVirtual = Config_getBool(EXTRACT_PRIV_VIRTUAL);
- static bool extractStatic = Config_getBool(EXTRACT_STATIC);
+ bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
+ bool extractPrivateVirtual = Config_getBool(EXTRACT_PRIV_VIRTUAL);
+ bool extractStatic = Config_getBool(EXTRACT_STATIC);
MemberDefMutable *annMemb = toMemberDefMutable(m_impl->annMemb);
//printf("Member name=`%s gd=%p md->groupDef=%p inGroup=%d isLinkable()=%d hasDocumentation=%d\n",qPrint(name()),gd,getGroupDef(),inGroup,isLinkable(),hasDocumentation());
if (!name().isEmpty() && // name valid
Config_getBool(BRIEF_MEMBER_DESC)
)
{
- std::unique_ptr<IDocParser> parser { createDocParser() };
- std::unique_ptr<DocRoot> rootNode { validatingParseDoc(*parser.get(),
- briefFile(),briefLine(),
- getOuterScope()?getOuterScope():d,
- this,briefDescription(),TRUE,FALSE,
- QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
-
- if (rootNode && !rootNode->isEmpty())
+ auto parser { createDocParser() };
+ auto ast { validatingParseDoc(*parser.get(),
+ briefFile(),briefLine(),
+ getOuterScope()?getOuterScope():d,
+ this,briefDescription(),TRUE,FALSE,
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
+ if (!ast->isEmpty())
{
ol.startMemberDescription(anchor(),inheritId);
- ol.writeDoc(rootNode.get(),getOuterScope()?getOuterScope():d,this);
+ ol.writeDoc(ast.get(),getOuterScope()?getOuterScope():d,this);
if (detailsVisible) // add More.. link only when both brief and details are visible
{
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
ol.docify(" ");
- ol.startTextLink(getOutputFileBase(),anchor());
+ MemberDefMutable *annMemb = NULL;
+ if (!isAnonymous()) // hide anonymous stuff
+ {
+ annMemb = toMemberDefMutable(m_impl->annMemb);
+ }
+ if (annMemb)
+ {
+ ol.startTextLink(annMemb->getOutputFileBase(),annMemb->anchor());
+ }
+ else
+ {
+ ol.startTextLink(getOutputFileBase(),anchor());
+ }
ol.parseText(theTranslator->trMore());
ol.endTextLink();
ol.popGeneratorState();
//printf(">hasDetailedDescription(cached=%d)\n",m_impl->hasDetailedDescriptionCached);
if (!m_impl->hasDetailedDescriptionCached)
{
- static bool extractAll = Config_getBool(EXTRACT_ALL);
- static bool alwaysDetailedSec = Config_getBool(ALWAYS_DETAILED_SEC);
- static bool repeatBrief = Config_getBool(REPEAT_BRIEF);
- static bool briefMemberDesc = Config_getBool(BRIEF_MEMBER_DESC);
- static bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
- static bool extractStatic = Config_getBool(EXTRACT_STATIC);
- static bool extractPrivateVirtual = Config_getBool(EXTRACT_PRIV_VIRTUAL);
- static bool inlineSources = Config_getBool(INLINE_SOURCES);
+ bool extractAll = Config_getBool(EXTRACT_ALL);
+ bool alwaysDetailedSec = Config_getBool(ALWAYS_DETAILED_SEC);
+ bool repeatBrief = Config_getBool(REPEAT_BRIEF);
+ bool briefMemberDesc = Config_getBool(BRIEF_MEMBER_DESC);
+ bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
+ bool extractStatic = Config_getBool(EXTRACT_STATIC);
+ bool extractPrivateVirtual = Config_getBool(EXTRACT_PRIV_VIRTUAL);
+ bool inlineSources = Config_getBool(INLINE_SOURCES);
// the member has detailed documentation because the user added some comments
bool docFilter =
bool MemberDefImpl::isDetailedSectionVisible(MemberListContainer container) const
{
- static bool separateMemPages = Config_getBool(SEPARATE_MEMBER_PAGES);
- static bool inlineSimpleStructs = Config_getBool(INLINE_SIMPLE_STRUCTS);
- static bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
+ bool separateMemPages = Config_getBool(SEPARATE_MEMBER_PAGES);
+ bool inlineSimpleStructs = Config_getBool(INLINE_SIMPLE_STRUCTS);
+ bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
bool groupFilter = getGroupDef()==0 || container==MemberListContainer::Group || separateMemPages;
bool fileFilter = getNamespaceDef()==0 || !getNamespaceDef()->isLinkable() || container!=MemberListContainer::File;
bool simpleFilter = (hasBriefDescription() || !hideUndocMembers) && inlineSimpleStructs &&
StringVector MemberDefImpl::getLabels(const Definition *container) const
{
StringVector sl;
- static bool inlineInfo = Config_getBool(INLINE_INFO);
+ bool inlineInfo = Config_getBool(INLINE_INFO);
Specifier lvirt=virtualness();
if ((!isObjCMethod() || isOptional() || isRequired()) &&
//ol.docify(" [");
SrcLangExt lang = getLanguage();
bool optVhdl = lang==SrcLangExt_VHDL;
- static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
+ bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
if (optVhdl)
{
sl.push_back(theTranslator->trVhdlType(getMemberSpecifiers(),TRUE).str());
QCString reimplInLine;
if (m_impl->virt==Pure || (getClassDef() && getClassDef()->compoundType()==ClassDef::Interface))
{
- reimplInLine = theTranslator->trImplementedInList((int)count);
+ reimplInLine = theTranslator->trImplementedInList(static_cast<int>(count));
}
else
{
- reimplInLine = theTranslator->trReimplementedInList((int)count);
+ reimplInLine = theTranslator->trReimplementedInList(static_cast<int>(count));
}
// write the list of classes that overwrite this member
//printf("start >%s<\n",qPrint(ldef));
int i=l-1;
while (i>=0 && (isId(ldef.at(i)) || ldef.at(i)==':')) i--;
- while (i>=0 && isspace((uchar)ldef.at(i))) i--;
+ while (i>=0 && isspace(static_cast<uchar>(ldef.at(i)))) i--;
if (i>0)
{
// insert braches around the type
{
// only write out the include file if this is not part of a class or file
// definition
- static bool showGroupedMembInc = Config_getBool(SHOW_GROUPED_MEMB_INC);
+ bool showGroupedMembInc = Config_getBool(SHOW_GROUPED_MEMB_INC);
const FileDef *fd = getFileDef();
QCString nm;
if (fd) nm = getFileDef()->docName();
//printf("start >%s<\n",qPrint(ldef));
int i=dl-1;
while (i>=0 && (isId(ldef.at(i)) || ldef.at(i)==':')) i--;
- while (i>=0 && isspace((uchar)ldef.at(i))) i--;
+ while (i>=0 && isspace(static_cast<uchar>(ldef.at(i)))) i--;
if (i>0)
{
// insert braches around the type
t="group", d=gd;
else
t="file", d=fd;
- static bool extractAll = Config_getBool(EXTRACT_ALL);
+ bool extractAll = Config_getBool(EXTRACT_ALL);
//printf("%s:warnIfUndoc: hasUserDocs=%d isFriendClass=%d protection=%d isRef=%d isDel=%d\n",
// qPrint(name()),
return trailRet;
}
+static std::mutex g_detectUndocumentedParamsMutex;
+
void MemberDefImpl::detectUndocumentedParams(bool hasParamCommand,bool hasReturnCommand) const
{
- QCString returnType = typeString();
- bool isPython = getLanguage()==SrcLangExt_Python;
- bool isFortran = getLanguage()==SrcLangExt_Fortran;
- bool isFortranSubroutine = isFortran && returnType.find("subroutine")!=-1;
+ // this function is called while parsing the documentation. A member can have multiple
+ // documentation blocks, which could be handled by multiple threads, hence this guard.
+ std::lock_guard<std::mutex> lock(g_detectUndocumentedParamsMutex);
- bool isVoidReturn = (returnType=="void") || (returnType.right(5)==" void");
- if (!isVoidReturn && returnType == "auto")
- {
- const ArgumentList &defArgList=isDocsForDefinition() ? argumentList() : declArgumentList();
- if (!defArgList.trailingReturnType().isEmpty())
- {
- QCString strippedTrailingReturn = stripTrailingReturn(defArgList.trailingReturnType());
- isVoidReturn = (strippedTrailingReturn=="void") || (strippedTrailingReturn.right(5)==" void");
- }
- }
+ bool isPython = getLanguage()==SrcLangExt_Python;
if (!m_impl->hasDocumentedParams && hasParamCommand)
{
{
m_impl->hasDocumentedReturnType = TRUE;
}
- else if ( // see if return type is documented in a function w/o return type
- hasReturnCommand &&
- (
- isVoidReturn || // void return type
- isFortranSubroutine || // fortran subroutine
- isConstructor() || // a constructor
- isDestructor() // or destructor
- )
- )
- {
-
- warn_doc_error(docFile(),docLine(),"documented empty return type of %s",
- qPrint(qualifiedName()));
- }
- else if ( // see if return needs to documented
- m_impl->hasDocumentedReturnType ||
- isVoidReturn || // void return type
- isFortranSubroutine || // fortran subroutine
- isConstructor() || // a constructor
- isDestructor() // or destructor
- )
- {
- m_impl->hasDocumentedReturnType = TRUE;
- }
}
void MemberDefImpl::warnIfUndocumentedParams() const
{
+ QCString returnType = typeString();
+ bool isFortran = getLanguage()==SrcLangExt_Fortran;
+ bool isFortranSubroutine = isFortran && returnType.find("subroutine")!=-1;
+
+ bool isVoidReturn = (returnType=="void") || (returnType.right(5)==" void");
+ if (!isVoidReturn && returnType == "auto")
+ {
+ const ArgumentList &defArgList=isDocsForDefinition() ? argumentList() : declArgumentList();
+ if (!defArgList.trailingReturnType().isEmpty())
+ {
+ QCString strippedTrailingReturn = stripTrailingReturn(defArgList.trailingReturnType());
+ isVoidReturn = (strippedTrailingReturn=="void") || (strippedTrailingReturn.right(5)==" void");
+ }
+ }
if (!Config_getBool(EXTRACT_ALL) &&
Config_getBool(WARN_IF_UNDOCUMENTED) &&
Config_getBool(WARN_NO_PARAMDOC) &&
!isReference() &&
!Doxygen::suppressDocWarnings)
{
- QCString returnType = typeString();
if (!m_impl->hasDocumentedParams)
{
warn_doc_error(docFile(),docLine(),
- "parameters of member %s are not (all) documented",
+ "parameters of member %s are not documented",
qPrint(qualifiedName()));
}
if (!m_impl->hasDocumentedReturnType &&
- hasDocumentation() && !returnType.isEmpty())
+ hasDocumentation() && !returnType.isEmpty() &&
+ !( // not one of the cases where nothing is returned
+ isVoidReturn || // void return type
+ isFortranSubroutine || // fortran subroutine
+ isConstructor() || // a constructor
+ isDestructor() // or destructor
+ )
+ )
{
warn_doc_error(docFile(),docLine(),
"return type of member %s is not documented",
qPrint(qualifiedName()));
}
}
+ if (Config_getBool(WARN_IF_DOC_ERROR) &&
+ m_impl->hasDocumentedReturnType &&
+ (isVoidReturn || // void return type
+ isFortranSubroutine || // fortran subroutine
+ isConstructor() || // a constructor
+ isDestructor())) // or destructor
+ {
+ warn_doc_error(docFile(),docLine(),"found documented return type for %s that does not return anything",
+ qPrint(qualifiedName()));
+ }
}
bool MemberDefImpl::isDocumentedFriendClass() const
m_impl->memberGroup = grp;
}
-bool MemberDefImpl::visibleMemberGroup(bool hideNoHeader) const
-{
- return m_impl->memberGroup!=0 &&
- (!hideNoHeader || m_impl->memberGroup->header()!="[NOHEADER]");
-}
-
QCString MemberDefImpl::getScopeString() const
{
QCString result;
if (m_impl->tArgList.hasParameters())
{
char buf[20];
- qsnprintf(buf,20,"%d:",(int)m_impl->tArgList.size());
+ qsnprintf(buf,20,"%d:",static_cast<int>(m_impl->tArgList.size()));
buf[19]='\0';
memAnchor.prepend(buf);
}
// convert to md5 hash
uchar md5_sig[16];
char sigStr[33];
- MD5Buffer((const unsigned char *)memAnchor.data(),memAnchor.length(),md5_sig);
+ MD5Buffer(memAnchor.data(),memAnchor.length(),md5_sig);
MD5SigToString(md5_sig,sigStr);
m_impl->anc = QCString("a")+sigStr;
}
m_impl->initializer=initializer;
int l=m_impl->initializer.length();
int p=l-1;
- while (p>=0 && isspace((uchar)m_impl->initializer.at(p))) p--;
+ while (p>=0 && isspace(static_cast<uchar>(m_impl->initializer.at(p)))) p--;
m_impl->initializer=m_impl->initializer.left(p+1);
m_impl->initLines=m_impl->initializer.contains('\n');
//printf("%s::setInitializer(%s)\n",qPrint(name()),qPrint(m_impl->initializer));
void MemberDefImpl::addListReference(Definition *)
{
- static bool optimizeOutputForC = Config_getBool(OPTIMIZE_OUTPUT_FOR_C);
- //static bool hideScopeNames = Config_getBool(HIDE_SCOPE_NAMES);
- //static bool optimizeOutputJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
- //static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ bool optimizeOutputForC = Config_getBool(OPTIMIZE_OUTPUT_FOR_C);
+ //bool hideScopeNames = Config_getBool(HIDE_SCOPE_NAMES);
+ //bool optimizeOutputJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
+ //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
SrcLangExt lang = getLanguage();
if (!isLinkableInProject()) return;
QCString memLabel;
{
if (m_isConstructorCached==0)
{
- MemberDefImpl *that = (MemberDefImpl*)this;
+ MemberDefImpl *that = const_cast<MemberDefImpl*>(this);
that->_computeIsConstructor();
}
ASSERT(m_isConstructorCached>0);
{
if (m_isDestructorCached==0)
{
- MemberDefImpl *that=(MemberDefImpl*)this;
+ MemberDefImpl *that=const_cast<MemberDefImpl*>(this);
that->_computeIsDestructor();
}
ASSERT(m_isDestructorCached>0);
typeDecl.writeChar(' ');
}
- uint enumValuesPerLine = (uint)Config_getInt(ENUM_VALUES_PER_LINE);
+ uint enumValuesPerLine = static_cast<uint>(Config_getInt(ENUM_VALUES_PER_LINE));
if (numVisibleEnumValues>0 && enumValuesPerLine>0)
{
typeDecl.docify("{ ");
if (sameNumTemplateArgs &&
matchArguments2(mdef->getOuterScope(),mdef->getFileDef(),&mdefAl,
mdec->getOuterScope(),mdec->getFileDef(),&mdecAl,
- TRUE
+ TRUE,mdef->getLanguage()
)
) /* match found */
{
bool MemberDefImpl::isFriendToHide() const
{
- static bool hideFriendCompounds = Config_getBool(HIDE_FRIEND_COMPOUNDS);
+ bool hideFriendCompounds = Config_getBool(HIDE_FRIEND_COMPOUNDS);
bool isFriendToHide = hideFriendCompounds &&
(m_impl->type=="friend class" ||
m_impl->type=="friend struct" ||
class MemberDef : public Definition
{
public:
- virtual ~MemberDef() {}
virtual DefType definitionType() const = 0;
// move this member into a different scope
virtual MemberDef *deepCopy() const =0;
// callgraph related members
virtual bool hasCallGraph() const = 0;
virtual bool hasCallerGraph() const = 0;
- virtual bool visibleMemberGroup(bool hideNoHeader) const = 0;
// referenced related members
virtual bool hasReferencesRelation() const = 0;
virtual bool hasReferencedByRelation() const = 0;
{
//printf("MemberGroup::writeDeclarations() %s\n",qPrint(grpHeader));
QCString ldoc = doc;
- if (!ldoc.isEmpty()) ldoc.prepend("<a name=\""+anchor()+"\" id=\""+anchor()+"\"></a>");
memberList->writeDeclarations(ol,cd,nd,fd,gd,grpHeader,ldoc,FALSE,showInline);
}
return memberList->numDocEnumValues();
}
-QCString MemberGroup::anchor() const
-{
- uchar md5_sig[16];
- char sigStr[33];
- QCString locHeader = grpHeader;
- if (locHeader.isEmpty()) locHeader="[NOHEADER]";
- MD5Buffer((const unsigned char *)locHeader.data(),locHeader.length(),md5_sig);
- MD5SigToString(md5_sig,sigStr);
- return QCString("amgrp")+sigStr;
-}
-
void MemberGroup::addListReferences(Definition *def)
{
memberList->addListReferences(def);
- if (def)
- {
- QCString name = def->getOutputFileBase()+"#"+anchor();
- addRefItem(m_xrefListItems,
- name,
- theTranslator->trGroup(TRUE,TRUE),
- name,
- grpHeader,QCString(),def);
- }
}
void MemberGroup::findSectionsInDocumentation(const Definition *d)
void addListReferences(Definition *d);
void setRefItems(const RefItemVector &sli);
const MemberList &members() const { return *memberList.get(); }
- QCString anchor() const;
QCString docFile() const { return m_docFile; }
int docLine() const { return m_docLine; }
ol.endMemberItem();
if (!md->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
{
- std::unique_ptr<IDocParser> parser { createDocParser() };
- std::unique_ptr<DocRoot> rootNode { validatingParseDoc(*parser.get(),
- md->briefFile(),md->briefLine(),
- cd,md,
- md->briefDescription(),
- TRUE,FALSE,
- QCString(),TRUE,FALSE,
- Config_getBool(MARKDOWN_SUPPORT)) };
- if (rootNode && !rootNode->isEmpty())
+ auto parser { createDocParser() };
+ auto ast { validatingParseDoc(*parser.get(),
+ md->briefFile(),md->briefLine(),
+ cd,md,
+ md->briefDescription(),
+ TRUE,FALSE,
+ QCString(),TRUE,FALSE,
+ Config_getBool(MARKDOWN_SUPPORT)) };
+ if (!ast->isEmpty())
{
ol.startMemberDescription(md->anchor());
- ol.writeDoc(rootNode.get(),cd,md);
+ ol.writeDoc(ast.get(),cd,md);
if (md->hasDetailedDescription())
{
ol.disableAllBut(OutputGenerator::Html);
(void)showEnumValues; // unused
//printf("----- writeDeclaration() this=%p ---- inheritedFrom=%p\n",this,inheritedFrom);
- static bool optimizeVhdl = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ bool optimizeVhdl = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
QCString inheritId;
const Definition *ctx = cd;
//printf("memberGroupList=%p\n",memberGroupList);
for (const auto &mg : m_memberGroupRefList)
{
- bool hasHeader=!mg->header().isEmpty() && mg->header()!="[NOHEADER]";
+ bool hasHeader=!mg->header().isEmpty();
if (inheritId.isEmpty())
{
//printf("mg->header=%s hasHeader=%d\n",qPrint(mg->header()),hasHeader);
void MemberList::writeDocumentationPage(OutputList &ol,
const QCString &scopeName, const DefinitionMutable *container) const
{
- static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
+ bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
struct OverloadInfo
{
public:
MemberInfo(const MemberDef *md,Protection p,Specifier v,bool inh) :
m_memberDef(md), m_prot(p), m_virt(v), m_inherited(inh) {}
- ~MemberInfo() {}
+ ~MemberInfo() = default;
// getters
const MemberDef *memberDef() { return m_memberDef; }
#include "doxygen.h"
#include <mutex>
+#include <atomic>
// globals
static QCString g_warnFormat;
+static QCString g_warnLineFormat;
static const char * g_warningStr = "warning: ";
static const char * g_errorStr = "error: ";
static FILE * g_warnFile = stderr;
static WARN_AS_ERROR_t g_warnBehavior = WARN_AS_ERROR_t::NO;
-static bool g_warnStat = false;
+static std::atomic_bool g_warnStat = false;
static std::mutex g_mutex;
void initWarningFormat()
{
g_warnFormat = Config_getString(WARN_FORMAT);
+ g_warnLineFormat = Config_getString(WARN_LINE_FORMAT);
QCString logFile = Config_getString(WARN_LOGFILE);
if (!logFile.isEmpty())
std::unique_lock<std::mutex> lock(g_mutex);
if (Debug::isFlagSet(Debug::Time))
{
- printf("%.3f sec: ",((double)Debug::elapsedTime()));
+ printf("%.3f sec: ",(static_cast<double>(Debug::elapsedTime())));
}
va_list args;
va_start(args, fmt);
}
if (g_warnBehavior == WARN_AS_ERROR_t::YES)
{
+ Doxygen::terminating=true;
exit(1);
}
g_warnStat = true;
QCString msgText = " (warning treated as error, aborting now)\n";
fwrite(msgText.data(),1,msgText.length(),g_warnFile);
}
+ Doxygen::terminating=true;
exit(1);
}
g_warnStat = true;
va_list argsCopy;
va_copy(argsCopy, args);
- int l=0;
+ size_t l=0;
if (prefix)
{
- l=(int)strlen(prefix);
+ l=strlen(prefix);
}
// determine needed buffersize based on:
// format + arguments
// prefix
// 1 position for `\0`
- int bufSize = vsnprintf(NULL, 0, fmt, args) + l + 1;
+ size_t bufSize = vsnprintf(NULL, 0, fmt, args) + l + 1;
QCString text(bufSize);
if (prefix)
{
qstrncpy(text.rawData(),prefix,bufSize);
}
vsnprintf(text.rawData()+l, bufSize-l, fmt, argsCopy);
- text[bufSize-1]='\0';
+ text[static_cast<int>(bufSize)-1]='\0';
format_warn(file,line,text);
va_end(argsCopy);
}
+QCString warn_line(const QCString &file,int line)
+{
+ QCString fileSubst = file.isEmpty() ? "<unknown>" : file;
+ QCString lineSubst; lineSubst.setNum(line);
+ return substitute(
+ substitute(
+ g_warnLineFormat,
+ "$file",fileSubst
+ ),
+ "$line",lineSubst
+ );
+}
void warn(const QCString &file,int line,const char *fmt, ...)
{
va_list args;
va_end(args);
if (g_warnFile != stderr)
{
- for (int i = 0; i < (int)strlen(g_errorStr); i++) fprintf(g_warnFile, " ");
+ size_t l = strlen(g_errorStr);
+ for (size_t i=0; i<l; i++) fprintf(g_warnFile, " ");
fprintf(g_warnFile, "%s\n", "Exiting...");
}
}
+ Doxygen::terminating=true;
exit(1);
}
{
if (g_warnStat && g_warnBehavior == WARN_AS_ERROR_t::FAIL_ON_WARNINGS)
{
+ Doxygen::terminating=true;
exit(1);
}
}
extern void err(const char *fmt, ...) PRINTFLIKE(1, 2);
extern void err_full(const QCString &file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
extern void term(const char *fmt, ...) PRINTFLIKE(1, 2);
+extern QCString warn_line(const QCString &file,int line);
void initWarningFormat();
void warn_flush();
extern void finishWarnExit();
#include "config.h"
#include "message.h"
#include "docparser.h"
+#include "docnode.h"
#include "doxygen.h"
#include "index.h"
#include "util.h"
{
// handle doxygen \ref tag URL reference
- std::unique_ptr<IDocParser> parser { createDocParser() };
- std::unique_ptr<DocRef> df { createRef( *parser.get(), url, context ) };
+ auto parser { createDocParser() };
+ auto dfAst { createRef( *parser.get(), url, context ) };
+ auto dfAstImpl = dynamic_cast<const DocNodeAST*>(dfAst.get());
+ const DocRef *df = std::get_if<DocRef>(&dfAstImpl->root);
t << externalRef(relPath,df->ref(),TRUE);
if (!df->file().isEmpty()) t << addHtmlExtensionIfMissing(df->file());
if (!df->anchor().isEmpty()) t << "#" << df->anchor();
virtual void countMembers();
virtual int numDocMembers() const;
virtual void addUsingDirective(const NamespaceDef *nd);
- virtual LinkedRefMap<const NamespaceDef> getUsedNamespaces() const { return m_usingDirList; }
+ virtual const LinkedRefMap<const NamespaceDef> &getUsedNamespaces() const { return m_usingDirList; }
virtual void addUsingDeclaration(const ClassDef *cd);
- virtual LinkedRefMap<const ClassDef> getUsedClasses() const { return m_usingDeclList; }
+ virtual const LinkedRefMap<const ClassDef> &getUsedClasses() const { return m_usingDeclList; }
virtual void combineUsingRelations(NamespaceDefSet &visitedNamespace);
virtual QCString displayName(bool=TRUE) const;
virtual QCString localName() const;
const QCString &refFile,const QCString &type,
bool isPublished)
{
+ //printf("createNamespaceDef(%s)\n",qPrint(name));
return new NamespaceDefImpl(defFileName,defLine,defColumn,name,ref,refFile,type,isPublished);
}
{ return getNSAlias()->anchor(); }
virtual int numDocMembers() const
{ return getNSAlias()->numDocMembers(); }
- virtual LinkedRefMap<const NamespaceDef> getUsedNamespaces() const
+ virtual const LinkedRefMap<const NamespaceDef> &getUsedNamespaces() const
{ return getNSAlias()->getUsedNamespaces(); }
- virtual LinkedRefMap<const ClassDef> getUsedClasses() const
+ virtual const LinkedRefMap<const ClassDef> &getUsedClasses() const
{ return getNSAlias()->getUsedClasses(); }
virtual QCString displayName(bool b=TRUE) const
{ return makeDisplayName(this,b); }
//printf("%s::m_allMembersDict->append(%s)\n",qPrint(name()),qPrint(md->localName()));
m_allMembers.add(md->localName(),md);
//::addNamespaceMemberNameToIndex(md);
- //static bool sortBriefDocs=Config_getBool(SORT_BRIEF_DOCS);
+ //bool sortBriefDocs=Config_getBool(SORT_BRIEF_DOCS);
switch(md->memberType())
{
case MemberType_Variable:
bool NamespaceDefImpl::hasDetailedDescription() const
{
- static bool repeatBrief = Config_getBool(REPEAT_BRIEF);
+ bool repeatBrief = Config_getBool(REPEAT_BRIEF);
return ((!briefDescription().isEmpty() && repeatBrief) ||
!documentation().isEmpty());
}
break;
case LayoutDocEntry::MemberDecl:
{
- const LayoutDocEntryMemberDecl *lmd = (const LayoutDocEntryMemberDecl*)lde.get();
- MemberList * ml = getMemberList(lmd->type);
- if (ml)
+ const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
+ if (lmd)
{
- ml->writeTagFile(tagFile);
+ MemberList * ml = getMemberList(lmd->type);
+ if (ml)
+ {
+ ml->writeTagFile(tagFile);
+ }
}
}
break;
{
if (hasBriefDescription())
{
- std::unique_ptr<IDocParser> parser { createDocParser() };
- std::unique_ptr<DocRoot> rootNode { validatingParseDoc(*parser.get(),
- briefFile(),briefLine(),this,0,
- briefDescription(),TRUE,FALSE,
- QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
- if (rootNode && !rootNode->isEmpty())
+ auto parser { createDocParser() };
+ auto ast { validatingParseDoc(*parser.get(),
+ briefFile(),briefLine(),this,0,
+ briefDescription(),TRUE,FALSE,
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
+ if (!ast->isEmpty())
{
ol.startParagraph();
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Man);
ol.writeString(" - ");
ol.popGeneratorState();
- ol.writeDoc(rootNode.get(),this,0);
+ ol.writeDoc(ast.get(),this,0);
ol.pushGeneratorState();
ol.disable(OutputGenerator::RTF);
ol.writeString(" \n");
/* write user defined member groups */
for (const auto &mg : m_memberGroups)
{
- if ((!mg->allMembersInSameSection() || !m_subGrouping)
- && mg->header()!="[NOHEADER]")
+ if (!mg->allMembersInSameSection() || !m_subGrouping)
{
mg->writeDeclarations(ol,0,this,0,0);
}
SrcLangExt lang = getLanguage();
for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
{
- if (lde->kind()==LayoutDocEntry::NamespaceClasses && classes.declVisible())
+ const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
+ if (lde->kind()==LayoutDocEntry::NamespaceClasses && classes.declVisible() && ls)
{
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "nested-classes";
ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
- else if (lde->kind()==LayoutDocEntry::NamespaceInterfaces && interfaces.declVisible())
+ else if (lde->kind()==LayoutDocEntry::NamespaceInterfaces && interfaces.declVisible() && ls)
{
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "interfaces";
ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
- else if (lde->kind()==LayoutDocEntry::NamespaceStructs && structs.declVisible())
+ else if (lde->kind()==LayoutDocEntry::NamespaceStructs && structs.declVisible() && ls)
{
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "structs";
ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
- else if (lde->kind()==LayoutDocEntry::NamespaceExceptions && exceptions.declVisible())
+ else if (lde->kind()==LayoutDocEntry::NamespaceExceptions && exceptions.declVisible() && ls)
{
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "exceptions";
ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
- else if (lde->kind()==LayoutDocEntry::NamespaceNestedNamespaces && namespaces.declVisible(false))
+ else if (lde->kind()==LayoutDocEntry::NamespaceNestedNamespaces && namespaces.declVisible(false) && ls)
{
- 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))
+ else if (lde->kind()==LayoutDocEntry::NamespaceNestedConstantGroups && namespaces.declVisible(true) && ls)
{
- 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())
+ else if (lde->kind()==LayoutDocEntry::NamespaceConcepts && m_concepts.declVisible() && ls)
{
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "concepts";
ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()== LayoutDocEntry::MemberDecl)
{
- const LayoutDocEntryMemberDecl *lmd = (const LayoutDocEntryMemberDecl*)lde.get();
- MemberList * ml = getMemberList(lmd->type);
- if (ml && ml->declVisible())
+ const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
+ if (lmd)
{
- ol.writeSummaryLink(QCString(),MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first);
- first=FALSE;
+ MemberList * ml = getMemberList(lmd->type);
+ if (ml && ml->declVisible())
+ {
+ ol.writeSummaryLink(QCString(),MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first);
+ first=FALSE;
+ }
}
}
}
void NamespaceDefImpl::writeDocumentation(OutputList &ol)
{
- static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
- //static bool outputJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
- //static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
+ //bool outputJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
+ //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
QCString pageTitle = title();
startFile(ol,getOutputFileBase(),name(),pageTitle,HLI_NamespaceVisible,!generateTreeView);
SrcLangExt lang = getLanguage();
for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
{
+ const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
switch (lde->kind())
{
case LayoutDocEntry::BriefDesc:
break;
case LayoutDocEntry::NamespaceClasses:
{
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeClassDeclarations(ol,ls->title(lang),classes);
+ if (ls) writeClassDeclarations(ol,ls->title(lang),classes);
}
break;
case LayoutDocEntry::NamespaceInterfaces:
{
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeClassDeclarations(ol,ls->title(lang),interfaces);
+ if (ls) writeClassDeclarations(ol,ls->title(lang),interfaces);
}
break;
case LayoutDocEntry::NamespaceStructs:
{
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeClassDeclarations(ol,ls->title(lang),structs);
+ if (ls) writeClassDeclarations(ol,ls->title(lang),structs);
}
break;
case LayoutDocEntry::NamespaceExceptions:
{
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeClassDeclarations(ol,ls->title(lang),exceptions);
+ if (ls) writeClassDeclarations(ol,ls->title(lang),exceptions);
}
break;
case LayoutDocEntry::NamespaceConcepts:
{
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeConcepts(ol,ls->title(lang));
+ if (ls) writeConcepts(ol,ls->title(lang));
}
break;
case LayoutDocEntry::NamespaceNestedNamespaces:
{
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeNamespaceDeclarations(ol,ls->title(lang),false);
+ if (ls) writeNamespaceDeclarations(ol,ls->title(lang),false);
}
break;
case LayoutDocEntry::NamespaceNestedConstantGroups:
{
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeNamespaceDeclarations(ol,ls->title(lang),true);
+ if (ls) writeNamespaceDeclarations(ol,ls->title(lang),true);
}
break;
case LayoutDocEntry::MemberGroups:
break;
case LayoutDocEntry::MemberDecl:
{
- const LayoutDocEntryMemberDecl *lmd = (const LayoutDocEntryMemberDecl*)lde.get();
- writeMemberDeclarations(ol,lmd->type,lmd->title(lang));
+ const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
+ if (lmd) writeMemberDeclarations(ol,lmd->type,lmd->title(lang));
}
break;
case LayoutDocEntry::MemberDeclEnd:
break;
case LayoutDocEntry::DetailedDesc:
{
- const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- writeDetailedDescription(ol,ls->title(lang));
+ if (ls) writeDetailedDescription(ol,ls->title(lang));
}
break;
case LayoutDocEntry::MemberDefStart:
break;
case LayoutDocEntry::MemberDef:
{
- const LayoutDocEntryMemberDef *lmd = (const LayoutDocEntryMemberDef*)lde.get();
- writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
+ const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
+ if (lmd) writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
}
break;
case LayoutDocEntry::MemberDefEnd:
void NamespaceDefImpl::writeQuickMemberLinks(OutputList &ol,const MemberDef *currentMd) const
{
- static bool createSubDirs=Config_getBool(CREATE_SUBDIRS);
+ bool createSubDirs=Config_getBool(CREATE_SUBDIRS);
ol.writeString(" <div class=\"navtab\">\n");
ol.writeString(" <table>\n");
int NamespaceDefImpl::numDocMembers() const
{
MemberList *allMemberList = getMemberList(MemberListType_allMembersList);
- return (allMemberList ? allMemberList->numDocMembers() : 0) + (int)m_innerCompounds.size();
+ return (allMemberList ? allMemberList->numDocMembers() : 0) + static_cast<int>(m_innerCompounds.size());
}
void NamespaceDefImpl::addUsingDirective(const NamespaceDef *nd)
{
m_usingDirList.add(nd->qualifiedName(),nd);
- //printf("%p: NamespaceDefImpl::addUsingDirective: %s:%d\n",this,qPrint(name()),m_usingDirList->count());
+ //printf("%s: NamespaceDefImpl::addUsingDirective: %s:%zu\n",qPrint(name()),qPrint(nd->qualifiedName()),m_usingDirList.size());
}
void NamespaceDefImpl::addUsingDeclaration(const ClassDef *cd)
void NamespaceDefImpl::addMemberToList(MemberListType lt,MemberDef *md)
{
- static bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
- static bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
+ bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
+ bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
const auto &ml = m_memberLists.get(lt,MemberListContainer::Namespace);
ml->setNeedsSorting(
((ml->listType()&MemberListType_declarationLists) && sortBriefDocs) ||
{
int i = name().findRev("::");
if (i==-1) i=0; else i+=2;
- static bool extractAnonNs = Config_getBool(EXTRACT_ANON_NSPACES);
+ bool extractAnonNs = Config_getBool(EXTRACT_ANON_NSPACES);
if (extractAnonNs && // extract anonymous ns
name().mid(i,20)=="anonymous_namespace{" // correct prefix
) // not disabled by config
class NamespaceDef : public Definition
{
public:
- virtual ~NamespaceDef() {}
virtual DefType definitionType() const = 0;
// ---- getters
virtual QCString getOutputFileBase() const = 0;
virtual QCString anchor() const = 0;
virtual int numDocMembers() const = 0;
- virtual LinkedRefMap<const NamespaceDef> getUsedNamespaces() const = 0;
- virtual LinkedRefMap<const ClassDef> getUsedClasses() const = 0;
+ virtual const LinkedRefMap<const NamespaceDef> &getUsedNamespaces() const = 0;
+ virtual const LinkedRefMap<const ClassDef> &getUsedClasses() const = 0;
virtual QCString displayName(bool=TRUE) const = 0;
virtual QCString localName() const = 0;
virtual bool isConstantGroup() const = 0;
/******************************************************************************
*
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
+ * Copyright (C) 1997-2022 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
#include "index.h"
#include "section.h"
#include "textstream.h"
+#include "docparser.h"
class ClassDiagram;
class DotClassGraph;
class DotDirDeps;
class DotGfxHierarchyTable;
class DotGroupCollaboration;
-class DocNode;
class MemberDef;
class Definition;
class CodeOutputInterface
{
public:
- virtual ~CodeOutputInterface() {}
+ virtual ~CodeOutputInterface() = default;
CodeOutputInterface() {}
CodeOutputInterface(const CodeOutputInterface &) = delete;
CodeOutputInterface &operator=(const CodeOutputInterface &) = delete;
*/
virtual void writeCodeAnchor(const QCString &name) = 0;
- virtual void setCurrentDoc(const Definition *context,const QCString &anchor,bool isSourceFile) = 0;
- virtual void addWord(const QCString &word,bool hiPriority) = 0;
+ virtual void setCurrentDoc(const Definition *context,const QCString &anchor,bool isSourceFile) {}
+ virtual void addWord(const QCString &word,bool hiPriority) {}
/*! Starts a source code fragment. The fragment will be
* fed to the code parser (see code.h) for syntax highlighting
class BaseOutputDocInterface : public CodeOutputInterface
{
public:
- virtual ~BaseOutputDocInterface() {}
enum ParamListTypes { Param, RetVal, Exception };
enum SectionTypes { /*See, Return, Author, Version,
Since, Date, Bug, Note,
void startPlainFile(const QCString &name);
void endPlainFile();
- //QCString getContents() const;
bool isEnabled() const { return m_active; }
void pushGeneratorState();
void popGeneratorState();
- //void setEncoding(const QCString &enc) { encoding = enc; }
- //virtual void postProcess(QByteArray &) { }
- virtual void writeDoc(DocNode *,const Definition *ctx,const MemberDef *md,int id) = 0;
+ virtual void writeDoc(const IDocNodeAST *ast,const Definition *ctx,const MemberDef *md,int id) = 0;
///////////////////////////////////////////////////////////////
// structural output interface
virtual void startInlineMemberDoc() = 0;
virtual void endInlineMemberDoc() = 0;
-
virtual void startLabels() = 0;
virtual void writeLabel(const QCString &,bool) = 0;
virtual void endLabels() = 0;
std::stack<bool> m_genStack;
};
-/** Interface used for generating documentation.
- *
- * This abstract class is used by several functions
- * to generate the output for a specific format.
- * This interface contains some state saving and changing
- * functions for dealing with format specific output.
- */
-class OutputDocInterface : public BaseOutputDocInterface
-{
- public:
- virtual ~OutputDocInterface() {}
-
- /*! Disables all output formats except format \a o
- * (useful for OutputList only)
- */
- virtual void disableAllBut(OutputGenerator::OutputType o) = 0;
-
- /*! Enables all output formats as far as they have been enabled in
- * the config file. (useful for OutputList only)
- */
- virtual void enableAll() = 0;
-
- /*! Disables all output formats (useful for OutputList only) */
- virtual void disableAll()= 0;
-
- /*! Disables a specific output format (useful for OutputList only) */
- virtual void disable(OutputGenerator::OutputType o) = 0;
-
- /*! Enables a specific output format (useful for OutputList only) */
- virtual void enable(OutputGenerator::OutputType o) = 0;
-
- /*! Check whether a specific output format is currently enabled
- * (useful for OutputList only)
- */
- virtual bool isEnabled(OutputGenerator::OutputType o) = 0;
-
- /*! Appends the output generated by generator \a g to this
- * generator.
- */
- //virtual void append(const OutputDocInterface *g) = 0;
-
- /*! Pushes the state of the current generator (or list of
- * generators) on a stack.
- */
- virtual void pushGeneratorState() = 0;
-
- /*! Pops the state of the current generator (or list of
- * generators) on a stack. Should be preceded by a call
- * the pushGeneratorState().
- */
- virtual void popGeneratorState() = 0;
-};
-
#endif
if (og->isEnabled()) count++;
}
- // we want to validate irrespective of the number of output formats
- // specified as:
- // - when only XML format there should be warnings as well (XML has its own write routines)
- // - no formats there should be warnings as well
- std::unique_ptr<IDocParser> parser { createDocParser() };
- std::unique_ptr<DocRoot> root { validatingParseDoc(*parser.get(),
- fileName,startLine,
- ctx,md,docStr,indexWords,isExample,exampleName,
- singleLine,linkFromIndex,markdownSupport) };
- if (count>0) writeDoc(root.get(),ctx,md,m_id);
+ if (count>0)
+ {
+ // we want to validate irrespective of the number of output formats
+ // specified as:
+ // - when only XML format there should be warnings as well (XML has its own write routines)
+ // - no formats there should be warnings as well
+ auto parser { createDocParser() };
+ auto ast { validatingParseDoc(*parser.get(),
+ fileName,startLine,
+ ctx,md,docStr,indexWords,isExample,exampleName,
+ singleLine,linkFromIndex,markdownSupport) };
+ if (ast) writeDoc(ast.get(),ctx,md,m_id);
+ }
}
-void OutputList::writeDoc(DocRoot *root,const Definition *ctx,const MemberDef *md,int)
+void OutputList::writeDoc(const IDocNodeAST *ast,const Definition *ctx,const MemberDef *md,int)
{
for (const auto &og : m_outputs)
{
//printf("og->printDoc(extension=%s)\n",
// ctx?qPrint(ctx->getDefFileExtension()):"<null>");
- if (og->isEnabled()) og->writeDoc(root,ctx,md,m_id);
+ if (og->isEnabled()) og->writeDoc(ast,ctx,md,m_id);
}
}
// specified as:
// - when only XML format there should be warnings as well (XML has its own write routines)
// - no formats there should be warnings as well
- std::unique_ptr<IDocParser> parser { createDocParser() };
- std::unique_ptr<DocText> root { validatingParseText(*parser.get(), textStr) };
+ auto parser { createDocParser() };
+ auto textNode { validatingParseText(*parser.get(), textStr) };
- if (count>0)
+ if (textNode && count>0)
{
for (const auto &og : m_outputs)
{
- if (og->isEnabled()) og->writeDoc(root.get(),0,0,m_id);
+ if (og->isEnabled()) og->writeDoc(textNode.get(),0,0,m_id);
}
}
}
#include "index.h" // for IndexSections
#include "outputgen.h"
+#include "searchindex.h" // for SIDataCollection
+#include "doxygen.h"
class ClassDiagram;
class DotClassGraph;
class DotInclDepGraph;
class DotGfxHierarchyTable;
class DotGroupCollaboration;
-class DocRoot;
/** Class representing a list of output generators that are written to
* in parallel.
*/
-class OutputList : public OutputDocInterface
+class OutputList : public BaseOutputDocInterface
{
public:
OutputList();
bool indexWords,bool isExample,const QCString &exampleName /*=0*/,
bool singleLine /*=FALSE*/,bool linkFromIndex /*=FALSE*/,
bool markdownSupport /*=FALSE*/);
- void writeDoc(DocRoot *root,const Definition *ctx,const MemberDef *md,int id=0);
+ void writeDoc(const IDocNodeAST *ast,const Definition *ctx,const MemberDef *md,int id=0);
void parseText(const QCString &textStr);
void startIndexSection(IndexSections is)
{ forall(&OutputGenerator::endFontClass); }
void writeCodeAnchor(const QCString &name)
{ forall(&OutputGenerator::writeCodeAnchor,name); }
+
void setCurrentDoc(const Definition *context,const QCString &anchor,bool isSourceFile)
- { forall(&OutputGenerator::setCurrentDoc,context,anchor,isSourceFile); }
+ { /*forall(&OutputGenerator::setCurrentDoc,context,anchor,isSourceFile);*/
+ m_searchData.setCurrentDoc(context,anchor,isSourceFile);
+ }
void addWord(const QCString &word,bool hiPriority)
- { forall(&OutputGenerator::addWord,word,hiPriority); }
+ { /*forall(&OutputGenerator::addWord,word,hiPriority);*/
+ m_searchData.addWord(word,hiPriority);
+ }
+ void indexSearchData()
+ {
+ m_searchData.transfer();
+ }
void startPlainFile(const QCString &name)
{ forall(&OutputGenerator::startPlainFile,name); }
std::vector< std::unique_ptr<OutputGenerator> > m_outputs;
int m_id;
+ SIDataCollection m_searchData;
};
void PageDefImpl::writeDocumentation(OutputList &ol)
{
- static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
+ bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
//outputList->disable(OutputGenerator::Man);
QCString pageName,manPageName;
bool PageDefImpl::visibleInIndex() const
{
- static bool externalPages = Config_getBool(EXTERNAL_PAGES);
+ bool externalPages = Config_getBool(EXTERNAL_PAGES);
return // not part of a group
!getGroupDef() &&
// not an externally defined page
class PageDef : public DefinitionMutable, public Definition
{
public:
- virtual ~PageDef() {}
-
// setters
virtual void setFileName(const QCString &name) = 0;
virtual void setLocalToc(const LocalToc &tl) = 0;
class OutlineParserInterface
{
public:
- virtual ~OutlineParserInterface() {}
+ virtual ~OutlineParserInterface() = default;
/** Parses a single input file with the goal to build an Entry tree.
* @param[in] fileName The full name of the file.
class CodeParserInterface
{
public:
- virtual ~CodeParserInterface() {}
+ virtual ~CodeParserInterface() = default;
/** Parses a source file or fragment with the goal to produce
* highlighted and cross-referenced output.
/******************************************************************************
*
- *
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
+ * Copyright (C) 1997-2022 by Dimitri van Heesch.
* Authors: Dimitri van Heesch, Miguel Lobo.
*
* Permission to use, copy, modify, and distribute this software and its
#include "perlmodgen.h"
#include "docparser.h"
+#include "docnode.h"
#include "message.h"
#include "doxygen.h"
#include "pagedef.h"
/*! @brief Concrete visitor implementation for PerlMod output. */
class PerlModDocVisitor : public DocVisitor
{
-public:
- PerlModDocVisitor(PerlModOutput &);
- virtual ~PerlModDocVisitor() { }
-
- void finish();
-
- //--------------------------------------
- // visitor functions for leaf nodes
- //--------------------------------------
-
- void visit(DocWord *);
- void visit(DocLinkedWord *);
- void visit(DocWhiteSpace *);
- void visit(DocSymbol *);
- void visit(DocEmoji *);
- void visit(DocURL *);
- void visit(DocLineBreak *);
- void visit(DocHorRuler *);
- void visit(DocStyleChange *);
- void visit(DocVerbatim *);
- void visit(DocAnchor *);
- void visit(DocInclude *);
- void visit(DocIncOperator *);
- void visit(DocFormula *);
- void visit(DocIndexEntry *);
- void visit(DocSimpleSectSep *);
- void visit(DocCite *);
-
- //--------------------------------------
- // visitor functions for compound nodes
- //--------------------------------------
-
- void visitPre(DocAutoList *);
- void visitPost(DocAutoList *);
- void visitPre(DocAutoListItem *);
- void visitPost(DocAutoListItem *);
- void visitPre(DocPara *) ;
- void visitPost(DocPara *);
- void visitPre(DocRoot *);
- void visitPost(DocRoot *);
- void visitPre(DocSimpleSect *);
- void visitPost(DocSimpleSect *);
- void visitPre(DocTitle *);
- void visitPost(DocTitle *);
- void visitPre(DocSimpleList *);
- void visitPost(DocSimpleList *);
- void visitPre(DocSimpleListItem *);
- void visitPost(DocSimpleListItem *);
- void visitPre(DocSection *);
- void visitPost(DocSection *);
- void visitPre(DocHtmlList *);
- void visitPost(DocHtmlList *) ;
- void visitPre(DocHtmlListItem *);
- void visitPost(DocHtmlListItem *);
- //void visitPre(DocHtmlPre *);
- //void visitPost(DocHtmlPre *);
- void visitPre(DocHtmlDescList *);
- void visitPost(DocHtmlDescList *);
- void visitPre(DocHtmlDescTitle *);
- void visitPost(DocHtmlDescTitle *);
- void visitPre(DocHtmlDescData *);
- void visitPost(DocHtmlDescData *);
- void visitPre(DocHtmlTable *);
- void visitPost(DocHtmlTable *);
- void visitPre(DocHtmlRow *);
- void visitPost(DocHtmlRow *) ;
- void visitPre(DocHtmlCell *);
- void visitPost(DocHtmlCell *);
- void visitPre(DocHtmlCaption *);
- void visitPost(DocHtmlCaption *);
- void visitPre(DocInternal *);
- void visitPost(DocInternal *);
- void visitPre(DocHRef *);
- void visitPost(DocHRef *);
- void visitPre(DocHtmlHeader *);
- void visitPost(DocHtmlHeader *);
- void visitPre(DocImage *);
- void visitPost(DocImage *);
- void visitPre(DocDotFile *);
- void visitPost(DocDotFile *);
- void visitPre(DocMscFile *);
- void visitPost(DocMscFile *);
- void visitPre(DocDiaFile *);
- void visitPost(DocDiaFile *);
- void visitPre(DocLink *);
- void visitPost(DocLink *);
- void visitPre(DocRef *);
- void visitPost(DocRef *);
- void visitPre(DocSecRefItem *);
- void visitPost(DocSecRefItem *);
- void visitPre(DocSecRefList *);
- void visitPost(DocSecRefList *);
- //void visitPre(DocLanguage *);
- //void visitPost(DocLanguage *);
- void visitPre(DocParamSect *);
- void visitPost(DocParamSect *);
- void visitPre(DocParamList *);
- void visitPost(DocParamList *);
- void visitPre(DocXRefItem *);
- void visitPost(DocXRefItem *);
- void visitPre(DocInternalRef *);
- void visitPost(DocInternalRef *);
- void visitPre(DocText *);
- void visitPost(DocText *);
- void visitPre(DocHtmlBlockQuote *);
- void visitPost(DocHtmlBlockQuote *);
- void visitPre(DocVhdlFlow *);
- void visitPost(DocVhdlFlow *);
- void visitPre(DocParBlock *);
- void visitPost(DocParBlock *);
-
-private:
+ public:
+ PerlModDocVisitor(PerlModOutput &);
+ virtual ~PerlModDocVisitor() { }
+
+ void finish();
+
+ //--------------------------------------
+ // visitor functions for leaf nodes
+ //--------------------------------------
+
+ void operator()(const DocWord &);
+ void operator()(const DocLinkedWord &);
+ void operator()(const DocWhiteSpace &);
+ void operator()(const DocSymbol &);
+ void operator()(const DocEmoji &);
+ void operator()(const DocURL &);
+ void operator()(const DocLineBreak &);
+ void operator()(const DocHorRuler &);
+ void operator()(const DocStyleChange &);
+ void operator()(const DocVerbatim &);
+ void operator()(const DocAnchor &);
+ void operator()(const DocInclude &);
+ void operator()(const DocIncOperator &);
+ void operator()(const DocFormula &);
+ void operator()(const DocIndexEntry &);
+ void operator()(const DocSimpleSectSep &);
+ void operator()(const DocCite &);
+ void operator()(const DocSeparator &);
+
+ //--------------------------------------
+ // visitor functions for compound nodes
+ //--------------------------------------
+
+ void operator()(const DocAutoList &);
+ void operator()(const DocAutoListItem &);
+ void operator()(const DocPara &) ;
+ void operator()(const DocRoot &);
+ void operator()(const DocSimpleSect &);
+ void operator()(const DocTitle &);
+ void operator()(const DocSimpleList &);
+ void operator()(const DocSimpleListItem &);
+ void operator()(const DocSection &);
+ void operator()(const DocHtmlList &);
+ void operator()(const DocHtmlListItem &);
+ void operator()(const DocHtmlDescList &);
+ void operator()(const DocHtmlDescTitle &);
+ void operator()(const DocHtmlDescData &);
+ void operator()(const DocHtmlTable &);
+ void operator()(const DocHtmlRow &);
+ void operator()(const DocHtmlCell &);
+ void operator()(const DocHtmlCaption &);
+ void operator()(const DocInternal &);
+ void operator()(const DocHRef &);
+ void operator()(const DocHtmlHeader &);
+ void operator()(const DocImage &);
+ void operator()(const DocDotFile &);
+ void operator()(const DocMscFile &);
+ void operator()(const DocDiaFile &);
+ void operator()(const DocLink &);
+ void operator()(const DocRef &);
+ void operator()(const DocSecRefItem &);
+ void operator()(const DocSecRefList &);
+ void operator()(const DocParamSect &);
+ void operator()(const DocParamList &);
+ void operator()(const DocXRefItem &);
+ void operator()(const DocInternalRef &);
+ void operator()(const DocText &);
+ void operator()(const DocHtmlBlockQuote &);
+ void operator()(const DocVhdlFlow &);
+ void operator()(const DocParBlock &);
+
+ private:
+ template<class T>
+ void visitChildren(const T &t)
+ {
+ for (const auto &child : t.children())
+ {
+ std::visit(*this, child);
+ }
+ }
- //--------------------------------------
- // helper functions
- //--------------------------------------
+ //--------------------------------------
+ // helper functions
+ //--------------------------------------
- void addLink(const QCString &ref, const QCString &file,
- const QCString &anchor);
+ void addLink(const QCString &ref, const QCString &file,
+ const QCString &anchor);
- void enterText();
- void leaveText();
+ void enterText();
+ void leaveText();
- void openItem(const QCString &);
- void closeItem();
- void singleItem(const QCString &);
- void openSubBlock(const QCString & = QCString());
- void closeSubBlock();
- //void openOther();
- //void closeOther();
+ void openItem(const QCString &);
+ void closeItem();
+ void singleItem(const QCString &);
+ void openSubBlock(const QCString & = QCString());
+ void closeSubBlock();
- //--------------------------------------
- // state variables
- //--------------------------------------
+ //--------------------------------------
+ // state variables
+ //--------------------------------------
- PerlModOutput &m_output;
- bool m_textmode;
- bool m_textblockstart;
- QCString m_other;
+ PerlModOutput &m_output;
+ bool m_textmode;
+ bool m_textblockstart;
+ QCString m_other;
};
PerlModDocVisitor::PerlModDocVisitor(PerlModOutput &output)
- : DocVisitor(DocVisitor_Other), m_output(output), m_textmode(false), m_textblockstart(FALSE)
+ : m_output(output), m_textmode(false), m_textblockstart(FALSE)
{
m_output.openList("doc");
}
*/
//}
-void PerlModDocVisitor::visit(DocWord *w)
+void PerlModDocVisitor::operator()(const DocWord &w)
{
enterText();
- m_output.addQuoted(w->word());
+ m_output.addQuoted(w.word());
}
-void PerlModDocVisitor::visit(DocLinkedWord *w)
+void PerlModDocVisitor::operator()(const DocLinkedWord &w)
{
openItem("url");
- addLink(w->ref(), w->file(), w->anchor());
- m_output.addFieldQuotedString("content", w->word());
+ addLink(w.ref(), w.file(), w.anchor());
+ m_output.addFieldQuotedString("content", w.word());
closeItem();
}
-void PerlModDocVisitor::visit(DocWhiteSpace *)
+void PerlModDocVisitor::operator()(const DocWhiteSpace &)
{
enterText();
m_output.add(' ');
}
-void PerlModDocVisitor::visit(DocSymbol *sy)
+void PerlModDocVisitor::operator()(const DocSymbol &sy)
{
- const DocSymbol::PerlSymb *res = HtmlEntityMapper::instance()->perl(sy->symbol());
+ const HtmlEntityMapper::PerlSymb *res = HtmlEntityMapper::instance()->perl(sy.symbol());
const char *accent=0;
- if (res-> symb)
+ if (res->symb)
{
switch (res->type)
{
- case DocSymbol::Perl_string:
+ case HtmlEntityMapper::Perl_string:
enterText();
m_output.add(res->symb);
break;
- case DocSymbol::Perl_char:
+ case HtmlEntityMapper::Perl_char:
enterText();
m_output.add(res->symb[0]);
break;
- case DocSymbol::Perl_symbol:
+ case HtmlEntityMapper::Perl_symbol:
leaveText();
openItem("symbol");
m_output.addFieldQuotedString("symbol", res->symb);
default:
switch(res->type)
{
- case DocSymbol::Perl_umlaut:
+ case HtmlEntityMapper::Perl_umlaut:
accent = "umlaut";
break;
- case DocSymbol::Perl_acute:
+ case HtmlEntityMapper::Perl_acute:
accent = "acute";
break;
- case DocSymbol::Perl_grave:
+ case HtmlEntityMapper::Perl_grave:
accent = "grave";
break;
- case DocSymbol::Perl_circ:
+ case HtmlEntityMapper::Perl_circ:
accent = "circ";
break;
- case DocSymbol::Perl_slash:
+ case HtmlEntityMapper::Perl_slash:
accent = "slash";
break;
- case DocSymbol::Perl_tilde:
+ case HtmlEntityMapper::Perl_tilde:
accent = "tilde";
break;
- case DocSymbol::Perl_cedilla:
+ case HtmlEntityMapper::Perl_cedilla:
accent = "cedilla";
break;
- case DocSymbol::Perl_ring:
+ case HtmlEntityMapper::Perl_ring:
accent = "ring";
break;
default:
}
else
{
- err("perl: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(sy->symbol(),TRUE));
+ err("perl: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(sy.symbol(),TRUE));
}
}
-void PerlModDocVisitor::visit(DocEmoji *sy)
+
+void PerlModDocVisitor::operator()(const DocEmoji &sy)
{
enterText();
- const char *name = EmojiEntityMapper::instance()->name(sy->index());
+ const char *name = EmojiEntityMapper::instance()->name(sy.index());
if (name)
{
m_output.add(name);
}
else
{
- m_output.add(sy->name());
+ m_output.add(sy.name());
}
}
-void PerlModDocVisitor::visit(DocURL *u)
+void PerlModDocVisitor::operator()(const DocURL &u)
{
openItem("url");
- m_output.addFieldQuotedString("content", u->url());
+ m_output.addFieldQuotedString("content", u.url());
closeItem();
}
-void PerlModDocVisitor::visit(DocLineBreak *) { singleItem("linebreak"); }
-void PerlModDocVisitor::visit(DocHorRuler *) { singleItem("hruler"); }
+void PerlModDocVisitor::operator()(const DocLineBreak &)
+{
+ singleItem("linebreak");
+}
+
+void PerlModDocVisitor::operator()(const DocHorRuler &)
+{
+ singleItem("hruler");
+}
-void PerlModDocVisitor::visit(DocStyleChange *s)
+void PerlModDocVisitor::operator()(const DocStyleChange &s)
{
const char *style = 0;
- switch (s->style())
+ switch (s.style())
{
case DocStyleChange::Bold: style = "bold"; break;
case DocStyleChange::S: style = "s"; break;
}
openItem("style");
m_output.addFieldQuotedString("style", style)
- .addFieldBoolean("enable", s->enable());
+ .addFieldBoolean("enable", s.enable());
closeItem();
}
-void PerlModDocVisitor::visit(DocVerbatim *s)
+void PerlModDocVisitor::operator()(const DocVerbatim &s)
{
const char *type = 0;
- switch (s->type())
+ switch (s.type())
{
case DocVerbatim::Code:
#if 0
case DocVerbatim::PlantUML: type = "plantuml"; break;
}
openItem(type);
- if (s->hasCaption())
+ if (s.hasCaption())
{
openSubBlock("caption");
- for (const auto &n : s->children()) n->accept(this);
+ visitChildren(s);
closeSubBlock();
}
- m_output.addFieldQuotedString("content", s->text());
+ m_output.addFieldQuotedString("content", s.text());
closeItem();
}
-void PerlModDocVisitor::visit(DocAnchor *anc)
+void PerlModDocVisitor::operator()(const DocAnchor &anc)
{
- QCString anchor = anc->file() + "_1" + anc->anchor();
+ QCString anchor = anc.file() + "_1" + anc.anchor();
openItem("anchor");
m_output.addFieldQuotedString("id", anchor);
closeItem();
}
-void PerlModDocVisitor::visit(DocInclude *inc)
+void PerlModDocVisitor::operator()(const DocInclude &inc)
{
const char *type = 0;
- switch(inc->type())
+ switch (inc.type())
{
- case DocInclude::IncWithLines:
- return;
- case DocInclude::Include:
- return;
- case DocInclude::DontInclude: return;
- case DocInclude::DontIncWithLines: return;
- case DocInclude::HtmlInclude: type = "htmlonly"; break;
- case DocInclude::LatexInclude: type = "latexonly"; break;
- case DocInclude::RtfInclude: type = "rtfonly"; break;
- case DocInclude::ManInclude: type = "manonly"; break;
- case DocInclude::XmlInclude: type = "xmlonly"; break;
- case DocInclude::DocbookInclude: type = "docbookonly"; break;
- case DocInclude::VerbInclude: type = "preformatted"; break;
- case DocInclude::Snippet: return;
- case DocInclude::SnipWithLines: return;
- case DocInclude::SnippetDoc:
- case DocInclude::IncludeDoc:
- err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
- "Please create a bug report\n",__FILE__);
- break;
+ case DocInclude::IncWithLines:
+ return;
+ case DocInclude::Include:
+ return;
+ case DocInclude::DontInclude: return;
+ case DocInclude::DontIncWithLines: return;
+ case DocInclude::HtmlInclude: type = "htmlonly"; break;
+ case DocInclude::LatexInclude: type = "latexonly"; break;
+ case DocInclude::RtfInclude: type = "rtfonly"; break;
+ case DocInclude::ManInclude: type = "manonly"; break;
+ case DocInclude::XmlInclude: type = "xmlonly"; break;
+ case DocInclude::DocbookInclude: type = "docbookonly"; break;
+ case DocInclude::VerbInclude: type = "preformatted"; break;
+ case DocInclude::Snippet: return;
+ case DocInclude::SnipWithLines: return;
+ case DocInclude::SnippetDoc:
+ case DocInclude::IncludeDoc:
+ err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
+ "Please create a bug report\n",__FILE__);
+ break;
}
openItem(type);
- m_output.addFieldQuotedString("content", inc->text());
+ m_output.addFieldQuotedString("content", inc.text());
closeItem();
}
-void PerlModDocVisitor::visit(DocIncOperator *)
+void PerlModDocVisitor::operator()(const DocIncOperator &)
{
#if 0
//printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
- // op->type(),op->isFirst(),op->isLast(),op->text().data());
- if (op->isFirst())
+ // op.type(),op.isFirst(),op.isLast(),op.text().data());
+ if (op.isFirst())
{
m_output.add("<programlisting>");
}
- if (op->type()!=DocIncOperator::Skip)
+ if (op.type()!=DocIncOperator::Skip)
{
- parseCode(m_ci,op->context(),op->text(),FALSE,0);
+ parseCode(m_ci,op.context(),op.text(),FALSE,0);
}
- if (op->isLast())
+ if (op.isLast())
{
m_output.add("</programlisting>");
}
#endif
}
-void PerlModDocVisitor::visit(DocFormula *f)
+void PerlModDocVisitor::operator()(const DocFormula &f)
{
openItem("formula");
QCString id;
- id += QCString().setNum(f->id());
- m_output.addFieldQuotedString("id", id).addFieldQuotedString("content", f->text());
+ id += QCString().setNum(f.id());
+ m_output.addFieldQuotedString("id", id).addFieldQuotedString("content", f.text());
closeItem();
}
-void PerlModDocVisitor::visit(DocIndexEntry *)
+void PerlModDocVisitor::operator()(const DocIndexEntry &)
{
#if 0
m_output.add("<indexentry>"
#endif
}
-void PerlModDocVisitor::visit(DocSimpleSectSep *)
+void PerlModDocVisitor::operator()(const DocSimpleSectSep &)
{
}
-void PerlModDocVisitor::visit(DocCite *cite)
+void PerlModDocVisitor::operator()(const DocCite &cite)
{
openItem("cite");
- m_output.addFieldQuotedString("text", cite->text());
+ m_output.addFieldQuotedString("text", cite.text());
closeItem();
}
// visitor functions for compound nodes
//--------------------------------------
-void PerlModDocVisitor::visitPre(DocAutoList *l)
+void PerlModDocVisitor::operator()(const DocAutoList &l)
{
openItem("list");
- m_output.addFieldQuotedString("style", l->isEnumList() ? "ordered" : "itemized");
+ m_output.addFieldQuotedString("style", l.isEnumList() ? "ordered" : "itemized");
openSubBlock("content");
-}
-
-void PerlModDocVisitor::visitPost(DocAutoList *)
-{
+ visitChildren(l);
closeSubBlock();
closeItem();
}
-void PerlModDocVisitor::visitPre(DocAutoListItem *)
+void PerlModDocVisitor::operator()(const DocAutoListItem &li)
{
openSubBlock();
-}
-
-void PerlModDocVisitor::visitPost(DocAutoListItem *)
-{
+ visitChildren(li);
closeSubBlock();
}
-void PerlModDocVisitor::visitPre(DocPara *)
+void PerlModDocVisitor::operator()(const DocPara &p)
{
if (m_textblockstart)
m_textblockstart = false;
openItem("para");
openSubBlock("content");
*/
-}
-
-void PerlModDocVisitor::visitPost(DocPara *)
-{
+ visitChildren(p);
/*
closeSubBlock();
closeItem();
*/
}
-void PerlModDocVisitor::visitPre(DocRoot *)
+void PerlModDocVisitor::operator()(const DocRoot &r)
{
+ visitChildren(r);
}
-void PerlModDocVisitor::visitPost(DocRoot *)
-{
-}
-
-void PerlModDocVisitor::visitPre(DocSimpleSect *s)
+void PerlModDocVisitor::operator()(const DocSimpleSect &s)
{
const char *type = 0;
- switch (s->type())
+ switch (s.type())
{
case DocSimpleSect::See: type = "see"; break;
case DocSimpleSect::Return: type = "return"; break;
m_output.openHash();
//openOther();
openSubBlock(type);
-}
-
-void PerlModDocVisitor::visitPost(DocSimpleSect *)
-{
+ if (s.title())
+ {
+ std::visit(*this,*s.title());
+ }
+ visitChildren(s);
closeSubBlock();
//closeOther();
m_output.closeHash();
}
-void PerlModDocVisitor::visitPre(DocTitle *)
+void PerlModDocVisitor::operator()(const DocTitle &t)
{
openItem("title");
openSubBlock("content");
-}
-
-void PerlModDocVisitor::visitPost(DocTitle *)
-{
+ visitChildren(t);
closeSubBlock();
closeItem();
}
-void PerlModDocVisitor::visitPre(DocSimpleList *)
+void PerlModDocVisitor::operator()(const DocSimpleList &l)
{
openItem("list");
m_output.addFieldQuotedString("style", "itemized");
openSubBlock("content");
+ visitChildren(l);
+ closeSubBlock();
+ closeItem();
}
-void PerlModDocVisitor::visitPost(DocSimpleList *)
+void PerlModDocVisitor::operator()(const DocSimpleListItem &li)
{
+ openSubBlock();
+ if (li.paragraph())
+ {
+ std::visit(*this,*li.paragraph());
+ }
closeSubBlock();
- closeItem();
}
-void PerlModDocVisitor::visitPre(DocSimpleListItem *) { openSubBlock(); }
-void PerlModDocVisitor::visitPost(DocSimpleListItem *) { closeSubBlock(); }
-
-void PerlModDocVisitor::visitPre(DocSection *s)
+void PerlModDocVisitor::operator()(const DocSection &s)
{
- QCString sect = QCString().sprintf("sect%d",s->level());
+ QCString sect = QCString().sprintf("sect%d",s.level());
openItem(sect);
- m_output.addFieldQuotedString("title", s->title());
+ m_output.addFieldQuotedString("title", s.title());
openSubBlock("content");
-}
-
-void PerlModDocVisitor::visitPost(DocSection *)
-{
+ visitChildren(s);
closeSubBlock();
closeItem();
}
-void PerlModDocVisitor::visitPre(DocHtmlList *l)
+void PerlModDocVisitor::operator()(const DocHtmlList &l)
{
openItem("list");
- m_output.addFieldQuotedString("style", (l->type() == DocHtmlList::Ordered) ? "ordered" : "itemized");
- for (const auto &opt : l->attribs())
+ m_output.addFieldQuotedString("style", (l.type() == DocHtmlList::Ordered) ? "ordered" : "itemized");
+ for (const auto &opt : l.attribs())
{
if (opt.name=="type")
{
}
}
openSubBlock("content");
-}
-
-void PerlModDocVisitor::visitPost(DocHtmlList *)
-{
+ visitChildren(l);
closeSubBlock();
closeItem();
}
-void PerlModDocVisitor::visitPre(DocHtmlListItem *l)
+void PerlModDocVisitor::operator()(const DocHtmlListItem &l)
{
- for (const auto &opt : l->attribs())
+ for (const auto &opt : l.attribs())
{
if (opt.name=="value")
{
}
}
openSubBlock();
+ visitChildren(l);
+ closeSubBlock();
}
-void PerlModDocVisitor::visitPost(DocHtmlListItem *) { closeSubBlock(); }
-
-//void PerlModDocVisitor::visitPre(DocHtmlPre *)
-//{
-// openItem("preformatted");
-// openSubBlock("content");
-// //m_insidePre=TRUE;
-//}
-
-//void PerlModDocVisitor::visitPost(DocHtmlPre *)
-//{
-// //m_insidePre=FALSE;
-// closeSubBlock();
-// closeItem();
-//}
-void PerlModDocVisitor::visitPre(DocHtmlDescList *)
+void PerlModDocVisitor::operator()(const DocHtmlDescList &dl)
{
#if 0
m_output.add("<variablelist>\n");
#endif
-}
-
-void PerlModDocVisitor::visitPost(DocHtmlDescList *)
-{
+ visitChildren(dl);
#if 0
m_output.add("</variablelist>\n");
#endif
}
-void PerlModDocVisitor::visitPre(DocHtmlDescTitle *)
+void PerlModDocVisitor::operator()(const DocHtmlDescTitle &dt)
{
#if 0
m_output.add("<varlistentry><term>");
#endif
-}
-
-void PerlModDocVisitor::visitPost(DocHtmlDescTitle *)
-{
+ visitChildren(dt);
#if 0
m_output.add("</term></varlistentry>\n");
#endif
}
-void PerlModDocVisitor::visitPre(DocHtmlDescData *)
+void PerlModDocVisitor::operator()(const DocHtmlDescData &dd)
{
#if 0
m_output.add("<listitem>");
#endif
-}
-
-void PerlModDocVisitor::visitPost(DocHtmlDescData *)
-{
+ visitChildren(dd);
#if 0
m_output.add("</listitem>\n");
#endif
}
-void PerlModDocVisitor::visitPre(DocHtmlTable *)
+void PerlModDocVisitor::operator()(const DocHtmlTable &t)
{
#if 0
- m_output.add("<table rows=\""); m_output.add(t->numRows());
- m_output.add("\" cols=\""); m_output.add(t->numCols()); m_output.add("\">");
+ m_output.add("<table rows=\""); m_output.add(t.numRows());
+ m_output.add("\" cols=\""); m_output.add(t.numCols()); m_output.add("\">");
#endif
-}
-
-void PerlModDocVisitor::visitPost(DocHtmlTable *)
-{
+ if (t.caption())
+ {
+ std::visit(*this,*t.caption());
+ }
+ visitChildren(t);
#if 0
m_output.add("</table>\n");
#endif
}
-void PerlModDocVisitor::visitPre(DocHtmlRow *)
+void PerlModDocVisitor::operator()(const DocHtmlRow &r)
{
#if 0
m_output.add("<row>\n");
#endif
-}
-
-void PerlModDocVisitor::visitPost(DocHtmlRow *)
-{
+ visitChildren(r);
#if 0
m_output.add("</row>\n");
#endif
}
-void PerlModDocVisitor::visitPre(DocHtmlCell *)
+void PerlModDocVisitor::operator()(const DocHtmlCell &c)
{
#if 0
- if (c->isHeading()) m_output.add("<entry thead=\"yes\">"); else m_output.add("<entry thead=\"no\">");
+ if (c.isHeading()) m_output.add("<entry thead=\"yes\">"); else m_output.add("<entry thead=\"no\">");
#endif
-}
-
-void PerlModDocVisitor::visitPost(DocHtmlCell *)
-{
+ visitChildren(c);
#if 0
m_output.add("</entry>");
#endif
}
-void PerlModDocVisitor::visitPre(DocHtmlCaption *)
+void PerlModDocVisitor::operator()(const DocHtmlCaption &c)
{
#if 0
m_output.add("<caption>");
#endif
-}
-
-void PerlModDocVisitor::visitPost(DocHtmlCaption *)
-{
+ visitChildren(c);
#if 0
m_output.add("</caption>\n");
#endif
}
-void PerlModDocVisitor::visitPre(DocInternal *)
+void PerlModDocVisitor::operator()(const DocInternal &i)
{
#if 0
m_output.add("<internal>");
#endif
-}
-
-void PerlModDocVisitor::visitPost(DocInternal *)
-{
+ visitChildren(i);
#if 0
m_output.add("</internal>");
#endif
}
-void PerlModDocVisitor::visitPre(DocHRef *)
+void PerlModDocVisitor::operator()(const DocHRef &href)
{
#if 0
- m_output.add("<ulink url=\""); m_output.add(href->url()); m_output.add("\">");
+ m_output.add("<ulink url=\""); m_output.add(href.url()); m_output.add("\">");
#endif
-}
-
-void PerlModDocVisitor::visitPost(DocHRef *)
-{
+ visitChildren(href);
#if 0
m_output.add("</ulink>");
#endif
}
-void PerlModDocVisitor::visitPre(DocHtmlHeader *)
+void PerlModDocVisitor::operator()(const DocHtmlHeader &header)
{
#if 0
- m_output.add("<sect"); m_output.add(header->level()); m_output.add(">");
+ m_output.add("<sect"); m_output.add(header.level()); m_output.add(">");
#endif
-}
-
-void PerlModDocVisitor::visitPost(DocHtmlHeader *)
-{
+ visitChildren(header);
#if 0
- m_output.add("</sect"); m_output.add(header->level()); m_output.add(">\n");
+ m_output.add("</sect"); m_output.add(header.level()); m_output.add(">\n");
#endif
}
-void PerlModDocVisitor::visitPre(DocImage *)
+void PerlModDocVisitor::operator()(const DocImage &img)
{
#if 0
m_output.add("<image type=\"");
- switch(img->type())
+ switch(img.type())
{
case DocImage::Html: m_output.add("html"); break;
case DocImage::Latex: m_output.add("latex"); break;
}
m_output.add("\"");
- QCString baseName=img->name();
+ QCString baseName=img.name();
int i;
if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
m_output.add(" name=\""); m_output.add(baseName); m_output.add("\"");
- if (!img->width().isEmpty())
+ if (!img.width().isEmpty())
{
m_output.add(" width=\"");
- m_output.addQuoted(img->width());
+ m_output.addQuoted(img.width());
m_output.add("\"");
}
- else if (!img->height().isEmpty())
+ else if (!img.height().isEmpty())
{
m_output.add(" height=\"");
- m_output.addQuoted(img->height());
+ m_output.addQuoted(img.height());
m_output.add("\"");
}
m_output.add(">");
#endif
-}
-
-void PerlModDocVisitor::visitPost(DocImage *)
-{
+ visitChildren(img);
#if 0
m_output.add("</image>");
#endif
}
-void PerlModDocVisitor::visitPre(DocDotFile *)
+void PerlModDocVisitor::operator()(const DocDotFile &df)
{
#if 0
m_output.add("<dotfile name=\""); m_output.add(df->file()); m_output.add("\">");
#endif
-}
-
-void PerlModDocVisitor::visitPost(DocDotFile *)
-{
+ visitChildren(df);
#if 0
m_output.add("</dotfile>");
#endif
}
-void PerlModDocVisitor::visitPre(DocMscFile *)
+void PerlModDocVisitor::operator()(const DocMscFile &df)
{
#if 0
m_output.add("<mscfile name=\""); m_output.add(df->file()); m_output.add("\">");
#endif
-}
-
-void PerlModDocVisitor::visitPost(DocMscFile *)
-{
+ visitChildren(df);
#if 0
m_output.add("<mscfile>");
#endif
}
-void PerlModDocVisitor::visitPre(DocDiaFile *)
+void PerlModDocVisitor::operator()(const DocDiaFile &df)
{
#if 0
m_output.add("<diafile name=\""); m_output.add(df->file()); m_output.add("\">");
#endif
-}
-
-void PerlModDocVisitor::visitPost(DocDiaFile *)
-{
+ visitChildren(df);
#if 0
m_output.add("</diafile>");
#endif
}
-void PerlModDocVisitor::visitPre(DocLink *lnk)
+void PerlModDocVisitor::operator()(const DocLink &lnk)
{
openItem("link");
- addLink(lnk->ref(), lnk->file(), lnk->anchor());
-}
-
-void PerlModDocVisitor::visitPost(DocLink *)
-{
+ addLink(lnk.ref(), lnk.file(), lnk.anchor());
+ visitChildren(lnk);
closeItem();
}
-void PerlModDocVisitor::visitPre(DocRef *ref)
+void PerlModDocVisitor::operator()(const DocRef &ref)
{
openItem("ref");
- if (!ref->hasLinkText())
- m_output.addFieldQuotedString("text", ref->targetTitle());
+ if (!ref.hasLinkText())
+ m_output.addFieldQuotedString("text", ref.targetTitle());
openSubBlock("content");
-}
-
-void PerlModDocVisitor::visitPost(DocRef *)
-{
+ visitChildren(ref);
closeSubBlock();
closeItem();
}
-void PerlModDocVisitor::visitPre(DocSecRefItem *)
+void PerlModDocVisitor::operator()(const DocSecRefItem &ref)
{
#if 0
m_output.add("<tocitem id=\""); m_output.add(ref->file()); m_output.add("_1"); m_output.add(ref->anchor()); m_output.add("\">");
#endif
-}
-
-void PerlModDocVisitor::visitPost(DocSecRefItem *)
-{
+ visitChildren(ref);
#if 0
m_output.add("</tocitem>");
#endif
}
-void PerlModDocVisitor::visitPre(DocSecRefList *)
+void PerlModDocVisitor::operator()(const DocSecRefList &l)
{
#if 0
m_output.add("<toclist>");
#endif
-}
-
-void PerlModDocVisitor::visitPost(DocSecRefList *)
-{
+ visitChildren(l);
#if 0
m_output.add("</toclist>");
#endif
}
-//void PerlModDocVisitor::visitPre(DocLanguage *l)
-//{
-// openItem("language");
-// m_output.addFieldQuotedString("id", l->id());
-//}
-//
-//void PerlModDocVisitor::visitPost(DocLanguage *)
-//{
-// closeItem();
-//}
-
-void PerlModDocVisitor::visitPre(DocParamSect *s)
+void PerlModDocVisitor::operator()(const DocParamSect &s)
{
leaveText();
const char *type = 0;
- switch(s->type())
- {
- case DocParamSect::Param: type = "params"; break;
- case DocParamSect::RetVal: type = "retvals"; break;
- case DocParamSect::Exception: type = "exceptions"; break;
- case DocParamSect::TemplateParam: type = "templateparam"; break;
- case DocParamSect::Unknown:
- err("unknown parameter section found\n");
- break;
+ switch(s.type())
+ {
+ case DocParamSect::Param: type = "params"; break;
+ case DocParamSect::RetVal: type = "retvals"; break;
+ case DocParamSect::Exception: type = "exceptions"; break;
+ case DocParamSect::TemplateParam: type = "templateparam"; break;
+ case DocParamSect::Unknown:
+ err("unknown parameter section found\n");
+ break;
}
m_output.openHash();
//openOther();
openSubBlock(type);
-}
-
-void PerlModDocVisitor::visitPost(DocParamSect *)
-{
+ visitChildren(s);
closeSubBlock();
//closeOther();
m_output.closeHash();
}
-void PerlModDocVisitor::visitPre(DocParamList *pl)
+void PerlModDocVisitor::operator()(const DocSeparator &)
+{
+}
+
+void PerlModDocVisitor::operator()(const DocParamList &pl)
{
leaveText();
- m_output.openHash()
- .openList("parameters");
- for (const auto ¶m : pl->parameters())
+ m_output.openHash().openList("parameters");
+ for (const auto ¶m : pl.parameters())
{
QCString name;
- if (param->kind()==DocNode::Kind_Word)
+ const DocWord *word = std::get_if<DocWord>(¶m);
+ const DocLinkedWord *linkedWord = std::get_if<DocLinkedWord>(¶m);
+ if (word)
{
- name = ((DocWord*)param.get())->word();
+ name = word->word();
}
- else if (param->kind()==DocNode::Kind_LinkedWord)
+ else if (linkedWord)
{
- name = ((DocLinkedWord*)param.get())->word();
+ name = linkedWord->word();
}
QCString dir = "";
- DocParamSect *sect = 0;
- if (pl->parent() && pl->parent()->kind()==DocNode::Kind_ParamSect)
- {
- sect=(DocParamSect*)pl->parent();
- }
+ const DocParamSect *sect = std::get_if<DocParamSect>(pl.parent());
if (sect && sect->hasInOutSpecifier())
{
- if (pl->direction()!=DocParamSect::Unspecified)
+ if (pl.direction()!=DocParamSect::Unspecified)
{
- if (pl->direction()==DocParamSect::In)
+ if (pl.direction()==DocParamSect::In)
{
dir = "in";
}
- else if (pl->direction()==DocParamSect::Out)
+ else if (pl.direction()==DocParamSect::Out)
{
dir = "out";
}
- else if (pl->direction()==DocParamSect::InOut)
+ else if (pl.direction()==DocParamSect::InOut)
{
dir = "in,out";
}
}
m_output.closeList()
.openList("doc");
-}
-
-void PerlModDocVisitor::visitPost(DocParamList *)
-{
+ for (const auto &par : pl.paragraphs())
+ {
+ std::visit(*this,par);
+ }
leaveText();
m_output.closeList()
.closeHash();
}
-void PerlModDocVisitor::visitPre(DocXRefItem *x)
+void PerlModDocVisitor::operator()(const DocXRefItem &x)
{
#if 0
m_output.add("<xrefsect id=\"");
m_output.add("</xreftitle>");
m_output.add("<xrefdescription>");
#endif
- if (x->title().isEmpty()) return;
+ if (x.title().isEmpty()) return;
openItem("xrefitem");
openSubBlock("content");
-}
-
-void PerlModDocVisitor::visitPost(DocXRefItem *x)
-{
- if (x->title().isEmpty()) return;
+ visitChildren(x);
+ if (x.title().isEmpty()) return;
closeSubBlock();
closeItem();
#if 0
#endif
}
-void PerlModDocVisitor::visitPre(DocInternalRef *ref)
+void PerlModDocVisitor::operator()(const DocInternalRef &ref)
{
openItem("ref");
- addLink(QCString(),ref->file(),ref->anchor());
+ addLink(QCString(),ref.file(),ref.anchor());
openSubBlock("content");
-}
-
-void PerlModDocVisitor::visitPost(DocInternalRef *)
-{
+ visitChildren(ref);
closeSubBlock();
closeItem();
}
-void PerlModDocVisitor::visitPre(DocText *)
-{
-}
-
-void PerlModDocVisitor::visitPost(DocText *)
+void PerlModDocVisitor::operator()(const DocText &t)
{
+ visitChildren(t);
}
-void PerlModDocVisitor::visitPre(DocHtmlBlockQuote *)
+void PerlModDocVisitor::operator()(const DocHtmlBlockQuote &q)
{
openItem("blockquote");
openSubBlock("content");
-}
-
-void PerlModDocVisitor::visitPost(DocHtmlBlockQuote *)
-{
+ visitChildren(q);
closeSubBlock();
closeItem();
}
-void PerlModDocVisitor::visitPre(DocVhdlFlow *)
-{
-}
-
-void PerlModDocVisitor::visitPost(DocVhdlFlow *)
+void PerlModDocVisitor::operator()(const DocVhdlFlow &)
{
}
-void PerlModDocVisitor::visitPre(DocParBlock *)
-{
-}
-
-void PerlModDocVisitor::visitPost(DocParBlock *)
+void PerlModDocVisitor::operator()(const DocParBlock &pb)
{
+ visitChildren(pb);
}
{
QCString stext = text.stripWhiteSpace();
if (stext.isEmpty())
+ {
output.addField(name).add("{}");
- else {
- std::unique_ptr<IDocParser> parser { createDocParser() };
- std::unique_ptr<DocRoot> root { validatingParseDoc(*parser.get(),
- fileName,lineNr,scope,md,stext,FALSE,FALSE,
- QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
+ }
+ else
+ {
+ auto parser { createDocParser() };
+ auto ast { validatingParseDoc(*parser.get(),
+ fileName,lineNr,scope,md,stext,FALSE,FALSE,
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
output.openHash(name);
- auto visitor = std::make_unique<PerlModDocVisitor>(output);
- root->accept(visitor.get());
- visitor->finish();
+ auto astImpl = dynamic_cast<const DocNodeAST*>(ast.get());
+ if (astImpl)
+ {
+ PerlModDocVisitor visitor(output);
+ std::visit(visitor,astImpl->root);
+ visitor.finish();
+ }
output.closeHash();
}
}
{
const MemberDef *md=mi->memberDef();
const ClassDef *mcd=md->getClassDef();
- const Definition *d=md->getGroupDef();
- if (d==0) d = mcd;
m_output.openHash()
.addFieldQuotedString("name", md->name())
const SectionInfo *si = SectionManager::instance().find(pd->name());
if (si)
- m_output.addFieldQuotedString("title4", filterTitle(si->title().str()));
+ m_output.addFieldQuotedString("title4", filterTitle(si->title()));
addPerlModDocBlock(m_output,"detailed",pd->docFile(),pd->docLine(),0,0,pd->documentation());
m_output.closeHash();
int exitCode;
QCString plantumlJarPath = Config_getString(PLANTUML_JAR_PATH);
QCString plantumlConfigFile = Config_getString(PLANTUML_CFG_FILE);
- QCString dotPath = Config_getString(DOT_PATH);
QCString pumlExe = "java";
QCString pumlArgs = "";
pumlArgs += plantumlConfigFile;
pumlArgs += "\" ";
}
- if (Config_getBool(HAVE_DOT) && !dotPath.isEmpty())
+ // the -graphvizdot option expects a relative or absolute path to the dot executable, so
+ // we need to use the unverified DOT_PATH option and check if it points to an existing file.
+ QCString dotPath = Config_getString(DOT_PATH);
+ FileInfo dp(dotPath.str());
+ if (Config_getBool(HAVE_DOT) && dp.exists() && dp.isFile())
{
pumlArgs += "-graphvizdot \"";
pumlArgs += dotPath;
- pumlArgs += "dot";
- pumlArgs += Portable::commandExtension();
pumlArgs += "\" ";
}
switch (format)
}
if (pid==0)
{
- const char * argv[4];
- argv[0] = "sh";
- argv[1] = "-c";
- argv[2] = fullCmd.data();
- argv[3] = 0;
- execve("/bin/sh",(char * const *)argv,environ);
+ const char * const argv[4] = { "sh", "-c", fullCmd.data(), 0 };
+ execve("/bin/sh",const_cast<char * const*>(argv),environ);
exit(127);
}
for (;;)
{
unsigned int pid;
#if !defined(_WIN32) || defined(__CYGWIN__)
- pid = (unsigned int)getpid();
+ pid = static_cast<unsigned int>(getpid());
#else
- pid = (unsigned int)GetCurrentProcessId();
+ pid = static_cast<unsigned int>(GetCurrentProcessId());
#endif
return pid;
}
{
if (inputStr.isEmpty() || outBuf==0) return 0; // empty input or invalid output
void *handle = portable_iconv_open("UTF-16LE","UTF-8");
- if (handle==(void *)(-1)) return 0; // invalid encoding
+ if (handle==reinterpret_cast<void *>(-1)) return 0; // invalid encoding
size_t len = inputStr.length();
uint16_t *buf = new uint16_t[len+1];
*outBuf = buf;
size_t inRemains = len;
size_t outRemains = len*sizeof(uint16_t)+2; // chars + \0
const char *p = inputStr.data();
- portable_iconv(handle,&p,&inRemains,(char**)&buf,&outRemains);
+ portable_iconv(handle,&p,&inRemains,reinterpret_cast<char **>(&buf),&outRemains);
*buf=0;
portable_iconv_close(handle);
return len;
QCString blockName;
int condCtx = 0;
bool skip = false;
+ bool insideIDL = false;
bool insideCS = false; // C# has simpler preprocessor
bool insideFtn = false;
bool isSource = false;
%x CondLineC
%x CondLineCpp
%x SkipCond
+%x IDLquote
%%
outputArray(yyscanner,yytext,yyleng);
BEGIN(LexCopyLine);
}
+<Start>^{Bopt}"cpp_quote"{Bopt}"("{Bopt}\" {
+ if (yyextra->insideIDL)
+ {
+ BEGIN(IDLquote);
+ }
+ else
+ {
+ REJECT;
+ }
+ }
+<IDLquote>"\\\\" {
+ outputArray(yyscanner,"\\",1);
+ }
+<IDLquote>"\\\"" {
+ outputArray(yyscanner,"\"",1);
+ }
+<IDLquote>"\""{Bopt}")" {
+ BEGIN(Start);
+ }
+<IDLquote>\n {
+ outputChar(yyscanner,'\n');
+ yyextra->yyLineNr++;
+ }
+<IDLquote>. {
+ outputArray(yyscanner,yytext,yyleng);
+ }
<Start>^{Bopt}/[^#] {
outputArray(yyscanner,yytext,yyleng);
BEGIN(CopyLine);
}
<*>{CCS}/{CCE} |
<*>{CCS}[*!]? {
- if (YY_START==SkipVerbatim || YY_START==SkipCond)
+ if (YY_START==SkipVerbatim || YY_START==SkipCond || YY_START==IDLquote)
{
REJECT;
}
}
}
<*>{CPPC}[/!]? {
- if (YY_START==SkipVerbatim || YY_START==SkipCond || getLanguageFromFileName(yyextra->fileName)==SrcLangExt_Fortran)
+ if (YY_START==SkipVerbatim || YY_START==SkipCond || getLanguageFromFileName(yyextra->fileName)==SrcLangExt_Fortran || YY_START==IDLquote)
{
REJECT;
}
//printf("setFileName(%s) state->fileName=%s state->yyFileDef=%p\n",
// name,qPrint(state->fileName),state->yyFileDef);
if (state->yyFileDef && state->yyFileDef->isReference()) state->yyFileDef=0;
+ state->insideIDL = getLanguageFromFileName(state->fileName)==SrcLangExt_IDL;
state->insideCS = getLanguageFromFileName(state->fileName)==SrcLangExt_CSharp;
state->insideFtn = getLanguageFromFileName(state->fileName)==SrcLangExt_Fortran;
state->isSource = guessSection(state->fileName);
#endif
printlex(yy_flex_debug, TRUE, __FILE__, qPrint(fileName));
- uint orgOffset=output.curPos();
+ size_t orgOffset=output.curPos();
//printf("##########################\n%s\n####################\n",
// qPrint(input));
#ifndef PRINTDOCVISITOR_H
#define PRINTDOCVISITOR_H
-#include "docvisitor.h"
#include "htmlentity.h"
#include "emoji.h"
#include "message.h"
-/*! Concrete visitor implementation for pretty printing */
-class PrintDocVisitor : public DocVisitor
+/*! Visitor implementation for pretty printing */
+class PrintDocVisitor
{
public:
- PrintDocVisitor() : DocVisitor(DocVisitor_Other), m_indent(0),
- m_needsEnter(FALSE), m_insidePre(FALSE) {}
+ PrintDocVisitor() : m_indent(0), m_needsEnter(FALSE), m_insidePre(FALSE) {}
//--------------------------------------
- void visit(DocWord *w)
+ void operator()(const DocWord &w)
{
indent_leaf();
- printf("%s",qPrint(w->word()));
+ printf("%s",qPrint(w.word()));
}
- void visit(DocLinkedWord *w)
+ void operator()(const DocLinkedWord &w)
{
indent_leaf();
- printf("%s",qPrint(w->word()));
+ printf("%s",qPrint(w.word()));
}
- void visit(DocWhiteSpace *w)
+ void operator()(const DocWhiteSpace &w)
{
indent_leaf();
if (m_insidePre)
{
- printf("%s",qPrint(w->chars()));
+ printf("%s",qPrint(w.chars()));
}
else
{
printf(" ");
}
}
- void visit(DocSymbol *s)
+ void operator()(const DocSymbol &s)
{
indent_leaf();
- const char *res = HtmlEntityMapper::instance()->utf8(s->symbol(),TRUE);
+ const char *res = HtmlEntityMapper::instance()->utf8(s.symbol(),TRUE);
if (res)
{
printf("%s",res);
}
else
{
- printf("print: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(s->symbol(),TRUE));
+ printf("print: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(s.symbol(),TRUE));
}
}
- void visit(DocEmoji *s)
+ void operator()(const DocEmoji &s)
{
indent_leaf();
- const char *res = EmojiEntityMapper::instance()->name(s->index());
+ const char *res = EmojiEntityMapper::instance()->name(s.index());
if (res)
{
printf("%s",res);
}
else
{
- printf("print: non supported emoji found: %s\n",qPrint(s->name()));
+ printf("print: non supported emoji found: %s\n",qPrint(s.name()));
}
}
- void visit(DocURL *u)
+ void operator()(const DocURL &u)
{
indent_leaf();
- printf("%s",qPrint(u->url()));
+ printf("%s",qPrint(u.url()));
}
- void visit(DocLineBreak *)
+ void operator()(const DocLineBreak &)
{
indent_leaf();
printf("<br/>");
}
- void visit(DocHorRuler *)
+ void operator()(const DocHorRuler &)
{
indent_leaf();
printf("<hr>");
}
- void visit(DocStyleChange *s)
+ void operator()(const DocStyleChange &s)
{
indent_leaf();
- switch (s->style())
+ switch (s.style())
{
case DocStyleChange::Bold:
- if (s->enable()) printf("<bold>"); else printf("</bold>");
+ if (s.enable()) printf("<bold>"); else printf("</bold>");
break;
case DocStyleChange::S:
- if (s->enable()) printf("<s>"); else printf("</s>");
+ if (s.enable()) printf("<s>"); else printf("</s>");
break;
case DocStyleChange::Strike:
- if (s->enable()) printf("<strike>"); else printf("</strike>");
+ if (s.enable()) printf("<strike>"); else printf("</strike>");
break;
case DocStyleChange::Del:
- if (s->enable()) printf("<del>"); else printf("</del>");
+ if (s.enable()) printf("<del>"); else printf("</del>");
break;
case DocStyleChange::Underline:
- if (s->enable()) printf("<underline>"); else printf("</underline>");
+ if (s.enable()) printf("<underline>"); else printf("</underline>");
break;
case DocStyleChange::Ins:
- if (s->enable()) printf("<ins>"); else printf("</ins>");
+ if (s.enable()) printf("<ins>"); else printf("</ins>");
break;
case DocStyleChange::Italic:
- if (s->enable()) printf("<italic>"); else printf("</italic>");
+ if (s.enable()) printf("<italic>"); else printf("</italic>");
break;
case DocStyleChange::Code:
- if (s->enable()) printf("<code>"); else printf("</code>");
+ if (s.enable()) printf("<code>"); else printf("</code>");
break;
case DocStyleChange::Subscript:
- if (s->enable()) printf("<sub>"); else printf("</sub>");
+ if (s.enable()) printf("<sub>"); else printf("</sub>");
break;
case DocStyleChange::Superscript:
- if (s->enable()) printf("<sup>"); else printf("</sup>");
+ if (s.enable()) printf("<sup>"); else printf("</sup>");
break;
case DocStyleChange::Center:
- if (s->enable()) printf("<center>"); else printf("</center>");
+ if (s.enable()) printf("<center>"); else printf("</center>");
break;
case DocStyleChange::Small:
- if (s->enable()) printf("<small>"); else printf("</small>");
+ if (s.enable()) printf("<small>"); else printf("</small>");
break;
case DocStyleChange::Cite:
- if (s->enable()) printf("<cite>"); else printf("</cite>");
+ if (s.enable()) printf("<cite>"); else printf("</cite>");
break;
case DocStyleChange::Preformatted:
- if (s->enable()) printf("<pre>"); else printf("</pre>");
+ if (s.enable()) printf("<pre>"); else printf("</pre>");
break;
case DocStyleChange::Div:
- if (s->enable()) printf("<div>"); else printf("</div>");
+ if (s.enable()) printf("<div>"); else printf("</div>");
break;
case DocStyleChange::Span:
- if (s->enable()) printf("<span>"); else printf("</span>");
+ if (s.enable()) printf("<span>"); else printf("</span>");
break;
case DocStyleChange::Details:
- if (s->enable())
+ if (s.enable())
{
indent_pre();
- printf("<details>\n");
+ printf("<details>\n");
}
- else
+ else
{
indent_post();
printf("</details>\n");
}
break;
case DocStyleChange::Summary:
- if (s->enable())
+ if (s.enable())
{
indent_pre();
- printf("<summary>\n");
+ printf("<summary>\n");
}
- else
+ else
{
indent_post();
printf("</summary>\n");
break;
}
}
- void visit(DocVerbatim *s)
+ void operator()(const DocVerbatim &s)
{
indent_leaf();
- switch(s->type())
+ switch(s.type())
{
case DocVerbatim::Code: printf("<code>"); break;
case DocVerbatim::Verbatim: printf("<verbatim>"); break;
case DocVerbatim::Msc: printf("<msc>"); break;
case DocVerbatim::PlantUML: printf("<plantuml>"); break;
}
- printf("%s",qPrint(s->text()));
- switch(s->type())
+ printf("%s",qPrint(s.text()));
+ switch(s.type())
{
case DocVerbatim::Code: printf("</code>"); break;
case DocVerbatim::Verbatim: printf("</verbatim>"); break;
case DocVerbatim::PlantUML: printf("</plantuml>"); break;
}
}
- void visit(DocAnchor *a)
+ void operator()(const DocAnchor &a)
{
indent_leaf();
- printf("<anchor name=\"%s\"/>",qPrint(a->anchor()));
+ printf("<anchor name=\"%s\"/>",qPrint(a.anchor()));
}
- void visit(DocInclude *inc)
+ void operator()(const DocInclude &inc)
{
indent_leaf();
- printf("<include file=\"%s\" type=\"",qPrint(inc->file()));
- switch(inc->type())
+ printf("<include file=\"%s\" type=\"",qPrint(inc.file()));
+ switch(inc.type())
{
case DocInclude::Include: printf("include"); break;
case DocInclude::IncWithLines: printf("incwithlines"); break;
case DocInclude::DontIncWithLines: printf("dontinwithlines"); break;
case DocInclude::HtmlInclude:
printf("htmlinclude");
- if (inc->isBlock()) printf(" block=\"yes\"");
+ if (inc.isBlock()) printf(" block=\"yes\"");
break;
case DocInclude::LatexInclude: printf("latexinclude"); break;
case DocInclude::RtfInclude: printf("rtfinclude"); break;
}
printf("\"/>");
}
- void visit(DocIncOperator *op)
+ void operator()(const DocIncOperator &op)
{
indent_leaf();
- printf("<incoperator pattern=\"%s\" type=\"",qPrint(op->pattern()));
- switch(op->type())
+ printf("<incoperator pattern=\"%s\" type=\"",qPrint(op.pattern()));
+ switch(op.type())
{
case DocIncOperator::Line: printf("line"); break;
case DocIncOperator::Skip: printf("skip"); break;
}
printf("\"/>");
}
- void visit(DocFormula *f)
+ void operator()(const DocFormula &f)
{
indent_leaf();
- printf("<formula name=%s text=%s/>",qPrint(f->name()),qPrint(f->text()));
+ printf("<formula name=%s text=%s/>",qPrint(f.name()),qPrint(f.text()));
}
- void visit(DocIndexEntry *i)
+ void operator()(const DocIndexEntry &i)
{
indent_leaf();
- printf("<indexentry>%s</indexentry\n",qPrint(i->entry()));
+ printf("<indexentry>%s</indexentry\n",qPrint(i.entry()));
}
- void visit(DocSimpleSectSep *)
+ void operator()(const DocSimpleSectSep &)
{
indent_leaf();
printf("<simplesectsep/>");
}
- void visit(DocCite *cite)
+ void operator()(const DocCite &cite)
{
indent_leaf();
printf("<cite ref=\"%s\" file=\"%s\" "
"anchor=\"%s\" text=\"%s\""
"/>\n",
- qPrint(cite->ref()),qPrint(cite->file()),qPrint(cite->anchor()),
- qPrint(cite->text()));
+ qPrint(cite.ref()),qPrint(cite.file()),qPrint(cite.anchor()),
+ qPrint(cite.text()));
+ }
+ void operator()(const DocSeparator &)
+ {
+ indent_leaf();
+ printf("<sep/>");
}
//--------------------------------------
+ template<class T>
+ void visitChildren(const T &t)
+ {
+ for (const auto &child : t.children())
+ {
+ std::visit(*this, child);
+ }
+ }
- void visitPre(DocAutoList *l)
+ void operator()(const DocAutoList &l)
{
indent_pre();
- if (l->isEnumList())
+ if (l.isEnumList())
{
printf("<ol>\n");
}
{
printf("<ul>\n");
}
- }
- void visitPost(DocAutoList *l)
- {
+ visitChildren(l);
indent_post();
- if (l->isEnumList())
+ if (l.isEnumList())
{
printf("</ol>\n");
}
printf("</ul>\n");
}
}
- void visitPre(DocAutoListItem *)
+ void operator()(const DocAutoListItem &li)
{
indent_pre();
printf("<li>\n");
- }
- void visitPost(DocAutoListItem *)
- {
+ visitChildren(li);
indent_post();
printf("</li>\n");
}
- void visitPre(DocPara *)
+ void operator()(const DocPara &p)
{
indent_pre();
printf("<para>\n");
- }
- void visitPost(DocPara *)
- {
+ visitChildren(p);
indent_post();
printf("</para>\n");
}
- void visitPre(DocRoot *)
+ void operator()(const DocRoot &r)
{
indent_pre();
printf("<root>\n");
- }
- void visitPost(DocRoot *)
- {
+ visitChildren(r);
indent_post();
printf("</root>\n");
}
- void visitPre(DocSimpleSect *s)
+ void operator()(const DocSimpleSect &s)
{
indent_pre();
printf("<simplesect type=");
- switch(s->type())
+ switch(s.type())
{
case DocSimpleSect::See: printf("see"); break;
case DocSimpleSect::Return: printf("return"); break;
case DocSimpleSect::Unknown: printf("unknown"); break;
}
printf(">\n");
- }
- void visitPost(DocSimpleSect *)
- {
+ if (s.title())
+ {
+ std::visit(*this, *s.title());
+ }
+ visitChildren(s);
indent_post();
printf("</simplesect>\n");
}
- void visitPre(DocTitle *)
+ void operator()(const DocTitle &t)
{
indent_pre();
printf("<title>\n");
- }
- void visitPost(DocTitle *)
- {
+ visitChildren(t);
indent_post();
printf("</title>\n");
}
- void visitPre(DocSimpleList *)
+ void operator()(const DocSimpleList &l)
{
indent_pre();
printf("<ul>\n");
- }
- void visitPost(DocSimpleList *)
- {
+ visitChildren(l);
indent_post();
printf("</ul>\n");
}
- void visitPre(DocSimpleListItem *)
+ void operator()(const DocSimpleListItem &li)
{
indent_pre();
printf("<li>\n");
- }
- void visitPost(DocSimpleListItem *)
- {
+ if (li.paragraph())
+ {
+ visit(*this,*li.paragraph());
+ }
indent_post();
printf("</li>\n");
}
- void visitPre(DocSection *s)
+ void operator()(const DocSection &s)
{
indent_pre();
- printf("<sect%d>\n",s->level());
- }
- void visitPost(DocSection *s)
- {
+ printf("<sect%d>\n",s.level());
+ visitChildren(s);
indent_post();
- printf("</sect%d>\n",s->level());
+ printf("</sect%d>\n",s.level());
}
- void visitPre(DocHtmlList *s)
+ void operator()(const DocHtmlList &s)
{
indent_pre();
- if (s->type()==DocHtmlList::Ordered)
+ if (s.type()==DocHtmlList::Ordered)
{
printf("<ol");
- for (const auto &opt : s->attribs())
+ for (const auto &opt : s.attribs())
{
printf(" %s=\"%s\"",qPrint(opt.name),qPrint(opt.value));
}
printf(">\n");
}
- else printf("<ul>\n");
-
- }
- void visitPost(DocHtmlList *s)
- {
+ else
+ {
+ printf("<ul>\n");
+ }
+ visitChildren(s);
indent_post();
- if (s->type()==DocHtmlList::Ordered) printf("</ol>\n"); else printf("</ul>\n");
+ if (s.type()==DocHtmlList::Ordered)
+ {
+ printf("</ol>\n");
+ }
+ else
+ {
+ printf("</ul>\n");
+ }
}
- void visitPre(DocHtmlListItem *s)
+ void operator()(const DocHtmlListItem &li)
{
indent_pre();
printf("<li");
- for (const auto &opt : s->attribs())
+ for (const auto &opt : li.attribs())
{
printf(" %s=\"%s\"",qPrint(opt.name),qPrint(opt.value));
}
printf(">\n");
- }
- void visitPost(DocHtmlListItem *)
- {
+ visitChildren(li);
indent_post();
printf("</li>\n");
}
- //void visitPre(DocHtmlPre *)
- //{
- // indent_pre();
- // printf("<pre>\n");
- // m_insidePre=TRUE;
- //}
- //void visitPost(DocHtmlPre *)
- //{
- // m_insidePre=FALSE;
- // indent_post();
- // printf("</pre>\n");
- //}
- void visitPre(DocHtmlDescList *)
+ void operator()(const DocHtmlDescList &l)
{
indent_pre();
printf("<dl>\n");
- }
- void visitPost(DocHtmlDescList *)
- {
+ visitChildren(l);
indent_post();
printf("</dl>\n");
}
- void visitPre(DocHtmlDescTitle *)
+ void operator()(const DocHtmlDescTitle &dt)
{
indent_pre();
printf("<dt>\n");
- }
- void visitPost(DocHtmlDescTitle *)
- {
+ visitChildren(dt);
indent_post();
printf("</dt>\n");
}
- void visitPre(DocHtmlDescData *)
+ void operator()(const DocHtmlDescData &dd)
{
indent_pre();
printf("<dd>\n");
- }
- void visitPost(DocHtmlDescData *)
- {
+ visitChildren(dd);
indent_post();
printf("</dd>\n");
}
- void visitPre(DocHtmlTable *t)
+ void operator()(const DocHtmlTable &t)
{
indent_pre();
printf("<table rows=\"%zu\" cols=\"%zu\">\n",
- t->numRows(),t->numColumns());
- }
- void visitPost(DocHtmlTable *)
- {
+ t.numRows(),t.numColumns());
+ visitChildren(t);
+ if (t.caption())
+ {
+ std::visit(*this, *t.caption());
+ }
indent_post();
printf("</table>\n");
}
- void visitPre(DocHtmlRow *)
+ void operator()(const DocHtmlRow &tr)
{
indent_pre();
printf("<tr>\n");
- }
- void visitPost(DocHtmlRow *)
- {
+ visitChildren(tr);
indent_post();
printf("</tr>\n");
}
- void visitPre(DocHtmlCell *c)
+ void operator()(const DocHtmlCell &c)
{
indent_pre();
- printf("<t%c>\n",c->isHeading()?'h':'d');
- }
- void visitPost(DocHtmlCell *c)
- {
+ printf("<t%c>\n",c.isHeading()?'h':'d');
+ visitChildren(c);
indent_post();
- printf("</t%c>\n",c->isHeading()?'h':'d');
+ printf("</t%c>\n",c.isHeading()?'h':'d');
}
- void visitPre(DocHtmlCaption *)
+ void operator()(const DocHtmlCaption &c)
{
indent_pre();
printf("<caption>\n");
- }
- void visitPost(DocHtmlCaption *)
- {
+ visitChildren(c);
indent_post();
printf("</caption>\n");
}
- void visitPre(DocInternal *)
+ void operator()(const DocInternal &i)
{
indent_pre();
printf("<internal>\n");
- }
- void visitPost(DocInternal *)
- {
+ visitChildren(i);
indent_post();
printf("</internal>\n");
}
- void visitPre(DocHRef *href)
+ void operator()(const DocHRef &href)
{
indent_pre();
- printf("<a url=\"%s\">\n",qPrint(href->url()));
- }
- void visitPost(DocHRef *)
- {
+ printf("<a url=\"%s\">\n",qPrint(href.url()));
+ visitChildren(href);
indent_post();
printf("</a>\n");
}
- void visitPre(DocHtmlHeader *header)
+ void operator()(const DocHtmlHeader &header)
{
indent_pre();
- printf("<h%d>\n",header->level());
- }
- void visitPost(DocHtmlHeader *header)
- {
+ printf("<h%d>\n",header.level());
+ visitChildren(header);
indent_post();
- printf("</h%d>\n",header->level());
+ printf("</h%d>\n",header.level());
}
- void visitPre(DocImage *img)
+ void operator()(const DocImage &img)
{
indent_pre();
- printf("<image src=\"%s\" type=\"",qPrint(img->name()));
- switch(img->type())
+ printf("<image src=\"%s\" type=\"",qPrint(img.name()));
+ switch(img.type())
{
case DocImage::Html: printf("html"); break;
case DocImage::Latex: printf("latex"); break;
case DocImage::DocBook: printf("docbook"); break;
case DocImage::Xml: printf("xml"); break;
}
- printf("\" %s %s inline=\"%s\">\n",qPrint(img->width()),qPrint(img->height()),img->isInlineImage() ? "yes" : "no");
- }
- void visitPost(DocImage *)
- {
+ printf("\" %s %s inline=\"%s\">\n",qPrint(img.width()),qPrint(img.height()),img.isInlineImage() ? "yes" : "no");
+ visitChildren(img);
indent_post();
printf("</image>\n");
}
- void visitPre(DocDotFile *df)
+ void operator()(const DocDotFile &df)
{
indent_pre();
- printf("<dotfile src=\"%s\">\n",qPrint(df->name()));
- }
- void visitPost(DocDotFile *)
- {
+ printf("<dotfile src=\"%s\">\n",qPrint(df.name()));
+ visitChildren(df);
indent_post();
printf("</dotfile>\n");
}
- void visitPre(DocMscFile *df)
+ void operator()(const DocMscFile &df)
{
indent_pre();
- printf("<mscfile src=\"%s\">\n",qPrint(df->name()));
- }
- void visitPost(DocMscFile *)
- {
+ printf("<mscfile src=\"%s\">\n",qPrint(df.name()));
+ visitChildren(df);
indent_post();
printf("</mscfile>\n");
}
- void visitPre(DocDiaFile *df)
+ void operator()(const DocDiaFile &df)
{
indent_pre();
- printf("<diafile src=\"%s\">\n",qPrint(df->name()));
- }
- void visitPost(DocDiaFile *)
- {
+ printf("<diafile src=\"%s\">\n",qPrint(df.name()));
+ visitChildren(df);
indent_post();
printf("</diafile>\n");
}
- void visitPre(DocLink *lnk)
+ void operator()(const DocLink &lnk)
{
indent_pre();
printf("<link ref=\"%s\" file=\"%s\" anchor=\"%s\">\n",
- qPrint(lnk->ref()),qPrint(lnk->file()),qPrint(lnk->anchor()));
- }
- void visitPost(DocLink *)
- {
+ qPrint(lnk.ref()),qPrint(lnk.file()),qPrint(lnk.anchor()));
+ visitChildren(lnk);
indent_post();
printf("</link>\n");
}
- void visitPre(DocRef *ref)
+ void operator()(const DocRef &ref)
{
indent_pre();
printf("<ref ref=\"%s\" file=\"%s\" "
"anchor=\"%s\" targetTitle=\"%s\""
" hasLinkText=\"%s\" refToAnchor=\"%s\" refToSection=\"%s\" refToTable=\"%s\">\n",
- qPrint(ref->ref()),qPrint(ref->file()),qPrint(ref->anchor()),
- qPrint(ref->targetTitle()),ref->hasLinkText()?"yes":"no",
- ref->refToAnchor()?"yes":"no", ref->refToSection()?"yes":"no",
- ref->refToTable()?"yes":"no");
- }
- void visitPost(DocRef *)
- {
+ qPrint(ref.ref()),qPrint(ref.file()),qPrint(ref.anchor()),
+ qPrint(ref.targetTitle()),ref.hasLinkText()?"yes":"no",
+ ref.refToAnchor()?"yes":"no", ref.refToSection()?"yes":"no",
+ ref.refToTable()?"yes":"no");
+ visitChildren(ref);
indent_post();
printf("</ref>\n");
}
- void visitPre(DocSecRefItem *ref)
+ void operator()(const DocSecRefItem &ref)
{
indent_pre();
- printf("<secrefitem target=\"%s\">\n",qPrint(ref->target()));
- }
- void visitPost(DocSecRefItem *)
- {
+ printf("<secrefitem target=\"%s\">\n",qPrint(ref.target()));
+ visitChildren(ref);
indent_post();
printf("</secrefitem>\n");
}
- void visitPre(DocSecRefList *)
+ void operator()(const DocSecRefList &rl)
{
indent_pre();
printf("<secreflist>\n");
- }
- void visitPost(DocSecRefList *)
- {
+ visitChildren(rl);
indent_post();
printf("</secreflist>\n");
}
- //void visitPre(DocLanguage *l)
- //{
- // indent_pre();
- // printf("<language id=%s>\n",qPrint(l->id()));
- //}
- //void visitPost(DocLanguage *)
- //{
- // indent_post();
- // printf("</language>\n");
- //}
- void visitPre(DocParamList *pl)
+ void operator()(const DocParamList &pl)
{
indent_pre();
printf("<parameters>");
- if (!pl->parameters().empty())
+ if (!pl.parameters().empty())
{
printf("<param>");
- for (const auto ¶m : pl->parameters())
+ for (const auto ¶m : pl.parameters())
{
- if (param->kind()==DocNode::Kind_Word)
- {
- visit((DocWord*)param.get());
- }
- else if (param->kind()==DocNode::Kind_LinkedWord)
- {
- visit((DocLinkedWord*)param.get());
- }
- else if (param->kind()==DocNode::Kind_Sep)
- {
- printf("</param>");
- printf("<param>");
- }
+ std::visit(*this,param);
}
printf("</param>");
}
printf("\n");
- }
- void visitPost(DocParamList *)
- {
indent_post();
printf("</parameters>\n");
}
- void visitPre(DocParamSect *ps)
+ void operator()(const DocParamSect &ps)
{
indent_pre();
printf("<paramsect type=");
- switch (ps->type())
+ switch (ps.type())
{
case DocParamSect::Param: printf("param"); break;
case DocParamSect::RetVal: printf("retval"); break;
case DocParamSect::Unknown: printf("unknown"); break;
}
printf(">\n");
- }
- void visitPost(DocParamSect *)
- {
+ visitChildren(ps);
indent_post();
printf("</paramsect>\n");
}
- void visitPre(DocXRefItem *x)
+ void operator()(const DocXRefItem &x)
{
indent_pre();
printf("<xrefitem file=\"%s\" anchor=\"%s\" title=\"%s\">\n",
- qPrint(x->file()),qPrint(x->anchor()),qPrint(x->title()));
- }
- void visitPost(DocXRefItem *)
- {
+ qPrint(x.file()),qPrint(x.anchor()),qPrint(x.title()));
+ visitChildren(x);
indent_post();
printf("</xrefitem>\n");
}
- void visitPre(DocInternalRef *r)
+ void operator()(const DocInternalRef &r)
{
indent_pre();
- printf("<internalref file=%s anchor=%s>\n",qPrint(r->file()),qPrint(r->anchor()));
- }
- void visitPost(DocInternalRef *)
- {
+ printf("<internalref file=%s anchor=%s>\n",qPrint(r.file()),qPrint(r.anchor()));
+ visitChildren(r);
indent_post();
printf("</internalref>\n");
}
- void visitPre(DocText *)
+ void operator()(const DocText &t)
{
indent_pre();
printf("<text>\n");
- }
- void visitPost(DocText *)
- {
+ visitChildren(t);
indent_post();
printf("</text>\n");
}
- void visitPre(DocHtmlBlockQuote *)
+ void operator()(const DocHtmlBlockQuote &q)
{
indent_pre();
printf("<blockquote>\n");
- }
- void visitPost(DocHtmlBlockQuote *)
- {
+ visitChildren(q);
indent_post();
printf("</blockquote>\n");
}
- void visitPre(DocVhdlFlow *)
+ void operator()(const DocVhdlFlow &vf)
{
indent_pre();
printf("<vhdlflow>\n");
- }
- void visitPost(DocVhdlFlow *)
- {
+ visitChildren(vf);
indent_post();
printf("</vhdlflow>\n");
}
- void visitPre(DocParBlock *)
+ void operator()(const DocParBlock &pb)
{
indent_pre();
printf("<parblock>\n");
- }
- void visitPost(DocParBlock *)
- {
+ visitChildren(pb);
indent_post();
printf("</parblock>\n");
}
SHORTSTRINGCHAR [^\\\n"]
STRINGLITERAL {STRINGPREFIX}?( {SHORTSTRING} | {LONGSTRING})
STRINGPREFIX ("r"|"u"|"ur"|"R"|"U"|"UR"|"Ur"|"uR")
-FLOWKW ("or"|"and"|"is"|"not"|"print"|"for"|"in"|"if"|"try"|"except"|"yield"|"raise"|"break"|"continue"|"pass"|"if"|"return"|"while"|"elif"|"else"|"finally")
+FLOWKW ("or"|"and"|"is"|"not"|"print"|"for"|"in"|"try"|"except"|"yield"|"raise"|"break"|"continue"|"pass"|"if"|"return"|"while"|"elif"|"else"|"finally")
POUNDCOMMENT "#"[^#\n][^\n]*
SCRIPTCOMMENT "#!".*
}
<FunctionBody>{
- \n{B}/{IDENTIFIER}{BB} {
+ \n{B}/{IDENTIFIER}[^{LETTER}{DIGIT}_] {
DBG_CTX((stderr,"indent %d<=%d\n",computeIndent(&yytext[1]),yyextra->indent));
if (computeIndent(&yytext[1])<=yyextra->indent)
{
pyscannerYYrestart( 0, yyscanner );
if (ce->section&Entry::COMPOUND_MASK)
{
+ yyextra->specialBlock = false;
yyextra->current_root = ce;
BEGIN( Search );
}
#include <stdarg.h>
#include <ctype.h>
+inline char toLowerChar(char c)
+{
+ return static_cast<char>(tolower(static_cast<unsigned char>(c)));
+}
+
QCString &QCString::sprintf( const char *format, ... )
{
va_list ap;
int QCString::find( char c, int index, bool cs ) const
{
- if (index<0 || index>=(int)length()) return -1; // index outside string
+ if (index<0 || index>=static_cast<int>(length())) return -1; // index outside string
const char *pos;
if (cs)
{
else
{
pos = data()+index;
- c = (char)tolower((unsigned char)c);
- while (*pos && tolower((unsigned char)*pos)!=c) pos++;
+ c = toLowerChar(c);
+ while (*pos && toLowerChar(*pos)!=c) pos++;
if (!*pos && c) pos=0; // not found
}
- return pos ? (int)(pos - data()) : -1;
+ return pos ? static_cast<int>(pos - data()) : -1;
}
int QCString::find( const char *str, int index, bool cs ) const
}
if (!*pos) pos = 0; // not found
}
- return pos ? (int)(pos - data()) : -1;
+ return pos ? static_cast<int>(pos - data()) : -1;
}
int QCString::find( const QCString &str, int index, bool cs ) const
if (cs)
{
pos = strrchr(b,c);
- return pos ? (int)(pos - b) : -1;
+ return pos ? static_cast<int>(pos - b) : -1;
}
index=len;
}
}
else
{
- c = (char)tolower((unsigned char)c);
- while ( pos>=b && tolower((unsigned char)*pos)!=c) pos--;
+ c = toLowerChar(c);
+ while ( pos>=b && toLowerChar(*pos)!=c) pos--;
}
- return pos>=b ? (int)(pos - b) : -1;
+ return pos>=b ? static_cast<int>(pos - b) : -1;
}
int QCString::findRev( const char *str, int index, bool cs) const
}
else
{
- c = (char)tolower((unsigned char)c);
+ c = toLowerChar(c);
while (*pos)
{
- if (tolower((unsigned char)*pos)==c) count++;
+ if (toLowerChar(*pos)==c) count++;
pos++;
}
}
if ( to > first && *(to-1) == 0x20 )
to--;
*to = '\0';
- result.resize( (int)(to - result.data()) + 1 );
+ result.resize( static_cast<int>(to - result.data()) + 1 );
return result;
}
*ok = FALSE;
v = 0;
}
- return (short)v;
+ return static_cast<short>(v);
}
ushort QCString::toUShort(bool *ok,int base) const
*ok = FALSE;
v = 0;
}
- return (ushort)v;
+ return static_cast<ushort>(v);
}
int QCString::toInt(bool *ok, int base) const
{
- return (int)toLong( ok, base );
+ return static_cast<int>(toLong( ok, base ));
}
uint QCString::toUInt(bool *ok,int base) const
{
- return (uint)toULong( ok, base );
+ return static_cast<uint>(toULong( ok, base ));
}
void *qmemmove( void *dst, const void *src, size_t len )
{
char *d;
- char *s;
+ const char *s;
if ( dst > src ) {
- d = (char *)dst + len - 1;
- s = (char *)src + len - 1;
+ d = static_cast<char *>(dst) + len - 1;
+ s = static_cast<const char *>(src) + len - 1;
while ( len-- )
*d-- = *s--;
} else if ( dst < src ) {
- d = (char *)dst;
- s = (char *)src;
+ d = static_cast<char *>(dst);
+ s = static_cast<const char *>(src);
while ( len-- )
*d++ = *s++;
}
return dst;
}
-int qstricmp( const char *str1, const char *str2 )
+int qstricmp( const char *s1, const char *s2 )
{
- const uchar *s1 = (const uchar *)str1;
- const uchar *s2 = (const uchar *)str2;
+ if ( !s1 || !s2 )
+ {
+ return s1 == s2 ? 0 : static_cast<int>(s2 - s1);
+ }
int res;
uchar c;
- if ( !s1 || !s2 )
- return s1 == s2 ? 0 : (int)(s2 - s1);
- for ( ; !(res = (c=(char)tolower(*s1)) - tolower(*s2)); s1++, s2++ )
- if ( !c ) // strings are equal
- break;
+ for ( ; !(res = ((c=toLowerChar(*s1)) - toLowerChar(*s2))); s1++, s2++ )
+ {
+ if ( !c ) // strings are equal
+ break;
+ }
return res;
}
-int qstrnicmp( const char *str1, const char *str2, size_t len )
+int qstrnicmp( const char *s1, const char *s2, size_t len )
{
- const uchar *s1 = (const uchar *)str1;
- const uchar *s2 = (const uchar *)str2;
- int res;
- uchar c;
if ( !s1 || !s2 )
- return (int)(s2 - s1);
- for ( ; len--; s1++, s2++ ) {
- if ( (res = (c=(char)tolower(*s1)) - tolower(*s2)) )
+ {
+ return static_cast<int>(s2 - s1);
+ }
+ for ( ; len--; s1++, s2++ )
+ {
+ char c = toLowerChar(*s1);
+ int res = c-toLowerChar(*s2);
+ if ( res!=0 ) // strings are not equal
return res;
- if ( !c ) // strings are equal
+ if ( c==0 ) // strings are equal
break;
}
return 0;
char *r;
for (r=result.rawData(), p=s.data(); (q=strstr(p,src.data()))!=0; p=q+srcLen)
{
- int l = (int)(q-p);
+ int l = static_cast<int>(q-p);
memcpy(r,p,l);
r+=l;
}
// skip a consecutive sequence of src when necessary
- int l = (int)((q + seq * srcLen)-p);
+ int l = static_cast<int>((q + seq * srcLen)-p);
memcpy(r,p,l);
r+=l;
r+=dstLen;
}
qstrcpy(r,p);
- result.resize((int)strlen(result.data())+1);
+ result.resize(static_cast<int>(strlen(result.data())+1));
//printf("substitute(%s,%s,%s)->%s\n",s,src,dst,result.data());
return result;
}
char *qstrdup( const char * );
inline uint cstrlen( const char *str )
-{ return (uint)strlen(str); }
+{ return static_cast<uint>(strlen(str)); }
inline uint qstrlen( const char *str )
-{ return str ? (uint)strlen(str) : 0; }
+{ return str ? static_cast<uint>(strlen(str)) : 0; }
inline char *cstrcpy( char *dst, const char *src )
{ return strcpy(dst,src); }
explicit QCString( const std::string &s ) : m_rep(s) {}
- QCString( std::string &&s) { m_rep = std::move(s); }
+ QCString( std::string &&s) : m_rep(std::move(s)) {}
/** creates a string with room for size characters
* @param[in] size the number of character to allocate (also counting the 0-terminator!)
bool isEmpty() const { return m_rep.empty(); }
/** Returns the length of the string, not counting the 0-terminator. Equivalent to size(). */
- uint length() const { return (uint)m_rep.size(); }
+ uint length() const { return static_cast<uint>(m_rep.size()); }
/** Returns the length of the string, not counting the 0-terminator. */
- uint size() const { return (uint)m_rep.size(); }
+ uint size() const { return static_cast<uint>(m_rep.size()); }
/** Returns a pointer to the contents of the string in the form of a 0-terminated C string */
const char *data() const { return m_rep.c_str(); }
*/
bool fill( char c, int len = -1 )
{
- int l = len==-1 ? (int)m_rep.size() : len;
+ int l = len==-1 ? static_cast<int>(m_rep.size()) : len;
m_rep = std::string(l,c);
return TRUE;
}
}
#endif
- std::string str() const
+ const std::string &str() const
{
return m_rep;
}
*****************************************************************************/
inline bool operator==( const QCString &s1, const QCString &s2 )
-{ return qstrcmp(s1.data(),s2.data()) == 0; }
+{ return s1.str() == s2.str(); }
inline bool operator==( const QCString &s1, const char *s2 )
{ return qstrcmp(s1.data(),s2) == 0; }
{ return qstrcmp(s1,s2.data()) == 0; }
inline bool operator!=( const QCString &s1, const QCString &s2 )
-{ return qstrcmp(s1.data(),s2.data()) != 0; }
+{ return s1.str() != s2.str(); }
inline bool operator!=( const QCString &s1, const char *s2 )
{ return qstrcmp(s1.data(),s2) != 0; }
/*
- * Copyright (C) 2008 by Sebastian Pipping.
- * Copyright (C) 2008 Dimitri van Heesch.
+ * Copyright (C) 1997-2022 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
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
- *
- * Sebastian Pipping <sebastian@pipping.org>
*/
-#include "qhp.h"
-#include "qhpxmlwriter.h"
-#include "message.h"
+#include <algorithm>
+#include <fstream>
+#include <memory>
+#include <string.h>
+#include <vector>
+#include <cassert>
+
#include "config.h"
-#include "memberdef.h"
-#include "groupdef.h"
+#include "debug.h"
#include "doxygen.h"
-#include "filedef.h"
+#include "groupdef.h"
+#include "memberdef.h"
+#include "message.h"
+#include "qhp.h"
+#include "textstream.h"
#include "util.h"
-#include <fstream>
-#include <string.h>
+static inline void writeIndent(TextStream &t,int indent)
+{
+ if (Debug::isFlagSet(Debug::Qhp))
+ {
+ for (int i=0;i<indent;i++) t << " ";
+ }
+}
+
+class QhpSectionTree
+{
+ private:
+ struct Node
+ {
+ enum class Type { Root, Dir, Section };
+ // constructor for root node
+ Node() : type(Type::Root), parent(0) {}
+ // constructor for dir node
+ Node(Node *parent_) : type(Type::Dir), parent(parent_) {}
+ // constructor for section node
+ Node(Node *parent_, const QCString &title_,const QCString &ref_)
+ : type(Type::Section), parent(parent_), title(title_), ref(ref_) {}
+ Type type;
+ Node *parent = 0;
+ QCString title;
+ QCString ref;
+ std::vector<std::unique_ptr<Node>> children;
+ };
+
+ Node m_root;
+ Node *m_current = &m_root;
+
+ void traverse(const Node &root,TextStream &t,int indent) const
+ {
+ /* Input: Output:
+ * =================================================
+ * Section1 <section title=".." ref="..">
+ * Dir1
+ * Section2 <section title=".." ref="..">
+ * Dir2
+ * Section3 <section title=".." ref=".."/>
+ * </section>
+ * </section>
+ * Section4 <section title=".." ref="..>
+ * Dir3
+ * Dir4
+ * Section5 <section title=.." ref=.."/>
+ * </section>
+ * Section6 <section title=".." ref=".."/>
+ */
+ size_t numChildren = root.children.size();
+ size_t i=0;
+ while (i<numChildren)
+ {
+ if (root.children[i]->type==Node::Type::Section)
+ {
+ i++;
+ if (i<numChildren && root.children[i]->type==Node::Type::Dir)
+ {
+ // we have a dir node
+ writeIndent(t,indent);
+ t << "<section title=\"" << convertToXML(root.children[i-1]->title) << "\""
+ << " ref=\"" << convertToXML(root.children[i-1]->ref) << "\">\n";
+ while (i<numChildren && root.children[i]->type==Node::Type::Dir)
+ {
+ traverse(*root.children[i].get(),t,indent+1);
+ i++;
+ }
+ writeIndent(t,indent);
+ t << "</section>\n";
+ }
+ else // we have a leaf section node
+ {
+ writeIndent(t,indent);
+ t << "<section title=\"" << convertToXML(root.children[i-1]->title) << "\""
+ << " ref=\"" << convertToXML(root.children[i-1]->ref) << "\"/>\n";
+ }
+ }
+ else // dir without preceding section (no extra indent)
+ {
+ traverse(*root.children[i].get(),t,indent);
+ i++;
+ }
+ }
+ }
+
+ public:
+ void addSection(const QCString &title,const QCString &ref)
+ {
+ m_current->children.push_back(std::make_unique<Node>(m_current,title,ref));
+ }
+ void incLevel()
+ {
+ auto newNode = new Node(m_current);
+ m_current->children.push_back(std::unique_ptr<Node>(newNode));
+ m_current = newNode;
+ }
+ void decLevel()
+ {
+ assert(m_current->parent!=0);
+ if (m_current->parent)
+ {
+ m_current = m_current->parent;
+ }
+ }
+ void writeToc(TextStream &t) const
+ {
+ writeIndent(t,2);
+ t << "<toc>\n";
+ traverse(m_root,t,3);
+ writeIndent(t,2);
+ t << "</toc>\n";
+ }
+};
+
+class Qhp::Private
+{
+ public:
+ std::ofstream docFile;
+ TextStream doc;
+ TextStream index;
+ StringSet files;
+ QhpSectionTree sectionTree;
+};
+
+static QCString getFullProjectName()
+{
+ QCString projectName = Config_getString(PROJECT_NAME);
+ QCString versionText = Config_getString(PROJECT_NUMBER);
+ if (projectName.isEmpty()) projectName="Root";
+ if (!versionText.isEmpty()) projectName+=" "+versionText;
+ return projectName;
+}
static QCString makeFileName(const QCString & withoutExtension)
{
}
else // add specified HTML extension
{
- addHtmlExtensionIfMissing(result);
+ result = addHtmlExtensionIfMissing(result);
}
}
return result;
return result+"#"+anchor;
}
-Qhp::Qhp()
+Qhp::Qhp() : p(std::make_unique<Private>())
{
- m_doc.setIndentLevel(0);
- m_toc.setIndentLevel(2);
- m_index.setIndentLevel(2);
- m_files.setIndentLevel(2);
}
Qhp::~Qhp()
{
- clearPrevSection();
}
void Qhp::initialize()
<filterAttribute>1.0</filterAttribute>
..
*/
- QCString nameSpace = Config_getString(QHP_NAMESPACE);
- QCString virtualFolder = Config_getString(QHP_VIRTUAL_FOLDER);
-
- m_doc.declaration("1.0", "UTF-8");
-
- const char * rootAttributes[] =
- { "version", "1.0", 0 };
+ QCString fileName = Config_getString(HTML_OUTPUT) + "/" + qhpFileName;
+ p->docFile.open( fileName.str(), std::ofstream::out | std::ofstream::binary);
+ if (!p->docFile.is_open())
+ {
+ term("Could not open file %s for writing\n", fileName.data());
+ }
+ p->doc.setStream(&p->docFile);
- m_doc.open("QtHelpProject", rootAttributes);
- m_doc.openCloseContent("namespace", nameSpace);
- m_doc.openCloseContent("virtualFolder", virtualFolder);
+ p->doc << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+ p->doc << "<QtHelpProject version=\"1.0\">\n";
+ writeIndent(p->doc,1);
+ p->doc << "<namespace>" << convertToXML(Config_getString(QHP_NAMESPACE)) << "</namespace>\n";
+ writeIndent(p->doc,1);
+ p->doc << "<virtualFolder>" << convertToXML(Config_getString(QHP_VIRTUAL_FOLDER)) << "</virtualFolder>\n";
// Add custom filter
QCString filterName = Config_getString(QHP_CUST_FILTER_NAME);
if (!filterName.isEmpty())
{
- const char * tagAttributes[] =
- { "name", filterName.data(), 0 };
- m_doc.open("customFilter", tagAttributes);
+ writeIndent(p->doc,1);
+ p->doc << "<customFilter name=\"" << convertToXML(filterName) << "\">\n";
StringVector customFilterAttributes =
split(Config_getString(QHP_CUST_FILTER_ATTRS).str(), " ");
for (const auto &attr : customFilterAttributes)
{
- m_doc.openCloseContent("filterAttribute", attr.c_str());
+ writeIndent(p->doc,2);
+ p->doc << "<filterAttribute>" << convertToXML(QCString(attr)) << "</filterAttribute>\n";
}
- m_doc.close("customFilter");
+ writeIndent(p->doc,1);
+ p->doc << "</customFilter>\n";
}
- m_doc.open("filterSection");
+ writeIndent(p->doc,1);
+ p->doc << "<filterSection>\n";
// Add section attributes
- StringVector sectionFilterAttributes =
- split(Config_getString(QHP_SECT_FILTER_ATTRS).str(), " ");
+ StringVector sectionFilterAttributes = split(Config_getString(QHP_SECT_FILTER_ATTRS).str(), " ");
+ // always add doxygen as filter attribute
if (std::find(sectionFilterAttributes.begin(), sectionFilterAttributes.end(), "doxygen") ==
sectionFilterAttributes.end())
{
}
for (const auto &attr : sectionFilterAttributes)
{
- m_doc.openCloseContent("filterAttribute", attr.c_str());
+ writeIndent(p->doc,2);
+ p->doc << "<filterAttribute>" << convertToXML(QCString(attr)) << "</filterAttribute>\n";
}
- m_toc.open("toc");
-
- // Add extra root node
- QCString fullProjectname = getFullProjectName();
- QCString indexFile = "index"+Doxygen::htmlFileExtension;
- const char * const attributes[] =
- { "title", fullProjectname.data(),
- "ref", indexFile.data(),
- NULL
- };
- m_toc.open("section", attributes);
- m_openCount=1;
- m_prevSectionTitle = getFullProjectName();
- m_prevSectionLevel = 1;
- m_sectionLevel = 1;
-
- m_index.open("keywords");
- m_files.open("files");
+ // Add extra root node to the TOC
+ p->sectionTree.addSection(getFullProjectName(),"index"+Doxygen::htmlFileExtension);
+ p->sectionTree.incLevel();
+
+ writeIndent(p->index,2);
+ p->index << "<keywords>\n";
}
void Qhp::finalize()
{
+ // close root node
+ p->sectionTree.decLevel();
+
// Finish TOC
- handlePrevSection();
- while (m_openCount>0)
- {
- m_toc.close("section");
- m_openCount--;
- }
- m_toc.close("toc");
- m_doc.insert(m_toc);
+ p->sectionTree.writeToc(p->doc);
// Finish index
- m_index.close("keywords");
- m_doc.insert(m_index);
+ writeIndent(p->index,2);
+ p->index << "</keywords>\n";
+ p->doc << p->index.str();
// Finish files
- m_files.close("files");
- m_doc.insert(m_files);
-
- m_doc.close("filterSection");
- m_doc.close("QtHelpProject");
-
- QCString fileName = Config_getString(HTML_OUTPUT) + "/" + getQhpFileName();
- std::ofstream file(fileName.str(),std::ofstream::out | std::ofstream::binary);
- if (!file.is_open())
+ writeIndent(p->doc,2);
+ p->doc << "<files>\n";
+ for (auto &s : p->files)
{
- term("Could not open file %s for writing\n", fileName.data());
+ writeIndent(p->doc,3);
+ p->doc << s.c_str() << "\n";
}
- TextStream t(&file);
- m_doc.dumpTo(t);
+ writeIndent(p->doc,2);
+ p->doc << "</files>\n";
+
+ writeIndent(p->doc,1);
+ p->doc << "</filterSection>\n";
+ p->doc << "</QtHelpProject>\n";
+
+ p->doc.flush();
+ p->docFile.close();
}
void Qhp::incContentsDepth()
{
- m_sectionLevel++;
+ p->sectionTree.incLevel();
}
void Qhp::decContentsDepth()
{
- if (m_sectionLevel<=0 || (m_sectionLevel==1 && m_skipMainPageSection))
- {
- m_skipMainPageSection=FALSE;
- return;
- }
- m_sectionLevel--;
+ p->sectionTree.decLevel();
}
-void Qhp::addContentsItem(bool /*isDir*/, const QCString & name,
+void Qhp::addContentsItem(bool isDir, const QCString & name,
const QCString & /*ref*/, const QCString & file,
const QCString &anchor, bool /* separateIndex */,
bool /* addToNavIndex */,
const Definition * /*def*/)
{
- //printf("Qhp::addContentsItem(%s) %d\n",name,m_sectionLevel);
- // Backup difference before modification
+ /*
+ <toc>
+ <section title="My Application Manual" ref="index.html">
+ <section title="Chapter 1" ref="doc.html#chapter1"/>
+ <section title="Chapter 2" ref="doc.html#chapter2"/>
+ <section title="Chapter 3" ref="doc.html#chapter3"/>
+ </section>
+ </toc>
+ */
QCString f = file;
if (!f.isEmpty() && f.at(0)=='^') return; // absolute URL not supported
- int diff = m_prevSectionLevel - m_sectionLevel;
-
- handlePrevSection();
- setPrevSection(name, f, anchor, m_sectionLevel);
-
- // Close sections as needed
- //printf("Qhp::addContentsItem() closing %d sections\n",diff);
- while (diff>0)
- {
- m_toc.close("section");
- m_openCount--;
- diff--;
- }
+ QCString finalRef = makeRef(f, anchor);
+ p->sectionTree.addSection(name,finalRef);
}
void Qhp::addIndexItem(const Definition *context,const MemberDef *md,
if (md) // member
{
- static bool separateMemberPages = Config_getBool(SEPARATE_MEMBER_PAGES);
+ bool separateMemberPages = Config_getBool(SEPARATE_MEMBER_PAGES);
if (context==0) // global member
{
if (md->getGroupDef())
}
if (context==0) return; // should not happen
QCString cfname = md->getOutputFileBase();
+ QCString argStr = md->argsString();
QCString cfiname = context->getOutputFileBase();
QCString level1 = context->name();
QCString level2 = !word.isEmpty() ? word : md->name();
QCString contRef = separateMemberPages ? cfname : cfiname;
QCString anchor = !sectionAnchor.isEmpty() ? sectionAnchor : md->anchor();
-
QCString ref;
// <keyword name="foo" id="MyApplication::foo" ref="doc.html#foo"/>
ref = makeRef(contRef, anchor);
QCString id = level1+"::"+level2;
- const char * attributes[] =
- {
- "name", level2.data(),
- "id", id.data(),
- "ref", ref.data(),
- 0
- };
- m_index.openClose("keyword", attributes);
+ writeIndent(p->index,3);
+ p->index << "<keyword name=\"" << convertToXML(level2 + argStr) << "\""
+ " id=\"" << convertToXML(id + "_" + anchor) << "\""
+ " ref=\"" << convertToXML(ref) << "\"/>\n";
}
else if (context) // container
{
QCString contRef = context->getOutputFileBase();
QCString level1 = !word.isEmpty() ? word : context->name();
QCString ref = makeRef(contRef,sectionAnchor);
- const char * attributes[] =
- {
- "name", level1.data(),
- "id", level1.data(),
- "ref", ref.data(),
- 0
- };
- m_index.openClose("keyword", attributes);
- }
-}
-
-void Qhp::addIndexFile(const QCString & name)
-{
- addFile(name);
-}
-
-QCString Qhp::getQhpFileName()
-{
- return "index.qhp";
-}
-
-QCString Qhp::getFullProjectName()
-{
- QCString projectName = Config_getString(PROJECT_NAME);
- QCString versionText = Config_getString(PROJECT_NUMBER);
- if (projectName.isEmpty()) projectName="Root";
- return projectName + (versionText.isEmpty()
- ? QCString("")
- : QCString(" ") + versionText);
-}
-
-void Qhp::handlePrevSection()
-{
- /*
- <toc>
- <section title="My Application Manual" ref="index.html">
- <section title="Chapter 1" ref="doc.html#chapter1"/>
- <section title="Chapter 2" ref="doc.html#chapter2"/>
- <section title="Chapter 3" ref="doc.html#chapter3"/>
- </section>
- </toc>
- */
-
- if (m_prevSectionTitle.isNull())
- {
- m_prevSectionTitle=" "; // should not happen...
- }
-
- // We skip "Main Page" as our extra root is pointing to that
- if (!((m_prevSectionLevel==1) && (m_prevSectionTitle==getFullProjectName())))
- {
- QCString finalRef = makeRef(m_prevSectionBaseName, m_prevSectionAnchor);
-
- const char * const attributes[] =
- { "title", m_prevSectionTitle.data(),
- "ref", finalRef.data(),
- NULL
- };
-
- if (m_prevSectionLevel < m_sectionLevel)
- {
- // Section with children
- m_toc.open("section", attributes);
- m_openCount++;
- }
- else
- {
- // Section without children
- m_toc.openClose("section", attributes);
- }
- }
- else
- {
- m_skipMainPageSection=TRUE;
+ writeIndent(p->index,3);
+ p->index << "<keyword name=\"" << convertToXML(level1) << "\""
+ << " id=\"" << convertToXML(level1 +"_" + sectionAnchor) << "\""
+ << " ref=\"" << convertToXML(ref) << "\"/>\n";
}
-
- clearPrevSection();
}
-void Qhp::setPrevSection(const QCString & title, const QCString & basename, const QCString & anchor, int level)
-{
- m_prevSectionTitle = title;
- m_prevSectionBaseName = basename;
- m_prevSectionAnchor = anchor;
- m_prevSectionLevel = level;
-}
-
-void Qhp::clearPrevSection()
+void Qhp::addFile(const QCString & fileName)
{
- m_prevSectionTitle.resize(0);
- m_prevSectionBaseName.resize(0);
- m_prevSectionAnchor.resize(0);
+ p->files.insert(("<file>" + convertToXML(fileName) + "</file>").str());
}
-void Qhp::addFile(const QCString & fileName)
+void Qhp::addIndexFile(const QCString & fileName)
{
- m_files.openCloseContent("file", fileName);
+ addFile(fileName);
}
void Qhp::addImageFile(const QCString &fileName)
addFile(fileName);
}
+QCString Qhp::getQchFileName()
+{
+ QCString const & qchFile = Config_getString(QCH_FILE);
+ if (!qchFile.isEmpty())
+ {
+ return qchFile;
+ }
+
+ QCString const & projectName = Config_getString(PROJECT_NAME);
+ QCString const & versionText = Config_getString(PROJECT_NUMBER);
+
+ return QCString("../qch/")
+ + (projectName.isEmpty() ? QCString("index") : projectName)
+ + (versionText.isEmpty() ? QCString("") : QCString("-") + versionText)
+ + QCString(".qch");
+}
/*
- * Copyright (C) 2008 by Sebastian Pipping.
- * Copyright (C) 2008 Dimitri van Heesch.
+ * Copyright (C) 1997-2022 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
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
- *
- * Sebastian Pipping <sebastian@pipping.org>
*/
-#ifndef DOXYGEN_QHP_H
-#define DOXYGEN_QHP_H
+#ifndef QHP_H
+#define QHP_H
+
+#include <memory>
#include "index.h"
-#include "qhpxmlwriter.h"
class Qhp : public IndexIntf
{
public:
Qhp();
- ~Qhp();
+ ~Qhp();
- // BEGIN IndexIntf
void initialize();
void finalize();
void incContentsDepth();
void addIndexFile(const QCString & name);
void addImageFile(const QCString & name);
void addStyleSheetFile(const QCString & name);
- // END IndexIntf
- static QCString getQhpFileName();
+ static inline const QCString qhpFileName = "index.qhp";
+ static QCString getQchFileName();
private:
- void handlePrevSection();
- void clearPrevSection();
- void setPrevSection(const QCString & title, const QCString & basename, const QCString & anchor, int level);
- void addFile(const QCString & fileName);
-
- static QCString getFullProjectName();
-
- QhpXmlWriter m_doc;
- QhpXmlWriter m_toc;
- QhpXmlWriter m_index;
- QhpXmlWriter m_files;
-
- QCString m_prevSectionTitle;
- QCString m_prevSectionBaseName;
- QCString m_prevSectionAnchor;
-
- int m_prevSectionLevel = 0;
- int m_sectionLevel = 0;
- int m_openCount = 0;
- bool m_skipMainPageSection = false;
+ void addFile(const QCString &);
+ class Private;
+ std::unique_ptr<Private> p;
};
-#endif // DOXYGEN_QHP_H
+#endif // QHP_H
+++ /dev/null
-/*
- * Copyright (C) 2008 by Sebastian Pipping.
- * Copyright (C) 2008 Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- * Documents produced by Doxygen are derivative works derived from the
- * input used in their production; they are not affected by this license.
- *
- * Sebastian Pipping <sebastian@pipping.org>
- */
-
-#include "qhpxmlwriter.h"
-#include "util.h"
-#include "qcstring.h"
-
-QhpXmlWriter::QhpXmlWriter()
- : m_indentLevel(0), m_curLineIndented(false), m_compress(false)
-{
-}
-
-QhpXmlWriter::~QhpXmlWriter()
-{
-}
-
-void QhpXmlWriter::setIndentLevel(int level)
-{
- m_indentLevel = level;
-}
-
-void QhpXmlWriter::setCompressionEnabled(bool enabled)
-{
- m_compress = enabled;
-}
-
-void QhpXmlWriter::insert(QhpXmlWriter const & source)
-{
- m_backend << source.m_backend.str();
-}
-
-void QhpXmlWriter::dumpTo(TextStream & file)
-{
- file << m_backend.str();
-}
-
-void QhpXmlWriter::open(const QCString &elementName,
- const char * const attributes[])
-{
- indent();
- openPure(elementName, attributes);
- newLine();
- m_indentLevel++;
-}
-
-void QhpXmlWriter::openClose(const QCString &elementName,
- const char * const attributes[])
-{
- indent();
- openClosePure(elementName, attributes);
- newLine();
-}
-
-void QhpXmlWriter::openCloseContent(const QCString &elementName,
- const QCString &content)
-{
- indent();
- openPure(elementName);
- m_backend << convertToXML(content);
- closePure(elementName);
- newLine();
-}
-
-void QhpXmlWriter::close(const QCString &elementName)
-{
- m_indentLevel--;
- indent();
- closePure(elementName);
- newLine();
-}
-
-void QhpXmlWriter::declaration(const QCString &version, const QCString &encoding)
-{
- m_backend << "<?xml version=\"" << version << "\" encoding=\"" << encoding << "\"?>";
- newLine();
-}
-
-void QhpXmlWriter::indent()
-{
- if (m_curLineIndented)
- {
- return;
- }
- for (int i = 0; i < m_indentLevel; i++)
- {
- m_backend << " ";
- }
- m_curLineIndented = true;
-}
-
-void QhpXmlWriter::newLine()
-{
- if (!m_compress)
- {
- m_backend << "\n";
- m_curLineIndented = false;
- }
-}
-
-void QhpXmlWriter::openPureHelper(const QCString &elementName,
- const char * const attributes[], bool close)
-{
- m_backend << "<" << elementName;
- if (attributes)
- {
- for (const char * const * walker = attributes;
- walker[0]; walker += 2)
- {
- const char *const key = walker[0];
- const char *const value = walker[1];
- if (!value)
- {
- continue;
- }
- m_backend << " " << key << "=\"" << convertToXML(value) << "\"";
- }
- }
-
- if (close)
- {
- m_backend << " /";
- }
- m_backend << ">";
-}
-
-void QhpXmlWriter::openPure(const QCString &elementName,
- const char * const attributes[])
-{
- openPureHelper(elementName, attributes, false);
-}
-
-void QhpXmlWriter::openClosePure(const QCString &elementName,
- const char * const attributes[])
-{
- openPureHelper(elementName, attributes, true);
-}
-
-void QhpXmlWriter::closePure(const QCString &elementName)
-{
- m_backend << "</" << elementName << ">";
-}
-
+++ /dev/null
-/*
- * Copyright (C) 2008 by Sebastian Pipping.
- * Copyright (C) 2008 Dimitri van Heesch.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- * Documents produced by Doxygen are derivative works derived from the
- * input used in their production; they are not affected by this license.
- *
- * Sebastian Pipping <sebastian@pipping.org>
- */
-
-#ifndef QHPXMLWRITER_H
-#define QHPXMLWRITER_H
-
-#include <sstream>
-#include "textstream.h"
-
-class QhpXmlWriter
-{
- public:
- QhpXmlWriter();
- ~QhpXmlWriter();
-
- void setIndentLevel(int level);
- void setCompressionEnabled(bool enabled);
- void insert(QhpXmlWriter const & source);
- void dumpTo(TextStream & file);
- void open(const QCString &elementName,
- const char * const attributes[] = 0);
- void openClose(const QCString &elementName,
- const char * const attributes[] = 0);
- void openCloseContent(const QCString &elementName, const QCString &content);
- void close(const QCString &elementName);
- void declaration(const QCString &version, const QCString &encoding);
-
- private:
- void indent();
- void newLine();
- void openPureHelper(const QCString &elementName,
- const char * const attributes[], bool close);
- void openPure(const QCString &elementName,
- const char * const attributes[] = 0);
- void openClosePure(const QCString &elementName,
- const char * const attributes[] = 0);
- void closePure(const QCString &elementName);
-
- TextStream m_backend;
- int m_indentLevel;
- bool m_curLineIndented;
- bool m_compress;
-
-};
-
-#endif // QHPXMLWRITER_H
{
doc += "</dd>";
}
- first=false;
doc += " <dt>";
doc += "\n";
if (item->scope())
tokenPos++; // skip over EndCapture
}
tokenPos++; // skip over end marker
- while ((int)index>=(int)startIndex)
+ while (index>=startIndex)
{
// pattern 'x*xy' should match 'xy' and 'xxxxy'
bool found = matchAt(tokenPos,tokenLen,str,match,index,level+1);
match.setMatch(pos,index-pos+match.length());
return true;
}
+ if (index==0) break;
index--;
}
return false;
{
QCString n = name;
n = n.left(n.length()-4)+".png"; // replace .lum by .png
- uchar *data = (uchar*)res->data;
+ const uchar *data = res->data;
ushort width = (data[0]<<8)+data[1];
ushort height = (data[2]<<8)+data[3];
ColoredImgDataItem images[2];
{
QCString n = name;
n = n.left(n.length()-5)+".png"; // replace .luma by .png
- uchar *data = (uchar*)res->data;
+ const uchar *data = res->data;
ushort width = (data[0]<<8)+data[1];
ushort height = (data[2]<<8)+data[3];
ColoredImgDataItem images[2];
//#define DBG_RTF(x) m_t << x
#define DBG_RTF(x) do {} while(0)
-static QCString align(DocHtmlCell *cell)
+static QCString align(const DocHtmlCell &cell)
{
- for (const auto &attr : cell->attribs())
+ for (const auto &attr : cell.attribs())
{
if (attr.name.lower()=="align")
{
RTFDocVisitor::RTFDocVisitor(TextStream &t,CodeOutputInterface &ci,
const QCString &langExt)
- : DocVisitor(DocVisitor_RTF), m_t(t), m_ci(ci), m_langExt(langExt)
+ : m_t(t), m_ci(ci), m_langExt(langExt)
{
}
// visitor functions for leaf nodes
//--------------------------------------
-void RTFDocVisitor::visit(DocWord *w)
+void RTFDocVisitor::operator()(const DocWord &w)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocWord)}\n");
- filter(w->word());
+ filter(w.word());
m_lastIsPara=FALSE;
}
-void RTFDocVisitor::visit(DocLinkedWord *w)
+void RTFDocVisitor::operator()(const DocLinkedWord &w)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocLinkedWord)}\n");
- startLink(w->ref(),w->file(),w->anchor());
- filter(w->word());
- endLink(w->ref());
+ startLink(w.ref(),w.file(),w.anchor());
+ filter(w.word());
+ endLink(w.ref());
m_lastIsPara=FALSE;
}
-void RTFDocVisitor::visit(DocWhiteSpace *w)
+void RTFDocVisitor::operator()(const DocWhiteSpace &w)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocWhiteSpace)}\n");
if (m_insidePre)
{
- m_t << w->chars();
+ m_t << w.chars();
}
else
{
m_lastIsPara=FALSE;
}
-void RTFDocVisitor::visit(DocSymbol *s)
+void RTFDocVisitor::operator()(const DocSymbol &s)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocSymbol)}\n");
- const char *res = HtmlEntityMapper::instance()->rtf(s->symbol());
+ const char *res = HtmlEntityMapper::instance()->rtf(s.symbol());
if (res)
{
m_t << res;
}
else
{
- err("RTF: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(s->symbol(),TRUE));
+ err("RTF: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(s.symbol(),TRUE));
}
m_lastIsPara=FALSE;
}
-void RTFDocVisitor::visit(DocEmoji *s)
+void RTFDocVisitor::operator()(const DocEmoji &s)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocEmoji)}\n");
- const char *res = EmojiEntityMapper::instance()->unicode(s->index());
+ const char *res = EmojiEntityMapper::instance()->unicode(s.index());
if (res)
{
const char *p = res;
}
else
{
- m_t << s->name();
+ m_t << s.name();
}
m_lastIsPara=FALSE;
}
-void RTFDocVisitor::visit(DocURL *u)
+void RTFDocVisitor::operator()(const DocURL &u)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocURL)}\n");
m_t << "{\\field "
"{\\*\\fldinst "
"{ HYPERLINK \"";
- if (u->isEmail()) m_t << "mailto:";
- m_t << u->url();
+ if (u.isEmail()) m_t << "mailto:";
+ m_t << u.url();
m_t << "\" }"
"{}";
m_t << "}"
"{\\fldrslt "
"{\\cs37\\ul\\cf2 ";
- filter(u->url());
+ filter(u.url());
m_t << "}"
"}"
"}\n";
else
{
m_t << "{\\f2 ";
- filter(u->url());
+ filter(u.url());
m_t << "}";
}
m_lastIsPara=FALSE;
}
-void RTFDocVisitor::visit(DocLineBreak *)
+void RTFDocVisitor::operator()(const DocLineBreak &)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocLineBreak)}\n");
m_lastIsPara=TRUE;
}
-void RTFDocVisitor::visit(DocHorRuler *)
+void RTFDocVisitor::operator()(const DocHorRuler &)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocHorRuler)}\n");
m_lastIsPara=TRUE;
}
-void RTFDocVisitor::visit(DocStyleChange *s)
+void RTFDocVisitor::operator()(const DocStyleChange &s)
{
if (m_hide) return;
m_lastIsPara=FALSE;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocStyleChange)}\n");
- switch (s->style())
+ switch (s.style())
{
case DocStyleChange::Bold:
- if (s->enable()) m_t << "{\\b "; else m_t << "} ";
+ if (s.enable()) m_t << "{\\b "; else m_t << "} ";
break;
case DocStyleChange::S:
case DocStyleChange::Strike:
case DocStyleChange::Del:
- if (s->enable()) m_t << "{\\strike "; else m_t << "} ";
+ if (s.enable()) m_t << "{\\strike "; else m_t << "} ";
break;
case DocStyleChange::Underline:
case DocStyleChange::Ins:
- if (s->enable()) m_t << "{\\ul "; else m_t << "} ";
+ if (s.enable()) m_t << "{\\ul "; else m_t << "} ";
break;
case DocStyleChange::Italic:
- if (s->enable()) m_t << "{\\i "; else m_t << "} ";
+ if (s.enable()) m_t << "{\\i "; else m_t << "} ";
break;
case DocStyleChange::Code:
- if (s->enable()) m_t << "{\\f2 "; else m_t << "} ";
+ if (s.enable()) m_t << "{\\f2 "; else m_t << "} ";
break;
case DocStyleChange::Subscript:
- if (s->enable()) m_t << "{\\sub "; else m_t << "} ";
+ if (s.enable()) m_t << "{\\sub "; else m_t << "} ";
break;
case DocStyleChange::Superscript:
- if (s->enable()) m_t << "{\\super "; else m_t << "} ";
+ if (s.enable()) m_t << "{\\super "; else m_t << "} ";
break;
case DocStyleChange::Center:
- if (s->enable()) m_t << "{\\qc "; else m_t << "} ";
+ if (s.enable()) m_t << "{\\qc "; else m_t << "} ";
break;
case DocStyleChange::Small:
- if (s->enable()) m_t << "{\\sub "; else m_t << "} ";
+ if (s.enable()) m_t << "{\\sub "; else m_t << "} ";
break;
case DocStyleChange::Cite:
- if (s->enable()) m_t << "{\\i "; else m_t << "} ";
+ if (s.enable()) m_t << "{\\i "; else m_t << "} ";
break;
case DocStyleChange::Preformatted:
- if (s->enable())
+ if (s.enable())
{
m_t << "{\n";
m_t << "\\par\n";
case DocStyleChange::Div: /* HTML only */ break;
case DocStyleChange::Span: /* HTML only */ break;
case DocStyleChange::Details: /* emulation of the <details> tag */
- if (s->enable())
+ if (s.enable())
{
m_t << "{\n";
m_t << "\\par\n";
m_lastIsPara=TRUE;
break;
case DocStyleChange::Summary: /* emulation of the <summary> tag inside a <details> tag */
- if (s->enable()) m_t << "{\\b "; else m_t << "} ";
+ if (s.enable()) m_t << "{\\b "; else m_t << "} ";
break;
}
}
-static void visitCaption(RTFDocVisitor *parent, const DocNodeList &children)
-{
- for (const auto &n : children) n->accept(parent);
-}
-
-void RTFDocVisitor::visit(DocVerbatim *s)
+void RTFDocVisitor::operator()(const DocVerbatim &s)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocVerbatim)}\n");
QCString lang = m_langExt;
- if (!s->language().isEmpty()) // explicit language setting
+ if (!s.language().isEmpty()) // explicit language setting
{
- lang = s->language();
+ lang = s.language();
}
SrcLangExt langExt = getLanguageFromCodeLang(lang);
- switch(s->type())
+ switch(s.type())
{
case DocVerbatim::Code:
m_t << "{\n";
m_t << "\\par\n";
m_t << rtf_Style_Reset << getStyle("CodeExample");
- getCodeParser(lang).parseCode(m_ci,s->context(),s->text(),langExt,
- s->isExample(),s->exampleFile());
+ getCodeParser(lang).parseCode(m_ci,s.context(),s.text(),langExt,
+ s.isExample(),s.exampleFile());
//m_t << "\\par\n";
m_t << "}\n";
break;
case DocVerbatim::JavaDocLiteral:
- filter(s->text(),TRUE);
+ filter(s.text(),TRUE);
break;
case DocVerbatim::JavaDocCode:
m_t << "{\n";
m_t << "{\\f2 ";
- filter(s->text(),TRUE);
+ filter(s.text(),TRUE);
m_t << "}";
m_t << "}\n";
break;
m_t << "{\n";
m_t << "\\par\n";
m_t << rtf_Style_Reset << getStyle("CodeExample");
- filter(s->text(),TRUE);
+ filter(s.text(),TRUE);
//m_t << "\\par\n";
m_t << "}\n";
break;
case DocVerbatim::RtfOnly:
- m_t << s->text();
+ m_t << s.text();
break;
case DocVerbatim::HtmlOnly:
case DocVerbatim::LatexOnly:
}
else
{
- QCString stext = s->text();
+ QCString stext = s.text();
file.write( stext.data(), stext.length() );
file.close();
}
- writeDotFile(fileName, s->hasCaption(), s->srcFile(), s->srcLine());
- visitCaption(this, s->children());
- includePicturePostRTF(true, s->hasCaption());
+ writeDotFile(fileName, s.hasCaption(), s.srcFile(), s.srcLine());
+ visitChildren(s);
+ includePicturePostRTF(true, s.hasCaption());
if (Config_getBool(DOT_CLEANUP)) Dir().remove(fileName.str());
}
err("Could not open file %s for writing\n",qPrint(baseName));
}
QCString text = "msc {";
- text+=s->text();
+ text+=s.text();
text+="}";
file.write( text.data(), text.length() );
file.close();
- writeMscFile(baseName, s->hasCaption(), s->srcFile(), s->srcLine());
- visitCaption(this, s->children());
- includePicturePostRTF(true, s->hasCaption());
+ writeMscFile(baseName, s.hasCaption(), s.srcFile(), s.srcLine());
+ visitChildren(s);
+ includePicturePostRTF(true, s.hasCaption());
if (Config_getBool(DOT_CLEANUP)) Dir().remove(baseName.str());
}
break;
case DocVerbatim::PlantUML:
{
- static QCString rtfOutput = Config_getString(RTF_OUTPUT);
+ QCString rtfOutput = Config_getString(RTF_OUTPUT);
QCString baseName = PlantumlManager::instance().writePlantUMLSource(
- rtfOutput,s->exampleFile(),s->text(),PlantumlManager::PUML_BITMAP,
- s->engine(),s->srcFile(),s->srcLine());
+ rtfOutput,s.exampleFile(),s.text(),PlantumlManager::PUML_BITMAP,
+ s.engine(),s.srcFile(),s.srcLine());
- writePlantUMLFile(baseName, s->hasCaption());
- visitCaption(this, s->children());
- includePicturePostRTF(true, s->hasCaption());
+ writePlantUMLFile(baseName, s.hasCaption());
+ visitChildren(s);
+ includePicturePostRTF(true, s.hasCaption());
}
break;
}
m_lastIsPara=FALSE;
}
-void RTFDocVisitor::visit(DocAnchor *anc)
+void RTFDocVisitor::operator()(const DocAnchor &anc)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocAnchor)}\n");
QCString anchor;
- if (!anc->file().isEmpty())
+ if (!anc.file().isEmpty())
{
- anchor+=stripPath(anc->file());
+ anchor+=stripPath(anc.file());
}
- if (!anc->file().isEmpty() && !anc->anchor().isEmpty())
+ if (!anc.file().isEmpty() && !anc.anchor().isEmpty())
{
anchor+="_";
}
- if (!anc->anchor().isEmpty())
+ if (!anc.anchor().isEmpty())
{
- anchor+=anc->anchor();
+ anchor+=anc.anchor();
}
m_t << "{\\bkmkstart " << rtfFormatBmkStr(anchor) << "}\n";
m_t << "{\\bkmkend " << rtfFormatBmkStr(anchor) << "}\n";
m_lastIsPara=FALSE;
}
-void RTFDocVisitor::visit(DocInclude *inc)
+void RTFDocVisitor::operator()(const DocInclude &inc)
{
if (m_hide) return;
- SrcLangExt langExt = getLanguageFromFileName(inc->extension());
+ SrcLangExt langExt = getLanguageFromFileName(inc.extension());
DBG_RTF("{\\comment RTFDocVisitor::visit(DocInclude)}\n");
- switch(inc->type())
+ switch(inc.type())
{
case DocInclude::IncWithLines:
{
m_t << "{\n";
m_t << "\\par\n";
m_t << rtf_Style_Reset << getStyle("CodeExample");
- FileInfo cfi( inc->file().str() );
+ FileInfo cfi( inc.file().str() );
FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
- getCodeParser(inc->extension()).parseCode(m_ci,inc->context(),
- inc->text(),
+ getCodeParser(inc.extension()).parseCode(m_ci,inc.context(),
+ inc.text(),
langExt,
- inc->isExample(),
- inc->exampleFile(),
+ inc.isExample(),
+ inc.exampleFile(),
fd, // fileDef,
-1, // start line
-1, // end line
m_t << "{\n";
m_t << "\\par\n";
m_t << rtf_Style_Reset << getStyle("CodeExample");
- getCodeParser(inc->extension()).parseCode(m_ci,inc->context(),
- inc->text(),langExt,inc->isExample(),
- inc->exampleFile(),
+ getCodeParser(inc.extension()).parseCode(m_ci,inc.context(),
+ inc.text(),langExt,inc.isExample(),
+ inc.exampleFile(),
0, // fileDef
-1, // startLine
-1, // endLine
case DocInclude::DocbookInclude:
break;
case DocInclude::RtfInclude:
- m_t << inc->text();
+ m_t << inc.text();
break;
case DocInclude::VerbInclude:
m_t << "{\n";
m_t << "\\par\n";
m_t << rtf_Style_Reset << getStyle("CodeExample");
- filter(inc->text());
+ filter(inc.text());
m_t << "\\par";
m_t << "}\n";
break;
m_t << "{\n";
if (!m_lastIsPara) m_t << "\\par\n";
m_t << rtf_Style_Reset << getStyle("CodeExample");
- getCodeParser(inc->extension()).parseCode(m_ci,
- inc->context(),
- extractBlock(inc->text(),inc->blockId()),
+ getCodeParser(inc.extension()).parseCode(m_ci,
+ inc.context(),
+ extractBlock(inc.text(),inc.blockId()),
langExt,
- inc->isExample(),
- inc->exampleFile()
+ inc.isExample(),
+ inc.exampleFile()
);
m_t << "}";
break;
case DocInclude::SnipWithLines:
{
- FileInfo cfi( inc->file().str() );
+ FileInfo cfi( inc.file().str() );
FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
m_t << "{\n";
if (!m_lastIsPara) m_t << "\\par\n";
m_t << rtf_Style_Reset << getStyle("CodeExample");
- getCodeParser(inc->extension()).parseCode(m_ci,
- inc->context(),
- extractBlock(inc->text(),inc->blockId()),
+ getCodeParser(inc.extension()).parseCode(m_ci,
+ inc.context(),
+ extractBlock(inc.text(),inc.blockId()),
langExt,
- inc->isExample(),
- inc->exampleFile(),
+ inc.isExample(),
+ inc.exampleFile(),
fd,
- lineBlock(inc->text(),inc->blockId()),
+ lineBlock(inc.text(),inc.blockId()),
-1, // endLine
FALSE, // inlineFragment
0, // memberDef
m_lastIsPara=TRUE;
}
-void RTFDocVisitor::visit(DocIncOperator *op)
+void RTFDocVisitor::operator()(const DocIncOperator &op)
{
//printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
- // op->type(),op->isFirst(),op->isLast(),qPrint(op->text()));
+ // op.type(),op.isFirst(),op.isLast(),qPrint(op.text()));
DBG_RTF("{\\comment RTFDocVisitor::visit(DocIncOperator)}\n");
- QCString locLangExt = getFileNameExtension(op->includeFileName());
+ QCString locLangExt = getFileNameExtension(op.includeFileName());
if (locLangExt.isEmpty()) locLangExt = m_langExt;
SrcLangExt langExt = getLanguageFromFileName(locLangExt);
- if (op->isFirst())
+ if (op.isFirst())
{
if (!m_hide)
{
pushHidden(m_hide);
m_hide = TRUE;
}
- if (op->type()!=DocIncOperator::Skip)
+ if (op.type()!=DocIncOperator::Skip)
{
m_hide = popHidden();
if (!m_hide)
{
FileDef *fd = 0;
- if (!op->includeFileName().isEmpty())
+ if (!op.includeFileName().isEmpty())
{
- FileInfo cfi( op->includeFileName().str() );
+ FileInfo cfi( op.includeFileName().str() );
fd = createFileDef( cfi.dirPath(), cfi.fileName() );
}
- getCodeParser(locLangExt).parseCode(m_ci,op->context(),op->text(),langExt,
- op->isExample(),op->exampleFile(),
+ getCodeParser(locLangExt).parseCode(m_ci,op.context(),op.text(),langExt,
+ op.isExample(),op.exampleFile(),
fd, // fileDef
- op->line(), // startLine
+ op.line(), // startLine
-1, // endLine
FALSE, // inline fragment
0, // memberDef
- op->showLineNo() // show line numbers
+ op.showLineNo() // show line numbers
);
if (fd) delete fd;
}
pushHidden(m_hide);
m_hide=TRUE;
}
- if (op->isLast())
+ if (op.isLast())
{
m_hide = popHidden();
if (!m_hide)
}
}
-void RTFDocVisitor::visit(DocFormula *f)
+void RTFDocVisitor::operator()(const DocFormula &f)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocFormula)}\n");
- bool bDisplay = !f->isInline();
+ bool bDisplay = !f.isInline();
if (bDisplay)
{
m_t << "\\par";
m_t << "\\pard";
m_t << "\\qc";
}
- m_t << "{ \\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"" << f->relPath() << f->name() << ".png\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt Image}}";
+ m_t << "{ \\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"" << f.relPath() << f.name() << ".png\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt Image}}";
if (bDisplay)
{
m_t << "\\par}";
m_lastIsPara=FALSE;
}
-void RTFDocVisitor::visit(DocIndexEntry *i)
+void RTFDocVisitor::operator()(const DocIndexEntry &i)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocIndexEntry)}\n");
- m_t << "{\\xe \\v " << i->entry() << "}\n";
+ m_t << "{\\xe \\v " << i.entry() << "}\n";
m_lastIsPara=FALSE;
}
-void RTFDocVisitor::visit(DocSimpleSectSep *)
+void RTFDocVisitor::operator()(const DocSimpleSectSep &)
{
}
-void RTFDocVisitor::visit(DocCite *cite)
+void RTFDocVisitor::operator()(const DocCite &cite)
{
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocCite)}\n");
- if (!cite->file().isEmpty())
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocCite &)}\n");
+ if (!cite.file().isEmpty())
{
- startLink(cite->ref(),cite->file(),cite->anchor());
+ startLink(cite.ref(),cite.file(),cite.anchor());
}
else
{
m_t << "{\\b ";
}
- filter(cite->text());
- if (!cite->file().isEmpty())
+ filter(cite.text());
+ if (!cite.file().isEmpty())
{
- endLink(cite->ref());
+ endLink(cite.ref());
}
else
{
// visitor functions for compound nodes
//--------------------------------------
-void RTFDocVisitor::visitPre(DocAutoList *l)
+void RTFDocVisitor::operator()(const DocAutoList &l)
{
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocAutoList)}\n");
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocAutoList &)}\n");
m_t << "{\n";
int level = indentLevel();
- m_listItemInfo[level].isEnum = l->isEnumList();
+ m_listItemInfo[level].isEnum = l.isEnumList();
m_listItemInfo[level].type = '1';
m_listItemInfo[level].number = 1;
m_lastIsPara=FALSE;
-}
-
-void RTFDocVisitor::visitPost(DocAutoList *)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocAutoList)}\n");
+ visitChildren(l);
if (!m_lastIsPara) m_t << "\\par";
m_t << "}\n";
m_lastIsPara=TRUE;
if (indentLevel()==0) m_t << "\\par\n";
}
-void RTFDocVisitor::visitPre(DocAutoListItem *)
+void RTFDocVisitor::operator()(const DocAutoListItem &li)
{
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocAutoListItem)}\n");
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocAutoListItem &)}\n");
if (!m_lastIsPara) m_t << "\\par\n";
m_t << rtf_Style_Reset;
int level = indentLevel();
}
incIndentLevel();
m_lastIsPara=FALSE;
-}
-
-void RTFDocVisitor::visitPost(DocAutoListItem *)
-{
+ visitChildren(li);
decIndentLevel();
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocAutoListItem)}\n");
-}
-
-void RTFDocVisitor::visitPre(DocPara *)
-{
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocPara)}\n");
}
-void RTFDocVisitor::visitPost(DocPara *p)
+void RTFDocVisitor::operator()(const DocPara &p)
{
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocPara)}\n");
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocPara &)}\n");
+ visitChildren(p);
if (!m_lastIsPara &&
- !p->isLast() && // omit <p> for last paragraph
- !(p->parent() && // and for parameters & sections
- p->parent()->kind()==DocNode::Kind_ParamSect
+ !p.isLast() && // omit <p> for last paragraph
+ !(p.parent() && // and for parameters & sections
+ std::get_if<DocParamSect>(p.parent())
)
)
{
}
}
-void RTFDocVisitor::visitPre(DocRoot *r)
+void RTFDocVisitor::operator()(const DocRoot &r)
{
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocRoot)}\n");
- if (r->indent()) incIndentLevel();
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocRoot &)}\n");
+ if (r.indent()) incIndentLevel();
m_t << "{" << rtf_Style["BodyText"].reference() << "\n";
-}
-
-void RTFDocVisitor::visitPost(DocRoot *r)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocRoot)}\n");
- if (!m_lastIsPara && !r->singleLine()) m_t << "\\par\n";
+ visitChildren(r);
+ if (!m_lastIsPara && !r.singleLine()) m_t << "\\par\n";
m_t << "}";
m_lastIsPara=TRUE;
- if (r->indent()) decIndentLevel();
+ if (r.indent()) decIndentLevel();
}
-void RTFDocVisitor::visitPre(DocSimpleSect *s)
+void RTFDocVisitor::operator()(const DocSimpleSect &s)
{
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSimpleSect)}\n");
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocSimpleSect &)}\n");
if (!m_lastIsPara) m_t << "\\par\n";
m_t << "{"; // start desc
//m_t << "{\\b "; // start bold
m_t << "{" << rtf_Style["Heading5"].reference() << "\n";
- switch(s->type())
+ switch(s.type())
{
case DocSimpleSect::See:
m_t << theTranslator->trSeeAlso(); break;
case DocSimpleSect::Unknown: break;
}
- // special case 1: user defined title
- if (s->type()!=DocSimpleSect::User && s->type()!=DocSimpleSect::Rcs)
+ incIndentLevel();
+ if (s.type()!=DocSimpleSect::User && s.type()!=DocSimpleSect::Rcs)
{
m_t << "\\par";
m_t << "}"; // end bold
- incIndentLevel();
m_t << rtf_Style_Reset << getStyle("DescContinue");
m_t << "{\\s17 \\sa60 \\sb30\n";
}
+ else
+ {
+ if (s.title())
+ {
+ std::visit(*this,*s.title());
+ }
+ m_t << "\\par\n";
+ m_t << "}"; // end bold
+ m_t << rtf_Style_Reset << getStyle("DescContinue");
+ }
m_lastIsPara=FALSE;
-}
-
-void RTFDocVisitor::visitPost(DocSimpleSect *s)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSimpleSect)}\n");
+ visitChildren(s);
if (!m_lastIsPara) m_t << "\\par\n";
decIndentLevel();
- if (s->type()!=DocSimpleSect::User && s->type()!=DocSimpleSect::Rcs) m_t << "}";
+ if (s.type()!=DocSimpleSect::User && s.type()!=DocSimpleSect::Rcs)
+ {
+ m_t << "}"; // end DescContinue
+ }
m_t << "}"; // end desc
m_lastIsPara=TRUE;
}
-void RTFDocVisitor::visitPre(DocTitle *)
-{
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocTitle)}\n");
-}
-
-void RTFDocVisitor::visitPost(DocTitle *)
+void RTFDocVisitor::operator()(const DocTitle &t)
{
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocTitle &)}\n");
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocTitle)}\n");
- m_t << "\\par\n";
- m_t << "}"; // end bold
- incIndentLevel();
- m_t << rtf_Style_Reset << getStyle("DescContinue");
- m_lastIsPara=FALSE;
+ visitChildren(t);
}
-void RTFDocVisitor::visitPre(DocSimpleList *)
+void RTFDocVisitor::operator()(const DocSimpleList &l)
{
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSimpleSect)}\n");
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocSimpleSect &)}\n");
m_t << "{\n";
m_listItemInfo[indentLevel()].isEnum = FALSE;
m_lastIsPara=FALSE;
-}
-
-void RTFDocVisitor::visitPost(DocSimpleList *)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSimpleSect)}\n");
+ visitChildren(l);
if (!m_lastIsPara) m_t << "\\par\n";
m_t << "}\n";
m_lastIsPara=TRUE;
}
-void RTFDocVisitor::visitPre(DocSimpleListItem *)
+void RTFDocVisitor::operator()(const DocSimpleListItem &li)
{
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSimpleListItem)}\n");
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocSimpleListItem &)}\n");
m_t << "\\par" << rtf_Style_Reset << getStyle("ListBullet") << "\n";
m_lastIsPara=FALSE;
incIndentLevel();
-}
-
-void RTFDocVisitor::visitPost(DocSimpleListItem *)
-{
+ if (li.paragraph())
+ {
+ std::visit(*this,*li.paragraph());
+ }
decIndentLevel();
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSimpleListItem)}\n");
}
-void RTFDocVisitor::visitPre(DocSection *s)
+void RTFDocVisitor::operator()(const DocSection &s)
{
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSection)}\n");
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocSection &)}\n");
if (!m_lastIsPara) m_t << "\\par\n";
- m_t << "{\\bkmkstart " << rtfFormatBmkStr(stripPath(s->file())+"_"+s->anchor()) << "}\n";
- m_t << "{\\bkmkend " << rtfFormatBmkStr(stripPath(s->file())+"_"+s->anchor()) << "}\n";
+ m_t << "{\\bkmkstart " << rtfFormatBmkStr(stripPath(s.file())+"_"+s.anchor()) << "}\n";
+ m_t << "{\\bkmkend " << rtfFormatBmkStr(stripPath(s.file())+"_"+s.anchor()) << "}\n";
m_t << "{{" // start section
<< rtf_Style_Reset;
QCString heading;
- int level = std::min(s->level()+1,4);
+ int level = std::min(s.level()+1,4);
heading.sprintf("Heading%d",level);
// set style
m_t << rtf_Style[heading.str()].reference() << "\n";
// make table of contents entry
- filter(s->title());
+ filter(s.title());
m_t << "\n\\par" << "}\n";
m_t << "{\\tc\\tcl" << level << " \\v ";
- filter(s->title());
+ filter(s.title());
m_t << "}\n";
m_lastIsPara=TRUE;
-}
-
-void RTFDocVisitor::visitPost(DocSection *)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSection)}\n");
+ visitChildren(s);
m_t << "\\par}\n"; // end section
m_lastIsPara=TRUE;
}
-void RTFDocVisitor::visitPre(DocHtmlList *l)
+void RTFDocVisitor::operator()(const DocHtmlList &l)
{
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlList)}\n");
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocHtmlList &)}\n");
m_t << "{\n";
int level = indentLevel();
- m_listItemInfo[level].isEnum = l->type()==DocHtmlList::Ordered;
+ m_listItemInfo[level].isEnum = l.type()==DocHtmlList::Ordered;
m_listItemInfo[level].number = 1;
m_listItemInfo[level].type = '1';
- for (const auto &opt : l->attribs())
+ for (const auto &opt : l.attribs())
{
if (opt.name=="type")
{
}
}
m_lastIsPara=FALSE;
-}
-
-void RTFDocVisitor::visitPost(DocHtmlList *)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlList)}\n");
+ visitChildren(l);
m_t << "\\par" << "}\n";
m_lastIsPara=TRUE;
}
-void RTFDocVisitor::visitPre(DocHtmlListItem *l)
+void RTFDocVisitor::operator()(const DocHtmlListItem &l)
{
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlListItem)}\n");
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocHtmlListItem &)}\n");
m_t << "\\par\n";
m_t << rtf_Style_Reset;
int level = indentLevel();
if (m_listItemInfo[level].isEnum)
{
- for (const auto &opt : l->attribs())
+ for (const auto &opt : l.attribs())
{
if (opt.name=="value")
{
}
incIndentLevel();
m_lastIsPara=FALSE;
-}
-
-void RTFDocVisitor::visitPost(DocHtmlListItem *)
-{
+ visitChildren(l);
decIndentLevel();
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlListItem)}\n");
}
-void RTFDocVisitor::visitPre(DocHtmlDescList *)
+void RTFDocVisitor::operator()(const DocHtmlDescList &dl)
{
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlDescList)}\n");
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocHtmlDescList &)}\n");
//m_t << "{\n";
//m_t << rtf_Style_Reset << getStyle("ListContinue");
//m_lastIsPara=FALSE;
-}
-
-void RTFDocVisitor::visitPost(DocHtmlDescList *)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlDescList)}\n");
+ visitChildren(dl);
//m_t << "}\n";
//m_t << "\\par\n";
//m_lastIsPara=TRUE;
}
-void RTFDocVisitor::visitPre(DocHtmlDescTitle *)
+void RTFDocVisitor::operator()(const DocHtmlDescTitle &dt)
{
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlDescTitle)}\n");
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocHtmlDescTitle &)}\n");
//m_t << "\\par\n";
//m_t << "{\\b ";
m_t << "{" << rtf_Style["Heading5"].reference() << "\n";
m_lastIsPara=FALSE;
-}
-
-void RTFDocVisitor::visitPost(DocHtmlDescTitle *)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlDescTitle)}\n");
+ visitChildren(dt);
m_t << "\\par\n";
m_t << "}\n";
m_lastIsPara=TRUE;
}
-void RTFDocVisitor::visitPre(DocHtmlDescData *)
+void RTFDocVisitor::operator()(const DocHtmlDescData &dd)
{
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlDescData)}\n");
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocHtmlDescData &)}\n");
incIndentLevel();
m_t << "{" << rtf_Style_Reset << getStyle("DescContinue");
-}
-
-void RTFDocVisitor::visitPost(DocHtmlDescData *)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlDescData)}\n");
+ visitChildren(dd);
m_t << "\\par";
m_t << "}\n";
decIndentLevel();
m_lastIsPara=TRUE;
}
-void RTFDocVisitor::visitPre(DocHtmlTable *t)
+void RTFDocVisitor::operator()(const DocHtmlTable &t)
{
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlTable)}\n");
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocHtmlTable &)}\n");
if (!m_lastIsPara) m_t << "\\par\n";
m_lastIsPara=TRUE;
- if (t->hasCaption())
+ if (t.caption())
{
- DocHtmlCaption *c = t->caption();
+ const DocHtmlCaption &c = std::get<DocHtmlCaption>(*t.caption());
m_t << "\\pard \\qc \\b";
- if (!c->file().isEmpty())
+ if (!c.file().isEmpty())
{
- m_t << "{\\bkmkstart " << rtfFormatBmkStr(stripPath(c->file())+"_"+c->anchor()) << "}\n";
- m_t << "{\\bkmkend " << rtfFormatBmkStr(stripPath(c->file())+"_"+c->anchor()) << "}\n";
+ m_t << "{\\bkmkstart " << rtfFormatBmkStr(stripPath(c.file())+"_"+c.anchor()) << "}\n";
+ m_t << "{\\bkmkend " << rtfFormatBmkStr(stripPath(c.file())+"_"+c.anchor()) << "}\n";
}
m_t << "{Table \\field\\flddirty{\\*\\fldinst { SEQ Table \\\\*Arabic }}{\\fldrslt {\\noproof 1}} ";
+ std::visit(*this,*t.caption());
}
-}
-
-void RTFDocVisitor::visitPost(DocHtmlTable *)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlTable)}\n");
+ visitChildren(t);
m_t << "\\pard\\plain\n";
m_t << "\\par\n";
m_lastIsPara=TRUE;
}
-void RTFDocVisitor::visitPre(DocHtmlCaption *)
+void RTFDocVisitor::operator()(const DocHtmlCaption &c)
{
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlCaption)}\n");
- // start of caption is handled in the RTFDocVisitor::visitPre(DocHtmlTable *t)
-}
-
-void RTFDocVisitor::visitPost(DocHtmlCaption *)
-{
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlCaption)}\n");
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocHtmlCaption &)}\n");
+ visitChildren(c);
m_t << "}\n\\par\n";
}
-void RTFDocVisitor::visitPre(DocHtmlRow *r)
+void RTFDocVisitor::operator()(const DocHtmlRow &r)
{
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlRow)}\n");
- uint i,columnWidth=(uint)r->numCells()>0 ? rtf_pageWidth/(uint)r->numCells() : 10;
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocHtmlRow &)}\n");
+ size_t i,columnWidth=r.numCells()>0 ? rtf_pageWidth/r.numCells() : 10;
m_t << "\\trowd \\trgaph108\\trleft-108"
"\\trbrdrt\\brdrs\\brdrw10 "
"\\trbrdrl\\brdrs\\brdrw10 "
"\\trbrdrr\\brdrs\\brdrw10 "
"\\trbrdrh\\brdrs\\brdrw10 "
"\\trbrdrv\\brdrs\\brdrw10 \n";
- for (i=0;i<r->numCells();i++)
+ for (i=0;i<r.numCells();i++)
{
- if (r->isHeading())
+ if (r.isHeading())
{
m_t << "\\clcbpat16"; // set cell shading to light grey (color 16 in the clut)
}
}
m_t << "\\pard \\widctlpar\\intbl\\adjustright\n";
m_lastIsPara=FALSE;
-}
-
-void RTFDocVisitor::visitPost(DocHtmlRow *)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlRow)}\n");
+ visitChildren(r);
m_t << "\n";
m_t << "\\pard \\widctlpar\\intbl\\adjustright\n";
m_t << "{\\row }\n";
m_lastIsPara=FALSE;
}
-void RTFDocVisitor::visitPre(DocHtmlCell *c)
+void RTFDocVisitor::operator()(const DocHtmlCell &c)
{
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlCell)}\n");
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocHtmlCell &)}\n");
m_t << "{" << align(c);
m_lastIsPara=FALSE;
-}
-
-void RTFDocVisitor::visitPost(DocHtmlCell *)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlCell)}\n");
+ visitChildren(c);
m_t << "\\cell }";
m_lastIsPara=FALSE;
}
-void RTFDocVisitor::visitPre(DocInternal *)
+void RTFDocVisitor::operator()(const DocInternal &i)
{
if (m_hide) return;
- //DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocInternal)}\n");
- //m_t << "{"; // start desc
- //m_t << "{\\b "; // start bold
- //m_t << theTranslator->trForInternalUseOnly();
- //m_t << "}"; // end bold
- //m_t << "\\par\n";
- //incIndentLevel();
- //m_t << rtf_Style_Reset << getStyle("DescContinue");
- //m_lastIsPara=FALSE;
+ visitChildren(i);
}
-void RTFDocVisitor::visitPost(DocInternal *)
+void RTFDocVisitor::operator()(const DocHRef &href)
{
if (m_hide) return;
- //DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocInternal)}\n");
- //m_t << "\\par";
- //decIndentLevel();
- //m_t << "}"; // end desc
- //m_lastIsPara=TRUE;
-}
-
-void RTFDocVisitor::visitPre(DocHRef *href)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHRef)}\n");
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocHRef &)}\n");
if (Config_getBool(RTF_HYPERLINKS))
{
- if (href->url().startsWith("#"))
+ if (href.url().startsWith("#"))
{
// when starting with # so a local link
QCString cite;
- cite = href->file() + "_" + href->url().right(href->url().length()-1);
+ cite = href.file() + "_" + href.url().right(href.url().length()-1);
m_t << "{\\field "
"{\\*\\fldinst "
"{ HYPERLINK \\\\l \"" << rtfFormatBmkStr(cite) << "\" "
{
m_t << "{\\field "
"{\\*\\fldinst "
- "{ HYPERLINK \"" << href->url() << "\" "
+ "{ HYPERLINK \"" << href.url() << "\" "
"}{}"
"}"
"{\\fldrslt "
m_t << "{\\f2 ";
}
m_lastIsPara=FALSE;
-}
-
-void RTFDocVisitor::visitPost(DocHRef *)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHRef)}\n");
+ visitChildren(href);
if (Config_getBool(RTF_HYPERLINKS))
{
m_t << "}"
m_lastIsPara=FALSE;
}
-void RTFDocVisitor::visitPre(DocHtmlHeader *header)
+void RTFDocVisitor::operator()(const DocHtmlHeader &header)
{
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlHeader)}\n");
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocHtmlHeader &)}\n");
m_t << "{" // start section
<< rtf_Style_Reset;
QCString heading;
- int level = std::min(header->level(),5);
+ int level = std::min(header.level(),5);
heading.sprintf("Heading%d",level);
// set style
m_t << rtf_Style[heading.str()].reference();
// make open table of contents entry that will be closed in visitPost method
m_t << "{\\tc\\tcl" << level << " ";
m_lastIsPara=FALSE;
-}
-
-void RTFDocVisitor::visitPost(DocHtmlHeader *)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlHeader)}\n");
+ visitChildren(header);
// close open table of contents entry
m_t << "} \\par";
m_t << "}\n"; // end section
m_lastIsPara=TRUE;
}
-void RTFDocVisitor::visitPre(DocImage *img)
-{
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocImage)}\n");
- includePicturePreRTF(img->name(), img->type()==DocImage::Rtf, img->hasCaption(), img->isInlineImage());
-}
void RTFDocVisitor::includePicturePreRTF(const QCString &name, bool isTypeRTF, bool hasCaption, bool inlineImage)
{
if (isTypeRTF)
}
}
-void RTFDocVisitor::visitPost(DocImage *img)
-{
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocImage)}\n");
- includePicturePostRTF(img->type()==DocImage::Rtf, img->hasCaption(), img->isInlineImage());
-}
-
void RTFDocVisitor::includePicturePostRTF(bool isTypeRTF, bool hasCaption, bool inlineImage)
{
if (isTypeRTF)
}
}
-void RTFDocVisitor::visitPre(DocDotFile *df)
+void RTFDocVisitor::operator()(const DocImage &img)
{
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocDotFile)}\n");
- if (!Config_getBool(DOT_CLEANUP)) copyFile(df->file(),Config_getString(RTF_OUTPUT)+"/"+stripPath(df->file()));
- writeDotFile(df);
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocImage &)}\n");
+ includePicturePreRTF(img.name(), img.type()==DocImage::Rtf, img.hasCaption(), img.isInlineImage());
+ visitChildren(img);
+ includePicturePostRTF(img.type()==DocImage::Rtf, img.hasCaption(), img.isInlineImage());
}
-void RTFDocVisitor::visitPost(DocDotFile *df)
+
+void RTFDocVisitor::operator()(const DocDotFile &df)
{
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocDotFile)}\n");
- includePicturePostRTF(true, df->hasCaption());
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocDotFile &)}\n");
+ if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(RTF_OUTPUT)+"/"+stripPath(df.file()));
+ writeDotFile(df);
+ visitChildren(df);
+ includePicturePostRTF(true, df.hasCaption());
}
-void RTFDocVisitor::visitPre(DocMscFile *df)
+void RTFDocVisitor::operator()(const DocMscFile &df)
{
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocMscFile)}\n");
- if (!Config_getBool(DOT_CLEANUP)) copyFile(df->file(),Config_getString(RTF_OUTPUT)+"/"+stripPath(df->file()));
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocMscFile &)}\n");
+ if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(RTF_OUTPUT)+"/"+stripPath(df.file()));
writeMscFile(df);
+ visitChildren(df);
+ includePicturePostRTF(true, df.hasCaption());
}
-void RTFDocVisitor::visitPost(DocMscFile *df)
+void RTFDocVisitor::operator()(const DocDiaFile &df)
{
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocMscFile)}\n");
- includePicturePostRTF(true, df->hasCaption());
-}
-
-void RTFDocVisitor::visitPre(DocDiaFile *df)
-{
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocDiaFile)}\n");
- if (!Config_getBool(DOT_CLEANUP)) copyFile(df->file(),Config_getString(RTF_OUTPUT)+"/"+stripPath(df->file()));
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocDiaFile &)}\n");
+ if (!Config_getBool(DOT_CLEANUP)) copyFile(df.file(),Config_getString(RTF_OUTPUT)+"/"+stripPath(df.file()));
writeDiaFile(df);
+ visitChildren(df);
+ includePicturePostRTF(true, df.hasCaption());
}
-void RTFDocVisitor::visitPost(DocDiaFile *df)
-{
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocDiaFile)}\n");
- includePicturePostRTF(true, df->hasCaption());
-}
-
-void RTFDocVisitor::visitPre(DocLink *lnk)
+void RTFDocVisitor::operator()(const DocLink &lnk)
{
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocLink)}\n");
- startLink(lnk->ref(),lnk->file(),lnk->anchor());
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocLink &)}\n");
+ startLink(lnk.ref(),lnk.file(),lnk.anchor());
+ visitChildren(lnk);
+ endLink(lnk.ref());
}
-void RTFDocVisitor::visitPost(DocLink *lnk)
+void RTFDocVisitor::operator()(const DocRef &ref)
{
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocLink)}\n");
- endLink(lnk->ref());
-}
-
-void RTFDocVisitor::visitPre(DocRef *ref)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocRef)}\n");
- // when ref->isSubPage()==TRUE we use ref->file() for HTML and
- // ref->anchor() for LaTeX/RTF
- if (ref->isSubPage())
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocRef &)}\n");
+ // when ref.isSubPage()==TRUE we use ref.file() for HTML and
+ // ref.anchor() for LaTeX/RTF
+ if (ref.isSubPage())
{
- startLink(ref->ref(),QCString(),ref->anchor());
+ startLink(ref.ref(),QCString(),ref.anchor());
}
else
{
- if (!ref->file().isEmpty()) startLink(ref->ref(),ref->file(),ref->anchor());
+ if (!ref.file().isEmpty()) startLink(ref.ref(),ref.file(),ref.anchor());
}
- if (!ref->hasLinkText()) filter(ref->targetTitle());
-}
-
-void RTFDocVisitor::visitPost(DocRef *ref)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocRef)}\n");
- if (!ref->file().isEmpty()) endLink(ref->ref());
+ if (!ref.hasLinkText()) filter(ref.targetTitle());
+ visitChildren(ref);
+ if (!ref.file().isEmpty()) endLink(ref.ref());
//m_t << " ";
}
-void RTFDocVisitor::visitPre(DocSecRefItem *)
-{
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSecRefItem)}\n");
-}
-
-void RTFDocVisitor::visitPost(DocSecRefItem *)
+void RTFDocVisitor::operator()(const DocSecRefItem &ref)
{
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSecRefItem)}\n");
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocSecRefItem &)}\n");
+ visitChildren(ref);
}
-void RTFDocVisitor::visitPre(DocSecRefList *)
+void RTFDocVisitor::operator()(const DocSecRefList &l)
{
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocSecRefList)}\n");
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocSecRefList &)}\n");
m_t << "{\n";
incIndentLevel();
m_t << rtf_Style_Reset << getStyle("LatexTOC") << "\n";
m_t << "\\par\n";
m_lastIsPara=TRUE;
-}
-
-void RTFDocVisitor::visitPost(DocSecRefList *)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocSecRefList)}\n");
+ visitChildren(l);
decIndentLevel();
m_t << "\\par";
m_t << "}\n";
m_lastIsPara=TRUE;
}
-void RTFDocVisitor::visitPre(DocParamSect *s)
+void RTFDocVisitor::operator()(const DocParamSect &s)
{
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocParamSect)}\n");
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocParamSect &)}\n");
m_t << "{"; // start param list
if (!m_lastIsPara) m_t << "\\par\n";
//m_t << "{\\b "; // start bold
m_t << "{" << rtf_Style["Heading5"].reference() << "\n";
- switch(s->type())
+ switch(s.type())
{
case DocParamSect::Param:
m_t << theTranslator->trParameters(); break;
}
m_t << "\\par";
m_t << "}\n";
- bool useTable = s->type()==DocParamSect::Param ||
- s->type()==DocParamSect::RetVal ||
- s->type()==DocParamSect::Exception ||
- s->type()==DocParamSect::TemplateParam;
+ bool useTable = s.type()==DocParamSect::Param ||
+ s.type()==DocParamSect::RetVal ||
+ s.type()==DocParamSect::Exception ||
+ s.type()==DocParamSect::TemplateParam;
if (!useTable)
{
incIndentLevel();
}
m_t << rtf_Style_Reset << getStyle("DescContinue");
m_lastIsPara=TRUE;
-}
-
-void RTFDocVisitor::visitPost(DocParamSect *s)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocParamSect)}\n");
+ visitChildren(s);
//m_t << "\\par\n";
- bool useTable = s->type()==DocParamSect::Param ||
- s->type()==DocParamSect::RetVal ||
- s->type()==DocParamSect::Exception ||
- s->type()==DocParamSect::TemplateParam;
if (!useTable)
{
decIndentLevel();
m_t << "}\n";
}
-void RTFDocVisitor::visitPre(DocParamList *pl)
+void RTFDocVisitor::operator()(const DocSeparator &sep)
+{
+ m_t << " " << sep.chars() << " ";
+}
+
+void RTFDocVisitor::operator()(const DocParamList &pl)
{
static int columnPos[4][5] =
{ { 2, 25, 100, 100, 100 }, // no inout, no type
};
int config=0;
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocParamList)}\n");
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocParamList &)}\n");
DocParamSect::Type parentType = DocParamSect::Unknown;
- DocParamSect *sect = 0;
- if (pl->parent() && pl->parent()->kind()==DocNode::Kind_ParamSect)
+ const DocParamSect *sect = std::get_if<DocParamSect>(pl.parent());
+ if (sect)
{
- parentType = ((DocParamSect*)pl->parent())->type();
- sect=(DocParamSect*)pl->parent();
+ parentType = sect->type();
}
bool useTable = parentType==DocParamSect::Param ||
parentType==DocParamSect::RetVal ||
}
// Put in the direction: in/out/in,out if specified.
- if (pl->direction()!=DocParamSect::Unspecified)
+ if (pl.direction()!=DocParamSect::Unspecified)
{
- if (pl->direction()==DocParamSect::In)
+ if (pl.direction()==DocParamSect::In)
{
m_t << "in";
}
- else if (pl->direction()==DocParamSect::Out)
+ else if (pl.direction()==DocParamSect::Out)
{
m_t << "out";
}
- else if (pl->direction()==DocParamSect::InOut)
+ else if (pl.direction()==DocParamSect::InOut)
{
m_t << "in,out";
}
{
m_t << "{";
}
- for (const auto &type : pl->paramTypes())
+ for (const auto &type : pl.paramTypes())
{
- if (type->kind()==DocNode::Kind_Word)
- {
- visit((DocWord*)type.get());
- }
- else if (type->kind()==DocNode::Kind_LinkedWord)
- {
- visit((DocLinkedWord*)type.get());
- }
- else if (type->kind()==DocNode::Kind_Sep)
- {
- m_t << " " << ((DocSeparator *)type.get())->chars() << " ";
- }
+ std::visit(*this,type);
}
if (useTable)
{
m_t << "{\\i ";
bool first=TRUE;
- for (const auto ¶m : pl->parameters())
+ for (const auto ¶m : pl.parameters())
{
if (!first) m_t << ","; else first=FALSE;
- if (param->kind()==DocNode::Kind_Word)
- {
- visit((DocWord*)param.get());
- }
- else if (param->kind()==DocNode::Kind_LinkedWord)
- {
- visit((DocLinkedWord*)param.get());
- }
+ std::visit(*this,param);
}
m_t << "} ";
m_t << "\\cell }{";
}
m_lastIsPara=TRUE;
-}
-void RTFDocVisitor::visitPost(DocParamList *pl)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocParamList)}\n");
-
- DocParamSect::Type parentType = DocParamSect::Unknown;
- //DocParamSect *sect = 0;
- if (pl->parent() && pl->parent()->kind()==DocNode::Kind_ParamSect)
+ for (const auto &par : pl.paragraphs())
{
- parentType = ((DocParamSect*)pl->parent())->type();
- //sect=(DocParamSect*)pl->parent();
+ std::visit(*this,par);
}
- bool useTable = parentType==DocParamSect::Param ||
- parentType==DocParamSect::RetVal ||
- parentType==DocParamSect::Exception ||
- parentType==DocParamSect::TemplateParam;
+
if (useTable)
{
m_t << "\\cell }\n";
m_lastIsPara=TRUE;
}
-void RTFDocVisitor::visitPre(DocXRefItem *x)
+void RTFDocVisitor::operator()(const DocXRefItem &x)
{
if (m_hide) return;
- if (x->title().isEmpty()) return;
- bool anonymousEnum = x->file()=="@";
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocXRefItem)}\n");
+ if (x.title().isEmpty()) return;
+ bool anonymousEnum = x.file()=="@";
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocXRefItem &)}\n");
if (!m_lastIsPara)
{
m_t << "\\par\n";
if (Config_getBool(RTF_HYPERLINKS) && !anonymousEnum)
{
QCString refName;
- if (!x->file().isEmpty())
+ if (!x.file().isEmpty())
{
- refName+=stripPath(x->file());
+ refName+=stripPath(x.file());
}
- if (!x->file().isEmpty() && !x->anchor().isEmpty())
+ if (!x.file().isEmpty() && !x.anchor().isEmpty())
{
refName+="_";
}
- if (!x->anchor().isEmpty())
+ if (!x.anchor().isEmpty())
{
- refName+=x->anchor();
+ refName+=x.anchor();
}
m_t << "{\\field "
"}"
"{\\fldrslt "
"{\\cs37\\ul\\cf2 ";
- filter(x->title());
+ filter(x.title());
m_t << "}"
"}"
"}";
}
else
{
- filter(x->title());
+ filter(x.title());
}
m_t << ":";
m_t << "\\par";
incIndentLevel();
m_t << rtf_Style_Reset << getStyle("DescContinue");
m_lastIsPara=FALSE;
-}
-
-void RTFDocVisitor::visitPost(DocXRefItem *x)
-{
- if (m_hide) return;
- if (x->title().isEmpty()) return;
+ visitChildren(x);
+ if (x.title().isEmpty()) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocXRefItem)}\n");
m_t << "\\par\n";
decIndentLevel();
m_lastIsPara=TRUE;
}
-void RTFDocVisitor::visitPre(DocInternalRef *ref)
+void RTFDocVisitor::operator()(const DocInternalRef &ref)
{
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocInternalRef)}\n");
- startLink("",ref->file(),ref->anchor());
-}
-
-void RTFDocVisitor::visitPost(DocInternalRef *)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocInternalRef)}\n");
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocInternalRef &)}\n");
+ startLink("",ref.file(),ref.anchor());
+ visitChildren(ref);
endLink("");
m_t << " ";
}
-void RTFDocVisitor::visitPre(DocText *)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocText)}\n");
-}
-
-void RTFDocVisitor::visitPost(DocText *)
+void RTFDocVisitor::operator()(const DocText &t)
{
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocText)}\n");
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocText &)}\n");
+ visitChildren(t);
}
-void RTFDocVisitor::visitPre(DocHtmlBlockQuote *)
+void RTFDocVisitor::operator()(const DocHtmlBlockQuote &q)
{
if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlBlockQuote)}\n");
+ DBG_RTF("{\\comment RTFDocVisitor::operator()(const DocHtmlBlockQuote &)}\n");
if (!m_lastIsPara) m_t << "\\par\n";
m_t << "{"; // start desc
incIndentLevel();
m_t << rtf_Style_Reset << getStyle("DescContinue");
-}
-
-void RTFDocVisitor::visitPost(DocHtmlBlockQuote *)
-{
- if (m_hide) return;
- DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlBlockQuote)}\n");
+ visitChildren(q);
if (!m_lastIsPara) m_t << "\\par\n";
decIndentLevel();
m_t << "}"; // end desc
m_lastIsPara=TRUE;
}
-void RTFDocVisitor::visitPre(DocVhdlFlow *)
+void RTFDocVisitor::operator()(const DocVhdlFlow &)
{
- if (m_hide) return;
}
-void RTFDocVisitor::visitPost(DocVhdlFlow *)
-{
- if (m_hide) return;
-}
-
-void RTFDocVisitor::visitPre(DocParBlock *)
-{
- if (m_hide) return;
-}
-
-void RTFDocVisitor::visitPost(DocParBlock *)
+void RTFDocVisitor::operator()(const DocParBlock &pb)
{
if (m_hide) return;
+ visitChildren(pb);
}
{
if (!str.isEmpty())
{
- const unsigned char *p=(const unsigned char *)str.data();
- unsigned char c;
- //unsigned char pc='\0';
+ const char *p=str.data();
+ char c;
while (*p)
{
- //static bool MultiByte = FALSE;
c=*p++;
-
- //if ( MultiByte )
- //{
- // m_t << getMultiByte( c );
- // MultiByte = FALSE;
- // continue;
- //}
- //if ( c >= 0x80 )
- //{
- // MultiByte = TRUE;
- // m_t << getMultiByte( c );
- // continue;
- //}
-
switch (c)
{
case '{': m_t << "\\{"; break;
m_t << '\n';
}
break;
- default: m_t << (char)c;
+ default: m_t << c;
}
- //pc = c;
}
}
}
m_lastIsPara=FALSE;
}
-void RTFDocVisitor::writeDotFile(DocDotFile *df)
+void RTFDocVisitor::writeDotFile(const DocDotFile &df)
{
- writeDotFile(df->file(), df->hasCaption(), df->srcFile(), df->srcLine());
+ writeDotFile(df.file(), df.hasCaption(), df.srcFile(), df.srcLine());
}
void RTFDocVisitor::writeDotFile(const QCString &filename, bool hasCaption,
const QCString &srcFile, int srcLine)
includePicturePreRTF(baseName + "." + imgExt, true, hasCaption);
}
-void RTFDocVisitor::writeMscFile(DocMscFile *df)
+void RTFDocVisitor::writeMscFile(const DocMscFile &df)
{
- writeMscFile(df->file(), df->hasCaption(), df->srcFile(), df->srcLine());
+ writeMscFile(df.file(), df.hasCaption(), df.srcFile(), df.srcLine());
}
void RTFDocVisitor::writeMscFile(const QCString &fileName, bool hasCaption,
const QCString &srcFile, int srcLine)
includePicturePreRTF(baseName + ".png", true, hasCaption);
}
-void RTFDocVisitor::writeDiaFile(DocDiaFile *df)
+void RTFDocVisitor::writeDiaFile(const DocDiaFile &df)
{
- QCString baseName=df->file();
+ QCString baseName=df.file();
int i;
if ((i=baseName.findRev('/'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
QCString outDir = Config_getString(RTF_OUTPUT);
- writeDiaGraphFromFile(df->file(),outDir,baseName,DIA_BITMAP,df->srcFile(),df->srcLine());
- includePicturePreRTF(baseName + ".png", true, df->hasCaption());
+ writeDiaGraphFromFile(df.file(),outDir,baseName,DIA_BITMAP,df.srcFile(),df.srcLine());
+ includePicturePreRTF(baseName + ".png", true, df.hasCaption());
}
void RTFDocVisitor::writePlantUMLFile(const QCString &fileName, bool hasCaption)
#include <iostream>
#include "docvisitor.h"
-#include "qcstring.h"
+#include "docnode.h"
class CodeOutputInterface;
class TextStream;
// visitor functions for leaf nodes
//--------------------------------------
- void visit(DocWord *);
- void visit(DocLinkedWord *);
- void visit(DocWhiteSpace *);
- void visit(DocSymbol *);
- void visit(DocEmoji *);
- void visit(DocURL *);
- void visit(DocLineBreak *);
- void visit(DocHorRuler *);
- void visit(DocStyleChange *);
- void visit(DocVerbatim *);
- void visit(DocAnchor *);
- void visit(DocInclude *);
- void visit(DocIncOperator *);
- void visit(DocFormula *);
- void visit(DocIndexEntry *);
- void visit(DocSimpleSectSep *);
- void visit(DocCite *);
+ void operator()(const DocWord &);
+ void operator()(const DocLinkedWord &);
+ void operator()(const DocWhiteSpace &);
+ void operator()(const DocSymbol &);
+ void operator()(const DocEmoji &);
+ void operator()(const DocURL &);
+ void operator()(const DocLineBreak &);
+ void operator()(const DocHorRuler &);
+ void operator()(const DocStyleChange &);
+ void operator()(const DocVerbatim &);
+ void operator()(const DocAnchor &);
+ void operator()(const DocInclude &);
+ void operator()(const DocIncOperator &);
+ void operator()(const DocFormula &);
+ void operator()(const DocIndexEntry &);
+ void operator()(const DocSimpleSectSep &);
+ void operator()(const DocCite &);
+ void operator()(const DocSeparator &);
//--------------------------------------
// visitor functions for compound nodes
//--------------------------------------
- void visitPre(DocAutoList *);
- void visitPost(DocAutoList *);
- void visitPre(DocAutoListItem *);
- void visitPost(DocAutoListItem *);
- void visitPre(DocPara *);
- void visitPost(DocPara *);
- void visitPre(DocRoot *);
- void visitPost(DocRoot *);
- void visitPre(DocSimpleSect *);
- void visitPost(DocSimpleSect *);
- void visitPre(DocTitle *);
- void visitPost(DocTitle *);
- void visitPre(DocSimpleList *);
- void visitPost(DocSimpleList *);
- void visitPre(DocSimpleListItem *);
- void visitPost(DocSimpleListItem *);
- void visitPre(DocSection *s);
- void visitPost(DocSection *);
- void visitPre(DocHtmlList *s);
- void visitPost(DocHtmlList *s);
- void visitPre(DocHtmlListItem *);
- void visitPost(DocHtmlListItem *);
- //void visitPre(DocHtmlPre *);
- //void visitPost(DocHtmlPre *);
- void visitPre(DocHtmlDescList *);
- void visitPost(DocHtmlDescList *);
- void visitPre(DocHtmlDescTitle *);
- void visitPost(DocHtmlDescTitle *);
- void visitPre(DocHtmlDescData *);
- void visitPost(DocHtmlDescData *);
- void visitPre(DocHtmlTable *t);
- void visitPost(DocHtmlTable *t);
- void visitPre(DocHtmlCaption *);
- void visitPost(DocHtmlCaption *);
- void visitPre(DocHtmlRow *);
- void visitPost(DocHtmlRow *) ;
- void visitPre(DocHtmlCell *);
- void visitPost(DocHtmlCell *);
- void visitPre(DocInternal *);
- void visitPost(DocInternal *);
- void visitPre(DocHRef *);
- void visitPost(DocHRef *);
- void visitPre(DocHtmlHeader *);
- void visitPost(DocHtmlHeader *) ;
- void visitPre(DocImage *);
- void visitPost(DocImage *);
- void visitPre(DocDotFile *);
- void visitPost(DocDotFile *);
- void visitPre(DocMscFile *);
- void visitPost(DocMscFile *);
- void visitPre(DocDiaFile *);
- void visitPost(DocDiaFile *);
- void visitPre(DocLink *);
- void visitPost(DocLink *);
- void visitPre(DocRef *ref);
- void visitPost(DocRef *);
- void visitPre(DocSecRefItem *);
- void visitPost(DocSecRefItem *);
- void visitPre(DocSecRefList *);
- void visitPost(DocSecRefList *);
- void visitPre(DocParamSect *);
- void visitPost(DocParamSect *);
- void visitPre(DocParamList *);
- void visitPost(DocParamList *);
- void visitPre(DocXRefItem *);
- void visitPost(DocXRefItem *);
- void visitPre(DocInternalRef *);
- void visitPost(DocInternalRef *);
- void visitPre(DocText *);
- void visitPost(DocText *);
- void visitPre(DocHtmlBlockQuote *);
- void visitPost(DocHtmlBlockQuote *);
- void visitPre(DocVhdlFlow *);
- void visitPost(DocVhdlFlow *);
- void visitPre(DocParBlock *);
- void visitPost(DocParBlock *);
+ void operator()(const DocAutoList &);
+ void operator()(const DocAutoListItem &);
+ void operator()(const DocPara &);
+ void operator()(const DocRoot &);
+ void operator()(const DocSimpleSect &);
+ void operator()(const DocTitle &);
+ void operator()(const DocSimpleList &);
+ void operator()(const DocSimpleListItem &);
+ void operator()(const DocSection &s);
+ void operator()(const DocHtmlList &s);
+ void operator()(const DocHtmlListItem &);
+ void operator()(const DocHtmlDescList &);
+ void operator()(const DocHtmlDescTitle &);
+ void operator()(const DocHtmlDescData &);
+ void operator()(const DocHtmlTable &t);
+ void operator()(const DocHtmlCaption &);
+ void operator()(const DocHtmlRow &);
+ void operator()(const DocHtmlCell &);
+ void operator()(const DocInternal &);
+ void operator()(const DocHRef &);
+ void operator()(const DocHtmlHeader &);
+ void operator()(const DocImage &);
+ void operator()(const DocDotFile &);
+ void operator()(const DocMscFile &);
+ void operator()(const DocDiaFile &);
+ void operator()(const DocLink &);
+ void operator()(const DocRef &ref);
+ void operator()(const DocSecRefItem &);
+ void operator()(const DocSecRefList &);
+ void operator()(const DocParamSect &);
+ void operator()(const DocParamList &);
+ void operator()(const DocXRefItem &);
+ void operator()(const DocInternalRef &);
+ void operator()(const DocText &);
+ void operator()(const DocHtmlBlockQuote &);
+ void operator()(const DocVhdlFlow &);
+ void operator()(const DocParBlock &);
private:
+ template<class T>
+ void visitChildren(const T &t)
+ {
+ for (const auto &child : t.children())
+ {
+ std::visit(*this, child);
+ }
+ }
//--------------------------------------
// helper functions
void includePicturePreRTF(const QCString &name, bool isTypeRTF, bool hasCaption, bool inlineImage = FALSE);
void includePicturePostRTF(bool isTypeRTF, bool hasCaption, bool inlineImage = FALSE);
void writeDotFile(const QCString &fileName, bool hasCaption,const QCString &srcFile,int srcLine);
- void writeDotFile(DocDotFile *);
+ void writeDotFile(const DocDotFile &);
void writeMscFile(const QCString &fileName, bool hasCaption,const QCString &srcFile,int srcLine);
- void writeMscFile(DocMscFile *);
- void writeDiaFile(DocDiaFile *);
+ void writeMscFile(const DocMscFile &);
+ void writeDiaFile(const DocDiaFile &);
void writePlantUMLFile(const QCString &fileName, bool hasCaption);
//--------------------------------------
static QCString makeIndexName(const QCString &s,int i)
{
QCString result=s;
- result+=(char)(i+'0');
+ result+=static_cast<char>(i+'0');
return result;
}
m_t << "{\\widctlpar\\adjustright \\fs20\\cgrid \\snext0 Normal;}\n";
// set the paper dimensions according to PAPER_TYPE
- static auto paperType = Config_getEnum(PAPER_TYPE);
+ auto paperType = Config_getEnum(PAPER_TYPE);
m_t << "{";
switch (paperType)
{
//Introduction
beginRTFChapter();
break;
- //case isPackageIndex:
- // //Package Index
- // beginRTFChapter();
- // break;
case isModuleIndex:
//Module Index
beginRTFChapter();
break;
case isTitlePageAuthor:
{
- m_t << " doxygen" << getDoxygenVersion() << ".}\n";
+ m_t << " doxygen " << getDoxygenVersion() << ".}\n";
m_t << "{\\creatim " << dateToRTFDateString() << "}\n}";
DBG_RTF(m_t << "{\\comment end of infoblock}\n");
// setup for this section
}
else
{
- std::unique_ptr<IDocParser> parser { createDocParser() };
- std::unique_ptr<DocText> root { validatingParseText(*parser.get(), projectName) };
- m_t << "{\\field\\fldedit {\\*\\fldinst TITLE \\\\*MERGEFORMAT}{\\fldrslt ";
- writeDoc(root.get(),0,0,0);
- m_t << "}}\\par\n";
+ auto parser { createDocParser() };
+ auto ast { validatingParseText(*parser.get(), projectName) };
+ if (ast)
+ {
+ m_t << "{\\field\\fldedit {\\*\\fldinst TITLE \\\\*MERGEFORMAT}{\\fldrslt ";
+ writeDoc(ast.get(),0,0,0);
+ m_t << "}}\\par\n";
+ }
}
m_t << rtf_Style_Reset << rtf_Style["SubTitle"].reference() << "\n"; // set to title style
m_t << "index";
m_t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
break;
- //case isPackageIndex:
- // m_t << "\\par " << rtf_Style_Reset << "\n";
- // m_t << "{\\tc \\v " << theTranslator->trPackageList() << "}\n";
- // m_t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"packages.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
- // break;
case isModuleIndex:
m_t << "\\par " << rtf_Style_Reset << "\n";
m_t << "{\\tc \\v " << theTranslator->trModuleIndex() << "}\n";
}
break;
case isPageDocumentation:
- {
-//#error "fix me in the same way as the latex index..."
- //m_t << "{\\tc \\v " << theTranslator->trPageDocumentation() << "}\n";
- //m_t << "}\n";
- //bool first=TRUE;
- //for (const auto *pd : Doxygen::pageLinkedMap)
- //{
- // if (!pd->getGroupDef() && !pd->isReference())
- // {
- // if (first) m_t << "\\par " << rtf_Style_Reset << "\n";
- // m_t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
- // m_t << pd->getOutputFileBase();
- // m_t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
- // first=FALSE;
- // }
- //}
- }
break;
case isPageDocumentation2:
{
{
if (!str.isEmpty())
{
- const unsigned char *p=(const unsigned char *)str.data();
- unsigned char c;
- //unsigned char pc='\0';
+ const char *p=str.data();
+ char c;
while (*p)
{
- //static bool MultiByte = FALSE;
c=*p++;
switch (c)
case '\\': m_t << "\\\\"; break;
default:
{
- // see if we can insert an hyphenation hint
- //if (isupper(c) && islower(pc) && !insideTabbing) m_t << "\\-";
- m_t << (char)c;
+ m_t << c;
}
}
- //pc = c;
m_omitParagraph = FALSE;
}
}
//static char spaces[]=" ";
if (!str.isEmpty())
{
- const unsigned char *p=(const unsigned char *)str.data();
- unsigned char c;
+ const char *p=str.data();
+ char c;
int spacesToNextTabStop;
while (*p)
case '{': m_t << "\\{"; m_col++; break;
case '}': m_t << "\\}"; m_col++; break;
case '\\': m_t << "\\\\"; m_col++; break;
- default: p=(const unsigned char *)writeUTF8Char(m_t,(const char *)p-1); m_col++; break;
+ default: p=writeUTF8Char(m_t,p-1); m_col++; break;
}
}
}
if (s==0) return;
QCString encoding;
bool converted=FALSE;
- int l = (int)s.length();
+ size_t l = s.length();
static std::vector<char> enc;
- if (l*4>(int)enc.size()) enc.resize(l*4); // worst case
+ if (l*4>enc.size()) enc.resize(l*4); // worst case
encoding.sprintf("CP%s",qPrint(theTranslator->trRTFansicp()));
if (!encoding.isEmpty())
{
// convert from UTF-8 back to the output encoding
void *cd = portable_iconv_open(encoding.data(),"UTF-8");
- if (cd!=(void *)(-1))
+ if (cd!=reinterpret_cast<void *>(-1))
{
size_t iLeft=l;
size_t oLeft=enc.size();
char *outputPtr = &enc[0];
if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft))
{
- enc.resize(enc.size()-(unsigned int)oLeft);
+ enc.resize(enc.size()-oLeft);
converted=TRUE;
}
portable_iconv_close(cd);
memcpy(enc.data(),s.data(),l);
enc.resize(l);
}
- uint i;
bool multiByte = FALSE;
- for (i=0;i<enc.size();i++)
+ for (size_t i=0;i<enc.size();i++)
{
- uchar c = (uchar)enc.at(i);
+ uchar c = static_cast<uchar>(enc.at(i));
if (c>=0x80 || multiByte)
{
}
else
{
- t << (char)c;
+ t << c;
}
}
}
m_t << " ";
}
-void RTFGenerator::writeDoc(DocNode *n,const Definition *ctx,const MemberDef *,int)
+void RTFGenerator::writeDoc(const IDocNodeAST *ast,const Definition *ctx,const MemberDef *,int)
{
- RTFDocVisitor *visitor = new RTFDocVisitor(m_t,*this,ctx?ctx->getDefFileExtension():QCString(""));
- n->accept(visitor);
- delete visitor;
+ auto astImpl = dynamic_cast<const DocNodeAST*>(ast);
+ if (astImpl)
+ {
+ RTFDocVisitor visitor(m_t,*this,ctx?ctx->getDefFileExtension():QCString(""));
+ std::visit(visitor,astImpl->root);
+ }
m_omitParagraph = TRUE;
}
void setRelativePath(const QCString &path);
void setSourceFileName(const QCString &sourceFileName);
- void writeDoc(DocNode *,const Definition *,const MemberDef *,int);
+ void writeDoc(const IDocNodeAST *ast,const Definition *,const MemberDef *,int);
void startFile(const QCString &name,const QCString &manName,const QCString &title,int id);
void writeSearchInfo() {}
void endFontClass();
void writeCodeAnchor(const QCString &) {}
- void setCurrentDoc(const Definition *,const QCString &,bool) {}
- void addWord(const QCString &,bool) {}
static bool preProcessFileInplace(const QCString &path,const QCString &name);
int lastSkipSharpContext = 0;
int lastSkipRoundContext = 0;
int lastStringContext = 0;
+ int lastDeprecatedContext = 0;
int lastCurlyContext = 0;
int lastRoundContext = 0;
int lastSharpContext = 0;
%x RequiresExpression
%x ConceptName
+ /** Object-C Deprecated */
+%x Deprecated_round
+
%%
+<*>"DEPRECATED_ATTRIBUTE" { // Object-C attribute
+ if (!yyextra->insideObjC) REJECT;
+ }
+<*>"DEPRECATED_MSG_ATTRIBUTE(\"" { // Object-C attribute
+ if (!yyextra->insideObjC) REJECT;
+ yyextra->lastDeprecatedContext=YY_START;
+ yyextra->lastStringContext=Deprecated_round;
+ BEGIN(SkipString);
+ }
+<Deprecated_round>")" {
+ BEGIN(yyextra->lastDeprecatedContext);
+ }
+<Deprecated_round>{BNopt} {
+ lineCount(yyscanner);
+ }
+<Deprecated_round>. { }
<NextSemi>"{" {
yyextra->curlyCount=0;
yyextra->needsSemi = TRUE;
{
yyextra->mtype = Method;
yyextra->virt = Normal;
+ yyextra->current->bodyLine = -1;
+ yyextra->current->bodyColumn = 1;
yyextra->current->groups.clear();
initEntry(yyscanner);
}
BEGIN(FuncQual);
}
<OldStyleArgs>. { yyextra->current->args += *yytext; }
+<FuncQual,FuncRound,FuncFunc>\" {
+ if (yyextra->insideIDL && yyextra->insideCppQuote)
+ {
+ BEGIN(EndCppQuote);
+ }
+ else
+ {
+ yyextra->current->args += *yytext;
+ }
+ }
<FuncQual,FuncRound,FuncFunc>. { yyextra->current->args += *yytext; }
<FuncQual>{BN}*"try:" |
<FuncQual>{BN}*"try"{BN}+ { /* try-function-block */
{
BEGIN(EndCppQuote);
}
+ else if (yyextra->insidePHP)
+ {
+ yyextra->lastStringContext=YY_START;
+ BEGIN(SkipString);
+ }
}
<*>^{B}*"#" {
if (!yyextra->insidePHP)
BEGIN(SkipPHPString);
}
}
-<*>\" {
- if (yyextra->insidePHP)
- {
- yyextra->lastStringContext=YY_START;
- BEGIN(SkipString);
- }
- }
<*>\? {
if (yyextra->insideCS && (YY_START != SkipRound) && (YY_START != CSAccessorDecl))
{
yyextra->current->brief.resize(0);
//printf("handleParametersCommentBlock [%s]\n",qPrint(doc));
+ int lineNr = orgDocLine;
+ Markdown markdown(yyextra->fileName,lineNr);
+ QCString strippedDoc = stripIndentation(a.docs);
+ QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(strippedDoc,lineNr) : strippedDoc;
while (yyextra->commentScanner.parseCommentBlock(
yyextra->thisParser,
yyextra->current.get(),
- a.docs, // text
+ processedDoc, // text
yyextra->fileName, // file
- yyextra->current->docLine, // line of block start
+ lineNr,
FALSE,
FALSE,
FALSE,
#include <ctype.h>
#include <assert.h>
#include <sstream>
+#include <mutex>
+#include <map>
+#include <unordered_map>
#include "searchindex.h"
+
#include "config.h"
#include "util.h"
#include "doxygen.h"
#include "pagedef.h"
#include "growbuf.h"
#include "message.h"
-#include "version.h"
#include "groupdef.h"
#include "filedef.h"
-#include "memberdef.h"
-#include "filename.h"
-#include "membername.h"
-#include "resourcemgr.h"
-#include "namespacedef.h"
-#include "classdef.h"
-#include "utf8.h"
-#include "classlist.h"
-//---------------------------------------------------------------------------------------------
-// the following part is for the server based search engine
-//---------------------------------------------------------------------------------------------
// file format: (all multi-byte values are stored in big endian format)
// 4 byte header
//--------------------------------------------------------------------
+struct URL
+{
+ URL(QCString n,QCString u) : name(n), url(u) {}
+ QCString name;
+ QCString url;
+};
+
+struct URLInfo
+{
+ URLInfo(int idx,int f) : urlIdx(idx), freq(f) {}
+ int urlIdx;
+ int freq;
+};
+
+class IndexWord
+{
+ public:
+ using URLInfoMap = std::unordered_map<int,URLInfo>;
+ IndexWord(QCString word);
+ void addUrlIndex(int,bool);
+ URLInfoMap urls() const { return m_urls; }
+ QCString word() const { return m_word; }
+
+ private:
+ QCString m_word;
+ URLInfoMap m_urls;
+};
+
IndexWord::IndexWord(QCString word) : m_word(word)
{
//printf("IndexWord::IndexWord(%s)\n",word);
//--------------------------------------------------------------------
+class SearchIndex : public SearchIndexIntf
+{
+ public:
+ SearchIndex();
+ void setCurrentDoc(const Definition *ctx,const QCString &anchor,bool isSourceFile) override;
+ void addWord(const QCString &word,bool hiPriority) override;
+ void write(const QCString &file) override;
+ private:
+ void addWord(const QCString &word,bool hiPrio,bool recurse);
+ std::unordered_map<std::string,int> m_words;
+ std::vector< std::vector< IndexWord> > m_index;
+ std::unordered_map<std::string,int> m_url2IdMap;
+ std::map<int,URL> m_urls;
+ int m_urlIndex = -1;
+};
+
SearchIndex::SearchIndex() : SearchIndexIntf(Internal)
{
m_index.resize(numIndexEntries);
//return h;
// Simple hashing that allows for substring searching
- uint c1=(uchar)word[0];
- uint c2=(uchar)word[1];
+ uint c1=static_cast<uchar>(word[0]);
+ uint c2=static_cast<uchar>(word[1]);
return c1*256+c2;
}
}
+static std::mutex g_transferSearchIndexMutex;
+
+void SIDataCollection::transfer()
+{
+ if (Doxygen::searchIndex)
+ {
+ std::lock_guard<std::mutex> lock(g_transferSearchIndexMutex);
+ for (const auto &v : m_data)
+ {
+ if (std::holds_alternative<SIData_Word>(v))
+ {
+ const auto &d = std::get<SIData_Word>(v);
+ Doxygen::searchIndex->addWord(d.word,d.hiPrio);
+ }
+ else if (std::holds_alternative<SIData_CurrentDoc>(v))
+ {
+ const auto &d = std::get<SIData_CurrentDoc>(v);
+ Doxygen::searchIndex->setCurrentDoc(d.ctx,d.anchor,d.isSourceFile);
+ }
+ }
+ }
+ m_data.clear();
+}
+
//---------------------------------------------------------------------------
// the following part is for writing an external search index
GrowBuf normalText;
};
+class SearchIndexExternal : public SearchIndexIntf
+{
+ struct Private;
+ public:
+ SearchIndexExternal();
+ void setCurrentDoc(const Definition *ctx,const QCString &anchor,bool isSourceFile) override;
+ void addWord(const QCString &word,bool hiPriority) override;
+ void write(const QCString &file) override;
+ private:
+ std::unique_ptr<Private> p;
+};
+
struct SearchIndexExternal::Private
{
std::map<std::string,SearchDocEntry> docEntries;
void SearchIndexExternal::setCurrentDoc(const Definition *ctx,const QCString &anchor,bool isSourceFile)
{
- static QCString extId = stripPath(Config_getString(EXTERNAL_SEARCH_ID));
+ QCString extId = stripPath(Config_getString(EXTERNAL_SEARCH_ID));
QCString baseName = isSourceFile ? (toFileDef(ctx))->getSourceFileBase() : ctx->getOutputFileBase();
QCString url = addHtmlExtensionIfMissing(baseName);
if (!anchor.isEmpty()) url+=QCString("#")+anchor;
}
//---------------------------------------------------------------------------------------------
-// the following part is for the javascript based search engine
-//---------------------------------------------------------------------------------------------
-
-QCString searchName(const Definition *d)
-{
- return d->definitionType()==Definition::TypeGroup ? QCString(toGroupDef(d)->groupTitle()) :
- d->definitionType()==Definition::TypePage ? toPageDef(d)->title() :
- d->localName();
-}
-
-QCString searchId(const Definition *d)
-{
- std::string s = searchName(d).str();
- TextStream t;
- for (size_t i=0;i<s.length();i++)
- {
- if (isIdJS(s[i]))
- {
- t << s[i];
- }
- else // escape non-identifier characters
- {
- static const char *hex = "0123456789ABCDEF";
- unsigned char uc = static_cast<unsigned char>(s[i]);
- t << '_';
- t << hex[uc>>4];
- t << hex[uc&0xF];
- }
- }
-
- return convertUTF8ToLower(t.str());
-}
-
-
-#define SEARCH_INDEX_ALL 0
-#define SEARCH_INDEX_CLASSES 1
-#define SEARCH_INDEX_INTERFACES 2
-#define SEARCH_INDEX_STRUCTS 3
-#define SEARCH_INDEX_EXCEPTIONS 4
-#define SEARCH_INDEX_NAMESPACES 5
-#define SEARCH_INDEX_FILES 6
-#define SEARCH_INDEX_FUNCTIONS 7
-#define SEARCH_INDEX_VARIABLES 8
-#define SEARCH_INDEX_TYPEDEFS 9
-#define SEARCH_INDEX_SEQUENCES 10
-#define SEARCH_INDEX_DICTIONARIES 11
-#define SEARCH_INDEX_ENUMS 12
-#define SEARCH_INDEX_ENUMVALUES 13
-#define SEARCH_INDEX_PROPERTIES 14
-#define SEARCH_INDEX_EVENTS 15
-#define SEARCH_INDEX_RELATED 16
-#define SEARCH_INDEX_DEFINES 17
-#define SEARCH_INDEX_GROUPS 18
-#define SEARCH_INDEX_PAGES 19
-#define SEARCH_INDEX_CONCEPTS 20
-
-static std::array<SearchIndexInfo,NUM_SEARCH_INDICES> g_searchIndexInfo =
-{ {
- // index name getText symbolList
- { /* SEARCH_INDEX_ALL */ "all" , []() { return theTranslator->trAll(); }, {} },
- { /* SEARCH_INDEX_CLASSES */ "classes" , []() { return theTranslator->trClasses(); }, {} },
- { /* SEARCH_INDEX_INTERFACES */ "interfaces" , []() { return theTranslator->trSliceInterfaces(); }, {} },
- { /* SEARCH_INDEX_STRUCTS */ "structs" , []() { return theTranslator->trStructs(); }, {} },
- { /* SEARCH_INDEX_EXCEPTIONS */ "exceptions" , []() { return theTranslator->trExceptions(); }, {} },
- { /* SEARCH_INDEX_NAMESPACES */ "namespaces" , []() { return Config_getBool(OPTIMIZE_OUTPUT_SLICE) ?
- theTranslator->trModules() :
- theTranslator->trNamespace(TRUE,FALSE); }, {} },
- { /* SEARCH_INDEX_FILES */ "files" , []() { return theTranslator->trFile(TRUE,FALSE); }, {} },
- { /* SEARCH_INDEX_FUNCTIONS */ "functions" , []() { return Config_getBool(OPTIMIZE_OUTPUT_SLICE) ?
- theTranslator->trOperations() :
- theTranslator->trFunctions(); }, {} },
- { /* SEARCH_INDEX_VARIABLES */ "variables" , []() { return Config_getBool(OPTIMIZE_OUTPUT_SLICE) ?
- theTranslator->trConstants() :
- theTranslator->trVariables(); }, {} },
- { /* SEARCH_INDEX_TYPEDEFS */ "typedefs" , []() { return theTranslator->trTypedefs(); }, {} },
- { /* SEARCH_INDEX_SEQUENCES */ "sequences" , []() { return theTranslator->trSequences(); }, {} },
- { /* SEARCH_INDEX_DICTIONARIES */ "dictionaries", []() { return theTranslator->trDictionaries(); }, {} },
- { /* SEARCH_INDEX_ENUMS */ "enums" , []() { return theTranslator->trEnumerations(); }, {} },
- { /* SEARCH_INDEX_ENUMVALUES */ "enumvalues" , []() { return theTranslator->trEnumerationValues(); }, {} },
- { /* SEARCH_INDEX_PROPERTIES */ "properties" , []() { return theTranslator->trProperties(); }, {} },
- { /* SEARCH_INDEX_EVENTS */ "events" , []() { return theTranslator->trEvents(); }, {} },
- { /* SEARCH_INDEX_RELATED */ "related" , []() { return theTranslator->trFriends(); }, {} },
- { /* SEARCH_INDEX_DEFINES */ "defines" , []() { return theTranslator->trDefines(); }, {} },
- { /* SEARCH_INDEX_GROUPS */ "groups" , []() { return theTranslator->trGroup(TRUE,FALSE); }, {} },
- { /* SEARCH_INDEX_PAGES */ "pages" , []() { return theTranslator->trPage(TRUE,FALSE); }, {} },
- { /* SEARCH_INDEX_CONCEPTS */ "concepts" , []() { return theTranslator->trConcept(true,false); }, {} }
-} };
-
-static void addMemberToSearchIndex(const MemberDef *md)
-{
- static bool hideFriendCompounds = Config_getBool(HIDE_FRIEND_COMPOUNDS);
- bool isLinkable = md->isLinkable();
- const ClassDef *cd=0;
- const NamespaceDef *nd=0;
- const FileDef *fd=0;
- const GroupDef *gd=0;
- if (isLinkable &&
- (
- ((cd=md->getClassDef()) && cd->isLinkable() && cd->templateMaster()==0) ||
- ((gd=md->getGroupDef()) && gd->isLinkable())
- )
- )
- {
- std::string n = md->name().str();
- if (!n.empty())
- {
- std::string letter = convertUTF8ToLower(getUTF8CharAt(n,0));
- bool isFriendToHide = hideFriendCompounds &&
- (QCString(md->typeString())=="friend class" ||
- QCString(md->typeString())=="friend struct" ||
- QCString(md->typeString())=="friend union");
- if (!(md->isFriend() && isFriendToHide))
- {
- g_searchIndexInfo[SEARCH_INDEX_ALL].add(letter,md);
- }
- if (md->isFunction() || md->isSlot() || md->isSignal())
- {
- g_searchIndexInfo[SEARCH_INDEX_FUNCTIONS].add(letter,md);
- }
- else if (md->isVariable())
- {
- g_searchIndexInfo[SEARCH_INDEX_VARIABLES].add(letter,md);
- }
- else if (md->isSequence())
- {
- g_searchIndexInfo[SEARCH_INDEX_SEQUENCES].add(letter,md);
- }
- else if (md->isDictionary())
- {
- g_searchIndexInfo[SEARCH_INDEX_DICTIONARIES].add(letter,md);
- }
- else if (md->isTypedef())
- {
- g_searchIndexInfo[SEARCH_INDEX_TYPEDEFS].add(letter,md);
- }
- else if (md->isEnumerate())
- {
- g_searchIndexInfo[SEARCH_INDEX_ENUMS].add(letter,md);
- }
- else if (md->isEnumValue())
- {
- g_searchIndexInfo[SEARCH_INDEX_ENUMVALUES].add(letter,md);
- }
- else if (md->isProperty())
- {
- g_searchIndexInfo[SEARCH_INDEX_PROPERTIES].add(letter,md);
- }
- else if (md->isEvent())
- {
- g_searchIndexInfo[SEARCH_INDEX_EVENTS].add(letter,md);
- }
- else if (md->isRelated() || md->isForeign() ||
- (md->isFriend() && !isFriendToHide))
- {
- g_searchIndexInfo[SEARCH_INDEX_RELATED].add(letter,md);
- }
- }
- }
- else if (isLinkable &&
- (((nd=md->getNamespaceDef()) && nd->isLinkable()) ||
- ((fd=md->getFileDef()) && fd->isLinkable())
- )
- )
- {
- std::string n = md->name().str();
- if (!n.empty())
- {
- std::string letter = convertUTF8ToLower(getUTF8CharAt(n,0));
- g_searchIndexInfo[SEARCH_INDEX_ALL].add(letter,md);
-
- if (md->isFunction())
- {
- g_searchIndexInfo[SEARCH_INDEX_FUNCTIONS].add(letter,md);
- }
- else if (md->isVariable())
- {
- g_searchIndexInfo[SEARCH_INDEX_VARIABLES].add(letter,md);
- }
- else if (md->isSequence())
- {
- g_searchIndexInfo[SEARCH_INDEX_SEQUENCES].add(letter,md);
- }
- else if (md->isDictionary())
- {
- g_searchIndexInfo[SEARCH_INDEX_DICTIONARIES].add(letter,md);
- }
- else if (md->isTypedef())
- {
- g_searchIndexInfo[SEARCH_INDEX_TYPEDEFS].add(letter,md);
- }
- else if (md->isEnumerate())
- {
- g_searchIndexInfo[SEARCH_INDEX_ENUMS].add(letter,md);
- }
- else if (md->isEnumValue())
- {
- g_searchIndexInfo[SEARCH_INDEX_ENUMVALUES].add(letter,md);
- }
- else if (md->isDefine())
- {
- g_searchIndexInfo[SEARCH_INDEX_DEFINES].add(letter,md);
- }
- }
- }
-}
-
-//---------------------------------------------------------------------------------------------
-
-void createJavaScriptSearchIndex()
-{
- // index classes
- for (const auto &cd : *Doxygen::classLinkedMap)
- {
- std::string letter = convertUTF8ToLower(getUTF8CharAt(cd->localName().str(),0));
- if (cd->isLinkable())
- {
- g_searchIndexInfo[SEARCH_INDEX_ALL].add(letter,cd.get());
- if (Config_getBool(OPTIMIZE_OUTPUT_SLICE))
- {
- if (cd->compoundType()==ClassDef::Interface)
- {
- g_searchIndexInfo[SEARCH_INDEX_INTERFACES].add(letter,cd.get());
- }
- else if (cd->compoundType()==ClassDef::Struct)
- {
- g_searchIndexInfo[SEARCH_INDEX_STRUCTS].add(letter,cd.get());
- }
- else if (cd->compoundType()==ClassDef::Exception)
- {
- g_searchIndexInfo[SEARCH_INDEX_EXCEPTIONS].add(letter,cd.get());
- }
- else // cd->compoundType()==ClassDef::Class
- {
- g_searchIndexInfo[SEARCH_INDEX_CLASSES].add(letter,cd.get());
- }
- }
- else // non slice optimisation: group all types under classes
- {
- g_searchIndexInfo[SEARCH_INDEX_CLASSES].add(letter,cd.get());
- }
- }
- }
-
- // index namespaces
- for (const auto &nd : *Doxygen::namespaceLinkedMap)
- {
- std::string letter = convertUTF8ToLower(getUTF8CharAt(nd->name().str(),0));
- if (nd->isLinkable())
- {
- g_searchIndexInfo[SEARCH_INDEX_ALL].add(letter,nd.get());
- g_searchIndexInfo[SEARCH_INDEX_NAMESPACES].add(letter,nd.get());
- }
- }
-
- // index concepts
- for (const auto &cd : *Doxygen::conceptLinkedMap)
- {
- std::string letter = convertUTF8ToLower(getUTF8CharAt(cd->name().str(),0));
- if (cd->isLinkable())
- {
- g_searchIndexInfo[SEARCH_INDEX_ALL].add(letter,cd.get());
- g_searchIndexInfo[SEARCH_INDEX_CONCEPTS].add(letter,cd.get());
- }
- }
-
- // index files
- for (const auto &fn : *Doxygen::inputNameLinkedMap)
- {
- for (const auto &fd : *fn)
- {
- std::string letter = convertUTF8ToLower(getUTF8CharAt(fd->name().str(),0));
- if (fd->isLinkable())
- {
- g_searchIndexInfo[SEARCH_INDEX_ALL].add(letter,fd.get());
- g_searchIndexInfo[SEARCH_INDEX_FILES].add(letter,fd.get());
- }
- }
- }
-
- // index class members
- {
- // for each member name
- for (const auto &mn : *Doxygen::memberNameLinkedMap)
- {
- // for each member definition
- for (const auto &md : *mn)
- {
- addMemberToSearchIndex(md.get());
- }
- }
- }
-
- // index file/namespace members
- {
- // for each member name
- for (const auto &mn : *Doxygen::functionNameLinkedMap)
- {
- // for each member definition
- for (const auto &md : *mn)
- {
- addMemberToSearchIndex(md.get());
- }
- }
- }
-
- // index groups
- for (const auto &gd : *Doxygen::groupLinkedMap)
- {
- if (gd->isLinkable())
- {
- std::string title = gd->groupTitle().str();
- if (!title.empty()) // TODO: able searching for all word in the title
- {
- std::string letter = convertUTF8ToLower(getUTF8CharAt(title,0));
- g_searchIndexInfo[SEARCH_INDEX_ALL].add(letter,gd.get());
- g_searchIndexInfo[SEARCH_INDEX_GROUPS].add(letter,gd.get());
- }
- }
- }
-
- // index pages
- for (const auto &pd : *Doxygen::pageLinkedMap)
- {
- if (pd->isLinkable())
- {
- std::string title = pd->title().str();
- if (!title.empty())
- {
- std::string letter = convertUTF8ToLower(getUTF8CharAt(title,0));
- g_searchIndexInfo[SEARCH_INDEX_ALL].add(letter,pd.get());
- g_searchIndexInfo[SEARCH_INDEX_PAGES].add(letter,pd.get());
- }
- }
- }
- if (Doxygen::mainPage)
- {
- std::string title = Doxygen::mainPage->title().str();
- if (!title.empty())
- {
- std::string letter = convertUTF8ToLower(getUTF8CharAt(title,0));
- g_searchIndexInfo[SEARCH_INDEX_ALL].add(letter,Doxygen::mainPage.get());
- g_searchIndexInfo[SEARCH_INDEX_PAGES].add(letter,Doxygen::mainPage.get());
- }
- }
-
- // sort all lists
- for (auto &sii : g_searchIndexInfo) // for each index
- {
- for (auto &kv : sii.symbolMap) // for each symbol in the index
- {
- // sort the symbols (first on "search" name, and then on full name)
- std::sort(kv.second.begin(),
- kv.second.end(),
- [](const Definition *d1,const Definition *d2)
- {
- int eq = qstricmp(searchName(d1),searchName(d2)); // search name first
- return eq==0 ? qstricmp(d1->name(),d2->name())<0 : eq<0; // then full name
- });
- }
- }
-}
-
-void writeJavaScriptSearchIndex()
-{
- // write index files
- QCString searchDirName = Config_getString(HTML_OUTPUT)+"/search";
-
- for (auto &sii : g_searchIndexInfo)
- {
- int p=0;
- for (const auto &kv : sii.symbolMap)
- {
- int cnt = 0;
- QCString baseName;
- baseName.sprintf("%s_%x",sii.name.data(),p);
-
- QCString fileName = searchDirName + "/"+baseName+Doxygen::htmlFileExtension;
- QCString dataFileName = searchDirName + "/"+baseName+".js";
-
- std::ofstream t(fileName.str(), std::ofstream::out | std::ofstream::binary);
- std::ofstream ti(dataFileName.str(), std::ofstream::out | std::ofstream::binary);
- if (t.is_open() && ti.is_open())
- {
- {
- t << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\""
- " \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
- t << "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n";
- t << "<head><title></title>\n";
- t << "<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n";
- t << "<meta name=\"generator\" content=\"Doxygen " << getDoxygenVersion() << "\"/>\n";
- t << "<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n";
- t << "<script type=\"text/javascript\" src=\"" << baseName << ".js\"></script>\n";
- t << "<script type=\"text/javascript\" src=\"search.js\"></script>\n";
- t << "</head>\n";
- t << "<body class=\"SRPage\">\n";
- t << "<div id=\"SRIndex\">\n";
- t << "<div class=\"SRStatus\" id=\"Loading\">" << theTranslator->trLoading() << "</div>\n";
- t << "<div id=\"SRResults\"></div>\n"; // here the results will be inserted
- t << "<script type=\"text/javascript\">\n";
- t << "/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */\n";
- t << "createResults();\n"; // this function will insert the results
- t << "/* @license-end */\n";
- t << "</script>\n";
- t << "<div class=\"SRStatus\" id=\"Searching\">"
- << theTranslator->trSearching() << "</div>\n";
- t << "<div class=\"SRStatus\" id=\"NoMatches\">"
- << theTranslator->trNoMatches() << "</div>\n";
-
- t << "<script type=\"text/javascript\">\n";
- t << "/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */\n";
- t << "document.getElementById(\"Loading\").style.display=\"none\";\n";
- t << "document.getElementById(\"NoMatches\").style.display=\"none\";\n";
- t << "var searchResults = new SearchResults(\"searchResults\");\n";
- t << "searchResults.Search();\n";
- t << "window.addEventListener(\"message\", function(event) {\n";
- t << " if (event.data == \"take_focus\") {\n";
- t << " var elem = searchResults.NavNext(0);\n";
- t << " if (elem) elem.focus();\n";
- t << " }\n";
- t << "});\n";
- t << "/* @license-end */\n";
- t << "</script>\n";
- t << "</div>\n"; // SRIndex
- t << "</body>\n";
- t << "</html>\n";
- }
-
- ti << "var searchData=\n";
- // format
- // searchData[] = array of items
- // searchData[x][0] = id
- // searchData[x][1] = [ name + child1 + child2 + .. ]
- // searchData[x][1][0] = name as shown
- // searchData[x][1][y+1] = info for child y
- // searchData[x][1][y+1][0] = url
- // searchData[x][1][y+1][1] = 1 => target="_parent"
- // searchData[x][1][y+1][2] = scope
-
- ti << "[\n";
- bool firstEntry=TRUE;
-
- int childCount=0;
- QCString lastName;
- const Definition *prevScope = 0;
- for (auto it = kv.second.begin(); it!=kv.second.end();)
- {
- const Definition *d = *it;
- QCString sname = searchName(d);
- QCString id = searchId(d);
-
- if (sname!=lastName) // this item has a different search word
- {
- if (!firstEntry)
- {
- ti << "]]]";
- ti << ",\n";
- }
- firstEntry=FALSE;
-
- ti << " ['" << id << "_" << cnt++ << "',['" << convertToXML(sname) << "',[";
- childCount=0;
- prevScope=0;
- }
-
- ++it;
- const Definition *scope = d->getOuterScope();
- const Definition *next = it!=kv.second.end() ? *it : 0;
- const Definition *nextScope = 0;
- const MemberDef *md = toMemberDef(d);
- if (next) nextScope = next->getOuterScope();
- QCString anchor = d->anchor();
-
- if (childCount>0)
- {
- ti << "],[";
- }
- ti << "'" << externalRef("../",d->getReference(),TRUE)
- << addHtmlExtensionIfMissing(d->getOutputFileBase());
- if (!anchor.isEmpty())
- {
- ti << "#" << anchor;
- }
- ti << "',";
-
- static bool extLinksInWindow = Config_getBool(EXT_LINKS_IN_WINDOW);
- if (!extLinksInWindow || d->getReference().isEmpty())
- {
- ti << "1,";
- }
- else
- {
- ti << "0,";
- }
-
- if (lastName!=sname && (next==0 || searchName(next)!=sname)) // unique name
- {
- if (d->getOuterScope()!=Doxygen::globalScope)
- {
- ti << "'" << convertToXML(d->getOuterScope()->name()) << "'";
- }
- else if (md)
- {
- const FileDef *fd = md->getBodyDef();
- if (fd==0) fd = md->getFileDef();
- if (fd)
- {
- ti << "'" << convertToXML(fd->localName()) << "'";
- }
- }
- else
- {
- ti << "''";
- }
- }
- else // multiple entries with the same name
- {
- bool found=FALSE;
- bool overloadedFunction = ((prevScope!=0 && scope==prevScope) ||
- (scope && scope==nextScope)) && md && (md->isFunction() || md->isSlot());
- QCString prefix;
- if (md) prefix=convertToXML(md->localName());
- if (overloadedFunction) // overloaded member function
- {
- prefix+=convertToXML(md->argsString());
- // show argument list to disambiguate overloaded functions
- }
- else if (md) // unique member function
- {
- prefix+="()"; // only to show it is a function
- }
- QCString name;
- if (d->definitionType()==Definition::TypeClass)
- {
- name = convertToXML((toClassDef(d))->displayName());
- found = TRUE;
- }
- else if (d->definitionType()==Definition::TypeNamespace)
- {
- name = convertToXML((toNamespaceDef(d))->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->resolveAlias()->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 = convertToXML(d->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()+")";
- }
-
- ti << "'" << name << "'";
-
- prevScope = scope;
- childCount++;
- }
- lastName = sname;
- }
- if (!firstEntry)
- {
- ti << "]]]\n";
- }
- ti << "];\n";
- }
- else
- {
- err("Failed to open file '%s' for writing...\n",qPrint(fileName));
- }
- p++;
- }
- }
-
- {
- std::ofstream t(searchDirName.str()+"/searchdata.js",
- std::ofstream::out | std::ofstream::binary);
- if (t.is_open())
- {
- t << "var indexSectionsWithContent =\n";
- t << "{\n";
- int j=0;
- for (const auto &sii : g_searchIndexInfo)
- {
- if (!sii.symbolMap.empty())
- {
- if (j>0) t << ",\n";
- t << " " << j << ": \"";
-
- for (const auto &kv : sii.symbolMap)
- {
- if ( kv.first == "\"" ) t << "\\";
- t << kv.first;
- }
- t << "\"";
- j++;
- }
- }
- if (j>0) t << "\n";
- t << "};\n\n";
- t << "var indexSectionNames =\n";
- t << "{\n";
- j=0;
- for (const auto &sii : g_searchIndexInfo)
- {
- if (!sii.symbolMap.empty())
- {
- if (j>0) t << ",\n";
- t << " " << j << ": \"" << sii.name << "\"";
- j++;
- }
- }
- if (j>0) t << "\n";
- t << "};\n\n";
- t << "var indexSectionLabels =\n";
- t << "{\n";
- j=0;
- for (const auto &sii : g_searchIndexInfo)
- {
- if (!sii.symbolMap.empty())
- {
- if (j>0) t << ",\n";
- t << " " << j << ": \"" << convertToXML(sii.getText()) << "\"";
- j++;
- }
- }
- if (j>0) t << "\n";
- t << "};\n\n";
- }
- ResourceMgr::instance().copyResource("search.js",searchDirName);
- }
-
- {
- QCString noMatchesFileName =searchDirName+"/nomatches"+Doxygen::htmlFileExtension;
- std::ofstream t(noMatchesFileName.str(), std::ofstream::out | std::ofstream::binary);
- if (t.is_open())
- {
- t << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" "
- "\"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
- t << "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n";
- t << "<head><title></title>\n";
- t << "<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n";
- t << "<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n";
- t << "<script type=\"text/javascript\" src=\"search.js\"></script>\n";
- t << "</head>\n";
- t << "<body class=\"SRPage\">\n";
- t << "<div id=\"SRIndex\">\n";
- t << "<div class=\"SRStatus\" id=\"NoMatches\">"
- << theTranslator->trNoMatches() << "</div>\n";
- t << "</div>\n";
- t << "</body>\n";
- t << "</html>\n";
- }
- }
-
- Doxygen::indexList->addStyleSheetFile("search/search.js");
-}
-
-void SearchIndexInfo::add(const std::string &letter,const Definition *def)
-{
- //printf("%p: %s->%s (full=%s)\n",this,qPrint(letter),qPrint(searchName(def)),qPrint(def->name()));
- auto it = symbolMap.find(letter);
- if (it!=symbolMap.end())
- {
- it->second.push_back(def);
- }
- else
- {
- symbolMap.insert(std::make_pair(letter,std::vector<const Definition*>({def})));
- }
-}
-
-const std::array<SearchIndexInfo,NUM_SEARCH_INDICES> &getSearchIndices()
-{
- return g_searchIndexInfo;
-}
-
-//---------------------------------------------------------------------------------------------
void initSearchIndexer()
{
- static bool searchEngine = Config_getBool(SEARCHENGINE);
- static bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH);
- static bool externalSearch = Config_getBool(EXTERNAL_SEARCH);
+ bool searchEngine = Config_getBool(SEARCHENGINE);
+ bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH);
+ bool externalSearch = Config_getBool(EXTERNAL_SEARCH);
if (searchEngine && serverBasedSearch)
{
if (externalSearch) // external tools produce search index and engine
*
*/
+/** @file
+ * @brief Web server based search engine.
+ *
+ * Comes in two flavors: internal (via generated index) or external (via doxyindexer + doxysearch)
+ */
+
#ifndef SEARCHINDEX_H
#define SEARCHINDEX_H
#include <memory>
#include <vector>
-#include <map>
-#include <unordered_map>
#include <string>
#include <array>
-#include <functional>
+#include <variant>
#include "qcstring.h"
class Definition;
+class SearchIndexIntf;
/*! Initialize the search indexer */
void initSearchIndexer();
/*! Cleanup the search indexer */
void finalizeSearchIndexer();
-//------- server side search index ----------------------
+// --- intermediate data collected by one thread ------
-struct URL
+struct SIData_CurrentDoc
{
- URL(QCString n,QCString u) : name(n), url(u) {}
- QCString name;
- QCString url;
+ SIData_CurrentDoc(const Definition *d,const QCString &a,bool b)
+ : ctx(d), anchor(a), isSourceFile(b) {}
+ const Definition *ctx = 0;
+ QCString anchor;
+ bool isSourceFile;
};
-
-struct URLInfo
+struct SIData_Word
{
- URLInfo(int idx,int f) : urlIdx(idx), freq(f) {}
- int urlIdx;
- int freq;
+ SIData_Word(const QCString &w,bool b)
+ : word(w), hiPrio(b) {}
+ QCString word;
+ bool hiPrio;
};
-class IndexWord
+// class to aggregate the search data collected on a worker thread
+// and later transfer it to the search index on the main thread.
+class SIDataCollection
{
public:
- using URLInfoMap = std::unordered_map<int,URLInfo>;
- IndexWord(QCString word);
- void addUrlIndex(int,bool);
- URLInfoMap urls() const { return m_urls; }
- QCString word() const { return m_word; }
+ void setCurrentDoc(const Definition *ctx,const QCString &anchor,bool isSourceFile)
+ {
+ m_data.emplace_back(SIData_CurrentDoc(ctx,anchor,isSourceFile));
+ }
+ void addWord(const QCString &word,bool hiPriority)
+ {
+ m_data.emplace_back(SIData_Word(word,hiPriority));
+ }
+
+ // transfer the collected data into the given search index
+ void transfer();
private:
- QCString m_word;
- URLInfoMap m_urls;
+ using SIData = std::variant<SIData_CurrentDoc,SIData_Word>;
+ std::vector<SIData> m_data;
};
+//-----------------------------
+
class SearchIndexIntf
{
public:
enum Kind { Internal, External };
SearchIndexIntf(Kind k) : m_kind(k) {}
- virtual ~SearchIndexIntf() {}
+ virtual ~SearchIndexIntf() = default;
virtual void setCurrentDoc(const Definition *ctx,const QCString &anchor,bool isSourceFile) = 0;
virtual void addWord(const QCString &word,bool hiPriority) = 0;
virtual void write(const QCString &file) = 0;
Kind m_kind;
};
-class SearchIndex : public SearchIndexIntf
-{
- public:
- SearchIndex();
- void setCurrentDoc(const Definition *ctx,const QCString &anchor,bool isSourceFile) override;
- void addWord(const QCString &word,bool hiPriority) override;
- void write(const QCString &file) override;
- private:
- void addWord(const QCString &word,bool hiPrio,bool recurse);
- std::unordered_map<std::string,int> m_words;
- std::vector< std::vector< IndexWord> > m_index;
- std::unordered_map<std::string,int> m_url2IdMap;
- std::map<int,URL> m_urls;
- int m_urlIndex = -1;
-};
-
-
-class SearchIndexExternal : public SearchIndexIntf
-{
- struct Private;
- public:
- SearchIndexExternal();
- void setCurrentDoc(const Definition *ctx,const QCString &anchor,bool isSourceFile);
- void addWord(const QCString &word,bool hiPriority);
- void write(const QCString &file);
- private:
- std::unique_ptr<Private> p;
-};
-
-//------- client side search index ----------------------
-
-#define NUM_SEARCH_INDICES 21
-
-QCString searchId(const Definition *d);
-QCString searchName(const Definition *d);
-
-using SearchIndexList = std::vector<const Definition *>;
-using SearchIndexMap = std::map<std::string,SearchIndexList>;
-
-struct SearchIndexInfo
-{
- void add(const std::string &letter,const Definition *def);
- QCString name;
- std::function<QCString()> getText;
- SearchIndexMap symbolMap;
-};
-
-void createJavaScriptSearchIndex();
-void writeJavaScriptSearchIndex();
-const std::array<SearchIndexInfo,NUM_SEARCH_INDICES> &getSearchIndices();
#endif
--- /dev/null
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2022 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
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#include <utility>
+#include <algorithm>
+#include <fstream>
+
+#include "searchindex_js.h"
+#include "doxygen.h"
+#include "groupdef.h"
+#include "pagedef.h"
+#include "namespacedef.h"
+#include "classdef.h"
+#include "classlist.h"
+#include "membername.h"
+#include "filename.h"
+#include "language.h"
+#include "textstream.h"
+#include "util.h"
+#include "version.h"
+#include "message.h"
+#include "resourcemgr.h"
+
+QCString searchName(const Definition *d)
+{
+ return d->definitionType()==Definition::TypeGroup ? QCString(toGroupDef(d)->groupTitle()) :
+ d->definitionType()==Definition::TypePage ? toPageDef(d)->title() :
+ d->localName();
+}
+
+QCString searchId(const Definition *d)
+{
+ std::string s = searchName(d).str();
+ TextStream t;
+ for (size_t i=0;i<s.length();i++)
+ {
+ if (isIdJS(s[i]))
+ {
+ t << s[i];
+ }
+ else // escape non-identifier characters
+ {
+ static const char *hex = "0123456789ABCDEF";
+ unsigned char uc = static_cast<unsigned char>(s[i]);
+ t << '_';
+ t << hex[uc>>4];
+ t << hex[uc&0xF];
+ }
+ }
+
+ return convertUTF8ToLower(t.str());
+}
+
+
+#define SEARCH_INDEX_ALL 0
+#define SEARCH_INDEX_CLASSES 1
+#define SEARCH_INDEX_INTERFACES 2
+#define SEARCH_INDEX_STRUCTS 3
+#define SEARCH_INDEX_EXCEPTIONS 4
+#define SEARCH_INDEX_NAMESPACES 5
+#define SEARCH_INDEX_FILES 6
+#define SEARCH_INDEX_FUNCTIONS 7
+#define SEARCH_INDEX_VARIABLES 8
+#define SEARCH_INDEX_TYPEDEFS 9
+#define SEARCH_INDEX_SEQUENCES 10
+#define SEARCH_INDEX_DICTIONARIES 11
+#define SEARCH_INDEX_ENUMS 12
+#define SEARCH_INDEX_ENUMVALUES 13
+#define SEARCH_INDEX_PROPERTIES 14
+#define SEARCH_INDEX_EVENTS 15
+#define SEARCH_INDEX_RELATED 16
+#define SEARCH_INDEX_DEFINES 17
+#define SEARCH_INDEX_GROUPS 18
+#define SEARCH_INDEX_PAGES 19
+#define SEARCH_INDEX_CONCEPTS 20
+
+static std::array<SearchIndexInfo,NUM_SEARCH_INDICES> g_searchIndexInfo =
+{ {
+ // index name getText symbolList
+ { /* SEARCH_INDEX_ALL */ "all" , []() { return theTranslator->trAll(); }, {} },
+ { /* SEARCH_INDEX_CLASSES */ "classes" , []() { return theTranslator->trClasses(); }, {} },
+ { /* SEARCH_INDEX_INTERFACES */ "interfaces" , []() { return theTranslator->trSliceInterfaces(); }, {} },
+ { /* SEARCH_INDEX_STRUCTS */ "structs" , []() { return theTranslator->trStructs(); }, {} },
+ { /* SEARCH_INDEX_EXCEPTIONS */ "exceptions" , []() { return theTranslator->trExceptions(); }, {} },
+ { /* SEARCH_INDEX_NAMESPACES */ "namespaces" , []() { return Config_getBool(OPTIMIZE_OUTPUT_SLICE) ?
+ theTranslator->trModules() :
+ theTranslator->trNamespace(TRUE,FALSE); }, {} },
+ { /* SEARCH_INDEX_FILES */ "files" , []() { return theTranslator->trFile(TRUE,FALSE); }, {} },
+ { /* SEARCH_INDEX_FUNCTIONS */ "functions" , []() { return Config_getBool(OPTIMIZE_OUTPUT_SLICE) ?
+ theTranslator->trOperations() :
+ theTranslator->trFunctions(); }, {} },
+ { /* SEARCH_INDEX_VARIABLES */ "variables" , []() { return Config_getBool(OPTIMIZE_OUTPUT_SLICE) ?
+ theTranslator->trConstants() :
+ theTranslator->trVariables(); }, {} },
+ { /* SEARCH_INDEX_TYPEDEFS */ "typedefs" , []() { return theTranslator->trTypedefs(); }, {} },
+ { /* SEARCH_INDEX_SEQUENCES */ "sequences" , []() { return theTranslator->trSequences(); }, {} },
+ { /* SEARCH_INDEX_DICTIONARIES */ "dictionaries", []() { return theTranslator->trDictionaries(); }, {} },
+ { /* SEARCH_INDEX_ENUMS */ "enums" , []() { return theTranslator->trEnumerations(); }, {} },
+ { /* SEARCH_INDEX_ENUMVALUES */ "enumvalues" , []() { return theTranslator->trEnumerationValues(); }, {} },
+ { /* SEARCH_INDEX_PROPERTIES */ "properties" , []() { return theTranslator->trProperties(); }, {} },
+ { /* SEARCH_INDEX_EVENTS */ "events" , []() { return theTranslator->trEvents(); }, {} },
+ { /* SEARCH_INDEX_RELATED */ "related" , []() { return theTranslator->trFriends(); }, {} },
+ { /* SEARCH_INDEX_DEFINES */ "defines" , []() { return theTranslator->trDefines(); }, {} },
+ { /* SEARCH_INDEX_GROUPS */ "groups" , []() { return theTranslator->trGroup(TRUE,FALSE); }, {} },
+ { /* SEARCH_INDEX_PAGES */ "pages" , []() { return theTranslator->trPage(TRUE,FALSE); }, {} },
+ { /* SEARCH_INDEX_CONCEPTS */ "concepts" , []() { return theTranslator->trConcept(true,false); }, {} }
+} };
+
+static void addMemberToSearchIndex(const MemberDef *md)
+{
+ bool hideFriendCompounds = Config_getBool(HIDE_FRIEND_COMPOUNDS);
+ bool isLinkable = md->isLinkable();
+ const ClassDef *cd=0;
+ const NamespaceDef *nd=0;
+ const FileDef *fd=0;
+ const GroupDef *gd=0;
+ if (isLinkable &&
+ (
+ ((cd=md->getClassDef()) && cd->isLinkable() && cd->templateMaster()==0) ||
+ ((gd=md->getGroupDef()) && gd->isLinkable())
+ )
+ )
+ {
+ std::string n = md->name().str();
+ if (!n.empty())
+ {
+ std::string letter = convertUTF8ToLower(getUTF8CharAt(n,0));
+ bool isFriendToHide = hideFriendCompounds &&
+ (QCString(md->typeString())=="friend class" ||
+ QCString(md->typeString())=="friend struct" ||
+ QCString(md->typeString())=="friend union");
+ if (!(md->isFriend() && isFriendToHide))
+ {
+ g_searchIndexInfo[SEARCH_INDEX_ALL].add(letter,md);
+ }
+ if (md->isFunction() || md->isSlot() || md->isSignal())
+ {
+ g_searchIndexInfo[SEARCH_INDEX_FUNCTIONS].add(letter,md);
+ }
+ else if (md->isVariable())
+ {
+ g_searchIndexInfo[SEARCH_INDEX_VARIABLES].add(letter,md);
+ }
+ else if (md->isSequence())
+ {
+ g_searchIndexInfo[SEARCH_INDEX_SEQUENCES].add(letter,md);
+ }
+ else if (md->isDictionary())
+ {
+ g_searchIndexInfo[SEARCH_INDEX_DICTIONARIES].add(letter,md);
+ }
+ else if (md->isTypedef())
+ {
+ g_searchIndexInfo[SEARCH_INDEX_TYPEDEFS].add(letter,md);
+ }
+ else if (md->isEnumerate())
+ {
+ g_searchIndexInfo[SEARCH_INDEX_ENUMS].add(letter,md);
+ }
+ else if (md->isEnumValue())
+ {
+ g_searchIndexInfo[SEARCH_INDEX_ENUMVALUES].add(letter,md);
+ }
+ else if (md->isProperty())
+ {
+ g_searchIndexInfo[SEARCH_INDEX_PROPERTIES].add(letter,md);
+ }
+ else if (md->isEvent())
+ {
+ g_searchIndexInfo[SEARCH_INDEX_EVENTS].add(letter,md);
+ }
+ else if (md->isRelated() || md->isForeign() ||
+ (md->isFriend() && !isFriendToHide))
+ {
+ g_searchIndexInfo[SEARCH_INDEX_RELATED].add(letter,md);
+ }
+ }
+ }
+ else if (isLinkable &&
+ (((nd=md->getNamespaceDef()) && nd->isLinkable()) ||
+ ((fd=md->getFileDef()) && fd->isLinkable())
+ )
+ )
+ {
+ std::string n = md->name().str();
+ if (!n.empty())
+ {
+ std::string letter = convertUTF8ToLower(getUTF8CharAt(n,0));
+ g_searchIndexInfo[SEARCH_INDEX_ALL].add(letter,md);
+
+ if (md->isFunction())
+ {
+ g_searchIndexInfo[SEARCH_INDEX_FUNCTIONS].add(letter,md);
+ }
+ else if (md->isVariable())
+ {
+ g_searchIndexInfo[SEARCH_INDEX_VARIABLES].add(letter,md);
+ }
+ else if (md->isSequence())
+ {
+ g_searchIndexInfo[SEARCH_INDEX_SEQUENCES].add(letter,md);
+ }
+ else if (md->isDictionary())
+ {
+ g_searchIndexInfo[SEARCH_INDEX_DICTIONARIES].add(letter,md);
+ }
+ else if (md->isTypedef())
+ {
+ g_searchIndexInfo[SEARCH_INDEX_TYPEDEFS].add(letter,md);
+ }
+ else if (md->isEnumerate())
+ {
+ g_searchIndexInfo[SEARCH_INDEX_ENUMS].add(letter,md);
+ }
+ else if (md->isEnumValue())
+ {
+ g_searchIndexInfo[SEARCH_INDEX_ENUMVALUES].add(letter,md);
+ }
+ else if (md->isDefine())
+ {
+ g_searchIndexInfo[SEARCH_INDEX_DEFINES].add(letter,md);
+ }
+ }
+ }
+}
+
+//---------------------------------------------------------------------------------------------
+
+void createJavaScriptSearchIndex()
+{
+ // index classes
+ for (const auto &cd : *Doxygen::classLinkedMap)
+ {
+ std::string letter = convertUTF8ToLower(getUTF8CharAt(cd->localName().str(),0));
+ if (cd->isLinkable())
+ {
+ g_searchIndexInfo[SEARCH_INDEX_ALL].add(letter,cd.get());
+ if (Config_getBool(OPTIMIZE_OUTPUT_SLICE))
+ {
+ if (cd->compoundType()==ClassDef::Interface)
+ {
+ g_searchIndexInfo[SEARCH_INDEX_INTERFACES].add(letter,cd.get());
+ }
+ else if (cd->compoundType()==ClassDef::Struct)
+ {
+ g_searchIndexInfo[SEARCH_INDEX_STRUCTS].add(letter,cd.get());
+ }
+ else if (cd->compoundType()==ClassDef::Exception)
+ {
+ g_searchIndexInfo[SEARCH_INDEX_EXCEPTIONS].add(letter,cd.get());
+ }
+ else // cd->compoundType()==ClassDef::Class
+ {
+ g_searchIndexInfo[SEARCH_INDEX_CLASSES].add(letter,cd.get());
+ }
+ }
+ else // non slice optimisation: group all types under classes
+ {
+ g_searchIndexInfo[SEARCH_INDEX_CLASSES].add(letter,cd.get());
+ }
+ }
+ }
+
+ // index namespaces
+ for (const auto &nd : *Doxygen::namespaceLinkedMap)
+ {
+ std::string letter = convertUTF8ToLower(getUTF8CharAt(nd->name().str(),0));
+ if (nd->isLinkable())
+ {
+ g_searchIndexInfo[SEARCH_INDEX_ALL].add(letter,nd.get());
+ g_searchIndexInfo[SEARCH_INDEX_NAMESPACES].add(letter,nd.get());
+ }
+ }
+
+ // index concepts
+ for (const auto &cd : *Doxygen::conceptLinkedMap)
+ {
+ std::string letter = convertUTF8ToLower(getUTF8CharAt(cd->name().str(),0));
+ if (cd->isLinkable())
+ {
+ g_searchIndexInfo[SEARCH_INDEX_ALL].add(letter,cd.get());
+ g_searchIndexInfo[SEARCH_INDEX_CONCEPTS].add(letter,cd.get());
+ }
+ }
+
+ // index files
+ for (const auto &fn : *Doxygen::inputNameLinkedMap)
+ {
+ for (const auto &fd : *fn)
+ {
+ std::string letter = convertUTF8ToLower(getUTF8CharAt(fd->name().str(),0));
+ if (fd->isLinkable())
+ {
+ g_searchIndexInfo[SEARCH_INDEX_ALL].add(letter,fd.get());
+ g_searchIndexInfo[SEARCH_INDEX_FILES].add(letter,fd.get());
+ }
+ }
+ }
+
+ // index class members
+ {
+ // for each member name
+ for (const auto &mn : *Doxygen::memberNameLinkedMap)
+ {
+ // for each member definition
+ for (const auto &md : *mn)
+ {
+ addMemberToSearchIndex(md.get());
+ }
+ }
+ }
+
+ // index file/namespace members
+ {
+ // for each member name
+ for (const auto &mn : *Doxygen::functionNameLinkedMap)
+ {
+ // for each member definition
+ for (const auto &md : *mn)
+ {
+ addMemberToSearchIndex(md.get());
+ }
+ }
+ }
+
+ // index groups
+ for (const auto &gd : *Doxygen::groupLinkedMap)
+ {
+ if (gd->isLinkable())
+ {
+ std::string title = gd->groupTitle().str();
+ if (!title.empty()) // TODO: able searching for all word in the title
+ {
+ std::string letter = convertUTF8ToLower(getUTF8CharAt(title,0));
+ g_searchIndexInfo[SEARCH_INDEX_ALL].add(letter,gd.get());
+ g_searchIndexInfo[SEARCH_INDEX_GROUPS].add(letter,gd.get());
+ }
+ }
+ }
+
+ // index pages
+ for (const auto &pd : *Doxygen::pageLinkedMap)
+ {
+ if (pd->isLinkable())
+ {
+ std::string title = pd->title().str();
+ if (!title.empty())
+ {
+ std::string letter = convertUTF8ToLower(getUTF8CharAt(title,0));
+ g_searchIndexInfo[SEARCH_INDEX_ALL].add(letter,pd.get());
+ g_searchIndexInfo[SEARCH_INDEX_PAGES].add(letter,pd.get());
+ }
+ }
+ }
+ if (Doxygen::mainPage)
+ {
+ std::string title = Doxygen::mainPage->title().str();
+ if (!title.empty())
+ {
+ std::string letter = convertUTF8ToLower(getUTF8CharAt(title,0));
+ g_searchIndexInfo[SEARCH_INDEX_ALL].add(letter,Doxygen::mainPage.get());
+ g_searchIndexInfo[SEARCH_INDEX_PAGES].add(letter,Doxygen::mainPage.get());
+ }
+ }
+
+ // sort all lists
+ for (auto &sii : g_searchIndexInfo) // for each index
+ {
+ for (auto &kv : sii.symbolMap) // for each symbol in the index
+ {
+ // sort the symbols (first on "search" name, and then on full name)
+ std::sort(kv.second.begin(),
+ kv.second.end(),
+ [](const Definition *d1,const Definition *d2)
+ {
+ int eq = qstricmp(searchName(d1),searchName(d2)); // search name first
+ return eq==0 ? qstricmp(d1->name(),d2->name())<0 : eq<0; // then full name
+ });
+ }
+ }
+}
+
+void writeJavaScriptSearchIndex()
+{
+ // write index files
+ QCString searchDirName = Config_getString(HTML_OUTPUT)+"/search";
+
+ for (auto &sii : g_searchIndexInfo)
+ {
+ int p=0;
+ for (const auto &kv : sii.symbolMap)
+ {
+ int cnt = 0;
+ QCString baseName;
+ baseName.sprintf("%s_%x",sii.name.data(),p);
+
+ QCString fileName = searchDirName + "/"+baseName+Doxygen::htmlFileExtension;
+ QCString dataFileName = searchDirName + "/"+baseName+".js";
+
+ std::ofstream t(fileName.str(), std::ofstream::out | std::ofstream::binary);
+ std::ofstream ti(dataFileName.str(), std::ofstream::out | std::ofstream::binary);
+ if (t.is_open() && ti.is_open())
+ {
+ {
+ t << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\""
+ " \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
+ t << "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n";
+ t << "<head><title></title>\n";
+ t << "<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n";
+ t << "<meta name=\"generator\" content=\"Doxygen " << getDoxygenVersion() << "\"/>\n";
+ t << "<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n";
+ t << "<script type=\"text/javascript\" src=\"" << baseName << ".js\"></script>\n";
+ t << "<script type=\"text/javascript\" src=\"search.js\"></script>\n";
+ t << "</head>\n";
+ t << "<body class=\"SRPage\">\n";
+ t << "<div id=\"SRIndex\">\n";
+ t << "<div class=\"SRStatus\" id=\"Loading\">" << theTranslator->trLoading() << "</div>\n";
+ t << "<div id=\"SRResults\"></div>\n"; // here the results will be inserted
+ t << "<script type=\"text/javascript\">\n";
+ t << "/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */\n";
+ t << "createResults();\n"; // this function will insert the results
+ t << "/* @license-end */\n";
+ t << "</script>\n";
+ t << "<div class=\"SRStatus\" id=\"Searching\">"
+ << theTranslator->trSearching() << "</div>\n";
+ t << "<div class=\"SRStatus\" id=\"NoMatches\">"
+ << theTranslator->trNoMatches() << "</div>\n";
+
+ t << "<script type=\"text/javascript\">\n";
+ t << "/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */\n";
+ t << "document.getElementById(\"Loading\").style.display=\"none\";\n";
+ t << "document.getElementById(\"NoMatches\").style.display=\"none\";\n";
+ t << "var searchResults = new SearchResults(\"searchResults\");\n";
+ t << "searchResults.Search();\n";
+ t << "window.addEventListener(\"message\", function(event) {\n";
+ t << " if (event.data == \"take_focus\") {\n";
+ t << " var elem = searchResults.NavNext(0);\n";
+ t << " if (elem) elem.focus();\n";
+ t << " }\n";
+ t << "});\n";
+ t << "/* @license-end */\n";
+ t << "</script>\n";
+ t << "</div>\n"; // SRIndex
+ t << "</body>\n";
+ t << "</html>\n";
+ }
+
+ ti << "var searchData=\n";
+ // format
+ // searchData[] = array of items
+ // searchData[x][0] = id
+ // searchData[x][1] = [ name + child1 + child2 + .. ]
+ // searchData[x][1][0] = name as shown
+ // searchData[x][1][y+1] = info for child y
+ // searchData[x][1][y+1][0] = url
+ // searchData[x][1][y+1][1] = 1 => target="_parent"
+ // searchData[x][1][y+1][1] = 0 => target="_blank"
+ // searchData[x][1][y+1][2] = scope
+
+ ti << "[\n";
+ bool firstEntry=TRUE;
+
+ int childCount=0;
+ QCString lastName;
+ const Definition *prevScope = 0;
+ for (auto it = kv.second.begin(); it!=kv.second.end();)
+ {
+ const Definition *d = *it;
+ QCString sname = searchName(d);
+ QCString id = searchId(d);
+
+ if (sname!=lastName) // this item has a different search word
+ {
+ if (!firstEntry)
+ {
+ ti << "]]]";
+ ti << ",\n";
+ }
+ firstEntry=FALSE;
+
+ ti << " ['" << id << "_" << cnt++ << "',['" << convertToXML(sname) << "',[";
+ childCount=0;
+ prevScope=0;
+ }
+
+ ++it;
+ const Definition *scope = d->getOuterScope();
+ const Definition *next = it!=kv.second.end() ? *it : 0;
+ const Definition *nextScope = 0;
+ const MemberDef *md = toMemberDef(d);
+ if (next) nextScope = next->getOuterScope();
+ QCString anchor = d->anchor();
+
+ if (childCount>0)
+ {
+ ti << "],[";
+ }
+ ti << "'" << externalRef("../",d->getReference(),TRUE)
+ << addHtmlExtensionIfMissing(d->getOutputFileBase());
+ if (!anchor.isEmpty())
+ {
+ ti << "#" << anchor;
+ }
+ ti << "',";
+
+ bool extLinksInWindow = Config_getBool(EXT_LINKS_IN_WINDOW);
+ if (!extLinksInWindow || d->getReference().isEmpty())
+ {
+ ti << "1,";
+ }
+ else
+ {
+ ti << "0,";
+ }
+
+ if (lastName!=sname && (next==0 || searchName(next)!=sname)) // unique name
+ {
+ if (d->getOuterScope()!=Doxygen::globalScope)
+ {
+ ti << "'" << convertToXML(d->getOuterScope()->name()) << "'";
+ }
+ else if (md)
+ {
+ const FileDef *fd = md->getBodyDef();
+ if (fd==0) fd = md->getFileDef();
+ if (fd)
+ {
+ ti << "'" << convertToXML(fd->localName()) << "'";
+ }
+ }
+ else
+ {
+ ti << "''";
+ }
+ }
+ else // multiple entries with the same name
+ {
+ bool found=FALSE;
+ bool overloadedFunction = ((prevScope!=0 && scope==prevScope) ||
+ (scope && scope==nextScope)) && md && (md->isFunction() || md->isSlot());
+ QCString prefix;
+ if (md) prefix=convertToXML(md->localName());
+ if (overloadedFunction) // overloaded member function
+ {
+ prefix+=convertToXML(md->argsString());
+ // show argument list to disambiguate overloaded functions
+ }
+ else if (md) // unique member function
+ {
+ prefix+="()"; // only to show it is a function
+ }
+ QCString name;
+ if (d->definitionType()==Definition::TypeClass)
+ {
+ name = convertToXML((toClassDef(d))->displayName());
+ found = TRUE;
+ }
+ else if (d->definitionType()==Definition::TypeNamespace)
+ {
+ name = convertToXML((toNamespaceDef(d))->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->resolveAlias()->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 = convertToXML(d->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()+")";
+ }
+
+ ti << "'" << name << "'";
+
+ prevScope = scope;
+ childCount++;
+ }
+ lastName = sname;
+ }
+ if (!firstEntry)
+ {
+ ti << "]]]\n";
+ }
+ ti << "];\n";
+ }
+ else
+ {
+ err("Failed to open file '%s' for writing...\n",qPrint(fileName));
+ }
+ p++;
+ }
+ }
+
+ {
+ std::ofstream t(searchDirName.str()+"/searchdata.js",
+ std::ofstream::out | std::ofstream::binary);
+ if (t.is_open())
+ {
+ t << "var indexSectionsWithContent =\n";
+ t << "{\n";
+ int j=0;
+ for (const auto &sii : g_searchIndexInfo)
+ {
+ if (!sii.symbolMap.empty())
+ {
+ if (j>0) t << ",\n";
+ t << " " << j << ": \"";
+
+ for (const auto &kv : sii.symbolMap)
+ {
+ if ( kv.first == "\"" ) t << "\\";
+ t << kv.first;
+ }
+ t << "\"";
+ j++;
+ }
+ }
+ if (j>0) t << "\n";
+ t << "};\n\n";
+ t << "var indexSectionNames =\n";
+ t << "{\n";
+ j=0;
+ for (const auto &sii : g_searchIndexInfo)
+ {
+ if (!sii.symbolMap.empty())
+ {
+ if (j>0) t << ",\n";
+ t << " " << j << ": \"" << sii.name << "\"";
+ j++;
+ }
+ }
+ if (j>0) t << "\n";
+ t << "};\n\n";
+ t << "var indexSectionLabels =\n";
+ t << "{\n";
+ j=0;
+ for (const auto &sii : g_searchIndexInfo)
+ {
+ if (!sii.symbolMap.empty())
+ {
+ if (j>0) t << ",\n";
+ t << " " << j << ": \"" << convertToXML(sii.getText()) << "\"";
+ j++;
+ }
+ }
+ if (j>0) t << "\n";
+ t << "};\n\n";
+ }
+ ResourceMgr::instance().copyResource("search.js",searchDirName);
+ }
+
+ {
+ QCString noMatchesFileName =searchDirName+"/nomatches"+Doxygen::htmlFileExtension;
+ std::ofstream t(noMatchesFileName.str(), std::ofstream::out | std::ofstream::binary);
+ if (t.is_open())
+ {
+ t << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" "
+ "\"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
+ t << "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n";
+ t << "<head><title></title>\n";
+ t << "<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n";
+ t << "<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>\n";
+ t << "<script type=\"text/javascript\" src=\"search.js\"></script>\n";
+ t << "</head>\n";
+ t << "<body class=\"SRPage\">\n";
+ t << "<div id=\"SRIndex\">\n";
+ t << "<div class=\"SRStatus\" id=\"NoMatches\">"
+ << theTranslator->trNoMatches() << "</div>\n";
+ t << "</div>\n";
+ t << "</body>\n";
+ t << "</html>\n";
+ }
+ }
+
+ Doxygen::indexList->addStyleSheetFile("search/search.js");
+}
+
+//--------------------------------------------------------------------------------------
+
+void SearchIndexInfo::add(const std::string &letter,const Definition *def)
+{
+ //printf("%p: %s->%s (full=%s)\n",this,qPrint(letter),qPrint(searchName(def)),qPrint(def->name()));
+ auto it = symbolMap.find(letter);
+ if (it!=symbolMap.end())
+ {
+ it->second.push_back(def);
+ }
+ else
+ {
+ symbolMap.insert(std::make_pair(letter,std::vector<const Definition*>({def})));
+ }
+}
+
+const std::array<SearchIndexInfo,NUM_SEARCH_INDICES> &getSearchIndices()
+{
+ return g_searchIndexInfo;
+}
+
--- /dev/null
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2022 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
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+/** @file
+ * @brief Javascript based search engine.
+ */
+
+#ifndef SEARCHINDEX_JS_H
+#define SEARCHINDEX_JS_H
+
+#include <array>
+#include <vector>
+#include <map>
+#include <string>
+#include <functional>
+
+#include "qcstring.h"
+
+#define NUM_SEARCH_INDICES 21
+
+class Definition;
+
+QCString searchId(const Definition *d);
+QCString searchName(const Definition *d);
+
+using SearchIndexList = std::vector<const Definition *>;
+using SearchIndexMap = std::map<std::string,SearchIndexList>;
+
+struct SearchIndexInfo
+{
+ void add(const std::string &letter,const Definition *def);
+ QCString name;
+ std::function<QCString()> getText;
+ SearchIndexMap symbolMap;
+};
+
+void createJavaScriptSearchIndex();
+void writeJavaScriptSearchIndex();
+const std::array<SearchIndexInfo,NUM_SEARCH_INDICES> &getSearchIndices();
+
+#endif
#include "util.h"
#include "outputlist.h"
#include "docparser.h"
+#include "docnode.h"
#include "language.h"
#include "version.h"
if (doc.isEmpty()) return "";
TextStream t;
- std::unique_ptr<IDocParser> parser { createDocParser() };
- std::unique_ptr<DocRoot> root {
- validatingParseDoc(
- *parser.get(),
- fileName,
- lineNr,
- const_cast<Definition*>(scope),
- toMemberDef(def),
- doc,
- FALSE,
- FALSE,
- 0,
- FALSE,
- FALSE,
- Config_getBool(MARKDOWN_SUPPORT)
- ) };
- XMLCodeGenerator codeGen(t);
- // create a parse tree visitor for XML
- auto visitor = std::make_unique<XmlDocVisitor>(t,codeGen,
- scope ? scope->getDefFileExtension() : QCString(""));
- root->accept(visitor.get());
+ auto parser { createDocParser() };
+ auto ast { validatingParseDoc(
+ *parser.get(),
+ fileName,
+ lineNr,
+ const_cast<Definition*>(scope),
+ toMemberDef(def),
+ doc,
+ FALSE,
+ FALSE,
+ 0,
+ FALSE,
+ FALSE,
+ Config_getBool(MARKDOWN_SUPPORT))
+ };
+ auto astImpl = dynamic_cast<const DocNodeAST*>(ast.get());
+ if (astImpl)
+ {
+ XMLCodeGenerator codeGen(t);
+ // create a parse tree visitor for XML
+ XmlDocVisitor visitor(t,codeGen,
+ scope ? scope->getDefFileExtension() : QCString(""));
+ std::visit(visitor,astImpl->root);
+ }
return convertCharEntitiesToUTF8(t.str().c_str());
}
QCString qrefid = pd->getOutputFileBase();
if (pd->getGroupDef())
{
- qrefid+=(QCString)"_"+pd->name();
+ qrefid+="_"+pd->name();
}
if (qrefid=="index") qrefid="indexpage"; // to prevent overwriting the generated index page.
//! Remove a symbol \a def from the map that was stored under key \a name
void remove(const QCString &name,Ptr def)
{
- auto range = find(name.str());
+ auto range = find(name);
for (auto it=range.first; it!=range.second; )
{
if (it->second==def) it = m_map.erase(it); else ++it;
const Definition *followPath(const Definition *start,const QCString &path);
- const Definition *endOfPathIsUsedClass(LinkedRefMap<const ClassDef> cl,const QCString &localName);
+ const Definition *endOfPathIsUsedClass(const LinkedRefMap<const ClassDef> &cl,const QCString &localName);
bool accessibleViaUsingNamespace(StringUnorderedSet &visited,
const LinkedRefMap<const NamespaceDef> &nl,
const Definition *item,
- const QCString &explicitScopePart="");
+ const QCString &explicitScopePart="",
+ int level=0);
bool accessibleViaUsingClass(const LinkedRefMap<const ClassDef> &cl,
const Definition *item,
const QCString &explicitScopePart=""
}
*pk='\0';
- LookupInfo *pval = 0;
{
std::lock_guard<std::mutex> lock(g_cacheMutex);
- pval=Doxygen::lookupCache->find(key.str());
+ LookupInfo *pval = Doxygen::lookupCache->find(key.str());
//printf("Searching for %s result=%p\n",qPrint(key),pval);
if (pval)
{
else // not found yet; we already add a 0 to avoid the possibility of
// endless recursion.
{
- pval = Doxygen::lookupCache->insert(key.str(),LookupInfo());
+ Doxygen::lookupCache->insert(key.str(),LookupInfo());
}
}
//printf("getResolvedClassRec: bestMatch=%p pval->resolvedType=%s\n",
// bestMatch,qPrint(bestResolvedType));
- if (pval)
{
+ // we need to insert the item in the cache again, as it could be removed in the meantime
std::lock_guard<std::mutex> lock(g_cacheMutex);
- pval->classDef = bestMatch;
- pval->typeDef = bestTypedef;
- pval->templSpec = bestTemplSpec;
- pval->resolvedType = bestResolvedType;
+ Doxygen::lookupCache->insert(key.str(),
+ LookupInfo(bestMatch,bestTypedef,bestTemplSpec,bestResolvedType));
}
//fprintf(stderr,"%d ] bestMatch=%s distance=%d\n",--level,
// bestMatch?qPrint(bestMatch->name()):"<none>",minDistance);
return current; // path could be followed
}
-const Definition *SymbolResolver::Private::endOfPathIsUsedClass(LinkedRefMap<const ClassDef> cl,const QCString &localName)
+const Definition *SymbolResolver::Private::endOfPathIsUsedClass(const LinkedRefMap<const ClassDef> &cl,const QCString &localName)
{
for (const auto &cd : cl)
{
bool SymbolResolver::Private::accessibleViaUsingNamespace(StringUnorderedSet &visited,
const LinkedRefMap<const NamespaceDef> &nl,
const Definition *item,
- const QCString &explicitScopePart)
+ const QCString &explicitScopePart,
+ int level)
{
+ //size_t count=0;
for (const auto &und : nl) // check used namespaces for the class
{
- //printf("[Trying via used namespace %s: count=%d/%d\n",qPrint(und->name()),
- // count,nl->count());
+ //printf("%d [Trying via used namespace %s: count=%zu/%zu\n",level,qPrint(und->name()),
+ // count++,nl.size());
const Definition *sc = explicitScopePart.isEmpty() ? und : followPath(und,explicitScopePart);
if (sc && item->getOuterScope()==sc)
{
- //printf("] found it\n");
+ //printf("%d ] found it\n",level);
return true;
}
if (item->getLanguage()==SrcLangExt_Cpp)
{
- QCString key=und->name();
- if (!und->getUsedNamespaces().empty() && visited.find(key.str())==visited.end())
+ QCString key=und->qualifiedName();
+ if (!und->getUsedNamespaces().empty() && visited.insert(key.str()).second)
{
- visited.insert(key.str());
-
- if (accessibleViaUsingNamespace(visited,und->getUsedNamespaces(),item,explicitScopePart))
+ if (accessibleViaUsingNamespace(visited,und->getUsedNamespaces(),item,explicitScopePart,level+1))
{
- //printf("] found it via recursion\n");
+ //printf("%d ] found it via recursion\n",level);
return true;
}
- visited.erase(key.str());
}
}
- //printf("] Try via used namespace done\n");
+ //printf("%d ] Try via used namespace done\n",level);
}
return false;
}
goto done;
}
StringUnorderedSet visited;
- if (accessibleViaUsingNamespace(visited,nscope->getUsedNamespaces(),item))
+ if (accessibleViaUsingNamespace(visited,nscope->getUsedNamespaces(),item,0))
{
//printf("> found via used namespace\n");
goto done;
#include <functional>
#include <utility>
#include <algorithm>
+#include <variant>
#include <assert.h>
#include <stdio.h>
#include "containers.h"
#include "debug.h"
-// set to 1 for debugging
-#define DUMP_OUTPUT 0
-
// ----------------- private part -----------------------------------------------
namespace {
};
/** Base class for all compound types */
-class TagCompoundInfo
+struct TagCompoundInfo
{
- public:
- enum class CompoundType { Class, Concept, Namespace, Package, File, Group, Page, Dir };
- explicit TagCompoundInfo(CompoundType type) : m_type(type) {}
- virtual ~TagCompoundInfo() {}
- CompoundType compoundType() const { return m_type; }
- std::vector<TagMemberInfo> members;
- QCString name;
- QCString filename;
- std::vector<TagAnchorInfo> docAnchors;
- int lineNr = 0;
- private:
- CompoundType m_type;
+ std::vector<TagMemberInfo> members;
+ QCString name;
+ QCString filename;
+ std::vector<TagAnchorInfo> docAnchors;
+ int lineNr = 0;
};
+
/** Container for class specific info that can be read from a tagfile */
-class TagClassInfo : public TagCompoundInfo
+struct TagClassInfo : public TagCompoundInfo
{
- public:
- enum class Kind { None=-1, Class, Struct, Union, Interface, Exception, Protocol, Category, Enum, Service, Singleton };
- TagClassInfo(Kind k) : TagCompoundInfo(CompoundType::Class), kind(k) {}
- QCString clangId;
- QCString anchor;
- std::vector<BaseInfo> bases;
- StringVector templateArguments;
- StringVector classList;
- Kind kind;
- bool isObjC = false;
- static TagClassInfo *get(std::unique_ptr<TagCompoundInfo> &t)
- {
- return dynamic_cast<TagClassInfo*>(t.get());
- }
- static const TagClassInfo *get(const std::unique_ptr<TagCompoundInfo> &t)
- {
- return dynamic_cast<const TagClassInfo*>(t.get());
- }
+ enum class Kind { None=-1, Class, Struct, Union, Interface, Exception, Protocol, Category, Enum, Service, Singleton };
+ TagClassInfo(Kind k) : kind(k) {}
+ QCString clangId;
+ QCString anchor;
+ std::vector<BaseInfo> bases;
+ StringVector templateArguments;
+ StringVector classList;
+ Kind kind;
+ bool isObjC = false;
};
+using TagClassInfoPtr = std::unique_ptr<TagClassInfo>;
+
/** Container for concept specific info that can be read from a tagfile */
-class TagConceptInfo : public TagCompoundInfo
+struct TagConceptInfo : public TagCompoundInfo
{
- public:
- TagConceptInfo() :TagCompoundInfo(CompoundType::Concept) {}
- QCString clangId;
- static TagConceptInfo *get(std::unique_ptr<TagCompoundInfo> &t)
- {
- return dynamic_cast<TagConceptInfo*>(t.get());
- }
- static const TagConceptInfo *get(const std::unique_ptr<TagCompoundInfo> &t)
- {
- return dynamic_cast<const TagConceptInfo*>(t.get());
- }
+ QCString clangId;
};
+using TagConceptInfoPtr = std::unique_ptr<TagConceptInfo>;
+
/** Container for namespace specific info that can be read from a tagfile */
-class TagNamespaceInfo : public TagCompoundInfo
+struct TagNamespaceInfo : public TagCompoundInfo
{
- public:
- TagNamespaceInfo() :TagCompoundInfo(CompoundType::Namespace) {}
- QCString clangId;
- StringVector classList;
- StringVector conceptList;
- StringVector namespaceList;
- static TagNamespaceInfo *get(std::unique_ptr<TagCompoundInfo> &t)
- {
- return dynamic_cast<TagNamespaceInfo*>(t.get());
- }
- static const TagNamespaceInfo *get(const std::unique_ptr<TagCompoundInfo> &t)
- {
- return dynamic_cast<const TagNamespaceInfo*>(t.get());
- }
+ QCString clangId;
+ StringVector classList;
+ StringVector conceptList;
+ StringVector namespaceList;
};
+using TagNamespaceInfoPtr = std::unique_ptr<TagNamespaceInfo>;
+
/** Container for package specific info that can be read from a tagfile */
-class TagPackageInfo : public TagCompoundInfo
+struct TagPackageInfo : public TagCompoundInfo
{
- public:
- TagPackageInfo() : TagCompoundInfo(CompoundType::Package) { }
- StringVector classList;
- static TagPackageInfo *get(std::unique_ptr<TagCompoundInfo> &t)
- {
- return dynamic_cast<TagPackageInfo*>(t.get());
- }
- static const TagPackageInfo *get(const std::unique_ptr<TagCompoundInfo> &t)
- {
- return dynamic_cast<const TagPackageInfo*>(t.get());
- }
+ StringVector classList;
};
+using TagPackageInfoPtr = std::unique_ptr<TagPackageInfo>;
+
/** Container for file specific info that can be read from a tagfile */
-class TagFileInfo : public TagCompoundInfo
+struct TagFileInfo : public TagCompoundInfo
{
- public:
- TagFileInfo() : TagCompoundInfo(CompoundType::File) { }
- QCString path;
- StringVector classList;
- StringVector conceptList;
- StringVector namespaceList;
- std::vector<TagIncludeInfo> includes;
- static TagFileInfo *get(std::unique_ptr<TagCompoundInfo> &t)
- {
- return dynamic_cast<TagFileInfo*>(t.get());
- }
- static const TagFileInfo *get(const std::unique_ptr<TagCompoundInfo> &t)
- {
- return dynamic_cast<const TagFileInfo*>(t.get());
- }
+ QCString path;
+ StringVector classList;
+ StringVector conceptList;
+ StringVector namespaceList;
+ std::vector<TagIncludeInfo> includes;
};
+using TagFileInfoPtr = std::unique_ptr<TagFileInfo>;
+
/** Container for group specific info that can be read from a tagfile */
-class TagGroupInfo : public TagCompoundInfo
+struct TagGroupInfo : public TagCompoundInfo
{
- public:
- TagGroupInfo() : TagCompoundInfo(CompoundType::Group) { }
- QCString title;
- StringVector subgroupList;
- StringVector classList;
- StringVector conceptList;
- StringVector namespaceList;
- StringVector fileList;
- StringVector pageList;
- StringVector dirList;
- static TagGroupInfo *get(std::unique_ptr<TagCompoundInfo> &t)
- {
- return dynamic_cast<TagGroupInfo*>(t.get());
- }
- static const TagGroupInfo *get(const std::unique_ptr<TagCompoundInfo> &t)
- {
- return dynamic_cast<const TagGroupInfo*>(t.get());
- }
+ QCString title;
+ StringVector subgroupList;
+ StringVector classList;
+ StringVector conceptList;
+ StringVector namespaceList;
+ StringVector fileList;
+ StringVector pageList;
+ StringVector dirList;
};
+using TagGroupInfoPtr = std::unique_ptr<TagGroupInfo>;
+
/** Container for page specific info that can be read from a tagfile */
-class TagPageInfo : public TagCompoundInfo
+struct TagPageInfo : public TagCompoundInfo
{
- public:
- TagPageInfo() : TagCompoundInfo(CompoundType::Page) {}
- QCString title;
- static TagPageInfo *get(std::unique_ptr<TagCompoundInfo> &t)
- {
- return dynamic_cast<TagPageInfo*>(t.get());
- }
- static const TagPageInfo *get(const std::unique_ptr<TagCompoundInfo> &t)
- {
- return dynamic_cast<const TagPageInfo*>(t.get());
- }
+ QCString title;
};
+using TagPageInfoPtr = std::unique_ptr<TagPageInfo>;
+
/** Container for directory specific info that can be read from a tagfile */
-class TagDirInfo : public TagCompoundInfo
+struct TagDirInfo : public TagCompoundInfo
+{
+ QCString path;
+ StringVector subdirList;
+ StringVector fileList;
+};
+
+using TagDirInfoPtr = std::unique_ptr<TagDirInfo>;
+
+/** Variant class that holds a unique pointer to one of the specific container types */
+class TagCompoundVariant
{
public:
- TagDirInfo() : TagCompoundInfo(CompoundType::Dir) {}
- QCString path;
- StringVector subdirList;
- StringVector fileList;
- static TagDirInfo *get(std::unique_ptr<TagCompoundInfo> &t)
- {
- return dynamic_cast<TagDirInfo*>(t.get());
- }
- static const TagDirInfo *get(const std::unique_ptr<TagCompoundInfo> &t)
- {
- return dynamic_cast<const TagDirInfo*>(t.get());
+ using VariantT = std::variant< std::monostate, // 0
+ TagClassInfoPtr, // 1
+ TagConceptInfoPtr, // 2
+ TagNamespaceInfoPtr, // 3
+ TagPackageInfoPtr, // 4
+ TagFileInfoPtr, // 5
+ TagGroupInfoPtr, // 6
+ TagPageInfoPtr, // 7
+ TagDirInfoPtr>; // 8
+
+ enum class Type : uint8_t
+ {
+ Uninitialized = 0,
+ Class = 1,
+ Concept = 2,
+ Namespace = 3,
+ Package = 4,
+ File = 5,
+ Group = 6,
+ Page = 7,
+ Dir = 8
+ };
+
+ TagCompoundVariant() {}
+ explicit TagCompoundVariant(VariantT &&v) : m_variant(std::move(v)) {}
+ TagCompoundVariant(const TagCompoundVariant &) = delete;
+ TagCompoundVariant &operator=(const TagCompoundVariant &) = delete;
+ TagCompoundVariant(TagCompoundVariant &&) = default;
+ TagCompoundVariant &operator=(TagCompoundVariant &&) = default;
+ ~TagCompoundVariant() = default;
+
+ /** Generic non-const getter */
+ template<class R>
+ R *get()
+ {
+ std::unique_ptr<R> *p = std::get_if<std::unique_ptr<R>>(&m_variant);
+ return p ? p->get() : 0;
+ }
+ /** Generic const getter */
+ template<class R>
+ const R *get() const
+ {
+ const std::unique_ptr<R> *p = std::get_if<std::unique_ptr<R>>(&m_variant);
+ return p ? p->get() : 0;
+ }
+
+ /** Generic factory method to create a variant holding a unique pointer to a given compound type */
+ template<class R,typename... Args>
+ static TagCompoundVariant make(Args&&... args)
+ {
+ return TagCompoundVariant(VariantT(std::make_unique<R>(std::forward<Args>(args)...)));
+ }
+
+ /** @name convenience const and non-const getters for each variant component
+ * @{
+ */
+ TagClassInfo *getClassInfo() { return get<TagClassInfo >(); }
+ const TagClassInfo *getClassInfo() const { return get<TagClassInfo >(); }
+ TagConceptInfo *getConceptInfo() { return get<TagConceptInfo >(); }
+ const TagConceptInfo *getConceptInfo() const { return get<TagConceptInfo >(); }
+ TagNamespaceInfo *getNamespaceInfo() { return get<TagNamespaceInfo>(); }
+ const TagNamespaceInfo *getNamespaceInfo() const { return get<TagNamespaceInfo>(); }
+ TagPackageInfo *getPackageInfo() { return get<TagPackageInfo >(); }
+ const TagPackageInfo *getPackageInfo() const { return get<TagPackageInfo >(); }
+ TagFileInfo *getFileInfo() { return get<TagFileInfo >(); }
+ const TagFileInfo *getFileInfo() const { return get<TagFileInfo >(); }
+ TagGroupInfo *getGroupInfo() { return get<TagGroupInfo >(); }
+ const TagGroupInfo *getGroupInfo() const { return get<TagGroupInfo >(); }
+ TagPageInfo *getPageInfo() { return get<TagPageInfo >(); }
+ const TagPageInfo *getPageInfo() const { return get<TagPageInfo >(); }
+ TagDirInfo *getDirInfo() { return get<TagDirInfo >(); }
+ const TagDirInfo *getDirInfo() const { return get<TagDirInfo >(); }
+ /** @} */
+
+ /** Convenience method to get the shared compound info */
+ TagCompoundInfo *getCompoundInfo()
+ {
+ switch(type())
+ {
+ case Type::Uninitialized: return 0;
+ case Type::Class: return getClassInfo();
+ case Type::Concept: return getConceptInfo();
+ case Type::Namespace: return getNamespaceInfo();
+ case Type::Package: return getPackageInfo();
+ case Type::File: return getFileInfo();
+ case Type::Group: return getGroupInfo();
+ case Type::Page: return getPageInfo();
+ case Type::Dir: return getDirInfo();
+ }
+ return 0;
+ }
+ Type type() const
+ {
+ return static_cast<Type>(m_variant.index());
}
+
+ private:
+ VariantT m_variant;
};
+
/** Tag file parser.
*
* Reads an XML-structured tagfile and builds up the structure in
class TagFileParser
{
public:
- TagFileParser(const char *tagName) : m_tagName(tagName) {}
+ explicit TagFileParser(const char *tagName) : m_tagName(tagName) {}
void setDocumentLocator ( const XMLLocator * locator )
{
case InNamespace:
case InGroup:
case InPackage:
- m_curCompound->members.push_back(m_curMember);
+ {
+ TagCompoundInfo *info = m_curCompound.getCompoundInfo();
+ if (info)
+ {
+ info->members.push_back(m_curMember);
+ }
+ }
break;
default:
warn("Unexpected tag 'member' found");
case InPage:
case InPackage:
case InDir:
- m_curCompound->docAnchors.push_back(TagAnchorInfo(m_fileName,m_curString,m_title));
+ {
+ TagCompoundInfo *info = m_curCompound.getCompoundInfo();
+ if (info)
+ {
+ info->docAnchors.push_back(TagAnchorInfo(m_fileName,m_curString,m_title));
+ }
+ }
break;
case InMember:
m_curMember.docAnchors.push_back(TagAnchorInfo(m_fileName,m_curString,m_title));
switch(m_state)
{
case InClass:
- TagClassInfo::get(m_curCompound)->classList.push_back(m_curString.str());
+ {
+ TagClassInfo *info = m_curCompound.getClassInfo();
+ if (info) info->classList.push_back(m_curString.str());
+ }
break;
case InFile:
- TagFileInfo::get(m_curCompound)->classList.push_back(m_curString.str());
+ {
+ TagFileInfo *info = m_curCompound.getFileInfo();
+ if (info) info->classList.push_back(m_curString.str());
+ }
break;
case InNamespace:
- TagNamespaceInfo::get(m_curCompound)->classList.push_back(m_curString.str());
+ {
+ TagNamespaceInfo *info = m_curCompound.getNamespaceInfo();
+ if (info) info->classList.push_back(m_curString.str());
+ }
break;
case InGroup:
- TagGroupInfo::get(m_curCompound)->classList.push_back(m_curString.str());
+ {
+ TagGroupInfo *info = m_curCompound.getGroupInfo();
+ if (info) info->classList.push_back(m_curString.str());
+ }
break;
case InPackage:
- TagPackageInfo::get(m_curCompound)->classList.push_back(m_curString.str());
+ {
+ TagPackageInfo *info = m_curCompound.getPackageInfo();
+ if (info) info->classList.push_back(m_curString.str());
+ }
break;
default:
warn("Unexpected tag 'class' found");
switch(m_state)
{
case InNamespace:
- TagNamespaceInfo::get(m_curCompound)->conceptList.push_back(m_curString.str());
+ {
+ TagNamespaceInfo *info = m_curCompound.getNamespaceInfo();
+ if (info) info->conceptList.push_back(m_curString.str());
+ }
break;
case InFile:
- TagFileInfo::get(m_curCompound)->conceptList.push_back(m_curString.str());
+ {
+ TagFileInfo *info = m_curCompound.getFileInfo();
+ if (info) info->conceptList.push_back(m_curString.str());
+ }
break;
case InGroup:
- TagGroupInfo::get(m_curCompound)->conceptList.push_back(m_curString.str());
+ {
+ TagGroupInfo *info = m_curCompound.getGroupInfo();
+ if (info) info->conceptList.push_back(m_curString.str());
+ }
break;
default:
warn("Unexpected tag 'concept' found");
switch(m_state)
{
case InNamespace:
- TagNamespaceInfo::get(m_curCompound)->namespaceList.push_back(m_curString.str());
+ {
+ TagNamespaceInfo *info = m_curCompound.getNamespaceInfo();
+ if (info) info->namespaceList.push_back(m_curString.str());
+ }
break;
case InFile:
- TagFileInfo::get(m_curCompound)->namespaceList.push_back(m_curString.str());
+ {
+ TagFileInfo *info = m_curCompound.getFileInfo();
+ if (info) info->namespaceList.push_back(m_curString.str());
+ }
break;
case InGroup:
- TagGroupInfo::get(m_curCompound)->namespaceList.push_back(m_curString.str());
+ {
+ TagGroupInfo *info = m_curCompound.getGroupInfo();
+ if (info) info->namespaceList.push_back(m_curString.str());
+ }
break;
default:
warn("Unexpected tag 'namespace' found");
switch(m_state)
{
case InGroup:
- TagGroupInfo::get(m_curCompound)->fileList.push_back(m_curString.str());
+ {
+ TagGroupInfo *info = m_curCompound.getGroupInfo();
+ if (info) info->fileList.push_back(m_curString.str());
+ }
break;
case InDir:
- TagDirInfo::get(m_curCompound)->fileList.push_back(m_curString.str());
+ {
+ TagDirInfo *info = m_curCompound.getDirInfo();
+ if (info) info->fileList.push_back(m_curString.str());
+ }
break;
default:
warn("Unexpected tag 'file' found");
switch(m_state)
{
case InGroup:
- TagGroupInfo::get(m_curCompound)->fileList.push_back(m_curString.str());
+ {
+ TagGroupInfo *info = m_curCompound.getGroupInfo();
+ if (info) info->fileList.push_back(m_curString.str());
+ }
break;
default:
warn("Unexpected tag 'page' found");
switch(m_state)
{
case InDir:
- TagDirInfo::get(m_curCompound)->subdirList.push_back(m_curString.str());
+ {
+ TagDirInfo *info = m_curCompound.getDirInfo();
+ if (info) info->subdirList.push_back(m_curString.str());
+ }
break;
default:
warn("Unexpected tag 'dir' found");
case InPage:
case InDir:
case InPackage:
- m_curCompound->name = m_curString;
- break;
+ {
+ TagCompoundInfo *info = m_curCompound.getCompoundInfo();
+ if (info) info->name = m_curString;
+ }
+ break;
case InMember:
- m_curMember.name = m_curString;
- break;
+ m_curMember.name = m_curString;
+ break;
default:
- warn("Unexpected tag 'name' found");
- break;
+ warn("Unexpected tag 'name' found");
+ break;
}
}
void startBase(const XMLHandlers::Attributes& attrib )
{
m_curString="";
- if (m_state==InClass && m_curCompound)
+ TagClassInfo *info = m_curCompound.getClassInfo();
+ if (m_state==InClass && info)
{
QCString protStr = XMLHandlers::value(attrib,"protection");
QCString virtStr = XMLHandlers::value(attrib,"virtualness");
{
virt = Virtual;
}
- TagClassInfo::get(m_curCompound)->bases.push_back(BaseInfo(m_curString,prot,virt));
+ info->bases.push_back(BaseInfo(m_curString,prot,virt));
}
else
{
void endBase()
{
- if (m_state==InClass && m_curCompound)
+ TagClassInfo *info = m_curCompound.getClassInfo();
+ if (m_state==InClass && info)
{
- TagClassInfo::get(m_curCompound)->bases.back().name = m_curString;
+ info->bases.back().name = m_curString;
}
else
{
void endIncludes()
{
m_curIncludes.text = m_curString;
- if (m_state==InFile && m_curCompound)
+ TagFileInfo *info = m_curCompound.getFileInfo();
+ if (m_state==InFile && info)
{
- TagFileInfo::get(m_curCompound)->includes.push_back(m_curIncludes);
+ info->includes.push_back(m_curIncludes);
}
else
{
void endTemplateArg()
{
- if (m_state==InClass && m_curCompound)
+ TagClassInfo *info = m_curCompound.getClassInfo();
+ if (m_state==InClass && info)
{
- TagClassInfo::get(m_curCompound)->templateArguments.push_back(m_curString.str());
+ info->templateArguments.push_back(m_curString.str());
}
else
{
case InPage:
case InPackage:
case InDir:
- m_curCompound->filename = m_curString;
+ {
+ TagCompoundInfo *info = m_curCompound.getCompoundInfo();
+ if (info) info->filename = m_curString;
+ }
break;
default:
warn("Unexpected tag 'filename' found");
switch (m_state)
{
case InFile:
- TagFileInfo::get(m_curCompound)->path = m_curString;
+ {
+ TagFileInfo *info = m_curCompound.getFileInfo();
+ if (info) info->path = m_curString;
+ }
break;
case InDir:
- TagDirInfo::get(m_curCompound)->path = m_curString;
+ {
+ TagDirInfo *info = m_curCompound.getDirInfo();
+ if (info) info->path = m_curString;
+ }
break;
default:
warn("Unexpected tag 'path' found");
}
else if (m_state==InClass)
{
- TagClassInfo::get(m_curCompound)->anchor = m_curString;
+ TagClassInfo *info = m_curCompound.getClassInfo();
+ if (info) info->anchor = m_curString;
}
else
{
}
else if (m_state==InClass)
{
- TagClassInfo::get(m_curCompound)->clangId = m_curString;
+ TagClassInfo *info = m_curCompound.getClassInfo();
+ if (info) info->clangId = m_curString;
}
else if (m_state==InNamespace)
{
- TagNamespaceInfo::get(m_curCompound)->clangId = m_curString;
+ TagNamespaceInfo *info = m_curCompound.getNamespaceInfo();
+ if (info) info->clangId = m_curString;
}
else
{
switch (m_state)
{
case InGroup:
- TagGroupInfo::get(m_curCompound)->title = m_curString;
+ {
+ TagGroupInfo *info = m_curCompound.getGroupInfo();
+ if (info) info->title = m_curString;
+ }
break;
case InPage:
- TagPageInfo::get(m_curCompound)->title = m_curString;
+ {
+ TagPageInfo *info = m_curCompound.getPageInfo();
+ if (info) info->title = m_curString;
+ }
break;
default:
warn("Unexpected tag 'title' found");
{
if (m_state==InGroup)
{
- TagGroupInfo::get(m_curCompound)->subgroupList.push_back(m_curString.str());
+ TagGroupInfo *info = m_curCompound.getGroupInfo();
+ if (info) info->subgroupList.push_back(m_curString.str());
}
else
{
//------------------------------------
- std::vector< std::unique_ptr<TagCompoundInfo> > m_tagFileCompounds;
- std::unique_ptr<TagCompoundInfo> m_curCompound;
+ std::vector< TagCompoundVariant > m_tagFileCompounds;
+ TagCompoundVariant m_curCompound;
TagMemberInfo m_curMember;
TagEnumValueInfo m_curEnumValue;
TagIncludeInfo m_curIncludes;
- QCString m_curString;
- QCString m_tagName;
- QCString m_fileName;
- QCString m_title;
+ QCString m_curString;
+ QCString m_tagName;
+ QCString m_fileName;
+ QCString m_title;
State m_state = Invalid;
std::stack<State> m_stateStack;
const XMLLocator *m_locator = nullptr;
struct CompoundFactory
{
- using CreateFunc = std::function<std::unique_ptr<TagCompoundInfo>()>;
+ using CreateFunc = std::function<TagCompoundVariant()>;
CompoundFactory(TagFileParser::State s,CreateFunc f) : state(s), make_instance(f) {}
TagFileParser::State state;
CreateFunc make_instance;
static const std::map< std::string, CompoundFactory > g_compoundFactory =
{
- // kind tag state creation function
- { "class", { TagFileParser::InClass, []() { return std::make_unique<TagClassInfo>(TagClassInfo::Kind::Class); } } },
- { "struct", { TagFileParser::InClass, []() { return std::make_unique<TagClassInfo>(TagClassInfo::Kind::Struct); } } },
- { "union", { TagFileParser::InClass, []() { return std::make_unique<TagClassInfo>(TagClassInfo::Kind::Union); } } },
- { "interface", { TagFileParser::InClass, []() { return std::make_unique<TagClassInfo>(TagClassInfo::Kind::Interface); } } },
- { "enum", { TagFileParser::InClass, []() { return std::make_unique<TagClassInfo>(TagClassInfo::Kind::Enum); } } },
- { "exception", { TagFileParser::InClass, []() { return std::make_unique<TagClassInfo>(TagClassInfo::Kind::Exception); } } },
- { "protocol", { TagFileParser::InClass, []() { return std::make_unique<TagClassInfo>(TagClassInfo::Kind::Protocol); } } },
- { "category", { TagFileParser::InClass, []() { return std::make_unique<TagClassInfo>(TagClassInfo::Kind::Category); } } },
- { "service", { TagFileParser::InClass, []() { return std::make_unique<TagClassInfo>(TagClassInfo::Kind::Service); } } },
- { "singleton", { TagFileParser::InClass, []() { return std::make_unique<TagClassInfo>(TagClassInfo::Kind::Singleton); } } },
- { "file", { TagFileParser::InFile, []() { return std::make_unique<TagFileInfo>(); } } },
- { "namespace", { TagFileParser::InNamespace, []() { return std::make_unique<TagNamespaceInfo>(); } } },
- { "concept", { TagFileParser::InConcept, []() { return std::make_unique<TagConceptInfo>(); } } },
- { "group", { TagFileParser::InGroup, []() { return std::make_unique<TagGroupInfo>(); } } },
- { "page", { TagFileParser::InPage, []() { return std::make_unique<TagPageInfo>(); } } },
- { "package", { TagFileParser::InPackage, []() { return std::make_unique<TagPackageInfo>(); } } },
- { "dir", { TagFileParser::InDir, []() { return std::make_unique<TagDirInfo>(); } } }
+ // kind tag state creation function
+ { "class", { TagFileParser::InClass, []() { return TagCompoundVariant::make<TagClassInfo>(TagClassInfo::Kind::Class); } } },
+ { "struct", { TagFileParser::InClass, []() { return TagCompoundVariant::make<TagClassInfo>(TagClassInfo::Kind::Struct); } } },
+ { "union", { TagFileParser::InClass, []() { return TagCompoundVariant::make<TagClassInfo>(TagClassInfo::Kind::Union); } } },
+ { "interface", { TagFileParser::InClass, []() { return TagCompoundVariant::make<TagClassInfo>(TagClassInfo::Kind::Interface); } } },
+ { "enum", { TagFileParser::InClass, []() { return TagCompoundVariant::make<TagClassInfo>(TagClassInfo::Kind::Enum); } } },
+ { "exception", { TagFileParser::InClass, []() { return TagCompoundVariant::make<TagClassInfo>(TagClassInfo::Kind::Exception); } } },
+ { "protocol", { TagFileParser::InClass, []() { return TagCompoundVariant::make<TagClassInfo>(TagClassInfo::Kind::Protocol); } } },
+ { "category", { TagFileParser::InClass, []() { return TagCompoundVariant::make<TagClassInfo>(TagClassInfo::Kind::Category); } } },
+ { "service", { TagFileParser::InClass, []() { return TagCompoundVariant::make<TagClassInfo>(TagClassInfo::Kind::Service); } } },
+ { "singleton", { TagFileParser::InClass, []() { return TagCompoundVariant::make<TagClassInfo>(TagClassInfo::Kind::Singleton); } } },
+ { "file", { TagFileParser::InFile, []() { return TagCompoundVariant::make<TagFileInfo>(); } } },
+ { "namespace", { TagFileParser::InNamespace, []() { return TagCompoundVariant::make<TagNamespaceInfo>(); } } },
+ { "concept", { TagFileParser::InConcept, []() { return TagCompoundVariant::make<TagConceptInfo>(); } } },
+ { "group", { TagFileParser::InGroup, []() { return TagCompoundVariant::make<TagGroupInfo>(); } } },
+ { "page", { TagFileParser::InPage, []() { return TagCompoundVariant::make<TagPageInfo>(); } } },
+ { "package", { TagFileParser::InPackage, []() { return TagCompoundVariant::make<TagPackageInfo>(); } } },
+ { "dir", { TagFileParser::InDir, []() { return TagCompoundVariant::make<TagDirInfo>(); } } }
};
//---------------------------------------------------------------------------------------------------------------
{
m_curCompound = it->second.make_instance();
m_state = it->second.state;
- m_curCompound->lineNr = m_locator->lineNr();
+ TagCompoundInfo *info = m_curCompound.getCompoundInfo();
+ if (info) info->lineNr = m_locator->lineNr();
}
else
{
m_state = Invalid;
}
- if (isObjC=="yes" && m_curCompound &&
- m_curCompound->compoundType()==TagCompoundInfo::CompoundType::Class)
+ TagClassInfo *classInfo = m_curCompound.getClassInfo();
+ if (isObjC=="yes" && classInfo)
{
- TagClassInfo::get(m_curCompound)->isObjC = TRUE;
+ classInfo->isObjC = TRUE;
}
}
-#if DUMP_OUTPUT
/*! Dumps the internal structures. For debugging only! */
void TagFileParser::dump()
{
- msg("Result:\n");
+ Debug::print(Debug::Tag,0,"-------- Results --------\n");
//============== CLASSES
for (const auto &comp : m_tagFileCompounds)
{
- if (comp->compoundType()==TagCompoundInfo::CompoundType::Class)
+ if (comp.type()==TagCompoundVariant::Type::Class)
{
- const TagClassInfo *cd = TagClassInfo::get(comp);
- msg("class '%s'\n",qPrint(cd->name));
- msg(" filename '%s'\n",qPrint(cd->filename));
+ const TagClassInfo *cd = comp.getClassInfo();
+ Debug::print(Debug::Tag,0,"class '%s'\n",qPrint(cd->name));
+ Debug::print(Debug::Tag,0," filename '%s'\n",qPrint(cd->filename));
for (const BaseInfo &bi : cd->bases)
{
- msg( " base: %s \n", bi.name.isEmpty() ? "" : qPrint(bi.name) );
+ Debug::print(Debug::Tag,0, " base: %s \n", bi.name.isEmpty() ? "" : qPrint(bi.name) );
}
for (const auto &md : cd->members)
{
- msg(" member:\n");
- msg(" kind: '%s'\n",qPrint(md.kind));
- msg(" name: '%s'\n",qPrint(md.name));
- msg(" anchor: '%s'\n",qPrint(md.anchor));
- msg(" arglist: '%s'\n",qPrint(md.arglist));
+ Debug::print(Debug::Tag,0," member:\n");
+ Debug::print(Debug::Tag,0," kind: '%s'\n",qPrint(md.kind));
+ Debug::print(Debug::Tag,0," name: '%s'\n",qPrint(md.name));
+ Debug::print(Debug::Tag,0," anchor: '%s'\n",qPrint(md.anchor));
+ Debug::print(Debug::Tag,0," arglist: '%s'\n",qPrint(md.arglist));
}
}
}
//============== CONCEPTS
for (const auto &comp : m_tagFileCompounds)
{
- if (comp->compoundType()==TagCompoundInfo::CompoundType::Concept)
+ if (comp.type()==TagCompoundVariant::Type::Concept)
{
- const TagConceptInfo *cd = TagConceptInfo::get(comp);
+ const TagConceptInfo *cd = comp.getConceptInfo();
- msg("concept '%s'\n",qPrint(cd->name));
- msg(" filename '%s'\n",qPrint(cd->filename));
+ Debug::print(Debug::Tag,0,"concept '%s'\n",qPrint(cd->name));
+ Debug::print(Debug::Tag,0," filename '%s'\n",qPrint(cd->filename));
}
}
//============== NAMESPACES
for (const auto &comp : m_tagFileCompounds)
{
- if (comp->compoundType()==TagCompoundInfo::CompoundType::Namespace)
+ if (comp.type()==TagCompoundVariant::Type::Namespace)
{
- const TagNamespaceInfo *nd = TagNamespaceInfo::get(comp);
+ const TagNamespaceInfo *nd = comp.getNamespaceInfo();
- msg("namespace '%s'\n",qPrint(nd->name));
- msg(" filename '%s'\n",qPrint(nd->filename));
+ Debug::print(Debug::Tag,0,"namespace '%s'\n",qPrint(nd->name));
+ Debug::print(Debug::Tag,0," filename '%s'\n",qPrint(nd->filename));
for (const auto &cls : nd->classList)
{
- msg( " class: %s \n", cls.c_str() );
+ Debug::print(Debug::Tag,0, " class: %s \n", cls.c_str() );
}
for (const auto &md : nd->members)
{
- msg(" member:\n");
- msg(" kind: '%s'\n",qPrint(md.kind));
- msg(" name: '%s'\n",qPrint(md.name));
- msg(" anchor: '%s'\n",qPrint(md.anchor));
- msg(" arglist: '%s'\n",qPrint(md.arglist));
+ Debug::print(Debug::Tag,0," member:\n");
+ Debug::print(Debug::Tag,0," kind: '%s'\n",qPrint(md.kind));
+ Debug::print(Debug::Tag,0," name: '%s'\n",qPrint(md.name));
+ Debug::print(Debug::Tag,0," anchor: '%s'\n",qPrint(md.anchor));
+ Debug::print(Debug::Tag,0," arglist: '%s'\n",qPrint(md.arglist));
}
}
}
//============== FILES
for (const auto &comp : m_tagFileCompounds)
{
- if (comp->compoundType()==TagCompoundInfo::CompoundType::File)
+ if (comp.type()==TagCompoundVariant::Type::File)
{
- const TagFileInfo *fd = TagFileInfo::get(comp);
+ const TagFileInfo *fd = comp.getFileInfo();
- msg("file '%s'\n",qPrint(fd->name));
- msg(" filename '%s'\n",qPrint(fd->filename));
+ Debug::print(Debug::Tag,0,"file '%s'\n",qPrint(fd->name));
+ Debug::print(Debug::Tag,0," filename '%s'\n",qPrint(fd->filename));
for (const auto &ns : fd->namespaceList)
{
- msg( " namespace: %s \n", ns.c_str() );
+ Debug::print(Debug::Tag,0, " namespace: %s \n", ns.c_str() );
}
for (const auto &cs : fd->classList)
{
- msg( " class: %s \n", cs.c_str() );
+ Debug::print(Debug::Tag,0, " class: %s \n", cs.c_str() );
}
for (const auto &md : fd->members)
{
- msg(" member:\n");
- msg(" kind: '%s'\n",qPrint(md.kind));
- msg(" name: '%s'\n",qPrint(md.name));
- msg(" anchor: '%s'\n",qPrint(md.anchor));
- msg(" arglist: '%s'\n",qPrint(md.arglist));
+ Debug::print(Debug::Tag,0," member:\n");
+ Debug::print(Debug::Tag,0," kind: '%s'\n",qPrint(md.kind));
+ Debug::print(Debug::Tag,0," name: '%s'\n",qPrint(md.name));
+ Debug::print(Debug::Tag,0," anchor: '%s'\n",qPrint(md.anchor));
+ Debug::print(Debug::Tag,0," arglist: '%s'\n",qPrint(md.arglist));
}
for (const auto &ii : fd->includes)
{
- msg(" includes id: %s name: %s\n",qPrint(ii.id),qPrint(ii.name));
+ Debug::print(Debug::Tag,0," includes id: %s name: %s\n",qPrint(ii.id),qPrint(ii.name));
}
}
}
//============== GROUPS
for (const auto &comp : m_tagFileCompounds)
{
- if (comp->compoundType()==TagCompoundInfo::CompoundType::Group)
+ if (comp.type()==TagCompoundVariant::Type::Group)
{
- const TagGroupInfo *gd = TagGroupInfo::get(comp);
- msg("group '%s'\n",qPrint(gd->name));
- msg(" filename '%s'\n",qPrint(gd->filename));
+ const TagGroupInfo *gd = comp.getGroupInfo();
+ Debug::print(Debug::Tag,0,"group '%s'\n",qPrint(gd->name));
+ Debug::print(Debug::Tag,0," filename '%s'\n",qPrint(gd->filename));
for (const auto &ns : gd->namespaceList)
{
- msg( " namespace: %s \n", ns.c_str() );
+ Debug::print(Debug::Tag,0, " namespace: %s \n", ns.c_str() );
}
for (const auto &cs : gd->classList)
{
- msg( " class: %s \n", cs.c_str() );
+ Debug::print(Debug::Tag,0, " class: %s \n", cs.c_str() );
}
for (const auto &fi : gd->fileList)
{
- msg( " file: %s \n", fi.c_str() );
+ Debug::print(Debug::Tag,0, " file: %s \n", fi.c_str() );
}
for (const auto &sg : gd->subgroupList)
{
- msg( " subgroup: %s \n", sg.c_str() );
+ Debug::print(Debug::Tag,0, " subgroup: %s \n", sg.c_str() );
}
for (const auto &pg : gd->pageList)
{
- msg( " page: %s \n", pg.c_str() );
+ Debug::print(Debug::Tag,0, " page: %s \n", pg.c_str() );
}
for (const auto &md : gd->members)
{
- msg(" member:\n");
- msg(" kind: '%s'\n",qPrint(md.kind));
- msg(" name: '%s'\n",qPrint(md.name));
- msg(" anchor: '%s'\n",qPrint(md.anchor));
- msg(" arglist: '%s'\n",qPrint(md.arglist));
+ Debug::print(Debug::Tag,0," member:\n");
+ Debug::print(Debug::Tag,0," kind: '%s'\n",qPrint(md.kind));
+ Debug::print(Debug::Tag,0," name: '%s'\n",qPrint(md.name));
+ Debug::print(Debug::Tag,0," anchor: '%s'\n",qPrint(md.anchor));
+ Debug::print(Debug::Tag,0," arglist: '%s'\n",qPrint(md.arglist));
}
}
}
//============== PAGES
for (const auto &comp : m_tagFileCompounds)
{
- if (comp->compoundType()==TagCompoundInfo::CompoundType::Page)
+ if (comp.type()==TagCompoundVariant::Type::Page)
{
- const TagPageInfo *pd = TagPageInfo::get(comp);
- msg("page '%s'\n",qPrint(pd->name));
- msg(" title '%s'\n",qPrint(pd->title));
- msg(" filename '%s'\n",qPrint(pd->filename));
+ const TagPageInfo *pd = comp.getPageInfo();
+ Debug::print(Debug::Tag,0,"page '%s'\n",qPrint(pd->name));
+ Debug::print(Debug::Tag,0," title '%s'\n",qPrint(pd->title));
+ Debug::print(Debug::Tag,0," filename '%s'\n",qPrint(pd->filename));
}
}
//============== DIRS
for (const auto &comp : m_tagFileCompounds)
{
- if (comp->compoundType()==TagCompoundInfo::CompoundType::Dir)
+ if (comp.type()==TagCompoundVariant::Type::Dir)
{
- const TagDirInfo *dd = TagDirInfo::get(comp);
+ const TagDirInfo *dd = comp.getDirInfo();
{
- msg("dir '%s'\n",qPrint(dd->name));
- msg(" path '%s'\n",qPrint(dd->path));
+ Debug::print(Debug::Tag,0,"dir '%s'\n",qPrint(dd->name));
+ Debug::print(Debug::Tag,0," path '%s'\n",qPrint(dd->path));
for (const auto &fi : dd->fileList)
{
- msg( " file: %s \n", fi.c_str() );
+ Debug::print(Debug::Tag,0, " file: %s \n", fi.c_str() );
}
for (const auto &sd : dd->subdirList)
{
- msg( " subdir: %s \n", sd.c_str() );
+ Debug::print(Debug::Tag,0, " subdir: %s \n", sd.c_str() );
}
}
}
}
+ Debug::print(Debug::Tag,0,"-------------------------\n");
}
-#endif
void TagFileParser::addDocAnchors(const std::shared_ptr<Entry> &e,const std::vector<TagAnchorInfo> &l)
{
// build class list
for (const auto &comp : m_tagFileCompounds)
{
- if (comp->compoundType()==TagCompoundInfo::CompoundType::Class)
+ const TagClassInfo *tci = comp.getClassInfo();
+ if (tci)
{
- const TagClassInfo *tci = TagClassInfo::get(comp);
std::shared_ptr<Entry> ce = std::make_shared<Entry>();
ce->section = Entry::CLASS_SEC;
switch (tci->kind)
// build file list
for (const auto &comp : m_tagFileCompounds)
{
- if (comp->compoundType()==TagCompoundInfo::CompoundType::File)
+ const TagFileInfo *tfi = comp.getFileInfo();
+ if (tfi)
{
- const TagFileInfo *tfi = TagFileInfo::get(comp);
-
std::shared_ptr<Entry> fe = std::make_shared<Entry>();
fe->section = guessSection(tfi->name);
fe->name = tfi->name;
// build concept list
for (const auto &comp : m_tagFileCompounds)
{
- if (comp->compoundType()==TagCompoundInfo::CompoundType::Concept)
+ const TagConceptInfo *tci = comp.getConceptInfo();
+ if (tci)
{
- const TagConceptInfo *tci = TagConceptInfo::get(comp);
-
std::shared_ptr<Entry> ce = std::make_shared<Entry>();
ce->section = Entry::CONCEPT_SEC;
ce->name = tci->name;
// build namespace list
for (const auto &comp : m_tagFileCompounds)
{
- if (comp->compoundType()==TagCompoundInfo::CompoundType::Namespace)
+ const TagNamespaceInfo *tni = comp.getNamespaceInfo();
+ if (tni)
{
- const TagNamespaceInfo *tni = TagNamespaceInfo::get(comp);
-
std::shared_ptr<Entry> ne = std::make_shared<Entry>();
ne->section = Entry::NAMESPACE_SEC;
ne->name = tni->name;
// build package list
for (const auto &comp : m_tagFileCompounds)
{
- if (comp->compoundType()==TagCompoundInfo::CompoundType::Package)
+ const TagPackageInfo *tpgi = comp.getPackageInfo();
+ if (tpgi)
{
- const TagPackageInfo *tpgi = TagPackageInfo::get(comp);
-
std::shared_ptr<Entry> pe = std::make_shared<Entry>();
pe->section = Entry::PACKAGE_SEC;
pe->name = tpgi->name;
// build group list
for (const auto &comp : m_tagFileCompounds)
{
- if (comp->compoundType()==TagCompoundInfo::CompoundType::Group)
+ const TagGroupInfo *tgi = comp.getGroupInfo();
+ if (tgi)
{
- const TagGroupInfo *tgi = TagGroupInfo::get(comp);
-
std::shared_ptr<Entry> ge = std::make_shared<Entry>();
ge->section = Entry::GROUPDOC_SEC;
ge->name = tgi->name;
for (const auto &comp : m_tagFileCompounds)
{
- if (comp->compoundType()==TagCompoundInfo::CompoundType::Group)
+ const TagGroupInfo *tgi = comp.getGroupInfo();
+ if (tgi)
{
- const TagGroupInfo *tgi = TagGroupInfo::get(comp);
// set subgroup relations bug_774118
-
for (const auto &sg : tgi->subgroupList)
{
const auto &children = root->children();
// build page list
for (const auto &comp : m_tagFileCompounds)
{
- if (comp->compoundType()==TagCompoundInfo::CompoundType::Page)
+ const TagPageInfo *tpi = comp.getPageInfo();
+ if (tpi)
{
- const TagPageInfo *tpi = TagPageInfo::get(comp);
-
std::shared_ptr<Entry> pe = std::make_shared<Entry>();
bool isIndex = (stripExtensionGeneral(tpi->filename,getFileNameExtension(tpi->filename))=="index");
pe->section = isIndex ? Entry::MAINPAGEDOC_SEC : Entry::PAGEDOC_SEC;
{
for (const auto &comp : m_tagFileCompounds)
{
- if (comp->compoundType()==TagCompoundInfo::CompoundType::File)
+ const TagFileInfo *tfi = comp.getFileInfo();
+ if (tfi)
{
- const TagFileInfo *tfi = TagFileInfo::get(comp);
//printf("tag file tagName=%s path=%s name=%s\n",qPrint(m_tagName),qPrint(tfi->path),qPrint(tfi->name));
FileName *fn = Doxygen::inputNameLinkedMap->find(tfi->name);
if (fn)
parser.parse(fullName,inputStr.data(),Debug::isFlagSet(Debug::Lex));
tagFileParser.buildLists(root);
tagFileParser.addIncludes();
-#if DUMP_OUTPUT
- tagFileParser.dump();
-#endif
+ if (Debug::isFlagSet(Debug::Tag))
+ {
+ tagFileParser.dump();
+ }
}
{
public:
TemplateListGenericConstIterator(const List &l) : m_list(l) { m_index=0; }
- virtual ~TemplateListGenericConstIterator() {}
virtual void toFirst()
{
m_index=0;
}
virtual void toLast()
{
- uint count = m_list.count();
+ int count = static_cast<int>(m_list.count());
m_index = count>0 ? count-1 : 0;
}
virtual void toNext()
{
- if (m_index<m_list.count()) { m_index++; }
+ if (m_index<static_cast<int>(m_list.count())) { m_index++; }
}
virtual void toPrev()
{
- if (m_index>0) { --m_index; }
+ if (m_index>=0) { --m_index; }
}
virtual bool current(TemplateVariant &v) const
{
- if (m_index<m_list.count())
+ if (m_index>=0 && m_index<static_cast<int>(m_list.count()))
{
v = m_list.at(m_index);
return TRUE;
}
private:
const List &m_list;
- size_t m_index = 0;
+ int m_index = 0;
};
//-------------------------------------------------------------------------------
{
public:
// TemplateListIntf methods
- virtual uint count() const
+ virtual size_t count() const
{
- return static_cast<uint>(m_elems.size());
+ return m_elems.size();
}
- virtual TemplateVariant at(uint index) const
+ virtual TemplateVariant at(size_t index) const
{
- return index < m_elems.size() ? m_elems[index] : TemplateVariant();
+ return index < m_elems.size() ? m_elems[static_cast<int>(index)] : TemplateVariant();
}
virtual TemplateListIntf::ConstIteratorPtr createIterator() const
{
m_elems.push_back(v);
}
- void removeAt(uint index)
+ void removeAt(size_t index)
{
if (index<m_elems.size())
{
}
}
- void insertAt(uint index,TemplateListPtr list)
+ void insertAt(size_t index,TemplateListPtr list)
{
auto it = m_elems.begin()+index;
m_elems.insert(it,list->m_elems.begin(),list->m_elems.end());
{
m_raw = std::move(v.m_raw);
m_variant = std::move(v.m_variant);
- v.m_variant.invalidate();
+ v.m_variant = VariantT();
}
TemplateVariant &TemplateVariant::operator=(TemplateVariant &&v)
{
m_raw = std::move(v.m_raw);
m_variant = std::move(v.m_variant);
- v.m_variant.invalidate();
+ v.m_variant = VariantT();
return *this;
}
bool TemplateVariant::operator==(TemplateVariant &other) const
{
- if (!m_variant.valid())
+ if (!isValid())
{
return FALSE;
}
if (isBool() && other.isBool())
{
- return m_variant.get<static_cast<uint8_t>(Type::Bool)>() == other.m_variant.get<static_cast<uint8_t>(Type::Bool)>();
+ return std::get<bool>(m_variant) == std::get<bool>(other.m_variant);
}
else if (isInt() && other.isInt())
{
- return m_variant.get<static_cast<uint8_t>(Type::Int)>() == other.m_variant.get<static_cast<uint8_t>(Type::Int)>();
+ return std::get<int>(m_variant) == std::get<int>(other.m_variant);
}
else if (isList() && other.isList())
{
switch (type())
{
case Type::None: return false;
- case Type::Bool: return m_variant.get<static_cast<uint8_t>(Type::Bool)>();
- case Type::Int: return m_variant.get<static_cast<uint8_t>(Type::Int)>()!=0;
- case Type::String: return !m_variant.get<static_cast<uint8_t>(Type::String)>().isEmpty();
+ case Type::Bool: return std::get<bool>(m_variant);
+ case Type::Int: return std::get<int>(m_variant)!=0;
+ case Type::String: return !std::get<QCString>(m_variant).isEmpty();
case Type::Struct: return true;
- case Type::List: return m_variant.get<static_cast<uint8_t>(Type::List)>()->count()!=0;
+ case Type::List: return std::get<TemplateListIntfPtr>(m_variant)->count()!=0;
case Type::Function: return false;
case Type::WeakStruct: return true;
}
switch (type())
{
case Type::None: return 0;
- case Type::Bool: return m_variant.get<static_cast<uint8_t>(Type::Bool)>() ? 1 : 0;
- case Type::Int: return m_variant.get<static_cast<uint8_t>(Type::Int)>();
- case Type::String: return !m_variant.get<static_cast<uint8_t>(Type::String)>().toInt();
+ case Type::Bool: return std::get<bool>(m_variant) ? 1 : 0;
+ case Type::Int: return std::get<int>(m_variant);
+ case Type::String: return std::get<QCString>(m_variant).toInt();
case Type::Struct: return 0;
- case Type::List: return m_variant.get<static_cast<uint8_t>(Type::List)>()->count();
+ case Type::List: return static_cast<int>(std::get<TemplateListIntfPtr>(m_variant)->count());
case Type::Function: return 0;
case Type::WeakStruct: return 0;
}
switch (type())
{
case Type::None: return QCString();
- case Type::Bool: return m_variant.get<static_cast<uint8_t>(Type::Bool)>() ? "true" : "false";
- case Type::Int: return QCString().setNum(m_variant.get<static_cast<uint8_t>(Type::Int)>());
- case Type::String: return m_variant.get<static_cast<uint8_t>(Type::String)>();
+ case Type::Bool: return std::get<bool>(m_variant) ? "true" : "false";
+ case Type::Int: return QCString().setNum(std::get<int>(m_variant));
+ case Type::String: return std::get<QCString>(m_variant);
case Type::Struct: return structToString();
case Type::List: return listToString();
case Type::Function: return "[function]";
TemplateListIntfPtr TemplateVariant::toList()
{
- return isList() ? m_variant.get<static_cast<uint8_t>(Type::List)>() : nullptr;
+ return isList() ? std::get<TemplateListIntfPtr>(m_variant) : nullptr;
}
const TemplateListIntfPtr TemplateVariant::toList() const
{
- return isList() ? m_variant.get<static_cast<uint8_t>(Type::List)>() : nullptr;
+ return isList() ? std::get<TemplateListIntfPtr>(m_variant) : nullptr;
}
TemplateStructIntfPtr TemplateVariant::toStruct()
{
- return isStruct() ? m_variant.get<static_cast<uint8_t>(Type::Struct)>() :
- isWeakStruct() ? m_variant.get<static_cast<uint8_t>(Type::WeakStruct)>().lock() :
+ return isStruct() ? std::get<TemplateStructIntfPtr>(m_variant) :
+ isWeakStruct() ? std::get<TemplateStructIntfWeakPtr>(m_variant).lock() :
nullptr;
}
const TemplateStructIntfPtr TemplateVariant::toStruct() const
{
- return isStruct() ? m_variant.get<static_cast<uint8_t>(Type::Struct)>() :
- isWeakStruct() ? m_variant.get<static_cast<uint8_t>(Type::WeakStruct)>().lock() :
+ return isStruct() ? std::get<TemplateStructIntfPtr>(m_variant) :
+ isWeakStruct() ? std::get<TemplateStructIntfWeakPtr>(m_variant).lock() :
nullptr;
}
TemplateVariant TemplateVariant::call(const std::vector<TemplateVariant> &args)
{
- return isFunction() ? m_variant.get<static_cast<uint8_t>(Type::Function)>()(args) : TemplateVariant();
+ return isFunction() ? std::get<FunctionDelegate>(m_variant)(args) : TemplateVariant();
}
//- Template struct implementation --------------------------------------------
{
}
-uint TemplateImmutableList::count() const
+size_t TemplateImmutableList::count() const
{
- return static_cast<uint>(p->elems.size());
+ return p->elems.size();
}
TemplateListIntf::ConstIteratorPtr TemplateImmutableList::createIterator() const
- {
+{
return std::make_unique< TemplateListGenericConstIterator<TemplateImmutableList> >(*this);
- }
+}
-TemplateVariant TemplateImmutableList::at(uint index) const
+TemplateVariant TemplateImmutableList::at(size_t index) const
{
- return index<p->elems.size() ? p->elems[index] : TemplateVariant();
+ return index<p->elems.size() ? p->elems[static_cast<int>(index)] : TemplateVariant();
}
TemplateListIntfPtr TemplateImmutableList::alloc(std::initializer_list<TemplateVariant> elements)
{
return arg;
}
- bool lhsIsInt;
+ bool lhsIsInt = false;
int lhsValue = variantIntValue(v,lhsIsInt);
- bool rhsIsInt;
+ bool rhsIsInt = false;
int rhsValue = variantIntValue(arg,rhsIsInt);
if (lhsIsInt && rhsIsInt)
{
}
if (v.isList())
{
- return TemplateVariant((int)v.toList()->count());
+ return TemplateVariant(v.toList()->count());
}
else if (v.isString())
{
- return TemplateVariant((int)v.toString().length());
+ return TemplateVariant(v.toString().length());
}
else
{
const char hex[]="0123456789abcdef";
while ((c=*p++))
{
- result+=hex[((unsigned char)c)>>4];
- result+=hex[((unsigned char)c)&0xf];
+ result+=hex[static_cast<unsigned char>(c)>>4];
+ result+=hex[static_cast<unsigned char>(c)&0xf];
}
}
//printf("<keyToLabel(%s)\n",qPrint(result));
class ExprAst
{
public:
- virtual ~ExprAst() {}
+ virtual ~ExprAst() = default;
virtual TemplateVariant resolve(TemplateContext *) { return TemplateVariant(); }
};
{
public:
TemplateNode(TemplateNode *parent) : m_parent(parent) {}
- virtual ~TemplateNode() {}
+ virtual ~TemplateNode() = default;
virtual void render(TextStream &ts, TemplateContext *c) = 0;
: m_engine(e), m_indices(TemplateStruct::alloc())
{
//printf("%p:TemplateContextImpl::TemplateContextImpl()\n",(void*)this);
- m_fromUtf8 = (void*)(-1);
+ m_fromUtf8 = reinterpret_cast<void*>(-1);
push();
set("index",std::static_pointer_cast<TemplateStructIntf>(m_indices));
}
void TemplateContextImpl::setEncoding(const QCString &templateName,int line,const QCString &enc)
{
if (enc==m_encoding) return; // nothing changed
- if (m_fromUtf8!=(void *)(-1))
+ if (m_fromUtf8!=reinterpret_cast<void *>(-1))
{
portable_iconv_close(m_fromUtf8);
- m_fromUtf8 = (void*)(-1);
+ m_fromUtf8 = reinterpret_cast<void*>(-1);
}
m_encoding=enc;
if (!enc.isEmpty())
{
m_fromUtf8 = portable_iconv_open(enc.data(),"UTF-8");
- if (m_fromUtf8==(void*)(-1))
+ if (m_fromUtf8==reinterpret_cast<void*>(-1))
{
warn(templateName,line,"unsupported character conversion: '%s'->'UTF-8'\n", qPrint(enc));
}
QCString TemplateContextImpl::recode(const QCString &s)
{
//printf("TemplateContextImpl::recode(%s)\n",qPrint(s));
- int iSize = s.length();
- int oSize = iSize*4+1;
+ size_t iSize = s.length();
+ size_t oSize = iSize*4+1;
QCString output(oSize);
size_t iLeft = iSize;
size_t oLeft = oSize;
char *oPtr = output.rawData();
if (!portable_iconv(m_fromUtf8,&iPtr,&iLeft,&oPtr,&oLeft))
{
- oSize -= (int)oLeft;
+ oSize -= oLeft;
output.resize(oSize+1);
output.at(oSize)='\0';
return output;
for (i=0;i<n;i++)
{
TemplateStructPtr s = TemplateStruct::alloc();
- s->set("counter0", (int)i);
- s->set("counter", (int)(i+1));
- s->set("revcounter", (int)(n-i));
- s->set("revcounter0", (int)(n-i-1));
+ s->set("counter0", i);
+ s->set("counter", i+1);
+ s->set("revcounter", n-i);
+ s->set("revcounter0", n-i-1);
s->set("first",i==0);
s->set("last", i==n-1);
c->set("repeatloop",std::static_pointer_cast<TemplateStructIntf>(s));
TemplateVariant ve = m_endExpr->resolve(c);
if (vs.isInt() && ve.isInt())
{
- int s = vs.toInt();
- int e = ve.toInt();
- int l = m_down ? s-e+1 : e-s+1;
+ size_t s = vs.toInt();
+ size_t e = ve.toInt();
+ size_t l = m_down ? s-e+1 : e-s+1;
if (l>0)
{
c->push();
//int index = m_reversed ? list.count() : 0;
const TemplateVariant *parentLoop = c->getRef("forloop");
- uint index = 0;
- int i = m_down ? e : s;
+ size_t index = 0;
+ size_t i = m_down ? e : s;
bool done=false;
while (!done)
{
// set the forloop meta-data variable
TemplateStructPtr ls = TemplateStruct::alloc();
- ls->set("counter0", (int)index);
- ls->set("counter", (int)(index+1));
- ls->set("revcounter", (int)(l-index));
- ls->set("revcounter0", (int)(l-index-1));
- ls->set("first",index==0);
- ls->set("last", (int)index==l-1);
+ ls->set("counter0", index);
+ ls->set("counter", (index+1));
+ ls->set("revcounter", (l-index));
+ ls->set("revcounter0", (l-index-1));
+ ls->set("first", index==0);
+ ls->set("last", index==l-1);
ls->set("parentloop",parentLoop ? *parentLoop : TemplateVariant());
c->set("forloop",std::static_pointer_cast<TemplateStructIntf>(ls));
const TemplateListIntfPtr list = v.toList();
if (list)
{
- uint listSize = list->count();
+ size_t listSize = list->count();
if (listSize==0) // empty for loop
{
m_emptyNodes.render(ts,c);
//int index = m_reversed ? list.count() : 0;
//TemplateVariant v;
const TemplateVariant *parentLoop = c->getRef("forloop");
- uint index = m_reversed ? listSize-1 : 0;
+ size_t index = m_reversed ? listSize-1 : 0;
TemplateListIntf::ConstIteratorPtr it = list->createIterator();
TemplateVariant ve;
for (m_reversed ? it->toLast() : it->toFirst();
m_reversed ? it->toPrev() : it->toNext())
{
TemplateStructPtr s = TemplateStruct::alloc();
- s->set("counter0", (int)index);
- s->set("counter", (int)(index+1));
- s->set("revcounter", (int)(listSize-index));
- s->set("revcounter0", (int)(listSize-index-1));
- s->set("first",index==0);
- s->set("last", index==listSize-1);
+ s->set("counter0", index);
+ s->set("counter", index+1);
+ s->set("revcounter", listSize-index);
+ s->set("revcounter0", listSize-index-1);
+ s->set("first", index==0);
+ s->set("last", index==listSize-1);
s->set("parentloop",parentLoop ? *parentLoop : TemplateVariant());
c->set("forloop",std::static_pointer_cast<TemplateStructIntf>(s));
if (i==entryIndex) // found element
{
TemplateStructPtr s = TemplateStruct::alloc();
- s->set("id",(int)i);
+ s->set("id",i);
c->set("markers",std::static_pointer_cast<TemplateStructIntf>(s));
c->set(m_var,var); // define local variable to hold element of list type
bool wasSpaceless = ci->spacelessEnabled();
if (f.is_open()) // read template from disk
{
FileInfo fi(filePath.str());
- int size=(int)fi.size();
+ size_t size=fi.size();
QCString data(size+1);
f.read(data.rawData(),size);
if (!f.fail())
#include <vector>
#include <memory>
#include <functional>
+#include <variant>
#include "qcstring.h"
#include "containers.h"
-#include "variant.h"
class TemplateListIntf;
class TemplateStructIntf;
using FunctionDelegate = std::function<TemplateVariant(const std::vector<TemplateVariant>&)>;
/** Symbolic names for the possible types that this variant can hold. */
- using VariantT = Variant<bool, // index==0: Type::Bool
- int, // index==1: Type::Int
- QCString, // index==2: Type::String
- TemplateStructIntfPtr, // index==3: Type::Struct
- TemplateListIntfPtr, // index==4: Type::List
- FunctionDelegate, // index==5: Type::Function
- TemplateStructIntfWeakPtr // index==6: Type::WeakStruct
- >;
+ using VariantT = std::variant<std::monostate, // index==0, Invalid/default type
+ bool, // index==1: Type::Bool
+ int, // index==2: Type::Int
+ QCString, // index==3: Type::String
+ TemplateStructIntfPtr, // index==4: Type::Struct
+ TemplateListIntfPtr, // index==5: Type::List
+ FunctionDelegate, // index==6: Type::Function
+ TemplateStructIntfWeakPtr // index==7: Type::WeakStruct
+ >;
enum class Type : uint8_t
{
- Bool = 0,
- Int = 1,
- String = 2,
- Struct = 3,
- List = 4,
- Function = 5,
- WeakStruct = 6,
- None = 255
+ None = 0,
+ Bool = 1,
+ Int = 2,
+ String = 3,
+ Struct = 4,
+ List = 5,
+ Function = 6,
+ WeakStruct = 7
};
/** Constructs an invalid variant. */
TemplateVariant() {}
/** Constructs a new variant with a boolean value \a b. */
- explicit TemplateVariant(bool b) { m_variant.set<static_cast<uint8_t>(Type::Bool)>(b); }
+ explicit TemplateVariant(bool b) { m_variant = b; }
/** Constructs a new variant with a integer value \a v. */
- TemplateVariant(int v) { m_variant.set<static_cast<uint8_t>(Type::Int)>(v); }
+ TemplateVariant(int v) { m_variant = v; }
+
+ /** Constructs a new variant with a integer value \a v. */
+ TemplateVariant(unsigned int v) { m_variant = static_cast<int>(v); }
+
+ /** Constructs a new variant with a integer value \a v.
+ * We use SFINAE to avoid a compiler error in case size_t already matches the 'unsigned int' overload.
+ */
+ template<typename T,
+ typename std::enable_if<std::is_same<T,size_t>::value,T>::type* = nullptr
+ >
+ TemplateVariant(T v) { m_variant = static_cast<int>(v); }
/** Constructs a new variant with a string value \a s. */
- TemplateVariant(const char *s,bool raw=FALSE) : m_raw(raw) { m_variant.set<static_cast<uint8_t>(Type::String)>(s); }
+ TemplateVariant(const char *s,bool raw=FALSE) : m_raw(raw) { m_variant = QCString(s); }
/** Constructs a new variant with a string value \a s. */
- TemplateVariant(const QCString &s,bool raw=FALSE) : m_raw(raw) { m_variant.set<static_cast<uint8_t>(Type::String)>(s.str()); }
+ TemplateVariant(const QCString &s,bool raw=FALSE) : m_raw(raw) { m_variant = s; }
/** Constructs a new variant with a string value \a s. */
- TemplateVariant(const std::string &s,bool raw=FALSE) : m_raw(raw) { m_variant.set<static_cast<uint8_t>(Type::String)>(s); }
+ TemplateVariant(const std::string &s,bool raw=FALSE) : m_raw(raw) { m_variant = QCString(s); }
/** Constructs a new variant with a struct value \a s.
* @note. The variant will hold a counting reference to the object.
*/
- TemplateVariant(TemplateStructIntfPtr s) { m_variant.set<static_cast<uint8_t>(Type::Struct)>(s); }
+ TemplateVariant(TemplateStructIntfPtr s) { m_variant = s; }
/** Constructs a new variant with a list value \a l.
* @note. The variant will hold a counting reference to the object.
*/
- TemplateVariant(TemplateListIntfPtr l) { m_variant.set<static_cast<uint8_t>(Type::List)>(l); }
+ TemplateVariant(TemplateListIntfPtr l) { m_variant = l; }
/** Constructs a new variant with a struct value \a s.
* @note. The variant will hold a non-counting reference to the object.
*/
- TemplateVariant(TemplateStructIntfWeakPtr s) { m_variant.set<static_cast<uint8_t>(Type::WeakStruct)>(s); }
+ TemplateVariant(TemplateStructIntfWeakPtr s) { m_variant = s; }
/** Constructs a new variant which represents a method call
* @param[in] delegate FunctionDelegate object to invoke when
* TemplateVariant::FunctionDelegate::fromFunction() to create
* FunctionDelegate objects.
*/
- TemplateVariant(FunctionDelegate delegate) { m_variant.set<static_cast<uint8_t>(Type::Function)>(delegate); }
+ TemplateVariant(FunctionDelegate delegate) { m_variant = delegate; }
/** Destroys the Variant object */
~TemplateVariant() = default;
int toInt() const;
/** Returns TRUE if the variant holds a valid value, or FALSE otherwise */
- constexpr bool isValid() const { return m_variant.valid(); }
+ constexpr bool isValid() const { return std::holds_alternative<std::monostate>(m_variant); }
/** Returns TRUE if the variant holds a boolean value */
- constexpr bool isBool() const { return m_variant.is<static_cast<uint8_t>(Type::Bool)>(); }
+ constexpr bool isBool() const { return std::holds_alternative<bool>(m_variant); }
/** Returns TRUE if the variant holds an integer value */
- constexpr bool isInt() const { return m_variant.is<static_cast<uint8_t>(Type::Int)>(); }
+ constexpr bool isInt() const { return std::holds_alternative<int>(m_variant); }
/** Returns TRUE if the variant holds a string value */
- constexpr bool isString() const { return m_variant.is<static_cast<uint8_t>(Type::String)>(); }
+ constexpr bool isString() const { return std::holds_alternative<QCString>(m_variant); }
/** Returns TRUE if the variant holds a struct value */
- constexpr bool isStruct() const { return m_variant.is<static_cast<uint8_t>(Type::Struct)>(); }
+ constexpr bool isStruct() const { return std::holds_alternative<TemplateStructIntfPtr>(m_variant); }
/** Returns TRUE if the variant holds a list value */
- constexpr bool isList() const { return m_variant.is<static_cast<uint8_t>(Type::List)>(); }
+ constexpr bool isList() const { return std::holds_alternative<TemplateListIntfPtr>(m_variant); }
/** Returns TRUE if the variant holds a function value */
- constexpr bool isFunction() const { return m_variant.is<static_cast<uint8_t>(Type::Function)>(); }
+ constexpr bool isFunction() const { return std::holds_alternative<FunctionDelegate>(m_variant); }
/** Returns TRUE if the variant holds a struct value */
- constexpr bool isWeakStruct() const { return m_variant.is<static_cast<uint8_t>(Type::WeakStruct)>(); }
+ constexpr bool isWeakStruct() const { return std::holds_alternative<TemplateStructIntfWeakPtr>(m_variant); }
/** Returns the pointer to list referenced by this variant
* or 0 if this variant does not have list type.
{
public:
/** Destructor for the iterator */
- virtual ~ConstIterator() {}
+ virtual ~ConstIterator() = default;
/** Moves iterator to the first element in the list */
virtual void toFirst() = 0;
/** Moves iterator to the last element in the list */
using ConstIteratorPtr = std::unique_ptr<ConstIterator>;
/** Destroys the list */
- virtual ~TemplateListIntf() {}
+ virtual ~TemplateListIntf() = default;
/** Returns the number of elements in the list */
- virtual uint count() const = 0;
+ virtual size_t count() const = 0;
/** Returns the element at index position \a index. */
- virtual TemplateVariant at(uint index) const = 0;
+ virtual TemplateVariant at(size_t index) const = 0;
/** Creates a new iterator for this list.
* @note the user should call delete on the returned pointer.
{
public:
// TemplateListIntf methods
- virtual uint count() const;
- virtual TemplateVariant at(uint index) const;
+ virtual size_t count() const;
+ virtual TemplateVariant at(size_t index) const;
virtual TemplateListIntf::ConstIteratorPtr createIterator() const;
/** Creates an instance and returns a shared pointer to it */
{
public:
/** Destroys the struct */
- virtual ~TemplateStructIntf() {}
+ virtual ~TemplateStructIntf() = default;
/** Gets the value for a field name.
* @param[in] name The name of the field.
class TemplateEscapeIntf
{
public:
- virtual ~TemplateEscapeIntf() {}
+ virtual ~TemplateEscapeIntf() = default;
/** Create a copy of the escape filter */
virtual std::unique_ptr<TemplateEscapeIntf> clone() = 0;
/** Returns the \a input after escaping certain characters */
class TemplateSpacelessIntf
{
public:
- virtual ~TemplateSpacelessIntf() {}
+ virtual ~TemplateSpacelessIntf() = default;
/** Create a copy of the spaceless filter */
virtual std::unique_ptr<TemplateSpacelessIntf> clone() = 0;
/** Returns the \a input after removing redundant whitespace */
class TemplateContext
{
public:
- virtual ~TemplateContext() {}
+ virtual ~TemplateContext() = default;
/** Push a new scope on the stack. */
virtual void push() = 0;
{
public:
/** Destructor */
- virtual ~Template() {}
+ virtual ~Template() = default;
/** Renders a template instance to a stream.
* @param[in] ts The text stream to write the results to.
//-------------------------------------------------------------------------
-void TextDocVisitor::visit(DocSymbol *s)
+void TextDocVisitor::operator()(const DocSymbol &s)
{
- const char *res = HtmlEntityMapper::instance()->html(s->symbol());
+ const char *res = HtmlEntityMapper::instance()->html(s.symbol());
if (res)
{
m_t << res;
}
else
{
- err("text: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(s->symbol(),TRUE));
+ err("text: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(s.symbol(),TRUE));
}
}
-void TextDocVisitor::visit(DocEmoji *s)
+void TextDocVisitor::operator()(const DocEmoji &s)
{
- const char *res = EmojiEntityMapper::instance()->name(s->index());
+ const char *res = EmojiEntityMapper::instance()->name(s.index());
if (res)
{
filter(res);
}
else
{
- filter(s->name());
+ filter(s.name());
}
}
#include "qcstring.h"
#include "docvisitor.h"
-#include "docparser.h"
+#include "docnode.h"
#include "textstream.h"
/*! @brief Concrete visitor implementation for TEXT output. */
class TextDocVisitor : public DocVisitor
{
public:
- TextDocVisitor(TextStream &t) : DocVisitor(DocVisitor_Text), m_t(t) {}
+ TextDocVisitor(TextStream &t) : m_t(t) {}
//--------------------------------------
// visitor functions for leaf nodes
//--------------------------------------
- void visit(DocWord *w) { filter(w->word()); }
- void visit(DocLinkedWord *w) { filter(w->word()); }
- void visit(DocWhiteSpace *) { m_t << " "; }
- void visit(DocSymbol *);
- void visit(DocEmoji *);
- void visit(DocURL *u) { filter(u->url()); }
- void visit(DocLineBreak *) { m_t << " "; }
- void visit(DocHorRuler *) {}
- void visit(DocStyleChange *) {}
- void visit(DocVerbatim *s) { filter(s->text()); }
- void visit(DocAnchor *) {}
- void visit(DocInclude *) {}
- void visit(DocIncOperator *) {}
- void visit(DocFormula *) {}
- void visit(DocIndexEntry *) {}
- void visit(DocSimpleSectSep *){}
- void visit(DocCite *) {}
+ void operator()(const DocWord &w) { filter(w.word()); }
+ void operator()(const DocLinkedWord &w) { filter(w.word()); }
+ void operator()(const DocWhiteSpace &) { m_t << " "; }
+ void operator()(const DocSymbol &);
+ void operator()(const DocEmoji &);
+ void operator()(const DocURL &u) { filter(u.url()); }
+ void operator()(const DocLineBreak &) { m_t << " "; }
+ void operator()(const DocHorRuler &) {}
+ void operator()(const DocStyleChange &) {}
+ void operator()(const DocVerbatim &s) { filter(s.text()); }
+ void operator()(const DocAnchor &) {}
+ void operator()(const DocInclude &) {}
+ void operator()(const DocIncOperator &) {}
+ void operator()(const DocFormula &) {}
+ void operator()(const DocIndexEntry &) {}
+ void operator()(const DocSimpleSectSep &){}
+ void operator()(const DocCite &) {}
+ void operator()(const DocSeparator &) { m_t << " "; }
//--------------------------------------
// visitor functions for compound nodes
//--------------------------------------
- void visitPre(DocAutoList *) {}
- void visitPost(DocAutoList *) {}
- void visitPre(DocAutoListItem *) {}
- void visitPost(DocAutoListItem *) {}
- void visitPre(DocPara *) {}
- void visitPost(DocPara *) {}
- void visitPre(DocRoot *) {}
- void visitPost(DocRoot *) {}
- void visitPre(DocSimpleSect *) {}
- void visitPost(DocSimpleSect *) {}
- void visitPre(DocTitle *) {}
- void visitPost(DocTitle *) {}
- void visitPre(DocSimpleList *) {}
- void visitPost(DocSimpleList *) {}
- void visitPre(DocSimpleListItem *) {}
- void visitPost(DocSimpleListItem *) {}
- void visitPre(DocSection *) {}
- void visitPost(DocSection *) {}
- void visitPre(DocHtmlList *) {}
- void visitPost(DocHtmlList *) {}
- void visitPre(DocHtmlListItem *) {}
- void visitPost(DocHtmlListItem *) {}
- void visitPre(DocHtmlDescList *) {}
- void visitPost(DocHtmlDescList *) {}
- void visitPre(DocHtmlDescTitle *) {}
- void visitPost(DocHtmlDescTitle *) {}
- void visitPre(DocHtmlDescData *) {}
- void visitPost(DocHtmlDescData *) {}
- void visitPre(DocHtmlTable *) {}
- void visitPost(DocHtmlTable *) {}
- void visitPre(DocHtmlRow *) {}
- void visitPost(DocHtmlRow *) {}
- void visitPre(DocHtmlCell *) {}
- void visitPost(DocHtmlCell *) {}
- void visitPre(DocHtmlCaption *) {}
- void visitPost(DocHtmlCaption *) {}
- void visitPre(DocInternal *) {}
- void visitPost(DocInternal *) {}
- void visitPre(DocHRef *) {}
- void visitPost(DocHRef *) {}
- void visitPre(DocHtmlHeader *) {}
- void visitPost(DocHtmlHeader *) {}
- void visitPre(DocImage *) {}
- void visitPost(DocImage *) {}
- void visitPre(DocDotFile *) {}
- void visitPost(DocDotFile *) {}
-
- void visitPre(DocMscFile *) {}
- void visitPost(DocMscFile *) {}
- void visitPre(DocDiaFile *) {}
- void visitPost(DocDiaFile *) {}
- void visitPre(DocLink *) {}
- void visitPost(DocLink *) {}
- void visitPre(DocRef *) {}
- void visitPost(DocRef *) {}
- void visitPre(DocSecRefItem *) {}
- void visitPost(DocSecRefItem *) {}
- void visitPre(DocSecRefList *) {}
- void visitPost(DocSecRefList *) {}
- void visitPre(DocParamSect *) {}
- void visitPost(DocParamSect *) {}
- void visitPre(DocParamList *) {}
- void visitPost(DocParamList *) {}
- void visitPre(DocXRefItem *) {}
- void visitPost(DocXRefItem *) {}
- void visitPre(DocInternalRef *) {}
- void visitPost(DocInternalRef *) {}
- void visitPre(DocText *) {}
- void visitPost(DocText *) {}
- void visitPre(DocHtmlBlockQuote *) {}
- void visitPost(DocHtmlBlockQuote *) {}
- void visitPre(DocVhdlFlow *) {}
- void visitPost(DocVhdlFlow *) {}
- void visitPre(DocParBlock *) {}
- void visitPost(DocParBlock *) {}
+ template<class T>
+ void visitChildren(const T &t)
+ {
+ for (const auto &child : t.children())
+ {
+ std::visit(*this, child);
+ }
+ }
+ void operator()(const DocAutoList &l) { visitChildren(l); }
+ void operator()(const DocAutoListItem &li) { visitChildren(li); }
+ void operator()(const DocPara &p) { visitChildren(p); }
+ void operator()(const DocRoot &r) { visitChildren(r); }
+ void operator()(const DocSimpleSect &s) { visitChildren(s); }
+ void operator()(const DocTitle &t) { visitChildren(t); }
+ void operator()(const DocSimpleList &l) { visitChildren(l); }
+ void operator()(const DocSimpleListItem &) { }
+ void operator()(const DocSection &s) { visitChildren(s); }
+ void operator()(const DocHtmlList &l) { visitChildren(l); }
+ void operator()(const DocHtmlListItem &li) { visitChildren(li); }
+ void operator()(const DocHtmlDescList &dl) { visitChildren(dl); }
+ void operator()(const DocHtmlDescTitle &dt) { visitChildren(dt); }
+ void operator()(const DocHtmlDescData &dd) { visitChildren(dd); }
+ void operator()(const DocHtmlTable &t) { visitChildren(t); }
+ void operator()(const DocHtmlRow &r) { visitChildren(r); }
+ void operator()(const DocHtmlCell &c) { visitChildren(c); }
+ void operator()(const DocHtmlCaption &c) { visitChildren(c); }
+ void operator()(const DocInternal &i) { visitChildren(i); }
+ void operator()(const DocHRef &h) { visitChildren(h); }
+ void operator()(const DocHtmlHeader &h) { visitChildren(h); }
+ void operator()(const DocImage &i) { visitChildren(i); }
+ void operator()(const DocDotFile &df) { visitChildren(df); }
+ void operator()(const DocMscFile &df) { visitChildren(df); }
+ void operator()(const DocDiaFile &df) { visitChildren(df); }
+ void operator()(const DocLink &l) { visitChildren(l); }
+ void operator()(const DocRef &r) { visitChildren(r); }
+ void operator()(const DocSecRefItem &s) { visitChildren(s); }
+ void operator()(const DocSecRefList &l) { visitChildren(l); }
+ void operator()(const DocParamSect &s) { visitChildren(s); }
+ void operator()(const DocParamList &) { }
+ void operator()(const DocXRefItem &x) { visitChildren(x); }
+ void operator()(const DocInternalRef &r) { visitChildren(r); }
+ void operator()(const DocText &t) { visitChildren(t); }
+ void operator()(const DocHtmlBlockQuote &q) { visitChildren(q); }
+ void operator()(const DocVhdlFlow &) { }
+ void operator()(const DocParBlock &pb) { visitChildren(pb); }
private:
#include <cstdint>
#include <cstdio>
#include <fstream>
+#include <type_traits>
#include "qcstring.h"
m_buffer+=c;
return static_cast<TextStream&>(*this);
}
+ /** Adds an unsigned character to the stream */
+ TextStream &operator<<( unsigned char c)
+ {
+ m_buffer+=c;
+ return static_cast<TextStream&>(*this);
+ }
+
+ /** Adds an unsigned character string to the stream */
+ TextStream &operator<<( unsigned char *s)
+ {
+ if (s)
+ {
+ unsigned char *p = s;
+ while(*p)
+ {
+ m_buffer+=*p;
+ p++;
+ }
+ }
+ return static_cast<TextStream&>(*this);
+ }
/** Adds a C-style string to the stream */
TextStream &operator<<( const char *s)
return static_cast<TextStream&>(*this);
}
+ /** Adds a size_t integer to the stream.
+ * We use SFINAE to avoid a compiler error in case size_t already matches the 'unsigned int' overload.
+ */
+ template<typename T,
+ typename std::enable_if<std::is_same<T,size_t>::value,T>::type* = nullptr
+ >
+ TextStream &operator<<( T i)
+ {
+ output_int32(static_cast<uint>(i),false);
+ return static_cast<TextStream&>(*this);
+ }
+
/** Adds a float to the stream */
TextStream &operator<<( float f)
{
- output_double((double)f);
+ output_double(static_cast<double>(f));
return static_cast<TextStream&>(*this);
}
*p = '\0';
if ( neg )
{
- n = (uint32_t)(-(int32_t)n);
+ n = static_cast<uint32_t>(-static_cast<int32_t>(n));
}
- do { *--p = ((char)(n%10)) + '0'; n /= 10; } while ( n );
+ do { *--p = (static_cast<char>(n%10)) + '0'; n /= 10; } while ( n );
if ( neg ) *--p = '-';
m_buffer+=p;
}
* It is implemented by the adapter classes.
*/
virtual QCString updateNeededMessage() { return QCString(); }
- virtual ~Translator() {}
+ virtual ~Translator() = default;
// Please, have a look at comments inside the translator_en.h file
// to learn the meaning of the following methods. The translator_en.h
}
virtual QCString trISOLang() = 0;
+ /** language codes for Html help
+ 0x402 Bulgarian
+ 0x405 Czech
+ 0x406 Danish
+ 0x413 Dutch
+ 0xC09 English (Australia)
+ 0x809 English (Britain)
+ 0x1009 English (Canada)
+ 0x1809 English (Ireland)
+ 0x1409 English (New Zealand)
+ 0x1C09 English (South Africa)
+ 0x409 English (United States)
+ 0x40B Finnish
+ 0x40C French
+ 0x407 German
+ 0x408 Greece
+ 0x439 Hindi
+ 0x40E Hungarian
+ 0x410 Italian
+ 0x814 Norwegian
+ 0x415 Polish
+ 0x816 Portuguese(Portugal)
+ 0x416 Portuguese(Brazil)
+ 0x419 Russian
+ 0x80A Spanish(Mexico)
+ 0xC0A Spanish(Modern Sort)
+ 0x40A Spanish(Traditional Sort)
+ 0x41D Swedish
+ 0x41F Turkey
+ 0x411 Japanese
+ 0x412 Korean
+ 0x804 Chinese (PRC)
+ 0x404 Chinese (Taiwan)
+
+ New LCIDs:
+ 0x421 Indonesian
+ 0x41A Croatian
+ 0x418 Romanian
+ 0x424 Slovenian
+ 0x41B Slovak
+ 0x422 Ukrainian
+ 0x81A Serbian (Serbia, Latin)
+ 0x403 Catalan
+ 0x426 Latvian
+ 0x427 Lithuanian
+ 0x436 Afrikaans
+ 0x42A Vietnamese
+ 0x429 Persian (Iran)
+ 0xC01 Arabic (Egypt) - I don't know which version of arabic is used inside translator_ar.h ,
+ so I have chosen Egypt at random
+
+ Code for Esperanto should be as shown below but the htmlhelp compiler 1.3 does not support this
+ (and no newer version is available).
+ 0x48f Esperanto
+ So do a fallback to the default language
+ 0x409 English (United States)
+
+
+ 0xC1A Serbian (Serbia, Cyrillic)
+
+ */
+ virtual QCString getLanguageString() = 0;
+
+ /**
+ * add punctuation at the end of a brief description when needed and supported by the language
+ */
+ virtual bool needsPunctuation() { return true; }
+
// --- Language translation methods -------------------
virtual QCString trRelatedFunctions() = 0;
virtual QCString trClassHierarchy() = 0;
virtual QCString trCompoundList() = 0;
virtual QCString trFileList() = 0;
- //virtual QCString trHeaderFiles() = 0;
virtual QCString trCompoundMembers() = 0;
virtual QCString trFileMembers() = 0;
virtual QCString trRelatedPages() = 0;
virtual QCString trCompoundListDescription() = 0;
virtual QCString trCompoundMembersDescription(bool extractAll) = 0;
virtual QCString trFileMembersDescription(bool extractAll) = 0;
- //virtual QCString trHeaderFilesDescription() = 0;
virtual QCString trExamplesDescription() = 0;
virtual QCString trRelatedPagesDescription() = 0;
virtual QCString trModulesDescription() = 0;
- //virtual QCString trNoDescriptionAvailable() = 0;
// index titles (the project name is prepended for these)
virtual QCString trClassDocumentation() = 0;
virtual QCString trFileDocumentation() = 0;
virtual QCString trExampleDocumentation() = 0;
- virtual QCString trPageDocumentation() = 0;
virtual QCString trReferenceManual() = 0;
virtual QCString trDefines() = 0;
- //virtual QCString trFuncProtos() = 0;
virtual QCString trTypedefs() = 0;
virtual QCString trEnumerations() = 0;
virtual QCString trFunctions() = 0;
virtual QCString trVariables() = 0;
virtual QCString trEnumerationValues() = 0;
virtual QCString trDefineDocumentation() = 0;
- //virtual QCString trFunctionPrototypeDocumentation() = 0;
virtual QCString trTypedefDocumentation() = 0;
virtual QCString trEnumerationTypeDocumentation() = 0;
virtual QCString trFunctionDocumentation() = 0;
virtual QCString trVariableDocumentation() = 0;
virtual QCString trCompounds() = 0;
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName) = 0;
- //virtual QCString trWrittenBy() = 0;
virtual QCString trClassDiagram(const QCString &clName) = 0;
- virtual QCString trForInternalUseOnly() = 0;
- //virtual QCString trReimplementedForInternalReasons() = 0;
virtual QCString trWarning() = 0;
- //virtual QCString trBugsAndLimitations() = 0;
virtual QCString trVersion() = 0;
virtual QCString trDate() = 0;
virtual QCString trReturns() = 0;
virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,
bool single) = 0;
- //virtual QCString trAlphabeticalList() = 0;
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990901
// new since 0.49-991003
//////////////////////////////////////////////////////////////////////////
- //virtual QCString trSources() = 0;
virtual QCString trDefinedAtLineInSourceFile() = 0;
virtual QCString trDefinedInSourceFile() = 0;
virtual QCString trTestList() = 0;
//////////////////////////////////////////////////////////////////////////
-// new since 1.2.1
-//////////////////////////////////////////////////////////////////////////
-
- //virtual QCString trDCOPMethods() = 0;
-
-//////////////////////////////////////////////////////////////////////////
// new since 1.2.2
//////////////////////////////////////////////////////////////////////////
// new since 1.2.4
//////////////////////////////////////////////////////////////////////////
- //virtual QCString trInterfaces() = 0;
virtual QCString trClasses() = 0;
virtual QCString trPackage(const QCString &name) = 0;
- virtual QCString trPackageList() = 0;
virtual QCString trPackageListDescription() = 0;
virtual QCString trPackages() = 0;
- //virtual QCString trPackageDocumentation() = 0;
virtual QCString trDefineValue() = 0;
//////////////////////////////////////////////////////////////////////////
virtual QCString trGroup(bool first_capital, bool singular) = 0;
virtual QCString trPage(bool first_capital, bool singular) = 0;
virtual QCString trMember(bool first_capital, bool singular) = 0;
- //virtual QCString trField(bool first_capital, bool singular) = 0;
virtual QCString trGlobal(bool first_capital, bool singular) = 0;
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
virtual QCString trPackageTypes() = 0;
+ virtual QCString trPackageFunctions() = 0;
virtual QCString trPackageMembers() = 0;
- virtual QCString trStaticPackageMembers() = 0;
+ virtual QCString trStaticPackageFunctions() = 0;
virtual QCString trPackageAttribs() = 0;
virtual QCString trStaticPackageAttribs() = 0;
// new since 1.3.3
//////////////////////////////////////////////////////////////////////////
- //virtual QCString trSearchForIndex() = 0;
virtual QCString trSearchResultsTitle() = 0;
virtual QCString trSearchResults(int numDocuments) = 0;
virtual QCString trSearchMatches() = 0;
virtual QCString trDirIndex() = 0;
virtual QCString trDirDocumentation() = 0;
virtual QCString trDirectories() = 0;
- virtual QCString trDirDescription() = 0;
virtual QCString trDirReference(const QCString &dirName) = 0;
virtual QCString trDir(bool first_capital, bool singular) = 0;
// new since 1.6.3
//////////////////////////////////////////////////////////////////////////
- //virtual QCString trDirDependency(const QCString &name) = 0;
virtual QCString trFileIn(const QCString &name) = 0;
virtual QCString trIncludesFileIn(const QCString &name) = 0;
virtual QCString trDateTime(int year,int month,int day,int dayOfWeek,
virtual QCString trConceptDocumentation() = 0;
virtual QCString trConceptListDescription(bool extractAll) = 0;
virtual QCString trConceptDefinition() = 0;
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.9.4
+//////////////////////////////////////////////////////////////////////////
+ virtual QCString trPackageList() = 0;
};
#endif
class TranslatorAdapterBase : public Translator
{
protected:
- virtual ~TranslatorAdapterBase() {}
TranslatorEnglish english;
/*! An auxiliary inline method used by the updateNeededMessage()
};
-class TranslatorAdapter_1_9_2 : public TranslatorAdapterBase
+class TranslatorAdapter_1_9_4 : public TranslatorAdapterBase
+{
+ public:
+ virtual QCString updateNeededMessage()
+ { return createUpdateNeededMessage(idLanguage(),"release 1.9.4"); }
+
+ virtual QCString trPackageList()
+ { return english.trPackageList(); }
+};
+
+class TranslatorAdapter_1_9_2 : public TranslatorAdapter_1_9_4
{
public:
virtual QCString updateNeededMessage()
}\r
virtual QCString trISOLang()\r
{ return "hy"; }\r
+ virtual QCString getLanguageString()\r
+ {\r
+ return "0x42b Armenian";\r
+ }\r
\r
// --- Language translation methods -------------------\r
\r
*/\r
virtual QCString trGeneratedAutomatically(const QCString &s)\r
{ QCString result="Ավտոմատ ստեղծված է ելքային կոդից, Doxygen-ի միջոցով, ";\r
- if (!s.isEmpty()) result+=s+(QCString)" համար:";\r
+ if (!s.isEmpty()) result+=s+" համար:";\r
return result;\r
}\r
\r
{\r
return "Տվյալների կառուցվածքներ";\r
}\r
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))\r
+ {\r
+ return trDesignUnitDocumentation();\r
+ }\r
else\r
{\r
return "Դասեր";\r
virtual QCString trExampleDocumentation()\r
{ return "Օրինակներ"; }\r
\r
- /*! This is used in LaTeX as the title of the chapter containing\r
- * the documentation of all related pages.\r
- */\r
- virtual QCString trPageDocumentation()\r
- { return "Էջեր"; }\r
-\r
/*! This is used in LaTeX as the title of the document */\r
virtual QCString trReferenceManual()\r
{ return "Հղումների ձեռնարկ"; }\r
*/\r
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)\r
{\r
- QCString result=(QCString)"Ստեղծվել է "+date;\r
- if (!projName.isEmpty()) result+=projName+QCString(" -ի համար,");\r
- result+=(QCString)" հետևյալ համակարգով.";\r
+ QCString result=QCString("Ստեղծվել է ")+date;\r
+ if (!projName.isEmpty()) result+=projName+" -ի համար,";\r
+ result+=" հետևյալ համակարգով.";\r
return result;\r
}\r
\r
return clName+QCString(" -ի ժառանգման գծագիրը.");\r
}\r
\r
- /*! this text is generated when the \\internal command is used. */\r
- virtual QCString trForInternalUseOnly()\r
- { return "Միայն ներքին օգտագործման համար"; }\r
-\r
/*! this text is generated when the \\warning command is used. */\r
virtual QCString trWarning()\r
{ return "Զգուշացում"; }\r
ClassDef::CompoundType compType,\r
bool isTemplate)\r
{\r
- QCString result=(QCString)clName;\r
+ QCString result=clName;\r
if (isTemplate)\r
{\r
switch(compType)\r
virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,\r
bool single)\r
{\r
- QCString result = (QCString)"Այս ";\r
+ QCString result = "Այս ";\r
switch(compType)\r
{\r
case ClassDef::Class: result+="դասի"; break;\r
/*! this text is put before a collaboration diagram */\r
virtual QCString trCollaborationDiagram(const QCString &clName)\r
{\r
- return (QCString)clName+"-ի համագործակցությունների գծագիր.";\r
+ return clName+"-ի համագործակցությունների գծագիր.";\r
}\r
/*! this text is put before an include dependency graph */\r
virtual QCString trInclDepGraph(const QCString &fName)\r
{\r
- return (QCString)fName+"-ի ներառումների կախվածությունների գծագիր.";\r
+ return fName+"-ի ներառումների կախվածությունների գծագիր.";\r
}\r
/*! header that is put before the list of constructor/destructors. */\r
virtual QCString trConstructorDocumentation()\r
/*! Used as the title of a Java package */\r
virtual QCString trPackage(const QCString &name)\r
{\r
- return (QCString)"Փաթեթ "+name;\r
- }\r
- /*! Title of the package index page */\r
- virtual QCString trPackageList()\r
- {\r
- return "Փաթեթների ցուցակ";\r
+ return "Փաթեթ "+name;\r
}\r
/*! The description of the package index page */\r
virtual QCString trPackageListDescription()\r
/*! Used as a heading for a list of Java class functions with package\r
* scope.\r
*/\r
- virtual QCString trPackageMembers()\r
+ virtual QCString trPackageFunctions()\r
{\r
return "Փաթեթի ֆունկցիաներ";\r
}\r
+ virtual QCString trPackageMembers()\r
+ {\r
+ return "Փաթեթի անդամներ";\r
+ }\r
/*! Used as a heading for a list of static Java class functions with\r
* package scope.\r
*/\r
- virtual QCString trStaticPackageMembers()\r
+ virtual QCString trStaticPackageFunctions()\r
{\r
return "Փաթեթի ստատիկ ֆունկցիաներ";\r
}\r
virtual QCString trDirectories()\r
{ return "Ֆայլադրաններ"; }\r
\r
- /*! This returns a sentences that introduces the directory hierarchy.\r
- * and the fact that it is sorted alphabetically per level\r
- */\r
- virtual QCString trDirDescription()\r
- { return "Այս ֆայլադարանների հիերարխիան կարգավորված է կոպտորեն, "\r
- "բայց ոչ ամբողջապես, այբբենական կարգով.";\r
- }\r
-\r
/*! This returns the title of a directory page. The name of the\r
* directory is passed via \a dirName.\r
*/\r
ClassDef::CompoundType compType,\r
bool isTemplate)\r
{\r
- QCString result=(QCString)clName;\r
+ QCString result=clName;\r
if (!isTemplate)\r
{\r
switch(compType)\r
bool single)\r
{ // here s is one of " Module", " Struct" or " Union"\r
// single is true implies a single file\r
- QCString result=(QCString)"Այս ";\r
+ QCString result="Այս ";\r
switch(compType)\r
{\r
case ClassDef::Class: result+="մոդուլի"; break;\r
*/\r
virtual QCString trFileIn(const QCString &name)\r
{\r
- return (QCString)"Ֆայլը " + name + " ում";\r
+ return "Ֆայլը " + name + " ում";\r
}\r
\r
/*! when clicking a directory dependency label, a page with a\r
*/\r
virtual QCString trIncludesFileIn(const QCString &name)\r
{\r
- return (QCString)"Ներառում է ֆայլը " + name + " ում";\r
+ return "Ներառում է ֆայլը " + name + " ում";\r
}\r
\r
/** Compiles a date string.\r
class TranslatorArabic : public TranslatorAdapter_1_4_6
{
- protected:
- friend class TranslatorAdapterBase;
- virtual ~TranslatorArabic() {}
-
public:
// --- Language control methods -------------------
virtual QCString trISOLang()
{ return "ar-EG"; }
+ virtual QCString getLanguageString()
+ {
+ return "0xC01 Arabic (Egypt)";
+ }
// --- Language translation methods -------------------
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="تم تكوينها آليا بواسطة Doxygen";
- if (!s.isEmpty()) result+=(QCString)" لـ "+s;
+ if (!s.isEmpty()) result+=" لـ "+s;
result+=" من ملفات المصدر.";
return result;
}
virtual QCString trFileList()
{ return "قائمة الملفات"; }
- /*! This is put above each page as a link to the list of all verbatim headers */
- virtual QCString trHeaderFiles()
- { return "الملفات الرأسية"; }
-
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
return result;
}
- /*! This is an introduction to the page with the list of all header files. */
- virtual QCString trHeaderFilesDescription()
- { return "Here are the header files that make up the API:"; }
-
/*! This is an introduction to the page with the list of all examples */
virtual QCString trExamplesDescription()
{ return "هذه قائمة بكل الأمثلة:"; }
virtual QCString trModulesDescription()
{ return "هذه قائمة بكل المكونات:"; }
- /*! This sentences is used in the annotated class/file lists if no brief
- * description is given.
- */
- virtual QCString trNoDescriptionAvailable()
- { return "لا يوجد وصف متاح"; }
-
- // index titles (the project name is prepended for these)
-
/*! This is used in HTML as the title of index.html. */
virtual QCString trDocumentation()
{
return "فهرس هيكل البيانات";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "فهرس الفئة";
virtual QCString trExampleDocumentation()
{ return "توثيق الأمثلة"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "توثيق الصفحات"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "الكتيب المرجعي"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Generated on "+date;
- if (!projName.isEmpty()) result+=(QCString)" for "+projName;
- result+=(QCString)" by";
+ QCString result="Generated on "+date;
+ if (!projName.isEmpty()) result+=" for "+projName;
+ result+=" by";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"Inheritance diagram for "+clName+":";
+ return "Inheritance diagram for "+clName+":";
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "للاستخدام الداخلي فقط."; }
-
- /*! this text is generated when the \\reimp command is used. */
- virtual QCString trReimplementedForInternalReasons()
- { return "Reimplemented for internal reasons; the API is not affected."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "تنبيه"; }
- /*! this text is generated when the \\bug command is used. */
- virtual QCString trBugsAndLimitations()
- { return "Bugs and limitations"; }
-
/*! this text is generated when the \\version command is used. */
virtual QCString trVersion()
{ return "إصدارة"; }
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" Class"; break;
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"توثيق ";
+ QCString result="توثيق ";
switch(compType)
{
case ClassDef::Class: result+="هذه الفئة"; break;
// new since 0.49-991003
//////////////////////////////////////////////////////////////////////////
- virtual QCString trSources()
- {
- return "مصادر";
- }
virtual QCString trDefinedAtLineInSourceFile()
{
return "Definition at line @0 of file @1.";
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"رسم التعاون لـ "+clName+":";
+ return "رسم التعاون لـ "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"رسم اعتمادية التضمين لـ "+fName+":";
+ return "رسم اعتمادية التضمين لـ "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"حزمة "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "قائمة الحزم";
+ return "حزمة "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
{
return "حزم";
}
- /*! Used as a chapter title for Latex & RTF output */
- virtual QCString trPackageDocumentation()
- {
- return "توثيق الحزم";
- }
/*! Text shown before a multi-line define */
virtual QCString trDefineValue()
{
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trField(bool /*first_capital*/, bool singular)
- {
- QCString result("حقل");
- if (!singular) result="حقول";
- return result;
- }
-
- /*! This is used for translation of the word that will possibly
- * be followed by a single name or by a list of names
- * of the category.
- */
virtual QCString trGlobal(bool /*first_capital*/, bool singular)
{
QCString result("عام");
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "دوال الحزمة";
}
+ virtual QCString trPackageMembers()
+ {
+ return "أعضاء الحزمة";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "دوال ساكنة للحزمة";
}
virtual QCString trDirectories()
{ return "الأدلة"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "هذا الشكل الهرمي للأدلة تم ترتيبه أبجديا بصورة تقريبية، "
- "وليس ترتيبا أبجديا كاملا:";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
--- /dev/null
+/******************************************************************************
+ *
+ *
+ *
+ * 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
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#ifndef TRANSLATOR_BG_H
+#define TRANSLATOR_BG_H
+
+/*!
+ When defining a translator class for the new language, follow
+ the description in the documentation. One of the steps says
+ that you should copy the translator_en.h (this) file to your
+ translator_xx.h new file. Your new language should use the
+ Translator class as the base class. This means that you need to
+ implement exactly the same (pure virtual) methods as the
+ TranslatorEnglish does. Because of this, it is a good idea to
+ start with the copy of TranslatorEnglish and replace the strings
+ one by one.
+
+ It is not necessary to include "translator.h" or
+ "translator_adapter.h" here. The files are included in the
+ language.cpp correctly. Not including any of the mentioned
+ files frees the maintainer from thinking about whether the
+ first, the second, or both files should be included or not, and
+ why. This holds namely for localized translators because their
+ base class is changed occasionally to adapter classes when the
+ Translator class changes the interface, or back to the
+ Translator class (by the local maintainer) when the localized
+ translator is made up-to-date again.
+*/
+
+/*
+ * Kiril Kirilov released released Feb 28, 2022
+ *
+ */
+class TranslatorBulgarian : public TranslatorAdapter_1_9_4
+{
+ public:
+
+ // --- Language control methods -------------------
+
+ /*! Used for identification of the language. The identification
+ * should not be translated. It should be replaced by the name
+ * of the language in English using lower-case characters only
+ * (e.g. "czech", "japanese", "russian", etc.). It should be equal to
+ * the identification used in language.cpp.
+ */
+ virtual QCString idLanguage()
+ { return "bulgarian"; }
+
+ /*! Used to get the LaTeX command(s) for the language support.
+ * This method should return string with commands that switch
+ * LaTeX to the desired language. For example
+ * <pre>"\\usepackage[german]{babel}\n"
+ * </pre>
+ * or
+ * <pre>"\\usepackage{polski}\n"
+ * "\\usepackage[latin2]{inputenc}\n"
+ * "\\usepackage[T1]{fontenc}\n"
+ * </pre>
+ *
+ * The English LaTeX does not use such commands. Because of this
+ * the empty string is returned in this implementation.
+ */
+ virtual QCString latexLanguageSupportCommand()
+ {
+ { return "\\usepackage[T2A]{fontenc}\n\\usepackage[bulgarian]{babel}\n"; }
+ }
+
+ virtual QCString trISOLang()
+ {
+ return "bg";
+ }
+ virtual QCString getLanguageString()
+ {
+ return "0x402 bulgarian";
+ }
+
+ // --- Language translation methods -------------------
+
+ /*! used in the compound documentation before a list of related functions. */
+ virtual QCString trRelatedFunctions()
+ { return "Функции, свързани с класа"; }
+
+ /*! subscript for the related functions. */
+ virtual QCString trRelatedSubscript()
+ { return "(Имайте предвид, че тези функции не са членове на класа.)"; }
+
+ /*! header that is put before the detailed description of files, classes and namespaces. */
+ virtual QCString trDetailedDescription()
+ { return "Подробно описание"; }
+
+ /*! header that is put before the list of typedefs. */
+ virtual QCString trMemberTypedefDocumentation()
+ { return "Членове Дефинирани типове Документация"; }
+
+ /*! header that is put before the list of enumerations. */
+ virtual QCString trMemberEnumerationDocumentation()
+ { return "Членове Изброявания Документация"; }
+
+ /*! header that is put before the list of member functions. */
+ virtual QCString trMemberFunctionDocumentation()
+ { return "Членове Функции(методи) Документация"; }
+
+ /*! header that is put before the list of member attributes. */
+ virtual QCString trMemberDataDocumentation()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ {
+ return "Полета Документация";
+ }
+ else
+ {
+ return "Член данни Документация";
+ }
+ }
+
+ /*! this is the text of a link put after brief descriptions. */
+ virtual QCString trMore()
+ { return "Допълнително..."; }
+
+ /*! put in the class documentation */
+ virtual QCString trListOfAllMembers()
+ { return "Списък на всички членове"; }
+
+ /*! used as the title of the "list of all members" page of a class */
+ virtual QCString trMemberList()
+ { return "Членове Списък"; }
+
+ /*! this is the first part of a sentence that is followed by a class name */
+ virtual QCString trThisIsTheListOfAllMembers()
+ { return "Това е пълен списък с членове за "; }
+
+ /*! this is the remainder of the sentence after the class name */
+ virtual QCString trIncludingInheritedMembers()
+ { return ", включително всички наследени членове."; }
+
+ /*! this is put at the author sections at the bottom of man pages.
+ * parameter s is name of the project name.
+ */
+ virtual QCString trGeneratedAutomatically(const QCString &s)
+ { QCString result="Генерирано автоматично от Doxygen";
+ if (!s.isEmpty()) result+=(QCString)" за "+s;
+ result+=" от изходния код.";
+ return result;
+ }
+
+ /*! put after an enum name in the list of all members */
+ virtual QCString trEnumName()
+ { return "изброяване"; }
+
+ /*! put after an enum value in the list of all members */
+ virtual QCString trEnumValue()
+ { return "елементи на изброяване"; }
+
+ /*! put after an undocumented member in the list of all members */
+ virtual QCString trDefinedIn()
+ { return "дефинирани в"; }
+
+ // quick reference sections
+
+ /*! This is put above each page as a link to the list of all groups of
+ * compounds or files (see the \\group command).
+ */
+ virtual QCString trModules()
+ { return "Групи"; }
+
+ /*! This is put above each page as a link to the class hierarchy */
+ virtual QCString trClassHierarchy()
+ { return "Класове Йерархия"; }
+
+ /*! This is put above each page as a link to the list of annotated classes */
+ virtual QCString trCompoundList()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ {
+ return "Структури от данни";
+ }
+ else
+ {
+ return "Класове Списък";
+ }
+ }
+
+ /*! This is put above each page as a link to the list of documented files */
+ virtual QCString trFileList()
+ { return "Файлове Списък"; }
+
+ /*! This is put above each page as a link to all members of compounds. */
+ virtual QCString trCompoundMembers()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ {
+ return "Член Полета с данни";
+ }
+ else
+ {
+ return "Членове на класа";
+ }
+ }
+
+ /*! This is put above each page as a link to all members of files. */
+ virtual QCString trFileMembers()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ {
+ return "Глобални";
+ }
+ else
+ {
+ return "Файлове Членове";
+ }
+ }
+
+ /*! This is put above each page as a link to all related pages. */
+ virtual QCString trRelatedPages()
+ { return "Свързани страници"; }
+
+ /*! This is put above each page as a link to all examples. */
+ virtual QCString trExamples()
+ { return "Примери"; }
+
+ /*! This is put above each page as a link to the search engine. */
+ virtual QCString trSearch()
+ { return "Търсене"; }
+
+ /*! This is an introduction to the class hierarchy. */
+ virtual QCString trClassHierarchyDescription()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return "Йерархичен списък на всички обекти:";
+ }
+ else
+ {
+ return "Този списък с наследявания е сортиран, "
+ "но не изцяло по азбучен ред:";
+ }
+ }
+
+ /*! This is an introduction to the list with all files. */
+ virtual QCString trFileListDescription(bool extractAll)
+ {
+ QCString result="Пълен списък с ";
+ if (!extractAll) result+="документирани ";
+ result+="файлове с кратко описание:";
+ return result;
+ }
+
+ /*! This is an introduction to the annotated compound list. */
+ virtual QCString trCompoundListDescription()
+ {
+
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ {
+ return "Структури от данни с кратко описание:";
+ }
+ else if (Config_getBool(OPTIMIZE_OUTPUT_SLICE))
+ {
+ return "Класове с кратко описание:";
+ }
+ else
+ {
+ return "Класове, структури, "
+ "обединения и интерфейси с кратко описание:";
+ }
+ }
+
+ /*! This is an introduction to the page with all class members. */
+ virtual QCString trCompoundMembersDescription(bool extractAll)
+ {
+ QCString result="Списък на всички ";
+ if (!extractAll)
+ {
+ result+="документирани ";
+ }
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ {
+ result+="членове поле, структура и обединение";
+ }
+ else
+ {
+ result+="членове на класа";
+ }
+ result+=" с връзки към ";
+ if (!extractAll)
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ {
+ result+="документацията за структура/обединение за всяко поле:";
+ }
+ else
+ {
+ result+="документацията на класа за всеки член:";
+ }
+ }
+ else
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ {
+ result+="структурите/обединенията, към които принадлежат:";
+ }
+ else
+ {
+ result+="класовете, към които принадлежат:";
+ }
+ }
+ return result;
+ }
+
+ /*! This is an introduction to the page with all file members. */
+ virtual QCString trFileMembersDescription(bool extractAll)
+ {
+ QCString result="Списък на всички ";
+ if (!extractAll) result+="документирани ";
+
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ {
+ result+="функции, променливи, макроопределения, изброявания и дефиниции на типове";
+ }
+ else
+ {
+ result+="членове на файлове";
+ }
+ result+=" с връзки към ";
+ if (extractAll)
+ result+="файловете,към които принадлежат:";
+ else
+ result+="документацията:";
+ return result;
+ }
+
+ /*! This is an introduction to the page with the list of all examples */
+ virtual QCString trExamplesDescription()
+ { return "Списък на всички примери:"; }
+
+ /*! This is an introduction to the page with the list of related pages */
+ virtual QCString trRelatedPagesDescription()
+ { return "Списък на всички свързани страници с документация:"; }
+
+ /*! This is an introduction to the page with the list of class/file groups */
+ virtual QCString trModulesDescription()
+ { return "Списък на всички групи:"; }
+
+ // index titles (the project name is prepended for these)
+
+ /*! This is used in HTML as the title of index.html. */
+ virtual QCString trDocumentation()
+ { return "Документация"; }
+
+ /*! This is used in LaTeX as the title of the chapter with the
+ * index of all groups.
+ */
+ virtual QCString trModuleIndex()
+ { return "Групи Указател"; }
+
+ /*! This is used in LaTeX as the title of the chapter with the
+ * class hierarchy.
+ */
+ virtual QCString trHierarchicalIndex()
+ { return "Класове Йерархичен указател"; }
+
+ /*! This is used in LaTeX as the title of the chapter with the
+ * annotated compound index.
+ */
+ virtual QCString trCompoundIndex()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ {
+ return "Структури от данни Указател";
+ }
+ else
+ {
+ return "Класове Указател";
+ }
+ }
+
+ /*! This is used in LaTeX as the title of the chapter with the
+ * list of all files.
+ */
+ virtual QCString trFileIndex()
+ { return "Файлове Списък"; }
+
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all groups.
+ */
+ virtual QCString trModuleDocumentation()
+ { return "Групи Документация"; }
+
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all classes, structs and unions.
+ */
+ virtual QCString trClassDocumentation()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ {
+ return "Структури от данни Документация";
+ }
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
+ else
+ {
+ return "Класове Документация";
+ }
+ }
+
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all files.
+ */
+ virtual QCString trFileDocumentation()
+ { return "Файлове Документация"; }
+
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all examples.
+ */
+ virtual QCString trExampleDocumentation()
+ { return "Примери Документация"; }
+
+ /*! This is used in LaTeX as the title of the document */
+ virtual QCString trReferenceManual()
+ { return "Помощно ръководство"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of defines
+ */
+ virtual QCString trDefines()
+ { return "Макроси"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of typedefs
+ */
+ virtual QCString trTypedefs()
+ { return "Дефиниции на типове"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of enumerations
+ */
+ virtual QCString trEnumerations()
+ { return "Изброявания"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of (global) functions
+ */
+ virtual QCString trFunctions()
+ { return "Функции"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of (global) variables
+ */
+ virtual QCString trVariables()
+ { return "Променливи"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of (global) variables
+ */
+ virtual QCString trEnumerationValues()
+ { return "Елементи на изброяване"; }
+
+ /*! This is used in the documentation of a file before the list of
+ * documentation blocks for defines
+ */
+ virtual QCString trDefineDocumentation()
+ { return "Макро дефиниции Документация"; }
+
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for typedefs
+ */
+ virtual QCString trTypedefDocumentation()
+ { return "Дефинирани типове Документация"; }
+
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for enumeration types
+ */
+ virtual QCString trEnumerationTypeDocumentation()
+ { return "Изброени типове Документация"; }
+
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for functions
+ */
+ virtual QCString trFunctionDocumentation()
+ { return "Функции Документация"; }
+
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for variables
+ */
+ virtual QCString trVariableDocumentation()
+ { return "Променливи Документация"; }
+
+ /*! This is used in the documentation of a file/namespace/group before
+ * the list of links to documented compounds
+ */
+ virtual QCString trCompounds()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ {
+ return "Структури от данни";
+ }
+ else
+ {
+ return "Класове";
+ }
+ }
+
+ /*! This is used in the standard footer of each page and indicates when
+ * the page was generated
+ */
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
+ {
+ QCString result=(QCString)"Генерирано на "+date;
+ if (!projName.isEmpty()) result+=(QCString)" за "+projName;
+ result+=(QCString)" от";
+ return result;
+ }
+
+ /*! this text is put before a class diagram */
+ virtual QCString trClassDiagram(const QCString &clName)
+ {
+ return (QCString)"Диаграма на наследяване за "+clName+":";
+ }
+
+ /*! this text is generated when the \\warning command is used. */
+ virtual QCString trWarning()
+ { return "Предупреждение"; }
+
+ /*! this text is generated when the \\version command is used. */
+ virtual QCString trVersion()
+ { return "Версия"; }
+
+ /*! this text is generated when the \\date command is used. */
+ virtual QCString trDate()
+ { return "Дата"; }
+
+ /*! this text is generated when the \\return command is used. */
+ virtual QCString trReturns()
+ { return "Връща"; }
+
+ /*! this text is generated when the \\sa command is used. */
+ virtual QCString trSeeAlso()
+ { return "Виж също"; }
+
+ /*! this text is generated when the \\param command is used. */
+ virtual QCString trParameters()
+ { return "Аргументи"; }
+
+ /*! this text is generated when the \\exception command is used. */
+ virtual QCString trExceptions()
+ { return "Изключения"; }
+
+ /*! this text is used in the title page of a LaTeX document. */
+ virtual QCString trGeneratedBy()
+ { return "Генериран от"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990307
+//////////////////////////////////////////////////////////////////////////
+
+ /*! used as the title of page containing all the index of all namespaces. */
+ virtual QCString trNamespaceList()
+ { return "Именни пространства Списък "; }
+
+ /*! used as an introduction to the namespace list */
+ virtual QCString trNamespaceListDescription(bool extractAll)
+ {
+ QCString result="пълен списък с ";
+ if (!extractAll) result+="документирани ";
+ result+="именни пространства с кратко описание:";
+ return result;
+ }
+
+ /*! used in the class documentation as a header before the list of all
+ * friends of a class
+ */
+ virtual QCString trFriends()
+ { return "Приятели"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990405
+//////////////////////////////////////////////////////////////////////////
+
+ /*! used in the class documentation as a header before the list of all
+ * related classes
+ */
+ virtual QCString trRelatedFunctionDocumentation()
+ { return "Приятели и Свързани функции Документация"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990425
+//////////////////////////////////////////////////////////////////////////
+
+ /*! used as the title of the HTML page of a class/struct/union */
+ virtual QCString trCompoundReference(const QCString &clName,
+ ClassDef::CompoundType compType,
+ bool isTemplate)
+ {
+ QCString result=(QCString)clName;
+ switch(compType)
+ {
+ case ClassDef::Class: result+=" Клас"; break;
+ case ClassDef::Struct: result+=" Структура"; break;
+ case ClassDef::Union: result+=" Обединение"; break;
+ case ClassDef::Interface: result+=" Интерфейс"; break;
+ case ClassDef::Protocol: result+=" Протокол"; break;
+ case ClassDef::Category: result+=" Категория"; break;
+ case ClassDef::Exception: result+=" Изключение"; break;
+ default: break;
+ }
+ if (isTemplate) result+=" Шаблон";
+ result+=" Препратка";
+ return result;
+ }
+
+ /*! used as the title of the HTML page of a file */
+ virtual QCString trFileReference(const QCString &fileName)
+ {
+ QCString result=fileName;
+ result+=" Файл Справка";
+ return result;
+ }
+
+ /*! used as the title of the HTML page of a namespace */
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
+ {
+ QCString result=namespaceName;
+ result+=" Именно пространството Справка";
+ return result;
+ }
+
+ virtual QCString trPublicMembers()
+ { return "Общодостъпни членове функции"; }
+ virtual QCString trPublicSlots()
+ { return "Общодостъпни слотове"; }
+ virtual QCString trSignals()
+ { return "Сигнали"; }
+ virtual QCString trStaticPublicMembers()
+ { return "Статични общодостъпни членове функции"; }
+ virtual QCString trProtectedMembers()
+ { return "Защитени членове функции"; }
+ virtual QCString trProtectedSlots()
+ { return "Защитени слотове"; }
+ virtual QCString trStaticProtectedMembers()
+ { return "Статични защитени членове функции"; }
+ virtual QCString trPrivateMembers()
+ { return "Частни членове функции"; }
+ virtual QCString trPrivateSlots()
+ { return "Частни слотове"; }
+ virtual QCString trStaticPrivateMembers()
+ { return "Статични частни членове функции"; }
+
+ /*! this function is used to produce a comma-separated list of items.
+ * use generateMarker(i) to indicate where item i should be put.
+ */
+ virtual QCString trWriteList(int numEntries)
+ {
+ QCString result;
+ int i;
+ // the inherits list contain `numEntries' classes
+ for (i=0;i<numEntries;i++)
+ {
+ // use generateMarker to generate placeholders for the class links!
+ result+=generateMarker(i); // generate marker for entry i in the list
+ // (order is left to right)
+
+ if (i!=numEntries-1) // not the last entry, so we need a separator
+ {
+ if (i<numEntries-2) // not the fore last entry
+ result+=", ";
+ else // the fore last entry
+ result+=", и ";
+ }
+ }
+ return result;
+ }
+
+ /*! used in class documentation to produce a list of base classes,
+ * if class diagrams are disabled.
+ */
+ virtual QCString trInheritsList(int numEntries)
+ {
+ return "Базови класове "+trWriteList(numEntries)+".";
+ }
+
+ /*! used in class documentation to produce a list of super classes,
+ * if class diagrams are disabled.
+ */
+ virtual QCString trInheritedByList(int numEntries)
+ {
+ return "Производни класове "+trWriteList(numEntries)+".";
+ }
+
+ /*! used in member documentation blocks to produce a list of
+ * members that are hidden by this one.
+ */
+ virtual QCString trReimplementedFromList(int numEntries)
+ {
+ return "Заменя наследеният метод "+trWriteList(numEntries)+".";
+ }
+
+ /*! used in member documentation blocks to produce a list of
+ * all member that overwrite the implementation of this member.
+ */
+ virtual QCString trReimplementedInList(int numEntries)
+ {
+ return "Заменя в "+trWriteList(numEntries)+".";
+ }
+
+ /*! This is put above each page as a link to all members of namespaces. */
+ virtual QCString trNamespaceMembers()
+ { return "Членове Именни пространства";
+ }
+
+ /*! This is an introduction to the page with all namespace members */
+ virtual QCString trNamespaceMemberDescription(bool extractAll)
+ {
+ QCString result="Пълен списък с ";
+ if (!extractAll) result+="документирани ";
+ result+="членове именни пространства с връзки към ";
+ if (extractAll)
+ result+="документация за именно пространство за всеки член:";
+ else
+ result+="именните пространства към които принадлежат:";
+ return result;
+ }
+ /*! This is used in LaTeX as the title of the chapter with the
+ * index of all namespaces.
+ */
+ virtual QCString trNamespaceIndex()
+ { return "Именни пространства Указател"; }
+
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all namespaces.
+ */
+ virtual QCString trNamespaceDocumentation()
+ { return "Именни пространства Документация"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990522
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used in the documentation before the list of all
+ * namespaces in a file.
+ */
+ virtual QCString trNamespaces()
+ { return "Именни пространства"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990728
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is put at the bottom of a class documentation page and is
+ * followed by a list of files that were used to generate the page.
+ */
+ virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,
+ bool single)
+ { // single is true implies a single file
+ bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ QCString result=(QCString)"Документация за ";
+ switch(compType)
+ {
+ case ClassDef::Class: result+=vhdlOpt?"проектна единица":"клас"; break;
+ case ClassDef::Struct: result+="структура"; break;
+ case ClassDef::Union: result+="обединение"; break;
+ case ClassDef::Interface: result+="интерфейс"; break;
+ case ClassDef::Protocol: result+="протокол"; break;
+ case ClassDef::Category: result+="категория"; break;
+ case ClassDef::Exception: result+="изключение"; break;
+ default: break;
+ }
+ result+=" генериран от ";
+ if (single) result+="следният файл:"; else result+="следните файлове:";
+ return result;
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990901
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used as the heading text for the retval command. */
+ virtual QCString trReturnValues()
+ { return "Връщана стойност"; }
+
+ /*! This is in the (quick) index as a link to the main page (index.html)
+ */
+ virtual QCString trMainPage()
+ { return "Главна страница"; }
+
+ /*! This is used in references to page that are put in the LaTeX
+ * documentation. It should be an abbreviation of the word page.
+ */
+ virtual QCString trPageAbbreviation()
+ { return "стр."; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-991003
+//////////////////////////////////////////////////////////////////////////
+
+ virtual QCString trDefinedAtLineInSourceFile()
+ {
+ return "Виж дефиницията във файла @1 ред @0.";
+ }
+ virtual QCString trDefinedInSourceFile()
+ {
+ return "Виж дефиницията във файла @0.";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-991205
+//////////////////////////////////////////////////////////////////////////
+
+ virtual QCString trDeprecated()
+ {
+ return "Остарело";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.0.0
+//////////////////////////////////////////////////////////////////////////
+
+ /*! this text is put before a collaboration diagram */
+ virtual QCString trCollaborationDiagram(const QCString &clName)
+ {
+ return (QCString)"Граф на зависимости за класа "+clName+":";
+ }
+ /*! this text is put before an include dependency graph */
+ virtual QCString trInclDepGraph(const QCString &fName)
+ {
+ return (QCString)"Граф на включените заглавни файлове за "+fName+":";
+ }
+ /*! header that is put before the list of constructor/destructors. */
+ virtual QCString trConstructorDocumentation()
+ {
+ return "Конструктор & Деструктор Документация";
+ }
+ /*! Used in the file documentation to point to the corresponding sources. */
+ virtual QCString trGotoSourceCode()
+ {
+ return "Вижте изходният код на този файл.";
+ }
+ /*! Used in the file sources to point to the corresponding documentation. */
+ virtual QCString trGotoDocumentation()
+ {
+ return "Вижте документацията за този файл.";
+ }
+ /*! Text for the \\pre command */
+ virtual QCString trPrecondition()
+ {
+ return "Предпоставка";
+ }
+ /*! Text for the \\post command */
+ virtual QCString trPostcondition()
+ {
+ return "Следусловие";
+ }
+ /*! Text for the \\invariant command */
+ virtual QCString trInvariant()
+ {
+ return "Инвариант";
+ }
+ /*! Text shown before a multi-line variable/enum initialization */
+ virtual QCString trInitialValue()
+ {
+ return "Първоначална стойност:";
+ }
+ /*! Text used the source code in the file index */
+ virtual QCString trCode()
+ {
+ return "изходен код";
+ }
+ virtual QCString trGraphicalHierarchy()
+ {
+ return "Йерархия на класовете Графичен вид";
+ }
+ virtual QCString trGotoGraphicalHierarchy()
+ {
+ return "Виж графичен вид на йерархията на класовете";
+ }
+ virtual QCString trGotoTextualHierarchy()
+ {
+ return "Виж текстови вид на йерархията на класовете";
+ }
+ virtual QCString trPageIndex()
+ {
+ return "Тематични описания Указател";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.1.0
+//////////////////////////////////////////////////////////////////////////
+
+ virtual QCString trNote()
+ {
+ return "Пояснение";
+ }
+ virtual QCString trPublicTypes()
+ {
+ return "Общодостъпни типове";
+ }
+ virtual QCString trPublicAttribs()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ {
+ return "Полета данни";
+ }
+ else
+ {
+ return "Общодостъпни атрибути";
+ }
+ }
+ virtual QCString trStaticPublicAttribs()
+ {
+ return "Статични общодостъпни атрибути";
+ }
+ virtual QCString trProtectedTypes()
+ {
+ return "Защитени типове";
+ }
+ virtual QCString trProtectedAttribs()
+ {
+ return "Защитени атрибути";
+ }
+ virtual QCString trStaticProtectedAttribs()
+ {
+ return "Статични защитени атрибути";
+ }
+ virtual QCString trPrivateTypes()
+ {
+ return "Частни типове";
+ }
+ virtual QCString trPrivateAttribs()
+ {
+ return "Частни атрибути";
+ }
+ virtual QCString trStaticPrivateAttribs()
+ {
+ return "Статични частни атрибути";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.1.3
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a marker that is put before a \\todo item */
+ virtual QCString trTodo()
+ {
+ return "Елементи на списъка със задачи";
+ }
+ /*! Used as the header of the todo list */
+ virtual QCString trTodoList()
+ {
+ return "Списък със задачи за обсъждане свързани с подобренията";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.1.4
+//////////////////////////////////////////////////////////////////////////
+
+ virtual QCString trReferencedBy()
+ {
+ return "Използва се";
+ }
+ virtual QCString trRemarks()
+ {
+ return "Забележки";
+ }
+ virtual QCString trAttention()
+ {
+ return "Внимание";
+ }
+ virtual QCString trInclByDepGraph()
+ {
+ return "Граф на файлове показващ, кой файлове включват "
+ "явно или косвено този файл:";
+ }
+ virtual QCString trSince()
+ {
+ return "От";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.1.5
+//////////////////////////////////////////////////////////////////////////
+
+ /*! title of the graph legend page */
+ virtual QCString trLegendTitle()
+ {
+ return "Графична легенда";
+ }
+ /*! page explaining how the dot graph's should be interpreted
+ * The %A in the text below are to prevent link to classes called "A".
+ */
+ virtual QCString trLegendDocs()
+ {
+ return
+ "Тази страница обяснява как да интерпретирате графиките, генерирани "
+ "от doxygen.<p>\n"
+ "Разгледайте следният пример:\n"
+ "\\code\n"
+ "/*! Невидим клас поради съкращаване */\n"
+ "class Invisible { };\n\n"
+ "/*! Съкратен клас, наследствена връзка е скрита */\n"
+ "class Truncated : public Invisible { };\n\n"
+ "/* Класът не е документиран с doxygen коментари */\n"
+ "class Undocumented { };\n\n"
+ "/*! Клас, който се наследява чрез публично наследяване */\n"
+ "class PublicBase : public Truncated { };\n\n"
+ "/*! Шаблонен клас */\n"
+ "template<class T> class Templ { };\n\n"
+ "/*! Клас, който се наследява чрез защитено наследяване */\n"
+ "class ProtectedBase { };\n\n"
+ "/*! Клас, който се наследява чрез частно наследяване */\n"
+ "class PrivateBase { };\n\n"
+ "/*! Клас, използващ наследеният клас */\n"
+ "class Used { };\n\n"
+ "/*! Супер клас, който наследява редица други класове */\n"
+ "class Inherited : public PublicBase,\n"
+ " protected ProtectedBase,\n"
+ " private PrivateBase,\n"
+ " public Undocumented,\n"
+ " public Templ<int>\n"
+ "{\n"
+ " private:\n"
+ " Used *m_usedClass;\n"
+ "};\n"
+ "\\endcode\n"
+ "Правоъгълниците в този граф имат следното значение:"
+ "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center></p>\n"
+ "<p>\n"
+ "Правоъгълниците в този граф имат следното значение:\n"
+ "</p>\n"
+ "<ul>\n"
+ "<li>%Запълненият сиво правоъгълник представлява структурата или клас, "
+ "за който е създаден графа.</li>\n"
+ "<li>%Правоъгълника с черна рамка обозначава документирана структура или клас.</li>\n"
+ "<li>%Правоъгълника със сива рамка обозначава недокументирана структура или клас.</li>\n"
+ "<li>%Правоъгълника с червена рамка обозначава документирана структура или клас за"
+ "който не са показани всички отношения наследяване/съдържание. %A Графa e"
+ "съкратен, ако не се вписва в определените граници.</li>\n"
+ "</ul>\n"
+ "<p>\n"
+ "Стрелките имат следното значение:\n"
+ "</p>\n"
+ "<ul>\n"
+ "<li>%Тъмносиня стрелка се използва за визуализиране на публично наследство "
+ "между два класа.</li>\n"
+ "<li>%Тъмнозелена стрелка се използва за защитено наследяване.</li>\n"
+ "<li>%Тъмночервена стрелка се използва за частно наследяване.</li>\n"
+ "<li>%Лилава пунктирана стрелка се използва, ако клас се съдържа или използва "
+ "от друг клас. Стрелката указва променлива(и) "
+ "чрез който е достъпен посоченият клас или структура.</li>\n"
+ "<li>%Жълта пунктирана стрелка обозначава връзка между екземпляр на шаблон и "
+ "класът шаблон, от който е създаден. Стрелката указва "
+ "параметрите на шаблона на екземпляра.</li>\n"
+ "</ul>\n";
+ }
+ /*! text for the link to the legend page */
+ virtual QCString trLegend()
+ {
+ return "легенда";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.0
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a marker that is put before a test item */
+ virtual QCString trTest()
+ {
+ return "Тест";
+ }
+ /*! Used as the header of the test list */
+ virtual QCString trTestList()
+ {
+ return "Тестове Списък";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.2
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a section header for IDL properties */
+ virtual QCString trProperties()
+ {
+ return "Свойства";
+ }
+ /*! Used as a section header for IDL property documentation */
+ virtual QCString trPropertyDocumentation()
+ {
+ return "Свойство Документация";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.4
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used for Java classes in the summary section of Java packages */
+ virtual QCString trClasses()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ {
+ return "Структури от данни";
+ }
+ else
+ {
+ return "Класове";
+ }
+ }
+ /*! Used as the title of a Java package */
+ virtual QCString trPackage(const QCString &name)
+ {
+ return (QCString)"Пакет "+name;
+ }
+ /*! The description of the package index page */
+ virtual QCString trPackageListDescription()
+ {
+ return "Списък на пакетите с кратки описания(ако има такива):";
+ }
+ /*! The link name in the Quick links header for each page */
+ virtual QCString trPackages()
+ {
+ return "Пакети";
+ }
+ /*! Text shown before a multi-line define */
+ virtual QCString trDefineValue()
+ {
+ return "Макроопределение:";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.5
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a marker that is put before a \\bug item */
+ virtual QCString trBug()
+ {
+ return "Бъг";
+ }
+ /*! Used as the header of the bug list */
+ virtual QCString trBugList()
+ {
+ return "Бъгове Списък";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.6
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as ansicpg for RTF file
+ *
+ * The following table shows the correlation of Charset name, Charset Value and
+ * Codepage number:
+ * <pre>
+ * Charset Name Charset Value(hex) Codepage number
+ * ------------------------------------------------------
+ * DEFAULT_CHARSET 1 (x01)
+ * SYMBOL_CHARSET 2 (x02)
+ * OEM_CHARSET 255 (xFF)
+ * ANSI_CHARSET 0 (x00) 1252
+ * RUSSIAN_CHARSET 204 (xCC) 1251
+ * EE_CHARSET 238 (xEE) 1250
+ * GREEK_CHARSET 161 (xA1) 1253
+ * TURKISH_CHARSET 162 (xA2) 1254
+ * BALTIC_CHARSET 186 (xBA) 1257
+ * HEBREW_CHARSET 177 (xB1) 1255
+ * ARABIC _CHARSET 178 (xB2) 1256
+ * SHIFTJIS_CHARSET 128 (x80) 932
+ * HANGEUL_CHARSET 129 (x81) 949
+ * GB2313_CHARSET 134 (x86) 936
+ * CHINESEBIG5_CHARSET 136 (x88) 950
+ * </pre>
+ *
+ */
+ virtual QCString trRTFansicp()
+ {
+ return "1251";
+ }
+
+
+ /*! Used as ansicpg for RTF fcharset
+ * \see trRTFansicp() for a table of possible values.
+ */
+ virtual QCString trRTFCharSet()
+ {
+ return "204";
+ }
+
+ /*! Used as header RTF general index */
+ virtual QCString trRTFGeneralIndex()
+ {
+ return "Азбучен указател";
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trClass(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Клас" : "клас"));
+ if (!singular) result+="ове";
+ return result;
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trFile(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Файл" : "файл"));
+ if (!singular) result+="ове";
+ return result;
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trNamespace(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Именн" : "именн"));
+ result+=(singular ? "о пространство" : "и пространства");
+ return result;
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trGroup(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Груп" : "груп"));
+ result+=(singular ? "а" : "и");
+ return result;
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trPage(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Страниц" : "странц"));
+ result+=(singular ? "а" : "и");
+ return result;
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trMember(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Член" : "член"));
+ if (!singular) result+="ове";
+ return result;
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trGlobal(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Глобалн" : "глобалн"));
+ result+=(singular ? "а" : "и");
+ return result;
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.7
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This text is generated when the \\author command is used and
+ * for the author section in man pages. */
+ virtual QCString trAuthor(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Автор" : "автор"));
+ if (!singular) result+="и";
+ return result;
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.11
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This text is put before the list of members referenced by a member
+ */
+ virtual QCString trReferences()
+ {
+ return "Кръстосани препратки";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.13
+//////////////////////////////////////////////////////////////////////////
+
+ /*! used in member documentation blocks to produce a list of
+ * members that are implemented by this one.
+ */
+ virtual QCString trImplementedFromList(int numEntries)
+ {
+ return "Заменя "+trWriteList(numEntries)+".";
+ }
+
+ /*! used in member documentation blocks to produce a list of
+ * all members that implement this abstract member.
+ */
+ virtual QCString trImplementedInList(int numEntries)
+ {
+ return "Заменя в "+trWriteList(numEntries)+".";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.16
+//////////////////////////////////////////////////////////////////////////
+
+ /*! used in RTF documentation as a heading for the Table
+ * of Contents.
+ */
+ virtual QCString trRTFTableOfContents()
+ {
+ return "Съдържание";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.17
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as the header of the list of item that have been
+ * flagged deprecated
+ */
+ virtual QCString trDeprecatedList()
+ {
+ return "Остарели дефиниции и декларации Списък";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.18
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a header for declaration section of the events found in
+ * a C# program
+ */
+ virtual QCString trEvents()
+ {
+ return "Събития";
+ }
+ /*! Header used for the documentation section of a class' events. */
+ virtual QCString trEventDocumentation()
+ {
+ return "Събития Документация";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a heading for a list of Java class types with package scope.
+ */
+ virtual QCString trPackageTypes()
+ {
+ return "Типове с област на видимост пакет";
+ }
+ /*! Used as a heading for a list of Java class functions with package
+ * scope.
+ */
+ virtual QCString trPackageFunctions()
+ {
+ return "Функции с област на видимост пакет";
+ }
+ virtual QCString trPackageMembers()
+ {
+ return "Членове с област на видимост пакет";
+ }
+ /*! Used as a heading for a list of static Java class functions with
+ * package scope.
+ */
+ virtual QCString trStaticPackageFunctions()
+ {
+ return "Статични функции с област на видимост пакет";
+ }
+ /*! Used as a heading for a list of Java class variables with package
+ * scope.
+ */
+ virtual QCString trPackageAttribs()
+ {
+ return "Променливи с област на видимост пакет";
+ }
+ /*! Used as a heading for a list of static Java class variables with
+ * package scope.
+ */
+ virtual QCString trStaticPackageAttribs()
+ {
+ return "Статични променливи с област на видимост пакет";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.1
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used in the quick index of a class/file/namespace member list page
+ * to link to the unfiltered list of all members.
+ */
+ virtual QCString trAll()
+ {
+ return "Указател към не филтриран списък на всички членове";
+ }
+ /*! Put in front of the call graph for a function. */
+ virtual QCString trCallGraph()
+ {
+ return "Граф с извикванията за тази функция:";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.3
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This string is used as the title for the page listing the search
+ * results.
+ */
+ virtual QCString trSearchResultsTitle()
+ {
+ return "Резултати от търсенето";
+ }
+ /*! This string is put just before listing the search results. The
+ * text can be different depending on the number of documents found.
+ * Inside the text you can put the special marker $num to insert
+ * the number representing the actual number of search results.
+ * The @a numDocuments parameter can be either 0, 1 or 2, where the
+ * value 2 represents 2 or more matches. HTML markup is allowed inside
+ * the returned string.
+ */
+ virtual QCString trSearchResults(int numDocuments)
+ {
+ if (numDocuments==0)
+ {
+ return "За съжаление няма документи, отговарящи на вашата заявка.";
+ }
+ else if (numDocuments==1)
+ {
+ return "Намерен е <b>1</b> документ, съответстващ на вашата заявка.";
+ }
+ else
+ {
+ return "Намерени са <b>$num</b> документи, съответстващи на вашата заявка. "
+ "Първо се показват най-добрите съвпадения.";
+ }
+ }
+ /*! This string is put before the list of matched words, for each search
+ * result. What follows is the list of words that matched the query.
+ */
+ virtual QCString trSearchMatches()
+ {
+ return "Намерено:";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.8
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used in HTML as the title of page with source code for file filename
+ */
+ virtual QCString trSourceFile(QCString& filename)
+ {
+ return filename + " Изходен файл";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.9
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used as the name of the chapter containing the directory
+ * hierarchy.
+ */
+ virtual QCString trDirIndex()
+ { return "Директории Йерархия"; }
+
+ /*! This is used as the name of the chapter containing the documentation
+ * of the directories.
+ */
+ virtual QCString trDirDocumentation()
+ { return "Директории Документация"; }
+
+ /*! This is used as the title of the directory index and also in the
+ * Quick links of an HTML page, to link to the directory hierarchy.
+ */
+ virtual QCString trDirectories()
+ { return "Директории"; }
+
+ /*! This returns the title of a directory page. The name of the
+ * directory is passed via \a dirName.
+ */
+ virtual QCString trDirReference(const QCString &dirName)
+ { QCString result=dirName; result+=" Директория Съдържание"; return result; }
+
+ /*! This returns the word directory with or without starting capital
+ * (\a first_capital) and in singular or plural form (\a singular).
+ */
+ virtual QCString trDir(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Директори" : "директори"));
+ if (singular) result+="я"; else result+="и";
+ return result;
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.4.1
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This text is added to the documentation when the \\overload command
+ * is used for a overloaded function.
+ */
+ virtual QCString trOverloadText()
+ {
+ return "Това е преопределена член функция, "
+ "предоставена за удобство. Различава се от спомената по горе "
+ "функция само по броя на фактическите аргументи.";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.4.6
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used to introduce a caller (or called-by) graph */
+ virtual QCString trCallerGraph()
+ {
+ return "Граф на извикванията за тази функция:";
+ }
+
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for enumeration values
+ */
+ virtual QCString trEnumerationValueDocumentation()
+ { return "Изброяване Документация"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.5.4 (mainly for Fortran)
+//////////////////////////////////////////////////////////////////////////
+
+ /*! header that is put before the list of member subprograms (Fortran). */
+ virtual QCString trMemberFunctionDocumentationFortran()
+ { return "Функции/подпрограми Документация"; }
+
+ /*! This is put above each page as a link to the list of annotated data types (Fortran). */
+ virtual QCString trCompoundListFortran()
+ { return "Типове данни Списък"; }
+
+ /*! This is put above each page as a link to all members of compounds (Fortran). */
+ virtual QCString trCompoundMembersFortran()
+ { return "Полета данни"; }
+
+ /*! This is an introduction to the annotated compound list (Fortran). */
+ virtual QCString trCompoundListDescriptionFortran()
+ { return "Анотиран списък от типовете данни с кратки описания:"; }
+
+ /*! This is an introduction to the page with all data types (Fortran). */
+ virtual QCString trCompoundMembersDescriptionFortran(bool extractAll)
+ {
+ QCString result="Списък на всички ";
+ if (!extractAll)
+ {
+ result+="документирани ";
+ }
+ result+="членове типове данни";
+ result+=" с препратки към ";
+ if (!extractAll)
+ {
+ result+="документацията за структура от данни за всеки член";
+ }
+ else
+ {
+ result+="типовете данни, към които принадлежат:";
+ }
+ return result;
+ }
+
+ /*! This is used in LaTeX as the title of the chapter with the
+ * annotated compound index (Fortran).
+ */
+ virtual QCString trCompoundIndexFortran()
+ { return "Типове данни Указател"; }
+
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all data types (Fortran).
+ */
+ virtual QCString trTypeDocumentation()
+ { return "Типове данни Документация"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of (global) subprograms (Fortran).
+ */
+ virtual QCString trSubprograms()
+ { return "Функции/Подпрограми"; }
+
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for subprograms (Fortran)
+ */
+ virtual QCString trSubprogramDocumentation()
+ { return "Функции/Подпрограми Документация"; }
+
+ /*! This is used in the documentation of a file/namespace/group before
+ * the list of links to documented compounds (Fortran)
+ */
+ virtual QCString trDataTypes()
+ { return "Типове данни"; }
+
+ /*! used as the title of page containing all the index of all modules (Fortran). */
+ virtual QCString trModulesList()
+ { return "Модули Списък"; }
+
+ /*! used as an introduction to the modules list (Fortran) */
+ virtual QCString trModulesListDescription(bool extractAll)
+ {
+ QCString result="Списък на всички ";
+ if (!extractAll) result+="документирани ";
+ result+="модули с кратко описание:";
+ return result;
+ }
+
+ /*! used as the title of the HTML page of a module/type (Fortran) */
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
+ ClassDef::CompoundType compType,
+ bool isTemplate)
+ {
+ QCString result=(QCString)clName;
+ switch(compType)
+ {
+ case ClassDef::Class: result+=" Модул"; break;
+ case ClassDef::Struct: result+=" Тип"; break;
+ case ClassDef::Union: result+=" Обединение"; break;
+ case ClassDef::Interface: result+=" Интерфейс"; break;
+ case ClassDef::Protocol: result+=" Протокол"; break;
+ case ClassDef::Category: result+=" Категория"; break;
+ case ClassDef::Exception: result+=" Изключение"; break;
+ default: break;
+ }
+ if (isTemplate) result+=" Шаблон";
+ result+=" Отнася се";
+ return result;
+ }
+ /*! used as the title of the HTML page of a module (Fortran) */
+ virtual QCString trModuleReference(const QCString &namespaceName)
+ {
+ QCString result=namespaceName;
+ result+=" Модул Справка";
+ return result;
+ }
+
+ /*! This is put above each page as a link to all members of modules. (Fortran) */
+ virtual QCString trModulesMembers()
+ { return "Модул Членове"; }
+
+ /*! This is an introduction to the page with all modules members (Fortran) */
+ virtual QCString trModulesMemberDescription(bool extractAll)
+ {
+ QCString result="Списък на всички ";
+ if (!extractAll) result+="документирани ";
+ result+="членове на модула с връзки към ";
+ if (extractAll)
+ {
+ result+="документацията на модула за всеки член:";
+ }
+ else
+ {
+ result+="модулите, към които принадлежат:";
+ }
+ return result;
+ }
+
+ /*! This is used in LaTeX as the title of the chapter with the
+ * index of all modules (Fortran).
+ */
+ virtual QCString trModulesIndex()
+ { return "Модули Указател"; }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trModule(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Модул" : "модул"));
+ if (!singular) result+="и";
+ return result;
+ }
+
+ /*! This is put at the bottom of a module documentation page and is
+ * followed by a list of files that were used to generate the page.
+ */
+ virtual QCString trGeneratedFromFilesFortran(ClassDef::CompoundType compType,
+ bool single)
+ {
+ // single is true implies a single file
+ QCString result=(QCString)"Документацията за ";
+ switch(compType)
+ {
+ case ClassDef::Class: result+="модул"; break;
+ case ClassDef::Struct: result+="тип"; break;
+ case ClassDef::Union: result+="обединение"; break;
+ case ClassDef::Interface: result+="интерфейс"; break;
+ case ClassDef::Protocol: result+="протокол"; break;
+ case ClassDef::Category: result+="категория"; break;
+ case ClassDef::Exception: result+="изключение"; break;
+ default: break;
+ }
+ result+=" беше генериран ";
+ if (single) result+="от следният файл:"; else result+="от следните файлове:";
+ return result;
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trType(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Тип" : "тип"));
+ if (!singular) result+="ове";
+ return result;
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trSubprogram(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Подпрограм" : "подпрограм"));
+ if (singular) result+="а:"; else result+="и:";
+ return result;
+ }
+
+ /*! C# Type Constraint list */
+ virtual QCString trTypeConstraints()
+ {
+ return "Съвместими типове";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.6.0 (mainly for the new search engine)
+//////////////////////////////////////////////////////////////////////////
+
+ /*! directory relation for \a name */
+ virtual QCString trDirRelation(const QCString &name)
+ {
+ return QCString(name)+" Връзка";
+ }
+
+ /*! Loading message shown when loading search results */
+ virtual QCString trLoading()
+ {
+ return "Зареждане...";
+ }
+
+ /*! Label used for search results in the global namespace */
+ virtual QCString trGlobalNamespace()
+ {
+ return "Глобални именни пространства";
+ }
+
+ /*! Message shown while searching */
+ virtual QCString trSearching()
+ {
+ return "Търсене...";
+ }
+
+ /*! Text shown when no search results are found */
+ virtual QCString trNoMatches()
+ {
+ return "Не намерено";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.6.3 (missing items for the directory pages)
+//////////////////////////////////////////////////////////////////////////
+
+ /*! when clicking a directory dependency label, a page with a
+ * table is shown. The heading for the first column mentions the
+ * source file that has a relation to another file.
+ */
+ virtual QCString trFileIn(const QCString &name)
+ {
+ return (QCString)"Файл в "+name;
+ }
+
+ /*! when clicking a directory dependency label, a page with a
+ * table is shown. The heading for the second column mentions the
+ * destination file that is included.
+ */
+ virtual QCString trIncludesFileIn(const QCString &name)
+ {
+ return (QCString)"Включва файла в "+name;
+ }
+
+ /** Compiles a date string.
+ * @param year Year in 4 digits
+ * @param month Month of the year: 1=January
+ * @param day Day of the Month: 1..31
+ * @param dayOfWeek Day of the week: 1=Monday..7=Sunday
+ * @param hour Hour of the day: 0..23
+ * @param minutes Minutes in the hour: 0..59
+ * @param seconds Seconds within the minute: 0..59
+ * @param includeTime Include time in the result string?
+ */
+ virtual QCString trDateTime(int year,int month,int day,int dayOfWeek,
+ int hour,int minutes,int seconds,
+ bool includeTime)
+ {
+ static const char *days[] = { "Пн","Вт","Ср","Чт","Пт","Сб","Нд" };
+ static const char *months[] = { "Яну","Фев","Мар","Апр","Май","Юни","Юли","Авг","Сеп","Окт","Ное","Дек" };
+ QCString sdate;
+ sdate.sprintf("%s %s %d %d",days[dayOfWeek-1],months[month-1],day,year);
+ if (includeTime)
+ {
+ QCString stime;
+ stime.sprintf(" %.2d:%.2d:%.2d",hour,minutes,seconds);
+ sdate+=stime;
+ }
+ return sdate;
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.7.5
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Header for the page with bibliographic citations */
+ virtual QCString trCiteReferences()
+ { return "Библиография"; }
+
+ /*! Text for copyright paragraph */
+ virtual QCString trCopyright()
+ { return "Авторско право"; }
+
+ /*! Header for the graph showing the directory dependencies */
+ virtual QCString trDirDepGraph(const QCString &name)
+ { return QCString("Граф на зависимостта на директория за ")+name+":"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.8.0
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Detail level selector shown for hierarchical indices */
+ virtual QCString trDetailLevel()
+ { return "ниво на детайлност"; }
+
+ /*! Section header for list of template parameters */
+ virtual QCString trTemplateParameters()
+ { return "Шаблона Параметри"; }
+
+ /*! Used in dot graph when UML_LOOK is enabled and there are many fields */
+ virtual QCString trAndMore(const QCString &number)
+ { return "и "+number+" повече..."; }
+
+ /*! Used file list for a Java enum */
+ virtual QCString trEnumGeneratedFromFiles(bool single)
+ { QCString result = "Документацията за това изброяване е генерирана от ";
+ if (single) result+="следният файл:"; else result+="следните файлове:";
+ result+=":";
+ return result;
+ }
+
+ /*! Header of a Java enum page (Java enums are represented as classes). */
+ virtual QCString trEnumReference(const QCString &name)
+ { return QCString(name)+" Изброяване Справка"; }
+
+ /*! Used for a section containing inherited members */
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
+ { return QCString(members)+" наследен от "+what; }
+
+ /*! Header of the sections with inherited members specific for the
+ * base class(es)
+ */
+ virtual QCString trAdditionalInheritedMembers()
+ { return "Допълнителни наследени членове"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.8.2
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a tooltip for the toggle button that appears in the
+ * navigation tree in the HTML output when GENERATE_TREEVIEW is
+ * enabled. This tooltip explains the meaning of the button.
+ */
+ virtual QCString trPanelSynchronisationTooltip(bool enable)
+ {
+ QCString opt = enable ? "включване" : "изключване";
+ return "натиснете на "+opt+" за синхронизация на панела";
+ }
+
+ /*! Used in a method of an Objective-C class that is declared in a
+ * a category. Note that the @1 marker is required and is replaced
+ * by a link.
+ */
+ virtual QCString trProvidedByCategory()
+ {
+ return "По групи @0.";
+ }
+
+ /*! Used in a method of an Objective-C category that extends a class.
+ * Note that the @1 marker is required and is replaced by a link to
+ * the class method.
+ */
+ virtual QCString trExtendsClass()
+ {
+ return "Разширява класа @0.";
+ }
+
+ /*! Used as the header of a list of class methods in Objective-C.
+ * These are similar to static public member functions in C++.
+ */
+ virtual QCString trClassMethods()
+ {
+ return "Клас Методи";
+ }
+
+ /*! Used as the header of a list of instance methods in Objective-C.
+ * These are similar to public member functions in C++.
+ */
+ virtual QCString trInstanceMethods()
+ {
+ return "Общодостъпни Методи";
+ }
+
+ /*! Used as the header of the member functions of an Objective-C class.
+ */
+ virtual QCString trMethodDocumentation()
+ {
+ return "Метод Документация";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.8.4
+//////////////////////////////////////////////////////////////////////////
+
+ /** old style UNO IDL services: implemented interfaces */
+ virtual QCString trInterfaces()
+ { return "Експортирани интерфейси"; }
+
+ /** old style UNO IDL services: inherited services */
+ virtual QCString trServices()
+ { return "Включени услуги"; }
+
+ /** UNO IDL constant groups */
+ virtual QCString trConstantGroups()
+ { return "Постоянни групи"; }
+
+ /** UNO IDL constant groups */
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
+ {
+ QCString result=namespaceName;
+ result+=" Постоянни групи Справка";
+ return result;
+ }
+ /** UNO IDL service page title */
+ virtual QCString trServiceReference(const QCString &sName)
+ {
+ QCString result=(QCString)sName;
+ result+=" Сървис Справка";
+ return result;
+ }
+ /** UNO IDL singleton page title */
+ virtual QCString trSingletonReference(const QCString &sName)
+ {
+ QCString result=(QCString)sName;
+ result+=" Конкретика Справка";
+ return result;
+ }
+ /** UNO IDL service page */
+ virtual QCString trServiceGeneratedFromFiles(bool single)
+ {
+ // single is true implies a single file
+ QCString result=(QCString)"Документацията за този сървис "
+ "беше генерирано от ";
+ if (single) result+="следният файл:"; else result+="следните файлове:";
+ return result;
+ }
+ /** UNO IDL singleton page */
+ virtual QCString trSingletonGeneratedFromFiles(bool single)
+ {
+ // single is true implies a single file
+ QCString result=(QCString)"Документацията за тази конкретика "
+ "беше генерирано от ";
+ if (single) result+="следният файл:"; else result+="следните файлове:";
+ return result;
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.8.15
+//////////////////////////////////////////////////////////////////////////
+
+ /** VHDL design unit hierarchy */
+ virtual QCString trDesignUnitHierarchy()
+ { return "Проектни единици Йерархия"; }
+ /** VHDL design unit list */
+ virtual QCString trDesignUnitList()
+ { return "Проектни единици Списък"; }
+ /** VHDL design unit members */
+ virtual QCString trDesignUnitMembers()
+ { return "Проектна единица Членове"; }
+ /** VHDL design unit list description */
+ virtual QCString trDesignUnitListDescription()
+ {
+ return "Here is a list of all design unit members with links to "
+ "the Entities they belong to:";
+ }
+ /** VHDL design unit index */
+ virtual QCString trDesignUnitIndex()
+ { return "Проектна единица Указател"; }
+ /** VHDL design units */
+ virtual QCString trDesignUnits()
+ { return "Проектни единици"; }
+ /** VHDL functions/procedures/processes */
+ virtual QCString trFunctionAndProc()
+ { return "Функции/Процедури/Процеси"; }
+ /** VHDL type */
+ virtual QCString trVhdlType(uint64 type,bool single)
+ {
+ switch(type)
+ {
+ case VhdlDocGen::LIBRARY:
+ if (single) return "Библиотека";
+ else return "Библиотеки";
+ case VhdlDocGen::PACKAGE:
+ if (single) return "Пакет";
+ else return "Пакети";
+ case VhdlDocGen::SIGNAL:
+ if (single) return "Сигнал";
+ else return "Сигнали";
+ case VhdlDocGen::COMPONENT:
+ if (single) return "Компонент";
+ else return "Компоненти";
+ case VhdlDocGen::CONSTANT:
+ if (single) return "Константа";
+ else return "Константи";
+ case VhdlDocGen::ENTITY:
+ if (single) return "Същност";
+ else return "Същности";
+ case VhdlDocGen::TYPE:
+ if (single) return "Тип";
+ else return "Типове";
+ case VhdlDocGen::SUBTYPE:
+ if (single) return "Подтип";
+ else return "Подтипове";
+ case VhdlDocGen::FUNCTION:
+ if (single) return "Функция";
+ else return "Функции";
+ case VhdlDocGen::RECORD:
+ if (single) return "Запис";
+ else return "Записи";
+ case VhdlDocGen::PROCEDURE:
+ if (single) return "Процедура";
+ else return "Процедури";
+ case VhdlDocGen::ARCHITECTURE:
+ if (single) return "Архитектура";
+ else return "Архитектури";
+ case VhdlDocGen::ATTRIBUTE:
+ if (single) return "Атрибут";
+ else return "Атрибути";
+ case VhdlDocGen::PROCESS:
+ if (single) return "Процес";
+ else return "Процеси";
+ case VhdlDocGen::PORT:
+ if (single) return "Порт";
+ else return "Портове";
+ case VhdlDocGen::USE:
+ if (single) return "use клауза";
+ else return "Use клаузи";
+ case VhdlDocGen::GENERIC:
+ if (single) return "Роден";
+ else return "Родни";
+ case VhdlDocGen::PACKAGE_BODY:
+ return "Тяло на пакета";
+ case VhdlDocGen::UNITS:
+ return "Единици";
+ case VhdlDocGen::SHAREDVARIABLE:
+ if (single) return "Споделена променлива";
+ else return "Споделени променливи";
+ case VhdlDocGen::VFILE:
+ if (single) return "Файл";
+ else return "Файлове";
+ case VhdlDocGen::GROUP:
+ if (single) return "Група";
+ else return "Групи";
+ case VhdlDocGen::INSTANTIATION:
+ if (single) return "Инстанция";
+ else return "Инстанции";
+ case VhdlDocGen::ALIAS:
+ if (single) return "Псевдоним";
+ else return "Псевдоними";
+ case VhdlDocGen::CONFIG:
+ if (single) return "Конфигурация";
+ else return "Конфигурации";
+ case VhdlDocGen::MISCELLANEOUS:
+ return "Други";
+ case VhdlDocGen::UCF_CONST:
+ return "Ограничения";
+ default:
+ return "Клас";
+ }
+ }
+ virtual QCString trCustomReference(const QCString &name)
+ { return QCString(name)+" Отнася се"; }
+
+ /* Slice */
+ virtual QCString trConstants()
+ {
+ return "Константи";
+ }
+ virtual QCString trConstantDocumentation()
+ {
+ return "Константи Документация";
+ }
+ virtual QCString trSequences()
+ {
+ return "Последователности";
+ }
+ virtual QCString trSequenceDocumentation()
+ {
+ return "Последователности Документация";
+ }
+ virtual QCString trDictionaries()
+ {
+ return "Речници";
+ }
+ virtual QCString trDictionaryDocumentation()
+ {
+ return "Речници Документация";
+ }
+ virtual QCString trSliceInterfaces()
+ {
+ return "Интерфейси";
+ }
+ virtual QCString trInterfaceIndex()
+ {
+ return "Интерфейси Указател";
+ }
+ virtual QCString trInterfaceList()
+ {
+ return "Интерфейси списък";
+ }
+ virtual QCString trInterfaceListDescription()
+ {
+ return "Интерфейсите с кратки описания:";
+ }
+ virtual QCString trInterfaceHierarchy()
+ {
+ return "Интерфейси Йерархия";
+ }
+ virtual QCString trInterfaceHierarchyDescription()
+ {
+ return "Този списък на наследяване е сортиран, но не напълно, по азбучен ред:";
+ }
+ virtual QCString trInterfaceDocumentation()
+ {
+ return "Интерфейси Документация";
+ }
+ virtual QCString trStructs()
+ {
+ return "Структури";
+ }
+ virtual QCString trStructIndex()
+ {
+ return "Структури Указател";
+ }
+ virtual QCString trStructList()
+ {
+ return "Структури Списък";
+ }
+ virtual QCString trStructListDescription()
+ {
+ return "Структури с кратки описания:";
+ }
+ virtual QCString trStructDocumentation()
+ {
+ return "Структури Документация";
+ }
+ virtual QCString trExceptionIndex()
+ {
+ return "Изключения Указател";
+ }
+ virtual QCString trExceptionList()
+ {
+ return "Изключения Списък";
+ }
+ virtual QCString trExceptionListDescription()
+ {
+ return "Изключения с кратки описания:";
+ }
+ virtual QCString trExceptionHierarchy()
+ {
+ return "Изключения Йерархия";
+ }
+ virtual QCString trExceptionHierarchyDescription()
+ {
+ return "Този списък на наследяване е сортиран, но не напълно, по азбучен ред:";
+ }
+ virtual QCString trExceptionDocumentation()
+ {
+ return "Изключения Документация";
+ }
+ virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)
+ {
+ QCString result=(QCString)clName;
+ if (isLocal) result+=" Локален";
+ switch(compType)
+ {
+ case ClassDef::Class: result+=" Клас"; break;
+ case ClassDef::Struct: result+=" Структура"; break;
+ case ClassDef::Union: result+=" Обединение"; break;
+ case ClassDef::Interface: result+=" Интерфейс"; break;
+ case ClassDef::Protocol: result+=" Протокол"; break;
+ case ClassDef::Category: result+=" Категория"; break;
+ case ClassDef::Exception: result+=" Изключение"; break;
+ default: break;
+ }
+ result+=" Отнася се";
+ return result;
+ }
+ virtual QCString trOperations()
+ {
+ return "Операции";
+ }
+ virtual QCString trOperationDocumentation()
+ {
+ return "Операции Документация";
+ }
+ virtual QCString trDataMembers()
+ {
+ return "Членове Данни";
+ }
+ virtual QCString trDataMemberDocumentation()
+ {
+ return "Членове Данни Документация";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.8.19
+//////////////////////////////////////////////////////////////////////////
+
+ /** VHDL design unit documentation */
+ virtual QCString trDesignUnitDocumentation()
+ { return "Проектни единици Документация"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.9.2
+//////////////////////////////////////////////////////////////////////////
+
+ /** C++20 concept */
+ virtual QCString trConcept(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Концепци" : "концепци"));
+ if (singular) result+="я"; else result+="и";
+ return result;
+ }
+ /*! used as the title of the HTML page of a C++20 concept page */
+ virtual QCString trConceptReference(const QCString &conceptName)
+ {
+ QCString result=conceptName;
+ result+=" Концепции Справка";
+ return result;
+ }
+
+ /*! used as the title of page containing all the index of all concepts. */
+ virtual QCString trConceptList()
+ { return "Концепции Списък"; }
+
+ /*! used as the title of chapter containing the index listing all concepts. */
+ virtual QCString trConceptIndex()
+ { return "Концепции Указател"; }
+
+ /*! used as the title of chapter containing all information about concepts. */
+ virtual QCString trConceptDocumentation()
+ { return "Концепции Документация"; }
+
+ /*! used as an introduction to the concept list */
+ virtual QCString trConceptListDescription(bool extractAll)
+ {
+ QCString result="Списък на всички ";
+ if (!extractAll) result+="документирани ";
+ result+="концепции с кратко описание:";
+ return result;
+ }
+
+ /*! used to introduce the definition of the C++20 concept */
+ virtual QCString trConceptDefinition()
+ {
+ return "Дефиниция на концепция";
+ }
+};
+
+#endif
#ifndef TRANSLATOR_BR_H
#define TRANSLATOR_BR_H
-class TranslatorBrazilian : public Translator
+class TranslatorBrazilian : public TranslatorAdapter_1_9_4
{
public:
{
return "pt-BR";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x416 Portuguese(Brazil)";
+ }
// --- Language translation methods -------------------
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Gerado automaticamente por Doxygen";
- if (!s.isEmpty()) result+=(QCString)" para "+s;
+ if (!s.isEmpty()) result+=" para "+s;
result+=" a partir do código-fonte.";
return result;
}
{
return "Estruturas";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "Classes";
virtual QCString trExampleDocumentation()
{ return "Exemplos"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Documentação Relacionada"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Guia de Referência"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Gerado em "+date;
- if (!projName.isEmpty()) result+=(QCString)" para "+projName;
- result+=(QCString)" por";
+ QCString result="Gerado em "+date;
+ if (!projName.isEmpty()) result+=" para "+projName;
+ result+=" por";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"Diagrama de hierarquia para "+clName+":";
+ return "Diagrama de hierarquia para "+clName+":";
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "Apenas para uso interno."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Aviso"; }
case ClassDef::Exception: result+="Exceção "; break;
default: break;
}
- result+=(QCString)clName;
+ result+=clName;
return result;
}
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
- QCString result=(QCString)"A documentação para ";
+ bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ QCString result="A documentação para ";
if (compType == ClassDef::Protocol)
{
result+= "esse ";
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Diagrama de colaboração para "+clName+":";
+ return "Diagrama de colaboração para "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Gráfico de dependência de inclusões para "+fName+":";
+ return "Gráfico de dependência de inclusões para "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Pacote "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Lista de Pacotes";
+ return "Pacote "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Funções do Pacote";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Membros do Pacote";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Funções Estáticas do Pacote";
}
virtual QCString trDirectories()
{ return "Diretórios"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Esta Hierarquia de Diretórios está parcialmente ordenada (ordem alfabética)"; }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result = (QCString)"Referência ";
+ QCString result = "Referência ";
if (isTemplate) result+="do <em>Template</em> ";
bool single)
{
// single is true implies a single file
- QCString result=(QCString)"A documentação para ";
+ QCString result="A documentação para ";
switch(compType)
{
case ClassDef::Class: result+="esse modulo "; break;
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)"Arquivo em "+name;
+ return "Arquivo em "+name;
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)"Inclui arquivo em "+name;
+ return "Inclui arquivo em "+name;
}
/** Compiles a date string.
virtual QCString trServiceGeneratedFromFiles(bool single)
{
// single is true implies a single file
- QCString result=(QCString)"A documentação para esse serviço "
+ QCString result="A documentação para esse serviço "
"foi gerada a partir ";
if (single) {
result+="do seguinte arquivo:";
virtual QCString trSingletonGeneratedFromFiles(bool single)
{
// single is true implies a single file
- QCString result=(QCString)"A documentação para esse <em>Singleton</em> "
+ QCString result="A documentação para esse <em>Singleton</em> "
"foi gerada a partir ";
if (single) {
result+="do seguinte arquivo:";
}
virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)
{
- QCString result=(QCString)"Referência ";
+ QCString result="Referência ";
switch(compType)
{
case ClassDef::Class: result+="da Classe "; break;
virtual QCString trDesignUnitDocumentation()
{
return "Documentação da Unidade de Projeto";
- }
+ }
//////////////////////////////////////////////////////////////////////////
files frees the maintainer from thinking about whether the
first, the second, or both files should be included or not, and
why. This holds namely for localized translators because their
- base class is changed occasionaly to adapter classes when the
+ base class is changed occasionally to adapter classes when the
Translator class changes the interface, or back to the
Translator class (by the local maintainer) when the localized
translator is made up-to-date again.
{
return "ca";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x403 Catalan";
+ }
// --- Language translation methods -------------------
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Generat automàticament per Doxygen";
- if (!s.isEmpty()) result+=(QCString)" per a "+s;
+ if (!s.isEmpty()) result+=" per a "+s;
result+=" a partir del codi font.";
return result;
}
{
return "Documentació de les Estructures de Dades";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "Documentació de les Classes";
virtual QCString trExampleDocumentation()
{ return "Documentació dels Exemples"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Documentació de les Pàgines"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Manual de Referència"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Generat a "+date;
- if (!projName.isEmpty()) result+=(QCString)" per a "+projName;
- result+=(QCString)" per";
+ QCString result="Generat a "+date;
+ if (!projName.isEmpty()) result+=" per a "+projName;
+ result+=" per";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"Diagrama d'Herència per a "+clName+":";
+ return "Diagrama d'Herència per a "+clName+":";
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "Tan sols per a ús intern."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Atenció"; }
default: break;
}
if (isTemplate) result+="Template ";
- result+=(QCString)clName;
+ result+=clName;
return result;
}
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"La documentació d'aquest";
+ QCString result="La documentació d'aquest";
switch(compType)
{
case ClassDef::Class: result+="a classe"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Diagrama de col·laboració per a "+clName+":";
+ return "Diagrama de col·laboració per a "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Inclou el graf de dependències per a "+fName+":";
+ return "Inclou el graf de dependències per a "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Paquet "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Llista de Paquets";
+ return "Paquet "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Funcions de Paquet";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Membres de Paquet";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Funcions Estàtiques de Paquet";
}
virtual QCString trDirectories()
{ return "Directoris"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Aquesta jerarquia de directoris està ordenada toscament, "
- "però no completa, de forma alfabètica:";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
default: break;
}
if (isTemplate) result+="Template ";
- result+=(QCString)clName;
+ result+=clName;
return result;
}
bool single)
{ // here s is one of " Module", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"La documentació d'aquest";
+ QCString result="La documentació d'aquest";
switch(compType)
{
case ClassDef::Class: result+=" mòdul"; break;
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)"Fitxer a "+name;
+ return "Fitxer a "+name;
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)"Inclou fitxer a "+name;
+ return "Inclou fitxer a "+name;
}
/** Compiles a date string.
*/
#define CN_SPC " "
-class TranslatorChinese : public Translator
+class TranslatorChinese : public TranslatorAdapter_1_9_4
{
public:
/*! Used for identification of the language. The identification
{
return "zh";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x804 Chinese (PRC)";
+ }
virtual QCString latexFontenc()
{
return "";
{
return "\\end{CJK}\n";
}
+ virtual bool needsPunctuation()
+ {
+ return false;
+ }
/*! used in the compound documentation before a list of related functions.
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result;
result = "由" CN_SPC "Doyxgen" CN_SPC "通过分析" CN_SPC;
- if (!s.isEmpty()) result += ((QCString)s+CN_SPC "的" CN_SPC);
+ if (!s.isEmpty()) result += (s+CN_SPC "的" CN_SPC);
result+= "源代码自动生成.";
return result;
}
{
return "结构体说明";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else {
return "类说明";
}
virtual QCString trExampleDocumentation()
{ return "示例说明"; }
- virtual QCString trPageDocumentation()
- { return "页面说明"; }
-
virtual QCString trReferenceManual()
{ return "参考手册"; }
}
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
- { QCString result=(QCString)"生成于" CN_SPC+date;
- if (!projName.isEmpty()) result+=(QCString)CN_SPC ", 为" CN_SPC+projName;
- result+=(QCString)"使用" CN_SPC;
+ { QCString result="生成于" CN_SPC+date;
+ if (!projName.isEmpty()) result+=CN_SPC ", 为" CN_SPC+projName;
+ result+="使用" CN_SPC;
return result;
}
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"类" CN_SPC+clName+CN_SPC "继承关系图:";
+ return "类" CN_SPC+clName+CN_SPC "继承关系图:";
}
- virtual QCString trForInternalUseOnly()
- { return "仅限内部使用."; }
-
virtual QCString trWarning()
{ return "警告"; }
bool isTemplate)
// used as the title of the HTML page of a class/struct/union
{
- QCString result=(QCString)clName;
+ QCString result=clName;
if (isTemplate) result+=CN_SPC "模板";
switch(compType)
{
bool)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"该";
+ QCString result="该";
switch(compType)
{
case ClassDef::Class: result+="类"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)clName+CN_SPC "的协作图:";
+ return clName+CN_SPC "的协作图:";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)fName+CN_SPC "的引用(Include)关系图:";
+ return fName+CN_SPC "的引用(Include)关系图:";
}
/*! header that is put before the list of constructor/destructors. */
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"包" CN_SPC+name;
+ return "包" CN_SPC+name;
}
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "包列表";
- }
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "包函数";
}
+ virtual QCString trPackageMembers()
+ {
+ return "包成员";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "静态包函数";
}
virtual QCString trDirectories()
{ return "目录"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- {
- return "此继承关系列表按字典顺序粗略的排序:" CN_SPC;
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=CN_SPC "模块"; break;
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)"文件在"+CN_SPC+name;
+ return QCString("文件在")+CN_SPC+name;
}
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)"在" CN_SPC+name+CN_SPC "中引用";
+ return "在" CN_SPC+name+CN_SPC "中引用";
}
virtual QCString trDateTime(int year,int month,int day,int dayOfWeek,
/** UNO IDL service page title */
virtual QCString trServiceReference(const QCString &sName)
{
- QCString result=(QCString)sName;
+ QCString result=sName;
result+= CN_SPC "服务参考";
return result;
}
/** UNO IDL singleton page title */
virtual QCString trSingletonReference(const QCString &sName)
{
- QCString result=(QCString)sName;
+ QCString result=sName;
result+= CN_SPC "单例参考";
return result;
}
}
virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
if (isLocal) result+=" 局部";
switch(compType)
{
// something else. It is difficult to find the general translation
// for all kinds in the Czech language.
-class TranslatorCzech : public Translator
+class TranslatorCzech : public TranslatorAdapter_1_9_4
{
public:
// --- Language control methods -------------------
{
return "cs";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x405 Czech";
+ }
// --- Language translation methods -------------------
virtual QCString trExampleDocumentation()
{ return "Dokumentace příkladů"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Dokumentace souvisejících stránek"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Referenční příručka"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Vygenerováno dne: "+date;
+ QCString result="Vygenerováno dne: "+date;
if (!projName.isEmpty()) result += QCString(", pro projekt: ") + projName;
- result+=(QCString)", programem";
+ result+=", programem";
return result;
}
return QCString("Diagram dědičnosti pro třídu ") + clName+":";
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "Pouze pro vnitřní použití."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Pozor"; }
virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,
bool single)
{ // single is true implies a single file
- QCString result=(QCString)"Dokumentace pro ";
+ QCString result="Dokumentace pro ";
switch(compType)
{
case ClassDef::Class: result+="tuto třídu"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Diagram pro "+clName+":";
+ return "Diagram pro "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Graf závislostí na vkládaných souborech pro "+fName+":";
+ return "Graf závislostí na vkládaných souborech pro "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
{
return QCString("Balík ") + name;
}
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Seznam balíků";
- }
/*! The description of the package index page */
virtual QCString trPackageListDescription()
{
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Funkce v balíku";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Členy v balíku";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Statické funkce v balíku";
}
virtual QCString trDirectories()
{ return "Adresáře"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- {
- return "Následující hierarchie adresářů je zhruba, "
- "ale ne úplně, řazena podle abecedy:";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
bool single)
{
// single is true implies a single file
- QCString result=(QCString)"Dokumentace ";
+ QCString result="Dokumentace ";
switch(compType)
{
case ClassDef::Class: result+="k tomuto modulu"; break;
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)"Soubor v "+name;
+ return "Soubor v "+name;
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)"Vkládá (include) soubor z "+name;
+ return "Vkládá (include) soubor z "+name;
}
/** Compiles a date string.
//
// 2001/03/23 Jens Seidel (jensseidel@users.sourceforge.net)
// - fixed typos
-// - changed trPageDocumentation() "Seitenbeschreibung" to
-// "Zusätzliche Informationen"
// - removed old trGeneratedFrom()
// - changed "/*!" to "/*" (documentation is inherited from translator_en.h
// (INHERIT_DOCS = YES), there's no need to make changes twice)
{
return "de";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x407 German";
+ }
// --- Language translation methods -------------------
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Automatisch erzeugt von Doxygen";
- if (!s.isEmpty()) result+=(QCString)" für "+s;
+ if (!s.isEmpty()) result+=" für "+s;
result+=" aus dem Quellcode.";
return result;
}
virtual QCString trExampleDocumentation()
{ return "Dokumentation der Beispiele"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Zusätzliche Informationen"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Nachschlagewerk"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Erzeugt am "+date;
- if (!projName.isEmpty()) result+=(QCString)" für "+projName;
- result+=(QCString)" von";
+ QCString result="Erzeugt am "+date;
+ if (!projName.isEmpty()) result+=" für "+projName;
+ result+=" von";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"Klassendiagramm für "+clName+":";
+ return "Klassendiagramm für "+clName+":";
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "Nur für den internen Gebrauch."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Warnung"; }
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName+" ";
+ QCString result=clName+" ";
if (isTemplate) result+="Template-";
switch(compType)
{
virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,
bool single)
{ // single is true implies a single file
- static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
- QCString result=(QCString)"Die Dokumentation für diese";
+ bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ QCString result="Die Dokumentation für diese";
switch(compType)
{
- case ClassDef::Class: result+=vhdlOpt?"Entwurfseinheiten":"Klasse"; break;
+ case ClassDef::Class: result+=vhdlOpt?" Entwurfseinheiten":" Klasse"; break;
case ClassDef::Struct: result+=" Struktur"; break;
case ClassDef::Union: result+=" Variante"; break;
case ClassDef::Interface: result+=" Schnittstelle"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Zusammengehörigkeiten von "+clName+":";
+ return "Zusammengehörigkeiten von "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Include-Abhängigkeitsdiagramm für "+fName+":";
+ return "Include-Abhängigkeitsdiagramm für "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Paket "+name;
+ return "Paket "+name;
}
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Paketliste";
- }
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Paketfunktionen";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Paketelemente";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Statische Paketfunktionen";
}
virtual QCString trDirectories()
{ return "Verzeichnisse"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Diese Verzeichnishierarchie ist -mit Einschränkungen- "
- "alphabetisch sortiert:";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
result += "-";
switch(compType)
{
bool single)
{
// single is true implies a single file
- QCString result=(QCString)"Die Dokumentation für ";
+ QCString result="Die Dokumentation für ";
switch(compType)
{
case ClassDef::Class: result+="dieses Modul"; break;
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)"Datei in "+name;
+ return "Datei in "+name;
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)"Include-Dateien in "+name;
+ return "Include-Dateien in "+name;
}
/** Compiles a date string.
/** UNO IDL service page title */
virtual QCString trServiceReference(const QCString &sName)
{
- QCString result=(QCString)sName;
+ QCString result=sName;
result+=" Dienstreferenz";
return result;
}
/** UNO IDL singleton page title */
virtual QCString trSingletonReference(const QCString &sName)
{
- QCString result=(QCString)sName;
+ QCString result=sName;
result+=" Singleton-Referenz";
return result;
}
/** UNO IDL service page */
virtual QCString trServiceGeneratedFromFiles(bool single)
{
- QCString result=(QCString)"Die Dokumentation für diesen Dienst "
+ QCString result="Die Dokumentation für diesen Dienst "
"wurde generiert aus ";
if (single) result+="folgender Datei: "; else result+="folgenden Dateien: ";
return result;
/** UNO IDL singleton page */
virtual QCString trSingletonGeneratedFromFiles(bool single)
{
- QCString result=(QCString)"Die Dokumentation für diesen Singleton wurde generiert aus ";
+ QCString result="Die Dokumentation für diesen Singleton wurde generiert aus ";
if (single) result+="folgender Datei:"; else result+="folgenden Dateien:";
return result;
}
{
return "da";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x406 Danish";
+ }
// --- Language translation methods -------------------
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Automatisk genereret af Doxygen";
- if (!s.isEmpty()) result+=(QCString)" for "+s;
+ if (!s.isEmpty()) result+=" for "+s;
result+=" ud fra kildekoden.";
return result;
}
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ {
return "Datastruktur-documentation";
- } else {
+ }
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
+ else
+ {
return "Klasse-dokumentation";
}
}
virtual QCString trExampleDocumentation()
{ return "Eksempel-dokumentation"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Side-dokumentation"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Referencemanual"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Genereret "+date;
- if (!projName.isEmpty()) result+=(QCString)" for "+projName;
- result+=(QCString)" af";
+ QCString result="Genereret "+date;
+ if (!projName.isEmpty()) result+=" for "+projName;
+ result+=" af";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"Stamtræ for "+clName+":";
+ return "Stamtræ for "+clName+":";
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "Kun til intern brug."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Advarsel"; }
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName+" ";
+ QCString result=clName+" ";
switch(compType)
{
case ClassDef::Class: result+=" Klasse-"; break;
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Dokumentationen for denne ";
+ QCString result="Dokumentationen for denne ";
switch(compType)
{
case ClassDef::Class: result+="klasse"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Samarbejdsdiagram for "+clName+":";
+ return "Samarbejdsdiagram for "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Inklusions-afhængighedsgraf for "+fName+":";
+ return "Inklusions-afhængighedsgraf for "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Pakke "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Pakkeoversigt";
+ return "Pakke "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/* Java: Entities with package scope... */
virtual QCString trPackageTypes()
{ return "Typer med pakke-scope"; }
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{ return "Metoder med pakke-scope"; }
- virtual QCString trStaticPackageMembers()
+ virtual QCString trPackageMembers()
+ { return "Medlemmer med pakke-scope"; }
+ virtual QCString trStaticPackageFunctions()
{ return "Statiske metoder med pakke-scope"; }
virtual QCString trPackageAttribs()
{ return "Attributter med pakke-scope"; }
virtual QCString trDirectories()
{ return "Kataloger"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Denne katalogstruktur er sorteret næsten - "
- "men ikke nødvendigvis helt - alfabetisk:";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" Modul"; break; // " Module"
bool single)
{
// single is true implies a single file
- QCString result=(QCString)"The documentation for this ";
+ QCString result="The documentation for this ";
switch(compType)
{
case ClassDef::Class: result+="modul"; break; // "module"
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)"File i "+name; // "File in "
+ return "File i "+name; // "File in "
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)"Inkluderer file i "+name; // "Includes file in "
+ return "Inkluderer file i "+name; // "Includes file in "
}
/** Compiles a date string.
const char* base, const char* plurSuffix)
{
QCString result(base);
- if (first_capital) result[0] = (char)toupper(result[0]);
+ if (first_capital) result[0] = static_cast<char>(toupper(result[0]));
if (!singular) result+=plurSuffix;
return result;
}
return "en-US";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x409 English (United States)";
+ }
// --- Language translation methods -------------------
/*! used in the compound documentation before a list of related functions. */
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Generated automatically by Doxygen";
- if (!s.isEmpty()) result+=(QCString)" for "+s;
+ if (!s.isEmpty()) result+=" for "+s;
result+=" from the source code.";
return result;
}
virtual QCString trExampleDocumentation()
{ return "Example Documentation"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Page Documentation"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Reference Manual"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Generated on "+date;
- if (!projName.isEmpty()) result+=(QCString)" for "+projName;
- result+=(QCString)" by";
+ QCString result="Generated on "+date;
+ if (!projName.isEmpty()) result+=" for "+projName;
+ result+=" by";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"Inheritance diagram for "+clName+":";
+ return "Inheritance diagram for "+clName+":";
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "For internal use only."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Warning"; }
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" Class"; break;
virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,
bool single)
{ // single is true implies a single file
- static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
- QCString result=(QCString)"The documentation for this ";
+ bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ QCString result="The documentation for this ";
switch(compType)
{
case ClassDef::Class: result+=vhdlOpt?"design unit":"class"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Collaboration diagram for "+clName+":";
+ return "Collaboration diagram for "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Include dependency graph for "+fName+":";
+ return "Include dependency graph for "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Package "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Package List";
+ return "Package "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Package Functions";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Package Members";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Static Package Functions";
}
virtual QCString trDirectories()
{ return "Directories"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "This directory hierarchy is sorted roughly, "
- "but not completely, alphabetically:";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" Module"; break;
bool single)
{
// single is true implies a single file
- QCString result=(QCString)"The documentation for this ";
+ QCString result="The documentation for this ";
switch(compType)
{
case ClassDef::Class: result+="module"; break;
/*! directory relation for \a name */
virtual QCString trDirRelation(const QCString &name)
{
- return QCString(name)+" Relation";
+ return name+" Relation";
}
/*! Loading message shown when loading search results */
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)"File in "+name;
+ return "File in "+name;
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)"Includes file in "+name;
+ return "Includes file in "+name;
}
/** Compiles a date string.
/*! Header for the graph showing the directory dependencies */
virtual QCString trDirDepGraph(const QCString &name)
- { return QCString("Directory dependency graph for ")+name+":"; }
+ { return "Directory dependency graph for "+name+":"; }
//////////////////////////////////////////////////////////////////////////
// new since 1.8.0
/*! Header of a Java enum page (Java enums are represented as classes). */
virtual QCString trEnumReference(const QCString &name)
- { return QCString(name)+" Enum Reference"; }
+ { return name+" Enum Reference"; }
/*! Used for a section containing inherited members */
virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
- { return QCString(members)+" inherited from "+what; }
+ { return members+" inherited from "+what; }
/*! Header of the sections with inherited members specific for the
* base class(es)
/** UNO IDL service page title */
virtual QCString trServiceReference(const QCString &sName)
{
- QCString result=(QCString)sName;
+ QCString result=sName;
result+=" Service Reference";
return result;
}
/** UNO IDL singleton page title */
virtual QCString trSingletonReference(const QCString &sName)
{
- QCString result=(QCString)sName;
+ QCString result=sName;
result+=" Singleton Reference";
return result;
}
virtual QCString trServiceGeneratedFromFiles(bool single)
{
// single is true implies a single file
- QCString result=(QCString)"The documentation for this service "
- "was generated from the following file";
+ QCString result="The documentation for this service "
+ "was generated from the following file";
if (single) result+=":"; else result+="s:";
return result;
}
virtual QCString trSingletonGeneratedFromFiles(bool single)
{
// single is true implies a single file
- QCString result=(QCString)"The documentation for this singleton "
- "was generated from the following file";
+ QCString result="The documentation for this singleton "
+ "was generated from the following file";
if (single) result+=":"; else result+="s:";
return result;
}
}
}
virtual QCString trCustomReference(const QCString &name)
- { return QCString(name)+" Reference"; }
+ { return name+" Reference"; }
/* Slice */
virtual QCString trConstants()
}
virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
if (isLocal) result+=" Local";
switch(compType)
{
{
return "Concept definition";
}
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.9.4
+//////////////////////////////////////////////////////////////////////////
+
+ virtual QCString trPackageList()
+ { return "Package List"; }
};
#endif
files frees the maintainer from thinking about whether the
first, the second, or both files should be included or not, and
why. This holds namely for localized translators because their
- base class is changed occasionaly to adapter classes when the
+ base class is changed occasionally to adapter classes when the
Translator class changes the interface, or back to the
Translator class (by the local maintainer) when the localized
translator is made up-to-date again.
return "eo";
}
+ // using fallback see translator.h
+ virtual QCString getLanguageString()
+ {
+ return "0x409 English (United States)";
+ }
// --- Language translation methods -------------------
/*! used in the compound documentation before a list of related functions. */
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Generita aŭtomate de Doxygen";
- if (!s.isEmpty()) result+=(QCString)" por "+s;
+ if (!s.isEmpty()) result+=" por "+s;
result+=" el la fontkodo.";
return result;
}
{
return "Datumstruktura Dokumentado";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "Klasa Dokumentado";
virtual QCString trExampleDocumentation()
{ return "Ekzempla Dokumentado"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Paĝa Dokumentado"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Referenca Manlibro"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Generita la "+date;
- if (!projName.isEmpty()) result+=(QCString)" por "+projName;
- result+=(QCString)" de";
+ QCString result="Generita la "+date;
+ if (!projName.isEmpty()) result+=" por "+projName;
+ result+=" de";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"Heredada diagramo por "+clName+":";
+ return "Heredada diagramo por "+clName+":";
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "Nur por ena uzado."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Averto"; }
case ClassDef::Exception: result+="escepto "; break;
default: break;
}
- result+=(QCString)clName;
+ result+=clName;
return result;
}
virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,
bool single)
{ // single is true implies a single file
- QCString result=(QCString)"La dokumentado por tiu ĉi ";
+ QCString result="La dokumentado por tiu ĉi ";
switch(compType)
{
case ClassDef::Class: result+="klaso"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Kunlaborada diagramo por "+clName+":";
+ return "Kunlaborada diagramo por "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Inkluzivaĵa dependeca diagramo por "+fName+":";
+ return "Inkluzivaĵa dependeca diagramo por "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Pakaĵo "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Pakaĵa Listo";
+ return "Pakaĵo "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Pakaĵaj Funkcioj";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Pakaĵaj Membroj";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Statikaj Pakaĵaj Funkcioj";
}
virtual QCString trDirectories()
{ return "Dosierujoj"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Tiu ĉi dosieruja hierarkio estas plimalpli, "
- "sed ne tute, ordigita alfabete:";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
case ClassDef::Exception: result+="escepto "; break;
default: break;
}
- result+=(QCString)clName;
+ result+=clName;
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
bool single)
{
// single is true implies a single file
- QCString result=(QCString)"La dokumentado por tiu ĉi ";
+ QCString result="La dokumentado por tiu ĉi ";
switch(compType)
{
case ClassDef::Class: result+="modulo"; break;
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)"Dosiero en "+name;
+ return "Dosiero en "+name;
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)"Inkluzivas dosieron en "+name;
+ return "Inkluzivas dosieron en "+name;
}
/** Compiles a date string.
{
return "Dokumentaro de la Metodo";
}
-
- /*! Used as the title of the design overview picture created for the
- * VHDL output.
- */
- virtual QCString trDesignOverview()
- {
- return "Fasona Superrigardo";
- }
-
};
#endif
{
return "es";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x40A Spanish(Traditional Sort)";
+ }
// --- Language translation methods -------------------
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Generado automáticamente por Doxygen";
- if (!s.isEmpty()) result+=(QCString)" para "+s;
+ if (!s.isEmpty()) result+=" para "+s;
result+=" del código fuente.";
return result;
}
{
return "Documentación de las estructuras de datos";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "Documentación de las clases";
virtual QCString trExampleDocumentation()
{ return "Documentación de ejemplos"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Documentación de páginas"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Manual de referencia"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Generado el "+date;
- if (!projName.isEmpty()) result+=(QCString)" para "+projName;
- result+=(QCString)" por";
+ QCString result="Generado el "+date;
+ if (!projName.isEmpty()) result+=" para "+projName;
+ result+=" por";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"Diagrama de herencias de "+clName;
+ return "Diagrama de herencias de "+clName;
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "Sólo para uso interno."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Atención"; }
case ClassDef::Exception: result+=" la Excepción "; break;
default: break;
}
- result+=(QCString)clName;
+ result+=clName;
return result;
}
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
- QCString result=(QCString)"La documentación para est";
+ bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ QCString result="La documentación para est";
switch(compType)
{
case ClassDef::Class: result+=vhdlOpt? "a unidades de diseño":"a clase"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Diagrama de colaboración para "+clName+":";
+ return "Diagrama de colaboración para "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Dependencia gráfica adjunta para "+fName+":";
+ return "Dependencia gráfica adjunta para "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Paquetes "+name;
+ return "Paquetes "+name;
}
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Lista de Paquetes ";
- }
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Funciones del 'package'";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Miembros del 'package'";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Funciones estáticas del 'package'";
}
virtual QCString trDirectories()
{ return "Directorios"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "La jeraquía de este directorio está ordenada"
- " alfabéticamente, de manera aproximada:";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
case ClassDef::Exception: result+=" la excepción"; break;
default: break;
}
- result+=(QCString)clName;
+ result+=clName;
return result;
}
bool single)
{ // here s is one of " Module", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"La documentación para est";
+ QCString result="La documentación para est";
switch(compType)
{
case ClassDef::Class: result+="e módulo"; break;
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)"Fichero en "+name;
+ return "Fichero en "+name;
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)"Incluye ficheros en "+name;
+ return "Incluye ficheros en "+name;
}
/** Compiles a date string.
/** UNO IDL service page title */
virtual QCString trServiceReference(const QCString &sName)
{
- QCString result=(QCString)sName;
+ QCString result=sName;
result+=" Referencia servicio";
return result;
}
/** UNO IDL singleton page title */
virtual QCString trSingletonReference(const QCString &sName)
{
- QCString result=(QCString)sName;
+ QCString result=sName;
result+=" referencia Singleton";
return result;
}
virtual QCString trServiceGeneratedFromFiles(bool single)
{
// single is true implies a single file
- QCString result=(QCString)"La documentacion para este servicio "
+ QCString result="La documentacion para este servicio "
"se ha generado desde ";
if (single) result+="el siguiente fichero:"; else result+="los siguientes ficheros:";
return result;
virtual QCString trSingletonGeneratedFromFiles(bool single)
{
// single is true implies a single file
- QCString result=(QCString)"La documentación para este singleton "
+ QCString result="La documentación para este singleton "
"se ha generado desde ";
if (single) result+="el siguiente fichero:"; else result+="los siguientes ficheros:";
return result;
default: break;
}
if (isLocal) result+=" Local";
- result+=(QCString)clName;
+ result+=clName;
return result;
}
virtual QCString trOperations()
return "fa";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x429 Persian (Iran)";
+ }
// --- Language translation methods -------------------
/*! used in the compound documentation before a list of related functions. */
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="تولید شده توسط نرم افزار دی اکسیژن ";
- if (!s.isEmpty()) result+=(QCString)" برای "+s;
+ if (!s.isEmpty()) result+=" برای "+s;
result+=" از کد برنامه ";
return result;
}
{
return "مستندات ساختار داده ها";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "مستندات کلاس ها";
virtual QCString trExampleDocumentation()
{ return "مستندات مثال"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "مستندات صفحه"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "راهنمای مرجع"; }
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result = HtmlDivEnd + HtmlRightToLeft + QCString("توليد شده در ") +date ;
- if (!projName.isEmpty()) result+=(QCString)" برای "+projName;
- result+=(QCString)" توسط";
+ if (!projName.isEmpty()) result+=" برای "+projName;
+ result+=" توسط";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)""+clName+" نمودار وراثت برای :";
+ return ""+clName+" نمودار وراثت برای :";
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return ".فقط برای استعمال داخلی"; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "اخطار"; }
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"مستندات اين ";
+ QCString result="مستندات اين ";
switch(compType)
{
case ClassDef::Class: result+="کلاس"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Collaboration diagram for "+clName+":";
+ return "Collaboration diagram for "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"نمودار شامل شدن ها برای "+fName+":";
+ return "نمودار شامل شدن ها برای "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Package "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "لیست بسته ها";
+ return "Package "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "توابع بسته ها";
}
+ virtual QCString trPackageMembers()
+ {
+ return "عضوها بسته ها";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Static Package Functions";
}
virtual QCString trDirectories()
{ return "شاخه ها"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "در ذيل ساختار شاخه ها و دايرکتوری ها را نسبتا مرتب شده می بينيد :";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" Module"; break;
bool single)
{ // here s is one of " Module", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"The documentation for this ";
+ QCString result="The documentation for this ";
switch(compType)
{
case ClassDef::Class: result+="module"; break;
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)"پرونده ای در "+name;
+ return "پرونده ای در "+name;
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)"Includes file in "+name;
+ return "Includes file in "+name;
}
/** Compiles a date string.
class TranslatorFinnish : public TranslatorAdapter_1_6_0
{
public:
- /*! This method is used to generate a warning message to signal
- * the user that the translation of his/her language of choice
- * needs updating.
- */
- /*virtual QCString updateNeededMessage()
- {
- return "The Finnish translator is really obsolete.\n"
- "It was not updated since version 1.0.0. As a result,\n"
- "some sentences may appear in English.\n\n";
- }*/
-
// --- Language control methods -------------------
/*! Used for identification of the language. The identification
{
return "fi";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x40B Finnish";
+ }
// --- Language translation methods -------------------
/*! used in the compound documentation before a list of related functions. */
* parameter s is name of the project name.
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
- { QCString result=(QCString)"Automaattisesti luotu Doxygenilla "
+ { QCString result="Automaattisesti luotu Doxygenilla "
"lähdekoodista projektille "+s; // "Generated automatically by Doxygen" ... "for" ... "from the sourcecode"
- //if (s) result+=(QCString)" voor "+s;
+ //if (s) result+=" voor "+s;
// tässä on ongelma, kuinka taivuttaa parametria, esim. "Jcad"+"in"; "IFC2VRML konversio"+"n"
// mutta ratkaistaan ongelma kätevästi kaksoispisteellä -> "Jcad:n" / "IFC2VRML konversio:n"
// lopputulos on vähemmän kökkö ja täysin luettava, mutta ei kuitenkaan täydellinen.
{
return "Tietueiden dokumentaatio"; // "Data Structure Documentation"
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "Luokkien dokumentaatio"; // "Class Documentation"
virtual QCString trExampleDocumentation()
{ return "Esimerkkien dokumentaatio"; } // "Example Documentation"
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Sivujen dokumentaatio"; } // "Page Documentation"
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Käsikirja"; } // "Reference Manual"
// Muutetaan siis lauserakennetta suomalaisemmaksi
// Generated on $date for $project by:
// -> Generated for $project on $date by:
- QCString result=(QCString)"Generoinut ";
- if (!projName.isEmpty()) result+=(QCString)"projektille "+projName+" ";
- result+=(QCString)date+" ";
+ QCString result="Generoinut ";
+ if (!projName.isEmpty()) result+="projektille "+projName+" ";
+ result+=date+" ";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return "Luokan "+(QCString)clName+" luokkakaavio"; // "Inheritance diagram for "
+ return "Luokan "+clName+" luokkakaavio"; // "Inheritance diagram for "
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "Vain sisäiseen käyttöön."; } // "For internal use only."
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Varoitus"; } // "Warning"
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" luokka"; break; // " Class"
*/
virtual QCString trInheritsList(int numEntries)
{
- return (QCString)"Periytyy "+(numEntries > 1 ? "luokista " : "luokasta ")+trWriteList(numEntries)+"."; // "Inherits "
+ return QCString("Periytyy ")+(numEntries > 1 ? "luokista " : "luokasta ")+trWriteList(numEntries)+"."; // "Inherits "
}
/*! used in class documentation to produce a list of super classes,
*/
virtual QCString trInheritedByList(int numEntries)
{
- return (QCString)"Periytetään "+(numEntries > 1 ? "luokissa " : "luokassa ")+trWriteList(numEntries)+"."; // "Inherited by "
+ return QCString("Periytetään ")+(numEntries > 1 ? "luokissa " : "luokassa ")+trWriteList(numEntries)+"."; // "Inherited by "
}
/*! used in member documentation blocks to produce a list of
*/
virtual QCString trReimplementedFromList(int numEntries)
{
- return (QCString)"Uudelleentoteuttaa "+(numEntries > 1 ? "luokat " : "luokan ")+trWriteList(numEntries)+"."; // "Reimplemented from "
+ return QCString("Uudelleentoteuttaa ")+(numEntries > 1 ? "luokat " : "luokan ")+trWriteList(numEntries)+"."; // "Reimplemented from "
}
/*! used in member documentation blocks to produce a list of
*/
virtual QCString trReimplementedInList(int numEntries)
{
- return (QCString)"Uudelleentoteutetaan "+(numEntries > 1 ? "luokissa " : "luokassa ")+trWriteList(numEntries)+"."; // "Reimplemented in "
+ return QCString("Uudelleentoteutetaan ")+(numEntries > 1 ? "luokissa " : "luokassa ")+trWriteList(numEntries)+"."; // "Reimplemented in "
}
/*! This is put above each page as a link to all members of namespaces. */
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Dokumentaatio tälle "; // "The documentation for this "
+ QCString result="Dokumentaatio tälle "; // "The documentation for this "
switch(compType)
{
case ClassDef::Class: result+="luokalle"; break; // "class"
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Yhteistyökaavio luokalle "+clName+":"; // "Collaboration diagram for "+clName+":"
+ return "Yhteistyökaavio luokalle "+clName+":"; // "Collaboration diagram for "+clName+":"
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Sisällytysriippuvuuskaavio tiedostolle "+fName+":"; // "Include dependency graph for "+fName+":"
+ return "Sisällytysriippuvuuskaavio tiedostolle "+fName+":"; // "Include dependency graph for "+fName+":"
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Paketti "+name; // "Package "
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Pakettilista"; // "Package List"
+ return "Paketti "+name; // "Package "
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Paketin funktiot"; // "Package Functions"
}
+ virtual QCString trPackageMembers()
+ {
+ return "Paketin jäsenet"; // "Package Members"
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Paketin staattiset funktiot"; // "Static Package Functions"
}
virtual QCString trDirectories()
{ return "Hakemistot"; } // "Directories"
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Tämä hakemistohierarkia on järjestetty aakkosellisesti tasoittain:";
- //This directory hierarchy is sorted roughly, "
- // "but not completely, alphabetically:";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" moduuli"; break; // " Module"
bool single)
{ // here s is one of " Module", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Dokumentaatio tälle "; // "The documentation for this "
+ QCString result="Dokumentaatio tälle "; // "The documentation for this "
switch(compType)
{
case ClassDef::Class: result+="moduulille"; break; // "module"
// files frees the maintainer from thinking about whether the
// first, the second, or both files should be included or not, and
// why. This holds namely for localized translators because their
-// base class is changed occasionaly to adapter classes when the
+// base class is changed occasionally to adapter classes when the
// Translator class changes the interface, or back to the
// Translator class (by the local maintainer) when the localized
// translator is made up-to-date again.
{
return "fr";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x40C French";
+ }
// --- Language translation methods -------------------
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Généré automatiquement par Doxygen";
- if (!s.isEmpty()) result+=(QCString)" pour "+s;
+ if (!s.isEmpty()) result+=" pour "+s;
result+=" à partir du code source.";
return result;
}
{
return "Documentation des structures de données";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "Documentation des classes";
virtual QCString trExampleDocumentation()
{ return "Documentation des exemples"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Documentation des pages associées"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Manuel de référence"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Généré le "+date;
- if (!projName.isEmpty()) result+=(QCString)" pour "+projName;
- result+=(QCString)" par";
+ QCString result="Généré le "+date;
+ if (!projName.isEmpty()) result+=" pour "+projName;
+ result+=" par";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"Graphe d'héritage de "+clName+":";
+ return "Graphe d'héritage de "+clName+":";
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "Pour un usage interne uniquement."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Avertissement"; }
case ClassDef::Exception: result+="l'exception "; break;
default: break;
}
- result+=(QCString)clName;
+ result+=clName;
return result;
}
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
bool feminine = true;
- QCString result=(QCString)"La documentation de ";
+ QCString result="La documentation de ";
switch(compType)
{
case ClassDef::Class: result+=vhdlOpt? "cette unités de conception":"cette classe"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Graphe de collaboration de "+clName+":";
+ return "Graphe de collaboration de "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Graphe des dépendances par inclusion de "+fName+":";
+ return "Graphe des dépendances par inclusion de "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Paquetage "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Liste des paquetages";
+ return "Paquetage "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Fonctions de paquetage";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Membres de paquetage";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Fonctions statiques de paquetage";
}
virtual QCString trDirectories()
{ return "Répertoires"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Cette hiérarchie de répertoire est triée approximativement, "
- "mais pas complètement, par ordre alphabétique :";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
case ClassDef::Exception: result+="de l'exception "; break;
default: break;
}
- result+=(QCString)clName;
+ result+=clName;
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
bool single)
{
// single is true implies a single file
- QCString result=(QCString)"La documentation de ";
+ QCString result="La documentation de ";
switch(compType)
{
case ClassDef::Class: result+="ce module"; break;
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)"Fichier dans "+name;
+ return "Fichier dans "+name;
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)"Inclut le fichier dans "+name;
+ return "Inclut le fichier dans "+name;
}
/** Compiles a date string.
virtual QCString trServiceReference(const QCString &sName)
{
QCString result="Référence du service ";
- result+=(QCString)sName;
+ result+=sName;
return result;
}
/** UNO IDL singleton page title */
virtual QCString trSingletonReference(const QCString &sName)
{
QCString result="Référence du singleton ";
- result+=(QCString)sName;
+ result+=sName;
return result;
}
/** UNO IDL service page */
virtual QCString trServiceGeneratedFromFiles(bool single)
{
// single is true implies a single file
- QCString result=(QCString)"La documentation pour ce service "
+ QCString result="La documentation pour ce service "
"a été générée par ";
if (single) result+="le fichier suivant :"; else result+="les fichiers suivants :";
return result;
virtual QCString trSingletonGeneratedFromFiles(bool single)
{
// single is true implies a single file
- QCString result=(QCString)"La documentation pour ce singleton "
+ QCString result="La documentation pour ce singleton "
"a été générée par ";
if (single) result+="le fichier suivant :"; else result+="les fichiers suivants :";
return result;
result += (feminine) ? "locale " : "local ";
}
- result += (QCString)clName;
+ result += clName;
return result;
}
#ifndef TRANSLATOR_GR_H
#define TRANSLATOR_GR_H
-class TranslatorGreek : public Translator
+class TranslatorGreek : public TranslatorAdapter_1_9_4
{
public:
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Δημιουργήθηκε αυτόματα από το Doxygen";
- if (!s.isEmpty()) result+=(QCString)" για "+s;
+ if (!s.isEmpty()) result+=" για "+s;
result+=" από τον πηγαίο κώδικα.";
return result;
}
{
return "Τεκμηρίωση Δομών Δεδομένων";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "Τεκμηρίωση Κλάσεων";
virtual QCString trExampleDocumentation()
{ return "Τεκμηρίωση Παραδειγμάτων"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Τεκμηρίωση Σελίδων"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Εγχειρίδιο Τεκμηρίωσης"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Δημιουργήθηκε στις "+date;
- if (!projName.isEmpty()) result+=(QCString)" για "+projName;
- result+=(QCString)" από";
+ QCString result="Δημιουργήθηκε στις "+date;
+ if (!projName.isEmpty()) result+=" για "+projName;
+ result+=" από";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"Διάγραμμα κληρονομικότητας για την "+clName+":";
+ return "Διάγραμμα κληρονομικότητας για την "+clName+":";
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "Μόνο για εσωτερική χρήση."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Προειδοποίηση"; }
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)"Τεκμηρίωση";
+ QCString result="Τεκμηρίωση";
if (isTemplate) result+=" Προτύπου";
switch(compType)
{
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Η τεκμηρίωση για ";
+ QCString result="Η τεκμηρίωση για ";
switch(compType)
{
case ClassDef::Class: result+="αυτή την κλάση"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Διάγραμμα Συνεργασίας για την κλάση "+clName+":";
+ return "Διάγραμμα Συνεργασίας για την κλάση "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Διάγραμμα εξάρτησης αρχείου συμπερίληψης για το "+fName+":";
+ return "Διάγραμμα εξάρτησης αρχείου συμπερίληψης για το "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Πακέτο "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Λίστα Πακέτων";
+ return "Πακέτο "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
{
return "Ευρετήριο";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x408 Greece";
+ }
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Συναρτήσεις Πακέτου";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Μέλη Πακέτου";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Στατικές Συναρτήσεις Πακέτου";
}
virtual QCString trDirectories()
{ return "Κατάλογοι"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- {
- return "Η ιεραρχία καταλόγων ταξινομήθηκε αλφαβητικά, αλλά όχι πολύ αυστηρά:";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" Υπομονάδα"; break;
bool single)
{ // here s is one of " Module", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Η τεκμηρίωση για ";
+ QCString result="Η τεκμηρίωση για ";
switch(compType)
{
case ClassDef::Class: result+="αυτή την υπομονάδα"; break;
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)"Αρχείο σε "+name;
+ return "Αρχείο σε "+name;
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)"Εσωκλείει το αρχείο στο "+name;
+ return "Εσωκλείει το αρχείο στο "+name;
}
/** Compiles a date string.
/** UNO IDL service page title */
virtual QCString trServiceReference(const QCString &sName)
{
- QCString result=(QCString)sName;
+ QCString result=sName;
result+=" Τεκμηρίωση Υπηρεσίας";
return result;
}
/** UNO IDL singleton page title */
virtual QCString trSingletonReference(const QCString &sName)
{
- QCString result=(QCString)sName;
+ QCString result=sName;
result+=" Τεκμηρίωση Μονοσύνολου";
return result;
}
virtual QCString trServiceGeneratedFromFiles(bool single)
{
// single is true implies a single file
- QCString result=(QCString)"Η τεκμηρίωση για την υπηρεσία αυτή "
+ QCString result="Η τεκμηρίωση για την υπηρεσία αυτή "
"δημιουργήθηκε από ";
if (single) result+="το ακόλουθο αρχείο:"; else result+="τα ακόλουθα αρχεία:";
return result;
virtual QCString trSingletonGeneratedFromFiles(bool single)
{
// single is true implies a single file
- QCString result=(QCString)"Η τεκμηρίωση για αυτό το μονοσύνολο "
+ QCString result="Η τεκμηρίωση για αυτό το μονοσύνολο "
"δημιουργήθηκε από ";
if (single) result+="το ακόλουθο αρχείο:"; else result+="τα ακόλουθα αρχεία:";
return result;
--- /dev/null
+/******************************************************************************
+ *
+ *
+ *
+ * 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
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+/* English to Hindi keyword dictionary
+ * alias = उपनाम
+ * alias = उपनामगण
+ * architecture = वास्तुकला
+ * architectures = वास्तुकलाएं
+ * argument = तर्क
+ * arguments = तर्कगण
+ * attribute = गुण
+ * attrubutes = गुणगण
+ * category = श्रेणी
+ * categories = श्रेणीयाँ
+ * code = संकेत-लिपि
+ * codes = संकेत-लिपियाॅं
+ * component = अंग
+ * components = अंगगण
+ * concept = संकल्पना
+ * concepts = संकल्पनाएं
+ * configuration = विन्यास
+ * configurations = विन्यासगण
+ * const/constant = स्थिर
+ * consts/constants = स्थिरगण
+ * constructor = निर्माता
+ * class = वर्ग
+ * classes = वर्गगण
+ * datum = आंकड़ा
+ * data = आंकड़े
+ * data structure = आंकड़ा संरचना (datum structure)
+ * data structures = आंकड़े संरचनाएं
+ * destructor = नाशक
+ * directory = निर्देशिका
+ * directories = निर्देशिकाएं
+ * doxygen = डाॅक्सिजन
+ * entity = इकाइ
+ * entities = इकाइयाॅं
+ * enum/enumerator = परिगणक
+ * enumeration = परिगणना
+ * event = घटना
+ * events = घटनाएं
+ * example = उदाहरण
+ * examples = उदाहरणगण
+ * exception = अपवाद
+ * exceptions = अपवादगण
+ * field = भाग
+ * fields = भागगण
+ * file = फ़ाइल
+ * friend = मित्र
+ * friends = मित्रगण
+ * function/routine = फलन
+ * functions/routines = फलनगण
+ * global = वैश्र्विक
+ * globals = वैश्र्विकगण
+ * group = समूह
+ * groups = समूहगण
+ * instance = उदाहरण
+ * instances = उदाहरणगण
+ * instantiation = उदाहरणीकरण
+ * instantiations = उदाहरणीकरणगण
+ * interface = अंतराफलक
+ * interfaces = अंतराफलकगण
+ * inherit =
+ * inheritance = वरासत
+ * inherited = वरासित
+ * library = संग्रह
+ * libraries = संग्रहगण
+ * member = सदस्य
+ * members = सदस्यगण
+ * method = विधि
+ * methods = विधियाँ
+ * module = अनुखंड
+ * modules = अनुखंडगण
+ * namespace = नाम-स्थान
+ * operation = कार्यवाही
+ * operations = कार्यवाहीयाँ
+ * overload = अधिभार
+ * overloaded = अधिभारित
+ * package = संकुल
+ * packages = संकुलगण
+ * page = पृष्ठ
+ * pages = पृष्ठगण
+ * parameter = मापदंड
+ * parameters = मापदंडगण
+ * port = द्वार
+ * ports = द्वारगण
+ * private = निजी
+ * procedure = कार्यविधि
+ * procedures = कार्यविधियाँ
+ * process = प्रक्रिया
+ * processes = प्रक्रियाएं
+ * property = संपत्ति
+ * properties = संपत्तियाँ
+ * protected = संरक्षित
+ * protocol = प्रोटोकॉल
+ * public = सार्वजनिक
+ * record = अभिलेख
+ * records = अभिलेखगण
+ * shared = साझाकृत
+ * search = खोजें
+ * service = सेवा
+ * services = सेवाएं
+ * singleton = एकल
+ * singletons = एकलगण
+ * static = अचल
+ * struct/structure = संरचना
+ * structs/structures = संरचनाएं
+ * subfunction/subroutine = उपफलन
+ * subfunctions/subroutines = उपफलनगण
+ * subtype = उपप्ररुप
+ * subtypes = उपप्ररुपगण
+ * super = उत्तम
+ * synchronize = सिंक्रनाइज़
+ * synchronization = सिंक्रनाइज़ीकरण
+ * template = टेम्पलेट
+ * templates = टेम्पलेटगण
+ * typedef = प्ररुप-परिभाषा
+ * typedefs = प्ररुप-परिभाषागण
+ * union = मिलन
+ * unions = मिलनगण
+ * variable = परिवर्तनशील
+ * variables = परिवर्तनशीलगण
+ */
+
+#ifndef TRANSLATOR_HI_H
+#define TRANSLATOR_HI_H
+
+/*!
+ It is not necessary to include "translator.h" or
+ "translator_adapter.h" here. The files are included in the
+ language.cpp correctly. Not including any of the mentioned
+ files frees the maintainer from thinking about whether the
+ first, the second, or both files should be included or not, and
+ why. This holds namely for localized translators because their
+ base class is changed occasionally to adapter classes when the
+ Translator class changes the interface, or back to the
+ Translator class (by the local maintainer) when the localized
+ translator is made up-to-date again.
+*/
+class TranslatorHindi : public TranslatorAdapter_1_9_4
+{
+ public:
+
+ // --- Language control methods -------------------
+
+ /*! Used for identification of the language. The identification
+ * should not be translated. It should be replaced by the name
+ * of the language in English using lower-case characters only
+ * (e.g. "czech", "japanese", "russian", etc.). It should be equal to
+ * the identification used in language.cpp.
+ */
+ virtual QCString idLanguage()
+ { return "hindi"; }
+
+ /*! Used to get the LaTeX command(s) for the language support.
+ * This method should return string with commands that switch
+ * LaTeX to the desired language. For example
+ * <pre>"\\usepackage[german]{babel}\n"
+ * </pre>
+ * or
+ * <pre>"\\usepackage{polski}\n"
+ * "\\usepackage[latin2]{inputenc}\n"
+ * "\\usepackage[T1]{fontenc}\n"
+ * </pre>
+ *
+ * The English LaTeX does not use such commands. Because of this
+ * the empty string is returned in this implementation.
+ */
+ virtual QCString latexLanguageSupportCommand()
+ { return ""; }
+
+ virtual QCString trISOLang()
+ { return "hi-IN"; }
+
+ virtual QCString getLanguageString()
+ { return "0x439 Hindi"; }
+
+ // --- Language translation methods -------------------
+
+ /*! used in the compound documentation before a list of related functions. */
+ virtual QCString trRelatedFunctions()
+ { return "संबंधित फलन"; }
+
+ /*! subscript for the related functions. */
+ virtual QCString trRelatedSubscript()
+ { return "(ध्यान दें कि ये सदस्य फलन नहीं हैं।)"; }
+
+ /*! header that is put before the detailed description of files, classes and namespaces. */
+ virtual QCString trDetailedDescription()
+ { return "विस्तृत विवरण"; }
+
+ /*! header that is put before the list of typedefs. */
+ virtual QCString trMemberTypedefDocumentation()
+ { return "सदस्य प्ररुप-परिभाषा दस्तावेज़ीकरण"; }
+
+ /*! header that is put before the list of enumerations. */
+ virtual QCString trMemberEnumerationDocumentation()
+ { return "सदस्य परिगणना दस्तावेज़ीकरण"; }
+
+ /*! header that is put before the list of member functions. */
+ virtual QCString trMemberFunctionDocumentation()
+ { return "सदस्य फलन दस्तावेज़ीकरण"; }
+
+ /*! header that is put before the list of member attributes. */
+ virtual QCString trMemberDataDocumentation()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ return "भाग दस्तावेज़ीकरण";
+ else
+ return "सदस्य आंकड़े दस्तावेज़ीकरण";
+ }
+
+ /*! this is the text of a link put after brief descriptions. */
+ virtual QCString trMore()
+ { return "और..."; }
+
+ /*! put in the class documentation */
+ virtual QCString trListOfAllMembers()
+ { return "सभी सदस्यों की सूची"; }
+
+ /*! used as the title of the "list of all members" page of a class */
+ virtual QCString trMemberList()
+ { return "सदस्य सूची"; }
+
+ /*! this is the first part of a sentence that is followed by a class name */
+ virtual QCString trThisIsTheListOfAllMembers()
+ { return "यह है सदस्यों की पूरी सूची "; }
+
+ /*! this is the remainder of the sentence after the class name */
+ virtual QCString trIncludingInheritedMembers()
+ { return ", सभी विरासत में मिले सदस्यों सहित।"; }
+
+ /*! this is put at the author sections at the bottom of man pages.
+ * parameter s is name of the project name.
+ */
+ virtual QCString trGeneratedAutomatically(const QCString &s)
+ {
+ QCString result = "स्रोत संकेत-लिपि से ";
+ if (!s.isEmpty())
+ result += s + " के लिए ";
+ result += "डॉक्सिजन द्वारा स्वचालित रूप से उत्पन्न किया गया।";
+ return result;
+ }
+
+ /*! put after an enum name in the list of all members */
+ virtual QCString trEnumName()
+ { return "परिगणक नाम"; }
+
+ /*! put after an enum value in the list of all members */
+ virtual QCString trEnumValue()
+ { return "परिगणक मूल्य"; }
+
+ /*! put after an undocumented member in the list of all members */
+ virtual QCString trDefinedIn()
+ { return "में परिभाषित"; }
+
+ // quick reference sections
+
+ /*! This is put above each page as a link to the list of all groups of
+ * compounds or files (see the \\group command).
+ */
+ virtual QCString trModules()
+ { return "अनुखंडगण"; }
+
+ /*! This is put above each page as a link to the class hierarchy */
+ virtual QCString trClassHierarchy()
+ { return "वर्ग पदानुक्रम"; }
+
+ /*! This is put above each page as a link to the list of annotated classes */
+ virtual QCString trCompoundList()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ return "आंकड़े संरचनाएं";
+ else
+ return "वर्ग सूची";
+ }
+
+ /*! This is put above each page as a link to the list of documented files */
+ virtual QCString trFileList()
+ { return "फ़ाइल सूची"; }
+
+ /*! This is put above each page as a link to all members of compounds. */
+ virtual QCString trCompoundMembers()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ return "आंकड़े भागगण";
+ else
+ return "वर्ग सदस्यगण";
+ }
+
+ /*! This is put above each page as a link to all members of files. */
+ virtual QCString trFileMembers()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ return "वैश्र्विकगण";
+ else
+ return "फ़ाइल सदस्यगण";
+ }
+
+ /*! This is put above each page as a link to all related pages. */
+ virtual QCString trRelatedPages()
+ { return "संबंधित पृष्ठगण"; }
+
+ /*! This is put above each page as a link to all examples. */
+ virtual QCString trExamples()
+ { return "उदाहरणगण"; }
+
+ /*! This is put above each page as a link to the search engine. */
+ virtual QCString trSearch()
+ { return "खोजें"; }
+
+ /*! This is an introduction to the class hierarchy. */
+ virtual QCString trClassHierarchyDescription()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ return "यहाँ वर्गगण की एक पदानुक्रमनुसार सूची दी गई है:";
+ else
+ return "यह वरासत सूची मोटे तौर पर क्रमबद्ध है, लेकिन पूरी तरह से नहीं, वर्णानुक्रम में:";
+ }
+
+ /*! This is an introduction to the list with all files. */
+ virtual QCString trFileListDescription(bool extractAll)
+ {
+ QCString result = "यहाँ संक्षिप्त विवरण के साथ सभी ";
+ if (!extractAll)
+ result += "दस्तावेज़ीकृत ";
+ result += "फ़ाइलों की सूची दी गई है:";
+ return result;
+ }
+
+ /*! This is an introduction to the annotated compound list. */
+ virtual QCString trCompoundListDescription()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ return "यहाँ संक्षिप्त विवरण के साथ आंकड़े संरचनाएँ हैं:";
+ else if (Config_getBool(OPTIMIZE_OUTPUT_SLICE))
+ return "यहाँ संक्षिप्त विवरण के साथ वर्गगण दी गई हैं:";
+ else
+ return "यहाँ संक्षिप्त विवरण के साथ सभी वर्गगण, संरचनाएं, मिलनगण और अंतराफलकगण की सूची दी गई हैं:";
+ }
+
+ /*! This is an introduction to the page with all class members. */
+ virtual QCString trCompoundMembersDescription(bool extractAll)
+ {
+ QCString result = "यहाँ सभी ";
+ if (!extractAll)
+ result += "दस्तावेज़ीकृत ";
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ result += "संरचना और मिलन भागगण";
+ else
+ result += "वर्ग सदस्यगण";
+ result += " कि लिंको के साथ ";
+ if (!extractAll)
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ result += "प्रत्येक भाग के संरचना/मिलन दस्तावेज़ीकरण ";
+ else
+ result += "प्रत्येक भाग के वर्ग दस्तावेज़ीकरण ";
+ }
+ else
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ result += "संबंधित संरचनाएं/मिलनगण ";
+ else
+ result += "संबंधित वर्गगण ";
+ }
+ result += "कि सूची दि गई हैं:";
+ return result;
+ }
+
+ /*! This is an introduction to the page with all file members. */
+ virtual QCString trFileMembersDescription(bool extractAll)
+ {
+ QCString result = "यहाँ सभी ";
+ if (!extractAll) result += "दस्तावेज़ीकृत ";
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ result += "फलनगण, परिवर्तनशीलगण, मैक्रोगण, परिगणकगण और प्ररुप-परिभाषाएं";
+ else
+ result += "फ़ाइल सदस्यगण";
+ result += " कि लिंको के साथ ";
+ if (extractAll)
+ result += "संबंधित फाइलों ";
+ else
+ result += "दस्तावेज़ीकरण ";
+ result += "कि सूची दि गई हैं:";
+ return result;
+ }
+
+ /*! This is an introduction to the page with the list of all examples */
+ virtual QCString trExamplesDescription()
+ { return "यहाँ सभी उदाहरणों की एक सूची दी गई है:"; }
+
+ /*! This is an introduction to the page with the list of related pages */
+ virtual QCString trRelatedPagesDescription()
+ { return "यहाँ सभी संबंधित दस्तावेज़ीकरण पृष्ठों की सूची दी गई है:"; }
+
+ /*! This is an introduction to the page with the list of class/file groups */
+ virtual QCString trModulesDescription()
+ { return "यहाँ सभी अनुखंडों की एक सूची है:"; }
+
+ // index titles (the project name is prepended for these)
+
+ /*! This is used in HTML as the title of index.html. */
+ virtual QCString trDocumentation()
+ { return "दस्तावेज़ीकरण"; }
+
+ /*! This is used in LaTeX as the title of the chapter with the
+ * index of all groups.
+ */
+ virtual QCString trModuleIndex()
+ { return "अनुखंड अनुक्रमणिका"; }
+
+ /*! This is used in LaTeX as the title of the chapter with the
+ * class hierarchy.
+ */
+ virtual QCString trHierarchicalIndex()
+ { return "पदानुक्रमनुसार अनुक्रमणिका"; }
+
+ /*! This is used in LaTeX as the title of the chapter with the
+ * annotated compound index.
+ */
+ virtual QCString trCompoundIndex()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ return "आंकड़े संरचना अनुक्रमणिका";
+ else
+ return "वर्ग अनुक्रमणिका";
+ }
+
+ /*! This is used in LaTeX as the title of the chapter with the
+ * list of all files.
+ */
+ virtual QCString trFileIndex()
+ { return "फ़ाइल अनुक्रमणिका"; }
+
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all groups.
+ */
+ virtual QCString trModuleDocumentation()
+ { return "अनुखंड दस्तावेज़ीकरण"; }
+
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all classes, structs and unions.
+ */
+ virtual QCString trClassDocumentation()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ return "आंकड़े संरचना दस्तावेज़ीकरण";
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ return trDesignUnitDocumentation();
+ else
+ return "वर्ग दस्तावेज़ीकरण";
+ }
+
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all files.
+ */
+ virtual QCString trFileDocumentation()
+ { return "फ़ाइल दस्तावेज़ीकरण"; }
+
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all examples.
+ */
+ virtual QCString trExampleDocumentation()
+ { return "उदाहरण दस्तावेज़ीकरण"; }
+
+ /*! This is used in LaTeX as the title of the document */
+ virtual QCString trReferenceManual()
+ { return "संदर्भ पुस्तिका"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of defines
+ */
+ virtual QCString trDefines()
+ { return "मैक्रोगण"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of typedefs
+ */
+ virtual QCString trTypedefs()
+ { return "प्ररुप-परिभाषाएं"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of enumerations
+ */
+ virtual QCString trEnumerations()
+ { return "परिगणकगण"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of (global) functions
+ */
+ virtual QCString trFunctions()
+ { return "फलनगण"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of (global) variables
+ */
+ virtual QCString trVariables()
+ { return "परिवर्तनशीलगण"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of (global) variables
+ */
+ virtual QCString trEnumerationValues()
+ { return "परिगणक"; }
+
+ /*! This is used in the documentation of a file before the list of
+ * documentation blocks for defines
+ */
+ virtual QCString trDefineDocumentation()
+ { return "मैक्रो परिभाषा दस्तावेज़ीकरण"; }
+
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for typedefs
+ */
+ virtual QCString trTypedefDocumentation()
+ { return "प्ररुप-परिभाषा दस्तावेज़ीकरण"; }
+
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for enumeration types
+ */
+ virtual QCString trEnumerationTypeDocumentation()
+ { return "परिगणना प्ररूप दस्तावेज़ीकरण"; }
+
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for functions
+ */
+ virtual QCString trFunctionDocumentation()
+ { return "फलन दस्तावेज़ीकरण"; }
+
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for variables
+ */
+ virtual QCString trVariableDocumentation()
+ { return "परिवर्तनशील दस्तावेज़ीकरण"; }
+
+ /*! This is used in the documentation of a file/namespace/group before
+ * the list of links to documented compounds
+ */
+ virtual QCString trCompounds()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ return "आंकड़े संरचनाएं";
+ else
+ return "वर्गगण";
+ }
+
+ /*! This is used in the standard footer of each page and indicates when
+ * the page was generated
+ */
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
+ {
+ QCString result;
+ if (!projName.isEmpty())
+ result += projName + " के लिए ";
+ result += date + " पर उतपन्न किया गया: ";
+ return result;
+ }
+
+ /*! this text is put before a class diagram */
+ virtual QCString trClassDiagram(const QCString &clName)
+ { return clName + " के लिए वरासत आरेख:"; }
+
+ /*! this text is generated when the \\warning command is used. */
+ virtual QCString trWarning()
+ { return "चेतावनी"; }
+
+ /*! this text is generated when the \\version command is used. */
+ virtual QCString trVersion()
+ { return "संस्करण"; }
+
+ /*! this text is generated when the \\date command is used. */
+ virtual QCString trDate()
+ { return "दिनांक"; }
+
+ /*! this text is generated when the \\return command is used. */
+ virtual QCString trReturns()
+ { return "वापसी"; }
+
+ /*! this text is generated when the \\sa command is used. */
+ virtual QCString trSeeAlso()
+ { return "यह भी देखें"; }
+
+ /*! this text is generated when the \\param command is used. */
+ virtual QCString trParameters()
+ { return "मापदंडगण"; }
+
+ /*! this text is generated when the \\exception command is used. */
+ virtual QCString trExceptions()
+ { return "अपवादगण"; }
+
+ /*! this text is used in the title page of a LaTeX document. */
+ virtual QCString trGeneratedBy()
+ { return "द्वारा उत्पन्न"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990307
+//////////////////////////////////////////////////////////////////////////
+
+ /*! used as the title of page containing all the index of all namespaces. */
+ virtual QCString trNamespaceList()
+ { return "नाम-स्थान सूची"; }
+
+ /*! used as an introduction to the namespace list */
+ virtual QCString trNamespaceListDescription(bool extractAll)
+ {
+ QCString result = "यहाँ संक्षिप्त विवरण के साथ सभी ";
+ if (!extractAll)
+ result += "दस्तावेज़ीकृत ";
+ result += "नाम-स्थानों की सूची दी गई है:";
+ return result;
+ }
+
+ /*! used in the class documentation as a header before the list of all
+ * friends of a class
+ */
+ virtual QCString trFriends()
+ { return "मित्रगण"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990405
+//////////////////////////////////////////////////////////////////////////
+
+ /*! used in the class documentation as a header before the list of all
+ * related classes
+ */
+ virtual QCString trRelatedFunctionDocumentation()
+ { return "मित्रगण और संबंधित फलन दस्तावेज़ीकरण"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990425
+//////////////////////////////////////////////////////////////////////////
+
+ /*! used as the title of the HTML page of a class/struct/union */
+ virtual QCString trCompoundReference(
+ const QCString &clName,
+ ClassDef::CompoundType compType,
+ bool isTemplate)
+ {
+ QCString result=clName;
+ switch(compType)
+ {
+ case ClassDef::Class: result += " वर्ग"; break;
+ case ClassDef::Struct: result += " संरचना"; break;
+ case ClassDef::Union: result += " मिलन"; break;
+ case ClassDef::Interface: result += " अंतराफलक"; break;
+ case ClassDef::Protocol: result += " प्रोटोकॉल"; break;
+ case ClassDef::Category: result += " श्रेणी"; break;
+ case ClassDef::Exception: result += " अपवाद"; break;
+ default: break;
+ }
+ if (isTemplate)
+ result += " टेम्पलेट";
+ result += " संदर्भ";
+ return result;
+ }
+
+ /*! used as the title of the HTML page of a file */
+ virtual QCString trFileReference(const QCString &fileName)
+ {
+ QCString result = fileName;
+ result += " फ़ाइल संदर्भ";
+ return result;
+ }
+
+ /*! used as the title of the HTML page of a namespace */
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
+ {
+ QCString result = namespaceName;
+ result += " नाम-स्थान संदर्भ";
+ return result;
+ }
+
+ virtual QCString trPublicMembers()
+ { return "सार्वजनिक सदस्य फलनगण"; }
+
+ virtual QCString trPublicSlots()
+ { return "सार्वजनिक खांचें"; }
+
+ virtual QCString trSignals()
+ { return "संकेतगण"; }
+
+ virtual QCString trStaticPublicMembers()
+ { return "अचल सार्वजनिक सदस्य फलनगण"; }
+
+ virtual QCString trProtectedMembers()
+ { return "संरक्षित सदस्य फलनगण"; }
+
+ virtual QCString trProtectedSlots()
+ { return "संरक्षित खांचे"; }
+
+ virtual QCString trStaticProtectedMembers()
+ { return "अचल संरक्षित सदस्य फलनगण"; }
+
+ virtual QCString trPrivateMembers()
+ { return "निजी सदस्य फलनगण"; }
+
+ virtual QCString trPrivateSlots()
+ { return "निजी खांचें"; }
+
+ virtual QCString trStaticPrivateMembers()
+ { return "अचल निजी सदस्य फलनगण"; }
+
+ /*! this function is used to produce a comma-separated list of items.
+ * use generateMarker(i) to indicate where item i should be put.
+ */
+ virtual QCString trWriteList(int numEntries)
+ {
+ QCString result;
+ int i;
+ // the inherits list contain `numEntries' classes
+ for (i = 0; i < numEntries; ++i)
+ {
+ // use generateMarker to generate placeholders for the class links!
+ result += generateMarker(i); // generate marker for entry i in the list
+ // (order is left to right)
+ if (i != numEntries - 1) // not the last entry, so we need a separator
+ {
+ if (i < numEntries - 2) // not the fore last entry
+ result += ", ";
+ else // the fore last entry
+ result += ", और ";
+ }
+ }
+ return result;
+ }
+
+ /*! used in class documentation to produce a list of base classes,
+ * if class diagrams are disabled.
+ */
+ virtual QCString trInheritsList(int numEntries)
+ { return trWriteList(numEntries) + " से विरासित।"; }
+
+ /*! used in class documentation to produce a list of super classes,
+ * if class diagrams are disabled.
+ */
+ virtual QCString trInheritedByList(int numEntries)
+ { return trWriteList(numEntries) + " द्वारा विरासित।"; }
+
+ /*! used in member documentation blocks to produce a list of
+ * members that are hidden by this one.
+ */
+ virtual QCString trReimplementedFromList(int numEntries)
+ { return trWriteList(numEntries) + " से पुन: लागू किया गया।"; }
+
+ /*! used in member documentation blocks to produce a list of
+ * all member that overwrite the implementation of this member.
+ */
+ virtual QCString trReimplementedInList(int numEntries)
+ { return trWriteList(numEntries) + " में पुन: लागू किया गया।"; }
+
+ /*! This is put above each page as a link to all members of namespaces. */
+ virtual QCString trNamespaceMembers()
+ { return "नाम-स्थान सदस्यगण"; }
+
+ /*! This is an introduction to the page with all namespace members */
+ virtual QCString trNamespaceMemberDescription(bool extractAll)
+ {
+ QCString result = "यहाँ सभी ";
+ if (!extractAll)
+ result += "दस्तावेज़ीकृत ";
+ result += "नाम-स्थान सदस्यगण कि लिंको के साथ ";
+ if (extractAll)
+ result += "प्रत्येक सदस्य के नाम-स्थान दस्तावेज़ीकरण ";
+ else
+ result += "उनसे संबंधित नाम-स्थानों ";
+ result += "कि सूची दि गई हैं:";
+ return result;
+ }
+
+ /*! This is used in LaTeX as the title of the chapter with the
+ * index of all namespaces.
+ */
+ virtual QCString trNamespaceIndex()
+ { return "नाम-स्थान अनुक्रमणिका"; }
+
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all namespaces.
+ */
+ virtual QCString trNamespaceDocumentation()
+ { return "नाम-स्थान दस्तावेज़ीकरण"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990522
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used in the documentation before the list of all
+ * namespaces in a file.
+ */
+ virtual QCString trNamespaces()
+ { return "नाम-स्थानगण"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990728
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is put at the bottom of a class documentation page and is
+ * followed by a list of files that were used to generate the page.
+ */
+ virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,
+ bool single)
+ {
+ // single is true implies a single file
+ bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ QCString result;
+ switch (compType)
+ {
+ case ClassDef::Class: result += vhdlOpt ? "डिज़ाइन इकाई" : "वर्ग"; break;
+ case ClassDef::Struct: result += "संस्करण"; break;
+ case ClassDef::Union: result += "मिलन"; break;
+ case ClassDef::Interface: result += "अंतराफलक"; break;
+ case ClassDef::Protocol: result += "प्रोटोकॉल"; break;
+ case ClassDef::Category: result += "श्रेणी"; break;
+ case ClassDef::Exception: result += "अपवाद"; break;
+ default: break;
+ }
+ result += " के लिए दस्तावेज़ीकरण ";
+ if (single)
+ result += " फ़ाइल से उत्पन्न किया गया था:";
+ else
+ result += " निम्न फ़ाइलों से उत्पन्न किया गया था:";
+ return result;
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990901
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used as the heading text for the retval command. */
+ virtual QCString trReturnValues()
+ { return "वापसी मान"; }
+
+ /*! This is in the (quick) index as a link to the main page (index.html)
+ */
+ virtual QCString trMainPage()
+ { return "मुख्य पृष्ठ"; }
+
+ /*! This is used in references to page that are put in the LaTeX
+ * documentation. It should be an abbreviation of the word page.
+ */
+ virtual QCString trPageAbbreviation()
+ { return "पृ."; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-991003
+//////////////////////////////////////////////////////////////////////////
+
+ virtual QCString trDefinedAtLineInSourceFile()
+ { return "फ़ाइल @1 की लाइन @0 पर परिभाषित।"; }
+
+ virtual QCString trDefinedInSourceFile()
+ { return "फ़ाइल @0 में परिभाषित।"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-991205
+//////////////////////////////////////////////////////////////////////////
+
+ virtual QCString trDeprecated()
+ { return "पदावनत"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.0.0
+//////////////////////////////////////////////////////////////////////////
+
+ /*! this text is put before a collaboration diagram */
+ virtual QCString trCollaborationDiagram(const QCString &clName)
+ { return clName + " के लिए सहयोगीकरण आरेख:"; }
+
+ /*! this text is put before an include dependency graph */
+ virtual QCString trInclDepGraph(const QCString &fName)
+ { return fName + " के लिए निर्भरता लेखाचित्र शामिल करें:"; }
+
+ /*! header that is put before the list of constructor/destructors. */
+ virtual QCString trConstructorDocumentation()
+ { return "निर्माता और नाशक दस्तावेज़ीकरण"; }
+
+ /*! Used in the file documentation to point to the corresponding sources. */
+ virtual QCString trGotoSourceCode()
+ { return "इस फाइल कि स्त्रोत संकेत-लिपि को देखें।"; }
+
+ /*! Used in the file sources to point to the corresponding documentation. */
+ virtual QCString trGotoDocumentation()
+ { return "इस फ़ाइल के दस्तावेज़ीकरण पर जाएं।"; }
+
+ /*! Text for the \\pre command */
+ virtual QCString trPrecondition()
+ { return "पूर्वशर्त"; }
+
+ /*! Text for the \\post command */
+ virtual QCString trPostcondition()
+ { return "शर्तपश्चात्"; }
+
+ /*! Text for the \\invariant command */
+ virtual QCString trInvariant()
+ { return "अपरिवर्तनीय"; }
+
+ /*! Text shown before a multi-line variable/enum initialization */
+ virtual QCString trInitialValue()
+ { return "प्रारंभिक मूल्य:"; }
+
+ /*! Text used the source code in the file index */
+ virtual QCString trCode()
+ { return "संकेत-लिपि"; }
+
+ virtual QCString trGraphicalHierarchy()
+ { return "चित्रात्मक वर्ग पदानुक्रम"; }
+
+ virtual QCString trGotoGraphicalHierarchy()
+ { return "चित्रात्मक वर्ग पदानुक्रम पर जाएँ"; }
+
+ virtual QCString trGotoTextualHierarchy()
+ { return "पाठ्य वर्ग पदानुक्रम पर जाएँ"; }
+
+ virtual QCString trPageIndex()
+ { return "पृष्ठ अनुक्रमणिका"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.1.0
+//////////////////////////////////////////////////////////////////////////
+
+ virtual QCString trNote()
+ { return "ध्यान दें"; }
+
+ virtual QCString trPublicTypes()
+ { return "सार्वजनिक प्ररुपगण"; }
+
+ virtual QCString trPublicAttribs()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ return "आंकड़े भागगण";
+ else
+ return "सार्वजनिक गुणगण";
+ }
+
+ virtual QCString trStaticPublicAttribs()
+ { return "अचल सार्वजनिक गुणगण"; }
+
+ virtual QCString trProtectedTypes()
+ { return "संरक्षित प्ररुपगण"; }
+
+ virtual QCString trProtectedAttribs()
+ { return "संरक्षित गुणगण"; }
+
+ virtual QCString trStaticProtectedAttribs()
+ { return "अचल संरक्षित गुणगण"; }
+
+ virtual QCString trPrivateTypes()
+ { return "निजी प्ररुपगण"; }
+
+ virtual QCString trPrivateAttribs()
+ { return "निजी गुणगण"; }
+
+ virtual QCString trStaticPrivateAttribs()
+ { return "अचल निजी गुणगण"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.1.3
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a marker that is put before a \\todo item */
+ virtual QCString trTodo()
+ { return "करने के लिए"; }
+
+ /*! Used as the header of the todo list */
+ virtual QCString trTodoList()
+ { return "करने के लिए सूची"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.1.4
+//////////////////////////////////////////////////////////////////////////
+
+ virtual QCString trReferencedBy()
+ { return "द्वारा संदर्भित"; }
+
+ virtual QCString trRemarks()
+ { return "टिप्पणियाँ"; }
+
+ virtual QCString trAttention()
+ { return "ध्यान"; }
+
+ virtual QCString trInclByDepGraph()
+ { return "यह लेखाचित्र दिखाता है कि कौन सी फ़ाइलें प्रत्यक्ष या परोक्ष रूप से इस फ़ाइल को शामिल करती हैं:"; }
+
+ virtual QCString trSince()
+ { return "जबसे"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.1.5
+//////////////////////////////////////////////////////////////////////////
+
+ /*! title of the graph legend page */
+ virtual QCString trLegendTitle()
+ { return "लेखाचित्र किंवदंती"; }
+
+ /*! page explaining how the dot graph's should be interpreted
+ * The %A in the text below are to prevent link to classes called "A".
+ */
+ virtual QCString trLegendDocs()
+ {
+ return
+ "यह पृष्ठ बताता है कि डॉक्सिजन द्वारा उत्पन्न लेखाचित्र की व्याख्या कैसे करें।\n"
+ "<p>\n"
+ "निम्नलिखित उदाहरण पर विचार करें:\n"
+ "\\code\n"
+ "/*! काट-छाँट के कारण अदृश्य वर्ग */\n"
+ "class Invisible { };\n\n"
+ "/*! वरासत संबंध छिपा हुआ है, वर्ग काट-छाँट दिया गया */\n"
+ "class Truncated : public Invisible { };\n\n"
+ "/* वर्ग को डॉक्सिजन टिप्पणियों के साथ दस्तावेज़ीकृत नहीं किया गया */\n"
+ "class Undocumented { };\n\n"
+ "/*! वह वर्ग जो सार्वजनिक वरासत का उपयोग करके विरासित की गई */\n"
+ "class PublicBase : public Truncated { };\n\n"
+ "/*! एक टेम्पलेट वर्ग */\n"
+ "template<class T> class Templ { };\n\n"
+ "/*! वह वर्ग जो संरक्षित वरासत का उपयोग करके विरासित की गई */\n"
+ "class ProtectedBase { };\n\n"
+ "/*! वह वर्ग जो निजी वरासत का उपयोग करके विरासित की गई */\n"
+ "class PrivateBase { };\n\n"
+ "/*! वह वर्ग जिसका उपयोग विरासित वर्ग द्वारा किया जाता हैं */\n"
+ "class Used { };\n\n"
+ "/*! उत्तम वर्ग जो कई अन्य वर्गों से वरासित हैं */\n"
+ "class Inherited : public PublicBase,\n"
+ " protected ProtectedBase,\n"
+ " private PrivateBase,\n"
+ " public Undocumented,\n"
+ " public Templ<int>\n"
+ "{\n"
+ " private:\n"
+ " Used *m_usedClass;\n"
+ "};\n"
+ "\\endcode\n"
+ "इसका परिणाम निम्नलिखित लेखाचित्र में होगा:"
+ "<p><center><img alt=\"\" src=\"graph_legend." + getDotImageExtension() + "\"></center></p>\n"
+ "<p>\n"
+ "उपरोक्त लेखाचित्र के डिब्बों के निम्नलिखित अर्थ हैं:\n"
+ "</p>\n"
+ "<ul>\n"
+ "<li>%A भरा ग्रे डिब्बा उस संरचना या वर्ग को दर्शाता है जिसके लिए लेखाचित्र बनाया गया हैं।</li>\n"
+ "<li>%A डिब्बा, काली बॉर्डर वाला, एक दस्तावेज़ीकृत संरचना या वर्ग को निरूपित करता हैं।</li>\n"
+ "<li>%A डिब्बा, ग्रे बॉर्डर वाला, एक निरदस्तावेज़ीकृत संरचना या वर्ग को निरूपित है।</li>\n"
+ "<li>%A डिब्बा, लाल बॉर्डर वाला, एक दस्तावेज़ीकृत संरचना या वर्ग को निरूपित है जिसके लिए "
+ "सभी वरासत संबंध नहीं दिखाए गए हैं। %A लेखाचित्र को काट-छाँट दिया जाता है यदि वह निर्दिष्ट "
+ "सीमाओं के भीतर नहीं समा पाता हैं।</li>\n"
+ "</ul>\n"
+ "<p>\n"
+ "तीर के निम्नलिखित अर्थ हैं:\n"
+ "</p>\n"
+ "<ul>\n"
+ "<li>%A गहरे नीले तीर का उपयोग दो वर्गों के बीच सार्वजनिक वरासत संबंध की कल्पना करने "
+ "के लिए किया जाता हैं।</li>\n"
+ "<li>%A गहरे हरे तीर का उपयोग संरक्षित वरासत के लिए किया जाता हैं।</li>\n"
+ "<li>%A गहरे लाल तीर का उपयोग निजी वरासत के लिए किया जाता हैं।</li>\n"
+ "<li>%A बैंगनी धराशायी तीर का उपयोग किया जाता है यदि कोई वर्ग समाहित है या किसी अन्य "
+ "वर्ग द्वारा उपयोग किया जाता है। तीर को परिवर्तनशील(गण) के साथ लेबल किया गया है जिसके "
+ "माध्यम से वर्ग या संरचना पहुंचने योग्य हैं।</li>\n"
+ "<li>%A पीला धराशायी तीर एक टेम्पलेट उदाहरण और उस टेम्पलेट वर्ग के बीच संबंध को दर्शाता "
+ "है जिससे इसे उदाहरणीत किया गया था। तीर को उदाहरण के टेम्पलेट मापदंड के साथ लेबल किया गया है।</li>\n"
+ "</ul>\n";
+ }
+
+ /*! text for the link to the legend page */
+ virtual QCString trLegend()
+ { return "किंवदंती"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.0
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a marker that is put before a test item */
+ virtual QCString trTest()
+ { return "परीक्षा"; }
+ /*! Used as the header of the test list */
+ virtual QCString trTestList()
+ { return "परीक्षा सूची"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.2
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a section header for IDL properties */
+ virtual QCString trProperties()
+ { return "संपत्तियाँ"; }
+
+ /*! Used as a section header for IDL property documentation */
+ virtual QCString trPropertyDocumentation()
+ { return "संपत्ति दस्तावेज़ीकरण"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.4
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used for Java classes in the summary section of Java packages */
+ virtual QCString trClasses()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ return "आंकड़े संरचनाएं";
+ else
+ return "वर्गगण";
+ }
+
+ /*! Used as the title of a Java package */
+ virtual QCString trPackage(const QCString &name)
+ { return "संकुल " + name; }
+
+ /*! The description of the package index page */
+ virtual QCString trPackageListDescription()
+ { return "यहाँ संक्षिप्त विवरण के साथ संकुल दिए गए हैं (यदि उपलब्ध हो):"; }
+
+ /*! The link name in the Quick links header for each page */
+ virtual QCString trPackages()
+ { return "संकुलगण"; }
+
+ /*! Text shown before a multi-line define */
+ virtual QCString trDefineValue()
+ { return "मूल्य:"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.5
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a marker that is put before a \\bug item */
+ virtual QCString trBug()
+ { return "त्रुटि"; }
+
+ /*! Used as the header of the bug list */
+ virtual QCString trBugList()
+ { return "त्रुटि सूची"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.6
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as ansicpg for RTF file
+ *
+ * The following table shows the correlation of Charset name, Charset Value and
+ * <pre>
+ * Codepage number:
+ * Charset Name Charset Value(hex) Codepage number
+ * ------------------------------------------------------
+ * DEFAULT_CHARSET 1 (x01)
+ * SYMBOL_CHARSET 2 (x02)
+ * OEM_CHARSET 255 (xFF)
+ * ANSI_CHARSET 0 (x00) 1252
+ * RUSSIAN_CHARSET 204 (xCC) 1251
+ * EE_CHARSET 238 (xEE) 1250
+ * GREEK_CHARSET 161 (xA1) 1253
+ * TURKISH_CHARSET 162 (xA2) 1254
+ * BALTIC_CHARSET 186 (xBA) 1257
+ * HEBREW_CHARSET 177 (xB1) 1255
+ * ARABIC _CHARSET 178 (xB2) 1256
+ * SHIFTJIS_CHARSET 128 (x80) 932
+ * HANGEUL_CHARSET 129 (x81) 949
+ * GB2313_CHARSET 134 (x86) 936
+ * CHINESEBIG5_CHARSET 136 (x88) 950
+ * </pre>
+ *
+ */
+ virtual QCString trRTFansicp()
+ { return "65001"; }
+
+ /*! Used as ansicpg for RTF fcharset
+ * \see trRTFansicp() for a table of possible values.
+ */
+ virtual QCString trRTFCharSet()
+ { return "1252"; }
+
+ /*! Used as header RTF general index */
+ virtual QCString trRTFGeneralIndex()
+ { return "अनुक्रमणिका"; }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trClass(bool first_capital, bool singular)
+ {
+ // There is no first-letter capitalization notion in Hindi.
+ QCString result = "वर्ग";
+ if (!singular)
+ result += "गण";
+ return result;
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trFile(bool first_capital, bool singular)
+ {
+ // There is no first-letter capitalization notion in Hindi.
+ QCString result = "फ़ाइल";
+ if (!singular)
+ result += "ें";
+ return result;
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trNamespace(bool first_capital, bool singular)
+ {
+ // There is no first-letter capitalization notion in Hindi.
+ QCString result = "नाम-स्थान";
+ if (!singular)
+ result += "गण";
+ return result;
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trGroup(bool first_capital, bool singular)
+ {
+ // There is no first-letter capitalization notion in Hindi.
+ QCString result = "अनुखंड";
+ if (!singular)
+ result += "गण";
+ return result;
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trPage(bool first_capital, bool singular)
+ {
+ // There is no first-letter capitalization notion in Hindi.
+ QCString result = "पृष्ठ";
+ if (!singular)
+ result += "गण";
+ return result;
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trMember(bool first_capital, bool singular)
+ {
+ // There is no first-letter capitalization notion in Hindi.
+ QCString result = "सदस्य";
+ if (!singular)
+ result += "गण";
+ return result;
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trGlobal(bool first_capital, bool singular)
+ {
+ // There is no first-letter capitalization notion in Hindi.
+ QCString result = "वैश्र्विक";
+ if (!singular)
+ result += "गण";
+ return result;
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.7
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This text is generated when the \\author command is used and
+ * for the author section in man pages. */
+ virtual QCString trAuthor(bool first_capital, bool singular)
+ {
+ // There is no first-letter capitalization notion in Hindi.
+ QCString result = "लेखक";
+ if (!singular)
+ result += "गण";
+ return result;
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.11
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This text is put before the list of members referenced by a member
+ */
+ virtual QCString trReferences()
+ { return "संदर्भ"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.13
+//////////////////////////////////////////////////////////////////////////
+
+ /*! used in member documentation blocks to produce a list of
+ * members that are implemented by this one.
+ */
+ virtual QCString trImplementedFromList(int numEntries)
+ { return trWriteList(numEntries) + " लागू करता है।"; }
+
+ /*! used in member documentation blocks to produce a list of
+ * all members that implement this abstract member.
+ */
+ virtual QCString trImplementedInList(int numEntries)
+ { return trWriteList(numEntries) + " में लागू करता है।"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.16
+//////////////////////////////////////////////////////////////////////////
+
+ /*! used in RTF documentation as a heading for the Table
+ * of Contents.
+ */
+ virtual QCString trRTFTableOfContents()
+ { return "विषय-सूची"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.17
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as the header of the list of item that have been
+ * flagged deprecated
+ */
+ virtual QCString trDeprecatedList()
+ { return "पदावनत सूची"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.18
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a header for declaration section of the events found in
+ * a C# program
+ */
+ virtual QCString trEvents()
+ { return "घटनाएं"; }
+
+ /*! Header used for the documentation section of a class' events. */
+ virtual QCString trEventDocumentation()
+ { return "घटना दस्तावेज़ीकरण"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a heading for a list of Java class types with package scope.
+ */
+ virtual QCString trPackageTypes()
+ { return "संकुल प्ररूपगण"; }
+
+ /*! Used as a heading for a list of Java class functions with package
+ * scope.
+ */
+ virtual QCString trPackageFunctions()
+ { return "संकुल फलनगण"; }
+ virtual QCString trPackageMembers()
+ { return "संकुल सदस्यगण"; }
+
+ /*! Used as a heading for a list of static Java class functions with
+ * package scope.
+ */
+ virtual QCString trStaticPackageFunctions()
+ { return "अचल संकुल फलनगण"; }
+
+ /*! Used as a heading for a list of Java class variables with package
+ * scope.
+ */
+ virtual QCString trPackageAttribs()
+ { return "संकुल गुणगण"; }
+
+ /*! Used as a heading for a list of static Java class variables with
+ * package scope.
+ */
+ virtual QCString trStaticPackageAttribs()
+ { return "अचल संकुल गुणगण"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.1
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used in the quick index of a class/file/namespace member list page
+ * to link to the unfiltered list of all members.
+ */
+ virtual QCString trAll()
+ { return "सभी"; }
+
+ /*! Put in front of the call graph for a function. */
+ virtual QCString trCallGraph()
+ { return "इस फलन के लिए बुलावा लेखाचित्र यहां दिया गया है:"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.3
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This string is used as the title for the page listing the search
+ * results.
+ */
+ virtual QCString trSearchResultsTitle()
+ { return "खोज के परिणामगण"; }
+
+ /*! This string is put just before listing the search results. The
+ * text can be different depending on the number of documents found.
+ * Inside the text you can put the special marker $num to insert
+ * the number representing the actual number of search results.
+ * The @a numDocuments parameter can be either 0, 1 or 2, where the
+ * value 2 represents 2 or more matches. HTML markup is allowed inside
+ * the returned string.
+ */
+ virtual QCString trSearchResults(int numDocuments)
+ {
+ if (numDocuments == 0)
+ return "क्षमा करें, आपकी जिज्ञासा से मेल खाने वाला कोई दस्तावेज़ नहीं है।";
+ else if (numDocuments == 1)
+ return "आपकी जिज्ञासा से मेल खाने वाला <b>1</b> दस्तावेज़ मिला।";
+ else
+ return "आपकी जिज्ञासा से मेल खाने वाले <b>$num</b> दस्तावेज़ मिले। सर्वश्रेष्ठ मिलान पहले दिखा रहे हैं।";
+ }
+
+ /*! This string is put before the list of matched words, for each search
+ * result. What follows is the list of words that matched the query.
+ */
+ virtual QCString trSearchMatches()
+ { return "मिलानगण:"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.8
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used in HTML as the title of page with source code for file filename
+ */
+ virtual QCString trSourceFile(QCString& filename)
+ { return filename + " स्त्रोत फ़ाइल"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.9
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used as the name of the chapter containing the directory
+ * hierarchy.
+ */
+ virtual QCString trDirIndex()
+ { return "निर्देशिकाएं पदानुक्रम"; }
+
+ /*! This is used as the name of the chapter containing the documentation
+ * of the directories.
+ */
+ virtual QCString trDirDocumentation()
+ { return "निर्देशिका दस्तावेज़ीकरण"; }
+
+ /*! This is used as the title of the directory index and also in the
+ * Quick links of an HTML page, to link to the directory hierarchy.
+ */
+ virtual QCString trDirectories()
+ { return "निर्देशिकाएं"; }
+
+ /*! This returns the title of a directory page. The name of the
+ * directory is passed via \a dirName.
+ */
+ virtual QCString trDirReference(const QCString &dirName)
+ {
+ QCString result = dirName;
+ result += " निर्देशिका संदर्भ";
+ return result;
+ }
+
+ /*! This returns the word directory with or without starting capital
+ * (\a first_capital) and in singular or plural form (\a singular).
+ */
+ virtual QCString trDir(bool first_capital, bool singular)
+ {
+ // There is no first-letter capitalization notion in Hindi.
+ QCString result = "निर्देशिका";
+ if (!singular)
+ result += "एं";
+ return result;
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.4.1
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This text is added to the documentation when the \\overload command
+ * is used for a overloaded function.
+ */
+ virtual QCString trOverloadText()
+ {
+ return "यह अतिभारित सदस्य फलन सुविधा के लिए प्रदान किया गया है। यह उपरोक्त"
+ " फलन से केवल इस बात में भिन्न है कि यह किस तर्क को स्वीकार करता है।";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.4.6
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used to introduce a caller (or called-by) graph */
+ virtual QCString trCallerGraph()
+ {
+ return "इस फलन के लिए बुलावा लेखाचित्र यहाँ दिया गया है:";
+ }
+
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for enumeration values
+ */
+ virtual QCString trEnumerationValueDocumentation()
+ { return "परिगणक दस्तावेज़ीकरण"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.5.4 (mainly for Fortran)
+//////////////////////////////////////////////////////////////////////////
+
+ /*! header that is put before the list of member subprograms (Fortran). */
+ virtual QCString trMemberFunctionDocumentationFortran()
+ { return "सदस्य फलन/उपफलन दस्तावेज़ीकरण"; }
+
+ /*! This is put above each page as a link to the list of annotated data types (Fortran). */
+ virtual QCString trCompoundListFortran()
+ { return "आंकड़े प्ररुपगण सूची"; }
+
+ /*! This is put above each page as a link to all members of compounds (Fortran). */
+ virtual QCString trCompoundMembersFortran()
+ { return "आंकड़े भागगण"; }
+
+ /*! This is an introduction to the annotated compound list (Fortran). */
+ virtual QCString trCompoundListDescriptionFortran()
+ { return "यहाँ संक्षिप्त विवरण के साथ आँकड़े प्ररूपगण हैं:"; }
+
+ /*! This is an introduction to the page with all data types (Fortran). */
+ virtual QCString trCompoundMembersDescriptionFortran(bool extractAll)
+ {
+ QCString result = "यहाँ सभी ";
+ if (!extractAll)
+ result += "दस्तावेज़ीकृत ";
+ result += "आंकड़े प्ररूपगण कि लिंको के साथ ";
+ if (!extractAll)
+ result += "प्रत्येक सदस्य के आंकड़े संरचना दस्तावेज़ीकरण ";
+ else
+ result += "उनसे संबंधित आंकड़े प्ररूपगण ";
+ result += "कि सूची दि गई हैं:";
+ return result;
+ }
+
+ /*! This is used in LaTeX as the title of the chapter with the
+ * annotated compound index (Fortran).
+ */
+ virtual QCString trCompoundIndexFortran()
+ { return "आंकड़े प्ररुप अनुक्रमणिका"; }
+
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all data types (Fortran).
+ */
+ virtual QCString trTypeDocumentation()
+ { return "आंकड़े प्ररुप दस्तावेज़ीकरण"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of (global) subprograms (Fortran).
+ */
+ virtual QCString trSubprograms()
+ { return "फलनगण/उपफलनगण"; }
+
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for subprograms (Fortran)
+ */
+ virtual QCString trSubprogramDocumentation()
+ { return "फलन/उपफलन दस्तावेज़ीकरण"; }
+
+ /*! This is used in the documentation of a file/namespace/group before
+ * the list of links to documented compounds (Fortran)
+ */
+ virtual QCString trDataTypes()
+ { return "आंकड़े प्ररुपगण"; }
+
+ /*! used as the title of page containing all the index of all modules (Fortran). */
+ virtual QCString trModulesList()
+ { return "अनुखंडगण सूची"; }
+
+ /*! used as an introduction to the modules list (Fortran) */
+ virtual QCString trModulesListDescription(bool extractAll)
+ {
+ QCString result = "यहाँ संक्षिप्त विवरण के साथ सभी ";
+ if (!extractAll)
+ result += "दस्तावेज़ीकृत ";
+ result += "अनुखंडगण की सूची दी गई है:";
+ return result;
+ }
+
+ /*! used as the title of the HTML page of a module/type (Fortran) */
+ virtual QCString trCompoundReferenceFortran(
+ const QCString &clName,
+ ClassDef::CompoundType compType,
+ bool isTemplate)
+ {
+ QCString result = clName;
+ switch (compType)
+ {
+ case ClassDef::Class: result+=" अनुखंड"; break;
+ case ClassDef::Struct: result+=" प्ररुप"; break;
+ case ClassDef::Union: result+=" मिलन"; break;
+ case ClassDef::Interface: result+=" अंतराफलक"; break;
+ case ClassDef::Protocol: result+=" प्रोटोकॉल"; break;
+ case ClassDef::Category: result+=" श्रेणी"; break;
+ case ClassDef::Exception: result+=" अपवाद"; break;
+ default: break;
+ }
+ if (isTemplate)
+ result += " टेम्पलेट";
+ result += " संदर्भ";
+ return result;
+ }
+
+ /*! used as the title of the HTML page of a module (Fortran) */
+ virtual QCString trModuleReference(const QCString &namespaceName)
+ {
+ QCString result = namespaceName;
+ result += " अनुखंड संदर्भ";
+ return result;
+ }
+
+ /*! This is put above each page as a link to all members of modules. (Fortran) */
+ virtual QCString trModulesMembers()
+ { return "अनुखंडगण सदस्यगण"; }
+
+ /*! This is an introduction to the page with all modules members (Fortran) */
+ virtual QCString trModulesMemberDescription(bool extractAll)
+ {
+ QCString result = "यहाँ सभी ";
+ if (!extractAll)
+ result += "दस्तावेज़ीकृत ";
+ result += "अनुखंड सदस्यगण कि लिंको के साथ ";
+ if (extractAll)
+ result += "प्रत्येक सदस्य के दस्तावेज़ीकरण ";
+ else
+ result += "उनसे संबंधित अनुखंडगण ";
+ result += "कि सूची दि गई हैं:";
+ return result;
+ }
+
+ /*! This is used in LaTeX as the title of the chapter with the
+ * index of all modules (Fortran).
+ */
+ virtual QCString trModulesIndex()
+ { return "अनुखंडगण अनुक्रमणिका"; }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trModule(bool first_capital, bool singular)
+ {
+ // There is no first-letter capitalization notion in Hindi.
+ QCString result = "अनुखंड";
+ if (!singular)
+ result += "गण";
+ return result;
+ }
+
+ /*! This is put at the bottom of a module documentation page and is
+ * followed by a list of files that were used to generate the page.
+ */
+ virtual QCString trGeneratedFromFilesFortran(
+ ClassDef::CompoundType compType,
+ bool single)
+ {
+ // single is true implies a single file
+ QCString result;
+ switch(compType)
+ {
+ case ClassDef::Class: result += "अनुखंड"; break;
+ case ClassDef::Struct: result += "प्ररुप"; break;
+ case ClassDef::Union: result += "मिलन"; break;
+ case ClassDef::Interface: result += "अंतराफलक"; break;
+ case ClassDef::Protocol: result += "प्रोटोकॉल"; break;
+ case ClassDef::Category: result += "श्रेणी"; break;
+ case ClassDef::Exception: result += "अपवाद"; break;
+ default: break;
+ }
+ result += " के लिए दस्तावेज़ीकरण ";
+ if (single)
+ result += " फ़ाइल से उत्पन्न किया गया था:";
+ else
+ result += " निम्न फ़ाइलों से उत्पन्न किया गया था:";
+ return result;
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trType(bool first_capital, bool singular)
+ {
+ // There is no first-letter capitalization notion in Hindi.
+ QCString result = "प्ररुप";
+ if (!singular)
+ result += "गण";
+ return result;
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trSubprogram(bool first_capital, bool singular)
+ {
+ // There is no first-letter capitalization notion in Hindi.
+ QCString result = "उपप्रोग्राम";
+ if (!singular)
+ result += "गण";
+ return result;
+ }
+
+ /*! C# Type Constraint list */
+ virtual QCString trTypeConstraints()
+ { return "प्ररुप बाध्यताएं"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.6.0 (mainly for the new search engine)
+//////////////////////////////////////////////////////////////////////////
+
+ /*! directory relation for \a name */
+ virtual QCString trDirRelation(const QCString &name)
+ { return name + " रिश्ता"; }
+
+ /*! Loading message shown when loading search results */
+ virtual QCString trLoading()
+ { return "लादा जा रहा..."; }
+
+ /*! Label used for search results in the global namespace */
+ virtual QCString trGlobalNamespace()
+ { return "वैश्र्विक नाम-स्थान"; }
+
+ /*! Message shown while searching */
+ virtual QCString trSearching()
+ { return "खोजां जा रहा..."; }
+
+ /*! Text shown when no search results are found */
+ virtual QCString trNoMatches()
+ { return "कोई समानता नहीं"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.6.3 (missing items for the directory pages)
+//////////////////////////////////////////////////////////////////////////
+
+ /*! when clicking a directory dependency label, a page with a
+ * table is shown. The heading for the first column mentions the
+ * source file that has a relation to another file.
+ */
+ virtual QCString trFileIn(const QCString &name)
+ { return name + " में फ़ाइल"; }
+
+ /*! when clicking a directory dependency label, a page with a
+ * table is shown. The heading for the second column mentions the
+ * destination file that is included.
+ */
+ virtual QCString trIncludesFileIn(const QCString &name)
+ { return name + " में फ़ाइल शामिल है"; }
+
+ /** Compiles a date string.
+ * @param year Year in 4 digits
+ * @param month Month of the year: 1=January
+ * @param day Day of the Month: 1..31
+ * @param dayOfWeek Day of the week: 1=Monday..7=Sunday
+ * @param hour Hour of the day: 0..23
+ * @param minutes Minutes in the hour: 0..59
+ * @param seconds Seconds within the minute: 0..59
+ * @param includeTime Include time in the result string?
+ */
+ virtual QCString trDateTime(
+ int year, int month, int day, int dayOfWeek,
+ int hour, int minutes, int seconds, bool includeTime)
+ {
+ static const char *days[] = { "सोमवार", "मंगलवार", "बुधवार", "गुरुवार",
+ "शुक्रवार", "शनिवार", "रविवार" };
+ static const char *months[] = { "जनवरी", "फरवरी", "मार्च", "अप्रैल", "मई", "जून",
+ "जुलाई", "अगस्त", "सितम्बर", "अक्टूबर", "नवम्बर", "दिसम्बर" };
+ QCString sdate;
+ sdate.sprintf("%s %s %d %d", days[dayOfWeek - 1], months[month - 1], day, year);
+ if (includeTime)
+ {
+ QCString stime;
+ stime.sprintf(" %.2d:%.2d:%.2d", hour, minutes, seconds);
+ sdate += stime;
+ }
+ return sdate;
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.7.5
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Header for the page with bibliographic citations */
+ virtual QCString trCiteReferences()
+ { return "ग्रन्थसूची"; }
+
+ /*! Text for copyright paragraph */
+ virtual QCString trCopyright()
+ { return "कॉपीराइट"; }
+
+ /*! Header for the graph showing the directory dependencies */
+ virtual QCString trDirDepGraph(const QCString &name)
+ { return name + " के लिए निर्देशिका निर्भरता लेखाचित्र:"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.8.0
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Detail level selector shown for hierarchical indices */
+ virtual QCString trDetailLevel()
+ { return "विस्तार स्तर"; }
+
+ /*! Section header for list of template parameters */
+ virtual QCString trTemplateParameters()
+ { return "टेम्पलेट मापदंड"; }
+
+ /*! Used in dot graph when UML_LOOK is enabled and there are many fields */
+ virtual QCString trAndMore(const QCString &number)
+ { return "और " + number + " अधिक..."; }
+
+ /*! Used file list for a Java enum */
+ virtual QCString trEnumGeneratedFromFiles(bool single)
+ {
+ QCString result = "इस परिगणक के लिए दस्तावेज़ीकरण निम्न फ़ाइल";
+ if (!single)
+ result += "ों";
+ result += " से उत्पन्न किया गया था:";
+ return result;
+ }
+
+ /*! Header of a Java enum page (Java enums are represented as classes). */
+ virtual QCString trEnumReference(const QCString &name)
+ { return name + " परिगणक संदर्भ"; }
+
+ /*! Used for a section containing inherited members */
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
+ { return what + " से विरासत में मिले " + members; }
+
+ /*! Header of the sections with inherited members specific for the
+ * base class(es)
+ */
+ virtual QCString trAdditionalInheritedMembers()
+ { return "अतिरिक्त विरासत में मिले सदस्य"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.8.2
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a tooltip for the toggle button that appears in the
+ * navigation tree in the HTML output when GENERATE_TREEVIEW is
+ * enabled. This tooltip explains the meaning of the button.
+ */
+ virtual QCString trPanelSynchronisationTooltip(bool enable)
+ {
+ QCString opt = enable ? "चालू" : "बंद";
+ return "पैनल सिंक्रनाइज़ीकरण " + opt + " करने के लिए क्लिक करें";
+ }
+
+ /*! Used in a method of an Objective-C class that is declared in a
+ * a category. Note that the @1 marker is required and is replaced
+ * by a link.
+ */
+ virtual QCString trProvidedByCategory()
+ { return "श्रेणी @0 द्वारा प्रदान किया गया।"; }
+
+ /*! Used in a method of an Objective-C category that extends a class.
+ * Note that the @1 marker is required and is replaced by a link to
+ * the class method.
+ */
+ virtual QCString trExtendsClass()
+ { return "वर्ग @0 को विस्तार करता है।"; }
+
+ /*! Used as the header of a list of class methods in Objective-C.
+ * These are similar to static public member functions in C++.
+ */
+ virtual QCString trClassMethods()
+ { return "वर्ग विधियाँ"; }
+
+ /*! Used as the header of a list of instance methods in Objective-C.
+ * These are similar to public member functions in C++.
+ */
+ virtual QCString trInstanceMethods()
+ { return "उदाहरण विधियाँ"; }
+
+ /*! Used as the header of the member functions of an Objective-C class.
+ */
+ virtual QCString trMethodDocumentation()
+ { return "विधि दस्तावेज़ीकरण"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.8.4
+//////////////////////////////////////////////////////////////////////////
+
+ /** old style UNO IDL services: implemented interfaces */
+ virtual QCString trInterfaces()
+ { return "निर्यातीत अंतराफलकगण"; }
+
+ /** old style UNO IDL services: inherited services */
+ virtual QCString trServices()
+ { return "शामिलीत सेवाएं"; }
+
+ /** UNO IDL constant groups */
+ virtual QCString trConstantGroups()
+ { return "स्थिर समूहगण"; }
+
+ /** UNO IDL constant groups */
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
+ {
+ QCString result = namespaceName;
+ result += " स्थिर समूह संदर्भ";
+ return result;
+ }
+
+ /** UNO IDL service page title */
+ virtual QCString trServiceReference(const QCString &sName)
+ {
+ QCString result = sName;
+ result += " सेवा संदर्भ";
+ return result;
+ }
+
+ /** UNO IDL singleton page title */
+ virtual QCString trSingletonReference(const QCString &sName)
+ {
+ QCString result = sName;
+ result += " एकल संदर्भ";
+ return result;
+ }
+
+ /** UNO IDL service page */
+ virtual QCString trServiceGeneratedFromFiles(bool single)
+ {
+ // single is true implies a single file
+ QCString result = "इस सेवा के लिए दस्तावेज़ीकरण निम्न फ़ाइल";
+ if (!single)
+ result += "ों";
+ result += " से उत्पन्न किया गया था:";
+ return result;
+ }
+
+ /** UNO IDL singleton page */
+ virtual QCString trSingletonGeneratedFromFiles(bool single)
+ {
+ // single is true implies a single file
+ QCString result = "इस एकल के लिए दस्तावेज़ीकरण निम्न फ़ाइल";
+ if (!single)
+ result += "ों";
+ result += " से उत्पन्न किया गया था:";
+ return result;
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.8.15
+//////////////////////////////////////////////////////////////////////////
+
+ /** VHDL design unit hierarchy */
+ virtual QCString trDesignUnitHierarchy()
+ { return "डिज़ाइन इकाई पदानुक्रम"; }
+
+ /** VHDL design unit list */
+ virtual QCString trDesignUnitList()
+ { return "डिज़ाइन इकाई सूची"; }
+
+ /** VHDL design unit members */
+ virtual QCString trDesignUnitMembers()
+ { return "डिज़ाइन इकाई सदस्यगण"; }
+
+ /** VHDL design unit list description */
+ virtual QCString trDesignUnitListDescription()
+ { return "यहाँ उन सभी डिज़ाइन इकाई सदस्यों की सूची उनसे संबंधित इकाईयों की लिंक के साथ दी गई हैं:"; }
+
+ /** VHDL design unit index */
+ virtual QCString trDesignUnitIndex()
+ { return "डिज़ाइन इकाई अनुक्रमणिका"; }
+
+ /** VHDL design units */
+ virtual QCString trDesignUnits()
+ { return "डिज़ाइन इकाईयाँ"; }
+
+ /** VHDL functions/procedures/processes */
+ virtual QCString trFunctionAndProc()
+ { return "फलनगण/कार्यविधियाँ/प्रक्रियाएं"; }
+
+ /** VHDL type */
+ virtual QCString trVhdlType(uint64 type,bool single)
+ {
+ switch (type)
+ {
+ case VhdlDocGen::LIBRARY:
+ if (single) return "संग्रह";
+ else return "संग्रहगण";
+ case VhdlDocGen::PACKAGE:
+ if (single) return "संकुल";
+ else return "संकुलगण";
+ case VhdlDocGen::SIGNAL:
+ if (single) return "संकेत";
+ else return "संकेतगण";
+ case VhdlDocGen::COMPONENT:
+ if (single) return "अंग";
+ else return "अंगगण";
+ case VhdlDocGen::CONSTANT:
+ if (single) return "स्थिर";
+ else return "स्थिरगण";
+ case VhdlDocGen::ENTITY:
+ if (single) return "इकाई";
+ else return "इकाईयाँ";
+ case VhdlDocGen::TYPE:
+ if (single) return "प्ररूप";
+ else return "प्ररूपगण";
+ case VhdlDocGen::SUBTYPE:
+ if (single) return "उपप्ररूप";
+ else return "उपप्ररूपगण";
+ case VhdlDocGen::FUNCTION:
+ if (single) return "फलन";
+ else return "फलनगण";
+ case VhdlDocGen::RECORD:
+ if (single) return "अभिलेख";
+ else return "अभिलेखगण";
+ case VhdlDocGen::PROCEDURE:
+ if (single) return "कार्यविधि";
+ else return "कार्यविधियाँ";
+ case VhdlDocGen::ARCHITECTURE:
+ if (single) return "वास्तुकला";
+ else return "वास्तुकलाएं";
+ case VhdlDocGen::ATTRIBUTE:
+ if (single) return "तर्क";
+ else return "तर्कगण";
+ case VhdlDocGen::PROCESS:
+ if (single) return "प्रक्रिया";
+ else return "प्रक्रियाएं";
+ case VhdlDocGen::PORT:
+ if (single) return "द्वार";
+ else return "द्वारगण";
+ case VhdlDocGen::USE:
+ if (single) return "प्रयोग खंड";
+ else return "प्रयोग खंडगण";
+ case VhdlDocGen::GENERIC:
+ if (single) return "सामान्य";
+ else return "सामान्यगण";
+ case VhdlDocGen::PACKAGE_BODY:
+ return "संकुल शरीर";
+ case VhdlDocGen::UNITS:
+ return "इकाईयाँ";
+ case VhdlDocGen::SHAREDVARIABLE:
+ if (single) return "साझाकृत परिवर्तनशील";
+ else return "साझाकृत परिवर्तनशीलगण";
+ case VhdlDocGen::VFILE:
+ if (single) return "फ़ाइल";
+ else return "फ़ाइलगण";
+ case VhdlDocGen::GROUP:
+ if (single) return "समूह";
+ else return "समूहगण";
+ case VhdlDocGen::INSTANTIATION:
+ if (single) return "उदाहरणीकरण";
+ else return "उदाहरणीकरणगण";
+ case VhdlDocGen::ALIAS:
+ if (single) return "उपनाम";
+ else return "उपनामगण";
+ case VhdlDocGen::CONFIG:
+ if (single) return "विन्यास";
+ else return "विन्यासगण";
+ case VhdlDocGen::MISCELLANEOUS:
+ return "विविध";
+ case VhdlDocGen::UCF_CONST:
+ return "बाध्यताएं";
+ default:
+ return "वर्ग";
+ }
+ }
+
+ virtual QCString trCustomReference(const QCString &name)
+ { return name + " संदर्भ"; }
+
+ virtual QCString trConstants()
+ { return "स्थिरगण"; }
+
+ virtual QCString trConstantDocumentation()
+ { return "स्थिर दस्तावेज़ीकरण"; }
+
+ virtual QCString trSequences()
+ { return "अनुक्रमगण"; }
+
+ virtual QCString trSequenceDocumentation()
+ { return "अनुक्रम दस्तावेज़ीकरण"; }
+
+ virtual QCString trDictionaries()
+ { return "शब्दकोशगण"; }
+
+ virtual QCString trDictionaryDocumentation()
+ { return "शब्दकोश दस्तावेज़ीकरण"; }
+
+ virtual QCString trSliceInterfaces()
+ { return "अंतराफलकगण"; }
+
+ virtual QCString trInterfaceIndex()
+ { return "अंतराफलक अनुक्रमणिका"; }
+
+ virtual QCString trInterfaceList()
+ { return "अंतराफलक सूची"; }
+
+ virtual QCString trInterfaceListDescription()
+ { return "यहाँ संक्षिप्त विवरण के साथ अंतराफलकगण हैं:"; }
+
+ virtual QCString trInterfaceHierarchy()
+ { return "अंतराफलक पदानुक्रम"; }
+
+ virtual QCString trInterfaceHierarchyDescription()
+ { return "यह अंतराफलक विरासत सूची मोटे तौर पर क्रमबद्ध है, लेकिन पूरी तरह से नहीं, वर्णानुक्रम में:"; }
+
+ virtual QCString trInterfaceDocumentation()
+ { return "अंतराफलक दस्तावेज़ीकरण"; }
+
+ virtual QCString trStructs()
+ { return "संरचनाएं"; }
+
+ virtual QCString trStructIndex()
+ { return "संरचना अनुक्रमणिका"; }
+
+ virtual QCString trStructList()
+ { return "संरचना सूची"; }
+
+ virtual QCString trStructListDescription()
+ { return "यहाँ संक्षिप्त विवरण के साथ संरचनाएं हैं:"; }
+
+ virtual QCString trStructDocumentation()
+ { return "संरचना दस्तावेज़ीकरण"; }
+
+ virtual QCString trExceptionIndex()
+ { return "अपवाद अनुक्रमणिका"; }
+
+ virtual QCString trExceptionList()
+ { return "अपवाद सूची"; }
+
+ virtual QCString trExceptionListDescription()
+ { return "यहाँ संक्षिप्त विवरण के साथ अपवादगण हैं:"; }
+
+ virtual QCString trExceptionHierarchy()
+ { return "अपवाद पदानुक्रम"; }
+
+ virtual QCString trExceptionHierarchyDescription()
+ { return "यह अपवाद विरासत सूची मोटे तौर पर क्रमबद्ध है, लेकिन पूरी तरह से नहीं, वर्णानुक्रम में:"; }
+
+ virtual QCString trExceptionDocumentation()
+ { return "अपवाद दस्तावेज़ीकरण"; }
+
+ virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)
+ {
+ QCString result = clName;
+ if (isLocal) result += " स्थानीय";
+ switch (compType)
+ {
+ case ClassDef::Class: result+=" वर्ग"; break;
+ case ClassDef::Struct: result+=" संरचना"; break;
+ case ClassDef::Union: result+=" मिलन"; break;
+ case ClassDef::Interface: result+=" अंतराफलक"; break;
+ case ClassDef::Protocol: result+=" प्रोटोकॉल"; break;
+ case ClassDef::Category: result+=" श्रेणी"; break;
+ case ClassDef::Exception: result+=" अपवाद"; break;
+ default: break;
+ }
+ result += " संदर्भ";
+ return result;
+ }
+
+ virtual QCString trOperations()
+ { return "कार्यवाहीयाँ"; }
+
+ virtual QCString trOperationDocumentation()
+ { return "कार्यवाही दस्तावेज़ीकरण"; }
+
+ virtual QCString trDataMembers()
+ { return "आंकड़े सदस्यगण"; }
+
+ virtual QCString trDataMemberDocumentation()
+ { return "आंकड़े सदस्य दस्तावेज़ीकरण"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.8.19
+//////////////////////////////////////////////////////////////////////////
+
+ /** VHDL design unit documentation */
+ virtual QCString trDesignUnitDocumentation()
+ { return "डिज़ाइन इकाई दस्तावेज़ीकरण"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.9.2
+//////////////////////////////////////////////////////////////////////////
+
+ /** C++20 concept */
+ virtual QCString trConcept(bool first_capital, bool singular)
+ {
+ // There is no first-letter capitalization notion in Hindi.
+ QCString result = "संकल्पना";
+ if (!singular) result += "एं";
+ return result;
+ }
+ /*! used as the title of the HTML page of a C++20 concept page */
+ virtual QCString trConceptReference(const QCString &conceptName)
+ {
+ QCString result = conceptName;
+ result += " संकल्पना संदर्भ";
+ return result;
+ }
+
+ /*! used as the title of page containing all the index of all concepts. */
+ virtual QCString trConceptList()
+ { return "संकल्पना सूची"; }
+
+ /*! used as the title of chapter containing the index listing all concepts. */
+ virtual QCString trConceptIndex()
+ { return "संकल्पना अनुक्रमणिका"; }
+
+ /*! used as the title of chapter containing all information about concepts. */
+ virtual QCString trConceptDocumentation()
+ { return "संकल्पना दस्तावेज़ीकरण"; }
+
+ /*! used as an introduction to the concept list */
+ virtual QCString trConceptListDescription(bool extractAll)
+ {
+ QCString result = "यहाँ संक्षिप्त विवरण के साथ सभी ";
+ if (!extractAll)
+ result += "दस्तावेज़ीकृत ";
+ result += "संकल्पनाएं की सूची दी गई है:";
+ return result;
+ }
+
+ /*! used to introduce the definition of the C++20 concept */
+ virtual QCString trConceptDefinition()
+ { return "संकल्पना परिभाषा"; }
+};
+
+#endif
{ return "\\usepackage[croatian]{babel}\n"; }
QCString trISOLang()
{ return "hr"; }
+ virtual QCString getLanguageString()
+ {
+ return "0x41A Croatian";
+ }
QCString trRelatedFunctions()
{ return "Povezane funkcije"; }
QCString trRelatedSubscript()
{ return ", uključujući naslijeđene članove."; }
QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="napravljeno automatski Doxygen-om";
- if (!s.isEmpty()) result+=(QCString)" za "+s;
+ if (!s.isEmpty()) result+=" za "+s;
result+=" iz programskog koda.";
return result;
}
}
else
{
- return "Skupno kazalo ";
+ return "Skupno kazalo ";
}
- }
+ }
QCString trFileIndex()
{ return "Kazalo datoteka"; }
QCString trModuleDocumentation()
{ return "Dokumentacija modula"; }
QCString trClassDocumentation()
{
- if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
- {
- return "Dokumentacija struktura podataka";
- }
- else
- {
- return "Dokumentacija klasa";
- }
- }
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ {
+ return "Dokumentacija struktura podataka";
+ }
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
+ else
+ {
+ return "Dokumentacija klasa";
+ }
+ }
QCString trFileDocumentation()
{ return "Dokumentacija datoteka"; }
QCString trExampleDocumentation()
{ return "Dokumentacija primjera"; }
- QCString trPageDocumentation()
- { return "Dokumentacija vezane stranice"; }
QCString trReferenceManual()
{ return "Priručnik"; }
{ return "Strukture"; }
QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Napravljeno "+date;
- if (!projName.isEmpty()) result+=(QCString)" projekt: "+projName;
+ QCString result="Napravljeno "+date;
+ if (!projName.isEmpty()) result+=" projekt: "+projName;
result+=" generator: ";
return result;
}
{
return QCString("Dijagram klasa za ")+clName;
}
- QCString trForInternalUseOnly()
- { return "Isključivo za internu uporabu."; }
QCString trWarning()
{ return "Upozorenje"; }
QCString trVersion()
/*! this text is put before a collaboration diagram */
QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Kolaboracijski dijagram za "+clName+ ":";
+ return "Kolaboracijski dijagram za "+clName+ ":";
}
/*! this text is put before an include dependency graph */
QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Graf include međuovisnosti za "+fName+":";
+ return "Graf include međuovisnosti za "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Paket "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Lista paketa";
+ return "Paket "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Funkcije u paketu";
}
+ virtual QCString trPackageMembers()
+ {
+ return "članovi u paketu";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Statičke funkcije u paketu";
}
virtual QCString trDirectories()
{ return "Direktoriji"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Stablo direktorija sortirano abecednim redom:"; }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" Modul"; break;
bool)
{ // here s is one of " Module", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Dokumentacija ovog ";
+ QCString result="Dokumentacija ovog ";
switch(compType)
{
case ClassDef::Class: result+="modula"; break;
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)"Datoteka u "+name;
+ return "Datoteka u "+name;
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)"Uključuje datotake u "+name;
+ return "Uključuje datotake u "+name;
}
/** Compiles a date string.
{
return "hu";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x40E Hungarian";
+ }
// --- Language translation methods -------------------
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Ezt a dokumentációt a Doxygen készítette ";
- if (!s.isEmpty()) result+=(QCString)" a" + zed(s[0])+s+(QCString)" projekthez";
+ if (!s.isEmpty()) result+=QCString(" a") + zed(s[0])+s+" projekthez";
result+=" a forráskódból.";
return result;
}
{
return "Adatszerkezetek dokumentációja";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "Osztályok dokumentációja";
virtual QCString trExampleDocumentation()
{ return "Példák dokumentációja"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Kapcsolódó dokumentációk"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Referencia kézikönyv"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"";
- if (!projName.isEmpty()) result+=(QCString)"Projekt: "+projName;
- result+=(QCString)" Készült: "+date+" Készítette: ";
+ QCString result="";
+ if (!projName.isEmpty()) result+="Projekt: "+projName;
+ result+=" Készült: "+date+" Készítette: ";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"A"+zed(clName[0])+clName+" osztály származási diagramja:";
+ return QCString("A")+zed(clName[0])+clName+" osztály származási diagramja:";
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "CSAK BELSŐ HASZNÁLATRA!"; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Figyelmeztetés"; }
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" osztály"; break;
virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,
bool single)
{ // single is true implies a single file
- QCString result=(QCString)"Ez a dokumentáció ";
+ QCString result="Ez a dokumentáció ";
switch(compType)
{
case ClassDef::Class: result+="az osztályról"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"A"+zed(clName[0])+clName+" osztály együttműködési diagramja:";
+ return QCString("A")+zed(clName[0])+clName+" osztály együttműködési diagramja:";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"A"+zed(fName[0])+fName+" definíciós fájl függési gráfja:";
+ return QCString("A")+zed(fName[0])+fName+" definíciós fájl függési gráfja:";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return name+(QCString)" csomag";
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Csomaglista";
+ return name+" csomag";
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Csomag függvények";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Csomag tagok";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Statikus csomag függvények";
}
virtual QCString trDirectories()
{ return "Könyvtárak"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Majdnem (de nem teljesen) betűrendbe szedett "
- "könyvtárhierarchia:";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" modul"; break;
bool single)
{
// single is true implies a single file
- QCString result=(QCString)"Ez a dokumentáció ";
+ QCString result="Ez a dokumentáció ";
switch(compType)
{
case ClassDef::Class: result+="a modulról"; break;
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)"Fájl a(z) "+name+" könyvtárban";
+ return "Fájl a(z) "+name+" könyvtárban";
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)"Tartalmazott fájl a(z) "+name+" könyvtárban";
+ return "Tartalmazott fájl a(z) "+name+" könyvtárban";
}
/** Compiles a date string.
/** UNO IDL service page title */
virtual QCString trServiceReference(const QCString &sName)
{
- QCString result=(QCString)sName;
+ QCString result=sName;
result+=" szolgáltatás referencia";
return result;
}
/** UNO IDL singleton page title */
virtual QCString trSingletonReference(const QCString &sName)
{
- QCString result=(QCString)sName;
+ QCString result=sName;
result+=" egyke példány referencia";
return result;
}
virtual QCString trServiceGeneratedFromFiles(bool single)
{
// single is true implies a single file
- QCString result=(QCString)"A szolgáltatás dokumentációja "
+ QCString result="A szolgáltatás dokumentációja "
"a következő fájl";
if (single) result+="ból"; else result+="okból";
result+="lett létrehozva:";
virtual QCString trSingletonGeneratedFromFiles(bool single)
{
// single is true implies a single file
- QCString result=(QCString)"Az egyke példány dokomentációja "
+ QCString result="Az egyke példány dokomentációja "
"a következő fájl";
if (single) result+="ból"; else result+="okból";
result+="lett létrehozva:";
{
return "id";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x421 Indonesian";
+ }
// --- Language translation methods -------------------
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Dibangkitkan secara otomatis oleh Doxygen";
- if (!s.isEmpty()) result+=(QCString)" untuk "+s;
+ if (!s.isEmpty()) result+=" untuk "+s;
result+=" dari kode sumber.";
return result;
}
{
return "Dokumentasi Struktur Data";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "Dokumentasi Kelas";
virtual QCString trExampleDocumentation()
{ return "Dokumentasi Contoh"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Dokumentasi Halaman"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Dokumen Referensi"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Dibangkitkan pada tanggal "+date;
- if (!projName.isEmpty()) result+=(QCString)" untuk "+projName;
- result+=(QCString)" oleh";
+ QCString result="Dibangkitkan pada tanggal "+date;
+ if (!projName.isEmpty()) result+=" untuk "+projName;
+ result+=" oleh";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"Diagram hierarki kelas untuk "+clName+":";
+ return "Diagram hierarki kelas untuk "+clName+":";
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "Hanya untuk digunakan secara internal."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Peringatan"; }
default: break;
}
if (isTemplate) result+=" Template ";
- result+=(QCString)clName;
+ result+=clName;
return result;
}
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Dokumentasi untuk ";
+ QCString result="Dokumentasi untuk ";
switch(compType)
{
case ClassDef::Class: result+="kelas"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Diagram kolaborasi untuk "+clName+":";
+ return "Diagram kolaborasi untuk "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Bagan kebergantungan pemuatan untuk "+fName+":";
+ return "Bagan kebergantungan pemuatan untuk "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Paket "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Daftar Paket";
+ return "Paket "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Daftar Fungsi Paket";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Anggota-anggota Paket";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Daftar Fungsi Statis Paket";
}
virtual QCString trDirectories()
{ return "Daftar Direktori"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Struktur direktori ini diurutkan hampir berdasarkan abjad:";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
case ClassDef::Exception: result+="Eksepsi "; break;
default: break;
}
- result+=(QCString)clName;
+ result+=clName;
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
bool single)
{ // here s is one of " Module", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Dokumentasi untuk ";
+ QCString result="Dokumentasi untuk ";
switch(compType)
{
case ClassDef::Class: result+="module"; break;
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)"File dimuat dalam "+name;
+ return "File dimuat dalam "+name;
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)"Memuat file dalam "+name;
+ return "Memuat file dalam "+name;
}
/** Compiles a date string.
* 2006/10: made class to derive directly from Translator class (reported in Petr Prikryl October 9 translator report)
* 2006/06: updated translation of new items used since version 1.4.6
* 2006/05: translated new items used since version 1.4.6
- * corrected typo in trPackageMembers method
+ * corrected typo in trPackageFunction method
* 2005/03: translated new items used since version 1.4.1
* removed unused methods listed in Petr Prikryl February 28 translator report
* 2004/09: translated new items used since version 1.3.9
{
return "it";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x410 Italian";
+ }
// --- Language translation methods -------------------
QCString trGeneratedAutomatically(const QCString &s)
{
QCString result="Generato automaticamente da Doxygen";
- if (!s.isEmpty()) result+=(QCString)" per "+s;
+ if (!s.isEmpty()) result+=" per "+s;
result+=" a partire dal codice sorgente.";
return result;
}
QCString trExampleDocumentation()
{ return "Documentazione degli esempi"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- QCString trPageDocumentation()
- { return "Documentazione delle pagine tra loro collegate "; }
-
/*! This is used in LaTeX as the title of the document */
QCString trReferenceManual()
{ return "Manuale di riferimento"; }
*/
QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Generato "+date;
- if (!projName.isEmpty()) result+=(QCString)" per "+projName;
- result+=(QCString)" da";
+ QCString result="Generato "+date;
+ if (!projName.isEmpty()) result+=" per "+projName;
+ result+=" da";
return result;
}
/*! this text is put before a class diagram */
QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"Diagramma delle classi per "+clName;
+ return "Diagramma delle classi per "+clName;
}
- /*! this text is generated when the \\internal command is used. */
- QCString trForInternalUseOnly()
- { return "Solo per uso interno."; }
-
/*! this text is generated when the \\warning command is used. */
QCString trWarning()
{ return "Avvertimento"; }
case ClassDef::Exception: result+="l'eccezione "; break;
default: break;
}
- result+=(QCString)clName;
+ result+=clName;
return result;
}
QCString trFileReference(const QCString &fileName)
{
QCString result="Riferimenti per il file ";
- result+=(QCString)fileName;
+ result+=fileName;
return result;
}
QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result="Riferimenti per il namespace ";
- result+=(QCString)namespaceName;
+ result+=namespaceName;
return result;
}
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"La documentazione per quest";
+ QCString result="La documentazione per quest";
switch(compType)
{
case ClassDef::Class: result+="a classe"; break;
/*! this text is put before a collaboration diagram */
QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Diagramma di collaborazione per "+clName+":";
+ return "Diagramma di collaborazione per "+clName+":";
}
/*! this text is put before an include dependency graph */
QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Grafo delle dipendenze di inclusione per "+fName+":";
+ return "Grafo delle dipendenze di inclusione per "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Package "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Lista dei package";
+ return "Package "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Funzioni con visibilità di package";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Membri con visibilità di package";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Funzioni statiche con visibilità di package";
}
virtual QCString trDirectories()
{ return "Directory"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Questa gerarchia di directory è approssimativamente, "
- "ma non completamente, ordinata in ordine alfabetico:";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
case ClassDef::Exception: result+=" l'eccezione"; break;
default: break;
}
- result+=(QCString)clName;
+ result+=clName;
return result;
}
bool single)
{ // here s is one of " Module", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"La documentazione per quest";
+ QCString result="La documentazione per quest";
switch(compType)
{
case ClassDef::Class: result+="o modulo"; break;
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)"File in "+name;
+ return "File in "+name;
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)"Include il file in "+name;
+ return "Include il file in "+name;
}
/** Compiles a date string.
/** UNO IDL service page title */
virtual QCString trServiceReference(const QCString &sName)
{
- QCString result=(QCString)"Riferimenti per il servizio ";
+ QCString result="Riferimenti per il servizio ";
result+=sName;
return result;
}
/** UNO IDL singleton page title */
virtual QCString trSingletonReference(const QCString &sName)
{
- QCString result=(QCString)"Riferimenti per il singleton ";
+ QCString result="Riferimenti per il singleton ";
result+=sName;
return result;
}
virtual QCString trServiceGeneratedFromFiles(bool single)
{
// single is true implies a single file
- QCString result=(QCString)"La documentazione per questo servizio "
+ QCString result="La documentazione per questo servizio "
"è stata generata a partire ";
if (single) result+="dal seguente file:"; else result+="dai seguenti file:";
return result;
virtual QCString trSingletonGeneratedFromFiles(bool single)
{
// single is true implies a single file
- QCString result=(QCString)"La documentazione per questo singleton "
+ QCString result="La documentazione per questo singleton "
"è stata generata a partire ";
if (single) result+="dal seguente file:"; else result+="dai seguenti file:";
return result;
{
return "ja";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x411 Japanese";
+ }
};
#endif
{
return "ja";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x411 Japanese";
+ }
virtual QCString latexFontenc()
{
return "";
{
return "\\end{CJK}\n";
}
+ virtual bool needsPunctuation()
+ {
+ return false;
+ }
/*! used in the compound documentation before a list of related functions. */
virtual QCString trRelatedFunctions()
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result = "Doxygen により";
- if (!s.isEmpty()) result=(QCString)" "+s+"の";
+ if (!s.isEmpty()) result=" "+s+"の";
result+="ソースコードから抽出しました。";
return result;
}
{
return "データ構造詳解";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "クラス詳解";
virtual QCString trExampleDocumentation()
{ return "各例詳解"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "ページ詳解"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "リファレンスマニュアル"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result = (QCString)date+"作成";
- if (!projName.isEmpty()) result+=(QCString)" - " + projName;
+ QCString result = date+"作成";
+ if (!projName.isEmpty()) result+=" - " + projName;
result+=" / 構成: ";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)clName+" の継承関係図";
+ return clName+" の継承関係図";
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "内部処理用です。"; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "警告"; }
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName+" ";
+ QCString result=clName+" ";
switch(compType)
{
case ClassDef::Class: result+="クラス"; break;
/*! used as the title of the HTML page of a file */
virtual QCString trFileReference(const QCString &fileName)
{
- QCString result=(QCString)fileName+" ファイル";
+ QCString result=fileName+" ファイル";
return result;
}
/*! used as the title of the HTML page of a namespace */
virtual QCString trNamespaceReference(const QCString &namespaceName)
{
- QCString result=(QCString)namespaceName+" 名前空間";
+ QCString result=namespaceName+" 名前空間";
return result;
}
bool /*single*/)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"この";
+ QCString result="この";
switch(compType)
{
case ClassDef::Class: result+="クラス"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)clName+" 連携図";
+ return clName+" 連携図";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)fName+" の依存先関係図:";
+ return fName+" の依存先関係図:";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)name+" パッケージ";
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "パッケージ一覧";
+ return name+" パッケージ";
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "関数";
}
+ virtual QCString trPackageMembers()
+ {
+ return "パッケージ内のメンバ";
+ }
+
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "静的関数";
}
virtual QCString trDirectories()
{ return "ディレクトリ"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "このディレクトリ一覧はおおまかにはソートされていますが、"
- "完全にアルファベット順でソートされてはいません。";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
default: break;
}
if (isTemplate) result += "テンプレート ";
- result+=(QCString)clName;
+ result+=clName;
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)name+"にあるファイル";
+ return name+"にあるファイル";
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)name+"にあるファイルを include している";
+ return name+"にあるファイルを include している";
}
/** Compiles a date string.
/** UNO IDL service page title */
virtual QCString trServiceReference(const QCString &sName)
{
- QCString result=(QCString)sName;
+ QCString result=sName;
result+=" サービス詳解";
return result;
}
/** UNO IDL singleton page title */
virtual QCString trSingletonReference(const QCString &sName)
{
- QCString result=(QCString)sName;
+ QCString result=sName;
result+=" Singleton 詳解";
return result;
}
{
return "ko";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x412 Korean";
+ }
};
#endif
files frees the maintainer from thinking about whether the
first, the second, or both files should be included or not, and
why. This holds namely for localized translators because their
- base class is changed occasionaly to adapter classes when the
+ base class is changed occasionally to adapter classes when the
Translator class changes the interface, or back to the
Translator class (by the local maintainer) when the localized
translator is made up-to-date again.
*/
class TranslatorKorean : public TranslatorAdapter_1_8_15
{
- protected:
- friend class TranslatorAdapterBase;
- virtual ~TranslatorKorean() {}
-
public:
// --- Language control methods -------------------
{
return "ko";
}
-
+ virtual QCString getLanguageString()
+ {
+ return "0x412 Korean";
+ }
+ virtual bool needsPunctuation()
+ {
+ return false;
+ }
// --- Language translation methods -------------------
/*! used in the compound documentation before a list of related functions. */
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="소스 코드로부터 ";
- if (!s.isEmpty()) result+=s+(QCString)"를 위해 ";
+ if (!s.isEmpty()) result+=s+"를 위해 ";
result+="Doxygen에 의해 자동으로 생성됨.";
return result;
}
{
return "데이터 구조 문서화";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "클래스 문서화";
virtual QCString trExampleDocumentation()
{ return "예제 문서화"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "페이지 문서화"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "참조 매뉴얼"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"생성시간 : "+date;
- if (!projName.isEmpty()) result+=(QCString)", 프로젝트명 : "+projName;
- result+=(QCString)", 생성자 : ";
+ QCString result="생성시간 : "+date;
+ if (!projName.isEmpty()) result+=", 프로젝트명 : "+projName;
+ result+=", 생성자 : ";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)clName+"에 대한 상속 다이어그램 : ";
+ return clName+"에 대한 상속 다이어그램 : ";
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "내부적적으로만 사용하기 위해."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "경고"; }
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" 클래스"; break;
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"이 ";
+ QCString result="이 ";
switch(compType)
{
case ClassDef::Class: result+="클래스"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)clName+"에 대한 협력 다이어그램:";
+ return clName+"에 대한 협력 다이어그램:";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)fName+"에 대한 include 의존 그래프";
+ return fName+"에 대한 include 의존 그래프";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return name+(QCString)" 패키지";
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "패키지 목록";
+ return name+" 패키지";
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "패키지 함수";
}
+ virtual QCString trPackageMembers()
+ {
+ return "패키지 멤버들";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "정적 패키지 함수";
}
virtual QCString trDirectories()
{ return "디렉토리"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "이 디렉토리 목록은 완전하진 않지만, (대략적으로) 알파벳순으로 정렬되어있습니다.:";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" 모듈"; break;
bool single)
{ // here s is one of " Module", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"다음 파일";
+ QCString result="다음 파일";
if (single) result+=""; else result+="들";
result+="로부터 생성된 ";
result+="이 ";
/** UNO IDL service page title */
virtual QCString trServiceReference(const QCString &sName)
{
- QCString result=(QCString)sName;
+ QCString result=sName;
result+=" 서비스 레퍼런스";
return result;
}
/** UNO IDL singleton page title */
virtual QCString trSingletonReference(const QCString &sName)
{
- QCString result=(QCString)sName;
+ QCString result=sName;
result+=" 싱글톤 레퍼런스";
return result;
}
virtual QCString trServiceGeneratedFromFiles(bool single)
{
// single is true implies a single file
- QCString result=(QCString)"이 서비스에 대한 문서화는 다음의 파일";
+ QCString result="이 서비스에 대한 문서화는 다음의 파일";
if (!single) result+="들";
result+="로부터 생성되었습니다.:";
return result;
virtual QCString trSingletonGeneratedFromFiles(bool single)
{
// single is true implies a single file
- QCString result=(QCString)"이 싱글톤에 대한 문서화는 다음의 파일";
+ QCString result="이 싱글톤에 대한 문서화는 다음의 파일";
if (!single) result+="들";
result+="로부터 생성되었습니다.:";
return result;
{
return "lt";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x427 Lithuanian";
+ }
// --- Language translation methods -------------------
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Automatiškai sugeneruota Doxygen įrankiu";
- if (!s.isEmpty()) result+=(QCString)" "+s;
+ if (!s.isEmpty()) result+=" "+s;
result+=" iš programos kodo.";
return result;
}
{
return "Duomenų Struktūros Dokumentacija";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "Klasės Dokumentacija";
virtual QCString trExampleDocumentation()
{ return "Pavyzdžio Dokumentacija"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Puslapio Dokumentacija"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Informacinis Vadovas"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Sugeneruota "+date;/*FIXME*/
- if (!projName.isEmpty()) result+=(QCString)" "+projName;/*FIXME*/
- result+=(QCString)" ";/*FIXME*/
+ QCString result="Sugeneruota "+date;/*FIXME*/
+ if (!projName.isEmpty()) result+=" "+projName;/*FIXME*/
+ result+=" ";/*FIXME*/
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"Paveldimumo diagrama "+clName+":"; /*FIXME*/
+ return "Paveldimumo diagrama "+clName+":"; /*FIXME*/
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "Tiktai vidiniam naudojimui."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Įspėjimas"; }
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" Klasė"; break;
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Dokumentacija ";
+ QCString result="Dokumentacija ";
switch(compType)
{
case ClassDef::Class: result+="šiai klasei"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Bendradarbiavimo diagrama "+clName+":";/*FIXME*/
+ return "Bendradarbiavimo diagrama "+clName+":";/*FIXME*/
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Įtraukimo priklausomybių diagrama "+fName+":";/*FIXME*/
+ return "Įtraukimo priklausomybių diagrama "+fName+":";/*FIXME*/
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Paketas "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Paketo Sąrašas";
+ return "Paketas "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Paketo Funkcijos";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Paketo Nariai";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Statinės Paketo Funkcijos";
}
virtual QCString trDirectories()
{ return "Direktorijos"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Ši direktorjų strūktūra grubiai surikiuota abėcėlės tvarka:";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
files frees the maintainer from thinking about whether the
first, the second, or both files should be included or not, and
why. This holds namely for localized translators because their
- base class is changed occasionaly to adapter classes when the
+ base class is changed occasionally to adapter classes when the
Translator class changes the interface, or back to the
Translator class (by the local maintainer) when the localized
translator is made up-to-date again.
{
return "lv";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x426 Latvian";
+ }
// --- Language translation methods -------------------
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Automātiski ģenerēts izmantojot Doxygen";
- if (!s.isEmpty()) result+=(QCString)" priekš "+s;
+ if (!s.isEmpty()) result+=" priekš "+s;
result+=" no pirmkoda.";
return result;
}
{
return "Datu struktūras dokomentācija";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "Klases dokumentācija";
virtual QCString trExampleDocumentation()
{ return "Piemēri"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Lapas dokumentācija"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Rokasgrāmata"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Ģenerēts "+date;
- if (!projName.isEmpty()) result+=(QCString)" projektam "+projName;
- result+=(QCString)" ar";
+ QCString result="Ģenerēts "+date;
+ if (!projName.isEmpty()) result+=" projektam "+projName;
+ result+=" ar";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"Mantojamības diagramma klasei "+clName+":";
+ return "Mantojamības diagramma klasei "+clName+":";
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "Tikai iekšējai lietošanai."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Brīdinājums"; }
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" klases"; break;
virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,
bool single)
{ // single is true implies a single file
- QCString result=(QCString)"Šī";
+ QCString result="Šī";
switch(compType)
{
case ClassDef::Class: result+="s klases"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Sadarbības diagramma klasei "+clName+":";
+ return "Sadarbības diagramma klasei "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Include dependency graph for "+fName+":";
+ return "Include dependency graph for "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Pakotne "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Pakotņu saraksts";
+ return "Pakotne "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Pakas funkcijas";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Pakas elementi";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Statiskās pakas funkcijas";
}
virtual QCString trDirectories()
{ return "Direktorijas"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Šī direktoriju hierarhija ir aptuveni, "
- "bet ne pilnībā, alfabēta secībā:";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" moduļa"; break;
bool single)
{
// single is true implies a single file
- QCString result=(QCString)"Dokumentācija š";
+ QCString result="Dokumentācija š";
switch(compType)
{
case ClassDef::Class: result+="im modulim"; break;
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)"File in "+name;
+ return "File in "+name;
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)"Includes file in "+name;
+ return "Includes file in "+name;
}
/** Compiles a date string.
{
return "Metožu dokumentācija";
}
-
- /*! Used as the title of the design overview picture created for the
- * VHDL output.
- */
- virtual QCString trDesignOverview()
- {
- return "Dizaina pārskats";
- }
-
};
#endif
{
return "mk";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x042f Macedonian (Former Yugoslav Republic of Macedonia)";
+ }
// --- Language translation methods -------------------
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Автоматски создадено од Doxygen";
- if (!s.isEmpty()) result+=(QCString)" за "+s;
+ if (!s.isEmpty()) result+=" за "+s;
result+=" изворниот код.";
return result;
}
{
return "Документација на Структури";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "Документација на Класи";
virtual QCString trExampleDocumentation()
{ return "Документаија на Примери"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Документација на Страници"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Прирачник"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Создадено на "+date;
- if (!projName.isEmpty()) result+=(QCString)" за "+projName;
- result+=(QCString)" од";
+ QCString result="Создадено на "+date;
+ if (!projName.isEmpty()) result+=" за "+projName;
+ result+=" од";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"Диаграм на наследување за "+clName+":";
+ return "Диаграм на наследување за "+clName+":";
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "Само за интерна употреба."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Предупредување"; }
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" Класа"; break;
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Документацијата за ";
+ QCString result="Документацијата за ";
switch(compType)
{
case ClassDef::Class: result+="оваа класа"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Диаграм на соработка за "+clName+":";
+ return "Диаграм на соработка за "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Вклучен дијаграм на зависност за "+fName+":";
+ return "Вклучен дијаграм на зависност за "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Пакет "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Список на Пакети";
+ return "Пакет "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Функции во Пакетот";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Членови во Пакетот";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Статични Функции во Пакетот";
}
virtual QCString trDirectories()
{ return "Именици"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Ова стебло на именици е приближно азбучно подреден:";}
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName + " - Повикување на";
+ QCString result=clName + " - Повикување на";
switch(compType)
{
case ClassDef::Class: result+=" Класа"; break;
bool single)
{ // here s is one of " Module", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Документацијата за ";
+ QCString result="Документацијата за ";
switch(compType)
{
case ClassDef::Class: result+="оваа класа"; break;
{ return "\\usepackage[dutch]{babel}\n"; }
QCString trISOLang()
{ return "nl"; }
+ virtual QCString getLanguageString()
+ {
+ return "0x413 Dutch";
+ }
QCString trRelatedFunctions()
{ return "Gerelateerde functies"; }
QCString trRelatedSubscript()
{ return ", inclusief alle overgeërfde members."; }
QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Automatisch gegenereerd door Doxygen";
- if (!s.isEmpty()) result+=(QCString)" voor "+s;
+ if (!s.isEmpty()) result+=" voor "+s;
result+=" uit de programmatekst.";
return result;
}
QCString trModuleDocumentation()
{ return "Module Documentatie"; }
QCString trClassDocumentation()
- { return "Klassen Documentatie"; }
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ {
+ return "Klassen Documentatie";
+ }
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
+ else
+ {
+ return "Klassen Documentatie";
+ }
+ }
QCString trFileDocumentation()
{ return "Bestand Documentatie"; }
QCString trExampleDocumentation()
{ return "Documentatie van voorbeelden"; }
- QCString trPageDocumentation()
- { return "Documentatie van gerelateerde pagina's"; }
QCString trReferenceManual()
{ return "Naslagwerk"; }
{ return "Klassen"; }
QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Gegenereerd op "+date;
- if (!projName.isEmpty()) result+=(QCString)" voor "+projName;
- result+=(QCString)" door";
+ QCString result="Gegenereerd op "+date;
+ if (!projName.isEmpty()) result+=" voor "+projName;
+ result+=" door";
return result;
}
QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"Klasse diagram voor "+clName;
+ return "Klasse diagram voor "+clName;
}
- QCString trForInternalUseOnly()
- { return "Alleen voor intern gebruik."; }
QCString trWarning()
{ return "Waarschuwing"; }
QCString trVersion()
bool isTemplate)
// used as the title of the HTML page of a class/struct/union
{
- QCString result=(QCString)clName;
+ QCString result=clName;
if (isTemplate) result+=" Template";
switch(compType)
{
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
- QCString result=(QCString)"De documentatie voor ";
+ bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ QCString result="De documentatie voor ";
switch(compType)
{
case ClassDef::Class: result+=vhdlOpt?"deze ontwerp eenheid":"deze klasse"; break;
/*! this text is put before a collaboration diagram */
QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Collaboratie diagram voor "+clName+":";
+ return "Collaboratie diagram voor "+clName+":";
}
/*! this text is put before an include dependency graph */
QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Include afhankelijkheidsgraaf voor "+fName+":";
+ return "Include afhankelijkheidsgraaf voor "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
QCString trPackage(const QCString &name)
{
- return (QCString)"Package "+name;
- }
- /*! Title of the package index page */
- QCString trPackageList()
- {
- return "Package Lijst";
+ return "Package "+name;
}
/*! The description of the package index page */
QCString trPackageListDescription()
*/
virtual QCString trClass(bool first_capital, bool singular)
{
- QCString result((first_capital ? "Klasse" : "klass"));
+ QCString result((first_capital ? "Klasse" : "klasse"));
if (!singular) result+="n";
return result;
}
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Package Functies";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Package Members";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Statische Package Functies";
}
virtual QCString trDirectories()
{ return "Folders"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Deze folder hiërarchie is min of meer alfabetisch "
- "gesorteerd:";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" Module"; break;
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"De documentatie voor ";
+ QCString result="De documentatie voor ";
switch(compType)
{
case ClassDef::Class: result+="deze module"; break;
/*! directory relation for \a name */
virtual QCString trDirRelation(const QCString &name)
{
- return QCString(name)+" Relatie";
+ return name+" Relatie";
}
/*! Loading message shown when loading search results */
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)"Bestand in "+name;
+ return "Bestand in "+name;
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)"Includeert bestand in "+name;
+ return "Includeert bestand in "+name;
}
virtual QCString trDateTime(int year,int month,int day,int dayOfWeek,
int hour,int minutes,int seconds,
/*! Header for the graph showing the directory dependencies */
virtual QCString trDirDepGraph(const QCString &name)
- { return QCString("Folder afhankelijkheidsgraaf voor ")+name+":"; }
+ { return "Folder afhankelijkheidsgraaf voor "+name+":"; }
//////////////////////////////////////////////////////////////////////////
// new since 1.8.0
/*! Header of a Java enum page (Java enums are represented as classes). */
virtual QCString trEnumReference(const QCString &name)
- { return QCString(name)+" Enum Referentie"; }
+ { return name+" Enum Referentie"; }
/*! Used for a section containing inherited members */
virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
- { return QCString(members)+" overgeërfd van "+what; }
+ { return members+" overgeërfd van "+what; }
/*! Header of the sections with inherited members specific for the
* base class(es)
/** UNO IDL service page title */
virtual QCString trServiceReference(const QCString &sName)
{
- QCString result=(QCString)sName;
+ QCString result=sName;
result+=" Service Referentie";
return result;
}
/** UNO IDL singleton page title */
virtual QCString trSingletonReference(const QCString &sName)
{
- QCString result=(QCString)sName;
+ QCString result=sName;
result+=" Singleton Referentie";
return result;
}
}
}
virtual QCString trCustomReference(const QCString &name)
- { return QCString(name)+" Referentie"; }
+ { return name+" Referentie"; }
/* Slice */
virtual QCString trConstants()
{ return "Documentatie van exceptions"; }
virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
if (isLocal) result+=" Lokale";
switch(compType)
{
return "Concept definitie";
}
+//////////////////////////////////////////////////////////////////////////
+// new since 1.9.4
+//////////////////////////////////////////////////////////////////////////
+
+ virtual QCString trPackageList()
+ { return "Package Lijst"; }
};
#endif
{
return "nn";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x814 Norwegian";
+ }
// --- Language translation methods -------------------
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Generert automatisk av Doxygen";
- if (!s.isEmpty()) result+=(QCString)" for "+s;
+ if (!s.isEmpty()) result+=" for "+s;
result+=" fra kildekoden.";
return result;
}
virtual QCString trFileList()
{ return "Fil-liste"; }
- /*! This is put above each page as a link to the list of all verbatim headers */
- virtual QCString trHeaderFiles()
- { return "Header-filer"; }
-
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
return result;
}
- /*! This is an introduction to the page with the list of all header files. */
- virtual QCString trHeaderFilesDescription()
- { return "Her er alle header-filene som utgjør API'et:"; }
-
/*! This is an introduction to the page with the list of all examples */
virtual QCString trExamplesDescription()
{ return "Her er en liste over alle eksemplene:"; }
virtual QCString trModulesDescription()
{ return "Her er en liste over alle moduler:"; }
- /*! This sentences is used in the annotated class/file lists if no brief
- * description is given.
- */
- virtual QCString trNoDescriptionAvailable()
- { return "Ingen beskrivelse tilgjengelig"; }
-
// index titles (the project name is prepended for these)
{
return "Datastrukturdokumentasjon";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "Klassedokumentasjon";
virtual QCString trExampleDocumentation()
{ return "Eksempeldokumentasjon"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Sidedokumentasjon"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Referansemanual"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Generert "+date;
- if (!projName.isEmpty()) result+=(QCString)" for "+projName;
- result+=(QCString)" av";
+ QCString result="Generert "+date;
+ if (!projName.isEmpty()) result+=" for "+projName;
+ result+=" av";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"Arvediagram for "+clName+":";
+ return "Arvediagram for "+clName+":";
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "Kun for intern bruk."; }
-
- /*! this text is generated when the \\reimp command is used. */
- virtual QCString trReimplementedForInternalReasons()
- { return "Reimplementert av interne grunner; API er ikke påvirket."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Advarsel"; }
- /*! this text is generated when the \\bug command is used. */
- virtual QCString trBugsAndLimitations()
- { return "Feil og begrensninger"; }
-
/*! this text is generated when the \\version command is used. */
virtual QCString trVersion()
{ return "Versjon"; }
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" Klasse"; break;
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Dokumentasjonen for ";
+ QCString result="Dokumentasjonen for ";
switch(compType)
{
case ClassDef::Class: result+="denne klasse"; break;
// new since 0.49-991003
//////////////////////////////////////////////////////////////////////////
- virtual QCString trSources()
- {
- return "Kilder";
- }
virtual QCString trDefinedAtLineInSourceFile()
{
return "Definisjon på linje @0 i filen @1.";
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Samarbeidsdiagram for "+clName+":";
+ return "Samarbeidsdiagram for "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Avhengighetsgraf for "+fName+":";
+ return "Avhengighetsgraf for "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Package "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Pakke-liste";
+ return "Package "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
{
return "Pakker";
}
- /*! Used as a chapter title for Latex & RTF output */
- virtual QCString trPackageDocumentation()
- {
- return "Pakke-dokumentasjon";
- }
/*! Text shown before a multi-line define */
virtual QCString trDefineValue()
{
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trField(bool first_capital, bool singular)
- {
- QCString result((first_capital ? "Felt" : "felt"));
- if (!singular) result+="";
- return result;
- }
-
- /*! This is used for translation of the word that will possibly
- * be followed by a single name or by a list of names
- * of the category.
- */
virtual QCString trGlobal(bool first_capital, bool singular)
{
QCString result((first_capital ? "Global" : "global"));
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Pakkefunksjoner";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Pakkemedlemmer";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Statiske Pakkefunksjoner";
}
virtual QCString trDirectories()
{ return "Kataloger"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Denne katalogen er grovsortert alfabetisk "
- "(ikke nødvendigvis korrekt).";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
{
return "pl";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x415 Polish";
+ }
// --- Language translation methods -------------------
*/
QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Wygenerowano automatycznie z kodu źródłowego programem Doxygen";
- if (!s.isEmpty()) result+=(QCString)" dla "+s;
+ if (!s.isEmpty()) result+=" dla "+s;
result+=".";
return result;
}
QCString trFileList()
{ return "Lista plików"; }
- /*! This is put above each page as a link to the list of all verbatim headers */
- QCString trHeaderFiles()
- { return "Pliki nagłówkowe"; }
-
/*! This is put above each page as a link to all members of compounds. */
QCString trCompoundMembers()
{
return result;
}
- /*! This is an introduction to the page with the list of all header files. */
- QCString trHeaderFilesDescription()
- { return "Tutaj znajdują się pliki nagłówkowe tworzące API:"; }
-
/*! This is an introduction to the page with the list of all examples */
QCString trExamplesDescription()
{ return "Tutaj znajduje się lista wszystkich przykładów:"; }
QCString trModulesDescription()
{ return "Tutaj znajduje się lista wszystkich grup:"; }
- /*! This sentences is used in the annotated class/file lists if no brief
- * description is given.
- */
- QCString trNoDescriptionAvailable()
- { return "Brak opisu"; }
-
// index titles (the project name is prepended for these)
{
return "Dokumentacja struktur danych";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "Dokumentacja klas";
QCString trExampleDocumentation()
{ return "Dokumentacja przykładów"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- QCString trPageDocumentation()
- { return "Dokumentacja stron"; }
-
/*! This is used in LaTeX as the title of the document */
QCString trReferenceManual()
{ return "Podręcznik"; }
*/
QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Wygenerowano "+date;
- if (!projName.isEmpty()) result+=(QCString)" dla "+projName;
- result+=(QCString)" programem";
+ QCString result="Wygenerowano "+date;
+ if (!projName.isEmpty()) result+=" dla "+projName;
+ result+=" programem";
return result;
}
/*! this text is put before a class diagram */
QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"Diagram dziedziczenia dla "+clName;
+ return "Diagram dziedziczenia dla "+clName;
}
- /*! this text is generated when the \\internal command is used. */
- QCString trForInternalUseOnly()
- { return "Tylko do użytku wewnętrznego."; }
-
- /*! this text is generated when the \\reimp command is used. */
- QCString trReimplementedForInternalReasons()
- { return "Reimplementowana z wewnętrzych przyczyn; nie dotyczy API."; }
-
/*! this text is generated when the \\warning command is used. */
QCString trWarning()
{ return "Ostrzeżenie"; }
- /*! this text is generated when the \\bug command is used. */
- QCString trBugsAndLimitations()
- { return "Błędy i ograniczenia"; }
-
/*! this text is generated when the \\version command is used. */
QCString trVersion()
{ return "Wersja"; }
case ClassDef::Exception: result+=" wyjątku "; break;
default: break;
}
- result+=(QCString)clName;
+ result+=clName;
return result;
}
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Dokumentacja dla te";
+ QCString result="Dokumentacja dla te";
switch(compType)
{
case ClassDef::Class: result+="j klasy"; break;
// new since 0.49-991003
//////////////////////////////////////////////////////////////////////////
- QCString trSources()
- {
- return "Źródła";
- }
QCString trDefinedAtLineInSourceFile()
{
return "Definicja w linii @0 pliku @1.";
/*! this text is put before a collaboration diagram */
QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Diagram współpracy dla "+clName+":";
+ return "Diagram współpracy dla "+clName+":";
}
/*! this text is put before an include dependency graph */
QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Wykres zależności załączania dla "+fName+":";
+ return "Wykres zależności załączania dla "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Pakiet "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Lista Pakietów";
+ return "Pakiet "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
{
return "Pakiety";
}
- /*! Used as a chapter title for Latex & RTF output */
- virtual QCString trPackageDocumentation()
- {
- return "Dokumentacja Pakietu";
- }
/*! Text shown before a multi-line define */
virtual QCString trDefineValue()
{
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trField(bool first_capital, bool singular)
- {
- QCString result((first_capital ? "Pol" : "pol"));
- result+=(singular ? "e" : "a");
- return result;
- }
-
- /*! This is used for translation of the word that will possibly
- * be followed by a single name or by a list of names
- * of the category.
- */
virtual QCString trGlobal(bool first_capital, bool singular)
{
QCString result((first_capital ? "Global" : "global"));
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Funkcje pakietu";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Składowe pakietu";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Statyczne funkcje pakietu";
}
virtual QCString trDirectories()
{ return "Katalogi"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- {
- return "Ta struktura katalogów posortowana jest z grubsza, "
- "choć nie całkowicie, alfabetycznie:";
- }
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
case ClassDef::Exception: result+=" wyjątku "; break;
default: break;
}
- result+=(QCString)clName;
+ result+=clName;
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
bool single)
{
// single is true implies a single file
- QCString result=(QCString)"Dokumentacja dla te";
+ QCString result="Dokumentacja dla te";
switch(compType)
{
case ClassDef::Class: result+="go modułu"; break;
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)"Plik w "+name;
+ return "Plik w "+name;
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)"Zawiera plik w "+name;
+ return "Zawiera plik w "+name;
}
/** Compiles a date string.
* Ulisses Guedes <uli1958 at hotmail dot com>
*
* Notes about this translation:
- * Since I'm Brazilian, this translation may be odd or even incorect for
+ * Since I'm Brazilian, this translation may be odd or even incorrect for
* Portuguese (from Portugal) speakers. If you find any errors, feel free
* to contact me.
*
#define TRANSLATOR_PT_H
-class TranslatorPortuguese : public Translator
+class TranslatorPortuguese : public TranslatorAdapter_1_9_4
{
public:
{
return "pt";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x816 Portuguese(Portugal)";
+ }
// --- Language translation methods -------------------
*/
QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Gerado automaticamente por Doxygen";
- if (!s.isEmpty()) result+=(QCString)" para "+s;
+ if (!s.isEmpty()) result+=" para "+s;
result+=" a partir do código fonte.";
return result;
}
* the documentation of all classes, structs and unions.
*/
QCString trClassDocumentation()
- { return "Documentação da classe"; }
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ {
+ return "Documentação da estruturas de dados";
+ }
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
+ else
+ {
+ return "Documentação da classe";
+ }
+ }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all files.
QCString trExampleDocumentation()
{ return "Documentação do exemplo"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- QCString trPageDocumentation()
- { return "Documentação da página"; }
-
/*! This is used in LaTeX as the title of the document */
QCString trReferenceManual()
{ return "Manual de referência"; }
*/
QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Gerado em "+date;
- if (!projName.isEmpty()) result+=(QCString)" para "+projName;
- result+=(QCString)" por";
+ QCString result="Gerado em "+date;
+ if (!projName.isEmpty()) result+=" para "+projName;
+ result+=" por";
return result;
}
/*! this text is put before a class diagram */
QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"Diagrama de heranças da classe "+clName;
+ return "Diagrama de heranças da classe "+clName;
}
- /*! this text is generated when the \\internal command is used. */
- QCString trForInternalUseOnly()
- { return "Apenas para uso interno."; }
-
/*! this text is generated when the \\warning command is used. */
QCString trWarning()
{ return "Aviso"; }
default: break;
}
if (isTemplate) result+="Template ";
- result+=(QCString)clName;
+ result+=clName;
return result;
}
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
- QCString result=(QCString)"A documentação para ";
+ bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ QCString result="A documentação para ";
switch(compType)
{
case ClassDef::Class: result+=vhdlOpt?"esta Unidade de Design":"esta classe"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Diagrama de colaboração para "+clName+":";
+ return "Diagrama de colaboração para "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Diagrama de dependências de inclusão para "+fName+":";
+ return "Diagrama de dependências de inclusão para "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Pacote "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Lista de pacotes";
+ return "Pacote "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Funções do Pacote";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Membros do Pacote";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Funções Estáticas do Pacote";
}
virtual QCString trDirectories()
{ return "Diretórios"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Esta Hierarquia de Diretórios está parcialmente ordenada (ordem alfabética)"; }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result = (QCString)"Referência ";
+ QCString result = "Referência ";
if (isTemplate) result+="da Template ";
bool single)
{ // here s is one of " Module", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"A documentação para ";
+ QCString result="A documentação para ";
switch(compType)
{
case ClassDef::Class: result+="este modulo "; break;
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)"Ficheiro em "+name;
+ return "Ficheiro em "+name;
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)"Inclui ficheiro em "+name;
+ return "Inclui ficheiro em "+name;
}
/** Compiles a date string.
virtual QCString trServiceGeneratedFromFiles(bool single)
{
// single is true implies a single file
- QCString result=(QCString)"A documentação para este serviço "
+ QCString result="A documentação para este serviço "
"foi gerada a partir ";
if (single) {
result+="do seguinte ficheiro:";
virtual QCString trSingletonGeneratedFromFiles(bool single)
{
// single is true implies a single file
- QCString result=(QCString)"A documentação para este singleton "
+ QCString result="A documentação para este singleton "
"foi gerada a partir ";
if (single) {
result+="do seguinte ficheiro:";
}
virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)
{
- QCString result=(QCString)"Referência ";
+ QCString result="Referência ";
switch(compType)
{
case ClassDef::Class: result+="da Classe "; break;
{
return "ro";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x418 Romanian";
+ }
// --- Language translation methods -------------------
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Generat automat de Doxygen";
- if (!s.isEmpty()) result+=(QCString)" pentru "+s;
+ if (!s.isEmpty()) result+=" pentru "+s;
result+=" din codul sursă.";
return result;
}
{
return "Documentaţia Structurilor de Date";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "Documentaţia Claselor";
virtual QCString trExampleDocumentation()
{ return "Documentaţia Exemplelor"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Documentaţii înrudite"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Manual de utilizare"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Generat "+date;
- if (!projName.isEmpty()) result+=(QCString)" pentru "+projName;
- result+=(QCString)" de către";
+ QCString result="Generat "+date;
+ if (!projName.isEmpty()) result+=" pentru "+projName;
+ result+=" de către";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"Diagrama de relaţii pentru "+clName;
+ return "Diagrama de relaţii pentru "+clName;
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "Doar pentru uz intern."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Atenţie"; }
default: break;
}
if (isTemplate) result+=" (Template) ";
- result+=(QCString)clName;
+ result+=clName;
return result;
}
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Documentaţia pentru această ";
+ QCString result="Documentaţia pentru această ";
switch(compType)
{
case ClassDef::Class: result+="clasă"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Diagrama de relaţii pentru "+clName+":";
+ return "Diagrama de relaţii pentru "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Graful dependenţelor prin incluziune pentru "+fName+":";
+ return "Graful dependenţelor prin incluziune pentru "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Pachet "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Lista Pachetelor";
+ return "Pachet "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Funcţii în pachet";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Membrii în pachet";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Funcţii statice în pachet";
}
virtual QCString trDirectories()
{ return "Directoare"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Această ierarhie de directoare este sortată în general, "
- "dar nu complet, în ordine alfabetică:";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
default: break;
}
if (isTemplate) result+="(Template) ";
- result+=(QCString)clName;
+ result+=clName;
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
bool single)
{ // here s is one of " Module", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Documentaţia ";
+ QCString result="Documentaţia ";
switch(compType)
{
case ClassDef::Class: result+="modulului"; break;
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)"Fișierul din "+name;
+ return "Fișierul din "+name;
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)"Include fișierul din "+name;
+ return "Include fișierul din "+name;
}
/** Compiles a date string.
/** UNO IDL service page title */
virtual QCString trServiceReference(const QCString &sName)
{
- QCString result=(QCString)sName;
+ QCString result=sName;
result+=" Referință Serviciu";
return result;
}
/** UNO IDL singleton page title */
virtual QCString trSingletonReference(const QCString &sName)
{
- QCString result=(QCString)sName;
+ QCString result=sName;
result+=" Referință Singleton";
return result;
}
virtual QCString trServiceGeneratedFromFiles(bool single)
{
// single is true implies a single file
- QCString result=(QCString)"Documentația pentru acest serviciu "
+ QCString result="Documentația pentru acest serviciu "
"a fost generată din ";
if (single)
result += "următorul fișier:";
virtual QCString trSingletonGeneratedFromFiles(bool single)
{
// single is true implies a single file
- QCString result=(QCString)"Documentația pentru acest singleton "
+ QCString result="Documentația pentru acest singleton "
"a fost generată din ";
if (single)
result += "următorul fișier:";
virtual QCString trISOLang()
{ return "ru"; }
+ virtual QCString getLanguageString()
+ {
+ return "0x419 Russian";
+ }
// --- Language translation methods -------------------
{
return "Структуры данных";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "Классы";
virtual QCString trExampleDocumentation()
{ return "Примеры"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Тематические описания"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Оглавление"; }
return QCString("Граф наследования:")+clName+":";
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "Только для внутреннего использования"; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Предупреждения"; }
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Граф связей класса "+clName+":";
+ return "Граф связей класса "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Граф включаемых заголовочных файлов для "+fName+":";
+ return "Граф включаемых заголовочных файлов для "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
{
return QCString("Пакет ")+name;
}
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Полный список пакетов ";
- }
/*! The description of the package index page */
virtual QCString trPackageListDescription()
{
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Функции с областью видимости пакета";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Члены с областью видимости пакета";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Статические функции с областью видимости пакета";
}
virtual QCString trDirectories()
{ return "Алфавитный указатель директорий"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Дерево директорий"; }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
if (isTemplate)
{
switch(compType)
bool single)
{ // here s is one of " Module", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Документация по ";
+ QCString result="Документация по ";
switch(compType)
{
case ClassDef::Class: result+="модулю"; break;
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)"Файл в "+name;
+ return "Файл в "+name;
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)"Включает файл в "+name;
+ return "Включает файл в "+name;
}
/** Compiles a date string.
/** UNO IDL service page title */
virtual QCString trServiceReference(const QCString &sName)
{
- QCString result=(QCString)sName;
+ QCString result=sName;
result+=" Ссылка на сервис";
return result;
}
/** UNO IDL singleton page title */
virtual QCString trSingletonReference(const QCString &sName)
{
- QCString result=(QCString)sName;
+ QCString result=sName;
result+=" Ссылка на одиночку";
return result;
}
virtual QCString trServiceGeneratedFromFiles(bool single)
{
// single is true implies a single file
- QCString result=(QCString)"Документация для этого сервиса "
+ QCString result="Документация для этого сервиса "
"сгенерирована из следующего файл";
if (single) result+="а:"; else result+="ов:";
return result;
virtual QCString trSingletonGeneratedFromFiles(bool single)
{
// single is true implies a single file
- QCString result=(QCString)"Документация по этому одиночке "
+ QCString result="Документация по этому одиночке "
"сгенерирована из следующего файл";
if (single) result+="а:"; else result+="ов:";
return result;
files frees the maintainer from thinking about whether the
first, the second, or both files should be included or not, and
why. This holds namely for localized translators because their
- base class is changed occasionaly to adapter classes when the
+ base class is changed occasionally to adapter classes when the
Translator class changes the interface, or back to the
Translator class (by the local maintainer) when the localized
translator is made up-to-date again.
{
return "sr-Cyrl";
}
+ virtual QCString getLanguageString()
+ {
+ return "0xC1A Serbian (Serbia, Cyrillic)";
+ }
// --- Language translation methods -------------------
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Аутоматски направљено помоћу Doxygen-а";
- if (!s.isEmpty()) result+=(QCString)" за "+s;
+ if (!s.isEmpty()) result+=" за "+s;
result+=" из изворног кода.";
return result;
}
{
return "Документација структуре";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "Документација класе";
virtual QCString trExampleDocumentation()
{ return "Документација примера"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Документација странице"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Приручник"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Направљено "+date;
- if (!projName.isEmpty()) result+=(QCString)" за "+projName;
- result+=(QCString)" помоћу";
+ QCString result="Направљено "+date;
+ if (!projName.isEmpty()) result+=" за "+projName;
+ result+=" помоћу";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"Дијаграм наслеђивања за "+clName+":";
+ return "Дијаграм наслеђивања за "+clName+":";
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "Само за унутрашњу употребу."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Упозорење"; }
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
if (isTemplate)
{
result+=" Шаблон";
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Документација за ";
+ QCString result="Документација за ";
switch(compType)
{
case ClassDef::Class: result+="ову класу"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Дијаграм сарадње за "+clName+":";
+ return "Дијаграм сарадње за "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Дијаграм зависности укључивања за "+fName+":";
+ return "Дијаграм зависности укључивања за "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Пакет "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Списак пакета";
+ return "Пакет "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Функције пакета";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Чланови пакета";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Статичке функције пакета";
}
virtual QCString trDirectories()
{ return "Директоријуми"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Ова хијерархија директоријума је уређена "
- "приближно по абецеди:";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
if (isTemplate) result+=" Шаблон";
result+=" Референца";
switch(compType)
bool single)
{ // here s is one of " Module", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Документација за ";
+ QCString result="Документација за ";
switch(compType)
{
case ClassDef::Class: result+="овај модул"; break;
class TranslatorSlovene : public TranslatorAdapter_1_4_6
{
- protected:
- friend class TranslatorAdapterBase;
- virtual ~TranslatorSlovene() {}
public:
QCString idLanguage()
{ return "slovene"; }
{ return "\\usepackage[slovene]{babel}\n"; }
QCString trISOLang()
{ return "sl"; }
+ virtual QCString getLanguageString()
+ {
+ return "0x424 Slovenian";
+ }
QCString trRelatedFunctions()
{ return "Povezane funkcije"; }
QCString trRelatedSubscript()
{ return ", vključujoč dedovane metode in atribute."; }
QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="zgenerirano z Doxygen-om";
- if (!s.isEmpty()) result+=(QCString)" za "+s;
+ if (!s.isEmpty()) result+=" za "+s;
result+=" iz izvorne kode.";
return result;
}
{ return "kratek opis razredov"; }
QCString trFileList()
{ return "seznam datotek"; }
-/* QCString trHeaderFiles() */
-/* { return "'Header' datoteka"; } */
QCString trCompoundMembers()
{ return "metode in atributi"; }
QCString trFileMembers()
else result+="s povezavami na datoteke v katerih se nahajajo:";
return result;
}
-/* QCString trHeaderFilesDescription() */
-/* { return "Seznam header datotek, ki tvorijo aplikacijski vmesnik (API) :"; } */
QCString trExamplesDescription()
{ return "Seznam primerov :"; }
QCString trRelatedPagesDescription()
{ return "Seznam strani z dodatnimi opisi:"; }
QCString trModulesDescription()
{ return "Seznam modulov:"; }
-/* QCString trNoDescriptionAvailable() */
-/* { return "Opis ni dostopen"; } */
-
QCString trDocumentation()
{ return "Dokumentacija"; }
QCString trModuleIndex()
{ return "Opis datoteke"; }
QCString trExampleDocumentation()
{ return "Opis primera"; }
- QCString trPageDocumentation()
- { return "Opis povezanih strani"; }
QCString trReferenceManual()
{ return "Priročnik"; }
{ return "Strukture"; }
QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Generirano "+date;
- if (!projName.isEmpty()) result+=(QCString)" projekt: "+projName;
- result+=(QCString)" generator: ";
+ QCString result="Generirano "+date;
+ if (!projName.isEmpty()) result+=" projekt: "+projName;
+ result+=" generator: ";
return result;
}
QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"Diagram razredov za "+clName;
+ return "Diagram razredov za "+clName;
}
- QCString trForInternalUseOnly()
- { return "Samo za interno uporabo."; }
-/* QCString trReimplementedForInternalReasons() */
-/* { return "Ponovno implementirano zaradi internih razlogov. " */
-/* "Nima vpliva na API."; */
-/* } */
QCString trWarning()
{ return "Opozorilo"; }
-/* QCString trBugsAndLimitations() */
-/* { return "Napake in omejtive"; } */
QCString trVersion()
{ return "Verzija"; }
QCString trDate()
case ClassDef::Exception: result+=" IDL prekinitev "; break;
default: break;
}
- result += (QCString)clName;
+ result += clName;
return result;
}
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Opis ";
+ QCString result="Opis ";
switch(compType)
{
case ClassDef::Class: result+="razreda"; break;
// new since 0.49-991106
//////////////////////////////////////////////////////////////////////////
-/* QCString trSources() */
-/* { */
-/* return "Izvorne datoteke"; */
-/* } */
QCString trDefinedAtLineInSourceFile()
{
return "Definirano v @0 vrstici datoteke @1.";
/*! this text is put before a collaboration diagram */
QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Kolaboracijski diagram razreda "+clName+":";
+ return "Kolaboracijski diagram razreda "+clName+":";
}
/*! this text is put before an include dependency graph */
QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Graf prikazuje seznam datotek, "
+ return "Graf prikazuje seznam datotek, "
"ki jih datoteka \""+fName+"\" "
"direktno ali indirektno vključuje. Pravokotniki ponazarjajo datoteke, puščice "
"predstavljajo relacije med njimi. "
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"JAVA paket "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Seznam JAVA paketov";
+ return "JAVA paket "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
{
return "JAVA paketi";
}
- /*! Used as a chapter title for Latex & RTF output */
-/* virtual QCString trPackageDocumentation() */
-/* { */
-/* return "Opisi JAVA paketov"; */
-/* } */
/*! Text shown before a multi-line define */
virtual QCString trDefineValue()
{
* be followed by a single name or by a list of names
* of the category.
*/
-/* virtual QCString trField(bool first_capital, bool singular) */
-/* { */
-/* QCString result((first_capital ? "Polj" : "polj")); */
-/* if (!singular) result+="a"; */
-/* else result += "e"; */
-/* return result; */
-/* } */
-
- /*! This is used for translation of the word that will possibly
- * be followed by a single name or by a list of names
- * of the category.
- */
virtual QCString trGlobal(bool first_capital, bool singular)
{
QCString result((first_capital ? "Global" : "global"));
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Funkcije paketa"; /* don't know the context */
}
+ virtual QCString trPackageMembers()
+ {
+ return "Elemente paketa"; /* don't know the context */
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Statične funkcije paketa";
}
virtual QCString trDirectories()
{ return "Imeniki"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Imeniška hierarhija je urejena v glavnem, toda ne popolnoma, po abecedi, ";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
{
return "sk";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x41B Slovak";
+ }
// --- Language translation methods -------------------
/*! used in the compound documentation before a list of related functions. */
{ QCString result("Generované automaticky programom Doxygen "
"zo zdrojových textov");
if (!s.isEmpty())
- result+=(QCString)" projektu "+s;
+ result+=" projektu "+s;
result+=".";
return result;
}
virtual QCString trExampleDocumentation()
{ return "Dokumentácia príkladov"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Dokumentácia súvisiacich stránok"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Referenčná príručka"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Generované "+date;
- if (!projName.isEmpty()) result+=(QCString)" pre projekt "+projName;
- result+=(QCString)" programom";
+ QCString result="Generované "+date;
+ if (!projName.isEmpty()) result+=" pre projekt "+projName;
+ result+=" programom";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"Diagram dedičnosti pre triedu "+clName;
+ return "Diagram dedičnosti pre triedu "+clName;
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "Iba pre interné použitie."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Pozor"; }
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Dokumentácia pre ";
+ QCString result="Dokumentácia pre ";
switch(compType)
{
case ClassDef::Class: result+="túto triedu"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Diagram tried pre "+clName+":";
+ return "Diagram tried pre "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Graf závislostí na vkladaných súboroch "
+ return "Graf závislostí na vkladaných súboroch "
"pre "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Balík "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Zoznam balíkov";
+ return "Balík "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Funkcie v balíku";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Členy v balíku";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Statické funkcie v balíku";
}
virtual QCString trDirectories()
{ return "Adresáre"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- {
- return "Následujúca hierarchia adresárov je zhruba, "
- "ale nie úplne, zoradená podľa abecedy:";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
bool single)
{ // here s is one of " Module", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Dokumentácia ";
+ QCString result="Dokumentácia ";
switch(compType)
{
case ClassDef::Class: result+="k tomuto modulu"; break;
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)"Súbor v "+name;
+ return "Súbor v "+name;
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)"Vkladá (include) súbor z "+name;
+ return "Vkladá (include) súbor z "+name;
}
/** Compiles a date string.
{
return "sr-Latn";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x81A Serbian (Serbia, Latin)";
+ }
// --- Language translation methods -------------------
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Napravljeno automatski korišćenjem alata Doxygen";
- if (!s.isEmpty()) result+=(QCString)" za projekat " + s;
+ if (!s.isEmpty()) result+=" za projekat " + s;
result+=" od izvornog koda.";
return result;
}
{
return "Dokumentacija stuktura/unija";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "Dokumentacija klasa";
virtual QCString trExampleDocumentation()
{ return "Dokumentacija primera"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Dokumentacija stranice"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Priručnik"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"[" + date + "] Napravljeno automatski ";
- if (!projName.isEmpty()) result+=(QCString)" za projekat " + projName;
- result+=(QCString)" upotrebom ";
+ QCString result="[" + date + "] Napravljeno automatski ";
+ if (!projName.isEmpty()) result+=" za projekat " + projName;
+ result+=" upotrebom ";
return result;
}
return QCString("Dijagram nasleđivanja za klasu ") + clName + ":";
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "Samo za unutrašnju upotrebu."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Upozorenje"; }
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Dokumentacija ";
+ QCString result="Dokumentacija ";
switch(compType)
{
case ClassDef::Class: result+="ove klase"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Klasni dijagram za "+clName+":";
+ return "Klasni dijagram za "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Graf zavisnosti datoteka za "+fName+":";
+ return "Graf zavisnosti datoteka za "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Paket "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Spisak paketa";
+ return "Paket "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Funkcije u paketu";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Članovi u paketu";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Statičke funkcije u paketu"; // Zajednicke funkcije u paketu
}
virtual QCString trDirectories()
{ return "Direktorijumi"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Hijerarhija direktorijuma uređena približno po abecedi:"; }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" Modul"; break;
bool single)
{ // here s is one of " Module", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Dokumentacija za ovaj ";
+ QCString result="Dokumentacija za ovaj ";
switch(compType)
{
case ClassDef::Class: result+="modul"; break;
return "Ograničenja tipova";
}
-//////////////////////////////////////////////////////////////////////////
-// following methods have no corresponding entry in translator_en.h
-//////////////////////////////////////////////////////////////////////////
-
-// /*! This is put above each page as a link to the list of all verbatim headers */
-// virtual QCString trHeaderFiles()
-// { return "Zaglavlja"; }
-//
-// /*! This is an introduction to the page with the list of all header files. */
-// virtual QCString trHeaderFilesDescription()
-// { return "Zaglavlja koje izgraduju API:"; }
-//
-// /*! This sentences is used in the annotated class/file lists if no brief
-// * description is given.
-// */
-// virtual QCString trNoDescriptionAvailable()
-// { return "Opis nije dostupan"; }
-//
-// /*! this text is generated when the \\reimp command is used. */
-// virtual QCString trReimplementedForInternalReasons()
-// { return decode("Preuradeno zbog unutrasnjih razloga; Nema uticaja na API." ); }
-//
-// /*! this text is generated when the \\bug command is used. */
-// virtual QCString trBugsAndLimitations()
-// { return "Greske i ogranicenja"; }
-//
-// virtual QCString trSources()
-// {
-// return decode("Izvorne datoteke" );
-// }
-//
-// /*! Used for Java interfaces in the summary section of Java packages */
-// virtual QCString trInterfaces()
-// {
-// return "Interfejsi"; //!< Radna okruzenja. Ali to je dve reci.
-// }
-//
-// /*! Used as a chapter title for Latex & RTF output */
-// virtual QCString trPackageDocumentation()
-// {
-// return "Dokumentacija paketa";
-// }
-//
-// /*! This is used for translation of the word that will possibly
-// * be followed by a single name or by a list of names
-// * of the category.
-// */
-// virtual QCString trField(bool first_capital, bool singular)
-// {
-// QCString result((first_capital ? "Polj" : "polj"));
-// result+= (singular ? "e" : "a");
-// return result;
-// }
+ /*! Used for Java interfaces in the summary section of Java packages */
+ virtual QCString trInterfaces()
+ {
+ return "Interfejsi"; //!< Radna okruzenja. Ali to je dve reci.
+ }
};
#ifndef TRANSLATOR_SE_H
#define TRANSLATOR_SE_H
-class TranslatorSwedish : public Translator
+class TranslatorSwedish : public TranslatorAdapter_1_9_4
{
public:
{
return "sv";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x41D Swedish";
+ }
// --- Language translation methods -------------------
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Automatiskt skapad av Doxygen";
- if (!s.isEmpty()) result+=(QCString)" för "+s;
+ if (!s.isEmpty()) result+=" för "+s;
result+=" från källkoden.";
return result;
}
{
return "Dokumentation över datastrukturer";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "Klassdokumentation";
virtual QCString trExampleDocumentation()
{ return "Exempeldokumentation"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Sid-dokumentation"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Referensmanual"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Skapad "+date;
- if (!projName.isEmpty()) result+=(QCString)" för "+projName;
- result+=(QCString)" av";
+ QCString result="Skapad "+date;
+ if (!projName.isEmpty()) result+=" för "+projName;
+ result+=" av";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"Klassdiagram för "+clName;
+ return "Klassdiagram för "+clName;
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "Endast för internt bruk."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Varning"; }
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" klass"; break;
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
- QCString result=(QCString)"Dokumentationen för ";
+ bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ QCString result="Dokumentationen för ";
switch(compType)
{
case ClassDef::Class: result+=vhdlOpt? "denna designenhets":"denna klass"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Samarbetsdiagram för "+clName+":";
+ return "Samarbetsdiagram för "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Include-beroendediagram för "+fName+":";
+ return "Include-beroendediagram för "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Paket "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Paketlista";
+ return "Paket "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Paketfunktioner";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Paketmedlemmar";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Statiska paketfunktioner";
}
virtual QCString trDirectories()
{ return "Kataloger"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Den här katalogen är grovt sorterad, "
- "men inte helt, i alfabetisk ordning:";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" Modul"; break;
bool single)
{
// single is true implies a single file
- QCString result=(QCString)"Dokumentationen för ";
+ QCString result="Dokumentationen för ";
switch(compType)
{
case ClassDef::Class: result+="denna modul"; break;
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)"Fil i "+name;
+ return "Fil i "+name;
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)"Inkluderar fil i "+name;
+ return "Inkluderar fil i "+name;
}
/** Compiles a date string.
/** UNO IDL service page title */
virtual QCString trServiceReference(const QCString &sName)
{
- QCString result=(QCString)sName;
+ QCString result=sName;
result+=" Tjänstereferens";
return result;
}
/** UNO IDL singleton page title */
virtual QCString trSingletonReference(const QCString &sName)
{
- QCString result=(QCString)sName;
+ QCString result=sName;
result+=" Singleton-referens";
return result;
}
virtual QCString trServiceGeneratedFromFiles(bool single)
{
// single is true implies a single file
- QCString result=(QCString)"Dokumentationen för denna tjänst "
+ QCString result="Dokumentationen för denna tjänst "
"genererades från följande fil";
if (single) result+=":"; else result+="er:";
return result;
virtual QCString trSingletonGeneratedFromFiles(bool single)
{
// single is true implies a single file
- QCString result=(QCString)"Dokumentationen för denna singleton "
+ QCString result="Dokumentationen för denna singleton "
"genererades från följande fil";
if (single) result+=":"; else result+="er:";
return result;
}
virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
if (isLocal) result+=" Lokal";
switch(compType)
{
files frees the maintainer from thinking about whether the
first, the second, or both files should be included or not, and
why. This holds namely for localized translators because their
- base class is changed occasionaly to adapter classes when the
+ base class is changed occasionally to adapter classes when the
Translator class changes the interface, or back to the
Translator class (by the local maintainer) when the localized
translator is made up-to-date again.
{
return "tr";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x41F Turkey";
+ }
// --- Language translation methods -------------------
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Doxygen tarafından";
- if (!s.isEmpty()) result+=s+(QCString)" için ";
+ if (!s.isEmpty()) result+=s+" için ";
result+=" kaynak koddan otomatik üretilmiştir.";
return result;
}
{
return "Veri Yapıları Dokümantasyonu";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "Sınıf Dokümantasyonu";
virtual QCString trExampleDocumentation()
{ return "Örnek Dokümantasyonu"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Sayfa Dokümantasyonu"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Referans Kitabı"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=projName+(QCString)" için "+date;
- if (!projName.isEmpty()) result+=(QCString)" tarihinde ";
- result+=(QCString)" üreten: ";
+ QCString result=projName+" için "+date;
+ if (!projName.isEmpty()) result+=" tarihinde ";
+ result+=" üreten: ";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return clName+(QCString)" için kalıtım şeması:";
+ return clName+" için kalıtım şeması:";
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "İç kullanıma ayrılmıştır."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Uyarı"; }
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" Sınıf"; break;
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Bu ";
+ QCString result="Bu ";
switch(compType)
{
case ClassDef::Class: result+="sınıf"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return clName+(QCString)" için işbirliği (collaboration) şeması:";
+ return clName+" için işbirliği (collaboration) şeması:";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return fName+(QCString)" için içerme bağımlılık grafiği:";
+ return fName+" için içerme bağımlılık grafiği:";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Paket "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Paket Listesi";
+ return "Paket "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class fonksiyonlar with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Paket Fonksiyonlar";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Paket Üyeler";
+ }
/*! Used as a heading for a list of static Java class fonksiyonlar with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Static Pakat Fonksiyonları";
}
virtual QCString trDirectories()
{ return "Dizinler"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Bu dizin hiyerarşisi tamamen olmasa da yaklaşık "
- "olarak alfabetik sıraya konulmuştur:";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" Modül"; break;
bool single)
{ // here s is one of " Module", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Bu ";
+ QCString result="Bu ";
switch(compType)
{
case ClassDef::Class: result+="modül"; break;
}
- //////////////////////////////////////////////////////////////////////////
- // new since 1.6.0 (mainly for the new search engine)
- //////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////
+ // new since 1.6.0 (mainly for the new search engine)
+ //////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
virtual QCString trDirRelation(const QCString &name)
{
- return QCString(name)+" İlişkisi";
+ return QCString(name)+" İlişkisi";
}
/*! Loading message shown when loading search results */
virtual QCString trLoading()
{
- return "Yüklüyor...";
+ return "Yüklüyor...";
}
/*! Label used for search results in the global namespace */
virtual QCString trGlobalNamespace()
{
- return "En Üst Seviye";
+ return "En Üst Seviye";
}
/*! Message shown while searching */
virtual QCString trSearching()
{
- return "Arıyor...";
+ return "Arıyor...";
}
/*! Text shown when no search results are found */
virtual QCString trNoMatches()
{
- return "Eşleşme Yok";
+ return "Eşleşme Yok";
}
- //////////////////////////////////////////////////////////////////////////
- // new since 1.6.3 (missing items for the directory pages)
- //////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////
+ // new since 1.6.3 (missing items for the directory pages)
+ //////////////////////////////////////////////////////////////////////////
/*! when clicking a directory dependency label, a page with a
* table is shown. The heading for the first column mentions the
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)(name) + (QCString)" dizinindeki dosya";
+ return name+" dizinindeki dosya";
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)(name) + (QCString)" dizinindeki dosyayı kapsıyor";
+ return name + " dizinindeki dosyayı kapsıyor";
}
/** Compiles a date string.
int hour,int minutes,int seconds,
bool includeTime)
{
- static const char *days[] = { "Pzt","Sal","Çar","Per","Cma","Cmt","Pzr" };
- static const char *months[] = { "Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Ekm","Kas","Ara" };
- QCString sdate;
- sdate.sprintf("%s %s %d %d",days[dayOfWeek-1],months[month-1],day,year);
- if (includeTime)
- {
- QCString stime;
- stime.sprintf(" %.2d:%.2d:%.2d",hour,minutes,seconds);
- sdate+=stime;
- }
- return sdate;
+ static const char *days[] = { "Pzt","Sal","Çar","Per","Cma","Cmt","Pzr" };
+ static const char *months[] = { "Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Ekm","Kas","Ara" };
+ QCString sdate;
+ sdate.sprintf("%s %s %d %d",days[dayOfWeek-1],months[month-1],day,year);
+ if (includeTime)
+ {
+ QCString stime;
+ stime.sprintf(" %.2d:%.2d:%.2d",hour,minutes,seconds);
+ sdate+=stime;
+ }
+ return sdate;
}
};
// files frees the maintainer from thinking about whether the
// first, the second, or both files should be included or not, and
// why. This holds namely for localized translators because their
-// base class is changed occasionaly to adapter classes when the
+// base class is changed occasionally to adapter classes when the
// Translator class changes the interface, or back to the
// Translator class (by the local maintainer) when the localized
// translator is made up-to-date again.
{
return "zh-Hant";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x404 Chinese (Taiwan)";
+ }
// --- Language translation methods -------------------
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="本文件由Doxygen";
- if (!s.isEmpty()) result+=(QCString)" 自 "+s;
+ if (!s.isEmpty()) result+=" 自 "+s;
result+=" 的原始碼中自動產生.";
return result;
}
{
return "資料結構說明文件";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "類別說明文件";
virtual QCString trExampleDocumentation()
{ return "範例說明文件"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "頁面說明文件"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "參考手冊"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"產生日期:"+date;
- if (!projName.isEmpty()) result+=(QCString)", 專案:"+projName;
- result+=(QCString)", 產生器:";
+ QCString result="產生日期:"+date;
+ if (!projName.isEmpty()) result+=", 專案:"+projName;
+ result+=", 產生器:";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"類別"+clName+"的繼承圖:";
+ return "類別"+clName+"的繼承圖:";
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "僅供內部使用."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "警告"; }
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName+" ";
+ QCString result=clName+" ";
switch(compType)
{
case ClassDef::Class: result+=" 類別"; break;
virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,bool)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"此";
+ QCString result="此";
switch(compType)
{
case ClassDef::Class: result+="類別(class)"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)""+clName+"的合作圖:";
+ return ""+clName+"的合作圖:";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)""+fName+"的包含相依圖:";
+ return ""+fName+"的包含相依圖:";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Package "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Package列表";
+ return "Package "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Package 函數列表";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Package 成員列表";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "靜態 Package 函數列表";
}
virtual QCString trDirectories()
{ return "目錄"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "這個目錄階層經過簡略的字母排序: ";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+="模組"; break;
bool /* single */)
{ // here s is one of " Module", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"這個";
+ QCString result="這個";
switch(compType)
{
case ClassDef::Class: result+="模組"; break;
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)"檔案在"+name;
+ return "檔案在"+name;
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)"含入檔案在"+name;
+ return "含入檔案在"+name;
}
/** Compiles a date string.
/** UNO IDL service page title */
virtual QCString trServiceReference(const QCString &sName)
{
- QCString result=(QCString)sName;
+ QCString result=sName;
result+="服務參考";
return result;
}
/** UNO IDL singleton page title */
virtual QCString trSingletonReference(const QCString &sName)
{
- QCString result=(QCString)sName;
+ QCString result=sName;
result+="Singleton參考";
return result;
}
virtual QCString trServiceGeneratedFromFiles(bool)
{
// single is true implies a single file
- QCString result=(QCString)"本服務的文件由以下的檔案"
+ QCString result="本服務的文件由以下的檔案"
"所產生";
result+=":";
return result;
virtual QCString trSingletonGeneratedFromFiles(bool)
{
// single is true implies a single file
- QCString result=(QCString)"本singleton的文件由下面的檔案"
+ QCString result="本singleton的文件由下面的檔案"
"所產生";
result+=":";
return result;
{
return "uk";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x422 Ukrainian";
+ }
// --- Language translation methods -------------------
{
return "Структури даних" ;
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "Класи" ;
virtual QCString trExampleDocumentation()
{ return "Приклади"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Документація по темі"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Довідковий посібник"; }
return QCString("Схема успадкувань для ")+clName;
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "Тільки для внутрішнього користування"; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Застереження"; }
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Документація ";
+ QCString result="Документація ";
switch(compType)
{
case ClassDef::Class:
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Діаграма зв'язків класу "+clName+":";
+ return "Діаграма зв'язків класу "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
return QCString("Пакет ")+name;
}
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Повний список пакетів";
- }
/*! The description of the package index page */
virtual QCString trPackageListDescription()
{
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Функції пакетів";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Елементи пакетів";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Статичні функцію пакетів";
}
virtual QCString trDirectories()
{ return "Каталоги"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Дерево каталогів впорядковано наближено "
- "до алфавіту:";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
if (isTemplate)
{
switch(compType)
bool single)
{
// single is true implies a single file
- QCString result=(QCString)"Документацію для ";
+ QCString result="Документацію для ";
switch(compType)
{
case ClassDef::Class: result+="цього модуля"; break;
*/
virtual QCString trFileIn(const QCString &name)
{
- return (QCString)"Файл у "+name;
+ return "Файл у "+name;
}
/*! when clicking a directory dependency label, a page with a
*/
virtual QCString trIncludesFileIn(const QCString &name)
{
- return (QCString)"Включає файли в "+name;
+ return "Включає файли в "+name;
}
/** Compiles a date string.
{
return "Документація метода";
}
-
- /*! Used as the title of the design overview picture created for the
- * VHDL output.
- */
- virtual QCString trDesignOverview()
- {
- return "Огляд дизайну проекту";
- }
-
};
#endif
files frees the maintainer from thinking about whether the
first, the second, or both files should be included or not, and
why. This holds namely for localized translators because their
- base class is changed occasionaly to adapter classes when the
+ base class is changed occasionally to adapter classes when the
Translator class changes the interface, or back to the
Translator class (by the local maintainer) when the localized
translator is made up-to-date again.
{
return "vi";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x42A Vietnamese";
+ }
// --- Language translation methods -------------------
/*! used in the compound documentation before a list of related functions. */
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Được tạo ra bởi Doxygen";
- if (!s.isEmpty()) result+=(QCString)" cho "+s;
+ if (!s.isEmpty()) result+=" cho "+s;
result+=" từ mã nguồn.";
return result;
}
{
return "Thông tin về cấu trúc cơ sở dữ liệu";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "Thông tin về Class";
virtual QCString trExampleDocumentation()
{ return "Thông tin về các ví dụ"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Trang Thông tin"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Thông tin tham chiếu"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Được biên soạn vào "+date;
- if (!projName.isEmpty()) result+=(QCString)" cho mã nguồn dự án "+projName;
- result+=(QCString)" bởi";
+ QCString result="Được biên soạn vào "+date;
+ if (!projName.isEmpty()) result+=" cho mã nguồn dự án "+projName;
+ result+=" bởi";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"Sơ đồ kế thừa cho "+clName+":";
+ return "Sơ đồ kế thừa cho "+clName+":";
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "Chỉ cho sử dụng nội bộ."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Lưu ý"; }
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" Class"; break;
virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,bool)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Thông tin cho ";
+ QCString result="Thông tin cho ";
switch(compType)
{
case ClassDef::Class: result+="class"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Sơ đồ liên kết cho "+clName+":";
+ return "Sơ đồ liên kết cho "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Kèm theo graph phụ thuộc cho "+fName+":";
+ return "Kèm theo graph phụ thuộc cho "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Gói "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Danh sách gói";
+ return "Gói "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Các hàm Package";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Members Package";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Các hàm Static Package";
}
virtual QCString trDirectories()
{ return "Các thư mục"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Thư mục đã được sắp xếp theo al-pha-bê, "
- "nhưng chưa đầy đủ:";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" Module"; break;
bool single)
{ // here s is one of " Module", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Thông tin cho ";
+ QCString result="Thông tin cho ";
switch(compType)
{
case ClassDef::Class: result+="module"; break;
{
return "af";
}
+ virtual QCString getLanguageString()
+ {
+ return "0x436 Afrikaans";
+ }
// --- Language translation methods -------------------
*/
virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Automaties gegenereer deur Doxygen";
- if (!s.isEmpty()) result+=(QCString)" vir "+s;
+ if (!s.isEmpty()) result+=" vir "+s;
result+=" van die bron kode af.";
return result;
}
{
return "Data Strukture Dokumentasie";
}
+ else if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return trDesignUnitDocumentation();
+ }
else
{
return "Klas Dokumentasie";
virtual QCString trExampleDocumentation()
{ return "Voorbeeld Dokumentasie"; }
- /*! This is used in LaTeX as the title of the chapter containing
- * the documentation of all related pages.
- */
- virtual QCString trPageDocumentation()
- { return "Bladsy Dokumentasie"; }
-
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Verwysings Handleiding"; }
*/
virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
- QCString result=(QCString)"Gegenereer op "+date;
- if (!projName.isEmpty()) result+=(QCString)" vir "+projName;
- result+=(QCString)" deur";
+ QCString result="Gegenereer op "+date;
+ if (!projName.isEmpty()) result+=" vir "+projName;
+ result+=" deur";
return result;
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const QCString &clName)
{
- return (QCString)"Afleidings diagram vir "+clName+":";
+ return "Afleidings diagram vir "+clName+":";
}
- /*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "Slegs vir interne gebruik."; }
-
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Waarskuwing"; }
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" klas"; break;
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- QCString result=(QCString)"Die dokumentasie vir hierdie ";
+ QCString result="Die dokumentasie vir hierdie ";
switch(compType)
{
case ClassDef::Class: result+="klas"; break;
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const QCString &clName)
{
- return (QCString)"Samewerkings diagram vir "+clName+":";
+ return "Samewerkings diagram vir "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const QCString &fName)
{
- return (QCString)"Insluitings afhanklikheid diagram vir "+fName+":";
+ return "Insluitings afhanklikheid diagram vir "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
/*! Used as the title of a Java package */
virtual QCString trPackage(const QCString &name)
{
- return (QCString)"Pakket "+name;
- }
- /*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Pakket Lys";
+ return "Pakket "+name;
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
+ virtual QCString trPackageFunctions()
{
return "Pakket Funksies";
}
+ virtual QCString trPackageMembers()
+ {
+ return "Pakket Lede";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
+ virtual QCString trStaticPackageFunctions()
{
return "Statiese Pakket Funksies";
}
virtual QCString trDirectories()
{ return "Directories"; }
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Hierdie directory hiërargie is min of meer alfabeties "
- "gesorteer:";
- }
-
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName;
+ QCString result=clName;
switch(compType)
{
case ClassDef::Class: result+=" Module"; break;
bool single)
{
// single is true implies a single file
- QCString result=(QCString)"The documentation for this ";
+ QCString result="The documentation for this ";
switch(compType)
{
case ClassDef::Class: result+="module"; break;
//! given the number of bytes it's made of
static inline uint32_t decode_utf8( const char* data , int numBytes ) noexcept
{
- uint32_t cp = (unsigned char)*data;
+ uint32_t cp = static_cast<unsigned char>(*data);
if (numBytes>1)
{
cp &= 0x7F >> numBytes; // Mask out the header bits
for (int i=1 ; i<numBytes ; i++)
{
- cp = (cp<<6) | ((unsigned char)data[i]&0x3F);
+ cp = (cp<<6) | (static_cast<unsigned char>(data[i])&0x3F);
}
}
return cp;
static inline char asciiToLower(uint32_t code)
{
- return code>='A' && code<='Z' ? (char)(code+'a'-'A') : (char)code;
+ return code>='A' && code<='Z' ? static_cast<char>(code+'a'-'A') : static_cast<char>(code);
}
static inline char asciiToUpper(uint32_t code)
{
- return code>='a' && code<='z' ? (char)(code+'A'-'a') : (char)code;
+ return code>='a' && code<='z' ? static_cast<char>(code+'A'-'a') : static_cast<char>(code);
}
static inline std::string caseConvert(const std::string &input,
bool lastUTF8CharIsMultibyte(const std::string &input)
{
// last byte is part of a multibyte UTF8 char if bit 8 is set and bit 7 is not
- return !input.empty() && (((unsigned char)input[input.length()-1])&0xC0)==0x80;
+ return !input.empty() && (static_cast<unsigned char>(input[input.length()-1])&0xC0)==0x80;
}
bool isUTF8CharUpperCase(const std::string &input,size_t pos)
// TextGeneratorOLImpl implementation
//------------------------------------------------------------------------
-TextGeneratorOLImpl::TextGeneratorOLImpl(OutputDocInterface &od) : m_od(od)
+TextGeneratorOLImpl::TextGeneratorOLImpl(BaseOutputDocInterface &od) : m_od(od)
{
}
// helper to check if the found delimiter ends with a colon
auto endsWithColon = [](const std::string &del)
{
- for (int i=(int)del.size()-1;i>=0;i--)
+ for (int i=static_cast<int>(del.size())-1;i>=0;i--)
{
if (del[i]=='@') return false;
else if (del[i]==':') return true;
return newScope;
}
-void writePageRef(OutputDocInterface &od,const QCString &cn,const QCString &mn)
+void writePageRef(OutputList &ol,const QCString &cn,const QCString &mn)
{
- od.pushGeneratorState();
+ ol.pushGeneratorState();
- od.disable(OutputGenerator::Html);
- od.disable(OutputGenerator::Man);
- od.disable(OutputGenerator::Docbook);
- if (Config_getBool(PDF_HYPERLINKS)) od.disable(OutputGenerator::Latex);
- if (Config_getBool(RTF_HYPERLINKS)) od.disable(OutputGenerator::RTF);
- od.startPageRef();
- od.docify(theTranslator->trPageAbbreviation());
- od.endPageRef(cn,mn);
+ ol.disable(OutputGenerator::Html);
+ ol.disable(OutputGenerator::Man);
+ ol.disable(OutputGenerator::Docbook);
+ if (Config_getBool(PDF_HYPERLINKS)) ol.disable(OutputGenerator::Latex);
+ if (Config_getBool(RTF_HYPERLINKS)) ol.disable(OutputGenerator::RTF);
+ ol.startPageRef();
+ ol.docify(theTranslator->trPageAbbreviation());
+ ol.endPageRef(cn,mn);
- od.popGeneratorState();
+ ol.popGeneratorState();
}
/*! Generate a place holder for a position in a list. Used for
if (typedefContext) *typedefContext=context;
// see if the qualified name has a scope part
+ if (qualifiedName.find('<')!=-1)
+ {
+ //printf(" templates cannot be typedefs!\n");
+ return result;
+ }
int scopeIndex = qualifiedName.findRev("::");
QCString resName=qualifiedName;
if (scopeIndex!=-1) // strip scope part for the name
if (md)
{
//printf(">>resolveTypeDef: Found typedef name '%s' in scope '%s' value='%s' args='%s'\n",
- // qPrint(qualifiedName),qPrint(context->name()),md->typeString(),md->argsString()
+ // qPrint(qualifiedName),qPrint(context->name()),qPrint(md->typeString()),qPrint(md->argsString())
// );
result=md->typeString();
QCString args = md->argsString();
// improve the performance of this function
// and thread_local is needed to make it multi-thread safe
static THREAD_LOCAL char *growBuf = 0;
- static THREAD_LOCAL int growBufLen = 0;
- if ((int)s.length()*3>growBufLen) // For input character we produce at most 3 output characters,
+ static THREAD_LOCAL size_t growBufLen = 0;
+ if (s.length()*3>growBufLen) // For input character we produce at most 3 output characters,
{
growBufLen = s.length()*3;
- growBuf = (char *)realloc(growBuf,growBufLen+1); // add 1 for 0-terminator
+ growBuf = static_cast<char *>(realloc(growBuf,growBufLen+1)); // add 1 for 0-terminator
}
if (growBuf==0) return s; // should not happen, only we run out of memory
char c;
char pc=0;
// skip leading whitespace
- while (i<l && isspace((uchar)src[i]))
+ while (i<l && isspace(static_cast<uchar>(src[i])))
{
i++;
}
case '"': // quoted string
{
*dst++=c;
- pc = c;
i++;
for (;i<l;i++) // find end of string
{
*dst++=c;
if (c=='\\' && i+1<l)
{
- pc = c;
i++;
c = src[i];
*dst++=c;
{
break;
}
- pc = c;
}
}
break;
}
break;
case '>': // current char is a >
- if (i>0 && !isspace((uchar)pc) &&
+ if (i>0 && !isspace(static_cast<uchar>(pc)) &&
(isId(pc) || pc=='*' || pc=='&' || pc=='.' || pc=='>') && // prev char is an id char or space or *&.
(osp<8 || (osp==8 && pc!='-')) // string in front is not "operator>" or "operator->"
)
break;
case ',': // current char is a ,
*dst++=c;
- if (i>0 && !isspace((uchar)pc) &&
+ if (i>0 && !isspace(static_cast<uchar>(pc)) &&
((i<l-1 && (isId(nc) || nc=='[')) || // the [ is for attributes (see bug702170)
(i<l-2 && nc=='$' && isId(src[i+2])) || // for PHP: ',$name' -> ', $name'
(i<l-3 && nc=='&' && src[i+2]=='$' && isId(src[i+3])) // for PHP: ',&$name' -> ', &$name'
// else fallthrough
case '@': // '@name' -> ' @name'
case '\'': // ''name' -> '' name'
- if (i>0 && i<l-1 && pc!='=' && pc!=':' && !isspace((uchar)pc) &&
+ if (i>0 && i<l-1 && pc!='=' && pc!=':' && !isspace(static_cast<uchar>(pc)) &&
isId(nc) && osp<8) // ")id" -> ") id"
{
*dst++=' ';
case '\n': // fallthrough
case '\t':
{
- if (g_charAroundSpace.charMap[(uchar)pc].before &&
- g_charAroundSpace.charMap[(uchar)nc].after &&
+ if (g_charAroundSpace.charMap[static_cast<uchar>(pc)].before &&
+ g_charAroundSpace.charMap[static_cast<uchar>(nc)].after &&
!(pc==',' && nc=='.') &&
(osp<8 || (osp>=8 && isId(pc) && isId(nc)))
// e.g. 'operator >>' -> 'operator>>',
default:
*dst++=c;
if (c=='t' && csp==5 && i<l-1 && // found 't' in 'const'
- !(isId(nc) || nc==')' || nc==',' || isspace((uchar)nc))
+ !(isId(nc) || nc==')' || nc==',' || isspace(static_cast<uchar>(nc)))
) // prevent const ::A from being converted to const::A
{
*dst++=' ';
csp=0;
}
else if (c=='e' && vosp==8 && i<l-1 && // found 'e' in 'volatile'
- !(isId(nc) || nc==')' || nc==',' || isspace((uchar)nc))
+ !(isId(nc) || nc==')' || nc==',' || isspace(static_cast<uchar>(nc)))
) // prevent volatile ::A from being converted to volatile::A
{
*dst++=' ';
vosp=0;
}
else if (c=='l' && vsp==7 && i<l-1 && // found 'l' in 'virtual'
- !(isId(nc) || nc==')' || nc==',' || isspace((uchar)nc))
+ !(isId(nc) || nc==')' || nc==',' || isspace(static_cast<uchar>(nc)))
) // prevent virtual ::A from being converted to virtual::A
{
*dst++=' ';
size_t matchLen = match.length();
ol.parseText(markerText.substr(index,newIndex-index));
unsigned long entryIndex = std::stoul(match[1].str());
- if (entryIndex<(unsigned long)numMarkers)
+ if (entryIndex<static_cast<unsigned long>(numMarkers))
{
replaceFunc(entryIndex);
}
ol.popGeneratorState();
};
- writeMarkerList(ol, theTranslator->trWriteList((int)list.size()).str(), list.size(), replaceFunc);
+ writeMarkerList(ol, theTranslator->trWriteList(static_cast<int>(list.size())).str(), list.size(), replaceFunc);
ol.writeString(".");
}
* converted content (i.e. the same as \a len (Unix, MAC) or
* smaller (DOS).
*/
-static int filterCRLF(char *buf,int len)
+static size_t filterCRLF(char *buf,size_t len)
{
- int src = 0; // source index
- int dest = 0; // destination index
+ size_t src = 0; // source index
+ size_t dest = 0; // destination index
char c; // current character
while (src<len)
QCString transcodeCharacterStringToUTF8(const QCString &input)
{
bool error=FALSE;
- static QCString inputEncoding = Config_getString(INPUT_ENCODING);
+ QCString inputEncoding = Config_getString(INPUT_ENCODING);
const char *outputEncoding = "UTF-8";
if (inputEncoding.isEmpty() || qstricmp(inputEncoding,outputEncoding)==0) return input;
int inputSize=input.length();
int outputSize=inputSize*4+1;
QCString output(outputSize);
void *cd = portable_iconv_open(outputEncoding,inputEncoding.data());
- if (cd==(void *)(-1))
+ if (cd==reinterpret_cast<void *>(-1))
{
err("unsupported character conversion: '%s'->'%s'\n",
qPrint(inputEncoding),outputEncoding);
char *outputPtr = output.rawData();
if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft))
{
- outputSize-=(int)oLeft;
+ outputSize-=static_cast<int>(oLeft);
output.resize(outputSize+1);
output.at(outputSize)='\0';
//printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,qPrint(srcBuf));
bool fileOpened=false;
if (name[0]=='-' && name[1]==0) // read from stdin
{
- fileOpened=true;
std::string contents;
std::string line;
while (getline(std::cin,line))
err("file '%s' not found\n",qPrint(name));
return "";
}
- BufStr buf((uint)fi.size());
+ BufStr buf(fi.size());
fileOpened=readInputFile(name,buf,filter,isSourceCode);
if (fileOpened)
{
- int s = buf.size();
+ size_t s = buf.size();
if (s>1 && buf.at(s-2)!='\n')
{
buf.at(s-1)='\n';
while ((i=target.find(str,p))!=-1)
{
bool isMatch = (i==0 || !isId(target.at(i-1))) && // not a character before str
- (i+l==(int)target.length() || !isId(target.at(i+l))); // not a character after str
+ (i+l==static_cast<int>(target.length()) || !isId(target.at(i+l))); // not a character after str
if (isMatch)
{
int i1=target.find('*',i+l);
}
// forward decl for circular dependencies
-static QCString extractCanonicalType(const Definition *d,const FileDef *fs,QCString type);
+static QCString extractCanonicalType(const Definition *d,const FileDef *fs,QCString type,SrcLangExt lang);
-QCString getCanonicalTemplateSpec(const Definition *d,const FileDef *fs,const QCString& spec)
+static QCString getCanonicalTemplateSpec(const Definition *d,const FileDef *fs,const QCString& spec,SrcLangExt lang)
{
QCString templSpec = spec.stripWhiteSpace();
// std::list<std::string> against list<string> so it is now back again!
if (!templSpec.isEmpty() && templSpec.at(0) == '<')
{
- templSpec = "< " + extractCanonicalType(d,fs,templSpec.right(templSpec.length()-1).stripWhiteSpace());
+ templSpec = "< " + extractCanonicalType(d,fs,templSpec.right(templSpec.length()-1).stripWhiteSpace(),lang);
}
- QCString resolvedType = resolveTypeDef(d,templSpec);
+ QCString resolvedType = lang==SrcLangExt_Java ? templSpec : resolveTypeDef(d,templSpec);
if (!resolvedType.isEmpty()) // not known as a typedef either
{
templSpec = resolvedType;
static QCString getCanonicalTypeForIdentifier(
- const Definition *d,const FileDef *fs,const QCString &word,
+ const Definition *d,const FileDef *fs,const QCString &word,SrcLangExt lang,
QCString *tSpec,int count=0)
{
if (count>10) return word; // oops recursion
QCString symName,result,templSpec,tmpName;
if (tSpec && !tSpec->isEmpty())
- templSpec = stripDeclKeywords(getCanonicalTemplateSpec(d,fs,*tSpec));
+ templSpec = stripDeclKeywords(getCanonicalTemplateSpec(d,fs,*tSpec,lang));
if (word.findRev("::")!=-1 && !(tmpName=stripScope(word)).isEmpty())
{
else if (!ts.isEmpty() && templSpec.isEmpty())
{
// use formal template args for spec
- templSpec = stripDeclKeywords(getCanonicalTemplateSpec(d,fs,ts));
+ templSpec = stripDeclKeywords(getCanonicalTemplateSpec(d,fs,ts,lang));
}
result = removeRedundantWhiteSpace(cd->qualifiedName() + templSpec);
type.stripPrefix("typename ");
type = stripTemplateSpecifiersFromScope(type,FALSE);
}
- result = getCanonicalTypeForIdentifier(d,fs,type,tSpec,count+1);
+ result = getCanonicalTypeForIdentifier(d,fs,type,mType->getLanguage(),tSpec,count+1);
}
else
{
}
else // fallback
{
- resolvedType = resolveTypeDef(d,word);
+ resolvedType = lang==SrcLangExt_Java ? word : resolveTypeDef(d,word);
//printf("typedef [%s]->[%s]\n",qPrint(word),qPrint(resolvedType));
if (resolvedType.isEmpty()) // not known as a typedef either
{
return result;
}
-static QCString extractCanonicalType(const Definition *d,const FileDef *fs,QCString type)
+static QCString extractCanonicalType(const Definition *d,const FileDef *fs,QCString type,SrcLangExt lang)
{
type = type.stripWhiteSpace();
//printf(" i=%d p=%d\n",i,p);
if (i>pp) canType += type.mid(pp,i-pp);
- QCString ct = getCanonicalTypeForIdentifier(d,fs,word,&templSpec);
+ QCString ct = getCanonicalTypeForIdentifier(d,fs,word,lang,&templSpec);
// in case the ct is empty it means that "word" represents scope "d"
// and this does not need to be added to the canonical
size_t tl = match.length();
std::string matchStr = match.str();
canType += ts.substr(tp,ti-tp);
- canType += getCanonicalTypeForIdentifier(d,fs,matchStr.c_str(),0);
+ canType += getCanonicalTypeForIdentifier(d,fs,matchStr.c_str(),lang,0);
tp=ti+tl;
}
canType+=ts.substr(tp);
return removeRedundantWhiteSpace(canType);
}
-static QCString extractCanonicalArgType(const Definition *d,const FileDef *fs,const Argument &arg)
+static QCString extractCanonicalArgType(const Definition *d,const FileDef *fs,const Argument &arg,SrcLangExt lang)
{
QCString type = arg.type.stripWhiteSpace();
QCString name = arg.name;
type+=arg.array;
}
- return extractCanonicalType(d,fs,type);
+ return extractCanonicalType(d,fs,type,lang);
}
static bool matchArgument2(
const Definition *srcScope,const FileDef *srcFileScope,Argument &srcA,
- const Definition *dstScope,const FileDef *dstFileScope,Argument &dstA
+ const Definition *dstScope,const FileDef *dstFileScope,Argument &dstA,
+ SrcLangExt lang
)
{
//printf(">> match argument: %s::'%s|%s' (%s) <-> %s::'%s|%s' (%s)\n",
if (srcA.canType.isEmpty() || dstA.canType.isEmpty())
{
// need to re-evaluate both see issue #8370
- srcA.canType = extractCanonicalArgType(srcScope,srcFileScope,srcA);
- dstA.canType = extractCanonicalArgType(dstScope,dstFileScope,dstA);
+ srcA.canType = extractCanonicalArgType(srcScope,srcFileScope,srcA,lang);
+ dstA.canType = extractCanonicalArgType(dstScope,dstFileScope,dstA,lang);
}
if (srcA.canType==dstA.canType)
// new algorithm for argument matching
bool matchArguments2(const Definition *srcScope,const FileDef *srcFileScope,const ArgumentList *srcAl,
- const Definition *dstScope,const FileDef *dstFileScope,const ArgumentList *dstAl,
- bool checkCV)
+ const Definition *dstScope,const FileDef *dstFileScope,const ArgumentList *dstAl,
+ bool checkCV,SrcLangExt lang)
{
ASSERT(srcScope!=0 && dstScope!=0);
Argument &srcA = const_cast<Argument&>(*srcIt);
Argument &dstA = const_cast<Argument&>(*dstIt);
if (!matchArgument2(srcScope,srcFileScope,srcA,
- dstScope,dstFileScope,dstA)
+ dstScope,dstFileScope,dstA,
+ lang)
)
{
NOMATCH
}
-
// merges the initializer of two argument lists
// pre: the types of the arguments in the list should match.
void mergeArguments(ArgumentList &srcAl,ArgumentList &dstAl,bool forceNameOverwrite)
match=matchArguments2(
md->getOuterScope(),fd,&mdAl,
Doxygen::globalScope,fd,argList_p.get(),
- checkCV);
+ checkCV,md->getLanguage());
}
if (match)
{
if (memberName.left(9)!="operator " && // treat operator conversion methods
// as a special case
(im=memberName.findRev("::"))!=-1 &&
- im<(int)memberName.length()-2 // not A::
+ im<static_cast<int>(memberName.length())-2 // not A::
)
{
mScope=memberName.left(im);
bool match = args.isEmpty() ||
matchArguments2(mmd->getOuterScope(),mmd->getFileDef(),&mmdAl,
fcd, fcd->getFileDef(),argList.get(),
- checkCV);
+ checkCV,mmd->getLanguage());
//printf("match=%d\n",match);
if (match)
{
const ArgumentList &mmdAl = mmd->argumentList();
if (matchArguments2(mmd->getOuterScope(),mmd->getFileDef(),&mmdAl,
- Doxygen::globalScope,mmd->getFileDef(),argList.get(),
- checkCV
- )
+ Doxygen::globalScope,mmd->getFileDef(),argList.get(),
+ checkCV,mmd->getLanguage())
)
{
fuzzy_mmd = mmd;
match=matchArguments2(
mmd->getOuterScope(),mmd->getFileDef(),&mmdAl,
fnd,mmd->getFileDef(),argList_p.get(),
- checkCV);
+ checkCV,mmd->getLanguage());
}
if (match)
{
cd=0;nd=0;
QCString scopeName=scope;
- //printf("getScopeDefs: docScope='%s' scope='%s'\n",docScope,scope);
+ //printf("getScopeDefs: docScope='%s' scope='%s'\n",qPrint(docScope),qPrint(scope));
if (scopeName.isEmpty()) return FALSE;
bool explicitGlobalScope=FALSE;
if (scopeOffset>0) fullName.prepend(docScopeName.left(scopeOffset)+"::");
if (((cd=getClass(fullName)) || // normal class
- (cd=getClass(fullName+"-p")) //|| // ObjC protocol
- //(cd=getClass(fullName+"-g")) // C# generic
+ (cd=getClass(fullName+"-p")) // ObjC protocol
) && cd->isLinkable())
{
return TRUE; // class link written => quit
static bool isLowerCase(QCString &s)
{
if (s.isEmpty()) return true;
- uchar *p=(uchar*)s.data();
+ const char *p=s.data();
int c;
- while ((c=*p++)) if (!islower(c)) return false;
+ while ((c=static_cast<uchar>(*p++))) if (!islower(c)) return false;
return true;
}
return FALSE;
}
- //printf("scName=%s fullName=%s\n",scName,qPrint(fullName));
+ //printf("scName=%s fullName=%s\n",qPrint(scName),qPrint(fullName));
// check if this is a class or namespace reference
if (scName!=fullName && getScopeDefs(scName,fullName,cd,nd))
{
+ //printf("found scopeDef\n");
if (cd) // scope matches that of a class
{
*resContext = cd;
{
//printf("found scName=%s fullName=%s scName==fullName=%d "
// "inSeeBlock=%d scopePos=%d!\n",
- // scName,qPrint(fullName),scName==fullName,inSeeBlock,scopePos);
+ // qPrint(scName),qPrint(fullName),scName==fullName,inSeeBlock,scopePos);
return FALSE;
}
// continue search...
QCString linkToText(SrcLangExt lang,const QCString &link,bool isFileName)
{
- //static bool optimizeOutputJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
+ //bool optimizeOutputJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
QCString result=link;
if (!result.isEmpty())
{
* instead of :: the \# symbol may also be used.
*/
-bool generateRef(OutputDocInterface &od,const char *scName,
+bool generateRef(BaseOutputDocInterface &od,const char *scName,
const char *name,bool inSeeBlock,const char *rt)
{
//printf("generateRef(scName=%s,name=%s,inSee=%d,rt=%s)\n",scName,name,inSeeBlock,rt);
// basis for the link's text.
// returns TRUE if a link could be generated.
-bool generateLink(OutputDocInterface &od,const QCString &clName,
+bool generateLink(OutputList &ol,const QCString &clName,
const QCString &lr,bool inSeeBlock,const QCString <)
{
//printf("generateLink(clName=%s,lr=%s,lr=%s)\n",clName,lr,lt);
{
linkText=linkToText(compound->getLanguage(),lt,TRUE);
}
- od.writeObjectLink(compound->getReference(),
+ ol.writeObjectLink(compound->getReference(),
compound->getOutputFileBase(),anchor,linkText);
if (!compound->isReference())
{
- writePageRef(od,compound->getOutputFileBase(),anchor);
+ writePageRef(ol,compound->getOutputFileBase(),anchor);
}
}
else
}
else // link could not be found
{
- od.docify(linkText);
+ ol.docify(linkText);
return FALSE;
}
}
-void generateFileRef(OutputDocInterface &od,const QCString &name,const QCString &text)
+void generateFileRef(OutputList &ol,const QCString &name,const QCString &text)
{
//printf("generateFileRef(%s,%s)\n",name,text);
QCString linkText = text.isEmpty() ? text : name;
if ((fd=findFileDef(Doxygen::inputNameLinkedMap,name,ambig)) &&
fd->isLinkable())
// link to documented input file
- od.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),linkText);
+ ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),linkText);
else
- od.docify(linkText);
+ ol.docify(linkText);
}
//----------------------------------------------------------------------
const int maxAddrSize = 20;
char addr[maxAddrSize];
- qsnprintf(addr,maxAddrSize,"%p:",(void*)fnMap);
+ qsnprintf(addr,maxAddrSize,"%p:",reinterpret_cast<const void*>(fnMap));
QCString key = addr;
key+=n;
if (doEscape) // not a valid unicode char or escaping needed
{
char ids[5];
- unsigned char id = (unsigned char)c;
+ unsigned char id = static_cast<unsigned char>(c);
ids[0]='_';
ids[1]='x';
ids[2]=hex[id>>4];
else
{
growBuf.addChar('_');
- growBuf.addChar((char)tolower(c));
+ growBuf.addChar(static_cast<char>(tolower(c)));
}
break;
}
default:
if (!caseSenseNames && c>='a' && c<='z') // lower to upper case escape, _a -> 'A'
{
- result+=(char)toupper(*p);
+ result+=static_cast<char>(toupper(*p));
p++;
}
else // unknown escape, pass underscore character as-is
static std::mutex g_usedNamesMutex;
static int g_usedNamesCount=1;
+
+
/*! This function determines the file name on disk of an item
* given its name, which could be a class name with template
* arguments, so special characters need to be escaped.
QCString convertNameToFile(const QCString &name,bool allowDots,bool allowUnderscore)
{
if (name.isEmpty()) return name;
- static bool shortNames = Config_getBool(SHORT_NAMES);
- static bool createSubdirs = Config_getBool(CREATE_SUBDIRS);
+ bool shortNames = Config_getBool(SHORT_NAMES);
+ bool createSubdirs = Config_getBool(CREATE_SUBDIRS);
QCString result;
if (shortNames) // use short names only
{
// third algorithm based on MD5 hash
uchar md5_sig[16];
char sigStr[33];
- MD5Buffer((const unsigned char *)result.data(),resultLen,md5_sig);
+ MD5Buffer(result.data(),resultLen,md5_sig);
MD5SigToString(md5_sig,sigStr);
result=result.left(128-32)+sigStr;
}
if (createSubdirs)
{
int l1Dir=0,l2Dir=0;
+ int createSubdirsLevel = Config_getInt(CREATE_SUBDIRS_LEVEL);
+ int createSubdirsBitmaskL2 = (1<<createSubdirsLevel)-1;
// compute md5 hash to determine sub directory to use
uchar md5_sig[16];
- MD5Buffer((const unsigned char *)result.data(),result.length(),md5_sig);
- l1Dir = md5_sig[14]&0xf;
- l2Dir = md5_sig[15];
+ MD5Buffer(result.data(),result.length(),md5_sig);
+ l1Dir = md5_sig[14] & 0xf;
+ l2Dir = md5_sig[15] & createSubdirsBitmaskL2;
result.prepend(QCString().sprintf("d%x/d%02x/",l1Dir,l2Dir));
}
{
if (Config_getBool(CREATE_SUBDIRS))
{
- // create 4096 subdirectories
+ // create up to 4096 subdirectories
+ int createSubdirsLevelPow2 = 1 << Config_getInt(CREATE_SUBDIRS_LEVEL);
int l1,l2;
for (l1=0;l1<16;l1++)
{
{
term("Failed to create output directory '%s'\n",qPrint(subdir));
}
- for (l2=0;l2<256;l2++)
+ for (l2=0; l2 < createSubdirsLevelPow2; l2++)
{
QCString subsubdir;
subsubdir.sprintf("d%x/d%02x",l1,l2);
if (Config_getBool(CREATE_SUBDIRS))
{
// remove empty subdirectories
+ int createSubdirsLevelPow2 = 1 << Config_getInt(CREATE_SUBDIRS_LEVEL);
for (int l1=0;l1<16;l1++)
{
QCString subdir;
subdir.sprintf("d%x",l1);
- for (int l2=0;l2<256;l2++)
+ for (int l2=0; l2 < createSubdirsLevelPow2; l2++)
{
QCString subsubdir;
subsubdir.sprintf("d%x/d%02x",l1,l2);
else
{
encChar[0]='_';
- encChar[1]=hex[((unsigned char)c)>>4];
- encChar[2]=hex[((unsigned char)c)&0xF];
+ encChar[1]=hex[static_cast<unsigned char>(c)>>4];
+ encChar[2]=hex[static_cast<unsigned char>(c)&0xF];
encChar[3]=0;
growBuf.addStr(encChar);
}
{
if (s.isEmpty()) return s;
GrowBuf growBuf;
- const unsigned char *q;
+ const char *q;
int cnt;
- const unsigned char *p=(const unsigned char *)s.data();
+ const char *p=s.data();
char c;
while ((c=*p++))
{
if (*q == ';')
{
--p; // we need & as well
- DocSymbol::SymType res = HtmlEntityMapper::instance()->name2sym(QCString((char *)p).left(cnt));
- if (res == DocSymbol::Sym_Unknown)
+ HtmlEntityMapper::SymType res = HtmlEntityMapper::instance()->name2sym(QCString(p).left(cnt));
+ if (res == HtmlEntityMapper::Sym_Unknown)
{
p++;
growBuf.addStr("&");
growBuf.addStr(s.substr(i,p-i));
}
QCString entity(match.str());
- DocSymbol::SymType symType = HtmlEntityMapper::instance()->name2sym(entity);
+ HtmlEntityMapper::SymType symType = HtmlEntityMapper::instance()->name2sym(entity);
const char *code=0;
- if (symType!=DocSymbol::Sym_Unknown && (code=HtmlEntityMapper::instance()->utf8(symType)))
+ if (symType!=HtmlEntityMapper::Sym_Unknown && (code=HtmlEntityMapper::instance()->utf8(symType)))
{
growBuf.addStr(code);
}
*/
int extractClassNameFromType(const QCString &type,int &pos,QCString &name,QCString &templSpec,SrcLangExt lang)
{
- static reg::Ex re_norm(R"(\a[\w:]*)");
- static reg::Ex re_fortran(R"(\a[\w:()=]*)");
+ static const reg::Ex re_norm(R"(\a[\w:]*)");
+ static const reg::Ex re_fortran(R"(\a[\w:()=]*)");
static const reg::Ex *re = &re_norm;
name.resize(0);
templSpec.resize(0);
if (type.isEmpty()) return -1;
- int typeLen=(int)type.length();
+ size_t typeLen=type.length();
if (typeLen>0)
{
if (lang == SrcLangExt_Fortran)
}
}
std::string s = type.str();
- reg::Iterator it(s,*re,(int)pos);
+ reg::Iterator it(s,*re,static_cast<int>(pos));
reg::Iterator end;
if (it!=end)
{
const auto &match = *it;
- int i = (int)match.position();
- int l = (int)match.length();
- int ts = i+l;
- int te = ts;
- int tl = 0;
+ size_t i = match.position();
+ size_t l = match.length();
+ size_t ts = i+l;
+ size_t te = ts;
+ size_t tl = 0;
- while (ts<typeLen && type[ts]==' ') ts++,tl++; // skip any whitespace
- if (ts<typeLen && type[ts]=='<') // assume template instance
+ while (ts<typeLen && type[static_cast<uint>(ts)]==' ') ts++,tl++; // skip any whitespace
+ if (ts<typeLen && type[static_cast<uint>(ts)]=='<') // assume template instance
{
// locate end of template
te=ts+1;
int brCount=1;
while (te<typeLen && brCount!=0)
{
- if (type[te]=='<')
+ if (type[static_cast<uint>(te)]=='<')
{
- if (te<typeLen-1 && type[te+1]=='<') te++; else brCount++;
+ if (te<typeLen-1 && type[static_cast<uint>(te)+1]=='<') te++; else brCount++;
}
- if (type[te]=='>')
+ if (type[static_cast<uint>(te)]=='>')
{
- if (te<typeLen-1 && type[te+1]=='>') te++; else brCount--;
+ if (te<typeLen-1 && type[static_cast<uint>(te)+1]=='>') te++; else brCount--;
}
te++;
}
{
templSpec = QCString(type).mid(ts,te-ts);
tl+=te-ts;
- pos=i+l+tl;
+ pos=static_cast<int>(i+l+tl);
}
else // no template part
{
- pos=i+l;
+ pos=static_cast<int>(i+l);
}
//printf("extractClassNameFromType([in] type=%s,[out] pos=%d,[out] name=%s,[out] templ=%s)=TRUE i=%d\n",
// qPrint(type),pos,qPrint(name),qPrint(templSpec),i);
- return i;
+ return static_cast<int>(i);
}
}
- pos = typeLen;
+ pos = static_cast<int>(typeLen);
//printf("extractClassNameFromType([in] type=%s,[out] pos=%d,[out] name=%s,[out] templ=%s)=FALSE\n",
// qPrint(type),pos,qPrint(name),qPrint(templSpec));
return -1;
{
if (str.isEmpty()) return;
//if (strlen(str)<2) stackTrace();
- const unsigned char *p=(const unsigned char *)str.data();
- const unsigned char *q;
+ const char *p=str.data();
+ const char *q;
int cnt;
unsigned char c;
unsigned char pc='\0';
while (*p)
{
- c=*p++;
+ c=static_cast<unsigned char>(*p++);
if (insidePre)
{
{
case 0xef: // handle U+FFFD i.e. "Replacement character" caused by octal: 357 277 275 / hexadecimal 0xef 0xbf 0xbd
// the LaTeX command \ucr has been defined in doxygen.sty
- if ((unsigned char)*(p) == 0xbf && (unsigned char)*(p+1) == 0xbd)
+ if (static_cast<unsigned char>(*(p)) == 0xbf && static_cast<unsigned char>(*(p+1)) == 0xbd)
{
t << "{\\ucr}";
p += 2;
}
else
- t << (char)c;
+ t << static_cast<char>(c);
break;
case '\\': t << "\\(\\backslash\\)"; break;
case '{': t << "\\{"; break;
case '$': t << "\\$"; break;
case '"': t << "\"{}"; break;
case '-': t << "-\\/"; break;
- case '^': insideTable ? t << "\\string^" : t << (char)c; break;
+ case '^': insideTable ? t << "\\string^" : t << static_cast<char>(c); break;
case '~': t << "\\string~"; break;
case '\n': if (retainNewline) t << "\\newline"; else t << ' ';
break;
break;
default:
if (c<32) t << ' '; // non printable control character
- else t << (char)c;
+ else t << static_cast<char>(c);
break;
}
}
{
case 0xef: // handle U+FFFD i.e. "Replacement character" caused by octal: 357 277 275 / hexadecimal 0xef 0xbf 0xbd
// the LaTeX command \ucr has been defined in doxygen.sty
- if ((unsigned char)*(p) == 0xbf && (unsigned char)*(p+1) == 0xbd)
+ if (static_cast<unsigned char>(*(p)) == 0xbf && static_cast<unsigned char>(*(p+1)) == 0xbd)
{
t << "{\\ucr}";
p += 2;
}
else
- t << (char)c;
+ t << static_cast<char>(c);
break;
case '#': t << "\\#"; break;
case '$': t << "\\$"; break;
if (*q == ';')
{
--p; // we need & as well
- DocSymbol::SymType res = HtmlEntityMapper::instance()->name2sym(QCString((char *)p).left(cnt));
- if (res == DocSymbol::Sym_Unknown)
+ HtmlEntityMapper::SymType res = HtmlEntityMapper::instance()->name2sym(QCString(p).left(cnt));
+ if (res == HtmlEntityMapper::Sym_Unknown)
{
p++;
t << "\\&";
}
else
{
- t << (char)c;
+ t << static_cast<char>(c);
}
}
}
{
if (s.isEmpty()) return s;
TextStream t;
- const signed char *p=(const signed char*)s.data();
+ const char *p=s.data();
char c;
while ((c=*p++))
{
default:
if (c<0)
{
- unsigned char id = (unsigned char)c;
+ unsigned char id = static_cast<unsigned char>(c);
t << "\\%" << hex[id>>4] << hex[id&0xF];
}
else
QCString addHtmlExtensionIfMissing(const QCString &fName)
{
if (fName.isEmpty()) return fName;
- if (fName.find('.')==-1) // no extension
+ if (stripPath(fName).find('.')==-1) // no extension
{
return QCString(fName)+Doxygen::htmlFileExtension;
}
{ "sql", "sql", SrcLangExt_SQL, ".sql" },
{ "md", "md", SrcLangExt_Markdown, ".md" },
{ "lex", "lex", SrcLangExt_Lex, ".l" },
- { 0, 0, (SrcLangExt)0, 0 }
+ { 0, 0, static_cast<SrcLangExt>(0),0}
};
bool updateLanguageMapping(const QCString &extension,const QCString &language)
if (it!=g_extLookup.end()) // listed extension
{
//printf("getLanguageFromFileName(%s)=%x\n",qPrint(fi.extension()),*pVal);
- return (SrcLangExt)it->second;
+ return static_cast<SrcLangExt>(it->second);
}
//printf("getLanguageFromFileName(%s) not found!\n",qPrint(fileName));
return defLang; // not listed => assume C-ish language.
static int nextUTF8CharPosition(const QCString &utf8Str,uint len,uint startPos)
{
if (startPos>=len) return len;
- uchar c = (uchar)utf8Str[startPos];
+ uchar c = static_cast<uchar>(utf8Str[startPos]);
int bytes=getUTF8CharNumBytes(c);
if (c=='&') // skip over character entities
{
bytes=1;
int (*matcher)(int) = 0;
- c = (uchar)utf8Str[startPos+bytes];
+ c = static_cast<uchar>(utf8Str[startPos+bytes]);
if (c=='#') // numerical entity?
{
bytes++;
- c = (uchar)utf8Str[startPos+bytes];
+ c = static_cast<uchar>(utf8Str[startPos+bytes]);
if (c=='x') // hexadecimal entity?
{
bytes++;
}
if (matcher)
{
- while ((c = (uchar)utf8Str[startPos+bytes])!=0 && matcher(c))
+ while ((c = static_cast<uchar>(utf8Str[startPos+bytes]))!=0 && matcher(c))
{
bytes++;
}
if (doc.isEmpty()) return "";
//printf("parseCommentAsText(%s)\n",qPrint(doc));
TextStream t;
- std::unique_ptr<IDocParser> parser { createDocParser() };
- std::unique_ptr<DocRoot> root { validatingParseDoc(*parser.get(),
- fileName,lineNr,
- (Definition*)scope,(MemberDef*)md,doc,FALSE,FALSE,
- QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
- auto visitor = std::make_unique<TextDocVisitor>(t);
- root->accept(visitor.get());
+ auto parser { createDocParser() };
+ auto ast { validatingParseDoc(*parser.get(),
+ fileName,lineNr,
+ const_cast<Definition*>(scope),const_cast<MemberDef*>(md),doc,FALSE,FALSE,
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
+ auto astImpl = dynamic_cast<const DocNodeAST*>(ast.get());
+ if (astImpl)
+ {
+ TextDocVisitor visitor(t);
+ std::visit(visitor,astImpl->root);
+ }
QCString result = convertCharEntitiesToUTF8(t.str().c_str()).stripWhiteSpace();
int i=0;
int charCnt=0;
struct Marker
{
- Marker(int p, int n,int s) : pos(p),number(n),size(s) {}
- int pos; // position in the string
+ Marker(size_t p, int n,size_t s) : pos(p),number(n),size(s) {}
+ size_t pos; // position in the string
int number; // argument number
- int size; // size of the marker
+ size_t size; // size of the marker
};
/** For a string \a s that starts with a command name, returns the character
QCString args = extractAliasArgs(p,0);
i+=args.length();
}
- i+=(int)(p-s);
+ i+=static_cast<int>(p-s);
}
return i;
}
// first make a list of arguments from the comma separated argument list
std::vector<QCString> args;
- int i,l=(int)argList.length();
- int s=0;
+ size_t i,l=argList.length();
+ size_t s=0;
for (i=0;i<l;i++)
{
char c = argList.at(i);
l = aliasValue.length();
char pc='\0';
bool insideMarkerId=false;
- int markerStart=0;
+ size_t markerStart=0;
auto isDigit = [](char c) { return c>='0' && c<='9'; };
for (i=0;i<=l;i++)
{
if (insideMarkerId && !isDigit(c)) // found end of a markerId
{
insideMarkerId = false;
- int markerLen = i-markerStart;
+ size_t markerLen = i-markerStart;
markerList.push_back(Marker(markerStart-1,
aliasValue.mid(markerStart,markerLen).toInt(),
markerLen+1));
// then we replace the markers with the corresponding arguments in one pass
QCString result;
- int p=0;
- for (i=0;i<(int)markerList.size();i++)
+ size_t p=0;
+ for (i=0;i<markerList.size();i++)
{
const Marker &m = markerList.at(i);
result+=aliasValue.mid(p,m.pos-p);
//printf("part before marker %d: '%s'\n",i,qPrint(aliasValue.mid(p,m->pos-p)));
- if (m.number>0 && m.number<=(int)args.size()) // valid number
+ if (m.number>0 && m.number<=static_cast<int>(args.size())) // valid number
{
result+=expandAliasRec(aliasesProcessed,args.at(m.number-1),TRUE);
//printf("marker index=%d pos=%d number=%d size=%d replacement %s\n",i,m->pos,m->number,m->size,
#endif
}
-static int transcodeCharacterBuffer(const QCString &fileName,BufStr &srcBuf,int size,
+static size_t transcodeCharacterBuffer(const QCString &fileName,BufStr &srcBuf,size_t size,
const QCString &inputEncoding,const QCString &outputEncoding)
{
if (inputEncoding.isEmpty() || outputEncoding.isEmpty()) return size;
if (qstricmp(inputEncoding,outputEncoding)==0) return size;
void *cd = portable_iconv_open(outputEncoding.data(),inputEncoding.data());
- if (cd==(void *)(-1))
+ if (cd==reinterpret_cast<void *>(-1))
{
term("unsupported character conversion: '%s'->'%s': %s\n"
"Check the INPUT_ENCODING setting in the config file!\n",
qPrint(inputEncoding),qPrint(outputEncoding),strerror(errno));
}
- int tmpBufSize=size*4+1;
+ size_t tmpBufSize=size*4+1;
BufStr tmpBuf(tmpBufSize);
size_t iLeft=size;
size_t oLeft=tmpBufSize;
const char *srcPtr = srcBuf.data();
char *dstPtr = tmpBuf.data();
- uint newSize=0;
+ size_t newSize=0;
if (!portable_iconv(cd, &srcPtr, &iLeft, &dstPtr, &oLeft))
{
- newSize = tmpBufSize-(int)oLeft;
+ newSize = tmpBufSize-oLeft;
srcBuf.shrink(newSize);
strncpy(srcBuf.data(),tmpBuf.data(),newSize);
//printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,qPrint(srcBuf));
bool readInputFile(const QCString &fileName,BufStr &inBuf,bool filter,bool isSourceCode)
{
// try to open file
- int size=0;
+ size_t size=0;
FileInfo fi(fileName.str());
if (!fi.exists()) return FALSE;
err("could not open file %s\n",qPrint(fileName));
return FALSE;
}
- size=(int)fi.size();
+ size=fi.size();
// read the file
inBuf.skip(size);
f.read(inBuf.data(),size);
const int bufSize=1024;
char buf[bufSize];
int numRead;
- while ((numRead=(int)fread(buf,1,bufSize,f))>0)
+ while ((numRead=static_cast<int>(fread(buf,1,bufSize,f)))>0)
{
//printf(">>>>>>>>Reading %d bytes\n",numRead);
inBuf.addArray(buf,numRead),size+=numRead;
int start=0;
if (size>=2 &&
- ((uchar)inBuf.at(0)==0xFF && (uchar)inBuf.at(1)==0xFE) // Little endian BOM
+ static_cast<uchar>(inBuf.at(0))==0xFF &&
+ static_cast<uchar>(inBuf.at(1))==0xFE // Little endian BOM
) // UCS-2LE encoded file
{
transcodeCharacterBuffer(fileName,inBuf,inBuf.curPos(),
"UCS-2LE","UTF-8");
}
else if (size>=2 &&
- ((uchar)inBuf.at(0)==0xFE && (uchar)inBuf.at(1)==0xFF) // big endian BOM
+ static_cast<uchar>(inBuf.at(0))==0xFE &&
+ static_cast<uchar>(inBuf.at(1))==0xFF // big endian BOM
) // UCS-2BE encoded file
{
transcodeCharacterBuffer(fileName,inBuf,inBuf.curPos(),
"UCS-2BE","UTF-8");
}
else if (size>=3 &&
- (uchar)inBuf.at(0)==0xEF &&
- (uchar)inBuf.at(1)==0xBB &&
- (uchar)inBuf.at(2)==0xBF
+ static_cast<uchar>(inBuf.at(0))==0xEF &&
+ static_cast<uchar>(inBuf.at(1))==0xBB &&
+ static_cast<uchar>(inBuf.at(2))==0xBF
) // UTF-8 encoded file
{
inBuf.dropFromStart(3); // remove UTF-8 BOM: no translation needed
// and translate CR's
size=inBuf.curPos()-start;
- int newSize=filterCRLF(inBuf.data()+start,size);
+ size_t newSize=filterCRLF(inBuf.data()+start,size);
//printf("filter char at %p size=%d newSize=%d\n",qPrint(dest)+oldPos,size,newSize);
if (newSize!=size) // we removed chars
{
QCString externalLinkTarget(const bool parent)
{
- static bool extLinksInWindow = Config_getBool(EXT_LINKS_IN_WINDOW);
+ bool extLinksInWindow = Config_getBool(EXT_LINKS_IN_WINDOW);
if (extLinksInWindow)
return "target=\"_blank\" ";
else if (parent)
*/
void writeColoredImgData(const QCString &dir,ColoredImgDataItem data[])
{
- static int hue = Config_getInt(HTML_COLORSTYLE_HUE);
- static int sat = Config_getInt(HTML_COLORSTYLE_SAT);
- static int gamma = Config_getInt(HTML_COLORSTYLE_GAMMA);
+ int hue = Config_getInt(HTML_COLORSTYLE_HUE);
+ int sat = Config_getInt(HTML_COLORSTYLE_SAT);
+ int gamma = Config_getInt(HTML_COLORSTYLE_GAMMA);
while (data->name)
{
QCString fileName = dir+"/"+data->name;
static const reg::Ex re(R"(##[0-9A-Fa-f][0-9A-Fa-f])");
reg::Iterator it(s,re);
reg::Iterator end;
- static int hue = Config_getInt(HTML_COLORSTYLE_HUE);
- static int sat = Config_getInt(HTML_COLORSTYLE_SAT);
- static int gamma = Config_getInt(HTML_COLORSTYLE_GAMMA);
+ int hue = Config_getInt(HTML_COLORSTYLE_HUE);
+ int sat = Config_getInt(HTML_COLORSTYLE_SAT);
+ int gamma = Config_getInt(HTML_COLORSTYLE_GAMMA);
size_t sl=s.length();
size_t p=0;
for (; it!=end ; ++it)
int level = HEXTONUM(lumStr[0])*16+HEXTONUM(lumStr[1]);
ColoredImage::hsl2rgb(hue/360.0,sat/255.0,
pow(level/255.0,gamma/100.0),&r,&g,&b);
- red = (int)(r*255.0);
- green = (int)(g*255.0);
- blue = (int)(b*255.0);
+ red = static_cast<int>(r*255.0);
+ green = static_cast<int>(g*255.0);
+ blue = static_cast<int>(b*255.0);
char colStr[8];
colStr[0]='#';
colStr[1]=hex[red>>4];
bool protectionLevelVisible(Protection prot)
{
- static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
- static bool extractPackage = Config_getBool(EXTRACT_PACKAGE);
+ bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
+ bool extractPackage = Config_getBool(EXTRACT_PACKAGE);
return (prot!=Private && prot!=Package) ||
(prot==Private && extractPrivate) ||
int indent=0;
int minIndent=1000000; // "infinite"
bool searchIndent=TRUE;
- static int tabSize=Config_getInt(TAB_SIZE);
+ int tabSize=Config_getInt(TAB_SIZE);
while ((c=*p++))
{
if (c=='\t') indent+=tabSize - (indent%tabSize);
bool fileVisibleInIndex(const FileDef *fd,bool &genSourceFile)
{
- static bool allExternals = Config_getBool(ALLEXTERNALS);
+ bool allExternals = Config_getBool(ALLEXTERNALS);
bool isDocFile = fd->isDocumentationFile();
genSourceFile = !isDocFile && fd->generateSourceFile();
return ( ((allExternals && fd->isLinkable()) ||
int *outListType2
)
{
- static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
+ bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
// default representing 1-1 mapping
*outListType1=inListType;
*outListType2=-1;
void writeLatexSpecialFormulaChars(TextStream &t)
{
unsigned char minus[4]; // Superscript minus
- char *pminus = (char *)minus;
unsigned char sup2[3]; // Superscript two
- char *psup2 = (char *)sup2;
unsigned char sup3[3];
- char *psup3 = (char *)sup3; // Superscript three
minus[0]= 0xE2;
minus[1]= 0x81;
minus[2]= 0xBB;
sup3[2]= 0;
t << "\\usepackage{newunicodechar}\n"
- " \\newunicodechar{" << pminus << "}{${}^{-}$}% Superscript minus\n"
- " \\newunicodechar{" << psup2 << "}{${}^{2}$}% Superscript two\n"
- " \\newunicodechar{" << psup3 << "}{${}^{3}$}% Superscript three\n"
+ " \\newunicodechar{" << minus << "}{${}^{-}$}% Superscript minus\n"
+ " \\newunicodechar{" << sup2 << "}{${}^{2}$}% Superscript two\n"
+ " \\newunicodechar{" << sup3 << "}{${}^{3}$}% Superscript three\n"
"\n";
}
if (format == FortranFormat_Fixed) return TRUE;
if (format == FortranFormat_Free) return FALSE;
+ int tabSize=Config_getInt(TAB_SIZE);
for (int i=0;;i++)
{
column=0;
skipLine=FALSE;
break;
+ case '\t':
+ column += tabSize-1;
+ break;
case ' ':
break;
case '\000':
if (skipLine) break;
return FALSE;
case '!':
- if (column>1 && column<7) return FALSE;
- skipLine=TRUE;
+ if (column!=6) skipLine=TRUE;
break;
default:
if (skipLine) break;
{
if (s.isEmpty() || begin.isEmpty() || end.isEmpty()) return s;
const char *p, *q;
- int beginLen = (int)begin.length();
- int endLen = (int)end.length();
- int resLen = 0;
+ size_t beginLen = begin.length();
+ size_t endLen = end.length();
+ size_t resLen = 0;
for (p=s.data(); (q=strstr(p,begin.data()))!=0; p=q+endLen)
{
- resLen+=(int)(q-p);
- p=q+beginLen;
+ resLen += q-p;
+ p = q+beginLen;
if ((q=strstr(p,end.data()))==0)
{
resLen+=beginLen;
char *r;
for (r=result.rawData(), p=s.data(); (q=strstr(p,begin.data()))!=0; p=q+endLen)
{
- int l = (int)(q-p);
+ size_t l = q-p;
memcpy(r,p,l);
r+=l;
p=q+beginLen;
int findIndex(const StringVector &sv,const std::string &s)
{
auto it = std::find(sv.begin(),sv.end(),s);
- return it!=sv.end() ? (int)(it-sv.begin()) : -1;
+ return it!=sv.end() ? static_cast<int>(it-sv.begin()) : -1;
}
/// find the index of the first occurrence of pattern \a re in a string \a s
int findIndex(const std::string &s,const reg::Ex &re)
{
reg::Match match;
- return reg::search(s,match,re) ? (int)match.position() : -1;
+ return reg::search(s,match,re) ? static_cast<int>(match.position()) : -1;
}
/// create a string where the string in the vector are joined by the given delimiter
class TextGeneratorIntf
{
public:
- virtual ~TextGeneratorIntf() {}
+ virtual ~TextGeneratorIntf() = default;
virtual void writeString(const QCString &,bool) const = 0;
virtual void writeBreak(int indent) const = 0;
virtual void writeLink(const QCString &extRef,const QCString &file,
class TextGeneratorOLImpl : public TextGeneratorIntf
{
public:
- virtual ~TextGeneratorOLImpl() {}
- TextGeneratorOLImpl(OutputDocInterface &od);
+ TextGeneratorOLImpl(BaseOutputDocInterface &od);
void writeString(const QCString &s,bool keepSpaces) const;
void writeBreak(int indent) const;
void writeLink(const QCString &extRef,const QCString &file,
const QCString &anchor,const QCString &text
) const;
private:
- OutputDocInterface &m_od;
+ BaseOutputDocInterface &m_od;
};
//--------------------------------------------------------------------
/* out */ QCString &resAnchor
);
-bool generateLink(OutputDocInterface &od,const QCString &,
+bool generateLink(OutputList &ol,const QCString &,
const QCString &,bool inSeeBlock,const QCString &);
-void generateFileRef(OutputDocInterface &od,const QCString &,
+void generateFileRef(OutputList &ol,const QCString &,
const QCString &linkTxt=QCString());
-void writePageRef(OutputDocInterface &od,const QCString &cn,const QCString &mn);
+void writePageRef(OutputList &ol,const QCString &cn,const QCString &mn);
-QCString getCanonicalTemplateSpec(const Definition *d,const FileDef *fs,const QCString& spec);
+//QCString getCanonicalTemplateSpec(const Definition *d,const FileDef *fs,const QCString& spec);
bool matchArguments2(const Definition *srcScope,const FileDef *srcFileScope,const ArgumentList *srcAl,
const Definition *dstScope,const FileDef *dstFileScope,const ArgumentList *dstAl,
- bool checkCV
+ bool checkCV,SrcLangExt lang
);
void mergeArguments(ArgumentList &,ArgumentList &,bool forceNameOverwrite=FALSE);
const char *name;
unsigned short width;
unsigned short height;
- unsigned char *content;
- unsigned char *alpha;
+ const unsigned char *content;
+ const unsigned char *alpha;
};
void writeColoredImgData(const QCString &dir,ColoredImgDataItem data[]);
+++ /dev/null
-/******************************************************************************
- *
- * Copyright (C) 1997-2021 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
- * for any purpose. It is provided "as is" without express or implied warranty.
- * See the GNU General Public License for more details.
- *
- * Documents produced by Doxygen are derivative works derived from the
- * input used in their production; they are not affected by this license.
- *
- */
-
-#ifndef VARIANT_H
-#define VARIANT_H
-
-#include <string>
-#include <utility>
-
-namespace details
-{
-
-//----- template helper class to compute the maximum over a set of template arguments
-
-//! generic declaration of a template to compute the maximum size of a set of template parameters.
-template <size_t arg1, size_t ... others>
-struct TMax;
-
-//! specialization to stop the recursion when arrived at a single argument.
-template <size_t arg>
-struct TMax<arg>
-{
- //! the compile time computed maximum value
- static const size_t value = arg;
-};
-
-//! recursive definition for multiple arguments
-template <size_t arg1, size_t arg2, size_t ... others>
-struct TMax<arg1, arg2, others...>
-{
- //! the compile time computed maximum value
- static const size_t value = arg1 >= arg2 ?
- TMax<arg1, others...>::value :
- TMax<arg2, others...>::value ;
-};
-
-//------ helper class to deal with memory management of an array of template types
-
-//! generic declaration of a template to handle copying, moving, and deleting
-//! type that matches a given index in the list of variant parameters.
-template<uint8_t n,typename... Ts>
-struct HelperRecT;
-
-//! Recursive template definition for multiple arguments.
-//! Each function checks for a matching index, and if found does the action.
-//! If not, the same function is called with the next index and one less type argument.
-template<uint8_t n, typename F, typename... Ts>
-struct HelperRecT<n, F, Ts...>
-{
- //! Helper function to copy an instance of a type by performing a placement new.
- //! @param id The id if the type to search for in the template parameter list
- //! @param src_v A pointer to the value of the type to copy from.
- //! @param dst_v A pointer to the variable to copy to.
- inline static void copy(uint8_t id, const void * src_v, void * dst_v)
- {
- if (n==id) // found it
- {
- new (dst_v) F(*reinterpret_cast<const F*>(src_v));
- }
- else // continue searching
- {
- HelperRecT<n+1,Ts...>::copy(id, src_v, dst_v);
- }
- }
-
- //! Helper function to move an instance of a type by calling the move constructor on it.
- //! @param id The id if the type to search for in the template parameter list
- //! @param src_v A pointer to the value of the type to copy from.
- //! @param dst_v A pointer to the variable to copy to.
- inline static void move(uint8_t id, void * src_v, void * dst_v)
- {
- if (n==id) // found it
- {
- new (dst_v) F(std::move(*reinterpret_cast<F*>(src_v)));
- }
- else // continue searching
- {
- HelperRecT<n+1,Ts...>::move(id, src_v, dst_v);
- }
- }
-
- //! Helper function to destroy an object of a given type by calling its destructor.
- //! @param id The id if the type to search for in the template parameter list
- //! @param data A pointer to the object to destroy
- inline static void destroy(uint8_t id, void * data)
- {
- if (n==id) // found it
- {
- reinterpret_cast<F*>(data)->~F();
- }
- else // continue searching
- {
- HelperRecT<n+1,Ts...>::destroy(id, data);
- }
- }
-
-};
-
-//! Specialization to stop the recursion when the end of the list has reached
-template<uint8_t n>
-struct HelperRecT<n>
-{
- inline static void copy(uint8_t id, const void * src_v, void * dst_v) { }
- inline static void move(uint8_t id, void * src_v, void * dst_v) { }
- inline static void destroy(uint8_t id, void * data) { }
-};
-
-//! Helper to kickstart the recursive search
-template<typename ...Ts>
-struct HelperT
-{
- inline static void copy(uint8_t id, const void *src_v, void *dst_v)
- { HelperRecT<0, Ts...>::copy(id, src_v, dst_v); }
- inline static void move(uint8_t id, void *src_v, void *dst_v)
- { HelperRecT<0, Ts...>::move(id, src_v, dst_v); }
- inline static void destroy(uint8_t id,void *data)
- { HelperRecT<0, Ts...>::destroy(id, data); }
-};
-
-//! Specialization to end the recursion
-template<>
-struct HelperT<>
-{
- inline static void copy(uint8_t id, const void * src_v, void * dst_v) { }
- inline static void move(uint8_t id, void * src_v, void * dst_v) { }
- inline static void destroy(uint8_t id, void * data) { }
-};
-
-} // namespace details
-
-//! Generic declaration of a template type wrapper where VariantType<index,...>::type
-//! represents the type of the variant at the given index.
-//! The first type of the variant has index 0, the second has
-//! index 1, etc.
-template<uint8_t index, typename... Items>
-struct VariantType;
-
-//! specialization to stop the recursion when arrived at index 0 and type F
-template<typename F,typename...Ts>
-struct VariantType<0, F, Ts...>
-{
- using type = F;
-};
-
-//! recursive definition of the type wrapper
-template<uint8_t index, typename F, typename... Ts>
-struct VariantType<index, F, Ts...>
-{
- using type = typename VariantType<index-1,Ts...>::type;
-};
-
-//------------------------------------------------------------------
-
-//! Implementation of a variant container (similar to C++17's std::variant).
-//! It can hold either no instances (e.g. initially or after calling invalidate()),
-//! or hold exactly one instance of an object (after calling set())
-//! whose type is one of the variant's template parameters.
-//! Each parameter has an index, the first parameter has index 0.
-//! It behaves similar to a C union, in that the memory of all
-//! possible object types is shared, but unlike a C union
-//! it does allow C++ objects with constructors and destructors to be stored and
-//! knows what type is stored.
-template<typename... Ts>
-struct Variant {
- private:
- //! constant respresenting the maximum size that can hold all types in the template list
- static const size_t data_size = details::TMax<sizeof(Ts)...>::value;
- //! constant respresenting the maximum alignment requirement for all types in the template list
- static const size_t data_align = details::TMax<alignof(Ts)...>::value;
-
- //! the data type for the Variant's internal memory
- using Data = typename std::aligned_storage<data_size, data_align>::type;
-
- //! a short hand name for the helper class
- using HelperT = details::HelperT<Ts...>;
-
- template<uint8_t index>
- using Type = typename VariantType<index,Ts...>::type;
-
- //! The id that represents an invalid type
- static inline uint8_t invalid_id() { return 255; }
-
- //! the actual data
- Data m_data;
- //! a unique identifier for the type held by this variant
- uint8_t m_id;
-
- public:
- //! The default constructor
- Variant() : m_id(invalid_id())
- {
- }
-
- //! The copy constructor
- Variant(const Variant<Ts...>& src) : m_id(src.m_id)
- {
- HelperT::copy(src.m_id, &src.m_data, &m_data);
- }
-
- //! The move constructor
- Variant(Variant<Ts...>&& src) : m_id(src.m_id)
- {
- HelperT::move(src.m_id, &src.m_data, &m_data);
- }
-
- //! The copy assignment operator
- Variant<Ts...>& operator= (const Variant<Ts...> &src)
- {
- if (this!=&src) // prevent self assignment
- {
- // destroy the old value
- if (valid()) HelperT::destroy(m_id,&m_data);
- // and copy over the new one
- m_id = src.m_id;
- HelperT::copy(src.m_id, &src.m_data, &m_data);
- }
- return *this;
- }
-
- //! The move assignment operator
- Variant<Ts...>& operator= (Variant<Ts...> &&src)
- {
- // destroy the old value
- if (valid()) HelperT::destroy(m_id,&m_data);
- // and move in the new one
- m_id = src.m_id;
- HelperT::move(src.m_id, &src.m_data, &m_data);
- return *this;
- }
-
- //! The destructor
- ~Variant()
- {
- HelperT::destroy(m_id, &m_data);
- }
-
- //! Returns true iff the variant container holds a specific type.
- //! @tparam T the type to search for.
- template<uint8_t index>
- constexpr bool is() const { return m_id==index; }
-
- //! Returns true iff the Variant holds a valid type.
- constexpr bool valid() const { return m_id!=invalid_id(); }
-
- //! Invalidate the variant. Will destroy any object that is held.
- void invalidate()
- {
- HelperT::destroy(m_id,&m_data);
- m_id = invalid_id();
- }
-
- //! Returns the index of the type held by this variant, or invalid_id() if the
- //! variant does not hold any type (i.e. valid() returns false).
- constexpr uint8_t index() const { return m_id; }
-
- //! Replaces the contents of the variant container by constructing a type T calling
- //! the constructor with Args
- //! @tparam index the type to make the variant hold an instance of.
- //! @tparam Args The arguments types to pass to the constructor of T.
- //! @param args The argument values
- template<uint8_t index, typename... Args>
- void set(Args&&... args)
- {
- HelperT::destroy(m_id, &m_data);
- m_id = index;
- new (&m_data) Type<index>(std::forward<Args>(args)...);
- }
-
- //! Return a non-constant reference to the value held by the variant container.
- //! @throw std::bad_cast() if called on a variant container that does not hold
- //! an instance of the type of the variant at index.
- template<uint8_t index>
- Type<index>& get()
- {
- if (m_id != index) throw std::bad_cast();
- return *reinterpret_cast<Type<index>*>(&m_data);
- }
-
- //! Returns a constant reference to the value held by the variant container.
- //! @throw std::bad_cast() if called on a variant container that does not hold
- //! an instance of the type of the variant at index.
- template<uint8_t index>
- const Type<index>& get() const
- {
- if (m_id != index) throw std::bad_cast();
- return *reinterpret_cast<const Type<index>*>(&m_data);
- }
-
-};
-
-#endif
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (text.isEmpty()) return;
- static bool sourceTooltips = Config_getBool(SOURCE_TOOLTIPS);
+ bool sourceTooltips = Config_getBool(SOURCE_TOOLTIPS);
yyextra->tooltipManager.addTooltip(ol,d);
QCString ref = d->getReference();
QCString file = d->getOutputFileBase();
QCString vlargs="-Tsvg \""+ov+"\" "+dir ;
- if (Portable::system(Config_getString(DOT_PATH) + "dot",vlargs)!=0)
+ if (Portable::system(Doxygen::verifiedDotPath,vlargs)!=0)
{
err("could not create dot file");
}
bool found=FALSE;
for (const auto &cd : *Doxygen::classLinkedMap)
{
- if ((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ENTITYCLASS )
+ if (VhdlDocGen::convert(cd->protection())==VhdlDocGen::ENTITYCLASS )
{
found=TRUE;
break;
for (const auto &cd : *Doxygen::classLinkedMap)
{
- if ((VhdlDocGen::VhdlClasses)cd->protection()!=VhdlDocGen::ENTITYCLASS )
+ if (VhdlDocGen::convert(cd->protection())!=VhdlDocGen::ENTITYCLASS )
{
continue;
}
// nothing found so far
// if we are an architecture or package body search in entity
- if ((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ARCHITECTURECLASS ||
- (VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::PACKBODYCLASS)
+ if (VhdlDocGen::convert(cd->protection())==VhdlDocGen::ARCHITECTURECLASS ||
+ VhdlDocGen::convert(cd->protection())==VhdlDocGen::PACKBODYCLASS)
{
Definition *d = cd->getOuterScope();
// searching upper/lower case names
}
- if ((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ARCHITECTURECLASS ||
- (VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::PACKBODYCLASS)
+ if (VhdlDocGen::convert(cd->protection())==VhdlDocGen::ARCHITECTURECLASS ||
+ VhdlDocGen::convert(cd->protection())==VhdlDocGen::PACKBODYCLASS)
{
Definition *d = cd->getOuterScope();
QCString temp;
if (cd==0) return "";
- if ((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::PACKBODYCLASS)
+ if (VhdlDocGen::convert(cd->protection())==VhdlDocGen::PACKBODYCLASS)
{
temp=cd->name();
temp.stripPrefix("_");
{
std::vector<QCString> ql;
QCString nn=cd->className();
- int ii=(int)cd->protection()+2;
+ VhdlClasses ii=convert(cd->protection());
QCString type;
- if (ii==VhdlDocGen::ENTITY)
- type+=theTranslator_vhdlType(VhdlDocGen::ARCHITECTURE,TRUE);
- else if (ii==VhdlDocGen::ARCHITECTURE)
+ if (ii==VhdlDocGen::ENTITYCLASS)
type+=theTranslator_vhdlType(VhdlDocGen::ENTITY,TRUE);
- else if (ii==VhdlDocGen::PACKAGE_BODY)
- type+=theTranslator_vhdlType(VhdlDocGen::PACKAGE,TRUE);
- else if (ii==VhdlDocGen::PACKAGE)
+ else if (ii==VhdlDocGen::ARCHITECTURECLASS)
+ type+=theTranslator_vhdlType(VhdlDocGen::ARCHITECTURE,TRUE);
+ else if (ii==VhdlDocGen::PACKBODYCLASS)
type+=theTranslator_vhdlType(VhdlDocGen::PACKAGE_BODY,TRUE);
+ else if (ii==VhdlDocGen::PACKAGECLASS)
+ type+=theTranslator_vhdlType(VhdlDocGen::PACKAGE,TRUE);
else
type+="";
ol.disable(OutputGenerator::RTF);
ol.disable(OutputGenerator::Man);
- if (ii==VhdlDocGen::PACKAGE_BODY)
+ if (ii==VhdlDocGen::PACKBODYCLASS)
{
nn.stripPrefix("_");
cd=getClass(nn);
}
- else if (ii==VhdlDocGen::PACKAGE)
+ else if (ii==VhdlDocGen::PACKAGECLASS)
{
nn.prepend("_");
cd=getClass(nn);
}
- else if (ii==VhdlDocGen::ARCHITECTURE)
+ else if (ii==VhdlDocGen::ARCHITECTURECLASS)
{
StringVector qlist=split(nn.str(),"-");
if (qlist.size()>1)
}
QCString opp;
- if (ii==VhdlDocGen::ENTITY)
+ if (ii==VhdlDocGen::ENTITYCLASS)
{
VhdlDocGen::findAllArchitectures(ql,cd);
for (const auto &s : ql)
QCString VhdlDocGen::getIndexWord(const QCString &c,int index)
{
- static const reg::Ex reg(R"([\s|])");
+ static const reg::Ex reg(R"([\s:|])");
auto ql=split(c.str(),reg);
- if ((size_t)index < ql.size())
+ if (index < static_cast<int>(ql.size()))
{
return QCString(ql[index]);
}
else if (nd) d=nd;
else if (fd) d=fd;
else if (gd) d=gd;
- else d=(Definition*)mdef;
+ else d=mdef;
// write search index info
if (Doxygen::searchIndex)
ClassDef *annoClassDef=mdef->getClassDefOfAnonymousType();
// start a new member declaration
- uint isAnonymous = (bool)(annoClassDef); // || m_impl->annMemb || m_impl->annEnumType;
+ uint isAnonymous = annoClassDef!=0; // || m_impl->annMemb || m_impl->annEnumType;
///printf("startMemberItem for %s\n",qPrint(name()));
uint64_t mm=mdef->getMemberSpecifiers();
if (mm==VhdlDocGen::MISCELLANEOUS)
break;
case VhdlDocGen::USE:
kl=VhdlDocGen::getClass(mdef->name());
- if (kl && ((VhdlDocGen::VhdlClasses)kl->protection()==VhdlDocGen::ENTITYCLASS)) break;
+ if (kl && (VhdlDocGen::convert(kl->protection())==VhdlDocGen::ENTITYCLASS)) break;
writeLink(mdef,ol);
ol.insertMemberAlign();
ol.docify(" ");
if (membersHaveSpecificType(&mg->members(),type))
{
//printf("mg->header=%s\n",qPrint(mg->header()));
- bool hasHeader=mg->header()!="[NOHEADER]";
+ bool hasHeader=!mg->header().isEmpty();
ol.startMemberGroupHeader(hasHeader);
if (hasHeader)
{
QCString vlargs="-Tsvg \""+ov+"\" "+dir ;
- if (Portable::system(Config_getString(DOT_PATH) + "dot",vlargs)!=0)
+ if (Portable::system(Doxygen::verifiedDotPath,vlargs)!=0)
{
err("could not create dot file");
}
int z=q.findRev("\n");
- if (z==(int)q.length()-1)
+ if (z==static_cast<int>(q.length())-1)
{
q=q.remove(z,2);
}
ARCHITECTURECLASS, // Overlays: Private
PACKAGECLASS // Overlays: Package
};
+ static VhdlClasses convert(Protection prot)
+ {
+ switch (prot)
+ {
+ case Public: return ENTITYCLASS;
+ case Protected: return PACKBODYCLASS;
+ case Private: return ARCHITECTURECLASS;
+ case Package: return PACKAGECLASS;
+ }
+ return ENTITYCLASS;
+ }
enum VhdlKeyWords
{
bool VHDLOutlineParser::addLibUseClause(const QCString &type)
{
- static bool showIEEESTD=Config_getBool(FORCE_LOCAL_INCLUDES);
+ bool showIEEESTD=Config_getBool(FORCE_LOCAL_INCLUDES);
if (showIEEESTD) // all standard packages and libraries will not be shown
{
}
}
// special attention in case */ at end of last line
- int len = growBuf.getPos();
+ size_t len = growBuf.getPos();
if (growBuf.at(len-1) == '/' && growBuf.at(len-2) == '*')
{
len -= 2;
#include "filedef.h"
#include "fileinfo.h"
-static void visitCaption(XmlDocVisitor *parent, const DocNodeList &children)
+static void startSimpleSect(TextStream &t,const DocSimpleSect &s)
{
- for (const auto &n : children) n->accept(parent);
+ t << "<simplesect kind=\"";
+ switch(s.type())
+ {
+ case DocSimpleSect::See:
+ t << "see"; break;
+ case DocSimpleSect::Return:
+ t << "return"; break;
+ case DocSimpleSect::Author:
+ t << "author"; break;
+ case DocSimpleSect::Authors:
+ t << "authors"; break;
+ case DocSimpleSect::Version:
+ t << "version"; break;
+ case DocSimpleSect::Since:
+ t << "since"; break;
+ case DocSimpleSect::Date:
+ t << "date"; break;
+ case DocSimpleSect::Note:
+ t << "note"; break;
+ case DocSimpleSect::Warning:
+ t << "warning"; break;
+ case DocSimpleSect::Pre:
+ t << "pre"; break;
+ case DocSimpleSect::Post:
+ t << "post"; break;
+ case DocSimpleSect::Copyright:
+ t << "copyright"; break;
+ case DocSimpleSect::Invar:
+ t << "invariant"; break;
+ case DocSimpleSect::Remark:
+ t << "remark"; break;
+ case DocSimpleSect::Attention:
+ t << "attention"; break;
+ case DocSimpleSect::User:
+ t << "par"; break;
+ case DocSimpleSect::Rcs:
+ t << "rcs"; break;
+ case DocSimpleSect::Unknown: break;
+ }
+ t << "\">";
+}
+
+static void endSimpleSect(TextStream &t,const DocSimpleSect &)
+{
+ t << "</simplesect>\n";
+}
+
+static void visitCaption(XmlDocVisitor &visitor, const DocNodeList &children)
+{
+ for (const auto &n : children)
+ {
+ std::visit(visitor,n);
+ }
}
static void visitPreStart(TextStream &t, const char *cmd, bool doCaption,
- XmlDocVisitor *parent, const DocNodeList &children,
+ XmlDocVisitor &visitor, const DocNodeList &children,
const QCString &name, bool writeType, DocImage::Type type, const QCString &width,
const QCString &height, const QCString engine = QCString(), const QCString &alt = QCString(), bool inlineImage = FALSE)
{
if (doCaption)
{
t << " caption=\"";
- visitCaption(parent, children);
+ visitCaption(visitor, children);
t << "\"";
}
t << ">";
}
XmlDocVisitor::XmlDocVisitor(TextStream &t,CodeOutputInterface &ci,const QCString &langExt)
- : DocVisitor(DocVisitor_XML), m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE),
+ : m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE),
m_langExt(langExt)
{
}
// visitor functions for leaf nodes
//--------------------------------------
-void XmlDocVisitor::visit(DocWord *w)
+void XmlDocVisitor::operator()(const DocWord &w)
{
if (m_hide) return;
- filter(w->word());
+ filter(w.word());
}
-void XmlDocVisitor::visit(DocLinkedWord *w)
+void XmlDocVisitor::operator()(const DocLinkedWord &w)
{
if (m_hide) return;
- startLink(w->ref(),w->file(),w->anchor());
- filter(w->word());
+ startLink(w.ref(),w.file(),w.anchor());
+ filter(w.word());
endLink();
}
-void XmlDocVisitor::visit(DocWhiteSpace *w)
+void XmlDocVisitor::operator()(const DocWhiteSpace &w)
{
if (m_hide) return;
if (m_insidePre)
{
- m_t << w->chars();
+ m_t << w.chars();
}
else
{
}
}
-void XmlDocVisitor::visit(DocSymbol *s)
+void XmlDocVisitor::operator()(const DocSymbol &s)
{
if (m_hide) return;
- const char *res = HtmlEntityMapper::instance()->xml(s->symbol());
+ const char *res = HtmlEntityMapper::instance()->xml(s.symbol());
if (res)
{
m_t << res;
}
else
{
- err("XML: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(s->symbol(),TRUE));
+ err("XML: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(s.symbol(),TRUE));
}
}
-void XmlDocVisitor::visit(DocEmoji *s)
+void XmlDocVisitor::operator()(const DocEmoji &s)
{
if (m_hide) return;
- const char *res = EmojiEntityMapper::instance()->name(s->index());
+ const char *res = EmojiEntityMapper::instance()->name(s.index());
if (res)
{
QCString name=res;
name = name.mid(1,name.length()-2);
m_t << "<emoji name=\"" << name << "\" unicode=\"";
- filter(EmojiEntityMapper::instance()->unicode(s->index()));
+ filter(EmojiEntityMapper::instance()->unicode(s.index()));
m_t << "\"/>";
}
else
{
- m_t << s->name();
+ m_t << s.name();
}
}
-void XmlDocVisitor::visit(DocURL *u)
+void XmlDocVisitor::operator()(const DocURL &u)
{
if (m_hide) return;
m_t << "<ulink url=\"";
- if (u->isEmail()) m_t << "mailto:";
- filter(u->url());
+ if (u.isEmail()) m_t << "mailto:";
+ filter(u.url());
m_t << "\">";
- filter(u->url());
+ filter(u.url());
m_t << "</ulink>";
}
-void XmlDocVisitor::visit(DocLineBreak *)
+void XmlDocVisitor::operator()(const DocLineBreak &)
{
if (m_hide) return;
m_t << "<linebreak/>\n";
}
-void XmlDocVisitor::visit(DocHorRuler *)
+void XmlDocVisitor::operator()(const DocHorRuler &)
{
if (m_hide) return;
m_t << "<hruler/>\n";
}
-void XmlDocVisitor::visit(DocStyleChange *s)
+void XmlDocVisitor::operator()(const DocStyleChange &s)
{
if (m_hide) return;
- switch (s->style())
+ switch (s.style())
{
case DocStyleChange::Bold:
- if (s->enable()) m_t << "<bold>"; else m_t << "</bold>";
+ if (s.enable()) m_t << "<bold>"; else m_t << "</bold>";
break;
case DocStyleChange::S:
- if (s->enable()) m_t << "<s>"; else m_t << "</s>";
+ if (s.enable()) m_t << "<s>"; else m_t << "</s>";
break;
case DocStyleChange::Strike:
- if (s->enable()) m_t << "<strike>"; else m_t << "</strike>";
+ if (s.enable()) m_t << "<strike>"; else m_t << "</strike>";
break;
case DocStyleChange::Del:
- if (s->enable()) m_t << "<del>"; else m_t << "</del>";
+ if (s.enable()) m_t << "<del>"; else m_t << "</del>";
break;
case DocStyleChange::Underline:
- if (s->enable()) m_t << "<underline>"; else m_t << "</underline>";
+ if (s.enable()) m_t << "<underline>"; else m_t << "</underline>";
break;
case DocStyleChange::Ins:
- if (s->enable()) m_t << "<ins>"; else m_t << "</ins>";
+ if (s.enable()) m_t << "<ins>"; else m_t << "</ins>";
break;
case DocStyleChange::Italic:
- if (s->enable()) m_t << "<emphasis>"; else m_t << "</emphasis>";
+ if (s.enable()) m_t << "<emphasis>"; else m_t << "</emphasis>";
break;
case DocStyleChange::Code:
- if (s->enable()) m_t << "<computeroutput>"; else m_t << "</computeroutput>";
+ if (s.enable()) m_t << "<computeroutput>"; else m_t << "</computeroutput>";
break;
case DocStyleChange::Subscript:
- if (s->enable()) m_t << "<subscript>"; else m_t << "</subscript>";
+ if (s.enable()) m_t << "<subscript>"; else m_t << "</subscript>";
break;
case DocStyleChange::Superscript:
- if (s->enable()) m_t << "<superscript>"; else m_t << "</superscript>";
+ if (s.enable()) m_t << "<superscript>"; else m_t << "</superscript>";
break;
case DocStyleChange::Center:
- if (s->enable()) m_t << "<center>"; else m_t << "</center>";
+ if (s.enable()) m_t << "<center>"; else m_t << "</center>";
break;
case DocStyleChange::Small:
- if (s->enable()) m_t << "<small>"; else m_t << "</small>";
+ if (s.enable()) m_t << "<small>"; else m_t << "</small>";
break;
case DocStyleChange::Cite:
- if (s->enable()) m_t << "<cite>"; else m_t << "</cite>";
+ if (s.enable()) m_t << "<cite>"; else m_t << "</cite>";
break;
case DocStyleChange::Preformatted:
- if (s->enable())
+ if (s.enable())
{
m_t << "<preformatted>";
m_insidePre=TRUE;
case DocStyleChange::Div: /* HTML only */ break;
case DocStyleChange::Span: /* HTML only */ break;
case DocStyleChange::Details:
- if (s->enable()) m_t << "<details>"; else m_t << "</details>";
+ if (s.enable()) m_t << "<details>"; else m_t << "</details>";
break;
case DocStyleChange::Summary:
- if (s->enable()) m_t << "<summary>"; else m_t << "</summary>";
+ if (s.enable()) m_t << "<summary>"; else m_t << "</summary>";
break;
}
}
-void XmlDocVisitor::visit(DocVerbatim *s)
+void XmlDocVisitor::operator()(const DocVerbatim &s)
{
if (m_hide) return;
QCString lang = m_langExt;
- if (!s->language().isEmpty()) // explicit language setting
+ if (!s.language().isEmpty()) // explicit language setting
{
- lang = s->language();
+ lang = s.language();
}
SrcLangExt langExt = getLanguageFromCodeLang(lang);
- switch(s->type())
+ switch(s.type())
{
case DocVerbatim::Code:
m_t << "<programlisting";
- if (!s->language().isEmpty())
+ if (!s.language().isEmpty())
m_t << " filename=\"" << lang << "\">";
else
m_t << ">";
- getCodeParser(lang).parseCode(m_ci,s->context(),s->text(),langExt,
- s->isExample(),s->exampleFile());
+ getCodeParser(lang).parseCode(m_ci,s.context(),s.text(),langExt,
+ s.isExample(),s.exampleFile());
m_t << "</programlisting>";
break;
case DocVerbatim::JavaDocLiteral:
m_t << "<javadocliteral>";
- filter(s->text());
+ filter(s.text());
m_t << "</javadocliteral>";
break;
case DocVerbatim::JavaDocCode:
m_t << "<javadoccode>";
- filter(s->text());
+ filter(s.text());
m_t << "</javadoccode>";
break;
case DocVerbatim::Verbatim:
m_t << "<verbatim>";
- filter(s->text());
+ filter(s.text());
m_t << "</verbatim>";
break;
case DocVerbatim::HtmlOnly:
- if (s->isBlock())
+ if (s.isBlock())
{
m_t << "<htmlonly block=\"yes\">";
}
{
m_t << "<htmlonly>";
}
- filter(s->text());
+ filter(s.text());
m_t << "</htmlonly>";
break;
case DocVerbatim::RtfOnly:
m_t << "<rtfonly>";
- filter(s->text());
+ filter(s.text());
m_t << "</rtfonly>";
break;
case DocVerbatim::ManOnly:
m_t << "<manonly>";
- filter(s->text());
+ filter(s.text());
m_t << "</manonly>";
break;
case DocVerbatim::LatexOnly:
m_t << "<latexonly>";
- filter(s->text());
+ filter(s.text());
m_t << "</latexonly>";
break;
case DocVerbatim::DocbookOnly:
m_t << "<docbookonly>";
- filter(s->text());
+ filter(s.text());
m_t << "</docbookonly>";
break;
case DocVerbatim::XmlOnly:
- m_t << s->text();
+ m_t << s.text();
break;
case DocVerbatim::Dot:
- visitPreStart(m_t, "dot", s->hasCaption(), this, s->children(), QCString(""), FALSE, DocImage::Html, s->width(), s->height());
- filter(s->text());
+ visitPreStart(m_t, "dot", s.hasCaption(), *this, s.children(), QCString(""), FALSE, DocImage::Html, s.width(), s.height());
+ filter(s.text());
visitPostEnd(m_t, "dot");
break;
case DocVerbatim::Msc:
- visitPreStart(m_t, "msc", s->hasCaption(), this, s->children(), QCString(""), FALSE, DocImage::Html, s->width(), s->height());
- filter(s->text());
+ visitPreStart(m_t, "msc", s.hasCaption(), *this, s.children(), QCString(""), FALSE, DocImage::Html, s.width(), s.height());
+ filter(s.text());
visitPostEnd(m_t, "msc");
break;
case DocVerbatim::PlantUML:
- visitPreStart(m_t, "plantuml", s->hasCaption(), this, s->children(), QCString(""), FALSE, DocImage::Html, s->width(), s->height(), s->engine());
- filter(s->text());
+ visitPreStart(m_t, "plantuml", s.hasCaption(), *this, s.children(), QCString(""), FALSE, DocImage::Html, s.width(), s.height(), s.engine());
+ filter(s.text());
visitPostEnd(m_t, "plantuml");
break;
}
}
-void XmlDocVisitor::visit(DocAnchor *anc)
+void XmlDocVisitor::operator()(const DocAnchor &anc)
{
if (m_hide) return;
- m_t << "<anchor id=\"" << anc->file() << "_1" << anc->anchor() << "\"/>";
+ m_t << "<anchor id=\"" << anc.file() << "_1" << anc.anchor() << "\"/>";
}
-void XmlDocVisitor::visit(DocInclude *inc)
+void XmlDocVisitor::operator()(const DocInclude &inc)
{
if (m_hide) return;
- SrcLangExt langExt = getLanguageFromFileName(inc->extension());
- switch(inc->type())
+ SrcLangExt langExt = getLanguageFromFileName(inc.extension());
+ switch(inc.type())
{
case DocInclude::IncWithLines:
{
- m_t << "<programlisting filename=\"" << inc->file() << "\">";
- FileInfo cfi( inc->file().str() );
- FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
- getCodeParser(inc->extension()).parseCode(m_ci,inc->context(),
- inc->text(),
+ m_t << "<programlisting filename=\"" << inc.file() << "\">";
+ FileInfo cfi( inc.file().str() );
+ std::unique_ptr<FileDef> fd { createFileDef( cfi.dirPath(), cfi.fileName() ) };
+ getCodeParser(inc.extension()).parseCode(m_ci,inc.context(),
+ inc.text(),
langExt,
- inc->isExample(),
- inc->exampleFile(),
- fd, // fileDef,
+ inc.isExample(),
+ inc.exampleFile(),
+ fd.get(), // fileDef,
-1, // start line
-1, // end line
FALSE, // inline fragment
0, // memberDef
TRUE // show line numbers
);
- delete fd;
m_t << "</programlisting>";
}
break;
case DocInclude::Include:
- m_t << "<programlisting filename=\"" << inc->file() << "\">";
- getCodeParser(inc->extension()).parseCode(m_ci,inc->context(),
- inc->text(),
+ m_t << "<programlisting filename=\"" << inc.file() << "\">";
+ getCodeParser(inc.extension()).parseCode(m_ci,inc.context(),
+ inc.text(),
langExt,
- inc->isExample(),
- inc->exampleFile(),
+ inc.isExample(),
+ inc.exampleFile(),
0, // fileDef
-1, // startLine
-1, // endLine
case DocInclude::DontIncWithLines:
break;
case DocInclude::HtmlInclude:
- if (inc->isBlock())
+ if (inc.isBlock())
{
m_t << "<htmlonly block=\"yes\">";
}
{
m_t << "<htmlonly>";
}
- filter(inc->text());
+ filter(inc.text());
m_t << "</htmlonly>";
break;
case DocInclude::LatexInclude:
m_t << "<latexonly>";
- filter(inc->text());
+ filter(inc.text());
m_t << "</latexonly>";
break;
case DocInclude::RtfInclude:
m_t << "<rtfonly>";
- filter(inc->text());
+ filter(inc.text());
m_t << "</rtfonly>";
break;
case DocInclude::ManInclude:
m_t << "<manonly>";
- filter(inc->text());
+ filter(inc.text());
m_t << "</manonly>";
break;
case DocInclude::XmlInclude:
- filter(inc->text());
+ filter(inc.text());
break;
case DocInclude::DocbookInclude:
m_t << "<docbookonly>";
- filter(inc->text());
+ filter(inc.text());
m_t << "</docbookonly>";
break;
case DocInclude::VerbInclude:
m_t << "<verbatim>";
- filter(inc->text());
+ filter(inc.text());
m_t << "</verbatim>";
break;
case DocInclude::Snippet:
- m_t << "<programlisting filename=\"" << inc->file() << "\">";
- getCodeParser(inc->extension()).parseCode(m_ci,
- inc->context(),
- extractBlock(inc->text(),inc->blockId()),
+ m_t << "<programlisting filename=\"" << inc.file() << "\">";
+ getCodeParser(inc.extension()).parseCode(m_ci,
+ inc.context(),
+ extractBlock(inc.text(),inc.blockId()),
langExt,
- inc->isExample(),
- inc->exampleFile()
+ inc.isExample(),
+ inc.exampleFile()
);
m_t << "</programlisting>";
break;
case DocInclude::SnipWithLines:
{
- m_t << "<programlisting filename=\"" << inc->file() << "\">";
- FileInfo cfi( inc->file().str() );
- FileDef *fd = createFileDef( cfi.dirPath(), cfi.fileName() );
- getCodeParser(inc->extension()).parseCode(m_ci,
- inc->context(),
- extractBlock(inc->text(),inc->blockId()),
+ m_t << "<programlisting filename=\"" << inc.file() << "\">";
+ FileInfo cfi( inc.file().str() );
+ std::unique_ptr<FileDef> fd { createFileDef( cfi.dirPath(), cfi.fileName() ) };
+ getCodeParser(inc.extension()).parseCode(m_ci,
+ inc.context(),
+ extractBlock(inc.text(),inc.blockId()),
langExt,
- inc->isExample(),
- inc->exampleFile(),
- fd,
- lineBlock(inc->text(),inc->blockId()),
+ inc.isExample(),
+ inc.exampleFile(),
+ fd.get(),
+ lineBlock(inc.text(),inc.blockId()),
-1, // endLine
FALSE, // inlineFragment
0, // memberDef
TRUE // show line number
);
- delete fd;
m_t << "</programlisting>";
}
break;
}
}
-void XmlDocVisitor::visit(DocIncOperator *op)
+void XmlDocVisitor::operator()(const DocIncOperator &op)
{
//printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
- // op->type(),op->isFirst(),op->isLast(),qPrint(op->text()));
- if (op->isFirst())
+ // op.type(),op.isFirst(),op.isLast(),qPrint(op.text()));
+ if (op.isFirst())
{
if (!m_hide)
{
- m_t << "<programlisting filename=\"" << op->includeFileName() << "\">";
+ m_t << "<programlisting filename=\"" << op.includeFileName() << "\">";
}
pushHidden(m_hide);
m_hide = TRUE;
}
- QCString locLangExt = getFileNameExtension(op->includeFileName());
+ QCString locLangExt = getFileNameExtension(op.includeFileName());
if (locLangExt.isEmpty()) locLangExt = m_langExt;
SrcLangExt langExt = getLanguageFromFileName(locLangExt);
- if (op->type()!=DocIncOperator::Skip)
+ if (op.type()!=DocIncOperator::Skip)
{
m_hide = popHidden();
if (!m_hide)
{
- FileDef *fd = 0;
- if (!op->includeFileName().isEmpty())
+ std::unique_ptr<FileDef> fd;
+ if (!op.includeFileName().isEmpty())
{
- FileInfo cfi( op->includeFileName().str() );
- fd = createFileDef( cfi.dirPath(), cfi.fileName() );
+ FileInfo cfi( op.includeFileName().str() );
+ fd.reset(createFileDef( cfi.dirPath(), cfi.fileName() ));
}
- getCodeParser(locLangExt).parseCode(m_ci,op->context(),
- op->text(),langExt,op->isExample(),
- op->exampleFile(),
- fd, // fileDef
- op->line(), // startLine
+ getCodeParser(locLangExt).parseCode(m_ci,op.context(),
+ op.text(),langExt,op.isExample(),
+ op.exampleFile(),
+ fd.get(), // fileDef
+ op.line(), // startLine
-1, // endLine
FALSE, // inline fragment
0, // memberDef
- op->showLineNo() // show line numbers
+ op.showLineNo() // show line numbers
);
- if (fd) delete fd;
}
pushHidden(m_hide);
m_hide=TRUE;
}
- if (op->isLast())
+ if (op.isLast())
{
m_hide = popHidden();
if (!m_hide) m_t << "</programlisting>";
}
}
-void XmlDocVisitor::visit(DocFormula *f)
+void XmlDocVisitor::operator()(const DocFormula &f)
{
if (m_hide) return;
- m_t << "<formula id=\"" << f->id() << "\">";
- filter(f->text());
+ m_t << "<formula id=\"" << f.id() << "\">";
+ filter(f.text());
m_t << "</formula>";
}
-void XmlDocVisitor::visit(DocIndexEntry *ie)
+void XmlDocVisitor::operator()(const DocIndexEntry &ie)
{
if (m_hide) return;
m_t << "<indexentry>"
"<primaryie>";
- filter(ie->entry());
+ filter(ie.entry());
m_t << "</primaryie>"
"<secondaryie></secondaryie>"
"</indexentry>";
}
-void XmlDocVisitor::visit(DocSimpleSectSep *sep)
+void XmlDocVisitor::operator()(const DocSimpleSectSep &sep)
{
- if (sep->parent() && sep->parent()->kind()==DocNode::Kind_SimpleSect)
+ const DocSimpleSect *sect = std::get_if<DocSimpleSect>(sep.parent());
+ if (sect)
{
- visitPost((DocSimpleSect*)sep->parent()); // end current section
- visitPre((DocSimpleSect*)sep->parent()); // start new section
+ endSimpleSect(m_t,*sect);
+ startSimpleSect(m_t,*sect);
}
}
-void XmlDocVisitor::visit(DocCite *cite)
+void XmlDocVisitor::operator()(const DocCite &cite)
{
if (m_hide) return;
- if (!cite->file().isEmpty()) startLink(cite->ref(),cite->file(),cite->anchor());
- filter(cite->text());
- if (!cite->file().isEmpty()) endLink();
+ if (!cite.file().isEmpty()) startLink(cite.ref(),cite.file(),cite.anchor());
+ filter(cite.text());
+ if (!cite.file().isEmpty()) endLink();
}
//--------------------------------------
// visitor functions for compound nodes
//--------------------------------------
-void XmlDocVisitor::visitPre(DocAutoList *l)
+void XmlDocVisitor::operator()(const DocAutoList &l)
{
if (m_hide) return;
- if (l->isEnumList())
+ if (l.isEnumList())
{
m_t << "<orderedlist>\n";
}
{
m_t << "<itemizedlist>\n";
}
-}
-
-void XmlDocVisitor::visitPost(DocAutoList *l)
-{
- if (m_hide) return;
- if (l->isEnumList())
+ visitChildren(l);
+ if (l.isEnumList())
{
m_t << "</orderedlist>\n";
}
}
}
-void XmlDocVisitor::visitPre(DocAutoListItem *)
+void XmlDocVisitor::operator()(const DocAutoListItem &li)
{
if (m_hide) return;
m_t << "<listitem>";
-}
-
-void XmlDocVisitor::visitPost(DocAutoListItem *)
-{
- if (m_hide) return;
+ visitChildren(li);
m_t << "</listitem>";
}
-void XmlDocVisitor::visitPre(DocPara *)
+void XmlDocVisitor::operator()(const DocPara &p)
{
if (m_hide) return;
m_t << "<para>";
-}
-
-void XmlDocVisitor::visitPost(DocPara *)
-{
- if (m_hide) return;
+ visitChildren(p);
m_t << "</para>\n";
}
-void XmlDocVisitor::visitPre(DocRoot *)
+void XmlDocVisitor::operator()(const DocRoot &r)
{
- //m_t << "<hr><h4><font color=\"red\">New parser:</font></h4>\n";
+ visitChildren(r);
}
-void XmlDocVisitor::visitPost(DocRoot *)
-{
- //m_t << "<hr><h4><font color=\"red\">Old parser:</font></h4>\n";
-}
-
-void XmlDocVisitor::visitPre(DocSimpleSect *s)
+void XmlDocVisitor::operator()(const DocSimpleSect &s)
{
if (m_hide) return;
- m_t << "<simplesect kind=\"";
- switch(s->type())
+ startSimpleSect(m_t,s);
+ if (s.title())
{
- case DocSimpleSect::See:
- m_t << "see"; break;
- case DocSimpleSect::Return:
- m_t << "return"; break;
- case DocSimpleSect::Author:
- m_t << "author"; break;
- case DocSimpleSect::Authors:
- m_t << "authors"; break;
- case DocSimpleSect::Version:
- m_t << "version"; break;
- case DocSimpleSect::Since:
- m_t << "since"; break;
- case DocSimpleSect::Date:
- m_t << "date"; break;
- case DocSimpleSect::Note:
- m_t << "note"; break;
- case DocSimpleSect::Warning:
- m_t << "warning"; break;
- case DocSimpleSect::Pre:
- m_t << "pre"; break;
- case DocSimpleSect::Post:
- m_t << "post"; break;
- case DocSimpleSect::Copyright:
- m_t << "copyright"; break;
- case DocSimpleSect::Invar:
- m_t << "invariant"; break;
- case DocSimpleSect::Remark:
- m_t << "remark"; break;
- case DocSimpleSect::Attention:
- m_t << "attention"; break;
- case DocSimpleSect::User:
- m_t << "par"; break;
- case DocSimpleSect::Rcs:
- m_t << "rcs"; break;
- case DocSimpleSect::Unknown: break;
+ std::visit(*this,*s.title());
}
- m_t << "\">";
+ visitChildren(s);
+ endSimpleSect(m_t,s);
}
-void XmlDocVisitor::visitPost(DocSimpleSect *)
-{
- if (m_hide) return;
- m_t << "</simplesect>\n";
-}
-
-void XmlDocVisitor::visitPre(DocTitle *)
+void XmlDocVisitor::operator()(const DocTitle &t)
{
if (m_hide) return;
m_t << "<title>";
-}
-
-void XmlDocVisitor::visitPost(DocTitle *)
-{
- if (m_hide) return;
+ visitChildren(t);
m_t << "</title>";
}
-void XmlDocVisitor::visitPre(DocSimpleList *)
+void XmlDocVisitor::operator()(const DocSimpleList &l)
{
if (m_hide) return;
m_t << "<itemizedlist>\n";
-}
-
-void XmlDocVisitor::visitPost(DocSimpleList *)
-{
- if (m_hide) return;
+ visitChildren(l);
m_t << "</itemizedlist>\n";
}
-void XmlDocVisitor::visitPre(DocSimpleListItem *)
+void XmlDocVisitor::operator()(const DocSimpleListItem &li)
{
if (m_hide) return;
m_t << "<listitem>";
-}
-
-void XmlDocVisitor::visitPost(DocSimpleListItem *)
-{
- if (m_hide) return;
+ if (li.paragraph())
+ {
+ std::visit(*this,*li.paragraph());
+ }
m_t << "</listitem>\n";
}
-void XmlDocVisitor::visitPre(DocSection *s)
+void XmlDocVisitor::operator()(const DocSection &s)
{
if (m_hide) return;
- m_t << "<sect" << s->level() << " id=\"" << s->file();
- if (!s->anchor().isEmpty()) m_t << "_1" << s->anchor();
+ m_t << "<sect" << s.level() << " id=\"" << s.file();
+ if (!s.anchor().isEmpty()) m_t << "_1" << s.anchor();
m_t << "\">\n";
m_t << "<title>";
- filter(convertCharEntitiesToUTF8(s->title()));
+ filter(convertCharEntitiesToUTF8(s.title()));
m_t << "</title>\n";
+ visitChildren(s);
+ m_t << "</sect" << s.level() << ">\n";
}
-void XmlDocVisitor::visitPost(DocSection *s)
-{
- m_t << "</sect" << s->level() << ">\n";
-}
-
-void XmlDocVisitor::visitPre(DocHtmlList *s)
+void XmlDocVisitor::operator()(const DocHtmlList &s)
{
if (m_hide) return;
- if (s->type()==DocHtmlList::Ordered)
+ if (s.type()==DocHtmlList::Ordered)
{
m_t << "<orderedlist";
- for (const auto &opt : s->attribs())
+ for (const auto &opt : s.attribs())
{
m_t << " " << opt.name << "=\"" << opt.value << "\"";
}
m_t << ">\n";
}
else
+ {
m_t << "<itemizedlist>\n";
-}
-
-void XmlDocVisitor::visitPost(DocHtmlList *s)
-{
- if (m_hide) return;
- if (s->type()==DocHtmlList::Ordered)
+ }
+ visitChildren(s);
+ if (s.type()==DocHtmlList::Ordered)
+ {
m_t << "</orderedlist>\n";
+ }
else
+ {
m_t << "</itemizedlist>\n";
+ }
}
-void XmlDocVisitor::visitPre(DocHtmlListItem *l)
+void XmlDocVisitor::operator()(const DocHtmlListItem &l)
{
if (m_hide) return;
m_t << "<listitem";
- for (const auto &opt : l->attribs())
+ for (const auto &opt : l.attribs())
{
if (opt.name=="value")
{
}
}
m_t << ">\n";
-}
-
-void XmlDocVisitor::visitPost(DocHtmlListItem *)
-{
- if (m_hide) return;
+ visitChildren(l);
m_t << "</listitem>\n";
}
-void XmlDocVisitor::visitPre(DocHtmlDescList *)
+void XmlDocVisitor::operator()(const DocHtmlDescList &dl)
{
if (m_hide) return;
m_t << "<variablelist>\n";
-}
-
-void XmlDocVisitor::visitPost(DocHtmlDescList *)
-{
- if (m_hide) return;
+ visitChildren(dl);
m_t << "</variablelist>\n";
}
-void XmlDocVisitor::visitPre(DocHtmlDescTitle *)
+void XmlDocVisitor::operator()(const DocHtmlDescTitle &dt)
{
if (m_hide) return;
m_t << "<varlistentry><term>";
-}
-
-void XmlDocVisitor::visitPost(DocHtmlDescTitle *)
-{
- if (m_hide) return;
+ visitChildren(dt);
m_t << "</term></varlistentry>\n";
}
-void XmlDocVisitor::visitPre(DocHtmlDescData *)
+void XmlDocVisitor::operator()(const DocHtmlDescData &dd)
{
if (m_hide) return;
m_t << "<listitem>";
-}
-
-void XmlDocVisitor::visitPost(DocHtmlDescData *)
-{
- if (m_hide) return;
+ visitChildren(dd);
m_t << "</listitem>\n";
}
-void XmlDocVisitor::visitPre(DocHtmlTable *t)
+void XmlDocVisitor::operator()(const DocHtmlTable &t)
{
if (m_hide) return;
- m_t << "<table rows=\"" << (uint)t->numRows()
- << "\" cols=\"" << (uint)t->numColumns() << "\"" ;
- for (const auto &opt : t->attribs())
+ m_t << "<table rows=\"" << t.numRows()
+ << "\" cols=\"" << t.numColumns() << "\"" ;
+ for (const auto &opt : t.attribs())
{
if (opt.name=="width")
{
}
}
m_t << ">";
- if (t->hasCaption())
+ if (t.caption())
{
- DocHtmlCaption *c = t->caption();
- m_t << "<caption";
- if (!c->file().isEmpty())
- {
- m_t << " id=\"" << stripPath(c->file()) << "_1" << c->anchor() << "\"";
- }
- m_t << ">";
+ std::visit(*this,*t.caption());
}
-}
-
-void XmlDocVisitor::visitPost(DocHtmlTable *)
-{
- if (m_hide) return;
+ visitChildren(t);
m_t << "</table>\n";
}
-void XmlDocVisitor::visitPre(DocHtmlRow *)
+void XmlDocVisitor::operator()(const DocHtmlRow &r)
{
if (m_hide) return;
m_t << "<row>\n";
-}
-
-void XmlDocVisitor::visitPost(DocHtmlRow *)
-{
- if (m_hide) return;
+ visitChildren(r);
m_t << "</row>\n";
}
-void XmlDocVisitor::visitPre(DocHtmlCell *c)
+void XmlDocVisitor::operator()(const DocHtmlCell &c)
{
if (m_hide) return;
- if (c->isHeading()) m_t << "<entry thead=\"yes\""; else m_t << "<entry thead=\"no\"";
- for (const auto &opt : c->attribs())
+ if (c.isHeading()) m_t << "<entry thead=\"yes\""; else m_t << "<entry thead=\"no\"";
+ for (const auto &opt : c.attribs())
{
if (opt.name=="colspan" || opt.name=="rowspan")
{
}
}
m_t << ">";
-}
-
-void XmlDocVisitor::visitPost(DocHtmlCell *)
-{
- if (m_hide) return;
+ visitChildren(c);
m_t << "</entry>";
}
-void XmlDocVisitor::visitPre(DocHtmlCaption *)
-{
- if (m_hide) return;
- // start of caption is handled in the XmlDocVisitor::visitPre(DocHtmlTable *t)
-}
-
-void XmlDocVisitor::visitPost(DocHtmlCaption *)
+void XmlDocVisitor::operator()(const DocHtmlCaption &c)
{
if (m_hide) return;
+ m_t << "<caption";
+ if (!c.file().isEmpty())
+ {
+ m_t << " id=\"" << stripPath(c.file()) << "_1" << c.anchor() << "\"";
+ }
+ m_t << ">";
+ visitChildren(c);
m_t << "</caption>\n";
}
-void XmlDocVisitor::visitPre(DocInternal *)
+void XmlDocVisitor::operator()(const DocInternal &i)
{
if (m_hide) return;
m_t << "<internal>";
-}
-
-void XmlDocVisitor::visitPost(DocInternal *)
-{
- if (m_hide) return;
+ visitChildren(i);
m_t << "</internal>\n";
}
-void XmlDocVisitor::visitPre(DocHRef *href)
-{
- if (m_hide) return;
- m_t << "<ulink url=\"" << convertToXML(href->url(), TRUE) << "\">";
-}
-
-void XmlDocVisitor::visitPost(DocHRef *)
+void XmlDocVisitor::operator()(const DocHRef &href)
{
if (m_hide) return;
+ m_t << "<ulink url=\"" << convertToXML(href.url(), TRUE) << "\">";
+ visitChildren(href);
m_t << "</ulink>";
}
-void XmlDocVisitor::visitPre(DocHtmlHeader *header)
-{
- if (m_hide) return;
- m_t << "<heading level=\"" << header->level() << "\">";
-}
-
-void XmlDocVisitor::visitPost(DocHtmlHeader *)
+void XmlDocVisitor::operator()(const DocHtmlHeader &header)
{
if (m_hide) return;
+ m_t << "<heading level=\"" << header.level() << "\">";
+ visitChildren(header);
m_t << "</heading>\n";
}
-void XmlDocVisitor::visitPre(DocImage *img)
+void XmlDocVisitor::operator()(const DocImage &img)
{
if (m_hide) return;
- QCString url = img->url();
+ QCString url = img.url();
QCString baseName;
if (url.isEmpty())
{
- baseName = img->relPath()+img->name();
+ baseName = img.relPath()+img.name();
}
else
{
- baseName = correctURL(url,img->relPath());
+ baseName = correctURL(url,img.relPath());
}
- HtmlAttribList attribs = img->attribs();
+ HtmlAttribList attribs = img.attribs();
auto it = std::find_if(attribs.begin(),attribs.end(),
[](const auto &att) { return att.name=="alt"; });
QCString altValue = it!=attribs.end() ? it->value : "";
- visitPreStart(m_t, "image", FALSE, this, img->children(), baseName, TRUE,
- img->type(), img->width(), img->height(), QCString(),
- altValue, img->isInlineImage());
+ visitPreStart(m_t, "image", FALSE, *this, img.children(), baseName, TRUE,
+ img.type(), img.width(), img.height(), QCString(),
+ altValue, img.isInlineImage());
// copy the image to the output dir
FileDef *fd;
bool ambig;
- if (url.isEmpty() && (fd=findFileDef(Doxygen::imageNameLinkedMap,img->name(),ambig)))
+ if (url.isEmpty() && (fd=findFileDef(Doxygen::imageNameLinkedMap,img.name(),ambig)))
{
copyFile(fd->absFilePath(),Config_getString(XML_OUTPUT)+"/"+baseName);
}
-}
-
-void XmlDocVisitor::visitPost(DocImage *)
-{
- if (m_hide) return;
+ visitChildren(img);
visitPostEnd(m_t, "image");
}
-void XmlDocVisitor::visitPre(DocDotFile *df)
-{
- if (m_hide) return;
- copyFile(df->file(),Config_getString(XML_OUTPUT)+"/"+stripPath(df->file()));
- visitPreStart(m_t, "dotfile", FALSE, this, df->children(), stripPath(df->file()), FALSE, DocImage::Html, df->width(), df->height());
-}
-
-void XmlDocVisitor::visitPost(DocDotFile *)
+void XmlDocVisitor::operator()(const DocDotFile &df)
{
if (m_hide) return;
+ copyFile(df.file(),Config_getString(XML_OUTPUT)+"/"+stripPath(df.file()));
+ visitPreStart(m_t, "dotfile", FALSE, *this, df.children(), stripPath(df.file()), FALSE, DocImage::Html, df.width(), df.height());
+ visitChildren(df);
visitPostEnd(m_t, "dotfile");
}
-void XmlDocVisitor::visitPre(DocMscFile *df)
-{
- if (m_hide) return;
- copyFile(df->file(),Config_getString(XML_OUTPUT)+"/"+stripPath(df->file()));
- visitPreStart(m_t, "mscfile", FALSE, this, df->children(), stripPath(df->file()), FALSE, DocImage::Html, df->width(), df->height());
-}
-
-void XmlDocVisitor::visitPost(DocMscFile *)
+void XmlDocVisitor::operator()(const DocMscFile &df)
{
if (m_hide) return;
+ copyFile(df.file(),Config_getString(XML_OUTPUT)+"/"+stripPath(df.file()));
+ visitPreStart(m_t, "mscfile", FALSE, *this, df.children(), stripPath(df.file()), FALSE, DocImage::Html, df.width(), df.height());
+ visitChildren(df);
visitPostEnd(m_t, "mscfile");
}
-void XmlDocVisitor::visitPre(DocDiaFile *df)
-{
- if (m_hide) return;
- copyFile(df->file(),Config_getString(XML_OUTPUT)+"/"+stripPath(df->file()));
- visitPreStart(m_t, "diafile", FALSE, this, df->children(), stripPath(df->file()), FALSE, DocImage::Html, df->width(), df->height());
-}
-
-void XmlDocVisitor::visitPost(DocDiaFile *)
+void XmlDocVisitor::operator()(const DocDiaFile &df)
{
if (m_hide) return;
+ copyFile(df.file(),Config_getString(XML_OUTPUT)+"/"+stripPath(df.file()));
+ visitPreStart(m_t, "diafile", FALSE, *this, df.children(), stripPath(df.file()), FALSE, DocImage::Html, df.width(), df.height());
+ visitChildren(df);
visitPostEnd(m_t, "diafile");
}
-void XmlDocVisitor::visitPre(DocLink *lnk)
-{
- if (m_hide) return;
- startLink(lnk->ref(),lnk->file(),lnk->anchor());
-}
-
-void XmlDocVisitor::visitPost(DocLink *)
+void XmlDocVisitor::operator()(const DocLink &lnk)
{
if (m_hide) return;
+ startLink(lnk.ref(),lnk.file(),lnk.anchor());
+ visitChildren(lnk);
endLink();
}
-void XmlDocVisitor::visitPre(DocRef *ref)
+void XmlDocVisitor::operator()(const DocRef &ref)
{
if (m_hide) return;
- if (!ref->file().isEmpty())
+ if (!ref.file().isEmpty())
{
- startLink(ref->ref(),ref->file(),ref->isSubPage() ? QCString() : ref->anchor());
+ startLink(ref.ref(),ref.file(),ref.isSubPage() ? QCString() : ref.anchor());
}
- if (!ref->hasLinkText()) filter(ref->targetTitle());
+ if (!ref.hasLinkText()) filter(ref.targetTitle());
+ visitChildren(ref);
+ if (!ref.file().isEmpty()) endLink();
}
-void XmlDocVisitor::visitPost(DocRef *ref)
+void XmlDocVisitor::operator()(const DocSecRefItem &ref)
{
if (m_hide) return;
- if (!ref->file().isEmpty()) endLink();
- //m_t << " ";
-}
-
-void XmlDocVisitor::visitPre(DocSecRefItem *ref)
-{
- if (m_hide) return;
- m_t << "<tocitem id=\"" << ref->file();
- if (!ref->anchor().isEmpty()) m_t << "_1" << ref->anchor();
+ m_t << "<tocitem id=\"" << ref.file();
+ if (!ref.anchor().isEmpty()) m_t << "_1" << ref.anchor();
m_t << "\"";
m_t << ">";
-}
-
-void XmlDocVisitor::visitPost(DocSecRefItem *)
-{
- if (m_hide) return;
+ visitChildren(ref);
m_t << "</tocitem>\n";
}
-void XmlDocVisitor::visitPre(DocSecRefList *)
+void XmlDocVisitor::operator()(const DocSecRefList &l)
{
if (m_hide) return;
m_t << "<toclist>\n";
-}
-
-void XmlDocVisitor::visitPost(DocSecRefList *)
-{
- if (m_hide) return;
+ visitChildren(l);
m_t << "</toclist>\n";
}
-//void XmlDocVisitor::visitPre(DocLanguage *l)
-//{
-// if (m_hide) return;
-// m_t << "<language langid=\"" << l->id() << "\">";
-//}
-//
-//void XmlDocVisitor::visitPost(DocLanguage *)
-//{
-// if (m_hide) return;
-// m_t << "</language>\n";
-//}
-
-void XmlDocVisitor::visitPre(DocParamSect *s)
+void XmlDocVisitor::operator()(const DocParamSect &s)
{
if (m_hide) return;
m_t << "<parameterlist kind=\"";
- switch(s->type())
+ switch(s.type())
{
case DocParamSect::Param:
m_t << "param"; break;
ASSERT(0);
}
m_t << "\">";
+ visitChildren(s);
+ m_t << "</parameterlist>\n";
}
-void XmlDocVisitor::visitPost(DocParamSect *)
+void XmlDocVisitor::operator()(const DocSeparator &)
{
- if (m_hide) return;
- m_t << "</parameterlist>\n";
+ m_t << "</parametertype>\n";
+ m_t << "<parametertype>";
}
-void XmlDocVisitor::visitPre(DocParamList *pl)
+void XmlDocVisitor::operator()(const DocParamList &pl)
{
if (m_hide) return;
m_t << "<parameteritem>\n";
m_t << "<parameternamelist>\n";
- for (const auto ¶m : pl->parameters())
+ for (const auto ¶m : pl.parameters())
{
- if (!pl->paramTypes().empty())
+ if (!pl.paramTypes().empty())
{
m_t << "<parametertype>";
- for (const auto &type : pl->paramTypes())
+ for (const auto &type : pl.paramTypes())
{
- if (type->kind()==DocNode::Kind_Word)
- {
- visit((DocWord*)type.get());
- }
- else if (type->kind()==DocNode::Kind_LinkedWord)
- {
- visit((DocLinkedWord*)type.get());
- }
- else if (type->kind()==DocNode::Kind_Sep)
- {
- m_t << "</parametertype>\n";
- m_t << "<parametertype>";
- }
+ std::visit(*this,type);
}
m_t << "</parametertype>\n";
}
m_t << "<parametername";
- if (pl->direction()!=DocParamSect::Unspecified)
+ if (pl.direction()!=DocParamSect::Unspecified)
{
m_t << " direction=\"";
- if (pl->direction()==DocParamSect::In)
+ if (pl.direction()==DocParamSect::In)
{
m_t << "in";
}
- else if (pl->direction()==DocParamSect::Out)
+ else if (pl.direction()==DocParamSect::Out)
{
m_t << "out";
}
- else if (pl->direction()==DocParamSect::InOut)
+ else if (pl.direction()==DocParamSect::InOut)
{
m_t << "inout";
}
m_t << "\"";
}
m_t << ">";
- if (param->kind()==DocNode::Kind_Word)
- {
- visit((DocWord*)param.get());
- }
- else if (param->kind()==DocNode::Kind_LinkedWord)
- {
- visit((DocLinkedWord*)param.get());
- }
+ std::visit(*this,param);
m_t << "</parametername>\n";
}
m_t << "</parameternamelist>\n";
m_t << "<parameterdescription>\n";
-}
-
-void XmlDocVisitor::visitPost(DocParamList *)
-{
- if (m_hide) return;
+ for (const auto &par : pl.paragraphs())
+ {
+ std::visit(*this,par);
+ }
m_t << "</parameterdescription>\n";
m_t << "</parameteritem>\n";
}
-void XmlDocVisitor::visitPre(DocXRefItem *x)
+void XmlDocVisitor::operator()(const DocXRefItem &x)
{
if (m_hide) return;
- if (x->title().isEmpty()) return;
+ if (x.title().isEmpty()) return;
m_t << "<xrefsect id=\"";
- m_t << x->file() << "_1" << x->anchor();
+ m_t << x.file() << "_1" << x.anchor();
m_t << "\">";
m_t << "<xreftitle>";
- filter(x->title());
+ filter(x.title());
m_t << "</xreftitle>";
m_t << "<xrefdescription>";
-}
-
-void XmlDocVisitor::visitPost(DocXRefItem *x)
-{
- if (m_hide) return;
- if (x->title().isEmpty()) return;
+ visitChildren(x);
+ if (x.title().isEmpty()) return;
m_t << "</xrefdescription>";
m_t << "</xrefsect>";
}
-void XmlDocVisitor::visitPre(DocInternalRef *ref)
-{
- if (m_hide) return;
- startLink(QCString(),ref->file(),ref->anchor());
-}
-
-void XmlDocVisitor::visitPost(DocInternalRef *)
+void XmlDocVisitor::operator()(const DocInternalRef &ref)
{
if (m_hide) return;
+ startLink(QCString(),ref.file(),ref.anchor());
+ visitChildren(ref);
endLink();
m_t << " ";
}
-void XmlDocVisitor::visitPre(DocText *)
+void XmlDocVisitor::operator()(const DocText &t)
{
+ visitChildren(t);
}
-void XmlDocVisitor::visitPost(DocText *)
-{
-}
-
-void XmlDocVisitor::visitPre(DocHtmlBlockQuote *)
+void XmlDocVisitor::operator()(const DocHtmlBlockQuote &q)
{
if (m_hide) return;
m_t << "<blockquote>";
-}
-
-void XmlDocVisitor::visitPost(DocHtmlBlockQuote *)
-{
- if (m_hide) return;
+ visitChildren(q);
m_t << "</blockquote>";
}
-void XmlDocVisitor::visitPre(DocVhdlFlow *)
+void XmlDocVisitor::operator()(const DocVhdlFlow &)
{
}
-void XmlDocVisitor::visitPost(DocVhdlFlow *)
-{
-}
-
-void XmlDocVisitor::visitPre(DocParBlock *)
+void XmlDocVisitor::operator()(const DocParBlock &pb)
{
if (m_hide) return;
m_t << "<parblock>";
-}
-
-void XmlDocVisitor::visitPost(DocParBlock *)
-{
- if (m_hide) return;
+ visitChildren(pb);
m_t << "</parblock>";
}
#include "qcstring.h"
#include "docvisitor.h"
+#include "docnode.h"
#include "textstream.h"
class CodeOutputInterface;
// visitor functions for leaf nodes
//--------------------------------------
- void visit(DocWord *);
- void visit(DocLinkedWord *);
- void visit(DocWhiteSpace *);
- void visit(DocSymbol *);
- void visit(DocEmoji *);
- void visit(DocURL *);
- void visit(DocLineBreak *);
- void visit(DocHorRuler *);
- void visit(DocStyleChange *);
- void visit(DocVerbatim *);
- void visit(DocAnchor *);
- void visit(DocInclude *);
- void visit(DocIncOperator *);
- void visit(DocFormula *);
- void visit(DocIndexEntry *);
- void visit(DocSimpleSectSep *);
- void visit(DocCite *);
+ void operator()(const DocWord &);
+ void operator()(const DocLinkedWord &);
+ void operator()(const DocWhiteSpace &);
+ void operator()(const DocSymbol &);
+ void operator()(const DocEmoji &);
+ void operator()(const DocURL &);
+ void operator()(const DocLineBreak &);
+ void operator()(const DocHorRuler &);
+ void operator()(const DocStyleChange &);
+ void operator()(const DocVerbatim &);
+ void operator()(const DocAnchor &);
+ void operator()(const DocInclude &);
+ void operator()(const DocIncOperator &);
+ void operator()(const DocFormula &);
+ void operator()(const DocIndexEntry &);
+ void operator()(const DocSimpleSectSep &);
+ void operator()(const DocCite &);
+ void operator()(const DocSeparator &);
//--------------------------------------
// visitor functions for compound nodes
//--------------------------------------
- void visitPre(DocAutoList *);
- void visitPost(DocAutoList *);
- void visitPre(DocAutoListItem *);
- void visitPost(DocAutoListItem *);
- void visitPre(DocPara *) ;
- void visitPost(DocPara *);
- void visitPre(DocRoot *);
- void visitPost(DocRoot *);
- void visitPre(DocSimpleSect *);
- void visitPost(DocSimpleSect *);
- void visitPre(DocTitle *);
- void visitPost(DocTitle *);
- void visitPre(DocSimpleList *);
- void visitPost(DocSimpleList *);
- void visitPre(DocSimpleListItem *);
- void visitPost(DocSimpleListItem *);
- void visitPre(DocSection *);
- void visitPost(DocSection *);
- void visitPre(DocHtmlList *);
- void visitPost(DocHtmlList *) ;
- void visitPre(DocHtmlListItem *);
- void visitPost(DocHtmlListItem *);
- //void visitPre(DocHtmlPre *);
- //void visitPost(DocHtmlPre *);
- void visitPre(DocHtmlDescList *);
- void visitPost(DocHtmlDescList *);
- void visitPre(DocHtmlDescTitle *);
- void visitPost(DocHtmlDescTitle *);
- void visitPre(DocHtmlDescData *);
- void visitPost(DocHtmlDescData *);
- void visitPre(DocHtmlTable *);
- void visitPost(DocHtmlTable *);
- void visitPre(DocHtmlRow *);
- void visitPost(DocHtmlRow *) ;
- void visitPre(DocHtmlCell *);
- void visitPost(DocHtmlCell *);
- void visitPre(DocHtmlCaption *);
- void visitPost(DocHtmlCaption *);
- void visitPre(DocInternal *);
- void visitPost(DocInternal *);
- void visitPre(DocHRef *);
- void visitPost(DocHRef *);
- void visitPre(DocHtmlHeader *);
- void visitPost(DocHtmlHeader *);
- void visitPre(DocImage *);
- void visitPost(DocImage *);
- void visitPre(DocDotFile *);
- void visitPost(DocDotFile *);
-
- void visitPre(DocMscFile *);
- void visitPost(DocMscFile *);
- void visitPre(DocDiaFile *);
- void visitPost(DocDiaFile *);
- void visitPre(DocLink *);
- void visitPost(DocLink *);
- void visitPre(DocRef *);
- void visitPost(DocRef *);
- void visitPre(DocSecRefItem *);
- void visitPost(DocSecRefItem *);
- void visitPre(DocSecRefList *);
- void visitPost(DocSecRefList *);
- //void visitPre(DocLanguage *);
- //void visitPost(DocLanguage *);
- void visitPre(DocParamSect *);
- void visitPost(DocParamSect *);
- void visitPre(DocParamList *);
- void visitPost(DocParamList *);
- void visitPre(DocXRefItem *);
- void visitPost(DocXRefItem *);
- void visitPre(DocInternalRef *);
- void visitPost(DocInternalRef *);
- void visitPre(DocText *);
- void visitPost(DocText *);
- void visitPre(DocHtmlBlockQuote *);
- void visitPost(DocHtmlBlockQuote *);
- void visitPre(DocVhdlFlow *);
- void visitPost(DocVhdlFlow *);
- void visitPre(DocParBlock *);
- void visitPost(DocParBlock *);
+ void operator()(const DocAutoList &);
+ void operator()(const DocAutoListItem &);
+ void operator()(const DocPara &) ;
+ void operator()(const DocRoot &);
+ void operator()(const DocSimpleSect &);
+ void operator()(const DocTitle &);
+ void operator()(const DocSimpleList &);
+ void operator()(const DocSimpleListItem &);
+ void operator()(const DocSection &);
+ void operator()(const DocHtmlList &);
+ void operator()(const DocHtmlListItem &);
+ void operator()(const DocHtmlDescList &);
+ void operator()(const DocHtmlDescTitle &);
+ void operator()(const DocHtmlDescData &);
+ void operator()(const DocHtmlTable &);
+ void operator()(const DocHtmlRow &);
+ void operator()(const DocHtmlCell &);
+ void operator()(const DocHtmlCaption &);
+ void operator()(const DocInternal &);
+ void operator()(const DocHRef &);
+ void operator()(const DocHtmlHeader &);
+ void operator()(const DocImage &);
+ void operator()(const DocDotFile &);
+ void operator()(const DocMscFile &);
+ void operator()(const DocDiaFile &);
+ void operator()(const DocLink &);
+ void operator()(const DocRef &);
+ void operator()(const DocSecRefItem &);
+ void operator()(const DocSecRefList &);
+ void operator()(const DocParamSect &);
+ void operator()(const DocParamList &);
+ void operator()(const DocXRefItem &);
+ void operator()(const DocInternalRef &);
+ void operator()(const DocText &);
+ void operator()(const DocHtmlBlockQuote &);
+ void operator()(const DocVhdlFlow &);
+ void operator()(const DocParBlock &);
private:
+ template<class T>
+ void visitChildren(const T &t)
+ {
+ for (const auto &child : t.children())
+ {
+ std::visit(*this, child);
+ }
+ }
//--------------------------------------
// helper functions
{
case '\t':
{
- static int tabSize = Config_getInt(TAB_SIZE);
+ int tabSize = Config_getInt(TAB_SIZE);
int spacesToNextTabStop = tabSize - (col%tabSize);
col+=spacesToNextTabStop;
while (spacesToNextTabStop--) t << "<sp/>";
if (!compId.isEmpty())
{
m_refId=compId;
- if (!anchorId.isEmpty()) m_refId+=(QCString)"_1"+anchorId;
+ if (!anchorId.isEmpty()) m_refId+=QCString("_1")+anchorId;
m_isMemberRef = anchorId!=0;
if (!extRef.isEmpty()) m_external=extRef;
}
QCString stext = text.stripWhiteSpace();
if (stext.isEmpty()) return;
// convert the documentation string into an abstract syntax tree
- std::unique_ptr<IDocParser> parser { createDocParser() };
- std::unique_ptr<DocNode> root { validatingParseDoc(*parser.get(),
- fileName,lineNr,scope,md,text,FALSE,FALSE,
- QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
- // create a code generator
- auto xmlCodeGen = std::make_unique<XMLCodeGenerator>(t);
- // create a parse tree visitor for XML
- auto visitor = std::make_unique<XmlDocVisitor>(t,*xmlCodeGen,scope?scope->getDefFileExtension():QCString(""));
- // visit all nodes
- root->accept(visitor.get());
- // clean up
+ auto parser { createDocParser() };
+ auto ast { validatingParseDoc(*parser.get(),
+ fileName,lineNr,scope,md,text,FALSE,FALSE,
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
+ auto astImpl = dynamic_cast<const DocNodeAST*>(ast.get());
+ if (astImpl)
+ {
+ // create a code generator
+ auto xmlCodeGen = std::make_unique<XMLCodeGenerator>(t);
+ // create a parse tree visitor for XML
+ XmlDocVisitor visitor(t,*xmlCodeGen,scope?scope->getDefFileExtension():QCString(""));
+ // visit all nodes
+ std::visit(visitor,astImpl->root);
+ // clean up
+ }
}
void writeXMLCodeBlock(TextStream &t,FileDef *fd)
static QCString classOutputFileBase(const ClassDef *cd)
{
- //static bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
+ //bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
//if (inlineGroupedClasses && cd->partOfGroups()!=0)
return cd->getOutputFileBase();
//else
static QCString memberOutputFileBase(const MemberDef *md)
{
- //static bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
+ //bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
//if (inlineGroupedClasses && md->getClassDef() && md->getClassDef()->partOfGroups()!=0)
// return md->getClassDef()->getXmlOutputFileBase();
//else
QCString pageName = pd->getOutputFileBase();
if (pd->getGroupDef())
{
- pageName+=(QCString)"_"+pd->name();
+ pageName+=QCString("_")+pd->name();
}
if (pageName=="index") pageName="indexpage"; // to prevent overwriting the generated index page.
QCString title;
if (mainPageHasTitle())
{
- title = filterTitle(convertCharEntitiesToUTF8(Doxygen::mainPage->title()).str());
+ title = filterTitle(convertCharEntitiesToUTF8(Doxygen::mainPage->title()));
}
else
{
const SectionInfo *si = SectionManager::instance().find(pd->name());
if (si)
{
- t << " <title>" << convertToXML(filterTitle(convertCharEntitiesToUTF8(si->title()).str()))
+ t << " <title>" << convertToXML(filterTitle(convertCharEntitiesToUTF8(si->title())))
<< "</title>\n";
}
}
if (isSection(si->type()))
{
//printf(" level=%d title=%s\n",level,qPrint(si->title));
- int nextLevel = (int)si->type();
+ int nextLevel = static_cast<int>(si->type());
if (nextLevel>level)
{
for (l=level;l<nextLevel;l++)
void writeCodeAnchor(const QCString &) override;
void writeLineNumber(const QCString &extRef,const QCString &compId,
const QCString &anchorId,int l,bool writeLineAnchor) override;
- void setCurrentDoc(const Definition *,const QCString &,bool) override {}
- void addWord(const QCString &,bool) override {}
void startCodeFragment(const QCString &) override;
void endCodeFragment(const QCString &) override;
</tab>
<tab type="interfaces" visible="yes" title="">
<tab type="interfacelist" visible="yes" title="" intro=""/>
- <tab type="interfaceindex" visible="$ALPHABETICAL_INDEX" title=""/>
+ <tab type="interfaceindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="interfacehierarchy" visible="yes" title="" intro=""/>
</tab>
<tab type="classes" visible="yes" title="">
<tab type="classlist" visible="yes" title="" intro=""/>
- <tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
+ <tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="hierarchy" visible="yes" title="" intro=""/>
<tab type="classmembers" visible="yes" title="" intro=""/>
</tab>
<tab type="structs" visible="yes" title="">
<tab type="structlist" visible="yes" title="" intro=""/>
- <tab type="structindex" visible="$ALPHABETICAL_INDEX" title=""/>
+ <tab type="structindex" visible="$ALPHABETICAL_INDEX" title=""/>
</tab>
<tab type="exceptions" visible="yes" title="">
<tab type="exceptionlist" visible="yes" title="" intro=""/>
- <tab type="exceptionindex" visible="$ALPHABETICAL_INDEX" title=""/>
+ <tab type="exceptionindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="exceptionhierarchy" visible="yes" title="" intro=""/>
</tab>
<tab type="files" visible="yes" title="">
<tab type="filelist" visible="yes" title="" intro=""/>
<tab type="globals" visible="yes" title="" intro=""/>
</tab>
- <tab type="examples" visible="yes" title="" intro=""/>
+ <tab type="examples" visible="yes" title="" intro=""/>
</navindex>
<!-- Layout definition for a class page -->
margin-left: 0;
}
-code.JavaDocCode
+code.JavaDocCode {
direction:ltr;
}
ignoreHtmlClass: 'tex2jax_ignore',
processHtmlClass: 'tex2jax_process'
},
+{% if config.MATHJAX_EXTENSIONS %}
+ loader: {
+ load: [{% for ext in config.MATHJAX_EXTENSIONS %},'{{ ext }}'{% endfor %}]
+ },
+{% endif %}{# MATHJAX_EXTENSIONS #}
tex: {
{% if doxygen.mathJaxMacros %}
macros: { {{ doxygen.mathJaxMacros|raw }} },
if ('children' in data) {
result+='<ul>';
for (var i in data.children) {
- result+='<li><a href="'+relPath+data.children[i].url+'">'+
+ var url;
+ var link;
+ link = data.children[i].url;
+ if (link.substring(0,1)=='^') {
+ url = link.substring(1);
+ } else {
+ url = relPath+link;
+ }
+ result+='<li><a href="'+url+'">'+
data.children[i].text+'</a>'+
makeTree(data.children[i],relPath)+'</li>';
}
{
srLink.setAttribute('target','_parent');
}
+ else
+ {
+ srLink.setAttribute('target','_blank');
+ }
var srScope = document.createElement('span');
setClassAttr(srScope,'SRScope');
srScope.innerHTML = searchData[e][1][1][2];
{
srChild.setAttribute('target','_parent');
}
+ else
+ {
+ srChild.setAttribute('target','_blank');
+ }
srChild.innerHTML = searchData[e][1][c+1][2];
srChildren.appendChild(srChild);
}
% Used by @verbatim ... @endverbatim
\newenvironment{DoxyVerb}{%
+ \par%
\footnotesize%
\verbatim%
}{%
\end{DoxyDesc}%
}
-% Used by @internal
-\newenvironment{DoxyInternal}[1]{%
- \paragraph*{#1}%
-}{%
-}
-
% Used by @par and @paragraph
\newenvironment{DoxyParagraph}[1]{%
\begin{DoxyDesc}{#1}%
linkcolor=blue,%
citecolor=blue,%
unicode,%
- pdftitle=$projectname,%
- pdfsubject=$projectbrief%
+ pdftitle={$projectname},%
+ pdfsubject={$projectbrief}%
}
%%END PDF_HYPERLINKS
<xsd:complexType name="docImageFileType" mixed="true">
<xsd:group ref="docTitleCmdGroup" minOccurs="0" maxOccurs="unbounded" />
- <xsd:attribute name="name" type="xsd:string" use="optional"/>
+ <xsd:attribute name="name" type="xsd:string" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>The mentioned file will be located in the directory as specified by XML_OUTPUT</xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
<xsd:attribute name="width" type="xsd:string" use="optional"/>
<xsd:attribute name="height" type="xsd:string" use="optional"/>
</xsd:complexType>
<briefdescription>
</briefdescription>
<detaileddescription>
- <para>Here are some formulas:<orderedlist><listitem><para>The distance between <formula id="0">$(x_1,y_1)$</formula> and <formula id="1">$(x_2,y_2)$</formula> is <formula id="2">$\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}$</formula>.</para></listitem><listitem><para>Unnumbered formula: <formula id="3">\[ |I_2|=\left| \int_{0}^T \psi(t) \left\{ u(a,t)- \int_{\gamma(t)}^a \frac{d\theta}{k(\theta,t)} \int_{a}^\theta c(\xi)u_t(\xi,t)\,d\xi \right\} dt \right| \]</formula></para></listitem><listitem><para>Formula in different environment <formula id="4">\begin{eqnarray*} g &=& \frac{Gm_2}{r^2} \\ &=& \frac{(6.673 \times 10^{-11}\,\mbox{m}^3\,\mbox{kg}^{-1}\, \mbox{s}^{-2})(5.9736 \times 10^{24}\,\mbox{kg})}{(6371.01\,\mbox{km})^2} \\ &=& 9.82066032\,\mbox{m/s}^2 \end{eqnarray*}</formula> </para></listitem></orderedlist>
+ <para>Here are some formulas:<orderedlist><listitem><para>The distance between <formula id="0">$(x_1,y_1)$</formula> and <formula id="1">$(x_2,y_2)$</formula> is <formula id="2">$\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}$</formula>.</para></listitem><listitem><para>Unnumbered formula: <formula id="3">\[ |I_2|=\left| \int_{0}^T \psi(t) \left\{ u(a,t)- \int_{\gamma(t)}^a
+ \frac{d\theta}{k(\theta,t)} \int_{a}^\theta c(\xi)u_t(\xi,t)\,d\xi \right\} dt \right| \]</formula></para></listitem><listitem><para>Formula in different environment <formula id="4">\begin{eqnarray*} g &=& \frac{Gm_2}{r^2} \\
+ &=& \frac{(6.673 \times 10^{-11}\,\mbox{m}^3\,\mbox{kg}^{-1}\,
+ \mbox{s}^{-2})(5.9736 \times 10^{24}\,\mbox{kg})}{(6371.01\,\mbox{km})^2} \\
+ &=& 9.82066032\,\mbox{m/s}^2
+ \end{eqnarray*}</formula> </para></listitem></orderedlist>
</para>
</detaileddescription>
<location file="028_formula.c"/>
U+0398 ISOgrk3 -->
<!ENTITY Iota "Ι"> <!-- greek capital letter iota, U+0399 -->
<!ENTITY Kappa "Κ"> <!-- greek capital letter kappa, U+039A -->
-<!ENTITY Lambda "Λ"> <!-- greek capital letter lamda,
+<!ENTITY Lambda "Λ"> <!-- greek capital letter lambda,
U+039B ISOgrk3 -->
<!ENTITY Mu "Μ"> <!-- greek capital letter mu, U+039C -->
<!ENTITY Nu "Ν"> <!-- greek capital letter nu, U+039D -->
<!ENTITY iota "ι"> <!-- greek small letter iota, U+03B9 ISOgrk3 -->
<!ENTITY kappa "κ"> <!-- greek small letter kappa,
U+03BA ISOgrk3 -->
-<!ENTITY lambda "λ"> <!-- greek small letter lamda,
+<!ENTITY lambda "λ"> <!-- greek small letter lambda,
U+03BB ISOgrk3 -->
<!ENTITY mu "μ"> <!-- greek small letter mu, U+03BC ISOgrk3 -->
<!ENTITY nu "ν"> <!-- greek small letter nu, U+03BD ISOgrk3 -->
print('DOCBOOK_OUTPUT=%s/docbook' % self.test_out, file=f)
else:
print('GENERATE_DOCBOOK=NO', file=f)
- if (self.args.xhtml):
+ if (self.args.qhp):
+ print('GENERATE_QHP=YES', file=f)
+ if (self.args.xhtml or self.args.qhp):
print('GENERATE_HTML=YES', file=f)
# HTML_OUTPUT can also have been set locally
print('HTML_OUTPUT=%s/html' % self.test_out, file=f)
failed_xml=False
failed_html=False
+ failed_qhp=False
failed_latex=False
failed_docbook=False
failed_rtf=False
elif not self.args.keep:
shutil.rmtree(docbook_output,ignore_errors=True)
- if (self.args.xhtml):
+ if (self.args.xhtml or self.args.qhp):
html_output='%s/html' % self.test_out
if (sys.platform == 'win32'):
redirx=' 2> %s/temp >nul:'%html_output
xmllint_out = self.cleanup_xmllint(xmllint_out)
if xmllint_out:
xmllint_out = clean_header(xmllint_out)
- if xmllint_out:
- msg += (xmllint_out,)
- failed_html=True
- elif not self.args.keep:
+ if xmllint_out:
+ msg += (xmllint_out,)
+ failed_html=True
+
+ failed_qhp=False
+ if not failed_html and self.args.qhp:
+ check_file = "%s/index.qhp"%(html_output)
+ exe_string = '%s --noout %s' % (self.args.xmllint,check_file)
+ exe_string1 = exe_string
+ exe_string += ' %s' % (redirx)
+ exe_string += ' %s more "%s/temp"' % (separ,html_output)
+ xmllint_out = xpopen(exe_string,exe_string1,getStderr=True)
+ xmllint_out = self.cleanup_xmllint(xmllint_out)
+ if xmllint_out:
+ msg += (xmllint_out,)
+ failed_qhp=True
+ if not failed_html and not failed_qhp and not self.args.keep:
shutil.rmtree(html_output,ignore_errors=True)
if (self.args.pdf):
failed_latex=False
if failed_warn:
msg += (warnings,)
- if failed_warn or failed_xml or failed_html or failed_latex or failed_docbook or failed_rtf or failed_xmlxsd:
+ if failed_warn or failed_xml or failed_html or failed_qhp or failed_latex or failed_docbook or failed_rtf or failed_xmlxsd:
testmgr.ok(False,self.test_name,msg)
return False
self.num_tests = len(tests)
self.count=1
self.passed=0
- if self.args.xhtml:
+ if (self.args.xhtml or self.args.qhp):
self.prepare_dtd()
print('1..%d' % self.num_tests)
passed = p.map(do_generation_work, dl)
self.passed = sum(passed)
res=self.result()
- if self.args.xhtml and self.args.inputdir!='.' and not res and not self.args.keep:
+ if (self.args.xhtml or self.args.qhp) and self.args.inputdir!='.' and not res and not self.args.keep:
shutil.rmtree("dtd",ignore_errors=True)
return 0 if self.args.updateref else res
'create docbook output and check with xmllint',action="store_true")
parser.add_argument('--xhtml',help=
'create xhtml output and check with xmllint',action="store_true")
+ parser.add_argument('--qhp',help=
+ 'create qhp output and check with xmllint',action="store_true")
parser.add_argument('--xmlxsd',help=
'create xml output and check with xmllint against xsd',action="store_true")
parser.add_argument('--pdf',help='create LaTeX output and create pdf from it',
args = parser.parse_args(test_flags + sys.argv[1:])
# sanity check
- if (not args.xml) and (not args.pdf) and (not args.xhtml) and (not args.docbook and (not args.rtf) and (not args.xmlxsd)):
+ if (not args.xml) and (not args.pdf) and (not args.xhtml) and (not args.qhp) and (not args.docbook and (not args.rtf) and (not args.xmlxsd)):
args.xml=True
if (not args.updateref is None) and (args.ids is None) and (args.all is None):
parser.error('--updateref requires either --id or --all')
find_package(Javacc)
if (JAVACC_FOUND)
- if (JAVACC_VERSION VERSION_LESS 7.0.5)
- message(STATUS " Doxygen requires at least JavaCC version 7.0.5 (installed: ${JAVACC_VERSION})")
+ if (JAVACC_VERSION VERSION_LESS 7.0.6)
+ message(STATUS " Doxygen requires at least JavaCC version 7.0.6 (installed: ${JAVACC_VERSION})")
message(STATUS " Fall back to JavaCC not installed, using existing files.")
else()
-
- add_custom_command(
- COMMAND ${JAVACC_EXECUTABLE} ${JAVACC_FLAGS} -OUTPUT_DIRECTORY=${PROJECT_SOURCE_DIR}/vhdlparser ${PROJECT_SOURCE_DIR}/vhdlparser/vhdlparser.jj
- DEPENDS ${PROJECT_SOURCE_DIR}/vhdlparser/vhdlparser.jj
- OUTPUT ${PROJECT_SOURCE_DIR}/vhdlparser/CharStream.cc ${PROJECT_SOURCE_DIR}/vhdlparser/CharStream.h ${PROJECT_SOURCE_DIR}/vhdlparser/ErrorHandler.h ${PROJECT_SOURCE_DIR}/vhdlparser/ParseException.cc ${PROJECT_SOURCE_DIR}/vhdlparser/ParseException.h ${PROJECT_SOURCE_DIR}/vhdlparser/Token.cc ${PROJECT_SOURCE_DIR}/vhdlparser/Token.h ${PROJECT_SOURCE_DIR}/vhdlparser/TokenManager.h ${PROJECT_SOURCE_DIR}/vhdlparser/TokenMgrError.cc ${PROJECT_SOURCE_DIR}/vhdlparser/TokenMgrError.h ${PROJECT_SOURCE_DIR}/vhdlparser/VhdlParser.cc ${PROJECT_SOURCE_DIR}/vhdlparser/VhdlParser.h ${PROJECT_SOURCE_DIR}/vhdlparser/VhdlParserConstants.h ${PROJECT_SOURCE_DIR}/vhdlparser/VhdlParserTokenManager.cc ${PROJECT_SOURCE_DIR}/vhdlparser/VhdlParserTokenManager.h
- )
-
+ add_custom_command(
+ COMMAND ${JAVACC_EXECUTABLE} ${JAVACC_FLAGS} -OUTPUT_DIRECTORY=${PROJECT_SOURCE_DIR}/vhdlparser ${PROJECT_SOURCE_DIR}/vhdlparser/vhdlparser.jj
+ DEPENDS ${PROJECT_SOURCE_DIR}/vhdlparser/vhdlparser.jj
+ OUTPUT ${PROJECT_SOURCE_DIR}/vhdlparser/CharStream.cc ${PROJECT_SOURCE_DIR}/vhdlparser/CharStream.h ${PROJECT_SOURCE_DIR}/vhdlparser/ErrorHandler.h ${PROJECT_SOURCE_DIR}/vhdlparser/ParseException.cc ${PROJECT_SOURCE_DIR}/vhdlparser/ParseException.h ${PROJECT_SOURCE_DIR}/vhdlparser/Token.cc ${PROJECT_SOURCE_DIR}/vhdlparser/Token.h ${PROJECT_SOURCE_DIR}/vhdlparser/TokenManager.h ${PROJECT_SOURCE_DIR}/vhdlparser/TokenMgrError.cc ${PROJECT_SOURCE_DIR}/vhdlparser/TokenMgrError.h ${PROJECT_SOURCE_DIR}/vhdlparser/VhdlParser.cc ${PROJECT_SOURCE_DIR}/vhdlparser/VhdlParser.h ${PROJECT_SOURCE_DIR}/vhdlparser/VhdlParserConstants.h ${PROJECT_SOURCE_DIR}/vhdlparser/VhdlParserTokenManager.cc ${PROJECT_SOURCE_DIR}/vhdlparser/VhdlParserTokenManager.h
+ )
endif()
endif()
* Backs up the input stream by amount steps. Lexer calls this method if it
* had already read some characters, but could not use them to match a
* (longer) token. So, they will be used again as the prefix of the next
- * token and it is the implemetation's responsibility to do this right.
+ * token and it is the implementation's responsibility to do this right.
*/
virtual inline void backup(int amount) {
inBuf += amount;
}
#endif
-/* JavaCC - OriginalChecksum=c5b4b2e72393f865547f405cc9def169 (do not edit this line) */
+/* JavaCC - OriginalChecksum=bad90284b44db6b5391a68c8a6a7b893 (do not edit this line) */
// Called when the parser cannot continue parsing.
// last - the last token successfully parsed.
// unexpected - the token at which the error occurs.
- // production - the production in which this error occurrs.
+ // production - the production in which this error occurs.
virtual void handleParseError(Token *last, Token *unexpected, const JJSimpleString& production, VhdlParser *parser) {
error_count++;
fprintf(stderr, "Encountered: %s at: %d:%d while parsing: %s\n", addUnicodeEscapes(unexpected->image).c_str(), unexpected->beginLine, unexpected->beginColumn, production.c_str());
#endif
-/* JavaCC - OriginalChecksum=5361b31ac6530c6c23511012deb15394 (do not edit this line) */
+/* JavaCC - OriginalChecksum=606dd7f8d67c1d0f99424d91ac3656c0 (do not edit this line) */
/**
* This is the last token that has been consumed successfully. If
* this object has been created due to a parse error, the token
- * followng this token will (therefore) be the first error token.
+ * following this token will (therefore) be the first error token.
*/
Token currentToken;
* of integers represents a sequence of tokens (by their ordinal
* values) that is expected at this point of the parse.
*/
- int** expectedTokenSequences;
+ int** expectedTokenSequences = 0;
/**
* This is a reference to the "tokenImage" array of the generated
* parser within which the parse error occurred. This array is
* defined in the generated ...Constants class.
*/
- JJString* tokenImage;
+ JJString* tokenImage = 0;
/**
* It uses "currentToken" and "expectedTokenSequences" to generate a parse
}
}
-/* JavaCC - OriginalChecksum=7a72405661a136830ccf7f3cab0fffdc (do not edit this line) */
+/* JavaCC - OriginalChecksum=bb2d200bbdb84c3b7aff4c7f96769833 (do not edit this line) */
/**
* This is the last token that has been consumed successfully. If
* this object has been created due to a parse error, the token
- * followng this token will (therefore) be the first error token.
+ * following this token will (therefore) be the first error token.
*/
Token currentToken;
* of integers represents a sequence of tokens (by their ordinal
* values) that is expected at this point of the parse.
*/
- int** expectedTokenSequences;
+ int** expectedTokenSequences = 0;
/**
* This is a reference to the "tokenImage" array of the generated
* parser within which the parse error occurred. This array is
* defined in the generated ...Constants class.
*/
- JJString* tokenImage;
+ JJString* tokenImage = 0;
/**
* It uses "currentToken" and "expectedTokenSequences" to generate a parse
}
#endif
-/* JavaCC - OriginalChecksum=6705523c0ea4e83f3c38da57253c0aea (do not edit this line) */
+/* JavaCC - OriginalChecksum=15877456661be7c62e39a97606c3e899 (do not edit this line) */
/* Generated By:JavaCC: Do not edit this line. Token.cc Version 7.0 */
-/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true,TOKEN_INCLUDES=,TOKEN_EXTENDS= */
+/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true,TOKEN_INCLUDE=,TOKEN_SUPER_CLASS=null */
#include "Token.h"
namespace vhdl {
}
}
-/* JavaCC - OriginalChecksum=01131f3b3906a670aa8fee6224233701 (do not edit this line) */
+/* JavaCC - OriginalChecksum=eec3c6b21c8327ed635f08354be227d8 (do not edit this line) */
/* Generated By:JavaCC: Do not edit this line. Token.h Version 7.0 */
-/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true,TOKEN_INCLUDES=,TOKEN_EXTENDS= */
+/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true,TOKEN_INCLUDE=,TOKEN_SUPER_CLASS=null */
#ifndef JAVACC_TOKEN_H
#define JAVACC_TOKEN_H
* system is determined by JavaCCParser, and a table of these numbers is
* stored in the file ...Constants.java.
*/
- int kind;
+ int kind = 0;
/** The line number of the first character of this Token. */
- int beginLine;
+ int beginLine = 0;
/** The column number of the first character of this Token. */
- int beginColumn;
+ int beginColumn = 0;
/** The line number of the last character of this Token. */
- int endLine;
+ int endLine = 0;
/** The column number of the last character of this Token. */
- int endColumn;
+ int endColumn = 0;
/**
* The string image of the token.
* token. Otherwise, see below for a description of the contents of
* this field.
*/
- Token *next;
+ Token *next = 0;
/**
* This field is used to access special tokens that occur prior to this
* immediately follow it (without an intervening regular token). If there
* is no such token, this field is NULL.
*/
- Token *specialToken;
+ Token *specialToken = 0;
/**
* An optional attribute value of the Token.
}
#endif
-/* JavaCC - OriginalChecksum=8c237423e3d9695c3bfcf539bcf92375 (do not edit this line) */
+/* JavaCC - OriginalChecksum=9655bc4f00696eb7da69bb6a412e2c51 (do not edit this line) */
class TokenManager {
public:
+ virtual ~TokenManager() { }
/** This gets the next token from the input stream.
- * A token of kind 0 (<EOF>) should be returned on EOF.
+ * A token of kind 0 (`<EOF>`) should be returned on EOF.
*/
- virtual ~TokenManager() { }
virtual Token *getNextToken() = 0;
virtual void setParser(void* parser) {};
virtual void lexicalError() {
}
#endif
-/* JavaCC - OriginalChecksum=c5e389e7ee25f48da34e517ae429ac2a (do not edit this line) */
+/* JavaCC - OriginalChecksum=ca665ddedf5f5b0cb69e76d90eb70fe0 (do not edit this line) */
// i < 16 - guaranteed
char hexChar(int i) {
if (i < 10) {
- return i - '0';
+ return i + '0';
}
return 'a' + (i - 10);
}
}
}
-/* JavaCC - OriginalChecksum=ed66d80b94c73435ce2644e44f7b4d49 (do not edit this line) */
+/* JavaCC - OriginalChecksum=a1a009b68896ee1d7f7d1528d80d284b (do not edit this line) */
* Indicates the reason why the exception is thrown. It will have
* one of the above 4 values.
*/
- int errorCode;
+ int errorCode = -1;
/**
* Returns a detailed message for the Error when it is thrown by the
}
#endif
-/* JavaCC - OriginalChecksum=4ab4cdcdef6a3feec22fd9c00ba86e07 (do not edit this line) */
+/* JavaCC - OriginalChecksum=1d70bcaf73c58a19d4427d29908696e5 (do not edit this line) */
{ jj_save(124, xla); }
}
- inline bool jj_3R_207()
+ inline bool jj_3R_interface_variable_declaration_1485_49_207()
{
if (jj_done) return true;
if (jj_scan_token(VARASSIGN_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
return false;
}
- inline bool jj_3R_461()
+ inline bool jj_3R_iteration_scheme_1526_3_461()
{
if (jj_done) return true;
if (jj_scan_token(FOR_T)) return true;
- if (jj_3R_543()) return true;
+ if (jj_3R_parameter_specification_1833_1_543()) return true;
return false;
}
- inline bool jj_3R_206()
+ inline bool jj_3R_interface_variable_declaration_1484_37_206()
{
if (jj_done) return true;
- if (jj_3R_363()) return true;
+ if (jj_3R_mode_1615_1_363()) return true;
return false;
}
- inline bool jj_3R_383()
+ inline bool jj_3R_iteration_scheme_1519_1_383()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_460()) return false;
+ if (jj_3R_iteration_scheme_1519_1_460()) {
jj_scanpos = xsp;
- if (jj_3R_461()) return true;
+ if (jj_3R_iteration_scheme_1526_3_461()) return true;
+ }
return false;
}
- inline bool jj_3R_460()
+ inline bool jj_3R_iteration_scheme_1519_1_460()
{
if (jj_done) return true;
if (jj_scan_token(WHILE_T)) return true;
- if (jj_3R_83()) return true;
+ if (jj_3R_condition_809_3_83()) return true;
return false;
}
- inline bool jj_3R_415()
+ inline bool jj_3R_interface_list_1476_26_415()
{
if (jj_done) return true;
if (jj_scan_token(SEMI_T)) return true;
- if (jj_3R_414()) return true;
+ if (jj_3R_interface_element_1462_3_414()) return true;
return false;
}
- inline bool jj_3R_424()
+ inline bool jj_3R_instantiation_unit_1413_86_424()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_204()
+ inline bool jj_3R_interface_variable_declaration_1483_3_204()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_scan_token(116)) return false;
+ if (jj_scan_token(116)) {
jj_scanpos = xsp;
- if (!jj_scan_token(100)) return false;
+ if (jj_scan_token(100)) {
jj_scanpos = xsp;
- if (!jj_scan_token(31)) return false;
+ if (jj_scan_token(31)) {
jj_scanpos = xsp;
if (jj_scan_token(101)) return true;
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_96()
+ inline bool jj_3R_interface_variable_declaration_1483_1_96()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_204()) jj_scanpos = xsp;
- if (jj_3R_205()) return true;
+ if (jj_3R_interface_variable_declaration_1483_3_204()) jj_scanpos = xsp;
+ if (jj_3R_identifier_list_1354_4_205()) return true;
if (jj_scan_token(COLON_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_206()) jj_scanpos = xsp;
- if (jj_3R_89()) return true;
+ if (jj_3R_interface_variable_declaration_1484_37_206()) jj_scanpos = xsp;
+ if (jj_3R_subtype_indication_2398_3_89()) return true;
xsp = jj_scanpos;
if (jj_scan_token(27)) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_207()) jj_scanpos = xsp;
+ if (jj_3R_interface_variable_declaration_1485_49_207()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_327()
+ inline bool jj_3R_interface_list_1476_3_327()
{
if (jj_done) return true;
- if (jj_3R_414()) return true;
+ if (jj_3R_interface_element_1462_3_414()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_415()) { jj_scanpos = xsp; break; }
+ if (jj_3R_interface_list_1476_26_415()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_693()
+ inline bool jj_3R_ifunc_2910_98_693()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
- inline bool jj_3R_97()
+ inline bool jj_3R_interface_file_declaration_1467_3_97()
{
if (jj_done) return true;
if (jj_scan_token(FILE_T)) return true;
- if (jj_3R_205()) return true;
+ if (jj_3R_identifier_list_1354_4_205()) return true;
if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_89()) return true;
+ if (jj_3R_subtype_indication_2398_3_89()) return true;
return false;
}
- inline bool jj_3R_414()
+ inline bool jj_3R_interface_element_1462_3_414()
{
if (jj_done) return true;
- if (jj_3R_513()) return true;
+ if (jj_3R_interface_declaration_1437_1_513()) return true;
return false;
}
- inline bool jj_3R_444()
+ inline bool jj_3R_ifunc_2910_87_444()
{
if (jj_done) return true;
if (jj_scan_token(IS_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_693()) return false;
+ if (jj_3R_ifunc_2910_98_693()) {
jj_scanpos = xsp;
if (jj_scan_token(145)) return true;
+ }
return false;
}
inline bool jj_3_46()
{
if (jj_done) return true;
- if (jj_3R_98()) return true;
+ if (jj_3R_subprogram_declaration_2294_1_98()) return true;
return false;
}
- inline bool jj_3R_572()
+ inline bool jj_3R_interface_declaration_1452_2_572()
{
if (jj_done) return true;
- if (jj_3R_625()) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_object_class_1711_1_625()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
- inline bool jj_3R_571()
+ inline bool jj_3R_interface_declaration_1449_1_571()
{
if (jj_done) return true;
- if (jj_3R_98()) return true;
+ if (jj_3R_subprogram_declaration_2294_1_98()) return true;
return false;
}
inline bool jj_3_45()
{
if (jj_done) return true;
- if (jj_3R_97()) return true;
+ if (jj_3R_interface_file_declaration_1467_3_97()) return true;
return false;
}
inline bool jj_3_44()
{
if (jj_done) return true;
- if (jj_3R_96()) return true;
+ if (jj_3R_interface_variable_declaration_1483_1_96()) return true;
return false;
}
inline bool jj_3_43()
{
if (jj_done) return true;
- if (jj_3R_95()) return true;
+ if (jj_3R_interface_package_declaration_2658_2_95()) return true;
return false;
}
- inline bool jj_3R_513()
+ inline bool jj_3R_interface_declaration_1437_1_513()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3_42()) return false;
+ if (jj_3_42()) {
jj_scanpos = xsp;
- if (!jj_3_43()) return false;
+ if (jj_3_43()) {
jj_scanpos = xsp;
- if (!jj_3_44()) return false;
+ if (jj_3_44()) {
jj_scanpos = xsp;
- if (!jj_3_45()) return false;
+ if (jj_3_45()) {
jj_scanpos = xsp;
- if (!jj_3R_571()) return false;
+ if (jj_3R_interface_declaration_1449_1_571()) {
jj_scanpos = xsp;
- if (jj_3R_572()) return true;
+ if (jj_3R_interface_declaration_1452_2_572()) return true;
+ }
+ }
+ }
+ }
+ }
return false;
}
inline bool jj_3_42()
{
if (jj_done) return true;
- if (jj_3R_94()) return true;
+ if (jj_3R_interface_subprogram_declaration_2895_4_94()) return true;
return false;
}
- inline bool jj_3R_159()
+ inline bool jj_3R_index_constraint_1395_42_159()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_72()) return true;
+ if (jj_3R_discrete_range_964_3_72()) return true;
return false;
}
return false;
}
- inline bool jj_3R_631()
+ inline bool jj_3R_if_statement_1378_46_631()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
- inline bool jj_3R_427()
+ inline bool jj_3R_instantiation_list_1421_3_427()
{
if (jj_done) return true;
if (jj_scan_token(ALL_T)) return true;
return false;
}
- inline bool jj_3R_426()
+ inline bool jj_3R_instantiation_list_1420_3_426()
{
if (jj_done) return true;
if (jj_scan_token(OTHER_T)) return true;
return false;
}
- inline bool jj_3R_343()
+ inline bool jj_3R_instantiation_list_1419_3_343()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_425()) return false;
+ if (jj_3R_instantiation_list_1419_3_425()) {
jj_scanpos = xsp;
- if (!jj_3R_426()) return false;
+ if (jj_3R_instantiation_list_1420_3_426()) {
jj_scanpos = xsp;
- if (jj_3R_427()) return true;
+ if (jj_3R_instantiation_list_1421_3_427()) return true;
+ }
+ }
return false;
}
- inline bool jj_3R_425()
+ inline bool jj_3R_instantiation_list_1419_3_425()
{
if (jj_done) return true;
- if (jj_3R_205()) return true;
+ if (jj_3R_identifier_list_1354_4_205()) return true;
return false;
}
- inline bool jj_3R_340()
+ inline bool jj_3R_instantiation_unit_1414_3_340()
{
if (jj_done) return true;
if (jj_scan_token(CONFIGURATION_T)) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
return false;
}
- inline bool jj_3R_339()
+ inline bool jj_3R_instantiation_unit_1413_3_339()
{
if (jj_done) return true;
if (jj_scan_token(ENTITY_T)) return true;
Token * xsp;
xsp = jj_scanpos;
if (jj_3_41()) jj_scanpos = xsp;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
xsp = jj_scanpos;
- if (jj_3R_424()) jj_scanpos = xsp;
+ if (jj_3R_instantiation_unit_1413_86_424()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_177()
+ inline bool jj_3R_instantiation_unit_1412_1_177()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_338()) return false;
+ if (jj_3R_instantiation_unit_1412_1_338()) {
jj_scanpos = xsp;
- if (!jj_3R_339()) return false;
+ if (jj_3R_instantiation_unit_1413_3_339()) {
jj_scanpos = xsp;
- if (jj_3R_340()) return true;
+ if (jj_3R_instantiation_unit_1414_3_340()) return true;
+ }
+ }
return false;
}
inline bool jj_3_40()
{
if (jj_done) return true;
- if (jj_3R_72()) return true;
+ if (jj_3R_discrete_range_964_3_72()) return true;
return false;
}
- inline bool jj_3R_338()
+ inline bool jj_3R_instantiation_unit_1412_1_338()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
if (jj_scan_token(28)) jj_scanpos = xsp;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
- inline bool jj_3R_722()
+ inline bool jj_3R_index_subtype_definition_1407_2_722()
{
if (jj_done) return true;
- if (jj_3R_161()) return true;
+ if (jj_3R_type_mark_2456_3_161()) return true;
if (jj_scan_token(RANGE_T)) return true;
if (jj_scan_token(BOX_T)) return true;
return false;
}
- inline bool jj_3R_535()
+ inline bool jj_3R_param_2937_5_535()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_327()) return true;
+ if (jj_3R_interface_list_1476_3_327()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_628()
+ inline bool jj_3R_index_specification_1402_3_628()
{
if (jj_done) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
return false;
}
inline bool jj_3_125()
{
if (jj_done) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
if (jj_scan_token(WHEN_T)) return true;
return false;
}
- inline bool jj_3R_442()
+ inline bool jj_3R_param_2936_3_442()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
if (jj_scan_token(77)) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_535()) jj_scanpos = xsp;
+ if (jj_3R_param_2937_5_535()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_627()
+ inline bool jj_3R_index_specification_1400_2_627()
{
if (jj_done) return true;
- if (jj_3R_72()) return true;
+ if (jj_3R_discrete_range_964_3_72()) return true;
return false;
}
- inline bool jj_3R_577()
+ inline bool jj_3R_index_specification_1400_2_577()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_627()) return false;
+ if (jj_3R_index_specification_1400_2_627()) {
jj_scanpos = xsp;
- if (jj_3R_628()) return true;
+ if (jj_3R_index_specification_1402_3_628()) return true;
+ }
return false;
}
- inline bool jj_3R_65()
+ inline bool jj_3R_index_constraint_1395_3_65()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_72()) return true;
+ if (jj_3R_discrete_range_964_3_72()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_159()) { jj_scanpos = xsp; break; }
+ if (jj_3R_index_constraint_1395_42_159()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_401()
+ inline bool jj_3R_sel_var_list_2871_58_401()
{
if (jj_done) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_90()) return true;
+ if (jj_3R_choices_703_3_90()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_scan_token(134)) return false;
+ if (jj_scan_token(134)) {
jj_scanpos = xsp;
if (jj_scan_token(137)) return true;
+ }
return false;
}
- inline bool jj_3R_547()
+ inline bool jj_3R_incomplete_type_declaration_1387_3_547()
{
if (jj_done) return true;
if (jj_scan_token(TYPE_T)) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_546()
+ inline bool jj_3R_sel_wave_list_2877_43_546()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_466()) return true;
+ if (jj_3R_sel_wave_list_2877_4_466()) return true;
return false;
}
- inline bool jj_3R_316()
+ inline bool jj_3R_selected_force_assignment_2866_52_316()
{
if (jj_done) return true;
- if (jj_3R_399()) return true;
+ if (jj_3R_inout_stat_2882_3_399()) return true;
return false;
}
- inline bool jj_3R_561()
+ inline bool jj_3R_else_stat_2888_28_561()
{
if (jj_done) return true;
if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
return false;
}
- inline bool jj_3R_630()
+ inline bool jj_3R_if_statement_1374_6_630()
{
if (jj_done) return true;
if (jj_scan_token(ELSE_T)) return true;
- if (jj_3R_268()) return true;
+ if (jj_3R_sequence_of_statement_2128_2_268()) return true;
return false;
}
- inline bool jj_3R_443()
+ inline bool jj_3R_ifunc_2910_3_443()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_scan_token(84)) return false;
+ if (jj_scan_token(84)) {
jj_scanpos = xsp;
if (jj_scan_token(52)) return true;
+ }
return false;
}
- inline bool jj_3R_361()
+ inline bool jj_3R_ifunc_2910_2_361()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_443()) jj_scanpos = xsp;
+ if (jj_3R_ifunc_2910_3_443()) jj_scanpos = xsp;
if (jj_scan_token(FUNCTION_T)) return true;
- if (jj_3R_63()) return true;
- if (jj_3R_442()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
+ if (jj_3R_param_2936_3_442()) return true;
if (jj_scan_token(RETURN_T)) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
xsp = jj_scanpos;
- if (jj_3R_444()) jj_scanpos = xsp;
+ if (jj_3R_ifunc_2910_87_444()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_629()
+ inline bool jj_3R_if_statement_1367_6_629()
{
if (jj_done) return true;
if (jj_scan_token(ELSIF_T)) return true;
- if (jj_3R_83()) return true;
+ if (jj_3R_condition_809_3_83()) return true;
if (jj_scan_token(THEN_T)) return true;
- if (jj_3R_268()) return true;
+ if (jj_3R_sequence_of_statement_2128_2_268()) return true;
return false;
}
- inline bool jj_3R_362()
+ inline bool jj_3R_identifier_list_1354_16_362()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
return false;
}
- inline bool jj_3R_360()
+ inline bool jj_3R_iproc_2901_3_360()
{
if (jj_done) return true;
if (jj_scan_token(PROCEDURE_T)) return true;
- if (jj_3R_74()) return true;
- if (jj_3R_442()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
+ if (jj_3R_param_2936_3_442()) return true;
return false;
}
- inline bool jj_3R_203()
+ inline bool jj_3R_interface_subprogram_declaration_2896_4_203()
{
if (jj_done) return true;
- if (jj_3R_361()) return true;
+ if (jj_3R_ifunc_2910_2_361()) return true;
return false;
}
- inline bool jj_3R_202()
+ inline bool jj_3R_interface_subprogram_declaration_2895_4_202()
{
if (jj_done) return true;
- if (jj_3R_360()) return true;
+ if (jj_3R_iproc_2901_3_360()) return true;
return false;
}
- inline bool jj_3R_94()
+ inline bool jj_3R_interface_subprogram_declaration_2895_4_94()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_202()) return false;
+ if (jj_3R_interface_subprogram_declaration_2895_4_202()) {
jj_scanpos = xsp;
- if (jj_3R_203()) return true;
+ if (jj_3R_interface_subprogram_declaration_2896_4_203()) return true;
+ }
return false;
}
- inline bool jj_3R_264()
+ inline bool jj_3R_if_statement_1359_4_264()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_125()
+ inline bool jj_3R_if_statement_1359_3_125()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_264()) jj_scanpos = xsp;
+ if (jj_3R_if_statement_1359_4_264()) jj_scanpos = xsp;
if (jj_scan_token(IF_T)) return true;
- if (jj_3R_83()) return true;
+ if (jj_3R_condition_809_3_83()) return true;
if (jj_scan_token(THEN_T)) return true;
- if (jj_3R_268()) return true;
+ if (jj_3R_sequence_of_statement_2128_2_268()) return true;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_629()) { jj_scanpos = xsp; break; }
+ if (jj_3R_if_statement_1367_6_629()) { jj_scanpos = xsp; break; }
}
xsp = jj_scanpos;
- if (jj_3R_630()) jj_scanpos = xsp;
+ if (jj_3R_if_statement_1374_6_630()) jj_scanpos = xsp;
if (jj_scan_token(END_T)) return true;
if (jj_scan_token(IF_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_631()) jj_scanpos = xsp;
+ if (jj_3R_if_statement_1378_46_631()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_205()
+ inline bool jj_3R_identifier_list_1354_4_205()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_362()) { jj_scanpos = xsp; break; }
+ if (jj_3R_identifier_list_1354_16_362()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_493()
+ inline bool jj_3R_else_stat_2888_5_493()
{
if (jj_done) return true;
if (jj_scan_token(ELSE_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_561()) jj_scanpos = xsp;
+ if (jj_3R_else_stat_2888_28_561()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_400()
+ inline bool jj_3R_else_stat_2888_4_400()
{
if (jj_done) return true;
Token * xsp;
- if (jj_3R_493()) return true;
+ if (jj_3R_else_stat_2888_5_493()) return true;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_493()) { jj_scanpos = xsp; break; }
+ if (jj_3R_else_stat_2888_5_493()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_171()
+ inline bool jj_3R_identifier_1349_4_171()
{
if (jj_done) return true;
if (jj_scan_token(BASIC_IDENTIFIER)) return true;
return false;
}
- inline bool jj_3R_170()
+ inline bool jj_3R_identifier_1348_3_170()
{
if (jj_done) return true;
if (jj_scan_token(EXTENDED_CHARACTER)) return true;
return false;
}
- inline bool jj_3R_74()
+ inline bool jj_3R_identifier_1348_3_74()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_170()) return false;
+ if (jj_3R_identifier_1348_3_170()) {
jj_scanpos = xsp;
- if (jj_3R_171()) return true;
+ if (jj_3R_identifier_1349_4_171()) return true;
+ }
return false;
}
- inline bool jj_3R_560()
+ inline bool jj_3R_group_constituent_list_1322_28_560()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_559()) return true;
+ if (jj_3R_group_constituent_1316_2_559()) return true;
return false;
}
- inline bool jj_3R_399()
+ inline bool jj_3R_inout_stat_2882_3_399()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_scan_token(53)) return false;
+ if (jj_scan_token(53)) {
jj_scanpos = xsp;
if (jj_scan_token(75)) return true;
+ }
return false;
}
- inline bool jj_3R_466()
+ inline bool jj_3R_sel_wave_list_2877_4_466()
{
if (jj_done) return true;
- if (jj_3R_463()) return true;
+ if (jj_3R_waveform_element_2551_2_463()) return true;
if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_90()) return true;
+ if (jj_3R_choices_703_3_90()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_546()) { jj_scanpos = xsp; break; }
+ if (jj_3R_sel_wave_list_2877_43_546()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_465()
+ inline bool jj_3R_selected_waveform_assignment_2860_17_465()
{
if (jj_done) return true;
- if (jj_3R_420()) return true;
+ if (jj_3R_delay_mechanism_924_1_420()) return true;
return false;
}
- inline bool jj_3R_317()
+ inline bool jj_3R_sel_var_list_2871_3_317()
{
if (jj_done) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_90()) return true;
+ if (jj_3R_choices_703_3_90()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_scan_token(134)) return false;
+ if (jj_scan_token(134)) {
jj_scanpos = xsp;
if (jj_scan_token(137)) return true;
+ }
while (true) {
xsp = jj_scanpos;
- if (jj_3R_401()) { jj_scanpos = xsp; break; }
+ if (jj_3R_sel_var_list_2871_58_401()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_68()
+ inline bool jj_3R_group_template_declaration_1335_2_68()
{
if (jj_done) return true;
if (jj_scan_token(GROUP_T)) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(IS_T)) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_491()) return true;
+ if (jj_3R_entity_class_entry_list_1038_2_491()) return true;
if (jj_scan_token(RPAREN_T)) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_150()
+ inline bool jj_3R_selected_force_assignment_2865_3_150()
{
if (jj_done) return true;
if (jj_scan_token(WITH_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
if (jj_scan_token(SELECT_T)) return true;
Token * xsp;
xsp = jj_scanpos;
if (jj_scan_token(155)) jj_scanpos = xsp;
- if (jj_3R_119()) return true;
+ if (jj_3R_target_2413_2_119()) return true;
if (jj_scan_token(LESSTHAN_T)) return true;
if (jj_scan_token(FORCE_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_316()) jj_scanpos = xsp;
- if (jj_3R_317()) return true;
+ if (jj_3R_selected_force_assignment_2866_52_316()) jj_scanpos = xsp;
+ if (jj_3R_sel_var_list_2871_3_317()) return true;
return false;
}
- inline bool jj_3R_398()
+ inline bool jj_3R_group_declaration_1327_3_398()
{
if (jj_done) return true;
if (jj_scan_token(GROUP_T)) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_492()) return true;
+ if (jj_3R_group_constituent_list_1322_3_492()) return true;
if (jj_scan_token(RPAREN_T)) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
inline bool jj_3_124()
{
if (jj_done) return true;
- if (jj_3R_114()) return true;
+ if (jj_3R_aggregate_396_3_114()) return true;
return false;
}
- inline bool jj_3R_385()
+ inline bool jj_3R_selected_waveform_assignment_2858_3_385()
{
if (jj_done) return true;
if (jj_scan_token(WITH_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
if (jj_scan_token(SELECT_T)) return true;
Token * xsp;
xsp = jj_scanpos;
if (jj_scan_token(155)) jj_scanpos = xsp;
- if (jj_3R_119()) return true;
+ if (jj_3R_target_2413_2_119()) return true;
if (jj_scan_token(LESSTHAN_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_465()) jj_scanpos = xsp;
- if (jj_3R_466()) return true;
+ if (jj_3R_selected_waveform_assignment_2860_17_465()) jj_scanpos = xsp;
+ if (jj_3R_sel_wave_list_2877_4_466()) return true;
return false;
}
- inline bool jj_3R_492()
+ inline bool jj_3R_group_constituent_list_1322_3_492()
{
if (jj_done) return true;
- if (jj_3R_559()) return true;
+ if (jj_3R_group_constituent_1316_2_559()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_560()) { jj_scanpos = xsp; break; }
+ if (jj_3R_group_constituent_list_1322_28_560()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_687()
+ inline bool jj_3R_select_name_2853_3_687()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
return false;
}
- inline bool jj_3R_620()
+ inline bool jj_3R_group_constituent_1317_4_620()
{
if (jj_done) return true;
- if (jj_3R_369()) return true;
+ if (jj_3R_character_literal_682_3_369()) return true;
return false;
}
- inline bool jj_3R_686()
+ inline bool jj_3R_select_name_2851_3_686()
{
if (jj_done) return true;
- if (jj_3R_114()) return true;
+ if (jj_3R_aggregate_396_3_114()) return true;
return false;
}
- inline bool jj_3R_663()
+ inline bool jj_3R_select_name_2851_3_663()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_686()) return false;
+ if (jj_3R_select_name_2851_3_686()) {
jj_scanpos = xsp;
- if (jj_3R_687()) return true;
+ if (jj_3R_select_name_2853_3_687()) return true;
+ }
return false;
}
inline bool jj_3_121()
{
if (jj_done) return true;
- if (jj_3R_148()) return true;
+ if (jj_3R_pathname_element_2786_3_148()) return true;
if (jj_scan_token(DOT_T)) return true;
return false;
}
- inline bool jj_3R_619()
+ inline bool jj_3R_group_constituent_1316_2_619()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
return false;
}
- inline bool jj_3R_559()
+ inline bool jj_3R_group_constituent_1316_2_559()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_619()) return false;
+ if (jj_3R_group_constituent_1316_2_619()) {
jj_scanpos = xsp;
- if (jj_3R_620()) return true;
+ if (jj_3R_group_constituent_1317_4_620()) return true;
+ }
return false;
}
- inline bool jj_3R_73()
+ inline bool jj_3R_generic_map_aspect_1311_6_73()
{
if (jj_done) return true;
if (jj_scan_token(GENERIC_T)) return true;
if (jj_scan_token(MAP_T)) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_169()) return true;
+ if (jj_3R_association_list_500_1_169()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_587()
+ inline bool jj_3R_else_wave_list_2823_27_587()
{
if (jj_done) return true;
if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
return false;
}
inline bool jj_3_123()
{
if (jj_done) return true;
- if (jj_3R_150()) return true;
+ if (jj_3R_selected_force_assignment_2865_3_150()) return true;
return false;
}
- inline bool jj_3R_542()
+ inline bool jj_3R_selected_variable_assignment_2844_3_542()
{
if (jj_done) return true;
if (jj_scan_token(WITH_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
if (jj_scan_token(SELECT_T)) return true;
Token * xsp;
xsp = jj_scanpos;
if (jj_scan_token(155)) jj_scanpos = xsp;
- if (jj_3R_663()) return true;
+ if (jj_3R_select_name_2851_3_663()) return true;
if (jj_scan_token(VARASSIGN_T)) return true;
- if (jj_3R_317()) return true;
+ if (jj_3R_sel_var_list_2871_3_317()) return true;
return false;
}
- inline bool jj_3R_314()
+ inline bool jj_3R_conditional_force_assignment_2830_15_314()
{
if (jj_done) return true;
- if (jj_3R_399()) return true;
+ if (jj_3R_inout_stat_2882_3_399()) return true;
return false;
}
- inline bool jj_3R_312()
+ inline bool jj_3R_pathname_element_list_2797_47_312()
{
if (jj_done) return true;
- if (jj_3R_148()) return true;
+ if (jj_3R_pathname_element_2786_3_148()) return true;
if (jj_scan_token(DOT_T)) return true;
return false;
}
- inline bool jj_3R_315()
+ inline bool jj_3R_conditional_force_assignment_2831_13_315()
{
if (jj_done) return true;
- if (jj_3R_61()) return true;
- if (jj_3R_400()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
+ if (jj_3R_else_stat_2888_4_400()) return true;
return false;
}
- inline bool jj_3R_162()
+ inline bool jj_3R_generic_list_1306_2_162()
{
if (jj_done) return true;
- if (jj_3R_327()) return true;
+ if (jj_3R_interface_list_1476_3_327()) return true;
return false;
}
- inline bool jj_3R_464()
+ inline bool jj_3R_conditional_waveform_assignment_2817_26_464()
{
if (jj_done) return true;
- if (jj_3R_545()) return true;
+ if (jj_3R_else_wave_list_2823_3_545()) return true;
return false;
}
inline bool jj_3_39()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_280()
+ inline bool jj_3R_selected_signal_assignment_wave_2839_3_280()
{
if (jj_done) return true;
- if (jj_3R_385()) return true;
+ if (jj_3R_selected_waveform_assignment_2858_3_385()) return true;
return false;
}
- inline bool jj_3R_132()
+ inline bool jj_3R_selected_signal_assignment_wave_2837_3_132()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_279()) return false;
+ if (jj_3R_selected_signal_assignment_wave_2837_3_279()) {
jj_scanpos = xsp;
- if (jj_3R_280()) return true;
+ if (jj_3R_selected_signal_assignment_wave_2839_3_280()) return true;
+ }
return false;
}
- inline bool jj_3R_279()
+ inline bool jj_3R_selected_signal_assignment_wave_2837_3_279()
{
if (jj_done) return true;
- if (jj_3R_150()) return true;
+ if (jj_3R_selected_force_assignment_2865_3_150()) return true;
return false;
}
- inline bool jj_3R_69()
+ inline bool jj_3R_generic_clause_1301_2_69()
{
if (jj_done) return true;
if (jj_scan_token(GENERIC_T)) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_162()) return true;
+ if (jj_3R_generic_list_1306_2_162()) return true;
if (jj_scan_token(RPAREN_T)) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_336()
+ inline bool jj_3R_generate_scheme_1296_3_336()
{
if (jj_done) return true;
if (jj_scan_token(IF_T)) return true;
return false;
}
- inline bool jj_3R_462()
+ inline bool jj_3R_conditional_waveform_assignment_2816_17_462()
{
if (jj_done) return true;
- if (jj_3R_420()) return true;
+ if (jj_3R_delay_mechanism_924_1_420()) return true;
return false;
}
- inline bool jj_3R_174()
+ inline bool jj_3R_generate_scheme_1295_1_174()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_335()) return false;
+ if (jj_3R_generate_scheme_1295_1_335()) {
jj_scanpos = xsp;
- if (jj_3R_336()) return true;
+ if (jj_3R_generate_scheme_1296_3_336()) return true;
+ }
return false;
}
- inline bool jj_3R_335()
+ inline bool jj_3R_generate_scheme_1295_1_335()
{
if (jj_done) return true;
if (jj_scan_token(FOR_T)) return true;
return false;
}
- inline bool jj_3R_149()
+ inline bool jj_3R_conditional_force_assignment_2828_3_149()
{
if (jj_done) return true;
- if (jj_3R_119()) return true;
+ if (jj_3R_target_2413_2_119()) return true;
if (jj_scan_token(LESSTHAN_T)) return true;
if (jj_scan_token(FORCE_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_314()) jj_scanpos = xsp;
- if (jj_3R_61()) return true;
+ if (jj_3R_conditional_force_assignment_2830_15_314()) jj_scanpos = xsp;
+ if (jj_3R_expression_1168_1_61()) return true;
if (jj_scan_token(WHEN_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_315()) jj_scanpos = xsp;
+ if (jj_3R_conditional_force_assignment_2831_13_315()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_545()
+ inline bool jj_3R_else_wave_list_2823_3_545()
{
if (jj_done) return true;
if (jj_scan_token(ELSE_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_587()) jj_scanpos = xsp;
+ if (jj_3R_else_wave_list_2823_27_587()) jj_scanpos = xsp;
return false;
}
inline bool jj_3_122()
{
if (jj_done) return true;
- if (jj_3R_149()) return true;
+ if (jj_3R_conditional_force_assignment_2828_3_149()) return true;
return false;
}
- inline bool jj_3R_78()
+ inline bool jj_3R_generate_statement_1283_1_78()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_174()) return true;
+ if (jj_3R_generate_scheme_1295_1_174()) return true;
return false;
}
- inline bool jj_3R_384()
+ inline bool jj_3R_conditional_waveform_assignment_2815_3_384()
{
if (jj_done) return true;
- if (jj_3R_119()) return true;
+ if (jj_3R_target_2413_2_119()) return true;
if (jj_scan_token(LESSTHAN_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_462()) jj_scanpos = xsp;
- if (jj_3R_463()) return true;
+ if (jj_3R_conditional_waveform_assignment_2816_17_462()) jj_scanpos = xsp;
+ if (jj_3R_waveform_element_2551_2_463()) return true;
if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
xsp = jj_scanpos;
- if (jj_3R_464()) jj_scanpos = xsp;
+ if (jj_3R_conditional_waveform_assignment_2817_26_464()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_110()
+ inline bool jj_3R_function_call_1278_1_110()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_236()) return true;
+ if (jj_3R_actual_parameter_part_370_4_236()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_278()
+ inline bool jj_3R_conditional_signal_assignment_wave_2810_3_278()
{
if (jj_done) return true;
- if (jj_3R_384()) return true;
+ if (jj_3R_conditional_waveform_assignment_2815_3_384()) return true;
return false;
}
- inline bool jj_3R_131()
+ inline bool jj_3R_conditional_signal_assignment_wave_2808_3_131()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_277()) return false;
+ if (jj_3R_conditional_signal_assignment_wave_2808_3_277()) {
jj_scanpos = xsp;
- if (jj_3R_278()) return true;
+ if (jj_3R_conditional_signal_assignment_wave_2810_3_278()) return true;
+ }
return false;
}
- inline bool jj_3R_277()
+ inline bool jj_3R_conditional_signal_assignment_wave_2808_3_277()
{
if (jj_done) return true;
- if (jj_3R_149()) return true;
+ if (jj_3R_conditional_force_assignment_2828_3_149()) return true;
return false;
}
- inline bool jj_3R_570()
+ inline bool jj_3R_package_path_name_2803_3_570()
{
if (jj_done) return true;
if (jj_scan_token(AT_T)) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
return false;
}
- inline bool jj_3R_313()
+ inline bool jj_3R_pathname_element_2786_19_313()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
inline bool jj_3_120()
{
if (jj_done) return true;
- if (jj_3R_147()) return true;
+ if (jj_3R_pathname_element_list_2797_3_147()) return true;
return false;
}
- inline bool jj_3R_481()
+ inline bool jj_3R_file_declaration_1199_67_481()
{
if (jj_done) return true;
- if (jj_3R_549()) return true;
+ if (jj_3R_file_open_information_1214_2_549()) return true;
return false;
}
- inline bool jj_3R_147()
+ inline bool jj_3R_pathname_element_list_2797_3_147()
{
if (jj_done) return true;
- if (jj_3R_148()) return true;
+ if (jj_3R_pathname_element_2786_3_148()) return true;
if (jj_scan_token(DOT_T)) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_312()) { jj_scanpos = xsp; break; }
+ if (jj_3R_pathname_element_list_2797_47_312()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_624()
+ inline bool jj_3R_relative_pathname_2776_17_624()
{
if (jj_done) return true;
- if (jj_3R_147()) return true;
+ if (jj_3R_pathname_element_list_2797_3_147()) return true;
return false;
}
- inline bool jj_3R_148()
+ inline bool jj_3R_pathname_element_2786_3_148()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_313()) jj_scanpos = xsp;
+ if (jj_3R_pathname_element_2786_19_313()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_592()
+ inline bool jj_3R_file_open_information_1214_38_592()
{
if (jj_done) return true;
- if (jj_3R_399()) return true;
+ if (jj_3R_inout_stat_2882_3_399()) return true;
return false;
}
- inline bool jj_3R_160()
+ inline bool jj_3R_formal_part_1241_11_160()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_326()) return true;
+ if (jj_3R_formal_designator_1229_5_326()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_647()
+ inline bool jj_3R_neg_list_2781_3_647()
{
if (jj_done) return true;
if (jj_scan_token(NEG_T)) return true;
return false;
}
- inline bool jj_3R_142()
+ inline bool jj_3R_full_type_declaration_1246_3_142()
{
if (jj_done) return true;
if (jj_scan_token(TYPE_T)) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(IS_T)) return true;
- if (jj_3R_588()) return true;
+ if (jj_3R_type_definition_2444_1_588()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_623()
+ inline bool jj_3R_neg_list_2781_2_623()
{
if (jj_done) return true;
Token * xsp;
- if (jj_3R_647()) return true;
+ if (jj_3R_neg_list_2781_3_647()) return true;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_647()) { jj_scanpos = xsp; break; }
+ if (jj_3R_neg_list_2781_3_647()) { jj_scanpos = xsp; break; }
}
return false;
}
{
if (jj_done) return true;
if (jj_scan_token(DOT_T)) return true;
- if (jj_3R_147()) return true;
+ if (jj_3R_pathname_element_list_2797_3_147()) return true;
return false;
}
- inline bool jj_3R_569()
+ inline bool jj_3R_relative_pathname_2776_3_569()
{
if (jj_done) return true;
- if (jj_3R_623()) return true;
+ if (jj_3R_neg_list_2781_2_623()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_624()) jj_scanpos = xsp;
- if (jj_3R_74()) return true;
+ if (jj_3R_relative_pathname_2776_17_624()) jj_scanpos = xsp;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
- inline bool jj_3R_66()
+ inline bool jj_3R_formal_part_1241_1_66()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_160()) jj_scanpos = xsp;
+ if (jj_3R_formal_part_1241_11_160()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_622()
+ inline bool jj_3R_absolute_pathname_2771_3_622()
{
if (jj_done) return true;
if (jj_scan_token(DOT_T)) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
- inline bool jj_3R_582()
+ inline bool jj_3R_formal_parameter_list_1236_2_582()
{
if (jj_done) return true;
- if (jj_3R_327()) return true;
+ if (jj_3R_interface_list_1476_3_327()) return true;
return false;
}
- inline bool jj_3R_621()
+ inline bool jj_3R_absolute_pathname_2769_2_621()
{
if (jj_done) return true;
if (jj_scan_token(DOT_T)) return true;
- if (jj_3R_147()) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_pathname_element_list_2797_3_147()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
- inline bool jj_3R_568()
+ inline bool jj_3R_absolute_pathname_2769_2_568()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_621()) return false;
+ if (jj_3R_absolute_pathname_2769_2_621()) {
jj_scanpos = xsp;
- if (jj_3R_622()) return true;
+ if (jj_3R_absolute_pathname_2771_3_622()) return true;
+ }
return false;
}
- inline bool jj_3R_413()
+ inline bool jj_3R_formal_designator_1230_6_413()
{
if (jj_done) return true;
if (jj_scan_token(INTEGER)) return true;
return false;
}
- inline bool jj_3R_326()
+ inline bool jj_3R_formal_designator_1229_5_326()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_412()) return false;
+ if (jj_3R_formal_designator_1229_5_412()) {
jj_scanpos = xsp;
- if (jj_3R_413()) return true;
+ if (jj_3R_formal_designator_1230_6_413()) return true;
+ }
return false;
}
- inline bool jj_3R_412()
+ inline bool jj_3R_formal_designator_1229_5_412()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
return false;
}
- inline bool jj_3R_512()
+ inline bool jj_3R_external_pathname_2764_4_512()
{
if (jj_done) return true;
- if (jj_3R_570()) return true;
+ if (jj_3R_package_path_name_2803_3_570()) return true;
return false;
}
- inline bool jj_3R_511()
+ inline bool jj_3R_external_pathname_2763_4_511()
{
if (jj_done) return true;
- if (jj_3R_569()) return true;
+ if (jj_3R_relative_pathname_2776_3_569()) return true;
return false;
}
- inline bool jj_3R_411()
+ inline bool jj_3R_external_pathname_2762_4_411()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_510()) return false;
+ if (jj_3R_external_pathname_2762_4_510()) {
jj_scanpos = xsp;
- if (!jj_3R_511()) return false;
+ if (jj_3R_external_pathname_2763_4_511()) {
jj_scanpos = xsp;
- if (jj_3R_512()) return true;
+ if (jj_3R_external_pathname_2764_4_512()) return true;
+ }
+ }
return false;
}
- inline bool jj_3R_510()
+ inline bool jj_3R_external_pathname_2762_4_510()
{
if (jj_done) return true;
- if (jj_3R_568()) return true;
+ if (jj_3R_absolute_pathname_2769_2_568()) return true;
return false;
}
- inline bool jj_3R_189()
+ inline bool jj_3R_context_declaration_2633_128_189()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
- inline bool jj_3R_509()
+ inline bool jj_3R_sig_stat_2756_5_509()
{
if (jj_done) return true;
if (jj_scan_token(VARIABLE_T)) return true;
return false;
}
- inline bool jj_3R_508()
+ inline bool jj_3R_sig_stat_2755_5_508()
{
if (jj_done) return true;
if (jj_scan_token(SIGNAL_T)) return true;
return false;
}
- inline bool jj_3R_410()
+ inline bool jj_3R_sig_stat_2754_3_410()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_507()) return false;
+ if (jj_3R_sig_stat_2754_3_507()) {
jj_scanpos = xsp;
- if (!jj_3R_508()) return false;
+ if (jj_3R_sig_stat_2755_5_508()) {
jj_scanpos = xsp;
- if (jj_3R_509()) return true;
+ if (jj_3R_sig_stat_2756_5_509()) return true;
+ }
+ }
return false;
}
- inline bool jj_3R_507()
+ inline bool jj_3R_sig_stat_2754_3_507()
{
if (jj_done) return true;
if (jj_scan_token(CONSTANT_T)) return true;
return false;
}
- inline bool jj_3R_659()
+ inline bool jj_3R_file_type_definition_1219_2_659()
{
if (jj_done) return true;
if (jj_scan_token(FILE_T)) return true;
if (jj_scan_token(OF_T)) return true;
- if (jj_3R_161()) return true;
+ if (jj_3R_type_mark_2456_3_161()) return true;
return false;
}
- inline bool jj_3R_591()
+ inline bool jj_3R_file_open_information_1214_4_591()
{
if (jj_done) return true;
if (jj_scan_token(OPEN_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
return false;
}
- inline bool jj_3R_549()
+ inline bool jj_3R_file_open_information_1214_2_549()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_591()) jj_scanpos = xsp;
+ if (jj_3R_file_open_information_1214_4_591()) jj_scanpos = xsp;
if (jj_scan_token(IS_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_592()) jj_scanpos = xsp;
- if (jj_3R_593()) return true;
+ if (jj_3R_file_open_information_1214_38_592()) jj_scanpos = xsp;
+ if (jj_3R_file_logical_name_1209_2_593()) return true;
return false;
}
inline bool jj_3_114()
{
if (jj_done) return true;
- if (jj_3R_144()) return true;
+ if (jj_3R_ttend_2711_3_144()) return true;
return false;
}
inline bool jj_3_118()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_593()
+ inline bool jj_3R_file_logical_name_1209_2_593()
{
if (jj_done) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
return false;
}
- inline bool jj_3R_323()
+ inline bool jj_3R_external_name_2744_2_323()
{
if (jj_done) return true;
if (jj_scan_token(SLSL_T)) return true;
- if (jj_3R_410()) return true;
- if (jj_3R_411()) return true;
+ if (jj_3R_sig_stat_2754_3_410()) return true;
+ if (jj_3R_external_pathname_2762_4_411()) return true;
if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_89()) return true;
+ if (jj_3R_subtype_indication_2398_3_89()) return true;
if (jj_scan_token(RSRS_T)) return true;
return false;
}
inline bool jj_3_117()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_284()
+ inline bool jj_3R_subprogram_instantiation_declaration_2667_73_284()
{
if (jj_done) return true;
- if (jj_3R_137()) return true;
+ if (jj_3R_gen_assoc_list_2678_4_137()) return true;
return false;
}
- inline bool jj_3R_467()
+ inline bool jj_3R_factor_1189_14_467()
{
if (jj_done) return true;
if (jj_scan_token(DOUBLEMULT_T)) return true;
- if (jj_3R_386()) return true;
+ if (jj_3R_primary_1870_1_386()) return true;
return false;
}
- inline bool jj_3R_392()
+ inline bool jj_3R_file_declaration_1199_2_392()
{
if (jj_done) return true;
if (jj_scan_token(FILE_T)) return true;
- if (jj_3R_205()) return true;
+ if (jj_3R_identifier_list_1354_4_205()) return true;
if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_89()) return true;
+ if (jj_3R_subtype_indication_2398_3_89()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_481()) jj_scanpos = xsp;
+ if (jj_3R_file_declaration_1199_67_481()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
inline bool jj_3_116()
{
if (jj_done) return true;
- if (jj_3R_146()) return true;
+ if (jj_3R_block_declarative_item_593_3_146()) return true;
return false;
}
- inline bool jj_3R_273()
+ inline bool jj_3R_exit_statement_1154_43_273()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
- inline bool jj_3R_295()
+ inline bool jj_3R_factor_1193_3_295()
{
if (jj_done) return true;
- if (jj_3R_320()) return true;
- if (jj_3R_386()) return true;
+ if (jj_3R_logop_1174_3_320()) return true;
+ if (jj_3R_primary_1870_1_386()) return true;
return false;
}
- inline bool jj_3R_294()
+ inline bool jj_3R_factor_1192_3_294()
{
if (jj_done) return true;
if (jj_scan_token(QQ_T)) return true;
- if (jj_3R_386()) return true;
+ if (jj_3R_primary_1870_1_386()) return true;
return false;
}
- inline bool jj_3R_293()
+ inline bool jj_3R_factor_1191_3_293()
{
if (jj_done) return true;
if (jj_scan_token(NOT_T)) return true;
- if (jj_3R_386()) return true;
+ if (jj_3R_primary_1870_1_386()) return true;
return false;
}
- inline bool jj_3R_292()
+ inline bool jj_3R_factor_1190_3_292()
{
if (jj_done) return true;
if (jj_scan_token(ABS_T)) return true;
- if (jj_3R_386()) return true;
+ if (jj_3R_primary_1870_1_386()) return true;
return false;
}
- inline bool jj_3R_141()
+ inline bool jj_3R_factor_1189_1_141()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_291()) return false;
+ if (jj_3R_factor_1189_1_291()) {
jj_scanpos = xsp;
- if (!jj_3R_292()) return false;
+ if (jj_3R_factor_1190_3_292()) {
jj_scanpos = xsp;
- if (!jj_3R_293()) return false;
+ if (jj_3R_factor_1191_3_293()) {
jj_scanpos = xsp;
- if (!jj_3R_294()) return false;
+ if (jj_3R_factor_1192_3_294()) {
jj_scanpos = xsp;
- if (jj_3R_295()) return true;
+ if (jj_3R_factor_1193_3_295()) return true;
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_291()
+ inline bool jj_3R_factor_1189_1_291()
{
if (jj_done) return true;
- if (jj_3R_386()) return true;
+ if (jj_3R_primary_1870_1_386()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_467()) jj_scanpos = xsp;
+ if (jj_3R_factor_1189_14_467()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_296()
+ inline bool jj_3R_ttend_2711_12_296()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
- inline bool jj_3R_251()
+ inline bool jj_3R_enumeration_type_definition_1148_38_251()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_102()) return true;
+ if (jj_3R_enumeration_literal_1142_2_102()) return true;
return false;
}
- inline bool jj_3R_246()
+ inline bool jj_3R_package_instantiation_declaration_2649_71_246()
{
if (jj_done) return true;
- if (jj_3R_137()) return true;
+ if (jj_3R_gen_assoc_list_2678_4_137()) return true;
return false;
}
- inline bool jj_3R_152()
+ inline bool jj_3R_expression_1168_16_152()
{
if (jj_done) return true;
- if (jj_3R_320()) return true;
- if (jj_3R_151()) return true;
+ if (jj_3R_logop_1174_3_320()) return true;
+ if (jj_3R_relation_2032_3_151()) return true;
return false;
}
inline bool jj_3_115()
{
if (jj_done) return true;
- if (jj_3R_145()) return true;
+ if (jj_3R_label_1537_2_145()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_409()
+ inline bool jj_3R_logop_1179_4_409()
{
if (jj_done) return true;
if (jj_scan_token(OR_T)) return true;
return false;
}
- inline bool jj_3R_408()
+ inline bool jj_3R_logop_1178_4_408()
{
if (jj_done) return true;
if (jj_scan_token(XOR_T)) return true;
return false;
}
- inline bool jj_3R_407()
+ inline bool jj_3R_logop_1177_4_407()
{
if (jj_done) return true;
if (jj_scan_token(XNOR_T)) return true;
return false;
}
- inline bool jj_3R_406()
+ inline bool jj_3R_logop_1176_4_406()
{
if (jj_done) return true;
if (jj_scan_token(NOR_T)) return true;
return false;
}
- inline bool jj_3R_405()
+ inline bool jj_3R_logop_1175_4_405()
{
if (jj_done) return true;
if (jj_scan_token(NAND_T)) return true;
return false;
}
- inline bool jj_3R_144()
+ inline bool jj_3R_ttend_2711_3_144()
{
if (jj_done) return true;
if (jj_scan_token(END_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_296()) jj_scanpos = xsp;
+ if (jj_3R_ttend_2711_12_296()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_648()
+ inline bool jj_3R_interface_package_declaration_2658_55_648()
{
if (jj_done) return true;
- if (jj_3R_137()) return true;
+ if (jj_3R_gen_assoc_list_2678_4_137()) return true;
return false;
}
- inline bool jj_3R_188()
+ inline bool jj_3R_context_declaration_2633_80_188()
{
if (jj_done) return true;
- if (jj_3R_349()) return true;
+ if (jj_3R_libustcont_stats_2642_4_349()) return true;
return false;
}
- inline bool jj_3R_320()
+ inline bool jj_3R_logop_1174_3_320()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_404()) return false;
+ if (jj_3R_logop_1174_3_404()) {
jj_scanpos = xsp;
- if (!jj_3R_405()) return false;
+ if (jj_3R_logop_1175_4_405()) {
jj_scanpos = xsp;
- if (!jj_3R_406()) return false;
+ if (jj_3R_logop_1176_4_406()) {
jj_scanpos = xsp;
- if (!jj_3R_407()) return false;
+ if (jj_3R_logop_1177_4_407()) {
jj_scanpos = xsp;
- if (!jj_3R_408()) return false;
+ if (jj_3R_logop_1178_4_408()) {
jj_scanpos = xsp;
- if (jj_3R_409()) return true;
+ if (jj_3R_logop_1179_4_409()) return true;
+ }
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_404()
+ inline bool jj_3R_logop_1174_3_404()
{
if (jj_done) return true;
if (jj_scan_token(AND_T)) return true;
return false;
}
- inline bool jj_3R_61()
+ inline bool jj_3R_expression_1168_1_61()
{
if (jj_done) return true;
- if (jj_3R_151()) return true;
+ if (jj_3R_relation_2032_3_151()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_152()) { jj_scanpos = xsp; break; }
+ if (jj_3R_expression_1168_16_152()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_274()
+ inline bool jj_3R_exit_statement_1155_3_274()
{
if (jj_done) return true;
if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_83()) return true;
+ if (jj_3R_condition_809_3_83()) return true;
return false;
}
- inline bool jj_3R_272()
+ inline bool jj_3R_exit_statement_1154_3_272()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_129()
+ inline bool jj_3R_exit_statement_1154_1_129()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_272()) jj_scanpos = xsp;
+ if (jj_3R_exit_statement_1154_3_272()) jj_scanpos = xsp;
if (jj_scan_token(EXIT_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_273()) jj_scanpos = xsp;
+ if (jj_3R_exit_statement_1154_43_273()) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_274()) jj_scanpos = xsp;
+ if (jj_3R_exit_statement_1155_3_274()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_136()
+ inline bool jj_3R_gen_interface_list_2683_4_136()
{
if (jj_done) return true;
if (jj_scan_token(GENERIC_T)) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_327()) return true;
+ if (jj_3R_interface_list_1476_3_327()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_116()
+ inline bool jj_3R_enumeration_type_definition_1148_3_116()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_102()) return true;
+ if (jj_3R_enumeration_literal_1142_2_102()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_251()) { jj_scanpos = xsp; break; }
+ if (jj_3R_enumeration_type_definition_1148_38_251()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_218()
+ inline bool jj_3R_enumeration_literal_1143_4_218()
{
if (jj_done) return true;
- if (jj_3R_369()) return true;
+ if (jj_3R_character_literal_682_3_369()) return true;
return false;
}
- inline bool jj_3R_137()
+ inline bool jj_3R_gen_assoc_list_2678_4_137()
{
if (jj_done) return true;
if (jj_scan_token(GENERIC_T)) return true;
if (jj_scan_token(MAP_T)) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_169()) return true;
+ if (jj_3R_association_list_500_1_169()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_217()
+ inline bool jj_3R_enumeration_literal_1142_2_217()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
- inline bool jj_3R_102()
+ inline bool jj_3R_enumeration_literal_1142_2_102()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_217()) return false;
+ if (jj_3R_enumeration_literal_1142_2_217()) {
jj_scanpos = xsp;
- if (jj_3R_218()) return true;
+ if (jj_3R_enumeration_literal_1143_4_218()) return true;
+ }
return false;
}
- inline bool jj_3R_685()
+ inline bool jj_3R_entity_tag_1137_3_685()
{
if (jj_done) return true;
- if (jj_3R_369()) return true;
+ if (jj_3R_character_literal_682_3_369()) return true;
return false;
}
- inline bool jj_3R_684()
+ inline bool jj_3R_entity_tag_1136_1_684()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
return false;
}
- inline bool jj_3R_661()
+ inline bool jj_3R_entity_tag_1136_1_661()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_684()) return false;
+ if (jj_3R_entity_tag_1136_1_684()) {
jj_scanpos = xsp;
- if (jj_3R_685()) return true;
+ if (jj_3R_entity_tag_1137_3_685()) return true;
+ }
return false;
}
- inline bool jj_3R_135()
+ inline bool jj_3R_subprogram_instantiation_declaration_2667_2_135()
{
if (jj_done) return true;
if (jj_scan_token(FUNCTION_T)) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(IS_T)) return true;
if (jj_scan_token(NEW_T)) return true;
- if (jj_3R_63()) return true;
- if (jj_3R_245()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
+ if (jj_3R_signature_2241_1_245()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_284()) jj_scanpos = xsp;
+ if (jj_3R_subprogram_instantiation_declaration_2667_73_284()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_645()
+ inline bool jj_3R_entity_name_list_1105_28_645()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_644()) return true;
+ if (jj_3R_entity_designator_1094_1_644()) return true;
return false;
}
inline bool jj_3_38()
{
if (jj_done) return true;
- if (jj_3R_93()) return true;
+ if (jj_3R_process_statement_1952_1_93()) return true;
return false;
}
inline bool jj_3_37()
{
if (jj_done) return true;
- if (jj_3R_92()) return true;
+ if (jj_3R_concurrent_assertion_statement_758_1_92()) return true;
return false;
}
- inline bool jj_3R_95()
+ inline bool jj_3R_interface_package_declaration_2658_2_95()
{
if (jj_done) return true;
if (jj_scan_token(PACKAGE_T)) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(IS_T)) return true;
if (jj_scan_token(NEW_T)) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_648()) jj_scanpos = xsp;
+ if (jj_3R_interface_package_declaration_2658_55_648()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_435()
+ inline bool jj_3R_context_ref_2625_31_435()
{
if (jj_done) return true;
if (jj_scan_token(DOT_T)) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
- inline bool jj_3R_91()
+ inline bool jj_3R_package_instantiation_declaration_2649_2_91()
{
if (jj_done) return true;
if (jj_scan_token(PACKAGE_T)) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(IS_T)) return true;
if (jj_scan_token(NEW_T)) return true;
- if (jj_3R_63()) return true;
- if (jj_3R_245()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
+ if (jj_3R_signature_2241_1_245()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_246()) jj_scanpos = xsp;
+ if (jj_3R_package_instantiation_declaration_2649_71_246()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_488()
+ inline bool jj_3R_entity_specification_1114_1_488()
{
if (jj_done) return true;
- if (jj_3R_554()) return true;
+ if (jj_3R_entity_name_list_1105_1_554()) return true;
if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_555()) return true;
+ if (jj_3R_entity_class_1012_1_555()) return true;
return false;
}
- inline bool jj_3R_438()
+ inline bool jj_3R_libustcont_stats_2644_6_438()
{
if (jj_done) return true;
- if (jj_3R_348()) return true;
+ if (jj_3R_context_ref_2625_2_348()) return true;
return false;
}
- inline bool jj_3R_437()
+ inline bool jj_3R_libustcont_stats_2643_6_437()
{
if (jj_done) return true;
- if (jj_3R_346()) return true;
+ if (jj_3R_library_clause_1542_2_346()) return true;
return false;
}
- inline bool jj_3R_662()
+ inline bool jj_3R_entity_designator_1094_18_662()
{
if (jj_done) return true;
- if (jj_3R_245()) return true;
+ if (jj_3R_signature_2241_1_245()) return true;
return false;
}
- inline bool jj_3R_349()
+ inline bool jj_3R_libustcont_stats_2642_4_349()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_436()) return false;
+ if (jj_3R_libustcont_stats_2642_4_436()) {
jj_scanpos = xsp;
- if (!jj_3R_437()) return false;
+ if (jj_3R_libustcont_stats_2643_6_437()) {
jj_scanpos = xsp;
- if (jj_3R_438()) return true;
+ if (jj_3R_libustcont_stats_2644_6_438()) return true;
+ }
+ }
return false;
}
- inline bool jj_3R_436()
+ inline bool jj_3R_libustcont_stats_2642_4_436()
{
if (jj_done) return true;
- if (jj_3R_347()) return true;
+ if (jj_3R_use_clause_2467_2_347()) return true;
return false;
}
- inline bool jj_3R_597()
+ inline bool jj_3R_entity_name_list_1107_3_597()
{
if (jj_done) return true;
if (jj_scan_token(ALL_T)) return true;
return false;
}
- inline bool jj_3R_596()
+ inline bool jj_3R_entity_name_list_1106_3_596()
{
if (jj_done) return true;
if (jj_scan_token(OTHER_T)) return true;
return false;
}
- inline bool jj_3R_595()
+ inline bool jj_3R_entity_name_list_1105_1_595()
{
if (jj_done) return true;
- if (jj_3R_644()) return true;
+ if (jj_3R_entity_designator_1094_1_644()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_645()) { jj_scanpos = xsp; break; }
+ if (jj_3R_entity_name_list_1105_28_645()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_554()
+ inline bool jj_3R_entity_name_list_1105_1_554()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_595()) return false;
+ if (jj_3R_entity_name_list_1105_1_595()) {
jj_scanpos = xsp;
- if (!jj_3R_596()) return false;
+ if (jj_3R_entity_name_list_1106_3_596()) {
jj_scanpos = xsp;
- if (jj_3R_597()) return true;
+ if (jj_3R_entity_name_list_1107_3_597()) return true;
+ }
+ }
return false;
}
- inline bool jj_3R_87()
+ inline bool jj_3R_context_declaration_2633_2_87()
{
if (jj_done) return true;
if (jj_scan_token(CONTEXT_T)) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(IS_T)) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_188()) { jj_scanpos = xsp; break; }
+ if (jj_3R_context_declaration_2633_80_188()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(END_T)) return true;
xsp = jj_scanpos;
if (jj_scan_token(32)) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_189()) jj_scanpos = xsp;
+ if (jj_3R_context_declaration_2633_128_189()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_683()
+ inline bool jj_3R_protected_type_declaration_2603_31_683()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
- inline bool jj_3R_263()
+ inline bool jj_3R_wait_statement_2534_97_263()
{
if (jj_done) return true;
- if (jj_3R_382()) return true;
+ if (jj_3R_timeout_clause_2424_1_382()) return true;
return false;
}
- inline bool jj_3R_644()
+ inline bool jj_3R_entity_designator_1094_1_644()
{
if (jj_done) return true;
- if (jj_3R_661()) return true;
+ if (jj_3R_entity_tag_1136_1_661()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_662()) jj_scanpos = xsp;
+ if (jj_3R_entity_designator_1094_18_662()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_348()
+ inline bool jj_3R_context_ref_2625_2_348()
{
if (jj_done) return true;
if (jj_scan_token(CONTEXT_T)) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_435()) { jj_scanpos = xsp; break; }
+ if (jj_3R_context_ref_2625_31_435()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_692()
+ inline bool jj_3R_protected_type_declarative_part_2616_6_692()
{
if (jj_done) return true;
- if (jj_3R_700()) return true;
+ if (jj_3R_protected_type_declarative_item_2609_5_700()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_682()
+ inline bool jj_3R_protected_type_declarative_part_2616_5_682()
{
if (jj_done) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_692()) { jj_scanpos = xsp; break; }
+ if (jj_3R_protected_type_declarative_part_2616_6_692()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_720()
+ inline bool jj_3R_protected_type_declarative_item_2611_7_720()
{
if (jj_done) return true;
- if (jj_3R_347()) return true;
+ if (jj_3R_use_clause_2467_2_347()) return true;
return false;
}
- inline bool jj_3R_719()
+ inline bool jj_3R_protected_type_declarative_item_2610_7_719()
{
if (jj_done) return true;
- if (jj_3R_395()) return true;
+ if (jj_3R_attribute_specification_526_3_395()) return true;
return false;
}
inline bool jj_3_36()
{
if (jj_done) return true;
- if (jj_3R_91()) return true;
+ if (jj_3R_package_instantiation_declaration_2649_2_91()) return true;
return false;
}
inline bool jj_3_34()
{
if (jj_done) return true;
- if (jj_3R_67()) return true;
+ if (jj_3R_attribute_declaration_505_2_67()) return true;
return false;
}
- inline bool jj_3R_718()
+ inline bool jj_3R_protected_type_declarative_item_2609_5_718()
{
if (jj_done) return true;
- if (jj_3R_364()) return true;
+ if (jj_3R_subprogram_specification_2341_2_364()) return true;
return false;
}
- inline bool jj_3R_700()
+ inline bool jj_3R_protected_type_declarative_item_2609_5_700()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_718()) return false;
+ if (jj_3R_protected_type_declarative_item_2609_5_718()) {
jj_scanpos = xsp;
- if (!jj_3R_719()) return false;
+ if (jj_3R_protected_type_declarative_item_2610_7_719()) {
jj_scanpos = xsp;
- if (jj_3R_720()) return true;
+ if (jj_3R_protected_type_declarative_item_2611_7_720()) return true;
+ }
+ }
return false;
}
inline bool jj_3_35()
{
if (jj_done) return true;
- if (jj_3R_68()) return true;
+ if (jj_3R_group_template_declaration_1335_2_68()) return true;
return false;
}
- inline bool jj_3R_558()
+ inline bool jj_3R_entity_class_entry_list_1038_39_558()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_557()) return true;
+ if (jj_3R_entity_class_entry_1033_2_557()) return true;
return false;
}
- inline bool jj_3R_681()
+ inline bool jj_3R_protected_type_body_2567_38_681()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
- inline bool jj_3R_262()
+ inline bool jj_3R_wait_statement_2534_71_262()
{
if (jj_done) return true;
- if (jj_3R_381()) return true;
+ if (jj_3R_condition_clause_814_3_381()) return true;
return false;
}
- inline bool jj_3R_660()
+ inline bool jj_3R_protected_type_declaration_2599_4_660()
{
if (jj_done) return true;
if (jj_scan_token(PROTECTED_T)) return true;
- if (jj_3R_682()) return true;
+ if (jj_3R_protected_type_declarative_part_2616_5_682()) return true;
if (jj_scan_token(END_T)) return true;
if (jj_scan_token(PROTECTED_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_683()) jj_scanpos = xsp;
+ if (jj_3R_protected_type_declaration_2603_31_683()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_691()
+ inline bool jj_3R_protected_type_body_declarative_part_2593_7_691()
{
if (jj_done) return true;
- if (jj_3R_699()) return true;
+ if (jj_3R_protected_type_body_declarative_item_2572_5_699()) return true;
return false;
}
inline bool jj_3_112()
{
if (jj_done) return true;
- if (jj_3R_67()) return true;
+ if (jj_3R_attribute_declaration_505_2_67()) return true;
return false;
}
- inline bool jj_3R_680()
+ inline bool jj_3R_protected_type_body_declarative_part_2593_5_680()
{
if (jj_done) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_691()) { jj_scanpos = xsp; break; }
+ if (jj_3R_protected_type_body_declarative_part_2593_7_691()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_717()
+ inline bool jj_3R_protected_type_body_declarative_item_2587_7_717()
{
if (jj_done) return true;
- if (jj_3R_398()) return true;
+ if (jj_3R_group_declaration_1327_3_398()) return true;
return false;
}
inline bool jj_3_113()
{
if (jj_done) return true;
- if (jj_3R_68()) return true;
+ if (jj_3R_group_template_declaration_1335_2_68()) return true;
return false;
}
- inline bool jj_3R_716()
+ inline bool jj_3R_protected_type_body_declarative_item_2584_7_716()
{
if (jj_done) return true;
- if (jj_3R_347()) return true;
+ if (jj_3R_use_clause_2467_2_347()) return true;
return false;
}
- inline bool jj_3R_715()
+ inline bool jj_3R_protected_type_body_declarative_item_2583_7_715()
{
if (jj_done) return true;
- if (jj_3R_395()) return true;
+ if (jj_3R_attribute_specification_526_3_395()) return true;
return false;
}
- inline bool jj_3R_618()
+ inline bool jj_3R_entity_class_entry_1033_21_618()
{
if (jj_done) return true;
if (jj_scan_token(BOX_T)) return true;
return false;
}
- inline bool jj_3R_714()
+ inline bool jj_3R_protected_type_body_declarative_item_2581_7_714()
{
if (jj_done) return true;
- if (jj_3R_67()) return true;
+ if (jj_3R_attribute_declaration_505_2_67()) return true;
return false;
}
- inline bool jj_3R_713()
+ inline bool jj_3R_protected_type_body_declarative_item_2579_7_713()
{
if (jj_done) return true;
- if (jj_3R_393()) return true;
+ if (jj_3R_alias_declaration_401_2_393()) return true;
return false;
}
- inline bool jj_3R_712()
+ inline bool jj_3R_protected_type_body_declarative_item_2578_7_712()
{
if (jj_done) return true;
- if (jj_3R_392()) return true;
+ if (jj_3R_file_declaration_1199_2_392()) return true;
return false;
}
- inline bool jj_3R_711()
+ inline bool jj_3R_protected_type_body_declarative_item_2577_7_711()
{
if (jj_done) return true;
- if (jj_3R_391()) return true;
+ if (jj_3R_variable_declaration_2503_1_391()) return true;
return false;
}
- inline bool jj_3R_366()
+ inline bool jj_3R_entity_declaration_1044_5_366()
{
if (jj_done) return true;
if (jj_scan_token(ENTITY_T)) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
- inline bool jj_3R_710()
+ inline bool jj_3R_protected_type_body_declarative_item_2576_7_710()
{
if (jj_done) return true;
- if (jj_3R_389()) return true;
+ if (jj_3R_constant_declaration_877_4_389()) return true;
return false;
}
- inline bool jj_3R_709()
+ inline bool jj_3R_protected_type_body_declarative_item_2575_7_709()
{
if (jj_done) return true;
- if (jj_3R_388()) return true;
+ if (jj_3R_subtype_declaration_2382_1_388()) return true;
return false;
}
- inline bool jj_3R_708()
+ inline bool jj_3R_protected_type_body_declarative_item_2574_7_708()
{
if (jj_done) return true;
- if (jj_3R_387()) return true;
+ if (jj_3R_type_declaration_2437_1_387()) return true;
return false;
}
- inline bool jj_3R_707()
+ inline bool jj_3R_protected_type_body_declarative_item_2573_7_707()
{
if (jj_done) return true;
- if (jj_3R_540()) return true;
+ if (jj_3R_subprogram_body_2271_1_540()) return true;
return false;
}
- inline bool jj_3R_706()
+ inline bool jj_3R_protected_type_body_declarative_item_2572_5_706()
{
if (jj_done) return true;
- if (jj_3R_98()) return true;
+ if (jj_3R_subprogram_declaration_2294_1_98()) return true;
return false;
}
- inline bool jj_3R_699()
+ inline bool jj_3R_protected_type_body_declarative_item_2572_5_699()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_706()) return false;
+ if (jj_3R_protected_type_body_declarative_item_2572_5_706()) {
jj_scanpos = xsp;
- if (!jj_3R_707()) return false;
+ if (jj_3R_protected_type_body_declarative_item_2573_7_707()) {
jj_scanpos = xsp;
- if (!jj_3R_708()) return false;
+ if (jj_3R_protected_type_body_declarative_item_2574_7_708()) {
jj_scanpos = xsp;
- if (!jj_3R_709()) return false;
+ if (jj_3R_protected_type_body_declarative_item_2575_7_709()) {
jj_scanpos = xsp;
- if (!jj_3R_710()) return false;
+ if (jj_3R_protected_type_body_declarative_item_2576_7_710()) {
jj_scanpos = xsp;
- if (!jj_3R_711()) return false;
+ if (jj_3R_protected_type_body_declarative_item_2577_7_711()) {
jj_scanpos = xsp;
- if (!jj_3R_712()) return false;
+ if (jj_3R_protected_type_body_declarative_item_2578_7_712()) {
jj_scanpos = xsp;
- if (!jj_3R_713()) return false;
+ if (jj_3R_protected_type_body_declarative_item_2579_7_713()) {
jj_scanpos = xsp;
- if (!jj_3R_714()) return false;
+ if (jj_3R_protected_type_body_declarative_item_2581_7_714()) {
jj_scanpos = xsp;
- if (!jj_3R_715()) return false;
+ if (jj_3R_protected_type_body_declarative_item_2583_7_715()) {
jj_scanpos = xsp;
- if (!jj_3R_716()) return false;
+ if (jj_3R_protected_type_body_declarative_item_2584_7_716()) {
jj_scanpos = xsp;
- if (!jj_3_113()) return false;
+ if (jj_3_113()) {
jj_scanpos = xsp;
- if (jj_3R_717()) return true;
+ if (jj_3R_protected_type_body_declarative_item_2587_7_717()) return true;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_261()
+ inline bool jj_3R_wait_statement_2534_43_261()
{
if (jj_done) return true;
- if (jj_3R_380()) return true;
+ if (jj_3R_sensitivity_clause_2112_2_380()) return true;
return false;
}
- inline bool jj_3R_491()
+ inline bool jj_3R_entity_class_entry_list_1038_2_491()
{
if (jj_done) return true;
- if (jj_3R_557()) return true;
+ if (jj_3R_entity_class_entry_1033_2_557()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_558()) { jj_scanpos = xsp; break; }
+ if (jj_3R_entity_class_entry_list_1038_39_558()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_557()
+ inline bool jj_3R_entity_class_entry_1033_2_557()
{
if (jj_done) return true;
- if (jj_3R_555()) return true;
+ if (jj_3R_entity_class_1012_1_555()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_618()) jj_scanpos = xsp;
+ if (jj_3R_entity_class_entry_1033_21_618()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_544()
+ inline bool jj_3R_waveform_element_2551_19_544()
{
if (jj_done) return true;
if (jj_scan_token(AFTER_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
return false;
}
- inline bool jj_3R_626()
+ inline bool jj_3R_entity_aspect_1005_27_626()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_143()
+ inline bool jj_3R_protected_type_body_2563_4_143()
{
if (jj_done) return true;
if (jj_scan_token(PROTECTED_T)) return true;
if (jj_scan_token(BODY_T)) return true;
- if (jj_3R_680()) return true;
+ if (jj_3R_protected_type_body_declarative_part_2593_5_680()) return true;
if (jj_scan_token(END_T)) return true;
if (jj_scan_token(PROTECTED_T)) return true;
if (jj_scan_token(BODY_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_681()) jj_scanpos = xsp;
+ if (jj_3R_protected_type_body_2567_38_681()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_614()
+ inline bool jj_3R_entity_class_1028_3_614()
{
if (jj_done) return true;
if (jj_scan_token(FILE_T)) return true;
return false;
}
- inline bool jj_3R_519()
+ inline bool jj_3R_waveform_2543_23_519()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_463()) return true;
+ if (jj_3R_waveform_element_2551_2_463()) return true;
return false;
}
- inline bool jj_3R_613()
+ inline bool jj_3R_entity_class_1027_3_613()
{
if (jj_done) return true;
if (jj_scan_token(GROUP_T)) return true;
return false;
}
- inline bool jj_3R_612()
+ inline bool jj_3R_entity_class_1026_3_612()
{
if (jj_done) return true;
if (jj_scan_token(UNITS_T)) return true;
return false;
}
- inline bool jj_3R_611()
+ inline bool jj_3R_entity_class_1025_3_611()
{
if (jj_done) return true;
if (jj_scan_token(LITERAL_T)) return true;
return false;
}
- inline bool jj_3R_610()
+ inline bool jj_3R_entity_class_1024_3_610()
{
if (jj_done) return true;
if (jj_scan_token(LABEL_T)) return true;
return false;
}
- inline bool jj_3R_609()
+ inline bool jj_3R_entity_class_1023_3_609()
{
if (jj_done) return true;
if (jj_scan_token(COMPONENT_T)) return true;
return false;
}
- inline bool jj_3R_608()
+ inline bool jj_3R_entity_class_1022_3_608()
{
if (jj_done) return true;
if (jj_scan_token(VARIABLE_T)) return true;
return false;
}
- inline bool jj_3R_607()
+ inline bool jj_3R_entity_class_1021_3_607()
{
if (jj_done) return true;
if (jj_scan_token(SIGNAL_T)) return true;
return false;
}
- inline bool jj_3R_606()
+ inline bool jj_3R_entity_class_1020_3_606()
{
if (jj_done) return true;
if (jj_scan_token(CONSTANT_T)) return true;
return false;
}
- inline bool jj_3R_605()
+ inline bool jj_3R_entity_class_1019_3_605()
{
if (jj_done) return true;
if (jj_scan_token(SUBTYPE_T)) return true;
return false;
}
- inline bool jj_3R_604()
+ inline bool jj_3R_entity_class_1018_3_604()
{
if (jj_done) return true;
if (jj_scan_token(TYPE_T)) return true;
return false;
}
- inline bool jj_3R_603()
+ inline bool jj_3R_entity_class_1017_3_603()
{
if (jj_done) return true;
if (jj_scan_token(PACKAGE_T)) return true;
return false;
}
- inline bool jj_3R_602()
+ inline bool jj_3R_entity_class_1016_3_602()
{
if (jj_done) return true;
if (jj_scan_token(FUNCTION_T)) return true;
return false;
}
- inline bool jj_3R_601()
+ inline bool jj_3R_entity_class_1015_3_601()
{
if (jj_done) return true;
if (jj_scan_token(PROCEDURE_T)) return true;
return false;
}
- inline bool jj_3R_463()
+ inline bool jj_3R_waveform_element_2551_2_463()
{
if (jj_done) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_544()) jj_scanpos = xsp;
+ if (jj_3R_waveform_element_2551_19_544()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_600()
+ inline bool jj_3R_entity_class_1014_3_600()
{
if (jj_done) return true;
if (jj_scan_token(CONFIGURATION_T)) return true;
return false;
}
- inline bool jj_3R_599()
+ inline bool jj_3R_entity_class_1013_3_599()
{
if (jj_done) return true;
if (jj_scan_token(ARCHITECTURE_T)) return true;
return false;
}
- inline bool jj_3R_598()
+ inline bool jj_3R_entity_class_1012_1_598()
{
if (jj_done) return true;
if (jj_scan_token(ENTITY_T)) return true;
return false;
}
- inline bool jj_3R_555()
+ inline bool jj_3R_entity_class_1012_1_555()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_598()) return false;
+ if (jj_3R_entity_class_1012_1_598()) {
jj_scanpos = xsp;
- if (!jj_3R_599()) return false;
+ if (jj_3R_entity_class_1013_3_599()) {
jj_scanpos = xsp;
- if (!jj_3R_600()) return false;
+ if (jj_3R_entity_class_1014_3_600()) {
jj_scanpos = xsp;
- if (!jj_3R_601()) return false;
+ if (jj_3R_entity_class_1015_3_601()) {
jj_scanpos = xsp;
- if (!jj_3R_602()) return false;
+ if (jj_3R_entity_class_1016_3_602()) {
jj_scanpos = xsp;
- if (!jj_3R_603()) return false;
+ if (jj_3R_entity_class_1017_3_603()) {
jj_scanpos = xsp;
- if (!jj_3R_604()) return false;
+ if (jj_3R_entity_class_1018_3_604()) {
jj_scanpos = xsp;
- if (!jj_3R_605()) return false;
+ if (jj_3R_entity_class_1019_3_605()) {
jj_scanpos = xsp;
- if (!jj_3R_606()) return false;
+ if (jj_3R_entity_class_1020_3_606()) {
jj_scanpos = xsp;
- if (!jj_3R_607()) return false;
+ if (jj_3R_entity_class_1021_3_607()) {
jj_scanpos = xsp;
- if (!jj_3R_608()) return false;
+ if (jj_3R_entity_class_1022_3_608()) {
jj_scanpos = xsp;
- if (!jj_3R_609()) return false;
+ if (jj_3R_entity_class_1023_3_609()) {
jj_scanpos = xsp;
- if (!jj_3R_610()) return false;
+ if (jj_3R_entity_class_1024_3_610()) {
jj_scanpos = xsp;
- if (!jj_3R_611()) return false;
+ if (jj_3R_entity_class_1025_3_611()) {
jj_scanpos = xsp;
- if (!jj_3R_612()) return false;
+ if (jj_3R_entity_class_1026_3_612()) {
jj_scanpos = xsp;
- if (!jj_3R_613()) return false;
+ if (jj_3R_entity_class_1027_3_613()) {
jj_scanpos = xsp;
- if (jj_3R_614()) return true;
+ if (jj_3R_entity_class_1028_3_614()) return true;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_422()
+ inline bool jj_3R_waveform_2545_1_422()
{
if (jj_done) return true;
if (jj_scan_token(UNAFFECTED_T)) return true;
return false;
}
- inline bool jj_3R_576()
+ inline bool jj_3R_entity_aspect_1007_3_576()
{
if (jj_done) return true;
if (jj_scan_token(OPEN_T)) return true;
return false;
}
- inline bool jj_3R_575()
+ inline bool jj_3R_entity_aspect_1006_3_575()
{
if (jj_done) return true;
if (jj_scan_token(CONFIGURATION_T)) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
return false;
}
- inline bool jj_3R_332()
+ inline bool jj_3R_waveform_2543_1_332()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_421()) return false;
+ if (jj_3R_waveform_2543_1_421()) {
jj_scanpos = xsp;
- if (jj_3R_422()) return true;
+ if (jj_3R_waveform_2545_1_422()) return true;
+ }
return false;
}
- inline bool jj_3R_421()
+ inline bool jj_3R_waveform_2543_1_421()
{
if (jj_done) return true;
- if (jj_3R_463()) return true;
+ if (jj_3R_waveform_element_2551_2_463()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_519()) { jj_scanpos = xsp; break; }
+ if (jj_3R_waveform_2543_23_519()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_574()
+ inline bool jj_3R_entity_aspect_1005_1_574()
{
if (jj_done) return true;
if (jj_scan_token(ENTITY_T)) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_626()) jj_scanpos = xsp;
+ if (jj_3R_entity_aspect_1005_27_626()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_521()
+ inline bool jj_3R_entity_aspect_1005_1_521()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_574()) return false;
+ if (jj_3R_entity_aspect_1005_1_574()) {
jj_scanpos = xsp;
- if (!jj_3R_575()) return false;
+ if (jj_3R_entity_aspect_1006_3_575()) {
jj_scanpos = xsp;
- if (jj_3R_576()) return true;
+ if (jj_3R_entity_aspect_1007_3_576()) return true;
+ }
+ }
return false;
}
- inline bool jj_3R_260()
+ inline bool jj_3R_wait_statement_2534_3_260()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_122()
+ inline bool jj_3R_wait_statement_2534_1_122()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_260()) jj_scanpos = xsp;
+ if (jj_3R_wait_statement_2534_3_260()) jj_scanpos = xsp;
if (jj_scan_token(WAIT_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_261()) jj_scanpos = xsp;
+ if (jj_3R_wait_statement_2534_43_261()) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_262()) jj_scanpos = xsp;
+ if (jj_3R_wait_statement_2534_71_262()) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_263()) jj_scanpos = xsp;
+ if (jj_3R_wait_statement_2534_97_263()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_705()
+ inline bool jj_3R_element_declaration_983_3_705()
{
if (jj_done) return true;
- if (jj_3R_205()) return true;
+ if (jj_3R_identifier_list_1354_4_205()) return true;
if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_89()) return true;
+ if (jj_3R_subtype_indication_2398_3_89()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
inline bool jj_3_33()
{
if (jj_done) return true;
- if (jj_3R_90()) return true;
+ if (jj_3R_choices_703_3_90()) return true;
if (jj_scan_token(ARROW_T)) return true;
return false;
}
inline bool jj_3_32()
{
if (jj_done) return true;
- if (jj_3R_89()) return true;
+ if (jj_3R_subtype_indication_2398_3_89()) return true;
return false;
}
- inline bool jj_3R_723()
+ inline bool jj_3R_unconstraint_array_definition_2461_53_723()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_722()) return true;
+ if (jj_3R_index_subtype_definition_1407_2_722()) return true;
return false;
}
inline bool jj_3_31()
{
if (jj_done) return true;
- if (jj_3R_88()) return true;
+ if (jj_3R_range_2008_4_88()) return true;
return false;
}
- inline bool jj_3R_376()
+ inline bool jj_3R_element_association_973_2_376()
{
if (jj_done) return true;
- if (jj_3R_90()) return true;
+ if (jj_3R_choices_703_3_90()) return true;
if (jj_scan_token(ARROW_T)) return true;
return false;
}
- inline bool jj_3R_247()
+ inline bool jj_3R_element_association_973_1_247()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_376()) jj_scanpos = xsp;
- if (jj_3R_61()) return true;
+ if (jj_3R_element_association_973_2_376()) jj_scanpos = xsp;
+ if (jj_3R_expression_1168_1_61()) return true;
return false;
}
- inline bool jj_3R_480()
+ inline bool jj_3R_variable_declaration_2504_3_480()
{
if (jj_done) return true;
if (jj_scan_token(VARASSIGN_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
return false;
}
- inline bool jj_3R_168()
+ inline bool jj_3R_discrete_range_967_3_168()
{
if (jj_done) return true;
- if (jj_3R_89()) return true;
+ if (jj_3R_subtype_indication_2398_3_89()) return true;
return false;
}
- inline bool jj_3R_391()
+ inline bool jj_3R_variable_declaration_2503_1_391()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
if (jj_scan_token(101)) jj_scanpos = xsp;
if (jj_scan_token(VARIABLE_T)) return true;
- if (jj_3R_205()) return true;
+ if (jj_3R_identifier_list_1354_4_205()) return true;
if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_89()) return true;
+ if (jj_3R_subtype_indication_2398_3_89()) return true;
xsp = jj_scanpos;
- if (jj_3R_480()) jj_scanpos = xsp;
+ if (jj_3R_variable_declaration_2504_3_480()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_167()
+ inline bool jj_3R_discrete_range_964_3_167()
{
if (jj_done) return true;
- if (jj_3R_88()) return true;
+ if (jj_3R_range_2008_4_88()) return true;
return false;
}
- inline bool jj_3R_72()
+ inline bool jj_3R_discrete_range_964_3_72()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_167()) return false;
+ if (jj_3R_discrete_range_964_3_167()) {
jj_scanpos = xsp;
- if (jj_3R_168()) return true;
+ if (jj_3R_discrete_range_967_3_168()) return true;
+ }
return false;
}
- inline bool jj_3R_458()
+ inline bool jj_3R_variable_assignment_statement_2498_2_458()
{
if (jj_done) return true;
- if (jj_3R_542()) return true;
+ if (jj_3R_selected_variable_assignment_2844_3_542()) return true;
return false;
}
- inline bool jj_3R_489()
+ inline bool jj_3R_guarded_signal_specificatio_959_2_489()
{
if (jj_done) return true;
- if (jj_3R_556()) return true;
+ if (jj_3R_signal_list_2234_2_556()) return true;
if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
return false;
}
inline bool jj_3_111()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_378()
+ inline bool jj_3R_variable_assignment_statement_2494_1_378()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_457()) return false;
+ if (jj_3R_variable_assignment_statement_2494_1_457()) {
jj_scanpos = xsp;
- if (jj_3R_458()) return true;
+ if (jj_3R_variable_assignment_statement_2498_2_458()) return true;
+ }
return false;
}
- inline bool jj_3R_457()
+ inline bool jj_3R_variable_assignment_statement_2494_1_457()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
if (jj_3_111()) jj_scanpos = xsp;
- if (jj_3R_119()) return true;
+ if (jj_3R_target_2413_2_119()) return true;
if (jj_scan_token(VARASSIGN_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_490()
+ inline bool jj_3R_use_clause_2467_28_490()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_434()) return true;
+ if (jj_3R_selected_name_2095_2_434()) return true;
return false;
}
- inline bool jj_3R_397()
+ inline bool jj_3R_disconnection_specification_954_1_397()
{
if (jj_done) return true;
if (jj_scan_token(DISCONNECT_T)) return true;
- if (jj_3R_489()) return true;
+ if (jj_3R_guarded_signal_specificatio_959_2_489()) return true;
if (jj_scan_token(AFTER_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_166()
+ inline bool jj_3R_direction_949_3_166()
{
if (jj_done) return true;
if (jj_scan_token(DOWNTO_T)) return true;
return false;
}
- inline bool jj_3R_477()
+ inline bool jj_3R_constant_declaration_877_74_477()
{
if (jj_done) return true;
if (jj_scan_token(VARASSIGN_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
return false;
}
- inline bool jj_3R_165()
+ inline bool jj_3R_direction_948_1_165()
{
if (jj_done) return true;
if (jj_scan_token(TO_T)) return true;
return false;
}
- inline bool jj_3R_71()
+ inline bool jj_3R_direction_948_1_71()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_165()) return false;
+ if (jj_3R_direction_948_1_165()) {
jj_scanpos = xsp;
- if (jj_3R_166()) return true;
+ if (jj_3R_direction_949_3_166()) return true;
+ }
return false;
}
- inline bool jj_3R_581()
+ inline bool jj_3R_designator_943_4_581()
{
if (jj_done) return true;
- if (jj_3R_321()) return true;
+ if (jj_3R_operator_symbol_1721_1_321()) return true;
return false;
}
- inline bool jj_3R_580()
+ inline bool jj_3R_designator_942_2_580()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
- inline bool jj_3R_536()
+ inline bool jj_3R_designator_942_2_536()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_580()) return false;
+ if (jj_3R_designator_942_2_580()) {
jj_scanpos = xsp;
- if (jj_3R_581()) return true;
+ if (jj_3R_designator_943_4_581()) return true;
+ }
return false;
}
- inline bool jj_3R_347()
+ inline bool jj_3R_use_clause_2467_2_347()
{
if (jj_done) return true;
if (jj_scan_token(USE_T)) return true;
- if (jj_3R_434()) return true;
+ if (jj_3R_selected_name_2095_2_434()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_490()) { jj_scanpos = xsp; break; }
+ if (jj_3R_use_clause_2467_28_490()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(SEMI_T)) return true;
return false;
inline bool jj_3_106()
{
if (jj_done) return true;
- if (jj_3R_139()) return true;
+ if (jj_3R_constraint_901_5_139()) return true;
return false;
}
- inline bool jj_3R_573()
+ inline bool jj_3R_delay_mechanism_925_5_573()
{
if (jj_done) return true;
if (jj_scan_token(REJECT_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
return false;
}
- inline bool jj_3R_518()
+ inline bool jj_3R_delay_mechanism_925_3_518()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_573()) jj_scanpos = xsp;
+ if (jj_3R_delay_mechanism_925_5_573()) jj_scanpos = xsp;
if (jj_scan_token(INERTIAL_T)) return true;
return false;
}
- inline bool jj_3R_704()
+ inline bool jj_3R_unconstraint_array_definition_2461_1_704()
{
if (jj_done) return true;
if (jj_scan_token(ARRAY_T)) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_722()) return true;
+ if (jj_3R_index_subtype_definition_1407_2_722()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_723()) { jj_scanpos = xsp; break; }
+ if (jj_3R_unconstraint_array_definition_2461_53_723()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(RPAREN_T)) return true;
if (jj_scan_token(OF_T)) return true;
- if (jj_3R_89()) return true;
+ if (jj_3R_subtype_indication_2398_3_89()) return true;
return false;
}
- inline bool jj_3R_517()
+ inline bool jj_3R_delay_mechanism_924_1_517()
{
if (jj_done) return true;
if (jj_scan_token(TRANSPORT_T)) return true;
inline bool jj_3_30()
{
if (jj_done) return true;
- if (jj_3R_87()) return true;
+ if (jj_3R_context_declaration_2633_2_87()) return true;
return false;
}
- inline bool jj_3R_420()
+ inline bool jj_3R_delay_mechanism_924_1_420()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_517()) return false;
+ if (jj_3R_delay_mechanism_924_1_517()) {
jj_scanpos = xsp;
- if (jj_3R_518()) return true;
+ if (jj_3R_delay_mechanism_925_3_518()) return true;
+ }
return false;
}
- inline bool jj_3R_161()
+ inline bool jj_3R_type_mark_2456_3_161()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
return false;
}
- inline bool jj_3R_193()
+ inline bool jj_3R_subtype_indication_2398_58_193()
{
if (jj_done) return true;
- if (jj_3R_139()) return true;
+ if (jj_3R_constraint_901_5_139()) return true;
return false;
}
- inline bool jj_3R_643()
+ inline bool jj_3R_type_definition_2451_3_643()
{
if (jj_done) return true;
- if (jj_3R_660()) return true;
+ if (jj_3R_protected_type_declaration_2599_4_660()) return true;
return false;
}
inline bool jj_3_29()
{
if (jj_done) return true;
- if (jj_3R_65()) return true;
+ if (jj_3R_index_constraint_1395_3_65()) return true;
return false;
}
- inline bool jj_3R_187()
+ inline bool jj_3R_context_item_913_3_187()
{
if (jj_done) return true;
- if (jj_3R_348()) return true;
+ if (jj_3R_context_ref_2625_2_348()) return true;
return false;
}
inline bool jj_3_28()
{
if (jj_done) return true;
- if (jj_3R_86()) return true;
+ if (jj_3R_range_constraint_2017_1_86()) return true;
return false;
}
inline bool jj_3_110()
{
if (jj_done) return true;
- if (jj_3R_143()) return true;
+ if (jj_3R_protected_type_body_2563_4_143()) return true;
return false;
}
- inline bool jj_3R_642()
+ inline bool jj_3R_type_definition_2447_3_642()
{
if (jj_done) return true;
- if (jj_3R_659()) return true;
+ if (jj_3R_file_type_definition_1219_2_659()) return true;
return false;
}
- inline bool jj_3R_186()
+ inline bool jj_3R_context_item_912_3_186()
{
if (jj_done) return true;
- if (jj_3R_87()) return true;
+ if (jj_3R_context_declaration_2633_2_87()) return true;
return false;
}
- inline bool jj_3R_641()
+ inline bool jj_3R_type_definition_2446_3_641()
{
if (jj_done) return true;
- if (jj_3R_658()) return true;
+ if (jj_3R_access_type_definition_349_3_658()) return true;
return false;
}
- inline bool jj_3R_185()
+ inline bool jj_3R_context_item_911_3_185()
{
if (jj_done) return true;
- if (jj_3R_347()) return true;
+ if (jj_3R_use_clause_2467_2_347()) return true;
return false;
}
- inline bool jj_3R_640()
+ inline bool jj_3R_type_definition_2445_3_640()
{
if (jj_done) return true;
- if (jj_3R_657()) return true;
+ if (jj_3R_composite_type_definition_752_2_657()) return true;
return false;
}
- inline bool jj_3R_184()
+ inline bool jj_3R_context_item_910_2_184()
{
if (jj_done) return true;
- if (jj_3R_346()) return true;
+ if (jj_3R_library_clause_1542_2_346()) return true;
return false;
}
- inline bool jj_3R_85()
+ inline bool jj_3R_context_item_910_2_85()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_184()) return false;
+ if (jj_3R_context_item_910_2_184()) {
jj_scanpos = xsp;
- if (!jj_3R_185()) return false;
+ if (jj_3R_context_item_911_3_185()) {
jj_scanpos = xsp;
- if (!jj_3R_186()) return false;
+ if (jj_3R_context_item_912_3_186()) {
jj_scanpos = xsp;
- if (jj_3R_187()) return true;
+ if (jj_3R_context_item_913_3_187()) return true;
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_639()
+ inline bool jj_3R_type_definition_2444_1_639()
{
if (jj_done) return true;
- if (jj_3R_656()) return true;
+ if (jj_3R_scalar_type_definition_2074_1_656()) return true;
return false;
}
- inline bool jj_3R_588()
+ inline bool jj_3R_type_definition_2444_1_588()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_639()) return false;
+ if (jj_3R_type_definition_2444_1_639()) {
jj_scanpos = xsp;
- if (!jj_3R_640()) return false;
+ if (jj_3R_type_definition_2445_3_640()) {
jj_scanpos = xsp;
- if (!jj_3R_641()) return false;
+ if (jj_3R_type_definition_2446_3_641()) {
jj_scanpos = xsp;
- if (!jj_3R_642()) return false;
+ if (jj_3R_type_definition_2447_3_642()) {
jj_scanpos = xsp;
- if (!jj_3_110()) return false;
+ if (jj_3_110()) {
jj_scanpos = xsp;
- if (jj_3R_643()) return true;
+ if (jj_3R_type_definition_2451_3_643()) return true;
+ }
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_286()
+ inline bool jj_3R_constraint_904_5_286()
{
if (jj_done) return true;
- if (jj_3R_65()) return true;
+ if (jj_3R_index_constraint_1395_3_65()) return true;
return false;
}
- inline bool jj_3R_192()
+ inline bool jj_3R_subtype_indication_2398_45_192()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
return false;
}
- inline bool jj_3R_476()
+ inline bool jj_3R_type_declaration_2439_3_476()
{
if (jj_done) return true;
- if (jj_3R_547()) return true;
+ if (jj_3R_incomplete_type_declaration_1387_3_547()) return true;
return false;
}
- inline bool jj_3R_139()
+ inline bool jj_3R_constraint_901_5_139()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_285()) return false;
+ if (jj_3R_constraint_901_5_285()) {
jj_scanpos = xsp;
- if (jj_3R_286()) return true;
+ if (jj_3R_constraint_904_5_286()) return true;
+ }
return false;
}
- inline bool jj_3R_285()
+ inline bool jj_3R_constraint_901_5_285()
{
if (jj_done) return true;
- if (jj_3R_86()) return true;
+ if (jj_3R_range_constraint_2017_1_86()) return true;
return false;
}
inline bool jj_3_109()
{
if (jj_done) return true;
- if (jj_3R_142()) return true;
+ if (jj_3R_full_type_declaration_1246_3_142()) return true;
return false;
}
- inline bool jj_3R_387()
+ inline bool jj_3R_type_declaration_2437_1_387()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3_109()) return false;
+ if (jj_3_109()) {
jj_scanpos = xsp;
- if (jj_3R_476()) return true;
+ if (jj_3R_type_declaration_2439_3_476()) return true;
+ }
return false;
}
inline bool jj_3_27()
{
if (jj_done) return true;
- if (jj_3R_85()) return true;
+ if (jj_3R_context_item_910_2_85()) return true;
return false;
}
- inline bool jj_3R_111()
+ inline bool jj_3R_type_conversion_2432_3_111()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
inline bool jj_3_108()
{
if (jj_done) return true;
- if (jj_3R_140()) return true;
- if (jj_3R_141()) return true;
+ if (jj_3R_multiplying_operation_1624_1_140()) return true;
+ if (jj_3R_factor_1189_1_141()) return true;
return false;
}
- inline bool jj_3R_703()
+ inline bool jj_3R_constraint_array_definition_890_1_703()
{
if (jj_done) return true;
if (jj_scan_token(ARRAY_T)) return true;
- if (jj_3R_65()) return true;
+ if (jj_3R_index_constraint_1395_3_65()) return true;
if (jj_scan_token(OF_T)) return true;
- if (jj_3R_89()) return true;
+ if (jj_3R_subtype_indication_2398_3_89()) return true;
return false;
}
- inline bool jj_3R_382()
+ inline bool jj_3R_timeout_clause_2424_1_382()
{
if (jj_done) return true;
if (jj_scan_token(FOR_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
return false;
}
- inline bool jj_3R_134()
+ inline bool jj_3R_term_2419_2_134()
{
if (jj_done) return true;
- if (jj_3R_141()) return true;
+ if (jj_3R_factor_1189_1_141()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
return false;
}
- inline bool jj_3R_256()
+ inline bool jj_3R_target_2414_3_256()
{
if (jj_done) return true;
- if (jj_3R_114()) return true;
+ if (jj_3R_aggregate_396_3_114()) return true;
return false;
}
- inline bool jj_3R_389()
+ inline bool jj_3R_constant_declaration_877_4_389()
{
if (jj_done) return true;
if (jj_scan_token(CONSTANT_T)) return true;
- if (jj_3R_205()) return true;
+ if (jj_3R_identifier_list_1354_4_205()) return true;
if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_89()) return true;
+ if (jj_3R_subtype_indication_2398_3_89()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_477()) jj_scanpos = xsp;
+ if (jj_3R_constant_declaration_877_74_477()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_119()
+ inline bool jj_3R_target_2413_2_119()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_255()) return false;
+ if (jj_3R_target_2413_2_255()) {
jj_scanpos = xsp;
- if (jj_3R_256()) return true;
+ if (jj_3R_target_2414_3_256()) return true;
+ }
return false;
}
inline bool jj_3_107()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
return false;
}
- inline bool jj_3R_255()
+ inline bool jj_3R_target_2413_2_255()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
return false;
}
inline bool jj_3_26()
{
if (jj_done) return true;
- if (jj_3R_84()) return true;
+ if (jj_3R_component_configuration_708_5_84()) return true;
return false;
}
- inline bool jj_3R_228()
+ inline bool jj_3R_suffix_2408_3_228()
{
if (jj_done) return true;
if (jj_scan_token(ALL_T)) return true;
return false;
}
- inline bool jj_3R_227()
+ inline bool jj_3R_suffix_2407_3_227()
{
if (jj_done) return true;
- if (jj_3R_321()) return true;
+ if (jj_3R_operator_symbol_1721_1_321()) return true;
return false;
}
- inline bool jj_3R_226()
+ inline bool jj_3R_suffix_2406_3_226()
{
if (jj_done) return true;
- if (jj_3R_369()) return true;
+ if (jj_3R_character_literal_682_3_369()) return true;
return false;
}
- inline bool jj_3R_396()
+ inline bool jj_3R_configuration_specification_872_1_396()
{
if (jj_done) return true;
if (jj_scan_token(FOR_T)) return true;
- if (jj_3R_181()) return true;
- if (jj_3R_344()) return true;
+ if (jj_3R_component_specification_747_1_181()) return true;
+ if (jj_3R_binding_indication_567_2_344()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_579()
+ inline bool jj_3R_configuration_item_866_4_579()
{
if (jj_done) return true;
- if (jj_3R_345()) return true;
+ if (jj_3R_block_configuration_585_5_345()) return true;
return false;
}
- inline bool jj_3R_105()
+ inline bool jj_3R_suffix_2404_1_105()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_225()) return false;
+ if (jj_3R_suffix_2404_1_225()) {
jj_scanpos = xsp;
- if (!jj_3R_226()) return false;
+ if (jj_3R_suffix_2406_3_226()) {
jj_scanpos = xsp;
- if (!jj_3R_227()) return false;
+ if (jj_3R_suffix_2407_3_227()) {
jj_scanpos = xsp;
- if (jj_3R_228()) return true;
+ if (jj_3R_suffix_2408_3_228()) return true;
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_225()
+ inline bool jj_3R_suffix_2404_1_225()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
return false;
}
inline bool jj_3_105()
{
if (jj_done) return true;
- if (jj_3R_138()) return true;
+ if (jj_3R_reslution_indication_2391_3_138()) return true;
return false;
}
- inline bool jj_3R_578()
+ inline bool jj_3R_configuration_item_864_2_578()
{
if (jj_done) return true;
- if (jj_3R_84()) return true;
+ if (jj_3R_component_configuration_708_5_84()) return true;
return false;
}
- inline bool jj_3R_523()
+ inline bool jj_3R_configuration_item_864_2_523()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_578()) return false;
+ if (jj_3R_configuration_item_864_2_578()) {
jj_scanpos = xsp;
- if (jj_3R_579()) return true;
+ if (jj_3R_configuration_item_866_4_579()) return true;
+ }
return false;
}
- inline bool jj_3R_89()
+ inline bool jj_3R_subtype_indication_2398_3_89()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
if (jj_3_105()) jj_scanpos = xsp;
- if (jj_3R_192()) return true;
+ if (jj_3R_subtype_indication_2398_45_192()) return true;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_192()) { jj_scanpos = xsp; break; }
+ if (jj_3R_subtype_indication_2398_45_192()) { jj_scanpos = xsp; break; }
}
xsp = jj_scanpos;
- if (jj_3R_193()) jj_scanpos = xsp;
+ if (jj_3R_subtype_indication_2398_58_193()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_138()
+ inline bool jj_3R_reslution_indication_2391_3_138()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_388()
+ inline bool jj_3R_subtype_declaration_2382_1_388()
{
if (jj_done) return true;
if (jj_scan_token(SUBTYPE_T)) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(IS_T)) return true;
- if (jj_3R_89()) return true;
+ if (jj_3R_subtype_indication_2398_3_89()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_637()
+ inline bool jj_3R_subprogram_statement_part_2377_4_637()
{
if (jj_done) return true;
- if (jj_3R_117()) return true;
+ if (jj_3R_sequential_statement_2133_5_117()) return true;
return false;
}
{
if (jj_done) return true;
if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_83()) return true;
+ if (jj_3R_condition_809_3_83()) return true;
if (jj_scan_token(ELSE_T)) return true;
return false;
}
- inline bool jj_3R_584()
+ inline bool jj_3R_subprogram_statement_part_2377_3_584()
{
if (jj_done) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_637()) { jj_scanpos = xsp; break; }
+ if (jj_3R_subprogram_statement_part_2377_4_637()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_367()
+ inline bool jj_3R_configuration_declaration_838_2_367()
{
if (jj_done) return true;
if (jj_scan_token(CONFIGURATION_T)) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
- inline bool jj_3R_334()
+ inline bool jj_3R_conditional_waveforms_831_7_334()
{
if (jj_done) return true;
if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_83()) return true;
+ if (jj_3R_condition_809_3_83()) return true;
return false;
}
- inline bool jj_3R_333()
+ inline bool jj_3R_conditional_waveforms_829_7_333()
{
if (jj_done) return true;
if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_83()) return true;
+ if (jj_3R_condition_809_3_83()) return true;
if (jj_scan_token(ELSE_T)) return true;
- if (jj_3R_332()) return true;
+ if (jj_3R_waveform_2543_1_332()) return true;
return false;
}
- inline bool jj_3R_539()
+ inline bool jj_3R_subprogram_specification_2366_3_539()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_582()) return true;
+ if (jj_3R_formal_parameter_list_1236_2_582()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_173()
+ inline bool jj_3R_conditional_waveforms_828_1_173()
{
if (jj_done) return true;
- if (jj_3R_332()) return true;
+ if (jj_3R_waveform_2543_1_332()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_333()) { jj_scanpos = xsp; break; }
+ if (jj_3R_conditional_waveforms_829_7_333()) { jj_scanpos = xsp; break; }
}
xsp = jj_scanpos;
- if (jj_3R_334()) jj_scanpos = xsp;
+ if (jj_3R_conditional_waveforms_831_7_334()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_75()
+ inline bool jj_3R_conditional_signal_assignment_823_2_75()
{
if (jj_done) return true;
- if (jj_3R_119()) return true;
+ if (jj_3R_target_2413_2_119()) return true;
if (jj_scan_token(LESSTHAN_T)) return true;
- if (jj_3R_172()) return true;
- if (jj_3R_173()) return true;
+ if (jj_3R_options_1726_3_172()) return true;
+ if (jj_3R_conditional_waveforms_828_1_173()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_538()
+ inline bool jj_3R_subprogram_specification_2355_4_538()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_scan_token(84)) return false;
+ if (jj_scan_token(84)) {
jj_scanpos = xsp;
if (jj_scan_token(52)) return true;
+ }
return false;
}
inline bool jj_3_104()
{
if (jj_done) return true;
- if (jj_3R_137()) return true;
+ if (jj_3R_gen_assoc_list_2678_4_137()) return true;
return false;
}
- inline bool jj_3R_451()
+ inline bool jj_3R_subprogram_specification_2355_2_451()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_538()) jj_scanpos = xsp;
+ if (jj_3R_subprogram_specification_2355_4_538()) jj_scanpos = xsp;
if (jj_scan_token(FUNCTION_T)) return true;
- if (jj_3R_536()) return true;
+ if (jj_3R_designator_942_2_536()) return true;
xsp = jj_scanpos;
- if (jj_3R_539()) jj_scanpos = xsp;
+ if (jj_3R_subprogram_specification_2366_3_539()) jj_scanpos = xsp;
if (jj_scan_token(RETURN_T)) return true;
- if (jj_3R_161()) return true;
+ if (jj_3R_type_mark_2456_3_161()) return true;
return false;
}
inline bool jj_3_103()
{
if (jj_done) return true;
- if (jj_3R_136()) return true;
+ if (jj_3R_gen_interface_list_2683_4_136()) return true;
return false;
}
- inline bool jj_3R_537()
+ inline bool jj_3R_subprogram_specification_2349_5_537()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_327()) return true;
+ if (jj_3R_interface_list_1476_3_327()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_381()
+ inline bool jj_3R_condition_clause_814_3_381()
{
if (jj_done) return true;
if (jj_scan_token(UNTIL_T)) return true;
- if (jj_3R_83()) return true;
+ if (jj_3R_condition_809_3_83()) return true;
return false;
}
- inline bool jj_3R_83()
+ inline bool jj_3R_condition_809_3_83()
{
if (jj_done) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
return false;
}
inline bool jj_3_24()
{
if (jj_done) return true;
- if (jj_3R_82()) return true;
+ if (jj_3R_concurrent_procedure_call_statement_763_1_82()) return true;
return false;
}
inline bool jj_3_23()
{
if (jj_done) return true;
- if (jj_3R_81()) return true;
+ if (jj_3R_component_instantiation_statement_730_2_81()) return true;
return false;
}
- inline bool jj_3R_364()
+ inline bool jj_3R_subprogram_specification_2341_2_364()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_450()) return false;
+ if (jj_3R_subprogram_specification_2341_2_450()) {
jj_scanpos = xsp;
- if (jj_3R_451()) return true;
+ if (jj_3R_subprogram_specification_2355_2_451()) return true;
+ }
return false;
}
- inline bool jj_3R_450()
+ inline bool jj_3R_subprogram_specification_2341_2_450()
{
if (jj_done) return true;
if (jj_scan_token(PROCEDURE_T)) return true;
- if (jj_3R_536()) return true;
+ if (jj_3R_designator_942_2_536()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_537()) jj_scanpos = xsp;
+ if (jj_3R_subprogram_specification_2349_5_537()) jj_scanpos = xsp;
xsp = jj_scanpos;
if (jj_3_103()) jj_scanpos = xsp;
xsp = jj_scanpos;
if (jj_3_104()) jj_scanpos = xsp;
- if (jj_3R_442()) return true;
+ if (jj_3R_param_2936_3_442()) return true;
return false;
}
inline bool jj_3_22()
{
if (jj_done) return true;
- if (jj_3R_80()) return true;
+ if (jj_3R_concurrent_signal_assignment_statement_768_1_80()) return true;
return false;
}
- inline bool jj_3R_79()
+ inline bool jj_3R_null_792_12_79()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_79()) jj_scanpos = xsp;
+ if (jj_3R_null_792_12_79()) jj_scanpos = xsp;
xsp = jj_scanpos;
if (jj_scan_token(79)) jj_scanpos = xsp;
if (jj_scan_token(ASSERT_T)) return true;
return false;
}
- inline bool jj_3R_638()
+ inline bool jj_3R_subprogram_kind_2335_2_638()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_scan_token(46)) return false;
+ if (jj_scan_token(46)) {
jj_scanpos = xsp;
if (jj_scan_token(80)) return true;
+ }
return false;
}
- inline bool jj_3R_636()
+ inline bool jj_3R_subprogram_declarative_part_2330_4_636()
{
if (jj_done) return true;
- if (jj_3R_655()) return true;
+ if (jj_3R_subprogram_declarative_item_2309_1_655()) return true;
return false;
}
- inline bool jj_3R_583()
+ inline bool jj_3R_subprogram_declarative_part_2330_3_583()
{
if (jj_done) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_636()) { jj_scanpos = xsp; break; }
+ if (jj_3R_subprogram_declarative_part_2330_4_636()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_77()
+ inline bool jj_3R_null_784_12_77()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_77()) jj_scanpos = xsp;
+ if (jj_3R_null_784_12_77()) jj_scanpos = xsp;
xsp = jj_scanpos;
if (jj_scan_token(79)) jj_scanpos = xsp;
if (jj_scan_token(PROCESS_T)) return true;
inline bool jj_3_101()
{
if (jj_done) return true;
- if (jj_3R_67()) return true;
+ if (jj_3R_attribute_declaration_505_2_67()) return true;
return false;
}
- inline bool jj_3R_675()
+ inline bool jj_3R_subprogram_declarative_item_2325_3_675()
{
if (jj_done) return true;
- if (jj_3R_398()) return true;
+ if (jj_3R_group_declaration_1327_3_398()) return true;
return false;
}
- inline bool jj_3R_76()
+ inline bool jj_3R_null_781_12_76()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_76()) jj_scanpos = xsp;
+ if (jj_3R_null_781_12_76()) jj_scanpos = xsp;
if (jj_scan_token(BLOCK_T)) return true;
return false;
}
- inline bool jj_3R_674()
+ inline bool jj_3R_subprogram_declarative_item_2321_3_674()
{
if (jj_done) return true;
- if (jj_3R_347()) return true;
+ if (jj_3R_use_clause_2467_2_347()) return true;
return false;
}
inline bool jj_3_102()
{
if (jj_done) return true;
- if (jj_3R_68()) return true;
+ if (jj_3R_group_template_declaration_1335_2_68()) return true;
return false;
}
- inline bool jj_3R_673()
+ inline bool jj_3R_subprogram_declarative_item_2320_3_673()
{
if (jj_done) return true;
- if (jj_3R_395()) return true;
+ if (jj_3R_attribute_specification_526_3_395()) return true;
return false;
}
inline bool jj_3_20()
{
if (jj_done) return true;
- if (jj_3R_78()) return true;
+ if (jj_3R_generate_statement_1283_1_78()) return true;
return false;
}
- inline bool jj_3R_672()
+ inline bool jj_3R_subprogram_declarative_item_2318_1_672()
{
if (jj_done) return true;
- if (jj_3R_67()) return true;
+ if (jj_3R_attribute_declaration_505_2_67()) return true;
return false;
}
- inline bool jj_3R_671()
+ inline bool jj_3R_subprogram_declarative_item_2316_3_671()
{
if (jj_done) return true;
- if (jj_3R_393()) return true;
+ if (jj_3R_alias_declaration_401_2_393()) return true;
return false;
}
- inline bool jj_3R_670()
+ inline bool jj_3R_subprogram_declarative_item_2315_3_670()
{
if (jj_done) return true;
- if (jj_3R_392()) return true;
+ if (jj_3R_file_declaration_1199_2_392()) return true;
return false;
}
- inline bool jj_3R_669()
+ inline bool jj_3R_subprogram_declarative_item_2314_3_669()
{
if (jj_done) return true;
- if (jj_3R_391()) return true;
+ if (jj_3R_variable_declaration_2503_1_391()) return true;
return false;
}
- inline bool jj_3R_586()
+ inline bool jj_3R_subprogram_body_2284_33_586()
{
if (jj_done) return true;
- if (jj_3R_536()) return true;
+ if (jj_3R_designator_942_2_536()) return true;
return false;
}
- inline bool jj_3R_668()
+ inline bool jj_3R_subprogram_declarative_item_2313_3_668()
{
if (jj_done) return true;
- if (jj_3R_389()) return true;
+ if (jj_3R_constant_declaration_877_4_389()) return true;
return false;
}
inline bool jj_3_17()
{
if (jj_done) return true;
- if (jj_3R_75()) return true;
+ if (jj_3R_conditional_signal_assignment_823_2_75()) return true;
return false;
}
- inline bool jj_3R_667()
+ inline bool jj_3R_subprogram_declarative_item_2312_3_667()
{
if (jj_done) return true;
- if (jj_3R_388()) return true;
+ if (jj_3R_subtype_declaration_2382_1_388()) return true;
return false;
}
- inline bool jj_3R_666()
+ inline bool jj_3R_subprogram_declarative_item_2311_4_666()
{
if (jj_done) return true;
- if (jj_3R_540()) return true;
+ if (jj_3R_subprogram_body_2271_1_540()) return true;
return false;
}
- inline bool jj_3R_665()
+ inline bool jj_3R_subprogram_declarative_item_2310_2_665()
{
if (jj_done) return true;
- if (jj_3R_387()) return true;
+ if (jj_3R_type_declaration_2437_1_387()) return true;
return false;
}
- inline bool jj_3R_664()
+ inline bool jj_3R_subprogram_declarative_item_2309_1_664()
{
if (jj_done) return true;
- if (jj_3R_98()) return true;
+ if (jj_3R_subprogram_declaration_2294_1_98()) return true;
return false;
}
- inline bool jj_3R_655()
+ inline bool jj_3R_subprogram_declarative_item_2309_1_655()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_664()) return false;
+ if (jj_3R_subprogram_declarative_item_2309_1_664()) {
jj_scanpos = xsp;
- if (!jj_3R_665()) return false;
+ if (jj_3R_subprogram_declarative_item_2310_2_665()) {
jj_scanpos = xsp;
- if (!jj_3R_666()) return false;
+ if (jj_3R_subprogram_declarative_item_2311_4_666()) {
jj_scanpos = xsp;
- if (!jj_3R_667()) return false;
+ if (jj_3R_subprogram_declarative_item_2312_3_667()) {
jj_scanpos = xsp;
- if (!jj_3R_668()) return false;
+ if (jj_3R_subprogram_declarative_item_2313_3_668()) {
jj_scanpos = xsp;
- if (!jj_3R_669()) return false;
+ if (jj_3R_subprogram_declarative_item_2314_3_669()) {
jj_scanpos = xsp;
- if (!jj_3R_670()) return false;
+ if (jj_3R_subprogram_declarative_item_2315_3_670()) {
jj_scanpos = xsp;
- if (!jj_3R_671()) return false;
+ if (jj_3R_subprogram_declarative_item_2316_3_671()) {
jj_scanpos = xsp;
- if (!jj_3R_672()) return false;
+ if (jj_3R_subprogram_declarative_item_2318_1_672()) {
jj_scanpos = xsp;
- if (!jj_3R_673()) return false;
+ if (jj_3R_subprogram_declarative_item_2320_3_673()) {
jj_scanpos = xsp;
- if (!jj_3R_674()) return false;
+ if (jj_3R_subprogram_declarative_item_2321_3_674()) {
jj_scanpos = xsp;
- if (!jj_3_102()) return false;
+ if (jj_3_102()) {
jj_scanpos = xsp;
- if (jj_3R_675()) return true;
+ if (jj_3R_subprogram_declarative_item_2325_3_675()) return true;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_176()
+ inline bool jj_3R_concurrent_signal_assignment_statement_772_3_176()
{
if (jj_done) return true;
- if (jj_3R_337()) return true;
+ if (jj_3R_selected_signal_assignment_2100_3_337()) return true;
return false;
}
- inline bool jj_3R_479()
+ inline bool jj_3R_signal_declaration_2218_89_479()
{
if (jj_done) return true;
if (jj_scan_token(VARASSIGN_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
return false;
}
- inline bool jj_3R_175()
+ inline bool jj_3R_concurrent_signal_assignment_statement_770_1_175()
{
if (jj_done) return true;
- if (jj_3R_75()) return true;
+ if (jj_3R_conditional_signal_assignment_823_2_75()) return true;
return false;
}
inline bool jj_3_16()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
inline bool jj_3_100()
{
if (jj_done) return true;
- if (jj_3R_135()) return true;
+ if (jj_3R_subprogram_instantiation_declaration_2667_2_135()) return true;
return false;
}
- inline bool jj_3R_365()
+ inline bool jj_3R_subprogram_1_2303_2_365()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_452()) return false;
+ if (jj_3R_subprogram_1_2303_2_452()) {
jj_scanpos = xsp;
if (jj_scan_token(137)) return true;
+ }
return false;
}
- inline bool jj_3R_452()
+ inline bool jj_3R_subprogram_1_2303_2_452()
{
if (jj_done) return true;
- if (jj_3R_540()) return true;
+ if (jj_3R_subprogram_body_2271_1_540()) return true;
return false;
}
- inline bool jj_3R_80()
+ inline bool jj_3R_concurrent_signal_assignment_statement_768_1_80()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
if (jj_scan_token(79)) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (!jj_3R_175()) return false;
+ if (jj_3R_concurrent_signal_assignment_statement_770_1_175()) {
jj_scanpos = xsp;
- if (jj_3R_176()) return true;
+ if (jj_3R_concurrent_signal_assignment_statement_772_3_176()) return true;
+ }
return false;
}
inline bool jj_3_15()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_82()
+ inline bool jj_3R_concurrent_procedure_call_statement_763_1_82()
{
if (jj_done) return true;
Token * xsp;
if (jj_3_15()) jj_scanpos = xsp;
xsp = jj_scanpos;
if (jj_scan_token(79)) jj_scanpos = xsp;
- if (jj_3R_180()) return true;
+ if (jj_3R_procedure_call_1912_2_180()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_209()
+ inline bool jj_3R_subprogram_declaration_2297_1_209()
{
if (jj_done) return true;
- if (jj_3R_364()) return true;
- if (jj_3R_365()) return true;
+ if (jj_3R_subprogram_specification_2341_2_364()) return true;
+ if (jj_3R_subprogram_1_2303_2_365()) return true;
return false;
}
inline bool jj_3_14()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
inline bool jj_3_13()
{
if (jj_done) return true;
- if (jj_3R_73()) return true;
+ if (jj_3R_generic_map_aspect_1311_6_73()) return true;
return false;
}
- inline bool jj_3R_585()
+ inline bool jj_3R_subprogram_body_2284_11_585()
{
if (jj_done) return true;
- if (jj_3R_638()) return true;
+ if (jj_3R_subprogram_kind_2335_2_638()) return true;
return false;
}
- inline bool jj_3R_208()
+ inline bool jj_3R_subprogram_declaration_2294_1_208()
{
if (jj_done) return true;
- if (jj_3R_135()) return true;
+ if (jj_3R_subprogram_instantiation_declaration_2667_2_135()) return true;
return false;
}
- inline bool jj_3R_98()
+ inline bool jj_3R_subprogram_declaration_2294_1_98()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_208()) return false;
+ if (jj_3R_subprogram_declaration_2294_1_208()) {
jj_scanpos = xsp;
- if (jj_3R_209()) return true;
+ if (jj_3R_subprogram_declaration_2297_1_209()) return true;
+ }
return false;
}
inline bool jj_3_99()
{
if (jj_done) return true;
- if (jj_3R_133()) return true;
- if (jj_3R_134()) return true;
+ if (jj_3R_adding_operator_389_3_133()) return true;
+ if (jj_3R_term_2419_2_134()) return true;
return false;
}
- inline bool jj_3R_92()
+ inline bool jj_3R_concurrent_assertion_statement_758_1_92()
{
if (jj_done) return true;
Token * xsp;
if (jj_3_14()) jj_scanpos = xsp;
xsp = jj_scanpos;
if (jj_scan_token(79)) jj_scanpos = xsp;
- if (jj_3R_196()) return true;
+ if (jj_3R_assertion_475_4_196()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_679()
+ inline bool jj_3R_composite_type_definition_753_3_679()
{
if (jj_done) return true;
- if (jj_3R_690()) return true;
+ if (jj_3R_record_type_definition_2022_5_690()) return true;
return false;
}
- inline bool jj_3R_678()
+ inline bool jj_3R_composite_type_definition_752_2_678()
{
if (jj_done) return true;
- if (jj_3R_689()) return true;
+ if (jj_3R_array_type_definition_466_2_689()) return true;
return false;
}
- inline bool jj_3R_657()
+ inline bool jj_3R_composite_type_definition_752_2_657()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_678()) return false;
+ if (jj_3R_composite_type_definition_752_2_678()) {
jj_scanpos = xsp;
- if (jj_3R_679()) return true;
+ if (jj_3R_composite_type_definition_753_3_679()) return true;
+ }
return false;
}
- inline bool jj_3R_179()
+ inline bool jj_3R_component_instantiation_statement_742_11_179()
{
if (jj_done) return true;
- if (jj_3R_341()) return true;
+ if (jj_3R_port_map_aspect_1865_2_341()) return true;
return false;
}
- inline bool jj_3R_178()
+ inline bool jj_3R_component_instantiation_statement_741_11_178()
{
if (jj_done) return true;
- if (jj_3R_73()) return true;
+ if (jj_3R_generic_map_aspect_1311_6_73()) return true;
return false;
}
- inline bool jj_3R_478()
+ inline bool jj_3R_signal_declaration_2218_68_478()
{
if (jj_done) return true;
- if (jj_3R_548()) return true;
+ if (jj_3R_signal_kind_2228_3_548()) return true;
return false;
}
- inline bool jj_3R_487()
+ inline bool jj_3R_component_declaration_723_27_487()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
- inline bool jj_3R_164()
+ inline bool jj_3R_simple_expression_2250_35_164()
{
if (jj_done) return true;
- if (jj_3R_133()) return true;
- if (jj_3R_134()) return true;
+ if (jj_3R_adding_operator_389_3_133()) return true;
+ if (jj_3R_term_2419_2_134()) return true;
return false;
}
- inline bool jj_3R_181()
+ inline bool jj_3R_component_specification_747_1_181()
{
if (jj_done) return true;
- if (jj_3R_343()) return true;
+ if (jj_3R_instantiation_list_1419_3_343()) return true;
if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
return false;
}
- inline bool jj_3R_540()
+ inline bool jj_3R_subprogram_body_2271_1_540()
{
if (jj_done) return true;
if (jj_scan_token(IS_T)) return true;
- if (jj_3R_583()) return true;
+ if (jj_3R_subprogram_declarative_part_2330_3_583()) return true;
if (jj_scan_token(BEGIN_T)) return true;
- if (jj_3R_584()) return true;
+ if (jj_3R_subprogram_statement_part_2377_3_584()) return true;
if (jj_scan_token(END_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_585()) jj_scanpos = xsp;
+ if (jj_3R_subprogram_body_2284_11_585()) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_586()) jj_scanpos = xsp;
+ if (jj_3R_subprogram_body_2284_33_586()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_81()
+ inline bool jj_3R_component_instantiation_statement_730_2_81()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_177()) return true;
+ if (jj_3R_instantiation_unit_1412_1_177()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_178()) jj_scanpos = xsp;
+ if (jj_3R_component_instantiation_statement_741_11_178()) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_179()) jj_scanpos = xsp;
+ if (jj_3R_component_instantiation_statement_742_11_179()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_373()
+ inline bool jj_3R_string_literal_2265_1_373()
{
if (jj_done) return true;
if (jj_scan_token(STRINGLITERAL)) return true;
return false;
}
- inline bool jj_3R_486()
+ inline bool jj_3R_component_declaration_718_5_486()
{
if (jj_done) return true;
- if (jj_3R_553()) return true;
+ if (jj_3R_port_clause_1855_4_553()) return true;
return false;
}
- inline bool jj_3R_485()
+ inline bool jj_3R_component_declaration_717_5_485()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_generic_clause_1301_2_69()) return true;
return false;
}
- inline bool jj_3R_453()
+ inline bool jj_3R_signature_2242_15_453()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
return false;
}
- inline bool jj_3R_183()
+ inline bool jj_3R_component_configuration_710_11_183()
{
if (jj_done) return true;
- if (jj_3R_345()) return true;
+ if (jj_3R_block_configuration_585_5_345()) return true;
return false;
}
- inline bool jj_3R_182()
+ inline bool jj_3R_component_configuration_709_11_182()
{
if (jj_done) return true;
- if (jj_3R_344()) return true;
+ if (jj_3R_binding_indication_567_2_344()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_195()
+ inline bool jj_3R_choices_703_15_195()
{
if (jj_done) return true;
if (jj_scan_token(BAR_T)) return true;
- if (jj_3R_194()) return true;
+ if (jj_3R_choice_687_4_194()) return true;
return false;
}
- inline bool jj_3R_163()
+ inline bool jj_3R_simple_expression_2250_3_163()
{
if (jj_done) return true;
- if (jj_3R_328()) return true;
+ if (jj_3R_sign_2188_2_328()) return true;
return false;
}
- inline bool jj_3R_394()
+ inline bool jj_3R_component_declaration_715_2_394()
{
if (jj_done) return true;
if (jj_scan_token(COMPONENT_T)) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
Token * xsp;
xsp = jj_scanpos;
if (jj_scan_token(56)) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_485()) jj_scanpos = xsp;
+ if (jj_3R_component_declaration_717_5_485()) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_486()) jj_scanpos = xsp;
+ if (jj_3R_component_declaration_718_5_486()) jj_scanpos = xsp;
if (jj_scan_token(END_T)) return true;
if (jj_scan_token(COMPONENT_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_487()) jj_scanpos = xsp;
+ if (jj_3R_component_declaration_723_27_487()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_70()
+ inline bool jj_3R_simple_expression_2250_1_70()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_163()) jj_scanpos = xsp;
- if (jj_3R_134()) return true;
+ if (jj_3R_simple_expression_2250_3_163()) jj_scanpos = xsp;
+ if (jj_3R_term_2419_2_134()) return true;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_164()) { jj_scanpos = xsp; break; }
+ if (jj_3R_simple_expression_2250_35_164()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_84()
+ inline bool jj_3R_component_configuration_708_5_84()
{
if (jj_done) return true;
if (jj_scan_token(FOR_T)) return true;
- if (jj_3R_181()) return true;
+ if (jj_3R_component_specification_747_1_181()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_182()) jj_scanpos = xsp;
+ if (jj_3R_component_configuration_709_11_182()) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_183()) jj_scanpos = xsp;
+ if (jj_3R_component_configuration_710_11_183()) jj_scanpos = xsp;
if (jj_scan_token(END_T)) return true;
if (jj_scan_token(FOR_T)) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_375()
+ inline bool jj_3R_signature_2243_4_375()
{
if (jj_done) return true;
if (jj_scan_token(RETURN_T)) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
return false;
}
- inline bool jj_3R_646()
+ inline bool jj_3R_signal_list_2234_12_646()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
return false;
}
- inline bool jj_3R_374()
+ inline bool jj_3R_signature_2242_4_374()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_453()) { jj_scanpos = xsp; break; }
+ if (jj_3R_signature_2242_15_453()) { jj_scanpos = xsp; break; }
}
return false;
}
inline bool jj_3_12()
{
if (jj_done) return true;
- if (jj_3R_72()) return true;
+ if (jj_3R_discrete_range_964_3_72()) return true;
return false;
}
- inline bool jj_3R_245()
+ inline bool jj_3R_signature_2241_1_245()
{
if (jj_done) return true;
if (jj_scan_token(LBRACKET_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_374()) jj_scanpos = xsp;
+ if (jj_3R_signature_2242_4_374()) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_375()) jj_scanpos = xsp;
+ if (jj_3R_signature_2243_4_375()) jj_scanpos = xsp;
if (jj_scan_token(RBRACKET_T)) return true;
return false;
}
- inline bool jj_3R_90()
+ inline bool jj_3R_choices_703_3_90()
{
if (jj_done) return true;
- if (jj_3R_194()) return true;
+ if (jj_3R_choice_687_4_194()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_195()) { jj_scanpos = xsp; break; }
+ if (jj_3R_choices_703_15_195()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_617()
+ inline bool jj_3R_signal_list_2236_3_617()
{
if (jj_done) return true;
if (jj_scan_token(ALL_T)) return true;
inline bool jj_3_11()
{
if (jj_done) return true;
- if (jj_3R_70()) return true;
+ if (jj_3R_simple_expression_2250_1_70()) return true;
return false;
}
- inline bool jj_3R_616()
+ inline bool jj_3R_signal_list_2235_3_616()
{
if (jj_done) return true;
if (jj_scan_token(OTHER_T)) return true;
return false;
}
- inline bool jj_3R_354()
+ inline bool jj_3R_choice_697_5_354()
{
if (jj_done) return true;
if (jj_scan_token(OTHER_T)) return true;
return false;
}
- inline bool jj_3R_615()
+ inline bool jj_3R_signal_list_2234_2_615()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_646()) { jj_scanpos = xsp; break; }
+ if (jj_3R_signal_list_2234_12_646()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_556()
+ inline bool jj_3R_signal_list_2234_2_556()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_615()) return false;
+ if (jj_3R_signal_list_2234_2_615()) {
jj_scanpos = xsp;
- if (!jj_3R_616()) return false;
+ if (jj_3R_signal_list_2235_3_616()) {
jj_scanpos = xsp;
- if (jj_3R_617()) return true;
+ if (jj_3R_signal_list_2236_3_617()) return true;
+ }
+ }
return false;
}
inline bool jj_3_10()
{
if (jj_done) return true;
- if (jj_3R_70()) return true;
- if (jj_3R_71()) return true;
+ if (jj_3R_simple_expression_2250_1_70()) return true;
+ if (jj_3R_direction_948_1_71()) return true;
return false;
}
- inline bool jj_3R_353()
+ inline bool jj_3R_choice_696_4_353()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
- inline bool jj_3R_590()
+ inline bool jj_3R_signal_kind_2229_5_590()
{
if (jj_done) return true;
if (jj_scan_token(BUS_T)) return true;
return false;
}
- inline bool jj_3R_352()
+ inline bool jj_3R_choice_693_4_352()
{
if (jj_done) return true;
- if (jj_3R_72()) return true;
+ if (jj_3R_discrete_range_964_3_72()) return true;
return false;
}
- inline bool jj_3R_589()
+ inline bool jj_3R_signal_kind_2228_3_589()
{
if (jj_done) return true;
if (jj_scan_token(REGISTER_T)) return true;
return false;
}
- inline bool jj_3R_548()
+ inline bool jj_3R_signal_kind_2228_3_548()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_589()) return false;
+ if (jj_3R_signal_kind_2228_3_589()) {
jj_scanpos = xsp;
- if (jj_3R_590()) return true;
+ if (jj_3R_signal_kind_2229_5_590()) return true;
+ }
return false;
}
- inline bool jj_3R_351()
+ inline bool jj_3R_choice_690_4_351()
{
if (jj_done) return true;
- if (jj_3R_70()) return true;
+ if (jj_3R_simple_expression_2250_1_70()) return true;
return false;
}
- inline bool jj_3R_194()
+ inline bool jj_3R_choice_687_4_194()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_350()) return false;
+ if (jj_3R_choice_687_4_350()) {
jj_scanpos = xsp;
- if (!jj_3R_351()) return false;
+ if (jj_3R_choice_690_4_351()) {
jj_scanpos = xsp;
- if (!jj_3R_352()) return false;
+ if (jj_3R_choice_693_4_352()) {
jj_scanpos = xsp;
- if (!jj_3R_353()) return false;
+ if (jj_3R_choice_696_4_353()) {
jj_scanpos = xsp;
- if (jj_3R_354()) return true;
+ if (jj_3R_choice_697_5_354()) return true;
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_350()
+ inline bool jj_3R_choice_687_4_350()
{
if (jj_done) return true;
- if (jj_3R_88()) return true;
+ if (jj_3R_range_2008_4_88()) return true;
return false;
}
- inline bool jj_3R_634()
+ inline bool jj_3R_case_statement_662_28_634()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
- inline bool jj_3R_369()
+ inline bool jj_3R_character_literal_682_3_369()
{
if (jj_done) return true;
if (jj_scan_token(CHARACTER_LITERAL)) return true;
return false;
}
- inline bool jj_3R_390()
+ inline bool jj_3R_signal_declaration_2218_1_390()
{
if (jj_done) return true;
if (jj_scan_token(SIGNAL_T)) return true;
- if (jj_3R_205()) return true;
+ if (jj_3R_identifier_list_1354_4_205()) return true;
if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_89()) return true;
+ if (jj_3R_subtype_indication_2398_3_89()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_478()) jj_scanpos = xsp;
+ if (jj_3R_signal_declaration_2218_68_478()) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_479()) jj_scanpos = xsp;
+ if (jj_3R_signal_declaration_2218_89_479()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
inline bool jj_3_98()
{
if (jj_done) return true;
- if (jj_3R_132()) return true;
+ if (jj_3R_selected_signal_assignment_wave_2837_3_132()) return true;
return false;
}
- inline bool jj_3R_632()
+ inline bool jj_3R_case_statement_alternative_671_3_632()
{
if (jj_done) return true;
if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_90()) return true;
+ if (jj_3R_choices_703_3_90()) return true;
if (jj_scan_token(ARROW_T)) return true;
- if (jj_3R_268()) return true;
+ if (jj_3R_sequence_of_statement_2128_2_268()) return true;
return false;
}
inline bool jj_3_97()
{
if (jj_done) return true;
- if (jj_3R_131()) return true;
+ if (jj_3R_conditional_signal_assignment_wave_2808_3_131()) return true;
return false;
}
- inline bool jj_3R_633()
+ inline bool jj_3R_case_statement_661_11_633()
{
if (jj_done) return true;
- if (jj_3R_632()) return true;
+ if (jj_3R_case_statement_alternative_671_3_632()) return true;
return false;
}
- inline bool jj_3R_541()
+ inline bool jj_3R_signal_assignment_statement_2203_3_541()
{
if (jj_done) return true;
- if (jj_3R_420()) return true;
+ if (jj_3R_delay_mechanism_924_1_420()) return true;
return false;
}
inline bool jj_3_96()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_456()
+ inline bool jj_3R_signal_assignment_statement_2201_3_456()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
if (jj_3_96()) jj_scanpos = xsp;
- if (jj_3R_119()) return true;
+ if (jj_3R_target_2413_2_119()) return true;
if (jj_scan_token(LESSTHAN_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_541()) jj_scanpos = xsp;
- if (jj_3R_332()) return true;
+ if (jj_3R_signal_assignment_statement_2203_3_541()) jj_scanpos = xsp;
+ if (jj_3R_waveform_2543_1_332()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_455()
+ inline bool jj_3R_signal_assignment_statement_2198_3_455()
{
if (jj_done) return true;
- if (jj_3R_132()) return true;
+ if (jj_3R_selected_signal_assignment_wave_2837_3_132()) return true;
return false;
}
- inline bool jj_3R_402()
+ inline bool jj_3R_shift_expression_2174_26_402()
{
if (jj_done) return true;
- if (jj_3R_494()) return true;
- if (jj_3R_70()) return true;
+ if (jj_3R_shift_operator_2178_3_494()) return true;
+ if (jj_3R_simple_expression_2250_1_70()) return true;
return false;
}
- inline bool jj_3R_377()
+ inline bool jj_3R_signal_assignment_statement_2195_3_377()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_454()) return false;
+ if (jj_3R_signal_assignment_statement_2195_3_454()) {
jj_scanpos = xsp;
- if (!jj_3R_455()) return false;
+ if (jj_3R_signal_assignment_statement_2198_3_455()) {
jj_scanpos = xsp;
- if (jj_3R_456()) return true;
+ if (jj_3R_signal_assignment_statement_2201_3_456()) return true;
+ }
+ }
return false;
}
- inline bool jj_3R_454()
+ inline bool jj_3R_signal_assignment_statement_2195_3_454()
{
if (jj_done) return true;
- if (jj_3R_131()) return true;
+ if (jj_3R_conditional_signal_assignment_wave_2808_3_131()) return true;
return false;
}
- inline bool jj_3R_417()
+ inline bool jj_3R_sign_2189_4_417()
{
if (jj_done) return true;
if (jj_scan_token(MINUS_T)) return true;
return false;
}
- inline bool jj_3R_265()
+ inline bool jj_3R_case_statement_653_3_265()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
Token * xsp;
xsp = jj_scanpos;
if (jj_scan_token(155)) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_328()
+ inline bool jj_3R_sign_2188_2_328()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_416()) return false;
+ if (jj_3R_sign_2188_2_416()) {
jj_scanpos = xsp;
- if (jj_3R_417()) return true;
+ if (jj_3R_sign_2189_4_417()) return true;
+ }
return false;
}
- inline bool jj_3R_416()
+ inline bool jj_3R_sign_2188_2_416()
{
if (jj_done) return true;
if (jj_scan_token(PLUS_T)) return true;
return false;
}
- inline bool jj_3R_126()
+ inline bool jj_3R_case_statement_653_1_126()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_265()) jj_scanpos = xsp;
+ if (jj_3R_case_statement_653_3_265()) jj_scanpos = xsp;
if (jj_scan_token(CASE_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
if (jj_scan_token(IS_T)) return true;
- if (jj_3R_632()) return true;
+ if (jj_3R_case_statement_alternative_671_3_632()) return true;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_633()) { jj_scanpos = xsp; break; }
+ if (jj_3R_case_statement_661_11_633()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(END_T)) return true;
if (jj_scan_token(CASE_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_634()) jj_scanpos = xsp;
+ if (jj_3R_case_statement_662_28_634()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_567()
+ inline bool jj_3R_shift_operator_2183_5_567()
{
if (jj_done) return true;
if (jj_scan_token(ROR_T)) return true;
return false;
}
- inline bool jj_3R_566()
+ inline bool jj_3R_shift_operator_2182_5_566()
{
if (jj_done) return true;
if (jj_scan_token(ROL_T)) return true;
return false;
}
- inline bool jj_3R_565()
+ inline bool jj_3R_shift_operator_2181_5_565()
{
if (jj_done) return true;
if (jj_scan_token(SRA_T)) return true;
return false;
}
- inline bool jj_3R_564()
+ inline bool jj_3R_shift_operator_2180_5_564()
{
if (jj_done) return true;
if (jj_scan_token(SLA_T)) return true;
return false;
}
- inline bool jj_3R_563()
+ inline bool jj_3R_shift_operator_2179_5_563()
{
if (jj_done) return true;
if (jj_scan_token(SRL_T)) return true;
return false;
}
- inline bool jj_3R_562()
+ inline bool jj_3R_shift_operator_2178_3_562()
{
if (jj_done) return true;
if (jj_scan_token(SLL_T)) return true;
return false;
}
- inline bool jj_3R_494()
+ inline bool jj_3R_shift_operator_2178_3_494()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_562()) return false;
+ if (jj_3R_shift_operator_2178_3_562()) {
jj_scanpos = xsp;
- if (!jj_3R_563()) return false;
+ if (jj_3R_shift_operator_2179_5_563()) {
jj_scanpos = xsp;
- if (!jj_3R_564()) return false;
+ if (jj_3R_shift_operator_2180_5_564()) {
jj_scanpos = xsp;
- if (!jj_3R_565()) return false;
+ if (jj_3R_shift_operator_2181_5_565()) {
jj_scanpos = xsp;
- if (!jj_3R_566()) return false;
+ if (jj_3R_shift_operator_2182_5_566()) {
jj_scanpos = xsp;
- if (jj_3R_567()) return true;
+ if (jj_3R_shift_operator_2183_5_567()) return true;
+ }
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_522()
+ inline bool jj_3R_block_specification_629_12_522()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_577()) return true;
+ if (jj_3R_index_specification_1400_2_577()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_318()
+ inline bool jj_3R_shift_expression_2174_2_318()
{
if (jj_done) return true;
- if (jj_3R_70()) return true;
+ if (jj_3R_simple_expression_2250_1_70()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_402()) jj_scanpos = xsp;
+ if (jj_3R_shift_expression_2174_26_402()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_254()
+ inline bool jj_3R_sequential_statement_2169_5_254()
{
if (jj_done) return true;
- if (jj_3R_379()) return true;
+ if (jj_3R_null_statement_1698_1_379()) return true;
return false;
}
inline bool jj_3_95()
{
if (jj_done) return true;
- if (jj_3R_130()) return true;
+ if (jj_3R_return_statement_2068_1_130()) return true;
return false;
}
inline bool jj_3_9()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_generic_clause_1301_2_69()) return true;
return false;
}
inline bool jj_3_94()
{
if (jj_done) return true;
- if (jj_3R_129()) return true;
+ if (jj_3R_exit_statement_1154_1_129()) return true;
return false;
}
- inline bool jj_3R_431()
+ inline bool jj_3R_block_specification_629_3_431()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_522()) jj_scanpos = xsp;
+ if (jj_3R_block_specification_629_12_522()) jj_scanpos = xsp;
return false;
}
inline bool jj_3_93()
{
if (jj_done) return true;
- if (jj_3R_128()) return true;
+ if (jj_3R_next_statement_1685_1_128()) return true;
return false;
}
- inline bool jj_3R_123()
+ inline bool jj_3R_null_2145_19_123()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_123()) jj_scanpos = xsp;
- if (jj_3R_119()) return true;
+ if (jj_3R_null_2145_19_123()) jj_scanpos = xsp;
+ if (jj_3R_target_2413_2_119()) return true;
if (jj_scan_token(VARASSIGN_T)) return true;
return false;
}
inline bool jj_3_92()
{
if (jj_done) return true;
- if (jj_3R_127()) return true;
+ if (jj_3R_loop_statement_1586_1_127()) return true;
return false;
}
inline bool jj_3_91()
{
if (jj_done) return true;
- if (jj_3R_126()) return true;
+ if (jj_3R_case_statement_653_1_126()) return true;
return false;
}
inline bool jj_3_90()
{
if (jj_done) return true;
- if (jj_3R_125()) return true;
+ if (jj_3R_if_statement_1359_3_125()) return true;
return false;
}
inline bool jj_3_89()
{
if (jj_done) return true;
- if (jj_3R_124()) return true;
+ if (jj_3R_procedure_call_statement_1918_1_124()) return true;
return false;
}
- inline bool jj_3R_118()
+ inline bool jj_3R_null_2133_18_118()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_311()
+ inline bool jj_3R_block_declarative_item_612_3_311()
{
if (jj_done) return true;
- if (jj_3R_398()) return true;
+ if (jj_3R_group_declaration_1327_3_398()) return true;
return false;
}
- inline bool jj_3R_253()
+ inline bool jj_3R_sequential_statement_2145_5_253()
{
if (jj_done) return true;
- if (jj_3R_378()) return true;
+ if (jj_3R_variable_assignment_statement_2494_1_378()) return true;
return false;
}
inline bool jj_3_7()
{
if (jj_done) return true;
- if (jj_3R_67()) return true;
+ if (jj_3R_attribute_declaration_505_2_67()) return true;
return false;
}
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_118()) jj_scanpos = xsp;
- if (jj_3R_119()) return true;
+ if (jj_3R_null_2133_18_118()) jj_scanpos = xsp;
+ if (jj_3R_target_2413_2_119()) return true;
if (jj_scan_token(LESSTHAN_T)) return true;
return false;
}
inline bool jj_3_87()
{
if (jj_done) return true;
- if (jj_3R_122()) return true;
+ if (jj_3R_wait_statement_2534_1_122()) return true;
return false;
}
inline bool jj_3_8()
{
if (jj_done) return true;
- if (jj_3R_68()) return true;
+ if (jj_3R_group_template_declaration_1335_2_68()) return true;
return false;
}
- inline bool jj_3R_310()
+ inline bool jj_3R_block_declarative_item_608_3_310()
{
if (jj_done) return true;
- if (jj_3R_347()) return true;
+ if (jj_3R_use_clause_2467_2_347()) return true;
return false;
}
- inline bool jj_3R_309()
+ inline bool jj_3R_block_declarative_item_607_3_309()
{
if (jj_done) return true;
- if (jj_3R_397()) return true;
+ if (jj_3R_disconnection_specification_954_1_397()) return true;
return false;
}
inline bool jj_3_86()
{
if (jj_done) return true;
- if (jj_3R_121()) return true;
+ if (jj_3R_report_statement_2055_1_121()) return true;
return false;
}
- inline bool jj_3R_308()
+ inline bool jj_3R_block_declarative_item_606_3_308()
{
if (jj_done) return true;
- if (jj_3R_396()) return true;
+ if (jj_3R_configuration_specification_872_1_396()) return true;
return false;
}
- inline bool jj_3R_307()
+ inline bool jj_3R_block_declarative_item_605_3_307()
{
if (jj_done) return true;
- if (jj_3R_395()) return true;
+ if (jj_3R_attribute_specification_526_3_395()) return true;
return false;
}
inline bool jj_3_85()
{
if (jj_done) return true;
- if (jj_3R_120()) return true;
+ if (jj_3R_assertion_statement_486_3_120()) return true;
return false;
}
- inline bool jj_3R_520()
+ inline bool jj_3R_selected_waveforms_2107_32_520()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_332()) return true;
+ if (jj_3R_waveform_2543_1_332()) return true;
if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_90()) return true;
+ if (jj_3R_choices_703_3_90()) return true;
return false;
}
- inline bool jj_3R_305()
+ inline bool jj_3R_block_declarative_item_601_3_305()
{
if (jj_done) return true;
- if (jj_3R_394()) return true;
+ if (jj_3R_component_declaration_715_2_394()) return true;
return false;
}
- inline bool jj_3R_306()
+ inline bool jj_3R_block_declarative_item_603_1_306()
{
if (jj_done) return true;
- if (jj_3R_67()) return true;
+ if (jj_3R_attribute_declaration_505_2_67()) return true;
return false;
}
- inline bool jj_3R_304()
+ inline bool jj_3R_block_declarative_item_600_3_304()
{
if (jj_done) return true;
- if (jj_3R_393()) return true;
+ if (jj_3R_alias_declaration_401_2_393()) return true;
return false;
}
- inline bool jj_3R_117()
+ inline bool jj_3R_sequential_statement_2133_5_117()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_252()) return false;
+ if (jj_3R_sequential_statement_2133_5_252()) {
jj_scanpos = xsp;
- if (!jj_3_85()) return false;
+ if (jj_3_85()) {
jj_scanpos = xsp;
- if (!jj_3_86()) return false;
+ if (jj_3_86()) {
jj_scanpos = xsp;
- if (!jj_3_87()) return false;
+ if (jj_3_87()) {
jj_scanpos = xsp;
- if (!jj_3R_253()) return false;
+ if (jj_3R_sequential_statement_2145_5_253()) {
jj_scanpos = xsp;
- if (!jj_3_89()) return false;
+ if (jj_3_89()) {
jj_scanpos = xsp;
- if (!jj_3_90()) return false;
+ if (jj_3_90()) {
jj_scanpos = xsp;
- if (!jj_3_91()) return false;
+ if (jj_3_91()) {
jj_scanpos = xsp;
- if (!jj_3_92()) return false;
+ if (jj_3_92()) {
jj_scanpos = xsp;
- if (!jj_3_93()) return false;
+ if (jj_3_93()) {
jj_scanpos = xsp;
- if (!jj_3_94()) return false;
+ if (jj_3_94()) {
jj_scanpos = xsp;
- if (!jj_3_95()) return false;
+ if (jj_3_95()) {
jj_scanpos = xsp;
- if (jj_3R_254()) return true;
+ if (jj_3R_sequential_statement_2169_5_254()) return true;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_252()
+ inline bool jj_3R_sequential_statement_2133_5_252()
{
if (jj_done) return true;
- if (jj_3R_377()) return true;
+ if (jj_3R_signal_assignment_statement_2195_3_377()) return true;
return false;
}
- inline bool jj_3R_303()
+ inline bool jj_3R_block_declarative_item_599_3_303()
{
if (jj_done) return true;
- if (jj_3R_392()) return true;
+ if (jj_3R_file_declaration_1199_2_392()) return true;
return false;
}
- inline bool jj_3R_302()
+ inline bool jj_3R_block_declarative_item_598_3_302()
{
if (jj_done) return true;
- if (jj_3R_391()) return true;
+ if (jj_3R_variable_declaration_2503_1_391()) return true;
return false;
}
- inline bool jj_3R_524()
+ inline bool jj_3R_sensitivity_list_2123_12_524()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
return false;
}
- inline bool jj_3R_301()
+ inline bool jj_3R_block_declarative_item_597_3_301()
{
if (jj_done) return true;
- if (jj_3R_390()) return true;
+ if (jj_3R_signal_declaration_2218_1_390()) return true;
return false;
}
- inline bool jj_3R_300()
+ inline bool jj_3R_block_declarative_item_596_3_300()
{
if (jj_done) return true;
- if (jj_3R_389()) return true;
+ if (jj_3R_constant_declaration_877_4_389()) return true;
return false;
}
- inline bool jj_3R_299()
+ inline bool jj_3R_block_declarative_item_595_3_299()
{
if (jj_done) return true;
- if (jj_3R_388()) return true;
+ if (jj_3R_subtype_declaration_2382_1_388()) return true;
return false;
}
- inline bool jj_3R_433()
+ inline bool jj_3R_block_configuration_587_11_433()
{
if (jj_done) return true;
- if (jj_3R_523()) return true;
+ if (jj_3R_configuration_item_864_2_523()) return true;
return false;
}
- inline bool jj_3R_298()
+ inline bool jj_3R_block_declarative_item_594_3_298()
{
if (jj_done) return true;
- if (jj_3R_387()) return true;
+ if (jj_3R_type_declaration_2437_1_387()) return true;
return false;
}
- inline bool jj_3R_432()
+ inline bool jj_3R_block_configuration_586_11_432()
{
if (jj_done) return true;
- if (jj_3R_347()) return true;
+ if (jj_3R_use_clause_2467_2_347()) return true;
return false;
}
inline bool jj_3_83()
{
if (jj_done) return true;
- if (jj_3R_117()) return true;
+ if (jj_3R_sequential_statement_2133_5_117()) return true;
return false;
}
- inline bool jj_3R_146()
+ inline bool jj_3R_block_declarative_item_593_3_146()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_297()) return false;
+ if (jj_3R_block_declarative_item_593_3_297()) {
jj_scanpos = xsp;
- if (!jj_3R_298()) return false;
+ if (jj_3R_block_declarative_item_594_3_298()) {
jj_scanpos = xsp;
- if (!jj_3R_299()) return false;
+ if (jj_3R_block_declarative_item_595_3_299()) {
jj_scanpos = xsp;
- if (!jj_3R_300()) return false;
+ if (jj_3R_block_declarative_item_596_3_300()) {
jj_scanpos = xsp;
- if (!jj_3R_301()) return false;
+ if (jj_3R_block_declarative_item_597_3_301()) {
jj_scanpos = xsp;
- if (!jj_3R_302()) return false;
+ if (jj_3R_block_declarative_item_598_3_302()) {
jj_scanpos = xsp;
- if (!jj_3R_303()) return false;
+ if (jj_3R_block_declarative_item_599_3_303()) {
jj_scanpos = xsp;
- if (!jj_3R_304()) return false;
+ if (jj_3R_block_declarative_item_600_3_304()) {
jj_scanpos = xsp;
- if (!jj_3R_305()) return false;
+ if (jj_3R_block_declarative_item_601_3_305()) {
jj_scanpos = xsp;
- if (!jj_3R_306()) return false;
+ if (jj_3R_block_declarative_item_603_1_306()) {
jj_scanpos = xsp;
- if (!jj_3R_307()) return false;
+ if (jj_3R_block_declarative_item_605_3_307()) {
jj_scanpos = xsp;
- if (!jj_3R_308()) return false;
+ if (jj_3R_block_declarative_item_606_3_308()) {
jj_scanpos = xsp;
- if (!jj_3R_309()) return false;
+ if (jj_3R_block_declarative_item_607_3_309()) {
jj_scanpos = xsp;
- if (!jj_3R_310()) return false;
+ if (jj_3R_block_declarative_item_608_3_310()) {
jj_scanpos = xsp;
- if (!jj_3_8()) return false;
+ if (jj_3_8()) {
jj_scanpos = xsp;
- if (jj_3R_311()) return true;
+ if (jj_3R_block_declarative_item_612_3_311()) return true;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_297()
+ inline bool jj_3R_block_declarative_item_593_3_297()
{
if (jj_done) return true;
- if (jj_3R_98()) return true;
+ if (jj_3R_subprogram_declaration_2294_1_98()) return true;
return false;
}
- inline bool jj_3R_268()
+ inline bool jj_3R_sequence_of_statement_2128_2_268()
{
if (jj_done) return true;
Token * xsp;
return false;
}
- inline bool jj_3R_345()
+ inline bool jj_3R_block_configuration_585_5_345()
{
if (jj_done) return true;
if (jj_scan_token(FOR_T)) return true;
- if (jj_3R_431()) return true;
+ if (jj_3R_block_specification_629_3_431()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_432()) { jj_scanpos = xsp; break; }
+ if (jj_3R_block_configuration_586_11_432()) { jj_scanpos = xsp; break; }
}
while (true) {
xsp = jj_scanpos;
- if (jj_3R_433()) { jj_scanpos = xsp; break; }
+ if (jj_3R_block_configuration_587_11_433()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(END_T)) return true;
if (jj_scan_token(FOR_T)) return true;
return false;
}
- inline bool jj_3R_440()
+ inline bool jj_3R_sensitivity_list_2123_2_440()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_524()) { jj_scanpos = xsp; break; }
+ if (jj_3R_sensitivity_list_2123_12_524()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_250()
+ inline bool jj_3R_attribute_name_521_68_250()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_357()
+ inline bool jj_3R_sensitivity_list_2121_3_357()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_439()) return false;
+ if (jj_3R_sensitivity_list_2121_3_439()) {
jj_scanpos = xsp;
- if (jj_3R_440()) return true;
+ if (jj_3R_sensitivity_list_2123_2_440()) return true;
+ }
return false;
}
- inline bool jj_3R_439()
+ inline bool jj_3R_sensitivity_list_2121_3_439()
{
if (jj_done) return true;
if (jj_scan_token(ALL_T)) return true;
return false;
}
- inline bool jj_3R_276()
+ inline bool jj_3R_return_statement_2068_53_276()
{
if (jj_done) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
return false;
}
- inline bool jj_3R_380()
+ inline bool jj_3R_sensitivity_clause_2112_2_380()
{
if (jj_done) return true;
if (jj_scan_token(ON_T)) return true;
- if (jj_3R_357()) return true;
+ if (jj_3R_sensitivity_list_2121_3_357()) return true;
return false;
}
- inline bool jj_3R_100()
+ inline bool jj_3R_bit_string_literal_574_3_100()
{
if (jj_done) return true;
if (jj_scan_token(BIT_STRING_LITERAL)) return true;
return false;
}
- inline bool jj_3R_423()
+ inline bool jj_3R_selected_waveforms_2107_2_423()
{
if (jj_done) return true;
- if (jj_3R_332()) return true;
+ if (jj_3R_waveform_2543_1_332()) return true;
if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_90()) return true;
+ if (jj_3R_choices_703_3_90()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_520()) { jj_scanpos = xsp; break; }
+ if (jj_3R_selected_waveforms_2107_32_520()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_430()
+ inline bool jj_3R_binding_indication_569_4_430()
{
if (jj_done) return true;
- if (jj_3R_341()) return true;
+ if (jj_3R_port_map_aspect_1865_2_341()) return true;
return false;
}
- inline bool jj_3R_429()
+ inline bool jj_3R_binding_indication_568_4_429()
{
if (jj_done) return true;
- if (jj_3R_73()) return true;
+ if (jj_3R_generic_map_aspect_1311_6_73()) return true;
return false;
}
- inline bool jj_3R_428()
+ inline bool jj_3R_binding_indication_567_4_428()
{
if (jj_done) return true;
if (jj_scan_token(USE_T)) return true;
- if (jj_3R_521()) return true;
+ if (jj_3R_entity_aspect_1005_1_521()) return true;
return false;
}
- inline bool jj_3R_344()
+ inline bool jj_3R_binding_indication_567_2_344()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_428()) jj_scanpos = xsp;
+ if (jj_3R_binding_indication_567_4_428()) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_429()) jj_scanpos = xsp;
+ if (jj_3R_binding_indication_568_4_429()) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_430()) jj_scanpos = xsp;
+ if (jj_3R_binding_indication_569_4_430()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_337()
+ inline bool jj_3R_selected_signal_assignment_2100_3_337()
{
if (jj_done) return true;
if (jj_scan_token(WITH_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
if (jj_scan_token(SELECT_T)) return true;
- if (jj_3R_119()) return true;
+ if (jj_3R_target_2413_2_119()) return true;
if (jj_scan_token(LESSTHAN_T)) return true;
- if (jj_3R_172()) return true;
- if (jj_3R_423()) return true;
+ if (jj_3R_options_1726_3_172()) return true;
+ if (jj_3R_selected_waveforms_2107_2_423()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_688()
+ inline bool jj_3R_scalar_type_definition_2076_26_688()
{
if (jj_done) return true;
- if (jj_3R_694()) return true;
+ if (jj_3R_physical_type_definition_1843_9_694()) return true;
return false;
}
- inline bool jj_3R_249()
+ inline bool jj_3R_attribute_name_521_46_249()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
return false;
}
- inline bool jj_3R_434()
+ inline bool jj_3R_selected_name_2095_2_434()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(DOT_T)) return true;
- if (jj_3R_105()) return true;
+ if (jj_3R_suffix_2404_1_105()) return true;
return false;
}
- inline bool jj_3R_721()
+ inline bool jj_3R_secondary_unit_declaration_2087_1_721()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(EQU_T)) return true;
- if (jj_3R_108()) return true;
+ if (jj_3R_physical_literal_1838_2_108()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
inline bool jj_3_82()
{
if (jj_done) return true;
- if (jj_3R_116()) return true;
+ if (jj_3R_enumeration_type_definition_1148_3_116()) return true;
return false;
}
- inline bool jj_3R_677()
+ inline bool jj_3R_scalar_type_definition_2076_3_677()
{
if (jj_done) return true;
- if (jj_3R_86()) return true;
+ if (jj_3R_range_constraint_2017_1_86()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_688()) jj_scanpos = xsp;
+ if (jj_3R_scalar_type_definition_2076_26_688()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_676()
+ inline bool jj_3R_scalar_type_definition_2074_1_676()
{
if (jj_done) return true;
- if (jj_3R_116()) return true;
+ if (jj_3R_enumeration_type_definition_1148_3_116()) return true;
return false;
}
- inline bool jj_3R_656()
+ inline bool jj_3R_scalar_type_definition_2074_1_656()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_676()) return false;
+ if (jj_3R_scalar_type_definition_2074_1_676()) {
jj_scanpos = xsp;
- if (jj_3R_677()) return true;
+ if (jj_3R_scalar_type_definition_2076_3_677()) return true;
+ }
return false;
}
- inline bool jj_3R_356()
+ inline bool jj_3R_assertion_475_63_356()
{
if (jj_done) return true;
if (jj_scan_token(SEVERITY_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
return false;
}
- inline bool jj_3R_275()
+ inline bool jj_3R_return_statement_2068_3_275()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_130()
+ inline bool jj_3R_return_statement_2068_1_130()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_275()) jj_scanpos = xsp;
+ if (jj_3R_return_statement_2068_3_275()) jj_scanpos = xsp;
if (jj_scan_token(RETURN_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_276()) jj_scanpos = xsp;
+ if (jj_3R_return_statement_2068_53_276()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_259()
+ inline bool jj_3R_report_statement_2057_11_259()
{
if (jj_done) return true;
if (jj_scan_token(SEVERITY_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
return false;
}
- inline bool jj_3R_395()
+ inline bool jj_3R_attribute_specification_526_3_395()
{
if (jj_done) return true;
if (jj_scan_token(ATTRIBUTE_T)) return true;
- if (jj_3R_230()) return true;
+ if (jj_3R_attribute_designator_514_3_230()) return true;
if (jj_scan_token(OF_T)) return true;
- if (jj_3R_488()) return true;
+ if (jj_3R_entity_specification_1114_1_488()) return true;
if (jj_scan_token(IS_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_330()
+ inline bool jj_3R_association_list_500_26_330()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_329()) return true;
+ if (jj_3R_association_element_494_2_329()) return true;
return false;
}
- inline bool jj_3R_115()
+ inline bool jj_3R_attribute_name_521_3_115()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(APOSTROPHE_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_scan_token(85)) return false;
+ if (jj_scan_token(85)) {
jj_scanpos = xsp;
- if (jj_3R_249()) return true;
+ if (jj_3R_attribute_name_521_46_249()) return true;
+ }
xsp = jj_scanpos;
- if (jj_3R_250()) jj_scanpos = xsp;
+ if (jj_3R_attribute_name_521_68_250()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_258()
+ inline bool jj_3R_report_statement_2055_3_258()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_319()
+ inline bool jj_3R_relation_2032_25_319()
{
if (jj_done) return true;
- if (jj_3R_403()) return true;
- if (jj_3R_318()) return true;
+ if (jj_3R_relation_operator_2037_2_403()) return true;
+ if (jj_3R_shift_expression_2174_2_318()) return true;
return false;
}
- inline bool jj_3R_121()
+ inline bool jj_3R_report_statement_2055_1_121()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_258()) jj_scanpos = xsp;
+ if (jj_3R_report_statement_2055_3_258()) jj_scanpos = xsp;
if (jj_scan_token(REPORT_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
xsp = jj_scanpos;
- if (jj_3R_259()) jj_scanpos = xsp;
+ if (jj_3R_report_statement_2057_11_259()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_372()
+ inline bool jj_3R_attribute_designator_515_5_372()
{
if (jj_done) return true;
if (jj_scan_token(RANGE_T)) return true;
return false;
}
- inline bool jj_3R_230()
+ inline bool jj_3R_attribute_designator_514_3_230()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_371()) return false;
+ if (jj_3R_attribute_designator_514_3_371()) {
jj_scanpos = xsp;
- if (jj_3R_372()) return true;
+ if (jj_3R_attribute_designator_515_5_372()) return true;
+ }
return false;
}
- inline bool jj_3R_371()
+ inline bool jj_3R_attribute_designator_514_3_371()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
- inline bool jj_3R_506()
+ inline bool jj_3R_relation_operator_2048_3_506()
{
if (jj_done) return true;
if (jj_scan_token(QNEQU_T)) return true;
return false;
}
- inline bool jj_3R_505()
+ inline bool jj_3R_relation_operator_2047_3_505()
{
if (jj_done) return true;
if (jj_scan_token(QEQU_T)) return true;
return false;
}
- inline bool jj_3R_504()
+ inline bool jj_3R_relation_operator_2046_3_504()
{
if (jj_done) return true;
if (jj_scan_token(QL_T)) return true;
return false;
}
- inline bool jj_3R_698()
+ inline bool jj_3R_record_type_definition_2027_21_698()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
return false;
}
- inline bool jj_3R_503()
+ inline bool jj_3R_relation_operator_2045_3_503()
{
if (jj_done) return true;
if (jj_scan_token(QG_T)) return true;
return false;
}
- inline bool jj_3R_502()
+ inline bool jj_3R_relation_operator_2044_3_502()
{
if (jj_done) return true;
if (jj_scan_token(QLT_T)) return true;
return false;
}
- inline bool jj_3R_501()
+ inline bool jj_3R_relation_operator_2043_3_501()
{
if (jj_done) return true;
if (jj_scan_token(QGT_T)) return true;
return false;
}
- inline bool jj_3R_500()
+ inline bool jj_3R_relation_operator_2042_3_500()
{
if (jj_done) return true;
if (jj_scan_token(NOTEQU_T)) return true;
return false;
}
- inline bool jj_3R_499()
+ inline bool jj_3R_relation_operator_2041_3_499()
{
if (jj_done) return true;
if (jj_scan_token(LESSTHAN_T)) return true;
return false;
}
- inline bool jj_3R_498()
+ inline bool jj_3R_relation_operator_2040_3_498()
{
if (jj_done) return true;
if (jj_scan_token(GREATERTHAN_T)) return true;
inline bool jj_3_6()
{
if (jj_done) return true;
- if (jj_3R_66()) return true;
+ if (jj_3R_formal_part_1241_1_66()) return true;
if (jj_scan_token(ARROW_T)) return true;
return false;
}
- inline bool jj_3R_67()
+ inline bool jj_3R_attribute_declaration_505_2_67()
{
if (jj_done) return true;
if (jj_scan_token(ATTRIBUTE_T)) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_161()) return true;
+ if (jj_3R_type_mark_2456_3_161()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_497()
+ inline bool jj_3R_relation_operator_2039_3_497()
{
if (jj_done) return true;
if (jj_scan_token(EQU_T)) return true;
return false;
}
- inline bool jj_3R_355()
+ inline bool jj_3R_assertion_475_31_355()
{
if (jj_done) return true;
if (jj_scan_token(REPORT_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
return false;
}
- inline bool jj_3R_496()
+ inline bool jj_3R_relation_operator_2038_3_496()
{
if (jj_done) return true;
if (jj_scan_token(GT_T)) return true;
return false;
}
- inline bool jj_3R_403()
+ inline bool jj_3R_relation_operator_2037_2_403()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_495()) return false;
+ if (jj_3R_relation_operator_2037_2_495()) {
jj_scanpos = xsp;
- if (!jj_3R_496()) return false;
+ if (jj_3R_relation_operator_2038_3_496()) {
jj_scanpos = xsp;
- if (!jj_3R_497()) return false;
+ if (jj_3R_relation_operator_2039_3_497()) {
jj_scanpos = xsp;
- if (!jj_3R_498()) return false;
+ if (jj_3R_relation_operator_2040_3_498()) {
jj_scanpos = xsp;
- if (!jj_3R_499()) return false;
+ if (jj_3R_relation_operator_2041_3_499()) {
jj_scanpos = xsp;
- if (!jj_3R_500()) return false;
+ if (jj_3R_relation_operator_2042_3_500()) {
jj_scanpos = xsp;
- if (!jj_3R_501()) return false;
+ if (jj_3R_relation_operator_2043_3_501()) {
jj_scanpos = xsp;
- if (!jj_3R_502()) return false;
+ if (jj_3R_relation_operator_2044_3_502()) {
jj_scanpos = xsp;
- if (!jj_3R_503()) return false;
+ if (jj_3R_relation_operator_2045_3_503()) {
jj_scanpos = xsp;
- if (!jj_3R_504()) return false;
+ if (jj_3R_relation_operator_2046_3_504()) {
jj_scanpos = xsp;
- if (!jj_3R_505()) return false;
+ if (jj_3R_relation_operator_2047_3_505()) {
jj_scanpos = xsp;
- if (jj_3R_506()) return true;
+ if (jj_3R_relation_operator_2048_3_506()) return true;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_495()
+ inline bool jj_3R_relation_operator_2037_2_495()
{
if (jj_done) return true;
if (jj_scan_token(LT_T)) return true;
return false;
}
- inline bool jj_3R_169()
+ inline bool jj_3R_association_list_500_1_169()
{
if (jj_done) return true;
- if (jj_3R_329()) return true;
+ if (jj_3R_association_element_494_2_329()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_330()) { jj_scanpos = xsp; break; }
+ if (jj_3R_association_list_500_26_330()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_151()
+ inline bool jj_3R_relation_2032_3_151()
{
if (jj_done) return true;
- if (jj_3R_318()) return true;
+ if (jj_3R_shift_expression_2174_2_318()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_319()) jj_scanpos = xsp;
+ if (jj_3R_relation_2032_25_319()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_697()
+ inline bool jj_3R_record_type_definition_2024_9_697()
{
if (jj_done) return true;
- if (jj_3R_705()) return true;
+ if (jj_3R_element_declaration_983_3_705()) return true;
return false;
}
- inline bool jj_3R_418()
+ inline bool jj_3R_association_element_494_3_418()
{
if (jj_done) return true;
- if (jj_3R_66()) return true;
+ if (jj_3R_formal_part_1241_1_66()) return true;
if (jj_scan_token(ARROW_T)) return true;
return false;
}
- inline bool jj_3R_329()
+ inline bool jj_3R_association_element_494_2_329()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_418()) jj_scanpos = xsp;
- if (jj_3R_419()) return true;
+ if (jj_3R_association_element_494_3_418()) jj_scanpos = xsp;
+ if (jj_3R_actual_part_376_2_419()) return true;
return false;
}
- inline bool jj_3R_690()
+ inline bool jj_3R_record_type_definition_2022_5_690()
{
if (jj_done) return true;
if (jj_scan_token(RECORD_T)) return true;
Token * xsp;
- if (jj_3R_697()) return true;
+ if (jj_3R_record_type_definition_2024_9_697()) return true;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_697()) { jj_scanpos = xsp; break; }
+ if (jj_3R_record_type_definition_2024_9_697()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(END_T)) return true;
if (jj_scan_token(RECORD_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_698()) jj_scanpos = xsp;
+ if (jj_3R_record_type_definition_2027_21_698()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_257()
+ inline bool jj_3R_assertion_statement_486_5_257()
{
if (jj_done) return true;
- if (jj_3R_145()) return true;
+ if (jj_3R_label_1537_2_145()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_120()
+ inline bool jj_3R_assertion_statement_486_3_120()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_257()) jj_scanpos = xsp;
- if (jj_3R_196()) return true;
+ if (jj_3R_assertion_statement_486_5_257()) jj_scanpos = xsp;
+ if (jj_3R_assertion_475_4_196()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
inline bool jj_3_80()
{
if (jj_done) return true;
- if (jj_3R_70()) return true;
- if (jj_3R_71()) return true;
- if (jj_3R_70()) return true;
+ if (jj_3R_simple_expression_2250_1_70()) return true;
+ if (jj_3R_direction_948_1_71()) return true;
+ if (jj_3R_simple_expression_2250_1_70()) return true;
return false;
}
inline bool jj_3_81()
{
if (jj_done) return true;
- if (jj_3R_115()) return true;
+ if (jj_3R_attribute_name_521_3_115()) return true;
return false;
}
- inline bool jj_3R_86()
+ inline bool jj_3R_range_constraint_2017_1_86()
{
if (jj_done) return true;
if (jj_scan_token(RANGE_T)) return true;
- if (jj_3R_88()) return true;
+ if (jj_3R_range_2008_4_88()) return true;
return false;
}
- inline bool jj_3R_196()
+ inline bool jj_3R_assertion_475_4_196()
{
if (jj_done) return true;
if (jj_scan_token(ASSERT_T)) return true;
- if (jj_3R_83()) return true;
+ if (jj_3R_condition_809_3_83()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_355()) jj_scanpos = xsp;
+ if (jj_3R_assertion_475_31_355()) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_356()) jj_scanpos = xsp;
+ if (jj_3R_assertion_475_63_356()) jj_scanpos = xsp;
return false;
}
inline bool jj_3_79()
{
if (jj_done) return true;
- if (jj_3R_114()) return true;
+ if (jj_3R_aggregate_396_3_114()) return true;
return false;
}
{
if (jj_done) return true;
if (jj_scan_token(ARRAY_T)) return true;
- if (jj_3R_65()) return true;
+ if (jj_3R_index_constraint_1395_3_65()) return true;
if (jj_scan_token(OF_T)) return true;
return false;
}
- inline bool jj_3R_191()
+ inline bool jj_3R_range_2011_2_191()
{
if (jj_done) return true;
- if (jj_3R_115()) return true;
+ if (jj_3R_attribute_name_521_3_115()) return true;
return false;
}
- inline bool jj_3R_190()
+ inline bool jj_3R_range_2008_4_190()
{
if (jj_done) return true;
- if (jj_3R_70()) return true;
- if (jj_3R_71()) return true;
- if (jj_3R_70()) return true;
+ if (jj_3R_simple_expression_2250_1_70()) return true;
+ if (jj_3R_direction_948_1_71()) return true;
+ if (jj_3R_simple_expression_2250_1_70()) return true;
return false;
}
- inline bool jj_3R_88()
+ inline bool jj_3R_range_2008_4_88()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_190()) return false;
+ if (jj_3R_range_2008_4_190()) {
jj_scanpos = xsp;
- if (jj_3R_191()) return true;
+ if (jj_3R_range_2011_2_191()) return true;
+ }
return false;
}
- inline bool jj_3R_696()
+ inline bool jj_3R_array_type_definition_469_4_696()
{
if (jj_done) return true;
- if (jj_3R_704()) return true;
+ if (jj_3R_unconstraint_array_definition_2461_1_704()) return true;
return false;
}
- inline bool jj_3R_238()
+ inline bool jj_3R_qualified_expression_2001_7_238()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_237()
+ inline bool jj_3R_qualified_expression_1999_5_237()
{
if (jj_done) return true;
- if (jj_3R_114()) return true;
+ if (jj_3R_aggregate_396_3_114()) return true;
return false;
}
- inline bool jj_3R_695()
+ inline bool jj_3R_array_type_definition_466_2_695()
{
if (jj_done) return true;
- if (jj_3R_703()) return true;
+ if (jj_3R_constraint_array_definition_890_1_703()) return true;
return false;
}
- inline bool jj_3R_689()
+ inline bool jj_3R_array_type_definition_466_2_689()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_695()) return false;
+ if (jj_3R_array_type_definition_466_2_695()) {
jj_scanpos = xsp;
- if (jj_3R_696()) return true;
+ if (jj_3R_array_type_definition_469_4_696()) return true;
+ }
return false;
}
- inline bool jj_3R_64()
+ inline bool jj_3R_qualified_expression_1997_3_64()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(APOSTROPHE_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_237()) return false;
+ if (jj_3R_qualified_expression_1999_5_237()) {
jj_scanpos = xsp;
- if (jj_3R_238()) return true;
+ if (jj_3R_qualified_expression_2001_7_238()) return true;
+ }
return false;
}
- inline bool jj_3R_359()
+ inline bool jj_3R_process_statement_part_1992_4_359()
{
if (jj_done) return true;
- if (jj_3R_117()) return true;
+ if (jj_3R_sequential_statement_2133_5_117()) return true;
return false;
}
- inline bool jj_3R_200()
+ inline bool jj_3R_process_statement_part_1992_3_200()
{
if (jj_done) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_359()) { jj_scanpos = xsp; break; }
+ if (jj_3R_process_statement_part_1992_4_359()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_201()
+ inline bool jj_3R_process_statement_1970_24_201()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
- inline bool jj_3R_484()
+ inline bool jj_3R_alias_declaration_403_44_484()
{
if (jj_done) return true;
- if (jj_3R_245()) return true;
+ if (jj_3R_signature_2241_1_245()) return true;
return false;
}
- inline bool jj_3R_248()
+ inline bool jj_3R_aggregate_396_39_248()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_247()) return true;
+ if (jj_3R_element_association_973_1_247()) return true;
return false;
}
- inline bool jj_3R_244()
+ inline bool jj_3R_allocator_423_6_244()
{
if (jj_done) return true;
if (jj_scan_token(NEW_T)) return true;
- if (jj_3R_89()) return true;
+ if (jj_3R_subtype_indication_2398_3_89()) return true;
return false;
}
- inline bool jj_3R_198()
+ inline bool jj_3R_process_statement_1960_4_198()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_357()) return true;
+ if (jj_3R_sensitivity_list_2121_3_357()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_113()
+ inline bool jj_3R_allocator_421_3_113()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3_4()) return false;
+ if (jj_3_4()) {
jj_scanpos = xsp;
- if (jj_3R_244()) return true;
+ if (jj_3R_allocator_423_6_244()) return true;
+ }
return false;
}
{
if (jj_done) return true;
if (jj_scan_token(NEW_T)) return true;
- if (jj_3R_64()) return true;
+ if (jj_3R_qualified_expression_1997_3_64()) return true;
return false;
}
- inline bool jj_3R_552()
+ inline bool jj_3R_alias_designator_416_4_552()
{
if (jj_done) return true;
- if (jj_3R_321()) return true;
+ if (jj_3R_operator_symbol_1721_1_321()) return true;
return false;
}
- inline bool jj_3R_197()
+ inline bool jj_3R_process_statement_1952_3_197()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_551()
+ inline bool jj_3R_alias_designator_415_4_551()
{
if (jj_done) return true;
if (jj_scan_token(CHARACTER_LITERAL)) return true;
return false;
}
- inline bool jj_3R_93()
+ inline bool jj_3R_process_statement_1952_1_93()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_197()) jj_scanpos = xsp;
+ if (jj_3R_process_statement_1952_3_197()) jj_scanpos = xsp;
xsp = jj_scanpos;
if (jj_scan_token(79)) jj_scanpos = xsp;
if (jj_scan_token(PROCESS_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_198()) jj_scanpos = xsp;
+ if (jj_3R_process_statement_1960_4_198()) jj_scanpos = xsp;
xsp = jj_scanpos;
if (jj_scan_token(56)) jj_scanpos = xsp;
- if (jj_3R_199()) return true;
+ if (jj_3R_process_declarative_part_1947_2_199()) return true;
if (jj_scan_token(BEGIN_T)) return true;
- if (jj_3R_200()) return true;
+ if (jj_3R_process_statement_part_1992_3_200()) return true;
if (jj_scan_token(END_T)) return true;
xsp = jj_scanpos;
if (jj_scan_token(79)) jj_scanpos = xsp;
if (jj_scan_token(PROCESS_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_201()) jj_scanpos = xsp;
+ if (jj_3R_process_statement_1970_24_201()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_550()
+ inline bool jj_3R_alias_designator_414_2_550()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
- inline bool jj_3R_482()
+ inline bool jj_3R_alias_designator_414_2_482()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_550()) return false;
+ if (jj_3R_alias_designator_414_2_550()) {
jj_scanpos = xsp;
- if (!jj_3R_551()) return false;
+ if (jj_3R_alias_designator_415_4_551()) {
jj_scanpos = xsp;
- if (jj_3R_552()) return true;
+ if (jj_3R_alias_designator_416_4_552()) return true;
+ }
+ }
return false;
}
- inline bool jj_3R_358()
+ inline bool jj_3R_process_declarative_part_1947_4_358()
{
if (jj_done) return true;
- if (jj_3R_441()) return true;
+ if (jj_3R_process_declarative_item_1926_1_441()) return true;
return false;
}
- inline bool jj_3R_199()
+ inline bool jj_3R_process_declarative_part_1947_2_199()
{
if (jj_done) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_358()) { jj_scanpos = xsp; break; }
+ if (jj_3R_process_declarative_part_1947_4_358()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_534()
+ inline bool jj_3R_process_declarative_item_1942_3_534()
{
if (jj_done) return true;
- if (jj_3R_398()) return true;
+ if (jj_3R_group_declaration_1327_3_398()) return true;
return false;
}
- inline bool jj_3R_533()
+ inline bool jj_3R_process_declarative_item_1938_3_533()
{
if (jj_done) return true;
- if (jj_3R_347()) return true;
+ if (jj_3R_use_clause_2467_2_347()) return true;
return false;
}
- inline bool jj_3R_483()
+ inline bool jj_3R_alias_declaration_402_4_483()
{
if (jj_done) return true;
if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_89()) return true;
+ if (jj_3R_subtype_indication_2398_3_89()) return true;
return false;
}
inline bool jj_3_78()
{
if (jj_done) return true;
- if (jj_3R_68()) return true;
+ if (jj_3R_group_template_declaration_1335_2_68()) return true;
return false;
}
- inline bool jj_3R_532()
+ inline bool jj_3R_process_declarative_item_1937_3_532()
{
if (jj_done) return true;
- if (jj_3R_395()) return true;
+ if (jj_3R_attribute_specification_526_3_395()) return true;
return false;
}
- inline bool jj_3R_393()
+ inline bool jj_3R_alias_declaration_401_2_393()
{
if (jj_done) return true;
if (jj_scan_token(ALIAS_T)) return true;
- if (jj_3R_482()) return true;
+ if (jj_3R_alias_designator_414_2_482()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_483()) jj_scanpos = xsp;
+ if (jj_3R_alias_declaration_402_4_483()) jj_scanpos = xsp;
if (jj_scan_token(IS_T)) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
xsp = jj_scanpos;
- if (jj_3R_484()) jj_scanpos = xsp;
+ if (jj_3R_alias_declaration_403_44_484()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_531()
+ inline bool jj_3R_process_declarative_item_1933_3_531()
{
if (jj_done) return true;
- if (jj_3R_393()) return true;
+ if (jj_3R_alias_declaration_401_2_393()) return true;
return false;
}
inline bool jj_3_77()
{
if (jj_done) return true;
- if (jj_3R_67()) return true;
+ if (jj_3R_attribute_declaration_505_2_67()) return true;
return false;
}
- inline bool jj_3R_530()
+ inline bool jj_3R_process_declarative_item_1932_3_530()
{
if (jj_done) return true;
- if (jj_3R_392()) return true;
+ if (jj_3R_file_declaration_1199_2_392()) return true;
return false;
}
- inline bool jj_3R_529()
+ inline bool jj_3R_process_declarative_item_1931_3_529()
{
if (jj_done) return true;
- if (jj_3R_391()) return true;
+ if (jj_3R_variable_declaration_2503_1_391()) return true;
return false;
}
- inline bool jj_3R_114()
+ inline bool jj_3R_aggregate_396_3_114()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_247()) return true;
+ if (jj_3R_element_association_973_1_247()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_248()) { jj_scanpos = xsp; break; }
+ if (jj_3R_aggregate_396_39_248()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_528()
+ inline bool jj_3R_process_declarative_item_1930_3_528()
{
if (jj_done) return true;
- if (jj_3R_389()) return true;
+ if (jj_3R_constant_declaration_877_4_389()) return true;
return false;
}
- inline bool jj_3R_527()
+ inline bool jj_3R_process_declarative_item_1929_3_527()
{
if (jj_done) return true;
- if (jj_3R_388()) return true;
+ if (jj_3R_subtype_declaration_2382_1_388()) return true;
return false;
}
- inline bool jj_3R_526()
+ inline bool jj_3R_process_declarative_item_1928_3_526()
{
if (jj_done) return true;
- if (jj_3R_387()) return true;
+ if (jj_3R_type_declaration_2437_1_387()) return true;
return false;
}
- inline bool jj_3R_282()
+ inline bool jj_3R_adding_operator_390_5_282()
{
if (jj_done) return true;
if (jj_scan_token(MINUS_T)) return true;
return false;
}
- inline bool jj_3R_283()
+ inline bool jj_3R_adding_operator_391_4_283()
{
if (jj_done) return true;
if (jj_scan_token(AMPERSAND_T)) return true;
inline bool jj_3_3()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
if (jj_scan_token(LPAREN_T)) return true;
return false;
}
- inline bool jj_3R_525()
+ inline bool jj_3R_process_declarative_item_1926_1_525()
{
if (jj_done) return true;
- if (jj_3R_98()) return true;
+ if (jj_3R_subprogram_declaration_2294_1_98()) return true;
return false;
}
- inline bool jj_3R_133()
+ inline bool jj_3R_adding_operator_389_3_133()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_281()) return false;
+ if (jj_3R_adding_operator_389_3_281()) {
jj_scanpos = xsp;
- if (!jj_3R_282()) return false;
+ if (jj_3R_adding_operator_390_5_282()) {
jj_scanpos = xsp;
- if (jj_3R_283()) return true;
+ if (jj_3R_adding_operator_391_4_283()) return true;
+ }
+ }
return false;
}
- inline bool jj_3R_281()
+ inline bool jj_3R_adding_operator_389_3_281()
{
if (jj_done) return true;
if (jj_scan_token(PLUS_T)) return true;
return false;
}
- inline bool jj_3R_441()
+ inline bool jj_3R_process_declarative_item_1926_1_441()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_525()) return false;
+ if (jj_3R_process_declarative_item_1926_1_525()) {
jj_scanpos = xsp;
- if (!jj_3R_526()) return false;
+ if (jj_3R_process_declarative_item_1928_3_526()) {
jj_scanpos = xsp;
- if (!jj_3R_527()) return false;
+ if (jj_3R_process_declarative_item_1929_3_527()) {
jj_scanpos = xsp;
- if (!jj_3R_528()) return false;
+ if (jj_3R_process_declarative_item_1930_3_528()) {
jj_scanpos = xsp;
- if (!jj_3R_529()) return false;
+ if (jj_3R_process_declarative_item_1931_3_529()) {
jj_scanpos = xsp;
- if (!jj_3R_530()) return false;
+ if (jj_3R_process_declarative_item_1932_3_530()) {
jj_scanpos = xsp;
- if (!jj_3R_531()) return false;
+ if (jj_3R_process_declarative_item_1933_3_531()) {
jj_scanpos = xsp;
- if (!jj_3_77()) return false;
+ if (jj_3_77()) {
jj_scanpos = xsp;
- if (!jj_3R_532()) return false;
+ if (jj_3R_process_declarative_item_1937_3_532()) {
jj_scanpos = xsp;
- if (!jj_3R_533()) return false;
+ if (jj_3R_process_declarative_item_1938_3_533()) {
jj_scanpos = xsp;
- if (!jj_3_78()) return false;
+ if (jj_3_78()) {
jj_scanpos = xsp;
- if (jj_3R_534()) return true;
+ if (jj_3R_process_declarative_item_1942_3_534()) return true;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_342()
+ inline bool jj_3R_procedure_call_1912_14_342()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_236()) return true;
+ if (jj_3R_actual_parameter_part_370_4_236()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
inline bool jj_3_2()
{
if (jj_done) return true;
- if (jj_3R_62()) return true;
+ if (jj_3R_actual_designator_356_1_62()) return true;
return false;
}
inline bool jj_3_76()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_124()
+ inline bool jj_3R_procedure_call_statement_1918_1_124()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
if (jj_3_76()) jj_scanpos = xsp;
- if (jj_3R_180()) return true;
+ if (jj_3R_procedure_call_1912_2_180()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_516()
+ inline bool jj_3R_actual_part_381_2_516()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_62()) return true;
+ if (jj_3R_actual_designator_356_1_62()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_515()
+ inline bool jj_3R_actual_part_379_4_515()
{
if (jj_done) return true;
if (jj_scan_token(BOX_T)) return true;
return false;
}
- inline bool jj_3R_180()
+ inline bool jj_3R_procedure_call_1912_2_180()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_342()) jj_scanpos = xsp;
+ if (jj_3R_procedure_call_1912_14_342()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_514()
+ inline bool jj_3R_actual_part_376_2_514()
{
if (jj_done) return true;
- if (jj_3R_62()) return true;
+ if (jj_3R_actual_designator_356_1_62()) return true;
return false;
}
- inline bool jj_3R_419()
+ inline bool jj_3R_actual_part_376_2_419()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_514()) return false;
+ if (jj_3R_actual_part_376_2_514()) {
jj_scanpos = xsp;
- if (!jj_3R_515()) return false;
+ if (jj_3R_actual_part_379_4_515()) {
jj_scanpos = xsp;
- if (jj_3R_516()) return true;
+ if (jj_3R_actual_part_381_2_516()) return true;
+ }
+ }
return false;
}
inline bool jj_3_74()
{
if (jj_done) return true;
- if (jj_3R_91()) return true;
+ if (jj_3R_package_instantiation_declaration_2649_2_91()) return true;
return false;
}
- inline bool jj_3R_214()
+ inline bool jj_3R_primary_unit_1906_4_214()
{
if (jj_done) return true;
- if (jj_3R_87()) return true;
+ if (jj_3R_context_declaration_2633_2_87()) return true;
return false;
}
- inline bool jj_3R_236()
+ inline bool jj_3R_actual_parameter_part_370_4_236()
{
if (jj_done) return true;
- if (jj_3R_169()) return true;
+ if (jj_3R_association_list_500_1_169()) return true;
return false;
}
- inline bool jj_3R_213()
+ inline bool jj_3R_primary_unit_1905_3_213()
{
if (jj_done) return true;
- if (jj_3R_368()) return true;
+ if (jj_3R_package_declaration_1773_2_368()) return true;
return false;
}
inline bool jj_3_1()
{
if (jj_done) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
return false;
}
inline bool jj_3_75()
{
if (jj_done) return true;
- if (jj_3R_95()) return true;
+ if (jj_3R_interface_package_declaration_2658_2_95()) return true;
return false;
}
- inline bool jj_3R_212()
+ inline bool jj_3R_primary_unit_1900_1_212()
{
if (jj_done) return true;
- if (jj_3R_91()) return true;
+ if (jj_3R_package_instantiation_declaration_2649_2_91()) return true;
return false;
}
- inline bool jj_3R_211()
+ inline bool jj_3R_primary_unit_1898_3_211()
{
if (jj_done) return true;
- if (jj_3R_367()) return true;
+ if (jj_3R_configuration_declaration_838_2_367()) return true;
return false;
}
- inline bool jj_3R_155()
+ inline bool jj_3R_actual_designator_361_3_155()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
inline bool jj_3_73()
{
if (jj_done) return true;
- if (jj_3R_113()) return true;
+ if (jj_3R_allocator_421_3_113()) return true;
return false;
}
- inline bool jj_3R_210()
+ inline bool jj_3R_primary_unit_1897_1_210()
{
if (jj_done) return true;
- if (jj_3R_366()) return true;
+ if (jj_3R_entity_declaration_1044_5_366()) return true;
return false;
}
- inline bool jj_3R_99()
+ inline bool jj_3R_primary_unit_1897_1_99()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_210()) return false;
+ if (jj_3R_primary_unit_1897_1_210()) {
jj_scanpos = xsp;
- if (!jj_3R_211()) return false;
+ if (jj_3R_primary_unit_1898_3_211()) {
jj_scanpos = xsp;
- if (!jj_3R_212()) return false;
+ if (jj_3R_primary_unit_1900_1_212()) {
jj_scanpos = xsp;
- if (!jj_3_75()) return false;
+ if (jj_3_75()) {
jj_scanpos = xsp;
- if (!jj_3R_213()) return false;
+ if (jj_3R_primary_unit_1905_3_213()) {
jj_scanpos = xsp;
- if (jj_3R_214()) return true;
+ if (jj_3R_primary_unit_1906_4_214()) return true;
+ }
+ }
+ }
+ }
+ }
return false;
}
inline bool jj_3_72()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
return false;
}
- inline bool jj_3R_154()
+ inline bool jj_3R_actual_designator_358_1_154()
{
if (jj_done) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
return false;
}
inline bool jj_3_71()
{
if (jj_done) return true;
- if (jj_3R_112()) return true;
+ if (jj_3R_literal_1566_2_112()) return true;
return false;
}
- inline bool jj_3R_153()
+ inline bool jj_3R_actual_designator_356_1_153()
{
if (jj_done) return true;
if (jj_scan_token(OPEN_T)) return true;
return false;
}
- inline bool jj_3R_62()
+ inline bool jj_3R_actual_designator_356_1_62()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_153()) return false;
+ if (jj_3R_actual_designator_356_1_153()) {
jj_scanpos = xsp;
- if (!jj_3R_154()) return false;
+ if (jj_3R_actual_designator_358_1_154()) {
jj_scanpos = xsp;
- if (jj_3R_155()) return true;
+ if (jj_3R_actual_designator_361_3_155()) return true;
+ }
+ }
return false;
}
- inline bool jj_3R_475()
+ inline bool jj_3R_primary_1891_1_475()
{
if (jj_done) return true;
- if (jj_3R_114()) return true;
+ if (jj_3R_aggregate_396_3_114()) return true;
return false;
}
inline bool jj_3_70()
{
if (jj_done) return true;
- if (jj_3R_111()) return true;
+ if (jj_3R_type_conversion_2432_3_111()) return true;
return false;
}
- inline bool jj_3R_474()
+ inline bool jj_3R_primary_1888_1_474()
{
if (jj_done) return true;
- if (jj_3R_113()) return true;
+ if (jj_3R_allocator_421_3_113()) return true;
return false;
}
- inline bool jj_3R_658()
+ inline bool jj_3R_access_type_definition_349_3_658()
{
if (jj_done) return true;
if (jj_scan_token(ACCESS_T)) return true;
- if (jj_3R_89()) return true;
+ if (jj_3R_subtype_indication_2398_3_89()) return true;
return false;
}
inline bool jj_3_69()
{
if (jj_done) return true;
- if (jj_3R_64()) return true;
+ if (jj_3R_qualified_expression_1997_3_64()) return true;
return false;
}
- inline bool jj_3R_473()
+ inline bool jj_3R_primary_1885_1_473()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
return false;
}
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_472()
+ inline bool jj_3R_primary_1882_1_472()
{
if (jj_done) return true;
- if (jj_3R_112()) return true;
+ if (jj_3R_literal_1566_2_112()) return true;
return false;
}
- inline bool jj_3R_235()
+ inline bool jj_3R_abstract_literal_343_4_235()
{
if (jj_done) return true;
if (jj_scan_token(BASED_LITERAL)) return true;
return false;
}
- inline bool jj_3R_702()
+ inline bool jj_3R_physical_type_definition_1848_33_702()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_name_1633_2_63()) return true;
return false;
}
- inline bool jj_3R_234()
+ inline bool jj_3R_abstract_literal_342_4_234()
{
if (jj_done) return true;
if (jj_scan_token(INTEGER)) return true;
inline bool jj_3_67()
{
if (jj_done) return true;
- if (jj_3R_110()) return true;
+ if (jj_3R_function_call_1278_1_110()) return true;
return false;
}
- inline bool jj_3R_109()
+ inline bool jj_3R_abstract_literal_341_4_109()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_233()) return false;
+ if (jj_3R_abstract_literal_341_4_233()) {
jj_scanpos = xsp;
- if (!jj_3R_234()) return false;
+ if (jj_3R_abstract_literal_342_4_234()) {
jj_scanpos = xsp;
- if (jj_3R_235()) return true;
+ if (jj_3R_abstract_literal_343_4_235()) return true;
+ }
+ }
return false;
}
- inline bool jj_3R_233()
+ inline bool jj_3R_abstract_literal_341_4_233()
{
if (jj_done) return true;
if (jj_scan_token(DECIMAL_LITERAL)) return true;
return false;
}
- inline bool jj_3R_471()
+ inline bool jj_3R_primary_1879_1_471()
{
if (jj_done) return true;
- if (jj_3R_111()) return true;
+ if (jj_3R_type_conversion_2432_3_111()) return true;
return false;
}
- inline bool jj_3R_470()
+ inline bool jj_3R_primary_1876_1_470()
{
if (jj_done) return true;
- if (jj_3R_64()) return true;
+ if (jj_3R_qualified_expression_1997_3_64()) return true;
return false;
}
- inline bool jj_3R_469()
+ inline bool jj_3R_primary_1873_1_469()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_386()
+ inline bool jj_3R_primary_1870_1_386()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_468()) return false;
+ if (jj_3R_primary_1870_1_468()) {
jj_scanpos = xsp;
- if (!jj_3R_469()) return false;
+ if (jj_3R_primary_1873_1_469()) {
jj_scanpos = xsp;
- if (!jj_3R_470()) return false;
+ if (jj_3R_primary_1876_1_470()) {
jj_scanpos = xsp;
- if (!jj_3R_471()) return false;
+ if (jj_3R_primary_1879_1_471()) {
jj_scanpos = xsp;
- if (!jj_3R_472()) return false;
+ if (jj_3R_primary_1882_1_472()) {
jj_scanpos = xsp;
- if (!jj_3R_473()) return false;
+ if (jj_3R_primary_1885_1_473()) {
jj_scanpos = xsp;
- if (!jj_3R_474()) return false;
+ if (jj_3R_primary_1888_1_474()) {
jj_scanpos = xsp;
- if (jj_3R_475()) return true;
+ if (jj_3R_primary_1891_1_475()) return true;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_468()
+ inline bool jj_3R_primary_1870_1_468()
{
if (jj_done) return true;
- if (jj_3R_110()) return true;
+ if (jj_3R_function_call_1278_1_110()) return true;
return false;
}
- inline bool jj_3R_341()
+ inline bool jj_3R_port_map_aspect_1865_2_341()
{
if (jj_done) return true;
if (jj_scan_token(PORT_T)) return true;
if (jj_scan_token(MAP_T)) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_169()) return true;
+ if (jj_3R_association_list_500_1_169()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_594()
+ inline bool jj_3R_port_list_1860_3_594()
{
if (jj_done) return true;
- if (jj_3R_327()) return true;
+ if (jj_3R_interface_list_1476_3_327()) return true;
return false;
}
- inline bool jj_3R_701()
+ inline bool jj_3R_physical_type_definition_1846_14_701()
{
if (jj_done) return true;
- if (jj_3R_721()) return true;
+ if (jj_3R_secondary_unit_declaration_2087_1_721()) return true;
return false;
}
- inline bool jj_3R_553()
+ inline bool jj_3R_port_clause_1855_4_553()
{
if (jj_done) return true;
if (jj_scan_token(PORT_T)) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_594()) return true;
+ if (jj_3R_port_list_1860_3_594()) return true;
if (jj_scan_token(RPAREN_T)) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_694()
+ inline bool jj_3R_physical_type_definition_1843_9_694()
{
if (jj_done) return true;
if (jj_scan_token(UNITS_T)) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(SEMI_T)) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_701()) { jj_scanpos = xsp; break; }
+ if (jj_3R_physical_type_definition_1846_14_701()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(END_T)) return true;
if (jj_scan_token(UNITS_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_702()) jj_scanpos = xsp;
+ if (jj_3R_physical_type_definition_1848_33_702()) jj_scanpos = xsp;
return false;
}
inline bool jj_3_66()
{
if (jj_done) return true;
- if (jj_3R_109()) return true;
+ if (jj_3R_abstract_literal_341_4_109()) return true;
return false;
}
- inline bool jj_3R_232()
+ inline bool jj_3R_physical_literal_1838_3_232()
{
if (jj_done) return true;
- if (jj_3R_109()) return true;
+ if (jj_3R_abstract_literal_341_4_109()) return true;
return false;
}
- inline bool jj_3R_108()
+ inline bool jj_3R_physical_literal_1838_2_108()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_232()) jj_scanpos = xsp;
- if (jj_3R_63()) return true;
+ if (jj_3R_physical_literal_1838_3_232()) jj_scanpos = xsp;
+ if (jj_3R_name_1633_2_63()) return true;
return false;
}
- inline bool jj_3R_543()
+ inline bool jj_3R_parameter_specification_1833_1_543()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(IN_T)) return true;
- if (jj_3R_72()) return true;
+ if (jj_3R_discrete_range_964_3_72()) return true;
return false;
}
inline bool jj_3_65()
{
if (jj_done) return true;
- if (jj_3R_91()) return true;
+ if (jj_3R_package_instantiation_declaration_2649_2_91()) return true;
return false;
}
inline bool jj_3_63()
{
if (jj_done) return true;
- if (jj_3R_67()) return true;
+ if (jj_3R_attribute_declaration_505_2_67()) return true;
return false;
}
inline bool jj_3_64()
{
if (jj_done) return true;
- if (jj_3R_68()) return true;
+ if (jj_3R_group_template_declaration_1335_2_68()) return true;
return false;
}
- inline bool jj_3R_368()
+ inline bool jj_3R_package_declaration_1773_2_368()
{
if (jj_done) return true;
if (jj_scan_token(PACKAGE_T)) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
inline bool jj_3_62()
{
if (jj_done) return true;
- if (jj_3R_68()) return true;
+ if (jj_3R_group_template_declaration_1335_2_68()) return true;
return false;
}
- inline bool jj_3R_331()
+ inline bool jj_3R_options_1726_21_331()
{
if (jj_done) return true;
- if (jj_3R_420()) return true;
+ if (jj_3R_delay_mechanism_924_1_420()) return true;
return false;
}
- inline bool jj_3R_172()
+ inline bool jj_3R_options_1726_3_172()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
if (jj_scan_token(50)) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_331()) jj_scanpos = xsp;
+ if (jj_3R_options_1726_21_331()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_270()
+ inline bool jj_3R_next_statement_1685_43_270()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
- inline bool jj_3R_321()
+ inline bool jj_3R_operator_symbol_1721_1_321()
{
if (jj_done) return true;
if (jj_scan_token(STRINGLITERAL)) return true;
return false;
}
- inline bool jj_3R_654()
+ inline bool jj_3R_object_class_1716_2_654()
{
if (jj_done) return true;
if (jj_scan_token(TYPE_T)) return true;
return false;
}
- inline bool jj_3R_653()
+ inline bool jj_3R_object_class_1715_2_653()
{
if (jj_done) return true;
if (jj_scan_token(FILE_T)) return true;
return false;
}
- inline bool jj_3R_652()
+ inline bool jj_3R_object_class_1714_2_652()
{
if (jj_done) return true;
if (jj_scan_token(SHARED_T)) return true;
inline bool jj_3_61()
{
if (jj_done) return true;
- if (jj_3R_108()) return true;
+ if (jj_3R_physical_literal_1838_2_108()) return true;
return false;
}
- inline bool jj_3R_651()
+ inline bool jj_3R_object_class_1713_2_651()
{
if (jj_done) return true;
if (jj_scan_token(VARIABLE_T)) return true;
return false;
}
- inline bool jj_3R_650()
+ inline bool jj_3R_object_class_1712_2_650()
{
if (jj_done) return true;
if (jj_scan_token(SIGNAL_T)) return true;
return false;
}
- inline bool jj_3R_649()
+ inline bool jj_3R_object_class_1711_1_649()
{
if (jj_done) return true;
if (jj_scan_token(CONSTANT_T)) return true;
return false;
}
- inline bool jj_3R_625()
+ inline bool jj_3R_object_class_1711_1_625()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_649()) return false;
+ if (jj_3R_object_class_1711_1_649()) {
jj_scanpos = xsp;
- if (!jj_3R_650()) return false;
+ if (jj_3R_object_class_1712_2_650()) {
jj_scanpos = xsp;
- if (!jj_3R_651()) return false;
+ if (jj_3R_object_class_1713_2_651()) {
jj_scanpos = xsp;
- if (!jj_3R_652()) return false;
+ if (jj_3R_object_class_1714_2_652()) {
jj_scanpos = xsp;
- if (!jj_3R_653()) return false;
+ if (jj_3R_object_class_1715_2_653()) {
jj_scanpos = xsp;
- if (jj_3R_654()) return true;
+ if (jj_3R_object_class_1716_2_654()) return true;
+ }
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_370()
+ inline bool jj_3R_name_ext_1664_47_370()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
return false;
}
- inline bool jj_3R_216()
+ inline bool jj_3R_numeric_literal_1706_4_216()
{
if (jj_done) return true;
- if (jj_3R_109()) return true;
+ if (jj_3R_abstract_literal_341_4_109()) return true;
return false;
}
- inline bool jj_3R_215()
+ inline bool jj_3R_numeric_literal_1704_2_215()
{
if (jj_done) return true;
- if (jj_3R_108()) return true;
+ if (jj_3R_physical_literal_1838_2_108()) return true;
return false;
}
- inline bool jj_3R_101()
+ inline bool jj_3R_numeric_literal_1704_2_101()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_215()) return false;
+ if (jj_3R_numeric_literal_1704_2_215()) {
jj_scanpos = xsp;
- if (jj_3R_216()) return true;
+ if (jj_3R_numeric_literal_1706_4_216()) return true;
+ }
return false;
}
- inline bool jj_3R_459()
+ inline bool jj_3R_null_statement_1698_3_459()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_379()
+ inline bool jj_3R_null_statement_1698_1_379()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_459()) jj_scanpos = xsp;
+ if (jj_3R_null_statement_1698_3_459()) jj_scanpos = xsp;
if (jj_scan_token(NULL_T)) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_107()
+ inline bool jj_3R_null_1663_32_107()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
return false;
}
- inline bool jj_3R_271()
+ inline bool jj_3R_next_statement_1686_3_271()
{
if (jj_done) return true;
if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_83()) return true;
+ if (jj_3R_condition_809_3_83()) return true;
return false;
}
- inline bool jj_3R_269()
+ inline bool jj_3R_next_statement_1685_3_269()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
return false;
}
- inline bool jj_3R_128()
+ inline bool jj_3R_next_statement_1685_1_128()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_269()) jj_scanpos = xsp;
+ if (jj_3R_next_statement_1685_3_269()) jj_scanpos = xsp;
if (jj_scan_token(NEXT_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_270()) jj_scanpos = xsp;
+ if (jj_3R_next_statement_1685_43_270()) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_271()) jj_scanpos = xsp;
+ if (jj_3R_next_statement_1686_3_271()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_231()
+ inline bool jj_3R_test_att_name_1674_4_231()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_107()) { jj_scanpos = xsp; break; }
+ if (jj_3R_null_1663_32_107()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_229()
+ inline bool jj_3R_test_att_name_1672_5_229()
{
if (jj_done) return true;
- if (jj_3R_245()) return true;
+ if (jj_3R_signature_2241_1_245()) return true;
return false;
}
- inline bool jj_3R_106()
+ inline bool jj_3R_test_att_name_1672_3_106()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_229()) jj_scanpos = xsp;
+ if (jj_3R_test_att_name_1672_5_229()) jj_scanpos = xsp;
if (jj_scan_token(APOSTROPHE_T)) return true;
- if (jj_3R_230()) return true;
+ if (jj_3R_attribute_designator_514_3_230()) return true;
xsp = jj_scanpos;
- if (jj_3R_231()) jj_scanpos = xsp;
+ if (jj_3R_test_att_name_1674_4_231()) jj_scanpos = xsp;
return false;
}
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_72()) return true;
+ if (jj_3R_discrete_range_964_3_72()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
inline bool jj_3_54()
{
if (jj_done) return true;
- if (jj_3R_104()) return true;
+ if (jj_3R_name_ext_1650_3_104()) return true;
return false;
}
inline bool jj_3_57()
{
if (jj_done) return true;
- if (jj_3R_106()) return true;
+ if (jj_3R_test_att_name_1672_3_106()) return true;
return false;
}
inline bool jj_3_52()
{
if (jj_done) return true;
- if (jj_3R_103()) return true;
+ if (jj_3R_name_ext1_1644_4_103()) return true;
return false;
}
inline bool jj_3_51()
{
if (jj_done) return true;
- if (jj_3R_103()) return true;
+ if (jj_3R_name_ext1_1644_4_103()) return true;
return false;
}
inline bool jj_3_53()
{
if (jj_done) return true;
- if (jj_3R_103()) return true;
+ if (jj_3R_name_ext1_1644_4_103()) return true;
return false;
}
{
if (jj_done) return true;
if (jj_scan_token(DOT_T)) return true;
- if (jj_3R_105()) return true;
+ if (jj_3R_suffix_2404_1_105()) return true;
return false;
}
- inline bool jj_3R_224()
+ inline bool jj_3R_name_ext_1663_3_224()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_expression_1168_1_61()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_370()) { jj_scanpos = xsp; break; }
+ if (jj_3R_name_ext_1664_47_370()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(RPAREN_T)) return true;
return false;
return false;
}
- inline bool jj_3R_219()
+ inline bool jj_3R_name_ext1_1644_18_219()
{
if (jj_done) return true;
- if (jj_3R_104()) return true;
+ if (jj_3R_name_ext_1650_3_104()) return true;
return false;
}
- inline bool jj_3R_223()
+ inline bool jj_3R_name_ext_1660_2_223()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_72()) return true;
+ if (jj_3R_discrete_range_964_3_72()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_222()
+ inline bool jj_3R_name_ext_1657_3_222()
{
if (jj_done) return true;
- if (jj_3R_106()) return true;
+ if (jj_3R_test_att_name_1672_3_106()) return true;
return false;
}
- inline bool jj_3R_322()
+ inline bool jj_3R_name_1634_25_322()
{
if (jj_done) return true;
- if (jj_3R_103()) return true;
+ if (jj_3R_name_ext1_1644_4_103()) return true;
return false;
}
- inline bool jj_3R_324()
+ inline bool jj_3R_name_1635_24_324()
{
if (jj_done) return true;
- if (jj_3R_103()) return true;
+ if (jj_3R_name_ext1_1644_4_103()) return true;
return false;
}
- inline bool jj_3R_325()
+ inline bool jj_3R_name_1636_22_325()
{
if (jj_done) return true;
- if (jj_3R_103()) return true;
+ if (jj_3R_name_ext1_1644_4_103()) return true;
return false;
}
- inline bool jj_3R_221()
+ inline bool jj_3R_name_ext_1654_2_221()
{
if (jj_done) return true;
if (jj_scan_token(DOT_T)) return true;
- if (jj_3R_105()) return true;
+ if (jj_3R_suffix_2404_1_105()) return true;
return false;
}
- inline bool jj_3R_220()
+ inline bool jj_3R_name_ext_1651_2_220()
{
if (jj_done) return true;
if (jj_scan_token(APOSTROPHE_T)) return true;
return false;
}
- inline bool jj_3R_104()
+ inline bool jj_3R_name_ext_1650_3_104()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_220()) return false;
+ if (jj_3R_name_ext_1651_2_220()) {
jj_scanpos = xsp;
- if (!jj_3R_221()) return false;
+ if (jj_3R_name_ext_1654_2_221()) {
jj_scanpos = xsp;
- if (!jj_3R_222()) return false;
+ if (jj_3R_name_ext_1657_3_222()) {
jj_scanpos = xsp;
- if (!jj_3R_223()) return false;
+ if (jj_3R_name_ext_1660_2_223()) {
jj_scanpos = xsp;
- if (jj_3R_224()) return true;
+ if (jj_3R_name_ext_1663_3_224()) return true;
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_103()
+ inline bool jj_3R_name_ext1_1644_4_103()
{
if (jj_done) return true;
- if (jj_3R_104()) return true;
+ if (jj_3R_name_ext_1650_3_104()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_219()) { jj_scanpos = xsp; break; }
+ if (jj_3R_name_ext1_1644_18_219()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_158()
+ inline bool jj_3R_name_1636_6_158()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_325()) jj_scanpos = xsp;
+ if (jj_3R_name_1636_22_325()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_157()
+ inline bool jj_3R_name_1635_5_157()
{
if (jj_done) return true;
- if (jj_3R_323()) return true;
+ if (jj_3R_external_name_2744_2_323()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_324()) jj_scanpos = xsp;
+ if (jj_3R_name_1635_24_324()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_156()
+ inline bool jj_3R_name_1634_4_156()
{
if (jj_done) return true;
- if (jj_3R_321()) return true;
+ if (jj_3R_operator_symbol_1721_1_321()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_322()) jj_scanpos = xsp;
+ if (jj_3R_name_1634_25_322()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_63()
+ inline bool jj_3R_name_1633_2_63()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_156()) return false;
+ if (jj_3R_name_1634_4_156()) {
jj_scanpos = xsp;
- if (!jj_3R_157()) return false;
+ if (jj_3R_name_1635_5_157()) {
jj_scanpos = xsp;
- if (jj_3R_158()) return true;
+ if (jj_3R_name_1636_6_158()) return true;
+ }
+ }
return false;
}
- inline bool jj_3R_290()
+ inline bool jj_3R_multiplying_operation_1627_3_290()
{
if (jj_done) return true;
if (jj_scan_token(REM_T)) return true;
return false;
}
- inline bool jj_3R_289()
+ inline bool jj_3R_multiplying_operation_1626_3_289()
{
if (jj_done) return true;
if (jj_scan_token(MOD_T)) return true;
return false;
}
- inline bool jj_3R_288()
+ inline bool jj_3R_multiplying_operation_1625_3_288()
{
if (jj_done) return true;
if (jj_scan_token(SLASH_T)) return true;
return false;
}
- inline bool jj_3R_140()
+ inline bool jj_3R_multiplying_operation_1624_1_140()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_287()) return false;
+ if (jj_3R_multiplying_operation_1624_1_287()) {
jj_scanpos = xsp;
- if (!jj_3R_288()) return false;
+ if (jj_3R_multiplying_operation_1625_3_288()) {
jj_scanpos = xsp;
- if (!jj_3R_289()) return false;
+ if (jj_3R_multiplying_operation_1626_3_289()) {
jj_scanpos = xsp;
- if (jj_3R_290()) return true;
+ if (jj_3R_multiplying_operation_1627_3_290()) return true;
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_287()
+ inline bool jj_3R_multiplying_operation_1624_1_287()
{
if (jj_done) return true;
if (jj_scan_token(MULT_T)) return true;
return false;
}
- inline bool jj_3R_635()
+ inline bool jj_3R_loop_statement_1594_28_635()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
- inline bool jj_3R_449()
+ inline bool jj_3R_mode_1619_3_449()
{
if (jj_done) return true;
if (jj_scan_token(LINKAGE_T)) return true;
return false;
}
- inline bool jj_3R_448()
+ inline bool jj_3R_mode_1618_3_448()
{
if (jj_done) return true;
if (jj_scan_token(BUFFER_T)) return true;
return false;
}
- inline bool jj_3R_447()
+ inline bool jj_3R_mode_1617_3_447()
{
if (jj_done) return true;
if (jj_scan_token(INOUT_T)) return true;
return false;
}
- inline bool jj_3R_446()
+ inline bool jj_3R_mode_1616_3_446()
{
if (jj_done) return true;
if (jj_scan_token(OUT_T)) return true;
return false;
}
- inline bool jj_3R_363()
+ inline bool jj_3R_mode_1615_1_363()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_445()) return false;
+ if (jj_3R_mode_1615_1_445()) {
jj_scanpos = xsp;
- if (!jj_3R_446()) return false;
+ if (jj_3R_mode_1616_3_446()) {
jj_scanpos = xsp;
- if (!jj_3R_447()) return false;
+ if (jj_3R_mode_1617_3_447()) {
jj_scanpos = xsp;
- if (!jj_3R_448()) return false;
+ if (jj_3R_mode_1618_3_448()) {
jj_scanpos = xsp;
- if (jj_3R_449()) return true;
+ if (jj_3R_mode_1619_3_449()) return true;
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_445()
+ inline bool jj_3R_mode_1615_1_445()
{
if (jj_done) return true;
if (jj_scan_token(IN_T)) return true;
return false;
}
- inline bool jj_3R_267()
+ inline bool jj_3R_loop_statement_1587_7_267()
{
if (jj_done) return true;
- if (jj_3R_383()) return true;
+ if (jj_3R_iteration_scheme_1519_1_383()) return true;
return false;
}
- inline bool jj_3R_266()
+ inline bool jj_3R_loop_statement_1586_3_266()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_127()
+ inline bool jj_3R_loop_statement_1586_1_127()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_266()) jj_scanpos = xsp;
+ if (jj_3R_loop_statement_1586_3_266()) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_267()) jj_scanpos = xsp;
+ if (jj_3R_loop_statement_1587_7_267()) jj_scanpos = xsp;
if (jj_scan_token(LOOP_T)) return true;
- if (jj_3R_268()) return true;
+ if (jj_3R_sequence_of_statement_2128_2_268()) return true;
if (jj_scan_token(END_T)) return true;
if (jj_scan_token(LOOP_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_635()) jj_scanpos = xsp;
+ if (jj_3R_loop_statement_1594_28_635()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
inline bool jj_3_50()
{
if (jj_done) return true;
- if (jj_3R_102()) return true;
+ if (jj_3R_enumeration_literal_1142_2_102()) return true;
return false;
}
inline bool jj_3_49()
{
if (jj_done) return true;
- if (jj_3R_101()) return true;
+ if (jj_3R_numeric_literal_1704_2_101()) return true;
return false;
}
- inline bool jj_3R_243()
+ inline bool jj_3R_literal_1576_3_243()
{
if (jj_done) return true;
if (jj_scan_token(NULL_T)) return true;
inline bool jj_3_48()
{
if (jj_done) return true;
- if (jj_3R_100()) return true;
+ if (jj_3R_bit_string_literal_574_3_100()) return true;
return false;
}
- inline bool jj_3R_242()
+ inline bool jj_3R_literal_1575_3_242()
{
if (jj_done) return true;
- if (jj_3R_373()) return true;
+ if (jj_3R_string_literal_2265_1_373()) return true;
return false;
}
- inline bool jj_3R_241()
+ inline bool jj_3R_literal_1573_1_241()
{
if (jj_done) return true;
- if (jj_3R_102()) return true;
+ if (jj_3R_enumeration_literal_1142_2_102()) return true;
return false;
}
- inline bool jj_3R_240()
+ inline bool jj_3R_literal_1569_2_240()
{
if (jj_done) return true;
- if (jj_3R_101()) return true;
+ if (jj_3R_numeric_literal_1704_2_101()) return true;
return false;
}
- inline bool jj_3R_112()
+ inline bool jj_3R_literal_1566_2_112()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (!jj_3R_239()) return false;
+ if (jj_3R_literal_1566_2_239()) {
jj_scanpos = xsp;
- if (!jj_3R_240()) return false;
+ if (jj_3R_literal_1569_2_240()) {
jj_scanpos = xsp;
- if (!jj_3R_241()) return false;
+ if (jj_3R_literal_1573_1_241()) {
jj_scanpos = xsp;
- if (!jj_3R_242()) return false;
+ if (jj_3R_literal_1575_3_242()) {
jj_scanpos = xsp;
- if (jj_3R_243()) return true;
+ if (jj_3R_literal_1576_3_243()) return true;
+ }
+ }
+ }
+ }
return false;
}
- inline bool jj_3R_239()
+ inline bool jj_3R_literal_1566_2_239()
{
if (jj_done) return true;
- if (jj_3R_100()) return true;
+ if (jj_3R_bit_string_literal_574_3_100()) return true;
return false;
}
inline bool jj_3_47()
{
if (jj_done) return true;
- if (jj_3R_99()) return true;
+ if (jj_3R_primary_unit_1897_1_99()) return true;
return false;
}
- inline bool jj_3R_346()
+ inline bool jj_3R_library_clause_1542_2_346()
{
if (jj_done) return true;
if (jj_scan_token(LIBRARY_T)) return true;
- if (jj_3R_205()) return true;
+ if (jj_3R_identifier_list_1354_4_205()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_145()
+ inline bool jj_3R_label_1537_2_145()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_identifier_1348_3_74()) return true;
return false;
}
endLine = input_stream->getEndLine();
endColumn = input_stream->getEndColumn();
}
- t = Token::newToken(jjmatchedKind);
- t->kind = jjmatchedKind;
- t->image = curTokenImage;
+ t = Token::newToken(jjmatchedKind, curTokenImage);
t->specialToken = nullptr;
t->next = nullptr;
Token * jjFillToken();
public:
- int curLexState;
- int jjnewStateCnt;
- int jjround;
- int jjmatchedPos;
- int jjmatchedKind;
+ int curLexState = 0;
+ int jjnewStateCnt = 0;
+ int jjround = 0;
+ int jjmatchedPos = 0;
+ int jjmatchedKind = 0;
Token * getNextToken();
void SkipLexicalActions(Token *matchedToken);
OUTPUT_LANGUAGE = "c++";
NAMESPACE = "vhdl::parser";
STATIC=false;
- PARSER_INCLUDES="vhdljjparser.h";
- TOKEN_MANAGER_INCLUDES="vhdlstring.h";
+ PARSER_INCLUDE="vhdljjparser.h";
+ TOKEN_MANAGER_INCLUDE="vhdlstring.h";
// TOKEN_MANAGER_USES_PARSER = true;
TOKEN_MANAGER_SUPER_CLASS = "TokenParser";
// DEBUG_PARSER = true;