Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73017 - in trunk: boost boost/locale boost/locale/boundary libs/locale libs/locale/build libs/locale/doc libs/locale/doc/html libs/locale/doc/style libs/locale/examples libs/locale/performance libs/locale/src libs/locale/src/encoding libs/locale/src/icu libs/locale/src/posix libs/locale/src/shared libs/locale/src/std libs/locale/src/util libs/locale/src/win32 libs/locale/test libs/locale/test/he libs/locale/test/he/LC_MESSAGES libs/locale/test/he_IL libs/locale/test/he_IL/LC_MESSAGES libs/locale/tools
From: artyomtnk_at_[hidden]
Date: 2011-07-12 09:58:26


Author: artyom
Date: 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
New Revision: 73017
URL: http://svn.boost.org/trac/boost/changeset/73017

Log:
First Version of Boost.Locale integrated into SVN trunk

Added:
   trunk/boost/locale/
   trunk/boost/locale.hpp (contents, props changed)
   trunk/boost/locale/boundary/
   trunk/boost/locale/boundary.hpp (contents, props changed)
   trunk/boost/locale/boundary/boundary_point.hpp (contents, props changed)
   trunk/boost/locale/boundary/facets.hpp (contents, props changed)
   trunk/boost/locale/boundary/index.hpp (contents, props changed)
   trunk/boost/locale/boundary/segment.hpp (contents, props changed)
   trunk/boost/locale/boundary/types.hpp (contents, props changed)
   trunk/boost/locale/collator.hpp (contents, props changed)
   trunk/boost/locale/config.hpp (contents, props changed)
   trunk/boost/locale/conversion.hpp (contents, props changed)
   trunk/boost/locale/date_time.hpp (contents, props changed)
   trunk/boost/locale/date_time_facet.hpp (contents, props changed)
   trunk/boost/locale/encoding.hpp (contents, props changed)
   trunk/boost/locale/format.hpp (contents, props changed)
   trunk/boost/locale/formatting.hpp (contents, props changed)
   trunk/boost/locale/generator.hpp (contents, props changed)
   trunk/boost/locale/gnu_gettext.hpp (contents, props changed)
   trunk/boost/locale/hold_ptr.hpp (contents, props changed)
   trunk/boost/locale/info.hpp (contents, props changed)
   trunk/boost/locale/localization_backend.hpp (contents, props changed)
   trunk/boost/locale/message.hpp (contents, props changed)
   trunk/boost/locale/time_zone.hpp (contents, props changed)
   trunk/boost/locale/util.hpp (contents, props changed)
   trunk/libs/locale/
   trunk/libs/locale/build/
   trunk/libs/locale/build/Jamfile.v2 (contents, props changed)
   trunk/libs/locale/build/has_iconv.cpp (contents, props changed)
   trunk/libs/locale/build/has_icu_test.cpp (contents, props changed)
   trunk/libs/locale/doc/
   trunk/libs/locale/doc/Doxyfile (contents, props changed)
   trunk/libs/locale/doc/appendix.txt (contents, props changed)
   trunk/libs/locale/doc/boundary_analysys.txt (contents, props changed)
   trunk/libs/locale/doc/building_boost_locale.txt (contents, props changed)
   trunk/libs/locale/doc/charset_handling.txt (contents, props changed)
   trunk/libs/locale/doc/collation.txt (contents, props changed)
   trunk/libs/locale/doc/conversions.txt (contents, props changed)
   trunk/libs/locale/doc/dates_times_timezones.txt (contents, props changed)
   trunk/libs/locale/doc/default_encoding_under_windows.txt (contents, props changed)
   trunk/libs/locale/doc/faq.txt (contents, props changed)
   trunk/libs/locale/doc/footer.html (contents, props changed)
   trunk/libs/locale/doc/formatting_and_parsing.txt (contents, props changed)
   trunk/libs/locale/doc/gendoc.sh (contents, props changed)
   trunk/libs/locale/doc/gettext_for_windows.txt (contents, props changed)
   trunk/libs/locale/doc/glossary.txt (contents, props changed)
   trunk/libs/locale/doc/header.html (contents, props changed)
   trunk/libs/locale/doc/html/
   trunk/libs/locale/doc/html/annotated.html (contents, props changed)
   trunk/libs/locale/doc/html/appendix.html (contents, props changed)
   trunk/libs/locale/doc/html/bc_s.png (contents, props changed)
   trunk/libs/locale/doc/html/boundary_8cpp-example.html (contents, props changed)
   trunk/libs/locale/doc/html/boundary_8hpp_source.html (contents, props changed)
   trunk/libs/locale/doc/html/boundary__point_8hpp_source.html (contents, props changed)
   trunk/libs/locale/doc/html/boundary_analysys.html (contents, props changed)
   trunk/libs/locale/doc/html/building_boost_locale.html (contents, props changed)
   trunk/libs/locale/doc/html/calendar_8cpp-example.html (contents, props changed)
   trunk/libs/locale/doc/html/charset_handling.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1abstract__calendar-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1abstract__calendar.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1basic__format-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1basic__format.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1basic__message-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1basic__message.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__indexing-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__indexing.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point__index-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point__index.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1boundary_1_1segment-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1boundary_1_1segment.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1boundary_1_1segment__index-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1boundary_1_1segment__index.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1calendar-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1calendar.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1calendar__facet-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1calendar__facet.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1collator-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1collator.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1collator.png (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1collator__base-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1collator__base.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1collator__base.png (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1conv_1_1conversion__error-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1conv_1_1conversion__error.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1conv_1_1invalid__charset__error-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1conv_1_1invalid__charset__error.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1converter-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1converter.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1converter.png (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1converter__base-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1converter__base.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1converter__base.png (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1date__time-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1date__time.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1date__time__duration-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1date__time__duration.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1date__time__error-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1date__time__error.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1date__time__period__set-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1date__time__period__set.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1generator-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1generator.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1hold__ptr-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1hold__ptr.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1info-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1info.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1ios__info-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1ios__info.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1localization__backend-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1localization__backend.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1localization__backend__manager-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1localization__backend__manager.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1message__format-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1message__format.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1period_1_1period__type-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1period_1_1period__type.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1util_1_1base__converter-members.html (contents, props changed)
   trunk/libs/locale/doc/html/classboost_1_1locale_1_1util_1_1base__converter.html (contents, props changed)
   trunk/libs/locale/doc/html/classes.html (contents, props changed)
   trunk/libs/locale/doc/html/closed.png (contents, props changed)
   trunk/libs/locale/doc/html/collate_8cpp-example.html (contents, props changed)
   trunk/libs/locale/doc/html/collation.html (contents, props changed)
   trunk/libs/locale/doc/html/collator_8hpp_source.html (contents, props changed)
   trunk/libs/locale/doc/html/config_8hpp_source.html (contents, props changed)
   trunk/libs/locale/doc/html/conversion_8hpp_source.html (contents, props changed)
   trunk/libs/locale/doc/html/conversions.html (contents, props changed)
   trunk/libs/locale/doc/html/conversions_8cpp-example.html (contents, props changed)
   trunk/libs/locale/doc/html/date__time_8hpp_source.html (contents, props changed)
   trunk/libs/locale/doc/html/date__time__facet_8hpp_source.html (contents, props changed)
   trunk/libs/locale/doc/html/dates_times_timezones.html (contents, props changed)
   trunk/libs/locale/doc/html/default_encoding_under_windows.html (contents, props changed)
   trunk/libs/locale/doc/html/doxygen.css (contents, props changed)
   trunk/libs/locale/doc/html/doxygen.png (contents, props changed)
   trunk/libs/locale/doc/html/encoding_8hpp_source.html (contents, props changed)
   trunk/libs/locale/doc/html/examples.html (contents, props changed)
   trunk/libs/locale/doc/html/facets_8hpp_source.html (contents, props changed)
   trunk/libs/locale/doc/html/faq.html (contents, props changed)
   trunk/libs/locale/doc/html/files.html (contents, props changed)
   trunk/libs/locale/doc/html/format_8hpp_source.html (contents, props changed)
   trunk/libs/locale/doc/html/formatting_8hpp_source.html (contents, props changed)
   trunk/libs/locale/doc/html/formatting_and_parsing.html (contents, props changed)
   trunk/libs/locale/doc/html/ftv2blank.png (contents, props changed)
   trunk/libs/locale/doc/html/ftv2doc.png (contents, props changed)
   trunk/libs/locale/doc/html/ftv2folderclosed.png (contents, props changed)
   trunk/libs/locale/doc/html/ftv2folderopen.png (contents, props changed)
   trunk/libs/locale/doc/html/ftv2lastnode.png (contents, props changed)
   trunk/libs/locale/doc/html/ftv2link.png (contents, props changed)
   trunk/libs/locale/doc/html/ftv2mlastnode.png (contents, props changed)
   trunk/libs/locale/doc/html/ftv2mnode.png (contents, props changed)
   trunk/libs/locale/doc/html/ftv2node.png (contents, props changed)
   trunk/libs/locale/doc/html/ftv2plastnode.png (contents, props changed)
   trunk/libs/locale/doc/html/ftv2pnode.png (contents, props changed)
   trunk/libs/locale/doc/html/ftv2vertline.png (contents, props changed)
   trunk/libs/locale/doc/html/functions.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_0x62.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_0x63.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_0x64.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_0x65.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_0x66.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_0x67.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_0x68.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_0x69.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_0x6c.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_0x6d.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_0x6e.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_0x6f.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_0x70.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_0x71.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_0x72.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_0x73.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_0x74.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_0x75.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_0x76.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_0x77.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_0x7e.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_enum.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_eval.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_func.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_func_0x62.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_func_0x63.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_func_0x64.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_func_0x65.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_func_0x66.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_func_0x67.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_func_0x68.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_func_0x69.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_func_0x6c.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_func_0x6d.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_func_0x6e.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_func_0x6f.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_func_0x70.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_func_0x72.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_func_0x73.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_func_0x74.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_func_0x75.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_func_0x76.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_func_0x77.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_func_0x7e.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_type.html (contents, props changed)
   trunk/libs/locale/doc/html/functions_vars.html (contents, props changed)
   trunk/libs/locale/doc/html/generator_8hpp_source.html (contents, props changed)
   trunk/libs/locale/doc/html/gettext_for_windows.html (contents, props changed)
   trunk/libs/locale/doc/html/glossary.html (contents, props changed)
   trunk/libs/locale/doc/html/gnu__gettext_8hpp_source.html (contents, props changed)
   trunk/libs/locale/doc/html/group__boundary.html (contents, props changed)
   trunk/libs/locale/doc/html/group__codepage.html (contents, props changed)
   trunk/libs/locale/doc/html/group__collation.html (contents, props changed)
   trunk/libs/locale/doc/html/group__convert.html (contents, props changed)
   trunk/libs/locale/doc/html/group__date__time.html (contents, props changed)
   trunk/libs/locale/doc/html/group__format.html (contents, props changed)
   trunk/libs/locale/doc/html/group__manipulators.html (contents, props changed)
   trunk/libs/locale/doc/html/group__message.html (contents, props changed)
   trunk/libs/locale/doc/html/hello_8cpp-example.html (contents, props changed)
   trunk/libs/locale/doc/html/hierarchy.html (contents, props changed)
   trunk/libs/locale/doc/html/hold__ptr_8hpp_source.html (contents, props changed)
   trunk/libs/locale/doc/html/index.html (contents, props changed)
   trunk/libs/locale/doc/html/index_8hpp_source.html (contents, props changed)
   trunk/libs/locale/doc/html/info_8hpp_source.html (contents, props changed)
   trunk/libs/locale/doc/html/locale_gen.html (contents, props changed)
   trunk/libs/locale/doc/html/locale_information.html (contents, props changed)
   trunk/libs/locale/doc/html/localization__backend_8hpp_source.html (contents, props changed)
   trunk/libs/locale/doc/html/localized_text_formatting.html (contents, props changed)
   trunk/libs/locale/doc/html/main.html (contents, props changed)
   trunk/libs/locale/doc/html/message_8hpp_source.html (contents, props changed)
   trunk/libs/locale/doc/html/messages_formatting.html (contents, props changed)
   trunk/libs/locale/doc/html/modules.html (contents, props changed)
   trunk/libs/locale/doc/html/namespaceboost_1_1locale.html (contents, props changed)
   trunk/libs/locale/doc/html/namespaceboost_1_1locale_1_1as.html (contents, props changed)
   trunk/libs/locale/doc/html/namespaceboost_1_1locale_1_1boundary.html (contents, props changed)
   trunk/libs/locale/doc/html/namespaceboost_1_1locale_1_1conv.html (contents, props changed)
   trunk/libs/locale/doc/html/namespaceboost_1_1locale_1_1flags.html (contents, props changed)
   trunk/libs/locale/doc/html/namespaceboost_1_1locale_1_1gnu__gettext.html (contents, props changed)
   trunk/libs/locale/doc/html/namespaceboost_1_1locale_1_1period.html (contents, props changed)
   trunk/libs/locale/doc/html/namespaceboost_1_1locale_1_1period_1_1marks.html (contents, props changed)
   trunk/libs/locale/doc/html/namespaceboost_1_1locale_1_1time__zone.html (contents, props changed)
   trunk/libs/locale/doc/html/namespaceboost_1_1locale_1_1util.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_0x62.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_0x63.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_0x64.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_0x65.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_0x66.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_0x67.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_0x68.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_0x69.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_0x6a.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_0x6c.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_0x6d.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_0x6e.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_0x6f.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_0x70.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_0x72.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_0x73.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_0x74.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_0x75.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_0x76.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_0x77.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_0x79.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_enum.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_eval.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_func.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_func_0x62.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_func_0x63.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_func_0x64.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_func_0x65.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_func_0x66.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_func_0x67.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_func_0x68.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_func_0x69.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_func_0x6a.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_func_0x6c.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_func_0x6d.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_func_0x6e.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_func_0x6f.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_func_0x70.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_func_0x73.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_func_0x74.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_func_0x75.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_func_0x77.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_func_0x79.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_type.html (contents, props changed)
   trunk/libs/locale/doc/html/namespacemembers_vars.html (contents, props changed)
   trunk/libs/locale/doc/html/namespaces.html (contents, props changed)
   trunk/libs/locale/doc/html/nav_f.png (contents, props changed)
   trunk/libs/locale/doc/html/nav_h.png (contents, props changed)
   trunk/libs/locale/doc/html/open.png (contents, props changed)
   trunk/libs/locale/doc/html/rationale.html (contents, props changed)
   trunk/libs/locale/doc/html/recommendations_and_myths.html (contents, props changed)
   trunk/libs/locale/doc/html/running_examples_under_windows.html (contents, props changed)
   trunk/libs/locale/doc/html/segment_8hpp_source.html (contents, props changed)
   trunk/libs/locale/doc/html/special_thanks.html (contents, props changed)
   trunk/libs/locale/doc/html/status_of_cpp0x_characters_support.html (contents, props changed)
   trunk/libs/locale/doc/html/std_locales.html (contents, props changed)
   trunk/libs/locale/doc/html/structboost_1_1locale_1_1boundary_1_1break__info-members.html (contents, props changed)
   trunk/libs/locale/doc/html/structboost_1_1locale_1_1boundary_1_1break__info.html (contents, props changed)
   trunk/libs/locale/doc/html/structboost_1_1locale_1_1comparator-members.html (contents, props changed)
   trunk/libs/locale/doc/html/structboost_1_1locale_1_1comparator.html (contents, props changed)
   trunk/libs/locale/doc/html/structboost_1_1locale_1_1date__time__period-members.html (contents, props changed)
   trunk/libs/locale/doc/html/structboost_1_1locale_1_1date__time__period.html (contents, props changed)
   trunk/libs/locale/doc/html/structboost_1_1locale_1_1gnu__gettext_1_1messages__info-members.html (contents, props changed)
   trunk/libs/locale/doc/html/structboost_1_1locale_1_1gnu__gettext_1_1messages__info.html (contents, props changed)
   trunk/libs/locale/doc/html/structboost_1_1locale_1_1gnu__gettext_1_1messages__info_1_1domain-members.html (contents, props changed)
   trunk/libs/locale/doc/html/structboost_1_1locale_1_1gnu__gettext_1_1messages__info_1_1domain.html (contents, props changed)
   trunk/libs/locale/doc/html/structboost_1_1locale_1_1posix__time-members.html (contents, props changed)
   trunk/libs/locale/doc/html/structboost_1_1locale_1_1posix__time.html (contents, props changed)
   trunk/libs/locale/doc/html/tab_a.png (contents, props changed)
   trunk/libs/locale/doc/html/tab_b.png (contents, props changed)
   trunk/libs/locale/doc/html/tab_h.png (contents, props changed)
   trunk/libs/locale/doc/html/tab_s.png (contents, props changed)
   trunk/libs/locale/doc/html/tabs.css (contents, props changed)
   trunk/libs/locale/doc/html/tested_compilers_and_paltforms.html (contents, props changed)
   trunk/libs/locale/doc/html/time__zone_8hpp_source.html (contents, props changed)
   trunk/libs/locale/doc/html/tree.html (contents, props changed)
   trunk/libs/locale/doc/html/types_8hpp_source.html (contents, props changed)
   trunk/libs/locale/doc/html/using_boost_locale.html (contents, props changed)
   trunk/libs/locale/doc/html/using_localization_backends.html (contents, props changed)
   trunk/libs/locale/doc/html/util_8hpp_source.html (contents, props changed)
   trunk/libs/locale/doc/html/wboundary_8cpp-example.html (contents, props changed)
   trunk/libs/locale/doc/html/wconversions_8cpp-example.html (contents, props changed)
   trunk/libs/locale/doc/html/whello_8cpp-example.html (contents, props changed)
   trunk/libs/locale/doc/html/working_with_multiple_locales.html (contents, props changed)
   trunk/libs/locale/doc/index.template.html (contents, props changed)
   trunk/libs/locale/doc/locale_gen.txt (contents, props changed)
   trunk/libs/locale/doc/locale_information.txt (contents, props changed)
   trunk/libs/locale/doc/localized_text_formatting.txt (contents, props changed)
   trunk/libs/locale/doc/main.txt (contents, props changed)
   trunk/libs/locale/doc/messages_formatting.txt (contents, props changed)
   trunk/libs/locale/doc/rationale.txt (contents, props changed)
   trunk/libs/locale/doc/recommendations_and_myths.txt (contents, props changed)
   trunk/libs/locale/doc/running_examples_under_windows.txt (contents, props changed)
   trunk/libs/locale/doc/special_thanks.txt (contents, props changed)
   trunk/libs/locale/doc/status_of_cpp0x_characters_support.txt (contents, props changed)
   trunk/libs/locale/doc/std_locales.txt (contents, props changed)
   trunk/libs/locale/doc/style/
   trunk/libs/locale/doc/style/boost_small.png (contents, props changed)
   trunk/libs/locale/doc/style/header-bg.png (contents, props changed)
   trunk/libs/locale/doc/style/header-fg.png (contents, props changed)
   trunk/libs/locale/doc/style/header.css (contents, props changed)
   trunk/libs/locale/doc/style/header_grass.css (contents, props changed)
   trunk/libs/locale/doc/style/section-basic.css (contents, props changed)
   trunk/libs/locale/doc/style/space.png (contents, props changed)
   trunk/libs/locale/doc/tested_compilers_and_paltforms.txt (contents, props changed)
   trunk/libs/locale/doc/using_boost_locale.txt (contents, props changed)
   trunk/libs/locale/doc/using_localization_backends.txt (contents, props changed)
   trunk/libs/locale/doc/working_with_multiple_locales.txt (contents, props changed)
   trunk/libs/locale/examples/
   trunk/libs/locale/examples/boundary.cpp (contents, props changed)
   trunk/libs/locale/examples/calendar.cpp (contents, props changed)
   trunk/libs/locale/examples/collate.cpp (contents, props changed)
   trunk/libs/locale/examples/conversions.cpp (contents, props changed)
   trunk/libs/locale/examples/hello.cpp (contents, props changed)
   trunk/libs/locale/examples/wboundary.cpp (contents, props changed)
   trunk/libs/locale/examples/wconversions.cpp (contents, props changed)
   trunk/libs/locale/examples/whello.cpp (contents, props changed)
   trunk/libs/locale/index.html (contents, props changed)
   trunk/libs/locale/performance/
   trunk/libs/locale/performance/perf_collate.cpp (contents, props changed)
   trunk/libs/locale/performance/perf_convert.cpp (contents, props changed)
   trunk/libs/locale/performance/perf_format.cpp (contents, props changed)
   trunk/libs/locale/src/
   trunk/libs/locale/src/encoding/
   trunk/libs/locale/src/encoding/codepage.cpp (contents, props changed)
   trunk/libs/locale/src/encoding/conv.hpp (contents, props changed)
   trunk/libs/locale/src/encoding/iconv_codepage.ipp (contents, props changed)
   trunk/libs/locale/src/encoding/uconv_codepage.ipp (contents, props changed)
   trunk/libs/locale/src/encoding/wconv_codepage.ipp (contents, props changed)
   trunk/libs/locale/src/icu/
   trunk/libs/locale/src/icu/all_generator.hpp (contents, props changed)
   trunk/libs/locale/src/icu/boundary.cpp (contents, props changed)
   trunk/libs/locale/src/icu/cdata.hpp (contents, props changed)
   trunk/libs/locale/src/icu/codecvt.cpp (contents, props changed)
   trunk/libs/locale/src/icu/codecvt.hpp (contents, props changed)
   trunk/libs/locale/src/icu/collator.cpp (contents, props changed)
   trunk/libs/locale/src/icu/conversion.cpp (contents, props changed)
   trunk/libs/locale/src/icu/date_time.cpp (contents, props changed)
   trunk/libs/locale/src/icu/formatter.cpp (contents, props changed)
   trunk/libs/locale/src/icu/formatter.hpp (contents, props changed)
   trunk/libs/locale/src/icu/icu_backend.cpp (contents, props changed)
   trunk/libs/locale/src/icu/icu_backend.hpp (contents, props changed)
   trunk/libs/locale/src/icu/icu_util.hpp (contents, props changed)
   trunk/libs/locale/src/icu/numeric.cpp (contents, props changed)
   trunk/libs/locale/src/icu/predefined_formatters.hpp (contents, props changed)
   trunk/libs/locale/src/icu/time_zone.cpp (contents, props changed)
   trunk/libs/locale/src/icu/time_zone.hpp (contents, props changed)
   trunk/libs/locale/src/icu/uconv.hpp (contents, props changed)
   trunk/libs/locale/src/posix/
   trunk/libs/locale/src/posix/all_generator.hpp (contents, props changed)
   trunk/libs/locale/src/posix/codecvt.cpp (contents, props changed)
   trunk/libs/locale/src/posix/codecvt.hpp (contents, props changed)
   trunk/libs/locale/src/posix/collate.cpp (contents, props changed)
   trunk/libs/locale/src/posix/converter.cpp (contents, props changed)
   trunk/libs/locale/src/posix/numeric.cpp (contents, props changed)
   trunk/libs/locale/src/posix/posix_backend.cpp (contents, props changed)
   trunk/libs/locale/src/posix/posix_backend.hpp (contents, props changed)
   trunk/libs/locale/src/shared/
   trunk/libs/locale/src/shared/date_time.cpp (contents, props changed)
   trunk/libs/locale/src/shared/format.cpp (contents, props changed)
   trunk/libs/locale/src/shared/formatting.cpp (contents, props changed)
   trunk/libs/locale/src/shared/generator.cpp (contents, props changed)
   trunk/libs/locale/src/shared/ids.cpp (contents, props changed)
   trunk/libs/locale/src/shared/ios_prop.hpp (contents, props changed)
   trunk/libs/locale/src/shared/localization_backend.cpp (contents, props changed)
   trunk/libs/locale/src/shared/message.cpp (contents, props changed)
   trunk/libs/locale/src/shared/mo_hash.hpp (contents, props changed)
   trunk/libs/locale/src/shared/mo_lambda.cpp (contents, props changed)
   trunk/libs/locale/src/shared/mo_lambda.hpp (contents, props changed)
   trunk/libs/locale/src/std/
   trunk/libs/locale/src/std/all_generator.hpp (contents, props changed)
   trunk/libs/locale/src/std/codecvt.cpp (contents, props changed)
   trunk/libs/locale/src/std/collate.cpp (contents, props changed)
   trunk/libs/locale/src/std/converter.cpp (contents, props changed)
   trunk/libs/locale/src/std/numeric.cpp (contents, props changed)
   trunk/libs/locale/src/std/std_backend.cpp (contents, props changed)
   trunk/libs/locale/src/std/std_backend.hpp (contents, props changed)
   trunk/libs/locale/src/util/
   trunk/libs/locale/src/util/codecvt_converter.cpp (contents, props changed)
   trunk/libs/locale/src/util/default_locale.cpp (contents, props changed)
   trunk/libs/locale/src/util/gregorian.cpp (contents, props changed)
   trunk/libs/locale/src/util/gregorian.hpp (contents, props changed)
   trunk/libs/locale/src/util/iconv.hpp (contents, props changed)
   trunk/libs/locale/src/util/info.cpp (contents, props changed)
   trunk/libs/locale/src/util/locale_data.cpp (contents, props changed)
   trunk/libs/locale/src/util/locale_data.hpp (contents, props changed)
   trunk/libs/locale/src/util/numeric.hpp (contents, props changed)
   trunk/libs/locale/src/util/timezone.hpp (contents, props changed)
   trunk/libs/locale/src/win32/
   trunk/libs/locale/src/win32/all_generator.hpp (contents, props changed)
   trunk/libs/locale/src/win32/api.hpp (contents, props changed)
   trunk/libs/locale/src/win32/collate.cpp (contents, props changed)
   trunk/libs/locale/src/win32/converter.cpp (contents, props changed)
   trunk/libs/locale/src/win32/lcid.cpp (contents, props changed)
   trunk/libs/locale/src/win32/lcid.hpp (contents, props changed)
   trunk/libs/locale/src/win32/numeric.cpp (contents, props changed)
   trunk/libs/locale/src/win32/win_backend.cpp (contents, props changed)
   trunk/libs/locale/src/win32/win_backend.hpp (contents, props changed)
   trunk/libs/locale/test/
   trunk/libs/locale/test/Jamfile.v2 (contents, props changed)
   trunk/libs/locale/test/generate_catalogs.sh (contents, props changed)
   trunk/libs/locale/test/he/
   trunk/libs/locale/test/he/LC_MESSAGES/
   trunk/libs/locale/test/he/LC_MESSAGES/default.mo (contents, props changed)
   trunk/libs/locale/test/he/LC_MESSAGES/default.po (contents, props changed)
   trunk/libs/locale/test/he/LC_MESSAGES/fall.mo (contents, props changed)
   trunk/libs/locale/test/he/LC_MESSAGES/fall.po (contents, props changed)
   trunk/libs/locale/test/he/LC_MESSAGES/simple.mo (contents, props changed)
   trunk/libs/locale/test/he/LC_MESSAGES/simple.po (contents, props changed)
   trunk/libs/locale/test/he_IL/
   trunk/libs/locale/test/he_IL/LC_MESSAGES/
   trunk/libs/locale/test/he_IL/LC_MESSAGES/full.mo (contents, props changed)
   trunk/libs/locale/test/he_IL/LC_MESSAGES/full.po (contents, props changed)
   trunk/libs/locale/test/test_boundary.cpp (contents, props changed)
   trunk/libs/locale/test/test_codepage.cpp (contents, props changed)
   trunk/libs/locale/test/test_codepage_converter.cpp (contents, props changed)
   trunk/libs/locale/test/test_collate.cpp (contents, props changed)
   trunk/libs/locale/test/test_convert.cpp (contents, props changed)
   trunk/libs/locale/test/test_date_time.cpp (contents, props changed)
   trunk/libs/locale/test/test_formatting.cpp (contents, props changed)
   trunk/libs/locale/test/test_generator.cpp (contents, props changed)
   trunk/libs/locale/test/test_icu_vs_os_timezone.cpp (contents, props changed)
   trunk/libs/locale/test/test_ios_prop.cpp (contents, props changed)
   trunk/libs/locale/test/test_locale.hpp (contents, props changed)
   trunk/libs/locale/test/test_locale_tools.hpp (contents, props changed)
   trunk/libs/locale/test/test_message.cpp (contents, props changed)
   trunk/libs/locale/test/test_posix_collate.cpp (contents, props changed)
   trunk/libs/locale/test/test_posix_convert.cpp (contents, props changed)
   trunk/libs/locale/test/test_posix_formatting.cpp (contents, props changed)
   trunk/libs/locale/test/test_posix_tools.hpp (contents, props changed)
   trunk/libs/locale/test/test_std_collate.cpp (contents, props changed)
   trunk/libs/locale/test/test_std_convert.cpp (contents, props changed)
   trunk/libs/locale/test/test_std_formatting.cpp (contents, props changed)
   trunk/libs/locale/test/test_winapi_collate.cpp (contents, props changed)
   trunk/libs/locale/test/test_winapi_convert.cpp (contents, props changed)
   trunk/libs/locale/test/test_winapi_formatting.cpp (contents, props changed)
   trunk/libs/locale/tools/
   trunk/libs/locale/tools/cross-compile-gettext.sh (contents, props changed)

Added: trunk/boost/locale.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/locale.hpp 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,27 @@
+//
+// 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_HPP_INCLUDED
+#define BOOST_LOCALE_HPP_INCLUDED
+
+#include <boost/locale/boundary.hpp>
+#include <boost/locale/collator.hpp>
+#include <boost/locale/conversion.hpp>
+#include <boost/locale/date_time.hpp>
+#include <boost/locale/date_time_facet.hpp>
+#include <boost/locale/encoding.hpp>
+#include <boost/locale/format.hpp>
+#include <boost/locale/formatting.hpp>
+#include <boost/locale/generator.hpp>
+#include <boost/locale/gnu_gettext.hpp>
+#include <boost/locale/info.hpp>
+#include <boost/locale/localization_backend.hpp>
+#include <boost/locale/message.hpp>
+#include <boost/locale/util.hpp>
+
+#endif
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4

Added: trunk/boost/locale/boundary.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/locale/boundary.hpp 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,18 @@
+//
+// 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_BOUNDARY_HPP_INCLUDED
+#define BOOST_LOCALE_BOUNDARY_HPP_INCLUDED
+
+#include <boost/locale/boundary/types.hpp>
+#include <boost/locale/boundary/facets.hpp>
+#include <boost/locale/boundary/segment.hpp>
+#include <boost/locale/boundary/boundary_point.hpp>
+#include <boost/locale/boundary/index.hpp>
+
+#endif
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4

Added: trunk/boost/locale/boundary/boundary_point.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/locale/boundary/boundary_point.hpp 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,183 @@
+//
+// 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_BOUNDARY_BOUNDARY_POINT_HPP_INCLUDED
+#define BOOST_LOCALE_BOUNDARY_BOUNDARY_POINT_HPP_INCLUDED
+
+#include <boost/locale/boundary/types.hpp>
+
+namespace boost {
+namespace locale {
+namespace boundary {
+
+ ///
+ /// \addtogroup boundary
+ /// @{
+
+ ///
+ /// \brief 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() & \ref sentence_term) != 0 means
+ /// that this boundary point was selected because a sentence terminator (like .?!) was spotted
+ /// and the (rule() & \ref 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
+ ///
+ /// - \ref boundary_point_index
+ /// - \ref segment
+ /// - \ref segment_index
+ ///
+ template<typename IteratorType>
+ class boundary_point {
+ public:
+ ///
+ /// The type of the base iterator that iterates the original text
+ ///
+ typedef IteratorType iterator_type;
+
+ ///
+ /// Empty default constructor
+ ///
+ boundary_point() : rule_(0) {}
+
+ ///
+ /// Create a new boundary_point using iterator \p and a rule \a r
+ ///
+ boundary_point(iterator_type p,rule_type r) :
+ iterator_(p),
+ rule_(r)
+ {
+ }
+ ///
+ /// Set an new iterator value \a i
+ ///
+ void iterator(iterator_type i)
+ {
+ iterator_ = i;
+ }
+ ///
+ /// Set an new rule value \a r
+ ///
+ void rule(rule_type r)
+ {
+ rule_ = r;
+ }
+ ///
+ /// Fetch an iterator
+ ///
+ iterator_type iterator() const
+ {
+ return iterator_;
+ }
+ ///
+ /// Fetch a rule
+ ///
+ rule_type rule() const
+ {
+ return rule_;
+ }
+ ///
+ /// Check if two boundary points are the same
+ ///
+ bool operator==(boundary_point const &other) const
+ {
+ return iterator_ == other.iterator_ && rule_ = other.rule_;
+ }
+ ///
+ /// Check if two boundary points are different
+ ///
+ bool operator!=(boundary_point const &other) const
+ {
+ return !(*this==other);
+ }
+ ///
+ /// Check if the boundary point points to same location as an iterator \a other
+ ///
+ bool operator==(iterator_type const &other) const
+ {
+ return iterator_ == other;
+ }
+ ///
+ /// Check if the boundary point points to different location from an iterator \a other
+ ///
+ bool operator!=(iterator_type const &other) const
+ {
+ return iterator_ != other;
+ }
+
+ ///
+ /// Automatic cast to the iterator it represents
+ ///
+ operator iterator_type ()const
+ {
+ return iterator_;
+ }
+
+ private:
+ iterator_type iterator_;
+ rule_type rule_;
+
+ };
+ ///
+ /// Check if the boundary point \a r points to same location as an iterator \a l
+ ///
+ template<typename BaseIterator>
+ bool operator==(BaseIterator const &l,boundary_point<BaseIterator> const &r)
+ {
+ return r==l;
+ }
+ ///
+ /// Check if the boundary point \a r points to different location from an iterator \a l
+ ///
+ template<typename BaseIterator>
+ bool operator!=(BaseIterator const &l,boundary_point<BaseIterator> const &r)
+ {
+ return r!=l;
+ }
+
+ /// @}
+
+ typedef boundary_point<std::string::const_iterator> sboundary_point; ///< convenience typedef
+ typedef boundary_point<std::wstring::const_iterator> wsboundary_point; ///< convenience typedef
+ #ifdef BOOST_HAS_CHAR16_T
+ typedef boundary_point<std::u16string::const_iterator> u16sboundary_point;///< convenience typedef
+ #endif
+ #ifdef BOOST_HAS_CHAR32_T
+ typedef boundary_point<std::u32string::const_iterator> u32sboundary_point;///< convenience typedef
+ #endif
+
+ typedef boundary_point<char const *> cboundary_point; ///< convenience typedef
+ typedef boundary_point<wchar_t const *> wcboundary_point; ///< convenience typedef
+ #ifdef BOOST_HAS_CHAR16_T
+ typedef boundary_point<char16_t const *> u16cboundary_point; ///< convenience typedef
+ #endif
+ #ifdef BOOST_HAS_CHAR32_T
+ typedef boundary_point<char32_t const *> u32cboundary_point; ///< convenience typedef
+ #endif
+
+
+} // boundary
+} // locale
+} // boost
+
+
+#endif
+
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4

Added: trunk/boost/locale/boundary/facets.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/locale/boundary/facets.hpp 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,203 @@
+//
+// 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_BOUNDARY_FACETS_HPP_INCLUDED
+#define BOOST_LOCALE_BOUNDARY_FACETS_HPP_INCLUDED
+
+#include <boost/locale/config.hpp>
+#include <boost/locale/boundary/types.hpp>
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4275 4251 4231 4660)
+#endif
+#include <locale>
+#include <vector>
+
+
+
+
+namespace boost {
+
+ namespace locale {
+
+ ///
+ /// \brief This namespae contains all operations required for boundary analysis of text
+ ///
+ namespace boundary {
+ ///
+ /// \addtogroup boundary
+ ///
+ /// @{
+ ///
+
+
+ ///
+ /// \brief This structure is used for representing boundary point
+ /// that follows the offset.
+ ///
+ struct break_info {
+
+ ///
+ /// Create empty break point at beginning
+ ///
+ break_info() :
+ offset(0),
+ rule(0)
+ {
+ }
+ ///
+ /// Create empty break point at offset v.
+ /// it is useful for order comparison with other points.
+ ///
+ break_info(size_t v) :
+ offset(v),
+ rule(0)
+ {
+ }
+
+ ///
+ /// Offset from the beggining of the text where a break occurs.
+ ///
+ size_t offset;
+ ///
+ /// 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.
+ ///
+ bool operator<(break_info const &other) const
+ {
+ return offset < other.offset;
+ }
+ };
+
+ ///
+ /// This type holds the analysis of the text - all its break points
+ /// with marks
+ ///
+ typedef std::vector<break_info> index_type;
+
+
+ template<typename CharType>
+ class boundary_indexing;
+
+ #ifdef BOOST_LOCALE_DOXYGEN
+ ///
+ /// \brief This facet generates an index for boundary analysis
+ /// for a given text.
+ ///
+ /// It is specialized for 4 types of characters \c char_t, \c wchar_t, \c char16_t and \c char32_t
+ ///
+ template<typename Char>
+ class BOOST_LOCALE_DECL boundary_indexing : public std::locale::facet {
+ public:
+ ///
+ /// Default constructor typical for facets
+ ///
+ boundary_indexing(size_t refs=0) : std::locale::facet(refs)
+ {
+ }
+ ///
+ /// Create index for boundary type \a t for text in range [begin,end)
+ ///
+ /// The returned value is an index of type \ref 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.
+ ///
+ virtual index_type map(boundary_type t,Char const *begin,Char const *end) const = 0;
+ ///
+ /// 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
+ };
+
+ #else
+
+ template<>
+ class BOOST_LOCALE_DECL boundary_indexing<char> : public std::locale::facet {
+ public:
+ boundary_indexing(size_t refs=0) : std::locale::facet(refs)
+ {
+ }
+ 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)
+ std::locale::id& __get_id (void) const { return id; }
+ #endif
+ };
+
+ template<>
+ class BOOST_LOCALE_DECL boundary_indexing<wchar_t> : public std::locale::facet {
+ public:
+ boundary_indexing(size_t refs=0) : std::locale::facet(refs)
+ {
+ }
+ virtual index_type map(boundary_type t,wchar_t const *begin,wchar_t const *end) const = 0;
+
+ static std::locale::id id;
+ #if defined (__SUNPRO_CC) && defined (_RWSTD_VER)
+ std::locale::id& __get_id (void) const { return id; }
+ #endif
+ };
+
+ #ifdef BOOST_HAS_CHAR16_T
+ template<>
+ class BOOST_LOCALE_DECL boundary_indexing<char16_t> : public std::locale::facet {
+ public:
+ boundary_indexing(size_t refs=0) : std::locale::facet(refs)
+ {
+ }
+ 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)
+ std::locale::id& __get_id (void) const { return id; }
+ #endif
+ };
+ #endif
+
+ #ifdef BOOST_HAS_CHAR32_T
+ template<>
+ class BOOST_LOCALE_DECL boundary_indexing<char32_t> : public std::locale::facet {
+ public:
+ boundary_indexing(size_t refs=0) : std::locale::facet(refs)
+ {
+ }
+ 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)
+ std::locale::id& __get_id (void) const { return id; }
+ #endif
+ };
+ #endif
+
+ #endif
+
+ ///
+ /// @}
+ ///
+
+
+ } // boundary
+
+ } // locale
+} // boost
+
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4

Added: trunk/boost/locale/boundary/index.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/locale/boundary/index.hpp 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,1113 @@
+//
+// 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_BOUNDARY_INDEX_HPP_INCLUDED
+#define BOOST_LOCALE_BOUNDARY_INDEX_HPP_INCLUDED
+
+#include <boost/locale/config.hpp>
+#include <boost/locale/boundary/types.hpp>
+#include <boost/locale/boundary/facets.hpp>
+#include <boost/locale/boundary/segment.hpp>
+#include <boost/locale/boundary/boundary_point.hpp>
+#include <boost/iterator/iterator_facade.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/assert.hpp>
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4275 4251 4231 4660)
+#endif
+#include <string>
+#include <locale>
+#include <vector>
+#include <iterator>
+#include <algorithm>
+#include <stdexcept>
+
+#include <iostream>
+
+namespace boost {
+
+ namespace locale {
+
+ namespace boundary {
+ ///
+ /// \defgroup boundary Boundary Analysis
+ ///
+ /// This module contains all operations required for %boundary analysis of text: character, word, like and sentence boundaries
+ ///
+ /// @{
+ ///
+
+ /// \cond INTERNAL
+
+ namespace details {
+
+ template<typename IteratorType,typename CategoryType = typename std::iterator_traits<IteratorType>::iterator_category>
+ struct mapping_traits {
+ typedef typename std::iterator_traits<IteratorType>::value_type char_type;
+ static index_type map(boundary_type t,IteratorType b,IteratorType e,std::locale const &l)
+ {
+ std::basic_string<char_type> str(b,e);
+ return std::use_facet<boundary_indexing<char_type> >(l).map(t,str.c_str(),str.c_str()+str.size());
+ }
+ };
+
+ template<typename CharType,typename SomeIteratorType>
+ struct linear_iterator_traits {
+ static const bool is_linear = false;
+ };
+
+ template<typename CharType>
+ struct linear_iterator_traits<CharType,typename std::basic_string<CharType>::iterator> {
+ static const bool is_linear = true;
+ };
+
+ template<typename CharType>
+ struct linear_iterator_traits<CharType,typename std::basic_string<CharType>::const_iterator> {
+ static const bool is_linear = true;
+ };
+
+ template<typename CharType>
+ struct linear_iterator_traits<CharType,typename std::vector<CharType>::iterator> {
+ static const bool is_linear = true;
+ };
+
+ template<typename CharType>
+ struct linear_iterator_traits<CharType,typename std::vector<CharType>::const_iterator> {
+ static const bool is_linear = true;
+ };
+
+ template<typename CharType>
+ struct linear_iterator_traits<CharType,CharType *> {
+ static const bool is_linear = true;
+ };
+
+ template<typename CharType>
+ struct linear_iterator_traits<CharType,CharType const *> {
+ static const bool is_linear = true;
+ };
+
+
+ template<typename IteratorType>
+ struct mapping_traits<IteratorType,std::random_access_iterator_tag> {
+
+ typedef typename std::iterator_traits<IteratorType>::value_type char_type;
+
+
+
+ static index_type map(boundary_type t,IteratorType b,IteratorType e,std::locale const &l)
+ {
+ index_type result;
+
+ //
+ // Optimize for most common cases
+ //
+ // C++0x requires that string is continious in memory and all known
+ // string implementations
+ // do this because of c_str() support.
+ //
+
+ if(linear_iterator_traits<char_type,IteratorType>::is_linear && b!=e)
+ {
+ char_type const *begin = &*b;
+ char_type const *end = begin + (e-b);
+ index_type tmp=std::use_facet<boundary_indexing<char_type> >(l).map(t,begin,end);
+ result.swap(tmp);
+ }
+ else {
+ std::basic_string<char_type> str(b,e);
+ index_type tmp = std::use_facet<boundary_indexing<char_type> >(l).map(t,str.c_str(),str.c_str()+str.size());
+ result.swap(tmp);
+ }
+ return result;
+ }
+ };
+
+ template<typename BaseIterator>
+ class mapping {
+ public:
+ typedef BaseIterator base_iterator;
+ typedef typename std::iterator_traits<base_iterator>::value_type char_type;
+
+
+ mapping(boundary_type type,
+ base_iterator begin,
+ base_iterator end,
+ std::locale const &loc)
+ :
+ index_(new index_type()),
+ begin_(begin),
+ end_(end)
+ {
+ index_type idx=details::mapping_traits<base_iterator>::map(type,begin,end,loc);
+ index_->swap(idx);
+ }
+
+ mapping()
+ {
+ }
+
+ index_type const &index() const
+ {
+ return *index_;
+ }
+
+ base_iterator begin() const
+ {
+ return begin_;
+ }
+
+ base_iterator end() const
+ {
+ return end_;
+ }
+
+ private:
+ boost::shared_ptr<index_type> index_;
+ base_iterator begin_,end_;
+ };
+
+ template<typename BaseIterator>
+ class segment_index_iterator :
+ public boost::iterator_facade<
+ segment_index_iterator<BaseIterator>,
+ segment<BaseIterator>,
+ boost::bidirectional_traversal_tag,
+ segment<BaseIterator> const &
+ >
+ {
+ public:
+ typedef BaseIterator base_iterator;
+ typedef mapping<base_iterator> mapping_type;
+ typedef segment<base_iterator> segment_type;
+
+ segment_index_iterator() : current_(0,0),map_(0)
+ {
+ }
+
+ segment_index_iterator(base_iterator p,mapping_type const *map,rule_type mask,bool full_select) :
+ map_(map),
+ mask_(mask),
+ full_select_(full_select)
+ {
+ set(p);
+ }
+ segment_index_iterator(bool is_begin,mapping_type const *map,rule_type mask,bool full_select) :
+ map_(map),
+ mask_(mask),
+ full_select_(full_select)
+ {
+ if(is_begin)
+ set_begin();
+ else
+ set_end();
+ }
+
+ segment_type const &dereference() const
+ {
+ return value_;
+ }
+
+ bool equal(segment_index_iterator const &other) const
+ {
+ return map_ == other.map_ && current_.second == other.current_.second;
+ }
+
+ void increment()
+ {
+ std::pair<size_t,size_t> next = current_;
+ if(full_select_) {
+ next.first = next.second;
+ while(next.second < size()) {
+ next.second++;
+ if(valid_offset(next.second))
+ break;
+ }
+ if(next.second == size())
+ next.first = next.second - 1;
+ }
+ else {
+ while(next.second < size()) {
+ next.first = next.second;
+ next.second++;
+ if(valid_offset(next.second))
+ break;
+ }
+ }
+ update_current(next);
+ }
+
+ void decrement()
+ {
+ std::pair<size_t,size_t> next = current_;
+ if(full_select_) {
+ while(next.second >1) {
+ next.second--;
+ if(valid_offset(next.second))
+ break;
+ }
+ next.first = next.second;
+ while(next.first >0) {
+ next.first--;
+ if(valid_offset(next.first))
+ break;
+ }
+ }
+ else {
+ while(next.second >1) {
+ next.second--;
+ if(valid_offset(next.second))
+ break;
+ }
+ next.first = next.second - 1;
+ }
+ update_current(next);
+ }
+
+ private:
+
+ void set_end()
+ {
+ current_.first = size() - 1;
+ current_.second = size();
+ value_ = segment_type(map_->end(),map_->end(),0);
+ }
+ void set_begin()
+ {
+ current_.first = current_.second = 0;
+ value_ = segment_type(map_->begin(),map_->begin(),0);
+ increment();
+ }
+
+ void set(base_iterator p)
+ {
+ size_t dist=std::distance(map_->begin(),p);
+ index_type::const_iterator b=map_->index().begin(),e=map_->index().end();
+ 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 --;
+ if(valid_offset(current_.first))
+ break;
+ }
+ }
+ else {
+ if(current_.first > 0)
+ current_.first --;
+ }
+ value_.first = map_->begin();
+ std::advance(value_.first,get_offset(current_.first));
+ value_.second = value_.first;
+ std::advance(value_.second,get_offset(current_.second) - get_offset(current_.first));
+
+ update_rule();
+ }
+
+ void update_current(std::pair<size_t,size_t> pos)
+ {
+ std::ptrdiff_t first_diff = get_offset(pos.first) - get_offset(current_.first);
+ std::ptrdiff_t second_diff = get_offset(pos.second) - get_offset(current_.second);
+ std::advance(value_.first,first_diff);
+ std::advance(value_.second,second_diff);
+ current_ = pos;
+ update_rule();
+ }
+
+ void update_rule()
+ {
+ if(current_.second != size()) {
+ value_.rule(index()[current_.second].rule);
+ }
+ }
+ size_t get_offset(size_t ind) const
+ {
+ if(ind == size())
+ return index().back().offset;
+ return index()[ind].offset;
+ }
+
+ bool valid_offset(size_t offset) const
+ {
+ 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<size_t,size_t> current_;
+ mapping_type const *map_;
+ rule_type mask_;
+ bool full_select_;
+ };
+
+ template<typename BaseIterator>
+ class boundary_point_index_iterator :
+ public boost::iterator_facade<
+ boundary_point_index_iterator<BaseIterator>,
+ boundary_point<BaseIterator>,
+ boost::bidirectional_traversal_tag,
+ boundary_point<BaseIterator> const &
+ >
+ {
+ public:
+ typedef BaseIterator base_iterator;
+ typedef mapping<base_iterator> mapping_type;
+ typedef boundary_point<base_iterator> boundary_point_type;
+
+ boundary_point_index_iterator() : current_(0),map_(0)
+ {
+ }
+
+ boundary_point_index_iterator(bool is_begin,mapping_type const *map,rule_type mask) :
+ map_(map),
+ mask_(mask)
+ {
+ if(is_begin)
+ set_begin();
+ else
+ set_end();
+ }
+ boundary_point_index_iterator(base_iterator p,mapping_type const *map,rule_type mask) :
+ map_(map),
+ mask_(mask)
+ {
+ set(p);
+ }
+
+ boundary_point_type const &dereference() const
+ {
+ return value_;
+ }
+
+ bool equal(boundary_point_index_iterator const &other) const
+ {
+ return map_ == other.map_ && current_ == other.current_;
+ }
+
+ void increment()
+ {
+ size_t next = current_;
+ while(next < size()) {
+ next++;
+ if(valid_offset(next))
+ break;
+ }
+ update_current(next);
+ }
+
+ void decrement()
+ {
+ size_t next = current_;
+ while(next>0) {
+ next--;
+ if(valid_offset(next))
+ break;
+ }
+ update_current(next);
+ }
+
+ private:
+ void set_end()
+ {
+ current_ = size();
+ value_ = boundary_point_type(map_->end(),0);
+ }
+ void set_begin()
+ {
+ current_ = 0;
+ value_ = boundary_point_type(map_->begin(),0);
+ }
+
+ void set(base_iterator p)
+ {
+ size_t dist = std::distance(map_->begin(),p);
+
+ index_type::const_iterator b=index().begin();
+ index_type::const_iterator e=index().end();
+ index_type::const_iterator ptr = std::lower_bound(b,e,break_info(dist));
+
+ if(ptr==index().end())
+ current_=size()-1;
+ else
+ current_=ptr - index().begin();
+
+ while(!valid_offset(current_))
+ current_ ++;
+
+ std::ptrdiff_t diff = get_offset(current_) - dist;
+ std::advance(p,diff);
+ value_.iterator(p);
+ update_rule();
+ }
+
+ void update_current(size_t pos)
+ {
+ std::ptrdiff_t diff = get_offset(pos) - get_offset(current_);
+ base_iterator i=value_.iterator();
+ std::advance(i,diff);
+ current_ = pos;
+ value_.iterator(i);
+ update_rule();
+ }
+
+ void update_rule()
+ {
+ if(current_ != size()) {
+ value_.rule(index()[current_].rule);
+ }
+ }
+ size_t get_offset(size_t ind) const
+ {
+ if(ind == size())
+ return index().back().offset;
+ return index()[ind].offset;
+ }
+
+ bool valid_offset(size_t offset) const
+ {
+ 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_;
+ rule_type mask_;
+ };
+
+
+ } // details
+
+ /// \endcond
+
+ template<typename BaseIterator>
+ class segment_index;
+
+ template<typename BaseIterator>
+ class boundary_point_index;
+
+
+ ///
+ /// \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.
+ ///
+ /// It provides two options on way of selecting segments:
+ ///
+ /// - \ref rule(rule_type mask) - a mask that allows to select only specific types of segments according to
+ /// various masks %as \ref word_any.
+ /// \n
+ /// The default is to select any types of boundaries.
+ /// \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
+ /// "to be or not to be?" with \ref word_any rule would return segments "to", "be", "or", "not", "to", "be", instead
+ /// of default "to", " ", "be", " ", "or", " ", "not", " ", "to", " ", "be", "?".
+ /// - \ref 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.
+ /// \n
+ /// For example: We want to fetch all sentences from the following text: "Hello! How\nare you?".
+ /// \n
+ /// 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.
+ /// \n
+ /// If you would only change the \ref rule() to \ref 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 \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.
+ ///
+ /// \note
+ ///
+ /// - Changing any of the options - \ref rule() or \ref full_select() and of course re-indexing the text
+ /// invalidates existing iterators and they can't be used any more.
+ /// - segment_index can be created from boundary_point_index or other segment_index that was created with
+ /// same \ref boundary_type. This is very fast operation %as they shared same index
+ /// and it does not require its regeneration.
+ ///
+ /// \see
+ ///
+ /// - \ref boundary_point_index
+ /// - \ref segment
+ /// - \ref boundary_point
+ ///
+
+ template<typename BaseIterator>
+ class segment_index {
+ public:
+
+ ///
+ /// The type of the iterator used to iterate over the original text
+ ///
+ typedef BaseIterator base_iterator;
+ #ifdef BOOST_LOCALE_DOXYGEN
+ ///
+ /// The bidirectional iterator that iterates over \ref value_type objects.
+ ///
+ /// - The iterators may be invalidated by use of any non-const member function
+ /// including but not limited to \ref rule(rule_type) and \ref 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:
+ /// \code
+ /// segment_index<some_iterator>::iterator p=index.begin();
+ /// segment<some_iterator> &t = *p;
+ /// ++p;
+ /// cout << t.str() << endl;
+ /// \endcode
+ ///
+ typedef unspecified_iterator_type iterator;
+ ///
+ /// \copydoc iterator
+ ///
+ typedef unspecified_iterator_type const_iterator;
+ #else
+ typedef details::segment_index_iterator<base_iterator> iterator;
+ typedef details::segment_index_iterator<base_iterator> const_iterator;
+ #endif
+ ///
+ /// The type dereferenced by the \ref iterator and \ref const_iterator. It is
+ /// an object that represents selected segment.
+ ///
+ typedef segment<base_iterator> value_type;
+
+ ///
+ /// Default constructor.
+ ///
+ /// \note
+ ///
+ /// When this object is constructed by default it does not include a valid index, thus
+ /// calling \ref begin(), \ref end() or \ref find() member functions would lead to undefined
+ /// behavior
+ ///
+ segment_index() : mask_(0xFFFFFFFFu),full_select_(false)
+ {
+ }
+ ///
+ /// 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.
+ ///
+ segment_index(boundary_type type,
+ base_iterator begin,
+ base_iterator end,
+ rule_type mask,
+ std::locale const &loc=std::locale())
+ :
+ map_(type,begin,end,loc),
+ mask_(mask),
+ full_select_(false)
+ {
+ }
+ ///
+ /// Create a segment_index for %boundary analysis \ref boundary_type "type" of the text
+ /// in range [begin,end) selecting all possible segments (full mask) for locale \a loc.
+ ///
+ segment_index(boundary_type type,
+ base_iterator begin,
+ base_iterator end,
+ std::locale const &loc=std::locale())
+ :
+ map_(type,begin,end,loc),
+ mask_(0xFFFFFFFFu),
+ full_select_(false)
+ {
+ }
+
+ ///
+ /// Create a segment_index from a \ref 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 \ref rule() flags are not copied
+ ///
+ segment_index(boundary_point_index<base_iterator> const &);
+ ///
+ /// Copy an index from a \ref 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 \ref rule() flags are not copied
+ ///
+ segment_index const &operator = (boundary_point_index<base_iterator> const &);
+
+
+ ///
+ /// Create a new index for %boundary analysis \ref boundary_type "type" of the text
+ /// in range [begin,end) for locale \a loc.
+ ///
+ /// \note \ref rule() and \ref full_select() remain unchanged.
+ ///
+ void map(boundary_type type,base_iterator begin,base_iterator end,std::locale const &loc=std::locale())
+ {
+ map_ = mapping_type(type,begin,end,loc);
+ }
+
+ ///
+ /// Get the \ref 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
+ ///
+ iterator begin() const
+ {
+ return iterator(true,&map_,mask_,full_select_);
+ }
+
+ ///
+ /// Get the \ref 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
+ ///
+ iterator end() const
+ {
+ return iterator(false,&map_,mask_,full_select_);
+ }
+
+ ///
+ /// Find a first valid segment following a position \a p.
+ ///
+ /// If \a p is inside a valid segment this segment is selected:
+ ///
+ /// For example: For \ref word %boundary analysis with \ref 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 \a 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
+ ///
+ iterator find(base_iterator p) const
+ {
+ 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;
+ }
+
+ ///
+ /// Get the full_select property value - should segment include in the range
+ /// values that not belong to specific \ref rule() or not.
+ ///
+ /// The default value is false.
+ ///
+ /// For example for \ref sentence %boundary with rule \ref 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?"
+ ///
+
+ bool full_select() const
+ {
+ return full_select_;
+ }
+
+ ///
+ /// Set the full_select property value - should segment include in the range
+ /// values that not belong to specific \ref rule() or not.
+ ///
+ /// The default value is false.
+ ///
+ /// For example for \ref sentence %boundary with rule \ref 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?"
+ ///
+
+ void full_select(bool v)
+ {
+ full_select_ = v;
+ }
+
+ private:
+ friend class boundary_point_index<base_iterator>;
+ typedef details::mapping<base_iterator> mapping_type;
+ mapping_type map_;
+ rule_type mask_;
+ bool full_select_;
+ };
+
+ ///
+ /// \brief This class holds an index of \ref boundary_point "boundary points" and allows iterating
+ /// over them.
+ ///
+ /// This class is provides \ref begin() and \ref end() member functions that return bidirectional iterators
+ /// to the \ref boundary_point objects.
+ ///
+ /// It provides an option that affects selecting %boundary points according to different rules:
+ /// using \ref rule(rule_type mask) member function. It allows to set a mask that select only specific
+ /// types of %boundary points like \ref 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 \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.
+ ///
+ /// \note
+ /// - Even an empty text range [x,x) considered to have a one %boundary point x.
+ /// - \a a and \a b points of the range [a,b) are always considered %boundary points
+ /// regardless the rules used.
+ /// - Changing any of the option \ref 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 \ref boundary_type. This is very fast operation %as they shared same index
+ /// and it does not require its regeneration.
+ ///
+ /// \see
+ ///
+ /// - \ref segment_index
+ /// - \ref boundary_point
+ /// - \ref segment
+ ///
+
+
+ template<typename BaseIterator>
+ class boundary_point_index {
+ public:
+ ///
+ /// The type of the iterator used to iterate over the original text
+ ///
+ typedef BaseIterator base_iterator;
+ #ifdef BOOST_LOCALE_DOXYGEN
+ ///
+ /// The bidirectional iterator that iterates over \ref value_type objects.
+ ///
+ /// - The iterators may be invalidated by use of any non-const member function
+ /// including but not limited to \ref 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:
+ /// \code
+ /// boundary_point_index<some_iterator>::iterator p=index.begin();
+ /// boundary_point<some_iterator> &t = *p;
+ /// ++p;
+ /// rule_type r = t->rule();
+ /// \endcode
+ ///
+ typedef unspecified_iterator_type iterator;
+ ///
+ /// \copydoc iterator
+ ///
+ typedef unspecified_iterator_type const_iterator;
+ #else
+ typedef details::boundary_point_index_iterator<base_iterator> iterator;
+ typedef details::boundary_point_index_iterator<base_iterator> const_iterator;
+ #endif
+ ///
+ /// The type dereferenced by the \ref iterator and \ref const_iterator. It is
+ /// an object that represents the selected \ref boundary_point "boundary point".
+ ///
+ typedef boundary_point<base_iterator> value_type;
+
+ ///
+ /// Default constructor.
+ ///
+ /// \note
+ ///
+ /// When this object is constructed by default it does not include a valid index, thus
+ /// calling \ref begin(), \ref end() or \ref find() member functions would lead to undefined
+ /// behavior
+ ///
+ 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.
+ ///
+ boundary_point_index(boundary_type type,
+ base_iterator begin,
+ base_iterator end,
+ rule_type mask,
+ std::locale const &loc=std::locale())
+ :
+ map_(type,begin,end,loc),
+ mask_(mask)
+ {
+ }
+ ///
+ /// Create a segment_index for %boundary analysis \ref boundary_type "type" of the text
+ /// in range [begin,end) selecting all possible %boundary points (full mask) for locale \a loc.
+ ///
+ boundary_point_index(boundary_type type,
+ base_iterator begin,
+ base_iterator end,
+ std::locale const &loc=std::locale())
+ :
+ map_(type,begin,end,loc),
+ mask_(0xFFFFFFFFu)
+ {
+ }
+
+ ///
+ /// Create a boundary_point_index from a \ref 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 \ref rule() flags are not copied
+ ///
+ boundary_point_index(segment_index<base_iterator> const &other);
+ ///
+ /// Copy a boundary_point_index from a \ref segment_index. It copies all indexing information
+ /// and keeps the current \ref 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 \ref rule() flags are not copied
+ ///
+ boundary_point_index const &operator=(segment_index<base_iterator> const &other);
+
+ ///
+ /// Create a new index for %boundary analysis \ref boundary_type "type" of the text
+ /// in range [begin,end) for locale \a loc.
+ ///
+ /// \note \ref rule() remains unchanged.
+ ///
+ void map(boundary_type type,base_iterator begin,base_iterator end,std::locale const &loc=std::locale())
+ {
+ map_ = mapping_type(type,begin,end,loc);
+ }
+
+ ///
+ /// Get the \ref 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
+ ///
+ iterator begin() const
+ {
+ return iterator(true,&map_,mask_);
+ }
+
+ ///
+ /// Get the \ref 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
+ ///
+ iterator end() const
+ {
+ return iterator(false,&map_,mask_);
+ }
+
+ ///
+ /// Find a first valid %boundary point on a position \a p or following it.
+ ///
+ /// For example: For \ref 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 \a 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
+ ///
+ iterator find(base_iterator p) const
+ {
+ 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;
+ }
+
+ private:
+
+ friend class segment_index<base_iterator>;
+ typedef details::mapping<base_iterator> mapping_type;
+ mapping_type map_;
+ rule_type mask_;
+ };
+
+ /// \cond INTERNAL
+ template<typename BaseIterator>
+ segment_index<BaseIterator>::segment_index(boundary_point_index<BaseIterator> const &other) :
+ map_(other.map_),
+ mask_(0xFFFFFFFFu),
+ full_select_(false)
+ {
+ }
+
+ template<typename BaseIterator>
+ boundary_point_index<BaseIterator>::boundary_point_index(segment_index<BaseIterator> const &other) :
+ map_(other.map_),
+ mask_(0xFFFFFFFFu)
+ {
+ }
+
+ template<typename BaseIterator>
+ segment_index<BaseIterator> const &segment_index<BaseIterator>::operator=(boundary_point_index<BaseIterator> const &other)
+ {
+ map_ = other.map_;
+ return *this;
+ }
+
+ template<typename BaseIterator>
+ boundary_point_index<BaseIterator> const &boundary_point_index<BaseIterator>::operator=(segment_index<BaseIterator> const &other)
+ {
+ map_ = other.map_;
+ return *this;
+ }
+ /// \endcond
+
+ typedef segment_index<std::string::const_iterator> ssegment_index; ///< convenience typedef
+ typedef segment_index<std::wstring::const_iterator> wssegment_index; ///< convenience typedef
+ #ifdef BOOST_HAS_CHAR16_T
+ typedef segment_index<std::u16string::const_iterator> u16ssegment_index;///< convenience typedef
+ #endif
+ #ifdef BOOST_HAS_CHAR32_T
+ typedef segment_index<std::u32string::const_iterator> u32ssegment_index;///< convenience typedef
+ #endif
+
+ typedef segment_index<char const *> csegment_index; ///< convenience typedef
+ typedef segment_index<wchar_t const *> wcsegment_index; ///< convenience typedef
+ #ifdef BOOST_HAS_CHAR16_T
+ typedef segment_index<char16_t const *> u16csegment_index; ///< convenience typedef
+ #endif
+ #ifdef BOOST_HAS_CHAR32_T
+ typedef segment_index<char32_t const *> u32csegment_index; ///< convenience typedef
+ #endif
+
+ typedef boundary_point_index<std::string::const_iterator> sboundary_point_index;///< convenience typedef
+ typedef boundary_point_index<std::wstring::const_iterator> wsboundary_point_index;///< convenience typedef
+ #ifdef BOOST_HAS_CHAR16_T
+ typedef boundary_point_index<std::u16string::const_iterator> u16sboundary_point_index;///< convenience typedef
+ #endif
+ #ifdef BOOST_HAS_CHAR32_T
+ typedef boundary_point_index<std::u32string::const_iterator> u32sboundary_point_index;///< convenience typedef
+ #endif
+
+ typedef boundary_point_index<char const *> cboundary_point_index; ///< convenience typedef
+ typedef boundary_point_index<wchar_t const *> wcboundary_point_index; ///< convenience typedef
+ #ifdef BOOST_HAS_CHAR16_T
+ typedef boundary_point_index<char16_t const *> u16cboundary_point_index;///< convenience typedef
+ #endif
+ #ifdef BOOST_HAS_CHAR32_T
+ typedef boundary_point_index<char32_t const *> u32cboundary_point_index;///< convenience typedef
+ #endif
+
+
+
+ } // boundary
+
+ } // locale
+} // boost
+
+///
+/// \example boundary.cpp
+/// Example of using segment_index
+/// \example wboundary.cpp
+/// Example of using segment_index over wide strings
+///
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4

Added: trunk/boost/locale/boundary/segment.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/locale/boundary/segment.hpp 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,484 @@
+//
+// 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_BOUNDARY_SEGMENT_HPP_INCLUDED
+#define BOOST_LOCALE_BOUNDARY_SEGMENT_HPP_INCLUDED
+#include <boost/locale/config.hpp>
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4275 4251 4231 4660)
+#endif
+#include <locale>
+#include <string>
+#include <iosfwd>
+#include <iterator>
+
+
+namespace boost {
+namespace locale {
+namespace boundary {
+ /// \cond INTERNAL
+ namespace details {
+ template<typename LeftIterator,typename RightIterator>
+ int compare_text(LeftIterator l_begin,LeftIterator l_end,RightIterator r_begin,RightIterator r_end)
+ {
+ typedef LeftIterator left_iterator;
+ typedef RightIterator right_iterator;
+ typedef typename std::iterator_traits<left_iterator>::value_type char_type;
+ typedef std::char_traits<char_type> traits;
+ while(l_begin!=l_end && r_begin!=r_end) {
+ char_type lchar = *l_begin++;
+ char_type rchar = *r_begin++;
+ if(traits::eq(lchar,rchar))
+ continue;
+ if(traits::lt(lchar,rchar))
+ return -1;
+ else
+ return 1;
+ }
+ if(l_begin==l_end && r_begin==r_end)
+ return 0;
+ if(l_begin==l_end)
+ return -1;
+ else
+ return 1;
+ }
+
+
+ template<typename Left,typename Right>
+ int compare_text(Left const &l,Right const &r)
+ {
+ return compare_text(l.begin(),l.end(),r.begin(),r.end());
+ }
+
+ template<typename Left,typename Char>
+ int compare_string(Left const &l,Char const *begin)
+ {
+ Char const *end = begin;
+ while(*end!=0)
+ end++;
+ return compare_text(l.begin(),l.end(),begin,end);
+ }
+
+ template<typename Right,typename Char>
+ int compare_string(Char const *begin,Right const &r)
+ {
+ Char const *end = begin;
+ while(*end!=0)
+ end++;
+ return compare_text(begin,end,r.begin(),r.end());
+ }
+
+ }
+ /// \endcond
+
+ ///
+ /// \addtogroup boundary
+ /// @{
+
+ ///
+ /// \brief 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() & \ref word_kana)!=0
+ /// For a sentence analysis you can check if the sentence is selected because a sentence terminator is found (\ref sentence_term) or
+ /// there is a line break (\ref 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
+ ///
+ /// - \ref segment_index
+ /// - \ref boundary_point
+ /// - \ref boundary_point_index
+ ///
+ template<typename IteratorType>
+ class segment : public std::pair<IteratorType,IteratorType> {
+ public:
+ ///
+ /// The type of the underlying character
+ ///
+ typedef typename std::iterator_traits<IteratorType>::value_type char_type;
+ ///
+ /// The type of the string it is converted to
+ ///
+ typedef std::basic_string<char_type> string_type;
+ ///
+ /// The value that iterators return - the character itself
+ ///
+ typedef char_type value_type;
+ ///
+ /// The iterator that allows to iterate the range
+ ///
+ typedef IteratorType iterator;
+ ///
+ /// The iterator that allows to iterate the range
+ ///
+ typedef IteratorType const_iterator;
+ ///
+ /// The type that represent a difference between two iterators
+ ///
+ typedef typename std::iterator_traits<IteratorType>::difference_type difference_type;
+
+ ///
+ /// Default constructor
+ ///
+ segment() {}
+ ///
+ /// Create a segment using two iterators and a rule that represents this point
+ ///
+ segment(iterator b,iterator e,rule_type r) :
+ std::pair<IteratorType,IteratorType>(b,e),
+ rule_(r)
+ {
+ }
+ ///
+ /// Set the start of the range
+ ///
+ void begin(iterator const &v)
+ {
+ this->first = v;
+ }
+ ///
+ /// Set the end of the range
+ ///
+ void end(iterator const &v)
+ {
+ this->second = v;
+ }
+
+ ///
+ /// Get the start of the range
+ ///
+ IteratorType begin() const
+ {
+ return this->first;
+ }
+ ///
+ /// Set the end of the range
+ ///
+ IteratorType end() const
+ {
+ return this->second;
+ }
+
+ ///
+ /// Convert the range to a string automatically
+ ///
+ template <class T, class A>
+ operator std::basic_string<char_type, T, A> ()const
+ {
+ return std::basic_string<char_type, T, A>(this->first, this->second);
+ }
+
+ ///
+ /// Create a string from the range explicitly
+ ///
+ string_type str() const
+ {
+ return string_type(begin(),end());
+ }
+
+ ///
+ /// Get the length of the text chunk
+ ///
+
+ size_t length() const
+ {
+ return std::distance(begin(),end());
+ }
+
+ ///
+ /// Check if the segment is empty
+ ///
+ bool empty() const
+ {
+ return begin() == end();
+ }
+
+ ///
+ /// Get the rule that is used for selection of this segment.
+ ///
+ rule_type rule() const
+ {
+ return rule_;
+ }
+ ///
+ /// Set a rule that is used for segment selection
+ ///
+ void rule(rule_type r)
+ {
+ rule_ = r;
+ }
+
+ // make sure we override std::pair's operator==
+
+ /// Compare two segments
+ bool operator==(segment const &other)
+ {
+ return details::compare_text(*this,other) == 0;
+ }
+
+ /// Compare two segments
+ bool operator!=(segment const &other)
+ {
+ return details::compare_text(*this,other) != 0;
+ }
+
+ private:
+ rule_type rule_;
+
+ };
+
+
+ /// Compare two segments
+ template<typename IteratorL,typename IteratorR>
+ bool operator==(segment<IteratorL> const &l,segment<IteratorR> const &r)
+ {
+ return details::compare_text(l,r) == 0;
+ }
+ /// Compare two segments
+ template<typename IteratorL,typename IteratorR>
+ bool operator!=(segment<IteratorL> const &l,segment<IteratorR> const &r)
+ {
+ return details::compare_text(l,r) != 0;
+ }
+
+ /// Compare two segments
+ template<typename IteratorL,typename IteratorR>
+ bool operator<(segment<IteratorL> const &l,segment<IteratorR> const &r)
+ {
+ return details::compare_text(l,r) < 0;
+ }
+ /// Compare two segments
+ template<typename IteratorL,typename IteratorR>
+ bool operator<=(segment<IteratorL> const &l,segment<IteratorR> const &r)
+ {
+ return details::compare_text(l,r) <= 0;
+ }
+ /// Compare two segments
+ template<typename IteratorL,typename IteratorR>
+ bool operator>(segment<IteratorL> const &l,segment<IteratorR> const &r)
+ {
+ return details::compare_text(l,r) > 0;
+ }
+ /// Compare two segments
+ template<typename IteratorL,typename IteratorR>
+ bool operator>=(segment<IteratorL> const &l,segment<IteratorR> const &r)
+ {
+ return details::compare_text(l,r) >= 0;
+ }
+
+ /// Compare string and segment
+ template<typename CharType,typename Traits,typename Alloc,typename IteratorR>
+ bool operator==(std::basic_string<CharType,Traits,Alloc> const &l,segment<IteratorR> const &r)
+ {
+ return details::compare_text(l,r) == 0;
+ }
+ /// Compare string and segment
+ template<typename CharType,typename Traits,typename Alloc,typename IteratorR>
+ bool operator!=(std::basic_string<CharType,Traits,Alloc> const &l,segment<IteratorR> const &r)
+ {
+ return details::compare_text(l,r) != 0;
+ }
+
+ /// Compare string and segment
+ template<typename CharType,typename Traits,typename Alloc,typename IteratorR>
+ bool operator<(std::basic_string<CharType,Traits,Alloc> const &l,segment<IteratorR> const &r)
+ {
+ return details::compare_text(l,r) < 0;
+ }
+ /// Compare string and segment
+ template<typename CharType,typename Traits,typename Alloc,typename IteratorR>
+ bool operator<=(std::basic_string<CharType,Traits,Alloc> const &l,segment<IteratorR> const &r)
+ {
+ return details::compare_text(l,r) <= 0;
+ }
+ /// Compare string and segment
+ template<typename CharType,typename Traits,typename Alloc,typename IteratorR>
+ bool operator>(std::basic_string<CharType,Traits,Alloc> const &l,segment<IteratorR> const &r)
+ {
+ return details::compare_text(l,r) > 0;
+ }
+ /// Compare string and segment
+ template<typename CharType,typename Traits,typename Alloc,typename IteratorR>
+ bool operator>=(std::basic_string<CharType,Traits,Alloc> const &l,segment<IteratorR> const &r)
+ {
+ return details::compare_text(l,r) >= 0;
+ }
+
+ /// Compare string and segment
+ template<typename Iterator,typename CharType,typename Traits,typename Alloc>
+ bool operator==(segment<Iterator> const &l,std::basic_string<CharType,Traits,Alloc> const &r)
+ {
+ return details::compare_text(l,r) == 0;
+ }
+ /// Compare string and segment
+ template<typename Iterator,typename CharType,typename Traits,typename Alloc>
+ bool operator!=(segment<Iterator> const &l,std::basic_string<CharType,Traits,Alloc> const &r)
+ {
+ return details::compare_text(l,r) != 0;
+ }
+
+ /// Compare string and segment
+ template<typename Iterator,typename CharType,typename Traits,typename Alloc>
+ bool operator<(segment<Iterator> const &l,std::basic_string<CharType,Traits,Alloc> const &r)
+ {
+ return details::compare_text(l,r) < 0;
+ }
+ /// Compare string and segment
+ template<typename Iterator,typename CharType,typename Traits,typename Alloc>
+ bool operator<=(segment<Iterator> const &l,std::basic_string<CharType,Traits,Alloc> const &r)
+ {
+ return details::compare_text(l,r) <= 0;
+ }
+ /// Compare string and segment
+ template<typename Iterator,typename CharType,typename Traits,typename Alloc>
+ bool operator>(segment<Iterator> const &l,std::basic_string<CharType,Traits,Alloc> const &r)
+ {
+ return details::compare_text(l,r) > 0;
+ }
+ /// Compare string and segment
+ template<typename Iterator,typename CharType,typename Traits,typename Alloc>
+ bool operator>=(segment<Iterator> const &l,std::basic_string<CharType,Traits,Alloc> const &r)
+ {
+ return details::compare_text(l,r) >= 0;
+ }
+
+
+ /// Compare C string and segment
+ template<typename CharType,typename IteratorR>
+ bool operator==(CharType const *l,segment<IteratorR> const &r)
+ {
+ return details::compare_string(l,r) == 0;
+ }
+ /// Compare C string and segment
+ template<typename CharType,typename IteratorR>
+ bool operator!=(CharType const *l,segment<IteratorR> const &r)
+ {
+ return details::compare_string(l,r) != 0;
+ }
+
+ /// Compare C string and segment
+ template<typename CharType,typename IteratorR>
+ bool operator<(CharType const *l,segment<IteratorR> const &r)
+ {
+ return details::compare_string(l,r) < 0;
+ }
+ /// Compare C string and segment
+ template<typename CharType,typename IteratorR>
+ bool operator<=(CharType const *l,segment<IteratorR> const &r)
+ {
+ return details::compare_string(l,r) <= 0;
+ }
+ /// Compare C string and segment
+ template<typename CharType,typename IteratorR>
+ bool operator>(CharType const *l,segment<IteratorR> const &r)
+ {
+ return details::compare_string(l,r) > 0;
+ }
+ /// Compare C string and segment
+ template<typename CharType,typename IteratorR>
+ bool operator>=(CharType const *l,segment<IteratorR> const &r)
+ {
+ return details::compare_string(l,r) >= 0;
+ }
+
+ /// Compare C string and segment
+ template<typename Iterator,typename CharType>
+ bool operator==(segment<Iterator> const &l,CharType const *r)
+ {
+ return details::compare_string(l,r) == 0;
+ }
+ /// Compare C string and segment
+ template<typename Iterator,typename CharType>
+ bool operator!=(segment<Iterator> const &l,CharType const *r)
+ {
+ return details::compare_string(l,r) != 0;
+ }
+
+ /// Compare C string and segment
+ template<typename Iterator,typename CharType>
+ bool operator<(segment<Iterator> const &l,CharType const *r)
+ {
+ return details::compare_string(l,r) < 0;
+ }
+ /// Compare C string and segment
+ template<typename Iterator,typename CharType>
+ bool operator<=(segment<Iterator> const &l,CharType const *r)
+ {
+ return details::compare_string(l,r) <= 0;
+ }
+ /// Compare C string and segment
+ template<typename Iterator,typename CharType>
+ bool operator>(segment<Iterator> const &l,CharType const *r)
+ {
+ return details::compare_string(l,r) > 0;
+ }
+ /// Compare C string and segment
+ template<typename Iterator,typename CharType>
+ bool operator>=(segment<Iterator> const &l,CharType const *r)
+ {
+ return details::compare_string(l,r) >= 0;
+ }
+
+
+
+
+
+
+ typedef segment<std::string::const_iterator> ssegment; ///< convenience typedef
+ typedef segment<std::wstring::const_iterator> wssegment; ///< convenience typedef
+ #ifdef BOOST_HAS_CHAR16_T
+ typedef segment<std::u16string::const_iterator> u16ssegment;///< convenience typedef
+ #endif
+ #ifdef BOOST_HAS_CHAR32_T
+ typedef segment<std::u32string::const_iterator> u32ssegment;///< convenience typedef
+ #endif
+
+ typedef segment<char const *> csegment; ///< convenience typedef
+ typedef segment<wchar_t const *> wcsegment; ///< convenience typedef
+ #ifdef BOOST_HAS_CHAR16_T
+ typedef segment<char16_t const *> u16csegment; ///< convenience typedef
+ #endif
+ #ifdef BOOST_HAS_CHAR32_T
+ typedef segment<char32_t const *> u32csegment; ///< convenience typedef
+ #endif
+
+
+
+
+
+ ///
+ /// Write the segment to the stream character by character
+ ///
+ template<typename CharType,typename TraitsType,typename Iterator>
+ std::basic_ostream<CharType,TraitsType> &operator<<(
+ std::basic_ostream<CharType,TraitsType> &out,
+ segment<Iterator> const &tok)
+ {
+ for(Iterator p=tok.begin(),e=tok.end();p!=e;++p)
+ out << *p;
+ return out;
+ }
+
+ /// @}
+
+} // boundary
+} // locale
+} // boost
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif
+
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4

Added: trunk/boost/locale/boundary/types.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/locale/boundary/types.hpp 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,136 @@
+//
+// 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_BOUNDARY_TYPES_HPP_INCLUDED
+#define BOOST_LOCALE_BOUNDARY_TYPES_HPP_INCLUDED
+
+#include <boost/locale/config.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/assert.hpp>
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4275 4251 4231 4660)
+#endif
+
+
+namespace boost {
+
+ namespace locale {
+
+ ///
+ /// \brief This namespase contains all operations required for boundary analysis of text
+ ///
+ namespace boundary {
+ ///
+ /// \defgroup boundary Boundary Analysis
+ ///
+ /// This module contains all operations required for boundary analysis of text: character, word, like and sentence boundaries
+ ///
+ /// @{
+ ///
+
+ ///
+ /// This type describes a possible boundary analysis alternatives.
+ ///
+ enum boundary_type {
+ 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
+ };
+
+ ///
+ /// \brief 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.
+ ///
+ typedef uint32_t rule_type;
+
+ ///
+ /// \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_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
+ word_letters = 0xFFF00, ///< Any word, excluding numbers but including letters, kana and ideograms.
+ word_kana_ideo = 0xFF000, ///< Word that includes kana or ideographic characters
+ word_mask = 0xFFFFF; ///< Full word mask - select all possible variants
+ /// @}
+
+ ///
+ /// \anchor bl_boundary_line_rules
+ /// \name Flags that describe a type of line break
+ /// @{
+ 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
+ /// \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
+ /// 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.
+ sentence_any = 0xFF, ///< Either first or second sentence break type;.
+ sentence_mask = 0xFF; ///< Select all sentence breaking points
+
+ ///@}
+
+ ///
+ /// \name 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
+ character_any = 0xF, ///< Not in use, just for consistency
+ character_mask = 0xF; ///< Select all character breaking points
+
+ ///@}
+
+ ///
+ /// This function returns the mask that covers all variants for specific boundary type
+ ///
+ inline rule_type boundary_rule(boundary_type t)
+ {
+ switch(t) {
+ case character: return character_mask;
+ case word: return word_mask;
+ case sentence: return sentence_mask;
+ case line: return line_mask;
+ default: return 0;
+ }
+ }
+
+ ///
+ ///@}
+ ///
+
+ } // boundary
+ } // locale
+} // boost
+
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4

Added: trunk/boost/locale/collator.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/locale/collator.hpp 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,261 @@
+//
+// 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_COLLATOR_HPP_INCLUDED
+#define BOOST_LOCALE_COLLATOR_HPP_INCLUDED
+
+#include <boost/locale/config.hpp>
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4275 4251 4231 4660)
+#endif
+#include <locale>
+
+
+namespace boost {
+namespace locale {
+
+ class info;
+
+ ///
+ /// \defgroup collation Collation
+ ///
+ /// This module introduces collation related classes
+ ///
+ /// @{
+
+ ///
+ /// \brief a base class that includes collation level flags
+ ///
+
+ class collator_base {
+ public:
+ ///
+ /// Unicode collation level types
+ ///
+ typedef enum {
+ primary = 0, ///< 1st collation level: base letters
+ secondary = 1, ///< 2nd collation level: letters and accents
+ tertiary = 2, ///< 3rd collation level: letters, accents and case
+ quaternary = 3, ///< 4th collation level: letters, accents, case and punctuation
+ identical = 4 ///< identical collation level: include code-point comparison
+ } level_type;
+ };
+
+ ///
+ /// \brief Collation facet.
+ ///
+ /// It reimplements standard C++ std::collate,
+ /// allowing usage of std::locale for direct string comparison
+ ///
+ template<typename CharType>
+ class collator :
+ public std::collate<CharType>,
+ public collator_base
+ {
+ public:
+ ///
+ /// Type of the underlying character
+ ///
+ typedef CharType char_type;
+ ///
+ /// Type of string used with this facet
+ ///
+ typedef std::basic_string<CharType> string_type;
+
+
+ ///
+ /// Compare two strings in rage [b1,e1), [b2,e2) according using a collation level \a 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.
+ ///
+ int compare(level_type level,
+ char_type const *b1,char_type const *e1,
+ char_type const *b2,char_type const *e2) const
+ {
+ return do_compare(level,b1,e1,b2,e2);
+ }
+ ///
+ /// 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:
+ /// \code
+ /// compare(level,b1,e1,b2,e2) == sign( transform(level,b1,e1).compare(transform(level,b2,e2)) );
+ /// \endcode
+ ///
+ /// Calls do_transform
+ ///
+ string_type transform(level_type level,char_type const *b,char_type const *e) const
+ {
+ return do_transform(level,b,e);
+ }
+
+ ///
+ /// 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
+ ///
+ long hash(level_type level,char_type const *b,char_type const *e) const
+ {
+ return do_hash(level,b,e);
+ }
+
+ ///
+ /// Compare two strings \a l and \a r using collation level \a 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.
+ ///
+ ///
+ int compare(level_type level,string_type const &l,string_type const &r) const
+ {
+ return do_compare(level,l.data(),l.data()+l.size(),r.data(),r.data()+r.size());
+ }
+
+ ///
+ /// Calculate a hash that can be used for collation sensitive string comparison of a string \a s
+ ///
+ /// If compare(level,s1,s2) == 0 then hash(level,s1) == hash(level,s2)
+ ///
+
+ long hash(level_type level,string_type const &s) const
+ {
+ return do_hash(level,s.data(),s.data()+s.size());
+ }
+ ///
+ /// Create a binary string from string \a s, that can be compared to other, useful for collation of multiple
+ /// strings.
+ ///
+ /// The transformation follows these rules:
+ /// \code
+ /// compare(level,s1,s2) == sign( transform(level,s1).compare(transform(level,s2)) );
+ /// \endcode
+ ///
+ string_type transform(level_type level,string_type const &s) const
+ {
+ return do_transform(level,s.data(),s.data()+s.size());
+ }
+
+ protected:
+
+ ///
+ /// constructor of the collator object
+ ///
+ collator(size_t refs = 0) : std::collate<CharType>(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
+ {
+ return do_compare(identical,b1,e1,b2,e2);
+ }
+ ///
+ /// 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
+ {
+ return do_transform(identical,b,e);
+ }
+ ///
+ /// 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
+ {
+ return do_hash(identical,b,e);
+ }
+
+ ///
+ /// 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.
+ ///
+ 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.
+ ///
+ virtual long do_hash(level_type level,char_type const *b,char_type const *e) const = 0;
+
+
+ };
+
+ ///
+ /// \brief This class can be used in STL algorithms and containers for comparison of strings
+ /// with a level other than primary
+ ///
+ /// For example:
+ ///
+ /// \code
+ /// std::map<std::string,std::string,comparator<char,collator_base::secondary> > data;
+ /// \endcode
+ ///
+ /// Would create a map the keys of which are sorted using secondary collation level
+ ///
+ template<typename CharType,collator_base::level_type default_level = collator_base::identical>
+ struct comparator
+ {
+ public:
+ ///
+ /// 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) :
+ locale_(l),
+ level_(level)
+ {
+ }
+
+ ///
+ /// Compare two strings -- equivalent to return left < right according to collation rules
+ ///
+ bool operator()(std::basic_string<CharType> const &left,std::basic_string<CharType> const &right) const
+ {
+ return std::use_facet<collator<CharType> >(locale_).compare(level_,left,right) < 0;
+ }
+ private:
+ std::locale locale_;
+ collator_base::level_type level_;
+ };
+
+
+ ///
+ ///@}
+ ///
+
+ } // locale
+} // boost
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+
+#endif
+///
+/// \example collate.cpp
+/// Example of using collation functions
+///
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4

Added: trunk/boost/locale/config.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/locale/config.hpp 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,57 @@
+//
+// 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_CONFIG_HPP_INCLUDED
+#define BOOST_LOCALE_CONFIG_HPP_INCLUDED
+
+#include <boost/config.hpp>
+
+// Support older ICU versions
+#ifndef BOOST_SYMBOL_VISIBLE
+# define BOOST_SYMBOL_VISIBLE
+#endif
+
+#ifdef BOOST_HAS_DECLSPEC
+# 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
+#endif // BOOST_HAS_DECLSPEC
+
+#ifndef BOOST_LOCALE_DECL
+# define BOOST_LOCALE_DECL
+#endif
+
+//
+// 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
+// once it's done with it:
+//
+#define BOOST_LIB_NAME boost_locale
+//
+// If we're importing code from a dll, then tell auto_link.hpp about it:
+//
+#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_LOCALE_DYN_LINK)
+# define BOOST_DYN_LINK
+#endif
+//
+// And include the header that does the work:
+//
+#include <boost/config/auto_link.hpp>
+#endif // auto-linking disabled
+
+
+
+#endif // boost/locale/config.hpp
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
+

Added: trunk/boost/locale/conversion.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/locale/conversion.hpp 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,380 @@
+//
+// 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_CONVERTER_HPP_INCLUDED
+#define BOOST_LOCALE_CONVERTER_HPP_INCLUDED
+
+#include <boost/locale/config.hpp>
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4275 4251 4231 4660)
+#endif
+#include <locale>
+
+
+namespace boost {
+ namespace locale {
+
+ ///
+ /// \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.
+ ///
+ class converter_base {
+ public:
+ ///
+ /// The flag used for facet - the type of operation to perform
+ ///
+ typedef enum {
+ 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
+ } conversion_type;
+ };
+
+ template<typename CharType>
+ class converter;
+
+ #ifdef BOOST_LOCALE_DOXYGEN
+ ///
+ /// \brief The facet that implements text manipulation
+ ///
+ /// It is used to performs text conversion operations defined by \ref conversion_type. It is specialized
+ /// for four types of characters \c char, \c wchar_t, \c char16_t, \c char32_t
+ ///
+ template<typename Char>
+ class BOOST_LOCALE_DECL converter: public converter_base, public std::locale::facet {
+ public:
+ /// Locale identification
+ static std::locale::id id;
+
+ /// Standard constructor
+ converter(size_t refs = 0) : std::locale::facet(refs)
+ {
+ }
+ ///
+ /// Convert text in range [\a begin, \a end) according to conversion method \a how. Parameter
+ /// \a flags is used for specification of normalization method like nfd, nfc etc.
+ ///
+ virtual std::basic_string<Char> 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; }
+#endif
+ };
+ #else
+
+ template<>
+ class BOOST_LOCALE_DECL converter<char> : public converter_base, public std::locale::facet {
+ public:
+ static std::locale::id id;
+
+ converter(size_t refs = 0) : std::locale::facet(refs)
+ {
+ }
+ 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; }
+#endif
+ };
+
+ template<>
+ class BOOST_LOCALE_DECL converter<wchar_t> : public converter_base, public std::locale::facet {
+ public:
+ static std::locale::id id;
+ converter(size_t refs = 0) : std::locale::facet(refs)
+ {
+ }
+ 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; }
+#endif
+ };
+
+ #ifdef BOOST_HAS_CHAR16_T
+ template<>
+ class BOOST_LOCALE_DECL converter<char16_t> : public converter_base, public std::locale::facet {
+ public:
+ static std::locale::id id;
+ converter(size_t refs = 0) : std::locale::facet(refs)
+ {
+ }
+ 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
+ };
+ #endif
+
+ #ifdef BOOST_HAS_CHAR32_T
+ template<>
+ class BOOST_LOCALE_DECL converter<char32_t> : public converter_base, public std::locale::facet {
+ public:
+ static std::locale::id id;
+ converter(size_t refs = 0) : std::locale::facet(refs)
+ {
+ }
+ 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; }
+#endif
+ };
+ #endif
+
+ #endif
+
+ ///
+ /// The type that defined normalization form
+ ///
+
+ typedef enum {
+ 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 = 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
+ /// of a Unicode character set.
+ ///
+ /// \note throws std::bad_cast if loc does not have \ref converter facet installed
+ ///
+ template<typename CharType>
+ std::basic_string<CharType> normalize(std::basic_string<CharType> const &str,norm_type n=norm_default,std::locale const &loc=std::locale())
+ {
+ return std::use_facet<converter<CharType> >(loc).convert(converter_base::normalization,str.data(),str.data() + str.size(),n);
+ }
+
+ ///
+ /// 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
+ /// of a Unicode character set.
+ ///
+ /// \note throws std::bad_cast if loc does not have \ref converter facet installed
+ ///
+ template<typename CharType>
+ std::basic_string<CharType> normalize(CharType const *str,norm_type n=norm_default,std::locale const &loc=std::locale())
+ {
+ CharType const *end=str;
+ while(*end)
+ end++;
+ return std::use_facet<converter<CharType> >(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
+ /// of a Unicode character set.
+ ///
+ /// \note throws std::bad_cast if loc does not have \ref converter facet installed
+ ///
+ template<typename CharType>
+ std::basic_string<CharType> normalize( CharType const *begin,
+ CharType const *end,
+ norm_type n=norm_default,
+ std::locale const &loc=std::locale())
+ {
+ return std::use_facet<converter<CharType> >(loc).convert(converter_base::normalization,begin,end,n);
+ }
+
+ ///////////////////////////////////////////////////
+
+ ///
+ /// 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<typename CharType>
+ std::basic_string<CharType> to_upper(std::basic_string<CharType> const &str,std::locale const &loc=std::locale())
+ {
+ return std::use_facet<converter<CharType> >(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<typename CharType>
+ std::basic_string<CharType> to_upper(CharType const *str,std::locale const &loc=std::locale())
+ {
+ CharType const *end=str;
+ while(*end)
+ end++;
+ return std::use_facet<converter<CharType> >(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<typename CharType>
+ std::basic_string<CharType> to_upper(CharType const *begin,CharType const *end,std::locale const &loc=std::locale())
+ {
+ return std::use_facet<converter<CharType> >(loc).convert(converter_base::upper_case,begin,end);
+ }
+
+ ///////////////////////////////////////////////////
+
+ ///
+ /// 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<typename CharType>
+ std::basic_string<CharType> to_lower(std::basic_string<CharType> const &str,std::locale const &loc=std::locale())
+ {
+ return std::use_facet<converter<CharType> >(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<typename CharType>
+ std::basic_string<CharType> to_lower(CharType const *str,std::locale const &loc=std::locale())
+ {
+ CharType const *end=str;
+ while(*end)
+ end++;
+ return std::use_facet<converter<CharType> >(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<typename CharType>
+ std::basic_string<CharType> to_lower(CharType const *begin,CharType const *end,std::locale const &loc=std::locale())
+ {
+ return std::use_facet<converter<CharType> >(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<typename CharType>
+ std::basic_string<CharType> to_title(std::basic_string<CharType> const &str,std::locale const &loc=std::locale())
+ {
+ return std::use_facet<converter<CharType> >(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<typename CharType>
+ std::basic_string<CharType> to_title(CharType const *str,std::locale const &loc=std::locale())
+ {
+ CharType const *end=str;
+ while(*end)
+ end++;
+ return std::use_facet<converter<CharType> >(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<typename CharType>
+ std::basic_string<CharType> to_title(CharType const *begin,CharType const *end,std::locale const &loc=std::locale())
+ {
+ return std::use_facet<converter<CharType> >(loc).convert(converter_base::title_case,begin,end);
+ }
+
+ ///////////////////////////////////////////////////
+
+ ///
+ /// 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<typename CharType>
+ std::basic_string<CharType> fold_case(std::basic_string<CharType> const &str,std::locale const &loc=std::locale())
+ {
+ return std::use_facet<converter<CharType> >(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<typename CharType>
+ std::basic_string<CharType> fold_case(CharType const *str,std::locale const &loc=std::locale())
+ {
+ CharType const *end=str;
+ while(*end)
+ end++;
+ return std::use_facet<converter<CharType> >(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<typename CharType>
+ std::basic_string<CharType> fold_case(CharType const *begin,CharType const *end,std::locale const &loc=std::locale())
+ {
+ return std::use_facet<converter<CharType> >(loc).convert(converter_base::case_folding,begin,end);
+ }
+
+ ///
+ ///@}
+ ///
+ } // locale
+
+} // boost
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+
+#endif
+
+///
+/// \example conversions.cpp
+///
+/// Example of using various text conversion functions.
+///
+/// \example wconversions.cpp
+///
+/// Example of using various text conversion functions with wide strings.
+///
+
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
+

Added: trunk/boost/locale/date_time.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/locale/date_time.hpp 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,1150 @@
+//
+// 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_DATE_TIME_HPP_INCLUDED
+#define BOOST_LOCALE_DATE_TIME_HPP_INCLUDED
+
+#include <boost/locale/config.hpp>
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4275 4251 4231 4660)
+#endif
+
+#include <boost/locale/hold_ptr.hpp>
+#include <boost/locale/date_time_facet.hpp>
+#include <boost/locale/formatting.hpp>
+#include <boost/locale/time_zone.hpp>
+#include <locale>
+#include <vector>
+#include <stdexcept>
+
+
+namespace boost {
+ namespace locale {
+ ///
+ /// \defgroup date_time Date, Time, Timezone and Calendar manipulations
+ ///
+ /// This module provides various calendar, timezone and date time services
+ ///
+ /// @{
+
+
+ ///
+ /// \brief This error is thrown in case of invalid state that occurred
+ ///
+ class BOOST_SYMBOL_VISIBLE date_time_error : public std::runtime_error {
+ public:
+ ///
+ /// Constructor of date_time_error class
+ ///
+ date_time_error(std::string const &e) : std::runtime_error(e) {}
+ };
+
+
+ ///
+ /// \brief This class represents a pair of period_type and the integer
+ /// values that describes its amount. For example 3 days or 4 years.
+ ///
+ /// 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
+ {
+ period::period_type type; ///< The type of period, i.e. era, year, day etc.
+ int value; ///< The value the actual number of \a periods
+ ///
+ /// Operator + returns copy of itself
+ ///
+ date_time_period operator+() const { return *this; }
+ ///
+ /// 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.
+ ///
+ date_time_period(period::period_type f=period::period_type(),int v=1) : type(f), value(v) {}
+ };
+
+ namespace period {
+ ///
+ /// Get period_type for: special invalid value, should not be used directly
+ ///
+ inline period_type invalid(){ return period_type(marks::invalid); }
+ ///
+ /// Get period_type for: Era i.e. AC, BC in Gregorian and Julian calendar, range [0,1]
+ ///
+ inline period_type era(){ return period_type(marks::era); }
+ ///
+ /// Get period_type for: Year, it is calendar specific, for example 2011 in Gregorian calendar.
+ ///
+ inline period_type year(){ return period_type(marks::year); }
+ ///
+ /// Get period_type for: Extended year for Gregorian/Julian calendars, where 1 BC == 0, 2 BC == -1.
+ ///
+ inline period_type extended_year(){ return period_type(marks::extended_year); }
+ ///
+ /// Get period_type for: The month of year, calendar specific, in Gregorian [0..11]
+ ///
+ inline period_type month(){ return period_type(marks::month); }
+ ///
+ /// Get period_type for: The day of month, calendar specific, in Gregorian [1..31]
+ ///
+ inline period_type day(){ return period_type(marks::day); }
+ ///
+ /// Get period_type for: The number of day in year, starting from 1, in Gregorian [1..366]
+ ///
+ inline period_type day_of_year(){ return period_type(marks::day_of_year); }
+ ///
+ /// Get period_type for: Day of week, Sunday=1, Monday=2,..., Saturday=7.
+ ///
+ /// Note that that updating this value respects local day of week, so for example,
+ /// 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.
+ ///
+ 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,
+ /// 2nd Sunday, etc. in Gregorian [1..5]
+ ///
+ inline period_type day_of_week_in_month(){ return period_type(marks::day_of_week_in_month); }
+ ///
+ /// Get period_type for: Local day of week, for example in France Monday is 1, in US Sunday is 1, [1..7]
+ ///
+ inline period_type day_of_week_local(){ return period_type(marks::day_of_week_local); }
+ ///
+ /// Get period_type for: 24 clock hour [0..23]
+ ///
+ inline period_type hour(){ return period_type(marks::hour); }
+ ///
+ /// Get period_type for: 12 clock hour [0..11]
+ ///
+ inline period_type hour_12(){ return period_type(marks::hour_12); }
+ ///
+ /// Get period_type for: am or pm marker [0..1]
+ ///
+ inline period_type am_pm(){ return period_type(marks::am_pm); }
+ ///
+ /// Get period_type for: minute [0..59]
+ ///
+ inline period_type minute(){ return period_type(marks::minute); }
+ ///
+ /// Get period_type for: second [0..59]
+ ///
+ inline period_type second(){ return period_type(marks::second); }
+ ///
+ /// Get period_type for: The week number in the year
+ ///
+ inline period_type week_of_year(){ return period_type(marks::week_of_year); }
+ ///
+ /// Get period_type for: The week number within current month
+ ///
+ inline period_type week_of_month(){ return period_type(marks::week_of_month); }
+ ///
+ /// Get period_type for: First day of week, constant, for example Sunday in US = 1, Monday in France = 2
+ ///
+ inline period_type first_day_of_week(){ return period_type(marks::first_day_of_week); }
+
+ ///
+ /// 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); }
+ ///
+ /// 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); }
+ ///
+ /// 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); }
+ ///
+ /// 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); }
+ ///
+ /// 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); }
+ ///
+ /// 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); }
+ ///
+ /// Get date_time_period for: Day of week, Sunday=1, Monday=2,..., Saturday=7.
+ ///
+ /// Note that that updating this value respects local day of week, so for example,
+ /// 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.
+ ///
+ 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,
+ /// 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); }
+ ///
+ /// 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); }
+ ///
+ /// Get date_time_period for: 24 clock hour [0..23]
+ ///
+ 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); }
+ ///
+ /// 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); }
+ ///
+ /// Get date_time_period for: minute [0..59]
+ ///
+ 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); }
+ ///
+ /// 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); }
+ ///
+ /// 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); }
+ ///
+ /// 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); }
+
+ ///
+ /// Get predefined constant for January
+ ///
+ inline date_time_period january() { return date_time_period(month(),0); }
+ ///
+ /// Get predefined constant for February
+ ///
+ inline date_time_period february() { return date_time_period(month(),1); }
+ ///
+ /// Get predefined constant for March
+ ///
+ inline date_time_period march() { return date_time_period(month(),2); }
+ ///
+ /// Get predefined constant for April
+ ///
+ inline date_time_period april() { return date_time_period(month(),3); }
+ ///
+ /// Get predefined constant for May
+ ///
+ inline date_time_period may() { return date_time_period(month(),4); }
+ ///
+ /// Get predefined constant for June
+ ///
+ inline date_time_period june() { return date_time_period(month(),5); }
+ ///
+ /// Get predefined constant for July
+ ///
+ inline date_time_period july() { return date_time_period(month(),6); }
+ ///
+ /// Get predefined constant for August
+ ///
+ inline date_time_period august() { return date_time_period(month(),7); }
+ ///
+ /// Get predefined constant for September
+ ///
+ inline date_time_period september() { return date_time_period(month(),8); }
+ ///
+ /// Get predefined constant for October
+ ///
+ inline date_time_period october() { return date_time_period(month(),9); }
+ ///
+ /// Get predefined constant for November
+ ///
+ inline date_time_period november() { return date_time_period(month(),10); }
+ ///
+ /// Get predefined constant for December
+ ///
+ inline date_time_period december() { return date_time_period(month(),11); }
+
+ ///
+ /// Get predefined constant for Sunday
+ ///
+ inline date_time_period sunday() { return date_time_period(day_of_week(),1); }
+ ///
+ /// Get predefined constant for Monday
+ ///
+ inline date_time_period monday() { return date_time_period(day_of_week(),2); }
+ ///
+ /// Get predefined constant for Tuesday
+ ///
+ inline date_time_period tuesday() { return date_time_period(day_of_week(),3); }
+ ///
+ /// Get predefined constant for Wednesday
+ ///
+ inline date_time_period wednesday() { return date_time_period(day_of_week(),4); }
+ ///
+ /// Get predefined constant for Thursday
+ ///
+ inline date_time_period thursday() { return date_time_period(day_of_week(),5); }
+ ///
+ /// Get predefined constant for Friday
+ ///
+ inline date_time_period friday() { return date_time_period(day_of_week(),6); }
+ ///
+ /// Get predefined constant for Saturday
+ ///
+ inline date_time_period saturday() { return date_time_period(day_of_week(),7); }
+ ///
+ /// Get predefined constant for AM (Ante Meridiem)
+ ///
+ inline date_time_period am() { return date_time_period(am_pm(),0); }
+ ///
+ /// Get predefined constant for PM (Post Meridiem)
+ ///
+ inline date_time_period pm() { return date_time_period(am_pm(),1); }
+
+ ///
+ /// convert period_type to date_time_period(f,1)
+ ///
+ inline date_time_period operator+(period::period_type f)
+ {
+ return date_time_period(f);
+ }
+ ///
+ /// convert period_type to date_time_period(f,-1)
+ ///
+ inline date_time_period operator-(period::period_type f)
+ {
+ return date_time_period(f,-1);
+ }
+
+ ///
+ /// Create date_time_period of type \a f with value \a v.
+ ///
+ template<typename T>
+ date_time_period operator*(period::period_type f,T v)
+ {
+ return date_time_period(f,v);
+ }
+
+ ///
+ /// Create date_time_period of type \a f with value \a v.
+ ///
+ template<typename T>
+ date_time_period operator*(T v,period::period_type f)
+ {
+ return date_time_period(f,v);
+ }
+ ///
+ /// Create date_time_period of type \a f with value \a v.
+ ///
+ template<typename T>
+ date_time_period operator*(T v,date_time_period f)
+ {
+ return date_time_period(f.type,f.value*v);
+ }
+
+ ///
+ /// Create date_time_period of type \a f with value \a v.
+ ///
+ template<typename T>
+ date_time_period operator*(date_time_period f,T v)
+ {
+ return date_time_period(f.type,f.value*v);
+ }
+
+
+ } // period
+
+
+ ///
+ /// \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
+ ///
+ date_time_period_set()
+ {
+ }
+ ///
+ /// Create a set of single period with value 1
+ ///
+ date_time_period_set(period::period_type f)
+ {
+ basic_[0]=date_time_period(f);
+ }
+ ///
+ /// Create a set of single period \a fl
+ ///
+ date_time_period_set(date_time_period const &fl)
+ {
+ basic_[0]=fl;
+ }
+ ///
+ /// Append date_time_period \a f to the set
+ ///
+ void add(date_time_period f)
+ {
+ size_t n=size();
+ if(n < 4)
+ basic_[n]=f;
+ else
+ periods_.push_back(f);
+ }
+ ///
+ /// Get number if items in list
+ ///
+ size_t size() const
+ {
+ if(basic_[0].type == period::period_type())
+ return 0;
+ if(basic_[1].type == period::period_type())
+ return 1;
+ if(basic_[2].type == period::period_type())
+ return 2;
+ if(basic_[3].type == period::period_type())
+ return 3;
+ return 4+periods_.size();
+ }
+ ///
+ /// Get item at position \a n the set, n should be in range [0,size)
+ ///
+ date_time_period const &operator[](size_t n) const
+ {
+ if(n >= size())
+ throw std::out_of_range("Invalid index to date_time_period");
+ if(n < 4)
+ return basic_[n];
+ else
+ return periods_[n-4];
+ }
+ private:
+ date_time_period basic_[4];
+ std::vector<date_time_period> periods_;
+ };
+
+
+ ///
+ /// 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)
+ {
+ date_time_period_set s(a);
+ for(unsigned i=0;i<b.size();i++)
+ s.add(b[i]);
+ return s;
+ }
+
+ ///
+ /// Append two period sets when all periods of set \b change their sign
+ ///
+ inline date_time_period_set operator-(date_time_period_set const &a,date_time_period_set const &b)
+ {
+ date_time_period_set s(a);
+ for(unsigned i=0;i<b.size();i++)
+ s.add(-b[i]);
+ return s;
+ }
+
+
+ ///
+ /// \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
+ /// date_time objects.
+ ///
+ class BOOST_LOCALE_DECL calendar {
+ public:
+
+ ///
+ /// 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
+ ///
+ /// \note throws std::bad_cast if global locale does not have \ref calendar_facet facet installed
+ ///
+ calendar();
+ ~calendar();
+
+ ///
+ /// copy calendar
+ ///
+ calendar(calendar const &other);
+ ///
+ /// assign calendar
+ ///
+ calendar const &operator=(calendar const &other);
+
+ ///
+ /// Get minimum value for period f, For example for period::day it is 1.
+ ///
+ int 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.
+ ///
+ int greatest_minimum(period::period_type f) const;
+ ///
+ /// Get maximum value for period f, For example for Gregorian calendar's maximum period::day it is 31.
+ ///
+ int 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 least_maximum(period::period_type f) const;
+
+ ///
+ /// Get first day of week for specific calendar, for example for US it is 1 - Sunday for France it is 2 - Monday
+ int first_day_of_week() const;
+
+ ///
+ /// get calendar's locale
+ ///
+ std::locale get_locale() const;
+ ///
+ /// get calendar's time zone
+ ///
+ std::string get_time_zone() const;
+
+ ///
+ /// Check if the calendar is Gregorian
+ ///
+ bool is_gregorian() const;
+
+ ///
+ /// Compare calendars for equivalence: i.e. calendar types, time zones etc.
+ ///
+ bool operator==(calendar const &other) const;
+ ///
+ /// Opposite of ==
+ ///
+ bool operator!=(calendar const &other) const;
+
+ private:
+ friend class date_time;
+ std::locale locale_;
+ std::string tz_;
+ hold_ptr<abstract_calendar> impl_;
+ };
+
+ ///
+ /// \brief 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:
+ ///
+ /// - date_time + date_time_period_set = date_time: move time point forward by specific periods like date_time + month;
+ /// - date_time - date_time_period_set = date_time: move time point backward by specific periods like date_time - month;
+ /// - date_time << date_time_period_set = date_time: roll time point forward by specific periods with rolling to begin if overflows: like "2010-01-31" << 2* day == "2010-01-02" instead of "2010-02-02"
+ /// - date_time >> date_time_period_set = date_time: roll time point backward by specific periods with rolling to end if overflows: like "2010-01-02" >> 2* day == "2010-01-31" instead of "2009-12-30"
+ /// - date_time / period_type = int - current period value: like "2010-12-21" / month == 12. "2010-12-21" / year = 2010
+ /// - (date_time - date_time) / period_type = int: distance between dates in period_type. Like ("2010-12-01" - "2008-12-01") / month = 24.
+ ///
+ /// You can also assign specific periods using assignment operator like:
+ /// some_time = year * 1995 that sets the year to 1995.
+ ///
+ ///
+
+ class BOOST_LOCALE_DECL date_time {
+ public:
+
+ ///
+ /// 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
+ ///
+ date_time(date_time const &other);
+ ///
+ /// copy date_time and change some fields according to the \a set
+ ///
+ date_time(date_time const &other,date_time_period_set const &set);
+ ///
+ /// assign the date_time
+ ///
+ date_time const &operator=(date_time const &other);
+ ~date_time();
+
+ ///
+ /// 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
+ ///
+ date_time(double time,calendar const &cal);
+ ///
+ /// 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
+ ///
+ date_time const &operator=(date_time_period_set const &f);
+
+ ///
+ /// set specific period \a f value to \a v
+ ///
+ void set(period::period_type f,int v);
+ ///
+ /// get specific period \a f value
+ ///
+ int get(period::period_type f) const;
+
+ ///
+ /// syntactic sugar for get(f)
+ ///
+ int operator/(period::period_type f) const
+ {
+ return get(f);
+ }
+
+ ///
+ /// add single period f to the current date_time
+ ///
+ date_time operator+(period::period_type f) const
+ {
+ return *this+date_time_period(f);
+ }
+
+ ///
+ /// subtract single period f from the current date_time
+ ///
+ date_time operator-(period::period_type f) const
+ {
+ return *this-date_time_period(f);
+ }
+
+ ///
+ /// add single period f to the current date_time
+ ///
+ date_time const &operator+=(period::period_type f)
+ {
+ return *this+=date_time_period(f);
+ }
+ ///
+ /// subtract single period f from the current date_time
+ ///
+ date_time const &operator-=(period::period_type f)
+ {
+ return *this-=date_time_period(f);
+ }
+
+ ///
+ /// roll forward a date by single period f.
+ ///
+ date_time operator<<(period::period_type f) const
+ {
+ return *this<<date_time_period(f);
+ }
+
+ ///
+ /// roll backward a date by single period f.
+ ///
+ date_time operator>>(period::period_type f) const
+ {
+ return *this>>date_time_period(f);
+ }
+
+ ///
+ /// roll forward a date by single period f.
+ ///
+ date_time const &operator<<=(period::period_type f)
+ {
+ return *this<<=date_time_period(f);
+ }
+ ///
+ /// roll backward a date by single period f.
+ ///
+ date_time const &operator>>=(period::period_type f)
+ {
+ return *this>>=date_time_period(f);
+ }
+
+ ///
+ /// add date_time_period to the current date_time
+ ///
+ date_time operator+(date_time_period const &v) const;
+ ///
+ /// subtract date_time_period from the current date_time
+ ///
+ date_time operator-(date_time_period const &v) const;
+ ///
+ /// add date_time_period to the current date_time
+ ///
+ date_time const &operator+=(date_time_period const &v);
+ ///
+ /// subtract date_time_period from the current date_time
+ ///
+ date_time const &operator-=(date_time_period const &v);
+
+ ///
+ /// roll current date_time forward by date_time_period v
+ ///
+ date_time operator<<(date_time_period const &v) const;
+ ///
+ /// roll current date_time backward by date_time_period v
+ ///
+ date_time operator>>(date_time_period const &v) const ;
+ ///
+ /// roll current date_time forward by date_time_period v
+ ///
+ date_time const &operator<<=(date_time_period const &v);
+ ///
+ /// roll current date_time backward by date_time_period v
+ ///
+ date_time const &operator>>=(date_time_period const &v);
+
+ ///
+ /// add date_time_period_set v to the current date_time
+ ///
+ date_time operator+(date_time_period_set const &v) const;
+ ///
+ /// subtract date_time_period_set v from the current date_time
+ ///
+ date_time operator-(date_time_period_set const &v) const;
+ ///
+ /// add date_time_period_set v to the current date_time
+ ///
+ date_time const &operator+=(date_time_period_set const &v);
+ ///
+ /// subtract date_time_period_set v from the current date_time
+ ///
+ date_time const &operator-=(date_time_period_set const &v);
+
+ ///
+ /// roll current date_time forward by date_time_period_set v
+ ///
+ date_time operator<<(date_time_period_set const &v) const;
+ ///
+ /// roll current date_time backward by date_time_period_set v
+ ///
+ date_time operator>>(date_time_period_set const &v) const ;
+ ///
+ /// roll current date_time forward by date_time_period_set v
+ ///
+ date_time const &operator<<=(date_time_period_set const &v);
+ ///
+ /// roll current date_time backward by date_time_period_set v
+ ///
+ date_time const &operator>>=(date_time_period_set const &v);
+
+ ///
+ /// Get POSIX time
+ ///
+ /// The POSIX time is number of seconds since January 1st, 1970 00:00 UTC, ignoring leap seconds.
+ ///
+ double time() const;
+ ///
+ /// 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.
+ ///
+ void time(double v);
+
+ ///
+ /// compare date_time in the timeline (ignores difference in calendar, timezone etc)
+ ///
+ bool operator==(date_time const &other) const;
+ ///
+ /// compare date_time in the timeline (ignores difference in calendar, timezone etc)
+ ///
+ bool operator!=(date_time const &other) const;
+ ///
+ /// compare date_time in the timeline (ignores difference in calendar, timezone etc)
+ ///
+ bool operator<(date_time const &other) const;
+ ///
+ /// compare date_time in the timeline (ignores difference in calendar, timezone etc)
+ ///
+ bool operator>(date_time const &other) const;
+ ///
+ /// compare date_time in the timeline (ignores difference in calendar, timezone etc)
+ ///
+ bool operator<=(date_time const &other) const;
+ ///
+ /// compare date_time in the timeline (ignores difference in calendar, timezone etc)
+ ///
+ bool operator>=(date_time const &other) const;
+
+ ///
+ /// swaps two dates - efficient, does not throw
+ ///
+ void swap(date_time &other);
+
+ ///
+ /// calculate the distance from this date_time to \a other in terms of perios \a f
+ ///
+ int difference(date_time const &other,period::period_type f) const;
+
+ ///
+ /// Get minimal possible value for *this time point for a period \a f.
+ ///
+ int minimum(period::period_type f) const;
+ ///
+ /// Get minimal possible value for *this time point for a period \a f. For example
+ /// in February maximum(day) may be 28 or 29, in January maximum(day)==31
+ ///
+ int maximum(period::period_type f) const;
+
+ ///
+ /// Check if *this time point is in daylight saving time
+ ///
+ bool is_in_daylight_saving_time() const;
+
+ private:
+ hold_ptr<abstract_calendar> impl_;
+ };
+
+ ///
+ /// Writes date_time \a t to output stream \a out.
+ ///
+ /// This function uses locale, calendar and time zone of the target stream \a in.
+ ///
+ /// For example:
+ /// \code
+ /// date_time now(time(0),hebrew_calendar)
+ /// cout << "Year: " << period::year(now) <<" Full Date:"<< now;
+ /// \endcode
+ ///
+ /// The output may be Year:5770 Full Date:Jan 1, 2010
+ ///
+ template<typename CharType>
+ std::basic_ostream<CharType> &operator<<(std::basic_ostream<CharType> &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::strftime
+ )
+ {
+ out << time_point;
+ }
+ else {
+ ios_info::get(out).display_flags(flags::datetime);
+ out << time_point;
+ ios_info::get(out).display_flags(display_flags);
+ }
+ return out;
+ }
+
+ ///
+ /// Reads date_time \a t from output stream \a in
+ ///
+ /// This function uses locale, calendar and time zone of the source stream \a in.
+ ///
+ template<typename CharType>
+ std::basic_istream<CharType> &operator>>(std::basic_istream<CharType> &in,date_time &t)
+ {
+ 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::strftime
+ )
+ {
+ in >> v;
+ }
+ else {
+ ios_info::get(in).display_flags(flags::datetime);
+ in >> v;
+ ios_info::get(in).display_flags(display_flags);
+ }
+ if(!in.fail())
+ t.time(v);
+ return in;
+ }
+
+ ///
+ /// \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
+ /// outside of the equation you calculate the difference in.
+ ///
+ class date_time_duration {
+ public:
+
+ ///
+ /// 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
+ ///
+ int get(period::period_type f) const
+ {
+ return start().difference(end(),f);
+ }
+
+ ///
+ /// Syntactic sugar for get(f)
+ ///
+ int operator / (period::period_type f) const
+ {
+ return start().difference(end(),f);
+ }
+
+ ///
+ /// Get starting point
+ ///
+ date_time const &start() const { return s_; }
+ ///
+ /// Get ending point
+ ///
+ date_time const &end() const { return e_; }
+ private:
+ date_time const &s_;
+ date_time const &e_;
+ };
+
+ ///
+ /// Calculates the difference between two dates, the left operand is a later point on time line.
+ /// Returns date_time_duration object.
+ ///
+ inline date_time_duration operator-(date_time const &later,date_time const &earlier)
+ {
+ 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()); }
+ ///
+ /// 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()); }
+ ///
+ /// 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()); }
+ ///
+ /// 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()); }
+ ///
+ /// 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()); }
+ ///
+ /// 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()); }
+ ///
+ /// Extract from date_time numerical value of Day of week, Sunday=1, Monday=2,..., Saturday=7.
+ ///
+ /// Note that that updating this value respects local day of week, so for example,
+ /// 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.
+ ///
+ 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,
+ /// 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()); }
+ ///
+ /// 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()); }
+ ///
+ /// Extract from date_time numerical value of 24 clock hour [0..23]
+ ///
+ 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()); }
+ ///
+ /// 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()); }
+ ///
+ /// Extract from date_time numerical value of minute [0..59]
+ ///
+ 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()); }
+ ///
+ /// 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()); }
+ ///
+ /// 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()); }
+ ///
+ /// 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()); }
+
+ ///
+ /// 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()); }
+ ///
+ /// Extract from date_time_duration numerical value of duration in years
+ ///
+ 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()); }
+ ///
+ /// Extract from date_time_duration numerical value of duration in months
+ ///
+ 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()); }
+ ///
+ /// 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()); }
+ ///
+ /// 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()); }
+ ///
+ /// 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()); }
+ ///
+ /// 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()); }
+ ///
+ /// Extract from date_time_duration numerical value of duration in hours
+ ///
+ 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()); }
+ ///
+ /// 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()); }
+ ///
+ /// Extract from date_time_duration numerical value of duration in minutes
+ ///
+ 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()); }
+ ///
+ /// 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()); }
+ ///
+ /// 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()); }
+ ///
+ /// 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()); }
+
+
+ }
+
+ /// @}
+
+
+ } // locale
+} // boost
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+
+#endif
+///
+/// \example calendar.cpp
+///
+/// Example of using date_time functions for generating calendar for current year.
+///
+
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4

Added: trunk/boost/locale/date_time_facet.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/locale/date_time_facet.hpp 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,263 @@
+//
+// 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_DATE_TIME_FACET_HPP_INCLUDED
+#define BOOST_LOCALE_DATE_TIME_FACET_HPP_INCLUDED
+
+#include <boost/locale/config.hpp>
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4275 4251 4231 4660)
+#endif
+
+#include <boost/cstdint.hpp>
+#include <locale>
+
+namespace boost {
+ namespace locale {
+ ///
+ /// \brief Namespace that contains various types for manipulation with dates
+ ///
+ namespace period {
+ ///
+ /// \brief This namespace holds a enum of various period types like era, year, month, etc..
+ ///
+ namespace marks {
+ /// \brief the type that defines a flag that holds a period identifier
+ enum period_mark {
+ invalid, ///< Special invalid value, should not be used directly
+ era, ///< Era i.e. AC, BC in Gregorian and Julian calendar, range [0,1]
+ year, ///< Year, it is calendar specific, for example 2011 in Gregorian calendar.
+ extended_year, ///< Extended year for Gregorian/Julian calendars, where 1 BC == 0, 2 BC == -1.
+ month, ///< The month of year, calendar specific, in Gregorian [0..11]
+ day, ///< The day of month, calendar specific, in Gregorian [1..31]
+ day_of_year, ///< The number of day in year, starting from 1, in Gregorian [1..366]
+ day_of_week, ///< Day of week, Sunday=1, Monday=2,..., Saturday=7.
+ ///< Note that that updating this value respects local day of week, so for example,
+ ///< 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,
+ ///< 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]
+ hour_12, ///< 12 clock hour [0..11]
+ am_pm, ///< am or pm marker [0..1]
+ minute, ///< minute [0..59]
+ second, ///< second [0..59]
+ week_of_year, ///< The week number in the year
+ week_of_month, ///< The week number within current month
+ first_day_of_week, ///< First day of week, constant, for example Sunday in US = 1, Monday in France = 2
+ };
+
+ } // marks
+
+ ///
+ /// \brief 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.
+ ///
+ class period_type {
+ public:
+ ///
+ /// Create a period of specific type, default is invalid.
+ ///
+ 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_;
+ }
+
+ ///
+ /// Check if two periods are the same
+ ///
+ bool operator==(period_type const &other) const
+ {
+ return mark()==other.mark();
+ }
+ ///
+ /// Check if two periods are different
+ ///
+ bool operator!=(period_type const &other) const
+ {
+ return mark()!=other.mark();
+ }
+ private:
+ marks::period_mark mark_;
+ };
+
+ } // namespace period
+
+ ///
+ /// Structure that define POSIX time, seconds and milliseconds
+ /// since Jan 1, 1970, 00:00 not including leap seconds.
+ ///
+ struct posix_time {
+ int64_t seconds; ///< Seconds since epoch
+ uint32_t nanoseconds; ///< Nanoseconds resolution
+ };
+
+ ///
+ /// 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
+ ///
+
+ class abstract_calendar {
+ public:
+
+ ///
+ /// Type that defines how to fetch the value
+ ///
+ typedef enum {
+ 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.
+ } value_type;
+
+ ///
+ /// A way to update the value
+ ///
+ typedef enum {
+ 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
+ } update_type;
+
+ ///
+ /// Information about calendar
+ ///
+ typedef enum {
+ is_gregorian, ///< Check if the calendar is Gregorian
+ is_dst ///< Check if the current time is in daylight time savings
+ } calendar_option_type;
+
+ ///
+ /// Make a polymorphic copy of the calendar
+ ///
+ virtual abstract_calendar *clone() const = 0;
+
+ ///
+ /// Set specific \a value for period \a 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
+ ///
+ virtual void set_value(period::marks::period_mark p,int value) = 0;
+
+ ///
+ /// Recalculate all periods after setting them, should be called after use of set_value() function.
+ ///
+ virtual void normalize() = 0;
+
+ ///
+ /// 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;
+
+ ///
+ /// Set current time point
+ ///
+ virtual void set_time(posix_time const &p) = 0;
+ ///
+ /// Get current time point
+ ///
+ virtual posix_time get_time() const = 0;
+
+ ///
+ /// Set option for calendar, for future use
+ ///
+ virtual void set_option(calendar_option_type opt,int v) = 0;
+ ///
+ /// Get option for calendar, currently only check if it is Gregorian calendar
+ ///
+ virtual int get_option(calendar_option_type opt) const = 0;
+
+ ///
+ /// 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;
+
+ ///
+ /// 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;
+
+ ///
+ /// Set time zone, empty - use system
+ ///
+ virtual void set_timezone(std::string const &tz) = 0;
+ ///
+ /// Get current time zone, empty - system one
+ ///
+ virtual std::string get_timezone() const = 0;
+
+ ///
+ /// Check of two calendars have same rules
+ ///
+ virtual bool same(abstract_calendar const *other) const = 0;
+
+ virtual ~abstract_calendar()
+ {
+ }
+
+ };
+
+ ///
+ /// \brief the facet that generates calendar for specific locale
+ ///
+ class BOOST_LOCALE_DECL calendar_facet : public std::locale::facet {
+ public:
+ ///
+ /// Basic constructor
+ ///
+ calendar_facet(size_t refs = 0) : std::locale::facet(refs)
+ {
+ }
+ ///
+ /// Create a new calendar that points to current point of time.
+ ///
+ virtual abstract_calendar *create_calendar() const = 0;
+
+ ///
+ /// Locale id (needed to work with std::locale)
+ ///
+ static std::locale::id id;
+ };
+
+ } // locale
+} // boost
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+
+#endif
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
+

Added: trunk/boost/locale/encoding.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/locale/encoding.hpp 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,352 @@
+//
+// 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_ENCODING_HPP_INCLUDED
+#define BOOST_LOCALE_ENCODING_HPP_INCLUDED
+
+#include <boost/locale/config.hpp>
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4275 4251 4231 4660)
+#endif
+#include <boost/locale/info.hpp>
+#include <boost/cstdint.hpp>
+#include <stdexcept>
+
+
+
+namespace boost {
+ namespace locale {
+
+ ///
+ /// \brief Namespace that contains all functions related to character set conversion
+ ///
+ namespace conv {
+ ///
+ /// \defgroup codepage Character conversion functions
+ ///
+ /// @{
+
+ ///
+ /// \brief The excepton that is thrown in case of conversion error
+ ///
+ class BOOST_SYMBOL_VISIBLE conversion_error : public std::runtime_error {
+ public:
+ conversion_error() : std::runtime_error("Conversion failed") {}
+ };
+
+ ///
+ /// \brief This exception is thrown in case of use of unsupported
+ /// or invalid character set
+ ///
+ class BOOST_SYMBOL_VISIBLE invalid_charset_error : public std::runtime_error {
+ public:
+
+ /// Create an error for charset \a charset
+ invalid_charset_error(std::string charset) :
+ std::runtime_error("Invalid or unsupported charset:" + charset)
+ {
+ }
+ };
+
+
+ ///
+ /// enum that defines conversion policy
+ ///
+ typedef enum {
+ skip = 0, ///< Skip illegal/unconvertable characters
+ stop = 1, ///< Stop conversion and throw conversion_error
+ default_method = skip ///< Default method - skip
+ } method_type;
+
+ ///
+ /// convert string to UTF string from text in range [begin,end) encoded with \a charset according to policy \a how
+ ///
+ template<typename CharType>
+ std::basic_string<CharType> to_utf(char const *begin,char const *end,std::string const &charset,method_type how=default_method);
+
+ ///
+ /// convert UTF text in range [begin,end) to a text encoded with \a charset according to policy \a how
+ ///
+ template<typename CharType>
+ std::string from_utf(CharType const *begin,CharType const *end,std::string const &charset,method_type how=default_method);
+
+ ///
+ /// 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<typename CharType>
+ std::basic_string<CharType> to_utf(char const *begin,char const *end,std::locale const &loc,method_type how=default_method)
+ {
+ return to_utf<CharType>(begin,end,std::use_facet<info>(loc).encoding(),how);
+ }
+
+ ///
+ /// 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<typename CharType>
+ std::string from_utf(CharType const *begin,CharType const *end,std::locale const &loc,method_type how=default_method)
+ {
+ return from_utf(begin,end,std::use_facet<info>(loc).encoding(),how);
+ }
+
+ ///
+ /// convert a string \a text encoded with \a charset to UTF string
+ ///
+
+ template<typename CharType>
+ std::basic_string<CharType> to_utf(std::string const &text,std::string const &charset,method_type how=default_method)
+ {
+ return to_utf<CharType>(text.c_str(),text.c_str()+text.size(),charset,how);
+ }
+
+ ///
+ /// Convert a \a text from \a charset to UTF string
+ ///
+ template<typename CharType>
+ std::string from_utf(std::basic_string<CharType> const &text,std::string const &charset,method_type how=default_method)
+ {
+ return from_utf(text.c_str(),text.c_str()+text.size(),charset,how);
+ }
+
+ ///
+ /// Convert a \a text from \a charset to UTF string
+ ///
+ template<typename CharType>
+ std::basic_string<CharType> to_utf(char const *text,std::string const &charset,method_type how=default_method)
+ {
+ char const *text_end = text;
+ while(*text_end)
+ text_end++;
+ return to_utf<CharType>(text,text_end,charset,how);
+ }
+
+ ///
+ /// Convert a \a text from UTF to \a charset
+ ///
+ template<typename CharType>
+ std::string from_utf(CharType const *text,std::string const &charset,method_type how=default_method)
+ {
+ CharType const *text_end = text;
+ while(*text_end)
+ text_end++;
+ return from_utf(text,text_end,charset,how);
+ }
+
+ ///
+ /// 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<typename CharType>
+ std::basic_string<CharType> to_utf(std::string const &text,std::locale const &loc,method_type how=default_method)
+ {
+ return to_utf<CharType>(text.c_str(),text.c_str()+text.size(),loc,how);
+ }
+
+ ///
+ /// 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<typename CharType>
+ std::string from_utf(std::basic_string<CharType> const &text,std::locale const &loc,method_type how=default_method)
+ {
+ return from_utf(text.c_str(),text.c_str()+text.size(),loc,how);
+ }
+
+ ///
+ /// 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<typename CharType>
+ std::basic_string<CharType> to_utf(char const *text,std::locale const &loc,method_type how=default_method)
+ {
+ char const *text_end = text;
+ while(*text_end)
+ text_end++;
+ return to_utf<CharType>(text,text_end,loc,how);
+ }
+
+ ///
+ /// 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<typename CharType>
+ std::string from_utf(CharType const *text,std::locale const &loc,method_type how=default_method)
+ {
+ CharType const *text_end = text;
+ while(*text_end)
+ text_end++;
+ return from_utf(text,text_end,loc,how);
+ }
+
+
+ ///
+ /// 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,
+ std::string const &to_encoding,
+ std::string const &from_encoding,
+ method_type how=default_method);
+
+ ///
+ /// Convert a \a text to \a to_encoding from \a from_encoding
+ ///
+
+ inline
+ std::string between(char const *text,
+ std::string const &to_encoding,
+ std::string const &from_encoding,
+ method_type how=default_method)
+ {
+ char const *end=text;
+ while(*end)
+ end++;
+ return boost::locale::conv::between(text,end,to_encoding,from_encoding,how);
+ }
+
+ ///
+ /// Convert a \a text to \a to_encoding from \a from_encoding
+ ///
+ inline
+ std::string between(std::string const &text,
+ std::string const &to_encoding,
+ std::string const &from_encoding,
+ method_type how=default_method)
+ {
+ return boost::locale::conv::between(text.c_str(),text.c_str()+text.size(),to_encoding,from_encoding,how);
+ }
+
+ /// \cond INTERNAL
+
+ template<>
+ BOOST_LOCALE_DECL std::basic_string<char> to_utf(char const *begin,char const *end,std::string const &charset,method_type how);
+
+ template<>
+ BOOST_LOCALE_DECL std::string from_utf(char const *begin,char const *end,std::string const &charset,method_type how);
+
+ template<>
+ BOOST_LOCALE_DECL std::basic_string<wchar_t> to_utf(char const *begin,char const *end,std::string const &charset,method_type how);
+
+ template<>
+ BOOST_LOCALE_DECL std::string from_utf(wchar_t const *begin,wchar_t const *end,std::string const &charset,method_type how);
+
+ #ifdef BOOST_HAS_CHAR16_T
+ template<>
+ BOOST_LOCALE_DECL std::basic_string<char16_t> to_utf(char const *begin,char const *end,std::string const &charset,method_type how);
+
+ template<>
+ BOOST_LOCALE_DECL std::string from_utf(char16_t const *begin,char16_t const *end,std::string const &charset,method_type how);
+ #endif
+
+ #ifdef BOOST_HAS_CHAR32_T
+ template<>
+ BOOST_LOCALE_DECL std::basic_string<char32_t> to_utf(char const *begin,char const *end,std::string const &charset,method_type how);
+
+ template<>
+ BOOST_LOCALE_DECL std::string from_utf(char32_t const *begin,char32_t const *end,std::string const &charset,method_type how);
+ #endif
+
+ namespace details {
+
+ template<typename CharOut,typename CharIn>
+ struct utf_to_utf_traits {
+ static std::basic_string<CharOut>
+ convert(CharIn const *begin,CharIn const *end,method_type how)
+ {
+ // Make more efficient in fututre - UTF-16/UTF-32 should be quite
+ // simple and fast
+ return to_utf<CharOut>(from_utf(begin,end,"UTF-8",how),"UTF-8",how);
+ }
+ };
+ template<typename CharOut>
+ struct utf_to_utf_traits<CharOut,char> {
+ static std::basic_string<CharOut>
+ convert(char const *begin,char const *end,method_type how)
+ {
+ return to_utf<CharOut>(begin,end,"UTF-8",how);
+ }
+ };
+ template<typename CharIn>
+ struct utf_to_utf_traits<char,CharIn> {
+ static std::string
+ convert(CharIn const *begin,CharIn const *end,method_type how)
+ {
+ return from_utf(begin,end,"UTF-8",how);
+ }
+ };
+ template<>
+ struct utf_to_utf_traits<char,char> { // just test valid
+ static std::string
+ convert(char const *begin,char const *end,method_type how)
+ {
+ return from_utf(begin,end,"UTF-8",how);
+ }
+ };
+ }
+
+ /// \endcond
+
+ ///
+ /// Convert a Unicode text in range [begin,end) to other Unicode encoding
+ ///
+ template<typename CharOut,typename CharIn>
+ std::basic_string<CharOut>
+ utf_to_utf(CharIn const *begin,CharIn const *end,method_type how = default_method)
+ {
+ return details::utf_to_utf_traits<CharOut,CharIn>::convert(begin,end,how);
+ }
+
+ ///
+ /// Convert a Unicode NUL terminated string \a str other Unicode encoding
+ ///
+ template<typename CharOut,typename CharIn>
+ std::basic_string<CharOut>
+ utf_to_utf(CharIn const *str,method_type how = default_method)
+ {
+ CharIn const *end = str;
+ while(*end)
+ end++;
+ return utf_to_utf<CharOut,CharIn>(str,end,how);
+ }
+
+
+ ///
+ /// Convert a Unicode string \a str other Unicode encoding
+ ///
+ template<typename CharOut,typename CharIn>
+ std::basic_string<CharOut>
+ utf_to_utf(std::basic_string<CharIn> const &str,method_type how = default_method)
+ {
+ return utf_to_utf<CharOut,CharIn>(str.c_str(),str.c_str()+str.size(),how);
+ }
+
+
+ /// @}
+
+ } // conv
+
+ } // locale
+} // boost
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif
+
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
+

Added: trunk/boost/locale/format.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/locale/format.hpp 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,515 @@
+//
+// 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_FORMAT_HPP_INCLUDED
+#define BOOST_LOCALE_FORMAT_HPP_INCLUDED
+
+#include <boost/locale/config.hpp>
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4275 4251 4231 4660)
+#endif
+#include <boost/locale/message.hpp>
+#include <boost/locale/formatting.hpp>
+
+#include <sstream>
+
+
+namespace boost {
+ namespace locale {
+
+ ///
+ /// \defgroup format Format
+ ///
+ /// This module provides printf like functionality integrated into iostreams and suitable for localization
+ ///
+ /// @{
+ ///
+
+ /// \cond INTERNAL
+ namespace details {
+
+ template<typename CharType>
+ struct formattible {
+ typedef std::basic_ostream<CharType> stream_type;
+ typedef void (*writer_type)(stream_type &output,void const *ptr);
+
+ formattible() :
+ pointer_(0),
+ writer_(&formattible::void_write)
+ {
+ }
+
+ formattible(formattible const &other) :
+ pointer_(other.pointer_),
+ writer_(other.writer_)
+ {
+ }
+
+ formattible const &operator=(formattible const &other)
+ {
+ if(this != &other) {
+ pointer_=other.pointer_;
+ writer_=other.writer_;
+ }
+ return *this;
+ }
+
+ template<typename Type>
+ formattible(Type const &value)
+ {
+ pointer_ = static_cast<void const *>(&value);
+ writer_ = &write<Type>;
+ }
+
+ template<typename Type>
+ formattible const &operator=(Type const &other)
+ {
+ *this = formattible(other);
+ return *this;
+ }
+
+ friend stream_type &operator<<(stream_type &out,formattible const &fmt)
+ {
+ fmt.writer_(out,fmt.pointer_);
+ return out;
+ }
+
+ private:
+ static void void_write(stream_type &output,void const * /*ptr*/)
+ {
+ CharType empty_string[1]={0};
+ output<<empty_string;
+ }
+
+ template<typename Type>
+ static void write(stream_type &output,void const *ptr)
+ {
+ output << *static_cast<Type const *>(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<typename CharType>
+ void set_flag_with_str(std::string const &key,std::basic_string<CharType> const &value)
+ {
+ if(key=="ftime" || key=="strftime") {
+ as::strftime(ios_);
+ ios_info::get(ios_).date_time_pattern(value);
+ }
+ }
+ void restore();
+ private:
+ void imbue(std::locale const &);
+ format_parser(format_parser const &);
+ void operator=(format_parser const &);
+
+ std::ios_base &ios_;
+ struct data;
+ std::auto_ptr<data> d;
+ };
+
+ }
+
+ /// \endcond
+
+ ///
+ /// \brief 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
+ /// \code
+ /// cout << format("Hello {1}, you are {2} years old") % name % age << endl;
+ /// \endcode
+ ///
+ /// Formatting is enclosed between curly brackets \c { \c } and defined by a comma separated list of flags in the format key[=value]
+ /// value may also be text included between single quotes \c ' that is used for special purposes where inclusion of non-ASCII
+ /// text is allowed
+ ///
+ /// Including of literal \c { and \c } is possible by specifying double brackets \c {{ and \c }} accordingly.
+ ///
+ ///
+ /// For example:
+ ///
+ /// \code
+ /// 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.
+ /// List of keys:
+ /// - \c [0-9]+ -- digits, the index of a formatted parameter -- mandatory key.
+ /// - \c num or \c number -- format a number. Optional values are:
+ /// - \c hex -- display hexadecimal number
+ /// - \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.
+ /// .
+ /// - \c per or \c percent -- format percent value.
+ /// - \c date, \c time , \c datetime or \c dt -- format date, time or date and time. Optional values are:
+ /// - \c s or \c short -- display in short format
+ /// - \c m or \c medium -- display in medium format.
+ /// - \c l or \c long -- display in long format.
+ /// - \c f or \c full -- display in full format.
+ /// .
+ /// - \c ftime with string (quoted) parameter -- display as with \c strftime see, \c as::ftime manipulator
+ /// - \c spell or \c spellout -- spell the number.
+ /// - \c ord or \c ordinal -- format ordinal number (1st, 2nd... etc)
+ /// - \c left or \c < -- align to left.
+ /// - \c right or \c > -- align to right.
+ /// - \c width or \c w -- set field width (requires parameter).
+ /// - \c precision or \c p -- set precision (requires parameter).
+ /// - \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_at_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;
+ /// \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;
+ /// \endcode
+ ///
+ ///
+ /// Invalid formatting strings are slightly ignored. This would prevent from translator
+ /// to crash the program in unexpected location.
+ ///
+ template<typename CharType>
+ class basic_format {
+ public:
+ typedef CharType char_type; ///< Underlying character type
+ typedef basic_message<char_type> message_type; ///< The translation message type
+ /// \cond INTERNAL
+ typedef details::formattible<CharType> formattible_type;
+ /// \endcond
+
+ 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
+
+
+ ///
+ /// Create a format class for \a format_string
+ ///
+ basic_format(string_type format_string) :
+ format_(format_string),
+ translate_(false),
+ parameters_count_(0)
+ {
+ }
+ ///
+ /// 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) :
+ message_(trans),
+ translate_(true),
+ parameters_count_(0)
+ {
+ }
+
+ ///
+ /// Add new parameter to format list. The object should be a type
+ /// with defined expression out << object where \c out is \c std::basic_ostream.
+ ///
+ template<typename Formattible>
+ basic_format &operator % (Formattible const &object)
+ {
+ add(formattible_type(object));
+ return *this;
+ }
+
+ ///
+ /// Format a string using a locale \a loc
+ ///
+ string_type str(std::locale const &loc = std::locale()) const
+ {
+ std::basic_ostringstream<CharType> buffer;
+ buffer.imbue(loc);
+ write(buffer);
+ return buffer.str();
+ }
+
+ ///
+ /// write a formatted string to output stream \a out using out's locale
+ ///
+ void write(stream_type &out) const
+ {
+ string_type format;
+ if(translate_)
+ 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) :
+ fmt_(&fmt),
+ restored_(false)
+ {
+ }
+ void restore()
+ {
+ if(restored_)
+ return;
+ fmt_->restore();
+ restored_ = true;
+ }
+ ~format_guard()
+ {
+ try {
+ restore();
+ }
+ catch(...) {
+ }
+ }
+ private:
+ details::format_parser *fmt_;
+ bool restored_;
+ };
+
+ void format_output(stream_type &out,string_type const &sformat) const
+ {
+ char_type obrk='{';
+ char_type cbrk='}';
+ char_type eq='=';
+ char_type comma=',';
+ char_type quote='\'';
+
+ size_t pos = 0;
+ size_t size=sformat.size();
+ CharType const *format=sformat.c_str();
+ while(format[pos]!=0) {
+ if(format[pos] != obrk) {
+ if(format[pos]==cbrk && format[pos+1]==cbrk) {
+ out << cbrk;
+ pos+=2;
+ }
+ else {
+ out<<format[pos];
+ pos++;
+ }
+ continue;
+ }
+
+ if(pos+1 < size && format[pos+1]==obrk) {
+ out << obrk;
+ pos+=2;
+ continue;
+ }
+ pos++;
+
+ details::format_parser fmt(out,static_cast<void *>(&out),&basic_format::imbue_locale);
+
+ format_guard guard(fmt);
+
+ while(pos < size) {
+ std::string key;
+ std::string svalue;
+ string_type value;
+ bool use_svalue = true;
+ for(;format[pos];pos++) {
+ char_type c=format[pos];
+ if(c==comma || c==eq || c==cbrk)
+ break;
+ else {
+ key+=static_cast<char>(c);
+ }
+ }
+
+ if(format[pos]==eq) {
+ pos++;
+ if(format[pos]==quote) {
+ pos++;
+ use_svalue = false;
+ while(format[pos]) {
+ if(format[pos]==quote) {
+ if(format[pos+1]==quote) {
+ value+=quote;
+ pos+=2;
+ }
+ else {
+ pos++;
+ break;
+ }
+ }
+ else {
+ value+=format[pos];
+ pos++;
+ }
+ }
+ }
+ else {
+ char_type c;
+ while((c=format[pos])!=0 && c!=comma && c!=cbrk) {
+ svalue+=static_cast<char>(c);
+ pos++;
+ }
+ }
+ }
+
+ if(use_svalue) {
+ fmt.set_one_flag(key,svalue);
+ }
+ else
+ fmt.set_flag_with_str(key,value);
+
+ if(format[pos]==comma) {
+ pos++;
+ continue;
+ }
+ else if(format[pos]==cbrk) {
+ unsigned position = fmt.get_position();
+ out << get(position);
+ guard.restore();
+ pos++;
+ break;
+ }
+ else {
+ guard.restore();
+ break;
+ }
+ }
+ }
+ }
+
+
+ //
+ // Non-copyable
+ //
+ basic_format(basic_format const &other);
+ void operator=(basic_format const &other);
+
+ void add(formattible_type const &param)
+ {
+ if(parameters_count_ >= base_params_)
+ ext_params_.push_back(param);
+ else
+ parameters_[parameters_count_] = param;
+ parameters_count_++;
+ }
+
+ formattible_type get(unsigned id) const
+ {
+ if(id >= parameters_count_)
+ return formattible_type();
+ else if(id >= base_params_)
+ return ext_params_[id - base_params_];
+ else
+ return parameters_[id];
+ }
+
+ static void imbue_locale(void *ptr,std::locale const &l)
+ {
+ reinterpret_cast<stream_type *>(ptr)->imbue(l);
+ }
+
+
+
+ static unsigned const base_params_ = 8;
+
+ message_type message_;
+ string_type format_;
+ bool translate_;
+
+
+ formattible_type parameters_[base_params_];
+ unsigned parameters_count_;
+ std::vector<formattible_type> ext_params_;
+ };
+
+ ///
+ /// Write formatted message to stream.
+ ///
+ /// This operator actually causes actual text formatting. It uses the locale of \a out stream
+ ///
+ template<typename CharType>
+ std::basic_ostream<CharType> &operator<<(std::basic_ostream<CharType> &out,basic_format<CharType> const &fmt)
+ {
+ fmt.write(out);
+ return out;
+ }
+
+
+ ///
+ /// Definition of char based format
+ ///
+ typedef basic_format<char> format;
+
+ ///
+ /// Definition of wchar_t based format
+ ///
+ typedef basic_format<wchar_t> wformat;
+
+ #ifdef BOOST_HAS_CHAR16_T
+ ///
+ /// Definition of char16_t based format
+ ///
+ typedef basic_format<char16_t> u16format;
+ #endif
+
+ #ifdef BOOST_HAS_CHAR32_T
+ ///
+ /// Definition of char32_t based format
+ ///
+ typedef basic_format<char32_t> u32format;
+ #endif
+
+ ///
+ /// @}
+ ///
+
+ }
+}
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif
+
+///
+/// \example hello.cpp
+///
+/// Basic example of using various functions provided by this library
+///
+/// \example whello.cpp
+///
+/// Basic example of using various functions with wide strings provided by this library
+///
+///
+
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
+

Added: trunk/boost/locale/formatting.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/locale/formatting.hpp 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,673 @@
+//
+// 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_FORMATTING_HPP_INCLUDED
+#define BOOST_LOCALE_FORMATTING_HPP_INCLUDED
+
+#include <boost/locale/config.hpp>
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4275 4251 4231 4660)
+#endif
+#include <boost/cstdint.hpp>
+#include <boost/locale/time_zone.hpp>
+#include <ostream>
+#include <istream>
+#include <string>
+#include <string.h>
+#include <typeinfo>
+
+namespace boost {
+ namespace locale {
+ ///
+ /// \brief This namespace holds additional formatting
+ /// flags that can be set using ios_info.
+ ///
+ namespace flags {
+ ///
+ /// Formatting flags, each one of them has corresponding manipulation
+ /// in namespace \a as
+ ///
+ typedef enum {
+ posix = 0,
+ number = 1,
+ currency = 2,
+ percent = 3,
+ date = 4,
+ time = 5,
+ datetime = 6,
+ strftime = 7,
+ spellout = 8,
+ ordinal = 9,
+
+ display_flags_mask = 31,
+
+ currency_default = 0 << 5,
+ currency_iso = 1 << 5,
+ currency_national = 2 << 5,
+
+ currency_flags_mask = 3 << 5,
+
+ time_default = 0 << 7,
+ time_short = 1 << 7,
+ time_medium = 2 << 7,
+ time_long = 3 << 7,
+ time_full = 4 << 7,
+ time_flags_mask = 7 << 7,
+
+ date_default = 0 << 10,
+ date_short = 1 << 10,
+ date_medium = 2 << 10,
+ date_long = 3 << 10,
+ date_full = 4 << 10,
+ date_flags_mask = 7 << 10,
+
+ datetime_flags_mask = date_flags_mask | time_flags_mask
+
+ } display_flags_type;
+
+ ///
+ /// Special string patters that can be used
+ /// for text formatting
+ ///
+ typedef enum {
+ datetime_pattern, ///< strftime like formatting
+ time_zone_id ///< time zone name
+ } pattern_type;
+
+ ///
+ /// Special integer values that can be used for formatting
+ ///
+ typedef enum {
+ domain_id ///< Domain code - for message formatting
+ } value_type;
+
+
+ } // flags
+
+ ///
+ /// \brief 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
+ ///
+ class BOOST_LOCALE_DECL ios_info {
+ public:
+
+ /// \cond INTERNAL
+
+ ios_info();
+ ios_info(ios_info const &);
+ ios_info const &operator=(ios_info const &);
+ ~ios_info();
+
+ /// \endcond
+
+ ///
+ /// Get ios_info instance for specific stream object
+ ///
+ static ios_info &get(std::ios_base &ios);
+
+ ///
+ /// 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)
+ ///
+ template<typename CharType>
+ void date_time_pattern(std::basic_string<CharType> const &str)
+ {
+ string_set &s = date_time_pattern_set();
+ s.set<CharType>(str.c_str());
+ }
+
+
+ ///
+ /// 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
+ ///
+ uint64_t time_flags() const;
+
+ ///
+ /// 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)
+ ///
+ template<typename CharType>
+ std::basic_string<CharType> date_time_pattern() const
+ {
+ string_set const &s = date_time_pattern_set();
+ return s.get<CharType>();
+ }
+
+ /// \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 const &other);
+ string_set const &operator=(string_set const &other);
+ void swap(string_set &other);
+
+ template<typename Char>
+ void set(Char const *s)
+ {
+ delete [] ptr;
+ ptr = 0;
+ type=&typeid(Char);
+ Char const *end = s;
+ while(*end!=0) end++;
+ // if ptr = 0 it does not matter what is value of size
+ size = sizeof(Char)*(end - s+1);
+ ptr = new char[size];
+ memcpy(ptr,s,size);
+ }
+
+ template<typename Char>
+ std::basic_string<Char> get() const
+ {
+ if(type==0 || *type!=typeid(Char))
+ throw std::bad_cast();
+ std::basic_string<Char> result = reinterpret_cast<Char const *>(ptr);
+ return result;
+ }
+
+ private:
+ std::type_info const *type;
+ size_t size;
+ char *ptr;
+ };
+
+ uint64_t flags_;
+ int domain_id_;
+ std::string time_zone_;
+ string_set datetime_;
+
+ struct data;
+ data *d;
+
+ };
+
+
+ ///
+ /// \brief This namespace includes all manipulators that can be used on IO streams
+ ///
+ namespace as {
+ ///
+ /// \defgroup manipulators I/O Stream manipulators
+ ///
+ /// @{
+ ///
+
+ ///
+ /// 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);
+ return ios;
+ }
+
+ ///
+ /// Format a number. Note, unlike standard number formatting, integers would be treated like real numbers when std::fixed or
+ /// std::scientific manipulators were applied
+ ///
+ inline std::ios_base & number(std::ios_base & ios)
+ {
+ ios_info::get(ios).display_flags(flags::number);
+ return ios;
+ }
+
+ ///
+ /// Format currency, number is treated like amount of money
+ ///
+ inline std::ios_base & currency(std::ios_base & ios)
+ {
+ ios_info::get(ios).display_flags(flags::currency);
+ return ios;
+ }
+
+ ///
+ /// Format percent, value 0.3 is treated as 30%.
+ ///
+ inline std::ios_base & percent(std::ios_base & ios)
+ {
+ ios_info::get(ios).display_flags(flags::percent);
+ return ios;
+ }
+
+ ///
+ /// Format a date, number is treated as POSIX time
+ ///
+ inline std::ios_base & date(std::ios_base & ios)
+ {
+ ios_info::get(ios).display_flags(flags::date);
+ return ios;
+ }
+
+ ///
+ /// Format a time, number is treated as POSIX time
+ ///
+ inline std::ios_base & time(std::ios_base & ios)
+ {
+ ios_info::get(ios).display_flags(flags::time);
+ return ios;
+ }
+
+ ///
+ /// Format a date and time, number is treated as POSIX time
+ ///
+ inline std::ios_base & datetime(std::ios_base & ios)
+ {
+ ios_info::get(ios).display_flags(flags::datetime);
+ return ios;
+ }
+
+ ///
+ /// Create formatted date time, Please note, this manipulator only changes formatting mode,
+ /// and not format itself, so you are probably looking for ftime manipulator
+ ///
+ inline std::ios_base & strftime(std::ios_base & ios)
+ {
+ ios_info::get(ios).display_flags(flags::strftime);
+ return ios;
+ }
+
+ ///
+ /// Spell the number, like "one hundred and ten"
+ ///
+ inline std::ios_base & spellout(std::ios_base & ios)
+ {
+ ios_info::get(ios).display_flags(flags::spellout);
+ return ios;
+ }
+
+ ///
+ /// Write an order of the number like 4th.
+ ///
+ inline std::ios_base & ordinal(std::ios_base & ios)
+ {
+ ios_info::get(ios).display_flags(flags::ordinal);
+ return ios;
+ }
+
+ ///
+ /// Set default currency formatting style -- national, like "$"
+ ///
+ inline std::ios_base & currency_default(std::ios_base & ios)
+ {
+ ios_info::get(ios).currency_flags(flags::currency_default);
+ return ios;
+ }
+
+ ///
+ /// Set ISO currency formatting style, like "USD", (requires ICU >= 4.2)
+ ///
+ inline std::ios_base & currency_iso(std::ios_base & ios)
+ {
+ ios_info::get(ios).currency_flags(flags::currency_iso);
+ return ios;
+ }
+
+ ///
+ /// Set national currency formatting style, like "$"
+ ///
+ inline std::ios_base & currency_national(std::ios_base & ios)
+ {
+ ios_info::get(ios).currency_flags(flags::currency_national);
+ return ios;
+ }
+
+ ///
+ /// set default (medium) time formatting style
+ ///
+ inline std::ios_base & time_default(std::ios_base & ios)
+ {
+ ios_info::get(ios).time_flags(flags::time_default);
+ return ios;
+ }
+
+ ///
+ /// set short time formatting style
+ ///
+ inline std::ios_base & time_short(std::ios_base & ios)
+ {
+ ios_info::get(ios).time_flags(flags::time_short);
+ return ios;
+ }
+
+ ///
+ /// set medium time formatting style
+ ///
+ inline std::ios_base & time_medium(std::ios_base & ios)
+ {
+ ios_info::get(ios).time_flags(flags::time_medium);
+ return ios;
+ }
+
+ ///
+ /// set long time formatting style
+ ///
+ inline std::ios_base & time_long(std::ios_base & ios)
+ {
+ ios_info::get(ios).time_flags(flags::time_long);
+ return ios;
+ }
+
+ ///
+ /// set full time formatting style
+ ///
+ inline std::ios_base & time_full(std::ios_base & ios)
+ {
+ ios_info::get(ios).time_flags(flags::time_full);
+ return ios;
+ }
+
+ ///
+ /// set default (medium) date formatting style
+ ///
+ inline std::ios_base & date_default(std::ios_base & ios)
+ {
+ ios_info::get(ios).date_flags(flags::date_default);
+ return ios;
+ }
+
+ ///
+ /// set short date formatting style
+ ///
+ inline std::ios_base & date_short(std::ios_base & ios)
+ {
+ ios_info::get(ios).date_flags(flags::date_short);
+ return ios;
+ }
+
+ ///
+ /// set medium date formatting style
+ ///
+ inline std::ios_base & date_medium(std::ios_base & ios)
+ {
+ ios_info::get(ios).date_flags(flags::date_medium);
+ return ios;
+ }
+
+ ///
+ /// set long date formatting style
+ ///
+ inline std::ios_base & date_long(std::ios_base & ios)
+ {
+ ios_info::get(ios).date_flags(flags::date_long);
+ return ios;
+ }
+
+ ///
+ /// set full date formatting style
+ ///
+ inline std::ios_base & date_full(std::ios_base & ios)
+ {
+ ios_info::get(ios).date_flags(flags::date_full);
+ return ios;
+ }
+
+
+ /// \cond INTERNAL
+ namespace details {
+ template<typename CharType>
+ struct add_ftime {
+
+ std::basic_string<CharType> ftime;
+
+ void apply(std::basic_ios<CharType> &ios) const
+ {
+ ios_info::get(ios).date_time_pattern(ftime);
+ as::strftime(ios);
+ }
+
+ };
+
+ template<typename CharType>
+ std::basic_ostream<CharType> &operator<<(std::basic_ostream<CharType> &out,add_ftime<CharType> const &fmt)
+ {
+ fmt.apply(out);
+ return out;
+ }
+
+ template<typename CharType>
+ std::basic_istream<CharType> &operator>>(std::basic_istream<CharType> &in,add_ftime<CharType> const &fmt)
+ {
+ fmt.apply(in);
+ return in;
+ }
+
+ }
+ /// \endcond
+
+ ///
+ /// 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>
+ #ifdef BOOST_LOCALE_DOXYGEN
+ unspecified_type
+ #else
+ details::add_ftime<CharType>
+ #endif
+ ftime(std::basic_string<CharType> const &format)
+ {
+ details::add_ftime<CharType> fmt;
+ fmt.ftime=format;
+ return fmt;
+ }
+
+ ///
+ /// See ftime(std::basic_string<CharType> const &format)
+ ///
+ template<typename CharType>
+ #ifdef BOOST_LOCALE_DOXYGEN
+ unspecified_type
+ #else
+ details::add_ftime<CharType>
+ #endif
+ ftime(CharType const *format)
+ {
+ details::add_ftime<CharType> fmt;
+ fmt.ftime=format;
+ return fmt;
+ }
+
+ /// \cond INTERNAL
+ namespace details {
+ struct set_timezone {
+ std::string id;
+ };
+ template<typename CharType>
+ std::basic_ostream<CharType> &operator<<(std::basic_ostream<CharType> &out,set_timezone const &fmt)
+ {
+ ios_info::get(out).time_zone(fmt.id);
+ return out;
+ }
+
+ template<typename CharType>
+ std::basic_istream<CharType> &operator>>(std::basic_istream<CharType> &in,set_timezone const &fmt)
+ {
+ ios_info::get(in).time_zone(fmt.id);
+ return in;
+ }
+ }
+ /// \endcond
+
+ ///
+ /// Set GMT time zone to stream
+ ///
+ inline std::ios_base &gmt(std::ios_base &ios)
+ {
+ ios_info::get(ios).time_zone("GMT");
+ return ios;
+ }
+
+ ///
+ /// Set local time zone to stream
+ ///
+ inline std::ios_base &local_time(std::ios_base &ios)
+ {
+ ios_info::get(ios).time_zone(time_zone::global());
+ return ios;
+ }
+
+ ///
+ /// Set time zone using \a id
+ ///
+ inline
+ #ifdef BOOST_LOCALE_DOXYGEN
+ unspecified_type
+ #else
+ details::set_timezone
+ #endif
+ time_zone(char const *id)
+ {
+ details::set_timezone tz;
+ tz.id=id;
+ return tz;
+ }
+
+ ///
+ /// Set time zone using \a id
+ ///
+ inline
+ #ifdef BOOST_LOCALE_DOXYGEN
+ unspecified_type
+ #else
+ details::set_timezone
+ #endif
+ time_zone(std::string const &id)
+ {
+ details::set_timezone tz;
+ tz.id=id;
+ return tz;
+ }
+
+
+ ///
+ /// @}
+ ///
+
+ } // as manipulators
+
+ } // locale
+} // boost
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+
+#endif
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4

Added: trunk/boost/locale/generator.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/locale/generator.hpp 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,235 @@
+//
+// 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_GENERATOR_HPP
+#define BOOST_LOCALE_GENERATOR_HPP
+#include <boost/locale/config.hpp>
+#include <boost/cstdint.hpp>
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4275 4251 4231 4660)
+#endif
+#include <string>
+#include <locale>
+#include <memory>
+
+namespace boost {
+
+ template<typename Type>
+ class shared_ptr;
+
+ ///
+ /// \brief This is the main namespace that encloses all localization classes
+ ///
+ namespace locale {
+
+ class localization_backend;
+ class localization_backend_manager;
+
+ static const uint32_t nochar_facet = 0; ///< Unspecified character category for character independent facets
+ static const uint32_t char_facet = 1 << 0; ///< 8-bit character facets
+ static const uint32_t wchar_t_facet = 1 << 1; ///< wide character facets
+ static const uint32_t char16_t_facet = 1 << 2; ///< C++0x char16_t facets
+ static const uint32_t char32_t_facet = 1 << 3; ///< C++0x char32_t facets
+
+ 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; ///<type that specifies the character type that locales can be generated for
+
+ static const uint32_t convert_facet = 1 << 0; ///< Generate conversion facets
+ static const uint32_t collation_facet = 1 << 1; ///< Generate collation facets
+ static const uint32_t formatting_facet= 1 << 2; ///< Generate numbers, currency, date-time formatting facets
+ static const uint32_t parsing_facet = 1 << 3; ///< Generate numbers, currency, date-time formatting facets
+ static const uint32_t message_facet = 1 << 4; ///< Generate message facets
+ static const uint32_t codepage_facet = 1 << 5; ///< Generate character set conversion facets (derived from std::codecvt)
+ static const uint32_t boundary_facet = 1 << 6; ///< Generate boundary analysis facet
+
+ static const uint32_t per_character_facet_first = convert_facet; ///< First facet specific for character
+ static const uint32_t per_character_facet_last = boundary_facet; ///< Last facet specific for character
+
+ static const uint32_t calendar_facet = 1 << 16; ///< Generate boundary analysis facet
+ static const uint32_t information_facet = 1 << 17; ///< Generate general locale information facet
+
+ static const uint32_t non_character_facet_first = calendar_facet; ///< First character independent facet
+ static const uint32_t non_character_facet_last = information_facet;///< Last character independent facet
+
+
+ static const uint32_t all_categories = 0xFFFFFFFFu; ///< Generate all of them
+
+ typedef uint32_t locale_category_type; ///< a type used for more fine grained generation of facets
+
+ ///
+ /// \brief 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.
+ ///
+
+ class BOOST_LOCALE_DECL generator {
+ public:
+
+ ///
+ /// Create new generator using global localization_backend_manager
+ ///
+ generator();
+ ///
+ /// Create new generator using specific localization_backend_manager
+ ///
+ generator(localization_backend_manager const &);
+
+ ~generator();
+
+ ///
+ /// Set types of facets that should be generated, default all
+ ///
+ void categories(locale_category_type cats);
+ ///
+ /// Get types of facets that should be generated, default all
+ ///
+ locale_category_type categories() const;
+
+ ///
+ /// Set the characters type for which the facets should be generated, default all supported
+ ///
+ void characters(character_facet_type chars);
+ ///
+ /// Get the characters type for which the facets should be generated, default all supported
+ ///
+ character_facet_type characters() const;
+
+ ///
+ /// 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 \c /usr/share/locale/he/LC_MESSAGES/blog.mo
+ /// it would be \c 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 add_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 \a domain is not added yet it is added.
+ ///
+ void set_default_messages_domain(std::string const &domain);
+
+ ///
+ /// Remove all added domains from the list
+ ///
+ void clear_domains();
+
+ ///
+ /// 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 add_messages_path(std::string const &path);
+
+ ///
+ /// Remove all added paths
+ ///
+ void clear_paths();
+
+ ///
+ /// Remove all cached locales
+ ///
+ void clear_cache();
+
+ ///
+ /// Turn locale caching ON
+ ///
+ void locale_cache_enabled(bool on);
+
+ ///
+ /// Get locale cache option
+ ///
+ bool locale_cache_enabled() const;
+
+ ///
+ /// Check if by default ANSI encoding is selected or UTF-8 onces. The default is false.
+ ///
+ bool use_ansi_encoding() const;
+
+ ///
+ /// 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
+ ///
+ void use_ansi_encoding(bool enc);
+
+ ///
+ /// Generate a locale with id \a id
+ ///
+ std::locale generate(std::string const &id) const;
+ ///
+ /// Generate a locale with id \a id. Use \a base as a locale to which all facets are added,
+ /// instead of std::locale::classic().
+ ///
+ std::locale generate(std::locale const &base,std::string const &id) const;
+ ///
+ /// Shortcut to generate(id)
+ ///
+ std::locale operator()(std::string const &id) const
+ {
+ return generate(id);
+ }
+
+ ///
+ /// Set backend specific option
+ ///
+ void set_option(std::string const &name,std::string const &value);
+
+ ///
+ /// Clear backend specific options
+ ///
+ void clear_options();
+
+ private:
+
+ void set_all_options(shared_ptr<localization_backend> backend,std::string const &id) const;
+
+ generator(generator const &);
+ void operator=(generator const &);
+
+ struct data;
+ std::auto_ptr<data> d;
+ };
+
+ }
+}
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+
+#endif
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
+

Added: trunk/boost/locale/gnu_gettext.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/locale/gnu_gettext.hpp 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,167 @@
+//
+// 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_LOCLAE_GNU_GETTEXT_HPP
+#define BOOST_LOCLAE_GNU_GETTEXT_HPP
+
+#include <boost/locale/message.hpp>
+#include <boost/function.hpp>
+#include <stdexcept>
+
+namespace boost {
+namespace locale {
+/// \addtogroup message
+/// @{
+
+
+///
+/// \brief This namespace holds classes that provide GNU Gettext message catalogs support.
+///
+namespace gnu_gettext {
+
+ ///
+ /// \brief This structure holds all information required for creating gnu-gettext message catalogs,
+ ///
+ /// The user is expected to set its parameters to load these catalogs correctly. This structure
+ /// also allows providing functions for charset conversion. Note, you need to provide them,
+ /// so this structure is not useful for wide characters without subclassing and it will also
+ /// ignore gettext catalogs that use a charset different from \a encoding.
+ ///
+ struct messages_info {
+ messages_info() :
+ language("C"),
+ locale_category("LC_MESSAGES")
+ {
+ }
+
+ std::string language; ///< The language we load the catalog for, like "ru", "en", "de"
+ std::string country; ///< The country we load the catalog for, like "US", "IL"
+ std::string variant; ///< Language variant, like "euro" so it would look for catalog like de_DE\@euro
+ std::string encoding; ///< Required target charset encoding. Ignored for wide characters.
+ ///< For narrow, should specify the correct encoding required for this catalog
+ std::string locale_category; ///< Locale category, is set by default to LC_MESSAGES, but may be changed
+ ///
+ /// \brief This type represents GNU Gettext domain name for the messages.
+ ///
+ /// It consists of two parameters:
+ ///
+ /// - name - the name of the domain - used for opening the file name
+ /// - encoding - the encoding of the keys in the sources, default - UTF-8
+ ///
+ struct domain {
+
+ std::string name; ///< The name of the domain
+ std::string encoding; ///< The character encoding for the domain
+ domain() {}
+ ///
+ /// Create a domain object from the name that can hold an encoding after symbol "/"
+ /// such that if n is "hello/cp1255" then the name would be "hello" and "encoding" would
+ /// be "cp1255" and if n is "hello" then the name would be the same but encoding would be
+ /// "UTF-8"
+ ///
+ domain(std::string const &n)
+ {
+ size_t pos = n.find("/");
+ if(pos==std::string::npos) {
+ name = n;
+ encoding = "UTF-8";
+ }
+ else {
+ name = n.substr(0,pos);
+ encoding = n.substr(pos+1);
+ }
+
+ }
+
+ ///
+ /// Check whether two objects are equivalent, only names are compared, encoding is ignored
+ ///
+ bool operator==(domain const &other) const
+ {
+ return name==other.name;
+ }
+ ///
+ /// Check whether two objects are distinct, only names are compared, encoding is ignored
+ ///
+ bool operator!=(domain const &other) const
+ {
+ return !(*this==other);
+ }
+
+ };
+
+ typedef std::vector<domain> 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<std::string> 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<char> and return it.
+ ///
+ /// - If the file does not exist, it should return an empty vector.
+ /// - If a error occurs during file read it should throw a error.
+ ///
+ /// \note The user should support only the encodings the locales are created for. So if the user
+ /// uses only one encoding or the file system is encoding agnostic, he may ignore the \a encoding parameter.
+ ///
+ typedef function<
+ std::vector<char>(
+ 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;
+
+ };
+
+ ///
+ /// Create a message_format facet using GNU Gettext catalogs. It uses \a info structure to get
+ /// information about where to read them from and uses it for character set conversion (if needed)
+ ///
+
+ template<typename CharType>
+ message_format<CharType> *create_messages_facet(messages_info const &info);
+
+ /// \cond INTERNAL
+
+ template<>
+ BOOST_LOCALE_DECL message_format<char> *create_messages_facet(messages_info const &info);
+
+ template<>
+ BOOST_LOCALE_DECL message_format<wchar_t> *create_messages_facet(messages_info const &info);
+
+ #ifdef BOOST_HAS_CHAR16_T
+ template<>
+ BOOST_LOCALE_DECL message_format<char16_t> *create_messages_facet(messages_info const &info);
+ #endif
+
+ #ifdef BOOST_HAS_CHAR32_T
+ template<>
+ BOOST_LOCALE_DECL message_format<char32_t> *create_messages_facet(messages_info const &info);
+ #endif
+
+ /// \endcond
+
+} // gnu_gettext
+
+/// @}
+
+} // locale
+} // boost
+
+#endif
+
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
+

Added: trunk/boost/locale/hold_ptr.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/locale/hold_ptr.hpp 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,93 @@
+//
+// Copyright (c) 2010 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_HOLD_PTR_H
+#define BOOST_LOCALE_HOLD_PTR_H
+
+namespace boost {
+namespace locale {
+ ///
+ /// \brief 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).
+ ///
+ template<typename T>
+ class hold_ptr {
+ hold_ptr(hold_ptr const &other); // non copyable
+ hold_ptr const &operator=(hold_ptr const &other); // non assignable
+ public:
+ ///
+ /// Create new empty pointer
+ ///
+ hold_ptr() : ptr_(0) {}
+ ///
+ /// Create a pointer that holds \a v, ownership is transferred to smart pointer
+ ///
+ explicit hold_ptr(T *v) : ptr_(v) {}
+
+ ///
+ /// Destroy smart pointer and the object it owns.
+ ///
+ ~hold_ptr()
+ {
+ delete ptr_;
+ }
+
+ ///
+ /// Get a const pointer to the object
+ ///
+ T const *get() const { return ptr_; }
+ ///
+ /// 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_; }
+ ///
+ /// Get a const pointer to the object
+ ///
+ T const *operator->() const { return ptr_; }
+ ///
+ /// Get a mutable pointer to the object
+ ///
+ T *operator->() { return ptr_; }
+
+ ///
+ /// Transfer an ownership on the pointer to user
+ ///
+ T *release() { T *tmp=ptr_; ptr_=0; return tmp; }
+
+ ///
+ /// Set new value to pointer, previous object is destroyed, ownership on new object is transferred
+ ///
+ void reset(T *p=0)
+ {
+ if(ptr_) delete ptr_;
+ ptr_=p;
+ }
+ /// Swap two pointers
+ void swap(hold_ptr &other)
+ {
+ T *tmp=other.ptr_;
+ other.ptr_=ptr_;
+ ptr_=tmp;
+ }
+ private:
+ T *ptr_;
+ };
+
+} // locale
+} // boost
+
+#endif
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4

Added: trunk/boost/locale/info.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/locale/info.hpp 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,125 @@
+//
+// 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_INFO_HPP_INCLUDED
+#define BOOST_LOCALE_INFO_HPP_INCLUDED
+#include <boost/locale/config.hpp>
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4275 4251 4231 4660)
+#endif
+#include <locale>
+#include <string>
+
+
+namespace boost {
+ namespace locale {
+
+ ///
+ /// \brief a facet that holds general information about locale
+ ///
+ /// This facet should be always created in order to make all Boost.Locale functions work
+ ///
+ class BOOST_LOCALE_DECL info : public std::locale::facet
+ {
+ public:
+ static std::locale::id id; ///< This member uniquely defines this facet, required by STL
+
+ ///
+ /// String information about the locale
+ ///
+ enum string_propery {
+ 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
+ };
+
+ ///
+ /// Integer information about locale
+ ///
+ enum integer_property {
+ 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
+ {
+ return get_string_property(language_property);
+ }
+ ///
+ /// Get country name
+ ///
+ std::string country() const
+ {
+ return get_string_property(country_property);
+ }
+ ///
+ /// Get locale variant
+ ///
+ std::string variant() const
+ {
+ return get_string_property(variant_property);
+ }
+ ///
+ /// Get encoding
+ ///
+ std::string encoding() const
+ {
+ return get_string_property(encoding_property);
+ }
+
+ ///
+ /// Get the name of the locale, like en_US.UTF-8
+ ///
+ std::string name() const
+ {
+ return get_string_property(name_property);
+ }
+
+ ///
+ /// True if the underlying encoding is UTF-8 (for char streams and strings)
+ ///
+ bool utf8() const
+ {
+ return get_integer_property(utf8_property) != 0;
+ }
+
+#if defined (__SUNPRO_CC) && defined (_RWSTD_VER)
+ std::locale::id& __get_id (void) const { return id; }
+#endif
+ protected:
+ ///
+ /// Get string property by its id \a v
+ ///
+ virtual std::string get_string_property(string_propery v) const = 0;
+ ///
+ /// Get integer property by its id \a v
+ ///
+ virtual int get_integer_property(integer_property v) const = 0;
+ };
+
+ }
+}
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif
+
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4

Added: trunk/boost/locale/localization_backend.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/locale/localization_backend.hpp 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,159 @@
+//
+// 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_LOCALIZATION_BACKEND_HPP
+#define BOOST_LOCALE_LOCALIZATION_BACKEND_HPP
+#include <boost/locale/config.hpp>
+#include <boost/locale/generator.hpp>
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4275 4251 4231 4660)
+#endif
+#include <string>
+#include <locale>
+#include <vector>
+#include <memory>
+
+namespace boost {
+ namespace locale {
+
+ ///
+ /// \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.
+ ///
+ /// Backends may support different tuning options, but these are the default options available to the user
+ /// for all of them
+ ///
+ /// -# \c locale - the name of the locale in POSIX format like en_US.UTF-8
+ /// -# \c use_ansi_encoding - select system locale using ANSI codepages rather then UTF-8 under Windows
+ /// 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()
+ {
+ }
+
+ ///
+ /// Make a polymorphic copy of the backend
+ ///
+ virtual localization_backend *clone() const = 0;
+
+ ///
+ /// Set option for backend, for example "locale" or "encoding"
+ ///
+ virtual void set_option(std::string const &name,std::string const &value) = 0;
+
+ ///
+ /// Clear all options
+ ///
+ virtual void clear_options() = 0;
+
+ ///
+ /// 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
+
+
+ ///
+ /// \brief Localization backend manager is a class that holds various backend and allows creation
+ /// of their combination or selection
+ ///
+
+ class BOOST_LOCALE_DECL localization_backend_manager {
+ public:
+ ///
+ /// New empty localization_backend_manager
+ ///
+ localization_backend_manager();
+ ///
+ /// Copy localization_backend_manager
+ ///
+ localization_backend_manager(localization_backend_manager const &);
+ ///
+ /// Assign localization_backend_manager
+ ///
+ localization_backend_manager const &operator=(localization_backend_manager const &);
+
+ ///
+ /// Destructor
+ ///
+ ~localization_backend_manager();
+
+ ///
+ /// Create new localization backend according to current settings.
+ ///
+ std::auto_ptr<localization_backend> get() const;
+
+ ///
+ /// Add new backend to the manager, each backend should be uniquely defined by its name.
+ ///
+ /// This library provides: "icu", "posix", "winapi" and "std" backends.
+ ///
+ void add_backend(std::string const &name,std::auto_ptr<localization_backend> backend);
+
+ ///
+ /// Clear backend
+ ///
+ void remove_all_backends();
+
+ ///
+ /// Get list of all available backends
+ ///
+ std::vector<std::string> 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;
+ std::auto_ptr<impl> pimpl_;
+ };
+
+ } // locale
+} // boost
+
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
+

Added: trunk/boost/locale/message.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/locale/message.hpp 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,807 @@
+//
+// 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_MESSAGE_HPP_INCLUDED
+#define BOOST_LOCALE_MESSAGE_HPP_INCLUDED
+
+#include <boost/locale/config.hpp>
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4275 4251 4231 4660)
+#endif
+#include <locale>
+#include <string>
+#include <vector>
+#include <set>
+#include <memory>
+#include <boost/locale/formatting.hpp>
+
+
+namespace boost {
+ namespace locale {
+ ///
+ /// \defgroup message Message Formatting (translation)
+ ///
+ ///This module provides message translation functionality, i.e. allow your application to speak native language
+ ///
+ /// @{
+ ///
+
+ /// \cond INTERNAL
+
+ template<typename CharType>
+ struct base_message_format: public std::locale::facet
+ {
+ };
+
+ /// \endcond
+
+ ///
+ /// \brief This facet provides message formatting abilities
+ ///
+ template<typename CharType>
+ class message_format : public base_message_format<CharType>
+ {
+ public:
+
+ ///
+ /// Character type
+ ///
+ typedef CharType char_type;
+ ///
+ /// String type
+ ///
+ typedef std::basic_string<CharType> string_type;
+
+ ///
+ /// Default constructor
+ ///
+ message_format(size_t refs = 0) :
+ base_message_format<CharType>(refs)
+ {
+ }
+
+ ///
+ /// This function returns a pointer to the string for a message defined by a \a context
+ /// and identification string \a id. Both create a single key for message lookup in
+ /// a domain defined by \a domain_id.
+ ///
+ /// 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.
+ ///
+ /// If \a 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 \a domain_id. \a 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
+ ///
+ ///
+ virtual char_type const *get(int domain_id,char_type const *context,char_type const *single_id,int n) const = 0;
+
+ ///
+ /// Convert a string that defines \a domain to the integer id used by \a get functions
+ ///
+ virtual int domain(std::string const &domain) const = 0;
+
+ ///
+ /// Convert the string \a msg to target locale's encoding. If \a msg is already
+ /// in target encoding it would be returned otherwise the converted
+ /// string is stored in temporary \a 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
+ ///
+ virtual char_type const *convert(char_type const *msg,string_type &buffer) const = 0;
+
+#if defined (__SUNPRO_CC) && defined (_RWSTD_VER)
+ std::locale::id& __get_id (void) const { return id; }
+#endif
+ 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<c && c<0x7F;
+ }
+ inline bool is_us_ascii_string(char const *msg)
+ {
+ while(*msg) {
+ if(!is_us_ascii_char(*msg++))
+ return false;
+ }
+ return true;
+ }
+
+ template<typename CharType>
+ struct string_cast_traits {
+ static CharType const *cast(CharType const *msg,std::basic_string<CharType> &/*unused*/)
+ {
+ return msg;
+ }
+ };
+
+ template<>
+ struct string_cast_traits<char> {
+ static char const *cast(char const *msg,std::string &buffer)
+ {
+ if(is_us_ascii_string(msg))
+ return msg;
+ buffer.reserve(strlen(msg));
+ char c;
+ while((c=*msg++)!=0) {
+ if(is_us_ascii_char(c))
+ buffer+=c;
+ }
+ return buffer.c_str();
+ }
+ };
+ } // details
+
+ /// \endcond
+
+ ///
+ /// \brief 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.
+ ///
+ template<typename CharType>
+ class basic_message {
+ public:
+
+ 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_type> facet_type; ///< The type of the facet the messages are fetched with
+
+ ///
+ /// Create default empty message
+ ///
+ basic_message() :
+ n_(0),
+ c_id_(0),
+ c_context_(0),
+ c_plural_(0)
+ {
+ }
+
+ ///
+ /// 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),
+ c_context_(0),
+ c_plural_(0)
+ {
+ }
+
+ ///
+ /// 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.
+ ///
+ /// \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),
+ c_context_(0),
+ c_plural_(plural)
+ {
+ }
+
+ ///
+ /// 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),
+ c_context_(context),
+ c_plural_(0)
+ {
+ }
+
+ ///
+ /// 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.
+ ///
+ /// \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),
+ c_context_(context),
+ c_plural_(plural)
+ {
+ }
+
+
+ ///
+ /// Create a simple message from a string.
+ ///
+ explicit basic_message(string_type const &id) :
+ n_(0),
+ c_id_(0),
+ c_context_(0),
+ c_plural_(0),
+ id_(id)
+ {
+ }
+
+ ///
+ /// 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),
+ c_context_(0),
+ c_plural_(0),
+ id_(single),
+ plural_(plural)
+ {
+ }
+
+ ///
+ /// Create a simple message from a string with context.
+ ///
+ explicit basic_message(string_type const &context,string_type const &id) :
+ n_(0),
+ c_id_(0),
+ c_context_(0),
+ c_plural_(0),
+ id_(id),
+ context_(context)
+ {
+ }
+
+ ///
+ /// 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),
+ c_context_(0),
+ c_plural_(0),
+ id_(single),
+ context_(context),
+ plural_(plural)
+ {
+ }
+
+ ///
+ /// Copy an object
+ ///
+ basic_message(basic_message const &other) :
+ n_(other.n_),
+ c_id_(other.c_id_),
+ c_context_(other.c_context_),
+ c_plural_(other.c_plural_),
+ id_(other.id_),
+ context_(other.context_),
+ plural_(other.plural_)
+ {
+ }
+
+ ///
+ /// Assign other message object to this one
+ ///
+ basic_message const &operator=(basic_message const &other)
+ {
+ if(this==&other) {
+ return *this;
+ }
+ basic_message tmp(other);
+ swap(tmp);
+ return *this;
+ }
+
+ ///
+ /// Swap two message objects
+ ///
+ void swap(basic_message &other)
+ {
+ std::swap(n_,other.n_);
+ std::swap(c_id_,other.c_id_);
+ std::swap(c_context_,other.c_context_);
+ std::swap(c_plural_,other.c_plural_);
+
+ id_.swap(other.id_);
+ context_.swap(other.context_);
+ plural_.swap(other.plural_);
+ }
+
+ ///
+ /// Message class can be explicitly converted to string class
+ ///
+
+ operator string_type () const
+ {
+ return str();
+ }
+
+ ///
+ /// Translate message to a string in the default global locale, using default domain
+ ///
+ string_type str() const
+ {
+ std::locale loc;
+ return str(loc,0);
+ }
+
+ ///
+ /// Translate message to a string in the locale \a locale, using default domain
+ ///
+ string_type str(std::locale const &locale) const
+ {
+ 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;
+ if(std::has_facet<facet_type>(locale))
+ id=std::use_facet<facet_type>(locale).domain(domain_id);
+ return str(locale,id);
+ }
+
+ ///
+ /// 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;
+ std::locale loc;
+ if(std::has_facet<facet_type>(loc))
+ id=std::use_facet<facet_type>(loc).domain(domain_id);
+ 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;
+ char_type const *ptr = write(loc,id,buffer);
+ if(ptr == buffer.c_str())
+ return buffer;
+ else
+ buffer = ptr;
+ return buffer;
+ }
+
+
+ ///
+ /// Translate message and write to stream \a out, using imbued locale and domain set to the
+ /// stream
+ ///
+ void write(std::basic_ostream<char_type> &out) const
+ {
+ std::locale const &loc = out.getloc();
+ int id = ios_info::get(out).domain_id();
+ string_type buffer;
+ out << write(loc,id,buffer);
+ }
+
+ private:
+ char_type const *plural() const
+ {
+ if(c_plural_)
+ return c_plural_;
+ if(plural_.empty())
+ return 0;
+ return plural_.c_str();
+ }
+ char_type const *context() const
+ {
+ if(c_context_)
+ return c_context_;
+ if(context_.empty())
+ return 0;
+ return context_.c_str();
+ }
+
+ char_type const *id() const
+ {
+ 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;
+ static const char_type empty_string[1] = {0};
+
+ 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<facet_type>(loc))
+ facet = &std::use_facet<facet_type>(loc);
+
+ if(facet) {
+ if(!plural) {
+ translated = facet->get(domain_id,context,id);
+ }
+ else {
+ translated = facet->get(domain_id,context,id,n_);
+ }
+ }
+
+ if(!translated) {
+ char_type const *msg = plural ? ( n_ == 1 ? id : plural) : id;
+
+ if(facet) {
+ translated = facet->convert(msg,buffer);
+ }
+ else {
+ translated = details::string_cast_traits<char_type>::cast(msg,buffer);
+ }
+ }
+ return translated;
+ }
+
+ /// members
+
+ int n_;
+ char_type const *c_id_;
+ char_type const *c_context_;
+ char_type const *c_plural_;
+ string_type id_;
+ string_type context_;
+ string_type plural_;
+ };
+
+
+ ///
+ /// Convenience typedef for char
+ ///
+ typedef basic_message<char> message;
+ ///
+ /// Convenience typedef for wchar_t
+ ///
+ typedef basic_message<wchar_t> wmessage;
+ #ifdef BOOST_HAS_CHAR16_T
+ ///
+ /// Convenience typedef for char16_t
+ ///
+ typedef basic_message<char16_t> u16message;
+ #endif
+ #ifdef BOOST_HAS_CHAR32_T
+ ///
+ /// Convenience typedef for char32_t
+ ///
+ typedef basic_message<char32_t> u32message;
+ #endif
+
+ ///
+ /// Translate message \a msg and write it to stream
+ ///
+ template<typename CharType>
+ std::basic_ostream<CharType> &operator<<(std::basic_ostream<CharType> &out,basic_message<CharType> const &msg)
+ {
+ msg.write(out);
+ return out;
+ }
+
+ ///
+ /// \anchor boost_locale_translate_family \name Indirect message translation function family
+ /// @{
+
+ ///
+ /// \brief Translate a message, \a msg is not copied
+ ///
+ template<typename CharType>
+ inline basic_message<CharType> translate(CharType const *msg)
+ {
+ return basic_message<CharType>(msg);
+ }
+ ///
+ /// \brief Translate a message in context, \a msg and \a context are not copied
+ ///
+ template<typename CharType>
+ inline basic_message<CharType> translate( CharType const *context,
+ CharType const *msg)
+ {
+ return basic_message<CharType>(context,msg);
+ }
+ ///
+ /// \brief Translate a plural message form, \a single and \a plural are not copied
+ ///
+ template<typename CharType>
+ inline basic_message<CharType> translate( CharType const *single,
+ CharType const *plural,
+ int n)
+ {
+ return basic_message<CharType>(single,plural,n);
+ }
+ ///
+ /// \brief Translate a plural message from in constext, \a context, \a single and \a plural are not copied
+ ///
+ template<typename CharType>
+ inline basic_message<CharType> translate( CharType const *context,
+ CharType const *single,
+ CharType const *plural,
+ int n)
+ {
+ return basic_message<CharType>(context,single,plural,n);
+ }
+
+ ///
+ /// \brief Translate a message, \a msg is copied
+ ///
+ template<typename CharType>
+ inline basic_message<CharType> translate(std::basic_string<CharType> const &msg)
+ {
+ return basic_message<CharType>(msg);
+ }
+
+ ///
+ /// \brief Translate a message in context,\a context and \a msg is copied
+ ///
+ template<typename CharType>
+ inline basic_message<CharType> translate( std::basic_string<CharType> const &context,
+ std::basic_string<CharType> const &msg)
+ {
+ return basic_message<CharType>(context,msg);
+ }
+ ///
+ /// \brief Translate a plural message form in constext, \a context, \a single and \a plural are copied
+ ///
+ template<typename CharType>
+ inline basic_message<CharType> translate( std::basic_string<CharType> const &context,
+ std::basic_string<CharType> const &single,
+ std::basic_string<CharType> const &plural,
+ int n)
+ {
+ return basic_message<CharType>(context,single,plural,n);
+ }
+
+ ///
+ /// \brief Translate a plural message form, \a single and \a plural are copied
+ ///
+
+ template<typename CharType>
+ inline basic_message<CharType> translate( std::basic_string<CharType> const &single,
+ std::basic_string<CharType> const &plural,
+ int n)
+ {
+ return basic_message<CharType>(single,plural,n);
+ }
+
+ /// @}
+
+ ///
+ /// \anchor boost_locale_gettext_family \name Direct message translation functions family
+ ///
+
+ ///
+ /// Translate message \a id according to locale \a loc
+ ///
+ template<typename CharType>
+ std::basic_string<CharType> gettext(CharType const *id,
+ std::locale const &loc=std::locale())
+ {
+ return basic_message<CharType>(id).str(loc);
+ }
+ ///
+ /// Translate plural form according to locale \a loc
+ ///
+ template<typename CharType>
+ std::basic_string<CharType> ngettext( CharType const *s,
+ CharType const *p,
+ int n,
+ std::locale const &loc=std::locale())
+ {
+ return basic_message<CharType>(s,p,n).str(loc);
+ }
+ ///
+ /// Translate message \a id according to locale \a loc in domain \a domain
+ ///
+ template<typename CharType>
+ std::basic_string<CharType> dgettext( char const *domain,
+ CharType const *id,
+ std::locale const &loc=std::locale())
+ {
+ return basic_message<CharType>(id).str(loc,domain);
+ }
+
+ ///
+ /// Translate plural form according to locale \a loc in domain \a domain
+ ///
+ template<typename CharType>
+ std::basic_string<CharType> dngettext( char const *domain,
+ CharType const *s,
+ CharType const *p,
+ int n,
+ std::locale const &loc=std::locale())
+ {
+ return basic_message<CharType>(s,p,n).str(loc,domain);
+ }
+ ///
+ /// Translate message \a id according to locale \a loc in context \a context
+ ///
+ template<typename CharType>
+ std::basic_string<CharType> pgettext( CharType const *context,
+ CharType const *id,
+ std::locale const &loc=std::locale())
+ {
+ return basic_message<CharType>(context,id).str(loc);
+ }
+ ///
+ /// Translate plural form according to locale \a loc in context \a context
+ ///
+ template<typename CharType>
+ std::basic_string<CharType> npgettext( CharType const *context,
+ CharType const *s,
+ CharType const *p,
+ int n,
+ std::locale const &loc=std::locale())
+ {
+ return basic_message<CharType>(context,s,p,n).str(loc);
+ }
+ ///
+ /// Translate message \a id according to locale \a loc in domain \a domain in context \a context
+ ///
+ template<typename CharType>
+ std::basic_string<CharType> dpgettext( char const *domain,
+ CharType const *context,
+ CharType const *id,
+ std::locale const &loc=std::locale())
+ {
+ return basic_message<CharType>(context,id).str(loc,domain);
+ }
+ ///
+ /// Translate plural form according to locale \a loc in domain \a domain in context \a context
+ ///
+ template<typename CharType>
+ std::basic_string<CharType> dnpgettext(char const *domain,
+ CharType const *context,
+ CharType const *s,
+ CharType const *p,
+ int n,
+ std::locale const &loc=std::locale())
+ {
+ return basic_message<CharType>(context,s,p,n).str(loc,domain);
+ }
+
+ ///
+ /// \cond INTERNAL
+ ///
+
+ template<>
+ struct BOOST_LOCALE_DECL base_message_format<char> : 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<wchar_t> : public std::locale::facet
+ {
+ base_message_format(size_t refs = 0) : std::locale::facet(refs)
+ {
+ }
+ static std::locale::id id;
+ };
+
+ #ifdef BOOST_HAS_CHAR16_T
+
+ template<>
+ struct BOOST_LOCALE_DECL base_message_format<char16_t> : public std::locale::facet
+ {
+ base_message_format(size_t refs = 0) : std::locale::facet(refs)
+ {
+ }
+ static std::locale::id id;
+ };
+
+ #endif
+
+ #ifdef BOOST_HAS_CHAR32_T
+
+ template<>
+ struct BOOST_LOCALE_DECL base_message_format<char32_t> : public std::locale::facet
+ {
+ base_message_format(size_t refs = 0) : std::locale::facet(refs)
+ {
+ }
+ static std::locale::id id;
+ };
+
+ #endif
+
+ /// \endcond
+
+ ///
+ /// @}
+ ///
+
+ namespace as {
+ /// \cond INTERNAL
+ namespace details {
+ struct set_domain {
+ std::string domain_id;
+ };
+ template<typename CharType>
+ std::basic_ostream<CharType> &operator<<(std::basic_ostream<CharType> &out, set_domain const &dom)
+ {
+ int id = std::use_facet<message_format<CharType> >(out.getloc()).domain(dom.domain_id);
+ ios_info::get(out).domain_id(id);
+ return out;
+ }
+ } // details
+ /// \endcond
+
+ ///
+ /// \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
+ #ifdef BOOST_LOCALE_DOXYGEN
+ unspecified_type
+ #else
+ details::set_domain
+ #endif
+ domain(std::string const &id)
+ {
+ details::set_domain tmp = { id };
+ return tmp;
+ }
+ /// @}
+ } // as
+ } // locale
+} // boost
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+
+#endif
+
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
+

Added: trunk/boost/locale/time_zone.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/locale/time_zone.hpp 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,54 @@
+//
+// 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_TIME_ZONE_HPP_INCLUDED
+#define BOOST_LOCALE_TIME_ZONE_HPP_INCLUDED
+
+#include <boost/locale/config.hpp>
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4275 4251 4231 4660)
+#endif
+
+#include <string>
+
+
+namespace boost {
+ namespace locale {
+ ///
+ /// \addtogroup date_time
+ ///
+ /// @{
+
+ ///
+ /// \brief namespace that holds functions for operating with global
+ /// time zone
+ ///
+ namespace time_zone {
+ ///
+ /// Get global time zone identifier. If empty, system time zone is used
+ ///
+ BOOST_LOCALE_DECL std::string global();
+ ///
+ /// Set global time zone identifier returning previous one. If empty, system time zone is used
+ ///
+ BOOST_LOCALE_DECL std::string global(std::string const &new_tz);
+ }
+
+ /// @}
+
+ } // locale
+} // boost
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+
+#endif
+
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4

Added: trunk/boost/locale/util.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/locale/util.hpp 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,208 @@
+//
+// 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_UTIL_HPP
+#define BOOST_LOCALE_UTIL_HPP
+#include <locale>
+#include <typeinfo>
+#include <boost/cstdint.hpp>
+#include <boost/locale/generator.hpp>
+#include <boost/assert.hpp>
+
+#include <vector>
+namespace boost {
+namespace locale {
+///
+/// \brief This namespace provides various utility function useful for Boost.Locale backends
+/// 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.
+ /// If \a use_utf8_on_windows is true it sets the encoding to UTF-8, otherwise, if system
+ /// locale supports ANSI code-page it defines the ANSI encoding like windows-1252, otherwise it fall-backs
+ /// to UTF-8 encoding if ANSI code-page is not available.
+ ///
+ BOOST_LOCALE_DECL
+ std::string get_system_locale(bool use_utf8_on_windows = false);
+
+ ///
+ /// \brief Installs information facet to locale in based on locale name \a name
+ ///
+ /// This function installs boost::locale::info facet into the locale \a in and returns
+ /// newly created locale.
+ ///
+ /// Note: all information is based only on parsing of string \a name;
+ ///
+ /// The name has following format: language[_COUNTRY][.encoding][\@variant]
+ /// Where language is ISO-639 language code like "en" or "ru", COUNTRY is ISO-3166
+ /// country identifier like "US" or "RU". the Encoding is a charracter set name
+ /// like UTF-8 or ISO-8859-1. Variant is backend specific variant like \c euro or
+ /// calendar=hebrew.
+ ///
+ /// If some parameters are missing they are specified as blanks, default encoding
+ /// 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);
+
+
+ ///
+ /// \brief 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.
+ ///
+ class base_converter {
+ public:
+
+ ///
+ /// 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
+ ///
+ static const uint32_t illegal=0xFFFFFFFF;
+
+ ///
+ /// 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=0xFFFFFFFE;
+
+ 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
+ {
+ return 1;
+ }
+ ///
+ /// 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 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
+ {
+ BOOST_ASSERT(typeid(*this)==typeid(base_converter));
+ return new base_converter();
+ }
+
+ ///
+ /// Convert a single character starting at begin and ending at most at end to Unicode code-point.
+ ///
+ /// if valid input sequence found in [\a begin,\a code_point_end) such as \a begin < \a code_point_end && \a code_point_end <= \a end
+ /// it is converted to its Unicode code point equivalent, \a begin is set to \a code_point_end
+ ///
+ /// if incomplete input sequence found in [\a begin,\a end), i.e. there my be such \a code_point_end that \a code_point_end > \a end
+ /// and [\a begin, \a code_point_end) would be valid input sequence, then \a incomplete is returned begin stays unchanged, for example
+ /// for UTF-8 conversion a *begin = 0xc2, \a begin +1 = \a end is such situation.
+ ///
+ /// if invalid input sequence found, i.e. there 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)
+ {
+ if(begin == end)
+ return incomplete;
+ unsigned char cp = *begin;
+ if(cp <= 0x7F) {
+ begin++;
+ return cp;
+ }
+ return illegal;
+ }
+ ///
+ /// Convert a single code-point \a 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,
+ /// \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)
+ {
+ if(begin==end)
+ return incomplete;
+ if(u >= 0x80)
+ return illegal;
+ *begin = static_cast<char>(u);
+ return 1;
+ }
+ };
+
+ ///
+ /// This function creates a \a base_converter that can be used for conversion between UTF-8 and
+ /// unicode code points
+ ///
+ BOOST_LOCALE_DECL std::auto_ptr<base_converter> create_utf8_converter();
+ ///
+ /// 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<base_converter>::get() != 0
+ ///
+ BOOST_LOCALE_DECL std::auto_ptr<base_converter> create_simple_converter(std::string const &encoding);
+
+
+ ///
+ /// Install codecvt facet into locale \a in and return new locale that is based on \a in and uses new
+ /// facet.
+ ///
+ /// 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
+ ///
+ BOOST_LOCALE_DECL
+ std::locale create_codecvt(std::locale const &in,std::auto_ptr<base_converter> cvt,character_facet_type type);
+
+} // util
+} // locale
+} // boost
+
+#endif
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4

Added: trunk/libs/locale/build/Jamfile.v2
==============================================================================
--- (empty file)
+++ trunk/libs/locale/build/Jamfile.v2 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,287 @@
+# 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
+# http://www.boost.org/LICENSE_1_0.txt.
+
+
+
+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 ;
+feature.feature boost.locale.icu : on off : optional propagated ;
+feature.feature boost.locale.posix : on off : optional propagated ;
+feature.feature boost.locale.std : on off : optional propagated ;
+feature.feature boost.locale.winapi : on off : optional propagated ;
+
+# Configuration of libraries
+
+## iconv
+
+obj has_iconv_libc_obj : ../build/has_iconv.cpp ;
+exe has_iconv : has_iconv_libc_obj ;
+explicit has_iconv ;
+
+ICONV_PATH = [ modules.peek : ICONV_PATH ] ;
+lib iconv
+ :
+ : <search>$(ICONV_PATH)/lib <link>shared <runtime-link>shared
+ :
+ : <include>$(ICONV_PATH)/include
+ ;
+explicit iconv ;
+
+obj has_iconv_libc_ext : ../build/has_iconv.cpp iconv ;
+exe has_external_iconv : has_iconv_libc_ext iconv ;
+explicit has_external_iconv ;
+
+
+ICU_PATH = [ modules.peek : ICU_PATH ] ;
+ICU_LINK = [ modules.peek : ICU_LINK ] ;
+if $(ICU_LINK)
+{
+ ICU_OPTS = <include>$(ICU_PATH)/include <linkflags>$(ICU_LINK) <dll-path>$(ICU_PATH)/bin <runtime-link>shared ;
+}
+else
+{
+ searched-lib icuuc : : <search>$(ICU_PATH)/lib <link>shared <runtime-link>shared ;
+ searched-lib icuuc : : <toolset>msvc <variant>debug <name>icuucd <search>$(ICU_PATH)/lib <link>shared <runtime-link>shared ;
+ searched-lib icuuc : : <name>this_is_an_invalid_library_name ;
+ searched-lib icudt : : <search>$(ICU_PATH)/lib <name>icudata <link>shared <runtime-link>shared ;
+ searched-lib icudt : : <search>$(ICU_PATH)/lib <name>icudt <toolset>msvc <link>shared <runtime-link>shared ;
+ searched-lib icudt : : <name>this_is_an_invalid_library_name ;
+ searched-lib icuin : : <search>$(ICU_PATH)/lib <name>icui18n <link>shared <runtime-link>shared ;
+ searched-lib icuin : : <toolset>msvc <variant>debug <name>icuind <search>$(ICU_PATH)/lib <link>shared <runtime-link>shared ;
+ searched-lib icuin : : <toolset>msvc <variant>release <name>icuin <search>$(ICU_PATH)/lib <link>shared <runtime-link>shared ;
+ searched-lib icuin : : <name>this_is_an_invalid_library_name ;
+ explicit icuuc icudt icuin ;
+
+ ICU_OPTS = <include>$(ICU_PATH)/include
+ <library>icuuc/<link>shared/<runtime-link>shared
+ <library>icudt/<link>shared/<runtime-link>shared
+ <library>icuin/<link>shared/<runtime-link>shared
+ <dll-path>$(ICU_PATH)/bin
+ <runtime-link>shared ;
+}
+exe has_icu : ../build/has_icu_test.cpp : $(ICU_OPTS) ;
+explicit has_icu ;
+
+
+# This function is called whenever the 'boost_locale' metatarget
+# below is generated and figures what external components we have,
+# what user wants, and what sources have to be compiled in the end.
+rule configure-full ( properties * : flags-only )
+{
+
+ local result ;
+ local flags-result ;
+
+ local found-iconv ;
+
+ if <boost.locale.iconv>on in $(properties)
+ || ! <boost.locale.iconv> in $(properties:G)
+ && ! <target-os>solaris in $(properties)
+ {
+ # See if iconv is bundled with standard library.
+ if [ configure.builds has_iconv : $(properties) : "iconv (libc)" ]
+ {
+ found-iconv = true ;
+ }
+ else
+ {
+ if [ configure.builds has_external_iconv : $(properties) : "iconv (separate)" ]
+ {
+ found-iconv = true ;
+ result += <library>iconv ;
+ }
+ }
+ }
+ if $(found-iconv)
+ {
+ flags-result += <define>BOOST_LOCALE_WITH_ICONV=1 ;
+ }
+
+ local found-icu ;
+ if ! <boost.locale.icu>off in $(properties)
+ {
+ if [ configure.builds has_icu : $(properties) : "icu" ]
+ {
+ found-icu = true ;
+ flags-result += <define>BOOST_LOCALE_WITH_ICU=1 $(ICU_OPTS) ;
+
+ for s in boundary codecvt collator conversion date_time formatter
+ icu_backend numeric time_zone
+ {
+ result += <source>icu/$(s).cpp ;
+ }
+ result += <library>../../thread/build//boost_thread ;
+ }
+ }
+
+ if ! $(found-iconv) && ! $(found-icu) && ! <target-os>windows in $(properties) && ! <target-os>cygwin in $(properties)
+ {
+ ECHO "error: Boost.Locale needs either iconv or ICU library to be built." ;
+ EXIT ;
+ }
+
+ if ! <boost.locale.std> in $(properties:G)
+ {
+ if <toolset>sun in $(properties)
+ {
+ properties += <boost.locale.std>off ;
+ }
+ else
+ {
+ properties += <boost.locale.std>on ;
+ }
+ }
+
+ if <boost.locale.std>off in $(properties)
+ {
+ flags-result += <define>BOOST_LOCALE_NO_STD_BACKEND=1 ;
+ }
+ else
+ {
+ STD_SOURCES =
+ codecvt
+ collate
+ converter
+ numeric
+ std_backend
+ ;
+ result += <source>std/$(STD_SOURCES).cpp ;
+ }
+
+ if ! <boost.locale.winapi> in $(properties:G)
+ {
+ if <target-os>windows in $(properties)
+ || <target-os>cygwin in $(properties)
+ {
+ properties += <boost.locale.winapi>on ;
+ }
+ else
+ {
+ properties += <boost.locale.winapi>off ;
+ }
+ }
+
+ if <boost.locale.winapi>off in $(properties)
+ {
+ flags-result += <define>BOOST_LOCALE_NO_WINAPI_BACKEND=1 ;
+ }
+ else
+ {
+ WINAPI_SOURCES =
+ collate
+ converter
+ numeric
+ win_backend
+ ;
+ result += <source>win32/$(WINAPI_SOURCES).cpp ;
+ }
+
+ if ( ! <boost.locale.winapi>off in $(properties) || ! <boost.locale.std>off in $(properties) )
+ && ( <target-os>windows in $(properties) || <target-os>cygwin in $(properties) )
+ {
+ result += <source>win32/lcid.cpp ;
+ }
+
+ if ! <boost.locale.posix> in $(properties:G)
+ {
+ if <target-os>linux in $(properties) || <target-os>darwin in $(properties)
+ {
+ properties += <boost.locale.posix>on ;
+ }
+ else
+ {
+ properties += <boost.locale.posix>off ;
+ }
+ }
+
+ if <boost.locale.posix>off in $(properties)
+ {
+ flags-result += <define>BOOST_LOCALE_NO_POSIX_BACKEND=1 ;
+ }
+ else
+ {
+ POSIX_SOURCES =
+ collate
+ converter
+ numeric
+ codecvt
+ posix_backend
+ ;
+ result += <source>posix/$(POSIX_SOURCES).cpp ;
+ }
+
+ if <boost.locale.posix>on in $(properties) || <boost.locale.std>on in $(properties) || <boost.locale.winapi>on in $(properties)
+ {
+ result += <source>util/gregorian.cpp ;
+ }
+ if "$(flags-only)" = "flags"
+ {
+ return $(flags-result) ;
+ }
+ else {
+ result += $(flags-result) ;
+ return $(result) ;
+ }
+}
+
+rule configure ( properties * )
+{
+ local result = [ configure-full $(properties) : "all" ] ;
+ return $(result) ;
+
+}
+
+rule configure-flags ( properties * )
+{
+ local result ;
+ result = [ configure-full $(properties) : "flags" ] ;
+ return $(result) ;
+
+}
+
+
+alias build_options : : : : <conditional>@configure ;
+alias build_flags : : : : <conditional>@configure-flags ;
+
+lib boost_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
+ :
+ # Don't link explicitly, not required
+ <define>BOOST_THREAD_NO_LIB=1
+ <link>shared:<define>BOOST_LOCALE_DYN_LINK=1
+ <threading>multi
+ # Meanwhile remove this
+ <conditional>@configure
+ ;
+
+boost-install boost_locale ;
+
+
+# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
+

Added: trunk/libs/locale/build/has_iconv.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/locale/build/has_iconv.cpp 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,7 @@
+#include <iconv.h>
+
+int main()
+{
+ iconv_t d = iconv_open(0,0);
+ (void)(d);
+}

Added: trunk/libs/locale/build/has_icu_test.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/locale/build/has_icu_test.cpp 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,29 @@
+/*
+ *
+ * Copyright (c) 2010
+ * John Maddock
+ *
+ * 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)
+ *
+ */
+
+#include <unicode/uversion.h>
+#include <unicode/locid.h>
+#include <unicode/utypes.h>
+#include <unicode/uchar.h>
+#include <unicode/coll.h>
+
+#if defined(_MSC_VER) && !defined(_DLL)
+#error "Mixing ICU with a static runtime doesn't work"
+#endif
+
+int main()
+{
+ icu::Locale loc;
+ UErrorCode err = U_ZERO_ERROR;
+ UChar32 c = ::u_charFromName(U_UNICODE_CHAR_NAME, "GREEK SMALL LETTER ALPHA", &err);
+ return err;
+}
+

Added: trunk/libs/locale/doc/Doxyfile
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/Doxyfile 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,1635 @@
+# Doxyfile 1.7.1
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME = Boost.Locale
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY = .
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
+OUTPUT_LANGUAGE = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH = ../../..
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH = ../../..
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like regular Qt-style comments
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE = 8
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for
+# Java. For instance, namespaces will be presented as packages, qualified
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources only. Doxygen will then generate output that is more tailored for
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given extension.
+# Doxygen has a built-in mapping, but you can override or extend it using this
+# tag. The format is ext=language, where ext is a file extension, and language
+# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
+# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
+# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
+# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING =
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+# Doxygen will parse them like normal C++ but will assume all classes use public
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter
+# and setter methods for a property. Setting this option to YES (the default)
+# will make doxygen to replace the get and set methods by a property in the
+# documentation. This will only work if the methods are indeed getting or
+# setting a simple type. If this is not the case, or you want to show the
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING = YES
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
+# is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
+# determine which symbols to keep in memory and which to flush to disk.
+# When the cache is full, less often used symbols will be written to disk.
+# For small to medium size projects (<1000 input files) the default value is
+# probably good enough. For larger projects a too small cache size can cause
+# doxygen to be busy swapping symbols to and from disk most of the time
+# causing a significant performance penality.
+# If the system has enough physical memory increasing the cache will improve the
+# performance by keeping more symbols in memory. Note that the value works on
+# a logarithmic scale so increasing the size by one will rougly double the
+# memory usage. The cache size is given by this formula:
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base
+# name of the file that contains the anonymous namespace. By default
+# anonymous namespace are hidden.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
+# will list include files with double quotes in the documentation
+# rather than with sharp brackets.
+
+FORCE_LOCAL_INCLUDES = NO
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
+# will sort the (brief and detailed) documentation of class members so that
+# constructors and destructors are listed first. If set to NO (the default)
+# the constructors will appear in the respective orders defined by
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
+# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
+# hierarchy of group names into alphabetical order. If set to NO (the default)
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES = YES
+
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES = NO
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
+# This will remove the Files entry from the Quick Index and from the
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
+# Namespaces page.
+# This will remove the Namespaces entry from the Quick Index
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command <command> <input-file>, where <command> is the value of
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. The create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option.
+# You can optionally specify a file name after the option, if omitted
+# DoxygenLayout.xml will be used as the name of the layout file.
+
+LAYOUT_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
+# documentation.
+
+WARN_NO_PARAMDOC = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT = ../../../boost/locale/ \
+ ../../../boost/locale/boundary \
+ .
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+# also the default input encoding. Doxygen uses libiconv (or the iconv built
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
+# the list of possible encodings.
+
+INPUT_ENCODING = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+
+FILE_PATTERNS = *.hpp *.txt
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE =
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix filesystem feature) are excluded
+# from the input.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH = ../examples
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output.
+# If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis.
+# Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match.
+# The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+# is applied to all files.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code.
+# Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
+# will need version 4.8.6 or higher.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER = header.html
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER = footer.html
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
+# Doxygen will adjust the colors in the stylesheet and background images
+# according to this color. Hue is specified as an angle on a colorwheel,
+# see http://en.wikipedia.org/wiki/Hue for more information.
+# For instance the value 0 represents red, 60 is yellow, 120 is green,
+# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
+# The allowed range is 0 to 359.
+
+HTML_COLORSTYLE_HUE = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
+# the colors in the HTML output. For a value of 0 the output will use
+# grayscales only. A value of 255 will produce the most vivid colors.
+
+HTML_COLORSTYLE_SAT = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
+# the luminance component of the colors in the HTML output. Values below
+# 100 gradually make the output lighter, whereas values above 100 make
+# the output darker. The value divided by 100 is the actual gamma applied,
+# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
+# and 100 does not change the gamma.
+
+HTML_COLORSTYLE_GAMMA = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting
+# this to NO can help when comparing the output of multiple runs.
+
+HTML_TIMESTAMP = NO
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded. For this to work a browser that supports
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS = NO
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files
+# will be generated that can be used as input for Apple's Xcode 3
+# integrated development environment, introduced with OSX 10.5 (Leopard).
+# To create a documentation set, doxygen will generate a Makefile in the
+# HTML output directory. Running make will produce the docset in that
+# directory and running "make install" will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
+# it at startup.
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+
+GENERATE_DOCSET = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
+# feed. A documentation feed provides an umbrella under which multiple
+# documentation sets from a single provider (such as a company or product suite)
+# can be grouped.
+
+DOCSET_FEEDNAME = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
+# should uniquely identify the documentation set bundle. This should be a
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID = org.doxygen.Project
+
+# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+
+# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
+
+DOCSET_PUBLISHER_NAME = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
+# content.
+
+CHM_INDEX_ENCODING =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
+# that can be used as input for Qt's qhelpgenerator to generate a
+# Qt Compressed Help (.qch) of the generated HTML documentation.
+
+GENERATE_QHP = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
+# be used to specify the file name of the resulting .qch file.
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
+# add. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME =
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
+# Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's
+# filter section matches.
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
+# Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS =
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
+# be used to specify the location of Qt's qhelpgenerator.
+# If non-empty doxygen will try to run qhelpgenerator on the generated
+# .qhp file.
+
+QHG_LOCATION =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
+# will be generated, which together with the HTML files, form an Eclipse help
+# plugin. To install this plugin and make it available under the help contents
+# menu in Eclipse, the contents of the directory containing the HTML and XML
+# files needs to be copied into the plugins directory of eclipse. The name of
+# the directory within the plugins directory should be the same as
+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
+# the help appears.
+
+GENERATE_ECLIPSEHELP = NO
+
+# A unique identifier for the eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have
+# this name.
+
+ECLIPSE_DOC_ID = org.doxygen.Project
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE = 4
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information.
+# If the tag value is set to YES, a side panel will be generated
+# containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
+# Windows users are probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW = YES
+
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH = 250
+
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
+# links to external symbols imported via tag files in a separate window.
+
+EXT_LINKS_IN_WINDOW = NO
+
+# Use this tag to change the font size of Latex formulas included
+# as images in the HTML documentation. The default is 10. Note that
+# when you change the font size after a successful doxygen run you need
+# to manually remove any form_*.png images from the HTML output directory
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are
+# not supported properly for IE 6.0, but are supported on all modern browsers.
+# Note that when changing this option you need to delete any form_*.png files
+# in the HTML output before the changes have effect.
+
+FORMULA_TRANSPARENT = YES
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box
+# for the HTML output. The underlying search engine uses javascript
+# and DHTML and should work on any modern browser. Note that when using
+# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
+# (GENERATE_DOCSET) there is already a search function so this one should
+# typically be disabled. For large projects the javascript based search engine
+# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+
+SEARCHENGINE = NO
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a PHP enabled web server instead of at the web client
+# using Javascript. Doxygen will generate the search PHP script and index
+# file to put on the web server. The advantage of the server
+# based approach is that it scales better to large projects and allows
+# full text search. The disadvances is that it is more difficult to setup
+# and does not have live searching capabilities.
+
+SERVER_BASED_SEARCH = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+# Note that when enabling USE_PDFLATEX this option is only used for
+# generating bitmaps for formulas in the HTML output, but not in the
+# Makefile that is written to the output directory.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES = NO
+
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include
+# source code with syntax highlighting in the LaTeX output.
+# Note that which sources are shown also depends on other settings
+# such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_SCHEMA =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_DTD =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader.
+# This is useful
+# if you want to understand what is going on.
+# On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION = YES
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF = YES
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
+PREDEFINED = BOOST_HAS_CHAR32_T \
+ BOOST_HAS_CHAR16_T \
+ BOOST_LOCALE_DECL= \
+ BOOST_LOCALE_DOXYGEN
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+#
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+#
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option is superseded by the HAVE_DOT option below. This is only a
+# fallback. It is recommended to install and use dot, since it yields more
+# powerful graphs.
+
+CLASS_DIAGRAMS = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH =
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT = NO
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
+# allowed to run in parallel. When set to 0 (the default) doxygen will
+# base this on the number of processors available in the system. You can set it
+# explicitly to a value larger than 0 to get control over the balance
+# between CPU load and processing speed.
+
+DOT_NUM_THREADS = 0
+
+# By default doxygen will write a font called FreeSans.ttf to the output
+# directory and reference it in all dot files that doxygen generates. This
+# font does not include all possible unicode characters however, so when you need
+# these (or just want a differently looking font) you can specify the font name
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
+# which can be done by putting it in a standard location or by setting the
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
+# containing the font.
+
+DOT_FONTNAME = FreeSans
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
+# The default size is 10pt.
+
+DOT_FONTSIZE = 10
+
+# By default doxygen will tell dot to use the output directory to look for the
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a
+# different font using DOT_FONTNAME you can set the path where dot
+# can find it using this tag.
+
+DOT_FONTPATH =
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+# doxygen will generate a call dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable call graphs
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH = NO
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
+# doxygen will generate a caller dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable caller
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the
+# number of direct children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not
+# seem to support this out of the box. Warning: Depending on the platform used,
+# enabling this option may lead to badly anti-aliased labels on the edges of
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT = YES
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP = YES

Added: trunk/libs/locale/doc/appendix.txt
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/appendix.txt 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,18 @@
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 filetype=cpp.doxygen
+/*!
+\page appendix Appendix
+
+\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 glossary
+- \subpage tested_compilers_and_paltforms
+- \subpage status_of_cpp0x_characters_support
+- \subpage special_thanks
+
+*/
+

Added: trunk/libs/locale/doc/boundary_analysys.txt
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/boundary_analysys.txt 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,495 @@
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 filetype=cpp.doxygen
+/*!
+\page boundary_analysys Boundary analysis
+
+- \ref boundary_analysys_basics
+- \ref boundary_analysys_segments
+ - \ref boundary_analysys_segments_basics
+ - \ref boundary_analysys_segments_rules
+ - \ref boundary_analysys_segments_search
+- \ref boundary_analysys_break
+ - \ref boundary_analysys_break_basics
+ - \ref boundary_analysys_break_rules
+ - \ref boundary_analysys_break_search
+
+
+\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.
+
+\note This task is not a trivial task.
+\par
+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.
+
+Boost.Locale provides 2 major classes for boundary analysis:
+
+- \ref boost::locale::boundary::segment_index - an object that holds an index of segments in the text (like words, characters,
+ sentences). It provides an access to \ref boost::locale::boundary::segment "segment" objects via iterators.
+- \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.
+Both of these classes accept in their constructor:
+
+- A flag that defines boundary analysis \ref boost::locale::boundary::boundary_type "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:
+\code
+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);
+\endcode
+
+Each of them provide a members \c begin(), \c end() and \c 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 \ref boost::locale::boundary::ssegment_index "ssegment_index"
+or \ref boost::locale::boundary::wcboundary_point_index "wcboundary_point_index" provided as well,
+where "w", "u16" and "u32" prefixes define a character type \c wchar_t,
+\c char16_t and \c char32_t and "c" and "s" prefixes define whether <tt>std::basic_string<CharType>::const_iterator</tt>
+or <tt>CharType const *</tt> are used.
+
+\section boundary_analysys_segments Iterating Over Segments
+\section boundary_analysys_segments_basics Basic Iteration
+
+The text segments analysis is done using \ref boost::locale::boundary::segment_index "segment_index" class.
+
+It provides a bidirectional iterator that returns \ref boost::locale::boundary::segment "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 \c std::basic_string object.
+
+To perform boundary analysis, we first create an index object and then iterate over it:
+
+For example:
+
+\code
+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"));
+// 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;
+\endcode
+
+Would print:
+
+\verbatim
+"To", " ", "be", " ", "or", " ", "not", " ", "to", " ", "be", ",", " ", "that", " ", "is", " ", "the", " ", "question", ".",
+\endverbatim
+
+This sentence "生きるか死ぬか、それが問題だ。" (from Tatoeba database)
+would be split into following segments in \c ja_JP.UTF-8 (Japanese) locale:
+
+\verbatim
+"生", "きるか", "死", "ぬか", "、", "それが", "問題", "だ", "。",
+\endverbatim
+
+The boundary analysis that is done by Boost.Locale
+is much more complicated then just splitting the text according
+to white space characters.
+
+Of course it may be not per
+
+\section boundary_analysys_segments_rules Using Rules
+
+The segments selection can be customized using \ref boost::locale::boundary::segment_index::rule(rule_type) "rule()" and
+\ref boost::locale::boundary::segment_index::full_select(bool) "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 \c rule() member function we can specify a binary mask of rules we want to use for selection of
+the boundary points using \ref bl_boundary_word_rules "word", \ref bl_boundary_line_rules "line"
+and \ref bl_boundary_sentence_rules "sentence" boundary rules.
+
+For example, by calling
+
+\code
+map.rule(word_any);
+\endcode
+
+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:
+
+\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
+map.rule(word_any);
+// 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;
+\endcode
+
+Would print:
+
+\verbatim
+"To", "be", "or", "not", "to", "be", "that", "is", "the", "question",
+\endverbatim
+
+And the for given text="生きるか死ぬか、それが問題だ。" and rule(\ref boost::locale::boundary::word_ideo "word_ideo"), the example above would print.
+
+\verbatim
+"生", "死", "問題",
+\endverbatim
+
+You can access specific rules the segments where selected it using \ref boost::locale::boundary::segment::rule() "segment::rule()" member
+function. Using a bit-mask of rules.
+
+For example:
+
+\code
+boost::locale::generator gen;
+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;
+}
+\endcode
+
+Would print
+
+\verbatim
+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
+\endverbatim
+
+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:
+
+\verbatim
+Hello! How
+are you?
+\endverbatim
+
+And we want to fetch all sentences from the text.
+
+The \ref bl_boundary_sentence_rules "sentence rules" have two options:
+
+- Split the text on the point where sentence terminator like ".!?" detected: \ref boost::locale::boundary::sentence_term "sentence_term"
+- Split the text on the point where sentence separator like "line feed" detected: \ref boost::locale::boundary::sentence_sep "sentence_sep"
+
+Naturally to ignore sentence separators we would call \ref boost::locale::boundary::segment_index::rule(rule_type v) "segment_index::rule(rule_type v)"
+with sentence_term parameter and then run the iterator.
+
+\code
+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"));
+map.rule(sentence_term);
+for(ssegment_index::iterator it=map.begin(),e=map.end();it!=e;++it)
+ std::cout << "Sentence [" << *it << "]" << std::endl;
+\endcode
+
+However we would get the expected segments:
+\verbatim
+Sentence [Hello! ]
+Sentence [are you?
+]
+\endverbatim
+
+The reason is that "How\n" is still considered a sentence but selected by different
+rule.
+
+This behavior can be changed by setting \ref boost::locale::boundary::segment_index::full_select(bool) "segment_index::full_select(bool)"
+to \c 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:
+
+\code
+map.full_select(true);
+\endcode
+
+Right after "map.rule(sentence_term);" and get expected output:
+
+\verbatim
+Sentence [Hello! ]
+Sentence [How
+are you?
+]
+\endverbatim
+
+\subsection boundary_analysys_segments_search 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.
+
+\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.
+
+
+For example:
+
+\code
+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;
+\endcode
+
+Would print:
+
+\verbatim
+be
+\endverbatim
+
+\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 \ref boost::locale::boundary::word "word" boundary analysis with \ref boost::locale::boundary::word_any "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.
+
+
+\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
+\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.
+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.
+
+\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:
+
+\code
+using namespace boost::locale::boundary;
+boost::locale::generator gen;
+
+// 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;
+}\endcode
+
+Would print:
+
+\verbatim
+First two sentences are: First sentence. Second sentence!
+\endverbatim
+
+\section boundary_analysys_break_rules Using Rules
+
+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.
+
+It allows to set \ref bl_boundary_word_rules "word", \ref bl_boundary_line_rules "line"
+and \ref bl_boundary_sentence_rules "sentence" rules for filtering boundary points.
+
+Lets change an example above a little:
+
+\code
+// our text sample
+std::string const text= "First sentence. Second\n"
+ "sentence! Third one?";
+\endcode
+
+If we run our program as is on the sample above we would get:
+\verbatim
+First two sentences are: First sentence. Second
+\endverbatim
+
+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"
+and the iterator would use only boundary points that are created
+by a sentence terminators like ".!?".
+
+So by adding:
+\code
+map.rule(sentence_term);
+\endcode
+
+Right after the generation of the index we would get the desired output:
+
+\verbatim
+First two sentences are: First sentence. Second
+sentence!
+\endverbatim
+
+You can also use \ref boost::locale::boundary::boundary_point::rule() "boundary_point::rule()" member
+function to learn about the reason this boundary point was created by comparing it with an appropriate
+mask.
+
+For example:
+
+\code
+using namespace boost::locale::boundary;
+boost::locale::generator gen;
+// 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";
+}
+\endcode
+
+Would give the following output:
+\verbatim
+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?|]
+\endverbatim
+
+\subsection boundary_analysys_break_search Locating Boundary Points
+
+Sometimes it is useful to find a specific boundary point according to given
+iterator.
+
+\ref boost::locale::boundary::boundary_point_index "boundary_point_index" provides
+a \ref boost::locale::boundary::boundary_point_index::find() "iterator find(base_iterator p)" member
+function.
+
+It would return an iterator to a boundary point on \a p's location or at the
+location following it if \a 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:
+
+\code
+using namespace boost::locale::boundary;
+boost::locale::generator gen;
+// 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
+map.rule(word_any);
+
+// define our arbitraty point
+std::string::const_iterator pos = text.begin() + 12; // "no|t";
+
+// Get the search range
+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 ++)
+ --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;
+\endcode
+
+That would print:
+
+\verbatim
+ be or not to be, that
+\endverbatim
+
+
+*/
+
+

Added: trunk/libs/locale/doc/building_boost_locale.txt
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/building_boost_locale.txt 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,209 @@
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 filetype=cpp.doxygen
+/*!
+\page building_boost_locale Building The library
+
+Boost.Locale presently supports CMake build system and Boost Build.
+
+\note You need Boost 1.46 and above to use Boost.Build
+
+- \ref building_boost_locale_bb
+- \ref building_boost_locale_cmake
+- \ref binary_compatibility
+
+
+\section building_boost_locale_bb Building With Boost.Build
+
+You need Boost 1.46 and above to use Boost.Build, it includes important
+patches that allow you to build the library correctly.
+
+\subsection bb_building_deps Dependencies
+
+- Boost 1.46 and above.
+- ICU library 3.6 or above is strongly recommended
+- If no ICU library is given, iconv support is required under POSIX platforms.
+
+\subsection bb_building_proc Building Process
+
+First of all we need to prepare our sources of Boost with Boost.Locale
+
+- Download latest version of Boost and extract its sources
+- Download the latest version of Boost.Locale and extract its sources
+- Copy boost and libs subdirectory of Boost.Locale sources into the location
+ of boost sources.
+- Bootstrap latest bjam version running bootstrap.sh or bootstrap.bat.
+
+Now all you need to do is invoke bjam command:
+
+\verbatim
+./bjam --with-locale stage
+\endverbatim
+
+Or on Windows
+\verbatim
+.\bjam --with-locale stage
+\endverbatim
+
+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 \c -sICU_PATH option
+
+For example:
+
+- If your icu build is placed at \c /opt/icu46 such that the files are placed like\n
+ \c /opt/icu46/include/unicode/uversion.h\n
+ \c /opt/icu46/include/unicode/calendar.h\n
+ \c ... \n
+ \c /opt/icu46/lib/libicudata.so \n
+ \c /opt/icu46/lib/libicui18n.so \n
+ \c ... \n
+ then you need to provide an option \c -sICU_PATH=/opt/icu46
+ \verbatim
+ ./bjam --with-locale -sICU_PATH=/opt/icu46 stage
+ \endverbatim
+- If your icu build is placed at <tt>c:\\icu46</tt> such that the files are placed like \n
+ <tt>c:\\icu46\\include\\unicode\\uversion.h</tt> \n
+ <tt>c:\\icu46\\include\\unicode\\calendar.h</tt> \n
+ <tt>...</tt> \n
+ <tt>c:\\icu46\\bin\\icudt.dll</tt> \n
+ <tt>c:\\icu46\\bin\\icuin.dll</tt> \n
+ <tt>...</tt> \n
+ <tt>c:\\icu46\\lib\\icudt.lib</tt> \n
+ <tt>c:\\icu46\\lib\\icuin.lib</tt> \n
+ <tt>...</tt> \n
+ then you need to provide an option \c -sICU_PATH=c:\\icu46
+ \verbatim
+ .\bjam --with-locale -sICU_PATH=c:\icu46 stage
+ \endverbatim
+
+\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.
+
+\section bb_build_opts Build Options
+
+Boost.Locale supports following options with values \c off or \c on
+
+- \c boost.locale.icu=off disable build of ICU backend even if ICU library exists
+- \c boost.locale.iconv=off or \c boost.locale.iconv=on enable or disable use of iconv
+ library. It is off by default on Windows and Solaris
+- \c boost.locale.winapi=off - disable winapi backend, it is on by default on Windows and Cygwin
+- \c boost.locale.std=off or \c boost.locale.winapi=on Disable or enable std backends. \c std backend
+ is disabled by default when using Sun Studio.
+- \c boost.locale.posix=on or \c 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
+
+- \c -sICU_PATH=/path/to/location/of/icu - the location of custom ICU library
+- \c -sICONV_PATH=/path/to/location/of/iconv - the location of custom iconv library
+
+
+For example:
+
+- Build the library on Windows with ICU backend only:
+ \verbatim
+ .\bjam boost.locale.winapi=off boost.locale.std=off -sICU_PATH=c:\icu46 --with-locale stage
+ \endverbatim
+- Build the library on Linux with std backend only
+ \verbatim
+ .\bjam boost.locale.posix=off boost.locale.icu=off --with-locale stage
+ \endverbatim
+
+\section bb_build_test Running Unit Tests
+
+You can run unit tests by invoking \c bjam with \c libs/locale/test project parameter
+\verbatim
+./bjam libs/locale/test
+\endverbatim
+
+\section building_boost_locale_cmake Building With CMake
+
+\note CMake build does not provide mangled library names like boost_locale-mt-gd.lib, so if you
+rely on auto-linking use Boost.Build.
+
+\subsection cmake_building_deps Dependencies
+
+- CMake 2.6 and above.
+- Boost 1.35 and above.
+- Boost.Thread (when using ICU or when using Boost < 1.43)
+- ICU library 3.6 or above is strongly recommended
+- If no ICU library is given, iconv support is required under POSIX platforms.
+
+\subsection cmake_building_proc Building Process
+
+The library build should be fairly simple for users familiar with CMake.
+
+\note
+
+- MSVC Users: use \c nmake for building the library, MSVC projects are not supported!
+- Windows users: don't forget to set the PATH environment variable to point to ICU's dlls.
+
+The simplest way to build the library is:
+
+- Extract its sources
+- Go to the sources directory
+- Create a subdirectory named "build"
+- Go into this directory and run:
+ \code
+ cmake ..
+ make
+ make test
+ \endcode
+ For windows you may need to specify:
+ \code
+ cmake -DCMAKE_INCLUDE_PATH=/path/to/icu/include:/path/to/boost/include -DCMAKE_LIBRARY_PATH=/path/to/icu/lib ..
+ \endcode
+ And then:
+ \code
+ nmake
+ nmake test
+ \endcode
+ Or
+ \code
+ make && make test
+ \endcode
+ Depending on your compiler.
+
+
+\section cmake_build_opts Build Options
+
+This options can be passed to CMake to configure the library to your needs.
+
+- \c DISABLE_SHARED - build only the static library
+- \c DISABLE_STATIC - build only the shared library
+- \c DISABLE_ICU - Disable the ICU backend (strongly discouraged)
+- \c DISABLE_STD_BACKED - Disable the "std" backend
+- \c DISABLE_POSIX_BACKEND - Disable the "posix" backend (ON by default on all but Linux and Mac OS X)
+- \c DISABLE_WINAPI_BACKEND - Disable the "winapi" backend (ON by default on POSIX platforms).
+- \c DISABLE_ICONV - Disable iconv-based conversion (ON by default on Windows)
+
+Useful CMake options:
+
+- \c CMAKE_INCLUDE_PATH - path to the boost library (if not system-wide)
+- \c CMAKE_INSTALL_PREFIX - installation path
+- \c CMAKE_BUILD_TYPE - default is Debug on Windows/MSVC and RelWithDebInfo on all other platforms.
+
+Examples:
+
+- Build Boost.Locale with only the "icu" backend on Linux
+ \code
+ cmake -DDISABLE_POSIX_BACKEND=ON -DDISABLE_STD_BACKEND=ON -DDISABLE_ICONV=ON ..
+ \endcode
+- Build Boost.Locale with the "winapi" and "std" backends on Windows
+ \code
+ cmake -G "NMake Makefiles" -DDISABLE_ICU_BACKEND=ON -DCMAKE_INCLUDE_PATH=c:/boost_1_43_0 ..
+ \endcode
+
+\section binary_compatibility 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 \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
+try to use boundary analysis or a calendar facet when the library does not support the icu backend
+you would get an exception.
+
+*/
+
+

Added: trunk/libs/locale/doc/charset_handling.txt
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/charset_handling.txt 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,143 @@
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 filetype=cpp.doxygen
+/*!
+\page charset_handling Character Set Conversions
+
+\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
+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.
+
+For example:
+
+\code
+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);
+\endcode
+
+
+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 \ref boost::locale::conv::conversion_error "conversion_error" exception
+by passing the \c stop flag to it:
+
+\code
+std::wstring s=to_utf<wchar_t>("\xFF\xFF","UTF-8",stop);
+// Throws because this string is illegal in UTF-8
+\endcode
+
+\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.
+
+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 \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
+Boost.Iostreams filters or \c std::wfstream. For example:
+
+\code
+ std::locale loc= generator().generate("he_IL.UTF-8");
+ std::wofstream file.
+ file.imbue(loc);
+ file.open("hello.txt");
+ file << L"שלום!" << endl;
+\endcode
+
+Would create a file \c hello.txt encoded as UTF-8 with "שלום!" (shalom) in it.
+
+\section codecvt_iostreams_integration Integration with Boost.Iostreams
+
+You can use the \c std::codecvt facet directly, but this is quite tricky and
+requires accurate buffer and error management.
+
+You can use the \c 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:
+
+\code
+#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;
+ boost::locale::generator gen;
+ 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;
+}
+
+\endcode
+
+
+\section codecvt_limitations Limitations of std::codecvt
+
+The Standard does not provide any information about \c 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 <tt>std::codecvt<wchar_t,char,mbstate_t></tt> for stateful encodings.
+Thus, Boost.Locale's \c 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.
+
+\b Recommendation: Prefer the Unicode UTF-8 encoding for \c 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.
+
+
+*/
+
+

Added: trunk/libs/locale/doc/collation.txt
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/collation.txt 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,44 @@
+
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 filetype=cpp.doxygen
+/*!
+\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:
+
+-# Primary -- ignore accents and character case, comparing base letters only. For example "facade" and "Façade" are the same.
+-# Secondary -- ignore character case but consider accents. "facade" and "façade" are different but "Façade" and "façade" are the same.
+-# Tertiary -- consider both case and accents: "Façade" and "façade" are different. Ignore punctuation.
+-# Quaternary -- consider all case, accents, and punctuation. The words must be identical in terms of Unicode representation.
+-# Identical -- as quaternary, but compare code points as well.
+
+There are two ways of using the \ref boost::locale::collator "collator" facet: directly, by calling its member functions \ref boost::locale::collator::compare() "compare", \ref boost::locale::collator::transform() "transform" and \ref
+boost::locale::collator::hash() "hash", or indirectly by using the \ref boost::locale::comparator "comparator" template
+class in STL algorithms.
+
+For example:
+
+\code
+ 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;
+\endcode
+
+\c 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.
+
+\code
+ std::map<std::string,std::string,comparator<char,collator_base::secondary> > strings;
+ // Now strings uses the default system locale for string comparison
+\endcode
+
+You can also set a specific locale or level when creating and using the \ref boost::locale::comparator "comparator" class:
+
+\code
+ comparator<char> comp(some_locale,some_level);
+ std::map<std::string,std::string,comparator<char> > strings(comp);
+\endcode
+
+*/
+
+

Added: trunk/libs/locale/doc/conversions.txt
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/conversions.txt 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,92 @@
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 filetype=cpp.doxygen
+/*!
+\page conversions Text Conversions
+
+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".
+
+All these functions receive an \c std::locale object as parameter or use a global locale by default.
+
+Global locale is used in all examples below.
+
+\section conversions_case Case Handing
+
+For example:
+\code
+ 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;
+\endcode
+
+Would print:
+
+\verbatim
+Upper GRÃœSSEN
+Lower grüßen
+Title Grüßen
+Fold grüssen
+\endverbatim
+
+You may notice that there are existing functions \c to_upper and \c 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:
+
+\code
+ std::wstring grussen = L"grüßen";
+ std::wcout << boost::algorithm::to_upper_copy(grussen) << " " << boost::locale::to_upper(grussen) << std::endl;
+\endcode
+
+Would give in output:
+
+\verbatim
+GRÜßEN GRÜSSEN
+\endverbatim
+
+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
+
+\code
+ std::string grussen = "grüßen";
+ std::cout << boost::algorithm::to_upper_copy(grussen) << " " << boost::locale::to_upper(grussen) << std::endl;
+\endcode
+
+Would modify ASCII characters only
+
+\verbatim
+GRüßEN GRÜSSEN
+\endverbatim
+
+\section conversions_normalization 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 \ref boost::locale::normalize() "normalize" function:
+
+- NFD - Canonical decomposition - boost::locale::norm_nfd
+- NFC - Canonical decomposition followed by canonical composition - boost::locale::norm_nfc or boost::locale::norm_default
+- NFKD - Compatibility decomposition - boost::locale::norm_nfkd
+- NFKC - Compatibility decomposition followed by canonical composition - boost::locale::norm_nfkc
+
+For more details on normalization forms, read this article.
+
+\section conversions_notes Notes
+
+- \ref boost::locale::normalize() "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.
+- \ref boost::locale::fold_case() "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.
+*/
+
+

Added: trunk/libs/locale/doc/dates_times_timezones.txt
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/dates_times_timezones.txt 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,203 @@
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 filetype=cpp.doxygen
+/*!
+\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
+ the Gregorian calendar. \c boost::date_time , \c std::tm , and standard functions like \c localtime and \c gmtime,
+ all assume the Gregorian calendar.
+-# The information about local start of week is not provided.
+ \n
+ For example the standard C and C++ library has \c mktime and \c 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.
+
+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.
+Unlike \c 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.
+
+\section dates_times_timezones_dt Handling Dates and Time
+
+- \ref 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.
+- \ref boost::locale::date_time -- represents a time point. It is constructed from a calendar and allows manipulation of various time periods.
+- \ref 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
+\ref boost::locale::date_time "date_time" objects.
+
+
+For example:
+
+\code
+ 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;
+\endcode
+
+You can calculate the difference between dates by dividing the difference by a period:
+
+\code
+ date_time now;
+ cout << " There are " << (now + 2 * period::month() - now) / period::day() << " days "
+ "between " << as::date << now << " and " << now + 2*period::month() << endl;
+\endcode
+
+You can also use different syntax (less operator overloading)
+
+\code
+ date_time now;
+ cout << " There are " << period::day(now + period::month(2) - now) << " days "
+ "between " << as::date << now << " and " << now + period::month(2) << endl;
+\endcode
+
+
+
+\ref boost::locale::date_time "date_time" -- provides the member functions \ref boost::locale::date_time::minimum() "minimum" and
+\ref boost::locale::date_time::maximum() "maximum" to get the information about smallest and largest
+possible values of a certain period for a specific time.
+
+For example, for February the <tt>maximum(period::day())</tt> 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 \c 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
+\ref boost::locale::date_time::time "time" member function.
+
+For example:
+
+\code
+ using namespace boost::locale;
+ using namespace boost::locale::period;
+ generator gen;
+ // Create locales with Hebrew and Gregorian (default) calendars.
+ std::locale l_hebrew=gen("en_US.UTF-8_at_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;
+\endcode
+
+\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
+- 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
+
+The current operating system's time zone is used by default, however the time zone can be modified at
+several different levels:
+
+-# Calendar level: you can specify a timezone when creating a new instance of \ref boost::locale::calendar
+ in its constructor.
+-# iostream level: you can use \ref boost::locale::as::time_zone "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
+-# You can specify the default global time zone by calling: \ref boost::locale::time_zone::global(std::string const &).
+ This time zone would be the default one for newly created iostream object and calendar instances.
+
+\note
+
+\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
+ 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.
+
+
+\section dates_times_timezones_io I/O Operations on date_time objects
+
+Writing a \ref boost::locale::date_time "date_time" is equivalent
+to:
+
+- 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.
+
+For example this code:
+
+\code
+using namespace boost::locale;
+date_time now;
+std::cout << now << std::endl;
+\endcode
+
+Would print in the default format, something like:
+
+\verbatim
+2/3/2011 12:00 am
+\endverbatim
+
+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
+
+\code
+using namespace boost::locale;
+date_time now;
+std::cout << as::date << now << std::endl;
+\endcode
+
+Would print something like:
+
+\verbatim
+2/3/2011
+\endverbatim
+
+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
+
+
+<b>Why should I use Boost.Locale over Boost.DateTime when I need Gregorian calendar only?</b>
+
+- 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.
+ \n
+ For example, <tt>date_time(some_time.time() + 3600)</tt> may be not equal to
+ <tt>some_time + hour()</tt>, because of the daylight savings time.
+
+<b>Why don't you use Boost.DateTime time zone support?</b>
+
+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.
+
+*/
+
+

Added: trunk/libs/locale/doc/default_encoding_under_windows.txt
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/default_encoding_under_windows.txt 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,57 @@
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 filetype=cpp.doxygen
+/*!
+\page default_encoding_under_windows 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 \c 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
+
+\code
+#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");
+}
+
+\endcode
+
+However such behavior may break existing software that assumes that the current
+encoding is single byte encodings like code page 1252.
+
+\ref boost::locale::generator class has a property \ref boost::locale::generator::use_ansi_encoding() "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 \c use_ansi_encoding is turned on
+then the default locale would be "en_US.windows-1252"
+
+\note \c winapi backend does not support ANSI encodings, thus UTF-8 encoding is always used for narrow characters.
+
+*/
+

Added: trunk/libs/locale/doc/faq.txt
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/faq.txt 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,42 @@
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 filetype=cpp.doxygen
+/*!
+\page faq Frequently Asked Questions
+
+- \anchor faq_bad_cast <b>I try to use some Boost.Locale functions and I get an \c std::bad_cast exception thrown?</b>
+ \n
+ \n
+ \b Answer: You probably try to use incorrect \c std::locale object. All Boost.Locale tools relay on \c std::locale object's facets.
+ The locale object should be generated with \ref boost::locale::generator "generator" class and then passed to
+ the function or alternatively global locale should be set using \c std::locale::global() function such that
+ global locale (and default created one) would have required facets to use.
+- \anchor faq_number <b>I had installed global locale and try to write something to stream but still get wrong output?</b>
+ For example:
+ \code
+ #include <boost/locale.hpp>
+ #include <iostream>
+ int main()
+ {
+ boost::locale::generator gen;
+ std::locale::global(gen(""));
+ std::cout << boost::locale::as::date << std::time(0) << std::endl;
+ }
+ \endcode
+ Prints a number instead of a date.
+ \n
+ \b Answer: You forget to imbue the locale to the stream. Changing the global locale does not affect the
+ locale in existing \c iostream objects. Thus because \c std::out and other global streams were created
+ before changing the global locale Boost.Locale manipulators have no effect. You need to write:
+ \code
+ #include <boost/locale.hpp>
+ #include <iostream>
+ int main()
+ {
+ boost::locale::generator gen;
+ std::locale l = gen("");
+ std::locale::global(l);
+ std::cout.imbue(l);
+ std::cout << boost::locale::as::date << std::time(0) << std::endl;
+ }
+ \endcode
+
+*/

Added: trunk/libs/locale/doc/footer.html
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/footer.html 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,5 @@
+<hr class="footer"/><address class="footer"><small>
+&copy; 2009-2011 Artyom Beilis, Distributed under the Boost Software License, Version 1.0.
+</small></address>
+</body>
+</html>

Added: trunk/libs/locale/doc/formatting_and_parsing.txt
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/formatting_and_parsing.txt 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,154 @@
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 filetype=cpp.doxygen
+/*!
+
+\page formatting_and_parsing 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:
+
+\code
+ 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
+\endcode
+
+There is a special manipulator \c as::posix that "unsets" locale-specific settings and returns them to the default \c iostream formatting
+and parsing methods. Please note, such formats may still be localized by the default \c std::num_put and \c std::num_get facets.
+
+\section numbers_formatting Numbers and number manipulators
+
+Here are the manipulators for number formatting:
+
+- \c as::number -- format number according to local specifications, it takes into account various \c std::ios_base flags like scientific
+ format and precision.
+ \n
+- \c as::percent -- format number as "percent" format. For example:
+ \code
+ cout << as::percent << 0.25 <<endl;
+ \endcode
+ Would create an output that may look like this:
+ \verbatim
+ 25%
+ \endverbatim
+ \n
+- \c as::spellout -- spell the number. For example, under the English locale, 103 may be displayed as "one hundred three".
+ \b Note: not all locales provide rules for spelling numbers. In such a case the number would be displayed in decimal format.
+ \n
+- \c 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.
+
+\section currency_formatting Currency formatting
+
+These are the manipulators for currency formatting:
+
+- \c as::currency -- set the format to currency mode.
+- \c as::currency_iso -- change the currency format to international, like "USD" instead of "$". This flag is supported
+ when using ICU 4.2 and above.
+- \c as::currency_national -- change currency format to national, like "$".
+- \c as::currency_default -- return to the default (national) currency format.
+
+\note \c 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.
+
+\section date_and_time_formatting Date and Time formatting
+
+Dates and times are represented as POSIX time. When date-time formatting is turned on in the \c 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:
+
+- \c as::date -- date only
+- \c as::time -- time only
+- \c as::datetime -- both date and time
+- \c as::ftime -- parameterized manipulator that allows specification of time in the format that is used in the \c strftime function.
+ \b Note: not all formatting flags of \c strftime are supported.
+
+For example:
+
+\code
+ 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;
+\endcode
+
+More fine-grained control of date-time formatting is also available:
+
+- \c as::time_default , \c as::time_short , \c as::time_medium , \c as::time_long , \c as::time_full -- change time formatting.
+- \c as::date_default , \c as::date_short , \c as::date_medium , \c as::date_long , \c as::date_full -- change date formatting.
+
+These manipulators, when used together with the \c as::date, \c as::time, or \c 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:
+
+- \c as::gmt -- display date and time in GMT.
+- \c as::local_time -- display in local time zone (default).
+- \c 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:
+
+\code
+ 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;
+\endcode
+
+There is a list of supported \c strftime flags by ICU backend:
+
+- \c \%a -- Abbreviated weekday (Sun.)
+- \c \%A -- Full weekday (Sunday)
+- \c \%b -- Abbreviated month (Jan.)
+- \c \%B -- Full month (January)
+- \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 -- 24 clock hour [00,23]
+- \c \%I -- 12 clock hour [01,12]
+- \c \%j -- Day of year [1,366]
+- \c \%m -- Month [01,12]
+- \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 \%S -- Second [00,61]
+- \c \%t -- Tab character
+- \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]
+- \c \%Y -- 4 digits year. (2009)
+- \c \%Z -- Time Zone
+- \c \%\% -- Percent symbol
+
+Unsupported \c strftime flags are: \c \%C , \c \%u , \c \%U , \c \%V , \c \%w , \c \%W . Also, the \c O and \c E modifiers are not supported.
+
+
+\b General \b recommendations
+
+- Prefer using generic date-time manipulators rather than specifying the full format using \c as::ftime.
+- Remember that current calendars may be not Gregorian.
+
+
+\section formatting_internals Internals
+
+Formatting information is stored in a stream class by using the \c xalloc, \c pword, and \c register_callback member functions
+of \c std::ios_base . All the information is stored and managed using a special object bound to \c 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 \c 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.
+
+*/
+
+

Added: trunk/libs/locale/doc/gendoc.sh
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/gendoc.sh 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,2 @@
+#!/bin/bash
+rm -fr html && doxygen && cp index.template.html html/index.html

Added: trunk/libs/locale/doc/gettext_for_windows.txt
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/gettext_for_windows.txt 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,88 @@
+
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 filetype=cpp.doxygen
+/*!
+\page gettext_for_windows Using Gettext Tools on Windows
+
+In order to get the Gettext tools like \c msgfmt, \c msgmerge, \c 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
+
+\section gettext_for_windows_cppcms 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 \c gettext
+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.
+
+Extract the file and use the executable files inside.
+
+\section gettext_for_windows_mingw 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: \c MinGW/BaseSystem/GCC/Version4/gcc-xxx/ \n
+ File: \c libgcc-xxx-mingw32-dll-1.tar.lzma
+- From \c MinGW/Gettext/gettext-yyy/ \n
+ Files: \c gettext-yyy-mingw32-dev.tar.lzma,
+ \c libgettextpo-yyy-mingw32-dll-0.tar.lzma,
+ \c libintl-yyy-mingw32-dll-8.tar.lzma
+- From \c MinGW/libiconv/libiconv-zzz/ \n
+ Files: \c libiconv-zzz-mingw32-dll-2.tar.lzma, \c libcharset-zzz-mingw32-dll-1.tar.lzma
+
+For example, at June 23, 2011 it was:
+
+- GNU Runtime: \c libgcc-4.5.2-1-mingw32-dll-1.tar.lzma
+- \c iconv: \c libiconv-1.13.1-1-mingw32-dll-2.tar.lzma and \c libcharset-1.13.1-1-mingw32-dll-1.tar.lzma
+- \c gettext: \c libintl-0.17-1-mingw32-dll-8.tar.lzma, \c libgettextpo-0.17-1-mingw32-dll-0.tar.lzma and \c gettext-0.17-1-mingw32-dev.tar.lzma.
+
+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.
+
+\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.
+
+Basic and simplest way would be to open a MinGW shell
+
+Build \c iconv:
+
+\code
+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
+\endcode
+
+And now you have in <tt>c:\\mygettext\\bin</tt> all appropriate executable files
+to use.
+
+\section gettext_for_windows_cygwin Using Cygwin
+
+If you already have Cygwin - just use gettext tools provided with it.
+
+*/
+
+

Added: trunk/libs/locale/doc/glossary.txt
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/glossary.txt 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,71 @@
+// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 filetype=cpp.doxygen
+/*!
+\page glossary Glossary
+
+- \anchor term_bmp <b>Basic Multilingual Plane (BMP)</b> -- a part of
+ the <i>Universal Character Set</i> 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.
+- \b Code \b 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.
+- \anchor term_collation \b Collation -- a sorting order for text, usually alphabetical. It can differ between languages and countries, even for the same
+ characters.
+- \b 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.
+ \n
+ 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.
+ \n
+ For Boost.Locale you should provide an eight-bit (\c std::string) encoding as part of the locale name, like \c en_US.UTF-8 or
+ \c he_IL.cp1255 . \c UTF-8 is recommended.
+- \b Facet - or \c 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.
+- \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
+ 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
+ Open Source world. Boost.Locale message formatting is entirely built on Gettext message catalogs.
+- \b 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 \c std::locale class.
+- \b Message \b 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.
+- \b Message \b Domain -- in \a gettext terms, the keyword that represents a message catalog. This is usually an application name. When
+ \a gettext and Boost.Locale search for a specific message catalog, they search in the specified path for a file named after the domain.
+- \anchor term_normalization
+ \b 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.
+ \n
+ Normalization is not locale-dependent, but because it is an important part of Unicode processing, it is included in the Boost.Locale
+ library.
+- \b UCS-2 - a fixed-width Unicode encoding, capable of representing only code points in the <i>Basic Multilingual Plane (BMP)</i>.
+ 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.
+ It should not be confused with the <i>Universal Character Set</i>, it is a much larger standard that also defines algorithms like
+ bidirectional display order, Arabic shaping, etc.
+- <b>Universal Character Set (UCS)</b> - an international standard that defines a set of characters for many scripts and their
+ \a code \a points.
+- \b 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.
+- \b 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 <i>Basic Multilingual Plane (BMP)</i>.
+ \n
+ This encoding is used for \c std::wstring under the Win32 platform, where <tt>sizeof(wchar_t)==2</tt>.
+- \b 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 \c std::wstring encoding
+ for most POSIX platforms, where <tt>sizeof(wchar_t)==4</tt>.
+- \anchor term_case_folding <b>Case Folding</b> - 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".
+- \anchor term_title_case <b>Title Case</b> -
+ Is a text conversion where the words are capitalized. For example "hello world" is converted
+ to "Hello World"
+
+*/
+
+

Added: trunk/libs/locale/doc/header.html
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/header.html 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>$title</title>
+<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
+<link href="$relpath$doxygen.css" rel="stylesheet" type="text/css"/>
+<!--
+ Switch the lines for stand alone version
+ <link rel="stylesheet" type="text/css" href="http://www.boost.org/style-v2/section-basic.css">
+-->
+<link rel="stylesheet" type="text/css" href="../style/section-basic.css">
+</head>
+<body>
+<div id="boost-common-heading-doc">
+ <div class="heading-inner">
+ <div class="heading-placard"></div>
+
+ <h1 class="heading-title">
+ <a href="http://www.boost.org/">
+ <!--
+ Switch the lines for stand alone version
+ <img src="http://www.boost.org/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ -->
+ <img src="../style/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ <span class="heading-boost">Boost</span>
+ <span class="heading-cpplibraries">C++ Libraries</span>
+ </a>
+ </h1>
+
+ <p class="heading-quote">
+
+ <q>...one of the most highly
+ regarded and expertly designed C++ library projects in the
+ world.</q>
+
+ <span class="heading-attribution">&mdash; <a href=
+ "http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
+ "http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
+ Alexandrescu</a>, <a href=
+ "http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
+ Coding Standards</a></span>
+ </p>
+ </div>
+</div>
+
+<div id="boost-common-heading-doc-spacer"></div>

Added: trunk/libs/locale/doc/html/annotated.html
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/html/annotated.html 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,115 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>Boost.Locale: Class List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+<!--
+ Switch the lines for stand alone version
+ <link rel="stylesheet" type="text/css" href="http://www.boost.org/style-v2/section-basic.css">
+-->
+<link rel="stylesheet" type="text/css" href="../style/section-basic.css">
+</head>
+<body>
+<div id="boost-common-heading-doc">
+ <div class="heading-inner">
+ <div class="heading-placard"></div>
+
+ <h1 class="heading-title">
+ <a href="http://www.boost.org/">
+ <!--
+ Switch the lines for stand alone version
+ <img src="http://www.boost.org/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ -->
+ <img src="../style/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ <span class="heading-boost">Boost</span>
+ <span class="heading-cpplibraries">C++ Libraries</span>
+ </a>
+ </h1>
+
+ <p class="heading-quote">
+
+ <q>...one of the most highly
+ regarded and expertly designed C++ library projects in the
+ world.</q>
+
+ <span class="heading-attribution">&mdash; <a href=
+ "http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
+ "http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
+ Alexandrescu</a>, <a href=
+ "http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
+ Coding Standards</a></span>
+ </p>
+ </div>
+</div>
+
+<div id="boost-common-heading-doc-spacer"></div>
+<!-- Generated by Doxygen 1.7.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul class="tablist">
+ <li>Main Page</li>
+ <li>Modules</li>
+ <li>Namespaces</li>
+ <li class="current">Classes</li>
+ <li>Files</li>
+ <li>Examples</li>
+ </ul>
+ </div>
+ <div class="tabs2">
+ <ul class="tablist">
+ <li class="current">Class List</li>
+ <li>Class Hierarchy</li>
+ <li>Class Members</li>
+ </ul>
+ </div>
+</div>
+<div class="header">
+ <div class="headertitle">
+<h1>Class List</h1> </div>
+</div>
+<div class="contents">
+Here are the classes, structs, unions and interfaces with brief descriptions:<table>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td class="indexvalue"></td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1util_1_1base__converter.html">boost::locale::util::base_converter</a></td><td class="indexvalue">This class represent a simple stateless converter from UCS-4 and to UCS-4 for each single code point </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1basic__format.html">boost::locale::basic_format&lt; CharType &gt;</a></td><td class="indexvalue">Printf like class that allows type-safe and locale aware message formatting </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1basic__message.html">boost::locale::basic_message&lt; CharType &gt;</a></td><td class="indexvalue">This class represents a message that can be converted to a specific locale message </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__indexing.html">boost::locale::boundary::boundary_indexing&lt; Char &gt;</a></td><td class="indexvalue">This facet generates an index for boundary analysis for a given text </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point&lt; IteratorType &gt;</a></td><td class="indexvalue">This class represents a boundary point in the text </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boost::locale::boundary::boundary_point_index&lt; BaseIterator &gt;</a></td><td class="indexvalue">This class holds an index of <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boundary points</a> and allows iterating over them </td></tr>
+ <tr><td class="indexkey"><a class="el" href="structboost_1_1locale_1_1boundary_1_1break__info.html">boost::locale::boundary::break_info</a></td><td class="indexvalue">This structure is used for representing boundary point that follows the offset </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1calendar.html">boost::locale::calendar</a></td><td class="indexvalue">This class provides an access to general calendar information </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1calendar__facet.html">boost::locale::calendar_facet</a></td><td class="indexvalue">Facet that generates calendar for specific locale </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1collator.html">boost::locale::collator&lt; CharType &gt;</a></td><td class="indexvalue">Collation facet </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1collator__base.html">boost::locale::collator_base</a></td><td class="indexvalue">Base class that includes collation level flags </td></tr>
+ <tr><td class="indexkey"><a class="el" href="structboost_1_1locale_1_1comparator.html">boost::locale::comparator&lt; CharType, default_level &gt;</a></td><td class="indexvalue">This class can be used in STL algorithms and containers for comparison of strings with a level other than primary </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1conv_1_1conversion__error.html">boost::locale::conv::conversion_error</a></td><td class="indexvalue">The excepton that is thrown in case of conversion error </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1converter.html">boost::locale::converter&lt; Char &gt;</a></td><td class="indexvalue">The facet that implements text manipulation </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1converter__base.html">boost::locale::converter_base</a></td><td class="indexvalue">This class provides base flags for text manipulation. It is used as base for converter facet </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1date__time.html">boost::locale::date_time</a></td><td class="indexvalue">This class represents a date time and allows to perform various operation according to the locale settings </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1date__time__duration.html">boost::locale::date_time_duration</a></td><td class="indexvalue">This class represents a period: a pair of two <a class="el" href="classboost_1_1locale_1_1date__time.html" title="this class represents a date time and allows to perform various operation according to the locale set...">date_time</a> objects </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1date__time__error.html">boost::locale::date_time_error</a></td><td class="indexvalue">This error is thrown in case of invalid state that occurred </td></tr>
+ <tr><td class="indexkey"><a class="el" href="structboost_1_1locale_1_1date__time__period.html">boost::locale::date_time_period</a></td><td class="indexvalue">This class represents a pair of period_type and the integer values that describes its amount. For example 3 days or 4 years </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1date__time__period__set.html">boost::locale::date_time_period_set</a></td><td class="indexvalue">This class that represents a set of periods, </td></tr>
+ <tr><td class="indexkey"><a class="el" href="structboost_1_1locale_1_1gnu__gettext_1_1messages__info_1_1domain.html">boost::locale::gnu_gettext::messages_info::domain</a></td><td class="indexvalue">This type represents GNU Gettext domain name for the messages </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1generator.html">boost::locale::generator</a></td><td class="indexvalue">Major class used for locale generation </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1hold__ptr.html">boost::locale::hold_ptr&lt; T &gt;</a></td><td class="indexvalue">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) </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1info.html">boost::locale::info</a></td><td class="indexvalue">Facet that holds general information about locale </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1conv_1_1invalid__charset__error.html">boost::locale::conv::invalid_charset_error</a></td><td class="indexvalue">This exception is thrown in case of use of unsupported or invalid character set </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1ios__info.html">boost::locale::ios_info</a></td><td class="indexvalue">This class holds an external data - beyond existing fmtflags that std::ios_base holds </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1localization__backend.html">boost::locale::localization_backend</a></td><td class="indexvalue">This class represents a localization backend that can be used for localizing your application </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1localization__backend__manager.html">boost::locale::localization_backend_manager</a></td><td class="indexvalue">Localization backend manager is a class that holds various backend and allows creation of their combination or selection </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1message__format.html">boost::locale::message_format&lt; CharType &gt;</a></td><td class="indexvalue">This facet provides message formatting abilities </td></tr>
+ <tr><td class="indexkey"><a class="el" href="structboost_1_1locale_1_1gnu__gettext_1_1messages__info.html">boost::locale::gnu_gettext::messages_info</a></td><td class="indexvalue">This structure holds all information required for creating gnu-gettext message catalogs, </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1period_1_1period__type.html">boost::locale::period::period_type</a></td><td class="indexvalue">This class holds a type that represents certain period of time like year, hour, second and so on </td></tr>
+ <tr><td class="indexkey"><a class="el" href="structboost_1_1locale_1_1posix__time.html">boost::locale::posix_time</a></td><td class="indexvalue"></td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">boost::locale::boundary::segment&lt; IteratorType &gt;</a></td><td class="indexvalue">Segment object that represents a pair of two iterators that define the range where this segment exits and a rule that defines it </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment__index.html">boost::locale::boundary::segment_index&lt; BaseIterator &gt;</a></td><td class="indexvalue">This class holds an index of segments in the text range and allows to iterate over them </td></tr>
+</table>
+</div>
+<hr class="footer"/><address class="footer"><small>
+&copy; 2009-2011 Artyom Beilis, Distributed under the Boost Software License, Version 1.0.
+</small></address>
+</body>
+</html>

Added: trunk/libs/locale/doc/html/appendix.html
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/html/appendix.html 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,89 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>Boost.Locale: Appendix</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+<!--
+ Switch the lines for stand alone version
+ <link rel="stylesheet" type="text/css" href="http://www.boost.org/style-v2/section-basic.css">
+-->
+<link rel="stylesheet" type="text/css" href="../style/section-basic.css">
+</head>
+<body>
+<div id="boost-common-heading-doc">
+ <div class="heading-inner">
+ <div class="heading-placard"></div>
+
+ <h1 class="heading-title">
+ <a href="http://www.boost.org/">
+ <!--
+ Switch the lines for stand alone version
+ <img src="http://www.boost.org/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ -->
+ <img src="../style/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ <span class="heading-boost">Boost</span>
+ <span class="heading-cpplibraries">C++ Libraries</span>
+ </a>
+ </h1>
+
+ <p class="heading-quote">
+
+ <q>...one of the most highly
+ regarded and expertly designed C++ library projects in the
+ world.</q>
+
+ <span class="heading-attribution">&mdash; <a href=
+ "http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
+ "http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
+ Alexandrescu</a>, <a href=
+ "http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
+ Coding Standards</a></span>
+ </p>
+ </div>
+</div>
+
+<div id="boost-common-heading-doc-spacer"></div>
+<!-- Generated by Doxygen 1.7.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul class="tablist">
+ <li>Main Page</li>
+ <li>Modules</li>
+ <li>Namespaces</li>
+ <li>Classes</li>
+ <li>Files</li>
+ <li>Examples</li>
+ </ul>
+ </div>
+ <div class="navpath">
+ <ul>
+ <li><a class="el" href="main.html">Boost.Locale</a> </li>
+ </ul>
+ </div>
+</div>
+<div class="header">
+ <div class="headertitle">
+<h1>Appendix </h1> </div>
+</div>
+<div class="contents">
+<h2><a class="anchor" id="appendix_toc"></a>
+Table of Contents</h2>
+<ul>
+<li><a class="el" href="rationale.html">Design Rationale</a></li>
+<li><a class="el" href="faq.html">Frequently Asked Questions</a></li>
+<li><a class="el" href="default_encoding_under_windows.html">Default Encoding under Microsoft Windows</a></li>
+<li><a class="el" href="running_examples_under_windows.html">Running Examples under Microsoft Windows</a></li>
+<li><a class="el" href="gettext_for_windows.html">Using Gettext Tools on Windows</a></li>
+<li><a class="el" href="glossary.html">Glossary</a></li>
+<li><a class="el" href="tested_compilers_and_paltforms.html">Tested Compilers and Platforms</a></li>
+<li><a class="el" href="status_of_cpp0x_characters_support.html">Status of C++0x char16_t/char32_t support</a></li>
+<li><a class="el" href="special_thanks.html">Special Thanks</a> </li>
+</ul>
+</div>
+<hr class="footer"/><address class="footer"><small>
+&copy; 2009-2011 Artyom Beilis, Distributed under the Boost Software License, Version 1.0.
+</small></address>
+</body>
+</html>

Added: trunk/libs/locale/doc/html/bc_s.png
==============================================================================
Binary file. No diff available.

Added: trunk/libs/locale/doc/html/boundary_8cpp-example.html
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/html/boundary_8cpp-example.html 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,143 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>Boost.Locale: boundary.cpp</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+<!--
+ Switch the lines for stand alone version
+ <link rel="stylesheet" type="text/css" href="http://www.boost.org/style-v2/section-basic.css">
+-->
+<link rel="stylesheet" type="text/css" href="../style/section-basic.css">
+</head>
+<body>
+<div id="boost-common-heading-doc">
+ <div class="heading-inner">
+ <div class="heading-placard"></div>
+
+ <h1 class="heading-title">
+ <a href="http://www.boost.org/">
+ <!--
+ Switch the lines for stand alone version
+ <img src="http://www.boost.org/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ -->
+ <img src="../style/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ <span class="heading-boost">Boost</span>
+ <span class="heading-cpplibraries">C++ Libraries</span>
+ </a>
+ </h1>
+
+ <p class="heading-quote">
+
+ <q>...one of the most highly
+ regarded and expertly designed C++ library projects in the
+ world.</q>
+
+ <span class="heading-attribution">&mdash; <a href=
+ "http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
+ "http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
+ Alexandrescu</a>, <a href=
+ "http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
+ Coding Standards</a></span>
+ </p>
+ </div>
+</div>
+
+<div id="boost-common-heading-doc-spacer"></div>
+<!-- Generated by Doxygen 1.7.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul class="tablist">
+ <li>Main Page</li>
+ <li>Modules</li>
+ <li>Namespaces</li>
+ <li>Classes</li>
+ <li>Files</li>
+ <li>Examples</li>
+ </ul>
+ </div>
+</div>
+<div class="header">
+ <div class="headertitle">
+<h1>boundary.cpp</h1> </div>
+</div>
+<div class="contents">
+<p>Example of using segment_index</p>
+<div class="fragment"><pre class="fragment"><span class="comment">//</span>
+<span class="comment">// Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)</span>
+<span class="comment">//</span>
+<span class="comment">// Distributed under the Boost Software License, Version 1.0. (See</span>
+<span class="comment">// accompanying file LICENSE_1_0.txt or copy at</span>
+<span class="comment">// http://www.boost.org/LICENSE_1_0.txt)</span>
+<span class="comment">//</span>
+<span class="preprocessor">#include &lt;boost/locale.hpp&gt;</span>
+<span class="preprocessor">#include &lt;iostream&gt;</span>
+<span class="preprocessor">#include &lt;cassert&gt;</span>
+<span class="preprocessor">#include &lt;ctime&gt;</span>
+
+<span class="keywordtype">int</span> main()
+{
+ <span class="keyword">using namespace </span>boost::locale;
+ <span class="keyword">using namespace </span>std;
+
+ <a name="_a0"></a><a class="code" href="classboost_1_1locale_1_1generator.html" title="the major class used for locale generation">generator</a> gen;
+ <span class="comment">// Make system default locale global</span>
+ std::locale loc = gen(<span class="stringliteral">&quot;&quot;</span>);
+ locale::global(loc);
+ cout.imbue(loc);
+
+
+ <span class="keywordtype">string</span> text=<span class="stringliteral">&quot;Hello World! あにま! Linux2.6 and Windows7 is word and number. שָלוֹם עוֹלָם!&quot;</span>;
+
+ cout&lt;&lt;text&lt;&lt;endl;
+
+ <a name="_a1"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1segment__index.html" title="This class holds an index of segments in the text range and allows to iterate over them...">boundary::ssegment_index</a> index(<a name="a2"></a><a class="code" href="group__boundary.html#gga15de9963ce9bb6037c8525901dfbf641a99aad8b8a5e25baa9f695abe5e574bb6" title="Analyse the text for word boundaries.">boundary::word</a>,text.begin(),text.end());
+ <a class="code" href="group__boundary.html#gaf7a775e77dbbca3495e11d646df96fd2">boundary::ssegment_index::iterator</a> p,e;
+
+ <span class="keywordflow">for</span>(p=index.begin(),e=index.end();p!=e;++p) {
+ cout&lt;&lt;<span class="stringliteral">&quot;Part [&quot;</span>&lt;&lt;*p&lt;&lt;<span class="stringliteral">&quot;] has &quot;</span>;
+ <span class="keywordflow">if</span>(p-&gt;rule() &amp; <a name="a3"></a><a class="code" href="group__boundary.html#gaac78a3a6b9e671e253a2591cb56a479b" title="Word that appear to be a number.">boundary::word_number</a>)
+ cout&lt;&lt;<span class="stringliteral">&quot;number(s) &quot;</span>;
+ <span class="keywordflow">if</span>(p-&gt;rule() &amp; <a name="a4"></a><a class="code" href="group__boundary.html#ga8b7e6ce2fcb185845fa85a1a4c42b3c4" title="Word that contains letters, excluding kana and ideographic characters.">boundary::word_letter</a>)
+ cout&lt;&lt;<span class="stringliteral">&quot;letter(s) &quot;</span>;
+ <span class="keywordflow">if</span>(p-&gt;rule() &amp; <a name="a5"></a><a class="code" href="group__boundary.html#ga52d8c63e1f3f8c898c645352206a78ef" title="Word that contains kana characters.">boundary::word_kana</a>)
+ cout&lt;&lt;<span class="stringliteral">&quot;kana character(s) &quot;</span>;
+ <span class="keywordflow">if</span>(p-&gt;rule() &amp; <a name="a6"></a><a class="code" href="group__boundary.html#ga705ab96f9e62810c8ed977c90d404ef8" title="Word that contains ideographic characters.">boundary::word_ideo</a>)
+ cout&lt;&lt;<span class="stringliteral">&quot;ideographic character(s) &quot;</span>;
+ <span class="keywordflow">if</span>(p-&gt;rule() &amp; <a name="a7"></a><a class="code" href="group__boundary.html#ga90cf4f01b95658f659685377226677e7" title="Not a word, like white space or punctuation mark.">boundary::word_none</a>)
+ cout&lt;&lt;<span class="stringliteral">&quot;no word characters&quot;</span>;
+ cout&lt;&lt;endl;
+ }
+
+ index.map(<a name="a8"></a><a class="code" href="group__boundary.html#gga15de9963ce9bb6037c8525901dfbf641ae80c964112541d88af9b875dafb6605d" title="Analyse the text for character boundaries.">boundary::character</a>,text.begin(),text.end());
+
+ <span class="keywordflow">for</span>(p=index.begin(),e=index.end();p!=e;++p) {
+ cout&lt;&lt;<span class="stringliteral">&quot;|&quot;</span> &lt;&lt;*p ;
+ }
+ cout&lt;&lt;<span class="stringliteral">&quot;|\n\n&quot;</span>;
+
+ index.map(<a name="a9"></a><a class="code" href="group__boundary.html#gga15de9963ce9bb6037c8525901dfbf641a72895419fdd7219b3695cf0abd602ea4" title="Analyse the text for positions suitable for line breaks.">boundary::line</a>,text.begin(),text.end());
+
+ <span class="keywordflow">for</span>(p=index.begin(),e=index.end();p!=e;++p) {
+ cout&lt;&lt;<span class="stringliteral">&quot;|&quot;</span> &lt;&lt;*p ;
+ }
+ cout&lt;&lt;<span class="stringliteral">&quot;|\n\n&quot;</span>;
+
+ index.map(<a name="a10"></a><a class="code" href="group__boundary.html#gga15de9963ce9bb6037c8525901dfbf641a88aa1509eace7589f5df87d4694871e9" title="Analyse the text for Find sentence boundaries.">boundary::sentence</a>,text.begin(),text.end());
+
+ <span class="keywordflow">for</span>(p=index.begin(),e=index.end();p!=e;++p) {
+ cout&lt;&lt;<span class="stringliteral">&quot;|&quot;</span> &lt;&lt;*p ;
+ }
+ cout&lt;&lt;<span class="stringliteral">&quot;|\n\n&quot;</span>;
+
+}
+
+<span class="comment">// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4</span>
+</pre></div> </div>
+</div>
+<hr class="footer"/><address class="footer"><small>
+&copy; 2009-2011 Artyom Beilis, Distributed under the Boost Software License, Version 1.0.
+</small></address>
+</body>
+</html>

Added: trunk/libs/locale/doc/html/boundary_8hpp_source.html
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/html/boundary_8hpp_source.html 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,94 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>Boost.Locale: boost/locale/boundary.hpp Source File</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+<!--
+ Switch the lines for stand alone version
+ <link rel="stylesheet" type="text/css" href="http://www.boost.org/style-v2/section-basic.css">
+-->
+<link rel="stylesheet" type="text/css" href="../style/section-basic.css">
+</head>
+<body>
+<div id="boost-common-heading-doc">
+ <div class="heading-inner">
+ <div class="heading-placard"></div>
+
+ <h1 class="heading-title">
+ <a href="http://www.boost.org/">
+ <!--
+ Switch the lines for stand alone version
+ <img src="http://www.boost.org/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ -->
+ <img src="../style/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ <span class="heading-boost">Boost</span>
+ <span class="heading-cpplibraries">C++ Libraries</span>
+ </a>
+ </h1>
+
+ <p class="heading-quote">
+
+ <q>...one of the most highly
+ regarded and expertly designed C++ library projects in the
+ world.</q>
+
+ <span class="heading-attribution">&mdash; <a href=
+ "http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
+ "http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
+ Alexandrescu</a>, <a href=
+ "http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
+ Coding Standards</a></span>
+ </p>
+ </div>
+</div>
+
+<div id="boost-common-heading-doc-spacer"></div>
+<!-- Generated by Doxygen 1.7.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul class="tablist">
+ <li>Main Page</li>
+ <li>Modules</li>
+ <li>Namespaces</li>
+ <li>Classes</li>
+ <li class="current">Files</li>
+ <li>Examples</li>
+ </ul>
+ </div>
+ <div class="tabs2">
+ <ul class="tablist">
+ <li>File List</li>
+ </ul>
+ </div>
+<div class="header">
+ <div class="headertitle">
+<h1>boost/locale/boundary.hpp</h1> </div>
+</div>
+<div class="contents">
+<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//</span>
+<a name="l00002"></a>00002 <span class="comment">// Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)</span>
+<a name="l00003"></a>00003 <span class="comment">//</span>
+<a name="l00004"></a>00004 <span class="comment">// Distributed under the Boost Software License, Version 1.0. (See</span>
+<a name="l00005"></a>00005 <span class="comment">// accompanying file LICENSE_1_0.txt or copy at</span>
+<a name="l00006"></a>00006 <span class="comment">// http://www.boost.org/LICENSE_1_0.txt)</span>
+<a name="l00007"></a>00007 <span class="comment">//</span>
+<a name="l00008"></a>00008 <span class="preprocessor">#ifndef BOOST_LOCALE_BOUNDARY_HPP_INCLUDED</span>
+<a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#define BOOST_LOCALE_BOUNDARY_HPP_INCLUDED</span>
+<a name="l00010"></a>00010 <span class="preprocessor"></span>
+<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;boost/locale/boundary/types.hpp&gt;</span>
+<a name="l00012"></a>00012 <span class="preprocessor">#include &lt;boost/locale/boundary/facets.hpp&gt;</span>
+<a name="l00013"></a>00013 <span class="preprocessor">#include &lt;boost/locale/boundary/segment.hpp&gt;</span>
+<a name="l00014"></a>00014 <span class="preprocessor">#include &lt;boost/locale/boundary/boundary_point.hpp&gt;</span>
+<a name="l00015"></a>00015 <span class="preprocessor">#include &lt;boost/locale/boundary/index.hpp&gt;</span>
+<a name="l00016"></a>00016
+<a name="l00017"></a>00017 <span class="preprocessor">#endif</span>
+<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="comment">// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4</span>
+</pre></div></div>
+</div>
+<hr class="footer"/><address class="footer"><small>
+&copy; 2009-2011 Artyom Beilis, Distributed under the Boost Software License, Version 1.0.
+</small></address>
+</body>
+</html>

Added: trunk/libs/locale/doc/html/boundary__point_8hpp_source.html
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/html/boundary__point_8hpp_source.html 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,187 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>Boost.Locale: boost/locale/boundary/boundary_point.hpp Source File</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+<!--
+ Switch the lines for stand alone version
+ <link rel="stylesheet" type="text/css" href="http://www.boost.org/style-v2/section-basic.css">
+-->
+<link rel="stylesheet" type="text/css" href="../style/section-basic.css">
+</head>
+<body>
+<div id="boost-common-heading-doc">
+ <div class="heading-inner">
+ <div class="heading-placard"></div>
+
+ <h1 class="heading-title">
+ <a href="http://www.boost.org/">
+ <!--
+ Switch the lines for stand alone version
+ <img src="http://www.boost.org/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ -->
+ <img src="../style/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ <span class="heading-boost">Boost</span>
+ <span class="heading-cpplibraries">C++ Libraries</span>
+ </a>
+ </h1>
+
+ <p class="heading-quote">
+
+ <q>...one of the most highly
+ regarded and expertly designed C++ library projects in the
+ world.</q>
+
+ <span class="heading-attribution">&mdash; <a href=
+ "http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
+ "http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
+ Alexandrescu</a>, <a href=
+ "http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
+ Coding Standards</a></span>
+ </p>
+ </div>
+</div>
+
+<div id="boost-common-heading-doc-spacer"></div>
+<!-- Generated by Doxygen 1.7.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul class="tablist">
+ <li>Main Page</li>
+ <li>Modules</li>
+ <li>Namespaces</li>
+ <li>Classes</li>
+ <li class="current">Files</li>
+ <li>Examples</li>
+ </ul>
+ </div>
+ <div class="tabs2">
+ <ul class="tablist">
+ <li>File List</li>
+ </ul>
+ </div>
+<div class="header">
+ <div class="headertitle">
+<h1>boost/locale/boundary/boundary_point.hpp</h1> </div>
+</div>
+<div class="contents">
+<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//</span>
+<a name="l00002"></a>00002 <span class="comment">// Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)</span>
+<a name="l00003"></a>00003 <span class="comment">//</span>
+<a name="l00004"></a>00004 <span class="comment">// Distributed under the Boost Software License, Version 1.0. (See</span>
+<a name="l00005"></a>00005 <span class="comment">// accompanying file LICENSE_1_0.txt or copy at</span>
+<a name="l00006"></a>00006 <span class="comment">// http://www.boost.org/LICENSE_1_0.txt)</span>
+<a name="l00007"></a>00007 <span class="comment">//</span>
+<a name="l00008"></a>00008 <span class="preprocessor">#ifndef BOOST_LOCALE_BOUNDARY_BOUNDARY_POINT_HPP_INCLUDED</span>
+<a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#define BOOST_LOCALE_BOUNDARY_BOUNDARY_POINT_HPP_INCLUDED</span>
+<a name="l00010"></a>00010 <span class="preprocessor"></span>
+<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;boost/locale/boundary/types.hpp&gt;</span>
+<a name="l00012"></a>00012
+<a name="l00013"></a>00013 <span class="keyword">namespace </span>boost {
+<a name="l00014"></a>00014 <span class="keyword">namespace </span>locale {
+<a name="l00015"></a><a class="code" href="namespaceboost_1_1locale_1_1boundary.html">00015</a> <span class="keyword">namespace </span>boundary {
+<a name="l00016"></a>00016
+<a name="l00020"></a>00020
+<a name="l00047"></a>00047 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> IteratorType&gt;
+<a name="l00048"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">00048</a> <span class="keyword">class </span><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point</a> {
+<a name="l00049"></a>00049 <span class="keyword">public</span>:
+<a name="l00053"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">00053</a> <span class="keyword">typedef</span> IteratorType iterator_type;
+<a name="l00054"></a>00054
+<a name="l00058"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#aabbbee60c2c97ffd95210206a86c9298">00058</a> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#aabbbee60c2c97ffd95210206a86c9298">boundary_point</a>() : rule_(0) {}
+<a name="l00059"></a>00059
+<a name="l00063"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a653a1c0d7480006ff647a656c74521df">00063</a> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#aabbbee60c2c97ffd95210206a86c9298">boundary_point</a>(<a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a> p,<a class="code" href="group__boundary.html#ga25e193c81052ef1795f1b53b46bc2095" title="Flags used with word boundary analysis -- the type of the word, line or sentence boundary found...">rule_type</a> r) :
+<a name="l00064"></a>00064 iterator_(p),
+<a name="l00065"></a>00065 rule_(r)
+<a name="l00066"></a>00066 {
+<a name="l00067"></a>00067 }
+<a name="l00071"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a5ea18137618a1a84ff0b75c3b166c495">00071</a> <span class="keywordtype">void</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af279d5382e1b28c2ce82035c1929ea66">iterator</a>(<a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a> i)
+<a name="l00072"></a>00072 {
+<a name="l00073"></a>00073 iterator_ = i;
+<a name="l00074"></a>00074 }
+<a name="l00078"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a757b28e11c66f9871d3f51fe93a51bdb">00078</a> <span class="keywordtype">void</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a75e2f04f0f7c1065470f722d1f2e004b">rule</a>(<a class="code" href="group__boundary.html#ga25e193c81052ef1795f1b53b46bc2095" title="Flags used with word boundary analysis -- the type of the word, line or sentence boundary found...">rule_type</a> r)
+<a name="l00079"></a>00079 {
+<a name="l00080"></a>00080 rule_ = r;
+<a name="l00081"></a>00081 }
+<a name="l00085"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af279d5382e1b28c2ce82035c1929ea66">00085</a> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af279d5382e1b28c2ce82035c1929ea66">iterator</a>()<span class="keyword"> const </span>
+<a name="l00086"></a>00086 <span class="keyword"> </span>{
+<a name="l00087"></a>00087 <span class="keywordflow">return</span> iterator_;
+<a name="l00088"></a>00088 }
+<a name="l00092"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a75e2f04f0f7c1065470f722d1f2e004b">00092</a> <a class="code" href="group__boundary.html#ga25e193c81052ef1795f1b53b46bc2095" title="Flags used with word boundary analysis -- the type of the word, line or sentence boundary found...">rule_type</a> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a75e2f04f0f7c1065470f722d1f2e004b">rule</a>()<span class="keyword"> const</span>
+<a name="l00093"></a>00093 <span class="keyword"> </span>{
+<a name="l00094"></a>00094 <span class="keywordflow">return</span> rule_;
+<a name="l00095"></a>00095 }
+<a name="l00099"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a058ffbcbd43fc41a40a4a1cf5be987f2">00099</a> <span class="keywordtype">bool</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a058ffbcbd43fc41a40a4a1cf5be987f2">operator==</a>(<a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point</a> <span class="keyword">const</span> &amp;other)<span class="keyword"> const</span>
+<a name="l00100"></a>00100 <span class="keyword"> </span>{
+<a name="l00101"></a>00101 <span class="keywordflow">return</span> iterator_ == other.iterator_ &amp;&amp; rule_ = other.rule_;
+<a name="l00102"></a>00102 }
+<a name="l00106"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a4347b22dd7edb8af49d1316a6f86d0c2">00106</a> <span class="keywordtype">bool</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a4347b22dd7edb8af49d1316a6f86d0c2">operator!=</a>(<a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point</a> <span class="keyword">const</span> &amp;other)<span class="keyword"> const</span>
+<a name="l00107"></a>00107 <span class="keyword"> </span>{
+<a name="l00108"></a>00108 <span class="keywordflow">return</span> !(*<span class="keyword">this</span>==other);
+<a name="l00109"></a>00109 }
+<a name="l00113"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a87a96a1745184ff7495db87943aca424">00113</a> <span class="keywordtype">bool</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a058ffbcbd43fc41a40a4a1cf5be987f2">operator==</a>(<a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a> <span class="keyword">const</span> &amp;other)<span class="keyword"> const</span>
+<a name="l00114"></a>00114 <span class="keyword"> </span>{
+<a name="l00115"></a>00115 <span class="keywordflow">return</span> iterator_ == other;
+<a name="l00116"></a>00116 }
+<a name="l00120"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a4cd03f39d75bb054be9a0ae23189fa7a">00120</a> <span class="keywordtype">bool</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a4347b22dd7edb8af49d1316a6f86d0c2">operator!=</a>(<a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a> <span class="keyword">const</span> &amp;other)<span class="keyword"> const</span>
+<a name="l00121"></a>00121 <span class="keyword"> </span>{
+<a name="l00122"></a>00122 <span class="keywordflow">return</span> iterator_ != other;
+<a name="l00123"></a>00123 }
+<a name="l00124"></a>00124
+<a name="l00128"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#aa2dc88b4d02151aea939a01b7fc88730">00128</a> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#aa2dc88b4d02151aea939a01b7fc88730">operator iterator_type </a>()<span class="keyword">const</span>
+<a name="l00129"></a>00129 <span class="keyword"> </span>{
+<a name="l00130"></a>00130 <span class="keywordflow">return</span> iterator_;
+<a name="l00131"></a>00131 }
+<a name="l00132"></a>00132
+<a name="l00133"></a>00133 <span class="keyword">private</span>:
+<a name="l00134"></a>00134 <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a> iterator_;
+<a name="l00135"></a>00135 <a class="code" href="group__boundary.html#ga25e193c81052ef1795f1b53b46bc2095" title="Flags used with word boundary analysis -- the type of the word, line or sentence boundary found...">rule_type</a> rule_;
+<a name="l00136"></a>00136
+<a name="l00137"></a>00137 };
+<a name="l00141"></a>00141 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> BaseIterator&gt;
+<a name="l00142"></a><a class="code" href="group__boundary.html#ga43283ecda927605b1b802a3c3306bfb1">00142</a> <span class="keywordtype">bool</span> <a class="code" href="group__boundary.html#ga43283ecda927605b1b802a3c3306bfb1">operator==</a>(BaseIterator <span class="keyword">const</span> &amp;l,<a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point&lt;BaseIterator&gt;</a> <span class="keyword">const</span> &amp;r)
+<a name="l00143"></a>00143 {
+<a name="l00144"></a>00144 <span class="keywordflow">return</span> r==l;
+<a name="l00145"></a>00145 }
+<a name="l00149"></a>00149 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> BaseIterator&gt;
+<a name="l00150"></a><a class="code" href="group__boundary.html#ga11ff477ceecc7cbc274d998c3676126e">00150</a> <span class="keywordtype">bool</span> <a class="code" href="group__boundary.html#ga11ff477ceecc7cbc274d998c3676126e">operator!=</a>(BaseIterator <span class="keyword">const</span> &amp;l,<a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point&lt;BaseIterator&gt;</a> <span class="keyword">const</span> &amp;r)
+<a name="l00151"></a>00151 {
+<a name="l00152"></a>00152 <span class="keywordflow">return</span> r!=l;
+<a name="l00153"></a>00153 }
+<a name="l00154"></a>00154
+<a name="l00156"></a>00156
+<a name="l00157"></a><a class="code" href="namespaceboost_1_1locale_1_1boundary.html#ae8869288e9cc33aa283078654ef0dae2">00157</a> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point&lt;std::string::const_iterator&gt;</a> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">sboundary_point</a>;
+<a name="l00158"></a><a class="code" href="namespaceboost_1_1locale_1_1boundary.html#a7828f6884b8a654b9b14fc1ab96ce0d9">00158</a> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point&lt;std::wstring::const_iterator&gt;</a> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">wsboundary_point</a>;
+<a name="l00159"></a>00159 <span class="preprocessor"> #ifdef BOOST_HAS_CHAR16_T</span>
+<a name="l00160"></a><a class="code" href="namespaceboost_1_1locale_1_1boundary.html#a64be9f4ec7ff991f73fc793a80f1fadc">00160</a> <span class="preprocessor"></span> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point&lt;std::u16string::const_iterator&gt;</a> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">u16sboundary_point</a>;
+<a name="l00161"></a>00161 <span class="preprocessor"> #endif</span>
+<a name="l00162"></a>00162 <span class="preprocessor"></span><span class="preprocessor"> #ifdef BOOST_HAS_CHAR32_T</span>
+<a name="l00163"></a><a class="code" href="namespaceboost_1_1locale_1_1boundary.html#a9eb3d6aa912102a115dc6ff80fe9c22d">00163</a> <span class="preprocessor"></span> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point&lt;std::u32string::const_iterator&gt;</a> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">u32sboundary_point</a>;
+<a name="l00164"></a>00164 <span class="preprocessor"> #endif</span>
+<a name="l00165"></a>00165 <span class="preprocessor"></span>
+<a name="l00166"></a><a class="code" href="namespaceboost_1_1locale_1_1boundary.html#ade880ec8623692375afbfd460d28163c">00166</a> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point&lt;char const *&gt;</a> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">cboundary_point</a>;
+<a name="l00167"></a><a class="code" href="namespaceboost_1_1locale_1_1boundary.html#a1c06a716653700b74922e4cc9df0da1b">00167</a> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point&lt;wchar_t const *&gt;</a> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">wcboundary_point</a>;
+<a name="l00168"></a>00168 <span class="preprocessor"> #ifdef BOOST_HAS_CHAR16_T</span>
+<a name="l00169"></a><a class="code" href="namespaceboost_1_1locale_1_1boundary.html#a79a665091fadab07227c0b129ddcde9d">00169</a> <span class="preprocessor"></span> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point&lt;char16_t const *&gt;</a> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">u16cboundary_point</a>;
+<a name="l00170"></a>00170 <span class="preprocessor"> #endif</span>
+<a name="l00171"></a>00171 <span class="preprocessor"></span><span class="preprocessor"> #ifdef BOOST_HAS_CHAR32_T</span>
+<a name="l00172"></a><a class="code" href="namespaceboost_1_1locale_1_1boundary.html#aaa106d43f8b06fec14964e19c55356fb">00172</a> <span class="preprocessor"></span> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point&lt;char32_t const *&gt;</a> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">u32cboundary_point</a>;
+<a name="l00173"></a>00173 <span class="preprocessor"> #endif</span>
+<a name="l00174"></a>00174 <span class="preprocessor"></span>
+<a name="l00175"></a>00175
+<a name="l00176"></a>00176 } <span class="comment">// boundary</span>
+<a name="l00177"></a>00177 } <span class="comment">// locale</span>
+<a name="l00178"></a>00178 } <span class="comment">// boost</span>
+<a name="l00179"></a>00179
+<a name="l00180"></a>00180
+<a name="l00181"></a>00181 <span class="preprocessor">#endif</span>
+<a name="l00182"></a>00182 <span class="preprocessor"></span>
+<a name="l00183"></a>00183 <span class="comment">// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4</span>
+</pre></div></div>
+</div>
+<hr class="footer"/><address class="footer"><small>
+&copy; 2009-2011 Artyom Beilis, Distributed under the Boost Software License, Version 1.0.
+</small></address>
+</body>
+</html>

Added: trunk/libs/locale/doc/html/boundary_analysys.html
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/html/boundary_analysys.html 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,386 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>Boost.Locale: Boundary analysis</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+<!--
+ Switch the lines for stand alone version
+ <link rel="stylesheet" type="text/css" href="http://www.boost.org/style-v2/section-basic.css">
+-->
+<link rel="stylesheet" type="text/css" href="../style/section-basic.css">
+</head>
+<body>
+<div id="boost-common-heading-doc">
+ <div class="heading-inner">
+ <div class="heading-placard"></div>
+
+ <h1 class="heading-title">
+ <a href="http://www.boost.org/">
+ <!--
+ Switch the lines for stand alone version
+ <img src="http://www.boost.org/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ -->
+ <img src="../style/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ <span class="heading-boost">Boost</span>
+ <span class="heading-cpplibraries">C++ Libraries</span>
+ </a>
+ </h1>
+
+ <p class="heading-quote">
+
+ <q>...one of the most highly
+ regarded and expertly designed C++ library projects in the
+ world.</q>
+
+ <span class="heading-attribution">&mdash; <a href=
+ "http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
+ "http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
+ Alexandrescu</a>, <a href=
+ "http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
+ Coding Standards</a></span>
+ </p>
+ </div>
+</div>
+
+<div id="boost-common-heading-doc-spacer"></div>
+<!-- Generated by Doxygen 1.7.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul class="tablist">
+ <li>Main Page</li>
+ <li>Modules</li>
+ <li>Namespaces</li>
+ <li>Classes</li>
+ <li>Files</li>
+ <li>Examples</li>
+ </ul>
+ </div>
+ <div class="navpath">
+ <ul>
+ <li><a class="el" href="main.html">Boost.Locale</a> </li>
+ <li><a class="el" href="using_boost_locale.html">Using Boost.Locale</a> </li>
+ </ul>
+ </div>
+</div>
+<div class="header">
+ <div class="headertitle">
+<h1>Boundary analysis </h1> </div>
+</div>
+<div class="contents">
+<ul>
+<li><a class="el" href="boundary_analysys.html#boundary_analysys_basics">Basics</a></li>
+<li><a class="el" href="boundary_analysys.html#boundary_analysys_segments">Iterating Over Segments</a><ul>
+<li><a class="el" href="boundary_analysys.html#boundary_analysys_segments_basics">Basic Iteration</a></li>
+<li><a class="el" href="boundary_analysys.html#boundary_analysys_segments_rules">Using Rules</a></li>
+<li><a class="el" href="boundary_analysys.html#boundary_analysys_segments_search">Locating Segments</a></li>
+</ul>
+</li>
+<li><a class="el" href="boundary_analysys.html#boundary_analysys_break">Iterating Over Boundary Points</a><ul>
+<li><a class="el" href="boundary_analysys.html#boundary_analysys_break_basics">Basic Iteration</a></li>
+<li><a class="el" href="boundary_analysys.html#boundary_analysys_break_rules">Using Rules</a></li>
+<li><a class="el" href="boundary_analysys.html#boundary_analysys_break_search">Locating Boundary Points</a></li>
+</ul>
+</li>
+</ul>
+<h2><a class="anchor" id="boundary_analysys_basics"></a>
+Basics</h2>
+<p>Boost.Locale provides a boundary analysis tool, allowing you to split text into characters, words, or sentences, and find appropriate places for line breaks.</p>
+<dl class="note"><dt><b>Note:</b></dt><dd>This task is not a trivial task. </dd></dl>
+<dl class="user"><dt><b></b></dt><dd>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) </dd></dl>
+<dl class="user"><dt><b></b></dt><dd>Words may not be separated by space characters in some languages like in Japanese or Chinese.</dd></dl>
+<p>Boost.Locale provides 2 major classes for boundary analysis:</p>
+<ul>
+<li><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment__index.html">boost::locale::boundary::segment_index</a> - an object that holds an index of segments in the text (like words, characters, sentences). It provides an access to <a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">segment</a> objects via iterators.</li>
+<li><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boost::locale::boundary::boundary_point_index</a> - an object that holds an index of boundary points in the text. It allows to iterate over the <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boundary_point</a> objects.</li>
+</ul>
+<p>Each of the classes above use an iterator type as template parameter. Both of these classes accept in their constructor:</p>
+<ul>
+<li>A flag that defines boundary analysis <a class="el" href="group__boundary.html#ga15de9963ce9bb6037c8525901dfbf641">boundary_type</a>.</li>
+<li>The pair of iterators that define the text range that should be analysed</li>
+<li>A locale parameter (if not given the global one is used)</li>
+</ul>
+<p>For example: </p>
+<div class="fragment"><pre class="fragment"><span class="keyword">namespace </span>ba=boost::locale::boundary;
+std::string text= ... ;
+std::locale loc = ... ;
+ba::segment_index&lt;std::string::const_iterator&gt; map(<a class="code" href="group__boundary.html#gga15de9963ce9bb6037c8525901dfbf641a99aad8b8a5e25baa9f695abe5e574bb6" title="Analyse the text for word boundaries.">ba::word</a>,text.begin(),text.end(),loc);
+</pre></div><p>Each of them provide a members <code>begin()</code>, <code>end()</code> and <code>find()</code> 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.</p>
+<p>Convenience a typedefs like <a class="el" href="group__boundary.html#gad4785439a3f03ee455c93830b8f1366c">ssegment_index</a> or <a class="el" href="group__boundary.html#gabcb5bcc788909afeb8c68d857284cb59">wcboundary_point_index</a> provided as well, where "w", "u16" and "u32" prefixes define a character type <code>wchar_t</code>, <code>char16_t</code> and <code>char32_t</code> and "c" and "s" prefixes define whether <code>std::basic_string&lt;CharType&gt;::const_iterator</code> or <code>CharType const *</code> are used.</p>
+<h2><a class="anchor" id="boundary_analysys_segments"></a>
+Iterating Over Segments</h2>
+<h2><a class="anchor" id="boundary_analysys_segments_basics"></a>
+Basic Iteration</h2>
+<p>The text segments analysis is done using <a class="el" href="classboost_1_1locale_1_1boundary_1_1segment__index.html">segment_index</a> class.</p>
+<p>It provides a bidirectional iterator that returns <a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">segment</a> 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 <code>std::basic_string</code> object.</p>
+<p>To perform boundary analysis, we first create an index object and then iterate over it:</p>
+<p>For example:</p>
+<div class="fragment"><pre class="fragment"><span class="keyword">using namespace </span>boost::locale::boundary;
+<a class="code" href="classboost_1_1locale_1_1generator.html" title="the major class used for locale generation">boost::locale::generator</a> gen;
+std::string text=<span class="stringliteral">&quot;To be or not to be, that is the question.&quot;</span>
+<span class="comment">// Create mapping of text for token iterator using global locale.</span>
+<a class="code" href="group__boundary.html#gad4785439a3f03ee455c93830b8f1366c">ssegment_index</a> map(<a class="code" href="group__boundary.html#gga15de9963ce9bb6037c8525901dfbf641a99aad8b8a5e25baa9f695abe5e574bb6" title="Analyse the text for word boundaries.">word</a>,text.begin(),text.end(),gen(<span class="stringliteral">&quot;en_US.UTF-8&quot;</span>));
+<span class="comment">// Print all &quot;words&quot; -- chunks of word boundary</span>
+<span class="keywordflow">for</span>(<a class="code" href="group__boundary.html#gaf7a775e77dbbca3495e11d646df96fd2">ssegment_index::iterator</a> it=map.begin(),e=map.end();it!=e;++it)
+ std::cout &lt;&lt;<span class="stringliteral">&quot;\&quot;&quot;</span>&lt;&lt; * it &lt;&lt; <span class="stringliteral">&quot;\&quot;, &quot;</span>;
+std::cout &lt;&lt; std::endl;
+</pre></div><p>Would print:</p>
+<div class="fragment"><pre class="fragment">
+"To", " ", "be", " ", "or", " ", "not", " ", "to", " ", "be", ",", " ", "that", " ", "is", " ", "the", " ", "question", ".",
+</pre></div><p>This sentence "生きるか死ぬか、それが問題だ。" (from Tatoeba database) would be split into following segments in <code>ja_JP.UTF-8</code> (Japanese) locale:</p>
+<div class="fragment"><pre class="fragment">
+"生", "きるか", "死", "ぬか", "、", "それが", "問題", "だ", "。",
+</pre></div><p>The boundary analysis that is done by Boost.Locale is much more complicated then just splitting the text according to white space characters.</p>
+<p>Of course it may be not per</p>
+<h2><a class="anchor" id="boundary_analysys_segments_rules"></a>
+Using Rules</h2>
+<p>The segments selection can be customized using <a class="el" href="group__boundary.html#gad19735180401edb15acbdbbeb21e5a73">rule()</a> and <a class="el" href="group__boundary.html#ga205fd51daa439a18527675e663a0802f">full_select()</a> member functions.</p>
+<p>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.</p>
+<p>Using a <code>rule()</code> member function we can specify a binary mask of rules we want to use for selection of the boundary points using <a class="el" href="group__boundary.html#bl_boundary_word_rules">word</a>, <a class="el" href="group__boundary.html#bl_boundary_line_rules">line</a> and <a class="el" href="group__boundary.html#bl_boundary_sentence_rules">sentence</a> boundary rules.</p>
+<p>For example, by calling</p>
+<div class="fragment"><pre class="fragment">map.rule(<a class="code" href="group__boundary.html#ga3ab98808dbb1cc4a346dcc2554c9d8dc" title="Any word including numbers, 0 is special flag, equivalent to 15.">word_any</a>);
+</pre></div><p>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.</p>
+<p>So the code:</p>
+<div class="fragment"><pre class="fragment"><span class="keyword">using namespace </span>boost::locale::boundary;
+std::string text=<span class="stringliteral">&quot;To be or not to be, that is the question.&quot;</span>
+<span class="comment">// Create mapping of text for token iterator using global locale.</span>
+<a class="code" href="group__boundary.html#gad4785439a3f03ee455c93830b8f1366c">ssegment_index</a> map(<a class="code" href="group__boundary.html#gga15de9963ce9bb6037c8525901dfbf641a99aad8b8a5e25baa9f695abe5e574bb6" title="Analyse the text for word boundaries.">word</a>,text.begin(),text.end());
+<span class="comment">// Define a rule</span>
+map.rule(<a class="code" href="group__boundary.html#ga3ab98808dbb1cc4a346dcc2554c9d8dc" title="Any word including numbers, 0 is special flag, equivalent to 15.">word_any</a>);
+<span class="comment">// Print all &quot;words&quot; -- chunks of word boundary</span>
+<span class="keywordflow">for</span>(<a class="code" href="group__boundary.html#gaf7a775e77dbbca3495e11d646df96fd2">ssegment_index::iterator</a> it=map.begin(),e=map.end();it!=e;++it)
+ std::cout &lt;&lt;<span class="stringliteral">&quot;\&quot;&quot;</span>&lt;&lt; * it &lt;&lt; <span class="stringliteral">&quot;\&quot;, &quot;</span>;
+std::cout &lt;&lt; std::endl;
+</pre></div><p>Would print:</p>
+<div class="fragment"><pre class="fragment">
+"To", "be", "or", "not", "to", "be", "that", "is", "the", "question",
+</pre></div><p>And the for given text="生きるか死ぬか、それが問題だ。" and rule(<a class="el" href="group__boundary.html#ga705ab96f9e62810c8ed977c90d404ef8">word_ideo</a>), the example above would print.</p>
+<div class="fragment"><pre class="fragment">
+"生", "死", "問題",
+</pre></div><p>You can access specific rules the segments where selected it using <a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#a5b36a522d7013306617dbcccc9919343">segment::rule()</a> member function. Using a bit-mask of rules.</p>
+<p>For example:</p>
+<div class="fragment"><pre class="fragment"><a class="code" href="classboost_1_1locale_1_1generator.html" title="the major class used for locale generation">boost::locale::generator</a> gen;
+<span class="keyword">using namespace </span>boost::locale::boundary;
+std::string text=<span class="stringliteral">&quot;生きるか死ぬか、それが問題だ。&quot;</span>;
+<a class="code" href="group__boundary.html#gad4785439a3f03ee455c93830b8f1366c">ssegment_index</a> map(<a class="code" href="group__boundary.html#gga15de9963ce9bb6037c8525901dfbf641a99aad8b8a5e25baa9f695abe5e574bb6" title="Analyse the text for word boundaries.">word</a>,text.begin(),text.end(),gen(<span class="stringliteral">&quot;ja_JP.UTF-8&quot;</span>));
+<span class="keywordflow">for</span>(<a class="code" href="group__boundary.html#gaf7a775e77dbbca3495e11d646df96fd2">ssegment_index::iterator</a> it=map.begin(),e=map.end();it!=e;++it) {
+ std::cout &lt;&lt; <span class="stringliteral">&quot;Segment &quot;</span> &lt;&lt; *it &lt;&lt; <span class="stringliteral">&quot; contains: &quot;</span>;
+ <span class="keywordflow">if</span>(it-&gt;rule() &amp; <a class="code" href="group__boundary.html#ga90cf4f01b95658f659685377226677e7" title="Not a word, like white space or punctuation mark.">word_none</a>)
+ std::cout &lt;&lt; <span class="stringliteral">&quot;white space or punctuation marks &quot;</span>;
+ <span class="keywordflow">if</span>(it-&gt;rule() &amp; <a class="code" href="group__boundary.html#ga52d8c63e1f3f8c898c645352206a78ef" title="Word that contains kana characters.">word_kana</a>)
+ std::cout &lt;&lt; <span class="stringliteral">&quot;kana characters &quot;</span>;
+ <span class="keywordflow">if</span>(it-&gt;rule() &amp; <a class="code" href="group__boundary.html#ga705ab96f9e62810c8ed977c90d404ef8" title="Word that contains ideographic characters.">word_ideo</a>)
+ std::cout &lt;&lt; <span class="stringliteral">&quot;ideographic characters&quot;</span>;
+ std::cout&lt;&lt; std::endl;
+}
+</pre></div><p>Would print</p>
+<div class="fragment"><pre class="fragment">
+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
+</pre></div><p>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.</p>
+<p>In some cases it may be not what we actually look like.</p>
+<p>For example we have a text:</p>
+<div class="fragment"><pre class="fragment">
+Hello! How
+are you?
+</pre></div><p>And we want to fetch all sentences from the text.</p>
+<p>The <a class="el" href="group__boundary.html#bl_boundary_sentence_rules">sentence rules</a> have two options:</p>
+<ul>
+<li>Split the text on the point where sentence terminator like ".!?" detected: <a class="el" href="group__boundary.html#ga3befefe67f79691c117bf5588741355b">sentence_term</a></li>
+<li>Split the text on the point where sentence separator like "line feed" detected: <a class="el" href="group__boundary.html#gaf67883341dd3d8f786e7281d40790000">sentence_sep</a></li>
+</ul>
+<p>Naturally to ignore sentence separators we would call <a class="el" href="group__boundary.html#gad19735180401edb15acbdbbeb21e5a73">segment_index::rule(rule_type v)</a> with sentence_term parameter and then run the iterator.</p>
+<div class="fragment"><pre class="fragment"><a class="code" href="classboost_1_1locale_1_1generator.html" title="the major class used for locale generation">boost::locale::generator</a> gen;
+<span class="keyword">using namespace </span>boost::locale::boundary;
+std::string text= <span class="stringliteral">&quot;Hello! How\n&quot;</span>
+ <span class="stringliteral">&quot;are you?\n&quot;</span>;
+<a class="code" href="group__boundary.html#gad4785439a3f03ee455c93830b8f1366c">ssegment_index</a> map(<a class="code" href="group__boundary.html#gga15de9963ce9bb6037c8525901dfbf641a88aa1509eace7589f5df87d4694871e9" title="Analyse the text for Find sentence boundaries.">sentence</a>,text.begin(),text.end(),gen(<span class="stringliteral">&quot;en_US.UTF-8&quot;</span>));
+map.rule(<a class="code" href="group__boundary.html#ga3befefe67f79691c117bf5588741355b" title="The sentence was terminated with a sentence terminator like &amp;quot;.&amp;quot;, &amp;quot;!&amp;quot; possible fol...">sentence_term</a>);
+<span class="keywordflow">for</span>(<a class="code" href="group__boundary.html#gaf7a775e77dbbca3495e11d646df96fd2">ssegment_index::iterator</a> it=map.begin(),e=map.end();it!=e;++it)
+ std::cout &lt;&lt; <span class="stringliteral">&quot;Sentence [&quot;</span> &lt;&lt; *it &lt;&lt; <span class="stringliteral">&quot;]&quot;</span> &lt;&lt; std::endl;
+</pre></div><p>However we would get the expected segments: </p>
+<div class="fragment"><pre class="fragment">
+Sentence [Hello! ]
+Sentence [are you?
+]
+</pre></div><p>The reason is that "How\n" is still considered a sentence but selected by different rule.</p>
+<p>This behavior can be changed by setting <a class="el" href="group__boundary.html#ga205fd51daa439a18527675e663a0802f">segment_index::full_select(bool)</a> to <code>true</code>. It would force iterator to join the current segment with all previous segments that may not fit the required rule.</p>
+<p>So we add this line:</p>
+<div class="fragment"><pre class="fragment">map.full_select(<span class="keyword">true</span>);
+</pre></div><p>Right after "map.rule(sentence_term);" and get expected output:</p>
+<div class="fragment"><pre class="fragment">
+Sentence [Hello! ]
+Sentence [How
+are you?
+]
+</pre></div><h3><a class="anchor" id="boundary_analysys_segments_search"></a>
+Locating Segments</h3>
+<p>Sometimes it is useful to find a segment that some specific iterator is pointing on.</p>
+<p>For example a user had clicked at specific point, we want to select a word on this location.</p>
+<p><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment__index.html">segment_index</a> provides <a class="el" href="group__boundary.html#ga2480236106971797460187777f2a4411">find(base_iterator p)</a> member function for this purpose.</p>
+<p>This function returns the iterator to the segmet such that <em>p</em> points to.</p>
+<p>For example:</p>
+<div class="fragment"><pre class="fragment">text=<span class="stringliteral">&quot;to be or &quot;</span>;
+<a class="code" href="group__boundary.html#gad4785439a3f03ee455c93830b8f1366c">ssegment_index</a> map(<a class="code" href="group__boundary.html#gga15de9963ce9bb6037c8525901dfbf641a99aad8b8a5e25baa9f695abe5e574bb6" title="Analyse the text for word boundaries.">word</a>,text.begin(),text.end(),gen(<span class="stringliteral">&quot;en_US.UTF-8&quot;</span>));
+ssegment_index::iterator p = map.find(text.begin() + 4);
+<span class="keywordflow">if</span>(p!=map.end())
+ std::cout &lt;&lt; *p &lt;&lt; std::endl;
+</pre></div><p>Would print:</p>
+<div class="fragment"><pre class="fragment">
+be
+</pre></div><dl class="note"><dt><b>Note:</b></dt><dd></dd></dl>
+<p>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.</p>
+<p>For example: For <a class="el" href="group__boundary.html#gga15de9963ce9bb6037c8525901dfbf641a99aad8b8a5e25baa9f695abe5e574bb6">word</a> boundary analysis with <a class="el" href="group__boundary.html#ga3ab98808dbb1cc4a346dcc2554c9d8dc">word_any</a> rule:</p>
+<ul>
+<li>"t|o be or ", would point to "to" - the iterator in the middle of segment "to".</li>
+<li>"to |be or ", would point to "be" - the iterator at the beginning of the segment "be"</li>
+<li>"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".</li>
+<li>"to be or| ", would point to end as not valid segment found.</li>
+</ul>
+<h2><a class="anchor" id="boundary_analysys_break"></a>
+Iterating Over Boundary Points</h2>
+<h2><a class="anchor" id="boundary_analysys_break_basics"></a>
+Basic Iteration</h2>
+<p>The <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boundary_point_index</a> is similar to <a class="el" href="classboost_1_1locale_1_1boundary_1_1segment__index.html">segment_index</a> in its interface but as a different role. Instead of returning text chunks (<a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">segment</a>s, it returns <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boundary_point</a> object that represents a position in text - a base iterator used that is used for iteration of the source text C++ characters. The <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boundary_point</a> object also provides a <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a757b28e11c66f9871d3f51fe93a51bdb">rule()</a> member function that defines a rule this boundary was selected according to.</p>
+<dl class="note"><dt><b>Note:</b></dt><dd>The beginning and the ending of the text are considered boundary points, so even an empty text consists of at least one boundary point.</dd></dl>
+<p>Lets see an example of selecting first two sentences from a text:</p>
+<div class="fragment"><pre class="fragment"><span class="keyword">using namespace </span>boost::locale::boundary;
+<a class="code" href="classboost_1_1locale_1_1generator.html" title="the major class used for locale generation">boost::locale::generator</a> gen;
+
+<span class="comment">// our text sample</span>
+std::string <span class="keyword">const</span> text=<span class="stringliteral">&quot;First sentence. Second sentence! Third one?&quot;</span>;
+<span class="comment">// Create an index </span>
+<a class="code" href="group__boundary.html#ga485e82cdd9debd15dc4fd6f57be10727" title="convenience typedef">sboundary_point_index</a> map(<a class="code" href="group__boundary.html#gga15de9963ce9bb6037c8525901dfbf641a88aa1509eace7589f5df87d4694871e9" title="Analyse the text for Find sentence boundaries.">sentence</a>,text.begin(),text.end(),gen(<span class="stringliteral">&quot;en_US.UTF-8&quot;</span>));
+
+<span class="comment">// Count two boundary points</span>
+<a class="code" href="group__boundary.html#ga1af6e72b3c384edcebc0cf319fe97efe">sboundary_point_index::iterator</a> p = map.begin(),e=map.end();
+<span class="keywordtype">int</span> count = 0;
+<span class="keywordflow">while</span>(p!=e &amp;&amp; count &lt; 2) {
+ ++count;
+ ++p;
+}
+
+<span class="keywordflow">if</span>(p!=e) {
+ std::cout &lt;&lt; <span class="stringliteral">&quot;First two sentences are: &quot;</span>
+ &lt;&lt; std::string(text.begin(),p-&gt;iterator())
+ &lt;&lt; std::endl;
+}
+<span class="keywordflow">else</span> {
+ std::cout &lt;&lt;<span class="stringliteral">&quot;There are less then two sentences in this &quot;</span>
+ &lt;&lt;<span class="stringliteral">&quot;text: &quot;</span> &lt;&lt; text &lt;&lt; std::endl;
+}
+</pre></div><p>Would print:</p>
+<div class="fragment"><pre class="fragment">
+First two sentences are: First sentence. Second sentence!
+</pre></div><h2><a class="anchor" id="boundary_analysys_break_rules"></a>
+Using Rules</h2>
+<p>Similarly to the <a class="el" href="classboost_1_1locale_1_1boundary_1_1segment__index.html">segment_index</a> the <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boundary_point_index</a> provides a <a class="el" href="group__boundary.html#ga56e63913f51109e05a24a7136472a975">rule(rule_type mask)</a> member function to filter boundary points that interest us.</p>
+<p>It allows to set <a class="el" href="group__boundary.html#bl_boundary_word_rules">word</a>, <a class="el" href="group__boundary.html#bl_boundary_line_rules">line</a> and <a class="el" href="group__boundary.html#bl_boundary_sentence_rules">sentence</a> rules for filtering boundary points.</p>
+<p>Lets change an example above a little:</p>
+<div class="fragment"><pre class="fragment"><span class="comment">// our text sample</span>
+std::string <span class="keyword">const</span> text= <span class="stringliteral">&quot;First sentence. Second\n&quot;</span>
+ <span class="stringliteral">&quot;sentence! Third one?&quot;</span>;
+</pre></div><p>If we run our program as is on the sample above we would get: </p>
+<div class="fragment"><pre class="fragment">
+First two sentences are: First sentence. Second
+</pre></div><p>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".</p>
+<p>However, we can set set a rule <a class="el" href="group__boundary.html#ga3befefe67f79691c117bf5588741355b">sentence_term</a> and the iterator would use only boundary points that are created by a sentence terminators like ".!?".</p>
+<p>So by adding: </p>
+<div class="fragment"><pre class="fragment">map.rule(<a class="code" href="group__boundary.html#ga3befefe67f79691c117bf5588741355b" title="The sentence was terminated with a sentence terminator like &amp;quot;.&amp;quot;, &amp;quot;!&amp;quot; possible fol...">sentence_term</a>);
+</pre></div><p>Right after the generation of the index we would get the desired output:</p>
+<div class="fragment"><pre class="fragment">
+First two sentences are: First sentence. Second
+sentence!
+</pre></div><p>You can also use <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a757b28e11c66f9871d3f51fe93a51bdb">boundary_point::rule()</a> member function to learn about the reason this boundary point was created by comparing it with an appropriate mask.</p>
+<p>For example:</p>
+<div class="fragment"><pre class="fragment"><span class="keyword">using namespace </span>boost::locale::boundary;
+<a class="code" href="classboost_1_1locale_1_1generator.html" title="the major class used for locale generation">boost::locale::generator</a> gen;
+<span class="comment">// our text sample</span>
+std::string <span class="keyword">const</span> text= <span class="stringliteral">&quot;First sentence. Second\n&quot;</span>
+ <span class="stringliteral">&quot;sentence! Third one?&quot;</span>;
+<a class="code" href="group__boundary.html#ga485e82cdd9debd15dc4fd6f57be10727" title="convenience typedef">sboundary_point_index</a> map(<a class="code" href="group__boundary.html#gga15de9963ce9bb6037c8525901dfbf641a88aa1509eace7589f5df87d4694871e9" title="Analyse the text for Find sentence boundaries.">sentence</a>,text.begin(),text.end(),gen(<span class="stringliteral">&quot;en_US.UTF-8&quot;</span>));
+
+<span class="keywordflow">for</span>(<a class="code" href="group__boundary.html#ga1af6e72b3c384edcebc0cf319fe97efe">sboundary_point_index::iterator</a> p = map.begin(),e=map.end();p!=e;++p) {
+ <span class="keywordflow">if</span>(p-&gt;rule() &amp; <a class="code" href="group__boundary.html#ga3befefe67f79691c117bf5588741355b" title="The sentence was terminated with a sentence terminator like &amp;quot;.&amp;quot;, &amp;quot;!&amp;quot; possible fol...">sentence_term</a>)
+ std::cout &lt;&lt; <span class="stringliteral">&quot;There is a sentence terminator: &quot;</span>;
+ <span class="keywordflow">else</span> <span class="keywordflow">if</span>(p-&gt;rule() &amp; <a class="code" href="group__boundary.html#gaf67883341dd3d8f786e7281d40790000" title="The sentence does not contain terminator like &amp;quot;.&amp;quot;, &amp;quot;!&amp;quot; but ended with hard separa...">sentence_sep</a>)
+ std::cout &lt;&lt; <span class="stringliteral">&quot;There is a sentence separator: &quot;</span>;
+ <span class="keywordflow">if</span>(p-&gt;rule()!=0) <span class="comment">// print if some rule exists</span>
+ std::cout &lt;&lt; <span class="stringliteral">&quot;[&quot;</span> &lt;&lt; std::string(text.begin(),p-&gt;iterator())
+ &lt;&lt; <span class="stringliteral">&quot;|&quot;</span> &lt;&lt; std::string(p-&gt;iterator(),text.end())
+ &lt;&lt; <span class="stringliteral">&quot;]\n&quot;</span>;
+}
+</pre></div><p>Would give the following output: </p>
+<div class="fragment"><pre class="fragment">
+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?|]
+</pre></div><h3><a class="anchor" id="boundary_analysys_break_search"></a>
+Locating Boundary Points</h3>
+<p>Sometimes it is useful to find a specific boundary point according to given iterator.</p>
+<p><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boundary_point_index</a> provides a <a class="el" href="group__boundary.html#ga0bb71a287afca990e85b17246568492d">iterator find(base_iterator p)</a> member function.</p>
+<p>It would return an iterator to a boundary point on <em>p's</em> location or at the location following it if <em>p</em> does not point to appropriate position.</p>
+<p>For example, for word boundary analysis:</p>
+<ul>
+<li>If a base iterator points to "to |be", then the returned boundary point would be "to |be" (same position)</li>
+<li>If a base iterator points to "t|o be", then the returned boundary point would be "to| be" (next valid position)</li>
+</ul>
+<p>For example if we want to select 6 words around specific boundary point we can use following code:</p>
+<div class="fragment"><pre class="fragment"><span class="keyword">using namespace </span>boost::locale::boundary;
+<a class="code" href="classboost_1_1locale_1_1generator.html" title="the major class used for locale generation">boost::locale::generator</a> gen;
+<span class="comment">// our text sample</span>
+std::string <span class="keyword">const</span> text= <span class="stringliteral">&quot;To be or not to be, that is the question.&quot;</span>;
+
+<span class="comment">// Create a mapping</span>
+<a class="code" href="group__boundary.html#ga485e82cdd9debd15dc4fd6f57be10727" title="convenience typedef">sboundary_point_index</a> map(<a class="code" href="group__boundary.html#gga15de9963ce9bb6037c8525901dfbf641a99aad8b8a5e25baa9f695abe5e574bb6" title="Analyse the text for word boundaries.">word</a>,text.begin(),text.end(),gen(<span class="stringliteral">&quot;en_US.UTF-8&quot;</span>));
+<span class="comment">// Ignore wite space</span>
+map.rule(<a class="code" href="group__boundary.html#ga3ab98808dbb1cc4a346dcc2554c9d8dc" title="Any word including numbers, 0 is special flag, equivalent to 15.">word_any</a>);
+
+<span class="comment">// define our arbitraty point</span>
+std::string::const_iterator pos = text.begin() + 12; <span class="comment">// &quot;no|t&quot;;</span>
+
+<span class="comment">// Get the search range</span>
+<a class="code" href="group__boundary.html#ga1af6e72b3c384edcebc0cf319fe97efe">sboundary_point_index::iterator</a>
+ begin =map.begin(),
+ end = map.end(),
+ it = map.find(pos); <span class="comment">// find a boundary</span>
+
+<span class="comment">// go 3 words backward</span>
+<span class="keywordflow">for</span>(<span class="keywordtype">int</span> count = 0;count &lt;3 &amp;&amp; it!=begin; count ++)
+ --it;
+
+<span class="comment">// Save the start</span>
+std::string::const_iterator start = *it;
+
+<span class="comment">// go 6 words forward</span>
+<span class="keywordflow">for</span>(<span class="keywordtype">int</span> count = 0;count &lt; 6 &amp;&amp; it!=end; count ++)
+ ++it;
+
+<span class="comment">// make sure we at valid position</span>
+<span class="keywordflow">if</span>(it==end)
+ --it;
+
+<span class="comment">// print the text</span>
+std::cout &lt;&lt; std::string(start,it-&gt;iterator()) &lt;&lt; std::endl;
+</pre></div><p>That would print:</p>
+<div class="fragment"><pre class="fragment">
+ be or not to be, that
+</pre></div> </div>
+<hr class="footer"/><address class="footer"><small>
+&copy; 2009-2011 Artyom Beilis, Distributed under the Boost Software License, Version 1.0.
+</small></address>
+</body>
+</html>

Added: trunk/libs/locale/doc/html/building_boost_locale.html
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/html/building_boost_locale.html 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,228 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>Boost.Locale: Building The library</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+<!--
+ Switch the lines for stand alone version
+ <link rel="stylesheet" type="text/css" href="http://www.boost.org/style-v2/section-basic.css">
+-->
+<link rel="stylesheet" type="text/css" href="../style/section-basic.css">
+</head>
+<body>
+<div id="boost-common-heading-doc">
+ <div class="heading-inner">
+ <div class="heading-placard"></div>
+
+ <h1 class="heading-title">
+ <a href="http://www.boost.org/">
+ <!--
+ Switch the lines for stand alone version
+ <img src="http://www.boost.org/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ -->
+ <img src="../style/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ <span class="heading-boost">Boost</span>
+ <span class="heading-cpplibraries">C++ Libraries</span>
+ </a>
+ </h1>
+
+ <p class="heading-quote">
+
+ <q>...one of the most highly
+ regarded and expertly designed C++ library projects in the
+ world.</q>
+
+ <span class="heading-attribution">&mdash; <a href=
+ "http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
+ "http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
+ Alexandrescu</a>, <a href=
+ "http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
+ Coding Standards</a></span>
+ </p>
+ </div>
+</div>
+
+<div id="boost-common-heading-doc-spacer"></div>
+<!-- Generated by Doxygen 1.7.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul class="tablist">
+ <li>Main Page</li>
+ <li>Modules</li>
+ <li>Namespaces</li>
+ <li>Classes</li>
+ <li>Files</li>
+ <li>Examples</li>
+ </ul>
+ </div>
+ <div class="navpath">
+ <ul>
+ <li><a class="el" href="main.html">Boost.Locale</a> </li>
+ </ul>
+ </div>
+</div>
+<div class="header">
+ <div class="headertitle">
+<h1>Building The library </h1> </div>
+</div>
+<div class="contents">
+<p>Boost.Locale presently supports CMake build system and Boost Build.</p>
+<dl class="note"><dt><b>Note:</b></dt><dd>You need Boost 1.46 and above to use Boost.Build</dd></dl>
+<ul>
+<li><a class="el" href="building_boost_locale.html#building_boost_locale_bb">Building With Boost.Build</a></li>
+<li><a class="el" href="building_boost_locale.html#building_boost_locale_cmake">Building With CMake</a></li>
+<li><a class="el" href="building_boost_locale.html#binary_compatibility">Binary Compatibility</a></li>
+</ul>
+<h2><a class="anchor" id="building_boost_locale_bb"></a>
+Building With Boost.Build</h2>
+<p>You need Boost 1.46 and above to use Boost.Build, it includes important patches that allow you to build the library correctly.</p>
+<h3><a class="anchor" id="bb_building_deps"></a>
+Dependencies</h3>
+<ul>
+<li>Boost 1.46 and above.</li>
+<li>ICU library 3.6 or above is strongly recommended</li>
+<li>If no ICU library is given, iconv support is required under POSIX platforms.</li>
+</ul>
+<h3><a class="anchor" id="bb_building_proc"></a>
+Building Process</h3>
+<p>First of all we need to prepare our sources of Boost with Boost.Locale</p>
+<ul>
+<li>Download latest version of Boost and extract its sources</li>
+<li>Download the latest version of Boost.Locale and extract its sources</li>
+<li>Copy boost and libs subdirectory of Boost.Locale sources into the location of boost sources.</li>
+<li>Bootstrap latest bjam version running bootstrap.sh or bootstrap.bat.</li>
+</ul>
+<p>Now all you need to do is invoke bjam command:</p>
+<div class="fragment"><pre class="fragment">
+./bjam --with-locale stage
+</pre></div><p>Or on Windows </p>
+<div class="fragment"><pre class="fragment">
+.\bjam --with-locale stage
+</pre></div><p>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 <code>-sICU_PATH</code> option</p>
+<p>For example:</p>
+<ul>
+<li>If your icu build is placed at <code>/opt/icu46</code> such that the files are placed like<br/>
+ <code>/opt/icu46/include/unicode/uversion</code>.h<br/>
+ <code>/opt/icu46/include/unicode/calendar</code>.h<br/>
+ <code></code>... <br/>
+ <code>/opt/icu46/lib/libicudata</code>.so <br/>
+ <code>/opt/icu46/lib/libicui18n</code>.so <br/>
+ <code></code>... <br/>
+ then you need to provide an option <code>-sICU_PATH=/opt/icu46</code> <div class="fragment"><pre class="fragment">
+ ./bjam --with-locale -sICU_PATH=/opt/icu46 stage
+ </pre></div></li>
+<li>If your icu build is placed at <code>c:\icu46</code> such that the files are placed like <br/>
+ <code>c:\icu46\include\unicode\uversion.h</code> <br/>
+ <code>c:\icu46\include\unicode\calendar.h</code> <br/>
+ <code>...</code> <br/>
+ <code>c:\icu46\bin\icudt.dll</code> <br/>
+ <code>c:\icu46\bin\icuin.dll</code> <br/>
+ <code>...</code> <br/>
+ <code>c:\icu46\lib\icudt.lib</code> <br/>
+ <code>c:\icu46\lib\icuin.lib</code> <br/>
+ <code>...</code> <br/>
+ then you need to provide an option <code>-sICU_PATH=c</code>:\icu46 <div class="fragment"><pre class="fragment">
+ .\bjam --with-locale -sICU_PATH=c:\icu46 stage
+ </pre></div></li>
+</ul>
+<dl class="note"><dt><b>Note:</b></dt><dd>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.</dd></dl>
+<h2><a class="anchor" id="bb_build_opts"></a>
+Build Options</h2>
+<p>Boost.Locale supports following options with values <code>off</code> or <code>on</code> </p>
+<ul>
+<li><code>boost.locale.icu=off</code> disable build of ICU backend even if ICU library exists</li>
+<li><code>boost.locale.iconv=off</code> or <code>boost.locale.iconv=on</code> enable or disable use of iconv library. It is off by default on Windows and Solaris</li>
+<li><code>boost.locale.winapi=off</code> - disable winapi backend, it is on by default on Windows and Cygwin</li>
+<li><code>boost.locale.std=off</code> or <code>boost.locale.winapi=on</code> Disable or enable std backends. <code>std</code> backend is disabled by default when using Sun Studio.</li>
+<li><code>boost.locale.posix=on</code> or <code>boost.locale.posix=off</code> Enable or disable support of POSIX backend, it is on by default on Linux and Mac OS X</li>
+</ul>
+<p>Also Boost.Locale supports following options</p>
+<ul>
+<li><code>-sICU_PATH=/path/to/location/of/icu</code> - the location of custom ICU library</li>
+<li><code>-sICONV_PATH=/path/to/location/of/iconv</code> - the location of custom iconv library</li>
+</ul>
+<p>For example:</p>
+<ul>
+<li>Build the library on Windows with ICU backend only: <div class="fragment"><pre class="fragment">
+ .\bjam boost.locale.winapi=off boost.locale.std=off -sICU_PATH=c:\icu46 --with-locale stage
+ </pre></div></li>
+<li>Build the library on Linux with std backend only <div class="fragment"><pre class="fragment">
+ .\bjam boost.locale.posix=off boost.locale.icu=off --with-locale stage
+ </pre></div></li>
+</ul>
+<h2><a class="anchor" id="bb_build_test"></a>
+Running Unit Tests</h2>
+<p>You can run unit tests by invoking <code>bjam</code> with <code>libs/locale/test</code> project parameter </p>
+<div class="fragment"><pre class="fragment">
+./bjam libs/locale/test
+</pre></div><h2><a class="anchor" id="building_boost_locale_cmake"></a>
+Building With CMake</h2>
+<dl class="note"><dt><b>Note:</b></dt><dd>CMake build does not provide mangled library names like boost_locale-mt-gd.lib, so if you rely on auto-linking use Boost.Build.</dd></dl>
+<h3><a class="anchor" id="cmake_building_deps"></a>
+Dependencies</h3>
+<ul>
+<li>CMake 2.6 and above.</li>
+<li>Boost 1.35 and above.</li>
+<li>Boost.Thread (when using ICU or when using Boost &lt; 1.43)</li>
+<li>ICU library 3.6 or above is strongly recommended</li>
+<li>If no ICU library is given, iconv support is required under POSIX platforms.</li>
+</ul>
+<h3><a class="anchor" id="cmake_building_proc"></a>
+Building Process</h3>
+<p>The library build should be fairly simple for users familiar with CMake.</p>
+<dl class="note"><dt><b>Note:</b></dt><dd></dd></dl>
+<ul>
+<li>MSVC Users: use <code>nmake</code> for building the library, MSVC projects are not supported!</li>
+<li>Windows users: don't forget to set the PATH environment variable to point to ICU's dlls.</li>
+</ul>
+<p>The simplest way to build the library is:</p>
+<ul>
+<li>Extract its sources</li>
+<li>Go to the sources directory</li>
+<li>Create a subdirectory named "build"</li>
+<li>Go into this directory and run: <div class="fragment"><pre class="fragment"> cmake ..
+ make
+ make test
+</pre></div> For windows you may need to specify: <div class="fragment"><pre class="fragment"> cmake -DCMAKE_INCLUDE_PATH=/path/to/icu/include:/path/to/boost/include -DCMAKE_LIBRARY_PATH=/path/to/icu/lib ..
+</pre></div> And then: <div class="fragment"><pre class="fragment"> nmake
+ nmake test
+</pre></div> Or <div class="fragment"><pre class="fragment"> make &amp;&amp; make test
+</pre></div> Depending on your compiler.</li>
+</ul>
+<h2><a class="anchor" id="cmake_build_opts"></a>
+Build Options</h2>
+<p>This options can be passed to CMake to configure the library to your needs.</p>
+<ul>
+<li><code>DISABLE_SHARED</code> - build only the static library</li>
+<li><code>DISABLE_STATIC</code> - build only the shared library</li>
+<li><code>DISABLE_ICU</code> - Disable the ICU backend (strongly discouraged)</li>
+<li><code>DISABLE_STD_BACKED</code> - Disable the "std" backend</li>
+<li><code>DISABLE_POSIX_BACKEND</code> - Disable the "posix" backend (ON by default on all but Linux and Mac OS X)</li>
+<li><code>DISABLE_WINAPI_BACKEND</code> - Disable the "winapi" backend (ON by default on POSIX platforms).</li>
+<li><code>DISABLE_ICONV</code> - Disable iconv-based conversion (ON by default on Windows)</li>
+</ul>
+<p>Useful CMake options:</p>
+<ul>
+<li><code>CMAKE_INCLUDE_PATH</code> - path to the boost library (if not system-wide)</li>
+<li><code>CMAKE_INSTALL_PREFIX</code> - installation path</li>
+<li><code>CMAKE_BUILD_TYPE</code> - default is Debug on Windows/MSVC and RelWithDebInfo on all other platforms.</li>
+</ul>
+<p>Examples:</p>
+<ul>
+<li>Build Boost.Locale with only the "icu" backend on Linux <div class="fragment"><pre class="fragment"> cmake -DDISABLE_POSIX_BACKEND=ON -DDISABLE_STD_BACKEND=ON -DDISABLE_ICONV=ON ..
+</pre></div></li>
+<li>Build Boost.Locale with the "winapi" and "std" backends on Windows <div class="fragment"><pre class="fragment"> cmake -G <span class="stringliteral">&quot;NMake Makefiles&quot;</span> -DDISABLE_ICU_BACKEND=ON -DCMAKE_INCLUDE_PATH=c:/boost_1_43_0 ..
+</pre></div></li>
+</ul>
+<h2><a class="anchor" id="binary_compatibility"></a>
+Binary Compatibility</h2>
+<p>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 <code>std</code>, <code>posix</code> or <code>winapi</code> backends would still be binary-compatible with it.</p>
+<p>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. </p>
+</div>
+<hr class="footer"/><address class="footer"><small>
+&copy; 2009-2011 Artyom Beilis, Distributed under the Boost Software License, Version 1.0.
+</small></address>
+</body>
+</html>

Added: trunk/libs/locale/doc/html/calendar_8cpp-example.html
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/html/calendar_8cpp-example.html 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,144 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>Boost.Locale: calendar.cpp</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+<!--
+ Switch the lines for stand alone version
+ <link rel="stylesheet" type="text/css" href="http://www.boost.org/style-v2/section-basic.css">
+-->
+<link rel="stylesheet" type="text/css" href="../style/section-basic.css">
+</head>
+<body>
+<div id="boost-common-heading-doc">
+ <div class="heading-inner">
+ <div class="heading-placard"></div>
+
+ <h1 class="heading-title">
+ <a href="http://www.boost.org/">
+ <!--
+ Switch the lines for stand alone version
+ <img src="http://www.boost.org/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ -->
+ <img src="../style/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ <span class="heading-boost">Boost</span>
+ <span class="heading-cpplibraries">C++ Libraries</span>
+ </a>
+ </h1>
+
+ <p class="heading-quote">
+
+ <q>...one of the most highly
+ regarded and expertly designed C++ library projects in the
+ world.</q>
+
+ <span class="heading-attribution">&mdash; <a href=
+ "http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
+ "http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
+ Alexandrescu</a>, <a href=
+ "http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
+ Coding Standards</a></span>
+ </p>
+ </div>
+</div>
+
+<div id="boost-common-heading-doc-spacer"></div>
+<!-- Generated by Doxygen 1.7.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul class="tablist">
+ <li>Main Page</li>
+ <li>Modules</li>
+ <li>Namespaces</li>
+ <li>Classes</li>
+ <li>Files</li>
+ <li>Examples</li>
+ </ul>
+ </div>
+</div>
+<div class="header">
+ <div class="headertitle">
+<h1>calendar.cpp</h1> </div>
+</div>
+<div class="contents">
+<p>Example of using date_time functions for generating calendar for current year.</p>
+<div class="fragment"><pre class="fragment"><span class="comment">//</span>
+<span class="comment">// Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)</span>
+<span class="comment">//</span>
+<span class="comment">// Distributed under the Boost Software License, Version 1.0. (See</span>
+<span class="comment">// accompanying file LICENSE_1_0.txt or copy at</span>
+<span class="comment">// http://www.boost.org/LICENSE_1_0.txt)</span>
+<span class="comment">//</span>
+<span class="preprocessor">#include &lt;boost/locale.hpp&gt;</span>
+<span class="preprocessor">#include &lt;iostream&gt;</span>
+<span class="preprocessor">#include &lt;iomanip&gt;</span>
+<span class="preprocessor">#include &lt;ctime&gt;</span>
+
+<span class="keywordtype">int</span> main()
+{
+ <span class="keyword">using namespace </span>boost::locale;
+
+ <a name="_a0"></a><a class="code" href="classboost_1_1locale_1_1generator.html" title="the major class used for locale generation">generator</a> gen;
+ std::locale::global(gen(<span class="stringliteral">&quot;&quot;</span>));
+ std::cout.imbue(std::locale());
+ <span class="comment">// Setup environment</span>
+
+ <a name="_a1"></a><a class="code" href="classboost_1_1locale_1_1date__time.html" title="this class represents a date time and allows to perform various operation according to the locale set...">boost::locale::date_time</a> now;
+
+ <a class="code" href="classboost_1_1locale_1_1date__time.html" title="this class represents a date time and allows to perform various operation according to the locale set...">date_time</a> start=now;
+
+ <span class="comment">// Set the first day of the first month of this year</span>
+ start.set(<a name="a2"></a><a class="code" href="namespaceboost_1_1locale_1_1period.html#aa6aafbd111a9c729266f2aa28b895d68">period::month</a>(),now.minimum(<a class="code" href="namespaceboost_1_1locale_1_1period.html#aa6aafbd111a9c729266f2aa28b895d68">period::month</a>()));
+ start.set(<a name="a3"></a><a class="code" href="namespaceboost_1_1locale_1_1period.html#a72438d8d7da8493457e043aa442f0d9d">period::day</a>(),start.minimum(<a class="code" href="namespaceboost_1_1locale_1_1period.html#a72438d8d7da8493457e043aa442f0d9d">period::day</a>()));
+
+ <span class="keywordtype">int</span> current_year = <a name="a4"></a><a class="code" href="namespaceboost_1_1locale_1_1period.html#a9ea8d1453bed512ee16bea3199fd92af">period::year</a>(now);
+
+
+ <span class="comment">// Display current year</span>
+ std::cout &lt;&lt; <a name="a5"></a><a class="code" href="group__format.html#gad7914df7b54382c1ad7f5360676fe2e8">format</a>(<span class="stringliteral">&quot;{1,ftime=&#39;%Y&#39;}&quot;</span>) % now &lt;&lt; std::endl;
+
+ <span class="comment">//</span>
+ <span class="comment">// Run forward untill current year is the date</span>
+ <span class="comment">//</span>
+ <span class="keywordflow">for</span>(now=start; <a class="code" href="namespaceboost_1_1locale_1_1period.html#a9ea8d1453bed512ee16bea3199fd92af">period::year</a>(now) == current_year;) {
+
+ <span class="comment">// Print heading of month</span>
+ <span class="keywordflow">if</span>(<a name="_a6"></a><a class="code" href="classboost_1_1locale_1_1calendar.html" title="this class provides an access to general calendar information.">calendar</a>().is_gregorian())
+ std::cout &lt;&lt; <a class="code" href="group__format.html#gad7914df7b54382c1ad7f5360676fe2e8">format</a>(<span class="stringliteral">&quot;{1,ftime=&#39;%B&#39;}&quot;</span>) % now &lt;&lt;std::endl;
+ <span class="keywordflow">else</span>
+ std::cout &lt;&lt; <a class="code" href="group__format.html#gad7914df7b54382c1ad7f5360676fe2e8">format</a>(<span class="stringliteral">&quot;{1,ftime=&#39;%B&#39;} ({1,ftime=&#39;%Y-%m-%d&#39;,locale=en} - {2,locale=en,ftime=&#39;%Y-%m-%d&#39;})&quot;</span>)
+ % now
+ % <a class="code" href="classboost_1_1locale_1_1date__time.html" title="this class represents a date time and allows to perform various operation according to the locale set...">date_time</a>(now,now.maximum(<a class="code" href="namespaceboost_1_1locale_1_1period.html#a72438d8d7da8493457e043aa442f0d9d">period::day</a>())*<a class="code" href="namespaceboost_1_1locale_1_1period.html#a72438d8d7da8493457e043aa442f0d9d">period::day</a>()) &lt;&lt; std::endl;
+
+ <span class="keywordtype">int</span> first = <a class="code" href="classboost_1_1locale_1_1calendar.html" title="this class provides an access to general calendar information.">calendar</a>().first_day_of_week();
+
+ <span class="comment">// Print weeks days</span>
+ <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i=0;i&lt;7;i++) {
+ <a class="code" href="classboost_1_1locale_1_1date__time.html" title="this class represents a date time and allows to perform various operation according to the locale set...">date_time</a> tmp(now,<a name="a7"></a><a class="code" href="namespaceboost_1_1locale_1_1period.html#ac1b424cae5ed4ab32aed3c3aedc306e9">period::day_of_week</a>() * (first + i));
+ std::cout &lt;&lt; <a class="code" href="group__format.html#gad7914df7b54382c1ad7f5360676fe2e8">format</a>(<span class="stringliteral">&quot;{1,w=8,ftime=&#39;%a&#39;} &quot;</span>) % tmp;
+ }
+ std::cout &lt;&lt; std::endl;
+
+ <span class="keywordtype">int</span> current_month = now / <a class="code" href="namespaceboost_1_1locale_1_1period.html#aa6aafbd111a9c729266f2aa28b895d68">period::month</a>();
+ <span class="keywordtype">int</span> <a name="a8"></a><a class="code" href="group__codepage.html#gga8e3c5a274f57107ec5745e227c26ba84ae9b554a2955deddf714757788819edf9" title="Skip illegal/unconvertable characters.">skip</a> = now / <a name="a9"></a><a class="code" href="namespaceboost_1_1locale_1_1period.html#a57d6b8f97bd6604e13c6982ed0953678">period::day_of_week_local</a>() - 1;
+ <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i=0;i&lt;skip*9;i++)
+ std::cout &lt;&lt; <span class="charliteral">&#39; &#39;</span>;
+ <span class="keywordflow">for</span>(;now / <a class="code" href="namespaceboost_1_1locale_1_1period.html#aa6aafbd111a9c729266f2aa28b895d68">period::month</a>() == current_month ;now += <a class="code" href="namespaceboost_1_1locale_1_1period.html#a72438d8d7da8493457e043aa442f0d9d">period::day</a>()) {
+ std::cout &lt;&lt; <a class="code" href="group__format.html#gad7914df7b54382c1ad7f5360676fe2e8">format</a>(<span class="stringliteral">&quot;{1,w=8,ftime=&#39;%e&#39;} &quot;</span>) % now;
+ <span class="keywordflow">if</span>(now / <a class="code" href="namespaceboost_1_1locale_1_1period.html#a57d6b8f97bd6604e13c6982ed0953678">period::day_of_week_local</a>() == 7)
+ std::cout &lt;&lt; std::endl;
+ }
+ std::cout &lt;&lt; std::endl;
+ }
+
+}
+<span class="comment">// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4</span>
+</pre></div> </div>
+</div>
+<hr class="footer"/><address class="footer"><small>
+&copy; 2009-2011 Artyom Beilis, Distributed under the Boost Software License, Version 1.0.
+</small></address>
+</body>
+</html>

Added: trunk/libs/locale/doc/html/charset_handling.html
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/html/charset_handling.html 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,161 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>Boost.Locale: Character Set Conversions</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+<!--
+ Switch the lines for stand alone version
+ <link rel="stylesheet" type="text/css" href="http://www.boost.org/style-v2/section-basic.css">
+-->
+<link rel="stylesheet" type="text/css" href="../style/section-basic.css">
+</head>
+<body>
+<div id="boost-common-heading-doc">
+ <div class="heading-inner">
+ <div class="heading-placard"></div>
+
+ <h1 class="heading-title">
+ <a href="http://www.boost.org/">
+ <!--
+ Switch the lines for stand alone version
+ <img src="http://www.boost.org/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ -->
+ <img src="../style/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ <span class="heading-boost">Boost</span>
+ <span class="heading-cpplibraries">C++ Libraries</span>
+ </a>
+ </h1>
+
+ <p class="heading-quote">
+
+ <q>...one of the most highly
+ regarded and expertly designed C++ library projects in the
+ world.</q>
+
+ <span class="heading-attribution">&mdash; <a href=
+ "http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
+ "http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
+ Alexandrescu</a>, <a href=
+ "http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
+ Coding Standards</a></span>
+ </p>
+ </div>
+</div>
+
+<div id="boost-common-heading-doc-spacer"></div>
+<!-- Generated by Doxygen 1.7.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul class="tablist">
+ <li>Main Page</li>
+ <li>Modules</li>
+ <li>Namespaces</li>
+ <li>Classes</li>
+ <li>Files</li>
+ <li>Examples</li>
+ </ul>
+ </div>
+ <div class="navpath">
+ <ul>
+ <li><a class="el" href="main.html">Boost.Locale</a> </li>
+ <li><a class="el" href="using_boost_locale.html">Using Boost.Locale</a> </li>
+ </ul>
+ </div>
+</div>
+<div class="header">
+ <div class="headertitle">
+<h1>Character Set Conversions </h1> </div>
+</div>
+<div class="contents">
+<h2><a class="anchor" id="codecvt"></a>
+Convenience Interface</h2>
+<p>Boost.Locale provides <a class="el" href="group__codepage.html#gad659f9c9c8b291e2ac6af24c49b42e43">to_utf</a>, <a class="el" href="group__codepage.html#gadc41bd2517e6e3bdcecdfc93b339204c">from_utf</a> and <a class="el" href="group__codepage.html#ga2de4d9d38004e5d7146abf2bd6a3df0b">utf_to_utf</a> functions in the <code><a class="el" href="namespaceboost_1_1locale_1_1conv.html" title="Namespace that contains all functions related to character set conversion.">boost::locale::conv</a></code> namespace. They are simple and convenient functions to convert a string to and from UTF-8/16/32 strings and strings using other encodings.</p>
+<p>For example:</p>
+<div class="fragment"><pre class="fragment">std::string utf8_string = to_utf&lt;char&gt;(latin1_string,<span class="stringliteral">&quot;Latin1&quot;</span>);
+std::wstring wide_string = to_utf&lt;wchar_t&gt;(latin1_string,<span class="stringliteral">&quot;Latin1&quot;</span>);
+std::string latin1_string = <a class="code" href="group__codepage.html#gadc41bd2517e6e3bdcecdfc93b339204c">from_utf</a>(wide_string,<span class="stringliteral">&quot;Latin1&quot;</span>);
+std::string utf8_string2 = utf_to_utf&lt;char&gt;(wide_string);
+</pre></div><p>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 <a class="el" href="classboost_1_1locale_1_1conv_1_1conversion__error.html">conversion_error</a> exception by passing the <code>stop</code> flag to it:</p>
+<div class="fragment"><pre class="fragment">std::wstring s=to_utf&lt;wchar_t&gt;(<span class="stringliteral">&quot;\xFF\xFF&quot;</span>,<span class="stringliteral">&quot;UTF-8&quot;</span>,stop);
+<span class="comment">// Throws because this string is illegal in UTF-8</span>
+</pre></div><h2><a class="anchor" id="codecvt_codecvt"></a>
+std::codecvt facet</h2>
+<p>Boost.Locale provides stream codepage conversion facets based on the <code>std::codecvt</code> facet. This allows conversion between wide-character encodings and 8-bit encodings like UTF-8, ISO-8859 or Shift-JIS.</p>
+<p>Most of compilers provide such facets, but:</p>
+<ul>
+<li>Under Windows MSVC does not support UTF-8 encodings at all.</li>
+<li>Under Linux the encodings are supported only if the required locales are generated. For example it may be impossible to create a <code>he_IL.CP1255</code> locale even when the <code>he_IL</code> locale is available.</li>
+</ul>
+<p>Thus Boost.Locale provides an option to generate code-page conversion facets for use with Boost.Iostreams filters or <code>std::wfstream</code>. For example:</p>
+<div class="fragment"><pre class="fragment"> std::locale loc= generator().generate(<span class="stringliteral">&quot;he_IL.UTF-8&quot;</span>);
+ std::wofstream file.
+ file.imbue(loc);
+ file.open(<span class="stringliteral">&quot;hello.txt&quot;</span>);
+ file &lt;&lt; L<span class="stringliteral">&quot;שלום!&quot;</span> &lt;&lt; endl;
+</pre></div><p>Would create a file <code>hello.txt</code> encoded as UTF-8 with "שלום!" (shalom) in it.</p>
+<h2><a class="anchor" id="codecvt_iostreams_integration"></a>
+Integration with Boost.Iostreams</h2>
+<p>You can use the <code>std::codecvt</code> facet directly, but this is quite tricky and requires accurate buffer and error management.</p>
+<p>You can use the <code>boost::iostreams::code_converter</code> class for stream-oriented conversions between the wide-character set and narrow locale character set.</p>
+<p>This is a sample program that converts wide to narrow characters for an arbitrary stream:</p>
+<div class="fragment"><pre class="fragment"><span class="preprocessor">#include &lt;boost/iostreams/stream.hpp&gt;</span>
+<span class="preprocessor">#include &lt;boost/iostreams/categories.hpp&gt;</span>
+<span class="preprocessor">#include &lt;boost/iostreams/code_converter.hpp&gt;</span>
+
+<span class="preprocessor">#include &lt;boost/locale.hpp&gt;</span>
+<span class="preprocessor">#include &lt;iostream&gt;</span>
+
+<span class="keyword">namespace </span>io = boost::iostreams;
+
+<span class="comment">// Device that consumes the converted text,</span>
+<span class="comment">// In our case it just writes to standard output</span>
+<span class="keyword">class </span>consumer {
+<span class="keyword">public</span>:
+ <span class="keyword">typedef</span> <span class="keywordtype">char</span> char_type;
+ <span class="keyword">typedef</span> io::sink_tag category;
+ std::streamsize write(<span class="keyword">const</span> <span class="keywordtype">char</span>* s, std::streamsize n)
+ {
+ std::cout.write(s,n);
+ <span class="keywordflow">return</span> n;
+ }
+};
+
+
+<span class="keywordtype">int</span> main()
+{
+ <span class="comment">// the device that converts wide characters</span>
+ <span class="comment">// to narrow</span>
+ <span class="keyword">typedef</span> io::code_converter&lt;consumer&gt; converter_device;
+ <span class="comment">// the stream that uses this device</span>
+ <span class="keyword">typedef</span> io::stream&lt;converter_device&gt; converter_stream;
+
+
+ consumer cons;
+ <span class="comment">// setup out converter to work</span>
+ <span class="comment">// with he_IL.UTF-8 locale </span>
+ converter_device dev;
+ <a class="code" href="classboost_1_1locale_1_1generator.html" title="the major class used for locale generation">boost::locale::generator</a> gen;
+ dev.imbue(gen(<span class="stringliteral">&quot;he_IL.UTF-8&quot;</span>));
+ dev.open(cons);
+ converter_stream stream;
+ stream.open(dev);
+ <span class="comment">// Now wide characters that are written</span>
+ <span class="comment">// to the stream would be given to</span>
+ <span class="comment">// our consumer as narrow characters </span>
+ <span class="comment">// in UTF-8 encoding</span>
+ stream &lt;&lt; L<span class="stringliteral">&quot;שלום&quot;</span> &lt;&lt; std::flush;
+}
+</pre></div><h2><a class="anchor" id="codecvt_limitations"></a>
+Limitations of std::codecvt</h2>
+<p>The Standard does not provide any information about <code>std::mbstate_t</code> 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 <code>std::codecvt&lt;wchar_t,char,mbstate_t&gt;</code> for stateful encodings. Thus, Boost.Locale's <code>codecvt</code> 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.</p>
+<p><b>Recommendation:</b> Prefer the Unicode UTF-8 encoding for <code>char</code> based strings and files in your application.</p>
+<dl class="note"><dt><b>Note:</b></dt><dd></dd></dl>
+<p>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. </p>
+</div>
+<hr class="footer"/><address class="footer"><small>
+&copy; 2009-2011 Artyom Beilis, Distributed under the Boost Software License, Version 1.0.
+</small></address>
+</body>
+</html>

Added: trunk/libs/locale/doc/html/classboost_1_1locale_1_1abstract__calendar-members.html
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/html/classboost_1_1locale_1_1abstract__calendar-members.html 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,107 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>Boost.Locale: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+<!--
+ Switch the lines for stand alone version
+ <link rel="stylesheet" type="text/css" href="http://www.boost.org/style-v2/section-basic.css">
+-->
+<link rel="stylesheet" type="text/css" href="../style/section-basic.css">
+</head>
+<body>
+<div id="boost-common-heading-doc">
+ <div class="heading-inner">
+ <div class="heading-placard"></div>
+
+ <h1 class="heading-title">
+ <a href="http://www.boost.org/">
+ <!--
+ Switch the lines for stand alone version
+ <img src="http://www.boost.org/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ -->
+ <img src="../style/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ <span class="heading-boost">Boost</span>
+ <span class="heading-cpplibraries">C++ Libraries</span>
+ </a>
+ </h1>
+
+ <p class="heading-quote">
+
+ <q>...one of the most highly
+ regarded and expertly designed C++ library projects in the
+ world.</q>
+
+ <span class="heading-attribution">&mdash; <a href=
+ "http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
+ "http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
+ Alexandrescu</a>, <a href=
+ "http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
+ Coding Standards</a></span>
+ </p>
+ </div>
+</div>
+
+<div id="boost-common-heading-doc-spacer"></div>
+<!-- Generated by Doxygen 1.7.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul class="tablist">
+ <li>Main Page</li>
+ <li>Modules</li>
+ <li>Namespaces</li>
+ <li class="current">Classes</li>
+ <li>Files</li>
+ <li>Examples</li>
+ </ul>
+ </div>
+ <div class="tabs2">
+ <ul class="tablist">
+ <li>Class List</li>
+ <li>Class Hierarchy</li>
+ <li>Class Members</li>
+ </ul>
+ </div>
+</div>
+<div class="header">
+ <div class="headertitle">
+<h1>boost::locale::abstract_calendar Member List</h1> </div>
+</div>
+<div class="contents">
+This is the complete list of members for <a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a>, including all inherited members.<table>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5ab5d1af0b2698fee942a1486dfcc6552b">absolute_maximum</a> enum value</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5a28694319e58f559df9ca41b22f03427e">absolute_minimum</a> enum value</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5a3d2648e95466623ba20502281e0208af">actual_maximum</a> enum value</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5a5aa2c2d439c6e801e3bc48a35972932b">actual_minimum</a> enum value</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#afb8e3a4d2ad93274ec119dc3dd0b103a">adjust_value</a>(period::marks::period_mark p, update_type u, int difference)=0</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td><code> [pure virtual]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a5f1927f4c71fafa4712265e6b68958b5">calendar_option_type</a> enum name</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a73bc2d023be4c6ac6a6f441f74ded2f9">clone</a>() const =0</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td><code> [pure virtual]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5a83d87ff10ff6107dfd0405f1e8757ef8">current</a> enum value</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a7bd4c26f5a4260f6d9c91c615efc4b46">difference</a>(abstract_calendar const *other, period::marks::period_mark p) const =0</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td><code> [pure virtual]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a0c034dd6f135b7d9b6faad08d49715a8">get_option</a>(calendar_option_type opt) const =0</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td><code> [pure virtual]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a8900097c0b687393b053bc0420070815">get_time</a>() const =0</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td><code> [pure virtual]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a51f4b91d0dc2f9afa3920a771307d92f">get_timezone</a>() const =0</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td><code> [pure virtual]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a7eacfa5d8f37dfc839d0239c2fcdf64e">get_value</a>(period::marks::period_mark p, value_type v) const =0</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td><code> [pure virtual]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5a75e80e0a10af4b2b8eb2fcab72e4b200">greatest_minimum</a> enum value</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a5f1927f4c71fafa4712265e6b68958b5a69f0c20e321e3b914883869466122c61">is_dst</a> enum value</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a5f1927f4c71fafa4712265e6b68958b5add910815d1ad0e97275b781223e869a9">is_gregorian</a> enum value</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5a388661725182373d2f92b709034f85c9">least_maximum</a> enum value</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a92cf9485b91d60b70ef00e183bdf4e95aac5f9cb6e12a121b47b51434a3655c81">move</a> enum value</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#aa06fef77acaa6104e3cd2bc80ccc76d9">normalize</a>()=0</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td><code> [pure virtual]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a92cf9485b91d60b70ef00e183bdf4e95a704e0e917603c2a88de22f3426a3e20b">roll</a> enum value</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#aa20ae19bca185cc0fa4ab69d7f3c5883">same</a>(abstract_calendar const *other) const =0</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td><code> [pure virtual]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a9265206013005d9ac30cf723a7ffe032">set_option</a>(calendar_option_type opt, int v)=0</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td><code> [pure virtual]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#acb01268c84f27a8a736b715ab9e9557a">set_time</a>(posix_time const &amp;p)=0</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td><code> [pure virtual]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#aa17f0fd2e88d3da8fe7b12e98ad2d6c3">set_timezone</a>(std::string const &amp;tz)=0</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td><code> [pure virtual]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a15067ccf90a19e640051a30a6d3a2a7f">set_value</a>(period::marks::period_mark p, int value)=0</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td><code> [pure virtual]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a92cf9485b91d60b70ef00e183bdf4e95">update_type</a> enum name</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5">value_type</a> enum name</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td></td></tr>
+ <tr bgcolor="#f0f0f0"><td><b>~abstract_calendar</b>() (defined in <a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a>)</td><td><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a></td><td><code> [inline, virtual]</code></td></tr>
+</table></div>
+<hr class="footer"/><address class="footer"><small>
+&copy; 2009-2011 Artyom Beilis, Distributed under the Boost Software License, Version 1.0.
+</small></address>
+</body>
+</html>

Added: trunk/libs/locale/doc/html/classboost_1_1locale_1_1abstract__calendar.html
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/html/classboost_1_1locale_1_1abstract__calendar.html 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,518 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>Boost.Locale: boost::locale::abstract_calendar Class Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+<!--
+ Switch the lines for stand alone version
+ <link rel="stylesheet" type="text/css" href="http://www.boost.org/style-v2/section-basic.css">
+-->
+<link rel="stylesheet" type="text/css" href="../style/section-basic.css">
+</head>
+<body>
+<div id="boost-common-heading-doc">
+ <div class="heading-inner">
+ <div class="heading-placard"></div>
+
+ <h1 class="heading-title">
+ <a href="http://www.boost.org/">
+ <!--
+ Switch the lines for stand alone version
+ <img src="http://www.boost.org/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ -->
+ <img src="../style/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ <span class="heading-boost">Boost</span>
+ <span class="heading-cpplibraries">C++ Libraries</span>
+ </a>
+ </h1>
+
+ <p class="heading-quote">
+
+ <q>...one of the most highly
+ regarded and expertly designed C++ library projects in the
+ world.</q>
+
+ <span class="heading-attribution">&mdash; <a href=
+ "http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
+ "http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
+ Alexandrescu</a>, <a href=
+ "http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
+ Coding Standards</a></span>
+ </p>
+ </div>
+</div>
+
+<div id="boost-common-heading-doc-spacer"></div>
+<!-- Generated by Doxygen 1.7.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul class="tablist">
+ <li>Main Page</li>
+ <li>Modules</li>
+ <li>Namespaces</li>
+ <li class="current">Classes</li>
+ <li>Files</li>
+ <li>Examples</li>
+ </ul>
+ </div>
+ <div class="tabs2">
+ <ul class="tablist">
+ <li>Class List</li>
+ <li>Class Hierarchy</li>
+ <li>Class Members</li>
+ </ul>
+ </div>
+ <div class="navpath">
+ <ul>
+ <li><b>boost</b> </li>
+ <li><a class="el" href="namespaceboost_1_1locale.html">locale</a> </li>
+ <li><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">boost::locale::abstract_calendar</a> </li>
+ </ul>
+ </div>
+</div>
+<div class="header">
+ <div class="summary">
+Public Types &#124;
+Public Member Functions </div>
+ <div class="headertitle">
+<h1>boost::locale::abstract_calendar Class Reference</h1> </div>
+</div>
+<div class="contents">
+<!-- doxytag: class="boost::locale::abstract_calendar" -->
+<p><code>#include &lt;<a class="el" href="date__time__facet_8hpp_source.html">boost/locale/date_time_facet.hpp</a>&gt;</code></p>
+
+<p>List of all members.</p>
+<table class="memberdecls">
+<tr><td colspan="2"><h2><a name="pub-types"></a>
+Public Types</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5">value_type</a> { <br/>
+&nbsp;&nbsp;<a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5a28694319e58f559df9ca41b22f03427e">absolute_minimum</a>,
+<a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5a5aa2c2d439c6e801e3bc48a35972932b">actual_minimum</a>,
+<a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5a75e80e0a10af4b2b8eb2fcab72e4b200">greatest_minimum</a>,
+<a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5a83d87ff10ff6107dfd0405f1e8757ef8">current</a>,
+<br/>
+&nbsp;&nbsp;<a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5a388661725182373d2f92b709034f85c9">least_maximum</a>,
+<a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5a3d2648e95466623ba20502281e0208af">actual_maximum</a>,
+<a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5ab5d1af0b2698fee942a1486dfcc6552b">absolute_maximum</a>
+<br/>
+ }</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a92cf9485b91d60b70ef00e183bdf4e95">update_type</a> { <a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a92cf9485b91d60b70ef00e183bdf4e95aac5f9cb6e12a121b47b51434a3655c81">move</a>,
+<a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a92cf9485b91d60b70ef00e183bdf4e95a704e0e917603c2a88de22f3426a3e20b">roll</a>
+ }</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a5f1927f4c71fafa4712265e6b68958b5">calendar_option_type</a> { <a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a5f1927f4c71fafa4712265e6b68958b5add910815d1ad0e97275b781223e869a9">is_gregorian</a>,
+<a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a5f1927f4c71fafa4712265e6b68958b5a69f0c20e321e3b914883869466122c61">is_dst</a>
+ }</td></tr>
+<tr><td colspan="2"><h2><a name="pub-methods"></a>
+Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">abstract_calendar</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a73bc2d023be4c6ac6a6f441f74ded2f9">clone</a> () const =0</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a15067ccf90a19e640051a30a6d3a2a7f">set_value</a> (<a class="el" href="namespaceboost_1_1locale_1_1period_1_1marks.html#a1536eaff4b2a880782128fc127f40d3a">period::marks::period_mark</a> p, int value)=0</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#aa06fef77acaa6104e3cd2bc80ccc76d9">normalize</a> ()=0</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a7eacfa5d8f37dfc839d0239c2fcdf64e">get_value</a> (<a class="el" href="namespaceboost_1_1locale_1_1period_1_1marks.html#a1536eaff4b2a880782128fc127f40d3a">period::marks::period_mark</a> p, <a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5">value_type</a> v) const =0</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#acb01268c84f27a8a736b715ab9e9557a">set_time</a> (<a class="el" href="structboost_1_1locale_1_1posix__time.html">posix_time</a> const &amp;p)=0</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="structboost_1_1locale_1_1posix__time.html">posix_time</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a8900097c0b687393b053bc0420070815">get_time</a> () const =0</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a9265206013005d9ac30cf723a7ffe032">set_option</a> (<a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a5f1927f4c71fafa4712265e6b68958b5">calendar_option_type</a> opt, int v)=0</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a0c034dd6f135b7d9b6faad08d49715a8">get_option</a> (<a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a5f1927f4c71fafa4712265e6b68958b5">calendar_option_type</a> opt) const =0</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#afb8e3a4d2ad93274ec119dc3dd0b103a">adjust_value</a> (<a class="el" href="namespaceboost_1_1locale_1_1period_1_1marks.html#a1536eaff4b2a880782128fc127f40d3a">period::marks::period_mark</a> p, <a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a92cf9485b91d60b70ef00e183bdf4e95">update_type</a> u, int difference)=0</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a7bd4c26f5a4260f6d9c91c615efc4b46">difference</a> (<a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">abstract_calendar</a> const *other, <a class="el" href="namespaceboost_1_1locale_1_1period_1_1marks.html#a1536eaff4b2a880782128fc127f40d3a">period::marks::period_mark</a> p) const =0</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#aa17f0fd2e88d3da8fe7b12e98ad2d6c3">set_timezone</a> (std::string const &amp;tz)=0</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">virtual std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a51f4b91d0dc2f9afa3920a771307d92f">get_timezone</a> () const =0</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#aa20ae19bca185cc0fa4ab69d7f3c5883">same</a> (<a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">abstract_calendar</a> const *other) const =0</td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<p>This class defines generic calendar class, it is used by <a class="el" href="classboost_1_1locale_1_1date__time.html" title="this class represents a date time and allows to perform various operation according to the locale set...">date_time</a> and calendar objects internally. It is less useful for end users, but it is build for localization backend implementation </p>
+<hr/><h2>Member Enumeration Documentation</h2>
+<a class="anchor" id="a5f1927f4c71fafa4712265e6b68958b5"></a><!-- doxytag: member="boost::locale::abstract_calendar::calendar_option_type" ref="a5f1927f4c71fafa4712265e6b68958b5" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">enum <a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a5f1927f4c71fafa4712265e6b68958b5">boost::locale::abstract_calendar::calendar_option_type</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Information about calendar </p>
+<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
+<tr><td valign="top"><em><a class="anchor" id="a5f1927f4c71fafa4712265e6b68958b5add910815d1ad0e97275b781223e869a9"></a><!-- doxytag: member="is_gregorian" ref="a5f1927f4c71fafa4712265e6b68958b5add910815d1ad0e97275b781223e869a9" args="" -->is_gregorian</em>&nbsp;</td><td>
+<p>Check if the calendar is Gregorian. </p>
+</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="a5f1927f4c71fafa4712265e6b68958b5a69f0c20e321e3b914883869466122c61"></a><!-- doxytag: member="is_dst" ref="a5f1927f4c71fafa4712265e6b68958b5a69f0c20e321e3b914883869466122c61" args="" -->is_dst</em>&nbsp;</td><td>
+<p>Check if the current time is in daylight time savings. </p>
+</td></tr>
+</table>
+</dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="a92cf9485b91d60b70ef00e183bdf4e95"></a><!-- doxytag: member="boost::locale::abstract_calendar::update_type" ref="a92cf9485b91d60b70ef00e183bdf4e95" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">enum <a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a92cf9485b91d60b70ef00e183bdf4e95">boost::locale::abstract_calendar::update_type</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>A way to update the value </p>
+<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
+<tr><td valign="top"><em><a class="anchor" id="a92cf9485b91d60b70ef00e183bdf4e95aac5f9cb6e12a121b47b51434a3655c81"></a><!-- doxytag: member="move" ref="a92cf9485b91d60b70ef00e183bdf4e95aac5f9cb6e12a121b47b51434a3655c81" args="" -->move</em>&nbsp;</td><td>
+<p>Change the value up or down effecting others for example 1990-12-31 + 1 day = 1991-01-01. </p>
+</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="a92cf9485b91d60b70ef00e183bdf4e95a704e0e917603c2a88de22f3426a3e20b"></a><!-- doxytag: member="roll" ref="a92cf9485b91d60b70ef00e183bdf4e95a704e0e917603c2a88de22f3426a3e20b" args="" -->roll</em>&nbsp;</td><td>
+<p>Change the value up or down not effecting others for example 1990-12-31 + 1 day = 1990-12-01. </p>
+</td></tr>
+</table>
+</dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="af786b3e65294d70769f2826ef95c7bd5"></a><!-- doxytag: member="boost::locale::abstract_calendar::value_type" ref="af786b3e65294d70769f2826ef95c7bd5" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">enum <a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5">boost::locale::abstract_calendar::value_type</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Type that defines how to fetch the value </p>
+<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
+<tr><td valign="top"><em><a class="anchor" id="af786b3e65294d70769f2826ef95c7bd5a28694319e58f559df9ca41b22f03427e"></a><!-- doxytag: member="absolute_minimum" ref="af786b3e65294d70769f2826ef95c7bd5a28694319e58f559df9ca41b22f03427e" args="" -->absolute_minimum</em>&nbsp;</td><td>
+<p>Absolute possible minimum for the value, for example for day is 1. </p>
+</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="af786b3e65294d70769f2826ef95c7bd5a5aa2c2d439c6e801e3bc48a35972932b"></a><!-- doxytag: member="actual_minimum" ref="af786b3e65294d70769f2826ef95c7bd5a5aa2c2d439c6e801e3bc48a35972932b" args="" -->actual_minimum</em>&nbsp;</td><td>
+<p>Actual minimal value for this period. </p>
+</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="af786b3e65294d70769f2826ef95c7bd5a75e80e0a10af4b2b8eb2fcab72e4b200"></a><!-- doxytag: member="greatest_minimum" ref="af786b3e65294d70769f2826ef95c7bd5a75e80e0a10af4b2b8eb2fcab72e4b200" args="" -->greatest_minimum</em>&nbsp;</td><td>
+<p>Maximal minimum value that can be for this period. </p>
+</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="af786b3e65294d70769f2826ef95c7bd5a83d87ff10ff6107dfd0405f1e8757ef8"></a><!-- doxytag: member="current" ref="af786b3e65294d70769f2826ef95c7bd5a83d87ff10ff6107dfd0405f1e8757ef8" args="" -->current</em>&nbsp;</td><td>
+<p>Current value of this period. </p>
+</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="af786b3e65294d70769f2826ef95c7bd5a388661725182373d2f92b709034f85c9"></a><!-- doxytag: member="least_maximum" ref="af786b3e65294d70769f2826ef95c7bd5a388661725182373d2f92b709034f85c9" args="" -->least_maximum</em>&nbsp;</td><td>
+<p>The last maximal value for this period, For example for Gregorian calendar day it is 28 </p>
+</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="af786b3e65294d70769f2826ef95c7bd5a3d2648e95466623ba20502281e0208af"></a><!-- doxytag: member="actual_maximum" ref="af786b3e65294d70769f2826ef95c7bd5a3d2648e95466623ba20502281e0208af" args="" -->actual_maximum</em>&nbsp;</td><td>
+<p>Actual maximum, for it can be 28, 29, 30, 31 for day according to current month. </p>
+</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="af786b3e65294d70769f2826ef95c7bd5ab5d1af0b2698fee942a1486dfcc6552b"></a><!-- doxytag: member="absolute_maximum" ref="af786b3e65294d70769f2826ef95c7bd5ab5d1af0b2698fee942a1486dfcc6552b" args="" -->absolute_maximum</em>&nbsp;</td><td>
+<p>Maximal value, for Gregorian day it would be 31. </p>
+</td></tr>
+</table>
+</dd>
+</dl>
+
+</div>
+</div>
+<hr/><h2>Member Function Documentation</h2>
+<a class="anchor" id="afb8e3a4d2ad93274ec119dc3dd0b103a"></a><!-- doxytag: member="boost::locale::abstract_calendar::adjust_value" ref="afb8e3a4d2ad93274ec119dc3dd0b103a" args="(period::marks::period_mark p, update_type u, int difference)=0" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">virtual void boost::locale::abstract_calendar::adjust_value </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="namespaceboost_1_1locale_1_1period_1_1marks.html#a1536eaff4b2a880782128fc127f40d3a">period::marks::period_mark</a>&nbsp;</td>
+ <td class="paramname"> <em>p</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a92cf9485b91d60b70ef00e183bdf4e95">update_type</a>&nbsp;</td>
+ <td class="paramname"> <em>u</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int&nbsp;</td>
+ <td class="paramname"> <em>difference</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td><code> [pure virtual]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Adjust period's <em>p</em> value by <em>difference</em> items using a update_type <em>u</em>. Note: not all values are adjustable </p>
+
+</div>
+</div>
+<a class="anchor" id="a73bc2d023be4c6ac6a6f441f74ded2f9"></a><!-- doxytag: member="boost::locale::abstract_calendar::clone" ref="a73bc2d023be4c6ac6a6f441f74ded2f9" args="() const =0" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">virtual <a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">abstract_calendar</a>* boost::locale::abstract_calendar::clone </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td> const<code> [pure virtual]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Make a polymorphic copy of the calendar </p>
+
+</div>
+</div>
+<a class="anchor" id="a7bd4c26f5a4260f6d9c91c615efc4b46"></a><!-- doxytag: member="boost::locale::abstract_calendar::difference" ref="a7bd4c26f5a4260f6d9c91c615efc4b46" args="(abstract_calendar const *other, period::marks::period_mark p) const =0" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">virtual int boost::locale::abstract_calendar::difference </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">abstract_calendar</a> const *&nbsp;</td>
+ <td class="paramname"> <em>other</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="namespaceboost_1_1locale_1_1period_1_1marks.html#a1536eaff4b2a880782128fc127f40d3a">period::marks::period_mark</a>&nbsp;</td>
+ <td class="paramname"> <em>p</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td> const<code> [pure virtual]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Calculate the difference between this calendar and <em>other</em> in <em>p</em> units </p>
+
+</div>
+</div>
+<a class="anchor" id="a0c034dd6f135b7d9b6faad08d49715a8"></a><!-- doxytag: member="boost::locale::abstract_calendar::get_option" ref="a0c034dd6f135b7d9b6faad08d49715a8" args="(calendar_option_type opt) const =0" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">virtual int boost::locale::abstract_calendar::get_option </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a5f1927f4c71fafa4712265e6b68958b5">calendar_option_type</a>&nbsp;</td>
+ <td class="paramname"> <em>opt</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td> const<code> [pure virtual]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Get option for calendar, currently only check if it is Gregorian calendar </p>
+
+</div>
+</div>
+<a class="anchor" id="a8900097c0b687393b053bc0420070815"></a><!-- doxytag: member="boost::locale::abstract_calendar::get_time" ref="a8900097c0b687393b053bc0420070815" args="() const =0" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">virtual <a class="el" href="structboost_1_1locale_1_1posix__time.html">posix_time</a> boost::locale::abstract_calendar::get_time </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td> const<code> [pure virtual]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Get current time point </p>
+
+</div>
+</div>
+<a class="anchor" id="a51f4b91d0dc2f9afa3920a771307d92f"></a><!-- doxytag: member="boost::locale::abstract_calendar::get_timezone" ref="a51f4b91d0dc2f9afa3920a771307d92f" args="() const =0" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">virtual std::string boost::locale::abstract_calendar::get_timezone </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td> const<code> [pure virtual]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Get current time zone, empty - system one </p>
+
+</div>
+</div>
+<a class="anchor" id="a7eacfa5d8f37dfc839d0239c2fcdf64e"></a><!-- doxytag: member="boost::locale::abstract_calendar::get_value" ref="a7eacfa5d8f37dfc839d0239c2fcdf64e" args="(period::marks::period_mark p, value_type v) const =0" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">virtual int boost::locale::abstract_calendar::get_value </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="namespaceboost_1_1locale_1_1period_1_1marks.html#a1536eaff4b2a880782128fc127f40d3a">period::marks::period_mark</a>&nbsp;</td>
+ <td class="paramname"> <em>p</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#af786b3e65294d70769f2826ef95c7bd5">value_type</a>&nbsp;</td>
+ <td class="paramname"> <em>v</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td> const<code> [pure virtual]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Get specific value for period <em>p</em> according to a value_type <em>v</em> </p>
+
+</div>
+</div>
+<a class="anchor" id="aa06fef77acaa6104e3cd2bc80ccc76d9"></a><!-- doxytag: member="boost::locale::abstract_calendar::normalize" ref="aa06fef77acaa6104e3cd2bc80ccc76d9" args="()=0" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">virtual void boost::locale::abstract_calendar::normalize </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td><code> [pure virtual]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Recalculate all periods after setting them, should be called after use of <a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a15067ccf90a19e640051a30a6d3a2a7f">set_value()</a> function. </p>
+
+</div>
+</div>
+<a class="anchor" id="aa20ae19bca185cc0fa4ab69d7f3c5883"></a><!-- doxytag: member="boost::locale::abstract_calendar::same" ref="aa20ae19bca185cc0fa4ab69d7f3c5883" args="(abstract_calendar const *other) const =0" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">virtual bool boost::locale::abstract_calendar::same </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html">abstract_calendar</a> const *&nbsp;</td>
+ <td class="paramname"> <em>other</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td> const<code> [pure virtual]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Check of two calendars have same rules </p>
+
+</div>
+</div>
+<a class="anchor" id="a9265206013005d9ac30cf723a7ffe032"></a><!-- doxytag: member="boost::locale::abstract_calendar::set_option" ref="a9265206013005d9ac30cf723a7ffe032" args="(calendar_option_type opt, int v)=0" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">virtual void boost::locale::abstract_calendar::set_option </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#a5f1927f4c71fafa4712265e6b68958b5">calendar_option_type</a>&nbsp;</td>
+ <td class="paramname"> <em>opt</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int&nbsp;</td>
+ <td class="paramname"> <em>v</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td><code> [pure virtual]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Set option for calendar, for future use </p>
+
+</div>
+</div>
+<a class="anchor" id="acb01268c84f27a8a736b715ab9e9557a"></a><!-- doxytag: member="boost::locale::abstract_calendar::set_time" ref="acb01268c84f27a8a736b715ab9e9557a" args="(posix_time const &amp;p)=0" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">virtual void boost::locale::abstract_calendar::set_time </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structboost_1_1locale_1_1posix__time.html">posix_time</a> const &amp;&nbsp;</td>
+ <td class="paramname"> <em>p</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td><code> [pure virtual]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Set current time point </p>
+
+</div>
+</div>
+<a class="anchor" id="aa17f0fd2e88d3da8fe7b12e98ad2d6c3"></a><!-- doxytag: member="boost::locale::abstract_calendar::set_timezone" ref="aa17f0fd2e88d3da8fe7b12e98ad2d6c3" args="(std::string const &amp;tz)=0" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">virtual void boost::locale::abstract_calendar::set_timezone </td>
+ <td>(</td>
+ <td class="paramtype">std::string const &amp;&nbsp;</td>
+ <td class="paramname"> <em>tz</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td><code> [pure virtual]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Set time zone, empty - use system </p>
+
+</div>
+</div>
+<a class="anchor" id="a15067ccf90a19e640051a30a6d3a2a7f"></a><!-- doxytag: member="boost::locale::abstract_calendar::set_value" ref="a15067ccf90a19e640051a30a6d3a2a7f" args="(period::marks::period_mark p, int value)=0" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">virtual void boost::locale::abstract_calendar::set_value </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="namespaceboost_1_1locale_1_1period_1_1marks.html#a1536eaff4b2a880782128fc127f40d3a">period::marks::period_mark</a>&nbsp;</td>
+ <td class="paramname"> <em>p</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int&nbsp;</td>
+ <td class="paramname"> <em>value</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td><code> [pure virtual]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Set specific <em>value</em> for period <em>p</em>, note not all values are settable.</p>
+<p>After call of set_value you may want to call <a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#aa06fef77acaa6104e3cd2bc80ccc76d9">normalize()</a> 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 <a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#aa06fef77acaa6104e3cd2bc80ccc76d9">normalize()</a>.</p>
+<p>If <a class="el" href="classboost_1_1locale_1_1abstract__calendar.html#aa06fef77acaa6104e3cd2bc80ccc76d9">normalize()</a> is not called after set_value, the behavior is undefined </p>
+
+</div>
+</div>
+<hr/>The documentation for this class was generated from the following file:<ul>
+<li>boost/locale/<a class="el" href="date__time__facet_8hpp_source.html">date_time_facet.hpp</a></li>
+</ul>
+</div>
+<hr class="footer"/><address class="footer"><small>
+&copy; 2009-2011 Artyom Beilis, Distributed under the Boost Software License, Version 1.0.
+</small></address>
+</body>
+</html>

Added: trunk/libs/locale/doc/html/classboost_1_1locale_1_1basic__format-members.html
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/html/classboost_1_1locale_1_1basic__format-members.html 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,88 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>Boost.Locale: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+<!--
+ Switch the lines for stand alone version
+ <link rel="stylesheet" type="text/css" href="http://www.boost.org/style-v2/section-basic.css">
+-->
+<link rel="stylesheet" type="text/css" href="../style/section-basic.css">
+</head>
+<body>
+<div id="boost-common-heading-doc">
+ <div class="heading-inner">
+ <div class="heading-placard"></div>
+
+ <h1 class="heading-title">
+ <a href="http://www.boost.org/">
+ <!--
+ Switch the lines for stand alone version
+ <img src="http://www.boost.org/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ -->
+ <img src="../style/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ <span class="heading-boost">Boost</span>
+ <span class="heading-cpplibraries">C++ Libraries</span>
+ </a>
+ </h1>
+
+ <p class="heading-quote">
+
+ <q>...one of the most highly
+ regarded and expertly designed C++ library projects in the
+ world.</q>
+
+ <span class="heading-attribution">&mdash; <a href=
+ "http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
+ "http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
+ Alexandrescu</a>, <a href=
+ "http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
+ Coding Standards</a></span>
+ </p>
+ </div>
+</div>
+
+<div id="boost-common-heading-doc-spacer"></div>
+<!-- Generated by Doxygen 1.7.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul class="tablist">
+ <li>Main Page</li>
+ <li>Modules</li>
+ <li>Namespaces</li>
+ <li class="current">Classes</li>
+ <li>Files</li>
+ <li>Examples</li>
+ </ul>
+ </div>
+ <div class="tabs2">
+ <ul class="tablist">
+ <li>Class List</li>
+ <li>Class Hierarchy</li>
+ <li>Class Members</li>
+ </ul>
+ </div>
+</div>
+<div class="header">
+ <div class="headertitle">
+<h1>boost::locale::basic_format&lt; CharType &gt; Member List</h1> </div>
+</div>
+<div class="contents">
+This is the complete list of members for <a class="el" href="classboost_1_1locale_1_1basic__format.html">boost::locale::basic_format&lt; CharType &gt;</a>, including all inherited members.<table>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1basic__format.html#a4c885ae60a5b867863b79acb75feff9e">basic_format</a>(string_type format_string)</td><td><a class="el" href="classboost_1_1locale_1_1basic__format.html">boost::locale::basic_format&lt; CharType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1basic__format.html#a155e8e60061da7461bbcc958d600c190">basic_format</a>(message_type const &amp;trans)</td><td><a class="el" href="classboost_1_1locale_1_1basic__format.html">boost::locale::basic_format&lt; CharType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1basic__format.html#a45c16f2e69842b8d223d240bbd6e210a">char_type</a> typedef</td><td><a class="el" href="classboost_1_1locale_1_1basic__format.html">boost::locale::basic_format&lt; CharType &gt;</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1basic__format.html#a75213e5cc9d113f6b25e72542a4841f5">message_type</a> typedef</td><td><a class="el" href="classboost_1_1locale_1_1basic__format.html">boost::locale::basic_format&lt; CharType &gt;</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1basic__format.html#a63e45267da46ff25d09441ac52f21efc">operator%</a>(Formattible const &amp;object)</td><td><a class="el" href="classboost_1_1locale_1_1basic__format.html">boost::locale::basic_format&lt; CharType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1basic__format.html#a6bc65d7993e3ab6ad51809ef8fb65400">str</a>(std::locale const &amp;loc=std::locale()) const </td><td><a class="el" href="classboost_1_1locale_1_1basic__format.html">boost::locale::basic_format&lt; CharType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1basic__format.html#a6aba7e54f0065f2697d13ff8a859309a">stream_type</a> typedef</td><td><a class="el" href="classboost_1_1locale_1_1basic__format.html">boost::locale::basic_format&lt; CharType &gt;</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1basic__format.html#a0e1263d23f67aa38b4d857031fccf973">string_type</a> typedef</td><td><a class="el" href="classboost_1_1locale_1_1basic__format.html">boost::locale::basic_format&lt; CharType &gt;</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1basic__format.html#a457c9228d13e80da3c807a51aa5ef6cd">write</a>(stream_type &amp;out) const </td><td><a class="el" href="classboost_1_1locale_1_1basic__format.html">boost::locale::basic_format&lt; CharType &gt;</a></td><td><code> [inline]</code></td></tr>
+</table></div>
+<hr class="footer"/><address class="footer"><small>
+&copy; 2009-2011 Artyom Beilis, Distributed under the Boost Software License, Version 1.0.
+</small></address>
+</body>
+</html>

Added: trunk/libs/locale/doc/html/classboost_1_1locale_1_1basic__format.html
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/html/classboost_1_1locale_1_1basic__format.html 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,323 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>Boost.Locale: boost::locale::basic_format&lt; CharType &gt; Class Template Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+<!--
+ Switch the lines for stand alone version
+ <link rel="stylesheet" type="text/css" href="http://www.boost.org/style-v2/section-basic.css">
+-->
+<link rel="stylesheet" type="text/css" href="../style/section-basic.css">
+</head>
+<body>
+<div id="boost-common-heading-doc">
+ <div class="heading-inner">
+ <div class="heading-placard"></div>
+
+ <h1 class="heading-title">
+ <a href="http://www.boost.org/">
+ <!--
+ Switch the lines for stand alone version
+ <img src="http://www.boost.org/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ -->
+ <img src="../style/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ <span class="heading-boost">Boost</span>
+ <span class="heading-cpplibraries">C++ Libraries</span>
+ </a>
+ </h1>
+
+ <p class="heading-quote">
+
+ <q>...one of the most highly
+ regarded and expertly designed C++ library projects in the
+ world.</q>
+
+ <span class="heading-attribution">&mdash; <a href=
+ "http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
+ "http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
+ Alexandrescu</a>, <a href=
+ "http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
+ Coding Standards</a></span>
+ </p>
+ </div>
+</div>
+
+<div id="boost-common-heading-doc-spacer"></div>
+<!-- Generated by Doxygen 1.7.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul class="tablist">
+ <li>Main Page</li>
+ <li>Modules</li>
+ <li>Namespaces</li>
+ <li class="current">Classes</li>
+ <li>Files</li>
+ <li>Examples</li>
+ </ul>
+ </div>
+ <div class="tabs2">
+ <ul class="tablist">
+ <li>Class List</li>
+ <li>Class Hierarchy</li>
+ <li>Class Members</li>
+ </ul>
+ </div>
+ <div class="navpath">
+ <ul>
+ <li><b>boost</b> </li>
+ <li><a class="el" href="namespaceboost_1_1locale.html">locale</a> </li>
+ <li><a class="el" href="classboost_1_1locale_1_1basic__format.html">boost::locale::basic_format&lt; CharType &gt;</a> </li>
+ </ul>
+ </div>
+</div>
+<div class="header">
+ <div class="summary">
+Classes &#124;
+Public Types &#124;
+Public Member Functions </div>
+ <div class="headertitle">
+<h1>boost::locale::basic_format&lt; CharType &gt; Class Template Reference<br/>
+<small>
+[<a class="el" href="group__format.html">Format</a>]</small>
+</h1> </div>
+</div>
+<div class="contents">
+<!-- doxytag: class="boost::locale::basic_format" -->
+<p>a printf like class that allows type-safe and locale aware message formatting
+More...</p>
+
+<p><code>#include &lt;<a class="el" href="format_8hpp_source.html">boost/locale/format.hpp</a>&gt;</code></p>
+
+<p>List of all members.</p>
+<table class="memberdecls">
+<tr><td colspan="2"><h2><a name="nested-classes"></a>
+Classes</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><b>format_guard</b></td></tr>
+<tr><td colspan="2"><h2><a name="pub-types"></a>
+Public Types</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a45c16f2e69842b8d223d240bbd6e210a"></a><!-- doxytag: member="boost::locale::basic_format::char_type" ref="a45c16f2e69842b8d223d240bbd6e210a" args="" -->
+typedef CharType&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1basic__format.html#a45c16f2e69842b8d223d240bbd6e210a">char_type</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Underlying character type. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classboost_1_1locale_1_1basic__message.html">basic_message</a>&lt; <a class="el" href="classboost_1_1locale_1_1basic__format.html#a45c16f2e69842b8d223d240bbd6e210a">char_type</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1basic__format.html#a75213e5cc9d113f6b25e72542a4841f5">message_type</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef std::basic_string<br class="typebreak"/>
+&lt; CharType &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1basic__format.html#a0e1263d23f67aa38b4d857031fccf973">string_type</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6aba7e54f0065f2697d13ff8a859309a"></a><!-- doxytag: member="boost::locale::basic_format::stream_type" ref="a6aba7e54f0065f2697d13ff8a859309a" args="" -->
+typedef std::basic_ostream<br class="typebreak"/>
+&lt; CharType &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1basic__format.html#a6aba7e54f0065f2697d13ff8a859309a">stream_type</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">output stream type for this type of character <br/></td></tr>
+<tr><td colspan="2"><h2><a name="pub-methods"></a>
+Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1basic__format.html#a4c885ae60a5b867863b79acb75feff9e">basic_format</a> (<a class="el" href="classboost_1_1locale_1_1basic__format.html#a0e1263d23f67aa38b4d857031fccf973">string_type</a> format_string)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1basic__format.html#a155e8e60061da7461bbcc958d600c190">basic_format</a> (<a class="el" href="classboost_1_1locale_1_1basic__message.html">message_type</a> const &amp;trans)</td></tr>
+<tr><td class="memTemplParams" colspan="2">template&lt;typename Formattible &gt; </td></tr>
+<tr><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1locale_1_1basic__format.html">basic_format</a> &amp;&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1basic__format.html#a63e45267da46ff25d09441ac52f21efc">operator%</a> (Formattible const &amp;object)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1locale_1_1basic__format.html#a0e1263d23f67aa38b4d857031fccf973">string_type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1basic__format.html#a6bc65d7993e3ab6ad51809ef8fb65400">str</a> (std::locale const &amp;loc=std::locale()) const </td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1basic__format.html#a457c9228d13e80da3c807a51aa5ef6cd">write</a> (<a class="el" href="classboost_1_1locale_1_1basic__format.html#a6aba7e54f0065f2697d13ff8a859309a">stream_type</a> &amp;out) const </td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template&lt;typename CharType&gt;<br/>
+ class boost::locale::basic_format&lt; CharType &gt;</h3>
+
+<p>a printf like class that allows type-safe and locale aware message formatting </p>
+<p>This class creates a formatted message similar to printf or boost::format and receives formatted entries via operator %.</p>
+<p>For example </p>
+<div class="fragment"><pre class="fragment"> cout &lt;&lt; <a class="code" href="group__format.html#gad7914df7b54382c1ad7f5360676fe2e8">format</a>(<span class="stringliteral">&quot;Hello {1}, you are {2} years old&quot;</span>) % name % age &lt;&lt; endl;
+</pre></div><p>Formatting is enclosed between curly brackets <code>{</code> <code>}</code> and defined by a comma separated list of flags in the format key[=value] value may also be text included between single quotes <code>'</code> that is used for special purposes where inclusion of non-ASCII text is allowed</p>
+<p>Including of literal <code>{</code> and <code>}</code> is possible by specifying double brackets <code>{{</code> and <code>}}</code> accordingly.</p>
+<p>For example:</p>
+<div class="fragment"><pre class="fragment"> cout &lt;&lt; <a class="code" href="group__format.html#gad7914df7b54382c1ad7f5360676fe2e8">format</a>(<span class="stringliteral">&quot;The height of water at {1,time} is {2,num=fixed,precision=3}&quot;</span>) % <a class="code" href="group__manipulators.html#gae669b101cbeaed6f6d246ebdcaa8f39c">time</a> % height;
+</pre></div><p>The special key -- a number without a value defines the position of an input parameter. List of keys:</p>
+<ul>
+<li><code></code>[0-9]+ -- digits, the index of a formatted parameter -- mandatory key.</li>
+<li><code>num</code> or <code>number</code> -- format a number. Optional values are:<ul>
+<li><code>hex</code> -- display hexadecimal number</li>
+<li><code>oct</code> -- display in octal format</li>
+<li><code>sci</code> or <code>scientific</code> -- display in scientific format</li>
+<li><code>fix</code> or <code>fixed</code> -- display in fixed format</li>
+</ul>
+For example <code>number=sci</code> </li>
+<li><code>cur</code> or <code>currency</code> -- format currency. Optional values are:</li>
+</ul>
+<ul>
+<li><code>iso</code> -- display using ISO currency symbol.</li>
+<li><code>nat</code> or <code>national</code> -- display using national currency symbol.</li>
+</ul>
+<ul>
+<li><code>per</code> or <code>percent</code> -- format percent value.</li>
+<li><code>date</code>, <code>time</code> , <code>datetime</code> or <code>dt</code> -- format date, time or date and time. Optional values are:<ul>
+<li><code>s</code> or <code>short</code> -- display in short format</li>
+<li><code>m</code> or <code>medium</code> -- display in medium format.</li>
+<li><code>l</code> or <code>long</code> -- display in long format.</li>
+<li><code>f</code> or <code>full</code> -- display in full format.</li>
+</ul>
+</li>
+<li><code>ftime</code> with string (quoted) parameter -- display as with <code>strftime</code> see, <code>as::ftime</code> manipulator</li>
+<li><code>spell</code> or <code>spellout</code> -- spell the number.</li>
+<li><code>ord</code> or <code>ordinal</code> -- format ordinal number (1st, 2nd... etc)</li>
+<li><code>left</code> or <code>&lt;</code> -- align to left.</li>
+<li><code>right</code> or <code>&gt;</code> -- align to right.</li>
+<li><code>width</code> or <code>w</code> -- set field width (requires parameter).</li>
+<li><code>precision</code> or <code>p</code> -- set precision (requires parameter).</li>
+<li><code>locale</code> -- with parameter -- switch locale for current operation. This command generates locale with formatting facets giving more fine grained control of formatting. For example: <div class="fragment"><pre class="fragment"> cout &lt;&lt; <a class="code" href="group__format.html#gad7914df7b54382c1ad7f5360676fe2e8">format</a>(<span class="stringliteral">&quot;Today {1,date} ({1,date,locale=he_IL.UTF-8_at_calendar=hebrew,date} Hebrew Date)&quot;</span>) % date;
+</pre></div></li>
+<li><code>timezone</code> or <code>tz</code> -- the name of the timezone to display the time in. For example:<br/>
+ <div class="fragment"><pre class="fragment"> cout &lt;&lt; <a class="code" href="group__format.html#gad7914df7b54382c1ad7f5360676fe2e8">format</a>(<span class="stringliteral">&quot;Time is: Local {1,time}, ({1,time,tz=EET} Eastern European Time)&quot;</span>) % date;
+</pre></div></li>
+<li><code>local</code> - display the time in local time</li>
+<li><code>gmt</code> - display the time in UTC time scale <div class="fragment"><pre class="fragment"> cout &lt;&lt; <a class="code" href="group__format.html#gad7914df7b54382c1ad7f5360676fe2e8">format</a>(<span class="stringliteral">&quot;Local time is: {1,time,local}, universal time is {1,time,gmt}&quot;</span>) % time;
+</pre></div></li>
+</ul>
+<p>Invalid formatting strings are slightly ignored. This would prevent from translator to crash the program in unexpected location. </p>
+<hr/><h2>Member Typedef Documentation</h2>
+<a class="anchor" id="a75213e5cc9d113f6b25e72542a4841f5"></a><!-- doxytag: member="boost::locale::basic_format::message_type" ref="a75213e5cc9d113f6b25e72542a4841f5" args="" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename CharType &gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef <a class="el" href="classboost_1_1locale_1_1basic__message.html">basic_message</a>&lt;<a class="el" href="classboost_1_1locale_1_1basic__format.html#a45c16f2e69842b8d223d240bbd6e210a">char_type</a>&gt; <a class="el" href="classboost_1_1locale_1_1basic__format.html">boost::locale::basic_format</a>&lt; CharType &gt;::<a class="el" href="classboost_1_1locale_1_1basic__message.html">message_type</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>The translation message type </p>
+
+</div>
+</div>
+<a class="anchor" id="a0e1263d23f67aa38b4d857031fccf973"></a><!-- doxytag: member="boost::locale::basic_format::string_type" ref="a0e1263d23f67aa38b4d857031fccf973" args="" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename CharType &gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef std::basic_string&lt;CharType&gt; <a class="el" href="classboost_1_1locale_1_1basic__format.html">boost::locale::basic_format</a>&lt; CharType &gt;::<a class="el" href="classboost_1_1locale_1_1basic__format.html#a0e1263d23f67aa38b4d857031fccf973">string_type</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>string type for this type of character </p>
+
+</div>
+</div>
+<hr/><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" id="a4c885ae60a5b867863b79acb75feff9e"></a><!-- doxytag: member="boost::locale::basic_format::basic_format" ref="a4c885ae60a5b867863b79acb75feff9e" args="(string_type format_string)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename CharType &gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classboost_1_1locale_1_1basic__format.html">boost::locale::basic_format</a>&lt; CharType &gt;::<a class="el" href="classboost_1_1locale_1_1basic__format.html">basic_format</a> </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="classboost_1_1locale_1_1basic__format.html#a0e1263d23f67aa38b4d857031fccf973">string_type</a>&nbsp;</td>
+ <td class="paramname"> <em>format_string</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td><code> [inline]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Create a format class for <em>format_string</em> </p>
+
+</div>
+</div>
+<a class="anchor" id="a155e8e60061da7461bbcc958d600c190"></a><!-- doxytag: member="boost::locale::basic_format::basic_format" ref="a155e8e60061da7461bbcc958d600c190" args="(message_type const &amp;trans)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename CharType &gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classboost_1_1locale_1_1basic__format.html">boost::locale::basic_format</a>&lt; CharType &gt;::<a class="el" href="classboost_1_1locale_1_1basic__format.html">basic_format</a> </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="classboost_1_1locale_1_1basic__message.html">message_type</a> const &amp;&nbsp;</td>
+ <td class="paramname"> <em>trans</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td><code> [inline]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Create a format class using message <em>trans</em>. The message if translated first according to the rules of target locale and then interpreted as format string </p>
+
+</div>
+</div>
+<hr/><h2>Member Function Documentation</h2>
+<a class="anchor" id="a63e45267da46ff25d09441ac52f21efc"></a><!-- doxytag: member="boost::locale::basic_format::operator%" ref="a63e45267da46ff25d09441ac52f21efc" args="(Formattible const &amp;object)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename CharType &gt; </div>
+<div class="memtemplate">
+template&lt;typename Formattible &gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classboost_1_1locale_1_1basic__format.html">basic_format</a>&amp; <a class="el" href="classboost_1_1locale_1_1basic__format.html">boost::locale::basic_format</a>&lt; CharType &gt;::operator% </td>
+ <td>(</td>
+ <td class="paramtype">Formattible const &amp;&nbsp;</td>
+ <td class="paramname"> <em>object</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td><code> [inline]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Add new parameter to format list. The object should be a type with defined expression out &lt;&lt; object where <code>out</code> is <code>std::basic_ostream</code>. </p>
+
+</div>
+</div>
+<a class="anchor" id="a6bc65d7993e3ab6ad51809ef8fb65400"></a><!-- doxytag: member="boost::locale::basic_format::str" ref="a6bc65d7993e3ab6ad51809ef8fb65400" args="(std::locale const &amp;loc=std::locale()) const " -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename CharType &gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classboost_1_1locale_1_1basic__format.html#a0e1263d23f67aa38b4d857031fccf973">string_type</a> <a class="el" href="classboost_1_1locale_1_1basic__format.html">boost::locale::basic_format</a>&lt; CharType &gt;::str </td>
+ <td>(</td>
+ <td class="paramtype">std::locale const &amp;&nbsp;</td>
+ <td class="paramname"> <em>loc</em> = <code>std::locale()</code></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td> const<code> [inline]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Format a string using a locale <em>loc</em> </p>
+
+</div>
+</div>
+<a class="anchor" id="a457c9228d13e80da3c807a51aa5ef6cd"></a><!-- doxytag: member="boost::locale::basic_format::write" ref="a457c9228d13e80da3c807a51aa5ef6cd" args="(stream_type &amp;out) const " -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename CharType &gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname">void <a class="el" href="classboost_1_1locale_1_1basic__format.html">boost::locale::basic_format</a>&lt; CharType &gt;::write </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="classboost_1_1locale_1_1basic__format.html#a6aba7e54f0065f2697d13ff8a859309a">stream_type</a> &amp;&nbsp;</td>
+ <td class="paramname"> <em>out</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td> const<code> [inline]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>write a formatted string to output stream <em>out</em> using out's locale </p>
+
+</div>
+</div>
+<hr/>The documentation for this class was generated from the following file:<ul>
+<li>boost/locale/<a class="el" href="format_8hpp_source.html">format.hpp</a></li>
+</ul>
+</div>
+<hr class="footer"/><address class="footer"><small>
+&copy; 2009-2011 Artyom Beilis, Distributed under the Boost Software License, Version 1.0.
+</small></address>
+</body>
+</html>

Added: trunk/libs/locale/doc/html/classboost_1_1locale_1_1basic__message-members.html
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/html/classboost_1_1locale_1_1basic__message-members.html 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,101 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>Boost.Locale: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+<!--
+ Switch the lines for stand alone version
+ <link rel="stylesheet" type="text/css" href="http://www.boost.org/style-v2/section-basic.css">
+-->
+<link rel="stylesheet" type="text/css" href="../style/section-basic.css">
+</head>
+<body>
+<div id="boost-common-heading-doc">
+ <div class="heading-inner">
+ <div class="heading-placard"></div>
+
+ <h1 class="heading-title">
+ <a href="http://www.boost.org/">
+ <!--
+ Switch the lines for stand alone version
+ <img src="http://www.boost.org/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ -->
+ <img src="../style/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ <span class="heading-boost">Boost</span>
+ <span class="heading-cpplibraries">C++ Libraries</span>
+ </a>
+ </h1>
+
+ <p class="heading-quote">
+
+ <q>...one of the most highly
+ regarded and expertly designed C++ library projects in the
+ world.</q>
+
+ <span class="heading-attribution">&mdash; <a href=
+ "http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
+ "http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
+ Alexandrescu</a>, <a href=
+ "http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
+ Coding Standards</a></span>
+ </p>
+ </div>
+</div>
+
+<div id="boost-common-heading-doc-spacer"></div>
+<!-- Generated by Doxygen 1.7.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul class="tablist">
+ <li>Main Page</li>
+ <li>Modules</li>
+ <li>Namespaces</li>
+ <li class="current">Classes</li>
+ <li>Files</li>
+ <li>Examples</li>
+ </ul>
+ </div>
+ <div class="tabs2">
+ <ul class="tablist">
+ <li>Class List</li>
+ <li>Class Hierarchy</li>
+ <li>Class Members</li>
+ </ul>
+ </div>
+</div>
+<div class="header">
+ <div class="headertitle">
+<h1>boost::locale::basic_message&lt; CharType &gt; Member List</h1> </div>
+</div>
+<div class="contents">
+This is the complete list of members for <a class="el" href="classboost_1_1locale_1_1basic__message.html">boost::locale::basic_message&lt; CharType &gt;</a>, including all inherited members.<table>
+ <tr class="memlist"><td><a class="el" href="group__message.html#ga33bdf7fbb164a96a8685b5747afc2b45">basic_message</a>()</td><td><a class="el" href="classboost_1_1locale_1_1basic__message.html">boost::locale::basic_message&lt; CharType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__message.html#gae32d7f89d5f268e8d6bae662d8008bae">basic_message</a>(char_type const *id)</td><td><a class="el" href="classboost_1_1locale_1_1basic__message.html">boost::locale::basic_message&lt; CharType &gt;</a></td><td><code> [inline, explicit]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__message.html#ga40bf56415a235f13ee666d51f645f280">basic_message</a>(char_type const *single, char_type const *plural, int n)</td><td><a class="el" href="classboost_1_1locale_1_1basic__message.html">boost::locale::basic_message&lt; CharType &gt;</a></td><td><code> [inline, explicit]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__message.html#ga4d78f8f45467984d7244e2ddbb9e0f6e">basic_message</a>(char_type const *context, char_type const *id)</td><td><a class="el" href="classboost_1_1locale_1_1basic__message.html">boost::locale::basic_message&lt; CharType &gt;</a></td><td><code> [inline, explicit]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__message.html#gabf9afe77f0254397389289c386bf8a73">basic_message</a>(char_type const *context, char_type const *single, char_type const *plural, int n)</td><td><a class="el" href="classboost_1_1locale_1_1basic__message.html">boost::locale::basic_message&lt; CharType &gt;</a></td><td><code> [inline, explicit]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__message.html#gabbb4365d621a33442ae34ac7c17a9d74">basic_message</a>(string_type const &amp;id)</td><td><a class="el" href="classboost_1_1locale_1_1basic__message.html">boost::locale::basic_message&lt; CharType &gt;</a></td><td><code> [inline, explicit]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__message.html#ga380f3a258b3b28929bbf01f4e622e71a">basic_message</a>(string_type const &amp;single, string_type const &amp;plural, int number)</td><td><a class="el" href="classboost_1_1locale_1_1basic__message.html">boost::locale::basic_message&lt; CharType &gt;</a></td><td><code> [inline, explicit]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__message.html#ga8c2fab962e10a46ea85f0188d08e499d">basic_message</a>(string_type const &amp;context, string_type const &amp;id)</td><td><a class="el" href="classboost_1_1locale_1_1basic__message.html">boost::locale::basic_message&lt; CharType &gt;</a></td><td><code> [inline, explicit]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__message.html#gaf8ba10b7b1d45e6c78b84d77e8175d5d">basic_message</a>(string_type const &amp;context, string_type const &amp;single, string_type const &amp;plural, int number)</td><td><a class="el" href="classboost_1_1locale_1_1basic__message.html">boost::locale::basic_message&lt; CharType &gt;</a></td><td><code> [inline, explicit]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__message.html#gae6ed9dded4ab78ff28e994b48c766c84">basic_message</a>(basic_message const &amp;other)</td><td><a class="el" href="classboost_1_1locale_1_1basic__message.html">boost::locale::basic_message&lt; CharType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1basic__message.html#aa5d8dcf9d7aa01abbe73c841299345db">char_type</a> typedef</td><td><a class="el" href="classboost_1_1locale_1_1basic__message.html">boost::locale::basic_message&lt; CharType &gt;</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__message.html#gaa63527cb368d0bcd4cb0809138c927df">facet_type</a> typedef</td><td><a class="el" href="classboost_1_1locale_1_1basic__message.html">boost::locale::basic_message&lt; CharType &gt;</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__message.html#ga8da81038939b85ca248cba50f1deacf1">operator string_type</a>() const </td><td><a class="el" href="classboost_1_1locale_1_1basic__message.html">boost::locale::basic_message&lt; CharType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__message.html#gae0e786e45ef32cf73efd8495cae45aed">operator=</a>(basic_message const &amp;other)</td><td><a class="el" href="classboost_1_1locale_1_1basic__message.html">boost::locale::basic_message&lt; CharType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__message.html#ga11c5f400e03e0b16b9a60bd3fae3f168">str</a>() const </td><td><a class="el" href="classboost_1_1locale_1_1basic__message.html">boost::locale::basic_message&lt; CharType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__message.html#ga26c6489f8269096f835abfb268498fdd">str</a>(std::locale const &amp;locale) const </td><td><a class="el" href="classboost_1_1locale_1_1basic__message.html">boost::locale::basic_message&lt; CharType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__message.html#gaa907a1d3f43fe59cea938e1606f004ee">str</a>(std::locale const &amp;locale, std::string const &amp;domain_id) const </td><td><a class="el" href="classboost_1_1locale_1_1basic__message.html">boost::locale::basic_message&lt; CharType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__message.html#ga2d2ca0fe119e4ce4766fd3d42b549314">str</a>(std::string const &amp;domain_id) const </td><td><a class="el" href="classboost_1_1locale_1_1basic__message.html">boost::locale::basic_message&lt; CharType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__message.html#gaa51c0f65363d8d1cee83bb07fe45ced5">str</a>(std::locale const &amp;loc, int id) const </td><td><a class="el" href="classboost_1_1locale_1_1basic__message.html">boost::locale::basic_message&lt; CharType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__message.html#ga529423e08fc9a8ca9ceef5c56181c6d3">string_type</a> typedef</td><td><a class="el" href="classboost_1_1locale_1_1basic__message.html">boost::locale::basic_message&lt; CharType &gt;</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__message.html#gac204b563c7c9bd86e5555f129350f0e3">swap</a>(basic_message &amp;other)</td><td><a class="el" href="classboost_1_1locale_1_1basic__message.html">boost::locale::basic_message&lt; CharType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__message.html#ga4dd81f4d40c4e8871bb1bf02bbc8e968">write</a>(std::basic_ostream&lt; char_type &gt; &amp;out) const </td><td><a class="el" href="classboost_1_1locale_1_1basic__message.html">boost::locale::basic_message&lt; CharType &gt;</a></td><td><code> [inline]</code></td></tr>
+</table></div>
+<hr class="footer"/><address class="footer"><small>
+&copy; 2009-2011 Artyom Beilis, Distributed under the Boost Software License, Version 1.0.
+</small></address>
+</body>
+</html>

Added: trunk/libs/locale/doc/html/classboost_1_1locale_1_1basic__message.html
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/html/classboost_1_1locale_1_1basic__message.html 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,142 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>Boost.Locale: boost::locale::basic_message&lt; CharType &gt; Class Template Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+<!--
+ Switch the lines for stand alone version
+ <link rel="stylesheet" type="text/css" href="http://www.boost.org/style-v2/section-basic.css">
+-->
+<link rel="stylesheet" type="text/css" href="../style/section-basic.css">
+</head>
+<body>
+<div id="boost-common-heading-doc">
+ <div class="heading-inner">
+ <div class="heading-placard"></div>
+
+ <h1 class="heading-title">
+ <a href="http://www.boost.org/">
+ <!--
+ Switch the lines for stand alone version
+ <img src="http://www.boost.org/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ -->
+ <img src="../style/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ <span class="heading-boost">Boost</span>
+ <span class="heading-cpplibraries">C++ Libraries</span>
+ </a>
+ </h1>
+
+ <p class="heading-quote">
+
+ <q>...one of the most highly
+ regarded and expertly designed C++ library projects in the
+ world.</q>
+
+ <span class="heading-attribution">&mdash; <a href=
+ "http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
+ "http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
+ Alexandrescu</a>, <a href=
+ "http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
+ Coding Standards</a></span>
+ </p>
+ </div>
+</div>
+
+<div id="boost-common-heading-doc-spacer"></div>
+<!-- Generated by Doxygen 1.7.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul class="tablist">
+ <li>Main Page</li>
+ <li>Modules</li>
+ <li>Namespaces</li>
+ <li class="current">Classes</li>
+ <li>Files</li>
+ <li>Examples</li>
+ </ul>
+ </div>
+ <div class="tabs2">
+ <ul class="tablist">
+ <li>Class List</li>
+ <li>Class Hierarchy</li>
+ <li>Class Members</li>
+ </ul>
+ </div>
+ <div class="navpath">
+ <ul>
+ <li><b>boost</b> </li>
+ <li><a class="el" href="namespaceboost_1_1locale.html">locale</a> </li>
+ <li><a class="el" href="classboost_1_1locale_1_1basic__message.html">boost::locale::basic_message&lt; CharType &gt;</a> </li>
+ </ul>
+ </div>
+</div>
+<div class="header">
+ <div class="summary">
+Public Types &#124;
+Public Member Functions </div>
+ <div class="headertitle">
+<h1>boost::locale::basic_message&lt; CharType &gt; Class Template Reference<br/>
+<small>
+[<a class="el" href="group__message.html">Message Formatting (translation)</a>]</small>
+</h1> </div>
+</div>
+<div class="contents">
+<!-- doxytag: class="boost::locale::basic_message" -->
+<p>This class represents a message that can be converted to a specific locale message.
+More...</p>
+
+<p><code>#include &lt;<a class="el" href="message_8hpp_source.html">boost/locale/message.hpp</a>&gt;</code></p>
+
+<p>List of all members.</p>
+<table class="memberdecls">
+<tr><td colspan="2"><h2><a name="pub-types"></a>
+Public Types</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa5d8dcf9d7aa01abbe73c841299345db"></a><!-- doxytag: member="boost::locale::basic_message::char_type" ref="aa5d8dcf9d7aa01abbe73c841299345db" args="" -->
+typedef CharType&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1basic__message.html#aa5d8dcf9d7aa01abbe73c841299345db">char_type</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The character this message object is used with. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga529423e08fc9a8ca9ceef5c56181c6d3"></a><!-- doxytag: member="boost::locale::basic_message::string_type" ref="ga529423e08fc9a8ca9ceef5c56181c6d3" args="" -->
+typedef std::basic_string<br class="typebreak"/>
+&lt; <a class="el" href="classboost_1_1locale_1_1basic__message.html#aa5d8dcf9d7aa01abbe73c841299345db">char_type</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__message.html#ga529423e08fc9a8ca9ceef5c56181c6d3">string_type</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The string type this object can be used with. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaa63527cb368d0bcd4cb0809138c927df"></a><!-- doxytag: member="boost::locale::basic_message::facet_type" ref="gaa63527cb368d0bcd4cb0809138c927df" args="" -->
+typedef <a class="el" href="classboost_1_1locale_1_1message__format.html">message_format</a>&lt; <a class="el" href="classboost_1_1locale_1_1basic__message.html#aa5d8dcf9d7aa01abbe73c841299345db">char_type</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__message.html#gaa63527cb368d0bcd4cb0809138c927df">facet_type</a></td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The type of the facet the messages are fetched with. <br/></td></tr>
+<tr><td colspan="2"><h2><a name="pub-methods"></a>
+Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__message.html#ga33bdf7fbb164a96a8685b5747afc2b45">basic_message</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__message.html#gae32d7f89d5f268e8d6bae662d8008bae">basic_message</a> (<a class="el" href="classboost_1_1locale_1_1basic__message.html#aa5d8dcf9d7aa01abbe73c841299345db">char_type</a> const *id)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__message.html#ga40bf56415a235f13ee666d51f645f280">basic_message</a> (<a class="el" href="classboost_1_1locale_1_1basic__message.html#aa5d8dcf9d7aa01abbe73c841299345db">char_type</a> const *single, <a class="el" href="classboost_1_1locale_1_1basic__message.html#aa5d8dcf9d7aa01abbe73c841299345db">char_type</a> const *plural, int n)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__message.html#ga4d78f8f45467984d7244e2ddbb9e0f6e">basic_message</a> (<a class="el" href="classboost_1_1locale_1_1basic__message.html#aa5d8dcf9d7aa01abbe73c841299345db">char_type</a> const *context, <a class="el" href="classboost_1_1locale_1_1basic__message.html#aa5d8dcf9d7aa01abbe73c841299345db">char_type</a> const *id)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__message.html#gabf9afe77f0254397389289c386bf8a73">basic_message</a> (<a class="el" href="classboost_1_1locale_1_1basic__message.html#aa5d8dcf9d7aa01abbe73c841299345db">char_type</a> const *context, <a class="el" href="classboost_1_1locale_1_1basic__message.html#aa5d8dcf9d7aa01abbe73c841299345db">char_type</a> const *single, <a class="el" href="classboost_1_1locale_1_1basic__message.html#aa5d8dcf9d7aa01abbe73c841299345db">char_type</a> const *plural, int n)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__message.html#gabbb4365d621a33442ae34ac7c17a9d74">basic_message</a> (<a class="el" href="group__message.html#ga529423e08fc9a8ca9ceef5c56181c6d3">string_type</a> const &amp;id)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__message.html#ga380f3a258b3b28929bbf01f4e622e71a">basic_message</a> (<a class="el" href="group__message.html#ga529423e08fc9a8ca9ceef5c56181c6d3">string_type</a> const &amp;single, <a class="el" href="group__message.html#ga529423e08fc9a8ca9ceef5c56181c6d3">string_type</a> const &amp;plural, int number)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__message.html#ga8c2fab962e10a46ea85f0188d08e499d">basic_message</a> (<a class="el" href="group__message.html#ga529423e08fc9a8ca9ceef5c56181c6d3">string_type</a> const &amp;context, <a class="el" href="group__message.html#ga529423e08fc9a8ca9ceef5c56181c6d3">string_type</a> const &amp;id)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__message.html#gaf8ba10b7b1d45e6c78b84d77e8175d5d">basic_message</a> (<a class="el" href="group__message.html#ga529423e08fc9a8ca9ceef5c56181c6d3">string_type</a> const &amp;context, <a class="el" href="group__message.html#ga529423e08fc9a8ca9ceef5c56181c6d3">string_type</a> const &amp;single, <a class="el" href="group__message.html#ga529423e08fc9a8ca9ceef5c56181c6d3">string_type</a> const &amp;plural, int number)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__message.html#gae6ed9dded4ab78ff28e994b48c766c84">basic_message</a> (<a class="el" href="classboost_1_1locale_1_1basic__message.html">basic_message</a> const &amp;other)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1locale_1_1basic__message.html">basic_message</a> const &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__message.html#gae0e786e45ef32cf73efd8495cae45aed">operator=</a> (<a class="el" href="classboost_1_1locale_1_1basic__message.html">basic_message</a> const &amp;other)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__message.html#gac204b563c7c9bd86e5555f129350f0e3">swap</a> (<a class="el" href="classboost_1_1locale_1_1basic__message.html">basic_message</a> &amp;other)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__message.html#ga8da81038939b85ca248cba50f1deacf1">operator string_type</a> () const </td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__message.html#ga529423e08fc9a8ca9ceef5c56181c6d3">string_type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__message.html#ga11c5f400e03e0b16b9a60bd3fae3f168">str</a> () const </td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__message.html#ga529423e08fc9a8ca9ceef5c56181c6d3">string_type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__message.html#ga26c6489f8269096f835abfb268498fdd">str</a> (std::locale const &amp;locale) const </td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__message.html#ga529423e08fc9a8ca9ceef5c56181c6d3">string_type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__message.html#gaa907a1d3f43fe59cea938e1606f004ee">str</a> (std::locale const &amp;locale, std::string const &amp;domain_id) const </td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__message.html#ga529423e08fc9a8ca9ceef5c56181c6d3">string_type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__message.html#ga2d2ca0fe119e4ce4766fd3d42b549314">str</a> (std::string const &amp;domain_id) const </td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__message.html#ga529423e08fc9a8ca9ceef5c56181c6d3">string_type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__message.html#gaa51c0f65363d8d1cee83bb07fe45ced5">str</a> (std::locale const &amp;loc, int id) const </td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__message.html#ga4dd81f4d40c4e8871bb1bf02bbc8e968">write</a> (std::basic_ostream&lt; <a class="el" href="classboost_1_1locale_1_1basic__message.html#aa5d8dcf9d7aa01abbe73c841299345db">char_type</a> &gt; &amp;out) const </td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template&lt;typename CharType&gt;<br/>
+ class boost::locale::basic_message&lt; CharType &gt;</h3>
+
+<p>This class represents a message that can be converted to a specific locale message. </p>
+<p>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. </p>
+<hr/>The documentation for this class was generated from the following file:<ul>
+<li>boost/locale/<a class="el" href="message_8hpp_source.html">message.hpp</a></li>
+</ul>
+</div>
+<hr class="footer"/><address class="footer"><small>
+&copy; 2009-2011 Artyom Beilis, Distributed under the Boost Software License, Version 1.0.
+</small></address>
+</body>
+</html>

Added: trunk/libs/locale/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__indexing-members.html
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__indexing-members.html 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,82 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>Boost.Locale: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+<!--
+ Switch the lines for stand alone version
+ <link rel="stylesheet" type="text/css" href="http://www.boost.org/style-v2/section-basic.css">
+-->
+<link rel="stylesheet" type="text/css" href="../style/section-basic.css">
+</head>
+<body>
+<div id="boost-common-heading-doc">
+ <div class="heading-inner">
+ <div class="heading-placard"></div>
+
+ <h1 class="heading-title">
+ <a href="http://www.boost.org/">
+ <!--
+ Switch the lines for stand alone version
+ <img src="http://www.boost.org/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ -->
+ <img src="../style/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ <span class="heading-boost">Boost</span>
+ <span class="heading-cpplibraries">C++ Libraries</span>
+ </a>
+ </h1>
+
+ <p class="heading-quote">
+
+ <q>...one of the most highly
+ regarded and expertly designed C++ library projects in the
+ world.</q>
+
+ <span class="heading-attribution">&mdash; <a href=
+ "http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
+ "http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
+ Alexandrescu</a>, <a href=
+ "http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
+ Coding Standards</a></span>
+ </p>
+ </div>
+</div>
+
+<div id="boost-common-heading-doc-spacer"></div>
+<!-- Generated by Doxygen 1.7.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul class="tablist">
+ <li>Main Page</li>
+ <li>Modules</li>
+ <li>Namespaces</li>
+ <li class="current">Classes</li>
+ <li>Files</li>
+ <li>Examples</li>
+ </ul>
+ </div>
+ <div class="tabs2">
+ <ul class="tablist">
+ <li>Class List</li>
+ <li>Class Hierarchy</li>
+ <li>Class Members</li>
+ </ul>
+ </div>
+</div>
+<div class="header">
+ <div class="headertitle">
+<h1>boost::locale::boundary::boundary_indexing&lt; Char &gt; Member List</h1> </div>
+</div>
+<div class="contents">
+This is the complete list of members for <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__indexing.html">boost::locale::boundary::boundary_indexing&lt; Char &gt;</a>, including all inherited members.<table>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__indexing.html#a251d097b8498d6dade6110b0829c8cf5">boundary_indexing</a>(size_t refs=0)</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__indexing.html">boost::locale::boundary::boundary_indexing&lt; Char &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__indexing.html#a6ec435e58e34f70046f62ac0314c1a58">id</a></td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__indexing.html">boost::locale::boundary::boundary_indexing&lt; Char &gt;</a></td><td><code> [static]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__indexing.html#aee429a6d57b48b6f7dda3d03a67d6501">map</a>(boundary_type t, Char const *begin, Char const *end) const =0</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__indexing.html">boost::locale::boundary::boundary_indexing&lt; Char &gt;</a></td><td><code> [pure virtual]</code></td></tr>
+</table></div>
+<hr class="footer"/><address class="footer"><small>
+&copy; 2009-2011 Artyom Beilis, Distributed under the Boost Software License, Version 1.0.
+</small></address>
+</body>
+</html>

Added: trunk/libs/locale/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__indexing.html
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__indexing.html 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,194 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>Boost.Locale: boost::locale::boundary::boundary_indexing&lt; Char &gt; Class Template Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+<!--
+ Switch the lines for stand alone version
+ <link rel="stylesheet" type="text/css" href="http://www.boost.org/style-v2/section-basic.css">
+-->
+<link rel="stylesheet" type="text/css" href="../style/section-basic.css">
+</head>
+<body>
+<div id="boost-common-heading-doc">
+ <div class="heading-inner">
+ <div class="heading-placard"></div>
+
+ <h1 class="heading-title">
+ <a href="http://www.boost.org/">
+ <!--
+ Switch the lines for stand alone version
+ <img src="http://www.boost.org/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ -->
+ <img src="../style/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ <span class="heading-boost">Boost</span>
+ <span class="heading-cpplibraries">C++ Libraries</span>
+ </a>
+ </h1>
+
+ <p class="heading-quote">
+
+ <q>...one of the most highly
+ regarded and expertly designed C++ library projects in the
+ world.</q>
+
+ <span class="heading-attribution">&mdash; <a href=
+ "http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
+ "http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
+ Alexandrescu</a>, <a href=
+ "http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
+ Coding Standards</a></span>
+ </p>
+ </div>
+</div>
+
+<div id="boost-common-heading-doc-spacer"></div>
+<!-- Generated by Doxygen 1.7.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul class="tablist">
+ <li>Main Page</li>
+ <li>Modules</li>
+ <li>Namespaces</li>
+ <li class="current">Classes</li>
+ <li>Files</li>
+ <li>Examples</li>
+ </ul>
+ </div>
+ <div class="tabs2">
+ <ul class="tablist">
+ <li>Class List</li>
+ <li>Class Hierarchy</li>
+ <li>Class Members</li>
+ </ul>
+ </div>
+ <div class="navpath">
+ <ul>
+ <li><b>boost</b> </li>
+ <li><a class="el" href="namespaceboost_1_1locale.html">locale</a> </li>
+ <li><a class="el" href="namespaceboost_1_1locale_1_1boundary.html">boundary</a> </li>
+ <li><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__indexing.html">boost::locale::boundary::boundary_indexing&lt; Char &gt;</a> </li>
+ </ul>
+ </div>
+</div>
+<div class="header">
+ <div class="summary">
+Public Member Functions &#124;
+Static Public Attributes </div>
+ <div class="headertitle">
+<h1>boost::locale::boundary::boundary_indexing&lt; Char &gt; Class Template Reference<br/>
+<small>
+[<a class="el" href="group__boundary.html">Boundary Analysis</a>]</small>
+</h1> </div>
+</div>
+<div class="contents">
+<!-- doxytag: class="boost::locale::boundary::boundary_indexing" -->
+<p>This facet generates an index for boundary analysis for a given text.
+More...</p>
+
+<p><code>#include &lt;<a class="el" href="facets_8hpp_source.html">boost/locale/boundary/facets.hpp</a>&gt;</code></p>
+
+<p>List of all members.</p>
+<table class="memberdecls">
+<tr><td colspan="2"><h2><a name="pub-methods"></a>
+Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__indexing.html#a251d097b8498d6dade6110b0829c8cf5">boundary_indexing</a> (size_t refs=0)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="group__boundary.html#ga7b4dd7af8fad53fabd77e629da24d466">index_type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__indexing.html#aee429a6d57b48b6f7dda3d03a67d6501">map</a> (<a class="el" href="group__boundary.html#ga15de9963ce9bb6037c8525901dfbf641">boundary_type</a> t, Char const *begin, Char const *end) const =0</td></tr>
+<tr><td colspan="2"><h2><a name="pub-static-attribs"></a>
+Static Public Attributes</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">static std::locale::id&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__indexing.html#a6ec435e58e34f70046f62ac0314c1a58">id</a></td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template&lt;typename Char&gt;<br/>
+ class boost::locale::boundary::boundary_indexing&lt; Char &gt;</h3>
+
+<p>This facet generates an index for boundary analysis for a given text. </p>
+<p>It is specialized for 4 types of characters <code>char_t</code>, <code>wchar_t</code>, <code>char16_t</code> and <code>char32_t</code> </p>
+<hr/><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" id="a251d097b8498d6dade6110b0829c8cf5"></a><!-- doxytag: member="boost::locale::boundary::boundary_indexing::boundary_indexing" ref="a251d097b8498d6dade6110b0829c8cf5" args="(size_t refs=0)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename Char &gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__indexing.html">boost::locale::boundary::boundary_indexing</a>&lt; Char &gt;::<a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__indexing.html">boundary_indexing</a> </td>
+ <td>(</td>
+ <td class="paramtype">size_t&nbsp;</td>
+ <td class="paramname"> <em>refs</em> = <code>0</code></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td><code> [inline]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Default constructor typical for facets </p>
+
+</div>
+</div>
+<hr/><h2>Member Function Documentation</h2>
+<a class="anchor" id="aee429a6d57b48b6f7dda3d03a67d6501"></a><!-- doxytag: member="boost::locale::boundary::boundary_indexing::map" ref="aee429a6d57b48b6f7dda3d03a67d6501" args="(boundary_type t, Char const *begin, Char const *end) const =0" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename Char &gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname">virtual <a class="el" href="group__boundary.html#ga7b4dd7af8fad53fabd77e629da24d466">index_type</a> <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__indexing.html">boost::locale::boundary::boundary_indexing</a>&lt; Char &gt;::map </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="group__boundary.html#ga15de9963ce9bb6037c8525901dfbf641">boundary_type</a>&nbsp;</td>
+ <td class="paramname"> <em>t</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">Char const *&nbsp;</td>
+ <td class="paramname"> <em>begin</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">Char const *&nbsp;</td>
+ <td class="paramname"> <em>end</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td> const<code> [pure virtual]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Create index for boundary type <em>t</em> for text in range [begin,end)</p>
+<p>The returned value is an index of type <a class="el" href="group__boundary.html#ga7b4dd7af8fad53fabd77e629da24d466">index_type</a>. 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. </p>
+
+</div>
+</div>
+<hr/><h2>Member Data Documentation</h2>
+<a class="anchor" id="a6ec435e58e34f70046f62ac0314c1a58"></a><!-- doxytag: member="boost::locale::boundary::boundary_indexing::id" ref="a6ec435e58e34f70046f62ac0314c1a58" args="" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename Char &gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname">std::locale::id <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__indexing.html">boost::locale::boundary::boundary_indexing</a>&lt; Char &gt;::<a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__indexing.html#a6ec435e58e34f70046f62ac0314c1a58">id</a><code> [static]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Identification of this facet </p>
+
+</div>
+</div>
+<hr/>The documentation for this class was generated from the following file:<ul>
+<li>boost/locale/boundary/<a class="el" href="facets_8hpp_source.html">facets.hpp</a></li>
+</ul>
+</div>
+<hr class="footer"/><address class="footer"><small>
+&copy; 2009-2011 Artyom Beilis, Distributed under the Boost Software License, Version 1.0.
+</small></address>
+</body>
+</html>

Added: trunk/libs/locale/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point-members.html
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point-members.html 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,91 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>Boost.Locale: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+<!--
+ Switch the lines for stand alone version
+ <link rel="stylesheet" type="text/css" href="http://www.boost.org/style-v2/section-basic.css">
+-->
+<link rel="stylesheet" type="text/css" href="../style/section-basic.css">
+</head>
+<body>
+<div id="boost-common-heading-doc">
+ <div class="heading-inner">
+ <div class="heading-placard"></div>
+
+ <h1 class="heading-title">
+ <a href="http://www.boost.org/">
+ <!--
+ Switch the lines for stand alone version
+ <img src="http://www.boost.org/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ -->
+ <img src="../style/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ <span class="heading-boost">Boost</span>
+ <span class="heading-cpplibraries">C++ Libraries</span>
+ </a>
+ </h1>
+
+ <p class="heading-quote">
+
+ <q>...one of the most highly
+ regarded and expertly designed C++ library projects in the
+ world.</q>
+
+ <span class="heading-attribution">&mdash; <a href=
+ "http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
+ "http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
+ Alexandrescu</a>, <a href=
+ "http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
+ Coding Standards</a></span>
+ </p>
+ </div>
+</div>
+
+<div id="boost-common-heading-doc-spacer"></div>
+<!-- Generated by Doxygen 1.7.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul class="tablist">
+ <li>Main Page</li>
+ <li>Modules</li>
+ <li>Namespaces</li>
+ <li class="current">Classes</li>
+ <li>Files</li>
+ <li>Examples</li>
+ </ul>
+ </div>
+ <div class="tabs2">
+ <ul class="tablist">
+ <li>Class List</li>
+ <li>Class Hierarchy</li>
+ <li>Class Members</li>
+ </ul>
+ </div>
+</div>
+<div class="header">
+ <div class="headertitle">
+<h1>boost::locale::boundary::boundary_point&lt; IteratorType &gt; Member List</h1> </div>
+</div>
+<div class="contents">
+This is the complete list of members for <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point&lt; IteratorType &gt;</a>, including all inherited members.<table>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#aabbbee60c2c97ffd95210206a86c9298">boundary_point</a>()</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point&lt; IteratorType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a653a1c0d7480006ff647a656c74521df">boundary_point</a>(iterator_type p, rule_type r)</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point&lt; IteratorType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a5ea18137618a1a84ff0b75c3b166c495">iterator</a>(iterator_type i)</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point&lt; IteratorType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af279d5382e1b28c2ce82035c1929ea66">iterator</a>() const </td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point&lt; IteratorType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a> typedef</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point&lt; IteratorType &gt;</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#aa2dc88b4d02151aea939a01b7fc88730">operator iterator_type</a>() const </td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point&lt; IteratorType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a4347b22dd7edb8af49d1316a6f86d0c2">operator!=</a>(boundary_point const &amp;other) const </td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point&lt; IteratorType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a4cd03f39d75bb054be9a0ae23189fa7a">operator!=</a>(iterator_type const &amp;other) const </td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point&lt; IteratorType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a058ffbcbd43fc41a40a4a1cf5be987f2">operator==</a>(boundary_point const &amp;other) const </td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point&lt; IteratorType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a87a96a1745184ff7495db87943aca424">operator==</a>(iterator_type const &amp;other) const </td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point&lt; IteratorType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a757b28e11c66f9871d3f51fe93a51bdb">rule</a>(rule_type r)</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point&lt; IteratorType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a75e2f04f0f7c1065470f722d1f2e004b">rule</a>() const </td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point&lt; IteratorType &gt;</a></td><td><code> [inline]</code></td></tr>
+</table></div>
+<hr class="footer"/><address class="footer"><small>
+&copy; 2009-2011 Artyom Beilis, Distributed under the Boost Software License, Version 1.0.
+</small></address>
+</body>
+</html>

Added: trunk/libs/locale/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point.html
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point.html 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,394 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>Boost.Locale: boost::locale::boundary::boundary_point&lt; IteratorType &gt; Class Template Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+<!--
+ Switch the lines for stand alone version
+ <link rel="stylesheet" type="text/css" href="http://www.boost.org/style-v2/section-basic.css">
+-->
+<link rel="stylesheet" type="text/css" href="../style/section-basic.css">
+</head>
+<body>
+<div id="boost-common-heading-doc">
+ <div class="heading-inner">
+ <div class="heading-placard"></div>
+
+ <h1 class="heading-title">
+ <a href="http://www.boost.org/">
+ <!--
+ Switch the lines for stand alone version
+ <img src="http://www.boost.org/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ -->
+ <img src="../style/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ <span class="heading-boost">Boost</span>
+ <span class="heading-cpplibraries">C++ Libraries</span>
+ </a>
+ </h1>
+
+ <p class="heading-quote">
+
+ <q>...one of the most highly
+ regarded and expertly designed C++ library projects in the
+ world.</q>
+
+ <span class="heading-attribution">&mdash; <a href=
+ "http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
+ "http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
+ Alexandrescu</a>, <a href=
+ "http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
+ Coding Standards</a></span>
+ </p>
+ </div>
+</div>
+
+<div id="boost-common-heading-doc-spacer"></div>
+<!-- Generated by Doxygen 1.7.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul class="tablist">
+ <li>Main Page</li>
+ <li>Modules</li>
+ <li>Namespaces</li>
+ <li class="current">Classes</li>
+ <li>Files</li>
+ <li>Examples</li>
+ </ul>
+ </div>
+ <div class="tabs2">
+ <ul class="tablist">
+ <li>Class List</li>
+ <li>Class Hierarchy</li>
+ <li>Class Members</li>
+ </ul>
+ </div>
+ <div class="navpath">
+ <ul>
+ <li><b>boost</b> </li>
+ <li><a class="el" href="namespaceboost_1_1locale.html">locale</a> </li>
+ <li><a class="el" href="namespaceboost_1_1locale_1_1boundary.html">boundary</a> </li>
+ <li><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point&lt; IteratorType &gt;</a> </li>
+ </ul>
+ </div>
+</div>
+<div class="header">
+ <div class="summary">
+Public Types &#124;
+Public Member Functions </div>
+ <div class="headertitle">
+<h1>boost::locale::boundary::boundary_point&lt; IteratorType &gt; Class Template Reference<br/>
+<small>
+[<a class="el" href="group__boundary.html">Boundary Analysis</a>]</small>
+</h1> </div>
+</div>
+<div class="contents">
+<!-- doxytag: class="boost::locale::boundary::boundary_point" -->
+<p>This class represents a boundary point in the text.
+More...</p>
+
+<p><code>#include &lt;<a class="el" href="boundary__point_8hpp_source.html">boost/locale/boundary/boundary_point.hpp</a>&gt;</code></p>
+
+<p>List of all members.</p>
+<table class="memberdecls">
+<tr><td colspan="2"><h2><a name="pub-types"></a>
+Public Types</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef IteratorType&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a></td></tr>
+<tr><td colspan="2"><h2><a name="pub-methods"></a>
+Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#aabbbee60c2c97ffd95210206a86c9298">boundary_point</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a653a1c0d7480006ff647a656c74521df">boundary_point</a> (<a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a> p, <a class="el" href="group__boundary.html#ga25e193c81052ef1795f1b53b46bc2095">rule_type</a> r)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a5ea18137618a1a84ff0b75c3b166c495">iterator</a> (<a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a> i)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a757b28e11c66f9871d3f51fe93a51bdb">rule</a> (<a class="el" href="group__boundary.html#ga25e193c81052ef1795f1b53b46bc2095">rule_type</a> r)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af279d5382e1b28c2ce82035c1929ea66">iterator</a> () const </td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__boundary.html#ga25e193c81052ef1795f1b53b46bc2095">rule_type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a75e2f04f0f7c1065470f722d1f2e004b">rule</a> () const </td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a058ffbcbd43fc41a40a4a1cf5be987f2">operator==</a> (<a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boundary_point</a> const &amp;other) const </td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a4347b22dd7edb8af49d1316a6f86d0c2">operator!=</a> (<a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boundary_point</a> const &amp;other) const </td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a87a96a1745184ff7495db87943aca424">operator==</a> (<a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a> const &amp;other) const </td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a4cd03f39d75bb054be9a0ae23189fa7a">operator!=</a> (<a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a> const &amp;other) const </td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#aa2dc88b4d02151aea939a01b7fc88730">operator iterator_type</a> () const </td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template&lt;typename IteratorType&gt;<br/>
+ class boost::locale::boundary::boundary_point&lt; IteratorType &gt;</h3>
+
+<p>This class represents a boundary point in the text. </p>
+<p>It represents a pair - an iterator and a rule that defines this point.</p>
+<p>This type of object is dereference by the iterators of <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html" title="This class holds an index of boundary points and allows iterating over them.">boundary_point_index</a>. Using a <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a757b28e11c66f9871d3f51fe93a51bdb">rule()</a> member function you can get the reason why this specific boundary point was selected.</p>
+<p>For example, When you use a sentence boundary analysis, the (<a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a757b28e11c66f9871d3f51fe93a51bdb">rule()</a> &amp; <a class="el" href="group__boundary.html#ga3befefe67f79691c117bf5588741355b">sentence_term</a>) != 0 means that this boundary point was selected because a sentence terminator (like .?!) was spotted and the (<a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a757b28e11c66f9871d3f51fe93a51bdb">rule()</a> &amp; <a class="el" href="group__boundary.html#gaf67883341dd3d8f786e7281d40790000">sentence_sep</a>)!=0 means that a separator like line feed or carriage return was observed.</p>
+<dl class="note"><dt><b>Note:</b></dt><dd></dd></dl>
+<ul>
+<li>The beginning of analyzed range is always considered a boundary point and its rule is always 0.</li>
+<li>when using a word boundary analysis the returned rule relates to a chunk of text preceding this point.</li>
+</ul>
+<dl class="see"><dt><b>See also:</b></dt><dd></dd></dl>
+<ul>
+<li><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boundary_point_index</a></li>
+<li><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">segment</a></li>
+<li><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment__index.html">segment_index</a> </li>
+</ul>
+<hr/><h2>Member Typedef Documentation</h2>
+<a class="anchor" id="af3c3a74a9a79690ff44f38d267b3b694"></a><!-- doxytag: member="boost::locale::boundary::boundary_point::iterator_type" ref="af3c3a74a9a79690ff44f38d267b3b694" args="" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename IteratorType&gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef IteratorType <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point</a>&lt; IteratorType &gt;::<a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>The type of the base iterator that iterates the original text </p>
+
+</div>
+</div>
+<hr/><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" id="aabbbee60c2c97ffd95210206a86c9298"></a><!-- doxytag: member="boost::locale::boundary::boundary_point::boundary_point" ref="aabbbee60c2c97ffd95210206a86c9298" args="()" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename IteratorType&gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point</a>&lt; IteratorType &gt;::<a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boundary_point</a> </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td><code> [inline]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Empty default constructor </p>
+
+</div>
+</div>
+<a class="anchor" id="a653a1c0d7480006ff647a656c74521df"></a><!-- doxytag: member="boost::locale::boundary::boundary_point::boundary_point" ref="a653a1c0d7480006ff647a656c74521df" args="(iterator_type p, rule_type r)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename IteratorType&gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point</a>&lt; IteratorType &gt;::<a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boundary_point</a> </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a>&nbsp;</td>
+ <td class="paramname"> <em>p</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="group__boundary.html#ga25e193c81052ef1795f1b53b46bc2095">rule_type</a>&nbsp;</td>
+ <td class="paramname"> <em>r</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td><code> [inline]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Create a new <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point</a> using iterator <code>and</code> a rule <em>r</em> </p>
+
+</div>
+</div>
+<hr/><h2>Member Function Documentation</h2>
+<a class="anchor" id="a5ea18137618a1a84ff0b75c3b166c495"></a><!-- doxytag: member="boost::locale::boundary::boundary_point::iterator" ref="a5ea18137618a1a84ff0b75c3b166c495" args="(iterator_type i)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename IteratorType&gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname">void <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point</a>&lt; IteratorType &gt;::iterator </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a>&nbsp;</td>
+ <td class="paramname"> <em>i</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td><code> [inline]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Set an new iterator value <em>i</em> </p>
+
+</div>
+</div>
+<a class="anchor" id="af279d5382e1b28c2ce82035c1929ea66"></a><!-- doxytag: member="boost::locale::boundary::boundary_point::iterator" ref="af279d5382e1b28c2ce82035c1929ea66" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename IteratorType&gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a> <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point</a>&lt; IteratorType &gt;::iterator </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td> const<code> [inline]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Fetch an iterator </p>
+
+</div>
+</div>
+<a class="anchor" id="aa2dc88b4d02151aea939a01b7fc88730"></a><!-- doxytag: member="boost::locale::boundary::boundary_point::operator iterator_type" ref="aa2dc88b4d02151aea939a01b7fc88730" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename IteratorType&gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point</a>&lt; IteratorType &gt;::operator <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a> </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td> const<code> [inline]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Automatic cast to the iterator it represents </p>
+
+</div>
+</div>
+<a class="anchor" id="a4cd03f39d75bb054be9a0ae23189fa7a"></a><!-- doxytag: member="boost::locale::boundary::boundary_point::operator!=" ref="a4cd03f39d75bb054be9a0ae23189fa7a" args="(iterator_type const &amp;other) const " -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename IteratorType&gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname">bool <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point</a>&lt; IteratorType &gt;::operator!= </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a> const &amp;&nbsp;</td>
+ <td class="paramname"> <em>other</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td> const<code> [inline]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Check if the boundary point points to different location from an iterator <em>other</em> </p>
+
+</div>
+</div>
+<a class="anchor" id="a4347b22dd7edb8af49d1316a6f86d0c2"></a><!-- doxytag: member="boost::locale::boundary::boundary_point::operator!=" ref="a4347b22dd7edb8af49d1316a6f86d0c2" args="(boundary_point const &amp;other) const " -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename IteratorType&gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname">bool <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point</a>&lt; IteratorType &gt;::operator!= </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boundary_point</a>&lt; IteratorType &gt; const &amp;&nbsp;</td>
+ <td class="paramname"> <em>other</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td> const<code> [inline]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Check if two boundary points are different </p>
+
+</div>
+</div>
+<a class="anchor" id="a87a96a1745184ff7495db87943aca424"></a><!-- doxytag: member="boost::locale::boundary::boundary_point::operator==" ref="a87a96a1745184ff7495db87943aca424" args="(iterator_type const &amp;other) const " -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename IteratorType&gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname">bool <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point</a>&lt; IteratorType &gt;::operator== </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a> const &amp;&nbsp;</td>
+ <td class="paramname"> <em>other</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td> const<code> [inline]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Check if the boundary point points to same location as an iterator <em>other</em> </p>
+
+</div>
+</div>
+<a class="anchor" id="a058ffbcbd43fc41a40a4a1cf5be987f2"></a><!-- doxytag: member="boost::locale::boundary::boundary_point::operator==" ref="a058ffbcbd43fc41a40a4a1cf5be987f2" args="(boundary_point const &amp;other) const " -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename IteratorType&gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname">bool <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point</a>&lt; IteratorType &gt;::operator== </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boundary_point</a>&lt; IteratorType &gt; const &amp;&nbsp;</td>
+ <td class="paramname"> <em>other</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td> const<code> [inline]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Check if two boundary points are the same </p>
+
+</div>
+</div>
+<a class="anchor" id="a75e2f04f0f7c1065470f722d1f2e004b"></a><!-- doxytag: member="boost::locale::boundary::boundary_point::rule" ref="a75e2f04f0f7c1065470f722d1f2e004b" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename IteratorType&gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="group__boundary.html#ga25e193c81052ef1795f1b53b46bc2095">rule_type</a> <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point</a>&lt; IteratorType &gt;::rule </td>
+ <td>(</td>
+ <td class="paramname"></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td> const<code> [inline]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Fetch a rule </p>
+
+</div>
+</div>
+<a class="anchor" id="a757b28e11c66f9871d3f51fe93a51bdb"></a><!-- doxytag: member="boost::locale::boundary::boundary_point::rule" ref="a757b28e11c66f9871d3f51fe93a51bdb" args="(rule_type r)" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename IteratorType&gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname">void <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boost::locale::boundary::boundary_point</a>&lt; IteratorType &gt;::rule </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="group__boundary.html#ga25e193c81052ef1795f1b53b46bc2095">rule_type</a>&nbsp;</td>
+ <td class="paramname"> <em>r</em></td>
+ <td>&nbsp;)&nbsp;</td>
+ <td><code> [inline]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Set an new rule value <em>r</em> </p>
+
+</div>
+</div>
+<hr/>The documentation for this class was generated from the following file:<ul>
+<li>boost/locale/boundary/<a class="el" href="boundary__point_8hpp_source.html">boundary_point.hpp</a></li>
+</ul>
+</div>
+<hr class="footer"/><address class="footer"><small>
+&copy; 2009-2011 Artyom Beilis, Distributed under the Boost Software License, Version 1.0.
+</small></address>
+</body>
+</html>

Added: trunk/libs/locale/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point__index-members.html
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point__index-members.html 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,95 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>Boost.Locale: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+<!--
+ Switch the lines for stand alone version
+ <link rel="stylesheet" type="text/css" href="http://www.boost.org/style-v2/section-basic.css">
+-->
+<link rel="stylesheet" type="text/css" href="../style/section-basic.css">
+</head>
+<body>
+<div id="boost-common-heading-doc">
+ <div class="heading-inner">
+ <div class="heading-placard"></div>
+
+ <h1 class="heading-title">
+ <a href="http://www.boost.org/">
+ <!--
+ Switch the lines for stand alone version
+ <img src="http://www.boost.org/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ -->
+ <img src="../style/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ <span class="heading-boost">Boost</span>
+ <span class="heading-cpplibraries">C++ Libraries</span>
+ </a>
+ </h1>
+
+ <p class="heading-quote">
+
+ <q>...one of the most highly
+ regarded and expertly designed C++ library projects in the
+ world.</q>
+
+ <span class="heading-attribution">&mdash; <a href=
+ "http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
+ "http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
+ Alexandrescu</a>, <a href=
+ "http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
+ Coding Standards</a></span>
+ </p>
+ </div>
+</div>
+
+<div id="boost-common-heading-doc-spacer"></div>
+<!-- Generated by Doxygen 1.7.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul class="tablist">
+ <li>Main Page</li>
+ <li>Modules</li>
+ <li>Namespaces</li>
+ <li class="current">Classes</li>
+ <li>Files</li>
+ <li>Examples</li>
+ </ul>
+ </div>
+ <div class="tabs2">
+ <ul class="tablist">
+ <li>Class List</li>
+ <li>Class Hierarchy</li>
+ <li>Class Members</li>
+ </ul>
+ </div>
+</div>
+<div class="header">
+ <div class="headertitle">
+<h1>boost::locale::boundary::boundary_point_index&lt; BaseIterator &gt; Member List</h1> </div>
+</div>
+<div class="contents">
+This is the complete list of members for <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boost::locale::boundary::boundary_point_index&lt; BaseIterator &gt;</a>, including all inherited members.<table>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html#ab3189e2eaf4386cdf37598e0ba16cfd5">base_iterator</a> typedef</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boost::locale::boundary::boundary_point_index&lt; BaseIterator &gt;</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__boundary.html#ga56f42a32f0378b6e157671f9e17bd66f">begin</a>() const </td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boost::locale::boundary::boundary_point_index&lt; BaseIterator &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__boundary.html#gaba6993dd50ad8cf2db8921e5cf668a69">boundary_point_index</a>()</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boost::locale::boundary::boundary_point_index&lt; BaseIterator &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__boundary.html#gacc189288792012cfdb21c07fddbadc4f">boundary_point_index</a>(boundary_type type, base_iterator begin, base_iterator end, rule_type mask, std::locale const &amp;loc=std::locale())</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boost::locale::boundary::boundary_point_index&lt; BaseIterator &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__boundary.html#ga9b926379fa2fcc7f87dc067953049d69">boundary_point_index</a>(boundary_type type, base_iterator begin, base_iterator end, std::locale const &amp;loc=std::locale())</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boost::locale::boundary::boundary_point_index&lt; BaseIterator &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__boundary.html#gac48665ff53789c6ee44a423963b6550d">boundary_point_index</a>(segment_index&lt; base_iterator &gt; const &amp;other)</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boost::locale::boundary::boundary_point_index&lt; BaseIterator &gt;</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__boundary.html#gac9ce9158eb2fb030c1baf93376203d16">const_iterator</a> typedef</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boost::locale::boundary::boundary_point_index&lt; BaseIterator &gt;</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__boundary.html#gaf3d66d578e32a63b3f0ffbb59740667b">end</a>() const </td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boost::locale::boundary::boundary_point_index&lt; BaseIterator &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__boundary.html#ga0bb71a287afca990e85b17246568492d">find</a>(base_iterator p) const </td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boost::locale::boundary::boundary_point_index&lt; BaseIterator &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__boundary.html#ga1af6e72b3c384edcebc0cf319fe97efe">iterator</a> typedef</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boost::locale::boundary::boundary_point_index&lt; BaseIterator &gt;</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__boundary.html#ga6b4b5d5cf80b55302a88e7b36c812418">map</a>(boundary_type type, base_iterator begin, base_iterator end, std::locale const &amp;loc=std::locale())</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boost::locale::boundary::boundary_point_index&lt; BaseIterator &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__boundary.html#ga83d57b993b00686b2cac711667c6a931">operator=</a>(segment_index&lt; base_iterator &gt; const &amp;other)</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boost::locale::boundary::boundary_point_index&lt; BaseIterator &gt;</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__boundary.html#ga1d214029f1a780b7bf6e3f23a3004c03">rule</a>() const </td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boost::locale::boundary::boundary_point_index&lt; BaseIterator &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__boundary.html#ga56e63913f51109e05a24a7136472a975">rule</a>(rule_type v)</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boost::locale::boundary::boundary_point_index&lt; BaseIterator &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr bgcolor="#f0f0f0"><td><b>segment_index&lt; base_iterator &gt;</b> (defined in <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boost::locale::boundary::boundary_point_index&lt; BaseIterator &gt;</a>)</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boost::locale::boundary::boundary_point_index&lt; BaseIterator &gt;</a></td><td><code> [friend]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="group__boundary.html#ga7f7328a860cf485a4bd8f17658c291e1">value_type</a> typedef</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boost::locale::boundary::boundary_point_index&lt; BaseIterator &gt;</a></td><td></td></tr>
+</table></div>
+<hr class="footer"/><address class="footer"><small>
+&copy; 2009-2011 Artyom Beilis, Distributed under the Boost Software License, Version 1.0.
+</small></address>
+</body>
+</html>

Added: trunk/libs/locale/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point__index.html
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/html/classboost_1_1locale_1_1boundary_1_1boundary__point__index.html 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,181 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>Boost.Locale: boost::locale::boundary::boundary_point_index&lt; BaseIterator &gt; Class Template Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+<!--
+ Switch the lines for stand alone version
+ <link rel="stylesheet" type="text/css" href="http://www.boost.org/style-v2/section-basic.css">
+-->
+<link rel="stylesheet" type="text/css" href="../style/section-basic.css">
+</head>
+<body>
+<div id="boost-common-heading-doc">
+ <div class="heading-inner">
+ <div class="heading-placard"></div>
+
+ <h1 class="heading-title">
+ <a href="http://www.boost.org/">
+ <!--
+ Switch the lines for stand alone version
+ <img src="http://www.boost.org/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ -->
+ <img src="../style/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ <span class="heading-boost">Boost</span>
+ <span class="heading-cpplibraries">C++ Libraries</span>
+ </a>
+ </h1>
+
+ <p class="heading-quote">
+
+ <q>...one of the most highly
+ regarded and expertly designed C++ library projects in the
+ world.</q>
+
+ <span class="heading-attribution">&mdash; <a href=
+ "http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
+ "http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
+ Alexandrescu</a>, <a href=
+ "http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
+ Coding Standards</a></span>
+ </p>
+ </div>
+</div>
+
+<div id="boost-common-heading-doc-spacer"></div>
+<!-- Generated by Doxygen 1.7.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul class="tablist">
+ <li>Main Page</li>
+ <li>Modules</li>
+ <li>Namespaces</li>
+ <li class="current">Classes</li>
+ <li>Files</li>
+ <li>Examples</li>
+ </ul>
+ </div>
+ <div class="tabs2">
+ <ul class="tablist">
+ <li>Class List</li>
+ <li>Class Hierarchy</li>
+ <li>Class Members</li>
+ </ul>
+ </div>
+ <div class="navpath">
+ <ul>
+ <li><b>boost</b> </li>
+ <li><a class="el" href="namespaceboost_1_1locale.html">locale</a> </li>
+ <li><a class="el" href="namespaceboost_1_1locale_1_1boundary.html">boundary</a> </li>
+ <li><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boost::locale::boundary::boundary_point_index&lt; BaseIterator &gt;</a> </li>
+ </ul>
+ </div>
+</div>
+<div class="header">
+ <div class="summary">
+Public Types &#124;
+Public Member Functions &#124;
+Friends </div>
+ <div class="headertitle">
+<h1>boost::locale::boundary::boundary_point_index&lt; BaseIterator &gt; Class Template Reference<br/>
+<small>
+[<a class="el" href="group__boundary.html">Boundary Analysis</a>]</small>
+</h1> </div>
+</div>
+<div class="contents">
+<!-- doxytag: class="boost::locale::boundary::boundary_point_index" -->
+<p>This class holds an index of <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boundary points</a> and allows iterating over them.
+More...</p>
+
+<p><code>#include &lt;<a class="el" href="index_8hpp_source.html">boost/locale/boundary/index.hpp</a>&gt;</code></p>
+
+<p>List of all members.</p>
+<table class="memberdecls">
+<tr><td colspan="2"><h2><a name="pub-types"></a>
+Public Types</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef BaseIterator&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html#ab3189e2eaf4386cdf37598e0ba16cfd5">base_iterator</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef unspecified_iterator_type&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__boundary.html#ga1af6e72b3c384edcebc0cf319fe97efe">iterator</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef unspecified_iterator_type&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__boundary.html#gac9ce9158eb2fb030c1baf93376203d16">const_iterator</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boundary_point</a><br class="typebreak"/>
+&lt; <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html#ab3189e2eaf4386cdf37598e0ba16cfd5">base_iterator</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__boundary.html#ga7f7328a860cf485a4bd8f17658c291e1">value_type</a></td></tr>
+<tr><td colspan="2"><h2><a name="pub-methods"></a>
+Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__boundary.html#gaba6993dd50ad8cf2db8921e5cf668a69">boundary_point_index</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__boundary.html#gacc189288792012cfdb21c07fddbadc4f">boundary_point_index</a> (<a class="el" href="group__boundary.html#ga15de9963ce9bb6037c8525901dfbf641">boundary_type</a> type, <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html#ab3189e2eaf4386cdf37598e0ba16cfd5">base_iterator</a> begin, <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html#ab3189e2eaf4386cdf37598e0ba16cfd5">base_iterator</a> end, <a class="el" href="group__boundary.html#ga25e193c81052ef1795f1b53b46bc2095">rule_type</a> mask, std::locale const &amp;loc=std::locale())</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__boundary.html#ga9b926379fa2fcc7f87dc067953049d69">boundary_point_index</a> (<a class="el" href="group__boundary.html#ga15de9963ce9bb6037c8525901dfbf641">boundary_type</a> type, <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html#ab3189e2eaf4386cdf37598e0ba16cfd5">base_iterator</a> begin, <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html#ab3189e2eaf4386cdf37598e0ba16cfd5">base_iterator</a> end, std::locale const &amp;loc=std::locale())</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__boundary.html#gac48665ff53789c6ee44a423963b6550d">boundary_point_index</a> (<a class="el" href="classboost_1_1locale_1_1boundary_1_1segment__index.html">segment_index</a>&lt; <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html#ab3189e2eaf4386cdf37598e0ba16cfd5">base_iterator</a> &gt; const &amp;other)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boundary_point_index</a> const &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__boundary.html#ga83d57b993b00686b2cac711667c6a931">operator=</a> (<a class="el" href="classboost_1_1locale_1_1boundary_1_1segment__index.html">segment_index</a>&lt; <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html#ab3189e2eaf4386cdf37598e0ba16cfd5">base_iterator</a> &gt; const &amp;other)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__boundary.html#ga6b4b5d5cf80b55302a88e7b36c812418">map</a> (<a class="el" href="group__boundary.html#ga15de9963ce9bb6037c8525901dfbf641">boundary_type</a> type, <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html#ab3189e2eaf4386cdf37598e0ba16cfd5">base_iterator</a> begin, <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html#ab3189e2eaf4386cdf37598e0ba16cfd5">base_iterator</a> end, std::locale const &amp;loc=std::locale())</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__boundary.html#ga1af6e72b3c384edcebc0cf319fe97efe">iterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__boundary.html#ga56f42a32f0378b6e157671f9e17bd66f">begin</a> () const </td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__boundary.html#ga1af6e72b3c384edcebc0cf319fe97efe">iterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__boundary.html#gaf3d66d578e32a63b3f0ffbb59740667b">end</a> () const </td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__boundary.html#ga1af6e72b3c384edcebc0cf319fe97efe">iterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__boundary.html#ga0bb71a287afca990e85b17246568492d">find</a> (<a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html#ab3189e2eaf4386cdf37598e0ba16cfd5">base_iterator</a> p) const </td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__boundary.html#ga25e193c81052ef1795f1b53b46bc2095">rule_type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__boundary.html#ga1d214029f1a780b7bf6e3f23a3004c03">rule</a> () const </td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__boundary.html#ga56e63913f51109e05a24a7136472a975">rule</a> (<a class="el" href="group__boundary.html#ga25e193c81052ef1795f1b53b46bc2095">rule_type</a> v)</td></tr>
+<tr><td colspan="2"><h2><a name="friends"></a>
+Friends</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaa8ba2e18ec3780af8f001ba85e40b9e2"></a><!-- doxytag: member="boost::locale::boundary::boundary_point_index::segment_index&lt; base_iterator &gt;" ref="gaa8ba2e18ec3780af8f001ba85e40b9e2" args="" -->
+class&nbsp;</td><td class="memItemRight" valign="bottom"><b>segment_index&lt; base_iterator &gt;</b></td></tr>
+</table>
+<hr/><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template&lt;typename BaseIterator&gt;<br/>
+ class boost::locale::boundary::boundary_point_index&lt; BaseIterator &gt;</h3>
+
+<p>This class holds an index of <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boundary points</a> and allows iterating over them. </p>
+<p>This class is provides <a class="el" href="group__boundary.html#ga56f42a32f0378b6e157671f9e17bd66f">begin()</a> and <a class="el" href="group__boundary.html#gaf3d66d578e32a63b3f0ffbb59740667b">end()</a> member functions that return bidirectional iterators to the <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boundary_point</a> objects.</p>
+<p>It provides an option that affects selecting boundary points according to different rules: using <a class="el" href="group__boundary.html#ga56e63913f51109e05a24a7136472a975">rule(rule_type mask)</a> member function. It allows to set a mask that select only specific types of boundary points like <a class="el" href="group__boundary.html#ga3befefe67f79691c117bf5588741355b">sentence_term</a>.</p>
+<p>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:</p>
+<ul>
+<li>"|Hello! How\nare you?"</li>
+<li>"Hello! |How\nare you?"</li>
+<li>"Hello! How\n|are you?"</li>
+<li>"Hello! How\nare you?|"</li>
+</ul>
+<p>However if <a class="el" href="group__boundary.html#ga1d214029f1a780b7bf6e3f23a3004c03">rule()</a> is set to <a class="el" href="group__boundary.html#ga3befefe67f79691c117bf5588741355b">sentence_term</a> then the selected boundary points would be:</p>
+<ul>
+<li>"|Hello! How\nare you?"</li>
+<li>"Hello! |How\nare you?"</li>
+<li>"Hello! How\nare you?|"</li>
+</ul>
+<p>Such that a boundary point defined by a line feed character would be ignored.</p>
+<p>This class allows to find a <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point</a> according to the given iterator in range using <a class="el" href="group__boundary.html#ga0bb71a287afca990e85b17246568492d">find()</a> member function.</p>
+<dl class="note"><dt><b>Note:</b></dt><dd><ul>
+<li>Even an empty text range [x,x) considered to have a one boundary point x.</li>
+<li><em>a</em> and <em>b</em> points of the range [a,b) are always considered boundary points regardless the rules used.</li>
+<li>Changing any of the option <a class="el" href="group__boundary.html#ga1d214029f1a780b7bf6e3f23a3004c03">rule()</a> or course re-indexing the text invalidates existing iterators and they can't be used any more.</li>
+<li><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html" title="This class holds an index of boundary points and allows iterating over them.">boundary_point_index</a> can be created from <a class="el" href="classboost_1_1locale_1_1boundary_1_1segment__index.html" title="This class holds an index of segments in the text range and allows to iterate over them...">segment_index</a> or other <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html" title="This class holds an index of boundary points and allows iterating over them.">boundary_point_index</a> that was created with same <a class="el" href="group__boundary.html#ga15de9963ce9bb6037c8525901dfbf641">boundary_type</a>. This is very fast operation as they shared same index and it does not require its regeneration.</li>
+</ul>
+</dd></dl>
+<dl class="see"><dt><b>See also:</b></dt><dd></dd></dl>
+<ul>
+<li><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment__index.html">segment_index</a></li>
+<li><a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">boundary_point</a></li>
+<li><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">segment</a> </li>
+</ul>
+<hr/><h2>Member Typedef Documentation</h2>
+<a class="anchor" id="ab3189e2eaf4386cdf37598e0ba16cfd5"></a><!-- doxytag: member="boost::locale::boundary::boundary_point_index::base_iterator" ref="ab3189e2eaf4386cdf37598e0ba16cfd5" args="" -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename BaseIterator &gt; </div>
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef BaseIterator <a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">boost::locale::boundary::boundary_point_index</a>&lt; BaseIterator &gt;::<a class="el" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html#ab3189e2eaf4386cdf37598e0ba16cfd5">base_iterator</a></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>The type of the iterator used to iterate over the original text </p>
+
+</div>
+</div>
+<hr/>The documentation for this class was generated from the following file:<ul>
+<li>boost/locale/boundary/<a class="el" href="index_8hpp_source.html">index.hpp</a></li>
+</ul>
+</div>
+<hr class="footer"/><address class="footer"><small>
+&copy; 2009-2011 Artyom Beilis, Distributed under the Boost Software License, Version 1.0.
+</small></address>
+</body>
+</html>

Added: trunk/libs/locale/doc/html/classboost_1_1locale_1_1boundary_1_1segment-members.html
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/html/classboost_1_1locale_1_1boundary_1_1segment-members.html 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,99 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>Boost.Locale: Member List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+<!--
+ Switch the lines for stand alone version
+ <link rel="stylesheet" type="text/css" href="http://www.boost.org/style-v2/section-basic.css">
+-->
+<link rel="stylesheet" type="text/css" href="../style/section-basic.css">
+</head>
+<body>
+<div id="boost-common-heading-doc">
+ <div class="heading-inner">
+ <div class="heading-placard"></div>
+
+ <h1 class="heading-title">
+ <a href="http://www.boost.org/">
+ <!--
+ Switch the lines for stand alone version
+ <img src="http://www.boost.org/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ -->
+ <img src="../style/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ <span class="heading-boost">Boost</span>
+ <span class="heading-cpplibraries">C++ Libraries</span>
+ </a>
+ </h1>
+
+ <p class="heading-quote">
+
+ <q>...one of the most highly
+ regarded and expertly designed C++ library projects in the
+ world.</q>
+
+ <span class="heading-attribution">&mdash; <a href=
+ "http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
+ "http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
+ Alexandrescu</a>, <a href=
+ "http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
+ Coding Standards</a></span>
+ </p>
+ </div>
+</div>
+
+<div id="boost-common-heading-doc-spacer"></div>
+<!-- Generated by Doxygen 1.7.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul class="tablist">
+ <li>Main Page</li>
+ <li>Modules</li>
+ <li>Namespaces</li>
+ <li class="current">Classes</li>
+ <li>Files</li>
+ <li>Examples</li>
+ </ul>
+ </div>
+ <div class="tabs2">
+ <ul class="tablist">
+ <li>Class List</li>
+ <li>Class Hierarchy</li>
+ <li>Class Members</li>
+ </ul>
+ </div>
+</div>
+<div class="header">
+ <div class="headertitle">
+<h1>boost::locale::boundary::segment&lt; IteratorType &gt; Member List</h1> </div>
+</div>
+<div class="contents">
+This is the complete list of members for <a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">boost::locale::boundary::segment&lt; IteratorType &gt;</a>, including all inherited members.<table>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#a5428ff79bc05b78989f56519b58a6d9c">begin</a>(iterator const &amp;v)</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">boost::locale::boundary::segment&lt; IteratorType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#a445da30d993880a1bd6d998e78755a44">begin</a>() const </td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">boost::locale::boundary::segment&lt; IteratorType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#ad3785355ea817c087bf428315a332169">char_type</a> typedef</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">boost::locale::boundary::segment&lt; IteratorType &gt;</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#aa24dcd83aefe4925bfc11b0285e2517a">const_iterator</a> typedef</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">boost::locale::boundary::segment&lt; IteratorType &gt;</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#a79ee4d48248ffbc23f84a33355ca3b62">difference_type</a> typedef</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">boost::locale::boundary::segment&lt; IteratorType &gt;</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#a84022afa120893d0716fc446816eb83f">empty</a>() const </td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">boost::locale::boundary::segment&lt; IteratorType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#aaedd7bb4760bae3dcdb165b330806261">end</a>(iterator const &amp;v)</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">boost::locale::boundary::segment&lt; IteratorType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#a7e36b7f1c88ad1f5756ba6e501454bc4">end</a>() const </td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">boost::locale::boundary::segment&lt; IteratorType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#a31960fd7b416715d012b686bc1f2c205">iterator</a> typedef</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">boost::locale::boundary::segment&lt; IteratorType &gt;</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#a45edfde079b2afe36c55043c7a00b438">length</a>() const </td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">boost::locale::boundary::segment&lt; IteratorType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#a76e2717f48ca7a6336a9fede9dec4d40">operator std::basic_string&lt; char_type, T, A &gt;</a>() const </td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">boost::locale::boundary::segment&lt; IteratorType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#a2e38c575af16843a3aa140a4332646a3">operator!=</a>(segment const &amp;other)</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">boost::locale::boundary::segment&lt; IteratorType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#a9a30e70d41591b25c8c77961bff00057">operator==</a>(segment const &amp;other)</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">boost::locale::boundary::segment&lt; IteratorType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#a5b36a522d7013306617dbcccc9919343">rule</a>() const </td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">boost::locale::boundary::segment&lt; IteratorType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#a962c26b7e2024767ad25f2be080fd53a">rule</a>(rule_type r)</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">boost::locale::boundary::segment&lt; IteratorType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#a4e785bc97dba9e8e25f18b43957723e5">segment</a>()</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">boost::locale::boundary::segment&lt; IteratorType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#aea72505bb4940b21bb00a3660fefb7b7">segment</a>(iterator b, iterator e, rule_type r)</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">boost::locale::boundary::segment&lt; IteratorType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#ac139eae8c07ed82ba8343fedfa76c2bf">str</a>() const </td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">boost::locale::boundary::segment&lt; IteratorType &gt;</a></td><td><code> [inline]</code></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#a795d3328ac4d1692294f172c8480da47">string_type</a> typedef</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">boost::locale::boundary::segment&lt; IteratorType &gt;</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#ab7ba55015262b4fb85bb531882a32ead">value_type</a> typedef</td><td><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">boost::locale::boundary::segment&lt; IteratorType &gt;</a></td><td></td></tr>
+</table></div>
+<hr class="footer"/><address class="footer"><small>
+&copy; 2009-2011 Artyom Beilis, Distributed under the Boost Software License, Version 1.0.
+</small></address>
+</body>
+</html>

Added: trunk/libs/locale/doc/html/classboost_1_1locale_1_1boundary_1_1segment.html
==============================================================================
--- (empty file)
+++ trunk/libs/locale/doc/html/classboost_1_1locale_1_1boundary_1_1segment.html 2011-07-12 09:57:36 EDT (Tue, 12 Jul 2011)
@@ -0,0 +1,510 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>Boost.Locale: boost::locale::boundary::segment&lt; IteratorType &gt; Class Template Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+<!--
+ Switch the lines for stand alone version
+ <link rel="stylesheet" type="text/css" href="http://www.boost.org/style-v2/section-basic.css">
+-->
+<link rel="stylesheet" type="text/css" href="../style/section-basic.css">
+</head>
+<body>
+<div id="boost-common-heading-doc">
+ <div class="heading-inner">
+ <div class="heading-placard"></div>
+
+ <h1 class="heading-title">
+ <a href="http://www.boost.org/">
+ <!--
+ Switch the lines for stand alone version
+ <img src="http://www.boost.org/gfx/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ -->
+ <img src="../style/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
+ <span class="heading-boost">Boost</span>
+ <span class="heading-cpplibraries">C++ Libraries</span>
+ </a>
+ </h1>
+
+ <p class="heading-quote">
+
+ <q>...one of the most highly
+ regarded and expertly designed C++ library projects in the
+ world.</q>
+
+ <span class="heading-attribution">&mdash; <a href=
+ "http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
+ "http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
+ Alexandrescu</a>, <a href=
+ "http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
+ Coding Standards</a></span>
+ </p>
+ </div>
+</div>
+
+<div id="boost-common-heading-doc-spacer"></div>
+<!-- Generated by Doxygen 1.7.1 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul class="tablist">
+ <li>Main Page</li>
+ <li>Modules</li>
+ <li>Namespaces</li>
+ <li class="current">Classes</li>
+ <li>Files</li>
+ <li>Examples</li>
+ </ul>
+ </div>
+ <div class="tabs2">
+ <ul class="tablist">
+ <li>Class List</li>
+ <li>Class Hierarchy</li>
+ <li>Class Members</li>
+ </ul>
+ </div>
+ <div class="navpath">
+ <ul>
+ <li><b>boost</b> </li>
+ <li><a class="el" href="namespaceboost_1_1locale.html">locale</a> </li>
+ <li><a class="el" href="namespaceboost_1_1locale_1_1boundary.html">boundary</a> </li>
+ <li><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html">boost::locale::boundary::segment&lt; IteratorType &gt;</a> </li>
+ </ul>
+ </div>
+</div>
+<div class="header">
+ <div class="summary">
+Public Types &#124;
+Public Member Functions </div>
+ <div class="headertitle">
+<h1>boost::locale::boundary::segment&lt; IteratorType &gt; Class Template Reference<br/>
+<small>
+[<a class="el" href="group__boundary.html">Boundary Analysis</a>]</small>
+</h1> </div>
+</div>
+<div class="contents">
+<!-- doxytag: class="boost::locale::boundary::segment" -->
+<p>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...</p>
+
+<p><code>#include &lt;<a class="el" href="segment_8hpp_source.html">boost/locale/boundary/segment.hpp</a>&gt;</code></p>
+
+<p>List of all members.</p>
+<table class="memberdecls">
+<tr><td colspan="2"><h2><a name="pub-types"></a>
+Public Types</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef std::iterator_traits<br class="typebreak"/>
+&lt; IteratorType &gt;::<a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#ab7ba55015262b4fb85bb531882a32ead">value_type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#ad3785355ea817c087bf428315a332169">char_type</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef std::basic_string<br class="typebreak"/>
+&lt; <a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#ad3785355ea817c087bf428315a332169">char_type</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#a795d3328ac4d1692294f172c8480da47">string_type</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#ad3785355ea817c087bf428315a332169">char_type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#ab7ba55015262b4fb85bb531882a32ead">value_type</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef IteratorType&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#a31960fd7b416715d012b686bc1f2c205">iterator</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef IteratorType&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#aa24dcd83aefe4925bfc11b0285e2517a">const_iterator</a></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">typedef std::iterator_traits<br class="typebreak"/>
+&lt; IteratorType &gt;<br class="typebreak"/>
+::<a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#a79ee4d48248ffbc23f84a33355ca3b62">difference_type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#a79ee4d48248ffbc23f84a33355ca3b62">difference_type</a></td></tr>
+<tr><td colspan="2"><h2><a name="pub-methods"></a>
+Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#a4e785bc97dba9e8e25f18b43957723e5">segment</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#aea72505bb4940b21bb00a3660fefb7b7">segment</a> (<a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#a31960fd7b416715d012b686bc1f2c205">iterator</a> b, <a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#a31960fd7b416715d012b686bc1f2c205">iterator</a> e, <a class="el" href="group__boundary.html#ga25e193c81052ef1795f1b53b46bc2095">rule_type</a> r)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#a5428ff79bc05b78989f56519b58a6d9c">begin</a> (<a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#a31960fd7b416715d012b686bc1f2c205">iterator</a> const &amp;v)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#aaedd7bb4760bae3dcdb165b330806261">end</a> (<a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#a31960fd7b416715d012b686bc1f2c205">iterator</a> const &amp;v)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">IteratorType&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1boundary_1_1segment.html#a445da30d993880a1bd6d998e78755a44">begin</a> () const </td></tr>
+<tr><td class="