From b7b5c2d3ff60fcb3b0f5b828ab0f8973c38aefbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Wed, 21 Nov 2018 22:23:14 +0000 Subject: [PATCH] fix for C++17, requires at least C+17 --- ChangeLog | 67 +++ NEWS | 3 + ax_cxx_compile_stdcxx.m4 | 948 ++++++++++++++++++++++++++++++++++++ ax_init_standard_project.m4 | 9 +- bootstrap.sh | 15 +- configure.ac | 5 +- doc/doxyfile.in | 472 +++++++++++------- doc/makefile.am | 10 +- makefile.am | 23 +- src/xml-cxx/xml.hxx | 494 +++++++++---------- src/xml.cxx | 334 ++++++------- 11 files changed, 1761 insertions(+), 619 deletions(-) create mode 100644 ax_cxx_compile_stdcxx.m4 diff --git a/ChangeLog b/ChangeLog index 9276561..8263201 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,70 @@ +2018-10-23 21:21 + + * [r126] build-in-docker.sh, mac-create-app-bundle.sh, + resolve-rpmbuilddeps.sh: + update buildsystem + +2018-09-19 11:22 + + * [r125] build-in-docker.sh: + fixed for build with centos / yum + +2018-09-19 08:21 + + * [r124] build-in-docker.sh: + fixed for build with opensuse tumbleweed and leap - and fedora, + centos, mageia + +2018-09-18 14:50 + + * [r123] build-in-docker.conf, build-in-docker.sh: + fixed for build with opensuse tumbleweed and leap + +2018-09-17 13:08 + + * [r122] INSTALL, build-in-docker.sh: + support opensuse tumbleweed + +2018-09-11 10:12 + + * [r121] INSTALL, ax_init_standard_project.m4, build-in-docker.sh: + fix installation check after package build + +2018-09-10 21:28 + + * [r120] ax_init_standard_project.m4, build-in-docker.sh: + add check whether built package can be installed + +2018-09-10 11:26 + + * [r119] ax_check_qt.m4, ax_init_standard_project.m4, bootstrap.sh, + build-in-docker.sh, debian/control.in, mac-create-app-bundle.sh: + fixed dependency-bug in ubuntu cosmic and stretch + +2018-07-16 13:53 + + * [r118] INSTALL, ax_check_qt.m4, ax_init_standard_project.m4, + build-in-docker.sh, mac-create-app-bundle.sh: + fix build for buster + +2018-07-05 08:26 + + * [r117] INSTALL, bootstrap.sh, build-in-docker.sh, + libxml-cxx.spec.in: + fixed rpm build for all distros + +2018-06-22 14:45 + + * [r116] bootstrap.sh, libxml-cxx.spec.in, resolve-rpmbuilddeps.sh: + fixed rpm build + +2018-06-20 13:05 + + * [r115] ChangeLog, ax_init_standard_project.m4, + build-in-docker.sh, mac-create-app-bundle.sh, + resolve-debbuilddeps.sh: + fixed build for mageia + 2018-04-04 19:45 * [r114] ChangeLog, bootstrap.sh, build-in-docker.sh: diff --git a/NEWS b/NEWS index e69de29..1b2d877 100644 --- a/NEWS +++ b/NEWS @@ -0,0 +1,3 @@ +2018-11-21 + +Updated for use in C++17 compiler. This breaks compatibility to older C++. \ No newline at end of file diff --git a/ax_cxx_compile_stdcxx.m4 b/ax_cxx_compile_stdcxx.m4 new file mode 100644 index 0000000..9e9eaed --- /dev/null +++ b/ax_cxx_compile_stdcxx.m4 @@ -0,0 +1,948 @@ +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional]) +# +# DESCRIPTION +# +# Check for baseline language coverage in the compiler for the specified +# version of the C++ standard. If necessary, add switches to CXX and +# CXXCPP to enable support. VERSION may be '11' (for the C++11 standard) +# or '14' (for the C++14 standard). +# +# The second argument, if specified, indicates whether you insist on an +# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. +# -std=c++11). If neither is specified, you get whatever works, with +# preference for an extended mode. +# +# The third argument, if specified 'mandatory' or if left unspecified, +# indicates that baseline support for the specified C++ standard is +# required and that the macro should error out if no mode with that +# support is found. If specified 'optional', then configuration proceeds +# regardless, after defining HAVE_CXX${VERSION} if and only if a +# supporting mode is found. +# +# LICENSE +# +# Copyright (c) 2008 Benjamin Kosnik +# Copyright (c) 2012 Zack Weinberg +# Copyright (c) 2013 Roy Stogner +# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov +# Copyright (c) 2015 Paul Norman +# Copyright (c) 2015 Moritz Klammler +# Copyright (c) 2016, 2018 Krzesimir Nowak +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 10 + +dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro +dnl (serial version number 13). + +AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl + m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"], + [$1], [14], [ax_cxx_compile_alternatives="14 1y"], + [$1], [17], [ax_cxx_compile_alternatives="17 1z"], + [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl + m4_if([$2], [], [], + [$2], [ext], [], + [$2], [noext], [], + [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl + m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true], + [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true], + [$3], [optional], [ax_cxx_compile_cxx$1_required=false], + [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])]) + AC_LANG_PUSH([C++])dnl + ac_success=no + + m4_if([$2], [noext], [], [dnl + if test x$ac_success = xno; then + for alternative in ${ax_cxx_compile_alternatives}; do + switch="-std=gnu++${alternative}" + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) + AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, + $cachevar, + [ac_save_CXX="$CXX" + CXX="$CXX $switch" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], + [eval $cachevar=yes], + [eval $cachevar=no]) + CXX="$ac_save_CXX"]) + if eval test x\$$cachevar = xyes; then + CXX="$CXX $switch" + if test -n "$CXXCPP" ; then + CXXCPP="$CXXCPP $switch" + fi + ac_success=yes + break + fi + done + fi]) + + m4_if([$2], [ext], [], [dnl + if test x$ac_success = xno; then + dnl HP's aCC needs +std=c++11 according to: + dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf + dnl Cray's crayCC needs "-h std=c++11" + for alternative in ${ax_cxx_compile_alternatives}; do + for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) + AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, + $cachevar, + [ac_save_CXX="$CXX" + CXX="$CXX $switch" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], + [eval $cachevar=yes], + [eval $cachevar=no]) + CXX="$ac_save_CXX"]) + if eval test x\$$cachevar = xyes; then + CXX="$CXX $switch" + if test -n "$CXXCPP" ; then + CXXCPP="$CXXCPP $switch" + fi + ac_success=yes + break + fi + done + if test x$ac_success = xyes; then + break + fi + done + fi]) + AC_LANG_POP([C++]) + if test x$ax_cxx_compile_cxx$1_required = xtrue; then + if test x$ac_success = xno; then + AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.]) + fi + fi + if test x$ac_success = xno; then + HAVE_CXX$1=0 + AC_MSG_NOTICE([No compiler with C++$1 support was found]) + else + HAVE_CXX$1=1 + AC_DEFINE(HAVE_CXX$1,1, + [define if the compiler supports basic C++$1 syntax]) + fi + AC_SUBST(HAVE_CXX$1) +]) + + +dnl Test body for checking C++11 support + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11], + _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 +) + + +dnl Test body for checking C++14 support + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14], + _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 +) + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17], + _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_17 +) + +dnl Tests for new features in C++11 + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[ + +// If the compiler admits that it is not ready for C++11, why torture it? +// Hopefully, this will speed up the test. + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +#elif __cplusplus < 201103L + +#error "This is not a C++11 compiler" + +#else + +namespace cxx11 +{ + + namespace test_static_assert + { + + template + struct check + { + static_assert(sizeof(int) <= sizeof(T), "not big enough"); + }; + + } + + namespace test_final_override + { + + struct Base + { + virtual void f() {} + }; + + struct Derived : public Base + { + virtual void f() override {} + }; + + } + + namespace test_double_right_angle_brackets + { + + template < typename T > + struct check {}; + + typedef check single_type; + typedef check> double_type; + typedef check>> triple_type; + typedef check>>> quadruple_type; + + } + + namespace test_decltype + { + + int + f() + { + int a = 1; + decltype(a) b = 2; + return a + b; + } + + } + + namespace test_type_deduction + { + + template < typename T1, typename T2 > + struct is_same + { + static const bool value = false; + }; + + template < typename T > + struct is_same + { + static const bool value = true; + }; + + template < typename T1, typename T2 > + auto + add(T1 a1, T2 a2) -> decltype(a1 + a2) + { + return a1 + a2; + } + + int + test(const int c, volatile int v) + { + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == false, ""); + auto ac = c; + auto av = v; + auto sumi = ac + av + 'x'; + auto sumf = ac + av + 1.0; + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == true, ""); + return (sumf > 0.0) ? sumi : add(c, v); + } + + } + + namespace test_noexcept + { + + int f() { return 0; } + int g() noexcept { return 0; } + + static_assert(noexcept(f()) == false, ""); + static_assert(noexcept(g()) == true, ""); + + } + + namespace test_constexpr + { + + template < typename CharT > + unsigned long constexpr + strlen_c_r(const CharT *const s, const unsigned long acc) noexcept + { + return *s ? strlen_c_r(s + 1, acc + 1) : acc; + } + + template < typename CharT > + unsigned long constexpr + strlen_c(const CharT *const s) noexcept + { + return strlen_c_r(s, 0UL); + } + + static_assert(strlen_c("") == 0UL, ""); + static_assert(strlen_c("1") == 1UL, ""); + static_assert(strlen_c("example") == 7UL, ""); + static_assert(strlen_c("another\0example") == 7UL, ""); + + } + + namespace test_rvalue_references + { + + template < int N > + struct answer + { + static constexpr int value = N; + }; + + answer<1> f(int&) { return answer<1>(); } + answer<2> f(const int&) { return answer<2>(); } + answer<3> f(int&&) { return answer<3>(); } + + void + test() + { + int i = 0; + const int c = 0; + static_assert(decltype(f(i))::value == 1, ""); + static_assert(decltype(f(c))::value == 2, ""); + static_assert(decltype(f(0))::value == 3, ""); + } + + } + + namespace test_uniform_initialization + { + + struct test + { + static const int zero {}; + static const int one {1}; + }; + + static_assert(test::zero == 0, ""); + static_assert(test::one == 1, ""); + + } + + namespace test_lambdas + { + + void + test1() + { + auto lambda1 = [](){}; + auto lambda2 = lambda1; + lambda1(); + lambda2(); + } + + int + test2() + { + auto a = [](int i, int j){ return i + j; }(1, 2); + auto b = []() -> int { return '0'; }(); + auto c = [=](){ return a + b; }(); + auto d = [&](){ return c; }(); + auto e = [a, &b](int x) mutable { + const auto identity = [](int y){ return y; }; + for (auto i = 0; i < a; ++i) + a += b--; + return x + identity(a + b); + }(0); + return a + b + c + d + e; + } + + int + test3() + { + const auto nullary = [](){ return 0; }; + const auto unary = [](int x){ return x; }; + using nullary_t = decltype(nullary); + using unary_t = decltype(unary); + const auto higher1st = [](nullary_t f){ return f(); }; + const auto higher2nd = [unary](nullary_t f1){ + return [unary, f1](unary_t f2){ return f2(unary(f1())); }; + }; + return higher1st(nullary) + higher2nd(nullary)(unary); + } + + } + + namespace test_variadic_templates + { + + template + struct sum; + + template + struct sum + { + static constexpr auto value = N0 + sum::value; + }; + + template <> + struct sum<> + { + static constexpr auto value = 0; + }; + + static_assert(sum<>::value == 0, ""); + static_assert(sum<1>::value == 1, ""); + static_assert(sum<23>::value == 23, ""); + static_assert(sum<1, 2>::value == 3, ""); + static_assert(sum<5, 5, 11>::value == 21, ""); + static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); + + } + + // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae + // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function + // because of this. + namespace test_template_alias_sfinae + { + + struct foo {}; + + template + using member = typename T::member_type; + + template + void func(...) {} + + template + void func(member*) {} + + void test(); + + void test() { func(0); } + + } + +} // namespace cxx11 + +#endif // __cplusplus >= 201103L + +]]) + + +dnl Tests for new features in C++14 + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[ + +// If the compiler admits that it is not ready for C++14, why torture it? +// Hopefully, this will speed up the test. + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +#elif __cplusplus < 201402L + +#error "This is not a C++14 compiler" + +#else + +namespace cxx14 +{ + + namespace test_polymorphic_lambdas + { + + int + test() + { + const auto lambda = [](auto&&... args){ + const auto istiny = [](auto x){ + return (sizeof(x) == 1UL) ? 1 : 0; + }; + const int aretiny[] = { istiny(args)... }; + return aretiny[0]; + }; + return lambda(1, 1L, 1.0f, '1'); + } + + } + + namespace test_binary_literals + { + + constexpr auto ivii = 0b0000000000101010; + static_assert(ivii == 42, "wrong value"); + + } + + namespace test_generalized_constexpr + { + + template < typename CharT > + constexpr unsigned long + strlen_c(const CharT *const s) noexcept + { + auto length = 0UL; + for (auto p = s; *p; ++p) + ++length; + return length; + } + + static_assert(strlen_c("") == 0UL, ""); + static_assert(strlen_c("x") == 1UL, ""); + static_assert(strlen_c("test") == 4UL, ""); + static_assert(strlen_c("another\0test") == 7UL, ""); + + } + + namespace test_lambda_init_capture + { + + int + test() + { + auto x = 0; + const auto lambda1 = [a = x](int b){ return a + b; }; + const auto lambda2 = [a = lambda1(x)](){ return a; }; + return lambda2(); + } + + } + + namespace test_digit_separators + { + + constexpr auto ten_million = 100'000'000; + static_assert(ten_million == 100000000, ""); + + } + + namespace test_return_type_deduction + { + + auto f(int& x) { return x; } + decltype(auto) g(int& x) { return x; } + + template < typename T1, typename T2 > + struct is_same + { + static constexpr auto value = false; + }; + + template < typename T > + struct is_same + { + static constexpr auto value = true; + }; + + int + test() + { + auto x = 0; + static_assert(is_same::value, ""); + static_assert(is_same::value, ""); + return x; + } + + } + +} // namespace cxx14 + +#endif // __cplusplus >= 201402L + +]]) + + +dnl Tests for new features in C++17 + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[ + +// If the compiler admits that it is not ready for C++17, why torture it? +// Hopefully, this will speed up the test. + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +#elif __cplusplus < 201703L + +#error "This is not a C++17 compiler" + +#else + +#include +#include +#include + +namespace cxx17 +{ + + namespace test_constexpr_lambdas + { + + constexpr int foo = [](){return 42;}(); + + } + + namespace test::nested_namespace::definitions + { + + } + + namespace test_fold_expression + { + + template + int multiply(Args... args) + { + return (args * ... * 1); + } + + template + bool all(Args... args) + { + return (args && ...); + } + + } + + namespace test_extended_static_assert + { + + static_assert (true); + + } + + namespace test_auto_brace_init_list + { + + auto foo = {5}; + auto bar {5}; + + static_assert(std::is_same, decltype(foo)>::value); + static_assert(std::is_same::value); + } + + namespace test_typename_in_template_template_parameter + { + + template typename X> struct D; + + } + + namespace test_fallthrough_nodiscard_maybe_unused_attributes + { + + int f1() + { + return 42; + } + + [[nodiscard]] int f2() + { + [[maybe_unused]] auto unused = f1(); + + switch (f1()) + { + case 17: + f1(); + [[fallthrough]]; + case 42: + f1(); + } + return f1(); + } + + } + + namespace test_extended_aggregate_initialization + { + + struct base1 + { + int b1, b2 = 42; + }; + + struct base2 + { + base2() { + b3 = 42; + } + int b3; + }; + + struct derived : base1, base2 + { + int d; + }; + + derived d1 {{1, 2}, {}, 4}; // full initialization + derived d2 {{}, {}, 4}; // value-initialized bases + + } + + namespace test_general_range_based_for_loop + { + + struct iter + { + int i; + + int& operator* () + { + return i; + } + + const int& operator* () const + { + return i; + } + + iter& operator++() + { + ++i; + return *this; + } + }; + + struct sentinel + { + int i; + }; + + bool operator== (const iter& i, const sentinel& s) + { + return i.i == s.i; + } + + bool operator!= (const iter& i, const sentinel& s) + { + return !(i == s); + } + + struct range + { + iter begin() const + { + return {0}; + } + + sentinel end() const + { + return {5}; + } + }; + + void f() + { + range r {}; + + for (auto i : r) + { + [[maybe_unused]] auto v = i; + } + } + + } + + namespace test_lambda_capture_asterisk_this_by_value + { + + struct t + { + int i; + int foo() + { + return [*this]() + { + return i; + }(); + } + }; + + } + + namespace test_enum_class_construction + { + + enum class byte : unsigned char + {}; + + byte foo {42}; + + } + + namespace test_constexpr_if + { + + template + int f () + { + if constexpr(cond) + { + return 13; + } + else + { + return 42; + } + } + + } + + namespace test_selection_statement_with_initializer + { + + int f() + { + return 13; + } + + int f2() + { + if (auto i = f(); i > 0) + { + return 3; + } + + switch (auto i = f(); i + 4) + { + case 17: + return 2; + + default: + return 1; + } + } + + } + + namespace test_template_argument_deduction_for_class_templates + { + + template + struct pair + { + pair (T1 p1, T2 p2) + : m1 {p1}, + m2 {p2} + {} + + T1 m1; + T2 m2; + }; + + void f() + { + [[maybe_unused]] auto p = pair{13, 42u}; + } + + } + + namespace test_non_type_auto_template_parameters + { + + template + struct B + {}; + + B<5> b1; + B<'a'> b2; + + } + + namespace test_structured_bindings + { + + int arr[2] = { 1, 2 }; + std::pair pr = { 1, 2 }; + + auto f1() -> int(&)[2] + { + return arr; + } + + auto f2() -> std::pair& + { + return pr; + } + + struct S + { + int x1 : 2; + volatile double y1; + }; + + S f3() + { + return {}; + } + + auto [ x1, y1 ] = f1(); + auto& [ xr1, yr1 ] = f1(); + auto [ x2, y2 ] = f2(); + auto& [ xr2, yr2 ] = f2(); + const auto [ x3, y3 ] = f3(); + + } + + namespace test_exception_spec_type_system + { + + struct Good {}; + struct Bad {}; + + void g1() noexcept; + void g2(); + + template + Bad + f(T*, T*); + + template + Good + f(T1*, T2*); + + static_assert (std::is_same_v); + + } + + namespace test_inline_variables + { + + template void f(T) + {} + + template inline T g(T) + { + return T{}; + } + + template<> inline void f<>(int) + {} + + template<> int g<>(int) + { + return 5; + } + + } + +} // namespace cxx17 + +#endif // __cplusplus < 201703L + +]]) diff --git a/ax_init_standard_project.m4 b/ax_init_standard_project.m4 index 39b798c..528841d 100644 --- a/ax_init_standard_project.m4 +++ b/ax_init_standard_project.m4 @@ -170,9 +170,11 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [ AX_SUBST(NUMBERS) AX_SUBST(HOME) if test -f README.md; then + README_FILE=README.md README=$(tail -n +3 README.md) DESCRIPTION=$(head -1 README.md | sed 's,^#\+ *,,;s, *#\+$,,') else + README_FILE=README README=$(tail -n +3 README) DESCRIPTION=$(head -1 README) fi @@ -182,6 +184,7 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [ else README_HTML="${README}" fi + AX_SUBST(README_FILE) AX_SUBST(README) _AM_SUBST_NOTMAKE([README]) AX_SUBST(README_ESCAPED) @@ -329,7 +332,7 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [ AX_ADD_MAKEFILE_TARGET_DEP([maintainer-clean-am], [maintainer-clean-standard-project-targets], [makefile.in]) test -f makefile.in && cat >> makefile.in <@AUTHOR_NAME@" +ALIASES += "readme=@README_HTML@" +ALIASES += "description=@DESCRIPTION@" +ALIASES += "api=\xrefitem api \"API Call\" \"\"" ALIASES += "mutex=\par Reentrant:\nAccess is locked with mutex @c " ALIASES += "instancemutex=\par Reentrant:\nAccess is locked with per instance mutex @c " ALIASES += "classmutex=\par Reentrant:\nAccess is locked with class static mutex @c " ALIASES += "license=\par License\n" -ALIASES += "copy=\par Copyright\n" +ALIASES += "copy=\par Copyright by @AUTHOR_NAME@\n" # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" @@ -266,11 +278,14 @@ OPTIMIZE_OUTPUT_VHDL = NO # 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, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. 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. +# C#, C, C++, D, PHP, Objective-C, Python, 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), VHDL. 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: 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. @@ -287,10 +302,19 @@ EXTENSION_MAPPING = 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: 0. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 0 + # 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 by putting a % sign in front of the word -# or globally by setting AUTOLINK_SUPPORT to NO. +# 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 @@ -330,13 +354,20 @@ SIP_SUPPORT = NO 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 +# 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 = YES +# 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 @@ -395,7 +426,7 @@ LOOKUP_CACHE_SIZE = 0 # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# 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. @@ -405,35 +436,35 @@ LOOKUP_CACHE_SIZE = 0 EXTRACT_ALL = YES -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# 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 = YES -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# 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 = YES -# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# 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 +# 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. When set to YES local methods, +# 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 in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. @@ -458,21 +489,21 @@ 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. +# 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 -# (class|struct|union) declarations. If set to NO these declarations will be +# (class|struct|union) 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 +# 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. @@ -486,7 +517,7 @@ HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES upper-case letters are also +# names in lower-case letters. If set to YES, upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. @@ -495,12 +526,19 @@ INTERNAL_DOCS = NO 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 +# 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_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. @@ -528,14 +566,14 @@ 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. +# 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 +# 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. @@ -580,27 +618,25 @@ SORT_BY_SCOPE_NAME = 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 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 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 +# 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 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. @@ -625,8 +661,8 @@ ENABLED_SECTIONS = 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 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 @@ -674,8 +710,7 @@ LAYOUT_FILE = # to be installed. See also http://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. Do not use file names with spaces, bibtex cannot handle them. See -# also \cite for info how to create references. +# search path. See also \cite for info how to create references. CITE_BIB_FILES = @@ -691,7 +726,7 @@ CITE_BIB_FILES = 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 +# 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. @@ -699,7 +734,7 @@ QUIET = NO WARNINGS = YES -# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# 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. @@ -716,12 +751,18 @@ WARN_IF_DOC_ERROR = 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 or incomplete parameter -# documentation, but not about the absence of documentation. +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. # 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. +# 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 @@ -745,11 +786,12 @@ WARN_LOGFILE = doxygen.errors # 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. +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. INPUT = @top_srcdir@/src INPUT += @top_srcdir@/test +INPUT += @top_srcdir@/@README_FILE@ # 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 @@ -762,15 +804,19 @@ 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. 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++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, -# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, -# *.qsf, *.as and *.js. +# *.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. +# +# 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++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, +# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf. -FILE_PATTERNS = *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.idl *.ddl *.odl *.h *.hh *.hxx *.hpp *.h++ *.cs *.d *.php *.php4 *.php5 *.phtml *.inc *.m *.markdown *.md *.mm *.dox *.py *.f90 *.f *.for *.tcl *.vhd *.vhdl *.ucf *.qsf *.as *.js -FILE_PATTERNS += *.wt +FILE_PATTERNS = *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.idl *.ddl *.odl *.h *.hh *.hxx *.hpp *.h++ *.cs *.d *.php *.php4 *.php5 *.phtml *.inc *.m *.markdown *.md *.mm *.dox *.py *.f90 *.f *.for *.tcl *.vhd *.vhdl *.ucf *.qsf *.as *.js *.wt *.sql # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. @@ -801,7 +847,7 @@ EXCLUDE_SYMLINKS = NO # 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 = moc_* uic_* qrc_* +EXCLUDE_PATTERNS = moc_* uic_* qrc_* version.[ch]xx # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the @@ -818,14 +864,14 @@ EXCLUDE_SYMBOLS = # that contain example code fragments that are included (see the \include # command). -EXAMPLE_PATH = @top_srcdir@/examples +EXAMPLE_PATH = @top_srcdir@ # 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 = +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 @@ -854,6 +900,10 @@ IMAGE_PATH = # 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 = @@ -863,11 +913,15 @@ INPUT_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 = *.wt=doxygen-webtester.sed +FILTER_PATTERNS = *.wt=doxygen-webtester.sed *.sql=@top_srcdir@/sql-to-dot.sed # 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 +# 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. @@ -886,7 +940,7 @@ FILTER_SOURCE_PATTERNS = # (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 = +USE_MDFILE_AS_MAINPAGE = @top_srcdir@/@README_FILE@ #--------------------------------------------------------------------------- # Configuration options related to source browsing @@ -927,7 +981,7 @@ REFERENCED_BY_RELATION = 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 +# 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. @@ -974,6 +1028,25 @@ USE_HTAGS = NO 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 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 = + #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- @@ -1004,7 +1077,7 @@ IGNORE_PREFIX = # Configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES @@ -1042,7 +1115,7 @@ HTML_FILE_EXTENSION = .html # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_HEADER = +HTML_HEADER = header.html # 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 @@ -1052,7 +1125,7 @@ HTML_HEADER = # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_FOOTER = +HTML_FOOTER = footer.html # 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 @@ -1066,16 +1139,18 @@ HTML_FOOTER = HTML_STYLESHEET = -# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- -# defined cascading style sheet that is included after the standard style sheets +# 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 therefor more robust against future updates. -# Doxygen will copy the style sheet file to the output directory. For an example -# see the documentation. +# 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 = +HTML_EXTRA_STYLESHEET = style.css # 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 @@ -1088,7 +1163,7 @@ HTML_EXTRA_STYLESHEET = HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the stylesheet and background images according to +# will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see # http://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 @@ -1119,11 +1194,12 @@ 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 NO can help when comparing the output of multiple runs. -# The default value is: YES. +# 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 = YES +HTML_TIMESTAMP = NO # 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 @@ -1131,7 +1207,7 @@ HTML_TIMESTAMP = YES # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_DYNAMIC_SECTIONS = NO +HTML_DYNAMIC_SECTIONS = YES # 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 @@ -1216,28 +1292,29 @@ GENERATE_HTMLHELP = NO 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 +# 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 master .chm file ( NO). +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .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) +# 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. +# 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. @@ -1350,7 +1427,7 @@ DISABLE_INDEX = NO # 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 stylesheets (see HTML_EXTRA_STYLESHEET) one can +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can # further fine-tune the look of the index. 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 @@ -1359,7 +1436,7 @@ DISABLE_INDEX = NO # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. -GENERATE_TREEVIEW = NO +GENERATE_TREEVIEW = YES # 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. @@ -1378,7 +1455,7 @@ ENUM_VALUES_PER_LINE = 4 TREEVIEW_WIDTH = 250 -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# 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. @@ -1407,7 +1484,7 @@ FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# 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. @@ -1473,15 +1550,15 @@ MATHJAX_CODEFILE = # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. -SEARCHENGINE = YES +SEARCHENGINE = NO # When the SERVER_BASED_SEARCH tag is enabled the search engine will be # implemented using a web server instead of a web client using Javascript. There -# are two flavours of web server based searching depending on the -# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for -# searching and an index file used by the script. When EXTERNAL_SEARCH is -# enabled the indexing and searching needs to be provided by external tools. See -# the section "External Indexing and Searching" for details. +# are two flavors of web server based searching depending on the EXTERNAL_SEARCH +# setting. When disabled, doxygen will generate a PHP script for searching and +# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing +# and searching needs to be provided by external tools. See the section +# "External Indexing and Searching" for details. # The default value is: NO. # This tag requires that the tag SEARCHENGINE is set to YES. @@ -1493,7 +1570,7 @@ SERVER_BASED_SEARCH = NO # external search engine pointed to by the SEARCHENGINE_URL option to obtain the # search results. # -# Doxygen ships with an example indexer ( doxyindexer) and search engine +# Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library # Xapian (see: http://xapian.org/). # @@ -1506,7 +1583,7 @@ EXTERNAL_SEARCH = NO # The SEARCHENGINE_URL should point to a search engine hosted by a web server # which will return the search results when EXTERNAL_SEARCH is enabled. # -# Doxygen ships with an example indexer ( doxyindexer) and search engine +# Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library # Xapian (see: http://xapian.org/). See the section "External Indexing and # Searching" for details. @@ -1544,7 +1621,7 @@ EXTRA_SEARCH_MAPPINGS = # Configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output. +# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output. # The default value is: YES. GENERATE_LATEX = NO @@ -1575,7 +1652,7 @@ LATEX_CMD_NAME = latex MAKEINDEX_CMD_NAME = makeindex -# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX +# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX # documents. This may be useful for small projects and may help to save some # trees in general. # The default value is: NO. @@ -1593,9 +1670,12 @@ COMPACT_LATEX = NO PAPER_TYPE = a4 # The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names -# that should be included in the LaTeX output. To get the times font for -# instance you can specify -# EXTRA_PACKAGES=times +# that should be included in the LaTeX output. The package can be specified just +# by its name or with the correct syntax as to be used with the LaTeX +# \usepackage command. To get the times font for instance you can specify : +# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times} +# To use the option intlimits with the amsmath package you can specify: +# EXTRA_PACKAGES=[intlimits]{amsmath} # If left blank no extra packages will be included. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1609,23 +1689,36 @@ EXTRA_PACKAGES = # # Note: Only use a user-defined header if you know what you are doing! The # following commands have a special meaning inside the header: $title, -# $datetime, $date, $doxygenversion, $projectname, $projectnumber. Doxygen will -# replace them by respectively the title of the page, the current date and time, -# only the current date, the version number of doxygen, the project name (see -# PROJECT_NAME), or the project number (see PROJECT_NUMBER). +# $datetime, $date, $doxygenversion, $projectname, $projectnumber, +# $projectbrief, $projectlogo. Doxygen will replace $title with the empty +# string, for the replacement values of the other commands the user is referred +# to HTML_HEADER. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_HEADER = # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the # generated LaTeX document. The footer should contain everything after the last -# chapter. If it is left blank doxygen will generate a standard footer. +# chapter. If it is left blank doxygen will generate a standard footer. See +# LATEX_HEADER for more information on how to generate a default footer and what +# special commands can be used inside the footer. # # Note: Only use a user-defined footer if you know what you are doing! # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_FOOTER = +# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# LaTeX style sheets that are included after the standard style sheets created +# by doxygen. Using this option one can overrule certain style aspects. 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). +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_EXTRA_STYLESHEET = + # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the LATEX_OUTPUT output # directory. Note that the files will be copied as-is; there are no commands or @@ -1643,8 +1736,8 @@ LATEX_EXTRA_FILES = PDF_HYPERLINKS = YES -# If the LATEX_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate -# the PDF file directly from the LaTeX files. Set this option to YES to get a +# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate +# the PDF file directly from the LaTeX files. Set this option to YES, to get a # higher quality PDF documentation. # The default value is: YES. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1685,11 +1778,19 @@ LATEX_SOURCE_CODE = NO LATEX_BIB_STYLE = plain +# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_TIMESTAMP = NO + #--------------------------------------------------------------------------- # Configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The +# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The # RTF output is optimized for Word 97 and may not look too pretty with other RTF # readers/editors. # The default value is: NO. @@ -1704,7 +1805,7 @@ GENERATE_RTF = NO RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF +# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF # documents. This may be useful for small projects and may help to save some # trees in general. # The default value is: NO. @@ -1741,11 +1842,21 @@ RTF_STYLESHEET_FILE = RTF_EXTENSIONS_FILE = +# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code +# with syntax highlighting in the RTF output. +# +# Note that which sources are shown also depends on other settings such as +# SOURCE_BROWSER. +# The default value is: NO. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_SOURCE_CODE = NO + #--------------------------------------------------------------------------- # Configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for +# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for # classes and files. # The default value is: NO. @@ -1769,6 +1880,13 @@ MAN_OUTPUT = man MAN_EXTENSION = .3 +# The MAN_SUBDIR tag determines the name of the directory created within +# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by +# MAN_EXTENSION with the initial . removed. +# This tag requires that the tag GENERATE_MAN is set to YES. + +MAN_SUBDIR = + # If the MAN_LINKS tag is set to YES and doxygen generates man output, then it # will generate one additional man file for each entity documented in the real # man page(s). These additional files only source the real man page, but without @@ -1782,7 +1900,7 @@ MAN_LINKS = NO # Configuration options related to the XML output #--------------------------------------------------------------------------- -# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that +# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that # captures the structure of the code including all documentation. # The default value is: NO. @@ -1796,19 +1914,7 @@ GENERATE_XML = NO XML_OUTPUT = xml -# The XML_SCHEMA tag can be used to specify a XML schema, which can be used by a -# validating XML parser to check the syntax of the XML files. -# This tag requires that the tag GENERATE_XML is set to YES. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify a XML DTD, which can be used by a -# validating XML parser to check the syntax of the XML files. -# This tag requires that the tag GENERATE_XML is set to YES. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program +# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program # listings (including syntax highlighting and cross-referencing information) to # the XML output. Note that enabling this will significantly increase the size # of the XML output. @@ -1821,7 +1927,7 @@ XML_PROGRAMLISTING = YES # Configuration options related to the DOCBOOK output #--------------------------------------------------------------------------- -# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files +# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files # that can be used to generate PDF. # The default value is: NO. @@ -1835,14 +1941,23 @@ GENERATE_DOCBOOK = NO DOCBOOK_OUTPUT = docbook +# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the +# program listings (including syntax highlighting and cross-referencing +# information) to the DOCBOOK output. Note that enabling this will significantly +# increase the size of the DOCBOOK output. +# The default value is: NO. +# This tag requires that the tag GENERATE_DOCBOOK is set to YES. + +DOCBOOK_PROGRAMLISTING = NO + #--------------------------------------------------------------------------- # Configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen -# Definitions (see http://autogen.sf.net) file that captures the structure of -# the code including all documentation. Note that this feature is still -# experimental and incomplete at the moment. +# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an +# AutoGen Definitions (see http://autogen.sf.net) file that captures the +# structure of the code including all documentation. Note that this feature is +# still experimental and incomplete at the moment. # The default value is: NO. GENERATE_AUTOGEN_DEF = NO @@ -1851,7 +1966,7 @@ GENERATE_AUTOGEN_DEF = NO # Configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module +# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module # file that captures the structure of the code including all documentation. # # Note that this feature is still experimental and incomplete at the moment. @@ -1859,7 +1974,7 @@ GENERATE_AUTOGEN_DEF = NO GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary +# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary # Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI # output from the Perl module output. # The default value is: NO. @@ -1867,9 +1982,9 @@ GENERATE_PERLMOD = NO PERLMOD_LATEX = NO -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely +# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely # formatted so it can be parsed by a human reader. This is useful if you want to -# understand what is going on. On the other hand, if this tag is set to NO the +# understand what is going on. On the other hand, if this tag is set to NO, the # size of the Perl module output will be much smaller and Perl will parse it # just the same. # The default value is: YES. @@ -1889,14 +2004,14 @@ PERLMOD_MAKEVAR_PREFIX = # Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all +# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all # C-preprocessor directives found in the sources and include files. # The default value is: YES. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names -# in the source code. If set to NO only conditional compilation will be +# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names +# in the source code. If set to NO, only conditional compilation will be # performed. Macro expansion can be done in a controlled way by setting # EXPAND_ONLY_PREDEF to YES. # The default value is: NO. @@ -1912,7 +2027,7 @@ MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = NO -# If the SEARCH_INCLUDES tag is set to YES the includes files in the +# If the SEARCH_INCLUDES tag is set to YES, the include files in the # INCLUDE_PATH will be searched if a #include is found. # The default value is: YES. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. @@ -1955,9 +2070,9 @@ PREDEFINED += "NAMESPACE=@PACKAGE_NAME@" EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will -# remove all refrences to function-like macros that are alone on a line, have an -# all uppercase name, and do not end with a semicolon. Such function macros are -# typically used for boiler-plate code, and will confuse the parser if not +# remove all references to function-like macros that are alone on a line, have +# an all uppercase name, and do not end with a semicolon. Such function macros +# are typically used for boiler-plate code, and will confuse the parser if not # removed. # The default value is: YES. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. @@ -1977,7 +2092,7 @@ SKIP_FUNCTION_MACROS = YES # where loc1 and loc2 can be relative or absolute paths or URLs. See the # section "Linking to external documentation" for more information about the use # of tag files. -# Note: Each tag file must have an unique name (where the name does NOT include +# Note: Each tag file must have a unique name (where the name does NOT include # the path). If a tag file is not located in the directory in which doxygen is # run, you must also specify the path to the tagfile here. @@ -1989,20 +2104,21 @@ TAGFILES = GENERATE_TAGFILE = @PACKAGE_NAME@.doxytag -# If the ALLEXTERNALS tag is set to YES all external class will be listed in the -# class index. If set to NO only the inherited external classes will be listed. +# If the ALLEXTERNALS tag is set to YES, all external class will be listed in +# the class index. If set to NO, only the inherited external classes will be +# listed. # The default value is: NO. ALLEXTERNALS = NO -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in -# the modules index. If set to NO, only the current project's groups will be +# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will be # listed. # The default value is: YES. EXTERNAL_GROUPS = YES -# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in +# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in # the related pages index. If set to NO, only the current project's pages will # be listed. # The default value is: YES. @@ -2019,7 +2135,7 @@ PERL_PATH = /usr/bin/perl # Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram +# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram # (in HTML and LaTeX) for classes with base or super classes. Setting the tag to # NO turns the diagrams off. Note that this option also works with HAVE_DOT # disabled, but it is recommended to install and use dot, since it yields more @@ -2044,7 +2160,7 @@ MSCGEN_PATH = DIA_PATH = -# If set to YES, the inheritance and collaboration graphs will hide inheritance +# If set to YES the inheritance and collaboration graphs will hide inheritance # and usage relations if the target is undocumented or is not a class. # The default value is: YES. @@ -2055,7 +2171,7 @@ HIDE_UNDOC_RELATIONS = NO # http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent # Bell Labs. The other options in this section have no effect if this option is # set to NO -# The default value is: NO. +# The default value is: YES. HAVE_DOT = YES @@ -2069,7 +2185,7 @@ HAVE_DOT = YES DOT_NUM_THREADS = 0 -# When you want a differently looking font n the dot files that doxygen +# When you want a differently looking font in the dot files that doxygen # generates you can specify the font name using DOT_FONTNAME. You need to make # sure dot is able to find the font, which can be done by putting it in a # standard location or by setting the DOTFONTPATH environment variable or by @@ -2117,7 +2233,7 @@ COLLABORATION_GRAPH = YES GROUP_GRAPHS = YES -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. # The default value is: NO. @@ -2169,7 +2285,8 @@ INCLUDED_BY_GRAPH = YES # # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. +# functions only using the \callgraph command. Disabling a call graph can be +# accomplished by means of the command \hidecallgraph. # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. @@ -2180,7 +2297,8 @@ CALL_GRAPH = NO # # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable caller graphs for selected -# functions only using the \callergraph command. +# functions only using the \callergraph command. Disabling a caller graph can be +# accomplished by means of the command \hidecallergraph. # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. @@ -2203,11 +2321,17 @@ GRAPHICAL_HIERARCHY = YES DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. +# generated by dot. For an explanation of the image formats see the section +# output formats in the documentation of the dot tool (Graphviz (see: +# http://www.graphviz.org/)). # Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order # to make the SVG files visible in IE 9+ (other browsers do not have this # requirement). -# Possible values are: png, jpg, gif and svg. +# Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd, +# png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo, +# gif:cairo:gd, gif:gd, gif:gd:gd, svg, png:gd, png:gd:gd, png:cairo, +# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and +# png:gdiplus:gdiplus. # The default value is: png. # This tag requires that the tag HAVE_DOT is set to YES. @@ -2250,6 +2374,24 @@ MSCFILE_DIRS = DIAFILE_DIRS = +# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the +# path where java can find the plantuml.jar file. If left blank, it is assumed +# PlantUML is not used or called during a preprocessing step. Doxygen will +# generate a warning when it encounters a \startuml command in this case and +# will not generate output for the diagram. + +PLANTUML_JAR_PATH = "@top_srcdir@/doc/plantuml.jar" + +# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a +# configuration file for plantuml. + +PLANTUML_CFG_FILE = + +# When using plantuml, the specified paths are searched for files specified by +# the !include statement in a plantuml block. + +PLANTUML_INCLUDE_PATH = + # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes # that will be shown in the graph. If the number of nodes in a graph becomes # larger than this value, doxygen will truncate the graph, which is visualized @@ -2286,14 +2428,14 @@ MAX_DOT_GRAPH_DEPTH = 0 DOT_TRANSPARENT = YES -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) support # this, this feature is disabled by default. # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_MULTI_TARGETS = YES +DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page # explaining the meaning of the various boxes and arrows in the dot generated @@ -2303,7 +2445,7 @@ DOT_MULTI_TARGETS = YES GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot +# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot # files that are used to generate the various graphs. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. diff --git a/doc/makefile.am b/doc/makefile.am index 379ef83..62c33d8 100644 --- a/doc/makefile.am +++ b/doc/makefile.am @@ -1,8 +1,10 @@ ## @id $Id$ -# -# This file has been added by bootstrap.sh on Mon, 13 July 2015 14:22:13 +0200 -# Feel free to change it or even remove and rebuild it, up to your needs -# +## +## This file has been added: +## - by bootstrap.sh +## - on Wed, 21 November 2018 21:41:32 +0100 +## Feel free to change it or even remove and rebuild it, up to your needs +## ## 1 2 3 4 5 6 7 8 ## 45678901234567890123456789012345678901234567890123456789012345678901234567890 diff --git a/makefile.am b/makefile.am index f2f674b..64ed403 100644 --- a/makefile.am +++ b/makefile.am @@ -1,13 +1,26 @@ ## @id $Id$ -# -# This file has been added by bootstrap.sh on Fri, 31 July 2015 08:57:51 +0200 -# Feel free to change it or even remove and rebuild it, up to your needs -# +## +## This file has been added: +## - by bootstrap.sh +## - on Wed, 21 November 2018 16:27:35 +0100 +## Feel free to change it or even remove and rebuild it, up to your needs +## ## 1 2 3 4 5 6 7 8 ## 45678901234567890123456789012345678901234567890123456789012345678901234567890 SUBDIRS = src test doc examples -doc_DATA = AUTHORS NEWS README COPYING INSTALL ChangeLog +desktopdir = ${datadir}/applications +desktop_DATA = @PACKAGE_DESKTOP@ +dist_pkgdata_DATA = @PACKAGE_ICON@ +dist_noinst_DATA = ax_check_qt.m4 bootstrap.sh \ + resolve-rpmbuilddeps.sh autogen.sh \ + ax_cxx_compile_stdcxx.m4 build-in-docker.sh \ + build-resource-file.sh \ + ax_init_standard_project.m4 \ + mac-create-app-bundle.sh resolve-debbuilddeps.sh \ + dependency-graph.sh template.sh \ + sql-to-dot.sed +dist_doc_DATA = AUTHORS NEWS README COPYING INSTALL ChangeLog MAINTAINERCLEANFILES = makefile.in diff --git a/src/xml-cxx/xml.hxx b/src/xml-cxx/xml.hxx index 890e646..37a4717 100644 --- a/src/xml-cxx/xml.hxx +++ b/src/xml-cxx/xml.hxx @@ -23,26 +23,27 @@ #include #include #include -class MethodTrace { - public: - MethodTrace(const void* addr, const std::string& name) throw(): - _addr(addr), _name(name) { - std::clog< List; - Node(std::string name, size_type min=0, size_type max=0) throw(); - Node(const Node& o) throw(); - virtual ~Node() throw(); - virtual Node& operator=(const Node& o) throw(); - virtual std::unique_ptr clone() const throw(); + Node(std::string name, size_type min=0, size_type max=0) noexcept; + Node(const Node& o) noexcept; + virtual ~Node() noexcept; + virtual Node& operator=(const Node& o) noexcept; + virtual std::unique_ptr clone() const noexcept; virtual std::ostream& out(std::ostream& o, unsigned int level=0) const - throw(); - virtual std::string text() const throw(); - virtual Node& text(const std::string& txt) throw(tag_expected, - type_mismatch); - virtual Node& append(const Node& o) throw(cannot_have_children); - virtual Node& remove(Node& n) throw(access_error); - virtual Node& remove(const std::string& n) throw(access_error); - virtual Node& remove(size_type n) throw(out_of_range); - virtual Node& set(const Attributes& o) throw(); + noexcept; + virtual std::string text() const noexcept; + virtual Node& text(const std::string& txt); + virtual Node& append(const Node& o); + virtual Node& remove(Node& n); + virtual Node& remove(const std::string& n); + virtual Node& remove(size_type n); + virtual Node& set(const Attributes& o) noexcept; Node& clear() throw (); - std::string name() const throw(); - Node& name(const std::string& n) throw(); - Node& min(size_type m) throw(); - size_type min() const throw(); - Node& max(size_type m) throw(); - size_type max() const throw(); - bool isChild() const throw(); - Node& parent() const throw(no_parent); - bool hasAttr(const std::string& name) const throw(); - Node& attr(const std::string& name, bool mandatory) throw(); - Node& attr(const std::string& name, const std::string& deflt) throw(); - std::string attr(const std::string& name) const throw(); - std::string& attr(const std::string& name) throw(); - const Attributes::Value attribute(const std::string& name) - const throw(attribute_not_available); - const Attributes& attributes() const throw(); - Attributes& attributes() throw(); - const Node& first() const throw(out_of_range); - Node& first() throw(out_of_range); - const Node& last() const throw(out_of_range); - Node& last() throw(out_of_range); - Node& limits(size_type min=0, size_type max=0) throw(); - List list(const std::string& name) const throw(); - bool operator()(const std::string& child) const throw(); - Node& operator<<(const Node& o) throw(cannot_have_children); - Node& operator<<(const Attributes& o) throw(); - size_type children() const throw(); - const Node& operator[](size_type child) const throw(out_of_range); - Node& operator[](size_type child) throw(out_of_range); - const Node& operator[](const std::string& child) const - throw(access_error); - Node& operator[](const std::string& child) throw(access_error); - std::string operator*() const throw(); - Node& operator=(const std::string& contents) throw(tag_expected, - type_mismatch); - friend std::ostream& operator<<(std::ostream& o, const Node& t) throw(); + std::string name() const noexcept; + Node& name(const std::string& n) noexcept; + Node& min(size_type m) noexcept; + size_type min() const noexcept; + Node& max(size_type m) noexcept; + size_type max() const noexcept; + bool isChild() const noexcept; + Node& parent() const; + bool hasAttr(const std::string& name) const noexcept; + Node& attr(const std::string& name, bool mandatory) noexcept; + Node& attr(const std::string& name, const std::string& deflt) noexcept; + std::string attr(const std::string& name) const noexcept; + std::string& attr(const std::string& name) noexcept; + const Attributes::Value attribute(const std::string& name) const; + const Attributes& attributes() const noexcept; + Attributes& attributes() noexcept; + const Node& first() const; + Node& first(); + const Node& last() const; + Node& last(); + Node& limits(size_type min=0, size_type max=0) noexcept; + List list(const std::string& name) const noexcept; + bool operator()(const std::string& child) const noexcept; + Node& operator<<(const Node& o); + Node& operator<<(const Attributes& o) noexcept; + size_type children() const noexcept; + const Node& operator[](size_type child) const; + Node& operator[](size_type child); + const Node& operator[](const std::string& child) const; + Node& operator[](const std::string& child); + std::string operator*() const noexcept; + Node& operator=(const std::string& contents); + friend std::ostream& operator<<(std::ostream& o, const Node& t) noexcept; protected: Attributes _attributes; private: - Node* find(const std::string& child) const throw(); - virtual std::unique_ptr clone(Node* p) const throw(); + Node* find(const std::string& child) const noexcept; + virtual std::unique_ptr clone(Node* p) const noexcept; Node(); // not implemented Contents _contents; std::string _name; @@ -850,31 +847,30 @@ namespace xml { class String: public Node { public: String(std::string name, - Node::size_type min=0, Node::size_type max=0) throw(); + Node::size_type min=0, Node::size_type max=0) noexcept; String(std::string name, const std::string& text, - Node::size_type min=0, Node::size_type max=0) throw(); - virtual ~String() throw() {} - virtual std::unique_ptr clone() const throw(); - virtual std::string text() const throw(); - virtual String& text(const std::string& txt) throw(tag_expected, - type_mismatch); + Node::size_type min=0, Node::size_type max=0) noexcept; + virtual ~String() noexcept {} + virtual std::unique_ptr clone() const noexcept; + virtual std::string text() const noexcept; + virtual String& text(const std::string& txt); virtual std::ostream& out(std::ostream& o, unsigned int level=0) const - throw(); - virtual String& append(const Node& o) throw(cannot_have_children); - Node& operator=(const std::string& contents) throw(); - operator std::string() const throw(); - operator bool() const throw(); - operator char() const throw(); - operator signed char() const throw(); - operator unsigned char() const throw(); - operator signed short() const throw(); - operator unsigned short() const throw(); - operator signed int() const throw(); - operator unsigned int() const throw(); - operator signed long() const throw(); - operator unsigned long() const throw(); - operator float() const throw(); - operator double() const throw(); + noexcept; + virtual String& append(const Node& o); + Node& operator=(const std::string& contents) noexcept; + operator std::string() const noexcept; + operator bool() const noexcept; + operator char() const noexcept; + operator signed char() const noexcept; + operator unsigned char() const noexcept; + operator signed short() const noexcept; + operator unsigned short() const noexcept; + operator signed int() const noexcept; + operator unsigned int() const noexcept; + operator signed long() const noexcept; + operator unsigned long() const noexcept; + operator float() const noexcept; + operator double() const noexcept; protected: std::string _text; }; @@ -884,13 +880,12 @@ namespace xml { class UnsignedInteger: public String { public: UnsignedInteger(std::string name, unsigned long i=0, - size_type min=0, size_type max=0) throw(); - virtual std::unique_ptr clone() const throw(); - virtual ~UnsignedInteger() throw() {} - virtual UnsignedInteger& text(const std::string& txt) - throw(tag_expected, type_mismatch); - unsigned long number() const throw(); - static unsigned long number(const Node& node) throw(); + size_type min=0, size_type max=0) noexcept; + virtual std::unique_ptr clone() const noexcept; + virtual ~UnsignedInteger() noexcept {} + virtual UnsignedInteger& text(const std::string& txt); + unsigned long number() const noexcept; + static unsigned long number(const Node& node) noexcept; }; //---------------------------------------------------------------------------- @@ -942,26 +937,19 @@ namespace xml { @endverbatim */ class Factory { public: - Factory(const Node& t) throw(); - Factory() throw(); - Factory& operator=(const Node& t) throw(); - Factory& append(const Node& node) throw(); - const Node& operator*() const throw(factory_not_valid); - const Node*const operator->() const throw(factory_not_valid); - operator bool() const throw(); + Factory(const Node& t) noexcept; + Factory() noexcept; + Factory& operator=(const Node& t) noexcept; + Factory& append(const Node& node) noexcept; + const Node& operator*() const; + const Node* operator->() const; + operator bool() const noexcept; friend std::ostream& operator<<(std::ostream& os, - const Factory& factory) - throw(factory_not_valid); + const Factory& factory); static std::ostream& print(std::ostream& os, const Node& node, - unsigned int level=0) throw(); - std::unique_ptr read(std::istream& is) - throw(wrong_end_tag, wrong_start_tag, tag_expected, type_mismatch, - second_slash_in_tag, character_after_slash, - missing_end_tag, attribute_value_not_quoted, access_error, - duplicate_attribute, attributes_in_end_tag, - illegal_attribute, mandatory_attribute_missing, - wrong_node_number, factory_not_valid); - void reset() throw(); + unsigned int level=0) noexcept; + std::unique_ptr read(std::istream& is); + void reset() noexcept; private: friend class stream_error; friend class Serialize; @@ -969,33 +957,21 @@ namespace xml { template friend class Container; template friend class AssociativeContainer; template friend class AssociativeMap; - Node& operator*() throw(factory_not_valid); - Node*const operator->() throw(factory_not_valid); - bool ws(char c) throw(); - std::unique_ptr read(std::istream& is, const Node& position) - throw(wrong_end_tag, wrong_start_tag, tag_expected, type_mismatch, - second_slash_in_tag, character_after_slash, - missing_end_tag, - attribute_value_not_quoted, access_error, duplicate_attribute, - attributes_in_end_tag, - illegal_attribute, mandatory_attribute_missing, - wrong_node_number); + Node& operator*(); + Node* operator->(); + bool ws(char c) noexcept; + std::unique_ptr read(std::istream& is, const Node& position); std::unique_ptr checkChildren(const xml::Node& tpl, std::unique_ptr node, - std::istream& is) const - throw(wrong_node_number); - Tag tag(std::istream& is, const Node& position) - throw(second_slash_in_tag, wrong_start_tag, character_after_slash, - missing_end_tag, attributes_in_end_tag, tag_expected, - attribute_value_not_quoted, access_error, duplicate_attribute, - illegal_attribute, mandatory_attribute_missing); + std::istream& is) const; + Tag tag(std::istream& is, const Node& position); Node _template; unsigned long _line; long _open; }; //@} - /*! @defgroup serialization Class Serialization + /*! @defgroup groupserialization Class Serialization @section serIntro Introduction @@ -1096,7 +1072,7 @@ namespace xml { - ... the child does not inherit xml::Serialize, but a child of it - ... the child must first call xml::Serialize::initXmlMembers of the parent in it's own xml::Serialize::initXmlMembers */ - //! @addtogroup serialization + //! @addtogroup groupserialization //@{ class Serialize { @@ -1105,50 +1081,50 @@ namespace xml { typedef bool(*ToNodeFunc)(const Any, xml::Node&); typedef bool(*ClearFunc)(Any); //! You must call Serialize::className() if you use this constructor! - Serialize() throw(); - Serialize(const std::string& className) throw(); - Serialize(const Serialize& other) throw(); + Serialize() noexcept; + Serialize(const std::string& className) noexcept; + Serialize(const Serialize& other) noexcept; virtual ~Serialize(); - Serialize& operator=(const Serialize& other) throw(); - virtual Serialize& className(const std::string& name) throw(); + Serialize& operator=(const Serialize& other) noexcept; + virtual Serialize& className(const std::string& name) noexcept; Serialize& persist(Serialize& member, - const std::string& name) throw(); + const std::string& name) noexcept; Serialize& persist(bool& member, - const std::string& name) throw(); + const std::string& name) noexcept; Serialize& persist(char& member, - const std::string& name) throw(); + const std::string& name) noexcept; Serialize& persist(unsigned char& member, - const std::string& name) throw(); + const std::string& name) noexcept; Serialize& persist(signed char& member, - const std::string& name) throw(); + const std::string& name) noexcept; Serialize& persist(unsigned short& member, - const std::string& name) throw(); + const std::string& name) noexcept; Serialize& persist(signed short& member, - const std::string& name) throw(); + const std::string& name) noexcept; Serialize& persist(unsigned int& member, - const std::string& name) throw(); + const std::string& name) noexcept; Serialize& persist(signed int& member, - const std::string& name) throw(); + const std::string& name) noexcept; Serialize& persist(unsigned long& member, - const std::string& name) throw(); + const std::string& name) noexcept; Serialize& persist(signed long& member, - const std::string& name) throw(); + const std::string& name) noexcept; Serialize& persist(float& member, - const std::string& name) throw(); + const std::string& name) noexcept; Serialize& persist(double& member, - const std::string& name) throw(); + const std::string& name) noexcept; Serialize& persist(std::string& member, - const std::string& name) throw(); + const std::string& name) noexcept; virtual std::ostream& saveXml(std::ostream& os, const std::string& name = std::string()) - const throw(); + const noexcept; virtual std::istream& loadXml(std::istream& is, const std::string& name = std::string()); - std::string schema() const throw(); + std::string schema() const noexcept; static void registerFromNode(FromNodeFunc fromNodeFunc); static void registerToNode(ToNodeFunc toNodeFunc); static void registerClear(ClearFunc clearFunc); - virtual void clear() throw(); + virtual void clear(); protected: virtual void initXmlMembers(); void checkInit(const Serialize* const ser=0) const { @@ -1166,13 +1142,13 @@ namespace xml { const xml::Node& node); template friend bool assigntoNode(Any member, const xml::Node& node); - virtual bool optional() const throw(); - void clear(Any member) throw(); - void reset() throw(); - void copy(const Serialize& o) throw(); + virtual bool optional() const noexcept; + void clear(Any member); + void reset() noexcept; + void copy(const Serialize& o) noexcept; template Serialize& persistSimpleType(TYPE& member, - const std::string& name) throw() { + const std::string& name) noexcept { _xmlNames[name] = &member; xml::Node schema(*_xmlFactory); schema< class Optional: public Serialize { public: - Optional() throw(): _valid(false) {} - Optional(const Optional& o) throw(): + Optional() noexcept: _valid(false) {} + Optional(const Optional& o) noexcept: _member(o._member), _valid(o.valid) { } - Optional(const TYPE& mem) throw(): + Optional(const TYPE& mem) noexcept: _member(mem), _valid(true) { } - virtual ~Optional() throw() {} - Optional& operator=(const Optional& o) throw() { + virtual ~Optional() noexcept {} + Optional& operator=(const Optional& o) noexcept { _member = o._member; _valid = o._valid; return *this; } - Optional& operator=(const TYPE& mem) throw() { + Optional& operator=(const TYPE& mem) noexcept { _member = mem; _valid = true; return *this; } - operator bool() const throw() { + operator bool() const noexcept { return _valid; } - const TYPE& operator*() const throw() { + const TYPE& operator*() const noexcept { return _member; } - TYPE& operator*() throw() { + TYPE& operator*() noexcept { return _member; } - const TYPE*const operator->() const throw() { + const TYPE* operator->() const noexcept { return &_member; } - TYPE*const operator->() throw() { + TYPE* operator->() noexcept { return &_member; } - virtual void clear() throw() { + virtual void clear() noexcept { _valid = false; } - virtual Optional& className(const std::string& name) throw() { + virtual Optional& className(const std::string& name) noexcept { if (!_xmlFactory) { Serialize::className(name); persist(_member, name); @@ -1238,7 +1214,7 @@ namespace xml { return *this; } protected: - virtual bool optional() const throw() { + virtual bool optional() const noexcept { return true; } virtual void fromNode(Any member, const xml::Node& node) { @@ -1258,7 +1234,7 @@ namespace xml { bool _valid; }; - //! @addtogroup serialization + //! @addtogroup groupserialization //@{ /*! @defgroup serContainer Serialization of Container @@ -1295,7 +1271,7 @@ namespace xml { public: Container() {} Container(const Container& o): CONTAINER_TYPE(o), Serialize(o) {} - Container(const std::string& className) throw(): Serialize(className) {} + Container(const std::string& className) noexcept: Serialize(className) {} virtual ~Container() {} virtual std::istream& loadXml(std::istream& is, const std::string& name = std::string()) { @@ -1313,7 +1289,7 @@ namespace xml { } virtual std::ostream& saveXml(std::ostream& os, const std::string& name = std::string()) - const throw() { + const noexcept { checkInit(); xml::Node node(*_xmlFactory); if (name.size()) node.name(name); @@ -1344,7 +1320,7 @@ namespace xml { persist(tmp, itemName); // add as child of dummyroot (*_xmlFactory)[0].limits(0, 0); // any number of children possible } - virtual void clear() throw() { + virtual void clear() noexcept { CONTAINER_TYPE::clear(); } }; @@ -1357,7 +1333,7 @@ namespace xml { AssociativeContainer(const AssociativeContainer& o): CONTAINER_TYPE(o), Serialize(o) { } - AssociativeContainer(const std::string& className) throw(): + AssociativeContainer(const std::string& className) noexcept: Serialize(className) { } virtual ~AssociativeContainer() {} @@ -1377,7 +1353,7 @@ namespace xml { } virtual std::ostream& saveXml(std::ostream& os, const std::string& name = std::string()) - const throw() { + const noexcept { checkInit(); xml::Node node(*_xmlFactory); if (name.size()) node.name(name); @@ -1411,7 +1387,7 @@ namespace xml { persist(tmp, itemName); // add as child of dummyroot (*_xmlFactory)[0].limits(0, 0); // any number of children possible } - virtual void clear() throw() { + virtual void clear() noexcept { CONTAINER_TYPE::clear(); } }; @@ -1424,7 +1400,7 @@ namespace xml { AssociativeMap(const AssociativeMap& o): CONTAINER_TYPE(o), Serialize(o) { } - AssociativeMap(const std::string& className) throw(): + AssociativeMap(const std::string& className) noexcept: Serialize(className) { } virtual ~AssociativeMap() {} @@ -1446,7 +1422,7 @@ namespace xml { } virtual std::ostream& saveXml(std::ostream& os, const std::string& name = std::string()) - const throw() { + const noexcept { checkInit(); xml::Node node(*_xmlFactory); if (name.size()) node.name(name); @@ -1492,7 +1468,7 @@ namespace xml { (*_xmlFactory)[0].limits(0, 0); // any number of children possible (*_xmlFactory)[1].limits(0, 0); // any number of children possible } - virtual void clear() throw() { + virtual void clear() noexcept { CONTAINER_TYPE::clear(); } }; @@ -1516,18 +1492,18 @@ namespace xml { CONTAINER(const CONTAINER& o): \ Container >(o) { \ } \ - CONTAINER(const std::string& className) throw(): \ + CONTAINER(const std::string& className) noexcept: \ Container >(className) { \ } \ virtual ~CONTAINER() {} \ }; \ } # include -__XML_CXX_DECLARE_CONTAINER_CLASS__(List, std::list); +__XML_CXX_DECLARE_CONTAINER_CLASS__(List, std::list) # include -__XML_CXX_DECLARE_CONTAINER_CLASS__(Vector, std::vector); +__XML_CXX_DECLARE_CONTAINER_CLASS__(Vector, std::vector) # include -__XML_CXX_DECLARE_CONTAINER_CLASS__(Deque, std::deque); +__XML_CXX_DECLARE_CONTAINER_CLASS__(Deque, std::deque) # undef __XML_CXX_DECLARE_CONTAINER_CLASS__ # define __XML_CXX_DECLARE_CONTAINER_CLASS__(CONTAINER, STD_CONTAINER) \ namespace xml { \ @@ -1541,7 +1517,7 @@ __XML_CXX_DECLARE_CONTAINER_CLASS__(Deque, std::deque); AssociativeContainer \ >(o) { \ } \ - CONTAINER(const std::string& className) throw(): \ + CONTAINER(const std::string& className) noexcept: \ AssociativeContainer \ > \ (className) { \ @@ -1550,9 +1526,9 @@ __XML_CXX_DECLARE_CONTAINER_CLASS__(Deque, std::deque); }; \ } # include -__XML_CXX_DECLARE_CONTAINER_CLASS__(Stack, std::stack); +__XML_CXX_DECLARE_CONTAINER_CLASS__(Stack, std::stack) # include -__XML_CXX_DECLARE_CONTAINER_CLASS__(Queue, std::queue); +__XML_CXX_DECLARE_CONTAINER_CLASS__(Queue, std::queue) # undef __XML_CXX_DECLARE_CONTAINER_CLASS__ # define __XML_CXX_DECLARE_CONTAINER_CLASS__(CONTAINER, STD_CONTAINER) \ namespace xml { \ @@ -1569,7 +1545,7 @@ __XML_CXX_DECLARE_CONTAINER_CLASS__(Queue, std::queue); AssociativeContainer \ >(o) { \ } \ - CONTAINER(const std::string& className) throw(): \ + CONTAINER(const std::string& className) noexcept: \ AssociativeContainer \ > \ (className) { \ @@ -1577,7 +1553,7 @@ __XML_CXX_DECLARE_CONTAINER_CLASS__(Queue, std::queue); virtual ~CONTAINER() {} \ }; \ } -__XML_CXX_DECLARE_CONTAINER_CLASS__(PriorityQueue, std::priority_queue); +__XML_CXX_DECLARE_CONTAINER_CLASS__(PriorityQueue, std::priority_queue) # undef __XML_CXX_DECLARE_CONTAINER_CLASS__ # define __XML_CXX_DECLARE_CONTAINER_CLASS__(CONTAINER, STD_CONTAINER) \ namespace xml { \ @@ -1592,7 +1568,7 @@ __XML_CXX_DECLARE_CONTAINER_CLASS__(PriorityQueue, std::priority_queue); AssociativeContainer \ >(o) { \ } \ - CONTAINER(const std::string& className) throw(): \ + CONTAINER(const std::string& className) noexcept: \ AssociativeContainer \ > \ (className) { \ @@ -1601,8 +1577,8 @@ __XML_CXX_DECLARE_CONTAINER_CLASS__(PriorityQueue, std::priority_queue); }; \ } # include -__XML_CXX_DECLARE_CONTAINER_CLASS__(Set, std::set); -__XML_CXX_DECLARE_CONTAINER_CLASS__(MultiSet, std::multiset); +__XML_CXX_DECLARE_CONTAINER_CLASS__(Set, std::set) +__XML_CXX_DECLARE_CONTAINER_CLASS__(MultiSet, std::multiset) # undef __XML_CXX_DECLARE_CONTAINER_CLASS__ # define __XML_CXX_DECLARE_CONTAINER_CLASS__(CONTAINER, STD_CONTAINER) \ namespace xml { \ @@ -1616,7 +1592,7 @@ __XML_CXX_DECLARE_CONTAINER_CLASS__(MultiSet, std::multiset); AssociativeMap \ >(o) { \ } \ - CONTAINER(const std::string& className) throw(): \ + CONTAINER(const std::string& className) noexcept: \ AssociativeMap \ > \ (className) { \ @@ -1625,8 +1601,8 @@ __XML_CXX_DECLARE_CONTAINER_CLASS__(MultiSet, std::multiset); }; \ } # include -__XML_CXX_DECLARE_CONTAINER_CLASS__(Map, std::map); -__XML_CXX_DECLARE_CONTAINER_CLASS__(MultiMap, std::multimap); +__XML_CXX_DECLARE_CONTAINER_CLASS__(Map, std::map) +__XML_CXX_DECLARE_CONTAINER_CLASS__(MultiMap, std::multimap) # undef __XML_CXX_DECLARE_CONTAINER_CLASS__ //@} //! @endcond diff --git a/src/xml.cxx b/src/xml.cxx index 192bab1..91e8b86 100644 --- a/src/xml.cxx +++ b/src/xml.cxx @@ -12,28 +12,29 @@ #include #include -unsigned int MethodTrace::_level(0); namespace xml { + unsigned int MethodTrace::_level(0); + //================================================================= EXCEPTIONS //---------------------------------------------------------------------------- - exception::exception(std::string reason) throw(): + exception::exception(std::string reason) noexcept: _what(reason), _node(0) { } - exception::exception(std::string reason, const Node& t) throw(): + exception::exception(std::string reason, const Node& t) noexcept: _what(reason), _node(t.clone().release()) { } - exception::~exception() throw() { + exception::~exception() noexcept { delete _node; } - void exception::line(unsigned long line) throw() { + void exception::line(unsigned long line) noexcept { std::stringstream ss; ss<name(); @@ -81,17 +82,17 @@ namespace xml { } //---------------------------------------------------------------------------- stream_error::stream_error(const std::string& reason, const Node& t, - std::istream& is, const Tag& tag, char c) throw(): + std::istream& is, const Tag& tag, char c) noexcept: exception(reason, t), _pos(is.tellg()), _tag(new Tag(tag)), _char(c) { } stream_error::stream_error(const std::string& reason, const Node& t, - std::istream& is) throw(): + std::istream& is) noexcept: exception(reason, t), _pos(is.tellg()), _tag(0), _char(0) { } - stream_error::~stream_error() throw() { + stream_error::~stream_error() noexcept { delete _tag; } - const char* stream_error::what() const throw() { + const char* stream_error::what() const noexcept { static std::string w; if (!w.size()) { std::stringstream ss; @@ -117,67 +118,67 @@ namespace xml { //---------------------------------------------------------------------------- //! Copy an attribute. - Attributes::Value::Value(const value_type& o) throw(): + Attributes::Value::Value(const value_type& o) noexcept: Attributes::value_type(o) { } //! Construct an empty attribute. - Attributes::Value::Value(const std::string& name) throw(): + Attributes::Value::Value(const std::string& name) noexcept: Attributes::value_type(name, std::string()) { } //! Construct an attribute with name an value. Attributes::Value::Value(const std::string& name, - const std::string& value) throw(): + const std::string& value) noexcept: Attributes::value_type(name, value) { } //! Assign a value. Attributes::Value& Attributes::Value::operator=(const std::string& value) - throw() { + noexcept { second = value; return *this; } //! Get the attribute name. - const std::string& Attributes::Value::name() const throw() { + const std::string& Attributes::Value::name() const noexcept { return first; } //! Get the attribute value. - const std::string& Attributes::Value::value() const throw() { + const std::string& Attributes::Value::value() const noexcept { return second; } //! Get the attribute value. - std::string& Attributes::Value::value() throw() { + std::string& Attributes::Value::value() noexcept { return second; } //! Convert the attribute to a boolean. /*! @return @c true if the value is set and not equal to one of: @c false @c no @c 0. */ - Attributes::Value::operator bool() const throw() { + Attributes::Value::operator bool() const noexcept { return bool(); } //! Convert the attribute to a boolean. /*! @return @c true if the value is set and not equal to one of: @c false @c no @c 0. */ - bool Attributes::Value::toBool() const throw() { + bool Attributes::Value::toBool() const noexcept { return !(!second.size()||second=="false"||second=="no"||second=="0"); } //! Convert the attribute to a number. - Attributes::Value::operator unsigned long() const throw() { + Attributes::Value::operator unsigned long() const noexcept { return toNumber(); } //! Convert the attribute to a number. - unsigned long Attributes::Value::toNumber() const throw() { + unsigned long Attributes::Value::toNumber() const noexcept { std::stringstream ss(second); int i(0); ss>>i; return i; } //! Convert the attribute to a space separated list. - Attributes::Value::operator List() const throw() { + Attributes::Value::operator List() const noexcept { return toList(); } //! Convert the attribute to list. /*! @param separators a string containing a list of valid separators */ Attributes::List Attributes::Value::toList(const std::string& separators) - const throw() { + const noexcept { List l; for (std::string::size_type it(0), pos(0); it!=std::string::npos && @@ -193,30 +194,30 @@ namespace xml { /*! @copydoc xml::Attributes::Value::toList @return the first element of the list. */ std::string Attributes::Value::front(const std::string& separators) const - throw(empty_attribute_list) { + { List l(toList(separators)); if (!l.size()) throw empty_attribute_list(first); return l.front(); } //---------------------------------------------------------------------------- //! Empty attribute list - Attributes::Attributes() throw() {} + Attributes::Attributes() noexcept {} //! Attribute list with first one empty attribute given. - Attributes::Attributes(const std::string& empty) throw() { + Attributes::Attributes(const std::string& empty) noexcept { insert(Value(empty)); } //! Attribute list with first attribute given. Attributes::Attributes(const std::string& key, - const std::string& value) throw() { + const std::string& value) noexcept { insert(Value(key, value)); } //! Add a new key-value pair to the attribute list. - Attributes& Attributes::operator<<(const Attributes::Value& v) throw() { + Attributes& Attributes::operator<<(const Attributes::Value& v) noexcept { insert(v); return *this; } //! Add a new empty key to the attribute list. - Attributes& Attributes::operator<<(const std::string& key) throw() { + Attributes& Attributes::operator<<(const std::string& key) noexcept { insert(Value(key)); return *this; } @@ -226,28 +227,28 @@ namespace xml { constructor. @copydoc xml::Node::limits */ Node::Node(std::string name, - Node::size_type min, Node::size_type max) throw(): + Node::size_type min, Node::size_type max) noexcept: _name(name), _parent(0), _min(min), _max(max) { } //! Copy node, reset parent. /*! The parent is reset, the node does not belong to the same parent as the source of the copy. @see xml::Node::clone() for more information on the parenting. */ - Node::Node(const Node& o) throw(): + Node::Node(const Node& o) noexcept: _attributes(o._attributes), _name(o.name()), _parent(0), _min(o._min), _max(o._max) { for (Contents::const_iterator it(o._contents.begin()); it!=o._contents.end(); ++it) _contents.push_back((*it)->clone(this).release()); } - Node::~Node() throw() { + Node::~Node() noexcept { clear(); } //! Assign new node, keep parent. /*! The parent remains unchanged, the node does not belong to the same parent as the source of the copy. @see xml::Node::clone() for more information on the parenting. */ - Node& Node::operator=(const Node& o) throw() { + Node& Node::operator=(const Node& o) noexcept { clear(); _attributes=o._attributes; _name = o.name(); @@ -272,7 +273,7 @@ namespace xml { The user of this library doesn't have to and is not able to care about the parenting. */ - std::unique_ptr Node::clone() const throw() { + std::unique_ptr Node::clone() const noexcept { std::unique_ptr res(new Node(*this)); res->_parent = 0; return res; @@ -281,7 +282,7 @@ namespace xml { /*! Streams the node including all attributes and children. It is formatted with new-lines and tabulator indentation for human readability. */ - std::ostream& Node::out(std::ostream& o, unsigned int level) const throw() { + std::ostream& Node::out(std::ostream& o, unsigned int level) const noexcept { if (_contents.size()) { o<=children()) throw out_of_range(*this, n); _contents.erase(_contents.begin()+n); return *this; } //! Set a list of attributes. /*! Existing attributes with the same name are overwritten. */ - Node& Node::set(const Attributes& o) throw() { + Node& Node::set(const Attributes& o) noexcept { _attributes.clear(); _attributes.insert(o.begin(), o.end()); return *this; @@ -359,47 +360,47 @@ namespace xml { return *this; } //! Get the node's tag name. - std::string Node::name() const throw() { + std::string Node::name() const noexcept { return _name; } //! Set a new node's tag name. - Node& Node::name(const std::string& n) throw() { + Node& Node::name(const std::string& n) noexcept { _name = n; return *this; } //! Set minimum number of instances (in a xml::Factory). /*! @copydoc limits */ - Node& Node::min(Node::size_type m) throw() { + Node& Node::min(Node::size_type m) noexcept { _min = m; return *this; } //! Get minimum number of instances (in a xml::Factory). /*! @copydoc limits */ - Node::size_type Node::min() const throw() { + Node::size_type Node::min() const noexcept { return _min; } //! Set maximum number of instances (in a xml::Factory). /*! @copydoc limits */ - Node& Node::max(Node::size_type m) throw() { + Node& Node::max(Node::size_type m) noexcept { _max = m; return *this; } //! Get maximum number of instances (in a xml::Factory). /*! @copydoc limits */ - Node::size_type Node::max() const throw() { + Node::size_type Node::max() const noexcept { return _max; } //! @c true if node has a parent. - bool Node::isChild() const throw() { + bool Node::isChild() const noexcept { return _parent; } //! Get the parent node. - Node& Node::parent() const throw(no_parent) { + Node& Node::parent() const { if (!_parent) throw no_parent(*this); return *_parent; } //! Check if a specific attribute is set or not. - bool Node::hasAttr(const std::string& name) const throw() { + bool Node::hasAttr(const std::string& name) const noexcept { return _attributes.find(name)!=_attributes.end(); } //! Declare an attribute template and specify whether it is mandatory @@ -410,8 +411,8 @@ namespace xml { If a factory reads from a stream, it verifies that only optional or mandatory attributes are given and that mandatory attributes are specified. Otherwise reading throws an exception. */ - Node& Node::attr(const std::string& name, bool mandatory) throw() { - _attributes[name] = mandatory?"xml::mandatory":"xml::optional"; + Node& Node::attr(const std::string& name, bool m) noexcept { + _attributes[name] = m?"xml::mandatory":"xml::optional"; return *this; } //! Declare an attribute with given value. @@ -422,20 +423,20 @@ namespace xml { @endcode If a factory reads from a stream and the specified attribute is not given, it is set to @c deflt. */ - Node& Node::attr(const std::string& name, const std::string& deflt) throw() { + Node& Node::attr(const std::string& name, const std::string& deflt) noexcept { _attributes[name] = deflt; return *this; } //! Get an attribute. /*! Returns the attribute's value (empty if the attribute is not set) */ - std::string Node::attr(const std::string& name) const throw() { + std::string Node::attr(const std::string& name) const noexcept { Attributes::const_iterator it(_attributes.find(name)); if (it!=_attributes.end()) return it->second; return std::string(); } //! Get an attribute. /*! Returns the attribute's value (empty if the attribute is not set) */ - std::string& Node::attr(const std::string& name) throw() { + std::string& Node::attr(const std::string& name) noexcept { return _attributes[name]; } //! Get an attribute. @@ -444,23 +445,23 @@ namespace xml { conversions or other methods as specified in xml::Attributes::Value. */ const Attributes::Value Node::attribute(const std::string& name) - const throw(attribute_not_available) { + const { Attributes::const_iterator it(_attributes.find(name)); if (it!=_attributes.end()) return *it; throw attribute_not_available(*this, name); } //! Get the list of attributes. - const Attributes& Node::attributes() const throw() { + const Attributes& Node::attributes() const noexcept { return _attributes; } //! Get the list of attributes. - Attributes& Node::attributes() throw() { + Attributes& Node::attributes() noexcept { return _attributes; } //! Get the first child node /*! Returns the first child node or throws an exception, if there are no children. */ - Node& Node::first() throw(out_of_range) { + Node& Node::first() { Contents::iterator it(_contents.begin()); if (it==_contents.end()) throw out_of_range(*this, 0); return **it; @@ -468,7 +469,7 @@ namespace xml { //! Get the first child node /*! Returns the first child node or throws an exception, if there are no children. */ - const Node& Node::first() const throw(out_of_range) { + const Node& Node::first() const { Contents::const_iterator it(_contents.begin()); if (it==_contents.end()) throw out_of_range(*this, 0); return **it; @@ -476,7 +477,7 @@ namespace xml { //! Get the last child node /*! Returns the last child node or throws an exception, if there are no children. */ - const Node& Node::last() const throw(out_of_range) { + const Node& Node::last() const { Contents::const_reverse_iterator it(_contents.rbegin()); if (it==_contents.rend()) throw out_of_range(*this, 0); return **it; @@ -484,7 +485,7 @@ namespace xml { //! Get the last child node /*! Returns the last child node or throws an exception, if there are no children. */ - Node& Node::last() throw(out_of_range) { + Node& Node::last() { Contents::reverse_iterator it(_contents.rbegin()); if (it==_contents.rend()) throw out_of_range(*this, 0); return **it; @@ -513,13 +514,13 @@ namespace xml { Default is no limits: 0..n, which means that the node is optional and may be instatiated multiple (infinite, unlimited) times. */ - Node& Node::limits(size_type min, size_type max) throw() { + Node& Node::limits(size_type min, size_type max) noexcept { _min = min; _max = max; return *this; } //! Get all immediate children of a given node name. - Node::List Node::list(const std::string& name) const throw() { + Node::List Node::list(const std::string& name) const noexcept { List res; for (Contents::const_iterator it(_contents.begin()); it!=_contents.end(); ++it) @@ -527,34 +528,34 @@ namespace xml { return res; } //! Check if at least one child node of a given name exists. - bool Node::operator()(const std::string& child) const throw() { + bool Node::operator()(const std::string& child) const noexcept { return find(child); } //! Append a child at the end. /*! @copydoc xml::Node::append */ - Node& Node::operator<<(const Node& o) throw(cannot_have_children) { + Node& Node::operator<<(const Node& o) { return append(o); } //! Add an empty attribute. /*! @copydoc xml::Node::set */ - Node& Node::operator<<(const Attributes& o) throw() { + Node& Node::operator<<(const Attributes& o) noexcept { return set(o); } //! Get the number of children. - Node::size_type Node::children() const throw() { + Node::size_type Node::children() const noexcept { return _contents.size(); } //! Get a child by child-number (the n-th child). /*! @param child number of the child to return: child>=0 and child<xml::Node::children() */ const Node& Node::operator[](Node::size_type child) const - throw(out_of_range) try { + try { return *_contents.at(child); } catch (...) { throw out_of_range(*this, child); } /*! @copydoc xml::Node::operator[](Node::size_type child) const */ - Node& Node::operator[](Node::size_type child) throw(out_of_range) try { + Node& Node::operator[](Node::size_type child) try { return *_contents.at(child); } catch (...) { throw out_of_range(*this, child); @@ -562,37 +563,36 @@ namespace xml { //! Get the first child of a given node name. /*! @return the first child with matching node name */ const Node& Node::operator[](const std::string& child) const - throw(access_error) { + { const Node* const t(find(child)); if (!t) throw access_error(*this, child); return *t; } /*! @copydoc xml::Node::operator[](const std::string& child) const */ - Node& Node::operator[](const std::string& child) throw(access_error) { + Node& Node::operator[](const std::string& child) { Node* const t(find(child)); if (!t) throw access_error(*this, child); return *t; } //! Get the textual contents of a node. /*! @copydoc xml::Node::text() */ - std::string Node::operator*() const throw() { + std::string Node::operator*() const noexcept { return text(); } //! Set a text (forbidden in xml::Node) /*! @copydoc xml::Node::text(const std::string& txt) */ - Node& Node::operator=(const std::string& contents) throw(tag_expected, - type_mismatch) { + Node& Node::operator=(const std::string& contents) { return text(contents); } //! Write node in XML format to a stream. /*! @copydoc xml::Node::out */ - std::ostream& operator<<(std::ostream& o, const Node& t) throw() { + std::ostream& operator<<(std::ostream& o, const Node& t) noexcept { return t.out(o); } //! Get a pointer to the first child of a given node name. /*! This method does not throw an exception if the element does not exist, but returns @c 0. */ - Node* Node::find(const std::string& child) const throw() { + Node* Node::find(const std::string& child) const noexcept { for (Contents::const_iterator it(_contents.begin()); it!=_contents.end(); ++it) { if ((*it)->name()==child) return *it; @@ -600,7 +600,7 @@ namespace xml { return 0; } //! Clone a node, but assign a new parent. - std::unique_ptr Node::clone(Node* p) const throw() { + std::unique_ptr Node::clone(Node* p) const noexcept { std::unique_ptr c(clone()); c->_parent = p; return c; @@ -610,30 +610,29 @@ namespace xml { /*! @copydoc Node::Node(std::string name, Node::size_type min, Node::size_type max) */ String::String(std::string name, - Node::size_type min, Node::size_type max) throw(): + Node::size_type min, Node::size_type max) noexcept: Node(name, min, max) { } //! Pass the text in the node. /*! @copydoc Node::Node(std::string name, Node::size_type min, Node::size_type max) */ String::String(std::string name, const std::string& text, - Node::size_type min, Node::size_type max) throw(): + Node::size_type min, Node::size_type max) noexcept: Node(name, min, max), _text(text) { } - std::unique_ptr String::clone() const throw() { + std::unique_ptr String::clone() const noexcept { return std::unique_ptr(new String(*this)); } - std::string String::text() const throw() { + std::string String::text() const noexcept { return _text; } //! An xml::String contains text: Set the text. /*! Never throws an exception. */ - String& String::text(const std::string& txt) throw(tag_expected, - type_mismatch) { + String& String::text(const std::string& txt) { _text = txt; return *this; } - std::ostream& String::out(std::ostream& o, unsigned int level) const throw() { + std::ostream& String::out(std::ostream& o, unsigned int level) const noexcept { if (_text.size()) { o<>res; return res; } - String::operator char() const throw() { + String::operator char() const noexcept { char res; std::stringstream ss(text()); ss>>res; return res; } - String::operator signed char() const throw() { + String::operator signed char() const noexcept { signed char res; std::stringstream ss(text()); ss>>res; return res; } - String::operator unsigned char() const throw() { + String::operator unsigned char() const noexcept { unsigned char res; std::stringstream ss(text()); ss>>res; return res; } - String::operator signed short() const throw() { + String::operator signed short() const noexcept { signed short res; std::stringstream ss(text()); ss>>res; return res; } - String::operator unsigned short() const throw() { + String::operator unsigned short() const noexcept { unsigned short res; std::stringstream ss(text()); ss>>res; return res; } - String::operator signed int() const throw() { + String::operator signed int() const noexcept { signed int res; std::stringstream ss(text()); ss>>res; return res; } - String::operator unsigned int() const throw() { + String::operator unsigned int() const noexcept { unsigned int res; std::stringstream ss(text()); ss>>res; return res; } - String::operator signed long() const throw() { + String::operator signed long() const noexcept { signed long res; std::stringstream ss(text()); ss>>res; return res; } - String::operator unsigned long() const throw() { + String::operator unsigned long() const noexcept { unsigned long res; std::stringstream ss(text()); ss>>res; return res; } - String::operator float() const throw() { + String::operator float() const noexcept { float res; std::stringstream ss(text()); ss>>res; return res; } - String::operator double() const throw() { + String::operator double() const noexcept { double res; std::stringstream ss(text()); ss>>res; @@ -737,16 +736,16 @@ namespace xml { /*! @copydoc Node::Node(std::string name, Node::size_type min, Node::size_type max) */ UnsignedInteger::UnsignedInteger(std::string name, unsigned long i, - size_type min, size_type max) throw(): + size_type min, size_type max) noexcept: String(name, mrw::string(i), min, max) { } - std::unique_ptr UnsignedInteger::clone() const throw() { + std::unique_ptr UnsignedInteger::clone() const noexcept { return std::unique_ptr(new UnsignedInteger(*this)); } //! An xml::UnsignedInteger must only contain an number. /*! En exception is thrown, if the contents does not match a number. */ UnsignedInteger& UnsignedInteger::text(const std::string& txt) - throw(tag_expected, type_mismatch) { + { std::string::size_type start(txt.find_first_not_of(" \t\n\r")), last(txt.find_last_not_of(" \t\n\r")); @@ -766,11 +765,11 @@ namespace xml { return *this; } //! Returns the contents as number. - unsigned long UnsignedInteger::number() const throw() { + unsigned long UnsignedInteger::number() const noexcept { return number(*this); } //! Returns the contents as number. - unsigned long UnsignedInteger::number(const Node& node) throw() { + unsigned long UnsignedInteger::number(const Node& node) noexcept { unsigned long i(0); std::stringstream ss(node.text()); ss>>i; @@ -779,50 +778,51 @@ namespace xml { //---------------------------------------------------------------------------- //! To instanciate a factory, a template must be given. - Factory::Factory(const Node& t) throw(): + Factory::Factory(const Node& t) noexcept: _template(xml::Node("")<")), _line(0) { } //! Assign a template. /*! If you don't pass a template at instanciation, you must call this method later, or you will get xml::factory_not_valid exceptions when you try to use the factory. */ - Factory& Factory::operator=(const Node& t) throw() { + Factory& Factory::operator=(const Node& t) noexcept { _template = xml::Node("")<() const throw(factory_not_valid) try { + const Node* Factory::operator->() const try { return &_template[0]; } catch (...) { throw factory_not_valid(); } //! Check whether the factory has been given a valid template. - Factory::operator bool() const throw() { + Factory::operator bool() const noexcept { return _template.children()>0; } //! Print the factory template's schema in human readable format. /*! Calls xml::Factory::print */ std::ostream& operator<<(std::ostream& os, const Factory& factory) - throw(factory_not_valid) { + { return factory.print(os, *factory); } //! Print a node's schema description in human readable format. /*! @todo May be changed to a XML Schema output later. */ std::ostream& Factory::print(std::ostream& os, const Node& node, - unsigned int level) throw() { + unsigned int level) noexcept { if (node.children()) { os< Factory::read(std::istream& is) - throw(wrong_end_tag, wrong_start_tag, tag_expected, type_mismatch, - second_slash_in_tag, - character_after_slash, missing_end_tag, attribute_value_not_quoted, - access_error, duplicate_attribute, - attributes_in_end_tag, - illegal_attribute, mandatory_attribute_missing, - wrong_node_number, factory_not_valid) { + std::unique_ptr Factory::read(std::istream& is) { if (_template.children()==0) throw factory_not_valid(); try { _line=1; @@ -898,34 +891,28 @@ namespace xml { throw; } } - void Factory::reset() throw() { + void Factory::reset() noexcept { _line = 0; _open = 0; _template = xml::Node(""); } - Node& Factory::operator*() throw(factory_not_valid) try { + Node& Factory::operator*() try { return _template[0]; } catch (...) { throw factory_not_valid(); } - Node*const Factory::operator->() throw(factory_not_valid) try { + Node* Factory::operator->() try { return &_template[0]; } catch (...) { throw factory_not_valid(); } - bool Factory::ws(char c) throw() { + bool Factory::ws(char c) noexcept { static char last(0); if ((c=='\n'||c=='\r')&&last!='\n'&&last!='\r') ++_line; last = c; return c==' '||c=='\t'||c=='\n'||c=='\r'; } - std::unique_ptr Factory::read(std::istream& is, const Node& node) - throw(wrong_end_tag, wrong_start_tag, tag_expected, type_mismatch, - second_slash_in_tag, - character_after_slash, missing_end_tag, attribute_value_not_quoted, - access_error, duplicate_attribute, attributes_in_end_tag, - illegal_attribute, mandatory_attribute_missing, - wrong_node_number) { + std::unique_ptr Factory::read(std::istream& is, const Node& node) { std::unique_ptr result(node.clone()); result->clear(); while (true) { @@ -955,7 +942,7 @@ namespace xml { std::unique_ptr Factory::checkChildren(const xml::Node& tpl, std::unique_ptr node, std::istream& is) const - throw(wrong_node_number) { + { for (Node::size_type i(0); i0 && node->list(tpl[i].name()).size()list(tpl[i].name()).size())) @@ -964,14 +951,9 @@ namespace xml { tpl[i].min(), tpl[i].max()); return std::move(node); } - Tag Factory::tag(std::istream& is, const Node& position) - throw(second_slash_in_tag, character_after_slash, tag_expected, - missing_end_tag, attribute_value_not_quoted, - access_error, duplicate_attribute, attributes_in_end_tag, - illegal_attribute, mandatory_attribute_missing, - wrong_start_tag) { + Tag Factory::tag(std::istream& is, const Node& position) { char c(0); - Tag tag((Tag){"", START, "", Attributes(), "", false}); + Tag tag{"", START, "", Attributes(), "", false}; while (is && is.get(c) && ws(c)); // skip ws if (is.eof()) { if (_open>0) @@ -985,6 +967,8 @@ namespace xml { for (char last(c); is && is.get(c) && c!='>'; last=c) switch (c) { case '\n': case '\r': if (last!='\n'&&last!='\r') ++_line; + // no break; fall through to non line breaking white spaces + [[fallthrough]]; case ' ': case '\t': if (!nameRead && tag.name.size()) nameRead=true; break; @@ -1000,6 +984,8 @@ namespace xml { tag.type=SPECIAL; return tag; } + // no break; not matched, fall through to error handling + [[fallthrough]]; default: if (tag.type==EMPTY) throw character_after_slash(position, is, tag, c); if (nameRead) { // read attribute @@ -1056,21 +1042,21 @@ namespace xml { //---------------------------------------------------------------------------- - Serialize::Serialize() throw() {} - Serialize::Serialize(const std::string& className) throw(): + Serialize::Serialize() noexcept {} + Serialize::Serialize(const std::string& className) noexcept: _xmlFactory(xml::Node(xml::String(className).limits(1,1))) { } - Serialize::Serialize(const Serialize& other) throw() { + Serialize::Serialize(const Serialize& other) noexcept { copy(other); } Serialize::~Serialize() { reset(); } - Serialize& Serialize::operator=(const Serialize& other) throw() { + Serialize& Serialize::operator=(const Serialize& other) noexcept { copy(other); return *this; } - Serialize& Serialize::className(const std::string& name) throw() { + Serialize& Serialize::className(const std::string& name) noexcept { xml::Node node(xml::Node(xml::String(name).limits(1,1))); if (_xmlFactory) { for (xml::Node::size_type i(0); i<_xmlFactory->children(); ++i) @@ -1080,7 +1066,7 @@ namespace xml { return *this; } Serialize& Serialize::persist(Serialize& ser, - const std::string& name) throw() { + const std::string& name) noexcept { if (ser.optional()) { _xmlNames[name] = &ser; ser.className(name); @@ -1099,59 +1085,59 @@ namespace xml { return *this; } Serialize& Serialize::persist(bool& member, - const std::string& name) throw() { + const std::string& name) noexcept { return persistSimpleType(member, name); } Serialize& Serialize::persist(char& member, - const std::string& name) throw() { + const std::string& name) noexcept { return persistSimpleType(member, name); } Serialize& Serialize::persist(unsigned char& member, - const std::string& name) throw() { + const std::string& name) noexcept { return persistSimpleType(member, name); } Serialize& Serialize::persist(signed char& member, - const std::string& name) throw() { + const std::string& name) noexcept { return persistSimpleType(member, name); } Serialize& Serialize::persist(unsigned short& member, - const std::string& name) throw() { + const std::string& name) noexcept { return persistSimpleType(member, name); } Serialize& Serialize::persist(signed short& member, - const std::string& name) throw() { + const std::string& name) noexcept { return persistSimpleType(member, name); } Serialize& Serialize::persist(unsigned int& member, - const std::string& name) throw() { + const std::string& name) noexcept { return persistSimpleType(member, name); } Serialize& Serialize::persist(signed int& member, - const std::string& name) throw() { + const std::string& name) noexcept { return persistSimpleType(member, name); } Serialize& Serialize::persist(unsigned long& member, - const std::string& name) throw() { + const std::string& name) noexcept { return persistSimpleType(member, name); } Serialize& Serialize::persist(signed long& member, - const std::string& name) throw() { + const std::string& name) noexcept { return persistSimpleType(member, name); } Serialize& Serialize::persist(float& member, - const std::string& name) throw() { + const std::string& name) noexcept { return persistSimpleType(member, name); } Serialize& Serialize::persist(double& member, - const std::string& name) throw() { + const std::string& name) noexcept { return persistSimpleType(member, name); } Serialize& Serialize::persist(std::string& member, - const std::string& name) throw() { + const std::string& name) noexcept { return persistSimpleType(member, name); } std::ostream& Serialize::saveXml(std::ostream& os, - const std::string& name) const throw() { + const std::string& name) const noexcept { checkInit(); xml::Node node(*_xmlFactory); if (name.size()) node.name(name); @@ -1176,7 +1162,7 @@ namespace xml { clear(it->second); return is; } - std::string Serialize::schema() const throw() { + std::string Serialize::schema() const noexcept { checkInit(); std::stringstream ss; ss<<*_xmlFactory; @@ -1193,17 +1179,17 @@ namespace xml { _clear.insert(clearFunc); } void Serialize::initXmlMembers() {} - void Serialize::clear() throw() { + void Serialize::clear() { for (std::map::const_iterator it(_xmlNames.begin()); it!=_xmlNames.end(); ++it) clear(it->second); } - void Serialize::reset() throw() { + void Serialize::reset() noexcept { _xmlFactory.reset(); _xmlNames.clear(); } - void Serialize::copy(const Serialize& o) throw() { + void Serialize::copy(const Serialize&) noexcept { reset(); initXmlMembers(); } @@ -1219,13 +1205,13 @@ namespace xml { if ((**it)(member, node)) return; // found match throw type_not_registered(member.type().name(), node.name(), node); } - void Serialize::clear(Any member) throw() { + void Serialize::clear(Any member) { for (std::set::const_iterator it(_clear.begin()); it!=_clear.end(); ++it) if ((**it)(member)) return; // found match throw type_not_registered(member.type().name()); } - bool Serialize::optional() const throw() { + bool Serialize::optional() const noexcept { return false; }