From c7c3b9654cea49bc54505e98fe210bfbc730479b Mon Sep 17 00:00:00 2001 From: Jarod42 Date: Wed, 6 Mar 2024 17:51:02 +0100 Subject: [PATCH] Add spiritless_po as submodules. --- .github/workflows/macos.yml | 4 + .github/workflows/premake5-windows.yml | 4 + .github/workflows/release-windows.yml | 2 + .github/workflows/ubuntu.yml | 4 + .gitmodules | 3 + CMakeLists.txt | 2 +- premake5.lua | 6 +- src/3rd/spiritless_po/.clang-format | 149 - src/3rd/spiritless_po/CC0-1.0.legalcode.txt | 121 - src/3rd/spiritless_po/LICENSE | 23 - src/3rd/spiritless_po/README.md | 90 - src/3rd/spiritless_po/copyright | 139 - src/3rd/spiritless_po/include/spiritless_po.h | 17 - .../include/spiritless_po/Catalog.h | 378 --- .../include/spiritless_po/Common.h | 21 - .../include/spiritless_po/MetadataParser.h | 71 - .../include/spiritless_po/PluralParser.h | 1103 ------- .../include/spiritless_po/PoParser.h | 606 ---- .../include/spiritless_po/spiritless_po.h | 14 - src/3rd/spiritless_po/sample/dump.cpp | 74 - src/3rd/spiritless_po/sample/load.cpp | 49 - src/3rd/spiritless_po/spiritless_po.doxygen | 2736 ----------------- src/3rd/spiritless_po/test/CMakeLists.txt | 23 - src/3rd/spiritless_po/test/Catalog.cpp | 422 --- src/3rd/spiritless_po/test/MetadataParser.cpp | 98 - src/3rd/spiritless_po/test/PluralParser.cpp | 520 ---- src/3rd/spiritless_po/test/PoParser.cpp | 411 --- src/3rd/spiritless_po/test/main.cpp | 9 - src/3rd/spiritless_po/test/meson.build | 47 - submodules/.clang-format | 1 + submodules/spiritless_po | 1 + 31 files changed, 23 insertions(+), 7125 deletions(-) create mode 100644 .gitmodules delete mode 100644 src/3rd/spiritless_po/.clang-format delete mode 100644 src/3rd/spiritless_po/CC0-1.0.legalcode.txt delete mode 100644 src/3rd/spiritless_po/LICENSE delete mode 100644 src/3rd/spiritless_po/README.md delete mode 100644 src/3rd/spiritless_po/copyright delete mode 100644 src/3rd/spiritless_po/include/spiritless_po.h delete mode 100644 src/3rd/spiritless_po/include/spiritless_po/Catalog.h delete mode 100644 src/3rd/spiritless_po/include/spiritless_po/Common.h delete mode 100644 src/3rd/spiritless_po/include/spiritless_po/MetadataParser.h delete mode 100644 src/3rd/spiritless_po/include/spiritless_po/PluralParser.h delete mode 100644 src/3rd/spiritless_po/include/spiritless_po/PoParser.h delete mode 100644 src/3rd/spiritless_po/include/spiritless_po/spiritless_po.h delete mode 100644 src/3rd/spiritless_po/sample/dump.cpp delete mode 100644 src/3rd/spiritless_po/sample/load.cpp delete mode 100644 src/3rd/spiritless_po/spiritless_po.doxygen delete mode 100644 src/3rd/spiritless_po/test/CMakeLists.txt delete mode 100644 src/3rd/spiritless_po/test/Catalog.cpp delete mode 100644 src/3rd/spiritless_po/test/MetadataParser.cpp delete mode 100644 src/3rd/spiritless_po/test/PluralParser.cpp delete mode 100644 src/3rd/spiritless_po/test/PoParser.cpp delete mode 100644 src/3rd/spiritless_po/test/main.cpp delete mode 100644 src/3rd/spiritless_po/test/meson.build create mode 100644 submodules/.clang-format create mode 160000 submodules/spiritless_po diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 0cebdc957..644e11fa7 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -6,6 +6,7 @@ on: paths: - 'resinstaller/src/**' - 'src/**' + - 'submodules/**' - 'test/**' - '.github/workflows/macos.yml' - 'CMakeLists.txt' @@ -15,6 +16,7 @@ on: paths: - 'resinstaller/src/**' - 'src/**' + - 'submodules/**' - 'test/**' - '.github/workflows/macos.yml' - 'CMakeLists.txt' @@ -27,6 +29,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + submodules: recursive - name: install dependencies run: brew install sdl2 sdl2_mixer sdl2_net libogg libvorbis diff --git a/.github/workflows/premake5-windows.yml b/.github/workflows/premake5-windows.yml index be3d1a17e..febf54d6e 100644 --- a/.github/workflows/premake5-windows.yml +++ b/.github/workflows/premake5-windows.yml @@ -6,6 +6,7 @@ on: paths: - 'resinstaller/**' - 'src/**' + - 'submodules/**' - 'test/**' - '.github/workflows/premake5-windows.yml' - 'premake5.lua' @@ -14,6 +15,7 @@ on: paths: - 'resinstaller/**' - 'src/**' + - 'submodules/**' - 'test/**' - '.github/workflows/premake5-windows.yml' - 'premake5.lua' @@ -25,6 +27,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + submodules: recursive - name: checkout premake5 uses: actions/checkout@v4 diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml index 1dd64872d..6446dc90d 100644 --- a/.github/workflows/release-windows.yml +++ b/.github/workflows/release-windows.yml @@ -13,6 +13,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + submodules: recursive - name: checkout premake5 uses: actions/checkout@v4 diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index cdcc0c935..1d405a5dd 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -6,6 +6,7 @@ on: paths: - 'resinstaller/src/**' - 'src/**' + - 'submodules/**' - 'test/**' - '.github/workflows/ubuntu.yml' - 'CMakeLists.txt' @@ -15,6 +16,7 @@ on: paths: - 'resinstaller/src/**' - 'src/**' + - 'submodules/**' - 'test/**' - '.github/workflows/ubuntu.yml' - 'CMakeLists.txt' @@ -27,6 +29,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + submodules: recursive - name: apt-get update run: sudo apt-get update diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..d85a7252a --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "submodules/spiritless_po"] + path = submodules/spiritless_po + url = https://github.com/oo13/spiritless_po.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e1a67ab7..0e0cae074 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,7 +123,7 @@ add_executable(maxr_dedicatedserver ${maxr_dedicatedserver_SRCS} ${RESOURCE_FILE add_executable(maxr ${maxr_SRCS} ${RESOURCE_FILE}) add_executable(maxr_tests ${maxr_tests_SRCS}) -target_include_directories(maxr_lib SYSTEM PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src/3rd/spiritless_po/include") +target_include_directories(maxr_lib SYSTEM PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/submodules/spiritless_po/include") target_link_libraries(resinstaller SDL_flic) target_link_libraries(maxr maxr_lib SDL_flic mve_player) diff --git a/premake5.lua b/premake5.lua index d07987c68..7d8629d3d 100644 --- a/premake5.lua +++ b/premake5.lua @@ -206,7 +206,7 @@ project "maxr_lib" files { "src/lib/**.cpp", "src/lib/**.h", "src/**.in", "src/.clang-format", "CMakeList.txt" } includedirs { "src", "src/lib" } - externalincludedirs { "src/3rd/spiritless_po/include" } + externalincludedirs { "submodules/spiritless_po/include" } if _OPTIONS["crashRpt_root"] ~= nil then externalincludedirs { path.join(_OPTIONS["crashRpt_root"], "include") } @@ -254,8 +254,8 @@ project "nlohmann" -- header only project "spiritless_po" -- header only kind "None" - files { "src/3rd/spiritless_po/**.*" } - vpaths { ["spiritless_po/*"] = "src/3rd/spiritless_po" } + files { "submodules/spiritless_po/**.*" } + vpaths { ["spiritless_po/*"] = "submodules/spiritless_po" } group "" project "data" -- data diff --git a/src/3rd/spiritless_po/.clang-format b/src/3rd/spiritless_po/.clang-format deleted file mode 100644 index d61a6686f..000000000 --- a/src/3rd/spiritless_po/.clang-format +++ /dev/null @@ -1,149 +0,0 @@ ---- -Language: Cpp -# BasedOnStyle: WebKit -AccessModifierOffset: -4 -AlignAfterOpenBracket: DontAlign -AlignConsecutiveMacros: false -AlignConsecutiveAssignments: false -AlignConsecutiveBitFields: false -AlignConsecutiveDeclarations: false -AlignEscapedNewlines: DontAlign -AlignOperands: DontAlign -AlignTrailingComments: false -AllowAllArgumentsOnNextLine: true -AllowAllConstructorInitializersOnNextLine: true -AllowAllParametersOfDeclarationOnNextLine: true -AllowShortEnumsOnASingleLine: true -AllowShortBlocksOnASingleLine: Never -AllowShortCaseLabelsOnASingleLine: false -AllowShortFunctionsOnASingleLine: InlineOnly -AllowShortLambdasOnASingleLine: All -AllowShortIfStatementsOnASingleLine: Never -AllowShortLoopsOnASingleLine: false -AlwaysBreakAfterDefinitionReturnType: None -AlwaysBreakAfterReturnType: None -AlwaysBreakBeforeMultilineStrings: false -AlwaysBreakTemplateDeclarations: MultiLine -BinPackArguments: true -BinPackParameters: true -BraceWrapping: - AfterCaseLabel: false - AfterClass: false - AfterControlStatement: Never - AfterEnum: false - AfterFunction: true - AfterNamespace: false - AfterObjCDeclaration: false - AfterStruct: false - AfterUnion: false - AfterExternBlock: false - BeforeCatch: false - BeforeElse: false - BeforeLambdaBody: false - BeforeWhile: false - IndentBraces: false - SplitEmptyFunction: false - SplitEmptyRecord: false - SplitEmptyNamespace: false -BreakBeforeBinaryOperators: All -BreakBeforeBraces: Custom -BreakBeforeInheritanceComma: false -BreakInheritanceList: BeforeColon -BreakBeforeTernaryOperators: true -BreakConstructorInitializersBeforeComma: false -BreakConstructorInitializers: BeforeColon -BreakAfterJavaFieldAnnotations: false -BreakStringLiterals: true -ColumnLimit: 0 -CommentPragmas: '^ IWYU pragma:' -CompactNamespaces: false -ConstructorInitializerAllOnOneLineOrOnePerLine: false -ConstructorInitializerIndentWidth: 4 -ContinuationIndentWidth: 4 -Cpp11BracedListStyle: true -DeriveLineEnding: true -DerivePointerAlignment: false -DisableFormat: false -ExperimentalAutoDetectBinPacking: false -FixNamespaceComments: false -ForEachMacros: - - foreach - - Q_FOREACH - - BOOST_FOREACH -IncludeBlocks: Preserve -IncludeCategories: - - Regex: '^"(llvm|llvm-c|clang|clang-c)/' - Priority: 2 - SortPriority: 0 - - Regex: '^(<|"(gtest|gmock|isl|json)/)' - Priority: 3 - SortPriority: 0 - - Regex: '.*' - Priority: 1 - SortPriority: 0 -IncludeIsMainRegex: '(Test)?$' -IncludeIsMainSourceRegex: '' -IndentCaseLabels: false -IndentCaseBlocks: false -IndentGotoLabels: true -IndentPPDirectives: None -IndentExternBlock: AfterExternBlock -IndentWidth: 4 -IndentWrappedFunctionNames: false -InsertTrailingCommas: None -JavaScriptQuotes: Leave -JavaScriptWrapImports: true -KeepEmptyLinesAtTheStartOfBlocks: true -MacroBlockBegin: '' -MacroBlockEnd: '' -MaxEmptyLinesToKeep: 1 -NamespaceIndentation: All -ObjCBinPackProtocolList: Auto -ObjCBlockIndentWidth: 4 -ObjCBreakBeforeNestedBlockParam: true -ObjCSpaceAfterProperty: true -ObjCSpaceBeforeProtocolList: true -PenaltyBreakAssignment: 2 -PenaltyBreakBeforeFirstCallParameter: 19 -PenaltyBreakComment: 300 -PenaltyBreakFirstLessLess: 120 -PenaltyBreakString: 1000 -PenaltyBreakTemplateDeclaration: 10 -PenaltyExcessCharacter: 1000000 -PenaltyReturnTypeOnItsOwnLine: 60 -PointerAlignment: Right -ReflowComments: false -SortIncludes: true -SortUsingDeclarations: true -SpaceAfterCStyleCast: false -SpaceAfterLogicalNot: false -SpaceAfterTemplateKeyword: true -SpaceBeforeAssignmentOperators: true -SpaceBeforeCpp11BracedList: true -SpaceBeforeCtorInitializerColon: true -SpaceBeforeInheritanceColon: true -SpaceBeforeParens: ControlStatements -SpaceBeforeRangeBasedForLoopColon: true -SpaceInEmptyBlock: false -SpaceInEmptyParentheses: false -SpacesBeforeTrailingComments: 1 -SpacesInAngles: false -SpacesInConditionalStatement: false -SpacesInContainerLiterals: true -SpacesInCStyleCastParentheses: false -SpacesInParentheses: false -SpacesInSquareBrackets: false -SpaceBeforeSquareBrackets: false -Standard: Latest -StatementMacros: - - Q_UNUSED - - QT_REQUIRE_VERSION -TabWidth: 8 -UseCRLF: false -UseTab: Never -WhitespaceSensitiveMacros: - - STRINGIZE - - PP_STRINGIZE - - BOOST_PP_STRINGIZE -... - diff --git a/src/3rd/spiritless_po/CC0-1.0.legalcode.txt b/src/3rd/spiritless_po/CC0-1.0.legalcode.txt deleted file mode 100644 index 0e259d42c..000000000 --- a/src/3rd/spiritless_po/CC0-1.0.legalcode.txt +++ /dev/null @@ -1,121 +0,0 @@ -Creative Commons Legal Code - -CC0 1.0 Universal - - CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE - LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN - ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS - INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES - REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS - PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM - THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED - HEREUNDER. - -Statement of Purpose - -The laws of most jurisdictions throughout the world automatically confer -exclusive Copyright and Related Rights (defined below) upon the creator -and subsequent owner(s) (each and all, an "owner") of an original work of -authorship and/or a database (each, a "Work"). - -Certain owners wish to permanently relinquish those rights to a Work for -the purpose of contributing to a commons of creative, cultural and -scientific works ("Commons") that the public can reliably and without fear -of later claims of infringement build upon, modify, incorporate in other -works, reuse and redistribute as freely as possible in any form whatsoever -and for any purposes, including without limitation commercial purposes. -These owners may contribute to the Commons to promote the ideal of a free -culture and the further production of creative, cultural and scientific -works, or to gain reputation or greater distribution for their Work in -part through the use and efforts of others. - -For these and/or other purposes and motivations, and without any -expectation of additional consideration or compensation, the person -associating CC0 with a Work (the "Affirmer"), to the extent that he or she -is an owner of Copyright and Related Rights in the Work, voluntarily -elects to apply CC0 to the Work and publicly distribute the Work under its -terms, with knowledge of his or her Copyright and Related Rights in the -Work and the meaning and intended legal effect of CC0 on those rights. - -1. Copyright and Related Rights. A Work made available under CC0 may be -protected by copyright and related or neighboring rights ("Copyright and -Related Rights"). Copyright and Related Rights include, but are not -limited to, the following: - - i. the right to reproduce, adapt, distribute, perform, display, - communicate, and translate a Work; - ii. moral rights retained by the original author(s) and/or performer(s); -iii. publicity and privacy rights pertaining to a person's image or - likeness depicted in a Work; - iv. rights protecting against unfair competition in regards to a Work, - subject to the limitations in paragraph 4(a), below; - v. rights protecting the extraction, dissemination, use and reuse of data - in a Work; - vi. database rights (such as those arising under Directive 96/9/EC of the - European Parliament and of the Council of 11 March 1996 on the legal - protection of databases, and under any national implementation - thereof, including any amended or successor version of such - directive); and -vii. other similar, equivalent or corresponding rights throughout the - world based on applicable law or treaty, and any national - implementations thereof. - -2. Waiver. To the greatest extent permitted by, but not in contravention -of, applicable law, Affirmer hereby overtly, fully, permanently, -irrevocably and unconditionally waives, abandons, and surrenders all of -Affirmer's Copyright and Related Rights and associated claims and causes -of action, whether now known or unknown (including existing as well as -future claims and causes of action), in the Work (i) in all territories -worldwide, (ii) for the maximum duration provided by applicable law or -treaty (including future time extensions), (iii) in any current or future -medium and for any number of copies, and (iv) for any purpose whatsoever, -including without limitation commercial, advertising or promotional -purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each -member of the public at large and to the detriment of Affirmer's heirs and -successors, fully intending that such Waiver shall not be subject to -revocation, rescission, cancellation, termination, or any other legal or -equitable action to disrupt the quiet enjoyment of the Work by the public -as contemplated by Affirmer's express Statement of Purpose. - -3. Public License Fallback. Should any part of the Waiver for any reason -be judged legally invalid or ineffective under applicable law, then the -Waiver shall be preserved to the maximum extent permitted taking into -account Affirmer's express Statement of Purpose. In addition, to the -extent the Waiver is so judged Affirmer hereby grants to each affected -person a royalty-free, non transferable, non sublicensable, non exclusive, -irrevocable and unconditional license to exercise Affirmer's Copyright and -Related Rights in the Work (i) in all territories worldwide, (ii) for the -maximum duration provided by applicable law or treaty (including future -time extensions), (iii) in any current or future medium and for any number -of copies, and (iv) for any purpose whatsoever, including without -limitation commercial, advertising or promotional purposes (the -"License"). The License shall be deemed effective as of the date CC0 was -applied by Affirmer to the Work. Should any part of the License for any -reason be judged legally invalid or ineffective under applicable law, such -partial invalidity or ineffectiveness shall not invalidate the remainder -of the License, and in such case Affirmer hereby affirms that he or she -will not (i) exercise any of his or her remaining Copyright and Related -Rights in the Work or (ii) assert any associated claims and causes of -action with respect to the Work, in either case contrary to Affirmer's -express Statement of Purpose. - -4. Limitations and Disclaimers. - - a. No trademark or patent rights held by Affirmer are waived, abandoned, - surrendered, licensed or otherwise affected by this document. - b. Affirmer offers the Work as-is and makes no representations or - warranties of any kind concerning the Work, express, implied, - statutory or otherwise, including without limitation warranties of - title, merchantability, fitness for a particular purpose, non - infringement, or the absence of latent or other defects, accuracy, or - the present or absence of errors, whether or not discoverable, all to - the greatest extent permissible under applicable law. - c. Affirmer disclaims responsibility for clearing rights of other persons - that may apply to the Work or any use thereof, including without - limitation any person's Copyright and Related Rights in the Work. - Further, Affirmer disclaims responsibility for obtaining any necessary - consents, permissions or other rights required for any use of the - Work. - d. Affirmer understands and acknowledges that Creative Commons is not a - party to this document and has no duty or obligation with respect to - this CC0 or use of the Work. diff --git a/src/3rd/spiritless_po/LICENSE b/src/3rd/spiritless_po/LICENSE deleted file mode 100644 index 36b7cd93c..000000000 --- a/src/3rd/spiritless_po/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Boost Software License - Version 1.0 - August 17th, 2003 - -Permission is hereby granted, free of charge, to any person or organization -obtaining a copy of the software and accompanying documentation covered by -this license (the "Software") to use, reproduce, display, distribute, -execute, and transmit the Software, and to prepare derivative works of the -Software, and to permit third-parties to whom the Software is furnished to -do so, all subject to the following: - -The copyright notices in the Software and this entire statement, including -the above license grant, this restriction and the following disclaimer, -must be included in all copies of the Software, in whole or in part, and -all derivative works of the Software, unless such copies or derivative -works are solely in the form of machine-executable object code generated by -a source language processor. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT -SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/src/3rd/spiritless_po/README.md b/src/3rd/spiritless_po/README.md deleted file mode 100644 index e69b59c4a..000000000 --- a/src/3rd/spiritless_po/README.md +++ /dev/null @@ -1,90 +0,0 @@ -# spiritless_po ![badge](https://github.com/oo13/spiritless_po/workflows/ci-workflow/badge.svg) - -spiritless_po is a kind of gettext library in C++11 and inspired by [spirit-po](https://github.com/cbeck88/spirit-po), but I don't intend to be compatible with spirit-po. - -spirit-po depend on Boost library, but this library can be compiled by C++11. - -Spiritless_po has some features (as same as spirit-po): -- A catalog handles only one textdomain and only one language, doesn't handle multiple textdomains and multiple languages. -- The catalog can read the messages from multiple PO files, instead of a single MO file. You can add new messages to a single catalog any number of times. -- The catalog doesn't care the locale. -- The catalog doesn't handle the character encoding. - -If you would use multiple textdomains and/or multiple languages, you need to use multiple catalogs. - -You need only to use [Catalog](@ref spiritless_po::Catalog) class and not to use other classes directly. The "public" interfaces that Catalog doesn't publish by even indirect are considered as the internal interfaces in the spiritless_po module. - -Example: -```c++ -#include -#include - -#include "spiritless_po.h" - -using namespace std; - -int main(int argc, char *argv[]) -{ - if (argc <= 1) { - cerr << "This program needs one filename." << endl; - return 1; - } - - spiritless_po::Catalog catalog; - for (size_t i = 0; i < static_cast(argc) - 1; i++) { - ifstream f(argv[i + 1]); - catalog.ClearError(); - if (!catalog.Add(f)) { - for (const auto &s : catalog.GetError()) { - cerr << argv[i + 1] << ": " << s << endl; - } - } - } - - cout << "Apple" - << ": " << catalog.gettext("Apple") << endl; - for (size_t i = 0; i < 30; i++) { - cout << i << ": Bean" - << ": " << catalog.ngettext("Bean", "Beans", i) << endl; - } - - auto index = catalog.GetIndex(); - cout << "Number of msgid: " << index.size() << endl; - return 0; -} -``` - -# To Generate the Documents -Use doxygen. I tested the generation in doxygen 1.9.4. - -``` -% cd spiritless_po -% doxygen spiritless_po.doxygen -# Open spiritless_po/html/index.html with your HTML browser. -``` - -# Unit Test -This library includes some unit test codes. If you want to run it, the following programs are needed: - -- Catch2 (Tested in version 2.13.10) -- cmake (Tested in Version 3.24.3) or meson (Tested in Version 1.0.1) - -cmake: -``` -% cd spiritless_po/test -% cmake -DCMAKE_BUILD_TYPE=Release -B build . -% cd build -% make -% ./test_spiritless_po -% ./test_spiritless_po '[!benchmark]' ; # For benchmark -``` - -meson: -``` -% cd spiritless_po/test -% meson setup build -% cd build -% meson compile -% meson test ; # or ninja test -% meson test --benchmark ; # or ninja benchmark -``` diff --git a/src/3rd/spiritless_po/copyright b/src/3rd/spiritless_po/copyright deleted file mode 100644 index 418fa6b9a..000000000 --- a/src/3rd/spiritless_po/copyright +++ /dev/null @@ -1,139 +0,0 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: spiritless_po -Upstream-Contact: ooyooxei+gh@gmail.com -Source: https://github.com/oo13/spiritless_po - -Files: * -Copyright: © 2019, 2022 OOTA, Masato -License: Boost -Comment: Inspired by spirit_po (https://github.com/cbeck88/spirit-po), but nothing derived from it. -Comment: The plural expression table in PluralParse.h is derived from lib/plurals.js in "https://github.com/alexanderwallin/node-gettext". It's published by a sort of MIT License but we have no need to show the copyright notice and the permission notice because the second sentence is removed. - -Files: test/*.cpp -Copyright: © 2022 OOTA, Masato - © 2013 Translate. -License: CC-BY-SA-3.0 -Comment: A data table is derived from https://docs.translatehouse.org/projects/localization-guide/en/latest/l10n/pluralforms.html?id=l10n/pluralforms - -Files: sample/load.cpp -Copyright: © 2019 OOTA, Masato -License: CC0-1.0 - -Files: spiritless_po.doxygen test/CMakeLists.txt test/main.cpp sample/dump.cpp -Copyright: © 2022 OOTA, Masato -License: CC0-1.0 - -Files: test/meson.build -Copyright: © 2023 OOTA, Masato -License: CC0-1.0 - - -License: Boost - Boost Software License - Version 1.0 - August 17th, 2003 - . - Permission is hereby granted, free of charge, to any person or organization - obtaining a copy of the software and accompanying documentation covered by - this license (the "Software") to use, reproduce, display, distribute, - execute, and transmit the Software, and to prepare derivative works of the - Software, and to permit third-parties to whom the Software is furnished to - do so, all subject to the following: - . - The copyright notices in the Software and this entire statement, including - the above license grant, this restriction and the following disclaimer, - must be included in all copies of the Software, in whole or in part, and - all derivative works of the Software, unless such copies or derivative - works are solely in the form of machine-executable object code generated by - a source language processor. - . - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT - SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE - FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - -License: CC0-1.0 - To the extent possible under law, the author(s) have dedicated all copyright - and related and neighboring rights to this software to the public domain - worldwide. This software is distributed without any warranty. - . - You should have received a copy of the CC0 1.0 Universal along with - this software. If not, see . - -License: CC-BY-SA-3.0 - Creative Commons - Attribution-ShareAlike 3.0 Unported - . - CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. - . - License - . - THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. - . - BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. - . - 1. Definitions - . - a. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License. - b. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined below) for the purposes of this License. - c. "Creative Commons Compatible License" means a license that is listed at https://creativecommons.org/compatiblelicenses that has been approved by Creative Commons as being essentially equivalent to this License, including, at a minimum, because that license: (i) contains terms that have the same purpose, meaning and effect as the License Elements of this License; and, (ii) explicitly permits the relicensing of adaptations of works made available under that license under this License or a Creative Commons jurisdiction license with the same License Elements as this License. - d. "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership. - e. "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike. - f. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License. - g. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast. - h. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work. - i. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. - j. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images. - k. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium. - . - 2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws. - . - 3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: - . - a. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; - b. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified."; - c. to Distribute and Publicly Perform the Work including as incorporated in Collections; and, - d. to Distribute and Publicly Perform Adaptations. - . - e. For the avoidance of doubt: - i. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; - ii. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and, - iii. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License. - . - The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved. - . - 4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: - . - a. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(c), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(c), as requested. - b. You may Distribute or Publicly Perform an Adaptation only under the terms of: (i) this License; (ii) a later version of this License with the same License Elements as this License; (iii) a Creative Commons jurisdiction license (either this or a later license version) that contains the same License Elements as this License (e.g., Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible License. If you license the Adaptation under one of the licenses mentioned in (iv), you must comply with the terms of that license. If you license the Adaptation under the terms of any of the licenses mentioned in (i), (ii) or (iii) (the "Applicable License"), you must comply with the terms of the Applicable License generally and the following provisions: (I) You must include a copy of, or the URI for, the Applicable License with every copy of each Adaptation You Distribute or Publicly Perform; (II) You may not offer or impose any terms on the Adaptation that restrict the terms of the Applicable License or the ability of the recipient of the Adaptation to exercise the rights granted to that recipient under the terms of the Applicable License; (III) You must keep intact all notices that refer to the Applicable License and to the disclaimer of warranties with every copy of the Work as included in the Adaptation You Distribute or Publicly Perform; (IV) when You Distribute or Publicly Perform the Adaptation, You may not impose any effective technological measures on the Adaptation that restrict the ability of a recipient of the Adaptation from You to exercise the rights granted to that recipient under the terms of the Applicable License. This Section 4(b) applies to the Adaptation as incorporated in a Collection, but this does not require the Collection apart from the Adaptation itself to be made subject to the terms of the Applicable License. - c. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with Ssection 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4(c) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties. - d. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise. - . - 5. Representations, Warranties and Disclaimer - . - UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. - . - 6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - . - 7. Termination - . - a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. - b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. - . - 8. Miscellaneous - . - a. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. - b. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. - c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. - e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. - f. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law. - . - Creative Commons Notice - . - Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. - . - Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, Creative Commons does not authorize the use by either party of the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. For the avoidance of doubt, this trademark restriction does not form part of the License. - . - Creative Commons may be contacted at https://creativecommons.org/. diff --git a/src/3rd/spiritless_po/include/spiritless_po.h b/src/3rd/spiritless_po/include/spiritless_po.h deleted file mode 100644 index 478fedbc5..000000000 --- a/src/3rd/spiritless_po/include/spiritless_po.h +++ /dev/null @@ -1,17 +0,0 @@ -/** Spiritless_po include file. - \file spiritless_po.h - \author OOTA, Masato - \copyright Copyright © 2019, 2022 OOTA, Masato - \par License Boost - \parblock - This program is distributed under the Boost Software License Version 1.0. - You can get the license file at “https://www.boost.org/LICENSE_1_0.txt”. - \endparblock -*/ - -#ifndef SPIRITLESS_PO_H_ -#define SPIRITLESS_PO_H_ - -#include "spiritless_po/Catalog.h" - -#endif // SPIRITLESS_PO_H_ diff --git a/src/3rd/spiritless_po/include/spiritless_po/Catalog.h b/src/3rd/spiritless_po/include/spiritless_po/Catalog.h deleted file mode 100644 index 03976a14b..000000000 --- a/src/3rd/spiritless_po/include/spiritless_po/Catalog.h +++ /dev/null @@ -1,378 +0,0 @@ -/** class Catalog - \file Catalog.h - \author OOTA, Masato - \copyright Copyright © 2019, 2022 OOTA, Masato - \par License Boost - \parblock - This program is distributed under the Boost Software License Version 1.0. - You can get the license file at “https://www.boost.org/LICENSE_1_0.txt”. - \endparblock -*/ - -#ifndef SPIRITLESS_PO_CATALOG_H_ -#define SPIRITLESS_PO_CATALOG_H_ - -#include "Common.h" -#include "MetadataParser.h" -#include "PluralParser.h" -#include "PoParser.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace spiritless_po { - /** Class Catalog handles a catalog that contains some original and translated messages. - - You need only to use this class and not directly to use other classes under include/spiritless_po/. - - This class has some features: - - An instance of Catalog handles only one textdomain and only one language, doesn't handle multiple textdomains and multiple languages. - - Catalog can read the messages from multiple PO files, instead of a single MO file. You can add new messages to a single catalog any number of times. - - Catalog doesn't care the locale. - - Catalog doesn't handle the character encoding. - - If you would use multiple textdomains and/or multiple languages, you need to use multiple instances of this class. - */ - class Catalog { - public: - /** Create an empty catalog. */ - Catalog(); - - /** Create and Add(begin, end). - \tparam INP A type of an input iterator. - \param [in] begin An input iterator pointing to the beginning of the range. - \param [in] end An input iterator pointing to the end of the range. - */ - template - explicit Catalog(INP begin, INP end); - - /** Create and Add(is). - \param [in] is An input stream that contains PO entries. - */ - explicit Catalog(std::istream &is); - - /** This class is copyable. - \param [in] a The source. - */ - Catalog(const Catalog &a) = default; - - /** This class is movable. - \param [in] a The source. - */ - Catalog(Catalog &&a) = default; - - /** This class is destructible. */ - ~Catalog() = default; - - /** This class is assignable. - \param [in] a The source. - */ - Catalog &operator=(const Catalog &a) = default; - - /** This class is move assignable. - \param [in] a The source. - */ - Catalog &operator=(Catalog &&a) = default; - - /** Clear all information and create an empty catalog. */ - void Clear(); - - /** Add PO entries. - \tparam INP A type of an input iterator. - \param [in] begin An input iterator pointing to the beginning of the range. - \param [in] end An input iterator pointing to the end of the range. - \return true if no error is existed. - \note This function doesn't change any existed entries, that is a translated text (msgstr) that corresponds to an existed original text (msgid), and also metadata if it's already existed. - \note An entry isn't added if the msgstr (including msgstr[0]) is empty. - */ - template - bool Add(INP begin, INP end); - - /** Add some PO entries. - \param [in] is An input stream that contains PO entries. - \return true if no error is existed. - \note This function doesn't change any existed entries, that is a translated text (msgstr) that corresponds to an existed original text (msgid), and also metadata if it's already existed. - \note An entry isn't added if the msgstr (including msgstr[0]) is empty. - */ - bool Add(std::istream &is); - - /** Add another catalog contents. - \param [in] a A catalog to add the entries. - \note This function doesn't change any existed entries, that is a translated text (msgstr) that corresponds to an existed original text (msgid), and also metadata if it's already existed. - */ - void Merge(const Catalog &a); - - /** Clear the error information. */ - void ClearError(); - - /** Get the error information generated by Add() after ClearError() is called. - \return The strings that describe the errors. - \note The size of the result is 0 if no error is occurred. - */ - const std::vector &GetError() const; - - /** Get the translated text. - \param [in] msgid The original text. - \return The translated text if exists. If not, returns msgid. (It's a reference to the same object.) - */ - const std::string &gettext(const std::string &msgid) const; - - /** Get the translated text. - \param [in] msgid The original text. - \param [in] msgidPlural The plural form of the original text. - \param [in] n The value relating to the text. - \return The translated text if exists. If not, returns msgid (if n == 1) or msgidPlural (if n != 1). (It's a reference to the same object.) - */ - const std::string &ngettext(const std::string &msgid, const std::string &msgidPlural, - unsigned long int n) const; - - /** Get the translated text. - \param [in] msgctxt The context of the text. - \param [in] msgid The original text. - \return The translated text if exists. If not, returns msgid. (It's the reference to the same object.) - */ - const std::string &pgettext(const std::string &msgctxt, const std::string &msgid) const; - - /** Get the translated text. - \param [in] msgctxt The context of the text. - \param [in] msgid The original text. - \param [in] msgidPlural The plural form of the original text. - \param [in] n The value relating to the text. - \return The translated text if exists. If not, returns msgid (if n == 1) or msgidPlural (if n != 1). (It's a reference to the same object.) - */ - const std::string &npgettext(const std::string &msgctxt, const std::string &msgid, - const std::string &msgidPlural, unsigned long int n) const; - - - /** Type of the string index. - - - stringTable[indexData[msgctxt + msgid].stringTableIndex] == msgstr - - stringTable[indexData[msgctxt + msgid].stringTableIndex + n] == msgstr[n] - - The maximum n is totalPlurals - 1. - \attention This type is public to use for debugging and managing. - */ - struct IndexDataT { - std::size_t stringTableIndex; /**< The index of the StringTable. */ - std::size_t totalPlurals; /**< The number of the strings, including the plural forms, corresponding a msgid. */ - }; - - private: - MetadataParser::MapT metadata; - std::unordered_map index; - std::vector stringTable; - PluralParser::FunctionType pluralFunction; - std::size_t maxPlurals; - std::vector errors; - - public: - // Debugging and managing functions - - /** Get the metadata. - \return The map of the metadata. - \attention This function is public to use for debugging and managing. - */ - const MetadataParser::MapT &GetMetadata() const; - - /** Get the index map. - \return The map of the string index. - \attention This function is public to use for debugging and managing. - \note The size of the index map is the number of the translatable msgid. - */ - const std::unordered_map &GetIndex() const; - - /** Get the string table. - \return The string table. - \attention This function is public to use for debugging and managing. - */ - const std::vector &GetStringTable() const; - }; - - inline Catalog::Catalog() - : metadata(), index(), stringTable(), pluralFunction(), - maxPlurals(0), errors() - { - } - - template - inline Catalog::Catalog(const INP begin, const INP end) - : Catalog() - { - Add(begin, end); - } - - inline Catalog::Catalog(std::istream &is) - : Catalog() - { - Add(is); - } - - inline void Catalog::Clear() - { - *this = Catalog(); - } - - template - bool Catalog::Add(const INP begin, const INP end) - { - std::vector newEntries(PoParser::GetEntries(begin, end)); - for (auto &it : newEntries) { - if (!it.error.empty()) { - errors.push_back(std::move(it.error)); - } else if (!it.msgstr[0].empty()) { - if (!it.msgid.empty()) { - if (index.find(it.msgid) == index.end()) { - IndexDataT idx; - idx.stringTableIndex = stringTable.size(); - idx.totalPlurals = it.msgstr.size(); - stringTable.insert(stringTable.end(), std::make_move_iterator(it.msgstr.begin()), std::make_move_iterator(it.msgstr.end())); - index.emplace(it.msgid, idx); - } - } else if (metadata.empty()) { - metadata = MetadataParser::Parse(it.msgstr[0]); - const auto plural = metadata.find("Plural-Forms"); - if (plural != metadata.end()) { - const auto pluralText = plural->second; - try { - const auto pluralData = PluralParser::Parse(pluralText); - if (pluralData.first > 0) - maxPlurals = pluralData.first - 1; - pluralFunction = pluralData.second; - } catch (PluralParser::ExpressionError &e) { - const size_t col = std::distance(pluralText.cbegin(), e.Where()); - errors.emplace_back("Column#" + std::to_string(col + 1) - + " in plural expression: " + e.what()); - } - } - } - } - } - return errors.empty(); - } - - inline bool Catalog::Add(std::istream &is) - { - std::istreambuf_iterator begin(is); - std::istreambuf_iterator end; - return Add(begin, end); - } - - inline void Catalog::Merge(const Catalog &a) - { - if (metadata.empty()) { - metadata = a.metadata; - maxPlurals = a.maxPlurals; - pluralFunction = a.pluralFunction; - } - for (const auto &src : a.index) { - if (index.find(src.first) == index.end()) { - auto srcIndexData = src.second; - auto srcIndex = srcIndexData.stringTableIndex; - auto srcTotal = srcIndexData.totalPlurals; - auto srcStringIt = a.stringTable.begin() + srcIndex; - IndexDataT idx; - idx.stringTableIndex = stringTable.size(); - idx.totalPlurals = srcTotal; - stringTable.insert(stringTable.end(), srcStringIt, srcStringIt + srcTotal); - index.emplace(src.first, idx); - } - } - errors.insert(errors.end(), a.errors.begin(), a.errors.end()); - } - - inline void Catalog::ClearError() - { - errors.clear(); - } - - inline const std::vector &Catalog::GetError() const - { - return errors; - } - - inline const std::string &Catalog::gettext(const std::string &msgid) const - { - const auto &it = index.find(msgid); - if (it != index.end()) { - return stringTable[it->second.stringTableIndex]; - } else { - return msgid; - } - } - - inline const std::string &Catalog::ngettext(const std::string &msgid, const std::string &msgidPlural, - unsigned long int n) const - { - const auto &it = index.find(msgid); - if (it != index.end()) { - std::size_t nIdx = pluralFunction(n); - if (nIdx >= it->second.totalPlurals) { - nIdx = 0; - } - return stringTable[it->second.stringTableIndex + nIdx]; - } else { - if (n == 1) { - return msgid; - } else { - return msgidPlural; - } - } - } - - inline const std::string &Catalog::pgettext(const std::string &msgctxt, const std::string &msgid) const - { - std::string s(msgctxt); - s += CONTEXT_SEPARATOR; - s += msgid; - const auto &it = index.find(s); - if (it != index.end()) { - return stringTable[it->second.stringTableIndex]; - } else { - return msgid; - } - } - - inline const std::string &Catalog::npgettext(const std::string &msgctxt, const std::string &msgid, - const std::string &msgidPlural, unsigned long int n) const - { - std::string s(msgctxt); - s += CONTEXT_SEPARATOR; - s += msgid; - const auto &it = index.find(s); - if (it != index.end()) { - std::size_t nIdx = pluralFunction(n); - if (nIdx >= it->second.totalPlurals) - nIdx = 0; - return stringTable[it->second.stringTableIndex + nIdx]; - } else { - if (n == 1) { - return msgid; - } else { - return msgidPlural; - } - } - } - - inline const MetadataParser::MapT &Catalog::GetMetadata() const - { - return metadata; - } - - inline const std::unordered_map &Catalog::GetIndex() const - { - return index; - } - - inline const std::vector &Catalog::GetStringTable() const - { - return stringTable; - } -} // namespace spiritless_po - -#endif // SPIRITLESS_PO_CATALOG_H_ diff --git a/src/3rd/spiritless_po/include/spiritless_po/Common.h b/src/3rd/spiritless_po/include/spiritless_po/Common.h deleted file mode 100644 index 9e6fca5c3..000000000 --- a/src/3rd/spiritless_po/include/spiritless_po/Common.h +++ /dev/null @@ -1,21 +0,0 @@ -/** Common definitions and declarations. - \file Common.h - \author OOTA, Masato - \copyright Copyright © 2019, 2022 OOTA, Masato - \par License Boost - \parblock - This program is distributed under the Boost Software License Version 1.0. - You can get the license file at “https://www.boost.org/LICENSE_1_0.txt”. - \endparblock -*/ - -#ifndef SPIRITLESS_PO_COMMON_H_ -#define SPIRITLESS_PO_COMMON_H_ - -namespace spiritless_po { - /** The context separator that is compatible with GNU Gettext. */ - const char CONTEXT_SEPARATOR = '\x04'; - -} // namespace spiritless_po - -#endif // SPIRITLESS_PO_COMMON_H_ diff --git a/src/3rd/spiritless_po/include/spiritless_po/MetadataParser.h b/src/3rd/spiritless_po/include/spiritless_po/MetadataParser.h deleted file mode 100644 index 064a3f4e4..000000000 --- a/src/3rd/spiritless_po/include/spiritless_po/MetadataParser.h +++ /dev/null @@ -1,71 +0,0 @@ -/** Metadata parser. - \file MetadataParser.h - \author OOTA, Masato - \copyright Copyright © 2019, 2022 OOTA, Masato - \par License Boost - \parblock - This program is distributed under the Boost Software License Version 1.0. - You can get the license file at “https://www.boost.org/LICENSE_1_0.txt”. - \endparblock -*/ - -#ifndef SPIRITLESS_PO_METADATA_PARSER_H_ -#define SPIRITLESS_PO_METADATA_PARSER_H_ - -#include -#include - -namespace spiritless_po { - namespace MetadataParser { - /** The type of the metadata. - - map[key] == value - */ - typedef std::unordered_map MapT; - - /** Parse a metadata text. - \param [in] metadataString The source text of the metadata. - \return The map of the metadata. - - This function parses a metadata text and set the keys and the values to the map. - - The metadata text consists of the lines that have a key and a value, such as "key: value\n", more exactly it can be expressed the regex "^(.+): *(.+)\n?$" (key = $1, value = $2), of course, '\\n' is necessary except for the last line. It's compatible with po_header_field() in GNU libgettextpo. - - If some lines have the same keys, the first line is registered. - */ - inline MapT Parse(const std::string &metadataString) - { - MapT map; - enum { KEY, SPACE, VALUE } stat = KEY; - std::string key; - std::string value; - for (char c : metadataString) { - if (stat == KEY) { - if (c == ':') { - stat = SPACE; - } else { - key += c; - } - } else if ((stat == SPACE && c != ' ') || stat == VALUE) { - stat = VALUE; - if (c == '\n') { - stat = KEY; - if (!key.empty()) { - map.emplace(key, value); - key.clear(); - } - value.clear(); - } else { - value += c; - } - } - } - if (!key.empty()) { - map.emplace(key, value); - } - return map; - } - } // namespace MetadataParser -} // namespace spiritless_po - -#endif // SPIRITLESS_PO_METADATA_PARSER_H_ diff --git a/src/3rd/spiritless_po/include/spiritless_po/PluralParser.h b/src/3rd/spiritless_po/include/spiritless_po/PluralParser.h deleted file mode 100644 index 413fcb9ac..000000000 --- a/src/3rd/spiritless_po/include/spiritless_po/PluralParser.h +++ /dev/null @@ -1,1103 +0,0 @@ -/** Plural forms information parser. - \file PluralParser.h - \author OOTA, Masato - \copyright Copyright © 2019, 2022 OOTA, Masato - \par License Boost - \parblock - This program is distributed under the Boost Software License Version 1.0. - You can get the license file at “https://www.boost.org/LICENSE_1_0.txt”. - \endparblock -*/ - -#ifndef SPIRITLESS_PO_PLURAL_PARSER_H_ -#define SPIRITLESS_PO_PLURAL_PARSER_H_ - -#include -#include -#include -#include -#include -#include -#include -#include - -#if (defined(SPIRITLESS_PO_DEBUG_PLURAL_PARSER_PRINT_EXECUTE) || defined(SPIRITLESS_PO_DEBUG_PLURAL_PARSER_PRINT_COMPILE)) && !defined(SPIRITLESS_PO_DEBUG_PLURAL_PARSER_PRINT) -#define SPIRITLESS_PO_DEBUG_PLURAL_PARSER_PRINT -#endif -#ifdef SPIRITLESS_PO_DEBUG_PLURAL_PARSER_PRINT -#include -#endif - -namespace spiritless_po { -#ifdef SPIRITLESS_PO_DEBUG_PLURAL_PARSER_NAMESPACE -namespace SPIRITLESS_PO_DEBUG_PLURAL_PARSER_NAMESPACE { -#endif - - /** This class is a parser for the plural form information, including the expression. */ - class PluralParser { - public: - // The plural expression parser is an LL(1) parser. - // The type of the function to execute a plural expression. - class FunctionType; - /** The integer type for the plural forms. - \note The enough size of the immediate number in the plural expression is 32 bits regardless of the size of NumT. - */ - typedef unsigned long int NumT; - - /** Parse a plural form information. - \param [in] plural_form_info A plural form information. - \return The pair of the number of the plurals and the function to calculate the plural expression. - - This function parses a plural form information, such as "Plural-Forms: nplurals=2; plural=n != 1;". The result is the pair of 2 and the equivalent to [](NumT n) -> NumT { return n != 1; }. - */ - static std::pair Parse(const std::string &plural_form_info); - - - /** The iterator type for the plural form information. */ - typedef std::string::const_iterator InP; - /** The type of exception when raised by a parse error. */ - class ExpressionError : public std::runtime_error { - private: - // Only PluralParser can create an instance of the class. - friend class PluralParser; - explicit ExpressionError(const std::string &whatArg, InP it); - explicit ExpressionError(const char *whatArg, InP it); - - public: - /** Get the position where the error occurs. - \return The position where the error occurs. - \note what() returns the error message. - \note The return value is the iterator for the input parameter of PluralParser::Parse(). - */ - InP Where() const noexcept; - - private: - InP pos; - }; - - - private: - // Opcode for plural function - typedef unsigned char Opcode; - // Another function type (Internal use) - using CompiledPluralFunctionT = PluralParser::NumT (*)(PluralParser::NumT); - // This needs a friend because it shares some private types. - friend class PluralParser::FunctionType; - - public: - /** The type of the function to execute a plural expression. */ - class FunctionType { - private: - // Only PluralParser can create an instance of this class except for default constructor. - friend class PluralParser; - - public: - /** Create the function that returns 0. */ - FunctionType(); - - /** This class is copyable. - \param [in] a The source. - */ - FunctionType(const FunctionType &a) = default; - - /** This class is movable. - \param [in] a The source. - */ - FunctionType(FunctionType &&a) = default; - - /** This class is destructible. */ - ~FunctionType() = default; - - /** This class is assignable. - \param [in] a The source. - */ - FunctionType &operator=(const FunctionType &a) = default; - - /** This class is move assignable. - \param [in] a The source. - */ - FunctionType &operator=(FunctionType &&a) = default; - - // Users can execute the function. - /** Calculate the plural expression. - \param [in] n The value relating to the translating text. - \return The plural index. - */ - PluralParser::NumT operator()(PluralParser::NumT n) const; - - private: - // Users cannot create a function. - // program and max_data_size must be bug-free. - FunctionType(const std::vector &program, - size_t max_data_size); - explicit FunctionType(CompiledPluralFunctionT func); - - NumT Read32(size_t &i) const; - - private: - CompiledPluralFunctionT compiled_func; - std::vector code; - mutable std::vector data; - }; - - - private: - PluralParser(); - ~PluralParser() = default; - - static void SkipSpaces(InP &it, InP end); - static NumT GetNumber(InP &it, InP end); - static std::pair GetExpression(InP it, InP end, const std::string &keyword); - FunctionType CreatePluralFunction(); - static FunctionType ParseExpression(InP &it, InP end); - void PushOpcode(Opcode op, InP it); - size_t PushIForELSEandAddress(Opcode op, InP it); - void InsertAddress32(size_t adrs_index, size_t jump_length); - void AdjustJumpAddress(size_t if_adrs_index, size_t else_adrs_index, InP it); - void PushImmediateNumber(NumT n, InP it); - void ParseTerm7(InP &it, InP end); - void ParseTerm71(InP &it, InP end); - void ParseTerm6(InP &it, InP end); - void ParseTerm61(InP &it, InP end); - void ParseTerm5(InP &it, InP end); - void ParseTerm51(InP &it, InP end); - void ParseTerm4(InP &it, InP end); - void ParseTerm41(InP &it, InP end); - void ParseTerm3(InP &it, InP end); - void ParseTerm31(InP &it, InP end); - void ParseTerm2(InP &it, InP end); - void ParseTerm21(InP &it, InP end); - void ParseTerm1(InP &it, InP end); - void ParseTerm11(InP &it, InP end); - void ParseTerm0(InP &it, InP end); - void ParseValue(InP &it, InP end); - - // for debug - static void DebugPrintOpcode(Opcode op); - static void DebugPrintCode(const std::vector &cd); - void DebugPrintCode() const; - - - /* for interpreter */ - enum : Opcode { - NUM, - NUM32, - NOT, - MULT, - DIV, - MOD, - ADD, - SUB, - LE, - LT, - GT, - GE, - EQ, - NE, - AND, - OR, - IF, - IF32, - ELSE, - ELSE32, - VAR, - END, - }; - - - /* data members */ - std::vector code; - size_t top_of_data; - size_t max_data_size; - }; - - - - inline PluralParser::PluralParser() - : code(), top_of_data(0), max_data_size(0) - { - } - - - -#ifndef SPIRITLESS_PO_DEBUG_PLURAL_PARSER_PRINT - inline void PluralParser::DebugPrintOpcode(Opcode) - { - } - inline void PluralParser::DebugPrintCode(const std::vector &) - { - } - inline void PluralParser::DebugPrintCode() const - { - } -#else - inline void PluralParser::DebugPrintOpcode(Opcode op) - { - switch (op) { - case NUM: - std::cout << "NUM"; - break; - case NUM32: - std::cout << "NUM32"; - break; - case NOT: - std::cout << "NOT"; - break; - case MULT: - std::cout << "MULT"; - break; - case DIV: - std::cout << "DIV"; - break; - case MOD: - std::cout << "MOD"; - break; - case ADD: - std::cout << "ADD"; - break; - case SUB: - std::cout << "SUB"; - break; - case LE: - std::cout << "LE"; - break; - case LT: - std::cout << "LT"; - break; - case GT: - std::cout << "GT"; - break; - case GE: - std::cout << "GE"; - break; - case EQ: - std::cout << "EQ"; - break; - case NE: - std::cout << "NE"; - break; - case AND: - std::cout << "AND"; - break; - case OR: - std::cout << "OR"; - break; - case IF: - std::cout << "IF"; - break; - case IF32: - std::cout << "IF32"; - break; - case ELSE: - std::cout << "ELSE"; - break; - case ELSE32: - std::cout << "ELSE32"; - break; - case VAR: - std::cout << "VAR"; - break; - case END: - std::cout << "END"; - break; - default: - std::cout << static_cast(op); - } - } - inline void PluralParser::DebugPrintCode(const std::vector &cd) - { - size_t n = 0; - for (size_t i = 0; i < cd.size(); ++i) { - std::cout << i << ": "; - if (n == 0) { - DebugPrintOpcode(cd[i]); - switch (cd[i]) { - case NUM: - case IF: - case ELSE: - n = 1; - break; - case NUM32: - case IF32: - case ELSE32: - n = 4; - break; - } - } else { - std::cout << static_cast(cd[i]); - --n; - } - std::cout << std::endl; - } - } - inline void PluralParser::DebugPrintCode() const - { - DebugPrintCode(code); - } -#endif // SPIRITLESS_PO_DEBUG_PLURAL_PARSER_PRINT - - - - inline PluralParser::FunctionType::FunctionType() - : FunctionType([](NumT) -> NumT { return 0; }) - { - } - - inline PluralParser::FunctionType::FunctionType(const std::vector &program, - size_t max_data_size) - : compiled_func(nullptr), - code(program), - data(max_data_size) - { - // We can read an item at the current position + 4 without checking. - code.push_back(END); - code.push_back(END); - code.push_back(END); - code.push_back(END); - } - - inline PluralParser::FunctionType::FunctionType(CompiledPluralFunctionT func) - : compiled_func(func), code(0), data(0) - { - } - - inline PluralParser::NumT PluralParser::FunctionType::Read32(size_t &i) const - { - NumT n = code[i]; - n <<= 8; - n |= code[++i]; - n <<= 8; - n |= code[++i]; - n <<= 8; - n |= code[++i]; - return n; - } - - inline PluralParser::NumT PluralParser::FunctionType::operator()(const NumT n) const - { - if (compiled_func) { - return compiled_func(n); - } - -#ifdef SPIRITLESS_PO_DEBUG_PLURAL_PARSER_PRINT_EXECUTE - PluralParser::DebugPrintCode(code); -#endif - size_t top = static_cast(-1); - for (size_t i = 0; i < code.size() && code[i] != END; ++i) { -#ifdef SPIRITLESS_PO_DEBUG_PLURAL_PARSER_PRINT_EXECUTE - std::cout << i << ": "; - DebugPrintOpcode(code[i]); - std::cout << std::endl; -#endif - switch (code[i]) { - case NUM: - ++i; - ++top; - data.at(top) = code[i]; - break; - case NUM32: - ++top; - ++i; - data.at(top) = Read32(i); - break; - case NOT: - data[top] = !data.at(top); - break; - case MULT: - data.at(top - 1) *= data.at(top); - --top; - break; - case DIV: - data.at(top-1) /= data.at(top); - --top; - break; - case MOD: - data.at(top-1) %= data.at(top); - --top; - break; - case ADD: - data.at(top-1) += data.at(top); - --top; - break; - case SUB: - data.at(top-1) -= data.at(top); - --top; - break; - case LE: - data[top-1] = data.at(top-1) <= data.at(top); - --top; - break; - case LT: - data[top-1] = data.at(top-1) < data.at(top); - --top; - break; - case GT: - data[top-1] = data.at(top-1) > data.at(top); - --top; - break; - case GE: - data[top-1] = data.at(top-1) >= data.at(top); - --top; - break; - case EQ: - data[top-1] = data.at(top-1) == data.at(top); - --top; - break; - case NE: - data[top-1] = data.at(top-1) != data.at(top); - --top; - break; - case AND: - data[top-1] = data.at(top-1) && data.at(top); - --top; - break; - case OR: - data[top-1] = data.at(top-1) || data.at(top); - --top; - break; - case IF: - ++i; - if (!data.at(top)) { - i += code[i]; - } - --top; - break; - case IF32: - { - ++i; - const NumT r = Read32(i); - if (!data.at(top)) { - i += r; - } - --top; - } - break; - case ELSE: - ++i; - i += code[i]; - break; - case ELSE32: - ++i; - i += Read32(i); - break; - case VAR: - ++top; - data.at(top) = n; - break; - default: - assert(false); - } - assert(i < code.size()); - assert(top == static_cast(-1) || top < data.size()); - } - assert(top == 0); - return data.at(0); - } - - - - inline PluralParser::ExpressionError::ExpressionError(const std::string &whatArg, const InP it) - : std::runtime_error(whatArg), pos(it) - { - } - - inline PluralParser::ExpressionError::ExpressionError(const char *whatArg, const InP it) - : std::runtime_error(whatArg), pos(it) - { - } - - inline PluralParser::InP PluralParser::ExpressionError::Where() const noexcept - { - return pos; - } - - - - // Plural forms information parser. - inline std::pair - PluralParser::Parse(const std::string &plural_exp) - { - const InP begin = plural_exp.cbegin(); - const InP end = plural_exp.cend(); - auto npluralsRange = GetExpression(begin, end, "nplurals"); - const NumT nplurals = GetNumber(npluralsRange.first, npluralsRange.second); - - auto pluralRange = GetExpression(begin, end, "plural"); - const auto f = ParseExpression(pluralRange.first, pluralRange.second); - - return std::make_pair(nplurals, f); - } - - - - // Skip spaces (Utility function) - inline void PluralParser::SkipSpaces(InP &it, const InP end) - { - while (it != end && std::isspace(static_cast(*it))) { - ++it; - } - } - - // get a number. (Utility function) - inline PluralParser::NumT PluralParser::GetNumber(InP &it, const InP end) - { - std::string s; - while (it != end && std::isdigit(static_cast(*it))) { - s += *it++; - } - if (!s.empty()) { - return std::stoi(s); - } - throw ExpressionError("Parse error: '0'..'9' is expected.", it); - } - - // get a expression. (Utility function) - inline std::pair - PluralParser::GetExpression(const InP begin, const InP end, const std::string &keyword) - { - auto curIt = std::find_end(begin, end, keyword.cbegin(), keyword.cend()); - if (curIt == end) { - throw ExpressionError("Parse error: '" + keyword + "' is not found.", begin); - } - std::advance(curIt, keyword.length()); - SkipSpaces(curIt, end); - if (*curIt != '=') { - throw ExpressionError("'=' is expected.", curIt); - } - ++curIt; - SkipSpaces(curIt, end); - const InP find_pos = curIt; - while (curIt != end && *curIt != ';') { - ++curIt; - } - if (*curIt != ';') { - throw ExpressionError("';' is expected.", curIt); - } - return std::make_pair(find_pos, curIt); - } - -#ifdef SPIRITLESS_PO_DEBUG_PLURAL_PARSER_USE_INTERPRETER - inline PluralParser::FunctionType PluralParser::CreatePluralFunction() - { - return FunctionType(code, max_data_size); - } -#else - /* - These plural expressions is derived from lib/plurals.js in "https://github.com/alexanderwallin/node-gettext". It's published by a sort of MIT License but we have no need to show the copyright notice and the permission notice because the second sentence is removed. - - Copyright (c) 2011-2012 Andris Reinman - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - */ - inline PluralParser::FunctionType PluralParser::CreatePluralFunction() - { - static std::map func_map { - { - { NUM, 0 }, - [](NumT) -> NumT { return 0; } - }, - { - { VAR, NUM, 1, EQ, VAR, NUM, 10, MOD, NUM, 1, EQ, OR, IF, 4, NUM, 0, ELSE, 2, NUM, 1 }, - [](NumT n) -> NumT { return n == 1 || n % 10 == 1 ? 0 : 1; } - }, - { - { VAR, NUM, 0, NE }, - [](NumT n) -> NumT { return n != 0; } - }, - { - { VAR, NUM, 1, NE }, - [](NumT n) -> NumT { return n != 1; } - }, - { - { VAR, NUM, 1, GT }, - [](NumT n) -> NumT { return n > 1; } - }, - { - { VAR, NUM, 10, MOD, NUM, 1, NE, VAR, NUM, 100, MOD, NUM, 11, EQ, OR }, - [](NumT n) -> NumT { return n % 10 != 1 || n % 100 == 11; } - }, - { - { VAR, NUM, 10, MOD, NUM, 1, EQ, VAR, NUM, 100, MOD, NUM, 11, NE, AND, IF, 4, NUM, 0, ELSE, 12, VAR, NUM, 0, NE, IF, 4, NUM, 1, ELSE, 2, NUM, 2 }, - [](NumT n) -> NumT { return n % 10 == 1 && n % 100 != 11 ? 0 : n != 0 ? 1 : 2; } - }, - { - { VAR, NUM, 10, MOD, NUM, 1, EQ, VAR, NUM, 100, MOD, NUM, 11, NE, AND, IF, 4, NUM, 0, ELSE, 31, VAR, NUM, 10, MOD, NUM, 2, GE, VAR, NUM, 100, MOD, NUM, 10, LT, VAR, NUM, 100, MOD, NUM, 20, GE, OR, AND, IF, 4, NUM, 1, ELSE, 2, NUM, 2 }, - [](NumT n) -> NumT { return n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2; } - }, - { - { VAR, NUM, 10, MOD, NUM, 1, EQ, VAR, NUM, 100, MOD, NUM, 11, NE, AND, IF, 4, NUM, 0, ELSE, 39, VAR, NUM, 10, MOD, NUM, 2, GE, VAR, NUM, 10, MOD, NUM, 4, LE, VAR, NUM, 100, MOD, NUM, 10, LT, VAR, NUM, 100, MOD, NUM, 20, GE, OR, AND, AND, IF, 4, NUM, 1, ELSE, 2, NUM, 2 }, - [](NumT n) -> NumT { return n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2; } - }, - { - { VAR, NUM, 0, EQ, IF, 4, NUM, 0, ELSE, 12, VAR, NUM, 1, EQ, IF, 4, NUM, 1, ELSE, 2, NUM, 2 }, - [](NumT n) -> NumT { return n == 0 ? 0 : n == 1 ? 1 : 2; } - }, - { - { VAR, NUM, 1, EQ, IF, 4, NUM, 0, ELSE, 28, VAR, NUM, 0, EQ, VAR, NUM, 100, MOD, NUM, 0, GT, VAR, NUM, 100, MOD, NUM, 20, LT, AND, OR, IF, 4, NUM, 1, ELSE, 2, NUM, 2 }, - [](NumT n) -> NumT { return n == 1 ? 0 : (n == 0 || (n % 100 > 0 && n % 100 < 20)) ? 1 : 2; } - }, - { - { VAR, NUM, 1, EQ, IF, 4, NUM, 0, ELSE, 39, VAR, NUM, 10, MOD, NUM, 2, GE, VAR, NUM, 10, MOD, NUM, 4, LE, VAR, NUM, 100, MOD, NUM, 10, LT, VAR, NUM, 100, MOD, NUM, 20, GE, OR, AND, AND, IF, 4, NUM, 1, ELSE, 2, NUM, 2 }, - [](NumT n) -> NumT { return n == 1 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2; } - }, - { - { VAR, NUM, 1, EQ, IF, 4, NUM, 0, ELSE, 17, VAR, NUM, 2, GE, VAR, NUM, 4, LE, AND, IF, 4, NUM, 1, ELSE, 2, NUM, 2 }, - [](NumT n) -> NumT { return n == 1 ? 0 : (n >= 2 && n <= 4) ? 1 : 2; } - }, - { - { VAR, NUM, 100, MOD, NUM, 1, EQ, IF, 4, NUM, 0, ELSE, 36, VAR, NUM, 100, MOD, NUM, 2, EQ, IF, 4, NUM, 1, ELSE, 23, VAR, NUM, 100, MOD, NUM, 3, EQ, VAR, NUM, 100, MOD, NUM, 4, EQ, OR, IF, 4, NUM, 2, ELSE, 2, NUM, 3 }, - [](NumT n) -> NumT { return n % 100 == 1 ? 0 : n % 100 == 2 ? 1 : n % 100 == 3 || n % 100 == 4 ? 2 : 3; } - }, - { - { VAR, NUM, 1, EQ, IF, 4, NUM, 0, ELSE, 49, VAR, NUM, 0, EQ, VAR, NUM, 100, MOD, NUM, 1, GT, VAR, NUM, 100, MOD, NUM, 11, LT, AND, OR, IF, 4, NUM, 1, ELSE, 23, VAR, NUM, 100, MOD, NUM, 10, GT, VAR, NUM, 100, MOD, NUM, 20, LT, AND, IF, 4, NUM, 2, ELSE, 2, NUM, 3 }, - [](NumT n) -> NumT { return n == 1 ? 0 : n == 0 || ( n % 100 > 1 && n % 100 < 11) ? 1 : (n % 100 > 10 && n % 100 < 20 ) ? 2 : 3; } - }, - { - { VAR, NUM, 1, EQ, VAR, NUM, 11, EQ, OR, IF, 4, NUM, 0, ELSE, 32, VAR, NUM, 2, EQ, VAR, NUM, 12, EQ, OR, IF, 4, NUM, 1, ELSE, 17, VAR, NUM, 2, GT, VAR, NUM, 20, LT, AND, IF, 4, NUM, 2, ELSE, 2, NUM, 3 }, - [](NumT n) -> NumT { return (n == 1 || n == 11) ? 0 : (n == 2 || n == 12) ? 1 : (n > 2 && n < 20) ? 2 : 3; } - }, - { - { VAR, NUM, 1, EQ, IF, 4, NUM, 0, ELSE, 27, VAR, NUM, 2, EQ, IF, 4, NUM, 1, ELSE, 17, VAR, NUM, 8, NE, VAR, NUM, 11, NE, AND, IF, 4, NUM, 2, ELSE, 2, NUM, 3 }, - [](NumT n) -> NumT { return n == 1 ? 0 : n == 2 ? 1 : (n != 8 && n != 11) ? 2 : 3; } - }, - { - { VAR, NUM, 1, EQ, IF, 4, NUM, 0, ELSE, 22, VAR, NUM, 2, EQ, IF, 4, NUM, 1, ELSE, 12, VAR, NUM, 3, EQ, IF, 4, NUM, 2, ELSE, 2, NUM, 3 }, - [](NumT n) -> NumT { return n == 1 ? 0 : n == 2 ? 1 : n == 3 ? 2 : 3; } - }, - { - { VAR, NUM, 1, EQ, IF, 4, NUM, 0, ELSE, 32, VAR, NUM, 2, EQ, IF, 4, NUM, 1, ELSE, 22, VAR, NUM, 7, LT, IF, 4, NUM, 2, ELSE, 12, VAR, NUM, 11, LT, IF, 4, NUM, 3, ELSE, 2, NUM, 4 }, - [](NumT n) -> NumT { return n == 1 ? 0 : n == 2 ? 1 : n < 7 ? 2 : n < 11 ? 3 : 4; } - }, - { - { VAR, NUM, 0, EQ, IF, 4, NUM, 0, ELSE, 56, VAR, NUM, 1, EQ, IF, 4, NUM, 1, ELSE, 46, VAR, NUM, 2, EQ, IF, 4, NUM, 2, ELSE, 36, VAR, NUM, 100, MOD, NUM, 3, GE, VAR, NUM, 100, MOD, NUM, 10, LE, AND, IF, 4, NUM, 3, ELSE, 15, VAR, NUM, 100, MOD, NUM, 11, GE, IF, 4, NUM, 4, ELSE, 2, NUM, 5 }, - [](NumT n) -> NumT { return n == 0 ? 0 : n == 1 ? 1 : n == 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5; } - }, - }; - auto it = func_map.find(code); - if (it != func_map.end()) { - return FunctionType(it->second); - } else { - return FunctionType(code, max_data_size); - } - } - /* End of the derived work. */ -#endif - - // This is a parser of the plural expression, and returns the decision function. - // InP is an input iterator type. - // start = term7; - inline PluralParser::FunctionType PluralParser::ParseExpression(InP &it, const InP end) - { - PluralParser result; - result.ParseTerm7(it, end); - SkipSpaces(it, end); -#ifdef SPIRITLESS_PO_DEBUG_PLURAL_PARSER_PRINT_COMPILE - DebugPrintCode(result.code); -#endif - if (it == end) { - if (result.top_of_data == 1) { - return result.CreatePluralFunction(); - } else { - throw ExpressionError("Bug: Invalid data stack level.", it); - } - } else { - throw ExpressionError("Parse error: Invalid character is detected.", it); - } - } - - - - // Push opcode to this->code and adjust top_of_data and max_data_size. - inline void PluralParser::PushOpcode(const Opcode op, const InP it) - { - switch (op) { - case NUM: - case NUM32: - case VAR: - ++top_of_data; - max_data_size = std::max(max_data_size, top_of_data); - break; - case MULT: - case DIV: - case MOD: - case ADD: - case SUB: - case LE: - case LT: - case GT: - case GE: - case EQ: - case NE: - case AND: - case OR: - case IF: - case ELSE: - if (top_of_data == 0) { - throw ExpressionError("Bug: Data stack underflow.", it); - } - --top_of_data; - break; - case IF32: - case ELSE32: - throw ExpressionError("Bug: IF32 and ELSE32 must not be pushed to code.", it); - break; - case NOT: - break; - case END: - throw ExpressionError("Bug: END must not be pushed to code.", it); - break; - default: - throw ExpressionError("Bug: Unknown code is pushed.", it); - } - code.push_back(op); - } - - // Push IF or ELSE - // return relative_address_index for IF and ELSE. - inline size_t PluralParser::PushIForELSEandAddress(const Opcode op, const InP it) - { - PushOpcode(op, it); - const size_t index = code.size(); - code.push_back(0); - return index; - } - - // 8 bit address replace 32 bit address. - inline void PluralParser::InsertAddress32(size_t adrs_index, size_t jump_length) - { - code.resize(code.size() + 3); - std::copy(code.begin() + adrs_index + 1, code.end() - 3, - code.begin() + adrs_index + 4); - code[adrs_index + 0] = (jump_length >> 24) & 0xFF; - code[adrs_index + 1] = (jump_length >> 16) & 0xFF; - code[adrs_index + 2] = (jump_length >> 8) & 0xFF; - code[adrs_index + 3] = jump_length & 0xFF; - } - - // Adjust the jump addresses in an IF-ELSE block. - // The location of END-IF is code.end(). - inline void PluralParser::AdjustJumpAddress(const size_t if_adrs_index, size_t else_adrs_index, const InP it) - { - if (if_adrs_index < 1) { - throw ExpressionError("Bug: The index of an address must be more than 0.", it); - } - if (if_adrs_index >= else_adrs_index) { - throw ExpressionError("Bug: The index of ELSE must be more than IF's.", it); - } - if (else_adrs_index >= code.size()) { - throw ExpressionError("Bug: The size of code[] must be more than the index of ELSE.", it); - } - if (code[if_adrs_index - 1] != IF || code[else_adrs_index - 1] != ELSE) { - throw ExpressionError("Bug: The opcodes must be IF and ELSE.", it); - } - - const size_t endif_index = code.size(); - size_t if_length = else_adrs_index - if_adrs_index; - const size_t else_length = endif_index - else_adrs_index - 1; - // Practically, the relative address is always 8 bit. - -#ifdef SPIRITLESS_PO_DEBUG_PLURAL_PARSER_USE_32BIT_ELSE - const bool else_length_is_32bit = true; -#else - const bool else_length_is_32bit = else_length > 0xFF; -#endif - if (else_length_is_32bit) { - // if_length includes ELSE command and ELSE will replace ELSE32. - if_length += 3; - } -#ifdef SPIRITLESS_PO_DEBUG_PLURAL_PARSER_USE_32BIT_IF - const bool if_length_is_32bit = true; -#else - const bool if_length_is_32bit = if_length > 0xFF; -#endif - if (if_length_is_32bit) { - InsertAddress32(if_adrs_index, if_length); - code[if_adrs_index - 1] = IF32; - else_adrs_index += 3; - } else { - code[if_adrs_index] = static_cast(if_length); - } - if (else_length_is_32bit) { - InsertAddress32(else_adrs_index, else_length); - code[else_adrs_index - 1] = ELSE32; - } else { - code[else_adrs_index] = static_cast(else_length); - } - } - - // Push an immediate number into code. - inline void PluralParser::PushImmediateNumber(const NumT n, const InP it) - { -#ifndef SPIRITLESS_PO_DEBUG_PLURAL_PARSER_USE_32BIT_NUMBER - if (n <= 0xFF) { - // Practically, the immediate number is always 8 bit. - PushOpcode(NUM, it); - code.push_back(static_cast(n)); - return; - } -#endif - PushOpcode(NUM32, it); - code.push_back((n >> 24) & 0xFF); - code.push_back((n >> 16) & 0xFF); - code.push_back((n >> 8) & 0xFF); - code.push_back(n & 0xFF); - } - - - - // Lower level parsers. - // term7 = term6, term71; - inline void PluralParser::ParseTerm7(InP &it, const InP end) - { - ParseTerm6(it, end); - ParseTerm71(it, end); - } - - // term71 = e | '?', term7, ':', term7; - inline void PluralParser::ParseTerm71(InP &it, const InP end) - { - SkipSpaces(it, end); - if (it != end && *it == '?') { - ++it; - const size_t if_adrs = PushIForELSEandAddress(IF, it); - ParseTerm7(it, end); - const size_t else_adrs = PushIForELSEandAddress(ELSE, it); - SkipSpaces(it, end); - if (it != end && *it == ':') { - ++it; - ParseTerm7(it, end); - AdjustJumpAddress(if_adrs, else_adrs, it); - } else { - throw ExpressionError("Parse error: ':' is expected.", it); - } - } - } - - // term6 = term5, term61; - inline void PluralParser::ParseTerm6(InP &it, const InP end) - { - ParseTerm5(it, end); - ParseTerm61(it, end); - } - - // term61 = e | '||', term6; - inline void PluralParser::ParseTerm61(InP &it, const InP end) - { - SkipSpaces(it, end); - if (it != end && *it == '|') { - ++it; - if (it != end && *it == '|') { - ++it; - ParseTerm6(it, end); - PushOpcode(OR, it); - } else { - throw ExpressionError("Parse error: '|' is expected.", it); - } - } - } - - // term5 = term4, term51; - inline void PluralParser::ParseTerm5(InP &it, const InP end) - { - ParseTerm4(it, end); - ParseTerm51(it, end); - } - - // term51 = e | '&&', term5; - inline void PluralParser::ParseTerm51(InP &it, const InP end) - { - SkipSpaces(it, end); - if (it != end && *it == '&') { - ++it; - if (it != end && *it == '&') { - ++it; - ParseTerm5(it, end); - PushOpcode(AND, it); - } else { - throw ExpressionError("Parse error: '&' is expected.", it); - } - } - } - - // term4 = term3, term41; - inline void PluralParser::ParseTerm4(InP &it, const InP end) - { - ParseTerm3(it, end); - ParseTerm41(it, end); - } - - // term41 = e | '==', term4 | '!=', term4; - inline void PluralParser::ParseTerm41(InP &it, const InP end) - { - SkipSpaces(it, end); - if (it != end && (*it == '=' || *it == '!')) { - const bool eq = *it == '='; - ++it; - if (it != end && *it == '=') { - ++it; - ParseTerm4(it, end); - if (eq) { - PushOpcode(EQ, it); - } else { - PushOpcode(NE, it); - } - } else { - throw ExpressionError("Parse error: '=' is expected.", it); - } - } - } - - // term3 = term2, term31; - inline void PluralParser::ParseTerm3(InP &it, const InP end) - { - ParseTerm2(it, end); - ParseTerm31(it, end); - } - - // term31 = e | '<', term3 | '<=', term3 | '>', term3 | '<=', term3; - inline void PluralParser::ParseTerm31(InP &it, const InP end) - { - SkipSpaces(it, end); - if (it != end && (*it == '<' || *it == '>')) { - const bool lt = *it == '<'; - ++it; - const bool eq = it != end && *it == '='; - if (eq) { - ++it; - } - ParseTerm3(it, end); - if (lt) { - if (eq) { - PushOpcode(LE, it); - } else { - PushOpcode(LT, it); - } - } else { - if (eq) { - PushOpcode(GE, it); - } else { - PushOpcode(GT, it); - } - } - } - } - - // term2 = term1, term21; - inline void PluralParser::ParseTerm2(InP &it, const InP end) - { - ParseTerm1(it, end); - ParseTerm21(it, end); - } - - // term21 = e | '+', term2 | '-', term2; - inline void PluralParser::ParseTerm21(InP &it, const InP end) - { - SkipSpaces(it, end); - if (it != end && (*it == '+' || *it == '-')) { - const bool plus = *it == '+'; - ++it; - ParseTerm2(it, end); - if (plus) { - PushOpcode(ADD, it); - } else { - PushOpcode(SUB, it); - } - } - } - - // term1 = term0, term11; - inline void PluralParser::ParseTerm1(InP &it, const InP end) - { - ParseTerm0(it, end); - ParseTerm11(it, end); - } - - // term11 = e | '*', term1 | '/', term1 | '%', term1; - inline void PluralParser::ParseTerm11(InP &it, const InP end) - { - SkipSpaces(it, end); - if (it != end && (*it == '*' || *it == '/' || *it == '%')) { - const char op = *it; - ++it; - ParseTerm1(it, end); - if (op == '*') { - PushOpcode(MULT, it); - } else if (op == '/') { - PushOpcode(DIV, it); - } else { - PushOpcode(MOD, it); - } - } - } - - // term0 = {'!'} value; - inline void PluralParser::ParseTerm0(InP &it, const InP end) - { - bool isNot = false; - for (;;) { - SkipSpaces(it, end); - if (it != end && *it == '!') { - ++it; - isNot = !isNot; - } else { - break; - } - } - ParseValue(it, end); - if (isNot) { - PushOpcode(NOT, it); - } - } - - // value = 'n' | digit, {digit} | '(', term7, ')'; - // digit = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'; - inline void PluralParser::ParseValue(InP &it, const InP end) - { - SkipSpaces(it, end); - if (it != end) { - if (*it == 'n') { - ++it; - PushOpcode(VAR, it); - return; - } else if (*it == '(') { - ++it; - ParseTerm7(it, end); - SkipSpaces(it, end); - if (it != end && *it == ')') { - ++it; - return; - } else { - throw ExpressionError("Parse error: ')' is expected.", it); - } - } else { - try { - const NumT v = GetNumber(it, end); - PushImmediateNumber(v, it); - return; - } catch (const ExpressionError &) { - // fall through - } - } - } - throw ExpressionError("Parse error: 'n' or '(', '0'..'9' is expected.", it); - } - -#ifdef SPIRITLESS_PO_DEBUG_PLURAL_PARSER_NAMESPACE -} -#endif -} // namespace spiritless_po - -#endif // SPIRITLESS_PO_PLURAL_PARSER_H_ diff --git a/src/3rd/spiritless_po/include/spiritless_po/PoParser.h b/src/3rd/spiritless_po/include/spiritless_po/PoParser.h deleted file mode 100644 index 6e2668dca..000000000 --- a/src/3rd/spiritless_po/include/spiritless_po/PoParser.h +++ /dev/null @@ -1,606 +0,0 @@ -/** PO text parser. - \file PoParser.h - \author OOTA, Masato - \copyright Copyright © 2019, 2022 OOTA, Masato - \par License Boost - \parblock - This program is distributed under the Boost Software License Version 1.0. - You can get the license file at “https://www.boost.org/LICENSE_1_0.txt”. - \endparblock -*/ - -#ifndef SPIRITLESS_PO_PO_PARSER_H_ -#define SPIRITLESS_PO_PO_PARSER_H_ - -#include "Common.h" - -#include -#include -#include -#include -#include - -namespace spiritless_po { - /** This class is a parser for the text that contains the PO entries. */ - class PoParser { - public: - /** Type of a PO entry. - - - msgid and msgstr are uncertain when error is not empty. - - msgstr.size() > 0 when error is empty. - - msgstr[0] is an empty string if the entry is fuzzy. - */ - struct PoEntryT { - std::string msgid; /**< msgid or msgid_plural ( + CONTEXT_SEPARATOR + msgctxt if msgctxt exists.) */ - std::vector msgstr; /**< msgstr, or msgstr[n] if the entry is for msgid_plural. */ - std::string error; /**< The messages that describe the error in the parsing. */ - }; - - /** Parse the text that contains the PO entries. - \tparam INP A type of an input iterator. - \param [in] begin The beginning of the text to parse. - \param [in] end The end of the text to parse. - \return The result of the parsing. - */ - template - static std::vector GetEntries(INP begin, INP end); - - private: - // Reading position type. - template - class PositionT { - public: - PositionT(INP it, INP end, std::size_t line = 1, std::size_t column = 1); - - bool IsEnd() const; - bool IsNotEnd() const; - char Get() const; - void Next(); - std::size_t GetLine() const; - std::size_t GetColumn() const; - - private: - INP curIt; - INP endIt; - std::size_t lineNumber; - std::size_t columnNumber; - }; - - // Parse Error in PO file. - template - class PoParseError : public std::runtime_error { - public: - explicit PoParseError(const std::string &whatArg, const PositionT &it); - explicit PoParseError(const char *whatArg, const PositionT &it); - - // Get the error location. - const PositionT &GetLocation() const noexcept; - - private: - PositionT loc; - }; - - // Type of a line. - enum class LineT { - START, - EMPTY, - COMMENT, - FLAG_COMMENT, - MSGCTXT, - MSGID, - MSGID_PLURAL, - MSGSTR, - MSGSTR_PLURAL, - TEXT, - END, - UNKNOWN - }; - - // Type of a flag. - enum FlagT { - NONE = 0, - FUZZY = 1 << 0 - }; - - - PoParser() = delete; - ~PoParser() = delete; - - static PoParser::FlagT FlagOR(PoParser::FlagT a, PoParser::FlagT b); - template - static void SkipSpacesExceptNL(PositionT &it); - template - static void SkipUntilNL(PositionT &it); - template - static std::string GetToken(PositionT &it); - template - static std::size_t GetNumber(PositionT &it); - template - static std::size_t GetOctalNumber(PositionT &it); - template - static std::size_t GetHexadecimalNumber(PositionT &it); - template - static bool IsTextLine(PositionT &it); - template - static LineT DecisionTypeOfLine(PositionT &it); - template - static void ParseEmptyLine(PositionT &it); - template - static void ParseText(PositionT &it, std::string &s); - template - static PoParser::FlagT ParseFlagComment(PositionT &it); - template - static void ParseComment(PositionT &it); - template - static std::string ParseMsgdata(PositionT &it); - template - static std::pair ParseMsgstrPlural(PositionT &it); - template - static PoEntryT ParseOneEntry(PositionT &it, LineT &previousLine); - }; - - - - inline PoParser::FlagT PoParser::FlagOR(PoParser::FlagT a, PoParser::FlagT b) - { - return static_cast(a | b); - } - - - template - PoParser::PositionT::PositionT(const INP it, const INP end, std::size_t line, std::size_t column) - : curIt(it), endIt(end), lineNumber(line), columnNumber(column) - { - } - - template - bool PoParser::PositionT::IsEnd() const - { - return curIt == endIt; - } - - template - bool PoParser::PositionT::IsNotEnd() const - { - return curIt != endIt; - } - - template - char PoParser::PositionT::Get() const - { - return IsEnd() ? '\0' : *curIt; - } - - template - void PoParser::PositionT::Next() - { - if (IsNotEnd()) { - if (Get() == '\n') { - ++lineNumber; - columnNumber = 0; - } - ++curIt; - ++columnNumber; - } - } - - template - std::size_t PoParser::PositionT::GetLine() const - { - return lineNumber; - } - - template - std::size_t PoParser::PositionT::GetColumn() const - { - return columnNumber; - } - - template - PoParser::PoParseError::PoParseError(const std::string &whatArg, const PositionT &it) - : std::runtime_error(whatArg), loc(it) - { - } - - template - PoParser::PoParseError::PoParseError(const char *whatArg, const PositionT &it) - : std::runtime_error(whatArg), loc(it) - { - } - - // Get the error location. - template - const PoParser::PositionT &PoParser::PoParseError::GetLocation() const noexcept - { - return loc; - } - - // Skip spaces except NL. (Utility function) - template - void PoParser::SkipSpacesExceptNL(PositionT &it) - { - for (;;) { - const char c = it.Get(); - if (c != '\n' && std::isspace(static_cast(c))) { - it.Next(); - } else { - break; - } - } - } - - // Skip until NL. (Utility function) - template - void PoParser::SkipUntilNL(PositionT &it) - { - while (it.IsNotEnd() && it.Get() != '\n') { - it.Next(); - } - } - - // get a token. (Utility function) - template - std::string PoParser::GetToken(PositionT &it) - { - std::string s; - for (;;) { - const char c = it.Get(); - // '-' is a valid character of flags. - if (std::isalpha(static_cast(c)) || c == '_' || c == '-') { - s += c; - it.Next(); - } else { - break; - } - } - return s; - } - - // get a number. (Utility function) - template - std::size_t PoParser::GetNumber(PositionT &it) - { - std::string s; - for (;;) { - const char c = it.Get(); - if (std::isdigit(static_cast(c))) { - s += c; - it.Next(); - } else { - break; - } - } - return std::stoi(s); - } - - // get a octal number. (Utility function) - template - std::size_t PoParser::GetOctalNumber(PositionT &it) - { - std::string s; - for (;;) { - const char c = it.Get(); - if (std::isdigit(static_cast(c)) && c != '8' && c != '9') { - s += c; - it.Next(); - } else { - break; - } - } - return std::stoi(s, nullptr, 8); - } - - // get a hexadecimal number. (Utility function) - template - std::size_t PoParser::GetHexadecimalNumber(PositionT &it) - { - std::string s; - for (;;) { - const char c = it.Get(); - if (std::isxdigit(static_cast(c))) { - s += c; - it.Next(); - } else { - break; - } - } - return std::stoi(s, nullptr, 16); - } - - // Check if this line is a TEXT. - // Pre position: Start of a line. - // Post position: Start of a line (except spaces). - template - bool PoParser::IsTextLine(PositionT &it) - { - SkipSpacesExceptNL(it); - return it.Get() == '"'; - } - - // Decision the type of a line. - // Pre position: Start of a line. - template - PoParser::LineT PoParser::DecisionTypeOfLine(PositionT &it) - { - SkipSpacesExceptNL(it); - const char c = it.Get(); - if (c == '\n') { - return LineT::EMPTY; - } else if (c == '"') { - return LineT::TEXT; - } else if (c == '#') { - it.Next(); - if (it.Get() == ',') { - it.Next(); - return LineT::FLAG_COMMENT; - } else { - return LineT::COMMENT; - } - } else if (c == 'm') { - const std::string s = GetToken(it); - if (s == "msgctxt") { - return LineT::MSGCTXT; - } else if (s == "msgid") { - return LineT::MSGID; - } else if (s == "msgid_plural") { - return LineT::MSGID_PLURAL; - } else if (s == "msgstr") { - if (it.Get() == '[') { - it.Next(); - return LineT::MSGSTR_PLURAL; - } else { - return LineT::MSGSTR; - } - } - } - return LineT::UNKNOWN; - } - - // Skip an empty line. - // Pre position: The end of a line. - // Post position: The next line. - template - void PoParser::ParseEmptyLine(PositionT &it) - { - SkipUntilNL(it); - it.Next(); - } - - // Pick out a content of the text. - // Pre position: The first double quotation mark. - // Post position: The next line. - template - void PoParser::ParseText(PositionT &it, std::string &s) - { - assert(it.Get() == '"'); - it.Next(); - for (;;) { - const char c = it.Get(); - it.Next(); - if (c == '\\') { - std::size_t val = 0; - const char c2 = it.Get(); - it.Next(); - switch (c2) { - case 'a': - s += '\a'; - break; - case 'b': - s += '\b'; - break; - case 'f': - s += '\f'; - break; - case 'n': - s += '\n'; - break; - case 'r': - s += '\r'; - break; - case 't': - s += '\t'; - break; - case 'v': - s += '\v'; - break; - case '0': - val = GetOctalNumber(it); - s += static_cast(val); - break; - case 'x': - it.Next(); - val = GetHexadecimalNumber(it); - s += static_cast(val); - break; - case '\0': - case '\n': - throw PoParseError("This text has no terminator.", it); - default: - s += c2; - break; - } - } else if (c == '"') { - SkipSpacesExceptNL(it); - if (it.Get() != '\n' && !it.IsEnd()) - throw PoParseError("Unexpected character is found.", it); - it.Next(); - return; - } else { - s += c; - } - } - } - - // Pick out a flag of the line. - // Pre position: The next character of ','. - // Post position: The next line. - template - PoParser::FlagT PoParser::ParseFlagComment(PositionT &it) - { - FlagT flag = NONE; - while (it.Get() != '\n' && it.IsNotEnd()) { - SkipSpacesExceptNL(it); - std::string s = GetToken(it); - if (s == "fuzzy") { - flag = FlagOR(flag, FUZZY); - } - SkipSpacesExceptNL(it); - const char c = it.Get(); - if (c == ',') { - it.Next(); - } else if (c != '\n' && c != '\0') { - throw PoParseError("Unexpected character is found.", it); - } - } - it.Next(); - return flag; - } - - // Skip a comment line. - // Pre position: The next character of '#'. - // Post position: The next line. - template - void PoParser::ParseComment(PositionT &it) - { - SkipUntilNL(it); - it.Next(); - } - - // Pick out a message text. - // Pre position: The next character of a keyword. - // Post position: The next line of the last text line. - template - std::string PoParser::ParseMsgdata(PositionT &it) - { - SkipSpacesExceptNL(it); - std::string s; - ParseText(it, s); - while (IsTextLine(it)) { - ParseText(it, s); - } - return s; - } - - // Pick out a msgstr[n] text. - // Pre position: The next character of a keyword. - // Post position: The next line of the last text line. - template - std::pair PoParser::ParseMsgstrPlural(PositionT &it) - { - SkipSpacesExceptNL(it); - const std::size_t idx = GetNumber(it); - SkipSpacesExceptNL(it); - if (it.Get() != ']') { - throw PoParseError("']' is expected.", it); - } - it.Next(); - SkipSpacesExceptNL(it); - std::string s; - ParseText(it, s); - while (IsTextLine(it)) { - ParseText(it, s); - } - return std::make_pair(idx, s); - } - - // Parse one PO entry. - // Pre position: The result of DecisionTypeOfLine() for the first line. - // Post position: The result of DecisionTypeOfLine() for next entry. - // Return: previousLine: The line of a type for the next line. - // Return: one PO entry data. it's empty if previousLine == END. - // Note: previousLine must be LineT::START if there is no previous lines. - template - PoParser::PoEntryT PoParser::ParseOneEntry(PositionT &it, LineT &previousLine) - { - LineT stat = previousLine; - PoEntryT out; - try { - FlagT flag = NONE; - if (stat == LineT::START) { - stat = DecisionTypeOfLine(it); - } - while (stat == LineT::EMPTY || stat == LineT::COMMENT || stat == LineT::FLAG_COMMENT) { - if (stat == LineT::EMPTY) { - ParseEmptyLine(it); - flag = NONE; - } else if (stat == LineT::COMMENT) { - ParseEmptyLine(it); - } else { - flag = FlagOR(flag, ParseFlagComment(it)); - } - stat = DecisionTypeOfLine(it); - } - if (it.IsEnd()) { - previousLine = LineT::END; - return out; - } - if (stat == LineT::MSGCTXT) { - out.msgid = ParseMsgdata(it); - out.msgid += CONTEXT_SEPARATOR; - stat = DecisionTypeOfLine(it); - } - if (stat != LineT::MSGID) { - throw PoParseError("'msgid' is expected.", it); - } else { - out.msgid += ParseMsgdata(it); - stat = DecisionTypeOfLine(it); - } - if (stat == LineT::MSGID_PLURAL) { - ParseMsgdata(it); - for (;;) { - stat = DecisionTypeOfLine(it); - if (stat == LineT::MSGSTR_PLURAL) { - const auto saveIt = it; - const auto p = ParseMsgstrPlural(it); - if (p.first != out.msgstr.size()) - throw PoParseError("Invalid plural index in msgstr[n].", saveIt); - out.msgstr.push_back(p.second); - } else { - break; - } - } - if (out.msgstr.empty()) { - throw PoParseError("'msgstr[n]' is expected.", it); - } - } else if (stat != LineT::MSGSTR) { - throw PoParseError("'msgstr' is expected.", it); - } else { - out.msgstr.push_back(ParseMsgdata(it)); - stat = DecisionTypeOfLine(it); - } - if (flag & FUZZY) { - out.msgstr[0].clear(); - } - } catch (PoParseError &e) { - const auto &loc = e.GetLocation(); - out.error = std::to_string(loc.GetLine()) + ',' + std::to_string(loc.GetColumn()) + ": " + e.what(); - - do { - SkipUntilNL(it); - it.Next(); - stat = DecisionTypeOfLine(it); - } while (stat != LineT::EMPTY && stat != LineT::COMMENT && stat != LineT::FLAG_COMMENT && stat != LineT::MSGCTXT && stat != LineT::MSGID && stat != LineT::UNKNOWN); - } - previousLine = stat; - return out; - } - - // Parse all PO entries. - template - std::vector PoParser::GetEntries(const INP begin, const INP end) - { - std::vector entries; - PositionT pos(begin, end); - LineT typeOfLine = LineT::START; - while (pos.IsNotEnd()) { - PoEntryT value = ParseOneEntry(pos, typeOfLine); - if (typeOfLine == LineT::END) { - break; - } - entries.push_back(std::move(value)); - } - return entries; - } -} // namespace spiritless_po - -#endif // SPIRITLESS_PO_PO_PARSER_H_ diff --git a/src/3rd/spiritless_po/include/spiritless_po/spiritless_po.h b/src/3rd/spiritless_po/include/spiritless_po/spiritless_po.h deleted file mode 100644 index 31bd3e3e6..000000000 --- a/src/3rd/spiritless_po/include/spiritless_po/spiritless_po.h +++ /dev/null @@ -1,14 +0,0 @@ -/* spiritless_po.h - -Copyright © 2019 OOTA, Masato - -This program is distributed under the Boost Software License Version 1.0. -You can get the license file at “https://www.boost.org/LICENSE_1_0.txt”. -*/ - -#ifndef SPIRITLESS_PO_SPIRITLESS_PO_H_ -#define SPIRITLESS_PO_SPIRITLESS_PO_H_ - -#include "../spiritless_po.h" - -#endif // SPIRITLESS_PO_SPIRITLESS_PO_H_ diff --git a/src/3rd/spiritless_po/sample/dump.cpp b/src/3rd/spiritless_po/sample/dump.cpp deleted file mode 100644 index 767d0a53b..000000000 --- a/src/3rd/spiritless_po/sample/dump.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/* sample/dump.cpp - -Copyright (c) 2022 OOTA, Masato - -This is published under CC0 1.0. -For more information, see CC0 1.0 Universal (CC0 1.0) at . -*/ -#include -#include - -#include "spiritless_po.h" - -using namespace std; - -int main(int argc, char *argv[]) -{ - if (argc <= 1) { - cerr << "This program needs one filename." << endl; - return 1; - } - - spiritless_po::Catalog catalog; -#if 0 - /* Add version */ - for (size_t i = 0; i < static_cast(argc) - 1; i++) { - ifstream f(argv[i + 1]); - catalog.ClearError(); - if (!catalog.Add(f)) { - for (const auto &s : catalog.GetError()) { - cerr << argv[i + 1] << ": " << s << endl; - } - } - } -#else - /* Merge version */ - for (size_t i = 0; i < static_cast(argc) - 1; i++) { - spiritless_po::Catalog newCatalog; - ifstream f(argv[i + 1]); - newCatalog.ClearError(); - if (!newCatalog.Add(f)) { - for (const auto &s : newCatalog.GetError()) { - cerr << argv[i + 1] << ": " << s << endl; - } - } - catalog.Merge(newCatalog); - } -#endif - - cout << "String Table:" << endl; - size_t no = 0; - for (auto s : catalog.GetStringTable()) { - cout << no << ": " << s << endl; - ++no; - } - cout << "Index:" << endl; - for (auto idx : catalog.GetIndex()) { - auto base = idx.second.stringTableIndex; - auto total = idx.second.totalPlurals; - if (total == 1) { - cout << idx.first << ": " << base << endl; - } else { - cout << idx.first << ": " << base << " - " << (base + total - 1) << endl; - } - } - cout << "Metadata:" << endl; - for (auto entry : catalog.GetMetadata()) { - cout << entry.first << ": " << entry.second << endl; - } - cout << "Errors:" << endl; - for (const auto &s : catalog.GetError()) { - cerr << s << endl; - } - return 0; -} diff --git a/src/3rd/spiritless_po/sample/load.cpp b/src/3rd/spiritless_po/sample/load.cpp deleted file mode 100644 index a948c1132..000000000 --- a/src/3rd/spiritless_po/sample/load.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* sample/load.cpp - -Copyright (c) 2019 OOTA, Masato - -This is published under CC0 1.0. -For more information, see CC0 1.0 Universal (CC0 1.0) at . -*/ -#include -#include -#include - -#include "spiritless_po.h" - -using namespace std; -using namespace std::chrono; - -int main(int argc, char *argv[]) -{ - if (argc <= 1) { - cerr << "This program needs one filename." << endl; - return 1; - } - - const auto start_time = high_resolution_clock::now(); - spiritless_po::Catalog catalog; - for (size_t i = 0; i < static_cast(argc) - 1; i++) { - ifstream f(argv[i + 1]); - catalog.ClearError(); - if (!catalog.Add(f)) { - for (const auto &s : catalog.GetError()) { - cerr << argv[i + 1] << ": " << s << endl; - } - } - } - const auto end_time = high_resolution_clock::now(); - const microseconds d = duration_cast(end_time - start_time); - std::cout << "Loading elapse time: " << d.count() << " us" << endl; - - cout << "Apple" - << ": " << catalog.gettext("Apple") << endl; - for (size_t i = 0; i < 30; i++) { - cout << i << ": Bean" - << ": " << catalog.ngettext("Bean", "Beans", i) << endl; - } - - auto index = catalog.GetIndex(); - cout << "Number of msgid: " << index.size() << endl; - return 0; -} diff --git a/src/3rd/spiritless_po/spiritless_po.doxygen b/src/3rd/spiritless_po/spiritless_po.doxygen deleted file mode 100644 index aefeeab95..000000000 --- a/src/3rd/spiritless_po/spiritless_po.doxygen +++ /dev/null @@ -1,2736 +0,0 @@ -# Doxyfile 1.9.4 -# Copyright © 2022 OOTA, Masato -# This is published under CC0 1.0. -# For more information, see CC0 1.0 Universal (CC0 1.0) at . - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). -# -# Note: -# -# Use doxygen to compare the used configuration file with the template -# configuration file: -# doxygen -x [configFile] -# Use doxygen to compare the used configuration file with the template -# configuration file without replacing the environment variables: -# doxygen -x_noenv [configFile] - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the configuration -# file that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# https://www.gnu.org/software/libiconv/ for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = "spiritless_po" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = 1 - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = "A kind of gettext library inspired by spirit-po." - -# With the PROJECT_LOGO tag one can specify a logo or an icon that is included -# in the documentation. The maximum height of the logo should not exceed 55 -# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy -# the logo to the output directory. - -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = - -# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 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 CREATE_SUBDIRS_LEVEL to -# control the number of sub-directories. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# Controls the number of sub-directories that will be created when -# CREATE_SUBDIRS tag is set to 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. -# Minimum value: 0, maximum value: 8, default value: 8. -# This tag requires that the tag CREATE_SUBDIRS is set to YES. - -CREATE_SUBDIRS_LEVEL = 8 - -# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII -# characters to appear in the names of generated files. If set to NO, non-ASCII -# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode -# U+3044. -# The default value is: NO. - -ALLOW_UNICODE_NAMES = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Bulgarian, -# Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, English -# (United States), Esperanto, Farsi (Persian), Finnish, French, German, Greek, -# Hindi, Hungarian, Indonesian, Italian, Japanese, Japanese-en (Japanese with -# English messages), Korean, Korean-en (Korean with English messages), Latvian, -# Lithuanian, Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, -# Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, -# Swedish, Turkish, Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = YES - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = YES - -# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line -# such as -# /*************** -# as being the beginning of a Javadoc-style comment "banner". If set to NO, the -# Javadoc-style will behave just like regular comments and it will not be -# interpreted by doxygen. -# The default value is: NO. - -JAVADOC_BANNER = NO - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# By default Python docstrings are displayed as preformatted text and doxygen's -# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the -# doxygen's special commands can be used and the contents of the docstring -# documentation blocks is shown as doxygen documentation. -# The default value is: YES. - -PYTHON_DOCSTRING = YES - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new -# page for each member. If set to NO, the documentation of a member will be part -# of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:^^" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". Note that you cannot put \n's in the value part of an alias -# to insert newlines (in the resulting output). You can put ^^ in the value part -# of an alias to insert a newline as if a physical newline was in the original -# file. When you need a literal { or } or , in the value part of an alias you -# have to escape them by means of a backslash (\), this can lead to conflicts -# with the commands \{ and \} for these it is advised to use the version @{ and -# @} or use a double escape (\\{ and \\}) - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice -# sources only. Doxygen will then generate output that is more tailored for that -# language. For instance, namespaces will be presented as modules, types will be -# separated into more groups, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_SLICE = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, JavaScript, -# Csharp (C#), C, C++, Lex, D, PHP, md (Markdown), Objective-C, Python, Slice, -# VHDL, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: -# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser -# tries to guess whether the code is fixed or free formatted code, this is the -# default for Fortran type files). For instance to make doxygen treat .inc files -# as Fortran files (default is PHP), and .f files as C (default is Fortran), -# use: inc=Fortran f=C. -# -# Note: For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. When specifying no_extension you should add -# * to the FILE_PATTERNS. -# -# Note see also the list of default file extension mappings. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See https://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = YES - -# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up -# to that level are automatically included in the table of contents, even if -# they do not have an id attribute. -# Note: This feature currently applies only to Markdown headings. -# Minimum value: 0, maximum value: 99, default value: 5. -# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. - -TOC_INCLUDE_HEADINGS = 5 - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by putting a % sign in front of the word or -# globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# If one adds a struct or class to a group and this option is enabled, then also -# any nested class or struct is added to the same group. By default this option -# is disabled and one has to add nested compounds explicitly via \ingroup. -# The default value is: NO. - -GROUP_NESTED_COMPOUNDS = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -# The NUM_PROC_THREADS specifies the number of threads doxygen is allowed to use -# during processing. When set to 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. At this moment only the input processing can be done using multiple -# threads. Since this is still an experimental feature the default is set to 1, -# which effectively disables parallel processing. Please report any issues you -# encounter. Generating dot graphs in parallel is controlled by the -# DOT_NUM_THREADS setting. -# Minimum value: 0, maximum value: 32, default value: 1. - -NUM_PROC_THREADS = 1 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual -# methods of a class will be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIV_VIRTUAL = NO - -# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO, -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. If set to YES, local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO, only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If this flag is set to YES, the name of an unnamed parameter in a declaration -# will be determined by the corresponding definition. By default unnamed -# parameters remain unnamed in the output. -# The default value is: YES. - -RESOLVE_UNNAMED_PARAMS = YES - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO, these classes will be included in the various overviews. This option -# has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# declarations. If set to NO, these declarations will be included in the -# documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO, these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = NO - -# With the correct setting of option CASE_SENSE_NAMES doxygen will better be -# able to match the capabilities of the underlying filesystem. In case the -# filesystem is case sensitive (i.e. it supports files in the same directory -# whose names only differ in casing), the option must be set to 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 set to NO to properly deal with -# output files written for symbols that only differ in casing, such as for two -# classes, one named CLASS and the other named Class, and to also support -# references to files without having to specify the exact matching casing. On -# Windows (including Cygwin) and MacOS, users should typically set this option -# to NO, whereas on Linux or other Unix flavors it should typically be set to -# YES. -# The default value is: system dependent. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES, the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will -# append additional text to a page's title, such as Class Reference. If set to -# YES the compound reference will be hidden. -# The default value is: NO. - -HIDE_COMPOUND_REFERENCE= NO - -# If the SHOW_HEADERFILE tag is set to YES then the documentation for a class -# will show which file needs to be included to use the class. -# The default value is: YES. - -SHOW_HEADERFILE = YES - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = YES - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo -# list. This list is created by putting \todo commands in the documentation. -# The default value is: YES. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test -# list. This list is created by putting \test commands in the documentation. -# The default value is: YES. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES, the -# list will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. See also section "Changing the -# layout of pages" for information. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. See also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as documenting some parameters in -# a documented function twice, or documenting parameters that don't exist or -# using markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# If WARN_IF_INCOMPLETE_DOC is set to YES, doxygen will warn about incomplete -# function parameter documentation. If set to NO, doxygen will accept that some -# parameters have no documentation without warning. -# The default value is: YES. - -WARN_IF_INCOMPLETE_DOC = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO, doxygen will only warn about wrong parameter -# documentation, but not about the absence of documentation. If EXTRACT_ALL is -# set to YES then this flag will automatically be disabled. See also -# WARN_IF_INCOMPLETE_DOC -# The default value is: NO. - -WARN_NO_PARAMDOC = NO - -# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when -# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS -# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but -# at the end of the doxygen process doxygen will return with a non-zero status. -# Possible values are: NO, YES and FAIL_ON_WARNINGS. -# The default value is: NO. - -WARN_AS_ERROR = NO - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# See also: WARN_LINE_FORMAT -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# In the $text part of the 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: -# WARN_LINE_FORMAT = "'vi $file +$line'" -# See also: WARN_FORMAT -# The default value is: at line $line of file $file. - -WARN_LINE_FORMAT = "at line $line of file $file" - -# The 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 file - is -# specified the warning and error messages are written to standard output -# (stdout). - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING -# Note: If this tag is empty the current directory is searched. - -INPUT = - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: -# https://www.gnu.org/software/libiconv/) for the list of possible encodings. -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# read by doxygen. -# -# Note the list of default checked file patterns might differ from the list of -# default file extension mappings. -# -# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, -# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, -# *.hh, *.hxx, *.hpp, *.h++, *.l, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, -# *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C -# comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, -# *.vhdl, *.ucf, *.qsf and *.ice. - -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.cpp \ - *.c++ \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.idl \ - *.ddl \ - *.odl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.l \ - *.cs \ - *.d \ - *.php \ - *.php4 \ - *.php5 \ - *.phtml \ - *.inc \ - *.m \ - *.markdown \ - *.md \ - *.mm \ - *.dox \ - *.py \ - *.pyw \ - *.f90 \ - *.f95 \ - *.f03 \ - *.f08 \ - *.f18 \ - *.f \ - *.for \ - *.vhd \ - *.vhdl \ - *.ucf \ - *.qsf \ - *.ice - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = include/spiritless_po/spiritless_po.h - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = test - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# ANamespace::AClass, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = * - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = README.md - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# entity all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see https://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = YES - -# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the -# clang parser (see: -# http://clang.llvm.org/) for more accurate parsing at the cost of reduced -# performance. This can be particularly helpful with template rich C++ code for -# which doxygen's built-in parser lacks the necessary type information. -# Note: The availability of this option depends on whether or not doxygen was -# generated with the -Duse_libclang=ON option for CMake. -# The default value is: NO. - -CLANG_ASSISTED_PARSING = NO - -# If the CLANG_ASSISTED_PARSING tag is set to YES and the CLANG_ADD_INC_PATHS -# tag is set to YES then doxygen will add the directory of each input to the -# include path. -# The default value is: YES. -# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. - -CLANG_ADD_INC_PATHS = YES - -# If clang assisted parsing is enabled you can provide the compiler with command -# line options that you would normally use when invoking the compiler. Note that -# the include paths will already be set by doxygen for the files and directories -# specified with INPUT and INCLUDE_PATH. -# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. - -CLANG_OPTIONS = - -# If clang assisted parsing is enabled you can provide the clang parser with the -# path to the directory containing a file called compile_commands.json. This -# file is the compilation database (see: -# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) containing the -# options used when the source files were built. This is equivalent to -# specifying the -p option to a clang tool, such as clang-check. These options -# will then be passed to the parser. Any options specified with CLANG_OPTIONS -# will be added as well. -# Note: The availability of this option depends on whether or not doxygen was -# generated with the -Duse_libclang=ON option for CMake. - -CLANG_DATABASE_PATH = - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = YES - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined -# cascading style sheets that are included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefore more robust against future updates. -# Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra style sheet files is of importance (e.g. the last -# style sheet in the list overrules the setting of the previous ones in the -# list). For an example see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the style sheet and background images according to -# this color. Hue is specified as an angle on a color-wheel, see -# https://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use gray-scales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to YES can help to show when doxygen was last run and thus if the -# documentation is up to date. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = NO - -# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML -# documentation will contain a main index with vertical navigation menus that -# are dynamically created via JavaScript. If disabled, the navigation index will -# consists of multiple levels of tabs that are statically embedded in every HTML -# page. Disable this option to support browsers that do not have JavaScript, -# like the Qt help browser. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_MENUS = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: -# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To -# create a documentation set, doxygen will generate a Makefile in the HTML -# output directory. Running make will produce the docset in that directory and -# running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy -# genXcode/_index.html for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag determines the URL of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDURL = - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# on Windows. In the beginning of 2021 Microsoft took the original page, with -# a.o. the download links, offline the HTML help workshop was already many years -# in maintenance mode). You can download the HTML help workshop from the web -# archives at Installation executable (see: -# http://web.archive.org/web/20160201063255/http://download.microsoft.com/downlo -# ad/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe). -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler (hhc.exe). If non-empty, -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated -# (YES) or that it should be included in the main .chm file (NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated -# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it -# enables the Previous and Next buttons. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location (absolute path -# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to -# run qhelpgenerator on the generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can -# further fine tune the look of the index (see "Fine-tuning the output"). As an -# example, the default style sheet generated by doxygen has an example that -# shows how to put an image at the root of the tree instead of the PROJECT_NAME. -# Since the tree basically has the same information as the tab index, you could -# consider setting DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = NO - -# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the -# FULL_SIDEBAR option determines if the side bar is limited to only the treeview -# area (value NO) or if it should extend to the full height of the window (value -# YES). Setting this to YES gives a layout similar to -# https://docs.readthedocs.io with more room for contents, but less room for the -# project logo, title, and description. If either GENERATE_TREEVIEW or -# DISABLE_INDEX is set to NO, this option has no effect. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FULL_SIDEBAR = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# If the OBFUSCATE_EMAILS tag is set to YES, doxygen will obfuscate email -# addresses. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -OBFUSCATE_EMAILS = YES - -# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg -# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see -# https://inkscape.org) to generate formulas as SVG images instead of PNGs for -# the HTML output. These images will generally look nicer at scaled resolutions. -# Possible values are: png (the default) and svg (looks nicer but requires the -# pdf2svg or inkscape tool). -# The default value is: png. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FORMULA_FORMAT = png - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANSPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands -# to create new LaTeX commands to be used in formulas as building blocks. See -# the section "Including formulas" for details. - -FORMULA_MACROFILE = - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# https://www.mathjax.org) which uses client side JavaScript for the rendering -# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# With 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. -# Possible values are: MathJax_2 and MathJax_3. -# The default value is: MathJax_2. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_VERSION = MathJax_2 - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. For more details about the output format see MathJax -# version 2 (see: -# http://docs.mathjax.org/en/v2.7-latest/output.html) and MathJax version 3 -# (see: -# http://docs.mathjax.org/en/latest/web/components/output.html). -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility. This is the name for Mathjax version 2, for MathJax version 3 -# this will be translated into chtml), NativeMML (i.e. MathML. Only supported -# for NathJax 2. For MathJax version 3 chtml will be used instead.), chtml (This -# is the name for Mathjax version 3, for MathJax version 2 this will be -# translated into HTML-CSS) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from https://www.mathjax.org before deployment. The default value is: -# - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2 -# - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3 -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# for MathJax version 2 (see -# https://docs.mathjax.org/en/v2.7-latest/tex.html#tex-and-latex-extensions): -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# For example for MathJax version 3 (see -# http://docs.mathjax.org/en/latest/input/tex/extensions/index.html): -# MATHJAX_EXTENSIONS = ams -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: -# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /