From 2df2d8c8dc4ec6bb4bf57b42237d541ba61d3596 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 10 Oct 2018 16:32:26 +0100 Subject: [PATCH 01/90] Add missing breaks in gregorian_calendar::get_value --- src/util/gregorian.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/gregorian.cpp b/src/util/gregorian.cpp index 49e45c3a..33961603 100644 --- a/src/util/gregorian.cpp +++ b/src/util/gregorian.cpp @@ -503,6 +503,7 @@ namespace util { return val; } } + break; case week_of_month: ///< The week number withing current month switch(v) { case absolute_minimum: @@ -527,7 +528,7 @@ namespace util { return val; } } - + break; case day_of_week_in_month: ///< Original number of the day of the week in month. switch(v) { case absolute_minimum: From aebac1401f9ddabb84c222481301d25beea1988d Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Mon, 14 Jan 2019 21:08:25 +0300 Subject: [PATCH 02/90] Remove linking with Boost.System. Since Boost.System is header-only now, no need to link with the library. --- build/Jamfile.v2 | 3 --- 1 file changed, 3 deletions(-) diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 578e722e..43ab0014 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -382,9 +382,6 @@ rule configure-full ( properties * : flags-only ) result += util/gregorian.cpp ; } - result += ../../system/build//boost_system ; - - if "$(flags-only)" = "flags" { return $(flags-result) ; From b01aab1d28c9b32d107ae39c76c9af988420d476 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Mon, 14 Jan 2019 21:10:38 +0300 Subject: [PATCH 03/90] Trim trailing spaces. --- build/Jamfile.v2 | 119 +++++++++++++++++++++++------------------------ 1 file changed, 59 insertions(+), 60 deletions(-) diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 43ab0014..97dd68c7 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -1,6 +1,6 @@ # copyright John Maddock 2003, Artyom Beilis 2010 -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt. @@ -32,11 +32,11 @@ explicit has_iconv ; ICONV_PATH = [ modules.peek : ICONV_PATH ] ; -lib iconv - : +lib iconv + : : $(ICONV_PATH)/lib shared shared : - : $(ICONV_PATH)/include + : $(ICONV_PATH)/include ; explicit iconv ; @@ -45,8 +45,8 @@ obj has_iconv_libc_ext : ../build/has_iconv.cpp iconv ; exe has_external_iconv : has_iconv_libc_ext iconv ; explicit has_external_iconv ; -exe accepts_shared_option : ../build/option.cpp - : -shared-libstdc++ +exe accepts_shared_option : ../build/option.cpp + : -shared-libstdc++ -shared-libgcc -shared-libstdc++ -shared-libgcc @@ -71,8 +71,8 @@ if $(ICU_LINK) else { searched-lib icuuc : : icuuc - $(ICU_PATH)/lib - shared + $(ICU_PATH)/lib + shared shared ; searched-lib icuuc : : msvc @@ -120,9 +120,9 @@ else explicit icuuc icudt icuin ; - ICU_OPTS = $(ICU_PATH)/include - icuuc/shared/shared - icudt/shared/shared + ICU_OPTS = $(ICU_PATH)/include + icuuc/shared/shared + icudt/shared/shared icuin/shared/shared $(ICU_PATH)/bin shared ; @@ -130,8 +130,8 @@ else searched-lib icuuc_64 : : icuuc - $(ICU_PATH)/lib64 - shared + $(ICU_PATH)/lib64 + shared shared ; searched-lib icuuc_64 : : msvc @@ -179,14 +179,14 @@ else explicit icuuc_64 icudt_64 icuin_64 ; - ICU64_OPTS = $(ICU_PATH)/include - icuuc_64/shared/shared - icudt_64/shared/shared + ICU64_OPTS = $(ICU_PATH)/include + icuuc_64/shared/shared + icudt_64/shared/shared icuin_64/shared/shared $(ICU_PATH)/bin64 shared ; - - + + } obj has_icu_obj : ../build/has_icu_test.cpp : $(ICU_OPTS) ; @@ -206,11 +206,11 @@ rule configure-full ( properties * : flags-only ) local result ; local flags-result ; - + local found-iconv ; - + if on in $(properties) - || ! in $(properties:G) + || ! in $(properties:G) && ! solaris in $(properties) { # See if iconv is bundled with standard library. @@ -218,7 +218,7 @@ rule configure-full ( properties * : flags-only ) { found-iconv = true ; } - else + else { if [ configure.builds has_external_iconv : $(properties) : "iconv (separate)" ] { @@ -226,8 +226,8 @@ rule configure-full ( properties * : flags-only ) result += iconv ; } } - } - if $(found-iconv) + } + if $(found-iconv) { flags-result += BOOST_LOCALE_WITH_ICONV=1 ; } @@ -249,7 +249,7 @@ rule configure-full ( properties * : flags-only ) if $(found-icu) { - ICU_SOURCES = + ICU_SOURCES = boundary codecvt collator @@ -260,20 +260,20 @@ rule configure-full ( properties * : flags-only ) numeric time_zone ; - - result += icu/$(ICU_SOURCES).cpp - ../../thread/build//boost_thread + + result += icu/$(ICU_SOURCES).cpp + ../../thread/build//boost_thread ; } } - - if ! $(found-iconv) && ! $(found-icu) && ! windows in $(properties) && ! cygwin in $(properties) + + if ! $(found-iconv) && ! $(found-icu) && ! windows in $(properties) && ! cygwin in $(properties) { ECHO "- Boost.Locale needs either iconv or ICU library to be built." ; result += no ; } - + if ! in $(properties:G) { if sun in $(properties) @@ -283,9 +283,9 @@ rule configure-full ( properties * : flags-only ) else { properties += on ; - } + } } - + if off in $(properties) { flags-result += BOOST_LOCALE_NO_STD_BACKEND=1 ; @@ -301,38 +301,38 @@ rule configure-full ( properties * : flags-only ) ; result += std/$(STD_SOURCES).cpp ; } - + if ! in $(properties:G) { - if windows in $(properties) + if windows in $(properties) || cygwin in $(properties) { properties += on ; - } + } else { properties += off ; - } + } } - if windows in $(properties) - && gcc in $(properties) + if windows in $(properties) + && gcc in $(properties) && shared in $(properties) && [ configure.builds accepts_shared_option : $(properties) : "g++ -shared-* supported" ] { - flags-result += -shared-libstdc++ + flags-result += -shared-libstdc++ -shared-libgcc -shared-libstdc++ -shared-libgcc ; } - + if off in $(properties) { flags-result += BOOST_LOCALE_NO_WINAPI_BACKEND=1 ; } else { - WINAPI_SOURCES = + WINAPI_SOURCES = collate converter numeric @@ -340,34 +340,34 @@ rule configure-full ( properties * : flags-only ) ; result += win32/$(WINAPI_SOURCES).cpp ; } - + if ( ! off in $(properties) || ! off in $(properties) ) && ( windows in $(properties) || cygwin in $(properties) ) { result += win32/lcid.cpp ; } - + if ! in $(properties:G) { - if linux in $(properties) - || darwin in $(properties) + if linux in $(properties) + || darwin in $(properties) || ( freebsd in $(properties) && [ configure.builds has_xlocale : $(properties) : "xlocale supported" ] ) { properties += on ; } else { - properties += off ; - } + properties += off ; + } } - + if off in $(properties) { - flags-result += BOOST_LOCALE_NO_POSIX_BACKEND=1 ; + flags-result += BOOST_LOCALE_NO_POSIX_BACKEND=1 ; } else { - POSIX_SOURCES = + POSIX_SOURCES = collate converter numeric @@ -381,12 +381,13 @@ rule configure-full ( properties * : flags-only ) { result += util/gregorian.cpp ; } - - if "$(flags-only)" = "flags" + + if "$(flags-only)" = "flags" { return $(flags-result) ; } - else { + else + { result += $(flags-result) ; return $(result) ; } @@ -396,7 +397,6 @@ rule configure ( properties * ) { local result = [ configure-full $(properties) : "all" ] ; return $(result) ; - } rule configure-flags ( properties * ) @@ -404,15 +404,14 @@ rule configure-flags ( properties * ) local result ; result = [ configure-full $(properties) : "flags" ] ; return $(result) ; - } alias build_options : : : : @configure ; alias build_flags : : : : @configure-flags ; -lib boost_locale - : +lib boost_locale + : encoding/codepage.cpp shared/date_time.cpp shared/format.cpp @@ -425,7 +424,7 @@ lib boost_locale util/codecvt_converter.cpp util/default_locale.cpp util/info.cpp - util/locale_data.cpp + util/locale_data.cpp : # Don't link explicitly, not required BOOST_THREAD_NO_LIB=1 From 39199cdec7825f09ae5b41d34513e237dea982ad Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Wed, 20 Jan 2021 13:20:12 -0500 Subject: [PATCH 04/90] [skip ci] Add "cxxstd" json field. The "cxxstd" json field is being added to each Boost library's meta json information for libraries in order to specify the minumum C++ standard compilation level. The value of this field matches one of the values for 'cxxstd' in Boost.Build. The purpose of doing this is to provide information for the Boost website documentation for each library which will specify the minimum C++ standard compilation that an end-user must employ in order to use the particular library. This will aid end-users who want to know if they can successfully use a Boost library based on their C++ compiler's compilation level, without having to search the library's documentation to find this out. --- meta/libraries.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/libraries.json b/meta/libraries.json index 2364222e..424876a8 100644 --- a/meta/libraries.json +++ b/meta/libraries.json @@ -10,5 +10,6 @@ ], "maintainers": [ "Artyom Beilis " - ] + ], + "cxxstd": "03" } From 1ff0ead837b32b9415dc840dfef6549e8754b98d Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Fri, 10 Dec 2021 17:53:01 +0100 Subject: [PATCH 05/90] Fix access to first element of empty vector Trying to access tmp[0] causes a crash on Fedora when assertion on STL are enabled. /usr/include/c++/10/bits/stl_vector.h:1045: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = unsigned char; _Alloc = std::allocator; std::vector<_Tp, _Alloc>::reference = unsigned char&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__builtin_expect(__n < this->size(), true)' failed. Fix is to never have an empty vector as ICU sort keys include the NULL terminator, hence we need at least `length + 1` bytes which means the vector has at least 1 element: The NULL terminator --- src/icu/collator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/icu/collator.cpp b/src/icu/collator.cpp index 7f1ea6ae..79668aa6 100644 --- a/src/icu/collator.cpp +++ b/src/icu/collator.cpp @@ -91,9 +91,9 @@ namespace boost { { icu::UnicodeString str=cvt_.icu(b,e); std::vector tmp; - tmp.resize(str.length()); + tmp.resize(str.length() + 1u); icu::Collator *collate = get_collator(level); - int len = collate->getSortKey(str,&tmp[0],tmp.size()); + const int len = collate->getSortKey(str,&tmp[0],tmp.size()); if(len > int(tmp.size())) { tmp.resize(len); collate->getSortKey(str,&tmp[0],tmp.size()); From 37b85070117c8fcc19a37ef8d887abb37bef8f4d Mon Sep 17 00:00:00 2001 From: Tocic Date: Sun, 10 Apr 2022 14:25:54 +0300 Subject: [PATCH 06/90] Fix some doc typos PR #31 --- doc/boundary_analysys.txt | 4 ++-- doc/charset_handling.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/boundary_analysys.txt b/doc/boundary_analysys.txt index 66dc6434..5587f4e2 100644 --- a/doc/boundary_analysys.txt +++ b/doc/boundary_analysys.txt @@ -297,7 +297,7 @@ For example: For \ref boost::locale::boundary::word "word" boundary analysis wit - "t|o be or ", would point to "to" - the iterator in the middle of segment "to". - "to |be or ", would point to "be" - the iterator at the beginning of the segment "be" -- "to| be or ", would point to "be" - the iterator does is not point to segment with required rule so next valid segment is selected "be". +- "to| be or ", would point to "be" - the iterator does not point to segment with required rule so next valid segment is selected "be". - "to be or| ", would point to end as not valid segment found. @@ -306,7 +306,7 @@ For example: For \ref boost::locale::boundary::word "word" boundary analysis wit The \ref boost::locale::boundary::boundary_point_index "boundary_point_index" is similar to \ref boost::locale::boundary::segment_index "segment_index" in its interface but as a different role. -Instead of returning text chunks (\ref boost::locale::boundary::segment "segment"s, it returns +Instead of returning text chunks (\ref boost::locale::boundary::segment "segment"s), it returns \ref boost::locale::boundary::boundary_point "boundary_point" object that represents a position in text - a base iterator used that is used for iteration of the source text C++ characters. diff --git a/doc/charset_handling.txt b/doc/charset_handling.txt index 775e06f1..d51adcf1 100644 --- a/doc/charset_handling.txt +++ b/doc/charset_handling.txt @@ -141,7 +141,7 @@ ISO-8859, and Shift-JIS, but not with stateful encodings like UTF-7 or SCSU. \note -The implementation of codecvt for single byte encodings like ISO-8859-X and for UTF-8 is very efficent +The implementation of codecvt for single byte encodings like ISO-8859-X and for UTF-8 is very efficient and would allow fast conversion of the content, however its performance may be sub-optimal for double-width encodings like Shift-JIS, due to the stateless problem described above. From 9259845c6fd95ce6b8bf11e8ec5d8bdf38836c4e Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 29 Sep 2021 18:19:24 +0200 Subject: [PATCH 07/90] Fix typo in docs --- doc/appendix.txt | 2 +- doc/html/appendix.html | 2 +- doc/html/appendix.js | 6 +++--- doc/html/index.html | 2 +- doc/html/navtreeindex3.js | 4 ++-- ...d_paltforms.html => tested_compilers_and_platforms.html} | 4 ++-- doc/main.txt | 2 +- ...and_paltforms.txt => tested_compilers_and_platforms.txt} | 4 ++-- 8 files changed, 13 insertions(+), 13 deletions(-) rename doc/html/{tested_compilers_and_paltforms.html => tested_compilers_and_platforms.html} (97%) rename doc/{tested_compilers_and_paltforms.txt => tested_compilers_and_platforms.txt} (91%) diff --git a/doc/appendix.txt b/doc/appendix.txt index 5778fafe..1f189a06 100644 --- a/doc/appendix.txt +++ b/doc/appendix.txt @@ -18,7 +18,7 @@ - \subpage running_examples_under_windows - \subpage gettext_for_windows - \subpage glossary -- \subpage tested_compilers_and_paltforms +- \subpage tested_compilers_and_platforms - \subpage status_of_cpp0x_characters_support - \subpage special_thanks diff --git a/doc/html/appendix.html b/doc/html/appendix.html index abc50289..9264b4d4 100644 --- a/doc/html/appendix.html +++ b/doc/html/appendix.html @@ -74,7 +74,7 @@
  • Running Examples under Microsoft Windows
  • Using Gettext Tools on Windows
  • Glossary
  • -
  • Tested Compilers and Platforms
  • +
  • Tested Compilers and Platforms
  • Status of C++11 char16_t/char32_t support
  • Special Thanks
  • diff --git a/doc/html/appendix.js b/doc/html/appendix.js index d040a5a8..b0ac37b0 100644 --- a/doc/html/appendix.js +++ b/doc/html/appendix.js @@ -23,12 +23,12 @@ var appendix = [ "Using Cygwin", "gettext_for_windows.html#gettext_for_windows_cygwin", null ] ] ], [ "Glossary", "glossary.html", null ], - [ "Tested Compilers and Platforms", "tested_compilers_and_paltforms.html", [ - [ "Known Issues", "tested_compilers_and_paltforms.html#tested_compilers_and_paltforms_issues", null ] + [ "Tested Compilers and Platforms", "tested_compilers_and_platforms.html", [ + [ "Known Issues", "tested_compilers_and_platforms.html#tested_compilers_and_platforms_issues", null ] ] ], [ "Status of C++11 char16_t/char32_t support", "status_of_cpp0x_characters_support.html", [ [ "GNU GCC 4.5/C++11 Status", "status_of_cpp0x_characters_support.html#status_of_cpp0x_characters_support_gnu", null ], [ "Visual Studio 2010 (MSVC10)/C++11 Status", "status_of_cpp0x_characters_support.html#status_of_cpp0x_characters_support_msvc", null ] ] ], [ "Special Thanks", "special_thanks.html", null ] -]; \ No newline at end of file +]; diff --git a/doc/html/index.html b/doc/html/index.html index a5774774..6012c4b8 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -115,7 +115,7 @@

  • Running Examples under Microsoft Windows
  • Using Gettext Tools on Windows
  • Glossary
  • -
  • Tested Compilers and Platforms
  • +
  • Tested Compilers and Platforms
  • Status of C++11 char16_t/char32_t support
  • Special Thanks
  • diff --git a/doc/html/navtreeindex3.js b/doc/html/navtreeindex3.js index 0d2d6f59..b1595090 100644 --- a/doc/html/navtreeindex3.js +++ b/doc/html/navtreeindex3.js @@ -230,8 +230,8 @@ var NAVTREEINDEX3 = "structboost_1_1locale_1_1utf_1_1utf__traits.html#accca9dc2d8fe018b9b5640c48e3470e4":[2,0,0,0,7,0,0], "structboost_1_1locale_1_1utf_1_1utf__traits.html#acd59f628af084f800f8a86cdd8124fd8":[2,0,0,0,7,0,3], "structboost_1_1locale_1_1utf_1_1utf__traits.html#ae2cb78fcb8a58bed3e0ce1d6528a719a":[2,0,0,0,7,0,5], -"tested_compilers_and_paltforms.html":[7,7], -"tested_compilers_and_paltforms.html#tested_compilers_and_paltforms_issues":[7,7,0], +"tested_compilers_and_platforms.html":[7,7], +"tested_compilers_and_platforms.html#tested_compilers_and_platforms_issues":[7,7,0], "time__zone_8hpp_source.html":[3,0,0,0,20], "types_8hpp_source.html":[3,0,0,0,0,4], "using_boost_locale.html":[3], diff --git a/doc/html/tested_compilers_and_paltforms.html b/doc/html/tested_compilers_and_platforms.html similarity index 97% rename from doc/html/tested_compilers_and_paltforms.html rename to doc/html/tested_compilers_and_platforms.html index 70fc2992..fa58f098 100644 --- a/doc/html/tested_compilers_and_paltforms.html +++ b/doc/html/tested_compilers_and_platforms.html @@ -57,7 +57,7 @@
    @@ -84,7 +84,7 @@
  • Cygwin
  • AIX
  • -

    +

    Known Issues

    • Path Scale and MSVC 9 with STLPort has some test faults regarding invalid UTF-8 sequences in wide file I/O.
    • diff --git a/doc/main.txt b/doc/main.txt index a407a541..12112524 100644 --- a/doc/main.txt +++ b/doc/main.txt @@ -86,7 +86,7 @@ and use library. - \ref running_examples_under_windows - \ref gettext_for_windows - \ref glossary - - \ref tested_compilers_and_paltforms + - \ref tested_compilers_and_platforms - \ref status_of_cpp0x_characters_support - \ref special_thanks - \subpage changelog diff --git a/doc/tested_compilers_and_paltforms.txt b/doc/tested_compilers_and_platforms.txt similarity index 91% rename from doc/tested_compilers_and_paltforms.txt rename to doc/tested_compilers_and_platforms.txt index fe196512..18d4fe73 100644 --- a/doc/tested_compilers_and_paltforms.txt +++ b/doc/tested_compilers_and_platforms.txt @@ -9,7 +9,7 @@ // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 filetype=cpp.doxygen /*! -\page tested_compilers_and_paltforms Tested Compilers and Platforms +\page tested_compilers_and_platforms Tested Compilers and Platforms Following compilers are tested and known to work with Boost.Locale @@ -30,7 +30,7 @@ Following operating systems are tested with Boost.Locale - Cygwin - AIX -\section tested_compilers_and_paltforms_issues Known Issues +\section tested_compilers_and_platforms_issues Known Issues - Path Scale and MSVC 9 with STLPort has some test faults regarding invalid UTF-8 sequences in wide file I/O. From 425c54abae646de1125ada91e67b39ee5aa4657a Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Tue, 24 May 2022 15:20:51 +0200 Subject: [PATCH 08/90] Add headers to CMake project Adding headers makes them appear in IDEs which enables searching them. --- CMakeLists.txt | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 73af8451..3904c01a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,8 +6,15 @@ cmake_minimum_required(VERSION 3.5...3.20) project(boost_locale VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX) +# Using glob here is ok as it is only for headers +file(GLOB_RECURSE headers include/*.hpp) + add_library(boost_locale src/encoding/codepage.cpp + src/encoding/conv.hpp + src/encoding/iconv_codepage.ipp + src/encoding/uconv_codepage.ipp + src/encoding/wconv_codepage.ipp src/shared/date_time.cpp src/shared/format.cpp src/shared/formatting.cpp @@ -20,6 +27,10 @@ add_library(boost_locale src/util/default_locale.cpp src/util/info.cpp src/util/locale_data.cpp + src/util/locale_data.hpp + src/util/numeric.hpp + src/util/timezone.hpp + ${headers} ) add_library(Boost::locale ALIAS boost_locale) @@ -78,6 +89,9 @@ if(BOOST_LOCALE_ENABLE_ICONV) target_compile_definitions(boost_locale PRIVATE BOOST_LOCALE_WITH_ICONV=1) target_link_libraries(boost_locale PRIVATE Iconv::Iconv) + target_sources(boost_locale PRIVATE + src/util/iconv.hpp + ) endif() if(BOOST_LOCALE_ENABLE_ICU) @@ -88,15 +102,24 @@ if(BOOST_LOCALE_ENABLE_ICU) target_link_libraries(boost_locale PRIVATE ICU::data ICU::i18n ICU::uc) target_sources(boost_locale PRIVATE + src/icu/all_generator.hpp src/icu/boundary.cpp + src/icu/cdata.hpp src/icu/codecvt.cpp + src/icu/codecvt.hpp src/icu/collator.cpp src/icu/conversion.cpp src/icu/date_time.cpp src/icu/formatter.cpp + src/icu/formatter.hpp src/icu/icu_backend.cpp + src/icu/icu_backend.hpp + src/icu/icu_util.hpp src/icu/numeric.cpp + src/icu/predefined_formatters.hpp src/icu/time_zone.cpp + src/icu/time_zone.hpp + src/icu/uconv.hpp ) endif() @@ -104,11 +127,13 @@ endif() if(BOOST_LOCALE_ENABLE_STD) target_sources(boost_locale PRIVATE + src/std/all_generator.hpp src/std/codecvt.cpp src/std/collate.cpp src/std/converter.cpp src/std/numeric.cpp src/std/std_backend.cpp + src/std/std_backend.hpp ) else() @@ -120,10 +145,13 @@ endif() if(BOOST_LOCALE_ENABLE_WINAPI) target_sources(boost_locale PRIVATE + src/win32/all_generator.hpp + src/win32/api.hpp src/win32/collate.cpp src/win32/converter.cpp src/win32/numeric.cpp src/win32/win_backend.cpp + src/win32/win_backend.hpp ) else() @@ -136,6 +164,7 @@ if(BOOST_LOCALE_ENABLE_WINAPI OR (BOOST_LOCALE_ENABLE_STD AND WIN32)) target_sources(boost_locale PRIVATE src/win32/lcid.cpp + src/win32/lcid.hpp ) endif() @@ -143,11 +172,14 @@ endif() if(BOOST_LOCALE_ENABLE_POSIX) target_sources(boost_locale PRIVATE + src/posix/all_generator.hpp + src/posix/codecvt.cpp + src/posix/codecvt.hpp src/posix/collate.cpp src/posix/converter.cpp src/posix/numeric.cpp - src/posix/codecvt.cpp src/posix/posix_backend.cpp + src/posix/posix_backend.hpp ) else() @@ -160,6 +192,7 @@ if(BOOST_LOCALE_ENABLE_WINAPI OR BOOST_LOCALE_ENABLE_STD OR BOOST_LOCALE_ENABLE_ target_sources(boost_locale PRIVATE src/util/gregorian.cpp + src/util/gregorian.hpp ) endif() From 5e81d50f636b22590ec63b7df850e423fcab5e41 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 25 May 2022 16:07:28 +0200 Subject: [PATCH 09/90] Fix shared-link define BOOST_LOCALE_DYN_LINK must be defined when the shared library is build or consumed. boost-lib does this (and the install) automatically, so use it. Cleanup the remainder of the Jamfiles. --- build/Jamfile.v2 | 45 ++++++++++++++++++--------------------------- test/Jamfile.v2 | 8 +++----- 2 files changed, 21 insertions(+), 32 deletions(-) diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 97dd68c7..ee93ea76 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -3,17 +3,15 @@ # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt. - +import configure ; +import os ; +import toolset ; +import feature ; project /boost/locale : source-location ../src ; -import configure ; -import os ; -import toolset ; -import project ; -import feature ; # Features feature.feature boost.locale.iconv : on off : optional propagated ; @@ -406,36 +404,29 @@ rule configure-flags ( properties * ) return $(result) ; } - -alias build_options : : : : @configure ; alias build_flags : : : : @configure-flags ; -lib boost_locale +boost-lib locale : - encoding/codepage.cpp - shared/date_time.cpp - shared/format.cpp - shared/formatting.cpp - shared/generator.cpp - shared/ids.cpp - shared/localization_backend.cpp - shared/message.cpp - shared/mo_lambda.cpp - util/codecvt_converter.cpp - util/default_locale.cpp - util/info.cpp - util/locale_data.cpp + encoding/codepage.cpp + shared/date_time.cpp + shared/format.cpp + shared/formatting.cpp + shared/generator.cpp + shared/ids.cpp + shared/localization_backend.cpp + shared/message.cpp + shared/mo_lambda.cpp + util/codecvt_converter.cpp + util/default_locale.cpp + util/info.cpp + util/locale_data.cpp : # Don't link explicitly, not required BOOST_THREAD_NO_LIB=1 - shared:BOOST_LOCALE_DYN_LINK=1 multi # Meanwhile remove this @configure ; -boost-install boost_locale ; - - # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 - diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index db66db2c..afe24110 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -9,12 +9,10 @@ project : requirements /boost/locale//boost_locale + # Make sure we get all defines we need + # Otherwise we would have problem knowing + # what backends are actually in use ../build//build_flags - # Make sure we get all defines we need - # Otherwise we would have problem knowing - # what backends are actually in use - shared - BOOST_LOCALE_DYN_LINK=1 ; # Shared boost.locale tests From ea53b00db89b4cc8715b47fc7d36f9d468ccb9c2 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 25 May 2022 11:25:07 +0200 Subject: [PATCH 10/90] Cleanup definitions --- include/boost/locale/definitions.hpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/include/boost/locale/definitions.hpp b/include/boost/locale/definitions.hpp index a98cec92..156e04aa 100644 --- a/include/boost/locale/definitions.hpp +++ b/include/boost/locale/definitions.hpp @@ -10,22 +10,15 @@ #include -// Support older ICU versions -#ifndef BOOST_SYMBOL_VISIBLE -# define BOOST_SYMBOL_VISIBLE -#endif - #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_LOCALE_DYN_LINK) # ifdef BOOST_LOCALE_SOURCE # define BOOST_LOCALE_DECL BOOST_SYMBOL_EXPORT # else # define BOOST_LOCALE_DECL BOOST_SYMBOL_IMPORT # endif // BOOST_LOCALE_SOURCE -#endif // DYN_LINK - -#ifndef BOOST_LOCALE_DECL +#else # define BOOST_LOCALE_DECL -#endif +#endif // BOOST_LOCALE_DYN_LINK #endif // boost/locale/config.hpp // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 From 26d12650b65e724f15920d7120ffbc186cc8cbe4 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 25 May 2022 19:58:24 +0200 Subject: [PATCH 11/90] Check return values of format functions --- test/test_posix_formatting.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/test_posix_formatting.cpp b/test/test_posix_formatting.cpp index 55e83cf5..d51c2f49 100644 --- a/test/test_posix_formatting.cpp +++ b/test/test_posix_formatting.cpp @@ -94,8 +94,8 @@ void test_by_char(std::locale const &l,locale_t lreal) { std::cout << "- Testing as::currency national " << std::endl; - char buf[256]; - strfmon_l(buf,256,lreal,"%n",1043.34); + char buf[64]; + TEST(strfmon_l(buf,sizeof(buf),lreal,"%n",1043.34) > 0); ss_type ss; ss.imbue(l); @@ -114,8 +114,8 @@ void test_by_char(std::locale const &l,locale_t lreal) { std::cout << "- Testing as::currency iso" << std::endl; - char buf[256]; - strfmon_l(buf,256,lreal,"%i",1043.34); + char buf[64]; + TEST(strfmon_l(buf,sizeof(buf),lreal,"%i",1043.34) > 0); ss_type ss; ss.imbue(l); @@ -152,8 +152,8 @@ void test_by_char(std::locale const &l,locale_t lreal) ss << as::ftime(conv_to_char("%M")) << a_datetime << CharType('\n'); std::tm tm=*gmtime(&a_datetime); - char buf[256]; - strftime_l(buf,sizeof(buf),"%x\n%X\n%c\n16\n48\n",&tm,lreal); + char buf[64]; + TEST(strftime_l(buf,sizeof(buf),"%x\n%X\n%c\n16\n48\n",&tm,lreal) > 0); TEST(equal(ss.str(),buf,lreal)); #ifdef DEBUG_FMT From 4a9af62e5bb321ccb793f11783217dd157496f9c Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 29 Sep 2021 18:19:35 +0200 Subject: [PATCH 12/90] Add GHA CI --- .github/workflows/ci.yml | 416 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 416 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..9efb523b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,416 @@ +# Copyright 2020-2021 Peter Dimov +# Copyright 2021 Andrey Semashev +# Copyright 2021 Alexander Grund +# Copyright 2022 James E. King III +# +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) +--- +name: CI + +on: + pull_request: + push: + branches: + - master + - develop + - bugfix/** + - feature/** + - fix/** + - pr/** + +concurrency: + group: ${{format('{0}:{1}', github.repository, github.ref)}} + cancel-in-progress: true + +env: + GIT_FETCH_JOBS: 8 + NET_RETRY_COUNT: 5 + B2_CI_VERSION: 1 + B2_VARIANT: debug,release + B2_LINK: shared,static + LCOV_BRANCH_COVERAGE: 0 + CODECOV_NAME: Github Actions + +jobs: + posix: + defaults: + run: + shell: bash + + strategy: + fail-fast: false + matrix: + include: + # Linux, gcc + - { compiler: gcc-4.4, cxxstd: '98,0x', os: ubuntu-20.04, container: 'ubuntu:16.04' } + - { compiler: gcc-4.6, cxxstd: '03,0x', os: ubuntu-20.04, container: 'ubuntu:16.04' } + - { compiler: gcc-4.7, cxxstd: '03,11', os: ubuntu-20.04, container: 'ubuntu:16.04' } + - { compiler: gcc-4.8, cxxstd: '03,11', os: ubuntu-18.04 } + - { compiler: gcc-4.9, cxxstd: '03,11', os: ubuntu-20.04, container: 'ubuntu:16.04' } + - { compiler: gcc-5, cxxstd: '03,11,14,1z', os: ubuntu-18.04 } + - { compiler: gcc-6, cxxstd: '03,11,14,17', os: ubuntu-18.04 } + - { compiler: gcc-7, cxxstd: '03,11,14,17', os: ubuntu-18.04 } + - { compiler: gcc-8, cxxstd: '03,11,14,17,2a', os: ubuntu-18.04 } + - { compiler: gcc-9, cxxstd: '03,11,14,17,2a', os: ubuntu-18.04 } + - { compiler: gcc-10, cxxstd: '03,11,14,17,20', os: ubuntu-20.04 } + - { compiler: gcc-11, cxxstd: '03,11,14,17,20', os: ubuntu-20.04 } + - { name: GCC w/ sanitizers, sanitize: yes, + compiler: gcc-11, cxxstd: '03,11,14,17,20', os: ubuntu-20.04 } + - { name: Collect coverage, coverage: yes, + compiler: gcc-8, cxxstd: '03,11', os: ubuntu-20.04, install: 'g++-8-multilib', address-model: '32,64' } + + # Linux, clang + - { compiler: clang-3.5, cxxstd: '03,11', os: ubuntu-20.04, container: 'ubuntu:16.04' } + - { compiler: clang-3.6, cxxstd: '03,11,14', os: ubuntu-20.04, container: 'ubuntu:16.04' } + - { compiler: clang-3.7, cxxstd: '03,11,14', os: ubuntu-20.04, container: 'ubuntu:16.04' } + - { compiler: clang-3.8, cxxstd: '03,11,14', os: ubuntu-20.04, container: 'ubuntu:16.04' } + - { compiler: clang-3.9, cxxstd: '03,11,14', os: ubuntu-18.04 } + - { compiler: clang-4.0, cxxstd: '03,11,14', os: ubuntu-18.04 } + - { compiler: clang-5.0, cxxstd: '03,11,14,1z', os: ubuntu-18.04 } + - { compiler: clang-6.0, cxxstd: '03,11,14,17', os: ubuntu-18.04 } + - { compiler: clang-7, cxxstd: '03,11,14,17', os: ubuntu-18.04 } + # Note: clang-8 does not fully support C++20, so it is not compatible with some libstdc++ versions in this mode + - { compiler: clang-8, cxxstd: '03,11,14,17,2a', os: ubuntu-18.04, install: 'clang-8 g++-7', gcc_toolchain: 7 } + - { compiler: clang-9, cxxstd: '03,11,14,17,2a', os: ubuntu-20.04 } + - { compiler: clang-10, cxxstd: '03,11,14,17,20', os: ubuntu-20.04 } + - { compiler: clang-11, cxxstd: '03,11,14,17,20', os: ubuntu-20.04 } + - { compiler: clang-12, cxxstd: '03,11,14,17,20', os: ubuntu-20.04 } + + # libc++ + - { compiler: clang-6.0, cxxstd: '03,11,14', os: ubuntu-18.04, stdlib: libc++, install: 'clang-6.0 libc++-dev libc++abi-dev' } + - { compiler: clang-12, cxxstd: '03,11,14,17,20', os: ubuntu-20.04, stdlib: libc++, install: 'clang-12 libc++-12-dev libc++abi-12-dev' } + - { name: Clang w/ sanitizers, sanitize: yes, + compiler: clang-12, cxxstd: '03,11,14,17,20', os: ubuntu-20.04, stdlib: libc++, install: 'clang-12 libc++-12-dev libc++abi-12-dev' } + + # OSX, clang + - { compiler: clang, cxxstd: '03,11,14,17,2a', os: macos-10.15, sanitize: yes } + + timeout-minutes: 120 + runs-on: ${{matrix.os}} + container: ${{matrix.container}} + env: {B2_USE_CCACHE: 1} + + steps: + - name: Setup environment + run: | + if [ -f "/etc/debian_version" ]; then + echo "DEBIAN_FRONTEND=noninteractive" >> $GITHUB_ENV + export DEBIAN_FRONTEND=noninteractive + fi + if [ -n "${{matrix.container}}" ] && [ -f "/etc/debian_version" ]; then + apt-get -o Acquire::Retries=$NET_RETRY_COUNT update + apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y sudo software-properties-common + # Need (newer) git, and the older Ubuntu container may require requesting the key manually using port 80 + apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E1DD270288B4E6030699E45FA1715D88E1DF1F24 + for i in {1..${NET_RETRY_COUNT:-3}}; do sudo -E add-apt-repository -y ppa:git-core/ppa && break || sleep 10; done + apt-get -o Acquire::Retries=$NET_RETRY_COUNT update + apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y g++ python libpython-dev git + fi + # For jobs not compatible with ccache, use "ccache: no" in the matrix + if [[ "${{ matrix.ccache }}" == "no" ]]; then + echo "B2_USE_CCACHE=0" >> $GITHUB_ENV + fi + git config --global pack.threads 0 + + - uses: actions/checkout@v3 + with: + # For coverage builds fetch the whole history, else only 1 commit using a 'fake ternary' + fetch-depth: ${{ matrix.coverage && '0' || '1' }} + + - name: Cache ccache + uses: actions/cache@v3 + if: env.B2_USE_CCACHE + with: + path: ~/.ccache + key: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}} + + - name: Fetch Boost.CI + uses: actions/checkout@v3 + with: + repository: boostorg/boost-ci + ref: master + path: boost-ci-cloned + + - name: Get CI scripts folder + run: | + # Copy ci folder if not testing Boost.CI + [[ "$GITHUB_REPOSITORY" =~ "boost-ci" ]] || cp -r boost-ci-cloned/ci . + rm -rf boost-ci-cloned + + - name: Install packages + if: startsWith(matrix.os, 'ubuntu') + run: | + SOURCE_KEYS=(${{join(matrix.source_keys, ' ')}}) + SOURCES=(${{join(matrix.sources, ' ')}}) + # Add this by default + SOURCES+=(ppa:ubuntu-toolchain-r/test) + for key in "${SOURCE_KEYS[@]}"; do + for i in {1..$NET_RETRY_COUNT}; do + wget -O - "$key" | sudo apt-key add - && break || sleep 10 + done + done + for source in "${SOURCES[@]}"; do + for i in {1..$NET_RETRY_COUNT}; do + sudo add-apt-repository $source && break || sleep 10 + done + done + sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT update + if [[ -z "${{matrix.install}}" ]]; then + pkgs="${{matrix.compiler}}" + pkgs="${pkgs/gcc-/g++-}" + else + pkgs="${{matrix.install}}" + fi + sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y $pkgs + + - name: Setup GCC Toolchain + if: matrix.gcc_toolchain + run: | + GCC_TOOLCHAIN_ROOT="$HOME/gcc-toolchain" + echo "GCC_TOOLCHAIN_ROOT=$GCC_TOOLCHAIN_ROOT" >> $GITHUB_ENV + MULTIARCH_TRIPLET="$(dpkg-architecture -qDEB_HOST_MULTIARCH)" + mkdir -p "$GCC_TOOLCHAIN_ROOT" + ln -s /usr/include "$GCC_TOOLCHAIN_ROOT/include" + ln -s /usr/bin "$GCC_TOOLCHAIN_ROOT/bin" + mkdir -p "$GCC_TOOLCHAIN_ROOT/lib/gcc/$MULTIARCH_TRIPLET" + ln -s "/usr/lib/gcc/$MULTIARCH_TRIPLET/${{matrix.gcc_toolchain}}" "$GCC_TOOLCHAIN_ROOT/lib/gcc/$MULTIARCH_TRIPLET/${{matrix.gcc_toolchain}}" + + - name: Setup multiarch + if: matrix.multiarch + run: | + sudo apt-get install --no-install-recommends -y binfmt-support qemu-user-static + sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + git clone https://github.com/jeking3/bdde.git + echo "$(pwd)/bdde/bin/linux" >> ${GITHUB_PATH} + echo "BDDE_DISTRO=${{ matrix.distro }}" >> ${GITHUB_ENV} + echo "BDDE_EDITION=${{ matrix.edition }}" >> ${GITHUB_ENV} + echo "BDDE_ARCH=${{ matrix.arch }}" >> ${GITHUB_ENV} + echo "B2_WRAPPER=bdde" >> ${GITHUB_ENV} + + - name: Setup Boost + env: + B2_ADDRESS_MODEL: ${{matrix.address-model}} + B2_COMPILER: ${{matrix.compiler}} + B2_CXXSTD: ${{matrix.cxxstd}} + B2_SANITIZE: ${{matrix.sanitize}} + B2_STDLIB: ${{matrix.stdlib}} + # More entries can be added in the same way, see the B2_ARGS assignment in ci/enforce.sh for the possible keys. + # B2_DEFINES: ${{matrix.defines}} + # Variables set here (to non-empty) will override the top-level environment variables, e.g. + # B2_VARIANT: ${{matrix.variant}} + run: source ci/github/install.sh + + - name: Setup coverage collection + if: matrix.coverage + run: ci/github/codecov.sh "setup" + + - name: Run tests + if: '!matrix.coverity' + run: ci/build.sh + + - name: Upload coverage + if: matrix.coverage + run: ci/codecov.sh "upload" + + - name: Run coverity + if: matrix.coverity && github.event_name == 'push' && (github.ref_name == 'develop' || github.ref_name == 'master') + run: ci/github/coverity.sh + env: + COVERITY_SCAN_NOTIFICATION_EMAIL: ${{ secrets.COVERITY_SCAN_NOTIFICATION_EMAIL }} + COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} + + windows: + defaults: + run: + shell: cmd + strategy: + fail-fast: false + matrix: + include: + - { toolset: msvc-14.2, cxxstd: '14,17,20', addrmd: '32,64', os: windows-2019 } + - { name: Collect coverage, coverage: yes, + toolset: msvc-14.3, cxxstd: '14,17,20', addrmd: '32,64', os: windows-2022 } + - { toolset: gcc, cxxstd: '03,11,14,17,2a', addrmd: '64', os: windows-2019 } + + runs-on: ${{matrix.os}} + + steps: + - uses: actions/checkout@v3 + + - name: Fetch Boost.CI + uses: actions/checkout@v3 + with: + repository: boostorg/boost-ci + ref: master + path: boost-ci-cloned + - name: Get CI scripts folder + run: | + REM Copy ci folder if not testing Boost.CI + if "%GITHUB_REPOSITORY%" == "%GITHUB_REPOSITORY:boost-ci=%" xcopy /s /e /q /i /y boost-ci-cloned\ci .\ci + rmdir /s /q boost-ci-cloned + + - name: Setup Boost + run: ci\github\install.bat + + - name: Run tests + if: '!matrix.coverage' + run: ci\build.bat + env: + B2_TOOLSET: ${{matrix.toolset}} + B2_CXXSTD: ${{matrix.cxxstd}} + B2_ADDRESS_MODEL: ${{matrix.addrmd}} + + - name: Collect coverage + shell: powershell + if: matrix.coverage + run: ci\opencppcoverage.ps1 + env: + B2_TOOLSET: ${{matrix.toolset}} + B2_CXXSTD: ${{matrix.cxxstd}} + B2_ADDRESS_MODEL: ${{matrix.addrmd}} + + - name: Upload coverage + if: matrix.coverage + uses: codecov/codecov-action@v2 + with: + files: __out/cobertura.xml + + MSYS2: + defaults: + run: + shell: msys2 {0} + strategy: + fail-fast: false + matrix: + include: + - { sys: MINGW32, compiler: gcc, cxxstd: '03,11,17,20' } + - { sys: MINGW64, compiler: gcc, cxxstd: '03,11,17,20' } + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v3 + + - name: Setup MSYS2 environment + uses: msys2/setup-msys2@v2 + with: + msystem: ${{matrix.sys}} + update: true + install: git python + pacboy: gcc:p cmake:p ninja:p + + - name: Fetch Boost.CI + uses: actions/checkout@v3 + with: + repository: boostorg/boost-ci + ref: master + path: boost-ci-cloned + - name: Get CI scripts folder + run: | + # Copy ci folder if not testing Boost.CI + [[ "$GITHUB_REPOSITORY" =~ "boost-ci" ]] || cp -r boost-ci-cloned/ci . + rm -rf boost-ci-cloned + + - name: Setup Boost + env: + B2_COMPILER: ${{matrix.compiler}} + B2_CXXSTD: ${{matrix.cxxstd}} + B2_SANITIZE: ${{matrix.sanitize}} + B2_STDLIB: ${{matrix.stdlib}} + run: ci/github/install.sh + + - name: Run tests + run: ci/build.sh + + # Run also the CMake tests to avoid having to setup another matrix for CMake on MSYS + - name: Run CMake tests + run: | + cd "$BOOST_ROOT" + mkdir __build_cmake_test__ && cd __build_cmake_test__ + cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBOOST_INCLUDE_LIBRARIES=$SELF -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DBoost_VERBOSE=ON .. + cmake --build . --target tests --config Debug -j$B2_JOBS + ctest --output-on-failure --build-config Debug + + CMake: + defaults: + run: + shell: bash + + strategy: + fail-fast: false + matrix: + include: + - { os: ubuntu-20.04, build_shared: ON, build_type: Debug, generator: 'Unix Makefiles' } + - { os: ubuntu-20.04, build_shared: OFF, build_type: Debug, generator: 'Unix Makefiles' } + - { os: windows-2019, build_shared: ON, build_type: Debug, generator: 'Visual Studio 16 2019' } + - { os: windows-2019, build_shared: OFF, build_type: Debug, generator: 'Visual Studio 16 2019' } + + timeout-minutes: 120 + runs-on: ${{matrix.os}} + + steps: + - uses: actions/checkout@v3 + - name: Fetch Boost.CI + uses: actions/checkout@v3 + with: + repository: boostorg/boost-ci + ref: master + path: boost-ci-cloned + - name: Get CI scripts folder + run: | + # Copy ci folder if not testing Boost.CI + [[ "$GITHUB_REPOSITORY" =~ "boost-ci" ]] || cp -r boost-ci-cloned/ci . + rm -rf boost-ci-cloned + - name: Setup Boost + env: {B2_DONT_BOOTSTRAP: 1} + run: source ci/github/install.sh + + - name: Run CMake tests + run: | + cd "$BOOST_ROOT" + mkdir __build_cmake_test__ && cd __build_cmake_test__ + cmake -G "${{matrix.generator}}" -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DBOOST_INCLUDE_LIBRARIES=$SELF -DBUILD_SHARED_LIBS=${{matrix.build_shared}} -DBUILD_TESTING=ON -DBoost_VERBOSE=ON .. + cmake --build . --target tests --config ${{matrix.build_type}} -j$B2_JOBS + ctest --output-on-failure --build-config ${{matrix.build_type}} + + - name: Run CMake subdir tests + run: | + cmake_test_folder="$BOOST_ROOT/libs/$SELF/test/cmake_test" # New unified folder + [ -d "$cmake_test_folder" ] || cmake_test_folder="$BOOST_ROOT/libs/$SELF/test/cmake_subdir_test" + cd "$cmake_test_folder" + mkdir __build_cmake_subdir_test__ && cd __build_cmake_subdir_test__ + extra_args="" + # On Windows DLLs need to be either in PATH or in the same folder as the executable, so put all binaries into the same folder + if [[ "$RUNNER_OS" == "Windows" ]] && [[ "${{matrix.build_shared}}" == "ON" ]]; then + extra_args="-DCMAKE_RUNTIME_OUTPUT_DIRECTORY='$(pwd)/bin'" + fi + cmake -G "${{matrix.generator}}" -DBOOST_CI_INSTALL_TEST=OFF -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DBUILD_SHARED_LIBS=${{matrix.build_shared}} $extra_args .. + cmake --build . --config ${{matrix.build_type}} -j$B2_JOBS + ctest --output-on-failure --build-config ${{matrix.build_type}} + + - name: Install Library + run: | + BCM_INSTALL_PATH=/tmp/boost_install + echo "BCM_INSTALL_PATH=$BCM_INSTALL_PATH" >> $GITHUB_ENV + cd "$BOOST_ROOT" + mkdir __build_cmake_install_test__ && cd __build_cmake_install_test__ + cmake -G "${{matrix.generator}}" -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DBOOST_INCLUDE_LIBRARIES=$SELF -DBUILD_SHARED_LIBS=${{matrix.build_shared}} -DCMAKE_INSTALL_PREFIX="$BCM_INSTALL_PATH" -DBoost_VERBOSE=ON -DBoost_DEBUG=ON .. + cmake --build . --target install --config ${{matrix.build_type}} -j$B2_JOBS + - name: Run CMake install tests + run: | + cmake_test_folder="$BOOST_ROOT/libs/$SELF/test/cmake_test" # New unified folder + [ -d "$cmake_test_folder" ] || cmake_test_folder="$BOOST_ROOT/libs/$SELF/test/cmake_install_test" + cd "$cmake_test_folder" + mkdir __build_cmake_install_test__ && cd __build_cmake_install_test__ + cmake -G "${{matrix.generator}}" -DBOOST_CI_INSTALL_TEST=ON -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DBUILD_SHARED_LIBS=${{matrix.build_shared}} -DCMAKE_PREFIX_PATH="$BCM_INSTALL_PATH" .. + cmake --build . --config ${{matrix.build_type}} -j$B2_JOBS + if [[ "${{matrix.build_shared}}" == "ON" ]]; then + # Make sure shared libs can be found at runtime + if [ "$RUNNER_OS" == "Windows" ]; then + export PATH="$BCM_INSTALL_PATH/bin:$PATH" + else + export LD_LIBRARY_PATH="$BCM_INSTALL_PATH/lib:$LD_LIBRARY_PATH" + fi + fi + ctest --output-on-failure --build-config ${{matrix.build_type}} From 8ffed07f630400e6210bc0dbc09d0a919b400f4a Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Thu, 30 Sep 2021 13:17:26 +0200 Subject: [PATCH 13/90] Test with and without ICU --- .github/workflows/ci.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9efb523b..7a189bae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -162,7 +162,7 @@ jobs: else pkgs="${{matrix.install}}" fi - sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y $pkgs + sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y $pkgs libicu-dev - name: Setup GCC Toolchain if: matrix.gcc_toolchain @@ -205,9 +205,22 @@ jobs: if: matrix.coverage run: ci/github/codecov.sh "setup" - - name: Run tests + - name: Run tests no ICU/iconv + if: '!matrix.coverity' + run: ci/build.sh + env: {B2_FLAGS: -a boost.locale.icu=off boost.locale.iconv=off} + - name: Run tests with iconv + if: '!matrix.coverity' + run: ci/build.sh + env: {B2_FLAGS: -a boost.locale.icu=off boost.locale.iconv=on} + - name: Run tests with ICU + if: '!matrix.coverity' + run: ci/build.sh + env: {B2_FLAGS: -a boost.locale.icu=on boost.locale.iconv=off} + - name: Run tests with ICU/iconv if: '!matrix.coverity' run: ci/build.sh + env: {B2_FLAGS: -a boost.locale.icu=on boost.locale.iconv=on} - name: Upload coverage if: matrix.coverage From b283ec8f3591718157fa6278ff69176d399e957f Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Sat, 16 Apr 2022 12:04:39 +0200 Subject: [PATCH 14/90] Add appveyor CI --- .appveyor.yml | 137 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 .appveyor.yml diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 00000000..9b919157 --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,137 @@ +# Copyright 2016, 2017 Peter Dimov +# Copyright 2017 - 2019 James E. King III +# Copyright 2019 - 2021 Alexander Grund +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +# +# Generic Appveyor build script for boostorg repositories +# See: https://github.com/boostorg/boost-ci/ +# +# Instructions for customizing this script for your library: +# +# 1. Customize the compilers and language levels you want. +# 2. If you have more than include/, src/, test/, example/, examples/, +# benchmark/ or tools/ directories, set the environment variable DEPINST. +# For example if your build uses code in "bench/" and "fog/" directories: +# - DEPINST: --include bench --include fog +# 3. Enable pull request builds in your boostorg/ account. +# +# That's it - the script will do everything else for you. +# + +version: 1.0.{build}-{branch} + +shallow_clone: true + +branches: + only: + - master + - develop + - /bugfix\/.*/ + - /feature\/.*/ + - /fix\/.*/ + - /pr\/.*/ + +matrix: + fast_finish: false + # Adding MAYFAIL to any matrix job allows it to fail but the build stays green: + allow_failures: + - MAYFAIL: true + +environment: + global: + B2_CI_VERSION: 1 + GIT_FETCH_JOBS: 4 + # see: http://www.boost.org/build/doc/html/bbv2/overview/invocation.html#bbv2.overview.invocation.properties + # to use the default for a given environment, comment it out; recommend you build debug and release however: + # on Windows it is important to exercise all the possibilities, especially shared vs static, however most + # libraries that care about this exercise it in their Jamfiles... + B2_ADDRESS_MODEL: 32,64 + B2_LINK: shared,static + # B2_THREADING: threading=multi,single + B2_VARIANT: release + + matrix: + - FLAVOR: Visual Studio 2022 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 + B2_CXXFLAGS: -permissive- + B2_CXXSTD: 14,17,20 + B2_TOOLSET: msvc-14.3 + + - FLAVOR: Visual Studio 2019 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + B2_CXXFLAGS: -permissive- + B2_CXXSTD: 14,17,2a + B2_TOOLSET: msvc-14.2 + + - FLAVOR: Visual Studio 2017 C++2a Strict + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + B2_CXXFLAGS: -permissive- + B2_CXXSTD: 2a + B2_TOOLSET: msvc-14.1 + + - FLAVOR: Visual Studio 2017 C++14/17 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + B2_CXXSTD: 14,17 + B2_TOOLSET: msvc-14.1 + + - FLAVOR: clang-cl + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + B2_ADDRESS_MODEL: 64 + B2_CXXSTD: 11,14,17 + B2_TOOLSET: clang-win + + - FLAVOR: Visual Studio 2015, 2013 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + B2_TOOLSET: msvc-12.0,msvc-14.0 + + - FLAVOR: Visual Studio 2008, 2010, 2012 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + B2_TOOLSET: msvc-9.0,msvc-10.0,msvc-11.0 + B2_ADDRESS_MODEL: 32 # No 64bit support + + - FLAVOR: cygwin (32-bit) + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + ADDPATH: C:\cygwin\bin; + B2_ADDRESS_MODEL: 32 + B2_CXXSTD: 03,11,14,1z + B2_TOOLSET: gcc + + - FLAVOR: cygwin (64-bit) + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + ADDPATH: C:\cygwin64\bin; + B2_ADDRESS_MODEL: 64 + B2_CXXSTD: 03,11,14,1z + B2_TOOLSET: gcc + + - FLAVOR: mingw32 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + B2_ADDRESS_MODEL: 32 + ADDPATH: C:\mingw\bin; + B2_CXXSTD: 03,11,14,1z + B2_TOOLSET: gcc + + - FLAVOR: mingw64 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + ADDPATH: C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin; + B2_ADDRESS_MODEL: 64 + B2_CXXSTD: 03,11,14,17,2a + B2_TOOLSET: gcc + +install: + - git clone --depth 1 https://github.com/boostorg/boost-ci.git C:\boost-ci-cloned + # Copy ci folder if not testing Boost.CI + - if NOT "%APPVEYOR_PROJECT_NAME%" == "boost-ci" xcopy /s /e /q /i /y C:\boost-ci-cloned\ci .\ci + - rmdir /s /q C:\boost-ci-cloned + - ci\appveyor\install.bat + +build: off + +test_script: ci\build.bat + +for: + # CodeCov coverage build + - matrix: + only: [COVERAGE: true] + test_script: [ps: ci\codecov.ps1] From dc55ea3ab1d4df7f0032147664df2a39cf5c66a8 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Mon, 11 Apr 2022 21:16:43 +0200 Subject: [PATCH 15/90] Add tests to CMake build --- test/CMakeLists.txt | 79 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 test/CMakeLists.txt diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 00000000..08f9c961 --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,79 @@ +# Copyright 2022 Alexander Grund +# Distributed under the Boost Software License, Version 1.0. +# https://www.boost.org/LICENSE_1_0.txt + +if(NOT TARGET tests) + add_custom_target(tests) +endif() + +# Library config as determined by configure tests +set(boost_locale_defines "") +if(BOOST_LOCALE_ENABLE_ICONV) + list(APPEND boost_locale_defines BOOST_LOCALE_WITH_ICONV=1) +endif() +if(BOOST_LOCALE_ENABLE_ICU) + list(APPEND boost_locale_defines BOOST_LOCALE_WITH_ICU=1) +endif() +if(NOT BOOST_LOCALE_ENABLE_STD) + list(APPEND boost_locale_defines BOOST_LOCALE_NO_STD_BACKEND=1) +endif() +if(NOT BOOST_LOCALE_ENABLE_WINAPI) + list(APPEND boost_locale_defines BOOST_LOCALE_NO_WINAPI_BACKEND=1) +endif() +if(NOT BOOST_LOCALE_ENABLE_POSIX) + list(APPEND boost_locale_defines BOOST_LOCALE_NO_POSIX_BACKEND=1) +endif() + +function(boost_locale_add_test name) + cmake_parse_arguments(PARSE_ARGV 1 ARG "COMPILE_ONLY" "SRC;WORKING_DIRECTORY" "ARGS") + + if(NOT ARG_SRC) + set(ARG_SRC ${name}.cpp) + endif() + set(name ${PROJECT_NAME}-${name}) + + add_executable(${name} ${ARG_SRC}) + add_dependencies(tests ${name}) + target_link_libraries(${name} PRIVATE Boost::locale) + target_compile_definitions(${name} PRIVATE ${boost_locale_defines}) + + if(ARG_WORKING_DIRECTORY) + set_target_properties(${name} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${ARG_WORKING_DIRECTORY}") + endif() + + if(NOT ARG_COMPILE_ONLY) + add_test(NAME ${name} COMMAND ${name} ${ARG_ARGS}) + if(ARG_WORKING_DIRECTORY) + set_tests_properties(${name} PROPERTIES WORKING_DIRECTORY "${ARG_WORKING_DIRECTORY}") + endif() + endif() +endfunction() + +boost_locale_add_test(test_config) +# Shared +boost_locale_add_test(test_utf) +boost_locale_add_test(test_date_time) +boost_locale_add_test(test_ios_prop) +boost_locale_add_test(test_codecvt) +boost_locale_add_test(test_codepage_converter) +boost_locale_add_test(test_codepage) +boost_locale_add_test(test_message WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") +boost_locale_add_test(test_generator) +# icu +boost_locale_add_test(test_collate) +boost_locale_add_test(test_convert) +boost_locale_add_test(test_boundary) +boost_locale_add_test(test_formatting) +boost_locale_add_test(test_icu_vs_os_timezone) +# winapi +boost_locale_add_test(test_winapi_collate) +boost_locale_add_test(test_winapi_convert) +boost_locale_add_test(test_winapi_formatting) +# posix +boost_locale_add_test(test_posix_collate) +boost_locale_add_test(test_posix_convert) +boost_locale_add_test(test_posix_formatting) +# std +boost_locale_add_test(test_std_collate) +boost_locale_add_test(test_std_convert) +boost_locale_add_test(test_std_formatting) From 703df1e6c1329d0250fbb84407d14ef9518da62a Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Sat, 16 Apr 2022 12:00:30 +0200 Subject: [PATCH 16/90] Add CMake subdir test files --- test/cmake_test/CMakeLists.txt | 82 ++++++++++++++++++++++++++++++++++ test/cmake_test/main.cpp | 38 ++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 test/cmake_test/CMakeLists.txt create mode 100644 test/cmake_test/main.cpp diff --git a/test/cmake_test/CMakeLists.txt b/test/cmake_test/CMakeLists.txt new file mode 100644 index 00000000..0de69502 --- /dev/null +++ b/test/cmake_test/CMakeLists.txt @@ -0,0 +1,82 @@ +# Copyright 2022 Alexander Grund +# Distributed under the Boost Software License, Version 1.0. +# https://www.boost.org/LICENSE_1_0.txt + +cmake_minimum_required(VERSION 3.5...3.16) + +project(cmake_subdir_test LANGUAGES CXX) + +# Those 2 should work the same +if(DEFINED BOOST_CI_INSTALL_TEST AND BOOST_CI_INSTALL_TEST) + message("Using installed Boost") + find_package(boost_locale REQUIRED) +else() + message("Building Boost") + add_subdirectory(../.. boostorg/locale) + set(deps + # Primary dependencies + assert + config + function + iterator + smart_ptr + static_assert + type_traits + thread + unordered + + # Secondary dependencies + algorithm + align + array + atomic + bind + chrono + concept_check + container + container_hash + conversion + core + date_time + detail + exception + function_types + fusion + integer + intrusive + io + lexical_cast + move + mp11 + mpl + numeric/conversion + optional + predef + preprocessor + range + ratio + rational + regex + system + throw_exception + tokenizer + tuple + type_index + typeof + utility + variant2 + winapi + ) + + foreach(dep IN LISTS deps) + add_subdirectory(../../../${dep} boostorg/${dep}) + endforeach() +endif() + +add_executable(main main.cpp) +target_link_libraries(main Boost::locale Boost::system) + +enable_testing() +add_test(NAME main COMMAND main) + +add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $) diff --git a/test/cmake_test/main.cpp b/test/cmake_test/main.cpp new file mode 100644 index 00000000..37d84eb2 --- /dev/null +++ b/test/cmake_test/main.cpp @@ -0,0 +1,38 @@ +// +// Copyright (c) 2022 Alexander Grund +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include +#include +#include + +int main() +{ + // Simple test that including a library header and using an exported function works + #ifndef BOOST_NO_CXX11_SMART_PTR + std::cout << "create_utf8_converter_unique_ptr" << std::endl; + std::unique_ptr cvt = boost::locale::util::create_utf8_converter_unique_ptr(); + #elif BOOST_LOCALE_USE_AUTO_PTR + std::cout << "create_utf8_converter" << std::endl; + std::auto_ptr cvt = boost::locale::util::create_utf8_converter(); + #else + std::cout << "create_utf8_converter_new_ptr" << std::endl; + boost::locale::hold_ptr cvt(boost::locale::util::create_utf8_converter_new_ptr()); + #endif + + if(cvt.get()) + { + std::cout << "Created..." << std::endl; + assert(cvt->is_thread_safe()); + assert(cvt->max_len() == 4); + }else + { + std::cout << "Failed creation..." << std::endl; + } + + return cvt.get() ? 0 : 1; +} From 4730a4eb9d92fccbd25fbe20de1ec7f2f0bed7b3 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 25 May 2022 17:09:48 +0200 Subject: [PATCH 17/90] Workaround Clang bug in test_config Reading the C++ locales name on Clang before 3.8 leads to a segfault. Simply skip that part for now. --- test/test_config.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/test_config.cpp b/test/test_config.cpp index 2205a865..5c4a2191 100644 --- a/test/test_config.cpp +++ b/test/test_config.cpp @@ -87,7 +87,11 @@ int main() try { std::locale loc(""); +#if defined(BOOST_CLANG) && BOOST_CLANG_VERSION < 30800 + std::cout << "- C++ locale: n/a on Clang < 3.8" << std::endl; +#else std::cout << "- C++ locale: " << loc.name() << std::endl; +#endif } catch(std::exception const &) { std::cout << "- C++ locale: is not supported" << std::endl; From 36f718e12dbbfb2f96c3691ab8c75e37487b146a Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Mon, 11 Apr 2022 21:28:00 +0200 Subject: [PATCH 18/90] CI: Test only building the library when using ICU Tests currently fail depending on the ICU version. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a189bae..1c1aaee5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -216,11 +216,11 @@ jobs: - name: Run tests with ICU if: '!matrix.coverity' run: ci/build.sh - env: {B2_FLAGS: -a boost.locale.icu=on boost.locale.iconv=off} + env: {B2_FLAGS: -a boost.locale.icu=on boost.locale.iconv=off testing.execute=off} - name: Run tests with ICU/iconv if: '!matrix.coverity' run: ci/build.sh - env: {B2_FLAGS: -a boost.locale.icu=on boost.locale.iconv=on} + env: {B2_FLAGS: -a boost.locale.icu=on boost.locale.iconv=on testing.execute=off} - name: Upload coverage if: matrix.coverage From 3802e8ecb959a7897c16821bbd8ef4f8547c26d6 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Mon, 23 May 2022 15:42:43 +0200 Subject: [PATCH 19/90] CI: Test only building the library on Windows Tests currently fail due to design issues. --- .appveyor.yml | 1 + .github/workflows/ci.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.appveyor.yml b/.appveyor.yml index 9b919157..fc366a88 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -51,6 +51,7 @@ environment: B2_LINK: shared,static # B2_THREADING: threading=multi,single B2_VARIANT: release + B2_FLAGS: testing.execute=off matrix: - FLAVOR: Visual Studio 2022 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1c1aaee5..ba819862 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -247,6 +247,7 @@ jobs: - { toolset: gcc, cxxstd: '03,11,14,17,2a', addrmd: '64', os: windows-2019 } runs-on: ${{matrix.os}} + env: {B2_FLAGS: testing.execute=off} steps: - uses: actions/checkout@v3 From 817538cd70629ef0be9bb8d96df33ff2ed2aa2fd Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Tue, 24 May 2022 14:43:23 +0200 Subject: [PATCH 20/90] Disable failing CMake tests --- test/CMakeLists.txt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 08f9c961..6d4fec13 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -56,14 +56,23 @@ boost_locale_add_test(test_date_time) boost_locale_add_test(test_ios_prop) boost_locale_add_test(test_codecvt) boost_locale_add_test(test_codepage_converter) -boost_locale_add_test(test_codepage) +if(MSVC) + boost_locale_add_test(test_codepage COMPILE_ONLY) +else() + boost_locale_add_test(test_codepage) +endif() boost_locale_add_test(test_message WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") boost_locale_add_test(test_generator) # icu boost_locale_add_test(test_collate) boost_locale_add_test(test_convert) -boost_locale_add_test(test_boundary) -boost_locale_add_test(test_formatting) +if(WIN32) + boost_locale_add_test(test_boundary) + boost_locale_add_test(test_formatting) +else() + boost_locale_add_test(test_boundary COMPILE_ONLY) + boost_locale_add_test(test_formatting COMPILE_ONLY) +endif() boost_locale_add_test(test_icu_vs_os_timezone) # winapi boost_locale_add_test(test_winapi_collate) From 608e0151745d02492e41f7ce2088be6f95cec1e7 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 25 May 2022 20:31:08 +0200 Subject: [PATCH 21/90] Disable ASAN on OSX Fails due to a bug (false positive?) in the standard library function strfmon_l. --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba819862..2128b4ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,7 +84,7 @@ jobs: compiler: clang-12, cxxstd: '03,11,14,17,20', os: ubuntu-20.04, stdlib: libc++, install: 'clang-12 libc++-12-dev libc++abi-12-dev' } # OSX, clang - - { compiler: clang, cxxstd: '03,11,14,17,2a', os: macos-10.15, sanitize: yes } + - { compiler: clang, cxxstd: '03,11,14,17,2a', os: macos-10.15, ubsan: yes } timeout-minutes: 120 runs-on: ${{matrix.os}} @@ -199,6 +199,7 @@ jobs: # B2_DEFINES: ${{matrix.defines}} # Variables set here (to non-empty) will override the top-level environment variables, e.g. # B2_VARIANT: ${{matrix.variant}} + B2_UBSAN: ${{matrix.ubsan}} run: source ci/github/install.sh - name: Setup coverage collection From 3b2acff314208c9242e1dfd9b8c89b11ba4fc438 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 25 May 2022 17:44:18 +0200 Subject: [PATCH 22/90] Fix visibility of classes --- include/boost/locale/boundary/facets.hpp | 4 ++ include/boost/locale/conversion.hpp | 4 ++ include/boost/locale/info.hpp | 2 + include/boost/locale/message.hpp | 71 ++---------------------- include/boost/locale/util.hpp | 6 +- src/shared/ids.cpp | 24 ++++++-- src/util/codecvt_converter.cpp | 2 + src/util/info.cpp | 1 + 8 files changed, 38 insertions(+), 76 deletions(-) diff --git a/include/boost/locale/boundary/facets.hpp b/include/boost/locale/boundary/facets.hpp index 26c01e7d..8aee6e39 100644 --- a/include/boost/locale/boundary/facets.hpp +++ b/include/boost/locale/boundary/facets.hpp @@ -131,6 +131,7 @@ namespace boost { boundary_indexing(size_t refs=0) : std::locale::facet(refs) { } + ~boundary_indexing(); virtual index_type map(boundary_type t,char const *begin,char const *end) const = 0; static std::locale::id id; #if defined (__SUNPRO_CC) && defined (_RWSTD_VER) @@ -144,6 +145,7 @@ namespace boost { boundary_indexing(size_t refs=0) : std::locale::facet(refs) { } + ~boundary_indexing(); virtual index_type map(boundary_type t,wchar_t const *begin,wchar_t const *end) const = 0; static std::locale::id id; @@ -159,6 +161,7 @@ namespace boost { boundary_indexing(size_t refs=0) : std::locale::facet(refs) { } + ~boundary_indexing(); virtual index_type map(boundary_type t,char16_t const *begin,char16_t const *end) const = 0; static std::locale::id id; #if defined (__SUNPRO_CC) && defined (_RWSTD_VER) @@ -174,6 +177,7 @@ namespace boost { boundary_indexing(size_t refs=0) : std::locale::facet(refs) { } + ~boundary_indexing(); virtual index_type map(boundary_type t,char32_t const *begin,char32_t const *end) const = 0; static std::locale::id id; #if defined (__SUNPRO_CC) && defined (_RWSTD_VER) diff --git a/include/boost/locale/conversion.hpp b/include/boost/locale/conversion.hpp index 36f3a4fd..3781f324 100644 --- a/include/boost/locale/conversion.hpp +++ b/include/boost/locale/conversion.hpp @@ -83,6 +83,7 @@ namespace boost { converter(size_t refs = 0) : std::locale::facet(refs) { } + ~converter(); virtual std::string convert(conversion_type how,char const *begin,char const *end,int flags = 0) const = 0; #if defined (__SUNPRO_CC) && defined (_RWSTD_VER) std::locale::id& __get_id (void) const { return id; } @@ -96,6 +97,7 @@ namespace boost { converter(size_t refs = 0) : std::locale::facet(refs) { } + ~converter(); virtual std::wstring convert(conversion_type how,wchar_t const *begin,wchar_t const *end,int flags = 0) const = 0; #if defined (__SUNPRO_CC) && defined (_RWSTD_VER) std::locale::id& __get_id (void) const { return id; } @@ -110,6 +112,7 @@ namespace boost { converter(size_t refs = 0) : std::locale::facet(refs) { } + ~converter(); virtual std::u16string convert(conversion_type how,char16_t const *begin,char16_t const *end,int flags = 0) const = 0; #if defined (__SUNPRO_CC) && defined (_RWSTD_VER) std::locale::id& __get_id (void) const { return id; } @@ -125,6 +128,7 @@ namespace boost { converter(size_t refs = 0) : std::locale::facet(refs) { } + ~converter(); virtual std::u32string convert(conversion_type how,char32_t const *begin,char32_t const *end,int flags = 0) const = 0; #if defined (__SUNPRO_CC) && defined (_RWSTD_VER) std::locale::id& __get_id (void) const { return id; } diff --git a/include/boost/locale/info.hpp b/include/boost/locale/info.hpp index 814d0072..ba8a1fbd 100644 --- a/include/boost/locale/info.hpp +++ b/include/boost/locale/info.hpp @@ -27,6 +27,8 @@ namespace boost { class BOOST_LOCALE_DECL info : public std::locale::facet { public: + ~info(); + static std::locale::id id; ///< This member uniquely defines this facet, required by STL /// diff --git a/include/boost/locale/message.hpp b/include/boost/locale/message.hpp index a56bb8ad..7201386a 100644 --- a/include/boost/locale/message.hpp +++ b/include/boost/locale/message.hpp @@ -38,23 +38,14 @@ namespace boost { /// @{ /// - /// \cond INTERNAL - - template - struct base_message_format: public std::locale::facet - { - }; - - /// \endcond - /// /// \brief This facet provides message formatting abilities /// template - class message_format : public base_message_format + class BOOST_LOCALE_DECL message_format : public std::locale::facet { public: - + static std::locale::id id; /// /// Character type /// @@ -67,8 +58,7 @@ namespace boost { /// /// Default constructor /// - message_format(size_t refs = 0) : - base_message_format(refs) + message_format(size_t refs = 0) : std::locale::facet(refs) { } @@ -117,10 +107,7 @@ namespace boost { std::locale::id& __get_id (void) const { return id; } #endif protected: - virtual ~message_format() - { - } - + virtual ~message_format(); }; /// \cond INTERNAL @@ -707,56 +694,6 @@ namespace boost { return basic_message(context,s,p,n).str(loc,domain); } - /// - /// \cond INTERNAL - /// - - template<> - struct BOOST_LOCALE_DECL base_message_format : public std::locale::facet - { - base_message_format(size_t refs = 0) : std::locale::facet(refs) - { - } - static std::locale::id id; - }; - - template<> - struct BOOST_LOCALE_DECL base_message_format : public std::locale::facet - { - base_message_format(size_t refs = 0) : std::locale::facet(refs) - { - } - static std::locale::id id; - }; - - #ifdef BOOST_LOCALE_ENABLE_CHAR16_T - - template<> - struct BOOST_LOCALE_DECL base_message_format : public std::locale::facet - { - base_message_format(size_t refs = 0) : std::locale::facet(refs) - { - } - static std::locale::id id; - }; - - #endif - - #ifdef BOOST_LOCALE_ENABLE_CHAR32_T - - template<> - struct BOOST_LOCALE_DECL base_message_format : public std::locale::facet - { - base_message_format(size_t refs = 0) : std::locale::facet(refs) - { - } - static std::locale::id id; - }; - - #endif - - /// \endcond - /// /// @} /// diff --git a/include/boost/locale/util.hpp b/include/boost/locale/util.hpp index c3a79f94..b6d4c128 100644 --- a/include/boost/locale/util.hpp +++ b/include/boost/locale/util.hpp @@ -74,7 +74,7 @@ namespace util { /// decompose them in case composite characters are found. So be very careful when implementing /// these converters for certain character set. /// - class base_converter { + class BOOST_LOCALE_DECL base_converter { public: /// @@ -90,9 +90,7 @@ namespace util { /// static const uint32_t incomplete=utf::incomplete; - virtual ~base_converter() - { - } + virtual ~base_converter(); /// /// Return the maximal length that one Unicode code-point can be converted to, for example /// for UTF-8 it is 4, for Shift-JIS it is 2 and ISO-8859-1 is 1 diff --git a/src/shared/ids.cpp b/src/shared/ids.cpp index 952fa85a..414530a2 100644 --- a/src/shared/ids.cpp +++ b/src/shared/ids.cpp @@ -17,40 +17,54 @@ namespace boost { namespace locale { std::locale::id info::id; + // Make sure we have the VTable here (Export/Import issues) + info::~info() {} std::locale::id calendar_facet::id; std::locale::id converter::id; - std::locale::id base_message_format::id; + converter::~converter() {} + template<> std::locale::id message_format::id; + template<> message_format::~message_format() {} std::locale::id converter::id; - std::locale::id base_message_format::id; + converter::~converter() {} + template<> std::locale::id message_format::id; + template<> message_format::~message_format() {} #ifdef BOOST_LOCALE_ENABLE_CHAR16_T std::locale::id converter::id; - std::locale::id base_message_format::id; + converter::~converter() {} + template<> std::locale::id message_format::id; + template<> message_format::~message_format() {} #endif #ifdef BOOST_LOCALE_ENABLE_CHAR32_T std::locale::id converter::id; - std::locale::id base_message_format::id; + converter::~converter() {} + template<> std::locale::id message_format::id; + template<> message_format::~message_format() {} #endif namespace boundary { std::locale::id boundary_indexing::id; + boundary_indexing::~boundary_indexing() {} std::locale::id boundary_indexing::id; + boundary_indexing::~boundary_indexing() {} #ifdef BOOST_LOCALE_ENABLE_CHAR16_T std::locale::id boundary_indexing::id; + boundary_indexing::~boundary_indexing() {} #endif #ifdef BOOST_LOCALE_ENABLE_CHAR32_T std::locale::id boundary_indexing::id; + boundary_indexing::~boundary_indexing() {} #endif } @@ -77,7 +91,7 @@ namespace boost { std::locale l = std::locale::classic(); std::has_facet >(l); std::has_facet >(l); - std::has_facet >(l); + std::has_facet >(l); } } installer; } diff --git a/src/util/codecvt_converter.cpp b/src/util/codecvt_converter.cpp index 1adb6b41..7bfdf3d4 100644 --- a/src/util/codecvt_converter.cpp +++ b/src/util/codecvt_converter.cpp @@ -32,6 +32,8 @@ namespace boost { namespace locale { namespace util { + + base_converter::~base_converter() {} class utf8_converter : public base_converter { public: diff --git a/src/util/info.cpp b/src/util/info.cpp index 67266354..9b062921 100644 --- a/src/util/info.cpp +++ b/src/util/info.cpp @@ -20,6 +20,7 @@ namespace boost { namespace locale { namespace util { + class simple_info : public info { public: simple_info(std::string const &name,size_t refs = 0) : From eb47ca8cee97e5bd7c70fb4f096ee71eab533ab1 Mon Sep 17 00:00:00 2001 From: Flamefire Date: Thu, 26 May 2022 12:12:56 +0200 Subject: [PATCH 23/90] Reintroduce base_message_format Fix definition of the std::locale::id which seems to be inconsistent between platforms for templates. --- include/boost/locale/message.hpp | 63 ++++++++++++++++++++++++++++++-- src/shared/ids.cpp | 8 ++-- 2 files changed, 64 insertions(+), 7 deletions(-) diff --git a/include/boost/locale/message.hpp b/include/boost/locale/message.hpp index 7201386a..c278a183 100644 --- a/include/boost/locale/message.hpp +++ b/include/boost/locale/message.hpp @@ -38,14 +38,21 @@ namespace boost { /// @{ /// + /// \cond INTERNAL + + template + struct base_message_format; + + /// \endcond + /// /// \brief This facet provides message formatting abilities /// template - class BOOST_LOCALE_DECL message_format : public std::locale::facet + class BOOST_LOCALE_DECL message_format : public base_message_format { public: - static std::locale::id id; + /// /// Character type /// @@ -58,7 +65,7 @@ namespace boost { /// /// Default constructor /// - message_format(size_t refs = 0) : std::locale::facet(refs) + message_format(size_t refs = 0) : base_message_format(refs) { } @@ -694,6 +701,56 @@ namespace boost { return basic_message(context,s,p,n).str(loc,domain); } + /// + /// \cond INTERNAL + /// + + template<> + struct BOOST_LOCALE_DECL base_message_format : public std::locale::facet + { + base_message_format(size_t refs = 0) : std::locale::facet(refs) + { + } + static std::locale::id id; + }; + + template<> + struct BOOST_LOCALE_DECL base_message_format : public std::locale::facet + { + base_message_format(size_t refs = 0) : std::locale::facet(refs) + { + } + static std::locale::id id; + }; + + #ifdef BOOST_LOCALE_ENABLE_CHAR16_T + + template<> + struct BOOST_LOCALE_DECL base_message_format : public std::locale::facet + { + base_message_format(size_t refs = 0) : std::locale::facet(refs) + { + } + static std::locale::id id; + }; + + #endif + + #ifdef BOOST_LOCALE_ENABLE_CHAR32_T + + template<> + struct BOOST_LOCALE_DECL base_message_format : public std::locale::facet + { + base_message_format(size_t refs = 0) : std::locale::facet(refs) + { + } + static std::locale::id id; + }; + + #endif + + /// \endcond + /// /// @} /// diff --git a/src/shared/ids.cpp b/src/shared/ids.cpp index 414530a2..f16e491f 100644 --- a/src/shared/ids.cpp +++ b/src/shared/ids.cpp @@ -23,19 +23,19 @@ namespace boost { std::locale::id converter::id; converter::~converter() {} - template<> std::locale::id message_format::id; + std::locale::id base_message_format::id; template<> message_format::~message_format() {} std::locale::id converter::id; converter::~converter() {} - template<> std::locale::id message_format::id; + std::locale::id base_message_format::id; template<> message_format::~message_format() {} #ifdef BOOST_LOCALE_ENABLE_CHAR16_T std::locale::id converter::id; converter::~converter() {} - template<> std::locale::id message_format::id; + std::locale::id base_message_format::id; template<> message_format::~message_format() {} #endif @@ -44,7 +44,7 @@ namespace boost { std::locale::id converter::id; converter::~converter() {} - template<> std::locale::id message_format::id; + std::locale::id base_message_format::id; template<> message_format::~message_format() {} #endif From f89dccf12c7faf55a63bd565f683fa57a7621038 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Thu, 26 May 2022 12:31:30 +0200 Subject: [PATCH 24/90] Make message_format VISIBLE Otherwise OSX UBSAN fails --- include/boost/locale/message.hpp | 4 ++-- src/shared/ids.cpp | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/include/boost/locale/message.hpp b/include/boost/locale/message.hpp index c278a183..69095dae 100644 --- a/include/boost/locale/message.hpp +++ b/include/boost/locale/message.hpp @@ -49,7 +49,7 @@ namespace boost { /// \brief This facet provides message formatting abilities /// template - class BOOST_LOCALE_DECL message_format : public base_message_format + class BOOST_SYMBOL_VISIBLE message_format : public base_message_format { public: @@ -114,7 +114,7 @@ namespace boost { std::locale::id& __get_id (void) const { return id; } #endif protected: - virtual ~message_format(); + virtual ~message_format() {} }; /// \cond INTERNAL diff --git a/src/shared/ids.cpp b/src/shared/ids.cpp index f16e491f..f3443724 100644 --- a/src/shared/ids.cpp +++ b/src/shared/ids.cpp @@ -24,19 +24,16 @@ namespace boost { std::locale::id converter::id; converter::~converter() {} std::locale::id base_message_format::id; - template<> message_format::~message_format() {} std::locale::id converter::id; converter::~converter() {} std::locale::id base_message_format::id; - template<> message_format::~message_format() {} #ifdef BOOST_LOCALE_ENABLE_CHAR16_T std::locale::id converter::id; converter::~converter() {} std::locale::id base_message_format::id; - template<> message_format::~message_format() {} #endif @@ -45,7 +42,6 @@ namespace boost { std::locale::id converter::id; converter::~converter() {} std::locale::id base_message_format::id; - template<> message_format::~message_format() {} #endif From 04e7d5a6d1505c83a8242301a1b81e2962230bb8 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Thu, 30 Sep 2021 12:31:13 +0200 Subject: [PATCH 25/90] Fix compilation without auto-ptr --- include/boost/locale/config.hpp | 5 +++++ include/boost/locale/localization_backend.hpp | 2 +- include/boost/locale/util.hpp | 2 +- src/shared/localization_backend.cpp | 2 +- src/util/codecvt_converter.cpp | 2 +- test/test_codepage_converter.cpp | 21 ++++++++++--------- 6 files changed, 20 insertions(+), 14 deletions(-) diff --git a/include/boost/locale/config.hpp b/include/boost/locale/config.hpp index ab102b4e..8947fca7 100644 --- a/include/boost/locale/config.hpp +++ b/include/boost/locale/config.hpp @@ -31,6 +31,11 @@ #include #endif // auto-linking disabled +#if defined(BOOST_LOCALE_HIDE_AUTO_PTR) || defined(BOOST_NO_AUTO_PTR) +#define BOOST_LOCALE_USE_AUTO_PTR 0 +#else +#define BOOST_LOCALE_USE_AUTO_PTR 1 +#endif #endif // boost/locale/config.hpp // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/include/boost/locale/localization_backend.hpp b/include/boost/locale/localization_backend.hpp index 95bf3bd2..82591d8e 100644 --- a/include/boost/locale/localization_backend.hpp +++ b/include/boost/locale/localization_backend.hpp @@ -102,7 +102,7 @@ namespace boost { /// ~localization_backend_manager(); - #if !defined(BOOST_LOCALE_HIDE_AUTO_PTR) && !defined(BOOST_NO_AUTO_PTR) + #if BOOST_LOCALE_USE_AUTO_PTR /// /// Create new localization backend according to current settings. /// diff --git a/include/boost/locale/util.hpp b/include/boost/locale/util.hpp index b6d4c128..7e7216b2 100644 --- a/include/boost/locale/util.hpp +++ b/include/boost/locale/util.hpp @@ -170,7 +170,7 @@ namespace util { } }; - #if !defined(BOOST_LOCALE_HIDE_AUTO_PTR) && !defined(BOOST_NO_AUTO_PTR) + #if BOOST_LOCALE_USE_AUTO_PTR /// /// This function creates a \a base_converter that can be used for conversion between UTF-8 and /// unicode code points diff --git a/src/shared/localization_backend.cpp b/src/shared/localization_backend.cpp index 0a9b7a28..dac48c1b 100644 --- a/src/shared/localization_backend.cpp +++ b/src/shared/localization_backend.cpp @@ -181,7 +181,7 @@ namespace boost { } - #if !defined(BOOST_LOCALE_HIDE_AUTO_PTR) && !defined(BOOST_NO_AUTO_PTR) + #if BOOST_LOCALE_USE_AUTO_PTR std::auto_ptr localization_backend_manager::get() const { std::auto_ptr r(pimpl_->create()); diff --git a/src/util/codecvt_converter.cpp b/src/util/codecvt_converter.cpp index 7bfdf3d4..da7e1276 100644 --- a/src/util/codecvt_converter.cpp +++ b/src/util/codecvt_converter.cpp @@ -271,7 +271,7 @@ namespace util { return 0; } - #if !defined(BOOST_LOCALE_HIDE_AUTO_PTR) && !defined(BOOST_NO_AUTO_PTR) + #if BOOST_LOCALE_USE_AUTO_PTR std::auto_ptr create_utf8_converter() { std::auto_ptr res(create_utf8_converter_new_ptr()); diff --git a/test/test_codepage_converter.cpp b/test/test_codepage_converter.cpp index a246b292..8204db11 100644 --- a/test/test_codepage_converter.cpp +++ b/test/test_codepage_converter.cpp @@ -14,6 +14,9 @@ #if defined(BOOST_LOCALE_WITH_ICONV) && !defined(BOOST_LOCALE_NO_POSIX_BACKEND) #include "../src/posix/codecvt.hpp" #endif +#if defined(BOOST_NO_CXX11_SMART_PTR) && !BOOST_LOCALE_USE_AUTO_PTR +#include +#endif #include @@ -115,20 +118,16 @@ int main() try { using namespace boost::locale::util; - #ifndef BOOST_NO_CXX11_SMART_PTR - std::unique_ptr cvt; - #else - std::auto_ptr cvt; - #endif - std::cout << "Test UTF-8" << std::endl; std::cout << "- From UTF-8" << std::endl; #ifndef BOOST_NO_CXX11_SMART_PTR - cvt = std::move(create_utf8_converter_unique_ptr()); + std::unique_ptr cvt = create_utf8_converter_unique_ptr(); + #elif BOOST_LOCALE_USE_AUTO_PTR + std::auto_ptr cvt = create_utf8_converter(); #else - cvt = create_utf8_converter(); + boost::locale::hold_ptr cvt(create_utf8_converter_new_ptr()); #endif TEST(cvt.get()); @@ -262,9 +261,11 @@ int main() std::cout << "Test windows-1255" << std::endl; #ifndef BOOST_NO_CXX11_SMART_PTR - cvt = std::move(create_simple_converter_unique_ptr("windows-1255")); - #else + cvt = create_simple_converter_unique_ptr("windows-1255"); + #elif BOOST_LOCALE_USE_AUTO_PTR cvt = create_simple_converter("windows-1255"); + #else + cvt.reset(create_simple_converter_new_ptr("windows-1255")); #endif TEST(cvt.get()); From 74cb6a87292465cdfc2e17155668417f9089f60c Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Mon, 18 Apr 2022 10:03:13 +0200 Subject: [PATCH 26/90] Fix boost::locale::boundary::segment comparison operators constness Add missing const to member functions `==` and `!=` to avoid conversion ambiguity in C++20 --- include/boost/locale/boundary/segment.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/locale/boundary/segment.hpp b/include/boost/locale/boundary/segment.hpp index 516d883d..b6c8e193 100644 --- a/include/boost/locale/boundary/segment.hpp +++ b/include/boost/locale/boundary/segment.hpp @@ -220,13 +220,13 @@ namespace boundary { // make sure we override std::pair's operator== /// Compare two segments - bool operator==(segment const &other) + bool operator==(segment const &other) const { return details::compare_text(*this,other) == 0; } /// Compare two segments - bool operator!=(segment const &other) + bool operator!=(segment const &other) const { return details::compare_text(*this,other) != 0; } From 4c7ac70184e8c96bf9fa224578911c9ed5d057a5 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 25 May 2022 17:00:59 +0200 Subject: [PATCH 27/90] Use BOOST_OVERRIDE instead of virtual --- include/boost/locale/collator.hpp | 12 ++---- include/boost/locale/date_time_facet.hpp | 5 +-- include/boost/locale/generic_codecvt.hpp | 42 +++++++++---------- include/boost/locale/localization_backend.hpp | 8 +--- src/encoding/conv.hpp | 12 ++---- src/encoding/iconv_codepage.ipp | 15 +++---- src/encoding/uconv_codepage.ipp | 12 +++--- src/encoding/wconv_codepage.ipp | 26 ++++++------ src/icu/codecvt.cpp | 8 ++-- src/icu/collator.cpp | 6 +-- src/icu/conversion.cpp | 4 +- src/icu/date_time.cpp | 22 +++++----- src/icu/formatter.cpp | 24 +++++------ src/icu/formatter.hpp | 8 +--- src/icu/icu_backend.cpp | 8 ++-- src/icu/numeric.cpp | 30 ++++++------- src/posix/codecvt.cpp | 13 +++--- src/posix/collate.cpp | 10 ++--- src/posix/converter.cpp | 4 +- src/posix/numeric.cpp | 17 ++++---- src/posix/posix_backend.cpp | 12 +++--- src/shared/localization_backend.cpp | 8 ++-- src/shared/message.cpp | 12 ++---- src/shared/mo_lambda.cpp | 24 +++++------ src/shared/mo_lambda.hpp | 4 +- src/std/collate.cpp | 6 +-- src/std/converter.cpp | 4 +- src/std/numeric.cpp | 40 +++++++++--------- src/std/std_backend.cpp | 10 ++--- src/util/codecvt_converter.cpp | 24 +++++------ src/util/gregorian.cpp | 34 +++++++-------- src/util/info.cpp | 4 +- src/util/numeric.hpp | 30 ++++++------- src/win32/collate.cpp | 12 +++--- src/win32/converter.cpp | 4 +- src/win32/numeric.cpp | 29 ++++++------- src/win32/win_backend.cpp | 6 +-- 37 files changed, 250 insertions(+), 299 deletions(-) diff --git a/include/boost/locale/collator.hpp b/include/boost/locale/collator.hpp index 9ac98b9a..5aef846f 100644 --- a/include/boost/locale/collator.hpp +++ b/include/boost/locale/collator.hpp @@ -152,17 +152,13 @@ namespace locale { collator(size_t refs = 0) : std::collate(refs) { } - - virtual ~collator() - { - } /// /// This function is used to override default collation function that does not take in account collation level. /// Uses primary level /// - virtual int do_compare( char_type const *b1,char_type const *e1, - char_type const *b2,char_type const *e2) const + int do_compare( char_type const *b1,char_type const *e1, + char_type const *b2,char_type const *e2) const BOOST_OVERRIDE { return do_compare(identical,b1,e1,b2,e2); } @@ -170,7 +166,7 @@ namespace locale { /// This function is used to override default collation function that does not take in account collation level. /// Uses primary level /// - virtual string_type do_transform(char_type const *b,char_type const *e) const + string_type do_transform(char_type const *b,char_type const *e) const BOOST_OVERRIDE { return do_transform(identical,b,e); } @@ -178,7 +174,7 @@ namespace locale { /// This function is used to override default collation function that does not take in account collation level. /// Uses primary level /// - virtual long do_hash(char_type const *b,char_type const *e) const + long do_hash(char_type const *b,char_type const *e) const BOOST_OVERRIDE { return do_hash(identical,b,e); } diff --git a/include/boost/locale/date_time_facet.hpp b/include/boost/locale/date_time_facet.hpp index 6ccca9bd..3bd3df2f 100644 --- a/include/boost/locale/date_time_facet.hpp +++ b/include/boost/locale/date_time_facet.hpp @@ -222,10 +222,7 @@ namespace boost { /// virtual bool same(abstract_calendar const *other) const = 0; - virtual ~abstract_calendar() - { - } - + virtual ~abstract_calendar() {} }; /// diff --git a/include/boost/locale/generic_codecvt.hpp b/include/boost/locale/generic_codecvt.hpp index 245f96f8..87e0509e 100644 --- a/include/boost/locale/generic_codecvt.hpp +++ b/include/boost/locale/generic_codecvt.hpp @@ -166,7 +166,7 @@ class generic_codecvt : public std::codecvt(&s); #ifdef DEBUG_CODECVT @@ -177,20 +177,20 @@ class generic_codecvt : public std::codecvt : public std::codecvt : public std::codecvt : public std::codecvt=2 in order - // to be able to store first observerd surrogate pair + // to be able to store first observed surrogate pair // // State: state!=0 - a first surrogate pair was observerd (state = first pair), // we expect the second one to come and then zero the state @@ -468,25 +468,25 @@ class generic_codecvt : public std::codecvt : public std::codecvt : public std::codecvt : public std::codecvt @@ -89,9 +87,7 @@ namespace boost { virtual std::string convert(CharType const *begin,CharType const *end) = 0; - virtual ~converter_from_utf() - { - } + virtual ~converter_from_utf() {} }; template @@ -105,9 +101,7 @@ namespace boost { virtual string_type convert(char const *begin,char const *end) = 0; - virtual ~converter_to_utf() - { - } + virtual ~converter_to_utf() {} }; } } diff --git a/src/encoding/iconv_codepage.ipp b/src/encoding/iconv_codepage.ipp index 276c60b6..6845a68c 100644 --- a/src/encoding/iconv_codepage.ipp +++ b/src/encoding/iconv_codepage.ipp @@ -147,16 +147,15 @@ public: typedef CharType char_type; - virtual bool open(char const *charset,method_type how) + bool open(char const *charset,method_type how) BOOST_OVERRIDE { return self_.do_open(charset,utf_name(),how); } - virtual std::string convert(char_type const *ubegin,char_type const *uend) + std::string convert(char_type const *ubegin,char_type const *uend) BOOST_OVERRIDE { return self_.template real_convert(ubegin,uend); } - virtual ~iconv_from_utf() {} private: iconverter_base self_; }; @@ -164,15 +163,14 @@ private: class iconv_between: public converter_between { public: - virtual bool open(char const *to_charset,char const *from_charset,method_type how) + bool open(char const *to_charset,char const *from_charset,method_type how) BOOST_OVERRIDE { return self_.do_open(to_charset,from_charset,how); } - virtual std::string convert(char const *begin,char const *end) + std::string convert(char const *begin,char const *end) BOOST_OVERRIDE { return self_.real_convert(begin,end); } - virtual ~iconv_between() {} private: iconverter_base self_; @@ -186,16 +184,15 @@ public: typedef CharType char_type; typedef std::basic_string string_type; - virtual bool open(char const *charset,method_type how) + bool open(char const *charset,method_type how) BOOST_OVERRIDE { return self_.do_open(utf_name(),charset,how); } - virtual string_type convert(char const *begin,char const *end) + string_type convert(char const *begin,char const *end) BOOST_OVERRIDE { return self_.template real_convert(begin,end); } - virtual ~iconv_to_utf() {} private: iconverter_base self_; }; diff --git a/src/encoding/uconv_codepage.ipp b/src/encoding/uconv_codepage.ipp index 51e7301b..8a93b67f 100644 --- a/src/encoding/uconv_codepage.ipp +++ b/src/encoding/uconv_codepage.ipp @@ -29,7 +29,7 @@ namespace impl { typedef std::basic_string string_type; - virtual bool open(char const *charset,method_type how) + bool open(char const *charset,method_type how) BOOST_OVERRIDE { close(); try { @@ -48,7 +48,7 @@ namespace impl { cvt_to_.reset(); } - virtual string_type convert(char const *begin,char const *end) + string_type convert(char const *begin,char const *end) BOOST_OVERRIDE { try { return cvt_to_->std(cvt_from_->icu_checked(begin,end)); @@ -73,7 +73,7 @@ namespace impl { class uconv_from_utf : public converter_from_utf { public: typedef CharType char_type; - virtual bool open(char const *charset,method_type how) + bool open(char const *charset,method_type how) BOOST_OVERRIDE { close(); try { @@ -92,7 +92,7 @@ namespace impl { cvt_to_.reset(); } - virtual std::string convert(CharType const *begin,CharType const *end) + std::string convert(CharType const *begin,CharType const *end) BOOST_OVERRIDE { try { return cvt_to_->std(cvt_from_->icu_checked(begin,end)); @@ -114,7 +114,7 @@ namespace impl { class uconv_between : public converter_between { public: - virtual bool open(char const *to_charset,char const *from_charset,method_type how) + bool open(char const *to_charset,char const *from_charset,method_type how) BOOST_OVERRIDE { close(); try { @@ -133,7 +133,7 @@ namespace impl { cvt_to_.reset(); } - virtual std::string convert(char const *begin,char const *end) + std::string convert(char const *begin,char const *end) BOOST_OVERRIDE { try { return cvt_to_->std(cvt_from_->icu(begin,end)); diff --git a/src/encoding/wconv_codepage.ipp b/src/encoding/wconv_codepage.ipp index 4ab9ece0..6c89f6f9 100644 --- a/src/encoding/wconv_codepage.ipp +++ b/src/encoding/wconv_codepage.ipp @@ -268,7 +268,7 @@ namespace impl { return false; return true; } - virtual std::string convert(char const *begin,char const *end) + std::string convert(char const *begin,char const *end) BOOST_OVERRIDE { if(to_code_page_ == 65001 && from_code_page_ == 65001) return utf_to_utf(begin,end,how_); @@ -321,11 +321,11 @@ namespace impl { template<> class wconv_to_utf : public converter_to_utf , public wconv_between { public: - virtual bool open(char const *cs,method_type how) + bool open(char const *cs,method_type how) BOOST_OVERRIDE { return wconv_between::open("UTF-8",cs,how); } - virtual std::string convert(char const *begin,char const *end) + std::string convert(char const *begin,char const *end) BOOST_OVERRIDE { return wconv_between::convert(begin,end); } @@ -334,11 +334,11 @@ namespace impl { template<> class wconv_from_utf : public converter_from_utf , public wconv_between { public: - virtual bool open(char const *cs,method_type how) + bool open(char const *cs,method_type how) BOOST_OVERRIDE { return wconv_between::open(cs,"UTF-8",how); } - virtual std::string convert(char const *begin,char const *end) + std::string convert(char const *begin,char const *end) BOOST_OVERRIDE { return wconv_between::convert(begin,end); } @@ -357,14 +357,14 @@ namespace impl { { } - virtual bool open(char const *charset,method_type how) + bool open(char const *charset,method_type how) BOOST_OVERRIDE { how_ = how; code_page_ = encoding_to_windows_codepage(charset); return code_page_ != -1; } - virtual string_type convert(char const *begin,char const *end) + string_type convert(char const *begin,char const *end) BOOST_OVERRIDE { if(code_page_ == 65001) { return utf_to_utf(begin,end,how_); @@ -395,14 +395,14 @@ namespace impl { { } - virtual bool open(char const *charset,method_type how) + bool open(char const *charset,method_type how) BOOST_OVERRIDE { how_ = how; code_page_ = encoding_to_windows_codepage(charset); return code_page_ != -1; } - virtual std::string convert(CharType const *begin,CharType const *end) + std::string convert(CharType const *begin,CharType const *end) BOOST_OVERRIDE { if(code_page_ == 65001) { return utf_to_utf(begin,end,how_); @@ -459,14 +459,14 @@ namespace impl { { } - virtual bool open(char const *charset,method_type how) + bool open(char const *charset,method_type how) BOOST_OVERRIDE { how_ = how; code_page_ = encoding_to_windows_codepage(charset); return code_page_ != -1; } - virtual string_type convert(char const *begin,char const *end) + string_type convert(char const *begin,char const *end) BOOST_OVERRIDE { if(code_page_ == 65001) { return utf_to_utf(begin,end,how_); @@ -497,14 +497,14 @@ namespace impl { { } - virtual bool open(char const *charset,method_type how) + bool open(char const *charset,method_type how) BOOST_OVERRIDE { how_ = how; code_page_ = encoding_to_windows_codepage(charset); return code_page_ != -1; } - virtual std::string convert(CharType const *begin,CharType const *end) + std::string convert(CharType const *begin,CharType const *end) BOOST_OVERRIDE { if(code_page_ == 65001) { return utf_to_utf(begin,end,how_); diff --git a/src/icu/codecvt.cpp b/src/icu/codecvt.cpp index 2cecdb7d..d778b2e3 100644 --- a/src/icu/codecvt.cpp +++ b/src/icu/codecvt.cpp @@ -49,17 +49,17 @@ namespace impl_icu { max_len_ = ucnv_getMaxCharSize(cvt_); } - virtual ~uconv_converter() + ~uconv_converter() { ucnv_close(cvt_); } - virtual bool is_thread_safe() const + bool is_thread_safe() const BOOST_OVERRIDE { return false; } - virtual uconv_converter *clone() const + uconv_converter *clone() const BOOST_OVERRIDE { return new uconv_converter(encoding_); } @@ -107,7 +107,7 @@ namespace impl_icu { return olen; } - virtual int max_len() const + int max_len() const BOOST_OVERRIDE { return max_len_; } diff --git a/src/icu/collator.cpp b/src/icu/collator.cpp index 79668aa6..82f2cc93 100644 --- a/src/icu/collator.cpp +++ b/src/icu/collator.cpp @@ -70,9 +70,9 @@ namespace boost { return do_ustring_compare(level,b1,e1,b2,e2,status); } - virtual int do_compare( level_type level, - CharType const *b1,CharType const *e1, - CharType const *b2,CharType const *e2) const + int do_compare(level_type level, + CharType const *b1,CharType const *e1, + CharType const *b2,CharType const *e2) const BOOST_OVERRIDE { UErrorCode status=U_ZERO_ERROR; diff --git a/src/icu/conversion.cpp b/src/icu/conversion.cpp index 193d6471..38b18b29 100644 --- a/src/icu/conversion.cpp +++ b/src/icu/conversion.cpp @@ -69,7 +69,7 @@ namespace impl_icu { { } - virtual string_type convert(converter_base::conversion_type how,char_type const *begin,char_type const *end,int flags = 0) const + string_type convert(converter_base::conversion_type how, char_type const* begin, char_type const* end, int flags = 0) const BOOST_OVERRIDE { icu_std_converter cvt(encoding_); icu::UnicodeString str=cvt.icu(begin,end); @@ -145,7 +145,7 @@ namespace impl_icu { { } - virtual std::string convert(converter_base::conversion_type how,char const *begin,char const *end,int flags = 0) const + std::string convert(converter_base::conversion_type how,char const *begin,char const *end,int flags = 0) const BOOST_OVERRIDE { if(how == converter_base::normalization) { diff --git a/src/icu/date_time.cpp b/src/icu/date_time.cpp index 1c872c37..9ef26f3b 100644 --- a/src/icu/date_time.cpp +++ b/src/icu/date_time.cpp @@ -135,14 +135,14 @@ namespace impl_icu { return v; } - virtual void set_time(posix_time const &p) + void set_time(posix_time const &p) BOOST_OVERRIDE { double utime = p.seconds * 1000.0 + p.nanoseconds / 1000000.0; UErrorCode code=U_ZERO_ERROR; calendar_->setTime(utime,code); check_and_throw_dt(code); } - virtual void normalize() + void normalize() BOOST_OVERRIDE { // Can't call complete() explicitly (protected) // calling get wich calls complete @@ -150,7 +150,7 @@ namespace impl_icu { calendar_->get(UCAL_YEAR,code); check_and_throw_dt(code); } - virtual posix_time get_time() const + posix_time get_time() const BOOST_OVERRIDE { UErrorCode code=U_ZERO_ERROR; @@ -169,7 +169,7 @@ namespace impl_icu { res.nanoseconds = 999999999; return res; } - virtual void set_option(calendar_option_type opt,int /*v*/) + void set_option(calendar_option_type opt,int /*v*/) BOOST_OVERRIDE { switch(opt) { case is_gregorian: @@ -180,7 +180,7 @@ namespace impl_icu { ; } } - virtual int get_option(calendar_option_type opt) const + int get_option(calendar_option_type opt) const BOOST_OVERRIDE { switch(opt) { case is_gregorian: @@ -197,7 +197,7 @@ namespace impl_icu { return 0; } } - virtual void adjust_value(period::marks::period_mark p,update_type u,int difference) + void adjust_value(period::marks::period_mark p,update_type u,int difference) BOOST_OVERRIDE { UErrorCode err=U_ZERO_ERROR; switch(u) { @@ -210,7 +210,7 @@ namespace impl_icu { } check_and_throw_dt(err); } - virtual int difference(abstract_calendar const *other_ptr,period::marks::period_mark p) const + int difference(abstract_calendar const *other_ptr,period::marks::period_mark p) const BOOST_OVERRIDE { UErrorCode err=U_ZERO_ERROR; double other_time = 0; @@ -236,18 +236,18 @@ namespace impl_icu { check_and_throw_dt(err); return diff; } - virtual void set_timezone(std::string const &tz) + void set_timezone(std::string const &tz) BOOST_OVERRIDE { calendar_->adoptTimeZone(get_time_zone(tz)); } - virtual std::string get_timezone() const + std::string get_timezone() const BOOST_OVERRIDE { icu::UnicodeString tz; calendar_->getTimeZone().getID(tz); icu_std_converter cvt(encoding_); return cvt.std(tz); } - virtual bool same(abstract_calendar const *other) const + bool same(abstract_calendar const *other) const BOOST_OVERRIDE { calendar_impl const *oc=dynamic_cast(other); if(!oc) @@ -269,7 +269,7 @@ namespace impl_icu { data_(d) { } - virtual abstract_calendar *create_calendar() const + abstract_calendar *create_calendar() const BOOST_OVERRIDE { return new calendar_impl(data_); } diff --git a/src/icu/formatter.cpp b/src/icu/formatter.cpp index 2af18eee..0275ac94 100644 --- a/src/icu/formatter.cpp +++ b/src/icu/formatter.cpp @@ -48,14 +48,14 @@ namespace locale { typedef CharType char_type; typedef std::basic_string string_type; - virtual string_type format(double value,size_t &code_points) const + string_type format(double value,size_t &code_points) const BOOST_OVERRIDE { icu::UnicodeString tmp; icu_fmt_->format(value,tmp); code_points=tmp.countChar32(); return cvt_.std(tmp); } - virtual string_type format(int64_t value,size_t &code_points) const + string_type format(int64_t value,size_t &code_points) const BOOST_OVERRIDE { icu::UnicodeString tmp; icu_fmt_->format(static_cast< ::int64_t>(value),tmp); @@ -63,7 +63,7 @@ namespace locale { return cvt_.std(tmp); } - virtual string_type format(int32_t value,size_t &code_points) const + string_type format(int32_t value,size_t &code_points) const BOOST_OVERRIDE { icu::UnicodeString tmp; #ifdef __SUNPRO_CC @@ -75,16 +75,16 @@ namespace locale { return cvt_.std(tmp); } - virtual size_t parse(string_type const &str,double &value) const + size_t parse(string_type const &str,double &value) const BOOST_OVERRIDE { return do_parse(str,value); } - virtual size_t parse(string_type const &str,int64_t &value) const + size_t parse(string_type const &str,int64_t &value) const BOOST_OVERRIDE { return do_parse(str,value); } - virtual size_t parse(string_type const &str,int32_t &value) const + size_t parse(string_type const &str,int32_t &value) const BOOST_OVERRIDE { return do_parse(str,value); } @@ -155,29 +155,29 @@ namespace locale { typedef CharType char_type; typedef std::basic_string string_type; - virtual string_type format(double value,size_t &code_points) const + string_type format(double value,size_t &code_points) const BOOST_OVERRIDE { return do_format(value,code_points); } - virtual string_type format(int64_t value,size_t &code_points) const + string_type format(int64_t value,size_t &code_points) const BOOST_OVERRIDE { return do_format(value,code_points); } - virtual string_type format(int32_t value,size_t &code_points) const + string_type format(int32_t value,size_t &code_points) const BOOST_OVERRIDE { return do_format(value,code_points); } - virtual size_t parse(string_type const &str,double &value) const + size_t parse(string_type const &str,double &value) const BOOST_OVERRIDE { return do_parse(str,value); } - virtual size_t parse(string_type const &str,int64_t &value) const + size_t parse(string_type const &str,int64_t &value) const BOOST_OVERRIDE { return do_parse(str,value); } - virtual size_t parse(string_type const &str,int32_t &value) const + size_t parse(string_type const &str,int32_t &value) const BOOST_OVERRIDE { return do_parse(str,value); } diff --git a/src/icu/formatter.hpp b/src/icu/formatter.hpp index 30414dc5..058d969f 100644 --- a/src/icu/formatter.hpp +++ b/src/icu/formatter.hpp @@ -24,9 +24,7 @@ namespace impl_icu { class base_formatter { public: - virtual ~base_formatter() - { - } + virtual ~base_formatter() {} }; /// @@ -88,10 +86,6 @@ namespace impl_icu { /// Would create a new spelling formatter only once. /// static formatter *create(std::ios_base &ios,icu::Locale const &l,std::string const &enc); - - virtual ~formatter() - { - } }; // class formatter /// diff --git a/src/icu/icu_backend.cpp b/src/icu/icu_backend.cpp index e3a5d4f5..a54e3c0a 100644 --- a/src/icu/icu_backend.cpp +++ b/src/icu/icu_backend.cpp @@ -37,7 +37,7 @@ namespace impl_icu { use_ansi_encoding_(other.use_ansi_encoding_) { } - virtual icu_localization_backend *clone() const + icu_localization_backend *clone() const BOOST_OVERRIDE { return new icu_localization_backend(*this); } @@ -86,9 +86,9 @@ namespace impl_icu { variant_ = d.variant; } - virtual std::locale install(std::locale const &base, - locale_category_type category, - character_facet_type type = nochar_facet) + std::locale install(std::locale const &base, + locale_category_type category, + character_facet_type type = nochar_facet) BOOST_OVERRIDE { prepare_data(); diff --git a/src/icu/numeric.cpp b/src/icu/numeric.cpp index debecfb8..292419bc 100644 --- a/src/icu/numeric.cpp +++ b/src/icu/numeric.cpp @@ -127,29 +127,29 @@ class num_format : public std::num_put, protected num_base protected: - virtual iter_type do_put (iter_type out, std::ios_base &ios, char_type fill, long val) const + iter_type do_put(iter_type out, std::ios_base& ios, char_type fill, long val) const BOOST_OVERRIDE { return do_real_put(out,ios,fill,val); } - virtual iter_type do_put (iter_type out, std::ios_base &ios, char_type fill, unsigned long val) const + iter_type do_put (iter_type out, std::ios_base &ios, char_type fill, unsigned long val) const BOOST_OVERRIDE { return do_real_put(out,ios,fill,val); } - virtual iter_type do_put (iter_type out, std::ios_base &ios, char_type fill, double val) const + iter_type do_put (iter_type out, std::ios_base &ios, char_type fill, double val) const BOOST_OVERRIDE { return do_real_put(out,ios,fill,val); } - virtual iter_type do_put (iter_type out, std::ios_base &ios, char_type fill, long double val) const + iter_type do_put (iter_type out, std::ios_base &ios, char_type fill, long double val) const BOOST_OVERRIDE { return do_real_put(out,ios,fill,val); } #ifndef BOOST_NO_LONG_LONG - virtual iter_type do_put (iter_type out, std::ios_base &ios, char_type fill, long long val) const + iter_type do_put (iter_type out, std::ios_base &ios, char_type fill, long long val) const BOOST_OVERRIDE { return do_real_put(out,ios,fill,val); } - virtual iter_type do_put (iter_type out, std::ios_base &ios, char_type fill, unsigned long long val) const + iter_type do_put (iter_type out, std::ios_base &ios, char_type fill, unsigned long long val) const BOOST_OVERRIDE { return do_real_put(out,ios,fill,val); } @@ -226,48 +226,48 @@ class num_parse : public std::num_get, protected num_base typedef hold_ptr formatter_ptr; typedef std::basic_istream stream_type; - virtual iter_type do_get(iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,long &val) const + iter_type do_get(iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,long &val) const BOOST_OVERRIDE { return do_real_get(in,end,ios,err,val); } - virtual iter_type do_get(iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,unsigned short &val) const + iter_type do_get(iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,unsigned short &val) const BOOST_OVERRIDE { return do_real_get(in,end,ios,err,val); } - virtual iter_type do_get(iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,unsigned int &val) const + iter_type do_get(iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,unsigned int &val) const BOOST_OVERRIDE { return do_real_get(in,end,ios,err,val); } - virtual iter_type do_get(iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,unsigned long &val) const + iter_type do_get(iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,unsigned long &val) const BOOST_OVERRIDE { return do_real_get(in,end,ios,err,val); } - virtual iter_type do_get(iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,float &val) const + iter_type do_get(iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,float &val) const BOOST_OVERRIDE { return do_real_get(in,end,ios,err,val); } - virtual iter_type do_get(iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,double &val) const + iter_type do_get(iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,double &val) const BOOST_OVERRIDE { return do_real_get(in,end,ios,err,val); } - virtual iter_type do_get (iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,long double &val) const + iter_type do_get (iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,long double &val) const BOOST_OVERRIDE { return do_real_get(in,end,ios,err,val); } #ifndef BOOST_NO_LONG_LONG - virtual iter_type do_get (iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,long long &val) const + iter_type do_get (iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,long long &val) const BOOST_OVERRIDE { return do_real_get(in,end,ios,err,val); } - virtual iter_type do_get (iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,unsigned long long &val) const + iter_type do_get (iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,unsigned long long &val) const BOOST_OVERRIDE { return do_real_get(in,end,ios,err,val); } diff --git a/src/posix/codecvt.cpp b/src/posix/codecvt.cpp index 897888a9..58d455c7 100644 --- a/src/posix/codecvt.cpp +++ b/src/posix/codecvt.cpp @@ -96,26 +96,25 @@ namespace impl_posix { { } - virtual ~mb2_iconv_converter() + ~mb2_iconv_converter() { if(to_utf_ != (iconv_t)(-1)) iconv_close(to_utf_); if(from_utf_ != (iconv_t)(-1)) iconv_close(from_utf_); - } - virtual bool is_thread_safe() const + bool is_thread_safe() const BOOST_OVERRIDE { return false; } - virtual mb2_iconv_converter *clone() const + mb2_iconv_converter *clone() const BOOST_OVERRIDE { return new mb2_iconv_converter(*this); } - uint32_t to_unicode(char const *&begin,char const *end) + uint32_t to_unicode(char const *&begin,char const *end) BOOST_OVERRIDE { if(begin == end) return incomplete; @@ -149,7 +148,7 @@ namespace impl_posix { return illegal; } - uint32_t from_unicode(uint32_t cp,char *begin,char const *end) + uint32_t from_unicode(uint32_t cp,char *begin,char const *end) BOOST_OVERRIDE { if(cp == 0) { if(begin!=end) { @@ -200,7 +199,7 @@ namespace impl_posix { return "UTF-32BE"; } - virtual int max_len() const + int max_len() const BOOST_OVERRIDE { return 2; } diff --git a/src/posix/collate.cpp b/src/posix/collate.cpp index 859bb9cf..a00455d3 100644 --- a/src/posix/collate.cpp +++ b/src/posix/collate.cpp @@ -63,10 +63,8 @@ class collator : public std::collate { lc_(l) { } - virtual ~collator() - { - } - virtual int do_compare(char_type const *lb,char_type const *le,char_type const *rb,char_type const *re) const + + int do_compare(char_type const *lb,char_type const *le,char_type const *rb,char_type const *re) const BOOST_OVERRIDE { string_type left(lb,le-lb); string_type right(rb,re-rb); @@ -77,14 +75,14 @@ class collator : public std::collate { return 1; return 0; } - virtual long do_hash(char_type const *b,char_type const *e) const + long do_hash(char_type const *b,char_type const *e) const BOOST_OVERRIDE { string_type s(do_transform(b,e)); char const *begin = reinterpret_cast(s.c_str()); char const *end = begin + s.size() * sizeof(char_type); return gnu_gettext::pj_winberger_hash_function(begin,end); } - virtual string_type do_transform(char_type const *b,char_type const *e) const + string_type do_transform(char_type const *b,char_type const *e) const BOOST_OVERRIDE { string_type s(b,e-b); std::vector buf((e-b)*2+1); diff --git a/src/posix/converter.cpp b/src/posix/converter.cpp index bf8bc566..34f21d68 100644 --- a/src/posix/converter.cpp +++ b/src/posix/converter.cpp @@ -67,7 +67,7 @@ class std_converter : public converter lc_(lc) { } - virtual string_type convert(converter_base::conversion_type how,char_type const *begin,char_type const *end,int /*flags*/ = 0) const + string_type convert(converter_base::conversion_type how,char_type const *begin,char_type const *end,int /*flags*/ = 0) const BOOST_OVERRIDE { switch(how) { case converter_base::upper_case: @@ -104,7 +104,7 @@ class utf8_converter : public converter { lc_(lc) { } - virtual std::string convert(converter_base::conversion_type how,char const *begin,char const *end,int /*flags*/ = 0) const + std::string convert(converter_base::conversion_type how,char const *begin,char const *end,int /*flags*/ = 0) const BOOST_OVERRIDE { switch(how) { case upper_case: diff --git a/src/posix/numeric.cpp b/src/posix/numeric.cpp index 2bef81e2..2de281dd 100644 --- a/src/posix/numeric.cpp +++ b/src/posix/numeric.cpp @@ -52,7 +52,7 @@ class num_format : public util::base_num_format } protected: - virtual iter_type do_format_currency(bool intl,iter_type out,std::ios_base &/*ios*/,char_type /*fill*/,long double val) const + iter_type do_format_currency(bool intl,iter_type out,std::ios_base &/*ios*/,char_type /*fill*/,long double val) const BOOST_OVERRIDE { char buf[4]={}; char const *format = intl ? "%i" : "%n"; @@ -154,14 +154,11 @@ class time_put_posix : public std::time_put { lc_(lc) { } - virtual ~time_put_posix() - { - } typedef typename std::time_put::iter_type iter_type; typedef CharType char_type; typedef std::basic_string string_type; - virtual iter_type do_put(iter_type out,std::ios_base &/*ios*/,CharType /*fill*/,std::tm const *tm,char format,char modifier) const + iter_type do_put(iter_type out,std::ios_base &/*ios*/,CharType /*fill*/,std::tm const *tm,char format,char modifier) const BOOST_OVERRIDE { char_type fmt[4] = { '%' , modifier != 0 ? modifier : format , modifier == 0 ? '\0' : format }; string_type res = ftime_traits::ftime(fmt,tm,*lc_); @@ -427,24 +424,24 @@ class num_punct_posix : public std::numpunct { { s2=conv::to_utf(s1,nl_langinfo_l(CODESET,lc)); } - virtual CharType do_decimal_point() const + CharType do_decimal_point() const BOOST_OVERRIDE { return *decimal_point_.c_str(); } - virtual CharType do_thousands_sep() const + CharType do_thousands_sep() const BOOST_OVERRIDE { return *thousands_sep_.c_str(); } - virtual std::string do_grouping() const + std::string do_grouping() const BOOST_OVERRIDE { return grouping_; } - virtual string_type do_truename() const + string_type do_truename() const BOOST_OVERRIDE { static const char t[]="true"; return string_type(t,t+sizeof(t)-1); } - virtual string_type do_falsename() const + string_type do_falsename() const BOOST_OVERRIDE { static const char t[]="false"; return string_type(t,t+sizeof(t)-1); diff --git a/src/posix/posix_backend.cpp b/src/posix/posix_backend.cpp index 2ab121df..095feb27 100644 --- a/src/posix/posix_backend.cpp +++ b/src/posix/posix_backend.cpp @@ -41,12 +41,12 @@ namespace impl_posix { invalid_(true) { } - virtual posix_localization_backend *clone() const + posix_localization_backend *clone() const BOOST_OVERRIDE { return new posix_localization_backend(*this); } - void set_option(std::string const &name,std::string const &value) + void set_option(std::string const &name,std::string const &value) BOOST_OVERRIDE { invalid_ = true; if(name=="locale") @@ -57,7 +57,7 @@ namespace impl_posix { domains_.push_back(value); } - void clear_options() + void clear_options() BOOST_OVERRIDE { invalid_ = true; locale_id_.clear(); @@ -104,9 +104,9 @@ namespace impl_posix { lc_ = boost::shared_ptr(tmp_p,free_locale_by_ptr); } - virtual std::locale install(std::locale const &base, - locale_category_type category, - character_facet_type type = nochar_facet) + std::locale install(std::locale const &base, + locale_category_type category, + character_facet_type type = nochar_facet) BOOST_OVERRIDE { prepare_data(); diff --git a/src/shared/localization_backend.cpp b/src/shared/localization_backend.cpp index dac48c1b..12261cd6 100644 --- a/src/shared/localization_backend.cpp +++ b/src/shared/localization_backend.cpp @@ -116,21 +116,21 @@ namespace boost { backends_[i].reset(backends[i]->clone()); } } - virtual actual_backend *clone() const + actual_backend *clone() const BOOST_OVERRIDE { return new actual_backend(backends_,index_); } - virtual void set_option(std::string const &name,std::string const &value) + void set_option(std::string const &name,std::string const &value) BOOST_OVERRIDE { for(unsigned i=0;iset_option(name,value); } - virtual void clear_options() + void clear_options() BOOST_OVERRIDE { for(unsigned i=0;iclear_options(); } - virtual std::locale install(std::locale const &l,locale_category_type category,character_facet_type type = nochar_facet) + std::locale install(std::locale const &l,locale_category_type category,character_facet_type type = nochar_facet) BOOST_OVERRIDE { int id; unsigned v; diff --git a/src/shared/message.cpp b/src/shared/message.cpp index e25d26fd..8ddfd171 100644 --- a/src/shared/message.cpp +++ b/src/shared/message.cpp @@ -500,12 +500,12 @@ namespace boost { typedef std::pair pair_type; - virtual char_type const *get(int domain_id,char_type const *context,char_type const *id) const + char_type const *get(int domain_id,char_type const *context,char_type const *id) const BOOST_OVERRIDE { return get_string(domain_id,context,id).first; } - virtual char_type const *get(int domain_id,char_type const *context,char_type const *single_id,int n) const + char_type const *get(int domain_id,char_type const *context,char_type const *single_id,int n) const BOOST_OVERRIDE { pair_type ptr = get_string(domain_id,context,single_id); if(!ptr.first) @@ -528,7 +528,7 @@ namespace boost { return p; } - virtual int domain(std::string const &domain) const + int domain(std::string const &domain) const BOOST_OVERRIDE { domains_map_type::const_iterator p=domains_.find(domain); if(p==domains_.end()) @@ -584,15 +584,11 @@ namespace boost { } } - char_type const *convert(char_type const *msg,string_type &buffer) const + char_type const *convert(char_type const *msg,string_type &buffer) const BOOST_OVERRIDE { return runtime_conversion(msg,buffer,key_conversion_required_,locale_encoding_,key_encoding_); } - virtual ~mo_message() - { - } - private: int compare_encodings(std::string const &left,std::string const &right) { diff --git a/src/shared/mo_lambda.cpp b/src/shared/mo_lambda.cpp index ab4bb0d8..50c6fd0a 100644 --- a/src/shared/mo_lambda.cpp +++ b/src/shared/mo_lambda.cpp @@ -16,11 +16,11 @@ namespace lambda { namespace { // anon struct identity : public plural { - virtual int operator()(int n) const + int operator()(int n) const BOOST_OVERRIDE { return n; }; - virtual identity *clone() const + identity *clone() const BOOST_OVERRIDE { return new identity(); } @@ -54,11 +54,11 @@ namespace { // anon val(v) { } - virtual int operator()(int /*n*/) const + int operator()(int /*n*/) const BOOST_OVERRIDE { return val; } - virtual number *clone() const + number *clone() const BOOST_OVERRIDE { return new number(val); } @@ -72,11 +72,11 @@ namespace { // anon name(plural_ptr op) : unary(op) \ { \ }; \ - virtual int operator()(int n) const \ + int operator()(int n) const BOOST_OVERRIDE \ { \ return oper (*op1)(n); \ } \ - virtual name *clone() const \ + name *clone() const BOOST_OVERRIDE \ { \ plural_ptr op1_copy(op1->clone()); \ return new name(op1_copy); \ @@ -91,11 +91,11 @@ namespace { // anon { \ } \ \ - virtual int operator()(int n) const \ + int operator()(int n) const BOOST_OVERRIDE \ { \ return (*op1)(n) oper (*op2)(n); \ } \ - virtual name *clone() const \ + name *clone() const BOOST_OVERRIDE \ { \ plural_ptr op1_copy(op1->clone()); \ plural_ptr op2_copy(op2->clone()); \ @@ -109,13 +109,13 @@ namespace { // anon binary(p1,p2) \ { \ } \ - virtual int operator()(int n) const \ + int operator()(int n) const BOOST_OVERRIDE \ { \ int v1=(*op1)(n); \ int v2=(*op2)(n); \ return v2==0 ? 0 : v1 oper v2; \ } \ - virtual name *clone() const \ + name *clone() const BOOST_OVERRIDE \ { \ plural_ptr op1_copy(op1->clone()); \ plural_ptr op2_copy(op2->clone()); \ @@ -174,11 +174,11 @@ namespace { // anon op3(p3) { } - virtual int operator()(int n) const + int operator()(int n) const BOOST_OVERRIDE { return (*op1)(n) ? (*op2)(n) : (*op3)(n); } - virtual conditional *clone() const + conditional *clone() const BOOST_OVERRIDE { plural_ptr op1_copy(op1->clone()); plural_ptr op2_copy(op2->clone()); diff --git a/src/shared/mo_lambda.hpp b/src/shared/mo_lambda.hpp index c14afd07..c32ea55b 100644 --- a/src/shared/mo_lambda.hpp +++ b/src/shared/mo_lambda.hpp @@ -19,9 +19,7 @@ namespace boost { virtual int operator()(int n) const = 0; virtual plural *clone() const = 0; - virtual ~plural() - { - } + virtual ~plural() {} }; typedef boost::shared_ptr plural_ptr; diff --git a/src/std/collate.cpp b/src/std/collate.cpp index 8b7127ad..6f9ecf8c 100644 --- a/src/std/collate.cpp +++ b/src/std/collate.cpp @@ -24,19 +24,19 @@ class utf8_collator_from_wide : public std::collate { base_(base) { } - virtual int do_compare(char const *lb,char const *le,char const *rb,char const *re) const + int do_compare(char const *lb,char const *le,char const *rb,char const *re) const BOOST_OVERRIDE { std::wstring l=conv::to_utf(lb,le,"UTF-8"); std::wstring r=conv::to_utf(rb,re,"UTF-8"); return std::use_facet(base_).compare( l.c_str(),l.c_str()+l.size(), r.c_str(),r.c_str()+r.size()); } - virtual long do_hash(char const *b,char const *e) const + long do_hash(char const *b,char const *e) const BOOST_OVERRIDE { std::wstring tmp=conv::to_utf(b,e,"UTF-8"); return std::use_facet(base_).hash(tmp.c_str(),tmp.c_str()+tmp.size()); } - virtual std::string do_transform(char const *b,char const *e) const + std::string do_transform(char const *b,char const *e) const BOOST_OVERRIDE { std::wstring tmp=conv::to_utf(b,e,"UTF-8"); std::wstring wkey = diff --git a/src/std/converter.cpp b/src/std/converter.cpp index e4f925ad..889a6825 100644 --- a/src/std/converter.cpp +++ b/src/std/converter.cpp @@ -40,7 +40,7 @@ class std_converter : public converter base_(base) { } - virtual string_type convert(converter_base::conversion_type how,char_type const *begin,char_type const *end,int /*flags*/ = 0) const + string_type convert(converter_base::conversion_type how,char_type const *begin,char_type const *end,int /*flags*/ = 0) const BOOST_OVERRIDE { switch(how) { case converter_base::upper_case: @@ -75,7 +75,7 @@ class utf8_converter : public converter { base_(base) { } - virtual std::string convert(converter_base::conversion_type how,char const *begin,char const *end,int /*flags*/ = 0) const + std::string convert(converter_base::conversion_type how,char const *begin,char const *end,int /*flags*/ = 0) const BOOST_OVERRIDE { switch(how) { case upper_case: diff --git a/src/std/numeric.cpp b/src/std/numeric.cpp index cbb0d9de..4f45bf1b 100644 --- a/src/std/numeric.cpp +++ b/src/std/numeric.cpp @@ -32,7 +32,7 @@ class time_put_from_base : public std::time_put { } typedef typename std::time_put::iter_type iter_type; - virtual iter_type do_put(iter_type out,std::ios_base &/*ios*/,CharType fill,std::tm const *tm,char format,char modifier) const + iter_type do_put(iter_type out,std::ios_base &/*ios*/,CharType fill,std::tm const *tm,char format,char modifier) const BOOST_OVERRIDE { std::basic_stringstream ss; ss.imbue(base_); @@ -49,7 +49,7 @@ class utf8_time_put_from_wide : public std::time_put { base_(base) { } - virtual iter_type do_put(iter_type out,std::ios_base &/*ios*/,char fill,std::tm const *tm,char format,char modifier = 0) const + iter_type do_put(iter_type out,std::ios_base &/*ios*/,char fill,std::tm const *tm,char format,char modifier = 0) const BOOST_OVERRIDE { std::basic_ostringstream wtmps; wtmps.imbue(base_); @@ -105,23 +105,23 @@ class utf8_numpunct_from_wide : public std::numpunct { } } - virtual char do_decimal_point() const + char do_decimal_point() const BOOST_OVERRIDE { return decimal_point_; } - virtual char do_thousands_sep() const + char do_thousands_sep() const BOOST_OVERRIDE { return thousands_sep_; } - virtual std::string do_grouping() const + std::string do_grouping() const BOOST_OVERRIDE { return grouping_; } - virtual std::string do_truename() const + std::string do_truename() const BOOST_OVERRIDE { return truename_; } - virtual std::string do_falsename() const + std::string do_falsename() const BOOST_OVERRIDE { return falsename_; } @@ -178,45 +178,45 @@ class utf8_moneypunct_from_wide : public std::moneypunct { } } - virtual char do_decimal_point() const + char do_decimal_point() const BOOST_OVERRIDE { return decimal_point_; } - virtual char do_thousands_sep() const + char do_thousands_sep() const BOOST_OVERRIDE { return thousands_sep_; } - virtual std::string do_grouping() const + std::string do_grouping() const BOOST_OVERRIDE { return grouping_; } - virtual std::string do_curr_symbol() const + std::string do_curr_symbol() const BOOST_OVERRIDE { return curr_symbol_; } - virtual std::string do_positive_sign () const + std::string do_positive_sign () const BOOST_OVERRIDE { return positive_sign_; } - virtual std::string do_negative_sign() const + std::string do_negative_sign() const BOOST_OVERRIDE { return negative_sign_; } - virtual int do_frac_digits() const + int do_frac_digits() const BOOST_OVERRIDE { return frac_digits_; } - virtual std::money_base::pattern do_pos_format() const + std::money_base::pattern do_pos_format() const BOOST_OVERRIDE { return pos_format_; } - virtual std::money_base::pattern do_neg_format() const + std::money_base::pattern do_neg_format() const BOOST_OVERRIDE { return neg_format_; } @@ -240,7 +240,7 @@ class utf8_numpunct : public std::numpunct_byname { std::numpunct_byname(name,refs) { } - virtual char do_thousands_sep() const + char do_thousands_sep() const BOOST_OVERRIDE { unsigned char bs = base_type::do_thousands_sep(); if(bs > 127) @@ -251,7 +251,7 @@ class utf8_numpunct : public std::numpunct_byname { else return bs; } - virtual std::string do_grouping() const + std::string do_grouping() const BOOST_OVERRIDE { unsigned char bs = base_type::do_thousands_sep(); if(bs > 127 && bs != 0xA0) @@ -268,7 +268,7 @@ class utf8_moneypunct : public std::moneypunct_byname { std::moneypunct_byname(name,refs) { } - virtual char do_thousands_sep() const + char do_thousands_sep() const BOOST_OVERRIDE { unsigned char bs = base_type::do_thousands_sep(); if(bs > 127) @@ -279,7 +279,7 @@ class utf8_moneypunct : public std::moneypunct_byname { else return bs; } - virtual std::string do_grouping() const + std::string do_grouping() const BOOST_OVERRIDE { unsigned char bs = base_type::do_thousands_sep(); if(bs > 127 && bs != 0xA0) diff --git a/src/std/std_backend.cpp b/src/std/std_backend.cpp index f9afcb41..fef722b6 100644 --- a/src/std/std_backend.cpp +++ b/src/std/std_backend.cpp @@ -46,12 +46,12 @@ namespace impl_std { use_ansi_encoding_(other.use_ansi_encoding_) { } - virtual std_localization_backend *clone() const + std_localization_backend *clone() const BOOST_OVERRIDE { return new std_localization_backend(*this); } - void set_option(std::string const &name,std::string const &value) + void set_option(std::string const &name,std::string const &value) BOOST_OVERRIDE { invalid_ = true; if(name=="locale") @@ -64,7 +64,7 @@ namespace impl_std { use_ansi_encoding_ = value == "true"; } - void clear_options() + void clear_options() BOOST_OVERRIDE { invalid_ = true; use_ansi_encoding_ = false; @@ -157,9 +157,9 @@ namespace impl_std { } } - virtual std::locale install(std::locale const &base, + std::locale install(std::locale const &base, locale_category_type category, - character_facet_type type = nochar_facet) + character_facet_type type = nochar_facet) BOOST_OVERRIDE { prepare_data(); diff --git a/src/util/codecvt_converter.cpp b/src/util/codecvt_converter.cpp index da7e1276..bd9cebb5 100644 --- a/src/util/codecvt_converter.cpp +++ b/src/util/codecvt_converter.cpp @@ -37,22 +37,22 @@ namespace util { class utf8_converter : public base_converter { public: - virtual int max_len() const + int max_len() const BOOST_OVERRIDE { return 4; } - virtual utf8_converter *clone() const + utf8_converter *clone() const BOOST_OVERRIDE { return new utf8_converter(); } - bool is_thread_safe() const + bool is_thread_safe() const BOOST_OVERRIDE { return true; } - virtual uint32_t to_unicode(char const *&begin,char const *end) + uint32_t to_unicode(char const *&begin,char const *end) BOOST_OVERRIDE { char const *p=begin; @@ -68,7 +68,7 @@ namespace util { return c; } - virtual uint32_t from_unicode(uint32_t u,char *begin,char const *end) + uint32_t from_unicode(uint32_t u,char *begin,char const *end) BOOST_OVERRIDE { if(!utf::is_valid_codepoint(u)) return illegal; @@ -151,34 +151,30 @@ namespace util { class simple_converter : public base_converter { public: - virtual ~simple_converter() - { - } - simple_converter(std::string const &encoding) : cvt_(encoding) { } - virtual int max_len() const + int max_len() const BOOST_OVERRIDE { return 1; } - virtual bool is_thread_safe() const + bool is_thread_safe() const BOOST_OVERRIDE { return true; } - virtual base_converter *clone() const + base_converter *clone() const BOOST_OVERRIDE { return new simple_converter(*this); } - virtual uint32_t to_unicode(char const *&begin,char const *end) + uint32_t to_unicode(char const *&begin,char const *end) BOOST_OVERRIDE { return cvt_.to_unicode(begin,end); } - virtual uint32_t from_unicode(uint32_t u,char *begin,char const *end) + uint32_t from_unicode(uint32_t u,char *begin,char const *end) BOOST_OVERRIDE { return cvt_.from_unicode(u,begin,end); } diff --git a/src/util/gregorian.cpp b/src/util/gregorian.cpp index 49e45c3a..9247c7bc 100644 --- a/src/util/gregorian.cpp +++ b/src/util/gregorian.cpp @@ -156,7 +156,7 @@ namespace util { /// /// Make a polymorphic copy of the calendar /// - virtual gregorian_calendar *clone() const + gregorian_calendar *clone() const BOOST_OVERRIDE { return new gregorian_calendar(*this); } @@ -164,7 +164,7 @@ namespace util { /// /// Set specific \a value for period \a p, note not all values are settable. /// - virtual void set_value(period::marks::period_mark p,int value) + void set_value(period::marks::period_mark p,int value) BOOST_OVERRIDE { using namespace period::marks; switch(p) { @@ -226,12 +226,12 @@ namespace util { normalized_ = false; } - void normalize() + void normalize() BOOST_OVERRIDE { if(!normalized_) { std::tm val = tm_updated_; val.tm_isdst = -1; - val.tm_wday = -1; // indecator of error + val.tm_wday = -1; // indicator of error std::time_t point = -1; if(is_local_) { point = std::mktime(&val); @@ -300,7 +300,7 @@ namespace util { /// /// Get specific value for period \a p according to a value_type \a v /// - virtual int get_value(period::marks::period_mark p,value_type v) const + int get_value(period::marks::period_mark p,value_type v) const BOOST_OVERRIDE { using namespace period::marks; switch(p) { @@ -560,11 +560,11 @@ namespace util { /// /// Set current time point /// - virtual void set_time(posix_time const &p) + void set_time(posix_time const &p) BOOST_OVERRIDE { from_time(static_cast(p.seconds)); } - virtual posix_time get_time() const + posix_time get_time() const BOOST_OVERRIDE { posix_time pt = { time_, 0}; return pt; @@ -573,7 +573,7 @@ namespace util { /// /// Set option for calendar, for future use /// - virtual void set_option(calendar_option_type opt,int /*v*/) + void set_option(calendar_option_type opt,int /*v*/) BOOST_OVERRIDE { switch(opt) { case is_gregorian: @@ -587,7 +587,7 @@ namespace util { /// /// Get option for calendar, currently only check if it is Gregorian calendar /// - virtual int get_option(calendar_option_type opt) const + int get_option(calendar_option_type opt) const BOOST_OVERRIDE { switch(opt) { case is_gregorian: @@ -603,7 +603,7 @@ namespace util { /// Adjust period's \a p value by \a difference items using a update_type \a u. /// Note: not all values are adjustable /// - virtual void adjust_value(period::marks::period_mark p,update_type u,int difference) + void adjust_value(period::marks::period_mark p,update_type u,int difference) BOOST_OVERRIDE { switch(u) { case move: @@ -691,7 +691,7 @@ namespace util { /// /// Calculate the difference between this calendar and \a other in \a p units /// - virtual int difference(abstract_calendar const *other_cal,period::marks::period_mark p) const + int difference(abstract_calendar const *other_cal,period::marks::period_mark p) const BOOST_OVERRIDE { hold_ptr keeper; gregorian_calendar const *other = dynamic_cast(other_cal); @@ -753,7 +753,7 @@ namespace util { /// /// Set time zone, empty - use system /// - virtual void set_timezone(std::string const &tz) + void set_timezone(std::string const &tz) BOOST_OVERRIDE { if(tz.empty()) { is_local_ = true; @@ -766,12 +766,12 @@ namespace util { from_time(time_); time_zone_name_ = tz; } - virtual std::string get_timezone() const + std::string get_timezone() const BOOST_OVERRIDE { return time_zone_name_; } - virtual bool same(abstract_calendar const *other) const + bool same(abstract_calendar const *other) const BOOST_OVERRIDE { gregorian_calendar const *gcal = dynamic_cast(other); if(!gcal) @@ -782,10 +782,6 @@ namespace util { && gcal->first_day_of_week_ == first_day_of_week_; } - virtual ~gregorian_calendar() - { - } - private: void from_time(std::time_t point) @@ -830,7 +826,7 @@ namespace util { terr_(terr) { } - virtual abstract_calendar *create_calendar() const + abstract_calendar *create_calendar() const BOOST_OVERRIDE { return create_gregorian_calendar(terr_); } diff --git a/src/util/info.cpp b/src/util/info.cpp index 9b062921..0ec7ba89 100644 --- a/src/util/info.cpp +++ b/src/util/info.cpp @@ -29,7 +29,7 @@ namespace util { { d.parse(name); } - virtual std::string get_string_property(string_propery v) const + std::string get_string_property(string_propery v) const BOOST_OVERRIDE { switch(v) { case language_property: @@ -47,7 +47,7 @@ namespace util { }; } - virtual int get_integer_property(integer_property v) const + int get_integer_property(integer_property v) const BOOST_OVERRIDE { switch(v) { case utf8_property: diff --git a/src/util/numeric.hpp b/src/util/numeric.hpp index 892427df..299713f5 100644 --- a/src/util/numeric.hpp +++ b/src/util/numeric.hpp @@ -76,29 +76,29 @@ class base_num_format : public std::num_put protected: - virtual iter_type do_put (iter_type out, std::ios_base &ios, char_type fill, long val) const + iter_type do_put (iter_type out, std::ios_base &ios, char_type fill, long val) const BOOST_OVERRIDE { return do_real_put(out,ios,fill,val); } - virtual iter_type do_put (iter_type out, std::ios_base &ios, char_type fill, unsigned long val) const + iter_type do_put (iter_type out, std::ios_base &ios, char_type fill, unsigned long val) const BOOST_OVERRIDE { return do_real_put(out,ios,fill,val); } - virtual iter_type do_put (iter_type out, std::ios_base &ios, char_type fill, double val) const + iter_type do_put (iter_type out, std::ios_base &ios, char_type fill, double val) const BOOST_OVERRIDE { return do_real_put(out,ios,fill,val); } - virtual iter_type do_put (iter_type out, std::ios_base &ios, char_type fill, long double val) const + iter_type do_put (iter_type out, std::ios_base &ios, char_type fill, long double val) const BOOST_OVERRIDE { return do_real_put(out,ios,fill,val); } #ifndef BOOST_NO_LONG_LONG - virtual iter_type do_put (iter_type out, std::ios_base &ios, char_type fill, long long val) const + iter_type do_put (iter_type out, std::ios_base &ios, char_type fill, long long val) const BOOST_OVERRIDE { return do_real_put(out,ios,fill,val); } - virtual iter_type do_put (iter_type out, std::ios_base &ios, char_type fill, unsigned long long val) const + iter_type do_put (iter_type out, std::ios_base &ios, char_type fill, unsigned long long val) const BOOST_OVERRIDE { return do_real_put(out,ios,fill,val); } @@ -268,48 +268,48 @@ class base_num_parse : public std::num_get typedef std::basic_string string_type; typedef CharType char_type; - virtual iter_type do_get(iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,long &val) const + iter_type do_get(iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,long &val) const BOOST_OVERRIDE { return do_real_get(in,end,ios,err,val); } - virtual iter_type do_get(iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,unsigned short &val) const + iter_type do_get(iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,unsigned short &val) const BOOST_OVERRIDE { return do_real_get(in,end,ios,err,val); } - virtual iter_type do_get(iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,unsigned int &val) const + iter_type do_get(iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,unsigned int &val) const BOOST_OVERRIDE { return do_real_get(in,end,ios,err,val); } - virtual iter_type do_get(iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,unsigned long &val) const + iter_type do_get(iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,unsigned long &val) const BOOST_OVERRIDE { return do_real_get(in,end,ios,err,val); } - virtual iter_type do_get(iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,float &val) const + iter_type do_get(iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,float &val) const BOOST_OVERRIDE { return do_real_get(in,end,ios,err,val); } - virtual iter_type do_get(iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,double &val) const + iter_type do_get(iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,double &val) const BOOST_OVERRIDE { return do_real_get(in,end,ios,err,val); } - virtual iter_type do_get (iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,long double &val) const + iter_type do_get (iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,long double &val) const BOOST_OVERRIDE { return do_real_get(in,end,ios,err,val); } #ifndef BOOST_NO_LONG_LONG - virtual iter_type do_get (iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,long long &val) const + iter_type do_get (iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,long long &val) const BOOST_OVERRIDE { return do_real_get(in,end,ios,err,val); } - virtual iter_type do_get (iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,unsigned long long &val) const + iter_type do_get (iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,unsigned long long &val) const BOOST_OVERRIDE { return do_real_get(in,end,ios,err,val); } diff --git a/src/win32/collate.cpp b/src/win32/collate.cpp index 40e8c3d2..11ffd4ba 100644 --- a/src/win32/collate.cpp +++ b/src/win32/collate.cpp @@ -25,18 +25,18 @@ class utf8_collator : public collator { lc_(lc) { } - virtual int do_compare(collator_base::level_type level,char const *lb,char const *le,char const *rb,char const *re) const + int do_compare(collator_base::level_type level,char const *lb,char const *le,char const *rb,char const *re) const BOOST_OVERRIDE { std::wstring l=conv::to_utf(lb,le,"UTF-8"); std::wstring r=conv::to_utf(rb,re,"UTF-8"); return wcscoll_l(level,l.c_str(),l.c_str()+l.size(),r.c_str(),r.c_str()+r.size(),lc_); } - virtual long do_hash(collator_base::level_type level,char const *b,char const *e) const + long do_hash(collator_base::level_type level,char const *b,char const *e) const BOOST_OVERRIDE { std::string key = do_transform(level,b,e); return gnu_gettext::pj_winberger_hash_function(key.c_str(),key.c_str() + key.size()); } - virtual std::string do_transform(collator_base::level_type level,char const *b,char const *e) const + std::string do_transform(collator_base::level_type level,char const *b,char const *e) const BOOST_OVERRIDE { std::wstring tmp=conv::to_utf(b,e,"UTF-8"); std::wstring wkey = wcsxfrm_l(level,tmp.c_str(),tmp.c_str()+tmp.size(),lc_); @@ -74,18 +74,18 @@ class utf16_collator : public collator { lc_(lc) { } - virtual int do_compare(collator_base::level_type level,wchar_t const *lb,wchar_t const *le,wchar_t const *rb,wchar_t const *re) const + int do_compare(collator_base::level_type level,wchar_t const *lb,wchar_t const *le,wchar_t const *rb,wchar_t const *re) const BOOST_OVERRIDE { return wcscoll_l(level,lb,le,rb,re,lc_); } - virtual long do_hash(collator_base::level_type level,wchar_t const *b,wchar_t const *e) const + long do_hash(collator_base::level_type level,wchar_t const *b,wchar_t const *e) const BOOST_OVERRIDE { std::wstring key = do_transform(level,b,e); char const *begin = reinterpret_cast(key.c_str()); char const *end = begin + key.size()*sizeof(wchar_t); return gnu_gettext::pj_winberger_hash_function(begin,end); } - virtual std::wstring do_transform(collator_base::level_type level,wchar_t const *b,wchar_t const *e) const + std::wstring do_transform(collator_base::level_type level,wchar_t const *b,wchar_t const *e) const BOOST_OVERRIDE { return wcsxfrm_l(level,b,e,lc_); } diff --git a/src/win32/converter.cpp b/src/win32/converter.cpp index fffb0c7b..420e6d58 100644 --- a/src/win32/converter.cpp +++ b/src/win32/converter.cpp @@ -29,7 +29,7 @@ class utf16_converter : public converter lc_(lc) { } - virtual std::wstring convert(converter_base::conversion_type how,wchar_t const *begin,wchar_t const *end,int flags = 0) const + std::wstring convert(converter_base::conversion_type how,wchar_t const *begin,wchar_t const *end,int flags = 0) const BOOST_OVERRIDE { switch(how) { case converter_base::upper_case: @@ -55,7 +55,7 @@ class utf8_converter : public converter { lc_(lc) { } - virtual std::string convert(converter_base::conversion_type how,char const *begin,char const *end,int flags = 0) const + std::string convert(converter_base::conversion_type how,char const *begin,char const *end,int flags = 0) const BOOST_OVERRIDE { std::wstring tmp = conv::to_utf(begin,end,"UTF-8"); wchar_t const *wb=tmp.c_str(); diff --git a/src/win32/numeric.cpp b/src/win32/numeric.cpp index 00bc94fd..54ee9a4f 100644 --- a/src/win32/numeric.cpp +++ b/src/win32/numeric.cpp @@ -61,8 +61,7 @@ class num_format : public util::base_num_format } private: - virtual - iter_type do_format_currency(bool /*intl*/,iter_type out,std::ios_base &ios,char_type fill,long double val) const + iter_type do_format_currency(bool /*intl*/,iter_type out,std::ios_base &ios,char_type fill,long double val) const BOOST_OVERRIDE { if(lc_.is_c()) { std::locale loc = ios.getloc(); @@ -96,19 +95,17 @@ class time_put_win : public std::time_put { lc_(lc) { } - virtual ~time_put_win() - { - } + typedef typename std::time_put::iter_type iter_type; typedef CharType char_type; typedef std::basic_string string_type; - virtual iter_type do_put( iter_type out, - std::ios_base &/*ios*/, - CharType /*fill*/, - std::tm const *tm, - char format, - char /*modifier*/) const + iter_type do_put( iter_type out, + std::ios_base &/*ios*/, + CharType /*fill*/, + std::tm const *tm, + char format, + char /*modifier*/) const BOOST_OVERRIDE { return write_it(out,wcsftime_l(format,tm,lc_)); } @@ -147,24 +144,24 @@ class num_punct_win : public std::numpunct { { s2=conv::from_utf(s1,"UTF-8"); } - virtual CharType do_decimal_point() const + CharType do_decimal_point() const BOOST_OVERRIDE { return *decimal_point_.c_str(); } - virtual CharType do_thousands_sep() const + CharType do_thousands_sep() const BOOST_OVERRIDE { return *thousands_sep_.c_str(); } - virtual std::string do_grouping() const + std::string do_grouping() const BOOST_OVERRIDE { return grouping_; } - virtual string_type do_truename() const + string_type do_truename() const BOOST_OVERRIDE { static const char t[]="true"; return string_type(t,t+sizeof(t)-1); } - virtual string_type do_falsename() const + string_type do_falsename() const BOOST_OVERRIDE { static const char t[]="false"; return string_type(t,t+sizeof(t)-1); diff --git a/src/win32/win_backend.cpp b/src/win32/win_backend.cpp index cd9ec837..735e00c2 100644 --- a/src/win32/win_backend.cpp +++ b/src/win32/win_backend.cpp @@ -36,7 +36,7 @@ namespace impl_win { invalid_(true) { } - virtual winapi_localization_backend *clone() const + winapi_localization_backend *clone() const BOOST_OVERRIDE { return new winapi_localization_backend(*this); } @@ -81,9 +81,9 @@ namespace impl_win { } } - virtual std::locale install(std::locale const &base, + std::locale install(std::locale const &base, locale_category_type category, - character_facet_type type = nochar_facet) + character_facet_type type = nochar_facet) BOOST_OVERRIDE { prepare_data(); From bc55a8f0d117d62a6a5ebdb5e521b9fb24dc815b Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Mon, 18 Apr 2022 11:17:16 +0200 Subject: [PATCH 28/90] Add CI test using clang-win and BOOST_USE_WINDOWS_H Reproduces the compile failure reported at #14 --- .appveyor.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.appveyor.yml b/.appveyor.yml index fc366a88..ba533e26 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -83,6 +83,13 @@ environment: B2_CXXSTD: 11,14,17 B2_TOOLSET: clang-win + - FLAVOR: clang-cl using windows.h + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + B2_ADDRESS_MODEL: 64 + B2_CXXSTD: 17 + B2_TOOLSET: clang-win + B2_DEFINES: BOOST_USE_WINDOWS_H + - FLAVOR: Visual Studio 2015, 2013 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 B2_TOOLSET: msvc-12.0,msvc-14.0 From 4649f60a19118c22b0806d6d6155a3ae64436752 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Mon, 18 Apr 2022 11:19:55 +0200 Subject: [PATCH 29/90] Cleanup includes in numeric.cpp Especially removing boost/shared_ptr.hpp fixes the min/max macro error. Closes #14 --- src/win32/numeric.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/win32/numeric.cpp b/src/win32/numeric.cpp index 54ee9a4f..07a3e035 100644 --- a/src/win32/numeric.cpp +++ b/src/win32/numeric.cpp @@ -6,23 +6,21 @@ // http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_LOCALE_SOURCE -#include -#include -#include +#include "all_generator.hpp" +#include "api.hpp" +#include "../util/numeric.hpp" +#include #include #include -#include -#include +#include +#include +#include #include #include -#include #include +#include +#include #include -#include - -#include "all_generator.hpp" -#include "api.hpp" -#include "../util/numeric.hpp" namespace boost { namespace locale { From 0d22bd47cfcae466be15a78056017ee7c9aec643 Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Mon, 25 Feb 2019 14:00:15 +0100 Subject: [PATCH 30/90] Make fallthroughs explicit Use BOOST_FALLTHROUGH for annotating fallthroughs. This fixes clang and GCC warnings about implicit fallthrough. --- include/boost/locale/utf.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/boost/locale/utf.hpp b/include/boost/locale/utf.hpp index 09f4449e..6994b712 100644 --- a/include/boost/locale/utf.hpp +++ b/include/boost/locale/utf.hpp @@ -9,6 +9,7 @@ #define BOOST_LOCALE_UTF_HPP_INCLUDED #include +#include namespace boost { namespace locale { @@ -222,6 +223,7 @@ namespace utf { if (!is_trail(tmp)) return illegal; c = (c << 6) | ( tmp & 0x3F); + BOOST_FALLTHROUGH; case 2: if(BOOST_LOCALE_UNLIKELY(p==e)) return incomplete; @@ -229,6 +231,7 @@ namespace utf { if (!is_trail(tmp)) return illegal; c = (c << 6) | ( tmp & 0x3F); + BOOST_FALLTHROUGH; case 1: if(BOOST_LOCALE_UNLIKELY(p==e)) return incomplete; @@ -272,8 +275,10 @@ namespace utf { switch(trail_size) { case 3: c = (c << 6) | ( static_cast(*p++) & 0x3F); + BOOST_FALLTHROUGH; case 2: c = (c << 6) | ( static_cast(*p++) & 0x3F); + BOOST_FALLTHROUGH; case 1: c = (c << 6) | ( static_cast(*p++) & 0x3F); } From 50fc57808114357ab63f9250e9d4b99c8a5732f7 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Fri, 22 Apr 2022 16:36:14 +0200 Subject: [PATCH 31/90] Fix compilation on MinGW platforms Compiling with a specific C++ standard w/o GNU extensions, e.g. --std=c++11, removes the required _wfopen function. So disable the strict-mode on MinGW but be careful not to do so on MinGW-w64 where this would be an error. --- src/shared/message.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/shared/message.cpp b/src/shared/message.cpp index 8ddfd171..83769426 100644 --- a/src/shared/message.cpp +++ b/src/shared/message.cpp @@ -7,6 +7,16 @@ // #define BOOST_LOCALE_SOURCE #define BOOST_DETAIL_NO_CONTAINER_FWD + +// Need _wfopen which is an extension on MinGW but not on MinGW-w64 +// So remove the strict-mode define on (only) MinGW before including anything +#if defined(__MINGW32__) && defined(__STRICT_ANSI__) +#include <_mingw.h> +#ifndef __MINGW64_VERSION_MAJOR +#undef __STRICT_ANSI__ +#endif +#endif + #include #include #include From 44899df9a795f1f7daa328b6aeb423e02844a5e3 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Sat, 28 May 2022 11:45:50 +0200 Subject: [PATCH 32/90] Add missing include for boost::unique_lock Also sort includes a bit consistenly Closes #30 --- src/win32/lcid.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/win32/lcid.cpp b/src/win32/lcid.cpp index 67542e6c..f4bd9470 100644 --- a/src/win32/lcid.cpp +++ b/src/win32/lcid.cpp @@ -6,20 +6,19 @@ // http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_LOCALE_SOURCE -#include "lcid.hpp" -#include -#include -#include -#include - -#include "../util/locale_data.hpp" - #ifndef NOMINMAX #define NOMINMAX #endif -#include +#include "lcid.hpp" +#include "../util/locale_data.hpp" +#include #include +#include +#include +#include +#include +#include namespace boost { namespace locale { From 5bcf0151ceaac0b871ba30af0cf2be1181b2bce6 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Sat, 28 May 2022 11:53:08 +0200 Subject: [PATCH 33/90] Add missing include to message.cpp Required for std::find see #43 Also sort includes and remove always-set BOOST_LOCALE_UNORDERED_CATALOG --- src/shared/message.cpp | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/src/shared/message.cpp b/src/shared/message.cpp index 83769426..f4dbc4fe 100644 --- a/src/shared/message.cpp +++ b/src/shared/message.cpp @@ -17,38 +17,26 @@ #endif #endif + +#include "mo_hash.hpp" +#include "mo_lambda.hpp" #include -#include -#include +#include #include -#include #include -#include -#ifdef BOOST_MSVC -# pragma warning(disable : 4996) -#endif - - -#if BOOST_VERSION >= 103600 -#define BOOST_LOCALE_UNORDERED_CATALOG -#endif - -#ifdef BOOST_LOCALE_UNORDERED_CATALOG +#include +#include #include -#else -#include -#endif - +#include +#include #include - - -#include "mo_hash.hpp" -#include "mo_lambda.hpp" - #include - #include +#ifdef BOOST_MSVC +# pragma warning(disable : 4996) +#endif + namespace boost { namespace locale { namespace gnu_gettext { From c174d92b7a2b4551be87bfda3bba4c1c55da81ce Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Sat, 28 May 2022 11:59:00 +0200 Subject: [PATCH 34/90] Add explicit conv.hpp include Was transitively included but we use converter_between so explicitely include the header defining that class. --- src/encoding/codepage.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/encoding/codepage.cpp b/src/encoding/codepage.cpp index c19e36b8..e4c197c2 100644 --- a/src/encoding/codepage.cpp +++ b/src/encoding/codepage.cpp @@ -6,12 +6,12 @@ // http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_LOCALE_SOURCE -#include +#include +#include "conv.hpp" #if defined(BOOST_WINDOWS) || defined(__CYGWIN__) #define BOOST_LOCALE_WITH_WCONV #endif - #ifdef BOOST_LOCALE_WITH_ICONV #include "iconv_codepage.ipp" #endif @@ -25,8 +25,8 @@ #include #include -#include #include +#include #include namespace boost { From 64ebd884294621a064019003608452c3a57aea50 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Sat, 28 May 2022 12:03:31 +0200 Subject: [PATCH 35/90] Use proper ownership for backend in generator::set_all_options The parameter is used as a reference so make it a reference. This removes the need for the shared_ptr forward declaration. --- include/boost/locale/generator.hpp | 5 +---- src/shared/generator.cpp | 14 +++++++------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/include/boost/locale/generator.hpp b/include/boost/locale/generator.hpp index 97a6fb53..14a063bb 100644 --- a/include/boost/locale/generator.hpp +++ b/include/boost/locale/generator.hpp @@ -20,9 +20,6 @@ namespace boost { - template - class shared_ptr; - /// /// \brief This is the main namespace that encloses all localization classes /// @@ -215,7 +212,7 @@ namespace boost { private: - void set_all_options(shared_ptr backend,std::string const &id) const; + void set_all_options(localization_backend& backend,std::string const &id) const; generator(generator const &); void operator=(generator const &); diff --git a/src/shared/generator.cpp b/src/shared/generator.cpp index a93ecb27..7925c378 100644 --- a/src/shared/generator.cpp +++ b/src/shared/generator.cpp @@ -126,8 +126,8 @@ namespace boost { return p->second; } } - shared_ptr backend(d->backend_manager.create()); - set_all_options(backend,id); + hold_ptr backend(d->backend_manager.create()); + set_all_options(*backend,id); std::locale result = base; locale_category_type facets = d->cats; @@ -176,15 +176,15 @@ namespace boost { d->caching_enabled = enabled; } - void generator::set_all_options(shared_ptr backend,std::string const &id) const + void generator::set_all_options(localization_backend& backend,std::string const &id) const { - backend->set_option("locale",id); + backend.set_option("locale",id); if(d->use_ansi_encoding) - backend->set_option("use_ansi_encoding","true"); + backend.set_option("use_ansi_encoding","true"); for(size_t i=0;idomains.size();i++) - backend->set_option("message_application",d->domains[i]); + backend.set_option("message_application",d->domains[i]); for(size_t i=0;ipaths.size();i++) - backend->set_option("message_path",d->paths[i]); + backend.set_option("message_path",d->paths[i]); } } // locale From f3fa220608ae158f4801372d2c1562cb61dbe5ff Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Sun, 29 May 2022 12:43:51 +0200 Subject: [PATCH 36/90] Fix includes and unify include style For consistency the following rules are used: - public includes (include folder) either include any first. At least - The first include in a cpp file is the corresponding header if any - Then , , <*>, "*" in this order - Warning suppression pragmas come last where possible - Use the C++ headers where available (i.e. not ) --- include/boost/locale/boundary/facets.hpp | 13 ++++------ include/boost/locale/boundary/index.hpp | 23 ++++++++--------- include/boost/locale/boundary/segment.hpp | 11 ++++---- include/boost/locale/boundary/types.hpp | 4 +-- include/boost/locale/collator.hpp | 4 +-- include/boost/locale/config.hpp | 12 ++++++++- include/boost/locale/conversion.hpp | 4 +-- include/boost/locale/date_time.hpp | 14 +++++------ include/boost/locale/date_time_facet.hpp | 6 ++--- include/boost/locale/definitions.hpp | 25 ------------------- include/boost/locale/encoding.hpp | 9 +++---- include/boost/locale/encoding_errors.hpp | 7 +++--- include/boost/locale/encoding_utf.hpp | 3 +-- include/boost/locale/format.hpp | 12 ++++----- include/boost/locale/formatting.hpp | 15 +++++------ include/boost/locale/generator.hpp | 9 ++++--- include/boost/locale/gnu_gettext.hpp | 1 + include/boost/locale/hold_ptr.hpp | 2 ++ include/boost/locale/info.hpp | 7 +++--- include/boost/locale/localization_backend.hpp | 12 +++++---- include/boost/locale/message.hpp | 13 +++++----- include/boost/locale/time_zone.hpp | 5 ++-- include/boost/locale/utf.hpp | 2 +- include/boost/locale/util.hpp | 13 ++++++---- performance/perf_collate.cpp | 6 ++--- performance/perf_convert.cpp | 7 +++--- src/encoding/codepage.cpp | 13 +++++----- src/encoding/iconv_codepage.ipp | 4 +-- src/encoding/uconv_codepage.ipp | 9 +++---- src/encoding/wconv_codepage.ipp | 6 ++--- src/icu/boundary.cpp | 1 + src/icu/codecvt.cpp | 3 +-- src/icu/date_time.cpp | 16 +++++------- src/icu/formatter.cpp | 1 - src/icu/time_zone.cpp | 2 +- src/posix/all_generator.hpp | 4 +-- src/posix/codecvt.cpp | 11 ++++---- src/posix/collate.cpp | 8 +++--- src/posix/converter.cpp | 18 ++++++------- src/posix/numeric.cpp | 24 ++++++++++-------- src/posix/posix_backend.cpp | 18 ++++++------- src/shared/date_time.cpp | 2 +- src/shared/format.cpp | 7 +++--- src/shared/generator.cpp | 6 ++--- src/shared/ids.cpp | 2 +- src/shared/localization_backend.cpp | 2 +- src/shared/message.cpp | 13 +++++----- src/shared/mo_lambda.cpp | 4 +-- src/std/all_generator.hpp | 3 ++- src/std/codecvt.cpp | 8 +++--- src/std/converter.cpp | 19 ++++++-------- src/std/numeric.cpp | 10 ++++---- src/std/std_backend.cpp | 10 ++++---- src/util/codecvt_converter.cpp | 20 ++++++--------- src/util/default_locale.cpp | 11 ++++---- src/util/gregorian.cpp | 22 ++++++++-------- src/util/info.cpp | 8 +++--- src/util/numeric.hpp | 11 ++++---- src/util/timezone.hpp | 5 ++-- src/win32/all_generator.hpp | 3 +-- src/win32/converter.cpp | 7 +++--- src/win32/lcid.cpp | 4 +-- src/win32/numeric.cpp | 8 +++--- src/win32/win_backend.cpp | 1 + test/test_boundary.cpp | 1 + test/test_codecvt.cpp | 8 +++--- test/test_codepage.cpp | 9 +++---- test/test_codepage_converter.cpp | 6 ++--- test/test_config.cpp | 8 +++--- test/test_formatting.cpp | 14 +++++------ test/test_icu_vs_os_timezone.cpp | 10 ++++---- test/test_locale_tools.hpp | 4 +-- test/test_message.cpp | 1 + test/test_posix_formatting.cpp | 16 ++++++------ test/test_posix_tools.hpp | 2 +- test/test_std_formatting.cpp | 11 +++----- test/test_utf.cpp | 5 ++-- test/test_winapi_formatting.cpp | 17 ++++++------- 78 files changed, 318 insertions(+), 357 deletions(-) delete mode 100644 include/boost/locale/definitions.hpp diff --git a/include/boost/locale/boundary/facets.hpp b/include/boost/locale/boundary/facets.hpp index 8aee6e39..5baa22df 100644 --- a/include/boost/locale/boundary/facets.hpp +++ b/include/boost/locale/boundary/facets.hpp @@ -8,24 +8,21 @@ #ifndef BOOST_LOCALE_BOUNDARY_FACETS_HPP_INCLUDED #define BOOST_LOCALE_BOUNDARY_FACETS_HPP_INCLUDED -#include #include +#include +#include + #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable : 4275 4251 4231 4660) #endif -#include -#include - - - namespace boost { namespace locale { /// - /// \brief This namespae contains all operations required for boundary analysis of text + /// \brief This namespace contains all operations required for boundary analysis of text /// namespace boundary { /// @@ -60,7 +57,7 @@ namespace boost { } /// - /// Offset from the beggining of the text where a break occurs. + /// Offset from the beginning of the text where a break occurs. /// size_t offset; /// diff --git a/include/boost/locale/boundary/index.hpp b/include/boost/locale/boundary/index.hpp index 8870c9bc..f77c41ad 100644 --- a/include/boost/locale/boundary/index.hpp +++ b/include/boost/locale/boundary/index.hpp @@ -8,28 +8,27 @@ #ifndef BOOST_LOCALE_BOUNDARY_INDEX_HPP_INCLUDED #define BOOST_LOCALE_BOUNDARY_INDEX_HPP_INCLUDED -#include #include #include #include #include +#include +#include #include -#include #include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include + #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable : 4275 4251 4231 4660) #endif -#include -#include -#include -#include -#include -#include - -#include namespace boost { diff --git a/include/boost/locale/boundary/segment.hpp b/include/boost/locale/boundary/segment.hpp index b6c8e193..44703f1b 100644 --- a/include/boost/locale/boundary/segment.hpp +++ b/include/boost/locale/boundary/segment.hpp @@ -7,16 +7,17 @@ // #ifndef BOOST_LOCALE_BOUNDARY_SEGMENT_HPP_INCLUDED #define BOOST_LOCALE_BOUNDARY_SEGMENT_HPP_INCLUDED + #include +#include +#include +#include +#include + #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable : 4275 4251 4231 4660) #endif -#include -#include -#include -#include - namespace boost { namespace locale { diff --git a/include/boost/locale/boundary/types.hpp b/include/boost/locale/boundary/types.hpp index 5ce1eb2c..cc9cf9b1 100644 --- a/include/boost/locale/boundary/types.hpp +++ b/include/boost/locale/boundary/types.hpp @@ -9,14 +9,14 @@ #define BOOST_LOCALE_BOUNDARY_TYPES_HPP_INCLUDED #include -#include #include +#include + #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable : 4275 4251 4231 4660) #endif - namespace boost { namespace locale { diff --git a/include/boost/locale/collator.hpp b/include/boost/locale/collator.hpp index 5aef846f..a010b67c 100644 --- a/include/boost/locale/collator.hpp +++ b/include/boost/locale/collator.hpp @@ -9,12 +9,12 @@ #define BOOST_LOCALE_COLLATOR_HPP_INCLUDED #include +#include + #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable : 4275 4251 4231 4660) #endif -#include - namespace boost { namespace locale { diff --git a/include/boost/locale/config.hpp b/include/boost/locale/config.hpp index 8947fca7..cbed359e 100644 --- a/include/boost/locale/config.hpp +++ b/include/boost/locale/config.hpp @@ -8,7 +8,17 @@ #ifndef BOOST_LOCALE_CONFIG_HPP_INCLUDED #define BOOST_LOCALE_CONFIG_HPP_INCLUDED -#include +#include + +#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_LOCALE_DYN_LINK) +# ifdef BOOST_LOCALE_SOURCE +# define BOOST_LOCALE_DECL BOOST_SYMBOL_EXPORT +# else +# define BOOST_LOCALE_DECL BOOST_SYMBOL_IMPORT +# endif // BOOST_LOCALE_SOURCE +#else +# define BOOST_LOCALE_DECL +#endif // BOOST_LOCALE_DYN_LINK // // Automatically link to the correct build variant where possible. diff --git a/include/boost/locale/conversion.hpp b/include/boost/locale/conversion.hpp index 3781f324..cedce209 100644 --- a/include/boost/locale/conversion.hpp +++ b/include/boost/locale/conversion.hpp @@ -9,12 +9,12 @@ #define BOOST_LOCALE_CONVERTER_HPP_INCLUDED #include +#include + #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable : 4275 4251 4231 4660) #endif -#include - namespace boost { namespace locale { diff --git a/include/boost/locale/date_time.hpp b/include/boost/locale/date_time.hpp index 71a92690..21c1e8a1 100644 --- a/include/boost/locale/date_time.hpp +++ b/include/boost/locale/date_time.hpp @@ -8,20 +8,18 @@ #ifndef BOOST_LOCALE_DATE_TIME_HPP_INCLUDED #define BOOST_LOCALE_DATE_TIME_HPP_INCLUDED -#include -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4275 4251 4231 4660) -#endif - -#include #include #include +#include #include #include -#include #include +#include +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4275 4251 4231 4660) +#endif namespace boost { namespace locale { diff --git a/include/boost/locale/date_time_facet.hpp b/include/boost/locale/date_time_facet.hpp index 3bd3df2f..e1f0871c 100644 --- a/include/boost/locale/date_time_facet.hpp +++ b/include/boost/locale/date_time_facet.hpp @@ -9,14 +9,14 @@ #define BOOST_LOCALE_DATE_TIME_FACET_HPP_INCLUDED #include +#include +#include + #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable : 4275 4251 4231 4660) #endif -#include -#include - namespace boost { namespace locale { /// diff --git a/include/boost/locale/definitions.hpp b/include/boost/locale/definitions.hpp deleted file mode 100644 index 156e04aa..00000000 --- a/include/boost/locale/definitions.hpp +++ /dev/null @@ -1,25 +0,0 @@ -// -// Copyright (c) 2009-2011 Artyom Beilis (Tonkikh) -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -#ifndef BOOST_LOCALE_DEFINITIONS_HPP_INCLUDED -#define BOOST_LOCALE_DEFINITIONS_HPP_INCLUDED - -#include - -#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_LOCALE_DYN_LINK) -# ifdef BOOST_LOCALE_SOURCE -# define BOOST_LOCALE_DECL BOOST_SYMBOL_EXPORT -# else -# define BOOST_LOCALE_DECL BOOST_SYMBOL_IMPORT -# endif // BOOST_LOCALE_SOURCE -#else -# define BOOST_LOCALE_DECL -#endif // BOOST_LOCALE_DYN_LINK - -#endif // boost/locale/config.hpp -// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 - diff --git a/include/boost/locale/encoding.hpp b/include/boost/locale/encoding.hpp index 5fd9cb74..0d53af5e 100644 --- a/include/boost/locale/encoding.hpp +++ b/include/boost/locale/encoding.hpp @@ -9,15 +9,14 @@ #define BOOST_LOCALE_ENCODING_HPP_INCLUDED #include -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4275 4251 4231 4660) -#endif #include #include #include - +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4275 4251 4231 4660) +#endif namespace boost { namespace locale { diff --git a/include/boost/locale/encoding_errors.hpp b/include/boost/locale/encoding_errors.hpp index 42b4bdf4..9e08cffa 100644 --- a/include/boost/locale/encoding_errors.hpp +++ b/include/boost/locale/encoding_errors.hpp @@ -8,14 +8,13 @@ #ifndef BOOST_LOCALE_ENCODING_ERRORS_HPP_INCLUDED #define BOOST_LOCALE_ENCODING_ERRORS_HPP_INCLUDED -#include +#include +#include + #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable : 4275 4251 4231 4660) #endif -#include - - namespace boost { namespace locale { diff --git a/include/boost/locale/encoding_utf.hpp b/include/boost/locale/encoding_utf.hpp index 9620a2f4..7bb89819 100644 --- a/include/boost/locale/encoding_utf.hpp +++ b/include/boost/locale/encoding_utf.hpp @@ -11,13 +11,12 @@ #include #include #include + #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable : 4275 4251 4231 4660) #endif - - namespace boost { namespace locale { namespace conv { diff --git a/include/boost/locale/format.hpp b/include/boost/locale/format.hpp index 7615c406..15ec4bd5 100644 --- a/include/boost/locale/format.hpp +++ b/include/boost/locale/format.hpp @@ -9,16 +9,16 @@ #define BOOST_LOCALE_FORMAT_HPP_INCLUDED #include -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4275 4251 4231 4660) -#endif -#include #include #include - +#include #include +#include +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4275 4251 4231 4660) +#endif namespace boost { namespace locale { diff --git a/include/boost/locale/formatting.hpp b/include/boost/locale/formatting.hpp index c16b5092..aa46db2f 100644 --- a/include/boost/locale/formatting.hpp +++ b/include/boost/locale/formatting.hpp @@ -9,18 +9,19 @@ #define BOOST_LOCALE_FORMATTING_HPP_INCLUDED #include -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4275 4251 4231 4660) -#endif -#include #include -#include +#include +#include #include +#include #include -#include #include +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4275 4251 4231 4660) +#endif + namespace boost { namespace locale { /// diff --git a/include/boost/locale/generator.hpp b/include/boost/locale/generator.hpp index 14a063bb..ea23571a 100644 --- a/include/boost/locale/generator.hpp +++ b/include/boost/locale/generator.hpp @@ -8,15 +8,16 @@ #ifndef BOOST_LOCALE_GENERATOR_HPP #define BOOST_LOCALE_GENERATOR_HPP #include +#include #include +#include +#include +#include + #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable : 4275 4251 4231 4660) #endif -#include -#include -#include -#include namespace boost { diff --git a/include/boost/locale/gnu_gettext.hpp b/include/boost/locale/gnu_gettext.hpp index ce2e7f26..191dc6ac 100644 --- a/include/boost/locale/gnu_gettext.hpp +++ b/include/boost/locale/gnu_gettext.hpp @@ -11,6 +11,7 @@ #include #include #include +#include namespace boost { namespace locale { diff --git a/include/boost/locale/hold_ptr.hpp b/include/boost/locale/hold_ptr.hpp index 6b66b10f..e1dc8fb4 100644 --- a/include/boost/locale/hold_ptr.hpp +++ b/include/boost/locale/hold_ptr.hpp @@ -8,6 +8,8 @@ #ifndef BOOST_LOCALE_HOLD_PTR_H #define BOOST_LOCALE_HOLD_PTR_H +#include + namespace boost { namespace locale { /// diff --git a/include/boost/locale/info.hpp b/include/boost/locale/info.hpp index ba8a1fbd..70eb200f 100644 --- a/include/boost/locale/info.hpp +++ b/include/boost/locale/info.hpp @@ -7,14 +7,15 @@ // #ifndef BOOST_LOCALE_INFO_HPP_INCLUDED #define BOOST_LOCALE_INFO_HPP_INCLUDED + #include +#include +#include + #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable : 4275 4251 4231 4660) #endif -#include -#include - namespace boost { namespace locale { diff --git a/include/boost/locale/localization_backend.hpp b/include/boost/locale/localization_backend.hpp index 2cebd089..2a0d976e 100644 --- a/include/boost/locale/localization_backend.hpp +++ b/include/boost/locale/localization_backend.hpp @@ -7,17 +7,19 @@ // #ifndef BOOST_LOCALE_LOCALIZATION_BACKEND_HPP #define BOOST_LOCALE_LOCALIZATION_BACKEND_HPP + #include #include +#include +#include +#include +#include +#include + #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable : 4275 4251 4231 4660) #endif -#include -#include -#include -#include -#include namespace boost { namespace locale { diff --git a/include/boost/locale/message.hpp b/include/boost/locale/message.hpp index 69095dae..dbf96934 100644 --- a/include/boost/locale/message.hpp +++ b/include/boost/locale/message.hpp @@ -8,17 +8,16 @@ #ifndef BOOST_LOCALE_MESSAGE_HPP_INCLUDED #define BOOST_LOCALE_MESSAGE_HPP_INCLUDED -#include +#include +#include +#include +#include +#include + #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable : 4275 4251 4231 4660) #endif -#include -#include -#include -#include -#include -#include // glibc < 2.3.4 declares those as macros if compiled with optimization turned on #ifdef gettext diff --git a/include/boost/locale/time_zone.hpp b/include/boost/locale/time_zone.hpp index 2c4e76e8..ee80b136 100644 --- a/include/boost/locale/time_zone.hpp +++ b/include/boost/locale/time_zone.hpp @@ -9,14 +9,13 @@ #define BOOST_LOCALE_TIME_ZONE_HPP_INCLUDED #include +#include + #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable : 4275 4251 4231 4660) #endif -#include - - namespace boost { namespace locale { /// diff --git a/include/boost/locale/utf.hpp b/include/boost/locale/utf.hpp index 6994b712..5fa8bcdb 100644 --- a/include/boost/locale/utf.hpp +++ b/include/boost/locale/utf.hpp @@ -8,8 +8,8 @@ #ifndef BOOST_LOCALE_UTF_HPP_INCLUDED #define BOOST_LOCALE_UTF_HPP_INCLUDED +#include #include -#include namespace boost { namespace locale { diff --git a/include/boost/locale/util.hpp b/include/boost/locale/util.hpp index 7e7216b2..824147d1 100644 --- a/include/boost/locale/util.hpp +++ b/include/boost/locale/util.hpp @@ -7,14 +7,17 @@ // #ifndef BOOST_LOCALE_UTIL_HPP #define BOOST_LOCALE_UTIL_HPP -#include -#include -#include -#include + #include +#include #include +#include +#include +#ifndef BOOST_NO_CXX11_SMART_PTR +#include +#endif +#include -#include namespace boost { namespace locale { /// diff --git a/performance/perf_collate.cpp b/performance/perf_collate.cpp index c0721d8c..a2891d82 100644 --- a/performance/perf_collate.cpp +++ b/performance/perf_collate.cpp @@ -5,11 +5,11 @@ // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // +#include #include -#include #include - -#include +#include +#include using namespace std; using namespace boost::locale; diff --git a/performance/perf_convert.cpp b/performance/perf_convert.cpp index 6d69be65..641cc6c9 100644 --- a/performance/perf_convert.cpp +++ b/performance/perf_convert.cpp @@ -5,11 +5,12 @@ // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // -#include -#include -#include #include +#include +#include +#include +#include using namespace std; using namespace boost::locale; diff --git a/src/encoding/codepage.cpp b/src/encoding/codepage.cpp index e4c197c2..a16fcb69 100644 --- a/src/encoding/codepage.cpp +++ b/src/encoding/codepage.cpp @@ -7,8 +7,13 @@ // #define BOOST_LOCALE_SOURCE #include -#include "conv.hpp" +#include +#include +#include +#include +#include +#include "conv.hpp" #if defined(BOOST_WINDOWS) || defined(__CYGWIN__) #define BOOST_LOCALE_WITH_WCONV #endif @@ -22,12 +27,6 @@ #include "wconv_codepage.ipp" #endif -#include -#include - -#include -#include -#include namespace boost { namespace locale { diff --git a/src/encoding/iconv_codepage.ipp b/src/encoding/iconv_codepage.ipp index 6845a68c..07e6180f 100644 --- a/src/encoding/iconv_codepage.ipp +++ b/src/encoding/iconv_codepage.ipp @@ -9,11 +9,9 @@ #define BOOST_LOCALE_IMPL_ICONV_CODEPAGE_HPP #include +#include #include "../util/iconv.hpp" -#include #include "conv.hpp" -#include -#include namespace boost { namespace locale { diff --git a/src/encoding/uconv_codepage.ipp b/src/encoding/uconv_codepage.ipp index 8a93b67f..075e6df5 100644 --- a/src/encoding/uconv_codepage.ipp +++ b/src/encoding/uconv_codepage.ipp @@ -8,15 +8,12 @@ #ifndef BOOST_LOCALE_IMPL_UCONV_CODEPAGE_HPP #define BOOST_LOCALE_IMPL_UCONV_CODEPAGE_HPP #include +#include +#include +#include #include "conv.hpp" #include "../icu/icu_util.hpp" #include "../icu/uconv.hpp" -#include -#include -#include -#include - -#include namespace boost { namespace locale { diff --git a/src/encoding/wconv_codepage.ipp b/src/encoding/wconv_codepage.ipp index 6c89f6f9..d15e2352 100644 --- a/src/encoding/wconv_codepage.ipp +++ b/src/encoding/wconv_codepage.ipp @@ -9,19 +9,17 @@ #ifndef BOOST_LOCALE_IMPL_WCONV_CODEPAGE_HPP #define BOOST_LOCALE_IMPL_WCONV_CODEPAGE_HPP - #include #include #include #include -#include "conv.hpp" - +#include #ifndef NOMINMAX # define NOMINMAX #endif #include -#include +#include "conv.hpp" namespace boost { namespace locale { diff --git a/src/icu/boundary.cpp b/src/icu/boundary.cpp index 8d265104..c4ff2c86 100644 --- a/src/icu/boundary.cpp +++ b/src/icu/boundary.cpp @@ -15,6 +15,7 @@ #endif #include #include +#include #include "cdata.hpp" #include "all_generator.hpp" diff --git a/src/icu/codecvt.cpp b/src/icu/codecvt.cpp index d778b2e3..951dfcf1 100644 --- a/src/icu/codecvt.cpp +++ b/src/icu/codecvt.cpp @@ -16,13 +16,12 @@ #include #include #include "codecvt.hpp" +#include "icu_util.hpp" #ifdef BOOST_MSVC # pragma warning(disable : 4244) // loose data #endif -#include "icu_util.hpp" -#include namespace boost { namespace locale { namespace impl_icu { diff --git a/src/icu/date_time.cpp b/src/icu/date_time.cpp index 9ef26f3b..2840a2ed 100644 --- a/src/icu/date_time.cpp +++ b/src/icu/date_time.cpp @@ -6,26 +6,22 @@ // http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_LOCALE_SOURCE -#include #include +#include #include #include -#include "all_generator.hpp" - #include +#include +#include +#include #include #include #include -#include -#include - +#include "all_generator.hpp" #include "cdata.hpp" -#include "uconv.hpp" #include "time_zone.hpp" - -#include - +#include "uconv.hpp" namespace boost { namespace locale { diff --git a/src/icu/formatter.cpp b/src/icu/formatter.cpp index 0275ac94..8496c2fb 100644 --- a/src/icu/formatter.cpp +++ b/src/icu/formatter.cpp @@ -29,7 +29,6 @@ # pragma warning(disable : 4244) // lose data #endif - namespace boost { namespace locale { namespace impl_icu { diff --git a/src/icu/time_zone.cpp b/src/icu/time_zone.cpp index 8276231f..7a7f4b2d 100644 --- a/src/icu/time_zone.cpp +++ b/src/icu/time_zone.cpp @@ -25,13 +25,13 @@ #endif #ifdef BOOST_LOCALE_WORKAROUND_ICU_BUG +#include #include #include #include #include #include #include -#include #include #endif diff --git a/src/posix/all_generator.hpp b/src/posix/all_generator.hpp index 8a80e79d..74ef2b3c 100644 --- a/src/posix/all_generator.hpp +++ b/src/posix/all_generator.hpp @@ -10,8 +10,8 @@ #include #include -#include -#include +#include +#include #ifdef __APPLE__ #include diff --git a/src/posix/codecvt.cpp b/src/posix/codecvt.cpp index 58d455c7..9213cd12 100644 --- a/src/posix/codecvt.cpp +++ b/src/posix/codecvt.cpp @@ -6,19 +6,18 @@ // http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_LOCALE_SOURCE +#include "codecvt.hpp" #include -#include #include -#include "../encoding/conv.hpp" #include -#include "all_generator.hpp" - -#include +#include #include +#include #include #include -#include "codecvt.hpp" +#include "all_generator.hpp" +#include "../encoding/conv.hpp" #ifdef BOOST_LOCALE_WITH_ICONV #include "../util/iconv.hpp" #endif diff --git a/src/posix/collate.cpp b/src/posix/collate.cpp index a00455d3..c413cbaa 100644 --- a/src/posix/collate.cpp +++ b/src/posix/collate.cpp @@ -6,20 +6,20 @@ // http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_LOCALE_SOURCE +#include #if defined(__FreeBSD__) #include #endif +#include +#include #include -#include -#include #include #include #include #include #include -#include -#include "../shared/mo_hash.hpp" +#include "../shared/mo_hash.hpp" #include "all_generator.hpp" namespace boost { diff --git a/src/posix/converter.cpp b/src/posix/converter.cpp index 34f21d68..360b04cd 100644 --- a/src/posix/converter.cpp +++ b/src/posix/converter.cpp @@ -7,20 +7,20 @@ // #define BOOST_LOCALE_SOURCE -#if defined(__FreeBSD__) -#include -#endif -#include -#include #include #include #include #include -#include -#include -#include -#include +#include +#include #include +#include +#include +#include +#if defined(__FreeBSD__) +#include +#endif + #include "all_generator.hpp" namespace boost { diff --git a/src/posix/numeric.cpp b/src/posix/numeric.cpp index 2de281dd..b9c7b279 100644 --- a/src/posix/numeric.cpp +++ b/src/posix/numeric.cpp @@ -9,22 +9,24 @@ #if defined(__FreeBSD__) #include #endif -#include -#include -#include +#include #include #include -#include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include +#include #include -#include +#include +#include +#include +#include + #include "../util/numeric.hpp" #include "all_generator.hpp" diff --git a/src/posix/posix_backend.cpp b/src/posix/posix_backend.cpp index 095feb27..1178dec0 100644 --- a/src/posix/posix_backend.cpp +++ b/src/posix/posix_backend.cpp @@ -6,22 +6,22 @@ // http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_LOCALE_SOURCE -#if defined(__FreeBSD__) -#include -#endif +#include "posix_backend.hpp" #include #include #include -#include "all_generator.hpp" -#include "posix_backend.hpp" - -#include "../util/locale_data.hpp" -#include "../util/gregorian.hpp" #include #include #include - #include +#include +#if defined(__FreeBSD__) +#include +#endif + +#include "all_generator.hpp" +#include "../util/gregorian.hpp" +#include "../util/locale_data.hpp" namespace boost { namespace locale { diff --git a/src/shared/date_time.cpp b/src/shared/date_time.cpp index 4f68b7d8..119870e8 100644 --- a/src/shared/date_time.cpp +++ b/src/shared/date_time.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include namespace boost { namespace locale { diff --git a/src/shared/format.cpp b/src/shared/format.cpp index 839ee522..814d4df6 100644 --- a/src/shared/format.cpp +++ b/src/shared/format.cpp @@ -7,12 +7,11 @@ // #define BOOST_LOCALE_SOURCE #include -#include #include -#include -#include - +#include +#include #include +#include namespace boost { namespace locale { diff --git a/src/shared/generator.cpp b/src/shared/generator.cpp index 7925c378..82fab197 100644 --- a/src/shared/generator.cpp +++ b/src/shared/generator.cpp @@ -9,12 +9,12 @@ #include #include #include -#include -#include -#include #include #include #include +#include +#include +#include namespace boost { namespace locale { diff --git a/src/shared/ids.cpp b/src/shared/ids.cpp index f3443724..61a3ce76 100644 --- a/src/shared/ids.cpp +++ b/src/shared/ids.cpp @@ -10,8 +10,8 @@ #include #include #include -#include #include +#include namespace boost { namespace locale { diff --git a/src/shared/localization_backend.cpp b/src/shared/localization_backend.cpp index 12261cd6..53c8a36d 100644 --- a/src/shared/localization_backend.cpp +++ b/src/shared/localization_backend.cpp @@ -7,10 +7,10 @@ // #define BOOST_LOCALE_SOURCE #include +#include #include #include #include -#include #include #ifdef BOOST_LOCALE_WITH_ICU diff --git a/src/shared/message.cpp b/src/shared/message.cpp index f4dbc4fe..000f4a51 100644 --- a/src/shared/message.cpp +++ b/src/shared/message.cpp @@ -18,20 +18,21 @@ #endif -#include "mo_hash.hpp" -#include "mo_lambda.hpp" -#include +#include #include #include #include -#include #include #include #include #include +#include +#include #include -#include -#include +#include + +#include "mo_hash.hpp" +#include "mo_lambda.hpp" #ifdef BOOST_MSVC # pragma warning(disable : 4996) diff --git a/src/shared/mo_lambda.cpp b/src/shared/mo_lambda.cpp index 50c6fd0a..398f24ce 100644 --- a/src/shared/mo_lambda.cpp +++ b/src/shared/mo_lambda.cpp @@ -6,8 +6,8 @@ // http://www.boost.org/LICENSE_1_0.txt) // #include "mo_lambda.hpp" -#include -#include +#include +#include namespace boost { namespace locale { diff --git a/src/std/all_generator.hpp b/src/std/all_generator.hpp index d79525b7..00169140 100644 --- a/src/std/all_generator.hpp +++ b/src/std/all_generator.hpp @@ -9,7 +9,8 @@ #define BOOST_LOCALE_IMPL_STD_ALL_GENERATOR_HPP #include -#include +#include +#include namespace boost { namespace locale { diff --git a/src/std/codecvt.cpp b/src/std/codecvt.cpp index 9b62d2f4..7a6b6ef0 100644 --- a/src/std/codecvt.cpp +++ b/src/std/codecvt.cpp @@ -6,11 +6,10 @@ // http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_LOCALE_SOURCE -#include -#include -#include #include "all_generator.hpp" -#include +#include +#include + namespace boost { namespace locale { namespace impl_std { @@ -20,7 +19,6 @@ namespace impl_std { { return std::locale(in,new std::codecvt_byname(locale_name.c_str())); } - std::locale create_codecvt( std::locale const &in, std::string const &locale_name, diff --git a/src/std/converter.cpp b/src/std/converter.cpp index 889a6825..299d568b 100644 --- a/src/std/converter.cpp +++ b/src/std/converter.cpp @@ -7,27 +7,24 @@ // #define BOOST_LOCALE_SOURCE -#include -#ifdef BOOST_MSVC -# pragma warning(disable : 4996) -#endif - -#include -#include -#include +#include #include #include +#include +#include +#include #include - - #include "all_generator.hpp" +#ifdef BOOST_MSVC +# pragma warning(disable : 4996) +#endif + namespace boost { namespace locale { namespace impl_std { - template class std_converter : public converter { diff --git a/src/std/numeric.cpp b/src/std/numeric.cpp index 4f45bf1b..06ce7167 100644 --- a/src/std/numeric.cpp +++ b/src/std/numeric.cpp @@ -6,14 +6,14 @@ // http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_LOCALE_SOURCE -#include -#include -#include +#include #include #include -#include +#include +#include +#include #include -#include +#include #include "../util/numeric.hpp" #include "all_generator.hpp" diff --git a/src/std/std_backend.cpp b/src/std/std_backend.cpp index fef722b6..67e8bda1 100644 --- a/src/std/std_backend.cpp +++ b/src/std/std_backend.cpp @@ -6,14 +6,13 @@ // http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_LOCALE_SOURCE +#include "std_backend.hpp" #include #include -#include "all_generator.hpp" -#include "../util/locale_data.hpp" -#include "../util/gregorian.hpp" #include #include #include +#include #if defined(BOOST_WINDOWS) # ifndef NOMINMAX @@ -23,8 +22,9 @@ # include "../encoding/conv.hpp" # include "../win32/lcid.hpp" #endif - -#include "std_backend.hpp" +#include "all_generator.hpp" +#include "../util/locale_data.hpp" +#include "../util/gregorian.hpp" namespace boost { namespace locale { diff --git a/src/util/codecvt_converter.cpp b/src/util/codecvt_converter.cpp index bd9cebb5..69f035df 100644 --- a/src/util/codecvt_converter.cpp +++ b/src/util/codecvt_converter.cpp @@ -9,26 +9,22 @@ #include #include #include - -#include "../encoding/conv.hpp" - #include - -#ifdef BOOST_MSVC -# pragma warning(disable : 4244 4996) // loose data -#endif - -#include -#include -#include #include +#include +#include -//#define DEBUG_CODECVT +#include "../encoding/conv.hpp" +//#define DEBUG_CODECVT #ifdef DEBUG_CODECVT #include #endif +#ifdef BOOST_MSVC +# pragma warning(disable : 4244 4996) // loose data +#endif + namespace boost { namespace locale { namespace util { diff --git a/src/util/default_locale.cpp b/src/util/default_locale.cpp index b0aab03c..398645fc 100644 --- a/src/util/default_locale.cpp +++ b/src/util/default_locale.cpp @@ -8,12 +8,7 @@ #define BOOST_LOCALE_SOURCE #include -#include -#include - -#ifdef BOOST_MSVC -# pragma warning(disable : 4996) -#endif +#include #if defined(BOOST_WINDOWS) || defined(__CYGWIN__) #ifndef NOMINMAX @@ -23,6 +18,10 @@ #define BOOST_LOCALE_USE_WIN32_API #endif +#ifdef BOOST_MSVC +# pragma warning(disable : 4996) +#endif + namespace boost { namespace locale { namespace util { diff --git a/src/util/gregorian.cpp b/src/util/gregorian.cpp index 9247c7bc..59859234 100644 --- a/src/util/gregorian.cpp +++ b/src/util/gregorian.cpp @@ -6,24 +6,24 @@ // http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_LOCALE_SOURCE -#include -#ifdef BOOST_MSVC -# pragma warning(disable : 4996) -#endif -#include -#include -#include #include #include #include -#include -#include -#include #include +#include +#include +#include #include +#include +#include +#include -#include "timezone.hpp" #include "gregorian.hpp" +#include "timezone.hpp" + +#ifdef BOOST_MSVC +# pragma warning(disable : 4996) +#endif namespace boost { namespace locale { diff --git a/src/util/info.cpp b/src/util/info.cpp index 0ec7ba89..e8aab727 100644 --- a/src/util/info.cpp +++ b/src/util/info.cpp @@ -6,14 +6,14 @@ // http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_LOCALE_SOURCE -#include -#include -#include #include #include #include +#include +#include +#include #include -#include +#include #include "locale_data.hpp" diff --git a/src/util/numeric.hpp b/src/util/numeric.hpp index 299713f5..9610c39d 100644 --- a/src/util/numeric.hpp +++ b/src/util/numeric.hpp @@ -7,15 +7,15 @@ // #ifndef BOOST_LOCALE_IMPL_UTIL_NUMERIC_HPP #define BOOST_LOCALE_IMPL_UTIL_NUMERIC_HPP +#include +#include +#include +#include +#include #include #include -#include -#include -#include #include #include -#include -#include #include "timezone.hpp" @@ -24,7 +24,6 @@ # pragma warning(disable : 4996) #endif - namespace boost { namespace locale { namespace util { diff --git a/src/util/timezone.hpp b/src/util/timezone.hpp index 07a8c8ca..a387b9a5 100644 --- a/src/util/timezone.hpp +++ b/src/util/timezone.hpp @@ -7,9 +7,10 @@ // #ifndef BOOST_LOCALE_IMPL_UTIL_TIMEZONE_HPP #define BOOST_LOCALE_IMPL_UTIL_TIMEZONE_HPP +#include +#include #include -#include -#include + namespace boost { namespace locale { namespace util { diff --git a/src/win32/all_generator.hpp b/src/win32/all_generator.hpp index 083d0562..a0d2415e 100644 --- a/src/win32/all_generator.hpp +++ b/src/win32/all_generator.hpp @@ -9,8 +9,7 @@ #define BOOST_LOCALE_IMPL_WIN32_ALL_GENERATOR_HPP #include -#include -#include +#include namespace boost { namespace locale { diff --git a/src/win32/converter.cpp b/src/win32/converter.cpp index 420e6d58..c2893558 100644 --- a/src/win32/converter.cpp +++ b/src/win32/converter.cpp @@ -7,13 +7,12 @@ // #define BOOST_LOCALE_SOURCE -#include -#include #include #include #include -#include -#include +#include +#include +#include #include "api.hpp" #include "all_generator.hpp" diff --git a/src/win32/lcid.cpp b/src/win32/lcid.cpp index f4bd9470..d761a22e 100644 --- a/src/win32/lcid.cpp +++ b/src/win32/lcid.cpp @@ -11,14 +11,14 @@ #endif #include "lcid.hpp" -#include "../util/locale_data.hpp" #include #include +#include #include #include #include -#include #include +#include "../util/locale_data.hpp" namespace boost { namespace locale { diff --git a/src/win32/numeric.cpp b/src/win32/numeric.cpp index 07a3e035..30a12754 100644 --- a/src/win32/numeric.cpp +++ b/src/win32/numeric.cpp @@ -12,14 +12,14 @@ #include #include #include -#include +#include +#include +#include +#include #include #include #include -#include -#include #include -#include #include namespace boost { diff --git a/src/win32/win_backend.cpp b/src/win32/win_backend.cpp index 735e00c2..5d978478 100644 --- a/src/win32/win_backend.cpp +++ b/src/win32/win_backend.cpp @@ -17,6 +17,7 @@ #include "api.hpp" #include #include +#include namespace boost { namespace locale { diff --git a/test/test_boundary.cpp b/test/test_boundary.cpp index 56b62f24..0dc8c6cb 100644 --- a/test/test_boundary.cpp +++ b/test/test_boundary.cpp @@ -22,6 +22,7 @@ int main() #include "test_locale_tools.hpp" #include #include +#include // Debugging code diff --git a/test/test_codecvt.cpp b/test/test_codecvt.cpp index 026a5aea..c3f444fb 100644 --- a/test/test_codecvt.cpp +++ b/test/test_codecvt.cpp @@ -6,12 +6,12 @@ // http://www.boost.org/LICENSE_1_0.txt) // #include -#include -#include +#include #include -#include -#include +#include +#include #include +#include #define BOOST_LOCALE_ERROR_LIMIT -1 #include "test_locale.hpp" diff --git a/test/test_codepage.cpp b/test/test_codepage.cpp index 389c811e..c305b37e 100644 --- a/test/test_codepage.cpp +++ b/test/test_codepage.cpp @@ -8,13 +8,10 @@ #include #include -#include #include -#include +#include #include -#include "test_locale.hpp" -#include "test_locale_tools.hpp" - +#include #ifndef BOOST_LOCALE_NO_POSIX_BACKEND # ifdef __APPLE__ @@ -30,6 +27,8 @@ #include #endif +#include "test_locale.hpp" +#include "test_locale_tools.hpp" bool test_iso; bool test_iso_8859_8 = true; diff --git a/test/test_codepage_converter.cpp b/test/test_codepage_converter.cpp index 8204db11..6ce48b84 100644 --- a/test/test_codepage_converter.cpp +++ b/test/test_codepage_converter.cpp @@ -5,8 +5,6 @@ // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // -#include "test_locale.hpp" -#include "test_locale_tools.hpp" #include #ifdef BOOST_LOCALE_WITH_ICU #include "../src/icu/codecvt.hpp" @@ -18,7 +16,9 @@ #include #endif -#include +#include +#include "test_locale.hpp" +#include "test_locale_tools.hpp" char *make2(unsigned v) { diff --git a/test/test_config.cpp b/test/test_config.cpp index 5c4a2191..fa2c9018 100644 --- a/test/test_config.cpp +++ b/test/test_config.cpp @@ -6,15 +6,15 @@ // http://www.boost.org/LICENSE_1_0.txt) // +#include +#include +#include +#include #include #include -#include -#include #include -#include #include -#include #ifdef BOOST_LOCALE_WITH_ICU #include #endif diff --git a/test/test_formatting.cpp b/test/test_formatting.cpp index 4a337f26..ca55fc5e 100644 --- a/test/test_formatting.cpp +++ b/test/test_formatting.cpp @@ -18,19 +18,19 @@ int main() // Disable this "security crap" #endif -#include -#include #include +#include +#include #include -#include "test_locale.hpp" -#include "test_locale_tools.hpp" -#include -#include #include +#include #include - +#include #include +#include "test_locale.hpp" +#include "test_locale_tools.hpp" + using namespace boost::locale; //#define TEST_DEBUG diff --git a/test/test_icu_vs_os_timezone.cpp b/test/test_icu_vs_os_timezone.cpp index fa1fd94d..b1f94d04 100644 --- a/test/test_icu_vs_os_timezone.cpp +++ b/test/test_icu_vs_os_timezone.cpp @@ -19,16 +19,16 @@ int main() // Disable this "security crap" #endif -#include #include +#include #include -#include "test_locale.hpp" -#include "test_locale_tools.hpp" -#include +#include #include #include +#include -#include +#include "test_locale.hpp" +#include "test_locale_tools.hpp" int main() { diff --git a/test/test_locale_tools.hpp b/test/test_locale_tools.hpp index daaa107c..694377ee 100644 --- a/test/test_locale_tools.hpp +++ b/test/test_locale_tools.hpp @@ -11,9 +11,9 @@ #include +#include +#include #include -#include -#include template std::basic_string to_correct_string(std::string const &e,std::locale /*l*/) diff --git a/test/test_message.cpp b/test/test_message.cpp index 2c0d365f..6728a24d 100644 --- a/test/test_message.cpp +++ b/test/test_message.cpp @@ -14,6 +14,7 @@ #include "test_locale.hpp" #include "test_locale_tools.hpp" #include +#include namespace bl = boost::locale; diff --git a/test/test_posix_formatting.cpp b/test/test_posix_formatting.cpp index d51c2f49..194fdd33 100644 --- a/test/test_posix_formatting.cpp +++ b/test/test_posix_formatting.cpp @@ -13,21 +13,21 @@ int main() } #else #include -#include -#include #include +#include #include +#include #include -#include "test_locale.hpp" -#include "test_locale_tools.hpp" -#include "test_posix_tools.hpp" +#include +#include #include - -#include #include -#include #include +#include "test_locale.hpp" +#include "test_locale_tools.hpp" +#include "test_posix_tools.hpp" + //#define DEBUG_FMT bool equal(std::string const &s1,std::string const &s2,locale_t /*lc*/) diff --git a/test/test_posix_tools.hpp b/test/test_posix_tools.hpp index 6be9c589..d017bcdf 100644 --- a/test/test_posix_tools.hpp +++ b/test/test_posix_tools.hpp @@ -9,7 +9,7 @@ #ifndef BOOST_LOCLAE_TEST_LOCALE_POSIX_TOOLS_HPP #define BOOST_LOCLAE_TEST_LOCALE_POSIX_TOOLS_HPP -#include +#include #include #if defined(__APPLE__) || defined(__FreeBSD__) diff --git a/test/test_std_formatting.cpp b/test/test_std_formatting.cpp index 30cb4e1b..eb07c35c 100644 --- a/test/test_std_formatting.cpp +++ b/test/test_std_formatting.cpp @@ -6,7 +6,6 @@ // http://www.boost.org/LICENSE_1_0.txt) // - #ifdef BOOST_LOCALE_NO_STD_BACKEND #include int main() @@ -15,24 +14,22 @@ int main() } #else - +#include #include -#include #include -#include +#include #include +#include + #include "test_locale.hpp" #include "test_locale_tools.hpp" -#include //#define DEBUG_FMT -#include #ifdef BOOST_MSVC # pragma warning(disable : 4996) #endif - template bool equal(std::basic_string const &s1,std::basic_string const &s2) { diff --git a/test/test_utf.cpp b/test/test_utf.cpp index 3476154d..e044d732 100644 --- a/test/test_utf.cpp +++ b/test/test_utf.cpp @@ -5,11 +5,10 @@ // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // +#include +#include #include "test_locale.hpp" #include "test_locale_tools.hpp" -#include - -#include using namespace boost::locale::utf; diff --git a/test/test_winapi_formatting.cpp b/test/test_winapi_formatting.cpp index a505b6f3..93ddc8b1 100644 --- a/test/test_winapi_formatting.cpp +++ b/test/test_winapi_formatting.cpp @@ -15,25 +15,24 @@ int main() #else #include -#include -#include #include +#include #include +#include #include -#include "test_locale.hpp" -#include "test_locale_tools.hpp" -#include "../src/win32/lcid.hpp" +#include +#include #include -#include -#include - #ifndef NOMINMAX #define NOMINMAX #endif - #include +#include "test_locale.hpp" +#include "test_locale_tools.hpp" +#include "../src/win32/lcid.hpp" + #define DEBUG_FMT bool equal(std::string const &s1,std::wstring const &s2) From f61245a3d2d2ad329d3769f8f06d8d95cd2f2b86 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Sun, 29 May 2022 13:31:26 +0200 Subject: [PATCH 37/90] Add examples and performance test to CMake build Make sure performance examples compile at least and examples also run. --- CMakeLists.txt | 1 + examples/CMakeLists.txt | 39 +++++++++++++++++++ examples/boundary.cpp | 6 +++ .../performance}/perf_collate.cpp | 0 .../performance}/perf_convert.cpp | 0 .../performance}/perf_format.cpp | 0 examples/wboundary.cpp | 8 +++- 7 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 examples/CMakeLists.txt rename {performance => examples/performance}/perf_collate.cpp (100%) rename {performance => examples/performance}/perf_convert.cpp (100%) rename {performance => examples/performance}/perf_format.cpp (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3904c01a..ebeb5e52 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -210,5 +210,6 @@ message(STATUS "Boost.Locale: " if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt") add_subdirectory(test) + add_subdirectory(examples) endif() diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt new file mode 100644 index 00000000..4d9bfc12 --- /dev/null +++ b/examples/CMakeLists.txt @@ -0,0 +1,39 @@ +function(boost_locale_add_example name) + cmake_parse_arguments(PARSE_ARGV 1 ARG "COMPILE_ONLY" "SRC;WORKING_DIRECTORY" "ARGS") + + if(NOT ARG_SRC) + set(ARG_SRC ${name}.cpp) + endif() + set(name ${PROJECT_NAME}-expl_${name}) + + add_executable(${name} ${ARG_SRC}) + add_dependencies(tests ${name}) + target_link_libraries(${name} PRIVATE + Boost::locale + Boost::algorithm + ) + + if(ARG_WORKING_DIRECTORY) + set_target_properties(${name} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${ARG_WORKING_DIRECTORY}") + endif() + + if(NOT ARG_COMPILE_ONLY) + add_test(NAME ${name} COMMAND ${name} ${ARG_ARGS}) + if(ARG_WORKING_DIRECTORY) + set_tests_properties(${name} PROPERTIES WORKING_DIRECTORY "${ARG_WORKING_DIRECTORY}") + endif() + endif() +endfunction() + +boost_locale_add_example(boundary) +boost_locale_add_example(calendar) +boost_locale_add_example(collate) +boost_locale_add_example(conversions) +boost_locale_add_example(hello) +boost_locale_add_example(wboundary) +boost_locale_add_example(wconversions) +boost_locale_add_example(whello) + +boost_locale_add_example(perf_collate SRC performance/perf_collate.cpp COMPILE_ONLY) +boost_locale_add_example(perf_convert SRC performance/perf_convert.cpp COMPILE_ONLY) +boost_locale_add_example(perf_format SRC performance/perf_format.cpp COMPILE_ONLY) diff --git a/examples/boundary.cpp b/examples/boundary.cpp index 7c643f93..742ee7bd 100644 --- a/examples/boundary.cpp +++ b/examples/boundary.cpp @@ -18,6 +18,12 @@ int main() generator gen; // Make system default locale global std::locale loc = gen(""); + // We need the boundary facet, currently only available via ICU + if(!std::has_facet>(loc)) + { + cout << "boundary detection not implemented in this environment" << endl; + return 0; + } locale::global(loc); cout.imbue(loc); diff --git a/performance/perf_collate.cpp b/examples/performance/perf_collate.cpp similarity index 100% rename from performance/perf_collate.cpp rename to examples/performance/perf_collate.cpp diff --git a/performance/perf_convert.cpp b/examples/performance/perf_convert.cpp similarity index 100% rename from performance/perf_convert.cpp rename to examples/performance/perf_convert.cpp diff --git a/performance/perf_format.cpp b/examples/performance/perf_format.cpp similarity index 100% rename from performance/perf_format.cpp rename to examples/performance/perf_format.cpp diff --git a/examples/wboundary.cpp b/examples/wboundary.cpp index a14325fa..bbe89649 100644 --- a/examples/wboundary.cpp +++ b/examples/wboundary.cpp @@ -43,7 +43,13 @@ int main() // Create system default locale generator gen; locale loc=gen(""); - locale::global(loc); + // We need the boundary facet, currently only available via ICU + if(!std::has_facet>(loc)) + { + cout << "boundary detection not implemented in this environment" << endl; + return 0; + } + locale::global(loc); wcout.imbue(loc); // This is needed to prevent C library to From 7ff789522d0f1d0b5b687835fcddaf3aa613d37f Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Sun, 17 Apr 2022 11:44:53 +0200 Subject: [PATCH 38/90] Suppress remaining CRT "secure" warnings Add _CRT_SECURE_NO_WARNINGS to test files and build rules --- CMakeLists.txt | 3 +-- build/Jamfile.v2 | 1 + test/test_config.cpp | 5 ++++- test/test_formatting.cpp | 3 --- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ebeb5e52..b84c8403 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,8 +53,7 @@ target_link_libraries(boost_locale target_compile_definitions(boost_locale PUBLIC BOOST_LOCALE_NO_LIB - # Source files already define BOOST_LOCALE_SOURCE - # PRIVATE BOOST_LOCALE_SOURCE + PRIVATE _CRT_SECURE_NO_WARNINGS ) if(BUILD_SHARED_LIBS) diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index ee93ea76..1fbdc417 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -425,6 +425,7 @@ boost-lib locale # Don't link explicitly, not required BOOST_THREAD_NO_LIB=1 multi + windows:_CRT_SECURE_NO_WARNINGS # Meanwhile remove this @configure ; diff --git a/test/test_config.cpp b/test/test_config.cpp index fa2c9018..54f796b7 100644 --- a/test/test_config.cpp +++ b/test/test_config.cpp @@ -6,6 +6,10 @@ // http://www.boost.org/LICENSE_1_0.txt) // +#ifdef _MSC_VER +#define _CRT_SECURE_NO_WARNINGS +#endif + #include #include #include @@ -21,7 +25,6 @@ #include "test_locale_tools.hpp" - char const *env(char const *s) { char const *r=getenv(s); diff --git a/test/test_formatting.cpp b/test/test_formatting.cpp index ca55fc5e..4a61d6be 100644 --- a/test/test_formatting.cpp +++ b/test/test_formatting.cpp @@ -34,9 +34,6 @@ int main() using namespace boost::locale; //#define TEST_DEBUG -#ifdef BOOST_MSVC -#define _CRT_SECURE_NO_WARNINGS -#endif #ifdef TEST_DEBUG #undef BOOST_LOCALE_ENABLE_CHAR16_T From e314b719fdffa574af9dd3ba0e688434ced73388 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Mon, 18 Apr 2022 10:17:17 +0200 Subject: [PATCH 39/90] Suppress unused-return-value warnings in ids.cpp Refator the facet initialization code to make clear what it does and use boost::ignore_unused to suppress the unused return value warning from std::has_facet --- src/shared/ids.cpp | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/src/shared/ids.cpp b/src/shared/ids.cpp index 61a3ce76..d1ccf2f5 100644 --- a/src/shared/ids.cpp +++ b/src/shared/ids.cpp @@ -13,6 +13,8 @@ #include #include +#include + namespace boost { namespace locale { @@ -65,31 +67,38 @@ namespace boost { } namespace { - struct install_all { - install_all() + // Initialize each facet once to avoid issues where doing so + // in a multithreaded environment could cause problems (races) + struct init_all { + init_all() { - std::locale l = std::locale::classic(); - install_by(); - install_by(); + const std::locale& l = std::locale::classic(); + init_by(l); + init_by(l); #ifdef BOOST_LOCALE_ENABLE_CHAR16_T - install_by(); + init_by(l); #endif #ifdef BOOST_LOCALE_ENABLE_CHAR32_T - install_by(); + init_by(l); #endif - std::has_facet(l); - std::has_facet(l); + init_facet(l); + init_facet(l); } template - void install_by() + void init_by(const std::locale& l) + { + init_facet >(l); + init_facet >(l); + init_facet >(l); + } + template + void init_facet(const std::locale& l) { - std::locale l = std::locale::classic(); - std::has_facet >(l); - std::has_facet >(l); - std::has_facet >(l); + // Use the facet to initialize e.g. their std::locale::id + ignore_unused(std::has_facet(l)); } - } installer; + } facet_initializer; } } From 6a6a7d2252b77027e8a365c5adb822573f5e9fe6 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Mon, 18 Apr 2022 10:39:43 +0200 Subject: [PATCH 40/90] Remove unused typedef in test_winapi_formatting.cpp --- test/test_winapi_formatting.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/test/test_winapi_formatting.cpp b/test/test_winapi_formatting.cpp index 93ddc8b1..fd635744 100644 --- a/test/test_winapi_formatting.cpp +++ b/test/test_winapi_formatting.cpp @@ -91,7 +91,6 @@ template void test_by_char(std::locale const &l,std::string name,int lcid) { typedef std::basic_stringstream ss_type; - typedef std::basic_string string_type; using namespace boost::locale; From cef798e9f4c51cc634a27cd7e929ec005c642ee1 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Mon, 18 Apr 2022 11:10:28 +0200 Subject: [PATCH 41/90] Avoid hidden virtual method warning in wconv_codepage.ipp Make wconv_from_utf contain a wconv_between instead of inheriting from it which is also semantically cleaner. Also use BOOST_OVERRIDE to mark overridden virtual functions to avoid accidental overloads. --- src/encoding/wconv_codepage.ipp | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/encoding/wconv_codepage.ipp b/src/encoding/wconv_codepage.ipp index d15e2352..18f0fd52 100644 --- a/src/encoding/wconv_codepage.ipp +++ b/src/encoding/wconv_codepage.ipp @@ -257,7 +257,7 @@ namespace impl { from_code_page_ ( -1) { } - bool open(char const *to_charset,char const *from_charset,method_type how) + bool open(char const *to_charset,char const *from_charset,method_type how) BOOST_OVERRIDE { how_ = how; to_code_page_ = encoding_to_windows_codepage(to_charset); @@ -310,40 +310,44 @@ namespace impl { int from_code_page_; }; - template + template class wconv_to_utf; - template + template class wconv_from_utf; template<> - class wconv_to_utf : public converter_to_utf , public wconv_between { + class wconv_to_utf : public converter_to_utf { public: bool open(char const *cs,method_type how) BOOST_OVERRIDE { - return wconv_between::open("UTF-8",cs,how); + return cvt.open("UTF-8",cs,how); } std::string convert(char const *begin,char const *end) BOOST_OVERRIDE { - return wconv_between::convert(begin,end); + return cvt.convert(begin,end); } + private: + wconv_between cvt; }; template<> - class wconv_from_utf : public converter_from_utf , public wconv_between { + class wconv_from_utf : public converter_from_utf { public: bool open(char const *cs,method_type how) BOOST_OVERRIDE { - return wconv_between::open(cs,"UTF-8",how); + return cvt.open(cs,"UTF-8",how); } std::string convert(char const *begin,char const *end) BOOST_OVERRIDE { - return wconv_between::convert(begin,end); + return cvt.convert(begin,end); } + private: + wconv_between cvt; }; template - class wconv_to_utf : public converter_to_utf { + class wconv_to_utf : public converter_to_utf { public: typedef CharType char_type; @@ -381,7 +385,7 @@ namespace impl { }; template - class wconv_from_utf : public converter_from_utf { + class wconv_from_utf : public converter_from_utf { public: typedef CharType char_type; From 34d85ff98e5c4939e8ae828bf6351f57cf3d05eb Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Sun, 29 May 2022 14:34:54 +0200 Subject: [PATCH 42/90] Avoid potential int overflows Those could lead to truncation or buffer overflow. Hence handle those by erroring or throwing. --- include/boost/locale/generic_codecvt.hpp | 4 ++-- src/encoding/wconv_codepage.ipp | 24 ++++++++++++++++-------- src/shared/mo_lambda.cpp | 2 +- src/win32/api.hpp | 21 ++++++++++++++++----- test/test_codecvt.cpp | 8 ++++---- test/test_message.cpp | 2 +- 6 files changed, 40 insertions(+), 21 deletions(-) diff --git a/include/boost/locale/generic_codecvt.hpp b/include/boost/locale/generic_codecvt.hpp index 87e0509e..d22abdb7 100644 --- a/include/boost/locale/generic_codecvt.hpp +++ b/include/boost/locale/generic_codecvt.hpp @@ -229,9 +229,9 @@ class generic_codecvt : public std::codecvt(from - save_from); #else - return save_max - max; + return static_cast(save_max - max); #endif } diff --git a/src/encoding/wconv_codepage.ipp b/src/encoding/wconv_codepage.ipp index 18f0fd52..67de92b1 100644 --- a/src/encoding/wconv_codepage.ipp +++ b/src/encoding/wconv_codepage.ipp @@ -11,7 +11,9 @@ #include #include +#include #include +#include #include #include #ifndef NOMINMAX @@ -124,7 +126,10 @@ namespace impl { { if(begin==end) return; - int n = MultiByteToWideChar(codepage,MB_ERR_INVALID_CHARS,begin,end-begin,0,0); + const std::ptrdiff_t num_chars = end-begin; + if(num_chars > std::numeric_limits::max()) + throw conversion_error(); + int n = MultiByteToWideChar(codepage,MB_ERR_INVALID_CHARS,begin,static_cast(num_chars),0,0); if(n == 0) { if(do_skip) { multibyte_to_wide_one_by_one(codepage,begin,end,buf); @@ -133,8 +138,8 @@ namespace impl { throw conversion_error(); } - buf.resize(n,0); - if(MultiByteToWideChar(codepage,MB_ERR_INVALID_CHARS,begin,end-begin,&buf.front(),buf.size())==0) + buf.resize(n); + if(MultiByteToWideChar(codepage,MB_ERR_INVALID_CHARS,begin,static_cast(num_chars),&buf.front(),n)==0) throw conversion_error(); } @@ -147,10 +152,13 @@ namespace impl { char subst_char = 0; char *subst_char_ptr = codepage == 65001 || codepage == 65000 ? 0 : &subst_char; - int n = WideCharToMultiByte(codepage,0,begin,end-begin,0,0,subst_char_ptr,substitute_ptr); + const std::ptrdiff_t num_chars = end - begin; + if(num_chars > std::numeric_limits::max()) + throw conversion_error(); + int n = WideCharToMultiByte(codepage,0,begin,static_cast(num_chars),0,0,subst_char_ptr,substitute_ptr); buf.resize(n); - if(WideCharToMultiByte(codepage,0,begin,end-begin,&buf[0],n,subst_char_ptr,substitute_ptr)==0) + if(WideCharToMultiByte(codepage,0,begin,static_cast(num_chars),&buf[0],n,subst_char_ptr,substitute_ptr)==0) throw conversion_error(); if(substitute) { if(do_skip) @@ -212,7 +220,7 @@ namespace impl { } template - bool validate_utf16(CharType const *str,unsigned len) + bool validate_utf16(CharType const *str,size_t len) { CharType const *begin = str; CharType const *end = str+len; @@ -225,10 +233,10 @@ namespace impl { } template - void clean_invalid_utf16(CharType const *str,unsigned len,std::vector &out) + void clean_invalid_utf16(CharType const *str,size_t len,std::vector &out) { out.reserve(len); - for(unsigned i=0;i(str[i]); if(0xD800 <= c && c<= 0xDBFF) { diff --git a/src/shared/mo_lambda.cpp b/src/shared/mo_lambda.cpp index 398f24ce..11f7d9fb 100644 --- a/src/shared/mo_lambda.cpp +++ b/src/shared/mo_lambda.cpp @@ -247,7 +247,7 @@ namespace { // anon } private: char const *text; - int pos; + size_t pos; int next_tocken; int int_value; bool is_blank(char c) diff --git a/src/win32/api.hpp b/src/win32/api.hpp index a41fbde5..e4210aae 100644 --- a/src/win32/api.hpp +++ b/src/win32/api.hpp @@ -14,6 +14,7 @@ #include #include #include +#include #include "lcid.hpp" @@ -146,11 +147,15 @@ namespace impl_win { inline std::wstring win_map_string_l(unsigned flags,wchar_t const *begin,wchar_t const *end,winlocale const &l) { std::wstring res; - int len = LCMapStringW(l.lcid,flags,begin,end-begin,0,0); + if(end - begin > std::numeric_limits::max()) + throw std::length_error("String to long for int type"); + int len = LCMapStringW(l.lcid,flags,begin, static_cast(end-begin),0,0); if(len == 0) return res; + if(len == std::numeric_limits::max()) + throw std::length_error("String to long for int type"); std::vector buf(len+1); - int l2 = LCMapStringW(l.lcid,flags,begin,end-begin,&buf.front(),buf.size()); + int l2 = LCMapStringW(l.lcid,flags,begin,static_cast(end-begin),&buf.front(),static_cast(buf.size())); res.assign(&buf.front(),l2); return res; } @@ -167,7 +172,9 @@ namespace impl_win { wchar_t const *rb,wchar_t const *re, winlocale const &l) { - return CompareStringW(l.lcid,collation_level_to_flag(level),lb,le-lb,rb,re-rb) - 2; + if(le - lb > std::numeric_limits::max() || re - rb > std::numeric_limits::max()) + throw std::length_error("String to long for int type"); + return CompareStringW(l.lcid,collation_level_to_flag(level),lb,static_cast(le-lb),rb,static_cast(re-rb)) - 2; } @@ -242,11 +249,15 @@ namespace impl_win { flags = MAP_PRECOMPOSED; } - int len = FoldStringW(flags,begin,end-begin,0,0); + if(end - begin > std::numeric_limits::max()) + throw std::length_error("String to long for int type"); + int len = FoldStringW(flags,begin,static_cast(end-begin),0,0); if(len == 0) return std::wstring(); + if(len == std::numeric_limits::max()) + throw std::length_error("String to long for int type"); std::vector v(len+1); - len = FoldStringW(flags,begin,end-begin,&v.front(),len+1); + len = FoldStringW(flags,begin,static_cast(end-begin),&v.front(),len+1); return std::wstring(&v.front(),len); } diff --git a/test/test_codecvt.cpp b/test/test_codecvt.cpp index c3f444fb..cddc72e5 100644 --- a/test/test_codecvt.cpp +++ b/test/test_codecvt.cpp @@ -35,8 +35,8 @@ typedef std::codecvt cvt_type; void test_codecvt_in_n_m(cvt_type const &cvt,int n,int m) { wchar_t const *wptr = wide_name; - int wlen = wcslen(wide_name); - int u8len = strlen(utf8_name); + const size_t wlen = wcslen(wide_name); + const size_t u8len = strlen(utf8_name); char const *from = utf8_name; char const *end = from; char const *real_end = utf8_name + u8len; @@ -94,8 +94,8 @@ void test_codecvt_in_n_m(cvt_type const &cvt,int n,int m) void test_codecvt_out_n_m(cvt_type const &cvt,int n,int m) { char const *nptr = utf8_name; - int wlen = wcslen(wide_name); - int u8len = strlen(utf8_name); + const size_t wlen = wcslen(wide_name); + const size_t u8len = strlen(utf8_name); std::mbstate_t mb=std::mbstate_t(); diff --git a/test/test_message.cpp b/test/test_message.cpp index 6728a24d..6e4bd8b2 100644 --- a/test/test_message.cpp +++ b/test/test_message.cpp @@ -356,7 +356,7 @@ int main(int argc,char **argv) try { l = g(locales[i]); } - catch(boost::locale::conv::invalid_charset_error const &e) { + catch(boost::locale::conv::invalid_charset_error const &) { std::cout << "Looks like ISO-8859-8 is not supported! skipping" << std::endl; iso_8859_8_not_supported = true; continue; From 16db1683871d2f14cc7f63712dc12e18e5aada86 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Sun, 29 May 2022 22:10:48 +0200 Subject: [PATCH 43/90] Minor reformat of test Jamfile --- test/Jamfile.v2 | 74 ++++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 38 deletions(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index afe24110..a622c794 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -6,48 +6,46 @@ # http://www.boost.org/LICENSE_1_0.txt. -project - : requirements - /boost/locale//boost_locale - # Make sure we get all defines we need - # Otherwise we would have problem knowing - # what backends are actually in use - ../build//build_flags +project : requirements + /boost/locale//boost_locale + # Make sure we get all defines we need + # Otherwise we would have problem knowing + # what backends are actually in use + ../build//build_flags ; # Shared boost.locale tests -test-suite "boost_locale_test" - : - # Configuration Information - [ run test_config.cpp : : : always_show_run_output ] - # Shared - [ run test_utf.cpp ] - [ run test_date_time.cpp ] - [ run test_ios_prop.cpp ] - [ run test_codecvt.cpp ] - [ run test_codepage_converter.cpp ] - [ run test_codepage.cpp ] - [ run test_message.cpp : $(BOOST_ROOT)/libs/locale/test ] - [ run test_generator.cpp ] - # icu - [ run test_collate.cpp ] - [ run test_convert.cpp ] - [ run test_boundary.cpp ] - [ run test_formatting.cpp : : : off ] - [ run test_icu_vs_os_timezone.cpp ] - # winapi - [ run test_winapi_collate.cpp ] - [ run test_winapi_convert.cpp ] - [ run test_winapi_formatting.cpp ] - # posix - [ run test_posix_collate.cpp ] - [ run test_posix_convert.cpp ] - [ run test_posix_formatting.cpp ] - # std - [ run test_std_collate.cpp ] - [ run test_std_convert.cpp ] - [ run test_std_formatting.cpp ] +test-suite "boost_locale_test" : + # Configuration Information + [ run test_config.cpp : : : always_show_run_output ] + # Shared + [ run test_utf.cpp ] + [ run test_date_time.cpp ] + [ run test_ios_prop.cpp ] + [ run test_codecvt.cpp ] + [ run test_codepage_converter.cpp ] + [ run test_codepage.cpp ] + [ run test_message.cpp : $(BOOST_ROOT)/libs/locale/test ] + [ run test_generator.cpp ] + # icu + [ run test_collate.cpp ] + [ run test_convert.cpp ] + [ run test_boundary.cpp ] + [ run test_formatting.cpp : : : off ] + [ run test_icu_vs_os_timezone.cpp ] + # winapi + [ run test_winapi_collate.cpp ] + [ run test_winapi_convert.cpp ] + [ run test_winapi_formatting.cpp ] + # posix + [ run test_posix_collate.cpp ] + [ run test_posix_convert.cpp ] + [ run test_posix_formatting.cpp ] + # std + [ run test_std_collate.cpp ] + [ run test_std_convert.cpp ] + [ run test_std_formatting.cpp ] ; # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 From 40c5c1bda797302fdfd171d3ce4b47b25b3f56f5 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Sun, 29 May 2022 22:11:07 +0200 Subject: [PATCH 44/90] Avoid some more warnings --- src/icu/codecvt.cpp | 4 ++-- src/icu/collator.cpp | 4 ++-- src/icu/date_time.cpp | 6 +++--- src/icu/icu_backend.cpp | 4 ++-- src/shared/message.cpp | 14 +++++++------- test/test_codepage_converter.cpp | 4 ++-- test/test_std_collate.cpp | 11 ++++++----- test/test_std_convert.cpp | 12 +++++------- 8 files changed, 29 insertions(+), 30 deletions(-) diff --git a/src/icu/codecvt.cpp b/src/icu/codecvt.cpp index 951dfcf1..86ed3f85 100644 --- a/src/icu/codecvt.cpp +++ b/src/icu/codecvt.cpp @@ -63,7 +63,7 @@ namespace impl_icu { return new uconv_converter(encoding_); } - uint32_t to_unicode(char const *&begin,char const *end) + uint32_t to_unicode(char const *&begin,char const *end) BOOST_OVERRIDE { UErrorCode err=U_ZERO_ERROR; char const *tmp = begin; @@ -80,7 +80,7 @@ namespace impl_icu { return c; } - uint32_t from_unicode(uint32_t u,char *begin,char const *end) + uint32_t from_unicode(uint32_t u,char *begin,char const *end) BOOST_OVERRIDE { UChar code_point[2]={0}; int len; diff --git a/src/icu/collator.cpp b/src/icu/collator.cpp index 82f2cc93..fc65b11e 100644 --- a/src/icu/collator.cpp +++ b/src/icu/collator.cpp @@ -102,13 +102,13 @@ namespace boost { tmp.resize(len); return tmp; } - std::basic_string do_transform(level_type level,CharType const *b,CharType const *e) const + std::basic_string do_transform(level_type level,CharType const *b,CharType const *e) const BOOST_OVERRIDE { std::vector tmp = do_basic_transform(level,b,e); return std::basic_string(tmp.begin(),tmp.end()); } - long do_hash(level_type level,CharType const *b,CharType const *e) const + long do_hash(level_type level,CharType const *b,CharType const *e) const BOOST_OVERRIDE { std::vector tmp = do_basic_transform(level,b,e); tmp.push_back(0); diff --git a/src/icu/date_time.cpp b/src/icu/date_time.cpp index 2840a2ed..1ea8e06b 100644 --- a/src/icu/date_time.cpp +++ b/src/icu/date_time.cpp @@ -82,17 +82,17 @@ namespace impl_icu { encoding_ = other.encoding_; } - calendar_impl *clone() const + calendar_impl *clone() const BOOST_OVERRIDE { return new calendar_impl(*this); } - void set_value(period::marks::period_mark p,int value) + void set_value(period::marks::period_mark p,int value) BOOST_OVERRIDE { calendar_->set(to_icu(p),int32_t(value)); } - int get_value(period::marks::period_mark p,value_type type) const + int get_value(period::marks::period_mark p,value_type type) const BOOST_OVERRIDE { UErrorCode err=U_ZERO_ERROR; int v=0; diff --git a/src/icu/icu_backend.cpp b/src/icu/icu_backend.cpp index a54e3c0a..51da4e7b 100644 --- a/src/icu/icu_backend.cpp +++ b/src/icu/icu_backend.cpp @@ -42,7 +42,7 @@ namespace impl_icu { return new icu_localization_backend(*this); } - void set_option(std::string const &name,std::string const &value) + void set_option(std::string const &name,std::string const &value) BOOST_OVERRIDE { invalid_ = true; if(name=="locale") @@ -55,7 +55,7 @@ namespace impl_icu { use_ansi_encoding_ = value == "true"; } - void clear_options() + void clear_options() BOOST_OVERRIDE { invalid_ = true; use_ansi_encoding_ = false; diff --git a/src/shared/message.cpp b/src/shared/message.cpp index 000f4a51..4b3fb9bb 100644 --- a/src/shared/message.cpp +++ b/src/shared/message.cpp @@ -567,17 +567,17 @@ namespace boost { plural_forms_.resize(domains.size()); - for(unsigned id=0;id(l,"a","b",-1); - test_one(l,"a","a",0); + test_one(l, "a", "b", -1); + test_one(l, "a", "a", 0); + } std::string name; diff --git a/test/test_std_convert.cpp b/test/test_std_convert.cpp index 6259e554..6aad6bc8 100644 --- a/test/test_std_convert.cpp +++ b/test/test_std_convert.cpp @@ -14,8 +14,6 @@ int main() } #else - - #include #include #include @@ -38,11 +36,11 @@ void test_char() { boost::locale::generator gen; - std::cout << "- Testing at least C" << std::endl; - - std::locale l = gen("en_US.UTF-8"); - - test_one(l,"Hello World i","hello world i","HELLO WORLD I"); + { + std::cout << "- Testing at least C" << std::endl; + std::locale l = gen("en_US.UTF-8"); + test_one(l,"Hello World i","hello world i","HELLO WORLD I"); + } std::string name; From 5e9164b32c11251cb894b4ab0bfb2cf2521a88eb Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Mon, 30 May 2022 10:47:54 +0200 Subject: [PATCH 45/90] Add missing fallthroughs --- src/util/gregorian.cpp | 4 ++-- test/test_locale.hpp | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/util/gregorian.cpp b/src/util/gregorian.cpp index e296f95a..6b29763d 100644 --- a/src/util/gregorian.cpp +++ b/src/util/gregorian.cpp @@ -204,7 +204,7 @@ namespace util { value += (-value / 7) * 7 + 7; // convert to local DOW value = (value - 1 - first_day_of_week_ + 14) % 7 + 1; - // fall throght + BOOST_FALLTHROUGH; case day_of_week_local: ///< Local day of week, for example in France Monday is 1, in US Sunday is 1, [1..7] normalize(); tm_updated_.tm_mday += (value - 1) - (tm_updated_.tm_wday - first_day_of_week_ + 7) % 7; @@ -724,7 +724,7 @@ namespace util { case week_of_month: case week_of_year: factor = 7; - // fall + BOOST_FALLTHROUGH; case day: case day_of_year: case day_of_week: diff --git a/test/test_locale.hpp b/test/test_locale.hpp index f3b18245..d813573a 100644 --- a/test/test_locale.hpp +++ b/test/test_locale.hpp @@ -8,6 +8,7 @@ #ifndef BOOST_LOCALE_TEST_H #define BOOST_LOCALE_TEST_H +#include #include #include #include @@ -76,13 +77,15 @@ inline unsigned utf8_next(std::string const &s,unsigned &pos) else l = 3; - c&=(1<<(6-l))-1; + c &= (1 << (6-l)) - 1; switch(l) { case 3: c = (c << 6) | (((unsigned char)s[pos++]) & 0x3F); + BOOST_FALLTHROUGH; case 2: c = (c << 6) | (((unsigned char)s[pos++]) & 0x3F); + BOOST_FALLTHROUGH; case 1: c = (c << 6) | (((unsigned char)s[pos++]) & 0x3F); } From cece0fb018fd7d74b14d15206d8d5dc2e0ae47a8 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Mon, 30 May 2022 12:18:14 +0200 Subject: [PATCH 46/90] Enable warnings-as-error in test Ensures a warning-free build --- CMakeLists.txt | 15 +++++++++++++++ build/Jamfile.v2 | 2 ++ test/CMakeLists.txt | 1 + test/Jamfile.v2 | 8 +++++++- 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b84c8403..a5f6ce6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -204,6 +204,21 @@ message(STATUS "Boost.Locale: " "winapi ${BOOST_LOCALE_ENABLE_WINAPI}" ) +if(MSVC) + set(BOOST_LOCALE_WARNING_OPTIONS /W4) + if(BOOST_LOCALE_WERROR) + list(APPEND BOOST_LOCALE_WARNING_OPTIONS /WX) + endif() +elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + set(BOOST_LOCALE_WARNING_OPTIONS -Wall -Wextra -Wno-error=deprecated-declarations) + if(BOOST_LOCALE_WERROR) + list(APPEND BOOST_LOCALE_WARNING_OPTIONS -Werror) + endif() +elseif(NOT DEFINED BOOST_LOCALE_WARNING_OPTIONS) + set(BOOST_LOCALE_WARNING_OPTIONS "") +endif() +target_compile_options(boost_locale PRIVATE ${BOOST_LOCALE_WARNING_OPTIONS}) + # Testing if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt") diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 1fbdc417..47b5c336 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -426,6 +426,8 @@ boost-lib locale BOOST_THREAD_NO_LIB=1 multi windows:_CRT_SECURE_NO_WARNINGS + gcc:"-Wno-long-long -Wno-deprecated-declarations" + clang:"-Wno-long-long -Wno-deprecated-declarations" # Meanwhile remove this @configure ; diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 6d4fec13..a16ed84b 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -36,6 +36,7 @@ function(boost_locale_add_test name) add_dependencies(tests ${name}) target_link_libraries(${name} PRIVATE Boost::locale) target_compile_definitions(${name} PRIVATE ${boost_locale_defines}) + target_compile_options(${name} PRIVATE ${BOOST_LOCALE_WARNING_OPTIONS}) if(ARG_WORKING_DIRECTORY) set_target_properties(${name} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${ARG_WORKING_DIRECTORY}") diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index a622c794..70fe442d 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -8,11 +8,17 @@ project : requirements /boost/locale//boost_locale + extra + msvc:on + gcc:"-Wno-long-long -Wno-error=deprecated-declarations" + gcc-11:on + clang:"-Wno-long-long -Wno-error=deprecated-declarations" + clang-5:on # Make sure we get all defines we need # Otherwise we would have problem knowing # what backends are actually in use ../build//build_flags - ; + ; # Shared boost.locale tests From 039f016c8c167f5f30db7907e771bbcfed5028e5 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Mon, 30 May 2022 12:18:58 +0200 Subject: [PATCH 47/90] Handle constant-expression and implicit-cast warnings Use explicit casts to narrow types and suppress the constant-expression warnings on MSVC via a new macro --- include/boost/locale/config.hpp | 9 +++++++ include/boost/locale/generic_codecvt.hpp | 24 +++++++------------ src/shared/message.cpp | 16 ++++++++----- src/std/collate.cpp | 2 ++ src/util/gregorian.cpp | 2 ++ src/win32/api.hpp | 18 +++++++------- src/win32/collate.cpp | 2 ++ src/win32/lcid.cpp | 4 ++-- src/win32/numeric.cpp | 5 +++- test/test_codepage_converter.cpp | 27 --------------------- test/test_ios_prop.cpp | 1 - test/test_locale.hpp | 2 ++ test/test_locale_tools.hpp | 26 +++++++++++++++++++- test/test_message.cpp | 2 +- test/test_utf.cpp | 30 ++---------------------- test/test_winapi_formatting.cpp | 2 ++ 16 files changed, 81 insertions(+), 91 deletions(-) diff --git a/include/boost/locale/config.hpp b/include/boost/locale/config.hpp index cbed359e..c01ef07d 100644 --- a/include/boost/locale/config.hpp +++ b/include/boost/locale/config.hpp @@ -47,6 +47,15 @@ #define BOOST_LOCALE_USE_AUTO_PTR 1 #endif +#ifdef BOOST_MSVC +// Denote a constant condition, e.g. for if(sizeof(... +#define BOOST_LOCALE_START_CONST_CONDITION __pragma(warning(push)) __pragma(warning(disable : 4127)) +#define BOOST_LOCALE_END_CONST_CONDITION __pragma(warning(pop)) +#else +#define BOOST_LOCALE_START_CONST_CONDITION +#define BOOST_LOCALE_END_CONST_CONDITION +#endif + #endif // boost/locale/config.hpp // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/include/boost/locale/generic_codecvt.hpp b/include/boost/locale/generic_codecvt.hpp index d22abdb7..e80e1e09 100644 --- a/include/boost/locale/generic_codecvt.hpp +++ b/include/boost/locale/generic_codecvt.hpp @@ -208,8 +208,7 @@ class generic_codecvt : public std::codecvt(&std_state); #endif - typedef typename CodecvtImpl::state_type state_type; - state_type cvt_state = implementation().initial_state(generic_codecvt_base::to_unicode_state); + typename CodecvtImpl::state_type cvt_state = implementation().initial_state(generic_codecvt_base::to_unicode_state); while(max > 0 && from < from_end){ char const *prev_from = from; boost::uint32_t ch=implementation().to_unicode(cvt_state,from,from_end); @@ -253,8 +252,7 @@ class generic_codecvt : public std::codecvt0xFFFF observed, of 1 a code above 0xFFFF observerd // and first pair is written, but no input consumed boost::uint16_t &state = *reinterpret_cast(&std_state); - typedef typename CodecvtImpl::state_type state_type; - state_type cvt_state = implementation().initial_state(generic_codecvt_base::to_unicode_state); + typename CodecvtImpl::state_type cvt_state = implementation().initial_state(generic_codecvt_base::to_unicode_state); while(to < to_end && from < from_end) { #ifdef DEBUG_CODECVT @@ -278,7 +276,7 @@ class generic_codecvt : public std::codecvt(ch); } else { // for other codepoints we do following @@ -291,10 +289,8 @@ class generic_codecvt : public std::codecvt> 10; - boost::uint16_t vl = ch & 0x3FF; - boost::uint16_t w1 = vh + 0xD800; - boost::uint16_t w2 = vl + 0xDC00; + boost::uint16_t w1 = static_cast(0xD800 | (ch >> 10)); + boost::uint16_t w2 = static_cast(0xDC00 | (ch & 0x3FF)); if(state == 0) { from = from_saved; *to++ = w1; @@ -350,8 +346,7 @@ class generic_codecvt : public std::codecvt(&std_state); - typedef typename CodecvtImpl::state_type state_type; - state_type cvt_state = implementation().initial_state(generic_codecvt_base::from_unicode_state); + typename CodecvtImpl::state_type cvt_state = implementation().initial_state(generic_codecvt_base::from_unicode_state); while(to < to_end && from < from_end) { #ifdef DEBUG_CODECVT @@ -361,7 +356,7 @@ class generic_codecvt : public std::codecvt : public std::codecvt(ch); from++; continue; } @@ -501,8 +496,7 @@ class generic_codecvt : public std::codecvt 0 && from < from_end){ char const *save_from = from; boost::uint32_t ch=implementation().to_unicode(cvt_state,from,from_end); diff --git a/src/shared/message.cpp b/src/shared/message.cpp index 4b3fb9bb..b93b5335 100644 --- a/src/shared/message.cpp +++ b/src/shared/message.cpp @@ -499,9 +499,9 @@ namespace boost { typedef std::pair pair_type; - char_type const *get(int domain_id,char_type const *context,char_type const *id) const BOOST_OVERRIDE + char_type const *get(int domain_id,char_type const *context,char_type const *in_id) const BOOST_OVERRIDE { - return get_string(domain_id,context,id).first; + return get_string(domain_id,context,in_id).first; } char_type const *get(int domain_id,char_type const *context,char_type const *single_id,int n) const BOOST_OVERRIDE @@ -614,7 +614,7 @@ namespace boost { bool load_file( std::string const &file_name, std::string const &locale_encoding, std::string const &key_encoding, - int id, + int idx, messages_info::callback_type const &callback) { locale_encoding_ = locale_encoding; @@ -647,12 +647,12 @@ namespace boost { throw std::runtime_error("Invalid mo-format, encoding is not specified"); if(!plural.empty()) { - plural_forms_[id] = lambda::compile(plural.c_str());; + plural_forms_[idx] = lambda::compile(plural.c_str());; } if( mo_useable_directly(mo_encoding,*mo) ) { - mo_catalogs_[id]=mo; + mo_catalogs_[idx]=mo; } else { converter cvt_value(locale_encoding,mo_encoding); @@ -664,7 +664,7 @@ namespace boost { mo_file::pair_type tmp = mo->value(i); string_type value = cvt_value(tmp.first,tmp.second); - catalogs_[id][key].swap(value); + catalogs_[idx][key].swap(value); } } return true; @@ -679,8 +679,10 @@ namespace boost { bool mo_useable_directly( std::string const &mo_encoding, mo_file const &mo) { +BOOST_LOCALE_START_CONST_CONDITION if(sizeof(CharType) != 1) return false; +BOOST_LOCALE_END_CONST_CONDITION if(!mo.has_hash()) return false; if(compare_encodings(mo_encoding,locale_encoding_)!=0) @@ -716,7 +718,9 @@ namespace boost { pair_type null_pair((CharType const *)0,(CharType const *)0); if(domain_id < 0 || size_t(domain_id) >= catalogs_.size()) return null_pair; +BOOST_LOCALE_START_CONST_CONDITION if(mo_file_use_traits::in_use && mo_catalogs_[domain_id]) { +BOOST_LOCALE_END_CONST_CONDITION return mo_file_use_traits::use(*mo_catalogs_[domain_id],context,in_id); } else { diff --git a/src/std/collate.cpp b/src/std/collate.cpp index 6f9ecf8c..5f57dea5 100644 --- a/src/std/collate.cpp +++ b/src/std/collate.cpp @@ -42,6 +42,7 @@ class utf8_collator_from_wide : public std::collate { std::wstring wkey = std::use_facet(base_).transform(tmp.c_str(),tmp.c_str()+tmp.size()); std::string key; +BOOST_LOCALE_START_CONST_CONDITION if(sizeof(wchar_t)==2) key.reserve(wkey.size()*2); else @@ -60,6 +61,7 @@ class utf8_collator_from_wide : public std::collate { key += char(tv & 0xFF); } } +BOOST_LOCALE_END_CONST_CONDITION return key; } private: diff --git a/src/util/gregorian.cpp b/src/util/gregorian.cpp index 6b29763d..c3df4727 100644 --- a/src/util/gregorian.cpp +++ b/src/util/gregorian.cpp @@ -323,10 +323,12 @@ namespace util { case absolute_maximum: case least_maximum: case actual_maximum: +BOOST_LOCALE_START_CONST_CONDITION if(sizeof(std::time_t) == 4) return 2038; // Y2K38 - maximal with 32 bit time_t else return std::numeric_limits::max(); +BOOST_LOCALE_END_CONST_CONDITION case current: return tm_.tm_year + 1900; }; diff --git a/src/win32/api.hpp b/src/win32/api.hpp index e4210aae..b0204b04 100644 --- a/src/win32/api.hpp +++ b/src/win32/api.hpp @@ -284,13 +284,13 @@ namespace impl_win { inline std::wstring wcsftime_l(char c,std::tm const *tm,winlocale const &l) { SYSTEMTIME wtm=SYSTEMTIME(); - wtm.wYear = tm->tm_year + 1900; - wtm.wMonth = tm->tm_mon+1; - wtm.wDayOfWeek = tm->tm_wday; - wtm.wDay = tm->tm_mday; - wtm.wHour = tm->tm_hour; - wtm.wMinute = tm->tm_min; - wtm.wSecond = tm->tm_sec; + wtm.wYear = static_cast(tm->tm_year + 1900); + wtm.wMonth = static_cast(tm->tm_mon+1); + wtm.wDayOfWeek = static_cast(tm->tm_wday); + wtm.wDay = static_cast(tm->tm_mday); + wtm.wHour = static_cast(tm->tm_hour); + wtm.wMinute = static_cast(tm->tm_min); + wtm.wSecond = static_cast(tm->tm_sec); switch(c) { case 'a': // Abbr Weekday return wcs_format_date_l(L"ddd",&wtm,l); @@ -340,9 +340,9 @@ namespace impl_win { return wcs_format_time_l(L"HH:mm:ss",&wtm,l); /* case 'u': // weekday 1,7 1=Monday case 'U': // week number of year [00,53] Sunday first - case 'V': // week number of year [01,53] Moday first + case 'V': // week number of year [01,53] Monday first case 'w': // weekday 0,7 0=Sunday - case 'W': // week number of year [00,53] Moday first, */ + case 'W': // week number of year [00,53] Monday first, */ case 'x': // Date return wcs_format_date_l(0,&wtm,l); case 'X': // Time diff --git a/src/win32/collate.cpp b/src/win32/collate.cpp index 11ffd4ba..c2a3b23b 100644 --- a/src/win32/collate.cpp +++ b/src/win32/collate.cpp @@ -41,6 +41,7 @@ class utf8_collator : public collator { std::wstring tmp=conv::to_utf(b,e,"UTF-8"); std::wstring wkey = wcsxfrm_l(level,tmp.c_str(),tmp.c_str()+tmp.size(),lc_); std::string key; +BOOST_LOCALE_START_CONST_CONDITION if(sizeof(wchar_t)==2) key.reserve(wkey.size()*2); else @@ -59,6 +60,7 @@ class utf8_collator : public collator { key += char(tv & 0xFF); } } +BOOST_LOCALE_END_CONST_CONDITION return key; } private: diff --git a/src/win32/lcid.cpp b/src/win32/lcid.cpp index d761a22e..e326cdf4 100644 --- a/src/win32/lcid.cpp +++ b/src/win32/lcid.cpp @@ -36,8 +36,8 @@ boost::mutex &lcid_table_mutex() table_type &real_lcid_table() { - static table_type table; - return table; + static table_type real_table; + return real_table; } BOOL CALLBACK proc(char *s) diff --git a/src/win32/numeric.cpp b/src/win32/numeric.cpp index 30a12754..2b0a2aaf 100644 --- a/src/win32/numeric.cpp +++ b/src/win32/numeric.cpp @@ -75,7 +75,7 @@ class num_format : public util::base_num_format return out; } else { - std::wstring cur = wcsfmon_l(val,lc_); + std::wstring cur = wcsfmon_l(static_cast(val),lc_); return write_it(out,cur); } } @@ -121,8 +121,11 @@ class num_punct_win : public std::numpunct { std::numpunct(refs) { numeric_info np = wcsnumformat_l(lc) ; + +BOOST_LOCALE_START_CONST_CONDITION if(sizeof(CharType) == 1 && np.thousands_sep == L"\xA0") np.thousands_sep=L" "; +BOOST_LOCALE_END_CONST_CONDITION to_str(np.thousands_sep,thousands_sep_); to_str(np.decimal_point,decimal_point_); diff --git a/test/test_codepage_converter.cpp b/test/test_codepage_converter.cpp index 89cc0b2f..d9b63365 100644 --- a/test/test_codepage_converter.cpp +++ b/test/test_codepage_converter.cpp @@ -20,33 +20,6 @@ #include "test_locale.hpp" #include "test_locale_tools.hpp" -char *make2(unsigned v) -{ - static unsigned char buf[3] = {0}; - buf[0] = 0xC0 | (v >> 6); - buf[1] = 0x80 | (v & 0x3F ); - return reinterpret_cast(buf); -} - -char *make3(unsigned v) -{ - static unsigned char buf[4] = {0}; - buf[0] = 0xE0 | ((v >> 12) ) ; - buf[1] = 0x80 | ((v >> 6) & 0x3F ); - buf[2] = 0x80 | ((v >> 0) & 0x3F ); - return reinterpret_cast(buf); -} - -char *make4(unsigned v) -{ - static unsigned char buf[5] = {0}; - buf[0] = 0xF0 | ((v >> 18) ) ; - buf[1] = 0x80 | ((v >> 12) & 0x3F ); - buf[2] = 0x80 | ((v >> 6) & 0x3F ); - buf[3] = 0x80 | ((v >> 0) & 0x3F ); - return reinterpret_cast(buf); -} - static const unsigned illegal=0xFFFFFFFF; static const unsigned incomplete=0xFFFFFFFE; diff --git a/test/test_ios_prop.cpp b/test/test_ios_prop.cpp index e94f7991..6d610714 100644 --- a/test/test_ios_prop.cpp +++ b/test/test_ios_prop.cpp @@ -77,7 +77,6 @@ int main() return EXIT_FAILURE; } FINALIZE(); - return 0; } // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/test/test_locale.hpp b/test/test_locale.hpp index d813573a..fe9810d6 100644 --- a/test/test_locale.hpp +++ b/test/test_locale.hpp @@ -101,6 +101,7 @@ std::basic_string to(std::string const &utf8) unsigned point; unsigned prev=i; point = utf8_next(utf8,i); +BOOST_LOCALE_START_CONST_CONDITION if(sizeof(Char)==1 && point > 255) { std::ostringstream ss; ss << "Can't convert codepoint U" << std::hex << point <<"(" < to(std::string const &utf8) out+=static_cast(0xDC00 | (point & 0x3FF)); continue; } +BOOST_LOCALE_END_CONST_CONDITION out+=static_cast(point); } return out; diff --git a/test/test_locale_tools.hpp b/test/test_locale_tools.hpp index 694377ee..5fd49dca 100644 --- a/test/test_locale_tools.hpp +++ b/test/test_locale_tools.hpp @@ -91,7 +91,6 @@ std::string get_std_name(std::string const &name,std::string *real_name = 0) if(real_name) *real_name = "Hebrew_Israel.1255"; return utf8 ? name : "he_IL.windows-1255"; - return name; } } else if(name=="ru_RU.UTF-8") { @@ -120,7 +119,32 @@ std::string get_std_name(std::string const &name,std::string *real_name = 0) return ""; } +char* make2(unsigned v) +{ + static unsigned char buf[3] = {0}; + buf[0] = static_cast(0xC0 | (v >> 6)); + buf[1] = static_cast(0x80 | (v & 0x3F)); + return reinterpret_cast(buf); +} + +char* make3(unsigned v) +{ + static unsigned char buf[4] = {0}; + buf[0] = static_cast(0xE0 | ((v >> 12))); + buf[1] = static_cast(0x80 | ((v >> 6) & 0x3F)); + buf[2] = static_cast(0x80 | ((v >> 0) & 0x3F)); + return reinterpret_cast(buf); +} +char* make4(unsigned v) +{ + static unsigned char buf[5] = {0}; + buf[0] = static_cast(0xF0 | ((v >> 18))); + buf[1] = static_cast(0x80 | ((v >> 12) & 0x3F)); + buf[2] = static_cast(0x80 | ((v >> 6) & 0x3F)); + buf[3] = static_cast(0x80 | ((v >> 0) & 0x3F)); + return reinterpret_cast(buf); +} #endif // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/test/test_message.cpp b/test/test_message.cpp index 6e4bd8b2..65bc6c0a 100644 --- a/test/test_message.cpp +++ b/test/test_message.cpp @@ -30,7 +30,7 @@ struct file_loader { if(!f) return buffer; f.seekg(0,std::ifstream::end); - size_t len = f.tellg(); + size_t len = static_cast(f.tellg()); if(len == 0) return buffer; f.seekg(0); diff --git a/test/test_utf.cpp b/test/test_utf.cpp index e044d732..da1333ed 100644 --- a/test/test_utf.cpp +++ b/test/test_utf.cpp @@ -6,39 +6,13 @@ // http://www.boost.org/LICENSE_1_0.txt) // #include +#include #include #include "test_locale.hpp" #include "test_locale_tools.hpp" using namespace boost::locale::utf; -char *make2(unsigned v) -{ - static unsigned char buf[3] = {0}; - buf[0] = 0xC0 | (v >> 6); - buf[1] = 0x80 | (v & 0x3F ); - return reinterpret_cast(buf); -} - -char *make3(unsigned v) -{ - static unsigned char buf[4] = {0}; - buf[0] = 0xE0 | ((v >> 12) ) ; - buf[1] = 0x80 | ((v >> 6) & 0x3F ); - buf[2] = 0x80 | ((v >> 0) & 0x3F ); - return reinterpret_cast(buf); -} - -char *make4(unsigned v) -{ - static unsigned char buf[5] = {0}; - buf[0] = 0xF0 | ((v >> 18) ) ; - buf[1] = 0x80 | ((v >> 12) & 0x3F ); - buf[2] = 0x80 | ((v >> 6) & 0x3F ); - buf[3] = 0x80 | ((v >> 0) & 0x3F ); - return reinterpret_cast(buf); -} - boost::uint32_t const *u32_seq(boost::uint32_t a) { static boost::uint32_t buf[2]; @@ -75,7 +49,7 @@ void test_to(CharType const *s,unsigned codepoint) typedef utf_traits tr; - TEST(tr::max_width == 4 / sizeof(CharType)); + BOOST_STATIC_ASSERT(tr::max_width == 4 / sizeof(CharType)); TEST(tr::template decode(begin,end) == codepoint); diff --git a/test/test_winapi_formatting.cpp b/test/test_winapi_formatting.cpp index fd635744..92ef7c42 100644 --- a/test/test_winapi_formatting.cpp +++ b/test/test_winapi_formatting.cpp @@ -122,10 +122,12 @@ void test_by_char(std::locale const &l,std::string name,int lcid) TEST(n == 1045.45); if(name == "ru_RU.UTF-8") { +BOOST_LOCALE_START_CONST_CONDITION if(sizeof(CharType)==1) TEST(equal(ss.str(),"1 045,45")); // SP else TEST(equal(ss.str(),"1\xC2\xA0" "045,45")); // NBSP +BOOST_LOCALE_END_CONST_CONDITION } else TEST(equal(ss.str(),"1,045.45")); From 8eb87bce92f57a7cb570d8d59f488ad8d3a90ad2 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Mon, 30 May 2022 12:29:35 +0200 Subject: [PATCH 48/90] Add tests using char16_t/char32_t when available --- test/test_utf.cpp | 51 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/test/test_utf.cpp b/test/test_utf.cpp index da1333ed..fc737c57 100644 --- a/test/test_utf.cpp +++ b/test/test_utf.cpp @@ -38,6 +38,25 @@ boost::uint16_t const *u16_seq(boost::uint16_t a,boost::uint16_t b) return buf; } +#ifndef BOOST_NO_CXX11_CHAR16_T +char16_t const* c16_seq(boost::uint16_t a) +{ + static char16_t buf[2]; + buf[0] = static_cast(a); + buf[1] = 0; + return buf; +} +#endif +#ifndef BOOST_NO_CXX11_CHAR32_T +char32_t const* c32_seq(boost::uint32_t a) +{ + static char32_t buf[2]; + buf[0] = static_cast(a); + buf[1] = 0; + return buf; +} +#endif + template void test_to(CharType const *s,unsigned codepoint) { @@ -262,7 +281,37 @@ int main() test_to(u32_seq(0xffff),0xffff); test_to(u32_seq(0x10ffff),0x10ffff); - +#ifndef BOOST_NO_CXX11_CHAR16_T + std::cout << "-- Test char16_t" << std::endl; + test_to(u"\u0010", 0x10); + test_to(u"\uffff", 0xffff); + test_to(u"\U00010000", 0x10000); + test_to(u"\U0010FFFF", 0x10FFFF); + test_to(c16_seq(0xDFFF), illegal); + test_to(c16_seq(0xDC00), illegal); + + test_from(u"\u0010", 0x10); + test_from(u"\uffff", 0xffff); + test_from(u"\U00010000", 0x10000); + test_from(u"\U0010FFFF", 0x10FFFF); +#endif +#ifndef BOOST_NO_CXX11_CHAR32_T + std::cout << "-- Test char32_t" << std::endl; + test_to(U"\U00000010", 0x10); + test_to(U"\U0000ffff", 0xffff); + test_to(U"\U00010000", 0x10000); + test_to(U"\U0010ffff", 0x10ffff); + test_to(c32_seq(0xD800), illegal); + test_to(c32_seq(0xDBFF), illegal); + test_to(c32_seq(0xDFFF), illegal); + test_to(c32_seq(0xDC00), illegal); + test_to(c32_seq(0x110000), illegal); + + test_from(U"\U00000010", 0x10); + test_from(U"\U0000ffff", 0xffff); + test_from(U"\U00010000", 0x10000); + test_from(U"\U0010ffff", 0x10ffff); +#endif } catch(std::exception const &e) { From 18179a18503da9847a2de6eb355c47cf86a3e2f4 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Mon, 30 May 2022 12:59:28 +0200 Subject: [PATCH 49/90] Refactor test_utf Rename test_from/test_to to make C&P issue obvious and fix that. Introduce functions for the tests to better group the subtests --- test/test_utf.cpp | 415 ++++++++++++++++++++++------------------------ 1 file changed, 201 insertions(+), 214 deletions(-) diff --git a/test/test_utf.cpp b/test/test_utf.cpp index fc737c57..383cc68d 100644 --- a/test/test_utf.cpp +++ b/test/test_utf.cpp @@ -57,262 +57,249 @@ char32_t const* c32_seq(boost::uint32_t a) } #endif + +// Get end of C-String, i.e. the NULL byte template -void test_to(CharType const *s,unsigned codepoint) +CharType const* str_end(CharType const *s) { - CharType const *begin = s; - CharType const *end = begin; + while(*s) + s++; + return s; +} - while(*end) - end++; +template +void test_from_utf(CharType const * const s,unsigned codepoint) +{ + CharType const *cur = s; + CharType const * const end = str_end(s); typedef utf_traits tr; BOOST_STATIC_ASSERT(tr::max_width == 4 / sizeof(CharType)); - TEST(tr::template decode(begin,end) == codepoint); + TEST(tr::template decode(cur,end) == codepoint); - if(codepoint == incomplete || codepoint != illegal) - TEST(end == begin); + if(codepoint != illegal) + TEST(cur == end); if(codepoint == incomplete) { - TEST(*s== 0 || 0 < tr::trail_length(*s)); - TEST(tr::trail_length(*s) + 1 > end - s); + TEST(*s== 0 || tr::trail_length(*s) > 0); + TEST(tr::trail_length(*s) >= end - s); } if(codepoint != incomplete && codepoint != illegal) { - begin=s; - TEST(tr::is_lead(*begin)); - TEST(!tr::is_trail(*begin)); - begin++; - while(begin!=end) { - TEST(tr::is_trail(*begin)); - TEST(!tr::is_lead(*begin)); - begin++; + TEST(tr::is_lead(*s)); + TEST(!tr::is_trail(*s)); + cur = s; + while(++cur != end) { + TEST(tr::is_trail(*cur)); + TEST(!tr::is_lead(*cur)); } TEST(tr::width(codepoint)==end - s); TEST(tr::trail_length(*s) == tr::width(codepoint) - 1); - begin = s; - TEST(tr::decode_valid(begin) == codepoint); - TEST(begin == end); + cur = s; + TEST(tr::decode_valid(cur) == codepoint); + TEST(cur == end); } } template -void test_from(CharType const *str,unsigned codepoint) +void test_to_utf(CharType const *str,unsigned codepoint) { CharType buf[5] = {1,1,1,1,1}; CharType *p=buf; p = utf_traits::template encode(codepoint,p); - CharType const *end = str; - while(*end) - end++; - TEST(end - str == p-buf ); + CharType const * const end = str_end(str); + TEST(end - str == p - buf); TEST(*p); *p=0; TEST(memcmp(str,buf,sizeof(CharType) * (end-str))==0); } - -int main() +void test_utf8() { - try { - - std::cout << "Test UTF-8" << std::endl; - std::cout << "- From UTF-8" << std::endl; - - - std::cout << "-- Correct" << std::endl; - - test_to("\x7f",0x7f); - test_to("\xc2\x80",0x80); - test_to("\xdf\xbf",0x7ff); - test_to("\xe0\xa0\x80",0x800); - test_to("\xef\xbf\xbf",0xffff); - test_to("\xf0\x90\x80\x80",0x10000); - test_to("\xf4\x8f\xbf\xbf",0x10ffff); - - std::cout << "-- Too big" << std::endl; - test_to("\xf4\x9f\x80\x80",illegal); // 11 0000 - test_to("\xfb\xbf\xbf\xbf",illegal); // 3ff ffff - test_to("\xf8\x90\x80\x80\x80",illegal); // 400 0000 - test_to("\xfd\xbf\xbf\xbf\xbf\xbf",illegal); // 7fff ffff - - std::cout << "-- Invalid length" << std::endl; - - /// test that this actually works - test_to(make2(0x80),0x80); - test_to(make2(0x7ff),0x7ff); - - test_to(make3(0x800),0x800); - test_to(make3(0xffff),0xffff); - - test_to(make4(0x10000),0x10000); - test_to(make4(0x10ffff),0x10ffff); - - test_to(make4(0x110000),illegal); - test_to(make4(0x1fffff),illegal); - - test_to(make2(0),illegal); - test_to(make3(0),illegal); - test_to(make4(0),illegal); - test_to(make2(0x7f),illegal); - test_to(make3(0x7f),illegal); - test_to(make4(0x7f),illegal); - - test_to(make3(0x80),illegal); - test_to(make4(0x80),illegal); - test_to(make3(0x7ff),illegal); - test_to(make4(0x7ff),illegal); - - test_to(make4(0x8000),illegal); - test_to(make4(0xffff),illegal); - - std::cout << "-- Invalid surrogate" << std::endl; - - test_to(make3(0xd800),illegal); - test_to(make3(0xdbff),illegal); - test_to(make3(0xdc00),illegal); - test_to(make3(0xdfff),illegal); - - test_to(make4(0xd800),illegal); - test_to(make4(0xdbff),illegal); - test_to(make4(0xdc00),illegal); - test_to(make4(0xdfff),illegal); - - std::cout <<"-- Incomplete" << std::endl; - - test_to("",incomplete); - - test_to("\x80",illegal); - test_to("\xc2",incomplete); - - test_to("\xdf",incomplete); - - test_to("\xe0",incomplete); - test_to("\xe0\xa0",incomplete); - - test_to("\xef\xbf",incomplete); - test_to("\xef",incomplete); - - test_to("\xf0\x90\x80",incomplete); - test_to("\xf0\x90",incomplete); - test_to("\xf0",incomplete); - - test_to("\xf4\x8f\xbf",incomplete); - test_to("\xf4\x8f",incomplete); - test_to("\xf4",incomplete); - - std::cout << "- To UTF-8" << std::endl; - - std::cout << "-- Test correct" << std::endl; - - test_from("\x7f",0x7f); - test_from("\xc2\x80",0x80); - test_from("\xdf\xbf",0x7ff); - test_from("\xe0\xa0\x80",0x800); - test_from("\xef\xbf\xbf",0xffff); - test_from("\xf0\x90\x80\x80",0x10000); - test_from("\xf4\x8f\xbf\xbf",0x10ffff); - - std::cout << "Test UTF-16" << std::endl; - std::cout << "- From UTF-16" << std::endl; - - - std::cout << "-- Correct" << std::endl; - - test_to(u16_seq(0x10),0x10); - test_to(u16_seq(0xffff),0xffff); - test_to(u16_seq(0xD800,0xDC00),0x10000); - test_to(u16_seq(0xDBFF,0xDFFF),0x10FFFF); - - - std::cout << "-- Invalid surrogate" << std::endl; - - test_to(u16_seq(0xDFFF),illegal); - test_to(u16_seq(0xDC00),illegal); - - std::cout <<"-- Incomplete" << std::endl; - - test_to(u16_seq(0),incomplete); - test_to(u16_seq(0xD800),incomplete); - test_to(u16_seq(0xDBFF),incomplete); - - std::cout << "- To UTF-16" << std::endl; - - std::cout << "-- Test correct" << std::endl; - - test_to(u16_seq(0x10),0x10); - test_to(u16_seq(0xffff),0xffff); - test_to(u16_seq(0xD800,0xDC00),0x10000); - test_to(u16_seq(0xDBFF,0xDFFF),0x10FFFF); - - - std::cout << "Test UTF-32" << std::endl; - std::cout << "- From UTF-32" << std::endl; - - - std::cout << "-- Correct" << std::endl; - - test_to(u32_seq(0x10),0x10); - test_to(u32_seq(0xffff),0xffff); - test_to(u32_seq(0x10000),0x10000); - test_to(u32_seq(0x10ffff),0x10ffff); - - - - std::cout << "-- Invalid surrogate" << std::endl; - - test_to(u32_seq(0xD800),illegal); - test_to(u32_seq(0xDBFF),illegal); - test_to(u32_seq(0xDFFF),illegal); - test_to(u32_seq(0xDC00),illegal); - test_to(u32_seq(0x110000),illegal); + std::cout << "- From UTF-8" << std::endl; + + std::cout << "-- Correct" << std::endl; + test_from_utf("\x7f", 0x7f); + test_from_utf("\xc2\x80", 0x80); + test_from_utf("\xdf\xbf", 0x7ff); + test_from_utf("\xe0\xa0\x80", 0x800); + test_from_utf("\xef\xbf\xbf", 0xffff); + test_from_utf("\xf0\x90\x80\x80", 0x10000); + test_from_utf("\xf4\x8f\xbf\xbf", 0x10ffff); + /// test that this actually works + test_from_utf(make2(0x80), 0x80); + test_from_utf(make2(0x7ff), 0x7ff); + + test_from_utf(make3(0x800), 0x800); + test_from_utf(make3(0xffff), 0xffff); + + test_from_utf(make4(0x10000), 0x10000); + test_from_utf(make4(0x10ffff), 0x10ffff); + + std::cout << "-- Too big" << std::endl; + test_from_utf("\xf4\x9f\x80\x80", illegal); // 11 0000 + test_from_utf("\xfb\xbf\xbf\xbf", illegal); // 3ff ffff + test_from_utf("\xf8\x90\x80\x80\x80", illegal); // 400 0000 + test_from_utf("\xfd\xbf\xbf\xbf\xbf\xbf", illegal); // 7fff ffff + + std::cout << "-- Invalid length" << std::endl; + + test_from_utf(make2(0), illegal); + test_from_utf(make3(0), illegal); + test_from_utf(make4(0), illegal); + test_from_utf(make2(0x7f), illegal); + test_from_utf(make3(0x7f), illegal); + test_from_utf(make4(0x7f), illegal); + + test_from_utf(make3(0x80), illegal); + test_from_utf(make4(0x80), illegal); + test_from_utf(make3(0x7ff), illegal); + test_from_utf(make4(0x7ff), illegal); + + test_from_utf(make4(0x8000), illegal); + test_from_utf(make4(0xffff), illegal); + test_from_utf(make4(0x110000), illegal); + test_from_utf(make4(0x1fffff), illegal); + + std::cout << "-- Invalid surrogate" << std::endl; + + test_from_utf(make3(0xd800), illegal); + test_from_utf(make3(0xdbff), illegal); + test_from_utf(make3(0xdc00), illegal); + test_from_utf(make3(0xdfff), illegal); + + test_from_utf(make4(0xd800), illegal); + test_from_utf(make4(0xdbff), illegal); + test_from_utf(make4(0xdc00), illegal); + test_from_utf(make4(0xdfff), illegal); + + std::cout << "-- Incomplete" << std::endl; + + test_from_utf("", incomplete); + + test_from_utf("\x80", illegal); + test_from_utf("\xc2", incomplete); + + test_from_utf("\xdf", incomplete); + + test_from_utf("\xe0", incomplete); + test_from_utf("\xe0\xa0", incomplete); + + test_from_utf("\xef\xbf", incomplete); + test_from_utf("\xef", incomplete); + + test_from_utf("\xf0\x90\x80", incomplete); + test_from_utf("\xf0\x90", incomplete); + test_from_utf("\xf0", incomplete); + + test_from_utf("\xf4\x8f\xbf", incomplete); + test_from_utf("\xf4\x8f", incomplete); + test_from_utf("\xf4", incomplete); + + std::cout << "- To UTF-8" << std::endl; + test_to_utf("\x7f", 0x7f); + test_to_utf("\xc2\x80", 0x80); + test_to_utf("\xdf\xbf", 0x7ff); + test_to_utf("\xe0\xa0\x80", 0x800); + test_to_utf("\xef\xbf\xbf", 0xffff); + test_to_utf("\xf0\x90\x80\x80", 0x10000); + test_to_utf("\xf4\x8f\xbf\xbf", 0x10ffff); +} - std::cout <<"-- Incomplete" << std::endl; +void test_utf16() +{ + std::cout << "- From UTF-16" << std::endl; - test_to(u32_seq(0),incomplete); + std::cout << "-- Correct" << std::endl; + test_from_utf(u16_seq(0x10), 0x10); + test_from_utf(u16_seq(0xffff), 0xffff); + test_from_utf(u16_seq(0xD800, 0xDC00), 0x10000); + test_from_utf(u16_seq(0xDBFF, 0xDFFF), 0x10FFFF); - std::cout << "- To UTF-32" << std::endl; + std::cout << "-- Invalid surrogate" << std::endl; + test_from_utf(u16_seq(0xDFFF), illegal); + test_from_utf(u16_seq(0xDC00), illegal); - std::cout << "-- Test correct" << std::endl; + std::cout << "-- Incomplete" << std::endl; + test_from_utf(u16_seq(0), incomplete); + test_from_utf(u16_seq(0xD800), incomplete); + test_from_utf(u16_seq(0xDBFF), incomplete); - test_to(u32_seq(0x10),0x10); - test_to(u32_seq(0xffff),0xffff); - test_to(u32_seq(0x10ffff),0x10ffff); + std::cout << "- To UTF-16" << std::endl; + test_to_utf(u16_seq(0x10), 0x10); + test_to_utf(u16_seq(0xffff), 0xffff); + test_to_utf(u16_seq(0xD800, 0xDC00), 0x10000); + test_to_utf(u16_seq(0xDBFF, 0xDFFF), 0x10FFFF); #ifndef BOOST_NO_CXX11_CHAR16_T - std::cout << "-- Test char16_t" << std::endl; - test_to(u"\u0010", 0x10); - test_to(u"\uffff", 0xffff); - test_to(u"\U00010000", 0x10000); - test_to(u"\U0010FFFF", 0x10FFFF); - test_to(c16_seq(0xDFFF), illegal); - test_to(c16_seq(0xDC00), illegal); - - test_from(u"\u0010", 0x10); - test_from(u"\uffff", 0xffff); - test_from(u"\U00010000", 0x10000); - test_from(u"\U0010FFFF", 0x10FFFF); + std::cout << "-- Test char16_t" << std::endl; + test_from_utf(u"\u0010", 0x10); + test_from_utf(u"\uffff", 0xffff); + test_from_utf(u"\U00010000", 0x10000); + test_from_utf(u"\U0010FFFF", 0x10FFFF); + test_from_utf(c16_seq(0xDFFF), illegal); + test_from_utf(c16_seq(0xDC00), illegal); + + test_to_utf(u"\u0010", 0x10); + test_to_utf(u"\uffff", 0xffff); + test_to_utf(u"\U00010000", 0x10000); + test_to_utf(u"\U0010FFFF", 0x10FFFF); #endif +} + +void test_utf32() +{ + std::cout << "- From UTF-32" << std::endl; + + std::cout << "-- Correct" << std::endl; + test_from_utf(u32_seq(0x10), 0x10); + test_from_utf(u32_seq(0xffff), 0xffff); + test_from_utf(u32_seq(0x10000), 0x10000); + test_from_utf(u32_seq(0x10ffff), 0x10ffff); + + std::cout << "-- Invalid surrogate" << std::endl; + test_from_utf(u32_seq(0xD800), illegal); + test_from_utf(u32_seq(0xDBFF), illegal); + test_from_utf(u32_seq(0xDFFF), illegal); + test_from_utf(u32_seq(0xDC00), illegal); + test_from_utf(u32_seq(0x110000), illegal); + + std::cout << "-- Incomplete" << std::endl; + test_from_utf(u32_seq(0), incomplete); + + std::cout << "- To UTF-32" << std::endl; + test_to_utf(u32_seq(0x10), 0x10); + test_to_utf(u32_seq(0xffff), 0xffff); + test_to_utf(u32_seq(0x10000), 0x10000); + test_to_utf(u32_seq(0x10ffff), 0x10ffff); + #ifndef BOOST_NO_CXX11_CHAR32_T - std::cout << "-- Test char32_t" << std::endl; - test_to(U"\U00000010", 0x10); - test_to(U"\U0000ffff", 0xffff); - test_to(U"\U00010000", 0x10000); - test_to(U"\U0010ffff", 0x10ffff); - test_to(c32_seq(0xD800), illegal); - test_to(c32_seq(0xDBFF), illegal); - test_to(c32_seq(0xDFFF), illegal); - test_to(c32_seq(0xDC00), illegal); - test_to(c32_seq(0x110000), illegal); - - test_from(U"\U00000010", 0x10); - test_from(U"\U0000ffff", 0xffff); - test_from(U"\U00010000", 0x10000); - test_from(U"\U0010ffff", 0x10ffff); + std::cout << "-- Test char32_t" << std::endl; + test_from_utf(U"\U00000010", 0x10); + test_from_utf(U"\U0000ffff", 0xffff); + test_from_utf(U"\U00010000", 0x10000); + test_from_utf(U"\U0010ffff", 0x10ffff); + test_from_utf(c32_seq(0xD800), illegal); + test_from_utf(c32_seq(0xDBFF), illegal); + test_from_utf(c32_seq(0xDFFF), illegal); + test_from_utf(c32_seq(0xDC00), illegal); + test_from_utf(c32_seq(0x110000), illegal); + + test_to_utf(U"\U00000010", 0x10); + test_to_utf(U"\U0000ffff", 0xffff); + test_to_utf(U"\U00010000", 0x10000); + test_to_utf(U"\U0010ffff", 0x10ffff); #endif +} +int main() +{ + try { + test_utf8(); + test_utf16(); + test_utf32(); } catch(std::exception const &e) { std::cerr << "Failed " << e.what() << std::endl; From 543eadfac3630393f6800346b54a7f48555552dd Mon Sep 17 00:00:00 2001 From: Flamefire Date: Wed, 1 Jun 2022 11:38:54 +0200 Subject: [PATCH 50/90] Workaround GCC bug parsing \uFFFF GCC < 5 creates 2 UTF-16 codepoints instead of 1 due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41698 --- test/test_utf.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/test_utf.cpp b/test/test_utf.cpp index 383cc68d..41163c41 100644 --- a/test/test_utf.cpp +++ b/test/test_utf.cpp @@ -6,6 +6,7 @@ // http://www.boost.org/LICENSE_1_0.txt) // #include +#include #include #include #include "test_locale.hpp" @@ -236,14 +237,22 @@ void test_utf16() #ifndef BOOST_NO_CXX11_CHAR16_T std::cout << "-- Test char16_t" << std::endl; test_from_utf(u"\u0010", 0x10); +#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 50000) + test_from_utf(u"\xffff", 0xffff); +#else test_from_utf(u"\uffff", 0xffff); +#endif test_from_utf(u"\U00010000", 0x10000); test_from_utf(u"\U0010FFFF", 0x10FFFF); test_from_utf(c16_seq(0xDFFF), illegal); test_from_utf(c16_seq(0xDC00), illegal); test_to_utf(u"\u0010", 0x10); +#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 50000) + test_to_utf(u"\xffff", 0xffff); +#else test_to_utf(u"\uffff", 0xffff); +#endif test_to_utf(u"\U00010000", 0x10000); test_to_utf(u"\U0010FFFF", 0x10FFFF); #endif From c79faed1b6214eab59869132267704100f5cc6a5 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 1 Jun 2022 13:42:00 +0200 Subject: [PATCH 51/90] Reduce code duplication in test_utf Move test_to_utf tests into a new test_valid_utf function to avoid the C&P a bit down as for those both directions should be tested anyway. Also needed a workaround for old GCCs not allowing unicode constants below U+A0 --- test/test_utf.cpp | 102 ++++++++++++++++++---------------------------- 1 file changed, 40 insertions(+), 62 deletions(-) diff --git a/test/test_utf.cpp b/test/test_utf.cpp index 41163c41..a293eec8 100644 --- a/test/test_utf.cpp +++ b/test/test_utf.cpp @@ -117,18 +117,26 @@ void test_to_utf(CharType const *str,unsigned codepoint) TEST(memcmp(str,buf,sizeof(CharType) * (end-str))==0); } +template +void test_valid_utf(CharType const* str, unsigned codepoint) +{ + test_from_utf(str, codepoint); + test_to_utf(str, codepoint); +} + void test_utf8() { - std::cout << "- From UTF-8" << std::endl; + std::cout << "- Test UTF-8" << std::endl; std::cout << "-- Correct" << std::endl; - test_from_utf("\x7f", 0x7f); - test_from_utf("\xc2\x80", 0x80); - test_from_utf("\xdf\xbf", 0x7ff); - test_from_utf("\xe0\xa0\x80", 0x800); - test_from_utf("\xef\xbf\xbf", 0xffff); - test_from_utf("\xf0\x90\x80\x80", 0x10000); - test_from_utf("\xf4\x8f\xbf\xbf", 0x10ffff); + test_valid_utf("\x7f", 0x7f); + test_valid_utf("\xc2\x80", 0x80); + test_valid_utf("\xdf\xbf", 0x7ff); + test_valid_utf("\xe0\xa0\x80", 0x800); + test_valid_utf("\xef\xbf\xbf", 0xffff); + test_valid_utf("\xf0\x90\x80\x80", 0x10000); + test_valid_utf("\xf4\x8f\xbf\xbf", 0x10ffff); + /// test that this actually works test_from_utf(make2(0x80), 0x80); test_from_utf(make2(0x7ff), 0x7ff); @@ -198,26 +206,17 @@ void test_utf8() test_from_utf("\xf4\x8f\xbf", incomplete); test_from_utf("\xf4\x8f", incomplete); test_from_utf("\xf4", incomplete); - - std::cout << "- To UTF-8" << std::endl; - test_to_utf("\x7f", 0x7f); - test_to_utf("\xc2\x80", 0x80); - test_to_utf("\xdf\xbf", 0x7ff); - test_to_utf("\xe0\xa0\x80", 0x800); - test_to_utf("\xef\xbf\xbf", 0xffff); - test_to_utf("\xf0\x90\x80\x80", 0x10000); - test_to_utf("\xf4\x8f\xbf\xbf", 0x10ffff); } void test_utf16() { - std::cout << "- From UTF-16" << std::endl; + std::cout << "- Test UTF-16" << std::endl; std::cout << "-- Correct" << std::endl; - test_from_utf(u16_seq(0x10), 0x10); - test_from_utf(u16_seq(0xffff), 0xffff); - test_from_utf(u16_seq(0xD800, 0xDC00), 0x10000); - test_from_utf(u16_seq(0xDBFF, 0xDFFF), 0x10FFFF); + test_valid_utf(u16_seq(0x10), 0x10); + test_valid_utf(u16_seq(0xffff), 0xffff); + test_valid_utf(u16_seq(0xD800, 0xDC00), 0x10000); + test_valid_utf(u16_seq(0xDBFF, 0xDFFF), 0x10FFFF); std::cout << "-- Invalid surrogate" << std::endl; test_from_utf(u16_seq(0xDFFF), illegal); @@ -228,45 +227,31 @@ void test_utf16() test_from_utf(u16_seq(0xD800), incomplete); test_from_utf(u16_seq(0xDBFF), incomplete); - std::cout << "- To UTF-16" << std::endl; - test_to_utf(u16_seq(0x10), 0x10); - test_to_utf(u16_seq(0xffff), 0xffff); - test_to_utf(u16_seq(0xD800, 0xDC00), 0x10000); - test_to_utf(u16_seq(0xDBFF, 0xDFFF), 0x10FFFF); - #ifndef BOOST_NO_CXX11_CHAR16_T std::cout << "-- Test char16_t" << std::endl; - test_from_utf(u"\u0010", 0x10); #if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 50000) - test_from_utf(u"\xffff", 0xffff); + test_valid_utf(u"\x0010", 0x10); + test_valid_utf(u"\xffff", 0xffff); #else - test_from_utf(u"\uffff", 0xffff); + test_valid_utf(u"\u0010", 0x10); + test_valid_utf(u"\uffff", 0xffff); #endif - test_from_utf(u"\U00010000", 0x10000); - test_from_utf(u"\U0010FFFF", 0x10FFFF); + test_valid_utf(u"\U00010000", 0x10000); + test_valid_utf(u"\U0010FFFF", 0x10FFFF); test_from_utf(c16_seq(0xDFFF), illegal); test_from_utf(c16_seq(0xDC00), illegal); - - test_to_utf(u"\u0010", 0x10); -#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 50000) - test_to_utf(u"\xffff", 0xffff); -#else - test_to_utf(u"\uffff", 0xffff); -#endif - test_to_utf(u"\U00010000", 0x10000); - test_to_utf(u"\U0010FFFF", 0x10FFFF); #endif } void test_utf32() { - std::cout << "- From UTF-32" << std::endl; + std::cout << "- Test UTF-32" << std::endl; std::cout << "-- Correct" << std::endl; - test_from_utf(u32_seq(0x10), 0x10); - test_from_utf(u32_seq(0xffff), 0xffff); - test_from_utf(u32_seq(0x10000), 0x10000); - test_from_utf(u32_seq(0x10ffff), 0x10ffff); + test_valid_utf(u32_seq(0x10), 0x10); + test_valid_utf(u32_seq(0xffff), 0xffff); + test_valid_utf(u32_seq(0x10000), 0x10000); + test_valid_utf(u32_seq(0x10ffff), 0x10ffff); std::cout << "-- Invalid surrogate" << std::endl; test_from_utf(u32_seq(0xD800), illegal); @@ -278,28 +263,21 @@ void test_utf32() std::cout << "-- Incomplete" << std::endl; test_from_utf(u32_seq(0), incomplete); - std::cout << "- To UTF-32" << std::endl; - test_to_utf(u32_seq(0x10), 0x10); - test_to_utf(u32_seq(0xffff), 0xffff); - test_to_utf(u32_seq(0x10000), 0x10000); - test_to_utf(u32_seq(0x10ffff), 0x10ffff); - #ifndef BOOST_NO_CXX11_CHAR32_T std::cout << "-- Test char32_t" << std::endl; - test_from_utf(U"\U00000010", 0x10); - test_from_utf(U"\U0000ffff", 0xffff); - test_from_utf(U"\U00010000", 0x10000); - test_from_utf(U"\U0010ffff", 0x10ffff); +#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 50000) + test_valid_utf(U"\x0010", 0x10); +#else + test_valid_utf(U"\U00000010", 0x10); +#endif + test_valid_utf(U"\U0000ffff", 0xffff); + test_valid_utf(U"\U00010000", 0x10000); + test_valid_utf(U"\U0010ffff", 0x10ffff); test_from_utf(c32_seq(0xD800), illegal); test_from_utf(c32_seq(0xDBFF), illegal); test_from_utf(c32_seq(0xDFFF), illegal); test_from_utf(c32_seq(0xDC00), illegal); test_from_utf(c32_seq(0x110000), illegal); - - test_to_utf(U"\U00000010", 0x10); - test_to_utf(U"\U0000ffff", 0xffff); - test_to_utf(U"\U00010000", 0x10000); - test_to_utf(U"\U0010ffff", 0x10ffff); #endif } From cf016db2454aca5c421d772e911c18f1cca25c45 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Thu, 2 Jun 2022 17:53:09 +0200 Subject: [PATCH 52/90] Actually remove use of BOOST_LOCALE_UNORDERED_CATALOG Also add the still-required include Follow-up to 5bcf0151 --- src/shared/message.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/shared/message.cpp b/src/shared/message.cpp index b93b5335..609194da 100644 --- a/src/shared/message.cpp +++ b/src/shared/message.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include "mo_hash.hpp" @@ -488,11 +489,7 @@ namespace boost { typedef CharType char_type; typedef std::basic_string string_type; typedef message_key key_type; - #ifdef BOOST_LOCALE_UNORDERED_CATALOG typedef boost::unordered_map > catalog_type; - #else - typedef std::map catalog_type; - #endif typedef std::vector catalogs_set_type; typedef std::map domains_map_type; public: From 52331a466b04d2fcc86448446d58436a5e1c39f7 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Thu, 2 Jun 2022 11:03:37 +0200 Subject: [PATCH 53/90] Use Boost.Predef to detect Linux The `__linux` define may not be set. `__linux__` or `linux` mayb be used. So use Boost.Predef `BOOST_OS_LINUX` instead. Closes #49 --- CMakeLists.txt | 1 + src/icu/time_zone.cpp | 3 ++- src/posix/numeric.cpp | 3 ++- src/util/numeric.hpp | 5 +++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a5f6ce6a..d62bf857 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,6 +49,7 @@ target_link_libraries(boost_locale PRIVATE Boost::thread Boost::unordered + Boost::predef ) target_compile_definitions(boost_locale diff --git a/src/icu/time_zone.cpp b/src/icu/time_zone.cpp index 7a7f4b2d..5c514498 100644 --- a/src/icu/time_zone.cpp +++ b/src/icu/time_zone.cpp @@ -7,6 +7,7 @@ // #define BOOST_LOCALE_SOURCE #include "time_zone.hpp" +#include // // Bug - when ICU tries to find a file that is equivalent to /etc/localtime it finds /usr/share/zoneinfo/localtime @@ -19,7 +20,7 @@ // #if U_ICU_VERSION_MAJOR_NUM == 4 && (U_ICU_VERSION_MINOR_NUM * 100 + U_ICU_VERSION_PATCHLEVEL_NUM) <= 402 -# if defined(__linux) || defined(__FreeBSD__) || defined(__APPLE__) +# if BOOST_OS_LINUX || BOOST_OS_BSD_FREE || defined(__APPLE__) # define BOOST_LOCALE_WORKAROUND_ICU_BUG # endif #endif diff --git a/src/posix/numeric.cpp b/src/posix/numeric.cpp index b9c7b279..8d63dc61 100644 --- a/src/posix/numeric.cpp +++ b/src/posix/numeric.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -31,7 +32,7 @@ #include "all_generator.hpp" -#if defined(__linux) || defined(__APPLE__) +#if BOOST_OS_LINUX || defined(__APPLE__) #define BOOST_LOCALE_HAVE_WCSFTIME_L #endif diff --git a/src/util/numeric.hpp b/src/util/numeric.hpp index 9610c39d..5518bd14 100644 --- a/src/util/numeric.hpp +++ b/src/util/numeric.hpp @@ -9,6 +9,7 @@ #define BOOST_LOCALE_IMPL_UTIL_NUMERIC_HPP #include #include +#include #include #include #include @@ -189,7 +190,7 @@ class base_num_format : public std::num_put { std::string tz = ios_info::get(ios).time_zone(); std::tm tm; - #if defined(__linux) || defined(__FreeBSD__) || defined(__APPLE__) + #if BOOST_OS_LINUX || BOOST_OS_BSD_FREE || defined(__APPLE__) std::vector tmp_buf(tz.c_str(),tz.c_str()+tz.size()+1); #endif if(tz.empty()) { @@ -210,7 +211,7 @@ class base_num_format : public std::num_put gmtime_r(&time,&tm); #endif - #if defined(__linux) || defined(__FreeBSD__) || defined(__APPLE__) + #if BOOST_OS_LINUX || BOOST_OS_BSD_FREE || defined(__APPLE__) // These have extra fields to specify timezone if(gmtoff!=0) { // bsd and apple want tm_zone be non-const From d1fc12426ffcc411a8ccddcf9ef6f33a2d5d0609 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Thu, 2 Jun 2022 11:11:08 +0200 Subject: [PATCH 54/90] Remove trailing spaces --- build/has_icu_test.cpp | 4 +- doc/Doxyfile | 4 +- doc/appendix.txt | 6 +- doc/boundary_analysys.txt | 66 +++--- doc/building_boost_locale.txt | 2 +- doc/changelog.txt | 10 +- doc/charset_handling.txt | 24 +- doc/collation.txt | 2 +- doc/conversions.txt | 6 +- doc/dates_times_timezones.txt | 22 +- doc/default_encoding_under_windows.txt | 2 +- doc/formatting_and_parsing.txt | 8 +- doc/gendoc.sh | 2 +- doc/gettext_for_windows.txt | 8 +- doc/glossary.txt | 6 +- doc/locale_gen.txt | 20 +- doc/localized_text_formatting.txt | 2 +- doc/main.txt | 6 +- doc/messages_formatting.txt | 40 ++-- doc/rationale.txt | 18 +- doc/recommendations_and_myths.txt | 4 +- doc/running_examples_under_windows.txt | 2 +- doc/special_thanks.txt | 4 +- doc/std_locales.txt | 14 +- doc/using_boost_locale.txt | 2 +- doc/using_localization_backends.txt | 16 +- doc/working_with_multiple_locales.txt | 2 +- examples/CMakeLists.txt | 2 +- examples/boundary.cpp | 6 +- examples/calendar.cpp | 6 +- examples/conversions.cpp | 8 +- examples/hello.cpp | 18 +- examples/performance/perf_convert.cpp | 4 +- examples/wboundary.cpp | 8 +- examples/wconversions.cpp | 10 +- examples/whello.cpp | 20 +- .../boost/locale/boundary/boundary_point.hpp | 18 +- include/boost/locale/boundary/facets.hpp | 20 +- include/boost/locale/boundary/index.hpp | 114 +++++----- include/boost/locale/boundary/segment.hpp | 82 +++---- include/boost/locale/boundary/types.hpp | 20 +- include/boost/locale/collator.hpp | 28 +-- include/boost/locale/config.hpp | 4 +- include/boost/locale/conversion.hpp | 76 +++---- include/boost/locale/date_time.hpp | 206 +++++++++--------- include/boost/locale/date_time_facet.hpp | 10 +- include/boost/locale/encoding.hpp | 28 +-- include/boost/locale/encoding_errors.hpp | 8 +- include/boost/locale/format.hpp | 64 +++--- include/boost/locale/formatting.hpp | 88 ++++---- include/boost/locale/generator.hpp | 30 +-- include/boost/locale/generic_codecvt.hpp | 116 +++++----- include/boost/locale/gnu_gettext.hpp | 20 +- include/boost/locale/hold_ptr.hpp | 14 +- include/boost/locale/info.hpp | 10 +- include/boost/locale/localization_backend.hpp | 30 +-- include/boost/locale/message.hpp | 98 ++++----- include/boost/locale/utf.hpp | 28 +-- include/boost/locale/utf8_codecvt.hpp | 10 +- include/boost/locale/util.hpp | 48 ++-- src/encoding/codepage.cpp | 8 +- src/encoding/conv.hpp | 18 +- src/encoding/iconv_codepage.ipp | 20 +- src/encoding/uconv_codepage.ipp | 8 +- src/encoding/wconv_codepage.ipp | 50 ++--- src/icu/all_generator.hpp | 2 +- src/icu/boundary.cpp | 10 +- src/icu/codecvt.cpp | 14 +- src/icu/codecvt.hpp | 2 +- src/icu/collator.cpp | 32 +-- src/icu/conversion.cpp | 16 +- src/icu/date_time.cpp | 14 +- src/icu/formatter.cpp | 54 ++--- src/icu/formatter.hpp | 4 +- src/icu/icu_backend.cpp | 16 +- src/icu/icu_backend.hpp | 6 +- src/icu/icu_util.hpp | 2 +- src/icu/numeric.cpp | 40 ++-- src/icu/predefined_formatters.hpp | 10 +- src/icu/time_zone.cpp | 22 +- src/icu/uconv.hpp | 36 +-- src/posix/codecvt.cpp | 16 +- src/posix/codecvt.hpp | 2 +- src/posix/collate.cpp | 4 +- src/posix/converter.cpp | 12 +- src/posix/numeric.cpp | 32 +-- src/posix/posix_backend.cpp | 24 +- src/posix/posix_backend.hpp | 6 +- src/shared/date_time.cpp | 20 +- src/shared/format.cpp | 8 +- src/shared/formatting.cpp | 24 +- src/shared/generator.cpp | 12 +- src/shared/ids.cpp | 2 +- src/shared/ios_prop.hpp | 16 +- src/shared/localization_backend.cpp | 14 +- src/shared/message.cpp | 70 +++--- src/shared/mo_lambda.cpp | 36 +-- src/shared/mo_lambda.hpp | 8 +- src/std/all_generator.hpp | 2 +- src/std/codecvt.cpp | 4 +- src/std/collate.cpp | 6 +- src/std/converter.cpp | 10 +- src/std/numeric.cpp | 24 +- src/std/std_backend.cpp | 24 +- src/std/std_backend.hpp | 6 +- src/util/codecvt_converter.cpp | 44 ++-- src/util/default_locale.cpp | 2 +- src/util/gregorian.cpp | 44 ++-- src/util/gregorian.hpp | 2 +- src/util/iconv.hpp | 2 +- src/util/info.cpp | 4 +- src/util/locale_data.cpp | 12 +- src/util/locale_data.hpp | 6 +- src/util/numeric.hpp | 30 +-- src/util/timezone.hpp | 4 +- src/win32/api.hpp | 32 +-- src/win32/collate.cpp | 6 +- src/win32/converter.cpp | 10 +- src/win32/lcid.cpp | 6 +- src/win32/numeric.cpp | 16 +- src/win32/win_backend.cpp | 18 +- src/win32/win_backend.hpp | 6 +- test/CMakeLists.txt | 2 +- test/Jamfile.v2 | 6 +- test/cmake_test/main.cpp | 2 +- test/test_boundary.cpp | 42 ++-- test/test_codecvt.cpp | 48 ++-- test/test_codepage.cpp | 38 ++-- test/test_codepage_converter.cpp | 22 +- test/test_collate.cpp | 10 +- test/test_config.cpp | 4 +- test/test_convert.cpp | 10 +- test/test_date_time.cpp | 42 ++-- test/test_formatting.cpp | 32 +-- test/test_generator.cpp | 4 +- test/test_icu_vs_os_timezone.cpp | 4 +- test/test_ios_prop.cpp | 2 +- test/test_locale.hpp | 8 +- test/test_locale_tools.hpp | 10 +- test/test_message.cpp | 50 ++--- test/test_posix_collate.cpp | 6 +- test/test_posix_convert.cpp | 10 +- test/test_posix_formatting.cpp | 16 +- test/test_std_collate.cpp | 6 +- test/test_std_convert.cpp | 4 +- test/test_std_formatting.cpp | 18 +- test/test_utf.cpp | 4 +- test/test_winapi_collate.cpp | 10 +- test/test_winapi_convert.cpp | 8 +- test/test_winapi_formatting.cpp | 10 +- 150 files changed, 1496 insertions(+), 1496 deletions(-) diff --git a/build/has_icu_test.cpp b/build/has_icu_test.cpp index 9419b301..366837c1 100644 --- a/build/has_icu_test.cpp +++ b/build/has_icu_test.cpp @@ -3,8 +3,8 @@ * Copyright (c) 2010 * John Maddock * - * Use, modification and distribution are subject to the - * Boost Software License, Version 1.0. (See accompanying file + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ diff --git a/doc/Doxyfile b/doc/Doxyfile index fd69651f..3e5be0a2 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -128,7 +128,7 @@ FULL_PATH_NAMES = YES # If left blank the directory from which doxygen is run is used as the # path to strip. -STRIP_FROM_PATH = ../../.. ../include +STRIP_FROM_PATH = ../../.. ../include # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells @@ -137,7 +137,7 @@ STRIP_FROM_PATH = ../../.. ../include # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. -STRIP_FROM_INC_PATH = ../../.. ../include +STRIP_FROM_INC_PATH = ../../.. ../include # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful if your file system diff --git a/doc/appendix.txt b/doc/appendix.txt index 1f189a06..61f67e47 100644 --- a/doc/appendix.txt +++ b/doc/appendix.txt @@ -10,13 +10,13 @@ /*! \page appendix Appendix -\section appendix_toc Table of Contents +\section appendix_toc Table of Contents - \subpage rationale - \subpage faq - \subpage default_encoding_under_windows -- \subpage running_examples_under_windows -- \subpage gettext_for_windows +- \subpage running_examples_under_windows +- \subpage gettext_for_windows - \subpage glossary - \subpage tested_compilers_and_platforms - \subpage status_of_cpp0x_characters_support diff --git a/doc/boundary_analysys.txt b/doc/boundary_analysys.txt index 5587f4e2..c486c32a 100644 --- a/doc/boundary_analysys.txt +++ b/doc/boundary_analysys.txt @@ -25,11 +25,11 @@ \section boundary_analysys_basics Basics Boost.Locale provides a boundary analysis tool, allowing you to split text into characters, -words, or sentences, and find appropriate places for line breaks. +words, or sentences, and find appropriate places for line breaks. \note This task is not a trivial task. \par -A Unicode code point and a character are not equivalent, for example: +A Unicode code point and a character are not equivalent, for example: Hebrew word Shalom - "שָלוֹם" that consists of 4 characters and 6 code points (4 base letters and 2 diacritical marks) \par Words may not be separated by space characters in some languages like in Japanese or Chinese. @@ -41,7 +41,7 @@ Boost.Locale provides 2 major classes for boundary analysis: - \ref boost::locale::boundary::boundary_point_index - an object that holds an index of boundary points in the text. It allows to iterate over the \ref boost::locale::boundary::boundary_point "boundary_point" objects. -Each of the classes above use an iterator type as template parameter. +Each of the classes above use an iterator type as template parameter. Both of these classes accept in their constructor: - A flag that defines boundary analysis \ref boost::locale::boundary::boundary_type "boundary_type". @@ -85,7 +85,7 @@ using namespace boost::locale::boundary; boost::locale::generator gen; std::string text="To be or not to be, that is the question." // Create mapping of text for token iterator using global locale. -ssegment_index map(word,text.begin(),text.end(),gen("en_US.UTF-8")); +ssegment_index map(word,text.begin(),text.end(),gen("en_US.UTF-8")); // Print all "words" -- chunks of word boundary for(ssegment_index::iterator it=map.begin(),e=map.end();it!=e;++it) std::cout <<"\""<< * it << "\", "; @@ -102,12 +102,12 @@ This sentence "生きるか死ぬか、それが問題だ。" (rule() & word_none) @@ -185,14 +185,14 @@ Would print \verbatim Segment 生 contains: ideographic characters -Segment きるか contains: kana characters +Segment きるか contains: kana characters Segment 死 contains: ideographic characters -Segment ぬか contains: kana characters -Segment 、 contains: white space or punctuation marks -Segment それが contains: kana characters +Segment ぬか contains: kana characters +Segment 、 contains: white space or punctuation marks +Segment それが contains: kana characters Segment 問題 contains: ideographic characters -Segment だ contains: kana characters -Segment 。 contains: white space or punctuation marks +Segment だ contains: kana characters +Segment 。 contains: white space or punctuation marks \endverbatim One important things that should be noted that each segment is defined @@ -223,9 +223,9 @@ boost::locale::generator gen; using namespace boost::locale::boundary; std::string text= "Hello! How\n" "are you?\n"; -ssegment_index map(sentence,text.begin(),text.end(),gen("en_US.UTF-8")); +ssegment_index map(sentence,text.begin(),text.end(),gen("en_US.UTF-8")); map.rule(sentence_term); -for(ssegment_index::iterator it=map.begin(),e=map.end();it!=e;++it) +for(ssegment_index::iterator it=map.begin(),e=map.end();it!=e;++it) std::cout << "Sentence [" << *it << "]" << std::endl; \endcode @@ -264,8 +264,8 @@ Sometimes it is useful to find a segment that some specific iterator is pointing For example a user had clicked at specific point, we want to select a word on this location. -\ref boost::locale::boundary::segment_index "segment_index" provides -\ref boost::locale::boundary::segment_index::find() "find(base_iterator p)" +\ref boost::locale::boundary::segment_index "segment_index" provides +\ref boost::locale::boundary::segment_index::find() "find(base_iterator p)" member function for this purpose. This function returns the iterator to the segmet such that \a p points to. @@ -287,7 +287,7 @@ Would print: be \endverbatim -\note +\note if the iterator lays inside the segment this segment returned. If the segment does not fit the selection rules, then the segment following requested position @@ -304,12 +304,12 @@ For example: For \ref boost::locale::boundary::word "word" boundary analysis wit \section boundary_analysys_break Iterating Over Boundary Points \section boundary_analysys_break_basics Basic Iteration -The \ref boost::locale::boundary::boundary_point_index "boundary_point_index" is similar to +The \ref boost::locale::boundary::boundary_point_index "boundary_point_index" is similar to \ref boost::locale::boundary::segment_index "segment_index" in its interface but as a different role. Instead of returning text chunks (\ref boost::locale::boundary::segment "segment"s), it returns \ref boost::locale::boundary::boundary_point "boundary_point" object that -represents a position in text - a base iterator used that is used for -iteration of the source text C++ characters. +represents a position in text - a base iterator used that is used for +iteration of the source text C++ characters. The \ref boost::locale::boundary::boundary_point "boundary_point" object also provides a \ref boost::locale::boundary::boundary_point::rule() "rule()" member function that defines a rule this boundary was selected according to. @@ -325,7 +325,7 @@ boost::locale::generator gen; // our text sample std::string const text="First sentence. Second sentence! Third one?"; -// Create an index +// Create an index sboundary_point_index map(sentence,text.begin(),text.end(),gen("en_US.UTF-8")); // Count two boundary points @@ -337,8 +337,8 @@ while(p!=e && count < 2) { } if(p!=e) { - std::cout << "First two sentences are: " - << std::string(text.begin(),p->iterator()) + std::cout << "First two sentences are: " + << std::string(text.begin(),p->iterator()) << std::endl; } else { @@ -354,7 +354,7 @@ First two sentences are: First sentence. Second sentence! \section boundary_analysys_break_rules Using Rules -Similarly to the \ref boost::locale::boundary::segment_index "segment_index" the +Similarly to the \ref boost::locale::boundary::segment_index "segment_index" the \ref boost::locale::boundary::boundary_point_index "boundary_point_index" provides a \ref boost::locale::boundary::boundary_point_index::rule(rule_type r) "rule(rule_type mask)" member function to filter boundary points that interest us. @@ -379,7 +379,7 @@ Which is not something that we really expected. As the "Second\n" is considered an independent sentence that was separated by a line separator "Line Feed". -However, we can set set a rule \ref boost::locale::boundary::sentence_term "sentence_term" +However, we can set set a rule \ref boost::locale::boundary::sentence_term "sentence_term" and the iterator would use only boundary points that are created by a sentence terminators like ".!?". @@ -392,7 +392,7 @@ Right after the generation of the index we would get the desired output: \verbatim First two sentences are: First sentence. Second -sentence! +sentence! \endverbatim You can also use \ref boost::locale::boundary::boundary_point::rule() "boundary_point::rule()" member @@ -415,8 +415,8 @@ for(sboundary_point_index::iterator p = map.begin(),e=map.end();p!=e;++p) { else if(p->rule() & sentence_sep) std::cout << "There is a sentence separator: "; if(p->rule()!=0) // print if some rule exists - std::cout << "[" << std::string(text.begin(),p->iterator()) - << "|" << std::string(p->iterator(),text.end()) + std::cout << "[" << std::string(text.begin(),p->iterator()) + << "|" << std::string(p->iterator(),text.end()) << "]\n"; } \endcode @@ -467,13 +467,13 @@ map.rule(word_any); std::string::const_iterator pos = text.begin() + 12; // "no|t"; // Get the search range -sboundary_point_index::iterator +sboundary_point_index::iterator begin =map.begin(), end = map.end(), it = map.find(pos); // find a boundary // go 3 words backward -for(int count = 0;count <3 && it!=begin; count ++) +for(int count = 0;count <3 && it!=begin; count ++) --it; // Save the start diff --git a/doc/building_boost_locale.txt b/doc/building_boost_locale.txt index 37f36842..47b772be 100644 --- a/doc/building_boost_locale.txt +++ b/doc/building_boost_locale.txt @@ -131,7 +131,7 @@ You can run unit tests by invoking \c bjam with \c libs/locale/test project para Boost.Locale is built with binary compatibility in mind. Switching localization back ends on or off, or using iconv or not, does not affect binary compatibility. So if a dynamic library was built -with all possible backends, other dynamic libraries compiled with, for example, only the \c std, \c posix +with all possible backends, other dynamic libraries compiled with, for example, only the \c std, \c posix or \c winapi backends would still be binary-compatible with it. However this definitely has an effect on some features. For example, if you diff --git a/doc/changelog.txt b/doc/changelog.txt index 300203b3..f0cb0c55 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -10,7 +10,7 @@ /*! \page changelog Changelog -- 1.67.0 +- 1.67.0 - Added support of unique_ptr interface in addition to C++2003 auto_ptr - in order to support C++2017, now you can use BOOST_LOCALE_HIDE_AUTO_PTR definiton to remove auto_ptr from the interfaces and prevent deprecated watnings - Fixed test problem with ICU >60.1 - Fix of solaris build @@ -21,22 +21,22 @@ - Fixed build agains Boost.Thread v4 - Fixed Year of week instead of year ICU backend formatting - Fixed formatting test for ICU 56.1 and above -- 1.60.0 +- 1.60.0 - Implemented generic codecvt facet and add general purpose utf8_codecvt facet - Added posix locale support for FreeBSD 10.0 and above - Fixed issues 10017 (sun redefinition on SunOS), 11163 (set_default_messages_domain incorrect behavior), 11673 - build issues - - Some warning cleanup + - Some warning cleanup - Fixed tests for latest ICU versions - Added workaround for `libc++` issues - Added new defines `BOOST_LOCALE_ENABLE_CHAR16_T` and `BOOST_LOCALE_ENABLE_CHAR32_T` to enable C++11 `char16_t` and `char32_t` instead of deprecated ones - 1.53.0 - Bug fixes: 7743, 7386, 7734, 7701, 7368, 7762: - - 7743 - security related bug fix, some invalid UTF-8 sequences where accepted as valid + - 7743 - security related bug fix, some invalid UTF-8 sequences where accepted as valid - 7386 - invalid Windows codepage names used - 7734 - fixed missing documentation, caused by a error in Doxygen formatting - 7701 - fixed missing \c std:: in some places - 7368, 7762 - Spelling, grammar, typos - 1.49.0 - - Fixed incorrect use of MultiByteToWideChar in detection of invalid input sequences + - Fixed incorrect use of MultiByteToWideChar in detection of invalid input sequences - 1.48.0 - First Release diff --git a/doc/charset_handling.txt b/doc/charset_handling.txt index d51adcf1..6fefa041 100644 --- a/doc/charset_handling.txt +++ b/doc/charset_handling.txt @@ -12,8 +12,8 @@ \section codecvt Convenience Interface -Boost.Locale provides \ref boost::locale::conv::to_utf() "to_utf", \ref boost::locale::conv::from_utf() "from_utf" and -\ref boost::locale::conv::utf_to_utf() "utf_to_utf" functions in +Boost.Locale provides \ref boost::locale::conv::to_utf() "to_utf", \ref boost::locale::conv::from_utf() "from_utf" and +\ref boost::locale::conv::utf_to_utf() "utf_to_utf" functions in the \c boost::locale::conv namespace. They are simple and convenient functions to convert a string to and from UTF-8/16/32 strings and strings using other encodings. @@ -33,16 +33,16 @@ or use std::locale as a parameter to fetch this information from it. It also receives a policy parameter that tells it how to behave if the conversion can't be performed (i.e. an illegal or unsupported character is found). By default this function skips all illegal characters and tries to do the best it -can, however, it is possible ask it to throw -a \ref boost::locale::conv::conversion_error "conversion_error" exception +can, however, it is possible ask it to throw +a \ref boost::locale::conv::conversion_error "conversion_error" exception by passing the \c stop flag to it: \code -std::wstring s=to_utf("\xFF\xFF","UTF-8",stop); +std::wstring s=to_utf("\xFF\xFF","UTF-8",stop); // Throws because this string is illegal in UTF-8 \endcode -\section codecvt_codecvt std::codecvt facet +\section codecvt_codecvt std::codecvt facet Boost.Locale provides stream codepage conversion facets based on the \c std::codecvt facet. This allows conversion between wide-character encodings and 8-bit encodings like UTF-8, ISO-8859 or Shift-JIS. @@ -53,7 +53,7 @@ Most of compilers provide such facets, but: - Under Linux the encodings are supported only if the required locales are generated. For example it may be impossible to create a \c he_IL.CP1255 locale even when the \c he_IL locale is available. -Thus Boost.Locale provides an option to generate code-page conversion facets for use with +Thus Boost.Locale provides an option to generate code-page conversion facets for use with Boost.Iostreams filters or \c std::wfstream. For example: \code @@ -79,7 +79,7 @@ stream: \code #include -#include +#include #include #include @@ -102,7 +102,7 @@ public: int main() -{ +{ // the device that converts wide characters // to narrow typedef io::code_converter converter_device; @@ -112,7 +112,7 @@ int main() consumer cons; // setup out converter to work - // with he_IL.UTF-8 locale + // with he_IL.UTF-8 locale converter_device dev; boost::locale::generator gen; dev.imbue(gen("he_IL.UTF-8")); @@ -121,7 +121,7 @@ int main() stream.open(dev); // Now wide characters that are written // to the stream would be given to - // our consumer as narrow characters + // our consumer as narrow characters // in UTF-8 encoding stream << L"שלום" << std::flush; } @@ -139,7 +139,7 @@ ISO-8859, and Shift-JIS, but not with stateful encodings like UTF-7 or SCSU. \b Recommendation: Prefer the Unicode UTF-8 encoding for \c char based strings and files in your application. -\note +\note The implementation of codecvt for single byte encodings like ISO-8859-X and for UTF-8 is very efficient and would allow fast conversion of the content, however its performance may be sub-optimal for diff --git a/doc/collation.txt b/doc/collation.txt index 7b0fa4f3..d71fef71 100644 --- a/doc/collation.txt +++ b/doc/collation.txt @@ -9,7 +9,7 @@ // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 filetype=cpp.doxygen /*! -\page collation Collation +\page collation Collation Boost.Locale provides a \ref boost::locale::collator "collator" class, derived from \c std::collate, that adds support for primary, secondary, tertiary, quaternary and identical comparison levels. They can be approximately defined as: diff --git a/doc/conversions.txt b/doc/conversions.txt index 2bbc6ead..5049f8cf 100644 --- a/doc/conversions.txt +++ b/doc/conversions.txt @@ -10,7 +10,7 @@ /*! \page conversions Text Conversions -There is a set of functions that perform basic string conversion operations: +There is a set of functions that perform basic string conversion operations: upper, lower and \ref term_title_case "title case" conversions, \ref term_case_folding "case folding" and Unicode \ref term_normalization "normalization". These are \ref boost::locale::to_upper "to_upper" , \ref boost::locale::to_lower "to_lower", \ref boost::locale::to_title "to_title", \ref boost::locale::fold_case "fold_case" and \ref boost::locale::normalize "normalize". @@ -56,8 +56,8 @@ GRÜßEN GRÜSSEN Where a letter "ß" was not converted correctly to double-S in first case because of a limitation of \c std::ctype facet. -This is even more problematic in case of UTF-8 encodings where non US-ASCII are not converted at all. -For example, this code +This is even more problematic in case of UTF-8 encodings where non US-ASCII are not converted at all. +For example, this code \code std::string grussen = "grüßen"; diff --git a/doc/dates_times_timezones.txt b/doc/dates_times_timezones.txt index b3c29a93..a693131e 100644 --- a/doc/dates_times_timezones.txt +++ b/doc/dates_times_timezones.txt @@ -11,7 +11,7 @@ \page dates_times_timezones Working with dates, times, timezones and calendars. \section dates_times_timezones_intro Introduction - + There are several important flaws in the standard C, C++ and Boost libraries that handle dates and time: -# The biggest flaw of most libraries that provide operations over dates is the fact that they only support @@ -23,7 +23,7 @@ There are several important flaws in the standard C, C++ and Boost libraries tha user the information about the first day of week. This information is locale dependent. It is Monday in France and it is Sunday in United States. -Boost.Locale provides generic \ref boost::locale::date_time "date_time", and \ref boost::locale::calendar "calendar" classes +Boost.Locale provides generic \ref boost::locale::date_time "date_time", and \ref boost::locale::calendar "calendar" classes that allow you to perform operations on dates and times for non-Gregorian calendars such as Hebrew, Islamic, Japanese and others. \ref using_localization_backends "Non-ICU based backends" support the Gregorian calendar only. @@ -49,7 +49,7 @@ For example: cout << "Let's meet tomorrow at " << as::date << tomorrow << endl; date_time some_point = period::year(1995) + period::january() + period::day(1); // Set some_point's date to 1995-Jan-1. - cout << "The "<< as::date << some_point << " is the " + cout << "The "<< as::date << some_point << " is the " << as::ordinal << some_point / period::day_of_week_local() << " day of the week" << endl; \endcode @@ -61,7 +61,7 @@ You can calculate the difference between dates by dividing the difference by a p "between " << as::date << now << " and " << now + 2*period::month() << endl; \endcode -You can also use different syntax (less operator overloading) +You can also use different syntax (less operator overloading) \code date_time now; @@ -95,7 +95,7 @@ For example: // Create locales with Hebrew and Gregorian (default) calendars. std::locale l_hebrew=gen("en_US.UTF-8@calendar=hebrew"); std::locale l_gregorian=gen("en_US.UTF-8"); - + // Create a Gregorian date from fields date_time greg(year(2010) + february() + day(5),l_gregorian); // Assign a time point taken from the Gregorian date to date_time with @@ -105,12 +105,12 @@ For example: std::cout << "Hebrew year is " << heb / year << std::endl; \endcode -\note +\note Non-ICU based backends support the same date-time range as \c mktime and \c localtime C library functions. - Unix 32 bit: dates between 1901 and 2038 -- Unix 64 bit: dates from 1 BC +- Unix 64 bit: dates from 1 BC - Windows: dates from 1970. If the \c time_t is 32 bits wide (mingw), then the upper limit is year 2038 \section dates_times_timezones_tz Time Zone @@ -129,7 +129,7 @@ several different levels: \ref using_localization_backends "Non-ICU based backends" support only two kinds of time zones: --# The current OS time zone, as it is handled by \c localtime and \c mktime the standard +-# The current OS time zone, as it is handled by \c localtime and \c mktime the standard library functions - the default time zone -# Simple time zone in format "GMT+HH:MM" - the time zone represented using fixed shift from the UTC without support of daylight saving time. @@ -140,7 +140,7 @@ several different levels: Writing a \ref boost::locale::date_time "date_time" is equivalent to: -- Applying \ref boost::locale::as::datetime "as::datetime" manipulator on the stream +- Applying \ref boost::locale::as::datetime "as::datetime" manipulator on the stream - Writing POSIX time as number that is fetched by calling \ref boost::locale::date_time::time() "date_time::time()" function. - Reverting the manipulator effect back. @@ -180,7 +180,7 @@ Would print something like: This is important to remember that \c date_time object is always rendered and parsed in the context of the \c iostream's locale and time zone and not in the context of specific \c date_time object. -\section dates_times_timezones_qna Questions and Answers +\section dates_times_timezones_qna Questions and Answers Why should I use Boost.Locale over Boost.DateTime when I need Gregorian calendar only? @@ -201,7 +201,7 @@ a simple table of rules where daylight saving depend only on certain n'th day of The daylight savings time may vary by year, political issues and many other things. Most of the modern operating systems (Linux, *BSD, Mac OS X, OpenVMS) and many important software packages -(ICU, Java, Python) use so called Olson database in order to handle daylight saving time +(ICU, Java, Python) use so called Olson database in order to handle daylight saving time correctly. If you need full time zone database support, then you should use ICU library. diff --git a/doc/default_encoding_under_windows.txt b/doc/default_encoding_under_windows.txt index 80b445ae..e7cf1b53 100644 --- a/doc/default_encoding_under_windows.txt +++ b/doc/default_encoding_under_windows.txt @@ -44,7 +44,7 @@ int main() // Make boost.filesystem use it boost::filesystem::path::imbue(std::locale()); // Now Works perfectly fine with UTF-8! - boost::filesystem::ofstream hello("שלום.txt"); + boost::filesystem::ofstream hello("שלום.txt"); } \endcode diff --git a/doc/formatting_and_parsing.txt b/doc/formatting_and_parsing.txt index fc6da2e3..76218935 100644 --- a/doc/formatting_and_parsing.txt +++ b/doc/formatting_and_parsing.txt @@ -117,7 +117,7 @@ There is a list of supported \c strftime flags by ICU backend: - \c \%c -- Locale date-time format. \b Note: prefer using \c as::datetime - \c \%d -- Day of Month [01,31] - \c \%e -- Day of Month [1,31] -- \c \%h -- Same as \c \%b +- \c \%h -- Same as \c \%b - \c \%H -- 24 clock hour [00,23] - \c \%I -- 12 clock hour [01,12] - \c \%j -- Day of year [1,366] @@ -125,11 +125,11 @@ There is a list of supported \c strftime flags by ICU backend: - \c \%M -- Minute [00,59] - \c \%n -- New Line - \c \%p -- AM/PM in locale representation -- \c \%r -- Time with AM/PM, same as \c \%I:\%M:\%S \%p -- \c \%R -- Same as \c \%H:\%M +- \c \%r -- Time with AM/PM, same as \c \%I:\%M:\%S \%p +- \c \%R -- Same as \c \%H:\%M - \c \%S -- Second [00,61] - \c \%t -- Tab character -- \c \%T -- Same as \c \%H:\%M:\%S +- \c \%T -- Same as \c \%H:\%M:\%S - \c \%x -- Local date representation. **Note:** prefer using \c as::date - \c \%X -- Local time representation. **Note:** prefer using \c as::time - \c \%y -- Year [00,99] diff --git a/doc/gendoc.sh b/doc/gendoc.sh index a4d8a6de..88e21cd4 100755 --- a/doc/gendoc.sh +++ b/doc/gendoc.sh @@ -8,4 +8,4 @@ # -rm html/* && doxygen +rm html/* && doxygen diff --git a/doc/gettext_for_windows.txt b/doc/gettext_for_windows.txt index fb57408d..abd0f67a 100644 --- a/doc/gettext_for_windows.txt +++ b/doc/gettext_for_windows.txt @@ -23,7 +23,7 @@ basically several options: Boost.Locale was developed for needs of CppCMS project and thus CppCMS hosts a convince package for Windows users of pre-build, statically liked \c gettext -runtime utilities like \c xgettext, \c msgfmt, etc. +runtime utilities like \c xgettext, \c msgfmt, etc. So you can download a zip file \c gettext-tools-static-XXX.zip from a CppCMS downloads page under boost_locale/gettext_for_windows. @@ -37,7 +37,7 @@ Thus you can always install full MinGW distribution including gettext tools. How a want minimalistic runtime version that allows you to extract messages and create catalogs you need to download several packages manually. -In order to install Gettext via MinGW distributing you need to download, a GCC's runtime, +In order to install Gettext via MinGW distributing you need to download, a GCC's runtime, iconv library and gettext itself. So visit a downloads page of MinGW project @@ -61,9 +61,9 @@ For example, at June 23, 2011 it was: After you download the packages, extract all the files to the same directory using tools like \c 7zip and you'll get all the executables and \c dll's you need under \c bin subdirectory. -\note the version on MinGW site is slightly outdated (0.17.1) while gettext provides currently 0.18.1. +\note the version on MinGW site is slightly outdated (0.17.1) while gettext provides currently 0.18.1. -\section gettext_for_windows_build Building latest version on your own. +\section gettext_for_windows_build Building latest version on your own. You can build your own version of GNU Gettext using MinGW environment, you'll need to have up-to-date gcc compiler and the shell, you'll need to install iconv first and then build a gettext with it. diff --git a/doc/glossary.txt b/doc/glossary.txt index 412a63ea..6340c1f1 100644 --- a/doc/glossary.txt +++ b/doc/glossary.txt @@ -10,7 +10,7 @@ /*! \page glossary Glossary -- \anchor term_bmp Basic Multilingual Plane (BMP) -- a part of +- \anchor term_bmp Basic Multilingual Plane (BMP) -- a part of the Universal Character Set with code points in the range U-0000--U-FFFF. The most commonly used UCS characters lay in this plane, including all Western, Cyrillic, Hebrew, Thai, Arabic and CJK characters. However there are many characters that lay outside the BMP and they are absolutely required for correct support of East Asian languages. @@ -31,7 +31,7 @@ - \b Formatting - representation of various values according to locale preferences. For example, a number 1234.5 (C representation) should be displayed as 1,234.5 in the US locale and 1.234,5 in the Russian locale. The date November 1st, 2005 would be represented as 11/01/2005 in the United States, and 01.11.2005 in Russia. This is an important part of localization. - \n + \n For example: does "You have to bring 134,230 kg of rice on 04/01/2010" means "134 tons of rice on the first of April" or "134 kg 230 g of rice on January 4th"? That is quite different. - \b Gettext - The GNU localization library used for message formatting. Today it is the de-facto standard localization library in the @@ -52,7 +52,7 @@ library. - \b UCS-2 - a fixed-width Unicode encoding, capable of representing only code points in the Basic Multilingual Plane (BMP). It is a legacy encoding and is not recommended for use. -- \b Unicode -- the industry standard that defines the representation and manipulation of text suitable for most languages and countries. +- \b Unicode -- the industry standard that defines the representation and manipulation of text suitable for most languages and countries. It should not be confused with the Universal Character Set, it is a much larger standard that also defines algorithms like bidirectional display order, Arabic shaping, etc. - Universal Character Set (UCS) - an international standard that defines a set of characters for many scripts and their diff --git a/doc/locale_gen.txt b/doc/locale_gen.txt index 0803883b..2abf1802 100644 --- a/doc/locale_gen.txt +++ b/doc/locale_gen.txt @@ -18,20 +18,20 @@ and variant is additional options for specializing the locale, like \c euro or \ Note that each locale should include the encoding in order to handle \c char based strings correctly. -\section locale_gen_basics Basics +\section locale_gen_basics Basics The class \ref boost::locale::generator "generator" provides tools to generate the locales we need. The simplest way to use \c generator is to create a locale and set it as the global one: \code #include - + using namespace boost::locale; int main() { generator gen; - // Create locale generator - std::locale::global(gen("")); + // Create locale generator + std::locale::global(gen("")); // "" - the system default locale, set // it globally } @@ -40,7 +40,7 @@ The class \ref boost::locale::generator "generator" provides tools to generate t Of course we can also specify the locale manually \code - std::locale loc = gen("en_US.UTF-8"); + std::locale loc = gen("en_US.UTF-8"); // Use English, United States locale \endcode @@ -64,7 +64,7 @@ member functions of the \ref boost::locale::generator "generator" class. For example: -\code +\code generator gen; gen.characters(wchar_t_facet); gen.categories(collation_facet | formatting_facet); @@ -75,10 +75,10 @@ For example: The variant part of the locale (the part that comes after \@ symbol) is localization \ref using_localization_backends "back-end" dependent. -\subsection locale_gen_variant_non_icu Non ICU Backends +\subsection locale_gen_variant_non_icu Non ICU Backends -\ref posix_backend "POSIX" and \ref std_backend "std" back-ends use their own OS specific naming conventions and -depend on the current OS configuration. For example typical Linux distribution provides \c euro for currency selection, +\ref posix_backend "POSIX" and \ref std_backend "std" back-ends use their own OS specific naming conventions and +depend on the current OS configuration. For example typical Linux distribution provides \c euro for currency selection, \c cyrillic and \c latin for specification of language script. \ref winapi_backend "winapi" back-end does not support any variants. @@ -93,7 +93,7 @@ However in general it is represented as set of key=value pairs separated with a Currently ICU supports following keys: -- \c calendar - the calendar used for the current locale. For example: \c gregorian, \c japanese, +- \c calendar - the calendar used for the current locale. For example: \c gregorian, \c japanese, \c buddhist, \c islamic, \c hebrew, \c chinese, \c islamic-civil. - \c collation - the collation order used for this locales, for example \c phonebook, \c pinyin, \c traditional, \c stroke, \c direct, \c posix. diff --git a/doc/localized_text_formatting.txt b/doc/localized_text_formatting.txt index 0c91e6b2..b203eb33 100644 --- a/doc/localized_text_formatting.txt +++ b/doc/localized_text_formatting.txt @@ -51,7 +51,7 @@ The syntax is described by following grammar: parameters: parameter | parameter ',' parameters; parameter : key ["=" value] ; key : [0-9a-zA-Z<>]+ ; - value : ascii-string-excluding-"}"-and="," | local-string ; + value : ascii-string-excluding-"}"-and="," | local-string ; local-string : quoted-text | quoted-text local-string; quoted-text : '[^']*' ; \endverbatim diff --git a/doc/main.txt b/doc/main.txt index 12112524..9d85bb9d 100644 --- a/doc/main.txt +++ b/doc/main.txt @@ -47,7 +47,7 @@ Boost.Locale enhances and unifies the standard library's API the way it becomes useful and convenient for development of cross platform and "cross-culture" software. -In order to achieve this goal Boost.Locale uses +In order to achieve this goal Boost.Locale uses the-state-of-the-art Unicode and Localization library: ICU - International Components for Unicode. @@ -70,7 +70,7 @@ and use library. - \ref conversions - \ref formatting_and_parsing - \ref messages_formatting - - \ref charset_handling + - \ref charset_handling - \ref boundary_analysys - \ref localized_text_formatting - \ref dates_times_timezones @@ -83,7 +83,7 @@ and use library. - \ref rationale - \ref faq - \ref default_encoding_under_windows - - \ref running_examples_under_windows + - \ref running_examples_under_windows - \ref gettext_for_windows - \ref glossary - \ref tested_compilers_and_platforms diff --git a/doc/messages_formatting.txt b/doc/messages_formatting.txt index 32a5a274..85ed2279 100644 --- a/doc/messages_formatting.txt +++ b/doc/messages_formatting.txt @@ -14,7 +14,7 @@ - \ref msg_loading_dictionaries - \ref message_translation - \ref indirect_message_translation - - \ref plural_forms + - \ref plural_forms - \ref multiple_gettext_domain - \ref direct_message_translation - \ref extracting_messages_from_code @@ -33,7 +33,7 @@ of GNU Gettext, as it is outside the scope of this document. The model is following: -- First, our application \c foo is prepared for localization by calling the \ref boost::locale::translate() "translate" function +- First, our application \c foo is prepared for localization by calling the \ref boost::locale::translate() "translate" function for each message used in user interface. \n For example: @@ -128,7 +128,7 @@ There are two ways to translate messages: - using \ref boost_locale_translate_family "boost::locale::translate()" family of functions: \n - These functions create a special proxy object \ref boost::locale::basic_message "basic_message" + These functions create a special proxy object \ref boost::locale::basic_message "basic_message" that can be converted to string according to given locale or written to \c std::ostream formatting the message in the \c std::ostream's locale. \n @@ -147,7 +147,7 @@ The basic function that allows us to translate a message is \ref boost_locale_tr These functions use a character type \c CharType as template parameter and receive either CharType const * or std::basic_string as input. -These functions receive an original message and return a special proxy +These functions receive an original message and return a special proxy object - \ref boost::locale::basic_message "basic_message". This object holds all the required information for the message formatting. @@ -196,8 +196,8 @@ int main() \note -- \ref boost::locale::basic_message "basic_message" can be implicitly converted - to an apopriate std::basic_string using +- \ref boost::locale::basic_message "basic_message" can be implicitly converted + to an apopriate std::basic_string using the global locale: \n \code @@ -267,7 +267,7 @@ For more detailed information please refer to GNU Gettext: translate() function calls instead of the default gettext() and ngettext() ones. The first parameter --keyword=translate:1,1t provides the template for basic messages: a \c translate function that is called with 1 argument (1t) and the first message is taken as the key. The second one --keyword=translate:1,2,3t is used for plural forms. -It tells \c xgettext to use a translate() function call with 3 parameters (3t) and take the 1st and 2nd parameter as keys. An +It tells \c xgettext to use a translate() function call with 3 parameters (3t) and take the 1st and 2nd parameter as keys. An additional marker \c Nc can be used to mark context information. The full set of xgettext parameters suitable for Boost.Locale is: @@ -411,11 +411,11 @@ may ignore some of these parameters. \subsection custom_file_system_support Custom Filesystem Support When the access to actual file system is limited like in ActiveX controls or -when the developer wants to ship all-in-one executable file, -it is useful to be able to load \c gettext catalogs from a custom location - +when the developer wants to ship all-in-one executable file, +it is useful to be able to load \c gettext catalogs from a custom location - a custom file system. -Boost.Locale provides an option to install boost::locale::message_format facet +Boost.Locale provides an option to install boost::locale::message_format facet with customized options provided in boost::locale::gnu_gettext::messages_info structure. This structure contains \c boost::function based @@ -509,7 +509,7 @@ int main() // Generate locales and imbue them to iostream locale::global(gen("")); cout.imbue(locale()); - + // In Windows 1255 (C) symbol is encoded as 0xA9 cout << translate("© 2001 All Rights Reserved") << endl; } @@ -534,7 +534,7 @@ key is missing in the dictionary. -# A tool for extracting strings from source code, and managing them: GNU Gettext provides good tools, but other implementations are available as well. -# A good translation program like Lokalize, Pedit or GTranslator. - + - Why doesn't Boost.Locale provide tools for extracting and management of message catalogs. Why should I use GPL-ed software? Are my programs or message catalogs affected by its license? \n @@ -546,7 +546,7 @@ key is missing in the dictionary. do a very fine job, especially as they are freely available for download and support almost any platform. All Linux distributions, BSD Flavors, Mac OS X and other Unix like operating systems provide GNU Gettext tools as a standard package.\n - Windows users can get GNU Gettext utilities via MinGW project. See \ref gettext_for_windows. + Windows users can get GNU Gettext utilities via MinGW project. See \ref gettext_for_windows. - Is there any reason to prefer the Boost.Locale implementation to the original GNU Gettext runtime library? @@ -555,7 +555,7 @@ key is missing in the dictionary. There are two important differences between the GNU Gettext runtime library and the Boost.Locale implementation: \n -# The GNU Gettext runtime supports only one locale per process. It is not thread-safe to use multiple locales - and encodings in the same process. This is perfectly fine for applications that interact directly with + and encodings in the same process. This is perfectly fine for applications that interact directly with a single user like most GUI applications, but is problematic for services and servers. -# The GNU Gettext API supports only 8-bit encodings, making it irrelevant in environments that natively use wide strings. diff --git a/doc/rationale.txt b/doc/rationale.txt index 313ed7e4..83065eee 100644 --- a/doc/rationale.txt +++ b/doc/rationale.txt @@ -9,13 +9,13 @@ // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 filetype=cpp.doxygen /*! -\page rationale Design Rationale +\page rationale Design Rationale - \ref rationale_why - \ref why_icu -- \ref why_icu_wrapper +- \ref why_icu_wrapper - \ref why_icu_api_is_hidden -- \ref why_gnu_gettext +- \ref why_gnu_gettext - \ref why_posix_names - \ref why_linear_chunks - \ref why_abstract_api @@ -56,7 +56,7 @@ Almost every(!) facet has design flaws: for the UTF-8 encoding where only Unicode 0-0x7F range can be represented as a single character. As a result, localized numbers can't be represented correctly under locales that use the Unicode "EN SPACE" character for the thousands separator, such as Russian. \n - This actually causes real problems under GCC and SunStudio compilers, where formatting numbers under a Russian locale creates invalid + This actually causes real problems under GCC and SunStudio compilers, where formatting numbers under a Russian locale creates invalid UTF-8 sequences. - \c std::time_put and \c std::time_get have several flaws: -# They assume that the calendar is always Gregorian, by using \c std::tm for time representation, ignoring the fact that in many @@ -148,7 +148,7 @@ There are several reasons: -# A Gregorian Date by definition can't be used to represent locale-independent dates, because not all calendars are Gregorian. -# \c ptime -- definitely could be used, but it has several problems: - \n + \n - It is created in GMT or Local time clock, when `time()` gives a representation that is independent of time zones (usually GMT time), and only later should it be represented in a time zone that the user requests. \n @@ -159,7 +159,7 @@ There are several reasons: The major formatting and parsing functions are not virtual. This makes it impossible to reimplement the formatting and parsing functions of \c ptime unless the developers of the Boost.DateTime library decide to change them. \n - Also, the facets of \c ptime are not "correctly" designed in terms of division of formatting information and + Also, the facets of \c ptime are not "correctly" designed in terms of division of formatting information and locale information. Formatting information should be stored within \c std::ios_base and information about locale-specific formatting should be stored in the facet itself. \n @@ -186,7 +186,7 @@ There are two reasons: - Boost.Locale relies heavily on the third-party APIs like ICU, POSIX or Win32 API, all of them work only on linear chunks of text, so providing non-linear API would just hide the real situation and would not bring real performance advantage. -- In fact, all known libraries that work with Unicode: ICU, Qt, Glib, Win32 API, POSIX API +- In fact, all known libraries that work with Unicode: ICU, Qt, Glib, Win32 API, POSIX API and others accept an input as single linear chunk of text and there is a good reason for this: \n -# Most of supported operations on text like collation, case handling usually work on small @@ -221,11 +221,11 @@ There are several reasons: - C++0x defines \c char16_t and \c char32_t as distinct types, so substituting is with something like \c uint16_t or \c uint32_t would not work as for example writing \c uint16_t to \c uint32_t stream would write a number to stream. -- The C++ locales system would work only if standard facets like \c std::num_put are installed into the +- The C++ locales system would work only if standard facets like \c std::num_put are installed into the existing instance of \c std::locale, however in the many standard C++ libraries these facets are specialized for each specific character that the standard library supports, so an attempt to create a new facet would fail as it is not specialized. - + These are exactly the reasons why Boost.Locale fails with current limited C++0x characters support on GCC-4.5 (the second reason) and MSVC-2010 (the first reason) diff --git a/doc/recommendations_and_myths.txt b/doc/recommendations_and_myths.txt index 90bd0e59..24e2018b 100644 --- a/doc/recommendations_and_myths.txt +++ b/doc/recommendations_and_myths.txt @@ -16,10 +16,10 @@ supported Unicode characters and is more convenient for general use than encodings like Latin1. - Remember, there are many different cultures. You can assume very little about the user's language. His calendar may not have "January". It may be not possible to convert strings to integers using \c atoi because - they may not use the "ordinary" digits 0..9 at all. You can't assume that "space" characters are frequent + they may not use the "ordinary" digits 0..9 at all. You can't assume that "space" characters are frequent because in Chinese the space character does not separate words. The text may be written from Right-to-Left or from Up-to-Down, and so on. -- Using message formatting, try to provide as much context information as you can. Prefer translating entire +- Using message formatting, try to provide as much context information as you can. Prefer translating entire sentences over single words. When translating words, \b always add some context information. diff --git a/doc/running_examples_under_windows.txt b/doc/running_examples_under_windows.txt index 8a916405..6ccefc87 100644 --- a/doc/running_examples_under_windows.txt +++ b/doc/running_examples_under_windows.txt @@ -13,7 +13,7 @@ All of the examples that come with Boost.Locale are designed for UTF-8 and it is the default encoding used by Boost.Locale. -However, the default narrow encoding under Microsoft Windows is not UTF-8 and +However, the default narrow encoding under Microsoft Windows is not UTF-8 and the output of the applications would not be displayed correctly in the console. So in order to use UTF-8 encoding under the Windows console and see the output correctly, do the following: diff --git a/doc/special_thanks.txt b/doc/special_thanks.txt index 0888f7f7..a71c1d6f 100644 --- a/doc/special_thanks.txt +++ b/doc/special_thanks.txt @@ -8,11 +8,11 @@ // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 filetype=cpp.doxygen /*! -\page special_thanks Special Thanks +\page special_thanks Special Thanks (in alphabetical order) -- Chad Nelson - for volunteering to manage the formal review and for the great language corrections +- Chad Nelson - for volunteering to manage the formal review and for the great language corrections for this tutorial. - Vladimir Prus - for development of Boost.Build support for Boost.Locale. diff --git a/doc/std_locales.txt b/doc/std_locales.txt index 1673bf94..19e79af9 100644 --- a/doc/std_locales.txt +++ b/doc/std_locales.txt @@ -12,7 +12,7 @@ \section std_locales_basics Getting familiar with standard C++ Locales -The C++ standard library offers a simple and powerful way to provide locale-specific information. It is done via the \c +The C++ standard library offers a simple and powerful way to provide locale-specific information. It is done via the \c std::locale class, the container that holds all the required information about a specific culture, such as number formatting patterns, date and time formatting, currency, case conversion etc. @@ -49,7 +49,7 @@ You can also create your own facets and install them into existing locale object class measure : public std::locale::facet { public: typedef enum { inches, ... } measure_type; - measure(measure_type m,size_t refs=0) + measure(measure_type m,size_t refs=0) double from_metric(double value) const; std::string name() const; ... @@ -89,14 +89,14 @@ additional issues: \code int main() { - std::locale::global(std::locale("")); + std::locale::global(std::locale("")); // Set system's default locale as global std::ofstream csv("test.csv"); csv << 1.1 << "," << 1.3 << std::endl; } \endcode \n - What would be the content of \c test.csv ? It may be "1.1,1.3" or it may be "1,1,1,3" + What would be the content of \c test.csv ? It may be "1.1,1.3" or it may be "1,1,1,3" rather than what you had expected. \n More than that it affects even \c printf and libraries like \c boost::lexical_cast giving @@ -113,12 +113,12 @@ additional issues: in \c ru_RU.UTF-8 locale number 1024 should be displayed as "1 024" where the space is a Unicode character with codepoint u00A0. Unfortunately many libraries don't handle this correctly, for example GCC and SunStudio display a "\xC2" character instead of - the first character in the UTF-8 sequence "\xC2\xA0" that represents this code point, and + the first character in the UTF-8 sequence "\xC2\xA0" that represents this code point, and actually generate invalid UTF-8. \n - Locale names are not standardized. For example, under MSVC you need to provide the name - \c en-US or \c English_USA.1252 , when on POSIX platforms it would be \c en_US.UTF-8 - or \c en_US.ISO-8859-1 + \c en-US or \c English_USA.1252 , when on POSIX platforms it would be \c en_US.UTF-8 + or \c en_US.ISO-8859-1 \n More than that, MSVC does not support UTF-8 locales at all. \n diff --git a/doc/using_boost_locale.txt b/doc/using_boost_locale.txt index 1396b5d6..e2a92703 100644 --- a/doc/using_boost_locale.txt +++ b/doc/using_boost_locale.txt @@ -25,7 +25,7 @@ supported by other localization backends. - \subpage localized_text_formatting - \subpage dates_times_timezones - \subpage locale_information -- \subpage working_with_multiple_locales +- \subpage working_with_multiple_locales */ diff --git a/doc/using_localization_backends.txt b/doc/using_localization_backends.txt index a467ad87..234e3414 100644 --- a/doc/using_localization_backends.txt +++ b/doc/using_localization_backends.txt @@ -17,7 +17,7 @@ libraries, and ICU is by no means a small library. Boost.Locale provides an option to use non-ICU based localization backends. Although usually less powerful, these often provide all you need: -message formatting, currency, date, time, number formatting, basic collation and +message formatting, currency, date, time, number formatting, basic collation and case manipulation. They are implemented using the standard OS API or a C or C++ library. \section when_to_use_non_icu_backends When to use non-ICU backends @@ -83,7 +83,7 @@ problems with this. \note - If you using GCC compiler under Windows you need GCC-4.x series to use it, GCC-3.4 is not supported -- Only UTF-8 as narrow locale encoding and UTF-16 as wide encoding are supported. +- Only UTF-8 as narrow locale encoding and UTF-16 as wide encoding are supported. \section supported_features_by_backends Supported Features @@ -161,13 +161,13 @@ via the boost::locale::localization_backend_manager::global static member functi For example: \code - localization_backend_manager my = localization_backend_manager::global(); + localization_backend_manager my = localization_backend_manager::global(); // Get global backend - my.select("std"); + my.select("std"); // select std backend as default - generator gen(my); + generator gen(my); // create a generator that uses this backend. localization_backend_manager::global(my); @@ -182,12 +182,12 @@ for example \c icu for one kind of operation and \c std for all others: \code - localization_backend_manager my = localization_backend_manager::global(); + localization_backend_manager my = localization_backend_manager::global(); // Get global backend - my.select("std"); + my.select("std"); // select std backend as default for all categories - my.select("icu",boundary_facet); + my.select("icu",boundary_facet); // select icu backend for boundary analysis (since it is not supported by \c std) \endcode diff --git a/doc/working_with_multiple_locales.txt b/doc/working_with_multiple_locales.txt index 3f53793a..79b04fe4 100644 --- a/doc/working_with_multiple_locales.txt +++ b/doc/working_with_multiple_locales.txt @@ -31,7 +31,7 @@ For example: gen("ja_JP.UTF-8"); // Create all locales - std::locale en=gen("en_US.UTF-8"); + std::locale en=gen("en_US.UTF-8"); // Fetch an existing locale from the cache std::locale ar=gen("ar_EG.UTF-8"); // Because ar_EG not in the cache, a new locale is generated (and cached) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 4d9bfc12..09e431f9 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -5,7 +5,7 @@ function(boost_locale_add_example name) set(ARG_SRC ${name}.cpp) endif() set(name ${PROJECT_NAME}-expl_${name}) - + add_executable(${name} ${ARG_SRC}) add_dependencies(tests ${name}) target_link_libraries(${name} PRIVATE diff --git a/examples/boundary.cpp b/examples/boundary.cpp index 742ee7bd..0a169b5f 100644 --- a/examples/boundary.cpp +++ b/examples/boundary.cpp @@ -24,9 +24,9 @@ int main() cout << "boundary detection not implemented in this environment" << endl; return 0; } - locale::global(loc); + locale::global(loc); cout.imbue(loc); - + string text="Hello World! あにま! Linux2.6 and Windows7 is word and number. שָלוֹם עוֹלָם!"; @@ -70,7 +70,7 @@ int main() cout<<"|" <<*p ; } cout<<"|\n\n"; - + } // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/examples/calendar.cpp b/examples/calendar.cpp index d905511a..dbd8765a 100644 --- a/examples/calendar.cpp +++ b/examples/calendar.cpp @@ -39,11 +39,11 @@ int main() for(now=start; period::year(now) == current_year;) { // Print heading of month - if(calendar().is_gregorian()) + if(calendar().is_gregorian()) std::cout << format("{1,ftime='%B'}") % now <Advances Save Options... and select // Unicode (UTF-8 with signature) Codepage 65001 @@ -51,9 +51,9 @@ int main() } locale::global(loc); wcout.imbue(loc); - + // This is needed to prevent C library to - // convert strings to narrow + // convert strings to narrow // instead of C++ on some platforms std::ios_base::sync_with_stdio(false); @@ -100,7 +100,7 @@ int main() wcout<Advances Save Options... and select // Unicode (UTF-8 with signature) Codepage 65001 @@ -43,16 +43,16 @@ int main() using namespace std; // Create system default locale generator gen; - locale loc=gen(""); + locale loc=gen(""); locale::global(loc); wcout.imbue(loc); // This is needed to prevent C library to - // convert strings to narrow + // convert strings to narrow // instead of C++ on some platforms std::ios_base::sync_with_stdio(false); - + wcout< sboundary_point; ///< convenience typedef typedef boundary_point wsboundary_point; ///< convenience typedef #ifdef BOOST_LOCALE_ENABLE_CHAR16_T @@ -162,7 +162,7 @@ namespace boundary { #ifdef BOOST_LOCALE_ENABLE_CHAR32_T typedef boundary_point u32sboundary_point;///< convenience typedef #endif - + typedef boundary_point cboundary_point; ///< convenience typedef typedef boundary_point wcboundary_point; ///< convenience typedef #ifdef BOOST_LOCALE_ENABLE_CHAR16_T @@ -171,7 +171,7 @@ namespace boundary { #ifdef BOOST_LOCALE_ENABLE_CHAR32_T typedef boundary_point u32cboundary_point; ///< convenience typedef #endif - + } // boundary } // locale diff --git a/include/boost/locale/boundary/facets.hpp b/include/boost/locale/boundary/facets.hpp index 5baa22df..504afce6 100644 --- a/include/boost/locale/boundary/facets.hpp +++ b/include/boost/locale/boundary/facets.hpp @@ -20,7 +20,7 @@ namespace boost { namespace locale { - + /// /// \brief This namespace contains all operations required for boundary analysis of text /// @@ -31,7 +31,7 @@ namespace boost { /// @{ /// - + /// /// \brief This structure is used for representing boundary point /// that follows the offset. @@ -41,7 +41,7 @@ namespace boost { /// /// Create empty break point at beginning /// - break_info() : + break_info() : offset(0), rule(0) { @@ -61,11 +61,11 @@ namespace boost { /// size_t offset; /// - /// The identification of this break point according to + /// The identification of this break point according to /// various break types /// rule_type rule; - + /// /// Compare two break points' offset. Allows to search with /// standard algorithms over the index. @@ -75,7 +75,7 @@ namespace boost { return offset < other.offset; } }; - + /// /// This type holds the analysis of the text - all its break points /// with marks @@ -114,7 +114,7 @@ namespace boost { /// Identification of this facet /// static std::locale::id id; - + #if defined (__SUNPRO_CC) && defined (_RWSTD_VER) std::locale::id& __get_id (void) const { return id; } #endif @@ -135,7 +135,7 @@ namespace boost { std::locale::id& __get_id (void) const { return id; } #endif }; - + template<> class BOOST_LOCALE_DECL boundary_indexing : public std::locale::facet { public: @@ -150,7 +150,7 @@ namespace boost { std::locale::id& __get_id (void) const { return id; } #endif }; - + #ifdef BOOST_LOCALE_ENABLE_CHAR16_T template<> class BOOST_LOCALE_DECL boundary_indexing : public std::locale::facet { @@ -166,7 +166,7 @@ namespace boost { #endif }; #endif - + #ifdef BOOST_LOCALE_ENABLE_CHAR32_T template<> class BOOST_LOCALE_DECL boundary_indexing : public std::locale::facet { diff --git a/include/boost/locale/boundary/index.hpp b/include/boost/locale/boundary/index.hpp index f77c41ad..e19f6b3e 100644 --- a/include/boost/locale/boundary/index.hpp +++ b/include/boost/locale/boundary/index.hpp @@ -33,7 +33,7 @@ namespace boost { namespace locale { - + namespace boundary { /// /// \defgroup boundary Boundary Analysis @@ -87,7 +87,7 @@ namespace boost { // // C++0x requires that string is continious in memory and all known // string implementations - // do this because of c_str() support. + // do this because of c_str() support. // if(linear_iterator_traits::is_linear && b!=e) @@ -116,8 +116,8 @@ namespace boost { mapping(boundary_type type, base_iterator begin, base_iterator end, - std::locale const &loc) - : + std::locale const &loc) + : index_(new index_type()), begin_(begin), end_(end) @@ -151,7 +151,7 @@ namespace boost { }; template - class segment_index_iterator : + class segment_index_iterator : public boost::iterator_facade< segment_index_iterator, segment, @@ -163,7 +163,7 @@ namespace boost { typedef BaseIterator base_iterator; typedef mapping mapping_type; typedef segment segment_type; - + segment_index_iterator() : current_(0,0),map_(0) { } @@ -266,13 +266,13 @@ namespace boost { { size_t dist=std::distance(map_->begin(),p); index_type::const_iterator b=map_->index().begin(),e=map_->index().end(); - index_type::const_iterator + index_type::const_iterator boundary_point=std::upper_bound(b,e,break_info(dist)); while(boundary_point != e && (boundary_point->rule & mask_)==0) boundary_point++; current_.first = current_.second = boundary_point - b; - + if(full_select_) { while(current_.first > 0) { current_.first --; @@ -317,31 +317,31 @@ namespace boost { bool valid_offset(size_t offset) const { - return offset == 0 + return offset == 0 || offset == size() // make sure we not acess index[size] || (index()[offset].rule & mask_)!=0; } - + size_t size() const { return index().size(); } - + index_type const &index() const { return map_->index(); } - - + + segment_type value_; std::pair current_; mapping_type const *map_; rule_type mask_; bool full_select_; }; - + template - class boundary_point_index_iterator : + class boundary_point_index_iterator : public boost::iterator_facade< boundary_point_index_iterator, boundary_point, @@ -353,7 +353,7 @@ namespace boost { typedef BaseIterator base_iterator; typedef mapping mapping_type; typedef boundary_point boundary_point_type; - + boundary_point_index_iterator() : current_(0),map_(0) { } @@ -465,22 +465,22 @@ namespace boost { bool valid_offset(size_t offset) const { - return offset == 0 + return offset == 0 || offset + 1 >= size() // last and first are always valid regardless of mark || (index()[offset].rule & mask_)!=0; } - + size_t size() const { return index().size(); } - + index_type const &index() const { return map_->index(); } - - + + boundary_point_type value_; size_t current_; mapping_type const *map_; @@ -497,10 +497,10 @@ namespace boost { template class boundary_point_index; - + /// - /// \brief This class holds an index of segments in the text range and allows to iterate over them + /// \brief This class holds an index of segments in the text range and allows to iterate over them /// /// This class is provides \ref begin() and \ref end() member functions that return bidirectional iterators /// to the \ref segment objects. @@ -511,7 +511,7 @@ namespace boost { /// various masks %as \ref word_any. /// \n /// The default is to select any types of boundaries. - /// \n + /// \n /// For example: using word %boundary analysis, when the provided mask is \ref word_kana then the iterators /// would iterate only over the words containing Kana letters and \ref word_any would select all types of /// words excluding ranges that consist of white space and punctuation marks. So iterating over the text @@ -532,7 +532,7 @@ namespace boost { /// terminator "!" or "?". But changing \ref full_select() to true, the selected segment would include /// all the text up to previous valid %boundary point and would return two expected sentences: /// "Hello!" and "How\nare you?". - /// + /// /// This class allows to find a segment according to the given iterator in range using \ref find() member /// function. /// @@ -554,7 +554,7 @@ namespace boost { template class segment_index { public: - + /// /// The type of the iterator used to iterate over the original text /// @@ -590,7 +590,7 @@ namespace boost { typedef segment value_type; /// - /// Default constructor. + /// Default constructor. /// /// \note /// @@ -609,7 +609,7 @@ namespace boost { base_iterator begin, base_iterator end, rule_type mask, - std::locale const &loc=std::locale()) + std::locale const &loc=std::locale()) : map_(type,begin,end,loc), mask_(mask), @@ -623,7 +623,7 @@ namespace boost { segment_index(boundary_type type, base_iterator begin, base_iterator end, - std::locale const &loc=std::locale()) + std::locale const &loc=std::locale()) : map_(type,begin,end,loc), mask_(0xFFFFFFFFu), @@ -654,7 +654,7 @@ namespace boost { /// segment_index const &operator = (boundary_point_index const &); - + /// /// Create a new index for %boundary analysis \ref boundary_type "type" of the text /// in range [begin,end) for locale \a loc. @@ -693,7 +693,7 @@ namespace boost { } /// - /// Find a first valid segment following a position \a p. + /// Find a first valid segment following a position \a p. /// /// If \a p is inside a valid segment this segment is selected: /// @@ -703,7 +703,7 @@ namespace boost { /// - "t|o be or ", would point to "to", /// - "to be or| ", would point to end. /// - /// + /// /// Preconditions: the segment_index should have a mapping and \a p should be valid iterator /// to the text in the mapped range. /// @@ -713,17 +713,17 @@ namespace boost { { return iterator(p,&map_,mask_,full_select_); } - + /// /// Get the mask of rules that are used - /// + /// rule_type rule() const { return mask_; } /// /// Set the mask of rules that are used - /// + /// void rule(rule_type v) { mask_ = v; @@ -742,7 +742,7 @@ namespace boost { /// following part "are you?" /// - bool full_select() const + bool full_select() const { return full_select_; } @@ -760,11 +760,11 @@ namespace boost { /// following part "are you?" /// - void full_select(bool v) + void full_select(bool v) { full_select_ = v; } - + private: friend class boundary_point_index; typedef details::mapping mapping_type; @@ -792,14 +792,14 @@ namespace boost { /// - "Hello! How\n|are you?" /// - "Hello! How\nare you?|" /// - /// However if \ref rule() is set to \ref sentence_term then the selected %boundary points would be: + /// However if \ref rule() is set to \ref sentence_term then the selected %boundary points would be: /// /// - "|Hello! How\nare you?" /// - "Hello! |How\nare you?" /// - "Hello! How\nare you?|" - /// + /// /// Such that a %boundary point defined by a line feed character would be ignored. - /// + /// /// This class allows to find a boundary_point according to the given iterator in range using \ref find() member /// function. /// @@ -857,9 +857,9 @@ namespace boost { /// an object that represents the selected \ref boundary_point "boundary point". /// typedef boundary_point value_type; - + /// - /// Default constructor. + /// Default constructor. /// /// \note /// @@ -870,7 +870,7 @@ namespace boost { boundary_point_index() : mask_(0xFFFFFFFFu) { } - + /// /// Create a segment_index for %boundary analysis \ref boundary_type "type" of the text /// in range [begin,end) using a rule \a mask for locale \a loc. @@ -879,7 +879,7 @@ namespace boost { base_iterator begin, base_iterator end, rule_type mask, - std::locale const &loc=std::locale()) + std::locale const &loc=std::locale()) : map_(type,begin,end,loc), mask_(mask) @@ -892,7 +892,7 @@ namespace boost { boundary_point_index(boundary_type type, base_iterator begin, base_iterator end, - std::locale const &loc=std::locale()) + std::locale const &loc=std::locale()) : map_(type,begin,end,loc), mask_(0xFFFFFFFFu) @@ -968,7 +968,7 @@ namespace boost { /// /// - "|to be", would return %boundary point at "|to be", /// - "t|o be", would point to "to| be" - /// + /// /// Preconditions: the boundary_point_index should have a mapping and \a p should be valid iterator /// to the text in the mapped range. /// @@ -978,17 +978,17 @@ namespace boost { { return iterator(p,&map_,mask_); } - + /// /// Get the mask of rules that are used - /// + /// rule_type rule() const { return mask_; } /// /// Set the mask of rules that are used - /// + /// void rule(rule_type v) { mask_ = v; @@ -1001,8 +1001,8 @@ namespace boost { mapping_type map_; rule_type mask_; }; - - /// \cond INTERNAL + + /// \cond INTERNAL template segment_index::segment_index(boundary_point_index const &other) : map_(other.map_), @@ -1010,7 +1010,7 @@ namespace boost { full_select_(false) { } - + template boundary_point_index::boundary_point_index(segment_index const &other) : map_(other.map_), @@ -1024,7 +1024,7 @@ namespace boost { map_ = other.map_; return *this; } - + template boundary_point_index const &boundary_point_index::operator=(segment_index const &other) { @@ -1032,7 +1032,7 @@ namespace boost { return *this; } /// \endcond - + typedef segment_index ssegment_index; ///< convenience typedef typedef segment_index wssegment_index; ///< convenience typedef #ifdef BOOST_LOCALE_ENABLE_CHAR16_T @@ -1041,7 +1041,7 @@ namespace boost { #ifdef BOOST_LOCALE_ENABLE_CHAR32_T typedef segment_index u32ssegment_index;///< convenience typedef #endif - + typedef segment_index csegment_index; ///< convenience typedef typedef segment_index wcsegment_index; ///< convenience typedef #ifdef BOOST_LOCALE_ENABLE_CHAR16_T @@ -1059,7 +1059,7 @@ namespace boost { #ifdef BOOST_LOCALE_ENABLE_CHAR32_T typedef boundary_point_index u32sboundary_point_index;///< convenience typedef #endif - + typedef boundary_point_index cboundary_point_index; ///< convenience typedef typedef boundary_point_index wcboundary_point_index; ///< convenience typedef #ifdef BOOST_LOCALE_ENABLE_CHAR16_T diff --git a/include/boost/locale/boundary/segment.hpp b/include/boost/locale/boundary/segment.hpp index 44703f1b..8a800165 100644 --- a/include/boost/locale/boundary/segment.hpp +++ b/include/boost/locale/boundary/segment.hpp @@ -54,7 +54,7 @@ namespace boundary { { return compare_text(l.begin(),l.end(),r.begin(),r.end()); } - + template int compare_string(Left const &l,Char const *begin) { @@ -96,14 +96,14 @@ namespace boundary { /// \see /// /// - \ref segment_index - /// - \ref boundary_point - /// - \ref boundary_point_index + /// - \ref boundary_point + /// - \ref boundary_point_index /// template class segment : public std::pair { public: /// - /// The type of the underlying character + /// The type of the underlying character /// typedef typename std::iterator_traits::value_type char_type; /// @@ -157,7 +157,7 @@ namespace boundary { /// /// Get the start of the range /// - IteratorType begin() const + IteratorType begin() const { return this->first; } @@ -177,7 +177,7 @@ namespace boundary { { return std::basic_string(this->first, this->second); } - + /// /// Create a string from the range explicitly /// @@ -234,122 +234,122 @@ namespace boundary { private: rule_type rule_; - + }; - + /// Compare two segments template bool operator==(segment const &l,segment const &r) { - return details::compare_text(l,r) == 0; + return details::compare_text(l,r) == 0; } /// Compare two segments template bool operator!=(segment const &l,segment const &r) { - return details::compare_text(l,r) != 0; + return details::compare_text(l,r) != 0; } /// Compare two segments template bool operator<(segment const &l,segment const &r) { - return details::compare_text(l,r) < 0; + return details::compare_text(l,r) < 0; } /// Compare two segments template bool operator<=(segment const &l,segment const &r) { - return details::compare_text(l,r) <= 0; + return details::compare_text(l,r) <= 0; } /// Compare two segments template bool operator>(segment const &l,segment const &r) { - return details::compare_text(l,r) > 0; + return details::compare_text(l,r) > 0; } /// Compare two segments template bool operator>=(segment const &l,segment const &r) { - return details::compare_text(l,r) >= 0; + return details::compare_text(l,r) >= 0; } /// Compare string and segment template bool operator==(std::basic_string const &l,segment const &r) { - return details::compare_text(l,r) == 0; + return details::compare_text(l,r) == 0; } /// Compare string and segment template bool operator!=(std::basic_string const &l,segment const &r) { - return details::compare_text(l,r) != 0; + return details::compare_text(l,r) != 0; } /// Compare string and segment template bool operator<(std::basic_string const &l,segment const &r) { - return details::compare_text(l,r) < 0; + return details::compare_text(l,r) < 0; } /// Compare string and segment template bool operator<=(std::basic_string const &l,segment const &r) { - return details::compare_text(l,r) <= 0; + return details::compare_text(l,r) <= 0; } /// Compare string and segment template bool operator>(std::basic_string const &l,segment const &r) { - return details::compare_text(l,r) > 0; + return details::compare_text(l,r) > 0; } /// Compare string and segment template bool operator>=(std::basic_string const &l,segment const &r) { - return details::compare_text(l,r) >= 0; + return details::compare_text(l,r) >= 0; } /// Compare string and segment template bool operator==(segment const &l,std::basic_string const &r) { - return details::compare_text(l,r) == 0; + return details::compare_text(l,r) == 0; } /// Compare string and segment template bool operator!=(segment const &l,std::basic_string const &r) { - return details::compare_text(l,r) != 0; + return details::compare_text(l,r) != 0; } /// Compare string and segment template bool operator<(segment const &l,std::basic_string const &r) { - return details::compare_text(l,r) < 0; + return details::compare_text(l,r) < 0; } /// Compare string and segment template bool operator<=(segment const &l,std::basic_string const &r) { - return details::compare_text(l,r) <= 0; + return details::compare_text(l,r) <= 0; } /// Compare string and segment template bool operator>(segment const &l,std::basic_string const &r) { - return details::compare_text(l,r) > 0; + return details::compare_text(l,r) > 0; } /// Compare string and segment template bool operator>=(segment const &l,std::basic_string const &r) { - return details::compare_text(l,r) >= 0; + return details::compare_text(l,r) >= 0; } @@ -357,76 +357,76 @@ namespace boundary { template bool operator==(CharType const *l,segment const &r) { - return details::compare_string(l,r) == 0; + return details::compare_string(l,r) == 0; } /// Compare C string and segment template bool operator!=(CharType const *l,segment const &r) { - return details::compare_string(l,r) != 0; + return details::compare_string(l,r) != 0; } /// Compare C string and segment template bool operator<(CharType const *l,segment const &r) { - return details::compare_string(l,r) < 0; + return details::compare_string(l,r) < 0; } /// Compare C string and segment template bool operator<=(CharType const *l,segment const &r) { - return details::compare_string(l,r) <= 0; + return details::compare_string(l,r) <= 0; } /// Compare C string and segment template bool operator>(CharType const *l,segment const &r) { - return details::compare_string(l,r) > 0; + return details::compare_string(l,r) > 0; } /// Compare C string and segment template bool operator>=(CharType const *l,segment const &r) { - return details::compare_string(l,r) >= 0; + return details::compare_string(l,r) >= 0; } /// Compare C string and segment template bool operator==(segment const &l,CharType const *r) { - return details::compare_string(l,r) == 0; + return details::compare_string(l,r) == 0; } /// Compare C string and segment template bool operator!=(segment const &l,CharType const *r) { - return details::compare_string(l,r) != 0; + return details::compare_string(l,r) != 0; } /// Compare C string and segment template bool operator<(segment const &l,CharType const *r) { - return details::compare_string(l,r) < 0; + return details::compare_string(l,r) < 0; } /// Compare C string and segment template bool operator<=(segment const &l,CharType const *r) { - return details::compare_string(l,r) <= 0; + return details::compare_string(l,r) <= 0; } /// Compare C string and segment template bool operator>(segment const &l,CharType const *r) { - return details::compare_string(l,r) > 0; + return details::compare_string(l,r) > 0; } /// Compare C string and segment template bool operator>=(segment const &l,CharType const *r) { - return details::compare_string(l,r) >= 0; + return details::compare_string(l,r) >= 0; } @@ -442,7 +442,7 @@ namespace boundary { #ifdef BOOST_LOCALE_ENABLE_CHAR32_T typedef segment u32ssegment;///< convenience typedef #endif - + typedef segment csegment; ///< convenience typedef typedef segment wcsegment; ///< convenience typedef #ifdef BOOST_LOCALE_ENABLE_CHAR16_T @@ -454,8 +454,8 @@ namespace boundary { - - + + /// /// Write the segment to the stream character by character /// diff --git a/include/boost/locale/boundary/types.hpp b/include/boost/locale/boundary/types.hpp index cc9cf9b1..01d60c0f 100644 --- a/include/boost/locale/boundary/types.hpp +++ b/include/boost/locale/boundary/types.hpp @@ -20,7 +20,7 @@ namespace boost { namespace locale { - + /// /// \brief This namespase contains all operations required for boundary analysis of text /// @@ -51,13 +51,13 @@ namespace boost { typedef uint32_t rule_type; /// - /// \anchor bl_boundary_word_rules + /// \anchor bl_boundary_word_rules /// \name Flags that describe a type of word selected /// @{ static const rule_type word_none = 0x0000F, ///< Not a word, like white space or punctuation mark word_number = 0x000F0, ///< Word that appear to be a number - word_letter = 0x00F00, ///< Word that contains letters, excluding kana and ideographic characters + word_letter = 0x00F00, ///< Word that contains letters, excluding kana and ideographic characters word_kana = 0x0F000, ///< Word that contains kana characters word_ideo = 0xF0000, ///< Word that contains ideographic characters word_any = 0xFFFF0, ///< Any word including numbers, 0 is special flag, equivalent to 15 @@ -67,24 +67,24 @@ namespace boost { /// @} /// - /// \anchor bl_boundary_line_rules + /// \anchor bl_boundary_line_rules /// \name Flags that describe a type of line break /// @{ - static const rule_type + static const rule_type line_soft = 0x0F, ///< Soft line break: optional but not required line_hard = 0xF0, ///< Hard line break: like break is required (as per CR/LF) line_any = 0xFF, ///< Soft or Hard line break line_mask = 0xFF; ///< Select all types of line breaks - + /// @} - + /// - /// \anchor bl_boundary_sentence_rules + /// \anchor bl_boundary_sentence_rules /// \name Flags that describe a type of sentence break /// /// @{ static const rule_type - sentence_term = 0x0F, ///< \brief The sentence was terminated with a sentence terminator + sentence_term = 0x0F, ///< \brief The sentence was terminated with a sentence terminator /// like ".", "!" possible followed by hard separator like CR, LF, PS sentence_sep = 0xF0, ///< \brief The sentence does not contain terminator like ".", "!" but ended with hard separator /// like CR, LF, PS or end of input. @@ -126,7 +126,7 @@ namespace boost { } // boundary } // locale } // boost - + #ifdef BOOST_MSVC #pragma warning(pop) diff --git a/include/boost/locale/collator.hpp b/include/boost/locale/collator.hpp index a010b67c..9a5d6719 100644 --- a/include/boost/locale/collator.hpp +++ b/include/boost/locale/collator.hpp @@ -22,7 +22,7 @@ namespace locale { class info; /// - /// \defgroup collation Collation + /// \defgroup collation Collation /// /// This module introduces collation related classes /// @@ -45,15 +45,15 @@ namespace locale { identical = 4 ///< identical collation level: include code-point comparison } level_type; }; - + /// - /// \brief Collation facet. + /// \brief Collation facet. /// /// It reimplements standard C++ std::collate, /// allowing usage of std::locale for direct string comparison /// template - class collator : + class collator : public std::collate, public collator_base { @@ -66,7 +66,7 @@ namespace locale { /// Type of string used with this facet /// typedef std::basic_string string_type; - + /// /// Compare two strings in rage [b1,e1), [b2,e2) according using a collation level \a level. Calls do_compare @@ -143,16 +143,16 @@ namespace locale { { return do_transform(level,s.data(),s.data()+s.size()); } - + protected: /// /// constructor of the collator object /// - collator(size_t refs = 0) : std::collate(refs) + collator(size_t refs = 0) : std::collate(refs) { } - + /// /// This function is used to override default collation function that does not take in account collation level. /// Uses primary level @@ -180,17 +180,17 @@ namespace locale { } /// - /// Actual function that performs comparison between the strings. For details see compare member function. Can be overridden. + /// Actual function that performs comparison between the strings. For details see compare member function. Can be overridden. /// virtual int do_compare( level_type level, char_type const *b1,char_type const *e1, char_type const *b2,char_type const *e2) const = 0; /// - /// Actual function that performs transformation. For details see transform member function. Can be overridden. + /// Actual function that performs transformation. For details see transform member function. Can be overridden. /// virtual string_type do_transform(level_type level,char_type const *b,char_type const *e) const = 0; /// - /// Actual function that calculates hash. For details see hash member function. Can be overridden. + /// Actual function that calculates hash. For details see hash member function. Can be overridden. /// virtual long do_hash(level_type level,char_type const *b,char_type const *e) const = 0; @@ -206,7 +206,7 @@ namespace locale { /// \code /// std::map > data; /// \endcode - /// + /// /// Would create a map the keys of which are sorted using secondary collation level /// template @@ -217,8 +217,8 @@ namespace locale { /// Create a comparator class for locale \a l and with collation leval \a level /// /// \note throws std::bad_cast if l does not have \ref collator facet installed - /// - comparator(std::locale const &l=std::locale(),collator_base::level_type level=default_level) : + /// + comparator(std::locale const &l=std::locale(),collator_base::level_type level=default_level) : locale_(l), level_(level) { diff --git a/include/boost/locale/config.hpp b/include/boost/locale/config.hpp index c01ef07d..d0e00f32 100644 --- a/include/boost/locale/config.hpp +++ b/include/boost/locale/config.hpp @@ -21,8 +21,8 @@ #endif // BOOST_LOCALE_DYN_LINK // -// Automatically link to the correct build variant where possible. -// +// Automatically link to the correct build variant where possible. +// #if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_LOCALE_NO_LIB) && !defined(BOOST_LOCALE_SOURCE) // // Set the name of our library, this will get undef'ed by auto_link.hpp diff --git a/include/boost/locale/conversion.hpp b/include/boost/locale/conversion.hpp index cedce209..d06ce66d 100644 --- a/include/boost/locale/conversion.hpp +++ b/include/boost/locale/conversion.hpp @@ -18,15 +18,15 @@ namespace boost { namespace locale { - + /// - /// \defgroup convert Text Conversions + /// \defgroup convert Text Conversions /// /// This module provides various function for string manipulation like Unicode normalization, case conversion etc. /// @{ /// - + /// /// \brief This class provides base flags for text manipulation. It is used as base for converter facet. /// @@ -113,7 +113,7 @@ namespace boost { { } ~converter(); - virtual std::u16string convert(conversion_type how,char16_t const *begin,char16_t const *end,int flags = 0) const = 0; + virtual std::u16string convert(conversion_type how,char16_t const *begin,char16_t const *end,int flags = 0) const = 0; #if defined (__SUNPRO_CC) && defined (_RWSTD_VER) std::locale::id& __get_id (void) const { return id; } #endif @@ -149,16 +149,16 @@ namespace boost { norm_nfkc, ///< Compatibility decomposition followed by canonical composition. norm_default = norm_nfc, ///< Default normalization - canonical decomposition followed by canonical composition } norm_type; - + /// /// Normalize Unicode string \a str according to \ref norm_type "normalization form" \a n /// /// Note: This function receives only Unicode strings, i.e.: UTF-8, UTF-16 or UTF-32. It does not take - /// in account the locale encoding, because Unicode decomposition and composition are meaningless outside + /// in account the locale encoding, because Unicode decomposition and composition are meaningless outside /// of a Unicode character set. /// /// \note throws std::bad_cast if loc does not have \ref converter facet installed - /// + /// template std::basic_string normalize(std::basic_string const &str,norm_type n=norm_default,std::locale const &loc=std::locale()) { @@ -169,11 +169,11 @@ namespace boost { /// Normalize NUL terminated Unicode string \a str according to \ref norm_type "normalization form" \a n /// /// Note: This function receives only Unicode strings, i.e.: UTF-8, UTF-16 or UTF-32. It does not take - /// in account the locale encoding, because Unicode decomposition and composition are meaningless outside + /// in account the locale encoding, because Unicode decomposition and composition are meaningless outside /// of a Unicode character set. - /// + /// /// \note throws std::bad_cast if loc does not have \ref converter facet installed - /// + /// template std::basic_string normalize(CharType const *str,norm_type n=norm_default,std::locale const &loc=std::locale()) { @@ -182,16 +182,16 @@ namespace boost { end++; return std::use_facet >(loc).convert(converter_base::normalization,str,end,n); } - + /// /// Normalize Unicode string in range [begin,end) according to \ref norm_type "normalization form" \a n /// /// Note: This function receives only Unicode strings, i.e.: UTF-8, UTF-16 or UTF-32. It does not take - /// in account the locale encoding, because Unicode decomposition and composition are meaningless outside + /// in account the locale encoding, because Unicode decomposition and composition are meaningless outside /// of a Unicode character set. - /// + /// /// \note throws std::bad_cast if loc does not have \ref converter facet installed - /// + /// template std::basic_string normalize( CharType const *begin, CharType const *end, @@ -202,24 +202,24 @@ namespace boost { } /////////////////////////////////////////////////// - + /// /// Convert a string \a str to upper case according to locale \a loc /// /// \note throws std::bad_cast if loc does not have \ref converter facet installed - /// + /// template std::basic_string to_upper(std::basic_string const &str,std::locale const &loc=std::locale()) { return std::use_facet >(loc).convert(converter_base::upper_case,str.data(),str.data()+str.size()); } - + /// /// Convert a NUL terminated string \a str to upper case according to locale \a loc /// /// \note throws std::bad_cast if loc does not have \ref converter facet installed - /// + /// template std::basic_string to_upper(CharType const *str,std::locale const &loc=std::locale()) { @@ -228,12 +228,12 @@ namespace boost { end++; return std::use_facet >(loc).convert(converter_base::upper_case,str,end); } - + /// /// Convert a string in range [begin,end) to upper case according to locale \a loc /// /// \note throws std::bad_cast if loc does not have \ref converter facet installed - /// + /// template std::basic_string to_upper(CharType const *begin,CharType const *end,std::locale const &loc=std::locale()) { @@ -241,24 +241,24 @@ namespace boost { } /////////////////////////////////////////////////// - + /// /// Convert a string \a str to lower case according to locale \a loc /// /// \note throws std::bad_cast if loc does not have \ref converter facet installed - /// + /// template std::basic_string to_lower(std::basic_string const &str,std::locale const &loc=std::locale()) { return std::use_facet >(loc).convert(converter_base::lower_case,str.data(),str.data()+str.size()); } - + /// /// Convert a NUL terminated string \a str to lower case according to locale \a loc /// /// \note throws std::bad_cast if loc does not have \ref converter facet installed - /// + /// template std::basic_string to_lower(CharType const *str,std::locale const &loc=std::locale()) { @@ -267,36 +267,36 @@ namespace boost { end++; return std::use_facet >(loc).convert(converter_base::lower_case,str,end); } - + /// /// Convert a string in range [begin,end) to lower case according to locale \a loc /// /// \note throws std::bad_cast if loc does not have \ref converter facet installed - /// + /// template std::basic_string to_lower(CharType const *begin,CharType const *end,std::locale const &loc=std::locale()) { return std::use_facet >(loc).convert(converter_base::lower_case,begin,end); } /////////////////////////////////////////////////// - + /// /// Convert a string \a str to title case according to locale \a loc /// /// \note throws std::bad_cast if loc does not have \ref converter facet installed - /// + /// template std::basic_string to_title(std::basic_string const &str,std::locale const &loc=std::locale()) { return std::use_facet >(loc).convert(converter_base::title_case,str.data(),str.data()+str.size()); } - + /// /// Convert a NUL terminated string \a str to title case according to locale \a loc /// /// \note throws std::bad_cast if loc does not have \ref converter facet installed - /// + /// template std::basic_string to_title(CharType const *str,std::locale const &loc=std::locale()) { @@ -305,12 +305,12 @@ namespace boost { end++; return std::use_facet >(loc).convert(converter_base::title_case,str,end); } - + /// /// Convert a string in range [begin,end) to title case according to locale \a loc /// /// \note throws std::bad_cast if loc does not have \ref converter facet installed - /// + /// template std::basic_string to_title(CharType const *begin,CharType const *end,std::locale const &loc=std::locale()) { @@ -318,24 +318,24 @@ namespace boost { } /////////////////////////////////////////////////// - + /// /// Fold case of a string \a str according to locale \a loc /// /// \note throws std::bad_cast if loc does not have \ref converter facet installed - /// + /// template std::basic_string fold_case(std::basic_string const &str,std::locale const &loc=std::locale()) { return std::use_facet >(loc).convert(converter_base::case_folding,str.data(),str.data()+str.size()); } - + /// /// Fold case of a NUL terminated string \a str according to locale \a loc /// /// \note throws std::bad_cast if loc does not have \ref converter facet installed - /// + /// template std::basic_string fold_case(CharType const *str,std::locale const &loc=std::locale()) { @@ -344,12 +344,12 @@ namespace boost { end++; return std::use_facet >(loc).convert(converter_base::case_folding,str,end); } - + /// /// Fold case of a string in range [begin,end) according to locale \a loc /// /// \note throws std::bad_cast if loc does not have \ref converter facet installed - /// + /// template std::basic_string fold_case(CharType const *begin,CharType const *end,std::locale const &loc=std::locale()) { diff --git a/include/boost/locale/date_time.hpp b/include/boost/locale/date_time.hpp index 21c1e8a1..6ae144fe 100644 --- a/include/boost/locale/date_time.hpp +++ b/include/boost/locale/date_time.hpp @@ -24,7 +24,7 @@ namespace boost { namespace locale { /// - /// \defgroup date_time Date, Time, Timezone and Calendar manipulations + /// \defgroup date_time Date, Time, Timezone and Calendar manipulations /// /// This module provides various calendar, timezone and date time services /// @@ -38,7 +38,7 @@ namespace boost { public: /// /// Constructor of date_time_error class - /// + /// date_time_error(std::string const &e) : std::runtime_error(e) {} }; @@ -50,8 +50,8 @@ namespace boost { /// Usually obtained as product of period_type and integer or /// my calling a representative functions /// For example day()*3 == date_time_period(day(),3) == day(3) - /// - struct date_time_period + /// + struct date_time_period { period::period_type type; ///< The type of period, i.e. era, year, day etc. int value; ///< The value the actual number of \a periods @@ -63,7 +63,7 @@ namespace boost { /// Operator -, switches the sign of period /// date_time_period operator-() const { return date_time_period(type,-value); } - + /// /// Constructor that creates date_time_period from period_type \a f and a value \a v -- default 1. /// @@ -109,7 +109,7 @@ namespace boost { /// inline period_type day_of_week(){ return period_type(marks::day_of_week); } /// - /// Get period_type for: Original number of the day of the week in month. For example 1st Sunday, + /// Get period_type for: Original number of the day of the week in month. For example 1st Sunday, /// 2nd Sunday, etc. in Gregorian [1..5] /// inline period_type day_of_week_in_month(){ return period_type(marks::day_of_week_in_month); } @@ -153,27 +153,27 @@ namespace boost { /// /// Get date_time_period for: Era i.e. AC, BC in Gregorian and Julian calendar, range [0,1] /// - inline date_time_period era(int v) { return date_time_period(era(),v); } + inline date_time_period era(int v) { return date_time_period(era(),v); } /// /// Get date_time_period for: Year, it is calendar specific, for example 2011 in Gregorian calendar. /// - inline date_time_period year(int v) { return date_time_period(year(),v); } + inline date_time_period year(int v) { return date_time_period(year(),v); } /// /// Get date_time_period for: Extended year for Gregorian/Julian calendars, where 1 BC == 0, 2 BC == -1. /// - inline date_time_period extended_year(int v) { return date_time_period(extended_year(),v); } + inline date_time_period extended_year(int v) { return date_time_period(extended_year(),v); } /// /// Get date_time_period for: The month of year, calendar specific, in Gregorian [0..11] /// - inline date_time_period month(int v) { return date_time_period(month(),v); } + inline date_time_period month(int v) { return date_time_period(month(),v); } /// /// Get date_time_period for: The day of month, calendar specific, in Gregorian [1..31] /// - inline date_time_period day(int v) { return date_time_period(day(),v); } + inline date_time_period day(int v) { return date_time_period(day(),v); } /// /// Get date_time_period for: The number of day in year, starting from 1, in Gregorian [1..366] /// - inline date_time_period day_of_year(int v) { return date_time_period(day_of_year(),v); } + inline date_time_period day_of_year(int v) { return date_time_period(day_of_year(),v); } /// /// Get date_time_period for: Day of week, Sunday=1, Monday=2,..., Saturday=7. /// @@ -182,48 +182,48 @@ namespace boost { /// the value to Sunday (1) would forward the date by 5 days forward and not backward /// by two days as it could be expected if the numbers were taken as is. /// - inline date_time_period day_of_week(int v) { return date_time_period(day_of_week(),v); } + inline date_time_period day_of_week(int v) { return date_time_period(day_of_week(),v); } /// - /// Get date_time_period for: Original number of the day of the week in month. For example 1st Sunday, + /// Get date_time_period for: Original number of the day of the week in month. For example 1st Sunday, /// 2nd Sunday, etc. in Gregorian [1..5] /// - inline date_time_period day_of_week_in_month(int v) { return date_time_period(day_of_week_in_month(),v); } + inline date_time_period day_of_week_in_month(int v) { return date_time_period(day_of_week_in_month(),v); } /// /// Get date_time_period for: Local day of week, for example in France Monday is 1, in US Sunday is 1, [1..7] /// - inline date_time_period day_of_week_local(int v) { return date_time_period(day_of_week_local(),v); } + inline date_time_period day_of_week_local(int v) { return date_time_period(day_of_week_local(),v); } /// /// Get date_time_period for: 24 clock hour [0..23] /// - inline date_time_period hour(int v) { return date_time_period(hour(),v); } + inline date_time_period hour(int v) { return date_time_period(hour(),v); } /// /// Get date_time_period for: 12 clock hour [0..11] /// - inline date_time_period hour_12(int v) { return date_time_period(hour_12(),v); } + inline date_time_period hour_12(int v) { return date_time_period(hour_12(),v); } /// /// Get date_time_period for: am or pm marker [0..1] /// - inline date_time_period am_pm(int v) { return date_time_period(am_pm(),v); } + inline date_time_period am_pm(int v) { return date_time_period(am_pm(),v); } /// /// Get date_time_period for: minute [0..59] /// - inline date_time_period minute(int v) { return date_time_period(minute(),v); } + inline date_time_period minute(int v) { return date_time_period(minute(),v); } /// /// Get date_time_period for: second [0..59] /// - inline date_time_period second(int v) { return date_time_period(second(),v); } + inline date_time_period second(int v) { return date_time_period(second(),v); } /// /// Get date_time_period for: The week number in the year /// - inline date_time_period week_of_year(int v) { return date_time_period(week_of_year(),v); } + inline date_time_period week_of_year(int v) { return date_time_period(week_of_year(),v); } /// /// Get date_time_period for: The week number within current month /// - inline date_time_period week_of_month(int v) { return date_time_period(week_of_month(),v); } + inline date_time_period week_of_month(int v) { return date_time_period(week_of_month(),v); } /// /// Get date_time_period for: First day of week, constant, for example Sunday in US = 1, Monday in France = 2 /// - inline date_time_period first_day_of_week(int v) { return date_time_period(first_day_of_week(),v); } + inline date_time_period first_day_of_week(int v) { return date_time_period(first_day_of_week(),v); } /// /// Get predefined constant for January @@ -262,7 +262,7 @@ namespace boost { /// inline date_time_period september() { return date_time_period(month(),8); } /// - /// Get predefined constant for October + /// Get predefined constant for October /// inline date_time_period october() { return date_time_period(month(),9); } /// @@ -279,7 +279,7 @@ namespace boost { /// inline date_time_period sunday() { return date_time_period(day_of_week(),1); } /// - /// Get predefined constant for Monday + /// Get predefined constant for Monday /// inline date_time_period monday() { return date_time_period(day_of_week(),2); } /// @@ -314,7 +314,7 @@ namespace boost { /// /// convert period_type to date_time_period(f,1) /// - inline date_time_period operator+(period::period_type f) + inline date_time_period operator+(period::period_type f) { return date_time_period(f); } @@ -327,7 +327,7 @@ namespace boost { } /// - /// Create date_time_period of type \a f with value \a v. + /// Create date_time_period of type \a f with value \a v. /// template date_time_period operator*(period::period_type f,T v) @@ -336,7 +336,7 @@ namespace boost { } /// - /// Create date_time_period of type \a f with value \a v. + /// Create date_time_period of type \a f with value \a v. /// template date_time_period operator*(T v,period::period_type f) @@ -344,7 +344,7 @@ namespace boost { return date_time_period(f,v); } /// - /// Create date_time_period of type \a f with value \a v. + /// Create date_time_period of type \a f with value \a v. /// template date_time_period operator*(T v,date_time_period f) @@ -353,7 +353,7 @@ namespace boost { } /// - /// Create date_time_period of type \a f with value \a v. + /// Create date_time_period of type \a f with value \a v. /// template date_time_period operator*(date_time_period f,T v) @@ -366,14 +366,14 @@ namespace boost { /// - /// \brief this class that represents a set of periods, + /// \brief this class that represents a set of periods, /// /// It is generally created by operations on periods: /// 1995*year + 3*month + 1*day. Note: operations are not commutative. /// class date_time_period_set { public: - + /// /// Default constructor - empty set /// @@ -423,7 +423,7 @@ namespace boost { /// /// Get item at position \a n the set, n should be in range [0,size) /// - date_time_period const &operator[](size_t n) const + date_time_period const &operator[](size_t n) const { if(n >= size()) throw std::out_of_range("Invalid index to date_time_period"); @@ -437,9 +437,9 @@ namespace boost { std::vector periods_; }; - + /// - /// Append two periods sets. Note this operator is not commutative + /// Append two periods sets. Note this operator is not commutative /// inline date_time_period_set operator+(date_time_period_set const &a,date_time_period_set const &b) { @@ -448,7 +448,7 @@ namespace boost { s.add(b[i]); return s; } - + /// /// Append two period sets when all periods of set \b change their sign /// @@ -462,7 +462,7 @@ namespace boost { /// - /// \brief this class provides an access to general calendar information. + /// \brief this class provides an access to general calendar information. /// /// This information is not connected to specific date but generic to locale, and timezone. /// It is used in obtaining general information about calendar and is essential for creation of @@ -473,34 +473,34 @@ namespace boost { /// /// Create calendar taking locale and timezone information from ios_base instance. - /// + /// /// \note throws std::bad_cast if ios does not have a locale with installed \ref calendar_facet /// facet installed - /// + /// calendar(std::ios_base &ios); /// /// Create calendar with locale \a l and time_zone \a zone /// /// \note throws std::bad_cast if loc does not have \ref calendar_facet facet installed - /// + /// calendar(std::locale const &l,std::string const &zone); /// /// Create calendar with locale \a l and default timezone /// /// \note throws std::bad_cast if loc does not have \ref calendar_facet facet installed - /// + /// calendar(std::locale const &l); /// /// Create calendar with default locale and timezone \a zone /// /// \note throws std::bad_cast if global locale does not have \ref calendar_facet facet installed - /// + /// calendar(std::string const &zone); /// - /// Create calendar with default locale and timezone + /// Create calendar with default locale and timezone /// /// \note throws std::bad_cast if global locale does not have \ref calendar_facet facet installed - /// + /// calendar(); ~calendar(); @@ -584,7 +584,7 @@ namespace boost { /// some_time = year * 1995 that sets the year to 1995. /// /// - + class BOOST_LOCALE_DECL date_time { public: @@ -592,7 +592,7 @@ namespace boost { /// Dafault constructor, uses default calendar initialized date_time object to current time. /// /// \note throws std::bad_cast if the global locale does not have \ref calendar_facet facet installed - /// + /// date_time(); /// /// copy date_time @@ -612,7 +612,7 @@ namespace boost { /// Create a date_time object using POSIX time \a time and default calendar /// /// \note throws std::bad_cast if the global locale does not have \ref calendar_facet facet installed - /// + /// date_time(double time); /// /// Create a date_time object using POSIX time \a time and calendar \a cal @@ -622,21 +622,21 @@ namespace boost { /// Create a date_time object using calendar \a cal and initializes it to current time. /// date_time(calendar const &cal); - + /// /// Create a date_time object using default calendar and define values given in \a set /// /// \note throws std::bad_cast if the global locale does not have \ref calendar_facet facet installed - /// + /// date_time(date_time_period_set const &set); /// /// Create a date_time object using calendar \a cal and define values given in \a set /// date_time(date_time_period_set const &set,calendar const &cal); - + /// - /// assign values to various periods in set \a f + /// assign values to various periods in set \a f /// date_time const &operator=(date_time_period_set const &f); @@ -847,7 +847,7 @@ namespace boost { int maximum(period::period_type f) const; /// - /// Check if *this time point is in daylight saving time + /// Check if *this time point is in daylight saving time /// bool is_in_daylight_saving_time() const; @@ -867,18 +867,18 @@ namespace boost { /// \endcode /// /// The output may be Year:5770 Full Date:Jan 1, 2010 - /// + /// template std::basic_ostream &operator<<(std::basic_ostream &out,date_time const &t) { double time_point = t.time(); uint64_t display_flags = ios_info::get(out).display_flags(); if ( - display_flags == flags::date - || display_flags == flags::time - || display_flags == flags::datetime + display_flags == flags::date + || display_flags == flags::time + || display_flags == flags::datetime || display_flags == flags::strftime - ) + ) { out << time_point; } @@ -901,11 +901,11 @@ namespace boost { double v; uint64_t display_flags = ios_info::get(in).display_flags(); if ( - display_flags == flags::date - || display_flags == flags::time - || display_flags == flags::datetime + display_flags == flags::date + || display_flags == flags::time + || display_flags == flags::datetime || display_flags == flags::strftime - ) + ) { in >> v; } @@ -921,7 +921,7 @@ namespace boost { /// /// \brief This class represents a period: a pair of two date_time objects. - /// + /// /// It is generally used as syntactic sugar to calculate difference between two dates. /// /// Note: it stores references to the original objects, so it is not recommended to be used @@ -933,13 +933,13 @@ namespace boost { /// /// Create an object were \a first represents earlier point on time line and \a second is later /// point. - /// + /// date_time_duration(date_time const &first,date_time const &second) : s_(first), e_(second) { } - + /// /// find a difference in terms of period_type \a f /// @@ -978,32 +978,32 @@ namespace boost { return date_time_duration(earlier,later); } - + namespace period { /// /// Extract from date_time numerical value of Era i.e. AC, BC in Gregorian and Julian calendar, range [0,1] /// - inline int era(date_time const &dt) { return dt.get(era()); } + inline int era(date_time const &dt) { return dt.get(era()); } /// /// Extract from date_time numerical value of Year, it is calendar specific, for example 2011 in Gregorian calendar. /// - inline int year(date_time const &dt) { return dt.get(year()); } + inline int year(date_time const &dt) { return dt.get(year()); } /// /// Extract from date_time numerical value of Extended year for Gregorian/Julian calendars, where 1 BC == 0, 2 BC == -1. /// - inline int extended_year(date_time const &dt) { return dt.get(extended_year()); } + inline int extended_year(date_time const &dt) { return dt.get(extended_year()); } /// /// Extract from date_time numerical value of The month of year, calendar specific, in Gregorian [0..11] /// - inline int month(date_time const &dt) { return dt.get(month()); } + inline int month(date_time const &dt) { return dt.get(month()); } /// /// Extract from date_time numerical value of The day of month, calendar specific, in Gregorian [1..31] /// - inline int day(date_time const &dt) { return dt.get(day()); } + inline int day(date_time const &dt) { return dt.get(day()); } /// /// Extract from date_time numerical value of The number of day in year, starting from 1, in Gregorian [1..366] /// - inline int day_of_year(date_time const &dt) { return dt.get(day_of_year()); } + inline int day_of_year(date_time const &dt) { return dt.get(day_of_year()); } /// /// Extract from date_time numerical value of Day of week, Sunday=1, Monday=2,..., Saturday=7. /// @@ -1012,121 +1012,121 @@ namespace boost { /// the value to Sunday (1) would forward the date by 5 days forward and not backward /// by two days as it could be expected if the numbers were taken as is. /// - inline int day_of_week(date_time const &dt) { return dt.get(day_of_week()); } + inline int day_of_week(date_time const &dt) { return dt.get(day_of_week()); } /// - /// Extract from date_time numerical value of Original number of the day of the week in month. For example 1st Sunday, + /// Extract from date_time numerical value of Original number of the day of the week in month. For example 1st Sunday, /// 2nd Sunday, etc. in Gregorian [1..5] /// - inline int day_of_week_in_month(date_time const &dt) { return dt.get(day_of_week_in_month()); } + inline int day_of_week_in_month(date_time const &dt) { return dt.get(day_of_week_in_month()); } /// /// Extract from date_time numerical value of Local day of week, for example in France Monday is 1, in US Sunday is 1, [1..7] /// - inline int day_of_week_local(date_time const &dt) { return dt.get(day_of_week_local()); } + inline int day_of_week_local(date_time const &dt) { return dt.get(day_of_week_local()); } /// /// Extract from date_time numerical value of 24 clock hour [0..23] /// - inline int hour(date_time const &dt) { return dt.get(hour()); } + inline int hour(date_time const &dt) { return dt.get(hour()); } /// /// Extract from date_time numerical value of 12 clock hour [0..11] /// - inline int hour_12(date_time const &dt) { return dt.get(hour_12()); } + inline int hour_12(date_time const &dt) { return dt.get(hour_12()); } /// /// Extract from date_time numerical value of am or pm marker [0..1] /// - inline int am_pm(date_time const &dt) { return dt.get(am_pm()); } + inline int am_pm(date_time const &dt) { return dt.get(am_pm()); } /// /// Extract from date_time numerical value of minute [0..59] /// - inline int minute(date_time const &dt) { return dt.get(minute()); } + inline int minute(date_time const &dt) { return dt.get(minute()); } /// /// Extract from date_time numerical value of second [0..59] /// - inline int second(date_time const &dt) { return dt.get(second()); } + inline int second(date_time const &dt) { return dt.get(second()); } /// /// Extract from date_time numerical value of The week number in the year /// - inline int week_of_year(date_time const &dt) { return dt.get(week_of_year()); } + inline int week_of_year(date_time const &dt) { return dt.get(week_of_year()); } /// /// Extract from date_time numerical value of The week number within current month /// - inline int week_of_month(date_time const &dt) { return dt.get(week_of_month()); } + inline int week_of_month(date_time const &dt) { return dt.get(week_of_month()); } /// /// Extract from date_time numerical value of First day of week, constant, for example Sunday in US = 1, Monday in France = 2 /// - inline int first_day_of_week(date_time const &dt) { return dt.get(first_day_of_week()); } - + inline int first_day_of_week(date_time const &dt) { return dt.get(first_day_of_week()); } + /// /// Extract from date_time_duration numerical value of duration in Era i.e. AC, BC in Gregorian and Julian calendar, range [0,1] /// - inline int era(date_time_duration const &dt) { return dt.get(era()); } + inline int era(date_time_duration const &dt) { return dt.get(era()); } /// /// Extract from date_time_duration numerical value of duration in years /// - inline int year(date_time_duration const &dt) { return dt.get(year()); } + inline int year(date_time_duration const &dt) { return dt.get(year()); } /// /// Extract from date_time_duration numerical value of duration in extended years (for Gregorian/Julian calendars, where 1 BC == 0, 2 BC == -1). /// - inline int extended_year(date_time_duration const &dt) { return dt.get(extended_year()); } + inline int extended_year(date_time_duration const &dt) { return dt.get(extended_year()); } /// /// Extract from date_time_duration numerical value of duration in months /// - inline int month(date_time_duration const &dt) { return dt.get(month()); } + inline int month(date_time_duration const &dt) { return dt.get(month()); } /// /// Extract from date_time_duration numerical value of duration in days of month /// - inline int day(date_time_duration const &dt) { return dt.get(day()); } + inline int day(date_time_duration const &dt) { return dt.get(day()); } /// /// Extract from date_time_duration numerical value of duration in days of year /// - inline int day_of_year(date_time_duration const &dt) { return dt.get(day_of_year()); } + inline int day_of_year(date_time_duration const &dt) { return dt.get(day_of_year()); } /// /// Extract from date_time_duration numerical value of duration in days of week /// - inline int day_of_week(date_time_duration const &dt) { return dt.get(day_of_week()); } + inline int day_of_week(date_time_duration const &dt) { return dt.get(day_of_week()); } /// /// Extract from date_time_duration numerical value of duration in original number of the day of the week in month /// - inline int day_of_week_in_month(date_time_duration const &dt) { return dt.get(day_of_week_in_month()); } + inline int day_of_week_in_month(date_time_duration const &dt) { return dt.get(day_of_week_in_month()); } /// /// Extract from date_time_duration numerical value of duration in local day of week /// - inline int day_of_week_local(date_time_duration const &dt) { return dt.get(day_of_week_local()); } + inline int day_of_week_local(date_time_duration const &dt) { return dt.get(day_of_week_local()); } /// /// Extract from date_time_duration numerical value of duration in hours /// - inline int hour(date_time_duration const &dt) { return dt.get(hour()); } + inline int hour(date_time_duration const &dt) { return dt.get(hour()); } /// /// Extract from date_time_duration numerical value of duration in 12 clock hours /// - inline int hour_12(date_time_duration const &dt) { return dt.get(hour_12()); } + inline int hour_12(date_time_duration const &dt) { return dt.get(hour_12()); } /// /// Extract from date_time_duration numerical value of duration in am or pm markers /// - inline int am_pm(date_time_duration const &dt) { return dt.get(am_pm()); } + inline int am_pm(date_time_duration const &dt) { return dt.get(am_pm()); } /// /// Extract from date_time_duration numerical value of duration in minutes /// - inline int minute(date_time_duration const &dt) { return dt.get(minute()); } + inline int minute(date_time_duration const &dt) { return dt.get(minute()); } /// /// Extract from date_time_duration numerical value of duration in seconds /// - inline int second(date_time_duration const &dt) { return dt.get(second()); } + inline int second(date_time_duration const &dt) { return dt.get(second()); } /// /// Extract from date_time_duration numerical value of duration in the week number in the year /// - inline int week_of_year(date_time_duration const &dt) { return dt.get(week_of_year()); } + inline int week_of_year(date_time_duration const &dt) { return dt.get(week_of_year()); } /// /// Extract from date_time_duration numerical value of duration in The week number within current month /// - inline int week_of_month(date_time_duration const &dt) { return dt.get(week_of_month()); } + inline int week_of_month(date_time_duration const &dt) { return dt.get(week_of_month()); } /// /// Extract from date_time_duration numerical value of duration in the first day of week /// - inline int first_day_of_week(date_time_duration const &dt) { return dt.get(first_day_of_week()); } + inline int first_day_of_week(date_time_duration const &dt) { return dt.get(first_day_of_week()); } } - + /// @} diff --git a/include/boost/locale/date_time_facet.hpp b/include/boost/locale/date_time_facet.hpp index e1f0871c..c432f932 100644 --- a/include/boost/locale/date_time_facet.hpp +++ b/include/boost/locale/date_time_facet.hpp @@ -41,7 +41,7 @@ namespace boost { ///< If first day of week is Monday and the current day is Tuesday then setting ///< the value to Sunday (1) would forward the date by 5 days forward and not backward ///< by two days as it could be expected if the numbers were taken as is. - day_of_week_in_month, ///< Original number of the day of the week in month. For example 1st Sunday, + day_of_week_in_month, ///< Original number of the day of the week in month. For example 1st Sunday, ///< 2nd Sunday, etc. in Gregorian [1..5] day_of_week_local, ///< Local day of week, for example in France Monday is 1, in US Sunday is 1, [1..7] hour, ///< 24 clock hour [0..23] @@ -72,13 +72,13 @@ namespace boost { /// /// Create a period of specific type, default is invalid. /// - period_type(marks::period_mark m = marks::invalid) : mark_(m) + period_type(marks::period_mark m = marks::invalid) : mark_(m) { } - + /// /// Get the value of marks::period_mark it was created with. - /// + /// marks::period_mark mark() const { return mark_; @@ -233,7 +233,7 @@ namespace boost { /// /// Basic constructor /// - calendar_facet(size_t refs = 0) : std::locale::facet(refs) + calendar_facet(size_t refs = 0) : std::locale::facet(refs) { } /// diff --git a/include/boost/locale/encoding.hpp b/include/boost/locale/encoding.hpp index 0d53af5e..4affb843 100644 --- a/include/boost/locale/encoding.hpp +++ b/include/boost/locale/encoding.hpp @@ -46,7 +46,7 @@ namespace boost { /// convert string to UTF string from text in range [begin,end) encoded according to locale \a loc according to policy \a how /// /// \note throws std::bad_cast if the loc does not have \ref info facet installed - /// + /// template std::basic_string to_utf(char const *begin,char const *end,std::locale const &loc,method_type how=default_method) { @@ -57,7 +57,7 @@ namespace boost { /// convert UTF text in range [begin,end) to a text encoded according to locale \a loc according to policy \a how /// /// \note throws std::bad_cast if the loc does not have \ref info facet installed - /// + /// template std::string from_utf(CharType const *begin,CharType const *end,std::locale const &loc,method_type how=default_method) { @@ -67,7 +67,7 @@ namespace boost { /// /// convert a string \a text encoded with \a charset to UTF string /// - + template std::basic_string to_utf(std::string const &text,std::string const &charset,method_type how=default_method) { @@ -90,7 +90,7 @@ namespace boost { std::basic_string to_utf(char const *text,std::string const &charset,method_type how=default_method) { char const *text_end = text; - while(*text_end) + while(*text_end) text_end++; return to_utf(text,text_end,charset,how); } @@ -102,7 +102,7 @@ namespace boost { std::string from_utf(CharType const *text,std::string const &charset,method_type how=default_method) { CharType const *text_end = text; - while(*text_end) + while(*text_end) text_end++; return from_utf(text,text_end,charset,how); } @@ -111,7 +111,7 @@ namespace boost { /// Convert a \a text in locale encoding given by \a loc to UTF /// /// \note throws std::bad_cast if the loc does not have \ref info facet installed - /// + /// template std::basic_string to_utf(std::string const &text,std::locale const &loc,method_type how=default_method) { @@ -122,7 +122,7 @@ namespace boost { /// Convert a \a text in UTF to locale encoding given by \a loc /// /// \note throws std::bad_cast if the loc does not have \ref info facet installed - /// + /// template std::string from_utf(std::basic_string const &text,std::locale const &loc,method_type how=default_method) { @@ -133,12 +133,12 @@ namespace boost { /// Convert a \a text in locale encoding given by \a loc to UTF /// /// \note throws std::bad_cast if the loc does not have \ref info facet installed - /// + /// template std::basic_string to_utf(char const *text,std::locale const &loc,method_type how=default_method) { char const *text_end = text; - while(*text_end) + while(*text_end) text_end++; return to_utf(text,text_end,loc,how); } @@ -147,12 +147,12 @@ namespace boost { /// Convert a \a text in UTF to locale encoding given by \a loc /// /// \note throws std::bad_cast if the loc does not have \ref info facet installed - /// + /// template std::string from_utf(CharType const *text,std::locale const &loc,method_type how=default_method) { CharType const *text_end = text; - while(*text_end) + while(*text_end) text_end++; return from_utf(text,text_end,loc,how); } @@ -161,7 +161,7 @@ namespace boost { /// /// Convert a text in range [begin,end) to \a to_encoding from \a from_encoding /// - + BOOST_LOCALE_DECL std::string between(char const *begin, char const *end, @@ -172,7 +172,7 @@ namespace boost { /// /// Convert a \a text to \a to_encoding from \a from_encoding /// - + inline std::string between(char const *text, std::string const &to_encoding, @@ -196,7 +196,7 @@ namespace boost { { return boost::locale::conv::between(text.c_str(),text.c_str()+text.size(),to_encoding,from_encoding,how); } - + /// \cond INTERNAL template<> diff --git a/include/boost/locale/encoding_errors.hpp b/include/boost/locale/encoding_errors.hpp index 9e08cffa..e9d8679a 100644 --- a/include/boost/locale/encoding_errors.hpp +++ b/include/boost/locale/encoding_errors.hpp @@ -20,7 +20,7 @@ namespace boost { namespace locale { namespace conv { /// - /// \addtogroup codepage + /// \addtogroup codepage /// /// @{ @@ -31,7 +31,7 @@ namespace boost { public: conversion_error() : std::runtime_error("Conversion failed") {} }; - + /// /// \brief This exception is thrown in case of use of unsupported /// or invalid character set @@ -40,12 +40,12 @@ namespace boost { public: /// Create an error for charset \a charset - invalid_charset_error(std::string charset) : + invalid_charset_error(std::string charset) : std::runtime_error("Invalid or unsupported charset:" + charset) { } }; - + /// /// enum that defines conversion policy diff --git a/include/boost/locale/format.hpp b/include/boost/locale/format.hpp index 15ec4bd5..a994fa6d 100644 --- a/include/boost/locale/format.hpp +++ b/include/boost/locale/format.hpp @@ -22,7 +22,7 @@ namespace boost { namespace locale { - + /// /// \defgroup format Format /// @@ -44,7 +44,7 @@ namespace boost { writer_(&formattible::void_write) { } - + formattible(formattible const &other) : pointer_(other.pointer_), writer_(other.writer_) @@ -59,7 +59,7 @@ namespace boost { } return *this; } - + template formattible(Type const &value) { @@ -92,18 +92,18 @@ namespace boost { { output << *static_cast(ptr); } - + void const *pointer_; writer_type writer_; }; // formattible - + class BOOST_LOCALE_DECL format_parser { public: format_parser(std::ios_base &ios,void *,void (*imbuer)(void *,std::locale const &)); ~format_parser(); - + unsigned get_position(); - + void set_one_flag(std::string const &key,std::string const &value); template @@ -149,7 +149,7 @@ namespace boost { /// /// For example: /// - /// \code + /// \code /// cout << format("The height of water at {1,time} is {2,num=fixed,precision=3}") % time % height; /// \endcode /// @@ -161,10 +161,10 @@ namespace boost { /// - \c oct -- display in octal format /// - \c sci or \c scientific -- display in scientific format /// - \c fix or \c fixed -- display in fixed format - /// . + /// . /// For example \c number=sci /// - \c cur or \c currency -- format currency. Optional values are: - /// + /// /// - \c iso -- display using ISO currency symbol. /// - \c nat or \c national -- display using national currency symbol. /// . @@ -196,28 +196,28 @@ namespace boost { /// \code /// cout << format("Local time is: {1,time,local}, universal time is {1,time,gmt}") % time; /// \endcode - /// - /// + /// + /// /// Invalid formatting strings are slightly ignored. This would prevent from translator /// to crash the program in unexpected location. - /// + /// template class basic_format { public: typedef CharType char_type; ///< Underlying character type typedef basic_message message_type; ///< The translation message type /// \cond INTERNAL - typedef details::formattible formattible_type; - /// \endcond + typedef details::formattible formattible_type; + /// \endcond typedef std::basic_string string_type; ///< string type for this type of character typedef std::basic_ostream stream_type; ///< output stream type for this type of character - + /// /// Create a format class for \a format_string /// - basic_format(string_type format_string) : + basic_format(string_type format_string) : format_(format_string), translate_(false), parameters_count_(0) @@ -227,7 +227,7 @@ namespace boost { /// Create a format class using message \a trans. The message if translated first according /// to the rules of target locale and then interpreted as format string /// - basic_format(message_type const &trans) : + basic_format(message_type const &trans) : message_(trans), translate_(true), parameters_count_(0) @@ -266,17 +266,17 @@ namespace boost { format = message_.str(out.getloc(),ios_info::get(out).domain_id()); else format = format_; - + format_output(out,format); } - - + + private: class format_guard { public: - format_guard(details::format_parser &fmt) : + format_guard(details::format_parser &fmt) : fmt_(&fmt), restored_(false) { @@ -300,7 +300,7 @@ namespace boost { details::format_parser *fmt_; bool restored_; }; - + void format_output(stream_type &out,string_type const &sformat) const { char_type obrk='{'; @@ -331,12 +331,12 @@ namespace boost { continue; } pos++; - + details::format_parser fmt(out,static_cast(&out),&basic_format::imbue_locale); format_guard guard(fmt); - while(pos < size) { + while(pos < size) { std::string key; std::string svalue; string_type value; @@ -384,9 +384,9 @@ namespace boost { if(use_svalue) { fmt.set_one_flag(key,svalue); } - else + else fmt.set_flag_with_str(key,value); - + if(format[pos]==comma) { pos++; continue; @@ -398,7 +398,7 @@ namespace boost { pos++; break; } - else { + else { guard.restore(); break; } @@ -406,9 +406,9 @@ namespace boost { } } - + // - // Non-copyable + // Non-copyable // basic_format(basic_format const &other); void operator=(basic_format const &other); @@ -417,7 +417,7 @@ namespace boost { { if(parameters_count_ >= base_params_) ext_params_.push_back(param); - else + else parameters_[parameters_count_] = param; parameters_count_++; } @@ -440,7 +440,7 @@ namespace boost { static unsigned const base_params_ = 8; - + message_type message_; string_type format_; bool translate_; diff --git a/include/boost/locale/formatting.hpp b/include/boost/locale/formatting.hpp index aa46db2f..bf74b01c 100644 --- a/include/boost/locale/formatting.hpp +++ b/include/boost/locale/formatting.hpp @@ -87,7 +87,7 @@ namespace boost { domain_id ///< Domain code - for message formatting } value_type; - + } // flags /// @@ -117,37 +117,37 @@ namespace boost { /// Set a flags that define a way for format data like number, spell, currency etc. /// void display_flags(uint64_t flags); - + /// /// Set a flags that define how to format currency /// void currency_flags(uint64_t flags); - + /// /// Set a flags that define how to format date /// void date_flags(uint64_t flags); - + /// /// Set a flags that define how to format time /// void time_flags(uint64_t flags); - + /// /// Set a flags that define how to format both date and time /// void datetime_flags(uint64_t flags); - + /// /// Set special message domain identification /// void domain_id(int); - + /// /// Set time zone for formatting dates and time /// void time_zone(std::string const &); - + /// /// Set date/time pattern (strftime like) @@ -164,18 +164,18 @@ namespace boost { /// Get a flags that define a way for format data like number, spell, currency etc. /// uint64_t display_flags() const; - + /// /// Get a flags that define how to format currency /// uint64_t currency_flags() const; - + /// /// Get a flags that define how to format date /// uint64_t date_flags() const; - + /// /// Get a flags that define how to format time /// @@ -185,17 +185,17 @@ namespace boost { /// Get a flags that define how to format both date and time /// uint64_t datetime_flags() const; - + /// /// Get special message domain identification /// int domain_id() const; - + /// /// Get time zone for formatting dates and time /// std::string time_zone() const; - + /// /// Get date/time pattern (strftime like) /// @@ -205,26 +205,26 @@ namespace boost { string_set const &s = date_time_pattern_set(); return s.get(); } - + /// \cond INTERNAL void on_imbue(); /// \endcond - + private: class string_set; string_set const &date_time_pattern_set() const; string_set &date_time_pattern_set(); - + class BOOST_LOCALE_DECL string_set { public: - string_set(); + string_set(); ~string_set(); string_set(string_set const &other); string_set const &operator=(string_set const &other); void swap(string_set &other); - + template void set(Char const *s) { @@ -279,7 +279,7 @@ namespace boost { /// Format values with "POSIX" or "C" locale. Note, if locale was created with additional non-classic locale then /// These numbers may be localized /// - + inline std::ios_base & posix(std::ios_base & ios) { ios_info::get(ios).display_flags(flags::posix); @@ -295,7 +295,7 @@ namespace boost { ios_info::get(ios).display_flags(flags::number); return ios; } - + /// /// Format currency, number is treated like amount of money /// @@ -304,7 +304,7 @@ namespace boost { ios_info::get(ios).display_flags(flags::currency); return ios; } - + /// /// Format percent, value 0.3 is treated as 30%. /// @@ -313,7 +313,7 @@ namespace boost { ios_info::get(ios).display_flags(flags::percent); return ios; } - + /// /// Format a date, number is treated as POSIX time /// @@ -350,7 +350,7 @@ namespace boost { ios_info::get(ios).display_flags(flags::strftime); return ios; } - + /// /// Spell the number, like "one hundred and ten" /// @@ -359,7 +359,7 @@ namespace boost { ios_info::get(ios).display_flags(flags::spellout); return ios; } - + /// /// Write an order of the number like 4th. /// @@ -484,10 +484,10 @@ namespace boost { { ios_info::get(ios).date_flags(flags::date_full); return ios; - } - - - /// \cond INTERNAL + } + + + /// \cond INTERNAL namespace details { template struct add_ftime { @@ -508,7 +508,7 @@ namespace boost { fmt.apply(out); return out; } - + template std::basic_istream &operator>>(std::basic_istream &in,add_ftime const &fmt) { @@ -517,7 +517,7 @@ namespace boost { } } - /// \endcond + /// \endcond /// /// Set strftime like formatting string @@ -559,7 +559,7 @@ namespace boost { #ifdef BOOST_LOCALE_DOXYGEN unspecified_type #else - details::add_ftime + details::add_ftime #endif ftime(std::basic_string const &format) { @@ -575,7 +575,7 @@ namespace boost { #ifdef BOOST_LOCALE_DOXYGEN unspecified_type #else - details::add_ftime + details::add_ftime #endif ftime(CharType const *format) { @@ -595,7 +595,7 @@ namespace boost { ios_info::get(out).time_zone(fmt.id); return out; } - + template std::basic_istream &operator>>(std::basic_istream &in,set_timezone const &fmt) { @@ -604,10 +604,10 @@ namespace boost { } } /// \endcond - + /// /// Set GMT time zone to stream - /// + /// inline std::ios_base &gmt(std::ios_base &ios) { ios_info::get(ios).time_zone("GMT"); @@ -626,13 +626,13 @@ namespace boost { /// /// Set time zone using \a id /// - inline + inline #ifdef BOOST_LOCALE_DOXYGEN unspecified_type #else - details::set_timezone + details::set_timezone #endif - time_zone(char const *id) + time_zone(char const *id) { details::set_timezone tz; tz.id=id; @@ -642,13 +642,13 @@ namespace boost { /// /// Set time zone using \a id /// - inline + inline #ifdef BOOST_LOCALE_DOXYGEN unspecified_type #else - details::set_timezone - #endif - time_zone(std::string const &id) + details::set_timezone + #endif + time_zone(std::string const &id) { details::set_timezone tz; tz.id=id; @@ -661,7 +661,7 @@ namespace boost { /// } // as manipulators - + } // locale } // boost diff --git a/include/boost/locale/generator.hpp b/include/boost/locale/generator.hpp index ea23571a..7a7d3efe 100644 --- a/include/boost/locale/generator.hpp +++ b/include/boost/locale/generator.hpp @@ -22,7 +22,7 @@ namespace boost { /// - /// \brief This is the main namespace that encloses all localization classes + /// \brief This is the main namespace that encloses all localization classes /// namespace locale { @@ -38,7 +38,7 @@ namespace boost { static const uint32_t character_first_facet = char_facet; ///< First facet specific for character type static const uint32_t character_last_facet = char32_t_facet; ///< Last facet specific for character type static const uint32_t all_characters = 0xFFFF; ///< Special mask -- generate all - + typedef uint32_t character_facet_type; /// -/// class latin1_codecvt :boost::locale::generic_codecvt > +/// class latin1_codecvt :boost::locale::generic_codecvt > /// { /// public: -/// -/// /* Standard codecvt constructor */ -/// latin1_codecvt(size_t refs = 0) : boost::locale::generic_codecvt >(refs) +/// +/// /* Standard codecvt constructor */ +/// latin1_codecvt(size_t refs = 0) : boost::locale::generic_codecvt >(refs) /// { /// } /// @@ -75,7 +75,7 @@ class generic_codecvt_base { /// { /// return state_type(); /// } -/// +/// /// int max_encoding_length() const /// { /// return 1; @@ -85,7 +85,7 @@ class generic_codecvt_base { /// { /// if(begin == end) /// return boost::locale::utf::incomplete; -/// return *begin++; +/// return *begin++; /// } /// /// boost::locale::utf::code_point from_unicode(state_type &,boost::locale::utf::code_point u,char *begin,char const *end) const @@ -95,23 +95,23 @@ class generic_codecvt_base { /// if(begin == end) /// return boost::locale::utf::incomplete; /// *begin = u; -/// return 1; +/// return 1; /// } /// }; -/// +/// /// \endcode -/// +/// /// When external tools used for encoding conversion, the `state_type` is useful to save objects used for conversions. For example, /// icu::UConverter can be saved in such a state for an efficient use: /// /// \code /// template -/// class icu_codecvt :boost::locale::generic_codecvt > +/// class icu_codecvt :boost::locale::generic_codecvt > /// { /// public: -/// -/// /* Standard codecvt constructor */ -/// icu_codecvt(std::string const &name,refs = 0) : +/// +/// /* Standard codecvt constructor */ +/// icu_codecvt(std::string const &name,refs = 0) : /// boost::locale::generic_codecvt >(refs) /// { ... } /// @@ -124,7 +124,7 @@ class generic_codecvt_base { /// state_type ptr(ucnv_safeClone(converter_,0,0,&err,ucnv_close); /// return std::move(ptr); /// } -/// +/// /// boost::locale::utf::code_point to_unicode(state_type &ptr,char const *&begin,char const *end) const /// { /// UErrorCode err = U_ZERO_ERROR; @@ -154,7 +154,7 @@ class generic_codecvt : public std::codecvt(refs) { } @@ -169,9 +169,9 @@ class generic_codecvt : public std::codecvt(&s); -#ifdef DEBUG_CODECVT +#ifdef DEBUG_CODECVT std::cout << "Entering unshift " << std::hex << state << std::dec << std::endl; -#endif +#endif if(state != 0) return std::codecvt_base::error; next=from; @@ -191,9 +191,9 @@ class generic_codecvt : public std::codecvt : public std::codecvt(from - save_from); @@ -234,7 +234,7 @@ class generic_codecvt : public std::codecvt : public std::codecvt : public std::codecvt : public std::codecvt : public std::codecvt : public std::codecvt : public std::codecvt : public std::codecvt : public std::codecvt : public std::codecvt(refs) { } - + CodecvtImpl const &implementation() const { return *static_cast(this); } - + protected: std::codecvt_base::result do_unshift(std::mbstate_t &/*s*/,char *from,char * /*to*/,char *&next) const BOOST_OVERRIDE @@ -482,16 +482,16 @@ class generic_codecvt : public std::codecvt : public std::codecvt : public std::codecvt : public std::codecvt : public std::codecvt : public std::codecvt : public std::codecvt : public std::codecvt : public std::codecvt domains_type; ///< Type that defines a list of domains that are loaded ///< The first one is the default one domains_type domains; ///< Message domains - application name, like my_app. So files named my_app.mo ///< would be loaded std::vector paths; ///< Paths to search files in. Under MS Windows it uses encoding ///< parameter to convert them to wide OS specific paths. - + /// /// The callback for custom file system support. This callback should read the file named \a file_name /// encoded in \a encoding character set into std::vector and return it. @@ -116,13 +116,13 @@ namespace gnu_gettext { std::vector( std::string const &file_name, std::string const &encoding - ) + ) > callback_type; /// /// The callback for handling custom file systems, if it is empty, the real OS file-system /// is being used. - /// + /// callback_type callback; }; @@ -136,10 +136,10 @@ namespace gnu_gettext { message_format *create_messages_facet(messages_info const &info); /// \cond INTERNAL - + template<> BOOST_LOCALE_DECL message_format *create_messages_facet(messages_info const &info); - + template<> BOOST_LOCALE_DECL message_format *create_messages_facet(messages_info const &info); @@ -147,7 +147,7 @@ namespace gnu_gettext { template<> BOOST_LOCALE_DECL message_format *create_messages_facet(messages_info const &info); #endif - + #ifdef BOOST_LOCALE_ENABLE_CHAR32_T template<> BOOST_LOCALE_DECL message_format *create_messages_facet(messages_info const &info); diff --git a/include/boost/locale/hold_ptr.hpp b/include/boost/locale/hold_ptr.hpp index e1dc8fb4..98147317 100644 --- a/include/boost/locale/hold_ptr.hpp +++ b/include/boost/locale/hold_ptr.hpp @@ -10,7 +10,7 @@ #include -namespace boost { +namespace boost { namespace locale { /// /// \brief a smart pointer similar to std::auto_ptr but it is non-copyable and the @@ -18,7 +18,7 @@ namespace locale { /// template class hold_ptr { - hold_ptr(hold_ptr const &other); // non copyable + hold_ptr(hold_ptr const &other); // non copyable hold_ptr const &operator=(hold_ptr const &other); // non assignable public: /// @@ -33,7 +33,7 @@ namespace locale { /// /// Destroy smart pointer and the object it owns. /// - ~hold_ptr() + ~hold_ptr() { delete ptr_; } @@ -43,15 +43,15 @@ namespace locale { /// T const *get() const { return ptr_; } /// - /// Get a mutable pointer to the object + /// Get a mutable pointer to the object /// T *get() { return ptr_; } - /// + /// /// Get a const reference to the object /// T const &operator *() const { return *ptr_; } - /// + /// /// Get a mutable reference to the object /// T &operator *() { return *ptr_; } @@ -60,7 +60,7 @@ namespace locale { /// T const *operator->() const { return ptr_; } /// - /// Get a mutable pointer to the object + /// Get a mutable pointer to the object /// T *operator->() { return ptr_; } diff --git a/include/boost/locale/info.hpp b/include/boost/locale/info.hpp index 70eb200f..65d20001 100644 --- a/include/boost/locale/info.hpp +++ b/include/boost/locale/info.hpp @@ -30,7 +30,7 @@ namespace boost { public: ~info(); - static std::locale::id id; ///< This member uniquely defines this facet, required by STL + static std::locale::id id; ///< This member uniquely defines this facet, required by STL /// /// String information about the locale @@ -50,17 +50,17 @@ namespace boost { utf8_property ///< Non zero value if uses UTF-8 encoding }; - + /// /// Standard facet's constructor - /// + /// info(size_t refs = 0) : std::locale::facet(refs) { } /// /// Get language name /// - std::string language() const + std::string language() const { return get_string_property(language_property); } @@ -101,7 +101,7 @@ namespace boost { { return get_integer_property(utf8_property) != 0; } - + #if defined (__SUNPRO_CC) && defined (_RWSTD_VER) std::locale::id& __get_id (void) const { return id; } #endif diff --git a/include/boost/locale/localization_backend.hpp b/include/boost/locale/localization_backend.hpp index 2a0d976e..e8c0def2 100644 --- a/include/boost/locale/localization_backend.hpp +++ b/include/boost/locale/localization_backend.hpp @@ -26,7 +26,7 @@ namespace boost { /// /// \brief this class represents a localization backend that can be used for localizing your application. - /// + /// /// Backends are usually registered inside the localization backends manager and allow transparent support /// of different backends, so a user can switch the backend by simply linking the application to the correct one. /// @@ -38,18 +38,18 @@ namespace boost { /// by default /// -# \c message_path - path to the location of message catalogs (vector of strings) /// -# \c message_application - the name of applications that use message catalogs (vector of strings) - /// + /// /// Each backend can be installed with a different default priotiry so when you work with two different backends, you /// can specify priotiry so this backend will be chosen according to their priority. /// - + class localization_backend { localization_backend(localization_backend const &); void operator=(localization_backend const &); public: localization_backend() {} - + virtual ~localization_backend() {} /// @@ -68,11 +68,11 @@ namespace boost { virtual void clear_options() = 0; /// - /// Create a facet for category \a category and character type \a type + /// Create a facet for category \a category and character type \a type /// virtual std::locale install(std::locale const &base,locale_category_type category,character_facet_type type = nochar_facet) = 0; - }; // localization_backend + }; // localization_backend /// @@ -83,15 +83,15 @@ namespace boost { class BOOST_LOCALE_DECL localization_backend_manager { public: /// - /// New empty localization_backend_manager + /// New empty localization_backend_manager /// localization_backend_manager(); /// - /// Copy localization_backend_manager + /// Copy localization_backend_manager /// localization_backend_manager(localization_backend_manager const &); /// - /// Assign localization_backend_manager + /// Assign localization_backend_manager /// localization_backend_manager const &operator=(localization_backend_manager const &); @@ -143,29 +143,29 @@ namespace boost { /// Clear backend /// void remove_all_backends(); - + /// /// Get list of all available backends /// std::vector get_all_backends() const; - + /// /// Select specific backend by name for a category \a category. It allows combining different /// backends for user preferences. /// void select(std::string const &backend_name,locale_category_type category = all_categories); - + /// /// Set new global backend manager, the old one is returned. /// /// This function is thread safe - /// + /// static localization_backend_manager global(localization_backend_manager const &); /// /// Get global backend manager /// /// This function is thread safe - /// + /// static localization_backend_manager global(); private: class impl; @@ -181,5 +181,5 @@ namespace boost { #endif #endif -// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 +// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/include/boost/locale/message.hpp b/include/boost/locale/message.hpp index dbf96934..bfe294d0 100644 --- a/include/boost/locale/message.hpp +++ b/include/boost/locale/message.hpp @@ -30,14 +30,14 @@ namespace boost { namespace locale { /// - /// \defgroup message Message Formatting (translation) + /// \defgroup message Message Formatting (translation) /// ///This module provides message translation functionality, i.e. allow your application to speak native language /// /// @{ - /// + /// - /// \cond INTERNAL + /// \cond INTERNAL template struct base_message_format; @@ -76,12 +76,12 @@ namespace boost { /// If \a context is NULL it is not considered to be a part of the key /// /// If a translated string is found, it is returned, otherwise NULL is returned - /// + /// /// virtual char_type const *get(int domain_id,char_type const *context,char_type const *id) const = 0; /// /// This function returns a pointer to the string for a plural message defined by a \a context - /// and identification string \a single_id. + /// and identification string \a single_id. /// /// If \a context is NULL it is not considered to be a part of the key /// @@ -90,7 +90,7 @@ namespace boost { /// number. /// /// If a translated string is found, it is returned, otherwise NULL is returned - /// + /// /// virtual char_type const *get(int domain_id,char_type const *context,char_type const *single_id,int n) const = 0; @@ -115,14 +115,14 @@ namespace boost { protected: virtual ~message_format() {} }; - + /// \cond INTERNAL namespace details { inline bool is_us_ascii_char(char c) { // works for null terminated strings regardless char "signness" - return 0 @@ -177,7 +177,7 @@ namespace boost { /// /// Create default empty message - /// + /// basic_message() : n_(0), c_id_(0), @@ -189,7 +189,7 @@ namespace boost { /// /// Create a simple message from 0 terminated string. The string should exist /// until the message is destroyed. Generally useful with static constant strings - /// + /// explicit basic_message(char_type const *id) : n_(0), c_id_(id), @@ -203,7 +203,7 @@ namespace boost { /// until the message is destroyed. Generally useful with static constant strings. /// /// \a n is the number, \a single and \a plural are singular and plural forms of the message - /// + /// explicit basic_message(char_type const *single,char_type const *plural,int n) : n_(n), c_id_(single), @@ -216,7 +216,7 @@ namespace boost { /// Create a simple message from 0 terminated strings, with context /// information. The string should exist /// until the message is destroyed. Generally useful with static constant strings - /// + /// explicit basic_message(char_type const *context,char_type const *id) : n_(0), c_id_(id), @@ -230,7 +230,7 @@ namespace boost { /// until the message is destroyed. Generally useful with static constant strings. /// /// \a n is the number, \a single and \a plural are singular and plural forms of the message - /// + /// explicit basic_message(char_type const *context,char_type const *single,char_type const *plural,int n) : n_(n), c_id_(single), @@ -256,7 +256,7 @@ namespace boost { /// Create a simple plural form message from strings. /// /// \a n is the number, \a single and \a plural are single and plural forms of the message - /// + /// explicit basic_message(string_type const &single,string_type const &plural,int number) : n_(number), c_id_(0), @@ -284,7 +284,7 @@ namespace boost { /// Create a simple plural form message from strings. /// /// \a n is the number, \a single and \a plural are single and plural forms of the message - /// + /// explicit basic_message(string_type const &context,string_type const &single,string_type const &plural,int number) : n_(number), c_id_(0), @@ -355,7 +355,7 @@ namespace boost { std::locale loc; return str(loc,0); } - + /// /// Translate message to a string in the locale \a locale, using default domain /// @@ -363,10 +363,10 @@ namespace boost { { return str(locale,0); } - + /// /// Translate message to a string using locale \a locale and message domain \a domain_id - /// + /// string_type str(std::locale const &locale,std::string const &domain_id) const { int id=0; @@ -377,7 +377,7 @@ namespace boost { /// /// Translate message to a string using the default locale and message domain \a domain_id - /// + /// string_type str(std::string const &domain_id) const { int id=0; @@ -387,13 +387,13 @@ namespace boost { return str(loc,id); } - + /// /// Translate message to a string using locale \a loc and message domain index \a id - /// + /// string_type str(std::locale const &loc,int id) const { - string_type buffer; + string_type buffer; char_type const *ptr = write(loc,id,buffer); if(ptr == buffer.c_str()) return buffer; @@ -404,7 +404,7 @@ namespace boost { /// - /// Translate message and write to stream \a out, using imbued locale and domain set to the + /// Translate message and write to stream \a out, using imbued locale and domain set to the /// stream /// void write(std::basic_ostream &out) const @@ -437,7 +437,7 @@ namespace boost { { return c_id_ ? c_id_ : id_.c_str(); } - + char_type const *write(std::locale const &loc,int domain_id,string_type &buffer) const { char_type const *translated = 0; @@ -446,15 +446,15 @@ namespace boost { char_type const *id = this->id(); char_type const *context = this->context(); char_type const *plural = this->plural(); - + if(*id == 0) return empty_string; - + facet_type const *facet = 0; if(std::has_facet(loc)) facet = &std::use_facet(loc); - if(facet) { + if(facet) { if(!plural) { translated = facet->get(domain_id,context,id); } @@ -524,7 +524,7 @@ namespace boost { /// @{ /// - /// \brief Translate a message, \a msg is not copied + /// \brief Translate a message, \a msg is not copied /// template inline basic_message translate(CharType const *msg) @@ -532,7 +532,7 @@ namespace boost { return basic_message(msg); } /// - /// \brief Translate a message in context, \a msg and \a context are not copied + /// \brief Translate a message in context, \a msg and \a context are not copied /// template inline basic_message translate( CharType const *context, @@ -541,7 +541,7 @@ namespace boost { return basic_message(context,msg); } /// - /// \brief Translate a plural message form, \a single and \a plural are not copied + /// \brief Translate a plural message form, \a single and \a plural are not copied /// template inline basic_message translate( CharType const *single, @@ -551,7 +551,7 @@ namespace boost { return basic_message(single,plural,n); } /// - /// \brief Translate a plural message from in constext, \a context, \a single and \a plural are not copied + /// \brief Translate a plural message from in constext, \a context, \a single and \a plural are not copied /// template inline basic_message translate( CharType const *context, @@ -561,18 +561,18 @@ namespace boost { { return basic_message(context,single,plural,n); } - + /// - /// \brief Translate a message, \a msg is copied + /// \brief Translate a message, \a msg is copied /// template inline basic_message translate(std::basic_string const &msg) { return basic_message(msg); } - + /// - /// \brief Translate a message in context,\a context and \a msg is copied + /// \brief Translate a message in context,\a context and \a msg is copied /// template inline basic_message translate( std::basic_string const &context, @@ -581,7 +581,7 @@ namespace boost { return basic_message(context,msg); } /// - /// \brief Translate a plural message form in constext, \a context, \a single and \a plural are copied + /// \brief Translate a plural message form in constext, \a context, \a single and \a plural are copied /// template inline basic_message translate( std::basic_string const &context, @@ -593,7 +593,7 @@ namespace boost { } /// - /// \brief Translate a plural message form, \a single and \a plural are copied + /// \brief Translate a plural message form, \a single and \a plural are copied /// template @@ -606,8 +606,8 @@ namespace boost { /// @} - /// - /// \anchor boost_locale_gettext_family \name Direct message translation functions family + /// + /// \anchor boost_locale_gettext_family \name Direct message translation functions family /// /// @@ -705,7 +705,7 @@ namespace boost { /// template<> - struct BOOST_LOCALE_DECL base_message_format : public std::locale::facet + struct BOOST_LOCALE_DECL base_message_format : public std::locale::facet { base_message_format(size_t refs = 0) : std::locale::facet(refs) { @@ -714,7 +714,7 @@ namespace boost { }; template<> - struct BOOST_LOCALE_DECL base_message_format : public std::locale::facet + struct BOOST_LOCALE_DECL base_message_format : public std::locale::facet { base_message_format(size_t refs = 0) : std::locale::facet(refs) { @@ -725,7 +725,7 @@ namespace boost { #ifdef BOOST_LOCALE_ENABLE_CHAR16_T template<> - struct BOOST_LOCALE_DECL base_message_format : public std::locale::facet + struct BOOST_LOCALE_DECL base_message_format : public std::locale::facet { base_message_format(size_t refs = 0) : std::locale::facet(refs) { @@ -738,7 +738,7 @@ namespace boost { #ifdef BOOST_LOCALE_ENABLE_CHAR32_T template<> - struct BOOST_LOCALE_DECL base_message_format : public std::locale::facet + struct BOOST_LOCALE_DECL base_message_format : public std::locale::facet { base_message_format(size_t refs = 0) : std::locale::facet(refs) { @@ -774,17 +774,17 @@ namespace boost { /// \addtogroup manipulators /// /// @{ - + /// /// Manipulator for switching message domain in ostream, /// /// \note The returned object throws std::bad_cast if the I/O stream does not have \ref message_format facet installed - /// - inline + /// + inline #ifdef BOOST_LOCALE_DOXYGEN unspecified_type #else - details::set_domain + details::set_domain #endif domain(std::string const &id) { @@ -793,7 +793,7 @@ namespace boost { } /// @} } // as - } // locale + } // locale } // boost #ifdef BOOST_MSVC diff --git a/include/boost/locale/utf.hpp b/include/boost/locale/utf.hpp index 5fa8bcdb..bc9b6b97 100644 --- a/include/boost/locale/utf.hpp +++ b/include/boost/locale/utf.hpp @@ -14,7 +14,7 @@ namespace boost { namespace locale { /// -/// \brief Namespace that holds basic operations on UTF encoded sequences +/// \brief Namespace that holds basic operations on UTF encoded sequences /// /// All functions defined in this namespace do not require linking with Boost.Locale library /// @@ -79,7 +79,7 @@ namespace utf { /// Postconditions /// /// - p points to the last consumed character - /// + /// template static code_point decode(Iterator &p,Iterator e); @@ -103,7 +103,7 @@ namespace utf { /// Get the size of the trail part of variable length encoded sequence. /// /// Returns -1 if C is not valid lead character - /// + /// static int trail_length(char_type c); /// /// Returns true if c is trail code unit, always false for UTF-32 @@ -117,11 +117,11 @@ namespace utf { /// /// Convert valid Unicode code point \a value to the UTF sequence. /// - /// Requirements: + /// Requirements: /// /// - \a value is valid code point /// - \a out is an output iterator should be able to accept at least width(value) units - /// + /// /// Returns the iterator past the last written code unit. /// template @@ -134,7 +134,7 @@ namespace utf { template static code_point decode_valid(Iterator &p); }; - + #else template @@ -144,8 +144,8 @@ namespace utf { struct utf_traits { typedef CharType char_type; - - static int trail_length(char_type ci) + + static int trail_length(char_type ci) { unsigned char c = ci; if(c < 128) @@ -160,7 +160,7 @@ namespace utf { return 3; return -1; } - + static const int max_width = 4; static int width(code_point value) @@ -189,7 +189,7 @@ namespace utf { { return !is_trail(ci); } - + template static code_point decode(Iterator &p,Iterator e) { @@ -210,7 +210,7 @@ namespace utf { // if(trail_size == 0) return lead; - + code_point c = lead & ((1<<(6-trail_size))-1); // Read the rest @@ -253,7 +253,7 @@ namespace utf { return c; } - + template static code_point decode_valid(Iterator &p) { @@ -269,7 +269,7 @@ namespace utf { trail_size = 2; else trail_size = 3; - + code_point c = lead & ((1<<(6-trail_size))-1); switch(trail_size) { @@ -402,7 +402,7 @@ namespace utf { } }; // utf16; - + template struct utf_traits { typedef CharType char_type; diff --git a/include/boost/locale/utf8_codecvt.hpp b/include/boost/locale/utf8_codecvt.hpp index a037c3d5..1b64f7f6 100644 --- a/include/boost/locale/utf8_codecvt.hpp +++ b/include/boost/locale/utf8_codecvt.hpp @@ -18,12 +18,12 @@ namespace locale { /// /// \brief Geneneric utf8 codecvt facet, it allows to convert UTF-8 strings to UTF-16 and UTF-32 using wchar_t, char32_t and char16_t -/// +/// template -class utf8_codecvt : public generic_codecvt > +class utf8_codecvt : public generic_codecvt > { public: - + struct state_type {}; utf8_codecvt(size_t refs = 0) : generic_codecvt >(refs) @@ -39,7 +39,7 @@ class utf8_codecvt : public generic_codecvt > { return state_type(); } - static utf::code_point to_unicode(state_type &,char const *&begin,char const *end) + static utf::code_point to_unicode(state_type &,char const *&begin,char const *end) { char const *p=begin; @@ -49,7 +49,7 @@ class utf8_codecvt : public generic_codecvt > return c; } - static utf::code_point from_unicode(state_type &,utf::code_point u,char *begin,char const *end) + static utf::code_point from_unicode(state_type &,utf::code_point u,char *begin,char const *end) { if(!utf::is_valid_codepoint(u)) return utf::illegal; diff --git a/include/boost/locale/util.hpp b/include/boost/locale/util.hpp index 824147d1..0c4ca6ee 100644 --- a/include/boost/locale/util.hpp +++ b/include/boost/locale/util.hpp @@ -25,13 +25,13 @@ namespace locale { /// implementations /// namespace util { - + /// /// \brief Return default system locale name in POSIX format. /// /// This function tries to detect the locale using, LC_CTYPE, LC_ALL and LANG environment /// variables in this order and if all of them unset, in POSIX platforms it returns "C" - /// + /// /// On Windows additionally to check the above environment variables, this function /// tries to creates locale name from ISO-339 and ISO-3199 country codes defined /// for user default locale. @@ -60,7 +60,7 @@ namespace util { /// is assumed to be US-ASCII and missing language is assumed to be "C" /// BOOST_LOCALE_DECL - std::locale create_info(std::locale const &in,std::string const &name); + std::locale create_info(std::locale const &in,std::string const &name); /// @@ -88,17 +88,17 @@ namespace util { static const uint32_t illegal=utf::illegal; /// - /// This value is returned in following cases: The of incomplete input sequence was found or + /// This value is returned in following cases: The of incomplete input sequence was found or /// insufficient output buffer was provided so complete output could not be written. /// static const uint32_t incomplete=utf::incomplete; - + virtual ~base_converter(); /// /// Return the maximal length that one Unicode code-point can be converted to, for example /// for UTF-8 it is 4, for Shift-JIS it is 2 and ISO-8859-1 is 1 /// - virtual int max_len() const + virtual int max_len() const { return 1; } @@ -111,14 +111,14 @@ namespace util { /// for example if you use iconv_t descriptor or UConverter as conversion object return false, /// and this object will be cloned for each use. /// - virtual bool is_thread_safe() const + virtual bool is_thread_safe() const { return false; } /// /// Create a polymorphic copy of this object, usually called only if is_thread_safe() return false /// - virtual base_converter *clone() const + virtual base_converter *clone() const { BOOST_ASSERT(typeid(*this)==typeid(base_converter)); return new base_converter(); @@ -137,9 +137,9 @@ namespace util { /// if invalid input sequence found, i.e. there is a sequence [\a begin, \a code_point_end) such as \a code_point_end <= \a end /// that is illegal for this encoding, \a illegal is returned and begin stays unchanged. For example if *begin = 0xFF and begin < end /// for UTF-8, then \a illegal is returned. - /// /// - virtual uint32_t to_unicode(char const *&begin,char const *end) + /// + virtual uint32_t to_unicode(char const *&begin,char const *end) { if(begin == end) return incomplete; @@ -157,12 +157,12 @@ namespace util { /// \a illegal should be returned /// /// If u can be converted to a sequence of bytes c1, ... , cN (1<= N <= max_len() ) then - /// + /// /// -# If end - begin >= N, c1, ... cN are written starting at begin and N is returned /// -# If end - begin < N, incomplete is returned, it is unspecified what would be /// stored in bytes in range [begin,end) - virtual uint32_t from_unicode(uint32_t u,char *begin,char const *end) + virtual uint32_t from_unicode(uint32_t u,char *begin,char const *end) { if(begin==end) return incomplete; @@ -182,7 +182,7 @@ namespace util { /// /// This function creates a \a base_converter that can be used for conversion between single byte /// character encodings like ISO-8859-1, koi8-r, windows-1255 and Unicode code points, - /// + /// /// If \a encoding is not supported, empty pointer is returned. You should check if /// std::auto_ptr::get() != 0 /// @@ -195,7 +195,7 @@ namespace util { /// /// codecvt facet would convert between narrow and wide/char16_t/char32_t encodings using \a cvt converter. /// If \a cvt is null pointer, always failure conversion would be used that fails on every first input or output. - /// + /// /// Note: the codecvt facet handles both UTF-16 and UTF-32 wide encodings, it knows to break and join /// Unicode code-points above 0xFFFF to and from surrogate pairs correctly. \a cvt should be unaware /// of wide encoding type @@ -213,7 +213,7 @@ namespace util { /// /// This function creates a \a base_converter that can be used for conversion between single byte /// character encodings like ISO-8859-1, koi8-r, windows-1255 and Unicode code points, - /// + /// /// If \a encoding is not supported, empty pointer is returned. You should check if /// std::unique_ptr::get() != 0 /// @@ -225,7 +225,7 @@ namespace util { /// /// codecvt facet would convert between narrow and wide/char16_t/char32_t encodings using \a cvt converter. /// If \a cvt is null pointer, always failure conversion would be used that fails on every first input or output. - /// + /// /// Note: the codecvt facet handles both UTF-16 and UTF-32 wide encodings, it knows to break and join /// Unicode code-points above 0xFFFF to and from surrogate pairs correctly. \a cvt should be unaware /// of wide encoding type @@ -242,7 +242,7 @@ namespace util { /// /// This function creates a \a base_converter that can be used for conversion between single byte /// character encodings like ISO-8859-1, koi8-r, windows-1255 and Unicode code points, - /// + /// /// If \a encoding is not supported, empty pointer is returned. You should check if /// std::unique_ptr::get() != 0 /// @@ -254,33 +254,33 @@ namespace util { /// /// codecvt facet would convert between narrow and wide/char16_t/char32_t encodings using \a cvt converter. /// If \a cvt is null pointer, always failure conversion would be used that fails on every first input or output. - /// + /// /// Note: the codecvt facet handles both UTF-16 and UTF-32 wide encodings, it knows to break and join /// Unicode code-points above 0xFFFF to and from surrogate pairs correctly. \a cvt should be unaware /// of wide encoding type /// - /// ownership of cvt is transfered + /// ownership of cvt is transfered /// BOOST_LOCALE_DECL std::locale create_codecvt_from_pointer(std::locale const &in,base_converter *cvt,character_facet_type type); - /// + /// /// Install utf8 codecvt to UTF-16 or UTF-32 into locale \a in and return - /// new locale that is based on \a in and uses new facet. - /// + /// new locale that is based on \a in and uses new facet. + /// BOOST_LOCALE_DECL std::locale create_utf8_codecvt(std::locale const &in,character_facet_type type); /// /// This function installs codecvt that can be used for conversion between single byte /// character encodings like ISO-8859-1, koi8-r, windows-1255 and Unicode code points, - /// + /// /// Throws boost::locale::conv::invalid_charset_error if the chacater set is not supported or isn't single byte character /// set BOOST_LOCALE_DECL std::locale create_simple_codecvt(std::locale const &in,std::string const &encoding,character_facet_type type); } // util -} // locale +} // locale } // boost #endif diff --git a/src/encoding/codepage.cpp b/src/encoding/codepage.cpp index a16fcb69..a645423a 100644 --- a/src/encoding/codepage.cpp +++ b/src/encoding/codepage.cpp @@ -32,7 +32,7 @@ namespace boost { namespace locale { namespace conv { namespace impl { - + std::string convert_between(char const *begin, char const *end, char const *to_charset, @@ -125,12 +125,12 @@ namespace boost { } return charset; } - - } // impl + + } // impl using namespace impl; - + std::string between(char const *begin,char const *end, std::string const &to_charset,std::string const &from_charset,method_type how) { diff --git a/src/encoding/conv.hpp b/src/encoding/conv.hpp index 1b3950af..386f3e2b 100644 --- a/src/encoding/conv.hpp +++ b/src/encoding/conv.hpp @@ -53,26 +53,26 @@ namespace boost { } std::string normalize_encoding(char const *encoding); - + inline int compare_encodings(char const *l,char const *r) { return normalize_encoding(l).compare(normalize_encoding(r)); } - + #if defined(BOOST_WINDOWS) || defined(__CYGWIN__) int encoding_to_windows_codepage(char const *ccharset); #endif - + class converter_between { public: typedef char char_type; typedef std::string string_type; - + virtual bool open(char const *to_charset,char const *from_charset,method_type how) = 0; - + virtual std::string convert(char const *begin,char const *end) = 0; - + virtual ~converter_between() {} }; @@ -82,11 +82,11 @@ namespace boost { typedef CharType char_type; typedef std::basic_string string_type; - + virtual bool open(char const *charset,method_type how) = 0; - + virtual std::string convert(CharType const *begin,CharType const *end) = 0; - + virtual ~converter_from_utf() {} }; diff --git a/src/encoding/iconv_codepage.ipp b/src/encoding/iconv_codepage.ipp index 07e6180f..93d3e89a 100644 --- a/src/encoding/iconv_codepage.ipp +++ b/src/encoding/iconv_codepage.ipp @@ -20,8 +20,8 @@ namespace impl { class iconverter_base { public: - - iconverter_base() : + + iconverter_base() : cvt_((iconv_t)(-1)) { } @@ -45,12 +45,12 @@ public: how_ = how; return cvt_ != (iconv_t)(-1); } - + template std::basic_string real_convert(InChar const *ubegin,InChar const *uend) { std::basic_string sresult; - + sresult.reserve(uend - ubegin); OutChar result[64]; @@ -58,20 +58,20 @@ public: char *out_start = reinterpret_cast(&result[0]); char const *begin = reinterpret_cast(ubegin); char const *end = reinterpret_cast(uend); - + enum { normal , unshifting , done } state = normal; while(state!=done) { size_t in_left = end - begin; size_t out_left = sizeof(result); - + char *out_ptr = out_start; size_t res = 0; if(in_left == 0) state = unshifting; - if(state == normal) + if(state == normal) res = conv(&begin,&in_left,&out_ptr,&out_left); else res = conv(0,0,&out_ptr,&out_left); @@ -79,7 +79,7 @@ public: int err = errno; size_t output_count = (out_ptr - out_start) / sizeof(OutChar); - + if(res!=0 && res!=(size_t)(-1)) { if(how_ == stop) { throw conversion_error(); @@ -131,7 +131,7 @@ private: cvt_ = (iconv_t)(-1); } } - + iconv_t cvt_; method_type how_; @@ -199,7 +199,7 @@ private: } // impl } // conv -} // locale +} // locale } // boost diff --git a/src/encoding/uconv_codepage.ipp b/src/encoding/uconv_codepage.ipp index 075e6df5..01f5aaa0 100644 --- a/src/encoding/uconv_codepage.ipp +++ b/src/encoding/uconv_codepage.ipp @@ -64,8 +64,8 @@ namespace impl { hold_ptr cvt_to_; }; - - + + template class uconv_from_utf : public converter_from_utf { public: @@ -89,7 +89,7 @@ namespace impl { cvt_to_.reset(); } - std::string convert(CharType const *begin,CharType const *end) BOOST_OVERRIDE + std::string convert(CharType const *begin,CharType const *end) BOOST_OVERRIDE { try { return cvt_to_->std(cvt_from_->icu_checked(begin,end)); @@ -153,7 +153,7 @@ namespace impl { } // impl } // conv -} // locale +} // locale } // boost // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/src/encoding/wconv_codepage.ipp b/src/encoding/wconv_codepage.ipp index 67de92b1..db222ec1 100644 --- a/src/encoding/wconv_codepage.ipp +++ b/src/encoding/wconv_codepage.ipp @@ -27,7 +27,7 @@ namespace boost { namespace locale { namespace conv { namespace impl { - + struct windows_encoding { char const *name; unsigned codepage; @@ -115,13 +115,13 @@ namespace impl { if(len == 2 && begin+1==end) return; n = MultiByteToWideChar(codepage,MB_ERR_INVALID_CHARS,begin,len,wide_buf,4); - for(int i=0;i &buf) { if(begin==end) @@ -151,23 +151,23 @@ namespace impl { BOOL *substitute_ptr = codepage == 65001 || codepage == 65000 ? 0 : &substitute; char subst_char = 0; char *subst_char_ptr = codepage == 65001 || codepage == 65000 ? 0 : &subst_char; - + const std::ptrdiff_t num_chars = end - begin; if(num_chars > std::numeric_limits::max()) throw conversion_error(); int n = WideCharToMultiByte(codepage,0,begin,static_cast(num_chars),0,0,subst_char_ptr,substitute_ptr); buf.resize(n); - + if(WideCharToMultiByte(codepage,0,begin,static_cast(num_chars),&buf[0],n,subst_char_ptr,substitute_ptr)==0) throw conversion_error(); if(substitute) { - if(do_skip) + if(do_skip) remove_substitutions(buf); - else + else throw conversion_error(); } } - + void wide_to_multibyte(int codepage,wchar_t const *begin,wchar_t const *end,bool do_skip,std::vector &buf) { if(begin==end) @@ -186,12 +186,12 @@ namespace impl { b=e+1; e=std::find(b,end,L'0'); } - else + else break; } } - + int encoding_to_windows_codepage(char const *ccharset) { std::string charset = normalize_encoding(ccharset); @@ -216,7 +216,7 @@ namespace impl { } } return -1; - + } template @@ -259,7 +259,7 @@ namespace impl { class wconv_between : public converter_between { public: - wconv_between() : + wconv_between() : how_(skip), to_code_page_ (-1), from_code_page_ ( -1) @@ -280,12 +280,12 @@ namespace impl { return utf_to_utf(begin,end,how_); std::string res; - + std::vector tmp; // buffer for mb2w std::wstring tmps; // buffer for utf_to_utf wchar_t const *wbegin=0; wchar_t const *wend=0; - + if(from_code_page_ == 65001) { tmps = utf_to_utf(begin,end,how_); if(tmps.empty()) @@ -300,7 +300,7 @@ namespace impl { wbegin = &tmp[0]; wend = wbegin + tmp.size(); } - + if(to_code_page_ == 65001) { return utf_to_utf(wbegin,wend,how_); } @@ -317,7 +317,7 @@ namespace impl { int to_code_page_; int from_code_page_; }; - + template class wconv_to_utf; @@ -338,7 +338,7 @@ namespace impl { private: wconv_between cvt; }; - + template<> class wconv_from_utf : public converter_from_utf { public: @@ -353,7 +353,7 @@ namespace impl { private: wconv_between cvt; }; - + template class wconv_to_utf : public converter_to_utf { public: @@ -361,7 +361,7 @@ namespace impl { typedef std::basic_string string_type; - wconv_to_utf() : + wconv_to_utf() : how_(skip), code_page_(-1) { @@ -391,7 +391,7 @@ namespace impl { method_type how_; int code_page_; }; - + template class wconv_from_utf : public converter_from_utf { public: @@ -399,7 +399,7 @@ namespace impl { typedef std::basic_string string_type; - wconv_from_utf() : + wconv_from_utf() : how_(skip), code_page_(-1) { @@ -463,7 +463,7 @@ namespace impl { typedef std::basic_string string_type; - wconv_to_utf() : + wconv_to_utf() : how_(skip), code_page_(-1) { @@ -493,7 +493,7 @@ namespace impl { method_type how_; int code_page_; }; - + template class wconv_from_utf : public converter_from_utf { public: @@ -501,7 +501,7 @@ namespace impl { typedef std::basic_string string_type; - wconv_from_utf() : + wconv_from_utf() : how_(skip), code_page_(-1) { @@ -542,7 +542,7 @@ namespace impl { } // impl } // conv -} // locale +} // locale } // boost #endif diff --git a/src/icu/all_generator.hpp b/src/icu/all_generator.hpp index ca8f26d6..87a02473 100644 --- a/src/icu/all_generator.hpp +++ b/src/icu/all_generator.hpp @@ -15,7 +15,7 @@ namespace boost { namespace impl_icu { struct cdata; std::locale create_convert(std::locale const &,cdata const &,character_facet_type); // ok - std::locale create_collate(std::locale const &,cdata const &,character_facet_type); // ok + std::locale create_collate(std::locale const &,cdata const &,character_facet_type); // ok std::locale create_formatting(std::locale const &,cdata const &,character_facet_type); // ok std::locale create_parsing(std::locale const &,cdata const &,character_facet_type); // ok std::locale create_codecvt(std::locale const &,std::string const &encoding,character_facet_type); // ok diff --git a/src/icu/boundary.cpp b/src/icu/boundary.cpp index c4ff2c86..0473404f 100644 --- a/src/icu/boundary.cpp +++ b/src/icu/boundary.cpp @@ -38,7 +38,7 @@ index_type map_direct(boundary_type t,icu::BreakIterator *it,int reserve) #else icu::RuleBasedBreakIterator *rbbi=dynamic_cast(it); #endif - + indx.push_back(break_info()); it->first(); int pos=0; @@ -56,7 +56,7 @@ index_type map_direct(boundary_type t,icu::BreakIterator *it,int reserve) UErrorCode err=U_ZERO_ERROR; int n = rbbi->getRuleStatusVec(buf,8,err); - + if(err == U_BUFFER_OVERFLOW_ERROR) { buf=&buffer.front(); buffer.resize(n,0); @@ -137,7 +137,7 @@ index_type do_map(boundary_type t,CharType const *begin,CharType const *end,icu: { index_type indx; hold_ptr bi(get_iterator(t,loc)); - + #if U_ICU_VERSION_MAJOR_NUM*100 + U_ICU_VERSION_MINOR_NUM >= 306 UErrorCode err=U_ZERO_ERROR; if(sizeof(CharType) == 2 || (sizeof(CharType)==1 && encoding=="UTF-8")) @@ -164,7 +164,7 @@ index_type do_map(boundary_type t,CharType const *begin,CharType const *end,icu: } if(ut) utext_close(ut); } - else + else #endif { icu_std_converter cvt(encoding); @@ -190,7 +190,7 @@ class boundary_indexing_impl : public boundary_indexing { encoding_(data.encoding) { } - index_type map(boundary_type t,CharType const *begin,CharType const *end) const + index_type map(boundary_type t,CharType const *begin,CharType const *end) const { return do_map(t,begin,end,locale_,encoding_); } diff --git a/src/icu/codecvt.cpp b/src/icu/codecvt.cpp index 86ed3f85..e999b769 100644 --- a/src/icu/codecvt.cpp +++ b/src/icu/codecvt.cpp @@ -19,7 +19,7 @@ #include "icu_util.hpp" #ifdef BOOST_MSVC -# pragma warning(disable : 4244) // loose data +# pragma warning(disable : 4244) // loose data #endif namespace boost { @@ -27,12 +27,12 @@ namespace locale { namespace impl_icu { class uconv_converter : public util::base_converter { public: - + uconv_converter(std::string const &encoding) : encoding_(encoding) { UErrorCode err=U_ZERO_ERROR; - + // No need to check err each time, this // is how ICU works. cvt_ = ucnv_open(encoding.c_str(),&err); @@ -44,10 +44,10 @@ namespace impl_icu { ucnv_close(cvt_); throw conv::invalid_charset_error(encoding); } - + max_len_ = ucnv_getMaxCharSize(cvt_); } - + ~uconv_converter() { ucnv_close(cvt_); @@ -116,7 +116,7 @@ namespace impl_icu { UConverter *cvt_; int max_len_; }; - + util::base_converter *create_uconv_converter(std::string const &encoding) { hold_ptr cvt; @@ -152,7 +152,7 @@ namespace impl_icu { } } // impl_icu -} // locale +} // locale } // boost // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/src/icu/codecvt.hpp b/src/icu/codecvt.hpp index 1e398790..8af9bd66 100644 --- a/src/icu/codecvt.hpp +++ b/src/icu/codecvt.hpp @@ -17,7 +17,7 @@ namespace impl_icu { util::base_converter *create_uconv_converter(std::string const &encoding); } // impl_icu -} // locale +} // locale } // boost #endif diff --git a/src/icu/collator.cpp b/src/icu/collator.cpp index fc65b11e..4d0ecebe 100644 --- a/src/icu/collator.cpp +++ b/src/icu/collator.cpp @@ -26,7 +26,7 @@ namespace boost { namespace locale { namespace impl_icu { template - class collate_impl : public collator + class collate_impl : public collator { public: typedef typename collator::level_type level_type; @@ -51,7 +51,7 @@ namespace boost { } #endif - + int do_ustring_compare( level_type level, CharType const *b1,CharType const *e1, CharType const *b2,CharType const *e2, @@ -61,7 +61,7 @@ namespace boost { icu::UnicodeString right=cvt_.icu(b2,e2); return get_collator(level)->compare(left,right,status); } - + int do_real_compare(level_type level, CharType const *b1,CharType const *e1, CharType const *b2,CharType const *e2, @@ -75,9 +75,9 @@ namespace boost { CharType const *b2,CharType const *e2) const BOOST_OVERRIDE { UErrorCode status=U_ZERO_ERROR; - + int res = do_real_compare(level,b1,e1,b2,e2,status); - + if(U_FAILURE(status)) throw std::runtime_error(std::string("Collation failed:") + u_errorName(status)); if(res < 0) @@ -86,8 +86,8 @@ namespace boost { return 1; return 0; } - - std::vector do_basic_transform(level_type level,CharType const *b,CharType const *e) const + + std::vector do_basic_transform(level_type level,CharType const *b,CharType const *e) const { icu::UnicodeString str=cvt_.icu(b,e); std::vector tmp; @@ -98,7 +98,7 @@ namespace boost { tmp.resize(len); collate->getSortKey(str,&tmp[0],tmp.size()); } - else + else tmp.resize(len); return tmp; } @@ -107,7 +107,7 @@ namespace boost { std::vector tmp = do_basic_transform(level,b,e); return std::basic_string(tmp.begin(),tmp.end()); } - + long do_hash(level_type level,CharType const *b,CharType const *e) const BOOST_OVERRIDE { std::vector tmp = do_basic_transform(level,b,e); @@ -115,25 +115,25 @@ namespace boost { return gnu_gettext::pj_winberger_hash_function(reinterpret_cast(&tmp.front())); } - collate_impl(cdata const &d) : + collate_impl(cdata const &d) : cvt_(d.encoding), locale_(d.locale), is_utf8_(d.utf8) { - + } icu::Collator *get_collator(level_type ilevel) const { int l = limit(ilevel); - static const icu::Collator::ECollationStrength levels[level_count] = - { + static const icu::Collator::ECollationStrength levels[level_count] = + { icu::Collator::PRIMARY, icu::Collator::SECONDARY, icu::Collator::TERTIARY, icu::Collator::QUATERNARY, icu::Collator::IDENTICAL }; - + icu::Collator *col = collates_[l].get(); if(col) return col; @@ -160,7 +160,7 @@ namespace boost { #if U_ICU_VERSION_MAJOR_NUM*100 + U_ICU_VERSION_MINOR_NUM >= 402 template<> - int collate_impl::do_real_compare( + int collate_impl::do_real_compare( level_type level, char const *b1,char const *e1, char const *b2,char const *e2, @@ -172,7 +172,7 @@ namespace boost { return do_ustring_compare(level,b1,e1,b2,e2,status); } #endif - + std::locale create_collate(std::locale const &in,cdata const &cd,character_facet_type type) { switch(type) { diff --git a/src/icu/conversion.cpp b/src/icu/conversion.cpp index 38b18b29..1e8e645b 100644 --- a/src/icu/conversion.cpp +++ b/src/icu/conversion.cpp @@ -26,8 +26,8 @@ namespace boost { namespace locale { namespace impl_icu { - - + + namespace { void normalize_string(icu::UnicodeString &str,int flags) { @@ -94,7 +94,7 @@ namespace impl_icu { } return cvt.std(str); } - + private: icu::Locale locale_; std::string encoding_; @@ -138,7 +138,7 @@ namespace impl_icu { class utf8_converter_impl : public converter { public: - + utf8_converter_impl(cdata const &d) : locale_id_(d.locale.getName()), map_(locale_id_) @@ -147,15 +147,15 @@ namespace impl_icu { std::string convert(converter_base::conversion_type how,char const *begin,char const *end,int flags = 0) const BOOST_OVERRIDE { - + if(how == converter_base::normalization) { icu_std_converter cvt("UTF-8"); icu::UnicodeString str=cvt.icu(begin,end); normalize_string(str,flags); return cvt.std(str); } - - switch(how) + + switch(how) { case converter_base::upper_case: return map_.convert(ucasemap_utf8ToUpper,begin,end); @@ -203,7 +203,7 @@ namespace impl_icu { return in; } } - + } // impl_icu } // locale diff --git a/src/icu/date_time.cpp b/src/icu/date_time.cpp index 1ea8e06b..3b8eca88 100644 --- a/src/icu/date_time.cpp +++ b/src/icu/date_time.cpp @@ -26,7 +26,7 @@ namespace boost { namespace locale { namespace impl_icu { - + static void check_and_throw_dt(UErrorCode &e) { if(U_FAILURE(e)) { @@ -64,7 +64,7 @@ namespace impl_icu { class calendar_impl : public abstract_calendar { public: - + calendar_impl(cdata const &dat) { UErrorCode err=U_ZERO_ERROR; @@ -148,7 +148,7 @@ namespace impl_icu { } posix_time get_time() const BOOST_OVERRIDE { - + UErrorCode code=U_ZERO_ERROR; double rtime = 0; { @@ -213,7 +213,7 @@ namespace impl_icu { // // fieldDifference has side effect of moving calendar (WTF?) // So we clone it for performing this operation - // + // hold_ptr self(calendar_->clone()); calendar_impl const *other_cal=dynamic_cast(other_ptr); @@ -257,10 +257,10 @@ namespace impl_icu { std::string encoding_; hold_ptr calendar_; }; - + class icu_calendar_facet : public calendar_facet { public: - icu_calendar_facet(cdata const &d,size_t refs = 0) : + icu_calendar_facet(cdata const &d,size_t refs = 0) : calendar_facet(refs), data_(d) { @@ -272,7 +272,7 @@ namespace impl_icu { private: cdata data_; }; - + std::locale create_calendar(std::locale const &in,cdata const &d) { return std::locale(in,new icu_calendar_facet(d)); diff --git a/src/icu/formatter.cpp b/src/icu/formatter.cpp index 8496c2fb..7a026b41 100644 --- a/src/icu/formatter.cpp +++ b/src/icu/formatter.cpp @@ -26,27 +26,27 @@ #include "time_zone.hpp" #ifdef BOOST_MSVC -# pragma warning(disable : 4244) // lose data +# pragma warning(disable : 4244) // lose data #endif namespace boost { namespace locale { namespace impl_icu { - - + + std::locale::id icu_formatters_cache::id; namespace { struct init { init() { std::has_facet(std::locale::classic()); } } instance; } - + template class number_format : public formatter { public: typedef CharType char_type; typedef std::basic_string string_type; - + string_type format(double value,size_t &code_points) const BOOST_OVERRIDE { icu::UnicodeString tmp; @@ -65,7 +65,7 @@ namespace locale { string_type format(int32_t value,size_t &code_points) const BOOST_OVERRIDE { icu::UnicodeString tmp; - #ifdef __SUNPRO_CC + #ifdef __SUNPRO_CC icu_fmt_->format(static_cast(value),tmp); #else icu_fmt_->format(::int32_t(value),tmp); @@ -93,9 +93,9 @@ namespace locale { icu_fmt_(fmt) { } - + private: - + bool get_value(double &v,icu::Formattable &fmt) const { UErrorCode err=U_ZERO_ERROR; @@ -146,14 +146,14 @@ namespace locale { icu_std_converter cvt_; icu::NumberFormat *icu_fmt_; }; - - + + template class date_format : public formatter { public: typedef CharType char_type; typedef std::basic_string string_type; - + string_type format(double value,size_t &code_points) const BOOST_OVERRIDE { return do_format(value,code_points); @@ -192,7 +192,7 @@ namespace locale { icu_fmt_ = fmt; } } - + private: template @@ -215,8 +215,8 @@ namespace locale { return cut; } - - string_type do_format(double value,size_t &codepoints) const + + string_type do_format(double value,size_t &codepoints) const { UDate date = value * 1000.0; /// UDate is time_t in miliseconds icu::UnicodeString tmp; @@ -371,7 +371,7 @@ namespace locale { result+="'"; return result; } - + template formatter *generate_formatter( std::ios_base &ios, @@ -389,9 +389,9 @@ namespace locale { if(disp == posix) return fmt.release(); - + UErrorCode err=U_ZERO_ERROR; - + switch(disp) { case number: { @@ -402,7 +402,7 @@ namespace locale { nf = cache.number_format(icu_formatters_cache::fmt_sci); else nf = cache.number_format(icu_formatters_cache::fmt_number); - + nf->setMaximumFractionDigits(ios.precision()); if(how == std::ios_base::scientific || how == std::ios_base::fixed ) { nf->setMinimumFractionDigits(ios.precision()); @@ -416,7 +416,7 @@ namespace locale { case currency: { icu::NumberFormat *nf; - + uint64_t curr = info.currency_flags(); if(curr == currency_default || curr == currency_national) @@ -439,7 +439,7 @@ namespace locale { nf->setMinimumFractionDigits(0); } fmt.reset(new number_format(nf,encoding)); - + } break; case spellout: @@ -505,7 +505,7 @@ namespace locale { break; case strftime: { - if( !cache.date_format_[1].isEmpty() + if( !cache.date_format_[1].isEmpty() && !cache.time_format_[1].isEmpty() && !cache.date_time_format_[1][1].isEmpty()) { @@ -523,11 +523,11 @@ namespace locale { } sdf = 0; } - + if(!df) { icu::DateFormat::EStyle dstyle = icu::DateFormat::kDefault; icu::DateFormat::EStyle tstyle = icu::DateFormat::kDefault; - + switch(info.time_flags()) { case time_short: tstyle=icu::DateFormat::kShort; break; case time_medium: tstyle=icu::DateFormat::kMedium; break; @@ -540,7 +540,7 @@ namespace locale { case date_long: dstyle=icu::DateFormat::kLong; break; case date_full: dstyle=icu::DateFormat::kFull; break; } - + if(disp==date) adf.reset(icu::DateFormat::createDateInstance(dstyle,locale)); else if(disp==time) @@ -553,13 +553,13 @@ namespace locale { icu::UnicodeString fmt = strftime_to_icu(cvt_.icu(f.data(),f.data()+f.size()),locale); adf.reset(new icu::SimpleDateFormat(fmt,locale,err)); } - if(U_FAILURE(err)) + if(U_FAILURE(err)) return fmt.release(); df = adf.get(); } df->adoptTimeZone(get_time_zone(info.time_zone())); - + // Depending if we own formatter or not if(adf.get()) fmt.reset(new date_format(adf.release(),true,encoding)); @@ -604,7 +604,7 @@ namespace locale { } #endif - + } // impl_icu } // locale diff --git a/src/icu/formatter.hpp b/src/icu/formatter.hpp index 058d969f..e74dd472 100644 --- a/src/icu/formatter.hpp +++ b/src/icu/formatter.hpp @@ -16,7 +16,7 @@ namespace boost { namespace locale { -namespace impl_icu { +namespace impl_icu { /// /// \brief Special base polymorphic class that is used as a character type independent base for all formatter classes @@ -87,7 +87,7 @@ namespace impl_icu { /// static formatter *create(std::ios_base &ios,icu::Locale const &l,std::string const &enc); }; // class formatter - + /// /// Specialization for real implementation /// diff --git a/src/icu/icu_backend.cpp b/src/icu/icu_backend.cpp index 51da4e7b..fea937ba 100644 --- a/src/icu/icu_backend.cpp +++ b/src/icu/icu_backend.cpp @@ -20,15 +20,15 @@ namespace boost { namespace locale { -namespace impl_icu { +namespace impl_icu { class icu_localization_backend : public localization_backend { public: - icu_localization_backend() : + icu_localization_backend() : invalid_(true), use_ansi_encoding_(false) { } - icu_localization_backend(icu_localization_backend const &other) : + icu_localization_backend(icu_localization_backend const &other) : localization_backend(), paths_(other.paths_), domains_(other.domains_), @@ -74,7 +74,7 @@ namespace impl_icu { bool utf8 = ! use_ansi_encoding_; real_id_ = util::get_system_locale(utf8); } - + util::locale_data d; d.parse(real_id_); @@ -85,7 +85,7 @@ namespace impl_icu { country_ = d.country; variant_ = d.variant; } - + std::locale install(std::locale const &base, locale_category_type category, character_facet_type type = nochar_facet) BOOST_OVERRIDE @@ -130,7 +130,7 @@ namespace impl_icu { } } case boundary_facet: - return create_boundary(base,data_,type); + return create_boundary(base,data_,type); case calendar_facet: return create_calendar(base,data_); case information_facet: @@ -154,7 +154,7 @@ namespace impl_icu { bool invalid_; bool use_ansi_encoding_; }; - + localization_backend *create_localization_backend() { return new icu_localization_backend(); @@ -163,4 +163,4 @@ namespace impl_icu { } // impl icu } // locale } // boost -// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 +// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/src/icu/icu_backend.hpp b/src/icu/icu_backend.hpp index d43cb2db..42102c4c 100644 --- a/src/icu/icu_backend.hpp +++ b/src/icu/icu_backend.hpp @@ -10,11 +10,11 @@ namespace boost { namespace locale { class localization_backend; - namespace impl_icu { + namespace impl_icu { localization_backend *create_localization_backend(); } // impl_icu - } // locale + } // locale } // boost #endif -// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 +// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/src/icu/icu_util.hpp b/src/icu/icu_util.hpp index 4330bda6..df2893bb 100644 --- a/src/icu/icu_util.hpp +++ b/src/icu/icu_util.hpp @@ -29,4 +29,4 @@ namespace impl_icu { } // boost #endif -// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 +// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/src/icu/numeric.cpp b/src/icu/numeric.cpp index 292419bc..948d3106 100644 --- a/src/icu/numeric.cpp +++ b/src/icu/numeric.cpp @@ -25,7 +25,7 @@ namespace impl_icu { namespace details { template::digits,bool integer=std::numeric_limits::is_integer> struct cast_traits; - + template struct cast_traits { typedef int32_t cast_type; @@ -71,7 +71,7 @@ namespace details { bool Int=std::numeric_limits::is_integer, bool Big=(sizeof(V) >= 8) > - struct use_parent_traits + struct use_parent_traits { static bool use(V /*v*/) { return false; } }; @@ -118,14 +118,14 @@ class num_format : public std::num_put, protected num_base typedef formatter formatter_type; typedef hold_ptr formatter_ptr; - num_format(cdata const &d,size_t refs = 0) : + num_format(cdata const &d,size_t refs = 0) : std::num_put(refs), loc_(d.locale), enc_(d.encoding) { } -protected: - +protected: + iter_type do_put(iter_type out, std::ios_base& ios, char_type fill, long val) const BOOST_OVERRIDE { @@ -143,8 +143,8 @@ class num_format : public std::num_put, protected num_base { return do_real_put(out,ios,fill,val); } - - #ifndef BOOST_NO_LONG_LONG + + #ifndef BOOST_NO_LONG_LONG iter_type do_put (iter_type out, std::ios_base &ios, char_type fill, long long val) const BOOST_OVERRIDE { return do_real_put(out,ios,fill,val); @@ -168,18 +168,18 @@ class num_format : public std::num_put, protected num_base formatter_ptr formatter(formatter_type::create(ios,loc_,enc_)); - if(formatter.get() == 0) + if(formatter.get() == 0) return std::num_put::do_put(out,ios,fill,val); - + size_t code_points; typedef typename details::cast_traits::cast_type cast_type; string_type const &str = formatter->format(static_cast(val),code_points); std::streamsize on_left=0,on_right = 0,points = code_points; if(points < ios.width()) { std::streamsize n = ios.width() - points; - + std::ios_base::fmtflags flags = ios.flags() & std::ios_base::adjustfield; - + // // We do not really know internal point, so we assume that it does not // exist. So according to the standard field should be right aligned @@ -212,13 +212,13 @@ template class num_parse : public std::num_get, protected num_base { public: - num_parse(cdata const &d,size_t refs = 0) : + num_parse(cdata const &d,size_t refs = 0) : std::num_get(refs), loc_(d.locale), enc_(d.encoding) { } -protected: +protected: typedef typename std::num_get::iter_type iter_type; typedef std::basic_string string_type; typedef CharType char_type; @@ -261,7 +261,7 @@ class num_parse : public std::num_get, protected num_base return do_real_get(in,end,ios,err,val); } - #ifndef BOOST_NO_LONG_LONG + #ifndef BOOST_NO_LONG_LONG iter_type do_get (iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,long long &val) const BOOST_OVERRIDE { return do_real_get(in,end,ios,err,val); @@ -275,7 +275,7 @@ class num_parse : public std::num_get, protected num_base #endif private: - + // // This is not really an efficient solution, but it works @@ -333,7 +333,7 @@ class num_parse : public std::num_get, protected num_base typedef std::numeric_limits casted_limits; if(v < 0 && value_limits::is_signed == false) return false; - + static const CastedType max_val = value_limits::max(); if(sizeof(CastedType) > sizeof(ValueType) && v > max_val) @@ -348,7 +348,7 @@ class num_parse : public std::num_get, protected num_base } return true; } - + icu::Locale loc_; std::string enc_; @@ -360,7 +360,7 @@ std::locale install_formatting_facets(std::locale const &in,cdata const &cd) { std::locale tmp=std::locale(in,new num_format(cd)); if(!std::has_facet(in)) { - tmp=std::locale(tmp,new icu_formatters_cache(cd.locale)); + tmp=std::locale(tmp,new icu_formatters_cache(cd.locale)); } return tmp; } @@ -370,7 +370,7 @@ std::locale install_parsing_facets(std::locale const &in,cdata const &cd) { std::locale tmp=std::locale(in,new num_parse(cd)); if(!std::has_facet(in)) { - tmp=std::locale(tmp,new icu_formatters_cache(cd.locale)); + tmp=std::locale(tmp,new icu_formatters_cache(cd.locale)); } return tmp; } @@ -418,7 +418,7 @@ std::locale create_parsing(std::locale const &in,cdata const &cd,character_facet } // impl_icu -} // locale +} // locale } //boost diff --git a/src/icu/predefined_formatters.hpp b/src/icu/predefined_formatters.hpp index 906dfe83..4a2d789a 100644 --- a/src/icu/predefined_formatters.hpp +++ b/src/icu/predefined_formatters.hpp @@ -24,7 +24,7 @@ namespace boost { namespace locale { - namespace impl_icu { + namespace impl_icu { class icu_formatters_cache : public std::locale::facet { public: @@ -35,7 +35,7 @@ namespace locale { locale_(locale) { - static const icu::DateFormat::EStyle styles[4] = { + static const icu::DateFormat::EStyle styles[4] = { icu::DateFormat::kShort, icu::DateFormat::kMedium, icu::DateFormat::kLong, @@ -145,7 +145,7 @@ namespace locale { if(U_FAILURE(err)) throw std::runtime_error("Failed to create a formatter"); } - + icu::UnicodeString date_format_[4]; icu::UnicodeString time_format_[4]; icu::UnicodeString date_time_format_[4][4]; @@ -160,14 +160,14 @@ namespace locale { icu::DateFormat::kMedium, icu::DateFormat::kMedium, locale_)); - + if(dynamic_cast(fmt.get())) { p = static_cast(fmt.release()); date_formatter_.reset(p); } return p; } - + private: mutable boost::thread_specific_ptr number_format_[fmt_count]; diff --git a/src/icu/time_zone.cpp b/src/icu/time_zone.cpp index 5c514498..757ffc1b 100644 --- a/src/icu/time_zone.cpp +++ b/src/icu/time_zone.cpp @@ -61,11 +61,11 @@ namespace boost { // // This is a workaround for an ICU timezone detection bug. - // It is \b very ICU specific and should not be used + // It is \b very ICU specific and should not be used // in general. It is also designed to work only on // specific patforms: Linux, BSD and Apple, where this bug may actually // occur - // + // namespace { // Under BSD, Linux and Mac OS X dirent has normal size @@ -99,7 +99,7 @@ namespace boost { struct dirent de; struct dirent *read_result; }; - + bool files_equal(std::string const &left,std::string const &right) { char l[256],r[256]; @@ -122,19 +122,19 @@ namespace boost { return false; return true; } - + std::string find_file_in(std::string const &ref,size_t size,std::string const &dir) { directory d(dir.c_str()); if(!d.is_open()) return std::string(); - + char const *name=0; while((name=d.next())!=0) { std::string file_name = name; - if( file_name == "." - || file_name ==".." - || file_name=="posixrules" + if( file_name == "." + || file_name ==".." + || file_name=="posixrules" || file_name=="localtime") { continue; @@ -147,7 +147,7 @@ namespace boost { if(!res.empty()) return file_name + "/" + res; } - else { + else { if(size_t(st.st_size) == size && files_equal(path,ref)) { return file_name; } @@ -161,7 +161,7 @@ namespace boost { // algorithm... just it ignores localtime std::string detect_correct_time_zone() { - + char const *tz_dir = "/usr/share/zoneinfo"; char const *tz_file = "/etc/localtime"; @@ -177,7 +177,7 @@ namespace boost { return r; } - + // // Using pthread as: // - This bug is relevant for only Linux, BSD, Mac OS X and diff --git a/src/icu/uconv.hpp b/src/icu/uconv.hpp index f9eb2d1b..a9c8decc 100644 --- a/src/icu/uconv.hpp +++ b/src/icu/uconv.hpp @@ -28,14 +28,14 @@ namespace impl_icu { cvt_stop } cpcvt_type; - + template class icu_std_converter { public: typedef CharType char_type; typedef std::basic_string string_type; - icu_std_converter(std::string charset,cpcvt_type cv=cvt_skip); + icu_std_converter(std::string charset,cpcvt_type cv=cvt_skip); icu::UnicodeString icu(char_type const *begin,char_type const *end) const; string_type std(icu::UnicodeString const &str) const; size_t cut(icu::UnicodeString const &str,char_type const *begin,char_type const *end,size_t n,size_t from_u=0,size_t from_c=0) const; @@ -47,7 +47,7 @@ namespace impl_icu { typedef CharType char_type; typedef std::basic_string string_type; - + icu::UnicodeString icu_checked(char_type const *vb,char_type const *ve) const { return icu(vb,ve); // Already done @@ -62,14 +62,14 @@ namespace impl_icu { check_and_throw_icu_error(err); return tmp; } - + string_type std(icu::UnicodeString const &str) const { uconv cvt(charset_,cvt_type_); return cvt.go(str.getBuffer(),str.length(),max_len_); } - icu_std_converter(std::string charset,cpcvt_type cvt_type = cvt_skip) : + icu_std_converter(std::string charset,cpcvt_type cvt_type = cvt_skip) : charset_(charset), cvt_type_(cvt_type) { @@ -89,7 +89,7 @@ namespace impl_icu { uconv(uconv const &other); void operator=(uconv const &other); public: - uconv(std::string const &charset,cpcvt_type cvt_type=cvt_skip) + uconv(std::string const &charset,cpcvt_type cvt_type=cvt_skip) { UErrorCode err=U_ZERO_ERROR; cvt_ = ucnv_open(charset.c_str(),&err); @@ -98,12 +98,12 @@ namespace impl_icu { ucnv_close(cvt_); throw conv::invalid_charset_error(charset); } - + try { if(cvt_type==cvt_skip) { ucnv_setFromUCallBack(cvt_,UCNV_FROM_U_CALLBACK_SKIP,0,0,0,&err); check_and_throw_icu_error(err); - + err=U_ZERO_ERROR; ucnv_setToUCallBack(cvt_,UCNV_TO_U_CALLBACK_SKIP,0,0,0,&err); check_and_throw_icu_error(err); @@ -111,7 +111,7 @@ namespace impl_icu { else { ucnv_setFromUCallBack(cvt_,UCNV_FROM_U_CALLBACK_STOP,0,0,0,&err); check_and_throw_icu_error(err); - + err=U_ZERO_ERROR; ucnv_setToUCallBack(cvt_,UCNV_TO_U_CALLBACK_STOP,0,0,0,&err); check_and_throw_icu_error(err); @@ -156,7 +156,7 @@ namespace impl_icu { { ucnv_close(cvt_); } - + private: UConverter *cvt_; }; @@ -166,14 +166,14 @@ namespace impl_icu { std::string charset_; cpcvt_type cvt_type_; }; - + template class icu_std_converter { public: typedef CharType char_type; typedef std::basic_string string_type; - + icu::UnicodeString icu_checked(char_type const *begin,char_type const *end) const { icu::UnicodeString tmp(end-begin,0,0); // make inital capacity @@ -199,7 +199,7 @@ namespace impl_icu { throw_if_needed(); } return tmp; - } + } void throw_if_needed() const { if(mode_ == cvt_stop) @@ -224,7 +224,7 @@ namespace impl_icu { { return n; } - + icu_std_converter(std::string /*charset*/,cpcvt_type mode=cvt_skip) : mode_(mode) { @@ -233,7 +233,7 @@ namespace impl_icu { cpcvt_type mode_; }; - + template class icu_std_converter { public: @@ -252,13 +252,13 @@ namespace impl_icu { throw_if_needed(); } return tmp; - } + } void throw_if_needed() const { if(mode_ == cvt_stop) throw conv::conversion_error(); } - + icu::UnicodeString icu(char_type const *begin,char_type const *end) const { icu::UnicodeString tmp(end-begin,0,0); // make inital capacity @@ -291,7 +291,7 @@ namespace impl_icu { return tmp; } - + size_t cut(icu::UnicodeString const &str,char_type const * /*begin*/,char_type const * /*end*/,size_t n, size_t from_u=0,size_t /*from_c*/=0) const { diff --git a/src/posix/codecvt.cpp b/src/posix/codecvt.cpp index 9213cd12..6e8dee0d 100644 --- a/src/posix/codecvt.cpp +++ b/src/posix/codecvt.cpp @@ -29,7 +29,7 @@ namespace impl_posix { #ifdef BOOST_LOCALE_WITH_ICONV class mb2_iconv_converter : public util::base_converter { public: - + mb2_iconv_converter(std::string const &encoding) : encoding_(encoding), to_utf_((iconv_t)(-1)), @@ -55,7 +55,7 @@ namespace impl_posix { first_byte_table.push_back(obuf[0]); continue; } - + // Test if this is illegal first byte or incomplete in = ibuf; insize = 1; @@ -63,8 +63,8 @@ namespace impl_posix { outsize = 8; call_iconv(d,0,0,0,0); size_t res = call_iconv(d,&in,&insize,&out,&outsize); - - // Now if this single byte starts a sequence we add incomplete + + // Now if this single byte starts a sequence we add incomplete // to know to ask that we need two bytes, othewise it may only be // illegal @@ -94,7 +94,7 @@ namespace impl_posix { from_utf_((iconv_t)(-1)) { } - + ~mb2_iconv_converter() { if(to_utf_ != (iconv_t)(-1)) @@ -117,7 +117,7 @@ namespace impl_posix { { if(begin == end) return incomplete; - + unsigned char seq0 = *begin; uint32_t index = (*first_byte_table_)[seq0]; if(index == illegal) @@ -128,7 +128,7 @@ namespace impl_posix { } else if(begin+1 == end) return incomplete; - + open(to_utf_,utf32_encoding(),encoding_.c_str()); // maybe illegal or may be double byte @@ -244,7 +244,7 @@ namespace impl_posix { } } // impl_posix -} // locale +} // locale } // boost // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/src/posix/codecvt.hpp b/src/posix/codecvt.hpp index 976c07e3..43b21a5a 100644 --- a/src/posix/codecvt.hpp +++ b/src/posix/codecvt.hpp @@ -20,7 +20,7 @@ namespace impl_posix { util::base_converter *create_iconv_converter(std::string const &encoding); } // impl_posix -} // locale +} // locale } // boost #endif diff --git a/src/posix/collate.cpp b/src/posix/collate.cpp index c413cbaa..bcdecb93 100644 --- a/src/posix/collate.cpp +++ b/src/posix/collate.cpp @@ -58,7 +58,7 @@ class collator : public std::collate { public: typedef CharType char_type; typedef std::basic_string string_type; - collator(boost::shared_ptr l,size_t refs = 0) : + collator(boost::shared_ptr l,size_t refs = 0) : std::collate(refs), lc_(l) { @@ -114,7 +114,7 @@ std::locale create_collate( std::locale const &in, } // impl_std -} // locale +} // locale } //boost diff --git a/src/posix/converter.cpp b/src/posix/converter.cpp index 360b04cd..9b43c617 100644 --- a/src/posix/converter.cpp +++ b/src/posix/converter.cpp @@ -56,13 +56,13 @@ struct case_traits { template -class std_converter : public converter +class std_converter : public converter { public: typedef CharType char_type; typedef std::basic_string string_type; typedef std::ctype ctype_type; - std_converter(boost::shared_ptr lc,size_t refs = 0) : + std_converter(boost::shared_ptr lc,size_t refs = 0) : converter(refs), lc_(lc) { @@ -99,7 +99,7 @@ class std_converter : public converter class utf8_converter : public converter { public: - utf8_converter(boost::shared_ptr lc,size_t refs = 0) : + utf8_converter(boost::shared_ptr lc,size_t refs = 0) : converter(refs), lc_(lc) { @@ -116,7 +116,7 @@ class utf8_converter : public converter { wres+=towupper_l(tmp[i],*lc_); return conv::from_utf(wres,"UTF-8"); } - + case lower_case: case case_folding: { @@ -140,7 +140,7 @@ std::locale create_convert( std::locale const &in, character_facet_type type) { switch(type) { - case char_facet: + case char_facet: { std::string encoding = nl_langinfo_l(CODESET,*lc); for(unsigned i=0;i typedef std::basic_string string_type; typedef CharType char_type; - num_format(boost::shared_ptr lc,size_t refs = 0) : + num_format(boost::shared_ptr lc,size_t refs = 0) : util::base_num_format(refs), lc_(lc) { } -protected: +protected: iter_type do_format_currency(bool intl,iter_type out,std::ios_base &/*ios*/,char_type /*fill*/,long double val) const BOOST_OVERRIDE { @@ -61,9 +61,9 @@ class num_format : public util::base_num_format char const *format = intl ? "%i" : "%n"; errno=0; ssize_t n = strfmon_l(buf,sizeof(buf),*lc_,format,static_cast(val)); - if(n >= 0) + if(n >= 0) return write_it(out,buf,n); - + for(std::vector tmp(sizeof(buf)*2);tmp.size() <= 4098;tmp.resize(tmp.size()*2)) { n = strfmon_l(&tmp.front(),tmp.size(),*lc_,format,static_cast(val)); if(n >= 0) @@ -78,7 +78,7 @@ class num_format : public util::base_num_format *out++ = *ptr++; return out; } - + std::ostreambuf_iterator write_it(std::ostreambuf_iterator out,char const *ptr,size_t n) const { std::wstring tmp = conv::to_utf(ptr,ptr+n,nl_langinfo_l(CODESET,*lc_)); @@ -152,7 +152,7 @@ struct ftime_traits { template class time_put_posix : public std::time_put { public: - time_put_posix(boost::shared_ptr lc, size_t refs = 0) : + time_put_posix(boost::shared_ptr lc, size_t refs = 0) : std::time_put(refs), lc_(lc) { @@ -182,11 +182,11 @@ template<> class ctype_posix : public std::ctype { public: - ctype_posix(boost::shared_ptr lc) + ctype_posix(boost::shared_ptr lc) { lc_ = lc; } - + bool do_is(mask m,char c) const { if((m & space) && isspace_l(c,*lc_)) @@ -280,11 +280,11 @@ class ctype_posix : public std::ctype { template<> class ctype_posix : public std::ctype { public: - ctype_posix(boost::shared_ptr lc) + ctype_posix(boost::shared_ptr lc) { lc_ = lc; } - + bool do_is(mask m,wchar_t c) const { if((m & space) && iswspace_l(c,*lc_)) @@ -382,11 +382,11 @@ struct basic_numpunct { std::string grouping; std::string thousands_sep; std::string decimal_point; - basic_numpunct() : + basic_numpunct() : decimal_point(".") { } - basic_numpunct(locale_t lc) + basic_numpunct(locale_t lc) { #if defined(__APPLE__) || defined(__FreeBSD__) lconv *cv = localeconv_l(lc); @@ -407,7 +407,7 @@ template class num_punct_posix : public std::numpunct { public: typedef std::basic_string string_type; - num_punct_posix(locale_t lc,size_t refs = 0) : + num_punct_posix(locale_t lc,size_t refs = 0) : std::numpunct(refs) { basic_numpunct np(lc); @@ -480,7 +480,7 @@ std::locale create_formatting( std::locale const &in, character_facet_type type) { switch(type) { - case char_facet: + case char_facet: return create_formatting_impl(in,lc); case wchar_t_facet: return create_formatting_impl(in,lc); @@ -494,7 +494,7 @@ std::locale create_parsing( std::locale const &in, character_facet_type type) { switch(type) { - case char_facet: + case char_facet: return create_parsing_impl(in,lc); case wchar_t_facet: return create_parsing_impl(in,lc); @@ -506,7 +506,7 @@ std::locale create_parsing( std::locale const &in, } // impl_std -} // locale +} // locale } //boost diff --git a/src/posix/posix_backend.cpp b/src/posix/posix_backend.cpp index 1178dec0..f322f315 100644 --- a/src/posix/posix_backend.cpp +++ b/src/posix/posix_backend.cpp @@ -25,15 +25,15 @@ namespace boost { namespace locale { -namespace impl_posix { - +namespace impl_posix { + class posix_localization_backend : public localization_backend { public: - posix_localization_backend() : + posix_localization_backend() : invalid_(true) { } - posix_localization_backend(posix_localization_backend const &other) : + posix_localization_backend(posix_localization_backend const &other) : localization_backend(), paths_(other.paths_), domains_(other.domains_), @@ -80,18 +80,18 @@ namespace impl_posix { real_id_ = locale_id_; if(real_id_.empty()) real_id_ = util::get_system_locale(); - + locale_t tmp = newlocale(LC_ALL_MASK,real_id_.c_str(),0); - + if(!tmp) { tmp=newlocale(LC_ALL_MASK,"C",0); } if(!tmp) { throw std::runtime_error("newlocale failed"); } - + locale_t *tmp_p = 0; - + try { tmp_p = new locale_t(); } @@ -99,11 +99,11 @@ namespace impl_posix { freelocale(tmp); throw; } - + *tmp_p = tmp; lc_ = boost::shared_ptr(tmp_p,free_locale_by_ptr); } - + std::locale install(std::locale const &base, locale_category_type category, character_facet_type type = nochar_facet) BOOST_OVERRIDE @@ -172,7 +172,7 @@ namespace impl_posix { bool invalid_; boost::shared_ptr lc_; }; - + localization_backend *create_localization_backend() { return new posix_localization_backend(); @@ -181,4 +181,4 @@ namespace impl_posix { } // impl posix } // locale } // boost -// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 +// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/src/posix/posix_backend.hpp b/src/posix/posix_backend.hpp index 586a33ab..52830054 100644 --- a/src/posix/posix_backend.hpp +++ b/src/posix/posix_backend.hpp @@ -10,11 +10,11 @@ namespace boost { namespace locale { class localization_backend; - namespace impl_posix { + namespace impl_posix { localization_backend *create_localization_backend(); } // impl_std - } // locale + } // locale } // boost #endif -// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 +// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/src/shared/date_time.cpp b/src/shared/date_time.cpp index 119870e8..5a8bb1e2 100644 --- a/src/shared/date_time.cpp +++ b/src/shared/date_time.cpp @@ -51,7 +51,7 @@ calendar::calendar(std::ios_base &ios) : impl_(std::use_facet(locale_).create_calendar()) { impl_->set_timezone(tz_); - + } calendar::calendar() : @@ -72,7 +72,7 @@ calendar::calendar(calendar const &other) : { } -calendar const &calendar::operator = (calendar const &other) +calendar const &calendar::operator = (calendar const &other) { if(this !=&other) { impl_.reset(other.impl_->clone()); @@ -255,25 +255,25 @@ date_time date_time::operator>>(date_time_period const &v) const return tmp; } -date_time const &date_time::operator+=(date_time_period const &v) +date_time const &date_time::operator+=(date_time_period const &v) { impl_->adjust_value(v.type.mark(),abstract_calendar::move,v.value); return *this; } -date_time const &date_time::operator-=(date_time_period const &v) +date_time const &date_time::operator-=(date_time_period const &v) { impl_->adjust_value(v.type.mark(),abstract_calendar::move,-v.value); return *this; } -date_time const &date_time::operator<<=(date_time_period const &v) +date_time const &date_time::operator<<=(date_time_period const &v) { impl_->adjust_value(v.type.mark(),abstract_calendar::roll,v.value); return *this; } -date_time const &date_time::operator>>=(date_time_period const &v) +date_time const &date_time::operator>>=(date_time_period const &v) { impl_->adjust_value(v.type.mark(),abstract_calendar::roll,-v.value); return *this; @@ -308,7 +308,7 @@ date_time date_time::operator>>(date_time_period_set const &v) const return tmp; } -date_time const &date_time::operator+=(date_time_period_set const &v) +date_time const &date_time::operator+=(date_time_period_set const &v) { for(unsigned i=0;i>=(date_time_period_set const &v) +date_time const &date_time::operator>>=(date_time_period_set const &v) { for(unsigned i=0;i>=v[i]; diff --git a/src/shared/format.cpp b/src/shared/format.cpp index 814d4df6..34e2e8c6 100644 --- a/src/shared/format.cpp +++ b/src/shared/format.cpp @@ -27,7 +27,7 @@ namespace boost { void (*imbuer)(void *,std::locale const &); }; - format_parser::format_parser(std::ios_base &ios,void *cookie,void (*imbuer)(void *,std::locale const &)) : + format_parser::format_parser(std::ios_base &ios,void *cookie,void (*imbuer)(void *,std::locale const &)) : ios_(ios), d(new data) { @@ -92,7 +92,7 @@ namespace boost { } else if(key=="cur" || key=="currency") { as::currency(ios_); - if(value=="iso") + if(value=="iso") as::currency_iso(ios_); else if(value=="nat" || value=="national") as::currency_national(ios_); @@ -170,9 +170,9 @@ namespace boost { std::string encoding=std::use_facet(d->saved_locale).encoding(); generator gen; gen.categories(formatting_facet); - + std::locale new_loc; - if(value.find('.')==std::string::npos) + if(value.find('.')==std::string::npos) new_loc = gen(value + "." + encoding); else new_loc = gen(value); diff --git a/src/shared/formatting.cpp b/src/shared/formatting.cpp index 70c16c90..4f81f5e1 100644 --- a/src/shared/formatting.cpp +++ b/src/shared/formatting.cpp @@ -15,7 +15,7 @@ namespace boost { namespace locale { - ios_info::string_set::string_set() : + ios_info::string_set::string_set() : type(0), size(0), ptr(0) @@ -39,14 +39,14 @@ namespace boost { type=0; } } - + void ios_info::string_set::swap(string_set &other) { std::swap(type,other.type); std::swap(size,other.size); std::swap(ptr,other.ptr); } - + ios_info::string_set const &ios_info::string_set::operator=(string_set const &other) { if(this!=&other) { @@ -58,7 +58,7 @@ namespace boost { struct ios_info::data {}; - ios_info::ios_info() : + ios_info::ios_info() : flags_(0), domain_id_(0), d(0) @@ -68,7 +68,7 @@ namespace boost { ios_info::~ios_info() { } - + ios_info::ios_info(ios_info const &other) { flags_ = other.flags_; @@ -89,23 +89,23 @@ namespace boost { return *this; } - void ios_info::display_flags(uint64_t f) + void ios_info::display_flags(uint64_t f) { flags_ = (flags_ & ~uint64_t(flags::display_flags_mask)) | f; } - void ios_info::currency_flags(uint64_t f) + void ios_info::currency_flags(uint64_t f) { flags_ = (flags_ & ~uint64_t(flags::currency_flags_mask)) | f; } - void ios_info::date_flags(uint64_t f) + void ios_info::date_flags(uint64_t f) { flags_ = (flags_ & ~uint64_t(flags::date_flags_mask)) | f; } - void ios_info::time_flags(uint64_t f) + void ios_info::time_flags(uint64_t f) { flags_ = (flags_ & ~uint64_t(flags::time_flags_mask)) | f; } - + void ios_info::domain_id(int id) { domain_id_ = id; @@ -130,7 +130,7 @@ namespace boost { { return flags_ & flags::date_flags_mask; } - + uint64_t ios_info::time_flags() const { return flags_ & flags::time_flags_mask; @@ -151,7 +151,7 @@ namespace boost { return datetime_; } - + ios_info::string_set &ios_info::date_time_pattern_set() { return datetime_; diff --git a/src/shared/generator.cpp b/src/shared/generator.cpp index 82fab197..cfd588da 100644 --- a/src/shared/generator.cpp +++ b/src/shared/generator.cpp @@ -72,7 +72,7 @@ namespace boost { { d->chars=t; } - + character_facet_type generator::characters() const { return d->chars; @@ -83,7 +83,7 @@ namespace boost { if(std::find(d->domains.begin(),d->domains.end(),domain) == d->domains.end()) d->domains.push_back(domain); } - + void generator::set_default_messages_domain(std::string const &domain) { std::vector::iterator p; @@ -171,11 +171,11 @@ namespace boost { { return d->caching_enabled; } - void generator::locale_cache_enabled(bool enabled) + void generator::locale_cache_enabled(bool enabled) { d->caching_enabled = enabled; } - + void generator::set_all_options(localization_backend& backend,std::string const &id) const { backend.set_option("locale",id); @@ -186,7 +186,7 @@ namespace boost { for(size_t i=0;ipaths.size();i++) backend.set_option("message_path",d->paths[i]); } - + } // locale } // boost -// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 +// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/src/shared/ids.cpp b/src/shared/ids.cpp index d1ccf2f5..cc625a2f 100644 --- a/src/shared/ids.cpp +++ b/src/shared/ids.cpp @@ -47,7 +47,7 @@ namespace boost { #endif - namespace boundary { + namespace boundary { std::locale::id boundary_indexing::id; boundary_indexing::~boundary_indexing() {} diff --git a/src/shared/ios_prop.hpp b/src/shared/ios_prop.hpp index 0a820e12..1483b712 100644 --- a/src/shared/ios_prop.hpp +++ b/src/shared/ios_prop.hpp @@ -12,8 +12,8 @@ namespace boost { namespace locale { namespace impl { - - template + + template class ios_prop { public: static void set(Property const &prop,std::ios_base &ios) @@ -30,7 +30,7 @@ namespace boost { *static_cast(ios.pword(id))=prop; } } - + static Property &get(std::ios_base &ios) { int id=get_id(); @@ -38,7 +38,7 @@ namespace boost { set(Property(),ios); return *static_cast(ios.pword(id)); } - + static bool has(std::ios_base &ios) { int id=get_id(); @@ -62,7 +62,7 @@ namespace boost { } private: static void * const invalid; - + static void callback(std::ios_base::event ev,std::ios_base &ios,int id) { switch(ev) { @@ -79,9 +79,9 @@ namespace boost { case std::ios_base::imbue_event: if(ios.pword(id)==invalid || ios.pword(id)==0) break; - reinterpret_cast(ios.pword(id))->on_imbue(); + reinterpret_cast(ios.pword(id))->on_imbue(); break; - + default: ; } } @@ -105,5 +105,5 @@ namespace boost { #endif -// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 +// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/src/shared/localization_backend.cpp b/src/shared/localization_backend.cpp index 53c8a36d..f8965486 100644 --- a/src/shared/localization_backend.cpp +++ b/src/shared/localization_backend.cpp @@ -44,7 +44,7 @@ namespace boost { all_backends_.push_back(v); } } - impl() : + impl() : default_backends_(32,-1) { } @@ -64,7 +64,7 @@ namespace boost { for(unsigned i=0;i= index_.size()) return l; - if(index_[id]==-1) + if(index_[id]==-1) return l; return backends_[index_[id]]->install(l,category,type); } @@ -158,7 +158,7 @@ namespace boost { - localization_backend_manager::localization_backend_manager() : + localization_backend_manager::localization_backend_manager() : pimpl_(new impl()) { } @@ -241,7 +241,7 @@ namespace boost { } struct init { - init() { + init() { localization_backend_manager mgr; #ifdef BOOST_LOCALE_WITH_ICU mgr.adopt_backend("icu",impl_icu::create_localization_backend()); @@ -254,7 +254,7 @@ namespace boost { #ifndef BOOST_LOCALE_NO_WINAPI_BACKEND mgr.adopt_backend("winapi",impl_win::create_localization_backend()); #endif - + #ifndef BOOST_LOCALE_NO_STD_BACKEND mgr.adopt_backend("std",impl_std::create_localization_backend()); #endif @@ -282,4 +282,4 @@ namespace boost { } // locale } // boost -// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 +// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/src/shared/message.cpp b/src/shared/message.cpp index 609194da..a1bba43a 100644 --- a/src/shared/message.cpp +++ b/src/shared/message.cpp @@ -42,15 +42,15 @@ namespace boost { namespace locale { namespace gnu_gettext { - + class c_file { c_file(c_file const &); void operator=(c_file const &); public: - + FILE *file; - c_file() : + c_file() : file(0) { } @@ -90,7 +90,7 @@ namespace boost { #else // POSIX systems do not have all this Wide API crap, as native codepages are UTF-8 // We do not use encoding as we use native file name encoding - + bool open(std::string const &file_name,std::string const &/* encoding */) { close(); @@ -107,7 +107,7 @@ namespace boost { class mo_file { public: typedef std::pair pair_type; - + mo_file(std::vector &file) : native_byteorder_(true), size_(0) @@ -137,13 +137,13 @@ namespace boost { st = pj_winberger_hash::update_state(st,context_in); st = pj_winberger_hash::update_state(st,'\4'); // EOT st = pj_winberger_hash::update_state(st,key_in); - hkey = st; + hkey = st; } uint32_t incr = 1 + hkey % (hash_size_-2); hkey %= hash_size_; uint32_t orig=hkey; - - + + do { uint32_t idx = get(hash_offset_ + 4*hkey); /// Not found @@ -168,13 +168,13 @@ namespace boost { size_t key_len = strlen(key); if(cntx_len + 1 + key_len != real_len) return false; - return + return memcmp(real_key,cntx,cntx_len) == 0 && real_key[cntx_len] == '\4' && memcmp(real_key + cntx_len + 1 ,key,key_len) == 0; } } - + char const *key(int id) const { uint32_t off = get(keys_offset_ + id*8 + 4); @@ -240,14 +240,14 @@ namespace boost { // ok to ingnore fread result size_t four_bytes = fread(&magic,4,1,file); (void)four_bytes; // shut GCC - + if(magic == 0x950412de) native_byteorder_ = true; else if(magic == 0xde120495) native_byteorder_ = false; else throw std::runtime_error("Invalid file format"); - + fseek(file,0,SEEK_END); long len=ftell(file); if(len < 0) { @@ -260,7 +260,7 @@ namespace boost { data_ = &vdata_[0]; file_size_ = len; } - + uint32_t get(unsigned offset) const { uint32_t tmp; @@ -304,7 +304,7 @@ namespace boost { return pair_type((char_type const *)(0),(char_type const *)(0)); } }; - + template<> struct mo_file_use_traits { static const bool in_use = true; @@ -332,7 +332,7 @@ namespace boost { private: std::string in_; }; - + template<> class converter { public: @@ -377,7 +377,7 @@ namespace boost { if(c!=0) c_context_ = c; else - c_context_ = ∅ + c_context_ = ∅ } bool operator < (message_key const &other) const { @@ -453,8 +453,8 @@ namespace boost { return state; } }; - - + + // By default for wide types the conversion is not requiredyy template CharType const *runtime_conversion(CharType const *msg, @@ -507,7 +507,7 @@ namespace boost { if(!ptr.first) return 0; int form=0; - if(plural_forms_.at(domain_id)) + if(plural_forms_.at(domain_id)) form = (*plural_forms_[domain_id])(n); else form = n == 1 ? 0 : 1; // Fallback to english plural form @@ -541,17 +541,17 @@ namespace boost { std::string lc_cat = inf.locale_category; std::vector const &domains = inf.domains; std::vector const &search_paths = inf.paths; - + // - // List of fallbacks: en_US@euro, en@euro, en_US, en. + // List of fallbacks: en_US@euro, en@euro, en_US, en. // std::vector paths; - if(!variant.empty() && !country.empty()) + if(!variant.empty() && !country.empty()) paths.push_back(language + "_" + country + "@" + variant); - if(!variant.empty()) + if(!variant.empty()) paths.push_back(language + "@" + variant); if(!country.empty()) @@ -570,7 +570,7 @@ namespace boost { domains_[domain]=i; - bool found=false; + bool found=false; for(unsigned j=0;!found && j(msg,buffer,key_conversion_required_,locale_encoding_,key_encoding_); @@ -588,7 +588,7 @@ namespace boost { private: int compare_encodings(std::string const &left,std::string const &right) { - return convert_encoding_name(left).compare(convert_encoding_name(right)); + return convert_encoding_name(left).compare(convert_encoding_name(right)); } std::string convert_encoding_name(std::string const &in) @@ -616,15 +616,15 @@ namespace boost { { locale_encoding_ = locale_encoding; key_encoding_ = key_encoding; - - key_conversion_required_ = sizeof(CharType) == 1 + + key_conversion_required_ = sizeof(CharType) == 1 && compare_encodings(locale_encoding,key_encoding)!=0; boost::shared_ptr mo; if(callback) { std::vector vfile = callback(file_name,locale_encoding); - if(vfile.empty()) + if(vfile.empty()) return false; mo.reset(new mo_file(vfile)); } @@ -635,7 +635,7 @@ namespace boost { return false; mo.reset(new mo_file(the_file.file)); } - + std::string plural = extract(mo->value(0).first,"plural=","\r\n;"); std::string mo_encoding = extract(mo->value(0).first,"charset="," \r\n;"); @@ -658,7 +658,7 @@ namespace boost { char const *ckey = mo->key(i); string_type skey = cvt_key(ckey,ckey+strlen(ckey)); key_type key(skey); - + mo_file::pair_type tmp = mo->value(i); string_type value = cvt_value(tmp.first,tmp.second); catalogs_[idx][key].swap(value); @@ -695,7 +695,7 @@ BOOST_LOCALE_END_CONST_CONDITION return true; } - + static std::string extract(std::string const &meta,std::string const &key,char const *separator) { @@ -737,7 +737,7 @@ BOOST_LOCALE_END_CONST_CONDITION domains_map_type domains_; std::string locale_encoding_; - std::string key_encoding_; + std::string key_encoding_; bool key_conversion_required_; }; @@ -752,7 +752,7 @@ BOOST_LOCALE_END_CONST_CONDITION { return new mo_message(info); } - + #ifdef BOOST_LOCALE_ENABLE_CHAR16_T template<> @@ -761,7 +761,7 @@ BOOST_LOCALE_END_CONST_CONDITION return new mo_message(info); } #endif - + #ifdef BOOST_LOCALE_ENABLE_CHAR32_T template<> diff --git a/src/shared/mo_lambda.cpp b/src/shared/mo_lambda.cpp index 11f7d9fb..5306fcaa 100644 --- a/src/shared/mo_lambda.cpp +++ b/src/shared/mo_lambda.cpp @@ -26,9 +26,9 @@ namespace { // anon } }; - struct unary : public plural + struct unary : public plural { - unary(plural_ptr ptr) : + unary(plural_ptr ptr) : op1(ptr) { } @@ -37,7 +37,7 @@ namespace { // anon }; - struct binary : public plural + struct binary : public plural { binary(plural_ptr p1,plural_ptr p2) : op1(p1), @@ -50,7 +50,7 @@ namespace { // anon struct number : public plural { - number(int v) : + number(int v) : val(v) { } @@ -179,12 +179,12 @@ namespace { // anon return (*op1)(n) ? (*op2)(n) : (*op3)(n); } conditional *clone() const BOOST_OVERRIDE - { - plural_ptr op1_copy(op1->clone()); - plural_ptr op2_copy(op2->clone()); - plural_ptr op3_copy(op3->clone()); - return new conditional(op1_copy,op2_copy,op3_copy); - } + { + plural_ptr op1_copy(op1->clone()); + plural_ptr op2_copy(op2->clone()); + plural_ptr op3_copy(op3->clone()); + return new conditional(op1_copy,op2_copy,op3_copy); + } private: plural_ptr op1,op2,op3; }; @@ -254,11 +254,11 @@ namespace { // anon { return c==' ' || c=='\r' || c=='\n' || c=='\t'; } - bool isdigit(char c) + bool isdigit(char c) { - return '0'<=c && c<='9'; + return '0'<=c && c<='9'; } - void step() + void step() { while(text[pos] && is_blank(text[pos])) pos++; char const *ptr=text+pos; @@ -339,14 +339,14 @@ namespace { // anon static int level_unary[]={3,'-','!','~'}; if(is_in(t.next(),level_unary)) { int op=t.get(); - if((op1=un_expr()).get()==0) + if((op1=un_expr()).get()==0) return plural_ptr(); switch(op) { - case '-': + case '-': return plural_ptr(new minus(op1)); - case '!': + case '!': return plural_ptr(new l_not(op1)); - case '~': + case '~': return plural_ptr(new bin_not(op1)); default: return plural_ptr(); @@ -407,5 +407,5 @@ plural_ptr compile(char const *str) } // locale } // boost -// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 +// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/src/shared/mo_lambda.hpp b/src/shared/mo_lambda.hpp index c32ea55b..d4e5f5f7 100644 --- a/src/shared/mo_lambda.hpp +++ b/src/shared/mo_lambda.hpp @@ -14,7 +14,7 @@ namespace boost { namespace locale { namespace gnu_gettext { namespace lambda { - + struct plural { virtual int operator()(int n) const = 0; @@ -26,11 +26,11 @@ namespace boost { plural_ptr compile(char const *c_expression); - } // lambda + } // lambda } // gnu_gettext - } // locale + } // locale } // boost #endif -// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 +// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/src/std/all_generator.hpp b/src/std/all_generator.hpp index 00169140..a04d4405 100644 --- a/src/std/all_generator.hpp +++ b/src/std/all_generator.hpp @@ -45,7 +45,7 @@ namespace boost { std::locale create_codecvt( std::locale const &in, std::string const &locale_name, character_facet_type type, - utf8_support utf = utf8_none); + utf8_support utf = utf8_none); } } diff --git a/src/std/codecvt.cpp b/src/std/codecvt.cpp index 7a6b6ef0..c9f21281 100644 --- a/src/std/codecvt.cpp +++ b/src/std/codecvt.cpp @@ -23,7 +23,7 @@ namespace impl_std { std::locale create_codecvt( std::locale const &in, std::string const &locale_name, character_facet_type type, - utf8_support utf) + utf8_support utf) { if(utf == utf8_from_wide) { return util::create_utf8_codecvt(in,type); @@ -47,7 +47,7 @@ namespace impl_std { } } // impl_std -} // locale +} // locale } // boost // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/src/std/collate.cpp b/src/std/collate.cpp index 5f57dea5..9efc27d7 100644 --- a/src/std/collate.cpp +++ b/src/std/collate.cpp @@ -19,7 +19,7 @@ namespace impl_std { class utf8_collator_from_wide : public std::collate { public: typedef std::collate wfacet; - utf8_collator_from_wide(std::locale const &base,size_t refs = 0) : + utf8_collator_from_wide(std::locale const &base,size_t refs = 0) : std::collate(refs), base_(base) { @@ -39,7 +39,7 @@ class utf8_collator_from_wide : public std::collate { std::string do_transform(char const *b,char const *e) const BOOST_OVERRIDE { std::wstring tmp=conv::to_utf(b,e,"UTF-8"); - std::wstring wkey = + std::wstring wkey = std::use_facet(base_).transform(tmp.c_str(),tmp.c_str()+tmp.size()); std::string key; BOOST_LOCALE_START_CONST_CONDITION @@ -107,7 +107,7 @@ std::locale create_collate( std::locale const &in, } // impl_std -} // locale +} // locale } //boost diff --git a/src/std/converter.cpp b/src/std/converter.cpp index 299d568b..a8dc0f31 100644 --- a/src/std/converter.cpp +++ b/src/std/converter.cpp @@ -26,13 +26,13 @@ namespace locale { namespace impl_std { template -class std_converter : public converter +class std_converter : public converter { public: typedef CharType char_type; typedef std::basic_string string_type; typedef std::ctype ctype_type; - std_converter(std::locale const &base,size_t refs = 0) : + std_converter(std::locale const &base,size_t refs = 0) : converter(refs), base_(base) { @@ -67,7 +67,7 @@ class utf8_converter : public converter { public: typedef std::ctype ctype_type; typedef std::ctype wctype_type; - utf8_converter(std::locale const &base,size_t refs = 0) : + utf8_converter(std::locale const &base,size_t refs = 0) : converter(refs), base_(base) { @@ -105,7 +105,7 @@ std::locale create_convert( std::locale const &in, utf8_support utf) { switch(type) { - case char_facet: + case char_facet: { if(utf == utf8_native_with_wide || utf == utf8_from_wide) { std::locale base(std::locale::classic(),new std::ctype_byname(locale_name.c_str())); @@ -140,6 +140,6 @@ std::locale create_convert( std::locale const &in, } // namespace impl_std -} // locale +} // locale } // boost // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/src/std/numeric.cpp b/src/std/numeric.cpp index 06ce7167..885a570d 100644 --- a/src/std/numeric.cpp +++ b/src/std/numeric.cpp @@ -25,7 +25,7 @@ namespace impl_std { template class time_put_from_base : public std::time_put { public: - time_put_from_base(std::locale const &base, size_t refs = 0) : + time_put_from_base(std::locale const &base, size_t refs = 0) : std::time_put(refs), base_(base) { @@ -44,7 +44,7 @@ class time_put_from_base : public std::time_put { class utf8_time_put_from_wide : public std::time_put { public: - utf8_time_put_from_wide(std::locale const &base, size_t refs = 0) : + utf8_time_put_from_wide(std::locale const &base, size_t refs = 0) : std::time_put(refs), base_(base) { @@ -71,14 +71,14 @@ class utf8_numpunct_from_wide : public std::numpunct { { typedef std::numpunct wfacet_type; wfacet_type const &wfacet = std::use_facet(base); - + truename_ = conv::from_utf(wfacet.truename(),"UTF-8"); falsename_ = conv::from_utf(wfacet.falsename(),"UTF-8"); - + wchar_t tmp_decimal_point = wfacet.decimal_point(); wchar_t tmp_thousands_sep = wfacet.thousands_sep(); std::string tmp_grouping = wfacet.grouping(); - + if( 32 <= tmp_thousands_sep && tmp_thousands_sep <=126 && 32 <= tmp_decimal_point && tmp_decimal_point <=126) { @@ -131,7 +131,7 @@ class utf8_numpunct_from_wide : public std::numpunct { char thousands_sep_; char decimal_point_; std::string grouping_; - + }; template @@ -230,7 +230,7 @@ class utf8_moneypunct_from_wide : public std::moneypunct { std::string negative_sign_; int frac_digits_; std::money_base::pattern pos_format_,neg_format_; - + }; class utf8_numpunct : public std::numpunct_byname { @@ -315,11 +315,11 @@ std::locale create_formatting( std::locale const &in, utf8_support utf) { switch(type) { - case char_facet: + case char_facet: { if(utf == utf8_from_wide ) { std::locale base = std::locale(locale_name.c_str()); - + std::locale tmp = std::locale(in,new utf8_time_put_from_wide(base)); tmp = std::locale(tmp,new utf8_numpunct_from_wide(base)); tmp = std::locale(tmp,new utf8_moneypunct_from_wide(base)); @@ -388,7 +388,7 @@ std::locale create_parsing( std::locale const &in, { if(utf == utf8_from_wide ) { std::locale base = std::locale::classic(); - + base = std::locale(base,new std::numpunct_byname(locale_name.c_str())); base = std::locale(base,new std::moneypunct_byname(locale_name.c_str())); base = std::locale(base,new std::moneypunct_byname(locale_name.c_str())); @@ -412,7 +412,7 @@ std::locale create_parsing( std::locale const &in, tmp = std::locale(tmp,new utf8_moneypunct_from_wide(base)); return std::locale(tmp,new util::base_num_parse()); } - else + else { std::locale tmp = create_basic_parsing(in,locale_name); tmp = std::locale(in,new util::base_num_parse()); @@ -448,7 +448,7 @@ std::locale create_parsing( std::locale const &in, } // impl_std -} // locale +} // locale } //boost diff --git a/src/std/std_backend.cpp b/src/std/std_backend.cpp index 67e8bda1..328348d4 100644 --- a/src/std/std_backend.cpp +++ b/src/std/std_backend.cpp @@ -28,16 +28,16 @@ namespace boost { namespace locale { -namespace impl_std { - +namespace impl_std { + class std_localization_backend : public localization_backend { public: - std_localization_backend() : + std_localization_backend() : invalid_(true), use_ansi_encoding_(false) { } - std_localization_backend(std_localization_backend const &other) : + std_localization_backend(std_localization_backend const &other) : localization_backend(), paths_(other.paths_), domains_(other.domains_), @@ -100,8 +100,8 @@ namespace impl_std { utf_mode_ = utf8_none; } #if defined(BOOST_WINDOWS) - else if(loadable(win_name) - && win_codepage == conv::impl::encoding_to_windows_codepage(data_.encoding.c_str())) + else if(loadable(win_name) + && win_codepage == conv::impl::encoding_to_windows_codepage(data_.encoding.c_str())) { name_ = win_name; utf_mode_ = utf8_none; @@ -121,7 +121,7 @@ namespace impl_std { #endif } } - + #if defined(BOOST_WINDOWS) std::pair to_windows_name(std::string const &l) { @@ -137,7 +137,7 @@ namespace impl_std { lc_name += "_"; lc_name += win_country; } - + res.first = lc_name; if(GetLocaleInfoA(lcid,LOCALE_IDEFAULTANSICODEPAGE,win_codepage,sizeof(win_codepage))!=0) @@ -145,7 +145,7 @@ namespace impl_std { return res; } #endif - + bool loadable(std::string name) { try { @@ -156,7 +156,7 @@ namespace impl_std { return false; } } - + std::locale install(std::locale const &base, locale_category_type category, character_facet_type type = nochar_facet) BOOST_OVERRIDE @@ -222,7 +222,7 @@ namespace impl_std { bool invalid_; bool use_ansi_encoding_; }; - + localization_backend *create_localization_backend() { return new std_localization_backend(); @@ -231,4 +231,4 @@ namespace impl_std { } // impl icu } // locale } // boost -// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 +// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/src/std/std_backend.hpp b/src/std/std_backend.hpp index 0caf779c..4397e207 100644 --- a/src/std/std_backend.hpp +++ b/src/std/std_backend.hpp @@ -10,11 +10,11 @@ namespace boost { namespace locale { class localization_backend; - namespace impl_std { + namespace impl_std { localization_backend *create_localization_backend(); } // impl_std - } // locale + } // locale } // boost #endif -// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 +// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/src/util/codecvt_converter.cpp b/src/util/codecvt_converter.cpp index 69f035df..e33f902e 100644 --- a/src/util/codecvt_converter.cpp +++ b/src/util/codecvt_converter.cpp @@ -17,12 +17,12 @@ #include "../encoding/conv.hpp" //#define DEBUG_CODECVT -#ifdef DEBUG_CODECVT +#ifdef DEBUG_CODECVT #include #endif #ifdef BOOST_MSVC -# pragma warning(disable : 4244 4996) // loose data +# pragma warning(disable : 4244 4996) // loose data #endif namespace boost { @@ -30,7 +30,7 @@ namespace locale { namespace util { base_converter::~base_converter() {} - + class utf8_converter : public base_converter { public: int max_len() const BOOST_OVERRIDE @@ -51,7 +51,7 @@ namespace util { uint32_t to_unicode(char const *&begin,char const *end) BOOST_OVERRIDE { char const *p=begin; - + utf::code_point c = utf::utf_traits::decode(p,end); if(c==utf::illegal) @@ -79,7 +79,7 @@ namespace util { class simple_converter_impl { public: - + static const int hash_table_size = 1024; simple_converter_impl(std::string const &encoding) @@ -147,7 +147,7 @@ namespace util { class simple_converter : public base_converter { public: - simple_converter(std::string const &encoding) : + simple_converter(std::string const &encoding) : cvt_(encoding) { } @@ -163,7 +163,7 @@ namespace util { } base_converter *clone() const BOOST_OVERRIDE { - return new simple_converter(*this); + return new simple_converter(*this); } uint32_t to_unicode(char const *&begin,char const *end) BOOST_OVERRIDE @@ -190,7 +190,7 @@ namespace util { } struct state_type {}; - static state_type initial_state(generic_codecvt_base::initial_convertion_state /* unused */) + static state_type initial_state(generic_codecvt_base::initial_convertion_state /* unused */) { return state_type(); } @@ -199,7 +199,7 @@ namespace util { return 1; } - utf::code_point to_unicode(state_type &,char const *&begin,char const *end) const + utf::code_point to_unicode(state_type &,char const *&begin,char const *end) const { return cvt_.to_unicode(begin,end); } @@ -209,8 +209,8 @@ namespace util { return cvt_.from_unicode(u,begin,end); } private: - simple_converter_impl cvt_; - + simple_converter_impl cvt_; + }; namespace { @@ -262,7 +262,7 @@ namespace util { compare_strings); return 0; } - + #if BOOST_LOCALE_USE_AUTO_PTR std::auto_ptr create_utf8_converter() { @@ -307,7 +307,7 @@ namespace util { { return new utf8_converter(); } - + template class code_converter : public generic_codecvt > { @@ -320,8 +320,8 @@ namespace util { #define PTR_TRANS(x) (x) #endif typedef base_converter_ptr state_type; - - code_converter(base_converter_ptr cvt,size_t refs = 0) : + + code_converter(base_converter_ptr cvt,size_t refs = 0) : generic_codecvt >(refs), cvt_(PTR_TRANS(cvt)) { @@ -343,7 +343,7 @@ namespace util { return r; } - utf::code_point to_unicode(base_converter_ptr &ptr,char const *&begin,char const *end) const + utf::code_point to_unicode(base_converter_ptr &ptr,char const *&begin,char const *end) const { if(thread_safe_) return cvt_->to_unicode(begin,end); @@ -358,7 +358,7 @@ namespace util { else return ptr->from_unicode(u,begin,end); } - + private: base_converter_ptr cvt_; int max_len_; @@ -390,10 +390,10 @@ namespace util { } - /// + /// /// Install utf8 codecvt to UTF-16 or UTF-32 into locale \a in and return - /// new locale that is based on \a in and uses new facet. - /// + /// new locale that is based on \a in and uses new facet. + /// std::locale create_utf8_codecvt(std::locale const &in,character_facet_type type) { switch(type) { @@ -417,7 +417,7 @@ namespace util { /// /// This function installs codecvt that can be used for conversion between single byte /// character encodings like ISO-8859-1, koi8-r, windows-1255 and Unicode code points, - /// + /// /// Throws invalid_charset_error if the chacater set is not supported or isn't single byte character /// set std::locale create_simple_codecvt(std::locale const &in,std::string const &encoding,character_facet_type type) @@ -446,7 +446,7 @@ namespace util { } // util -} // locale +} // locale } // boost // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/src/util/default_locale.cpp b/src/util/default_locale.cpp index 398645fc..beb581bd 100644 --- a/src/util/default_locale.cpp +++ b/src/util/default_locale.cpp @@ -68,7 +68,7 @@ namespace boost { lc_name += ".UTF-8"; } return lc_name; - + #endif } } // impl diff --git a/src/util/gregorian.cpp b/src/util/gregorian.cpp index c3df4727..59d48d5e 100644 --- a/src/util/gregorian.cpp +++ b/src/util/gregorian.cpp @@ -70,7 +70,7 @@ namespace util { }; return days[is_leap(year)][month-1] + day - 1; } - + std::time_t internal_timegm(std::tm const *t) { int year = t->tm_year + 1900; @@ -88,10 +88,10 @@ namespace util { int day = t->tm_mday; int day_of_year = days_from_1jan(year,month,day); int days_since_epoch = days_from_1970(year) + day_of_year; - + std::time_t seconds_in_day = 3600 * 24; std::time_t result = seconds_in_day * days_since_epoch + 3600 * t->tm_hour + 60 * t->tm_min + t->tm_sec; - + return result; } @@ -108,7 +108,7 @@ namespace util { { return strcmp(left,right) < 0; } - + // // Ref: CLDR 1.9 common/supplemental/supplementalData.xml // @@ -128,7 +128,7 @@ namespace util { "AR","AS","AZ","BW","CA","CN","FO","GE","GL","GU", "HK","IL","IN","JM","JP","KG","KR","LA","MH","MN", "MO","MP","MT","NZ","PH","PK","SG","TH","TT","TW", - "UM","US","UZ","VI","ZW" + "UM","US","UZ","VI","ZW" }; if(strcmp(terr,"MV") == 0) return 5; // fri @@ -143,7 +143,7 @@ namespace util { class gregorian_calendar : public abstract_calendar { public: - + gregorian_calendar(std::string const &terr) { first_day_of_week_ = first_day_of_week(terr.c_str()); @@ -152,7 +152,7 @@ namespace util { tzoff_ = 0; from_time(time_); } - + /// /// Make a polymorphic copy of the calendar /// @@ -200,7 +200,7 @@ namespace util { tm_updated_.tm_mday += (value - (tm_updated_.tm_yday + 1)); break; case day_of_week: ///< Day of week, starting from Sunday, [1..7] - if(value < 1) // make sure it is positive + if(value < 1) // make sure it is positive value += (-value / 7) * 7 + 7; // convert to local DOW value = (value - 1 - first_day_of_week_ + 14) % 7 + 1; @@ -259,9 +259,9 @@ namespace util { if(!gmtime_r(&point,&val)) throw date_time_error("boost::locale::gregorian_calendar invalid time"); #endif - + } - + time_ = point - tzoff_; tm_ = val; tm_updated_ = val; @@ -281,7 +281,7 @@ namespace util { // Alaways use local week start int current_dow = (wday - first_day_of_week_ + 7) % 7; // Calculate local week day of Jan 1st. - int first_week_day = (current_dow + 700 - day) % 7; + int first_week_day = (current_dow + 700 - day) % 7; // adding something big devidable by 7 int start_of_period_in_weeks; @@ -318,7 +318,7 @@ namespace util { if(sizeof(std::time_t) == 4) return 1901; // minimal year with 32 bit time_t else - return 1; + return 1; #endif case absolute_maximum: case least_maximum: @@ -479,7 +479,7 @@ BOOST_LOCALE_END_CONST_CONDITION break; case period::marks::first_day_of_week: ///< For example Sunday in US, Monday in France return first_day_of_week_ + 1; - + case week_of_year: ///< The week number in the year switch(v) { case absolute_minimum: @@ -557,7 +557,7 @@ BOOST_LOCALE_END_CONST_CONDITION ; } return 0; - + } /// @@ -718,7 +718,7 @@ BOOST_LOCALE_END_CONST_CONDITION } case month: { - int diff = 12 * (other->tm_.tm_year - tm_.tm_year) + int diff = 12 * (other->tm_.tm_year - tm_.tm_year) + other->tm_.tm_mon - tm_.tm_mon; return get_diff(period::marks::month,diff,other); } @@ -779,8 +779,8 @@ BOOST_LOCALE_END_CONST_CONDITION gregorian_calendar const *gcal = dynamic_cast(other); if(!gcal) return false; - return - gcal->tzoff_ == tzoff_ + return + gcal->tzoff_ == tzoff_ && gcal->is_local_ == is_local_ && gcal->first_day_of_week_ == first_day_of_week_; } @@ -814,9 +814,9 @@ BOOST_LOCALE_END_CONST_CONDITION bool is_local_; int tzoff_; std::string time_zone_name_; - + }; - + abstract_calendar *create_gregorian_calendar(std::string const &terr) { return new gregorian_calendar(terr); @@ -824,7 +824,7 @@ BOOST_LOCALE_END_CONST_CONDITION class gregorian_facet : public calendar_facet { public: - gregorian_facet(std::string const &terr,size_t refs = 0) : + gregorian_facet(std::string const &terr,size_t refs = 0) : calendar_facet(refs), terr_(terr) { @@ -836,7 +836,7 @@ BOOST_LOCALE_END_CONST_CONDITION private: std::string terr_; }; - + std::locale install_gregorian_calendar(std::locale const &in,std::string const &terr) { return std::locale(in,new gregorian_facet(terr)); @@ -844,7 +844,7 @@ BOOST_LOCALE_END_CONST_CONDITION } // util -} // locale +} // locale } //boost diff --git a/src/util/gregorian.hpp b/src/util/gregorian.hpp index dc8c5d59..8fa2753b 100644 --- a/src/util/gregorian.hpp +++ b/src/util/gregorian.hpp @@ -17,7 +17,7 @@ namespace util { std::locale install_gregorian_calendar(std::locale const &in,std::string const &terr); } // util -} // locale +} // locale } //boost diff --git a/src/util/iconv.hpp b/src/util/iconv.hpp index 3dc69fbc..d201dc2b 100644 --- a/src/util/iconv.hpp +++ b/src/util/iconv.hpp @@ -51,7 +51,7 @@ namespace boost { } #endif - } // locale + } // locale } // boost #endif diff --git a/src/util/info.cpp b/src/util/info.cpp index e8aab727..974e0d49 100644 --- a/src/util/info.cpp +++ b/src/util/info.cpp @@ -60,7 +60,7 @@ namespace util { locale_data d; std::string name_; }; - + std::locale create_info(std::locale const &in,std::string const &name) { return std::locale(in,new simple_info(name)); @@ -68,7 +68,7 @@ namespace util { } // util -} // locale +} // locale } //boost diff --git a/src/util/locale_data.cpp b/src/util/locale_data.cpp index a0070d53..e65bc293 100644 --- a/src/util/locale_data.cpp +++ b/src/util/locale_data.cpp @@ -23,7 +23,7 @@ namespace util { parse_from_lang(locale_name); } - void locale_data::parse_from_lang(std::string const &locale_name) + void locale_data::parse_from_lang(std::string const &locale_name) { size_t end = locale_name.find_first_of("-_@."); std::string tmp = locale_name.substr(0,end); @@ -50,7 +50,7 @@ namespace util { } } - void locale_data::parse_from_country(std::string const &locale_name) + void locale_data::parse_from_country(std::string const &locale_name) { size_t end = locale_name.find_first_of("@."); std::string tmp = locale_name.substr(0,end); @@ -74,8 +74,8 @@ namespace util { parse_from_variant(locale_name.substr(end+1)); } } - - void locale_data::parse_from_encoding(std::string const &locale_name) + + void locale_data::parse_from_encoding(std::string const &locale_name) { size_t end = locale_name.find_first_of("@"); std::string tmp = locale_name.substr(0,end); @@ -86,7 +86,7 @@ namespace util { tmp[i]=tmp[i]-'A'+'a'; } encoding = tmp; - + utf8 = conv::impl::normalize_encoding(encoding.c_str()) == "utf8"; if(end >= locale_name.size()) @@ -107,7 +107,7 @@ namespace util { } } // util -} // locale +} // locale } // boost // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/src/util/locale_data.hpp b/src/util/locale_data.hpp index 5b929f14..22154218 100644 --- a/src/util/locale_data.hpp +++ b/src/util/locale_data.hpp @@ -13,10 +13,10 @@ namespace boost { namespace locale { namespace util { - + class locale_data { public: - locale_data() : + locale_data() : language("C"), encoding("us-ascii"), utf8(false) @@ -40,7 +40,7 @@ namespace boost { }; } // util - } // locale + } // locale } // boost #endif diff --git a/src/util/numeric.hpp b/src/util/numeric.hpp index 5518bd14..ed7be04d 100644 --- a/src/util/numeric.hpp +++ b/src/util/numeric.hpp @@ -69,12 +69,12 @@ class base_num_format : public std::num_put typedef std::basic_string string_type; typedef CharType char_type; - base_num_format(size_t refs = 0) : + base_num_format(size_t refs = 0) : std::num_put(refs) { } -protected: - +protected: + iter_type do_put (iter_type out, std::ios_base &ios, char_type fill, long val) const BOOST_OVERRIDE { @@ -92,8 +92,8 @@ class base_num_format : public std::num_put { return do_real_put(out,ios,fill,val); } - - #ifndef BOOST_NO_LONG_LONG + + #ifndef BOOST_NO_LONG_LONG iter_type do_put (iter_type out, std::ios_base &ios, char_type fill, long long val) const BOOST_OVERRIDE { return do_real_put(out,ios,fill,val); @@ -139,7 +139,7 @@ class base_num_format : public std::num_put return format_time(out,ios,fill,static_cast(val),info.date_time_pattern()); case flags::currency: { - bool nat = info.currency_flags()==flags::currency_default + bool nat = info.currency_flags()==flags::currency_default || info.currency_flags() == flags::currency_national; bool intl = !nat; return do_format_currency(intl,out,ios,fill,static_cast(val)); @@ -210,7 +210,7 @@ class base_num_format : public std::num_put #else gmtime_r(&time,&tm); #endif - + #if BOOST_OS_LINUX || BOOST_OS_BSD_FREE || defined(__APPLE__) // These have extra fields to specify timezone if(gmtoff!=0) { @@ -224,13 +224,13 @@ class base_num_format : public std::num_put std::use_facet >(ios.getloc()).put(tmp_out,tmp_out,fill,&tm,format.c_str(),format.c_str()+format.size()); string_type str = tmp_out.str(); std::streamsize on_left=0,on_right = 0; - std::streamsize points = + std::streamsize points = formatting_size_traits::size(str,ios.getloc()); if(points < ios.width()) { std::streamsize n = ios.width() - points; - + std::ios_base::fmtflags flags = ios.flags() & std::ios_base::adjustfield; - + // // we do not really know internal point, so we assume that it does not // exist. so according to the standard field should be right aligned @@ -259,11 +259,11 @@ template class base_num_parse : public std::num_get { public: - base_num_parse(size_t refs = 0) : + base_num_parse(size_t refs = 0) : std::num_get(refs) { } -protected: +protected: typedef typename std::num_get::iter_type iter_type; typedef std::basic_string string_type; typedef CharType char_type; @@ -303,7 +303,7 @@ class base_num_parse : public std::num_get return do_real_get(in,end,ios,err,val); } - #ifndef BOOST_NO_LONG_LONG + #ifndef BOOST_NO_LONG_LONG iter_type do_get (iter_type in, iter_type end, std::ios_base &ios,std::ios_base::iostate &err,long long &val) const BOOST_OVERRIDE { return do_real_get(in,end,ios,err,val); @@ -317,7 +317,7 @@ class base_num_parse : public std::num_get #endif private: - + template iter_type do_real_get(iter_type in,iter_type end,std::ios_base &ios,std::ios_base::iostate &err,ValueType &val) const { @@ -383,7 +383,7 @@ class base_num_parse : public std::num_get }; } // util -} // locale +} // locale } //boost diff --git a/src/util/timezone.hpp b/src/util/timezone.hpp index a387b9a5..b9551a41 100644 --- a/src/util/timezone.hpp +++ b/src/util/timezone.hpp @@ -14,7 +14,7 @@ namespace boost { namespace locale { namespace util { - inline int parse_tz(std::string const &tz) + inline int parse_tz(std::string const &tz) { int gmtoff = 0; std::string ltz; @@ -46,7 +46,7 @@ namespace util { } } // util -} // locale +} // locale } //boost diff --git a/src/win32/api.hpp b/src/win32/api.hpp index b0204b04..4e11853a 100644 --- a/src/win32/api.hpp +++ b/src/win32/api.hpp @@ -40,7 +40,7 @@ namespace boost { namespace locale { namespace impl_win { - + struct numeric_info { std::wstring thousands_sep; std::wstring decimal_point; @@ -66,14 +66,14 @@ namespace impl_win { return flags; } - - - #ifdef BOOST_LOCALE_WINDOWS_2000_API - + + + #ifdef BOOST_LOCALE_WINDOWS_2000_API + class winlocale{ public: - winlocale() : - lcid(0) + winlocale() : + lcid(0) { } @@ -81,9 +81,9 @@ namespace impl_win { { lcid = locale_to_lcid(name); } - + unsigned lcid; - + bool is_c() const { return lcid == 0; @@ -96,7 +96,7 @@ namespace impl_win { /// Number Format /// //////////////////////////////////////////////////////////////////////// - + inline numeric_info wcsnumformat_l(winlocale const &l) { numeric_info res; @@ -111,9 +111,9 @@ namespace impl_win { static const int de_size = 4; static const int gr_size = 10; - wchar_t th[th_size]={0}; + wchar_t th[th_size]={0}; wchar_t de[de_size]={0}; - wchar_t gr[gr_size]={0}; + wchar_t gr[gr_size]={0}; if( GetLocaleInfoW(lcid,LOCALE_STHOUSAND,th,th_size)==0 || GetLocaleInfoW(lcid,LOCALE_SDECIMAL ,de,de_size)==0 @@ -203,21 +203,21 @@ namespace impl_win { /// //////////////////////////////////////////////////////////////////////// - + inline std::wstring wcs_format_date_l(wchar_t const *format,SYSTEMTIME const *tm,winlocale const &l) { int len = GetDateFormatW(l.lcid,0,tm,format,0,0); std::vector buf(len+1); GetDateFormatW(l.lcid,0,tm,format,&buf.front(),len); - return &buf.front(); + return &buf.front(); } - + inline std::wstring wcs_format_time_l(wchar_t const *format,SYSTEMTIME const *tm,winlocale const &l) { int len = GetTimeFormatW(l.lcid,0,tm,format,0,0); std::vector buf(len+1); GetTimeFormatW(l.lcid,0,tm,format,&buf.front(),len); - return &buf.front(); + return &buf.front(); } inline std::wstring wcsfold(wchar_t const *begin,wchar_t const *end) diff --git a/src/win32/collate.cpp b/src/win32/collate.cpp index c2a3b23b..9b398462 100644 --- a/src/win32/collate.cpp +++ b/src/win32/collate.cpp @@ -20,7 +20,7 @@ namespace impl_win { class utf8_collator : public collator { public: - utf8_collator(winlocale lc,size_t refs = 0) : + utf8_collator(winlocale lc,size_t refs = 0) : collator(refs), lc_(lc) { @@ -71,7 +71,7 @@ BOOST_LOCALE_END_CONST_CONDITION class utf16_collator : public collator { public: typedef std::collate wfacet; - utf16_collator(winlocale lc,size_t refs = 0) : + utf16_collator(winlocale lc,size_t refs = 0) : collator(refs), lc_(lc) { @@ -121,7 +121,7 @@ std::locale create_collate( std::locale const &in, } // impl_std -} // locale +} // locale } //boost diff --git a/src/win32/converter.cpp b/src/win32/converter.cpp index c2893558..a50edf77 100644 --- a/src/win32/converter.cpp +++ b/src/win32/converter.cpp @@ -20,10 +20,10 @@ namespace boost { namespace locale { namespace impl_win { -class utf16_converter : public converter +class utf16_converter : public converter { public: - utf16_converter(winlocale const &lc,size_t refs = 0) : + utf16_converter(winlocale const &lc,size_t refs = 0) : converter(refs), lc_(lc) { @@ -49,7 +49,7 @@ class utf16_converter : public converter class utf8_converter : public converter { public: - utf8_converter(winlocale const &lc,size_t refs = 0) : + utf8_converter(winlocale const &lc,size_t refs = 0) : converter(refs), lc_(lc) { @@ -89,7 +89,7 @@ std::locale create_convert( std::locale const &in, character_facet_type type) { switch(type) { - case char_facet: + case char_facet: return std::locale(in,new utf8_converter(lc)); case wchar_t_facet: return std::locale(in,new utf16_converter(lc)); @@ -100,6 +100,6 @@ std::locale create_convert( std::locale const &in, } // namespace impl_win32 -} // locale +} // locale } // boost // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/src/win32/lcid.cpp b/src/win32/lcid.cpp index e326cdf4..12012fdf 100644 --- a/src/win32/lcid.cpp +++ b/src/win32/lcid.cpp @@ -53,7 +53,7 @@ BOOL CALLBACK proc(char *s) if(ss.fail() || !ss.eof()) { return FALSE; } - + char iso_639_lang[16]; char iso_3166_country[16]; if(GetLocaleInfoA(lcid,LOCALE_SISO639LANGNAME,iso_639_lang,sizeof(iso_639_lang))==0) @@ -98,7 +98,7 @@ unsigned locale_to_lcid(std::string const &locale_name) { if(locale_name.empty()) { return LOCALE_USER_DEFAULT; - } + } boost::locale::util::locale_data d; d.parse(locale_name); std::string id = d.language; @@ -112,7 +112,7 @@ unsigned locale_to_lcid(std::string const &locale_name) table_type const &tbl = get_ready_lcid_table(); table_type::const_iterator p = tbl.find(id); - + unsigned lcid = 0; if(p!=tbl.end()) lcid = p->second; diff --git a/src/win32/numeric.cpp b/src/win32/numeric.cpp index 2b0a2aaf..51431a16 100644 --- a/src/win32/numeric.cpp +++ b/src/win32/numeric.cpp @@ -33,7 +33,7 @@ namespace impl_win { *out++ = s[i]; return out; } - + std::ostreambuf_iterator write_it(std::ostreambuf_iterator out,std::wstring const &s) { std::string tmp = conv::from_utf(s,"UTF-8"); @@ -52,7 +52,7 @@ class num_format : public util::base_num_format typedef std::basic_string string_type; typedef CharType char_type; - num_format(winlocale const &lc,size_t refs = 0) : + num_format(winlocale const &lc,size_t refs = 0) : util::base_num_format(refs), lc_(lc) { @@ -88,7 +88,7 @@ class num_format : public util::base_num_format template class time_put_win : public std::time_put { public: - time_put_win(winlocale const &lc, size_t refs = 0) : + time_put_win(winlocale const &lc, size_t refs = 0) : std::time_put(refs), lc_(lc) { @@ -117,7 +117,7 @@ template class num_punct_win : public std::numpunct { public: typedef std::basic_string string_type; - num_punct_win(winlocale const &lc,size_t refs = 0) : + num_punct_win(winlocale const &lc,size_t refs = 0) : std::numpunct(refs) { numeric_info np = wcsnumformat_l(lc) ; @@ -135,7 +135,7 @@ BOOST_LOCALE_END_CONST_CONDITION if(decimal_point_.size() > 1) decimal_point_ = CharType('.'); } - + void to_str(std::wstring &s1,std::wstring &s2) { s2.swap(s1); @@ -209,7 +209,7 @@ std::locale create_formatting( std::locale const &in, character_facet_type type) { switch(type) { - case char_facet: + case char_facet: return create_formatting_impl(in,lc); case wchar_t_facet: return create_formatting_impl(in,lc); @@ -223,7 +223,7 @@ std::locale create_parsing( std::locale const &in, character_facet_type type) { switch(type) { - case char_facet: + case char_facet: return create_parsing_impl(in,lc); case wchar_t_facet: return create_parsing_impl(in,lc); @@ -235,7 +235,7 @@ std::locale create_parsing( std::locale const &in, } // impl_std -} // locale +} // locale } //boost diff --git a/src/win32/win_backend.cpp b/src/win32/win_backend.cpp index 5d978478..2f77d475 100644 --- a/src/win32/win_backend.cpp +++ b/src/win32/win_backend.cpp @@ -21,16 +21,16 @@ namespace boost { namespace locale { -namespace impl_win { - +namespace impl_win { + class winapi_localization_backend : public localization_backend { public: - winapi_localization_backend() : + winapi_localization_backend() : invalid_(true) { } winapi_localization_backend(winapi_localization_backend const &other) : - localization_backend(), + localization_backend(), paths_(other.paths_), domains_(other.domains_), locale_id_(other.locale_id_), @@ -42,7 +42,7 @@ namespace impl_win { return new winapi_localization_backend(*this); } - void set_option(std::string const &name,std::string const &value) + void set_option(std::string const &name,std::string const &value) { invalid_ = true; if(name=="locale") @@ -77,11 +77,11 @@ namespace impl_win { util::locale_data d; d.parse(real_id_); if(!d.utf8) { - lc_ = winlocale(); + lc_ = winlocale(); // Make it C as non-UTF8 locales are not supported } } - + std::locale install(std::locale const &base, locale_category_type category, character_facet_type type = nochar_facet) BOOST_OVERRIDE @@ -142,7 +142,7 @@ namespace impl_win { bool invalid_; winlocale lc_; }; - + localization_backend *create_localization_backend() { return new winapi_localization_backend(); @@ -151,4 +151,4 @@ namespace impl_win { } // impl win } // locale } // boost -// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 +// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/src/win32/win_backend.hpp b/src/win32/win_backend.hpp index 82f5401f..72c74d51 100644 --- a/src/win32/win_backend.hpp +++ b/src/win32/win_backend.hpp @@ -10,11 +10,11 @@ namespace boost { namespace locale { class localization_backend; - namespace impl_win { + namespace impl_win { localization_backend *create_localization_backend(); } // impl_win - } // locale + } // locale } // boost #endif -// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 +// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a16ed84b..018e9675 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -31,7 +31,7 @@ function(boost_locale_add_test name) set(ARG_SRC ${name}.cpp) endif() set(name ${PROJECT_NAME}-${name}) - + add_executable(${name} ${ARG_SRC}) add_dependencies(tests ${name}) target_link_libraries(${name} PRIVATE Boost::locale) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 70fe442d..76102a7a 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -1,8 +1,8 @@ # -# Copyright 2011 Artyom Beilis +# Copyright 2011 Artyom Beilis # -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt. diff --git a/test/cmake_test/main.cpp b/test/cmake_test/main.cpp index 37d84eb2..9cc38efd 100644 --- a/test/cmake_test/main.cpp +++ b/test/cmake_test/main.cpp @@ -33,6 +33,6 @@ int main() { std::cout << "Failed creation..." << std::endl; } - + return cvt.get() ? 0 : 1; } diff --git a/test/test_boundary.cpp b/test/test_boundary.cpp index 0dc8c6cb..a3c5a8e4 100644 --- a/test/test_boundary.cpp +++ b/test/test_boundary.cpp @@ -50,7 +50,7 @@ void test_word_container(Iterator begin,Iterator end, ) { for(int sm=(bt == lb::word ? 31 : 3 ) ;sm>=0;sm--) { - unsigned mask = + unsigned mask = ((sm & 1 ) != 0) * 0xF + ((sm & 2 ) != 0) * 0xF0 + ((sm & 4 ) != 0) * 0xF00 @@ -96,7 +96,7 @@ void test_word_container(Iterator begin,Iterator end, map.rule(mask); - { + { unsigned i=0; iter_type p; map.full_select(false); @@ -104,7 +104,7 @@ void test_word_container(Iterator begin,Iterator end, TEST(p->str()==chunks[i]); TEST(p->rule() == unsigned(masks[i])); } - + TEST(chunks.size() == i); for(;;) { if(p==map.begin()) { @@ -136,7 +136,7 @@ void test_word_container(Iterator begin,Iterator end, } TEST(chunks.size() == i); - + for(;;) { if(p==map.begin()) { TEST(i==0); @@ -152,7 +152,7 @@ void test_word_container(Iterator begin,Iterator end, TEST(p->rule() == unsigned(masks[i])); } } - + for(i=0,p=map.end();i::iterator iter_type; map.rule(mask); - + unsigned i=0; iter_type p; for(p=map.begin();p!=map.end();++p,i++) { @@ -232,7 +232,7 @@ void test_word_container(Iterator begin,Iterator end, if(iters.at(iters_ptr)==optr) iters_ptr++; } - + } // break iterator tests { // copy test @@ -348,8 +348,8 @@ void run_word(std::string *original,int *none,int *num,int *word,int *kana,int * pos.push_back(test_string.size()); masks.push_back( ( none ? none[i]*15 : 0) - | ( num ? ((num[i]*15) << 4) : 0) - | ( word ? ((word[i]*15) << 8) : 0) + | ( num ? ((num[i]*15) << 4) : 0) + | ( word ? ((word[i]*15) << 8) : 0) | ( kana ? ((kana[i]*15) << 12) : 0) | ( ideo ? ((ideo[i]*15) << 16) : 0) ); @@ -402,11 +402,11 @@ void word_boundary() int num1[]={ 1, 0, 0, 0, 1, 0, 0 , 0 , 0}; int word1[]={ 0, 0, 1, 0, 1, 0, 0 , 0 , 0}; #if U_ICU_VERSION_MAJOR_NUM >= 50 - int kana1[]={ 0, 0, 0, 0, 0, 0, 0, 0 , 0}; - int ideo1[]={ 0, 0, 0, 0, 0, 0, 1, 1 , 1}; + int kana1[]={ 0, 0, 0, 0, 0, 0, 0, 0 , 0}; + int ideo1[]={ 0, 0, 0, 0, 0, 0, 1, 1 , 1}; #else - int kana1[]={ 0, 0, 0, 0, 0, 0, 0, 1 , 1}; - int ideo1[]={ 0, 0, 0, 0, 0, 0, 1, 0 , 0}; + int kana1[]={ 0, 0, 0, 0, 0, 0, 0, 1 , 1}; + int ideo1[]={ 0, 0, 0, 0, 0, 0, 1, 0 , 0}; #endif @@ -437,14 +437,14 @@ void word_boundary() run_word(all1,none1,num1,word1,kana1,ideo1,g("ja_JP.UTF-8")); run_word(all2,zero,zero,zero,zero,zero,g("en_US.UTF-8")); run_word(all3,none3,zero,word3,zero,zero,g("en_US.UTF-8")); - #endif + #endif #ifdef BOOST_LOCALE_ENABLE_CHAR32_T std::cout << " char32_t"<(all1,none1,num1,word1,kana1,ideo1,g("ja_JP.UTF-8")); run_word(all2,zero,zero,zero,zero,zero,g("en_US.UTF-8")); run_word(all3,none3,zero,word3,zero,zero,g("en_US.UTF-8")); - #endif + #endif } void test_op_one_side(std::string const &sl,std::string const &sr,int val) { @@ -465,7 +465,7 @@ void test_op_one_side(std::string const &sl,std::string const &sr,int val) TEST( (l< sr.c_str()) == (val<0)); TEST( (l>=sr.c_str()) == (val>=0)); TEST( (l> sr.c_str()) == (val>0)); - + TEST( (sl.c_str()==r) == (val==0)); TEST( (sl.c_str()!=r) == (val!=0)); TEST( (sl.c_str()<=r) == (val<=0)); @@ -481,7 +481,7 @@ void test_op_one_side(std::string const &sl,std::string const &sr,int val) TEST( (l< sr) == (val<0)); TEST( (l>=sr) == (val>=0)); TEST( (l> sr) == (val>0)); - + TEST( (sl==r) == (val==0)); TEST( (sl!=r) == (val!=0)); TEST( (sl<=r) == (val<=0)); @@ -535,4 +535,4 @@ int main() #endif // NOICU // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 -// boostinspect:noascii +// boostinspect:noascii diff --git a/test/test_codecvt.cpp b/test/test_codecvt.cpp index cddc72e5..e7d4df26 100644 --- a/test/test_codecvt.cpp +++ b/test/test_codecvt.cpp @@ -48,17 +48,17 @@ void test_codecvt_in_n_m(cvt_type const &cvt,int n,int m) if(end > real_end) end = real_end; } - + wchar_t buf[128]; wchar_t *to = buf; wchar_t *to_end = to + m; wchar_t *to_next = to; - - + + std::mbstate_t mb2 = mb; std::codecvt_base::result r = cvt.in(mb,from,end,from_next,to,to_end,to_next); //std::cout << "In from_size=" << (end-from) << " from move=" << (from_next - from) << " to move= " << to_next - to << " state = " << res(r) << std::endl; - + int count = cvt.length(mb2,from,end,to_end - to); #ifndef BOOST_LOCALE_DO_LENGTH_MBSTATE_CONST TEST(memcmp(&mb,&mb2,sizeof(mb))==0); @@ -70,7 +70,7 @@ void test_codecvt_in_n_m(cvt_type const &cvt,int n,int m) TEST(count == to_next - to); #endif - + if(r == cvt_type::partial) { end+=n; if(end > real_end) @@ -88,7 +88,7 @@ void test_codecvt_in_n_m(cvt_type const &cvt,int n,int m) } TEST(wptr == wide_name + wlen); TEST(from == real_end); - + } void test_codecvt_out_n_m(cvt_type const &cvt,int n,int m) @@ -96,18 +96,18 @@ void test_codecvt_out_n_m(cvt_type const &cvt,int n,int m) char const *nptr = utf8_name; const size_t wlen = wcslen(wide_name); const size_t u8len = strlen(utf8_name); - + std::mbstate_t mb=std::mbstate_t(); - + wchar_t const *from_next = wide_name; wchar_t const *real_from_end = wide_name + wlen; - + char buf[256]; char *to = buf; char *to_next = to; char *to_end = to + n; char *real_to_end = buf + sizeof(buf); - + while(from_next < real_from_end) { wchar_t const *from = from_next; wchar_t const *from_end = from + m; @@ -116,7 +116,7 @@ void test_codecvt_out_n_m(cvt_type const &cvt,int n,int m) if(to_end == to) { to_end = to+n; } - + std::codecvt_base::result r = cvt.out(mb,from,from_end,from_next,to,to_end,to_next); //std::cout << "In from_size=" << (end-from) << " from move=" << (from_next - from) << " to move= " << to_next - to << " state = " << res(r) << std::endl; if(r == cvt_type::partial) { @@ -128,7 +128,7 @@ void test_codecvt_out_n_m(cvt_type const &cvt,int n,int m) else { TEST(r == cvt_type::ok); } - + while(to!=to_next) { TEST(*nptr == *to); nptr++; @@ -148,11 +148,11 @@ void test_codecvt_conv() { std::cout << "Conversions " << std::endl; std::locale l(std::locale::classic(),new boost::locale::utf8_codecvt()); - + cvt_type const &cvt = std::use_facet(l); TEST(cvt.max_length()==4); - + for(int i=1;i<=(int)strlen(utf8_name)+1;i++) { for(int j=1;j<=(int)wcslen(wide_name)+1;j++) { try { @@ -164,19 +164,19 @@ void test_codecvt_conv() throw; } } - } + } } void test_codecvt_err() { std::cout << "Errors " << std::endl; std::locale l(std::locale::classic(),new boost::locale::utf8_codecvt()); - + cvt_type const &cvt = std::use_facet(l); std::cout << "- UTF-8" << std::endl; { - + wchar_t buf[2]; wchar_t *to=buf; wchar_t *to_end = buf+2; @@ -203,11 +203,11 @@ void test_codecvt_err() TEST(from_next == from); TEST(to_next == to); } - } - + } + std::cout << "- UTF-16/32" << std::endl; { - + char buf[32]; char *to=buf; char *to_end = buf+32; @@ -235,8 +235,8 @@ void test_codecvt_err() TEST(from_next == from); TEST(to_next == to); } - } - + } + } @@ -265,12 +265,12 @@ void test_char_char() } int main() -{ +{ try { test_codecvt_conv(); test_codecvt_err(); test_char_char(); - + } catch(std::exception const &e) { std::cerr << "Failed : " << e.what() << std::endl; diff --git a/test/test_codepage.cpp b/test/test_codepage.cpp index c305b37e..4cf85a18 100644 --- a/test/test_codepage.cpp +++ b/test/test_codepage.cpp @@ -63,7 +63,7 @@ void test_ok(std::string file,std::locale const &l,std::basic_string cmp=s stream_type f1("testi.txt",stream_type::in); f1.imbue(l); - TEST(read_file(f1) == cmp); + TEST(read_file(f1) == cmp); f1.close(); stream_type f2("testo.txt",stream_type::out); @@ -139,7 +139,7 @@ void test_for_char() else { std::cout << " UTF-8 Not supported " << std::endl; } - + if(test_iso) { if(test_iso_8859_8) { std::cout << " ISO8859-8" << std::endl; @@ -160,7 +160,7 @@ void test_wide_io() { std::cout << " wchar_t" << std::endl; test_for_char(); - + #if defined BOOST_LOCALE_ENABLE_CHAR16_T && !defined(BOOST_NO_CHAR16_T_CODECVT) std::cout << " char16_t" << std::endl; test_for_char(); @@ -180,7 +180,7 @@ void test_pos(std::string source,std::basic_string target,std::string enco TEST(to_utf(source,encoding)==target); TEST(to_utf(source.c_str(),encoding)==target); TEST(to_utf(source.c_str(),source.c_str()+source.size(),encoding)==target); - + TEST(to_utf(source,l)==target); TEST(to_utf(source.c_str(),l)==target); TEST(to_utf(source.c_str(),source.c_str()+source.size(),l)==target); @@ -188,7 +188,7 @@ void test_pos(std::string source,std::basic_string target,std::string enco TEST(from_utf(target,encoding)==source); TEST(from_utf(target.c_str(),encoding)==source); TEST(from_utf(target.c_str(),target.c_str()+target.size(),encoding)==source); - + TEST(from_utf(target,l)==source); TEST(from_utf(target.c_str(),l)==source); TEST(from_utf(target.c_str(),target.c_str()+target.size(),l)==source); @@ -273,8 +273,8 @@ struct utfutf { template<> struct utfutf { static wchar_t const *ok(){ return L"\x67\x72\xfc\xdf\x65\x6e"; } - static wchar_t const *bad() { - static wchar_t buf[256] = L"\x67\x72\xFF\xfc\xFE\xFD\xdf\x65\x6e"; + static wchar_t const *bad() { + static wchar_t buf[256] = L"\x67\x72\xFF\xfc\xFE\xFD\xdf\x65\x6e"; buf[2]=0xDC01; // second surrogate must not be buf[4]=0xD801; // First buf[5]=0xD801; // Must be surrogate trail @@ -284,8 +284,8 @@ struct utfutf { template<> struct utfutf { static wchar_t const *ok(){ return L"\x67\x72\xfc\xdf\x65\x6e"; } - static wchar_t const *bad() { - static wchar_t buf[256] = L"\x67\x72\xFF\xfc\xdf\x65\x6e"; + static wchar_t const *bad() { + static wchar_t buf[256] = L"\x67\x72\xFF\xfc\xdf\x65\x6e"; buf[2]=static_cast(0x1000000); // > 10FFFF return buf; } @@ -324,10 +324,10 @@ void test_to() test_pos("\xf9\xec\xe5\xed",utf("שלום"),"ISO8859-8"); test_pos("grüßen",utf("grüßen"),"UTF-8"); test_pos("abc\"\xf0\xa0\x82\x8a\"",utf("abc\"\xf0\xa0\x82\x8a\""),"UTF-8"); - + test_to_neg("g\xFFrüßen",utf("grüßen"),"UTF-8"); test_from_neg(utf("hello שלום"),"hello ","ISO8859-1"); - + test_with_0(); } @@ -399,16 +399,16 @@ int main() #endif test_simple_conversions(); - - + + for(int type = 0; type < int(def.size()); type ++ ) { boost::locale::localization_backend_manager tmp_backend = boost::locale::localization_backend_manager::global(); tmp_backend.select(def[type]); boost::locale::localization_backend_manager::global(tmp_backend); - + std::string bname = def[type]; - - if(bname=="std") { + + if(bname=="std") { en_us_8bit = get_std_name("en_US.ISO8859-1"); he_il_8bit = get_std_name("he_IL.ISO8859-8"); ja_jp_shiftjis = get_std_name("ja_JP.SJIS"); @@ -477,11 +477,11 @@ int main() } #endif - if(def[type]=="std" && (get_std_name("en_US.UTF-8").empty() || get_std_name("he_IL.UTF-8").empty())) + if(def[type]=="std" && (get_std_name("en_US.UTF-8").empty() || get_std_name("he_IL.UTF-8").empty())) { test_utf = false; } - + std::cout << "Testing wide I/O" << std::endl; test_wide_io(); std::cout << "Testing charset to/from UTF conversion functions" << std::endl; @@ -513,4 +513,4 @@ int main() } // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 -// boostinspect:noascii +// boostinspect:noascii diff --git a/test/test_codepage_converter.cpp b/test/test_codepage_converter.cpp index d9b63365..4391fbc3 100644 --- a/test/test_codepage_converter.cpp +++ b/test/test_codepage_converter.cpp @@ -74,14 +74,14 @@ void test_shiftjis(boost::locale::util::base_converter* pcvt) TEST_FROM("\x82\xd0",0x3072); // Full width hiragana Hi ひ std::cout << "- Illegal/incomplete" << std::endl; - + TEST_TO("\xa0",illegal); TEST_TO("\x82",incomplete); TEST_TO("\x83\xf0",illegal); TEST_INC(0x30d2,1); // Full width katakana Hi ヒ TEST_INC(0x3072,1); // Full width hiragana Hi ひ - + TEST_FROM(0,0x5e9); // Hebrew ש not in ShiftJIS } @@ -151,7 +151,7 @@ int main() TEST_TO(make4(0x110000),illegal); TEST_TO(make4(0x1fffff),illegal); - + TEST_TO(make2(0),illegal); TEST_TO(make3(0),illegal); TEST_TO(make4(0),illegal); @@ -166,9 +166,9 @@ int main() TEST_TO(make4(0x8000),illegal); TEST_TO(make4(0xffff),illegal); - + std::cout << "-- Invalid surrogate" << std::endl; - + TEST_TO(make3(0xD800),illegal); TEST_TO(make3(0xDBFF),illegal); TEST_TO(make3(0xDC00),illegal); @@ -183,7 +183,7 @@ int main() TEST_TO("\x80",illegal); TEST_TO("\xC2",incomplete); - + TEST_TO("\xdf",incomplete); TEST_TO("\xe0",incomplete); @@ -217,16 +217,16 @@ int main() TEST_INC(0x10000,1); TEST_FROM("\xf0\x90\x80\x80",0x10000); TEST_FROM("\xf4\x8f\xbf\xbf",0x10FFFF); - + std::cout << "-- Test no surrogate " << std::endl; - + TEST_FROM(0,0xD800); TEST_FROM(0,0xDBFF); TEST_FROM(0,0xDC00); TEST_FROM(0,0xDFFF); - + std::cout << "-- Test invalid " << std::endl; - + TEST_FROM(0,0x110000); TEST_FROM(0,0x1FFFFF); @@ -294,4 +294,4 @@ int main() } // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 -// boostinspect:noascii +// boostinspect:noascii diff --git a/test/test_collate.cpp b/test/test_collate.cpp index 60f63abe..f42437ef 100644 --- a/test/test_collate.cpp +++ b/test/test_collate.cpp @@ -35,7 +35,7 @@ void test_comp(std::locale l,std::basic_string left,std::basic_string rt); long lh=coll.hash(left.c_str(),left.c_str()+left.size()); long rh=coll.hash(right.c_str(),right.c_str()+right.size()); @@ -53,7 +53,7 @@ void test_comp(std::locale l,std::basic_string left,std::basic_string rt); long lh=coll.hash(level,left.c_str(),left.c_str()+left.size()); TEST(lh==coll.hash(level,left)); @@ -64,8 +64,8 @@ void test_comp(std::locale l,std::basic_string left,std::basic_string(l,_l,_r,level,expected) @@ -136,4 +136,4 @@ int main() #endif // NOICU // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 -// boostinspect:noascii +// boostinspect:noascii diff --git a/test/test_config.cpp b/test/test_config.cpp index 54f796b7..48679571 100644 --- a/test/test_config.cpp +++ b/test/test_config.cpp @@ -7,7 +7,7 @@ // #ifdef _MSC_VER -#define _CRT_SECURE_NO_WARNINGS +#define _CRT_SECURE_NO_WARNINGS #endif #include @@ -137,4 +137,4 @@ int main() } // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 -// boostinspect:noascii +// boostinspect:noascii diff --git a/test/test_convert.cpp b/test/test_convert.cpp index 36f6e572..eec6fb88 100644 --- a/test/test_convert.cpp +++ b/test/test_convert.cpp @@ -66,8 +66,8 @@ void test_norm(std::string orig,std::string normal,boost::locale::norm_type type TEST_V(to_upper,"i","İ"); \ TEST_V(to_lower,"İ","i"); \ }while(0) - - + + int main() { try { @@ -84,7 +84,7 @@ int main() boost::locale::generator gen; bool eight_bit=true; - + #define TEST_V(how,source_s,dest_s) \ do { \ TEST_A(char,how,source_s,dest_s); \ @@ -95,7 +95,7 @@ int main() std::locale::global(tmp); \ } \ }while(0) - + TEST_ALL_CASES; #undef TEST_V @@ -126,4 +126,4 @@ int main() // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 -// boostinspect:noascii +// boostinspect:noascii diff --git a/test/test_date_time.cpp b/test/test_date_time.cpp index 91af5287..6ab9fd8c 100644 --- a/test/test_date_time.cpp +++ b/test/test_date_time.cpp @@ -21,7 +21,7 @@ #endif #ifdef BOOST_MSVC -# pragma warning(disable : 4244) // loose data +# pragma warning(disable : 4244) // loose data #endif #define RESET() do { time_point = base_time_point; ss.str(""); } while(0) @@ -34,9 +34,9 @@ int main() try { using namespace boost::locale; using namespace boost::locale::period; - std::string def[] = { + std::string def[] = { #ifdef BOOST_LOCALE_WITH_ICU - "icu" , + "icu" , #endif #ifndef BOOST_LOCALE_NO_STD_BACKEND "std" , @@ -55,16 +55,16 @@ int main() std::cout << "Testing for backend: " << def[type] << std::endl; std::string backend_name = def[type]; { - + boost::locale::generator g; std::locale loc=g("en_US.UTF-8"); std::locale::global(loc); - + std::string tz("GMT"); time_zone::global(tz); - calendar cal(loc,tz); + calendar cal(loc,tz); TEST(calendar() == cal); TEST(calendar(loc) == cal); @@ -86,15 +86,15 @@ int main() std::ostringstream ss; ss.imbue(loc); ss<>= minute(40); TESTEQSR( time_point, "1970-02-05 15:53:13"); @@ -143,9 +143,9 @@ int main() TEST( (time_point + 2* month()- (time_point+month())) / day() == 31); TEST( day(time_point + 2* month()- (time_point+month())) == 31); - TESTEQSR( time_point + hour(), "1970-02-05 16:33:13"); + TESTEQSR( time_point + hour(), "1970-02-05 16:33:13"); TESTEQSR( time_point - hour(2), "1970-02-05 13:33:13"); - TESTEQSR( time_point >> minute(), "1970-02-05 15:32:13"); + TESTEQSR( time_point >> minute(), "1970-02-05 15:32:13"); TESTEQSR( time_point << second(), "1970-02-05 15:33:14"); TEST(time_point == time_point); @@ -194,10 +194,10 @@ int main() TEST(time_point.get(week_of_year()) == 2); TEST(time_point.get(week_of_month()) == 2); time_point = february() + day() * 2; - + TEST(time_point.get(week_of_year()) == 6); - + if(backend_name!="icu" || BOOST_ICU_VER<408 || BOOST_ICU_VER > 6000) { TEST(time_point.get(week_of_month()) == 1); } @@ -207,16 +207,16 @@ int main() } time_point = year(2010) + january() + day() * 3; - + if(backend_name!="icu" || BOOST_ICU_VER<408 || BOOST_ICU_VER > 6000) { TEST(time_point.get(week_of_year()) == 53); } else { TEST(time_point.get(week_of_year()) == 1); } - + time_point = year()*2010 + january() + day() * 4; - + if(backend_name!="icu" || BOOST_ICU_VER<408 || BOOST_ICU_VER > 6000) { TEST(time_point.get(week_of_year()) == 1); } @@ -224,7 +224,7 @@ int main() TEST(time_point.get(week_of_year()) == 2); } time_point = year()*2010 + january() + day() * 10; - + if(backend_name!="icu" || BOOST_ICU_VER<408 || BOOST_ICU_VER > 6000) { TEST(time_point.get(week_of_year()) == 1); } @@ -249,7 +249,7 @@ int main() TEST(date_time(year()* 1984 + february() + day()).get(week_of_year())==5); TEST(time_point.get(week_of_month()) == 1); RESET(); - + // Make sure we don't get year() < 1970 so the test would // work on windows where mktime supports positive time_t // only @@ -279,7 +279,7 @@ int main() TEST(time_point.get(year()) == 2011); TEST(time_point.get(month()) == 2); // march TEST(time_point.get(day()) == 5); - + time_point = tmp_save; time_point = year() * 2011 + february() + day() * 5; @@ -299,4 +299,4 @@ int main() } // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 -// boostinspect:noascii +// boostinspect:noascii diff --git a/test/test_formatting.cpp b/test/test_formatting.cpp index 4a61d6be..58a61268 100644 --- a/test/test_formatting.cpp +++ b/test/test_formatting.cpp @@ -14,7 +14,7 @@ int main() #else #ifdef _MSC_VER -#define _CRT_SECURE_NO_WARNINGS +#define _CRT_SECURE_NO_WARNINGS // Disable this "security crap" #endif @@ -118,7 +118,7 @@ do{ \ TEST_THROWS(ss >> v,std::ios_base::failure); \ } \ }while(0) - + #define TEST_PAR(manip,type,actual,expected) \ do{ \ type v; \ @@ -219,12 +219,12 @@ void test_manip(std::string e_charset="UTF-8") { boost::locale::generator g; std::locale loc=g("en_US."+e_charset); - + TEST_FP1(as::posix,1200.1,"1200.1",double,1200.1); TEST_FP1(as::number,1200.1,"1,200.1",double,1200.1); TEST_FMT(as::number<>as::date_short,"aa/bb/cc",double); #if BOOST_ICU_VER >= 5901 @@ -320,7 +320,7 @@ void test_manip(std::string e_charset="UTF-8") #else #define GMT_FULL "GMT" #endif - + TEST_FP2(as::time, as::gmt,a_datetime,"3:33:13 PM",time_t,a_time+a_timesec); TEST_FP3(as::time,as::time_short ,as::gmt,a_datetime,"3:33 PM",time_t,a_time); TEST_FP3(as::time,as::time_medium,as::gmt,a_datetime,"3:33:13 PM",time_t,a_time+a_timesec); @@ -334,7 +334,7 @@ void test_manip(std::string e_charset="UTF-8") TEST_FP3(as::time,as::time_long ,as::gmt,a_datetime,"3:33:13 PM GMT+00:00",time_t,a_time+a_timesec); TEST_FP3(as::time,as::time_full ,as::gmt,a_datetime,"3:33:13 PM GMT+00:00",time_t,a_time+a_timesec); #endif - + TEST_NOPAR(as::time,"AM",double); TEST_FP2(as::time, as::time_zone("GMT+01:00"),a_datetime,"4:33:13 PM",time_t,a_time+a_timesec); @@ -349,7 +349,7 @@ void test_manip(std::string e_charset="UTF-8") #if U_ICU_VERSION_MAJOR_NUM >= 50 -#define PERIOD "," +#define PERIOD "," #define ICUAT " at" #else #define PERIOD "" @@ -386,8 +386,8 @@ void test_manip(std::string e_charset="UTF-8") TEST_FMT(as::ftime(format_string),now,local_time_str); TEST_FMT(as::ftime(format_string)<= 408 "Thursday, February 5, 1970" ICUAT " 3:33:13 PM " GMT_FULL, // c @@ -425,7 +425,7 @@ void test_manip(std::string e_charset="UTF-8") "Now is %A, %H o'clo''ck ' or not ' ", "'test %H'", "%H'", - "'%H'" + "'%H'" }; std::string expected_f[] = { "Now is Thursday, 15 o'clo''ck ' or not ' ", @@ -446,13 +446,13 @@ void test_format(std::string charset="UTF-8") { boost::locale::generator g; std::locale loc=g("en_US."+charset); - + FORMAT("{3} {1} {2}", 1 % 2 % 3,"3 1 2"); FORMAT("{1} {2}", "hello" % 2,"hello 2"); FORMAT("{1}",1200.1,"1200.1"); FORMAT("Test {1,num}",1200.1,"Test 1,200.1"); FORMAT("{{}} {1,number}",1200.1,"{} 1,200.1"); - #if BOOST_ICU_VER < 5601 + #if BOOST_ICU_VER < 5601 // bug #13276 FORMAT("{1,num=sci,p=3}",13.1,"1.310E1"); FORMAT("{1,num=scientific,p=3}",13.1,"1.310E1"); @@ -570,4 +570,4 @@ int main() #endif // NOICU // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 -// boostinspect:noascii +// boostinspect:noascii diff --git a/test/test_generator.cpp b/test/test_generator.cpp index dde16100..752291fa 100644 --- a/test/test_generator.cpp +++ b/test/test_generator.cpp @@ -74,7 +74,7 @@ int main() TEST(std::use_facet(l).encoding()=="iso8859-1"); std::locale l_wt(std::locale::classic(),new test_facet); - + TEST(std::has_facet(g.generate(l_wt,"en_US.UTF-8"))); TEST(std::has_facet(g.generate(l_wt,"en_US.ISO8859-1"))); TEST(!std::has_facet(g("en_US.UTF-8"))); @@ -97,4 +97,4 @@ int main() } // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 -// boostinspect:noascii +// boostinspect:noascii diff --git a/test/test_icu_vs_os_timezone.cpp b/test/test_icu_vs_os_timezone.cpp index b1f94d04..d2de58cf 100644 --- a/test/test_icu_vs_os_timezone.cpp +++ b/test/test_icu_vs_os_timezone.cpp @@ -15,7 +15,7 @@ int main() #else #ifdef _MSC_VER -#define _CRT_SECURE_NO_WARNINGS +#define _CRT_SECURE_NO_WARNINGS // Disable this "security crap" #endif @@ -62,4 +62,4 @@ int main() #endif // NO ICU // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 -// boostinspect:noascii +// boostinspect:noascii diff --git a/test/test_ios_prop.cpp b/test/test_ios_prop.cpp index 6d610714..5b2b2ad4 100644 --- a/test/test_ios_prop.cpp +++ b/test/test_ios_prop.cpp @@ -80,4 +80,4 @@ int main() } // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 -// boostinspect:noascii +// boostinspect:noascii diff --git a/test/test_locale.hpp b/test/test_locale.hpp index fe9810d6..1d684288 100644 --- a/test/test_locale.hpp +++ b/test/test_locale.hpp @@ -36,7 +36,7 @@ do { if(X) break; \ std::cerr << "Error in line:"<<__LINE__ << " "#X << std::endl; \ THROW_IF_TOO_BIG(error_counter++); \ - }while(0) + }while(0) #endif #define TEST_THROWS(X,E) \ @@ -45,7 +45,7 @@ do { try { X; } catch(E const &/*e*/ ) {break;} catch(...){} \ std::cerr << "Error in line:"<<__LINE__ << " "#X << std::endl; \ THROW_IF_TOO_BIG(error_counter++); \ - }while(0) + }while(0) #define FINALIZE() \ do { \ @@ -76,9 +76,9 @@ inline unsigned utf8_next(std::string const &s,unsigned &pos) l = 2; else l = 3; - + c &= (1 << (6-l)) - 1; - + switch(l) { case 3: c = (c << 6) | (((unsigned char)s[pos++]) & 0x3F); diff --git a/test/test_locale_tools.hpp b/test/test_locale_tools.hpp index 5fd49dca..1908c101 100644 --- a/test/test_locale_tools.hpp +++ b/test/test_locale_tools.hpp @@ -80,7 +80,7 @@ std::string get_std_name(std::string const &name,std::string *real_name = 0) if(name=="en_US.UTF-8" || name == "en_US.ISO8859-1") { if(has_std_locale("English_United States.1252")) { - if(real_name) + if(real_name) *real_name = "English_United States.1252"; return utf8 ? name : "en_US.windows-1252"; } @@ -88,28 +88,28 @@ std::string get_std_name(std::string const &name,std::string *real_name = 0) } else if(name=="he_IL.UTF-8" || name == "he_IL.ISO8859-8") { if(has_std_locale("Hebrew_Israel.1255")) { - if(real_name) + if(real_name) *real_name = "Hebrew_Israel.1255"; return utf8 ? name : "he_IL.windows-1255"; } } else if(name=="ru_RU.UTF-8") { if(has_std_locale("Russian_Russia.1251")) { - if(real_name) + if(real_name) *real_name = "Russian_Russia.1251"; return name; } } else if(name == "tr_TR.UTF-8") { if(has_std_locale("Turkish_Turkey.1254")) { - if(real_name) + if(real_name) *real_name = "Turkish_Turkey.1254"; return name; } } if(name == "ja_JP.SJIS") { if(has_std_locale("Japanese_Japan.932")) { - if(real_name) + if(real_name) *real_name = "Japanese_Japan.932"; return name; } diff --git a/test/test_message.cpp b/test/test_message.cpp index 65bc6c0a..cad7e1cf 100644 --- a/test/test_message.cpp +++ b/test/test_message.cpp @@ -315,7 +315,7 @@ int main(int argc,char **argv) try { std::string def[] = { #ifdef BOOST_LOCALE_WITH_ICU - "icu" , + "icu" , #endif #ifndef BOOST_LOCALE_NO_STD_BACKEND "std" , @@ -331,9 +331,9 @@ int main(int argc,char **argv) boost::locale::localization_backend_manager tmp_backend = boost::locale::localization_backend_manager::global(); tmp_backend.select(def[type]); boost::locale::localization_backend_manager::global(tmp_backend); - + backend = def[type]; - + std::cout << "Testing for backend --------- " << def[type] << std::endl; boost::locale::generator g; @@ -346,12 +346,12 @@ int main(int argc,char **argv) g.add_messages_path("./"); g.set_default_messages_domain("default"); - + std::string locales[] = { "he_IL.UTF-8", "he_IL.ISO8859-8" }; for(unsigned i=0;i("hello")))==to("שלום")); - + #ifdef BOOST_LOCALE_ENABLE_CHAR16_T if(backend=="icu" || backend=="std") TEST(same_u16(bl::translate(to("hello")))==to("שלום")); #endif - + #ifdef BOOST_LOCALE_ENABLE_CHAR32_T if(backend=="icu" || backend=="std") TEST(same_u32(bl::translate(to("hello")))==to("שלום")); #endif } - + std::cout << "Testing custom file system support" << std::endl; { boost::locale::gnu_gettext::messages_info info; @@ -453,12 +453,12 @@ int main(int argc,char **argv) } if(iso_8859_8_not_supported) { - std::cout << "ISO 8859-8 not supported so skipping non-US-ASCII keys" << std::endl; + std::cout << "ISO 8859-8 not supported so skipping non-US-ASCII keys" << std::endl; } - else + else { - std::cout << "Testing non-US-ASCII keys" << std::endl; - std::cout << " UTF-8 keys" << std::endl; + std::cout << "Testing non-US-ASCII keys" << std::endl; + std::cout << " UTF-8 keys" << std::endl; { boost::locale::generator g; g.add_messages_domain("default"); @@ -466,13 +466,13 @@ int main(int argc,char **argv) g.add_messages_path(argv[1]); else g.add_messages_path("./"); - + std::locale l = g("he_IL.UTF-8"); // narrow TEST(bl::gettext("בדיקה",l)=="test"); TEST(bl::gettext("לא קיים",l)=="לא קיים"); - + // wide std::wstring wtest = bl::conv::to_utf("בדיקה","UTF-8"); std::wstring wmiss = bl::conv::to_utf("לא קיים","UTF-8"); @@ -484,8 +484,8 @@ int main(int argc,char **argv) // conversion with substitution TEST(bl::gettext("test-あにま-בדיקה",l)==bl::conv::from_utf("test--בדיקה","ISO-8859-8")); } - - std::cout << " `ANSI' keys" << std::endl; + + std::cout << " `ANSI' keys" << std::endl; { boost::locale::generator g; @@ -494,7 +494,7 @@ int main(int argc,char **argv) g.add_messages_path(argv[1]); else g.add_messages_path("./"); - + std::locale l = g("he_IL.UTF-8"); // narrow non-UTF-8 keys @@ -523,7 +523,7 @@ int main(int argc,char **argv) bl::dnpgettext("","","","",1); bl::dnpgettext("",L"",L"",L"",1); } - + } catch(std::exception const &e) { std::cerr << "Failed " << e.what() << std::endl; @@ -533,4 +533,4 @@ int main(int argc,char **argv) } // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 -// boostinspect:noascii +// boostinspect:noascii diff --git a/test/test_posix_collate.cpp b/test/test_posix_collate.cpp index 96630208..a8495a82 100644 --- a/test/test_posix_collate.cpp +++ b/test/test_posix_collate.cpp @@ -49,7 +49,7 @@ void test_one(std::locale const &l,std::string ia,std::string ib,int diff) TEST(!l(a,b)); TEST(l(b,a)); } - + std::collate const &col = std::use_facet >(l); TEST(diff == col.compare(a.c_str(),a.c_str()+a.size(),b.c_str(),b.c_str()+b.size())); @@ -63,7 +63,7 @@ template void test_char() { boost::locale::generator gen; - + std::cout << "- Testing at least C" << std::endl; std::locale l = gen("en_US.UTF-8"); @@ -117,4 +117,4 @@ int main() // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 -// boostinspect:noascii +// boostinspect:noascii diff --git a/test/test_posix_convert.cpp b/test/test_posix_convert.cpp index 76d5c652..87497a4e 100644 --- a/test/test_posix_convert.cpp +++ b/test/test_posix_convert.cpp @@ -67,12 +67,12 @@ void test_char() else { std::cout << "- en_US.ISO8859-1 is not supported, skipping" << std::endl; } - + name = "tr_TR.UTF-8"; if(have_locale(name)) { std::cout << "Testing " << name << std::endl; locale_t cl = newlocale(LC_ALL_MASK,name.c_str(),0); - try { + try { TEST(cl); if(towupper_l(L'i',cl) == 0x130) { test_one(gen(name),"i","i","İ"); @@ -86,9 +86,9 @@ void test_char() throw; } if(cl) freelocale(cl); - + } - else + else { std::cout << "- tr_TR.UTF-8 is not supported, skipping" << std::endl; } @@ -119,4 +119,4 @@ int main() // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 -// boostinspect:noascii +// boostinspect:noascii diff --git a/test/test_posix_formatting.cpp b/test/test_posix_formatting.cpp index 194fdd33..648d4d37 100644 --- a/test/test_posix_formatting.cpp +++ b/test/test_posix_formatting.cpp @@ -129,13 +129,13 @@ void test_by_char(std::locale const &l,locale_t lreal) std::cout << "[" << boost::locale::conv::from_utf(buf,"UTF-8") << "]\n" ; #endif } - - + + { std::cout << "- Testing as::date/time" << std::endl; ss_type ss; ss.imbue(l); - + time_t a_date = 3600*24*(31+4); // Feb 5th time_t a_time = 3600*15+60*33; // 15:33:05 time_t a_timesec = 13; @@ -185,9 +185,9 @@ int main() lreal=newlocale(LC_ALL_MASK,name.c_str(),0); assert(lreal); std::cout << "UTF-8" << std::endl; - + test_by_char(l1,lreal); - + std::cout << "Wide UTF-" << sizeof(wchar_t) * 8 << std::endl; test_by_char(l1,lreal); freelocale(lreal); @@ -222,9 +222,9 @@ int main() lreal=newlocale(LC_ALL_MASK,name.c_str(),0); assert(lreal); std::cout << "UTF-8" << std::endl; - + test_by_char(l1,lreal); - + std::cout << "Wide UTF-" << sizeof(wchar_t) * 8 << std::endl; test_by_char(l1,lreal); freelocale(lreal); @@ -278,4 +278,4 @@ int main() #endif // posix // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 -// boostinspect:noascii +// boostinspect:noascii diff --git a/test/test_std_collate.cpp b/test/test_std_collate.cpp index e59c3a6c..d1bf2b34 100644 --- a/test/test_std_collate.cpp +++ b/test/test_std_collate.cpp @@ -50,7 +50,7 @@ void test_one(std::locale const &l,std::string ia,std::string ib,int diff) TEST(!l(a,b)); TEST(l(b,a)); } - + std::collate const &col = std::use_facet >(l); TEST(diff == col.compare(a.c_str(),a.c_str()+a.size(),b.c_str(),b.c_str()+b.size())); @@ -64,7 +64,7 @@ template void test_char() { boost::locale::generator gen; - + { std::cout << "- Testing at least C" << std::endl; std::locale l = gen("en_US.UTF-8"); @@ -127,4 +127,4 @@ int main() // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 -// boostinspect:noascii +// boostinspect:noascii diff --git a/test/test_std_convert.cpp b/test/test_std_convert.cpp index 6aad6bc8..a7f062c9 100644 --- a/test/test_std_convert.cpp +++ b/test/test_std_convert.cpp @@ -76,7 +76,7 @@ void test_char() std::cout << "Standard library does not support this locale's case conversion correctly" << std::endl; } } - else + else { std::cout << "- tr_TR.UTF-8 is not supported, skipping" << std::endl; } @@ -115,4 +115,4 @@ int main() // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 -// boostinspect:noascii +// boostinspect:noascii diff --git a/test/test_std_formatting.cpp b/test/test_std_formatting.cpp index eb07c35c..56f9d650 100644 --- a/test/test_std_formatting.cpp +++ b/test/test_std_formatting.cpp @@ -165,13 +165,13 @@ void test_by_char(std::locale const &l,std::locale const &lreal) std::cout << "[" << boost::locale::conv::from_utf(ss_ref.str(),"UTF-8") << "]\n" ; #endif } - - + + { std::cout << "- Testing as::date/time" << std::endl; ss_type ss; ss.imbue(l); - + time_t a_date = 3600*24*(31+4); // Feb 5th time_t a_time = 3600*15+60*33; // 15:33:05 time_t a_timesec = 13; @@ -223,11 +223,11 @@ int main() else { std::locale l1=gen(name),l2(real_name.c_str()); std::cout << "UTF-8" << std::endl; - if(name==real_name) + if(name==real_name) test_by_char(l1,l2); else test_by_char(l1,l2); - + std::cout << "Wide UTF-" << sizeof(wchar_t) * 8 << std::endl; test_by_char(l1,l2); @@ -274,11 +274,11 @@ int main() else { std::locale l1=gen(name),l2(real_name.c_str()); std::cout << "UTF-8" << std::endl; - if(name==real_name) + if(name==real_name) test_by_char(l1,l2); else test_by_char(l1,l2); - + std::cout << "Wide UTF-" << sizeof(wchar_t) * 8 << std::endl; test_by_char(l1,l2); @@ -338,7 +338,7 @@ int main() catch(...) { fails = true; } - + if(!fails) { std::cout << "- No invalid UTF. No need to check"< tr; - + BOOST_STATIC_ASSERT(tr::max_width == 4 / sizeof(CharType)); TEST(tr::template decode(cur,end) == codepoint); @@ -296,4 +296,4 @@ int main() } // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 -// boostinspect:noascii +// boostinspect:noascii diff --git a/test/test_winapi_collate.cpp b/test/test_winapi_collate.cpp index fb12f7ca..b726877c 100644 --- a/test/test_winapi_collate.cpp +++ b/test/test_winapi_collate.cpp @@ -36,7 +36,7 @@ void test_comp(std::locale l,std::basic_string left,std::basic_string rt); long lh=coll.hash(left.c_str(),left.c_str()+left.size()); long rh=coll.hash(right.c_str(),right.c_str()+right.size()); @@ -54,7 +54,7 @@ void test_comp(std::locale l,std::basic_string left,std::basic_string rt); long lh=coll.hash(level,left.c_str(),left.c_str()+left.size()); TEST(lh==coll.hash(level,left)); @@ -65,8 +65,8 @@ void test_comp(std::locale l,std::basic_string left,std::basic_string(l,_l,_r,level,expected) @@ -130,4 +130,4 @@ int main() } #endif // NO WINAPI // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 -// boostinspect:noascii +// boostinspect:noascii diff --git a/test/test_winapi_convert.cpp b/test/test_winapi_convert.cpp index 5f5584b7..bfdebfe5 100644 --- a/test/test_winapi_convert.cpp +++ b/test/test_winapi_convert.cpp @@ -47,8 +47,8 @@ void test_char() std::cout << "- Testing " << name << std::endl; l=gen(name); test_one(l,"Façade","façade","FAÇADE"); - - + + name = "tr_TR.UTF-8"; std::cout << "Testing " << name << std::endl; test_one(gen(name),"i","i","İ"); @@ -82,7 +82,7 @@ int main() test_char(); std::cout << "Testing wchar_t" << std::endl; test_char(); - + std::cout << "Testing Unicode normalization" << std::endl; test_norm("\xEF\xAC\x81","\xEF\xAC\x81",boost::locale::norm_nfd); /// ligature fi test_norm("\xEF\xAC\x81","\xEF\xAC\x81",boost::locale::norm_nfc); @@ -105,4 +105,4 @@ int main() // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 -// boostinspect:noascii +// boostinspect:noascii diff --git a/test/test_winapi_formatting.cpp b/test/test_winapi_formatting.cpp index 92ef7c42..d8ac2bb3 100644 --- a/test/test_winapi_formatting.cpp +++ b/test/test_winapi_formatting.cpp @@ -142,10 +142,10 @@ BOOST_LOCALE_END_CONST_CONDITION ss << as::currency; ss << 1043.34; TEST(ss); - + wchar_t buf[256]; GetCurrencyFormatW(lcid,0,L"1043.34",0,buf,256); - + TEST(equal(ss.str(),buf)); } @@ -153,7 +153,7 @@ BOOST_LOCALE_END_CONST_CONDITION std::cout << "--- Testing as::date/time" << std::endl; ss_type ss; ss.imbue(l); - + time_t a_date = 3600*24*(31+4); // Feb 5th time_t a_time = 3600*15+60*33; // 15:33:13 time_t a_timesec = 13; @@ -171,7 +171,7 @@ BOOST_LOCALE_END_CONST_CONDITION wchar_t time_buf[256]; wchar_t date_buf[256]; - + SYSTEMTIME st= { 1970, 2,5, 5,15,33,13,0 }; GetTimeFormatW(lcid,0,&st,0,time_buf,256); GetDateFormatW(lcid,0,&st,0,date_buf,256); @@ -264,4 +264,4 @@ int main() // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 -// boostinspect:noascii +// boostinspect:noascii From 5b3aae0f8efc103d03e04066613bec9b68e71861 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Sat, 4 Jun 2022 13:13:53 +0200 Subject: [PATCH 55/90] Fix ccache saving on cache hit See boostorg/boost-ci#166 --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2128b4ec..63227f83 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -123,7 +123,10 @@ jobs: if: env.B2_USE_CCACHE with: path: ~/.ccache - key: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}} + key: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-${{github.sha}} + restore-keys: | + ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}- + ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}} - name: Fetch Boost.CI uses: actions/checkout@v3 From 11f50e9e3c4e068c9a2cc71e78f0dd4a7c28ecd1 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Sun, 5 Jun 2022 11:15:51 +0200 Subject: [PATCH 56/90] Update CI from Boost.CI Includes newer compilers --- .appveyor.yml | 53 +++++++++++++++++++++++----------------- .github/workflows/ci.yml | 9 ++++--- 2 files changed, 36 insertions(+), 26 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index ba533e26..e6a9bb3e 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -54,11 +54,25 @@ environment: B2_FLAGS: testing.execute=off matrix: - - FLAVOR: Visual Studio 2022 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 + - FLAVOR: Visual Studio 2008, 2010, 2012 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + B2_TOOLSET: msvc-9.0,msvc-10.0,msvc-11.0 + B2_ADDRESS_MODEL: 32 # No 64bit support + + - FLAVOR: Visual Studio 2013, 2015 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + B2_TOOLSET: msvc-12.0,msvc-14.0 + + - FLAVOR: Visual Studio 2017 C++14/17 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + B2_CXXSTD: 14,17 + B2_TOOLSET: msvc-14.1 + + - FLAVOR: Visual Studio 2017 C++2a Strict + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 B2_CXXFLAGS: -permissive- - B2_CXXSTD: 14,17,20 - B2_TOOLSET: msvc-14.3 + B2_CXXSTD: 2a + B2_TOOLSET: msvc-14.1 - FLAVOR: Visual Studio 2019 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 @@ -66,16 +80,11 @@ environment: B2_CXXSTD: 14,17,2a B2_TOOLSET: msvc-14.2 - - FLAVOR: Visual Studio 2017 C++2a Strict - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + - FLAVOR: Visual Studio 2022 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 B2_CXXFLAGS: -permissive- - B2_CXXSTD: 2a - B2_TOOLSET: msvc-14.1 - - - FLAVOR: Visual Studio 2017 C++14/17 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - B2_CXXSTD: 14,17 - B2_TOOLSET: msvc-14.1 + B2_CXXSTD: 14,17,20 + B2_TOOLSET: msvc-14.3 - FLAVOR: clang-cl APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 @@ -90,15 +99,6 @@ environment: B2_TOOLSET: clang-win B2_DEFINES: BOOST_USE_WINDOWS_H - - FLAVOR: Visual Studio 2015, 2013 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - B2_TOOLSET: msvc-12.0,msvc-14.0 - - - FLAVOR: Visual Studio 2008, 2010, 2012 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - B2_TOOLSET: msvc-9.0,msvc-10.0,msvc-11.0 - B2_ADDRESS_MODEL: 32 # No 64bit support - - FLAVOR: cygwin (32-bit) APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 ADDPATH: C:\cygwin\bin; @@ -113,6 +113,15 @@ environment: B2_CXXSTD: 03,11,14,1z B2_TOOLSET: gcc + # (Currently) the images up to 2017 use an older Cygwin + # This tests that the library works with more recent versions + - FLAVOR: cygwin (64-bit, latest) + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 + ADDPATH: C:\cygwin64\bin; + B2_ADDRESS_MODEL: 64 + B2_CXXSTD: 03,11,14,1z + B2_TOOLSET: gcc + - FLAVOR: mingw32 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 B2_ADDRESS_MODEL: 32 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 63227f83..60282ed5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,8 +55,9 @@ jobs: - { compiler: gcc-9, cxxstd: '03,11,14,17,2a', os: ubuntu-18.04 } - { compiler: gcc-10, cxxstd: '03,11,14,17,20', os: ubuntu-20.04 } - { compiler: gcc-11, cxxstd: '03,11,14,17,20', os: ubuntu-20.04 } + - { compiler: gcc-12, cxxstd: '03,11,14,17,20', os: ubuntu-22.04 } - { name: GCC w/ sanitizers, sanitize: yes, - compiler: gcc-11, cxxstd: '03,11,14,17,20', os: ubuntu-20.04 } + compiler: gcc-12, cxxstd: '03,11,14,17,20', os: ubuntu-22.04 } - { name: Collect coverage, coverage: yes, compiler: gcc-8, cxxstd: '03,11', os: ubuntu-20.04, install: 'g++-8-multilib', address-model: '32,64' } @@ -76,6 +77,8 @@ jobs: - { compiler: clang-10, cxxstd: '03,11,14,17,20', os: ubuntu-20.04 } - { compiler: clang-11, cxxstd: '03,11,14,17,20', os: ubuntu-20.04 } - { compiler: clang-12, cxxstd: '03,11,14,17,20', os: ubuntu-20.04 } + - { compiler: clang-13, cxxstd: '03,11,14,17,20', os: ubuntu-22.04 } + - { compiler: clang-14, cxxstd: '03,11,14,17,20', os: ubuntu-22.04 } # libc++ - { compiler: clang-6.0, cxxstd: '03,11,14', os: ubuntu-18.04, stdlib: libc++, install: 'clang-6.0 libc++-dev libc++abi-dev' } @@ -124,9 +127,7 @@ jobs: with: path: ~/.ccache key: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-${{github.sha}} - restore-keys: | - ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}- - ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}} + restore-keys: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}- - name: Fetch Boost.CI uses: actions/checkout@v3 From 50105d8d46c8875afba97c8ecf728aa03c0ac18f Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Sun, 5 Jun 2022 11:04:39 +0200 Subject: [PATCH 57/90] Deprecate support for C++03, to be removed in Boost 1.81 --- include/boost/locale/config.hpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/include/boost/locale/config.hpp b/include/boost/locale/config.hpp index d0e00f32..639fd2fa 100644 --- a/include/boost/locale/config.hpp +++ b/include/boost/locale/config.hpp @@ -47,6 +47,27 @@ #define BOOST_LOCALE_USE_AUTO_PTR 1 #endif +// Check for C++11 features that will be used in Boost 1.81 +// If you are using Boost.Locale and REALLY require it to keep +// supporting C++03/C++98 please comment with a detailed description +// of your use case and reasoning why using C++11 is not possible in +// https://github.com/boostorg/locale/issues/90 +#if !defined(BOOST_LOCALE_DISABLE_DEPRECATED_03_WARNING) && ( \ + defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || \ + defined(BOOST_NO_CXX11_DEFAULTED_MOVES) || \ + defined(BOOST_NO_CXX11_HDR_FUNCTIONAL) || \ + defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) || \ + defined(BOOST_NO_CXX11_NOEXCEPT) || \ + defined(BOOST_NO_CXX11_OVERRIDE) || \ + defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \ + defined(BOOST_NO_CXX11_SMART_PTR) || \ + defined(BOOST_NO_CXX11_STATIC_ASSERT) \ + ) + #include + BOOST_PRAGMA_MESSAGE("CAUTION: Boost.Locale support for C++03 is deprecated. C++11 will be required from Boost 1.81 onwards.") + BOOST_PRAGMA_MESSAGE("CAUTION: Define BOOST_LOCALE_DISABLE_DEPRECATED_03_WARNING to suppress this message.") +#endif + #ifdef BOOST_MSVC // Denote a constant condition, e.g. for if(sizeof(... #define BOOST_LOCALE_START_CONST_CONDITION __pragma(warning(push)) __pragma(warning(disable : 4127)) From 132f5126a4b2bb634637c989d6e80b0741df17b4 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 29 Jun 2022 14:40:35 +0200 Subject: [PATCH 58/90] Disable running example/collate This reads from stdin which may fail/timeout. --- examples/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 09e431f9..abf58212 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -27,7 +27,7 @@ endfunction() boost_locale_add_example(boundary) boost_locale_add_example(calendar) -boost_locale_add_example(collate) +boost_locale_add_example(collate COMPILE_ONLY) boost_locale_add_example(conversions) boost_locale_add_example(hello) boost_locale_add_example(wboundary) From 00c8e07689a45705e2faf31dd6adcfc19b9760af Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 29 Jun 2022 14:41:23 +0200 Subject: [PATCH 59/90] Remove using std-namespace and reformat Removes the `using namespace std` to easier differentiate between Boost.Locale and Std stuff. Add spaces around shift operators. --- doc/boundary_analysys.txt | 2 +- doc/messages_formatting.txt | 12 +++----- examples/boundary.cpp | 37 +++++++++++----------- examples/calendar.cpp | 2 +- examples/collate.cpp | 7 ++--- examples/conversions.cpp | 37 +++++++++++----------- examples/hello.cpp | 29 +++++++++--------- examples/performance/perf_collate.cpp | 5 ++- examples/performance/perf_convert.cpp | 1 - examples/performance/perf_format.cpp | 3 +- examples/wboundary.cpp | 39 ++++++++++++------------ examples/wconversions.cpp | 33 ++++++++++---------- examples/whello.cpp | 27 ++++++++-------- include/boost/locale/date_time.hpp | 8 ++--- include/boost/locale/format.hpp | 4 +-- include/boost/locale/generic_codecvt.hpp | 16 +++++----- include/boost/locale/utf.hpp | 4 +-- src/icu/formatter.hpp | 2 +- src/shared/date_time.cpp | 12 ++++---- src/shared/localization_backend.cpp | 2 +- test/test_boundary.cpp | 14 ++++----- test/test_codecvt.cpp | 2 +- test/test_codepage.cpp | 16 +++++----- test/test_codepage_converter.cpp | 2 +- test/test_config.cpp | 10 +++--- test/test_convert.cpp | 24 +++++++-------- test/test_date_time.cpp | 11 +++++-- test/test_formatting.cpp | 18 +++++------ test/test_locale.hpp | 14 +++++---- test/test_locale_tools.hpp | 2 +- test/test_message.cpp | 4 +-- test/test_posix_convert.cpp | 2 +- test/test_posix_formatting.cpp | 2 +- test/test_std_formatting.cpp | 2 +- test/test_winapi_formatting.cpp | 10 +++--- 35 files changed, 208 insertions(+), 207 deletions(-) diff --git a/doc/boundary_analysys.txt b/doc/boundary_analysys.txt index c486c32a..8345efbe 100644 --- a/doc/boundary_analysys.txt +++ b/doc/boundary_analysys.txt @@ -88,7 +88,7 @@ std::string text="To be or not to be, that is the question." ssegment_index map(word,text.begin(),text.end(),gen("en_US.UTF-8")); // Print all "words" -- chunks of word boundary for(ssegment_index::iterator it=map.begin(),e=map.end();it!=e;++it) - std::cout <<"\""<< * it << "\", "; + std::cout << "\""<< * it << "\", "; std::cout << std::endl; \endcode diff --git a/doc/messages_formatting.txt b/doc/messages_formatting.txt index 85ed2279..d5342872 100644 --- a/doc/messages_formatting.txt +++ b/doc/messages_formatting.txt @@ -101,7 +101,6 @@ This is an example of our first fully localized program: #include #include -using namespace std; using namespace boost::locale; int main() @@ -113,11 +112,11 @@ int main() gen.add_messages_domain("hello"); // Generate locales and imbue them to iostream - locale::global(gen("")); - cout.imbue(locale()); + std::locale::global(gen("")); + std::cout.imbue(std::locale()); // Display a message using current system locale - cout << translate("Hello World") << endl; + std::cout << translate("Hello World") << std::endl; } \endcode @@ -494,7 +493,6 @@ domain name for the application. #include #include -using namespace std; using namespace boost::locale; int main() @@ -507,8 +505,8 @@ int main() gen.add_messages_domain("copyrighted/windows-1255"); // Generate locales and imbue them to iostream - locale::global(gen("")); - cout.imbue(locale()); + std::locale::global(gen("")); + std::cout.imbue(std::locale()); // In Windows 1255 (C) symbol is encoded as 0xA9 cout << translate("© 2001 All Rights Reserved") << endl; diff --git a/examples/boundary.cpp b/examples/boundary.cpp index 0a169b5f..d1466583 100644 --- a/examples/boundary.cpp +++ b/examples/boundary.cpp @@ -13,7 +13,6 @@ int main() { using namespace boost::locale; - using namespace std; generator gen; // Make system default locale global @@ -21,55 +20,55 @@ int main() // We need the boundary facet, currently only available via ICU if(!std::has_facet>(loc)) { - cout << "boundary detection not implemented in this environment" << endl; + std::cout << "boundary detection not implemented in this environment" << std::endl; return 0; } - locale::global(loc); - cout.imbue(loc); + std::locale::global(loc); + std::cout.imbue(loc); - string text="Hello World! あにま! Linux2.6 and Windows7 is word and number. שָלוֹם עוֹלָם!"; + std::string text="Hello World! あにま! Linux2.6 and Windows7 is word and number. שָלוֹם עוֹלָם!"; - cout<rule() & boundary::word_number) - cout<<"number(s) "; + std::cout << "number(s) "; if(p->rule() & boundary::word_letter) - cout<<"letter(s) "; + std::cout << "letter(s) "; if(p->rule() & boundary::word_kana) - cout<<"kana character(s) "; + std::cout << "kana character(s) "; if(p->rule() & boundary::word_ideo) - cout<<"ideographic character(s) "; + std::cout << "ideographic character(s) "; if(p->rule() & boundary::word_none) - cout<<"no word characters"; - cout< -using namespace std; using namespace boost::locale; int main() @@ -26,14 +25,14 @@ int main() set_type all_strings; /// Read all strings into the set - while(!cin.eof()) { + while(!std::cin.eof()) { std::string tmp; - getline(cin,tmp); + std::getline(std::cin,tmp); all_strings.insert(tmp); } /// Print them out for(set_type::iterator p=all_strings.begin();p!=all_strings.end();++p) { - cout<<*p< #include -using namespace std; using namespace boost::locale; int main(int argc,char **argv) @@ -33,9 +32,9 @@ int main(int argc,char **argv) set_type all_strings; /// Read all strings into the set - while(!cin.eof()) { + while(!std::cin.eof()) { std::string tmp; - getline(cin,tmp); + std::getline(std::cin,tmp); all.push_back(tmp); } for(int i=0;i<10000;i++) { diff --git a/examples/performance/perf_convert.cpp b/examples/performance/perf_convert.cpp index 475ad3c0..332662a0 100644 --- a/examples/performance/perf_convert.cpp +++ b/examples/performance/perf_convert.cpp @@ -12,7 +12,6 @@ #include #include -using namespace std; using namespace boost::locale; int main(int argc,char **argv) diff --git a/examples/performance/perf_format.cpp b/examples/performance/perf_format.cpp index 417e1ba3..01cf0904 100644 --- a/examples/performance/perf_format.cpp +++ b/examples/performance/perf_format.cpp @@ -11,7 +11,6 @@ #include #include -using namespace std; using namespace boost::locale; int main(int argc,char **argv) @@ -29,7 +28,7 @@ int main(int argc,char **argv) for(int i=0;i<100000;i++) { std::ostringstream ss; for(int j=0;j<5;j++) { - ss << boost::locale::as::datetime << std::time(0) <<" "<< boost::locale::as::number << 13456.345 <<"\n"; + ss << boost::locale::as::datetime << std::time(0) << " " << boost::locale::as::number << 13456.345 << "\n"; } if(i==0) std::cout << ss.str() << std::endl; diff --git a/examples/wboundary.cpp b/examples/wboundary.cpp index 887c8d59..2fc598a9 100644 --- a/examples/wboundary.cpp +++ b/examples/wboundary.cpp @@ -38,19 +38,18 @@ int main() { using namespace boost::locale; - using namespace std; // Create system default locale generator gen; - locale loc=gen(""); + std::locale loc=gen(""); // We need the boundary facet, currently only available via ICU if(!std::has_facet>(loc)) { - cout << "boundary detection not implemented in this environment" << endl; + std::cout << "boundary detection not implemented in this environment" << std::endl; return 0; } - locale::global(loc); - wcout.imbue(loc); + std::locale::global(loc); + std::wcout.imbue(loc); // This is needed to prevent C library to // convert strings to narrow @@ -58,48 +57,48 @@ int main() std::ios_base::sync_with_stdio(false); - wstring text=L"Hello World! あにま! Linux2.6 and Windows7 is word and number. שָלוֹם עוֹלָם!"; + std::wstring text=L"Hello World! あにま! Linux2.6 and Windows7 is word and number. שָלוֹם עוֹלָם!"; - wcout<rule() & boundary::word_number) - wcout<rule() & boundary::word_letter) - wcout<rule() & boundary::word_kana) - wcout<rule() & boundary::word_ideo) - wcout<rule() & boundary::word_none) - wcout<>=(period::period_type f) { - return *this>>=date_time_period(f); + return *this >>= date_time_period(f); } /// @@ -863,7 +863,7 @@ namespace boost { /// For example: /// \code /// date_time now(time(0),hebrew_calendar) - /// cout << "Year: " << period::year(now) <<" Full Date:"<< now; + /// cout << "Year: " << period::year(now) << " Full Date:" << now; /// \endcode /// /// The output may be Year:5770 Full Date:Jan 1, 2010 diff --git a/include/boost/locale/format.hpp b/include/boost/locale/format.hpp index a994fa6d..4022ae82 100644 --- a/include/boost/locale/format.hpp +++ b/include/boost/locale/format.hpp @@ -84,7 +84,7 @@ namespace boost { static void void_write(stream_type &output,void const * /*ptr*/) { CharType empty_string[1]={0}; - output< @@ -319,7 +319,7 @@ namespace boost { pos+=2; } else { - out< : public std::codecvt : public std::codecvt : public std::codecvt : public std::codecvt : public std::codecvt : public std::codecvt : public std::codecvt : public std::codecvt>(date_time_period const &v) const { date_time tmp(*this); - tmp>>=v; + tmp >>= v; return tmp; } @@ -297,14 +297,14 @@ date_time date_time::operator-(date_time_period_set const &v) const date_time date_time::operator<<(date_time_period_set const &v) const { date_time tmp(*this); - tmp<<=v; + tmp <<= v; return tmp; } date_time date_time::operator>>(date_time_period_set const &v) const { date_time tmp(*this); - tmp>>=v; + tmp >>= v; return tmp; } @@ -327,7 +327,7 @@ date_time const &date_time::operator-=(date_time_period_set const &v) date_time const &date_time::operator<<=(date_time_period_set const &v) { for(unsigned i=0;i>=(date_time_period_set const &v) { for(unsigned i=0;i>=v[i]; + *this >>= v[i]; } return *this; } diff --git a/src/shared/localization_backend.cpp b/src/shared/localization_backend.cpp index f8965486..9690cbc3 100644 --- a/src/shared/localization_backend.cpp +++ b/src/shared/localization_backend.cpp @@ -134,7 +134,7 @@ namespace boost { { int id; unsigned v; - for(v=1,id=0;v!=0;v<<=1,id++) { + for(v=1,id=0;v!=0;v <<= 1,id++) { if(category == v) break; } diff --git a/test/test_boundary.cpp b/test/test_boundary.cpp index a3c5a8e4..5ccdf5aa 100644 --- a/test/test_boundary.cpp +++ b/test/test_boundary.cpp @@ -34,7 +34,7 @@ void print_str(std::basic_string const &/*s*/) template<> void print_str(std::basic_string const &s) { - std::cout << "[" << s <<"]" << std::endl; + std::cout << "[" << s << "]" << std::endl; } @@ -379,14 +379,14 @@ void test_boundaries(std::string *all,int *first,int *second,lb::boundary_type t run_word(all,first,second,0,0,0,g("he_IL.UTF-8"),t); std::cout << " char CP1255" << std::endl; run_word(all,first,second,0,0,0,g("he_IL.cp1255"),t); - std::cout << " wchar_t"<(all,first,second,0,0,0,g("he_IL.UTF-8"),t); #ifdef BOOST_LOCALE_ENABLE_CHAR16_T - std::cout << " char16_t"<(all,first,second,0,0,0,g("he_IL.UTF-8"),t); #endif #ifdef BOOST_LOCALE_ENABLE_CHAR32_T - std::cout << " char32_t"<(all,first,second,0,0,0,g("he_IL.UTF-8"),t); #endif @@ -427,20 +427,20 @@ void word_boundary() run_word(all2,zero,zero,zero,zero,zero,g("ja_JP.Shift-JIS")); run_word(all3,none3,zero,word3,zero,zero,g("ja_JP.Shift-JIS")); - std::cout << " wchar_t"<(all1,none1,num1,word1,kana1,ideo1,g("ja_JP.UTF-8")); run_word(all2,zero,zero,zero,zero,zero,g("en_US.UTF-8")); run_word(all3,none3,zero,word3,zero,zero,g("en_US.UTF-8")); #ifdef BOOST_LOCALE_ENABLE_CHAR16_T - std::cout << " char16_t"<(all1,none1,num1,word1,kana1,ideo1,g("ja_JP.UTF-8")); run_word(all2,zero,zero,zero,zero,zero,g("en_US.UTF-8")); run_word(all3,none3,zero,word3,zero,zero,g("en_US.UTF-8")); #endif #ifdef BOOST_LOCALE_ENABLE_CHAR32_T - std::cout << " char32_t"<(all1,none1,num1,word1,kana1,ideo1,g("ja_JP.UTF-8")); run_word(all2,zero,zero,zero,zero,zero,g("en_US.UTF-8")); run_word(all3,none3,zero,word3,zero,zero,g("en_US.UTF-8")); diff --git a/test/test_codecvt.cpp b/test/test_codecvt.cpp index e7d4df26..5652e16d 100644 --- a/test/test_codecvt.cpp +++ b/test/test_codecvt.cpp @@ -242,7 +242,7 @@ void test_codecvt_err() void test_char_char() { - std::cout << "Char-char specialization"<()); std::codecvt const &cvt=std::use_facet >(l); std::mbstate_t mb=std::mbstate_t(); diff --git a/test/test_codepage.cpp b/test/test_codepage.cpp index 4cf85a18..8eb71913 100644 --- a/test/test_codepage.cpp +++ b/test/test_codepage.cpp @@ -108,11 +108,11 @@ void test_wfail(std::string file,std::locale const &l,int pos) int i; for(i=0;i(); - std::cout <<" char<-wchar"<(); - std::cout <<" wchar<-char"<(); - std::cout <<" wchar<-wchar"<(); } @@ -362,7 +362,7 @@ void test_simple_conversions() test_skip("\xFB-","-","ISO-8859-8"); } catch(blc::invalid_charset_error const &) { - std::cout <<"--- not supported" << std::endl; + std::cout << "--- not supported" << std::endl; } try { std::cout << "-- cp932" << std::endl; @@ -372,7 +372,7 @@ void test_simple_conversions() test_skip("\x83\xF8-","-","cp932",""); } catch(blc::invalid_charset_error const &) { - std::cout <<"--- not supported" << std::endl; + std::cout << "--- not supported" << std::endl; } } diff --git a/test/test_codepage_converter.cpp b/test/test_codepage_converter.cpp index 4391fbc3..de18cf64 100644 --- a/test/test_codepage_converter.cpp +++ b/test/test_codepage_converter.cpp @@ -179,7 +179,7 @@ int main() TEST_TO(make4(0xDC00),illegal); TEST_TO(make4(0xDFFF),illegal); - std::cout <<"-- Incomplete" << std::endl; + std::cout << "-- Incomplete" << std::endl; TEST_TO("\x80",illegal); TEST_TO("\xC2",incomplete); diff --git a/test/test_config.cpp b/test/test_config.cpp index 48679571..df6a3156 100644 --- a/test/test_config.cpp +++ b/test/test_config.cpp @@ -78,15 +78,15 @@ int main() std::cout << "- Without iconv" << std::endl; #endif std::cout << "- Environment " << std::endl; - std::cout << " LANG="<< env("LANG") << std::endl; - std::cout << " LC_ALL="<< env("LC_ALL") << std::endl; - std::cout << " LC_CTYPE="<< env("LC_CTYPE") << std::endl; - std::cout << " TZ="<< env("TZ") << std::endl; + std::cout << " LANG=" << env("LANG") << std::endl; + std::cout << " LC_ALL=" << env("LC_ALL") << std::endl; + std::cout << " LC_CTYPE=" << env("LC_CTYPE") << std::endl; + std::cout << " TZ=" << env("TZ") << std::endl; char const *clocale=setlocale(LC_ALL,""); if(!clocale) clocale= "undetected"; - std::cout <<"- C locale: " << clocale << std::endl; + std::cout << "- C locale: " << clocale << std::endl; try { std::locale loc(""); diff --git a/test/test_convert.cpp b/test/test_convert.cpp index eec6fb88..0033f598 100644 --- a/test/test_convert.cpp +++ b/test/test_convert.cpp @@ -42,29 +42,29 @@ void test_norm(std::string orig,std::string normal,boost::locale::norm_type type } #define TEST_A(Chr,how,source,dest) \ - do { \ - boost::locale::info const &inf=std::use_facet(std::locale()); \ - std::cout <<"Testing " #how " for " #Chr ", lang="< void print_diff(std::string const &l,std::string const &r,int line) { if(l!=r) { - std::cerr << "----[" << l <<"]!=\n----["<>m2,type,str,value_out); \ }while(0) #define TEST_FP3(m1,m2,m3,value_in,str,type,value_out) \ do { \ - TEST_FMT(m1<>m2>>m3,type,str,value_out); \ }while(0) #define TEST_FP4(m1,m2,m3,m4,value_in,str,type,value_out) \ do { \ - TEST_FMT(m1<>m2>>m3>>m4,type,str,value_out); \ }while(0) @@ -222,8 +222,8 @@ void test_manip(std::string e_charset="UTF-8") TEST_FP1(as::posix,1200.1,"1200.1",double,1200.1); TEST_FP1(as::number,1200.1,"1,200.1",double,1200.1); - TEST_FMT(as::number< format_string(format.begin(),format.end()); strftime(local_time_str,sizeof(local_time_str),format.c_str(),gmtime(&lnow)); TEST_FMT(as::ftime(format_string),now,local_time_str); - TEST_FMT(as::ftime(format_string)<('%'); format_string+=static_cast(marks[i]); - TEST_FMT(as::ftime(format_string)<0 ) { \ - std::cout << "Failed "< to(std::string const &utf8) BOOST_LOCALE_START_CONST_CONDITION if(sizeof(Char)==1 && point > 255) { std::ostringstream ss; - ss << "Can't convert codepoint U" << std::hex << point <<"(" <0xFFFF) { // Deal with surragates diff --git a/test/test_locale_tools.hpp b/test/test_locale_tools.hpp index 1908c101..33e3b4e1 100644 --- a/test/test_locale_tools.hpp +++ b/test/test_locale_tools.hpp @@ -46,7 +46,7 @@ inline bool test_std_supports_SJIS_codecvt(std::string const &locale_name) // Japan in Shift JIS/cp932 char const *japan_932 = "\x93\xfa\x96\x7b"; std::ofstream f("test-siftjis.txt"); - f<(gen(name),"i","i","İ"); } else { - std::cout <<" Turkish locale is not supported well" << std::endl; + std::cout << " Turkish locale is not supported well" << std::endl; } } catch(...) { diff --git a/test/test_posix_formatting.cpp b/test/test_posix_formatting.cpp index 648d4d37..54603edc 100644 --- a/test/test_posix_formatting.cpp +++ b/test/test_posix_formatting.cpp @@ -235,7 +235,7 @@ int main() std::cout << "he_IL.ISO locale" << std::endl; std::string name = "he_IL.ISO8859-8"; if(!have_locale(name)) { - std::cout << name <<" not supported" << std::endl; + std::cout << name << " not supported" << std::endl; } else { std::locale l1=gen(name); diff --git a/test/test_std_formatting.cpp b/test/test_std_formatting.cpp index 56f9d650..42d7833e 100644 --- a/test/test_std_formatting.cpp +++ b/test/test_std_formatting.cpp @@ -340,7 +340,7 @@ int main() } if(!fails) { - std::cout << "- No invalid UTF. No need to check"<(s2,"UTF-8"); #ifdef DEBUG_FMT if(!res) - std::cout << "[" << boost::locale::conv::from_utf(s1,"UTF-8") << "]!=["<(l1,name,lcids[i]); } - std::cout << "- Testing strftime" < Date: Wed, 29 Jun 2022 14:53:49 +0200 Subject: [PATCH 60/90] Use \n instead of std::endl where appropriate We usually don't need the flush so use \n at end of strings which greatly shortens the code. --- examples/boundary.cpp | 2 +- examples/conversions.cpp | 17 +++++----- examples/performance/perf_collate.cpp | 2 +- examples/performance/perf_convert.cpp | 6 ++-- examples/performance/perf_format.cpp | 2 +- examples/wboundary.cpp | 4 +-- examples/wconversions.cpp | 16 +++++----- include/boost/locale/boundary/index.hpp | 2 +- include/boost/locale/date_time.hpp | 2 +- include/boost/locale/format.hpp | 10 +++--- include/boost/locale/generic_codecvt.hpp | 40 ++++++++++++------------ test/test_boundary.cpp | 4 +-- test/test_codecvt.cpp | 2 +- test/test_codepage.cpp | 12 +++---- test/test_codepage_converter.cpp | 4 +-- test/test_collate.cpp | 2 +- test/test_config.cpp | 14 ++++----- test/test_convert.cpp | 2 +- test/test_date_time.cpp | 2 +- test/test_formatting.cpp | 4 +-- test/test_icu_vs_os_timezone.cpp | 2 +- test/test_locale.hpp | 6 ++-- test/test_posix_collate.cpp | 4 +-- test/test_posix_convert.cpp | 2 +- test/test_posix_formatting.cpp | 2 +- test/test_std_collate.cpp | 4 +-- test/test_std_convert.cpp | 2 +- test/test_std_formatting.cpp | 2 +- test/test_utf.cpp | 6 ++-- test/test_winapi_collate.cpp | 2 +- test/test_winapi_convert.cpp | 2 +- test/test_winapi_formatting.cpp | 10 +++--- 32 files changed, 96 insertions(+), 97 deletions(-) diff --git a/examples/boundary.cpp b/examples/boundary.cpp index d1466583..7059ad82 100644 --- a/examples/boundary.cpp +++ b/examples/boundary.cpp @@ -20,7 +20,7 @@ int main() // We need the boundary facet, currently only available via ICU if(!std::has_facet>(loc)) { - std::cout << "boundary detection not implemented in this environment" << std::endl; + std::cout << "boundary detection not implemented in this environment\n"; return 0; } std::locale::global(loc); diff --git a/examples/conversions.cpp b/examples/conversions.cpp index 5d6358ce..fc7a3dae 100644 --- a/examples/conversions.cpp +++ b/examples/conversions.cpp @@ -23,21 +23,20 @@ int main() std::cout.imbue(loc); - std::cout << "Correct case conversion can't be done by simple, character by character conversion" << std::endl; - std::cout << "because case conversion is context sensitive and not 1-to-1 conversion" << std::endl; - std::cout << "For example:" << std::endl; + std::cout << "Correct case conversion can't be done by simple, character by character conversion\n"; + std::cout << "because case conversion is context sensitive and not 1-to-1 conversion\n"; + std::cout << "For example:\n"; std::cout << " German grüßen correctly converted to " << to_upper("grüßen") << ", instead of incorrect " << boost::to_upper_copy(std::string("grüßen")) << std::endl; - std::cout << " where ß is replaced with SS" << std::endl; + std::cout << " where ß is replaced with SS\n"; std::cout << " Greek ὈΔΥΣΣΕΎΣ is correctly converted to " << to_lower("ὈΔΥΣΣΕΎΣ") << ", instead of incorrect " << boost::to_lower_copy(std::string("ὈΔΥΣΣΕΎΣ")) << std::endl; - std::cout << " where Σ is converted to σ or to ς, according to position in the word" << std::endl; - std::cout << "Such type of conversion just can't be done using std::toupper that work on character base, also std::toupper is " << endl; - std::cout << "not even applicable when working with variable character length like in UTF-8 or UTF-16 limiting the correct " << endl; - std::cout << "behavior to unicode subset BMP or ASCII only" << std::endl; - + std::cout << " where Σ is converted to σ or to ς, according to position in the word\n"; + std::cout << "Such type of conversion just can't be done using std::toupper that work on character base, also std::toupper is\n"; + std::cout << "not even applicable when working with variable character length like in UTF-8 or UTF-16 limiting the correct\n"; + std::cout << "behavior to unicode subset BMP or ASCII only\n"; } // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/examples/performance/perf_collate.cpp b/examples/performance/perf_collate.cpp index 6c0c4dcf..e5473537 100644 --- a/examples/performance/perf_collate.cpp +++ b/examples/performance/perf_collate.cpp @@ -16,7 +16,7 @@ using namespace boost::locale; int main(int argc,char **argv) { if(argc!=2) { - std::cerr << "Usage backend locale" << std::endl; + std::cerr << "Usage backend locale\n"; return 1; } boost::locale::localization_backend_manager mgr = boost::locale::localization_backend_manager::global(); diff --git a/examples/performance/perf_convert.cpp b/examples/performance/perf_convert.cpp index 332662a0..b74290c9 100644 --- a/examples/performance/perf_convert.cpp +++ b/examples/performance/perf_convert.cpp @@ -17,7 +17,7 @@ using namespace boost::locale; int main(int argc,char **argv) { if(argc!=2) { - std::cerr << "Usage backend locale" << std::endl; + std::cerr << "Usage backend locale\n"; return 1; } /// Set global locale to requested @@ -29,9 +29,9 @@ int main(int argc,char **argv) set_type all_strings; /// Read all strings into the set - while(!cin.eof()) { + while(!std::cin.eof()) { std::string tmp; - getline(cin,tmp); + getline(std::cin,tmp); all.push_back(tmp); } diff --git a/examples/performance/perf_format.cpp b/examples/performance/perf_format.cpp index 01cf0904..8368633d 100644 --- a/examples/performance/perf_format.cpp +++ b/examples/performance/perf_format.cpp @@ -16,7 +16,7 @@ using namespace boost::locale; int main(int argc,char **argv) { if(argc!=2) { - std::cerr << "Usage backend locale" << std::endl; + std::cerr << "Usage backend locale\n"; return 1; } boost::locale::localization_backend_manager mgr = boost::locale::localization_backend_manager::global(); diff --git a/examples/wboundary.cpp b/examples/wboundary.cpp index 2fc598a9..a28325c5 100644 --- a/examples/wboundary.cpp +++ b/examples/wboundary.cpp @@ -45,7 +45,7 @@ int main() // We need the boundary facet, currently only available via ICU if(!std::has_facet>(loc)) { - std::cout << "boundary detection not implemented in this environment" << std::endl; + std::cout << "boundary detection not implemented in this environment\n"; return 0; } std::locale::global(loc); @@ -96,7 +96,7 @@ int main() index.map(boundary::sentence,text.begin(),text.end()); for(p=index.begin(),e=index.end();p!=e;++p) { - std::wcout << L"|" + std::wcout << L"|" << *p; } std::wcout << "|\n\n"; diff --git a/examples/wconversions.cpp b/examples/wconversions.cpp index 882a9065..f5b885b4 100644 --- a/examples/wconversions.cpp +++ b/examples/wconversions.cpp @@ -52,20 +52,20 @@ int main() std::ios_base::sync_with_stdio(false); - std::wcout << L"Correct case conversion can't be done by simple, character by character conversion" << std::endl; - std::wcout << L"because case conversion is context sensitive and not 1-to-1 conversion" << std::endl; - std::wcout << L"For example:" << std::endl; + std::wcout << L"Correct case conversion can't be done by simple, character by character conversion\n"; + std::wcout << L"because case conversion is context sensitive and not 1-to-1 conversion\n"; + std::wcout << L"For example:\n"; std::wcout << L" German grüßen correctly converted to " << to_upper(L"grüßen") << L", instead of incorrect " << boost::to_upper_copy(std::wstring(L"grüßen")) << std::endl; - std::wcout << L" where ß is replaced with SS" << std::endl; + std::wcout << L" where ß is replaced with SS\n"; std::wcout << L" Greek ὈΔΥΣΣΕΎΣ is correctly converted to " << to_lower(L"ὈΔΥΣΣΕΎΣ") << L", instead of incorrect " << boost::to_lower_copy(std::wstring(L"ὈΔΥΣΣΕΎΣ")) << std::endl; - std::wcout << L" where Σ is converted to σ or to ς, according to position in the word" << std::endl; - std::wcout << L"Such type of conversion just can't be done using std::toupper that work on character base, also std::toupper is " << std::endl; - std::wcout << L"not fully applicable when working with variable character length like in UTF-8 or UTF-16 limiting the correct " << std::endl; - std::wcout << L"behavoir to BMP or ASCII only" << std::endl; + std::wcout << L" where Σ is converted to σ or to ς, according to position in the word\n"; + std::wcout << L"Such type of conversion just can't be done using std::toupper that work on character base, also std::toupper is \n"; + std::wcout << L"not fully applicable when working with variable character length like in UTF-8 or UTF-16 limiting the correct \n"; + std::wcout << L"behavoir to BMP or ASCII only\n"; } diff --git a/include/boost/locale/boundary/index.hpp b/include/boost/locale/boundary/index.hpp index e19f6b3e..dbb7216c 100644 --- a/include/boost/locale/boundary/index.hpp +++ b/include/boost/locale/boundary/index.hpp @@ -571,7 +571,7 @@ namespace boost { /// segment_index::iterator p=index.begin(); /// segment &t = *p; /// ++p; - /// cout << t.str() << endl; + /// std::cout << t.str() << std::endl; /// \endcode /// typedef unspecified_iterator_type iterator; diff --git a/include/boost/locale/date_time.hpp b/include/boost/locale/date_time.hpp index 25b3431f..e7a4ef0f 100644 --- a/include/boost/locale/date_time.hpp +++ b/include/boost/locale/date_time.hpp @@ -863,7 +863,7 @@ namespace boost { /// For example: /// \code /// date_time now(time(0),hebrew_calendar) - /// cout << "Year: " << period::year(now) << " Full Date:" << now; + /// std::cout << "Year: " << period::year(now) << " Full Date:" << now; /// \endcode /// /// The output may be Year:5770 Full Date:Jan 1, 2010 diff --git a/include/boost/locale/format.hpp b/include/boost/locale/format.hpp index 4022ae82..af86d9c8 100644 --- a/include/boost/locale/format.hpp +++ b/include/boost/locale/format.hpp @@ -137,7 +137,7 @@ namespace boost { /// /// For example /// \code - /// cout << format("Hello {1}, you are {2} years old") % name % age << endl; + /// std::cout << format("Hello {1}, you are {2} years old") % name % age << std::endl; /// \endcode /// /// Formatting is enclosed between curly brackets \c { \c } and defined by a comma separated list of flags in the format key[=value] @@ -150,7 +150,7 @@ namespace boost { /// For example: /// /// \code - /// cout << format("The height of water at {1,time} is {2,num=fixed,precision=3}") % time % height; + /// std::cout << format("The height of water at {1,time} is {2,num=fixed,precision=3}") % time % height; /// \endcode /// /// The special key -- a number without a value defines the position of an input parameter. @@ -185,16 +185,16 @@ namespace boost { /// - \c locale -- with parameter -- switch locale for current operation. This command generates locale /// with formatting facets giving more fine grained control of formatting. For example: /// \code - /// cout << format("Today {1,date} ({1,date,locale=he_IL.UTF-8@calendar=hebrew,date} Hebrew Date)") % date; + /// std::cout << format("Today {1,date} ({1,date,locale=he_IL.UTF-8@calendar=hebrew,date} Hebrew Date)") % date; /// \endcode /// - \c timezone or \c tz -- the name of the timezone to display the time in. For example:\n /// \code - /// cout << format("Time is: Local {1,time}, ({1,time,tz=EET} Eastern European Time)") % date; + /// std::cout << format("Time is: Local {1,time}, ({1,time,tz=EET} Eastern European Time)") % date; /// \endcode /// - \c local - display the time in local time /// - \c gmt - display the time in UTC time scale /// \code - /// cout << format("Local time is: {1,time,local}, universal time is {1,time,gmt}") % time; + /// std::cout << format("Local time is: {1,time,local}, universal time is {1,time,gmt}") % time; /// \endcode /// /// diff --git a/include/boost/locale/generic_codecvt.hpp b/include/boost/locale/generic_codecvt.hpp index 02a608d2..4e983224 100644 --- a/include/boost/locale/generic_codecvt.hpp +++ b/include/boost/locale/generic_codecvt.hpp @@ -256,7 +256,7 @@ class generic_codecvt : public std::codecvt : public std::codecvt : public std::codecvt : public std::codecvt : public std::codecvt : public std::codecvt : public std::codecvt : public std::codecvt int main() { - std::cout << "ICU is not build... Skipping" << std::endl; + std::cout << "ICU is not build... Skipping\n"; } #else @@ -34,7 +34,7 @@ void print_str(std::basic_string const &/*s*/) template<> void print_str(std::basic_string const &s) { - std::cout << "[" << s << "]" << std::endl; + std::cout << "[" << s << "]\n"; } diff --git a/test/test_codecvt.cpp b/test/test_codecvt.cpp index 5652e16d..4487f5ca 100644 --- a/test/test_codecvt.cpp +++ b/test/test_codecvt.cpp @@ -276,7 +276,7 @@ int main() std::cerr << "Failed : " << e.what() << std::endl; return 1; } - std::cout << "Ok" << std::endl; + std::cout << "Ok\n"; return 0; } /// diff --git a/test/test_codepage.cpp b/test/test_codepage.cpp index 8eb71913..db0b6633 100644 --- a/test/test_codepage.cpp +++ b/test/test_codepage.cpp @@ -137,7 +137,7 @@ void test_for_char() test_ok(res.c_str(),g("en_US.UTF-8")); // U+2008A } else { - std::cout << " UTF-8 Not supported " << std::endl; + std::cout << " UTF-8 Not supported \n"; } if(test_iso) { @@ -305,7 +305,7 @@ void test_combinations() void test_all_combinations() { - std::cout << "Testing utf_to_utf" << std::endl; + std::cout << "Testing utf_to_utf\n"; std::cout << " char<-char" << std::endl; test_combinations(); std::cout << " char<-wchar" << std::endl; @@ -353,7 +353,7 @@ void test_skip(char const *enc,char const *utf,char const *name,char const *opt= void test_simple_conversions() { namespace blc=boost::locale::conv; - std::cout << "- Testing correct invalid bytes skipping" << std::endl; + std::cout << "- Testing correct invalid bytes skipping\n"; try { std::cout << "-- ISO-8859-8" << std::endl; test_skip("test \xE0\xE1\xFB-","test \xd7\x90\xd7\x91-","ISO-8859-8"); @@ -362,7 +362,7 @@ void test_simple_conversions() test_skip("\xFB-","-","ISO-8859-8"); } catch(blc::invalid_charset_error const &) { - std::cout << "--- not supported" << std::endl; + std::cout << "--- not supported\n"; } try { std::cout << "-- cp932" << std::endl; @@ -372,7 +372,7 @@ void test_simple_conversions() test_skip("\x83\xF8-","-","cp932",""); } catch(blc::invalid_charset_error const &) { - std::cout << "--- not supported" << std::endl; + std::cout << "--- not supported\n"; } } @@ -484,7 +484,7 @@ int main() std::cout << "Testing wide I/O" << std::endl; test_wide_io(); - std::cout << "Testing charset to/from UTF conversion functions" << std::endl; + std::cout << "Testing charset to/from UTF conversion functions\n"; std::cout << " char" << std::endl; test_to(); std::cout << " wchar_t" << std::endl; diff --git a/test/test_codepage_converter.cpp b/test/test_codepage_converter.cpp index de18cf64..b054d217 100644 --- a/test/test_codepage_converter.cpp +++ b/test/test_codepage_converter.cpp @@ -91,7 +91,7 @@ int main() try { using namespace boost::locale::util; - std::cout << "Test UTF-8" << std::endl; + std::cout << "Test UTF-8\n"; std::cout << "- From UTF-8" << std::endl; @@ -200,7 +200,7 @@ int main() TEST_TO("\xf4\x8f",incomplete); TEST_TO("\xf4",incomplete); - std::cout << "- To UTF-8" << std::endl; + std::cout << "- To UTF-8\n"; std::cout << "-- Test correct" << std::endl; diff --git a/test/test_collate.cpp b/test/test_collate.cpp index f42437ef..a6f5ec47 100644 --- a/test/test_collate.cpp +++ b/test/test_collate.cpp @@ -10,7 +10,7 @@ #include int main() { - std::cout << "ICU is not build... Skipping" << std::endl; + std::cout << "ICU is not build... Skipping\n"; } #else diff --git a/test/test_config.cpp b/test/test_config.cpp index df6a3156..e0212211 100644 --- a/test/test_config.cpp +++ b/test/test_config.cpp @@ -35,7 +35,7 @@ char const *env(char const *s) void check_locale(char const **names) { - std::cout << " " << std::setw(32) << "locale" << std::setw(4) << "C" << std::setw(4) << "C++" << std::endl; + std::cout << " " << std::setw(32) << "locale" << std::setw(4) << "C" << std::setw(4) << "C++\n"; while(*names) { char const *name = *names; std::cout << " " << std::setw(32) << name << std::setw(4); @@ -73,11 +73,11 @@ int main() #endif std::cout << std::endl; #ifdef BOOST_LOCALE_WITH_ICONV - std::cout << "- With iconv" << std::endl; + std::cout << "- With iconv\n"; #else - std::cout << "- Without iconv" << std::endl; + std::cout << "- Without iconv\n"; #endif - std::cout << "- Environment " << std::endl; + std::cout << "- Environment \n"; std::cout << " LANG=" << env("LANG") << std::endl; std::cout << " LC_ALL=" << env("LC_ALL") << std::endl; std::cout << " LC_CTYPE=" << env("LC_CTYPE") << std::endl; @@ -91,13 +91,13 @@ int main() try { std::locale loc(""); #if defined(BOOST_CLANG) && BOOST_CLANG_VERSION < 30800 - std::cout << "- C++ locale: n/a on Clang < 3.8" << std::endl; + std::cout << "- C++ locale: n/a on Clang < 3.8\n"; #else std::cout << "- C++ locale: " << loc.name() << std::endl; #endif } catch(std::exception const &) { - std::cout << "- C++ locale: is not supported" << std::endl; + std::cout << "- C++ locale: is not supported\n"; } char const *locales_to_check[] = { @@ -129,7 +129,7 @@ int main() std::cout << std::use_facet(l).name() << std::endl; } catch(std::exception const &) { - std::cout << " undetected" << std::endl; + std::cout << " undetected\n"; return EXIT_FAILURE; } return EXIT_SUCCESS; diff --git a/test/test_convert.cpp b/test/test_convert.cpp index 0033f598..c2098cb6 100644 --- a/test/test_convert.cpp +++ b/test/test_convert.cpp @@ -9,7 +9,7 @@ #include int main() { - std::cout << "ICU is not build... Skipping" << std::endl; + std::cout << "ICU is not build... Skipping\n"; } #else diff --git a/test/test_date_time.cpp b/test/test_date_time.cpp index dfcb599c..92f93873 100644 --- a/test/test_date_time.cpp +++ b/test/test_date_time.cpp @@ -31,7 +31,7 @@ do { \ ss << (t); \ if(ss.str()!=X) { \ - std::cerr << "[" << ss.str() << "]!=[" << X << "]" << std::endl; \ + std::cerr << "[" << ss.str() << "]!=[" << X << "]\n"; \ } \ TESTR(ss.str() == X); \ } while(0) diff --git a/test/test_formatting.cpp b/test/test_formatting.cpp index c1acc64f..3bc49175 100644 --- a/test/test_formatting.cpp +++ b/test/test_formatting.cpp @@ -9,7 +9,7 @@ #include int main() { - std::cout << "ICU is not build... Skipping" << std::endl; + std::cout << "ICU is not build... Skipping\n"; } #else @@ -89,7 +89,7 @@ static bool parsing_fails() } checked=true; if(!fails) { - std::cerr << "!!! Warning: libc++ library does not throw an exception on failbit !!!" << std::endl; + std::cerr << "!!! Warning: libc++ library does not throw an exception on failbit !!!\n"; } } return fails; diff --git a/test/test_icu_vs_os_timezone.cpp b/test/test_icu_vs_os_timezone.cpp index d2de58cf..1d5b5697 100644 --- a/test/test_icu_vs_os_timezone.cpp +++ b/test/test_icu_vs_os_timezone.cpp @@ -10,7 +10,7 @@ #include int main() { - std::cout << "ICU is not build... Skipping" << std::endl; + std::cout << "ICU is not build... Skipping\n"; } #else diff --git a/test/test_locale.hpp b/test/test_locale.hpp index 4df06dc6..3521f5b6 100644 --- a/test/test_locale.hpp +++ b/test/test_locale.hpp @@ -51,13 +51,13 @@ do { do { \ int passed=test_counter - error_counter; \ std::cout << std::endl; \ - std::cout << "Passed " << passed << " tests" << std::endl; \ + std::cout << "Passed " << passed << " tests\n"; \ if(error_counter >0 ) { \ - std::cout << "Failed " << error_counter << " tests" << std::endl; \ + std::cout << "Failed " << error_counter << " tests\n"; \ } \ std::cout << " " << std::fixed << std::setprecision(1) \ << std::setw(5) << 100.0 * passed / test_counter << \ - "% of tests completed sucsessefully" << std::endl; \ + "% of tests completed sucsessefully\n"; \ return error_counter == 0 ? EXIT_SUCCESS : EXIT_FAILURE ; \ }while(0) diff --git a/test/test_posix_collate.cpp b/test/test_posix_collate.cpp index a8495a82..7c8016c1 100644 --- a/test/test_posix_collate.cpp +++ b/test/test_posix_collate.cpp @@ -9,7 +9,7 @@ #include int main() { - std::cout << "POSIX Backend is not build... Skipping" << std::endl; + std::cout << "POSIX Backend is not build... Skipping\n"; } #else #include @@ -89,7 +89,7 @@ void test_char() } } #else - std::cout << "- Collation is broken on this OS C standard library, skipping" << std::endl; + std::cout << "- Collation is broken on this OS C standard library, skipping\n"; #endif } diff --git a/test/test_posix_convert.cpp b/test/test_posix_convert.cpp index bba8b173..a90ac790 100644 --- a/test/test_posix_convert.cpp +++ b/test/test_posix_convert.cpp @@ -9,7 +9,7 @@ #include int main() { - std::cout << "POSIX Backend is not build... Skipping" << std::endl; + std::cout << "POSIX Backend is not build... Skipping\n"; } #else #include diff --git a/test/test_posix_formatting.cpp b/test/test_posix_formatting.cpp index 54603edc..8000846c 100644 --- a/test/test_posix_formatting.cpp +++ b/test/test_posix_formatting.cpp @@ -9,7 +9,7 @@ #include int main() { - std::cout << "POSIX Backend is not build... Skipping" << std::endl; + std::cout << "POSIX Backend is not build... Skipping\n"; } #else #include diff --git a/test/test_std_collate.cpp b/test/test_std_collate.cpp index d1bf2b34..c401b88f 100644 --- a/test/test_std_collate.cpp +++ b/test/test_std_collate.cpp @@ -10,7 +10,7 @@ #include int main() { - std::cout << "STD Backend is not build... Skipping" << std::endl; + std::cout << "STD Backend is not build... Skipping\n"; } #else @@ -76,7 +76,7 @@ void test_char() std::string name; #if defined(_LIBCPP_VERSION) && (defined(__APPLE__) || defined(__FreeBSD__)) - std::cout << "- Collation is broken on this OS's standard C++ library, skipping" << std::endl; + std::cout << "- Collation is broken on this OS's standard C++ library, skipping\n"; #else std::string names[] = { "en_US.UTF-8", "en_US.ISO8859-1" }; for(unsigned i=0;i int main() { - std::cout << "STD Backend is not build... Skipping" << std::endl; + std::cout << "STD Backend is not build... Skipping\n"; } #else diff --git a/test/test_std_formatting.cpp b/test/test_std_formatting.cpp index 42d7833e..1cd75b52 100644 --- a/test/test_std_formatting.cpp +++ b/test/test_std_formatting.cpp @@ -10,7 +10,7 @@ #include int main() { - std::cout << "STD Backend is not build... Skipping" << std::endl; + std::cout << "STD Backend is not build... Skipping\n"; } #else diff --git a/test/test_utf.cpp b/test/test_utf.cpp index c021977d..af7afb7f 100644 --- a/test/test_utf.cpp +++ b/test/test_utf.cpp @@ -126,7 +126,7 @@ void test_valid_utf(CharType const* str, unsigned codepoint) void test_utf8() { - std::cout << "- Test UTF-8" << std::endl; + std::cout << "- Test UTF-8\n"; std::cout << "-- Correct" << std::endl; test_valid_utf("\x7f", 0x7f); @@ -210,7 +210,7 @@ void test_utf8() void test_utf16() { - std::cout << "- Test UTF-16" << std::endl; + std::cout << "- Test UTF-16\n"; std::cout << "-- Correct" << std::endl; test_valid_utf(u16_seq(0x10), 0x10); @@ -245,7 +245,7 @@ void test_utf16() void test_utf32() { - std::cout << "- Test UTF-32" << std::endl; + std::cout << "- Test UTF-32\n"; std::cout << "-- Correct" << std::endl; test_valid_utf(u32_seq(0x10), 0x10); diff --git a/test/test_winapi_collate.cpp b/test/test_winapi_collate.cpp index b726877c..641c40e4 100644 --- a/test/test_winapi_collate.cpp +++ b/test/test_winapi_collate.cpp @@ -10,7 +10,7 @@ #include int main() { - std::cout << "WinAPI Backend is not build... Skipping" << std::endl; + std::cout << "WinAPI Backend is not build... Skipping\n"; } #else diff --git a/test/test_winapi_convert.cpp b/test/test_winapi_convert.cpp index bfdebfe5..c1e16f7b 100644 --- a/test/test_winapi_convert.cpp +++ b/test/test_winapi_convert.cpp @@ -9,7 +9,7 @@ #include int main() { - std::cout << "WinAPI Backend is not build... Skipping" << std::endl; + std::cout << "WinAPI Backend is not build... Skipping\n"; } #else diff --git a/test/test_winapi_formatting.cpp b/test/test_winapi_formatting.cpp index 5103c817..43792978 100644 --- a/test/test_winapi_formatting.cpp +++ b/test/test_winapi_formatting.cpp @@ -10,7 +10,7 @@ #include int main() { - std::cout << "WinAPI Backend is not build... Skipping" << std::endl; + std::cout << "WinAPI Backend is not build... Skipping\n"; } #else @@ -40,7 +40,7 @@ bool equal(std::string const &s1,std::wstring const &s2) bool res = s1 == boost::locale::conv::from_utf(s2,"UTF-8"); #ifdef DEBUG_FMT if(!res) - std::cout << "[" << s1 << "]!=[" << boost::locale::conv::from_utf(s2,"UTF-8") << "]" << std::endl; + std::cout << "[" << s1 << "]!=[" << boost::locale::conv::from_utf(s2,"UTF-8") << "]\n"; #endif return res; } @@ -50,7 +50,7 @@ bool equal(std::wstring const &s1,std::wstring const &s2) bool res = s1 == s2; #ifdef DEBUG_FMT if(!res) - std::cout << "[" << boost::locale::conv::from_utf(s1,"UTF-8") << "]!=[" << boost::locale::conv::from_utf(s2,"UTF-8") << "]" << std::endl; + std::cout << "[" << boost::locale::conv::from_utf(s1,"UTF-8") << "]!=[" << boost::locale::conv::from_utf(s2,"UTF-8") << "]\n"; #endif return res; } @@ -61,7 +61,7 @@ bool equal(std::string const &s1,std::string const &s2) bool res = s1 == s2; #ifdef DEBUG_FMT if(!res) - std::cout << "[" << s1 << "]!=[" << s2 << "]" << std::endl; + std::cout << "[" << s1 << "]!=[" << s2 << "]\n"; #endif return res; } @@ -71,7 +71,7 @@ bool equal(std::wstring const &s1,std::string const &s2) bool res = s1 == boost::locale::conv::to_utf(s2,"UTF-8"); #ifdef DEBUG_FMT if(!res) - std::cout << "[" << boost::locale::conv::from_utf(s1,"UTF-8") << "]!=[" << s2 << "]" << std::endl; + std::cout << "[" << boost::locale::conv::from_utf(s1,"UTF-8") << "]!=[" << s2 << "]\n"; #endif return res; From aa30bd33aa014fc30d52b96ece64b3892bc43869 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Thu, 30 Jun 2022 10:25:31 +0200 Subject: [PATCH 61/90] Refactor test framework Use a common `main` function calling into custom `test_main` functions and move all common code into the former. Also introduce an RAII class for a `locale_t` to avoid leaks and reduce the code further. Add some LCOV annotations for lines not expected to be reached. --- include/boost/locale/utf.hpp | 2 +- src/icu/codecvt.cpp | 2 +- test/test_boundary.cpp | 29 +- test/test_codecvt.cpp | 17 +- test/test_codepage.cpp | 221 +++++++------- test/test_codepage_converter.cpp | 360 +++++++++++----------- test/test_collate.cpp | 12 +- test/test_config.cpp | 9 +- test/test_convert.cpp | 86 +++--- test/test_date_time.cpp | 509 +++++++++++++++---------------- test/test_formatting.cpp | 55 ++-- test/test_generator.cpp | 127 ++++---- test/test_icu_vs_os_timezone.cpp | 39 +-- test/test_ios_prop.cpp | 84 +++-- test/test_locale.hpp | 34 ++- test/test_locale_tools.hpp | 7 +- test/test_message.cpp | 368 +++++++++++----------- test/test_posix_collate.cpp | 27 +- test/test_posix_convert.cpp | 49 +-- test/test_posix_formatting.cpp | 185 +++++------ test/test_posix_tools.hpp | 18 ++ test/test_std_collate.cpp | 42 ++- test/test_std_convert.cpp | 40 +-- test/test_std_formatting.cpp | 272 ++++++++--------- test/test_utf.cpp | 15 +- test/test_winapi_collate.cpp | 21 +- test/test_winapi_convert.cpp | 46 ++- test/test_winapi_formatting.cpp | 52 ++-- 28 files changed, 1273 insertions(+), 1455 deletions(-) diff --git a/include/boost/locale/utf.hpp b/include/boost/locale/utf.hpp index 9db22e7f..dbd2ea51 100644 --- a/include/boost/locale/utf.hpp +++ b/include/boost/locale/utf.hpp @@ -51,7 +51,7 @@ namespace utf { { if(v>0x10FFFF) return false; - if(0xD800 <=v && v<= 0xDFFF) // surragates + if(0xD800 <=v && v<= 0xDFFF) // surrogates return false; return true; } diff --git a/src/icu/codecvt.cpp b/src/icu/codecvt.cpp index e999b769..b47efb9c 100644 --- a/src/icu/codecvt.cpp +++ b/src/icu/codecvt.cpp @@ -85,7 +85,7 @@ namespace impl_icu { UChar code_point[2]={0}; int len; if(u<=0xFFFF) { - if(0xD800 <=u && u<= 0xDFFF) // No surragates + if(0xD800 <=u && u<= 0xDFFF) // No surrogates return illegal; code_point[0]=u; len=1; diff --git a/test/test_boundary.cpp b/test/test_boundary.cpp index a8245752..f0a2eb26 100644 --- a/test/test_boundary.cpp +++ b/test/test_boundary.cpp @@ -511,25 +511,18 @@ void segment_operator() test_op("aa","ab",-1); } -int main() +void test_main(int /*argc*/, char** /*argv*/) { - try { - std::cout << "Testing segment operators" << std::endl; - segment_operator(); - std::cout << "Testing word boundary" << std::endl; - word_boundary(); - std::cout << "Testing character boundary" << std::endl; - test_boundaries(character,nones,0,lb::character); - std::cout << "Testing sentence boundary" << std::endl; - test_boundaries(sentence1,sentence1a,sentence1b,lb::sentence); - std::cout << "Testing line boundary" << std::endl; - test_boundaries(line1,line1a,line1b,lb::line); - } - catch(std::exception const &e) { - std::cerr << "Failed " << e.what() << std::endl; - return EXIT_FAILURE; - } - FINALIZE(); + std::cout << "Testing segment operators" << std::endl; + segment_operator(); + std::cout << "Testing word boundary" << std::endl; + word_boundary(); + std::cout << "Testing character boundary" << std::endl; + test_boundaries(character,nones,0,lb::character); + std::cout << "Testing sentence boundary" << std::endl; + test_boundaries(sentence1,sentence1a,sentence1b,lb::sentence); + std::cout << "Testing line boundary" << std::endl; + test_boundaries(line1,line1a,line1b,lb::line); } #endif // NOICU diff --git a/test/test_codecvt.cpp b/test/test_codecvt.cpp index 4487f5ca..29c911f0 100644 --- a/test/test_codecvt.cpp +++ b/test/test_codecvt.cpp @@ -264,20 +264,11 @@ void test_char_char() TEST(cvt.max_length()==1); } -int main() +void test_main(int /*argc*/, char** /*argv*/) { - try { - test_codecvt_conv(); - test_codecvt_err(); - test_char_char(); - - } - catch(std::exception const &e) { - std::cerr << "Failed : " << e.what() << std::endl; - return 1; - } - std::cout << "Ok\n"; - return 0; + test_codecvt_conv(); + test_codecvt_err(); + test_char_char(); } /// // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/test/test_codepage.cpp b/test/test_codepage.cpp index db0b6633..cf0e59ec 100644 --- a/test/test_codepage.cpp +++ b/test/test_codepage.cpp @@ -362,7 +362,7 @@ void test_simple_conversions() test_skip("\xFB-","-","ISO-8859-8"); } catch(blc::invalid_charset_error const &) { - std::cout << "--- not supported\n"; + std::cout << "--- not supported\n"; //LCOV_EXCL_LINE } try { std::cout << "-- cp932" << std::endl; @@ -372,144 +372,133 @@ void test_simple_conversions() test_skip("\x83\xF8-","-","cp932",""); } catch(blc::invalid_charset_error const &) { - std::cout << "--- not supported\n"; + std::cout << "--- not supported\n"; //LCOV_EXCL_LINE } } -int main() +void test_main(int /*argc*/, char** /*argv*/) { - try { - std::vector def; - #ifdef BOOST_LOCALE_WITH_ICU - def.push_back("icu"); - #endif - #ifndef BOOST_LOCALE_NO_STD_BACKEND - def.push_back("std"); - #endif - #ifndef BOOST_LOCALE_NO_WINAPI_BACKEND - def.push_back("winapi"); - #endif - #ifndef BOOST_LOCALE_NO_POSIX_BACKEND - def.push_back("posix"); - #endif + // Sanity check to + TEST(to("grüßen") == "gr\xFC\xDF""en"); + TEST_THROWS(to("€"), std::runtime_error); - #if !defined(BOOST_LOCALE_WITH_ICU) && !defined(BOOST_LOCALE_WITH_ICONV) && (defined(BOOST_WINDOWS) || defined(__CYGWIN__)) - test_iso_8859_8 = IsValidCodePage(28598)!=0; - #endif + std::vector def; + #ifdef BOOST_LOCALE_WITH_ICU + def.push_back("icu"); + #endif + #ifndef BOOST_LOCALE_NO_STD_BACKEND + def.push_back("std"); + #endif + #ifndef BOOST_LOCALE_NO_WINAPI_BACKEND + def.push_back("winapi"); + #endif + #ifndef BOOST_LOCALE_NO_POSIX_BACKEND + def.push_back("posix"); + #endif - test_simple_conversions(); + #if !defined(BOOST_LOCALE_WITH_ICU) && !defined(BOOST_LOCALE_WITH_ICONV) && (defined(BOOST_WINDOWS) || defined(__CYGWIN__)) + test_iso_8859_8 = IsValidCodePage(28598)!=0; + #endif + test_simple_conversions(); - for(int type = 0; type < int(def.size()); type ++ ) { - boost::locale::localization_backend_manager tmp_backend = boost::locale::localization_backend_manager::global(); - tmp_backend.select(def[type]); - boost::locale::localization_backend_manager::global(tmp_backend); - std::string bname = def[type]; + for(int type = 0; type < int(def.size()); type ++ ) { + boost::locale::localization_backend_manager tmp_backend = boost::locale::localization_backend_manager::global(); + tmp_backend.select(def[type]); + boost::locale::localization_backend_manager::global(tmp_backend); - if(bname=="std") { - en_us_8bit = get_std_name("en_US.ISO8859-1"); - he_il_8bit = get_std_name("he_IL.ISO8859-8"); - ja_jp_shiftjis = get_std_name("ja_JP.SJIS"); - if(!ja_jp_shiftjis.empty() && !test_std_supports_SJIS_codecvt(ja_jp_shiftjis)) - { - std::cout << "Warning: detected unproper support of " << ja_jp_shiftjis << " locale, disableling it" << std::endl; - ja_jp_shiftjis = ""; - } - } - else { - en_us_8bit = "en_US.ISO8859-1"; - he_il_8bit = "he_IL.ISO8859-8"; - ja_jp_shiftjis = "ja_JP.SJIS"; + std::string bname = def[type]; + + if(bname=="std") { + en_us_8bit = get_std_name("en_US.ISO8859-1"); + he_il_8bit = get_std_name("he_IL.ISO8859-8"); + ja_jp_shiftjis = get_std_name("ja_JP.SJIS"); + if(!ja_jp_shiftjis.empty() && !test_std_supports_SJIS_codecvt(ja_jp_shiftjis)) + { + std::cout << "Warning: detected unproper support of " << ja_jp_shiftjis << " locale, disableling it" << std::endl; + ja_jp_shiftjis = ""; } + } + else { + en_us_8bit = "en_US.ISO8859-1"; + he_il_8bit = "he_IL.ISO8859-8"; + ja_jp_shiftjis = "ja_JP.SJIS"; + } - std::cout << "Testing for backend " << def[type] << std::endl; + std::cout << "Testing for backend " << def[type] << std::endl; - test_iso = true; - if(bname=="std" && (he_il_8bit.empty() || en_us_8bit.empty())) { - std::cout << "no iso locales availible, passing" << std::endl; - test_iso = false; - } - test_sjis = true; - if(bname=="std" && ja_jp_shiftjis.empty()) { - test_sjis = false; - } - if(bname=="winapi") { - test_iso = false; - test_sjis = false; - } - test_utf = true; - #ifndef BOOST_LOCALE_NO_POSIX_BACKEND - if(bname=="posix") { - { - locale_t l = newlocale(LC_ALL_MASK,he_il_8bit.c_str(),0); - if(!l) - test_iso = false; - else - freelocale(l); - } - { - locale_t l = newlocale(LC_ALL_MASK,en_us_8bit.c_str(),0); - if(!l) - test_iso = false; - else - freelocale(l); - } - { - locale_t l = newlocale(LC_ALL_MASK,"en_US.UTF-8",0); - if(!l) - test_utf = false; - else - freelocale(l); - } - #ifdef BOOST_LOCALE_WITH_ICONV - { - locale_t l = newlocale(LC_ALL_MASK,ja_jp_shiftjis.c_str(),0); - if(!l) - test_sjis = false; - else - freelocale(l); - } - #else - test_sjis = false; - #endif + test_iso = true; + if(bname=="std" && (he_il_8bit.empty() || en_us_8bit.empty())) { + std::cout << "no iso locales availible, passing" << std::endl; + test_iso = false; + } + test_sjis = true; + if(bname=="std" && ja_jp_shiftjis.empty()) { + test_sjis = false; + } + if(bname=="winapi") { + test_iso = false; + test_sjis = false; + } + test_utf = true; + #ifndef BOOST_LOCALE_NO_POSIX_BACKEND + if(bname=="posix") { + { + locale_holder l(newlocale(LC_ALL_MASK,he_il_8bit.c_str(),0)); + if(!l) + test_iso = false; } - #endif - - if(def[type]=="std" && (get_std_name("en_US.UTF-8").empty() || get_std_name("he_IL.UTF-8").empty())) { - test_utf = false; + locale_holder l(newlocale(LC_ALL_MASK,en_us_8bit.c_str(),0)); + if(!l) + test_iso = false; } - - std::cout << "Testing wide I/O" << std::endl; - test_wide_io(); - std::cout << "Testing charset to/from UTF conversion functions\n"; - std::cout << " char" << std::endl; - test_to(); - std::cout << " wchar_t" << std::endl; - test_to(); - #ifdef BOOST_LOCALE_ENABLE_CHAR16_T - if(bname == "icu" || bname == "std") { - std::cout << " char16_t" << std::endl; - test_to(); + { + locale_holder l(newlocale(LC_ALL_MASK,"en_US.UTF-8",0)); + if(!l) + test_utf = false; } - #endif - #ifdef BOOST_LOCALE_ENABLE_CHAR32_T - if(bname == "icu" || bname == "std") { - std::cout << " char32_t" << std::endl; - test_to(); + #ifdef BOOST_LOCALE_WITH_ICONV + { + locale_holder l(newlocale(LC_ALL_MASK,ja_jp_shiftjis.c_str(),0)); + if(!l) + test_sjis = false; } + #else + test_sjis = false; #endif + } + #endif - test_all_combinations(); + if(def[type]=="std" && (get_std_name("en_US.UTF-8").empty() || get_std_name("he_IL.UTF-8").empty())) + { + test_utf = false; } + + std::cout << "Testing wide I/O" << std::endl; + test_wide_io(); + std::cout << "Testing charset to/from UTF conversion functions\n"; + std::cout << " char" << std::endl; + test_to(); + std::cout << " wchar_t" << std::endl; + test_to(); + #ifdef BOOST_LOCALE_ENABLE_CHAR16_T + if(bname == "icu" || bname == "std") { + std::cout << " char16_t" << std::endl; + test_to(); + } + #endif + #ifdef BOOST_LOCALE_ENABLE_CHAR32_T + if(bname == "icu" || bname == "std") { + std::cout << " char32_t" << std::endl; + test_to(); + } + #endif + + test_all_combinations(); } - catch(std::exception const &e) { - std::cerr << "Failed " << e.what() << std::endl; - return EXIT_FAILURE; - } - FINALIZE(); } // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/test/test_codepage_converter.cpp b/test/test_codepage_converter.cpp index b054d217..ffd4e767 100644 --- a/test/test_codepage_converter.cpp +++ b/test/test_codepage_converter.cpp @@ -86,211 +86,203 @@ void test_shiftjis(boost::locale::util::base_converter* pcvt) } -int main() +void test_main(int /*argc*/, char** /*argv*/) { - try { - using namespace boost::locale::util; - - std::cout << "Test UTF-8\n"; - std::cout << "- From UTF-8" << std::endl; - - - #ifndef BOOST_NO_CXX11_SMART_PTR - std::unique_ptr cvt = create_utf8_converter_unique_ptr(); - #elif BOOST_LOCALE_USE_AUTO_PTR - std::auto_ptr cvt = create_utf8_converter(); - #else - boost::locale::hold_ptr cvt(create_utf8_converter_new_ptr()); - #endif + using namespace boost::locale::util; + + std::cout << "Test UTF-8\n"; + std::cout << "- From UTF-8" << std::endl; + + + #ifndef BOOST_NO_CXX11_SMART_PTR + std::unique_ptr cvt = create_utf8_converter_unique_ptr(); + #elif BOOST_LOCALE_USE_AUTO_PTR + std::auto_ptr cvt = create_utf8_converter(); + #else + boost::locale::hold_ptr cvt(create_utf8_converter_new_ptr()); + #endif - TEST(cvt.get()); - TEST(cvt->is_thread_safe()); - TEST(cvt->max_len() == 4); + TEST(cvt.get()); + TEST(cvt->is_thread_safe()); + TEST(cvt->max_len() == 4); - std::cout << "-- Correct" << std::endl; - - TEST_TO("\x7f",0x7f); - TEST_TO("\xC2\x80",0x80); - TEST_TO("\xdf\xBF",0x7FF); - TEST_TO("\xe0\xa0\x80",0x800); - TEST_TO("\xef\xbf\xbf",0xFFFF); - TEST_TO("\xf0\x90\x80\x80",0x10000); - TEST_TO("\xf4\x8f\xbf\xbf",0x10FFFF); - - std::cout << "-- Too big" << std::endl; - TEST_TO("\xf4\x9f\x80\x80",illegal); // 11 0000 - TEST_TO("\xfb\xbf\xbf\xbf",illegal); // 3FF FFFF - TEST_TO("\xf8\x90\x80\x80\x80",illegal); // 400 0000 - TEST_TO("\xfd\xbf\xbf\xbf\xbf\xbf",illegal); // 7fff ffff - - std::cout << "-- Invalid trail" << std::endl; - TEST_TO("\xC2\x7F",illegal); - TEST_TO("\xdf\x7F",illegal); - TEST_TO("\xe0\x7F\x80",illegal); - TEST_TO("\xef\xbf\x7F",illegal); - TEST_TO("\xe0\x7F\x80",illegal); - TEST_TO("\xef\xbf\x7F",illegal); - TEST_TO("\xf0\x7F\x80\x80",illegal); - TEST_TO("\xf4\x7f\xbf\xbf",illegal); - TEST_TO("\xf0\x90\x7F\x80",illegal); - TEST_TO("\xf4\x8f\x7F\xbf",illegal); - TEST_TO("\xf0\x90\x80\x7F",illegal); - TEST_TO("\xf4\x8f\xbf\x7F",illegal); - - std::cout << "-- Invalid length" << std::endl; - - /// Test that this actually works - TEST_TO(make2(0x80),0x80); - TEST_TO(make2(0x7ff),0x7ff); - - TEST_TO(make3(0x800),0x800); - TEST_TO(make3(0xffff),0xffff); - - TEST_TO(make4(0x10000),0x10000); - TEST_TO(make4(0x10ffff),0x10ffff); - - TEST_TO(make4(0x110000),illegal); - TEST_TO(make4(0x1fffff),illegal); - - TEST_TO(make2(0),illegal); - TEST_TO(make3(0),illegal); - TEST_TO(make4(0),illegal); - TEST_TO(make2(0x7f),illegal); - TEST_TO(make3(0x7f),illegal); - TEST_TO(make4(0x7f),illegal); - - TEST_TO(make3(0x80),illegal); - TEST_TO(make4(0x80),illegal); - TEST_TO(make3(0x7ff),illegal); - TEST_TO(make4(0x7ff),illegal); - - TEST_TO(make4(0x8000),illegal); - TEST_TO(make4(0xffff),illegal); - - std::cout << "-- Invalid surrogate" << std::endl; - - TEST_TO(make3(0xD800),illegal); - TEST_TO(make3(0xDBFF),illegal); - TEST_TO(make3(0xDC00),illegal); - TEST_TO(make3(0xDFFF),illegal); - - TEST_TO(make4(0xD800),illegal); - TEST_TO(make4(0xDBFF),illegal); - TEST_TO(make4(0xDC00),illegal); - TEST_TO(make4(0xDFFF),illegal); - - std::cout << "-- Incomplete" << std::endl; - - TEST_TO("\x80",illegal); - TEST_TO("\xC2",incomplete); - - TEST_TO("\xdf",incomplete); - - TEST_TO("\xe0",incomplete); - TEST_TO("\xe0\xa0",incomplete); - - TEST_TO("\xef\xbf",incomplete); - TEST_TO("\xef",incomplete); - - TEST_TO("\xf0\x90\x80",incomplete); - TEST_TO("\xf0\x90",incomplete); - TEST_TO("\xf0",incomplete); - - TEST_TO("\xf4\x8f\xbf",incomplete); - TEST_TO("\xf4\x8f",incomplete); - TEST_TO("\xf4",incomplete); - - std::cout << "- To UTF-8\n"; - - std::cout << "-- Test correct" << std::endl; - - TEST_FROM("\x7f",0x7f); - TEST_FROM("\xC2\x80",0x80); - TEST_FROM("\xdf\xBF",0x7FF); - TEST_INC(0x7FF,1); - TEST_FROM("\xe0\xa0\x80",0x800); - TEST_INC(0x800,2); - TEST_INC(0x800,1); - TEST_FROM("\xef\xbf\xbf",0xFFFF); - TEST_INC(0x10000,3); - TEST_INC(0x10000,2); - TEST_INC(0x10000,1); - TEST_FROM("\xf0\x90\x80\x80",0x10000); - TEST_FROM("\xf4\x8f\xbf\xbf",0x10FFFF); - - std::cout << "-- Test no surrogate " << std::endl; + std::cout << "-- Correct" << std::endl; + + TEST_TO("\x7f",0x7f); + TEST_TO("\xC2\x80",0x80); + TEST_TO("\xdf\xBF",0x7FF); + TEST_TO("\xe0\xa0\x80",0x800); + TEST_TO("\xef\xbf\xbf",0xFFFF); + TEST_TO("\xf0\x90\x80\x80",0x10000); + TEST_TO("\xf4\x8f\xbf\xbf",0x10FFFF); + + std::cout << "-- Too big" << std::endl; + TEST_TO("\xf4\x9f\x80\x80",illegal); // 11 0000 + TEST_TO("\xfb\xbf\xbf\xbf",illegal); // 3FF FFFF + TEST_TO("\xf8\x90\x80\x80\x80",illegal); // 400 0000 + TEST_TO("\xfd\xbf\xbf\xbf\xbf\xbf",illegal); // 7fff ffff + + std::cout << "-- Invalid trail" << std::endl; + TEST_TO("\xC2\x7F",illegal); + TEST_TO("\xdf\x7F",illegal); + TEST_TO("\xe0\x7F\x80",illegal); + TEST_TO("\xef\xbf\x7F",illegal); + TEST_TO("\xe0\x7F\x80",illegal); + TEST_TO("\xef\xbf\x7F",illegal); + TEST_TO("\xf0\x7F\x80\x80",illegal); + TEST_TO("\xf4\x7f\xbf\xbf",illegal); + TEST_TO("\xf0\x90\x7F\x80",illegal); + TEST_TO("\xf4\x8f\x7F\xbf",illegal); + TEST_TO("\xf0\x90\x80\x7F",illegal); + TEST_TO("\xf4\x8f\xbf\x7F",illegal); + + std::cout << "-- Invalid length" << std::endl; + + /// Test that this actually works + TEST_TO(make2(0x80),0x80); + TEST_TO(make2(0x7ff),0x7ff); + + TEST_TO(make3(0x800),0x800); + TEST_TO(make3(0xffff),0xffff); + + TEST_TO(make4(0x10000),0x10000); + TEST_TO(make4(0x10ffff),0x10ffff); + + TEST_TO(make4(0x110000),illegal); + TEST_TO(make4(0x1fffff),illegal); + + TEST_TO(make2(0),illegal); + TEST_TO(make3(0),illegal); + TEST_TO(make4(0),illegal); + TEST_TO(make2(0x7f),illegal); + TEST_TO(make3(0x7f),illegal); + TEST_TO(make4(0x7f),illegal); + + TEST_TO(make3(0x80),illegal); + TEST_TO(make4(0x80),illegal); + TEST_TO(make3(0x7ff),illegal); + TEST_TO(make4(0x7ff),illegal); + + TEST_TO(make4(0x8000),illegal); + TEST_TO(make4(0xffff),illegal); + + std::cout << "-- Invalid surrogate" << std::endl; + + TEST_TO(make3(0xD800),illegal); + TEST_TO(make3(0xDBFF),illegal); + TEST_TO(make3(0xDC00),illegal); + TEST_TO(make3(0xDFFF),illegal); + + TEST_TO(make4(0xD800),illegal); + TEST_TO(make4(0xDBFF),illegal); + TEST_TO(make4(0xDC00),illegal); + TEST_TO(make4(0xDFFF),illegal); + + std::cout << "-- Incomplete" << std::endl; + + TEST_TO("\x80",illegal); + TEST_TO("\xC2",incomplete); + + TEST_TO("\xdf",incomplete); + + TEST_TO("\xe0",incomplete); + TEST_TO("\xe0\xa0",incomplete); + + TEST_TO("\xef\xbf",incomplete); + TEST_TO("\xef",incomplete); + + TEST_TO("\xf0\x90\x80",incomplete); + TEST_TO("\xf0\x90",incomplete); + TEST_TO("\xf0",incomplete); + + TEST_TO("\xf4\x8f\xbf",incomplete); + TEST_TO("\xf4\x8f",incomplete); + TEST_TO("\xf4",incomplete); + + std::cout << "- To UTF-8\n"; + + std::cout << "-- Test correct" << std::endl; + + TEST_FROM("\x7f",0x7f); + TEST_FROM("\xC2\x80",0x80); + TEST_FROM("\xdf\xBF",0x7FF); + TEST_INC(0x7FF,1); + TEST_FROM("\xe0\xa0\x80",0x800); + TEST_INC(0x800,2); + TEST_INC(0x800,1); + TEST_FROM("\xef\xbf\xbf",0xFFFF); + TEST_INC(0x10000,3); + TEST_INC(0x10000,2); + TEST_INC(0x10000,1); + TEST_FROM("\xf0\x90\x80\x80",0x10000); + TEST_FROM("\xf4\x8f\xbf\xbf",0x10FFFF); + + std::cout << "-- Test no surrogate " << std::endl; - TEST_FROM(0,0xD800); - TEST_FROM(0,0xDBFF); - TEST_FROM(0,0xDC00); - TEST_FROM(0,0xDFFF); + TEST_FROM(0,0xD800); + TEST_FROM(0,0xDBFF); + TEST_FROM(0,0xDC00); + TEST_FROM(0,0xDFFF); - std::cout << "-- Test invalid " << std::endl; + std::cout << "-- Test invalid " << std::endl; - TEST_FROM(0,0x110000); - TEST_FROM(0,0x1FFFFF); + TEST_FROM(0,0x110000); + TEST_FROM(0,0x1FFFFF); - std::cout << "Test windows-1255" << std::endl; + std::cout << "Test windows-1255" << std::endl; - #ifndef BOOST_NO_CXX11_SMART_PTR - cvt = create_simple_converter_unique_ptr("windows-1255"); - #elif BOOST_LOCALE_USE_AUTO_PTR - cvt = create_simple_converter("windows-1255"); - #else - cvt.reset(create_simple_converter_new_ptr("windows-1255")); - #endif + #ifndef BOOST_NO_CXX11_SMART_PTR + cvt = create_simple_converter_unique_ptr("windows-1255"); + #elif BOOST_LOCALE_USE_AUTO_PTR + cvt = create_simple_converter("windows-1255"); + #else + cvt.reset(create_simple_converter_new_ptr("windows-1255")); + #endif - TEST(cvt.get()); - TEST(cvt->is_thread_safe()); - TEST(cvt->max_len() == 1); + TEST(cvt.get()); + TEST(cvt->is_thread_safe()); + TEST(cvt->max_len() == 1); - std::cout << "- From 1255" << std::endl; + std::cout << "- From 1255" << std::endl; - TEST_TO("\xa4",0x20aa); - TEST_TO("\xe0",0x05d0); - TEST_TO("\xc4",0x5b4); - TEST_TO("\xfb",illegal); - TEST_TO("\xdd",illegal); - TEST_TO("\xff",illegal); - TEST_TO("\xfe",0x200f); + TEST_TO("\xa4",0x20aa); + TEST_TO("\xe0",0x05d0); + TEST_TO("\xc4",0x5b4); + TEST_TO("\xfb",illegal); + TEST_TO("\xdd",illegal); + TEST_TO("\xff",illegal); + TEST_TO("\xfe",0x200f); - std::cout << "- To 1255" << std::endl; + std::cout << "- To 1255" << std::endl; - TEST_FROM("\xa4",0x20aa); - TEST_FROM("\xe0",0x05d0); - TEST_FROM("\xc4",0x5b4); - TEST_FROM("\xfe",0x200f); + TEST_FROM("\xa4",0x20aa); + TEST_FROM("\xe0",0x05d0); + TEST_FROM("\xc4",0x5b4); + TEST_FROM("\xfe",0x200f); - TEST_FROM(0,0xe4); - TEST_FROM(0,0xd0); + TEST_FROM(0,0xe4); + TEST_FROM(0,0xd0); - #ifdef BOOST_LOCALE_WITH_ICU - std::cout << "Testing Shift-JIS using ICU/uconv" << std::endl; + #ifdef BOOST_LOCALE_WITH_ICU + std::cout << "Testing Shift-JIS using ICU/uconv" << std::endl; - cvt.reset(boost::locale::impl_icu::create_uconv_converter("Shift-JIS")); - TEST(cvt.get()); - test_shiftjis(cvt.release()); - #endif - - #if defined(BOOST_LOCALE_WITH_ICONV) && !defined(BOOST_LOCALE_NO_POSIX_BACKEND) - std::cout << "Testing Shift-JIS using POSIX/iconv" << std::endl; + cvt.reset(boost::locale::impl_icu::create_uconv_converter("Shift-JIS")); + TEST(cvt.get()); + test_shiftjis(cvt.release()); + #endif - cvt.reset(boost::locale::impl_posix::create_iconv_converter("Shift-JIS")); - if(cvt.get()) { - test_shiftjis(cvt.release()); - } - else { - std::cout<< "- Shift-JIS is not supported!" << std::endl; - } - #endif + #if defined(BOOST_LOCALE_WITH_ICONV) && !defined(BOOST_LOCALE_NO_POSIX_BACKEND) + std::cout << "Testing Shift-JIS using POSIX/iconv" << std::endl; + cvt.reset(boost::locale::impl_posix::create_iconv_converter("Shift-JIS")); + if(cvt.get()) { + test_shiftjis(cvt.release()); } - catch(std::exception const &e) { - std::cerr << "Failed " << e.what() << std::endl; - return EXIT_FAILURE; + else { + std::cout<< "- Shift-JIS is not supported!" << std::endl; } - FINALIZE(); + #endif } // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/test/test_collate.cpp b/test/test_collate.cpp index a6f5ec47..b9f26cd5 100644 --- a/test/test_collate.cpp +++ b/test/test_collate.cpp @@ -121,17 +121,9 @@ void test_collate() -int main() +void test_main(int /*argc*/, char** /*argv*/) { - try { - test_collate(); - } - catch(std::exception const &e) { - std::cerr << "Failed " << e.what() << std::endl; - return EXIT_FAILURE; - } - FINALIZE(); - + test_collate(); } #endif // NOICU diff --git a/test/test_config.cpp b/test/test_config.cpp index e0212211..d93d9c90 100644 --- a/test/test_config.cpp +++ b/test/test_config.cpp @@ -85,7 +85,7 @@ int main() char const *clocale=setlocale(LC_ALL,""); if(!clocale) - clocale= "undetected"; + clocale= "undetected"; // LCOV_EXCL_LINE std::cout << "- C locale: " << clocale << std::endl; try { @@ -97,7 +97,7 @@ int main() #endif } catch(std::exception const &) { - std::cout << "- C++ locale: is not supported\n"; + std::cout << "- C++ locale: is not supported\n"; // LCOV_EXCL_LINE } char const *locales_to_check[] = { @@ -129,11 +129,10 @@ int main() std::cout << std::use_facet(l).name() << std::endl; } catch(std::exception const &) { - std::cout << " undetected\n"; - return EXIT_FAILURE; + std::cout << " undetected\n"; // LCOV_EXCL_LINE + return EXIT_FAILURE; // LCOV_EXCL_LINE } return EXIT_SUCCESS; - } // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/test/test_convert.cpp b/test/test_convert.cpp index c2098cb6..03d6c1dd 100644 --- a/test/test_convert.cpp +++ b/test/test_convert.cpp @@ -68,59 +68,51 @@ void test_norm(std::string orig,std::string normal,boost::locale::norm_type type }while(0) -int main() +void test_main(int /*argc*/, char** /*argv*/) { - try { - { - using namespace boost::locale; - std::cout << "Testing Unicode normalization" << std::endl; - test_norm("\xEF\xAC\x81","\xEF\xAC\x81",norm_nfd); /// ligature fi - test_norm("\xEF\xAC\x81","\xEF\xAC\x81",norm_nfc); - test_norm("\xEF\xAC\x81","fi",norm_nfkd); - test_norm("\xEF\xAC\x81","fi",norm_nfkc); - test_norm("ä","ä",norm_nfd); // ä to a and accent - test_norm("ä","ä",norm_nfc); - } - - boost::locale::generator gen; - bool eight_bit=true; - - #define TEST_V(how,source_s,dest_s) \ - do { \ - TEST_A(char,how,source_s,dest_s); \ - if(eight_bit) { \ - std::locale tmp=std::locale(); \ - std::locale::global(gen("en_US.ISO8859-1")); \ - TEST_A(char,how,to(source_s),to(dest_s)); \ - std::locale::global(tmp); \ - } \ - }while(0) + { + using namespace boost::locale; + std::cout << "Testing Unicode normalization" << std::endl; + test_norm("\xEF\xAC\x81","\xEF\xAC\x81",norm_nfd); /// ligature fi + test_norm("\xEF\xAC\x81","\xEF\xAC\x81",norm_nfc); + test_norm("\xEF\xAC\x81","fi",norm_nfkd); + test_norm("\xEF\xAC\x81","fi",norm_nfkc); + test_norm("ä","ä",norm_nfd); // ä to a and accent + test_norm("ä","ä",norm_nfc); + } - TEST_ALL_CASES; - #undef TEST_V + boost::locale::generator gen; + bool eight_bit=true; + + #define TEST_V(how,source_s,dest_s) \ + do { \ + TEST_A(char,how,source_s,dest_s); \ + if(eight_bit) { \ + std::locale tmp=std::locale(); \ + std::locale::global(gen("en_US.ISO8859-1")); \ + TEST_A(char,how,to(source_s),to(dest_s)); \ + std::locale::global(tmp); \ + } \ + }while(0) - #define TEST_V(how,source_s,dest_s) TEST_A(wchar_t,how,to(source_s),to(dest_s)) - TEST_ALL_CASES; - #undef TEST_V + TEST_ALL_CASES; + #undef TEST_V - #ifdef BOOST_LOCALE_ENABLE_CHAR16_T - #define TEST_V(how,source_s,dest_s) TEST_A(char16_t,how,to(source_s),to(dest_s)) - TEST_ALL_CASES; - #undef TEST_V - #endif + #define TEST_V(how,source_s,dest_s) TEST_A(wchar_t,how,to(source_s),to(dest_s)) + TEST_ALL_CASES; + #undef TEST_V - #ifdef BOOST_LOCALE_ENABLE_CHAR32_T - #define TEST_V(how,source_s,dest_s) TEST_A(char32_t,how,to(source_s),to(dest_s)) - TEST_ALL_CASES; - #undef TEST_V - #endif - } - catch(std::exception const &e) { - std::cerr << "Failed " << e.what() << std::endl; - return EXIT_FAILURE; - } - FINALIZE(); + #ifdef BOOST_LOCALE_ENABLE_CHAR16_T + #define TEST_V(how,source_s,dest_s) TEST_A(char16_t,how,to(source_s),to(dest_s)) + TEST_ALL_CASES; + #undef TEST_V + #endif + #ifdef BOOST_LOCALE_ENABLE_CHAR32_T + #define TEST_V(how,source_s,dest_s) TEST_A(char32_t,how,to(source_s),to(dest_s)) + TEST_ALL_CASES; + #undef TEST_V + #endif } #endif // NO ICU // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/test/test_date_time.cpp b/test/test_date_time.cpp index 92f93873..968fd556 100644 --- a/test/test_date_time.cpp +++ b/test/test_date_time.cpp @@ -36,274 +36,265 @@ TESTR(ss.str() == X); \ } while(0) -int main() +void test_main(int /*argc*/, char** /*argv*/) { - try { - using namespace boost::locale; - using namespace boost::locale::period; - std::string def[] = { - #ifdef BOOST_LOCALE_WITH_ICU - "icu" , - #endif - #ifndef BOOST_LOCALE_NO_STD_BACKEND - "std" , - #endif - #ifndef BOOST_LOCALE_NO_POSIX_BACKEND - "posix", - #endif - #ifndef BOOST_LOCALE_NO_WINAPI_BACKEND - "winapi", - #endif - }; - for(int type = 0 ; type < int(sizeof(def)/sizeof(def[0])) ; type ++ ) { - boost::locale::localization_backend_manager tmp_backend = boost::locale::localization_backend_manager::global(); - tmp_backend.select(def[type]); - boost::locale::localization_backend_manager::global(tmp_backend); - std::cout << "Testing for backend: " << def[type] << std::endl; - std::string backend_name = def[type]; - { - - boost::locale::generator g; - - std::locale loc=g("en_US.UTF-8"); - - std::locale::global(loc); - - std::string tz("GMT"); - time_zone::global(tz); - calendar cal(loc,tz); - - TEST(calendar() == cal); - TEST(calendar(loc) == cal); - TEST(calendar(tz) == cal); - TEST(calendar(loc,"GMT+01:00") != cal); - TEST(calendar(g("ru_RU.UTF-8")) != cal); - - TEST(cal.minimum(month())==0); - TEST(cal.maximum(month())==11); - TEST(cal.minimum(day())==1); - TEST(cal.greatest_minimum(day())==1); - TEST(cal.least_maximum(day())==28); - TEST(cal.maximum(day())==31); - - TEST(calendar(g("ar_EG.UTF-8")).first_day_of_week() == 7); - TEST(calendar(g("he_IL.UTF-8")).first_day_of_week() == 1); - TEST(calendar(g("ru_RU.UTF-8")).first_day_of_week() == 2); - - std::ostringstream ss; - ss.imbue(loc); - ss << boost::locale::as::time_zone(tz); - - date_time time_point; - - time_point=year(1970) + february() + day(5); - - ss << as::ftime("%Y-%m-%d")<< time_point; - - TEST(ss.str() == "1970-02-05"); - time_point = 3 * hour_12() + 1 * am_pm() + 33 * minute() + 13 * second(); - ss.str(""); - ss << as::ftime("%Y-%m-%d %H:%M:%S") << time_point; - TEST( ss.str() == "1970-02-05 15:33:13"); ss.str(""); - - time_t a_date = 3600*24*(31+4); // Feb 5th - time_t a_time = 3600*15+60*33; // 15:33:05 - time_t a_timesec = 13; - time_t a_datetime = a_date + a_time + a_timesec; - - date_time base_time_point=date_time(a_datetime); - - RESET(); - - time_point += hour(); - TESTEQSR(time_point,"1970-02-05 16:33:13"); - - TEST(time_point.minimum(day())==1); - TEST(time_point.maximum(day())==28); - - time_point += year() * 2 + 1 *month(); - TESTEQSR(time_point,"1972-03-05 15:33:13"); - - time_point -= minute(); - TESTEQSR( time_point, "1970-02-05 15:32:13"); - - time_point <<= minute() * 30; - TESTEQSR( time_point, "1970-02-05 15:03:13"); - - time_point >>= minute(40); - TESTEQSR( time_point, "1970-02-05 15:53:13"); - - TEST((time_point + month()) / month() == 2); - TEST(month(time_point + month(1)) == 2); - TEST(time_point / month() == 1); - TEST((time_point - month()) / month()== 0); - TEST(time_point / month() == 1); - TEST((time_point << month()) / month()== 2); - TEST(time_point / month()== 1); - TEST((time_point >> month()) / month()== 0); - TEST(time_point / month()== 1); - - - - TEST( (time_point + 2 * hour() - time_point) / minute() == 120); - TEST( (time_point + month()- time_point) / day() == 28); - TEST( (time_point + 2* month()- (time_point+month())) / day() == 31); - TEST( day(time_point + 2* month()- (time_point+month())) == 31); - - TESTEQSR( time_point + hour(), "1970-02-05 16:33:13"); - TESTEQSR( time_point - hour(2), "1970-02-05 13:33:13"); - TESTEQSR( time_point >> minute(), "1970-02-05 15:32:13"); - TESTEQSR( time_point << second(), "1970-02-05 15:33:14"); - - TEST(time_point == time_point); - TEST(!(time_point != time_point)); - TEST(time_point.get(hour()) == 15); - TEST(time_point/hour() == 15); - TEST(time_point+year() != time_point); - TEST(time_point - minute() <= time_point); - TEST(time_point <= time_point); - TEST(time_point + minute() >= time_point); - TEST(time_point >= time_point); - - TEST(time_point < time_point + second()); - TEST(!(time_point < time_point - second())); - TEST(time_point > time_point - second()); - TEST(!(time_point > time_point + second())); - - TEST(time_point.get(day()) == 5); - TEST(time_point.get(year()) == 1970); - - TEST(time_point.get(era()) == 1); - TEST(time_point.get(year()) == 1970); - TEST(time_point.get(extended_year()) == 1970); - if(backend_name == "icu") { - time_point=extended_year(-3); - TEST(time_point.get(era()) == 0); - TEST(time_point.get(year()) == 4); - } - RESET(); - TEST(time_point.get(month()) == 1); - TEST(time_point.get(day()) == 5); - TEST(time_point.get(day_of_year()) == 36); - TEST(time_point.get(day_of_week()) == 5); - TEST(time_point.get(day_of_week_in_month())==1); - time_point=date_time(a_datetime,calendar(g("ru_RU.UTF-8"))); - TEST(time_point.get(day_of_week_local()) == 4); - time_point = year(2026) + january() + day(1); - TEST(time_point.get(day_of_week()) == 5); - TEST(time_point.get(week_of_year()) == 1); - TEST(time_point.get(week_of_month()) == 1); - time_point = day_of_week() * 1; - TEST(time_point.get(day()) == 4); - TEST(time_point.get(week_of_year()) == 1); + using namespace boost::locale; + using namespace boost::locale::period; + std::string def[] = { + #ifdef BOOST_LOCALE_WITH_ICU + "icu" , + #endif + #ifndef BOOST_LOCALE_NO_STD_BACKEND + "std" , + #endif + #ifndef BOOST_LOCALE_NO_POSIX_BACKEND + "posix", + #endif + #ifndef BOOST_LOCALE_NO_WINAPI_BACKEND + "winapi", + #endif + }; + for(int type = 0 ; type < int(sizeof(def)/sizeof(def[0])) ; type ++ ) { + boost::locale::localization_backend_manager tmp_backend = boost::locale::localization_backend_manager::global(); + tmp_backend.select(def[type]); + boost::locale::localization_backend_manager::global(tmp_backend); + std::cout << "Testing for backend: " << def[type] << std::endl; + std::string backend_name = def[type]; + { + + boost::locale::generator g; + + std::locale loc=g("en_US.UTF-8"); + + std::locale::global(loc); + + std::string tz("GMT"); + time_zone::global(tz); + calendar cal(loc,tz); + + TEST(calendar() == cal); + TEST(calendar(loc) == cal); + TEST(calendar(tz) == cal); + TEST(calendar(loc,"GMT+01:00") != cal); + TEST(calendar(g("ru_RU.UTF-8")) != cal); + + TEST(cal.minimum(month())==0); + TEST(cal.maximum(month())==11); + TEST(cal.minimum(day())==1); + TEST(cal.greatest_minimum(day())==1); + TEST(cal.least_maximum(day())==28); + TEST(cal.maximum(day())==31); + + TEST(calendar(g("ar_EG.UTF-8")).first_day_of_week() == 7); + TEST(calendar(g("he_IL.UTF-8")).first_day_of_week() == 1); + TEST(calendar(g("ru_RU.UTF-8")).first_day_of_week() == 2); + + std::ostringstream ss; + ss.imbue(loc); + ss << boost::locale::as::time_zone(tz); + + date_time time_point; + + time_point=year(1970) + february() + day(5); + + ss << as::ftime("%Y-%m-%d")<< time_point; + + TEST(ss.str() == "1970-02-05"); + time_point = 3 * hour_12() + 1 * am_pm() + 33 * minute() + 13 * second(); + ss.str(""); + ss << as::ftime("%Y-%m-%d %H:%M:%S") << time_point; + TEST( ss.str() == "1970-02-05 15:33:13"); ss.str(""); + + time_t a_date = 3600*24*(31+4); // Feb 5th + time_t a_time = 3600*15+60*33; // 15:33:05 + time_t a_timesec = 13; + time_t a_datetime = a_date + a_time + a_timesec; + + date_time base_time_point=date_time(a_datetime); + + RESET(); + + time_point += hour(); + TESTEQSR(time_point,"1970-02-05 16:33:13"); + + TEST(time_point.minimum(day())==1); + TEST(time_point.maximum(day())==28); + + time_point += year() * 2 + 1 *month(); + TESTEQSR(time_point,"1972-03-05 15:33:13"); + + time_point -= minute(); + TESTEQSR( time_point, "1970-02-05 15:32:13"); + + time_point <<= minute() * 30; + TESTEQSR( time_point, "1970-02-05 15:03:13"); + + time_point >>= minute(40); + TESTEQSR( time_point, "1970-02-05 15:53:13"); + + TEST((time_point + month()) / month() == 2); + TEST(month(time_point + month(1)) == 2); + TEST(time_point / month() == 1); + TEST((time_point - month()) / month()== 0); + TEST(time_point / month() == 1); + TEST((time_point << month()) / month()== 2); + TEST(time_point / month()== 1); + TEST((time_point >> month()) / month()== 0); + TEST(time_point / month()== 1); + + + + TEST( (time_point + 2 * hour() - time_point) / minute() == 120); + TEST( (time_point + month()- time_point) / day() == 28); + TEST( (time_point + 2* month()- (time_point+month())) / day() == 31); + TEST( day(time_point + 2* month()- (time_point+month())) == 31); + + TESTEQSR( time_point + hour(), "1970-02-05 16:33:13"); + TESTEQSR( time_point - hour(2), "1970-02-05 13:33:13"); + TESTEQSR( time_point >> minute(), "1970-02-05 15:32:13"); + TESTEQSR( time_point << second(), "1970-02-05 15:33:14"); + + TEST(time_point == time_point); + TEST(!(time_point != time_point)); + TEST(time_point.get(hour()) == 15); + TEST(time_point/hour() == 15); + TEST(time_point+year() != time_point); + TEST(time_point - minute() <= time_point); + TEST(time_point <= time_point); + TEST(time_point + minute() >= time_point); + TEST(time_point >= time_point); + + TEST(time_point < time_point + second()); + TEST(!(time_point < time_point - second())); + TEST(time_point > time_point - second()); + TEST(!(time_point > time_point + second())); + + TEST(time_point.get(day()) == 5); + TEST(time_point.get(year()) == 1970); + + TEST(time_point.get(era()) == 1); + TEST(time_point.get(year()) == 1970); + TEST(time_point.get(extended_year()) == 1970); + if(backend_name == "icu") { + time_point=extended_year(-3); + TEST(time_point.get(era()) == 0); + TEST(time_point.get(year()) == 4); + } + RESET(); + TEST(time_point.get(month()) == 1); + TEST(time_point.get(day()) == 5); + TEST(time_point.get(day_of_year()) == 36); + TEST(time_point.get(day_of_week()) == 5); + TEST(time_point.get(day_of_week_in_month())==1); + time_point=date_time(a_datetime,calendar(g("ru_RU.UTF-8"))); + TEST(time_point.get(day_of_week_local()) == 4); + time_point = year(2026) + january() + day(1); + TEST(time_point.get(day_of_week()) == 5); + TEST(time_point.get(week_of_year()) == 1); + TEST(time_point.get(week_of_month()) == 1); + time_point = day_of_week() * 1; + TEST(time_point.get(day()) == 4); + TEST(time_point.get(week_of_year()) == 1); + TEST(time_point.get(week_of_month()) == 1); + time_point += day() * 1; + TEST(time_point.get(week_of_year()) == 2); + TEST(time_point.get(week_of_month()) == 2); + time_point = february() + day() * 2; + + + TEST(time_point.get(week_of_year()) == 6); + + if(backend_name!="icu" || BOOST_ICU_VER<408 || BOOST_ICU_VER > 6000) { TEST(time_point.get(week_of_month()) == 1); - time_point += day() * 1; - TEST(time_point.get(week_of_year()) == 2); + } + else { + // cldr changes TEST(time_point.get(week_of_month()) == 2); - time_point = february() + day() * 2; - - - TEST(time_point.get(week_of_year()) == 6); - - if(backend_name!="icu" || BOOST_ICU_VER<408 || BOOST_ICU_VER > 6000) { - TEST(time_point.get(week_of_month()) == 1); - } - else { - // cldr changes - TEST(time_point.get(week_of_month()) == 2); - } - - time_point = year(2010) + january() + day() * 3; - - if(backend_name!="icu" || BOOST_ICU_VER<408 || BOOST_ICU_VER > 6000) { - TEST(time_point.get(week_of_year()) == 53); - } - else { - TEST(time_point.get(week_of_year()) == 1); - } - - time_point = year()*2010 + january() + day() * 4; - - if(backend_name!="icu" || BOOST_ICU_VER<408 || BOOST_ICU_VER > 6000) { - TEST(time_point.get(week_of_year()) == 1); - } - else { - TEST(time_point.get(week_of_year()) == 2); - } - time_point = year()*2010 + january() + day() * 10; - - if(backend_name!="icu" || BOOST_ICU_VER<408 || BOOST_ICU_VER > 6000) { - TEST(time_point.get(week_of_year()) == 1); - } - else { - TEST(time_point.get(week_of_year()) == 2); - } - - time_point = year()*2010 + january() + day() * 11; - if(backend_name!="icu" || BOOST_ICU_VER<408 || BOOST_ICU_VER > 6000) { - TEST(time_point.get(week_of_year()) == 2); - } - else { - TEST(time_point.get(week_of_year()) == 3); - } - RESET(); - TEST(time_point.get(hour()) == 15); - TEST(date_time(a_datetime,calendar("GMT+01:00")).get(hour()) ==16); - TEST(time_point.get(hour_12()) == 3); - TEST(time_point.get(am_pm()) == 1); - TEST(time_point.get(minute()) == 33); - TEST(time_point.get(second()) == 13); - TEST(date_time(year()* 1984 + february() + day()).get(week_of_year())==5); - TEST(time_point.get(week_of_month()) == 1); - RESET(); - - // Make sure we don't get year() < 1970 so the test would - // work on windows where mktime supports positive time_t - // only - time_point = year() * 2010; - - TEST((time_point + year() *1 - hour() * 1 - time_point) / year() == 0); - TEST((time_point + year() *1 - time_point) / year() == 1); - TEST((time_point + year() *1 + hour() * 1 - time_point) / year() == 1); - TEST((time_point - year() *1 + hour() * 1 - time_point) / year() == 0); - TEST((time_point - year() *1 - time_point) / year() == -1); - TEST((time_point - year() *1 - hour() * 1 - time_point) / year() == -1); - - RESET(); - - time_point.time(24*3600 * 2); + } - time_point = year() * 2011; - time_point = march(); - time_point = day() * 29; + time_point = year(2010) + january() + day() * 3; - date_time tmp_save = time_point; - - time_point = year() * 2011; - time_point = february(); - time_point = day() * 5; - - TEST(time_point.get(year()) == 2011); - TEST(time_point.get(month()) == 2); // march - TEST(time_point.get(day()) == 5); - - time_point = tmp_save; + if(backend_name!="icu" || BOOST_ICU_VER<408 || BOOST_ICU_VER > 6000) { + TEST(time_point.get(week_of_year()) == 53); + } + else { + TEST(time_point.get(week_of_year()) == 1); + } - time_point = year() * 2011 + february() + day() * 5; - TEST(time_point.get(year()) == 2011); - TEST(time_point.get(month()) == 1); // february - TEST(time_point.get(day()) == 5); + time_point = year()*2010 + january() + day() * 4; - } // test - } // for loop + if(backend_name!="icu" || BOOST_ICU_VER<408 || BOOST_ICU_VER > 6000) { + TEST(time_point.get(week_of_year()) == 1); + } + else { + TEST(time_point.get(week_of_year()) == 2); + } + time_point = year()*2010 + january() + day() * 10; - } - catch(std::exception const &e) { - std::cerr << "Failed " << e.what() << std::endl; - return EXIT_FAILURE; - } - FINALIZE(); + if(backend_name!="icu" || BOOST_ICU_VER<408 || BOOST_ICU_VER > 6000) { + TEST(time_point.get(week_of_year()) == 1); + } + else { + TEST(time_point.get(week_of_year()) == 2); + } + time_point = year()*2010 + january() + day() * 11; + if(backend_name!="icu" || BOOST_ICU_VER<408 || BOOST_ICU_VER > 6000) { + TEST(time_point.get(week_of_year()) == 2); + } + else { + TEST(time_point.get(week_of_year()) == 3); + } + RESET(); + TEST(time_point.get(hour()) == 15); + TEST(date_time(a_datetime,calendar("GMT+01:00")).get(hour()) ==16); + TEST(time_point.get(hour_12()) == 3); + TEST(time_point.get(am_pm()) == 1); + TEST(time_point.get(minute()) == 33); + TEST(time_point.get(second()) == 13); + TEST(date_time(year()* 1984 + february() + day()).get(week_of_year())==5); + TEST(time_point.get(week_of_month()) == 1); + RESET(); + + // Make sure we don't get year() < 1970 so the test would + // work on windows where mktime supports positive time_t + // only + time_point = year() * 2010; + + TEST((time_point + year() *1 - hour() * 1 - time_point) / year() == 0); + TEST((time_point + year() *1 - time_point) / year() == 1); + TEST((time_point + year() *1 + hour() * 1 - time_point) / year() == 1); + TEST((time_point - year() *1 + hour() * 1 - time_point) / year() == 0); + TEST((time_point - year() *1 - time_point) / year() == -1); + TEST((time_point - year() *1 - hour() * 1 - time_point) / year() == -1); + + RESET(); + + time_point.time(24*3600 * 2); + + time_point = year() * 2011; + time_point = march(); + time_point = day() * 29; + + date_time tmp_save = time_point; + + time_point = year() * 2011; + time_point = february(); + time_point = day() * 5; + + TEST(time_point.get(year()) == 2011); + TEST(time_point.get(month()) == 2); // march + TEST(time_point.get(day()) == 5); + + time_point = tmp_save; + + time_point = year() * 2011 + february() + day() * 5; + TEST(time_point.get(year()) == 2011); + TEST(time_point.get(month()) == 1); // february + TEST(time_point.get(day()) == 5); + + } // test + } // for loop } // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 // boostinspect:noascii diff --git a/test/test_formatting.cpp b/test/test_formatting.cpp index 3bc49175..05841098 100644 --- a/test/test_formatting.cpp +++ b/test/test_formatting.cpp @@ -532,40 +532,31 @@ void test_format(std::string charset="UTF-8") } -int main() +void test_main(int /*argc*/, char** /*argv*/) { - try { - boost::locale::time_zone::global("GMT+4:00"); - std::cout << "Testing char, UTF-8" << std::endl; - test_manip(); - test_format(); - std::cout << "Testing char, ISO8859-1" << std::endl; - test_manip("ISO8859-1"); - test_format("ISO8859-1"); - - std::cout << "Testing wchar_t" << std::endl; - test_manip(); - test_format(); - - #ifdef BOOST_LOCALE_ENABLE_CHAR16_T - std::cout << "Testing char16_t" << std::endl; - test_manip(); - test_format(); - #endif - - #ifdef BOOST_LOCALE_ENABLE_CHAR32_T - std::cout << "Testing char32_t" << std::endl; - test_manip(); - test_format(); - #endif - - } - catch(std::exception const &e) { - std::cerr << "Failed " << e.what() << std::endl; - return EXIT_FAILURE; - } - FINALIZE(); + boost::locale::time_zone::global("GMT+4:00"); + std::cout << "Testing char, UTF-8" << std::endl; + test_manip(); + test_format(); + std::cout << "Testing char, ISO8859-1" << std::endl; + test_manip("ISO8859-1"); + test_format("ISO8859-1"); + + std::cout << "Testing wchar_t" << std::endl; + test_manip(); + test_format(); + + #ifdef BOOST_LOCALE_ENABLE_CHAR16_T + std::cout << "Testing char16_t" << std::endl; + test_manip(); + test_format(); + #endif + #ifdef BOOST_LOCALE_ENABLE_CHAR32_T + std::cout << "Testing char32_t" << std::endl; + test_manip(); + test_format(); + #endif } #endif // NOICU diff --git a/test/test_generator.cpp b/test/test_generator.cpp index 752291fa..b6fc33a6 100644 --- a/test/test_generator.cpp +++ b/test/test_generator.cpp @@ -26,75 +26,66 @@ struct test_facet : public std::locale::facet { std::locale::id test_facet::id; -int main() +void test_main(int /*argc*/, char** /*argv*/) { - try { - boost::locale::generator g; - std::locale l=g("en_US.UTF-8"); - TEST(has_message(l)); - - g.categories(g.categories() ^ boost::locale::message_facet); - g.locale_cache_enabled(true); - g("en_US.UTF-8"); - g.categories(g.categories() | boost::locale::message_facet); - l=g("en_US.UTF-8"); - TEST(!has_message(l)); - g.clear_cache(); - g.locale_cache_enabled(false); - l=g("en_US.UTF-8"); - TEST(has_message(l)); - g.characters(g.characters() ^ boost::locale::char_facet); - l=g("en_US.UTF-8"); - TEST(!has_message(l)); - g.characters(g.characters() | boost::locale::char_facet); - l=g("en_US.UTF-8"); - TEST(has_message(l)); - - l=g("en_US.ISO8859-1"); - TEST(std::use_facet(l).language()=="en"); - TEST(std::use_facet(l).country()=="US"); - TEST(!std::use_facet(l).utf8()); - TEST(std::use_facet(l).encoding()=="iso8859-1"); - - l=g("en_US.UTF-8"); - TEST(std::use_facet(l).language()=="en"); - TEST(std::use_facet(l).country()=="US"); - TEST(std::use_facet(l).utf8()); - - l=g("en_US.ISO8859-1"); - TEST(std::use_facet(l).language()=="en"); - TEST(std::use_facet(l).country()=="US"); - TEST(!std::use_facet(l).utf8()); - TEST(std::use_facet(l).encoding()=="iso8859-1"); - - l=g("en_US.ISO8859-1"); - TEST(std::use_facet(l).language()=="en"); - TEST(std::use_facet(l).country()=="US"); - TEST(!std::use_facet(l).utf8()); - TEST(std::use_facet(l).encoding()=="iso8859-1"); - - std::locale l_wt(std::locale::classic(),new test_facet); - - TEST(std::has_facet(g.generate(l_wt,"en_US.UTF-8"))); - TEST(std::has_facet(g.generate(l_wt,"en_US.ISO8859-1"))); - TEST(!std::has_facet(g("en_US.UTF-8"))); - TEST(!std::has_facet(g("en_US.ISO8859-1"))); - - g.locale_cache_enabled(true); - g.generate(l_wt,"en_US.UTF-8"); - g.generate(l_wt,"en_US.ISO8859-1"); - TEST(std::has_facet(g("en_US.UTF-8"))); - TEST(std::has_facet(g("en_US.ISO8859-1"))); - TEST(std::use_facet(g("en_US.UTF-8")).utf8()); - TEST(!std::use_facet(g("en_US.ISO8859-1")).utf8()); - - } - catch(std::exception const &e) { - std::cerr << "Failed " << e.what() << std::endl; - return EXIT_FAILURE; - } - FINALIZE(); - + boost::locale::generator g; + std::locale l=g("en_US.UTF-8"); + TEST(has_message(l)); + + g.categories(g.categories() ^ boost::locale::message_facet); + g.locale_cache_enabled(true); + g("en_US.UTF-8"); + g.categories(g.categories() | boost::locale::message_facet); + l=g("en_US.UTF-8"); + TEST(!has_message(l)); + g.clear_cache(); + g.locale_cache_enabled(false); + l=g("en_US.UTF-8"); + TEST(has_message(l)); + g.characters(g.characters() ^ boost::locale::char_facet); + l=g("en_US.UTF-8"); + TEST(!has_message(l)); + g.characters(g.characters() | boost::locale::char_facet); + l=g("en_US.UTF-8"); + TEST(has_message(l)); + + l=g("en_US.ISO8859-1"); + TEST(std::use_facet(l).language()=="en"); + TEST(std::use_facet(l).country()=="US"); + TEST(!std::use_facet(l).utf8()); + TEST(std::use_facet(l).encoding()=="iso8859-1"); + + l=g("en_US.UTF-8"); + TEST(std::use_facet(l).language()=="en"); + TEST(std::use_facet(l).country()=="US"); + TEST(std::use_facet(l).utf8()); + + l=g("en_US.ISO8859-1"); + TEST(std::use_facet(l).language()=="en"); + TEST(std::use_facet(l).country()=="US"); + TEST(!std::use_facet(l).utf8()); + TEST(std::use_facet(l).encoding()=="iso8859-1"); + + l=g("en_US.ISO8859-1"); + TEST(std::use_facet(l).language()=="en"); + TEST(std::use_facet(l).country()=="US"); + TEST(!std::use_facet(l).utf8()); + TEST(std::use_facet(l).encoding()=="iso8859-1"); + + std::locale l_wt(std::locale::classic(),new test_facet); + + TEST(std::has_facet(g.generate(l_wt,"en_US.UTF-8"))); + TEST(std::has_facet(g.generate(l_wt,"en_US.ISO8859-1"))); + TEST(!std::has_facet(g("en_US.UTF-8"))); + TEST(!std::has_facet(g("en_US.ISO8859-1"))); + + g.locale_cache_enabled(true); + g.generate(l_wt,"en_US.UTF-8"); + g.generate(l_wt,"en_US.ISO8859-1"); + TEST(std::has_facet(g("en_US.UTF-8"))); + TEST(std::has_facet(g("en_US.ISO8859-1"))); + TEST(std::use_facet(g("en_US.UTF-8")).utf8()); + TEST(!std::use_facet(g("en_US.ISO8859-1")).utf8()); } // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 // boostinspect:noascii diff --git a/test/test_icu_vs_os_timezone.cpp b/test/test_icu_vs_os_timezone.cpp index 1d5b5697..76a26913 100644 --- a/test/test_icu_vs_os_timezone.cpp +++ b/test/test_icu_vs_os_timezone.cpp @@ -30,33 +30,24 @@ int main() #include "test_locale.hpp" #include "test_locale_tools.hpp" -int main() +void test_main(int /*argc*/, char** /*argv*/) { - try { - - time_t now=time(0); - boost::locale::generator gen; - std::locale::global(gen("en_US.UTF-8")); - - for(int i=0;i<366;i++) { - time_t point = now + i * 24 * 3600; - std::stringstream ss; - ss << boost::locale::format("{1,ftime='%H %M %S'}") % point; - int icu_hour = 0,icu_min = 0,icu_sec = 0; - ss >> icu_hour >> icu_min >> icu_sec; - std::tm *tm=localtime(&point); - TEST(icu_hour == tm->tm_hour); - TEST(icu_min == tm->tm_min); - TEST(icu_sec == tm->tm_sec); + time_t now=time(0); + boost::locale::generator gen; + std::locale::global(gen("en_US.UTF-8")); + + for(int i=0;i<366;i++) { + time_t point = now + i * 24 * 3600; + std::stringstream ss; + ss << boost::locale::format("{1,ftime='%H %M %S'}") % point; + int icu_hour = 0,icu_min = 0,icu_sec = 0; + ss >> icu_hour >> icu_min >> icu_sec; + std::tm *tm=localtime(&point); + TEST(icu_hour == tm->tm_hour); + TEST(icu_min == tm->tm_min); + TEST(icu_sec == tm->tm_sec); - } } - catch(std::exception const &e) { - std::cerr << "Failed " << e.what() << std::endl; - return EXIT_FAILURE; - } - FINALIZE(); - } #endif // NO ICU diff --git a/test/test_ios_prop.cpp b/test/test_ios_prop.cpp index 5b2b2ad4..53f06c2e 100644 --- a/test/test_ios_prop.cpp +++ b/test/test_ios_prop.cpp @@ -30,53 +30,47 @@ struct init { init() { prop_type::global_init(); } }; -int main() +void test_main(int /*argc*/, char** /*argv*/) { - try { - { - std::stringstream ss; - TEST(!prop_type::has(ss)); - TEST(prop_type::get(ss).x==-1); - TEST(prop_type::has(ss)); - TEST(counter==1); - } - TEST(counter==0); - { - std::stringstream ss; - prop_type::set(propery(1),ss); - TEST(counter==1); - TEST(prop_type::get(ss).x==1); - } - TEST(counter==0); - { - std::stringstream ss; - prop_type::set(propery(1),ss); - TEST(counter==1); - TEST(prop_type::get(ss).x==1); - } - TEST(counter==0); - { - std::stringstream ss,ss2; - prop_type::set(propery(2),ss); - ss2.copyfmt(ss); - TEST(prop_type::get(ss).x==2); - TEST(prop_type::has(ss2)); - TEST(prop_type::has(ss)); - TEST(prop_type::get(ss2).x==2); - prop_type::get(ss2).x=3; - TEST(prop_type::get(ss2).x==3); - TEST(prop_type::get(ss).x==2); - TEST(counter==2); - TEST(imbued==0); - ss2.imbue(std::locale::classic()); - TEST(imbued==1); - } - TEST(counter==0); - }catch(std::exception const &e) { - std::cerr << "Fail:" << e.what() << std::endl; - return EXIT_FAILURE; + { + std::stringstream ss; + TEST(!prop_type::has(ss)); + TEST(prop_type::get(ss).x==-1); + TEST(prop_type::has(ss)); + TEST(counter==1); } - FINALIZE(); + TEST(counter==0); + { + std::stringstream ss; + prop_type::set(propery(1),ss); + TEST(counter==1); + TEST(prop_type::get(ss).x==1); + } + TEST(counter==0); + { + std::stringstream ss; + prop_type::set(propery(1),ss); + TEST(counter==1); + TEST(prop_type::get(ss).x==1); + } + TEST(counter==0); + { + std::stringstream ss,ss2; + prop_type::set(propery(2),ss); + ss2.copyfmt(ss); + TEST(prop_type::get(ss).x==2); + TEST(prop_type::has(ss2)); + TEST(prop_type::has(ss)); + TEST(prop_type::get(ss2).x==2); + prop_type::get(ss2).x=3; + TEST(prop_type::get(ss2).x==3); + TEST(prop_type::get(ss).x==2); + TEST(counter==2); + TEST(imbued==0); + ss2.imbue(std::locale::classic()); + TEST(imbued==1); + } + TEST(counter==0); } // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/test/test_locale.hpp b/test/test_locale.hpp index 3521f5b6..23a64c98 100644 --- a/test/test_locale.hpp +++ b/test/test_locale.hpp @@ -47,20 +47,26 @@ do { THROW_IF_TOO_BIG(error_counter++); \ }while(0) -#define FINALIZE() \ - do { \ - int passed=test_counter - error_counter; \ - std::cout << std::endl; \ - std::cout << "Passed " << passed << " tests\n"; \ - if(error_counter >0 ) { \ - std::cout << "Failed " << error_counter << " tests\n"; \ - } \ - std::cout << " " << std::fixed << std::setprecision(1) \ - << std::setw(5) << 100.0 * passed / test_counter << \ - "% of tests completed sucsessefully\n"; \ - return error_counter == 0 ? EXIT_SUCCESS : EXIT_FAILURE ; \ - }while(0) +void test_main(int argc, char **argv); +int main(int argc,char **argv) { + try { + test_main(argc, argv); + } catch(std::exception const &e) { + std::cerr << "Failed " << e.what() << std::endl; // LCOV_EXCL_LINE + return EXIT_FAILURE; // LCOV_EXCL_LINE + } + int passed = test_counter - error_counter; + std::cout << std::endl; + std::cout << "Passed " << passed << " tests\n"; + if(error_counter > 0 ) { + std::cout << "Failed " << error_counter << " tests\n"; // LCOV_EXCL_LINE + } + std::cout << " " << std::fixed << std::setprecision(1) + << std::setw(5) << 100.0 * passed / test_counter << + "% of tests completed sucsessefully\n"; + return error_counter == 0 ? EXIT_SUCCESS : EXIT_FAILURE ; +} inline unsigned utf8_next(std::string const &s,unsigned &pos) { @@ -109,7 +115,7 @@ BOOST_LOCALE_START_CONST_CONDITION << ") to Latin1"; throw std::runtime_error(ss.str()); } - else if(sizeof(Char)==2 && point >0xFFFF) { // Deal with surragates + else if(sizeof(Char)==2 && point >0xFFFF) { // Deal with surrogates point-=0x10000; out+=static_cast(0xD800 | (point>>10)); out+=static_cast(0xDC00 | (point & 0x3FF)); diff --git a/test/test_locale_tools.hpp b/test/test_locale_tools.hpp index 33e3b4e1..2ee7f8b3 100644 --- a/test/test_locale_tools.hpp +++ b/test/test_locale_tools.hpp @@ -10,11 +10,12 @@ #define BOOST_LOCLAE_TEST_LOCALE_TOOLS_HPP #include - -#include -#include #include +#ifndef BOOST_LOCALE_NO_POSIX_BACKEND +#include "test_posix_tools.hpp" +#endif + template std::basic_string to_correct_string(std::string const &e,std::locale /*l*/) { diff --git a/test/test_message.cpp b/test/test_message.cpp index 2462293a..5a0f9af8 100644 --- a/test/test_message.cpp +++ b/test/test_message.cpp @@ -310,226 +310,218 @@ void test_translate(std::string original,std::string expected,std::locale const bool iso_8859_8_not_supported = false; -int main(int argc,char **argv) +void test_main(int argc, char **argv) { - try { - std::string def[] = { - #ifdef BOOST_LOCALE_WITH_ICU - "icu" , - #endif - #ifndef BOOST_LOCALE_NO_STD_BACKEND - "std" , - #endif - #ifndef BOOST_LOCALE_NO_POSIX_BACKEND - "posix", - #endif - #ifndef BOOST_LOCALE_NO_WINAPI_BACKEND - "winapi", - #endif - }; - for(int type = 0 ; type < int(sizeof(def)/sizeof(def[0])) ; type ++ ) { - boost::locale::localization_backend_manager tmp_backend = boost::locale::localization_backend_manager::global(); - tmp_backend.select(def[type]); - boost::locale::localization_backend_manager::global(tmp_backend); + std::string def[] = { + #ifdef BOOST_LOCALE_WITH_ICU + "icu" , + #endif + #ifndef BOOST_LOCALE_NO_STD_BACKEND + "std" , + #endif + #ifndef BOOST_LOCALE_NO_POSIX_BACKEND + "posix", + #endif + #ifndef BOOST_LOCALE_NO_WINAPI_BACKEND + "winapi", + #endif + }; + for(int type = 0 ; type < int(sizeof(def)/sizeof(def[0])) ; type ++ ) { + boost::locale::localization_backend_manager tmp_backend = boost::locale::localization_backend_manager::global(); + tmp_backend.select(def[type]); + boost::locale::localization_backend_manager::global(tmp_backend); + + backend = def[type]; + + std::cout << "Testing for backend --------- " << def[type] << std::endl; + + boost::locale::generator g; + g.add_messages_domain("simple"); + g.add_messages_domain("full"); + g.add_messages_domain("fall"); + if(argc==2) + g.add_messages_path(argv[1]); + else + g.add_messages_path("./"); + g.set_default_messages_domain("default"); - backend = def[type]; - std::cout << "Testing for backend --------- " << def[type] << std::endl; + std::string locales[] = { "he_IL.UTF-8", "he_IL.ISO8859-8" }; - boost::locale::generator g; - g.add_messages_domain("simple"); - g.add_messages_domain("full"); - g.add_messages_domain("fall"); - if(argc==2) - g.add_messages_path(argv[1]); - else - g.add_messages_path("./"); - g.set_default_messages_domain("default"); + for(unsigned i=0;i("hello")))==to("שלום")); + TEST(same_s(bl::translate("hello"))=="שלום"); + TEST(same_w(bl::translate(to("hello")))==to("שלום")); - #ifdef BOOST_LOCALE_ENABLE_CHAR16_T - if(backend=="icu" || backend=="std") - TEST(same_u16(bl::translate(to("hello")))==to("שלום")); - #endif + #ifdef BOOST_LOCALE_ENABLE_CHAR16_T + if(backend=="icu" || backend=="std") + TEST(same_u16(bl::translate(to("hello")))==to("שלום")); + #endif - #ifdef BOOST_LOCALE_ENABLE_CHAR32_T - if(backend=="icu" || backend=="std") - TEST(same_u32(bl::translate(to("hello")))==to("שלום")); - #endif + #ifdef BOOST_LOCALE_ENABLE_CHAR32_T + if(backend=="icu" || backend=="std") + TEST(same_u32(bl::translate(to("hello")))==to("שלום")); + #endif - } + } - std::cout << "Testing custom file system support" << std::endl; + std::cout << "Testing custom file system support" << std::endl; + { + boost::locale::gnu_gettext::messages_info info; + info.language = "he"; + info.country = "IL"; + info.encoding="UTF-8"; + if(argc==2) + info.paths.push_back(argv[1]); + else + info.paths.push_back("./"); + + info.domains.push_back(bl::gnu_gettext::messages_info::domain("default")); + info.callback = file_loader(); + + std::locale l(std::locale::classic(),boost::locale::gnu_gettext::create_messages_facet(info)); + TEST(file_loader_is_actually_called); + TEST(bl::translate("hello").str(l)=="שלום"); + } + if(iso_8859_8_not_supported) + { + std::cout << "ISO 8859-8 not supported so skipping non-US-ASCII keys" << std::endl; + } + else + { + std::cout << "Testing non-US-ASCII keys" << std::endl; + std::cout << " UTF-8 keys" << std::endl; { - boost::locale::gnu_gettext::messages_info info; - info.language = "he"; - info.country = "IL"; - info.encoding="UTF-8"; + boost::locale::generator g; + g.add_messages_domain("default"); if(argc==2) - info.paths.push_back(argv[1]); + g.add_messages_path(argv[1]); else - info.paths.push_back("./"); + g.add_messages_path("./"); - info.domains.push_back(bl::gnu_gettext::messages_info::domain("default")); - info.callback = file_loader(); + std::locale l = g("he_IL.UTF-8"); - std::locale l(std::locale::classic(),boost::locale::gnu_gettext::create_messages_facet(info)); - TEST(file_loader_is_actually_called); - TEST(bl::translate("hello").str(l)=="שלום"); - } - if(iso_8859_8_not_supported) - { - std::cout << "ISO 8859-8 not supported so skipping non-US-ASCII keys" << std::endl; - } - else - { - std::cout << "Testing non-US-ASCII keys" << std::endl; - std::cout << " UTF-8 keys" << std::endl; - { - boost::locale::generator g; - g.add_messages_domain("default"); - if(argc==2) - g.add_messages_path(argv[1]); - else - g.add_messages_path("./"); + // narrow + TEST(bl::gettext("בדיקה",l)=="test"); + TEST(bl::gettext("לא קיים",l)=="לא קיים"); - std::locale l = g("he_IL.UTF-8"); + // wide + std::wstring wtest = bl::conv::to_utf("בדיקה","UTF-8"); + std::wstring wmiss = bl::conv::to_utf("לא קיים","UTF-8"); + TEST(bl::gettext(wtest.c_str(),l)==L"test"); + TEST(bl::gettext(wmiss.c_str(),l)==wmiss); - // narrow - TEST(bl::gettext("בדיקה",l)=="test"); - TEST(bl::gettext("לא קיים",l)=="לא קיים"); + l=g("he_IL.ISO-8859-8"); - // wide - std::wstring wtest = bl::conv::to_utf("בדיקה","UTF-8"); - std::wstring wmiss = bl::conv::to_utf("לא קיים","UTF-8"); - TEST(bl::gettext(wtest.c_str(),l)==L"test"); - TEST(bl::gettext(wmiss.c_str(),l)==wmiss); + // conversion with substitution + TEST(bl::gettext("test-あにま-בדיקה",l)==bl::conv::from_utf("test--בדיקה","ISO-8859-8")); + } - l=g("he_IL.ISO-8859-8"); + std::cout << " `ANSI' keys" << std::endl; - // conversion with substitution - TEST(bl::gettext("test-あにま-בדיקה",l)==bl::conv::from_utf("test--בדיקה","ISO-8859-8")); - } + { + boost::locale::generator g; + g.add_messages_domain("default/ISO-8859-8"); + if(argc==2) + g.add_messages_path(argv[1]); + else + g.add_messages_path("./"); - std::cout << " `ANSI' keys" << std::endl; + std::locale l = g("he_IL.UTF-8"); - { - boost::locale::generator g; - g.add_messages_domain("default/ISO-8859-8"); - if(argc==2) - g.add_messages_path(argv[1]); - else - g.add_messages_path("./"); - - std::locale l = g("he_IL.UTF-8"); - - // narrow non-UTF-8 keys - // match - TEST(bl::gettext(bl::conv::from_utf("בדיקה","ISO-8859-8").c_str(),l)=="test"); - // conversion - TEST(bl::gettext(bl::conv::from_utf("לא קיים","ISO-8859-8").c_str(),l)=="לא קיים"); - } + // narrow non-UTF-8 keys + // match + TEST(bl::gettext(bl::conv::from_utf("בדיקה","ISO-8859-8").c_str(),l)=="test"); + // conversion + TEST(bl::gettext(bl::conv::from_utf("לא קיים","ISO-8859-8").c_str(),l)=="לא קיים"); } - // Test compiles - { - bl::gettext(""); - bl::gettext(L""); - bl::dgettext("",""); - bl::dgettext("",L""); - bl::pgettext("",""); - bl::pgettext(L"",L""); - bl::dpgettext("","",""); - bl::dpgettext("",L"",L""); - bl::ngettext("","",1); - bl::ngettext(L"",L"",1); - bl::dngettext("","","",1); - bl::dngettext("",L"",L"",1); - bl::npgettext("","","",1); - bl::npgettext(L"",L"",L"",1); - bl::dnpgettext("","","","",1); - bl::dnpgettext("",L"",L"",L"",1); - } - } - catch(std::exception const &e) { - std::cerr << "Failed " << e.what() << std::endl; - return EXIT_FAILURE; + // Test compiles + { + bl::gettext(""); + bl::gettext(L""); + bl::dgettext("",""); + bl::dgettext("",L""); + bl::pgettext("",""); + bl::pgettext(L"",L""); + bl::dpgettext("","",""); + bl::dpgettext("",L"",L""); + bl::ngettext("","",1); + bl::ngettext(L"",L"",1); + bl::dngettext("","","",1); + bl::dngettext("",L"",L"",1); + bl::npgettext("","","",1); + bl::npgettext(L"",L"",L"",1); + bl::dnpgettext("","","","",1); + bl::dnpgettext("",L"",L"",L"",1); } - FINALIZE(); } // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/test/test_posix_collate.cpp b/test/test_posix_collate.cpp index 7c8016c1..2194ff3c 100644 --- a/test/test_posix_collate.cpp +++ b/test/test_posix_collate.cpp @@ -20,7 +20,6 @@ int main() #include #include "test_locale.hpp" #include "test_locale_tools.hpp" -#include "test_posix_tools.hpp" #include int get_sign(int x) @@ -94,24 +93,16 @@ void test_char() } -int main() +void test_main(int /*argc*/, char** /*argv*/) { - try { - boost::locale::localization_backend_manager mgr = boost::locale::localization_backend_manager::global(); - mgr.select("posix"); - boost::locale::localization_backend_manager::global(mgr); - - std::cout << "Testing char" << std::endl; - test_char(); - std::cout << "Testing wchar_t" << std::endl; - test_char(); - } - catch(std::exception const &e) { - std::cerr << "Failed " << e.what() << std::endl; - return EXIT_FAILURE; - } - FINALIZE(); - + boost::locale::localization_backend_manager mgr = boost::locale::localization_backend_manager::global(); + mgr.select("posix"); + boost::locale::localization_backend_manager::global(mgr); + + std::cout << "Testing char" << std::endl; + test_char(); + std::cout << "Testing wchar_t" << std::endl; + test_char(); } #endif // NO POSIX // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/test/test_posix_convert.cpp b/test/test_posix_convert.cpp index a90ac790..4a603dd3 100644 --- a/test/test_posix_convert.cpp +++ b/test/test_posix_convert.cpp @@ -19,7 +19,6 @@ int main() #include #include "test_locale.hpp" #include "test_locale_tools.hpp" -#include "test_posix_tools.hpp" #include #include @@ -71,22 +70,12 @@ void test_char() name = "tr_TR.UTF-8"; if(have_locale(name)) { std::cout << "Testing " << name << std::endl; - locale_t cl = newlocale(LC_ALL_MASK,name.c_str(),0); - try { - TEST(cl); - if(towupper_l(L'i',cl) == 0x130) { - test_one(gen(name),"i","i","İ"); - } - else { - std::cout << " Turkish locale is not supported well" << std::endl; - } - } - catch(...) { - if(cl) freelocale(cl); - throw; - } - if(cl) freelocale(cl); - + locale_holder cl(newlocale(LC_ALL_MASK,name.c_str(),0)); + TEST(cl); + if(towupper_l(L'i',cl) == 0x130) + test_one(gen(name),"i","i","İ"); + else + std::cout << " Turkish locale is not supported well" << std::endl; // LCOV_EXCL_LINE } else { @@ -95,24 +84,16 @@ void test_char() } -int main() +void test_main(int /*argc*/, char** /*argv*/) { - try { - boost::locale::localization_backend_manager mgr = boost::locale::localization_backend_manager::global(); - mgr.select("posix"); - boost::locale::localization_backend_manager::global(mgr); - - std::cout << "Testing char" << std::endl; - test_char(); - std::cout << "Testing wchar_t" << std::endl; - test_char(); - } - catch(std::exception const &e) { - std::cerr << "Failed " << e.what() << std::endl; - return EXIT_FAILURE; - } - FINALIZE(); - + boost::locale::localization_backend_manager mgr = boost::locale::localization_backend_manager::global(); + mgr.select("posix"); + boost::locale::localization_backend_manager::global(mgr); + + std::cout << "Testing char" << std::endl; + test_char(); + std::cout << "Testing wchar_t" << std::endl; + test_char(); } #endif // POSIX diff --git a/test/test_posix_formatting.cpp b/test/test_posix_formatting.cpp index 8000846c..f9c63ab3 100644 --- a/test/test_posix_formatting.cpp +++ b/test/test_posix_formatting.cpp @@ -26,7 +26,6 @@ int main() #include "test_locale.hpp" #include "test_locale_tools.hpp" -#include "test_posix_tools.hpp" //#define DEBUG_FMT @@ -164,115 +163,97 @@ void test_by_char(std::locale const &l,locale_t lreal) } -int main() +void test_main(int /*argc*/, char** /*argv*/) { - locale_t lreal = 0; - try { - boost::locale::localization_backend_manager mgr = boost::locale::localization_backend_manager::global(); - mgr.select("posix"); - boost::locale::localization_backend_manager::global(mgr); - boost::locale::generator gen; - std::string name; - - { - std::cout << "en_US.UTF locale" << std::endl; - name="en_US.UTF-8"; - if(!have_locale(name)) { - std::cout << "en_US.UTF-8 not supported" << std::endl; - } - else { - std::locale l1=gen(name); - lreal=newlocale(LC_ALL_MASK,name.c_str(),0); - assert(lreal); - std::cout << "UTF-8" << std::endl; - - test_by_char(l1,lreal); - - std::cout << "Wide UTF-" << sizeof(wchar_t) * 8 << std::endl; - test_by_char(l1,lreal); - freelocale(lreal); - lreal = 0; - } + locale_holder lreal; + boost::locale::localization_backend_manager mgr = boost::locale::localization_backend_manager::global(); + mgr.select("posix"); + boost::locale::localization_backend_manager::global(mgr); + boost::locale::generator gen; + std::string name; + + { + std::cout << "en_US.UTF locale" << std::endl; + name="en_US.UTF-8"; + if(!have_locale(name)) { + std::cout << "en_US.UTF-8 not supported" << std::endl; + } + else { + std::locale l1=gen(name); + lreal=newlocale(LC_ALL_MASK,name.c_str(),0); + assert(lreal); + std::cout << "UTF-8" << std::endl; + + test_by_char(l1,lreal); + + std::cout << "Wide UTF-" << sizeof(wchar_t) * 8 << std::endl; + test_by_char(l1,lreal); + } + } + { + std::cout << "en_US.Latin-1 locale" << std::endl; + std::string name = "en_US.ISO8859-1"; + if(!have_locale(name)) { + std::cout << "en_US.ISO8859-8 not supported" << std::endl; + } + else { + std::locale l1=gen(name); + lreal=newlocale(LC_ALL_MASK,name.c_str(),0); + assert(lreal); + test_by_char(l1,lreal); + std::cout << "Wide UTF-" << sizeof(wchar_t) * 8 << std::endl; + test_by_char(l1,lreal); } - { - std::cout << "en_US.Latin-1 locale" << std::endl; - std::string name = "en_US.ISO8859-1"; - if(!have_locale(name)) { - std::cout << "en_US.ISO8859-8 not supported" << std::endl; - } - else { - std::locale l1=gen(name); - lreal=newlocale(LC_ALL_MASK,name.c_str(),0); - assert(lreal); - test_by_char(l1,lreal); - std::cout << "Wide UTF-" << sizeof(wchar_t) * 8 << std::endl; - test_by_char(l1,lreal); - freelocale(lreal); - lreal = 0; - } + } + { + std::cout << "he_IL.UTF locale" << std::endl; + name="he_IL.UTF-8"; + if(!have_locale(name)) { + std::cout << name << " not supported" << std::endl; } - { - std::cout << "he_IL.UTF locale" << std::endl; - name="he_IL.UTF-8"; - if(!have_locale(name)) { - std::cout << name << " not supported" << std::endl; - } - else { - std::locale l1=gen(name); - lreal=newlocale(LC_ALL_MASK,name.c_str(),0); - assert(lreal); - std::cout << "UTF-8" << std::endl; - - test_by_char(l1,lreal); - - std::cout << "Wide UTF-" << sizeof(wchar_t) * 8 << std::endl; - test_by_char(l1,lreal); - freelocale(lreal); - lreal = 0; - } + else { + std::locale l1=gen(name); + lreal=newlocale(LC_ALL_MASK,name.c_str(),0); + assert(lreal); + std::cout << "UTF-8" << std::endl; + + test_by_char(l1,lreal); + + std::cout << "Wide UTF-" << sizeof(wchar_t) * 8 << std::endl; + test_by_char(l1,lreal); } - { - std::cout << "he_IL.ISO locale" << std::endl; - std::string name = "he_IL.ISO8859-8"; - if(!have_locale(name)) { - std::cout << name << " not supported" << std::endl; - } - else { - std::locale l1=gen(name); - lreal=newlocale(LC_ALL_MASK,name.c_str(),0); - assert(lreal); - test_by_char(l1,lreal); - std::cout << "Wide UTF-" << sizeof(wchar_t) * 8 << std::endl; - test_by_char(l1,lreal); - freelocale(lreal); - lreal = 0; - } + } + { + std::cout << "he_IL.ISO locale" << std::endl; + std::string name = "he_IL.ISO8859-8"; + if(!have_locale(name)) { + std::cout << name << " not supported" << std::endl; } - { - std::cout << "Testing UTF-8 punct issues" << std::endl; - std::string name = "ru_RU.UTF-8"; - if(!have_locale(name)) { - std::cout << "- No russian locale" << std::endl; - } - else { - std::locale l1=gen(name); - std::ostringstream ss; - ss.imbue(l1); - ss << std::setprecision(10) ; - ss << boost::locale::as::number << 12345.45; - std::string v=ss.str(); - TEST(v == "12345,45" || v == "12 345,45" || v=="12.345,45"); - } + else { + std::locale l1=gen(name); + lreal=newlocale(LC_ALL_MASK,name.c_str(),0); + assert(lreal); + test_by_char(l1,lreal); + std::cout << "Wide UTF-" << sizeof(wchar_t) * 8 << std::endl; + test_by_char(l1,lreal); } } - catch(std::exception const &e) { - std::cerr << "Failed " << e.what() << std::endl; - if(lreal) - freelocale(lreal); - return EXIT_FAILURE; + { + std::cout << "Testing UTF-8 punct issues" << std::endl; + std::string name = "ru_RU.UTF-8"; + if(!have_locale(name)) { + std::cout << "- No russian locale" << std::endl; + } + else { + std::locale l1=gen(name); + std::ostringstream ss; + ss.imbue(l1); + ss << std::setprecision(10) ; + ss << boost::locale::as::number << 12345.45; + std::string v=ss.str(); + TEST(v == "12345,45" || v == "12 345,45" || v=="12.345,45"); + } } - FINALIZE(); - } #endif // posix diff --git a/test/test_posix_tools.hpp b/test/test_posix_tools.hpp index d017bcdf..306be22c 100644 --- a/test/test_posix_tools.hpp +++ b/test/test_posix_tools.hpp @@ -26,6 +26,24 @@ inline bool have_locale(std::string const &name) return false; } +class locale_holder +{ + locale_t l_; + locale_holder(const locale_holder&); + locale_holder& operator=(const locale_holder&); + void reset(const locale_t l = 0) + { + if(l_) + freelocale(l_); + l_ = l; + } +public: + explicit locale_holder(locale_t l = 0): l_(l) {} + ~locale_holder() { reset(); } + operator locale_t() const { return l_; } + locale_holder& operator=(locale_t l) { reset(l); return *this; } +}; + #endif // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/test/test_std_collate.cpp b/test/test_std_collate.cpp index c401b88f..16de56f0 100644 --- a/test/test_std_collate.cpp +++ b/test/test_std_collate.cpp @@ -95,32 +95,24 @@ void test_char() } -int main() +void test_main(int /*argc*/, char** /*argv*/) { - try { - boost::locale::localization_backend_manager mgr = boost::locale::localization_backend_manager::global(); - mgr.select("std"); - boost::locale::localization_backend_manager::global(mgr); - - std::cout << "Testing char" << std::endl; - test_char(); - std::cout << "Testing wchar_t" << std::endl; - test_char(); - #ifdef BOOST_LOCALE_ENABLE_CHAR16_T - std::cout << "Testing char16_t" << std::endl; - test_char(); - #endif - #ifdef BOOST_LOCALE_ENABLE_CHAR32_T - std::cout << "Testing char32_t" << std::endl; - test_char(); - #endif - } - catch(std::exception const &e) { - std::cerr << "Failed " << e.what() << std::endl; - return EXIT_FAILURE; - } - FINALIZE(); - + boost::locale::localization_backend_manager mgr = boost::locale::localization_backend_manager::global(); + mgr.select("std"); + boost::locale::localization_backend_manager::global(mgr); + + std::cout << "Testing char" << std::endl; + test_char(); + std::cout << "Testing wchar_t" << std::endl; + test_char(); + #ifdef BOOST_LOCALE_ENABLE_CHAR16_T + std::cout << "Testing char16_t" << std::endl; + test_char(); + #endif + #ifdef BOOST_LOCALE_ENABLE_CHAR32_T + std::cout << "Testing char32_t" << std::endl; + test_char(); + #endif } #endif // NO STD diff --git a/test/test_std_convert.cpp b/test/test_std_convert.cpp index 9b1b2cd0..febdd8b6 100644 --- a/test/test_std_convert.cpp +++ b/test/test_std_convert.cpp @@ -83,32 +83,24 @@ void test_char() } -int main() +void test_main(int /*argc*/, char** /*argv*/) { - try { - boost::locale::localization_backend_manager mgr = boost::locale::localization_backend_manager::global(); - mgr.select("std"); - boost::locale::localization_backend_manager::global(mgr); - - std::cout << "Testing char" << std::endl; - test_char(); - std::cout << "Testing wchar_t" << std::endl; - test_char(); - #ifdef BOOST_LOCALE_ENABLE_CHAR16_T - std::cout << "Testing char16_t" << std::endl; - test_char(); - #endif - #ifdef BOOST_LOCALE_ENABLE_CHAR32_T - std::cout << "Testing char32_t" << std::endl; - test_char(); - #endif - } - catch(std::exception const &e) { - std::cerr << "Failed " << e.what() << std::endl; - return EXIT_FAILURE; - } - FINALIZE(); + boost::locale::localization_backend_manager mgr = boost::locale::localization_backend_manager::global(); + mgr.select("std"); + boost::locale::localization_backend_manager::global(mgr); + std::cout << "Testing char" << std::endl; + test_char(); + std::cout << "Testing wchar_t" << std::endl; + test_char(); + #ifdef BOOST_LOCALE_ENABLE_CHAR16_T + std::cout << "Testing char16_t" << std::endl; + test_char(); + #endif + #ifdef BOOST_LOCALE_ENABLE_CHAR32_T + std::cout << "Testing char32_t" << std::endl; + test_char(); + #endif } #endif // no std diff --git a/test/test_std_formatting.cpp b/test/test_std_formatting.cpp index 1cd75b52..8d054328 100644 --- a/test/test_std_formatting.cpp +++ b/test/test_std_formatting.cpp @@ -205,159 +205,151 @@ void test_by_char(std::locale const &l,std::locale const &lreal) } -int main() +void test_main(int /*argc*/, char** /*argv*/) { - try { - boost::locale::localization_backend_manager mgr = boost::locale::localization_backend_manager::global(); - mgr.select("std"); - boost::locale::localization_backend_manager::global(mgr); - boost::locale::generator gen; - - { - std::cout << "en_US.UTF locale" << std::endl; - std::string real_name; - std::string name = get_std_name("en_US.UTF-8",&real_name); - if(name.empty()) { - std::cout << "en_US.UTF-8 not supported" << std::endl; - } - else { - std::locale l1=gen(name),l2(real_name.c_str()); - std::cout << "UTF-8" << std::endl; - if(name==real_name) - test_by_char(l1,l2); - else - test_by_char(l1,l2); - - std::cout << "Wide UTF-" << sizeof(wchar_t) * 8 << std::endl; - test_by_char(l1,l2); - - #ifdef BOOST_LOCALE_ENABLE_CHAR16_T - std::cout << "char16 UTF-16" << std::endl; - test_by_char(l1,l2); - #endif - #ifdef BOOST_LOCALE_ENABLE_CHAR32_T - std::cout << "char32 UTF-32" << std::endl; - test_by_char(l1,l2); - #endif - } + boost::locale::localization_backend_manager mgr = boost::locale::localization_backend_manager::global(); + mgr.select("std"); + boost::locale::localization_backend_manager::global(mgr); + boost::locale::generator gen; + + { + std::cout << "en_US.UTF locale" << std::endl; + std::string real_name; + std::string name = get_std_name("en_US.UTF-8",&real_name); + if(name.empty()) { + std::cout << "en_US.UTF-8 not supported" << std::endl; } - { - std::cout << "en_US.Latin-1 locale" << std::endl; - std::string real_name; - std::string name = get_std_name("en_US.ISO8859-1",&real_name); - if(name.empty()) { - std::cout << "en_US.ISO8859-8 not supported" << std::endl; - } - else { - std::locale l1=gen(name),l2(real_name.c_str()); + else { + std::locale l1=gen(name),l2(real_name.c_str()); + std::cout << "UTF-8" << std::endl; + if(name==real_name) test_by_char(l1,l2); - std::cout << "Wide UTF-" << sizeof(wchar_t) * 8 << std::endl; - test_by_char(l1,l2); - - #ifdef BOOST_LOCALE_ENABLE_CHAR16_T - std::cout << "char16 UTF-16" << std::endl; - test_by_char(l1,l2); - #endif - #ifdef BOOST_LOCALE_ENABLE_CHAR32_T - std::cout << "char32 UTF-32" << std::endl; - test_by_char(l1,l2); - #endif - } + else + test_by_char(l1,l2); + + std::cout << "Wide UTF-" << sizeof(wchar_t) * 8 << std::endl; + test_by_char(l1,l2); + + #ifdef BOOST_LOCALE_ENABLE_CHAR16_T + std::cout << "char16 UTF-16" << std::endl; + test_by_char(l1,l2); + #endif + #ifdef BOOST_LOCALE_ENABLE_CHAR32_T + std::cout << "char32 UTF-32" << std::endl; + test_by_char(l1,l2); + #endif } - { - std::cout << "he_IL.UTF locale" << std::endl; - std::string real_name; - std::string name = get_std_name("he_IL.UTF-8",&real_name); - if(name.empty()) { - std::cout << "he_IL.UTF-8 not supported" << std::endl; - } - else { - std::locale l1=gen(name),l2(real_name.c_str()); - std::cout << "UTF-8" << std::endl; - if(name==real_name) - test_by_char(l1,l2); - else - test_by_char(l1,l2); - - std::cout << "Wide UTF-" << sizeof(wchar_t) * 8 << std::endl; - test_by_char(l1,l2); - - #ifdef BOOST_LOCALE_ENABLE_CHAR16_T - std::cout << "char16 UTF-16" << std::endl; - test_by_char(l1,l2); - #endif - #ifdef BOOST_LOCALE_ENABLE_CHAR32_T - std::cout << "char32 UTF-32" << std::endl; - test_by_char(l1,l2); - #endif - } + } + { + std::cout << "en_US.Latin-1 locale" << std::endl; + std::string real_name; + std::string name = get_std_name("en_US.ISO8859-1",&real_name); + if(name.empty()) { + std::cout << "en_US.ISO8859-8 not supported" << std::endl; } - { - std::cout << "he_IL.ISO8859-8 locale" << std::endl; - std::string real_name; - std::string name = get_std_name("he_IL.ISO8859-8",&real_name); - if(name.empty()) { - std::cout << "he_IL.ISO8859-8 not supported" << std::endl; - } - else { - std::locale l1=gen(name),l2(real_name.c_str()); + else { + std::locale l1=gen(name),l2(real_name.c_str()); + test_by_char(l1,l2); + std::cout << "Wide UTF-" << sizeof(wchar_t) * 8 << std::endl; + test_by_char(l1,l2); + + #ifdef BOOST_LOCALE_ENABLE_CHAR16_T + std::cout << "char16 UTF-16" << std::endl; + test_by_char(l1,l2); + #endif + #ifdef BOOST_LOCALE_ENABLE_CHAR32_T + std::cout << "char32 UTF-32" << std::endl; + test_by_char(l1,l2); + #endif + } + } + { + std::cout << "he_IL.UTF locale" << std::endl; + std::string real_name; + std::string name = get_std_name("he_IL.UTF-8",&real_name); + if(name.empty()) { + std::cout << "he_IL.UTF-8 not supported" << std::endl; + } + else { + std::locale l1=gen(name),l2(real_name.c_str()); + std::cout << "UTF-8" << std::endl; + if(name==real_name) test_by_char(l1,l2); - std::cout << "Wide UTF-" << sizeof(wchar_t) * 8 << std::endl; - test_by_char(l1,l2); - - #ifdef BOOST_LOCALE_ENABLE_CHAR16_T - std::cout << "char16 UTF-16" << std::endl; - test_by_char(l1,l2); - #endif - #ifdef BOOST_LOCALE_ENABLE_CHAR32_T - std::cout << "char32 UTF-32" << std::endl; - test_by_char(l1,l2); - #endif - } + else + test_by_char(l1,l2); + + std::cout << "Wide UTF-" << sizeof(wchar_t) * 8 << std::endl; + test_by_char(l1,l2); + + #ifdef BOOST_LOCALE_ENABLE_CHAR16_T + std::cout << "char16 UTF-16" << std::endl; + test_by_char(l1,l2); + #endif + #ifdef BOOST_LOCALE_ENABLE_CHAR32_T + std::cout << "char32 UTF-32" << std::endl; + test_by_char(l1,l2); + #endif + } + } + { + std::cout << "he_IL.ISO8859-8 locale" << std::endl; + std::string real_name; + std::string name = get_std_name("he_IL.ISO8859-8",&real_name); + if(name.empty()) { + std::cout << "he_IL.ISO8859-8 not supported" << std::endl; + } + else { + std::locale l1=gen(name),l2(real_name.c_str()); + test_by_char(l1,l2); + std::cout << "Wide UTF-" << sizeof(wchar_t) * 8 << std::endl; + test_by_char(l1,l2); + + #ifdef BOOST_LOCALE_ENABLE_CHAR16_T + std::cout << "char16 UTF-16" << std::endl; + test_by_char(l1,l2); + #endif + #ifdef BOOST_LOCALE_ENABLE_CHAR32_T + std::cout << "char32 UTF-32" << std::endl; + test_by_char(l1,l2); + #endif } - { - std::cout << "Testing UTF-8 punct workaround" << std::endl; - std::string real_name; - std::string name = get_std_name("ru_RU.UTF-8",&real_name); - if(name.empty()) { - std::cout << "- No russian locale" << std::endl; + } + { + std::cout << "Testing UTF-8 punct workaround" << std::endl; + std::string real_name; + std::string name = get_std_name("ru_RU.UTF-8",&real_name); + if(name.empty()) { + std::cout << "- No russian locale" << std::endl; + } + else if(name != real_name) { + std::cout << "- Not having UTF-8 locale, no need for workaround" << std::endl; + } + else { + std::locale l1=gen(name),l2(real_name.c_str()); + bool fails = false; + try { + std::ostringstream ss; + ss.imbue(l2); + ss << 12345.45; + boost::locale::conv::from_utf(ss.str(),"windows-1251",boost::locale::conv::stop); + fails = false; } - else if(name != real_name) { - std::cout << "- Not having UTF-8 locale, no need for workaround" << std::endl; + catch(...) { + fails = true; + } + + if(!fails) { + std::cout << "- No invalid UTF. No need to check" << std::endl; } else { - std::locale l1=gen(name),l2(real_name.c_str()); - bool fails = false; - try { - std::ostringstream ss; - ss.imbue(l2); - ss << 12345.45; - boost::locale::conv::from_utf(ss.str(),"windows-1251",boost::locale::conv::stop); - fails = false; - } - catch(...) { - fails = true; - } - - if(!fails) { - std::cout << "- No invalid UTF. No need to check" << std::endl; - } - else { - std::ostringstream ss; - ss.imbue(l1); - ss << std::setprecision(10) ; - ss << boost::locale::as::number << 12345.45; - TEST(ss.str() == "12 345,45" || ss.str()=="12345,45"); - } + std::ostringstream ss; + ss.imbue(l1); + ss << std::setprecision(10) ; + ss << boost::locale::as::number << 12345.45; + TEST(ss.str() == "12 345,45" || ss.str()=="12345,45"); } } } - catch(std::exception const &e) { - std::cerr << "Failed " << e.what() << std::endl; - return EXIT_FAILURE; - } - FINALIZE(); - } #endif // no std diff --git a/test/test_utf.cpp b/test/test_utf.cpp index af7afb7f..5ebd8e12 100644 --- a/test/test_utf.cpp +++ b/test/test_utf.cpp @@ -281,18 +281,11 @@ void test_utf32() #endif } -int main() +void test_main(int /*argc*/, char** /*argv*/) { - try { - test_utf8(); - test_utf16(); - test_utf32(); - } - catch(std::exception const &e) { - std::cerr << "Failed " << e.what() << std::endl; - return EXIT_FAILURE; - } - FINALIZE(); + test_utf8(); + test_utf16(); + test_utf32(); } // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/test/test_winapi_collate.cpp b/test/test_winapi_collate.cpp index 641c40e4..02f521d5 100644 --- a/test/test_winapi_collate.cpp +++ b/test/test_winapi_collate.cpp @@ -109,24 +109,13 @@ void test_collate() compare("ä","a",identical,gt); // a , ä } - - - -int main() +void test_main(int /*argc*/, char** /*argv*/) { - try { - boost::locale::localization_backend_manager mgr = boost::locale::localization_backend_manager::global(); - mgr.select("winapi"); - boost::locale::localization_backend_manager::global(mgr); - - test_collate(); - } - catch(std::exception const &e) { - std::cerr << "Failed " << e.what() << std::endl; - return EXIT_FAILURE; - } - FINALIZE(); + boost::locale::localization_backend_manager mgr = boost::locale::localization_backend_manager::global(); + mgr.select("winapi"); + boost::locale::localization_backend_manager::global(mgr); + test_collate(); } #endif // NO WINAPI // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/test/test_winapi_convert.cpp b/test/test_winapi_convert.cpp index c1e16f7b..0da9909f 100644 --- a/test/test_winapi_convert.cpp +++ b/test/test_winapi_convert.cpp @@ -71,34 +71,26 @@ void test_norm(std::string orig,std::string normal,boost::locale::norm_type type test_normc(to(orig),to(normal),type); } -int main() +void test_main(int /*argc*/, char** /*argv*/) { - try { - boost::locale::localization_backend_manager mgr = boost::locale::localization_backend_manager::global(); - mgr.select("winapi"); - boost::locale::localization_backend_manager::global(mgr); - - std::cout << "Testing char" << std::endl; - test_char(); - std::cout << "Testing wchar_t" << std::endl; - test_char(); - - std::cout << "Testing Unicode normalization" << std::endl; - test_norm("\xEF\xAC\x81","\xEF\xAC\x81",boost::locale::norm_nfd); /// ligature fi - test_norm("\xEF\xAC\x81","\xEF\xAC\x81",boost::locale::norm_nfc); - #if defined(_WIN32_NT) && _WIN32_NT >= 0x600 - test_norm("\xEF\xAC\x81","fi",boost::locale::norm_nfkd); - test_norm("\xEF\xAC\x81","fi",boost::locale::norm_nfkc); - #endif - test_norm("ä","ä",boost::locale::norm_nfd); // ä to a and accent - test_norm("ä","ä",boost::locale::norm_nfc); - } - catch(std::exception const &e) { - std::cerr << "Failed " << e.what() << std::endl; - return EXIT_FAILURE; - } - FINALIZE(); - + boost::locale::localization_backend_manager mgr = boost::locale::localization_backend_manager::global(); + mgr.select("winapi"); + boost::locale::localization_backend_manager::global(mgr); + + std::cout << "Testing char" << std::endl; + test_char(); + std::cout << "Testing wchar_t" << std::endl; + test_char(); + + std::cout << "Testing Unicode normalization" << std::endl; + test_norm("\xEF\xAC\x81","\xEF\xAC\x81",boost::locale::norm_nfd); /// ligature fi + test_norm("\xEF\xAC\x81","\xEF\xAC\x81",boost::locale::norm_nfc); + #if defined(_WIN32_NT) && _WIN32_NT >= 0x600 + test_norm("\xEF\xAC\x81","fi",boost::locale::norm_nfkd); + test_norm("\xEF\xAC\x81","fi",boost::locale::norm_nfkc); + #endif + test_norm("ä","ä",boost::locale::norm_nfd); // ä to a and accent + test_norm("ä","ä",boost::locale::norm_nfc); } #endif // no winapi diff --git a/test/test_winapi_formatting.cpp b/test/test_winapi_formatting.cpp index 43792978..4e4d1d57 100644 --- a/test/test_winapi_formatting.cpp +++ b/test/test_winapi_formatting.cpp @@ -225,39 +225,31 @@ void test_date_time(std::locale l) } } -int main() +void test_main(int /*argc*/, char** /*argv*/) { - try { - boost::locale::localization_backend_manager mgr = boost::locale::localization_backend_manager::global(); - mgr.select("winapi"); - boost::locale::localization_backend_manager::global(mgr); - boost::locale::generator gen; - std::string name; - std::string names[] = { "en_US.UTF-8", "he_IL.UTF-8", "ru_RU.UTF-8" }; - int lcids[] = { 0x0409, 0x040D ,0x0419 }; - - for(unsigned i=0;i(l1,name,lcids[i]); - std::cout << "-- UTF-16" << std::endl; - test_by_char(l1,name,lcids[i]); + boost::locale::localization_backend_manager mgr = boost::locale::localization_backend_manager::global(); + mgr.select("winapi"); + boost::locale::localization_backend_manager::global(mgr); + boost::locale::generator gen; + std::string name; + std::string names[] = { "en_US.UTF-8", "he_IL.UTF-8", "ru_RU.UTF-8" }; + int lcids[] = { 0x0409, 0x040D ,0x0419 }; + + for(unsigned i=0;i(l1,name,lcids[i]); + std::cout << "-- UTF-16" << std::endl; + test_by_char(l1,name,lcids[i]); } - FINALIZE(); - + std::cout << "- Testing strftime" << std::endl; + test_date_time(gen("en_US.UTF-8")); } #endif // no winapi From e3217deb99ebcb1493b42fee154c7d590589ebfd Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Thu, 30 Jun 2022 17:38:48 +0200 Subject: [PATCH 62/90] Add Readme Based on Boost.CI --- README.md | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000..eea4457b --- /dev/null +++ b/README.md @@ -0,0 +1,64 @@ +# Boost.CI + +Part of the [Boost C++ Libraries](http://github.com/boostorg). + +Boost.Locale is a library that provides high quality localization facilities in a C++ way. +It was originally designed a part of [CppCMS](http://cppcms.sourceforge.net/) - a C++ Web Framework project and then contributed to Boost. + +Boost.Locale gives powerful tools for development of cross platform localized software - the software that talks to users in their language. + +Provided Features: + +- Correct case conversion, case folding and normalization. +- Collation (sorting), including support for 4 Unicode collation levels. +- Date, time, timezone and calendar manipulations, formatting and parsing, including transparent support for calendars other than Gregorian. +- Boundary analysis for characters, words, sentences and line-breaks. +- Number formatting, spelling and parsing. +- Monetary formatting and parsing. +- Powerful message formatting (string translation) including support for plural forms, using GNU catalogs. +- Character set conversion. +- Transparent support for 8-bit character sets like Latin1 +- Support for `char` and `wchar_t` +- Experimental support for C++0x `char16_t` and `char32_t` strings and streams. + +Boost.Locale enhances and unifies the standard library's API the way it becomes useful and convenient for development of cross platform and "cross-culture" software. + +In order to achieve this goal Boost.Locale uses the-state-of-the-art Unicode and Localization library: ICU - International Components for Unicode. + +Boost.Locale creates the natural glue between the C++ locales framework, iostreams, and the powerful ICU library. + +Boost.Locale provides non-ICU based localization support as well. +It is based on the operating system native API or on the standard C++ library support. +Sacrificing some less important features, Boost.Locale becomes less powerful but lighter and easier to deploy and use library. + +### License + +Distributed under the [Boost Software License, Version 1.0](http://www.boost.org/LICENSE_1_0.txt). + +### Properties + +* C++03 + +### Build Status + +Branch | GH Actions | Appveyor | codecov.io | Deps | Docs | Tests | +:-------------: | ---------- | -------- | ---------- | ---- | ---- | ----- | +[`master`](https://github.com/boostorg/locale/tree/master) | [![CI](https://github.com/boostorg/locale/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/boostorg/locale/actions/workflows/ci.yml) | [![Build status](https://ci.appveyor.com/api/projects/status/github/boostorg/locale?branch=master&svg=true)](https://ci.appveyor.com/project/Flamefire/locale/branch/master) | [![codecov](https://codecov.io/gh/boostorg/locale/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/locale/branch/master) | [![Deps](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/locale.html) | [![Documentation](https://img.shields.io/badge/docs-master-brightgreen.svg)](https://www.boost.org/doc/libs/master/libs/locale/doc/html/index.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-master-brightgreen.svg)](http://www.boost.org/development/tests/master/developer/locale.html) +[`develop`](https://github.com/boostorg/locale/tree/develop) | [![CI](https://github.com/boostorg/locale/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/boostorg/locale/actions/workflows/ci.yml) | [![Build status](https://ci.appveyor.com/api/projects/status/github/boostorg/locale?branch=develop&svg=true)](https://ci.appveyor.com/project/Flamefire/locale/branch/develop) | [![codecov](https://codecov.io/gh/boostorg/locale/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/locale/branch/develop) | [![Deps](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/locale.html) | [![Documentation](https://img.shields.io/badge/docs-develop-brightgreen.svg)](https://www.boost.org/doc/libs/develop/libs/locale/doc/html/index.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](http://www.boost.org/development/tests/develop/developer/locale.html) + +### Directories + +| Name | Purpose | +| ----------- | ------------------------------ | +| `doc` | Documentation | +| `examples` | Examples | +| `include` | Headers | +| `src` | Source files | +| `test` | Unit tests | + +### More information + +* [Ask questions](http://stackoverflow.com/questions/ask?tags=c%2B%2B,boost,boost-locale) +* [Report bugs](https://github.com/boostorg/locale/issues): Be sure to mention Boost version, platform and compiler you're using. A small compilable code sample to reproduce the problem is always good as well. +* Submit your patches as pull requests against **develop** branch. Note that by submitting patches you agree to license your modifications under the [Boost Software License, Version 1.0](http://www.boost.org/LICENSE_1_0.txt). +* Discussions about the library are held on the [Boost developers mailing list](http://www.boost.org/community/groups.html#main). Be sure to read the [discussion policy](http://www.boost.org/community/policy.html) before posting and add the `[locale]` tag at the beginning of the subject line. From 03b5f9c139564fea418454a592abcc6ca1b6d63f Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Thu, 30 Jun 2022 17:41:05 +0200 Subject: [PATCH 63/90] Add LICENSE file --- LICENSE | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..36b7cd93 --- /dev/null +++ b/LICENSE @@ -0,0 +1,23 @@ +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. From 1a4b05a6aea838e50a60840bf577e79454b9a8db Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Thu, 30 Jun 2022 17:43:41 +0200 Subject: [PATCH 64/90] Add Alex to maintainers --- meta/libraries.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/libraries.json b/meta/libraries.json index 424876a8..081ff452 100644 --- a/meta/libraries.json +++ b/meta/libraries.json @@ -9,7 +9,8 @@ "String" ], "maintainers": [ - "Artyom Beilis " + "Artyom Beilis ", + "Alexander Grund " ], "cxxstd": "03" } From 5d6bad25590215a3037bd0a616e317b2ccc380ae Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Thu, 30 Jun 2022 20:38:43 +0200 Subject: [PATCH 65/90] Add test folder to include path Required for some Cygwin versions --- test/Jamfile.v2 | 1 + 1 file changed, 1 insertion(+) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 76102a7a..f70fc3ce 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -14,6 +14,7 @@ project : requirements gcc-11:on clang:"-Wno-long-long -Wno-error=deprecated-declarations" clang-5:on + . # Make sure we get all defines we need # Otherwise we would have problem knowing # what backends are actually in use From 14eccbd3af2951e91089ac80e88b18452cbb38de Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Fri, 1 Jul 2022 10:42:39 +0200 Subject: [PATCH 66/90] CI: Disable deprecated C++03 warnings --- .appveyor.yml | 1 + .github/workflows/ci.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.appveyor.yml b/.appveyor.yml index e6a9bb3e..c588604d 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -52,6 +52,7 @@ environment: # B2_THREADING: threading=multi,single B2_VARIANT: release B2_FLAGS: testing.execute=off + B2_DEFINES: BOOST_LOCALE_DISABLE_DEPRECATED_03_WARNING matrix: - FLAVOR: Visual Studio 2008, 2010, 2012 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60282ed5..59185e3d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,6 +29,7 @@ env: B2_CI_VERSION: 1 B2_VARIANT: debug,release B2_LINK: shared,static + B2_DEFINES: BOOST_LOCALE_DISABLE_DEPRECATED_03_WARNING LCOV_BRANCH_COVERAGE: 0 CODECOV_NAME: Github Actions From 610335e13dfbcdb52bf308594ff4dd95e1566145 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Thu, 30 Jun 2022 20:14:27 +0200 Subject: [PATCH 67/90] Add missing ICU include path in CMake tests --- test/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 018e9675..12f316f6 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -37,6 +37,9 @@ function(boost_locale_add_test name) target_link_libraries(${name} PRIVATE Boost::locale) target_compile_definitions(${name} PRIVATE ${boost_locale_defines}) target_compile_options(${name} PRIVATE ${BOOST_LOCALE_WARNING_OPTIONS}) + if(BOOST_LOCALE_ENABLE_ICU) + target_include_directories(${name} PRIVATE ${ICU_INCLUDE_DIR}) + endif() if(ARG_WORKING_DIRECTORY) set_target_properties(${name} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${ARG_WORKING_DIRECTORY}") From 192807a27e8b451871e39f4bccb48d44c1674a22 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Thu, 30 Jun 2022 18:35:27 +0200 Subject: [PATCH 68/90] Fix various MSVC warnings Mostly constant conditions and narrowing casts --- include/boost/locale/config.hpp | 2 +- include/boost/locale/date_time.hpp | 7 +++ include/boost/locale/date_time_facet.hpp | 8 +-- src/icu/boundary.cpp | 7 +++ src/icu/collator.cpp | 5 ++ src/icu/date_time.cpp | 8 +-- src/icu/formatter.cpp | 8 ++- src/icu/numeric.cpp | 4 +- src/icu/uconv.hpp | 9 +++ src/shared/mo_lambda.cpp | 4 ++ src/shared/mo_lambda.hpp | 1 + src/util/codecvt_converter.cpp | 1 - src/util/gregorian.cpp | 30 ++++----- src/win32/api.hpp | 2 + test/CMakeLists.txt | 8 +-- test/test_boundary.cpp | 11 ++-- test/test_codecvt.cpp | 4 ++ test/test_codepage.cpp | 8 ++- test/test_convert.cpp | 9 ++- test/test_date_time.cpp | 79 ++++++++++++------------ test/test_formatting.cpp | 42 ++++++++----- test/test_locale.hpp | 32 +++++----- test/test_locale_tools.hpp | 4 ++ 23 files changed, 180 insertions(+), 113 deletions(-) diff --git a/include/boost/locale/config.hpp b/include/boost/locale/config.hpp index 639fd2fa..ced44743 100644 --- a/include/boost/locale/config.hpp +++ b/include/boost/locale/config.hpp @@ -68,7 +68,7 @@ BOOST_PRAGMA_MESSAGE("CAUTION: Define BOOST_LOCALE_DISABLE_DEPRECATED_03_WARNING to suppress this message.") #endif -#ifdef BOOST_MSVC +#ifdef _MSC_VER // Denote a constant condition, e.g. for if(sizeof(... #define BOOST_LOCALE_START_CONST_CONDITION __pragma(warning(push)) __pragma(warning(disable : 4127)) #define BOOST_LOCALE_END_CONST_CONDITION __pragma(warning(pop)) diff --git a/include/boost/locale/date_time.hpp b/include/boost/locale/date_time.hpp index e7a4ef0f..381dddf3 100644 --- a/include/boost/locale/date_time.hpp +++ b/include/boost/locale/date_time.hpp @@ -919,6 +919,10 @@ namespace boost { return in; } +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4512) //assignment operator could not be generated +#endif /// /// \brief This class represents a period: a pair of two date_time objects. /// @@ -968,6 +972,9 @@ namespace boost { date_time const &s_; date_time const &e_; }; +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif /// /// Calculates the difference between two dates, the left operand is a later point on time line. diff --git a/include/boost/locale/date_time_facet.hpp b/include/boost/locale/date_time_facet.hpp index c432f932..4b685993 100644 --- a/include/boost/locale/date_time_facet.hpp +++ b/include/boost/locale/date_time_facet.hpp @@ -167,7 +167,7 @@ namespace boost { /// /// If normalize() is not called after set_value, the behavior is undefined /// - virtual void set_value(period::marks::period_mark p,int value) = 0; + virtual void set_value(period::marks::period_mark m,int value) = 0; /// /// Recalculate all periods after setting them, should be called after use of set_value() function. @@ -177,7 +177,7 @@ namespace boost { /// /// Get specific value for period \a p according to a value_type \a v /// - virtual int get_value(period::marks::period_mark p,value_type v) const = 0; + virtual int get_value(period::marks::period_mark m,value_type v) const = 0; /// /// Set current time point @@ -201,12 +201,12 @@ namespace boost { /// Adjust period's \a p value by \a difference items using a update_type \a u. /// Note: not all values are adjustable /// - virtual void adjust_value(period::marks::period_mark p,update_type u,int difference) = 0; + virtual void adjust_value(period::marks::period_mark m,update_type u,int difference) = 0; /// /// Calculate the difference between this calendar and \a other in \a p units /// - virtual int difference(abstract_calendar const *other,period::marks::period_mark p) const = 0; + virtual int difference(abstract_calendar const *other,period::marks::period_mark m) const = 0; /// /// Set time zone, empty - use system diff --git a/src/icu/boundary.cpp b/src/icu/boundary.cpp index 0473404f..ea0421d3 100644 --- a/src/icu/boundary.cpp +++ b/src/icu/boundary.cpp @@ -22,6 +22,11 @@ #include "icu_util.hpp" #include "uconv.hpp" +#ifdef BOOST_MSVC +#pragma warning(disable:4244) // 'argument' : conversion from 'int' +#pragma warning(disable:4267) // 'argument' : conversion from 'size_t' +#endif + namespace boost { namespace locale { namespace boundary { @@ -140,6 +145,7 @@ index_type do_map(boundary_type t,CharType const *begin,CharType const *end,icu: #if U_ICU_VERSION_MAJOR_NUM*100 + U_ICU_VERSION_MINOR_NUM >= 306 UErrorCode err=U_ZERO_ERROR; +BOOST_LOCALE_START_CONST_CONDITION if(sizeof(CharType) == 2 || (sizeof(CharType)==1 && encoding=="UTF-8")) { UText *ut=0; @@ -148,6 +154,7 @@ index_type do_map(boundary_type t,CharType const *begin,CharType const *end,icu: ut=utext_openUTF8(0,reinterpret_cast(begin),end-begin,&err); else // sizeof(CharType)==2 ut=utext_openUChars(0,reinterpret_cast(begin),end-begin,&err); +BOOST_LOCALE_END_CONST_CONDITION check_and_throw_icu_error(err); err=U_ZERO_ERROR; diff --git a/src/icu/collator.cpp b/src/icu/collator.cpp index 4d0ecebe..6bdd5b6f 100644 --- a/src/icu/collator.cpp +++ b/src/icu/collator.cpp @@ -22,6 +22,11 @@ # include #endif +#ifdef BOOST_MSVC +#pragma warning(disable:4244) // 'argument' : conversion from 'int' +#pragma warning(disable:4267) // 'argument' : conversion from 'size_t' +#endif + namespace boost { namespace locale { namespace impl_icu { diff --git a/src/icu/date_time.cpp b/src/icu/date_time.cpp index 3b8eca88..0f55bb6c 100644 --- a/src/icu/date_time.cpp +++ b/src/icu/date_time.cpp @@ -206,7 +206,7 @@ namespace impl_icu { } check_and_throw_dt(err); } - int difference(abstract_calendar const *other_ptr,period::marks::period_mark p) const BOOST_OVERRIDE + int difference(abstract_calendar const *other_ptr, period::marks::period_mark m) const BOOST_OVERRIDE { UErrorCode err=U_ZERO_ERROR; double other_time = 0; @@ -223,11 +223,11 @@ namespace impl_icu { check_and_throw_dt(err); } else { - posix_time p = other_ptr->get_time(); - other_time = p.seconds * 1000.0 + p.nanoseconds / 1000000.0; + posix_time o_time = other_ptr->get_time(); + other_time = o_time.seconds * 1000.0 + o_time.nanoseconds / 1000000.0; } - int diff = self->fieldDifference(other_time,to_icu(p),err); + int diff = self->fieldDifference(other_time,to_icu(m),err); check_and_throw_dt(err); return diff; diff --git a/src/icu/formatter.cpp b/src/icu/formatter.cpp index 7a026b41..6bf1999b 100644 --- a/src/icu/formatter.cpp +++ b/src/icu/formatter.cpp @@ -25,6 +25,8 @@ #include "predefined_formatters.hpp" #include "time_zone.hpp" +#include + #ifdef BOOST_MSVC # pragma warning(disable : 4244) // lose data #endif @@ -37,7 +39,7 @@ namespace locale { std::locale::id icu_formatters_cache::id; namespace { - struct init { init() { std::has_facet(std::locale::classic()); } } instance; + struct init { init() { ignore_unused(std::has_facet(std::locale::classic())); } } instance; } @@ -550,8 +552,8 @@ namespace locale { else {// strftime icu_std_converter cvt_(encoding); std::basic_string const &f=info.date_time_pattern(); - icu::UnicodeString fmt = strftime_to_icu(cvt_.icu(f.data(),f.data()+f.size()),locale); - adf.reset(new icu::SimpleDateFormat(fmt,locale,err)); + icu::UnicodeString pattern = strftime_to_icu(cvt_.icu(f.data(),f.data()+f.size()),locale); + adf.reset(new icu::SimpleDateFormat(pattern,locale,err)); } if(U_FAILURE(err)) return fmt.release(); diff --git a/src/icu/numeric.cpp b/src/icu/numeric.cpp index 948d3106..2e75c340 100644 --- a/src/icu/numeric.cpp +++ b/src/icu/numeric.cpp @@ -326,6 +326,7 @@ class num_parse : public std::num_get, protected num_base return in; } +BOOST_LOCALE_START_CONST_CONDITION template bool valid(CastedType v) const { @@ -334,7 +335,7 @@ class num_parse : public std::num_get, protected num_base if(v < 0 && value_limits::is_signed == false) return false; - static const CastedType max_val = value_limits::max(); + static const CastedType max_val = static_cast(value_limits::max()); if(sizeof(CastedType) > sizeof(ValueType) && v > max_val) return false; @@ -348,6 +349,7 @@ class num_parse : public std::num_get, protected num_base } return true; } +BOOST_LOCALE_END_CONST_CONDITION icu::Locale loc_; std::string enc_; diff --git a/src/icu/uconv.hpp b/src/icu/uconv.hpp index a9c8decc..aae6c4cf 100644 --- a/src/icu/uconv.hpp +++ b/src/icu/uconv.hpp @@ -19,6 +19,12 @@ #include #include "icu_util.hpp" +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4244) // 'argument' : conversion from 'int' +#pragma warning(disable:4267) // 'argument' : conversion from 'size_t' +#endif + namespace boost { namespace locale { namespace impl_icu { @@ -312,5 +318,8 @@ namespace impl_icu { #endif +#ifdef BOOST_MSVC +#pragma warning(push) +#endif // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/src/shared/mo_lambda.cpp b/src/shared/mo_lambda.cpp index 5306fcaa..661c83a7 100644 --- a/src/shared/mo_lambda.cpp +++ b/src/shared/mo_lambda.cpp @@ -9,6 +9,10 @@ #include #include +#ifdef BOOST_MSVC +#pragma warning(disable:4512) //assignment operator could not be generated +#endif + namespace boost { namespace locale { namespace gnu_gettext { diff --git a/src/shared/mo_lambda.hpp b/src/shared/mo_lambda.hpp index d4e5f5f7..c29c2365 100644 --- a/src/shared/mo_lambda.hpp +++ b/src/shared/mo_lambda.hpp @@ -8,6 +8,7 @@ #ifndef BOOST_SRC_LOCALE_MO_LAMBDA_HPP_INCLUDED #define BOOST_SRC_LOCALE_MO_LAMBDA_HPP_INCLUDED +#include #include namespace boost { diff --git a/src/util/codecvt_converter.cpp b/src/util/codecvt_converter.cpp index e33f902e..adab093a 100644 --- a/src/util/codecvt_converter.cpp +++ b/src/util/codecvt_converter.cpp @@ -260,7 +260,6 @@ namespace util { simple_encoding_table + sizeof(simple_encoding_table)/sizeof(char const *), norm.c_str(), compare_strings); - return 0; } #if BOOST_LOCALE_USE_AUTO_PTR diff --git a/src/util/gregorian.cpp b/src/util/gregorian.cpp index 59d48d5e..0f35baed 100644 --- a/src/util/gregorian.cpp +++ b/src/util/gregorian.cpp @@ -164,10 +164,10 @@ namespace util { /// /// Set specific \a value for period \a p, note not all values are settable. /// - void set_value(period::marks::period_mark p,int value) BOOST_OVERRIDE + void set_value(period::marks::period_mark m,int value) BOOST_OVERRIDE { using namespace period::marks; - switch(p) { + switch(m) { case era: ///< Era i.e. AC, BC in Gregorian and Julian calendar, range [0,1] return; case year: ///< Year, it is calendar specific @@ -214,7 +214,7 @@ namespace util { case week_of_month: ///< The week number withing current month { normalize(); - int current_week = get_value(p,current); + int current_week = get_value(m,current); int diff = 7 * (value - current_week); tm_updated_.tm_mday += diff; } @@ -300,10 +300,10 @@ namespace util { /// /// Get specific value for period \a p according to a value_type \a v /// - int get_value(period::marks::period_mark p,value_type v) const BOOST_OVERRIDE + int get_value(period::marks::period_mark m,value_type v) const BOOST_OVERRIDE { using namespace period::marks; - switch(p) { + switch(m) { case era: return 1; case year: @@ -606,13 +606,13 @@ BOOST_LOCALE_END_CONST_CONDITION /// Adjust period's \a p value by \a difference items using a update_type \a u. /// Note: not all values are adjustable /// - void adjust_value(period::marks::period_mark p,update_type u,int difference) BOOST_OVERRIDE + void adjust_value(period::marks::period_mark m,update_type u,int difference) BOOST_OVERRIDE { switch(u) { case move: { using namespace period::marks; - switch(p) { + switch(m) { case year: ///< Year, it is calendar specific case extended_year: ///< Extended year for Gregorian/Julian calendars, where 1 BC == 0, 2 BC == -1. tm_updated_.tm_year +=difference; @@ -653,16 +653,16 @@ BOOST_LOCALE_END_CONST_CONDITION break; case roll: { // roll - int cur_min = get_value(p,actual_minimum); - int cur_max = get_value(p,actual_maximum); + int cur_min = get_value(m,actual_minimum); + int cur_max = get_value(m,actual_maximum); int max_diff = cur_max - cur_min + 1; if(max_diff > 0) { - int value = get_value(p,current); + int value = get_value(m,current); int addon = 0; if(difference < 0) addon = ((-difference/max_diff) + 1) * max_diff; value = (value - cur_min + difference + addon) % max_diff + cur_min; - set_value(p,value); + set_value(m,value); normalize(); } } @@ -671,12 +671,12 @@ BOOST_LOCALE_END_CONST_CONDITION } } - int get_diff(period::marks::period_mark p,int diff,gregorian_calendar const *other) const + int get_diff(period::marks::period_mark m,int diff,gregorian_calendar const *other) const { if(diff == 0) return 0; hold_ptr self(clone()); - self->adjust_value(p,move,diff); + self->adjust_value(m,move,diff); if(diff > 0){ if(self->time_ > other->time_) return diff - 1; @@ -694,7 +694,7 @@ BOOST_LOCALE_END_CONST_CONDITION /// /// Calculate the difference between this calendar and \a other in \a p units /// - int difference(abstract_calendar const *other_cal,period::marks::period_mark p) const BOOST_OVERRIDE + int difference(abstract_calendar const *other_cal,period::marks::period_mark m) const BOOST_OVERRIDE { hold_ptr keeper; gregorian_calendar const *other = dynamic_cast(other_cal); @@ -707,7 +707,7 @@ BOOST_LOCALE_END_CONST_CONDITION int factor = 1; // for weeks vs days handling using namespace period::marks; - switch(p) { + switch(m) { case era: return 0; case year: diff --git a/src/win32/api.hpp b/src/win32/api.hpp index 4e11853a..ffec0a73 100644 --- a/src/win32/api.hpp +++ b/src/win32/api.hpp @@ -134,12 +134,14 @@ namespace impl_win { inf_group = true; } if(!inf_group) { +BOOST_LOCALE_START_CONST_CONDITION if(std::numeric_limits::is_signed) { res.grouping+=std::numeric_limits::min(); } else { res.grouping+=std::numeric_limits::max(); } +BOOST_LOCALE_END_CONST_CONDITION } return res; } diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 12f316f6..c0946a22 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -70,12 +70,12 @@ boost_locale_add_test(test_generator) # icu boost_locale_add_test(test_collate) boost_locale_add_test(test_convert) -if(WIN32) - boost_locale_add_test(test_boundary) - boost_locale_add_test(test_formatting) -else() +if(BOOST_LOCALE_ENABLE_ICU) boost_locale_add_test(test_boundary COMPILE_ONLY) boost_locale_add_test(test_formatting COMPILE_ONLY) +else() + boost_locale_add_test(test_boundary) + boost_locale_add_test(test_formatting) endif() boost_locale_add_test(test_icu_vs_os_timezone) # winapi diff --git a/test/test_boundary.cpp b/test/test_boundary.cpp index f0a2eb26..9a4a32fb 100644 --- a/test/test_boundary.cpp +++ b/test/test_boundary.cpp @@ -42,7 +42,7 @@ namespace lb = boost::locale::boundary; template void test_word_container(Iterator begin,Iterator end, - std::vector const &ipos, + std::vector const &ipos, std::vector const &imasks, std::vector > const &ichunks, std::locale l, @@ -57,7 +57,8 @@ void test_word_container(Iterator begin,Iterator end, + ((sm & 8 ) != 0) * 0xF000 + ((sm & 16) != 0) * 0xF0000; - std::vector masks,pos; + std::vector masks; + std::vector pos; std::vector bmasks; std::basic_string empty_chunk; @@ -119,7 +120,7 @@ void test_word_container(Iterator begin,Iterator end, } for(i=0,p=map.end();istr()==chunks[index]); TEST(p->rule() == unsigned(masks[index])); } @@ -155,7 +156,7 @@ void test_word_container(Iterator begin,Iterator end, for(i=0,p=map.end();istr()==fchunks[index]); TEST(p->rule() == unsigned(masks[index])); } @@ -338,7 +339,7 @@ void test_word_container(Iterator begin,Iterator end, template void run_word(std::string *original,int *none,int *num,int *word,int *kana,int *ideo,std::locale l,lb::boundary_type b=lb::word) { - std::vector pos; + std::vector pos; std::vector > chunks; std::vector masks; std::basic_string test_string; diff --git a/test/test_codecvt.cpp b/test/test_codecvt.cpp index 29c911f0..2cef6d13 100644 --- a/test/test_codecvt.cpp +++ b/test/test_codecvt.cpp @@ -15,6 +15,10 @@ #define BOOST_LOCALE_ERROR_LIMIT -1 #include "test_locale.hpp" +#if defined(BOOST_MSVC) && BOOST_MSVC < 1700 +#pragma warning(disable : 4428) // universal-character-name encountered in source +#endif + static char const *utf8_name = "\xf0\x9d\x92\x9e-\xD0\xBF\xD1\x80\xD0\xB8\xD0\xB2\xD0\xB5\xD1\x82-\xE3\x82\x84\xE3\x81\x82.txt"; static wchar_t const *wide_name = L"\U0001D49E-\u043F\u0440\u0438\u0432\u0435\u0442-\u3084\u3042.txt"; diff --git a/test/test_codepage.cpp b/test/test_codepage.cpp index cf0e59ec..7d5159e4 100644 --- a/test/test_codepage.cpp +++ b/test/test_codepage.cpp @@ -281,6 +281,10 @@ struct utfutf { return buf; } }; +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable: 4309) // narrowing static_cast warning +#endif template<> struct utfutf { static wchar_t const *ok(){ return L"\x67\x72\xfc\xdf\x65\x6e"; } @@ -290,7 +294,9 @@ struct utfutf { return buf; } }; - +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif template void test_combinations() diff --git a/test/test_convert.cpp b/test/test_convert.cpp index 03d6c1dd..6b2c4578 100644 --- a/test/test_convert.cpp +++ b/test/test_convert.cpp @@ -51,7 +51,8 @@ void test_norm(std::string orig,std::string normal,boost::locale::norm_type type TEST(boost::locale::how(source_s)==dest_s); \ TEST(boost::locale::how(source_s.c_str())==dest_s); \ TEST(boost::locale::how(source_s.c_str(),source_s.c_str()+source_s.size())==dest_s); \ - }while(0) + BOOST_LOCALE_START_CONST_CONDITION \ + }while(0) BOOST_LOCALE_END_CONST_CONDITION #define TEST_ALL_CASES \ do { \ @@ -65,7 +66,8 @@ void test_norm(std::string orig,std::string normal,boost::locale::norm_type type eight_bit=false; \ TEST_V(to_upper,"i","İ"); \ TEST_V(to_lower,"İ","i"); \ - }while(0) + BOOST_LOCALE_START_CONST_CONDITION \ + }while(0) BOOST_LOCALE_END_CONST_CONDITION void test_main(int /*argc*/, char** /*argv*/) @@ -93,7 +95,8 @@ void test_main(int /*argc*/, char** /*argv*/) TEST_A(char,how,to(source_s),to(dest_s)); \ std::locale::global(tmp); \ } \ - }while(0) + BOOST_LOCALE_START_CONST_CONDITION \ + }while(0) BOOST_LOCALE_END_CONST_CONDITION TEST_ALL_CASES; #undef TEST_V diff --git a/test/test_date_time.cpp b/test/test_date_time.cpp index 968fd556..89632c0e 100644 --- a/test/test_date_time.cpp +++ b/test/test_date_time.cpp @@ -24,17 +24,14 @@ # pragma warning(disable : 4244) // loose data #endif -#define RESET() do { time_point = base_time_point; ss.str(""); } while(0) -#define TESTR(X) do { TEST(X); RESET(); } while(0) -//#define TESTEQSR(t,X) do { ss << (t); TESTR(ss.str() == X); } while(0) -#define TESTEQSR(t,X) \ - do { \ - ss << (t); \ - if(ss.str()!=X) { \ - std::cerr << "[" << ss.str() << "]!=[" << X << "]\n"; \ - } \ - TESTR(ss.str() == X); \ - } while(0) +#define RESET() time_point = base_time_point; ss.str("") +#define TESTR(X) TEST(X); RESET() +#define TESTEQSR(t,X) \ + ss << (t); \ + if(ss.str()!=X) { \ + std::cerr << "[" << ss.str() << "]!=[" << X << "]\n"; \ + } \ + TESTR(ss.str() == X) void test_main(int /*argc*/, char** /*argv*/) { @@ -142,8 +139,6 @@ void test_main(int /*argc*/, char** /*argv*/) TEST((time_point >> month()) / month()== 0); TEST(time_point / month()== 1); - - TEST( (time_point + 2 * hour() - time_point) / minute() == 120); TEST( (time_point + month()- time_point) / day() == 28); TEST( (time_point + 2* month()- (time_point+month())) / day() == 31); @@ -199,52 +194,54 @@ void test_main(int /*argc*/, char** /*argv*/) time_point += day() * 1; TEST(time_point.get(week_of_year()) == 2); TEST(time_point.get(week_of_month()) == 2); - time_point = february() + day() * 2; + time_point = february() + day() * 2; TEST(time_point.get(week_of_year()) == 6); - if(backend_name!="icu" || BOOST_ICU_VER<408 || BOOST_ICU_VER > 6000) { - TEST(time_point.get(week_of_month()) == 1); - } - else { - // cldr changes + // cldr changes +#if BOOST_ICU_VER >= 408 && BOOST_ICU_VER <= 6000 + const bool ICU_cldr_issue = backend_name == "icu"; +#else + const bool ICU_cldr_issue = false; +#endif +BOOST_LOCALE_START_CONST_CONDITION + + if((ICU_cldr_issue)) TEST(time_point.get(week_of_month()) == 2); - } + else + TEST(time_point.get(week_of_month()) == 1); time_point = year(2010) + january() + day() * 3; - if(backend_name!="icu" || BOOST_ICU_VER<408 || BOOST_ICU_VER > 6000) { - TEST(time_point.get(week_of_year()) == 53); - } - else { + if((ICU_cldr_issue)) TEST(time_point.get(week_of_year()) == 1); - } + else + TEST(time_point.get(week_of_year()) == 53); time_point = year()*2010 + january() + day() * 4; - if(backend_name!="icu" || BOOST_ICU_VER<408 || BOOST_ICU_VER > 6000) { - TEST(time_point.get(week_of_year()) == 1); - } - else { + if((ICU_cldr_issue)) TEST(time_point.get(week_of_year()) == 2); - } + else + TEST(time_point.get(week_of_year()) == 1); + time_point = year()*2010 + january() + day() * 10; - if(backend_name!="icu" || BOOST_ICU_VER<408 || BOOST_ICU_VER > 6000) { - TEST(time_point.get(week_of_year()) == 1); - } - else { + if((ICU_cldr_issue)) TEST(time_point.get(week_of_year()) == 2); - } + else + TEST(time_point.get(week_of_year()) == 1); time_point = year()*2010 + january() + day() * 11; - if(backend_name!="icu" || BOOST_ICU_VER<408 || BOOST_ICU_VER > 6000) { - TEST(time_point.get(week_of_year()) == 2); - } - else { + + if((ICU_cldr_issue)) TEST(time_point.get(week_of_year()) == 3); - } + else + TEST(time_point.get(week_of_year()) == 2); + +BOOST_LOCALE_END_CONST_CONDITION + RESET(); TEST(time_point.get(hour()) == 15); TEST(date_time(a_datetime,calendar("GMT+01:00")).get(hour()) ==16); @@ -252,7 +249,7 @@ void test_main(int /*argc*/, char** /*argv*/) TEST(time_point.get(am_pm()) == 1); TEST(time_point.get(minute()) == 33); TEST(time_point.get(second()) == 13); - TEST(date_time(year()* 1984 + february() + day()).get(week_of_year())==5); + TEST(date_time(year() * 1984 + february() + day()).get(week_of_year())==5); TEST(time_point.get(week_of_month()) == 1); RESET(); diff --git a/test/test_formatting.cpp b/test/test_formatting.cpp index 05841098..44707120 100644 --- a/test/test_formatting.cpp +++ b/test/test_formatting.cpp @@ -50,7 +50,7 @@ void print_diff(std::string const &l,std::string const &r,int line) } } -#define TESTEQ(x,y) do { print_diff((x),(y),__LINE__); TEST((x)==(y)); } while(0) +#define TESTEQ(x,y) print_diff((x),(y),__LINE__); TEST((x)==(y)) #else #define TESTEQ(x,y) TEST((x)==(y)) #endif @@ -61,7 +61,8 @@ do{ \ ss.imbue(loc); \ ss << manip << value; \ TESTEQ(ss.str(),to_correct_string(expected,loc)); \ -}while(0) +BOOST_LOCALE_START_CONST_CONDITION \ +}while(0) BOOST_LOCALE_END_CONST_CONDITION #ifndef _LIBCPP_VERSION static bool parsing_fails() @@ -117,7 +118,8 @@ do{ \ ss >> manip; \ TEST_THROWS(ss >> v,std::ios_base::failure); \ } \ -}while(0) +BOOST_LOCALE_START_CONST_CONDITION \ +}while(0) BOOST_LOCALE_END_CONST_CONDITION #define TEST_PAR(manip,type,actual,expected) \ do{ \ @@ -135,31 +137,36 @@ do{ \ ss >> manip >> v >> std::skipws >> tmp_c; \ TESTEQ(v,expected); \ TEST(tmp_c=='@'); } \ -}while(0) +BOOST_LOCALE_START_CONST_CONDITION \ +}while(0) BOOST_LOCALE_END_CONST_CONDITION #define TEST_FP1(manip,value_in,str,type,value_out) \ do { \ TEST_FMT(manip,value_in,str); \ TEST_PAR(manip,type,str,value_out); \ -}while(0) +BOOST_LOCALE_START_CONST_CONDITION \ +}while(0) BOOST_LOCALE_END_CONST_CONDITION #define TEST_FP2(m1,m2,value_in,str,type,value_out) \ do { \ TEST_FMT(m1 << m2,value_in,str); \ TEST_PAR(m1>>m2,type,str,value_out); \ -}while(0) +BOOST_LOCALE_START_CONST_CONDITION \ +}while(0) BOOST_LOCALE_END_CONST_CONDITION #define TEST_FP3(m1,m2,m3,value_in,str,type,value_out) \ do { \ TEST_FMT(m1 << m2 << m3,value_in,str); \ TEST_PAR(m1>>m2>>m3,type,str,value_out); \ -}while(0) +BOOST_LOCALE_START_CONST_CONDITION \ +}while(0) BOOST_LOCALE_END_CONST_CONDITION #define TEST_FP4(m1,m2,m3,m4,value_in,str,type,value_out) \ do { \ TEST_FMT(m1 << m2 << m3 << m4,value_in,str); \ TEST_PAR(m1>>m2>>m3>>m4,type,str,value_out); \ -}while(0) +BOOST_LOCALE_START_CONST_CONDITION \ +}while(0) BOOST_LOCALE_END_CONST_CONDITION #define FORMAT(f,v,exp) \ @@ -174,26 +181,30 @@ do { \ /*ss << boost::locale::basic_format(fmt) % v; */ \ TESTEQ(ss.str(),to_correct_string(exp,loc)); \ TESTEQ( (boost::locale::basic_format(fmt) % v).str(loc),to_correct_string(exp,loc)); \ - } while(0) + BOOST_LOCALE_START_CONST_CONDITION \ + }while(0) BOOST_LOCALE_END_CONST_CONDITION #define TEST_MIN_MAX_FMT(type,minval,maxval) \ do { \ TEST_FMT(as::number,std::numeric_limits::min(),minval); \ TEST_FMT(as::number,std::numeric_limits::max(),maxval); \ - }while(0) + BOOST_LOCALE_START_CONST_CONDITION \ + }while(0) BOOST_LOCALE_END_CONST_CONDITION #define TEST_MIN_MAX_PAR(type,minval,maxval) \ do {\ TEST_PAR(as::number,type,minval,std::numeric_limits::min()); \ TEST_PAR(as::number,type,maxval,std::numeric_limits::max()); \ - }while(0) + BOOST_LOCALE_START_CONST_CONDITION \ + }while(0) BOOST_LOCALE_END_CONST_CONDITION #define TEST_MIN_MAX(type,minval,maxval) \ do { \ TEST_MIN_MAX_FMT(type,minval,maxval); \ TEST_MIN_MAX_PAR(type,minval,maxval); \ - }while(0) + BOOST_LOCALE_START_CONST_CONDITION \ + }while(0) BOOST_LOCALE_END_CONST_CONDITION #define BOOST_ICU_VER (U_ICU_VERSION_MAJOR_NUM*100 + U_ICU_VERSION_MINOR_NUM) @@ -226,6 +237,7 @@ void test_manip(std::string e_charset="UTF-8") TEST_FMT(as::number << std::left << std::setfill(CharType('_')) << std::setw(6),1534,"1,534_"); // Ranges +BOOST_LOCALE_START_CONST_CONDITION if(sizeof(short) == 2) { TEST_MIN_MAX(short,"-32,768","32,767"); TEST_MIN_MAX(unsigned short,"0","65,535"); @@ -261,6 +273,7 @@ void test_manip(std::string e_charset="UTF-8") TEST_NOPAR(as::number,"-1",unsigned long long); } #endif +BOOST_LOCALE_END_CONST_CONDITION @@ -466,10 +479,11 @@ void test_format(std::string charset="UTF-8") FORMAT("{1,cur}",1234,"$1,234.00"); FORMAT("{1,currency}",1234,"$1,234.00"); if(charset=="UTF-8") { - if(U_ICU_VERSION_MAJOR_NUM >=4) +#if BOOST_ICU_VER >= 400 FORMAT("{1,cur,locale=de_DE}",10,"10,00\xC2\xA0€"); - else +#else FORMAT("{1,cur,locale=de_DE}",10,"10,00 €"); +#endif } #if BOOST_ICU_VER >= 402 FORMAT("{1,cur=nat}",1234,"$1,234.00"); diff --git a/test/test_locale.hpp b/test/test_locale.hpp index 23a64c98..2dee31d3 100644 --- a/test/test_locale.hpp +++ b/test/test_locale.hpp @@ -25,27 +25,27 @@ int test_counter=0; #define THROW_IF_TOO_BIG(X) \ -do { \ if((X) > BOOST_LOCALE_ERROR_LIMIT) \ - throw std::runtime_error("Error limits reached, stopping unit test"); \ -}while(0) + throw std::runtime_error("Error limits reached, stopping unit test") -#define TEST(X) \ - do { \ - test_counter++; \ - if(X) break; \ +#define TEST(X) \ + do { \ + test_counter++; \ + if(X) break; \ std::cerr << "Error in line:" << __LINE__ << " "#X << std::endl; \ - THROW_IF_TOO_BIG(error_counter++); \ - }while(0) + THROW_IF_TOO_BIG(error_counter++); \ + BOOST_LOCALE_START_CONST_CONDITION \ + }while(0) BOOST_LOCALE_END_CONST_CONDITION #endif -#define TEST_THROWS(X,E) \ - do { \ - test_counter++; \ - try { X; } catch(E const &/*e*/ ) {break;} catch(...){} \ +#define TEST_THROWS(X,E) \ + do { \ + test_counter++; \ + try { X; } catch(E const &/*e*/ ) {break;} catch(...){} \ std::cerr << "Error in line:" << __LINE__ << " "#X << std::endl; \ - THROW_IF_TOO_BIG(error_counter++); \ - }while(0) + THROW_IF_TOO_BIG(error_counter++); \ + BOOST_LOCALE_START_CONST_CONDITION \ + }while(0) BOOST_LOCALE_END_CONST_CONDITION void test_main(int argc, char **argv); @@ -64,7 +64,7 @@ int main(int argc,char **argv) { } std::cout << " " << std::fixed << std::setprecision(1) << std::setw(5) << 100.0 * passed / test_counter << - "% of tests completed sucsessefully\n"; + "% of tests completed successfully\n"; return error_counter == 0 ? EXIT_SUCCESS : EXIT_FAILURE ; } diff --git a/test/test_locale_tools.hpp b/test/test_locale_tools.hpp index 2ee7f8b3..9334a1c1 100644 --- a/test/test_locale_tools.hpp +++ b/test/test_locale_tools.hpp @@ -16,6 +16,10 @@ #include "test_posix_tools.hpp" #endif +#if defined(BOOST_MSVC) && BOOST_MSVC < 1700 +#pragma warning(disable : 4428) // universal-character-name encountered in source +#endif + template std::basic_string to_correct_string(std::string const &e,std::locale /*l*/) { From f1c9130c6ff73925609edbc59a283967cb08b3be Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Thu, 30 Jun 2022 20:36:04 +0200 Subject: [PATCH 69/90] CI: Add ICU to Windows builds --- .github/workflows/ci.yml | 17 +++++++++++++ src/shared/mo_lambda.hpp | 2 +- tools/download_icu.cmake | 52 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 tools/download_icu.cmake diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 59185e3d..7ff5d608 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -273,6 +273,13 @@ jobs: - name: Setup Boost run: ci\github\install.bat + - name: Get ICU + shell: bash + run: | + ICU_ROOT=$PWD/ICU + cmake -DICU_ROOT="$ICU_ROOT" -DICU_VERSION=71.1 -P tools/download_icu.cmake + echo "path-constant ICU_PATH : $ICU_ROOT ;" >> $BOOST_ROOT/project-config.jam + - name: Run tests if: '!matrix.coverage' run: ci\build.bat @@ -386,6 +393,16 @@ jobs: env: {B2_DONT_BOOTSTRAP: 1} run: source ci/github/install.sh + - name: Get ICU + if: runner.os == 'Windows' + shell: pwsh + run: | + $ICU_ROOT="$($pwd.Path)\ICU" + cmake -DICU_ROOT="$ICU_ROOT" -DICU_VERSION="71.1" -P tools/download_icu.cmake + echo "ICU_ROOT=$ICU_ROOT" | Out-File -FilePath $Env:GITHUB_ENV -Append + # Make sure shared libs can be found at runtime + echo "$ICU_ROOT\bin64" | Out-File -FilePath $Env:GITHUB_PATH -Append + - name: Run CMake tests run: | cd "$BOOST_ROOT" diff --git a/src/shared/mo_lambda.hpp b/src/shared/mo_lambda.hpp index c29c2365..f252d746 100644 --- a/src/shared/mo_lambda.hpp +++ b/src/shared/mo_lambda.hpp @@ -8,7 +8,7 @@ #ifndef BOOST_SRC_LOCALE_MO_LAMBDA_HPP_INCLUDED #define BOOST_SRC_LOCALE_MO_LAMBDA_HPP_INCLUDED -#include +#include #include namespace boost { diff --git a/tools/download_icu.cmake b/tools/download_icu.cmake new file mode 100644 index 00000000..9eaac442 --- /dev/null +++ b/tools/download_icu.cmake @@ -0,0 +1,52 @@ +cmake_minimum_required(VERSION 3.2) + +if(NOT ICU_VERSION) + message(FATAL_ERROR "ICU_VERSION not set") +endif() +if(NOT ICU_ROOT) + if(DEFINED ENV{ICU_ROOT}}) + set(ICU_ROOT $ENV{ICU_ROOT}) + else() + message(FATAL_ERROR "ICU_ROOT not set") + endif() +endif() + +string(REPLACE "." "-" ICU_VERSION_dash ${ICU_VERSION}) +string(REPLACE "." "_" ICU_VERSION_under ${ICU_VERSION}) +set(ICU_DOWNLOAD_BASE "https://github.com/unicode-org/icu/releases/download") +set(ICU_C_DOWNLOAD_BASE "${ICU_DOWNLOAD_BASE}/release-${ICU_VERSION_dash}/icu4c-${ICU_VERSION_under}") + +set(ICU_URLS "") +if(WIN32) + list(APPEND ICU_URLS "${ICU_C_DOWNLOAD_BASE}-Win32-MSVC2019.zip") + list(APPEND ICU_URLS "${ICU_C_DOWNLOAD_BASE}-Win64-MSVC2019.zip") +else() + message(FATAL_ERROR "Support for this OS not implemented") +endif() + +foreach(url IN LISTS ICU_URLS) + file(TO_NATIVE_PATH "${ICU_ROOT}/icu.zip" archive) + message(STATUS "Downloading ${url}") + file(DOWNLOAD "${url}" "${archive}" SHOW_PROGRESS STATUS DOWNLOAD_STATUS) + list(GET DOWNLOAD_STATUS 0 STATUS_CODE) + list(GET DOWNLOAD_STATUS 1 ERROR_MESSAGE) + if(STATUS_CODE EQUAL 0) + message(STATUS "Download completed successfully!") + else() + message(FATAL_ERROR "Error occurred during download: ${ERROR_MESSAGE}") + endif() + message(STATUS "Extracting ${archive} to ${ICU_ROOT}") + if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.18) + file(ARCHIVE_EXTRACT INPUT "${archive}" DESTINATION "${ICU_ROOT}" VERBOSE) + else() + execute_process( + COMMAND ${CMAKE_COMMAND} -E tar xvf "${archive}" + WORKING_DIRECTORY "${ICU_ROOT}" + RESULT_VARIABLE STATUS + ) + if(STATUS AND NOT STATUS EQUAL 0) + message(FATAL_ERROR "Extraction failed: ${STATUS}") + endif() + endif() + file(REMOVE "${archive}") +endforeach() From 41868c62a0519799696b544518f1efd831ff71c2 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Sat, 2 Jul 2022 15:29:37 +0200 Subject: [PATCH 70/90] Support systems without implicit include path To support e.g. recent Cygwins where relative paths to the current file are not automatically resolved move the sources into a `boost/locale` subfolder and add `src` to the private include paths. This then allows to include those files as `"boost/locale/foo/bar.hpp"`. --- CMakeLists.txt | 132 +++++++++--------- build/Jamfile.v2 | 19 +-- src/{ => boost/locale}/encoding/codepage.cpp | 8 +- src/{ => boost/locale}/encoding/conv.hpp | 0 .../locale}/encoding/iconv_codepage.ipp | 4 +- .../locale}/encoding/uconv_codepage.ipp | 6 +- .../locale}/encoding/wconv_codepage.ipp | 2 +- src/{ => boost/locale}/icu/all_generator.hpp | 0 src/{ => boost/locale}/icu/boundary.cpp | 8 +- src/{ => boost/locale}/icu/cdata.hpp | 0 src/{ => boost/locale}/icu/codecvt.cpp | 14 +- src/{ => boost/locale}/icu/codecvt.hpp | 0 src/{ => boost/locale}/icu/collator.cpp | 8 +- src/{ => boost/locale}/icu/conversion.cpp | 10 +- src/{ => boost/locale}/icu/date_time.cpp | 8 +- src/{ => boost/locale}/icu/formatter.cpp | 8 +- src/{ => boost/locale}/icu/formatter.hpp | 0 src/{ => boost/locale}/icu/icu_backend.cpp | 8 +- src/{ => boost/locale}/icu/icu_backend.hpp | 0 src/{ => boost/locale}/icu/icu_util.hpp | 0 src/{ => boost/locale}/icu/numeric.cpp | 16 +-- .../locale}/icu/predefined_formatters.hpp | 0 src/{ => boost/locale}/icu/time_zone.cpp | 4 +- src/{ => boost/locale}/icu/time_zone.hpp | 0 src/{ => boost/locale}/icu/uconv.hpp | 14 +- .../locale}/posix/all_generator.hpp | 0 src/{ => boost/locale}/posix/codecvt.cpp | 8 +- src/{ => boost/locale}/posix/codecvt.hpp | 0 src/{ => boost/locale}/posix/collate.cpp | 4 +- src/{ => boost/locale}/posix/converter.cpp | 2 +- src/{ => boost/locale}/posix/numeric.cpp | 4 +- .../locale}/posix/posix_backend.cpp | 8 +- .../locale}/posix/posix_backend.hpp | 0 src/{ => boost/locale}/shared/date_time.cpp | 0 src/{ => boost/locale}/shared/format.cpp | 0 src/{ => boost/locale}/shared/formatting.cpp | 2 +- src/{ => boost/locale}/shared/generator.cpp | 0 src/{ => boost/locale}/shared/ids.cpp | 0 src/{ => boost/locale}/shared/ios_prop.hpp | 3 - .../locale}/shared/localization_backend.cpp | 8 +- src/{ => boost/locale}/shared/message.cpp | 4 +- src/{ => boost/locale}/shared/mo_hash.hpp | 0 src/{ => boost/locale}/shared/mo_lambda.cpp | 2 +- src/{ => boost/locale}/shared/mo_lambda.hpp | 0 src/{ => boost/locale}/std/all_generator.hpp | 0 src/{ => boost/locale}/std/codecvt.cpp | 2 +- src/{ => boost/locale}/std/collate.cpp | 4 +- src/{ => boost/locale}/std/converter.cpp | 2 +- src/{ => boost/locale}/std/numeric.cpp | 4 +- src/{ => boost/locale}/std/std_backend.cpp | 12 +- src/{ => boost/locale}/std/std_backend.hpp | 0 .../locale}/util/codecvt_converter.cpp | 2 +- .../locale}/util/default_locale.cpp | 0 src/{ => boost/locale}/util/gregorian.cpp | 5 +- src/{ => boost/locale}/util/gregorian.hpp | 0 src/{ => boost/locale}/util/iconv.hpp | 0 src/{ => boost/locale}/util/info.cpp | 2 +- src/{ => boost/locale}/util/locale_data.cpp | 4 +- src/{ => boost/locale}/util/locale_data.hpp | 0 src/{ => boost/locale}/util/numeric.hpp | 2 +- src/{ => boost/locale}/util/timezone.hpp | 0 .../locale}/win32/all_generator.hpp | 0 src/{ => boost/locale}/win32/api.hpp | 2 +- src/{ => boost/locale}/win32/collate.cpp | 4 +- src/{ => boost/locale}/win32/converter.cpp | 4 +- src/{ => boost/locale}/win32/lcid.cpp | 4 +- src/{ => boost/locale}/win32/lcid.hpp | 0 src/{ => boost/locale}/win32/numeric.cpp | 6 +- src/{ => boost/locale}/win32/win_backend.cpp | 10 +- src/{ => boost/locale}/win32/win_backend.hpp | 0 test/test_codepage_converter.cpp | 4 +- test/test_ios_prop.cpp | 2 +- test/test_winapi_formatting.cpp | 2 +- 73 files changed, 194 insertions(+), 197 deletions(-) rename src/{ => boost/locale}/encoding/codepage.cpp (97%) rename src/{ => boost/locale}/encoding/conv.hpp (100%) rename src/{ => boost/locale}/encoding/iconv_codepage.ipp (98%) rename src/{ => boost/locale}/encoding/uconv_codepage.ipp (97%) rename src/{ => boost/locale}/encoding/wconv_codepage.ipp (99%) rename src/{ => boost/locale}/icu/all_generator.hpp (100%) rename src/{ => boost/locale}/icu/boundary.cpp (97%) rename src/{ => boost/locale}/icu/cdata.hpp (100%) rename src/{ => boost/locale}/icu/codecvt.cpp (95%) rename src/{ => boost/locale}/icu/codecvt.hpp (100%) rename src/{ => boost/locale}/icu/collator.cpp (97%) rename src/{ => boost/locale}/icu/conversion.cpp (98%) rename src/{ => boost/locale}/icu/date_time.cpp (98%) rename src/{ => boost/locale}/icu/formatter.cpp (99%) rename src/{ => boost/locale}/icu/formatter.hpp (100%) rename src/{ => boost/locale}/icu/icu_backend.cpp (96%) rename src/{ => boost/locale}/icu/icu_backend.hpp (100%) rename src/{ => boost/locale}/icu/icu_util.hpp (100%) rename src/{ => boost/locale}/icu/numeric.cpp (98%) rename src/{ => boost/locale}/icu/predefined_formatters.hpp (100%) rename src/{ => boost/locale}/icu/time_zone.cpp (99%) rename src/{ => boost/locale}/icu/time_zone.hpp (100%) rename src/{ => boost/locale}/icu/uconv.hpp (99%) rename src/{ => boost/locale}/posix/all_generator.hpp (100%) rename src/{ => boost/locale}/posix/codecvt.cpp (97%) rename src/{ => boost/locale}/posix/codecvt.hpp (100%) rename src/{ => boost/locale}/posix/collate.cpp (97%) rename src/{ => boost/locale}/posix/converter.cpp (98%) rename src/{ => boost/locale}/posix/numeric.cpp (99%) rename src/{ => boost/locale}/posix/posix_backend.cpp (96%) rename src/{ => boost/locale}/posix/posix_backend.hpp (100%) rename src/{ => boost/locale}/shared/date_time.cpp (100%) rename src/{ => boost/locale}/shared/format.cpp (100%) rename src/{ => boost/locale}/shared/formatting.cpp (99%) rename src/{ => boost/locale}/shared/generator.cpp (100%) rename src/{ => boost/locale}/shared/ids.cpp (100%) rename src/{ => boost/locale}/shared/ios_prop.hpp (99%) rename src/{ => boost/locale}/shared/localization_backend.cpp (98%) rename src/{ => boost/locale}/shared/message.cpp (99%) rename src/{ => boost/locale}/shared/mo_hash.hpp (100%) rename src/{ => boost/locale}/shared/mo_lambda.cpp (99%) rename src/{ => boost/locale}/shared/mo_lambda.hpp (100%) rename src/{ => boost/locale}/std/all_generator.hpp (100%) rename src/{ => boost/locale}/std/codecvt.cpp (97%) rename src/{ => boost/locale}/std/collate.cpp (98%) rename src/{ => boost/locale}/std/converter.cpp (99%) rename src/{ => boost/locale}/std/numeric.cpp (99%) rename src/{ => boost/locale}/std/std_backend.cpp (96%) rename src/{ => boost/locale}/std/std_backend.hpp (100%) rename src/{ => boost/locale}/util/codecvt_converter.cpp (99%) rename src/{ => boost/locale}/util/default_locale.cpp (100%) rename src/{ => boost/locale}/util/gregorian.cpp (99%) rename src/{ => boost/locale}/util/gregorian.hpp (100%) rename src/{ => boost/locale}/util/iconv.hpp (100%) rename src/{ => boost/locale}/util/info.cpp (97%) rename src/{ => boost/locale}/util/locale_data.cpp (97%) rename src/{ => boost/locale}/util/locale_data.hpp (100%) rename src/{ => boost/locale}/util/numeric.hpp (99%) rename src/{ => boost/locale}/util/timezone.hpp (100%) rename src/{ => boost/locale}/win32/all_generator.hpp (100%) rename src/{ => boost/locale}/win32/api.hpp (99%) rename src/{ => boost/locale}/win32/collate.cpp (98%) rename src/{ => boost/locale}/win32/converter.cpp (97%) rename src/{ => boost/locale}/win32/lcid.cpp (97%) rename src/{ => boost/locale}/win32/lcid.hpp (100%) rename src/{ => boost/locale}/win32/numeric.cpp (98%) rename src/{ => boost/locale}/win32/win_backend.cpp (95%) rename src/{ => boost/locale}/win32/win_backend.hpp (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index d62bf857..2b78282b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,32 +10,32 @@ project(boost_locale VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX) file(GLOB_RECURSE headers include/*.hpp) add_library(boost_locale - src/encoding/codepage.cpp - src/encoding/conv.hpp - src/encoding/iconv_codepage.ipp - src/encoding/uconv_codepage.ipp - src/encoding/wconv_codepage.ipp - src/shared/date_time.cpp - src/shared/format.cpp - src/shared/formatting.cpp - src/shared/generator.cpp - src/shared/ids.cpp - src/shared/localization_backend.cpp - src/shared/message.cpp - src/shared/mo_lambda.cpp - src/util/codecvt_converter.cpp - src/util/default_locale.cpp - src/util/info.cpp - src/util/locale_data.cpp - src/util/locale_data.hpp - src/util/numeric.hpp - src/util/timezone.hpp + src/boost/locale/encoding/codepage.cpp + src/boost/locale/encoding/conv.hpp + src/boost/locale/encoding/iconv_codepage.ipp + src/boost/locale/encoding/uconv_codepage.ipp + src/boost/locale/encoding/wconv_codepage.ipp + src/boost/locale/shared/date_time.cpp + src/boost/locale/shared/format.cpp + src/boost/locale/shared/formatting.cpp + src/boost/locale/shared/generator.cpp + src/boost/locale/shared/ids.cpp + src/boost/locale/shared/localization_backend.cpp + src/boost/locale/shared/message.cpp + src/boost/locale/shared/mo_lambda.cpp + src/boost/locale/util/codecvt_converter.cpp + src/boost/locale/util/default_locale.cpp + src/boost/locale/util/info.cpp + src/boost/locale/util/locale_data.cpp + src/boost/locale/util/locale_data.hpp + src/boost/locale/util/numeric.hpp + src/boost/locale/util/timezone.hpp ${headers} ) add_library(Boost::locale ALIAS boost_locale) -target_include_directories(boost_locale PUBLIC include) +target_include_directories(boost_locale PUBLIC include PRIVATE src) target_link_libraries(boost_locale PUBLIC @@ -90,7 +90,7 @@ if(BOOST_LOCALE_ENABLE_ICONV) target_link_libraries(boost_locale PRIVATE Iconv::Iconv) target_sources(boost_locale PRIVATE - src/util/iconv.hpp + src/boost/locale/util/iconv.hpp ) endif() @@ -102,24 +102,24 @@ if(BOOST_LOCALE_ENABLE_ICU) target_link_libraries(boost_locale PRIVATE ICU::data ICU::i18n ICU::uc) target_sources(boost_locale PRIVATE - src/icu/all_generator.hpp - src/icu/boundary.cpp - src/icu/cdata.hpp - src/icu/codecvt.cpp - src/icu/codecvt.hpp - src/icu/collator.cpp - src/icu/conversion.cpp - src/icu/date_time.cpp - src/icu/formatter.cpp - src/icu/formatter.hpp - src/icu/icu_backend.cpp - src/icu/icu_backend.hpp - src/icu/icu_util.hpp - src/icu/numeric.cpp - src/icu/predefined_formatters.hpp - src/icu/time_zone.cpp - src/icu/time_zone.hpp - src/icu/uconv.hpp + src/boost/locale/icu/all_generator.hpp + src/boost/locale/icu/boundary.cpp + src/boost/locale/icu/cdata.hpp + src/boost/locale/icu/codecvt.cpp + src/boost/locale/icu/codecvt.hpp + src/boost/locale/icu/collator.cpp + src/boost/locale/icu/conversion.cpp + src/boost/locale/icu/date_time.cpp + src/boost/locale/icu/formatter.cpp + src/boost/locale/icu/formatter.hpp + src/boost/locale/icu/icu_backend.cpp + src/boost/locale/icu/icu_backend.hpp + src/boost/locale/icu/icu_util.hpp + src/boost/locale/icu/numeric.cpp + src/boost/locale/icu/predefined_formatters.hpp + src/boost/locale/icu/time_zone.cpp + src/boost/locale/icu/time_zone.hpp + src/boost/locale/icu/uconv.hpp ) endif() @@ -127,13 +127,13 @@ endif() if(BOOST_LOCALE_ENABLE_STD) target_sources(boost_locale PRIVATE - src/std/all_generator.hpp - src/std/codecvt.cpp - src/std/collate.cpp - src/std/converter.cpp - src/std/numeric.cpp - src/std/std_backend.cpp - src/std/std_backend.hpp + src/boost/locale/std/all_generator.hpp + src/boost/locale/std/codecvt.cpp + src/boost/locale/std/collate.cpp + src/boost/locale/std/converter.cpp + src/boost/locale/std/numeric.cpp + src/boost/locale/std/std_backend.cpp + src/boost/locale/std/std_backend.hpp ) else() @@ -145,13 +145,13 @@ endif() if(BOOST_LOCALE_ENABLE_WINAPI) target_sources(boost_locale PRIVATE - src/win32/all_generator.hpp - src/win32/api.hpp - src/win32/collate.cpp - src/win32/converter.cpp - src/win32/numeric.cpp - src/win32/win_backend.cpp - src/win32/win_backend.hpp + src/boost/locale/win32/all_generator.hpp + src/boost/locale/win32/api.hpp + src/boost/locale/win32/collate.cpp + src/boost/locale/win32/converter.cpp + src/boost/locale/win32/numeric.cpp + src/boost/locale/win32/win_backend.cpp + src/boost/locale/win32/win_backend.hpp ) else() @@ -163,8 +163,8 @@ endif() if(BOOST_LOCALE_ENABLE_WINAPI OR (BOOST_LOCALE_ENABLE_STD AND WIN32)) target_sources(boost_locale PRIVATE - src/win32/lcid.cpp - src/win32/lcid.hpp + src/boost/locale/win32/lcid.cpp + src/boost/locale/win32/lcid.hpp ) endif() @@ -172,14 +172,14 @@ endif() if(BOOST_LOCALE_ENABLE_POSIX) target_sources(boost_locale PRIVATE - src/posix/all_generator.hpp - src/posix/codecvt.cpp - src/posix/codecvt.hpp - src/posix/collate.cpp - src/posix/converter.cpp - src/posix/numeric.cpp - src/posix/posix_backend.cpp - src/posix/posix_backend.hpp + src/boost/locale/posix/all_generator.hpp + src/boost/locale/posix/codecvt.cpp + src/boost/locale/posix/codecvt.hpp + src/boost/locale/posix/collate.cpp + src/boost/locale/posix/converter.cpp + src/boost/locale/posix/numeric.cpp + src/boost/locale/posix/posix_backend.cpp + src/boost/locale/posix/posix_backend.hpp ) else() @@ -191,8 +191,8 @@ endif() if(BOOST_LOCALE_ENABLE_WINAPI OR BOOST_LOCALE_ENABLE_STD OR BOOST_LOCALE_ENABLE_POSIX) target_sources(boost_locale PRIVATE - src/util/gregorian.cpp - src/util/gregorian.hpp + src/boost/locale/util/gregorian.cpp + src/boost/locale/util/gregorian.hpp ) endif() diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 47b5c336..658c8418 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -8,8 +8,10 @@ import os ; import toolset ; import feature ; +path-constant TOP : .. ; + project /boost/locale - : source-location ../src + : source-location $(TOP)/src/boost/locale ; # Features @@ -24,7 +26,7 @@ feature.feature boost.locale.winapi : on off : optional propagated ; ## iconv -obj has_iconv_libc_obj : ../build/has_iconv.cpp ; +obj has_iconv_libc_obj : $(TOP)/build/has_iconv.cpp ; exe has_iconv : has_iconv_libc_obj ; explicit has_iconv ; @@ -39,11 +41,11 @@ lib iconv explicit iconv ; -obj has_iconv_libc_ext : ../build/has_iconv.cpp iconv ; +obj has_iconv_libc_ext : $(TOP)/build/has_iconv.cpp iconv ; exe has_external_iconv : has_iconv_libc_ext iconv ; explicit has_external_iconv ; -exe accepts_shared_option : ../build/option.cpp +exe accepts_shared_option : $(TOP)/build/option.cpp : -shared-libstdc++ -shared-libgcc -shared-libstdc++ @@ -51,7 +53,7 @@ exe accepts_shared_option : ../build/option.cpp ; # Xlocale -obj has_xlocale_obj : ../build/has_xlocale.cpp ; +obj has_xlocale_obj : $(TOP)/build/has_xlocale.cpp ; exe has_xlocale : has_xlocale_obj ; explicit has_xlocale ; @@ -187,8 +189,8 @@ else } -obj has_icu_obj : ../build/has_icu_test.cpp : $(ICU_OPTS) ; -obj has_icu64_obj : ../build/has_icu_test.cpp : $(ICU64_OPTS) ; +obj has_icu_obj : $(TOP)/build/has_icu_test.cpp : $(ICU_OPTS) ; +obj has_icu64_obj : $(TOP)/build/has_icu_test.cpp : $(ICU64_OPTS) ; exe has_icu : has_icu_obj : $(ICU_OPTS) ; exe has_icu64 : has_icu64_obj : $(ICU64_OPTS) ; @@ -260,7 +262,7 @@ rule configure-full ( properties * : flags-only ) ; result += icu/$(ICU_SOURCES).cpp - ../../thread/build//boost_thread + /boost/thread//boost_thread ; } @@ -424,6 +426,7 @@ boost-lib locale : # Don't link explicitly, not required BOOST_THREAD_NO_LIB=1 + $(TOP)/src multi windows:_CRT_SECURE_NO_WARNINGS gcc:"-Wno-long-long -Wno-deprecated-declarations" diff --git a/src/encoding/codepage.cpp b/src/boost/locale/encoding/codepage.cpp similarity index 97% rename from src/encoding/codepage.cpp rename to src/boost/locale/encoding/codepage.cpp index a645423a..b7665b65 100644 --- a/src/encoding/codepage.cpp +++ b/src/boost/locale/encoding/codepage.cpp @@ -13,18 +13,18 @@ #include #include -#include "conv.hpp" +#include "boost/locale/encoding/conv.hpp" #if defined(BOOST_WINDOWS) || defined(__CYGWIN__) #define BOOST_LOCALE_WITH_WCONV #endif #ifdef BOOST_LOCALE_WITH_ICONV -#include "iconv_codepage.ipp" +#include "boost/locale/encoding/iconv_codepage.ipp" #endif #ifdef BOOST_LOCALE_WITH_ICU -#include "uconv_codepage.ipp" +#include "boost/locale/encoding/uconv_codepage.ipp" #endif #ifdef BOOST_LOCALE_WITH_WCONV -#include "wconv_codepage.ipp" +#include "boost/locale/encoding/wconv_codepage.ipp" #endif diff --git a/src/encoding/conv.hpp b/src/boost/locale/encoding/conv.hpp similarity index 100% rename from src/encoding/conv.hpp rename to src/boost/locale/encoding/conv.hpp diff --git a/src/encoding/iconv_codepage.ipp b/src/boost/locale/encoding/iconv_codepage.ipp similarity index 98% rename from src/encoding/iconv_codepage.ipp rename to src/boost/locale/encoding/iconv_codepage.ipp index 93d3e89a..7eda8c8a 100644 --- a/src/encoding/iconv_codepage.ipp +++ b/src/boost/locale/encoding/iconv_codepage.ipp @@ -10,8 +10,8 @@ #include #include -#include "../util/iconv.hpp" -#include "conv.hpp" +#include "boost/locale/util/iconv.hpp" +#include "boost/locale/encoding/conv.hpp" namespace boost { namespace locale { diff --git a/src/encoding/uconv_codepage.ipp b/src/boost/locale/encoding/uconv_codepage.ipp similarity index 97% rename from src/encoding/uconv_codepage.ipp rename to src/boost/locale/encoding/uconv_codepage.ipp index 01f5aaa0..fdd758be 100644 --- a/src/encoding/uconv_codepage.ipp +++ b/src/boost/locale/encoding/uconv_codepage.ipp @@ -11,9 +11,9 @@ #include #include #include -#include "conv.hpp" -#include "../icu/icu_util.hpp" -#include "../icu/uconv.hpp" +#include "boost/locale/encoding/conv.hpp" +#include "boost/locale/icu/icu_util.hpp" +#include "boost/locale/icu/uconv.hpp" namespace boost { namespace locale { diff --git a/src/encoding/wconv_codepage.ipp b/src/boost/locale/encoding/wconv_codepage.ipp similarity index 99% rename from src/encoding/wconv_codepage.ipp rename to src/boost/locale/encoding/wconv_codepage.ipp index db222ec1..c28aeaaf 100644 --- a/src/encoding/wconv_codepage.ipp +++ b/src/boost/locale/encoding/wconv_codepage.ipp @@ -21,7 +21,7 @@ #endif #include -#include "conv.hpp" +#include "boost/locale/encoding/conv.hpp" namespace boost { namespace locale { diff --git a/src/icu/all_generator.hpp b/src/boost/locale/icu/all_generator.hpp similarity index 100% rename from src/icu/all_generator.hpp rename to src/boost/locale/icu/all_generator.hpp diff --git a/src/icu/boundary.cpp b/src/boost/locale/icu/boundary.cpp similarity index 97% rename from src/icu/boundary.cpp rename to src/boost/locale/icu/boundary.cpp index ea0421d3..d4c64c75 100644 --- a/src/icu/boundary.cpp +++ b/src/boost/locale/icu/boundary.cpp @@ -17,10 +17,10 @@ #include #include -#include "cdata.hpp" -#include "all_generator.hpp" -#include "icu_util.hpp" -#include "uconv.hpp" +#include "boost/locale/icu/cdata.hpp" +#include "boost/locale/icu/all_generator.hpp" +#include "boost/locale/icu/icu_util.hpp" +#include "boost/locale/icu/uconv.hpp" #ifdef BOOST_MSVC #pragma warning(disable:4244) // 'argument' : conversion from 'int' diff --git a/src/icu/cdata.hpp b/src/boost/locale/icu/cdata.hpp similarity index 100% rename from src/icu/cdata.hpp rename to src/boost/locale/icu/cdata.hpp diff --git a/src/icu/codecvt.cpp b/src/boost/locale/icu/codecvt.cpp similarity index 95% rename from src/icu/codecvt.cpp rename to src/boost/locale/icu/codecvt.cpp index b47efb9c..fa6ca559 100644 --- a/src/icu/codecvt.cpp +++ b/src/boost/locale/icu/codecvt.cpp @@ -8,15 +8,15 @@ #define BOOST_LOCALE_SOURCE #include #include -#include "../encoding/conv.hpp" -#include "all_generator.hpp" -#include "uconv.hpp" -#include -#include #include #include -#include "codecvt.hpp" -#include "icu_util.hpp" +#include "boost/locale/encoding/conv.hpp" +#include "boost/locale/icu/all_generator.hpp" +#include "boost/locale/icu/uconv.hpp" +#include "boost/locale/icu/codecvt.hpp" +#include "boost/locale/icu/icu_util.hpp" +#include +#include #ifdef BOOST_MSVC # pragma warning(disable : 4244) // loose data diff --git a/src/icu/codecvt.hpp b/src/boost/locale/icu/codecvt.hpp similarity index 100% rename from src/icu/codecvt.hpp rename to src/boost/locale/icu/codecvt.hpp diff --git a/src/icu/collator.cpp b/src/boost/locale/icu/collator.cpp similarity index 97% rename from src/icu/collator.cpp rename to src/boost/locale/icu/collator.cpp index 6bdd5b6f..69550f3b 100644 --- a/src/icu/collator.cpp +++ b/src/boost/locale/icu/collator.cpp @@ -12,10 +12,10 @@ #include #include -#include "cdata.hpp" -#include "all_generator.hpp" -#include "uconv.hpp" -#include "../shared/mo_hash.hpp" +#include "boost/locale/icu/cdata.hpp" +#include "boost/locale/icu/all_generator.hpp" +#include "boost/locale/icu/uconv.hpp" +#include "boost/locale/shared/mo_hash.hpp" #include #if U_ICU_VERSION_MAJOR_NUM*100 + U_ICU_VERSION_MINOR_NUM >= 402 diff --git a/src/icu/conversion.cpp b/src/boost/locale/icu/conversion.cpp similarity index 98% rename from src/icu/conversion.cpp rename to src/boost/locale/icu/conversion.cpp index 1e8e645b..0b2a1227 100644 --- a/src/icu/conversion.cpp +++ b/src/boost/locale/icu/conversion.cpp @@ -7,7 +7,10 @@ // #define BOOST_LOCALE_SOURCE #include -#include "all_generator.hpp" +#include "boost/locale/icu/all_generator.hpp" +#include "boost/locale/icu/cdata.hpp" +#include "boost/locale/icu/uconv.hpp" + #include #include #include @@ -16,11 +19,6 @@ #include #define WITH_CASE_MAPS #endif - - -#include "cdata.hpp" -#include "uconv.hpp" - #include namespace boost { diff --git a/src/icu/date_time.cpp b/src/boost/locale/icu/date_time.cpp similarity index 98% rename from src/icu/date_time.cpp rename to src/boost/locale/icu/date_time.cpp index 0f55bb6c..11883381 100644 --- a/src/icu/date_time.cpp +++ b/src/boost/locale/icu/date_time.cpp @@ -18,10 +18,10 @@ #include #include -#include "all_generator.hpp" -#include "cdata.hpp" -#include "time_zone.hpp" -#include "uconv.hpp" +#include "boost/locale/icu/all_generator.hpp" +#include "boost/locale/icu/cdata.hpp" +#include "boost/locale/icu/time_zone.hpp" +#include "boost/locale/icu/uconv.hpp" namespace boost { namespace locale { diff --git a/src/icu/formatter.cpp b/src/boost/locale/icu/formatter.cpp similarity index 99% rename from src/icu/formatter.cpp rename to src/boost/locale/icu/formatter.cpp index 6bf1999b..c3b4ff16 100644 --- a/src/icu/formatter.cpp +++ b/src/boost/locale/icu/formatter.cpp @@ -7,9 +7,9 @@ // #define BOOST_LOCALE_SOURCE #include -#include "formatter.hpp" +#include "boost/locale/icu/formatter.hpp" #include -#include "uconv.hpp" +#include "boost/locale/icu/uconv.hpp" #include @@ -22,8 +22,8 @@ #include -#include "predefined_formatters.hpp" -#include "time_zone.hpp" +#include "boost/locale/icu/predefined_formatters.hpp" +#include "boost/locale/icu/time_zone.hpp" #include diff --git a/src/icu/formatter.hpp b/src/boost/locale/icu/formatter.hpp similarity index 100% rename from src/icu/formatter.hpp rename to src/boost/locale/icu/formatter.hpp diff --git a/src/icu/icu_backend.cpp b/src/boost/locale/icu/icu_backend.cpp similarity index 96% rename from src/icu/icu_backend.cpp rename to src/boost/locale/icu/icu_backend.cpp index fea937ba..039f3692 100644 --- a/src/icu/icu_backend.cpp +++ b/src/boost/locale/icu/icu_backend.cpp @@ -9,10 +9,10 @@ #include #include #include -#include "all_generator.hpp" -#include "cdata.hpp" -#include "icu_backend.hpp" -#include "../util/locale_data.hpp" +#include "boost/locale/icu/all_generator.hpp" +#include "boost/locale/icu/cdata.hpp" +#include "boost/locale/icu/icu_backend.hpp" +#include "boost/locale/util/locale_data.hpp" #include #include diff --git a/src/icu/icu_backend.hpp b/src/boost/locale/icu/icu_backend.hpp similarity index 100% rename from src/icu/icu_backend.hpp rename to src/boost/locale/icu/icu_backend.hpp diff --git a/src/icu/icu_util.hpp b/src/boost/locale/icu/icu_util.hpp similarity index 100% rename from src/icu/icu_util.hpp rename to src/boost/locale/icu/icu_util.hpp diff --git a/src/icu/numeric.cpp b/src/boost/locale/icu/numeric.cpp similarity index 98% rename from src/icu/numeric.cpp rename to src/boost/locale/icu/numeric.cpp index 2e75c340..b470e3bf 100644 --- a/src/icu/numeric.cpp +++ b/src/boost/locale/icu/numeric.cpp @@ -6,17 +6,17 @@ // http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_LOCALE_SOURCE -#include -#include -#include -#include -#include "formatter.hpp" #include #include -#include "all_generator.hpp" -#include "cdata.hpp" +#include "boost/locale/icu/all_generator.hpp" +#include "boost/locale/icu/cdata.hpp" +#include "boost/locale/icu/formatter.hpp" +#include "boost/locale/icu/predefined_formatters.hpp" #include -#include "predefined_formatters.hpp" +#include +#include +#include +#include namespace boost { namespace locale { diff --git a/src/icu/predefined_formatters.hpp b/src/boost/locale/icu/predefined_formatters.hpp similarity index 100% rename from src/icu/predefined_formatters.hpp rename to src/boost/locale/icu/predefined_formatters.hpp diff --git a/src/icu/time_zone.cpp b/src/boost/locale/icu/time_zone.cpp similarity index 99% rename from src/icu/time_zone.cpp rename to src/boost/locale/icu/time_zone.cpp index 757ffc1b..dd5a9e49 100644 --- a/src/icu/time_zone.cpp +++ b/src/boost/locale/icu/time_zone.cpp @@ -6,7 +6,8 @@ // http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_LOCALE_SOURCE -#include "time_zone.hpp" +#include "boost/locale/icu/time_zone.hpp" +#include #include // @@ -36,7 +37,6 @@ #include #endif -#include namespace boost { namespace locale { diff --git a/src/icu/time_zone.hpp b/src/boost/locale/icu/time_zone.hpp similarity index 100% rename from src/icu/time_zone.hpp rename to src/boost/locale/icu/time_zone.hpp diff --git a/src/icu/uconv.hpp b/src/boost/locale/icu/uconv.hpp similarity index 99% rename from src/icu/uconv.hpp rename to src/boost/locale/icu/uconv.hpp index aae6c4cf..3fe0581f 100644 --- a/src/icu/uconv.hpp +++ b/src/boost/locale/icu/uconv.hpp @@ -7,17 +7,17 @@ // #ifndef BOOST_SRC_LOCALE_ICU_UCONV_HPP #define BOOST_SRC_LOCALE_ICU_UCONV_HPP -#include -#include -#include -#include -#include #include +#include "boost/locale/icu/icu_util.hpp" -#include #include -#include "icu_util.hpp" +#include +#include +#include +#include +#include +#include #ifdef BOOST_MSVC #pragma warning(push) diff --git a/src/posix/all_generator.hpp b/src/boost/locale/posix/all_generator.hpp similarity index 100% rename from src/posix/all_generator.hpp rename to src/boost/locale/posix/all_generator.hpp diff --git a/src/posix/codecvt.cpp b/src/boost/locale/posix/codecvt.cpp similarity index 97% rename from src/posix/codecvt.cpp rename to src/boost/locale/posix/codecvt.cpp index 6e8dee0d..5c919291 100644 --- a/src/posix/codecvt.cpp +++ b/src/boost/locale/posix/codecvt.cpp @@ -6,7 +6,7 @@ // http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_LOCALE_SOURCE -#include "codecvt.hpp" +#include "boost/locale/posix/codecvt.hpp" #include #include #include @@ -16,10 +16,10 @@ #include #include -#include "all_generator.hpp" -#include "../encoding/conv.hpp" +#include "boost/locale/posix/all_generator.hpp" +#include "boost/locale/encoding/conv.hpp" #ifdef BOOST_LOCALE_WITH_ICONV -#include "../util/iconv.hpp" +#include "boost/locale/util/iconv.hpp" #endif namespace boost { diff --git a/src/posix/codecvt.hpp b/src/boost/locale/posix/codecvt.hpp similarity index 100% rename from src/posix/codecvt.hpp rename to src/boost/locale/posix/codecvt.hpp diff --git a/src/posix/collate.cpp b/src/boost/locale/posix/collate.cpp similarity index 97% rename from src/posix/collate.cpp rename to src/boost/locale/posix/collate.cpp index bcdecb93..893d3634 100644 --- a/src/posix/collate.cpp +++ b/src/boost/locale/posix/collate.cpp @@ -19,8 +19,8 @@ #include #include -#include "../shared/mo_hash.hpp" -#include "all_generator.hpp" +#include "boost/locale/shared/mo_hash.hpp" +#include "boost/locale/posix/all_generator.hpp" namespace boost { namespace locale { diff --git a/src/posix/converter.cpp b/src/boost/locale/posix/converter.cpp similarity index 98% rename from src/posix/converter.cpp rename to src/boost/locale/posix/converter.cpp index 9b43c617..07e7d4b5 100644 --- a/src/posix/converter.cpp +++ b/src/boost/locale/posix/converter.cpp @@ -21,7 +21,7 @@ #include #endif -#include "all_generator.hpp" +#include "boost/locale/posix/all_generator.hpp" namespace boost { namespace locale { diff --git a/src/posix/numeric.cpp b/src/boost/locale/posix/numeric.cpp similarity index 99% rename from src/posix/numeric.cpp rename to src/boost/locale/posix/numeric.cpp index c2f21718..a5839db8 100644 --- a/src/posix/numeric.cpp +++ b/src/boost/locale/posix/numeric.cpp @@ -28,8 +28,8 @@ #include #include -#include "../util/numeric.hpp" -#include "all_generator.hpp" +#include "boost/locale/util/numeric.hpp" +#include "boost/locale/posix/all_generator.hpp" #if BOOST_OS_LINUX || defined(__APPLE__) diff --git a/src/posix/posix_backend.cpp b/src/boost/locale/posix/posix_backend.cpp similarity index 96% rename from src/posix/posix_backend.cpp rename to src/boost/locale/posix/posix_backend.cpp index f322f315..49ce27a7 100644 --- a/src/posix/posix_backend.cpp +++ b/src/boost/locale/posix/posix_backend.cpp @@ -6,7 +6,7 @@ // http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_LOCALE_SOURCE -#include "posix_backend.hpp" +#include "boost/locale/posix/posix_backend.hpp" #include #include #include @@ -19,9 +19,9 @@ #include #endif -#include "all_generator.hpp" -#include "../util/gregorian.hpp" -#include "../util/locale_data.hpp" +#include "boost/locale/posix/all_generator.hpp" +#include "boost/locale/util/gregorian.hpp" +#include "boost/locale/util/locale_data.hpp" namespace boost { namespace locale { diff --git a/src/posix/posix_backend.hpp b/src/boost/locale/posix/posix_backend.hpp similarity index 100% rename from src/posix/posix_backend.hpp rename to src/boost/locale/posix/posix_backend.hpp diff --git a/src/shared/date_time.cpp b/src/boost/locale/shared/date_time.cpp similarity index 100% rename from src/shared/date_time.cpp rename to src/boost/locale/shared/date_time.cpp diff --git a/src/shared/format.cpp b/src/boost/locale/shared/format.cpp similarity index 100% rename from src/shared/format.cpp rename to src/boost/locale/shared/format.cpp diff --git a/src/shared/formatting.cpp b/src/boost/locale/shared/formatting.cpp similarity index 99% rename from src/shared/formatting.cpp rename to src/boost/locale/shared/formatting.cpp index 4f81f5e1..a9eb87a2 100644 --- a/src/shared/formatting.cpp +++ b/src/boost/locale/shared/formatting.cpp @@ -10,7 +10,7 @@ #include #include #include -#include "ios_prop.hpp" +#include "boost/locale/shared/ios_prop.hpp" namespace boost { namespace locale { diff --git a/src/shared/generator.cpp b/src/boost/locale/shared/generator.cpp similarity index 100% rename from src/shared/generator.cpp rename to src/boost/locale/shared/generator.cpp diff --git a/src/shared/ids.cpp b/src/boost/locale/shared/ids.cpp similarity index 100% rename from src/shared/ids.cpp rename to src/boost/locale/shared/ids.cpp diff --git a/src/shared/ios_prop.hpp b/src/boost/locale/shared/ios_prop.hpp similarity index 99% rename from src/shared/ios_prop.hpp rename to src/boost/locale/shared/ios_prop.hpp index 1483b712..5713109a 100644 --- a/src/shared/ios_prop.hpp +++ b/src/boost/locale/shared/ios_prop.hpp @@ -94,9 +94,6 @@ namespace boost { template void * const ios_prop::invalid = (void *)(-1); - - - } } } diff --git a/src/shared/localization_backend.cpp b/src/boost/locale/shared/localization_backend.cpp similarity index 98% rename from src/shared/localization_backend.cpp rename to src/boost/locale/shared/localization_backend.cpp index 9690cbc3..1d79c81d 100644 --- a/src/shared/localization_backend.cpp +++ b/src/boost/locale/shared/localization_backend.cpp @@ -14,19 +14,19 @@ #include #ifdef BOOST_LOCALE_WITH_ICU -#include "../icu/icu_backend.hpp" +#include "boost/locale/icu/icu_backend.hpp" #endif #ifndef BOOST_LOCALE_NO_POSIX_BACKEND -#include "../posix/posix_backend.hpp" +#include "boost/locale/posix/posix_backend.hpp" #endif #ifndef BOOST_LOCALE_NO_STD_BACKEND -#include "../std/std_backend.hpp" +#include "boost/locale/std/std_backend.hpp" #endif #ifndef BOOST_LOCALE_NO_WINAPI_BACKEND -#include "../win32/win_backend.hpp" +#include "boost/locale/win32/win_backend.hpp" #endif namespace boost { diff --git a/src/shared/message.cpp b/src/boost/locale/shared/message.cpp similarity index 99% rename from src/shared/message.cpp rename to src/boost/locale/shared/message.cpp index a1bba43a..e0a27ada 100644 --- a/src/shared/message.cpp +++ b/src/boost/locale/shared/message.cpp @@ -32,8 +32,8 @@ #include #include -#include "mo_hash.hpp" -#include "mo_lambda.hpp" +#include "boost/locale/shared/mo_hash.hpp" +#include "boost/locale/shared/mo_lambda.hpp" #ifdef BOOST_MSVC # pragma warning(disable : 4996) diff --git a/src/shared/mo_hash.hpp b/src/boost/locale/shared/mo_hash.hpp similarity index 100% rename from src/shared/mo_hash.hpp rename to src/boost/locale/shared/mo_hash.hpp diff --git a/src/shared/mo_lambda.cpp b/src/boost/locale/shared/mo_lambda.cpp similarity index 99% rename from src/shared/mo_lambda.cpp rename to src/boost/locale/shared/mo_lambda.cpp index 661c83a7..48a8e749 100644 --- a/src/shared/mo_lambda.cpp +++ b/src/boost/locale/shared/mo_lambda.cpp @@ -5,7 +5,7 @@ // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // -#include "mo_lambda.hpp" +#include "boost/locale/shared/mo_lambda.hpp" #include #include diff --git a/src/shared/mo_lambda.hpp b/src/boost/locale/shared/mo_lambda.hpp similarity index 100% rename from src/shared/mo_lambda.hpp rename to src/boost/locale/shared/mo_lambda.hpp diff --git a/src/std/all_generator.hpp b/src/boost/locale/std/all_generator.hpp similarity index 100% rename from src/std/all_generator.hpp rename to src/boost/locale/std/all_generator.hpp diff --git a/src/std/codecvt.cpp b/src/boost/locale/std/codecvt.cpp similarity index 97% rename from src/std/codecvt.cpp rename to src/boost/locale/std/codecvt.cpp index c9f21281..5008770f 100644 --- a/src/std/codecvt.cpp +++ b/src/boost/locale/std/codecvt.cpp @@ -6,7 +6,7 @@ // http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_LOCALE_SOURCE -#include "all_generator.hpp" +#include "boost/locale/std/all_generator.hpp" #include #include diff --git a/src/std/collate.cpp b/src/boost/locale/std/collate.cpp similarity index 98% rename from src/std/collate.cpp rename to src/boost/locale/std/collate.cpp index 9efc27d7..78070546 100644 --- a/src/std/collate.cpp +++ b/src/boost/locale/std/collate.cpp @@ -6,11 +6,11 @@ // http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_LOCALE_SOURCE +#include #include #include #include -#include -#include "all_generator.hpp" +#include "boost/locale/std/all_generator.hpp" namespace boost { namespace locale { diff --git a/src/std/converter.cpp b/src/boost/locale/std/converter.cpp similarity index 99% rename from src/std/converter.cpp rename to src/boost/locale/std/converter.cpp index a8dc0f31..5c13079a 100644 --- a/src/std/converter.cpp +++ b/src/boost/locale/std/converter.cpp @@ -15,7 +15,7 @@ #include #include -#include "all_generator.hpp" +#include "boost/locale/std/all_generator.hpp" #ifdef BOOST_MSVC # pragma warning(disable : 4996) diff --git a/src/std/numeric.cpp b/src/boost/locale/std/numeric.cpp similarity index 99% rename from src/std/numeric.cpp rename to src/boost/locale/std/numeric.cpp index 885a570d..5ba45890 100644 --- a/src/std/numeric.cpp +++ b/src/boost/locale/std/numeric.cpp @@ -15,8 +15,8 @@ #include #include -#include "../util/numeric.hpp" -#include "all_generator.hpp" +#include "boost/locale/util/numeric.hpp" +#include "boost/locale/std/all_generator.hpp" namespace boost { namespace locale { diff --git a/src/std/std_backend.cpp b/src/boost/locale/std/std_backend.cpp similarity index 96% rename from src/std/std_backend.cpp rename to src/boost/locale/std/std_backend.cpp index 328348d4..4132929c 100644 --- a/src/std/std_backend.cpp +++ b/src/boost/locale/std/std_backend.cpp @@ -6,7 +6,7 @@ // http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_LOCALE_SOURCE -#include "std_backend.hpp" +#include "boost/locale/std/std_backend.hpp" #include #include #include @@ -19,12 +19,12 @@ # define NOMINMAX # endif # include -# include "../encoding/conv.hpp" -# include "../win32/lcid.hpp" +# include "boost/locale/encoding/conv.hpp" +# include "boost/locale/win32/lcid.hpp" #endif -#include "all_generator.hpp" -#include "../util/locale_data.hpp" -#include "../util/gregorian.hpp" +#include "boost/locale/std/all_generator.hpp" +#include "boost/locale/util/locale_data.hpp" +#include "boost/locale/util/gregorian.hpp" namespace boost { namespace locale { diff --git a/src/std/std_backend.hpp b/src/boost/locale/std/std_backend.hpp similarity index 100% rename from src/std/std_backend.hpp rename to src/boost/locale/std/std_backend.hpp diff --git a/src/util/codecvt_converter.cpp b/src/boost/locale/util/codecvt_converter.cpp similarity index 99% rename from src/util/codecvt_converter.cpp rename to src/boost/locale/util/codecvt_converter.cpp index adab093a..c2687030 100644 --- a/src/util/codecvt_converter.cpp +++ b/src/boost/locale/util/codecvt_converter.cpp @@ -14,7 +14,7 @@ #include #include -#include "../encoding/conv.hpp" +#include "boost/locale/encoding/conv.hpp" //#define DEBUG_CODECVT #ifdef DEBUG_CODECVT diff --git a/src/util/default_locale.cpp b/src/boost/locale/util/default_locale.cpp similarity index 100% rename from src/util/default_locale.cpp rename to src/boost/locale/util/default_locale.cpp diff --git a/src/util/gregorian.cpp b/src/boost/locale/util/gregorian.cpp similarity index 99% rename from src/util/gregorian.cpp rename to src/boost/locale/util/gregorian.cpp index 0f35baed..ace9eb18 100644 --- a/src/util/gregorian.cpp +++ b/src/boost/locale/util/gregorian.cpp @@ -6,9 +6,11 @@ // http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_LOCALE_SOURCE +#include "boost/locale/util/gregorian.hpp" #include #include #include +#include "boost/locale/util/timezone.hpp" #include #include #include @@ -18,9 +20,6 @@ #include #include -#include "gregorian.hpp" -#include "timezone.hpp" - #ifdef BOOST_MSVC # pragma warning(disable : 4996) #endif diff --git a/src/util/gregorian.hpp b/src/boost/locale/util/gregorian.hpp similarity index 100% rename from src/util/gregorian.hpp rename to src/boost/locale/util/gregorian.hpp diff --git a/src/util/iconv.hpp b/src/boost/locale/util/iconv.hpp similarity index 100% rename from src/util/iconv.hpp rename to src/boost/locale/util/iconv.hpp diff --git a/src/util/info.cpp b/src/boost/locale/util/info.cpp similarity index 97% rename from src/util/info.cpp rename to src/boost/locale/util/info.cpp index 974e0d49..57a135ed 100644 --- a/src/util/info.cpp +++ b/src/boost/locale/util/info.cpp @@ -15,7 +15,7 @@ #include #include -#include "locale_data.hpp" +#include "boost/locale/util/locale_data.hpp" namespace boost { namespace locale { diff --git a/src/util/locale_data.cpp b/src/boost/locale/util/locale_data.cpp similarity index 97% rename from src/util/locale_data.cpp rename to src/boost/locale/util/locale_data.cpp index e65bc293..312576f3 100644 --- a/src/util/locale_data.cpp +++ b/src/boost/locale/util/locale_data.cpp @@ -6,8 +6,8 @@ // http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_LOCALE_SOURCE -#include "locale_data.hpp" -#include "../encoding/conv.hpp" +#include "boost/locale/util/locale_data.hpp" +#include "boost/locale/encoding/conv.hpp" #include namespace boost { diff --git a/src/util/locale_data.hpp b/src/boost/locale/util/locale_data.hpp similarity index 100% rename from src/util/locale_data.hpp rename to src/boost/locale/util/locale_data.hpp diff --git a/src/util/numeric.hpp b/src/boost/locale/util/numeric.hpp similarity index 99% rename from src/util/numeric.hpp rename to src/boost/locale/util/numeric.hpp index ed7be04d..d5acf462 100644 --- a/src/util/numeric.hpp +++ b/src/boost/locale/util/numeric.hpp @@ -18,7 +18,7 @@ #include #include -#include "timezone.hpp" +#include "boost/locale/util/timezone.hpp" // This is internal header so disable crappy "unsecure functions" for all #ifdef BOOST_MSVC diff --git a/src/util/timezone.hpp b/src/boost/locale/util/timezone.hpp similarity index 100% rename from src/util/timezone.hpp rename to src/boost/locale/util/timezone.hpp diff --git a/src/win32/all_generator.hpp b/src/boost/locale/win32/all_generator.hpp similarity index 100% rename from src/win32/all_generator.hpp rename to src/boost/locale/win32/all_generator.hpp diff --git a/src/win32/api.hpp b/src/boost/locale/win32/api.hpp similarity index 99% rename from src/win32/api.hpp rename to src/boost/locale/win32/api.hpp index ffec0a73..ed7a5b0a 100644 --- a/src/win32/api.hpp +++ b/src/boost/locale/win32/api.hpp @@ -16,7 +16,7 @@ #include #include -#include "lcid.hpp" +#include "boost/locale/win32/lcid.hpp" #ifndef NOMINMAX #define NOMINMAX diff --git a/src/win32/collate.cpp b/src/boost/locale/win32/collate.cpp similarity index 98% rename from src/win32/collate.cpp rename to src/boost/locale/win32/collate.cpp index 9b398462..1fae05c9 100644 --- a/src/win32/collate.cpp +++ b/src/boost/locale/win32/collate.cpp @@ -11,8 +11,8 @@ #include #include #include -#include "api.hpp" -#include "../shared/mo_hash.hpp" +#include "boost/locale/win32/api.hpp" +#include "boost/locale/shared/mo_hash.hpp" namespace boost { namespace locale { diff --git a/src/win32/converter.cpp b/src/boost/locale/win32/converter.cpp similarity index 97% rename from src/win32/converter.cpp rename to src/boost/locale/win32/converter.cpp index a50edf77..90bb3c7e 100644 --- a/src/win32/converter.cpp +++ b/src/boost/locale/win32/converter.cpp @@ -13,8 +13,8 @@ #include #include #include -#include "api.hpp" -#include "all_generator.hpp" +#include "boost/locale/win32/api.hpp" +#include "boost/locale/win32/all_generator.hpp" namespace boost { namespace locale { diff --git a/src/win32/lcid.cpp b/src/boost/locale/win32/lcid.cpp similarity index 97% rename from src/win32/lcid.cpp rename to src/boost/locale/win32/lcid.cpp index 12012fdf..69ffec03 100644 --- a/src/win32/lcid.cpp +++ b/src/boost/locale/win32/lcid.cpp @@ -10,7 +10,7 @@ #define NOMINMAX #endif -#include "lcid.hpp" +#include "boost/locale/win32/lcid.hpp" #include #include #include @@ -18,7 +18,7 @@ #include #include #include -#include "../util/locale_data.hpp" +#include "boost/locale/util/locale_data.hpp" namespace boost { namespace locale { diff --git a/src/win32/lcid.hpp b/src/boost/locale/win32/lcid.hpp similarity index 100% rename from src/win32/lcid.hpp rename to src/boost/locale/win32/lcid.hpp diff --git a/src/win32/numeric.cpp b/src/boost/locale/win32/numeric.cpp similarity index 98% rename from src/win32/numeric.cpp rename to src/boost/locale/win32/numeric.cpp index 51431a16..005c0666 100644 --- a/src/win32/numeric.cpp +++ b/src/boost/locale/win32/numeric.cpp @@ -6,9 +6,9 @@ // http://www.boost.org/LICENSE_1_0.txt) // #define BOOST_LOCALE_SOURCE -#include "all_generator.hpp" -#include "api.hpp" -#include "../util/numeric.hpp" +#include "boost/locale/win32/all_generator.hpp" +#include "boost/locale/win32/api.hpp" +#include "boost/locale/util/numeric.hpp" #include #include #include diff --git a/src/win32/win_backend.cpp b/src/boost/locale/win32/win_backend.cpp similarity index 95% rename from src/win32/win_backend.cpp rename to src/boost/locale/win32/win_backend.cpp index 2f77d475..8c758a8a 100644 --- a/src/win32/win_backend.cpp +++ b/src/boost/locale/win32/win_backend.cpp @@ -9,12 +9,12 @@ #include #include #include -#include "all_generator.hpp" -#include "win_backend.hpp" #include -#include "../util/gregorian.hpp" -#include "../util/locale_data.hpp" -#include "api.hpp" +#include "boost/locale/win32/all_generator.hpp" +#include "boost/locale/win32/win_backend.hpp" +#include "boost/locale/util/gregorian.hpp" +#include "boost/locale/util/locale_data.hpp" +#include "boost/locale/win32/api.hpp" #include #include #include diff --git a/src/win32/win_backend.hpp b/src/boost/locale/win32/win_backend.hpp similarity index 100% rename from src/win32/win_backend.hpp rename to src/boost/locale/win32/win_backend.hpp diff --git a/test/test_codepage_converter.cpp b/test/test_codepage_converter.cpp index ffd4e767..e8fd2825 100644 --- a/test/test_codepage_converter.cpp +++ b/test/test_codepage_converter.cpp @@ -7,10 +7,10 @@ // #include #ifdef BOOST_LOCALE_WITH_ICU -#include "../src/icu/codecvt.hpp" +#include "../src/boost/locale/icu/codecvt.hpp" #endif #if defined(BOOST_LOCALE_WITH_ICONV) && !defined(BOOST_LOCALE_NO_POSIX_BACKEND) -#include "../src/posix/codecvt.hpp" +#include "../src/boost/locale/posix/codecvt.hpp" #endif #if defined(BOOST_NO_CXX11_SMART_PTR) && !BOOST_LOCALE_USE_AUTO_PTR #include diff --git a/test/test_ios_prop.cpp b/test/test_ios_prop.cpp index 53f06c2e..73c22f6d 100644 --- a/test/test_ios_prop.cpp +++ b/test/test_ios_prop.cpp @@ -7,7 +7,7 @@ // #include "test_locale.hpp" -#include "../src/shared/ios_prop.hpp" +#include "../src/boost/locale/shared/ios_prop.hpp" #include #include diff --git a/test/test_winapi_formatting.cpp b/test/test_winapi_formatting.cpp index 4e4d1d57..9ceb6afb 100644 --- a/test/test_winapi_formatting.cpp +++ b/test/test_winapi_formatting.cpp @@ -31,7 +31,7 @@ int main() #include "test_locale.hpp" #include "test_locale_tools.hpp" -#include "../src/win32/lcid.hpp" +#include "../src/boost/locale/win32/lcid.hpp" #define DEBUG_FMT From e1ab37923c48297d7a91bfb7f76e6690089fafe2 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 6 Jul 2022 15:11:12 +0200 Subject: [PATCH 71/90] Add `Boost.Functional` to cmake subdir test New dependency of fusion. --- test/cmake_test/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/test/cmake_test/CMakeLists.txt b/test/cmake_test/CMakeLists.txt index 0de69502..840c35e9 100644 --- a/test/cmake_test/CMakeLists.txt +++ b/test/cmake_test/CMakeLists.txt @@ -41,6 +41,7 @@ else() detail exception function_types + functional fusion integer intrusive From 1512f618f9e53d1911104b1f8a49a4047eaa4834 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 6 Jul 2022 14:52:46 +0200 Subject: [PATCH 72/90] Refactor ICU src files Introduce and use `BOOST_LOCALE_ICU_VERSION` Make sure headers include the config header first --- src/boost/locale/icu/boundary.cpp | 14 ++++---- src/boost/locale/icu/cdata.hpp | 1 + src/boost/locale/icu/codecvt.hpp | 4 ++- src/boost/locale/icu/collator.cpp | 20 ++++++----- src/boost/locale/icu/conversion.cpp | 11 +++--- src/boost/locale/icu/date_time.cpp | 12 +++---- src/boost/locale/icu/formatter.cpp | 11 ++---- src/boost/locale/icu/formatter.hpp | 4 +-- src/boost/locale/icu/icu_backend.hpp | 3 ++ src/boost/locale/icu/icu_util.hpp | 8 +++++ .../locale/icu/predefined_formatters.hpp | 19 +++++----- src/boost/locale/icu/time_zone.cpp | 4 ++- test/test_date_time.cpp | 6 ++-- test/test_formatting.cpp | 36 +++++++++---------- 14 files changed, 82 insertions(+), 71 deletions(-) diff --git a/src/boost/locale/icu/boundary.cpp b/src/boost/locale/icu/boundary.cpp index d4c64c75..33cf7411 100644 --- a/src/boost/locale/icu/boundary.cpp +++ b/src/boost/locale/icu/boundary.cpp @@ -9,19 +9,17 @@ #include #include #include -#include -#if U_ICU_VERSION_MAJOR_NUM*100 + U_ICU_VERSION_MINOR_NUM >= 306 +#include "boost/locale/icu/all_generator.hpp" +#include "boost/locale/icu/cdata.hpp" +#include "boost/locale/icu/icu_util.hpp" +#include "boost/locale/icu/uconv.hpp" +#if BOOST_LOCALE_ICU_VERSION >= 306 #include #endif #include #include #include -#include "boost/locale/icu/cdata.hpp" -#include "boost/locale/icu/all_generator.hpp" -#include "boost/locale/icu/icu_util.hpp" -#include "boost/locale/icu/uconv.hpp" - #ifdef BOOST_MSVC #pragma warning(disable:4244) // 'argument' : conversion from 'int' #pragma warning(disable:4267) // 'argument' : conversion from 'size_t' @@ -143,7 +141,7 @@ index_type do_map(boundary_type t,CharType const *begin,CharType const *end,icu: index_type indx; hold_ptr bi(get_iterator(t,loc)); -#if U_ICU_VERSION_MAJOR_NUM*100 + U_ICU_VERSION_MINOR_NUM >= 306 +#if BOOST_LOCALE_ICU_VERSION >= 306 UErrorCode err=U_ZERO_ERROR; BOOST_LOCALE_START_CONST_CONDITION if(sizeof(CharType) == 2 || (sizeof(CharType)==1 && encoding=="UTF-8")) diff --git a/src/boost/locale/icu/cdata.hpp b/src/boost/locale/icu/cdata.hpp index 2bffeab4..78945bf3 100644 --- a/src/boost/locale/icu/cdata.hpp +++ b/src/boost/locale/icu/cdata.hpp @@ -8,6 +8,7 @@ #ifndef BOOST_LOCALE_ICU_CDATA_HPP #define BOOST_LOCALE_ICU_CDATA_HPP +#include #include #include diff --git a/src/boost/locale/icu/codecvt.hpp b/src/boost/locale/icu/codecvt.hpp index 8af9bd66..d703a4b3 100644 --- a/src/boost/locale/icu/codecvt.hpp +++ b/src/boost/locale/icu/codecvt.hpp @@ -7,9 +7,11 @@ // #ifndef BOOST_LOCALE_IMPL_ICU_CODECVT_HPP #define BOOST_LOCALE_IMPL_ICU_CODECVT_HPP + #include #include -#include +#include + namespace boost { namespace locale { namespace impl_icu { diff --git a/src/boost/locale/icu/collator.cpp b/src/boost/locale/icu/collator.cpp index 69550f3b..3d7dd13d 100644 --- a/src/boost/locale/icu/collator.cpp +++ b/src/boost/locale/icu/collator.cpp @@ -8,18 +8,20 @@ #define BOOST_LOCALE_SOURCE #include #include -#include -#include -#include - -#include "boost/locale/icu/cdata.hpp" #include "boost/locale/icu/all_generator.hpp" +#include "boost/locale/icu/cdata.hpp" +#include "boost/locale/icu/icu_util.hpp" #include "boost/locale/icu/uconv.hpp" #include "boost/locale/shared/mo_hash.hpp" - +#include +#include +#include #include -#if U_ICU_VERSION_MAJOR_NUM*100 + U_ICU_VERSION_MINOR_NUM >= 402 +#if BOOST_LOCALE_ICU_VERSION >= 402 +# define BOOST_LOCALE_WITH_STRINGPIECE 1 # include +#else +# define BOOST_LOCALE_WITH_STRINGPIECE 0 #endif #ifdef BOOST_MSVC @@ -44,7 +46,7 @@ namespace boost { return level; } - #if U_ICU_VERSION_MAJOR_NUM*100 + U_ICU_VERSION_MINOR_NUM >= 402 + #if BOOST_LOCALE_WITH_STRINGPIECE int do_utf8_compare( level_type level, char const *b1,char const *e1, char const *b2,char const *e2, @@ -163,7 +165,7 @@ namespace boost { }; - #if U_ICU_VERSION_MAJOR_NUM*100 + U_ICU_VERSION_MINOR_NUM >= 402 + #if BOOST_LOCALE_WITH_STRINGPIECE template<> int collate_impl::do_real_compare( level_type level, diff --git a/src/boost/locale/icu/conversion.cpp b/src/boost/locale/icu/conversion.cpp index 0b2a1227..923bd87e 100644 --- a/src/boost/locale/icu/conversion.cpp +++ b/src/boost/locale/icu/conversion.cpp @@ -9,15 +9,16 @@ #include #include "boost/locale/icu/all_generator.hpp" #include "boost/locale/icu/cdata.hpp" +#include "boost/locale/icu/icu_util.hpp" #include "boost/locale/icu/uconv.hpp" #include #include #include #include -#if U_ICU_VERSION_MAJOR_NUM*100 + U_ICU_VERSION_MINOR_NUM >= 308 +#if BOOST_LOCALE_ICU_VERSION >= 308 #include -#define WITH_CASE_MAPS +#define BOOST_LOCALE_WITH_CASEMAP #endif #include @@ -98,7 +99,7 @@ namespace impl_icu { std::string encoding_; }; // converter_impl - #ifdef WITH_CASE_MAPS + #ifdef BOOST_LOCALE_WITH_CASEMAP class raii_casemap { raii_casemap(raii_casemap const &); void operator = (raii_casemap const&); @@ -176,13 +177,13 @@ namespace impl_icu { raii_casemap map_; }; // converter_impl -#endif // WITH_CASE_MAPS +#endif // BOOST_LOCALE_WITH_CASEMAP std::locale create_convert(std::locale const &in,cdata const &cd,character_facet_type type) { switch(type) { case char_facet: - #ifdef WITH_CASE_MAPS + #ifdef BOOST_LOCALE_WITH_CASEMAP if(cd.utf8) return std::locale(in,new utf8_converter_impl(cd)); #endif diff --git a/src/boost/locale/icu/date_time.cpp b/src/boost/locale/icu/date_time.cpp index 11883381..2b55b0d6 100644 --- a/src/boost/locale/icu/date_time.cpp +++ b/src/boost/locale/icu/date_time.cpp @@ -10,6 +10,11 @@ #include #include #include +#include "boost/locale/icu/all_generator.hpp" +#include "boost/locale/icu/cdata.hpp" +#include "boost/locale/icu/icu_util.hpp" +#include "boost/locale/icu/time_zone.hpp" +#include "boost/locale/icu/uconv.hpp" #include #include #include @@ -18,11 +23,6 @@ #include #include -#include "boost/locale/icu/all_generator.hpp" -#include "boost/locale/icu/cdata.hpp" -#include "boost/locale/icu/time_zone.hpp" -#include "boost/locale/icu/uconv.hpp" - namespace boost { namespace locale { namespace impl_icu { @@ -70,7 +70,7 @@ namespace impl_icu { UErrorCode err=U_ZERO_ERROR; calendar_.reset(icu::Calendar::createInstance(dat.locale,err)); check_and_throw_dt(err); - #if U_ICU_VERSION_MAJOR_NUM*100 + U_ICU_VERSION_MINOR_NUM < 402 + #if BOOST_LOCALE_ICU_VERSION < 402 // workaround old/invalid data, it should be 4 in general calendar_->setMinimalDaysInFirstWeek(4); #endif diff --git a/src/boost/locale/icu/formatter.cpp b/src/boost/locale/icu/formatter.cpp index c3b4ff16..fd5a9c0e 100644 --- a/src/boost/locale/icu/formatter.cpp +++ b/src/boost/locale/icu/formatter.cpp @@ -10,23 +10,18 @@ #include "boost/locale/icu/formatter.hpp" #include #include "boost/locale/icu/uconv.hpp" - +#include "boost/locale/icu/predefined_formatters.hpp" +#include "boost/locale/icu/time_zone.hpp" +#include #include #include #include #include #include - #include - #include -#include "boost/locale/icu/predefined_formatters.hpp" -#include "boost/locale/icu/time_zone.hpp" - -#include - #ifdef BOOST_MSVC # pragma warning(disable : 4244) // lose data #endif diff --git a/src/boost/locale/icu/formatter.hpp b/src/boost/locale/icu/formatter.hpp index 8713e561..71884d09 100644 --- a/src/boost/locale/icu/formatter.hpp +++ b/src/boost/locale/icu/formatter.hpp @@ -8,10 +8,10 @@ #ifndef BOOST_LOCALE_FORMATTER_HPP_INCLUDED #define BOOST_LOCALE_FORMATTER_HPP_INCLUDED +#include +#include #include #include -#include -#include #include namespace boost { diff --git a/src/boost/locale/icu/icu_backend.hpp b/src/boost/locale/icu/icu_backend.hpp index 42102c4c..d324ecef 100644 --- a/src/boost/locale/icu/icu_backend.hpp +++ b/src/boost/locale/icu/icu_backend.hpp @@ -7,6 +7,9 @@ // #ifndef BOOST_LOCALE_IMPL_ICU_LOCALIZATION_BACKEND_HPP #define BOOST_LOCALE_IMPL_ICU_LOCALIZATION_BACKEND_HPP + +#include + namespace boost { namespace locale { class localization_backend; diff --git a/src/boost/locale/icu/icu_util.hpp b/src/boost/locale/icu/icu_util.hpp index df2893bb..71e989a7 100644 --- a/src/boost/locale/icu/icu_util.hpp +++ b/src/boost/locale/icu/icu_util.hpp @@ -7,9 +7,17 @@ // #ifndef BOOST_SRC_ICU_UTIL_HPP #define BOOST_SRC_ICU_UTIL_HPP + +#include +#ifdef BOOST_HAS_STDINT_H +#include // Avoid ICU defining e.g. INT8_MIN causing macro redefinition warnings +#endif #include +#include #include +#define BOOST_LOCALE_ICU_VERSION (U_ICU_VERSION_MAJOR_NUM * 100 + U_ICU_VERSION_MINOR_NUM) + namespace boost { namespace locale { namespace impl_icu { diff --git a/src/boost/locale/icu/predefined_formatters.hpp b/src/boost/locale/icu/predefined_formatters.hpp index 4a2d789a..401fad30 100644 --- a/src/boost/locale/icu/predefined_formatters.hpp +++ b/src/boost/locale/icu/predefined_formatters.hpp @@ -8,12 +8,13 @@ #ifndef BOOST_LOCALE_PREDEFINED_FORMATTERS_HPP_INCLUDED #define BOOST_LOCALE_PREDEFINED_FORMATTERS_HPP_INCLUDED -#include -#include -#include -#include #include #include +#include "boost/locale/icu/icu_util.hpp" +#include +#include +#include +#include #include #include @@ -99,28 +100,26 @@ namespace locale { case fmt_sci: ap.reset(icu::NumberFormat::createScientificInstance(locale_,err)); break; - #if U_ICU_VERSION_MAJOR_NUM*100 + U_ICU_VERSION_MINOR_NUM >= 402 - #if U_ICU_VERSION_MAJOR_NUM*100 + U_ICU_VERSION_MINOR_NUM >= 408 +#if BOOST_LOCALE_ICU_VERSION >= 408 case fmt_curr_nat: ap.reset(icu::NumberFormat::createInstance(locale_,UNUM_CURRENCY,err)); break; case fmt_curr_iso: ap.reset(icu::NumberFormat::createInstance(locale_,UNUM_CURRENCY_ISO,err)); break; - #else +#elif BOOST_LOCALE_ICU_VERSION >= 402 case fmt_curr_nat: ap.reset(icu::NumberFormat::createInstance(locale_,icu::NumberFormat::kCurrencyStyle,err)); break; case fmt_curr_iso: ap.reset(icu::NumberFormat::createInstance(locale_,icu::NumberFormat::kIsoCurrencyStyle,err)); break; - #endif - #else +#else case fmt_curr_nat: case fmt_curr_iso: ap.reset(icu::NumberFormat::createCurrencyInstance(locale_,err)); break; - #endif +#endif case fmt_per: ap.reset(icu::NumberFormat::createPercentInstance(locale_,err)); break; diff --git a/src/boost/locale/icu/time_zone.cpp b/src/boost/locale/icu/time_zone.cpp index dd5a9e49..b142b1bc 100644 --- a/src/boost/locale/icu/time_zone.cpp +++ b/src/boost/locale/icu/time_zone.cpp @@ -7,6 +7,7 @@ // #define BOOST_LOCALE_SOURCE #include "boost/locale/icu/time_zone.hpp" +#include "boost/locale/icu/icu_util.hpp" #include #include @@ -20,7 +21,8 @@ // It is also relevant only for Linux, BSD and Apple (as I see in ICU code) // -#if U_ICU_VERSION_MAJOR_NUM == 4 && (U_ICU_VERSION_MINOR_NUM * 100 + U_ICU_VERSION_PATCHLEVEL_NUM) <= 402 +#if BOOST_LOCALE_ICU_VERSION >= 400 && BOOST_LOCALE_ICU_VERSION <= 406 \ + && (BOOST_LOCALE_ICU_VERSION != 404 || U_ICU_VERSION_PATCHLEVEL_NUM >= 3) # if BOOST_OS_LINUX || BOOST_OS_BSD_FREE || defined(__APPLE__) # define BOOST_LOCALE_WORKAROUND_ICU_BUG # endif diff --git a/test/test_date_time.cpp b/test/test_date_time.cpp index 89632c0e..923915b2 100644 --- a/test/test_date_time.cpp +++ b/test/test_date_time.cpp @@ -15,9 +15,9 @@ #ifdef BOOST_LOCALE_WITH_ICU #include -#define BOOST_ICU_VER (U_ICU_VERSION_MAJOR_NUM*100 + U_ICU_VERSION_MINOR_NUM) +#define BOOST_LOCALE_ICU_VERSION (U_ICU_VERSION_MAJOR_NUM*100 + U_ICU_VERSION_MINOR_NUM) #else -#define BOOST_ICU_VER 406 +#define BOOST_LOCALE_ICU_VERSION 0 #endif #ifdef BOOST_MSVC @@ -200,7 +200,7 @@ void test_main(int /*argc*/, char** /*argv*/) TEST(time_point.get(week_of_year()) == 6); // cldr changes -#if BOOST_ICU_VER >= 408 && BOOST_ICU_VER <= 6000 +#if BOOST_LOCALE_ICU_VERSION >= 408 && BOOST_LOCALE_ICU_VERSION <= 6000 const bool ICU_cldr_issue = backend_name == "icu"; #else const bool ICU_cldr_issue = false; diff --git a/test/test_formatting.cpp b/test/test_formatting.cpp index 44707120..689c8b11 100644 --- a/test/test_formatting.cpp +++ b/test/test_formatting.cpp @@ -207,8 +207,8 @@ BOOST_LOCALE_START_CONST_CONDITION \ }while(0) BOOST_LOCALE_END_CONST_CONDITION -#define BOOST_ICU_VER (U_ICU_VERSION_MAJOR_NUM*100 + U_ICU_VERSION_MINOR_NUM) -#define BOOST_ICU_EXACT_VER (U_ICU_VERSION_MAJOR_NUM*10000 + U_ICU_VERSION_MINOR_NUM * 100 + U_ICU_VERSION_PATCHLEVEL_NUM) +#define BOOST_LOCALE_ICU_VERSION (U_ICU_VERSION_MAJOR_NUM * 100 + U_ICU_VERSION_MINOR_NUM) +#define BOOST_LOCALE_ICU_VERSION_EXACT (BOOST_LOCALE_ICU_VERSION * 100 + U_ICU_VERSION_PATCHLEVEL_NUM) bool short_parsing_fails() { @@ -280,7 +280,7 @@ BOOST_LOCALE_END_CONST_CONDITION TEST_FP3(as::number,std::left,std::setw(3),15,"15 ",int,15); TEST_FP3(as::number,std::right,std::setw(3),15," 15",int,15); TEST_FP3(as::number,std::setprecision(3),std::fixed,13.1,"13.100",double,13.1); - #if BOOST_ICU_VER < 5601 + #if BOOST_LOCALE_ICU_VERSION < 5601 // bug #13276 TEST_FP3(as::number,std::setprecision(3),std::scientific,13.1,"1.310E1",double,13.1); #endif @@ -300,14 +300,14 @@ BOOST_LOCALE_END_CONST_CONDITION TEST_NOPAR(as::currency,"$",double); - #if BOOST_ICU_VER >= 402 + #if BOOST_LOCALE_ICU_VERSION >= 402 TEST_FP2(as::currency,as::currency_national,1345,"$1,345.00",int,1345); TEST_FP2(as::currency,as::currency_national,1345.34,"$1,345.34",double,1345.34); TEST_FP2(as::currency,as::currency_iso,1345,"USD1,345.00",int,1345); TEST_FP2(as::currency,as::currency_iso,1345.34,"USD1,345.34",double,1345.34); #endif TEST_FP1(as::spellout,10,"ten",int,10); - #if 402 <= BOOST_ICU_VER && BOOST_ICU_VER < 408 + #if 402 <= BOOST_LOCALE_ICU_VERSION && BOOST_LOCALE_ICU_VERSION < 408 if(e_charset=="UTF-8") { TEST_FMT(as::ordinal,1,"1\xcb\xa2\xe1\xb5\x97"); // 1st with st as ligatures } @@ -328,7 +328,7 @@ BOOST_LOCALE_END_CONST_CONDITION TEST_NOPAR(as::date>>as::date_short,"aa/bb/cc",double); -#if BOOST_ICU_VER >= 5901 +#if BOOST_LOCALE_ICU_VERSION >= 5901 #define GMT_FULL "Greenwich Mean Time" #else #define GMT_FULL "GMT" @@ -337,9 +337,9 @@ BOOST_LOCALE_END_CONST_CONDITION TEST_FP2(as::time, as::gmt,a_datetime,"3:33:13 PM",time_t,a_time+a_timesec); TEST_FP3(as::time,as::time_short ,as::gmt,a_datetime,"3:33 PM",time_t,a_time); TEST_FP3(as::time,as::time_medium,as::gmt,a_datetime,"3:33:13 PM",time_t,a_time+a_timesec); - #if BOOST_ICU_VER >= 408 + #if BOOST_LOCALE_ICU_VERSION >= 408 TEST_FP3(as::time,as::time_long ,as::gmt,a_datetime,"3:33:13 PM GMT",time_t,a_time+a_timesec); - #if BOOST_ICU_EXACT_VER != 40800 + #if BOOST_LOCALE_ICU_VERSION_EXACT != 40800 // know bug #8675 TEST_FP3(as::time,as::time_full ,as::gmt,a_datetime,"3:33:13 PM " GMT_FULL,time_t,a_time+a_timesec); #endif @@ -370,7 +370,7 @@ BOOST_LOCALE_END_CONST_CONDITION #endif TEST_FP3(as::time,as::time_long ,as::time_zone("GMT+01:00"),a_datetime,"4:33:13 PM " GMT_P100,time_t,a_time+a_timesec); - #if BOOST_ICU_VER == 308 && defined(__CYGWIN__) + #if BOOST_LOCALE_ICU_VERSION == 308 && defined(__CYGWIN__) // Known faliture ICU issue #else TEST_FP3(as::time,as::time_full ,as::time_zone("GMT+01:00"),a_datetime,"4:33:13 PM GMT+01:00",time_t,a_time+a_timesec); @@ -379,9 +379,9 @@ BOOST_LOCALE_END_CONST_CONDITION TEST_FP2(as::datetime, as::gmt,a_datetime,"Feb 5, 1970" PERIOD " 3:33:13 PM",time_t,a_datetime); TEST_FP4(as::datetime,as::date_short ,as::time_short ,as::gmt,a_datetime,"2/5/70" PERIOD " 3:33 PM",time_t,a_date+a_time); TEST_FP4(as::datetime,as::date_medium,as::time_medium,as::gmt,a_datetime,"Feb 5, 1970" PERIOD " 3:33:13 PM",time_t,a_datetime); - #if BOOST_ICU_VER >= 408 + #if BOOST_LOCALE_ICU_VERSION >= 408 TEST_FP4(as::datetime,as::date_long ,as::time_long ,as::gmt,a_datetime,"February 5, 1970" ICUAT " 3:33:13 PM GMT",time_t,a_datetime); - #if BOOST_ICU_EXACT_VER != 40800 + #if BOOST_LOCALE_ICU_VERSION_EXACT != 40800 // know bug #8675 TEST_FP4(as::datetime,as::date_full ,as::time_full ,as::gmt,a_datetime,"Thursday, February 5, 1970" ICUAT " 3:33:13 PM " GMT_FULL,time_t,a_datetime); #endif @@ -410,7 +410,7 @@ BOOST_LOCALE_END_CONST_CONDITION std::string result[]= { "Thu","Thursday","Feb","February", // aAbB - #if BOOST_ICU_VER >= 408 + #if BOOST_LOCALE_ICU_VERSION >= 408 "Thursday, February 5, 1970" ICUAT " 3:33:13 PM " GMT_FULL, // c #else "Thursday, February 5, 1970 3:33:13 PM GMT+00:00", // c @@ -420,7 +420,7 @@ BOOST_LOCALE_END_CONST_CONDITION "33","\n","PM", "03:33:13 PM",// Mnpr "15:33","13","\t","15:33:13", // RStT "Feb 5, 1970","3:33:13 PM","70","1970", // xXyY - #if BOOST_ICU_VER >= 408 + #if BOOST_LOCALE_ICU_VERSION >= 408 GMT_FULL // Z #else "GMT+00:00" // Z @@ -465,7 +465,7 @@ void test_format(std::string charset="UTF-8") FORMAT("{1}",1200.1,"1200.1"); FORMAT("Test {1,num}",1200.1,"Test 1,200.1"); FORMAT("{{}} {1,number}",1200.1,"{} 1,200.1"); - #if BOOST_ICU_VER < 5601 + #if BOOST_LOCALE_ICU_VERSION < 5601 // bug #13276 FORMAT("{1,num=sci,p=3}",13.1,"1.310E1"); FORMAT("{1,num=scientific,p=3}",13.1,"1.310E1"); @@ -479,20 +479,20 @@ void test_format(std::string charset="UTF-8") FORMAT("{1,cur}",1234,"$1,234.00"); FORMAT("{1,currency}",1234,"$1,234.00"); if(charset=="UTF-8") { -#if BOOST_ICU_VER >= 400 +#if BOOST_LOCALE_ICU_VERSION >= 400 FORMAT("{1,cur,locale=de_DE}",10,"10,00\xC2\xA0€"); #else FORMAT("{1,cur,locale=de_DE}",10,"10,00 €"); #endif } - #if BOOST_ICU_VER >= 402 + #if BOOST_LOCALE_ICU_VERSION >= 402 FORMAT("{1,cur=nat}",1234,"$1,234.00"); FORMAT("{1,cur=national}",1234,"$1,234.00"); FORMAT("{1,cur=iso}",1234,"USD1,234.00"); #endif FORMAT("{1,spell}",10,"ten"); FORMAT("{1,spellout}",10,"ten"); - #if 402 <= BOOST_ICU_VER && BOOST_ICU_VER < 408 + #if 402 <= BOOST_LOCALE_ICU_VERSION && BOOST_LOCALE_ICU_VERSION < 408 if(charset=="UTF-8") { FORMAT("{1,ord}",1,"1\xcb\xa2\xe1\xb5\x97"); FORMAT("{1,ordinal}",1,"1\xcb\xa2\xe1\xb5\x97"); @@ -519,7 +519,7 @@ void test_format(std::string charset="UTF-8") time_t a_datetime = a_date + a_time + a_timesec; FORMAT("{1,date,gmt};{1,time,gmt};{1,datetime,gmt};{1,dt,gmt}",a_datetime, "Feb 5, 1970;3:33:13 PM;Feb 5, 1970" PERIOD " 3:33:13 PM;Feb 5, 1970" PERIOD " 3:33:13 PM"); - #if BOOST_ICU_VER >= 408 + #if BOOST_LOCALE_ICU_VERSION >= 408 FORMAT("{1,time=short,gmt};{1,time=medium,gmt};{1,time=long,gmt};{1,date=full,gmt}",a_datetime, "3:33 PM;3:33:13 PM;3:33:13 PM GMT;Thursday, February 5, 1970"); FORMAT("{1,time=s,gmt};{1,time=m,gmt};{1,time=l,gmt};{1,date=f,gmt}",a_datetime, From f03bf9975f902021b723dee21c22b3f211484727 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 6 Jul 2022 14:53:58 +0200 Subject: [PATCH 73/90] Avoid `INT8_MIN` etc. macro redefinition warnings when using old ICU Simply include `stdint.h` first which makes ICU not define those macros. --- src/boost/locale/icu/time_zone.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/boost/locale/icu/time_zone.hpp b/src/boost/locale/icu/time_zone.hpp index 3fbeb83f..2e4d3e72 100644 --- a/src/boost/locale/icu/time_zone.hpp +++ b/src/boost/locale/icu/time_zone.hpp @@ -8,6 +8,10 @@ #ifndef BOOST_LOCALE_IMPL_ICU_GET_TIME_ZONE_HPP #define BOOST_LOCALE_IMPL_ICU_GET_TIME_ZONE_HPP +#include +#ifdef BOOST_HAS_STDINT_H +#include // Avoid ICU defining e.g. INT8_MIN causing macro redefinition warnings +#endif #include #include From 72a8e9eb75bd578b60d560f6c1f798af9cdfbf49 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Thu, 7 Jul 2022 09:15:58 +0200 Subject: [PATCH 74/90] Refactor build Jamfile - Sort imports - Remove unnecessary `obj` targets and use `exe` directly - Use `} else` style - Add missing parentheses to complex conditions - Closes #101 --- build/Jamfile.v2 | 66 +++++++++++++++++------------------------------- 1 file changed, 23 insertions(+), 43 deletions(-) diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 658c8418..faaba57a 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -4,9 +4,9 @@ # http://www.boost.org/LICENSE_1_0.txt. import configure ; +import feature ; import os ; import toolset ; -import feature ; path-constant TOP : .. ; @@ -26,8 +26,7 @@ feature.feature boost.locale.winapi : on off : optional propagated ; ## iconv -obj has_iconv_libc_obj : $(TOP)/build/has_iconv.cpp ; -exe has_iconv : has_iconv_libc_obj ; +exe has_iconv : $(TOP)/build/has_iconv.cpp ; explicit has_iconv ; ICONV_PATH = [ modules.peek : ICONV_PATH ] ; @@ -41,8 +40,7 @@ lib iconv explicit iconv ; -obj has_iconv_libc_ext : $(TOP)/build/has_iconv.cpp iconv ; -exe has_external_iconv : has_iconv_libc_ext iconv ; +exe has_external_iconv : $(TOP)/build/has_iconv.cpp iconv ; explicit has_external_iconv ; exe accepts_shared_option : $(TOP)/build/option.cpp @@ -53,8 +51,8 @@ exe accepts_shared_option : $(TOP)/build/option.cpp ; # Xlocale -obj has_xlocale_obj : $(TOP)/build/has_xlocale.cpp ; -exe has_xlocale : has_xlocale_obj ; + +exe has_xlocale : $(TOP)/build/has_xlocale.cpp ; explicit has_xlocale ; #end xlocale @@ -67,8 +65,7 @@ if $(ICU_LINK) { ICU_OPTS = $(ICU_PATH)/include $(ICU_LINK) $(ICU_PATH)/bin shared ; ICU64_OPTS = $(ICU_PATH)/include $(ICU_LINK) $(ICU_PATH)/bin64 shared ; -} -else +} else { searched-lib icuuc : : icuuc $(ICU_PATH)/lib @@ -186,14 +183,10 @@ else $(ICU_PATH)/bin64 shared ; - } -obj has_icu_obj : $(TOP)/build/has_icu_test.cpp : $(ICU_OPTS) ; -obj has_icu64_obj : $(TOP)/build/has_icu_test.cpp : $(ICU64_OPTS) ; - -exe has_icu : has_icu_obj : $(ICU_OPTS) ; -exe has_icu64 : has_icu64_obj : $(ICU64_OPTS) ; +exe has_icu : $(TOP)/build/has_icu_test.cpp : $(ICU_OPTS) ; +exe has_icu64 : $(TOP)/build/has_icu_test.cpp : $(ICU64_OPTS) ; explicit has_icu has_icu64 ; @@ -209,22 +202,19 @@ rule configure-full ( properties * : flags-only ) local found-iconv ; + # The system Iconv on Solaris may have bugs, while the GNU Iconv is fine. + # So enable by default only if not on Solaris. if on in $(properties) - || ! in $(properties:G) - && ! solaris in $(properties) + || ( ! in $(properties:G) && ! solaris in $(properties) ) { # See if iconv is bundled with standard library. if [ configure.builds has_iconv : $(properties) : "iconv (libc)" ] { found-iconv = true ; - } - else + } else if [ configure.builds has_external_iconv : $(properties) : "iconv (separate)" ] { - if [ configure.builds has_external_iconv : $(properties) : "iconv (separate)" ] - { - found-iconv = true ; - result += iconv ; - } + found-iconv = true ; + result += iconv ; } } if $(found-iconv) @@ -240,8 +230,7 @@ rule configure-full ( properties * : flags-only ) { found-icu = true ; flags-result += BOOST_LOCALE_WITH_ICU=1 $(ICU_OPTS) ; - } - else if [ configure.builds has_icu64 : $(properties) : "icu (lib64)" ] + } else if [ configure.builds has_icu64 : $(properties) : "icu (lib64)" ] { found-icu = true ; flags-result += BOOST_LOCALE_WITH_ICU=1 $(ICU64_OPTS) ; @@ -265,7 +254,6 @@ rule configure-full ( properties * : flags-only ) /boost/thread//boost_thread ; } - } if ! $(found-iconv) && ! $(found-icu) && ! windows in $(properties) && ! cygwin in $(properties) @@ -279,8 +267,7 @@ rule configure-full ( properties * : flags-only ) if sun in $(properties) { properties += off ; - } - else + } else { properties += on ; } @@ -289,8 +276,7 @@ rule configure-full ( properties * : flags-only ) if off in $(properties) { flags-result += BOOST_LOCALE_NO_STD_BACKEND=1 ; - } - else + } else { STD_SOURCES = codecvt @@ -304,12 +290,10 @@ rule configure-full ( properties * : flags-only ) if ! in $(properties:G) { - if windows in $(properties) - || cygwin in $(properties) + if windows in $(properties) || cygwin in $(properties) { properties += on ; - } - else + } else { properties += off ; } @@ -329,8 +313,7 @@ rule configure-full ( properties * : flags-only ) if off in $(properties) { flags-result += BOOST_LOCALE_NO_WINAPI_BACKEND=1 ; - } - else + } else { WINAPI_SOURCES = collate @@ -354,8 +337,7 @@ rule configure-full ( properties * : flags-only ) || ( freebsd in $(properties) && [ configure.builds has_xlocale : $(properties) : "xlocale supported" ] ) { properties += on ; - } - else + } else { properties += off ; } @@ -364,8 +346,7 @@ rule configure-full ( properties * : flags-only ) if off in $(properties) { flags-result += BOOST_LOCALE_NO_POSIX_BACKEND=1 ; - } - else + } else { POSIX_SOURCES = collate @@ -385,8 +366,7 @@ rule configure-full ( properties * : flags-only ) if "$(flags-only)" = "flags" { return $(flags-result) ; - } - else + } else { result += $(flags-result) ; return $(result) ; From fc42deafb37b52bae4fe2fdea7c5dcf557b90c94 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Thu, 7 Jul 2022 10:36:33 +0200 Subject: [PATCH 75/90] Add ICU_LINK_LOCALE to specify link flags for using ICU Only temporary for the Boost 1.80 release to allow building Boost.Locale and Boost.Regex until a full solution is introduced in Boost 1.81. --- build/Jamfile.v2 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index faaba57a..a1a7de48 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -60,8 +60,17 @@ explicit has_xlocale ; ICU_PATH = [ modules.peek : ICU_PATH ] ; ICU_LINK = [ modules.peek : ICU_LINK ] ; +# Temporary workaround for incompatibility of ICU_LINK with Boost.Regex: +# Use ICU_LINK_LOCALE instead of ICU_LINK. +# Note that ICU_LINK and ICU_LINK_LOCALE will be removed in Boost 1.81 +# in favor of a similar solution to Boost.Regex or a B2 module. +ICU_LINK_LOCALE = [ modules.peek : ICU_LINK_LOCALE ] ; -if $(ICU_LINK) +if $(ICU_LINK_LOCALE) +{ + ICU_OPTS = $(ICU_PATH)/include $(ICU_LINK_LOCALE) $(ICU_PATH)/bin shared ; + ICU64_OPTS = $(ICU_PATH)/include $(ICU_LINK_LOCALE) $(ICU_PATH)/bin64 shared ; +} else if $(ICU_LINK) { ICU_OPTS = $(ICU_PATH)/include $(ICU_LINK) $(ICU_PATH)/bin shared ; ICU64_OPTS = $(ICU_PATH)/include $(ICU_LINK) $(ICU_PATH)/bin64 shared ; From 9441d0f7c3e56853dcdbd968018a4ad094650565 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Mon, 11 Jul 2022 17:29:45 +0200 Subject: [PATCH 76/90] Generate docu using B2 and remove (outdated) html folder --- .github/workflows/ci.yml | 19 + doc/Jamfile.v2 | 44 + doc/html/annotated.html | 144 - doc/html/annotated.js | 7 - doc/html/appendix.html | 90 - doc/html/appendix.js | 34 - doc/html/bc_s.png | Bin 676 -> 0 bytes doc/html/bdwn.png | Bin 147 -> 0 bytes doc/html/boost-small.png | Bin 8332 -> 0 bytes doc/html/boundary_8cpp-example.html | 150 - doc/html/boundary_8hpp_source.html | 100 - doc/html/boundary__point_8hpp_source.html | 216 -- doc/html/boundary_analysys.html | 371 --- doc/html/building_boost_locale.html | 161 - doc/html/calendar_8cpp-example.html | 149 - doc/html/changelog.html | 116 - doc/html/charset_handling.html | 161 - ...1locale_1_1abstract__calendar-members.html | 115 - ...boost_1_1locale_1_1abstract__calendar.html | 607 ---- ...ssboost_1_1locale_1_1abstract__calendar.js | 34 - ...st_1_1locale_1_1basic__format-members.html | 96 - ...classboost_1_1locale_1_1basic__format.html | 338 --- .../classboost_1_1locale_1_1basic__format.js | 12 - ...t_1_1locale_1_1basic__message-members.html | 109 - ...lassboost_1_1locale_1_1basic__message.html | 160 - .../classboost_1_1locale_1_1basic__message.js | 25 - ...oundary_1_1boundary__indexing-members.html | 90 - ...ale_1_1boundary_1_1boundary__indexing.html | 220 -- ...ocale_1_1boundary_1_1boundary__indexing.js | 6 - ...cale_1_1boundary_1_1boundary__indexing.png | Bin 854 -> 0 bytes ..._1boundary_1_1boundary__point-members.html | 99 - ...locale_1_1boundary_1_1boundary__point.html | 467 --- ..._1locale_1_1boundary_1_1boundary__point.js | 15 - ...ary_1_1boundary__point__index-members.html | 103 - ...1_1boundary_1_1boundary__point__index.html | 176 -- ...e_1_1boundary_1_1boundary__point__index.js | 19 - ...locale_1_1boundary_1_1segment-members.html | 107 - ...oost_1_1locale_1_1boundary_1_1segment.html | 600 ---- ...sboost_1_1locale_1_1boundary_1_1segment.js | 23 - ...boost_1_1locale_1_1boundary_1_1segment.png | Bin 1002 -> 0 bytes ...1_1boundary_1_1segment__index-members.html | 105 - ...1locale_1_1boundary_1_1segment__index.html | 178 -- ...1_1locale_1_1boundary_1_1segment__index.js | 21 - ...ssboost_1_1locale_1_1calendar-members.html | 106 - .../classboost_1_1locale_1_1calendar.html | 432 --- doc/html/classboost_1_1locale_1_1calendar.js | 22 - ..._1_1locale_1_1calendar__facet-members.html | 90 - ...assboost_1_1locale_1_1calendar__facet.html | 192 -- ...classboost_1_1locale_1_1calendar__facet.js | 6 - ...lassboost_1_1locale_1_1calendar__facet.png | Bin 564 -> 0 bytes ...ssboost_1_1locale_1_1collator-members.html | 109 - .../classboost_1_1locale_1_1collator.html | 756 ----- doc/html/classboost_1_1locale_1_1collator.js | 19 - doc/html/classboost_1_1locale_1_1collator.png | Bin 1177 -> 0 bytes ...t_1_1locale_1_1collator__base-members.html | 93 - ...lassboost_1_1locale_1_1collator__base.html | 151 - .../classboost_1_1locale_1_1collator__base.js | 10 - ...classboost_1_1locale_1_1collator__base.png | Bin 754 -> 0 bytes ..._1_1conv_1_1conversion__error-members.html | 88 - ..._1locale_1_1conv_1_1conversion__error.html | 104 - ..._1_1locale_1_1conv_1_1conversion__error.js | 4 - ...1_1locale_1_1conv_1_1conversion__error.png | Bin 659 -> 0 bytes ...nv_1_1invalid__charset__error-members.html | 88 - ...le_1_1conv_1_1invalid__charset__error.html | 113 - ...cale_1_1conv_1_1invalid__charset__error.js | 4 - ...ale_1_1conv_1_1invalid__charset__error.png | Bin 705 -> 0 bytes ...sboost_1_1locale_1_1converter-members.html | 96 - .../classboost_1_1locale_1_1converter.html | 192 -- doc/html/classboost_1_1locale_1_1converter.js | 6 - .../classboost_1_1locale_1_1converter.png | Bin 1051 -> 0 bytes ..._1_1locale_1_1converter__base-members.html | 93 - ...assboost_1_1locale_1_1converter__base.html | 151 - ...classboost_1_1locale_1_1converter__base.js | 10 - ...lassboost_1_1locale_1_1converter__base.png | Bin 787 -> 0 bytes ...boost_1_1locale_1_1date__time-members.html | 138 - .../classboost_1_1locale_1_1date__time.html | 1190 -------- .../classboost_1_1locale_1_1date__time.js | 54 - ...ocale_1_1date__time__duration-members.html | 92 - ...ost_1_1locale_1_1date__time__duration.html | 248 -- ...boost_1_1locale_1_1date__time__duration.js | 8 - ..._1locale_1_1date__time__error-members.html | 88 - ...sboost_1_1locale_1_1date__time__error.html | 137 - ...assboost_1_1locale_1_1date__time__error.js | 4 - ...ssboost_1_1locale_1_1date__time__error.png | Bin 621 -> 0 bytes ...le_1_1date__time__period__set-members.html | 93 - ..._1_1locale_1_1date__time__period__set.html | 264 -- ...st_1_1locale_1_1date__time__period__set.js | 9 - ...sboost_1_1locale_1_1generator-members.html | 109 - .../classboost_1_1locale_1_1generator.html | 533 ---- doc/html/classboost_1_1locale_1_1generator.js | 25 - ...ssboost_1_1locale_1_1generic__codecvt.html | 175 -- ..._00_01CodecvtImpl_00_011_01_4-members.html | 93 - ...CharType_00_01CodecvtImpl_00_011_01_4.html | 121 - ...01CharType_00_01CodecvtImpl_00_011_01_4.js | 6 - ...1CharType_00_01CodecvtImpl_00_011_01_4.png | Bin 1855 -> 0 bytes ..._00_01CodecvtImpl_00_012_01_4-members.html | 100 - ...CharType_00_01CodecvtImpl_00_012_01_4.html | 158 - ...01CharType_00_01CodecvtImpl_00_012_01_4.js | 13 - ...1CharType_00_01CodecvtImpl_00_012_01_4.png | Bin 1871 -> 0 bytes ..._00_01CodecvtImpl_00_014_01_4-members.html | 100 - ...CharType_00_01CodecvtImpl_00_014_01_4.html | 157 - ...01CharType_00_01CodecvtImpl_00_014_01_4.js | 13 - ...1CharType_00_01CodecvtImpl_00_014_01_4.png | Bin 1872 -> 0 bytes ...ale_1_1generic__codecvt__base-members.html | 90 - ...t_1_1locale_1_1generic__codecvt__base.html | 138 - ...ost_1_1locale_1_1generic__codecvt__base.js | 7 - ...st_1_1locale_1_1generic__codecvt__base.png | Bin 1820 -> 0 bytes ...sboost_1_1locale_1_1hold__ptr-members.html | 99 - .../classboost_1_1locale_1_1hold__ptr.html | 420 --- doc/html/classboost_1_1locale_1_1hold__ptr.js | 15 - .../classboost_1_1locale_1_1info-members.html | 105 - doc/html/classboost_1_1locale_1_1info.html | 427 --- doc/html/classboost_1_1locale_1_1info.js | 23 - doc/html/classboost_1_1locale_1_1info.png | Bin 444 -> 0 bytes ...sboost_1_1locale_1_1ios__info-members.html | 104 - .../classboost_1_1locale_1_1ios__info.html | 453 --- doc/html/classboost_1_1locale_1_1ios__info.js | 20 - ...cale_1_1localization__backend-members.html | 93 - ...st_1_1locale_1_1localization__backend.html | 243 -- ...oost_1_1locale_1_1localization__backend.js | 9 - ...ocalization__backend__manager-members.html | 98 - ...ale_1_1localization__backend__manager.html | 351 --- ...ocale_1_1localization__backend__manager.js | 14 - ..._1_1locale_1_1message__format-members.html | 95 - ...assboost_1_1locale_1_1message__format.html | 131 - ...classboost_1_1locale_1_1message__format.js | 11 - ...lassboost_1_1locale_1_1message__format.png | Bin 911 -> 0 bytes ...ale_1_1period_1_1period__type-members.html | 91 - ...t_1_1locale_1_1period_1_1period__type.html | 212 -- ...ost_1_1locale_1_1period_1_1period__type.js | 7 - ...st_1_1locale_1_1utf8__codecvt-members.html | 92 - ...classboost_1_1locale_1_1utf8__codecvt.html | 138 - .../classboost_1_1locale_1_1utf8__codecvt.js | 9 - .../classboost_1_1locale_1_1utf8__codecvt.png | Bin 1177 -> 0 bytes ...le_1_1util_1_1base__converter-members.html | 95 - ..._1_1locale_1_1util_1_1base__converter.html | 323 -- ...st_1_1locale_1_1util_1_1base__converter.js | 11 - doc/html/classboost_1_1shared__ptr.html | 87 - doc/html/classes.html | 116 - doc/html/closed.png | Bin 132 -> 0 bytes doc/html/collate_8cpp-example.html | 113 - doc/html/collation.html | 96 - doc/html/collator_8hpp_source.html | 247 -- doc/html/config_8hpp_source.html | 119 - doc/html/conversion_8hpp_source.html | 353 --- doc/html/conversions.html | 124 - doc/html/conversions_8cpp-example.html | 122 - doc/html/date__time_8hpp_source.html | 675 ----- doc/html/date__time__facet_8hpp_source.html | 290 -- doc/html/dates_times_timezones.html | 186 -- doc/html/default_encoding_under_windows.html | 105 - doc/html/definitions_8hpp_source.html | 116 - .../dir_3766567721029811f1987dd2bae66bec.html | 91 - .../dir_3766567721029811f1987dd2bae66bec.js | 8 - .../dir_420b709140677111ffb4101b86320b19.html | 132 - .../dir_420b709140677111ffb4101b86320b19.js | 27 - .../dir_c8984f1860c11f62f47abb6761e46c1e.html | 83 - .../dir_c8984f1860c11f62f47abb6761e46c1e.js | 4 - doc/html/doxygen.css | 1366 --------- doc/html/doxygen.png | Bin 3779 -> 0 bytes doc/html/dynsections.js | 97 - doc/html/encoding_8hpp_source.html | 268 -- doc/html/encoding__errors_8hpp_source.html | 148 - doc/html/encoding__utf_8hpp_source.html | 170 -- doc/html/examples.html | 95 - doc/html/examples.js | 11 - doc/html/facets_8hpp_source.html | 241 -- doc/html/faq.html | 102 - doc/html/files.html | 117 - doc/html/files.js | 4 - doc/html/format_8hpp_source.html | 488 --- doc/html/formatting_8hpp_source.html | 590 ---- doc/html/formatting_and_parsing.html | 178 -- doc/html/ftv2blank.png | Bin 86 -> 0 bytes doc/html/ftv2cl.png | Bin 453 -> 0 bytes doc/html/ftv2doc.png | Bin 746 -> 0 bytes doc/html/ftv2folderclosed.png | Bin 616 -> 0 bytes doc/html/ftv2folderopen.png | Bin 597 -> 0 bytes doc/html/ftv2lastnode.png | Bin 86 -> 0 bytes doc/html/ftv2link.png | Bin 746 -> 0 bytes doc/html/ftv2mlastnode.png | Bin 246 -> 0 bytes doc/html/ftv2mnode.png | Bin 246 -> 0 bytes doc/html/ftv2mo.png | Bin 403 -> 0 bytes doc/html/ftv2node.png | Bin 86 -> 0 bytes doc/html/ftv2ns.png | Bin 388 -> 0 bytes doc/html/ftv2plastnode.png | Bin 229 -> 0 bytes doc/html/ftv2pnode.png | Bin 229 -> 0 bytes doc/html/ftv2splitbar.png | Bin 314 -> 0 bytes doc/html/ftv2vertline.png | Bin 86 -> 0 bytes doc/html/functions.html | 147 - doc/html/functions_b.html | 147 - doc/html/functions_c.html | 210 -- doc/html/functions_d.html | 182 -- doc/html/functions_dup.js | 25 - doc/html/functions_e.html | 140 - doc/html/functions_enum.html | 116 - doc/html/functions_eval.html | 179 -- doc/html/functions_f.html | 139 - doc/html/functions_func.html | 134 - doc/html/functions_func.js | 24 - doc/html/functions_func_b.html | 142 - doc/html/functions_func_c.html | 174 -- doc/html/functions_func_d.html | 172 -- doc/html/functions_func_e.html | 134 - doc/html/functions_func_f.html | 132 - doc/html/functions_func_g.html | 166 - doc/html/functions_func_h.html | 125 - doc/html/functions_func_i.html | 146 - doc/html/functions_func_l.html | 134 - doc/html/functions_func_m.html | 141 - doc/html/functions_func_n.html | 125 - doc/html/functions_func_o.html | 211 -- doc/html/functions_func_p.html | 122 - doc/html/functions_func_r.html | 134 - doc/html/functions_func_s.html | 167 - doc/html/functions_func_t.html | 137 - doc/html/functions_func_u.html | 125 - doc/html/functions_func_v.html | 122 - doc/html/functions_func_w.html | 126 - doc/html/functions_func_~.html | 125 - doc/html/functions_g.html | 168 - doc/html/functions_h.html | 126 - doc/html/functions_i.html | 178 -- doc/html/functions_l.html | 149 - doc/html/functions_m.html | 151 - doc/html/functions_n.html | 136 - doc/html/functions_o.html | 215 -- doc/html/functions_p.html | 129 - doc/html/functions_q.html | 123 - doc/html/functions_r.html | 139 - doc/html/functions_s.html | 187 -- doc/html/functions_t.html | 150 - doc/html/functions_type.html | 147 - doc/html/functions_u.html | 135 - doc/html/functions_v.html | 136 - doc/html/functions_vars.html | 153 - doc/html/functions_w.html | 127 - doc/html/functions_~.html | 126 - doc/html/generator_8hpp_source.html | 241 -- doc/html/generic__codecvt_8hpp_source.html | 650 ---- doc/html/gettext_for_windows.html | 128 - doc/html/glossary.html | 104 - doc/html/gnu__gettext_8hpp_source.html | 211 -- doc/html/group__boundary.html | 1719 ----------- doc/html/group__boundary.js | 206 -- doc/html/group__codepage.html | 862 ------ doc/html/group__codepage.js | 32 - doc/html/group__collation.html | 94 - doc/html/group__collation.js | 34 - doc/html/group__convert.html | 691 ----- doc/html/group__convert.js | 39 - doc/html/group__date__time.html | 299 -- doc/html/group__date__time.js | 109 - doc/html/group__format.html | 193 -- doc/html/group__format.js | 19 - doc/html/group__manipulators.html | 920 ------ doc/html/group__manipulators.js | 33 - doc/html/group__message.html | 1526 ---------- doc/html/group__message.js | 90 - doc/html/hello_8cpp-example.html | 119 - doc/html/hierarchy.html | 146 - doc/html/hierarchy.js | 71 - doc/html/hold__ptr_8hpp_source.html | 147 - doc/html/index.html | 134 - doc/html/index_8hpp_source.html | 880 ------ doc/html/info_8hpp_source.html | 184 -- doc/html/jquery.js | 72 - doc/html/locale_gen.html | 132 - doc/html/locale_information.html | 89 - .../localization__backend_8hpp_source.html | 177 -- doc/html/localized_text_formatting.html | 173 -- doc/html/message_8hpp_source.html | 709 ----- doc/html/messages_formatting.html | 419 --- doc/html/modules.html | 89 - doc/html/modules.js | 45 - doc/html/namespaceboost_1_1locale.html | 480 --- doc/html/namespaceboost_1_1locale.js | 41 - doc/html/namespaceboost_1_1locale_1_1as.html | 156 - .../namespaceboost_1_1locale_1_1boundary.html | 543 ---- .../namespaceboost_1_1locale_1_1boundary.js | 9 - .../namespaceboost_1_1locale_1_1conv.html | 164 - doc/html/namespaceboost_1_1locale_1_1conv.js | 5 - .../namespaceboost_1_1locale_1_1flags.html | 192 -- ...espaceboost_1_1locale_1_1gnu__gettext.html | 124 - ...amespaceboost_1_1locale_1_1gnu__gettext.js | 4 - .../namespaceboost_1_1locale_1_1period.html | 2690 ----------------- .../namespaceboost_1_1locale_1_1period.js | 5 - ...aceboost_1_1locale_1_1period_1_1marks.html | 192 -- ...amespaceboost_1_1locale_1_1time__zone.html | 132 - doc/html/namespaceboost_1_1locale_1_1utf.html | 126 - doc/html/namespaceboost_1_1locale_1_1utf.js | 4 - .../namespaceboost_1_1locale_1_1util.html | 300 -- doc/html/namespaceboost_1_1locale_1_1util.js | 4 - doc/html/namespacemembers.html | 138 - doc/html/namespacemembers_b.html | 131 - doc/html/namespacemembers_c.html | 206 -- doc/html/namespacemembers_d.html | 190 -- doc/html/namespacemembers_dup.js | 25 - doc/html/namespacemembers_e.html | 127 - doc/html/namespacemembers_enum.html | 112 - doc/html/namespacemembers_eval.html | 262 -- doc/html/namespacemembers_f.html | 144 - doc/html/namespacemembers_func.html | 129 - doc/html/namespacemembers_func.js | 23 - doc/html/namespacemembers_func_b.html | 123 - doc/html/namespacemembers_func_c.html | 150 - doc/html/namespacemembers_func_d.html | 171 -- doc/html/namespacemembers_func_e.html | 123 - doc/html/namespacemembers_func_f.html | 135 - doc/html/namespacemembers_func_g.html | 129 - doc/html/namespacemembers_func_h.html | 123 - doc/html/namespacemembers_func_i.html | 123 - doc/html/namespacemembers_func_j.html | 126 - doc/html/namespacemembers_func_l.html | 120 - doc/html/namespacemembers_func_m.html | 132 - doc/html/namespacemembers_func_n.html | 132 - doc/html/namespacemembers_func_o.html | 159 - doc/html/namespacemembers_func_p.html | 129 - doc/html/namespacemembers_func_s.html | 135 - doc/html/namespacemembers_func_t.html | 159 - doc/html/namespacemembers_func_u.html | 120 - doc/html/namespacemembers_func_w.html | 126 - doc/html/namespacemembers_func_y.html | 120 - doc/html/namespacemembers_g.html | 131 - doc/html/namespacemembers_h.html | 127 - doc/html/namespacemembers_i.html | 138 - doc/html/namespacemembers_j.html | 128 - doc/html/namespacemembers_l.html | 140 - doc/html/namespacemembers_m.html | 145 - doc/html/namespacemembers_n.html | 161 - doc/html/namespacemembers_o.html | 161 - doc/html/namespacemembers_p.html | 146 - doc/html/namespacemembers_r.html | 122 - doc/html/namespacemembers_s.html | 171 -- doc/html/namespacemembers_t.html | 164 - doc/html/namespacemembers_type.html | 273 -- doc/html/namespacemembers_u.html | 182 -- doc/html/namespacemembers_v.html | 122 - doc/html/namespacemembers_vars.html | 277 -- doc/html/namespacemembers_w.html | 193 -- doc/html/namespacemembers_y.html | 123 - doc/html/namespaces.html | 99 - doc/html/namespaces.js | 6 - doc/html/nav_f.png | Bin 153 -> 0 bytes doc/html/nav_g.png | Bin 95 -> 0 bytes doc/html/nav_h.png | Bin 98 -> 0 bytes doc/html/navtree.css | 143 - doc/html/navtree.js | 559 ---- doc/html/navtreeindex0.js | 253 -- doc/html/navtreeindex1.js | 253 -- doc/html/navtreeindex2.js | 253 -- doc/html/navtreeindex3.js | 252 -- doc/html/open.png | Bin 123 -> 0 bytes doc/html/pages.html | 81 - doc/html/rationale.html | 226 -- doc/html/recommendations_and_myths.html | 99 - doc/html/resize.js | 97 - doc/html/running_examples_under_windows.html | 87 - doc/html/segment_8hpp_source.html | 485 --- doc/html/special_thanks.html | 82 - .../status_of_cpp0x_characters_support.html | 93 - doc/html/std_locales.html | 137 - ...le_1_1boundary_1_1break__info-members.html | 92 - ..._1_1locale_1_1boundary_1_1break__info.html | 218 -- ...st_1_1locale_1_1boundary_1_1break__info.js | 8 - ...boost_1_1locale_1_1comparator-members.html | 89 - .../structboost_1_1locale_1_1comparator.html | 188 -- .../structboost_1_1locale_1_1comparator.js | 5 - ...1locale_1_1date__time__period-members.html | 92 - ...boost_1_1locale_1_1date__time__period.html | 217 -- ...ctboost_1_1locale_1_1date__time__period.js | 8 - ...nu__gettext_1_1messages__info-members.html | 98 - ...ale_1_1gnu__gettext_1_1messages__info.html | 240 -- ...ocale_1_1gnu__gettext_1_1messages__info.js | 15 - ...t_1_1messages__info_1_1domain-members.html | 93 - ...__gettext_1_1messages__info_1_1domain.html | 201 -- ...nu__gettext_1_1messages__info_1_1domain.js | 9 - ...oost_1_1locale_1_1posix__time-members.html | 89 - .../structboost_1_1locale_1_1posix__time.html | 106 - .../structboost_1_1locale_1_1posix__time.js | 5 - ...ocale_1_1utf8__codecvt_1_1state__type.html | 87 - ...1locale_1_1utf_1_1utf__traits-members.html | 96 - ...boost_1_1locale_1_1utf_1_1utf__traits.html | 415 --- ...ctboost_1_1locale_1_1utf_1_1utf__traits.js | 12 - doc/html/sync_off.png | Bin 853 -> 0 bytes doc/html/sync_on.png | Bin 845 -> 0 bytes doc/html/tab_a.png | Bin 142 -> 0 bytes doc/html/tab_b.png | Bin 169 -> 0 bytes doc/html/tab_h.png | Bin 177 -> 0 bytes doc/html/tab_s.png | Bin 184 -> 0 bytes doc/html/tabs.css | 60 - doc/html/tested_compilers_and_platforms.html | 104 - doc/html/time__zone_8hpp_source.html | 123 - doc/html/types_8hpp_source.html | 195 -- doc/html/using_boost_locale.html | 91 - doc/html/using_boost_locale.js | 68 - doc/html/using_localization_backends.html | 180 -- doc/html/utf8__codecvt_8hpp_source.html | 157 - doc/html/utf_8hpp_source.html | 472 --- doc/html/util_8hpp_source.html | 193 -- doc/html/wboundary_8cpp-example.html | 182 -- doc/html/wconversions_8cpp-example.html | 151 - doc/html/whello_8cpp-example.html | 123 - doc/html/working_with_multiple_locales.html | 93 - 404 files changed, 63 insertions(+), 61821 deletions(-) create mode 100644 doc/Jamfile.v2 delete mode 100644 doc/html/annotated.html delete mode 100644 doc/html/annotated.js delete mode 100644 doc/html/appendix.html delete mode 100644 doc/html/appendix.js delete mode 100644 doc/html/bc_s.png delete mode 100644 doc/html/bdwn.png delete mode 100644 doc/html/boost-small.png delete mode 100644 doc/html/boundary_8cpp-example.html delete mode 100644 doc/html/boundary_8hpp_source.html delete mode 100644 doc/html/boundary__point_8hpp_source.html delete mode 100644 doc/html/boundary_analysys.html delete mode 100644 doc/html/building_boost_locale.html delete mode 100644 doc/html/calendar_8cpp-example.html delete mode 100644 doc/html/changelog.html delete mode 100644 doc/html/charset_handling.html delete mode 100644 doc/html/classboost_1_1locale_1_1abstract__calendar-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1abstract__calendar.html delete mode 100644 doc/html/classboost_1_1locale_1_1abstract__calendar.js delete mode 100644 doc/html/classboost_1_1locale_1_1basic__format-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1basic__format.html delete mode 100644 doc/html/classboost_1_1locale_1_1basic__format.js delete mode 100644 doc/html/classboost_1_1locale_1_1basic__message-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1basic__message.html delete mode 100644 doc/html/classboost_1_1locale_1_1basic__message.js delete mode 100644 doc/html/classboost_1_1locale_1_1boundary_1_1boundary__indexing-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1boundary_1_1boundary__indexing.html delete mode 100644 doc/html/classboost_1_1locale_1_1boundary_1_1boundary__indexing.js delete mode 100644 doc/html/classboost_1_1locale_1_1boundary_1_1boundary__indexing.png delete mode 100644 doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point.html delete mode 100644 doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point.js delete mode 100644 doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point__index-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point__index.html delete mode 100644 doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point__index.js delete mode 100644 doc/html/classboost_1_1locale_1_1boundary_1_1segment-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1boundary_1_1segment.html delete mode 100644 doc/html/classboost_1_1locale_1_1boundary_1_1segment.js delete mode 100644 doc/html/classboost_1_1locale_1_1boundary_1_1segment.png delete mode 100644 doc/html/classboost_1_1locale_1_1boundary_1_1segment__index-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1boundary_1_1segment__index.html delete mode 100644 doc/html/classboost_1_1locale_1_1boundary_1_1segment__index.js delete mode 100644 doc/html/classboost_1_1locale_1_1calendar-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1calendar.html delete mode 100644 doc/html/classboost_1_1locale_1_1calendar.js delete mode 100644 doc/html/classboost_1_1locale_1_1calendar__facet-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1calendar__facet.html delete mode 100644 doc/html/classboost_1_1locale_1_1calendar__facet.js delete mode 100644 doc/html/classboost_1_1locale_1_1calendar__facet.png delete mode 100644 doc/html/classboost_1_1locale_1_1collator-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1collator.html delete mode 100644 doc/html/classboost_1_1locale_1_1collator.js delete mode 100644 doc/html/classboost_1_1locale_1_1collator.png delete mode 100644 doc/html/classboost_1_1locale_1_1collator__base-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1collator__base.html delete mode 100644 doc/html/classboost_1_1locale_1_1collator__base.js delete mode 100644 doc/html/classboost_1_1locale_1_1collator__base.png delete mode 100644 doc/html/classboost_1_1locale_1_1conv_1_1conversion__error-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1conv_1_1conversion__error.html delete mode 100644 doc/html/classboost_1_1locale_1_1conv_1_1conversion__error.js delete mode 100644 doc/html/classboost_1_1locale_1_1conv_1_1conversion__error.png delete mode 100644 doc/html/classboost_1_1locale_1_1conv_1_1invalid__charset__error-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1conv_1_1invalid__charset__error.html delete mode 100644 doc/html/classboost_1_1locale_1_1conv_1_1invalid__charset__error.js delete mode 100644 doc/html/classboost_1_1locale_1_1conv_1_1invalid__charset__error.png delete mode 100644 doc/html/classboost_1_1locale_1_1converter-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1converter.html delete mode 100644 doc/html/classboost_1_1locale_1_1converter.js delete mode 100644 doc/html/classboost_1_1locale_1_1converter.png delete mode 100644 doc/html/classboost_1_1locale_1_1converter__base-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1converter__base.html delete mode 100644 doc/html/classboost_1_1locale_1_1converter__base.js delete mode 100644 doc/html/classboost_1_1locale_1_1converter__base.png delete mode 100644 doc/html/classboost_1_1locale_1_1date__time-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1date__time.html delete mode 100644 doc/html/classboost_1_1locale_1_1date__time.js delete mode 100644 doc/html/classboost_1_1locale_1_1date__time__duration-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1date__time__duration.html delete mode 100644 doc/html/classboost_1_1locale_1_1date__time__duration.js delete mode 100644 doc/html/classboost_1_1locale_1_1date__time__error-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1date__time__error.html delete mode 100644 doc/html/classboost_1_1locale_1_1date__time__error.js delete mode 100644 doc/html/classboost_1_1locale_1_1date__time__error.png delete mode 100644 doc/html/classboost_1_1locale_1_1date__time__period__set-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1date__time__period__set.html delete mode 100644 doc/html/classboost_1_1locale_1_1date__time__period__set.js delete mode 100644 doc/html/classboost_1_1locale_1_1generator-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1generator.html delete mode 100644 doc/html/classboost_1_1locale_1_1generator.js delete mode 100644 doc/html/classboost_1_1locale_1_1generic__codecvt.html delete mode 100644 doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_011_01_4-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_011_01_4.html delete mode 100644 doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_011_01_4.js delete mode 100644 doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_011_01_4.png delete mode 100644 doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4.html delete mode 100644 doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4.js delete mode 100644 doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4.png delete mode 100644 doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4.html delete mode 100644 doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4.js delete mode 100644 doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4.png delete mode 100644 doc/html/classboost_1_1locale_1_1generic__codecvt__base-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1generic__codecvt__base.html delete mode 100644 doc/html/classboost_1_1locale_1_1generic__codecvt__base.js delete mode 100644 doc/html/classboost_1_1locale_1_1generic__codecvt__base.png delete mode 100644 doc/html/classboost_1_1locale_1_1hold__ptr-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1hold__ptr.html delete mode 100644 doc/html/classboost_1_1locale_1_1hold__ptr.js delete mode 100644 doc/html/classboost_1_1locale_1_1info-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1info.html delete mode 100644 doc/html/classboost_1_1locale_1_1info.js delete mode 100644 doc/html/classboost_1_1locale_1_1info.png delete mode 100644 doc/html/classboost_1_1locale_1_1ios__info-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1ios__info.html delete mode 100644 doc/html/classboost_1_1locale_1_1ios__info.js delete mode 100644 doc/html/classboost_1_1locale_1_1localization__backend-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1localization__backend.html delete mode 100644 doc/html/classboost_1_1locale_1_1localization__backend.js delete mode 100644 doc/html/classboost_1_1locale_1_1localization__backend__manager-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1localization__backend__manager.html delete mode 100644 doc/html/classboost_1_1locale_1_1localization__backend__manager.js delete mode 100644 doc/html/classboost_1_1locale_1_1message__format-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1message__format.html delete mode 100644 doc/html/classboost_1_1locale_1_1message__format.js delete mode 100644 doc/html/classboost_1_1locale_1_1message__format.png delete mode 100644 doc/html/classboost_1_1locale_1_1period_1_1period__type-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1period_1_1period__type.html delete mode 100644 doc/html/classboost_1_1locale_1_1period_1_1period__type.js delete mode 100644 doc/html/classboost_1_1locale_1_1utf8__codecvt-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1utf8__codecvt.html delete mode 100644 doc/html/classboost_1_1locale_1_1utf8__codecvt.js delete mode 100644 doc/html/classboost_1_1locale_1_1utf8__codecvt.png delete mode 100644 doc/html/classboost_1_1locale_1_1util_1_1base__converter-members.html delete mode 100644 doc/html/classboost_1_1locale_1_1util_1_1base__converter.html delete mode 100644 doc/html/classboost_1_1locale_1_1util_1_1base__converter.js delete mode 100644 doc/html/classboost_1_1shared__ptr.html delete mode 100644 doc/html/classes.html delete mode 100644 doc/html/closed.png delete mode 100644 doc/html/collate_8cpp-example.html delete mode 100644 doc/html/collation.html delete mode 100644 doc/html/collator_8hpp_source.html delete mode 100644 doc/html/config_8hpp_source.html delete mode 100644 doc/html/conversion_8hpp_source.html delete mode 100644 doc/html/conversions.html delete mode 100644 doc/html/conversions_8cpp-example.html delete mode 100644 doc/html/date__time_8hpp_source.html delete mode 100644 doc/html/date__time__facet_8hpp_source.html delete mode 100644 doc/html/dates_times_timezones.html delete mode 100644 doc/html/default_encoding_under_windows.html delete mode 100644 doc/html/definitions_8hpp_source.html delete mode 100644 doc/html/dir_3766567721029811f1987dd2bae66bec.html delete mode 100644 doc/html/dir_3766567721029811f1987dd2bae66bec.js delete mode 100644 doc/html/dir_420b709140677111ffb4101b86320b19.html delete mode 100644 doc/html/dir_420b709140677111ffb4101b86320b19.js delete mode 100644 doc/html/dir_c8984f1860c11f62f47abb6761e46c1e.html delete mode 100644 doc/html/dir_c8984f1860c11f62f47abb6761e46c1e.js delete mode 100644 doc/html/doxygen.css delete mode 100644 doc/html/doxygen.png delete mode 100644 doc/html/dynsections.js delete mode 100644 doc/html/encoding_8hpp_source.html delete mode 100644 doc/html/encoding__errors_8hpp_source.html delete mode 100644 doc/html/encoding__utf_8hpp_source.html delete mode 100644 doc/html/examples.html delete mode 100644 doc/html/examples.js delete mode 100644 doc/html/facets_8hpp_source.html delete mode 100644 doc/html/faq.html delete mode 100644 doc/html/files.html delete mode 100644 doc/html/files.js delete mode 100644 doc/html/format_8hpp_source.html delete mode 100644 doc/html/formatting_8hpp_source.html delete mode 100644 doc/html/formatting_and_parsing.html delete mode 100644 doc/html/ftv2blank.png delete mode 100644 doc/html/ftv2cl.png delete mode 100644 doc/html/ftv2doc.png delete mode 100644 doc/html/ftv2folderclosed.png delete mode 100644 doc/html/ftv2folderopen.png delete mode 100644 doc/html/ftv2lastnode.png delete mode 100644 doc/html/ftv2link.png delete mode 100644 doc/html/ftv2mlastnode.png delete mode 100644 doc/html/ftv2mnode.png delete mode 100644 doc/html/ftv2mo.png delete mode 100644 doc/html/ftv2node.png delete mode 100644 doc/html/ftv2ns.png delete mode 100644 doc/html/ftv2plastnode.png delete mode 100644 doc/html/ftv2pnode.png delete mode 100644 doc/html/ftv2splitbar.png delete mode 100644 doc/html/ftv2vertline.png delete mode 100644 doc/html/functions.html delete mode 100644 doc/html/functions_b.html delete mode 100644 doc/html/functions_c.html delete mode 100644 doc/html/functions_d.html delete mode 100644 doc/html/functions_dup.js delete mode 100644 doc/html/functions_e.html delete mode 100644 doc/html/functions_enum.html delete mode 100644 doc/html/functions_eval.html delete mode 100644 doc/html/functions_f.html delete mode 100644 doc/html/functions_func.html delete mode 100644 doc/html/functions_func.js delete mode 100644 doc/html/functions_func_b.html delete mode 100644 doc/html/functions_func_c.html delete mode 100644 doc/html/functions_func_d.html delete mode 100644 doc/html/functions_func_e.html delete mode 100644 doc/html/functions_func_f.html delete mode 100644 doc/html/functions_func_g.html delete mode 100644 doc/html/functions_func_h.html delete mode 100644 doc/html/functions_func_i.html delete mode 100644 doc/html/functions_func_l.html delete mode 100644 doc/html/functions_func_m.html delete mode 100644 doc/html/functions_func_n.html delete mode 100644 doc/html/functions_func_o.html delete mode 100644 doc/html/functions_func_p.html delete mode 100644 doc/html/functions_func_r.html delete mode 100644 doc/html/functions_func_s.html delete mode 100644 doc/html/functions_func_t.html delete mode 100644 doc/html/functions_func_u.html delete mode 100644 doc/html/functions_func_v.html delete mode 100644 doc/html/functions_func_w.html delete mode 100644 doc/html/functions_func_~.html delete mode 100644 doc/html/functions_g.html delete mode 100644 doc/html/functions_h.html delete mode 100644 doc/html/functions_i.html delete mode 100644 doc/html/functions_l.html delete mode 100644 doc/html/functions_m.html delete mode 100644 doc/html/functions_n.html delete mode 100644 doc/html/functions_o.html delete mode 100644 doc/html/functions_p.html delete mode 100644 doc/html/functions_q.html delete mode 100644 doc/html/functions_r.html delete mode 100644 doc/html/functions_s.html delete mode 100644 doc/html/functions_t.html delete mode 100644 doc/html/functions_type.html delete mode 100644 doc/html/functions_u.html delete mode 100644 doc/html/functions_v.html delete mode 100644 doc/html/functions_vars.html delete mode 100644 doc/html/functions_w.html delete mode 100644 doc/html/functions_~.html delete mode 100644 doc/html/generator_8hpp_source.html delete mode 100644 doc/html/generic__codecvt_8hpp_source.html delete mode 100644 doc/html/gettext_for_windows.html delete mode 100644 doc/html/glossary.html delete mode 100644 doc/html/gnu__gettext_8hpp_source.html delete mode 100644 doc/html/group__boundary.html delete mode 100644 doc/html/group__boundary.js delete mode 100644 doc/html/group__codepage.html delete mode 100644 doc/html/group__codepage.js delete mode 100644 doc/html/group__collation.html delete mode 100644 doc/html/group__collation.js delete mode 100644 doc/html/group__convert.html delete mode 100644 doc/html/group__convert.js delete mode 100644 doc/html/group__date__time.html delete mode 100644 doc/html/group__date__time.js delete mode 100644 doc/html/group__format.html delete mode 100644 doc/html/group__format.js delete mode 100644 doc/html/group__manipulators.html delete mode 100644 doc/html/group__manipulators.js delete mode 100644 doc/html/group__message.html delete mode 100644 doc/html/group__message.js delete mode 100644 doc/html/hello_8cpp-example.html delete mode 100644 doc/html/hierarchy.html delete mode 100644 doc/html/hierarchy.js delete mode 100644 doc/html/hold__ptr_8hpp_source.html delete mode 100644 doc/html/index.html delete mode 100644 doc/html/index_8hpp_source.html delete mode 100644 doc/html/info_8hpp_source.html delete mode 100644 doc/html/jquery.js delete mode 100644 doc/html/locale_gen.html delete mode 100644 doc/html/locale_information.html delete mode 100644 doc/html/localization__backend_8hpp_source.html delete mode 100644 doc/html/localized_text_formatting.html delete mode 100644 doc/html/message_8hpp_source.html delete mode 100644 doc/html/messages_formatting.html delete mode 100644 doc/html/modules.html delete mode 100644 doc/html/modules.js delete mode 100644 doc/html/namespaceboost_1_1locale.html delete mode 100644 doc/html/namespaceboost_1_1locale.js delete mode 100644 doc/html/namespaceboost_1_1locale_1_1as.html delete mode 100644 doc/html/namespaceboost_1_1locale_1_1boundary.html delete mode 100644 doc/html/namespaceboost_1_1locale_1_1boundary.js delete mode 100644 doc/html/namespaceboost_1_1locale_1_1conv.html delete mode 100644 doc/html/namespaceboost_1_1locale_1_1conv.js delete mode 100644 doc/html/namespaceboost_1_1locale_1_1flags.html delete mode 100644 doc/html/namespaceboost_1_1locale_1_1gnu__gettext.html delete mode 100644 doc/html/namespaceboost_1_1locale_1_1gnu__gettext.js delete mode 100644 doc/html/namespaceboost_1_1locale_1_1period.html delete mode 100644 doc/html/namespaceboost_1_1locale_1_1period.js delete mode 100644 doc/html/namespaceboost_1_1locale_1_1period_1_1marks.html delete mode 100644 doc/html/namespaceboost_1_1locale_1_1time__zone.html delete mode 100644 doc/html/namespaceboost_1_1locale_1_1utf.html delete mode 100644 doc/html/namespaceboost_1_1locale_1_1utf.js delete mode 100644 doc/html/namespaceboost_1_1locale_1_1util.html delete mode 100644 doc/html/namespaceboost_1_1locale_1_1util.js delete mode 100644 doc/html/namespacemembers.html delete mode 100644 doc/html/namespacemembers_b.html delete mode 100644 doc/html/namespacemembers_c.html delete mode 100644 doc/html/namespacemembers_d.html delete mode 100644 doc/html/namespacemembers_dup.js delete mode 100644 doc/html/namespacemembers_e.html delete mode 100644 doc/html/namespacemembers_enum.html delete mode 100644 doc/html/namespacemembers_eval.html delete mode 100644 doc/html/namespacemembers_f.html delete mode 100644 doc/html/namespacemembers_func.html delete mode 100644 doc/html/namespacemembers_func.js delete mode 100644 doc/html/namespacemembers_func_b.html delete mode 100644 doc/html/namespacemembers_func_c.html delete mode 100644 doc/html/namespacemembers_func_d.html delete mode 100644 doc/html/namespacemembers_func_e.html delete mode 100644 doc/html/namespacemembers_func_f.html delete mode 100644 doc/html/namespacemembers_func_g.html delete mode 100644 doc/html/namespacemembers_func_h.html delete mode 100644 doc/html/namespacemembers_func_i.html delete mode 100644 doc/html/namespacemembers_func_j.html delete mode 100644 doc/html/namespacemembers_func_l.html delete mode 100644 doc/html/namespacemembers_func_m.html delete mode 100644 doc/html/namespacemembers_func_n.html delete mode 100644 doc/html/namespacemembers_func_o.html delete mode 100644 doc/html/namespacemembers_func_p.html delete mode 100644 doc/html/namespacemembers_func_s.html delete mode 100644 doc/html/namespacemembers_func_t.html delete mode 100644 doc/html/namespacemembers_func_u.html delete mode 100644 doc/html/namespacemembers_func_w.html delete mode 100644 doc/html/namespacemembers_func_y.html delete mode 100644 doc/html/namespacemembers_g.html delete mode 100644 doc/html/namespacemembers_h.html delete mode 100644 doc/html/namespacemembers_i.html delete mode 100644 doc/html/namespacemembers_j.html delete mode 100644 doc/html/namespacemembers_l.html delete mode 100644 doc/html/namespacemembers_m.html delete mode 100644 doc/html/namespacemembers_n.html delete mode 100644 doc/html/namespacemembers_o.html delete mode 100644 doc/html/namespacemembers_p.html delete mode 100644 doc/html/namespacemembers_r.html delete mode 100644 doc/html/namespacemembers_s.html delete mode 100644 doc/html/namespacemembers_t.html delete mode 100644 doc/html/namespacemembers_type.html delete mode 100644 doc/html/namespacemembers_u.html delete mode 100644 doc/html/namespacemembers_v.html delete mode 100644 doc/html/namespacemembers_vars.html delete mode 100644 doc/html/namespacemembers_w.html delete mode 100644 doc/html/namespacemembers_y.html delete mode 100644 doc/html/namespaces.html delete mode 100644 doc/html/namespaces.js delete mode 100644 doc/html/nav_f.png delete mode 100644 doc/html/nav_g.png delete mode 100644 doc/html/nav_h.png delete mode 100644 doc/html/navtree.css delete mode 100644 doc/html/navtree.js delete mode 100644 doc/html/navtreeindex0.js delete mode 100644 doc/html/navtreeindex1.js delete mode 100644 doc/html/navtreeindex2.js delete mode 100644 doc/html/navtreeindex3.js delete mode 100644 doc/html/open.png delete mode 100644 doc/html/pages.html delete mode 100644 doc/html/rationale.html delete mode 100644 doc/html/recommendations_and_myths.html delete mode 100644 doc/html/resize.js delete mode 100644 doc/html/running_examples_under_windows.html delete mode 100644 doc/html/segment_8hpp_source.html delete mode 100644 doc/html/special_thanks.html delete mode 100644 doc/html/status_of_cpp0x_characters_support.html delete mode 100644 doc/html/std_locales.html delete mode 100644 doc/html/structboost_1_1locale_1_1boundary_1_1break__info-members.html delete mode 100644 doc/html/structboost_1_1locale_1_1boundary_1_1break__info.html delete mode 100644 doc/html/structboost_1_1locale_1_1boundary_1_1break__info.js delete mode 100644 doc/html/structboost_1_1locale_1_1comparator-members.html delete mode 100644 doc/html/structboost_1_1locale_1_1comparator.html delete mode 100644 doc/html/structboost_1_1locale_1_1comparator.js delete mode 100644 doc/html/structboost_1_1locale_1_1date__time__period-members.html delete mode 100644 doc/html/structboost_1_1locale_1_1date__time__period.html delete mode 100644 doc/html/structboost_1_1locale_1_1date__time__period.js delete mode 100644 doc/html/structboost_1_1locale_1_1gnu__gettext_1_1messages__info-members.html delete mode 100644 doc/html/structboost_1_1locale_1_1gnu__gettext_1_1messages__info.html delete mode 100644 doc/html/structboost_1_1locale_1_1gnu__gettext_1_1messages__info.js delete mode 100644 doc/html/structboost_1_1locale_1_1gnu__gettext_1_1messages__info_1_1domain-members.html delete mode 100644 doc/html/structboost_1_1locale_1_1gnu__gettext_1_1messages__info_1_1domain.html delete mode 100644 doc/html/structboost_1_1locale_1_1gnu__gettext_1_1messages__info_1_1domain.js delete mode 100644 doc/html/structboost_1_1locale_1_1posix__time-members.html delete mode 100644 doc/html/structboost_1_1locale_1_1posix__time.html delete mode 100644 doc/html/structboost_1_1locale_1_1posix__time.js delete mode 100644 doc/html/structboost_1_1locale_1_1utf8__codecvt_1_1state__type.html delete mode 100644 doc/html/structboost_1_1locale_1_1utf_1_1utf__traits-members.html delete mode 100644 doc/html/structboost_1_1locale_1_1utf_1_1utf__traits.html delete mode 100644 doc/html/structboost_1_1locale_1_1utf_1_1utf__traits.js delete mode 100644 doc/html/sync_off.png delete mode 100644 doc/html/sync_on.png delete mode 100644 doc/html/tab_a.png delete mode 100644 doc/html/tab_b.png delete mode 100644 doc/html/tab_h.png delete mode 100644 doc/html/tab_s.png delete mode 100644 doc/html/tabs.css delete mode 100644 doc/html/tested_compilers_and_platforms.html delete mode 100644 doc/html/time__zone_8hpp_source.html delete mode 100644 doc/html/types_8hpp_source.html delete mode 100644 doc/html/using_boost_locale.html delete mode 100644 doc/html/using_boost_locale.js delete mode 100644 doc/html/using_localization_backends.html delete mode 100644 doc/html/utf8__codecvt_8hpp_source.html delete mode 100644 doc/html/utf_8hpp_source.html delete mode 100644 doc/html/util_8hpp_source.html delete mode 100644 doc/html/wboundary_8cpp-example.html delete mode 100644 doc/html/wconversions_8cpp-example.html delete mode 100644 doc/html/whello_8cpp-example.html delete mode 100644 doc/html/working_with_multiple_locales.html diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ff5d608..9dcff4e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -451,3 +451,22 @@ jobs: fi fi ctest --output-on-failure --build-config ${{matrix.build_type}} + + Create_Boost_Documentation: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Fetch Boost.CI + uses: actions/checkout@v3 + with: + repository: boostorg/boost-ci + ref: master + path: boost-ci-cloned + - name: Get CI scripts folder + run: cp -r boost-ci-cloned/ci . && rm -rf boost-ci-cloned + - name: Setup Boost + run: source ci/github/install.sh + - name: Create documentation + run: | + sudo apt-get install -y doxygen + B2_TARGETS=libs/$SELF/doc ci/build.sh diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 new file mode 100644 index 00000000..ba52a5da --- /dev/null +++ b/doc/Jamfile.v2 @@ -0,0 +1,44 @@ +# Copyright (C) 2022 Alexander Grund +# Distributed under the Boost Software License, Version 1.0 +# (see accompanying file LICENSE or a copy at +# http://www.boost.org/LICENSE_1_0.txt) + +using doxygen ; +import doxygen ; +import path ; +import os ; + +path-constant here : . ; + +.doxygen = [ doxygen.name ] ; +.doxygen ?= doxygen ; + +local sources = [ path.glob-tree $(here)/../include/boost/locale : *.hpp : ] + [ path.glob $(here) : *.txt ] + [ path.glob $(here)/style : *.css *.png ] + templates/footer.html + ; + +make html : $(here)/Doxyfile : @make-html : $(sources) ; + +if [ os.name ] = NT +{ + RMDIR = rmdir /s /q ; +} +else +{ + RMDIR = rm -rf ; +} + +actions make-html { + cd $(here) + $(RMDIR) html + "$(.doxygen)" +} + +alias reference : html ; + +alias boostdoc ; +explicit boostdoc ; +alias boostrelease : html ; +explicit boostrelease ; diff --git a/doc/html/annotated.html b/doc/html/annotated.html deleted file mode 100644 index 92a751cc..00000000 --- a/doc/html/annotated.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - -Boost.Locale: Class List - - - - - - - - - - -
      -
      - - - - - - - -
      -
      Boost.Locale -
      -
      -
      - - - - -
      -
      - -
      -
      -
      - -
      -
      -
      -
      Class List
      -
      -
      -
      Here are the classes, structs, unions and interfaces with brief descriptions:
      -
      [detail level 12345]
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      \Nboost
       oNlocaleThis is the main namespace that encloses all localization classes
       |oNasThis namespace includes all manipulators that can be used on IO streams
       |oNboundaryThis namespae contains all operations required for boundary analysis of text
       ||oCboundary_pointThis class represents a boundary point in the text
       ||oCbreak_infoThis structure is used for representing boundary point that follows the offset
       ||oCboundary_indexingThis facet generates an index for boundary analysis for a given text
       ||oCsegment_indexThis class holds an index of segments in the text range and allows to iterate over them
       ||oCboundary_point_indexThis class holds an index of boundary points and allows iterating over them
       ||\CsegmentSegment object that represents a pair of two iterators that define the range where this segment exits and a rule that defines it
       |oNconvNamespace that contains all functions related to character set conversion
       ||oCconversion_errorThe excepton that is thrown in case of conversion error
       ||\Cinvalid_charset_errorThis exception is thrown in case of use of unsupported or invalid character set
       |oNflagsThis namespace holds additional formatting flags that can be set using ios_info
       |oNgnu_gettextThis namespace holds classes that provide GNU Gettext message catalogs support
       ||\Cmessages_infoThis structure holds all information required for creating gnu-gettext message catalogs,
       || \CdomainThis type represents GNU Gettext domain name for the messages
       |oNperiodNamespace that contains various types for manipulation with dates
       ||oNmarksThis namespace holds a enum of various period types like era, year, month, etc.
       ||\Cperiod_typeThis class holds a type that represents certain period of time like year, hour, second and so on
       |oNtime_zoneNamespace that holds functions for operating with global time zone
       |oNutfNamespace that holds basic operations on UTF encoded sequences
       ||\Cutf_traitsUTF Traits class - functions to convert UTF sequences to and from Unicode code points
       |oNutilThis namespace provides various utility function useful for Boost.Locale backends implementations
       ||\Cbase_converterThis class represent a simple stateless converter from UCS-4 and to UCS-4 for each single code point
       |oCcollator_baseBase class that includes collation level flags
       |oCcollatorCollation facet
       |oCcomparatorThis class can be used in STL algorithms and containers for comparison of strings with a level other than primary
       |oCconverter_baseThis class provides base flags for text manipulation. It is used as base for converter facet
       |oCconverterThe facet that implements text manipulation
       |oCdate_time_errorThis error is thrown in case of invalid state that occurred
       |oCdate_time_periodThis class represents a pair of period_type and the integer values that describes its amount. For example 3 days or 4 years
       |oCdate_time_period_setThis class that represents a set of periods,
       |oCcalendarThis class provides an access to general calendar information
       |oCdate_timeThis class represents a date time and allows to perform various operation according to the locale settings
       |oCdate_time_durationThis class represents a period: a pair of two date_time objects
       |oCposix_time
       |oCabstract_calendar
       |oCcalendar_facetFacet that generates calendar for specific locale
       |oCbasic_formatPrintf like class that allows type-safe and locale aware message formatting
       |oCios_infoThis class holds an external data - beyond existing fmtflags that std::ios_base holds
       |oCgeneratorMajor class used for locale generation
       |oCgeneric_codecvt_baseA base class that used to define constants for generic_codecvt
       |oCgeneric_codecvtGeneneric generic codecvt facet, various stateless encodings to UTF-16 and UTF-32 using wchar_t, char32_t and char16_t
       |oCgeneric_codecvt< CharType, CodecvtImpl, 2 >UTF-16 to/from UTF-8 codecvt facet to use with char16_t or wchar_t on Windows
       |oCgeneric_codecvt< CharType, CodecvtImpl, 4 >UTF-32 to/from UTF-8 codecvt facet to use with char32_t or wchar_t on POSIX platforms
       |oCgeneric_codecvt< CharType, CodecvtImpl, 1 >
       |oChold_ptrSmart pointer similar to std::auto_ptr but it is non-copyable and the underlying object has the same constness as the pointer itself (unlike an ordinary pointer)
       |oCinfoFacet that holds general information about locale
       |oClocalization_backendThis class represents a localization backend that can be used for localizing your application
       |oClocalization_backend_managerLocalization backend manager is a class that holds various backend and allows creation of their combination or selection
       |oCmessage_formatThis facet provides message formatting abilities
       |oCbasic_messageThis class represents a message that can be converted to a specific locale message
       |\Cutf8_codecvtGeneneric utf8 codecvt facet, it allows to convert UTF-8 strings to UTF-16 and UTF-32 using wchar_t, char32_t and char16_t
       | \Cstate_type
       \Cshared_ptr
      -
      -
      -
      - - -
    -
    - - diff --git a/doc/html/annotated.js b/doc/html/annotated.js deleted file mode 100644 index 78cf23e9..00000000 --- a/doc/html/annotated.js +++ /dev/null @@ -1,7 +0,0 @@ -var annotated = -[ - [ "boost", null, [ - [ "locale", "namespaceboost_1_1locale.html", "namespaceboost_1_1locale" ], - [ "shared_ptr", "classboost_1_1shared__ptr.html", null ] - ] ] -]; \ No newline at end of file diff --git a/doc/html/appendix.html b/doc/html/appendix.html deleted file mode 100644 index 9264b4d4..00000000 --- a/doc/html/appendix.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - -Boost.Locale: Appendix - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - - - - - -
    - - diff --git a/doc/html/appendix.js b/doc/html/appendix.js deleted file mode 100644 index b0ac37b0..00000000 --- a/doc/html/appendix.js +++ /dev/null @@ -1,34 +0,0 @@ -var appendix = -[ - [ "Table of Contents", "appendix.html#appendix_toc", null ], - [ "Design Rationale", "rationale.html", [ - [ "Why is it needed?", "rationale.html#rationale_why", null ], - [ "Why use an ICU wrapper instead of ICU?", "rationale.html#why_icu", null ], - [ "Why an ICU wrapper and not an implementation-from-scratch?", "rationale.html#why_icu_wrapper", null ], - [ "Why is the ICU API not exposed to the user?", "rationale.html#why_icu_api_is_hidden", null ], - [ "Why use GNU Gettext catalogs for message formatting?", "rationale.html#why_gnu_gettext", null ], - [ "Why is a plain number used for the representation of a date-time, instead of a Boost.DateTime date or Boost.DateTime ptime?", "rationale.html#why_plain_number", null ], - [ "Why are POSIX locale names used and not something like the BCP-47 IETF language tag?", "rationale.html#why_posix_names", null ], - [ "Why most parts of Boost.Locale work only on linear/contiguous chunks of text", "rationale.html#why_linear_chunks", null ], - [ "Why all Boost.Locale implementation is hidden behind abstract interfaces and does not use template metaprogramming?", "rationale.html#why_abstract_api", null ], - [ "Why Boost.Locale does not provide char16_t/char32_t for non-C++0x platforms.", "rationale.html#why_no_special_character_type", null ] - ] ], - [ "Frequently Asked Questions", "faq.html", null ], - [ "Default Encoding under Microsoft Windows", "default_encoding_under_windows.html", null ], - [ "Running Examples under Microsoft Windows", "running_examples_under_windows.html", null ], - [ "Using Gettext Tools on Windows", "gettext_for_windows.html", [ - [ "Getting gettext utilities from CppCMS project", "gettext_for_windows.html#gettext_for_windows_cppcms", null ], - [ "Getting Gettext via MinGW project", "gettext_for_windows.html#gettext_for_windows_mingw", null ], - [ "Building latest version on your own.", "gettext_for_windows.html#gettext_for_windows_build", null ], - [ "Using Cygwin", "gettext_for_windows.html#gettext_for_windows_cygwin", null ] - ] ], - [ "Glossary", "glossary.html", null ], - [ "Tested Compilers and Platforms", "tested_compilers_and_platforms.html", [ - [ "Known Issues", "tested_compilers_and_platforms.html#tested_compilers_and_platforms_issues", null ] - ] ], - [ "Status of C++11 char16_t/char32_t support", "status_of_cpp0x_characters_support.html", [ - [ "GNU GCC 4.5/C++11 Status", "status_of_cpp0x_characters_support.html#status_of_cpp0x_characters_support_gnu", null ], - [ "Visual Studio 2010 (MSVC10)/C++11 Status", "status_of_cpp0x_characters_support.html#status_of_cpp0x_characters_support_msvc", null ] - ] ], - [ "Special Thanks", "special_thanks.html", null ] -]; diff --git a/doc/html/bc_s.png b/doc/html/bc_s.png deleted file mode 100644 index 224b29aa9847d5a4b3902efd602b7ddf7d33e6c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 676 zcmV;V0$crwP)y__>=_9%My z{n931IS})GlGUF8K#6VIbs%684A^L3@%PlP2>_sk`UWPq@f;rU*V%rPy_ekbhXT&s z(GN{DxFv}*vZp`F>S!r||M`I*nOwwKX+BC~3P5N3-)Y{65c;ywYiAh-1*hZcToLHK ztpl1xomJ+Yb}K(cfbJr2=GNOnT!UFA7Vy~fBz8?J>XHsbZoDad^8PxfSa0GDgENZS zuLCEqzb*xWX2CG*b&5IiO#NzrW*;`VC9455M`o1NBh+(k8~`XCEEoC1Ybwf;vr4K3 zg|EB<07?SOqHp9DhLpS&bzgo70I+ghB_#)K7H%AMU3v}xuyQq9&Bm~++VYhF09a+U zl7>n7Jjm$K#b*FONz~fj;I->Bf;ule1prFN9FovcDGBkpg>)O*-}eLnC{6oZHZ$o% zXKW$;0_{8hxHQ>l;_*HATI(`7t#^{$(zLe}h*mqwOc*nRY9=?Sx4OOeVIfI|0V(V2 zBrW#G7Ss9wvzr@>H*`r>zE z+e8bOBgqIgldUJlG(YUDviMB`9+DH8n-s9SXRLyJHO1!=wY^79WYZMTa(wiZ!zP66 zA~!21vmF3H2{ngD;+`6j#~6j;$*f*G_2ZD1E;9(yaw7d-QnSCpK(cR1zU3qU0000< KMNUMnLSTYoA~SLT diff --git a/doc/html/bdwn.png b/doc/html/bdwn.png deleted file mode 100644 index 940a0b950443a0bb1b216ac03c45b8a16c955452..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 147 zcmeAS@N?(olHy`uVBq!ia0vp^>_E)H!3HEvS)PKZC{Gv1kP61Pb5HX&C2wk~_TbJl*=-fQoDo?kg}#)eunx7lt306?Ro4K*ReT0(n7K}@(0 zd{(p|1X5Qu12q7s!8{^+zeRW^chu8@0yqD2eQGaFC%mEb*0%B`MD73IGNmYA-?hZI3QE*Hd3<@@lP`cJ3z+_%aS?JaVCQp99(Hz0~s&5`G%;a+?D`a(Kq zliiomL~^1&LA^VMg=~q~z4?GWxkaT*4=%dzLe(ZjwTpjApKd|4Zj8ihD}t5BqMJlI z*6k38jx86|*lo98ADdmMtHG;Z)P*~tqsac2uXk@%V$Sx{8*|h93Jd?zWTXaNbJ10I ztw0PPVHsi`+>Kl+!3rHPqnSeg)8$lumX&X8hIo7BA!nJvaDM9viwV6dpbNw{->w3u zL7_z-U-yf&#^no`Qx|*n-Qg&EX99cjc+|WlY|2egsaBfny?v^RoY-+2zd$MdVL?|K zhKm@g?V5LU-XxZ2&@Ge5quT9L@Oa{U; z-%!ufzR&A3Ns7cp8Dy9gUMhRK+yn{=1a(|SHfH$?#lsj&D|%Mah;sPJzBMj7Wt-g& z@!*c%hRQ#K{uPKC)cY`GxSR^>*$+hMPtG^t8m(DMMfh)L{&Zv`Miix}Mo_3mkfi{; zq@bziSZYBD)?qTfyiJgx_=D+NF(+1SmXPNwHhWbf z<~${P&qLUOkpTdCd%g*g&-6iPYf}Qb^(7ZCEnAq{DfyX>xe<=6DP!x&? z%tg{2A>qvjm+owQ_Cx0zKZSbM2X-eB+IT*Folz0sYk;>6JvTAk1=^;mMA~MV;|>e5Avq5xk5Wxg3wd7Es00P?_1LlqP@g|<*HU{a*V>oBDpVFH-J=m zSXlF~K#H%MRTG{cnj6`St_c(BW^ZI=qyo+_j2B1FFhBoH zcoGxQ)i#uul%s<#yR#ZRw*3+-e|?yBj(m*7pOgGZw?NU-BpM|f4mj66B>LIq?_s(# zBjY#wsA1AflkStWq?s1KE4^248~l96STfUrx_=`SRKyFxq7P#p2z@TB|8R*u9skl= zLiZ$K(HkRMoD$(?y>W0_W3$D<4<53T$1D3U?$CyL;$Cy1$1F37czbEE?-<(eYi01J z0xTrzyj;X~5wK2_rZ>m1PN`p_&Wqd8_NJfTYkbTg*L9>WGLz*~!IHfsp#XYH>FeXn zFtSCwz=+?D$uP~j4kH~zG308FHq8HzUD#Iox2DDqFRA=^pv@CfXM|-k%*7+~^ypGE zcuC~EV-qBXrZ@Zs3xYOLZv*xsRGG8tVz}i|0cX{|HEn?#FK-ZgRDwEkKY-|nTq$UR z#-D!yp8p1T0-9v7jAY9R%QXw_XM=kkigM{(#4XNDbaaZtUa*P=eGZ@%HUBu|%Env+ zs_mXb?oDm1jimZDcsiFoz$LRE>{+hNwR}>Y^OU>v6C{m4e zmnhKDNt$1q6I|!CHC(tmk2+YRKwYQf?5be($US6-lc56usO~M5;RBabknwNgx*Dy_ zREUh{cu8}!4X&mig`Mr8um0{<@5KDj)k&y5C_f9xSGXEN?m~qa>ZtoCrrR)2V99l#a$J489~lIj08PVLUSJN`wvu)ROl)#wO7G zrZjxwNJD;AJT^vCO?!)66w#l=E|RH`_FgT151hNw9mL99;h|!gJ_qpHYc}v zNm8Pz4^Egs`FhaK&3kqV7L=$ey9I8RTSQBfOA5gsS<~Yxum3t@f86qa^6B$p(9L1N&3bZl z#wbEGhWC@%Ok8v|3CBGJ*(O36`D3&FXZ^a~HdLL$U{#32gfYG?unxa}P*2M-#a9e< z26z$I_<-kUzedM1Ye67TWCnP(c}J8cxUr$e3kF1>@2!?Te9p;|Z`^!WovoFy4jp0F zm?Q&O>Q^#Aj8jQTQI;baEm*92IN0+ir1Mp9 z3qvs4oker$_GFc>rz%(L$wL9Bvsv85eg0k6rD7@}_8&6Rq-4bv&yPC-31^wL6_mzZ zBJ~P4lsK&H=Z%lex_UgU7`C+8tG9SI`(X?zf>Xq4(zRc0Y+dfnpxkX@SQdkq6YbcQ zY;EZdVpO5r(IxJ7XMahI*jwwtY<5cKF5Ys^mM;`2F7iY}IRG_^(dpWQ(cn`NyXF}9xIkrR z6o`(_bxm&iLST06XS&tmaWq~B`+?OWJA3YT)RtM_NJG_{>nni{q9Rgmwc9DACQ*l~ z{9_|IK>vvC3W%B(uuN;){w9&{r^rNF#^ySBY;KYUGU?0p5{RxUPq?lhR$^+bwpoaZ zkYHym@UbykWv9EjIR7zzP~^U?uG=lX(|ihlb$JwiJzah8+2N|TU`)!X|EtTZQciEB zRM#j6H;B`?lc^7*fNhKN-?`z%_Zpt-xQgbj%J8!_&XB|F_iox{>~~T@bzruOL)`tv z+7{6~Kl5fasLiVD!&9P8Pq5r$NtbOlx^s0X&&lMm$EO5^Lg_>sH@DvdN_I9a%0)h! zEmDQWwVJwzRF-i3M}azKa38ITce6lr;QPBAi4B=( z&~_uWM7p2pRu%mZBfDU+%%MZB_lB;yuJ;$i7xQK_Fpr(6ed`I8!f$5;oo6zjr9%NK z(7Q#&3-AJoM^MQl+IL1p^-1_3!-M2xM6Oh<<>p;3VyDNl5;;C?fbS=d5Ce!rd{%N? z4z5uzGKxz>wmgUN)Kj)x9Lkd&SL#UTp%`P)6Tt&ouT$HW7L2T&6NYF9kI2yE(PZQB zY;hWC461;4sQ188==caQa(p$2&*tgN&ZRwfoZEcPz7k6=7<8U@o8nIc zxJW}+BHKs5iWW^UZJ^DzF|vurFq$uW!`p0jmVaa7kUtMhKfwBpwf&T88p=;rZz(W~ zu8TVZBa=4w;-~V(4w008&oHv;jWRMh6OYrOt=-{Q+X`L>$fK|-(%)H4KQo#gjR8n%kD#u?ge|J!CRn2<4mX@ZG6Q{#~OlY_1emBL^L{A9dZ ze9vc%NC8rJB0Jy!gv(B`fBh@agzO3N5_|f=8~MzcIS^V_Fyy=3ySe-6Eh4Tdn}9k% z%<+ANi?BI4nQ>vi`hkuJG@qRg@u^fT<)5@rCdSnl8U z-lnmtrUns9$4q%XG1TAsd~fL^irqREEmq;UoZTk?{JoQiGs=RNpkU8t&5}BFUl5dl zZ!cV$-emp0po_JsD4?xlr2NK}KtqS0s}%d+Ts@`8a$(DU?PmbdiYC;=`8nf%e@t%` z-#!8neG2f_Z)pXVg2FsZ6CK=|=3wxnW~YVk8EdISGS~H|uKWyLBXV37xzdswlz-;z zcii45Bo9l=PFb_<|08mjlC234G{(s>gA}8N_z|pYF6;(x$8O63`aPynab`oo;4$fi zIb#|P^Agp{!J%R?I4uj?2Pk!lL|f=(5TNan>nv2s5>26w+3rI~vNoT+KbYy&lfZ^sf2>OP((8cuAq2AS+~cBDtXTYT`#g54bU{74$kpC?BE-fGg-* z9J^{57^r4lDG=~Zk zmt@Wfj>H+-P8M+_(1jY7w%+4#X_0MIOv~-%#jN>_|wt4*><|wAZ zoheS0TPAfN7d>&W&VX;CYPH%6W=x|d^5MrX$ff+99lWI($l_A-y65J4`u8;*1d9Mb zN9O{5{VirM9OVmr?m(jiJgs#pt1&e;5vv-b#&FfhA=g;pgSFqJ#6G04Ki_i3I=f|P z$4mV)6ktD4EJ$yv%)FKOQ}wm-E=G%!bl%~xIcZzg`6FSN#!2UPF6kF++c;K2HD@_K*76Kl)Dni7i5*N-eIXw z(_?Abe;41FGpIqMry9PYegsIr8}TAPG{J>~z}raa_? z+Jdng+L$!8ofM!*s5v8LFWvy3eZR#uKt6pvlKW%R7AYXkVRR=+f4fx^Q145D{U<#s zU~r-)@q{gqyoV^FPC2{8=d*$`>#1~-BqBY|jI5xD*Yqul+f|y|Y1CUWb}Emm3i*_@HCJH@vIA=S-_-{Sl? zym+A_nb`|t7Ubc^_uf(cBbmvbUdpx{O^4gaFr<}t4@5?K(g+@_G zag*(EO-+*0!KZCrGQKxy-;=CVwZC_>E4)L&p!~hQD*(uB~`)B%s7;^w;_RB7=hn{zZL2leLQ6Y6-_0 zyV}M!M>I&%KA42UZgYvp>0?bcleFD>Tj@O~p-LJcSHcuKWV^+zzL87PS%uF>PX(Xt z_}0f|xNN2&dT4h0kdrc|U4 zc5rt(LNDG|e1AQ(k%k;fN=%*)2v*jft_w3j>BOqiTa_q3mON)(yyz_myJk3+VGQKc zg4WzuxUA+xZ#U;N{gr6Wzxh+jSyrB)YjS64ESQyOY3)4U?!L;sMgvByHutHgUCkWT zug?jqLJ9Pd-IhY>|GqIVoQ;js4jOG>W8#QIQh8XmujVTWq`-^ys6pTt6Oic(2qK4S z!~6E`AHS+h9vI{kcH9Wfk?GMY*-oOMR--q2SJ+3ag5P9QUn(UZ$PHg@URc6pyyuSV z6#wsN{vYn<5+J1%joo~M#s@XRvSS~{Ne{hX*di#}^M4O^Y3T3UBfIzJ0xn~AiJ*+= z)C%5zO?z$o+qL!I8mp=kVsR$Oc%?@VZ8<(>8^n6PrFiVxYv%uBraS!Lm(fg?ni}Uw zK5T~|8}h!5G2gKg`tTCj9gM5_w-tW1%fWH)Q8mmtfhI}+d9(b~yh1dhwcFf2cSt^b zzxR@}-L+|t3UzQaPx3Cgpg}a9X}Z59taABa>&Swf9Xl=^i($uB)>Iptdo@U_E>Zi+ zDS;Vpwfn3%65It3CzvAgnlS(Qrr@L3GyGY_4~V^imlvB=vr-w-()`7w&|}0CR8}Ii z=s5zx(zS&ih`lI#wQ0!TfD(!p8p8zs6H?W}9z(K8ZESP|_>XB4OY84AeYB|5*y7P~ z-pqE{6mq;9wc@*_;O}`xKw)XPs5Y30j$;Pvb7h7dW%wZEm2uqCI%3JaOQk$mypc#nJeX-rR8&&x%G<_NC7>uuB66~>lm$4 zQxNH>8F6!e<)x>H?(Dt|apfwiNfnlS^?X5Ovtl{HT|1#Xf-YV>wY0Xk8AsXp)!XKe zJRK!?k=Y7M^{%Q^C2VQhh{J5Q)ms{Zz5e|{`4>y@QM(>B@};%|^%n<)CO%)}(?0q9 z)u7*usmYvkm*>NZ_BomkpN2tkZn!MJn~UW9i|(8A^QpBe7+ZFCT&E;lI>rLT137;1!ZgwFX}>a-uOY`12&Zg(f8YFgSTG9Gi3%GT}Uv zjn5A{+wC|XO(g&r4__QL1jpu8Rq5%0A_J}(6pzxK1i;{JfzKuWURuXS3v7H`WIzlF zlsB`ATpcjNeC<6&H7R0$V}45)ldF<35%GfPfcVa@szzm@{-NF?d48WAzJ0YW8exP0 z#cSAx39naPVf#)B0Whmud`2V!G9b#?o9q5zcIB|$OsCRsD4G_O*7w+0u3HuEZSBR^ zConwcT!(2)JoFcm6Pf|N+?#4eS09vW8Qu@SIh^`gb@-nPicVRE<40)GNAz?Mr$??f0)&2+%5T8>+SfBFIndV-q0b*6tq4lMc`T6 z%^71pirOVGeXPDGXj^e^ASH<`NN z>h&UerqZ^W2t7==1lA z3f>D_)HcdLwP3VuDnS=Ej^%S!c-onuE5(p~cM|jortSTLq+vcOg#G3-2+Rdy;1cW+ zYA*5_YB@nBz(;UU&HjEhL&`kMDs1J3*m0JWt*|HQiv%Yhn5f>}jaW~=J>!)lUYU_|zjOcI%cvV0YX8@Rc*y>0?Unl`eYKe1ot1@6UgRCDgI{p*@Rcbn4-JAzaE##KKpIb znT)99*AM^cHZjdj^yFG>Ah=1SP}o{oe;+PZqjN$%ETjYhm}7Sjz2@r4{XBi`{^`4n zH+Rul716IFjJ+OBHO8SeGVG6+2p}Rl6G&jGeuUl3<@}>2^5%YO` ze=T#ok1JY~3psSXok#U0y`Et9?#}vJkD~J89#jf}i}eme7JaU?r=FE*zt>5Wm6e;F zfAo5Ip}LrpCea|TLo#L0-n6kT+-+s>^x;-EQ{vRA-z%zj8+$83*UPK8m0oG$Dv$CG z4=le;nHP#C!Qb{?&|2q1TkP#*BmD=@mHaiyhMT+=zxu$O9E5vE(?7fv`a+lj)BW6R zq=J8iFmk9-_V+@4fXDM{@XG$#-`*o^$Z&vChcB+=%B{Z#YSsU&+3JY6!GOFAhH%fh zSABeZ5gQa5n%7wP)Y`5RR)qz(PIO`$xOQw*BZt2q){yatRdB2723<3I(T&Up%QiJh zi)6I2u;hpA;=Bw72h<{yHKD!mlfiUbg3Uip%GdN-NtDhu!3bG9{ljiD?JyHxtXz#V3OPdp0sOOet-D3W< z>b?b>T`Wy;hMz1);SMS2jB?wzgFY9Rzfg^dZ!x3Y6yE z^QAm8sc2{UA1og3RZqez?j6%6(h?NhgxSwkL5!eZgFb1*gF8F(4K6UphewAwu4XKC zV`)7rL5@!>Nmtf$eTR_Ua=7i}Iqo63l@R)hyR5~}9G-*-NYc#vw0DHB=V2F=3;Nz! zBA{j#9Qe7~Wwb&QN1Mkx8@J07f6uw8$+K_CyB=QU7DHZE`T!7-a;R^ySJ^Z4oRj^n zy;0>io1J^FDk`Ihl`{P1zK;rykCeVhCs-4lf-w{G3UvWJu|2yTO2{Ei9&SD%vh2~` zY3xFau?2@O``+C8wfY@B9ft9^VZ~Oj;mMP&Hx-2?;Ew>%i8=cN4?&fqZxc(=00hXg zzOa%1a_Z}$3>N+LJ-NW@h2R#WV6uh*M9zqqNs2Wd zJSLkcb1bt}^#%V-&(t7nw%kKl80?XQ*N2E@b30AVm{m$|8?Zzn0N9{kEGiIPR+&_8 ztQ>AWCEEn^Y|sx4+ofpjmUH!BtKe+@#^ao0xrE)4U!0mWv!yGqDgR2Xw1?+f@dP*c zz{W!ZUM)73%dj=xdnruy4cf(BU)_Q#E|h1h<8janJu+5yww$%W+Su7*kQJ8A)h$EE zA+yrY*eVQ6hi@66#mF^F6zy1IuQ!!~C#B7P^uc;oX8cB>PnYirjB0Cu#ez(OX1s(& zm#0t@*h_;^192j%x2dlqFp1{GRA=@PnA5h57f52h4ve|5qY_=&YseOsyuuMa`u*x{ ze|)Y{bflbsF7;Zyb$m(7;THdK%5)St6#VS0o%&oa^dGmG<_5l#>Zs7CCfOq z%KECXe-jydR$W-Ec=S10_lb$(WSZbR^NX^PKD2dU-0C`M$8AJ1yXa}~xmRJe7b6Yl zlh)&#En+fNE5;iyhEOj3sxdFV>g(iYbD@$Osy}0cFEd}uOA-Fm^T9PN;m!_l7kQ`G zE`$I`ic3g{ia!#S5I2*Ql$U%YFD)x9E+sE6{>oV~;D05+yqw)%1peO%oO03qgap?A u8Nt-+1w6pvwF{u;?B(dfr2}(tbun>qa1Qk8bx|aA0(3MCp(u6xsQ(86>*M?Y diff --git a/doc/html/boundary_8cpp-example.html b/doc/html/boundary_8cpp-example.html deleted file mode 100644 index d641b8e0..00000000 --- a/doc/html/boundary_8cpp-example.html +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - -Boost.Locale: boundary.cpp - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boundary.cpp
    -
    -
    -

    Example of using segment_index

    -
    //
    -
    // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
    -
    //
    -
    // Distributed under the Boost Software License, Version 1.0. (See
    -
    // accompanying file LICENSE_1_0.txt or copy at
    -
    // http://www.boost.org/LICENSE_1_0.txt)
    -
    //
    -
    #include <boost/locale.hpp>
    -
    #include <iostream>
    -
    #include <cassert>
    -
    #include <ctime>
    -
    -
    int main()
    -
    {
    -
    using namespace boost::locale;
    -
    using namespace std;
    -
    -
    generator gen;
    -
    // Make system default locale global
    -
    std::locale loc = gen("");
    -
    locale::global(loc);
    -
    cout.imbue(loc);
    -
    -
    -
    string text="Hello World! あにま! Linux2.6 and Windows7 is word and number. שָלוֹם עוֹלָם!";
    -
    -
    cout<<text<<endl;
    -
    -
    boundary::ssegment_index index(boundary::word,text.begin(),text.end());
    - -
    -
    for(p=index.begin(),e=index.end();p!=e;++p) {
    -
    cout<<"Part ["<<*p<<"] has ";
    -
    if(p->rule() & boundary::word_number)
    -
    cout<<"number(s) ";
    -
    if(p->rule() & boundary::word_letter)
    -
    cout<<"letter(s) ";
    -
    if(p->rule() & boundary::word_kana)
    -
    cout<<"kana character(s) ";
    -
    if(p->rule() & boundary::word_ideo)
    -
    cout<<"ideographic character(s) ";
    -
    if(p->rule() & boundary::word_none)
    -
    cout<<"no word characters";
    -
    cout<<endl;
    -
    }
    -
    -
    index.map(boundary::character,text.begin(),text.end());
    -
    -
    for(p=index.begin(),e=index.end();p!=e;++p) {
    -
    cout<<"|" <<*p ;
    -
    }
    -
    cout<<"|\n\n";
    -
    -
    index.map(boundary::line,text.begin(),text.end());
    -
    -
    for(p=index.begin(),e=index.end();p!=e;++p) {
    -
    cout<<"|" <<*p ;
    -
    }
    -
    cout<<"|\n\n";
    -
    -
    index.map(boundary::sentence,text.begin(),text.end());
    -
    -
    for(p=index.begin(),e=index.end();p!=e;++p) {
    -
    cout<<"|" <<*p ;
    -
    }
    -
    cout<<"|\n\n";
    -
    -
    }
    -
    -
    // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
    -
    -
    // boostinspect:noascii
    -
    -
    - - - - - - diff --git a/doc/html/boundary_8hpp_source.html b/doc/html/boundary_8hpp_source.html deleted file mode 100644 index 0bfdeae7..00000000 --- a/doc/html/boundary_8hpp_source.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - -Boost.Locale: boost/locale/boundary.hpp Source File - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boundary.hpp
    -
    -
    -
    1 //
    -
    2 // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
    -
    3 //
    -
    4 // Distributed under the Boost Software License, Version 1.0. (See
    -
    5 // accompanying file LICENSE_1_0.txt or copy at
    -
    6 // http://www.boost.org/LICENSE_1_0.txt)
    -
    7 //
    -
    8 #ifndef BOOST_LOCALE_BOUNDARY_HPP_INCLUDED
    -
    9 #define BOOST_LOCALE_BOUNDARY_HPP_INCLUDED
    -
    10 
    -
    11 #include <boost/locale/boundary/types.hpp>
    -
    12 #include <boost/locale/boundary/facets.hpp>
    -
    13 #include <boost/locale/boundary/segment.hpp>
    -
    14 #include <boost/locale/boundary/boundary_point.hpp>
    -
    15 #include <boost/locale/boundary/index.hpp>
    -
    16 
    -
    17 #endif
    -
    18 // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
    -
    -
    - - - - - - diff --git a/doc/html/boundary__point_8hpp_source.html b/doc/html/boundary__point_8hpp_source.html deleted file mode 100644 index 4c189c59..00000000 --- a/doc/html/boundary__point_8hpp_source.html +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - -Boost.Locale: boost/locale/boundary/boundary_point.hpp Source File - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boundary_point.hpp
    -
    -
    -
    1 //
    -
    2 // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
    -
    3 //
    -
    4 // Distributed under the Boost Software License, Version 1.0. (See
    -
    5 // accompanying file LICENSE_1_0.txt or copy at
    -
    6 // http://www.boost.org/LICENSE_1_0.txt)
    -
    7 //
    -
    8 #ifndef BOOST_LOCALE_BOUNDARY_BOUNDARY_POINT_HPP_INCLUDED
    -
    9 #define BOOST_LOCALE_BOUNDARY_BOUNDARY_POINT_HPP_INCLUDED
    -
    10 
    -
    11 #include <boost/locale/boundary/types.hpp>
    -
    12 
    -
    13 namespace boost {
    -
    14 namespace locale {
    -
    15 namespace boundary {
    -
    16 
    -
    20 
    -
    47  template<typename IteratorType>
    - -
    49  public:
    -
    53  typedef IteratorType iterator_type;
    -
    54 
    -
    58  boundary_point() : rule_(0) {}
    -
    59 
    - -
    64  iterator_(p),
    -
    65  rule_(r)
    -
    66  {
    -
    67  }
    - -
    72  {
    -
    73  iterator_ = i;
    -
    74  }
    -
    78  void rule(rule_type r)
    -
    79  {
    -
    80  rule_ = r;
    -
    81  }
    - -
    86  {
    -
    87  return iterator_;
    -
    88  }
    -
    92  rule_type rule() const
    -
    93  {
    -
    94  return rule_;
    -
    95  }
    -
    99  bool operator==(boundary_point const &other) const
    -
    100  {
    -
    101  return iterator_ == other.iterator_ && rule_ = other.rule_;
    -
    102  }
    -
    106  bool operator!=(boundary_point const &other) const
    -
    107  {
    -
    108  return !(*this==other);
    -
    109  }
    -
    113  bool operator==(iterator_type const &other) const
    -
    114  {
    -
    115  return iterator_ == other;
    -
    116  }
    -
    120  bool operator!=(iterator_type const &other) const
    -
    121  {
    -
    122  return iterator_ != other;
    -
    123  }
    -
    124 
    -
    128  operator iterator_type ()const
    -
    129  {
    -
    130  return iterator_;
    -
    131  }
    -
    132 
    -
    133  private:
    -
    134  iterator_type iterator_;
    -
    135  rule_type rule_;
    -
    136 
    -
    137  };
    -
    141  template<typename BaseIterator>
    -
    142  bool operator==(BaseIterator const &l,boundary_point<BaseIterator> const &r)
    -
    143  {
    -
    144  return r==l;
    -
    145  }
    -
    149  template<typename BaseIterator>
    -
    150  bool operator!=(BaseIterator const &l,boundary_point<BaseIterator> const &r)
    -
    151  {
    -
    152  return r!=l;
    -
    153  }
    -
    154 
    -
    156 
    - - -
    159  #ifdef BOOST_LOCALE_ENABLE_CHAR16_T
    - -
    161  #endif
    -
    162  #ifdef BOOST_LOCALE_ENABLE_CHAR32_T
    - -
    164  #endif
    -
    165 
    - - -
    168  #ifdef BOOST_LOCALE_ENABLE_CHAR16_T
    - -
    170  #endif
    -
    171  #ifdef BOOST_LOCALE_ENABLE_CHAR32_T
    - -
    173  #endif
    -
    174 
    -
    175 
    -
    176 } // boundary
    -
    177 } // locale
    -
    178 } // boost
    -
    179 
    -
    180 
    -
    181 #endif
    -
    182 
    -
    183 // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
    -
    boundary_point(iterator_type p, rule_type r)
    Definition: boundary_point.hpp:63
    -
    void rule(rule_type r)
    Definition: boundary_point.hpp:78
    -
    boundary_point< wchar_t const * > wcboundary_point
    convenience typedef
    Definition: boundary_point.hpp:167
    -
    rule_type rule() const
    Definition: boundary_point.hpp:92
    -
    boundary_point< char16_t const * > u16cboundary_point
    convenience typedef
    Definition: boundary_point.hpp:169
    -
    uint32_t rule_type
    Flags used with word boundary analysis – the type of the word, line or sentence boundary found...
    Definition: types.hpp:51
    -
    boundary_point< std::string::const_iterator > sboundary_point
    convenience typedef
    Definition: boundary_point.hpp:157
    -
    bool operator==(iterator_type const &other) const
    Definition: boundary_point.hpp:113
    -
    bool operator==(boundary_point const &other) const
    Definition: boundary_point.hpp:99
    -
    bool operator==(BaseIterator const &l, boundary_point< BaseIterator > const &r)
    Definition: boundary_point.hpp:142
    -
    boundary_point< std::u32string::const_iterator > u32sboundary_point
    convenience typedef
    Definition: boundary_point.hpp:163
    -
    iterator_type iterator() const
    Definition: boundary_point.hpp:85
    -
    boundary_point< std::wstring::const_iterator > wsboundary_point
    convenience typedef
    Definition: boundary_point.hpp:158
    -
    bool operator!=(boundary_point const &other) const
    Definition: boundary_point.hpp:106
    -
    boundary_point()
    Definition: boundary_point.hpp:58
    -
    boundary_point< char const * > cboundary_point
    convenience typedef
    Definition: boundary_point.hpp:166
    -
    This class represents a boundary point in the text.
    Definition: boundary_point.hpp:48
    -
    void iterator(iterator_type i)
    Definition: boundary_point.hpp:71
    -
    bool operator!=(iterator_type const &other) const
    Definition: boundary_point.hpp:120
    -
    boundary_point< char32_t const * > u32cboundary_point
    convenience typedef
    Definition: boundary_point.hpp:172
    -
    IteratorType iterator_type
    Definition: boundary_point.hpp:53
    -
    boundary_point< std::u16string::const_iterator > u16sboundary_point
    convenience typedef
    Definition: boundary_point.hpp:160
    -
    bool operator!=(BaseIterator const &l, boundary_point< BaseIterator > const &r)
    Definition: boundary_point.hpp:150
    -
    -
    - - - - - - diff --git a/doc/html/boundary_analysys.html b/doc/html/boundary_analysys.html deleted file mode 100644 index 47832d43..00000000 --- a/doc/html/boundary_analysys.html +++ /dev/null @@ -1,371 +0,0 @@ - - - - - - -Boost.Locale: Boundary analysis - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    Boundary analysis
    -
    -
    -
    -

    -Basics

    -

    Boost.Locale provides a boundary analysis tool, allowing you to split text into characters, words, or sentences, and find appropriate places for line breaks.

    -
    Note
    This task is not a trivial task.
    -
    A Unicode code point and a character are not equivalent, for example: Hebrew word Shalom - "שָלוֹם" that consists of 4 characters and 6 code points (4 base letters and 2 diacritical marks)
    -
    Words may not be separated by space characters in some languages like in Japanese or Chinese.
    -

    Boost.Locale provides 2 major classes for boundary analysis:

    - -

    Each of the classes above use an iterator type as template parameter. Both of these classes accept in their constructor:

    -
      -
    • A flag that defines boundary analysis boundary_type.
    • -
    • The pair of iterators that define the text range that should be analysed
    • -
    • A locale parameter (if not given the global one is used)
    • -
    -

    For example:

    -
    namespace ba=boost::locale::boundary;
    -
    std::string text= ... ;
    -
    std::locale loc = ... ;
    -
    ba::segment_index<std::string::const_iterator> map(ba::word,text.begin(),text.end(),loc);
    -

    Each of them provide a members begin(), end() and find() that allow to iterate over the selected segments or boundaries in the text or find a location of a segment or boundary for given iterator.

    -

    Convenience a typedefs like ssegment_index or wcboundary_point_index provided as well, where "w", "u16" and "u32" prefixes define a character type wchar_t, char16_t and char32_t and "c" and "s" prefixes define whether std::basic_string<CharType>::const_iterator or CharType const * are used.

    -

    -Iterating Over Segments

    -

    -Basic Iteration

    -

    The text segments analysis is done using segment_index class.

    -

    It provides a bidirectional iterator that returns segment object. The segment object represents a pair of iterators that define this segment and a rule according to which it was selected. It can be automatically converted to std::basic_string object.

    -

    To perform boundary analysis, we first create an index object and then iterate over it:

    -

    For example:

    -
    using namespace boost::locale::boundary;
    - -
    std::string text="To be or not to be, that is the question."
    -
    // Create mapping of text for token iterator using global locale.
    -
    ssegment_index map(word,text.begin(),text.end(),gen("en_US.UTF-8"));
    -
    // Print all "words" -- chunks of word boundary
    -
    for(ssegment_index::iterator it=map.begin(),e=map.end();it!=e;++it)
    -
    std::cout <<"\""<< * it << "\", ";
    -
    std::cout << std::endl;
    -

    Would print:

    -
    "To", " ", "be", " ", "or", " ", "not", " ", "to", " ", "be", ",", " ", "that", " ", "is", " ", "the", " ", "question", ".",
    -

    This sentence "生きるか死ぬか、それが問題だ。" (from Tatoeba database) would be split into following segments in ja_JP.UTF-8 (Japanese) locale:

    -
    "生", "きるか", "死", "ぬか", "、", "それが", "問題", "だ", "。", 
    -

    The boundary analysis that is done by Boost.Locale is much more complicated then just splitting the text according to white space characters, even thou it is not perfect.

    -

    -Using Rules

    -

    The segments selection can be customized using rule() and full_select() member functions.

    -

    By default segment_index's iterator return each text segment defined by two boundary points regardless the way they were selected. Thus in the example above we could see text segments like "." or " " that were selected as words.

    -

    Using a rule() member function we can specify a binary mask of rules we want to use for selection of the boundary points using word, line and sentence boundary rules.

    -

    For example, by calling

    -
    map.rule(word_any);
    -

    Before starting the iteration process, specify a selection mask that fetches: numbers, letter, Kana letters and ideographic characters ignoring all non-word related characters like white space or punctuation marks.

    -

    So the code:

    -
    using namespace boost::locale::boundary;
    -
    std::string text="To be or not to be, that is the question."
    -
    // Create mapping of text for token iterator using global locale.
    -
    ssegment_index map(word,text.begin(),text.end());
    -
    // Define a rule
    - -
    // Print all "words" -- chunks of word boundary
    -
    for(ssegment_index::iterator it=map.begin(),e=map.end();it!=e;++it)
    -
    std::cout <<"\""<< * it << "\", ";
    -
    std::cout << std::endl;
    -

    Would print:

    -
    "To", "be", "or", "not", "to", "be", "that", "is", "the", "question",
    -

    And the for given text="生きるか死ぬか、それが問題だ。" and rule(word_ideo), the example above would print.

    -
    "生", "死", "問題",
    -

    You can access specific rules the segments where selected it using segment::rule() member function. Using a bit-mask of rules.

    -

    For example:

    -
    -
    using namespace boost::locale::boundary;
    -
    std::string text="生きるか死ぬか、それが問題だ。";
    -
    ssegment_index map(word,text.begin(),text.end(),gen("ja_JP.UTF-8"));
    -
    for(ssegment_index::iterator it=map.begin(),e=map.end();it!=e;++it) {
    -
    std::cout << "Segment " << *it << " contains: ";
    -
    if(it->rule() & word_none)
    -
    std::cout << "white space or punctuation marks ";
    -
    if(it->rule() & word_kana)
    -
    std::cout << "kana characters ";
    -
    if(it->rule() & word_ideo)
    -
    std::cout << "ideographic characters";
    -
    std::cout<< std::endl;
    -
    }
    -

    Would print

    -
    Segment 生 contains: ideographic characters
    -Segment きるか contains: kana characters 
    -Segment 死 contains: ideographic characters
    -Segment ぬか contains: kana characters 
    -Segment 、 contains: white space or punctuation marks 
    -Segment それが contains: kana characters 
    -Segment 問題 contains: ideographic characters
    -Segment だ contains: kana characters 
    -Segment 。 contains: white space or punctuation marks 
    -

    One important things that should be noted that each segment is defined by a pair of boundaries and the rule of its ending point defines if it is selected or not.

    -

    In some cases it may be not what we actually look like.

    -

    For example we have a text:

    -
    Hello! How
    -are you?
    -

    And we want to fetch all sentences from the text.

    -

    The sentence rules have two options:

    -
      -
    • Split the text on the point where sentence terminator like ".!?" detected: sentence_term
    • -
    • Split the text on the point where sentence separator like "line feed" detected: sentence_sep
    • -
    -

    Naturally to ignore sentence separators we would call segment_index::rule(rule_type v) with sentence_term parameter and then run the iterator.

    -
    -
    using namespace boost::locale::boundary;
    -
    std::string text= "Hello! How\n"
    -
    "are you?\n";
    -
    ssegment_index map(sentence,text.begin(),text.end(),gen("en_US.UTF-8"));
    - -
    for(ssegment_index::iterator it=map.begin(),e=map.end();it!=e;++it)
    -
    std::cout << "Sentence [" << *it << "]" << std::endl;
    -

    However we would get the expected segments:

    -
    Sentence [Hello! ]
    -Sentence [are you?
    -]
    -

    The reason is that "How\n" is still considered a sentence but selected by different rule.

    -

    This behavior can be changed by setting segment_index::full_select(bool) to true. It would force iterator to join the current segment with all previous segments that may not fit the required rule.

    -

    So we add this line:

    -
    map.full_select(true);
    -

    Right after "map.rule(sentence_term);" and get expected output:

    -
    Sentence [Hello! ]
    -Sentence [How
    -are you?
    -]
    -

    -Locating Segments

    -

    Sometimes it is useful to find a segment that some specific iterator is pointing on.

    -

    For example a user had clicked at specific point, we want to select a word on this location.

    -

    segment_index provides find(base_iterator p) member function for this purpose.

    -

    This function returns the iterator to the segmet such that p points to.

    -

    For example:

    -
    text="to be or ";
    -
    ssegment_index map(word,text.begin(),text.end(),gen("en_US.UTF-8"));
    -
    ssegment_index::iterator p = map.find(text.begin() + 4);
    -
    if(p!=map.end())
    -
    std::cout << *p << std::endl;
    -

    Would print:

    -
    be
    -
    Note
    -

    if the iterator lays inside the segment this segment returned. If the segment does not fit the selection rules, then the segment following requested position is returned.

    -

    For example: For word boundary analysis with word_any rule:

    -
      -
    • "t|o be or ", would point to "to" - the iterator in the middle of segment "to".
    • -
    • "to |be or ", would point to "be" - the iterator at the beginning of the segment "be"
    • -
    • "to| be or ", would point to "be" - the iterator does is not point to segment with required rule so next valid segment is selected "be".
    • -
    • "to be or| ", would point to end as not valid segment found.
    • -
    -

    -Iterating Over Boundary Points

    -

    -Basic Iteration

    -

    The boundary_point_index is similar to segment_index in its interface but as a different role. Instead of returning text chunks (segments, it returns boundary_point object that represents a position in text - a base iterator used that is used for iteration of the source text C++ characters. The boundary_point object also provides a rule() member function that defines a rule this boundary was selected according to.

    -
    Note
    The beginning and the ending of the text are considered boundary points, so even an empty text consists of at least one boundary point.
    -

    Lets see an example of selecting first two sentences from a text:

    -
    using namespace boost::locale::boundary;
    - -
    -
    // our text sample
    -
    std::string const text="First sentence. Second sentence! Third one?";
    -
    // Create an index
    -
    sboundary_point_index map(sentence,text.begin(),text.end(),gen("en_US.UTF-8"));
    -
    -
    // Count two boundary points
    -
    sboundary_point_index::iterator p = map.begin(),e=map.end();
    -
    int count = 0;
    -
    while(p!=e && count < 2) {
    -
    ++count;
    -
    ++p;
    -
    }
    -
    -
    if(p!=e) {
    -
    std::cout << "First two sentences are: "
    -
    << std::string(text.begin(),p->iterator())
    -
    << std::endl;
    -
    }
    -
    else {
    -
    std::cout <<"There are less then two sentences in this "
    -
    <<"text: " << text << std::endl;
    -
    }
    -

    Would print:

    -
    First two sentences are: First sentence. Second sentence!
    -

    -Using Rules

    -

    Similarly to the segment_index the boundary_point_index provides a rule(rule_type mask) member function to filter boundary points that interest us.

    -

    It allows to set word, line and sentence rules for filtering boundary points.

    -

    Lets change an example above a little:

    -
    // our text sample
    -
    std::string const text= "First sentence. Second\n"
    -
    "sentence! Third one?";
    -

    If we run our program as is on the sample above we would get:

    -
    First two sentences are: First sentence. Second
    -

    Which is not something that we really expected. As the "Second\n" is considered an independent sentence that was separated by a line separator "Line Feed".

    -

    However, we can set set a rule sentence_term and the iterator would use only boundary points that are created by a sentence terminators like ".!?".

    -

    So by adding:

    -
    map.rule(sentence_term);
    -

    Right after the generation of the index we would get the desired output:

    -
    First two sentences are: First sentence. Second
    -sentence! 
    -

    You can also use boundary_point::rule() member function to learn about the reason this boundary point was created by comparing it with an appropriate mask.

    -

    For example:

    -
    using namespace boost::locale::boundary;
    - -
    // our text sample
    -
    std::string const text= "First sentence. Second\n"
    -
    "sentence! Third one?";
    -
    sboundary_point_index map(sentence,text.begin(),text.end(),gen("en_US.UTF-8"));
    -
    -
    for(sboundary_point_index::iterator p = map.begin(),e=map.end();p!=e;++p) {
    -
    if(p->rule() & sentence_term)
    -
    std::cout << "There is a sentence terminator: ";
    -
    else if(p->rule() & sentence_sep)
    -
    std::cout << "There is a sentence separator: ";
    -
    if(p->rule()!=0) // print if some rule exists
    -
    std::cout << "[" << std::string(text.begin(),p->iterator())
    -
    << "|" << std::string(p->iterator(),text.end())
    -
    << "]\n";
    -
    }
    -

    Would give the following output:

    -
    There is a sentence terminator: [First sentence. |Second
    -sentence! Third one?]
    -There is a sentence separator: [First sentence. Second
    -|sentence! Third one?]
    -There is a sentence terminator: [First sentence. Second
    -sentence! |Third one?]
    -There is a sentence terminator: [First sentence. Second
    -sentence! Third one?|]
    -

    -Locating Boundary Points

    -

    Sometimes it is useful to find a specific boundary point according to given iterator.

    -

    boundary_point_index provides a iterator find(base_iterator p) member function.

    -

    It would return an iterator to a boundary point on p's location or at the location following it if p does not point to appropriate position.

    -

    For example, for word boundary analysis:

    -
      -
    • If a base iterator points to "to |be", then the returned boundary point would be "to |be" (same position)
    • -
    • If a base iterator points to "t|o be", then the returned boundary point would be "to| be" (next valid position)
    • -
    -

    For example if we want to select 6 words around specific boundary point we can use following code:

    -
    using namespace boost::locale::boundary;
    - -
    // our text sample
    -
    std::string const text= "To be or not to be, that is the question.";
    -
    -
    // Create a mapping
    -
    sboundary_point_index map(word,text.begin(),text.end(),gen("en_US.UTF-8"));
    -
    // Ignore wite space
    - -
    -
    // define our arbitraty point
    -
    std::string::const_iterator pos = text.begin() + 12; // "no|t";
    -
    -
    // Get the search range
    - -
    begin =map.begin(),
    -
    end = map.end(),
    -
    it = map.find(pos); // find a boundary
    -
    -
    // go 3 words backward
    -
    for(int count = 0;count <3 && it!=begin; count ++)
    -
    --it;
    -
    -
    // Save the start
    -
    std::string::const_iterator start = *it;
    -
    -
    // go 6 words forward
    -
    for(int count = 0;count < 6 && it!=end; count ++)
    -
    ++it;
    -
    -
    // make sure we at valid position
    -
    if(it==end)
    -
    --it;
    -
    -
    // print the text
    -
    std::cout << std::string(start,it->iterator()) << std::endl;
    -

    That would print:

    -
     be or not to be, that
    -
    -
    - - - - - - diff --git a/doc/html/building_boost_locale.html b/doc/html/building_boost_locale.html deleted file mode 100644 index 3aeb549b..00000000 --- a/doc/html/building_boost_locale.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - -Boost.Locale: Building The library - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    Building The library
    -
    -
    -
    -

    -Building Boost.Locale

    -

    -Dependencies

    -
      -
    • ICU library 3.6 or above is strongly recommended
    • -
    • If no ICU library is given, iconv support is required under POSIX platforms.
    • -
    -

    -Platform Notes

    -
      -
    • If you use Boost.Locale on Windows with MinGW/GCC < 4.5 you'll be able to use static version only. Mingw/GCC prior to 4.5 have no support of dynamic runtime linking.
      - Using Boost.Locale DLL's with MinGW gcc also requires dynamic linking with the runtime libraries libstdc++ and libgcc. Some gcc builds use static linking by default so make sure you use correct link options with your compiler when you build your own programs.
    • -
    • The AIX's iconv misses important character sets that Boost.Locale requires, so you need to either use GNU iconv or link with ICU library.
    • -
    • If iconv library is not found on Darwin/Mac OS X builds make sure there is no multiple iconv installations and provide -sICONV_PATH build option to point to correct location of iconv library.
    • -
    -

    -Building Process

    -

    Now all you need to do is invoke bjam command:

    -
    ./bjam --with-locale stage
    -

    Or on Windows

    -
    .\bjam --with-locale stage
    -

    If you are using custom ICU build or you are using Microsoft Windows you need to provide a path to location of ICU library using -sICU_PATH option

    -

    For example:

    -
      -
    • If your icu build is placed at /opt/icu46 such that the files are placed like
      - /opt/icu46/include/unicode/uversion.h
      - /opt/icu46/include/unicode/calendar.h
      - ...
      - /opt/icu46/lib/libicudata.so
      - /opt/icu46/lib/libicui18n.so
      - ...
      - then you need to provide an option -sICU_PATH=/opt/icu46
          ./bjam --with-locale -sICU_PATH=/opt/icu46  stage
    • -
    • If your icu build is placed at c:\icu46 such that the files are placed like
      - c:\icu46\include\unicode\uversion.h
      - c:\icu46\include\unicode\calendar.h
      - ...
      - c:\icu46\bin\icudt.dll
      - c:\icu46\bin\icuin.dll
      - ...
      - c:\icu46\lib\icudt.lib
      - c:\icu46\lib\icuin.lib
      - ...
      - then you need to provide an option -sICU_PATH=c:\icu46
          .\bjam --with-locale -sICU_PATH=c:\icu46  stage
    • -
    -
    Note
    Don't forget to put both debug and release versions of ICU libraries in this path when using Microsoft Visual Studio so Boost.Build will link correctly debug and release versions of boost_locale library.
    -

    -Build Options

    -

    Boost.Locale supports following options with values off or on

    -
      -
    • boost.locale.icu=off disable build of ICU backend even if ICU library exists
    • -
    • boost.locale.iconv=off or boost.locale.iconv=on enable or disable use of iconv library. It is off by default on Windows and Solaris
    • -
    • boost.locale.winapi=off - disable winapi backend, it is on by default on Windows and Cygwin
    • -
    • boost.locale.std=off or boost.locale.winapi=on Disable or enable std backends. std backend is disabled by default when using Sun Studio.
    • -
    • boost.locale.posix=on or boost.locale.posix=off Enable or disable support of POSIX backend, it is on by default on Linux and Mac OS X
    • -
    -

    Also Boost.Locale supports following options

    -
      -
    • -sICU_PATH=/path/to/location/of/icu - the location of custom ICU library
    • -
    • -sICONV_PATH=/path/to/location/of/iconv - the location of custom iconv library
    • -
    -

    For example:

    -
      -
    • Build the library on Windows with ICU backend only:
          .\bjam boost.locale.winapi=off boost.locale.std=off -sICU_PATH=c:\icu46 --with-locale stage
    • -
    • Build the library on Linux with std backend only
          .\bjam boost.locale.posix=off boost.locale.icu=off --with-locale stage
    • -
    -

    -Running Unit Tests

    -

    You can run unit tests by invoking bjam with libs/locale/test project parameter

    -
    ./bjam libs/locale/test
    -

    -Binary Compatibility

    -

    Boost.Locale is built with binary compatibility in mind. Switching localization back ends on or off, or using iconv or not, does not affect binary compatibility. So if a dynamic library was built with all possible backends, other dynamic libraries compiled with, for example, only the std, posix or winapi backends would still be binary-compatible with it.

    -

    However this definitely has an effect on some features. For example, if you try to use boundary analysis or a calendar facet when the library does not support the icu backend you would get an exception.

    -
    -
    - - - - - - diff --git a/doc/html/calendar_8cpp-example.html b/doc/html/calendar_8cpp-example.html deleted file mode 100644 index 5da6ad08..00000000 --- a/doc/html/calendar_8cpp-example.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - -Boost.Locale: calendar.cpp - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    calendar.cpp
    -
    -
    -

    Example of using date_time functions for generating calendar for current year.

    -
    //
    -
    // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
    -
    //
    -
    // Distributed under the Boost Software License, Version 1.0. (See
    -
    // accompanying file LICENSE_1_0.txt or copy at
    -
    // http://www.boost.org/LICENSE_1_0.txt)
    -
    //
    -
    #include <boost/locale.hpp>
    -
    #include <iostream>
    -
    #include <iomanip>
    -
    #include <ctime>
    -
    -
    int main()
    -
    {
    -
    using namespace boost::locale;
    -
    -
    generator gen;
    -
    std::locale::global(gen(""));
    -
    std::cout.imbue(std::locale());
    -
    // Setup environment
    -
    - -
    -
    date_time start=now;
    -
    -
    // Set the first day of the first month of this year
    -
    start.set(period::month(),now.minimum(period::month()));
    -
    start.set(period::day(),start.minimum(period::day()));
    -
    -
    int current_year = period::year(now);
    -
    -
    -
    // Display current year
    -
    std::cout << format("{1,ftime='%Y'}") % now << std::endl;
    -
    -
    //
    -
    // Run forward untill current year is the date
    -
    //
    -
    for(now=start; period::year(now) == current_year;) {
    -
    -
    // Print heading of month
    - -
    std::cout << format("{1,ftime='%B'}") % now <<std::endl;
    -
    else
    -
    std::cout << format("{1,ftime='%B'} ({1,ftime='%Y-%m-%d',locale=en} - {2,locale=en,ftime='%Y-%m-%d'})")
    -
    % now
    -
    % date_time(now,now.maximum(period::day())*period::day()) << std::endl;
    -
    -
    int first = calendar().first_day_of_week();
    -
    -
    // Print weeks days
    -
    for(int i=0;i<7;i++) {
    -
    date_time tmp(now,period::day_of_week() * (first + i));
    -
    std::cout << format("{1,w=8,ftime='%a'} ") % tmp;
    -
    }
    -
    std::cout << std::endl;
    -
    -
    int current_month = now / period::month();
    -
    int skip = now / period::day_of_week_local() - 1;
    -
    for(int i=0;i<skip*9;i++)
    -
    std::cout << ' ';
    -
    for(;now / period::month() == current_month ;now += period::day()) {
    -
    std::cout << format("{1,w=8,ftime='%e'} ") % now;
    -
    if(now / period::day_of_week_local() == 7)
    -
    std::cout << std::endl;
    -
    }
    -
    std::cout << std::endl;
    -
    }
    -
    -
    }
    -
    // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
    -
    -
    - - - - - - diff --git a/doc/html/changelog.html b/doc/html/changelog.html deleted file mode 100644 index a40302b2..00000000 --- a/doc/html/changelog.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - -Boost.Locale: Changelog - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    Changelog
    -
    -
    -
      -
    • 1.67.0 -
        -
      • Added support of unique_ptr interface in addition to C++2003 auto_ptr - in order to support C++2017, now you can use BOOST_LOCALE_HIDE_AUTO_PTR definiton to remove auto_ptr from the interfaces and prevent deprecated watnings
      • -
      • Fixed test problem with ICU >60.1
      • -
      • Fix of solaris build
      • -
      • Fixed wired FreeBSD/clang issue on optimized build. Probably compiler workaround
      • -
      • Added workaround for failing MSVC tests due to 932 codepage codecvt issue
      • -
      • Fixed bugs 6851, 12572, 12453
      • -
      • Fixed missing throw in case of failure in icu/date_time
      • -
      • Fixed build agains Boost.Thread v4
      • -
      • Fixed Year of week instead of year ICU backend formatting
      • -
      • Fixed formatting test for ICU 56.1 and above
      • -
      -
    • -
    • 1.60.0
        -
      • Implemented generic codecvt facet and add general purpose utf8_codecvt facet
      • -
      • Added posix locale support for FreeBSD 10.0 and above
      • -
      • Fixed issues 10017 (sun redefinition on SunOS), 11163 (set_default_messages_domain incorrect behavior), 11673 - build issues
      • -
      • Some warning cleanup
      • -
      • Fixed tests for latest ICU versions
      • -
      • Added workaround for libc++ issues
      • -
      • Added new defines BOOST_LOCALE_ENABLE_CHAR16_T and BOOST_LOCALE_ENABLE_CHAR32_T to enable C++11 char16_t and char32_t instead of deprecated ones
      • -
      -
    • -
    • 1.53.0 - Bug fixes: 7743, 7386, 7734, 7701, 7368, 7762:
        -
      • 7743 - security related bug fix, some invalid UTF-8 sequences where accepted as valid
      • -
      • 7386 - invalid Windows codepage names used
      • -
      • 7734 - fixed missing documentation, caused by a error in Doxygen formatting
      • -
      • 7701 - fixed missing std:: in some places
      • -
      • 7368, 7762 - Spelling, grammar, typos
      • -
      -
    • -
    • 1.49.0
        -
      • Fixed incorrect use of MultiByteToWideChar in detection of invalid input sequences
      • -
      -
    • -
    • 1.48.0 - First Release
    • -
    -
    -
    - - - - - - diff --git a/doc/html/charset_handling.html b/doc/html/charset_handling.html deleted file mode 100644 index 547d45c7..00000000 --- a/doc/html/charset_handling.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - -Boost.Locale: Character Set Conversions - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    Character Set Conversions
    -
    -
    -

    -Convenience Interface

    -

    Boost.Locale provides to_utf, from_utf and utf_to_utf functions in the boost::locale::conv namespace. They are simple and convenient functions to convert a string to and from UTF-8/16/32 strings and strings using other encodings.

    -

    For example:

    -
    std::string utf8_string = to_utf<char>(latin1_string,"Latin1");
    -
    std::wstring wide_string = to_utf<wchar_t>(latin1_string,"Latin1");
    -
    std::string latin1_string = from_utf(wide_string,"Latin1");
    -
    std::string utf8_string2 = utf_to_utf<char>(wide_string);
    -

    This function may use an explicit encoding name like "Latin1" or "ISO-8859-8", or use std::locale as a parameter to fetch this information from it. It also receives a policy parameter that tells it how to behave if the conversion can't be performed (i.e. an illegal or unsupported character is found). By default this function skips all illegal characters and tries to do the best it can, however, it is possible ask it to throw a conversion_error exception by passing the stop flag to it:

    -
    std::wstring s=to_utf<wchar_t>("\xFF\xFF","UTF-8",stop);
    -
    // Throws because this string is illegal in UTF-8
    -

    -std::codecvt facet

    -

    Boost.Locale provides stream codepage conversion facets based on the std::codecvt facet. This allows conversion between wide-character encodings and 8-bit encodings like UTF-8, ISO-8859 or Shift-JIS.

    -

    Most of compilers provide such facets, but:

    -
      -
    • Under Windows MSVC does not support UTF-8 encodings at all.
    • -
    • Under Linux the encodings are supported only if the required locales are generated. For example it may be impossible to create a he_IL.CP1255 locale even when the he_IL locale is available.
    • -
    -

    Thus Boost.Locale provides an option to generate code-page conversion facets for use with Boost.Iostreams filters or std::wfstream. For example:

    -
    std::locale loc= generator().generate("he_IL.UTF-8");
    -
    std::wofstream file.
    -
    file.imbue(loc);
    -
    file.open("hello.txt");
    -
    file << L"שלום!" << endl;
    -

    Would create a file hello.txt encoded as UTF-8 with "שלום!" (shalom) in it.

    -

    -Integration with Boost.Iostreams

    -

    You can use the std::codecvt facet directly, but this is quite tricky and requires accurate buffer and error management.

    -

    You can use the boost::iostreams::code_converter class for stream-oriented conversions between the wide-character set and narrow locale character set.

    -

    This is a sample program that converts wide to narrow characters for an arbitrary stream:

    -
    #include <boost/iostreams/stream.hpp>
    -
    #include <boost/iostreams/categories.hpp>
    -
    #include <boost/iostreams/code_converter.hpp>
    -
    -
    #include <boost/locale.hpp>
    -
    #include <iostream>
    -
    -
    namespace io = boost::iostreams;
    -
    -
    // Device that consumes the converted text,
    -
    // In our case it just writes to standard output
    -
    class consumer {
    -
    public:
    -
    typedef char char_type;
    -
    typedef io::sink_tag category;
    -
    std::streamsize write(const char* s, std::streamsize n)
    -
    {
    -
    std::cout.write(s,n);
    -
    return n;
    -
    }
    -
    };
    -
    -
    -
    int main()
    -
    {
    -
    // the device that converts wide characters
    -
    // to narrow
    -
    typedef io::code_converter<consumer> converter_device;
    -
    // the stream that uses this device
    -
    typedef io::stream<converter_device> converter_stream;
    -
    -
    -
    consumer cons;
    -
    // setup out converter to work
    -
    // with he_IL.UTF-8 locale
    -
    converter_device dev;
    - -
    dev.imbue(gen("he_IL.UTF-8"));
    -
    dev.open(cons);
    -
    converter_stream stream;
    -
    stream.open(dev);
    -
    // Now wide characters that are written
    -
    // to the stream would be given to
    -
    // our consumer as narrow characters
    -
    // in UTF-8 encoding
    -
    stream << L"שלום" << std::flush;
    -
    }
    -

    -Limitations of std::codecvt

    -

    The Standard does not provide any information about std::mbstate_t that could be used to save intermediate code-page conversion states. It leaves the definition up to the compiler implementation, making it impossible to reimplement std::codecvt<wchar_t,char,mbstate_t> for stateful encodings. Thus, Boost.Locale's codecvt facet implementation may be used with stateless encodings like UTF-8, ISO-8859, and Shift-JIS, but not with stateful encodings like UTF-7 or SCSU.

    -

    Recommendation: Prefer the Unicode UTF-8 encoding for char based strings and files in your application.

    -
    Note
    -

    The implementation of codecvt for single byte encodings like ISO-8859-X and for UTF-8 is very efficent and would allow fast conversion of the content, however its performance may be sub-optimal for double-width encodings like Shift-JIS, due to the stateless problem described above.

    -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1abstract__calendar-members.html b/doc/html/classboost_1_1locale_1_1abstract__calendar-members.html deleted file mode 100644 index 56f554a3..00000000 --- a/doc/html/classboost_1_1locale_1_1abstract__calendar-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::abstract_calendar Member List
    -
    -
    - -

    This is the complete list of members for boost::locale::abstract_calendar, including all inherited members.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    absolute_maximum enum valueboost::locale::abstract_calendar
    absolute_minimum enum valueboost::locale::abstract_calendar
    actual_maximum enum valueboost::locale::abstract_calendar
    actual_minimum enum valueboost::locale::abstract_calendar
    adjust_value(period::marks::period_mark p, update_type u, int difference)=0boost::locale::abstract_calendarpure virtual
    calendar_option_type enum nameboost::locale::abstract_calendar
    clone() const =0boost::locale::abstract_calendarpure virtual
    current enum valueboost::locale::abstract_calendar
    difference(abstract_calendar const *other, period::marks::period_mark p) const =0boost::locale::abstract_calendarpure virtual
    get_option(calendar_option_type opt) const =0boost::locale::abstract_calendarpure virtual
    get_time() const =0boost::locale::abstract_calendarpure virtual
    get_timezone() const =0boost::locale::abstract_calendarpure virtual
    get_value(period::marks::period_mark p, value_type v) const =0boost::locale::abstract_calendarpure virtual
    greatest_minimum enum valueboost::locale::abstract_calendar
    is_dst enum valueboost::locale::abstract_calendar
    is_gregorian enum valueboost::locale::abstract_calendar
    least_maximum enum valueboost::locale::abstract_calendar
    move enum valueboost::locale::abstract_calendar
    normalize()=0boost::locale::abstract_calendarpure virtual
    roll enum valueboost::locale::abstract_calendar
    same(abstract_calendar const *other) const =0boost::locale::abstract_calendarpure virtual
    set_option(calendar_option_type opt, int v)=0boost::locale::abstract_calendarpure virtual
    set_time(posix_time const &p)=0boost::locale::abstract_calendarpure virtual
    set_timezone(std::string const &tz)=0boost::locale::abstract_calendarpure virtual
    set_value(period::marks::period_mark p, int value)=0boost::locale::abstract_calendarpure virtual
    update_type enum nameboost::locale::abstract_calendar
    value_type enum nameboost::locale::abstract_calendar
    ~abstract_calendar() (defined in boost::locale::abstract_calendar)boost::locale::abstract_calendarinlinevirtual
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1abstract__calendar.html b/doc/html/classboost_1_1locale_1_1abstract__calendar.html deleted file mode 100644 index fd36e7b0..00000000 --- a/doc/html/classboost_1_1locale_1_1abstract__calendar.html +++ /dev/null @@ -1,607 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::abstract_calendar Class Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::abstract_calendar Class Referenceabstract
    -
    -
    - -

    #include <boost/locale/date_time_facet.hpp>

    - - - - - - - - -

    -Public Types

    enum  value_type {
    -  absolute_minimum, -actual_minimum, -greatest_minimum, -current, -
    -  least_maximum, -actual_maximum, -absolute_maximum -
    - }
     
    enum  update_type { move, -roll - }
     
    enum  calendar_option_type { is_gregorian, -is_dst - }
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Public Member Functions

    virtual abstract_calendarclone () const =0
     
    virtual void set_value (period::marks::period_mark p, int value)=0
     
    virtual void normalize ()=0
     
    virtual int get_value (period::marks::period_mark p, value_type v) const =0
     
    virtual void set_time (posix_time const &p)=0
     
    virtual posix_time get_time () const =0
     
    virtual void set_option (calendar_option_type opt, int v)=0
     
    virtual int get_option (calendar_option_type opt) const =0
     
    virtual void adjust_value (period::marks::period_mark p, update_type u, int difference)=0
     
    virtual int difference (abstract_calendar const *other, period::marks::period_mark p) const =0
     
    virtual void set_timezone (std::string const &tz)=0
     
    virtual std::string get_timezone () const =0
     
    virtual bool same (abstract_calendar const *other) const =0
     
    -

    Detailed Description

    -

    This class defines generic calendar class, it is used by date_time and calendar objects internally. It is less useful for end users, but it is build for localization backend implementation

    -

    Member Enumeration Documentation

    - -
    -
    -

    Information about calendar

    - - - -
    Enumerator
    is_gregorian  -

    Check if the calendar is Gregorian.

    -
    is_dst  -

    Check if the current time is in daylight time savings.

    -
    - -
    -
    - -
    -
    -

    A way to update the value

    - - - -
    Enumerator
    move  -

    Change the value up or down effecting others for example 1990-12-31 + 1 day = 1991-01-01.

    -
    roll  -

    Change the value up or down not effecting others for example 1990-12-31 + 1 day = 1990-12-01.

    -
    - -
    -
    - -
    -
    -

    Type that defines how to fetch the value

    - - - - - - - - -
    Enumerator
    absolute_minimum  -

    Absolute possible minimum for the value, for example for day is 1.

    -
    actual_minimum  -

    Actual minimal value for this period.

    -
    greatest_minimum  -

    Maximal minimum value that can be for this period.

    -
    current  -

    Current value of this period.

    -
    least_maximum  -

    The last maximal value for this period, For example for Gregorian calendar day it is 28

    -
    actual_maximum  -

    Actual maximum, for it can be 28, 29, 30, 31 for day according to current month.

    -
    absolute_maximum  -

    Maximal value, for Gregorian day it would be 31.

    -
    - -
    -
    -

    Member Function Documentation

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    virtual void boost::locale::abstract_calendar::adjust_value (period::marks::period_mark p,
    update_type u,
    int difference 
    )
    -
    -pure virtual
    -
    -

    Adjust period's p value by difference items using a update_type u. Note: not all values are adjustable

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - -
    virtual abstract_calendar* boost::locale::abstract_calendar::clone () const
    -
    -pure virtual
    -
    -

    Make a polymorphic copy of the calendar

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    virtual int boost::locale::abstract_calendar::difference (abstract_calendar const * other,
    period::marks::period_mark p 
    ) const
    -
    -pure virtual
    -
    -

    Calculate the difference between this calendar and other in p units

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    virtual int boost::locale::abstract_calendar::get_option (calendar_option_type opt) const
    -
    -pure virtual
    -
    -

    Get option for calendar, currently only check if it is Gregorian calendar

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - -
    virtual posix_time boost::locale::abstract_calendar::get_time () const
    -
    -pure virtual
    -
    -

    Get current time point

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - -
    virtual std::string boost::locale::abstract_calendar::get_timezone () const
    -
    -pure virtual
    -
    -

    Get current time zone, empty - system one

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    virtual int boost::locale::abstract_calendar::get_value (period::marks::period_mark p,
    value_type v 
    ) const
    -
    -pure virtual
    -
    -

    Get specific value for period p according to a value_type v

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - -
    virtual void boost::locale::abstract_calendar::normalize ()
    -
    -pure virtual
    -
    -

    Recalculate all periods after setting them, should be called after use of set_value() function.

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    virtual bool boost::locale::abstract_calendar::same (abstract_calendar const * other) const
    -
    -pure virtual
    -
    -

    Check of two calendars have same rules

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    virtual void boost::locale::abstract_calendar::set_option (calendar_option_type opt,
    int v 
    )
    -
    -pure virtual
    -
    -

    Set option for calendar, for future use

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    virtual void boost::locale::abstract_calendar::set_time (posix_time const & p)
    -
    -pure virtual
    -
    -

    Set current time point

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    virtual void boost::locale::abstract_calendar::set_timezone (std::string const & tz)
    -
    -pure virtual
    -
    -

    Set time zone, empty - use system

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    virtual void boost::locale::abstract_calendar::set_value (period::marks::period_mark p,
    int value 
    )
    -
    -pure virtual
    -
    -

    Set specific value for period p, note not all values are settable.

    -

    After call of set_value you may want to call normalize() function to make sure vall periods are updated, if you set sereral fields that are part of single date/time representation you should call set_value several times and then call normalize().

    -

    If normalize() is not called after set_value, the behavior is undefined

    - -
    -
    -
    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1abstract__calendar.js b/doc/html/classboost_1_1locale_1_1abstract__calendar.js deleted file mode 100644 index c841fb61..00000000 --- a/doc/html/classboost_1_1locale_1_1abstract__calendar.js +++ /dev/null @@ -1,34 +0,0 @@ -var classboost_1_1locale_1_1abstract__calendar = -[ - [ "calendar_option_type", "classboost_1_1locale_1_1abstract__calendar.html#a5f1927f4c71fafa4712265e6b68958b5", [ - [ "is_gregorian", "classboost_1_1locale_1_1abstract__calendar.html#a5f1927f4c71fafa4712265e6b68958b5add910815d1ad0e97275b781223e869a9", null ], - [ "is_dst", "classboost_1_1locale_1_1abstract__calendar.html#a5f1927f4c71fafa4712265e6b68958b5a69f0c20e321e3b914883869466122c61", null ] - ] ], - [ "update_type", "classboost_1_1locale_1_1abstract__calendar.html#a92cf9485b91d60b70ef00e183bdf4e95", [ - [ "move", "classboost_1_1locale_1_1abstract__calendar.html#a92cf9485b91d60b70ef00e183bdf4e95aac5f9cb6e12a121b47b51434a3655c81", null ], - [ "roll", "classboost_1_1locale_1_1abstract__calendar.html#a92cf9485b91d60b70ef00e183bdf4e95a704e0e917603c2a88de22f3426a3e20b", null ] - ] ], - [ "value_type", "classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5", [ - [ "absolute_minimum", "classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5a28694319e58f559df9ca41b22f03427e", null ], - [ "actual_minimum", "classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5a5aa2c2d439c6e801e3bc48a35972932b", null ], - [ "greatest_minimum", "classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5a75e80e0a10af4b2b8eb2fcab72e4b200", null ], - [ "current", "classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5a83d87ff10ff6107dfd0405f1e8757ef8", null ], - [ "least_maximum", "classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5a388661725182373d2f92b709034f85c9", null ], - [ "actual_maximum", "classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5a3d2648e95466623ba20502281e0208af", null ], - [ "absolute_maximum", "classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5ab5d1af0b2698fee942a1486dfcc6552b", null ] - ] ], - [ "~abstract_calendar", "classboost_1_1locale_1_1abstract__calendar.html#a1fa3963b78eecfe4d0f22f655bedb9c2", null ], - [ "adjust_value", "classboost_1_1locale_1_1abstract__calendar.html#afb8e3a4d2ad93274ec119dc3dd0b103a", null ], - [ "clone", "classboost_1_1locale_1_1abstract__calendar.html#a73bc2d023be4c6ac6a6f441f74ded2f9", null ], - [ "difference", "classboost_1_1locale_1_1abstract__calendar.html#a7bd4c26f5a4260f6d9c91c615efc4b46", null ], - [ "get_option", "classboost_1_1locale_1_1abstract__calendar.html#a0c034dd6f135b7d9b6faad08d49715a8", null ], - [ "get_time", "classboost_1_1locale_1_1abstract__calendar.html#a8900097c0b687393b053bc0420070815", null ], - [ "get_timezone", "classboost_1_1locale_1_1abstract__calendar.html#a51f4b91d0dc2f9afa3920a771307d92f", null ], - [ "get_value", "classboost_1_1locale_1_1abstract__calendar.html#a7eacfa5d8f37dfc839d0239c2fcdf64e", null ], - [ "normalize", "classboost_1_1locale_1_1abstract__calendar.html#aa06fef77acaa6104e3cd2bc80ccc76d9", null ], - [ "same", "classboost_1_1locale_1_1abstract__calendar.html#aa20ae19bca185cc0fa4ab69d7f3c5883", null ], - [ "set_option", "classboost_1_1locale_1_1abstract__calendar.html#a9265206013005d9ac30cf723a7ffe032", null ], - [ "set_time", "classboost_1_1locale_1_1abstract__calendar.html#acb01268c84f27a8a736b715ab9e9557a", null ], - [ "set_timezone", "classboost_1_1locale_1_1abstract__calendar.html#aa17f0fd2e88d3da8fe7b12e98ad2d6c3", null ], - [ "set_value", "classboost_1_1locale_1_1abstract__calendar.html#a15067ccf90a19e640051a30a6d3a2a7f", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1basic__format-members.html b/doc/html/classboost_1_1locale_1_1basic__format-members.html deleted file mode 100644 index b75a28ec..00000000 --- a/doc/html/classboost_1_1locale_1_1basic__format-members.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::basic_format< CharType > Member List
    -
    - -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1basic__format.html b/doc/html/classboost_1_1locale_1_1basic__format.html deleted file mode 100644 index f722dede..00000000 --- a/doc/html/classboost_1_1locale_1_1basic__format.html +++ /dev/null @@ -1,338 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::basic_format< CharType > Class Template Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::basic_format< CharType > Class Template Reference
    -
    -
    - -

    a printf like class that allows type-safe and locale aware message formatting - More...

    - -

    #include <boost/locale/format.hpp>

    - - - - - - - - - - - - - -

    -Public Types

    -typedef CharType char_type
     Underlying character type.
     
    typedef basic_message< char_typemessage_type
     
    -typedef std::basic_string
    -< CharType > 
    string_type
     string type for this type of character
     
    -typedef std::basic_ostream
    -< CharType > 
    stream_type
     output stream type for this type of character
     
    - - - - - - - - - - - - -

    -Public Member Functions

     basic_format (string_type format_string)
     
     basic_format (message_type const &trans)
     
    template<typename Formattible >
    basic_formatoperator% (Formattible const &object)
     
    string_type str (std::locale const &loc=std::locale()) const
     
    void write (stream_type &out) const
     
    -

    Detailed Description

    -

    template<typename CharType>
    -class boost::locale::basic_format< CharType >

    - -

    a printf like class that allows type-safe and locale aware message formatting

    -

    This class creates a formatted message similar to printf or boost::format and receives formatted entries via operator %.

    -

    For example

    -
    cout << format("Hello {1}, you are {2} years old") % name % age << endl;
    -

    Formatting is enclosed between curly brackets { } and defined by a comma separated list of flags in the format key[=value] value may also be text included between single quotes ' that is used for special purposes where inclusion of non-ASCII text is allowed

    -

    Including of literal { and } is possible by specifying double brackets {{ and }} accordingly.

    -

    For example:

    -
    cout << format("The height of water at {1,time} is {2,num=fixed,precision=3}") % time % height;
    -

    The special key – a number without a value defines the position of an input parameter. List of keys:

    -
      -
    • [0-9]+ – digits, the index of a formatted parameter – mandatory key.
    • -
    • num or number – format a number. Optional values are:
        -
      • hex – display hexadecimal number
      • -
      • oct – display in octal format
      • -
      • sci or scientific – display in scientific format
      • -
      • fix or fixed – display in fixed format
      • -
      -For example number=sci
    • -
    • cur or currency – format currency. Optional values are:
        -
      • iso – display using ISO currency symbol.
      • -
      • nat or national – display using national currency symbol.
      • -
      -
    • -
    • per or percent – format percent value.
    • -
    • date, time , datetime or dt – format date, time or date and time. Optional values are:
        -
      • s or short – display in short format
      • -
      • m or medium – display in medium format.
      • -
      • l or long – display in long format.
      • -
      • f or full – display in full format.
      • -
      -
    • -
    • ftime with string (quoted) parameter – display as with strftime see, as::ftime manipulator
    • -
    • spell or spellout – spell the number.
    • -
    • ord or ordinal – format ordinal number (1st, 2nd... etc)
    • -
    • left or < – align to left.
    • -
    • right or > – align to right.
    • -
    • width or w – set field width (requires parameter).
    • -
    • precision or p – set precision (requires parameter).
    • -
    • locale – with parameter – switch locale for current operation. This command generates locale with formatting facets giving more fine grained control of formatting. For example:
      cout << format("Today {1,date} ({1,date,locale=he_IL.UTF-8@calendar=hebrew,date} Hebrew Date)") % date;
      -
    • -
    • timezone or tz – the name of the timezone to display the time in. For example:
      -
      cout << format("Time is: Local {1,time}, ({1,time,tz=EET} Eastern European Time)") % date;
      -
    • -
    • local - display the time in local time
    • -
    • gmt - display the time in UTC time scale
      cout << format("Local time is: {1,time,local}, universal time is {1,time,gmt}") % time;
      -
    • -
    -

    Invalid formatting strings are slightly ignored. This would prevent from translator to crash the program in unexpected location.

    -

    Member Typedef Documentation

    - -
    -
    -
    -template<typename CharType >
    - - - - -
    typedef basic_message<char_type> boost::locale::basic_format< CharType >::message_type
    -
    -

    The translation message type

    - -
    -
    -

    Constructor & Destructor Documentation

    - -
    -
    -
    -template<typename CharType >
    - - - - - -
    - - - - - - - - -
    boost::locale::basic_format< CharType >::basic_format (string_type format_string)
    -
    -inline
    -
    -

    Create a format class for format_string

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - -
    - - - - - - - - -
    boost::locale::basic_format< CharType >::basic_format (message_type const & trans)
    -
    -inline
    -
    -

    Create a format class using message trans. The message if translated first according to the rules of target locale and then interpreted as format string

    - -
    -
    -

    Member Function Documentation

    - -
    -
    -
    -template<typename CharType >
    -
    -template<typename Formattible >
    - - - - - -
    - - - - - - - - -
    basic_format& boost::locale::basic_format< CharType >::operator% (Formattible const & object)
    -
    -inline
    -
    -

    Add new parameter to format list. The object should be a type with defined expression out << object where out is std::basic_ostream.

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - -
    - - - - - - - - -
    string_type boost::locale::basic_format< CharType >::str (std::locale const & loc = std::locale()) const
    -
    -inline
    -
    -

    Format a string using a locale loc

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - -
    - - - - - - - - -
    void boost::locale::basic_format< CharType >::write (stream_typeout) const
    -
    -inline
    -
    -

    write a formatted string to output stream out using out's locale

    - -
    -
    -
    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1basic__format.js b/doc/html/classboost_1_1locale_1_1basic__format.js deleted file mode 100644 index 0865116a..00000000 --- a/doc/html/classboost_1_1locale_1_1basic__format.js +++ /dev/null @@ -1,12 +0,0 @@ -var classboost_1_1locale_1_1basic__format = -[ - [ "char_type", "classboost_1_1locale_1_1basic__format.html#a45c16f2e69842b8d223d240bbd6e210a", null ], - [ "message_type", "classboost_1_1locale_1_1basic__format.html#a75213e5cc9d113f6b25e72542a4841f5", null ], - [ "stream_type", "classboost_1_1locale_1_1basic__format.html#a6aba7e54f0065f2697d13ff8a859309a", null ], - [ "string_type", "classboost_1_1locale_1_1basic__format.html#a0e1263d23f67aa38b4d857031fccf973", null ], - [ "basic_format", "classboost_1_1locale_1_1basic__format.html#a4c885ae60a5b867863b79acb75feff9e", null ], - [ "basic_format", "classboost_1_1locale_1_1basic__format.html#a155e8e60061da7461bbcc958d600c190", null ], - [ "operator%", "classboost_1_1locale_1_1basic__format.html#a24de7f69a5d95fd6181d888f07fc6770", null ], - [ "str", "classboost_1_1locale_1_1basic__format.html#a6bc65d7993e3ab6ad51809ef8fb65400", null ], - [ "write", "classboost_1_1locale_1_1basic__format.html#a457c9228d13e80da3c807a51aa5ef6cd", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1basic__message-members.html b/doc/html/classboost_1_1locale_1_1basic__message-members.html deleted file mode 100644 index 0bf97ae3..00000000 --- a/doc/html/classboost_1_1locale_1_1basic__message-members.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::basic_message< CharType > Member List
    -
    -
    - -

    This is the complete list of members for boost::locale::basic_message< CharType >, including all inherited members.

    - - - - - - - - - - - - - - - - - - - - - - - -
    basic_message()boost::locale::basic_message< CharType >inline
    basic_message(char_type const *id)boost::locale::basic_message< CharType >inlineexplicit
    basic_message(char_type const *single, char_type const *plural, int n)boost::locale::basic_message< CharType >inlineexplicit
    basic_message(char_type const *context, char_type const *id)boost::locale::basic_message< CharType >inlineexplicit
    basic_message(char_type const *context, char_type const *single, char_type const *plural, int n)boost::locale::basic_message< CharType >inlineexplicit
    basic_message(string_type const &id)boost::locale::basic_message< CharType >inlineexplicit
    basic_message(string_type const &single, string_type const &plural, int number)boost::locale::basic_message< CharType >inlineexplicit
    basic_message(string_type const &context, string_type const &id)boost::locale::basic_message< CharType >inlineexplicit
    basic_message(string_type const &context, string_type const &single, string_type const &plural, int number)boost::locale::basic_message< CharType >inlineexplicit
    basic_message(basic_message const &other)boost::locale::basic_message< CharType >inline
    char_type typedefboost::locale::basic_message< CharType >
    facet_type typedefboost::locale::basic_message< CharType >
    operator string_type() const boost::locale::basic_message< CharType >inline
    operator=(basic_message const &other)boost::locale::basic_message< CharType >inline
    str() const boost::locale::basic_message< CharType >inline
    str(std::locale const &locale) const boost::locale::basic_message< CharType >inline
    str(std::locale const &locale, std::string const &domain_id) const boost::locale::basic_message< CharType >inline
    str(std::string const &domain_id) const boost::locale::basic_message< CharType >inline
    str(std::locale const &loc, int id) const boost::locale::basic_message< CharType >inline
    string_type typedefboost::locale::basic_message< CharType >
    swap(basic_message &other)boost::locale::basic_message< CharType >inline
    write(std::basic_ostream< char_type > &out) const boost::locale::basic_message< CharType >inline
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1basic__message.html b/doc/html/classboost_1_1locale_1_1basic__message.html deleted file mode 100644 index 295e2c79..00000000 --- a/doc/html/classboost_1_1locale_1_1basic__message.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::basic_message< CharType > Class Template Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::basic_message< CharType > Class Template Reference
    -
    -
    - -

    This class represents a message that can be converted to a specific locale message. - More...

    - -

    #include <boost/locale/message.hpp>

    - - - - - - - - - - - -

    -Public Types

    -typedef CharType char_type
     The character this message object is used with.
     
    -typedef std::basic_string
    -< char_type
    string_type
     The string type this object can be used with.
     
    -typedef message_format< char_typefacet_type
     The type of the facet the messages are fetched with.
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Public Member Functions

     basic_message ()
     
     basic_message (char_type const *id)
     
     basic_message (char_type const *single, char_type const *plural, int n)
     
     basic_message (char_type const *context, char_type const *id)
     
     basic_message (char_type const *context, char_type const *single, char_type const *plural, int n)
     
     basic_message (string_type const &id)
     
     basic_message (string_type const &single, string_type const &plural, int number)
     
     basic_message (string_type const &context, string_type const &id)
     
     basic_message (string_type const &context, string_type const &single, string_type const &plural, int number)
     
     basic_message (basic_message const &other)
     
    basic_message const & operator= (basic_message const &other)
     
    void swap (basic_message &other)
     
     operator string_type () const
     
    string_type str () const
     
    string_type str (std::locale const &locale) const
     
    string_type str (std::locale const &locale, std::string const &domain_id) const
     
    string_type str (std::string const &domain_id) const
     
    string_type str (std::locale const &loc, int id) const
     
    void write (std::basic_ostream< char_type > &out) const
     
    -

    Detailed Description

    -

    template<typename CharType>
    -class boost::locale::basic_message< CharType >

    - -

    This class represents a message that can be converted to a specific locale message.

    -

    It holds the original ASCII string that is queried in the dictionary when converting to the output string. The created string may be UTF-8, UTF-16, UTF-32 or other 8-bit encoded string according to the target character type and locale encoding.

    -

    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1basic__message.js b/doc/html/classboost_1_1locale_1_1basic__message.js deleted file mode 100644 index 8fd75a21..00000000 --- a/doc/html/classboost_1_1locale_1_1basic__message.js +++ /dev/null @@ -1,25 +0,0 @@ -var classboost_1_1locale_1_1basic__message = -[ - [ "char_type", "group__message.html#gaa5d8dcf9d7aa01abbe73c841299345db", null ], - [ "facet_type", "group__message.html#gaa63527cb368d0bcd4cb0809138c927df", null ], - [ "string_type", "group__message.html#ga529423e08fc9a8ca9ceef5c56181c6d3", null ], - [ "basic_message", "group__message.html#ga33bdf7fbb164a96a8685b5747afc2b45", null ], - [ "basic_message", "group__message.html#gae32d7f89d5f268e8d6bae662d8008bae", null ], - [ "basic_message", "group__message.html#ga40bf56415a235f13ee666d51f645f280", null ], - [ "basic_message", "group__message.html#ga4d78f8f45467984d7244e2ddbb9e0f6e", null ], - [ "basic_message", "group__message.html#gabf9afe77f0254397389289c386bf8a73", null ], - [ "basic_message", "group__message.html#gabbb4365d621a33442ae34ac7c17a9d74", null ], - [ "basic_message", "group__message.html#ga380f3a258b3b28929bbf01f4e622e71a", null ], - [ "basic_message", "group__message.html#ga8c2fab962e10a46ea85f0188d08e499d", null ], - [ "basic_message", "group__message.html#gaf8ba10b7b1d45e6c78b84d77e8175d5d", null ], - [ "basic_message", "group__message.html#gae6ed9dded4ab78ff28e994b48c766c84", null ], - [ "operator string_type", "group__message.html#ga8da81038939b85ca248cba50f1deacf1", null ], - [ "operator=", "group__message.html#gae0e786e45ef32cf73efd8495cae45aed", null ], - [ "str", "group__message.html#ga11c5f400e03e0b16b9a60bd3fae3f168", null ], - [ "str", "group__message.html#ga26c6489f8269096f835abfb268498fdd", null ], - [ "str", "group__message.html#gaa907a1d3f43fe59cea938e1606f004ee", null ], - [ "str", "group__message.html#ga2d2ca0fe119e4ce4766fd3d42b549314", null ], - [ "str", "group__message.html#gaa51c0f65363d8d1cee83bb07fe45ced5", null ], - [ "swap", "group__message.html#gac204b563c7c9bd86e5555f129350f0e3", null ], - [ "write", "group__message.html#ga4dd81f4d40c4e8871bb1bf02bbc8e968", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__indexing-members.html b/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__indexing-members.html deleted file mode 100644 index b7a693d1..00000000 --- a/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__indexing-members.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::boundary::boundary_indexing< CharType > Member List
    -
    -
    - -

    This is the complete list of members for boost::locale::boundary::boundary_indexing< CharType >, including all inherited members.

    - - - - -
    boundary_indexing(size_t refs=0)boost::locale::boundary::boundary_indexing< CharType >inline
    idboost::locale::boundary::boundary_indexing< CharType >static
    map(boundary_type t, Char const *begin, Char const *end) const =0boost::locale::boundary::boundary_indexing< CharType >pure virtual
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__indexing.html b/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__indexing.html deleted file mode 100644 index 79165186..00000000 --- a/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__indexing.html +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::boundary::boundary_indexing< CharType > Class Template Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::boundary::boundary_indexing< CharType > Class Template Referenceabstract
    -
    -
    - -

    This facet generates an index for boundary analysis for a given text. - More...

    - -

    #include <boost/locale/boundary/facets.hpp>

    -
    -Inheritance diagram for boost::locale::boundary::boundary_indexing< CharType >:
    -
    -
    - - - -
    - - - - - - -

    -Public Member Functions

     boundary_indexing (size_t refs=0)
     
    virtual index_type map (boundary_type t, Char const *begin, Char const *end) const =0
     
    - - - -

    -Static Public Attributes

    static std::locale::id id
     
    -

    Detailed Description

    -

    template<typename CharType>
    -class boost::locale::boundary::boundary_indexing< CharType >

    - -

    This facet generates an index for boundary analysis for a given text.

    -

    It is specialized for 4 types of characters char_t, wchar_t, char16_t and char32_t

    -

    Constructor & Destructor Documentation

    - -
    -
    -
    -template<typename CharType >
    - - - - - -
    - - - - - - - - -
    boost::locale::boundary::boundary_indexing< CharType >::boundary_indexing (size_t refs = 0)
    -
    -inline
    -
    -

    Default constructor typical for facets

    - -
    -
    -

    Member Function Documentation

    - -
    -
    -
    -template<typename CharType >
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    virtual index_type boost::locale::boundary::boundary_indexing< CharType >::map (boundary_type t,
    Char const * begin,
    Char const * end 
    ) const
    -
    -pure virtual
    -
    -

    Create index for boundary type t for text in range [begin,end)

    -

    The returned value is an index of type index_type. Note that this index is never empty, even if the range [begin,end) is empty it consists of at least one boundary point with the offset 0.

    - -
    -
    -

    Member Data Documentation

    - -
    -
    -
    -template<typename CharType >
    - - - - - -
    - - - - -
    std::locale::id boost::locale::boundary::boundary_indexing< CharType >::id
    -
    -static
    -
    -

    Identification of this facet

    - -
    -
    -
    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__indexing.js b/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__indexing.js deleted file mode 100644 index c6976135..00000000 --- a/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__indexing.js +++ /dev/null @@ -1,6 +0,0 @@ -var classboost_1_1locale_1_1boundary_1_1boundary__indexing = -[ - [ "boundary_indexing", "classboost_1_1locale_1_1boundary_1_1boundary__indexing.html#a0e4c06efec1f1fca78bec34988aec881", null ], - [ "map", "classboost_1_1locale_1_1boundary_1_1boundary__indexing.html#ac971f4219181ee587844d2c74cca7ef4", null ], - [ "id", "classboost_1_1locale_1_1boundary_1_1boundary__indexing.html#aa7050fa0d55227034c80f811bc9ca97c", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__indexing.png b/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__indexing.png deleted file mode 100644 index 23fdc8b5b16309a2daa043de0c0445afddead8c7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 854 zcmeAS@N?(olHy`uVBq!ia0y~yUTy}2B5Aq( zg4K*WozH8s7Pbd>2Y6P^+@<#7?dIQ6b>5d=TGY1bz1gqwvZdzewEH4%D^&KL-E~rW z;az)AE9v`No^GGh3)C=o&caD4PvWj`KeaEc&eKYDxtNyceYX~`NfXiS>J0ES5&|h! z+5&P>B*PD`ItHeOb`I7LA3qB(W-wC{IdJ@FdJof%jsOPji<}86PK-S+8VwUUSPg_0 zGPnVyJzAI~Is+J#1-U4Ye3IP~7TUT>i(kZnp+ErD;PQq1d+yEdOFH&@|JsX-zxn^- z>(%#r9knPuF#9LlkE#1rMKac1|8~#x*C)fbU;hO3Ubro#<6ZcF*Z-I{+1uA$bEj{R z&raNZvv>2E1(936|CVdLxA^$A%4=Wpci1MG&z$+p_r=?T-~9sEuLnj5oAk=go-V%a zOK!_KC-uepX1h{mc0@eg>h!xIZ%X26|JJY3`?53g_#(dr{QKY$fB&&u_OA1J{^zzn zR7`GrcYjCh40osZ!j?i+)@$;gA2QpWzQjazLG%LuU+03VIp^|T$-O!E!aBFD>~9Rd zEchb6@NZAK({J7XT~qXS-(r3{d7pc9PtxvrXD-PK>A7k(B3yZ6tzdQiU1Pq?8elF{r5}E*S C - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - - - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point.html b/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point.html deleted file mode 100644 index 5709640a..00000000 --- a/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point.html +++ /dev/null @@ -1,467 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::boundary::boundary_point< IteratorType > Class Template Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::boundary::boundary_point< IteratorType > Class Template Reference
    -
    -
    - -

    This class represents a boundary point in the text. - More...

    - -

    #include <boost/locale/boundary/boundary_point.hpp>

    - - - - -

    -Public Types

    typedef IteratorType iterator_type
     
    - - - - - - - - - - - - - - - - - - - - - - - -

    -Public Member Functions

     boundary_point ()
     
     boundary_point (iterator_type p, rule_type r)
     
    void iterator (iterator_type i)
     
    void rule (rule_type r)
     
    iterator_type iterator () const
     
    rule_type rule () const
     
    bool operator== (boundary_point const &other) const
     
    bool operator!= (boundary_point const &other) const
     
    bool operator== (iterator_type const &other) const
     
    bool operator!= (iterator_type const &other) const
     
     operator iterator_type () const
     
    -

    Detailed Description

    -

    template<typename IteratorType>
    -class boost::locale::boundary::boundary_point< IteratorType >

    - -

    This class represents a boundary point in the text.

    -

    It represents a pair - an iterator and a rule that defines this point.

    -

    This type of object is dereference by the iterators of boundary_point_index. Using a rule() member function you can get the reason why this specific boundary point was selected.

    -

    For example, When you use a sentence boundary analysis, the (rule() & sentence_term) != 0 means that this boundary point was selected because a sentence terminator (like .?!) was spotted and the (rule() & sentence_sep)!=0 means that a separator like line feed or carriage return was observed.

    -
    Note
    -
      -
    • The beginning of analyzed range is always considered a boundary point and its rule is always 0.
    • -
    • when using a word boundary analysis the returned rule relates to a chunk of text preceding this point.
    • -
    -
    See Also
    - -

    Member Typedef Documentation

    - -
    -
    -
    -template<typename IteratorType>
    - - - - -
    typedef IteratorType boost::locale::boundary::boundary_point< IteratorType >::iterator_type
    -
    -

    The type of the base iterator that iterates the original text

    - -
    -
    -

    Constructor & Destructor Documentation

    - -
    -
    -
    -template<typename IteratorType>
    - - - - - -
    - - - - - - - -
    boost::locale::boundary::boundary_point< IteratorType >::boundary_point ()
    -
    -inline
    -
    -

    Empty default constructor

    - -
    -
    - -
    -
    -
    -template<typename IteratorType>
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    boost::locale::boundary::boundary_point< IteratorType >::boundary_point (iterator_type p,
    rule_type r 
    )
    -
    -inline
    -
    -

    Create a new boundary_point using iterator and a rule r

    - -
    -
    -

    Member Function Documentation

    - -
    -
    -
    -template<typename IteratorType>
    - - - - - -
    - - - - - - - - -
    void boost::locale::boundary::boundary_point< IteratorType >::iterator (iterator_type i)
    -
    -inline
    -
    -

    Set an new iterator value i

    - -
    -
    - -
    -
    -
    -template<typename IteratorType>
    - - - - - -
    - - - - - - - -
    iterator_type boost::locale::boundary::boundary_point< IteratorType >::iterator () const
    -
    -inline
    -
    -

    Fetch an iterator

    - -
    -
    - -
    -
    -
    -template<typename IteratorType>
    - - - - - -
    - - - - - - - -
    boost::locale::boundary::boundary_point< IteratorType >::operator iterator_type () const
    -
    -inline
    -
    -

    Automatic cast to the iterator it represents

    - -
    -
    - -
    -
    -
    -template<typename IteratorType>
    - - - - - -
    - - - - - - - - -
    bool boost::locale::boundary::boundary_point< IteratorType >::operator!= (boundary_point< IteratorType > const & other) const
    -
    -inline
    -
    -

    Check if two boundary points are different

    - -
    -
    - -
    -
    -
    -template<typename IteratorType>
    - - - - - -
    - - - - - - - - -
    bool boost::locale::boundary::boundary_point< IteratorType >::operator!= (iterator_type const & other) const
    -
    -inline
    -
    -

    Check if the boundary point points to different location from an iterator other

    - -
    -
    - -
    -
    -
    -template<typename IteratorType>
    - - - - - -
    - - - - - - - - -
    bool boost::locale::boundary::boundary_point< IteratorType >::operator== (boundary_point< IteratorType > const & other) const
    -
    -inline
    -
    -

    Check if two boundary points are the same

    - -
    -
    - -
    -
    -
    -template<typename IteratorType>
    - - - - - -
    - - - - - - - - -
    bool boost::locale::boundary::boundary_point< IteratorType >::operator== (iterator_type const & other) const
    -
    -inline
    -
    -

    Check if the boundary point points to same location as an iterator other

    - -
    -
    - -
    -
    -
    -template<typename IteratorType>
    - - - - - -
    - - - - - - - - -
    void boost::locale::boundary::boundary_point< IteratorType >::rule (rule_type r)
    -
    -inline
    -
    -

    Set an new rule value r

    - -
    -
    - -
    -
    -
    -template<typename IteratorType>
    - - - - - -
    - - - - - - - -
    rule_type boost::locale::boundary::boundary_point< IteratorType >::rule () const
    -
    -inline
    -
    -

    Fetch a rule

    - -
    -
    -
    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point.js b/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point.js deleted file mode 100644 index 1b38d2e6..00000000 --- a/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point.js +++ /dev/null @@ -1,15 +0,0 @@ -var classboost_1_1locale_1_1boundary_1_1boundary__point = -[ - [ "iterator_type", "classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694", null ], - [ "boundary_point", "classboost_1_1locale_1_1boundary_1_1boundary__point.html#aabbbee60c2c97ffd95210206a86c9298", null ], - [ "boundary_point", "classboost_1_1locale_1_1boundary_1_1boundary__point.html#a653a1c0d7480006ff647a656c74521df", null ], - [ "iterator", "classboost_1_1locale_1_1boundary_1_1boundary__point.html#a5ea18137618a1a84ff0b75c3b166c495", null ], - [ "iterator", "classboost_1_1locale_1_1boundary_1_1boundary__point.html#af279d5382e1b28c2ce82035c1929ea66", null ], - [ "operator iterator_type", "classboost_1_1locale_1_1boundary_1_1boundary__point.html#aa2dc88b4d02151aea939a01b7fc88730", null ], - [ "operator!=", "classboost_1_1locale_1_1boundary_1_1boundary__point.html#a4347b22dd7edb8af49d1316a6f86d0c2", null ], - [ "operator!=", "classboost_1_1locale_1_1boundary_1_1boundary__point.html#a4cd03f39d75bb054be9a0ae23189fa7a", null ], - [ "operator==", "classboost_1_1locale_1_1boundary_1_1boundary__point.html#a058ffbcbd43fc41a40a4a1cf5be987f2", null ], - [ "operator==", "classboost_1_1locale_1_1boundary_1_1boundary__point.html#a87a96a1745184ff7495db87943aca424", null ], - [ "rule", "classboost_1_1locale_1_1boundary_1_1boundary__point.html#a757b28e11c66f9871d3f51fe93a51bdb", null ], - [ "rule", "classboost_1_1locale_1_1boundary_1_1boundary__point.html#a75e2f04f0f7c1065470f722d1f2e004b", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point__index-members.html b/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point__index-members.html deleted file mode 100644 index 2d13806e..00000000 --- a/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point__index-members.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::boundary::boundary_point_index< BaseIterator > Member List
    -
    -
    - -

    This is the complete list of members for boost::locale::boundary::boundary_point_index< BaseIterator >, including all inherited members.

    - - - - - - - - - - - - - - - - - -
    base_iterator typedefboost::locale::boundary::boundary_point_index< BaseIterator >
    begin() const boost::locale::boundary::boundary_point_index< BaseIterator >inline
    boundary_point_index()boost::locale::boundary::boundary_point_index< BaseIterator >inline
    boundary_point_index(boundary_type type, base_iterator begin, base_iterator end, rule_type mask, std::locale const &loc=std::locale())boost::locale::boundary::boundary_point_index< BaseIterator >inline
    boundary_point_index(boundary_type type, base_iterator begin, base_iterator end, std::locale const &loc=std::locale())boost::locale::boundary::boundary_point_index< BaseIterator >inline
    boundary_point_index(segment_index< base_iterator > const &other)boost::locale::boundary::boundary_point_index< BaseIterator >
    const_iterator typedefboost::locale::boundary::boundary_point_index< BaseIterator >
    end() const boost::locale::boundary::boundary_point_index< BaseIterator >inline
    find(base_iterator p) const boost::locale::boundary::boundary_point_index< BaseIterator >inline
    iterator typedefboost::locale::boundary::boundary_point_index< BaseIterator >
    map(boundary_type type, base_iterator begin, base_iterator end, std::locale const &loc=std::locale())boost::locale::boundary::boundary_point_index< BaseIterator >inline
    operator=(segment_index< base_iterator > const &other)boost::locale::boundary::boundary_point_index< BaseIterator >
    rule() const boost::locale::boundary::boundary_point_index< BaseIterator >inline
    rule(rule_type v)boost::locale::boundary::boundary_point_index< BaseIterator >inline
    segment_index< base_iterator > (defined in boost::locale::boundary::boundary_point_index< BaseIterator >)boost::locale::boundary::boundary_point_index< BaseIterator >friend
    value_type typedefboost::locale::boundary::boundary_point_index< BaseIterator >
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point__index.html b/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point__index.html deleted file mode 100644 index 9f5077d6..00000000 --- a/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point__index.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::boundary::boundary_point_index< BaseIterator > Class Template Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::boundary::boundary_point_index< BaseIterator > Class Template Reference
    -
    -
    - -

    This class holds an index of boundary points and allows iterating over them. - More...

    - -

    #include <boost/locale/boundary/index.hpp>

    - - - - - - - - - - -

    -Public Types

    typedef BaseIterator base_iterator
     
    typedef unspecified_iterator_type iterator
     
    typedef unspecified_iterator_type const_iterator
     
    typedef boundary_point
    -< base_iterator
    value_type
     
    - - - - - - - - - - - - - - - - - - - - - - - -

    -Public Member Functions

     boundary_point_index ()
     
     boundary_point_index (boundary_type type, base_iterator begin, base_iterator end, rule_type mask, std::locale const &loc=std::locale())
     
     boundary_point_index (boundary_type type, base_iterator begin, base_iterator end, std::locale const &loc=std::locale())
     
     boundary_point_index (segment_index< base_iterator > const &other)
     
    boundary_point_index const & operator= (segment_index< base_iterator > const &other)
     
    void map (boundary_type type, base_iterator begin, base_iterator end, std::locale const &loc=std::locale())
     
    iterator begin () const
     
    iterator end () const
     
    iterator find (base_iterator p) const
     
    rule_type rule () const
     
    void rule (rule_type v)
     
    - - - -

    -Friends

    -class segment_index< base_iterator >
     
    -

    Detailed Description

    -

    template<typename BaseIterator>
    -class boost::locale::boundary::boundary_point_index< BaseIterator >

    - -

    This class holds an index of boundary points and allows iterating over them.

    -

    This class is provides begin() and end() member functions that return bidirectional iterators to the boundary_point objects.

    -

    It provides an option that affects selecting boundary points according to different rules: using rule(rule_type mask) member function. It allows to set a mask that select only specific types of boundary points like sentence_term.

    -

    For example for a sentence boundary analysis of a text "Hello! How\nare you?" when the default rule is used the boundary points would be:

    -
      -
    • "|Hello! How\nare you?"
    • -
    • "Hello! |How\nare you?"
    • -
    • "Hello! How\n|are you?"
    • -
    • "Hello! How\nare you?|"
    • -
    -

    However if rule() is set to sentence_term then the selected boundary points would be:

    -
      -
    • "|Hello! How\nare you?"
    • -
    • "Hello! |How\nare you?"
    • -
    • "Hello! How\nare you?|"
    • -
    -

    Such that a boundary point defined by a line feed character would be ignored.

    -

    This class allows to find a boundary_point according to the given iterator in range using find() member function.

    -
    Note
      -
    • Even an empty text range [x,x) considered to have a one boundary point x.
    • -
    • a and b points of the range [a,b) are always considered boundary points regardless the rules used.
    • -
    • Changing any of the option rule() or course re-indexing the text invalidates existing iterators and they can't be used any more.
    • -
    • boundary_point_index can be created from segment_index or other boundary_point_index that was created with same boundary_type. This is very fast operation as they shared same index and it does not require its regeneration.
    • -
    -
    -
    See Also
    - -

    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point__index.js b/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point__index.js deleted file mode 100644 index 57e52cea..00000000 --- a/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point__index.js +++ /dev/null @@ -1,19 +0,0 @@ -var classboost_1_1locale_1_1boundary_1_1boundary__point__index = -[ - [ "base_iterator", "group__boundary.html#gab3189e2eaf4386cdf37598e0ba16cfd5", null ], - [ "const_iterator", "group__boundary.html#gac9ce9158eb2fb030c1baf93376203d16", null ], - [ "iterator", "group__boundary.html#ga1af6e72b3c384edcebc0cf319fe97efe", null ], - [ "value_type", "group__boundary.html#ga7f7328a860cf485a4bd8f17658c291e1", null ], - [ "boundary_point_index", "group__boundary.html#gaba6993dd50ad8cf2db8921e5cf668a69", null ], - [ "boundary_point_index", "group__boundary.html#gacc189288792012cfdb21c07fddbadc4f", null ], - [ "boundary_point_index", "group__boundary.html#ga9b926379fa2fcc7f87dc067953049d69", null ], - [ "boundary_point_index", "group__boundary.html#gac48665ff53789c6ee44a423963b6550d", null ], - [ "begin", "group__boundary.html#ga56f42a32f0378b6e157671f9e17bd66f", null ], - [ "end", "group__boundary.html#gaf3d66d578e32a63b3f0ffbb59740667b", null ], - [ "find", "group__boundary.html#ga0bb71a287afca990e85b17246568492d", null ], - [ "map", "group__boundary.html#ga6b4b5d5cf80b55302a88e7b36c812418", null ], - [ "operator=", "group__boundary.html#ga83d57b993b00686b2cac711667c6a931", null ], - [ "rule", "group__boundary.html#ga1d214029f1a780b7bf6e3f23a3004c03", null ], - [ "rule", "group__boundary.html#ga56e63913f51109e05a24a7136472a975", null ], - [ "segment_index< base_iterator >", "group__boundary.html#gaa8ba2e18ec3780af8f001ba85e40b9e2", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1boundary_1_1segment-members.html b/doc/html/classboost_1_1locale_1_1boundary_1_1segment-members.html deleted file mode 100644 index a391e2a8..00000000 --- a/doc/html/classboost_1_1locale_1_1boundary_1_1segment-members.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::boundary::segment< IteratorType > Member List
    -
    -
    - -

    This is the complete list of members for boost::locale::boundary::segment< IteratorType >, including all inherited members.

    - - - - - - - - - - - - - - - - - - - - - -
    begin(iterator const &v)boost::locale::boundary::segment< IteratorType >inline
    begin() const boost::locale::boundary::segment< IteratorType >inline
    char_type typedefboost::locale::boundary::segment< IteratorType >
    const_iterator typedefboost::locale::boundary::segment< IteratorType >
    difference_type typedefboost::locale::boundary::segment< IteratorType >
    empty() const boost::locale::boundary::segment< IteratorType >inline
    end(iterator const &v)boost::locale::boundary::segment< IteratorType >inline
    end() const boost::locale::boundary::segment< IteratorType >inline
    iterator typedefboost::locale::boundary::segment< IteratorType >
    length() const boost::locale::boundary::segment< IteratorType >inline
    operator std::basic_string< char_type, T, A >() const boost::locale::boundary::segment< IteratorType >inline
    operator!=(segment const &other)boost::locale::boundary::segment< IteratorType >inline
    operator==(segment const &other)boost::locale::boundary::segment< IteratorType >inline
    rule() const boost::locale::boundary::segment< IteratorType >inline
    rule(rule_type r)boost::locale::boundary::segment< IteratorType >inline
    segment()boost::locale::boundary::segment< IteratorType >inline
    segment(iterator b, iterator e, rule_type r)boost::locale::boundary::segment< IteratorType >inline
    str() const boost::locale::boundary::segment< IteratorType >inline
    string_type typedefboost::locale::boundary::segment< IteratorType >
    value_type typedefboost::locale::boundary::segment< IteratorType >
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1boundary_1_1segment.html b/doc/html/classboost_1_1locale_1_1boundary_1_1segment.html deleted file mode 100644 index f4d1a5e2..00000000 --- a/doc/html/classboost_1_1locale_1_1boundary_1_1segment.html +++ /dev/null @@ -1,600 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::boundary::segment< IteratorType > Class Template Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::boundary::segment< IteratorType > Class Template Reference
    -
    -
    - -

    a segment object that represents a pair of two iterators that define the range where this segment exits and a rule that defines it. - More...

    - -

    #include <boost/locale/boundary/segment.hpp>

    -
    -Inheritance diagram for boost::locale::boundary::segment< IteratorType >:
    -
    -
    - - - -
    - - - - - - - - - - - - - - -

    -Public Types

    typedef std::iterator_traits
    -< IteratorType >::value_type 
    char_type
     
    typedef std::basic_string
    -< char_type
    string_type
     
    typedef char_type value_type
     
    typedef IteratorType iterator
     
    typedef IteratorType const_iterator
     
    typedef std::iterator_traits
    -< IteratorType >
    -::difference_type 
    difference_type
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Public Member Functions

     segment ()
     
     segment (iterator b, iterator e, rule_type r)
     
    void begin (iterator const &v)
     
    void end (iterator const &v)
     
    IteratorType begin () const
     
    IteratorType end () const
     
    template<class T , class A >
     operator std::basic_string< char_type, T, A > () const
     
    string_type str () const
     
    size_t length () const
     
    bool empty () const
     
    rule_type rule () const
     
    void rule (rule_type r)
     
    -bool operator== (segment const &other)
     Compare two segments.
     
    -bool operator!= (segment const &other)
     Compare two segments.
     
    -

    Detailed Description

    -

    template<typename IteratorType>
    -class boost::locale::boundary::segment< IteratorType >

    - -

    a segment object that represents a pair of two iterators that define the range where this segment exits and a rule that defines it.

    -

    This type of object is dereferenced by the iterators of segment_index. Using a rule() member function you can get a specific rule this segment was selected with. For example, when you use word boundary analysis, you can check if the specific word contains Kana letters by checking (rule() & word_kana)!=0 For a sentence analysis you can check if the sentence is selected because a sentence terminator is found (sentence_term) or there is a line break (sentence_sep).

    -

    This object can be automatically converted to std::basic_string with the same type of character. It is also valid range that has begin() and end() member functions returning iterators on the location of the segment.

    -
    See Also
    - -

    Member Typedef Documentation

    - -
    -
    -
    -template<typename IteratorType>
    - - - - -
    typedef std::iterator_traits<IteratorType>::value_type boost::locale::boundary::segment< IteratorType >::char_type
    -
    -

    The type of the underlying character

    - -
    -
    - -
    -
    -
    -template<typename IteratorType>
    - - - - -
    typedef IteratorType boost::locale::boundary::segment< IteratorType >::const_iterator
    -
    -

    The iterator that allows to iterate the range

    - -
    -
    - -
    -
    -
    -template<typename IteratorType>
    - - - - -
    typedef std::iterator_traits<IteratorType>::difference_type boost::locale::boundary::segment< IteratorType >::difference_type
    -
    -

    The type that represent a difference between two iterators

    - -
    -
    - -
    -
    -
    -template<typename IteratorType>
    - - - - -
    typedef IteratorType boost::locale::boundary::segment< IteratorType >::iterator
    -
    -

    The iterator that allows to iterate the range

    - -
    -
    - -
    -
    -
    -template<typename IteratorType>
    - - - - -
    typedef std::basic_string<char_type> boost::locale::boundary::segment< IteratorType >::string_type
    -
    -

    The type of the string it is converted to

    - -
    -
    - -
    -
    -
    -template<typename IteratorType>
    - - - - -
    typedef char_type boost::locale::boundary::segment< IteratorType >::value_type
    -
    -

    The value that iterators return - the character itself

    - -
    -
    -

    Constructor & Destructor Documentation

    - -
    -
    -
    -template<typename IteratorType>
    - - - - - -
    - - - - - - - -
    boost::locale::boundary::segment< IteratorType >::segment ()
    -
    -inline
    -
    -

    Default constructor

    - -
    -
    - -
    -
    -
    -template<typename IteratorType>
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    boost::locale::boundary::segment< IteratorType >::segment (iterator b,
    iterator e,
    rule_type r 
    )
    -
    -inline
    -
    -

    Create a segment using two iterators and a rule that represents this point

    - -
    -
    -

    Member Function Documentation

    - -
    -
    -
    -template<typename IteratorType>
    - - - - - -
    - - - - - - - - -
    void boost::locale::boundary::segment< IteratorType >::begin (iterator const & v)
    -
    -inline
    -
    -

    Set the start of the range

    - -
    -
    - -
    -
    -
    -template<typename IteratorType>
    - - - - - -
    - - - - - - - -
    IteratorType boost::locale::boundary::segment< IteratorType >::begin () const
    -
    -inline
    -
    -

    Get the start of the range

    - -
    -
    - -
    -
    -
    -template<typename IteratorType>
    - - - - - -
    - - - - - - - -
    bool boost::locale::boundary::segment< IteratorType >::empty () const
    -
    -inline
    -
    -

    Check if the segment is empty

    - -
    -
    - -
    -
    -
    -template<typename IteratorType>
    - - - - - -
    - - - - - - - - -
    void boost::locale::boundary::segment< IteratorType >::end (iterator const & v)
    -
    -inline
    -
    -

    Set the end of the range

    - -
    -
    - -
    -
    -
    -template<typename IteratorType>
    - - - - - -
    - - - - - - - -
    IteratorType boost::locale::boundary::segment< IteratorType >::end () const
    -
    -inline
    -
    -

    Set the end of the range

    - -
    -
    - -
    -
    -
    -template<typename IteratorType>
    - - - - - -
    - - - - - - - -
    size_t boost::locale::boundary::segment< IteratorType >::length () const
    -
    -inline
    -
    -

    Get the length of the text chunk

    - -
    -
    - -
    -
    -
    -template<typename IteratorType>
    -
    -template<class T , class A >
    - - - - - -
    - - - - - - - -
    boost::locale::boundary::segment< IteratorType >::operator std::basic_string< char_type, T, A > () const
    -
    -inline
    -
    -

    Convert the range to a string automatically

    - -
    -
    - -
    -
    -
    -template<typename IteratorType>
    - - - - - -
    - - - - - - - -
    rule_type boost::locale::boundary::segment< IteratorType >::rule () const
    -
    -inline
    -
    -

    Get the rule that is used for selection of this segment.

    - -
    -
    - -
    -
    -
    -template<typename IteratorType>
    - - - - - -
    - - - - - - - - -
    void boost::locale::boundary::segment< IteratorType >::rule (rule_type r)
    -
    -inline
    -
    -

    Set a rule that is used for segment selection

    - -
    -
    - -
    -
    -
    -template<typename IteratorType>
    - - - - - -
    - - - - - - - -
    string_type boost::locale::boundary::segment< IteratorType >::str () const
    -
    -inline
    -
    -

    Create a string from the range explicitly

    - -
    -
    -
    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1boundary_1_1segment.js b/doc/html/classboost_1_1locale_1_1boundary_1_1segment.js deleted file mode 100644 index 17bf21d9..00000000 --- a/doc/html/classboost_1_1locale_1_1boundary_1_1segment.js +++ /dev/null @@ -1,23 +0,0 @@ -var classboost_1_1locale_1_1boundary_1_1segment = -[ - [ "char_type", "classboost_1_1locale_1_1boundary_1_1segment.html#ad3785355ea817c087bf428315a332169", null ], - [ "const_iterator", "classboost_1_1locale_1_1boundary_1_1segment.html#aa24dcd83aefe4925bfc11b0285e2517a", null ], - [ "difference_type", "classboost_1_1locale_1_1boundary_1_1segment.html#a79ee4d48248ffbc23f84a33355ca3b62", null ], - [ "iterator", "classboost_1_1locale_1_1boundary_1_1segment.html#a31960fd7b416715d012b686bc1f2c205", null ], - [ "string_type", "classboost_1_1locale_1_1boundary_1_1segment.html#a795d3328ac4d1692294f172c8480da47", null ], - [ "value_type", "classboost_1_1locale_1_1boundary_1_1segment.html#ab7ba55015262b4fb85bb531882a32ead", null ], - [ "segment", "classboost_1_1locale_1_1boundary_1_1segment.html#a4e785bc97dba9e8e25f18b43957723e5", null ], - [ "segment", "classboost_1_1locale_1_1boundary_1_1segment.html#aea72505bb4940b21bb00a3660fefb7b7", null ], - [ "begin", "classboost_1_1locale_1_1boundary_1_1segment.html#a5428ff79bc05b78989f56519b58a6d9c", null ], - [ "begin", "classboost_1_1locale_1_1boundary_1_1segment.html#a445da30d993880a1bd6d998e78755a44", null ], - [ "empty", "classboost_1_1locale_1_1boundary_1_1segment.html#a84022afa120893d0716fc446816eb83f", null ], - [ "end", "classboost_1_1locale_1_1boundary_1_1segment.html#aaedd7bb4760bae3dcdb165b330806261", null ], - [ "end", "classboost_1_1locale_1_1boundary_1_1segment.html#a7e36b7f1c88ad1f5756ba6e501454bc4", null ], - [ "length", "classboost_1_1locale_1_1boundary_1_1segment.html#a45edfde079b2afe36c55043c7a00b438", null ], - [ "operator std::basic_string< char_type, T, A >", "classboost_1_1locale_1_1boundary_1_1segment.html#a5230094b346bd26dc83529b47ca97153", null ], - [ "operator!=", "classboost_1_1locale_1_1boundary_1_1segment.html#a2e38c575af16843a3aa140a4332646a3", null ], - [ "operator==", "classboost_1_1locale_1_1boundary_1_1segment.html#a9a30e70d41591b25c8c77961bff00057", null ], - [ "rule", "classboost_1_1locale_1_1boundary_1_1segment.html#a5b36a522d7013306617dbcccc9919343", null ], - [ "rule", "classboost_1_1locale_1_1boundary_1_1segment.html#a962c26b7e2024767ad25f2be080fd53a", null ], - [ "str", "classboost_1_1locale_1_1boundary_1_1segment.html#ac139eae8c07ed82ba8343fedfa76c2bf", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1boundary_1_1segment.png b/doc/html/classboost_1_1locale_1_1boundary_1_1segment.png deleted file mode 100644 index a590ecbcd9d88c17066eb72bc9b955c738f0fb2a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1002 zcmeAS@N?(olHy`uVBq!ia0y~yV3Y&012~w0mPpZg=$F|D9)dz}iyD?RGtd^=dOzYSV)HJ>Lr3yp8wXVmo=^;cNC8rN&a$ zGLv>l<-}dtGw+<^{abu7(c8o>J*~TBrT3#}p7y~s*4pO$q{>3P*?Y?zp zi`QKZzfs+MHn;obC7GNbDYb|08oxM`c4cbc0>1kaZ=T&v4*G3kd;Hepdv#}Ov)qEW zKHty2d+)b3?b-WxZu8$QvP=8$*%kZ4qSCM5y1LgC=0WPBz)n`s|2>B$a*kV#5x z^5OBqtdo~i$}LNe_!Ir+kDBe@g%g%|-w}K>NzU`vT~NSi+D@7hRHdT1^ovK(DewN7 zk%?(y3?EeXF>p0>Tw^0VQFZ>B=#fpXE`5#P!onq*PipQVn>^O)0%V1y|TO4KIJdi=k;&({8I{#mXzMHJ^rWqX?oSPI`yh)O51bp zO?%lhZ)^R6>fh#<9?xoLHdNa*cZRWTEz`P~_4alzB#Z4|NS413_yuHsx;y!Uso5=C zy}B*ccdqq(Eh&8waHaWfaa6UE?ZbzC$vfv3EK`@9CA)6Vw==J1uC={+_Ufsmn&PkK z7q98>sr&Zz-mm_vxi|RhUVQkrZq+W|>-Ph7ZLiD#vOv?y38^aP4g!6JksSanE9`TvBly N22WQ%mvv4FO#q19*y8{I diff --git a/doc/html/classboost_1_1locale_1_1boundary_1_1segment__index-members.html b/doc/html/classboost_1_1locale_1_1boundary_1_1segment__index-members.html deleted file mode 100644 index c5cf9065..00000000 --- a/doc/html/classboost_1_1locale_1_1boundary_1_1segment__index-members.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::boundary::segment_index< BaseIterator > Member List
    -
    -
    - -

    This is the complete list of members for boost::locale::boundary::segment_index< BaseIterator >, including all inherited members.

    - - - - - - - - - - - - - - - - - - - -
    base_iterator typedefboost::locale::boundary::segment_index< BaseIterator >
    begin() const boost::locale::boundary::segment_index< BaseIterator >inline
    boundary_point_index< base_iterator > (defined in boost::locale::boundary::segment_index< BaseIterator >)boost::locale::boundary::segment_index< BaseIterator >friend
    const_iterator typedefboost::locale::boundary::segment_index< BaseIterator >
    end() const boost::locale::boundary::segment_index< BaseIterator >inline
    find(base_iterator p) const boost::locale::boundary::segment_index< BaseIterator >inline
    full_select() const boost::locale::boundary::segment_index< BaseIterator >inline
    full_select(bool v)boost::locale::boundary::segment_index< BaseIterator >inline
    iterator typedefboost::locale::boundary::segment_index< BaseIterator >
    map(boundary_type type, base_iterator begin, base_iterator end, std::locale const &loc=std::locale())boost::locale::boundary::segment_index< BaseIterator >inline
    operator=(boundary_point_index< base_iterator > const &)boost::locale::boundary::segment_index< BaseIterator >
    rule() const boost::locale::boundary::segment_index< BaseIterator >inline
    rule(rule_type v)boost::locale::boundary::segment_index< BaseIterator >inline
    segment_index()boost::locale::boundary::segment_index< BaseIterator >inline
    segment_index(boundary_type type, base_iterator begin, base_iterator end, rule_type mask, std::locale const &loc=std::locale())boost::locale::boundary::segment_index< BaseIterator >inline
    segment_index(boundary_type type, base_iterator begin, base_iterator end, std::locale const &loc=std::locale())boost::locale::boundary::segment_index< BaseIterator >inline
    segment_index(boundary_point_index< base_iterator > const &)boost::locale::boundary::segment_index< BaseIterator >
    value_type typedefboost::locale::boundary::segment_index< BaseIterator >
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1boundary_1_1segment__index.html b/doc/html/classboost_1_1locale_1_1boundary_1_1segment__index.html deleted file mode 100644 index 63714d78..00000000 --- a/doc/html/classboost_1_1locale_1_1boundary_1_1segment__index.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::boundary::segment_index< BaseIterator > Class Template Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::boundary::segment_index< BaseIterator > Class Template Reference
    -
    -
    - -

    This class holds an index of segments in the text range and allows to iterate over them. - More...

    - -

    #include <boost/locale/boundary/index.hpp>

    - - - - - - - - - - -

    -Public Types

    typedef BaseIterator base_iterator
     
    typedef unspecified_iterator_type iterator
     
    typedef unspecified_iterator_type const_iterator
     
    typedef segment< base_iteratorvalue_type
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Public Member Functions

     segment_index ()
     
     segment_index (boundary_type type, base_iterator begin, base_iterator end, rule_type mask, std::locale const &loc=std::locale())
     
     segment_index (boundary_type type, base_iterator begin, base_iterator end, std::locale const &loc=std::locale())
     
     segment_index (boundary_point_index< base_iterator > const &)
     
    segment_index const & operator= (boundary_point_index< base_iterator > const &)
     
    void map (boundary_type type, base_iterator begin, base_iterator end, std::locale const &loc=std::locale())
     
    iterator begin () const
     
    iterator end () const
     
    iterator find (base_iterator p) const
     
    rule_type rule () const
     
    void rule (rule_type v)
     
    bool full_select () const
     
    void full_select (bool v)
     
    - - - -

    -Friends

    -class boundary_point_index< base_iterator >
     
    -

    Detailed Description

    -

    template<typename BaseIterator>
    -class boost::locale::boundary::segment_index< BaseIterator >

    - -

    This class holds an index of segments in the text range and allows to iterate over them.

    -

    This class is provides begin() and end() member functions that return bidirectional iterators to the segment objects.

    -

    It provides two options on way of selecting segments:

    -
      -
    • rule(rule_type mask) - a mask that allows to select only specific types of segments according to various masks as word_any.
      - The default is to select any types of boundaries.
      - For example: using word boundary analysis, when the provided mask is word_kana then the iterators would iterate only over the words containing Kana letters and word_any would select all types of words excluding ranges that consist of white space and punctuation marks. So iterating over the text "to be or not to be?" with word_any rule would return segments "to", "be", "or", "not", "to", "be", instead of default "to", " ", "be", " ", "or", " ", "not", " ", "to", " ", "be", "?".
    • -
    • full_select(bool how) - a flag that defines the way a range is selected if the rule of the previous boundary point does not fit the selected rule.
      - For example: We want to fetch all sentences from the following text: "Hello! How\nare you?".
      - This text contains three boundary points separating it to sentences by different rules:
        -
      • The exclamation mark "!" ends the sentence "Hello!"
      • -
      • The line feed that splits the sentence "How\nare you?" into two parts.
      • -
      • The question mark that ends the second sentence.
        - If you would only change the rule() to sentence_term then the segment_index would provide two sentences "Hello!" and "are you?" as only them actually terminated with required terminator "!" or "?". But changing full_select() to true, the selected segment would include all the text up to previous valid boundary point and would return two expected sentences: "Hello!" and "How\nare you?".
      • -
      -
    • -
    -

    This class allows to find a segment according to the given iterator in range using find() member function.

    -
    Note
    - -
    See Also
    - -
    Examples:
    boundary.cpp, and wboundary.cpp.
    -

    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1boundary_1_1segment__index.js b/doc/html/classboost_1_1locale_1_1boundary_1_1segment__index.js deleted file mode 100644 index 6a2f9478..00000000 --- a/doc/html/classboost_1_1locale_1_1boundary_1_1segment__index.js +++ /dev/null @@ -1,21 +0,0 @@ -var classboost_1_1locale_1_1boundary_1_1segment__index = -[ - [ "base_iterator", "group__boundary.html#ga06f2faacb9d196ebc659ad5382ea2ca5", null ], - [ "const_iterator", "group__boundary.html#ga5f8e61b5babc3f0fa95f5fb8acae3724", null ], - [ "iterator", "group__boundary.html#gaf7a775e77dbbca3495e11d646df96fd2", null ], - [ "value_type", "group__boundary.html#ga067c663d18faee08adb3355701ae72ba", null ], - [ "segment_index", "group__boundary.html#ga2c354f4cc03677b58c97038cd84dc465", null ], - [ "segment_index", "group__boundary.html#ga06ddc335e95479ec51e9b16d0f829bb3", null ], - [ "segment_index", "group__boundary.html#ga46a5f584d5a1a43ad4bc0fff07183fcc", null ], - [ "segment_index", "group__boundary.html#ga8187f58177fc89ef2f8f818a37111363", null ], - [ "begin", "group__boundary.html#gaf74ff9c86c177efa8f74856277d659af", null ], - [ "end", "group__boundary.html#ga8757062d2446b35675b585651c5fea9f", null ], - [ "find", "group__boundary.html#ga2480236106971797460187777f2a4411", null ], - [ "full_select", "group__boundary.html#gace7faa10d536c85df0f2d5cac85f2bbc", null ], - [ "full_select", "group__boundary.html#ga205fd51daa439a18527675e663a0802f", null ], - [ "map", "group__boundary.html#gafa2a756b10d3522743204b45b794bb3e", null ], - [ "operator=", "group__boundary.html#gae7941dc874ca05d2ef2a03f781c5b78a", null ], - [ "rule", "group__boundary.html#ga72b4ceb5bacec0eded2601c43a4d671a", null ], - [ "rule", "group__boundary.html#gad19735180401edb15acbdbbeb21e5a73", null ], - [ "boundary_point_index< base_iterator >", "group__boundary.html#ga960209e8a9453221641eda6bd8c4989b", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1calendar-members.html b/doc/html/classboost_1_1locale_1_1calendar-members.html deleted file mode 100644 index c970433c..00000000 --- a/doc/html/classboost_1_1locale_1_1calendar-members.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::calendar Member List
    -
    -
    - -

    This is the complete list of members for boost::locale::calendar, including all inherited members.

    - - - - - - - - - - - - - - - - - - - - -
    calendar(std::ios_base &ios)boost::locale::calendar
    calendar(std::locale const &l, std::string const &zone)boost::locale::calendar
    calendar(std::locale const &l)boost::locale::calendar
    calendar(std::string const &zone)boost::locale::calendar
    calendar()boost::locale::calendar
    calendar(calendar const &other)boost::locale::calendar
    date_time (defined in boost::locale::calendar)boost::locale::calendarfriend
    first_day_of_week() const boost::locale::calendar
    get_locale() const boost::locale::calendar
    get_time_zone() const boost::locale::calendar
    greatest_minimum(period::period_type f) const boost::locale::calendar
    is_gregorian() const boost::locale::calendar
    least_maximum(period::period_type f) const boost::locale::calendar
    maximum(period::period_type f) const boost::locale::calendar
    minimum(period::period_type f) const boost::locale::calendar
    operator!=(calendar const &other) const boost::locale::calendar
    operator=(calendar const &other)boost::locale::calendar
    operator==(calendar const &other) const boost::locale::calendar
    ~calendar() (defined in boost::locale::calendar)boost::locale::calendar
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1calendar.html b/doc/html/classboost_1_1locale_1_1calendar.html deleted file mode 100644 index 66175b37..00000000 --- a/doc/html/classboost_1_1locale_1_1calendar.html +++ /dev/null @@ -1,432 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::calendar Class Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    - -
    - -

    this class provides an access to general calendar information. - More...

    - -

    #include <boost/locale/date_time.hpp>

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Public Member Functions

     calendar (std::ios_base &ios)
     
     calendar (std::locale const &l, std::string const &zone)
     
     calendar (std::locale const &l)
     
     calendar (std::string const &zone)
     
     calendar ()
     
     calendar (calendar const &other)
     
    calendar const & operator= (calendar const &other)
     
    int minimum (period::period_type f) const
     
    int greatest_minimum (period::period_type f) const
     
    int maximum (period::period_type f) const
     
    int least_maximum (period::period_type f) const
     
    -int first_day_of_week () const
     Get first day of week for specific calendar, for example for US it is 1 - Sunday for France it is 2 - Monday.
     
    std::locale get_locale () const
     
    std::string get_time_zone () const
     
    bool is_gregorian () const
     
    bool operator== (calendar const &other) const
     
    bool operator!= (calendar const &other) const
     
    - - - -

    -Friends

    -class date_time
     
    -

    Detailed Description

    -

    this class provides an access to general calendar information.

    -

    This information is not connected to specific date but generic to locale, and timezone. It is used in obtaining general information about calendar and is essential for creation of date_time objects.

    -
    Examples:
    calendar.cpp.
    -

    Constructor & Destructor Documentation

    - -
    -
    - - - - - - - - -
    boost::locale::calendar::calendar (std::ios_base & ios)
    -
    -

    Create calendar taking locale and timezone information from ios_base instance.

    -
    Note
    throws std::bad_cast if ios does not have a locale with installed calendar_facet facet installed
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    boost::locale::calendar::calendar (std::locale const & l,
    std::string const & zone 
    )
    -
    -

    Create calendar with locale l and time_zone zone

    -
    Note
    throws std::bad_cast if loc does not have calendar_facet facet installed
    - -
    -
    - -
    -
    - - - - - - - - -
    boost::locale::calendar::calendar (std::locale const & l)
    -
    -

    Create calendar with locale l and default timezone

    -
    Note
    throws std::bad_cast if loc does not have calendar_facet facet installed
    - -
    -
    - -
    -
    - - - - - - - - -
    boost::locale::calendar::calendar (std::string const & zone)
    -
    -

    Create calendar with default locale and timezone zone

    -
    Note
    throws std::bad_cast if global locale does not have calendar_facet facet installed
    - -
    -
    - -
    -
    - - - - - - - -
    boost::locale::calendar::calendar ()
    -
    -

    Create calendar with default locale and timezone

    -
    Note
    throws std::bad_cast if global locale does not have calendar_facet facet installed
    - -
    -
    - -
    -
    - - - - - - - - -
    boost::locale::calendar::calendar (calendar const & other)
    -
    -

    copy calendar

    - -
    -
    -

    Member Function Documentation

    - -
    -
    - - - - - - - -
    std::locale boost::locale::calendar::get_locale () const
    -
    -

    get calendar's locale

    - -
    -
    - -
    -
    - - - - - - - -
    std::string boost::locale::calendar::get_time_zone () const
    -
    -

    get calendar's time zone

    - -
    -
    - -
    -
    - - - - - - - - -
    int boost::locale::calendar::greatest_minimum (period::period_type f) const
    -
    -

    Get greatest possible minimum value for period f, For example for period::day it is 1, but may be different for other calendars.

    - -
    -
    - -
    -
    - - - - - - - -
    bool boost::locale::calendar::is_gregorian () const
    -
    -

    Check if the calendar is Gregorian

    -
    Examples:
    calendar.cpp.
    -
    -
    -
    - -
    -
    - - - - - - - - -
    int boost::locale::calendar::least_maximum (period::period_type f) const
    -
    -

    Get least maximum value for period f, For example for Gregorian calendar's maximum period::day it is 28.

    - -
    -
    - -
    -
    - - - - - - - - -
    int boost::locale::calendar::maximum (period::period_type f) const
    -
    -

    Get maximum value for period f, For example for Gregorian calendar's maximum period::day it is 31.

    - -
    -
    - -
    -
    - - - - - - - - -
    int boost::locale::calendar::minimum (period::period_type f) const
    -
    -

    Get minimum value for period f, For example for period::day it is 1.

    - -
    -
    - -
    -
    - - - - - - - - -
    bool boost::locale::calendar::operator!= (calendar const & other) const
    -
    -

    Opposite of ==

    - -
    -
    - -
    -
    - - - - - - - - -
    calendar const& boost::locale::calendar::operator= (calendar const & other)
    -
    -

    assign calendar

    - -
    -
    - -
    -
    - - - - - - - - -
    bool boost::locale::calendar::operator== (calendar const & other) const
    -
    -

    Compare calendars for equivalence: i.e. calendar types, time zones etc.

    - -
    -
    -
    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1calendar.js b/doc/html/classboost_1_1locale_1_1calendar.js deleted file mode 100644 index f2adafaf..00000000 --- a/doc/html/classboost_1_1locale_1_1calendar.js +++ /dev/null @@ -1,22 +0,0 @@ -var classboost_1_1locale_1_1calendar = -[ - [ "calendar", "classboost_1_1locale_1_1calendar.html#a889746f73b03bb21f5c8459cbe9b293d", null ], - [ "calendar", "classboost_1_1locale_1_1calendar.html#aece160bf9ded6145ac5a066448085bae", null ], - [ "calendar", "classboost_1_1locale_1_1calendar.html#ad9f47a96941c041996da64384bc5879d", null ], - [ "calendar", "classboost_1_1locale_1_1calendar.html#af9538c3aab4b8eaf7229ed2d9af18328", null ], - [ "calendar", "classboost_1_1locale_1_1calendar.html#a56c55c24fbbb29fac5a18c44d3a27beb", null ], - [ "~calendar", "classboost_1_1locale_1_1calendar.html#a378ecd62f6cc64928ab308b180c98b21", null ], - [ "calendar", "classboost_1_1locale_1_1calendar.html#ad33ad15b5b032ba5234ebe5959159668", null ], - [ "first_day_of_week", "classboost_1_1locale_1_1calendar.html#a8144b98a316798476040348483fe2a6e", null ], - [ "get_locale", "classboost_1_1locale_1_1calendar.html#aaf669f493ef0226aefbb6d13db8c27d1", null ], - [ "get_time_zone", "classboost_1_1locale_1_1calendar.html#af4063debebd6cc08cf25171ce5ee220e", null ], - [ "greatest_minimum", "classboost_1_1locale_1_1calendar.html#a3c2475ee3ebb107e47701cf732532f9f", null ], - [ "is_gregorian", "classboost_1_1locale_1_1calendar.html#a657ece3d3d59b8fc3c817bc05227620b", null ], - [ "least_maximum", "classboost_1_1locale_1_1calendar.html#a4c708d889ef92487982d918a78be5eda", null ], - [ "maximum", "classboost_1_1locale_1_1calendar.html#abd88cbf4c3b9f072430f9e7d9ab2d744", null ], - [ "minimum", "classboost_1_1locale_1_1calendar.html#a6670c7319dcaec257819b7a802d2c5f7", null ], - [ "operator!=", "classboost_1_1locale_1_1calendar.html#ab0d93fe1d3bfb7b66f8ef631ede93236", null ], - [ "operator=", "classboost_1_1locale_1_1calendar.html#a7125a6c3f3d629f871ddb0f3c2f5a181", null ], - [ "operator==", "classboost_1_1locale_1_1calendar.html#a8939fba5987659b3153cb18eea9af969", null ], - [ "date_time", "classboost_1_1locale_1_1calendar.html#a7c627d823bfb1186af76ed36016cbb31", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1calendar__facet-members.html b/doc/html/classboost_1_1locale_1_1calendar__facet-members.html deleted file mode 100644 index dbd8eda7..00000000 --- a/doc/html/classboost_1_1locale_1_1calendar__facet-members.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::calendar_facet Member List
    -
    -
    - -

    This is the complete list of members for boost::locale::calendar_facet, including all inherited members.

    - - - - -
    calendar_facet(size_t refs=0)boost::locale::calendar_facetinline
    create_calendar() const =0boost::locale::calendar_facetpure virtual
    idboost::locale::calendar_facetstatic
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1calendar__facet.html b/doc/html/classboost_1_1locale_1_1calendar__facet.html deleted file mode 100644 index 9ad2b825..00000000 --- a/doc/html/classboost_1_1locale_1_1calendar__facet.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::calendar_facet Class Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::calendar_facet Class Referenceabstract
    -
    -
    - -

    the facet that generates calendar for specific locale - More...

    - -

    #include <boost/locale/date_time_facet.hpp>

    -
    -Inheritance diagram for boost::locale::calendar_facet:
    -
    -
    - - - -
    - - - - - - -

    -Public Member Functions

     calendar_facet (size_t refs=0)
     
    virtual abstract_calendarcreate_calendar () const =0
     
    - - - -

    -Static Public Attributes

    static std::locale::id id
     
    -

    Detailed Description

    -

    the facet that generates calendar for specific locale

    -

    Constructor & Destructor Documentation

    - -
    -
    - - - - - -
    - - - - - - - - -
    boost::locale::calendar_facet::calendar_facet (size_t refs = 0)
    -
    -inline
    -
    -

    Basic constructor

    - -
    -
    -

    Member Function Documentation

    - -
    -
    - - - - - -
    - - - - - - - -
    virtual abstract_calendar* boost::locale::calendar_facet::create_calendar () const
    -
    -pure virtual
    -
    -

    Create a new calendar that points to current point of time.

    - -
    -
    -

    Member Data Documentation

    - -
    -
    - - - - - -
    - - - - -
    std::locale::id boost::locale::calendar_facet::id
    -
    -static
    -
    -

    Locale id (needed to work with std::locale)

    - -
    -
    -
    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1calendar__facet.js b/doc/html/classboost_1_1locale_1_1calendar__facet.js deleted file mode 100644 index e440d757..00000000 --- a/doc/html/classboost_1_1locale_1_1calendar__facet.js +++ /dev/null @@ -1,6 +0,0 @@ -var classboost_1_1locale_1_1calendar__facet = -[ - [ "calendar_facet", "classboost_1_1locale_1_1calendar__facet.html#a04e5d7baa3bb0f362b0c2faac0c5d376", null ], - [ "create_calendar", "classboost_1_1locale_1_1calendar__facet.html#a6db1915db3ad99ea65334dddaa7dcc28", null ], - [ "id", "classboost_1_1locale_1_1calendar__facet.html#a88dc563112346949302fd95df833089c", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1calendar__facet.png b/doc/html/classboost_1_1locale_1_1calendar__facet.png deleted file mode 100644 index 4b2d99fdfacb6201506bef39bcb6261809c8080d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 564 zcmeAS@N?(olHy`uVBq!ia0vp^Yk@d`gBeK1)Us{^QW60^A+G=b{|7Q(y!l$%e`o@b z1;z&s9ANFdBM; z6RHJ*HoB;U`y95~u4wU4)Od610hLU_Lt&F@IHEm2J@ky8&GYpE&-t5v>{W~3mPsx9 zA6j_F`%-;nMK1p@r%C_%oz+tIU%&ls{_&jXzmt~KKbp>2xix%4tYZH6@cHK(KhK%4 zM7=|Qy~DFB3A+?~s%&zsN4f583t@&m z9MKH&hr|xFZ(#kPn8OHk2X5|ndys<}#9-`An$c>~li4}T znZIt^|NIvJ)=eJU-RE!nCw;oHq^&>ev&_{1&rcaw&lm8`%l-bquq0B# z{_QxM+b_R8_jRkxo|#2of7xEV;up5$-Hr1Gw^FB9T5pm~eRgCO|D8>HPu;#bvmoc; z=IrZh?mVbnyzJYV^~N{eHp;9!H}#nhLxt`84S(M)y;=UIbQ?oC%o WwKnxyZ4WSt89ZJ6T-G@yGywou914B_ diff --git a/doc/html/classboost_1_1locale_1_1collator-members.html b/doc/html/classboost_1_1locale_1_1collator-members.html deleted file mode 100644 index 5d53c2d0..00000000 --- a/doc/html/classboost_1_1locale_1_1collator-members.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::collator< CharType > Member List
    -
    -
    - -

    This is the complete list of members for boost::locale::collator< CharType >, including all inherited members.

    - - - - - - - - - - - - - - - - - - - - - - - -
    char_type typedefboost::locale::collator< CharType >
    collator(size_t refs=0)boost::locale::collator< CharType >inlineprotected
    compare(level_type level, char_type const *b1, char_type const *e1, char_type const *b2, char_type const *e2) const boost::locale::collator< CharType >inline
    compare(level_type level, string_type const &l, string_type const &r) const boost::locale::collator< CharType >inline
    do_compare(char_type const *b1, char_type const *e1, char_type const *b2, char_type const *e2) const boost::locale::collator< CharType >inlineprotectedvirtual
    do_compare(level_type level, char_type const *b1, char_type const *e1, char_type const *b2, char_type const *e2) const =0boost::locale::collator< CharType >protectedpure virtual
    do_hash(char_type const *b, char_type const *e) const boost::locale::collator< CharType >inlineprotectedvirtual
    do_hash(level_type level, char_type const *b, char_type const *e) const =0boost::locale::collator< CharType >protectedpure virtual
    do_transform(char_type const *b, char_type const *e) const boost::locale::collator< CharType >inlineprotectedvirtual
    do_transform(level_type level, char_type const *b, char_type const *e) const =0boost::locale::collator< CharType >protectedpure virtual
    hash(level_type level, char_type const *b, char_type const *e) const boost::locale::collator< CharType >inline
    hash(level_type level, string_type const &s) const boost::locale::collator< CharType >inline
    identical enum valueboost::locale::collator_base
    level_type enum nameboost::locale::collator_base
    primary enum valueboost::locale::collator_base
    quaternary enum valueboost::locale::collator_base
    secondary enum valueboost::locale::collator_base
    string_type typedefboost::locale::collator< CharType >
    tertiary enum valueboost::locale::collator_base
    transform(level_type level, char_type const *b, char_type const *e) const boost::locale::collator< CharType >inline
    transform(level_type level, string_type const &s) const boost::locale::collator< CharType >inline
    ~collator() (defined in boost::locale::collator< CharType >)boost::locale::collator< CharType >inlineprotectedvirtual
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1collator.html b/doc/html/classboost_1_1locale_1_1collator.html deleted file mode 100644 index b2f92f44..00000000 --- a/doc/html/classboost_1_1locale_1_1collator.html +++ /dev/null @@ -1,756 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::collator< CharType > Class Template Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::collator< CharType > Class Template Referenceabstract
    -
    -
    - -

    Collation facet. - More...

    - -

    #include <boost/locale/collator.hpp>

    -
    -Inheritance diagram for boost::locale::collator< CharType >:
    -
    -
    - - -boost::locale::collator_base - -
    - - - - - - - - - -

    -Public Types

    typedef CharType char_type
     
    typedef std::basic_string
    -< CharType > 
    string_type
     
    - Public Types inherited from boost::locale::collator_base
    enum  level_type {
    -  primary = 0, -secondary = 1, -tertiary = 2, -quaternary = 3, -
    -  identical = 4 -
    - }
     
    - - - - - - - - - - - - - -

    -Public Member Functions

    int compare (level_type level, char_type const *b1, char_type const *e1, char_type const *b2, char_type const *e2) const
     
    string_type transform (level_type level, char_type const *b, char_type const *e) const
     
    long hash (level_type level, char_type const *b, char_type const *e) const
     
    int compare (level_type level, string_type const &l, string_type const &r) const
     
    long hash (level_type level, string_type const &s) const
     
    string_type transform (level_type level, string_type const &s) const
     
    - - - - - - - - - - - - - - - -

    -Protected Member Functions

     collator (size_t refs=0)
     
    virtual int do_compare (char_type const *b1, char_type const *e1, char_type const *b2, char_type const *e2) const
     
    virtual string_type do_transform (char_type const *b, char_type const *e) const
     
    virtual long do_hash (char_type const *b, char_type const *e) const
     
    virtual int do_compare (level_type level, char_type const *b1, char_type const *e1, char_type const *b2, char_type const *e2) const =0
     
    virtual string_type do_transform (level_type level, char_type const *b, char_type const *e) const =0
     
    virtual long do_hash (level_type level, char_type const *b, char_type const *e) const =0
     
    -

    Detailed Description

    -

    template<typename CharType>
    -class boost::locale::collator< CharType >

    - -

    Collation facet.

    -

    It reimplements standard C++ std::collate, allowing usage of std::locale for direct string comparison

    -

    Member Typedef Documentation

    - -
    -
    -
    -template<typename CharType >
    - - - - -
    typedef CharType boost::locale::collator< CharType >::char_type
    -
    -

    Type of the underlying character

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - -
    typedef std::basic_string<CharType> boost::locale::collator< CharType >::string_type
    -
    -

    Type of string used with this facet

    - -
    -
    -

    Constructor & Destructor Documentation

    - -
    -
    -
    -template<typename CharType >
    - - - - - -
    - - - - - - - - -
    boost::locale::collator< CharType >::collator (size_t refs = 0)
    -
    -inlineprotected
    -
    -

    constructor of the collator object

    - -
    -
    -

    Member Function Documentation

    - -
    -
    -
    -template<typename CharType >
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    int boost::locale::collator< CharType >::compare (level_type level,
    char_type const * b1,
    char_type const * e1,
    char_type const * b2,
    char_type const * e2 
    ) const
    -
    -inline
    -
    -

    Compare two strings in rage [b1,e1), [b2,e2) according using a collation level level. Calls do_compare

    -

    Returns -1 if the first of the two strings sorts before the seconds, returns 1 if sorts after and 0 if they considered equal.

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    int boost::locale::collator< CharType >::compare (level_type level,
    string_type const & l,
    string_type const & r 
    ) const
    -
    -inline
    -
    -

    Compare two strings l and r using collation level level

    -

    Returns -1 if the first of the two strings sorts before the seconds, returns 1 if sorts after and 0 if they considered equal.

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    virtual int boost::locale::collator< CharType >::do_compare (char_type const * b1,
    char_type const * e1,
    char_type const * b2,
    char_type const * e2 
    ) const
    -
    -inlineprotectedvirtual
    -
    -

    This function is used to override default collation function that does not take in account collation level. Uses primary level

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    virtual int boost::locale::collator< CharType >::do_compare (level_type level,
    char_type const * b1,
    char_type const * e1,
    char_type const * b2,
    char_type const * e2 
    ) const
    -
    -protectedpure virtual
    -
    -

    Actual function that performs comparison between the strings. For details see compare member function. Can be overridden.

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    virtual long boost::locale::collator< CharType >::do_hash (char_type const * b,
    char_type const * e 
    ) const
    -
    -inlineprotectedvirtual
    -
    -

    This function is used to override default collation function that does not take in account collation level. Uses primary level

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    virtual long boost::locale::collator< CharType >::do_hash (level_type level,
    char_type const * b,
    char_type const * e 
    ) const
    -
    -protectedpure virtual
    -
    -

    Actual function that calculates hash. For details see hash member function. Can be overridden.

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    virtual string_type boost::locale::collator< CharType >::do_transform (char_type const * b,
    char_type const * e 
    ) const
    -
    -inlineprotectedvirtual
    -
    -

    This function is used to override default collation function that does not take in account collation level. Uses primary level

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    virtual string_type boost::locale::collator< CharType >::do_transform (level_type level,
    char_type const * b,
    char_type const * e 
    ) const
    -
    -protectedpure virtual
    -
    -

    Actual function that performs transformation. For details see transform member function. Can be overridden.

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    long boost::locale::collator< CharType >::hash (level_type level,
    char_type const * b,
    char_type const * e 
    ) const
    -
    -inline
    -
    -

    Calculate a hash of a text in range [b,e). The value can be used for collation sensitive string comparison.

    -

    If compare(level,b1,e1,b2,e2) == 0 then hash(level,b1,e1) == hash(level,b2,e2)

    -

    Calls do_hash

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    long boost::locale::collator< CharType >::hash (level_type level,
    string_type const & s 
    ) const
    -
    -inline
    -
    -

    Calculate a hash that can be used for collation sensitive string comparison of a string s

    -

    If compare(level,s1,s2) == 0 then hash(level,s1) == hash(level,s2)

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    string_type boost::locale::collator< CharType >::transform (level_type level,
    char_type const * b,
    char_type const * e 
    ) const
    -
    -inline
    -
    -

    Create a binary string that can be compared to other in order to get collation order. The string is created for text in range [b,e). It is useful for collation of multiple strings for text.

    -

    The transformation follows these rules:

    -
    compare(level,b1,e1,b2,e2) == sign( transform(level,b1,e1).compare(transform(level,b2,e2)) );
    -

    Calls do_transform

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    string_type boost::locale::collator< CharType >::transform (level_type level,
    string_type const & s 
    ) const
    -
    -inline
    -
    -

    Create a binary string from string s, that can be compared to other, useful for collation of multiple strings.

    -

    The transformation follows these rules:

    -
    compare(level,s1,s2) == sign( transform(level,s1).compare(transform(level,s2)) );
    -
    -
    -
    -
    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1collator.js b/doc/html/classboost_1_1locale_1_1collator.js deleted file mode 100644 index 0b473039..00000000 --- a/doc/html/classboost_1_1locale_1_1collator.js +++ /dev/null @@ -1,19 +0,0 @@ -var classboost_1_1locale_1_1collator = -[ - [ "char_type", "classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f", null ], - [ "string_type", "classboost_1_1locale_1_1collator.html#a106a3fe9e068530013c428661758733d", null ], - [ "collator", "classboost_1_1locale_1_1collator.html#a25a8b21a756756e850a7488a54610053", null ], - [ "~collator", "classboost_1_1locale_1_1collator.html#a290227d0745b79033f6ec24b5b989527", null ], - [ "compare", "classboost_1_1locale_1_1collator.html#ab90dc7bb909a71d3cd9a5e8d7b2eb80e", null ], - [ "compare", "classboost_1_1locale_1_1collator.html#a9ccdfec693cdc5a71b5adc1f083881bf", null ], - [ "do_compare", "classboost_1_1locale_1_1collator.html#ada3a683bed35789e081b710a8e9a9a07", null ], - [ "do_compare", "classboost_1_1locale_1_1collator.html#a5d04cf6c4ab84cf3eac20be402ac6bf9", null ], - [ "do_hash", "classboost_1_1locale_1_1collator.html#aa093cd4ed0b4be4a5e38f0f04a56ac0b", null ], - [ "do_hash", "classboost_1_1locale_1_1collator.html#a7748d5a6ef0d4dd149096b080938d4c4", null ], - [ "do_transform", "classboost_1_1locale_1_1collator.html#a84b5cb6ff01cf1a1330e1556a2c674d5", null ], - [ "do_transform", "classboost_1_1locale_1_1collator.html#a0ee27b7bc751b7a7fda4de1b0d896d57", null ], - [ "hash", "classboost_1_1locale_1_1collator.html#a89752e2023643f972b6cc8024340d5d4", null ], - [ "hash", "classboost_1_1locale_1_1collator.html#a76000f6cf10bfe63dd7fd10652de3f5b", null ], - [ "transform", "classboost_1_1locale_1_1collator.html#a8dc6443fb193616332ca50f207a9b189", null ], - [ "transform", "classboost_1_1locale_1_1collator.html#aa9976b4fa0fba6c5d1a1dea9b5ef02ca", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1collator.png b/doc/html/classboost_1_1locale_1_1collator.png deleted file mode 100644 index d92082531d6520639d6d60a297a54a9ac251004c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1177 zcmeAS@N?(olHy`uVBq!ia0y~yU|a`e2XHV0$+9Dfr9es|z$e7@|Ns9$=8HF9OZyK^ z0J6aNz<~p-op zDe>pcnB{%`;)2XyrMu;2clw8Z^^dtW)y3skPOQ73`uAt|gf8&g$~(9$Ii6m6_N>|l z**KtzmUS8qx_Rld2^d#PLaWc%a0td4%j_@vh8>SDF$``cH#zgqLJ+co-?{QZA_-Mn?{n)m%$ zzU$xN{OdtHn{|SJ6s7O|Q|!W*+rDm9Jg3>Nu%%xwtXg%wQgL_D%Sf#YWhbnIFP9}2 zzrS>Wd)2K^D%ttzf1Q0GojaBxZpOTfhzw7@FZR{@vVZ>cz8aj$SWboQ6)o$l`TdQ37Q=#jbP;y(d~Z(eOUdZ8qw_u1^rJdsjayzZxCdPDtk%eEGm zZDHm)K6Bk3HuYW0indssNLSzGwZeCDa_s2|Vbgcs4m)fb%h>ibWV$aRad?)^+>smq zn(5TH;b!B-WgcM4!5Q9WBSHt;_ a{J|4f>Fj#B>k6 - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::collator_base Member List
    -
    - -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1collator__base.html b/doc/html/classboost_1_1locale_1_1collator__base.html deleted file mode 100644 index 56d9c057..00000000 --- a/doc/html/classboost_1_1locale_1_1collator__base.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::collator_base Class Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::collator_base Class Reference
    -
    -
    - -

    a base class that includes collation level flags - More...

    - -

    #include <boost/locale/collator.hpp>

    -
    -Inheritance diagram for boost::locale::collator_base:
    -
    -
    - - -boost::locale::collator< CharType > - -
    - - - - -

    -Public Types

    enum  level_type {
    -  primary = 0, -secondary = 1, -tertiary = 2, -quaternary = 3, -
    -  identical = 4 -
    - }
     
    -

    Detailed Description

    -

    a base class that includes collation level flags

    -

    Member Enumeration Documentation

    - -
    -
    -

    Unicode collation level types

    - - - - - - -
    Enumerator
    primary  -

    1st collation level: base letters

    -
    secondary  -

    2nd collation level: letters and accents

    -
    tertiary  -

    3rd collation level: letters, accents and case

    -
    quaternary  -

    4th collation level: letters, accents, case and punctuation

    -
    identical  -

    identical collation level: include code-point comparison

    -
    - -
    -
    -
    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1collator__base.js b/doc/html/classboost_1_1locale_1_1collator__base.js deleted file mode 100644 index 6bb54438..00000000 --- a/doc/html/classboost_1_1locale_1_1collator__base.js +++ /dev/null @@ -1,10 +0,0 @@ -var classboost_1_1locale_1_1collator__base = -[ - [ "level_type", "classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22", [ - [ "primary", "classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22ae57e842f398a27ee490208f5af39675b", null ], - [ "secondary", "classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22ad8e103443d69f03f00ac4b68a7181866", null ], - [ "tertiary", "classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22a3a852752e9663b7b3340c435d0cfe36a", null ], - [ "quaternary", "classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22a22ca1875fd63667fbb018df16b0aedba", null ], - [ "identical", "classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22a3c209055ff840e311581ab43013026f2", null ] - ] ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1collator__base.png b/doc/html/classboost_1_1locale_1_1collator__base.png deleted file mode 100644 index bdcb782494b3b4c75442c8b113e763f059c677f1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 754 zcmeAS@N?(olHy`uVBq!ia0vp^mw-5cgBeIh+uvRcq$C1-LR|m<{|{uoc=NTi|Ih>= z3ycpOIKbL@M;^%KC<*clW&kPzfvcxNj2IZ08a-VcLn;{G&b`?8Sb@itUwq~N|0i!x z6ET>vWY*o48mBwFg9;3eOPtqMY}qi4gF!n}neoiJUKWGh>n8Z6eZF$yS<%y^2ebd_ z-1@J2Y417vd1saP%gwv}^Ld1%1<&l8IRRFi7oV&A%6#CuYS5>c_l!-~-O^aRtR=M_ zC9Kz$ICCL*P z?>@C>zT!>gmlJjsODJ1*nit(uWolTwf48^Xq}~4ZHq$-!mrQpPeSdN0pUg9tPSutc zADc8e=3~rr|K|Fjj|}^Kf|YE&4_r-T*l}w)(D`OU2j1NBVA%Zn<9(eLfiR&1=_Sk& z-mew!=AAZN+g_p`)tl+KB=#f2v+Hh5Gh(GV6UuT`8g6c#$dE=*pl*dk@}G`8!(%@< z1ywUub5%TN#Y%flN(*=6n)F25zcE&sQK z!cq;HgD3j`RO#G4xBpO9(~Wa!&6jL#y|mVL&G|af?!5F19+j(W6;#iEm0R*)>%^H& z;IKT=C#`b+oI)h?W-ml|-f4V%H0X=R*|0Ou%R1jpshXdQ+NF7MW>XFaOwJ12P>tv$8nQ|sOf>!p799i6;H|AK-*9EspOMt - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::conv::conversion_error Member List
    -
    -
    - -

    This is the complete list of members for boost::locale::conv::conversion_error, including all inherited members.

    - - -
    conversion_error() (defined in boost::locale::conv::conversion_error)boost::locale::conv::conversion_errorinline
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1conv_1_1conversion__error.html b/doc/html/classboost_1_1locale_1_1conv_1_1conversion__error.html deleted file mode 100644 index a62891d4..00000000 --- a/doc/html/classboost_1_1locale_1_1conv_1_1conversion__error.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::conv::conversion_error Class Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::conv::conversion_error Class Reference
    -
    -
    - -

    The excepton that is thrown in case of conversion error. - More...

    - -

    #include <boost/locale/encoding_errors.hpp>

    -
    -Inheritance diagram for boost::locale::conv::conversion_error:
    -
    -
    - - - -
    -

    Detailed Description

    -

    The excepton that is thrown in case of conversion error.

    -

    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1conv_1_1conversion__error.js b/doc/html/classboost_1_1locale_1_1conv_1_1conversion__error.js deleted file mode 100644 index 4ff91be3..00000000 --- a/doc/html/classboost_1_1locale_1_1conv_1_1conversion__error.js +++ /dev/null @@ -1,4 +0,0 @@ -var classboost_1_1locale_1_1conv_1_1conversion__error = -[ - [ "conversion_error", "classboost_1_1locale_1_1conv_1_1conversion__error.html#aba6b713c35f3538d9e130d3c6cd32d49", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1conv_1_1conversion__error.png b/doc/html/classboost_1_1locale_1_1conv_1_1conversion__error.png deleted file mode 100644 index 388dcb06b47eb84b51a992529e1d3fb3f8a97878..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 659 zcmeAS@N?(olHy`uVBq!ia0vp^cY!#7gBeJ!GHK8QQW60^A+G=b{|7Q(y!l$%e`o@b z1;z&s9ANFdBM;*0BGF7Cf{w%*S0`i5R7^_A21igll>ubZ@0wJdGhZ}*jNe2-VB{mreN zw#5GR-sf{wYJ=n#M3+teT~_O96@1KZQj*q770qRnfQ+m~#>Ud24F6Z?Hzb;x+`WGN zM1}KZ-vZ{xy}r|{)f_@pWgUEo#|L7KjHSaQ4lMApYM24SS|#EWmcBmo`5o)8uRj!D zFx08Ko6qHY{qg#pQ;*#)e%H_4x^T|IecNZn6}_n~UMgKbKh^xyqnNi_7cPwE`7QnG z>;mm{v!19wZ=d(|vY!!s{$=%EOYiW^7sj6pzU8Kw$*$YjdFJYb^Rm7Y{P(IIu7_uB ziuGHna*Xrt6i(^8ze)_hr&aGOdgDCR|M8r4h5zQPy}ne(P29e+#?c{qbk{Ma$i` zn{Ul7{qmB@V4Bk<-QAwW9~fmclGz1 - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::conv::invalid_charset_error Member List
    -
    -
    - -

    This is the complete list of members for boost::locale::conv::invalid_charset_error, including all inherited members.

    - - -
    invalid_charset_error(std::string charset)boost::locale::conv::invalid_charset_errorinline
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1conv_1_1invalid__charset__error.html b/doc/html/classboost_1_1locale_1_1conv_1_1invalid__charset__error.html deleted file mode 100644 index da303591..00000000 --- a/doc/html/classboost_1_1locale_1_1conv_1_1invalid__charset__error.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::conv::invalid_charset_error Class Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::conv::invalid_charset_error Class Reference
    -
    -
    - -

    This exception is thrown in case of use of unsupported or invalid character set. - More...

    - -

    #include <boost/locale/encoding_errors.hpp>

    -
    -Inheritance diagram for boost::locale::conv::invalid_charset_error:
    -
    -
    - - - -
    - - - - - -

    -Public Member Functions

    invalid_charset_error (std::string charset)
     Create an error for charset charset.
     
    -

    Detailed Description

    -

    This exception is thrown in case of use of unsupported or invalid character set.

    -

    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1conv_1_1invalid__charset__error.js b/doc/html/classboost_1_1locale_1_1conv_1_1invalid__charset__error.js deleted file mode 100644 index 4de543bc..00000000 --- a/doc/html/classboost_1_1locale_1_1conv_1_1invalid__charset__error.js +++ /dev/null @@ -1,4 +0,0 @@ -var classboost_1_1locale_1_1conv_1_1invalid__charset__error = -[ - [ "invalid_charset_error", "classboost_1_1locale_1_1conv_1_1invalid__charset__error.html#ae951e3a99a115a60cc87d4d258764681", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1conv_1_1invalid__charset__error.png b/doc/html/classboost_1_1locale_1_1conv_1_1invalid__charset__error.png deleted file mode 100644 index a3fd427d6fbbbe693e89ba874ad965f46161a2c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 705 zcmeAS@N?(olHy`uVBq!ia0vp^Uw}A(gBeIl)~qlAQW60^A+G=b{|7Q(y!l$%e`o@b z1;z&s9ANFdBM;>O*?q%zx~5E(g@RX)o)WbT>SkcfAP#Kw!3{iE(L$x z=?kB;eVdi+Iq6);%xOz_v@$$TEocHVW-T~-W)kNE=Uogb!EP^3 zt16bdz38-*FZFuy>K=n-$OQ&T67c)UGb7Cs8Fs?7Tv@Pw!}jQOv;OtBMg7y?7i*tj z*8ixO(J*n>a&t%j zBy76zwUc4*k9+sR^&5}e4$S!6yjR+a|6yZkVEK8OQ`H<>&!5+G>XFgP zeNpse3kKte0l - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::converter< CharType > Member List
    -
    -
    - -

    This is the complete list of members for boost::locale::converter< CharType >, including all inherited members.

    - - - - - - - - - - -
    case_folding enum valueboost::locale::converter_base
    conversion_type enum nameboost::locale::converter_base
    convert(conversion_type how, Char const *begin, Char const *end, int flags=0) const =0boost::locale::converter< CharType >pure virtual
    converter(size_t refs=0)boost::locale::converter< CharType >inline
    idboost::locale::converter< CharType >static
    lower_case enum valueboost::locale::converter_base
    normalization enum valueboost::locale::converter_base
    title_case enum valueboost::locale::converter_base
    upper_case enum valueboost::locale::converter_base
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1converter.html b/doc/html/classboost_1_1locale_1_1converter.html deleted file mode 100644 index 2341def3..00000000 --- a/doc/html/classboost_1_1locale_1_1converter.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::converter< CharType > Class Template Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::converter< CharType > Class Template Referenceabstract
    -
    -
    - -

    The facet that implements text manipulation. - More...

    - -

    #include <boost/locale/conversion.hpp>

    -
    -Inheritance diagram for boost::locale::converter< CharType >:
    -
    -
    - - -boost::locale::converter_base - -
    - - - - - - - -

    -Public Member Functions

    converter (size_t refs=0)
     Standard constructor.
     
    virtual std::basic_string< Char > convert (conversion_type how, Char const *begin, Char const *end, int flags=0) const =0
     
    - - - - -

    -Static Public Attributes

    -static std::locale::id id
     Locale identification.
     
    - - - - -

    -Additional Inherited Members

    - Public Types inherited from boost::locale::converter_base
    enum  conversion_type {
    -  normalization, -upper_case, -lower_case, -case_folding, -
    -  title_case -
    - }
     
    -

    Detailed Description

    -

    template<typename CharType>
    -class boost::locale::converter< CharType >

    - -

    The facet that implements text manipulation.

    -

    It is used to performs text conversion operations defined by conversion_type. It is specialized for four types of characters char, wchar_t, char16_t, char32_t

    -

    Member Function Documentation

    - -
    -
    -
    -template<typename CharType >
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    virtual std::basic_string<Char> boost::locale::converter< CharType >::convert (conversion_type how,
    Char const * begin,
    Char const * end,
    int flags = 0 
    ) const
    -
    -pure virtual
    -
    -

    Convert text in range [begin, end) according to conversion method how. Parameter flags is used for specification of normalization method like nfd, nfc etc.

    - -
    -
    -
    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1converter.js b/doc/html/classboost_1_1locale_1_1converter.js deleted file mode 100644 index 85d8bda5..00000000 --- a/doc/html/classboost_1_1locale_1_1converter.js +++ /dev/null @@ -1,6 +0,0 @@ -var classboost_1_1locale_1_1converter = -[ - [ "converter", "classboost_1_1locale_1_1converter.html#aa9bd91f48f4ce7b6c270c5281c8b0313", null ], - [ "convert", "classboost_1_1locale_1_1converter.html#a85ce9bf935c59b2fdd196ed40a6a5f85", null ], - [ "id", "classboost_1_1locale_1_1converter.html#ae18f930e621fbe9848d08a91138f37e1", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1converter.png b/doc/html/classboost_1_1locale_1_1converter.png deleted file mode 100644 index 3167b2d7edfd896fc3913b5de79175ad921c7c88..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1051 zcmeAS@N?(olHy`uVBq!ia0y~yU_1e22XHV0$yK(ZPC!Z`z$e7@|Ns9$=8HF9OZyK^ z0J6aNz<~p-opbxrGuFLMrV(eg6&|G4Xa<+^z%8guh` zjcWV7WdGiivFpt2==fq8{N!)qsruk2yH>rrZ6We=#ucNxTRoIkCyS_gzDn%Ack=4Z zHLL%tsQI`oIsa1IXtQoe==~G%LD}IUv!iD76>pmPGDeawbHmwho@aRX2c_s0e?9Gb zZHa}z%*&5sZi>&`{9GtvT6XR_7d_i=T7nbpo_E*S1c~0<0yO1lw$kmV+XZhfyOy?Q z;fc3@XNA^(;80SEwVN6BTIw&`#NE{?{wewWcm8Uey6>3PYa0|=dgNo*oZ@i5#HBO- zpDD>Z&O4ETkAnc-aW`*!HiH1eAM+$XMxX=8!uK4# zG%eX4Nd2h0D!}=m0U5vUyi@u3l4)0E>9(@<-rwWRpItQk4zk2v_tVYt|F4hz`P&vQ zVp;#>XSBZS%4Zi!|8L5gWxDCrTE}Jj`a5s2yh^m2_pL2;&eBa>3~ve@Cw{&jpT>Ua zfkf-X745oJ>fz~|dzNlcsxIt3VYWc>>8h1mwO9GB^=-GjnUn7BES0la`v6bO>bG5Y z>>QpqGkiFEZ_RahQrMYtR3_qDaHiSHLgh;_*YXyuZVc0MUNUp@#uH{+-|=T|-@a}0 zD#`UH(w*p+?T|dwJ zTvJ=K#K-ul*$UCfUt;WAIcF^PJ^0h_?Yg<^bLMeuIQ|tFXHw1n3P4KW>?@WRzyRMT wJv*LpSBnP&Fh8N<7|#?h&7Z6fO8zmPf49qS$J?f4U`}T6boFyt=akR{00X1NX#fBK diff --git a/doc/html/classboost_1_1locale_1_1converter__base-members.html b/doc/html/classboost_1_1locale_1_1converter__base-members.html deleted file mode 100644 index ac7185a6..00000000 --- a/doc/html/classboost_1_1locale_1_1converter__base-members.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::converter_base Member List
    -
    - -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1converter__base.html b/doc/html/classboost_1_1locale_1_1converter__base.html deleted file mode 100644 index 0bfcbaf9..00000000 --- a/doc/html/classboost_1_1locale_1_1converter__base.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::converter_base Class Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::converter_base Class Reference
    -
    -
    - -

    This class provides base flags for text manipulation. It is used as base for converter facet. - More...

    - -

    #include <boost/locale/conversion.hpp>

    -
    -Inheritance diagram for boost::locale::converter_base:
    -
    -
    - - -boost::locale::converter< CharType > - -
    - - - - -

    -Public Types

    enum  conversion_type {
    -  normalization, -upper_case, -lower_case, -case_folding, -
    -  title_case -
    - }
     
    -

    Detailed Description

    -

    This class provides base flags for text manipulation. It is used as base for converter facet.

    -

    Member Enumeration Documentation

    - -
    -
    -

    The flag used for facet - the type of operation to perform

    - - - - - - -
    Enumerator
    normalization  -

    Apply Unicode normalization on the text.

    -
    upper_case  -

    Convert text to upper case.

    -
    lower_case  -

    Convert text to lower case.

    -
    case_folding  -

    Fold case in the text.

    -
    title_case  -

    Convert text to title case.

    -
    - -
    -
    -
    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1converter__base.js b/doc/html/classboost_1_1locale_1_1converter__base.js deleted file mode 100644 index 1fc3121f..00000000 --- a/doc/html/classboost_1_1locale_1_1converter__base.js +++ /dev/null @@ -1,10 +0,0 @@ -var classboost_1_1locale_1_1converter__base = -[ - [ "conversion_type", "classboost_1_1locale_1_1converter__base.html#a726bc2bbcbb6f1e550cca14163fb669b", [ - [ "normalization", "classboost_1_1locale_1_1converter__base.html#a726bc2bbcbb6f1e550cca14163fb669bae20bf7eface68062a0b9f2396833354a", null ], - [ "upper_case", "classboost_1_1locale_1_1converter__base.html#a726bc2bbcbb6f1e550cca14163fb669ba0fee54e09732910ab30856d0e34c8ad2", null ], - [ "lower_case", "classboost_1_1locale_1_1converter__base.html#a726bc2bbcbb6f1e550cca14163fb669ba2c5c38c6bc6ca01fb9e573c148ba8ebe", null ], - [ "case_folding", "classboost_1_1locale_1_1converter__base.html#a726bc2bbcbb6f1e550cca14163fb669ba91936aed5b7c3a82b4d2c2354ead03d3", null ], - [ "title_case", "classboost_1_1locale_1_1converter__base.html#a726bc2bbcbb6f1e550cca14163fb669bac136b257286085de7bd7eb4a7876dfa7", null ] - ] ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1converter__base.png b/doc/html/classboost_1_1locale_1_1converter__base.png deleted file mode 100644 index 4dd2d6866b4ac004b6b854bcc183780103c2b983..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 787 zcmeAS@N?(olHy`uVBq!ia0vp^_klQogBeJ!I~X7gq$C1-LR|m<{|{uoc=NTi|Ih>= z3ycpOIKbL@M;^%KC<*clW&kPzfvcxNj2IZ07J0fjhEy=VoqMtGwE~X|fAf|9|DW96 zB9g=8d3AU6TIE$f9vhhL67GZtdA&TO#26FS&9AUdOx_`8?nl{()tS#ezdY5u|98%o zqvij(Z{AwBvOo3Ny?-yVWshEro;`VEE`M%`@I5`D&rAl_H1C^*_bxK!+?D;zZBgtt z$Hd5-?>gHai~F+gFExZekNzsGunFXSxauDakFq{8 z9=ZC6xnuQFc7bqM_#i2$3$T3t$MtT}xu4xi-j`Ch{!r0eCpKT@Xy{Y#NhV>YXKVQO zO5V`xnxUZE`1-EV4iSeZ$>+=lS2&O=`}oYHA11{uR;o_U(GpGVNQDz<`~~ zo3(z@t<-B*{3DK6+LrK5dUN&1yzEf>Ntd3?+Nrq`61=L%!jpfx)%BgX-VwM99>msK zPZO<{Osw5nxO3y5irs&2vtMwtdX_!Y^r5z87~fyT``TN5?i$>m+B@U(&Z1=gbn^iB zibK!MvyVUjyqQ1m%=5=(KPxuW=goh;*Skgb?(OIKN6fA2+p|+QXUS|=e6#IE!~46R z%~#LAeYR&~@#@NSrJJGQ!lBxN>*~CUrk{UoGFkS--meldoQ~%aOh1z!c2j>FVdQ&MBb@0Lb!%UjP6A diff --git a/doc/html/classboost_1_1locale_1_1date__time-members.html b/doc/html/classboost_1_1locale_1_1date__time-members.html deleted file mode 100644 index b0b7d46a..00000000 --- a/doc/html/classboost_1_1locale_1_1date__time-members.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::date_time Member List
    -
    -
    - -

    This is the complete list of members for boost::locale::date_time, including all inherited members.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    date_time()boost::locale::date_time
    date_time(date_time const &other)boost::locale::date_time
    date_time(date_time const &other, date_time_period_set const &set)boost::locale::date_time
    date_time(double time)boost::locale::date_time
    date_time(double time, calendar const &cal)boost::locale::date_time
    date_time(calendar const &cal)boost::locale::date_time
    date_time(date_time_period_set const &set)boost::locale::date_time
    date_time(date_time_period_set const &set, calendar const &cal)boost::locale::date_time
    difference(date_time const &other, period::period_type f) const boost::locale::date_time
    get(period::period_type f) const boost::locale::date_time
    is_in_daylight_saving_time() const boost::locale::date_time
    maximum(period::period_type f) const boost::locale::date_time
    minimum(period::period_type f) const boost::locale::date_time
    operator!=(date_time const &other) const boost::locale::date_time
    operator+(period::period_type f) const boost::locale::date_timeinline
    operator+(date_time_period const &v) const boost::locale::date_time
    operator+(date_time_period_set const &v) const boost::locale::date_time
    operator+=(period::period_type f)boost::locale::date_timeinline
    operator+=(date_time_period const &v)boost::locale::date_time
    operator+=(date_time_period_set const &v)boost::locale::date_time
    operator-(period::period_type f) const boost::locale::date_timeinline
    operator-(date_time_period const &v) const boost::locale::date_time
    operator-(date_time_period_set const &v) const boost::locale::date_time
    operator-=(period::period_type f)boost::locale::date_timeinline
    operator-=(date_time_period const &v)boost::locale::date_time
    operator-=(date_time_period_set const &v)boost::locale::date_time
    operator/(period::period_type f) const boost::locale::date_timeinline
    operator<(date_time const &other) const boost::locale::date_time
    operator<<(period::period_type f) const boost::locale::date_timeinline
    operator<<(date_time_period const &v) const boost::locale::date_time
    operator<<(date_time_period_set const &v) const boost::locale::date_time
    operator<<=(period::period_type f)boost::locale::date_timeinline
    operator<<=(date_time_period const &v)boost::locale::date_time
    operator<<=(date_time_period_set const &v)boost::locale::date_time
    operator<=(date_time const &other) const boost::locale::date_time
    operator=(date_time const &other)boost::locale::date_time
    operator=(date_time_period_set const &f)boost::locale::date_time
    operator==(date_time const &other) const boost::locale::date_time
    operator>(date_time const &other) const boost::locale::date_time
    operator>=(date_time const &other) const boost::locale::date_time
    operator>>(period::period_type f) const boost::locale::date_timeinline
    operator>>(date_time_period const &v) const boost::locale::date_time
    operator>>(date_time_period_set const &v) const boost::locale::date_time
    operator>>=(period::period_type f)boost::locale::date_timeinline
    operator>>=(date_time_period const &v)boost::locale::date_time
    operator>>=(date_time_period_set const &v)boost::locale::date_time
    set(period::period_type f, int v)boost::locale::date_time
    swap(date_time &other)boost::locale::date_time
    time() const boost::locale::date_time
    time(double v)boost::locale::date_time
    ~date_time() (defined in boost::locale::date_time)boost::locale::date_time
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1date__time.html b/doc/html/classboost_1_1locale_1_1date__time.html deleted file mode 100644 index b35d151c..00000000 --- a/doc/html/classboost_1_1locale_1_1date__time.html +++ /dev/null @@ -1,1190 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::date_time Class Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    - -
    - -

    this class represents a date time and allows to perform various operation according to the locale settings. - More...

    - -

    #include <boost/locale/date_time.hpp>

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Public Member Functions

     date_time ()
     
     date_time (date_time const &other)
     
     date_time (date_time const &other, date_time_period_set const &set)
     
    date_time const & operator= (date_time const &other)
     
     date_time (double time)
     
     date_time (double time, calendar const &cal)
     
     date_time (calendar const &cal)
     
     date_time (date_time_period_set const &set)
     
     date_time (date_time_period_set const &set, calendar const &cal)
     
    date_time const & operator= (date_time_period_set const &f)
     
    void set (period::period_type f, int v)
     
    int get (period::period_type f) const
     
    int operator/ (period::period_type f) const
     
    date_time operator+ (period::period_type f) const
     
    date_time operator- (period::period_type f) const
     
    date_time const & operator+= (period::period_type f)
     
    date_time const & operator-= (period::period_type f)
     
    date_time operator<< (period::period_type f) const
     
    date_time operator>> (period::period_type f) const
     
    date_time const & operator<<= (period::period_type f)
     
    date_time const & operator>>= (period::period_type f)
     
    date_time operator+ (date_time_period const &v) const
     
    date_time operator- (date_time_period const &v) const
     
    date_time const & operator+= (date_time_period const &v)
     
    date_time const & operator-= (date_time_period const &v)
     
    date_time operator<< (date_time_period const &v) const
     
    date_time operator>> (date_time_period const &v) const
     
    date_time const & operator<<= (date_time_period const &v)
     
    date_time const & operator>>= (date_time_period const &v)
     
    date_time operator+ (date_time_period_set const &v) const
     
    date_time operator- (date_time_period_set const &v) const
     
    date_time const & operator+= (date_time_period_set const &v)
     
    date_time const & operator-= (date_time_period_set const &v)
     
    date_time operator<< (date_time_period_set const &v) const
     
    date_time operator>> (date_time_period_set const &v) const
     
    date_time const & operator<<= (date_time_period_set const &v)
     
    date_time const & operator>>= (date_time_period_set const &v)
     
    double time () const
     
    void time (double v)
     
    bool operator== (date_time const &other) const
     
    bool operator!= (date_time const &other) const
     
    bool operator< (date_time const &other) const
     
    bool operator> (date_time const &other) const
     
    bool operator<= (date_time const &other) const
     
    bool operator>= (date_time const &other) const
     
    void swap (date_time &other)
     
    int difference (date_time const &other, period::period_type f) const
     
    int minimum (period::period_type f) const
     
    int maximum (period::period_type f) const
     
    bool is_in_daylight_saving_time () const
     
    -

    Detailed Description

    -

    this class represents a date time and allows to perform various operation according to the locale settings.

    -

    This class allows to manipulate various aspects of dates and times easily using arithmetic operations with periods.

    -

    General arithmetic functions:

    - -

    You can also assign specific periods using assignment operator like: some_time = year * 1995 that sets the year to 1995.

    -
    Examples:
    calendar.cpp.
    -

    Constructor & Destructor Documentation

    - -
    -
    - - - - - - - -
    boost::locale::date_time::date_time ()
    -
    -

    Dafault constructor, uses default calendar initialized date_time object to current time.

    -
    Note
    throws std::bad_cast if the global locale does not have calendar_facet facet installed
    - -
    -
    - -
    -
    - - - - - - - - -
    boost::locale::date_time::date_time (date_time const & other)
    -
    -

    copy date_time

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    boost::locale::date_time::date_time (date_time const & other,
    date_time_period_set const & set 
    )
    -
    -

    copy date_time and change some fields according to the set

    - -
    -
    - -
    -
    - - - - - - - - -
    boost::locale::date_time::date_time (double time)
    -
    -

    Create a date_time object using POSIX time time and default calendar

    -
    Note
    throws std::bad_cast if the global locale does not have calendar_facet facet installed
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    boost::locale::date_time::date_time (double time,
    calendar const & cal 
    )
    -
    -

    Create a date_time object using POSIX time time and calendar cal

    - -
    -
    - -
    -
    - - - - - - - - -
    boost::locale::date_time::date_time (calendar const & cal)
    -
    -

    Create a date_time object using calendar cal and initializes it to current time.

    - -
    -
    - -
    -
    - - - - - - - - -
    boost::locale::date_time::date_time (date_time_period_set const & set)
    -
    -

    Create a date_time object using default calendar and define values given in set

    -
    Note
    throws std::bad_cast if the global locale does not have calendar_facet facet installed
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    boost::locale::date_time::date_time (date_time_period_set const & set,
    calendar const & cal 
    )
    -
    -

    Create a date_time object using calendar cal and define values given in set

    - -
    -
    -

    Member Function Documentation

    - -
    -
    - - - - - - - - - - - - - - - - - - -
    int boost::locale::date_time::difference (date_time const & other,
    period::period_type f 
    ) const
    -
    -

    calculate the distance from this date_time to other in terms of perios f

    - -
    -
    - -
    -
    - - - - - - - - -
    int boost::locale::date_time::get (period::period_type f) const
    -
    -

    get specific period f value

    - -
    -
    - -
    -
    - - - - - - - -
    bool boost::locale::date_time::is_in_daylight_saving_time () const
    -
    -

    Check if *this time point is in daylight saving time

    - -
    -
    - -
    -
    - - - - - - - - -
    int boost::locale::date_time::maximum (period::period_type f) const
    -
    -

    Get minimal possible value for *this time point for a period f. For example in February maximum(day) may be 28 or 29, in January maximum(day)==31

    - -
    -
    - -
    -
    - - - - - - - - -
    int boost::locale::date_time::minimum (period::period_type f) const
    -
    -

    Get minimal possible value for *this time point for a period f.

    - -
    -
    - -
    -
    - - - - - - - - -
    bool boost::locale::date_time::operator!= (date_time const & other) const
    -
    -

    compare date_time in the timeline (ignores difference in calendar, timezone etc)

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    date_time boost::locale::date_time::operator+ (period::period_type f) const
    -
    -inline
    -
    -

    add single period f to the current date_time

    - -
    -
    - -
    -
    - - - - - - - - -
    date_time boost::locale::date_time::operator+ (date_time_period const & v) const
    -
    -

    add date_time_period to the current date_time

    - -
    -
    - -
    -
    - - - - - - - - -
    date_time boost::locale::date_time::operator+ (date_time_period_set const & v) const
    -
    -

    add date_time_period_set v to the current date_time

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    date_time const& boost::locale::date_time::operator+= (period::period_type f)
    -
    -inline
    -
    -

    add single period f to the current date_time

    - -
    -
    - -
    -
    - - - - - - - - -
    date_time const& boost::locale::date_time::operator+= (date_time_period const & v)
    -
    -

    add date_time_period to the current date_time

    - -
    -
    - -
    -
    - - - - - - - - -
    date_time const& boost::locale::date_time::operator+= (date_time_period_set const & v)
    -
    -

    add date_time_period_set v to the current date_time

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    date_time boost::locale::date_time::operator- (period::period_type f) const
    -
    -inline
    -
    -

    subtract single period f from the current date_time

    - -
    -
    - -
    -
    - - - - - - - - -
    date_time boost::locale::date_time::operator- (date_time_period const & v) const
    -
    -

    subtract date_time_period from the current date_time

    - -
    -
    - -
    -
    - - - - - - - - -
    date_time boost::locale::date_time::operator- (date_time_period_set const & v) const
    -
    -

    subtract date_time_period_set v from the current date_time

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    date_time const& boost::locale::date_time::operator-= (period::period_type f)
    -
    -inline
    -
    -

    subtract single period f from the current date_time

    - -
    -
    - -
    -
    - - - - - - - - -
    date_time const& boost::locale::date_time::operator-= (date_time_period const & v)
    -
    -

    subtract date_time_period from the current date_time

    - -
    -
    - -
    -
    - - - - - - - - -
    date_time const& boost::locale::date_time::operator-= (date_time_period_set const & v)
    -
    -

    subtract date_time_period_set v from the current date_time

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    int boost::locale::date_time::operator/ (period::period_type f) const
    -
    -inline
    -
    -

    syntactic sugar for get(f)

    - -
    -
    - -
    -
    - - - - - - - - -
    bool boost::locale::date_time::operator< (date_time const & other) const
    -
    -

    compare date_time in the timeline (ignores difference in calendar, timezone etc)

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    date_time boost::locale::date_time::operator<< (period::period_type f) const
    -
    -inline
    -
    -

    roll forward a date by single period f.

    - -
    -
    - -
    -
    - - - - - - - - -
    date_time boost::locale::date_time::operator<< (date_time_period const & v) const
    -
    -

    roll current date_time forward by date_time_period v

    - -
    -
    - -
    -
    - - - - - - - - -
    date_time boost::locale::date_time::operator<< (date_time_period_set const & v) const
    -
    -

    roll current date_time forward by date_time_period_set v

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    date_time const& boost::locale::date_time::operator<<= (period::period_type f)
    -
    -inline
    -
    -

    roll forward a date by single period f.

    - -
    -
    - -
    -
    - - - - - - - - -
    date_time const& boost::locale::date_time::operator<<= (date_time_period const & v)
    -
    -

    roll current date_time forward by date_time_period v

    - -
    -
    - -
    -
    - - - - - - - - -
    date_time const& boost::locale::date_time::operator<<= (date_time_period_set const & v)
    -
    -

    roll current date_time forward by date_time_period_set v

    - -
    -
    - -
    -
    - - - - - - - - -
    bool boost::locale::date_time::operator<= (date_time const & other) const
    -
    -

    compare date_time in the timeline (ignores difference in calendar, timezone etc)

    - -
    -
    - -
    -
    - - - - - - - - -
    date_time const& boost::locale::date_time::operator= (date_time const & other)
    -
    -

    assign the date_time

    - -
    -
    - -
    -
    - - - - - - - - -
    date_time const& boost::locale::date_time::operator= (date_time_period_set const & f)
    -
    -

    assign values to various periods in set f

    - -
    -
    - -
    -
    - - - - - - - - -
    bool boost::locale::date_time::operator== (date_time const & other) const
    -
    -

    compare date_time in the timeline (ignores difference in calendar, timezone etc)

    - -
    -
    - -
    -
    - - - - - - - - -
    bool boost::locale::date_time::operator> (date_time const & other) const
    -
    -

    compare date_time in the timeline (ignores difference in calendar, timezone etc)

    - -
    -
    - -
    -
    - - - - - - - - -
    bool boost::locale::date_time::operator>= (date_time const & other) const
    -
    -

    compare date_time in the timeline (ignores difference in calendar, timezone etc)

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    date_time boost::locale::date_time::operator>> (period::period_type f) const
    -
    -inline
    -
    -

    roll backward a date by single period f.

    - -
    -
    - -
    -
    - - - - - - - - -
    date_time boost::locale::date_time::operator>> (date_time_period const & v) const
    -
    -

    roll current date_time backward by date_time_period v

    - -
    -
    - -
    -
    - - - - - - - - -
    date_time boost::locale::date_time::operator>> (date_time_period_set const & v) const
    -
    -

    roll current date_time backward by date_time_period_set v

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    date_time const& boost::locale::date_time::operator>>= (period::period_type f)
    -
    -inline
    -
    -

    roll backward a date by single period f.

    - -
    -
    - -
    -
    - - - - - - - - -
    date_time const& boost::locale::date_time::operator>>= (date_time_period const & v)
    -
    -

    roll current date_time backward by date_time_period v

    - -
    -
    - -
    -
    - - - - - - - - -
    date_time const& boost::locale::date_time::operator>>= (date_time_period_set const & v)
    -
    -

    roll current date_time backward by date_time_period_set v

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void boost::locale::date_time::set (period::period_type f,
    int v 
    )
    -
    -

    set specific period f value to v

    -
    Examples:
    calendar.cpp.
    -
    -
    -
    - -
    -
    - - - - - - - - -
    void boost::locale::date_time::swap (date_timeother)
    -
    -

    swaps two dates - efficient, does not throw

    - -
    -
    - -
    -
    - - - - - - - -
    double boost::locale::date_time::time () const
    -
    -

    Get POSIX time

    -

    The POSIX time is number of seconds since January 1st, 1970 00:00 UTC, ignoring leap seconds.

    - -
    -
    - -
    -
    - - - - - - - - -
    void boost::locale::date_time::time (double v)
    -
    -

    set POSIX time

    -

    The POSIX time is number of seconds since January 1st, 1970 00:00 UTC, ignoring leap seconds. This time can be fetched from Operating system clock using C function time, gettimeofday and others.

    - -
    -
    -
    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1date__time.js b/doc/html/classboost_1_1locale_1_1date__time.js deleted file mode 100644 index cbe45595..00000000 --- a/doc/html/classboost_1_1locale_1_1date__time.js +++ /dev/null @@ -1,54 +0,0 @@ -var classboost_1_1locale_1_1date__time = -[ - [ "date_time", "classboost_1_1locale_1_1date__time.html#ae7a3b74e7512ddc4d618eb1f51c3d2b0", null ], - [ "date_time", "classboost_1_1locale_1_1date__time.html#a7d98e552f2ff8a421a5c226102ba0138", null ], - [ "date_time", "classboost_1_1locale_1_1date__time.html#a45008e76b980e7487e3d61b8372d67ae", null ], - [ "~date_time", "classboost_1_1locale_1_1date__time.html#a4865b1ef879fa0bfeecad3289370852f", null ], - [ "date_time", "classboost_1_1locale_1_1date__time.html#addfee06ea6efa5fdca252191176b5756", null ], - [ "date_time", "classboost_1_1locale_1_1date__time.html#ab806af3aee6d70057d1f8e6fbfd09216", null ], - [ "date_time", "classboost_1_1locale_1_1date__time.html#ada52e84093a2775db6e0b3c399b0b9cf", null ], - [ "date_time", "classboost_1_1locale_1_1date__time.html#abfa9db762ab227427778d8fc3c2bf73d", null ], - [ "date_time", "classboost_1_1locale_1_1date__time.html#a871745debde77a28f5fbc6e2b2a5f869", null ], - [ "difference", "classboost_1_1locale_1_1date__time.html#a36df44f891d2a39ca16f57e568b67a3d", null ], - [ "get", "classboost_1_1locale_1_1date__time.html#af6436a546d3b944238f9fa952e5e18bd", null ], - [ "is_in_daylight_saving_time", "classboost_1_1locale_1_1date__time.html#a047e6e010df55fee166dcb3c9e7d3b95", null ], - [ "maximum", "classboost_1_1locale_1_1date__time.html#adb258ce11408b62bc0f14a60a05f0752", null ], - [ "minimum", "classboost_1_1locale_1_1date__time.html#a3363a0c562300095432a17e472d2e52d", null ], - [ "operator!=", "classboost_1_1locale_1_1date__time.html#a289953d80af568f86ddf533c0b161663", null ], - [ "operator+", "classboost_1_1locale_1_1date__time.html#a0df3596add1804b1f64d363fea181fe2", null ], - [ "operator+", "classboost_1_1locale_1_1date__time.html#a4e23796608a8ef0cbd5338f21d220a73", null ], - [ "operator+", "classboost_1_1locale_1_1date__time.html#aa362fdfe044d1c56c4fe939bd3d406bc", null ], - [ "operator+=", "classboost_1_1locale_1_1date__time.html#ab3117067df65d1c33e89ab375f03d27c", null ], - [ "operator+=", "classboost_1_1locale_1_1date__time.html#a7116785ff9f8b5f403e10a24b9b4477d", null ], - [ "operator+=", "classboost_1_1locale_1_1date__time.html#a1e5c7d2a8fed92d1e71f3dda2548b637", null ], - [ "operator-", "classboost_1_1locale_1_1date__time.html#ac870c0fcba5814cd91bb9c63823e280a", null ], - [ "operator-", "classboost_1_1locale_1_1date__time.html#af83662eb6a5d2298cda9159f5277a563", null ], - [ "operator-", "classboost_1_1locale_1_1date__time.html#a464e16b35656568b21f34cb8b3e2c81a", null ], - [ "operator-=", "classboost_1_1locale_1_1date__time.html#a38468aff1a820dc1c41a2a8280120848", null ], - [ "operator-=", "classboost_1_1locale_1_1date__time.html#a6780aae474f33f0a64e7b457789d7524", null ], - [ "operator-=", "classboost_1_1locale_1_1date__time.html#ae03dfadaf23e2ff93ae3d456dd3eb05f", null ], - [ "operator/", "classboost_1_1locale_1_1date__time.html#ac2a3a8f6fdba552b19e478bb6757523e", null ], - [ "operator<", "classboost_1_1locale_1_1date__time.html#a7b27ad955eade1013a43336e2a17adec", null ], - [ "operator<<", "classboost_1_1locale_1_1date__time.html#a22d2b503e2d58c7e2983b89c69ed13bd", null ], - [ "operator<<", "classboost_1_1locale_1_1date__time.html#afc9286cc1d2ad907200a3d9ba5d91c00", null ], - [ "operator<<", "classboost_1_1locale_1_1date__time.html#a2fb78903ee3c27d320798a72bb29a0b0", null ], - [ "operator<<=", "classboost_1_1locale_1_1date__time.html#ae71279d6e8dcc984fe3703b61d545416", null ], - [ "operator<<=", "classboost_1_1locale_1_1date__time.html#aa95d61963c07fb1e39d01d099a4c281a", null ], - [ "operator<<=", "classboost_1_1locale_1_1date__time.html#a048c4e2a1967351e84006177c14ef5e2", null ], - [ "operator<=", "classboost_1_1locale_1_1date__time.html#a76c5b0bbc01bd561c25cb83f26e5f535", null ], - [ "operator=", "classboost_1_1locale_1_1date__time.html#abe5d459e7552ca13b127c682e0d9caab", null ], - [ "operator=", "classboost_1_1locale_1_1date__time.html#a2f7ccfb9e28fa3bb172be9f0446caafd", null ], - [ "operator==", "classboost_1_1locale_1_1date__time.html#a4f11ded4c5383cc3fcd3684d0aa43892", null ], - [ "operator>", "classboost_1_1locale_1_1date__time.html#a1907c677ae9b7d0736705df8ad58b3aa", null ], - [ "operator>=", "classboost_1_1locale_1_1date__time.html#a4d807fa280bbe8d88efbc9a05f4a2d7c", null ], - [ "operator>>", "classboost_1_1locale_1_1date__time.html#a3a53ba943cb5140bafbfbda3d44b4083", null ], - [ "operator>>", "classboost_1_1locale_1_1date__time.html#a50f73791a4a5b4b4a32483030d20e324", null ], - [ "operator>>", "classboost_1_1locale_1_1date__time.html#ad7132f1fb92d1703925b4d3d054c0c19", null ], - [ "operator>>=", "classboost_1_1locale_1_1date__time.html#a178faa979338310b9a92370a3618fa0e", null ], - [ "operator>>=", "classboost_1_1locale_1_1date__time.html#a4605cf04447095908cba7a1cba700b9e", null ], - [ "operator>>=", "classboost_1_1locale_1_1date__time.html#a797242365127dae7142f0a950c4e4e78", null ], - [ "set", "classboost_1_1locale_1_1date__time.html#a4c0ed3be4d5d3bb44014a2ea12927ff8", null ], - [ "swap", "classboost_1_1locale_1_1date__time.html#a704626c84b012080f5e0b73db3d080fb", null ], - [ "time", "classboost_1_1locale_1_1date__time.html#a17aa2b54462ebcf1860f8e4db9f7868e", null ], - [ "time", "classboost_1_1locale_1_1date__time.html#a71bc51cd2ef635dfb0da6c0b740dcb5f", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1date__time__duration-members.html b/doc/html/classboost_1_1locale_1_1date__time__duration-members.html deleted file mode 100644 index c5a90ac9..00000000 --- a/doc/html/classboost_1_1locale_1_1date__time__duration-members.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::date_time_duration Member List
    -
    -
    - -

    This is the complete list of members for boost::locale::date_time_duration, including all inherited members.

    - - - - - - -
    date_time_duration(date_time const &first, date_time const &second)boost::locale::date_time_durationinline
    end() const boost::locale::date_time_durationinline
    get(period::period_type f) const boost::locale::date_time_durationinline
    operator/(period::period_type f) const boost::locale::date_time_durationinline
    start() const boost::locale::date_time_durationinline
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1date__time__duration.html b/doc/html/classboost_1_1locale_1_1date__time__duration.html deleted file mode 100644 index 8bd8f4a3..00000000 --- a/doc/html/classboost_1_1locale_1_1date__time__duration.html +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::date_time_duration Class Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::date_time_duration Class Reference
    -
    -
    - -

    This class represents a period: a pair of two date_time objects. - More...

    - -

    #include <boost/locale/date_time.hpp>

    - - - - - - - - - - - - -

    -Public Member Functions

     date_time_duration (date_time const &first, date_time const &second)
     
    int get (period::period_type f) const
     
    int operator/ (period::period_type f) const
     
    date_time const & start () const
     
    date_time const & end () const
     
    -

    Detailed Description

    -

    This class represents a period: a pair of two date_time objects.

    -

    It is generally used as syntactic sugar to calculate difference between two dates.

    -

    Note: it stores references to the original objects, so it is not recommended to be used outside of the equation you calculate the difference in.

    -

    Constructor & Destructor Documentation

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    boost::locale::date_time_duration::date_time_duration (date_time const & first,
    date_time const & second 
    )
    -
    -inline
    -
    -

    Create an object were first represents earlier point on time line and second is later point.

    - -
    -
    -

    Member Function Documentation

    - -
    -
    - - - - - -
    - - - - - - - -
    date_time const& boost::locale::date_time_duration::end () const
    -
    -inline
    -
    -

    Get ending point

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    int boost::locale::date_time_duration::get (period::period_type f) const
    -
    -inline
    -
    -

    find a difference in terms of period_type f

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    int boost::locale::date_time_duration::operator/ (period::period_type f) const
    -
    -inline
    -
    -

    Syntactic sugar for get(f)

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - -
    date_time const& boost::locale::date_time_duration::start () const
    -
    -inline
    -
    -

    Get starting point

    - -
    -
    -
    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1date__time__duration.js b/doc/html/classboost_1_1locale_1_1date__time__duration.js deleted file mode 100644 index 862a9fcf..00000000 --- a/doc/html/classboost_1_1locale_1_1date__time__duration.js +++ /dev/null @@ -1,8 +0,0 @@ -var classboost_1_1locale_1_1date__time__duration = -[ - [ "date_time_duration", "classboost_1_1locale_1_1date__time__duration.html#ac4b0d49c998032003553e8faf0e5f2cb", null ], - [ "end", "classboost_1_1locale_1_1date__time__duration.html#a100bac2003f4e07ea498e10d0dd1f6b1", null ], - [ "get", "classboost_1_1locale_1_1date__time__duration.html#a5d1b702c281d205e1dafbb15ce85b447", null ], - [ "operator/", "classboost_1_1locale_1_1date__time__duration.html#ac1a04091cc80b98f6faf7e5e73ce5f35", null ], - [ "start", "classboost_1_1locale_1_1date__time__duration.html#afc2f075595d1774c866250d192b9db31", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1date__time__error-members.html b/doc/html/classboost_1_1locale_1_1date__time__error-members.html deleted file mode 100644 index f625dabd..00000000 --- a/doc/html/classboost_1_1locale_1_1date__time__error-members.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::date_time_error Member List
    -
    -
    - -

    This is the complete list of members for boost::locale::date_time_error, including all inherited members.

    - - -
    date_time_error(std::string const &e)boost::locale::date_time_errorinline
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1date__time__error.html b/doc/html/classboost_1_1locale_1_1date__time__error.html deleted file mode 100644 index 005143bf..00000000 --- a/doc/html/classboost_1_1locale_1_1date__time__error.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::date_time_error Class Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::date_time_error Class Reference
    -
    -
    - -

    This error is thrown in case of invalid state that occurred. - More...

    - -

    #include <boost/locale/date_time.hpp>

    -
    -Inheritance diagram for boost::locale::date_time_error:
    -
    -
    - - - -
    - - - - -

    -Public Member Functions

     date_time_error (std::string const &e)
     
    -

    Detailed Description

    -

    This error is thrown in case of invalid state that occurred.

    -

    Constructor & Destructor Documentation

    - -
    -
    - - - - - -
    - - - - - - - - -
    boost::locale::date_time_error::date_time_error (std::string const & e)
    -
    -inline
    -
    -

    Constructor of date_time_error class

    - -
    -
    -
    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1date__time__error.js b/doc/html/classboost_1_1locale_1_1date__time__error.js deleted file mode 100644 index 56b3a961..00000000 --- a/doc/html/classboost_1_1locale_1_1date__time__error.js +++ /dev/null @@ -1,4 +0,0 @@ -var classboost_1_1locale_1_1date__time__error = -[ - [ "date_time_error", "classboost_1_1locale_1_1date__time__error.html#abbd57421fc4617b23ecb33c398152dc8", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1date__time__error.png b/doc/html/classboost_1_1locale_1_1date__time__error.png deleted file mode 100644 index cb17e3f497d62d040d23a534ebaf96faaa4ed9ac..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 621 zcmeAS@N?(olHy`uVBq!ia0vp^8-X~0gBeIBzE8OTq$C1-LR|m<{|{uoc=NTi|Ih>= z3ycpOIKbL@M;^%KC<*clW&kPzfvcxNj2IXg|9HAMhEy=VoqKUovjUH+e_Yl7|NYmy zq&8g0e4DoW%#x?8R633eJkm}}3+9}>q;txVNg}INrY(v1EB4XowEW&*`a<59D>lQ<=S9`=y%?-nV7dybMj&YF631u=|MgjbCqURlU;P*B{>ZJ?zY@dr1?Pn3tFy z^Q)QTvnsm($DN&D-Y7i!z22`&=-z)Hos+lk{kAKddv4O!xBpXJcOUONm-p&A*Z%A4 zRbTQx4Ud|%z4UnO%7jTKLB}E{B~697M)ycsnlYz>i+RIJ6WNb%&7?n-9O3?ua^kaK z`dWsLFd^n6TAhqQu1-J z)8vCCr5+XiXM3RD94yUyctzCt+bKuq{$7w5zGTl@=baDdh{i55)0T4o`=|KZk1fiN z7GBmZJud!B^5eH<$&bFS-l;oxeeP6ES$((LQO~dK_PWFNrEy2>_u@HhaXrPab54tQ z%zswcUomIp`llbCM;fjY-RJmg>!MZMb}u$et+bx{B=J=7S_{6Ziu*4y_;1Nur8aN9 o)qYo=4?AJL*6cicChZdc&x))^ZX7j7foX%m)78&qol`;+0JG&M0ssI2 diff --git a/doc/html/classboost_1_1locale_1_1date__time__period__set-members.html b/doc/html/classboost_1_1locale_1_1date__time__period__set-members.html deleted file mode 100644 index 76f36b0d..00000000 --- a/doc/html/classboost_1_1locale_1_1date__time__period__set-members.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::date_time_period_set Member List
    -
    -
    - -

    This is the complete list of members for boost::locale::date_time_period_set, including all inherited members.

    - - - - - - - -
    add(date_time_period f)boost::locale::date_time_period_setinline
    date_time_period_set()boost::locale::date_time_period_setinline
    date_time_period_set(period::period_type f)boost::locale::date_time_period_setinline
    date_time_period_set(date_time_period const &fl)boost::locale::date_time_period_setinline
    operator[](size_t n) const boost::locale::date_time_period_setinline
    size() const boost::locale::date_time_period_setinline
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1date__time__period__set.html b/doc/html/classboost_1_1locale_1_1date__time__period__set.html deleted file mode 100644 index dceadfa8..00000000 --- a/doc/html/classboost_1_1locale_1_1date__time__period__set.html +++ /dev/null @@ -1,264 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::date_time_period_set Class Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::date_time_period_set Class Reference
    -
    -
    - -

    this class that represents a set of periods, - More...

    - -

    #include <boost/locale/date_time.hpp>

    - - - - - - - - - - - - - - -

    -Public Member Functions

     date_time_period_set ()
     
     date_time_period_set (period::period_type f)
     
     date_time_period_set (date_time_period const &fl)
     
    void add (date_time_period f)
     
    size_t size () const
     
    date_time_period const & operator[] (size_t n) const
     
    -

    Detailed Description

    -

    this class that represents a set of periods,

    -

    It is generally created by operations on periods: 1995*year + 3*month + 1*day. Note: operations are not commutative.

    -

    Constructor & Destructor Documentation

    - -
    -
    - - - - - -
    - - - - - - - -
    boost::locale::date_time_period_set::date_time_period_set ()
    -
    -inline
    -
    -

    Default constructor - empty set

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    boost::locale::date_time_period_set::date_time_period_set (period::period_type f)
    -
    -inline
    -
    -

    Create a set of single period with value 1

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    boost::locale::date_time_period_set::date_time_period_set (date_time_period const & fl)
    -
    -inline
    -
    -

    Create a set of single period fl

    - -
    -
    -

    Member Function Documentation

    - -
    -
    - - - - - -
    - - - - - - - - -
    void boost::locale::date_time_period_set::add (date_time_period f)
    -
    -inline
    -
    -

    Append date_time_period f to the set

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    date_time_period const& boost::locale::date_time_period_set::operator[] (size_t n) const
    -
    -inline
    -
    -

    Get item at position n the set, n should be in range [0,size)

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - -
    size_t boost::locale::date_time_period_set::size () const
    -
    -inline
    -
    -

    Get number if items in list

    - -
    -
    -
    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1date__time__period__set.js b/doc/html/classboost_1_1locale_1_1date__time__period__set.js deleted file mode 100644 index 666c9be5..00000000 --- a/doc/html/classboost_1_1locale_1_1date__time__period__set.js +++ /dev/null @@ -1,9 +0,0 @@ -var classboost_1_1locale_1_1date__time__period__set = -[ - [ "date_time_period_set", "classboost_1_1locale_1_1date__time__period__set.html#a635b8d91c4c8da99857810e42a0aff65", null ], - [ "date_time_period_set", "classboost_1_1locale_1_1date__time__period__set.html#a0966962f5da78fc06121d1455efcbbae", null ], - [ "date_time_period_set", "classboost_1_1locale_1_1date__time__period__set.html#a144842e64250343d87aaff270a9b53a0", null ], - [ "add", "classboost_1_1locale_1_1date__time__period__set.html#a0e70247c1738dbf6869e6d8c04461893", null ], - [ "operator[]", "classboost_1_1locale_1_1date__time__period__set.html#a177a4c3cb2de3b5c9b5fe5738660eba4", null ], - [ "size", "classboost_1_1locale_1_1date__time__period__set.html#a0b726bd57ce8b631de89bbf404b8df2a", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1generator-members.html b/doc/html/classboost_1_1locale_1_1generator-members.html deleted file mode 100644 index aeb162b1..00000000 --- a/doc/html/classboost_1_1locale_1_1generator-members.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::generator Member List
    -
    - -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1generator.html b/doc/html/classboost_1_1locale_1_1generator.html deleted file mode 100644 index 4a4da4e8..00000000 --- a/doc/html/classboost_1_1locale_1_1generator.html +++ /dev/null @@ -1,533 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::generator Class Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::generator Class Reference
    -
    -
    - -

    the major class used for locale generation - More...

    - -

    #include <boost/locale/generator.hpp>

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Public Member Functions

     generator ()
     
     generator (localization_backend_manager const &)
     
    void categories (locale_category_type cats)
     
    locale_category_type categories () const
     
    void characters (character_facet_type chars)
     
    character_facet_type characters () const
     
    void add_messages_domain (std::string const &domain)
     
    void set_default_messages_domain (std::string const &domain)
     
    void clear_domains ()
     
    void add_messages_path (std::string const &path)
     
    void clear_paths ()
     
    void clear_cache ()
     
    void locale_cache_enabled (bool on)
     
    bool locale_cache_enabled () const
     
    bool use_ansi_encoding () const
     
    void use_ansi_encoding (bool enc)
     
    std::locale generate (std::string const &id) const
     
    std::locale generate (std::locale const &base, std::string const &id) const
     
    std::locale operator() (std::string const &id) const
     
    void set_option (std::string const &name, std::string const &value)
     
    void clear_options ()
     
    -

    Detailed Description

    -

    the major class used for locale generation

    -

    This class is used for specification of all parameters required for locale generation and caching. This class const member functions are thread safe if locale class implementation is thread safe.

    -
    Examples:
    boundary.cpp, calendar.cpp, collate.cpp, conversions.cpp, hello.cpp, wboundary.cpp, wconversions.cpp, and whello.cpp.
    -

    Constructor & Destructor Documentation

    - -
    -
    - - - - - - - -
    boost::locale::generator::generator ()
    -
    -

    Create new generator using global localization_backend_manager

    - -
    -
    - -
    -
    - - - - - - - - -
    boost::locale::generator::generator (localization_backend_manager const & )
    -
    -

    Create new generator using specific localization_backend_manager

    - -
    -
    -

    Member Function Documentation

    - -
    -
    - - - - - - - - -
    void boost::locale::generator::add_messages_domain (std::string const & domain)
    -
    -

    Add a new domain of messages that would be generated. It should be set in order to enable messages support.

    -

    Messages domain has following format: "name" or "name/encoding" where name is the base name of the "mo" file where the catalog is stored without ".mo" extension. For example for file /usr/share/locale/he/LC_MESSAGES/blog.mo it would be blog.

    -

    You can optionally specify the encoding of the keys in the sources by adding "/encoding_name" For example blog/cp1255.

    -

    If not defined all keys are assumed to be UTF-8 encoded.

    -
    Note
    When you select a domain for the program using dgettext or message API, you do not specify the encoding part. So for example if the provided domain name was "blog/windows-1255" then for translation you should use dgettext("blog","Hello")
    - -
    -
    - -
    -
    - - - - - - - - -
    void boost::locale::generator::add_messages_path (std::string const & path)
    -
    -

    Add a search path where dictionaries are looked in.

    -
    Note
    -
      -
    • Under the Windows platform the path is treated as a path in the locale's encoding so if you create locale "en_US.windows-1251" then path would be treated as cp1255, and if it is en_US.UTF-8 it is treated as UTF-8. File name is always opened with a wide file name as wide file names are the native file name on Windows.
    • -
    • Under POSIX platforms all paths passed as-is regardless of encoding as narrow encodings are the native encodings for POSIX platforms.
    • -
    - -
    -
    - -
    -
    - - - - - - - - -
    void boost::locale::generator::categories (locale_category_type cats)
    -
    -

    Set types of facets that should be generated, default all

    - -
    -
    - -
    -
    - - - - - - - -
    locale_category_type boost::locale::generator::categories () const
    -
    -

    Get types of facets that should be generated, default all

    - -
    -
    - -
    -
    - - - - - - - - -
    void boost::locale::generator::characters (character_facet_type chars)
    -
    -

    Set the characters type for which the facets should be generated, default all supported

    - -
    -
    - -
    -
    - - - - - - - -
    character_facet_type boost::locale::generator::characters () const
    -
    -

    Get the characters type for which the facets should be generated, default all supported

    - -
    -
    - -
    -
    - - - - - - - -
    void boost::locale::generator::clear_cache ()
    -
    -

    Remove all cached locales

    - -
    -
    - -
    -
    - - - - - - - -
    void boost::locale::generator::clear_domains ()
    -
    -

    Remove all added domains from the list

    - -
    -
    - -
    -
    - - - - - - - -
    void boost::locale::generator::clear_options ()
    -
    -

    Clear backend specific options

    - -
    -
    - -
    -
    - - - - - - - -
    void boost::locale::generator::clear_paths ()
    -
    -

    Remove all added paths

    - -
    -
    - -
    -
    - - - - - - - - -
    std::locale boost::locale::generator::generate (std::string const & id) const
    -
    -

    Generate a locale with id id

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    std::locale boost::locale::generator::generate (std::locale const & base,
    std::string const & id 
    ) const
    -
    -

    Generate a locale with id id. Use base as a locale to which all facets are added, instead of std::locale::classic().

    - -
    -
    - -
    -
    - - - - - - - - -
    void boost::locale::generator::locale_cache_enabled (bool on)
    -
    -

    Turn locale caching ON

    - -
    -
    - -
    -
    - - - - - - - -
    bool boost::locale::generator::locale_cache_enabled () const
    -
    -

    Get locale cache option

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    std::locale boost::locale::generator::operator() (std::string const & id) const
    -
    -inline
    -
    -

    Shortcut to generate(id)

    - -
    -
    - -
    -
    - - - - - - - - -
    void boost::locale::generator::set_default_messages_domain (std::string const & domain)
    -
    -

    Set default message domain. If this member was not called, the first added messages domain is used. If the domain domain is not added yet it is added.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void boost::locale::generator::set_option (std::string const & name,
    std::string const & value 
    )
    -
    -

    Set backend specific option

    - -
    -
    - -
    -
    - - - - - - - -
    bool boost::locale::generator::use_ansi_encoding () const
    -
    -

    Check if by default ANSI encoding is selected or UTF-8 onces. The default is false.

    - -
    -
    - -
    -
    - - - - - - - - -
    void boost::locale::generator::use_ansi_encoding (bool enc)
    -
    -

    Select ANSI encodings as default system encoding rather then UTF-8 by default under Windows.

    -

    The default is the most portable and most powerful encoding, UTF-8, but the user can select "system" one if dealing with legacy applications

    - -
    -
    -
    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1generator.js b/doc/html/classboost_1_1locale_1_1generator.js deleted file mode 100644 index d6f25dbd..00000000 --- a/doc/html/classboost_1_1locale_1_1generator.js +++ /dev/null @@ -1,25 +0,0 @@ -var classboost_1_1locale_1_1generator = -[ - [ "generator", "classboost_1_1locale_1_1generator.html#a25f1d8fbbab6558213991c99630e851c", null ], - [ "generator", "classboost_1_1locale_1_1generator.html#a767403ea3f6259fd184a6e355caf62f2", null ], - [ "~generator", "classboost_1_1locale_1_1generator.html#aa2bc5fd441b1d10dc0d98de6d0014dfd", null ], - [ "add_messages_domain", "classboost_1_1locale_1_1generator.html#a15020562d16dbbe276325b0162d54565", null ], - [ "add_messages_path", "classboost_1_1locale_1_1generator.html#a12823bbdb209690bfb77caa6404fd91b", null ], - [ "categories", "classboost_1_1locale_1_1generator.html#ae3c095f074329954eb90bb80488c7f76", null ], - [ "categories", "classboost_1_1locale_1_1generator.html#ad0aa601769d49ea79f354d1e1255cd64", null ], - [ "characters", "classboost_1_1locale_1_1generator.html#ad5e01c555aa43b438f688dbc29725ab8", null ], - [ "characters", "classboost_1_1locale_1_1generator.html#a78feb6e2caae5cc0b01a287cd48691cb", null ], - [ "clear_cache", "classboost_1_1locale_1_1generator.html#a7b4458ef36df82bc9e359735c55203e8", null ], - [ "clear_domains", "classboost_1_1locale_1_1generator.html#ade4a0ae57dbe87dfc38aa945f063d3c4", null ], - [ "clear_options", "classboost_1_1locale_1_1generator.html#a1804390c65562fa66327152e9dd04c60", null ], - [ "clear_paths", "classboost_1_1locale_1_1generator.html#ae6ef1ec096f219f4e6c092507e41fa35", null ], - [ "generate", "classboost_1_1locale_1_1generator.html#a75ba62f2ae7daa5a2d6641e36e064ecb", null ], - [ "generate", "classboost_1_1locale_1_1generator.html#aa98d7869660a1eb9b658b2cd4db495b3", null ], - [ "locale_cache_enabled", "classboost_1_1locale_1_1generator.html#ac2d152e2803cd96f4acc646943f2df51", null ], - [ "locale_cache_enabled", "classboost_1_1locale_1_1generator.html#aacfcd26484a830723a8a9f9d2e91a0e6", null ], - [ "operator()", "classboost_1_1locale_1_1generator.html#acd80b3f2371c77f4f7e7dfe69ec670ab", null ], - [ "set_default_messages_domain", "classboost_1_1locale_1_1generator.html#a4804bc5c4a9adb74cffcc2bdac87da1d", null ], - [ "set_option", "classboost_1_1locale_1_1generator.html#ac0bbbb4aca466e59e82b63bcbf2efc8b", null ], - [ "use_ansi_encoding", "classboost_1_1locale_1_1generator.html#a9afb2b0791abbabd39c800e08d9c9717", null ], - [ "use_ansi_encoding", "classboost_1_1locale_1_1generator.html#ad9b74721ce3c5e1c39c7e9a4564e1e7b", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1generic__codecvt.html b/doc/html/classboost_1_1locale_1_1generic__codecvt.html deleted file mode 100644 index a0941e9a..00000000 --- a/doc/html/classboost_1_1locale_1_1generic__codecvt.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::generic_codecvt< CharType, CodecvtImpl, CharSize > Class Template Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::generic_codecvt< CharType, CodecvtImpl, CharSize > Class Template Reference
    -
    -
    - -

    Geneneric generic codecvt facet, various stateless encodings to UTF-16 and UTF-32 using wchar_t, char32_t and char16_t. - More...

    - -

    #include <boost/locale/generic_codecvt.hpp>

    -

    Detailed Description

    -

    template<typename CharType, typename CodecvtImpl, int CharSize = sizeof(CharType)>
    -class boost::locale::generic_codecvt< CharType, CodecvtImpl, CharSize >

    - -

    Geneneric generic codecvt facet, various stateless encodings to UTF-16 and UTF-32 using wchar_t, char32_t and char16_t.

    -

    Implementations should dervide from this class defining itself as CodecvtImpl and provide following members

    -
      -
    • state_type - a type of special object that allows to store intermediate cached data, for example iconv_t descriptor
    • -
    • state_type initial_state(generic_codecvt_base::initial_convertion_state direction) const - member function that creates initial state
    • -
    • int max_encoding_length() const - a maximal length that one Unicode code point is represented, for UTF-8 for example it is 4 from ISO-8859-1 it is 1
    • -
    • utf::code_point to_unicode(state_type &state,char const *&begin,char const *end) - extract first code point from the text in range [begin,end), in case of success begin would point to the next character sequence to be encoded to next code point, in case of incomplete sequence - utf::incomplete shell be returned, and in case of invalid input sequence utf::illegal shell be returned and begin would remain unmodified
    • -
    • utf::code_point from_unicode(state_type &state,utf::code_point u,char *begin,char const *end) - convert a unicode code point u into a character seqnece at [begin,end). Return the length of the sequence in case of success, utf::incomplete in case of not enough room to encode the code point of utf::illegal in case conversion can not be performed
    • -
    -

    For example implementaion of codecvt for latin1/ISO-8859-1 character set

    -
    template<typename CharType>
    -
    class latin1_codecvt :boost::locale::generic_codecvt<CharType,latin1_codecvt<CharType> >
    -
    {
    -
    public:
    -
    -
    /* Standard codecvt constructor */
    -
    latin1_codecvt(size_t refs = 0) : boost::locale::generic_codecvt<CharType,latin1_codecvt<CharType> >(refs)
    -
    {
    -
    }
    -
    -
    /* State is unused but required by generic_codecvt */
    -
    struct state_type {};
    -
    -
    state_type initial_state(generic_codecvt_base::initial_convertion_state /*unused*/) const
    -
    {
    -
    return state_type();
    -
    }
    -
    -
    int max_encoding_length() const
    -
    {
    -
    return 1;
    -
    }
    -
    -
    boost::locale::utf::code_point to_unicode(state_type &,char const *&begin,char const *end) const
    -
    {
    -
    if(begin == end)
    - -
    return *begin++;
    -
    }
    -
    -
    boost::locale::utf::code_point from_unicode(state_type &,boost::locale::utf::code_point u,char *begin,char const *end) const
    -
    {
    -
    if(u >= 256)
    - -
    if(begin == end)
    - -
    *begin = u;
    -
    return 1;
    -
    }
    -
    };
    -

    When external tools used for encoding conversion, the state_type is useful to save objects used for conversions. For example, icu::UConverter can be saved in such a state for an efficient use:

    -
    template<typename CharType>
    -
    class icu_codecvt :boost::locale::generic_codecvt<CharType,icu_codecvt<CharType> >
    -
    {
    -
    public:
    -
    -
    /* Standard codecvt constructor */
    -
    icu_codecvt(std::string const &name,refs = 0) :
    -
    boost::locale::generic_codecvt<CharType,latin1_codecvt<CharType> >(refs)
    -
    { ... }
    -
    -
    /* State is unused but required by generic_codecvt */
    -
    struct std::unique_ptr<UConverter,void (*)(UConverter*)> state_type;
    -
    -
    state_type &&initial_state(generic_codecvt_base::initial_convertion_state /*unused*/) const
    -
    {
    -
    UErrorCode err = U_ZERO_ERROR;
    -
    state_type ptr(ucnv_safeClone(converter_,0,0,&err,ucnv_close);
    -
    return std::move(ptr);
    -
    }
    -
    -
    boost::locale::utf::code_point to_unicode(state_type &ptr,char const *&begin,char const *end) const
    -
    {
    -
    UErrorCode err = U_ZERO_ERROR;
    -
    boost::locale::utf::code_point cp = ucnv_getNextUChar(ptr.get(),&begin,end,&err);
    -
    ...
    -
    }
    -
    ...
    -
    };
    -

    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_011_01_4-members.html b/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_011_01_4-members.html deleted file mode 100644 index c45587fc..00000000 --- a/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_011_01_4-members.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - - - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_011_01_4.html b/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_011_01_4.html deleted file mode 100644 index 0258b287..00000000 --- a/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_011_01_4.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::generic_codecvt< CharType, CodecvtImpl, 1 > Class Template Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::generic_codecvt< CharType, CodecvtImpl, 1 > Class Template Reference
    -
    -
    -
    -Inheritance diagram for boost::locale::generic_codecvt< CharType, CodecvtImpl, 1 >:
    -
    -
    - - -boost::locale::generic_codecvt_base - -
    - - - - - - - -

    -Public Types

    -typedef CharType uchar
     
    - Public Types inherited from boost::locale::generic_codecvt_base
    enum  initial_convertion_state { to_unicode_state, -from_unicode_state - }
     
    - - - - - -

    -Public Member Functions

    -CodecvtImpl const & implementation () const
     
    generic_codecvt (size_t refs=0)
     
    -
    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_011_01_4.js b/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_011_01_4.js deleted file mode 100644 index e88107f1..00000000 --- a/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_011_01_4.js +++ /dev/null @@ -1,6 +0,0 @@ -var classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_011_01_4 = -[ - [ "uchar", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_011_01_4.html#a6b861117b93378e0d04c0715c3eaf73f", null ], - [ "generic_codecvt", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_011_01_4.html#a52148cd9094bf6f0d11ca8cf56a31426", null ], - [ "implementation", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_011_01_4.html#acc64c198f348a04baf1aac2c1b8c6be5", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_011_01_4.png b/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_011_01_4.png deleted file mode 100644 index 00edebf34bcab2bdee7535c31d7eb88d29443dab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1855 zcmb`Ic~H~W7RP@WjTQ*JaX}PY!d6k#1OgN&K~X?LFhW2UQ5Kb0HmQUN4I)vi??F-a z&`1L=i4aRfOd*J7DGpmnP)r~MNN8Dt5E3dhq!1vDo#{+xI^*<@cW2JIpL@^uo|!ZA zow@lTn4=KmoyGtFKv02xSO8cjHgL!$kRh8L+w5T2EJK3B{q=gi0pHGQ2t{qh2KqDj zeEx>~5o^P7QzjM@1{g%|SN~7pE&u@TMfv%LXB(-g)1~uXrW=Ou8*}tlaZsBQ_LIwl z_$m5kfoGzsuJEdMDbqZV2z16dyX%5R|qi4&--GX{yM1KnYwM0;_ z$TusRB7PNtU_~zB8R^*ww4pw-c|QQQ)*M9Y(o|)9eVTgZ_qE4MSjNGFcN(n`h7JT9d;EMyplk12-%C z4yVZ{7vnPPYMF{w^KH#hP2!Aj1S@Ymkx{0L9Xqzx7~!UjxN6K`T~$~6GZw%XBgIV= zQg<%w-SAlUqSL%}U$88_3mH7~JvWQccGSfwsDa{O;^5tLvYegp{M>_Gg8rC`ZjUI^ zgY&n=6k5Mj-sh1s=rQr~OP$0!EQ_utw!FOE<l7i_%4#cQWud&y3{(${!`NW2LH52 z;vUKss74dXq`2)`i7DVpIxJv;9Btg*DrxTNm#yL!Q^SCh1V&X-eHCN8k*XAtz1~_q z4o%J~qI=@M??1v&3Qniqf^~~;E}3z?<737!+6|#w4?|N&v~NN)n0pt- zuk0aOSlzQD91$pd9?>xBoTNbN$Tx3>*6S3P?I4Av#7czjE&8;3&#-1_;DCGDV_hdY zr@g-phtqc{DMU~D_8o1{<6_nJP<30>Q#q>Ns;X(1ZGGqL|=ZjltjMg_BW zFAf+idM?9%;l;FC{)>L0Cjga(TSWON$rNeLuMq6{=p3#{^1vP~RjV7`L9nA`jTEVK z${~TET0!-};nLr2z&4nyT-(wv<8()!n@Q@WP#}|5E{3jI3)`?&lvQx)kSy1=bV!i8 z^TV{A5f+4^mA~=0Cax7t+hb})NxOi!jva>p!J%KkmbdPk!XY=T;^9-QHdFXV268QM z;k$0VK>G32wR$*6;QKd`cY*Vtr9Q`>08vPbQNRO7Q1Fqz3I2Nf?*(|Dnpb0&eQKrv zD6qbGTelGuxB^B&{@>Y)R$dyohkg~A~)k!0FnV|FcVXPQmlf)$s}GGge$(}dd*(+b zgFFRgIhs+V!2GADM9gGvgaREI6JZy*1F-oF+fh-Z#{hdIyW!UU*ka-wFZ?Eg=S286 zvC^y8YC921$hojN+LKHaoqRuP$jl1!0SElUB75le*q|gRFxr(jIAtwweC;PQ{B{7!ALIA< IaQwAD0EQ`tLjV8( diff --git a/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4-members.html b/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4-members.html deleted file mode 100644 index ce728103..00000000 --- a/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4-members.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 > Member List
    -
    -
    - -

    This is the complete list of members for boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >, including all inherited members.

    - - - - - - - - - - - - - - -
    do_always_noconv() const (defined in boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >)boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >inlineprotectedvirtual
    do_encoding() const (defined in boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >)boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >inlineprotectedvirtual
    do_in(std::mbstate_t &std_state, char const *from, char const *from_end, char const *&from_next, uchar *to, uchar *to_end, uchar *&to_next) const (defined in boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >)boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >inlineprotectedvirtual
    do_length(std::mbstate_t &std_state, char const *from, char const *from_end, size_t max) const (defined in boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >)boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >inlineprotectedvirtual
    do_max_length() const (defined in boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >)boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >inlineprotectedvirtual
    do_out(std::mbstate_t &std_state, uchar const *from, uchar const *from_end, uchar const *&from_next, char *to, char *to_end, char *&to_next) const (defined in boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >)boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >inlineprotectedvirtual
    do_unshift(std::mbstate_t &s, char *from, char *, char *&next) const (defined in boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >)boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >inlineprotectedvirtual
    from_unicode_state enum valueboost::locale::generic_codecvt_base
    generic_codecvt(size_t refs=0) (defined in boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >)boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >inline
    implementation() const (defined in boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >)boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >inline
    initial_convertion_state enum nameboost::locale::generic_codecvt_base
    to_unicode_state enum valueboost::locale::generic_codecvt_base
    uchar typedef (defined in boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >)boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4.html b/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4.html deleted file mode 100644 index 3ff6600e..00000000 --- a/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 > Class Template Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 > Class Template Reference
    -
    -
    - -

    UTF-16 to/from UTF-8 codecvt facet to use with char16_t or wchar_t on Windows. - More...

    - -

    #include <boost/locale/generic_codecvt.hpp>

    -
    -Inheritance diagram for boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >:
    -
    -
    - - -boost::locale::generic_codecvt_base - -
    - - - - - - - -

    -Public Types

    -typedef CharType uchar
     
    - Public Types inherited from boost::locale::generic_codecvt_base
    enum  initial_convertion_state { to_unicode_state, -from_unicode_state - }
     
    - - - - - -

    -Public Member Functions

    generic_codecvt (size_t refs=0)
     
    -CodecvtImpl const & implementation () const
     
    - - - - - - - - - - - - - - - -

    -Protected Member Functions

    -virtual std::codecvt_base::result do_unshift (std::mbstate_t &s, char *from, char *, char *&next) const
     
    -virtual int do_encoding () const throw ()
     
    -virtual int do_max_length () const throw ()
     
    -virtual bool do_always_noconv () const throw ()
     
    -virtual int do_length (std::mbstate_t &std_state, char const *from, char const *from_end, size_t max) const
     
    -virtual std::codecvt_base::result do_in (std::mbstate_t &std_state, char const *from, char const *from_end, char const *&from_next, uchar *to, uchar *to_end, uchar *&to_next) const
     
    -virtual std::codecvt_base::result do_out (std::mbstate_t &std_state, uchar const *from, uchar const *from_end, uchar const *&from_next, char *to, char *to_end, char *&to_next) const
     
    -

    Detailed Description

    -

    template<typename CharType, typename CodecvtImpl>
    -class boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >

    - -

    UTF-16 to/from UTF-8 codecvt facet to use with char16_t or wchar_t on Windows.

    -

    Note in order to fit the requirements of usability by std::wfstream it uses mbstate_t to handle intermediate states in handling of variable length UTF-16 sequences

    -

    Its member functions implement standard virtual functions of basic codecvt

    -

    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4.js b/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4.js deleted file mode 100644 index 980ef71c..00000000 --- a/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4.js +++ /dev/null @@ -1,13 +0,0 @@ -var classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4 = -[ - [ "uchar", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4.html#a7a7bfedcd737a468fbc662352c8b16e8", null ], - [ "generic_codecvt", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4.html#ae0bf8a3f96c872d116180d624d5fefe6", null ], - [ "do_always_noconv", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4.html#a4932099df788bb2992762aef8cd97079", null ], - [ "do_encoding", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4.html#af8417b06caaf0bb1162ae6762fe4b3e6", null ], - [ "do_in", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4.html#a40fecddd1d876887e8d696af02936b85", null ], - [ "do_length", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4.html#a55bf86bfcf596f01b6390d300720b7f2", null ], - [ "do_max_length", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4.html#a0f497585138528c91eeece9d506a9661", null ], - [ "do_out", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4.html#aacf028cb7760885bea33dbddf8b82cf1", null ], - [ "do_unshift", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4.html#a84f7fe1ae2d0cb219ac0e0bffe2ee5fe", null ], - [ "implementation", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4.html#ac791c7c243c94d531e03355d0542c07d", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4.png b/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4.png deleted file mode 100644 index fbb129360baf8e0f95b0e70238a9e9cfc9e6a452..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1871 zcmb`Idr;HI7RP@fmw*U}g}KF4i%`+qq1WS+!kE9SGCIN|1q?M#p8;pck5d`@G;UbU#KY<&Z>9l{f{p0S;p7S}o-`&|c zb9VQe&|p6UJ+vMG00snqZx8^qWEu|DMQW^J&EqsW zJ444X z;d2+L4Y{Ax&+>1QvtlMF>Q2j%jEUp?h<@`cUNkj*$3Chs>U>o61w{r2eP@ZE3gmEe`;w-^s8;-9N z4)z-^a=ZONG2o7lJ@64T&Gg&`BNpPw+LQ$)$I=UvZg6CYr# zOzWkl8Z-a&^jat0_53RV&(w;Sue90f^#C$X#Ep-nqvZf-c9pg5*3 z$Wi6ig-IprMRMFyQvlZC8m+w*nw32itVUZtt9F}NOTBeNuzud1X|Xt$vMmT5U`UQ$ zZ0l?8Uz5WtmwfM^P|Z@|;ou%~Ot@1t?#=VXVN5%HNrF9aI4^Em5W()OF_sr%Ma=aICxJ5wMQ}&vW#N$>ODrLrXy}uC(zV#O+5G0OUX>B z({2hSWFgoL$Kx++vE|wsk8i$G4v*V7EICd}B-h^>Fcd>;q7^;1RFZ)t%qsC{!dZ&5 z!Cz8-p3JIx4@ivL=?VQhmGVK&uTzeOnbqrg{YIL(rX$* z`|Kd0^$v(hcAgQXh>1UoKJGGoKXuxKoEe811ggS{5%=%?X_w#E{&RtAMQ>~pzM?l7 zFaorG%pKRbgIO%p|J&{Yi3C>h^FzSD#5+yC%xuIw0gS`Mh$r8fA_Kh}gfjqQ1MKATn?q%R*fg z^OA=+11%o>?_t2KNVs;1a3+(H0AgJ!K~4i!dn*QP;vKiD=T@u-ZTuds(OnzLTFR#J zN4nde*m}NX-i*pp@M|VcpcHe9c-(Fif`NUJNY=wt=x55T+9-Rxwy2x_{hC}d+JVtY zZpbnLP=wG^??jWhy`Upi1nDq~>j7pFS!C?mh3ba+I1U*O#f zh!n5mdS$)DbVu6NNMXqHl|@Z1B5$TytK_RbCoYVquIde}mV7kV+}O1hoLi$m{eF^G zZOEGeyDyD-ZDXD54YIK5yImY7^4|(*k!*9o$;4Tgtk;K~!xP5dKDM~Jof+xJa8v5Q zjqv_m6zIj^mKZBP+q*;t`nPQl+aEzbWGvU5+HadEkB`3M98?9Z&l^3kyEXrnEI+$N z$ED2u@d;?o6&_lCf3B8qAGBVhCU0Ig-7qJSyRipGN%mOik!HpyE_067Tlc--CEV{y zi^h{&#mUM0bS;@H_=rx@X5Ksz8wcCEJ6?q}VD;xoj+;XW1h?g4=3c(!#nZDug+-6T zEDb80K^PXw0OK9o|2ukD>$4tVaWD7H%63bqKMLS)D}-QWSp*W1h-Ke(Bz4Mc%%$vy R4$bce5PX8YIbNiz{{!L!id_Hz diff --git a/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4-members.html b/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4-members.html deleted file mode 100644 index b73c8589..00000000 --- a/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4-members.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 > Member List
    -
    -
    - -

    This is the complete list of members for boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >, including all inherited members.

    - - - - - - - - - - - - - - -
    do_always_noconv() const (defined in boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >)boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >inlineprotectedvirtual
    do_encoding() const (defined in boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >)boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >inlineprotectedvirtual
    do_in(std::mbstate_t &, char const *from, char const *from_end, char const *&from_next, uchar *to, uchar *to_end, uchar *&to_next) const (defined in boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >)boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >inlineprotectedvirtual
    do_length(std::mbstate_t &, char const *from, char const *from_end, size_t max) const (defined in boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >)boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >inlineprotectedvirtual
    do_max_length() const (defined in boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >)boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >inlineprotectedvirtual
    do_out(std::mbstate_t &, uchar const *from, uchar const *from_end, uchar const *&from_next, char *to, char *to_end, char *&to_next) const (defined in boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >)boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >inlineprotectedvirtual
    do_unshift(std::mbstate_t &, char *from, char *, char *&next) const (defined in boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >)boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >inlineprotectedvirtual
    from_unicode_state enum valueboost::locale::generic_codecvt_base
    generic_codecvt(size_t refs=0) (defined in boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >)boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >inline
    implementation() const (defined in boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >)boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >inline
    initial_convertion_state enum nameboost::locale::generic_codecvt_base
    to_unicode_state enum valueboost::locale::generic_codecvt_base
    uchar typedef (defined in boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >)boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4.html b/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4.html deleted file mode 100644 index 57ac0abd..00000000 --- a/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 > Class Template Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 > Class Template Reference
    -
    -
    - -

    UTF-32 to/from UTF-8 codecvt facet to use with char32_t or wchar_t on POSIX platforms. - More...

    - -

    #include <boost/locale/generic_codecvt.hpp>

    -
    -Inheritance diagram for boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >:
    -
    -
    - - -boost::locale::generic_codecvt_base - -
    - - - - - - - -

    -Public Types

    -typedef CharType uchar
     
    - Public Types inherited from boost::locale::generic_codecvt_base
    enum  initial_convertion_state { to_unicode_state, -from_unicode_state - }
     
    - - - - - -

    -Public Member Functions

    generic_codecvt (size_t refs=0)
     
    -CodecvtImpl const & implementation () const
     
    - - - - - - - - - - - - - - - -

    -Protected Member Functions

    -virtual std::codecvt_base::result do_unshift (std::mbstate_t &, char *from, char *, char *&next) const
     
    -virtual int do_encoding () const throw ()
     
    -virtual int do_max_length () const throw ()
     
    -virtual bool do_always_noconv () const throw ()
     
    -virtual int do_length (std::mbstate_t &, char const *from, char const *from_end, size_t max) const
     
    -virtual std::codecvt_base::result do_in (std::mbstate_t &, char const *from, char const *from_end, char const *&from_next, uchar *to, uchar *to_end, uchar *&to_next) const
     
    -virtual std::codecvt_base::result do_out (std::mbstate_t &, uchar const *from, uchar const *from_end, uchar const *&from_next, char *to, char *to_end, char *&to_next) const
     
    -

    Detailed Description

    -

    template<typename CharType, typename CodecvtImpl>
    -class boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >

    - -

    UTF-32 to/from UTF-8 codecvt facet to use with char32_t or wchar_t on POSIX platforms.

    -

    Its member functions implement standard virtual functions of basic codecvt. mbstate_t is not used for UTF-32 handling due to fixed length encoding

    -

    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4.js b/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4.js deleted file mode 100644 index 5c6cb2cd..00000000 --- a/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4.js +++ /dev/null @@ -1,13 +0,0 @@ -var classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4 = -[ - [ "uchar", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4.html#a5295bb34a01e596eca5948f24bc9f4a5", null ], - [ "generic_codecvt", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4.html#adc4f372fcfd1274ec6cd7a8c20b0f23e", null ], - [ "do_always_noconv", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4.html#a42509a8403646922f597cdcabdc38ef5", null ], - [ "do_encoding", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4.html#a584f3779917f65afa4aa8071d8894b6f", null ], - [ "do_in", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4.html#a1ae3c15e6a0c3aeba48e7b6a918fc7a5", null ], - [ "do_length", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4.html#af9dcb615e7f1bcbb0bb180aff0397d33", null ], - [ "do_max_length", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4.html#ad74dfdf543b8f8d33ddcbee19aad5765", null ], - [ "do_out", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4.html#a697a4ea5f8ed436ece30543f1c270f72", null ], - [ "do_unshift", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4.html#af1d8b0540c1c45e793d62a0afb20569c", null ], - [ "implementation", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4.html#a161ecee16181c151d92fbb18c676d3ed", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4.png b/doc/html/classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4.png deleted file mode 100644 index 9138e45dae288ea91f96f75de72acf5f6958cc12..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1872 zcmb`Ic~sI_8^?cy+qj<6%+lU$lwM0GO~Ns^7MDbnluT<(v_%@XHZ@E#$*jpGH6@HO zFbk`nxtn_`=4cvd86Y8|Z>6Xxm^$bPi7$2DdC&Yc=l$co=iKLh@427no_o)|-}9vV zqYvt7Z_)+;Ko9BdfdPOu9F_Lhf~umv-#VCTF!A>d^juwCRmsU2SwhasT$TFP84QMc z`tTOjR4X2XJ`AX!uZ{aU&>jFZMv)%-0}~+<>Qvsmldihpp?2%4X_)!eI}KG=-p3X9 zXF2C4dPXu+klSH*Fh0-|3TG<%pBJ2{Xz13a79IT32@kN3l}6#)S=O~EezvTm@OS^c z8X+Y~;@>s|A8|cY(2i3?cVQ-^O5&@&W>i0I=1189p>XsRiPOs}>kHyW$GzpT%0%h< zITJ~jgW$En%W>ejr2%0+6r!aV`eJYg0Z&fcXmSM?YnC5Mny$nl@N_O-l0w7c?#ebLuF> z-elW3!N-jAMzQS`ouD;@DZTN(j2kotWDk(4>m<#hKQp1Us(~rzp+>i^1QVM_X zd^U$d=kiAe90~6o$2!j|crJ(WCDMeH=VMXs-MgAG?ZvW2Um?P3tox^OvY)VeO;gge z@J@Ff=U96(m|`uP_bSSl%Qx5`zw~~Ij+Gl>&fOI}a0P3nIppCUsltSNoL^Sy8C%L> zQm&fIWWnVWgxQynj5c1kv8{LOQrM0{esXAMGpA8kb;0ojurRW$5d2h4oo17rCQT~> zqVPE-d*YsP-N9*AXv}TfUe1jaO+FkxW!Ke42CsK-1_dYtT%l%*q7E;;3%FRmW8u@) z?McR_#TE(fERkC&9W5n9dQ*op-wmlLL{}{IvhtD&;EG99r~^|V8yei{5L=;mg(7ru zpW<+_6?n`z4E*_+1f!MJkFFXe{3T-#CBjKzzc zsxNx_qUXYkDe1_E)di*(G8VUpbekqq_(h-fFlUYt+St5DmMFedS~;hO8O^Vz@OMS; zW3gx=sv8b>ZcZIjsq-b(uuIt58+=+E*-xS9jhou5cEvBO#}ralH1dXo$-DE0STURa zUTpvm`ylD0caEu?C+sOp^b>ZZ84%XJaUa0i_d&zt_CsAey&IBh$UXQGxzV3ek{>=T~fjGCKHy^LK6-@x< zfLiYQUWhqxRRgK_|Bg;{Ql9trl52n#agWu%fKvfkkZli%&@9hg8uxCk(YG`1G70}) z+mUh9=oB&iPoPHQi@7x9NM#>$b|zi_(3`tEQ~DNp872A;4hbj2rCwY^Dh$E!P#%aP zYPvY{ByF*RIGq-Q&s)L57HJ<;~GULvHnz(d-%}4OSbEUvArLeXwn1!)9^h zvnHu~!k1{)y0q4*dx)pWgeYmmgB4`t%)5;}8FY<%J)z=pzgUfZViFdY))m=K6 z*_9>BM%r>H*lE+kxiHfB777aD@_T$*J2HO@rKQ?w~ z+Xe$3XHRrom7IOt=_~xzdB4q(sQ&sadjuowd`dDm^EDRhF0MH?Qo*YqaqxR2R?e+^ zzB6y`8t3+ndQHb)ojb6b6nngitG^wr{{Hh9X$W@A7A8z90MX)X=xRlaa9t3%z8e2( zx06S}dRheh2a#Z2lMHqF5ufT`LorYza{$AQMxR&N1REPANB)m{HXuZK69TEsP9$#Q z*-)Ou5DoGpBnC=x?hHgf_ba{j^9R}*7iKf*P37eB+OJP)be>pk)eRU1Fd*FzO`yIW w5KWWJle%_m)y=|fR3`W@@Sj=*`NK;I6?JbB(dLAERpk#rdZIll4uq%v8#PawM*si- diff --git a/doc/html/classboost_1_1locale_1_1generic__codecvt__base-members.html b/doc/html/classboost_1_1locale_1_1generic__codecvt__base-members.html deleted file mode 100644 index 85163ca2..00000000 --- a/doc/html/classboost_1_1locale_1_1generic__codecvt__base-members.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::generic_codecvt_base Member List
    -
    - -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1generic__codecvt__base.html b/doc/html/classboost_1_1locale_1_1generic__codecvt__base.html deleted file mode 100644 index 4eeff7ac..00000000 --- a/doc/html/classboost_1_1locale_1_1generic__codecvt__base.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::generic_codecvt_base Class Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::generic_codecvt_base Class Reference
    -
    -
    - -

    A base class that used to define constants for generic_codecvt. - More...

    - -

    #include <boost/locale/generic_codecvt.hpp>

    -
    -Inheritance diagram for boost::locale::generic_codecvt_base:
    -
    -
    - - -boost::locale::generic_codecvt< CharType, CodecvtImpl, 1 > -boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 > -boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 > - -
    - - - - -

    -Public Types

    enum  initial_convertion_state { to_unicode_state, -from_unicode_state - }
     
    -

    Detailed Description

    -

    A base class that used to define constants for generic_codecvt.

    -

    Member Enumeration Documentation

    - -
    -
    -

    Initail state for converting to or from unicode code points, used by initial_state in derived classes

    - - - -
    Enumerator
    to_unicode_state  -

    The state would be used by to_unicode functions.

    -
    from_unicode_state  -

    The state would be used by from_unicode functions.

    -
    - -
    -
    -
    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1generic__codecvt__base.js b/doc/html/classboost_1_1locale_1_1generic__codecvt__base.js deleted file mode 100644 index 128ea151..00000000 --- a/doc/html/classboost_1_1locale_1_1generic__codecvt__base.js +++ /dev/null @@ -1,7 +0,0 @@ -var classboost_1_1locale_1_1generic__codecvt__base = -[ - [ "initial_convertion_state", "classboost_1_1locale_1_1generic__codecvt__base.html#af28c4b64af6cbf2eb01c444e2cdf08c3", [ - [ "to_unicode_state", "classboost_1_1locale_1_1generic__codecvt__base.html#af28c4b64af6cbf2eb01c444e2cdf08c3a07029d87e1c62675db6b857d7b6214ec", null ], - [ "from_unicode_state", "classboost_1_1locale_1_1generic__codecvt__base.html#af28c4b64af6cbf2eb01c444e2cdf08c3a2386c685ac9676370a20d2802184fed1", null ] - ] ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1generic__codecvt__base.png b/doc/html/classboost_1_1locale_1_1generic__codecvt__base.png deleted file mode 100644 index 15896c3d3e90a6e2b60a3ea12f8f329204563f5a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1820 zcmcgtdr;C@6eb_5nbtOIsF^x8HrlSKsim8UZCXaMh%P1h%txA8kPie>G^@ca%M5pI zvobd=wMH^C2~eO|^MQ}@k?tzuGwg?mLP(0h{;Hkb{j>dN@60{-oVnlJd+zt0Gxq`- z6=-I%(F6j4m?8EDghC(&{-BRG)(36Nm7qm%u|y*=dv!V;=+4Y430IyMf!@c-?hwcq4-f(0VMwc_LP<$!=f=I``7M^Cx-GIwsgv>yklqLBO!HG86OOqtqTf_7xdVT|pMa z_z)I$rlyaiB-VRF#fP@xxGufPJ37uW=W0nFU$5AAeF-MhM0q^&dtHH}F4IwVa+Dpv z4eP2^4_EXLCAQrc5o$mTdTdo|QrqBTZ3q?Vr|ov^zWq8ritZB8RAfJ>6&Fa(Kcz3g z<{tKZg6g{`Gz-0~(lm|Xg64f$F?L7WmUqe$+O(nLHlF_FJV*JcDKqgIAkCqU?2KTr z2Q%49B0qjOcd4E`(N#U4{|WS_OP(IA9l0)HC8rll-mQ3M4>fa6u5H339OfdZyB;g;8(POS@XY~wC z%tNwz z+e-k77VGIxn>rTWk8uBwQKWmq0UE{S+T0WJOD{wt?A7>N<~_Sywlp`|J0^&xK4IyLzE9P&jG|dXtcX-x{R0}PP_p5m>JiJrs=k+k0Mv{I zY#Z==V(Rz;u{FGot*~{DBcy2*&aMyr=*7#21y|mb(WV!i{GpPOEVn~Mf-atg?~f$- z)o0^WJo&pxnGc5puWe;TMm3V2$)D(U7;xj{oJ!dSAvU_39XX>fP^Tw#0Hnx%i=JR8 z_>lWql!yUJ_1y3o7Lap{?AtkMFpO+G$WSP~5Y5=dX_Va-rJQ_<(yW%ikw7!EDuLXj zdWIFc0;6WL0DQkHOzsRN4rm1Od*b5_HUdW1Yw6q*p|+6Ccq-*)A0}~DPa2gFp)5aM z1+!}E^sM=iyo_!~yvSmS%Co%c9;lxJ(O4|NaZoPJ5_=;@yIl)5;7T>D3)9bW-LR9T zLL4ACw#SrP(HsK%?tpcVA<|4MK0BHWq;@J`*T`k!NvydN){}l+OokT%Wn!}J3mpWi W8xxm9qlw^G20`pa1<>~#Ir}H36shU} diff --git a/doc/html/classboost_1_1locale_1_1hold__ptr-members.html b/doc/html/classboost_1_1locale_1_1hold__ptr-members.html deleted file mode 100644 index 9bb60df9..00000000 --- a/doc/html/classboost_1_1locale_1_1hold__ptr-members.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::hold_ptr< T > Member List
    -
    - -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1hold__ptr.html b/doc/html/classboost_1_1locale_1_1hold__ptr.html deleted file mode 100644 index 604f0450..00000000 --- a/doc/html/classboost_1_1locale_1_1hold__ptr.html +++ /dev/null @@ -1,420 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::hold_ptr< T > Class Template Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::hold_ptr< T > Class Template Reference
    -
    -
    - -

    a smart pointer similar to std::auto_ptr but it is non-copyable and the underlying object has the same constness as the pointer itself (unlike an ordinary pointer). - More...

    - -

    #include <boost/locale/hold_ptr.hpp>

    - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Public Member Functions

     hold_ptr ()
     
     hold_ptr (T *v)
     
     ~hold_ptr ()
     
    T const * get () const
     
    T * get ()
     
    T const & operator* () const
     
    T & operator* ()
     
    T const * operator-> () const
     
    T * operator-> ()
     
    T * release ()
     
    void reset (T *p=0)
     
    -void swap (hold_ptr &other)
     Swap two pointers.
     
    -

    Detailed Description

    -

    template<typename T>
    -class boost::locale::hold_ptr< T >

    - -

    a smart pointer similar to std::auto_ptr but it is non-copyable and the underlying object has the same constness as the pointer itself (unlike an ordinary pointer).

    -

    Constructor & Destructor Documentation

    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - -
    boost::locale::hold_ptr< T >::hold_ptr ()
    -
    -inline
    -
    -

    Create new empty pointer

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - - -
    boost::locale::hold_ptr< T >::hold_ptr (T * v)
    -
    -inlineexplicit
    -
    -

    Create a pointer that holds v, ownership is transferred to smart pointer

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - -
    boost::locale::hold_ptr< T >::~hold_ptr ()
    -
    -inline
    -
    -

    Destroy smart pointer and the object it owns.

    - -
    -
    -

    Member Function Documentation

    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - -
    T const* boost::locale::hold_ptr< T >::get () const
    -
    -inline
    -
    -

    Get a const pointer to the object

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - -
    T* boost::locale::hold_ptr< T >::get ()
    -
    -inline
    -
    -

    Get a mutable pointer to the object

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - -
    T const& boost::locale::hold_ptr< T >::operator* () const
    -
    -inline
    -
    -

    Get a const reference to the object

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - -
    T& boost::locale::hold_ptr< T >::operator* ()
    -
    -inline
    -
    -

    Get a mutable reference to the object

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - -
    T const* boost::locale::hold_ptr< T >::operator-> () const
    -
    -inline
    -
    -

    Get a const pointer to the object

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - -
    T* boost::locale::hold_ptr< T >::operator-> ()
    -
    -inline
    -
    -

    Get a mutable pointer to the object

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - -
    T* boost::locale::hold_ptr< T >::release ()
    -
    -inline
    -
    -

    Transfer an ownership on the pointer to user

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - - -
    void boost::locale::hold_ptr< T >::reset (T * p = 0)
    -
    -inline
    -
    -

    Set new value to pointer, previous object is destroyed, ownership on new object is transferred

    - -
    -
    -
    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1hold__ptr.js b/doc/html/classboost_1_1locale_1_1hold__ptr.js deleted file mode 100644 index d32ad578..00000000 --- a/doc/html/classboost_1_1locale_1_1hold__ptr.js +++ /dev/null @@ -1,15 +0,0 @@ -var classboost_1_1locale_1_1hold__ptr = -[ - [ "hold_ptr", "classboost_1_1locale_1_1hold__ptr.html#a681ee3d579435f9f2f171b830c402072", null ], - [ "hold_ptr", "classboost_1_1locale_1_1hold__ptr.html#a0007514dc0410ccb16adf01c56874f52", null ], - [ "~hold_ptr", "classboost_1_1locale_1_1hold__ptr.html#aace934e7a8b3f1880d1a06fa85795a48", null ], - [ "get", "classboost_1_1locale_1_1hold__ptr.html#a907a9385c1a15dab07aade7466620bf6", null ], - [ "get", "classboost_1_1locale_1_1hold__ptr.html#a30dbc88eb9fde35198774f3ace282712", null ], - [ "operator*", "classboost_1_1locale_1_1hold__ptr.html#a2c8a19e35ff3c57100b24371854f31b7", null ], - [ "operator*", "classboost_1_1locale_1_1hold__ptr.html#af99f3719b755b787b022253aa6f8d1c0", null ], - [ "operator->", "classboost_1_1locale_1_1hold__ptr.html#a7ae6b54ed5471dd9560904c7ff8a7971", null ], - [ "operator->", "classboost_1_1locale_1_1hold__ptr.html#a474f2619452b63408e1e761f414328f4", null ], - [ "release", "classboost_1_1locale_1_1hold__ptr.html#a2d7b2957c037589b65b2cdd4f61ebe03", null ], - [ "reset", "classboost_1_1locale_1_1hold__ptr.html#acb84b86bb220d663ffe13e5be9cfd72e", null ], - [ "swap", "classboost_1_1locale_1_1hold__ptr.html#a3e2640b5df80f86aeb68a6ee78dfd6f9", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1info-members.html b/doc/html/classboost_1_1locale_1_1info-members.html deleted file mode 100644 index c1b1f9c6..00000000 --- a/doc/html/classboost_1_1locale_1_1info-members.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::info Member List
    -
    -
    - -

    This is the complete list of members for boost::locale::info, including all inherited members.

    - - - - - - - - - - - - - - - - - - - -
    country() const boost::locale::infoinline
    country_property enum valueboost::locale::info
    encoding() const boost::locale::infoinline
    encoding_property enum valueboost::locale::info
    get_integer_property(integer_property v) const =0boost::locale::infoprotectedpure virtual
    get_string_property(string_propery v) const =0boost::locale::infoprotectedpure virtual
    idboost::locale::infostatic
    info(size_t refs=0)boost::locale::infoinline
    integer_property enum nameboost::locale::info
    language() const boost::locale::infoinline
    language_property enum valueboost::locale::info
    name() const boost::locale::infoinline
    name_property enum valueboost::locale::info
    string_propery enum nameboost::locale::info
    utf8() const boost::locale::infoinline
    utf8_property enum valueboost::locale::info
    variant() const boost::locale::infoinline
    variant_property enum valueboost::locale::info
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1info.html b/doc/html/classboost_1_1locale_1_1info.html deleted file mode 100644 index 0fc9fbec..00000000 --- a/doc/html/classboost_1_1locale_1_1info.html +++ /dev/null @@ -1,427 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::info Class Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    - -
    - -

    a facet that holds general information about locale - More...

    - -

    #include <boost/locale/info.hpp>

    -
    -Inheritance diagram for boost::locale::info:
    -
    -
    - - - -
    - - - - - - -

    -Public Types

    enum  string_propery {
    -  language_property, -country_property, -variant_property, -encoding_property, -
    -  name_property -
    - }
     
    enum  integer_property { utf8_property - }
     
    - - - - - - - - - - - - - - - -

    -Public Member Functions

     info (size_t refs=0)
     
    std::string language () const
     
    std::string country () const
     
    std::string variant () const
     
    std::string encoding () const
     
    std::string name () const
     
    bool utf8 () const
     
    - - - - -

    -Static Public Attributes

    -static std::locale::id id
     This member uniquely defines this facet, required by STL.
     
    - - - - - -

    -Protected Member Functions

    virtual std::string get_string_property (string_propery v) const =0
     
    virtual int get_integer_property (integer_property v) const =0
     
    -

    Detailed Description

    -

    a facet that holds general information about locale

    -

    This facet should be always created in order to make all Boost.Locale functions work

    -

    Member Enumeration Documentation

    - -
    -
    -

    Integer information about locale

    - - -
    Enumerator
    utf8_property  -

    Non zero value if uses UTF-8 encoding.

    -
    - -
    -
    - -
    -
    -

    String information about the locale

    - - - - - - -
    Enumerator
    language_property  -

    ISO 639 language id.

    -
    country_property  -

    ISO 3166 country id.

    -
    variant_property  -

    Variant for locale.

    -
    encoding_property  -

    encoding name

    -
    name_property  -

    locale name

    -
    - -
    -
    -

    Constructor & Destructor Documentation

    - -
    -
    - - - - - -
    - - - - - - - - -
    boost::locale::info::info (size_t refs = 0)
    -
    -inline
    -
    -

    Standard facet's constructor

    - -
    -
    -

    Member Function Documentation

    - -
    -
    - - - - - -
    - - - - - - - -
    std::string boost::locale::info::country () const
    -
    -inline
    -
    -

    Get country name

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - -
    std::string boost::locale::info::encoding () const
    -
    -inline
    -
    -

    Get encoding

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    virtual int boost::locale::info::get_integer_property (integer_property v) const
    -
    -protectedpure virtual
    -
    -

    Get integer property by its id v

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    virtual std::string boost::locale::info::get_string_property (string_propery v) const
    -
    -protectedpure virtual
    -
    -

    Get string property by its id v

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - -
    std::string boost::locale::info::language () const
    -
    -inline
    -
    -

    Get language name

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - -
    std::string boost::locale::info::name () const
    -
    -inline
    -
    -

    Get the name of the locale, like en_US.UTF-8

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - -
    bool boost::locale::info::utf8 () const
    -
    -inline
    -
    -

    True if the underlying encoding is UTF-8 (for char streams and strings)

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - -
    std::string boost::locale::info::variant () const
    -
    -inline
    -
    -

    Get locale variant

    - -
    -
    -
    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1info.js b/doc/html/classboost_1_1locale_1_1info.js deleted file mode 100644 index 0bec33aa..00000000 --- a/doc/html/classboost_1_1locale_1_1info.js +++ /dev/null @@ -1,23 +0,0 @@ -var classboost_1_1locale_1_1info = -[ - [ "integer_property", "classboost_1_1locale_1_1info.html#a53d7aa756e1b74f360913a9c9d41bb6d", [ - [ "utf8_property", "classboost_1_1locale_1_1info.html#a53d7aa756e1b74f360913a9c9d41bb6da4d27d781e7da56cb9b94bfd8cdcab5ea", null ] - ] ], - [ "string_propery", "classboost_1_1locale_1_1info.html#ac79e3924b5473862ab15a3290b1c8d15", [ - [ "language_property", "classboost_1_1locale_1_1info.html#ac79e3924b5473862ab15a3290b1c8d15a51e81de8c364b3734f4e2baf1abaddcf", null ], - [ "country_property", "classboost_1_1locale_1_1info.html#ac79e3924b5473862ab15a3290b1c8d15ab59b95580bc749f21c832a70d4b73c61", null ], - [ "variant_property", "classboost_1_1locale_1_1info.html#ac79e3924b5473862ab15a3290b1c8d15a2b38cb5c60ed931f21fc9bec4984900c", null ], - [ "encoding_property", "classboost_1_1locale_1_1info.html#ac79e3924b5473862ab15a3290b1c8d15a1aa0567014d09df594b4a616f20c9b26", null ], - [ "name_property", "classboost_1_1locale_1_1info.html#ac79e3924b5473862ab15a3290b1c8d15ab68bcb824a19b6cfd95ad3c714369369", null ] - ] ], - [ "info", "classboost_1_1locale_1_1info.html#a5545bf33988c859b3b864d4d65178134", null ], - [ "country", "classboost_1_1locale_1_1info.html#a249c20e36da6827a8dc8b12a8342a7dc", null ], - [ "encoding", "classboost_1_1locale_1_1info.html#a1979a5d7b90604c45e856a139c68f5ba", null ], - [ "get_integer_property", "classboost_1_1locale_1_1info.html#aee97062cd9c8a1c6b24a160783865ee2", null ], - [ "get_string_property", "classboost_1_1locale_1_1info.html#a38673d9985abd1c98713b262fadfe584", null ], - [ "language", "classboost_1_1locale_1_1info.html#a7c56b9df3aba82649afc66c06192c7df", null ], - [ "name", "classboost_1_1locale_1_1info.html#af8181bf226f369548c030220932323b9", null ], - [ "utf8", "classboost_1_1locale_1_1info.html#aafbbb5c291f60ce6fc3bc056859ba181", null ], - [ "variant", "classboost_1_1locale_1_1info.html#a2e949e4362c8f0195e2a645fe875f1b4", null ], - [ "id", "classboost_1_1locale_1_1info.html#a01c274323da1367b153952ee1f056572", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1info.png b/doc/html/classboost_1_1locale_1_1info.png deleted file mode 100644 index 0154f2eafb34b25887ccd220fd6d8323aec777ae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 444 zcmeAS@N?(olHy`uVBq!ia0vp^xj-Di!3-o-4snYEDTx4|5ZC|z{{xvX-h3_XKQsZz z0^( zq9JQalitnsON$BYh&*`0I4vzPVUmc;EtQka|Fbvyy%3i?cY9Z3`Hgw?r)%HW;#-h2CeQuaHQm(170i)QAw=sw!r>%INT!`*(WFL`zrdro4{ zoUFoMcPA}PjP(F3TZ4g9?qPwI+*@r^8+S$A_P?HTiy_8Cx`92D`GZ0(gWM9{1I=3) zD<+sR@LyuPkd!9I#wOr$i^1lH^6kbFxmQQm{9gS#UGiS;>%Nd}pQIl92bzC=`sGd4 zpR3zT_B{65mAS*~!?wLnrXBJg3ta#)!BcXlDB4AK6c)I$ztaD0e0sz8~$a??) diff --git a/doc/html/classboost_1_1locale_1_1ios__info-members.html b/doc/html/classboost_1_1locale_1_1ios__info-members.html deleted file mode 100644 index 94140f7e..00000000 --- a/doc/html/classboost_1_1locale_1_1ios__info-members.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::ios_info Member List
    -
    - -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1ios__info.html b/doc/html/classboost_1_1locale_1_1ios__info.html deleted file mode 100644 index 3ca2013f..00000000 --- a/doc/html/classboost_1_1locale_1_1ios__info.html +++ /dev/null @@ -1,453 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::ios_info Class Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::ios_info Class Reference
    -
    -
    - -

    This class holds an external data - beyond existing fmtflags that std::ios_base holds. - More...

    - -

    #include <boost/locale/formatting.hpp>

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Public Member Functions

    void display_flags (uint64_t flags)
     
    void currency_flags (uint64_t flags)
     
    void date_flags (uint64_t flags)
     
    void time_flags (uint64_t flags)
     
    void datetime_flags (uint64_t flags)
     
    void domain_id (int)
     
    void time_zone (std::string const &)
     
    template<typename CharType >
    void date_time_pattern (std::basic_string< CharType > const &str)
     
    uint64_t display_flags () const
     
    uint64_t currency_flags () const
     
    uint64_t date_flags () const
     
    uint64_t time_flags () const
     
    uint64_t datetime_flags () const
     
    int domain_id () const
     
    std::string time_zone () const
     
    template<typename CharType >
    std::basic_string< CharType > date_time_pattern () const
     
    - - - -

    -Static Public Member Functions

    static ios_infoget (std::ios_base &ios)
     
    -

    Detailed Description

    -

    This class holds an external data - beyond existing fmtflags that std::ios_base holds.

    -

    You should almost never create this object directly. Instead, you should access it via ios_info::get(stream_object) static member function. It automatically creates default formatting data for that stream

    -

    Member Function Documentation

    - -
    -
    - - - - - - - - -
    void boost::locale::ios_info::currency_flags (uint64_t flags)
    -
    -

    Set a flags that define how to format currency

    - -
    -
    - -
    -
    - - - - - - - -
    uint64_t boost::locale::ios_info::currency_flags () const
    -
    -

    Get a flags that define how to format currency

    - -
    -
    - -
    -
    - - - - - - - - -
    void boost::locale::ios_info::date_flags (uint64_t flags)
    -
    -

    Set a flags that define how to format date

    - -
    -
    - -
    -
    - - - - - - - -
    uint64_t boost::locale::ios_info::date_flags () const
    -
    -

    Get a flags that define how to format date

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - -
    - - - - - - - - -
    void boost::locale::ios_info::date_time_pattern (std::basic_string< CharType > const & str)
    -
    -inline
    -
    -

    Set date/time pattern (strftime like)

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - -
    - - - - - - - -
    std::basic_string<CharType> boost::locale::ios_info::date_time_pattern () const
    -
    -inline
    -
    -

    Get date/time pattern (strftime like)

    - -
    -
    - -
    -
    - - - - - - - - -
    void boost::locale::ios_info::datetime_flags (uint64_t flags)
    -
    -

    Set a flags that define how to format both date and time

    - -
    -
    - -
    -
    - - - - - - - -
    uint64_t boost::locale::ios_info::datetime_flags () const
    -
    -

    Get a flags that define how to format both date and time

    - -
    -
    - -
    -
    - - - - - - - - -
    void boost::locale::ios_info::display_flags (uint64_t flags)
    -
    -

    Set a flags that define a way for format data like number, spell, currency etc.

    - -
    -
    - -
    -
    - - - - - - - -
    uint64_t boost::locale::ios_info::display_flags () const
    -
    -

    Get a flags that define a way for format data like number, spell, currency etc.

    - -
    -
    - -
    -
    - - - - - - - - -
    void boost::locale::ios_info::domain_id (int )
    -
    -

    Set special message domain identification

    - -
    -
    - -
    -
    - - - - - - - -
    int boost::locale::ios_info::domain_id () const
    -
    -

    Get special message domain identification

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    static ios_info& boost::locale::ios_info::get (std::ios_base & ios)
    -
    -static
    -
    -

    Get ios_info instance for specific stream object

    - -
    -
    - -
    -
    - - - - - - - - -
    void boost::locale::ios_info::time_flags (uint64_t flags)
    -
    -

    Set a flags that define how to format time

    - -
    -
    - -
    -
    - - - - - - - -
    uint64_t boost::locale::ios_info::time_flags () const
    -
    -

    Get a flags that define how to format time

    - -
    -
    - -
    -
    - - - - - - - - -
    void boost::locale::ios_info::time_zone (std::string const & )
    -
    -

    Set time zone for formatting dates and time

    - -
    -
    - -
    -
    - - - - - - - -
    std::string boost::locale::ios_info::time_zone () const
    -
    -

    Get time zone for formatting dates and time

    - -
    -
    -
    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1ios__info.js b/doc/html/classboost_1_1locale_1_1ios__info.js deleted file mode 100644 index 2f69d2cd..00000000 --- a/doc/html/classboost_1_1locale_1_1ios__info.js +++ /dev/null @@ -1,20 +0,0 @@ -var classboost_1_1locale_1_1ios__info = -[ - [ "currency_flags", "classboost_1_1locale_1_1ios__info.html#ad31ea1190ae882f20eea582312c6c573", null ], - [ "currency_flags", "classboost_1_1locale_1_1ios__info.html#ac98b6625dcd7e552e144510192daebb7", null ], - [ "date_flags", "classboost_1_1locale_1_1ios__info.html#aec16372d284296c63ebd282121fa0005", null ], - [ "date_flags", "classboost_1_1locale_1_1ios__info.html#af46aa3529a930f328613533c6626260a", null ], - [ "date_time_pattern", "classboost_1_1locale_1_1ios__info.html#a41bc55992899be3af94de29a8e78edf7", null ], - [ "date_time_pattern", "classboost_1_1locale_1_1ios__info.html#ac0f1059742e489433fd53500c747d30c", null ], - [ "datetime_flags", "classboost_1_1locale_1_1ios__info.html#a6e90b9fcfb723495da5239fc380b0331", null ], - [ "datetime_flags", "classboost_1_1locale_1_1ios__info.html#a5e034268f4b5295ddaae948ffe8a1ec0", null ], - [ "display_flags", "classboost_1_1locale_1_1ios__info.html#a18b06a5cf88e25361bf188f64216edf2", null ], - [ "display_flags", "classboost_1_1locale_1_1ios__info.html#a8b72d7ac5dcd8be72f4bf49b73616db4", null ], - [ "domain_id", "classboost_1_1locale_1_1ios__info.html#a08b1bb49e5806900bfa1901e869497a6", null ], - [ "domain_id", "classboost_1_1locale_1_1ios__info.html#a91fee7df7d3802c65c28c5ef24a10707", null ], - [ "get", "classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b", null ], - [ "time_flags", "classboost_1_1locale_1_1ios__info.html#a06bdad5c9b11e57c16ad623776ce5096", null ], - [ "time_flags", "classboost_1_1locale_1_1ios__info.html#ab8e618c7e292dba53d9334926522031e", null ], - [ "time_zone", "classboost_1_1locale_1_1ios__info.html#a3f140278815b521f1568c52d0a9fea11", null ], - [ "time_zone", "classboost_1_1locale_1_1ios__info.html#a0325f6eca8b939609614fe98e4e9ab42", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1localization__backend-members.html b/doc/html/classboost_1_1locale_1_1localization__backend-members.html deleted file mode 100644 index 6f9fa3bb..00000000 --- a/doc/html/classboost_1_1locale_1_1localization__backend-members.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::localization_backend Member List
    -
    -
    - -

    This is the complete list of members for boost::locale::localization_backend, including all inherited members.

    - - - - - - - -
    clear_options()=0boost::locale::localization_backendpure virtual
    clone() const =0boost::locale::localization_backendpure virtual
    install(std::locale const &base, locale_category_type category, character_facet_type type=nochar_facet)=0boost::locale::localization_backendpure virtual
    localization_backend() (defined in boost::locale::localization_backend)boost::locale::localization_backendinline
    set_option(std::string const &name, std::string const &value)=0boost::locale::localization_backendpure virtual
    ~localization_backend() (defined in boost::locale::localization_backend)boost::locale::localization_backendinlinevirtual
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1localization__backend.html b/doc/html/classboost_1_1locale_1_1localization__backend.html deleted file mode 100644 index 9efed087..00000000 --- a/doc/html/classboost_1_1locale_1_1localization__backend.html +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::localization_backend Class Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::localization_backend Class Referenceabstract
    -
    -
    - -

    this class represents a localization backend that can be used for localizing your application. - More...

    - -

    #include <boost/locale/localization_backend.hpp>

    - - - - - - - - - - -

    -Public Member Functions

    virtual localization_backendclone () const =0
     
    virtual void set_option (std::string const &name, std::string const &value)=0
     
    virtual void clear_options ()=0
     
    virtual std::locale install (std::locale const &base, locale_category_type category, character_facet_type type=nochar_facet)=0
     
    -

    Detailed Description

    -

    this class represents a localization backend that can be used for localizing your application.

    -

    Backends are usually registered inside the localization backends manager and allow transparent support of different backends, so a user can switch the backend by simply linking the application to the correct one.

    -

    Backends may support different tuning options, but these are the default options available to the user for all of them

    -
      -
    1. locale - the name of the locale in POSIX format like en_US.UTF-8
    2. -
    3. use_ansi_encoding - select system locale using ANSI codepages rather then UTF-8 under Windows by default
    4. -
    5. message_path - path to the location of message catalogs (vector of strings)
    6. -
    7. message_application - the name of applications that use message catalogs (vector of strings)
    8. -
    -

    Each backend can be installed with a different default priotiry so when you work with two different backends, you can specify priotiry so this backend will be chosen according to their priority.

    -

    Member Function Documentation

    - -
    -
    - - - - - -
    - - - - - - - -
    virtual void boost::locale::localization_backend::clear_options ()
    -
    -pure virtual
    -
    -

    Clear all options

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - -
    virtual localization_backend* boost::locale::localization_backend::clone () const
    -
    -pure virtual
    -
    -

    Make a polymorphic copy of the backend

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    virtual std::locale boost::locale::localization_backend::install (std::locale const & base,
    locale_category_type category,
    character_facet_type type = nochar_facet 
    )
    -
    -pure virtual
    -
    -

    Create a facet for category category and character type type

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    virtual void boost::locale::localization_backend::set_option (std::string const & name,
    std::string const & value 
    )
    -
    -pure virtual
    -
    -

    Set option for backend, for example "locale" or "encoding"

    - -
    -
    -
    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1localization__backend.js b/doc/html/classboost_1_1locale_1_1localization__backend.js deleted file mode 100644 index 8e27af32..00000000 --- a/doc/html/classboost_1_1locale_1_1localization__backend.js +++ /dev/null @@ -1,9 +0,0 @@ -var classboost_1_1locale_1_1localization__backend = -[ - [ "localization_backend", "classboost_1_1locale_1_1localization__backend.html#aaa6f0c623cd16d37c57682d2daeda96c", null ], - [ "~localization_backend", "classboost_1_1locale_1_1localization__backend.html#a045def1f964f706bf799d0f7720f668e", null ], - [ "clear_options", "classboost_1_1locale_1_1localization__backend.html#a631af306f8652dcf7874b0bb38ab8891", null ], - [ "clone", "classboost_1_1locale_1_1localization__backend.html#ab89828234ca84d4b43f3692bfbb08b25", null ], - [ "install", "classboost_1_1locale_1_1localization__backend.html#a5992c75d469f775ce1d18a0912bfa8a1", null ], - [ "set_option", "classboost_1_1locale_1_1localization__backend.html#a3dc9028eb813001f6cdd8fca937837ef", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1localization__backend__manager-members.html b/doc/html/classboost_1_1locale_1_1localization__backend__manager-members.html deleted file mode 100644 index dbbfcfb6..00000000 --- a/doc/html/classboost_1_1locale_1_1localization__backend__manager-members.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::localization_backend_manager Member List
    -
    - -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1localization__backend__manager.html b/doc/html/classboost_1_1locale_1_1localization__backend__manager.html deleted file mode 100644 index 2ff79e08..00000000 --- a/doc/html/classboost_1_1locale_1_1localization__backend__manager.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::localization_backend_manager Class Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::localization_backend_manager Class Reference
    -
    -
    - -

    Localization backend manager is a class that holds various backend and allows creation of their combination or selection. - More...

    - -

    #include <boost/locale/localization_backend.hpp>

    - - - - - - - - - - - - - - - - - - - - -

    -Public Member Functions

     localization_backend_manager ()
     
     localization_backend_manager (localization_backend_manager const &)
     
    localization_backend_manager
    -const & 
    operator= (localization_backend_manager const &)
     
     ~localization_backend_manager ()
     
    std::auto_ptr
    -< localization_backend
    get () const
     
    void add_backend (std::string const &name, std::auto_ptr< localization_backend > backend)
     
    void remove_all_backends ()
     
    std::vector< std::string > get_all_backends () const
     
    void select (std::string const &backend_name, locale_category_type category=all_categories)
     
    - - - - - -

    -Static Public Member Functions

    static localization_backend_manager global (localization_backend_manager const &)
     
    static localization_backend_manager global ()
     
    -

    Detailed Description

    -

    Localization backend manager is a class that holds various backend and allows creation of their combination or selection.

    -

    Constructor & Destructor Documentation

    - -
    -
    - - - - - - - -
    boost::locale::localization_backend_manager::localization_backend_manager ()
    -
    -
    - -
    -
    - - - - - - - - -
    boost::locale::localization_backend_manager::localization_backend_manager (localization_backend_manager const & )
    -
    -
    - -
    -
    - - - - - - - -
    boost::locale::localization_backend_manager::~localization_backend_manager ()
    -
    -

    Destructor

    - -
    -
    -

    Member Function Documentation

    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void boost::locale::localization_backend_manager::add_backend (std::string const & name,
    std::auto_ptr< localization_backendbackend 
    )
    -
    -

    Add new backend to the manager, each backend should be uniquely defined by its name.

    -

    This library provides: "icu", "posix", "winapi" and "std" backends.

    - -
    -
    - -
    -
    - - - - - - - -
    std::auto_ptr<localization_backend> boost::locale::localization_backend_manager::get () const
    -
    -

    Create new localization backend according to current settings.

    - -
    -
    - -
    -
    - - - - - - - -
    std::vector<std::string> boost::locale::localization_backend_manager::get_all_backends () const
    -
    -

    Get list of all available backends

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    static localization_backend_manager boost::locale::localization_backend_manager::global (localization_backend_manager const & )
    -
    -static
    -
    -

    Set new global backend manager, the old one is returned.

    -

    This function is thread safe

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - -
    static localization_backend_manager boost::locale::localization_backend_manager::global ()
    -
    -static
    -
    -

    Get global backend manager

    -

    This function is thread safe

    - -
    -
    - -
    -
    - - - - - - - - -
    localization_backend_manager const& boost::locale::localization_backend_manager::operator= (localization_backend_manager const & )
    -
    -
    - -
    -
    - - - - - - - -
    void boost::locale::localization_backend_manager::remove_all_backends ()
    -
    -

    Clear backend

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void boost::locale::localization_backend_manager::select (std::string const & backend_name,
    locale_category_type category = all_categories 
    )
    -
    -

    Select specific backend by name for a category category. It allows combining different backends for user preferences.

    - -
    -
    -
    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1localization__backend__manager.js b/doc/html/classboost_1_1locale_1_1localization__backend__manager.js deleted file mode 100644 index 83467c28..00000000 --- a/doc/html/classboost_1_1locale_1_1localization__backend__manager.js +++ /dev/null @@ -1,14 +0,0 @@ -var classboost_1_1locale_1_1localization__backend__manager = -[ - [ "localization_backend_manager", "classboost_1_1locale_1_1localization__backend__manager.html#a0407271db5e7722f901c510474c3581f", null ], - [ "localization_backend_manager", "classboost_1_1locale_1_1localization__backend__manager.html#ad2fb02931f4b202eedc46b3da4a24449", null ], - [ "~localization_backend_manager", "classboost_1_1locale_1_1localization__backend__manager.html#a7e602229ef95ea60834fdea95110bf19", null ], - [ "add_backend", "classboost_1_1locale_1_1localization__backend__manager.html#ae3c6eca5cc54c5161fef3bfd14509c64", null ], - [ "get", "classboost_1_1locale_1_1localization__backend__manager.html#a89d377e934af287573212581cab70dd6", null ], - [ "get_all_backends", "classboost_1_1locale_1_1localization__backend__manager.html#a7bd336cf325b0ee284ab8a07813679c0", null ], - [ "global", "classboost_1_1locale_1_1localization__backend__manager.html#a65649bc161a0cc160da9b40a9ad14e20", null ], - [ "global", "classboost_1_1locale_1_1localization__backend__manager.html#a0935a48d3012f62197f4e92119ee62b5", null ], - [ "operator=", "classboost_1_1locale_1_1localization__backend__manager.html#af506ec1809f2f67c71f590862f63eeab", null ], - [ "remove_all_backends", "classboost_1_1locale_1_1localization__backend__manager.html#a8c9841c83aa85dbf8f61b2e17732499a", null ], - [ "select", "classboost_1_1locale_1_1localization__backend__manager.html#adf33775a09e7a765c3401e769019e915", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1message__format-members.html b/doc/html/classboost_1_1locale_1_1message__format-members.html deleted file mode 100644 index cb900370..00000000 --- a/doc/html/classboost_1_1locale_1_1message__format-members.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::message_format< CharType > Member List
    -
    -
    - -

    This is the complete list of members for boost::locale::message_format< CharType >, including all inherited members.

    - - - - - - - - - -
    char_type typedefboost::locale::message_format< CharType >
    convert(char_type const *msg, string_type &buffer) const =0boost::locale::message_format< CharType >pure virtual
    domain(std::string const &domain) const =0boost::locale::message_format< CharType >pure virtual
    get(int domain_id, char_type const *context, char_type const *id) const =0boost::locale::message_format< CharType >pure virtual
    get(int domain_id, char_type const *context, char_type const *single_id, int n) const =0boost::locale::message_format< CharType >pure virtual
    message_format(size_t refs=0)boost::locale::message_format< CharType >inline
    string_type typedefboost::locale::message_format< CharType >
    ~message_format() (defined in boost::locale::message_format< CharType >)boost::locale::message_format< CharType >inlineprotectedvirtual
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1message__format.html b/doc/html/classboost_1_1locale_1_1message__format.html deleted file mode 100644 index c7dba4cf..00000000 --- a/doc/html/classboost_1_1locale_1_1message__format.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::message_format< CharType > Class Template Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::message_format< CharType > Class Template Referenceabstract
    -
    -
    - -

    This facet provides message formatting abilities. - More...

    - -

    #include <boost/locale/message.hpp>

    -
    -Inheritance diagram for boost::locale::message_format< CharType >:
    -
    -
    - - - -
    - - - - - - -

    -Public Types

    typedef CharType char_type
     
    typedef std::basic_string
    -< CharType > 
    string_type
     
    - - - - - - - - - - - -

    -Public Member Functions

     message_format (size_t refs=0)
     
    virtual char_type const * get (int domain_id, char_type const *context, char_type const *id) const =0
     
    virtual char_type const * get (int domain_id, char_type const *context, char_type const *single_id, int n) const =0
     
    virtual int domain (std::string const &domain) const =0
     
    virtual char_type const * convert (char_type const *msg, string_type &buffer) const =0
     
    -

    Detailed Description

    -

    template<typename CharType>
    -class boost::locale::message_format< CharType >

    - -

    This facet provides message formatting abilities.

    -

    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1message__format.js b/doc/html/classboost_1_1locale_1_1message__format.js deleted file mode 100644 index 994393d1..00000000 --- a/doc/html/classboost_1_1locale_1_1message__format.js +++ /dev/null @@ -1,11 +0,0 @@ -var classboost_1_1locale_1_1message__format = -[ - [ "char_type", "group__message.html#ga83f473295edf14b9e1ae1476b81231bc", null ], - [ "string_type", "group__message.html#gaaa932705310ce196fccc9d672b25518f", null ], - [ "message_format", "group__message.html#gafa681d0df94a35f9d75c16dea099d03e", null ], - [ "~message_format", "group__message.html#ga13350b28d416a59a92eddd22f68e57fc", null ], - [ "convert", "group__message.html#ga3f2c9d7f9a363efa607738083a986251", null ], - [ "domain", "group__message.html#ga73e25178ba9ef91ebe1df0aade4d8ae6", null ], - [ "get", "group__message.html#ga4f65e4e1c3995eb09dd8f8f0e150a012", null ], - [ "get", "group__message.html#gabb35b8a77bca9d28c5d5c266b66fe291", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1message__format.png b/doc/html/classboost_1_1locale_1_1message__format.png deleted file mode 100644 index 3a07a45415c8236e282d855e053e21cd3ffc63e0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 911 zcmeAS@N?(olHy`uVBq!ia0y~yU}Ofe12{mWR?-6zASDst6XN>+|9>F!#hb6C{f8z1 zSzvtNzya3IJMus-M@f)hFauB#2wXiCV#L6}Ea&Os7*fIbcJAG2hYUDc+Gjugd%xoD zGk%VZSFgUZoNHRLmeFY+!_L-@6GvGWt*XjYWHwS@HnKSOptt79zW15m*4Hl=yn1il zs$WZLx(?2JZn1yweYur)?GN8c4qymB_ikzS7KXij|1+(flEeA8p1a=vQJ8<*{-YgT z&zEib>9HszH1;%Kvrt5Neq5W|&7>=1w#C;AkS$c2MT2T<_ng6`z&Y z?U=sfVTxVi@>P#gQ>re1d*$g;X1V`NNzkfQ+?K}{m@fHdo19SUW;biaqPtCw#zlqx zJTcu{&ML*ewQF_exsw&VaF=q=EJNoq$%w_JauJt5emTb%@AUs2yXQyyJN(y7pMIOS zr0URvuYVIvZtj};GS0wq&Ry=U_f^Z5?R2+aDC8DWY52~dDX2%Zl}<%JLZINuUZwao#Ma-L~V^7 zC$_RO*lF7{6cj2l|M?@pB>6{ihYgESg1-tlU>OqFBquOJ5raW9&xr;oVwm9wG6IA? zr1H49=;;YC?AQWP>%;SI!HZz+xziK(Y|UVZIBBxm^lQ%FYabXB!uJ7VWj-`kJ}%&C zZd!Zk_5WYjUzwfTUcBLo`SOcrE4EEPxyEAk=da0sjx?L5KaLeYZ~MrTu|c-kF>;+W z<0c7h)5TlX?kq9h;sdEaF~rz?XLh8okS(yzDrq;&M7aocmb+>lh{lkNcH|MLTT_ z3v@4;b(d`QOKfkn|I&G|B*IhfMum9iw$lfs)_y)Pt8aPvv{)zh-v^c2m)C7r(|Y{( z!ClM#*iKb>f964keZ*bv#rjXbH|2g{y0LMWc-H>zxwp)}zfcc3v_dSs0dl(q!9Lc1oUMPt>ESEDV8m(}0m>%wV14$l#zge+?_c4>m{&Hvk6l bI^F%{8q?=pD=9Mo<{k!5S3j3^P6 - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::period::period_type Member List
    -
    -
    - -

    This is the complete list of members for boost::locale::period::period_type, including all inherited members.

    - - - - - -
    mark() const boost::locale::period::period_typeinline
    operator!=(period_type const &other) const boost::locale::period::period_typeinline
    operator==(period_type const &other) const boost::locale::period::period_typeinline
    period_type(marks::period_mark m=marks::invalid)boost::locale::period::period_typeinline
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1period_1_1period__type.html b/doc/html/classboost_1_1locale_1_1period_1_1period__type.html deleted file mode 100644 index 2c76c000..00000000 --- a/doc/html/classboost_1_1locale_1_1period_1_1period__type.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::period::period_type Class Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::period::period_type Class Reference
    -
    -
    - -

    This class holds a type that represents certain period of time like year, hour, second and so on. - More...

    - -

    #include <boost/locale/date_time_facet.hpp>

    - - - - - - - - - - -

    -Public Member Functions

     period_type (marks::period_mark m=marks::invalid)
     
    marks::period_mark mark () const
     
    bool operator== (period_type const &other) const
     
    bool operator!= (period_type const &other) const
     
    -

    Detailed Description

    -

    This class holds a type that represents certain period of time like year, hour, second and so on.

    -

    It can be created from either marks::period_mark type or by using shortcuts in period namespace - calling functions like period::year(), period::hour() and so on.

    -

    Basically it represents the same object as enum marks::period_mark but allows to provide save operator overloading that would not collide with casing of enum to numeric values.

    -

    Constructor & Destructor Documentation

    - -
    -
    - - - - - -
    - - - - - - - - -
    boost::locale::period::period_type::period_type (marks::period_mark m = marks::invalid)
    -
    -inline
    -
    -

    Create a period of specific type, default is invalid.

    - -
    -
    -

    Member Function Documentation

    - -
    -
    - - - - - -
    - - - - - - - -
    marks::period_mark boost::locale::period::period_type::mark () const
    -
    -inline
    -
    -

    Get the value of marks::period_mark it was created with.

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    bool boost::locale::period::period_type::operator!= (period_type const & other) const
    -
    -inline
    -
    -

    Check if two periods are different

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    bool boost::locale::period::period_type::operator== (period_type const & other) const
    -
    -inline
    -
    -

    Check if two periods are the same

    - -
    -
    -
    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1period_1_1period__type.js b/doc/html/classboost_1_1locale_1_1period_1_1period__type.js deleted file mode 100644 index 8ca8f55d..00000000 --- a/doc/html/classboost_1_1locale_1_1period_1_1period__type.js +++ /dev/null @@ -1,7 +0,0 @@ -var classboost_1_1locale_1_1period_1_1period__type = -[ - [ "period_type", "classboost_1_1locale_1_1period_1_1period__type.html#a8abba35d5073884677ce69ec3ba3eba7", null ], - [ "mark", "classboost_1_1locale_1_1period_1_1period__type.html#ad81b414edc6ea88accc5dad5d17a351b", null ], - [ "operator!=", "classboost_1_1locale_1_1period_1_1period__type.html#a0156ce442f97fd86fa7c702e4d24031a", null ], - [ "operator==", "classboost_1_1locale_1_1period_1_1period__type.html#a53ac6fdbaa7ae1b6d90e67bb5aadcce0", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1utf8__codecvt-members.html b/doc/html/classboost_1_1locale_1_1utf8__codecvt-members.html deleted file mode 100644 index 9de39638..00000000 --- a/doc/html/classboost_1_1locale_1_1utf8__codecvt-members.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::utf8_codecvt< CharType > Member List
    -
    -
    - -

    This is the complete list of members for boost::locale::utf8_codecvt< CharType >, including all inherited members.

    - - - - - - -
    from_unicode(state_type &, utf::code_point u, char *begin, char const *end) (defined in boost::locale::utf8_codecvt< CharType >)boost::locale::utf8_codecvt< CharType >inlinestatic
    initial_state(generic_codecvt_base::initial_convertion_state) (defined in boost::locale::utf8_codecvt< CharType >)boost::locale::utf8_codecvt< CharType >inlinestatic
    max_encoding_length() (defined in boost::locale::utf8_codecvt< CharType >)boost::locale::utf8_codecvt< CharType >inlinestatic
    to_unicode(state_type &, char const *&begin, char const *end) (defined in boost::locale::utf8_codecvt< CharType >)boost::locale::utf8_codecvt< CharType >inlinestatic
    utf8_codecvt(size_t refs=0) (defined in boost::locale::utf8_codecvt< CharType >)boost::locale::utf8_codecvt< CharType >inline
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1utf8__codecvt.html b/doc/html/classboost_1_1locale_1_1utf8__codecvt.html deleted file mode 100644 index be6db689..00000000 --- a/doc/html/classboost_1_1locale_1_1utf8__codecvt.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::utf8_codecvt< CharType > Class Template Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::utf8_codecvt< CharType > Class Template Reference
    -
    -
    - -

    Geneneric utf8 codecvt facet, it allows to convert UTF-8 strings to UTF-16 and UTF-32 using wchar_t, char32_t and char16_t. - More...

    - -

    #include <boost/locale/utf8_codecvt.hpp>

    -
    -Inheritance diagram for boost::locale::utf8_codecvt< CharType >:
    -
    -
    - - -boost::locale::generic_codecvt< CharType, utf8_codecvt< CharType > > - -
    - - - - -

    -Classes

    struct  state_type
     
    - - - -

    -Public Member Functions

    utf8_codecvt (size_t refs=0)
     
    - - - - - - - - - -

    -Static Public Member Functions

    -static int max_encoding_length ()
     
    -static state_type initial_state (generic_codecvt_base::initial_convertion_state)
     
    -static utf::code_point to_unicode (state_type &, char const *&begin, char const *end)
     
    -static utf::code_point from_unicode (state_type &, utf::code_point u, char *begin, char const *end)
     
    -

    Detailed Description

    -

    template<typename CharType>
    -class boost::locale::utf8_codecvt< CharType >

    - -

    Geneneric utf8 codecvt facet, it allows to convert UTF-8 strings to UTF-16 and UTF-32 using wchar_t, char32_t and char16_t.

    -

    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1utf8__codecvt.js b/doc/html/classboost_1_1locale_1_1utf8__codecvt.js deleted file mode 100644 index 59db2e40..00000000 --- a/doc/html/classboost_1_1locale_1_1utf8__codecvt.js +++ /dev/null @@ -1,9 +0,0 @@ -var classboost_1_1locale_1_1utf8__codecvt = -[ - [ "state_type", "structboost_1_1locale_1_1utf8__codecvt_1_1state__type.html", null ], - [ "utf8_codecvt", "classboost_1_1locale_1_1utf8__codecvt.html#a650f2dd476003f783e586f8e375601a7", null ], - [ "from_unicode", "classboost_1_1locale_1_1utf8__codecvt.html#a6a5baf5525ad5a147b8ee5442d6eee9b", null ], - [ "initial_state", "classboost_1_1locale_1_1utf8__codecvt.html#a009f04bfc57d0bedbb1ba5e1236f81f0", null ], - [ "max_encoding_length", "classboost_1_1locale_1_1utf8__codecvt.html#a99625ff09e266b781fd5ec0b27c98d4f", null ], - [ "to_unicode", "classboost_1_1locale_1_1utf8__codecvt.html#ab58e38a52e88c431f3ea5b9cc00f7f93", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1locale_1_1utf8__codecvt.png b/doc/html/classboost_1_1locale_1_1utf8__codecvt.png deleted file mode 100644 index 03913fc08231cbd79f03046da5e09d81077a0dd3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1177 zcmeAS@N?(olHy`uVBq!ia0y~yU|b1g2XHV0$te<5JU~h!z$e7@|Ns9$=8HF9OZyK^ z0J6aNz<~p-op&?orNl|__1y*5|e@k!I-) zxAIPXITj+k;ALs0Oa%XA{eA7G2fi%LVki*2K11qxNoAyl^zkrbuGfkCeoAJ~zw@$G zDm?WR>&&$`_SG_9=RWX!$C_WczG2bl{#?1vy<9NkmjC^-Lp!_AHm}?Nb#;93+X?Fm zOXsir__xeQ_v_i*m-gmcuX#paxbwzr*|Ls%Q#fC=mGrKb_WjAaW%A#=mii3mfdFQVjv`h6*Yg?VVIr-K4_raI1#nkqwe}3n? zxw7idHzTVJx!0RsGH=;?uAlLn!PC6DW%s<*XYVs_$lh^8#G&R)63dQR_KC0d?yt8x zdG{C7ju|n*4C)(H1s)V(i^#ZTUYe?!OQ)oNmUlQG=BQSE<_WMIVeoYIb6Mw<&;$UI CAT)OX diff --git a/doc/html/classboost_1_1locale_1_1util_1_1base__converter-members.html b/doc/html/classboost_1_1locale_1_1util_1_1base__converter-members.html deleted file mode 100644 index a29a49e7..00000000 --- a/doc/html/classboost_1_1locale_1_1util_1_1base__converter-members.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - -Boost.Locale: Member List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::locale::util::base_converter Member List
    -
    -
    - -

    This is the complete list of members for boost::locale::util::base_converter, including all inherited members.

    - - - - - - - - - -
    clone() const boost::locale::util::base_converterinlinevirtual
    from_unicode(uint32_t u, char *begin, char const *end)boost::locale::util::base_converterinlinevirtual
    illegalboost::locale::util::base_converterstatic
    incompleteboost::locale::util::base_converterstatic
    is_thread_safe() const boost::locale::util::base_converterinlinevirtual
    max_len() const boost::locale::util::base_converterinlinevirtual
    to_unicode(char const *&begin, char const *end)boost::locale::util::base_converterinlinevirtual
    ~base_converter() (defined in boost::locale::util::base_converter)boost::locale::util::base_converterinlinevirtual
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1util_1_1base__converter.html b/doc/html/classboost_1_1locale_1_1util_1_1base__converter.html deleted file mode 100644 index 2718df78..00000000 --- a/doc/html/classboost_1_1locale_1_1util_1_1base__converter.html +++ /dev/null @@ -1,323 +0,0 @@ - - - - - - -Boost.Locale: boost::locale::util::base_converter Class Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    boost::locale::util::base_converter Class Reference
    -
    -
    - -

    This class represent a simple stateless converter from UCS-4 and to UCS-4 for each single code point. - More...

    - -

    #include <boost/locale/util.hpp>

    - - - - - - - - - - - - -

    -Public Member Functions

    virtual int max_len () const
     
    virtual bool is_thread_safe () const
     
    virtual base_converterclone () const
     
    virtual uint32_t to_unicode (char const *&begin, char const *end)
     
    virtual uint32_t from_unicode (uint32_t u, char *begin, char const *end)
     
    - - - - - -

    -Static Public Attributes

    static const uint32_t illegal =utf::illegal
     
    static const uint32_t incomplete =utf::incomplete
     
    -

    Detailed Description

    -

    This class represent a simple stateless converter from UCS-4 and to UCS-4 for each single code point.

    -

    This class is used for creation of std::codecvt facet for converting utf-16/utf-32 encoding to encoding supported by this converter

    -

    Please note, this converter should be fully stateless. Fully stateless means it should never assume that it is called in any specific order on the text. Even if the encoding itself seems to be stateless like windows-1255 or shift-jis, some encoders (most notably iconv) can actually compose several code-point into one or decompose them in case composite characters are found. So be very careful when implementing these converters for certain character set.

    -

    Member Function Documentation

    - -
    -
    - - - - - -
    - - - - - - - -
    virtual base_converter* boost::locale::util::base_converter::clone () const
    -
    -inlinevirtual
    -
    -

    Create a polymorphic copy of this object, usually called only if is_thread_safe() return false

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    virtual uint32_t boost::locale::util::base_converter::from_unicode (uint32_t u,
    char * begin,
    char const * end 
    )
    -
    -inlinevirtual
    -
    -

    Convert a single code-point u into encoding and store it in [begin,end) range.

    -

    If u is invalid Unicode code-point, or it can not be mapped correctly to represented character set, illegal should be returned

    -

    If u can be converted to a sequence of bytes c1, ... , cN (1<= N <= max_len() ) then

    -
      -
    1. If end - begin >= N, c1, ... cN are written starting at begin and N is returned
    2. -
    3. If end - begin < N, incomplete is returned, it is unspecified what would be stored in bytes in range [begin,end)
    4. -
    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - -
    virtual bool boost::locale::util::base_converter::is_thread_safe () const
    -
    -inlinevirtual
    -
    -

    Returns true if calling the functions from_unicode, to_unicode, and max_len is thread safe.

    -

    Rule of thumb: if this class' implementation uses simple tables that are unchanged or is purely algorithmic like UTF-8 - so it does not share any mutable bit for independent to_unicode, from_unicode calls, you may set it to true, otherwise, for example if you use iconv_t descriptor or UConverter as conversion object return false, and this object will be cloned for each use.

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - -
    virtual int boost::locale::util::base_converter::max_len () const
    -
    -inlinevirtual
    -
    -

    Return the maximal length that one Unicode code-point can be converted to, for example for UTF-8 it is 4, for Shift-JIS it is 2 and ISO-8859-1 is 1

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    virtual uint32_t boost::locale::util::base_converter::to_unicode (char const *& begin,
    char const * end 
    )
    -
    -inlinevirtual
    -
    -

    Convert a single character starting at begin and ending at most at end to Unicode code-point.

    -

    if valid input sequence found in [begin,code_point_end) such as begin < code_point_end && code_point_end <= end it is converted to its Unicode code point equivalent, begin is set to code_point_end

    -

    if incomplete input sequence found in [begin,end), i.e. there my be such code_point_end that code_point_end > end and [begin, code_point_end) would be valid input sequence, then incomplete is returned begin stays unchanged, for example for UTF-8 conversion a *begin = 0xc2, begin +1 = end is such situation.

    -

    if invalid input sequence found, i.e. there is a sequence [begin, code_point_end) such as code_point_end <= end that is illegal for this encoding, illegal is returned and begin stays unchanged. For example if *begin = 0xFF and begin < end for UTF-8, then illegal is returned.

    - -
    -
    -

    Member Data Documentation

    - -
    -
    - - - - - -
    - - - - -
    const uint32_t boost::locale::util::base_converter::illegal =utf::illegal
    -
    -static
    -
    -

    This value should be returned when an illegal input sequence or code-point is observed: For example if a UCS-32 code-point is in the range reserved for UTF-16 surrogates or an invalid UTF-8 sequence is found

    - -
    -
    - -
    -
    - - - - - -
    - - - - -
    const uint32_t boost::locale::util::base_converter::incomplete =utf::incomplete
    -
    -static
    -
    -

    This value is returned in following cases: The of incomplete input sequence was found or insufficient output buffer was provided so complete output could not be written.

    - -
    -
    -
    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classboost_1_1locale_1_1util_1_1base__converter.js b/doc/html/classboost_1_1locale_1_1util_1_1base__converter.js deleted file mode 100644 index 1ce12b95..00000000 --- a/doc/html/classboost_1_1locale_1_1util_1_1base__converter.js +++ /dev/null @@ -1,11 +0,0 @@ -var classboost_1_1locale_1_1util_1_1base__converter = -[ - [ "~base_converter", "classboost_1_1locale_1_1util_1_1base__converter.html#aeae09b0913e18d1aa12b7c66b77a3620", null ], - [ "clone", "classboost_1_1locale_1_1util_1_1base__converter.html#a702b31840be6f5c540cd22ac75cb2349", null ], - [ "from_unicode", "classboost_1_1locale_1_1util_1_1base__converter.html#afeecf1ee2699c26960cbf2d7d6d71d41", null ], - [ "is_thread_safe", "classboost_1_1locale_1_1util_1_1base__converter.html#aadcc2c1a767f9d24972c6995e81c1315", null ], - [ "max_len", "classboost_1_1locale_1_1util_1_1base__converter.html#ab2332b78e3e0c0b94ea3f6dafd123d60", null ], - [ "to_unicode", "classboost_1_1locale_1_1util_1_1base__converter.html#a27181b314e09f62ae9ea8fcd30d4e7c4", null ], - [ "illegal", "classboost_1_1locale_1_1util_1_1base__converter.html#aa02e2dfd8ddc2b40a8705c6ea7fa8d48", null ], - [ "incomplete", "classboost_1_1locale_1_1util_1_1base__converter.html#aa78dd2bae2783e31a00849a4e74aeb1e", null ] -]; \ No newline at end of file diff --git a/doc/html/classboost_1_1shared__ptr.html b/doc/html/classboost_1_1shared__ptr.html deleted file mode 100644 index 993b3bdd..00000000 --- a/doc/html/classboost_1_1shared__ptr.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - -Boost.Locale: boost::shared_ptr< Type > Class Template Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost::shared_ptr< Type > Class Template Reference
    -
    -
    -
    The documentation for this class was generated from the following file: -
    -
    - - - - - - diff --git a/doc/html/classes.html b/doc/html/classes.html deleted file mode 100644 index 56562f20..00000000 --- a/doc/html/classes.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - -Boost.Locale: Class Index - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    Class Index
    -
    -
    -
    A | B | C | D | G | H | I | L | M | P | S | U
    - - - - - - - - - - - - - - - - - -
      a  
    -
    calendar_facet (boost::locale)   messages_info::domain (boost::locale::gnu_gettext)   invalid_charset_error (boost::locale::conv)   
      s  
    -
    collator (boost::locale)   
      g  
    -
    ios_info (boost::locale)   
    abstract_calendar (boost::locale)   collator_base (boost::locale)   
      l  
    -
    segment (boost::locale::boundary)   
      b  
    -
    comparator (boost::locale)   generator (boost::locale)   segment_index (boost::locale::boundary)   
    conversion_error (boost::locale::conv)   generic_codecvt (boost::locale)   localization_backend (boost::locale)   shared_ptr (boost)   
    base_converter (boost::locale::util)   converter (boost::locale)   generic_codecvt< CharType, CodecvtImpl, 1 > (boost::locale)   localization_backend_manager (boost::locale)   utf8_codecvt::state_type (boost::locale)   
    basic_format (boost::locale)   converter_base (boost::locale)   generic_codecvt< CharType, CodecvtImpl, 2 > (boost::locale)   
      m  
    -
      u  
    -
    basic_message (boost::locale)   
      d  
    -
    generic_codecvt< CharType, CodecvtImpl, 4 > (boost::locale)   
    boundary_indexing (boost::locale::boundary)   generic_codecvt_base (boost::locale)   message_format (boost::locale)   utf8_codecvt (boost::locale)   
    boundary_point (boost::locale::boundary)   date_time (boost::locale)   
      h  
    -
    messages_info (boost::locale::gnu_gettext)   utf_traits (boost::locale::utf)   
    boundary_point_index (boost::locale::boundary)   date_time_duration (boost::locale)   
      p  
    -
    break_info (boost::locale::boundary)   date_time_error (boost::locale)   hold_ptr (boost::locale)   
      c  
    -
    date_time_period (boost::locale)   
      i  
    -
    period_type (boost::locale::period)   
    date_time_period_set (boost::locale)   posix_time (boost::locale)   
    calendar (boost::locale)   info (boost::locale)   
    -
    A | B | C | D | G | H | I | L | M | P | S | U
    -
    -
    - - - - - - diff --git a/doc/html/closed.png b/doc/html/closed.png deleted file mode 100644 index 98cc2c909da37a6df914fbf67780eebd99c597f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 132 zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>1|%O$WD@{V-kvUwAr*{o@8{^CZMh(5KoB^r_<4^zF@3)Cp&&t3hdujKf f*?bjBoY!V+E))@{xMcbjXe@)LtDnm{r-UW|*e5JT diff --git a/doc/html/collate_8cpp-example.html b/doc/html/collate_8cpp-example.html deleted file mode 100644 index b9724d5d..00000000 --- a/doc/html/collate_8cpp-example.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - -Boost.Locale: collate.cpp - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    collate.cpp
    -
    -
    -

    Example of using collation functions

    -
    //
    -
    // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
    -
    //
    -
    // Distributed under the Boost Software License, Version 1.0. (See
    -
    // accompanying file LICENSE_1_0.txt or copy at
    -
    // http://www.boost.org/LICENSE_1_0.txt)
    -
    //
    -
    #include <iostream>
    -
    #include <string>
    -
    #include <set>
    -
    -
    #include <boost/locale.hpp>
    -
    -
    using namespace std;
    -
    using namespace boost::locale;
    -
    -
    int main()
    -
    {
    -
    generator gen;
    -
    std::locale::global(gen(""));
    -
    -
    typedef std::set<std::string,std::locale> set_type;
    -
    set_type all_strings;
    -
    -
    while(!cin.eof()) {
    -
    std::string tmp;
    -
    getline(cin,tmp);
    -
    all_strings.insert(tmp);
    -
    }
    -
    for(set_type::iterator p=all_strings.begin();p!=all_strings.end();++p) {
    -
    cout<<*p<<endl;
    -
    }
    -
    -
    }
    -
    // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
    -
    -
    - - - - - - diff --git a/doc/html/collation.html b/doc/html/collation.html deleted file mode 100644 index 421734c3..00000000 --- a/doc/html/collation.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - -Boost.Locale: Collation - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    Collation
    -
    -
    -

    Boost.Locale provides a collator class, derived from std::collate, that adds support for primary, secondary, tertiary, quaternary and identical comparison levels. They can be approximately defined as:

    -
      -
    1. Primary – ignore accents and character case, comparing base letters only. For example "facade" and "Façade" are the same.
    2. -
    3. Secondary – ignore character case but consider accents. "facade" and "façade" are different but "Façade" and "façade" are the same.
    4. -
    5. Tertiary – consider both case and accents: "Façade" and "façade" are different. Ignore punctuation.
    6. -
    7. Quaternary – consider all case, accents, and punctuation. The words must be identical in terms of Unicode representation.
    8. -
    9. Identical – as quaternary, but compare code points as well.
    10. -
    -

    There are two ways of using the collator facet: directly, by calling its member functions compare, transform and hash, or indirectly by using the comparator template class in STL algorithms.

    -

    For example:

    -
    wstring a=L"Façade", b=L"facade";
    -
    bool eq = 0 == use_facet<collator<wchar_t> >(loc).compare(collator_base::secondary,a,b);
    -
    wcout << a <<L" and "<<b<<L" are " << (eq ? L"identical" : L"different")<<endl;
    -

    std::locale is designed to be useful as a comparison class in STL collections and algorithms. To get similar functionality with comparison levels, you must use the comparator class.

    -
    std::map<std::string,std::string,comparator<char,collator_base::secondary> > strings;
    -
    // Now strings uses the default system locale for string comparison
    -

    You can also set a specific locale or level when creating and using the comparator class:

    -
    comparator<char> comp(some_locale,some_level);
    -
    std::map<std::string,std::string,comparator<char> > strings(comp);
    -
    -
    - - - - - - diff --git a/doc/html/collator_8hpp_source.html b/doc/html/collator_8hpp_source.html deleted file mode 100644 index a5a20dab..00000000 --- a/doc/html/collator_8hpp_source.html +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - -Boost.Locale: boost/locale/collator.hpp Source File - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    collator.hpp
    -
    -
    -
    1 //
    -
    2 // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
    -
    3 //
    -
    4 // Distributed under the Boost Software License, Version 1.0. (See
    -
    5 // accompanying file LICENSE_1_0.txt or copy at
    -
    6 // http://www.boost.org/LICENSE_1_0.txt)
    -
    7 //
    -
    8 #ifndef BOOST_LOCALE_COLLATOR_HPP_INCLUDED
    -
    9 #define BOOST_LOCALE_COLLATOR_HPP_INCLUDED
    -
    10 
    -
    11 #include <boost/locale/config.hpp>
    -
    12 #ifdef BOOST_MSVC
    -
    13 # pragma warning(push)
    -
    14 # pragma warning(disable : 4275 4251 4231 4660)
    -
    15 #endif
    -
    16 #include <locale>
    -
    17 
    -
    18 
    -
    19 namespace boost {
    -
    20 namespace locale {
    -
    21 
    -
    22  class info;
    -
    23 
    -
    30 
    -
    34 
    -
    35  class collator_base {
    -
    36  public:
    -
    40  typedef enum {
    -
    41  primary = 0,
    -
    42  secondary = 1,
    -
    43  tertiary = 2,
    -
    44  quaternary = 3,
    -
    45  identical = 4
    -
    46  } level_type;
    -
    47  };
    -
    48 
    -
    55  template<typename CharType>
    -
    56  class collator :
    -
    57  public std::collate<CharType>,
    -
    58  public collator_base
    -
    59  {
    -
    60  public:
    -
    64  typedef CharType char_type;
    -
    68  typedef std::basic_string<CharType> string_type;
    -
    69 
    -
    70 
    -
    77  int compare(level_type level,
    -
    78  char_type const *b1,char_type const *e1,
    -
    79  char_type const *b2,char_type const *e2) const
    -
    80  {
    -
    81  return do_compare(level,b1,e1,b2,e2);
    -
    82  }
    -
    94  string_type transform(level_type level,char_type const *b,char_type const *e) const
    -
    95  {
    -
    96  return do_transform(level,b,e);
    -
    97  }
    -
    98 
    -
    106  long hash(level_type level,char_type const *b,char_type const *e) const
    -
    107  {
    -
    108  return do_hash(level,b,e);
    -
    109  }
    -
    110 
    -
    118  int compare(level_type level,string_type const &l,string_type const &r) const
    -
    119  {
    -
    120  return do_compare(level,l.data(),l.data()+l.size(),r.data(),r.data()+r.size());
    -
    121  }
    -
    122 
    -
    128 
    -
    129  long hash(level_type level,string_type const &s) const
    -
    130  {
    -
    131  return do_hash(level,s.data(),s.data()+s.size());
    -
    132  }
    - -
    143  {
    -
    144  return do_transform(level,s.data(),s.data()+s.size());
    -
    145  }
    -
    146 
    -
    147  protected:
    -
    148 
    -
    152  collator(size_t refs = 0) : std::collate<CharType>(refs)
    -
    153  {
    -
    154  }
    -
    155 
    -
    156  virtual ~collator()
    -
    157  {
    -
    158  }
    -
    159 
    -
    164  virtual int do_compare( char_type const *b1,char_type const *e1,
    -
    165  char_type const *b2,char_type const *e2) const
    -
    166  {
    -
    167  return do_compare(identical,b1,e1,b2,e2);
    -
    168  }
    -
    173  virtual string_type do_transform(char_type const *b,char_type const *e) const
    -
    174  {
    -
    175  return do_transform(identical,b,e);
    -
    176  }
    -
    181  virtual long do_hash(char_type const *b,char_type const *e) const
    -
    182  {
    -
    183  return do_hash(identical,b,e);
    -
    184  }
    -
    185 
    -
    189  virtual int do_compare( level_type level,
    -
    190  char_type const *b1,char_type const *e1,
    -
    191  char_type const *b2,char_type const *e2) const = 0;
    -
    195  virtual string_type do_transform(level_type level,char_type const *b,char_type const *e) const = 0;
    -
    199  virtual long do_hash(level_type level,char_type const *b,char_type const *e) const = 0;
    -
    200 
    -
    201 
    -
    202  };
    -
    203 
    -
    216  template<typename CharType,collator_base::level_type default_level = collator_base::identical>
    -
    217  struct comparator
    -
    218  {
    -
    219  public:
    -
    225  comparator(std::locale const &l=std::locale(),collator_base::level_type level=default_level) :
    -
    226  locale_(l),
    -
    227  level_(level)
    -
    228  {
    -
    229  }
    -
    230 
    -
    234  bool operator()(std::basic_string<CharType> const &left,std::basic_string<CharType> const &right) const
    -
    235  {
    -
    236  return std::use_facet<collator<CharType> >(locale_).compare(level_,left,right) < 0;
    -
    237  }
    -
    238  private:
    -
    239  std::locale locale_;
    - -
    241  };
    -
    242 
    -
    243 
    -
    247 
    -
    248  } // locale
    -
    249 } // boost
    -
    250 
    -
    251 #ifdef BOOST_MSVC
    -
    252 #pragma warning(pop)
    -
    253 #endif
    -
    254 
    -
    255 
    -
    256 #endif
    -
    257 // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
    -
    a facet that holds general information about locale
    Definition: info.hpp:27
    -
    1st collation level: base letters
    Definition: collator.hpp:41
    -
    2nd collation level: letters and accents
    Definition: collator.hpp:42
    -
    virtual int do_compare(char_type const *b1, char_type const *e1, char_type const *b2, char_type const *e2) const
    Definition: collator.hpp:164
    -
    level_type
    Definition: collator.hpp:40
    -
    CharType char_type
    Definition: collator.hpp:64
    -
    identical collation level: include code-point comparison
    Definition: collator.hpp:45
    -
    long hash(level_type level, char_type const *b, char_type const *e) const
    Definition: collator.hpp:106
    -
    int compare(level_type level, char_type const *b1, char_type const *e1, char_type const *b2, char_type const *e2) const
    Definition: collator.hpp:77
    -
    std::basic_string< CharType > string_type
    Definition: collator.hpp:68
    -
    a base class that includes collation level flags
    Definition: collator.hpp:35
    -
    collator(size_t refs=0)
    Definition: collator.hpp:152
    -
    virtual string_type do_transform(char_type const *b, char_type const *e) const
    Definition: collator.hpp:173
    -
    long hash(level_type level, string_type const &s) const
    Definition: collator.hpp:129
    -
    int compare(level_type level, string_type const &l, string_type const &r) const
    Definition: collator.hpp:118
    -
    string_type transform(level_type level, char_type const *b, char_type const *e) const
    Definition: collator.hpp:94
    -
    bool operator()(std::basic_string< CharType > const &left, std::basic_string< CharType > const &right) const
    Definition: collator.hpp:234
    -
    4th collation level: letters, accents, case and punctuation
    Definition: collator.hpp:44
    -
    Collation facet.
    Definition: collator.hpp:56
    -
    string_type transform(level_type level, string_type const &s) const
    Definition: collator.hpp:142
    -
    virtual long do_hash(char_type const *b, char_type const *e) const
    Definition: collator.hpp:181
    -
    3rd collation level: letters, accents and case
    Definition: collator.hpp:43
    -
    comparator(std::locale const &l=std::locale(), collator_base::level_type level=default_level)
    Definition: collator.hpp:225
    -
    This class can be used in STL algorithms and containers for comparison of strings with a level other ...
    Definition: collator.hpp:217
    -
    -
    - - - - - - diff --git a/doc/html/config_8hpp_source.html b/doc/html/config_8hpp_source.html deleted file mode 100644 index 8a7cedf2..00000000 --- a/doc/html/config_8hpp_source.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - -Boost.Locale: boost/locale/config.hpp Source File - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    config.hpp
    -
    -
    -
    1 //
    -
    2 // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
    -
    3 //
    -
    4 // Distributed under the Boost Software License, Version 1.0. (See
    -
    5 // accompanying file LICENSE_1_0.txt or copy at
    -
    6 // http://www.boost.org/LICENSE_1_0.txt)
    -
    7 //
    -
    8 #ifndef BOOST_LOCALE_CONFIG_HPP_INCLUDED
    -
    9 #define BOOST_LOCALE_CONFIG_HPP_INCLUDED
    -
    10 
    -
    11 #include <boost/locale/definitions.hpp>
    -
    12 
    -
    13 //
    -
    14 // Automatically link to the correct build variant where possible.
    -
    15 //
    -
    16 #if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_LOCALE_NO_LIB) && !defined(BOOST_LOCALE_SOURCE)
    -
    17 //
    -
    18 // Set the name of our library, this will get undef'ed by auto_link.hpp
    -
    19 // once it's done with it:
    -
    20 //
    -
    21 #define BOOST_LIB_NAME boost_locale
    -
    22 //
    -
    23 // If we're importing code from a dll, then tell auto_link.hpp about it:
    -
    24 //
    -
    25 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_LOCALE_DYN_LINK)
    -
    26 # define BOOST_DYN_LINK
    -
    27 #endif
    -
    28 //
    -
    29 // And include the header that does the work:
    -
    30 //
    -
    31 #include <boost/config/auto_link.hpp>
    -
    32 #endif // auto-linking disabled
    -
    33 
    -
    34 
    -
    35 #endif // boost/locale/config.hpp
    -
    36 // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
    -
    37 
    -
    -
    - - - - - - diff --git a/doc/html/conversion_8hpp_source.html b/doc/html/conversion_8hpp_source.html deleted file mode 100644 index ac8cc711..00000000 --- a/doc/html/conversion_8hpp_source.html +++ /dev/null @@ -1,353 +0,0 @@ - - - - - - -Boost.Locale: boost/locale/conversion.hpp Source File - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    conversion.hpp
    -
    -
    -
    1 //
    -
    2 // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
    -
    3 //
    -
    4 // Distributed under the Boost Software License, Version 1.0. (See
    -
    5 // accompanying file LICENSE_1_0.txt or copy at
    -
    6 // http://www.boost.org/LICENSE_1_0.txt)
    -
    7 //
    -
    8 #ifndef BOOST_LOCALE_CONVERTER_HPP_INCLUDED
    -
    9 #define BOOST_LOCALE_CONVERTER_HPP_INCLUDED
    -
    10 
    -
    11 #include <boost/locale/config.hpp>
    -
    12 #ifdef BOOST_MSVC
    -
    13 # pragma warning(push)
    -
    14 # pragma warning(disable : 4275 4251 4231 4660)
    -
    15 #endif
    -
    16 #include <locale>
    -
    17 
    -
    18 
    -
    19 namespace boost {
    -
    20  namespace locale {
    -
    21 
    -
    28 
    -
    29 
    - -
    34  public:
    -
    38  typedef enum {
    - - - - - - -
    45  };
    -
    46 
    -
    47  template<typename CharType>
    -
    48  class converter;
    -
    49 
    -
    50  #ifdef BOOST_LOCALE_DOXYGEN
    -
    51  template<typename Char>
    -
    58  class BOOST_LOCALE_DECL converter: public converter_base, public std::locale::facet {
    -
    59  public:
    -
    61  static std::locale::id id;
    -
    62 
    -
    64  converter(size_t refs = 0) : std::locale::facet(refs)
    -
    65  {
    -
    66  }
    -
    71  virtual std::basic_string<Char> convert(conversion_type how,Char const *begin,Char const *end,int flags = 0) const = 0;
    -
    72 #if defined (__SUNPRO_CC) && defined (_RWSTD_VER)
    -
    73  std::locale::id& __get_id (void) const { return id; }
    -
    74 #endif
    -
    75  };
    -
    76  #else
    -
    77 
    -
    78  template<>
    -
    79  class BOOST_LOCALE_DECL converter<char> : public converter_base, public std::locale::facet {
    -
    80  public:
    -
    81  static std::locale::id id;
    -
    82 
    -
    83  converter(size_t refs = 0) : std::locale::facet(refs)
    -
    84  {
    -
    85  }
    -
    86  virtual std::string convert(conversion_type how,char const *begin,char const *end,int flags = 0) const = 0;
    -
    87 #if defined (__SUNPRO_CC) && defined (_RWSTD_VER)
    -
    88  std::locale::id& __get_id (void) const { return id; }
    -
    89 #endif
    -
    90  };
    -
    91 
    -
    92  template<>
    -
    93  class BOOST_LOCALE_DECL converter<wchar_t> : public converter_base, public std::locale::facet {
    -
    94  public:
    -
    95  static std::locale::id id;
    -
    96  converter(size_t refs = 0) : std::locale::facet(refs)
    -
    97  {
    -
    98  }
    -
    99  virtual std::wstring convert(conversion_type how,wchar_t const *begin,wchar_t const *end,int flags = 0) const = 0;
    -
    100 #if defined (__SUNPRO_CC) && defined (_RWSTD_VER)
    -
    101  std::locale::id& __get_id (void) const { return id; }
    -
    102 #endif
    -
    103  };
    -
    104 
    -
    105  #ifdef BOOST_LOCALE_ENABLE_CHAR16_T
    -
    106  template<>
    -
    107  class BOOST_LOCALE_DECL converter<char16_t> : public converter_base, public std::locale::facet {
    -
    108  public:
    -
    109  static std::locale::id id;
    -
    110  converter(size_t refs = 0) : std::locale::facet(refs)
    -
    111  {
    -
    112  }
    -
    113  virtual std::u16string convert(conversion_type how,char16_t const *begin,char16_t const *end,int flags = 0) const = 0;
    -
    114 #if defined (__SUNPRO_CC) && defined (_RWSTD_VER)
    -
    115  std::locale::id& __get_id (void) const { return id; }
    -
    116 #endif
    -
    117  };
    -
    118  #endif
    -
    119 
    -
    120  #ifdef BOOST_LOCALE_ENABLE_CHAR32_T
    -
    121  template<>
    -
    122  class BOOST_LOCALE_DECL converter<char32_t> : public converter_base, public std::locale::facet {
    -
    123  public:
    -
    124  static std::locale::id id;
    -
    125  converter(size_t refs = 0) : std::locale::facet(refs)
    -
    126  {
    -
    127  }
    -
    128  virtual std::u32string convert(conversion_type how,char32_t const *begin,char32_t const *end,int flags = 0) const = 0;
    -
    129 #if defined (__SUNPRO_CC) && defined (_RWSTD_VER)
    -
    130  std::locale::id& __get_id (void) const { return id; }
    -
    131 #endif
    -
    132  };
    -
    133  #endif
    -
    134 
    -
    135  #endif
    -
    136 
    -
    140 
    -
    141  typedef enum {
    - - - - - -
    147  } norm_type;
    -
    148 
    -
    158  template<typename CharType>
    -
    159  std::basic_string<CharType> normalize(std::basic_string<CharType> const &str,norm_type n=norm_default,std::locale const &loc=std::locale())
    -
    160  {
    -
    161  return std::use_facet<converter<CharType> >(loc).convert(converter_base::normalization,str.data(),str.data() + str.size(),n);
    -
    162  }
    -
    163 
    -
    173  template<typename CharType>
    -
    174  std::basic_string<CharType> normalize(CharType const *str,norm_type n=norm_default,std::locale const &loc=std::locale())
    -
    175  {
    -
    176  CharType const *end=str;
    -
    177  while(*end)
    -
    178  end++;
    -
    179  return std::use_facet<converter<CharType> >(loc).convert(converter_base::normalization,str,end,n);
    -
    180  }
    -
    181 
    -
    191  template<typename CharType>
    -
    192  std::basic_string<CharType> normalize( CharType const *begin,
    -
    193  CharType const *end,
    - -
    195  std::locale const &loc=std::locale())
    -
    196  {
    -
    197  return std::use_facet<converter<CharType> >(loc).convert(converter_base::normalization,begin,end,n);
    -
    198  }
    -
    199 
    -
    201 
    -
    207 
    -
    208  template<typename CharType>
    -
    209  std::basic_string<CharType> to_upper(std::basic_string<CharType> const &str,std::locale const &loc=std::locale())
    -
    210  {
    -
    211  return std::use_facet<converter<CharType> >(loc).convert(converter_base::upper_case,str.data(),str.data()+str.size());
    -
    212  }
    -
    213 
    -
    219  template<typename CharType>
    -
    220  std::basic_string<CharType> to_upper(CharType const *str,std::locale const &loc=std::locale())
    -
    221  {
    -
    222  CharType const *end=str;
    -
    223  while(*end)
    -
    224  end++;
    -
    225  return std::use_facet<converter<CharType> >(loc).convert(converter_base::upper_case,str,end);
    -
    226  }
    -
    227 
    -
    233  template<typename CharType>
    -
    234  std::basic_string<CharType> to_upper(CharType const *begin,CharType const *end,std::locale const &loc=std::locale())
    -
    235  {
    -
    236  return std::use_facet<converter<CharType> >(loc).convert(converter_base::upper_case,begin,end);
    -
    237  }
    -
    238 
    -
    240 
    -
    246 
    -
    247  template<typename CharType>
    -
    248  std::basic_string<CharType> to_lower(std::basic_string<CharType> const &str,std::locale const &loc=std::locale())
    -
    249  {
    -
    250  return std::use_facet<converter<CharType> >(loc).convert(converter_base::lower_case,str.data(),str.data()+str.size());
    -
    251  }
    -
    252 
    -
    258  template<typename CharType>
    -
    259  std::basic_string<CharType> to_lower(CharType const *str,std::locale const &loc=std::locale())
    -
    260  {
    -
    261  CharType const *end=str;
    -
    262  while(*end)
    -
    263  end++;
    -
    264  return std::use_facet<converter<CharType> >(loc).convert(converter_base::lower_case,str,end);
    -
    265  }
    -
    266 
    -
    272  template<typename CharType>
    -
    273  std::basic_string<CharType> to_lower(CharType const *begin,CharType const *end,std::locale const &loc=std::locale())
    -
    274  {
    -
    275  return std::use_facet<converter<CharType> >(loc).convert(converter_base::lower_case,begin,end);
    -
    276  }
    -
    278 
    -
    284 
    -
    285  template<typename CharType>
    -
    286  std::basic_string<CharType> to_title(std::basic_string<CharType> const &str,std::locale const &loc=std::locale())
    -
    287  {
    -
    288  return std::use_facet<converter<CharType> >(loc).convert(converter_base::title_case,str.data(),str.data()+str.size());
    -
    289  }
    -
    290 
    -
    296  template<typename CharType>
    -
    297  std::basic_string<CharType> to_title(CharType const *str,std::locale const &loc=std::locale())
    -
    298  {
    -
    299  CharType const *end=str;
    -
    300  while(*end)
    -
    301  end++;
    -
    302  return std::use_facet<converter<CharType> >(loc).convert(converter_base::title_case,str,end);
    -
    303  }
    -
    304 
    -
    310  template<typename CharType>
    -
    311  std::basic_string<CharType> to_title(CharType const *begin,CharType const *end,std::locale const &loc=std::locale())
    -
    312  {
    -
    313  return std::use_facet<converter<CharType> >(loc).convert(converter_base::title_case,begin,end);
    -
    314  }
    -
    315 
    -
    317 
    -
    323 
    -
    324  template<typename CharType>
    -
    325  std::basic_string<CharType> fold_case(std::basic_string<CharType> const &str,std::locale const &loc=std::locale())
    -
    326  {
    -
    327  return std::use_facet<converter<CharType> >(loc).convert(converter_base::case_folding,str.data(),str.data()+str.size());
    -
    328  }
    -
    329 
    -
    335  template<typename CharType>
    -
    336  std::basic_string<CharType> fold_case(CharType const *str,std::locale const &loc=std::locale())
    -
    337  {
    -
    338  CharType const *end=str;
    -
    339  while(*end)
    -
    340  end++;
    -
    341  return std::use_facet<converter<CharType> >(loc).convert(converter_base::case_folding,str,end);
    -
    342  }
    -
    343 
    -
    349  template<typename CharType>
    -
    350  std::basic_string<CharType> fold_case(CharType const *begin,CharType const *end,std::locale const &loc=std::locale())
    -
    351  {
    -
    352  return std::use_facet<converter<CharType> >(loc).convert(converter_base::case_folding,begin,end);
    -
    353  }
    -
    354 
    -
    358  } // locale
    -
    359 
    -
    360 } // boost
    -
    361 
    -
    362 #ifdef BOOST_MSVC
    -
    363 #pragma warning(pop)
    -
    364 #endif
    -
    365 
    -
    366 
    -
    367 #endif
    -
    368 
    -
    378 
    -
    379 // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
    -
    380 
    -
    Canonical decomposition.
    Definition: conversion.hpp:142
    -
    std::basic_string< CharType > fold_case(std::basic_string< CharType > const &str, std::locale const &loc=std::locale())
    Definition: conversion.hpp:325
    -
    Apply Unicode normalization on the text.
    Definition: conversion.hpp:39
    -
    The facet that implements text manipulation.
    Definition: conversion.hpp:48
    -
    Convert text to lower case.
    Definition: conversion.hpp:41
    -
    std::basic_string< CharType > to_title(std::basic_string< CharType > const &str, std::locale const &loc=std::locale())
    Definition: conversion.hpp:286
    -
    Convert text to upper case.
    Definition: conversion.hpp:40
    -
    converter(size_t refs=0)
    Standard constructor.
    Definition: conversion.hpp:64
    -
    std::basic_string< CharType > to_upper(std::basic_string< CharType > const &str, std::locale const &loc=std::locale())
    Definition: conversion.hpp:209
    -
    Compatibility decomposition.
    Definition: conversion.hpp:144
    -
    This class provides base flags for text manipulation. It is used as base for converter facet...
    Definition: conversion.hpp:33
    -
    Convert text to title case.
    Definition: conversion.hpp:43
    -
    norm_type
    Definition: conversion.hpp:141
    -
    Compatibility decomposition followed by canonical composition.
    Definition: conversion.hpp:145
    -
    static std::locale::id id
    Locale identification.
    Definition: conversion.hpp:61
    -
    conversion_type
    Definition: conversion.hpp:38
    -
    std::basic_string< CharType > to_lower(std::basic_string< CharType > const &str, std::locale const &loc=std::locale())
    Definition: conversion.hpp:248
    -
    Fold case in the text.
    Definition: conversion.hpp:42
    -
    std::basic_string< CharType > normalize(std::basic_string< CharType > const &str, norm_type n=norm_default, std::locale const &loc=std::locale())
    Definition: conversion.hpp:159
    -
    Canonical decomposition followed by canonical composition.
    Definition: conversion.hpp:143
    -
    Default normalization - canonical decomposition followed by canonical composition.
    Definition: conversion.hpp:146
    -
    -
    - - - - - - diff --git a/doc/html/conversions.html b/doc/html/conversions.html deleted file mode 100644 index d2ffe56a..00000000 --- a/doc/html/conversions.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - -Boost.Locale: Text Conversions - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    Text Conversions
    -
    -
    -

    There is a set of functions that perform basic string conversion operations: upper, lower and title case conversions, case folding and Unicode normalization. These are to_upper , to_lower, to_title, fold_case and normalize.

    -

    All these functions receive an std::locale object as parameter or use a global locale by default.

    -

    Global locale is used in all examples below.

    -

    -Case Handing

    -

    For example:

    -
    std::string grussen = "grüßEN";
    -
    std::cout <<"Upper "<< boost::locale::to_upper(grussen) << std::endl
    -
    <<"Lower "<< boost::locale::to_lower(grussen) << std::endl
    -
    <<"Title "<< boost::locale::to_title(grussen) << std::endl
    -
    <<"Fold "<< boost::locale::fold_case(grussen) << std::endl;
    -

    Would print:

    -
    Upper GRÜSSEN
    -Lower grüßen
    -Title Grüßen
    -Fold  grüssen
    -

    You may notice that there are existing functions to_upper and to_lower in the Boost.StringAlgo library. The difference is that these function operate over an entire string instead of performing incorrect character-by-character conversions.

    -

    For example:

    -
    std::wstring grussen = L"grüßen";
    -
    std::wcout << boost::algorithm::to_upper_copy(grussen) << " " << boost::locale::to_upper(grussen) << std::endl;
    -

    Would give in output:

    -
    GRÜßEN GRÜSSEN
    -

    Where a letter "ß" was not converted correctly to double-S in first case because of a limitation of std::ctype facet.

    -

    This is even more problematic in case of UTF-8 encodings where non US-ASCII are not converted at all. For example, this code

    -
    std::string grussen = "grüßen";
    -
    std::cout << boost::algorithm::to_upper_copy(grussen) << " " << boost::locale::to_upper(grussen) << std::endl;
    -

    Would modify ASCII characters only

    -
    GRüßEN GRÜSSEN
    -

    -Unicode Normalization

    -

    Unicode normalization is the process of converting strings to a standard form, suitable for text processing and comparison. For example, character "ü" can be represented by a single code point or a combination of the character "u" and the diaeresis "¨". Normalization is an important part of Unicode text processing.

    -

    Unicode defines four normalization forms. Each specific form is selected by a flag passed to normalize function:

    - -

    For more details on normalization forms, read this article.

    -

    -Notes

    -
      -
    • normalize operates only on Unicode-encoded strings, i.e.: UTF-8, UTF-16 and UTF-32 depending on the character width. So be careful when using non-UTF encodings as they may be treated incorrectly.
    • -
    • fold_case is generally a locale-independent operation, but it receives a locale as a parameter to determine the 8-bit encoding.
    • -
    • All of these functions can work with an STL string, a NUL terminated string, or a range defined by two pointers. They always return a newly created STL string.
    • -
    • The length of the string may change, see the above example.
    • -
    -
    -
    - - - - - - diff --git a/doc/html/conversions_8cpp-example.html b/doc/html/conversions_8cpp-example.html deleted file mode 100644 index f1af6923..00000000 --- a/doc/html/conversions_8cpp-example.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - -Boost.Locale: conversions.cpp - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    conversions.cpp
    -
    -
    -

    Example of using various text conversion functions.

    -
    //
    -
    // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
    -
    //
    -
    // Distributed under the Boost Software License, Version 1.0. (See
    -
    // accompanying file LICENSE_1_0.txt or copy at
    -
    // http://www.boost.org/LICENSE_1_0.txt)
    -
    //
    -
    #include <boost/locale.hpp>
    -
    #include <boost/algorithm/string/case_conv.hpp>
    -
    #include <iostream>
    -
    -
    #include <ctime>
    -
    -
    -
    -
    int main()
    -
    {
    -
    using namespace boost::locale;
    -
    using namespace std;
    -
    // Create system default locale
    -
    generator gen;
    -
    locale loc=gen("");
    -
    locale::global(loc);
    -
    cout.imbue(loc);
    -
    -
    -
    cout<<"Correct case conversion can't be done by simple, character by character conversion"<<endl;
    -
    cout<<"because case conversion is context sensitive and not 1-to-1 conversion"<<endl;
    -
    cout<<"For example:"<<endl;
    -
    cout<<" German grüßen correctly converted to "<<to_upper("grüßen")<<", instead of incorrect "
    -
    <<boost::to_upper_copy(std::string("grüßen"))<<endl;
    -
    cout<<" where ß is replaced with SS"<<endl;
    -
    cout<<" Greek ὈΔΥΣΣΕΎΣ is correctly converted to "<<to_lower("ὈΔΥΣΣΕΎΣ")<<", instead of incorrect "
    -
    <<boost::to_lower_copy(std::string("ὈΔΥΣΣΕΎΣ"))<<endl;
    -
    cout<<" where Σ is converted to σ or to ς, according to position in the word"<<endl;
    -
    cout<<"Such type of conversion just can't be done using std::toupper that work on character base, also std::toupper is "<<endl;
    -
    cout<<"not even applicable when working with variable character length like in UTF-8 or UTF-16 limiting the correct "<<endl;
    -
    cout<<"behavior to unicode subset BMP or ASCII only"<<endl;
    -
    -
    }
    -
    -
    // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
    -
    -
    // boostinspect:noascii
    -
    -
    - - - - - - diff --git a/doc/html/date__time_8hpp_source.html b/doc/html/date__time_8hpp_source.html deleted file mode 100644 index b4db75d0..00000000 --- a/doc/html/date__time_8hpp_source.html +++ /dev/null @@ -1,675 +0,0 @@ - - - - - - -Boost.Locale: boost/locale/date_time.hpp Source File - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    date_time.hpp
    -
    -
    -
    1 //
    -
    2 // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
    -
    3 //
    -
    4 // Distributed under the Boost Software License, Version 1.0. (See
    -
    5 // accompanying file LICENSE_1_0.txt or copy at
    -
    6 // http://www.boost.org/LICENSE_1_0.txt)
    -
    7 //
    -
    8 #ifndef BOOST_LOCALE_DATE_TIME_HPP_INCLUDED
    -
    9 #define BOOST_LOCALE_DATE_TIME_HPP_INCLUDED
    -
    10 
    -
    11 #include <boost/locale/config.hpp>
    -
    12 #ifdef BOOST_MSVC
    -
    13 # pragma warning(push)
    -
    14 # pragma warning(disable : 4275 4251 4231 4660)
    -
    15 #endif
    -
    16 
    -
    17 #include <boost/locale/hold_ptr.hpp>
    -
    18 #include <boost/locale/date_time_facet.hpp>
    -
    19 #include <boost/locale/formatting.hpp>
    -
    20 #include <boost/locale/time_zone.hpp>
    -
    21 #include <locale>
    -
    22 #include <vector>
    -
    23 #include <stdexcept>
    -
    24 
    -
    25 
    -
    26 namespace boost {
    -
    27  namespace locale {
    -
    34 
    -
    35 
    -
    39  class BOOST_SYMBOL_VISIBLE date_time_error : public std::runtime_error {
    -
    40  public:
    -
    44  date_time_error(std::string const &e) : std::runtime_error(e) {}
    -
    45  };
    -
    46 
    -
    47 
    - -
    57  {
    - -
    59  int value;
    -
    60  date_time_period operator+() const { return *this; }
    - -
    68 
    - -
    73  };
    -
    74 
    -
    75  namespace period {
    - -
    83  inline period_type era(){ return period_type(marks::era); }
    -
    87  inline period_type year(){ return period_type(marks::year); }
    - - -
    99  inline period_type day(){ return period_type(marks::day); }
    - - - - - - - - - - - - -
    154 
    -
    158  inline date_time_period era(int v) { return date_time_period(era(),v); }
    -
    162  inline date_time_period year(int v) { return date_time_period(year(),v); }
    - -
    170  inline date_time_period month(int v) { return date_time_period(month(),v); }
    -
    174  inline date_time_period day(int v) { return date_time_period(day(),v); }
    - - - - -
    200  inline date_time_period hour(int v) { return date_time_period(hour(),v); }
    -
    204  inline date_time_period hour_12(int v) { return date_time_period(hour_12(),v); }
    -
    208  inline date_time_period am_pm(int v) { return date_time_period(am_pm(),v); }
    -
    212  inline date_time_period minute(int v) { return date_time_period(minute(),v); }
    -
    216  inline date_time_period second(int v) { return date_time_period(second(),v); }
    - - - -
    229 
    -
    233  inline date_time_period january() { return date_time_period(month(),0); }
    - -
    241  inline date_time_period march() { return date_time_period(month(),2); }
    -
    245  inline date_time_period april() { return date_time_period(month(),3); }
    -
    249  inline date_time_period may() { return date_time_period(month(),4); }
    -
    253  inline date_time_period june() { return date_time_period(month(),5); }
    -
    257  inline date_time_period july() { return date_time_period(month(),6); }
    -
    261  inline date_time_period august() { return date_time_period(month(),7); }
    - -
    269  inline date_time_period october() { return date_time_period(month(),9); }
    -
    273  inline date_time_period november() { return date_time_period(month(),10); }
    -
    277  inline date_time_period december() { return date_time_period(month(),11); }
    -
    278 
    - - - - - - - -
    310  inline date_time_period am() { return date_time_period(am_pm(),0); }
    -
    314  inline date_time_period pm() { return date_time_period(am_pm(),1); }
    -
    315 
    - -
    320  {
    -
    321  return date_time_period(f);
    -
    322  }
    - -
    327  {
    -
    328  return date_time_period(f,-1);
    -
    329  }
    -
    330 
    -
    334  template<typename T>
    - -
    336  {
    -
    337  return date_time_period(f,v);
    -
    338  }
    -
    339 
    -
    343  template<typename T>
    - -
    345  {
    -
    346  return date_time_period(f,v);
    -
    347  }
    -
    351  template<typename T>
    - -
    353  {
    -
    354  return date_time_period(f.type,f.value*v);
    -
    355  }
    -
    356 
    -
    360  template<typename T>
    - -
    362  {
    -
    363  return date_time_period(f.type,f.value*v);
    -
    364  }
    -
    365 
    -
    366 
    -
    367  } // period
    -
    368 
    -
    369 
    - -
    377  public:
    -
    378 
    - -
    383  {
    -
    384  }
    - -
    389  {
    -
    390  basic_[0]=date_time_period(f);
    -
    391  }
    - -
    396  {
    -
    397  basic_[0]=fl;
    -
    398  }
    - -
    403  {
    -
    404  size_t n=size();
    -
    405  if(n < 4)
    -
    406  basic_[n]=f;
    -
    407  else
    -
    408  periods_.push_back(f);
    -
    409  }
    -
    413  size_t size() const
    -
    414  {
    -
    415  if(basic_[0].type == period::period_type())
    -
    416  return 0;
    -
    417  if(basic_[1].type == period::period_type())
    -
    418  return 1;
    -
    419  if(basic_[2].type == period::period_type())
    -
    420  return 2;
    -
    421  if(basic_[3].type == period::period_type())
    -
    422  return 3;
    -
    423  return 4+periods_.size();
    -
    424  }
    -
    428  date_time_period const &operator[](size_t n) const
    -
    429  {
    -
    430  if(n >= size())
    -
    431  throw std::out_of_range("Invalid index to date_time_period");
    -
    432  if(n < 4)
    -
    433  return basic_[n];
    -
    434  else
    -
    435  return periods_[n-4];
    -
    436  }
    -
    437  private:
    -
    438  date_time_period basic_[4];
    -
    439  std::vector<date_time_period> periods_;
    -
    440  };
    -
    441 
    -
    442 
    - -
    447  {
    - -
    449  for(unsigned i=0;i<b.size();i++)
    -
    450  s.add(b[i]);
    -
    451  return s;
    -
    452  }
    -
    453 
    - -
    458  {
    - -
    460  for(unsigned i=0;i<b.size();i++)
    -
    461  s.add(-b[i]);
    -
    462  return s;
    -
    463  }
    -
    464 
    -
    465 
    -
    473  class BOOST_LOCALE_DECL calendar {
    -
    474  public:
    -
    475 
    -
    482  calendar(std::ios_base &ios);
    -
    488  calendar(std::locale const &l,std::string const &zone);
    -
    494  calendar(std::locale const &l);
    -
    500  calendar(std::string const &zone);
    -
    506  calendar();
    -
    507  ~calendar();
    -
    508 
    -
    512  calendar(calendar const &other);
    -
    516  calendar const &operator=(calendar const &other);
    -
    517 
    -
    521  int minimum(period::period_type f) const;
    -
    525  int greatest_minimum(period::period_type f) const;
    -
    529  int maximum(period::period_type f) const;
    -
    533  int least_maximum(period::period_type f) const;
    -
    534 
    -
    537  int first_day_of_week() const;
    -
    538 
    -
    542  std::locale get_locale() const;
    -
    546  std::string get_time_zone() const;
    -
    547 
    -
    551  bool is_gregorian() const;
    -
    552 
    -
    556  bool operator==(calendar const &other) const;
    -
    560  bool operator!=(calendar const &other) const;
    -
    561 
    -
    562  private:
    -
    563  friend class date_time;
    -
    564  std::locale locale_;
    -
    565  std::string tz_;
    - -
    567  };
    -
    568 
    -
    589 
    -
    590  class BOOST_LOCALE_DECL date_time {
    -
    591  public:
    -
    592 
    -
    598  date_time();
    -
    602  date_time(date_time const &other);
    -
    606  date_time(date_time const &other,date_time_period_set const &set);
    -
    610  date_time const &operator=(date_time const &other);
    -
    611  ~date_time();
    -
    612 
    -
    618  date_time(double time);
    -
    622  date_time(double time,calendar const &cal);
    -
    626  date_time(calendar const &cal);
    -
    627 
    -
    633  date_time(date_time_period_set const &set);
    -
    637  date_time(date_time_period_set const &set,calendar const &cal);
    -
    638 
    -
    639 
    -
    643  date_time const &operator=(date_time_period_set const &f);
    -
    644 
    -
    648  void set(period::period_type f,int v);
    -
    652  int get(period::period_type f) const;
    -
    653 
    - -
    658  {
    -
    659  return get(f);
    -
    660  }
    -
    661 
    - -
    666  {
    -
    667  return *this+date_time_period(f);
    -
    668  }
    -
    669 
    - -
    674  {
    -
    675  return *this-date_time_period(f);
    -
    676  }
    -
    677 
    - -
    682  {
    -
    683  return *this+=date_time_period(f);
    -
    684  }
    - -
    689  {
    -
    690  return *this-=date_time_period(f);
    -
    691  }
    -
    692 
    - -
    697  {
    -
    698  return *this<<date_time_period(f);
    -
    699  }
    -
    700 
    - -
    705  {
    -
    706  return *this>>date_time_period(f);
    -
    707  }
    -
    708 
    - -
    713  {
    -
    714  return *this<<=date_time_period(f);
    -
    715  }
    - -
    720  {
    -
    721  return *this>>=date_time_period(f);
    -
    722  }
    -
    723 
    -
    727  date_time operator+(date_time_period const &v) const;
    -
    731  date_time operator-(date_time_period const &v) const;
    -
    735  date_time const &operator+=(date_time_period const &v);
    -
    739  date_time const &operator-=(date_time_period const &v);
    -
    740 
    -
    744  date_time operator<<(date_time_period const &v) const;
    -
    748  date_time operator>>(date_time_period const &v) const ;
    -
    752  date_time const &operator<<=(date_time_period const &v);
    -
    756  date_time const &operator>>=(date_time_period const &v);
    -
    757 
    -
    761  date_time operator+(date_time_period_set const &v) const;
    -
    765  date_time operator-(date_time_period_set const &v) const;
    -
    769  date_time const &operator+=(date_time_period_set const &v);
    -
    773  date_time const &operator-=(date_time_period_set const &v);
    -
    774 
    -
    778  date_time operator<<(date_time_period_set const &v) const;
    -
    782  date_time operator>>(date_time_period_set const &v) const ;
    -
    786  date_time const &operator<<=(date_time_period_set const &v);
    -
    790  date_time const &operator>>=(date_time_period_set const &v);
    -
    791 
    -
    797  double time() const;
    -
    804  void time(double v);
    -
    805 
    -
    809  bool operator==(date_time const &other) const;
    -
    813  bool operator!=(date_time const &other) const;
    -
    817  bool operator<(date_time const &other) const;
    -
    821  bool operator>(date_time const &other) const;
    -
    825  bool operator<=(date_time const &other) const;
    -
    829  bool operator>=(date_time const &other) const;
    -
    830 
    -
    834  void swap(date_time &other);
    -
    835 
    -
    839  int difference(date_time const &other,period::period_type f) const;
    -
    840 
    -
    844  int minimum(period::period_type f) const;
    -
    849  int maximum(period::period_type f) const;
    -
    850 
    -
    854  bool is_in_daylight_saving_time() const;
    -
    855 
    -
    856  private:
    - -
    858  };
    -
    859 
    -
    873  template<typename CharType>
    -
    874  std::basic_ostream<CharType> &operator<<(std::basic_ostream<CharType> &out,date_time const &t)
    -
    875  {
    -
    876  double time_point = t.time();
    -
    877  uint64_t display_flags = ios_info::get(out).display_flags();
    -
    878  if (
    -
    879  display_flags == flags::date
    -
    880  || display_flags == flags::time
    -
    881  || display_flags == flags::datetime
    -
    882  || display_flags == flags::strftime
    -
    883  )
    -
    884  {
    -
    885  out << time_point;
    -
    886  }
    -
    887  else {
    -
    888  ios_info::get(out).display_flags(flags::datetime);
    -
    889  out << time_point;
    -
    890  ios_info::get(out).display_flags(display_flags);
    -
    891  }
    -
    892  return out;
    -
    893  }
    -
    894 
    -
    900  template<typename CharType>
    -
    901  std::basic_istream<CharType> &operator>>(std::basic_istream<CharType> &in,date_time &t)
    -
    902  {
    -
    903  double v;
    -
    904  uint64_t display_flags = ios_info::get(in).display_flags();
    -
    905  if (
    -
    906  display_flags == flags::date
    -
    907  || display_flags == flags::time
    -
    908  || display_flags == flags::datetime
    -
    909  || display_flags == flags::strftime
    -
    910  )
    -
    911  {
    -
    912  in >> v;
    -
    913  }
    -
    914  else {
    -
    915  ios_info::get(in).display_flags(flags::datetime);
    -
    916  in >> v;
    -
    917  ios_info::get(in).display_flags(display_flags);
    -
    918  }
    -
    919  if(!in.fail())
    -
    920  t.time(v);
    -
    921  return in;
    -
    922  }
    -
    923 
    - -
    933  public:
    -
    934 
    -
    939  date_time_duration(date_time const &first,date_time const &second) :
    -
    940  s_(first),
    -
    941  e_(second)
    -
    942  {
    -
    943  }
    -
    944 
    -
    948  int get(period::period_type f) const
    -
    949  {
    -
    950  return start().difference(end(),f);
    -
    951  }
    -
    952 
    - -
    957  {
    -
    958  return start().difference(end(),f);
    -
    959  }
    -
    960 
    -
    964  date_time const &start() const { return s_; }
    -
    968  date_time const &end() const { return e_; }
    -
    969  private:
    -
    970  date_time const &s_;
    -
    971  date_time const &e_;
    -
    972  };
    -
    973 
    -
    978  inline date_time_duration operator-(date_time const &later,date_time const &earlier)
    -
    979  {
    -
    980  return date_time_duration(earlier,later);
    -
    981  }
    -
    982 
    -
    983 
    -
    984  namespace period {
    -
    988  inline int era(date_time const &dt) { return dt.get(era()); }
    -
    992  inline int year(date_time const &dt) { return dt.get(year()); }
    -
    996  inline int extended_year(date_time const &dt) { return dt.get(extended_year()); }
    -
    1000  inline int month(date_time const &dt) { return dt.get(month()); }
    -
    1004  inline int day(date_time const &dt) { return dt.get(day()); }
    -
    1008  inline int day_of_year(date_time const &dt) { return dt.get(day_of_year()); }
    -
    1017  inline int day_of_week(date_time const &dt) { return dt.get(day_of_week()); }
    -
    1022  inline int day_of_week_in_month(date_time const &dt) { return dt.get(day_of_week_in_month()); }
    -
    1026  inline int day_of_week_local(date_time const &dt) { return dt.get(day_of_week_local()); }
    -
    1030  inline int hour(date_time const &dt) { return dt.get(hour()); }
    -
    1034  inline int hour_12(date_time const &dt) { return dt.get(hour_12()); }
    -
    1038  inline int am_pm(date_time const &dt) { return dt.get(am_pm()); }
    -
    1042  inline int minute(date_time const &dt) { return dt.get(minute()); }
    -
    1046  inline int second(date_time const &dt) { return dt.get(second()); }
    -
    1050  inline int week_of_year(date_time const &dt) { return dt.get(week_of_year()); }
    -
    1054  inline int week_of_month(date_time const &dt) { return dt.get(week_of_month()); }
    -
    1058  inline int first_day_of_week(date_time const &dt) { return dt.get(first_day_of_week()); }
    -
    1059 
    -
    1063  inline int era(date_time_duration const &dt) { return dt.get(era()); }
    -
    1067  inline int year(date_time_duration const &dt) { return dt.get(year()); }
    -
    1071  inline int extended_year(date_time_duration const &dt) { return dt.get(extended_year()); }
    -
    1075  inline int month(date_time_duration const &dt) { return dt.get(month()); }
    -
    1079  inline int day(date_time_duration const &dt) { return dt.get(day()); }
    -
    1083  inline int day_of_year(date_time_duration const &dt) { return dt.get(day_of_year()); }
    -
    1087  inline int day_of_week(date_time_duration const &dt) { return dt.get(day_of_week()); }
    -
    1091  inline int day_of_week_in_month(date_time_duration const &dt) { return dt.get(day_of_week_in_month()); }
    -
    1095  inline int day_of_week_local(date_time_duration const &dt) { return dt.get(day_of_week_local()); }
    -
    1099  inline int hour(date_time_duration const &dt) { return dt.get(hour()); }
    -
    1103  inline int hour_12(date_time_duration const &dt) { return dt.get(hour_12()); }
    -
    1107  inline int am_pm(date_time_duration const &dt) { return dt.get(am_pm()); }
    -
    1111  inline int minute(date_time_duration const &dt) { return dt.get(minute()); }
    -
    1115  inline int second(date_time_duration const &dt) { return dt.get(second()); }
    -
    1119  inline int week_of_year(date_time_duration const &dt) { return dt.get(week_of_year()); }
    -
    1123  inline int week_of_month(date_time_duration const &dt) { return dt.get(week_of_month()); }
    -
    1127  inline int first_day_of_week(date_time_duration const &dt) { return dt.get(first_day_of_week()); }
    -
    1128 
    -
    1129 
    -
    1130  }
    -
    1131 
    -
    1133 
    -
    1134 
    -
    1135  } // locale
    -
    1136 } // boost
    -
    1137 
    -
    1138 #ifdef BOOST_MSVC
    -
    1139 #pragma warning(pop)
    -
    1140 #endif
    -
    1141 
    -
    1142 
    -
    1143 #endif
    -
    1144 
    -
    1150 // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
    -
    period_type am_pm()
    Definition: date_time.hpp:133
    -
    period_type week_of_year()
    Definition: date_time.hpp:145
    -
    period_type minute()
    Definition: date_time.hpp:137
    -
    The week number within current month.
    Definition: date_time_facet.hpp:53
    -
    period::period_type type
    The type of period, i.e. era, year, day etc.
    Definition: date_time.hpp:58
    -
    Definition: date_time_facet.hpp:44
    -
    period_type extended_year()
    Definition: date_time.hpp:91
    -
    date_time_period saturday()
    Definition: date_time.hpp:306
    -
    date_time_period_set()
    Definition: date_time.hpp:382
    -
    date_time const & end() const
    Definition: date_time.hpp:968
    -
    date_time_period const & operator[](size_t n) const
    Definition: date_time.hpp:428
    -
    Definition: date_time_facet.hpp:39
    -
    Year, it is calendar specific, for example 2011 in Gregorian calendar.
    Definition: date_time_facet.hpp:34
    -
    this class that represents a set of periods,
    Definition: date_time.hpp:376
    -
    date_time_period january()
    Definition: date_time.hpp:233
    -
    date_time_period november()
    Definition: date_time.hpp:273
    -
    date_time operator+(period::period_type f) const
    Definition: date_time.hpp:665
    -
    size_t size() const
    Definition: date_time.hpp:413
    -
    date_time_error(std::string const &e)
    Definition: date_time.hpp:44
    -
    This class represents a period: a pair of two date_time objects.
    Definition: date_time.hpp:932
    -
    date_time const & operator>>=(period::period_type f)
    Definition: date_time.hpp:719
    -
    date_time_period march()
    Definition: date_time.hpp:241
    -
    period_type day_of_week()
    Definition: date_time.hpp:112
    -
    The number of day in year, starting from 1, in Gregorian [1..366].
    Definition: date_time_facet.hpp:38
    -
    int get(period::period_type f) const
    Definition: date_time.hpp:948
    -
    date_time_period monday()
    Definition: date_time.hpp:286
    -
    date_time_period february()
    Definition: date_time.hpp:237
    -
    date_time_period april()
    Definition: date_time.hpp:245
    -
    bool operator<(segment< IteratorL > const &l, segment< IteratorR > const &r)
    Compare two segments.
    Definition: segment.hpp:255
    -
    period_type first_day_of_week()
    Definition: date_time.hpp:153
    -
    bool operator<=(segment< IteratorL > const &l, segment< IteratorR > const &r)
    Compare two segments.
    Definition: segment.hpp:261
    -
    this class provides an access to general calendar information.
    Definition: date_time.hpp:473
    -
    date_time_period august()
    Definition: date_time.hpp:261
    -
    date_time_period am()
    Definition: date_time.hpp:310
    -
    bool operator>=(segment< IteratorL > const &l, segment< IteratorR > const &r)
    Compare two segments.
    Definition: segment.hpp:273
    -
    date_time_period october()
    Definition: date_time.hpp:269
    -
    void add(date_time_period f)
    Definition: date_time.hpp:402
    -
    bool operator==(BaseIterator const &l, boundary_point< BaseIterator > const &r)
    Definition: boundary_point.hpp:142
    -
    int operator/(period::period_type f) const
    Definition: date_time.hpp:657
    -
    date_time_period december()
    Definition: date_time.hpp:277
    -
    period_type era()
    Definition: date_time.hpp:83
    -
    period_type hour()
    Definition: date_time.hpp:125
    -
    a smart pointer similar to std::auto_ptr but it is non-copyable and the underlying object has the sam...
    Definition: hold_ptr.hpp:18
    -
    void display_flags(uint64_t flags)
    -
    static ios_info & get(std::ios_base &ios)
    -
    date_time const & operator-=(period::period_type f)
    Definition: date_time.hpp:688
    -
    The week number in the year.
    Definition: date_time_facet.hpp:52
    -
    24 clock hour [0..23]
    Definition: date_time_facet.hpp:47
    -
    Special invalid value, should not be used directly.
    Definition: date_time_facet.hpp:32
    -
    The day of month, calendar specific, in Gregorian [1..31].
    Definition: date_time_facet.hpp:37
    -
    period_type day_of_week_local()
    Definition: date_time.hpp:121
    -
    minute [0..59]
    Definition: date_time_facet.hpp:50
    -
    date_time_period operator+() const
    Definition: date_time.hpp:63
    -
    The month of year, calendar specific, in Gregorian [0..11].
    Definition: date_time_facet.hpp:36
    -
    Local day of week, for example in France Monday is 1, in US Sunday is 1, [1..7].
    Definition: date_time_facet.hpp:46
    -
    date_time_period operator-(period::period_type f)
    Definition: date_time.hpp:326
    -
    period_type day_of_week_in_month()
    Definition: date_time.hpp:117
    -
    date_time_period operator*(period::period_type f, T v)
    Definition: date_time.hpp:335
    -
    12 clock hour [0..11]
    Definition: date_time_facet.hpp:48
    -
    This class represents a pair of period_type and the integer values that describes its amount...
    Definition: date_time.hpp:56
    -
    date_time_period pm()
    Definition: date_time.hpp:314
    -
    period_type day()
    Definition: date_time.hpp:99
    -
    int get(period::period_type f) const
    -
    period_type year()
    Definition: date_time.hpp:87
    -
    period_type week_of_month()
    Definition: date_time.hpp:149
    -
    date_time_period_set operator-(date_time_period_set const &a, date_time_period_set const &b)
    Definition: date_time.hpp:457
    -
    date_time_period wednesday()
    Definition: date_time.hpp:294
    -
    date_time const & operator<<=(period::period_type f)
    Definition: date_time.hpp:712
    -
    This error is thrown in case of invalid state that occurred.
    Definition: date_time.hpp:39
    -
    date_time_period thursday()
    Definition: date_time.hpp:298
    -
    am or pm marker [0..1]
    Definition: date_time_facet.hpp:49
    -
    date_time_period_set(period::period_type f)
    Definition: date_time.hpp:388
    -
    date_time_period_set(date_time_period const &fl)
    Definition: date_time.hpp:395
    -
    date_time_period sunday()
    Definition: date_time.hpp:282
    -
    std::basic_ostream< CharType > & operator<<(std::basic_ostream< CharType > &out, date_time const &t)
    Definition: date_time.hpp:874
    -
    date_time_period friday()
    Definition: date_time.hpp:302
    -
    date_time operator>>(period::period_type f) const
    Definition: date_time.hpp:704
    -
    int operator/(period::period_type f) const
    Definition: date_time.hpp:956
    -
    date_time_period tuesday()
    Definition: date_time.hpp:290
    -
    int value
    Definition: date_time.hpp:59
    -
    date_time_period operator+(period::period_type f)
    Definition: date_time.hpp:319
    -
    date_time_duration(date_time const &first, date_time const &second)
    Definition: date_time.hpp:939
    -
    period_type day_of_year()
    Definition: date_time.hpp:103
    -
    date_time_period operator-() const
    Definition: date_time.hpp:67
    -
    Era i.e. AC, BC in Gregorian and Julian calendar, range [0,1].
    Definition: date_time_facet.hpp:33
    -
    First day of week, constant, for example Sunday in US = 1, Monday in France = 2.
    Definition: date_time_facet.hpp:54
    -
    double time() const
    -
    date_time_period_set operator+(date_time_period_set const &a, date_time_period_set const &b)
    Definition: date_time.hpp:446
    -
    period_type hour_12()
    Definition: date_time.hpp:129
    -
    std::basic_istream< CharType > & operator>>(std::basic_istream< CharType > &in, date_time &t)
    Definition: date_time.hpp:901
    -
    Extended year for Gregorian/Julian calendars, where 1 BC == 0, 2 BC == -1.
    Definition: date_time_facet.hpp:35
    -
    period_type invalid()
    Definition: date_time.hpp:79
    -
    date_time const & operator+=(period::period_type f)
    Definition: date_time.hpp:681
    -
    date_time_period june()
    Definition: date_time.hpp:253
    -
    date_time operator<<(period::period_type f) const
    Definition: date_time.hpp:696
    -
    date_time_period may()
    Definition: date_time.hpp:249
    -
    this class represents a date time and allows to perform various operation according to the locale set...
    Definition: date_time.hpp:590
    -
    std::ios_base & time(std::ios_base &ios)
    Definition: formatting.hpp:328
    -
    date_time const & start() const
    Definition: date_time.hpp:964
    -
    date_time operator-(period::period_type f) const
    Definition: date_time.hpp:673
    -
    int difference(date_time const &other, period::period_type f) const
    -
    date_time_period(period::period_type f=period::period_type(), int v=1)
    Definition: date_time.hpp:72
    -
    bool operator>(segment< IteratorL > const &l, segment< IteratorR > const &r)
    Compare two segments.
    Definition: segment.hpp:267
    -
    period_type second()
    Definition: date_time.hpp:141
    -
    second [0..59]
    Definition: date_time_facet.hpp:51
    -
    period_type month()
    Definition: date_time.hpp:95
    -
    date_time_period july()
    Definition: date_time.hpp:257
    -
    bool operator!=(BaseIterator const &l, boundary_point< BaseIterator > const &r)
    Definition: boundary_point.hpp:150
    -
    date_time_period september()
    Definition: date_time.hpp:265
    -
    This class holds a type that represents certain period of time like year, hour, second and so on...
    Definition: date_time_facet.hpp:70
    -
    -
    - - - - - - diff --git a/doc/html/date__time__facet_8hpp_source.html b/doc/html/date__time__facet_8hpp_source.html deleted file mode 100644 index 25758cb3..00000000 --- a/doc/html/date__time__facet_8hpp_source.html +++ /dev/null @@ -1,290 +0,0 @@ - - - - - - -Boost.Locale: boost/locale/date_time_facet.hpp Source File - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    date_time_facet.hpp
    -
    -
    -
    1 //
    -
    2 // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
    -
    3 //
    -
    4 // Distributed under the Boost Software License, Version 1.0. (See
    -
    5 // accompanying file LICENSE_1_0.txt or copy at
    -
    6 // http://www.boost.org/LICENSE_1_0.txt)
    -
    7 //
    -
    8 #ifndef BOOST_LOCALE_DATE_TIME_FACET_HPP_INCLUDED
    -
    9 #define BOOST_LOCALE_DATE_TIME_FACET_HPP_INCLUDED
    -
    10 
    -
    11 #include <boost/locale/config.hpp>
    -
    12 #ifdef BOOST_MSVC
    -
    13 # pragma warning(push)
    -
    14 # pragma warning(disable : 4275 4251 4231 4660)
    -
    15 #endif
    -
    16 
    -
    17 #include <boost/cstdint.hpp>
    -
    18 #include <locale>
    -
    19 
    -
    20 namespace boost {
    -
    21  namespace locale {
    -
    25  namespace period {
    -
    29  namespace marks {
    -
    31  enum period_mark {
    - -
    33  era,
    -
    34  year,
    - - -
    37  day,
    - - - - -
    47  hour,
    - - - - - - - -
    55  };
    -
    56 
    -
    57  } // marks
    -
    58 
    -
    70  class period_type {
    -
    71  public:
    - -
    76  {
    -
    77  }
    -
    78 
    - -
    83  {
    -
    84  return mark_;
    -
    85  }
    -
    86 
    -
    90  bool operator==(period_type const &other) const
    -
    91  {
    -
    92  return mark()==other.mark();
    -
    93  }
    -
    97  bool operator!=(period_type const &other) const
    -
    98  {
    -
    99  return mark()!=other.mark();
    -
    100  }
    -
    101  private:
    -
    102  marks::period_mark mark_;
    -
    103  };
    -
    104 
    -
    105  } // namespace period
    -
    106 
    -
    111  struct posix_time {
    -
    112  int64_t seconds;
    -
    113  uint32_t nanoseconds;
    -
    114  };
    -
    115 
    -
    121 
    - -
    123  public:
    -
    124 
    -
    128  typedef enum {
    - - - - - - - -
    137  } value_type;
    -
    138 
    -
    142  typedef enum {
    - - -
    145  } update_type;
    -
    146 
    -
    150  typedef enum {
    - - - -
    154 
    -
    158  virtual abstract_calendar *clone() const = 0;
    -
    159 
    -
    170  virtual void set_value(period::marks::period_mark p,int value) = 0;
    -
    171 
    -
    175  virtual void normalize() = 0;
    -
    176 
    -
    180  virtual int get_value(period::marks::period_mark p,value_type v) const = 0;
    -
    181 
    -
    185  virtual void set_time(posix_time const &p) = 0;
    -
    189  virtual posix_time get_time() const = 0;
    -
    190 
    -
    194  virtual void set_option(calendar_option_type opt,int v) = 0;
    -
    198  virtual int get_option(calendar_option_type opt) const = 0;
    -
    199 
    - -
    205 
    -
    209  virtual int difference(abstract_calendar const *other,period::marks::period_mark p) const = 0;
    -
    210 
    -
    214  virtual void set_timezone(std::string const &tz) = 0;
    -
    218  virtual std::string get_timezone() const = 0;
    -
    219 
    -
    223  virtual bool same(abstract_calendar const *other) const = 0;
    -
    224 
    -
    225  virtual ~abstract_calendar()
    -
    226  {
    -
    227  }
    -
    228 
    -
    229  };
    -
    230 
    -
    234  class BOOST_LOCALE_DECL calendar_facet : public std::locale::facet {
    -
    235  public:
    -
    239  calendar_facet(size_t refs = 0) : std::locale::facet(refs)
    -
    240  {
    -
    241  }
    -
    245  virtual abstract_calendar *create_calendar() const = 0;
    -
    246 
    -
    250  static std::locale::id id;
    -
    251  };
    -
    252 
    -
    253  } // locale
    -
    254 } // boost
    -
    255 
    -
    256 #ifdef BOOST_MSVC
    -
    257 #pragma warning(pop)
    -
    258 #endif
    -
    259 
    -
    260 
    -
    261 #endif
    -
    262 // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
    -
    263 
    -
    period_mark
    the type that defines a flag that holds a period identifier
    Definition: date_time_facet.hpp:31
    -
    virtual void set_value(period::marks::period_mark p, int value)=0
    -
    The week number within current month.
    Definition: date_time_facet.hpp:53
    -
    virtual bool same(abstract_calendar const *other) const =0
    -
    Definition: date_time_facet.hpp:44
    -
    the facet that generates calendar for specific locale
    Definition: date_time_facet.hpp:234
    -
    Check if the current time is in daylight time savings.
    Definition: date_time_facet.hpp:152
    -
    Definition: date_time_facet.hpp:39
    -
    Year, it is calendar specific, for example 2011 in Gregorian calendar.
    Definition: date_time_facet.hpp:34
    -
    calendar_facet(size_t refs=0)
    Definition: date_time_facet.hpp:239
    -
    Definition: date_time_facet.hpp:133
    -
    Actual minimal value for this period.
    Definition: date_time_facet.hpp:130
    -
    virtual int difference(abstract_calendar const *other, period::marks::period_mark p) const =0
    -
    virtual int get_option(calendar_option_type opt) const =0
    -
    Actual maximum, for it can be 28, 29, 30, 31 for day according to current month.
    Definition: date_time_facet.hpp:135
    -
    int64_t seconds
    Seconds since epoch.
    Definition: date_time_facet.hpp:112
    -
    The number of day in year, starting from 1, in Gregorian [1..366].
    Definition: date_time_facet.hpp:38
    -
    Check if the calendar is Gregorian.
    Definition: date_time_facet.hpp:151
    -
    calendar_option_type
    Definition: date_time_facet.hpp:150
    -
    virtual void set_timezone(std::string const &tz)=0
    -
    uint32_t nanoseconds
    Nanoseconds resolution.
    Definition: date_time_facet.hpp:113
    -
    virtual int get_value(period::marks::period_mark p, value_type v) const =0
    -
    Change the value up or down effecting others for example 1990-12-31 + 1 day = 1991-01-01.
    Definition: date_time_facet.hpp:143
    -
    Definition: date_time_facet.hpp:122
    -
    The week number in the year.
    Definition: date_time_facet.hpp:52
    -
    24 clock hour [0..23]
    Definition: date_time_facet.hpp:47
    -
    Special invalid value, should not be used directly.
    Definition: date_time_facet.hpp:32
    -
    Definition: date_time_facet.hpp:111
    -
    The day of month, calendar specific, in Gregorian [1..31].
    Definition: date_time_facet.hpp:37
    -
    minute [0..59]
    Definition: date_time_facet.hpp:50
    -
    bool operator!=(period_type const &other) const
    Definition: date_time_facet.hpp:97
    -
    Absolute possible minimum for the value, for example for day is 1.
    Definition: date_time_facet.hpp:129
    -
    update_type
    Definition: date_time_facet.hpp:142
    -
    The month of year, calendar specific, in Gregorian [0..11].
    Definition: date_time_facet.hpp:36
    -
    Local day of week, for example in France Monday is 1, in US Sunday is 1, [1..7].
    Definition: date_time_facet.hpp:46
    -
    virtual posix_time get_time() const =0
    -
    bool operator==(period_type const &other) const
    Definition: date_time_facet.hpp:90
    -
    12 clock hour [0..11]
    Definition: date_time_facet.hpp:48
    -
    virtual void set_option(calendar_option_type opt, int v)=0
    -
    am or pm marker [0..1]
    Definition: date_time_facet.hpp:49
    -
    Maximal value, for Gregorian day it would be 31.
    Definition: date_time_facet.hpp:136
    - -
    virtual void set_time(posix_time const &p)=0
    -
    value_type
    Definition: date_time_facet.hpp:128
    -
    virtual std::string get_timezone() const =0
    -
    marks::period_mark mark() const
    Definition: date_time_facet.hpp:82
    -
    static std::locale::id id
    Definition: date_time_facet.hpp:250
    -
    Era i.e. AC, BC in Gregorian and Julian calendar, range [0,1].
    Definition: date_time_facet.hpp:33
    -
    Change the value up or down not effecting others for example 1990-12-31 + 1 day = 1990-12-01...
    Definition: date_time_facet.hpp:144
    -
    First day of week, constant, for example Sunday in US = 1, Monday in France = 2.
    Definition: date_time_facet.hpp:54
    -
    Extended year for Gregorian/Julian calendars, where 1 BC == 0, 2 BC == -1.
    Definition: date_time_facet.hpp:35
    -
    Current value of this period.
    Definition: date_time_facet.hpp:132
    -
    Maximal minimum value that can be for this period.
    Definition: date_time_facet.hpp:131
    -
    second [0..59]
    Definition: date_time_facet.hpp:51
    -
    virtual abstract_calendar * clone() const =0
    -
    period_type(marks::period_mark m=marks::invalid)
    Definition: date_time_facet.hpp:75
    -
    virtual void adjust_value(period::marks::period_mark p, update_type u, int difference)=0
    -
    This class holds a type that represents certain period of time like year, hour, second and so on...
    Definition: date_time_facet.hpp:70
    -
    -
    - - - - - - diff --git a/doc/html/dates_times_timezones.html b/doc/html/dates_times_timezones.html deleted file mode 100644 index 818e4b23..00000000 --- a/doc/html/dates_times_timezones.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - -Boost.Locale: Working with dates, times, timezones and calendars. - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    Working with dates, times, timezones and calendars.
    -
    -
    -

    -Introduction

    -

    There are several important flaws in the standard C, C++ and Boost libraries that handle dates and time:

    -
      -
    1. The biggest flaw of most libraries that provide operations over dates is the fact that they only support the Gregorian calendar. boost::date_time , std::tm , and standard functions like localtime and gmtime, all assume the Gregorian calendar.
    2. -
    3. The information about local start of week is not provided.
      - For example the standard C and C++ library has mktime and localtime, but they do not give user the information about the first day of week. This information is locale dependent. It is Monday in France and it is Sunday in United States.
    4. -
    -

    Boost.Locale provides generic date_time, and calendar classes that allow you to perform operations on dates and times for non-Gregorian calendars such as Hebrew, Islamic, Japanese and others.

    -

    Non-ICU based backends support the Gregorian calendar only. Unlike boost::date_time, they are fully aware of the local first day of week. Thus, if the current day of week is Monday, then setting "current day of week" to Sunday would move the actual date 6 days forward in Russian or French locales and move one day backward in USA and Israeli locales.

    -

    -Handling Dates and Time

    -
      -
    • boost::locale::calendar – represents generic information about the calendar, independent from a specific time point. For example, you can get the maximum number of days in a month for a specific calendar.
    • -
    • boost::locale::date_time – represents a time point. It is constructed from a calendar and allows manipulation of various time periods.
    • -
    • boost::locale::period – holds a list of functions that represent various periods, such as month, year, day, and hour, allowing manipulation of dates and times. You can add periods, multiply them by integers, get or set them, or add them to date_time objects.
    • -
    -

    For example:

    -
    using namespace boost::locale;
    -
    date_time now; // Create date_time class with default calendar initialized to current time
    -
    date_time tomorrow = now + period::day();
    -
    cout << "Let's meet tomorrow at " << as::date << tomorrow << endl;
    -
    date_time some_point = period::year(1995) + period::january() + period::day(1);
    -
    // Set some_point's date to 1995-Jan-1.
    -
    cout << "The "<< as::date << some_point << " is the "
    -
    << as::ordinal << some_point / period::day_of_week_local() << " day of the week" << endl;
    -

    You can calculate the difference between dates by dividing the difference by a period:

    -
    date_time now;
    -
    cout << " There are " << (now + 2 * period::month() - now) / period::day() << " days "
    -
    "between " << as::date << now << " and " << now + 2*period::month() << endl;
    -

    You can also use different syntax (less operator overloading)

    -
    date_time now;
    -
    cout << " There are " << period::day(now + period::month(2) - now) << " days "
    -
    "between " << as::date << now << " and " << now + period::month(2) << endl;
    -

    date_time – provides the member functions minimum and maximum to get the information about smallest and largest possible values of a certain period for a specific time.

    -

    For example, for February the maximum(period::day()) would be 28 (or 29 for a leap year), and for January it would be 31.

    -
    Note
    Be very careful with assumptions about calendars. For example, in the Hebrew calendar, the number of months is different for leap years and non-leap years.
    -

    We recommend you to look at the calendar.cpp example provided with this library to get an understanding of how to manipulate dates and times using these classes.

    -

    To convert between various calendar dates, you may get the current POSIX time via the time member function.

    -

    For example:

    -
    using namespace boost::locale;
    -
    using namespace boost::locale::period;
    - -
    // Create locales with Hebrew and Gregorian (default) calendars.
    -
    std::locale l_hebrew=gen("en_US.UTF-8@calendar=hebrew");
    -
    std::locale l_gregorian=gen("en_US.UTF-8");
    -
    -
    // Create a Gregorian date from fields
    -
    date_time greg(year(2010) + february() + day(5),l_gregorian);
    -
    // Assign a time point taken from the Gregorian date to date_time with
    -
    // the Hebrew calendar
    -
    date_time heb(greg.time(),l_hebrew);
    -
    // Now we can query the year.
    -
    std::cout << "Hebrew year is " << heb / year << std::endl;
    -
    Note
    -

    Non-ICU based backends support the same date-time range as mktime and localtime C library functions.

    -
      -
    • Unix 32 bit: dates between 1901 and 2038
    • -
    • Unix 64 bit: dates from 1 BC
    • -
    • Windows: dates from 1970. If the time_t is 32 bits wide (mingw), then the upper limit is year 2038
    • -
    -

    -Time Zone

    -

    The current operating system's time zone is used by default, however the time zone can be modified at several different levels:

    -
      -
    1. Calendar level: you can specify a timezone when creating a new instance of boost::locale::calendar in its constructor.
    2. -
    3. iostream level: you can use as::time_zone manipulator to set a specific time zone to the iostream so all dates and times would be represented in this time zone
    4. -
    5. You can specify the default global time zone by calling: boost::locale::time_zone::global(std::string const &). This time zone would be the default one for newly created iostream object and calendar instances.
    6. -
    -
    Note
    -

    Non-ICU based backends support only two kinds of time zones:

    -
      -
    1. The current OS time zone, as it is handled by localtime and mktime the standard library functions - the default time zone
    2. -
    3. Simple time zone in format "GMT+HH:MM" - the time zone represented using fixed shift from the UTC without support of daylight saving time.
    4. -
    -

    -I/O Operations on date_time objects

    -

    Writing a date_time is equivalent to:

    -
      -
    • Applying as::datetime manipulator on the stream
    • -
    • Writing POSIX time as number that is fetched by calling date_time::time() function.
    • -
    • Reverting the manipulator effect back.
    • -
    -

    For example this code:

    -
    using namespace boost::locale;
    - -
    std::cout << now << std::endl;
    -

    Would print in the default format, something like:

    -
    2/3/2011 12:00 am
    -

    However if you need to change the default behavior (for example show only date), then you need to use specific iostream manipulator in order to display current date or time, it would override the default formatting.

    -

    For example

    -
    using namespace boost::locale;
    - -
    std::cout << as::date << now << std::endl;
    -

    Would print something like:

    -
    2/3/2011
    -

    This is important to remember that date_time object is always rendered and parsed in the context of the iostream's locale and time zone and not in the context of specific date_time object.

    -

    -Questions and Answers

    -

    Why should I use Boost.Locale over Boost.DateTime when I need Gregorian calendar only?

    -
      -
    • Boost.DateTime is locale agnostic library and ignores the fact that the first day of week varies by the locale.
    • -
    • Boost.Locale provides a unified access to date and time in time zone aware way. It represents a time as universal scalar - the POSIX time and over that builds dates, local times and time-zones handling.
      - For example, date_time(some_time.time() + 3600) may be not equal to some_time + hour(), because of the daylight savings time.
    • -
    -

    Why don't you use Boost.DateTime time zone support?

    -

    Boost.DateTime's time zone support is broken. Time zones can not be represented with a simple table of rules where daylight saving depend only on certain n'th day of week in month. The daylight savings time may vary by year, political issues and many other things.

    -

    Most of the modern operating systems (Linux, *BSD, Mac OS X, OpenVMS) and many important software packages (ICU, Java, Python) use so called Olson database in order to handle daylight saving time correctly.

    -

    If you need full time zone database support, then you should use ICU library.

    -
    -
    - - - - - - diff --git a/doc/html/default_encoding_under_windows.html b/doc/html/default_encoding_under_windows.html deleted file mode 100644 index 3062cab5..00000000 --- a/doc/html/default_encoding_under_windows.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - -Boost.Locale: Default Encoding under Microsoft Windows - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    Default Encoding under Microsoft Windows
    -
    -
    -

    All modern operating systems use Unicode.

    -
      -
    • Unix operating system family use UTF-8 encoding by default.
    • -
    • Microsoft Windows had migrated to Wide/UTF-16 API. The narrow encodings had been deprecated and the native OS API became so called "Wide API"
    • -
    -

    As a result of radically different approaches, it is very hard to write portable Unicode aware applications.

    -

    Boost Locale fully supports both narrow and wide API. The default character encoding is assumed to be UTF-8 on Windows.

    -

    So if the default operating system Locale is "English_USA.1252" the default locale for Boost.Locale on Windows would be "en_US.UTF-8".

    -

    When the created locale object is installed globally then any libraries that use std::codecvt for conversion between narrow API and the native wide API would handle UTF-8 correctly.

    -

    A good example of such library is Boost.Filesystem v3.

    -

    For example

    -
    #include <boost/locale.hpp>
    -
    #include <boost/filesystem/path.hpp>
    -
    #include <boost/filesystem/fstream.hpp>
    -
    -
    int main()
    -
    {
    -
    // Create and install global locale
    -
    std::locale::global(boost::locale::generator().generate(""));
    -
    // Make boost.filesystem use it
    -
    boost::filesystem::path::imbue(std::locale());
    -
    // Now Works perfectly fine with UTF-8!
    -
    boost::filesystem::ofstream hello("שלום.txt");
    -
    }
    -

    However such behavior may break existing software that assumes that the current encoding is single byte encodings like code page 1252.

    -

    boost::locale::generator class has a property use_ansi_encoding() that allows to change the behavior to legacy one and select an ANSI code page as default system encoding.

    -

    So, when the current locale is "English_USA.1252" and the use_ansi_encoding is turned on then the default locale would be "en_US.windows-1252"

    -
    Note
    winapi backend does not support ANSI encodings, thus UTF-8 encoding is always used for narrow characters.
    -
    -
    - - - - - - diff --git a/doc/html/definitions_8hpp_source.html b/doc/html/definitions_8hpp_source.html deleted file mode 100644 index fc65be9f..00000000 --- a/doc/html/definitions_8hpp_source.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - -Boost.Locale: boost/locale/definitions.hpp Source File - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    definitions.hpp
    -
    -
    -
    1 //
    -
    2 // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
    -
    3 //
    -
    4 // Distributed under the Boost Software License, Version 1.0. (See
    -
    5 // accompanying file LICENSE_1_0.txt or copy at
    -
    6 // http://www.boost.org/LICENSE_1_0.txt)
    -
    7 //
    -
    8 #ifndef BOOST_LOCALE_DEFINITIONS_HPP_INCLUDED
    -
    9 #define BOOST_LOCALE_DEFINITIONS_HPP_INCLUDED
    -
    10 
    -
    11 #include <boost/config.hpp>
    -
    12 
    -
    13 // Support older ICU versions
    -
    14 #ifndef BOOST_SYMBOL_VISIBLE
    -
    15 # define BOOST_SYMBOL_VISIBLE
    -
    16 #endif
    -
    17 
    -
    18 #ifdef BOOST_HAS_DECLSPEC
    -
    19 # if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_LOCALE_DYN_LINK)
    -
    20 # ifdef BOOST_LOCALE_SOURCE
    -
    21 # define BOOST_LOCALE_DECL BOOST_SYMBOL_EXPORT
    -
    22 # else
    -
    23 # define BOOST_LOCALE_DECL BOOST_SYMBOL_IMPORT
    -
    24 # endif // BOOST_LOCALE_SOURCE
    -
    25 # endif // DYN_LINK
    -
    26 #endif // BOOST_HAS_DECLSPEC
    -
    27 
    -
    28 #ifndef BOOST_LOCALE_DECL
    -
    29 # define BOOST_LOCALE_DECL
    -
    30 #endif
    -
    31 
    -
    32 #endif // boost/locale/config.hpp
    -
    33 // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
    -
    34 
    -
    -
    - - - - - - diff --git a/doc/html/dir_3766567721029811f1987dd2bae66bec.html b/doc/html/dir_3766567721029811f1987dd2bae66bec.html deleted file mode 100644 index c8d43f82..00000000 --- a/doc/html/dir_3766567721029811f1987dd2bae66bec.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - -Boost.Locale: boost/locale/boundary Directory Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boundary Directory Reference
    -
    -
    - - - - - - - - - - - - -

    -Files

    file  boundary_point.hpp [code]
     
    file  facets.hpp [code]
     
    file  index.hpp [code]
     
    file  segment.hpp [code]
     
    file  types.hpp [code]
     
    -
    -
    - - - - - - diff --git a/doc/html/dir_3766567721029811f1987dd2bae66bec.js b/doc/html/dir_3766567721029811f1987dd2bae66bec.js deleted file mode 100644 index 1c3bb93d..00000000 --- a/doc/html/dir_3766567721029811f1987dd2bae66bec.js +++ /dev/null @@ -1,8 +0,0 @@ -var dir_3766567721029811f1987dd2bae66bec = -[ - [ "boundary_point.hpp", "boundary__point_8hpp_source.html", null ], - [ "facets.hpp", "facets_8hpp_source.html", null ], - [ "index.hpp", "index_8hpp_source.html", null ], - [ "segment.hpp", "segment_8hpp_source.html", null ], - [ "types.hpp", "types_8hpp_source.html", null ] -]; \ No newline at end of file diff --git a/doc/html/dir_420b709140677111ffb4101b86320b19.html b/doc/html/dir_420b709140677111ffb4101b86320b19.html deleted file mode 100644 index c48fae72..00000000 --- a/doc/html/dir_420b709140677111ffb4101b86320b19.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - -Boost.Locale: boost/locale Directory Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    locale Directory Reference
    -
    -
    - - - - -

    -Directories

    directory  boundary
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Files

    file  boundary.hpp [code]
     
    file  collator.hpp [code]
     
    file  config.hpp [code]
     
    file  conversion.hpp [code]
     
    file  date_time.hpp [code]
     
    file  date_time_facet.hpp [code]
     
    file  definitions.hpp [code]
     
    file  encoding.hpp [code]
     
    file  encoding_errors.hpp [code]
     
    file  encoding_utf.hpp [code]
     
    file  format.hpp [code]
     
    file  formatting.hpp [code]
     
    file  generator.hpp [code]
     
    file  generic_codecvt.hpp [code]
     
    file  gnu_gettext.hpp [code]
     
    file  hold_ptr.hpp [code]
     
    file  info.hpp [code]
     
    file  localization_backend.hpp [code]
     
    file  message.hpp [code]
     
    file  time_zone.hpp [code]
     
    file  utf.hpp [code]
     
    file  utf8_codecvt.hpp [code]
     
    file  util.hpp [code]
     
    -
    -
    - - - - - - diff --git a/doc/html/dir_420b709140677111ffb4101b86320b19.js b/doc/html/dir_420b709140677111ffb4101b86320b19.js deleted file mode 100644 index c686b048..00000000 --- a/doc/html/dir_420b709140677111ffb4101b86320b19.js +++ /dev/null @@ -1,27 +0,0 @@ -var dir_420b709140677111ffb4101b86320b19 = -[ - [ "boundary", "dir_3766567721029811f1987dd2bae66bec.html", "dir_3766567721029811f1987dd2bae66bec" ], - [ "boundary.hpp", "boundary_8hpp_source.html", null ], - [ "collator.hpp", "collator_8hpp_source.html", null ], - [ "config.hpp", "config_8hpp_source.html", null ], - [ "conversion.hpp", "conversion_8hpp_source.html", null ], - [ "date_time.hpp", "date__time_8hpp_source.html", null ], - [ "date_time_facet.hpp", "date__time__facet_8hpp_source.html", null ], - [ "definitions.hpp", "definitions_8hpp_source.html", null ], - [ "encoding.hpp", "encoding_8hpp_source.html", null ], - [ "encoding_errors.hpp", "encoding__errors_8hpp_source.html", null ], - [ "encoding_utf.hpp", "encoding__utf_8hpp_source.html", null ], - [ "format.hpp", "format_8hpp_source.html", null ], - [ "formatting.hpp", "formatting_8hpp_source.html", null ], - [ "generator.hpp", "generator_8hpp_source.html", null ], - [ "generic_codecvt.hpp", "generic__codecvt_8hpp_source.html", null ], - [ "gnu_gettext.hpp", "gnu__gettext_8hpp_source.html", null ], - [ "hold_ptr.hpp", "hold__ptr_8hpp_source.html", null ], - [ "info.hpp", "info_8hpp_source.html", null ], - [ "localization_backend.hpp", "localization__backend_8hpp_source.html", null ], - [ "message.hpp", "message_8hpp_source.html", null ], - [ "time_zone.hpp", "time__zone_8hpp_source.html", null ], - [ "utf.hpp", "utf_8hpp_source.html", null ], - [ "utf8_codecvt.hpp", "utf8__codecvt_8hpp_source.html", null ], - [ "util.hpp", "util_8hpp_source.html", null ] -]; \ No newline at end of file diff --git a/doc/html/dir_c8984f1860c11f62f47abb6761e46c1e.html b/doc/html/dir_c8984f1860c11f62f47abb6761e46c1e.html deleted file mode 100644 index f1615380..00000000 --- a/doc/html/dir_c8984f1860c11f62f47abb6761e46c1e.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - -Boost.Locale: boost Directory Reference - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    boost Directory Reference
    -
    -
    - - - - -

    -Directories

    directory  locale
     
    -
    -
    - - - - - - diff --git a/doc/html/dir_c8984f1860c11f62f47abb6761e46c1e.js b/doc/html/dir_c8984f1860c11f62f47abb6761e46c1e.js deleted file mode 100644 index f1a9496d..00000000 --- a/doc/html/dir_c8984f1860c11f62f47abb6761e46c1e.js +++ /dev/null @@ -1,4 +0,0 @@ -var dir_c8984f1860c11f62f47abb6761e46c1e = -[ - [ "locale", "dir_420b709140677111ffb4101b86320b19.html", "dir_420b709140677111ffb4101b86320b19" ] -]; \ No newline at end of file diff --git a/doc/html/doxygen.css b/doc/html/doxygen.css deleted file mode 100644 index f0f36f89..00000000 --- a/doc/html/doxygen.css +++ /dev/null @@ -1,1366 +0,0 @@ -/* The standard CSS for doxygen 1.8.6 */ - -body, table, div, p, dl { - font: 400 14px/22px Roboto,sans-serif; -} - -/* @group Heading Levels */ - -h1.groupheader { - font-size: 150%; -} - -.title { - font: 400 14px/28px Roboto,sans-serif; - font-size: 150%; - font-weight: bold; - margin: 10px 2px; -} - -h2.groupheader { - border-bottom: 1px solid #879ECB; - color: #354C7B; - font-size: 150%; - font-weight: normal; - margin-top: 1.75em; - padding-top: 8px; - padding-bottom: 4px; - width: 100%; -} - -h3.groupheader { - font-size: 100%; -} - -h1, h2, h3, h4, h5, h6 { - -webkit-transition: text-shadow 0.5s linear; - -moz-transition: text-shadow 0.5s linear; - -ms-transition: text-shadow 0.5s linear; - -o-transition: text-shadow 0.5s linear; - transition: text-shadow 0.5s linear; - margin-right: 15px; -} - -h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { - text-shadow: 0 0 15px cyan; -} - -dt { - font-weight: bold; -} - -div.multicol { - -moz-column-gap: 1em; - -webkit-column-gap: 1em; - -moz-column-count: 3; - -webkit-column-count: 3; -} - -p.startli, p.startdd { - margin-top: 2px; -} - -p.starttd { - margin-top: 0px; -} - -p.endli { - margin-bottom: 0px; -} - -p.enddd { - margin-bottom: 4px; -} - -p.endtd { - margin-bottom: 2px; -} - -/* @end */ - -caption { - font-weight: bold; -} - -span.legend { - font-size: 70%; - text-align: center; -} - -h3.version { - font-size: 90%; - text-align: center; -} - -div.qindex, div.navtab{ - background-color: #EBEFF6; - border: 1px solid #A3B4D7; - text-align: center; -} - -div.qindex, div.navpath { - width: 100%; - line-height: 140%; -} - -div.navtab { - margin-right: 15px; -} - -/* @group Link Styling */ - -a { - color: #3D578C; - font-weight: normal; - text-decoration: none; -} - -.contents a:visited { - color: #4665A2; -} - -a:hover { - text-decoration: underline; -} - -a.qindex { - font-weight: bold; -} - -a.qindexHL { - font-weight: bold; - background-color: #9CAFD4; - color: #ffffff; - border: 1px double #869DCA; -} - -.contents a.qindexHL:visited { - color: #ffffff; -} - -a.el { - font-weight: bold; -} - -a.elRef { -} - -a.code, a.code:visited, a.line, a.line:visited { - color: #4665A2; -} - -a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { - color: #4665A2; -} - -/* @end */ - -dl.el { - margin-left: -1cm; -} - -pre.fragment { - border: 1px solid #C4CFE5; - background-color: #FBFCFD; - padding: 4px 6px; - margin: 4px 8px 4px 2px; - overflow: auto; - word-wrap: break-word; - font-size: 9pt; - line-height: 125%; - font-family: monospace, fixed; - font-size: 105%; -} - -div.fragment { - padding: 4px 6px; - margin: 4px 8px 4px 2px; - background-color: #FBFCFD; - border: 1px solid #C4CFE5; -} - -div.line { - font-family: monospace, fixed; - font-size: 13px; - min-height: 13px; - line-height: 1.0; - text-wrap: unrestricted; - white-space: -moz-pre-wrap; /* Moz */ - white-space: -pre-wrap; /* Opera 4-6 */ - white-space: -o-pre-wrap; /* Opera 7 */ - white-space: pre-wrap; /* CSS3 */ - word-wrap: break-word; /* IE 5.5+ */ - text-indent: -53px; - padding-left: 53px; - padding-bottom: 0px; - margin: 0px; - -webkit-transition-property: background-color, box-shadow; - -webkit-transition-duration: 0.5s; - -moz-transition-property: background-color, box-shadow; - -moz-transition-duration: 0.5s; - -ms-transition-property: background-color, box-shadow; - -ms-transition-duration: 0.5s; - -o-transition-property: background-color, box-shadow; - -o-transition-duration: 0.5s; - transition-property: background-color, box-shadow; - transition-duration: 0.5s; -} - -div.line.glow { - background-color: cyan; - box-shadow: 0 0 10px cyan; -} - - -span.lineno { - padding-right: 4px; - text-align: right; - border-right: 2px solid #0F0; - background-color: #E8E8E8; - white-space: pre; -} -span.lineno a { - background-color: #D8D8D8; -} - -span.lineno a:hover { - background-color: #C8C8C8; -} - -div.ah { - background-color: black; - font-weight: bold; - color: #ffffff; - margin-bottom: 3px; - margin-top: 3px; - padding: 0.2em; - border: solid thin #333; - border-radius: 0.5em; - -webkit-border-radius: .5em; - -moz-border-radius: .5em; - box-shadow: 2px 2px 3px #999; - -webkit-box-shadow: 2px 2px 3px #999; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; - background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); - background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); -} - -div.groupHeader { - margin-left: 16px; - margin-top: 12px; - font-weight: bold; -} - -div.groupText { - margin-left: 16px; - font-style: italic; -} - -body { - background-color: white; - color: black; - margin: 0; -} - -div.contents { - margin-top: 10px; - margin-left: 12px; - margin-right: 8px; -} - -td.indexkey { - background-color: #EBEFF6; - font-weight: bold; - border: 1px solid #C4CFE5; - margin: 2px 0px 2px 0; - padding: 2px 10px; - white-space: nowrap; - vertical-align: top; -} - -td.indexvalue { - background-color: #EBEFF6; - border: 1px solid #C4CFE5; - padding: 2px 10px; - margin: 2px 0px; -} - -tr.memlist { - background-color: #EEF1F7; -} - -p.formulaDsp { - text-align: center; -} - -img.formulaDsp { - -} - -img.formulaInl { - vertical-align: middle; -} - -div.center { - text-align: center; - margin-top: 0px; - margin-bottom: 0px; - padding: 0px; -} - -div.center img { - border: 0px; -} - -address.footer { - text-align: right; - padding-right: 12px; -} - -img.footer { - border: 0px; - vertical-align: middle; -} - -/* @group Code Colorization */ - -span.keyword { - color: #008000 -} - -span.keywordtype { - color: #604020 -} - -span.keywordflow { - color: #e08000 -} - -span.comment { - color: #800000 -} - -span.preprocessor { - color: #806020 -} - -span.stringliteral { - color: #002080 -} - -span.charliteral { - color: #008080 -} - -span.vhdldigit { - color: #ff00ff -} - -span.vhdlchar { - color: #000000 -} - -span.vhdlkeyword { - color: #700070 -} - -span.vhdllogic { - color: #ff0000 -} - -blockquote { - background-color: #F7F8FB; - border-left: 2px solid #9CAFD4; - margin: 0 24px 0 4px; - padding: 0 12px 0 16px; -} - -/* @end */ - -/* -.search { - color: #003399; - font-weight: bold; -} - -form.search { - margin-bottom: 0px; - margin-top: 0px; -} - -input.search { - font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #e8eef2; -} -*/ - -td.tiny { - font-size: 75%; -} - -.dirtab { - padding: 4px; - border-collapse: collapse; - border: 1px solid #A3B4D7; -} - -th.dirtab { - background: #EBEFF6; - font-weight: bold; -} - -hr { - height: 0px; - border: none; - border-top: 1px solid #4A6AAA; -} - -hr.footer { - height: 1px; -} - -/* @group Member Descriptions */ - -table.memberdecls { - border-spacing: 0px; - padding: 0px; -} - -.memberdecls td, .fieldtable tr { - -webkit-transition-property: background-color, box-shadow; - -webkit-transition-duration: 0.5s; - -moz-transition-property: background-color, box-shadow; - -moz-transition-duration: 0.5s; - -ms-transition-property: background-color, box-shadow; - -ms-transition-duration: 0.5s; - -o-transition-property: background-color, box-shadow; - -o-transition-duration: 0.5s; - transition-property: background-color, box-shadow; - transition-duration: 0.5s; -} - -.memberdecls td.glow, .fieldtable tr.glow { - background-color: cyan; - box-shadow: 0 0 15px cyan; -} - -.mdescLeft, .mdescRight, -.memItemLeft, .memItemRight, -.memTemplItemLeft, .memTemplItemRight, .memTemplParams { - background-color: #F9FAFC; - border: none; - margin: 4px; - padding: 1px 0 0 8px; -} - -.mdescLeft, .mdescRight { - padding: 0px 8px 4px 8px; - color: #555; -} - -.memSeparator { - border-bottom: 1px solid #DEE4F0; - line-height: 1px; - margin: 0px; - padding: 0px; -} - -.memItemLeft, .memTemplItemLeft { - white-space: nowrap; -} - -.memItemRight { - width: 100%; -} - -.memTemplParams { - color: #4665A2; - white-space: nowrap; - font-size: 80%; -} - -/* @end */ - -/* @group Member Details */ - -/* Styles for detailed member documentation */ - -.memtemplate { - font-size: 80%; - color: #4665A2; - font-weight: normal; - margin-left: 9px; -} - -.memnav { - background-color: #EBEFF6; - border: 1px solid #A3B4D7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} - -.mempage { - width: 100%; -} - -.memitem { - padding: 0; - margin-bottom: 10px; - margin-right: 5px; - -webkit-transition: box-shadow 0.5s linear; - -moz-transition: box-shadow 0.5s linear; - -ms-transition: box-shadow 0.5s linear; - -o-transition: box-shadow 0.5s linear; - transition: box-shadow 0.5s linear; - display: table !important; - width: 100%; -} - -.memitem.glow { - box-shadow: 0 0 15px cyan; -} - -.memname { - font-weight: bold; - margin-left: 6px; -} - -.memname td { - vertical-align: bottom; -} - -.memproto, dl.reflist dt { - border-top: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; - padding: 6px 0px 6px 0px; - color: #253555; - font-weight: bold; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - background-image:url('nav_f.png'); - background-repeat:repeat-x; - background-color: #E2E8F2; - /* opera specific markup */ - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - border-top-right-radius: 4px; - border-top-left-radius: 4px; - /* firefox specific markup */ - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - -moz-border-radius-topright: 4px; - -moz-border-radius-topleft: 4px; - /* webkit specific markup */ - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - -webkit-border-top-right-radius: 4px; - -webkit-border-top-left-radius: 4px; - -} - -.memdoc, dl.reflist dd { - border-bottom: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; - padding: 6px 10px 2px 10px; - background-color: #FBFCFD; - border-top-width: 0; - background-image:url('nav_g.png'); - background-repeat:repeat-x; - background-color: #FFFFFF; - /* opera specific markup */ - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - /* firefox specific markup */ - -moz-border-radius-bottomleft: 4px; - -moz-border-radius-bottomright: 4px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - /* webkit specific markup */ - -webkit-border-bottom-left-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -} - -dl.reflist dt { - padding: 5px; -} - -dl.reflist dd { - margin: 0px 0px 10px 0px; - padding: 5px; -} - -.paramkey { - text-align: right; -} - -.paramtype { - white-space: nowrap; -} - -.paramname { - color: #602020; - white-space: nowrap; -} -.paramname em { - font-style: normal; -} -.paramname code { - line-height: 14px; -} - -.params, .retval, .exception, .tparams { - margin-left: 0px; - padding-left: 0px; -} - -.params .paramname, .retval .paramname { - font-weight: bold; - vertical-align: top; -} - -.params .paramtype { - font-style: italic; - vertical-align: top; -} - -.params .paramdir { - font-family: "courier new",courier,monospace; - vertical-align: top; -} - -table.mlabels { - border-spacing: 0px; -} - -td.mlabels-left { - width: 100%; - padding: 0px; -} - -td.mlabels-right { - vertical-align: bottom; - padding: 0px; - white-space: nowrap; -} - -span.mlabels { - margin-left: 8px; -} - -span.mlabel { - background-color: #728DC1; - border-top:1px solid #5373B4; - border-left:1px solid #5373B4; - border-right:1px solid #C4CFE5; - border-bottom:1px solid #C4CFE5; - text-shadow: none; - color: white; - margin-right: 4px; - padding: 2px 3px; - border-radius: 3px; - font-size: 7pt; - white-space: nowrap; - vertical-align: middle; -} - - - -/* @end */ - -/* these are for tree view when not used as main index */ - -div.directory { - margin: 10px 0px; - border-top: 1px solid #A8B8D9; - border-bottom: 1px solid #A8B8D9; - width: 100%; -} - -.directory table { - border-collapse:collapse; -} - -.directory td { - margin: 0px; - padding: 0px; - vertical-align: top; -} - -.directory td.entry { - white-space: nowrap; - padding-right: 6px; - padding-top: 3px; -} - -.directory td.entry a { - outline:none; -} - -.directory td.entry a img { - border: none; -} - -.directory td.desc { - width: 100%; - padding-left: 6px; - padding-right: 6px; - padding-top: 3px; - border-left: 1px solid rgba(0,0,0,0.05); -} - -.directory tr.even { - padding-left: 6px; - background-color: #F7F8FB; -} - -.directory img { - vertical-align: -30%; -} - -.directory .levels { - white-space: nowrap; - width: 100%; - text-align: right; - font-size: 9pt; -} - -.directory .levels span { - cursor: pointer; - padding-left: 2px; - padding-right: 2px; - color: #3D578C; -} - -div.dynheader { - margin-top: 8px; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -address { - font-style: normal; - color: #2A3D61; -} - -table.doxtable { - border-collapse:collapse; - margin-top: 4px; - margin-bottom: 4px; -} - -table.doxtable td, table.doxtable th { - border: 1px solid #2D4068; - padding: 3px 7px 2px; -} - -table.doxtable th { - background-color: #374F7F; - color: #FFFFFF; - font-size: 110%; - padding-bottom: 4px; - padding-top: 5px; -} - -table.fieldtable { - /*width: 100%;*/ - margin-bottom: 10px; - border: 1px solid #A8B8D9; - border-spacing: 0px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; - -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); - box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); -} - -.fieldtable td, .fieldtable th { - padding: 3px 7px 2px; -} - -.fieldtable td.fieldtype, .fieldtable td.fieldname { - white-space: nowrap; - border-right: 1px solid #A8B8D9; - border-bottom: 1px solid #A8B8D9; - vertical-align: top; -} - -.fieldtable td.fieldname { - padding-top: 3px; -} - -.fieldtable td.fielddoc { - border-bottom: 1px solid #A8B8D9; - /*width: 100%;*/ -} - -.fieldtable td.fielddoc p:first-child { - margin-top: 0px; -} - -.fieldtable td.fielddoc p:last-child { - margin-bottom: 2px; -} - -.fieldtable tr:last-child td { - border-bottom: none; -} - -.fieldtable th { - background-image:url('nav_f.png'); - background-repeat:repeat-x; - background-color: #E2E8F2; - font-size: 90%; - color: #253555; - padding-bottom: 4px; - padding-top: 5px; - text-align:left; - -moz-border-radius-topleft: 4px; - -moz-border-radius-topright: 4px; - -webkit-border-top-left-radius: 4px; - -webkit-border-top-right-radius: 4px; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - border-bottom: 1px solid #A8B8D9; -} - - -.tabsearch { - top: 0px; - left: 10px; - height: 36px; - background-image: url('tab_b.png'); - z-index: 101; - overflow: hidden; - font-size: 13px; -} - -.navpath ul -{ - font-size: 11px; - background-image:url('tab_b.png'); - background-repeat:repeat-x; - background-position: 0 -5px; - height:30px; - line-height:30px; - color:#8AA0CC; - border:solid 1px #C2CDE4; - overflow:hidden; - margin:0px; - padding:0px; -} - -.navpath li -{ - list-style-type:none; - float:left; - padding-left:10px; - padding-right:15px; - background-image:url('bc_s.png'); - background-repeat:no-repeat; - background-position:right; - color:#364D7C; -} - -.navpath li.navelem a -{ - height:32px; - display:block; - text-decoration: none; - outline: none; - color: #283A5D; - font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - text-decoration: none; -} - -.navpath li.navelem a:hover -{ - color:#6884BD; -} - -.navpath li.footer -{ - list-style-type:none; - float:right; - padding-left:10px; - padding-right:15px; - background-image:none; - background-repeat:no-repeat; - background-position:right; - color:#364D7C; - font-size: 8pt; -} - - -div.summary -{ - float: right; - font-size: 8pt; - padding-right: 5px; - width: 50%; - text-align: right; -} - -div.summary a -{ - white-space: nowrap; -} - -div.ingroups -{ - font-size: 8pt; - width: 50%; - text-align: left; -} - -div.ingroups a -{ - white-space: nowrap; -} - -div.header -{ - background-image:url('nav_h.png'); - background-repeat:repeat-x; - background-color: #F9FAFC; - margin: 0px; - border-bottom: 1px solid #C4CFE5; -} - -div.headertitle -{ - padding: 5px 5px 5px 10px; -} - -dl -{ - padding: 0 0 0 10px; -} - -/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ -dl.section -{ - margin-left: 0px; - padding-left: 0px; -} - -dl.note -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #D0C000; -} - -dl.warning, dl.attention -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #FF0000; -} - -dl.pre, dl.post, dl.invariant -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #00D000; -} - -dl.deprecated -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #505050; -} - -dl.todo -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #00C0E0; -} - -dl.test -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #3030E0; -} - -dl.bug -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #C08050; -} - -dl.section dd { - margin-bottom: 6px; -} - - -#projectlogo -{ - text-align: center; - vertical-align: bottom; - border-collapse: separate; -} - -#projectlogo img -{ - border: 0px none; -} - -#projectname -{ - font: 300% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 2px 0px; -} - -#projectbrief -{ - font: 120% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 0px; -} - -#projectnumber -{ - font: 50% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 0px; -} - -#titlearea -{ - padding: 0px; - margin: 0px; - width: 100%; - border-bottom: 1px solid #5373B4; -} - -.image -{ - text-align: center; -} - -.dotgraph -{ - text-align: center; -} - -.mscgraph -{ - text-align: center; -} - -.diagraph -{ - text-align: center; -} - -.caption -{ - font-weight: bold; -} - -div.zoom -{ - border: 1px solid #90A5CE; -} - -dl.citelist { - margin-bottom:50px; -} - -dl.citelist dt { - color:#334975; - float:left; - font-weight:bold; - margin-right:10px; - padding:5px; -} - -dl.citelist dd { - margin:2px 0; - padding:5px 0; -} - -div.toc { - padding: 14px 25px; - background-color: #F4F6FA; - border: 1px solid #D8DFEE; - border-radius: 7px 7px 7px 7px; - float: right; - height: auto; - margin: 0 20px 10px 10px; - width: 200px; -} - -div.toc li { - background: url("bdwn.png") no-repeat scroll 0 5px transparent; - font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; - margin-top: 5px; - padding-left: 10px; - padding-top: 2px; -} - -div.toc h3 { - font: bold 12px/1.2 Arial,FreeSans,sans-serif; - color: #4665A2; - border-bottom: 0 none; - margin: 0; -} - -div.toc ul { - list-style: none outside none; - border: medium none; - padding: 0px; -} - -div.toc li.level1 { - margin-left: 0px; -} - -div.toc li.level2 { - margin-left: 15px; -} - -div.toc li.level3 { - margin-left: 30px; -} - -div.toc li.level4 { - margin-left: 45px; -} - -.inherit_header { - font-weight: bold; - color: gray; - cursor: pointer; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.inherit_header td { - padding: 6px 0px 2px 5px; -} - -.inherit { - display: none; -} - -tr.heading h2 { - margin-top: 12px; - margin-bottom: 4px; -} - -/* tooltip related style info */ - -.ttc { - position: absolute; - display: none; -} - -#powerTip { - cursor: default; - white-space: nowrap; - background-color: white; - border: 1px solid gray; - border-radius: 4px 4px 4px 4px; - box-shadow: 1px 1px 7px gray; - display: none; - font-size: smaller; - max-width: 80%; - opacity: 0.9; - padding: 1ex 1em 1em; - position: absolute; - z-index: 2147483647; -} - -#powerTip div.ttdoc { - color: grey; - font-style: italic; -} - -#powerTip div.ttname a { - font-weight: bold; -} - -#powerTip div.ttname { - font-weight: bold; -} - -#powerTip div.ttdeci { - color: #006318; -} - -#powerTip div { - margin: 0px; - padding: 0px; - font: 12px/16px Roboto,sans-serif; -} - -#powerTip:before, #powerTip:after { - content: ""; - position: absolute; - margin: 0px; -} - -#powerTip.n:after, #powerTip.n:before, -#powerTip.s:after, #powerTip.s:before, -#powerTip.w:after, #powerTip.w:before, -#powerTip.e:after, #powerTip.e:before, -#powerTip.ne:after, #powerTip.ne:before, -#powerTip.se:after, #powerTip.se:before, -#powerTip.nw:after, #powerTip.nw:before, -#powerTip.sw:after, #powerTip.sw:before { - border: solid transparent; - content: " "; - height: 0; - width: 0; - position: absolute; -} - -#powerTip.n:after, #powerTip.s:after, -#powerTip.w:after, #powerTip.e:after, -#powerTip.nw:after, #powerTip.ne:after, -#powerTip.sw:after, #powerTip.se:after { - border-color: rgba(255, 255, 255, 0); -} - -#powerTip.n:before, #powerTip.s:before, -#powerTip.w:before, #powerTip.e:before, -#powerTip.nw:before, #powerTip.ne:before, -#powerTip.sw:before, #powerTip.se:before { - border-color: rgba(128, 128, 128, 0); -} - -#powerTip.n:after, #powerTip.n:before, -#powerTip.ne:after, #powerTip.ne:before, -#powerTip.nw:after, #powerTip.nw:before { - top: 100%; -} - -#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { - border-top-color: #ffffff; - border-width: 10px; - margin: 0px -10px; -} -#powerTip.n:before { - border-top-color: #808080; - border-width: 11px; - margin: 0px -11px; -} -#powerTip.n:after, #powerTip.n:before { - left: 50%; -} - -#powerTip.nw:after, #powerTip.nw:before { - right: 14px; -} - -#powerTip.ne:after, #powerTip.ne:before { - left: 14px; -} - -#powerTip.s:after, #powerTip.s:before, -#powerTip.se:after, #powerTip.se:before, -#powerTip.sw:after, #powerTip.sw:before { - bottom: 100%; -} - -#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { - border-bottom-color: #ffffff; - border-width: 10px; - margin: 0px -10px; -} - -#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { - border-bottom-color: #808080; - border-width: 11px; - margin: 0px -11px; -} - -#powerTip.s:after, #powerTip.s:before { - left: 50%; -} - -#powerTip.sw:after, #powerTip.sw:before { - right: 14px; -} - -#powerTip.se:after, #powerTip.se:before { - left: 14px; -} - -#powerTip.e:after, #powerTip.e:before { - left: 100%; -} -#powerTip.e:after { - border-left-color: #ffffff; - border-width: 10px; - top: 50%; - margin-top: -10px; -} -#powerTip.e:before { - border-left-color: #808080; - border-width: 11px; - top: 50%; - margin-top: -11px; -} - -#powerTip.w:after, #powerTip.w:before { - right: 100%; -} -#powerTip.w:after { - border-right-color: #ffffff; - border-width: 10px; - top: 50%; - margin-top: -10px; -} -#powerTip.w:before { - border-right-color: #808080; - border-width: 11px; - top: 50%; - margin-top: -11px; -} - -@media print -{ - #top { display: none; } - #side-nav { display: none; } - #nav-path { display: none; } - body { overflow:visible; } - h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } - .summary { display: none; } - .memitem { page-break-inside: avoid; } - #doc-content - { - margin-left:0 !important; - height:auto !important; - width:auto !important; - overflow:inherit; - display:inline; - } -} - diff --git a/doc/html/doxygen.png b/doc/html/doxygen.png deleted file mode 100644 index 3ff17d807fd8aa003bed8bb2a69e8f0909592fd1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3779 zcmV;!4m|ORP)tMIv#Q0*~7*`IBSO7_x;@a8#Zk6_PeKR_s92J&)(m+);m9Iz3blw)z#Gi zP!9lj4$%+*>Hz@HCmM9L9|8c+0u=!H$O3?R0Kgx|#WP<6fKfC8fM-CQZT|_r@`>VO zX^Hgb|9cJqpdJA5$MCEK`F_2@2Y@s>^+;pF`~jdI0Pvr|vl4`=C)EH@1IFe7pdJ8F zH(qGi004~QnF)Ggga~8v08kGAs2hKTATxr7pwfNk|4#_AaT>w8P6TV+R2kbS$v==} zAjf`s0g#V8lB+b3)5oEI*q+{Yt$MZDruD2^;$+(_%Qn+%v0X-bJO=;@kiJ^ygLBnC z?1OVv_%aex1M@jKU|Z~$eI?PoF4Vj>fDzyo zAiLfpXY*a^Sj-S5D0S3@#V$sRW)g)_1e#$%8xdM>Jm7?!h zu0P2X=xoN>^!4DoPRgph2(2va07yfpXF+WH7EOg1GY%Zn z7~1A<(z7Q$ktEXhW_?GMpHp9l_UL18F3KOsxu81pqoBiNbFSGsof-W z6~eloMoz=4?OOnl2J268x5rOY`dCk0us(uS#Ud4yqOr@?=Q57a}tit|BhY>}~frH1sP`ScHS_d)oqH^lYy zZ%VP`#10MlE~P?cE(%(#(AUSv_T{+;t@$U}El}(1ig`vZo`Rm;+5&(AYzJ^Ae=h2X z@Re%vHwZU>|f0NI&%$*4eJweC5OROQrpPMA@*w|o z()A==l}(@bv^&>H1Ob3C=<^|hob?0+xJ?QQ3-ueQC}zy&JQNib!OqSO@-=>XzxlSF zAZ^U*1l6EEmg3r};_HY>&Jo_{dOPEFTWPmt=U&F#+0(O59^UIlHbNX+eF8UzyDR*T z(=5X$VF3!gm@RooS-&iiUYGG^`hMR(07zr_xP`d!^BH?uD>Phl8Rdifx3Af^Zr`Ku ztL+~HkVeL#bJ)7;`=>;{KNRvjmc}1}c58Sr#Treq=4{xo!ATy|c>iRSp4`dzMMVd@ zL8?uwXDY}Wqgh4mH`|$BTXpUIu6A1-cSq%hJw;@^Zr8TP=GMh*p(m(tN7@!^D~sl$ zz^tf4II4|};+irE$Fnm4NTc5%p{PRA`%}Zk`CE5?#h3|xcyQsS#iONZ z6H(@^i9td!$z~bZiJLTax$o>r(p}3o@< zyD7%(>ZYvy=6$U3e!F{Z`uSaYy`xQyl?b{}eg|G3&fz*`QH@mDUn)1%#5u`0m$%D} z?;tZ0u(mWeMV0QtzjgN!lT*pNRj;6510Wwx?Yi_=tYw|J#7@(Xe7ifDzXuK;JB;QO z#bg~K$cgm$@{QiL_3yr}y&~wuv=P=#O&Tj=Sr)aCUlYmZMcw?)T?c%0rUe1cS+o!qs_ zQ6Gp)-{)V!;=q}llyK3|^WeLKyjf%y;xHku;9(vM!j|~<7w1c*Mk-;P{T&yG) z@C-8E?QPynNQ<8f01D`2qexcVEIOU?y}MG)TAE6&VT5`rK8s(4PE;uQ92LTXUQ<>^ ztyQ@=@kRdh@ebUG^Z6NWWIL;_IGJ2ST>$t!$m$qvtj0Qmw8moN6GUV^!QKNK zHBXCtUH8)RY9++gH_TUV4^=-j$t}dD3qsN7GclJ^Zc&(j6&a_!$jCf}%c5ey`pm~1)@{yI3 zTdWyB+*X{JFw#z;PwRr5evb2!ueWF;v`B0HoUu4-(~aL=z;OXUUEtG`_$)Oxw6FKg zEzY`CyKaSBK3xt#8gA|r_|Kehn_HYVBMpEwbn9-fI*!u*eTA1ef8Mkl1=!jV4oYwWYM}i`A>_F4nhmlCIC6WLa zY%;4&@AlnaG11ejl61Jev21|r*m+?Kru3;1tFDl}#!OzUp6c>go4{C|^erwpG*&h6bspUPJag}oOkN2912Y3I?(eRc@U9>z#HPBHC?nps7H5!zP``90!Q1n80jo+B3TWXp!8Pe zwuKuLLI6l3Gv@+QH*Y}2wPLPQ1^EZhT#+Ed8q8Wo z1pTmIBxv14-{l&QVKxAyQF#8Q@NeJwWdKk>?cpiJLkJr+aZ!Me+Cfp!?FWSRf^j2k z73BRR{WSKaMkJ>1Nbx5dan5hg^_}O{Tj6u%iV%#QGz0Q@j{R^Ik)Z*+(YvY2ziBG)?AmJa|JV%4UT$k`hcOg5r9R?5>?o~JzK zJCrj&{i#hG>N7!B4kNX(%igb%kDj0fOQThC-8mtfap82PNRXr1D>lbgg)dYTQ(kbx z`Ee5kXG~Bh+BHQBf|kJEy6(ga%WfhvdQNDuOfQoe377l#ht&DrMGeIsI5C<&ai zWG$|hop2@@q5YDa)_-A?B02W;#fH!%k`daQLEItaJJ8Yf1L%8x;kg?)k)00P-lH+w z)5$QNV6r2$YtnV(4o=0^3{kmaXn*Dm0F*fU(@o)yVVjk|ln8ea6BMy%vZAhW9|wvA z8RoDkVoMEz1d>|5(k0Nw>22ZT){V<3$^C-cN+|~hKt2)){+l-?3m@-$c?-dlzQ)q- zZ)j%n^gerV{|+t}9m1_&&Ly!9$rtG4XX|WQ8`xYzGC~U@nYh~g(z9)bdAl#xH)xd5a=@|qql z|FzEil{P5(@gy!4ek05i$>`E^G~{;pnf6ftpLh$h#W?^#4UkPfa;;?bsIe&kz!+40 zI|6`F2n020)-r`pFaZ38F!S-lJM-o&inOw|66=GMeP@xQU5ghQH{~5Uh~TMTd;I9` z>YhVB`e^EVj*S7JF39ZgNf}A-0DwOcTT63ydN$I3b?yBQtUI*_fae~kPvzoD$zjX3 zoqBe#>12im4WzZ=f^4+u=!lA|#r%1`WB0-6*3BL#at`47#ebPpR|D1b)3BjT34nYY z%Ds%d?5$|{LgOIaRO{{oC&RK`O91$fqwM0(C_TALcozu*fWHb%%q&p-q{_8*2Zsi^ zh1ZCnr^UYa;4vQEtHk{~zi>wwMC5o{S=$P0X681y`SXwFH?Ewn{x-MOZynmc)JT5v zuHLwh;tLfxRrr%|k370}GofLl7thg>ACWWY&msqaVu&ry+`7+Ss>NL^%T1|z{IGMA zW-SKl=V-^{(f!Kf^#3(|T2W47d(%JVCI4JgRrT1pNz>+ietmFToNv^`gzC@&O-)+i zPQ~RwK8%C_vf%;%e>NyTp~dM5;!C|N0Q^6|CEb7Bw=Vz~$1#FA;Z*?mKSC)Hl-20s t8QyHj(g6VK0RYbl8UjE)0O0w=e*@m04r>stuEhWV002ovPDHLkV1hl;dM*F} diff --git a/doc/html/dynsections.js b/doc/html/dynsections.js deleted file mode 100644 index ed092c7f..00000000 --- a/doc/html/dynsections.js +++ /dev/null @@ -1,97 +0,0 @@ -function toggleVisibility(linkObj) -{ - var base = $(linkObj).attr('id'); - var summary = $('#'+base+'-summary'); - var content = $('#'+base+'-content'); - var trigger = $('#'+base+'-trigger'); - var src=$(trigger).attr('src'); - if (content.is(':visible')===true) { - content.hide(); - summary.show(); - $(linkObj).addClass('closed').removeClass('opened'); - $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); - } else { - content.show(); - summary.hide(); - $(linkObj).removeClass('closed').addClass('opened'); - $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); - } - return false; -} - -function updateStripes() -{ - $('table.directory tr'). - removeClass('even').filter(':visible:even').addClass('even'); -} -function toggleLevel(level) -{ - $('table.directory tr').each(function(){ - var l = this.id.split('_').length-1; - var i = $('#img'+this.id.substring(3)); - var a = $('#arr'+this.id.substring(3)); - if (l - - - - - -Boost.Locale: boost/locale/encoding.hpp Source File - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    encoding.hpp
    -
    -
    -
    1 //
    -
    2 // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
    -
    3 //
    -
    4 // Distributed under the Boost Software License, Version 1.0. (See
    -
    5 // accompanying file LICENSE_1_0.txt or copy at
    -
    6 // http://www.boost.org/LICENSE_1_0.txt)
    -
    7 //
    -
    8 #ifndef BOOST_LOCALE_ENCODING_HPP_INCLUDED
    -
    9 #define BOOST_LOCALE_ENCODING_HPP_INCLUDED
    -
    10 
    -
    11 #include <boost/locale/config.hpp>
    -
    12 #ifdef BOOST_MSVC
    -
    13 # pragma warning(push)
    -
    14 # pragma warning(disable : 4275 4251 4231 4660)
    -
    15 #endif
    -
    16 #include <boost/locale/info.hpp>
    -
    17 #include <boost/locale/encoding_errors.hpp>
    -
    18 #include <boost/locale/encoding_utf.hpp>
    -
    19 
    -
    20 
    -
    21 
    -
    22 namespace boost {
    -
    23  namespace locale {
    -
    24 
    -
    28  namespace conv {
    -
    33 
    -
    37  template<typename CharType>
    -
    38  std::basic_string<CharType> to_utf(char const *begin,char const *end,std::string const &charset,method_type how=default_method);
    -
    39 
    -
    43  template<typename CharType>
    -
    44  std::string from_utf(CharType const *begin,CharType const *end,std::string const &charset,method_type how=default_method);
    -
    45 
    -
    51  template<typename CharType>
    -
    52  std::basic_string<CharType> to_utf(char const *begin,char const *end,std::locale const &loc,method_type how=default_method)
    -
    53  {
    -
    54  return to_utf<CharType>(begin,end,std::use_facet<info>(loc).encoding(),how);
    -
    55  }
    -
    56 
    -
    62  template<typename CharType>
    -
    63  std::string from_utf(CharType const *begin,CharType const *end,std::locale const &loc,method_type how=default_method)
    -
    64  {
    -
    65  return from_utf(begin,end,std::use_facet<info>(loc).encoding(),how);
    -
    66  }
    -
    67 
    -
    71 
    -
    72  template<typename CharType>
    -
    73  std::basic_string<CharType> to_utf(std::string const &text,std::string const &charset,method_type how=default_method)
    -
    74  {
    -
    75  return to_utf<CharType>(text.c_str(),text.c_str()+text.size(),charset,how);
    -
    76  }
    -
    77 
    -
    81  template<typename CharType>
    -
    82  std::string from_utf(std::basic_string<CharType> const &text,std::string const &charset,method_type how=default_method)
    -
    83  {
    -
    84  return from_utf(text.c_str(),text.c_str()+text.size(),charset,how);
    -
    85  }
    -
    86 
    -
    90  template<typename CharType>
    -
    91  std::basic_string<CharType> to_utf(char const *text,std::string const &charset,method_type how=default_method)
    -
    92  {
    -
    93  char const *text_end = text;
    -
    94  while(*text_end)
    -
    95  text_end++;
    -
    96  return to_utf<CharType>(text,text_end,charset,how);
    -
    97  }
    -
    98 
    -
    102  template<typename CharType>
    -
    103  std::string from_utf(CharType const *text,std::string const &charset,method_type how=default_method)
    -
    104  {
    -
    105  CharType const *text_end = text;
    -
    106  while(*text_end)
    -
    107  text_end++;
    -
    108  return from_utf(text,text_end,charset,how);
    -
    109  }
    -
    110 
    -
    116  template<typename CharType>
    -
    117  std::basic_string<CharType> to_utf(std::string const &text,std::locale const &loc,method_type how=default_method)
    -
    118  {
    -
    119  return to_utf<CharType>(text.c_str(),text.c_str()+text.size(),loc,how);
    -
    120  }
    -
    121 
    -
    127  template<typename CharType>
    -
    128  std::string from_utf(std::basic_string<CharType> const &text,std::locale const &loc,method_type how=default_method)
    -
    129  {
    -
    130  return from_utf(text.c_str(),text.c_str()+text.size(),loc,how);
    -
    131  }
    -
    132 
    -
    138  template<typename CharType>
    -
    139  std::basic_string<CharType> to_utf(char const *text,std::locale const &loc,method_type how=default_method)
    -
    140  {
    -
    141  char const *text_end = text;
    -
    142  while(*text_end)
    -
    143  text_end++;
    -
    144  return to_utf<CharType>(text,text_end,loc,how);
    -
    145  }
    -
    146 
    -
    152  template<typename CharType>
    -
    153  std::string from_utf(CharType const *text,std::locale const &loc,method_type how=default_method)
    -
    154  {
    -
    155  CharType const *text_end = text;
    -
    156  while(*text_end)
    -
    157  text_end++;
    -
    158  return from_utf(text,text_end,loc,how);
    -
    159  }
    -
    160 
    -
    161 
    -
    165 
    -
    166  BOOST_LOCALE_DECL
    -
    167  std::string between(char const *begin,
    -
    168  char const *end,
    -
    169  std::string const &to_encoding,
    -
    170  std::string const &from_encoding,
    - -
    172 
    -
    176 
    -
    177  inline
    -
    178  std::string between(char const *text,
    -
    179  std::string const &to_encoding,
    -
    180  std::string const &from_encoding,
    - -
    182  {
    -
    183  char const *end=text;
    -
    184  while(*end)
    -
    185  end++;
    -
    186  return boost::locale::conv::between(text,end,to_encoding,from_encoding,how);
    -
    187  }
    -
    188 
    -
    192  inline
    -
    193  std::string between(std::string const &text,
    -
    194  std::string const &to_encoding,
    -
    195  std::string const &from_encoding,
    - -
    197  {
    -
    198  return boost::locale::conv::between(text.c_str(),text.c_str()+text.size(),to_encoding,from_encoding,how);
    -
    199  }
    -
    200 
    -
    202 
    -
    203  template<>
    -
    204  BOOST_LOCALE_DECL std::basic_string<char> to_utf(char const *begin,char const *end,std::string const &charset,method_type how);
    -
    205 
    -
    206  template<>
    -
    207  BOOST_LOCALE_DECL std::string from_utf(char const *begin,char const *end,std::string const &charset,method_type how);
    -
    208 
    -
    209  template<>
    -
    210  BOOST_LOCALE_DECL std::basic_string<wchar_t> to_utf(char const *begin,char const *end,std::string const &charset,method_type how);
    -
    211 
    -
    212  template<>
    -
    213  BOOST_LOCALE_DECL std::string from_utf(wchar_t const *begin,wchar_t const *end,std::string const &charset,method_type how);
    -
    214 
    -
    215  #ifdef BOOST_LOCALE_ENABLE_CHAR16_T
    -
    216  template<>
    -
    217  BOOST_LOCALE_DECL std::basic_string<char16_t> to_utf(char const *begin,char const *end,std::string const &charset,method_type how);
    -
    218 
    -
    219  template<>
    -
    220  BOOST_LOCALE_DECL std::string from_utf(char16_t const *begin,char16_t const *end,std::string const &charset,method_type how);
    -
    221  #endif
    -
    222 
    -
    223  #ifdef BOOST_LOCALE_ENABLE_CHAR32_T
    -
    224  template<>
    -
    225  BOOST_LOCALE_DECL std::basic_string<char32_t> to_utf(char const *begin,char const *end,std::string const &charset,method_type how);
    -
    226 
    -
    227  template<>
    -
    228  BOOST_LOCALE_DECL std::string from_utf(char32_t const *begin,char32_t const *end,std::string const &charset,method_type how);
    -
    229  #endif
    -
    230 
    -
    231 
    -
    233 
    -
    235 
    -
    236  } // conv
    -
    237 
    -
    238  } // locale
    -
    239 } // boost
    -
    240 
    -
    241 #ifdef BOOST_MSVC
    -
    242 #pragma warning(pop)
    -
    243 #endif
    -
    244 
    -
    245 #endif
    -
    246 
    -
    247 // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
    -
    248 
    -
    std::string from_utf(CharType const *begin, CharType const *end, std::string const &charset, method_type how=default_method)
    -
    std::basic_string< CharType > to_utf(char const *begin, char const *end, std::string const &charset, method_type how=default_method)
    -
    Default method - skip.
    Definition: encoding_errors.hpp:57
    -
    std::string between(char const *begin, char const *end, std::string const &to_encoding, std::string const &from_encoding, method_type how=default_method)
    -
    method_type
    Definition: encoding_errors.hpp:54
    -
    -
    - - - - - - diff --git a/doc/html/encoding__errors_8hpp_source.html b/doc/html/encoding__errors_8hpp_source.html deleted file mode 100644 index a9d32826..00000000 --- a/doc/html/encoding__errors_8hpp_source.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - -Boost.Locale: boost/locale/encoding_errors.hpp Source File - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    encoding_errors.hpp
    -
    -
    -
    1 //
    -
    2 // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
    -
    3 //
    -
    4 // Distributed under the Boost Software License, Version 1.0. (See
    -
    5 // accompanying file LICENSE_1_0.txt or copy at
    -
    6 // http://www.boost.org/LICENSE_1_0.txt)
    -
    7 //
    -
    8 #ifndef BOOST_LOCALE_ENCODING_ERRORS_HPP_INCLUDED
    -
    9 #define BOOST_LOCALE_ENCODING_ERRORS_HPP_INCLUDED
    -
    10 
    -
    11 #include <boost/locale/definitions.hpp>
    -
    12 #ifdef BOOST_MSVC
    -
    13 # pragma warning(push)
    -
    14 # pragma warning(disable : 4275 4251 4231 4660)
    -
    15 #endif
    -
    16 #include <stdexcept>
    -
    17 
    -
    18 
    -
    19 
    -
    20 namespace boost {
    -
    21  namespace locale {
    -
    22  namespace conv {
    -
    27 
    -
    31  class BOOST_SYMBOL_VISIBLE conversion_error : public std::runtime_error {
    -
    32  public:
    -
    33  conversion_error() : std::runtime_error("Conversion failed") {}
    -
    34  };
    -
    35 
    -
    40  class BOOST_SYMBOL_VISIBLE invalid_charset_error : public std::runtime_error {
    -
    41  public:
    -
    42 
    -
    44  invalid_charset_error(std::string charset) :
    -
    45  std::runtime_error("Invalid or unsupported charset:" + charset)
    -
    46  {
    -
    47  }
    -
    48  };
    -
    49 
    -
    50 
    -
    54  typedef enum {
    -
    55  skip = 0,
    -
    56  stop = 1,
    - -
    58  } method_type;
    -
    59 
    -
    60 
    -
    62 
    -
    63  } // conv
    -
    64 
    -
    65  } // locale
    -
    66 } // boost
    -
    67 
    -
    68 #ifdef BOOST_MSVC
    -
    69 #pragma warning(pop)
    -
    70 #endif
    -
    71 
    -
    72 #endif
    -
    73 
    -
    74 // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
    -
    75 
    -
    The excepton that is thrown in case of conversion error.
    Definition: encoding_errors.hpp:31
    -
    This exception is thrown in case of use of unsupported or invalid character set.
    Definition: encoding_errors.hpp:40
    -
    Default method - skip.
    Definition: encoding_errors.hpp:57
    -
    invalid_charset_error(std::string charset)
    Create an error for charset charset.
    Definition: encoding_errors.hpp:44
    -
    Stop conversion and throw conversion_error.
    Definition: encoding_errors.hpp:56
    -
    Skip illegal/unconvertable characters.
    Definition: encoding_errors.hpp:55
    -
    method_type
    Definition: encoding_errors.hpp:54
    -
    -
    - - - - - - diff --git a/doc/html/encoding__utf_8hpp_source.html b/doc/html/encoding__utf_8hpp_source.html deleted file mode 100644 index 75208867..00000000 --- a/doc/html/encoding__utf_8hpp_source.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - -Boost.Locale: boost/locale/encoding_utf.hpp Source File - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    encoding_utf.hpp
    -
    -
    -
    1 //
    -
    2 // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
    -
    3 //
    -
    4 // Distributed under the Boost Software License, Version 1.0. (See
    -
    5 // accompanying file LICENSE_1_0.txt or copy at
    -
    6 // http://www.boost.org/LICENSE_1_0.txt)
    -
    7 //
    -
    8 #ifndef BOOST_LOCALE_ENCODING_UTF_HPP_INCLUDED
    -
    9 #define BOOST_LOCALE_ENCODING_UTF_HPP_INCLUDED
    -
    10 
    -
    11 #include <boost/locale/utf.hpp>
    -
    12 #include <boost/locale/encoding_errors.hpp>
    -
    13 #include <iterator>
    -
    14 #ifdef BOOST_MSVC
    -
    15 # pragma warning(push)
    -
    16 # pragma warning(disable : 4275 4251 4231 4660)
    -
    17 #endif
    -
    18 
    -
    19 
    -
    20 
    -
    21 namespace boost {
    -
    22  namespace locale {
    -
    23  namespace conv {
    -
    28 
    -
    32  template<typename CharOut,typename CharIn>
    -
    33  std::basic_string<CharOut>
    -
    34  utf_to_utf(CharIn const *begin,CharIn const *end,method_type how = default_method)
    -
    35  {
    -
    36  std::basic_string<CharOut> result;
    -
    37  result.reserve(end-begin);
    -
    38  typedef std::back_insert_iterator<std::basic_string<CharOut> > inserter_type;
    -
    39  inserter_type inserter(result);
    - -
    41  while(begin!=end) {
    -
    42  c=utf::utf_traits<CharIn>::template decode<CharIn const *>(begin,end);
    -
    43  if(c==utf::illegal || c==utf::incomplete) {
    -
    44  if(how==stop)
    -
    45  throw conversion_error();
    -
    46  }
    -
    47  else {
    -
    48  utf::utf_traits<CharOut>::template encode<inserter_type>(c,inserter);
    -
    49  }
    -
    50  }
    -
    51  return result;
    -
    52  }
    -
    53 
    -
    57  template<typename CharOut,typename CharIn>
    -
    58  std::basic_string<CharOut>
    -
    59  utf_to_utf(CharIn const *str,method_type how = default_method)
    -
    60  {
    -
    61  CharIn const *end = str;
    -
    62  while(*end)
    -
    63  end++;
    -
    64  return utf_to_utf<CharOut,CharIn>(str,end,how);
    -
    65  }
    -
    66 
    -
    67 
    -
    71  template<typename CharOut,typename CharIn>
    -
    72  std::basic_string<CharOut>
    -
    73  utf_to_utf(std::basic_string<CharIn> const &str,method_type how = default_method)
    -
    74  {
    -
    75  return utf_to_utf<CharOut,CharIn>(str.c_str(),str.c_str()+str.size(),how);
    -
    76  }
    -
    77 
    -
    78 
    -
    80 
    -
    81  } // conv
    -
    82 
    -
    83  } // locale
    -
    84 } // boost
    -
    85 
    -
    86 #ifdef BOOST_MSVC
    -
    87 #pragma warning(pop)
    -
    88 #endif
    -
    89 
    -
    90 #endif
    -
    91 
    -
    92 // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
    -
    93 
    -
    static const code_point incomplete
    Special constant that defines incomplete code point.
    Definition: utf.hpp:44
    -
    The excepton that is thrown in case of conversion error.
    Definition: encoding_errors.hpp:31
    -
    uint32_t code_point
    The integral type that can hold a Unicode code point.
    Definition: utf.hpp:34
    -
    static const code_point illegal
    Special constant that defines illegal code point.
    Definition: utf.hpp:39
    -
    UTF Traits class - functions to convert UTF sequences to and from Unicode code points.
    Definition: utf.hpp:63
    -
    std::basic_string< CharOut > utf_to_utf(CharIn const *begin, CharIn const *end, method_type how=default_method)
    Definition: encoding_utf.hpp:34
    -
    Default method - skip.
    Definition: encoding_errors.hpp:57
    -
    Stop conversion and throw conversion_error.
    Definition: encoding_errors.hpp:56
    -
    method_type
    Definition: encoding_errors.hpp:54
    -
    -
    - - - - - - diff --git a/doc/html/examples.html b/doc/html/examples.html deleted file mode 100644 index e79b8c67..00000000 --- a/doc/html/examples.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - -Boost.Locale: Examples - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    Examples
    -
    -
    -
    Here is a list of all examples:
    -
    -
    - - - - - - diff --git a/doc/html/examples.js b/doc/html/examples.js deleted file mode 100644 index 14ff46ad..00000000 --- a/doc/html/examples.js +++ /dev/null @@ -1,11 +0,0 @@ -var examples = -[ - [ "boundary.cpp", "boundary_8cpp-example.html", null ], - [ "calendar.cpp", "calendar_8cpp-example.html", null ], - [ "collate.cpp", "collate_8cpp-example.html", null ], - [ "conversions.cpp", "conversions_8cpp-example.html", null ], - [ "hello.cpp", "hello_8cpp-example.html", null ], - [ "wboundary.cpp", "wboundary_8cpp-example.html", null ], - [ "wconversions.cpp", "wconversions_8cpp-example.html", null ], - [ "whello.cpp", "whello_8cpp-example.html", null ] -]; \ No newline at end of file diff --git a/doc/html/facets_8hpp_source.html b/doc/html/facets_8hpp_source.html deleted file mode 100644 index 24a5b9e4..00000000 --- a/doc/html/facets_8hpp_source.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - -Boost.Locale: boost/locale/boundary/facets.hpp Source File - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    facets.hpp
    -
    -
    -
    1 //
    -
    2 // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
    -
    3 //
    -
    4 // Distributed under the Boost Software License, Version 1.0. (See
    -
    5 // accompanying file LICENSE_1_0.txt or copy at
    -
    6 // http://www.boost.org/LICENSE_1_0.txt)
    -
    7 //
    -
    8 #ifndef BOOST_LOCALE_BOUNDARY_FACETS_HPP_INCLUDED
    -
    9 #define BOOST_LOCALE_BOUNDARY_FACETS_HPP_INCLUDED
    -
    10 
    -
    11 #include <boost/locale/config.hpp>
    -
    12 #include <boost/locale/boundary/types.hpp>
    -
    13 #ifdef BOOST_MSVC
    -
    14 # pragma warning(push)
    -
    15 # pragma warning(disable : 4275 4251 4231 4660)
    -
    16 #endif
    -
    17 #include <locale>
    -
    18 #include <vector>
    -
    19 
    -
    20 
    -
    21 
    -
    22 
    -
    23 namespace boost {
    -
    24 
    -
    25  namespace locale {
    -
    26 
    -
    30  namespace boundary {
    -
    36 
    -
    37 
    -
    42  struct break_info {
    -
    43 
    - -
    48  offset(0),
    -
    49  rule(0)
    -
    50  {
    -
    51  }
    -
    56  break_info(size_t v) :
    -
    57  offset(v),
    -
    58  rule(0)
    -
    59  {
    -
    60  }
    -
    61 
    -
    65  size_t offset;
    - -
    71 
    -
    76  bool operator<(break_info const &other) const
    -
    77  {
    -
    78  return offset < other.offset;
    -
    79  }
    -
    80  };
    -
    81 
    -
    86  typedef std::vector<break_info> index_type;
    -
    87 
    -
    88 
    -
    89  template<typename CharType>
    - -
    91 
    -
    92  #ifdef BOOST_LOCALE_DOXYGEN
    -
    93  template<typename Char>
    -
    100  class BOOST_LOCALE_DECL boundary_indexing : public std::locale::facet {
    -
    101  public:
    -
    105  boundary_indexing(size_t refs=0) : std::locale::facet(refs)
    -
    106  {
    -
    107  }
    -
    115  virtual index_type map(boundary_type t,Char const *begin,Char const *end) const = 0;
    -
    119  static std::locale::id id;
    -
    120 
    -
    121  #if defined (__SUNPRO_CC) && defined (_RWSTD_VER)
    -
    122  std::locale::id& __get_id (void) const { return id; }
    -
    123  #endif
    -
    124  };
    -
    125 
    -
    126  #else
    -
    127 
    -
    128  template<>
    -
    129  class BOOST_LOCALE_DECL boundary_indexing<char> : public std::locale::facet {
    -
    130  public:
    -
    131  boundary_indexing(size_t refs=0) : std::locale::facet(refs)
    -
    132  {
    -
    133  }
    -
    134  virtual index_type map(boundary_type t,char const *begin,char const *end) const = 0;
    -
    135  static std::locale::id id;
    -
    136  #if defined (__SUNPRO_CC) && defined (_RWSTD_VER)
    -
    137  std::locale::id& __get_id (void) const { return id; }
    -
    138  #endif
    -
    139  };
    -
    140 
    -
    141  template<>
    -
    142  class BOOST_LOCALE_DECL boundary_indexing<wchar_t> : public std::locale::facet {
    -
    143  public:
    -
    144  boundary_indexing(size_t refs=0) : std::locale::facet(refs)
    -
    145  {
    -
    146  }
    -
    147  virtual index_type map(boundary_type t,wchar_t const *begin,wchar_t const *end) const = 0;
    -
    148 
    -
    149  static std::locale::id id;
    -
    150  #if defined (__SUNPRO_CC) && defined (_RWSTD_VER)
    -
    151  std::locale::id& __get_id (void) const { return id; }
    -
    152  #endif
    -
    153  };
    -
    154 
    -
    155  #ifdef BOOST_LOCALE_ENABLE_CHAR16_T
    -
    156  template<>
    -
    157  class BOOST_LOCALE_DECL boundary_indexing<char16_t> : public std::locale::facet {
    -
    158  public:
    -
    159  boundary_indexing(size_t refs=0) : std::locale::facet(refs)
    -
    160  {
    -
    161  }
    -
    162  virtual index_type map(boundary_type t,char16_t const *begin,char16_t const *end) const = 0;
    -
    163  static std::locale::id id;
    -
    164  #if defined (__SUNPRO_CC) && defined (_RWSTD_VER)
    -
    165  std::locale::id& __get_id (void) const { return id; }
    -
    166  #endif
    -
    167  };
    -
    168  #endif
    -
    169 
    -
    170  #ifdef BOOST_LOCALE_ENABLE_CHAR32_T
    -
    171  template<>
    -
    172  class BOOST_LOCALE_DECL boundary_indexing<char32_t> : public std::locale::facet {
    -
    173  public:
    -
    174  boundary_indexing(size_t refs=0) : std::locale::facet(refs)
    -
    175  {
    -
    176  }
    -
    177  virtual index_type map(boundary_type t,char32_t const *begin,char32_t const *end) const = 0;
    -
    178  static std::locale::id id;
    -
    179  #if defined (__SUNPRO_CC) && defined (_RWSTD_VER)
    -
    180  std::locale::id& __get_id (void) const { return id; }
    -
    181  #endif
    -
    182  };
    -
    183  #endif
    -
    184 
    -
    185  #endif
    -
    186 
    -
    190 
    -
    191 
    -
    192  } // boundary
    -
    193 
    -
    194  } // locale
    -
    195 } // boost
    -
    196 
    -
    197 
    -
    198 #ifdef BOOST_MSVC
    -
    199 #pragma warning(pop)
    -
    200 #endif
    -
    201 
    -
    202 #endif
    -
    203 // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
    -
    This facet generates an index for boundary analysis for a given text.
    Definition: facets.hpp:90
    -
    boundary_type
    Definition: types.hpp:39
    -
    break_info()
    Definition: facets.hpp:47
    -
    break_info(size_t v)
    Definition: facets.hpp:56
    -
    static std::locale::id id
    Definition: facets.hpp:119
    -
    This structure is used for representing boundary point that follows the offset.
    Definition: facets.hpp:42
    -
    uint32_t rule_type
    Flags used with word boundary analysis – the type of the word, line or sentence boundary found...
    Definition: types.hpp:51
    -
    bool operator<(break_info const &other) const
    Definition: facets.hpp:76
    -
    rule_type rule
    Definition: facets.hpp:70
    -
    size_t offset
    Definition: facets.hpp:65
    -
    boundary_indexing(size_t refs=0)
    Definition: facets.hpp:105
    -
    std::vector< break_info > index_type
    Definition: facets.hpp:86
    -
    -
    - - - - - - diff --git a/doc/html/faq.html b/doc/html/faq.html deleted file mode 100644 index b095f10a..00000000 --- a/doc/html/faq.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - -Boost.Locale: Frequently Asked Questions - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    Frequently Asked Questions
    -
    -
    -
      -
    • I try to use some Boost.Locale functions and I get an std::bad_cast exception thrown?
      -
      - Answer: You probably try to use incorrect std::locale object. All Boost.Locale tools relay on std::locale object's facets. The locale object should be generated with generator class and then passed to the function or alternatively global locale should be set using std::locale::global() function such that global locale (and default created one) would have required facets to use.
    • -
    • I had installed global locale and try to write something to stream but still get wrong output? For example:
      #include <boost/locale.hpp>
      -
      #include <iostream>
      -
      int main()
      -
      {
      - -
      std::locale::global(gen(""));
      -
      std::cout << boost::locale::as::date << std::time(0) << std::endl;
      -
      }
      -
      Prints a number instead of a date.
      - Answer: You forget to imbue the locale to the stream. Changing the global locale does not affect the locale in existing iostream objects. Thus because std::out and other global streams were created before changing the global locale Boost.Locale manipulators have no effect. You need to write:
      #include <boost/locale.hpp>
      -
      #include <iostream>
      -
      int main()
      -
      {
      - -
      std::locale l = gen("");
      -
      std::locale::global(l);
      -
      std::cout.imbue(l);
      -
      std::cout << boost::locale::as::date << std::time(0) << std::endl;
      -
      }
      -
    • -
    -
    -
    - - - - - - diff --git a/doc/html/files.html b/doc/html/files.html deleted file mode 100644 index 12a7971e..00000000 --- a/doc/html/files.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - -Boost.Locale: File List - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    File List
    -
    -
    -
    Here is a list of all documented files with brief descriptions:
    -
    [detail level 1234]
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    \-boost
     \-locale
      o-boundary
      |o*boundary_point.hpp
      |o*facets.hpp
      |o*index.hpp
      |o*segment.hpp
      |\*types.hpp
      o*boundary.hpp
      o*collator.hpp
      o*config.hpp
      o*conversion.hpp
      o*date_time.hpp
      o*date_time_facet.hpp
      o*definitions.hpp
      o*encoding.hpp
      o*encoding_errors.hpp
      o*encoding_utf.hpp
      o*format.hpp
      o*formatting.hpp
      o*generator.hpp
      o*generic_codecvt.hpp
      o*gnu_gettext.hpp
      o*hold_ptr.hpp
      o*info.hpp
      o*localization_backend.hpp
      o*message.hpp
      o*time_zone.hpp
      o*utf.hpp
      o*utf8_codecvt.hpp
      \*util.hpp
    -
    -
    -
    - - - - - - diff --git a/doc/html/files.js b/doc/html/files.js deleted file mode 100644 index 807c607d..00000000 --- a/doc/html/files.js +++ /dev/null @@ -1,4 +0,0 @@ -var files = -[ - [ "boost", "dir_c8984f1860c11f62f47abb6761e46c1e.html", "dir_c8984f1860c11f62f47abb6761e46c1e" ] -]; \ No newline at end of file diff --git a/doc/html/format_8hpp_source.html b/doc/html/format_8hpp_source.html deleted file mode 100644 index 00af5111..00000000 --- a/doc/html/format_8hpp_source.html +++ /dev/null @@ -1,488 +0,0 @@ - - - - - - -Boost.Locale: boost/locale/format.hpp Source File - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    format.hpp
    -
    -
    -
    1 //
    -
    2 // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
    -
    3 //
    -
    4 // Distributed under the Boost Software License, Version 1.0. (See
    -
    5 // accompanying file LICENSE_1_0.txt or copy at
    -
    6 // http://www.boost.org/LICENSE_1_0.txt)
    -
    7 //
    -
    8 #ifndef BOOST_LOCALE_FORMAT_HPP_INCLUDED
    -
    9 #define BOOST_LOCALE_FORMAT_HPP_INCLUDED
    -
    10 
    -
    11 #include <boost/locale/config.hpp>
    -
    12 #ifdef BOOST_MSVC
    -
    13 # pragma warning(push)
    -
    14 # pragma warning(disable : 4275 4251 4231 4660)
    -
    15 #endif
    -
    16 #include <boost/locale/message.hpp>
    -
    17 #include <boost/locale/formatting.hpp>
    -
    18 
    -
    19 #include <sstream>
    -
    20 
    -
    21 
    -
    22 namespace boost {
    -
    23  namespace locale {
    -
    24 
    -
    32 
    -
    34  namespace details {
    -
    35 
    -
    36  template<typename CharType>
    -
    37  struct formattible {
    -
    38  typedef std::basic_ostream<CharType> stream_type;
    -
    39  typedef void (*writer_type)(stream_type &output,void const *ptr);
    -
    40 
    -
    41  formattible() :
    -
    42  pointer_(0),
    -
    43  writer_(&formattible::void_write)
    -
    44  {
    -
    45  }
    -
    46 
    -
    47  formattible(formattible const &other) :
    -
    48  pointer_(other.pointer_),
    -
    49  writer_(other.writer_)
    -
    50  {
    -
    51  }
    -
    52 
    -
    53  formattible const &operator=(formattible const &other)
    -
    54  {
    -
    55  if(this != &other) {
    -
    56  pointer_=other.pointer_;
    -
    57  writer_=other.writer_;
    -
    58  }
    -
    59  return *this;
    -
    60  }
    -
    61 
    -
    62  template<typename Type>
    -
    63  formattible(Type const &value)
    -
    64  {
    -
    65  pointer_ = static_cast<void const *>(&value);
    -
    66  writer_ = &write<Type>;
    -
    67  }
    -
    68 
    -
    69  template<typename Type>
    -
    70  formattible const &operator=(Type const &other)
    -
    71  {
    -
    72  *this = formattible(other);
    -
    73  return *this;
    -
    74  }
    -
    75 
    -
    76  friend stream_type &operator<<(stream_type &out,formattible const &fmt)
    -
    77  {
    -
    78  fmt.writer_(out,fmt.pointer_);
    -
    79  return out;
    -
    80  }
    -
    81 
    -
    82  private:
    -
    83  static void void_write(stream_type &output,void const * /*ptr*/)
    -
    84  {
    -
    85  CharType empty_string[1]={0};
    -
    86  output<<empty_string;
    -
    87  }
    -
    88 
    -
    89  template<typename Type>
    -
    90  static void write(stream_type &output,void const *ptr)
    -
    91  {
    -
    92  output << *static_cast<Type const *>(ptr);
    -
    93  }
    -
    94 
    -
    95  void const *pointer_;
    -
    96  writer_type writer_;
    -
    97  }; // formattible
    -
    98 
    -
    99  class BOOST_LOCALE_DECL format_parser {
    -
    100  public:
    -
    101  format_parser(std::ios_base &ios,void *,void (*imbuer)(void *,std::locale const &));
    -
    102  ~format_parser();
    -
    103 
    -
    104  unsigned get_position();
    -
    105 
    -
    106  void set_one_flag(std::string const &key,std::string const &value);
    -
    107 
    -
    108  template<typename CharType>
    -
    109  void set_flag_with_str(std::string const &key,std::basic_string<CharType> const &value)
    -
    110  {
    -
    111  if(key=="ftime" || key=="strftime") {
    -
    112  as::strftime(ios_);
    -
    113  ios_info::get(ios_).date_time_pattern(value);
    -
    114  }
    -
    115  }
    -
    116  void restore();
    -
    117  private:
    -
    118  void imbue(std::locale const &);
    -
    119  format_parser(format_parser const &);
    -
    120  void operator=(format_parser const &);
    -
    121 
    -
    122  std::ios_base &ios_;
    -
    123  struct data;
    -
    124  std::auto_ptr<data> d;
    -
    125  };
    -
    126 
    -
    127  }
    -
    128 
    -
    130 
    -
    203  template<typename CharType>
    -
    204  class basic_format {
    -
    205  public:
    -
    206  typedef CharType char_type;
    - -
    208  typedef details::formattible<CharType> formattible_type;
    -
    211 
    -
    212  typedef std::basic_string<CharType> string_type;
    -
    213  typedef std::basic_ostream<CharType> stream_type;
    -
    214 
    -
    215 
    -
    219  basic_format(string_type format_string) :
    -
    220  format_(format_string),
    -
    221  translate_(false),
    -
    222  parameters_count_(0)
    -
    223  {
    -
    224  }
    -
    229  basic_format(message_type const &trans) :
    -
    230  message_(trans),
    -
    231  translate_(true),
    -
    232  parameters_count_(0)
    -
    233  {
    -
    234  }
    -
    235 
    -
    240  template<typename Formattible>
    -
    241  basic_format &operator % (Formattible const &object)
    -
    242  {
    -
    243  add(formattible_type(object));
    -
    244  return *this;
    -
    245  }
    -
    246 
    -
    250  string_type str(std::locale const &loc = std::locale()) const
    -
    251  {
    -
    252  std::basic_ostringstream<CharType> buffer;
    -
    253  buffer.imbue(loc);
    -
    254  write(buffer);
    -
    255  return buffer.str();
    -
    256  }
    -
    257 
    -
    261  void write(stream_type &out) const
    -
    262  {
    - -
    264  if(translate_)
    -
    265  format = message_.str(out.getloc(),ios_info::get(out).domain_id());
    -
    266  else
    -
    267  format = format_;
    -
    268 
    -
    269  format_output(out,format);
    -
    270 
    -
    271  }
    -
    272 
    -
    273 
    -
    274  private:
    -
    275 
    -
    276  class format_guard {
    -
    277  public:
    -
    278  format_guard(details::format_parser &fmt) :
    -
    279  fmt_(&fmt),
    -
    280  restored_(false)
    -
    281  {
    -
    282  }
    -
    283  void restore()
    -
    284  {
    -
    285  if(restored_)
    -
    286  return;
    -
    287  fmt_->restore();
    -
    288  restored_ = true;
    -
    289  }
    -
    290  ~format_guard()
    -
    291  {
    -
    292  try {
    -
    293  restore();
    -
    294  }
    -
    295  catch(...) {
    -
    296  }
    -
    297  }
    -
    298  private:
    -
    299  details::format_parser *fmt_;
    -
    300  bool restored_;
    -
    301  };
    -
    302 
    -
    303  void format_output(stream_type &out,string_type const &sformat) const
    -
    304  {
    -
    305  char_type obrk='{';
    -
    306  char_type cbrk='}';
    -
    307  char_type eq='=';
    -
    308  char_type comma=',';
    -
    309  char_type quote='\'';
    -
    310 
    -
    311  size_t pos = 0;
    -
    312  size_t size=sformat.size();
    -
    313  CharType const *format=sformat.c_str();
    -
    314  while(format[pos]!=0) {
    -
    315  if(format[pos] != obrk) {
    -
    316  if(format[pos]==cbrk && format[pos+1]==cbrk) {
    -
    317  out << cbrk;
    -
    318  pos+=2;
    -
    319  }
    -
    320  else {
    -
    321  out<<format[pos];
    -
    322  pos++;
    -
    323  }
    -
    324  continue;
    -
    325  }
    -
    326 
    -
    327  if(pos+1 < size && format[pos+1]==obrk) {
    -
    328  out << obrk;
    -
    329  pos+=2;
    -
    330  continue;
    -
    331  }
    -
    332  pos++;
    -
    333 
    -
    334  details::format_parser fmt(out,static_cast<void *>(&out),&basic_format::imbue_locale);
    -
    335 
    -
    336  format_guard guard(fmt);
    -
    337 
    -
    338  while(pos < size) {
    -
    339  std::string key;
    -
    340  std::string svalue;
    -
    341  string_type value;
    -
    342  bool use_svalue = true;
    -
    343  for(;format[pos];pos++) {
    -
    344  char_type c=format[pos];
    -
    345  if(c==comma || c==eq || c==cbrk)
    -
    346  break;
    -
    347  else {
    -
    348  key+=static_cast<char>(c);
    -
    349  }
    -
    350  }
    -
    351 
    -
    352  if(format[pos]==eq) {
    -
    353  pos++;
    -
    354  if(format[pos]==quote) {
    -
    355  pos++;
    -
    356  use_svalue = false;
    -
    357  while(format[pos]) {
    -
    358  if(format[pos]==quote) {
    -
    359  if(format[pos+1]==quote) {
    -
    360  value+=quote;
    -
    361  pos+=2;
    -
    362  }
    -
    363  else {
    -
    364  pos++;
    -
    365  break;
    -
    366  }
    -
    367  }
    -
    368  else {
    -
    369  value+=format[pos];
    -
    370  pos++;
    -
    371  }
    -
    372  }
    -
    373  }
    -
    374  else {
    -
    375  char_type c;
    -
    376  while((c=format[pos])!=0 && c!=comma && c!=cbrk) {
    -
    377  svalue+=static_cast<char>(c);
    -
    378  pos++;
    -
    379  }
    -
    380  }
    -
    381  }
    -
    382 
    -
    383  if(use_svalue) {
    -
    384  fmt.set_one_flag(key,svalue);
    -
    385  }
    -
    386  else
    -
    387  fmt.set_flag_with_str(key,value);
    -
    388 
    -
    389  if(format[pos]==comma) {
    -
    390  pos++;
    -
    391  continue;
    -
    392  }
    -
    393  else if(format[pos]==cbrk) {
    -
    394  unsigned position = fmt.get_position();
    -
    395  out << get(position);
    -
    396  guard.restore();
    -
    397  pos++;
    -
    398  break;
    -
    399  }
    -
    400  else {
    -
    401  guard.restore();
    -
    402  break;
    -
    403  }
    -
    404  }
    -
    405  }
    -
    406  }
    -
    407 
    -
    408 
    -
    409  //
    -
    410  // Non-copyable
    -
    411  //
    -
    412  basic_format(basic_format const &other);
    -
    413  void operator=(basic_format const &other);
    -
    414 
    -
    415  void add(formattible_type const &param)
    -
    416  {
    -
    417  if(parameters_count_ >= base_params_)
    -
    418  ext_params_.push_back(param);
    -
    419  else
    -
    420  parameters_[parameters_count_] = param;
    -
    421  parameters_count_++;
    -
    422  }
    -
    423 
    -
    424  formattible_type get(unsigned id) const
    -
    425  {
    -
    426  if(id >= parameters_count_)
    -
    427  return formattible_type();
    -
    428  else if(id >= base_params_)
    -
    429  return ext_params_[id - base_params_];
    -
    430  else
    -
    431  return parameters_[id];
    -
    432  }
    -
    433 
    -
    434  static void imbue_locale(void *ptr,std::locale const &l)
    -
    435  {
    -
    436  reinterpret_cast<stream_type *>(ptr)->imbue(l);
    -
    437  }
    -
    438 
    -
    439 
    -
    440 
    -
    441  static unsigned const base_params_ = 8;
    -
    442 
    -
    443  message_type message_;
    -
    444  string_type format_;
    -
    445  bool translate_;
    -
    446 
    -
    447 
    -
    448  formattible_type parameters_[base_params_];
    -
    449  unsigned parameters_count_;
    -
    450  std::vector<formattible_type> ext_params_;
    -
    451  };
    -
    452 
    -
    458  template<typename CharType>
    -
    459  std::basic_ostream<CharType> &operator<<(std::basic_ostream<CharType> &out,basic_format<CharType> const &fmt)
    -
    460  {
    -
    461  fmt.write(out);
    -
    462  return out;
    -
    463  }
    -
    464 
    -
    465 
    - -
    470 
    - -
    475 
    -
    476  #ifdef BOOST_LOCALE_ENABLE_CHAR16_T
    - -
    481  #endif
    -
    482 
    -
    483  #ifdef BOOST_LOCALE_ENABLE_CHAR32_T
    - -
    488  #endif
    -
    489 
    -
    493 
    -
    494  }
    -
    495 }
    -
    496 
    -
    497 #ifdef BOOST_MSVC
    -
    498 #pragma warning(pop)
    -
    499 #endif
    -
    500 
    -
    501 #endif
    -
    502 
    -
    513 
    -
    514 // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
    -
    515 
    -
    basic_format< char32_t > u32format
    Definition: format.hpp:487
    -
    a printf like class that allows type-safe and locale aware message formatting
    Definition: format.hpp:204
    -
    basic_format & operator%(Formattible const &object)
    Definition: format.hpp:241
    -
    std::basic_string< CharType > string_type
    string type for this type of character
    Definition: format.hpp:212
    -
    std::ios_base & strftime(std::ios_base &ios)
    Definition: formatting.hpp:347
    -
    basic_format(message_type const &trans)
    Definition: format.hpp:229
    -
    string_type str() const
    Definition: message.hpp:353
    - -
    basic_format(string_type format_string)
    Definition: format.hpp:219
    -
    static ios_info & get(std::ios_base &ios)
    -
    std::basic_ostream< CharType > stream_type
    output stream type for this type of character
    Definition: format.hpp:213
    - -
    std::basic_ostream< CharType > & operator<<(std::basic_ostream< CharType > &out, date_time const &t)
    Definition: date_time.hpp:874
    -
    CharType char_type
    Underlying character type.
    Definition: format.hpp:206
    -
    basic_format< wchar_t > wformat
    Definition: format.hpp:474
    -
    string_type str(std::locale const &loc=std::locale()) const
    Definition: format.hpp:250
    -
    basic_format< char16_t > u16format
    Definition: format.hpp:480
    -
    basic_format< char > format
    Definition: format.hpp:469
    -
    basic_message< char_type > message_type
    Definition: format.hpp:207
    -
    void date_time_pattern(std::basic_string< CharType > const &str)
    Definition: formatting.hpp:155
    -
    void write(stream_type &out) const
    Definition: format.hpp:261
    -
    -
    - - - - - - diff --git a/doc/html/formatting_8hpp_source.html b/doc/html/formatting_8hpp_source.html deleted file mode 100644 index 232e7820..00000000 --- a/doc/html/formatting_8hpp_source.html +++ /dev/null @@ -1,590 +0,0 @@ - - - - - - -Boost.Locale: boost/locale/formatting.hpp Source File - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    formatting.hpp
    -
    -
    -
    1 //
    -
    2 // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
    -
    3 //
    -
    4 // Distributed under the Boost Software License, Version 1.0. (See
    -
    5 // accompanying file LICENSE_1_0.txt or copy at
    -
    6 // http://www.boost.org/LICENSE_1_0.txt)
    -
    7 //
    -
    8 #ifndef BOOST_LOCALE_FORMATTING_HPP_INCLUDED
    -
    9 #define BOOST_LOCALE_FORMATTING_HPP_INCLUDED
    -
    10 
    -
    11 #include <boost/locale/config.hpp>
    -
    12 #ifdef BOOST_MSVC
    -
    13 # pragma warning(push)
    -
    14 # pragma warning(disable : 4275 4251 4231 4660)
    -
    15 #endif
    -
    16 #include <boost/cstdint.hpp>
    -
    17 #include <boost/locale/time_zone.hpp>
    -
    18 #include <ostream>
    -
    19 #include <istream>
    -
    20 #include <string>
    -
    21 #include <string.h>
    -
    22 #include <typeinfo>
    -
    23 
    -
    24 namespace boost {
    -
    25  namespace locale {
    -
    30  namespace flags {
    -
    35  typedef enum {
    -
    36  posix = 0,
    -
    37  number = 1,
    -
    38  currency = 2,
    -
    39  percent = 3,
    -
    40  date = 4,
    -
    41  time = 5,
    -
    42  datetime = 6,
    -
    43  strftime = 7,
    -
    44  spellout = 8,
    -
    45  ordinal = 9,
    -
    46 
    -
    47  display_flags_mask = 31,
    -
    48 
    -
    49  currency_default = 0 << 5,
    -
    50  currency_iso = 1 << 5,
    -
    51  currency_national = 2 << 5,
    -
    52 
    -
    53  currency_flags_mask = 3 << 5,
    -
    54 
    -
    55  time_default = 0 << 7,
    -
    56  time_short = 1 << 7,
    -
    57  time_medium = 2 << 7,
    -
    58  time_long = 3 << 7,
    -
    59  time_full = 4 << 7,
    -
    60  time_flags_mask = 7 << 7,
    -
    61 
    -
    62  date_default = 0 << 10,
    -
    63  date_short = 1 << 10,
    -
    64  date_medium = 2 << 10,
    -
    65  date_long = 3 << 10,
    -
    66  date_full = 4 << 10,
    -
    67  date_flags_mask = 7 << 10,
    -
    68 
    -
    69  datetime_flags_mask = date_flags_mask | time_flags_mask
    -
    70 
    - -
    72 
    -
    77  typedef enum {
    - - -
    80  } pattern_type;
    -
    81 
    -
    85  typedef enum {
    - -
    87  } value_type;
    -
    88 
    -
    89 
    -
    90  } // flags
    -
    91 
    -
    98  class BOOST_LOCALE_DECL ios_info {
    -
    99  public:
    -
    100 
    -
    102 
    -
    103  ios_info();
    -
    104  ios_info(ios_info const &);
    -
    105  ios_info const &operator=(ios_info const &);
    -
    106  ~ios_info();
    -
    107 
    -
    109 
    -
    113  static ios_info &get(std::ios_base &ios);
    -
    114 
    -
    118  void display_flags(uint64_t flags);
    -
    119 
    -
    123  void currency_flags(uint64_t flags);
    -
    124 
    -
    128  void date_flags(uint64_t flags);
    -
    129 
    -
    133  void time_flags(uint64_t flags);
    -
    134 
    -
    138  void datetime_flags(uint64_t flags);
    -
    139 
    -
    143  void domain_id(int);
    -
    144 
    -
    148  void time_zone(std::string const &);
    -
    149 
    -
    150 
    -
    154  template<typename CharType>
    -
    155  void date_time_pattern(std::basic_string<CharType> const &str)
    -
    156  {
    -
    157  string_set &s = date_time_pattern_set();
    -
    158  s.set<CharType>(str.c_str());
    -
    159  }
    -
    160 
    -
    161 
    -
    165  uint64_t display_flags() const;
    -
    166 
    -
    170  uint64_t currency_flags() const;
    -
    171 
    -
    172 
    -
    176  uint64_t date_flags() const;
    -
    177 
    -
    181  uint64_t time_flags() const;
    -
    182 
    -
    186  uint64_t datetime_flags() const;
    -
    187 
    -
    191  int domain_id() const;
    -
    192 
    -
    196  std::string time_zone() const;
    -
    197 
    -
    201  template<typename CharType>
    -
    202  std::basic_string<CharType> date_time_pattern() const
    -
    203  {
    -
    204  string_set const &s = date_time_pattern_set();
    -
    205  return s.get<CharType>();
    -
    206  }
    -
    207 
    -
    209  void on_imbue();
    -
    211 
    -
    212  private:
    -
    213 
    -
    214  class string_set;
    -
    215 
    -
    216  string_set const &date_time_pattern_set() const;
    -
    217  string_set &date_time_pattern_set();
    -
    218 
    -
    219  class BOOST_LOCALE_DECL string_set {
    -
    220  public:
    -
    221  string_set();
    -
    222  ~string_set();
    -
    223  string_set(string_set const &other);
    -
    224  string_set const &operator=(string_set const &other);
    -
    225  void swap(string_set &other);
    -
    226 
    -
    227  template<typename Char>
    -
    228  void set(Char const *s)
    -
    229  {
    -
    230  delete [] ptr;
    -
    231  ptr = 0;
    -
    232  type=&typeid(Char);
    -
    233  Char const *end = s;
    -
    234  while(*end!=0) end++;
    -
    235  // if ptr = 0 it does not matter what is value of size
    -
    236  size = sizeof(Char)*(end - s+1);
    -
    237  ptr = new char[size];
    -
    238  memcpy(ptr,s,size);
    -
    239  }
    -
    240 
    -
    241  template<typename Char>
    -
    242  std::basic_string<Char> get() const
    -
    243  {
    -
    244  if(type==0 || *type!=typeid(Char))
    -
    245  throw std::bad_cast();
    -
    246  std::basic_string<Char> result = reinterpret_cast<Char const *>(ptr);
    -
    247  return result;
    -
    248  }
    -
    249 
    -
    250  private:
    -
    251  std::type_info const *type;
    -
    252  size_t size;
    -
    253  char *ptr;
    -
    254  };
    -
    255 
    -
    256  uint64_t flags_;
    -
    257  int domain_id_;
    -
    258  std::string time_zone_;
    -
    259  string_set datetime_;
    -
    260 
    -
    261  struct data;
    -
    262  data *d;
    -
    263 
    -
    264  };
    -
    265 
    -
    266 
    -
    270  namespace as {
    -
    276 
    -
    281 
    -
    282  inline std::ios_base & posix(std::ios_base & ios)
    -
    283  {
    -
    284  ios_info::get(ios).display_flags(flags::posix);
    -
    285  return ios;
    -
    286  }
    -
    287 
    -
    292  inline std::ios_base & number(std::ios_base & ios)
    -
    293  {
    -
    294  ios_info::get(ios).display_flags(flags::number);
    -
    295  return ios;
    -
    296  }
    -
    297 
    -
    301  inline std::ios_base & currency(std::ios_base & ios)
    -
    302  {
    -
    303  ios_info::get(ios).display_flags(flags::currency);
    -
    304  return ios;
    -
    305  }
    -
    306 
    -
    310  inline std::ios_base & percent(std::ios_base & ios)
    -
    311  {
    -
    312  ios_info::get(ios).display_flags(flags::percent);
    -
    313  return ios;
    -
    314  }
    -
    315 
    -
    319  inline std::ios_base & date(std::ios_base & ios)
    -
    320  {
    -
    321  ios_info::get(ios).display_flags(flags::date);
    -
    322  return ios;
    -
    323  }
    -
    324 
    -
    328  inline std::ios_base & time(std::ios_base & ios)
    -
    329  {
    -
    330  ios_info::get(ios).display_flags(flags::time);
    -
    331  return ios;
    -
    332  }
    -
    333 
    -
    337  inline std::ios_base & datetime(std::ios_base & ios)
    -
    338  {
    -
    339  ios_info::get(ios).display_flags(flags::datetime);
    -
    340  return ios;
    -
    341  }
    -
    342 
    -
    347  inline std::ios_base & strftime(std::ios_base & ios)
    -
    348  {
    -
    349  ios_info::get(ios).display_flags(flags::strftime);
    -
    350  return ios;
    -
    351  }
    -
    352 
    -
    356  inline std::ios_base & spellout(std::ios_base & ios)
    -
    357  {
    -
    358  ios_info::get(ios).display_flags(flags::spellout);
    -
    359  return ios;
    -
    360  }
    -
    361 
    -
    365  inline std::ios_base & ordinal(std::ios_base & ios)
    -
    366  {
    -
    367  ios_info::get(ios).display_flags(flags::ordinal);
    -
    368  return ios;
    -
    369  }
    -
    370 
    -
    374  inline std::ios_base & currency_default(std::ios_base & ios)
    -
    375  {
    -
    376  ios_info::get(ios).currency_flags(flags::currency_default);
    -
    377  return ios;
    -
    378  }
    -
    379 
    -
    383  inline std::ios_base & currency_iso(std::ios_base & ios)
    -
    384  {
    -
    385  ios_info::get(ios).currency_flags(flags::currency_iso);
    -
    386  return ios;
    -
    387  }
    -
    388 
    -
    392  inline std::ios_base & currency_national(std::ios_base & ios)
    -
    393  {
    -
    394  ios_info::get(ios).currency_flags(flags::currency_national);
    -
    395  return ios;
    -
    396  }
    -
    397 
    -
    401  inline std::ios_base & time_default(std::ios_base & ios)
    -
    402  {
    -
    403  ios_info::get(ios).time_flags(flags::time_default);
    -
    404  return ios;
    -
    405  }
    -
    406 
    -
    410  inline std::ios_base & time_short(std::ios_base & ios)
    -
    411  {
    -
    412  ios_info::get(ios).time_flags(flags::time_short);
    -
    413  return ios;
    -
    414  }
    -
    415 
    -
    419  inline std::ios_base & time_medium(std::ios_base & ios)
    -
    420  {
    -
    421  ios_info::get(ios).time_flags(flags::time_medium);
    -
    422  return ios;
    -
    423  }
    -
    424 
    -
    428  inline std::ios_base & time_long(std::ios_base & ios)
    -
    429  {
    -
    430  ios_info::get(ios).time_flags(flags::time_long);
    -
    431  return ios;
    -
    432  }
    -
    433 
    -
    437  inline std::ios_base & time_full(std::ios_base & ios)
    -
    438  {
    -
    439  ios_info::get(ios).time_flags(flags::time_full);
    -
    440  return ios;
    -
    441  }
    -
    442 
    -
    446  inline std::ios_base & date_default(std::ios_base & ios)
    -
    447  {
    -
    448  ios_info::get(ios).date_flags(flags::date_default);
    -
    449  return ios;
    -
    450  }
    -
    451 
    -
    455  inline std::ios_base & date_short(std::ios_base & ios)
    -
    456  {
    -
    457  ios_info::get(ios).date_flags(flags::date_short);
    -
    458  return ios;
    -
    459  }
    -
    460 
    -
    464  inline std::ios_base & date_medium(std::ios_base & ios)
    -
    465  {
    -
    466  ios_info::get(ios).date_flags(flags::date_medium);
    -
    467  return ios;
    -
    468  }
    -
    469 
    -
    473  inline std::ios_base & date_long(std::ios_base & ios)
    -
    474  {
    -
    475  ios_info::get(ios).date_flags(flags::date_long);
    -
    476  return ios;
    -
    477  }
    -
    478 
    -
    482  inline std::ios_base & date_full(std::ios_base & ios)
    -
    483  {
    -
    484  ios_info::get(ios).date_flags(flags::date_full);
    -
    485  return ios;
    -
    486  }
    -
    487 
    -
    488 
    -
    490  namespace details {
    -
    491  template<typename CharType>
    -
    492  struct add_ftime {
    -
    493 
    -
    494  std::basic_string<CharType> ftime;
    -
    495 
    -
    496  void apply(std::basic_ios<CharType> &ios) const
    -
    497  {
    - -
    499  as::strftime(ios);
    -
    500  }
    -
    501 
    -
    502  };
    -
    503 
    -
    504  template<typename CharType>
    -
    505  std::basic_ostream<CharType> &operator<<(std::basic_ostream<CharType> &out,add_ftime<CharType> const &fmt)
    -
    506  {
    -
    507  fmt.apply(out);
    -
    508  return out;
    -
    509  }
    -
    510 
    -
    511  template<typename CharType>
    -
    512  std::basic_istream<CharType> &operator>>(std::basic_istream<CharType> &in,add_ftime<CharType> const &fmt)
    -
    513  {
    -
    514  fmt.apply(in);
    -
    515  return in;
    -
    516  }
    -
    517 
    -
    518  }
    -
    520 
    -
    555 
    -
    556 
    -
    557  template<typename CharType>
    -
    558  #ifdef BOOST_LOCALE_DOXYGEN
    -
    559  unspecified_type
    -
    560  #else
    -
    561  details::add_ftime<CharType>
    -
    562  #endif
    -
    563  ftime(std::basic_string<CharType> const &format)
    -
    564  {
    -
    565  details::add_ftime<CharType> fmt;
    -
    566  fmt.ftime=format;
    -
    567  return fmt;
    -
    568  }
    -
    569 
    -
    573  template<typename CharType>
    -
    574  #ifdef BOOST_LOCALE_DOXYGEN
    -
    575  unspecified_type
    -
    576  #else
    -
    577  details::add_ftime<CharType>
    -
    578  #endif
    -
    579  ftime(CharType const *format)
    -
    580  {
    -
    581  details::add_ftime<CharType> fmt;
    -
    582  fmt.ftime=format;
    -
    583  return fmt;
    -
    584  }
    -
    585 
    -
    587  namespace details {
    -
    588  struct set_timezone {
    -
    589  std::string id;
    -
    590  };
    -
    591  template<typename CharType>
    -
    592  std::basic_ostream<CharType> &operator<<(std::basic_ostream<CharType> &out,set_timezone const &fmt)
    -
    593  {
    -
    594  ios_info::get(out).time_zone(fmt.id);
    -
    595  return out;
    -
    596  }
    -
    597 
    -
    598  template<typename CharType>
    -
    599  std::basic_istream<CharType> &operator>>(std::basic_istream<CharType> &in,set_timezone const &fmt)
    -
    600  {
    -
    601  ios_info::get(in).time_zone(fmt.id);
    -
    602  return in;
    -
    603  }
    -
    604  }
    -
    606 
    -
    610  inline std::ios_base &gmt(std::ios_base &ios)
    -
    611  {
    -
    612  ios_info::get(ios).time_zone("GMT");
    -
    613  return ios;
    -
    614  }
    -
    615 
    -
    619  inline std::ios_base &local_time(std::ios_base &ios)
    -
    620  {
    - -
    622  return ios;
    -
    623  }
    -
    624 
    -
    628  inline
    -
    629  #ifdef BOOST_LOCALE_DOXYGEN
    -
    630  unspecified_type
    -
    631  #else
    -
    632  details::set_timezone
    -
    633  #endif
    -
    634  time_zone(char const *id)
    -
    635  {
    -
    636  details::set_timezone tz;
    -
    637  tz.id=id;
    -
    638  return tz;
    -
    639  }
    -
    640 
    -
    644  inline
    -
    645  #ifdef BOOST_LOCALE_DOXYGEN
    -
    646  unspecified_type
    -
    647  #else
    -
    648  details::set_timezone
    -
    649  #endif
    -
    650  time_zone(std::string const &id)
    -
    651  {
    -
    652  details::set_timezone tz;
    -
    653  tz.id=id;
    -
    654  return tz;
    -
    655  }
    -
    656 
    -
    657 
    -
    661 
    -
    662  } // as manipulators
    -
    663 
    -
    664  } // locale
    -
    665 } // boost
    -
    666 
    -
    667 #ifdef BOOST_MSVC
    -
    668 #pragma warning(pop)
    -
    669 #endif
    -
    670 
    -
    671 
    -
    672 #endif
    -
    673 // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
    -
    a printf like class that allows type-safe and locale aware message formatting
    Definition: format.hpp:204
    -
    std::ios_base & date_long(std::ios_base &ios)
    Definition: formatting.hpp:473
    -
    unspecified_type time_zone(std::string const &id)
    Definition: formatting.hpp:650
    -
    std::ios_base & time_default(std::ios_base &ios)
    Definition: formatting.hpp:401
    - -
    std::ios_base & strftime(std::ios_base &ios)
    Definition: formatting.hpp:347
    -
    std::ios_base & date_medium(std::ios_base &ios)
    Definition: formatting.hpp:464
    -
    std::ios_base & currency(std::ios_base &ios)
    Definition: formatting.hpp:301
    -
    std::ios_base & time_full(std::ios_base &ios)
    Definition: formatting.hpp:437
    -
    unspecified_type time_zone(char const *id)
    Definition: formatting.hpp:634
    -
    std::ios_base & ordinal(std::ios_base &ios)
    Definition: formatting.hpp:365
    -
    unspecified_type ftime(std::basic_string< CharType > const &format)
    Definition: formatting.hpp:563
    -
    std::ios_base & date_full(std::ios_base &ios)
    Definition: formatting.hpp:482
    -
    std::ios_base & posix(std::ios_base &ios)
    Definition: formatting.hpp:282
    -
    std::ios_base & currency_default(std::ios_base &ios)
    Definition: formatting.hpp:374
    -
    std::ios_base & time_medium(std::ios_base &ios)
    Definition: formatting.hpp:419
    -
    void date_flags(uint64_t flags)
    -
    std::ios_base & time_long(std::ios_base &ios)
    Definition: formatting.hpp:428
    -
    std::ios_base & gmt(std::ios_base &ios)
    Definition: formatting.hpp:610
    -
    display_flags_type
    Definition: formatting.hpp:35
    -
    std::ios_base & number(std::ios_base &ios)
    Definition: formatting.hpp:292
    -
    std::ios_base & percent(std::ios_base &ios)
    Definition: formatting.hpp:310
    -
    std::ios_base & spellout(std::ios_base &ios)
    Definition: formatting.hpp:356
    -
    std::ios_base & currency_national(std::ios_base &ios)
    Definition: formatting.hpp:392
    -
    time zone name
    Definition: formatting.hpp:79
    -
    std::ios_base & date(std::ios_base &ios)
    Definition: formatting.hpp:319
    -
    void display_flags(uint64_t flags)
    -
    static ios_info & get(std::ios_base &ios)
    -
    This class holds an external data - beyond existing fmtflags that std::ios_base holds.
    Definition: formatting.hpp:98
    -
    strftime like formatting
    Definition: formatting.hpp:78
    -
    std::basic_string< CharType > date_time_pattern() const
    Definition: formatting.hpp:202
    -
    void time_flags(uint64_t flags)
    -
    std::ios_base & date_default(std::ios_base &ios)
    Definition: formatting.hpp:446
    -
    std::ios_base & datetime(std::ios_base &ios)
    Definition: formatting.hpp:337
    -
    void time_zone(std::string const &)
    -
    std::ios_base & time_short(std::ios_base &ios)
    Definition: formatting.hpp:410
    -
    std::ios_base & date_short(std::ios_base &ios)
    Definition: formatting.hpp:455
    -
    std::ios_base & local_time(std::ios_base &ios)
    Definition: formatting.hpp:619
    -
    std::basic_istream< CharType > & operator>>(std::basic_istream< CharType > &in, date_time &t)
    Definition: date_time.hpp:901
    -
    basic_format< char > format
    Definition: format.hpp:469
    -
    std::ios_base & time(std::ios_base &ios)
    Definition: formatting.hpp:328
    -
    void currency_flags(uint64_t flags)
    -
    Domain code - for message formatting.
    Definition: formatting.hpp:86
    -
    void date_time_pattern(std::basic_string< CharType > const &str)
    Definition: formatting.hpp:155
    -
    pattern_type
    Definition: formatting.hpp:77
    -
    value_type
    Definition: formatting.hpp:85
    -
    std::ios_base & currency_iso(std::ios_base &ios)
    Definition: formatting.hpp:383
    -
    -
    - - - - - - diff --git a/doc/html/formatting_and_parsing.html b/doc/html/formatting_and_parsing.html deleted file mode 100644 index 4d6d700b..00000000 --- a/doc/html/formatting_and_parsing.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - -Boost.Locale: Numbers, Time and Currency formatting and parsing - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    Numbers, Time and Currency formatting and parsing
    -
    -
    -

    All formatting and parsing is performed via the standard I/O streams. Each of the above information types is represented as a number. The formatting information is set using iostream manipulators. All manipulators are placed in the boost::locale::as namespace.

    -

    For example:

    -
    cout << as::currency << 123.45 << endl;
    -
    // display 123.45 in local currency representation.
    -
    cin >> as::currency >> x ;
    -
    // Parse currency representation and store it in x
    -

    There is a special manipulator as::posix that "unsets" locale-specific settings and returns them to the default iostream formatting and parsing methods. Please note, such formats may still be localized by the default std::num_put and std::num_get facets.

    -

    -Numbers and number manipulators

    -

    Here are the manipulators for number formatting:

    -
      -
    • as::number – format number according to local specifications, it takes into account various std::ios_base flags like scientific format and precision.
      -
    • -
    • as::percent – format number as "percent" format. For example:
      cout << as::percent << 0.25 <<endl;
      -
      Would create an output that may look like this:
          25%

      -
    • -
    • as::spellout – spell the number. For example, under the English locale, 103 may be displayed as "one hundred three". Note: not all locales provide rules for spelling numbers. In such a case the number would be displayed in decimal format.
      -
    • -
    • as::ordinal – display an order-of element. For example "2" would be displayed as "2nd" under the English locale. As in the above case, not all locales provide ordinal rules.
    • -
    -

    -Currency formatting

    -

    These are the manipulators for currency formatting:

    -
      -
    • as::currency – set the format to currency mode.
    • -
    • as::currency_iso – change the currency format to international, like "USD" instead of "$". This flag is supported when using ICU 4.2 and above.
    • -
    • as::currency_national – change currency format to national, like "$".
    • -
    • as::currency_default – return to the default (national) currency format.
    • -
    -
    Note
    as::currency_XYZ manipulators have no effect on general formatting, only on the currency format. You must use both currency and number manipulators to use a non-default format.
    -

    -Date and Time formatting

    -

    Dates and times are represented as POSIX time. When date-time formatting is turned on in the iostream, each number is treated as a POSIX time. The number may be an integer or a double.

    -

    There are four major manipulators for Date and Time formatting:

    -
      -
    • as::date – date only
    • -
    • as::time – time only
    • -
    • as::datetime – both date and time
    • -
    • as::ftime – parameterized manipulator that allows specification of time in the format that is used in the strftime function. Note: not all formatting flags of strftime are supported.
    • -
    -

    For example:

    -
    time_t now=time(0);
    -
    cout << "Today is "<< as::date << now << " and tomorrow is " << now+24*3600 << endl;
    -
    cout << "Current time is "<< as::time << now << endl;
    -
    cout << "The current weekday is "<< as::ftime("%A") << now << endl;
    -

    More fine-grained control of date-time formatting is also available:

    -
      -
    • as::time_default , as::time_short , as::time_medium , as::time_long , as::time_full – change time formatting.
    • -
    • as::date_default , as::date_short , as::date_medium , as::date_long , as::date_full – change date formatting.
    • -
    -

    These manipulators, when used together with the as::date, as::time, or as::datetime manipulators, change the date-time representation. The default format is medium.

    -

    By default, the date and time are shown in the local time zone. This behavior may be changed with the following manipulators:

    -
      -
    • as::gmt – display date and time in GMT.
    • -
    • as::local_time – display in local time zone (default).
    • -
    • as::time_zone – parameterized manipulator that sets the time-zone ID for date-time formatting and parsing. It takes a string parameter that represents the time zone ID.
    • -
    -

    For example:

    -
    double now=time(0);
    -
    cout << as::datetime << as::local_time << "Local time is: "<< now << endl;
    -
    cout << as::gmt << "GMT Time is: "<< now <<endl;
    -
    cout << as::time_zone("EST") << "Eastern Standard Time is: "<< now <<endl;
    -

    There is a list of supported strftime flags by ICU backend:

    -
      -
    • %a – Abbreviated weekday (Sun.)
    • -
    • %A – Full weekday (Sunday)
    • -
    • %b – Abbreviated month (Jan.)
    • -
    • %B – Full month (January)
    • -
    • %c – Locale date-time format. Note: prefer using as::datetime
    • -
    • %d – Day of Month [01,31]
    • -
    • %e – Day of Month [1,31]
    • -
    • %h – Same as %b
    • -
    • %H – 24 clock hour [00,23]
    • -
    • %I – 12 clock hour [01,12]
    • -
    • %j – Day of year [1,366]
    • -
    • %m – Month [01,12]
    • -
    • %M – Minute [00,59]
    • -
    • %n – New Line
    • -
    • %p – AM/PM in locale representation
    • -
    • %r – Time with AM/PM, same as %I:%M:%S %p
    • -
    • %R – Same as %H:%M
    • -
    • %S – Second [00,61]
    • -
    • %t – Tab character
    • -
    • %T – Same as %H:%M:%S
    • -
    • %x – Local date representation. Note: prefer using as::date
    • -
    • %X – Local time representation. Note: prefer using as::time
    • -
    • %y – Year [00,99]
    • -
    • %Y – 4 digits year. (2009)
    • -
    • %Z – Time Zone
    • -
    • %% – Percent symbol
    • -
    -

    Unsupported strftime flags are: %C , %u , %U , %V , %w , %W . Also, the O and E modifiers are not supported.

    -

    General recommendations

    -
      -
    • Prefer using generic date-time manipulators rather than specifying the full format using as::ftime.
    • -
    • Remember that current calendars may be not Gregorian.
    • -
    -

    -Internals

    -

    Formatting information is stored in a stream class by using the xalloc, pword, and register_callback member functions of std::ios_base . All the information is stored and managed using a special object bound to iostream, and the manipulators just change its state.

    -

    When a number is written to or read from the stream, a custom Boost.Locale facet accesses the object and checks the required formatting information. Then it creates a special object that actually formats the number and caches it in the iostream. The next time a number is written to the stream, the same formatter would be used unless some flags had changed and formatter object is invalid.

    -
    -
    - - - - - - diff --git a/doc/html/ftv2blank.png b/doc/html/ftv2blank.png deleted file mode 100644 index 63c605bb4c3d941c921a4b6cfa74951e946bcb48..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 86 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!3HExu9B$%QnH>djv*C{Z|`mdau^P8_z}#X h?B8GEpdi4(BFDx$je&7RrDQEg&ePS;Wt~$(69Dh@6T1Ka diff --git a/doc/html/ftv2cl.png b/doc/html/ftv2cl.png deleted file mode 100644 index 132f6577bf7f085344904602815a260d29f55d9b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 453 zcmV;$0XqJPP)VBF;ev;toEj8_OB0EQg5eYilIj#JZG_m^33l3^k4mtzx!TVD?g)Y$ zrvwRDSqT!wLIM$dWCIa$vtxE|mzbTzu-y&$FvF6WA2a{Wr1g}`WdPT-0JzEZ0IxAv z-Z+ejZc&H;I5-pb_SUB}04j0^V)3t{`z<7asDl2Tw3w3sP%)0^8$bhEg)IOTBcRXv zFfq~3&gvJ$F-U7mpBW8z1GY~HK&7h4^YI~Orv~wLnC0PP_dAkv;nzX{9Q|8Gv=2ca z@v)c9T;D#h`TZ2X&&$ff2wedmot995de~-s3I)yauahg;7qn*?1n?F$e+PwP37}~; z1NKUk7reVK^7A;$QRW7qAx40HHUZ<|k3U%nz(Ec`#i+q9K!dgcROAlCS?`L= v>#=f?wF5ZND!1uAfQsk;KN^4&*8~0npJiJ%2dj9(00000NkvXXu0mjfWVFf_ diff --git a/doc/html/ftv2doc.png b/doc/html/ftv2doc.png deleted file mode 100644 index 17edabff95f7b8da13c9516a04efe05493c29501..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 746 zcmV7=@pnbNXRFEm&G8P!&WHG=d)>K?YZ1bzou)2{$)) zumDct!>4SyxL;zgaG>wy`^Hv*+}0kUfCrz~BCOViSb$_*&;{TGGn2^x9K*!Sf0=lV zpP=7O;GA0*Jm*tTYj$IoXvimpnV4S1Z5f$p*f$Db2iq2zrVGQUz~yq`ahn7ck(|CE z7Gz;%OP~J6)tEZWDzjhL9h2hdfoU2)Nd%T<5Kt;Y0XLt&<@6pQx!nw*5`@bq#?l*?3z{Hlzoc=Pr>oB5(9i6~_&-}A(4{Q$>c>%rV&E|a(r&;?i5cQB=} zYSDU5nXG)NS4HEs0it2AHe2>shCyr7`6@4*6{r@8fXRbTA?=IFVWAQJL&H5H{)DpM#{W(GL+Idzf^)uRV@oB8u$ z8v{MfJbTiiRg4bza<41NAzrl{=3fl_D+$t+^!xlQ8S}{UtY`e z;;&9UhyZqQRN%2pot{*Ei0*4~hSF_3AH2@fKU!$NSflS>{@tZpDT4`M2WRTTVH+D? z)GFlEGGHe?koB}i|1w45!BF}N_q&^HJ&-tyR{(afC6H7|aml|tBBbv}55C5DNP8p3 z)~jLEO4Z&2hZmP^i-e%(@d!(E|KRafiU8Q5u(wU((j8un3OR*Hvj+t diff --git a/doc/html/ftv2folderclosed.png b/doc/html/ftv2folderclosed.png deleted file mode 100644 index bb8ab35edce8e97554e360005ee9fc5bffb36e66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 616 zcmV-u0+;=XP)a9#ETzayK)T~Jw&MMH>OIr#&;dC}is*2Mqdf&akCc=O@`qC+4i z5Iu3w#1M@KqXCz8TIZd1wli&kkl2HVcAiZ8PUn5z_kG@-y;?yK06=cA0U%H0PH+kU zl6dp}OR(|r8-RG+YLu`zbI}5TlOU6ToR41{9=uz^?dGTNL;wIMf|V3`d1Wj3y!#6` zBLZ?xpKR~^2x}?~zA(_NUu3IaDB$tKma*XUdOZN~c=dLt_h_k!dbxm_*ibDM zlFX`g{k$X}yIe%$N)cn1LNu=q9_CS)*>A zsX_mM4L@`(cSNQKMFc$RtYbx{79#j-J7hk*>*+ZZhM4Hw?I?rsXCi#mRWJ=-0LGV5a-WR0Qgt<|Nqf)C-@80`5gIz45^_20000IqP)X=#(TiCT&PiIIVc55T}TU}EUh*{q$|`3@{d>{Tc9Bo>e= zfmF3!f>fbI9#GoEHh0f`i5)wkLpva0ztf%HpZneK?w-7AK@b4Itw{y|Zd3k!fH?q2 zlhckHd_V2M_X7+)U&_Xcfvtw60l;--DgZmLSw-Y?S>)zIqMyJ1#FwLU*%bl38ok+! zh78H87n`ZTS;uhzAR$M`zZ`bVhq=+%u9^$5jDplgxd44}9;IRqUH1YHH|@6oFe%z( zo4)_>E$F&^P-f(#)>(TrnbE>Pefs9~@iN=|)Rz|V`sGfHNrJ)0gJb8xx+SBmRf@1l zvuzt=vGfI)<-F9!o&3l?>9~0QbUDT(wFdnQPv%xdD)m*g%!20>Bc9iYmGAp<9YAa( z0QgYgTWqf1qN++Gqp z8@AYPTB3E|6s=WLG?xw0tm|U!o=&zd+H0oRYE;Dbx+Na9s^STqX|Gnq%H8s(nGDGJ j8vwW|`Ts`)fSK|Kx=IK@RG@g200000NkvXXu0mjfauFEA diff --git a/doc/html/ftv2lastnode.png b/doc/html/ftv2lastnode.png deleted file mode 100644 index 63c605bb4c3d941c921a4b6cfa74951e946bcb48..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 86 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!3HExu9B$%QnH>djv*C{Z|`mdau^P8_z}#X h?B8GEpdi4(BFDx$je&7RrDQEg&ePS;Wt~$(69Dh@6T1Ka diff --git a/doc/html/ftv2link.png b/doc/html/ftv2link.png deleted file mode 100644 index 17edabff95f7b8da13c9516a04efe05493c29501..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 746 zcmV7=@pnbNXRFEm&G8P!&WHG=d)>K?YZ1bzou)2{$)) zumDct!>4SyxL;zgaG>wy`^Hv*+}0kUfCrz~BCOViSb$_*&;{TGGn2^x9K*!Sf0=lV zpP=7O;GA0*Jm*tTYj$IoXvimpnV4S1Z5f$p*f$Db2iq2zrVGQUz~yq`ahn7ck(|CE z7Gz;%OP~J6)tEZWDzjhL9h2hdfoU2)Nd%T<5Kt;Y0XLt&<@6pQx!nw*5`@bq#?l*?3z{Hlzoc=Pr>oB5(9i6~_&-}A(4{Q$>c>%rV&E|a(r&;?i5cQB=} zYSDU5nXG)NS4HEs0it2AHe2>shCyr7`6@4*6{r@8fXRbTA?=IFVWAQJL&H5H{)DpM#{W(GL+Idzf^)uRV@oB8u$ z8v{MfJbTiiRg4bza<41NAzrl{=3fl_D+$t+^!xlQ8S}{UtY`e z;;&9UhyZqQRN%2pot{*Ei0*4~hSF_3AH2@fKU!$NSflS>{@tZpDT4`M2WRTTVH+D? z)GFlEGGHe?koB}i|1w45!BF}N_q&^HJ&-tyR{(afC6H7|aml|tBBbv}55C5DNP8p3 z)~jLEO4Z&2hZmP^i-e%(@d!(E|KRafiU8Q5u(wU((j8un3OR*Hvj+t diff --git a/doc/html/ftv2mlastnode.png b/doc/html/ftv2mlastnode.png deleted file mode 100644 index 0b63f6d38c4b9ec907b820192ebe9724ed6eca22..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 246 zcmVkw!R34#Lv2LOS^S2tZA31X++9RY}n zChwn@Z)Wz*WWHH{)HDtJnq&A2hk$b-y(>?@z0iHr41EKCGp#T5?07*qoM6N<$f(V3Pvj6}9 diff --git a/doc/html/ftv2mnode.png b/doc/html/ftv2mnode.png deleted file mode 100644 index 0b63f6d38c4b9ec907b820192ebe9724ed6eca22..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 246 zcmVkw!R34#Lv2LOS^S2tZA31X++9RY}n zChwn@Z)Wz*WWHH{)HDtJnq&A2hk$b-y(>?@z0iHr41EKCGp#T5?07*qoM6N<$f(V3Pvj6}9 diff --git a/doc/html/ftv2mo.png b/doc/html/ftv2mo.png deleted file mode 100644 index 4bfb80f76e65815989a9350ad79d8ce45380e2b1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 403 zcmV;E0c`$>P)${!fXv7NWJ%@%u4(KapRY>T6_x;E zxE7kt!}Tiw8@d9Sd`rTGum>z#Q14vIm`wm1#-byD1muMi02@YNO5LRF0o!Y{`a!Ya z{^&p0Su|s705&2QxmqdexG+-zNKL3f@8gTQSJrKByfo+oNJ^-{|Mn||Q5SDwjQVsS zr1}7o5-QMs>gYIMD>GRw@$lT`z4r-_m{5U#cR{urD_)TOeY)(UD|qZ^&y`IVijqk~ xs(9-kWFr7E^!lgi8GsFK5kOY_{Xbgf0^etEU%fLevs?fG002ovPDHLkV1nB&vX1}& diff --git a/doc/html/ftv2node.png b/doc/html/ftv2node.png deleted file mode 100644 index 63c605bb4c3d941c921a4b6cfa74951e946bcb48..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 86 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!3HExu9B$%QnH>djv*C{Z|`mdau^P8_z}#X h?B8GEpdi4(BFDx$je&7RrDQEg&ePS;Wt~$(69Dh@6T1Ka diff --git a/doc/html/ftv2ns.png b/doc/html/ftv2ns.png deleted file mode 100644 index 72e3d71c2892d6f00e259facebc88b45f6db2e35..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 388 zcmV-~0ek+5P)f+++#cT|!CkD&4pnIkeMEUEM*>`*9>+Juji$!h-mW%M^8s9957{3nvbrz^&=u<~TAUrFROkmt%^F~Ez+-c53Lv%iH3d38!Rv?K zrb&MYAhp;Gf<}wS;9ZZq2@;!uYG;=Z>~GKE^{HD4keu}lnyqhc>kWX^tQn|warJ~h zT+rtMkdz6aHoN%z(o|&wpu@@OpJnF_z{PA)6(FHw02iHslz^(N{4*+K9)QJHR87wT iTyp>aXaF{u2lxRou|^4tux6eB0000^P)R?RzRoKvklcaQ%HF6%rK2&ZgO(-ihJ_C zzrKgp4jgO( fd_(yg|3PpEQb#9`a?Pz_00000NkvXXu0mjftR`5K diff --git a/doc/html/ftv2pnode.png b/doc/html/ftv2pnode.png deleted file mode 100644 index c6ee22f937a07d1dbfc27c669d11f8ed13e2f152..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 229 zcmV^P)R?RzRoKvklcaQ%HF6%rK2&ZgO(-ihJ_C zzrKgp4jgO( fd_(yg|3PpEQb#9`a?Pz_00000NkvXXu0mjftR`5K diff --git a/doc/html/ftv2splitbar.png b/doc/html/ftv2splitbar.png deleted file mode 100644 index fe895f2c58179b471a22d8320b39a4bd7312ec8e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 314 zcmeAS@N?(olHy`uVBq!ia0vp^Yzz!63>-{AmhX=Jf(#6djGiuzAr*{o?=JLmPLyc> z_*`QK&+BH@jWrYJ7>r6%keRM@)Qyv8R=enp0jiI>aWlGyB58O zFVR20d+y`K7vDw(hJF3;>dD*3-?v=<8M)@x|EEGLnJsniYK!2U1 Y!`|5biEc?d1`HDhPgg&ebxsLQ02F6;9RL6T diff --git a/doc/html/ftv2vertline.png b/doc/html/ftv2vertline.png deleted file mode 100644 index 63c605bb4c3d941c921a4b6cfa74951e946bcb48..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 86 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!3HExu9B$%QnH>djv*C{Z|`mdau^P8_z}#X h?B8GEpdi4(BFDx$je&7RrDQEg&ePS;Wt~$(69Dh@6T1Ka diff --git a/doc/html/functions.html b/doc/html/functions.html deleted file mode 100644 index 782a0070..00000000 --- a/doc/html/functions.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - -Boost.Locale: Class Members - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    Here is a list of all documented class members with links to the class documentation for each member:
    - -

    - a -

    -
    -
    - - - - - - diff --git a/doc/html/functions_b.html b/doc/html/functions_b.html deleted file mode 100644 index bb278671..00000000 --- a/doc/html/functions_b.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - -Boost.Locale: Class Members - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - - - - - - - - diff --git a/doc/html/functions_c.html b/doc/html/functions_c.html deleted file mode 100644 index be9982f4..00000000 --- a/doc/html/functions_c.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - -Boost.Locale: Class Members - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    Here is a list of all documented class members with links to the class documentation for each member:
    - -

    - c -

    -
    -
    - - - - - - diff --git a/doc/html/functions_d.html b/doc/html/functions_d.html deleted file mode 100644 index 0f8df9b1..00000000 --- a/doc/html/functions_d.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - -Boost.Locale: Class Members - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    Here is a list of all documented class members with links to the class documentation for each member:
    - -

    - d -

    -
    -
    - - - - - - diff --git a/doc/html/functions_dup.js b/doc/html/functions_dup.js deleted file mode 100644 index 0aa52834..00000000 --- a/doc/html/functions_dup.js +++ /dev/null @@ -1,25 +0,0 @@ -var functions_dup = -[ - [ "a", "functions.html", null ], - [ "b", "functions_b.html", null ], - [ "c", "functions_c.html", null ], - [ "d", "functions_d.html", null ], - [ "e", "functions_e.html", null ], - [ "f", "functions_f.html", null ], - [ "g", "functions_g.html", null ], - [ "h", "functions_h.html", null ], - [ "i", "functions_i.html", null ], - [ "l", "functions_l.html", null ], - [ "m", "functions_m.html", null ], - [ "n", "functions_n.html", null ], - [ "o", "functions_o.html", null ], - [ "p", "functions_p.html", null ], - [ "q", "functions_q.html", null ], - [ "r", "functions_r.html", null ], - [ "s", "functions_s.html", null ], - [ "t", "functions_t.html", null ], - [ "u", "functions_u.html", null ], - [ "v", "functions_v.html", null ], - [ "w", "functions_w.html", null ], - [ "~", "functions_~.html", null ] -]; \ No newline at end of file diff --git a/doc/html/functions_e.html b/doc/html/functions_e.html deleted file mode 100644 index 26219e8d..00000000 --- a/doc/html/functions_e.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - -Boost.Locale: Class Members - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - - - - - - - - diff --git a/doc/html/functions_enum.html b/doc/html/functions_enum.html deleted file mode 100644 index e3b289dd..00000000 --- a/doc/html/functions_enum.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - -Boost.Locale: Class Members - Enumerations - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    - - - - - - diff --git a/doc/html/functions_eval.html b/doc/html/functions_eval.html deleted file mode 100644 index 0ab30a53..00000000 --- a/doc/html/functions_eval.html +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - -Boost.Locale: Class Members - Enumerator - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    - - - - - - diff --git a/doc/html/functions_f.html b/doc/html/functions_f.html deleted file mode 100644 index 7c5fdf53..00000000 --- a/doc/html/functions_f.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - -Boost.Locale: Class Members - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    Here is a list of all documented class members with links to the class documentation for each member:
    - -

    - f -

    -
    -
    - - - - - - diff --git a/doc/html/functions_func.html b/doc/html/functions_func.html deleted file mode 100644 index 0d2b3169..00000000 --- a/doc/html/functions_func.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - -Boost.Locale: Class Members - Functions - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    -
    -  - -

    - a -

    -
    -
    - - - - - - diff --git a/doc/html/functions_func.js b/doc/html/functions_func.js deleted file mode 100644 index 58f8dc28..00000000 --- a/doc/html/functions_func.js +++ /dev/null @@ -1,24 +0,0 @@ -var functions_func = -[ - [ "a", "functions_func.html", null ], - [ "b", "functions_func_b.html", null ], - [ "c", "functions_func_c.html", null ], - [ "d", "functions_func_d.html", null ], - [ "e", "functions_func_e.html", null ], - [ "f", "functions_func_f.html", null ], - [ "g", "functions_func_g.html", null ], - [ "h", "functions_func_h.html", null ], - [ "i", "functions_func_i.html", null ], - [ "l", "functions_func_l.html", null ], - [ "m", "functions_func_m.html", null ], - [ "n", "functions_func_n.html", null ], - [ "o", "functions_func_o.html", null ], - [ "p", "functions_func_p.html", null ], - [ "r", "functions_func_r.html", null ], - [ "s", "functions_func_s.html", null ], - [ "t", "functions_func_t.html", null ], - [ "u", "functions_func_u.html", null ], - [ "v", "functions_func_v.html", null ], - [ "w", "functions_func_w.html", null ], - [ "~", "functions_func_~.html", null ] -]; \ No newline at end of file diff --git a/doc/html/functions_func_b.html b/doc/html/functions_func_b.html deleted file mode 100644 index d8255d48..00000000 --- a/doc/html/functions_func_b.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - -Boost.Locale: Class Members - Functions - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - - - - - - - - diff --git a/doc/html/functions_func_c.html b/doc/html/functions_func_c.html deleted file mode 100644 index c1dd6d97..00000000 --- a/doc/html/functions_func_c.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - -Boost.Locale: Class Members - Functions - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - - - - - - - - diff --git a/doc/html/functions_func_d.html b/doc/html/functions_func_d.html deleted file mode 100644 index 037062e3..00000000 --- a/doc/html/functions_func_d.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - -Boost.Locale: Class Members - Functions - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - - - - - - - - diff --git a/doc/html/functions_func_e.html b/doc/html/functions_func_e.html deleted file mode 100644 index 75770df1..00000000 --- a/doc/html/functions_func_e.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - -Boost.Locale: Class Members - Functions - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - - - - - - - - diff --git a/doc/html/functions_func_f.html b/doc/html/functions_func_f.html deleted file mode 100644 index 9a19764e..00000000 --- a/doc/html/functions_func_f.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - -Boost.Locale: Class Members - Functions - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - - - - - - - - diff --git a/doc/html/functions_func_g.html b/doc/html/functions_func_g.html deleted file mode 100644 index 3017cd01..00000000 --- a/doc/html/functions_func_g.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - -Boost.Locale: Class Members - Functions - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - - - - - - - - diff --git a/doc/html/functions_func_h.html b/doc/html/functions_func_h.html deleted file mode 100644 index 0d73a41c..00000000 --- a/doc/html/functions_func_h.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Boost.Locale: Class Members - Functions - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    -
    -  - -

    - h -

    -
    -
    - - - - - - diff --git a/doc/html/functions_func_i.html b/doc/html/functions_func_i.html deleted file mode 100644 index a6b10114..00000000 --- a/doc/html/functions_func_i.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - -Boost.Locale: Class Members - Functions - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - - - - - - - - diff --git a/doc/html/functions_func_l.html b/doc/html/functions_func_l.html deleted file mode 100644 index 9639a2a3..00000000 --- a/doc/html/functions_func_l.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - -Boost.Locale: Class Members - Functions - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    -
    -  - -

    - l -

    -
    -
    - - - - - - diff --git a/doc/html/functions_func_m.html b/doc/html/functions_func_m.html deleted file mode 100644 index f0f52ada..00000000 --- a/doc/html/functions_func_m.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - -Boost.Locale: Class Members - Functions - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - - - - - - - - diff --git a/doc/html/functions_func_n.html b/doc/html/functions_func_n.html deleted file mode 100644 index ff3258f8..00000000 --- a/doc/html/functions_func_n.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Boost.Locale: Class Members - Functions - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    -
    -  - -

    - n -

    -
    -
    - - - - - - diff --git a/doc/html/functions_func_o.html b/doc/html/functions_func_o.html deleted file mode 100644 index 7db577f8..00000000 --- a/doc/html/functions_func_o.html +++ /dev/null @@ -1,211 +0,0 @@ - - - - - - -Boost.Locale: Class Members - Functions - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    -
    -  - -

    - o -

    -
    -
    - - - - - - diff --git a/doc/html/functions_func_p.html b/doc/html/functions_func_p.html deleted file mode 100644 index 2f7226a8..00000000 --- a/doc/html/functions_func_p.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - -Boost.Locale: Class Members - Functions - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    -
    -  - -

    - p -

    -
    -
    - - - - - - diff --git a/doc/html/functions_func_r.html b/doc/html/functions_func_r.html deleted file mode 100644 index 9ffbdd0e..00000000 --- a/doc/html/functions_func_r.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - -Boost.Locale: Class Members - Functions - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - - - - - - - - diff --git a/doc/html/functions_func_s.html b/doc/html/functions_func_s.html deleted file mode 100644 index 1971232a..00000000 --- a/doc/html/functions_func_s.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - -Boost.Locale: Class Members - Functions - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - - - - - - - - diff --git a/doc/html/functions_func_t.html b/doc/html/functions_func_t.html deleted file mode 100644 index fd769ca5..00000000 --- a/doc/html/functions_func_t.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - -Boost.Locale: Class Members - Functions - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    -
    -  - -

    - t -

    -
    -
    - - - - - - diff --git a/doc/html/functions_func_u.html b/doc/html/functions_func_u.html deleted file mode 100644 index fd114a04..00000000 --- a/doc/html/functions_func_u.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Boost.Locale: Class Members - Functions - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    -
    -  - -

    - u -

    -
    -
    - - - - - - diff --git a/doc/html/functions_func_v.html b/doc/html/functions_func_v.html deleted file mode 100644 index b01bf32b..00000000 --- a/doc/html/functions_func_v.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - -Boost.Locale: Class Members - Functions - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    -
    -  - -

    - v -

    -
    -
    - - - - - - diff --git a/doc/html/functions_func_w.html b/doc/html/functions_func_w.html deleted file mode 100644 index d65a1de0..00000000 --- a/doc/html/functions_func_w.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - -Boost.Locale: Class Members - Functions - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - - - - - - - - diff --git a/doc/html/functions_func_~.html b/doc/html/functions_func_~.html deleted file mode 100644 index 0987c3b8..00000000 --- a/doc/html/functions_func_~.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Boost.Locale: Class Members - Functions - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    -
    -  - -

    - ~ -

    -
    -
    - - - - - - diff --git a/doc/html/functions_g.html b/doc/html/functions_g.html deleted file mode 100644 index b9774076..00000000 --- a/doc/html/functions_g.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - -Boost.Locale: Class Members - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    Here is a list of all documented class members with links to the class documentation for each member:
    - -

    - g -

    -
    -
    - - - - - - diff --git a/doc/html/functions_h.html b/doc/html/functions_h.html deleted file mode 100644 index 7904c7d3..00000000 --- a/doc/html/functions_h.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - -Boost.Locale: Class Members - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    Here is a list of all documented class members with links to the class documentation for each member:
    - -

    - h -

    -
    -
    - - - - - - diff --git a/doc/html/functions_i.html b/doc/html/functions_i.html deleted file mode 100644 index 93d915b5..00000000 --- a/doc/html/functions_i.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - -Boost.Locale: Class Members - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - - - - - - - - diff --git a/doc/html/functions_l.html b/doc/html/functions_l.html deleted file mode 100644 index 27450f75..00000000 --- a/doc/html/functions_l.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - -Boost.Locale: Class Members - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    Here is a list of all documented class members with links to the class documentation for each member:
    - -

    - l -

    -
    -
    - - - - - - diff --git a/doc/html/functions_m.html b/doc/html/functions_m.html deleted file mode 100644 index bd496332..00000000 --- a/doc/html/functions_m.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - -Boost.Locale: Class Members - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - - - - - - - - diff --git a/doc/html/functions_n.html b/doc/html/functions_n.html deleted file mode 100644 index 471d2cfe..00000000 --- a/doc/html/functions_n.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - -Boost.Locale: Class Members - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    Here is a list of all documented class members with links to the class documentation for each member:
    - -

    - n -

    -
    -
    - - - - - - diff --git a/doc/html/functions_o.html b/doc/html/functions_o.html deleted file mode 100644 index 20869b78..00000000 --- a/doc/html/functions_o.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - -Boost.Locale: Class Members - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    Here is a list of all documented class members with links to the class documentation for each member:
    - -

    - o -

    -
    -
    - - - - - - diff --git a/doc/html/functions_p.html b/doc/html/functions_p.html deleted file mode 100644 index 0719c35b..00000000 --- a/doc/html/functions_p.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - -Boost.Locale: Class Members - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    Here is a list of all documented class members with links to the class documentation for each member:
    - -

    - p -

    -
    -
    - - - - - - diff --git a/doc/html/functions_q.html b/doc/html/functions_q.html deleted file mode 100644 index 9d13154b..00000000 --- a/doc/html/functions_q.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - -Boost.Locale: Class Members - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    Here is a list of all documented class members with links to the class documentation for each member:
    - -

    - q -

    -
    -
    - - - - - - diff --git a/doc/html/functions_r.html b/doc/html/functions_r.html deleted file mode 100644 index 007b0d31..00000000 --- a/doc/html/functions_r.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - -Boost.Locale: Class Members - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - - - - - - - - diff --git a/doc/html/functions_s.html b/doc/html/functions_s.html deleted file mode 100644 index 428ae0d3..00000000 --- a/doc/html/functions_s.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - -Boost.Locale: Class Members - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    Here is a list of all documented class members with links to the class documentation for each member:
    - -

    - s -

    -
    -
    - - - - - - diff --git a/doc/html/functions_t.html b/doc/html/functions_t.html deleted file mode 100644 index 9b831ad3..00000000 --- a/doc/html/functions_t.html +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - -Boost.Locale: Class Members - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    Here is a list of all documented class members with links to the class documentation for each member:
    - -

    - t -

    -
    -
    - - - - - - diff --git a/doc/html/functions_type.html b/doc/html/functions_type.html deleted file mode 100644 index 83348f98..00000000 --- a/doc/html/functions_type.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - -Boost.Locale: Class Members - Typedefs - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    - - - - - - diff --git a/doc/html/functions_u.html b/doc/html/functions_u.html deleted file mode 100644 index 5d1f5c9b..00000000 --- a/doc/html/functions_u.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - -Boost.Locale: Class Members - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    Here is a list of all documented class members with links to the class documentation for each member:
    - -

    - u -

    -
    -
    - - - - - - diff --git a/doc/html/functions_v.html b/doc/html/functions_v.html deleted file mode 100644 index 8a2744ed..00000000 --- a/doc/html/functions_v.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - -Boost.Locale: Class Members - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    - -
    - - - - - - diff --git a/doc/html/functions_vars.html b/doc/html/functions_vars.html deleted file mode 100644 index b85d7578..00000000 --- a/doc/html/functions_vars.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - -Boost.Locale: Class Members - Variables - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - -
    -
    - -
    -
    -
    - - - - - - - - diff --git a/doc/html/functions_w.html b/doc/html/functions_w.html deleted file mode 100644 index b9d728f8..00000000 --- a/doc/html/functions_w.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - -Boost.Locale: Class Members - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    Here is a list of all documented class members with links to the class documentation for each member:
    - -

    - w -

    -
    -
    - - - - - - diff --git a/doc/html/functions_~.html b/doc/html/functions_~.html deleted file mode 100644 index 5151993f..00000000 --- a/doc/html/functions_~.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - -Boost.Locale: Class Members - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    Here is a list of all documented class members with links to the class documentation for each member:
    - -

    - ~ -

    -
    -
    - - - - - - diff --git a/doc/html/generator_8hpp_source.html b/doc/html/generator_8hpp_source.html deleted file mode 100644 index 034a1127..00000000 --- a/doc/html/generator_8hpp_source.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - -Boost.Locale: boost/locale/generator.hpp Source File - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    generator.hpp
    -
    -
    -
    1 //
    -
    2 // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
    -
    3 //
    -
    4 // Distributed under the Boost Software License, Version 1.0. (See
    -
    5 // accompanying file LICENSE_1_0.txt or copy at
    -
    6 // http://www.boost.org/LICENSE_1_0.txt)
    -
    7 //
    -
    8 #ifndef BOOST_LOCALE_GENERATOR_HPP
    -
    9 #define BOOST_LOCALE_GENERATOR_HPP
    -
    10 #include <boost/locale/config.hpp>
    -
    11 #include <boost/cstdint.hpp>
    -
    12 #ifdef BOOST_MSVC
    -
    13 # pragma warning(push)
    -
    14 # pragma warning(disable : 4275 4251 4231 4660)
    -
    15 #endif
    -
    16 #include <string>
    -
    17 #include <locale>
    -
    18 #include <memory>
    -
    19 
    -
    20 namespace boost {
    -
    21 
    -
    22  template<typename Type>
    -
    23  class shared_ptr;
    -
    24 
    -
    28  namespace locale {
    -
    29 
    -
    30  class localization_backend;
    -
    31  class localization_backend_manager;
    -
    32 
    -
    33  static const uint32_t nochar_facet = 0;
    -
    34  static const uint32_t char_facet = 1 << 0;
    -
    35  static const uint32_t wchar_t_facet = 1 << 1;
    -
    36  static const uint32_t char16_t_facet = 1 << 2;
    -
    37  static const uint32_t char32_t_facet = 1 << 3;
    -
    38 
    -
    39  static const uint32_t character_first_facet = char_facet;
    -
    40  static const uint32_t character_last_facet = char32_t_facet;
    -
    41  static const uint32_t all_characters = 0xFFFF;
    -
    42 
    -
    43  typedef uint32_t character_facet_type;
    -
    44 
    -
    45  static const uint32_t convert_facet = 1 << 0;
    -
    46  static const uint32_t collation_facet = 1 << 1;
    -
    47  static const uint32_t formatting_facet= 1 << 2;
    -
    48  static const uint32_t parsing_facet = 1 << 3;
    -
    49  static const uint32_t message_facet = 1 << 4;
    -
    50  static const uint32_t codepage_facet = 1 << 5;
    -
    51  static const uint32_t boundary_facet = 1 << 6;
    -
    52 
    -
    53  static const uint32_t per_character_facet_first = convert_facet;
    -
    54  static const uint32_t per_character_facet_last = boundary_facet;
    -
    55 
    -
    56  static const uint32_t calendar_facet = 1 << 16;
    -
    57  static const uint32_t information_facet = 1 << 17;
    -
    58 
    -
    59  static const uint32_t non_character_facet_first = calendar_facet;
    - -
    61 
    -
    62 
    -
    63  static const uint32_t all_categories = 0xFFFFFFFFu;
    -
    64 
    -
    65  typedef uint32_t locale_category_type;
    -
    66 
    -
    73 
    -
    74  class BOOST_LOCALE_DECL generator {
    -
    75  public:
    -
    76 
    -
    80  generator();
    - -
    85 
    -
    86  ~generator();
    -
    87 
    -
    91  void categories(locale_category_type cats);
    -
    95  locale_category_type categories() const;
    -
    96 
    -
    100  void characters(character_facet_type chars);
    -
    104  character_facet_type characters() const;
    -
    105 
    -
    126  void add_messages_domain(std::string const &domain);
    -
    131  void set_default_messages_domain(std::string const &domain);
    -
    132 
    -
    136  void clear_domains();
    -
    137 
    -
    152  void add_messages_path(std::string const &path);
    -
    153 
    -
    157  void clear_paths();
    -
    158 
    -
    162  void clear_cache();
    -
    163 
    -
    167  void locale_cache_enabled(bool on);
    -
    168 
    -
    172  bool locale_cache_enabled() const;
    -
    173 
    -
    177  bool use_ansi_encoding() const;
    -
    178 
    -
    186  void use_ansi_encoding(bool enc);
    -
    187 
    -
    191  std::locale generate(std::string const &id) const;
    -
    196  std::locale generate(std::locale const &base,std::string const &id) const;
    -
    200  std::locale operator()(std::string const &id) const
    -
    201  {
    -
    202  return generate(id);
    -
    203  }
    -
    204 
    -
    208  void set_option(std::string const &name,std::string const &value);
    -
    209 
    -
    213  void clear_options();
    -
    214 
    -
    215  private:
    -
    216 
    -
    217  void set_all_options(shared_ptr<localization_backend> backend,std::string const &id) const;
    -
    218 
    -
    219  generator(generator const &);
    -
    220  void operator=(generator const &);
    -
    221 
    -
    222  struct data;
    -
    223  std::auto_ptr<data> d;
    -
    224  };
    -
    225 
    -
    226  }
    -
    227 }
    -
    228 #ifdef BOOST_MSVC
    -
    229 #pragma warning(pop)
    -
    230 #endif
    -
    231 
    -
    232 
    -
    233 #endif
    -
    234 // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
    -
    235 
    -
    static const uint32_t boundary_facet
    Generate boundary analysis facet.
    Definition: generator.hpp:51
    -
    static const uint32_t non_character_facet_first
    First character independent facet.
    Definition: generator.hpp:59
    -
    the facet that generates calendar for specific locale
    Definition: date_time_facet.hpp:234
    -
    Localization backend manager is a class that holds various backend and allows creation of their combi...
    Definition: localization_backend.hpp:84
    -
    static const uint32_t parsing_facet
    Generate numbers, currency, date-time formatting facets.
    Definition: generator.hpp:48
    -
    static const uint32_t nochar_facet
    Unspecified character category for character independent facets.
    Definition: generator.hpp:33
    -
    uint32_t character_facet_type
    type that specifies the character type that locales can be generated for
    Definition: generator.hpp:43
    -
    static const uint32_t formatting_facet
    Generate numbers, currency, date-time formatting facets.
    Definition: generator.hpp:47
    -
    static const uint32_t convert_facet
    Generate conversion facets.
    Definition: generator.hpp:45
    -
    std::locale operator()(std::string const &id) const
    Definition: generator.hpp:200
    -
    static const uint32_t per_character_facet_last
    Last facet specific for character.
    Definition: generator.hpp:54
    -
    Definition: generator.hpp:23
    -
    static const uint32_t calendar_facet
    Generate boundary analysis facet.
    Definition: generator.hpp:56
    -
    static const uint32_t message_facet
    Generate message facets.
    Definition: generator.hpp:49
    -
    static const uint32_t codepage_facet
    Generate character set conversion facets (derived from std::codecvt)
    Definition: generator.hpp:50
    -
    static const uint32_t per_character_facet_first
    First facet specific for character.
    Definition: generator.hpp:53
    -
    static const uint32_t character_last_facet
    Last facet specific for character type.
    Definition: generator.hpp:40
    -
    static const uint32_t character_first_facet
    First facet specific for character type.
    Definition: generator.hpp:39
    -
    static const uint32_t collation_facet
    Generate collation facets.
    Definition: generator.hpp:46
    -
    static const uint32_t non_character_facet_last
    Last character independent facet.
    Definition: generator.hpp:60
    -
    static const uint32_t char16_t_facet
    C++0x char16_t facets.
    Definition: generator.hpp:36
    -
    unspecified_type domain(std::string const &id)
    Definition: message.hpp:789
    -
    static const uint32_t char32_t_facet
    C++0x char32_t facets.
    Definition: generator.hpp:37
    -
    uint32_t locale_category_type
    a type used for more fine grained generation of facets
    Definition: generator.hpp:65
    -
    static const uint32_t information_facet
    Generate general locale information facet.
    Definition: generator.hpp:57
    -
    the major class used for locale generation
    Definition: generator.hpp:74
    -
    static const uint32_t char_facet
    8-bit character facets
    Definition: generator.hpp:34
    -
    static const uint32_t all_categories
    Generate all of them.
    Definition: generator.hpp:63
    -
    static const uint32_t wchar_t_facet
    wide character facets
    Definition: generator.hpp:35
    -
    static const uint32_t all_characters
    Special mask – generate all.
    Definition: generator.hpp:41
    -
    -
    - - - - - - diff --git a/doc/html/generic__codecvt_8hpp_source.html b/doc/html/generic__codecvt_8hpp_source.html deleted file mode 100644 index 63735223..00000000 --- a/doc/html/generic__codecvt_8hpp_source.html +++ /dev/null @@ -1,650 +0,0 @@ - - - - - - -Boost.Locale: boost/locale/generic_codecvt.hpp Source File - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    generic_codecvt.hpp
    -
    -
    -
    1 //
    -
    2 // Copyright (c) 2015 Artyom Beilis (Tonkikh)
    -
    3 //
    -
    4 // Distributed under the Boost Software License, Version 1.0. (See
    -
    5 // accompanying file LICENSE_1_0.txt or copy at
    -
    6 // http://www.boost.org/LICENSE_1_0.txt)
    -
    7 //
    -
    8 #ifndef BOOST_LOCALE_GENERIC_CODECVT_HPP
    -
    9 #define BOOST_LOCALE_GENERIC_CODECVT_HPP
    -
    10 
    -
    11 #include <boost/locale/utf.hpp>
    -
    12 #include <boost/cstdint.hpp>
    -
    13 #include <boost/static_assert.hpp>
    -
    14 #include <locale>
    -
    15 
    -
    16 namespace boost {
    -
    17 namespace locale {
    -
    18 
    -
    19 #ifndef BOOST_LOCALE_DOXYGEN
    -
    20 //
    -
    21 // Make sure that mbstate can keep 16 bit of UTF-16 sequence
    -
    22 //
    -
    23 BOOST_STATIC_ASSERT(sizeof(std::mbstate_t)>=2);
    -
    24 #endif
    -
    25 
    -
    26 #if defined(_MSC_VER) && _MSC_VER < 1700
    -
    27 // up to MSVC 11 (2012) do_length is non-standard it counts wide characters instead of narrow and does not change mbstate
    -
    28 #define BOOST_LOCALE_DO_LENGTH_MBSTATE_CONST
    -
    29 #endif
    -
    30 
    - -
    35 public:
    - - - -
    42  };
    -
    43 };
    -
    44 
    -
    139 template<typename CharType,typename CodecvtImpl,int CharSize=sizeof(CharType)>
    - -
    141 
    -
    150 template<typename CharType,typename CodecvtImpl>
    -
    151 class generic_codecvt<CharType,CodecvtImpl,2> : public std::codecvt<CharType,char,std::mbstate_t>, public generic_codecvt_base
    -
    152 {
    -
    153 public:
    -
    154 
    -
    155  typedef CharType uchar;
    -
    156 
    -
    157  generic_codecvt(size_t refs = 0) :
    -
    158  std::codecvt<CharType,char,std::mbstate_t>(refs)
    -
    159  {
    -
    160  }
    -
    161  CodecvtImpl const &implementation() const
    -
    162  {
    -
    163  return *static_cast<CodecvtImpl const *>(this);
    -
    164  }
    -
    165 
    -
    166 protected:
    -
    167 
    -
    168 
    -
    169  virtual std::codecvt_base::result do_unshift(std::mbstate_t &s,char *from,char * /*to*/,char *&next) const
    -
    170  {
    -
    171  boost::uint16_t &state = *reinterpret_cast<boost::uint16_t *>(&s);
    -
    172 #ifdef DEBUG_CODECVT
    -
    173  std::cout << "Entering unshift " << std::hex << state << std::dec << std::endl;
    -
    174 #endif
    -
    175  if(state != 0)
    -
    176  return std::codecvt_base::error;
    -
    177  next=from;
    -
    178  return std::codecvt_base::ok;
    -
    179  }
    -
    180  virtual int do_encoding() const throw()
    -
    181  {
    -
    182  return 0;
    -
    183  }
    -
    184  virtual int do_max_length() const throw()
    -
    185  {
    -
    186  return implementation().max_encoding_length();
    -
    187  }
    -
    188  virtual bool do_always_noconv() const throw()
    -
    189  {
    -
    190  return false;
    -
    191  }
    -
    192 
    -
    193  virtual int
    -
    194  do_length( std::mbstate_t
    -
    195  #ifdef BOOST_LOCALE_DO_LENGTH_MBSTATE_CONST
    -
    196  const
    -
    197  #endif
    -
    198  &std_state,
    -
    199  char const *from,
    -
    200  char const *from_end,
    -
    201  size_t max) const
    -
    202  {
    -
    203  #ifndef BOOST_LOCALE_DO_LENGTH_MBSTATE_CONST
    -
    204  char const *save_from = from;
    -
    205  boost::uint16_t &state = *reinterpret_cast<boost::uint16_t *>(&std_state);
    -
    206  #else
    -
    207  size_t save_max = max;
    -
    208  boost::uint16_t state = *reinterpret_cast<boost::uint16_t const *>(&std_state);
    -
    209  #endif
    -
    210 
    -
    211  typedef typename CodecvtImpl::state_type state_type;
    -
    212  state_type cvt_state = implementation().initial_state(generic_codecvt_base::to_unicode_state);
    -
    213  while(max > 0 && from < from_end){
    -
    214  char const *prev_from = from;
    -
    215  boost::uint32_t ch=implementation().to_unicode(cvt_state,from,from_end);
    - -
    217  from = prev_from;
    -
    218  break;
    -
    219  }
    -
    220  max --;
    -
    221  if(ch > 0xFFFF) {
    -
    222  if(state == 0) {
    -
    223  from = prev_from;
    -
    224  state = 1;
    -
    225  }
    -
    226  else {
    -
    227  state = 0;
    -
    228  }
    -
    229  }
    -
    230  }
    -
    231  #ifndef BOOST_LOCALE_DO_LENGTH_MBSTATE_CONST
    -
    232  return from - save_from;
    -
    233  #else
    -
    234  return save_max - max;
    -
    235  #endif
    -
    236  }
    -
    237 
    -
    238 
    -
    239  virtual std::codecvt_base::result
    -
    240  do_in( std::mbstate_t &std_state,
    -
    241  char const *from,
    -
    242  char const *from_end,
    -
    243  char const *&from_next,
    -
    244  uchar *to,
    -
    245  uchar *to_end,
    -
    246  uchar *&to_next) const
    -
    247  {
    -
    248  std::codecvt_base::result r=std::codecvt_base::ok;
    -
    249 
    -
    250  // mbstate_t is POD type and should be initialized to 0 (i.a. state = stateT())
    -
    251  // according to standard. We use it to keep a flag 0/1 for surrogate pair writing
    -
    252  //
    -
    253  // if 0 no code above >0xFFFF observed, of 1 a code above 0xFFFF observerd
    -
    254  // and first pair is written, but no input consumed
    -
    255  boost::uint16_t &state = *reinterpret_cast<boost::uint16_t *>(&std_state);
    -
    256  typedef typename CodecvtImpl::state_type state_type;
    -
    257  state_type cvt_state = implementation().initial_state(generic_codecvt_base::to_unicode_state);
    -
    258  while(to < to_end && from < from_end)
    -
    259  {
    -
    260 #ifdef DEBUG_CODECVT
    -
    261  std::cout << "Entering IN--------------" << std::endl;
    -
    262  std::cout << "State " << std::hex << state <<std::endl;
    -
    263  std::cout << "Left in " << std::dec << from_end - from << " out " << to_end -to << std::endl;
    -
    264 #endif
    -
    265  char const *from_saved = from;
    -
    266 
    -
    267  uint32_t ch=implementation().to_unicode(cvt_state,from,from_end);
    -
    268 
    - -
    270  from = from_saved;
    -
    271  r=std::codecvt_base::error;
    -
    272  break;
    -
    273  }
    - -
    275  from = from_saved;
    -
    276  r=std::codecvt_base::partial;
    -
    277  break;
    -
    278  }
    -
    279  // Normal codepoints go direcly to stream
    -
    280  if(ch <= 0xFFFF) {
    -
    281  *to++=ch;
    -
    282  }
    -
    283  else {
    -
    284  // for other codepoints we do following
    -
    285  //
    -
    286  // 1. We can't consume our input as we may find ourselfs
    -
    287  // in state where all input consumed but not all output written,i.e. only
    -
    288  // 1st pair is written
    -
    289  // 2. We only write first pair and mark this in the state, we also revert back
    -
    290  // the from pointer in order to make sure this codepoint would be read
    -
    291  // once again and then we would consume our input together with writing
    -
    292  // second surrogate pair
    -
    293  ch-=0x10000;
    -
    294  boost::uint16_t vh = ch >> 10;
    -
    295  boost::uint16_t vl = ch & 0x3FF;
    -
    296  boost::uint16_t w1 = vh + 0xD800;
    -
    297  boost::uint16_t w2 = vl + 0xDC00;
    -
    298  if(state == 0) {
    -
    299  from = from_saved;
    -
    300  *to++ = w1;
    -
    301  state = 1;
    -
    302  }
    -
    303  else {
    -
    304  *to++ = w2;
    -
    305  state = 0;
    -
    306  }
    -
    307  }
    -
    308  }
    -
    309  from_next=from;
    -
    310  to_next=to;
    -
    311  if(r == std::codecvt_base::ok && (from!=from_end || state!=0))
    -
    312  r = std::codecvt_base::partial;
    -
    313 #ifdef DEBUG_CODECVT
    -
    314  std::cout << "Returning ";
    -
    315  switch(r) {
    -
    316  case std::codecvt_base::ok:
    -
    317  std::cout << "ok" << std::endl;
    -
    318  break;
    -
    319  case std::codecvt_base::partial:
    -
    320  std::cout << "partial" << std::endl;
    -
    321  break;
    -
    322  case std::codecvt_base::error:
    -
    323  std::cout << "error" << std::endl;
    -
    324  break;
    -
    325  default:
    -
    326  std::cout << "other" << std::endl;
    -
    327  break;
    -
    328  }
    -
    329  std::cout << "State " << std::hex << state <<std::endl;
    -
    330  std::cout << "Left in " << std::dec << from_end - from << " out " << to_end -to << std::endl;
    -
    331 #endif
    -
    332  return r;
    -
    333  }
    -
    334 
    -
    335  virtual std::codecvt_base::result
    -
    336  do_out( std::mbstate_t &std_state,
    -
    337  uchar const *from,
    -
    338  uchar const *from_end,
    -
    339  uchar const *&from_next,
    -
    340  char *to,
    -
    341  char *to_end,
    -
    342  char *&to_next) const
    -
    343  {
    -
    344  std::codecvt_base::result r=std::codecvt_base::ok;
    -
    345  // mbstate_t is POD type and should be initialized to 0 (i.a. state = stateT())
    -
    346  // according to standard. We assume that sizeof(mbstate_t) >=2 in order
    -
    347  // to be able to store first observerd surrogate pair
    -
    348  //
    -
    349  // State: state!=0 - a first surrogate pair was observerd (state = first pair),
    -
    350  // we expect the second one to come and then zero the state
    -
    352  boost::uint16_t &state = *reinterpret_cast<boost::uint16_t *>(&std_state);
    -
    353  typedef typename CodecvtImpl::state_type state_type;
    -
    354  state_type cvt_state = implementation().initial_state(generic_codecvt_base::from_unicode_state);
    -
    355  while(to < to_end && from < from_end)
    -
    356  {
    -
    357 #ifdef DEBUG_CODECVT
    -
    358  std::cout << "Entering OUT --------------" << std::endl;
    -
    359  std::cout << "State " << std::hex << state <<std::endl;
    -
    360  std::cout << "Left in " << std::dec << from_end - from << " out " << to_end -to << std::endl;
    -
    361 #endif
    -
    362  boost::uint32_t ch=0;
    -
    363  if(state != 0) {
    -
    364  // if the state idecates that 1st surrogate pair was written
    -
    365  // we should make sure that the second one that comes is actually
    -
    366  // second surrogate
    -
    367  boost::uint16_t w1 = state;
    -
    368  boost::uint16_t w2 = *from;
    -
    369  // we don't forward from as writing may fail to incomplete or
    -
    370  // partial conversion
    -
    371  if(0xDC00 <= w2 && w2<=0xDFFF) {
    -
    372  boost::uint16_t vh = w1 - 0xD800;
    -
    373  boost::uint16_t vl = w2 - 0xDC00;
    -
    374  ch=((uint32_t(vh) << 10) | vl) + 0x10000;
    -
    375  }
    -
    376  else {
    -
    377  // Invalid surrogate
    -
    378  r=std::codecvt_base::error;
    -
    379  break;
    -
    380  }
    -
    381  }
    -
    382  else {
    -
    383  ch = *from;
    -
    384  if(0xD800 <= ch && ch<=0xDBFF) {
    -
    385  // if this is a first surrogate pair we put
    -
    386  // it into the state and consume it, note we don't
    -
    387  // go forward as it should be illegal so we increase
    -
    388  // the from pointer manually
    -
    389  state = ch;
    -
    390  from++;
    -
    391  continue;
    -
    392  }
    -
    393  else if(0xDC00 <= ch && ch<=0xDFFF) {
    -
    394  // if we observe second surrogate pair and
    -
    395  // first only may be expected we should break from the loop with error
    -
    396  // as it is illegal input
    -
    397  r=std::codecvt_base::error;
    -
    398  break;
    -
    399  }
    -
    400  }
    - -
    402  r=std::codecvt_base::error;
    -
    403  break;
    -
    404  }
    -
    405  boost::uint32_t len = implementation().from_unicode(cvt_state,ch,to,to_end);
    -
    406  if(len == boost::locale::utf::incomplete) {
    -
    407  r=std::codecvt_base::partial;
    -
    408  break;
    -
    409  }
    -
    410  else if(len == boost::locale::utf::illegal) {
    -
    411  r=std::codecvt_base::error;
    -
    412  break;
    -
    413  }
    -
    414  else
    -
    415  to+= len;
    -
    416  state = 0;
    -
    417  from++;
    -
    418  }
    -
    419  from_next=from;
    -
    420  to_next=to;
    -
    421  if(r==std::codecvt_base::ok && from!=from_end)
    -
    422  r = std::codecvt_base::partial;
    -
    423 #ifdef DEBUG_CODECVT
    -
    424  std::cout << "Returning ";
    -
    425  switch(r) {
    -
    426  case std::codecvt_base::ok:
    -
    427  std::cout << "ok" << std::endl;
    -
    428  break;
    -
    429  case std::codecvt_base::partial:
    -
    430  std::cout << "partial" << std::endl;
    -
    431  break;
    -
    432  case std::codecvt_base::error:
    -
    433  std::cout << "error" << std::endl;
    -
    434  break;
    -
    435  default:
    -
    436  std::cout << "other" << std::endl;
    -
    437  break;
    -
    438  }
    -
    439  std::cout << "State " << std::hex << state <<std::endl;
    -
    440  std::cout << "Left in " << std::dec << from_end - from << " out " << to_end -to << std::endl;
    -
    441 #endif
    -
    442  return r;
    -
    443  }
    -
    444 
    -
    445 };
    -
    446 
    -
    453 template<typename CharType,typename CodecvtImpl>
    -
    454 class generic_codecvt<CharType,CodecvtImpl,4> : public std::codecvt<CharType,char,std::mbstate_t>, public generic_codecvt_base
    -
    455 {
    -
    456 public:
    -
    457  typedef CharType uchar;
    -
    458 
    -
    459  generic_codecvt(size_t refs = 0) :
    -
    460  std::codecvt<CharType,char,std::mbstate_t>(refs)
    -
    461  {
    -
    462  }
    -
    463 
    -
    464  CodecvtImpl const &implementation() const
    -
    465  {
    -
    466  return *static_cast<CodecvtImpl const *>(this);
    -
    467  }
    -
    468 
    -
    469 protected:
    -
    470 
    -
    471  virtual std::codecvt_base::result do_unshift(std::mbstate_t &/*s*/,char *from,char * /*to*/,char *&next) const
    -
    472  {
    -
    473  next=from;
    -
    474  return std::codecvt_base::ok;
    -
    475  }
    -
    476  virtual int do_encoding() const throw()
    -
    477  {
    -
    478  return 0;
    -
    479  }
    -
    480  virtual int do_max_length() const throw()
    -
    481  {
    -
    482  return implementation().max_encoding_length();
    -
    483  }
    -
    484  virtual bool do_always_noconv() const throw()
    -
    485  {
    -
    486  return false;
    -
    487  }
    -
    488 
    -
    489  virtual int
    -
    490  do_length( std::mbstate_t
    -
    491  #ifdef BOOST_LOCALE_DO_LENGTH_MBSTATE_CONST
    -
    492  const
    -
    493  #endif
    -
    494  &/*state*/,
    -
    495  char const *from,
    -
    496  char const *from_end,
    -
    497  size_t max) const
    -
    498  {
    -
    499  #ifndef BOOST_LOCALE_DO_LENGTH_MBSTATE_CONST
    -
    500  char const *start_from = from;
    -
    501  #else
    -
    502  size_t save_max = max;
    -
    503  #endif
    -
    504  typedef typename CodecvtImpl::state_type state_type;
    -
    505  state_type cvt_state = implementation().initial_state(generic_codecvt_base::to_unicode_state);
    -
    506  while(max > 0 && from < from_end){
    -
    507  char const *save_from = from;
    -
    508  boost::uint32_t ch=implementation().to_unicode(cvt_state,from,from_end);
    - -
    510  from = save_from;
    -
    511  break;
    -
    512  }
    -
    513  max--;
    -
    514  }
    -
    515  #ifndef BOOST_LOCALE_DO_LENGTH_MBSTATE_CONST
    -
    516  return from - start_from;
    -
    517  #else
    -
    518  return save_max - max;
    -
    519  #endif
    -
    520  }
    -
    521 
    -
    522 
    -
    523  virtual std::codecvt_base::result
    -
    524  do_in( std::mbstate_t &/*state*/,
    -
    525  char const *from,
    -
    526  char const *from_end,
    -
    527  char const *&from_next,
    -
    528  uchar *to,
    -
    529  uchar *to_end,
    -
    530  uchar *&to_next) const
    -
    531  {
    -
    532  std::codecvt_base::result r=std::codecvt_base::ok;
    -
    533 
    -
    534  // mbstate_t is POD type and should be initialized to 0 (i.a. state = stateT())
    -
    535  // according to standard. We use it to keep a flag 0/1 for surrogate pair writing
    -
    536  //
    -
    537  // if 0 no code above >0xFFFF observed, of 1 a code above 0xFFFF observerd
    -
    538  // and first pair is written, but no input consumed
    -
    539  typedef typename CodecvtImpl::state_type state_type;
    -
    540  state_type cvt_state = implementation().initial_state(generic_codecvt_base::to_unicode_state);
    -
    541  while(to < to_end && from < from_end)
    -
    542  {
    -
    543 #ifdef DEBUG_CODECVT
    -
    544  std::cout << "Entering IN--------------" << std::endl;
    -
    545  std::cout << "State " << std::hex << state <<std::endl;
    -
    546  std::cout << "Left in " << std::dec << from_end - from << " out " << to_end -to << std::endl;
    -
    547 #endif
    -
    548  char const *from_saved = from;
    -
    549 
    -
    550  uint32_t ch=implementation().to_unicode(cvt_state,from,from_end);
    -
    551 
    - -
    553  r=std::codecvt_base::error;
    -
    554  from = from_saved;
    -
    555  break;
    -
    556  }
    - -
    558  r=std::codecvt_base::partial;
    -
    559  from=from_saved;
    -
    560  break;
    -
    561  }
    -
    562  *to++=ch;
    -
    563  }
    -
    564  from_next=from;
    -
    565  to_next=to;
    -
    566  if(r == std::codecvt_base::ok && from!=from_end)
    -
    567  r = std::codecvt_base::partial;
    -
    568 #ifdef DEBUG_CODECVT
    -
    569  std::cout << "Returning ";
    -
    570  switch(r) {
    -
    571  case std::codecvt_base::ok:
    -
    572  std::cout << "ok" << std::endl;
    -
    573  break;
    -
    574  case std::codecvt_base::partial:
    -
    575  std::cout << "partial" << std::endl;
    -
    576  break;
    -
    577  case std::codecvt_base::error:
    -
    578  std::cout << "error" << std::endl;
    -
    579  break;
    -
    580  default:
    -
    581  std::cout << "other" << std::endl;
    -
    582  break;
    -
    583  }
    -
    584  std::cout << "State " << std::hex << state <<std::endl;
    -
    585  std::cout << "Left in " << std::dec << from_end - from << " out " << to_end -to << std::endl;
    -
    586 #endif
    -
    587  return r;
    -
    588  }
    -
    589 
    -
    590  virtual std::codecvt_base::result
    -
    591  do_out( std::mbstate_t &/*std_state*/,
    -
    592  uchar const *from,
    -
    593  uchar const *from_end,
    -
    594  uchar const *&from_next,
    -
    595  char *to,
    -
    596  char *to_end,
    -
    597  char *&to_next) const
    -
    598  {
    -
    599  std::codecvt_base::result r=std::codecvt_base::ok;
    -
    600  typedef typename CodecvtImpl::state_type state_type;
    -
    601  state_type cvt_state = implementation().initial_state(generic_codecvt_base::from_unicode_state);
    -
    602  while(to < to_end && from < from_end)
    -
    603  {
    -
    604 #ifdef DEBUG_CODECVT
    -
    605  std::cout << "Entering OUT --------------" << std::endl;
    -
    606  std::cout << "State " << std::hex << state <<std::endl;
    -
    607  std::cout << "Left in " << std::dec << from_end - from << " out " << to_end -to << std::endl;
    -
    608 #endif
    -
    609  boost::uint32_t ch=0;
    -
    610  ch = *from;
    - -
    612  r=std::codecvt_base::error;
    -
    613  break;
    -
    614  }
    -
    615  boost::uint32_t len = implementation().from_unicode(cvt_state,ch,to,to_end);
    -
    616  if(len == boost::locale::utf::incomplete) {
    -
    617  r=std::codecvt_base::partial;
    -
    618  break;
    -
    619  }
    -
    620  else if(len == boost::locale::utf::illegal) {
    -
    621  r=std::codecvt_base::error;
    -
    622  break;
    -
    623  }
    -
    624  to+=len;
    -
    625  from++;
    -
    626  }
    -
    627  from_next=from;
    -
    628  to_next=to;
    -
    629  if(r==std::codecvt_base::ok && from!=from_end)
    -
    630  r = std::codecvt_base::partial;
    -
    631 #ifdef DEBUG_CODECVT
    -
    632  std::cout << "Returning ";
    -
    633  switch(r) {
    -
    634  case std::codecvt_base::ok:
    -
    635  std::cout << "ok" << std::endl;
    -
    636  break;
    -
    637  case std::codecvt_base::partial:
    -
    638  std::cout << "partial" << std::endl;
    -
    639  break;
    -
    640  case std::codecvt_base::error:
    -
    641  std::cout << "error" << std::endl;
    -
    642  break;
    -
    643  default:
    -
    644  std::cout << "other" << std::endl;
    -
    645  break;
    -
    646  }
    -
    647  std::cout << "State " << std::hex << state <<std::endl;
    -
    648  std::cout << "Left in " << std::dec << from_end - from << " out " << to_end -to << std::endl;
    -
    649 #endif
    -
    650  return r;
    -
    651  }
    -
    652 };
    -
    653 
    -
    654 
    -
    655 template<typename CharType,typename CodecvtImpl>
    -
    656 class generic_codecvt<CharType,CodecvtImpl,1> : public std::codecvt<CharType,char,std::mbstate_t>, public generic_codecvt_base
    -
    657 {
    -
    658 public:
    -
    659  typedef CharType uchar;
    -
    660 
    -
    661  CodecvtImpl const &implementation() const
    -
    662  {
    -
    663  return *static_cast<CodecvtImpl const *>(this);
    -
    664  }
    -
    665 
    -
    666  generic_codecvt(size_t refs = 0) : std::codecvt<char,char,std::mbstate_t>(refs)
    -
    667  {
    -
    668  }
    -
    669 };
    -
    670 
    -
    671 } // locale
    -
    672 } // namespace boost
    -
    673 
    -
    674 #endif
    -
    675 // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
    -
    bool is_valid_codepoint(code_point v)
    the function checks if v is a valid code point
    Definition: utf.hpp:49
    -
    The state would be used by to_unicode functions.
    Definition: generic_codecvt.hpp:40
    -
    static const code_point incomplete
    Special constant that defines incomplete code point.
    Definition: utf.hpp:44
    -
    initial_convertion_state
    Definition: generic_codecvt.hpp:39
    -
    static const code_point illegal
    Special constant that defines illegal code point.
    Definition: utf.hpp:39
    -
    A base class that used to define constants for generic_codecvt.
    Definition: generic_codecvt.hpp:34
    -
    Geneneric generic codecvt facet, various stateless encodings to UTF-16 and UTF-32 using wchar_t...
    Definition: generic_codecvt.hpp:140
    -
    The state would be used by from_unicode functions.
    Definition: generic_codecvt.hpp:41
    -
    -
    - - - - - - diff --git a/doc/html/gettext_for_windows.html b/doc/html/gettext_for_windows.html deleted file mode 100644 index 678b5ac1..00000000 --- a/doc/html/gettext_for_windows.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - -Boost.Locale: Using Gettext Tools on Windows - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    Using Gettext Tools on Windows
    -
    -
    -

    In order to get the Gettext tools like msgfmt, msgmerge, xgettext for Windows you have basically several options:

    -
      -
    • Download the package from CppCMS project (where the Boost.Locale was developed originally)
    • -
    • Download the a set of packages from MinGW project
    • -
    • Build it on your own
    • -
    • Use Cygwin's packages
    • -
    -

    -Getting gettext utilities from CppCMS project

    -

    Boost.Locale was developed for needs of CppCMS project and thus CppCMS hosts a convince package for Windows users of pre-build, statically liked gettext runtime utilities like xgettext, msgfmt, etc.

    -

    So you can download a zip file gettext-tools-static-XXX.zip from a CppCMS downloads page under boost_locale/gettext_for_windows.

    -

    Extract the file and use the executable files inside.

    -

    -Getting Gettext via MinGW project

    -

    MinGW project provides GNU tools for Windows, including GNU compilers and various runtime utilities. Thus you can always install full MinGW distribution including gettext tools. However, if you a want minimalistic runtime version that allows you to extract messages and create catalogs you need to download several packages manually.

    -

    In order to install Gettext via MinGW distributing you need to download, a GCC's runtime, iconv library and gettext itself.

    -

    So visit a downloads page of MinGW project and download following files (chose the latest versions of each package):

    -
      -
    • From: MinGW/BaseSystem/GCC/Version4/gcc-xxx/
      - File: libgcc-xxx-mingw32-dll-1.tar.lzma
    • -
    • From MinGW/Gettext/gettext-yyy/
      - Files: gettext-yyy-mingw32-dev.tar.lzma, libgettextpo-yyy-mingw32-dll-0.tar.lzma, libintl-yyy-mingw32-dll-8.tar.lzma
    • -
    • From MinGW/libiconv/libiconv-zzz/
      - Files: libiconv-zzz-mingw32-dll-2.tar.lzma, libcharset-zzz-mingw32-dll-1.tar.lzma
    • -
    -

    For example, at June 23, 2011 it was:

    -
      -
    • GNU Runtime: libgcc-4.5.2-1-mingw32-dll-1.tar.lzma
    • -
    • iconv: libiconv-1.13.1-1-mingw32-dll-2.tar.lzma and libcharset-1.13.1-1-mingw32-dll-1.tar.lzma
    • -
    • gettext: libintl-0.17-1-mingw32-dll-8.tar.lzma, libgettextpo-0.17-1-mingw32-dll-0.tar.lzma and gettext-0.17-1-mingw32-dev.tar.lzma.
    • -
    -

    After you download the packages, extract all the files to the same directory using tools like 7zip and you'll get all the executables and dll's you need under bin subdirectory.

    -
    Note
    the version on MinGW site is slightly outdated (0.17.1) while gettext provides currently 0.18.1.
    -

    -Building latest version on your own.

    -

    You can build your own version of GNU Gettext using MinGW environment, you'll need to have up-to-date gcc compiler and the shell, you'll need to install iconv first and then build a gettext with it.

    -

    Basic and simplest way would be to open a MinGW shell

    -

    Build iconv:

    -
    cd libiconv-SOMEVERSION
    -
    ./configure --prefix=c:/mygettext --disable-shared
    -
    make
    -
    make install
    -
    cd ..
    -
    cd gettext-SOMEVERSION
    -
    ./configure --prefix=c:/mygettext --disable-shared --with-libiconv-prefix=c:/mygettext
    -
    make
    -
    make install
    -

    And now you have in c:\mygettext\bin all appropriate executable files to use.

    -

    -Using Cygwin

    -

    If you already have Cygwin - just use gettext tools provided with it.

    -
    -
    - - - - - - diff --git a/doc/html/glossary.html b/doc/html/glossary.html deleted file mode 100644 index 94d536d6..00000000 --- a/doc/html/glossary.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - -Boost.Locale: Glossary - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    Glossary
    -
    -
    -
      -
    • Basic Multilingual Plane (BMP) – a part of the Universal Character Set with code points in the range U-0000–U-FFFF. The most commonly used UCS characters lay in this plane, including all Western, Cyrillic, Hebrew, Thai, Arabic and CJK characters. However there are many characters that lay outside the BMP and they are absolutely required for correct support of East Asian languages.
    • -
    • Code Point – a unique number that represents a "character" in the Universal Character Set. Code points lay in the range of 0-0x10FFFF, and are usually displayed as U+XXXX or U+XXXXXX, where X represents a hexadecimal digit.
    • -
    • Collation – a sorting order for text, usually alphabetical. It can differ between languages and countries, even for the same characters.
    • -
    • Encoding - a representation of a character set. Some encodings are capable of representing the full UCS range, like UTF-8, and others can only represent a subset of it – ISO-8859-8 represents only a small subset of about 250 characters of the UCS.
      - Non-Unicode encodings are still very popular, for example the Latin-1 (or ISO-8859-1) encoding covers most of the characters for Western European languages and significantly simplifies the processing of text for applications designed to handle only such languages.
      - For Boost.Locale you should provide an eight-bit (std::string) encoding as part of the locale name, like en_US.UTF-8 or he_IL.cp1255 . UTF-8 is recommended.
    • -
    • Facet - or std::locale::facet – a base class that every object that describes a specific locale is derived from. Facets can be added to a locale to provide additional culture information.
    • -
    • Formatting - representation of various values according to locale preferences. For example, a number 1234.5 (C representation) should be displayed as 1,234.5 in the US locale and 1.234,5 in the Russian locale. The date November 1st, 2005 would be represented as 11/01/2005 in the United States, and 01.11.2005 in Russia. This is an important part of localization.
      - For example: does "You have to bring 134,230 kg of rice on 04/01/2010" means "134 tons of rice on the first of April" or "134 kg 230 g - of rice on January 4th"? That is quite different.
    • -
    • Gettext - The GNU localization library used for message formatting. Today it is the de-facto standard localization library in the Open Source world. Boost.Locale message formatting is entirely built on Gettext message catalogs.
    • -
    • Locale - a set of parameters that define specific preferences for users in different cultures. It is generally defined by language, country, variants, and encoding, and provides information like: collation order, date-time formatting, message formatting, number formatting and many others. In C++, locale information is represented by the std::locale class.
    • -
    • Message Formatting – the representation of user interface strings in the user's language. The process of translation of UI strings is generally done using some dictionary provided by the program's translator.
    • -
    • Message Domain – in gettext terms, the keyword that represents a message catalog. This is usually an application name. When gettext and Boost.Locale search for a specific message catalog, they search in the specified path for a file named after the domain.
    • -
    • Normalization - Unicode normalization is the process of converting strings to a standard form, suitable for text processing and comparison. For example, character "ü" can be represented by a single code point or a combination of the character "u" and the diaeresis "¨". Normalization is an important part of Unicode text processing.
      - Normalization is not locale-dependent, but because it is an important part of Unicode processing, it is included in the Boost.Locale library.
    • -
    • UCS-2 - a fixed-width Unicode encoding, capable of representing only code points in the Basic Multilingual Plane (BMP). It is a legacy encoding and is not recommended for use.
    • -
    • Unicode – the industry standard that defines the representation and manipulation of text suitable for most languages and countries. It should not be confused with the Universal Character Set, it is a much larger standard that also defines algorithms like bidirectional display order, Arabic shaping, etc.
    • -
    • Universal Character Set (UCS) - an international standard that defines a set of characters for many scripts and their code points.
    • -
    • UTF-8 - a variable-width Unicode transformation format. Each UCS code point is represented as a sequence of between 1 and 4 octets that can be easily distinguished. It includes ASCII as a subset. It is the most popular Unicode encoding for web applications, data transfer and storage, and is the de-facto standard encoding for most POSIX operation systems.
    • -
    • UTF-16 - a variable-width Unicode transformation format. Each UCS code point is represented as a sequence of one or two 16-bit words. It is a very popular encoding for platforms such as the Win32 API, Java, C#, Python, etc. However, it is frequently confused with the UCS-2 fixed-width encoding, which can only represent characters in the Basic Multilingual Plane (BMP).
      - This encoding is used for std::wstring under the Win32 platform, where sizeof(wchar_t)==2.
    • -
    • UTF-32/UCS-4 - a fixed-width Unicode transformation format, where each code point is represented as a single 32-bit word. It has the advantage of simple code point representation, but is wasteful in terms of memory usage. It is used for std::wstring encoding for most POSIX platforms, where sizeof(wchar_t)==4.
    • -
    • Case Folding - is a process of converting a text to case independent representation. For example case folding for a word "Grüßen" is "grüssen" - where the letter "ß" is represented in case independent way as "ss".
    • -
    • Title Case - Is a text conversion where the words are capitalized. For example "hello world" is converted to "Hello World"
    • -
    -
    -
    - - - - - - diff --git a/doc/html/gnu__gettext_8hpp_source.html b/doc/html/gnu__gettext_8hpp_source.html deleted file mode 100644 index 8e546da4..00000000 --- a/doc/html/gnu__gettext_8hpp_source.html +++ /dev/null @@ -1,211 +0,0 @@ - - - - - - -Boost.Locale: boost/locale/gnu_gettext.hpp Source File - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    gnu_gettext.hpp
    -
    -
    -
    1 //
    -
    2 // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
    -
    3 //
    -
    4 // Distributed under the Boost Software License, Version 1.0. (See
    -
    5 // accompanying file LICENSE_1_0.txt or copy at
    -
    6 // http://www.boost.org/LICENSE_1_0.txt)
    -
    7 //
    -
    8 #ifndef BOOST_LOCLAE_GNU_GETTEXT_HPP
    -
    9 #define BOOST_LOCLAE_GNU_GETTEXT_HPP
    -
    10 
    -
    11 #include <boost/locale/message.hpp>
    -
    12 #include <boost/function.hpp>
    -
    13 #include <stdexcept>
    -
    14 
    -
    15 namespace boost {
    -
    16 namespace locale {
    -
    19 
    -
    20 
    -
    24 namespace gnu_gettext {
    -
    25 
    -
    34  struct messages_info {
    -
    35  messages_info() :
    -
    36  language("C"),
    -
    37  locale_category("LC_MESSAGES")
    -
    38  {
    -
    39  }
    -
    40 
    -
    41  std::string language;
    -
    42  std::string country;
    -
    43  std::string variant;
    -
    44  std::string encoding;
    -
    45  std::string locale_category;
    -
    47  struct domain {
    -
    56 
    -
    57  std::string name;
    -
    58  std::string encoding;
    -
    59  domain() {}
    -
    66  domain(std::string const &n)
    -
    67  {
    -
    68  size_t pos = n.find("/");
    -
    69  if(pos==std::string::npos) {
    -
    70  name = n;
    -
    71  encoding = "UTF-8";
    -
    72  }
    -
    73  else {
    -
    74  name = n.substr(0,pos);
    -
    75  encoding = n.substr(pos+1);
    -
    76  }
    -
    77 
    -
    78  }
    -
    79 
    -
    83  bool operator==(domain const &other) const
    -
    84  {
    -
    85  return name==other.name;
    -
    86  }
    -
    90  bool operator!=(domain const &other) const
    -
    91  {
    -
    92  return !(*this==other);
    -
    93  }
    -
    94 
    -
    95  };
    -
    96 
    -
    97  typedef std::vector<domain> domains_type;
    - -
    100  std::vector<std::string> paths;
    -
    102 
    -
    114  typedef function<
    -
    115  std::vector<char>(
    -
    116  std::string const &file_name,
    -
    117  std::string const &encoding
    -
    118  )
    - -
    120 
    - -
    126 
    -
    127  };
    -
    128 
    -
    133 
    -
    134  template<typename CharType>
    - -
    136 
    -
    138 
    -
    139  template<>
    - -
    141 
    -
    142  template<>
    - -
    144 
    -
    145  #ifdef BOOST_LOCALE_ENABLE_CHAR16_T
    -
    146  template<>
    - -
    148  #endif
    -
    149 
    -
    150  #ifdef BOOST_LOCALE_ENABLE_CHAR32_T
    -
    151  template<>
    - -
    153  #endif
    -
    154 
    -
    156 
    -
    157 } // gnu_gettext
    -
    158 
    -
    160 
    -
    161 } // locale
    -
    162 } // boost
    -
    163 
    -
    164 #endif
    -
    165 
    -
    166 // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
    -
    167 
    -
    a facet that holds general information about locale
    Definition: info.hpp:27
    -
    domains_type domains
    Definition: gnu_gettext.hpp:99
    -
    bool operator!=(domain const &other) const
    Definition: gnu_gettext.hpp:90
    -
    std::string encoding
    Definition: gnu_gettext.hpp:44
    -
    std::string locale_category
    Definition: gnu_gettext.hpp:46
    -
    This structure holds all information required for creating gnu-gettext message catalogs,.
    Definition: gnu_gettext.hpp:34
    -
    domain(std::string const &n)
    Definition: gnu_gettext.hpp:66
    -
    bool operator==(domain const &other) const
    Definition: gnu_gettext.hpp:83
    -
    std::vector< std::string > paths
    Definition: gnu_gettext.hpp:101
    -
    This facet provides message formatting abilities.
    Definition: message.hpp:47
    -
    This type represents GNU Gettext domain name for the messages.
    Definition: gnu_gettext.hpp:55
    -
    std::string language
    The language we load the catalog for, like "ru", "en", "de".
    Definition: gnu_gettext.hpp:41
    -
    std::vector< domain > domains_type
    Definition: gnu_gettext.hpp:97
    -
    std::string name
    The name of the domain.
    Definition: gnu_gettext.hpp:57
    -
    function< std::vector< char > std::string const &file_name, std::string const &encoding) > callback_type
    Definition: gnu_gettext.hpp:119
    -
    callback_type callback
    Definition: gnu_gettext.hpp:125
    -
    std::string country
    The country we load the catalog for, like "US", "IL".
    Definition: gnu_gettext.hpp:42
    -
    message_format< CharType > * create_messages_facet(messages_info const &info)
    -
    std::string variant
    Language variant, like "euro" so it would look for catalog like de_DE@euro.
    Definition: gnu_gettext.hpp:43
    -
    std::string encoding
    The character encoding for the domain.
    Definition: gnu_gettext.hpp:58
    -
    -
    - - - - - - diff --git a/doc/html/group__boundary.html b/doc/html/group__boundary.html deleted file mode 100644 index 3678254a..00000000 --- a/doc/html/group__boundary.html +++ /dev/null @@ -1,1719 +0,0 @@ - - - - - - -Boost.Locale: Boundary Analysis - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    Boundary Analysis
    -
    -
    - - - - - - - - - - - - - - - - - - - - -

    -Classes

    class  boost::locale::boundary::boundary_point< IteratorType >
     This class represents a boundary point in the text. More...
     
    struct  boost::locale::boundary::break_info
     This structure is used for representing boundary point that follows the offset. More...
     
    class  boost::locale::boundary::boundary_indexing< CharType >
     This facet generates an index for boundary analysis for a given text. More...
     
    class  boost::locale::boundary::segment_index< BaseIterator >
     This class holds an index of segments in the text range and allows to iterate over them. More...
     
    class  boost::locale::boundary::boundary_point_index< BaseIterator >
     This class holds an index of boundary points and allows iterating over them. More...
     
    class  boost::locale::boundary::segment< IteratorType >
     a segment object that represents a pair of two iterators that define the range where this segment exits and a rule that defines it. More...
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Typedefs

    typedef std::vector< break_info > boost::locale::boundary::index_type
     
    typedef BaseIterator boost::locale::boundary::segment_index< BaseIterator >::base_iterator
     
    typedef unspecified_iterator_type boost::locale::boundary::segment_index< BaseIterator >::iterator
     
    typedef unspecified_iterator_type boost::locale::boundary::segment_index< BaseIterator >::const_iterator
     
    typedef segment< base_iterator > boost::locale::boundary::segment_index< BaseIterator >::value_type
     
    typedef BaseIterator boost::locale::boundary::boundary_point_index< BaseIterator >::base_iterator
     
    typedef unspecified_iterator_type boost::locale::boundary::boundary_point_index< BaseIterator >::iterator
     
    typedef unspecified_iterator_type boost::locale::boundary::boundary_point_index< BaseIterator >::const_iterator
     
    typedef boundary_point
    -< base_iterator > 
    boost::locale::boundary::boundary_point_index< BaseIterator >::value_type
     
    -typedef segment_index
    -< std::string::const_iterator > 
    boost::locale::boundary::ssegment_index
     convenience typedef
     
    -typedef segment_index
    -< std::wstring::const_iterator > 
    boost::locale::boundary::wssegment_index
     convenience typedef
     
    -typedef segment_index
    -< std::u16string::const_iterator > 
    boost::locale::boundary::u16ssegment_index
     convenience typedef
     
    -typedef segment_index
    -< std::u32string::const_iterator > 
    boost::locale::boundary::u32ssegment_index
     convenience typedef
     
    -typedef segment_index< char
    -const * > 
    boost::locale::boundary::csegment_index
     convenience typedef
     
    -typedef segment_index< wchar_t
    -const * > 
    boost::locale::boundary::wcsegment_index
     convenience typedef
     
    -typedef segment_index
    -< char16_t const * > 
    boost::locale::boundary::u16csegment_index
     convenience typedef
     
    -typedef segment_index
    -< char32_t const * > 
    boost::locale::boundary::u32csegment_index
     convenience typedef
     
    -typedef boundary_point_index
    -< std::string::const_iterator > 
    boost::locale::boundary::sboundary_point_index
     convenience typedef
     
    -typedef boundary_point_index
    -< std::wstring::const_iterator > 
    boost::locale::boundary::wsboundary_point_index
     convenience typedef
     
    -typedef boundary_point_index
    -< std::u16string::const_iterator > 
    boost::locale::boundary::u16sboundary_point_index
     convenience typedef
     
    -typedef boundary_point_index
    -< std::u32string::const_iterator > 
    boost::locale::boundary::u32sboundary_point_index
     convenience typedef
     
    -typedef boundary_point_index
    -< char const * > 
    boost::locale::boundary::cboundary_point_index
     convenience typedef
     
    -typedef boundary_point_index
    -< wchar_t const * > 
    boost::locale::boundary::wcboundary_point_index
     convenience typedef
     
    -typedef boundary_point_index
    -< char16_t const * > 
    boost::locale::boundary::u16cboundary_point_index
     convenience typedef
     
    -typedef boundary_point_index
    -< char32_t const * > 
    boost::locale::boundary::u32cboundary_point_index
     convenience typedef
     
    -typedef segment
    -< std::string::const_iterator > 
    boost::locale::boundary::ssegment
     convenience typedef
     
    -typedef segment
    -< std::wstring::const_iterator > 
    boost::locale::boundary::wssegment
     convenience typedef
     
    -typedef segment
    -< std::u16string::const_iterator > 
    boost::locale::boundary::u16ssegment
     convenience typedef
     
    -typedef segment
    -< std::u32string::const_iterator > 
    boost::locale::boundary::u32ssegment
     convenience typedef
     
    -typedef segment< char const * > boost::locale::boundary::csegment
     convenience typedef
     
    -typedef segment< wchar_t const * > boost::locale::boundary::wcsegment
     convenience typedef
     
    -typedef segment< char16_t const * > boost::locale::boundary::u16csegment
     convenience typedef
     
    -typedef segment< char32_t const * > boost::locale::boundary::u32csegment
     convenience typedef
     
    typedef uint32_t boost::locale::boundary::rule_type
     Flags used with word boundary analysis – the type of the word, line or sentence boundary found. More...
     
    - - - -

    -Enumerations

    enum  boost::locale::boundary::boundary_type { boost::locale::boundary::character, -boost::locale::boundary::word, -boost::locale::boundary::sentence, -boost::locale::boundary::line - }
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    template<typename BaseIterator >
    bool boost::locale::boundary::operator== (BaseIterator const &l, boundary_point< BaseIterator > const &r)
     
    template<typename BaseIterator >
    bool boost::locale::boundary::operator!= (BaseIterator const &l, boundary_point< BaseIterator > const &r)
     
     boost::locale::boundary::segment_index< BaseIterator >::segment_index ()
     
     boost::locale::boundary::segment_index< BaseIterator >::segment_index (boundary_type type, base_iterator begin, base_iterator end, rule_type mask, std::locale const &loc=std::locale())
     
     boost::locale::boundary::segment_index< BaseIterator >::segment_index (boundary_type type, base_iterator begin, base_iterator end, std::locale const &loc=std::locale())
     
     boost::locale::boundary::segment_index< BaseIterator >::segment_index (boundary_point_index< base_iterator > const &)
     
    segment_index const & boost::locale::boundary::segment_index< BaseIterator >::operator= (boundary_point_index< base_iterator > const &)
     
    void boost::locale::boundary::segment_index< BaseIterator >::map (boundary_type type, base_iterator begin, base_iterator end, std::locale const &loc=std::locale())
     
    iterator boost::locale::boundary::segment_index< BaseIterator >::begin () const
     
    iterator boost::locale::boundary::segment_index< BaseIterator >::end () const
     
    iterator boost::locale::boundary::segment_index< BaseIterator >::find (base_iterator p) const
     
    rule_type boost::locale::boundary::segment_index< BaseIterator >::rule () const
     
    void boost::locale::boundary::segment_index< BaseIterator >::rule (rule_type v)
     
    bool boost::locale::boundary::segment_index< BaseIterator >::full_select () const
     
    void boost::locale::boundary::segment_index< BaseIterator >::full_select (bool v)
     
     boost::locale::boundary::boundary_point_index< BaseIterator >::boundary_point_index ()
     
     boost::locale::boundary::boundary_point_index< BaseIterator >::boundary_point_index (boundary_type type, base_iterator begin, base_iterator end, rule_type mask, std::locale const &loc=std::locale())
     
     boost::locale::boundary::boundary_point_index< BaseIterator >::boundary_point_index (boundary_type type, base_iterator begin, base_iterator end, std::locale const &loc=std::locale())
     
     boost::locale::boundary::boundary_point_index< BaseIterator >::boundary_point_index (segment_index< base_iterator > const &other)
     
    boundary_point_index const & boost::locale::boundary::boundary_point_index< BaseIterator >::operator= (segment_index< base_iterator > const &other)
     
    void boost::locale::boundary::boundary_point_index< BaseIterator >::map (boundary_type type, base_iterator begin, base_iterator end, std::locale const &loc=std::locale())
     
    iterator boost::locale::boundary::boundary_point_index< BaseIterator >::begin () const
     
    iterator boost::locale::boundary::boundary_point_index< BaseIterator >::end () const
     
    iterator boost::locale::boundary::boundary_point_index< BaseIterator >::find (base_iterator p) const
     
    rule_type boost::locale::boundary::boundary_point_index< BaseIterator >::rule () const
     
    void boost::locale::boundary::boundary_point_index< BaseIterator >::rule (rule_type v)
     
    -template<typename IteratorL , typename IteratorR >
    bool boost::locale::boundary::operator== (segment< IteratorL > const &l, segment< IteratorR > const &r)
     Compare two segments.
     
    -template<typename IteratorL , typename IteratorR >
    bool boost::locale::boundary::operator!= (segment< IteratorL > const &l, segment< IteratorR > const &r)
     Compare two segments.
     
    -template<typename IteratorL , typename IteratorR >
    bool boost::locale::boundary::operator< (segment< IteratorL > const &l, segment< IteratorR > const &r)
     Compare two segments.
     
    -template<typename IteratorL , typename IteratorR >
    bool boost::locale::boundary::operator<= (segment< IteratorL > const &l, segment< IteratorR > const &r)
     Compare two segments.
     
    -template<typename IteratorL , typename IteratorR >
    bool boost::locale::boundary::operator> (segment< IteratorL > const &l, segment< IteratorR > const &r)
     Compare two segments.
     
    -template<typename IteratorL , typename IteratorR >
    bool boost::locale::boundary::operator>= (segment< IteratorL > const &l, segment< IteratorR > const &r)
     Compare two segments.
     
    -template<typename CharType , typename Traits , typename Alloc , typename IteratorR >
    bool boost::locale::boundary::operator== (std::basic_string< CharType, Traits, Alloc > const &l, segment< IteratorR > const &r)
     Compare string and segment.
     
    -template<typename CharType , typename Traits , typename Alloc , typename IteratorR >
    bool boost::locale::boundary::operator!= (std::basic_string< CharType, Traits, Alloc > const &l, segment< IteratorR > const &r)
     Compare string and segment.
     
    -template<typename CharType , typename Traits , typename Alloc , typename IteratorR >
    bool boost::locale::boundary::operator< (std::basic_string< CharType, Traits, Alloc > const &l, segment< IteratorR > const &r)
     Compare string and segment.
     
    -template<typename CharType , typename Traits , typename Alloc , typename IteratorR >
    bool boost::locale::boundary::operator<= (std::basic_string< CharType, Traits, Alloc > const &l, segment< IteratorR > const &r)
     Compare string and segment.
     
    -template<typename CharType , typename Traits , typename Alloc , typename IteratorR >
    bool boost::locale::boundary::operator> (std::basic_string< CharType, Traits, Alloc > const &l, segment< IteratorR > const &r)
     Compare string and segment.
     
    -template<typename CharType , typename Traits , typename Alloc , typename IteratorR >
    bool boost::locale::boundary::operator>= (std::basic_string< CharType, Traits, Alloc > const &l, segment< IteratorR > const &r)
     Compare string and segment.
     
    -template<typename Iterator , typename CharType , typename Traits , typename Alloc >
    bool boost::locale::boundary::operator== (segment< Iterator > const &l, std::basic_string< CharType, Traits, Alloc > const &r)
     Compare string and segment.
     
    -template<typename Iterator , typename CharType , typename Traits , typename Alloc >
    bool boost::locale::boundary::operator!= (segment< Iterator > const &l, std::basic_string< CharType, Traits, Alloc > const &r)
     Compare string and segment.
     
    -template<typename Iterator , typename CharType , typename Traits , typename Alloc >
    bool boost::locale::boundary::operator< (segment< Iterator > const &l, std::basic_string< CharType, Traits, Alloc > const &r)
     Compare string and segment.
     
    -template<typename Iterator , typename CharType , typename Traits , typename Alloc >
    bool boost::locale::boundary::operator<= (segment< Iterator > const &l, std::basic_string< CharType, Traits, Alloc > const &r)
     Compare string and segment.
     
    -template<typename Iterator , typename CharType , typename Traits , typename Alloc >
    bool boost::locale::boundary::operator> (segment< Iterator > const &l, std::basic_string< CharType, Traits, Alloc > const &r)
     Compare string and segment.
     
    -template<typename Iterator , typename CharType , typename Traits , typename Alloc >
    bool boost::locale::boundary::operator>= (segment< Iterator > const &l, std::basic_string< CharType, Traits, Alloc > const &r)
     Compare string and segment.
     
    -template<typename CharType , typename IteratorR >
    bool boost::locale::boundary::operator== (CharType const *l, segment< IteratorR > const &r)
     Compare C string and segment.
     
    -template<typename CharType , typename IteratorR >
    bool boost::locale::boundary::operator!= (CharType const *l, segment< IteratorR > const &r)
     Compare C string and segment.
     
    -template<typename CharType , typename IteratorR >
    bool boost::locale::boundary::operator< (CharType const *l, segment< IteratorR > const &r)
     Compare C string and segment.
     
    -template<typename CharType , typename IteratorR >
    bool boost::locale::boundary::operator<= (CharType const *l, segment< IteratorR > const &r)
     Compare C string and segment.
     
    -template<typename CharType , typename IteratorR >
    bool boost::locale::boundary::operator> (CharType const *l, segment< IteratorR > const &r)
     Compare C string and segment.
     
    -template<typename CharType , typename IteratorR >
    bool boost::locale::boundary::operator>= (CharType const *l, segment< IteratorR > const &r)
     Compare C string and segment.
     
    -template<typename Iterator , typename CharType >
    bool boost::locale::boundary::operator== (segment< Iterator > const &l, CharType const *r)
     Compare C string and segment.
     
    -template<typename Iterator , typename CharType >
    bool boost::locale::boundary::operator!= (segment< Iterator > const &l, CharType const *r)
     Compare C string and segment.
     
    -template<typename Iterator , typename CharType >
    bool boost::locale::boundary::operator< (segment< Iterator > const &l, CharType const *r)
     Compare C string and segment.
     
    -template<typename Iterator , typename CharType >
    bool boost::locale::boundary::operator<= (segment< Iterator > const &l, CharType const *r)
     Compare C string and segment.
     
    -template<typename Iterator , typename CharType >
    bool boost::locale::boundary::operator> (segment< Iterator > const &l, CharType const *r)
     Compare C string and segment.
     
    -template<typename Iterator , typename CharType >
    bool boost::locale::boundary::operator>= (segment< Iterator > const &l, CharType const *r)
     Compare C string and segment.
     
    template<typename CharType , typename TraitsType , typename Iterator >
    std::basic_ostream< CharType,
    -TraitsType > & 
    boost::locale::boundary::operator<< (std::basic_ostream< CharType, TraitsType > &out, segment< Iterator > const &tok)
     
    rule_type boost::locale::boundary::boundary_rule (boundary_type t)
     
    - - - - - -

    -Friends

    -class boost::locale::boundary::segment_index< BaseIterator >::boundary_point_index< base_iterator >
     
    -class boost::locale::boundary::boundary_point_index< BaseIterator >::segment_index< base_iterator >
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Flags that describe a type of word selected

    -
    -static const rule_type boost::locale::boundary::word_none = 0x0000F
     Not a word, like white space or punctuation mark.
     
    -static const rule_type boost::locale::boundary::word_number = 0x000F0
     Word that appear to be a number.
     
    -static const rule_type boost::locale::boundary::word_letter = 0x00F00
     Word that contains letters, excluding kana and ideographic characters.
     
    -static const rule_type boost::locale::boundary::word_kana = 0x0F000
     Word that contains kana characters.
     
    -static const rule_type boost::locale::boundary::word_ideo = 0xF0000
     Word that contains ideographic characters.
     
    -static const rule_type boost::locale::boundary::word_any = 0xFFFF0
     Any word including numbers, 0 is special flag, equivalent to 15.
     
    -static const rule_type boost::locale::boundary::word_letters = 0xFFF00
     Any word, excluding numbers but including letters, kana and ideograms.
     
    -static const rule_type boost::locale::boundary::word_kana_ideo = 0xFF000
     Word that includes kana or ideographic characters.
     
    static const rule_type boost::locale::boundary::word_mask = 0xFFFFF
     
    - - - - - - - - - - - - - - -

    -Flags that describe a type of line break

    -
    -static const rule_type boost::locale::boundary::line_soft = 0x0F
     Soft line break: optional but not required.
     
    -static const rule_type boost::locale::boundary::line_hard = 0xF0
     Hard line break: like break is required (as per CR/LF)
     
    -static const rule_type boost::locale::boundary::line_any = 0xFF
     Soft or Hard line break.
     
    -static const rule_type boost::locale::boundary::line_mask = 0xFF
     Select all types of line breaks.
     
    - - - - - - - - - - - - - - -

    -Flags that describe a type of sentence break

    -
    -static const rule_type boost::locale::boundary::sentence_term = 0x0F
     The sentence was terminated with a sentence terminator like ".", "!" possible followed by hard separator like CR, LF, PS.
     
    -static const rule_type boost::locale::boundary::sentence_sep = 0xF0
     The sentence does not contain terminator like ".", "!" but ended with hard separator like CR, LF, PS or end of input.
     
    -static const rule_type boost::locale::boundary::sentence_any = 0xFF
     Either first or second sentence break type;.
     
    -static const rule_type boost::locale::boundary::sentence_mask = 0xFF
     Select all sentence breaking points.
     
    - - - - - - - - -

    -Flags that describe a type of character break.

    At this point break iterator does not distinguish different kinds of characters so it is used for consistency.

    -
    -static const rule_type boost::locale::boundary::character_any = 0xF
     Not in use, just for consistency.
     
    -static const rule_type boost::locale::boundary::character_mask = 0xF
     Select all character breaking points.
     
    -

    Detailed Description

    -

    This module contains all operations required for boundary analysis of text: character, word, like and sentence boundaries

    -

    This module contains all operations required for boundary analysis of text: character, word, like and sentence boundaries

    -

    Typedef Documentation

    - -
    -
    -
    -template<typename BaseIterator>
    - - - - -
    typedef BaseIterator boost::locale::boundary::segment_index< BaseIterator >::base_iterator
    -
    -

    The type of the iterator used to iterate over the original text

    - -
    -
    - -
    -
    -
    -template<typename BaseIterator >
    - - - - -
    typedef BaseIterator boost::locale::boundary::boundary_point_index< BaseIterator >::base_iterator
    -
    -

    The type of the iterator used to iterate over the original text

    - -
    -
    - -
    -
    -
    -template<typename BaseIterator>
    - - - - -
    typedef unspecified_iterator_type boost::locale::boundary::segment_index< BaseIterator >::const_iterator
    -
    - -

    -

    The bidirectional iterator that iterates over value_type objects.

    -
      -
    • The iterators may be invalidated by use of any non-const member function including but not limited to rule(rule_type) and full_select(bool).
    • -
    • The returned value_type object is valid as long as iterator points to it. So this following code is wrong as t used after p was updated:
      segment_index<some_iterator>::iterator p=index.begin();
      -
      segment<some_iterator> &t = *p;
      -
      ++p;
      -
      cout << t.str() << endl;
      -
    • -
    - -
    -
    - -
    -
    -
    -template<typename BaseIterator >
    - - - - -
    typedef unspecified_iterator_type boost::locale::boundary::boundary_point_index< BaseIterator >::const_iterator
    -
    - -

    -

    The bidirectional iterator that iterates over value_type objects.

    -
      -
    • The iterators may be invalidated by use of any non-const member function including but not limited to rule(rule_type) member function.
    • -
    • The returned value_type object is valid as long as iterator points to it. So this following code is wrong as t used after p was updated:
      boundary_point_index<some_iterator>::iterator p=index.begin();
      -
      boundary_point<some_iterator> &t = *p;
      -
      ++p;
      -
      rule_type r = t->rule();
      -
    • -
    - -
    -
    - -
    -
    - - - - -
    typedef std::vector<break_info> boost::locale::boundary::index_type
    -
    -

    This type holds the analysis of the text - all its break points with marks

    - -
    -
    - -
    -
    -
    -template<typename BaseIterator>
    - - - - -
    typedef unspecified_iterator_type boost::locale::boundary::segment_index< BaseIterator >::iterator
    -
    -

    The bidirectional iterator that iterates over value_type objects.

    -
      -
    • The iterators may be invalidated by use of any non-const member function including but not limited to rule(rule_type) and full_select(bool).
    • -
    • The returned value_type object is valid as long as iterator points to it. So this following code is wrong as t used after p was updated:
      segment_index<some_iterator>::iterator p=index.begin();
      -
      segment<some_iterator> &t = *p;
      -
      ++p;
      -
      cout << t.str() << endl;
      -
    • -
    - -
    -
    - -
    -
    -
    -template<typename BaseIterator >
    - - - - -
    typedef unspecified_iterator_type boost::locale::boundary::boundary_point_index< BaseIterator >::iterator
    -
    -

    The bidirectional iterator that iterates over value_type objects.

    -
      -
    • The iterators may be invalidated by use of any non-const member function including but not limited to rule(rule_type) member function.
    • -
    • The returned value_type object is valid as long as iterator points to it. So this following code is wrong as t used after p was updated:
      boundary_point_index<some_iterator>::iterator p=index.begin();
      -
      boundary_point<some_iterator> &t = *p;
      -
      ++p;
      -
      rule_type r = t->rule();
      -
    • -
    - -
    -
    - -
    -
    - - - - -
    typedef uint32_t boost::locale::boundary::rule_type
    -
    - -

    Flags used with word boundary analysis – the type of the word, line or sentence boundary found.

    -

    It is a bit-mask that represents various combinations of rules used to select this specific boundary.

    - -
    -
    - -
    -
    -
    -template<typename BaseIterator>
    - - - - -
    typedef segment<base_iterator> boost::locale::boundary::segment_index< BaseIterator >::value_type
    -
    -

    The type dereferenced by the iterator and const_iterator. It is an object that represents selected segment.

    - -
    -
    - -
    -
    -
    -template<typename BaseIterator >
    - - - - -
    typedef boundary_point<base_iterator> boost::locale::boundary::boundary_point_index< BaseIterator >::value_type
    -
    -

    The type dereferenced by the iterator and const_iterator. It is an object that represents the selected boundary point.

    - -
    -
    -

    Enumeration Type Documentation

    - -
    -
    -

    This type describes a possible boundary analysis alternatives.

    - - - - - -
    Enumerator
    character  -

    Analyse the text for character boundaries.

    -
    word  -

    Analyse the text for word boundaries.

    -
    sentence  -

    Analyse the text for Find sentence boundaries.

    -
    line  -

    Analyse the text for positions suitable for line breaks.

    -
    - -
    -
    -

    Function Documentation

    - -
    -
    -
    -template<typename BaseIterator>
    - - - - - -
    - - - - - - - -
    iterator boost::locale::boundary::segment_index< BaseIterator >::begin () const
    -
    -inline
    -
    -

    Get the iterator on the beginning of the segments range.

    -

    Preconditions: the segment_index should have a mapping

    -
    Note
    -

    The returned iterator is invalidated by access to any non-const member functions of this object

    - -
    -
    - -
    -
    -
    -template<typename BaseIterator >
    - - - - - -
    - - - - - - - -
    iterator boost::locale::boundary::boundary_point_index< BaseIterator >::begin () const
    -
    -inline
    -
    -

    Get the iterator on the beginning of the boundary points range.

    -

    Preconditions: this boundary_point_index should have a mapping

    -
    Note
    -

    The returned iterator is invalidated by access to any non-const member functions of this object

    - -
    -
    - -
    -
    -
    -template<typename BaseIterator >
    - - - - - -
    - - - - - - - -
    boost::locale::boundary::boundary_point_index< BaseIterator >::boundary_point_index ()
    -
    -inline
    -
    -

    Default constructor.

    -
    Note
    -

    When this object is constructed by default it does not include a valid index, thus calling begin(), end() or find() member functions would lead to undefined behavior

    - -
    -
    - -
    -
    -
    -template<typename BaseIterator >
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    boost::locale::boundary::boundary_point_index< BaseIterator >::boundary_point_index (boundary_type type,
    base_iterator begin,
    base_iterator end,
    rule_type mask,
    std::locale const & loc = std::locale() 
    )
    -
    -inline
    -
    -

    Create a segment_index for boundary analysis type of the text in range [begin,end) using a rule mask for locale loc.

    - -
    -
    - -
    -
    -
    -template<typename BaseIterator >
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    boost::locale::boundary::boundary_point_index< BaseIterator >::boundary_point_index (boundary_type type,
    base_iterator begin,
    base_iterator end,
    std::locale const & loc = std::locale() 
    )
    -
    -inline
    -
    -

    Create a segment_index for boundary analysis type of the text in range [begin,end) selecting all possible boundary points (full mask) for locale loc.

    - -
    -
    - -
    -
    -
    -template<typename BaseIterator >
    - - - - - - - - -
    boost::locale::boundary::boundary_point_index< BaseIterator >::boundary_point_index (segment_index< base_iterator > const & other)
    -
    -

    Create a boundary_point_index from a segment_index. It copies all indexing information and uses the default rule (all possible boundary points)

    -

    This operation is very cheap, so if you use boundary_point_index and segment_index on same text range it is much better to create one from another rather then indexing the same range twice.

    -
    Note
    rule() flags are not copied
    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    rule_type boost::locale::boundary::boundary_rule (boundary_type t)
    -
    -inline
    -
    -

    This function returns the mask that covers all variants for specific boundary type

    - -
    -
    - -
    -
    -
    -template<typename BaseIterator>
    - - - - - -
    - - - - - - - -
    iterator boost::locale::boundary::segment_index< BaseIterator >::end () const
    -
    -inline
    -
    -

    Get the iterator on the ending of the segments range.

    -

    Preconditions: the segment_index should have a mapping

    -

    The returned iterator is invalidated by access to any non-const member functions of this object

    - -
    -
    - -
    -
    -
    -template<typename BaseIterator >
    - - - - - -
    - - - - - - - -
    iterator boost::locale::boundary::boundary_point_index< BaseIterator >::end () const
    -
    -inline
    -
    -

    Get the iterator on the ending of the boundary points range.

    -

    Preconditions: this boundary_point_index should have a mapping

    -
    Note
    -

    The returned iterator is invalidated by access to any non-const member functions of this object

    - -
    -
    - -
    -
    -
    -template<typename BaseIterator>
    - - - - - -
    - - - - - - - - -
    iterator boost::locale::boundary::segment_index< BaseIterator >::find (base_iterator p) const
    -
    -inline
    -
    -

    Find a first valid segment following a position p.

    -

    If p is inside a valid segment this segment is selected:

    -

    For example: For word boundary analysis with word_any rule():

    -
      -
    • "to| be or ", would point to "be",
    • -
    • "t|o be or ", would point to "to",
    • -
    • "to be or| ", would point to end.
    • -
    -

    Preconditions: the segment_index should have a mapping and p should be valid iterator to the text in the mapped range.

    -

    The returned iterator is invalidated by access to any non-const member functions of this object

    - -
    -
    - -
    -
    -
    -template<typename BaseIterator >
    - - - - - -
    - - - - - - - - -
    iterator boost::locale::boundary::boundary_point_index< BaseIterator >::find (base_iterator p) const
    -
    -inline
    -
    -

    Find a first valid boundary point on a position p or following it.

    -

    For example: For word boundary analysis of the text "to be or"

    -
      -
    • "|to be", would return boundary point at "|to be",
    • -
    • "t|o be", would point to "to| be"
    • -
    -

    Preconditions: the boundary_point_index should have a mapping and p should be valid iterator to the text in the mapped range.

    -

    The returned iterator is invalidated by access to any non-const member functions of this object

    - -
    -
    - -
    -
    -
    -template<typename BaseIterator>
    - - - - - -
    - - - - - - - -
    bool boost::locale::boundary::segment_index< BaseIterator >::full_select () const
    -
    -inline
    -
    -

    Get the full_select property value - should segment include in the range values that not belong to specific rule() or not.

    -

    The default value is false.

    -

    For example for sentence boundary with rule sentence_term the segments of text "Hello! How\nare you?" are "Hello!\", "are you?" when full_select() is false because "How\n" is selected as sentence by a rule spits the text by line feed. If full_select() is true the returned segments are "Hello! ", "How\nare you?" where "How\n" is joined with the following part "are you?"

    - -
    -
    - -
    -
    -
    -template<typename BaseIterator>
    - - - - - -
    - - - - - - - - -
    void boost::locale::boundary::segment_index< BaseIterator >::full_select (bool v)
    -
    -inline
    -
    -

    Set the full_select property value - should segment include in the range values that not belong to specific rule() or not.

    -

    The default value is false.

    -

    For example for sentence boundary with rule sentence_term the segments of text "Hello! How\nare you?" are "Hello!\", "are you?" when full_select() is false because "How\n" is selected as sentence by a rule spits the text by line feed. If full_select() is true the returned segments are "Hello! ", "How\nare you?" where "How\n" is joined with the following part "are you?"

    - -
    -
    - -
    -
    -
    -template<typename BaseIterator>
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void boost::locale::boundary::segment_index< BaseIterator >::map (boundary_type type,
    base_iterator begin,
    base_iterator end,
    std::locale const & loc = std::locale() 
    )
    -
    -inline
    -
    -

    Create a new index for boundary analysis type of the text in range [begin,end) for locale loc.

    -
    Note
    rule() and full_select() remain unchanged.
    -
    Examples:
    boundary.cpp, and wboundary.cpp.
    -
    -
    -
    - -
    -
    -
    -template<typename BaseIterator >
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void boost::locale::boundary::boundary_point_index< BaseIterator >::map (boundary_type type,
    base_iterator begin,
    base_iterator end,
    std::locale const & loc = std::locale() 
    )
    -
    -inline
    -
    -

    Create a new index for boundary analysis type of the text in range [begin,end) for locale loc.

    -
    Note
    rule() remains unchanged.
    - -
    -
    - -
    -
    -
    -template<typename BaseIterator >
    - - - - - - - - - - - - - - - - - - -
    bool boost::locale::boundary::operator!= (BaseIterator const & l,
    boundary_point< BaseIterator > const & r 
    )
    -
    -

    Check if the boundary point r points to different location from an iterator l

    - -
    -
    - -
    -
    -
    -template<typename CharType , typename TraitsType , typename Iterator >
    - - - - - - - - - - - - - - - - - - -
    std::basic_ostream<CharType,TraitsType>& boost::locale::boundary::operator<< (std::basic_ostream< CharType, TraitsType > & out,
    segment< Iterator > const & tok 
    )
    -
    -

    Write the segment to the stream character by character

    - -
    -
    - -
    -
    -
    -template<typename BaseIterator>
    - - - - - - - - -
    segment_index const& boost::locale::boundary::segment_index< BaseIterator >::operator= (boundary_point_index< base_iterator > const & )
    -
    -

    Copy an index from a boundary_point_index. It copies all indexing information and uses the default rule (all possible segments)

    -

    This operation is very cheap, so if you use boundary_point_index and segment_index on same text range it is much better to create one from another rather then indexing the same range twice.

    -
    Note
    rule() flags are not copied
    - -
    -
    - -
    -
    -
    -template<typename BaseIterator >
    - - - - - - - - -
    boundary_point_index const& boost::locale::boundary::boundary_point_index< BaseIterator >::operator= (segment_index< base_iterator > const & other)
    -
    -

    Copy a boundary_point_index from a segment_index. It copies all indexing information and keeps the current rule() unchanged

    -

    This operation is very cheap, so if you use boundary_point_index and segment_index on same text range it is much better to create one from another rather then indexing the same range twice.

    -
    Note
    rule() flags are not copied
    - -
    -
    - -
    -
    -
    -template<typename BaseIterator >
    - - - - - - - - - - - - - - - - - - -
    bool boost::locale::boundary::operator== (BaseIterator const & l,
    boundary_point< BaseIterator > const & r 
    )
    -
    -

    Check if the boundary point r points to same location as an iterator l

    - -
    -
    - -
    -
    -
    -template<typename BaseIterator>
    - - - - - -
    - - - - - - - -
    rule_type boost::locale::boundary::segment_index< BaseIterator >::rule () const
    -
    -inline
    -
    -

    Get the mask of rules that are used

    - -
    -
    - -
    -
    -
    -template<typename BaseIterator>
    - - - - - -
    - - - - - - - - -
    void boost::locale::boundary::segment_index< BaseIterator >::rule (rule_type v)
    -
    -inline
    -
    -

    Set the mask of rules that are used

    - -
    -
    - -
    -
    -
    -template<typename BaseIterator >
    - - - - - -
    - - - - - - - -
    rule_type boost::locale::boundary::boundary_point_index< BaseIterator >::rule () const
    -
    -inline
    -
    -

    Get the mask of rules that are used

    - -
    -
    - -
    -
    -
    -template<typename BaseIterator >
    - - - - - -
    - - - - - - - - -
    void boost::locale::boundary::boundary_point_index< BaseIterator >::rule (rule_type v)
    -
    -inline
    -
    -

    Set the mask of rules that are used

    - -
    -
    - -
    -
    -
    -template<typename BaseIterator>
    - - - - - -
    - - - - - - - -
    boost::locale::boundary::segment_index< BaseIterator >::segment_index ()
    -
    -inline
    -
    -

    Default constructor.

    -
    Note
    -

    When this object is constructed by default it does not include a valid index, thus calling begin(), end() or find() member functions would lead to undefined behavior

    - -
    -
    - -
    -
    -
    -template<typename BaseIterator>
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    boost::locale::boundary::segment_index< BaseIterator >::segment_index (boundary_type type,
    base_iterator begin,
    base_iterator end,
    rule_type mask,
    std::locale const & loc = std::locale() 
    )
    -
    -inline
    -
    -

    Create a segment_index for boundary analysis type of the text in range [begin,end) using a rule mask for locale loc.

    - -
    -
    - -
    -
    -
    -template<typename BaseIterator>
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    boost::locale::boundary::segment_index< BaseIterator >::segment_index (boundary_type type,
    base_iterator begin,
    base_iterator end,
    std::locale const & loc = std::locale() 
    )
    -
    -inline
    -
    -

    Create a segment_index for boundary analysis type of the text in range [begin,end) selecting all possible segments (full mask) for locale loc.

    - -
    -
    - -
    -
    -
    -template<typename BaseIterator>
    - - - - - - - - -
    boost::locale::boundary::segment_index< BaseIterator >::segment_index (boundary_point_index< base_iterator > const & )
    -
    -

    Create a segment_index from a boundary_point_index. It copies all indexing information and used default rule (all possible segments)

    -

    This operation is very cheap, so if you use boundary_point_index and segment_index on same text range it is much better to create one from another rather then indexing the same range twice.

    -
    Note
    rule() flags are not copied
    - -
    -
    -

    Variable Documentation

    - -
    -
    - - - - - -
    - - - - -
    const rule_type boost::locale::boundary::word_mask = 0xFFFFF
    -
    -static
    -
    -

    Full word mask - select all possible variants

    - -
    -
    -
    -
    - - - - - - diff --git a/doc/html/group__boundary.js b/doc/html/group__boundary.js deleted file mode 100644 index 4200724b..00000000 --- a/doc/html/group__boundary.js +++ /dev/null @@ -1,206 +0,0 @@ -var group__boundary = -[ - [ "boundary_point", "classboost_1_1locale_1_1boundary_1_1boundary__point.html", [ - [ "iterator_type", "classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694", null ], - [ "boundary_point", "classboost_1_1locale_1_1boundary_1_1boundary__point.html#aabbbee60c2c97ffd95210206a86c9298", null ], - [ "boundary_point", "classboost_1_1locale_1_1boundary_1_1boundary__point.html#a653a1c0d7480006ff647a656c74521df", null ], - [ "iterator", "classboost_1_1locale_1_1boundary_1_1boundary__point.html#a5ea18137618a1a84ff0b75c3b166c495", null ], - [ "iterator", "classboost_1_1locale_1_1boundary_1_1boundary__point.html#af279d5382e1b28c2ce82035c1929ea66", null ], - [ "operator iterator_type", "classboost_1_1locale_1_1boundary_1_1boundary__point.html#aa2dc88b4d02151aea939a01b7fc88730", null ], - [ "operator!=", "classboost_1_1locale_1_1boundary_1_1boundary__point.html#a4347b22dd7edb8af49d1316a6f86d0c2", null ], - [ "operator!=", "classboost_1_1locale_1_1boundary_1_1boundary__point.html#a4cd03f39d75bb054be9a0ae23189fa7a", null ], - [ "operator==", "classboost_1_1locale_1_1boundary_1_1boundary__point.html#a058ffbcbd43fc41a40a4a1cf5be987f2", null ], - [ "operator==", "classboost_1_1locale_1_1boundary_1_1boundary__point.html#a87a96a1745184ff7495db87943aca424", null ], - [ "rule", "classboost_1_1locale_1_1boundary_1_1boundary__point.html#a757b28e11c66f9871d3f51fe93a51bdb", null ], - [ "rule", "classboost_1_1locale_1_1boundary_1_1boundary__point.html#a75e2f04f0f7c1065470f722d1f2e004b", null ] - ] ], - [ "break_info", "structboost_1_1locale_1_1boundary_1_1break__info.html", [ - [ "break_info", "structboost_1_1locale_1_1boundary_1_1break__info.html#a2ad400451f8cf8ca04924a26cb694043", null ], - [ "break_info", "structboost_1_1locale_1_1boundary_1_1break__info.html#ab2012ba50dc8730bf7e2b448fff8be33", null ], - [ "operator<", "structboost_1_1locale_1_1boundary_1_1break__info.html#a6ef38e6f115ed9121e4d8f6189f6c4e2", null ], - [ "offset", "structboost_1_1locale_1_1boundary_1_1break__info.html#a47cdf1764bf8e294ea8a1079501a8c44", null ], - [ "rule", "structboost_1_1locale_1_1boundary_1_1break__info.html#a1a9b497daacb471f297682101696f4eb", null ] - ] ], - [ "boundary_indexing", "classboost_1_1locale_1_1boundary_1_1boundary__indexing.html", [ - [ "boundary_indexing", "classboost_1_1locale_1_1boundary_1_1boundary__indexing.html#a0e4c06efec1f1fca78bec34988aec881", null ], - [ "map", "classboost_1_1locale_1_1boundary_1_1boundary__indexing.html#ac971f4219181ee587844d2c74cca7ef4", null ], - [ "id", "classboost_1_1locale_1_1boundary_1_1boundary__indexing.html#aa7050fa0d55227034c80f811bc9ca97c", null ] - ] ], - [ "segment_index", "classboost_1_1locale_1_1boundary_1_1segment__index.html", [ - [ "base_iterator", "group__boundary.html#ga06f2faacb9d196ebc659ad5382ea2ca5", null ], - [ "const_iterator", "group__boundary.html#ga5f8e61b5babc3f0fa95f5fb8acae3724", null ], - [ "iterator", "group__boundary.html#gaf7a775e77dbbca3495e11d646df96fd2", null ], - [ "value_type", "group__boundary.html#ga067c663d18faee08adb3355701ae72ba", null ], - [ "segment_index", "group__boundary.html#ga2c354f4cc03677b58c97038cd84dc465", null ], - [ "segment_index", "group__boundary.html#ga06ddc335e95479ec51e9b16d0f829bb3", null ], - [ "segment_index", "group__boundary.html#ga46a5f584d5a1a43ad4bc0fff07183fcc", null ], - [ "segment_index", "group__boundary.html#ga8187f58177fc89ef2f8f818a37111363", null ], - [ "begin", "group__boundary.html#gaf74ff9c86c177efa8f74856277d659af", null ], - [ "end", "group__boundary.html#ga8757062d2446b35675b585651c5fea9f", null ], - [ "find", "group__boundary.html#ga2480236106971797460187777f2a4411", null ], - [ "full_select", "group__boundary.html#gace7faa10d536c85df0f2d5cac85f2bbc", null ], - [ "full_select", "group__boundary.html#ga205fd51daa439a18527675e663a0802f", null ], - [ "map", "group__boundary.html#gafa2a756b10d3522743204b45b794bb3e", null ], - [ "operator=", "group__boundary.html#gae7941dc874ca05d2ef2a03f781c5b78a", null ], - [ "rule", "group__boundary.html#ga72b4ceb5bacec0eded2601c43a4d671a", null ], - [ "rule", "group__boundary.html#gad19735180401edb15acbdbbeb21e5a73", null ], - [ "boundary_point_index< base_iterator >", "group__boundary.html#ga960209e8a9453221641eda6bd8c4989b", null ] - ] ], - [ "boundary_point_index", "classboost_1_1locale_1_1boundary_1_1boundary__point__index.html", [ - [ "base_iterator", "group__boundary.html#gab3189e2eaf4386cdf37598e0ba16cfd5", null ], - [ "const_iterator", "group__boundary.html#gac9ce9158eb2fb030c1baf93376203d16", null ], - [ "iterator", "group__boundary.html#ga1af6e72b3c384edcebc0cf319fe97efe", null ], - [ "value_type", "group__boundary.html#ga7f7328a860cf485a4bd8f17658c291e1", null ], - [ "boundary_point_index", "group__boundary.html#gaba6993dd50ad8cf2db8921e5cf668a69", null ], - [ "boundary_point_index", "group__boundary.html#gacc189288792012cfdb21c07fddbadc4f", null ], - [ "boundary_point_index", "group__boundary.html#ga9b926379fa2fcc7f87dc067953049d69", null ], - [ "boundary_point_index", "group__boundary.html#gac48665ff53789c6ee44a423963b6550d", null ], - [ "begin", "group__boundary.html#ga56f42a32f0378b6e157671f9e17bd66f", null ], - [ "end", "group__boundary.html#gaf3d66d578e32a63b3f0ffbb59740667b", null ], - [ "find", "group__boundary.html#ga0bb71a287afca990e85b17246568492d", null ], - [ "map", "group__boundary.html#ga6b4b5d5cf80b55302a88e7b36c812418", null ], - [ "operator=", "group__boundary.html#ga83d57b993b00686b2cac711667c6a931", null ], - [ "rule", "group__boundary.html#ga1d214029f1a780b7bf6e3f23a3004c03", null ], - [ "rule", "group__boundary.html#ga56e63913f51109e05a24a7136472a975", null ], - [ "segment_index< base_iterator >", "group__boundary.html#gaa8ba2e18ec3780af8f001ba85e40b9e2", null ] - ] ], - [ "segment", "classboost_1_1locale_1_1boundary_1_1segment.html", [ - [ "char_type", "classboost_1_1locale_1_1boundary_1_1segment.html#ad3785355ea817c087bf428315a332169", null ], - [ "const_iterator", "classboost_1_1locale_1_1boundary_1_1segment.html#aa24dcd83aefe4925bfc11b0285e2517a", null ], - [ "difference_type", "classboost_1_1locale_1_1boundary_1_1segment.html#a79ee4d48248ffbc23f84a33355ca3b62", null ], - [ "iterator", "classboost_1_1locale_1_1boundary_1_1segment.html#a31960fd7b416715d012b686bc1f2c205", null ], - [ "string_type", "classboost_1_1locale_1_1boundary_1_1segment.html#a795d3328ac4d1692294f172c8480da47", null ], - [ "value_type", "classboost_1_1locale_1_1boundary_1_1segment.html#ab7ba55015262b4fb85bb531882a32ead", null ], - [ "segment", "classboost_1_1locale_1_1boundary_1_1segment.html#a4e785bc97dba9e8e25f18b43957723e5", null ], - [ "segment", "classboost_1_1locale_1_1boundary_1_1segment.html#aea72505bb4940b21bb00a3660fefb7b7", null ], - [ "begin", "classboost_1_1locale_1_1boundary_1_1segment.html#a5428ff79bc05b78989f56519b58a6d9c", null ], - [ "begin", "classboost_1_1locale_1_1boundary_1_1segment.html#a445da30d993880a1bd6d998e78755a44", null ], - [ "empty", "classboost_1_1locale_1_1boundary_1_1segment.html#a84022afa120893d0716fc446816eb83f", null ], - [ "end", "classboost_1_1locale_1_1boundary_1_1segment.html#aaedd7bb4760bae3dcdb165b330806261", null ], - [ "end", "classboost_1_1locale_1_1boundary_1_1segment.html#a7e36b7f1c88ad1f5756ba6e501454bc4", null ], - [ "length", "classboost_1_1locale_1_1boundary_1_1segment.html#a45edfde079b2afe36c55043c7a00b438", null ], - [ "operator std::basic_string< char_type, T, A >", "classboost_1_1locale_1_1boundary_1_1segment.html#a5230094b346bd26dc83529b47ca97153", null ], - [ "operator!=", "classboost_1_1locale_1_1boundary_1_1segment.html#a2e38c575af16843a3aa140a4332646a3", null ], - [ "operator==", "classboost_1_1locale_1_1boundary_1_1segment.html#a9a30e70d41591b25c8c77961bff00057", null ], - [ "rule", "classboost_1_1locale_1_1boundary_1_1segment.html#a5b36a522d7013306617dbcccc9919343", null ], - [ "rule", "classboost_1_1locale_1_1boundary_1_1segment.html#a962c26b7e2024767ad25f2be080fd53a", null ], - [ "str", "classboost_1_1locale_1_1boundary_1_1segment.html#ac139eae8c07ed82ba8343fedfa76c2bf", null ] - ] ], - [ "base_iterator", "group__boundary.html#ga06f2faacb9d196ebc659ad5382ea2ca5", null ], - [ "base_iterator", "group__boundary.html#gab3189e2eaf4386cdf37598e0ba16cfd5", null ], - [ "cboundary_point_index", "group__boundary.html#ga31f0617de9388783205020a8679b40af", null ], - [ "const_iterator", "group__boundary.html#ga5f8e61b5babc3f0fa95f5fb8acae3724", null ], - [ "const_iterator", "group__boundary.html#gac9ce9158eb2fb030c1baf93376203d16", null ], - [ "csegment", "group__boundary.html#ga7a89ba0de6cad23a0f1b0b90ca5296f0", null ], - [ "csegment_index", "group__boundary.html#ga82c153957bff0be844a5ce4490d4e7f8", null ], - [ "index_type", "group__boundary.html#ga7b4dd7af8fad53fabd77e629da24d466", null ], - [ "iterator", "group__boundary.html#gaf7a775e77dbbca3495e11d646df96fd2", null ], - [ "iterator", "group__boundary.html#ga1af6e72b3c384edcebc0cf319fe97efe", null ], - [ "rule_type", "group__boundary.html#ga25e193c81052ef1795f1b53b46bc2095", null ], - [ "sboundary_point_index", "group__boundary.html#ga485e82cdd9debd15dc4fd6f57be10727", null ], - [ "ssegment", "group__boundary.html#gaac5031c17bd3f7ddc5138546af121064", null ], - [ "ssegment_index", "group__boundary.html#gad4785439a3f03ee455c93830b8f1366c", null ], - [ "u16cboundary_point_index", "group__boundary.html#ga1a89414f77d0b11b7fa8c3a5fa896266", null ], - [ "u16csegment", "group__boundary.html#ga5ff9e98f81ad61dbcd480fc61780fee1", null ], - [ "u16csegment_index", "group__boundary.html#gaa20a99d93e3202680bb0660481e1d414", null ], - [ "u16sboundary_point_index", "group__boundary.html#gaba43501d4ed1922c9446db3bf14a918f", null ], - [ "u16ssegment", "group__boundary.html#ga5084d9529f752361d18c2196f38df3c0", null ], - [ "u16ssegment_index", "group__boundary.html#ga6fff9ef7a0971ed3c686f3e8d5c56bf4", null ], - [ "u32cboundary_point_index", "group__boundary.html#ga1d16a23d328240464f9068cf58fb38d7", null ], - [ "u32csegment", "group__boundary.html#gaf2077b28c5de700fb5bff9688fe410d6", null ], - [ "u32csegment_index", "group__boundary.html#gaacc781106af79ec27693fa8012d54cb9", null ], - [ "u32sboundary_point_index", "group__boundary.html#ga1379f8968dd611be0b59d04218a1aae8", null ], - [ "u32ssegment", "group__boundary.html#gaffcc722694a39291a9ea7f68a95e1e27", null ], - [ "u32ssegment_index", "group__boundary.html#ga3a7b82f5a7e29bd079dd48ca13b79f20", null ], - [ "value_type", "group__boundary.html#ga067c663d18faee08adb3355701ae72ba", null ], - [ "value_type", "group__boundary.html#ga7f7328a860cf485a4bd8f17658c291e1", null ], - [ "wcboundary_point_index", "group__boundary.html#gabcb5bcc788909afeb8c68d857284cb59", null ], - [ "wcsegment", "group__boundary.html#gab9d26aae843dad891a3bfa736871e843", null ], - [ "wcsegment_index", "group__boundary.html#ga29ce0d14d0466a28c205b5dc9d0d6a36", null ], - [ "wsboundary_point_index", "group__boundary.html#gad539aad8c788c8e90cdf08aeed5df4a3", null ], - [ "wssegment", "group__boundary.html#gaca0e28d417ee314f3035c7561ed5134a", null ], - [ "wssegment_index", "group__boundary.html#ga579cfdfccf9c682ac4dae5fb65d4a843", null ], - [ "boundary_type", "group__boundary.html#ga15de9963ce9bb6037c8525901dfbf641", [ - [ "character", "group__boundary.html#gga15de9963ce9bb6037c8525901dfbf641ae80c964112541d88af9b875dafb6605d", null ], - [ "word", "group__boundary.html#gga15de9963ce9bb6037c8525901dfbf641a99aad8b8a5e25baa9f695abe5e574bb6", null ], - [ "sentence", "group__boundary.html#gga15de9963ce9bb6037c8525901dfbf641a88aa1509eace7589f5df87d4694871e9", null ], - [ "line", "group__boundary.html#gga15de9963ce9bb6037c8525901dfbf641a72895419fdd7219b3695cf0abd602ea4", null ] - ] ], - [ "begin", "group__boundary.html#gaf74ff9c86c177efa8f74856277d659af", null ], - [ "begin", "group__boundary.html#ga56f42a32f0378b6e157671f9e17bd66f", null ], - [ "boundary_point_index", "group__boundary.html#gaba6993dd50ad8cf2db8921e5cf668a69", null ], - [ "boundary_point_index", "group__boundary.html#gacc189288792012cfdb21c07fddbadc4f", null ], - [ "boundary_point_index", "group__boundary.html#ga9b926379fa2fcc7f87dc067953049d69", null ], - [ "boundary_point_index", "group__boundary.html#gac48665ff53789c6ee44a423963b6550d", null ], - [ "boundary_rule", "group__boundary.html#ga99daacb708289fe81def9f1ce4486515", null ], - [ "end", "group__boundary.html#ga8757062d2446b35675b585651c5fea9f", null ], - [ "end", "group__boundary.html#gaf3d66d578e32a63b3f0ffbb59740667b", null ], - [ "find", "group__boundary.html#ga2480236106971797460187777f2a4411", null ], - [ "find", "group__boundary.html#ga0bb71a287afca990e85b17246568492d", null ], - [ "full_select", "group__boundary.html#gace7faa10d536c85df0f2d5cac85f2bbc", null ], - [ "full_select", "group__boundary.html#ga205fd51daa439a18527675e663a0802f", null ], - [ "map", "group__boundary.html#gafa2a756b10d3522743204b45b794bb3e", null ], - [ "map", "group__boundary.html#ga6b4b5d5cf80b55302a88e7b36c812418", null ], - [ "operator!=", "group__boundary.html#gab92086846a31a6826c00a3df90027f0f", null ], - [ "operator!=", "group__boundary.html#gae4458cb23aa62b0f94396d3300e838f9", null ], - [ "operator!=", "group__boundary.html#gabb7b2978a45e993d6aa9922cbc381e8b", null ], - [ "operator!=", "group__boundary.html#gab36f95a4500a4c2a31b2ece4a0ae9cd1", null ], - [ "operator!=", "group__boundary.html#gab8256de904b797b2a57905d3a53f87d7", null ], - [ "operator!=", "group__boundary.html#gaf50154c65385afc65e206b5fa34fc4ac", null ], - [ "operator<", "group__boundary.html#ga01671fcf3519166189dff3664f68c870", null ], - [ "operator<", "group__boundary.html#gac57b915b6feed86f731424c5a5ed531c", null ], - [ "operator<", "group__boundary.html#gabf992487402ed47358bf790a6372059d", null ], - [ "operator<", "group__boundary.html#ga5d3bf0c32d4deefe23fa474960b0dea6", null ], - [ "operator<", "group__boundary.html#gad4be80936d6d852d8a07322ea46c49dd", null ], - [ "operator<<", "group__boundary.html#ga66d8f6c9b1c81c36a55aecebd4960b5d", null ], - [ "operator<=", "group__boundary.html#gaef3ac4dbd5172a67ec68e27fe6a7a008", null ], - [ "operator<=", "group__boundary.html#gaec0814b0634157834f1ecd949ea4f935", null ], - [ "operator<=", "group__boundary.html#gab800ff341ec09a99c803dd5fd56e5a81", null ], - [ "operator<=", "group__boundary.html#gad8fc1bd6bf20fe5337dd91dab7f9084c", null ], - [ "operator<=", "group__boundary.html#ga1f813e25280a6165cc270ced46bc8c58", null ], - [ "operator=", "group__boundary.html#gae7941dc874ca05d2ef2a03f781c5b78a", null ], - [ "operator=", "group__boundary.html#ga83d57b993b00686b2cac711667c6a931", null ], - [ "operator==", "group__boundary.html#ga47bc5ece5c461aa4c538354a9e80a707", null ], - [ "operator==", "group__boundary.html#ga5e70e909a5fb4d2cf87b485894c9b4db", null ], - [ "operator==", "group__boundary.html#ga22e4d38b1dd21bd663847fdbc09fca46", null ], - [ "operator==", "group__boundary.html#ga1e22ac8a99d4e743942c5d6e94270e27", null ], - [ "operator==", "group__boundary.html#ga04c0513778ff3cf9712dd03244a7ecb3", null ], - [ "operator==", "group__boundary.html#ga2aa32c6dabd5833c3f4806a7a40c0808", null ], - [ "operator>", "group__boundary.html#ga458e3170d3967ae25c4a40a3970701ba", null ], - [ "operator>", "group__boundary.html#gad19346448d1464f02f706a3d90932837", null ], - [ "operator>", "group__boundary.html#gaf32c4f420aae266e1d6d4b37e716cc30", null ], - [ "operator>", "group__boundary.html#gaa79f6bb9e721e55d071d7898a3010f8e", null ], - [ "operator>", "group__boundary.html#ga4b12a40f6e30c03e064973a66f8697b8", null ], - [ "operator>=", "group__boundary.html#ga4d9854493e000ea610108d4689d2f6f1", null ], - [ "operator>=", "group__boundary.html#ga48fc6bd37670c164d9fcdf918d20ab9f", null ], - [ "operator>=", "group__boundary.html#gadfbbd6c86914627ffdc08397023b020a", null ], - [ "operator>=", "group__boundary.html#ga4fb2d214673569bf63a5ef97847d8bc3", null ], - [ "operator>=", "group__boundary.html#gae867939516d7fd9cbca258414a0c8377", null ], - [ "rule", "group__boundary.html#ga72b4ceb5bacec0eded2601c43a4d671a", null ], - [ "rule", "group__boundary.html#gad19735180401edb15acbdbbeb21e5a73", null ], - [ "rule", "group__boundary.html#ga1d214029f1a780b7bf6e3f23a3004c03", null ], - [ "rule", "group__boundary.html#ga56e63913f51109e05a24a7136472a975", null ], - [ "segment_index", "group__boundary.html#ga2c354f4cc03677b58c97038cd84dc465", null ], - [ "segment_index", "group__boundary.html#ga06ddc335e95479ec51e9b16d0f829bb3", null ], - [ "segment_index", "group__boundary.html#ga46a5f584d5a1a43ad4bc0fff07183fcc", null ], - [ "segment_index", "group__boundary.html#ga8187f58177fc89ef2f8f818a37111363", null ], - [ "character_any", "group__boundary.html#ga9f9e97f7d234139cabe4c4df92a6d4b5", null ], - [ "character_mask", "group__boundary.html#gad151135cfe341d3c1f63bf459f6a1f4c", null ], - [ "line_any", "group__boundary.html#ga33fb765abbab27ee07cf70bfab8f47e0", null ], - [ "line_hard", "group__boundary.html#ga04faac8129ca14e4e5a789652ee8ecab", null ], - [ "line_mask", "group__boundary.html#gad5d8f2ac695f14b58d5df277aa5939f9", null ], - [ "line_soft", "group__boundary.html#gaa6a7b6ea3c63a1101a945b82eb10ebd0", null ], - [ "sentence_any", "group__boundary.html#gae2042518b20123ec14fbf71458ec9c79", null ], - [ "sentence_mask", "group__boundary.html#gacd2a521edb550e75c624000a1089934c", null ], - [ "sentence_sep", "group__boundary.html#gaf67883341dd3d8f786e7281d40790000", null ], - [ "sentence_term", "group__boundary.html#ga3befefe67f79691c117bf5588741355b", null ], - [ "word_any", "group__boundary.html#ga3ab98808dbb1cc4a346dcc2554c9d8dc", null ], - [ "word_ideo", "group__boundary.html#ga705ab96f9e62810c8ed977c90d404ef8", null ], - [ "word_kana", "group__boundary.html#ga52d8c63e1f3f8c898c645352206a78ef", null ], - [ "word_kana_ideo", "group__boundary.html#ga5de65589628267ab7f2a51f4147d43f9", null ], - [ "word_letter", "group__boundary.html#ga8b7e6ce2fcb185845fa85a1a4c42b3c4", null ], - [ "word_letters", "group__boundary.html#gae412d31a918dc793500fed7278663047", null ], - [ "word_mask", "group__boundary.html#gad11031065617b6be9d4662d2c06afd52", null ], - [ "word_none", "group__boundary.html#ga90cf4f01b95658f659685377226677e7", null ], - [ "word_number", "group__boundary.html#gaac78a3a6b9e671e253a2591cb56a479b", null ] -]; \ No newline at end of file diff --git a/doc/html/group__codepage.html b/doc/html/group__codepage.html deleted file mode 100644 index 524f50bf..00000000 --- a/doc/html/group__codepage.html +++ /dev/null @@ -1,862 +0,0 @@ - - - - - - -Boost.Locale: Character conversion functions - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    Character conversion functions
    -
    -
    - - - - - - - - -

    -Classes

    class  boost::locale::conv::conversion_error
     The excepton that is thrown in case of conversion error. More...
     
    class  boost::locale::conv::invalid_charset_error
     This exception is thrown in case of use of unsupported or invalid character set. More...
     
    - - - -

    -Enumerations

    enum  boost::locale::conv::method_type { boost::locale::conv::skip = 0, -boost::locale::conv::stop = 1, -boost::locale::conv::default_method = skip - }
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    template<typename CharType >
    std::basic_string< CharType > boost::locale::conv::to_utf (char const *begin, char const *end, std::string const &charset, method_type how=default_method)
     
    template<typename CharType >
    std::string boost::locale::conv::from_utf (CharType const *begin, CharType const *end, std::string const &charset, method_type how=default_method)
     
    template<typename CharType >
    std::basic_string< CharType > boost::locale::conv::to_utf (char const *begin, char const *end, std::locale const &loc, method_type how=default_method)
     
    template<typename CharType >
    std::string boost::locale::conv::from_utf (CharType const *begin, CharType const *end, std::locale const &loc, method_type how=default_method)
     
    template<typename CharType >
    std::basic_string< CharType > boost::locale::conv::to_utf (std::string const &text, std::string const &charset, method_type how=default_method)
     
    template<typename CharType >
    std::string boost::locale::conv::from_utf (std::basic_string< CharType > const &text, std::string const &charset, method_type how=default_method)
     
    template<typename CharType >
    std::basic_string< CharType > boost::locale::conv::to_utf (char const *text, std::string const &charset, method_type how=default_method)
     
    template<typename CharType >
    std::string boost::locale::conv::from_utf (CharType const *text, std::string const &charset, method_type how=default_method)
     
    template<typename CharType >
    std::basic_string< CharType > boost::locale::conv::to_utf (std::string const &text, std::locale const &loc, method_type how=default_method)
     
    template<typename CharType >
    std::string boost::locale::conv::from_utf (std::basic_string< CharType > const &text, std::locale const &loc, method_type how=default_method)
     
    template<typename CharType >
    std::basic_string< CharType > boost::locale::conv::to_utf (char const *text, std::locale const &loc, method_type how=default_method)
     
    template<typename CharType >
    std::string boost::locale::conv::from_utf (CharType const *text, std::locale const &loc, method_type how=default_method)
     
    std::string boost::locale::conv::between (char const *begin, char const *end, std::string const &to_encoding, std::string const &from_encoding, method_type how=default_method)
     
    std::string boost::locale::conv::between (char const *text, std::string const &to_encoding, std::string const &from_encoding, method_type how=default_method)
     
    std::string boost::locale::conv::between (std::string const &text, std::string const &to_encoding, std::string const &from_encoding, method_type how=default_method)
     
    template<typename CharOut , typename CharIn >
    std::basic_string< CharOut > boost::locale::conv::utf_to_utf (CharIn const *begin, CharIn const *end, method_type how=default_method)
     
    template<typename CharOut , typename CharIn >
    std::basic_string< CharOut > boost::locale::conv::utf_to_utf (CharIn const *str, method_type how=default_method)
     
    template<typename CharOut , typename CharIn >
    std::basic_string< CharOut > boost::locale::conv::utf_to_utf (std::basic_string< CharIn > const &str, method_type how=default_method)
     
    -

    Detailed Description

    -

    Enumeration Type Documentation

    - -
    -
    -

    enum that defines conversion policy

    - - - - -
    Enumerator
    skip  -

    Skip illegal/unconvertable characters.

    -
    stop  -

    Stop conversion and throw conversion_error.

    -
    default_method  -

    Default method - skip.

    -
    - -
    -
    -

    Function Documentation

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    std::string boost::locale::conv::between (char const * begin,
    char const * end,
    std::string const & to_encoding,
    std::string const & from_encoding,
    method_type how = default_method 
    )
    -
    -

    Convert a text in range [begin,end) to to_encoding from from_encoding

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    std::string boost::locale::conv::between (char const * text,
    std::string const & to_encoding,
    std::string const & from_encoding,
    method_type how = default_method 
    )
    -
    -inline
    -
    -

    Convert a text to to_encoding from from_encoding

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    std::string boost::locale::conv::between (std::string const & text,
    std::string const & to_encoding,
    std::string const & from_encoding,
    method_type how = default_method 
    )
    -
    -inline
    -
    -

    Convert a text to to_encoding from from_encoding

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    std::string boost::locale::conv::from_utf (CharType const * begin,
    CharType const * end,
    std::string const & charset,
    method_type how = default_method 
    )
    -
    -

    convert UTF text in range [begin,end) to a text encoded with charset according to policy how

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    std::string boost::locale::conv::from_utf (CharType const * begin,
    CharType const * end,
    std::locale const & loc,
    method_type how = default_method 
    )
    -
    -

    convert UTF text in range [begin,end) to a text encoded according to locale loc according to policy how

    -
    Note
    throws std::bad_cast if the loc does not have info facet installed
    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - - - - - - - -
    std::string boost::locale::conv::from_utf (std::basic_string< CharType > const & text,
    std::string const & charset,
    method_type how = default_method 
    )
    -
    -

    Convert a text from charset to UTF string

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - - - - - - - -
    std::string boost::locale::conv::from_utf (CharType const * text,
    std::string const & charset,
    method_type how = default_method 
    )
    -
    -

    Convert a text from UTF to charset

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - - - - - - - -
    std::string boost::locale::conv::from_utf (std::basic_string< CharType > const & text,
    std::locale const & loc,
    method_type how = default_method 
    )
    -
    -

    Convert a text in UTF to locale encoding given by loc

    -
    Note
    throws std::bad_cast if the loc does not have info facet installed
    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - - - - - - - -
    std::string boost::locale::conv::from_utf (CharType const * text,
    std::locale const & loc,
    method_type how = default_method 
    )
    -
    -

    Convert a text in UTF to locale encoding given by loc

    -
    Note
    throws std::bad_cast if the loc does not have info facet installed
    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::conv::to_utf (char const * begin,
    char const * end,
    std::string const & charset,
    method_type how = default_method 
    )
    -
    -

    convert string to UTF string from text in range [begin,end) encoded with charset according to policy how

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::conv::to_utf (char const * begin,
    char const * end,
    std::locale const & loc,
    method_type how = default_method 
    )
    -
    -

    convert string to UTF string from text in range [begin,end) encoded according to locale loc according to policy how

    -
    Note
    throws std::bad_cast if the loc does not have info facet installed
    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::conv::to_utf (std::string const & text,
    std::string const & charset,
    method_type how = default_method 
    )
    -
    -

    convert a string text encoded with charset to UTF string

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::conv::to_utf (char const * text,
    std::string const & charset,
    method_type how = default_method 
    )
    -
    -

    Convert a text from charset to UTF string

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::conv::to_utf (std::string const & text,
    std::locale const & loc,
    method_type how = default_method 
    )
    -
    -

    Convert a text in locale encoding given by loc to UTF

    -
    Note
    throws std::bad_cast if the loc does not have info facet installed
    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::conv::to_utf (char const * text,
    std::locale const & loc,
    method_type how = default_method 
    )
    -
    -

    Convert a text in locale encoding given by loc to UTF

    -
    Note
    throws std::bad_cast if the loc does not have info facet installed
    - -
    -
    - -
    -
    -
    -template<typename CharOut , typename CharIn >
    - - - - - - - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharOut> boost::locale::conv::utf_to_utf (CharIn const * begin,
    CharIn const * end,
    method_type how = default_method 
    )
    -
    -

    Convert a Unicode text in range [begin,end) to other Unicode encoding

    - -
    -
    - -
    -
    -
    -template<typename CharOut , typename CharIn >
    - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharOut> boost::locale::conv::utf_to_utf (CharIn const * str,
    method_type how = default_method 
    )
    -
    -

    Convert a Unicode NUL terminated string str other Unicode encoding

    - -
    -
    - -
    -
    -
    -template<typename CharOut , typename CharIn >
    - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharOut> boost::locale::conv::utf_to_utf (std::basic_string< CharIn > const & str,
    method_type how = default_method 
    )
    -
    -

    Convert a Unicode string str other Unicode encoding

    - -
    -
    -
    -
    - - - - - - diff --git a/doc/html/group__codepage.js b/doc/html/group__codepage.js deleted file mode 100644 index 0b29c017..00000000 --- a/doc/html/group__codepage.js +++ /dev/null @@ -1,32 +0,0 @@ -var group__codepage = -[ - [ "conversion_error", "classboost_1_1locale_1_1conv_1_1conversion__error.html", [ - [ "conversion_error", "classboost_1_1locale_1_1conv_1_1conversion__error.html#aba6b713c35f3538d9e130d3c6cd32d49", null ] - ] ], - [ "invalid_charset_error", "classboost_1_1locale_1_1conv_1_1invalid__charset__error.html", [ - [ "invalid_charset_error", "classboost_1_1locale_1_1conv_1_1invalid__charset__error.html#ae951e3a99a115a60cc87d4d258764681", null ] - ] ], - [ "method_type", "group__codepage.html#ga8e3c5a274f57107ec5745e227c26ba84", [ - [ "skip", "group__codepage.html#gga8e3c5a274f57107ec5745e227c26ba84ae9b554a2955deddf714757788819edf9", null ], - [ "stop", "group__codepage.html#gga8e3c5a274f57107ec5745e227c26ba84aab08f9ee241c405ef40bd3cedb43b383", null ], - [ "default_method", "group__codepage.html#gga8e3c5a274f57107ec5745e227c26ba84adcdc34a57dd2a3ca917f73c13f18b559", null ] - ] ], - [ "between", "group__codepage.html#ga7eda9058b8cbac9b05886bcc894faeff", null ], - [ "between", "group__codepage.html#ga612607a8616add30cf21ceb086e664d5", null ], - [ "between", "group__codepage.html#gad7f6c33cf95749ab48174ccafddf7b62", null ], - [ "from_utf", "group__codepage.html#gaef8fb7771dce60511d081770547a4139", null ], - [ "from_utf", "group__codepage.html#ga0eee2960f0d6d15491c5b95dd3054d9a", null ], - [ "from_utf", "group__codepage.html#ga17c2c9d8659281848db73822fcc38092", null ], - [ "from_utf", "group__codepage.html#gab784637ee28adb9538b8002dadf0b273", null ], - [ "from_utf", "group__codepage.html#ga85cc81b352a88e12191926b95eb39aeb", null ], - [ "from_utf", "group__codepage.html#ga2a41ad85803d97f7e1906d5c0561eefa", null ], - [ "to_utf", "group__codepage.html#ga2ca59a735ca28c9d5103e37ef2373ca1", null ], - [ "to_utf", "group__codepage.html#ga5ae3d72f015dc847ddfd688a0a40ff66", null ], - [ "to_utf", "group__codepage.html#ga25227e4e43f6c695dac13844a94741ea", null ], - [ "to_utf", "group__codepage.html#ga2be733c3e2028aa43e4b35100bdb1322", null ], - [ "to_utf", "group__codepage.html#ga4c22a2bcb97338274752f95e2d265442", null ], - [ "to_utf", "group__codepage.html#gac298fcddef144915332f031f4565feb0", null ], - [ "utf_to_utf", "group__codepage.html#gaf0ad39959911b000706e0538ec059d44", null ], - [ "utf_to_utf", "group__codepage.html#gaa4de44e37cbe5ec4a4b79e1d9bbaf4a7", null ], - [ "utf_to_utf", "group__codepage.html#ga1951228e7f528a20e40258d73cf17f5c", null ] -]; \ No newline at end of file diff --git a/doc/html/group__collation.html b/doc/html/group__collation.html deleted file mode 100644 index 359b7399..00000000 --- a/doc/html/group__collation.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - -Boost.Locale: Collation - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    Collation
    -
    -
    - - - - - - - - - - - -

    -Classes

    class  boost::locale::collator_base
     a base class that includes collation level flags More...
     
    class  boost::locale::collator< CharType >
     Collation facet. More...
     
    struct  boost::locale::comparator< CharType, default_level >
     This class can be used in STL algorithms and containers for comparison of strings with a level other than primary. More...
     
    -

    Detailed Description

    -

    This module introduces collation related classes

    -
    -
    - - - - - - diff --git a/doc/html/group__collation.js b/doc/html/group__collation.js deleted file mode 100644 index d2251248..00000000 --- a/doc/html/group__collation.js +++ /dev/null @@ -1,34 +0,0 @@ -var group__collation = -[ - [ "collator_base", "classboost_1_1locale_1_1collator__base.html", [ - [ "level_type", "classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22", [ - [ "primary", "classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22ae57e842f398a27ee490208f5af39675b", null ], - [ "secondary", "classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22ad8e103443d69f03f00ac4b68a7181866", null ], - [ "tertiary", "classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22a3a852752e9663b7b3340c435d0cfe36a", null ], - [ "quaternary", "classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22a22ca1875fd63667fbb018df16b0aedba", null ], - [ "identical", "classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22a3c209055ff840e311581ab43013026f2", null ] - ] ] - ] ], - [ "collator", "classboost_1_1locale_1_1collator.html", [ - [ "char_type", "classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f", null ], - [ "string_type", "classboost_1_1locale_1_1collator.html#a106a3fe9e068530013c428661758733d", null ], - [ "collator", "classboost_1_1locale_1_1collator.html#a25a8b21a756756e850a7488a54610053", null ], - [ "~collator", "classboost_1_1locale_1_1collator.html#a290227d0745b79033f6ec24b5b989527", null ], - [ "compare", "classboost_1_1locale_1_1collator.html#ab90dc7bb909a71d3cd9a5e8d7b2eb80e", null ], - [ "compare", "classboost_1_1locale_1_1collator.html#a9ccdfec693cdc5a71b5adc1f083881bf", null ], - [ "do_compare", "classboost_1_1locale_1_1collator.html#ada3a683bed35789e081b710a8e9a9a07", null ], - [ "do_compare", "classboost_1_1locale_1_1collator.html#a5d04cf6c4ab84cf3eac20be402ac6bf9", null ], - [ "do_hash", "classboost_1_1locale_1_1collator.html#aa093cd4ed0b4be4a5e38f0f04a56ac0b", null ], - [ "do_hash", "classboost_1_1locale_1_1collator.html#a7748d5a6ef0d4dd149096b080938d4c4", null ], - [ "do_transform", "classboost_1_1locale_1_1collator.html#a84b5cb6ff01cf1a1330e1556a2c674d5", null ], - [ "do_transform", "classboost_1_1locale_1_1collator.html#a0ee27b7bc751b7a7fda4de1b0d896d57", null ], - [ "hash", "classboost_1_1locale_1_1collator.html#a89752e2023643f972b6cc8024340d5d4", null ], - [ "hash", "classboost_1_1locale_1_1collator.html#a76000f6cf10bfe63dd7fd10652de3f5b", null ], - [ "transform", "classboost_1_1locale_1_1collator.html#a8dc6443fb193616332ca50f207a9b189", null ], - [ "transform", "classboost_1_1locale_1_1collator.html#aa9976b4fa0fba6c5d1a1dea9b5ef02ca", null ] - ] ], - [ "comparator", "structboost_1_1locale_1_1comparator.html", [ - [ "comparator", "structboost_1_1locale_1_1comparator.html#af40ee48c6c93b6e5d91492a3e0cb96a8", null ], - [ "operator()", "structboost_1_1locale_1_1comparator.html#abd62dbc2af0eb6e6c261a7c88e09f752", null ] - ] ] -]; \ No newline at end of file diff --git a/doc/html/group__convert.html b/doc/html/group__convert.html deleted file mode 100644 index bff17e5d..00000000 --- a/doc/html/group__convert.html +++ /dev/null @@ -1,691 +0,0 @@ - - - - - - -Boost.Locale: Text Conversions - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    Text Conversions
    -
    -
    - - - - - - - - -

    -Classes

    class  boost::locale::converter_base
     This class provides base flags for text manipulation. It is used as base for converter facet. More...
     
    class  boost::locale::converter< CharType >
     The facet that implements text manipulation. More...
     
    - - - -

    -Enumerations

    enum  boost::locale::norm_type {
    -  boost::locale::norm_nfd, -boost::locale::norm_nfc, -boost::locale::norm_nfkd, -boost::locale::norm_nfkc, -
    -  boost::locale::norm_default = norm_nfc -
    - }
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    template<typename CharType >
    std::basic_string< CharType > boost::locale::normalize (std::basic_string< CharType > const &str, norm_type n=norm_default, std::locale const &loc=std::locale())
     
    template<typename CharType >
    std::basic_string< CharType > boost::locale::normalize (CharType const *str, norm_type n=norm_default, std::locale const &loc=std::locale())
     
    template<typename CharType >
    std::basic_string< CharType > boost::locale::normalize (CharType const *begin, CharType const *end, norm_type n=norm_default, std::locale const &loc=std::locale())
     
    template<typename CharType >
    std::basic_string< CharType > boost::locale::to_upper (std::basic_string< CharType > const &str, std::locale const &loc=std::locale())
     
    template<typename CharType >
    std::basic_string< CharType > boost::locale::to_upper (CharType const *str, std::locale const &loc=std::locale())
     
    template<typename CharType >
    std::basic_string< CharType > boost::locale::to_upper (CharType const *begin, CharType const *end, std::locale const &loc=std::locale())
     
    template<typename CharType >
    std::basic_string< CharType > boost::locale::to_lower (std::basic_string< CharType > const &str, std::locale const &loc=std::locale())
     
    template<typename CharType >
    std::basic_string< CharType > boost::locale::to_lower (CharType const *str, std::locale const &loc=std::locale())
     
    template<typename CharType >
    std::basic_string< CharType > boost::locale::to_lower (CharType const *begin, CharType const *end, std::locale const &loc=std::locale())
     
    template<typename CharType >
    std::basic_string< CharType > boost::locale::to_title (std::basic_string< CharType > const &str, std::locale const &loc=std::locale())
     
    template<typename CharType >
    std::basic_string< CharType > boost::locale::to_title (CharType const *str, std::locale const &loc=std::locale())
     
    template<typename CharType >
    std::basic_string< CharType > boost::locale::to_title (CharType const *begin, CharType const *end, std::locale const &loc=std::locale())
     
    template<typename CharType >
    std::basic_string< CharType > boost::locale::fold_case (std::basic_string< CharType > const &str, std::locale const &loc=std::locale())
     
    template<typename CharType >
    std::basic_string< CharType > boost::locale::fold_case (CharType const *str, std::locale const &loc=std::locale())
     
    template<typename CharType >
    std::basic_string< CharType > boost::locale::fold_case (CharType const *begin, CharType const *end, std::locale const &loc=std::locale())
     
    -

    Detailed Description

    -

    This module provides various function for string manipulation like Unicode normalization, case conversion etc.

    -

    Enumeration Type Documentation

    - -
    -
    - - - - -
    enum boost::locale::norm_type
    -
    -

    The type that defined normalization form

    - - - - - - -
    Enumerator
    norm_nfd  -

    Canonical decomposition.

    -
    norm_nfc  -

    Canonical decomposition followed by canonical composition.

    -
    norm_nfkd  -

    Compatibility decomposition.

    -
    norm_nfkc  -

    Compatibility decomposition followed by canonical composition.

    -
    norm_default  -

    Default normalization - canonical decomposition followed by canonical composition.

    -
    - -
    -
    -

    Function Documentation

    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::fold_case (std::basic_string< CharType > const & str,
    std::locale const & loc = std::locale() 
    )
    -
    -

    Fold case of a string str according to locale loc

    -
    Note
    throws std::bad_cast if loc does not have converter facet installed
    -
    Examples:
    hello.cpp, and whello.cpp.
    -
    -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::fold_case (CharType const * str,
    std::locale const & loc = std::locale() 
    )
    -
    -

    Fold case of a NUL terminated string str according to locale loc

    -
    Note
    throws std::bad_cast if loc does not have converter facet installed
    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::fold_case (CharType const * begin,
    CharType const * end,
    std::locale const & loc = std::locale() 
    )
    -
    -

    Fold case of a string in range [begin,end) according to locale loc

    -
    Note
    throws std::bad_cast if loc does not have converter facet installed
    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::normalize (std::basic_string< CharType > const & str,
    norm_type n = norm_default,
    std::locale const & loc = std::locale() 
    )
    -
    -

    Normalize Unicode string str according to normalization form n

    -

    Note: This function receives only Unicode strings, i.e.: UTF-8, UTF-16 or UTF-32. It does not take in account the locale encoding, because Unicode decomposition and composition are meaningless outside of a Unicode character set.

    -
    Note
    throws std::bad_cast if loc does not have converter facet installed
    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::normalize (CharType const * str,
    norm_type n = norm_default,
    std::locale const & loc = std::locale() 
    )
    -
    -

    Normalize NUL terminated Unicode string str according to normalization form n

    -

    Note: This function receives only Unicode strings, i.e.: UTF-8, UTF-16 or UTF-32. It does not take in account the locale encoding, because Unicode decomposition and composition are meaningless outside of a Unicode character set.

    -
    Note
    throws std::bad_cast if loc does not have converter facet installed
    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::normalize (CharType const * begin,
    CharType const * end,
    norm_type n = norm_default,
    std::locale const & loc = std::locale() 
    )
    -
    -

    Normalize Unicode string in range [begin,end) according to normalization form n

    -

    Note: This function receives only Unicode strings, i.e.: UTF-8, UTF-16 or UTF-32. It does not take in account the locale encoding, because Unicode decomposition and composition are meaningless outside of a Unicode character set.

    -
    Note
    throws std::bad_cast if loc does not have converter facet installed
    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::to_lower (std::basic_string< CharType > const & str,
    std::locale const & loc = std::locale() 
    )
    -
    -

    Convert a string str to lower case according to locale loc

    -
    Note
    throws std::bad_cast if loc does not have converter facet installed
    -
    Examples:
    conversions.cpp, hello.cpp, wconversions.cpp, and whello.cpp.
    -
    -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::to_lower (CharType const * str,
    std::locale const & loc = std::locale() 
    )
    -
    -

    Convert a NUL terminated string str to lower case according to locale loc

    -
    Note
    throws std::bad_cast if loc does not have converter facet installed
    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::to_lower (CharType const * begin,
    CharType const * end,
    std::locale const & loc = std::locale() 
    )
    -
    -

    Convert a string in range [begin,end) to lower case according to locale loc

    -
    Note
    throws std::bad_cast if loc does not have converter facet installed
    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::to_title (std::basic_string< CharType > const & str,
    std::locale const & loc = std::locale() 
    )
    -
    -

    Convert a string str to title case according to locale loc

    -
    Note
    throws std::bad_cast if loc does not have converter facet installed
    -
    Examples:
    hello.cpp, and whello.cpp.
    -
    -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::to_title (CharType const * str,
    std::locale const & loc = std::locale() 
    )
    -
    -

    Convert a NUL terminated string str to title case according to locale loc

    -
    Note
    throws std::bad_cast if loc does not have converter facet installed
    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::to_title (CharType const * begin,
    CharType const * end,
    std::locale const & loc = std::locale() 
    )
    -
    -

    Convert a string in range [begin,end) to title case according to locale loc

    -
    Note
    throws std::bad_cast if loc does not have converter facet installed
    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::to_upper (std::basic_string< CharType > const & str,
    std::locale const & loc = std::locale() 
    )
    -
    -

    Convert a string str to upper case according to locale loc

    -
    Note
    throws std::bad_cast if loc does not have converter facet installed
    -
    Examples:
    conversions.cpp, hello.cpp, wconversions.cpp, and whello.cpp.
    -
    -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::to_upper (CharType const * str,
    std::locale const & loc = std::locale() 
    )
    -
    -

    Convert a NUL terminated string str to upper case according to locale loc

    -
    Note
    throws std::bad_cast if loc does not have converter facet installed
    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::to_upper (CharType const * begin,
    CharType const * end,
    std::locale const & loc = std::locale() 
    )
    -
    -

    Convert a string in range [begin,end) to upper case according to locale loc

    -
    Note
    throws std::bad_cast if loc does not have converter facet installed
    - -
    -
    -
    -
    - - - - - - diff --git a/doc/html/group__convert.js b/doc/html/group__convert.js deleted file mode 100644 index b0e1dca9..00000000 --- a/doc/html/group__convert.js +++ /dev/null @@ -1,39 +0,0 @@ -var group__convert = -[ - [ "converter_base", "classboost_1_1locale_1_1converter__base.html", [ - [ "conversion_type", "classboost_1_1locale_1_1converter__base.html#a726bc2bbcbb6f1e550cca14163fb669b", [ - [ "normalization", "classboost_1_1locale_1_1converter__base.html#a726bc2bbcbb6f1e550cca14163fb669bae20bf7eface68062a0b9f2396833354a", null ], - [ "upper_case", "classboost_1_1locale_1_1converter__base.html#a726bc2bbcbb6f1e550cca14163fb669ba0fee54e09732910ab30856d0e34c8ad2", null ], - [ "lower_case", "classboost_1_1locale_1_1converter__base.html#a726bc2bbcbb6f1e550cca14163fb669ba2c5c38c6bc6ca01fb9e573c148ba8ebe", null ], - [ "case_folding", "classboost_1_1locale_1_1converter__base.html#a726bc2bbcbb6f1e550cca14163fb669ba91936aed5b7c3a82b4d2c2354ead03d3", null ], - [ "title_case", "classboost_1_1locale_1_1converter__base.html#a726bc2bbcbb6f1e550cca14163fb669bac136b257286085de7bd7eb4a7876dfa7", null ] - ] ] - ] ], - [ "converter", "classboost_1_1locale_1_1converter.html", [ - [ "converter", "classboost_1_1locale_1_1converter.html#aa9bd91f48f4ce7b6c270c5281c8b0313", null ], - [ "convert", "classboost_1_1locale_1_1converter.html#a85ce9bf935c59b2fdd196ed40a6a5f85", null ], - [ "id", "classboost_1_1locale_1_1converter.html#ae18f930e621fbe9848d08a91138f37e1", null ] - ] ], - [ "norm_type", "group__convert.html#ga6a595a415b83b8a0c8f14c34eb66cc9f", [ - [ "norm_nfd", "group__convert.html#gga6a595a415b83b8a0c8f14c34eb66cc9fa6648d0eabb931f2e9d258570b297e98f", null ], - [ "norm_nfc", "group__convert.html#gga6a595a415b83b8a0c8f14c34eb66cc9faf6fe7be275e5e13df415ab258105ada0", null ], - [ "norm_nfkd", "group__convert.html#gga6a595a415b83b8a0c8f14c34eb66cc9fa0fbc2ac042fc6f58af5818bfd06d5379", null ], - [ "norm_nfkc", "group__convert.html#gga6a595a415b83b8a0c8f14c34eb66cc9fa0305c1f3405ea70facf4c6a5ffa40583", null ], - [ "norm_default", "group__convert.html#gga6a595a415b83b8a0c8f14c34eb66cc9faa29173d73d9be7fefcbb18c8712465d2", null ] - ] ], - [ "fold_case", "group__convert.html#gadf59d16355babd955766deef89d470ea", null ], - [ "fold_case", "group__convert.html#ga297f148881cbfce1edd747a22e451ee6", null ], - [ "fold_case", "group__convert.html#gabcb2a619f203306eee30b03061a5cbee", null ], - [ "normalize", "group__convert.html#ga867733c9d4455aaa13a42cf67367d575", null ], - [ "normalize", "group__convert.html#gaa2e01f28fa12ea71a6318f8277f2745e", null ], - [ "normalize", "group__convert.html#ga03ee131e44c37c2191d15683cc281e5f", null ], - [ "to_lower", "group__convert.html#ga4a3eb15f42f5cbae7bdd00c9e9cac222", null ], - [ "to_lower", "group__convert.html#gaa7854d1e3ce4c854f4e1fa18703ffed2", null ], - [ "to_lower", "group__convert.html#ga4763a6d37777254390658d1e050262a5", null ], - [ "to_title", "group__convert.html#ga684efb375e060c71cd3e1799a6329f7f", null ], - [ "to_title", "group__convert.html#ga16e9258de2d6009546fb0fb07afd67b7", null ], - [ "to_title", "group__convert.html#gab2ff15b36c6f177737c7ae737eb70794", null ], - [ "to_upper", "group__convert.html#ga2ceae621801e8cf4f77c60d1e3047ae8", null ], - [ "to_upper", "group__convert.html#ga2197dbd88d8b42a5e6b2b76fb67ed07d", null ], - [ "to_upper", "group__convert.html#ga55257608f61f0bde86f7306b477c993a", null ] -]; \ No newline at end of file diff --git a/doc/html/group__date__time.html b/doc/html/group__date__time.html deleted file mode 100644 index 719d2756..00000000 --- a/doc/html/group__date__time.html +++ /dev/null @@ -1,299 +0,0 @@ - - - - - - -Boost.Locale: Date, Time, Timezone and Calendar manipulations - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    Date, Time, Timezone and Calendar manipulations
    -
    -
    - - - - - - - - -

    -Namespaces

     boost::locale::period
     Namespace that contains various types for manipulation with dates.
     
     boost::locale::time_zone
     namespace that holds functions for operating with global time zone
     
    - - - - - - - - - - - - - - - - - - - -

    -Classes

    class  boost::locale::date_time_error
     This error is thrown in case of invalid state that occurred. More...
     
    struct  boost::locale::date_time_period
     This class represents a pair of period_type and the integer values that describes its amount. For example 3 days or 4 years. More...
     
    class  boost::locale::date_time_period_set
     this class that represents a set of periods, More...
     
    class  boost::locale::calendar
     this class provides an access to general calendar information. More...
     
    class  boost::locale::date_time
     this class represents a date time and allows to perform various operation according to the locale settings. More...
     
    class  boost::locale::date_time_duration
     This class represents a period: a pair of two date_time objects. More...
     
    - - - - - - - - - - - - - -

    -Functions

    date_time_period_set boost::locale::operator+ (date_time_period_set const &a, date_time_period_set const &b)
     
    date_time_period_set boost::locale::operator- (date_time_period_set const &a, date_time_period_set const &b)
     
    template<typename CharType >
    std::basic_ostream< CharType > & boost::locale::operator<< (std::basic_ostream< CharType > &out, date_time const &t)
     
    template<typename CharType >
    std::basic_istream< CharType > & boost::locale::operator>> (std::basic_istream< CharType > &in, date_time &t)
     
    date_time_duration boost::locale::operator- (date_time const &later, date_time const &earlier)
     
    -

    Detailed Description

    -

    This module provides various calendar, timezone and date time services

    -

    Function Documentation

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    date_time_period_set boost::locale::operator+ (date_time_period_set const & a,
    date_time_period_set const & b 
    )
    -
    -inline
    -
    -

    Append two periods sets. Note this operator is not commutative

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    date_time_period_set boost::locale::operator- (date_time_period_set const & a,
    date_time_period_set const & b 
    )
    -
    -inline
    -
    -

    Append two period sets when all periods of set change their sign

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    date_time_duration boost::locale::operator- (date_time const & later,
    date_time const & earlier 
    )
    -
    -inline
    -
    -

    Calculates the difference between two dates, the left operand is a later point on time line. Returns date_time_duration object.

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - -
    std::basic_ostream<CharType>& boost::locale::operator<< (std::basic_ostream< CharType > & out,
    date_time const & t 
    )
    -
    -

    Writes date_time t to output stream out.

    -

    This function uses locale, calendar and time zone of the target stream in.

    -

    For example:

    -
    date_time now(time(0),hebrew_calendar)
    -
    cout << "Year: " << period::year(now) <<" Full Date:"<< now;
    -

    The output may be Year:5770 Full Date:Jan 1, 2010

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - -
    std::basic_istream<CharType>& boost::locale::operator>> (std::basic_istream< CharType > & in,
    date_time & t 
    )
    -
    -

    Reads date_time t from output stream in

    -

    This function uses locale, calendar and time zone of the source stream in.

    - -
    -
    -
    -
    - - - - - - diff --git a/doc/html/group__date__time.js b/doc/html/group__date__time.js deleted file mode 100644 index a8f069a6..00000000 --- a/doc/html/group__date__time.js +++ /dev/null @@ -1,109 +0,0 @@ -var group__date__time = -[ - [ "period", "namespaceboost_1_1locale_1_1period.html", null ], - [ "time_zone", "namespaceboost_1_1locale_1_1time__zone.html", null ], - [ "date_time_error", "classboost_1_1locale_1_1date__time__error.html", [ - [ "date_time_error", "classboost_1_1locale_1_1date__time__error.html#abbd57421fc4617b23ecb33c398152dc8", null ] - ] ], - [ "date_time_period", "structboost_1_1locale_1_1date__time__period.html", [ - [ "date_time_period", "structboost_1_1locale_1_1date__time__period.html#a61b11b2243098412dddd804ca7e104af", null ], - [ "operator+", "structboost_1_1locale_1_1date__time__period.html#a219fa833071824e308a45dc44384fb99", null ], - [ "operator-", "structboost_1_1locale_1_1date__time__period.html#ab3937bd69fcfeac096dceeee0f13437e", null ], - [ "type", "structboost_1_1locale_1_1date__time__period.html#aa6511600eb5264c8597f700668e9c628", null ], - [ "value", "structboost_1_1locale_1_1date__time__period.html#aec776b16ed46a22833308a4112886ca4", null ] - ] ], - [ "date_time_period_set", "classboost_1_1locale_1_1date__time__period__set.html", [ - [ "date_time_period_set", "classboost_1_1locale_1_1date__time__period__set.html#a635b8d91c4c8da99857810e42a0aff65", null ], - [ "date_time_period_set", "classboost_1_1locale_1_1date__time__period__set.html#a0966962f5da78fc06121d1455efcbbae", null ], - [ "date_time_period_set", "classboost_1_1locale_1_1date__time__period__set.html#a144842e64250343d87aaff270a9b53a0", null ], - [ "add", "classboost_1_1locale_1_1date__time__period__set.html#a0e70247c1738dbf6869e6d8c04461893", null ], - [ "operator[]", "classboost_1_1locale_1_1date__time__period__set.html#a177a4c3cb2de3b5c9b5fe5738660eba4", null ], - [ "size", "classboost_1_1locale_1_1date__time__period__set.html#a0b726bd57ce8b631de89bbf404b8df2a", null ] - ] ], - [ "calendar", "classboost_1_1locale_1_1calendar.html", [ - [ "calendar", "classboost_1_1locale_1_1calendar.html#a889746f73b03bb21f5c8459cbe9b293d", null ], - [ "calendar", "classboost_1_1locale_1_1calendar.html#aece160bf9ded6145ac5a066448085bae", null ], - [ "calendar", "classboost_1_1locale_1_1calendar.html#ad9f47a96941c041996da64384bc5879d", null ], - [ "calendar", "classboost_1_1locale_1_1calendar.html#af9538c3aab4b8eaf7229ed2d9af18328", null ], - [ "calendar", "classboost_1_1locale_1_1calendar.html#a56c55c24fbbb29fac5a18c44d3a27beb", null ], - [ "~calendar", "classboost_1_1locale_1_1calendar.html#a378ecd62f6cc64928ab308b180c98b21", null ], - [ "calendar", "classboost_1_1locale_1_1calendar.html#ad33ad15b5b032ba5234ebe5959159668", null ], - [ "first_day_of_week", "classboost_1_1locale_1_1calendar.html#a8144b98a316798476040348483fe2a6e", null ], - [ "get_locale", "classboost_1_1locale_1_1calendar.html#aaf669f493ef0226aefbb6d13db8c27d1", null ], - [ "get_time_zone", "classboost_1_1locale_1_1calendar.html#af4063debebd6cc08cf25171ce5ee220e", null ], - [ "greatest_minimum", "classboost_1_1locale_1_1calendar.html#a3c2475ee3ebb107e47701cf732532f9f", null ], - [ "is_gregorian", "classboost_1_1locale_1_1calendar.html#a657ece3d3d59b8fc3c817bc05227620b", null ], - [ "least_maximum", "classboost_1_1locale_1_1calendar.html#a4c708d889ef92487982d918a78be5eda", null ], - [ "maximum", "classboost_1_1locale_1_1calendar.html#abd88cbf4c3b9f072430f9e7d9ab2d744", null ], - [ "minimum", "classboost_1_1locale_1_1calendar.html#a6670c7319dcaec257819b7a802d2c5f7", null ], - [ "operator!=", "classboost_1_1locale_1_1calendar.html#ab0d93fe1d3bfb7b66f8ef631ede93236", null ], - [ "operator=", "classboost_1_1locale_1_1calendar.html#a7125a6c3f3d629f871ddb0f3c2f5a181", null ], - [ "operator==", "classboost_1_1locale_1_1calendar.html#a8939fba5987659b3153cb18eea9af969", null ], - [ "date_time", "classboost_1_1locale_1_1calendar.html#a7c627d823bfb1186af76ed36016cbb31", null ] - ] ], - [ "date_time", "classboost_1_1locale_1_1date__time.html", [ - [ "date_time", "classboost_1_1locale_1_1date__time.html#ae7a3b74e7512ddc4d618eb1f51c3d2b0", null ], - [ "date_time", "classboost_1_1locale_1_1date__time.html#a7d98e552f2ff8a421a5c226102ba0138", null ], - [ "date_time", "classboost_1_1locale_1_1date__time.html#a45008e76b980e7487e3d61b8372d67ae", null ], - [ "~date_time", "classboost_1_1locale_1_1date__time.html#a4865b1ef879fa0bfeecad3289370852f", null ], - [ "date_time", "classboost_1_1locale_1_1date__time.html#addfee06ea6efa5fdca252191176b5756", null ], - [ "date_time", "classboost_1_1locale_1_1date__time.html#ab806af3aee6d70057d1f8e6fbfd09216", null ], - [ "date_time", "classboost_1_1locale_1_1date__time.html#ada52e84093a2775db6e0b3c399b0b9cf", null ], - [ "date_time", "classboost_1_1locale_1_1date__time.html#abfa9db762ab227427778d8fc3c2bf73d", null ], - [ "date_time", "classboost_1_1locale_1_1date__time.html#a871745debde77a28f5fbc6e2b2a5f869", null ], - [ "difference", "classboost_1_1locale_1_1date__time.html#a36df44f891d2a39ca16f57e568b67a3d", null ], - [ "get", "classboost_1_1locale_1_1date__time.html#af6436a546d3b944238f9fa952e5e18bd", null ], - [ "is_in_daylight_saving_time", "classboost_1_1locale_1_1date__time.html#a047e6e010df55fee166dcb3c9e7d3b95", null ], - [ "maximum", "classboost_1_1locale_1_1date__time.html#adb258ce11408b62bc0f14a60a05f0752", null ], - [ "minimum", "classboost_1_1locale_1_1date__time.html#a3363a0c562300095432a17e472d2e52d", null ], - [ "operator!=", "classboost_1_1locale_1_1date__time.html#a289953d80af568f86ddf533c0b161663", null ], - [ "operator+", "classboost_1_1locale_1_1date__time.html#a0df3596add1804b1f64d363fea181fe2", null ], - [ "operator+", "classboost_1_1locale_1_1date__time.html#a4e23796608a8ef0cbd5338f21d220a73", null ], - [ "operator+", "classboost_1_1locale_1_1date__time.html#aa362fdfe044d1c56c4fe939bd3d406bc", null ], - [ "operator+=", "classboost_1_1locale_1_1date__time.html#ab3117067df65d1c33e89ab375f03d27c", null ], - [ "operator+=", "classboost_1_1locale_1_1date__time.html#a7116785ff9f8b5f403e10a24b9b4477d", null ], - [ "operator+=", "classboost_1_1locale_1_1date__time.html#a1e5c7d2a8fed92d1e71f3dda2548b637", null ], - [ "operator-", "classboost_1_1locale_1_1date__time.html#ac870c0fcba5814cd91bb9c63823e280a", null ], - [ "operator-", "classboost_1_1locale_1_1date__time.html#af83662eb6a5d2298cda9159f5277a563", null ], - [ "operator-", "classboost_1_1locale_1_1date__time.html#a464e16b35656568b21f34cb8b3e2c81a", null ], - [ "operator-=", "classboost_1_1locale_1_1date__time.html#a38468aff1a820dc1c41a2a8280120848", null ], - [ "operator-=", "classboost_1_1locale_1_1date__time.html#a6780aae474f33f0a64e7b457789d7524", null ], - [ "operator-=", "classboost_1_1locale_1_1date__time.html#ae03dfadaf23e2ff93ae3d456dd3eb05f", null ], - [ "operator/", "classboost_1_1locale_1_1date__time.html#ac2a3a8f6fdba552b19e478bb6757523e", null ], - [ "operator<", "classboost_1_1locale_1_1date__time.html#a7b27ad955eade1013a43336e2a17adec", null ], - [ "operator<<", "classboost_1_1locale_1_1date__time.html#a22d2b503e2d58c7e2983b89c69ed13bd", null ], - [ "operator<<", "classboost_1_1locale_1_1date__time.html#afc9286cc1d2ad907200a3d9ba5d91c00", null ], - [ "operator<<", "classboost_1_1locale_1_1date__time.html#a2fb78903ee3c27d320798a72bb29a0b0", null ], - [ "operator<<=", "classboost_1_1locale_1_1date__time.html#ae71279d6e8dcc984fe3703b61d545416", null ], - [ "operator<<=", "classboost_1_1locale_1_1date__time.html#aa95d61963c07fb1e39d01d099a4c281a", null ], - [ "operator<<=", "classboost_1_1locale_1_1date__time.html#a048c4e2a1967351e84006177c14ef5e2", null ], - [ "operator<=", "classboost_1_1locale_1_1date__time.html#a76c5b0bbc01bd561c25cb83f26e5f535", null ], - [ "operator=", "classboost_1_1locale_1_1date__time.html#abe5d459e7552ca13b127c682e0d9caab", null ], - [ "operator=", "classboost_1_1locale_1_1date__time.html#a2f7ccfb9e28fa3bb172be9f0446caafd", null ], - [ "operator==", "classboost_1_1locale_1_1date__time.html#a4f11ded4c5383cc3fcd3684d0aa43892", null ], - [ "operator>", "classboost_1_1locale_1_1date__time.html#a1907c677ae9b7d0736705df8ad58b3aa", null ], - [ "operator>=", "classboost_1_1locale_1_1date__time.html#a4d807fa280bbe8d88efbc9a05f4a2d7c", null ], - [ "operator>>", "classboost_1_1locale_1_1date__time.html#a3a53ba943cb5140bafbfbda3d44b4083", null ], - [ "operator>>", "classboost_1_1locale_1_1date__time.html#a50f73791a4a5b4b4a32483030d20e324", null ], - [ "operator>>", "classboost_1_1locale_1_1date__time.html#ad7132f1fb92d1703925b4d3d054c0c19", null ], - [ "operator>>=", "classboost_1_1locale_1_1date__time.html#a178faa979338310b9a92370a3618fa0e", null ], - [ "operator>>=", "classboost_1_1locale_1_1date__time.html#a4605cf04447095908cba7a1cba700b9e", null ], - [ "operator>>=", "classboost_1_1locale_1_1date__time.html#a797242365127dae7142f0a950c4e4e78", null ], - [ "set", "classboost_1_1locale_1_1date__time.html#a4c0ed3be4d5d3bb44014a2ea12927ff8", null ], - [ "swap", "classboost_1_1locale_1_1date__time.html#a704626c84b012080f5e0b73db3d080fb", null ], - [ "time", "classboost_1_1locale_1_1date__time.html#a17aa2b54462ebcf1860f8e4db9f7868e", null ], - [ "time", "classboost_1_1locale_1_1date__time.html#a71bc51cd2ef635dfb0da6c0b740dcb5f", null ] - ] ], - [ "date_time_duration", "classboost_1_1locale_1_1date__time__duration.html", [ - [ "date_time_duration", "classboost_1_1locale_1_1date__time__duration.html#ac4b0d49c998032003553e8faf0e5f2cb", null ], - [ "end", "classboost_1_1locale_1_1date__time__duration.html#a100bac2003f4e07ea498e10d0dd1f6b1", null ], - [ "get", "classboost_1_1locale_1_1date__time__duration.html#a5d1b702c281d205e1dafbb15ce85b447", null ], - [ "operator/", "classboost_1_1locale_1_1date__time__duration.html#ac1a04091cc80b98f6faf7e5e73ce5f35", null ], - [ "start", "classboost_1_1locale_1_1date__time__duration.html#afc2f075595d1774c866250d192b9db31", null ] - ] ], - [ "operator+", "group__date__time.html#gaa7e728633f76cae8fa19e76cfb5e113b", null ], - [ "operator-", "group__date__time.html#ga023333646e070abf361be3890c12560b", null ], - [ "operator-", "group__date__time.html#ga13c05afeb4ea7904b944b42f6c685022", null ], - [ "operator<<", "group__date__time.html#ga759109f4470f00ec3d91f5797db82b9b", null ], - [ "operator>>", "group__date__time.html#gaf6e30351fc67e887e37853723c228484", null ] -]; \ No newline at end of file diff --git a/doc/html/group__format.html b/doc/html/group__format.html deleted file mode 100644 index a90dd138..00000000 --- a/doc/html/group__format.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - -Boost.Locale: Format - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    Format
    -
    -
    - - - - - -

    -Classes

    class  boost::locale::basic_format< CharType >
     a printf like class that allows type-safe and locale aware message formatting More...
     
    - - - - - - - - - -

    -Typedefs

    typedef basic_format< char > boost::locale::format
     
    typedef basic_format< wchar_t > boost::locale::wformat
     
    typedef basic_format< char16_t > boost::locale::u16format
     
    typedef basic_format< char32_t > boost::locale::u32format
     
    - - - - -

    -Functions

    template<typename CharType >
    std::basic_ostream< CharType > & boost::locale::operator<< (std::basic_ostream< CharType > &out, basic_format< CharType > const &fmt)
     
    -

    Detailed Description

    -

    This module provides printf like functionality integrated into iostreams and suitable for localization

    -

    Typedef Documentation

    - -
    -
    - - - - -
    typedef basic_format<char> boost::locale::format
    -
    -

    Definition of char based format

    -
    Examples:
    calendar.cpp, and hello.cpp.
    -
    -
    -
    - -
    -
    - - - - -
    typedef basic_format<char16_t> boost::locale::u16format
    -
    -

    Definition of char16_t based format

    - -
    -
    - -
    -
    - - - - -
    typedef basic_format<char32_t> boost::locale::u32format
    -
    -

    Definition of char32_t based format

    - -
    -
    - -
    -
    - - - - -
    typedef basic_format<wchar_t> boost::locale::wformat
    -
    -

    Definition of wchar_t based format

    -
    Examples:
    whello.cpp.
    -
    -
    -
    -

    Function Documentation

    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - -
    std::basic_ostream<CharType>& boost::locale::operator<< (std::basic_ostream< CharType > & out,
    basic_format< CharType > const & fmt 
    )
    -
    -

    Write formatted message to stream.

    -

    This operator actually causes actual text formatting. It uses the locale of out stream

    - -
    -
    -
    -
    - - - - - - diff --git a/doc/html/group__format.js b/doc/html/group__format.js deleted file mode 100644 index 5890f5d4..00000000 --- a/doc/html/group__format.js +++ /dev/null @@ -1,19 +0,0 @@ -var group__format = -[ - [ "basic_format", "classboost_1_1locale_1_1basic__format.html", [ - [ "char_type", "classboost_1_1locale_1_1basic__format.html#a45c16f2e69842b8d223d240bbd6e210a", null ], - [ "message_type", "classboost_1_1locale_1_1basic__format.html#a75213e5cc9d113f6b25e72542a4841f5", null ], - [ "stream_type", "classboost_1_1locale_1_1basic__format.html#a6aba7e54f0065f2697d13ff8a859309a", null ], - [ "string_type", "classboost_1_1locale_1_1basic__format.html#a0e1263d23f67aa38b4d857031fccf973", null ], - [ "basic_format", "classboost_1_1locale_1_1basic__format.html#a4c885ae60a5b867863b79acb75feff9e", null ], - [ "basic_format", "classboost_1_1locale_1_1basic__format.html#a155e8e60061da7461bbcc958d600c190", null ], - [ "operator%", "classboost_1_1locale_1_1basic__format.html#a24de7f69a5d95fd6181d888f07fc6770", null ], - [ "str", "classboost_1_1locale_1_1basic__format.html#a6bc65d7993e3ab6ad51809ef8fb65400", null ], - [ "write", "classboost_1_1locale_1_1basic__format.html#a457c9228d13e80da3c807a51aa5ef6cd", null ] - ] ], - [ "format", "group__format.html#gad7914df7b54382c1ad7f5360676fe2e8", null ], - [ "u16format", "group__format.html#ga7e1b668f020290ebca6570b4c12a36e6", null ], - [ "u32format", "group__format.html#ga70ce1d532e859739182439f1f3321032", null ], - [ "wformat", "group__format.html#ga610f3ae827801febc962019cf82a2227", null ], - [ "operator<<", "group__format.html#ga3af8a407e83e679baaf375da5e2ba048", null ] -]; \ No newline at end of file diff --git a/doc/html/group__manipulators.html b/doc/html/group__manipulators.html deleted file mode 100644 index 2120eb75..00000000 --- a/doc/html/group__manipulators.html +++ /dev/null @@ -1,920 +0,0 @@ - - - - - - -Boost.Locale: I/O Stream manipulators - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    I/O Stream manipulators
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    std::ios_base & boost::locale::as::posix (std::ios_base &ios)
     
    std::ios_base & boost::locale::as::number (std::ios_base &ios)
     
    std::ios_base & boost::locale::as::currency (std::ios_base &ios)
     
    std::ios_base & boost::locale::as::percent (std::ios_base &ios)
     
    std::ios_base & boost::locale::as::date (std::ios_base &ios)
     
    std::ios_base & boost::locale::as::time (std::ios_base &ios)
     
    std::ios_base & boost::locale::as::datetime (std::ios_base &ios)
     
    std::ios_base & boost::locale::as::strftime (std::ios_base &ios)
     
    std::ios_base & boost::locale::as::spellout (std::ios_base &ios)
     
    std::ios_base & boost::locale::as::ordinal (std::ios_base &ios)
     
    std::ios_base & boost::locale::as::currency_default (std::ios_base &ios)
     
    std::ios_base & boost::locale::as::currency_iso (std::ios_base &ios)
     
    std::ios_base & boost::locale::as::currency_national (std::ios_base &ios)
     
    std::ios_base & boost::locale::as::time_default (std::ios_base &ios)
     
    std::ios_base & boost::locale::as::time_short (std::ios_base &ios)
     
    std::ios_base & boost::locale::as::time_medium (std::ios_base &ios)
     
    std::ios_base & boost::locale::as::time_long (std::ios_base &ios)
     
    std::ios_base & boost::locale::as::time_full (std::ios_base &ios)
     
    std::ios_base & boost::locale::as::date_default (std::ios_base &ios)
     
    std::ios_base & boost::locale::as::date_short (std::ios_base &ios)
     
    std::ios_base & boost::locale::as::date_medium (std::ios_base &ios)
     
    std::ios_base & boost::locale::as::date_long (std::ios_base &ios)
     
    std::ios_base & boost::locale::as::date_full (std::ios_base &ios)
     
    template<typename CharType >
    unspecified_type boost::locale::as::ftime (std::basic_string< CharType > const &format)
     
    template<typename CharType >
    unspecified_type boost::locale::as::ftime (CharType const *format)
     
    std::ios_base & boost::locale::as::gmt (std::ios_base &ios)
     
    std::ios_base & boost::locale::as::local_time (std::ios_base &ios)
     
    unspecified_type boost::locale::as::time_zone (char const *id)
     
    unspecified_type boost::locale::as::time_zone (std::string const &id)
     
    unspecified_type boost::locale::as::domain (std::string const &id)
     
    -

    Detailed Description

    -

    Function Documentation

    - -
    -
    - - - - - -
    - - - - - - - - -
    std::ios_base& boost::locale::as::currency (std::ios_base & ios)
    -
    -inline
    -
    -

    Format currency, number is treated like amount of money

    -
    Examples:
    hello.cpp, and whello.cpp.
    -
    -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    std::ios_base& boost::locale::as::currency_default (std::ios_base & ios)
    -
    -inline
    -
    -

    Set default currency formatting style – national, like "$"

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    std::ios_base& boost::locale::as::currency_iso (std::ios_base & ios)
    -
    -inline
    -
    -

    Set ISO currency formatting style, like "USD", (requires ICU >= 4.2)

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    std::ios_base& boost::locale::as::currency_national (std::ios_base & ios)
    -
    -inline
    -
    -

    Set national currency formatting style, like "$"

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    std::ios_base& boost::locale::as::date (std::ios_base & ios)
    -
    -inline
    -
    -

    Format a date, number is treated as POSIX time

    -
    Examples:
    hello.cpp, and whello.cpp.
    -
    -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    std::ios_base& boost::locale::as::date_default (std::ios_base & ios)
    -
    -inline
    -
    -

    set default (medium) date formatting style

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    std::ios_base& boost::locale::as::date_full (std::ios_base & ios)
    -
    -inline
    -
    -

    set full date formatting style

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    std::ios_base& boost::locale::as::date_long (std::ios_base & ios)
    -
    -inline
    -
    -

    set long date formatting style

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    std::ios_base& boost::locale::as::date_medium (std::ios_base & ios)
    -
    -inline
    -
    -

    set medium date formatting style

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    std::ios_base& boost::locale::as::date_short (std::ios_base & ios)
    -
    -inline
    -
    -

    set short date formatting style

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    std::ios_base& boost::locale::as::datetime (std::ios_base & ios)
    -
    -inline
    -
    -

    Format a date and time, number is treated as POSIX time

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    unspecified_type boost::locale::as::domain (std::string const & id)
    -
    -inline
    -
    -

    Manipulator for switching message domain in ostream,

    -
    Note
    The returned object throws std::bad_cast if the I/O stream does not have message_format facet installed
    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - -
    unspecified_type boost::locale::as::ftime (std::basic_string< CharType > const & format)
    -
    -

    Set strftime like formatting string

    -

    Please note, formatting flags are very similar but not exactly the same as flags for C function strftime. Differences: some flags as "%e" do not add blanks to fill text up to two spaces, not all flags supported.

    -

    Flags:

    -
      -
    • "%a" – Abbreviated weekday (Sun.)
    • -
    • "%A" – Full weekday (Sunday)
    • -
    • "%b" – Abbreviated month (Jan.)
    • -
    • "%B" – Full month (January)
    • -
    • "%c" – Locale date-time format. Note: prefer using "as::datetime"
    • -
    • "%d" – Day of Month [01,31]
    • -
    • "%e" – Day of Month [1,31]
    • -
    • "%h" – Same as "%b"
    • -
    • "%H" – 24 clock hour [00,23]
    • -
    • "%I" – 12 clock hour [01,12]
    • -
    • "%j" – Day of year [1,366]
    • -
    • "%m" – Month [01,12]
    • -
    • "%M" – Minute [00,59]
    • -
    • "%n" – New Line
    • -
    • "%p" – AM/PM in locale representation
    • -
    • "%r" – Time with AM/PM, same as "%I:%M:%S %p"
    • -
    • "%R" – Same as "%H:%M"
    • -
    • "%S" – Second [00,61]
    • -
    • "%t" – Tab character
    • -
    • "%T" – Same as "%H:%M:%S"
    • -
    • "%x" – Local date representation. Note: prefer using "as::date"
    • -
    • "%X" – Local time representation. Note: prefer using "as::time"
    • -
    • "%y" – Year [00,99]
    • -
    • "%Y" – 4 digits year. (2009)
    • -
    • "%Z" – Time Zone
    • -
    • "%%" – Percent symbol
    • -
    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - -
    unspecified_type boost::locale::as::ftime (CharType const * format)
    -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    std::ios_base& boost::locale::as::gmt (std::ios_base & ios)
    -
    -inline
    -
    -

    Set GMT time zone to stream

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    std::ios_base& boost::locale::as::local_time (std::ios_base & ios)
    -
    -inline
    -
    -

    Set local time zone to stream

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    std::ios_base& boost::locale::as::number (std::ios_base & ios)
    -
    -inline
    -
    -

    Format a number. Note, unlike standard number formatting, integers would be treated like real numbers when std::fixed or std::scientific manipulators were applied

    -
    Examples:
    hello.cpp, and whello.cpp.
    -
    -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    std::ios_base& boost::locale::as::ordinal (std::ios_base & ios)
    -
    -inline
    -
    -

    Write an order of the number like 4th.

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    std::ios_base& boost::locale::as::percent (std::ios_base & ios)
    -
    -inline
    -
    -

    Format percent, value 0.3 is treated as 30%.

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    std::ios_base& boost::locale::as::posix (std::ios_base & ios)
    -
    -inline
    -
    -

    Format values with "POSIX" or "C" locale. Note, if locale was created with additional non-classic locale then These numbers may be localized

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    std::ios_base& boost::locale::as::spellout (std::ios_base & ios)
    -
    -inline
    -
    -

    Spell the number, like "one hundred and ten"

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    std::ios_base& boost::locale::as::strftime (std::ios_base & ios)
    -
    -inline
    -
    -

    Create formatted date time, Please note, this manipulator only changes formatting mode, and not format itself, so you are probably looking for ftime manipulator

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    std::ios_base& boost::locale::as::time (std::ios_base & ios)
    -
    -inline
    -
    -

    Format a time, number is treated as POSIX time

    -
    Examples:
    hello.cpp, and whello.cpp.
    -
    -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    std::ios_base& boost::locale::as::time_default (std::ios_base & ios)
    -
    -inline
    -
    -

    set default (medium) time formatting style

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    std::ios_base& boost::locale::as::time_full (std::ios_base & ios)
    -
    -inline
    -
    -

    set full time formatting style

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    std::ios_base& boost::locale::as::time_long (std::ios_base & ios)
    -
    -inline
    -
    -

    set long time formatting style

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    std::ios_base& boost::locale::as::time_medium (std::ios_base & ios)
    -
    -inline
    -
    -

    set medium time formatting style

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    std::ios_base& boost::locale::as::time_short (std::ios_base & ios)
    -
    -inline
    -
    -

    set short time formatting style

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    unspecified_type boost::locale::as::time_zone (char const * id)
    -
    -inline
    -
    -

    Set time zone using id

    - -
    -
    - -
    -
    - - - - - -
    - - - - - - - - -
    unspecified_type boost::locale::as::time_zone (std::string const & id)
    -
    -inline
    -
    -

    Set time zone using id

    - -
    -
    -
    -
    - - - - - - diff --git a/doc/html/group__manipulators.js b/doc/html/group__manipulators.js deleted file mode 100644 index 664b9429..00000000 --- a/doc/html/group__manipulators.js +++ /dev/null @@ -1,33 +0,0 @@ -var group__manipulators = -[ - [ "currency", "group__manipulators.html#ga97c4997f9692834ea7b5ed3e8137d5fd", null ], - [ "currency_default", "group__manipulators.html#ga18f1cb392e5b26c12a9deaff816e7998", null ], - [ "currency_iso", "group__manipulators.html#gab8bc145e8147e45e9b9dc0ee9edd9fbe", null ], - [ "currency_national", "group__manipulators.html#ga2b1ea6b22e2c6f3a162264d9e59d3f95", null ], - [ "date", "group__manipulators.html#gae05b82e6658dc573521518fed5f5c77f", null ], - [ "date_default", "group__manipulators.html#gacb5b9243e6537a9378e2d020a4e6a57a", null ], - [ "date_full", "group__manipulators.html#gad8d6858ec18524c9a993da387c896d0e", null ], - [ "date_long", "group__manipulators.html#gac553a86e8d0606c4a6f6d75c3cb104e7", null ], - [ "date_medium", "group__manipulators.html#ga3b9dcc64afbd67883603cfa7bb67e6c4", null ], - [ "date_short", "group__manipulators.html#ga295c7b48ce2732c196df31a70660b7b9", null ], - [ "datetime", "group__manipulators.html#ga820edf843e20847a0c4ccb8da0c4acd8", null ], - [ "domain", "group__manipulators.html#gab522188e3d82f1d2898b290b9132925e", null ], - [ "ftime", "group__manipulators.html#ga84cc8985e5305ef54394e84c10223866", null ], - [ "ftime", "group__manipulators.html#gae7814e66e9b73b632c28f9cdc58592eb", null ], - [ "gmt", "group__manipulators.html#gac90c969d876305b8584def8632ae1808", null ], - [ "local_time", "group__manipulators.html#gac6cb5458543daf651cd6b48812891541", null ], - [ "number", "group__manipulators.html#gaee05db73f5525d9a010cdc3aa02f634f", null ], - [ "ordinal", "group__manipulators.html#ga50cc23779fd846809182e50345b4eb7c", null ], - [ "percent", "group__manipulators.html#ga365767c66c9c82fb646458f5eace8534", null ], - [ "posix", "group__manipulators.html#ga879b679c0a88b7af9ac059a6e8f67c0a", null ], - [ "spellout", "group__manipulators.html#gac65e6cd9619db80d60793bbd86a3bd77", null ], - [ "strftime", "group__manipulators.html#ga782b256b82922e6a5f32446787a6f7dc", null ], - [ "time", "group__manipulators.html#gae669b101cbeaed6f6d246ebdcaa8f39c", null ], - [ "time_default", "group__manipulators.html#ga0970bc4cb3a4ab8070faa04808f65052", null ], - [ "time_full", "group__manipulators.html#ga9a8bd936176e3c81dfa07748e1cbabd4", null ], - [ "time_long", "group__manipulators.html#gad6590ea48c57d53899b90d3464cf3c0b", null ], - [ "time_medium", "group__manipulators.html#ga3f3cc44eeeaffc3b90bebe7660b3e853", null ], - [ "time_short", "group__manipulators.html#gada3d88eef293c9495a3f7d756d369fd3", null ], - [ "time_zone", "group__manipulators.html#gad51fbdc634fe0c81e5183915e9eeb238", null ], - [ "time_zone", "group__manipulators.html#ga4348099506fc7c52945e639683398a20", null ] -]; \ No newline at end of file diff --git a/doc/html/group__message.html b/doc/html/group__message.html deleted file mode 100644 index 9284fea4..00000000 --- a/doc/html/group__message.html +++ /dev/null @@ -1,1526 +0,0 @@ - - - - - - -Boost.Locale: Message Formatting (translation) - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    Message Formatting (translation)
    -
    -
    - - - - -

    -Modules

     I/O Stream manipulators
     
    - - - - - - - -

    -Namespaces

     boost::locale::gnu_gettext
     This namespace holds classes that provide GNU Gettext message catalogs support.
     
     boost::locale::as
     This namespace includes all manipulators that can be used on IO streams.
     
    - - - - - - - -

    -Classes

    class  boost::locale::message_format< CharType >
     This facet provides message formatting abilities. More...
     
    class  boost::locale::basic_message< CharType >
     This class represents a message that can be converted to a specific locale message. More...
     
    - - - - - - - - - - - - - - - - - - - - - - -

    -Typedefs

    typedef CharType boost::locale::message_format< CharType >::char_type
     
    typedef std::basic_string
    -< CharType > 
    boost::locale::message_format< CharType >::string_type
     
    -typedef CharType boost::locale::basic_message< CharType >::char_type
     The character this message object is used with.
     
    -typedef std::basic_string
    -< char_type > 
    boost::locale::basic_message< CharType >::string_type
     The string type this object can be used with.
     
    -typedef message_format< char_type > boost::locale::basic_message< CharType >::facet_type
     The type of the facet the messages are fetched with.
     
    typedef basic_message< char > boost::locale::message
     
    typedef basic_message< wchar_t > boost::locale::wmessage
     
    typedef basic_message< char16_t > boost::locale::u16message
     
    typedef basic_message< char32_t > boost::locale::u32message
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

     boost::locale::message_format< CharType >::message_format (size_t refs=0)
     
    virtual char_type const * boost::locale::message_format< CharType >::get (int domain_id, char_type const *context, char_type const *id) const =0
     
    virtual char_type const * boost::locale::message_format< CharType >::get (int domain_id, char_type const *context, char_type const *single_id, int n) const =0
     
    virtual int boost::locale::message_format< CharType >::domain (std::string const &domain) const =0
     
    virtual char_type const * boost::locale::message_format< CharType >::convert (char_type const *msg, string_type &buffer) const =0
     
     boost::locale::basic_message< CharType >::basic_message ()
     
     boost::locale::basic_message< CharType >::basic_message (char_type const *id)
     
     boost::locale::basic_message< CharType >::basic_message (char_type const *single, char_type const *plural, int n)
     
     boost::locale::basic_message< CharType >::basic_message (char_type const *context, char_type const *id)
     
     boost::locale::basic_message< CharType >::basic_message (char_type const *context, char_type const *single, char_type const *plural, int n)
     
     boost::locale::basic_message< CharType >::basic_message (string_type const &id)
     
     boost::locale::basic_message< CharType >::basic_message (string_type const &single, string_type const &plural, int number)
     
     boost::locale::basic_message< CharType >::basic_message (string_type const &context, string_type const &id)
     
     boost::locale::basic_message< CharType >::basic_message (string_type const &context, string_type const &single, string_type const &plural, int number)
     
     boost::locale::basic_message< CharType >::basic_message (basic_message const &other)
     
    basic_message const & boost::locale::basic_message< CharType >::operator= (basic_message const &other)
     
    void boost::locale::basic_message< CharType >::swap (basic_message &other)
     
     boost::locale::basic_message< CharType >::operator string_type () const
     
    string_type boost::locale::basic_message< CharType >::str () const
     
    string_type boost::locale::basic_message< CharType >::str (std::locale const &locale) const
     
    string_type boost::locale::basic_message< CharType >::str (std::locale const &locale, std::string const &domain_id) const
     
    string_type boost::locale::basic_message< CharType >::str (std::string const &domain_id) const
     
    string_type boost::locale::basic_message< CharType >::str (std::locale const &loc, int id) const
     
    void boost::locale::basic_message< CharType >::write (std::basic_ostream< char_type > &out) const
     
    template<typename CharType >
    std::basic_ostream< CharType > & boost::locale::operator<< (std::basic_ostream< CharType > &out, basic_message< CharType > const &msg)
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Indirect message translation function family

    -
    -template<typename CharType >
    basic_message< CharType > boost::locale::translate (CharType const *msg)
     Translate a message, msg is not copied.
     
    -template<typename CharType >
    basic_message< CharType > boost::locale::translate (CharType const *context, CharType const *msg)
     Translate a message in context, msg and context are not copied.
     
    -template<typename CharType >
    basic_message< CharType > boost::locale::translate (CharType const *single, CharType const *plural, int n)
     Translate a plural message form, single and plural are not copied.
     
    -template<typename CharType >
    basic_message< CharType > boost::locale::translate (CharType const *context, CharType const *single, CharType const *plural, int n)
     Translate a plural message from in constext, context, single and plural are not copied.
     
    -template<typename CharType >
    basic_message< CharType > boost::locale::translate (std::basic_string< CharType > const &msg)
     Translate a message, msg is copied.
     
    -template<typename CharType >
    basic_message< CharType > boost::locale::translate (std::basic_string< CharType > const &context, std::basic_string< CharType > const &msg)
     Translate a message in context,context and msg is copied.
     
    -template<typename CharType >
    basic_message< CharType > boost::locale::translate (std::basic_string< CharType > const &context, std::basic_string< CharType > const &single, std::basic_string< CharType > const &plural, int n)
     Translate a plural message form in constext, context, single and plural are copied.
     
    -template<typename CharType >
    basic_message< CharType > boost::locale::translate (std::basic_string< CharType > const &single, std::basic_string< CharType > const &plural, int n)
     Translate a plural message form, single and plural are copied.
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Direct message translation functions family

    -
    template<typename CharType >
    std::basic_string< CharType > boost::locale::gettext (CharType const *id, std::locale const &loc=std::locale())
     
    template<typename CharType >
    std::basic_string< CharType > boost::locale::ngettext (CharType const *s, CharType const *p, int n, std::locale const &loc=std::locale())
     
    template<typename CharType >
    std::basic_string< CharType > boost::locale::dgettext (char const *domain, CharType const *id, std::locale const &loc=std::locale())
     
    template<typename CharType >
    std::basic_string< CharType > boost::locale::dngettext (char const *domain, CharType const *s, CharType const *p, int n, std::locale const &loc=std::locale())
     
    template<typename CharType >
    std::basic_string< CharType > boost::locale::pgettext (CharType const *context, CharType const *id, std::locale const &loc=std::locale())
     
    template<typename CharType >
    std::basic_string< CharType > boost::locale::npgettext (CharType const *context, CharType const *s, CharType const *p, int n, std::locale const &loc=std::locale())
     
    template<typename CharType >
    std::basic_string< CharType > boost::locale::dpgettext (char const *domain, CharType const *context, CharType const *id, std::locale const &loc=std::locale())
     
    template<typename CharType >
    std::basic_string< CharType > boost::locale::dnpgettext (char const *domain, CharType const *context, CharType const *s, CharType const *p, int n, std::locale const &loc=std::locale())
     
    -

    Detailed Description

    -

    This module provides message translation functionality, i.e. allow your application to speak native language

    -

    Typedef Documentation

    - -
    -
    -
    -template<typename CharType>
    - - - - -
    typedef CharType boost::locale::message_format< CharType >::char_type
    -
    -

    Character type

    - -
    -
    - -
    -
    - - - - -
    typedef basic_message<char> boost::locale::message
    -
    -

    Convenience typedef for char

    - -
    -
    - -
    -
    -
    -template<typename CharType>
    - - - - -
    typedef std::basic_string<CharType> boost::locale::message_format< CharType >::string_type
    -
    -

    String type

    - -
    -
    - -
    -
    - - - - -
    typedef basic_message<char16_t> boost::locale::u16message
    -
    -

    Convenience typedef for char16_t

    - -
    -
    - -
    -
    - - - - -
    typedef basic_message<char32_t> boost::locale::u32message
    -
    -

    Convenience typedef for char32_t

    - -
    -
    - -
    -
    - - - - -
    typedef basic_message<wchar_t> boost::locale::wmessage
    -
    -

    Convenience typedef for wchar_t

    - -
    -
    -

    Function Documentation

    - -
    -
    -
    -template<typename CharType>
    - - - - - -
    - - - - - - - -
    boost::locale::basic_message< CharType >::basic_message ()
    -
    -inline
    -
    -

    Create default empty message

    - -
    -
    - -
    -
    -
    -template<typename CharType>
    - - - - - -
    - - - - - - - - -
    boost::locale::basic_message< CharType >::basic_message (char_type const * id)
    -
    -inlineexplicit
    -
    -

    Create a simple message from 0 terminated string. The string should exist until the message is destroyed. Generally useful with static constant strings

    - -
    -
    - -
    -
    -
    -template<typename CharType>
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    boost::locale::basic_message< CharType >::basic_message (char_type const * single,
    char_type const * plural,
    int n 
    )
    -
    -inlineexplicit
    -
    -

    Create a simple plural form message from 0 terminated strings. The strings should exist until the message is destroyed. Generally useful with static constant strings.

    -

    n is the number, single and plural are singular and plural forms of the message

    - -
    -
    - -
    -
    -
    -template<typename CharType>
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    boost::locale::basic_message< CharType >::basic_message (char_type const * context,
    char_type const * id 
    )
    -
    -inlineexplicit
    -
    -

    Create a simple message from 0 terminated strings, with context information. The string should exist until the message is destroyed. Generally useful with static constant strings

    - -
    -
    - -
    -
    -
    -template<typename CharType>
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    boost::locale::basic_message< CharType >::basic_message (char_type const * context,
    char_type const * single,
    char_type const * plural,
    int n 
    )
    -
    -inlineexplicit
    -
    -

    Create a simple plural form message from 0 terminated strings, with context. The strings should exist until the message is destroyed. Generally useful with static constant strings.

    -

    n is the number, single and plural are singular and plural forms of the message

    - -
    -
    - -
    -
    -
    -template<typename CharType>
    - - - - - -
    - - - - - - - - -
    boost::locale::basic_message< CharType >::basic_message (string_type const & id)
    -
    -inlineexplicit
    -
    -

    Create a simple message from a string.

    - -
    -
    - -
    -
    -
    -template<typename CharType>
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    boost::locale::basic_message< CharType >::basic_message (string_type const & single,
    string_type const & plural,
    int number 
    )
    -
    -inlineexplicit
    -
    -

    Create a simple plural form message from strings.

    -

    n is the number, single and plural are single and plural forms of the message

    - -
    -
    - -
    -
    -
    -template<typename CharType>
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    boost::locale::basic_message< CharType >::basic_message (string_type const & context,
    string_type const & id 
    )
    -
    -inlineexplicit
    -
    -

    Create a simple message from a string with context.

    - -
    -
    - -
    -
    -
    -template<typename CharType>
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    boost::locale::basic_message< CharType >::basic_message (string_type const & context,
    string_type const & single,
    string_type const & plural,
    int number 
    )
    -
    -inlineexplicit
    -
    -

    Create a simple plural form message from strings.

    -

    n is the number, single and plural are single and plural forms of the message

    - -
    -
    - -
    -
    -
    -template<typename CharType>
    - - - - - -
    - - - - - - - - -
    boost::locale::basic_message< CharType >::basic_message (basic_message< CharType > const & other)
    -
    -inline
    -
    -

    Copy an object

    - -
    -
    - -
    -
    -
    -template<typename CharType>
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    virtual char_type const* boost::locale::message_format< CharType >::convert (char_type const * msg,
    string_typebuffer 
    ) const
    -
    -pure virtual
    -
    -

    Convert the string msg to target locale's encoding. If msg is already in target encoding it would be returned otherwise the converted string is stored in temporary buffer and buffer.c_str() is returned.

    -

    Note: for char_type that is char16_t, char32_t and wchar_t it is no-op, returns msg

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::dgettext (char const * domain,
    CharType const * id,
    std::locale const & loc = std::locale() 
    )
    -
    -

    Translate message id according to locale loc in domain domain

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::dngettext (char const * domain,
    CharType const * s,
    CharType const * p,
    int n,
    std::locale const & loc = std::locale() 
    )
    -
    -

    Translate plural form according to locale loc in domain domain

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::dnpgettext (char const * domain,
    CharType const * context,
    CharType const * s,
    CharType const * p,
    int n,
    std::locale const & loc = std::locale() 
    )
    -
    -

    Translate plural form according to locale loc in domain domain in context context

    - -
    -
    - -
    -
    -
    -template<typename CharType>
    - - - - - -
    - - - - - - - - -
    virtual int boost::locale::message_format< CharType >::domain (std::string const & domain) const
    -
    -pure virtual
    -
    -

    Convert a string that defines domain to the integer id used by get functions

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::dpgettext (char const * domain,
    CharType const * context,
    CharType const * id,
    std::locale const & loc = std::locale() 
    )
    -
    -

    Translate message id according to locale loc in domain domain in context context

    - -
    -
    - -
    -
    -
    -template<typename CharType>
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    virtual char_type const* boost::locale::message_format< CharType >::get (int domain_id,
    char_type const * context,
    char_type const * id 
    ) const
    -
    -pure virtual
    -
    -

    This function returns a pointer to the string for a message defined by a context and identification string id. Both create a single key for message lookup in a domain defined by domain_id.

    -

    If context is NULL it is not considered to be a part of the key

    -

    If a translated string is found, it is returned, otherwise NULL is returned

    - -
    -
    - -
    -
    -
    -template<typename CharType>
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    virtual char_type const* boost::locale::message_format< CharType >::get (int domain_id,
    char_type const * context,
    char_type const * single_id,
    int n 
    ) const
    -
    -pure virtual
    -
    -

    This function returns a pointer to the string for a plural message defined by a context and identification string single_id.

    -

    If context is NULL it is not considered to be a part of the key

    -

    Both create a single key for message lookup in a domain defined domain_id. n is used to pick the correct translation string for a specific number.

    -

    If a translated string is found, it is returned, otherwise NULL is returned

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::gettext (CharType const * id,
    std::locale const & loc = std::locale() 
    )
    -
    -

    Translate message id according to locale loc

    - -
    -
    - -
    -
    -
    -template<typename CharType>
    - - - - - -
    - - - - - - - - -
    boost::locale::message_format< CharType >::message_format (size_t refs = 0)
    -
    -inline
    -
    -

    Default constructor

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::ngettext (CharType const * s,
    CharType const * p,
    int n,
    std::locale const & loc = std::locale() 
    )
    -
    -

    Translate plural form according to locale loc

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::npgettext (CharType const * context,
    CharType const * s,
    CharType const * p,
    int n,
    std::locale const & loc = std::locale() 
    )
    -
    -

    Translate plural form according to locale loc in context context

    - -
    -
    - -
    -
    -
    -template<typename CharType>
    - - - - - -
    - - - - - - - -
    boost::locale::basic_message< CharType >::operator string_type () const
    -
    -inline
    -
    -

    Message class can be explicitly converted to string class

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - -
    std::basic_ostream<CharType>& boost::locale::operator<< (std::basic_ostream< CharType > & out,
    basic_message< CharType > const & msg 
    )
    -
    -

    Translate message msg and write it to stream

    - -
    -
    - -
    -
    -
    -template<typename CharType>
    - - - - - -
    - - - - - - - - -
    basic_message const& boost::locale::basic_message< CharType >::operator= (basic_message< CharType > const & other)
    -
    -inline
    -
    -

    Assign other message object to this one

    - -
    -
    - -
    -
    -
    -template<typename CharType >
    - - - - - - - - - - - - - - - - - - - - - - - - -
    std::basic_string<CharType> boost::locale::pgettext (CharType const * context,
    CharType const * id,
    std::locale const & loc = std::locale() 
    )
    -
    -

    Translate message id according to locale loc in context context

    - -
    -
    - -
    -
    -
    -template<typename CharType>
    - - - - - -
    - - - - - - - -
    string_type boost::locale::basic_message< CharType >::str () const
    -
    -inline
    -
    -

    Translate message to a string in the default global locale, using default domain

    - -
    -
    - -
    -
    -
    -template<typename CharType>
    - - - - - -
    - - - - - - - - -
    string_type boost::locale::basic_message< CharType >::str (std::locale const & locale) const
    -
    -inline
    -
    -

    Translate message to a string in the locale locale, using default domain

    - -
    -
    - -
    -
    -
    -template<typename CharType>
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    string_type boost::locale::basic_message< CharType >::str (std::locale const & locale,
    std::string const & domain_id 
    ) const
    -
    -inline
    -
    -

    Translate message to a string using locale locale and message domain domain_id

    - -
    -
    - -
    -
    -
    -template<typename CharType>
    - - - - - -
    - - - - - - - - -
    string_type boost::locale::basic_message< CharType >::str (std::string const & domain_id) const
    -
    -inline
    -
    -

    Translate message to a string using the default locale and message domain domain_id

    - -
    -
    - -
    -
    -
    -template<typename CharType>
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    string_type boost::locale::basic_message< CharType >::str (std::locale const & loc,
    int id 
    ) const
    -
    -inline
    -
    -

    Translate message to a string using locale loc and message domain index id

    - -
    -
    - -
    -
    -
    -template<typename CharType>
    - - - - - -
    - - - - - - - - -
    void boost::locale::basic_message< CharType >::swap (basic_message< CharType > & other)
    -
    -inline
    -
    -

    Swap two message objects

    - -
    -
    - -
    -
    -
    -template<typename CharType>
    - - - - - -
    - - - - - - - - -
    void boost::locale::basic_message< CharType >::write (std::basic_ostream< char_type > & out) const
    -
    -inline
    -
    -

    Translate message and write to stream out, using imbued locale and domain set to the stream

    - -
    -
    -
    -
    - - - - - - diff --git a/doc/html/group__message.js b/doc/html/group__message.js deleted file mode 100644 index 1643330a..00000000 --- a/doc/html/group__message.js +++ /dev/null @@ -1,90 +0,0 @@ -var group__message = -[ - [ "I/O Stream manipulators", "group__manipulators.html", "group__manipulators" ], - [ "gnu_gettext", "namespaceboost_1_1locale_1_1gnu__gettext.html", null ], - [ "as", "namespaceboost_1_1locale_1_1as.html", null ], - [ "message_format", "classboost_1_1locale_1_1message__format.html", [ - [ "char_type", "group__message.html#ga83f473295edf14b9e1ae1476b81231bc", null ], - [ "string_type", "group__message.html#gaaa932705310ce196fccc9d672b25518f", null ], - [ "message_format", "group__message.html#gafa681d0df94a35f9d75c16dea099d03e", null ], - [ "~message_format", "group__message.html#ga13350b28d416a59a92eddd22f68e57fc", null ], - [ "convert", "group__message.html#ga3f2c9d7f9a363efa607738083a986251", null ], - [ "domain", "group__message.html#ga73e25178ba9ef91ebe1df0aade4d8ae6", null ], - [ "get", "group__message.html#ga4f65e4e1c3995eb09dd8f8f0e150a012", null ], - [ "get", "group__message.html#gabb35b8a77bca9d28c5d5c266b66fe291", null ] - ] ], - [ "basic_message", "classboost_1_1locale_1_1basic__message.html", [ - [ "char_type", "group__message.html#gaa5d8dcf9d7aa01abbe73c841299345db", null ], - [ "facet_type", "group__message.html#gaa63527cb368d0bcd4cb0809138c927df", null ], - [ "string_type", "group__message.html#ga529423e08fc9a8ca9ceef5c56181c6d3", null ], - [ "basic_message", "group__message.html#ga33bdf7fbb164a96a8685b5747afc2b45", null ], - [ "basic_message", "group__message.html#gae32d7f89d5f268e8d6bae662d8008bae", null ], - [ "basic_message", "group__message.html#ga40bf56415a235f13ee666d51f645f280", null ], - [ "basic_message", "group__message.html#ga4d78f8f45467984d7244e2ddbb9e0f6e", null ], - [ "basic_message", "group__message.html#gabf9afe77f0254397389289c386bf8a73", null ], - [ "basic_message", "group__message.html#gabbb4365d621a33442ae34ac7c17a9d74", null ], - [ "basic_message", "group__message.html#ga380f3a258b3b28929bbf01f4e622e71a", null ], - [ "basic_message", "group__message.html#ga8c2fab962e10a46ea85f0188d08e499d", null ], - [ "basic_message", "group__message.html#gaf8ba10b7b1d45e6c78b84d77e8175d5d", null ], - [ "basic_message", "group__message.html#gae6ed9dded4ab78ff28e994b48c766c84", null ], - [ "operator string_type", "group__message.html#ga8da81038939b85ca248cba50f1deacf1", null ], - [ "operator=", "group__message.html#gae0e786e45ef32cf73efd8495cae45aed", null ], - [ "str", "group__message.html#ga11c5f400e03e0b16b9a60bd3fae3f168", null ], - [ "str", "group__message.html#ga26c6489f8269096f835abfb268498fdd", null ], - [ "str", "group__message.html#gaa907a1d3f43fe59cea938e1606f004ee", null ], - [ "str", "group__message.html#ga2d2ca0fe119e4ce4766fd3d42b549314", null ], - [ "str", "group__message.html#gaa51c0f65363d8d1cee83bb07fe45ced5", null ], - [ "swap", "group__message.html#gac204b563c7c9bd86e5555f129350f0e3", null ], - [ "write", "group__message.html#ga4dd81f4d40c4e8871bb1bf02bbc8e968", null ] - ] ], - [ "char_type", "group__message.html#ga83f473295edf14b9e1ae1476b81231bc", null ], - [ "char_type", "group__message.html#gaa5d8dcf9d7aa01abbe73c841299345db", null ], - [ "facet_type", "group__message.html#gaa63527cb368d0bcd4cb0809138c927df", null ], - [ "message", "group__message.html#ga556e3e7696302902b2242a7a94516dee", null ], - [ "string_type", "group__message.html#gaaa932705310ce196fccc9d672b25518f", null ], - [ "string_type", "group__message.html#ga529423e08fc9a8ca9ceef5c56181c6d3", null ], - [ "u16message", "group__message.html#ga43ddf342eec2ab9145d04727f8161e1c", null ], - [ "u32message", "group__message.html#ga6c0b40121a07c13de9e712845b43468f", null ], - [ "wmessage", "group__message.html#gafea131aa123d666905076f34b77326a9", null ], - [ "basic_message", "group__message.html#ga33bdf7fbb164a96a8685b5747afc2b45", null ], - [ "basic_message", "group__message.html#gae32d7f89d5f268e8d6bae662d8008bae", null ], - [ "basic_message", "group__message.html#ga40bf56415a235f13ee666d51f645f280", null ], - [ "basic_message", "group__message.html#ga4d78f8f45467984d7244e2ddbb9e0f6e", null ], - [ "basic_message", "group__message.html#gabf9afe77f0254397389289c386bf8a73", null ], - [ "basic_message", "group__message.html#gabbb4365d621a33442ae34ac7c17a9d74", null ], - [ "basic_message", "group__message.html#ga380f3a258b3b28929bbf01f4e622e71a", null ], - [ "basic_message", "group__message.html#ga8c2fab962e10a46ea85f0188d08e499d", null ], - [ "basic_message", "group__message.html#gaf8ba10b7b1d45e6c78b84d77e8175d5d", null ], - [ "basic_message", "group__message.html#gae6ed9dded4ab78ff28e994b48c766c84", null ], - [ "convert", "group__message.html#ga3f2c9d7f9a363efa607738083a986251", null ], - [ "dgettext", "group__message.html#ga0c4c54c5562ecc56396ef1c53582c799", null ], - [ "dngettext", "group__message.html#ga90b0cac98c7d6cd0e5157c10ba15ea29", null ], - [ "dnpgettext", "group__message.html#gae017bbb838e35f1e9b4864e822d8f5f6", null ], - [ "domain", "group__message.html#ga73e25178ba9ef91ebe1df0aade4d8ae6", null ], - [ "dpgettext", "group__message.html#ga0f9df82da4f38d900500a284cf1ab18f", null ], - [ "get", "group__message.html#ga4f65e4e1c3995eb09dd8f8f0e150a012", null ], - [ "get", "group__message.html#gabb35b8a77bca9d28c5d5c266b66fe291", null ], - [ "gettext", "group__message.html#ga1121f0001ff0f3b9455390b6412c6a2c", null ], - [ "message_format", "group__message.html#gafa681d0df94a35f9d75c16dea099d03e", null ], - [ "ngettext", "group__message.html#gaab79a005dda921603eead4839c116c52", null ], - [ "npgettext", "group__message.html#ga5023a270956a2febe1cd86c717d570a7", null ], - [ "operator string_type", "group__message.html#ga8da81038939b85ca248cba50f1deacf1", null ], - [ "operator<<", "group__message.html#ga6989a96196696d891accb078788e2a6b", null ], - [ "operator=", "group__message.html#gae0e786e45ef32cf73efd8495cae45aed", null ], - [ "pgettext", "group__message.html#gab2362c5a15141d3d58dbf731e6ef6bad", null ], - [ "str", "group__message.html#ga11c5f400e03e0b16b9a60bd3fae3f168", null ], - [ "str", "group__message.html#ga26c6489f8269096f835abfb268498fdd", null ], - [ "str", "group__message.html#gaa907a1d3f43fe59cea938e1606f004ee", null ], - [ "str", "group__message.html#ga2d2ca0fe119e4ce4766fd3d42b549314", null ], - [ "str", "group__message.html#gaa51c0f65363d8d1cee83bb07fe45ced5", null ], - [ "swap", "group__message.html#gac204b563c7c9bd86e5555f129350f0e3", null ], - [ "translate", "group__message.html#ga58e9599005608845d2b022d499dc97f6", null ], - [ "translate", "group__message.html#ga5fb25c892b2487d437c53cf68836d204", null ], - [ "translate", "group__message.html#ga4f0b199ac8500821ab1106a59f565fb3", null ], - [ "translate", "group__message.html#ga46f884a060b76ce4f71bf66605bc6546", null ], - [ "translate", "group__message.html#ga8cd3b2dc8d53c6bd05e5f1fc059882d4", null ], - [ "translate", "group__message.html#ga1dd13eea287051c834bee6bedc38e798", null ], - [ "translate", "group__message.html#ga4703ec0c6627f9ef55f3ffe2968973f8", null ], - [ "translate", "group__message.html#gab1ccc4a7a60200be76d4a4bf3f8e2217", null ], - [ "write", "group__message.html#ga4dd81f4d40c4e8871bb1bf02bbc8e968", null ] -]; \ No newline at end of file diff --git a/doc/html/hello_8cpp-example.html b/doc/html/hello_8cpp-example.html deleted file mode 100644 index 7ec92dcb..00000000 --- a/doc/html/hello_8cpp-example.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - -Boost.Locale: hello.cpp - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    hello.cpp
    -
    -
    -

    Basic example of using various functions provided by this library

    -
    //
    -
    // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
    -
    //
    -
    // Distributed under the Boost Software License, Version 1.0. (See
    -
    // accompanying file LICENSE_1_0.txt or copy at
    -
    // http://www.boost.org/LICENSE_1_0.txt)
    -
    //
    -
    #include <boost/locale.hpp>
    -
    #include <iostream>
    -
    -
    #include <ctime>
    -
    -
    int main()
    -
    {
    -
    using namespace boost::locale;
    -
    using namespace std;
    -
    generator gen;
    -
    locale loc=gen("");
    -
    // Create system default locale
    -
    -
    locale::global(loc);
    -
    // Make it system global
    -
    -
    cout.imbue(loc);
    -
    // Set as default locale for output
    -
    -
    cout <<format("Today {1,date} at {1,time} we had run our first localization example") % time(0)
    -
    <<endl;
    -
    -
    cout<<"This is how we show numbers in this locale "<<as::number << 103.34 <<endl;
    -
    cout<<"This is how we show currency in this locale "<<as::currency << 103.34 <<endl;
    -
    cout<<"This is typical date in the locale "<<as::date << std::time(0) <<endl;
    -
    cout<<"This is typical time in the locale "<<as::time << std::time(0) <<endl;
    -
    cout<<"This is upper case "<<to_upper("Hello World!")<<endl;
    -
    cout<<"This is lower case "<<to_lower("Hello World!")<<endl;
    -
    cout<<"This is title case "<<to_title("Hello World!")<<endl;
    -
    cout<<"This is fold case "<<fold_case("Hello World!")<<endl;
    -
    -
    }
    -
    -
    // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
    -
    -
    - - - - - - diff --git a/doc/html/hierarchy.html b/doc/html/hierarchy.html deleted file mode 100644 index c71b6f94..00000000 --- a/doc/html/hierarchy.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - -Boost.Locale: Class Hierarchy - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    Class Hierarchy
    -
    -
    -
    This inheritance list is sorted roughly, but not completely, alphabetically:
    -
    [detail level 12]
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    oCboost::locale::abstract_calendar
    oCboost::locale::util::base_converterThis class represent a simple stateless converter from UCS-4 and to UCS-4 for each single code point
    oCbase_message_format
    |\Cboost::locale::message_format< CharType >This facet provides message formatting abilities
    oCboost::locale::basic_format< CharType >Printf like class that allows type-safe and locale aware message formatting
    oCboost::locale::basic_message< CharType >This class represents a message that can be converted to a specific locale message
    oCboost::locale::basic_message< char_type >
    oCboost::locale::boundary::boundary_point< IteratorType >This class represents a boundary point in the text
    oCboost::locale::boundary::boundary_point_index< BaseIterator >This class holds an index of boundary points and allows iterating over them
    oCboost::locale::boundary::break_infoThis structure is used for representing boundary point that follows the offset
    oCboost::locale::calendarThis class provides an access to general calendar information
    oCcodecvt
    |oCboost::locale::generic_codecvt< CharType, CodecvtImpl, 1 >
    |oCboost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >UTF-16 to/from UTF-8 codecvt facet to use with char16_t or wchar_t on Windows
    |\Cboost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >UTF-32 to/from UTF-8 codecvt facet to use with char32_t or wchar_t on POSIX platforms
    oCcollate
    |\Cboost::locale::collator< CharType >Collation facet
    oCboost::locale::collator_baseBase class that includes collation level flags
    |\Cboost::locale::collator< CharType >Collation facet
    oCboost::locale::comparator< CharType, default_level >This class can be used in STL algorithms and containers for comparison of strings with a level other than primary
    oCboost::locale::converter_baseThis class provides base flags for text manipulation. It is used as base for converter facet
    |\Cboost::locale::converter< CharType >The facet that implements text manipulation
    oCboost::locale::date_timeThis class represents a date time and allows to perform various operation according to the locale settings
    oCboost::locale::date_time_durationThis class represents a period: a pair of two date_time objects
    oCboost::locale::date_time_periodThis class represents a pair of period_type and the integer values that describes its amount. For example 3 days or 4 years
    oCboost::locale::date_time_period_setThis class that represents a set of periods,
    oCboost::locale::gnu_gettext::messages_info::domainThis type represents GNU Gettext domain name for the messages
    oCfacet
    |oCboost::locale::boundary::boundary_indexing< CharType >This facet generates an index for boundary analysis for a given text
    |oCboost::locale::calendar_facetFacet that generates calendar for specific locale
    |oCboost::locale::converter< CharType >The facet that implements text manipulation
    |\Cboost::locale::infoFacet that holds general information about locale
    oCboost::locale::generatorMajor class used for locale generation
    oCboost::locale::generic_codecvt< CharType, CodecvtImpl, CharSize >Geneneric generic codecvt facet, various stateless encodings to UTF-16 and UTF-32 using wchar_t, char32_t and char16_t
    oCboost::locale::generic_codecvt< CharType, utf8_codecvt< CharType > >
    |\Cboost::locale::utf8_codecvt< CharType >Geneneric utf8 codecvt facet, it allows to convert UTF-8 strings to UTF-16 and UTF-32 using wchar_t, char32_t and char16_t
    oCboost::locale::generic_codecvt_baseA base class that used to define constants for generic_codecvt
    |oCboost::locale::generic_codecvt< CharType, CodecvtImpl, 1 >
    |oCboost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >UTF-16 to/from UTF-8 codecvt facet to use with char16_t or wchar_t on Windows
    |\Cboost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >UTF-32 to/from UTF-8 codecvt facet to use with char32_t or wchar_t on POSIX platforms
    oCboost::locale::hold_ptr< T >Smart pointer similar to std::auto_ptr but it is non-copyable and the underlying object has the same constness as the pointer itself (unlike an ordinary pointer)
    oCboost::locale::hold_ptr< boost::locale::abstract_calendar >
    oCboost::locale::ios_infoThis class holds an external data - beyond existing fmtflags that std::ios_base holds
    oCboost::locale::localization_backendThis class represents a localization backend that can be used for localizing your application
    oCboost::locale::localization_backend_managerLocalization backend manager is a class that holds various backend and allows creation of their combination or selection
    oCboost::locale::gnu_gettext::messages_infoThis structure holds all information required for creating gnu-gettext message catalogs,
    oCpair
    |\Cboost::locale::boundary::segment< IteratorType >Segment object that represents a pair of two iterators that define the range where this segment exits and a rule that defines it
    oCboost::locale::period::period_typeThis class holds a type that represents certain period of time like year, hour, second and so on
    oCboost::locale::posix_time
    oCruntime_error
    |oCboost::locale::conv::conversion_errorThe excepton that is thrown in case of conversion error
    |oCboost::locale::conv::invalid_charset_errorThis exception is thrown in case of use of unsupported or invalid character set
    |\Cboost::locale::date_time_errorThis error is thrown in case of invalid state that occurred
    oCboost::locale::boundary::segment_index< BaseIterator >This class holds an index of segments in the text range and allows to iterate over them
    oCboost::shared_ptr< Type >
    oCboost::locale::utf8_codecvt< CharType >::state_type
    \Cboost::locale::utf::utf_traits< CharType, size >UTF Traits class - functions to convert UTF sequences to and from Unicode code points
    -
    -
    -
    - - - - - - diff --git a/doc/html/hierarchy.js b/doc/html/hierarchy.js deleted file mode 100644 index 2a15dd04..00000000 --- a/doc/html/hierarchy.js +++ /dev/null @@ -1,71 +0,0 @@ -var hierarchy = -[ - [ "boost::locale::abstract_calendar", "classboost_1_1locale_1_1abstract__calendar.html", null ], - [ "boost::locale::util::base_converter", "classboost_1_1locale_1_1util_1_1base__converter.html", null ], - [ "base_message_format", null, [ - [ "boost::locale::message_format< CharType >", "classboost_1_1locale_1_1message__format.html", null ] - ] ], - [ "boost::locale::basic_format< CharType >", "classboost_1_1locale_1_1basic__format.html", null ], - [ "boost::locale::basic_message< CharType >", "classboost_1_1locale_1_1basic__message.html", null ], - [ "boost::locale::basic_message< char_type >", "classboost_1_1locale_1_1basic__message.html", null ], - [ "boost::locale::boundary::boundary_point< IteratorType >", "classboost_1_1locale_1_1boundary_1_1boundary__point.html", null ], - [ "boost::locale::boundary::boundary_point_index< BaseIterator >", "classboost_1_1locale_1_1boundary_1_1boundary__point__index.html", null ], - [ "boost::locale::boundary::break_info", "structboost_1_1locale_1_1boundary_1_1break__info.html", null ], - [ "boost::locale::calendar", "classboost_1_1locale_1_1calendar.html", null ], - [ "codecvt", null, [ - [ "boost::locale::generic_codecvt< CharType, CodecvtImpl, 1 >", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_011_01_4.html", null ], - [ "boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4.html", null ], - [ "boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4.html", null ] - ] ], - [ "collate", null, [ - [ "boost::locale::collator< CharType >", "classboost_1_1locale_1_1collator.html", null ] - ] ], - [ "boost::locale::collator_base", "classboost_1_1locale_1_1collator__base.html", [ - [ "boost::locale::collator< CharType >", "classboost_1_1locale_1_1collator.html", null ] - ] ], - [ "boost::locale::comparator< CharType, default_level >", "structboost_1_1locale_1_1comparator.html", null ], - [ "boost::locale::converter_base", "classboost_1_1locale_1_1converter__base.html", [ - [ "boost::locale::converter< CharType >", "classboost_1_1locale_1_1converter.html", null ] - ] ], - [ "boost::locale::date_time", "classboost_1_1locale_1_1date__time.html", null ], - [ "boost::locale::date_time_duration", "classboost_1_1locale_1_1date__time__duration.html", null ], - [ "boost::locale::date_time_period", "structboost_1_1locale_1_1date__time__period.html", null ], - [ "boost::locale::date_time_period_set", "classboost_1_1locale_1_1date__time__period__set.html", null ], - [ "boost::locale::gnu_gettext::messages_info::domain", "structboost_1_1locale_1_1gnu__gettext_1_1messages__info_1_1domain.html", null ], - [ "facet", null, [ - [ "boost::locale::boundary::boundary_indexing< CharType >", "classboost_1_1locale_1_1boundary_1_1boundary__indexing.html", null ], - [ "boost::locale::calendar_facet", "classboost_1_1locale_1_1calendar__facet.html", null ], - [ "boost::locale::converter< CharType >", "classboost_1_1locale_1_1converter.html", null ], - [ "boost::locale::info", "classboost_1_1locale_1_1info.html", null ] - ] ], - [ "boost::locale::generator", "classboost_1_1locale_1_1generator.html", null ], - [ "boost::locale::generic_codecvt< CharType, CodecvtImpl, CharSize >", "classboost_1_1locale_1_1generic__codecvt.html", null ], - [ "boost::locale::generic_codecvt< CharType, utf8_codecvt< CharType > >", "classboost_1_1locale_1_1generic__codecvt.html", [ - [ "boost::locale::utf8_codecvt< CharType >", "classboost_1_1locale_1_1utf8__codecvt.html", null ] - ] ], - [ "boost::locale::generic_codecvt_base", "classboost_1_1locale_1_1generic__codecvt__base.html", [ - [ "boost::locale::generic_codecvt< CharType, CodecvtImpl, 1 >", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_011_01_4.html", null ], - [ "boost::locale::generic_codecvt< CharType, CodecvtImpl, 2 >", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_012_01_4.html", null ], - [ "boost::locale::generic_codecvt< CharType, CodecvtImpl, 4 >", "classboost_1_1locale_1_1generic__codecvt_3_01CharType_00_01CodecvtImpl_00_014_01_4.html", null ] - ] ], - [ "boost::locale::hold_ptr< T >", "classboost_1_1locale_1_1hold__ptr.html", null ], - [ "boost::locale::hold_ptr< boost::locale::abstract_calendar >", "classboost_1_1locale_1_1hold__ptr.html", null ], - [ "boost::locale::ios_info", "classboost_1_1locale_1_1ios__info.html", null ], - [ "boost::locale::localization_backend", "classboost_1_1locale_1_1localization__backend.html", null ], - [ "boost::locale::localization_backend_manager", "classboost_1_1locale_1_1localization__backend__manager.html", null ], - [ "boost::locale::gnu_gettext::messages_info", "structboost_1_1locale_1_1gnu__gettext_1_1messages__info.html", null ], - [ "pair", null, [ - [ "boost::locale::boundary::segment< IteratorType >", "classboost_1_1locale_1_1boundary_1_1segment.html", null ] - ] ], - [ "boost::locale::period::period_type", "classboost_1_1locale_1_1period_1_1period__type.html", null ], - [ "boost::locale::posix_time", "structboost_1_1locale_1_1posix__time.html", null ], - [ "runtime_error", null, [ - [ "boost::locale::conv::conversion_error", "classboost_1_1locale_1_1conv_1_1conversion__error.html", null ], - [ "boost::locale::conv::invalid_charset_error", "classboost_1_1locale_1_1conv_1_1invalid__charset__error.html", null ], - [ "boost::locale::date_time_error", "classboost_1_1locale_1_1date__time__error.html", null ] - ] ], - [ "boost::locale::boundary::segment_index< BaseIterator >", "classboost_1_1locale_1_1boundary_1_1segment__index.html", null ], - [ "boost::shared_ptr< Type >", "classboost_1_1shared__ptr.html", null ], - [ "boost::locale::utf8_codecvt< CharType >::state_type", "structboost_1_1locale_1_1utf8__codecvt_1_1state__type.html", null ], - [ "boost::locale::utf::utf_traits< CharType, size >", "structboost_1_1locale_1_1utf_1_1utf__traits.html", null ] -]; \ No newline at end of file diff --git a/doc/html/hold__ptr_8hpp_source.html b/doc/html/hold__ptr_8hpp_source.html deleted file mode 100644 index e9fbea98..00000000 --- a/doc/html/hold__ptr_8hpp_source.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - -Boost.Locale: boost/locale/hold_ptr.hpp Source File - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    hold_ptr.hpp
    -
    -
    -
    1 //
    -
    2 // Copyright (c) 2010 Artyom Beilis (Tonkikh)
    -
    3 //
    -
    4 // Distributed under the Boost Software License, Version 1.0. (See
    -
    5 // accompanying file LICENSE_1_0.txt or copy at
    -
    6 // http://www.boost.org/LICENSE_1_0.txt)
    -
    7 //
    -
    8 #ifndef BOOST_LOCALE_HOLD_PTR_H
    -
    9 #define BOOST_LOCALE_HOLD_PTR_H
    -
    10 
    -
    11 namespace boost {
    -
    12 namespace locale {
    -
    17  template<typename T>
    -
    18  class hold_ptr {
    -
    19  hold_ptr(hold_ptr const &other); // non copyable
    -
    20  hold_ptr const &operator=(hold_ptr const &other); // non assignable
    -
    21  public:
    -
    25  hold_ptr() : ptr_(0) {}
    -
    29  explicit hold_ptr(T *v) : ptr_(v) {}
    -
    30 
    - -
    35  {
    -
    36  delete ptr_;
    -
    37  }
    -
    38 
    -
    42  T const *get() const { return ptr_; }
    -
    46  T *get() { return ptr_; }
    -
    47 
    -
    51  T const &operator *() const { return *ptr_; }
    -
    55  T &operator *() { return *ptr_; }
    -
    59  T const *operator->() const { return ptr_; }
    -
    63  T *operator->() { return ptr_; }
    -
    64 
    -
    68  T *release() { T *tmp=ptr_; ptr_=0; return tmp; }
    -
    69 
    -
    73  void reset(T *p=0)
    -
    74  {
    -
    75  if(ptr_) delete ptr_;
    -
    76  ptr_=p;
    -
    77  }
    -
    79  void swap(hold_ptr &other)
    -
    80  {
    -
    81  T *tmp=other.ptr_;
    -
    82  other.ptr_=ptr_;
    -
    83  ptr_=tmp;
    -
    84  }
    -
    85  private:
    -
    86  T *ptr_;
    -
    87  };
    -
    88 
    -
    89 } // locale
    -
    90 } // boost
    -
    91 
    -
    92 #endif
    -
    93 // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
    -
    hold_ptr()
    Definition: hold_ptr.hpp:25
    -
    T const & operator*() const
    Definition: hold_ptr.hpp:51
    -
    hold_ptr(T *v)
    Definition: hold_ptr.hpp:29
    -
    a smart pointer similar to std::auto_ptr but it is non-copyable and the underlying object has the sam...
    Definition: hold_ptr.hpp:18
    -
    T const * operator->() const
    Definition: hold_ptr.hpp:59
    -
    ~hold_ptr()
    Definition: hold_ptr.hpp:34
    -
    void reset(T *p=0)
    Definition: hold_ptr.hpp:73
    -
    T * release()
    Definition: hold_ptr.hpp:68
    -
    void swap(hold_ptr &other)
    Swap two pointers.
    Definition: hold_ptr.hpp:79
    -
    T * operator->()
    Definition: hold_ptr.hpp:63
    -
    -
    - - - - - - diff --git a/doc/html/index.html b/doc/html/index.html deleted file mode 100644 index 6012c4b8..00000000 --- a/doc/html/index.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - -Boost.Locale: Boost.Locale - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    Boost.Locale
    -
    -
    -

    -What is Boost.Locale?

    -

    Boost.Locale is a library that provides high quality localization facilities in a C++ way. It was originally designed a part of CppCMS - C++ Web Framework project and then contributed to Boost.

    -

    Boost.Locale gives powerful tools for development of cross platform localized software - the software that talks to user in its language.

    -

    Provided Features:

    -
      -
    • Correct case conversion, case folding and normalization.
    • -
    • Collation (sorting), including support for 4 Unicode collation levels.
    • -
    • Date, time, timezone and calendar manipulations, formatting and parsing, including transparent support for calendars other than Gregorian.
    • -
    • Boundary analysis for characters, words, sentences and line-breaks.
    • -
    • Number formatting, spelling and parsing.
    • -
    • Monetary formatting and parsing.
    • -
    • Powerful message formatting (string translation) including support for plural forms, using GNU catalogs.
    • -
    • Character set conversion.
    • -
    • Transparent support for 8-bit character sets like Latin1
    • -
    • Support for char and wchar_t
    • -
    • Experimental support for C++0x char16_t and char32_t strings and streams.
    • -
    -

    Boost.Locale enhances and unifies the standard library's API the way it becomes useful and convenient for development of cross platform and "cross-culture" software.

    -

    In order to achieve this goal Boost.Locale uses the-state-of-the-art Unicode and Localization library: ICU - International Components for Unicode.

    -

    Boost.Locale creates the natural glue between the C++ locales framework, iostreams, and the powerful ICU library.

    -

    Boost.Locale provides non-ICU based localization support as well. It is based on the operating system native API or on the standard C++ library support. Sacrificing some less important features, Boost.Locale becomes less powerful but lighter and easier to deploy and use library.

    -

    -Tutorials

    - -
    -
    - - - - - - diff --git a/doc/html/index_8hpp_source.html b/doc/html/index_8hpp_source.html deleted file mode 100644 index ec1f1a77..00000000 --- a/doc/html/index_8hpp_source.html +++ /dev/null @@ -1,880 +0,0 @@ - - - - - - -Boost.Locale: boost/locale/boundary/index.hpp Source File - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    index.hpp
    -
    -
    -
    1 //
    -
    2 // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
    -
    3 //
    -
    4 // Distributed under the Boost Software License, Version 1.0. (See
    -
    5 // accompanying file LICENSE_1_0.txt or copy at
    -
    6 // http://www.boost.org/LICENSE_1_0.txt)
    -
    7 //
    -
    8 #ifndef BOOST_LOCALE_BOUNDARY_INDEX_HPP_INCLUDED
    -
    9 #define BOOST_LOCALE_BOUNDARY_INDEX_HPP_INCLUDED
    -
    10 
    -
    11 #include <boost/locale/config.hpp>
    -
    12 #include <boost/locale/boundary/types.hpp>
    -
    13 #include <boost/locale/boundary/facets.hpp>
    -
    14 #include <boost/locale/boundary/segment.hpp>
    -
    15 #include <boost/locale/boundary/boundary_point.hpp>
    -
    16 #include <boost/iterator/iterator_facade.hpp>
    -
    17 #include <boost/type_traits/is_same.hpp>
    -
    18 #include <boost/shared_ptr.hpp>
    -
    19 #include <boost/cstdint.hpp>
    -
    20 #include <boost/assert.hpp>
    -
    21 #ifdef BOOST_MSVC
    -
    22 # pragma warning(push)
    -
    23 # pragma warning(disable : 4275 4251 4231 4660)
    -
    24 #endif
    -
    25 #include <string>
    -
    26 #include <locale>
    -
    27 #include <vector>
    -
    28 #include <iterator>
    -
    29 #include <algorithm>
    -
    30 #include <stdexcept>
    -
    31 
    -
    32 #include <iostream>
    -
    33 
    -
    34 namespace boost {
    -
    35 
    -
    36  namespace locale {
    -
    37 
    -
    38  namespace boundary {
    -
    46 
    -
    48 
    -
    49  namespace details {
    -
    50 
    -
    51  template<typename IteratorType,typename CategoryType = typename std::iterator_traits<IteratorType>::iterator_category>
    -
    52  struct mapping_traits {
    -
    53  typedef typename std::iterator_traits<IteratorType>::value_type char_type;
    -
    54  static index_type map(boundary_type t,IteratorType b,IteratorType e,std::locale const &l)
    -
    55  {
    -
    56  std::basic_string<char_type> str(b,e);
    -
    57  return std::use_facet<boundary_indexing<char_type> >(l).map(t,str.c_str(),str.c_str()+str.size());
    -
    58  }
    -
    59  };
    -
    60 
    -
    61  template<typename CharType,typename SomeIteratorType>
    -
    62  struct linear_iterator_traits {
    -
    63  static const bool is_linear =
    -
    64  is_same<SomeIteratorType,CharType*>::value
    -
    65  || is_same<SomeIteratorType,CharType const*>::value
    -
    66  || is_same<SomeIteratorType,typename std::basic_string<CharType>::iterator>::value
    -
    67  || is_same<SomeIteratorType,typename std::basic_string<CharType>::const_iterator>::value
    -
    68  || is_same<SomeIteratorType,typename std::vector<CharType>::iterator>::value
    -
    69  || is_same<SomeIteratorType,typename std::vector<CharType>::const_iterator>::value
    -
    70  ;
    -
    71  };
    -
    72 
    -
    73 
    -
    74 
    -
    75  template<typename IteratorType>
    -
    76  struct mapping_traits<IteratorType,std::random_access_iterator_tag> {
    -
    77 
    -
    78  typedef typename std::iterator_traits<IteratorType>::value_type char_type;
    -
    79 
    -
    80 
    -
    81 
    -
    82  static index_type map(boundary_type t,IteratorType b,IteratorType e,std::locale const &l)
    -
    83  {
    -
    84  index_type result;
    -
    85 
    -
    86  //
    -
    87  // Optimize for most common cases
    -
    88  //
    -
    89  // C++0x requires that string is continious in memory and all known
    -
    90  // string implementations
    -
    91  // do this because of c_str() support.
    -
    92  //
    -
    93 
    -
    94  if(linear_iterator_traits<char_type,IteratorType>::is_linear && b!=e)
    -
    95  {
    -
    96  char_type const *begin = &*b;
    -
    97  char_type const *end = begin + (e-b);
    -
    98  index_type tmp=std::use_facet<boundary_indexing<char_type> >(l).map(t,begin,end);
    -
    99  result.swap(tmp);
    -
    100  }
    -
    101  else {
    -
    102  std::basic_string<char_type> str(b,e);
    -
    103  index_type tmp = std::use_facet<boundary_indexing<char_type> >(l).map(t,str.c_str(),str.c_str()+str.size());
    -
    104  result.swap(tmp);
    -
    105  }
    -
    106  return result;
    -
    107  }
    -
    108  };
    -
    109 
    -
    110  template<typename BaseIterator>
    -
    111  class mapping {
    -
    112  public:
    -
    113  typedef BaseIterator base_iterator;
    -
    114  typedef typename std::iterator_traits<base_iterator>::value_type char_type;
    -
    115 
    -
    116 
    -
    117  mapping(boundary_type type,
    -
    118  base_iterator begin,
    -
    119  base_iterator end,
    -
    120  std::locale const &loc)
    -
    121  :
    -
    122  index_(new index_type()),
    -
    123  begin_(begin),
    -
    124  end_(end)
    -
    125  {
    -
    126  index_type idx=details::mapping_traits<base_iterator>::map(type,begin,end,loc);
    -
    127  index_->swap(idx);
    -
    128  }
    -
    129 
    -
    130  mapping()
    -
    131  {
    -
    132  }
    -
    133 
    -
    134  index_type const &index() const
    -
    135  {
    -
    136  return *index_;
    -
    137  }
    -
    138 
    -
    139  base_iterator begin() const
    -
    140  {
    -
    141  return begin_;
    -
    142  }
    -
    143 
    -
    144  base_iterator end() const
    -
    145  {
    -
    146  return end_;
    -
    147  }
    -
    148 
    -
    149  private:
    - -
    151  base_iterator begin_,end_;
    -
    152  };
    -
    153 
    -
    154  template<typename BaseIterator>
    -
    155  class segment_index_iterator :
    -
    156  public boost::iterator_facade<
    -
    157  segment_index_iterator<BaseIterator>,
    -
    158  segment<BaseIterator>,
    -
    159  boost::bidirectional_traversal_tag,
    -
    160  segment<BaseIterator> const &
    -
    161  >
    -
    162  {
    -
    163  public:
    -
    164  typedef BaseIterator base_iterator;
    -
    165  typedef mapping<base_iterator> mapping_type;
    -
    166  typedef segment<base_iterator> segment_type;
    -
    167 
    -
    168  segment_index_iterator() : current_(0,0),map_(0)
    -
    169  {
    -
    170  }
    -
    171 
    -
    172  segment_index_iterator(base_iterator p,mapping_type const *map,rule_type mask,bool full_select) :
    -
    173  map_(map),
    -
    174  mask_(mask),
    -
    175  full_select_(full_select)
    -
    176  {
    -
    177  set(p);
    -
    178  }
    -
    179  segment_index_iterator(bool is_begin,mapping_type const *map,rule_type mask,bool full_select) :
    -
    180  map_(map),
    -
    181  mask_(mask),
    -
    182  full_select_(full_select)
    -
    183  {
    -
    184  if(is_begin)
    -
    185  set_begin();
    -
    186  else
    -
    187  set_end();
    -
    188  }
    -
    189 
    -
    190  segment_type const &dereference() const
    -
    191  {
    -
    192  return value_;
    -
    193  }
    -
    194 
    -
    195  bool equal(segment_index_iterator const &other) const
    -
    196  {
    -
    197  return map_ == other.map_ && current_.second == other.current_.second;
    -
    198  }
    -
    199 
    -
    200  void increment()
    -
    201  {
    -
    202  std::pair<size_t,size_t> next = current_;
    -
    203  if(full_select_) {
    -
    204  next.first = next.second;
    -
    205  while(next.second < size()) {
    -
    206  next.second++;
    -
    207  if(valid_offset(next.second))
    -
    208  break;
    -
    209  }
    -
    210  if(next.second == size())
    -
    211  next.first = next.second - 1;
    -
    212  }
    -
    213  else {
    -
    214  while(next.second < size()) {
    -
    215  next.first = next.second;
    -
    216  next.second++;
    -
    217  if(valid_offset(next.second))
    -
    218  break;
    -
    219  }
    -
    220  }
    -
    221  update_current(next);
    -
    222  }
    -
    223 
    -
    224  void decrement()
    -
    225  {
    -
    226  std::pair<size_t,size_t> next = current_;
    -
    227  if(full_select_) {
    -
    228  while(next.second >1) {
    -
    229  next.second--;
    -
    230  if(valid_offset(next.second))
    -
    231  break;
    -
    232  }
    -
    233  next.first = next.second;
    -
    234  while(next.first >0) {
    -
    235  next.first--;
    -
    236  if(valid_offset(next.first))
    -
    237  break;
    -
    238  }
    -
    239  }
    -
    240  else {
    -
    241  while(next.second >1) {
    -
    242  next.second--;
    -
    243  if(valid_offset(next.second))
    -
    244  break;
    -
    245  }
    -
    246  next.first = next.second - 1;
    -
    247  }
    -
    248  update_current(next);
    -
    249  }
    -
    250 
    -
    251  private:
    -
    252 
    -
    253  void set_end()
    -
    254  {
    -
    255  current_.first = size() - 1;
    -
    256  current_.second = size();
    -
    257  value_ = segment_type(map_->end(),map_->end(),0);
    -
    258  }
    -
    259  void set_begin()
    -
    260  {
    -
    261  current_.first = current_.second = 0;
    -
    262  value_ = segment_type(map_->begin(),map_->begin(),0);
    -
    263  increment();
    -
    264  }
    -
    265 
    -
    266  void set(base_iterator p)
    -
    267  {
    -
    268  size_t dist=std::distance(map_->begin(),p);
    -
    269  index_type::const_iterator b=map_->index().begin(),e=map_->index().end();
    -
    270  index_type::const_iterator
    -
    271  boundary_point=std::upper_bound(b,e,break_info(dist));
    -
    272  while(boundary_point != e && (boundary_point->rule & mask_)==0)
    -
    273  boundary_point++;
    -
    274 
    -
    275  current_.first = current_.second = boundary_point - b;
    -
    276 
    -
    277  if(full_select_) {
    -
    278  while(current_.first > 0) {
    -
    279  current_.first --;
    -
    280  if(valid_offset(current_.first))
    -
    281  break;
    -
    282  }
    -
    283  }
    -
    284  else {
    -
    285  if(current_.first > 0)
    -
    286  current_.first --;
    -
    287  }
    -
    288  value_.first = map_->begin();
    -
    289  std::advance(value_.first,get_offset(current_.first));
    -
    290  value_.second = value_.first;
    -
    291  std::advance(value_.second,get_offset(current_.second) - get_offset(current_.first));
    -
    292 
    -
    293  update_rule();
    -
    294  }
    -
    295 
    -
    296  void update_current(std::pair<size_t,size_t> pos)
    -
    297  {
    -
    298  std::ptrdiff_t first_diff = get_offset(pos.first) - get_offset(current_.first);
    -
    299  std::ptrdiff_t second_diff = get_offset(pos.second) - get_offset(current_.second);
    -
    300  std::advance(value_.first,first_diff);
    -
    301  std::advance(value_.second,second_diff);
    -
    302  current_ = pos;
    -
    303  update_rule();
    -
    304  }
    -
    305 
    -
    306  void update_rule()
    -
    307  {
    -
    308  if(current_.second != size()) {
    -
    309  value_.rule(index()[current_.second].rule);
    -
    310  }
    -
    311  }
    -
    312  size_t get_offset(size_t ind) const
    -
    313  {
    -
    314  if(ind == size())
    -
    315  return index().back().offset;
    -
    316  return index()[ind].offset;
    -
    317  }
    -
    318 
    -
    319  bool valid_offset(size_t offset) const
    -
    320  {
    -
    321  return offset == 0
    -
    322  || offset == size() // make sure we not acess index[size]
    -
    323  || (index()[offset].rule & mask_)!=0;
    -
    324  }
    -
    325 
    -
    326  size_t size() const
    -
    327  {
    -
    328  return index().size();
    -
    329  }
    -
    330 
    -
    331  index_type const &index() const
    -
    332  {
    -
    333  return map_->index();
    -
    334  }
    -
    335 
    -
    336 
    -
    337  segment_type value_;
    -
    338  std::pair<size_t,size_t> current_;
    -
    339  mapping_type const *map_;
    -
    340  rule_type mask_;
    -
    341  bool full_select_;
    -
    342  };
    -
    343 
    -
    344  template<typename BaseIterator>
    -
    345  class boundary_point_index_iterator :
    -
    346  public boost::iterator_facade<
    -
    347  boundary_point_index_iterator<BaseIterator>,
    -
    348  boundary_point<BaseIterator>,
    -
    349  boost::bidirectional_traversal_tag,
    -
    350  boundary_point<BaseIterator> const &
    -
    351  >
    -
    352  {
    -
    353  public:
    -
    354  typedef BaseIterator base_iterator;
    -
    355  typedef mapping<base_iterator> mapping_type;
    -
    356  typedef boundary_point<base_iterator> boundary_point_type;
    -
    357 
    -
    358  boundary_point_index_iterator() : current_(0),map_(0)
    -
    359  {
    -
    360  }
    -
    361 
    -
    362  boundary_point_index_iterator(bool is_begin,mapping_type const *map,rule_type mask) :
    -
    363  map_(map),
    -
    364  mask_(mask)
    -
    365  {
    -
    366  if(is_begin)
    -
    367  set_begin();
    -
    368  else
    -
    369  set_end();
    -
    370  }
    -
    371  boundary_point_index_iterator(base_iterator p,mapping_type const *map,rule_type mask) :
    -
    372  map_(map),
    -
    373  mask_(mask)
    -
    374  {
    -
    375  set(p);
    -
    376  }
    -
    377 
    -
    378  boundary_point_type const &dereference() const
    -
    379  {
    -
    380  return value_;
    -
    381  }
    -
    382 
    -
    383  bool equal(boundary_point_index_iterator const &other) const
    -
    384  {
    -
    385  return map_ == other.map_ && current_ == other.current_;
    -
    386  }
    -
    387 
    -
    388  void increment()
    -
    389  {
    -
    390  size_t next = current_;
    -
    391  while(next < size()) {
    -
    392  next++;
    -
    393  if(valid_offset(next))
    -
    394  break;
    -
    395  }
    -
    396  update_current(next);
    -
    397  }
    -
    398 
    -
    399  void decrement()
    -
    400  {
    -
    401  size_t next = current_;
    -
    402  while(next>0) {
    -
    403  next--;
    -
    404  if(valid_offset(next))
    -
    405  break;
    -
    406  }
    -
    407  update_current(next);
    -
    408  }
    -
    409 
    -
    410  private:
    -
    411  void set_end()
    -
    412  {
    -
    413  current_ = size();
    -
    414  value_ = boundary_point_type(map_->end(),0);
    -
    415  }
    -
    416  void set_begin()
    -
    417  {
    -
    418  current_ = 0;
    -
    419  value_ = boundary_point_type(map_->begin(),0);
    -
    420  }
    -
    421 
    -
    422  void set(base_iterator p)
    -
    423  {
    -
    424  size_t dist = std::distance(map_->begin(),p);
    -
    425 
    -
    426  index_type::const_iterator b=index().begin();
    -
    427  index_type::const_iterator e=index().end();
    -
    428  index_type::const_iterator ptr = std::lower_bound(b,e,break_info(dist));
    -
    429 
    -
    430  if(ptr==index().end())
    -
    431  current_=size()-1;
    -
    432  else
    -
    433  current_=ptr - index().begin();
    -
    434 
    -
    435  while(!valid_offset(current_))
    -
    436  current_ ++;
    -
    437 
    -
    438  std::ptrdiff_t diff = get_offset(current_) - dist;
    -
    439  std::advance(p,diff);
    -
    440  value_.iterator(p);
    -
    441  update_rule();
    -
    442  }
    -
    443 
    -
    444  void update_current(size_t pos)
    -
    445  {
    -
    446  std::ptrdiff_t diff = get_offset(pos) - get_offset(current_);
    -
    447  base_iterator i=value_.iterator();
    -
    448  std::advance(i,diff);
    -
    449  current_ = pos;
    -
    450  value_.iterator(i);
    -
    451  update_rule();
    -
    452  }
    -
    453 
    -
    454  void update_rule()
    -
    455  {
    -
    456  if(current_ != size()) {
    -
    457  value_.rule(index()[current_].rule);
    -
    458  }
    -
    459  }
    -
    460  size_t get_offset(size_t ind) const
    -
    461  {
    -
    462  if(ind == size())
    -
    463  return index().back().offset;
    -
    464  return index()[ind].offset;
    -
    465  }
    -
    466 
    -
    467  bool valid_offset(size_t offset) const
    -
    468  {
    -
    469  return offset == 0
    -
    470  || offset + 1 >= size() // last and first are always valid regardless of mark
    -
    471  || (index()[offset].rule & mask_)!=0;
    -
    472  }
    -
    473 
    -
    474  size_t size() const
    -
    475  {
    -
    476  return index().size();
    -
    477  }
    -
    478 
    -
    479  index_type const &index() const
    -
    480  {
    -
    481  return map_->index();
    -
    482  }
    -
    483 
    -
    484 
    -
    485  boundary_point_type value_;
    -
    486  size_t current_;
    -
    487  mapping_type const *map_;
    -
    488  rule_type mask_;
    -
    489  };
    -
    490 
    -
    491 
    -
    492  } // details
    -
    493 
    -
    495 
    -
    496  template<typename BaseIterator>
    - -
    498 
    -
    499  template<typename BaseIterator>
    - -
    501 
    -
    502 
    -
    554 
    -
    555  template<typename BaseIterator>
    -
    556  class segment_index {
    -
    557  public:
    -
    558 
    -
    562  typedef BaseIterator base_iterator;
    -
    563  #ifdef BOOST_LOCALE_DOXYGEN
    -
    564  typedef unspecified_iterator_type iterator;
    -
    582  typedef unspecified_iterator_type const_iterator;
    -
    583  #else
    -
    584  typedef details::segment_index_iterator<base_iterator> iterator;
    -
    585  typedef details::segment_index_iterator<base_iterator> const_iterator;
    -
    586  #endif
    - -
    592 
    -
    602  segment_index() : mask_(0xFFFFFFFFu),full_select_(false)
    -
    603  {
    -
    604  }
    - -
    610  base_iterator begin,
    -
    611  base_iterator end,
    -
    612  rule_type mask,
    -
    613  std::locale const &loc=std::locale())
    -
    614  :
    -
    615  map_(type,begin,end,loc),
    -
    616  mask_(mask),
    -
    617  full_select_(false)
    -
    618  {
    -
    619  }
    - -
    625  base_iterator begin,
    -
    626  base_iterator end,
    -
    627  std::locale const &loc=std::locale())
    -
    628  :
    -
    629  map_(type,begin,end,loc),
    -
    630  mask_(0xFFFFFFFFu),
    -
    631  full_select_(false)
    -
    632  {
    -
    633  }
    -
    634 
    - - -
    657 
    -
    658 
    -
    665  void map(boundary_type type,base_iterator begin,base_iterator end,std::locale const &loc=std::locale())
    -
    666  {
    -
    667  map_ = mapping_type(type,begin,end,loc);
    -
    668  }
    -
    669 
    -
    679  iterator begin() const
    -
    680  {
    -
    681  return iterator(true,&map_,mask_,full_select_);
    -
    682  }
    -
    683 
    -
    691  iterator end() const
    -
    692  {
    -
    693  return iterator(false,&map_,mask_,full_select_);
    -
    694  }
    -
    695 
    - -
    714  {
    -
    715  return iterator(p,&map_,mask_,full_select_);
    -
    716  }
    -
    717 
    -
    721  rule_type rule() const
    -
    722  {
    -
    723  return mask_;
    -
    724  }
    -
    728  void rule(rule_type v)
    -
    729  {
    -
    730  mask_ = v;
    -
    731  }
    -
    732 
    -
    745 
    -
    746  bool full_select() const
    -
    747  {
    -
    748  return full_select_;
    -
    749  }
    -
    750 
    -
    763 
    -
    764  void full_select(bool v)
    -
    765  {
    -
    766  full_select_ = v;
    -
    767  }
    -
    768 
    -
    769  private:
    -
    770  friend class boundary_point_index<base_iterator>;
    -
    771  typedef details::mapping<base_iterator> mapping_type;
    -
    772  mapping_type map_;
    -
    773  rule_type mask_;
    -
    774  bool full_select_;
    -
    775  };
    -
    776 
    -
    823 
    -
    824 
    -
    825  template<typename BaseIterator>
    -
    826  class boundary_point_index {
    -
    827  public:
    -
    831  typedef BaseIterator base_iterator;
    -
    832  #ifdef BOOST_LOCALE_DOXYGEN
    -
    833  typedef unspecified_iterator_type iterator;
    -
    851  typedef unspecified_iterator_type const_iterator;
    -
    852  #else
    -
    853  typedef details::boundary_point_index_iterator<base_iterator> iterator;
    -
    854  typedef details::boundary_point_index_iterator<base_iterator> const_iterator;
    -
    855  #endif
    - -
    861 
    -
    871  boundary_point_index() : mask_(0xFFFFFFFFu)
    -
    872  {
    -
    873  }
    -
    874 
    - -
    880  base_iterator begin,
    -
    881  base_iterator end,
    -
    882  rule_type mask,
    -
    883  std::locale const &loc=std::locale())
    -
    884  :
    -
    885  map_(type,begin,end,loc),
    -
    886  mask_(mask)
    -
    887  {
    -
    888  }
    - -
    894  base_iterator begin,
    -
    895  base_iterator end,
    -
    896  std::locale const &loc=std::locale())
    -
    897  :
    -
    898  map_(type,begin,end,loc),
    -
    899  mask_(0xFFFFFFFFu)
    -
    900  {
    -
    901  }
    -
    902 
    - - -
    925 
    -
    932  void map(boundary_type type,base_iterator begin,base_iterator end,std::locale const &loc=std::locale())
    -
    933  {
    -
    934  map_ = mapping_type(type,begin,end,loc);
    -
    935  }
    -
    936 
    -
    946  iterator begin() const
    -
    947  {
    -
    948  return iterator(true,&map_,mask_);
    -
    949  }
    -
    950 
    -
    960  iterator end() const
    -
    961  {
    -
    962  return iterator(false,&map_,mask_);
    -
    963  }
    -
    964 
    - -
    979  {
    -
    980  return iterator(p,&map_,mask_);
    -
    981  }
    -
    982 
    -
    986  rule_type rule() const
    -
    987  {
    -
    988  return mask_;
    -
    989  }
    -
    993  void rule(rule_type v)
    -
    994  {
    -
    995  mask_ = v;
    -
    996  }
    -
    997 
    -
    998  private:
    -
    999 
    -
    1000  friend class segment_index<base_iterator>;
    -
    1001  typedef details::mapping<base_iterator> mapping_type;
    -
    1002  mapping_type map_;
    -
    1003  rule_type mask_;
    -
    1004  };
    -
    1005 
    -
    1007  template<typename BaseIterator>
    -
    1008  segment_index<BaseIterator>::segment_index(boundary_point_index<BaseIterator> const &other) :
    -
    1009  map_(other.map_),
    -
    1010  mask_(0xFFFFFFFFu),
    -
    1011  full_select_(false)
    -
    1012  {
    -
    1013  }
    -
    1014 
    -
    1015  template<typename BaseIterator>
    -
    1016  boundary_point_index<BaseIterator>::boundary_point_index(segment_index<BaseIterator> const &other) :
    -
    1017  map_(other.map_),
    -
    1018  mask_(0xFFFFFFFFu)
    -
    1019  {
    -
    1020  }
    -
    1021 
    -
    1022  template<typename BaseIterator>
    -
    1023  segment_index<BaseIterator> const &segment_index<BaseIterator>::operator=(boundary_point_index<BaseIterator> const &other)
    -
    1024  {
    -
    1025  map_ = other.map_;
    -
    1026  return *this;
    -
    1027  }
    -
    1028 
    -
    1029  template<typename BaseIterator>
    -
    1030  boundary_point_index<BaseIterator> const &boundary_point_index<BaseIterator>::operator=(segment_index<BaseIterator> const &other)
    -
    1031  {
    -
    1032  map_ = other.map_;
    -
    1033  return *this;
    -
    1034  }
    -
    1036 
    - - -
    1039  #ifdef BOOST_LOCALE_ENABLE_CHAR16_T
    - -
    1041  #endif
    -
    1042  #ifdef BOOST_LOCALE_ENABLE_CHAR32_T
    - -
    1044  #endif
    -
    1045 
    - - -
    1048  #ifdef BOOST_LOCALE_ENABLE_CHAR16_T
    - -
    1050  #endif
    -
    1051  #ifdef BOOST_LOCALE_ENABLE_CHAR32_T
    - -
    1053  #endif
    -
    1054 
    - - -
    1057  #ifdef BOOST_LOCALE_ENABLE_CHAR16_T
    - -
    1059  #endif
    -
    1060  #ifdef BOOST_LOCALE_ENABLE_CHAR32_T
    - -
    1062  #endif
    -
    1063 
    - - -
    1066  #ifdef BOOST_LOCALE_ENABLE_CHAR16_T
    - -
    1068  #endif
    -
    1069  #ifdef BOOST_LOCALE_ENABLE_CHAR32_T
    - -
    1071  #endif
    -
    1072 
    -
    1073 
    -
    1074 
    -
    1075  } // boundary
    -
    1076 
    -
    1077  } // locale
    -
    1078 } // boost
    -
    1079 
    -
    1086 
    -
    1087 #ifdef BOOST_MSVC
    -
    1088 #pragma warning(pop)
    -
    1089 #endif
    -
    1090 
    -
    1091 #endif
    -
    1092 // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
    -
    void full_select(bool v)
    Definition: index.hpp:764
    -
    a segment object that represents a pair of two iterators that define the range where this segment exi...
    Definition: segment.hpp:102
    -
    boundary_type
    Definition: types.hpp:39
    -
    boundary_point_index const & operator=(segment_index< base_iterator > const &other)
    -
    This class holds an index of boundary points and allows iterating over them.
    Definition: index.hpp:500
    -
    BaseIterator base_iterator
    Definition: index.hpp:562
    -
    segment_index< std::u16string::const_iterator > u16ssegment_index
    convenience typedef
    Definition: index.hpp:1040
    -
    segment_index< char const * > csegment_index
    convenience typedef
    Definition: index.hpp:1046
    -
    void map(boundary_type type, base_iterator begin, base_iterator end, std::locale const &loc=std::locale())
    Definition: index.hpp:665
    -
    boundary_point_index< std::wstring::const_iterator > wsboundary_point_index
    convenience typedef
    Definition: index.hpp:1056
    -
    boundary_point_index< wchar_t const * > wcboundary_point_index
    convenience typedef
    Definition: index.hpp:1065
    -
    boundary_point< base_iterator > value_type
    Definition: index.hpp:860
    -
    segment< base_iterator > value_type
    Definition: index.hpp:591
    -
    void rule(rule_type v)
    Definition: index.hpp:993
    -
    segment_index const & operator=(boundary_point_index< base_iterator > const &)
    -
    rule_type rule() const
    Definition: index.hpp:986
    -
    iterator end() const
    Definition: index.hpp:960
    -
    uint32_t rule_type
    Flags used with word boundary analysis – the type of the word, line or sentence boundary found...
    Definition: types.hpp:51
    -
    Definition: generator.hpp:23
    -
    boundary_point_index< char16_t const * > u16cboundary_point_index
    convenience typedef
    Definition: index.hpp:1067
    -
    void map(boundary_type type, base_iterator begin, base_iterator end, std::locale const &loc=std::locale())
    Definition: index.hpp:932
    -
    unspecified_iterator_type iterator
    Definition: index.hpp:578
    -
    segment_index()
    Definition: index.hpp:602
    -
    segment_index< char16_t const * > u16csegment_index
    convenience typedef
    Definition: index.hpp:1049
    -
    boundary_point_index< std::string::const_iterator > sboundary_point_index
    convenience typedef
    Definition: index.hpp:1055
    -
    segment_index< std::string::const_iterator > ssegment_index
    convenience typedef
    Definition: index.hpp:1037
    -
    segment_index< char32_t const * > u32csegment_index
    convenience typedef
    Definition: index.hpp:1052
    -
    segment_index< std::wstring::const_iterator > wssegment_index
    convenience typedef
    Definition: index.hpp:1038
    -
    unspecified_iterator_type const_iterator
    Definition: index.hpp:582
    -
    unspecified_iterator_type const_iterator
    Definition: index.hpp:851
    -
    This class represents a boundary point in the text.
    Definition: boundary_point.hpp:48
    -
    iterator find(base_iterator p) const
    Definition: index.hpp:713
    -
    iterator begin() const
    Definition: index.hpp:679
    -
    void rule(rule_type v)
    Definition: index.hpp:728
    -
    boundary_point_index(boundary_type type, base_iterator begin, base_iterator end, std::locale const &loc=std::locale())
    Definition: index.hpp:893
    -
    boundary_point_index< char32_t const * > u32cboundary_point_index
    convenience typedef
    Definition: index.hpp:1070
    -
    segment_index(boundary_type type, base_iterator begin, base_iterator end, rule_type mask, std::locale const &loc=std::locale())
    Definition: index.hpp:609
    -
    iterator find(base_iterator p) const
    Definition: index.hpp:978
    -
    boundary_point_index< char const * > cboundary_point_index
    convenience typedef
    Definition: index.hpp:1064
    -
    boundary_point_index< std::u32string::const_iterator > u32sboundary_point_index
    convenience typedef
    Definition: index.hpp:1061
    -
    unspecified_iterator_type iterator
    Definition: index.hpp:847
    -
    segment_index(boundary_type type, base_iterator begin, base_iterator end, std::locale const &loc=std::locale())
    Definition: index.hpp:624
    -
    bool full_select() const
    Definition: index.hpp:746
    -
    boundary_point_index< std::u16string::const_iterator > u16sboundary_point_index
    convenience typedef
    Definition: index.hpp:1058
    -
    BaseIterator base_iterator
    Definition: index.hpp:831
    -
    iterator end() const
    Definition: index.hpp:691
    -
    segment_index< std::u32string::const_iterator > u32ssegment_index
    convenience typedef
    Definition: index.hpp:1043
    -
    std::vector< break_info > index_type
    Definition: facets.hpp:86
    -
    rule_type rule() const
    Definition: index.hpp:721
    -
    iterator begin() const
    Definition: index.hpp:946
    -
    boundary_point_index()
    Definition: index.hpp:871
    -
    This class holds an index of segments in the text range and allows to iterate over them...
    Definition: index.hpp:497
    -
    boundary_point_index(boundary_type type, base_iterator begin, base_iterator end, rule_type mask, std::locale const &loc=std::locale())
    Definition: index.hpp:879
    -
    segment_index< wchar_t const * > wcsegment_index
    convenience typedef
    Definition: index.hpp:1047
    -
    -
    - - - - - - diff --git a/doc/html/info_8hpp_source.html b/doc/html/info_8hpp_source.html deleted file mode 100644 index 6c8eadbe..00000000 --- a/doc/html/info_8hpp_source.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - -Boost.Locale: boost/locale/info.hpp Source File - - - - - - - - - - -
    -
    - - - - - - - -
    -
    Boost.Locale -
    -
    -
    - - - - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    info.hpp
    -
    -
    -
    1 //
    -
    2 // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
    -
    3 //
    -
    4 // Distributed under the Boost Software License, Version 1.0. (See
    -
    5 // accompanying file LICENSE_1_0.txt or copy at
    -
    6 // http://www.boost.org/LICENSE_1_0.txt)
    -
    7 //
    -
    8 #ifndef BOOST_LOCALE_INFO_HPP_INCLUDED
    -
    9 #define BOOST_LOCALE_INFO_HPP_INCLUDED
    -
    10 #include <boost/locale/config.hpp>
    -
    11 #ifdef BOOST_MSVC
    -
    12 # pragma warning(push)
    -
    13 # pragma warning(disable : 4275 4251 4231 4660)
    -
    14 #endif
    -
    15 #include <locale>
    -
    16 #include <string>
    -
    17 
    -
    18 
    -
    19 namespace boost {
    -
    20  namespace locale {
    -
    21 
    -
    27  class BOOST_LOCALE_DECL info : public std::locale::facet
    -
    28  {
    -
    29  public:
    -
    30  static std::locale::id id;
    -
    31 
    - - - - - -
    40  name_property
    -
    41  };
    -
    42 
    - -
    47  utf8_property
    -
    48  };
    -
    49 
    -
    50 
    -
    54  info(size_t refs = 0) : std::locale::facet(refs)
    -
    55  {
    -
    56  }
    -
    60  std::string language() const
    -
    61  {
    -
    62  return get_string_property(language_property);
    -
    63  }
    -
    67  std::string country() const
    -
    68  {
    -
    69  return get_string_property(country_property);
    -
    70  }
    -
    74  std::string variant() const
    -
    75  {
    -
    76  return get_string_property(variant_property);
    -
    77  }
    -
    81  std::string encoding() const
    -
    82  {
    -
    83  return get_string_property(encoding_property);
    -
    84  }
    -
    85 
    -
    89  std::string name() const
    -
    90  {
    -
    91  return get_string_property(name_property);
    -
    92  }
    -
    93 
    -
    97  bool utf8() const
    -
    98  {
    -
    99  return get_integer_property(utf8_property) != 0;
    -
    100  }
    -
    101 
    -
    102 #if defined (__SUNPRO_CC) && defined (_RWSTD_VER)
    -
    103  std::locale::id& __get_id (void) const { return id; }
    -
    104 #endif
    -
    105  protected:
    -
    109  virtual std::string get_string_property(string_propery v) const = 0;
    -
    113  virtual int get_integer_property(integer_property v) const = 0;
    -
    114  };
    -
    115 
    -
    116  }
    -
    117 }
    -
    118 
    -
    119 #ifdef BOOST_MSVC
    -
    120 #pragma warning(pop)
    -
    121 #endif
    -
    122 
    -
    123 #endif
    -
    124 
    -
    125 // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
    -
    ISO 3166 country id.
    Definition: info.hpp:37
    -
    ISO 639 language id.
    Definition: info.hpp:36
    -
    a facet that holds general information about locale
    Definition: info.hpp:27
    -
    Variant for locale.
    Definition: info.hpp:38
    -
    info(size_t refs=0)
    Definition: info.hpp:54
    -
    integer_property
    Definition: info.hpp:46
    -
    std::string name() const
    Definition: info.hpp:89
    -
    std::string country() const
    Definition: info.hpp:67
    -
    string_propery
    Definition: info.hpp:35
    -
    std::string encoding() const
    Definition: info.hpp:81
    -
    static std::locale::id id
    This member uniquely defines this facet, required by STL.
    Definition: info.hpp:30
    -
    bool utf8() const
    Definition: info.hpp:97
    -
    std::string variant() const
    Definition: info.hpp:74
    -
    encoding name
    Definition: info.hpp:39
    -
    std::string language() const
    Definition: info.hpp:60
    -
    -
    - - - - - - diff --git a/doc/html/jquery.js b/doc/html/jquery.js deleted file mode 100644 index 3db33e62..00000000 --- a/doc/html/jquery.js +++ /dev/null @@ -1,72 +0,0 @@ -/*! - * jQuery JavaScript Library v1.7.1 - * http://jquery.com/ - * - * Copyright 2011, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Mon Nov 21 21:11:03 2011 -0500 - */ -(function(bb,L){var av=bb.document,bu=bb.navigator,bl=bb.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bb.jQuery,bH=bb.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b40){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b40&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b21?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv
    a";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="
    ";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="
    t
    ";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="
    ";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType; -if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bCbA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}}); -/*! - * Sizzle CSS Selector Engine - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * More information: http://sizzlejs.com/ - */ -(function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bV||typeof bV!=="string"){return bY}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ)}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift()}b3=bM(bV,b3,bZ)}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3)}else{bU=false}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5=""}else{b4=bW.pop()}if(b4==null){b4=e}bE.relative[b5](b6,b4,bT)}}else{b6=bW=[]}}if(!b6){b6=b3}if(!b6){by.error(b5||bV)}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6)}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX])}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX])}}}}}else{bF(b6,bY)}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY)}return bY};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS=0)){if(!bS){e.push(bV)}}else{if(bS){bR[bU]=false}}}}return false},ID:function(e){return e[1].replace(bK,"")},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){by.error(e[0])}}e[0]=bI++;return e},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT]}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" "}return bU},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR)}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT)}return false}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true}}return bU},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bS,bR,e){return !!by(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1 -},lt:function(bS,bR,e){return bRe[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV)}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1)};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx))}var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[]}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="

    ";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ)}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ)}}else{return bF([],bZ)}}}try{return bF(bV.querySelectorAll(b4),bZ)}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b5&&b6){bV=bV.parentNode}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ)}}catch(b1){}finally{if(!bX){bW.removeAttribute("id")}}}}}return e(b4,bV,bZ,b3)};for(var bR in e){by[bR]=e[bR]}bT=null})()}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return by(bY,null,null,[bW]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="
    ";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT0){bU=e;break}}}e=e[bR]}bZ[bT]=bU}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{by.contains=function(){return false}}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"")}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT0){for(bB=bA;bB=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw-1:b.find.matchesSelector(bz,by)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(C(bx[0])||C(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx)}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||a9.test(bw))&&aq.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function aG(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bp.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}function a(e){var bw=aR.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aR="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ag=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/",""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},ac=a(av); -ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div
    ","
    "]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bw){var bv=b(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==L){return this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e)})},html:function(bx){if(bx===L){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ag,""):null}else{if(typeof bx==="string"&&!ae.test(bx)&&(b.support.leadingWhitespace||!ar.test(bx))&&!ax[(d.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(R,"<$1>");try{for(var bw=0,bv=this.length;bw1&&bw0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bg(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function E(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}function al(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||!ah.test("<"+by.nodeName)?by.cloneNode(true):al(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){ai(by,bz);e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){if(bv[bx]){ai(e[bx],bv[bx])}}}if(bA){t(by,bz);if(bw){e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){t(e[bx],bv[bx])}}}e=bv=null;return bz},clean:function(bw,by,bH,bA){var bF;by=by||av;if(typeof by.createElement==="undefined"){by=by.ownerDocument||by[0]&&by[0].ownerDocument||av}var bI=[],bB;for(var bE=0,bz;(bz=bw[bE])!=null;bE++){if(typeof bz==="number"){bz+=""}if(!bz){continue}if(typeof bz==="string"){if(!W.test(bz)){bz=by.createTextNode(bz)}else{bz=bz.replace(R,"<$1>");var bK=(d.exec(bz)||["",""])[1].toLowerCase(),bx=ax[bK]||ax._default,bD=bx[0],bv=by.createElement("div");if(by===av){ac.appendChild(bv)}else{a(by).appendChild(bv)}bv.innerHTML=bx[1]+bz+bx[2];while(bD--){bv=bv.lastChild}if(!b.support.tbody){var e=w.test(bz),bC=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]===""&&!e?bv.childNodes:[];for(bB=bC.length-1;bB>=0;--bB){if(b.nodeName(bC[bB],"tbody")&&!bC[bB].childNodes.length){bC[bB].parentNode.removeChild(bC[bB])}}}if(!b.support.leadingWhitespace&&ar.test(bz)){bv.insertBefore(by.createTextNode(ar.exec(bz)[0]),bv.firstChild)}bz=bv.childNodes}}var bG;if(!b.support.appendChecked){if(bz[0]&&typeof(bG=bz.length)==="number"){for(bB=0;bB=0){return bx+"px"}}else{return bx}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bv,e){return au.test((e&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,e=b.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&b.trim(bw.replace(ak,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ak.test(bw)?bw.replace(ak,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bw,bv){var e;b.swap(bw,{display:"inline-block"},function(){if(bv){e=Z(bw,"margin-right","marginRight")}else{e=bw.style.marginRight}});return e}}}});if(av.defaultView&&av.defaultView.getComputedStyle){aI=function(by,bw){var bv,bx,e;bw=bw.replace(z,"-$1").toLowerCase();if((bx=by.ownerDocument.defaultView)&&(e=bx.getComputedStyle(by,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(by.ownerDocument.documentElement,by)){bv=b.style(by,bw)}}return bv}}if(av.documentElement.currentStyle){aX=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv===null&&bx&&(by=bx[bw])){bv=by}if(!bc.test(bv)&&bn.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left}bx.left=bw==="fontSize"?"1em":(bv||0);bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e}}return bv===""?"auto":bv}}Z=aI||aX;function p(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,bz=bw==="width"?an:a1,bx=0,e=bz.length; -if(bA>0){if(bv!=="border"){for(;bx)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,aa={},r={},aE,s,aV=["*/"]+["*"];try{aE=bl.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}s=K.exec(aE.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("
    ").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aZ.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){am(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}am(bv,e);return bv},ajaxSettings:{url:aE,isLocal:aM.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aV},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bb.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(r),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bj(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=G(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,s[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=s[1]||bI[2]!=s[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aW(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aQ.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aV+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aW(r,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){v(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{v(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){v(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!a8){a8=av.createElement("iframe");a8.frameBorder=a8.width=a8.height=0}e.appendChild(a8);if(!m||!a8.createElement){m=(a8.contentWindow||a8.contentDocument).document;m.write((av.compatMode==="CSS1Compat"?"":"")+"");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(a8)}Q[bx]=bw}return Q[bx]}var V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aK(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aK(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aK(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,"padding")):this[bw]():null};b.fn["outer"+e]=function(by){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,by?"margin":"border")):this[bw]():null};b.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(b.isFunction(bz)){return this.each(function(bE){var bD=b(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(b.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===L){var bC=b.css(bA,bw),by=parseFloat(bC);return b.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});bb.jQuery=bb.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b -})}})(window); -/*! - * jQuery UI 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI - */ -(function(a,d){a.ui=a.ui||{};if(a.ui.version){return}a.extend(a.ui,{version:"1.8.18",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(e,f){return typeof e==="number"?this.each(function(){var g=this;setTimeout(function(){a(g).focus();if(f){f.call(g)}},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;if((a.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){e=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(a.curCSS(this,"position",1))&&(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}else{e=this.parents().filter(function(){return(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!e.length?a(document):e},zIndex:function(h){if(h!==d){return this.css("zIndex",h)}if(this.length){var f=a(this[0]),e,g;while(f.length&&f[0]!==document){e=f.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){g=parseInt(f.css("zIndex"),10);if(!isNaN(g)&&g!==0){return g}}f=f.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(g,e){var f=e==="Width"?["Left","Right"]:["Top","Bottom"],h=e.toLowerCase(),k={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function j(m,l,i,n){a.each(f,function(){l-=parseFloat(a.curCSS(m,"padding"+this,true))||0;if(i){l-=parseFloat(a.curCSS(m,"border"+this+"Width",true))||0}if(n){l-=parseFloat(a.curCSS(m,"margin"+this,true))||0}});return l}a.fn["inner"+e]=function(i){if(i===d){return k["inner"+e].call(this)}return this.each(function(){a(this).css(h,j(this,i)+"px")})};a.fn["outer"+e]=function(i,l){if(typeof i!=="number"){return k["outer"+e].call(this,i)}return this.each(function(){a(this).css(h,j(this,i,true,l)+"px")})}});function c(g,e){var j=g.nodeName.toLowerCase();if("area"===j){var i=g.parentNode,h=i.name,f;if(!g.href||!h||i.nodeName.toLowerCase()!=="map"){return false}f=a("img[usemap=#"+h+"]")[0];return !!f&&b(f)}return(/input|select|textarea|button|object/.test(j)?!g.disabled:"a"==j?g.href||e:e)&&b(g)}function b(e){return !a(e).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.extend(a.expr[":"],{data:function(g,f,e){return !!a.data(g,e[3])},focusable:function(e){return c(e,!isNaN(a.attr(e,"tabindex")))},tabbable:function(g){var e=a.attr(g,"tabindex"),f=isNaN(e);return(f||e>=0)&&c(g,!f)}});a(function(){var e=document.body,f=e.appendChild(f=document.createElement("div"));f.offsetHeight;a.extend(f.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=f.offsetHeight===100;a.support.selectstart="onselectstart" in f;e.removeChild(f).style.display="none"});a.extend(a.ui,{plugin:{add:function(f,g,j){var h=a.ui[f].prototype;for(var e in j){h.plugins[e]=h.plugins[e]||[];h.plugins[e].push([g,j[e]])}},call:function(e,g,f){var j=e.plugins[g];if(!j||!e.element[0].parentNode){return}for(var h=0;h0){return true}h[e]=1;g=(h[e]>0);h[e]=0;return g},isOverAxis:function(f,e,g){return(f>e)&&(f<(e+g))},isOver:function(j,f,i,h,e,g){return a.ui.isOverAxis(j,i,e)&&a.ui.isOverAxis(f,h,g)}})})(jQuery);/*! - * jQuery UI Widget 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Widget - */ -(function(b,d){if(b.cleanData){var c=b.cleanData;b.cleanData=function(f){for(var g=0,h;(h=f[g])!=null;g++){try{b(h).triggerHandler("remove")}catch(j){}}c(f)}}else{var a=b.fn.remove;b.fn.remove=function(e,f){return this.each(function(){if(!f){if(!e||b.filter(e,[this]).length){b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(g){}})}}return a.call(b(this),e,f)})}}b.widget=function(f,h,e){var g=f.split(".")[0],j;f=f.split(".")[1];j=g+"-"+f;if(!e){e=h;h=b.Widget}b.expr[":"][j]=function(k){return !!b.data(k,f)};b[g]=b[g]||{};b[g][f]=function(k,l){if(arguments.length){this._createWidget(k,l)}};var i=new h();i.options=b.extend(true,{},i.options);b[g][f].prototype=b.extend(true,i,{namespace:g,widgetName:f,widgetEventPrefix:b[g][f].prototype.widgetEventPrefix||f,widgetBaseClass:j},e);b.widget.bridge(f,b[g][f])};b.widget.bridge=function(f,e){b.fn[f]=function(i){var g=typeof i==="string",h=Array.prototype.slice.call(arguments,1),j=this;i=!g&&h.length?b.extend.apply(null,[true,i].concat(h)):i;if(g&&i.charAt(0)==="_"){return j}if(g){this.each(function(){var k=b.data(this,f),l=k&&b.isFunction(k[i])?k[i].apply(k,h):k;if(l!==k&&l!==d){j=l;return false}})}else{this.each(function(){var k=b.data(this,f);if(k){k.option(i||{})._init()}else{b.data(this,f,new e(i,this))}})}return j}};b.Widget=function(e,f){if(arguments.length){this._createWidget(e,f)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(f,g){b.data(g,this.widgetName,this);this.element=b(g);this.options=b.extend(true,{},this.options,this._getCreateOptions(),f);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(f,g){var e=f;if(arguments.length===0){return b.extend({},this.options)}if(typeof f==="string"){if(g===d){return this.options[f]}e={};e[f]=g}this._setOptions(e);return this},_setOptions:function(f){var e=this;b.each(f,function(g,h){e._setOption(g,h)});return this},_setOption:function(e,f){this.options[e]=f;if(e==="disabled"){this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(e,f,g){var j,i,h=this.options[e];g=g||{};f=b.Event(f);f.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase();f.target=this.element[0];i=f.originalEvent;if(i){for(j in i){if(!(j in f)){f[j]=i[j]}}}this.element.trigger(f,g);return !(b.isFunction(h)&&h.call(this.element[0],f,g)===false||f.isDefaultPrevented())}}})(jQuery);/*! - * jQuery UI Mouse 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Mouse - * - * Depends: - * jquery.ui.widget.js - */ -(function(b,c){var a=false;b(document).mouseup(function(d){a=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var d=this;this.element.bind("mousedown."+this.widgetName,function(e){return d._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(true===b.data(e.target,d.widgetName+".preventClickEvent")){b.removeData(e.target,d.widgetName+".preventClickEvent");e.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(f){if(a){return}(this._mouseStarted&&this._mouseUp(f));this._mouseDownEvent=f;var e=this,g=(f.which==1),d=(typeof this.options.cancel=="string"&&f.target.nodeName?b(f.target).closest(this.options.cancel).length:false);if(!g||d||!this._mouseCapture(f)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f)){this._mouseStarted=(this._mouseStart(f)!==false);if(!this._mouseStarted){f.preventDefault();return true}}if(true===b.data(f.target,this.widgetName+".preventClickEvent")){b.removeData(f.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(h){return e._mouseMove(h)};this._mouseUpDelegate=function(h){return e._mouseUp(h)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);f.preventDefault();a=true;return true},_mouseMove:function(d){if(b.browser.msie&&!(document.documentMode>=9)&&!d.button){return this._mouseUp(d)}if(this._mouseStarted){this._mouseDrag(d);return d.preventDefault()}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,d)!==false);(this._mouseStarted?this._mouseDrag(d):this._mouseUp(d))}return !this._mouseStarted},_mouseUp:function(d){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(d.target==this._mouseDownEvent.target){b.data(d.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(d)}return false},_mouseDistanceMet:function(d){return(Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance)},_mouseDelayMet:function(d){return this.mouseDelayMet},_mouseStart:function(d){},_mouseDrag:function(d){},_mouseStop:function(d){},_mouseCapture:function(d){return true}})})(jQuery);(function(c,d){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var f=this,k=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(k.aspectRatio),aspectRatio:k.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:k.helper||k.ghost||k.animate?k.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap(c('
    ').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=k.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var l=this.handles.split(",");this.handles={};for(var g=0;g
    ');if(/sw|se|ne|nw/.test(j)){h.css({zIndex:++k.zIndex})}if("se"==j){h.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[j]=".ui-resizable-"+j;this.element.append(h)}}this._renderAxis=function(q){q=q||this.element;for(var n in this.handles){if(this.handles[n].constructor==String){this.handles[n]=c(this.handles[n],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=c(this.handles[n],this.element),p=0;p=/sw|ne|nw|se|n|s/.test(n)?o.outerHeight():o.outerWidth();var m=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");q.css(m,p);this._proportionallyResize()}if(!c(this.handles[n]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!f.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}f.axis=i&&i[1]?i[1]:"se"}});if(k.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){if(k.disabled){return}c(this).removeClass("ui-resizable-autohide");f._handles.show()},function(){if(k.disabled){return}if(!f.resizing){c(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(g){c(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var f=this.element;f.after(this.originalElement.css({position:f.css("position"),width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(f){var g=false;for(var e in this.handles){if(c(this.handles[e])[0]==f.target){g=true}}return !this.options.disabled&&g},_mouseStart:function(g){var j=this.options,f=this.element.position(),e=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(e.is(".ui-draggable")||(/absolute/).test(e.css("position"))){e.css({position:"absolute",top:f.top,left:f.left})}this._renderProxy();var k=b(this.helper.css("left")),h=b(this.helper.css("top"));if(j.containment){k+=c(j.containment).scrollLeft()||0;h+=c(j.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:k,top:h};this.size=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalSize=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalPosition={left:k,top:h};this.sizeDiff={width:e.outerWidth()-e.width(),height:e.outerHeight()-e.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};this.aspectRatio=(typeof j.aspectRatio=="number")?j.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var i=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",i=="auto"?this.axis+"-resize":i);e.addClass("ui-resizable-resizing");this._propagate("start",g);return true},_mouseDrag:function(e){var h=this.helper,g=this.options,m={},q=this,j=this.originalMousePosition,n=this.axis;var r=(e.pageX-j.left)||0,p=(e.pageY-j.top)||0;var i=this._change[n];if(!i){return false}var l=i.apply(this,[e,r,p]),k=c.browser.msie&&c.browser.version<7,f=this.sizeDiff;this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey){l=this._updateRatio(l,e)}l=this._respectSize(l,e);this._propagate("resize",e);h.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(l);this._trigger("resize",e,this.ui());return false},_mouseStop:function(h){this.resizing=false;var i=this.options,m=this;if(this._helper){var g=this._proportionallyResizeElements,e=g.length&&(/textarea/i).test(g[0].nodeName),f=e&&c.ui.hasScroll(g[0],"left")?0:m.sizeDiff.height,k=e?0:m.sizeDiff.width;var n={width:(m.helper.width()-k),height:(m.helper.height()-f)},j=(parseInt(m.element.css("left"),10)+(m.position.left-m.originalPosition.left))||null,l=(parseInt(m.element.css("top"),10)+(m.position.top-m.originalPosition.top))||null;if(!i.animate){this.element.css(c.extend(n,{top:l,left:j}))}m.helper.height(m.size.height);m.helper.width(m.size.width);if(this._helper&&!i.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",h);if(this._helper){this.helper.remove()}return false},_updateVirtualBoundaries:function(g){var j=this.options,i,h,f,k,e;e={minWidth:a(j.minWidth)?j.minWidth:0,maxWidth:a(j.maxWidth)?j.maxWidth:Infinity,minHeight:a(j.minHeight)?j.minHeight:0,maxHeight:a(j.maxHeight)?j.maxHeight:Infinity};if(this._aspectRatio||g){i=e.minHeight*this.aspectRatio;f=e.minWidth/this.aspectRatio;h=e.maxHeight*this.aspectRatio;k=e.maxWidth/this.aspectRatio;if(i>e.minWidth){e.minWidth=i}if(f>e.minHeight){e.minHeight=f}if(hl.width),s=a(l.height)&&i.minHeight&&(i.minHeight>l.height);if(h){l.width=i.minWidth}if(s){l.height=i.minHeight}if(t){l.width=i.maxWidth}if(m){l.height=i.maxHeight}var f=this.originalPosition.left+this.originalSize.width,p=this.position.top+this.size.height;var k=/sw|nw|w/.test(q),e=/nw|ne|n/.test(q);if(h&&k){l.left=f-i.minWidth}if(t&&k){l.left=f-i.maxWidth}if(s&&e){l.top=p-i.minHeight}if(m&&e){l.top=p-i.maxHeight}var n=!l.width&&!l.height;if(n&&!l.left&&l.top){l.top=null}else{if(n&&!l.top&&l.left){l.left=null}}return l},_proportionallyResize:function(){var k=this.options;if(!this._proportionallyResizeElements.length){return}var g=this.helper||this.element;for(var f=0;f');var e=c.browser.msie&&c.browser.version<7,g=(e?1:0),h=(e?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+h,height:this.element.outerHeight()+h,position:"absolute",left:this.elementOffset.left-g+"px",top:this.elementOffset.top-g+"px",zIndex:++i.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(g,f,e){return{width:this.originalSize.width+f}},w:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{left:i.left+f,width:g.width-f}},n:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{top:i.top+e,height:g.height-e}},s:function(g,f,e){return{height:this.originalSize.height+e}},se:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},sw:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,f,e]))},ne:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},nw:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,f,e]))}},_propagate:function(f,e){c.ui.plugin.call(this,f,[e,this.ui()]);(f!="resize"&&this._trigger(f,e,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.18"});c.ui.plugin.add("resizable","alsoResize",{start:function(f,g){var e=c(this).data("resizable"),i=e.options;var h=function(j){c(j).each(function(){var k=c(this);k.data("resizable-alsoresize",{width:parseInt(k.width(),10),height:parseInt(k.height(),10),left:parseInt(k.css("left"),10),top:parseInt(k.css("top"),10)})})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.parentNode){if(i.alsoResize.length){i.alsoResize=i.alsoResize[0];h(i.alsoResize)}else{c.each(i.alsoResize,function(j){h(j)})}}else{h(i.alsoResize)}},resize:function(g,i){var f=c(this).data("resizable"),j=f.options,h=f.originalSize,l=f.originalPosition;var k={height:(f.size.height-h.height)||0,width:(f.size.width-h.width)||0,top:(f.position.top-l.top)||0,left:(f.position.left-l.left)||0},e=function(m,n){c(m).each(function(){var q=c(this),r=c(this).data("resizable-alsoresize"),p={},o=n&&n.length?n:q.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(o,function(s,u){var t=(r[u]||0)+(k[u]||0);if(t&&t>=0){p[u]=t||null}});q.css(p)})};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(m,n){e(m,n)})}else{e(j.alsoResize)}},stop:function(e,f){c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(i,n){var p=c(this).data("resizable"),j=p.options;var h=p._proportionallyResizeElements,e=h.length&&(/textarea/i).test(h[0].nodeName),f=e&&c.ui.hasScroll(h[0],"left")?0:p.sizeDiff.height,l=e?0:p.sizeDiff.width;var g={width:(p.size.width-l),height:(p.size.height-f)},k=(parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left))||null,m=(parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top))||null; -p.element.animate(c.extend(g,m&&k?{top:m,left:k}:{}),{duration:j.animateDuration,easing:j.animateEasing,step:function(){var o={width:parseInt(p.element.css("width"),10),height:parseInt(p.element.css("height"),10),top:parseInt(p.element.css("top"),10),left:parseInt(p.element.css("left"),10)};if(h&&h.length){c(h[0]).css({width:o.width,height:o.height})}p._updateCache(o);p._propagate("resize",i)}})}});c.ui.plugin.add("resizable","containment",{start:function(f,r){var t=c(this).data("resizable"),j=t.options,l=t.element;var g=j.containment,k=(g instanceof c)?g.get(0):(/parent/.test(g))?l.parent().get(0):g;if(!k){return}t.containerElement=c(k);if(/document/.test(g)||g==document){t.containerOffset={left:0,top:0};t.containerPosition={left:0,top:0};t.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var n=c(k),i=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){i[p]=b(n.css("padding"+o))});t.containerOffset=n.offset();t.containerPosition=n.position();t.containerSize={height:(n.innerHeight()-i[3]),width:(n.innerWidth()-i[1])};var q=t.containerOffset,e=t.containerSize.height,m=t.containerSize.width,h=(c.ui.hasScroll(k,"left")?k.scrollWidth:m),s=(c.ui.hasScroll(k)?k.scrollHeight:e);t.parentData={element:k,left:q.left,top:q.top,width:h,height:s}}},resize:function(g,q){var t=c(this).data("resizable"),i=t.options,f=t.containerSize,p=t.containerOffset,m=t.size,n=t.position,r=t._aspectRatio||g.shiftKey,e={top:0,left:0},h=t.containerElement;if(h[0]!=document&&(/static/).test(h.css("position"))){e=p}if(n.left<(t._helper?p.left:0)){t.size.width=t.size.width+(t._helper?(t.position.left-p.left):(t.position.left-e.left));if(r){t.size.height=t.size.width/i.aspectRatio}t.position.left=i.helper?p.left:0}if(n.top<(t._helper?p.top:0)){t.size.height=t.size.height+(t._helper?(t.position.top-p.top):t.position.top);if(r){t.size.width=t.size.height*i.aspectRatio}t.position.top=t._helper?p.top:0}t.offset.left=t.parentData.left+t.position.left;t.offset.top=t.parentData.top+t.position.top;var l=Math.abs((t._helper?t.offset.left-e.left:(t.offset.left-e.left))+t.sizeDiff.width),s=Math.abs((t._helper?t.offset.top-e.top:(t.offset.top-p.top))+t.sizeDiff.height);var k=t.containerElement.get(0)==t.element.parent().get(0),j=/relative|absolute/.test(t.containerElement.css("position"));if(k&&j){l-=t.parentData.left}if(l+t.size.width>=t.parentData.width){t.size.width=t.parentData.width-l;if(r){t.size.height=t.size.width/t.aspectRatio}}if(s+t.size.height>=t.parentData.height){t.size.height=t.parentData.height-s;if(r){t.size.width=t.size.height*t.aspectRatio}}},stop:function(f,n){var q=c(this).data("resizable"),g=q.options,l=q.position,m=q.containerOffset,e=q.containerPosition,i=q.containerElement;var j=c(q.helper),r=j.offset(),p=j.outerWidth()-q.sizeDiff.width,k=j.outerHeight()-q.sizeDiff.height;if(q._helper&&!g.animate&&(/relative/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}if(q._helper&&!g.animate&&(/static/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}}});c.ui.plugin.add("resizable","ghost",{start:function(g,h){var e=c(this).data("resizable"),i=e.options,f=e.size;e.ghost=e.originalElement.clone();e.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:"");e.ghost.appendTo(e.helper)},resize:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost){e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})}},stop:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost&&e.helper){e.helper.get(0).removeChild(e.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(e,m){var p=c(this).data("resizable"),h=p.options,k=p.size,i=p.originalSize,j=p.originalPosition,n=p.axis,l=h._aspectRatio||e.shiftKey;h.grid=typeof h.grid=="number"?[h.grid,h.grid]:h.grid;var g=Math.round((k.width-i.width)/(h.grid[0]||1))*(h.grid[0]||1),f=Math.round((k.height-i.height)/(h.grid[1]||1))*(h.grid[1]||1);if(/^(se|s|e)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f}else{if(/^(ne)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f}else{if(/^(sw)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.left=j.left-g}else{p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f;p.position.left=j.left-g}}}}});var b=function(e){return parseInt(e,10)||0};var a=function(e){return !isNaN(parseInt(e,10))}})(jQuery);/*! - * jQuery hashchange event - v1.3 - 7/21/2010 - * http://benalman.com/projects/jquery-hashchange-plugin/ - * - * Copyright (c) 2010 "Cowboy" Ben Alman - * Dual licensed under the MIT and GPL licenses. - * http://benalman.com/about/license/ - */ -(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$('