diff --git a/_unit_tests_2compat_8hpp_source.html b/_unit_tests_2compat_8hpp_source.html index 97e99a294..efdbbbb72 100644 --- a/_unit_tests_2compat_8hpp_source.html +++ b/_unit_tests_2compat_8hpp_source.html @@ -172,7 +172,7 @@ $(function() { codefold.init(0); }); diff --git a/annotated.html b/annotated.html index fe0b1ecef..6ed2dbfd5 100644 --- a/annotated.html +++ b/annotated.html @@ -289,7 +289,7 @@ $(function() { diff --git a/base64_8hpp_source.html b/base64_8hpp_source.html index df72e6804..dc788dd0a 100644 --- a/base64_8hpp_source.html +++ b/base64_8hpp_source.html @@ -543,7 +543,7 @@ $(function() { codefold.init(0); }); diff --git a/chrono_8hpp_source.html b/chrono_8hpp_source.html index ff9cc081d..4b304cfb0 100644 --- a/chrono_8hpp_source.html +++ b/chrono_8hpp_source.html @@ -469,7 +469,7 @@ $(function() { codefold.init(0); }); diff --git a/classes.html b/classes.html index 2debc5bf9..41f19a2a8 100644 --- a/classes.html +++ b/classes.html @@ -141,7 +141,7 @@ $(function() { diff --git a/classstdex_1_1aggregate__progress-members.html b/classstdex_1_1aggregate__progress-members.html index a71611f00..d144ceed8 100644 --- a/classstdex_1_1aggregate__progress-members.html +++ b/classstdex_1_1aggregate__progress-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1aggregate__progress.html b/classstdex_1_1aggregate__progress.html index c96135323..2c5943022 100644 --- a/classstdex_1_1aggregate__progress.html +++ b/classstdex_1_1aggregate__progress.html @@ -285,7 +285,7 @@ template<class T > diff --git a/classstdex_1_1aggregate__progress_1_1worker__progress-members.html b/classstdex_1_1aggregate__progress_1_1worker__progress-members.html index 78bb8c662..690c9013c 100644 --- a/classstdex_1_1aggregate__progress_1_1worker__progress-members.html +++ b/classstdex_1_1aggregate__progress_1_1worker__progress-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1aggregate__progress_1_1worker__progress.html b/classstdex_1_1aggregate__progress_1_1worker__progress.html index d9daeb5ce..269c9e67a 100644 --- a/classstdex_1_1aggregate__progress_1_1worker__progress.html +++ b/classstdex_1_1aggregate__progress_1_1worker__progress.html @@ -328,7 +328,7 @@ template<class T > diff --git a/classstdex_1_1base64__dec-members.html b/classstdex_1_1base64__dec-members.html index 360d1eade..3c20383e7 100644 --- a/classstdex_1_1base64__dec-members.html +++ b/classstdex_1_1base64__dec-members.html @@ -92,7 +92,7 @@ $(function() { diff --git a/classstdex_1_1base64__dec.html b/classstdex_1_1base64__dec.html index c619c5d18..e229bfe98 100644 --- a/classstdex_1_1base64__dec.html +++ b/classstdex_1_1base64__dec.html @@ -231,7 +231,7 @@ template<class T_to , class AX , class T_from > diff --git a/classstdex_1_1base64__enc-members.html b/classstdex_1_1base64__enc-members.html index 615c115e0..7e9e108ec 100644 --- a/classstdex_1_1base64__enc-members.html +++ b/classstdex_1_1base64__enc-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1base64__enc.html b/classstdex_1_1base64__enc.html index 9133f6da6..f7847f2da 100644 --- a/classstdex_1_1base64__enc.html +++ b/classstdex_1_1base64__enc.html @@ -236,7 +236,7 @@ template<class T , class TR , class AX > diff --git a/classstdex_1_1base64__reader-members.html b/classstdex_1_1base64__reader-members.html index 1771698bf..a73d22e1a 100644 --- a/classstdex_1_1base64__reader-members.html +++ b/classstdex_1_1base64__reader-members.html @@ -163,7 +163,7 @@ $(function() { diff --git a/classstdex_1_1base64__reader.html b/classstdex_1_1base64__reader.html index 94d2092b7..4ad8731ae 100644 --- a/classstdex_1_1base64__reader.html +++ b/classstdex_1_1base64__reader.html @@ -434,7 +434,7 @@ size_t m_num diff --git a/classstdex_1_1base64__writer-members.html b/classstdex_1_1base64__writer-members.html index 0c0dbac43..71439c373 100644 --- a/classstdex_1_1base64__writer-members.html +++ b/classstdex_1_1base64__writer-members.html @@ -165,7 +165,7 @@ $(function() { diff --git a/classstdex_1_1base64__writer.html b/classstdex_1_1base64__writer.html index f9e29c69b..5b481a130 100644 --- a/classstdex_1_1base64__writer.html +++ b/classstdex_1_1base64__writer.html @@ -441,7 +441,7 @@ size_t m_num diff --git a/classstdex_1_1basic__hash-members.html b/classstdex_1_1basic__hash-members.html index 31ad7a756..5ecffafb7 100644 --- a/classstdex_1_1basic__hash-members.html +++ b/classstdex_1_1basic__hash-members.html @@ -92,7 +92,7 @@ $(function() { diff --git a/classstdex_1_1basic__hash.html b/classstdex_1_1basic__hash.html index 6e8c06767..8212d51e6 100644 --- a/classstdex_1_1basic__hash.html +++ b/classstdex_1_1basic__hash.html @@ -250,7 +250,7 @@ template<class T > diff --git a/classstdex_1_1benchmark-members.html b/classstdex_1_1benchmark-members.html index 3227ab02c..fcafa5cd5 100644 --- a/classstdex_1_1benchmark-members.html +++ b/classstdex_1_1benchmark-members.html @@ -89,7 +89,7 @@ $(function() { diff --git a/classstdex_1_1benchmark.html b/classstdex_1_1benchmark.html index 9b6231a8f..3487b941c 100644 --- a/classstdex_1_1benchmark.html +++ b/classstdex_1_1benchmark.html @@ -150,7 +150,7 @@ std::chrono::time_point< std::chrono::high_resolution_clock >  diff --git a/classstdex_1_1block__hash-members.html b/classstdex_1_1block__hash-members.html index 998c4520e..6ccb4f1d1 100644 --- a/classstdex_1_1block__hash-members.html +++ b/classstdex_1_1block__hash-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classstdex_1_1block__hash.html b/classstdex_1_1block__hash.html index 0d43c5aac..8f2dd7c30 100644 --- a/classstdex_1_1block__hash.html +++ b/classstdex_1_1block__hash.html @@ -240,7 +240,7 @@ template<class T > diff --git a/classstdex_1_1charset__encoder-members.html b/classstdex_1_1charset__encoder-members.html index b62aa3f25..75de0afc7 100644 --- a/classstdex_1_1charset__encoder-members.html +++ b/classstdex_1_1charset__encoder-members.html @@ -104,7 +104,7 @@ $(function() { diff --git a/classstdex_1_1charset__encoder.html b/classstdex_1_1charset__encoder.html index a1f162d6e..521d0e7e4 100644 --- a/classstdex_1_1charset__encoder.html +++ b/classstdex_1_1charset__encoder.html @@ -556,7 +556,7 @@ template<class TR_to = std::char_traits<T_to>, class AX_to = std::all diff --git a/classstdex_1_1crc32__hash-members.html b/classstdex_1_1crc32__hash-members.html index a077234e5..bc042966b 100644 --- a/classstdex_1_1crc32__hash-members.html +++ b/classstdex_1_1crc32__hash-members.html @@ -92,7 +92,7 @@ $(function() { diff --git a/classstdex_1_1crc32__hash.html b/classstdex_1_1crc32__hash.html index 91fa641dc..ecd379201 100644 --- a/classstdex_1_1crc32__hash.html +++ b/classstdex_1_1crc32__hash.html @@ -240,7 +240,7 @@ crc32_t m_value diff --git a/classstdex_1_1global__progress-members.html b/classstdex_1_1global__progress-members.html index ce91ed66f..695c66aa4 100644 --- a/classstdex_1_1global__progress-members.html +++ b/classstdex_1_1global__progress-members.html @@ -99,7 +99,7 @@ $(function() { diff --git a/classstdex_1_1global__progress.html b/classstdex_1_1global__progress.html index 8267f6c21..cc159e753 100644 --- a/classstdex_1_1global__progress.html +++ b/classstdex_1_1global__progress.html @@ -523,7 +523,7 @@ template<class T > diff --git a/classstdex_1_1hex__dec-members.html b/classstdex_1_1hex__dec-members.html index 07efb0b84..c426adf0c 100644 --- a/classstdex_1_1hex__dec-members.html +++ b/classstdex_1_1hex__dec-members.html @@ -91,7 +91,7 @@ $(function() { diff --git a/classstdex_1_1hex__dec.html b/classstdex_1_1hex__dec.html index 7812ba23f..20013f43d 100644 --- a/classstdex_1_1hex__dec.html +++ b/classstdex_1_1hex__dec.html @@ -213,7 +213,7 @@ template<class T_to , class AX , class T_from > diff --git a/classstdex_1_1hex__enc-members.html b/classstdex_1_1hex__enc-members.html index 67a200546..72e837dbf 100644 --- a/classstdex_1_1hex__enc-members.html +++ b/classstdex_1_1hex__enc-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/classstdex_1_1hex__enc.html b/classstdex_1_1hex__enc.html index d1709e195..43b264612 100644 --- a/classstdex_1_1hex__enc.html +++ b/classstdex_1_1hex__enc.html @@ -191,7 +191,7 @@ template<class T , class TR , class AX > diff --git a/classstdex_1_1html_1_1comment-members.html b/classstdex_1_1html_1_1comment-members.html index 0f88c2741..3320b4441 100644 --- a/classstdex_1_1html_1_1comment-members.html +++ b/classstdex_1_1html_1_1comment-members.html @@ -92,7 +92,7 @@ $(function() { diff --git a/classstdex_1_1html_1_1comment.html b/classstdex_1_1html_1_1comment.html index d9b8fd2b5..d53de8d14 100644 --- a/classstdex_1_1html_1_1comment.html +++ b/classstdex_1_1html_1_1comment.html @@ -137,7 +137,7 @@ stdex::parser::html_sequence_t  diff --git a/classstdex_1_1html_1_1declaration-members.html b/classstdex_1_1html_1_1declaration-members.html index 67cc0ca80..bcae18b63 100644 --- a/classstdex_1_1html_1_1declaration-members.html +++ b/classstdex_1_1html_1_1declaration-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1html_1_1declaration.html b/classstdex_1_1html_1_1declaration.html index 6f5a6a0d5..5b96070a3 100644 --- a/classstdex_1_1html_1_1declaration.html +++ b/classstdex_1_1html_1_1declaration.html @@ -141,7 +141,7 @@ stdex::parser::html_sequence_t  diff --git a/classstdex_1_1html_1_1document-members.html b/classstdex_1_1html_1_1document-members.html index 56245ca80..d89540781 100644 --- a/classstdex_1_1html_1_1document-members.html +++ b/classstdex_1_1html_1_1document-members.html @@ -109,7 +109,7 @@ $(function() { diff --git a/classstdex_1_1html_1_1document.html b/classstdex_1_1html_1_1document.html index 634e30e16..846972951 100644 --- a/classstdex_1_1html_1_1document.html +++ b/classstdex_1_1html_1_1document.html @@ -199,7 +199,7 @@ class stdex::html::document< T, TR, AX >

HTML document.

diff --git a/classstdex_1_1html_1_1element-members.html b/classstdex_1_1html_1_1element-members.html index f6e21f7f9..a2c4b6766 100644 --- a/classstdex_1_1html_1_1element-members.html +++ b/classstdex_1_1html_1_1element-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1html_1_1element.html b/classstdex_1_1html_1_1element.html index 33b98c02c..a2dd2f46f 100644 --- a/classstdex_1_1html_1_1element.html +++ b/classstdex_1_1html_1_1element.html @@ -154,7 +154,7 @@ stdex::parser::html_sequence_t  diff --git a/classstdex_1_1html_1_1element__end-members.html b/classstdex_1_1html_1_1element__end-members.html index 9a47a03e7..d3fc79950 100644 --- a/classstdex_1_1html_1_1element__end-members.html +++ b/classstdex_1_1html_1_1element__end-members.html @@ -94,7 +94,7 @@ $(function() { diff --git a/classstdex_1_1html_1_1element__end.html b/classstdex_1_1html_1_1element__end.html index a89bd6b25..834d22685 100644 --- a/classstdex_1_1html_1_1element__end.html +++ b/classstdex_1_1html_1_1element__end.html @@ -145,7 +145,7 @@ stdex::parser::html_sequence_t  diff --git a/classstdex_1_1html_1_1element__start-members.html b/classstdex_1_1html_1_1element__start-members.html index f8d694971..66d773241 100644 --- a/classstdex_1_1html_1_1element__start-members.html +++ b/classstdex_1_1html_1_1element__start-members.html @@ -97,7 +97,7 @@ $(function() { diff --git a/classstdex_1_1html_1_1element__start.html b/classstdex_1_1html_1_1element__start.html index ea035bc02..83876042d 100644 --- a/classstdex_1_1html_1_1element__start.html +++ b/classstdex_1_1html_1_1element__start.html @@ -164,7 +164,7 @@ template<class T > diff --git a/classstdex_1_1html_1_1instruction-members.html b/classstdex_1_1html_1_1instruction-members.html index efae3c9a4..eb68f6be8 100644 --- a/classstdex_1_1html_1_1instruction-members.html +++ b/classstdex_1_1html_1_1instruction-members.html @@ -92,7 +92,7 @@ $(function() { diff --git a/classstdex_1_1html_1_1instruction.html b/classstdex_1_1html_1_1instruction.html index f9eff6817..79f229094 100644 --- a/classstdex_1_1html_1_1instruction.html +++ b/classstdex_1_1html_1_1instruction.html @@ -137,7 +137,7 @@ stdex::parser::html_sequence_t  diff --git a/classstdex_1_1html_1_1parser-members.html b/classstdex_1_1html_1_1parser-members.html index f8ed4ddbe..496385d33 100644 --- a/classstdex_1_1html_1_1parser-members.html +++ b/classstdex_1_1html_1_1parser-members.html @@ -112,7 +112,7 @@ $(function() { diff --git a/classstdex_1_1html_1_1parser.html b/classstdex_1_1html_1_1parser.html index 87d25ac83..3ac5a2231 100644 --- a/classstdex_1_1html_1_1parser.html +++ b/classstdex_1_1html_1_1parser.html @@ -564,7 +564,7 @@ template<class T , class TR , class AX > diff --git a/classstdex_1_1html_1_1sequence-members.html b/classstdex_1_1html_1_1sequence-members.html index ae8a54f20..3aeb6db32 100644 --- a/classstdex_1_1html_1_1sequence-members.html +++ b/classstdex_1_1html_1_1sequence-members.html @@ -90,7 +90,7 @@ $(function() { diff --git a/classstdex_1_1html_1_1sequence.html b/classstdex_1_1html_1_1sequence.html index 205d2d553..29aa7e2d2 100644 --- a/classstdex_1_1html_1_1sequence.html +++ b/classstdex_1_1html_1_1sequence.html @@ -132,7 +132,7 @@ stdex::parser::html_sequence_t  diff --git a/classstdex_1_1html_1_1starting__token-members.html b/classstdex_1_1html_1_1starting__token-members.html index 2fda9b429..f8e46afcb 100644 --- a/classstdex_1_1html_1_1starting__token-members.html +++ b/classstdex_1_1html_1_1starting__token-members.html @@ -101,7 +101,7 @@ $(function() { diff --git a/classstdex_1_1html_1_1starting__token.html b/classstdex_1_1html_1_1starting__token.html index f44fa110f..b461fdfba 100644 --- a/classstdex_1_1html_1_1starting__token.html +++ b/classstdex_1_1html_1_1starting__token.html @@ -183,7 +183,7 @@ class stdex::html::starting_token< T, TR, AX >

Token representing

diff --git a/classstdex_1_1html_1_1text__token-members.html b/classstdex_1_1html_1_1text__token-members.html index 43192073b..3c65f9cfc 100644 --- a/classstdex_1_1html_1_1text__token-members.html +++ b/classstdex_1_1html_1_1text__token-members.html @@ -98,7 +98,7 @@ $(function() { diff --git a/classstdex_1_1html_1_1text__token.html b/classstdex_1_1html_1_1text__token.html index b1cface63..6a46c84f0 100644 --- a/classstdex_1_1html_1_1text__token.html +++ b/classstdex_1_1html_1_1text__token.html @@ -170,7 +170,7 @@ class stdex::html::text_token< T, TR, AX >

Token representing part

diff --git a/classstdex_1_1html_1_1token-members.html b/classstdex_1_1html_1_1token-members.html index feb0dd0ac..7af81456a 100644 --- a/classstdex_1_1html_1_1token-members.html +++ b/classstdex_1_1html_1_1token-members.html @@ -94,7 +94,7 @@ $(function() { diff --git a/classstdex_1_1html_1_1token.html b/classstdex_1_1html_1_1token.html index 7f70ee19d..9d56fc91b 100644 --- a/classstdex_1_1html_1_1token.html +++ b/classstdex_1_1html_1_1token.html @@ -231,7 +231,7 @@ template<class TR = std::char_traits<wchar_t>, class AX = std::alloca diff --git a/classstdex_1_1html_1_1url__token-members.html b/classstdex_1_1html_1_1url__token-members.html index 78acaef4f..7310856f8 100644 --- a/classstdex_1_1html_1_1url__token-members.html +++ b/classstdex_1_1html_1_1url__token-members.html @@ -97,7 +97,7 @@ $(function() { diff --git a/classstdex_1_1html_1_1url__token.html b/classstdex_1_1html_1_1url__token.html index a318626ae..15229021e 100644 --- a/classstdex_1_1html_1_1url__token.html +++ b/classstdex_1_1html_1_1url__token.html @@ -165,7 +165,7 @@ class stdex::html::url_token< T, TR, AX >

HTTP token representing

diff --git a/classstdex_1_1idrec_1_1record-members.html b/classstdex_1_1idrec_1_1record-members.html index c37e00bee..4313d0cd7 100644 --- a/classstdex_1_1idrec_1_1record-members.html +++ b/classstdex_1_1idrec_1_1record-members.html @@ -102,7 +102,7 @@ $(function() { diff --git a/classstdex_1_1idrec_1_1record.html b/classstdex_1_1idrec_1_1record.html index 61ef049d8..c3676fda2 100644 --- a/classstdex_1_1idrec_1_1record.html +++ b/classstdex_1_1idrec_1_1record.html @@ -764,7 +764,7 @@ template<class T , class T_id , const T_id ID, class T_size , T_size N_align& diff --git a/classstdex_1_1lazy__progress-members.html b/classstdex_1_1lazy__progress-members.html index 9af3848bb..8a184d7f7 100644 --- a/classstdex_1_1lazy__progress-members.html +++ b/classstdex_1_1lazy__progress-members.html @@ -97,7 +97,7 @@ $(function() { diff --git a/classstdex_1_1lazy__progress.html b/classstdex_1_1lazy__progress.html index 694493180..27ce5877c 100644 --- a/classstdex_1_1lazy__progress.html +++ b/classstdex_1_1lazy__progress.html @@ -272,7 +272,7 @@ template<class T > diff --git a/classstdex_1_1locale-members.html b/classstdex_1_1locale-members.html index 88229be92..d109a8eb7 100644 --- a/classstdex_1_1locale-members.html +++ b/classstdex_1_1locale-members.html @@ -85,12 +85,11 @@ $(function() { locale()=default (defined in stdex::locale)stdex::locale locale(locale_t ptr) (defined in stdex::locale)stdex::localeinline locale(int category, const char *locale) (defined in stdex::locale)stdex::localeinline - locale(int category, const wchar_t *locale) (defined in stdex::locale)stdex::localeinline - operator locale_t() const (defined in stdex::locale)stdex::localeinline + operator locale_t() const (defined in stdex::locale)stdex::localeinline diff --git a/classstdex_1_1locale.html b/classstdex_1_1locale.html index ca4c9e183..aabdc3264 100644 --- a/classstdex_1_1locale.html +++ b/classstdex_1_1locale.html @@ -102,9 +102,6 @@ Public Member Functions  locale (int category, const char *locale)   -locale (int category, const wchar_t *locale) -   operator locale_t () const   @@ -117,7 +114,7 @@ Public Member Functions diff --git a/classstdex_1_1md5__hash-members.html b/classstdex_1_1md5__hash-members.html index 752c8ccad..172ae7541 100644 --- a/classstdex_1_1md5__hash-members.html +++ b/classstdex_1_1md5__hash-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1md5__hash.html b/classstdex_1_1md5__hash.html index ccbf7c380..0d30a83bc 100644 --- a/classstdex_1_1md5__hash.html +++ b/classstdex_1_1md5__hash.html @@ -261,7 +261,7 @@ uint32_t m_temp [16] diff --git a/classstdex_1_1parser_1_1basic__angle-members.html b/classstdex_1_1parser_1_1basic__angle-members.html index 2fb936747..84c8319ff 100644 --- a/classstdex_1_1parser_1_1basic__angle-members.html +++ b/classstdex_1_1parser_1_1basic__angle-members.html @@ -102,7 +102,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__angle.html b/classstdex_1_1parser_1_1basic__angle.html index 3919736f6..faa77d1a6 100644 --- a/classstdex_1_1parser_1_1basic__angle.html +++ b/classstdex_1_1parser_1_1basic__angle.html @@ -243,7 +243,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__any__cu-members.html b/classstdex_1_1parser_1_1basic__any__cu-members.html index 74d21d688..0fd2b73d3 100644 --- a/classstdex_1_1parser_1_1basic__any__cu-members.html +++ b/classstdex_1_1parser_1_1basic__any__cu-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__any__cu.html b/classstdex_1_1parser_1_1basic__any__cu.html index 624accc53..7a37e9caf 100644 --- a/classstdex_1_1parser_1_1basic__any__cu.html +++ b/classstdex_1_1parser_1_1basic__any__cu.html @@ -190,7 +190,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__bol-members.html b/classstdex_1_1parser_1_1basic__bol-members.html index 593b92554..b26bd33f1 100644 --- a/classstdex_1_1parser_1_1basic__bol-members.html +++ b/classstdex_1_1parser_1_1basic__bol-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__bol.html b/classstdex_1_1parser_1_1basic__bol.html index 7d954e788..77956ff28 100644 --- a/classstdex_1_1parser_1_1basic__bol.html +++ b/classstdex_1_1parser_1_1basic__bol.html @@ -197,7 +197,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__branch-members.html b/classstdex_1_1parser_1_1basic__branch-members.html index c241a9f4a..32000a9bb 100644 --- a/classstdex_1_1parser_1_1basic__branch-members.html +++ b/classstdex_1_1parser_1_1basic__branch-members.html @@ -102,7 +102,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__branch.html b/classstdex_1_1parser_1_1basic__branch.html index a7e034470..61f65bd62 100644 --- a/classstdex_1_1parser_1_1basic__branch.html +++ b/classstdex_1_1parser_1_1basic__branch.html @@ -248,7 +248,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__chemical__formula-members.html b/classstdex_1_1parser_1_1basic__chemical__formula-members.html index 2ba0fbebe..07a86c9f2 100644 --- a/classstdex_1_1parser_1_1basic__chemical__formula-members.html +++ b/classstdex_1_1parser_1_1basic__chemical__formula-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__chemical__formula.html b/classstdex_1_1parser_1_1basic__chemical__formula.html index a25e973fb..4889a0895 100644 --- a/classstdex_1_1parser_1_1basic__chemical__formula.html +++ b/classstdex_1_1parser_1_1basic__chemical__formula.html @@ -238,7 +238,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__creditor__reference-members.html b/classstdex_1_1parser_1_1basic__creditor__reference-members.html index dd64ce482..48fd89cad 100644 --- a/classstdex_1_1parser_1_1basic__creditor__reference-members.html +++ b/classstdex_1_1parser_1_1basic__creditor__reference-members.html @@ -99,7 +99,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__creditor__reference.html b/classstdex_1_1parser_1_1basic__creditor__reference.html index 5d9a6745a..943057415 100644 --- a/classstdex_1_1parser_1_1basic__creditor__reference.html +++ b/classstdex_1_1parser_1_1basic__creditor__reference.html @@ -239,7 +239,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__css__cdc-members.html b/classstdex_1_1parser_1_1basic__css__cdc-members.html index 1f8a703c4..9cdc0a081 100644 --- a/classstdex_1_1parser_1_1basic__css__cdc-members.html +++ b/classstdex_1_1parser_1_1basic__css__cdc-members.html @@ -94,7 +94,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__css__cdc.html b/classstdex_1_1parser_1_1basic__css__cdc.html index 45fac2440..20650185a 100644 --- a/classstdex_1_1parser_1_1basic__css__cdc.html +++ b/classstdex_1_1parser_1_1basic__css__cdc.html @@ -183,7 +183,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__css__cdo-members.html b/classstdex_1_1parser_1_1basic__css__cdo-members.html index bb6583200..642b1fc2a 100644 --- a/classstdex_1_1parser_1_1basic__css__cdo-members.html +++ b/classstdex_1_1parser_1_1basic__css__cdo-members.html @@ -94,7 +94,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__css__cdo.html b/classstdex_1_1parser_1_1basic__css__cdo.html index 507499179..36090e9cd 100644 --- a/classstdex_1_1parser_1_1basic__css__cdo.html +++ b/classstdex_1_1parser_1_1basic__css__cdo.html @@ -183,7 +183,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__css__comment-members.html b/classstdex_1_1parser_1_1basic__css__comment-members.html index 6af64210c..cf8651f30 100644 --- a/classstdex_1_1parser_1_1basic__css__comment-members.html +++ b/classstdex_1_1parser_1_1basic__css__comment-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__css__comment.html b/classstdex_1_1parser_1_1basic__css__comment.html index 5ac572de6..0c2b79ea0 100644 --- a/classstdex_1_1parser_1_1basic__css__comment.html +++ b/classstdex_1_1parser_1_1basic__css__comment.html @@ -223,7 +223,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__css__import-members.html b/classstdex_1_1parser_1_1basic__css__import-members.html index a59438940..4c7daf097 100644 --- a/classstdex_1_1parser_1_1basic__css__import-members.html +++ b/classstdex_1_1parser_1_1basic__css__import-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__css__import.html b/classstdex_1_1parser_1_1basic__css__import.html index fc204b557..a6a47c97d 100644 --- a/classstdex_1_1parser_1_1basic__css__import.html +++ b/classstdex_1_1parser_1_1basic__css__import.html @@ -223,7 +223,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__css__string-members.html b/classstdex_1_1parser_1_1basic__css__string-members.html index 2b6fd8966..6311ae10c 100644 --- a/classstdex_1_1parser_1_1basic__css__string-members.html +++ b/classstdex_1_1parser_1_1basic__css__string-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__css__string.html b/classstdex_1_1parser_1_1basic__css__string.html index 39f540d97..c1e78a5b2 100644 --- a/classstdex_1_1parser_1_1basic__css__string.html +++ b/classstdex_1_1parser_1_1basic__css__string.html @@ -223,7 +223,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__css__uri-members.html b/classstdex_1_1parser_1_1basic__css__uri-members.html index ed9a5798a..5efdc96b8 100644 --- a/classstdex_1_1parser_1_1basic__css__uri-members.html +++ b/classstdex_1_1parser_1_1basic__css__uri-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__css__uri.html b/classstdex_1_1parser_1_1basic__css__uri.html index 2c5c7a6a3..390d6d4dd 100644 --- a/classstdex_1_1parser_1_1basic__css__uri.html +++ b/classstdex_1_1parser_1_1basic__css__uri.html @@ -223,7 +223,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__cu-members.html b/classstdex_1_1parser_1_1basic__cu-members.html index e971dbbfe..ac057fefe 100644 --- a/classstdex_1_1parser_1_1basic__cu-members.html +++ b/classstdex_1_1parser_1_1basic__cu-members.html @@ -97,7 +97,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__cu.html b/classstdex_1_1parser_1_1basic__cu.html index 137dcabfe..96c022daa 100644 --- a/classstdex_1_1parser_1_1basic__cu.html +++ b/classstdex_1_1parser_1_1basic__cu.html @@ -200,7 +200,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__cu__set-members.html b/classstdex_1_1parser_1_1basic__cu__set-members.html index eee6660f1..e0fd04adf 100644 --- a/classstdex_1_1parser_1_1basic__cu__set-members.html +++ b/classstdex_1_1parser_1_1basic__cu__set-members.html @@ -99,7 +99,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__cu__set.html b/classstdex_1_1parser_1_1basic__cu__set.html index df1ba36b7..67b9d3836 100644 --- a/classstdex_1_1parser_1_1basic__cu__set.html +++ b/classstdex_1_1parser_1_1basic__cu__set.html @@ -209,7 +209,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__date-members.html b/classstdex_1_1parser_1_1basic__date-members.html index 237c58473..69c89a090 100644 --- a/classstdex_1_1parser_1_1basic__date-members.html +++ b/classstdex_1_1parser_1_1basic__date-members.html @@ -103,7 +103,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__date.html b/classstdex_1_1parser_1_1basic__date.html index 19c51d2b3..b89479458 100644 --- a/classstdex_1_1parser_1_1basic__date.html +++ b/classstdex_1_1parser_1_1basic__date.html @@ -251,7 +251,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__dns__domain__char-members.html b/classstdex_1_1parser_1_1basic__dns__domain__char-members.html index d0bc52c37..b7efe01fa 100644 --- a/classstdex_1_1parser_1_1basic__dns__domain__char-members.html +++ b/classstdex_1_1parser_1_1basic__dns__domain__char-members.html @@ -97,7 +97,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__dns__domain__char.html b/classstdex_1_1parser_1_1basic__dns__domain__char.html index 47fc7081f..5e6a034ad 100644 --- a/classstdex_1_1parser_1_1basic__dns__domain__char.html +++ b/classstdex_1_1parser_1_1basic__dns__domain__char.html @@ -202,7 +202,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__dns__name-members.html b/classstdex_1_1parser_1_1basic__dns__name-members.html index a6e3f6953..904539b24 100644 --- a/classstdex_1_1parser_1_1basic__dns__name-members.html +++ b/classstdex_1_1parser_1_1basic__dns__name-members.html @@ -98,7 +98,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__dns__name.html b/classstdex_1_1parser_1_1basic__dns__name.html index 3804830d8..c7df3d6b4 100644 --- a/classstdex_1_1parser_1_1basic__dns__name.html +++ b/classstdex_1_1parser_1_1basic__dns__name.html @@ -204,7 +204,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__email__address-members.html b/classstdex_1_1parser_1_1basic__email__address-members.html index 3898821a5..a865166b9 100644 --- a/classstdex_1_1parser_1_1basic__email__address-members.html +++ b/classstdex_1_1parser_1_1basic__email__address-members.html @@ -102,7 +102,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__email__address.html b/classstdex_1_1parser_1_1basic__email__address.html index e4309cee3..a2480b063 100644 --- a/classstdex_1_1parser_1_1basic__email__address.html +++ b/classstdex_1_1parser_1_1basic__email__address.html @@ -244,7 +244,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__emoticon-members.html b/classstdex_1_1parser_1_1basic__emoticon-members.html index b52efcfdd..a5e9a50ff 100644 --- a/classstdex_1_1parser_1_1basic__emoticon-members.html +++ b/classstdex_1_1parser_1_1basic__emoticon-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__emoticon.html b/classstdex_1_1parser_1_1basic__emoticon.html index 0aa99d001..0ddc50f66 100644 --- a/classstdex_1_1parser_1_1basic__emoticon.html +++ b/classstdex_1_1parser_1_1basic__emoticon.html @@ -242,7 +242,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__eol-members.html b/classstdex_1_1parser_1_1basic__eol-members.html index 90c02a38b..ac3c17d8c 100644 --- a/classstdex_1_1parser_1_1basic__eol-members.html +++ b/classstdex_1_1parser_1_1basic__eol-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__eol.html b/classstdex_1_1parser_1_1basic__eol.html index d7237b2d8..6b1628f20 100644 --- a/classstdex_1_1parser_1_1basic__eol.html +++ b/classstdex_1_1parser_1_1basic__eol.html @@ -197,7 +197,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__fraction-members.html b/classstdex_1_1parser_1_1basic__fraction-members.html index 86eb3a3a0..c1d62a96b 100644 --- a/classstdex_1_1parser_1_1basic__fraction-members.html +++ b/classstdex_1_1parser_1_1basic__fraction-members.html @@ -98,7 +98,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__fraction.html b/classstdex_1_1parser_1_1basic__fraction.html index 564a7a49a..dba0dbdc1 100644 --- a/classstdex_1_1parser_1_1basic__fraction.html +++ b/classstdex_1_1parser_1_1basic__fraction.html @@ -231,7 +231,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__html__declaration__condition__end-members.html b/classstdex_1_1parser_1_1basic__html__declaration__condition__end-members.html index d05ac2fe4..25bbe2a9f 100644 --- a/classstdex_1_1parser_1_1basic__html__declaration__condition__end-members.html +++ b/classstdex_1_1parser_1_1basic__html__declaration__condition__end-members.html @@ -94,7 +94,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__html__declaration__condition__end.html b/classstdex_1_1parser_1_1basic__html__declaration__condition__end.html index 8b58535d9..0f563abb5 100644 --- a/classstdex_1_1parser_1_1basic__html__declaration__condition__end.html +++ b/classstdex_1_1parser_1_1basic__html__declaration__condition__end.html @@ -183,7 +183,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__html__declaration__condition__start-members.html b/classstdex_1_1parser_1_1basic__html__declaration__condition__start-members.html index 9ece4f685..75064294f 100644 --- a/classstdex_1_1parser_1_1basic__html__declaration__condition__start-members.html +++ b/classstdex_1_1parser_1_1basic__html__declaration__condition__start-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__html__declaration__condition__start.html b/classstdex_1_1parser_1_1basic__html__declaration__condition__start.html index dd06dc2f3..698289fd8 100644 --- a/classstdex_1_1parser_1_1basic__html__declaration__condition__start.html +++ b/classstdex_1_1parser_1_1basic__html__declaration__condition__start.html @@ -225,7 +225,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__html__ident-members.html b/classstdex_1_1parser_1_1basic__html__ident-members.html index 94d6fcafc..9bc3f2683 100644 --- a/classstdex_1_1parser_1_1basic__html__ident-members.html +++ b/classstdex_1_1parser_1_1basic__html__ident-members.html @@ -94,7 +94,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__html__ident.html b/classstdex_1_1parser_1_1basic__html__ident.html index 2dd09deab..7c6101afa 100644 --- a/classstdex_1_1parser_1_1basic__html__ident.html +++ b/classstdex_1_1parser_1_1basic__html__ident.html @@ -183,7 +183,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__html__tag-members.html b/classstdex_1_1parser_1_1basic__html__tag-members.html index 328e76445..67abe33a8 100644 --- a/classstdex_1_1parser_1_1basic__html__tag-members.html +++ b/classstdex_1_1parser_1_1basic__html__tag-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__html__tag.html b/classstdex_1_1parser_1_1basic__html__tag.html index a68207515..bbcf50951 100644 --- a/classstdex_1_1parser_1_1basic__html__tag.html +++ b/classstdex_1_1parser_1_1basic__html__tag.html @@ -241,7 +241,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__html__value-members.html b/classstdex_1_1parser_1_1basic__html__value-members.html index 4d31ef9d0..0dca5ffa1 100644 --- a/classstdex_1_1parser_1_1basic__html__value-members.html +++ b/classstdex_1_1parser_1_1basic__html__value-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__html__value.html b/classstdex_1_1parser_1_1basic__html__value.html index e7c7ac475..a31170b36 100644 --- a/classstdex_1_1parser_1_1basic__html__value.html +++ b/classstdex_1_1parser_1_1basic__html__value.html @@ -223,7 +223,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__iban-members.html b/classstdex_1_1parser_1_1basic__iban-members.html index f64978fba..da823e4e9 100644 --- a/classstdex_1_1parser_1_1basic__iban-members.html +++ b/classstdex_1_1parser_1_1basic__iban-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__iban.html b/classstdex_1_1parser_1_1basic__iban.html index 64796783f..12d958da4 100644 --- a/classstdex_1_1parser_1_1basic__iban.html +++ b/classstdex_1_1parser_1_1basic__iban.html @@ -243,7 +243,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__integer-members.html b/classstdex_1_1parser_1_1basic__integer-members.html index 42500270d..0fac757e6 100644 --- a/classstdex_1_1parser_1_1basic__integer-members.html +++ b/classstdex_1_1parser_1_1basic__integer-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__integer.html b/classstdex_1_1parser_1_1basic__integer.html index eacdbb6f1..fe6f05ae5 100644 --- a/classstdex_1_1parser_1_1basic__integer.html +++ b/classstdex_1_1parser_1_1basic__integer.html @@ -184,7 +184,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__integer10-members.html b/classstdex_1_1parser_1_1basic__integer10-members.html index b920d3bd4..71ff396ad 100644 --- a/classstdex_1_1parser_1_1basic__integer10-members.html +++ b/classstdex_1_1parser_1_1basic__integer10-members.html @@ -107,7 +107,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__integer10.html b/classstdex_1_1parser_1_1basic__integer10.html index 2bf93bfe1..21e4820e8 100644 --- a/classstdex_1_1parser_1_1basic__integer10.html +++ b/classstdex_1_1parser_1_1basic__integer10.html @@ -233,7 +233,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__integer10ts-members.html b/classstdex_1_1parser_1_1basic__integer10ts-members.html index 14959db34..035dc1893 100644 --- a/classstdex_1_1parser_1_1basic__integer10ts-members.html +++ b/classstdex_1_1parser_1_1basic__integer10ts-members.html @@ -101,7 +101,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__integer10ts.html b/classstdex_1_1parser_1_1basic__integer10ts.html index 694d2f9ef..fbb50e9b5 100644 --- a/classstdex_1_1parser_1_1basic__integer10ts.html +++ b/classstdex_1_1parser_1_1basic__integer10ts.html @@ -247,7 +247,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__integer16-members.html b/classstdex_1_1parser_1_1basic__integer16-members.html index 92bf15c5c..80819bfec 100644 --- a/classstdex_1_1parser_1_1basic__integer16-members.html +++ b/classstdex_1_1parser_1_1basic__integer16-members.html @@ -113,7 +113,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__integer16.html b/classstdex_1_1parser_1_1basic__integer16.html index b40858c41..44913e95c 100644 --- a/classstdex_1_1parser_1_1basic__integer16.html +++ b/classstdex_1_1parser_1_1basic__integer16.html @@ -251,7 +251,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__ipv4__address-members.html b/classstdex_1_1parser_1_1basic__ipv4__address-members.html index 403ed349e..3268013aa 100644 --- a/classstdex_1_1parser_1_1basic__ipv4__address-members.html +++ b/classstdex_1_1parser_1_1basic__ipv4__address-members.html @@ -108,7 +108,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__ipv4__address.html b/classstdex_1_1parser_1_1basic__ipv4__address.html index 10f4de9fd..61ecd1aee 100644 --- a/classstdex_1_1parser_1_1basic__ipv4__address.html +++ b/classstdex_1_1parser_1_1basic__ipv4__address.html @@ -264,7 +264,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__ipv6__address-members.html b/classstdex_1_1parser_1_1basic__ipv6__address-members.html index 92b72041f..ec0af1eb9 100644 --- a/classstdex_1_1parser_1_1basic__ipv6__address-members.html +++ b/classstdex_1_1parser_1_1basic__ipv6__address-members.html @@ -116,7 +116,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__ipv6__address.html b/classstdex_1_1parser_1_1basic__ipv6__address.html index 9bc51b154..8d06a56e6 100644 --- a/classstdex_1_1parser_1_1basic__ipv6__address.html +++ b/classstdex_1_1parser_1_1basic__ipv6__address.html @@ -289,7 +289,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__ipv6__scope__id__char-members.html b/classstdex_1_1parser_1_1basic__ipv6__scope__id__char-members.html index 5fd865e97..35aa26162 100644 --- a/classstdex_1_1parser_1_1basic__ipv6__scope__id__char-members.html +++ b/classstdex_1_1parser_1_1basic__ipv6__scope__id__char-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__ipv6__scope__id__char.html b/classstdex_1_1parser_1_1basic__ipv6__scope__id__char.html index f1dc77fe7..0d74dacac 100644 --- a/classstdex_1_1parser_1_1basic__ipv6__scope__id__char.html +++ b/classstdex_1_1parser_1_1basic__ipv6__scope__id__char.html @@ -190,7 +190,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__iterations-members.html b/classstdex_1_1parser_1_1basic__iterations-members.html index 0abd6a373..2ff7e3ee1 100644 --- a/classstdex_1_1parser_1_1basic__iterations-members.html +++ b/classstdex_1_1parser_1_1basic__iterations-members.html @@ -99,7 +99,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__iterations.html b/classstdex_1_1parser_1_1basic__iterations.html index 4167dce20..87b76c904 100644 --- a/classstdex_1_1parser_1_1basic__iterations.html +++ b/classstdex_1_1parser_1_1basic__iterations.html @@ -210,7 +210,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__json__string-members.html b/classstdex_1_1parser_1_1basic__json__string-members.html index f3a895b5a..8bbca4a1e 100644 --- a/classstdex_1_1parser_1_1basic__json__string-members.html +++ b/classstdex_1_1parser_1_1basic__json__string-members.html @@ -107,7 +107,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__json__string.html b/classstdex_1_1parser_1_1basic__json__string.html index 4b33b3f14..b50eaaf50 100644 --- a/classstdex_1_1parser_1_1basic__json__string.html +++ b/classstdex_1_1parser_1_1basic__json__string.html @@ -259,7 +259,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__mime__type-members.html b/classstdex_1_1parser_1_1basic__mime__type-members.html index 0cc975fba..56bf24078 100644 --- a/classstdex_1_1parser_1_1basic__mime__type-members.html +++ b/classstdex_1_1parser_1_1basic__mime__type-members.html @@ -97,7 +97,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__mime__type.html b/classstdex_1_1parser_1_1basic__mime__type.html index 0b93130d2..94a45ed7e 100644 --- a/classstdex_1_1parser_1_1basic__mime__type.html +++ b/classstdex_1_1parser_1_1basic__mime__type.html @@ -231,7 +231,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__mixed__numeral-members.html b/classstdex_1_1parser_1_1basic__mixed__numeral-members.html index ba576f9d7..d980423e3 100644 --- a/classstdex_1_1parser_1_1basic__mixed__numeral-members.html +++ b/classstdex_1_1parser_1_1basic__mixed__numeral-members.html @@ -101,7 +101,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__mixed__numeral.html b/classstdex_1_1parser_1_1basic__mixed__numeral.html index 927a7c09c..1dbf7b6d6 100644 --- a/classstdex_1_1parser_1_1basic__mixed__numeral.html +++ b/classstdex_1_1parser_1_1basic__mixed__numeral.html @@ -246,7 +246,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__monetary__numeral-members.html b/classstdex_1_1parser_1_1basic__monetary__numeral-members.html index 7bb01ed2c..cebb9a276 100644 --- a/classstdex_1_1parser_1_1basic__monetary__numeral-members.html +++ b/classstdex_1_1parser_1_1basic__monetary__numeral-members.html @@ -102,7 +102,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__monetary__numeral.html b/classstdex_1_1parser_1_1basic__monetary__numeral.html index f17a49f0f..f1e59a2df 100644 --- a/classstdex_1_1parser_1_1basic__monetary__numeral.html +++ b/classstdex_1_1parser_1_1basic__monetary__numeral.html @@ -250,7 +250,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__noop-members.html b/classstdex_1_1parser_1_1basic__noop-members.html index 01373ae1f..48ff4fd08 100644 --- a/classstdex_1_1parser_1_1basic__noop-members.html +++ b/classstdex_1_1parser_1_1basic__noop-members.html @@ -94,7 +94,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__noop.html b/classstdex_1_1parser_1_1basic__noop.html index ee92e8448..26815f9ab 100644 --- a/classstdex_1_1parser_1_1basic__noop.html +++ b/classstdex_1_1parser_1_1basic__noop.html @@ -183,7 +183,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__parser-members.html b/classstdex_1_1parser_1_1basic__parser-members.html index 1c93fc9da..5c7bb11a5 100644 --- a/classstdex_1_1parser_1_1basic__parser-members.html +++ b/classstdex_1_1parser_1_1basic__parser-members.html @@ -94,7 +94,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__parser.html b/classstdex_1_1parser_1_1basic__parser.html index e838c6314..225582e2a 100644 --- a/classstdex_1_1parser_1_1basic__parser.html +++ b/classstdex_1_1parser_1_1basic__parser.html @@ -251,7 +251,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__permutation-members.html b/classstdex_1_1parser_1_1basic__permutation-members.html index cfbc88614..aa35360cb 100644 --- a/classstdex_1_1parser_1_1basic__permutation-members.html +++ b/classstdex_1_1parser_1_1basic__permutation-members.html @@ -101,7 +101,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__permutation.html b/classstdex_1_1parser_1_1basic__permutation.html index 658482db7..1e8e7ab55 100644 --- a/classstdex_1_1parser_1_1basic__permutation.html +++ b/classstdex_1_1parser_1_1basic__permutation.html @@ -211,7 +211,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__phone__number-members.html b/classstdex_1_1parser_1_1basic__phone__number-members.html index 5e6ebb15a..9a1170475 100644 --- a/classstdex_1_1parser_1_1basic__phone__number-members.html +++ b/classstdex_1_1parser_1_1basic__phone__number-members.html @@ -102,7 +102,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__phone__number.html b/classstdex_1_1parser_1_1basic__phone__number.html index cd364a33e..3caccb5b2 100644 --- a/classstdex_1_1parser_1_1basic__phone__number.html +++ b/classstdex_1_1parser_1_1basic__phone__number.html @@ -245,7 +245,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__punct__cu-members.html b/classstdex_1_1parser_1_1basic__punct__cu-members.html index 727d701d7..df2d32861 100644 --- a/classstdex_1_1parser_1_1basic__punct__cu-members.html +++ b/classstdex_1_1parser_1_1basic__punct__cu-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__punct__cu.html b/classstdex_1_1parser_1_1basic__punct__cu.html index b835d5ef2..8f305310b 100644 --- a/classstdex_1_1parser_1_1basic__punct__cu.html +++ b/classstdex_1_1parser_1_1basic__punct__cu.html @@ -197,7 +197,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__roman__numeral-members.html b/classstdex_1_1parser_1_1basic__roman__numeral-members.html index 0414bd82e..6dab1d9e0 100644 --- a/classstdex_1_1parser_1_1basic__roman__numeral-members.html +++ b/classstdex_1_1parser_1_1basic__roman__numeral-members.html @@ -106,7 +106,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__roman__numeral.html b/classstdex_1_1parser_1_1basic__roman__numeral.html index dba7ad297..9fa0c399b 100644 --- a/classstdex_1_1parser_1_1basic__roman__numeral.html +++ b/classstdex_1_1parser_1_1basic__roman__numeral.html @@ -230,7 +230,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__scientific__numeral-members.html b/classstdex_1_1parser_1_1basic__scientific__numeral-members.html index b1394147e..1d5fc8432 100644 --- a/classstdex_1_1parser_1_1basic__scientific__numeral-members.html +++ b/classstdex_1_1parser_1_1basic__scientific__numeral-members.html @@ -106,7 +106,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__scientific__numeral.html b/classstdex_1_1parser_1_1basic__scientific__numeral.html index f2edfa576..2e20285f0 100644 --- a/classstdex_1_1parser_1_1basic__scientific__numeral.html +++ b/classstdex_1_1parser_1_1basic__scientific__numeral.html @@ -266,7 +266,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__score-members.html b/classstdex_1_1parser_1_1basic__score-members.html index bc980ad28..ebd26fa11 100644 --- a/classstdex_1_1parser_1_1basic__score-members.html +++ b/classstdex_1_1parser_1_1basic__score-members.html @@ -99,7 +99,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__score.html b/classstdex_1_1parser_1_1basic__score.html index 76724afea..9c8137fa5 100644 --- a/classstdex_1_1parser_1_1basic__score.html +++ b/classstdex_1_1parser_1_1basic__score.html @@ -235,7 +235,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__sequence-members.html b/classstdex_1_1parser_1_1basic__sequence-members.html index bcf7d4c2f..41343ef05 100644 --- a/classstdex_1_1parser_1_1basic__sequence-members.html +++ b/classstdex_1_1parser_1_1basic__sequence-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__sequence.html b/classstdex_1_1parser_1_1basic__sequence.html index d36703fcd..fe48b22d1 100644 --- a/classstdex_1_1parser_1_1basic__sequence.html +++ b/classstdex_1_1parser_1_1basic__sequence.html @@ -208,7 +208,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__set-members.html b/classstdex_1_1parser_1_1basic__set-members.html index cb6379ebf..b273e200c 100644 --- a/classstdex_1_1parser_1_1basic__set-members.html +++ b/classstdex_1_1parser_1_1basic__set-members.html @@ -97,7 +97,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__set.html b/classstdex_1_1parser_1_1basic__set.html index 69ed28a9e..2c5f76deb 100644 --- a/classstdex_1_1parser_1_1basic__set.html +++ b/classstdex_1_1parser_1_1basic__set.html @@ -222,7 +222,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__si__reference-members.html b/classstdex_1_1parser_1_1basic__si__reference-members.html index 645d8c006..eb60de485 100644 --- a/classstdex_1_1parser_1_1basic__si__reference-members.html +++ b/classstdex_1_1parser_1_1basic__si__reference-members.html @@ -105,7 +105,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__si__reference.html b/classstdex_1_1parser_1_1basic__si__reference.html index 095de1486..06dc4d599 100644 --- a/classstdex_1_1parser_1_1basic__si__reference.html +++ b/classstdex_1_1parser_1_1basic__si__reference.html @@ -264,7 +264,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__si__reference__delimiter-members.html b/classstdex_1_1parser_1_1basic__si__reference__delimiter-members.html index acebc0ce2..74288b3df 100644 --- a/classstdex_1_1parser_1_1basic__si__reference__delimiter-members.html +++ b/classstdex_1_1parser_1_1basic__si__reference__delimiter-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__si__reference__delimiter.html b/classstdex_1_1parser_1_1basic__si__reference__delimiter.html index 6e9c1de0f..b8e7929e8 100644 --- a/classstdex_1_1parser_1_1basic__si__reference__delimiter.html +++ b/classstdex_1_1parser_1_1basic__si__reference__delimiter.html @@ -191,7 +191,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__si__reference__part-members.html b/classstdex_1_1parser_1_1basic__si__reference__part-members.html index 2ccd16651..3ebe44f78 100644 --- a/classstdex_1_1parser_1_1basic__si__reference__part-members.html +++ b/classstdex_1_1parser_1_1basic__si__reference__part-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__si__reference__part.html b/classstdex_1_1parser_1_1basic__si__reference__part.html index 4c78f3231..f25220907 100644 --- a/classstdex_1_1parser_1_1basic__si__reference__part.html +++ b/classstdex_1_1parser_1_1basic__si__reference__part.html @@ -191,7 +191,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__signed__numeral-members.html b/classstdex_1_1parser_1_1basic__signed__numeral-members.html index 9b9cad3d1..c95f38f58 100644 --- a/classstdex_1_1parser_1_1basic__signed__numeral-members.html +++ b/classstdex_1_1parser_1_1basic__signed__numeral-members.html @@ -99,7 +99,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__signed__numeral.html b/classstdex_1_1parser_1_1basic__signed__numeral.html index 0ef679490..1c56b63ec 100644 --- a/classstdex_1_1parser_1_1basic__signed__numeral.html +++ b/classstdex_1_1parser_1_1basic__signed__numeral.html @@ -238,7 +238,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__space__cu-members.html b/classstdex_1_1parser_1_1basic__space__cu-members.html index b78f84ed5..bcd84c425 100644 --- a/classstdex_1_1parser_1_1basic__space__cu-members.html +++ b/classstdex_1_1parser_1_1basic__space__cu-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__space__cu.html b/classstdex_1_1parser_1_1basic__space__cu.html index de906295d..a499d0ec3 100644 --- a/classstdex_1_1parser_1_1basic__space__cu.html +++ b/classstdex_1_1parser_1_1basic__space__cu.html @@ -197,7 +197,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__space__or__punct__cu-members.html b/classstdex_1_1parser_1_1basic__space__or__punct__cu-members.html index 4544af4b8..5de7a73ab 100644 --- a/classstdex_1_1parser_1_1basic__space__or__punct__cu-members.html +++ b/classstdex_1_1parser_1_1basic__space__or__punct__cu-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__space__or__punct__cu.html b/classstdex_1_1parser_1_1basic__space__or__punct__cu.html index 9d380cc6e..3eac5f8e0 100644 --- a/classstdex_1_1parser_1_1basic__space__or__punct__cu.html +++ b/classstdex_1_1parser_1_1basic__space__or__punct__cu.html @@ -197,7 +197,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__string-members.html b/classstdex_1_1parser_1_1basic__string-members.html index f13cf01f1..dcdbc5e9e 100644 --- a/classstdex_1_1parser_1_1basic__string-members.html +++ b/classstdex_1_1parser_1_1basic__string-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__string.html b/classstdex_1_1parser_1_1basic__string.html index 42dcdd8a5..6afb18b62 100644 --- a/classstdex_1_1parser_1_1basic__string.html +++ b/classstdex_1_1parser_1_1basic__string.html @@ -197,7 +197,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__string__branch-members.html b/classstdex_1_1parser_1_1basic__string__branch-members.html index 727a70161..402cbd29c 100644 --- a/classstdex_1_1parser_1_1basic__string__branch-members.html +++ b/classstdex_1_1parser_1_1basic__string__branch-members.html @@ -107,7 +107,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__string__branch.html b/classstdex_1_1parser_1_1basic__string__branch.html index a7252fb74..f4b52dacd 100644 --- a/classstdex_1_1parser_1_1basic__string__branch.html +++ b/classstdex_1_1parser_1_1basic__string__branch.html @@ -189,7 +189,7 @@ class stdex::parser::basic_string_branch< T, T_parser >

Test for a

diff --git a/classstdex_1_1parser_1_1basic__time-members.html b/classstdex_1_1parser_1_1basic__time-members.html index af28632e4..c9bc79942 100644 --- a/classstdex_1_1parser_1_1basic__time-members.html +++ b/classstdex_1_1parser_1_1basic__time-members.html @@ -101,7 +101,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__time.html b/classstdex_1_1parser_1_1basic__time.html index a5010ef22..57444245a 100644 --- a/classstdex_1_1parser_1_1basic__time.html +++ b/classstdex_1_1parser_1_1basic__time.html @@ -241,7 +241,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__url-members.html b/classstdex_1_1parser_1_1basic__url-members.html index 381a0ecb2..038e5e064 100644 --- a/classstdex_1_1parser_1_1basic__url-members.html +++ b/classstdex_1_1parser_1_1basic__url-members.html @@ -111,7 +111,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__url.html b/classstdex_1_1parser_1_1basic__url.html index dc5d9a2eb..baa535b56 100644 --- a/classstdex_1_1parser_1_1basic__url.html +++ b/classstdex_1_1parser_1_1basic__url.html @@ -271,7 +271,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__url__password__char-members.html b/classstdex_1_1parser_1_1basic__url__password__char-members.html index 90437b0f0..e69515a67 100644 --- a/classstdex_1_1parser_1_1basic__url__password__char-members.html +++ b/classstdex_1_1parser_1_1basic__url__password__char-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__url__password__char.html b/classstdex_1_1parser_1_1basic__url__password__char.html index 7b353d7ec..da2b9f213 100644 --- a/classstdex_1_1parser_1_1basic__url__password__char.html +++ b/classstdex_1_1parser_1_1basic__url__password__char.html @@ -190,7 +190,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__url__path-members.html b/classstdex_1_1parser_1_1basic__url__path-members.html index 7e9abff10..85c6cef75 100644 --- a/classstdex_1_1parser_1_1basic__url__path-members.html +++ b/classstdex_1_1parser_1_1basic__url__path-members.html @@ -101,7 +101,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__url__path.html b/classstdex_1_1parser_1_1basic__url__path.html index f386e8f09..86261a864 100644 --- a/classstdex_1_1parser_1_1basic__url__path.html +++ b/classstdex_1_1parser_1_1basic__url__path.html @@ -241,7 +241,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__url__path__char-members.html b/classstdex_1_1parser_1_1basic__url__path__char-members.html index 2c4982f93..19714ccce 100644 --- a/classstdex_1_1parser_1_1basic__url__path__char-members.html +++ b/classstdex_1_1parser_1_1basic__url__path__char-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__url__path__char.html b/classstdex_1_1parser_1_1basic__url__path__char.html index 874b5a9e7..cfdaedc75 100644 --- a/classstdex_1_1parser_1_1basic__url__path__char.html +++ b/classstdex_1_1parser_1_1basic__url__path__char.html @@ -190,7 +190,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__url__username__char-members.html b/classstdex_1_1parser_1_1basic__url__username__char-members.html index cd1bb170d..e43acc215 100644 --- a/classstdex_1_1parser_1_1basic__url__username__char-members.html +++ b/classstdex_1_1parser_1_1basic__url__username__char-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__url__username__char.html b/classstdex_1_1parser_1_1basic__url__username__char.html index 23c783c8d..76b041105 100644 --- a/classstdex_1_1parser_1_1basic__url__username__char.html +++ b/classstdex_1_1parser_1_1basic__url__username__char.html @@ -190,7 +190,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1http__agent-members.html b/classstdex_1_1parser_1_1http__agent-members.html index a10ff97ba..9bb09592d 100644 --- a/classstdex_1_1parser_1_1http__agent-members.html +++ b/classstdex_1_1parser_1_1http__agent-members.html @@ -90,7 +90,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__agent.html b/classstdex_1_1parser_1_1http__agent.html index ce9c48324..f52b1d91d 100644 --- a/classstdex_1_1parser_1_1http__agent.html +++ b/classstdex_1_1parser_1_1http__agent.html @@ -184,7 +184,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__any__type-members.html b/classstdex_1_1parser_1_1http__any__type-members.html index 717cc84c4..b1e92e876 100644 --- a/classstdex_1_1parser_1_1http__any__type-members.html +++ b/classstdex_1_1parser_1_1http__any__type-members.html @@ -87,7 +87,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__any__type.html b/classstdex_1_1parser_1_1http__any__type.html index a0bd17343..83572dd68 100644 --- a/classstdex_1_1parser_1_1http__any__type.html +++ b/classstdex_1_1parser_1_1http__any__type.html @@ -143,7 +143,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__asterisk-members.html b/classstdex_1_1parser_1_1http__asterisk-members.html index 2a97e9a11..5ae1669ff 100644 --- a/classstdex_1_1parser_1_1http__asterisk-members.html +++ b/classstdex_1_1parser_1_1http__asterisk-members.html @@ -87,7 +87,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__asterisk.html b/classstdex_1_1parser_1_1http__asterisk.html index b54cda15e..c906f489f 100644 --- a/classstdex_1_1parser_1_1http__asterisk.html +++ b/classstdex_1_1parser_1_1http__asterisk.html @@ -143,7 +143,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__cookie-members.html b/classstdex_1_1parser_1_1http__cookie-members.html index a0fc2e07f..10ead5644 100644 --- a/classstdex_1_1parser_1_1http__cookie-members.html +++ b/classstdex_1_1parser_1_1http__cookie-members.html @@ -92,7 +92,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__cookie.html b/classstdex_1_1parser_1_1http__cookie.html index 4b9bfd3a9..b9e4895b5 100644 --- a/classstdex_1_1parser_1_1http__cookie.html +++ b/classstdex_1_1parser_1_1http__cookie.html @@ -194,7 +194,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__cookie__parameter-members.html b/classstdex_1_1parser_1_1http__cookie__parameter-members.html index 180d53aac..24e550d92 100644 --- a/classstdex_1_1parser_1_1http__cookie__parameter-members.html +++ b/classstdex_1_1parser_1_1http__cookie__parameter-members.html @@ -91,7 +91,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__cookie__parameter.html b/classstdex_1_1parser_1_1http__cookie__parameter.html index 4a7b62643..fc43c61aa 100644 --- a/classstdex_1_1parser_1_1http__cookie__parameter.html +++ b/classstdex_1_1parser_1_1http__cookie__parameter.html @@ -188,7 +188,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__header-members.html b/classstdex_1_1parser_1_1http__header-members.html index 6e383cb61..b46afa532 100644 --- a/classstdex_1_1parser_1_1http__header-members.html +++ b/classstdex_1_1parser_1_1http__header-members.html @@ -91,7 +91,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__header.html b/classstdex_1_1parser_1_1http__header.html index 15f314933..3650ee17a 100644 --- a/classstdex_1_1parser_1_1http__header.html +++ b/classstdex_1_1parser_1_1http__header.html @@ -188,7 +188,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__language-members.html b/classstdex_1_1parser_1_1http__language-members.html index 752c718ce..f0acab64a 100644 --- a/classstdex_1_1parser_1_1http__language-members.html +++ b/classstdex_1_1parser_1_1http__language-members.html @@ -89,7 +89,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__language.html b/classstdex_1_1parser_1_1http__language.html index f9defd249..7b8c1d805 100644 --- a/classstdex_1_1parser_1_1http__language.html +++ b/classstdex_1_1parser_1_1http__language.html @@ -181,7 +181,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__line__break-members.html b/classstdex_1_1parser_1_1http__line__break-members.html index 510e2a517..7a414c522 100644 --- a/classstdex_1_1parser_1_1http__line__break-members.html +++ b/classstdex_1_1parser_1_1http__line__break-members.html @@ -87,7 +87,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__line__break.html b/classstdex_1_1parser_1_1http__line__break.html index 2812bfb37..6ed60cc48 100644 --- a/classstdex_1_1parser_1_1http__line__break.html +++ b/classstdex_1_1parser_1_1http__line__break.html @@ -143,7 +143,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__media__range-members.html b/classstdex_1_1parser_1_1http__media__range-members.html index 81f452ef4..92c37f4b9 100644 --- a/classstdex_1_1parser_1_1http__media__range-members.html +++ b/classstdex_1_1parser_1_1http__media__range-members.html @@ -91,7 +91,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__media__range.html b/classstdex_1_1parser_1_1http__media__range.html index bef7b46d8..09f184044 100644 --- a/classstdex_1_1parser_1_1http__media__range.html +++ b/classstdex_1_1parser_1_1http__media__range.html @@ -189,7 +189,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__media__type-members.html b/classstdex_1_1parser_1_1http__media__type-members.html index d159ca6aa..66e65e257 100644 --- a/classstdex_1_1parser_1_1http__media__type-members.html +++ b/classstdex_1_1parser_1_1http__media__type-members.html @@ -92,7 +92,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__media__type.html b/classstdex_1_1parser_1_1http__media__type.html index 735250eae..20f4764d6 100644 --- a/classstdex_1_1parser_1_1http__media__type.html +++ b/classstdex_1_1parser_1_1http__media__type.html @@ -233,7 +233,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__parameter-members.html b/classstdex_1_1parser_1_1http__parameter-members.html index b3f157249..580bc8887 100644 --- a/classstdex_1_1parser_1_1http__parameter-members.html +++ b/classstdex_1_1parser_1_1http__parameter-members.html @@ -91,7 +91,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__parameter.html b/classstdex_1_1parser_1_1http__parameter.html index 29ecef274..fa077e594 100644 --- a/classstdex_1_1parser_1_1http__parameter.html +++ b/classstdex_1_1parser_1_1http__parameter.html @@ -190,7 +190,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__protocol-members.html b/classstdex_1_1parser_1_1http__protocol-members.html index 288b8ff6e..68c3b234a 100644 --- a/classstdex_1_1parser_1_1http__protocol-members.html +++ b/classstdex_1_1parser_1_1http__protocol-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__protocol.html b/classstdex_1_1parser_1_1http__protocol.html index 0ceafdabb..325174ed8 100644 --- a/classstdex_1_1parser_1_1http__protocol.html +++ b/classstdex_1_1parser_1_1http__protocol.html @@ -194,7 +194,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__quoted__string-members.html b/classstdex_1_1parser_1_1http__quoted__string-members.html index 73b898f24..c664e6f89 100644 --- a/classstdex_1_1parser_1_1http__quoted__string-members.html +++ b/classstdex_1_1parser_1_1http__quoted__string-members.html @@ -90,7 +90,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__quoted__string.html b/classstdex_1_1parser_1_1http__quoted__string.html index 62ebe78e6..78ac7806f 100644 --- a/classstdex_1_1parser_1_1http__quoted__string.html +++ b/classstdex_1_1parser_1_1http__quoted__string.html @@ -186,7 +186,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__request-members.html b/classstdex_1_1parser_1_1http__request-members.html index 16eeb9570..b3c5e9bf4 100644 --- a/classstdex_1_1parser_1_1http__request-members.html +++ b/classstdex_1_1parser_1_1http__request-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__request.html b/classstdex_1_1parser_1_1http__request.html index c06716c70..2780ec517 100644 --- a/classstdex_1_1parser_1_1http__request.html +++ b/classstdex_1_1parser_1_1http__request.html @@ -194,7 +194,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__space-members.html b/classstdex_1_1parser_1_1http__space-members.html index 727bdac23..8e7cad867 100644 --- a/classstdex_1_1parser_1_1http__space-members.html +++ b/classstdex_1_1parser_1_1http__space-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__space.html b/classstdex_1_1parser_1_1http__space.html index 8fb3d8ca9..eb8c891cb 100644 --- a/classstdex_1_1parser_1_1http__space.html +++ b/classstdex_1_1parser_1_1http__space.html @@ -150,7 +150,7 @@ Additional Inherited Members diff --git a/classstdex_1_1parser_1_1http__text__char-members.html b/classstdex_1_1parser_1_1http__text__char-members.html index e3f803b53..e8244c601 100644 --- a/classstdex_1_1parser_1_1http__text__char-members.html +++ b/classstdex_1_1parser_1_1http__text__char-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__text__char.html b/classstdex_1_1parser_1_1http__text__char.html index 00c0a2152..d402ca03f 100644 --- a/classstdex_1_1parser_1_1http__text__char.html +++ b/classstdex_1_1parser_1_1http__text__char.html @@ -150,7 +150,7 @@ Additional Inherited Members diff --git a/classstdex_1_1parser_1_1http__token-members.html b/classstdex_1_1parser_1_1http__token-members.html index 94d45102e..b4b68ba68 100644 --- a/classstdex_1_1parser_1_1http__token-members.html +++ b/classstdex_1_1parser_1_1http__token-members.html @@ -87,7 +87,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__token.html b/classstdex_1_1parser_1_1http__token.html index 4f9ab30d4..edd7d2179 100644 --- a/classstdex_1_1parser_1_1http__token.html +++ b/classstdex_1_1parser_1_1http__token.html @@ -143,7 +143,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__url-members.html b/classstdex_1_1parser_1_1http__url-members.html index 3f786587b..bfb1309b8 100644 --- a/classstdex_1_1parser_1_1http__url-members.html +++ b/classstdex_1_1parser_1_1http__url-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__url.html b/classstdex_1_1parser_1_1http__url.html index 0ea4c4a02..e5bdb2e3d 100644 --- a/classstdex_1_1parser_1_1http__url.html +++ b/classstdex_1_1parser_1_1http__url.html @@ -193,7 +193,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__url__parameter-members.html b/classstdex_1_1parser_1_1http__url__parameter-members.html index 31f56e454..c6c0d33da 100644 --- a/classstdex_1_1parser_1_1http__url__parameter-members.html +++ b/classstdex_1_1parser_1_1http__url__parameter-members.html @@ -90,7 +90,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__url__parameter.html b/classstdex_1_1parser_1_1http__url__parameter.html index b20d9ad5f..13dcdc6e1 100644 --- a/classstdex_1_1parser_1_1http__url__parameter.html +++ b/classstdex_1_1parser_1_1http__url__parameter.html @@ -184,7 +184,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__url__path-members.html b/classstdex_1_1parser_1_1http__url__path-members.html index 73890b55b..3bd6b4549 100644 --- a/classstdex_1_1parser_1_1http__url__path-members.html +++ b/classstdex_1_1parser_1_1http__url__path-members.html @@ -89,7 +89,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__url__path.html b/classstdex_1_1parser_1_1http__url__path.html index c8c40d867..a846eaae7 100644 --- a/classstdex_1_1parser_1_1http__url__path.html +++ b/classstdex_1_1parser_1_1http__url__path.html @@ -182,7 +182,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__url__path__segment-members.html b/classstdex_1_1parser_1_1http__url__path__segment-members.html index e7842dc53..9b0f4884a 100644 --- a/classstdex_1_1parser_1_1http__url__path__segment-members.html +++ b/classstdex_1_1parser_1_1http__url__path__segment-members.html @@ -87,7 +87,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__url__path__segment.html b/classstdex_1_1parser_1_1http__url__path__segment.html index 26cfbd0d6..98114a7ac 100644 --- a/classstdex_1_1parser_1_1http__url__path__segment.html +++ b/classstdex_1_1parser_1_1http__url__path__segment.html @@ -143,7 +143,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__url__port-members.html b/classstdex_1_1parser_1_1http__url__port-members.html index cb16cf7ac..07283410e 100644 --- a/classstdex_1_1parser_1_1http__url__port-members.html +++ b/classstdex_1_1parser_1_1http__url__port-members.html @@ -90,7 +90,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__url__port.html b/classstdex_1_1parser_1_1http__url__port.html index fba1d50fc..8944a1be8 100644 --- a/classstdex_1_1parser_1_1http__url__port.html +++ b/classstdex_1_1parser_1_1http__url__port.html @@ -184,7 +184,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__url__server-members.html b/classstdex_1_1parser_1_1http__url__server-members.html index 5ecab30ab..2dd8a7643 100644 --- a/classstdex_1_1parser_1_1http__url__server-members.html +++ b/classstdex_1_1parser_1_1http__url__server-members.html @@ -87,7 +87,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__url__server.html b/classstdex_1_1parser_1_1http__url__server.html index a4b9a726e..31528a65f 100644 --- a/classstdex_1_1parser_1_1http__url__server.html +++ b/classstdex_1_1parser_1_1http__url__server.html @@ -143,7 +143,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__value-members.html b/classstdex_1_1parser_1_1http__value-members.html index bc97abf85..56d39eb52 100644 --- a/classstdex_1_1parser_1_1http__value-members.html +++ b/classstdex_1_1parser_1_1http__value-members.html @@ -90,7 +90,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__value.html b/classstdex_1_1parser_1_1http__value.html index 7f1dd5492..08518abc5 100644 --- a/classstdex_1_1parser_1_1http__value.html +++ b/classstdex_1_1parser_1_1http__value.html @@ -186,7 +186,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__value__collection-members.html b/classstdex_1_1parser_1_1http__value__collection-members.html index 4dceba711..233003940 100644 --- a/classstdex_1_1parser_1_1http__value__collection-members.html +++ b/classstdex_1_1parser_1_1http__value__collection-members.html @@ -86,7 +86,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__value__collection.html b/classstdex_1_1parser_1_1http__value__collection.html index 84c1fc714..9e2601809 100644 --- a/classstdex_1_1parser_1_1http__value__collection.html +++ b/classstdex_1_1parser_1_1http__value__collection.html @@ -109,7 +109,7 @@ class stdex::parser::http_value_collection< KEY, T >

Collection of

diff --git a/classstdex_1_1parser_1_1http__weight-members.html b/classstdex_1_1parser_1_1http__weight-members.html index f637f7de2..be2753740 100644 --- a/classstdex_1_1parser_1_1http__weight-members.html +++ b/classstdex_1_1parser_1_1http__weight-members.html @@ -90,7 +90,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__weight.html b/classstdex_1_1parser_1_1http__weight.html index c1f144fc6..57f8a6df4 100644 --- a/classstdex_1_1parser_1_1http__weight.html +++ b/classstdex_1_1parser_1_1http__weight.html @@ -185,7 +185,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__weighted__value-members.html b/classstdex_1_1parser_1_1http__weighted__value-members.html index 0e0b71abe..5709b7824 100644 --- a/classstdex_1_1parser_1_1http__weighted__value-members.html +++ b/classstdex_1_1parser_1_1http__weighted__value-members.html @@ -92,7 +92,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__weighted__value.html b/classstdex_1_1parser_1_1http__weighted__value.html index e0973def7..a4ca5e9b3 100644 --- a/classstdex_1_1parser_1_1http__weighted__value.html +++ b/classstdex_1_1parser_1_1http__weighted__value.html @@ -193,7 +193,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1parser__collection-members.html b/classstdex_1_1parser_1_1parser__collection-members.html index aa35c7490..dde28a8e4 100644 --- a/classstdex_1_1parser_1_1parser__collection-members.html +++ b/classstdex_1_1parser_1_1parser__collection-members.html @@ -98,7 +98,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1parser__collection.html b/classstdex_1_1parser_1_1parser__collection.html index e23b11c5d..9bc254934 100644 --- a/classstdex_1_1parser_1_1parser__collection.html +++ b/classstdex_1_1parser_1_1parser__collection.html @@ -193,7 +193,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1sgml__any__cp-members.html b/classstdex_1_1parser_1_1sgml__any__cp-members.html index ad9ba00d9..2908e4e94 100644 --- a/classstdex_1_1parser_1_1sgml__any__cp-members.html +++ b/classstdex_1_1parser_1_1sgml__any__cp-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__any__cp.html b/classstdex_1_1parser_1_1sgml__any__cp.html index 586a5c865..adc08d1fa 100644 --- a/classstdex_1_1parser_1_1sgml__any__cp.html +++ b/classstdex_1_1parser_1_1sgml__any__cp.html @@ -158,7 +158,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1sgml__cp-members.html b/classstdex_1_1parser_1_1sgml__cp-members.html index 90b805523..5491b9871 100644 --- a/classstdex_1_1parser_1_1sgml__cp-members.html +++ b/classstdex_1_1parser_1_1sgml__cp-members.html @@ -90,7 +90,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__cp.html b/classstdex_1_1parser_1_1sgml__cp.html index dcaff9251..0749d8317 100644 --- a/classstdex_1_1parser_1_1sgml__cp.html +++ b/classstdex_1_1parser_1_1sgml__cp.html @@ -160,7 +160,7 @@ Additional Inherited Members diff --git a/classstdex_1_1parser_1_1sgml__cp__set-members.html b/classstdex_1_1parser_1_1sgml__cp__set-members.html index 82bc9ff01..ff6d16968 100644 --- a/classstdex_1_1parser_1_1sgml__cp__set-members.html +++ b/classstdex_1_1parser_1_1sgml__cp__set-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__cp__set.html b/classstdex_1_1parser_1_1sgml__cp__set.html index d374d6f94..2f8d7132b 100644 --- a/classstdex_1_1parser_1_1sgml__cp__set.html +++ b/classstdex_1_1parser_1_1sgml__cp__set.html @@ -172,7 +172,7 @@ Additional Inherited Members diff --git a/classstdex_1_1parser_1_1sgml__dns__domain__char-members.html b/classstdex_1_1parser_1_1sgml__dns__domain__char-members.html index 516cb6489..56df7cba6 100644 --- a/classstdex_1_1parser_1_1sgml__dns__domain__char-members.html +++ b/classstdex_1_1parser_1_1sgml__dns__domain__char-members.html @@ -97,7 +97,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__dns__domain__char.html b/classstdex_1_1parser_1_1sgml__dns__domain__char.html index 5b7b53aa9..6943b2654 100644 --- a/classstdex_1_1parser_1_1sgml__dns__domain__char.html +++ b/classstdex_1_1parser_1_1sgml__dns__domain__char.html @@ -167,7 +167,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1sgml__ipv6__scope__id__char-members.html b/classstdex_1_1parser_1_1sgml__ipv6__scope__id__char-members.html index 3ced0e80f..ac0128f23 100644 --- a/classstdex_1_1parser_1_1sgml__ipv6__scope__id__char-members.html +++ b/classstdex_1_1parser_1_1sgml__ipv6__scope__id__char-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__ipv6__scope__id__char.html b/classstdex_1_1parser_1_1sgml__ipv6__scope__id__char.html index bd7ed9f5a..3f43822f1 100644 --- a/classstdex_1_1parser_1_1sgml__ipv6__scope__id__char.html +++ b/classstdex_1_1parser_1_1sgml__ipv6__scope__id__char.html @@ -150,7 +150,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1sgml__punct__cp-members.html b/classstdex_1_1parser_1_1sgml__punct__cp-members.html index 32fd3b6f3..c51c69713 100644 --- a/classstdex_1_1parser_1_1sgml__punct__cp-members.html +++ b/classstdex_1_1parser_1_1sgml__punct__cp-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__punct__cp.html b/classstdex_1_1parser_1_1sgml__punct__cp.html index 9ce674530..06b8f23b2 100644 --- a/classstdex_1_1parser_1_1sgml__punct__cp.html +++ b/classstdex_1_1parser_1_1sgml__punct__cp.html @@ -162,7 +162,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1sgml__space__cp-members.html b/classstdex_1_1parser_1_1sgml__space__cp-members.html index 535c3a0f0..b1fd756fc 100644 --- a/classstdex_1_1parser_1_1sgml__space__cp-members.html +++ b/classstdex_1_1parser_1_1sgml__space__cp-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__space__cp.html b/classstdex_1_1parser_1_1sgml__space__cp.html index 2839e2a43..893e19c3f 100644 --- a/classstdex_1_1parser_1_1sgml__space__cp.html +++ b/classstdex_1_1parser_1_1sgml__space__cp.html @@ -162,7 +162,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1sgml__space__or__punct__cp-members.html b/classstdex_1_1parser_1_1sgml__space__or__punct__cp-members.html index 8b0cf378a..7692381e2 100644 --- a/classstdex_1_1parser_1_1sgml__space__or__punct__cp-members.html +++ b/classstdex_1_1parser_1_1sgml__space__or__punct__cp-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__space__or__punct__cp.html b/classstdex_1_1parser_1_1sgml__space__or__punct__cp.html index 7585f5139..f59fe7f0c 100644 --- a/classstdex_1_1parser_1_1sgml__space__or__punct__cp.html +++ b/classstdex_1_1parser_1_1sgml__space__or__punct__cp.html @@ -162,7 +162,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1sgml__string-members.html b/classstdex_1_1parser_1_1sgml__string-members.html index 491b9fe08..42ceaba55 100644 --- a/classstdex_1_1parser_1_1sgml__string-members.html +++ b/classstdex_1_1parser_1_1sgml__string-members.html @@ -89,7 +89,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__string.html b/classstdex_1_1parser_1_1sgml__string.html index 0a83d159d..2649485e5 100644 --- a/classstdex_1_1parser_1_1sgml__string.html +++ b/classstdex_1_1parser_1_1sgml__string.html @@ -157,7 +157,7 @@ Additional Inherited Members diff --git a/classstdex_1_1parser_1_1sgml__url__password__char-members.html b/classstdex_1_1parser_1_1sgml__url__password__char-members.html index 692be0e3c..a5c2d8521 100644 --- a/classstdex_1_1parser_1_1sgml__url__password__char-members.html +++ b/classstdex_1_1parser_1_1sgml__url__password__char-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__url__password__char.html b/classstdex_1_1parser_1_1sgml__url__password__char.html index 138ab901d..fb6624c5d 100644 --- a/classstdex_1_1parser_1_1sgml__url__password__char.html +++ b/classstdex_1_1parser_1_1sgml__url__password__char.html @@ -158,7 +158,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1sgml__url__path__char-members.html b/classstdex_1_1parser_1_1sgml__url__path__char-members.html index 6cfd06215..a9889a1dd 100644 --- a/classstdex_1_1parser_1_1sgml__url__path__char-members.html +++ b/classstdex_1_1parser_1_1sgml__url__path__char-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__url__path__char.html b/classstdex_1_1parser_1_1sgml__url__path__char.html index 333e2a75a..c1ae97db1 100644 --- a/classstdex_1_1parser_1_1sgml__url__path__char.html +++ b/classstdex_1_1parser_1_1sgml__url__path__char.html @@ -158,7 +158,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1sgml__url__username__char-members.html b/classstdex_1_1parser_1_1sgml__url__username__char-members.html index 9ea968e7e..4747ac402 100644 --- a/classstdex_1_1parser_1_1sgml__url__username__char-members.html +++ b/classstdex_1_1parser_1_1sgml__url__username__char-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__url__username__char.html b/classstdex_1_1parser_1_1sgml__url__username__char.html index 61ea2dc0b..bb10b93b7 100644 --- a/classstdex_1_1parser_1_1sgml__url__username__char.html +++ b/classstdex_1_1parser_1_1sgml__url__username__char.html @@ -158,7 +158,7 @@ std::locale m_locale diff --git a/classstdex_1_1pool-members.html b/classstdex_1_1pool-members.html index ea656595a..3474f38b6 100644 --- a/classstdex_1_1pool-members.html +++ b/classstdex_1_1pool-members.html @@ -89,7 +89,7 @@ $(function() { diff --git a/classstdex_1_1pool.html b/classstdex_1_1pool.html index 79f28243d..12ffd5b54 100644 --- a/classstdex_1_1pool.html +++ b/classstdex_1_1pool.html @@ -194,7 +194,7 @@ template<class T > diff --git a/classstdex_1_1progress-members.html b/classstdex_1_1progress-members.html index cae99ac42..669d2aad2 100644 --- a/classstdex_1_1progress-members.html +++ b/classstdex_1_1progress-members.html @@ -90,7 +90,7 @@ $(function() { diff --git a/classstdex_1_1progress.html b/classstdex_1_1progress.html index 8816390d7..ac3aaf3f0 100644 --- a/classstdex_1_1progress.html +++ b/classstdex_1_1progress.html @@ -313,7 +313,7 @@ template<class T > diff --git a/classstdex_1_1progress__switcher-members.html b/classstdex_1_1progress__switcher-members.html index a551f3578..6091833aa 100644 --- a/classstdex_1_1progress__switcher-members.html +++ b/classstdex_1_1progress__switcher-members.html @@ -102,7 +102,7 @@ $(function() { diff --git a/classstdex_1_1progress__switcher.html b/classstdex_1_1progress__switcher.html index 10d3b69e2..c02d5c879 100644 --- a/classstdex_1_1progress__switcher.html +++ b/classstdex_1_1progress__switcher.html @@ -165,7 +165,7 @@ class stdex::progress_switcher< T >

Progress indicator switcher. <

diff --git a/classstdex_1_1ring-members.html b/classstdex_1_1ring-members.html index 6a705cf0c..2084d3190 100644 --- a/classstdex_1_1ring-members.html +++ b/classstdex_1_1ring-members.html @@ -102,7 +102,7 @@ $(function() { diff --git a/classstdex_1_1ring.html b/classstdex_1_1ring.html index 1da3974f4..b07fb7353 100644 --- a/classstdex_1_1ring.html +++ b/classstdex_1_1ring.html @@ -296,7 +296,7 @@ template<class T , size_t N_cap> diff --git a/classstdex_1_1sha1__hash-members.html b/classstdex_1_1sha1__hash-members.html index 9cbff2f36..938ff5c8c 100644 --- a/classstdex_1_1sha1__hash-members.html +++ b/classstdex_1_1sha1__hash-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1sha1__hash.html b/classstdex_1_1sha1__hash.html index fbbf5a676..fd99e219f 100644 --- a/classstdex_1_1sha1__hash.html +++ b/classstdex_1_1sha1__hash.html @@ -261,7 +261,7 @@ uint32_t m_temp [16] diff --git a/classstdex_1_1spinlock-members.html b/classstdex_1_1spinlock-members.html index 282ef73d1..517a63af1 100644 --- a/classstdex_1_1spinlock-members.html +++ b/classstdex_1_1spinlock-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/classstdex_1_1spinlock.html b/classstdex_1_1spinlock.html index c3e75b0bb..ca56784b0 100644 --- a/classstdex_1_1spinlock.html +++ b/classstdex_1_1spinlock.html @@ -140,7 +140,7 @@ void unlock () noexcep diff --git a/classstdex_1_1stream_1_1async__reader-members.html b/classstdex_1_1stream_1_1async__reader-members.html index 605e786c1..e681db48c 100644 --- a/classstdex_1_1stream_1_1async__reader-members.html +++ b/classstdex_1_1stream_1_1async__reader-members.html @@ -156,7 +156,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1async__reader.html b/classstdex_1_1stream_1_1async__reader.html index adff902a0..60eb04d8f 100644 --- a/classstdex_1_1stream_1_1async__reader.html +++ b/classstdex_1_1stream_1_1async__reader.html @@ -405,7 +405,7 @@ template<size_t N_cap = default_async_limit> diff --git a/classstdex_1_1stream_1_1async__writer-members.html b/classstdex_1_1stream_1_1async__writer-members.html index a0ce39497..a8f222b9b 100644 --- a/classstdex_1_1stream_1_1async__writer-members.html +++ b/classstdex_1_1stream_1_1async__writer-members.html @@ -156,7 +156,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1async__writer.html b/classstdex_1_1stream_1_1async__writer.html index 9374d8bb8..cdc866c13 100644 --- a/classstdex_1_1stream_1_1async__writer.html +++ b/classstdex_1_1stream_1_1async__writer.html @@ -436,7 +436,7 @@ template<size_t N_cap = default_async_limit> diff --git a/classstdex_1_1stream_1_1basic-members.html b/classstdex_1_1stream_1_1basic-members.html index e6bed6d6e..eda065739 100644 --- a/classstdex_1_1stream_1_1basic-members.html +++ b/classstdex_1_1stream_1_1basic-members.html @@ -149,7 +149,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1basic.html b/classstdex_1_1stream_1_1basic.html index 09998430c..acd518091 100644 --- a/classstdex_1_1stream_1_1basic.html +++ b/classstdex_1_1stream_1_1basic.html @@ -1255,7 +1255,7 @@ template<class T > diff --git a/classstdex_1_1stream_1_1basic__file-members.html b/classstdex_1_1stream_1_1basic__file-members.html index 9caf324fb..ae34621c9 100644 --- a/classstdex_1_1stream_1_1basic__file-members.html +++ b/classstdex_1_1stream_1_1basic__file-members.html @@ -165,7 +165,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1basic__file.html b/classstdex_1_1stream_1_1basic__file.html index df8692f16..665742829 100644 --- a/classstdex_1_1stream_1_1basic__file.html +++ b/classstdex_1_1stream_1_1basic__file.html @@ -929,7 +929,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1basic__sys-members.html b/classstdex_1_1stream_1_1basic__sys-members.html index 73c357b44..0b99a021d 100644 --- a/classstdex_1_1stream_1_1basic__sys-members.html +++ b/classstdex_1_1stream_1_1basic__sys-members.html @@ -161,7 +161,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1basic__sys.html b/classstdex_1_1stream_1_1basic__sys.html index f7c8fb219..ec96b246c 100644 --- a/classstdex_1_1stream_1_1basic__sys.html +++ b/classstdex_1_1stream_1_1basic__sys.html @@ -511,7 +511,7 @@ sys_handle m_h
diff --git a/classstdex_1_1stream_1_1buffer-members.html b/classstdex_1_1stream_1_1buffer-members.html index 6e25eb796..c30367d04 100644 --- a/classstdex_1_1stream_1_1buffer-members.html +++ b/classstdex_1_1stream_1_1buffer-members.html @@ -156,7 +156,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1buffer.html b/classstdex_1_1stream_1_1buffer.html index c16caca48..f04f40e01 100644 --- a/classstdex_1_1stream_1_1buffer.html +++ b/classstdex_1_1stream_1_1buffer.html @@ -473,7 +473,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1buffered__sys-members.html b/classstdex_1_1stream_1_1buffered__sys-members.html index 2abea20dd..2f2f138e2 100644 --- a/classstdex_1_1stream_1_1buffered__sys-members.html +++ b/classstdex_1_1stream_1_1buffered__sys-members.html @@ -158,7 +158,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1buffered__sys.html b/classstdex_1_1stream_1_1buffered__sys.html index d4ad03340..e20fcfb8e 100644 --- a/classstdex_1_1stream_1_1buffered__sys.html +++ b/classstdex_1_1stream_1_1buffered__sys.html @@ -363,7 +363,7 @@ void flush_write () diff --git a/classstdex_1_1stream_1_1cache-members.html b/classstdex_1_1stream_1_1cache-members.html index 9fbf6e6e4..bb115569a 100644 --- a/classstdex_1_1stream_1_1cache-members.html +++ b/classstdex_1_1stream_1_1cache-members.html @@ -167,7 +167,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1cache.html b/classstdex_1_1stream_1_1cache.html index 12bac1533..6d9f90d3d 100644 --- a/classstdex_1_1stream_1_1cache.html +++ b/classstdex_1_1stream_1_1cache.html @@ -885,7 +885,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1cached__file-members.html b/classstdex_1_1stream_1_1cached__file-members.html index 6bce80a06..ead8ae4a1 100644 --- a/classstdex_1_1stream_1_1cached__file-members.html +++ b/classstdex_1_1stream_1_1cached__file-members.html @@ -175,7 +175,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1cached__file.html b/classstdex_1_1stream_1_1cached__file.html index 414951880..9d8cf0502 100644 --- a/classstdex_1_1stream_1_1cached__file.html +++ b/classstdex_1_1stream_1_1cached__file.html @@ -578,7 +578,7 @@ template<class TR = std::char_traits<schar_t>, class AX = std::alloca diff --git a/classstdex_1_1stream_1_1converter-members.html b/classstdex_1_1stream_1_1converter-members.html index ee54291b9..19de7f26e 100644 --- a/classstdex_1_1stream_1_1converter-members.html +++ b/classstdex_1_1stream_1_1converter-members.html @@ -151,7 +151,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1converter.html b/classstdex_1_1stream_1_1converter.html index a2dced81e..6ce3d2fe0 100644 --- a/classstdex_1_1stream_1_1converter.html +++ b/classstdex_1_1stream_1_1converter.html @@ -491,7 +491,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1diag__file-members.html b/classstdex_1_1stream_1_1diag__file-members.html index 379a191e4..e0893456d 100644 --- a/classstdex_1_1stream_1_1diag__file-members.html +++ b/classstdex_1_1stream_1_1diag__file-members.html @@ -168,7 +168,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1diag__file.html b/classstdex_1_1stream_1_1diag__file.html index 67aa6ec1a..f5d0dbf9d 100644 --- a/classstdex_1_1stream_1_1diag__file.html +++ b/classstdex_1_1stream_1_1diag__file.html @@ -717,7 +717,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1fifo-members.html b/classstdex_1_1stream_1_1fifo-members.html index 4ade6f036..014938232 100644 --- a/classstdex_1_1stream_1_1fifo-members.html +++ b/classstdex_1_1stream_1_1fifo-members.html @@ -156,7 +156,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1fifo.html b/classstdex_1_1stream_1_1fifo.html index f890f9017..52692ab16 100644 --- a/classstdex_1_1stream_1_1fifo.html +++ b/classstdex_1_1stream_1_1fifo.html @@ -463,7 +463,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1file-members.html b/classstdex_1_1stream_1_1file-members.html index 4000b2200..cbab4f8cd 100644 --- a/classstdex_1_1stream_1_1file-members.html +++ b/classstdex_1_1stream_1_1file-members.html @@ -190,7 +190,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1file.html b/classstdex_1_1stream_1_1file.html index 0feb2b721..375b212a5 100644 --- a/classstdex_1_1stream_1_1file.html +++ b/classstdex_1_1stream_1_1file.html @@ -1115,7 +1115,7 @@ template<class TR = std::char_traits<schar_t>, class AX = std::alloca diff --git a/classstdex_1_1stream_1_1file__window-members.html b/classstdex_1_1stream_1_1file__window-members.html index e621127f2..82e657b19 100644 --- a/classstdex_1_1stream_1_1file__window-members.html +++ b/classstdex_1_1stream_1_1file__window-members.html @@ -169,7 +169,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1file__window.html b/classstdex_1_1stream_1_1file__window.html index ec920b51d..89f8ad0a1 100644 --- a/classstdex_1_1stream_1_1file__window.html +++ b/classstdex_1_1stream_1_1file__window.html @@ -749,7 +749,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1limiter-members.html b/classstdex_1_1stream_1_1limiter-members.html index 792e12037..583e38727 100644 --- a/classstdex_1_1stream_1_1limiter-members.html +++ b/classstdex_1_1stream_1_1limiter-members.html @@ -154,7 +154,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1limiter.html b/classstdex_1_1stream_1_1limiter.html index 17acbd8ac..d4eb8f8a0 100644 --- a/classstdex_1_1stream_1_1limiter.html +++ b/classstdex_1_1stream_1_1limiter.html @@ -440,7 +440,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1memory__file-members.html b/classstdex_1_1stream_1_1memory__file-members.html index 2d3e6f452..642d93b29 100644 --- a/classstdex_1_1stream_1_1memory__file-members.html +++ b/classstdex_1_1stream_1_1memory__file-members.html @@ -213,7 +213,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1memory__file.html b/classstdex_1_1stream_1_1memory__file.html index d6597395e..ff30f365d 100644 --- a/classstdex_1_1stream_1_1memory__file.html +++ b/classstdex_1_1stream_1_1memory__file.html @@ -1719,7 +1719,7 @@ template<class T > diff --git a/classstdex_1_1stream_1_1replicator-members.html b/classstdex_1_1stream_1_1replicator-members.html index 247e1f704..ff26d1c35 100644 --- a/classstdex_1_1stream_1_1replicator-members.html +++ b/classstdex_1_1stream_1_1replicator-members.html @@ -154,7 +154,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1replicator.html b/classstdex_1_1stream_1_1replicator.html index 4b3b7bce7..0c6ec3e31 100644 --- a/classstdex_1_1stream_1_1replicator.html +++ b/classstdex_1_1stream_1_1replicator.html @@ -453,7 +453,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1replicator_1_1worker-members.html b/classstdex_1_1stream_1_1replicator_1_1worker-members.html index a0ccee893..c19792dea 100644 --- a/classstdex_1_1stream_1_1replicator_1_1worker-members.html +++ b/classstdex_1_1stream_1_1replicator_1_1worker-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1replicator_1_1worker.html b/classstdex_1_1stream_1_1replicator_1_1worker.html index 091c09524..617acdda2 100644 --- a/classstdex_1_1stream_1_1replicator_1_1worker.html +++ b/classstdex_1_1stream_1_1replicator_1_1worker.html @@ -151,7 +151,7 @@ void process_op () diff --git a/classstdex_1_1stream_1_1socket-members.html b/classstdex_1_1stream_1_1socket-members.html index 52a171a1b..61d7504f6 100644 --- a/classstdex_1_1stream_1_1socket-members.html +++ b/classstdex_1_1stream_1_1socket-members.html @@ -157,7 +157,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1socket.html b/classstdex_1_1stream_1_1socket.html index 70cff34f3..e2b640589 100644 --- a/classstdex_1_1stream_1_1socket.html +++ b/classstdex_1_1stream_1_1socket.html @@ -509,7 +509,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1window-members.html b/classstdex_1_1stream_1_1window-members.html index 67b35dc79..56b77e349 100644 --- a/classstdex_1_1stream_1_1window-members.html +++ b/classstdex_1_1stream_1_1window-members.html @@ -157,7 +157,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1window.html b/classstdex_1_1stream_1_1window.html index fc0d93bc0..b681bc61e 100644 --- a/classstdex_1_1stream_1_1window.html +++ b/classstdex_1_1stream_1_1window.html @@ -449,7 +449,7 @@ state_t m_state diff --git a/classstdex_1_1stream__hasher-members.html b/classstdex_1_1stream__hasher-members.html index 6f0bf9c2c..d7fd00a2b 100644 --- a/classstdex_1_1stream__hasher-members.html +++ b/classstdex_1_1stream__hasher-members.html @@ -153,7 +153,7 @@ $(function() { diff --git a/classstdex_1_1stream__hasher.html b/classstdex_1_1stream__hasher.html index c1f23c1cc..f40f7fe28 100644 --- a/classstdex_1_1stream__hasher.html +++ b/classstdex_1_1stream__hasher.html @@ -432,7 +432,7 @@ template<class T > diff --git a/classstdex_1_1sys__object-members.html b/classstdex_1_1sys__object-members.html index 590c9cc73..ce150fe4a 100644 --- a/classstdex_1_1sys__object-members.html +++ b/classstdex_1_1sys__object-members.html @@ -97,7 +97,7 @@ $(function() { diff --git a/classstdex_1_1sys__object.html b/classstdex_1_1sys__object.html index b620c699b..5a6335366 100644 --- a/classstdex_1_1sys__object.html +++ b/classstdex_1_1sys__object.html @@ -184,7 +184,7 @@ sys_handle m_h diff --git a/classstdex_1_1timeout__progress-members.html b/classstdex_1_1timeout__progress-members.html index 7465650e7..f8b8fcff1 100644 --- a/classstdex_1_1timeout__progress-members.html +++ b/classstdex_1_1timeout__progress-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1timeout__progress.html b/classstdex_1_1timeout__progress.html index 679fa4cca..2b98dce9e 100644 --- a/classstdex_1_1timeout__progress.html +++ b/classstdex_1_1timeout__progress.html @@ -363,7 +363,7 @@ template<class T > diff --git a/classstdex_1_1user__cancelled-members.html b/classstdex_1_1user__cancelled-members.html index f7b371ba5..7c93f92a6 100644 --- a/classstdex_1_1user__cancelled-members.html +++ b/classstdex_1_1user__cancelled-members.html @@ -86,7 +86,7 @@ $(function() { diff --git a/classstdex_1_1user__cancelled.html b/classstdex_1_1user__cancelled.html index 541e4f018..43c03600d 100644 --- a/classstdex_1_1user__cancelled.html +++ b/classstdex_1_1user__cancelled.html @@ -142,7 +142,7 @@ Public Member Functions diff --git a/classstdex_1_1vector__queue-members.html b/classstdex_1_1vector__queue-members.html index e3708c2d8..c080a5f38 100644 --- a/classstdex_1_1vector__queue-members.html +++ b/classstdex_1_1vector__queue-members.html @@ -124,7 +124,7 @@ $(function() { diff --git a/classstdex_1_1vector__queue.html b/classstdex_1_1vector__queue.html index c175e7df3..284faf89b 100644 --- a/classstdex_1_1vector__queue.html +++ b/classstdex_1_1vector__queue.html @@ -782,7 +782,7 @@ template<class T > diff --git a/classstdex_1_1watchdog-members.html b/classstdex_1_1watchdog-members.html index 899826d02..15de182f3 100644 --- a/classstdex_1_1watchdog-members.html +++ b/classstdex_1_1watchdog-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classstdex_1_1watchdog.html b/classstdex_1_1watchdog.html index d0ac40bb3..54ce82498 100644 --- a/classstdex_1_1watchdog.html +++ b/classstdex_1_1watchdog.html @@ -218,7 +218,7 @@ template<class _Clock , class _Duration = typename _Clock::duration> diff --git a/classstdex_1_1zlib__reader-members.html b/classstdex_1_1zlib__reader-members.html index b84ca3d4e..2e9eceb1d 100644 --- a/classstdex_1_1zlib__reader-members.html +++ b/classstdex_1_1zlib__reader-members.html @@ -156,7 +156,7 @@ $(function() { diff --git a/classstdex_1_1zlib__reader.html b/classstdex_1_1zlib__reader.html index 4282512bb..0e81393b3 100644 --- a/classstdex_1_1zlib__reader.html +++ b/classstdex_1_1zlib__reader.html @@ -392,7 +392,7 @@ state_t m_state diff --git a/classstdex_1_1zlib__writer-members.html b/classstdex_1_1zlib__writer-members.html index bae41fade..21b424265 100644 --- a/classstdex_1_1zlib__writer-members.html +++ b/classstdex_1_1zlib__writer-members.html @@ -156,7 +156,7 @@ $(function() { diff --git a/classstdex_1_1zlib__writer.html b/classstdex_1_1zlib__writer.html index 41115db4a..15aa92b95 100644 --- a/classstdex_1_1zlib__writer.html +++ b/classstdex_1_1zlib__writer.html @@ -392,7 +392,7 @@ state_t m_state diff --git a/debug_8hpp_source.html b/debug_8hpp_source.html index 4af8eead4..c931c282f 100644 --- a/debug_8hpp_source.html +++ b/debug_8hpp_source.html @@ -213,7 +213,7 @@ $(function() { codefold.init(0); }); diff --git a/dir_4be4f7b278e009bf0f1906cf31fb73bd.html b/dir_4be4f7b278e009bf0f1906cf31fb73bd.html index b70c9962e..ad355b115 100644 --- a/dir_4be4f7b278e009bf0f1906cf31fb73bd.html +++ b/dir_4be4f7b278e009bf0f1906cf31fb73bd.html @@ -92,12 +92,16 @@ Files    pch.hpp   + pool.cpp ring.cpp    sgml.cpp    stream.cpp   + string.cpp unicode.cpp    watchdog.cpp @@ -106,7 +110,7 @@ Files diff --git a/dir_d44c64559bbebec7f509842c48db8b23.html b/dir_d44c64559bbebec7f509842c48db8b23.html index 7462d038c..5df0ceb5d 100644 --- a/dir_d44c64559bbebec7f509842c48db8b23.html +++ b/dir_d44c64559bbebec7f509842c48db8b23.html @@ -88,7 +88,7 @@ Directories diff --git a/dir_fca3c47b2ea228727bd6729832f89576.html b/dir_fca3c47b2ea228727bd6729832f89576.html index c3098871b..181c6f0d1 100644 --- a/dir_fca3c47b2ea228727bd6729832f89576.html +++ b/dir_fca3c47b2ea228727bd6729832f89576.html @@ -154,7 +154,7 @@ Files diff --git a/doxygen_crawl.html b/doxygen_crawl.html index a9567fca7..e3bcd84e6 100644 --- a/doxygen_crawl.html +++ b/doxygen_crawl.html @@ -47,9 +47,11 @@ + + diff --git a/endian_8hpp_source.html b/endian_8hpp_source.html index 62ac255bf..a2edcea25 100644 --- a/endian_8hpp_source.html +++ b/endian_8hpp_source.html @@ -227,7 +227,7 @@ $(function() { codefold.init(0); }); diff --git a/exception_8hpp_source.html b/exception_8hpp_source.html index 3cd999849..7d11488f7 100644 --- a/exception_8hpp_source.html +++ b/exception_8hpp_source.html @@ -109,7 +109,7 @@ $(function() { codefold.init(0); }); diff --git a/files.html b/files.html index 08c27ca49..831542d85 100644 --- a/files.html +++ b/files.html @@ -119,17 +119,19 @@ $(function() {  math.cpp  parser.cpp  pch.hpp - ring.cpp - sgml.cpp - stream.cpp - unicode.cpp - watchdog.cpp + pool.cpp + ring.cpp + sgml.cpp + stream.cpp + string.cpp + unicode.cpp + watchdog.cpp diff --git a/functions.html b/functions.html index 2f5cc1bf1..2caa3481c 100644 --- a/functions.html +++ b/functions.html @@ -97,7 +97,7 @@ $(function() { diff --git a/functions_b.html b/functions_b.html index 422271b0c..7f532e181 100644 --- a/functions_b.html +++ b/functions_b.html @@ -91,7 +91,7 @@ $(function() { diff --git a/functions_c.html b/functions_c.html index 6c58241ff..f86a5567f 100644 --- a/functions_c.html +++ b/functions_c.html @@ -100,7 +100,7 @@ $(function() { diff --git a/functions_d.html b/functions_d.html index bc02fd675..ee7c05c00 100644 --- a/functions_d.html +++ b/functions_d.html @@ -93,7 +93,7 @@ $(function() { diff --git a/functions_e.html b/functions_e.html index 3721f2559..261c0df3e 100644 --- a/functions_e.html +++ b/functions_e.html @@ -93,7 +93,7 @@ $(function() { diff --git a/functions_enum.html b/functions_enum.html index 2df6681f5..f6fc35509 100644 --- a/functions_enum.html +++ b/functions_enum.html @@ -78,7 +78,7 @@ $(function() { diff --git a/functions_f.html b/functions_f.html index 61c8d99ac..4d9d42703 100644 --- a/functions_f.html +++ b/functions_f.html @@ -89,7 +89,7 @@ $(function() { diff --git a/functions_func.html b/functions_func.html index c02112111..5772bfbd4 100644 --- a/functions_func.html +++ b/functions_func.html @@ -91,7 +91,7 @@ $(function() { diff --git a/functions_func_b.html b/functions_func_b.html index aaf4bd388..034a26231 100644 --- a/functions_func_b.html +++ b/functions_func_b.html @@ -83,7 +83,7 @@ $(function() { diff --git a/functions_func_c.html b/functions_func_c.html index 21509a057..148ddbc80 100644 --- a/functions_func_c.html +++ b/functions_func_c.html @@ -87,7 +87,7 @@ $(function() { diff --git a/functions_func_d.html b/functions_func_d.html index 856544436..a222b3a0b 100644 --- a/functions_func_d.html +++ b/functions_func_d.html @@ -87,7 +87,7 @@ $(function() { diff --git a/functions_func_e.html b/functions_func_e.html index 01572ec66..5a8784d3e 100644 --- a/functions_func_e.html +++ b/functions_func_e.html @@ -84,7 +84,7 @@ $(function() { diff --git a/functions_func_f.html b/functions_func_f.html index 662f96c08..5a5cb76c0 100644 --- a/functions_func_f.html +++ b/functions_func_f.html @@ -88,7 +88,7 @@ $(function() { diff --git a/functions_func_g.html b/functions_func_g.html index 835d82cd5..87da152c1 100644 --- a/functions_func_g.html +++ b/functions_func_g.html @@ -81,7 +81,7 @@ $(function() { diff --git a/functions_func_h.html b/functions_func_h.html index 87f785005..95613b80f 100644 --- a/functions_func_h.html +++ b/functions_func_h.html @@ -83,7 +83,7 @@ $(function() { diff --git a/functions_func_i.html b/functions_func_i.html index 099ab93fd..9b8888539 100644 --- a/functions_func_i.html +++ b/functions_func_i.html @@ -100,7 +100,7 @@ $(function() { diff --git a/functions_func_l.html b/functions_func_l.html index 29b75cf78..76efc8954 100644 --- a/functions_func_l.html +++ b/functions_func_l.html @@ -83,7 +83,7 @@ $(function() { diff --git a/functions_func_m.html b/functions_func_m.html index aea5c0f6c..1ccbb0e9e 100644 --- a/functions_func_m.html +++ b/functions_func_m.html @@ -85,7 +85,7 @@ $(function() { diff --git a/functions_func_n.html b/functions_func_n.html index dfb4e8d4e..ad57c2336 100644 --- a/functions_func_n.html +++ b/functions_func_n.html @@ -80,7 +80,7 @@ $(function() { diff --git a/functions_func_o.html b/functions_func_o.html index 843d0dc6f..486e7ef06 100644 --- a/functions_func_o.html +++ b/functions_func_o.html @@ -94,7 +94,7 @@ $(function() { diff --git a/functions_func_p.html b/functions_func_p.html index 9cbcb608a..26d4eaf25 100644 --- a/functions_func_p.html +++ b/functions_func_p.html @@ -87,7 +87,7 @@ $(function() { diff --git a/functions_func_q.html b/functions_func_q.html index 44d8e3249..e4e6261b6 100644 --- a/functions_func_q.html +++ b/functions_func_q.html @@ -80,7 +80,7 @@ $(function() { diff --git a/functions_func_r.html b/functions_func_r.html index 37dcbe562..e79a4ad84 100644 --- a/functions_func_r.html +++ b/functions_func_r.html @@ -94,7 +94,7 @@ $(function() { diff --git a/functions_func_s.html b/functions_func_s.html index 7023744f4..0abead585 100644 --- a/functions_func_s.html +++ b/functions_func_s.html @@ -103,7 +103,7 @@ $(function() { diff --git a/functions_func_t.html b/functions_func_t.html index 0b617a59e..dc5217d69 100644 --- a/functions_func_t.html +++ b/functions_func_t.html @@ -88,7 +88,7 @@ $(function() { diff --git a/functions_func_u.html b/functions_func_u.html index 8ccc11ef1..a7f39c5fb 100644 --- a/functions_func_u.html +++ b/functions_func_u.html @@ -81,7 +81,7 @@ $(function() { diff --git a/functions_func_v.html b/functions_func_v.html index 88309e001..b3556ce0e 100644 --- a/functions_func_v.html +++ b/functions_func_v.html @@ -80,7 +80,7 @@ $(function() { diff --git a/functions_func_w.html b/functions_func_w.html index 3c39f3313..2e7c002cb 100644 --- a/functions_func_w.html +++ b/functions_func_w.html @@ -89,7 +89,7 @@ $(function() { diff --git a/functions_func_~.html b/functions_func_~.html index cd7b59f87..f549906a2 100644 --- a/functions_func_~.html +++ b/functions_func_~.html @@ -82,7 +82,7 @@ $(function() { diff --git a/functions_g.html b/functions_g.html index b6f8e6e35..9e4cb0ec4 100644 --- a/functions_g.html +++ b/functions_g.html @@ -81,7 +81,7 @@ $(function() { diff --git a/functions_h.html b/functions_h.html index 16aeebac2..b3ee5604f 100644 --- a/functions_h.html +++ b/functions_h.html @@ -84,7 +84,7 @@ $(function() { diff --git a/functions_i.html b/functions_i.html index 82479595d..522d876e7 100644 --- a/functions_i.html +++ b/functions_i.html @@ -103,7 +103,7 @@ $(function() { diff --git a/functions_l.html b/functions_l.html index 32622dda4..b53526d12 100644 --- a/functions_l.html +++ b/functions_l.html @@ -85,7 +85,7 @@ $(function() { diff --git a/functions_m.html b/functions_m.html index 367828019..0dee941ef 100644 --- a/functions_m.html +++ b/functions_m.html @@ -126,7 +126,7 @@ $(function() { diff --git a/functions_n.html b/functions_n.html index f3b734e5d..fe6150f57 100644 --- a/functions_n.html +++ b/functions_n.html @@ -90,7 +90,7 @@ $(function() { diff --git a/functions_o.html b/functions_o.html index 6ae83144e..af669d6e8 100644 --- a/functions_o.html +++ b/functions_o.html @@ -98,7 +98,7 @@ $(function() { diff --git a/functions_p.html b/functions_p.html index 8170742fa..d2c4936d2 100644 --- a/functions_p.html +++ b/functions_p.html @@ -97,7 +97,7 @@ $(function() { diff --git a/functions_q.html b/functions_q.html index 228b13307..91922efd5 100644 --- a/functions_q.html +++ b/functions_q.html @@ -80,7 +80,7 @@ $(function() { diff --git a/functions_r.html b/functions_r.html index 505449410..7745beb3e 100644 --- a/functions_r.html +++ b/functions_r.html @@ -97,7 +97,7 @@ $(function() { diff --git a/functions_rela.html b/functions_rela.html index c3cbf4f21..206f65970 100644 --- a/functions_rela.html +++ b/functions_rela.html @@ -79,7 +79,7 @@ $(function() { diff --git a/functions_s.html b/functions_s.html index de5ab9537..01a065a62 100644 --- a/functions_s.html +++ b/functions_s.html @@ -112,7 +112,7 @@ $(function() { diff --git a/functions_t.html b/functions_t.html index f2f6e5c2a..5bd3d92c9 100644 --- a/functions_t.html +++ b/functions_t.html @@ -93,7 +93,7 @@ $(function() { diff --git a/functions_type.html b/functions_type.html index 838c23610..ec440a7c5 100644 --- a/functions_type.html +++ b/functions_type.html @@ -83,7 +83,7 @@ $(function() { diff --git a/functions_u.html b/functions_u.html index 05349581f..8ce11bbf2 100644 --- a/functions_u.html +++ b/functions_u.html @@ -82,7 +82,7 @@ $(function() { diff --git a/functions_v.html b/functions_v.html index e44cb9bc3..b933a6d38 100644 --- a/functions_v.html +++ b/functions_v.html @@ -83,7 +83,7 @@ $(function() { diff --git a/functions_vars.html b/functions_vars.html index 5975859d7..7fece3426 100644 --- a/functions_vars.html +++ b/functions_vars.html @@ -85,7 +85,7 @@ $(function() { diff --git a/functions_vars_b.html b/functions_vars_b.html index ce60cc922..a855285db 100644 --- a/functions_vars_b.html +++ b/functions_vars_b.html @@ -87,7 +87,7 @@ $(function() { diff --git a/functions_vars_c.html b/functions_vars_c.html index e80b90482..51246368c 100644 --- a/functions_vars_c.html +++ b/functions_vars_c.html @@ -89,7 +89,7 @@ $(function() { diff --git a/functions_vars_d.html b/functions_vars_d.html index 4c0a6a9a0..1953350d9 100644 --- a/functions_vars_d.html +++ b/functions_vars_d.html @@ -86,7 +86,7 @@ $(function() { diff --git a/functions_vars_e.html b/functions_vars_e.html index 960515062..8f55f63b9 100644 --- a/functions_vars_e.html +++ b/functions_vars_e.html @@ -88,7 +88,7 @@ $(function() { diff --git a/functions_vars_f.html b/functions_vars_f.html index 202062943..93f94b0c4 100644 --- a/functions_vars_f.html +++ b/functions_vars_f.html @@ -80,7 +80,7 @@ $(function() { diff --git a/functions_vars_h.html b/functions_vars_h.html index d268bb267..9e895f907 100644 --- a/functions_vars_h.html +++ b/functions_vars_h.html @@ -80,7 +80,7 @@ $(function() { diff --git a/functions_vars_i.html b/functions_vars_i.html index ba33a68db..4492a287d 100644 --- a/functions_vars_i.html +++ b/functions_vars_i.html @@ -84,7 +84,7 @@ $(function() { diff --git a/functions_vars_l.html b/functions_vars_l.html index 3cc6c9cfc..a06e9538c 100644 --- a/functions_vars_l.html +++ b/functions_vars_l.html @@ -81,7 +81,7 @@ $(function() { diff --git a/functions_vars_m.html b/functions_vars_m.html index 6db8ba70d..861f9d228 100644 --- a/functions_vars_m.html +++ b/functions_vars_m.html @@ -121,7 +121,7 @@ $(function() { diff --git a/functions_vars_n.html b/functions_vars_n.html index 4b1a856d2..59d0fead7 100644 --- a/functions_vars_n.html +++ b/functions_vars_n.html @@ -89,7 +89,7 @@ $(function() { diff --git a/functions_vars_o.html b/functions_vars_o.html index a1afa2d99..bb179bc59 100644 --- a/functions_vars_o.html +++ b/functions_vars_o.html @@ -81,7 +81,7 @@ $(function() { diff --git a/functions_vars_p.html b/functions_vars_p.html index fc5e313e1..d325c0139 100644 --- a/functions_vars_p.html +++ b/functions_vars_p.html @@ -88,7 +88,7 @@ $(function() { diff --git a/functions_vars_r.html b/functions_vars_r.html index 7f976f970..19ec37c12 100644 --- a/functions_vars_r.html +++ b/functions_vars_r.html @@ -82,7 +82,7 @@ $(function() { diff --git a/functions_vars_s.html b/functions_vars_s.html index bb394c126..02c6cc527 100644 --- a/functions_vars_s.html +++ b/functions_vars_s.html @@ -87,7 +87,7 @@ $(function() { diff --git a/functions_vars_t.html b/functions_vars_t.html index e4b911c05..bf94e9ee4 100644 --- a/functions_vars_t.html +++ b/functions_vars_t.html @@ -84,7 +84,7 @@ $(function() { diff --git a/functions_vars_u.html b/functions_vars_u.html index e28eff08b..65858beec 100644 --- a/functions_vars_u.html +++ b/functions_vars_u.html @@ -80,7 +80,7 @@ $(function() { diff --git a/functions_vars_v.html b/functions_vars_v.html index 263955c3c..0d1104dae 100644 --- a/functions_vars_v.html +++ b/functions_vars_v.html @@ -81,7 +81,7 @@ $(function() { diff --git a/functions_vars_w.html b/functions_vars_w.html index c6d642501..6ad17a106 100644 --- a/functions_vars_w.html +++ b/functions_vars_w.html @@ -82,7 +82,7 @@ $(function() { diff --git a/functions_w.html b/functions_w.html index a058f0919..0fd60d067 100644 --- a/functions_w.html +++ b/functions_w.html @@ -92,7 +92,7 @@ $(function() { diff --git a/functions_~.html b/functions_~.html index 3958afbc1..9fe791984 100644 --- a/functions_~.html +++ b/functions_~.html @@ -82,7 +82,7 @@ $(function() { diff --git a/hash_8cpp_source.html b/hash_8cpp_source.html index d48156b5e..28704d329 100644 --- a/hash_8cpp_source.html +++ b/hash_8cpp_source.html @@ -166,7 +166,7 @@ $(function() { codefold.init(0); }); diff --git a/hash_8hpp_source.html b/hash_8hpp_source.html index 3383e271f..ff85fbf2d 100644 --- a/hash_8hpp_source.html +++ b/hash_8hpp_source.html @@ -745,7 +745,7 @@ $(function() { codefold.init(0); }); diff --git a/hex_8hpp_source.html b/hex_8hpp_source.html index 7acb8fe82..5b0a93f23 100644 --- a/hex_8hpp_source.html +++ b/hex_8hpp_source.html @@ -223,7 +223,7 @@ $(function() { codefold.init(0); }); diff --git a/hierarchy.html b/hierarchy.html index bf4a54bb9..b2f896f37 100644 --- a/hierarchy.html +++ b/hierarchy.html @@ -311,7 +311,7 @@ $(function() { diff --git a/html_8hpp_source.html b/html_8hpp_source.html index 39e6ba911..cc3e18285 100644 --- a/html_8hpp_source.html +++ b/html_8hpp_source.html @@ -744,1606 +744,1606 @@ $(function() { codefold.init(0); });
820 case element_t::big:
821 case element_t::small:
822 return true;
-
823 };
-
824 return false;
-
825 }
+
823 default:
+
824 return false;
+
825 };
+
826 }
-
826
-
-
832 static bool is_phrase(_In_ element_t code)
-
833 {
-
834 switch (code) {
-
835 case element_t::em:
-
836 case element_t::strong:
-
837 case element_t::dfn:
-
838 case element_t::code:
-
839 case element_t::samp:
-
840 case element_t::kbd:
-
841 case element_t::var:
-
842 case element_t::cite:
-
843 case element_t::abbr:
-
844 case element_t::acronym:
-
845 case element_t::xmp:
-
846 return true;
-
847 };
-
848 return false;
-
849 }
+
827
+
+
833 static bool is_phrase(_In_ element_t code)
+
834 {
+
835 switch (code) {
+
836 case element_t::em:
+
837 case element_t::strong:
+
838 case element_t::dfn:
+
839 case element_t::code:
+
840 case element_t::samp:
+
841 case element_t::kbd:
+
842 case element_t::var:
+
843 case element_t::cite:
+
844 case element_t::abbr:
+
845 case element_t::acronym:
+
846 case element_t::xmp:
+
847 return true;
+
848 default:
+
849 return false;
+
850 };
+
851 }
-
850
-
-
856 static bool is_special(_In_ element_t code)
-
857 {
-
858 switch (code) {
-
859 case element_t::a:
-
860 case element_t::img:
-
861 case element_t::applet:
-
862 case element_t::object:
-
863 case element_t::embed:
-
864 case element_t::font:
-
865 case element_t::basefont:
-
866 case element_t::br:
-
867 case element_t::wbr:
-
868 case element_t::rt:
-
869 case element_t::script:
-
870 case element_t::map:
-
871 case element_t::q:
-
872 case element_t::sub:
-
873 case element_t::sup:
-
874 case element_t::ruby:
-
875 case element_t::span:
-
876 case element_t::bdo:
-
877 case element_t::iframe:
-
878 case element_t::nobr:
-
879 return true;
-
880 };
-
881 return false;
-
882 }
+
852
+
+
858 static bool is_special(_In_ element_t code)
+
859 {
+
860 switch (code) {
+
861 case element_t::a:
+
862 case element_t::img:
+
863 case element_t::applet:
+
864 case element_t::object:
+
865 case element_t::embed:
+
866 case element_t::font:
+
867 case element_t::basefont:
+
868 case element_t::br:
+
869 case element_t::wbr:
+
870 case element_t::rt:
+
871 case element_t::script:
+
872 case element_t::map:
+
873 case element_t::q:
+
874 case element_t::sub:
+
875 case element_t::sup:
+
876 case element_t::ruby:
+
877 case element_t::span:
+
878 case element_t::bdo:
+
879 case element_t::iframe:
+
880 case element_t::nobr:
+
881 return true;
+
882 default:
+
883 return false;
+
884 };
+
885 }
-
883
-
-
889 static bool is_formctrl(_In_ element_t code)
-
890 {
-
891 switch (code) {
-
892 case element_t::input:
-
893 case element_t::select:
-
894 case element_t::textarea:
-
895 case element_t::label:
-
896 case element_t::button:
-
897 return true;
-
898 };
-
899 return false;
-
900 }
+
886
+
+
892 static bool is_formctrl(_In_ element_t code)
+
893 {
+
894 switch (code) {
+
895 case element_t::input:
+
896 case element_t::select:
+
897 case element_t::textarea:
+
898 case element_t::label:
+
899 case element_t::button:
+
900 return true;
+
901 default:
+
902 return false;
+
903 };
+
904 }
-
901
-
-
907 static bool is_inline(_In_ element_t code)
-
908 {
-
909 return
-
910 code == element_t::PCDATA ||
-
911 is_fontstyle(code) ||
-
912 is_phrase(code) ||
-
913 is_special(code) ||
-
914 is_formctrl(code);
-
915 }
+
905
+
+
911 static bool is_inline(_In_ element_t code)
+
912 {
+
913 return
+
914 code == element_t::PCDATA ||
+
915 is_fontstyle(code) ||
+
916 is_phrase(code) ||
+
917 is_special(code) ||
+
918 is_formctrl(code);
+
919 }
-
916
-
-
922 static bool is_heading(_In_ element_t code)
-
923 {
-
924 switch (code) {
-
925 case element_t::h1:
-
926 case element_t::h2:
-
927 case element_t::h3:
-
928 case element_t::h4:
-
929 case element_t::h5:
-
930 case element_t::h6:
-
931 return true;
-
932 };
-
933 return false;
-
934 }
+
920
+
+
926 static bool is_heading(_In_ element_t code)
+
927 {
+
928 switch (code) {
+
929 case element_t::h1:
+
930 case element_t::h2:
+
931 case element_t::h3:
+
932 case element_t::h4:
+
933 case element_t::h5:
+
934 case element_t::h6:
+
935 return true;
+
936 default:
+
937 return false;
+
938 };
+
939 }
-
935
-
-
941 static bool is_list(_In_ element_t code)
-
942 {
-
943 switch (code) {
-
944 case element_t::ul:
-
945 case element_t::ol:
-
946 case element_t::dir:
-
947 case element_t::menu:
-
948 return true;
-
949 };
-
950 return false;
-
951 }
+
940
+
+
946 static bool is_list(_In_ element_t code)
+
947 {
+
948 switch (code) {
+
949 case element_t::ul:
+
950 case element_t::ol:
+
951 case element_t::dir:
+
952 case element_t::menu:
+
953 return true;
+
954 default:
+
955 return false;
+
956 };
+
957 }
-
952
-
-
958 static bool is_preformatted(_In_ element_t code)
-
959 {
-
960 switch (code) {
-
961 case element_t::pre:
-
962 case element_t::listing:
-
963 return true;
-
964 }
-
965 return false;
-
966 }
+
958
+
+
964 static bool is_preformatted(_In_ element_t code)
+
965 {
+
966 switch (code) {
+
967 case element_t::pre:
+
968 case element_t::listing:
+
969 return true;
+
970 default:
+
971 return false;
+
972 }
+
973 }
-
967
-
-
973 static bool is_block(_In_ element_t code)
-
974 {
-
975 if (is_heading(code) ||
-
976 is_list(code) ||
-
977 is_preformatted(code)) return true;
-
978 switch (code) {
-
979 case element_t::p:
-
980 case element_t::dl:
-
981 case element_t::div:
-
982 case element_t::center:
-
983 case element_t::marquee:
-
984 case element_t::noscript:
-
985 case element_t::noframes:
-
986 case element_t::noembed:
-
987 case element_t::blockquote:
-
988 case element_t::form:
-
989 case element_t::isindex:
-
990 case element_t::hr:
-
991 case element_t::table:
-
992 case element_t::fieldset:
-
993 case element_t::address:
-
994 return true;
-
995 };
-
996 return false;
-
997 }
+
974
+
+
980 static bool is_block(_In_ element_t code)
+
981 {
+
982 if (is_heading(code) ||
+
983 is_list(code) ||
+
984 is_preformatted(code)) return true;
+
985 switch (code) {
+
986 case element_t::p:
+
987 case element_t::dl:
+
988 case element_t::div:
+
989 case element_t::center:
+
990 case element_t::marquee:
+
991 case element_t::noscript:
+
992 case element_t::noframes:
+
993 case element_t::noembed:
+
994 case element_t::blockquote:
+
995 case element_t::form:
+
996 case element_t::isindex:
+
997 case element_t::hr:
+
998 case element_t::table:
+
999 case element_t::fieldset:
+
1000 case element_t::address:
+
1001 return true;
+
1002 default:
+
1003 return false;
+
1004 };
+
1005 }
-
998
-
-
1004 static bool is_flow(_In_ element_t code)
-
1005 {
-
1006 return is_block(code) || is_inline(code);
-
1007 }
+
1006
+
+
1012 static bool is_flow(_In_ element_t code)
+
1013 {
+
1014 return is_block(code) || is_inline(code);
+
1015 }
-
1008
-
-
1014 static bool is_head_content(_In_ element_t code)
-
1015 {
-
1016 switch (code) {
-
1017 case element_t::title:
-
1018 case element_t::isindex:
-
1019 case element_t::base:
-
1020 case element_t::nextid:
-
1021 return true;
-
1022 };
-
1023 return false;
-
1024 }
+
1016
+
+
1022 static bool is_head_content(_In_ element_t code)
+
1023 {
+
1024 switch (code) {
+
1025 case element_t::title:
+
1026 case element_t::isindex:
+
1027 case element_t::base:
+
1028 case element_t::nextid:
+
1029 return true;
+
1030 default:
+
1031 return false;
+
1032 };
+
1033 }
-
1025
-
-
1031 static bool is_head_misc(_In_ element_t code)
-
1032 {
-
1033 switch (code) {
-
1034 case element_t::script:
-
1035 case element_t::style:
-
1036 case element_t::meta:
-
1037 case element_t::link:
-
1038 case element_t::object:
-
1039 return true;
-
1040 };
-
1041 return false;
-
1042 }
+
1034
+
+
1040 static bool is_head_misc(_In_ element_t code)
+
1041 {
+
1042 switch (code) {
+
1043 case element_t::script:
+
1044 case element_t::style:
+
1045 case element_t::meta:
+
1046 case element_t::link:
+
1047 case element_t::object:
+
1048 return true;
+
1049 default:
+
1050 return false;
+
1051 };
+
1052 }
-
1043
-
-
1049 static bool is_pre_exclusion(_In_ element_t code)
-
1050 {
-
1051 switch (code) {
-
1052 case element_t::img:
-
1053 case element_t::object:
-
1054 case element_t::applet:
-
1055 case element_t::embed:
-
1056 case element_t::big:
-
1057 case element_t::small:
-
1058 case element_t::sub:
-
1059 case element_t::sup:
-
1060 case element_t::ruby:
-
1061 case element_t::font:
-
1062 case element_t::basefont:
-
1063 case element_t::nobr:
-
1064 return true;
-
1065 };
-
1066 return false;
-
1067 }
+
1053
+
+
1059 static bool is_pre_exclusion(_In_ element_t code)
+
1060 {
+
1061 switch (code) {
+
1062 case element_t::img:
+
1063 case element_t::object:
+
1064 case element_t::applet:
+
1065 case element_t::embed:
+
1066 case element_t::big:
+
1067 case element_t::small:
+
1068 case element_t::sub:
+
1069 case element_t::sup:
+
1070 case element_t::ruby:
+
1071 case element_t::font:
+
1072 case element_t::basefont:
+
1073 case element_t::nobr:
+
1074 return true;
+
1075 default:
+
1076 return false;
+
1077 };
+
1078 }
-
1068
-
-
1074 static bool is_html_content(_In_ element_t code)
-
1075 {
-
1076 switch (code) {
-
1077 case element_t::head:
-
1078 case element_t::body:
-
1079 case element_t::frameset:
-
1080 return true;
-
1081 };
-
1082 return false;
-
1083 }
+
1079
+
+
1085 static bool is_html_content(_In_ element_t code)
+
1086 {
+
1087 switch (code) {
+
1088 case element_t::head:
+
1089 case element_t::body:
+
1090 case element_t::frameset:
+
1091 return true;
+
1092 default:
+
1093 return false;
+
1094 };
+
1095 }
-
1084
-
-
1090 static bool is_group(_In_ element_t code)
-
1091 {
-
1092 if (is_block(code) ||
-
1093 is_html_content(code) ||
-
1094 is_head_content(code)) return true;
-
1095 switch (code) {
-
1096 case element_t::col:
-
1097 case element_t::colgroup:
-
1098 case element_t::dd:
-
1099 case element_t::dir:
-
1100 case element_t::dt:
-
1101 case element_t::frame:
-
1102 case element_t::iframe:
-
1103 case element_t::legend:
-
1104 case element_t::td:
-
1105 case element_t::th:
-
1106 case element_t::tr:
-
1107 return true;
-
1108 };
-
1109 return false;
-
1110 }
+
1096
+
+
1102 static bool is_group(_In_ element_t code)
+
1103 {
+
1104 if (is_block(code) ||
+
1105 is_html_content(code) ||
+
1106 is_head_content(code)) return true;
+
1107 switch (code) {
+
1108 case element_t::col:
+
1109 case element_t::colgroup:
+
1110 case element_t::dd:
+
1111 case element_t::dir:
+
1112 case element_t::dt:
+
1113 case element_t::frame:
+
1114 case element_t::iframe:
+
1115 case element_t::legend:
+
1116 case element_t::td:
+
1117 case element_t::th:
+
1118 case element_t::tr:
+
1119 return true;
+
1120 default:
+
1121 return false;
+
1122 };
+
1123 }
-
1111
-
-
1120 static bool may_contain(_In_ element_t parent, _In_ element_t child)
-
1121 {
-
1122 if (child == element_t::unknown || child == element_t::comment)
-
1123 return true;
-
1124 if (is_fontstyle(parent) || is_phrase(parent))
-
1125 return is_inline(child);
-
1126 if (is_heading(parent))
-
1127 return is_inline(child);
-
1128
-
1129 switch (parent) {
-
1130 case element_t::a: return is_inline(child) && child != element_t::a;
-
1131 case element_t::address: return is_inline(child) || child == element_t::p;
-
1132 case element_t::applet: return is_flow(child) || child == element_t::param;
-
1133 case element_t::area: return false;
-
1134 case element_t::base: return false;
-
1135 case element_t::basefont: return false;
-
1136 case element_t::bdo: return is_inline(child);
-
1137 case element_t::blockquote: return is_flow(child);
-
1138 case element_t::body: return is_flow(child) || child == element_t::ins || child == element_t::del;
-
1139 case element_t::br: return false;
-
1140 case element_t::button: return is_flow(child) && !is_formctrl(child) && child != element_t::a && child != element_t::form && child != element_t::isindex && child != element_t::fieldset && child != element_t::iframe;
-
1141 case element_t::caption: return is_inline(child);
-
1142 case element_t::center: return is_flow(child);
-
1143 case element_t::col: return false;
-
1144 case element_t::colgroup: return child == element_t::col;
-
1145 case element_t::comment: return child == element_t::CDATA;
-
1146 case element_t::dd: return is_flow(child);
-
1147 case element_t::del: return is_flow(child);
-
1148 case element_t::dir: return child == element_t::li;
-
1149 case element_t::div: return is_flow(child);
-
1150 case element_t::dl: return child == element_t::dt || child == element_t::dd;
-
1151 case element_t::dt: return is_inline(child);
-
1152 case element_t::embed: return is_flow(child) || child == element_t::param;
-
1153 case element_t::fieldset: return is_flow(child) || child == element_t::legend || child == element_t::PCDATA;
-
1154 case element_t::font: return is_inline(child);
-
1155 case element_t::form: return is_flow(child) && child != element_t::form;
-
1156 case element_t::frame: return false;
-
1157 case element_t::frameset: return child == element_t::frameset || child == element_t::frame || child == element_t::noframes;
-
1158 case element_t::head: return is_head_content(child) || is_head_misc(child);
-
1159 case element_t::hr: return false;
-
1160 case element_t::html: return is_html_content(child);
-
1161 case element_t::iframe: return is_flow(child);
-
1162 case element_t::img: return false;
-
1163 case element_t::input: return false;
-
1164 case element_t::ins: return is_flow(child);
-
1165 case element_t::isindex: return false;
-
1166 case element_t::label: return is_inline(child) && child != element_t::label;
-
1167 case element_t::legend: return is_inline(child);
-
1168 case element_t::li: return is_flow(child);
-
1169 case element_t::link: return false;
-
1170 case element_t::listing: return child == element_t::CDATA;
-
1171 case element_t::map: return is_block(child) || child == element_t::area;
-
1172 case element_t::marquee: return is_flow(child);
-
1173 case element_t::menu: return child == element_t::li;
-
1174 case element_t::meta: return false;
-
1175 case element_t::nobr: return is_inline(child) || child == element_t::wbr;
-
1176 case element_t::noframes: return (is_flow(child) || child == element_t::body) && child != element_t::noframes;
-
1177 case element_t::noscript: return is_flow(child);
-
1178 case element_t::noembed: return is_flow(child);
-
1179 case element_t::object: return is_flow(child) || child == element_t::param;
-
1180 case element_t::ol: return child == element_t::li;
-
1181 case element_t::optgroup: return child == element_t::option;
-
1182 case element_t::option: return child == element_t::PCDATA;
-
1183 case element_t::p: return is_inline(child);
-
1184 case element_t::param: return false;
-
1185 case element_t::plaintext: return is_flow(child);
-
1186 case element_t::pre: return is_inline(child) && !is_pre_exclusion(child);
-
1187 case element_t::q: return is_inline(child);
-
1188 case element_t::rt: return false;
-
1189 case element_t::ruby: return is_inline(child);
-
1190 case element_t::script: return child == element_t::CDATA;
-
1191 case element_t::select: return child == element_t::optgroup || child == element_t::option;
-
1192 case element_t::span: return is_inline(child);
-
1193 case element_t::style: return child == element_t::CDATA;
-
1194 case element_t::sub: return is_inline(child);
-
1195 case element_t::sup: return is_inline(child);
-
1196 case element_t::table: return child == element_t::caption || child == element_t::col || child == element_t::colgroup || child == element_t::thead || child == element_t::tfoot || child == element_t::tbody;
-
1197 case element_t::tbody: return child == element_t::tr;
-
1198 case element_t::td: return is_flow(child);
-
1199 case element_t::textarea: return child == element_t::PCDATA;
-
1200 case element_t::tfoot: return child == element_t::tr;
-
1201 case element_t::th: return is_flow(child);
-
1202 case element_t::thead: return child == element_t::tr;
-
1203 case element_t::title: return child == element_t::PCDATA;
-
1204 case element_t::tr: return child == element_t::td || child == element_t::th;
-
1205 case element_t::ul: return child == element_t::li;
-
1206 case element_t::wbr: return false;
-
1207 case element_t::unknown: return true;
-
1208 }
-
1209 return false;
-
1210 }
+
1124
+
+
1133 static bool may_contain(_In_ element_t parent, _In_ element_t child)
+
1134 {
+
1135 if (child == element_t::unknown || child == element_t::comment)
+
1136 return true;
+
1137 if (is_fontstyle(parent) || is_phrase(parent))
+
1138 return is_inline(child);
+
1139 if (is_heading(parent))
+
1140 return is_inline(child);
+
1141
+
1142 switch (parent) {
+
1143 case element_t::a: return is_inline(child) && child != element_t::a;
+
1144 case element_t::address: return is_inline(child) || child == element_t::p;
+
1145 case element_t::applet: return is_flow(child) || child == element_t::param;
+
1146 case element_t::area: return false;
+
1147 case element_t::base: return false;
+
1148 case element_t::basefont: return false;
+
1149 case element_t::bdo: return is_inline(child);
+
1150 case element_t::blockquote: return is_flow(child);
+
1151 case element_t::body: return is_flow(child) || child == element_t::ins || child == element_t::del;
+
1152 case element_t::br: return false;
+
1153 case element_t::button: return is_flow(child) && !is_formctrl(child) && child != element_t::a && child != element_t::form && child != element_t::isindex && child != element_t::fieldset && child != element_t::iframe;
+
1154 case element_t::caption: return is_inline(child);
+
1155 case element_t::center: return is_flow(child);
+
1156 case element_t::col: return false;
+
1157 case element_t::colgroup: return child == element_t::col;
+
1158 case element_t::comment: return child == element_t::CDATA;
+
1159 case element_t::dd: return is_flow(child);
+
1160 case element_t::del: return is_flow(child);
+
1161 case element_t::dir: return child == element_t::li;
+
1162 case element_t::div: return is_flow(child);
+
1163 case element_t::dl: return child == element_t::dt || child == element_t::dd;
+
1164 case element_t::dt: return is_inline(child);
+
1165 case element_t::embed: return is_flow(child) || child == element_t::param;
+
1166 case element_t::fieldset: return is_flow(child) || child == element_t::legend || child == element_t::PCDATA;
+
1167 case element_t::font: return is_inline(child);
+
1168 case element_t::form: return is_flow(child) && child != element_t::form;
+
1169 case element_t::frame: return false;
+
1170 case element_t::frameset: return child == element_t::frameset || child == element_t::frame || child == element_t::noframes;
+
1171 case element_t::head: return is_head_content(child) || is_head_misc(child);
+
1172 case element_t::hr: return false;
+
1173 case element_t::html: return is_html_content(child);
+
1174 case element_t::iframe: return is_flow(child);
+
1175 case element_t::img: return false;
+
1176 case element_t::input: return false;
+
1177 case element_t::ins: return is_flow(child);
+
1178 case element_t::isindex: return false;
+
1179 case element_t::label: return is_inline(child) && child != element_t::label;
+
1180 case element_t::legend: return is_inline(child);
+
1181 case element_t::li: return is_flow(child);
+
1182 case element_t::link: return false;
+
1183 case element_t::listing: return child == element_t::CDATA;
+
1184 case element_t::map: return is_block(child) || child == element_t::area;
+
1185 case element_t::marquee: return is_flow(child);
+
1186 case element_t::menu: return child == element_t::li;
+
1187 case element_t::meta: return false;
+
1188 case element_t::nobr: return is_inline(child) || child == element_t::wbr;
+
1189 case element_t::noframes: return (is_flow(child) || child == element_t::body) && child != element_t::noframes;
+
1190 case element_t::noscript: return is_flow(child);
+
1191 case element_t::noembed: return is_flow(child);
+
1192 case element_t::object: return is_flow(child) || child == element_t::param;
+
1193 case element_t::ol: return child == element_t::li;
+
1194 case element_t::optgroup: return child == element_t::option;
+
1195 case element_t::option: return child == element_t::PCDATA;
+
1196 case element_t::p: return is_inline(child);
+
1197 case element_t::param: return false;
+
1198 case element_t::plaintext: return is_flow(child);
+
1199 case element_t::pre: return is_inline(child) && !is_pre_exclusion(child);
+
1200 case element_t::q: return is_inline(child);
+
1201 case element_t::rt: return false;
+
1202 case element_t::ruby: return is_inline(child);
+
1203 case element_t::script: return child == element_t::CDATA;
+
1204 case element_t::select: return child == element_t::optgroup || child == element_t::option;
+
1205 case element_t::span: return is_inline(child);
+
1206 case element_t::style: return child == element_t::CDATA;
+
1207 case element_t::sub: return is_inline(child);
+
1208 case element_t::sup: return is_inline(child);
+
1209 case element_t::table: return child == element_t::caption || child == element_t::col || child == element_t::colgroup || child == element_t::thead || child == element_t::tfoot || child == element_t::tbody;
+
1210 case element_t::tbody: return child == element_t::tr;
+
1211 case element_t::td: return is_flow(child);
+
1212 case element_t::textarea: return child == element_t::PCDATA;
+
1213 case element_t::tfoot: return child == element_t::tr;
+
1214 case element_t::th: return is_flow(child);
+
1215 case element_t::thead: return child == element_t::tr;
+
1216 case element_t::title: return child == element_t::PCDATA;
+
1217 case element_t::tr: return child == element_t::td || child == element_t::th;
+
1218 case element_t::ul: return child == element_t::li;
+
1219 case element_t::wbr: return false;
+
1220 case element_t::unknown: return true;
+
1221 default: return false;
+
1222 }
+
1223 }
-
1211
-
1219 template <class T>
-
-
1220 static bool is_uri(_In_ element_t code, _In_reads_or_z_opt_(num_chars) const T* attr_name, _In_ size_t num_chars)
-
1221 {
-
1222 _Assume_(attr_name || !num_chars);
-
1223 switch (code) {
-
1224 case element_t::a: return !stdex::strnicmp(attr_name, num_chars, "href", SIZE_MAX);
-
1225 case element_t::applet: return !stdex::strnicmp(attr_name, num_chars, "code", SIZE_MAX) ||
-
1226 !stdex::strnicmp(attr_name, num_chars, "codebase", SIZE_MAX) ||
-
1227 !stdex::strnicmp(attr_name, num_chars, "src", SIZE_MAX);
-
1228 case element_t::area: return !stdex::strnicmp(attr_name, num_chars, "href", SIZE_MAX);
-
1229 case element_t::base: return !stdex::strnicmp(attr_name, num_chars, "href", SIZE_MAX);
-
1230 case element_t::bgsound: return !stdex::strnicmp(attr_name, num_chars, "src", SIZE_MAX);
-
1231 case element_t::blockquote: return !stdex::strnicmp(attr_name, num_chars, "cite", SIZE_MAX);
-
1232 case element_t::body: return !stdex::strnicmp(attr_name, num_chars, "background", SIZE_MAX);
-
1233 case element_t::comment: return !stdex::strnicmp(attr_name, num_chars, "data", SIZE_MAX);
-
1234 case element_t::del: return !stdex::strnicmp(attr_name, num_chars, "cite", SIZE_MAX);
-
1235 case element_t::embed: return !stdex::strnicmp(attr_name, num_chars, "pluginspage", SIZE_MAX) ||
-
1236 !stdex::strnicmp(attr_name, num_chars, "src", SIZE_MAX);
-
1237 case element_t::form: return !stdex::strnicmp(attr_name, num_chars, "action", SIZE_MAX);
-
1238 case element_t::frame: return !stdex::strnicmp(attr_name, num_chars, "longdesc", SIZE_MAX) ||
-
1239 !stdex::strnicmp(attr_name, num_chars, "src", SIZE_MAX);
-
1240 case element_t::head: return !stdex::strnicmp(attr_name, num_chars, "profile", SIZE_MAX);
-
1241 case element_t::iframe: return !stdex::strnicmp(attr_name, num_chars, "longdesc", SIZE_MAX) ||
-
1242 !stdex::strnicmp(attr_name, num_chars, "src", SIZE_MAX);
-
1243 case element_t::img: return !stdex::strnicmp(attr_name, num_chars, "longdesc", SIZE_MAX) ||
-
1244 !stdex::strnicmp(attr_name, num_chars, "lowsrc", SIZE_MAX) ||
-
1245 !stdex::strnicmp(attr_name, num_chars, "src", SIZE_MAX) ||
-
1246 !stdex::strnicmp(attr_name, num_chars, "usemap", SIZE_MAX);
-
1247 case element_t::input: return !stdex::strnicmp(attr_name, num_chars, "lowsrc", SIZE_MAX) ||
-
1248 !stdex::strnicmp(attr_name, num_chars, "src", SIZE_MAX) ||
-
1249 !stdex::strnicmp(attr_name, num_chars, "usemap", SIZE_MAX);
-
1250 case element_t::ins: return !stdex::strnicmp(attr_name, num_chars, "cite", SIZE_MAX);
-
1251 case element_t::link: return !stdex::strnicmp(attr_name, num_chars, "href", SIZE_MAX);
-
1252 case element_t::object: return !stdex::strnicmp(attr_name, num_chars, "basehref", SIZE_MAX) ||
-
1253 !stdex::strnicmp(attr_name, num_chars, "classid", SIZE_MAX) ||
-
1254 !stdex::strnicmp(attr_name, num_chars, "code", SIZE_MAX) ||
-
1255 !stdex::strnicmp(attr_name, num_chars, "codebase", SIZE_MAX) ||
-
1256 !stdex::strnicmp(attr_name, num_chars, "data", SIZE_MAX) ||
-
1257 !stdex::strnicmp(attr_name, num_chars, "usemap", SIZE_MAX);
-
1258 case element_t::q: return !stdex::strnicmp(attr_name, num_chars, "cite", SIZE_MAX);
-
1259 case element_t::script: return !stdex::strnicmp(attr_name, num_chars, "src", SIZE_MAX);
-
1260 case element_t::table: return !stdex::strnicmp(attr_name, num_chars, "background", SIZE_MAX);
-
1261 case element_t::td: return !stdex::strnicmp(attr_name, num_chars, "background", SIZE_MAX);
-
1262 case element_t::th: return !stdex::strnicmp(attr_name, num_chars, "background", SIZE_MAX);
-
1263 }
-
1264 return false;
-
1265 }
+
1224
+
1232 template <class T>
+
+
1233 static bool is_uri(_In_ element_t code, _In_reads_or_z_opt_(num_chars) const T* attr_name, _In_ size_t num_chars)
+
1234 {
+
1235 _Assume_(attr_name || !num_chars);
+
1236 switch (code) {
+
1237 case element_t::a: return !stdex::strnicmp(attr_name, num_chars, "href", SIZE_MAX);
+
1238 case element_t::applet: return !stdex::strnicmp(attr_name, num_chars, "code", SIZE_MAX) ||
+
1239 !stdex::strnicmp(attr_name, num_chars, "codebase", SIZE_MAX) ||
+
1240 !stdex::strnicmp(attr_name, num_chars, "src", SIZE_MAX);
+
1241 case element_t::area: return !stdex::strnicmp(attr_name, num_chars, "href", SIZE_MAX);
+
1242 case element_t::base: return !stdex::strnicmp(attr_name, num_chars, "href", SIZE_MAX);
+
1243 case element_t::bgsound: return !stdex::strnicmp(attr_name, num_chars, "src", SIZE_MAX);
+
1244 case element_t::blockquote: return !stdex::strnicmp(attr_name, num_chars, "cite", SIZE_MAX);
+
1245 case element_t::body: return !stdex::strnicmp(attr_name, num_chars, "background", SIZE_MAX);
+
1246 case element_t::comment: return !stdex::strnicmp(attr_name, num_chars, "data", SIZE_MAX);
+
1247 case element_t::del: return !stdex::strnicmp(attr_name, num_chars, "cite", SIZE_MAX);
+
1248 case element_t::embed: return !stdex::strnicmp(attr_name, num_chars, "pluginspage", SIZE_MAX) ||
+
1249 !stdex::strnicmp(attr_name, num_chars, "src", SIZE_MAX);
+
1250 case element_t::form: return !stdex::strnicmp(attr_name, num_chars, "action", SIZE_MAX);
+
1251 case element_t::frame: return !stdex::strnicmp(attr_name, num_chars, "longdesc", SIZE_MAX) ||
+
1252 !stdex::strnicmp(attr_name, num_chars, "src", SIZE_MAX);
+
1253 case element_t::head: return !stdex::strnicmp(attr_name, num_chars, "profile", SIZE_MAX);
+
1254 case element_t::iframe: return !stdex::strnicmp(attr_name, num_chars, "longdesc", SIZE_MAX) ||
+
1255 !stdex::strnicmp(attr_name, num_chars, "src", SIZE_MAX);
+
1256 case element_t::img: return !stdex::strnicmp(attr_name, num_chars, "longdesc", SIZE_MAX) ||
+
1257 !stdex::strnicmp(attr_name, num_chars, "lowsrc", SIZE_MAX) ||
+
1258 !stdex::strnicmp(attr_name, num_chars, "src", SIZE_MAX) ||
+
1259 !stdex::strnicmp(attr_name, num_chars, "usemap", SIZE_MAX);
+
1260 case element_t::input: return !stdex::strnicmp(attr_name, num_chars, "lowsrc", SIZE_MAX) ||
+
1261 !stdex::strnicmp(attr_name, num_chars, "src", SIZE_MAX) ||
+
1262 !stdex::strnicmp(attr_name, num_chars, "usemap", SIZE_MAX);
+
1263 case element_t::ins: return !stdex::strnicmp(attr_name, num_chars, "cite", SIZE_MAX);
+
1264 case element_t::link: return !stdex::strnicmp(attr_name, num_chars, "href", SIZE_MAX);
+
1265 case element_t::object: return !stdex::strnicmp(attr_name, num_chars, "basehref", SIZE_MAX) ||
+
1266 !stdex::strnicmp(attr_name, num_chars, "classid", SIZE_MAX) ||
+
1267 !stdex::strnicmp(attr_name, num_chars, "code", SIZE_MAX) ||
+
1268 !stdex::strnicmp(attr_name, num_chars, "codebase", SIZE_MAX) ||
+
1269 !stdex::strnicmp(attr_name, num_chars, "data", SIZE_MAX) ||
+
1270 !stdex::strnicmp(attr_name, num_chars, "usemap", SIZE_MAX);
+
1271 case element_t::q: return !stdex::strnicmp(attr_name, num_chars, "cite", SIZE_MAX);
+
1272 case element_t::script: return !stdex::strnicmp(attr_name, num_chars, "src", SIZE_MAX);
+
1273 case element_t::table: return !stdex::strnicmp(attr_name, num_chars, "background", SIZE_MAX);
+
1274 case element_t::td: return !stdex::strnicmp(attr_name, num_chars, "background", SIZE_MAX);
+
1275 case element_t::th: return !stdex::strnicmp(attr_name, num_chars, "background", SIZE_MAX);
+
1276 default: return false;
+
1277 }
+
1278 }
-
1266
-
1274 template <class T>
-
-
1275 static bool is_localizable(element_t code, const T* attr_name, size_t num_chars)
-
1276 {
-
1277 _Assume_(attr_name || !num_chars);
-
1278 if (!stdex::strnicmp(attr_name, num_chars, "title", SIZE_MAX))
-
1279 return true;
-
1280 switch (code) {
-
1281 case element_t::applet: return !stdex::strnicmp(attr_name, num_chars, "alt", SIZE_MAX);
-
1282 case element_t::area: return !stdex::strnicmp(attr_name, num_chars, "alt", SIZE_MAX);
-
1283 case element_t::img: return !stdex::strnicmp(attr_name, num_chars, "alt", SIZE_MAX);
-
1284 case element_t::input: return !stdex::strnicmp(attr_name, num_chars, "alt", SIZE_MAX);
-
1285 case element_t::object: return !stdex::strnicmp(attr_name, num_chars, "alt", SIZE_MAX);
-
1286 case element_t::table: return !stdex::strnicmp(attr_name, num_chars, "summary", SIZE_MAX);
-
1287 case element_t::td: return !stdex::strnicmp(attr_name, num_chars, "abbr", SIZE_MAX);
-
1288 case element_t::th: return !stdex::strnicmp(attr_name, num_chars, "abbr", SIZE_MAX);
-
1289 }
-
1290 return false;
-
1291 }
+
1279
+
1287 template <class T>
+
+
1288 static bool is_localizable(element_t code, const T* attr_name, size_t num_chars)
+
1289 {
+
1290 _Assume_(attr_name || !num_chars);
+
1291 if (!stdex::strnicmp(attr_name, num_chars, "title", SIZE_MAX))
+
1292 return true;
+
1293 switch (code) {
+
1294 case element_t::applet: return !stdex::strnicmp(attr_name, num_chars, "alt", SIZE_MAX);
+
1295 case element_t::area: return !stdex::strnicmp(attr_name, num_chars, "alt", SIZE_MAX);
+
1296 case element_t::img: return !stdex::strnicmp(attr_name, num_chars, "alt", SIZE_MAX);
+
1297 case element_t::input: return !stdex::strnicmp(attr_name, num_chars, "alt", SIZE_MAX);
+
1298 case element_t::object: return !stdex::strnicmp(attr_name, num_chars, "alt", SIZE_MAX);
+
1299 case element_t::table: return !stdex::strnicmp(attr_name, num_chars, "summary", SIZE_MAX);
+
1300 case element_t::td: return !stdex::strnicmp(attr_name, num_chars, "abbr", SIZE_MAX);
+
1301 case element_t::th: return !stdex::strnicmp(attr_name, num_chars, "abbr", SIZE_MAX);
+
1302 default: return false;
+
1303 }
+
1304 }
-
1292 };
+
1305 };
-
1293
-
1294 class sequence;
-
1295 using sequence_store = std::vector<std::unique_ptr<sequence>>;
-
1296
-
- -
1301 {
-
1302 public:
-
1303 stdex::parser::html_sequence_t type;
- -
1306
-
1307 sequence(_In_ stdex::parser::html_sequence_t _type = stdex::parser::html_sequence_t::unknown, _In_ size_t start = 0, size_t end = 0, _In_opt_ sequence* _parent = nullptr) :
-
1308 type(_type),
-
1309 interval(start, end),
-
1310 parent(_parent)
-
1311 {}
-
1312
-
1313 virtual ~sequence() {} // make polymorphic
-
1314 };
+
1307 class sequence;
+
1308 using sequence_store = std::vector<std::unique_ptr<sequence>>;
+
1309
+
+ +
1314 {
+
1315 public:
+
1316 stdex::parser::html_sequence_t type;
+ + +
1319
+
1320 sequence(_In_ stdex::parser::html_sequence_t _type = stdex::parser::html_sequence_t::unknown, _In_ size_t start = 0, size_t end = 0, _In_opt_ sequence* _parent = nullptr) :
+
1321 type(_type),
+
1322 interval(start, end),
+
1323 parent(_parent)
+
1324 {}
+
1325
+
1326 virtual ~sequence() {} // make polymorphic
+
1327 };
-
1315
-
-
1319 class element : public sequence
-
1320 {
-
1321 public:
-
1322 template <class T>
-
1323 element(_Inout_ stdex::parser::basic_html_tag<T>&& tag, _In_z_ const T* src, _In_opt_ sequence* parent = nullptr) :
-
1324 sequence(tag.type, tag.interval.start, tag.interval.end, parent),
-
1325 code(element_code(src + tag.name.start, tag.name.size())),
-
1326 name(std::move(tag.name)),
-
1327 attributes(std::move(tag.attributes))
-
1328 {}
-
1329
-
1330 template <class T>
-
1331 static element_t element_code(_In_reads_z_(num_chars) const T* name, size_t num_chars)
-
1332 {
-
1333 static const struct {
-
1334 const char* name;
-
1335 element_t code;
-
1336 } mapping[] = {
-
1337 { "a", element_t::a, },
-
1338 { "abbr", element_t::abbr, },
-
1339 { "acronym", element_t::acronym, },
-
1340 { "address", element_t::address, },
-
1341 { "applet", element_t::applet, },
-
1342 { "area", element_t::area, },
-
1343 { "b", element_t::b, },
-
1344 { "base", element_t::base, },
-
1345 { "basefont", element_t::basefont, },
-
1346 { "bdo", element_t::bdo, },
-
1347 { "bgsound", element_t::bgsound, },
-
1348 { "big", element_t::big, },
-
1349 { "blink", element_t::blink, },
-
1350 { "blockquote", element_t::blockquote, },
-
1351 { "body", element_t::body, },
-
1352 { "br", element_t::br, },
-
1353 { "button", element_t::button, },
-
1354 { "caption", element_t::caption, },
-
1355 { "center", element_t::center, },
-
1356 { "cite", element_t::cite, },
-
1357 { "code", element_t::code, },
-
1358 { "col", element_t::col, },
-
1359 { "colgroup", element_t::colgroup, },
-
1360 { "comment", element_t::comment, },
-
1361 { "dd", element_t::dd, },
-
1362 { "del", element_t::del, },
-
1363 { "dfn", element_t::dfn, },
-
1364 { "dir", element_t::dir, },
-
1365 { "div", element_t::div, },
-
1366 { "dl", element_t::dl, },
-
1367 { "dt", element_t::dt, },
-
1368 { "em", element_t::em, },
-
1369 { "embed", element_t::embed, },
-
1370 { "fieldset", element_t::fieldset, },
-
1371 { "font", element_t::font, },
-
1372 { "form", element_t::form, },
-
1373 { "frame", element_t::frame, },
-
1374 { "frameset", element_t::frameset, },
-
1375 { "h1", element_t::h1, },
-
1376 { "h2", element_t::h2, },
-
1377 { "h3", element_t::h3, },
-
1378 { "h4", element_t::h4, },
-
1379 { "h5", element_t::h5, },
-
1380 { "h6", element_t::h6, },
-
1381 { "head", element_t::head, },
-
1382 { "hr", element_t::hr, },
-
1383 { "html", element_t::html, },
-
1384 { "i", element_t::i, },
-
1385 { "iframe", element_t::iframe, },
-
1386 { "img", element_t::img, },
-
1387 { "input", element_t::input, },
-
1388 { "ins", element_t::ins, },
-
1389 { "isindex", element_t::isindex, },
-
1390 { "kbd", element_t::kbd, },
-
1391 { "label", element_t::label, },
-
1392 { "legend", element_t::legend, },
-
1393 { "li", element_t::li, },
-
1394 { "link", element_t::link, },
-
1395 { "listing", element_t::listing, },
-
1396 { "map", element_t::map, },
-
1397 { "marquee", element_t::marquee, },
-
1398 { "menu", element_t::menu, },
-
1399 { "meta", element_t::meta, },
-
1400 { "nextid", element_t::nextid, },
-
1401 { "nobr", element_t::nobr, },
-
1402 { "noembed", element_t::noembed, },
-
1403 { "noframes", element_t::noframes, },
-
1404 { "noscript", element_t::noscript, },
-
1405 { "object", element_t::object, },
-
1406 { "ol", element_t::ol, },
-
1407 { "optgroup", element_t::optgroup, },
-
1408 { "option", element_t::option, },
-
1409 { "p", element_t::p, },
-
1410 { "param", element_t::param, },
-
1411 { "plaintext", element_t::plaintext, },
-
1412 { "pre", element_t::pre, },
-
1413 { "q", element_t::q, },
-
1414 { "rt", element_t::rt, },
-
1415 { "ruby", element_t::ruby, },
-
1416 { "s", element_t::s, },
-
1417 { "samp", element_t::samp, },
-
1418 { "script", element_t::script, },
-
1419 { "select", element_t::select, },
-
1420 { "small", element_t::small, },
-
1421 { "span", element_t::span, },
-
1422 { "strike", element_t::strike, },
-
1423 { "strong", element_t::strong, },
-
1424 { "style", element_t::style, },
-
1425 { "sub", element_t::sub, },
-
1426 { "sup", element_t::sup, },
-
1427 { "table", element_t::table, },
-
1428 { "tbody", element_t::tbody, },
-
1429 { "td", element_t::td, },
-
1430 { "textarea", element_t::textarea, },
-
1431 { "tfoot", element_t::tfoot, },
-
1432 { "th", element_t::th, },
-
1433 { "thead", element_t::thead, },
-
1434 { "title", element_t::title, },
-
1435 { "tr", element_t::tr, },
-
1436 { "tt", element_t::tt, },
-
1437 { "u", element_t::u, },
-
1438 { "ul", element_t::ul, },
-
1439 { "var", element_t::var, },
-
1440 { "wbr", element_t::wbr, },
-
1441 { "xmp", element_t::xmp, },
-
1442 };
-
1443#ifndef NDEBUG
-
1444 // The mapping table MUST be sorted and all names in lowercase.
-
1445 for (size_t i = 1; i < _countof(mapping); i++)
-
1446 _Assume_(stdex::strcmp(mapping[i - 1].name, mapping[i].name) <= 0);
-
1447 for (size_t i = 0; i < _countof(mapping); i++) {
-
1448 for (size_t j = 0; mapping[i].name[j]; j++)
-
1449 _Assume_(stdex::islower(mapping[i].name[j]) | stdex::isdigit(mapping[i].name[j]));
-
1450 }
-
1451#endif
-
1452 for (size_t i = 0, j = _countof(mapping); i < j; ) {
-
1453 size_t m = (i + j) / 2;
-
1454 int r = 0;
-
1455 for (size_t i1 = 0, i2 = 0;;) {
-
1456 if (!mapping[m].name[i1]) {
-
1457 r = i2 >= num_chars || !name[i2] ? 0 : -1;
-
1458 break;
-
1459 }
-
1460 if (i2 >= num_chars || !name[i2]) {
-
1461 r = 1;
-
1462 break;
-
1463 }
-
1464
-
1465 auto chr = static_cast<char>(stdex::tolower(name[i2++]));
-
1466 if (mapping[m].name[i1] > chr) {
-
1467 r = 1;
-
1468 break;
-
1469 }
-
1470 if (mapping[m].name[i1] < chr) {
-
1471 r = -1;
-
1472 break;
-
1473 }
-
1474 i1++;
-
1475 }
-
1476
-
1477 if (r < 0)
-
1478 i = m + 1;
-
1479 else if (r > 0)
-
1480 j = m;
-
1481 else
-
1482 return mapping[m].code;
-
1483 }
-
1484 return element_t::unknown;
-
1485 }
-
1486
-
1487 public:
-
1488 element_t code;
- -
1490 std::vector<stdex::parser::html_attribute> attributes;
-
1491 };
-
-
1492
-
1493 class element_end;
-
1494
-
-
1498 class element_start : public element
-
1499 {
+
1328
+
+
1332 class element : public sequence
+
1333 {
+
1334 public:
+
1335 template <class T>
+
1336 element(_Inout_ stdex::parser::basic_html_tag<T>&& tag, _In_z_ const T* src, _In_opt_ sequence* parent = nullptr) :
+
1337 sequence(tag.type, tag.interval.start, tag.interval.end, parent),
+
1338 code(element_code(src + tag.name.start, tag.name.size())),
+
1339 name(std::move(tag.name)),
+
1340 attributes(std::move(tag.attributes))
+
1341 {}
+
1342
+
1343 template <class T>
+
1344 static element_t element_code(_In_reads_z_(num_chars) const T* name, size_t num_chars)
+
1345 {
+
1346 static const struct {
+
1347 const char* name;
+
1348 element_t code;
+
1349 } mapping[] = {
+
1350 { "a", element_t::a, },
+
1351 { "abbr", element_t::abbr, },
+
1352 { "acronym", element_t::acronym, },
+
1353 { "address", element_t::address, },
+
1354 { "applet", element_t::applet, },
+
1355 { "area", element_t::area, },
+
1356 { "b", element_t::b, },
+
1357 { "base", element_t::base, },
+
1358 { "basefont", element_t::basefont, },
+
1359 { "bdo", element_t::bdo, },
+
1360 { "bgsound", element_t::bgsound, },
+
1361 { "big", element_t::big, },
+
1362 { "blink", element_t::blink, },
+
1363 { "blockquote", element_t::blockquote, },
+
1364 { "body", element_t::body, },
+
1365 { "br", element_t::br, },
+
1366 { "button", element_t::button, },
+
1367 { "caption", element_t::caption, },
+
1368 { "center", element_t::center, },
+
1369 { "cite", element_t::cite, },
+
1370 { "code", element_t::code, },
+
1371 { "col", element_t::col, },
+
1372 { "colgroup", element_t::colgroup, },
+
1373 { "comment", element_t::comment, },
+
1374 { "dd", element_t::dd, },
+
1375 { "del", element_t::del, },
+
1376 { "dfn", element_t::dfn, },
+
1377 { "dir", element_t::dir, },
+
1378 { "div", element_t::div, },
+
1379 { "dl", element_t::dl, },
+
1380 { "dt", element_t::dt, },
+
1381 { "em", element_t::em, },
+
1382 { "embed", element_t::embed, },
+
1383 { "fieldset", element_t::fieldset, },
+
1384 { "font", element_t::font, },
+
1385 { "form", element_t::form, },
+
1386 { "frame", element_t::frame, },
+
1387 { "frameset", element_t::frameset, },
+
1388 { "h1", element_t::h1, },
+
1389 { "h2", element_t::h2, },
+
1390 { "h3", element_t::h3, },
+
1391 { "h4", element_t::h4, },
+
1392 { "h5", element_t::h5, },
+
1393 { "h6", element_t::h6, },
+
1394 { "head", element_t::head, },
+
1395 { "hr", element_t::hr, },
+
1396 { "html", element_t::html, },
+
1397 { "i", element_t::i, },
+
1398 { "iframe", element_t::iframe, },
+
1399 { "img", element_t::img, },
+
1400 { "input", element_t::input, },
+
1401 { "ins", element_t::ins, },
+
1402 { "isindex", element_t::isindex, },
+
1403 { "kbd", element_t::kbd, },
+
1404 { "label", element_t::label, },
+
1405 { "legend", element_t::legend, },
+
1406 { "li", element_t::li, },
+
1407 { "link", element_t::link, },
+
1408 { "listing", element_t::listing, },
+
1409 { "map", element_t::map, },
+
1410 { "marquee", element_t::marquee, },
+
1411 { "menu", element_t::menu, },
+
1412 { "meta", element_t::meta, },
+
1413 { "nextid", element_t::nextid, },
+
1414 { "nobr", element_t::nobr, },
+
1415 { "noembed", element_t::noembed, },
+
1416 { "noframes", element_t::noframes, },
+
1417 { "noscript", element_t::noscript, },
+
1418 { "object", element_t::object, },
+
1419 { "ol", element_t::ol, },
+
1420 { "optgroup", element_t::optgroup, },
+
1421 { "option", element_t::option, },
+
1422 { "p", element_t::p, },
+
1423 { "param", element_t::param, },
+
1424 { "plaintext", element_t::plaintext, },
+
1425 { "pre", element_t::pre, },
+
1426 { "q", element_t::q, },
+
1427 { "rt", element_t::rt, },
+
1428 { "ruby", element_t::ruby, },
+
1429 { "s", element_t::s, },
+
1430 { "samp", element_t::samp, },
+
1431 { "script", element_t::script, },
+
1432 { "select", element_t::select, },
+
1433 { "small", element_t::small, },
+
1434 { "span", element_t::span, },
+
1435 { "strike", element_t::strike, },
+
1436 { "strong", element_t::strong, },
+
1437 { "style", element_t::style, },
+
1438 { "sub", element_t::sub, },
+
1439 { "sup", element_t::sup, },
+
1440 { "table", element_t::table, },
+
1441 { "tbody", element_t::tbody, },
+
1442 { "td", element_t::td, },
+
1443 { "textarea", element_t::textarea, },
+
1444 { "tfoot", element_t::tfoot, },
+
1445 { "th", element_t::th, },
+
1446 { "thead", element_t::thead, },
+
1447 { "title", element_t::title, },
+
1448 { "tr", element_t::tr, },
+
1449 { "tt", element_t::tt, },
+
1450 { "u", element_t::u, },
+
1451 { "ul", element_t::ul, },
+
1452 { "var", element_t::var, },
+
1453 { "wbr", element_t::wbr, },
+
1454 { "xmp", element_t::xmp, },
+
1455 };
+
1456#ifndef NDEBUG
+
1457 // The mapping table MUST be sorted and all names in lowercase.
+
1458 for (size_t i = 1; i < _countof(mapping); i++)
+
1459 _Assume_(stdex::strcmp(mapping[i - 1].name, mapping[i].name) <= 0);
+
1460 for (size_t i = 0; i < _countof(mapping); i++) {
+
1461 for (size_t j = 0; mapping[i].name[j]; j++)
+
1462 _Assume_(stdex::islower(mapping[i].name[j]) | stdex::isdigit(mapping[i].name[j]));
+
1463 }
+
1464#endif
+
1465 for (size_t i = 0, j = _countof(mapping); i < j; ) {
+
1466 size_t m = (i + j) / 2;
+
1467 int r = 0;
+
1468 for (size_t i1 = 0, i2 = 0;;) {
+
1469 if (!mapping[m].name[i1]) {
+
1470 r = i2 >= num_chars || !name[i2] ? 0 : -1;
+
1471 break;
+
1472 }
+
1473 if (i2 >= num_chars || !name[i2]) {
+
1474 r = 1;
+
1475 break;
+
1476 }
+
1477
+
1478 auto chr = static_cast<char>(stdex::tolower(name[i2++]));
+
1479 if (mapping[m].name[i1] > chr) {
+
1480 r = 1;
+
1481 break;
+
1482 }
+
1483 if (mapping[m].name[i1] < chr) {
+
1484 r = -1;
+
1485 break;
+
1486 }
+
1487 i1++;
+
1488 }
+
1489
+
1490 if (r < 0)
+
1491 i = m + 1;
+
1492 else if (r > 0)
+
1493 j = m;
+
1494 else
+
1495 return mapping[m].code;
+
1496 }
+
1497 return element_t::unknown;
+
1498 }
+
1499
1500 public:
-
1501 template <class T>
-
1502 element_start(_Inout_ stdex::parser::basic_html_tag<T>&& tag, _In_z_ const T* src, _In_opt_ sequence* parent = nullptr, _In_opt_ sequence* _end = nullptr) :
-
1503 element(std::move(tag), src, parent),
-
1504 end(_end)
-
1505 {}
-
1506
-
1507 public:
- -
1509 };
+
1501 element_t code;
+ +
1503 std::vector<stdex::parser::html_attribute> attributes;
+
1504 };
-
1510
-
-
1514 class element_end : public sequence
-
1515 {
-
1516 public:
-
1517 template <class T>
-
1518 element_end(_Inout_ stdex::parser::basic_html_tag<T>&& tag, _In_z_ const T* src, _In_opt_ sequence* parent = nullptr, _In_opt_ element_start* _start = nullptr) :
-
1519 sequence(tag.type, tag.interval.start, tag.interval.end, parent),
-
1520 code(element::element_code(src + tag.name.start, tag.name.size())),
-
1521 name(std::move(tag.name)),
-
1522 start(_start)
-
1523 {}
-
1524
-
1525 public:
-
1526 element_t code;
- - -
1529 };
+
1505
+
1506 class element_end;
+
1507
+
+
1511 class element_start : public element
+
1512 {
+
1513 public:
+
1514 template <class T>
+
1515 element_start(_Inout_ stdex::parser::basic_html_tag<T>&& tag, _In_z_ const T* src, _In_opt_ sequence* parent = nullptr, _In_opt_ sequence* _end = nullptr) :
+
1516 element(std::move(tag), src, parent),
+
1517 end(_end)
+
1518 {}
+
1519
+
1520 public:
+ +
1522 };
+
+
1523
+
+
1527 class element_end : public sequence
+
1528 {
+
1529 public:
+
1530 template <class T>
+
1531 element_end(_Inout_ stdex::parser::basic_html_tag<T>&& tag, _In_z_ const T* src, _In_opt_ sequence* parent = nullptr, _In_opt_ element_start* _start = nullptr) :
+
1532 sequence(tag.type, tag.interval.start, tag.interval.end, parent),
+
1533 code(element::element_code(src + tag.name.start, tag.name.size())),
+
1534 name(std::move(tag.name)),
+
1535 start(_start)
+
1536 {}
+
1537
+
1538 public:
+
1539 element_t code;
+ + +
1542 };
-
1530
-
-
1534 class declaration : public sequence
-
1535 {
-
1536 public:
-
1537 template <class T>
-
1538 declaration(_Inout_ stdex::parser::basic_html_tag<T>&& tag, _In_opt_ sequence* parent = nullptr) :
-
1539 sequence(tag.type, tag.interval.start, tag.interval.end, parent),
-
1540 name(std::move(tag.name)),
-
1541 attributes(std::move(tag.attributes))
-
1542 {}
1543
-
1544 public:
- -
1546 std::vector<stdex::parser::html_attribute> attributes;
-
1547 };
+
+
1547 class declaration : public sequence
+
1548 {
+
1549 public:
+
1550 template <class T>
+
1551 declaration(_Inout_ stdex::parser::basic_html_tag<T>&& tag, _In_opt_ sequence* parent = nullptr) :
+
1552 sequence(tag.type, tag.interval.start, tag.interval.end, parent),
+
1553 name(std::move(tag.name)),
+
1554 attributes(std::move(tag.attributes))
+
1555 {}
+
1556
+
1557 public:
+ +
1559 std::vector<stdex::parser::html_attribute> attributes;
+
1560 };
-
1548
-
-
1552 class comment : public sequence
-
1553 {
-
1554 public:
-
1555 template <class T>
-
1556 comment(_Inout_ stdex::parser::basic_html_tag<T>&& tag, _In_opt_ sequence* parent = nullptr) :
-
1557 sequence(tag.type, tag.interval.start, tag.interval.end, parent),
-
1558 content(std::move(tag.name))
-
1559 {}
-
1560
-
1561 public:
- -
1563 };
+
1561
+
+
1565 class comment : public sequence
+
1566 {
+
1567 public:
+
1568 template <class T>
+
1569 comment(_Inout_ stdex::parser::basic_html_tag<T>&& tag, _In_opt_ sequence* parent = nullptr) :
+
1570 sequence(tag.type, tag.interval.start, tag.interval.end, parent),
+
1571 content(std::move(tag.name))
+
1572 {}
+
1573
+
1574 public:
+ +
1576 };
-
1564
-
-
1568 class instruction : public sequence
-
1569 {
-
1570 public:
-
1571 template <class T>
-
1572 instruction(_Inout_ stdex::parser::basic_html_tag<T>&& tag, _In_opt_ sequence* parent = nullptr) :
-
1573 sequence(tag.type, tag.interval.start, tag.interval.end, parent),
-
1574 content(std::move(tag.name))
-
1575 {}
-
1576
-
1577 public:
- -
1579 };
+
1577
+
+
1581 class instruction : public sequence
+
1582 {
+
1583 public:
+
1584 template <class T>
+
1585 instruction(_Inout_ stdex::parser::basic_html_tag<T>&& tag, _In_opt_ sequence* parent = nullptr) :
+
1586 sequence(tag.type, tag.interval.start, tag.interval.end, parent),
+
1587 content(std::move(tag.name))
+
1588 {}
+
1589
+
1590 public:
+ +
1592 };
-
1580
-
1584 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
-
1585 struct entity
-
1586 {
- -
1588 std::basic_string<T, TR, AX> value;
-
1589 };
+
1593
+
1597 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
+
1598 struct entity
+
1599 {
+ +
1601 std::basic_string<T, TR, AX> value;
+
1602 };
-
1590
-
1594 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
1595 class parser;
-
1596
-
1600 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
- -
1602 {
-
1603 public:
-
1604 document() :
-
1605 m_num_parsed(0),
-
1606 m_charset(stdex::charset_id::system),
-
1607
-
1608 // Declaration parsing data
- - -
1611 m_is_cdata(false),
-
1612 m_is_rcdata(false),
-
1613
-
1614 // Element parsing data
- -
1616 {}
-
1617
-
-
1621 void clear()
-
1622 {
-
1623 m_source.clear();
-
1624 m_num_parsed = 0;
-
1625 m_charset = stdex::charset_id::system;
+
1603
+
1607 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
1608 class parser;
+
1609
+
1613 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
+ +
1615 {
+
1616 public:
+
1617 document() :
+
1618 m_num_parsed(0),
+
1619 m_charset(stdex::charset_id::system),
+
1620
+
1621 // Declaration parsing data
+ + +
1624 m_is_cdata(false),
+
1625 m_is_rcdata(false),
1626
-
1627 // Declaration parsing data
- -
1629 m_is_cdata = m_is_rcdata = false;
-
1630 m_entities.clear();
-
1631
-
1632 // Element parsing data
-
1633 m_sequences.clear();
-
1634
-
1635 m_element_stack.clear();
-
1636 m_is_special_element = false;
-
1637 }
+
1627 // Element parsing data
+ +
1629 {}
+
1630
+
+
1634 void clear()
+
1635 {
+
1636 m_source.clear();
+
1637 m_num_parsed = 0;
+
1638 m_charset = stdex::charset_id::system;
+
1639
+
1640 // Declaration parsing data
+ +
1642 m_is_cdata = m_is_rcdata = false;
+
1643 m_entities.clear();
+
1644
+
1645 // Element parsing data
+
1646 m_sequences.clear();
+
1647
+
1648 m_element_stack.clear();
+
1649 m_is_special_element = false;
+
1650 }
-
1638
-
-
1642 void append(_In_reads_or_z_opt_(num_chars) const T* source, _In_ size_t num_chars)
-
1643 {
-
1644 _Assume_(source || !num_chars);
-
1645 m_source.append(source, stdex::strnlen(source, num_chars));
-
1646 source = m_source.data();
-
1647 num_chars = m_source.size();
-
1648
-
1649 for (size_t i = m_num_parsed; i < num_chars;) {
-
1650 if (m_is_cdata || m_is_rcdata) {
-
1651 if (m_condition_end.match(source, i, num_chars)) {
-
1652 m_sequences.push_back(std::move(std::unique_ptr<sequence>(new sequence(
-
1653 m_is_cdata ? stdex::parser::html_sequence_t::CDATA : stdex::parser::html_sequence_t::PCDATA,
-
1654 m_num_parsed, i,
-
1655 active_element()))));
-
1656 m_is_cdata = m_is_rcdata = false;
-
1657 i = m_num_parsed = m_condition_end.interval.end;
-
1658 continue;
-
1659 }
-
1660 goto next_char;
-
1661 }
-
1662
- +
1651
+
+
1655 void append(_In_reads_or_z_opt_(num_chars) const T* source, _In_ size_t num_chars)
+
1656 {
+
1657 _Assume_(source || !num_chars);
+
1658 m_source.append(source, stdex::strnlen(source, num_chars));
+
1659 source = m_source.data();
+
1660 num_chars = m_source.size();
+
1661
+
1662 for (size_t i = m_num_parsed; i < num_chars;) {
+
1663 if (m_is_cdata || m_is_rcdata) {
1664 if (m_condition_end.match(source, i, num_chars)) {
- -
1666 i = m_num_parsed = m_condition_end.interval.end;
-
1667 continue;
-
1668 }
-
1669 goto next_char;
-
1670 }
-
1671
-
1672 if (m_num_valid_conditions && m_condition_end.match(source, i, num_chars)) {
-
1673 if (m_num_parsed < i)
-
1674 m_sequences.push_back(std::move(std::unique_ptr<sequence>(new sequence(stdex::parser::html_sequence_t::text, m_num_parsed, i, active_element()))));
+
1665 m_sequences.push_back(std::move(std::unique_ptr<sequence>(new sequence(
+
1666 m_is_cdata ? stdex::parser::html_sequence_t::CDATA : stdex::parser::html_sequence_t::PCDATA,
+
1667 m_num_parsed, i,
+
1668 active_element()))));
+
1669 m_is_cdata = m_is_rcdata = false;
+
1670 i = m_num_parsed = m_condition_end.interval.end;
+
1671 continue;
+
1672 }
+
1673 goto next_char;
+
1674 }
1675
- -
1677 i = m_num_parsed = m_condition_end.interval.end;
-
1678 continue;
-
1679 }
-
1680
-
1681 if (m_condition_start.match(source, i, num_chars)) {
-
1682 auto condition_src(replace_entities(source + m_condition_start.condition.start, m_condition_start.condition.size()));
-
1683 if (stdex::strncmp(condition_src.data(), condition_src.size(), "CDATA", SIZE_MAX) == 0)
-
1684 m_is_cdata = true;
-
1685 else if (stdex::strncmp(condition_src.data(), condition_src.size(), "RCDATA", SIZE_MAX) == 0)
-
1686 m_is_rcdata = true;
- - -
1689 else if (stdex::strncmp(condition_src.data(), condition_src.size(), "IGNORE", SIZE_MAX) == 0)
- -
1691 else
- + +
1677 if (m_condition_end.match(source, i, num_chars)) {
+ +
1679 i = m_num_parsed = m_condition_end.interval.end;
+
1680 continue;
+
1681 }
+
1682 goto next_char;
+
1683 }
+
1684
+
1685 if (m_num_valid_conditions && m_condition_end.match(source, i, num_chars)) {
+
1686 if (m_num_parsed < i)
+
1687 m_sequences.push_back(std::move(std::unique_ptr<sequence>(new sequence(stdex::parser::html_sequence_t::text, m_num_parsed, i, active_element()))));
+
1688
+ +
1690 i = m_num_parsed = m_condition_end.interval.end;
+
1691 continue;
+
1692 }
1693
-
1694 i = m_num_parsed = m_condition_start.interval.end;
-
1695 continue;
-
1696 }
-
1697
- -
1699 auto parent = active_element();
-
1700 _Assume_(parent);
-
1701 if (m_tag.match(source, i, num_chars) &&
-
1702 m_tag.type == stdex::parser::html_sequence_t::element_end &&
-
1703 element::element_code(source + m_tag.name.start, m_tag.name.size()) == parent->code)
-
1704 {
-
1705 if (m_num_parsed < i)
-
1706 m_sequences.push_back(std::move(std::unique_ptr<sequence>(new sequence(stdex::parser::html_sequence_t::text, m_num_parsed, i, parent))));
-
1707 i = m_num_parsed = m_tag.interval.end;
-
1708 std::unique_ptr<element_end> e(new element_end(std::move(m_tag), source, parent->parent, parent));
-
1709 parent->end = e.get();
-
1710 m_sequences.push_back(std::move(e));
-
1711 m_element_stack.pop_back();
-
1712 m_is_special_element = false;
-
1713 continue;
-
1714 }
-
1715 goto next_char;
-
1716 }
-
1717
-
1718 if (m_tag.match(source, i, num_chars)) {
-
1719 if (m_num_parsed < i)
-
1720 m_sequences.push_back(std::move(std::unique_ptr<sequence>(new sequence(stdex::parser::html_sequence_t::text, m_num_parsed, i, active_element()))));
-
1721 i = m_num_parsed = m_tag.interval.end;
-
1722
-
1723 switch (m_tag.type) {
-
1724 case stdex::parser::html_sequence_t::element:
-
1725 case stdex::parser::html_sequence_t::element_start: {
-
1726 std::unique_ptr<element> e(
-
1727 m_tag.type == stdex::parser::html_sequence_t::element ? new element(std::move(m_tag), source) :
-
1728 m_tag.type == stdex::parser::html_sequence_t::element_start ? new element_start(std::move(m_tag), source) :
-
1729 nullptr);
+
1694 if (m_condition_start.match(source, i, num_chars)) {
+
1695 auto condition_src(replace_entities(source + m_condition_start.condition.start, m_condition_start.condition.size()));
+
1696 if (stdex::strncmp(condition_src.data(), condition_src.size(), "CDATA", SIZE_MAX) == 0)
+
1697 m_is_cdata = true;
+
1698 else if (stdex::strncmp(condition_src.data(), condition_src.size(), "RCDATA", SIZE_MAX) == 0)
+
1699 m_is_rcdata = true;
+ + +
1702 else if (stdex::strncmp(condition_src.data(), condition_src.size(), "IGNORE", SIZE_MAX) == 0)
+ +
1704 else
+ +
1706
+
1707 i = m_num_parsed = m_condition_start.interval.end;
+
1708 continue;
+
1709 }
+
1710
+ +
1712 auto parent = active_element();
+
1713 _Assume_(parent);
+
1714 if (m_tag.match(source, i, num_chars) &&
+
1715 m_tag.type == stdex::parser::html_sequence_t::element_end &&
+
1716 element::element_code(source + m_tag.name.start, m_tag.name.size()) == parent->code)
+
1717 {
+
1718 if (m_num_parsed < i)
+
1719 m_sequences.push_back(std::move(std::unique_ptr<sequence>(new sequence(stdex::parser::html_sequence_t::text, m_num_parsed, i, parent))));
+
1720 i = m_num_parsed = m_tag.interval.end;
+
1721 std::unique_ptr<element_end> e(new element_end(std::move(m_tag), source, parent->parent, parent));
+
1722 parent->end = e.get();
+
1723 m_sequences.push_back(std::move(e));
+
1724 m_element_stack.pop_back();
+
1725 m_is_special_element = false;
+
1726 continue;
+
1727 }
+
1728 goto next_char;
+
1729 }
1730
-
1731 // Does this tag end any of the started elements?
-
1732 for (size_t j = m_element_stack.size(); j--; ) {
-
1733 auto starting_tag = m_element_stack[j];
-
1734 _Assume_(starting_tag && starting_tag->type == stdex::parser::html_sequence_t::element_start);
-
1735 if (element_traits::may_contain(starting_tag->code, e->code)) {
-
1736 e->parent = starting_tag;
-
1737 break;
-
1738 }
-
1739 e->parent = starting_tag->parent;
-
1740 starting_tag->end = e.get();
-
1741 m_element_stack.resize(j);
-
1742 }
+
1731 if (m_tag.match(source, i, num_chars)) {
+
1732 if (m_num_parsed < i)
+
1733 m_sequences.push_back(std::move(std::unique_ptr<sequence>(new sequence(stdex::parser::html_sequence_t::text, m_num_parsed, i, active_element()))));
+
1734 i = m_num_parsed = m_tag.interval.end;
+
1735
+
1736 switch (m_tag.type) {
+
1737 case stdex::parser::html_sequence_t::element:
+
1738 case stdex::parser::html_sequence_t::element_start: {
+
1739 std::unique_ptr<element> e(
+
1740 m_tag.type == stdex::parser::html_sequence_t::element ? new element(std::move(m_tag), source) :
+
1741 m_tag.type == stdex::parser::html_sequence_t::element_start ? new element_start(std::move(m_tag), source) :
+
1742 nullptr);
1743
-
1744 if (e->type == stdex::parser::html_sequence_t::element_start) {
-
1745 auto e_start = static_cast<element_start*>(e.get());
-
1746 if (element_traits::span(e->code) == element_span_t::immediate)
-
1747 e_start->end = e.get();
-
1748 else {
-
1749 m_element_stack.push_back(e_start);
-
1750 switch (e->code) {
-
1751 case element_t::code:
-
1752 case element_t::comment:
-
1753 case element_t::script:
-
1754 case element_t::style:
-
1755 m_is_special_element = true;
-
1756 break;
-
1757 }
-
1758 }
-
1759 }
-
1760
-
1761 if (e->code == element_t::meta && m_charset == stdex::charset_id::system) {
-
1762 bool is_content_type = false;
-
1763 stdex::parser::html_attribute* content_attr = nullptr;
-
1764 for (auto& attr : e->attributes) {
-
1765 if (!stdex::strnicmp(source + attr.name.start, attr.name.size(), "http-equiv", SIZE_MAX) &&
-
1766 !stdex::strnicmp(source + attr.value.start, attr.value.size(), "content-type", SIZE_MAX))
-
1767 is_content_type = true;
-
1768 else if (!stdex::strnicmp(source + attr.name.start, attr.name.size(), "content", SIZE_MAX))
-
1769 content_attr = &attr;
-
1770 }
-
1771 if (is_content_type && content_attr) {
-
1772 // <meta http-equiv="Content-Type" content="..."> found.
- -
1774 if (content.match(source, content_attr->value.start, content_attr->value.end) &&
-
1775 content.charset)
-
1776 {
-
1777 std::string str;
-
1778 str.reserve(content.charset.size());
-
1779 for (size_t j = content.charset.start; j < content.charset.end; ++j)
-
1780 str.push_back(static_cast<char>(source[j]));
-
1781 m_charset = stdex::charset_from_name(str);
-
1782 }
-
1783 }
-
1784 }
-
1785
-
1786 m_sequences.push_back(std::move(e));
-
1787 break;
-
1788 }
-
1789 case stdex::parser::html_sequence_t::element_end: {
-
1790 std::unique_ptr<element_end> e(new element_end(std::move(m_tag), source, active_element()));
-
1791
-
1792 for (size_t j = m_element_stack.size(); j--; ) {
-
1793 auto starting_tag = m_element_stack[j];
-
1794 _Assume_(starting_tag && starting_tag->type == stdex::parser::html_sequence_t::element_start);
-
1795 if (starting_tag->code == e->code ||
-
1796 starting_tag->code == element_t::unknown && e->code == element_t::unknown && !stdex::strnicmp(source + starting_tag->name.start, starting_tag->name.size(), source + e->name.start, e->name.size()))
-
1797 {
-
1798 e->start = starting_tag;
-
1799 e->parent = starting_tag->parent;
-
1800 starting_tag->end = e.get();
-
1801 m_element_stack.resize(j);
-
1802 break;
-
1803 }
-
1804 }
+
1744 // Does this tag end any of the started elements?
+
1745 for (size_t j = m_element_stack.size(); j--; ) {
+
1746 auto starting_tag = m_element_stack[j];
+
1747 _Assume_(starting_tag && starting_tag->type == stdex::parser::html_sequence_t::element_start);
+
1748 if (element_traits::may_contain(starting_tag->code, e->code)) {
+
1749 e->parent = starting_tag;
+
1750 break;
+
1751 }
+
1752 e->parent = starting_tag->parent;
+
1753 starting_tag->end = e.get();
+
1754 m_element_stack.resize(j);
+
1755 }
+
1756
+
1757 if (e->type == stdex::parser::html_sequence_t::element_start) {
+
1758 auto e_start = static_cast<element_start*>(e.get());
+
1759 if (element_traits::span(e->code) == element_span_t::immediate)
+
1760 e_start->end = e.get();
+
1761 else {
+
1762 m_element_stack.push_back(e_start);
+
1763 switch (e->code) {
+
1764 case element_t::code:
+
1765 case element_t::comment:
+
1766 case element_t::script:
+
1767 case element_t::style:
+
1768 m_is_special_element = true;
+
1769 break;
+
1770 default:;
+
1771 }
+
1772 }
+
1773 }
+
1774
+
1775 if (e->code == element_t::meta && m_charset == stdex::charset_id::system) {
+
1776 bool is_content_type = false;
+
1777 stdex::parser::html_attribute* content_attr = nullptr;
+
1778 for (auto& attr : e->attributes) {
+
1779 if (!stdex::strnicmp(source + attr.name.start, attr.name.size(), "http-equiv", SIZE_MAX) &&
+
1780 !stdex::strnicmp(source + attr.value.start, attr.value.size(), "content-type", SIZE_MAX))
+
1781 is_content_type = true;
+
1782 else if (!stdex::strnicmp(source + attr.name.start, attr.name.size(), "content", SIZE_MAX))
+
1783 content_attr = &attr;
+
1784 }
+
1785 if (is_content_type && content_attr) {
+
1786 // <meta http-equiv="Content-Type" content="..."> found.
+ +
1788 if (content.match(source, content_attr->value.start, content_attr->value.end) &&
+
1789 content.charset)
+
1790 {
+
1791 std::string str;
+
1792 str.reserve(content.charset.size());
+
1793 for (size_t j = content.charset.start; j < content.charset.end; ++j)
+
1794 str.push_back(static_cast<char>(source[j]));
+
1795 m_charset = stdex::charset_from_name(str);
+
1796 }
+
1797 }
+
1798 }
+
1799
+
1800 m_sequences.push_back(std::move(e));
+
1801 break;
+
1802 }
+
1803 case stdex::parser::html_sequence_t::element_end: {
+
1804 std::unique_ptr<element_end> e(new element_end(std::move(m_tag), source, active_element()));
1805
-
1806 m_sequences.push_back(std::move(e));
-
1807 break;
-
1808 }
-
1809 case stdex::parser::html_sequence_t::declaration:
-
1810 if (m_tag.attributes.size() > 3 &&
-
1811 !stdex::strnicmp(source + m_tag.attributes[0].name.start, m_tag.attributes[0].name.size(), "entity", SIZE_MAX))
-
1812 {
-
1813 if (!stdex::strncmp(source + m_tag.attributes[1].name.start, m_tag.attributes[1].name.size(), "%", SIZE_MAX) &&
-
1814 stdex::strncmp(source + m_tag.attributes[3].name.start, m_tag.attributes[3].name.size(), "SYSTEM", SIZE_MAX) &&
-
1815 stdex::strncmp(source + m_tag.attributes[3].name.start, m_tag.attributes[3].name.size(), "PUBLIC", SIZE_MAX))
-
1816 {
-
1817 std::unique_ptr<entity<T, TR, AX>> e(new entity<T, TR, AX>());
-
1818 e->name = m_tag.attributes[2].name;
-
1819 e->value = std::move(replace_entities(source + m_tag.attributes[3].name.start, m_tag.attributes[3].name.size()));
-
1820 m_entities.push_back(std::move(e));
-
1821 }
-
1822
-
1823 // TODO: Parse & entities and entities in SYSTEM and PUBLIC external files.
-
1824 }
-
1825 m_sequences.push_back(std::move(std::unique_ptr<sequence>(new declaration(std::move(m_tag), active_element()))));
-
1826 break;
-
1827 case stdex::parser::html_sequence_t::comment:
-
1828 m_sequences.push_back(std::move(std::unique_ptr<sequence>(new comment(std::move(m_tag), active_element()))));
-
1829 break;
-
1830 case stdex::parser::html_sequence_t::instruction:
-
1831 m_sequences.push_back(std::move(std::unique_ptr<sequence>(new instruction(std::move(m_tag), active_element()))));
-
1832 break;
-
1833 default:
-
1834 throw std::invalid_argument("unknown tag type");
-
1835 }
+
1806 for (size_t j = m_element_stack.size(); j--; ) {
+
1807 auto starting_tag = m_element_stack[j];
+
1808 _Assume_(starting_tag && starting_tag->type == stdex::parser::html_sequence_t::element_start);
+
1809 if (starting_tag->code == e->code ||
+
1810 (starting_tag->code == element_t::unknown && e->code == element_t::unknown && !stdex::strnicmp(source + starting_tag->name.start, starting_tag->name.size(), source + e->name.start, e->name.size())))
+
1811 {
+
1812 e->start = starting_tag;
+
1813 e->parent = starting_tag->parent;
+
1814 starting_tag->end = e.get();
+
1815 m_element_stack.resize(j);
+
1816 break;
+
1817 }
+
1818 }
+
1819
+
1820 m_sequences.push_back(std::move(e));
+
1821 break;
+
1822 }
+
1823 case stdex::parser::html_sequence_t::declaration:
+
1824 if (m_tag.attributes.size() > 3 &&
+
1825 !stdex::strnicmp(source + m_tag.attributes[0].name.start, m_tag.attributes[0].name.size(), "entity", SIZE_MAX))
+
1826 {
+
1827 if (!stdex::strncmp(source + m_tag.attributes[1].name.start, m_tag.attributes[1].name.size(), "%", SIZE_MAX) &&
+
1828 stdex::strncmp(source + m_tag.attributes[3].name.start, m_tag.attributes[3].name.size(), "SYSTEM", SIZE_MAX) &&
+
1829 stdex::strncmp(source + m_tag.attributes[3].name.start, m_tag.attributes[3].name.size(), "PUBLIC", SIZE_MAX))
+
1830 {
+
1831 std::unique_ptr<entity<T, TR, AX>> e(new entity<T, TR, AX>());
+
1832 e->name = m_tag.attributes[2].name;
+
1833 e->value = std::move(replace_entities(source + m_tag.attributes[3].name.start, m_tag.attributes[3].name.size()));
+
1834 m_entities.push_back(std::move(e));
+
1835 }
1836
-
1837 continue;
-
1838 }
-
1839
-
1840 next_char:
-
1841 if (m_any_char.match(source, i, num_chars)) {
-
1842 // Skip any character, but don't declare it as parsed yet. It might be a part of unfinished tag.
-
1843 i = m_any_char.interval.end;
-
1844 }
-
1845 else
-
1846 break;
-
1847 }
-
1848 }
+
1837 // TODO: Parse & entities and entities in SYSTEM and PUBLIC external files.
+
1838 }
+
1839 m_sequences.push_back(std::move(std::unique_ptr<sequence>(new declaration(std::move(m_tag), active_element()))));
+
1840 break;
+
1841 case stdex::parser::html_sequence_t::comment:
+
1842 m_sequences.push_back(std::move(std::unique_ptr<sequence>(new comment(std::move(m_tag), active_element()))));
+
1843 break;
+
1844 case stdex::parser::html_sequence_t::instruction:
+
1845 m_sequences.push_back(std::move(std::unique_ptr<sequence>(new instruction(std::move(m_tag), active_element()))));
+
1846 break;
+
1847 default:
+
1848 throw std::invalid_argument("unknown tag type");
+
1849 }
+
1850
+
1851 continue;
+
1852 }
+
1853
+
1854 next_char:
+
1855 if (m_any_char.match(source, i, num_chars)) {
+
1856 // Skip any character, but don't declare it as parsed yet. It might be a part of unfinished tag.
+
1857 i = m_any_char.interval.end;
+
1858 }
+
1859 else
+
1860 break;
+
1861 }
+
1862 }
-
1849
-
- -
1854 {
-
1855 size_t i = m_source.size();
-
1856 if (m_num_parsed < i)
-
1857 m_sequences.push_back(std::move(std::unique_ptr<sequence>(new sequence(stdex::parser::html_sequence_t::text, m_num_parsed, i, active_element()))));
-
1858 m_num_parsed = i;
-
1859 m_element_stack.clear();
-
1860 }
+
1863
+
+ +
1868 {
+
1869 size_t i = m_source.size();
+
1870 if (m_num_parsed < i)
+
1871 m_sequences.push_back(std::move(std::unique_ptr<sequence>(new sequence(stdex::parser::html_sequence_t::text, m_num_parsed, i, active_element()))));
+
1872 m_num_parsed = i;
+
1873 m_element_stack.clear();
+
1874 }
-
1861
-
-
1865 void assign(_In_reads_or_z_opt_(num_chars) const T* source, _In_ size_t num_chars)
-
1866 {
-
1867 clear();
-
1868 append(source, num_chars);
-
1869 finalize();
-
1870 }
+
1875
+
+
1879 void assign(_In_reads_or_z_opt_(num_chars) const T* source, _In_ size_t num_chars)
+
1880 {
+
1881 clear();
+
1882 append(source, num_chars);
+
1883 finalize();
+
1884 }
-
1871
-
1875 const std::basic_string<T, TR, AX>& source() const { return m_source; }
-
1876
-
1877 friend class parser<T, TR, AX>;
-
1878
-
1879 protected:
-
- -
1884 {
-
1885 return m_element_stack.empty() ? nullptr : m_element_stack.back();
-
1886 }
+
1885
+
1889 const std::basic_string<T, TR, AX>& source() const { return m_source; }
+
1890
+
1891 friend class parser<T, TR, AX>;
+
1892
+
1893 protected:
+
+ +
1898 {
+
1899 return m_element_stack.empty() ? nullptr : m_element_stack.back();
+
1900 }
-
1887
-
-
1891 std::basic_string<T, TR, AX> replace_entities(_In_reads_or_z_opt_(num_chars) const T* input, _In_ size_t num_chars) const
-
1892 {
-
1893 _Assume_(input || !num_chars);
-
1894 const size_t num_entities = m_entities.size();
-
1895 const T* source = m_source.data();
-
1896 std::basic_string<T, TR, AX> output;
-
1897 for (size_t i = 0; i < num_chars && input[i];) {
-
1898 if (input[i] == '%') {
-
1899 for (size_t j = 0; j < num_entities; j++) {
-
1900 auto& e = m_entities[j];
-
1901 size_t entity_size = e->name.size();
-
1902 if (i + entity_size + 1 < num_chars &&
-
1903 !stdex::strncmp(input + i + 1, source + e->name.start, entity_size) &&
-
1904 input[i + entity_size + 1] == ';')
-
1905 {
-
1906 output += e->value;
-
1907 i += entity_size + 2;
-
1908 goto next_char;
-
1909 }
-
1910 }
-
1911 throw std::runtime_error("undefined entity");
-
1912 }
-
1913 output += input[i++];
-
1914 next_char:;
-
1915 }
-
1916 return output;
-
1917 }
+
1901
+
+
1905 std::basic_string<T, TR, AX> replace_entities(_In_reads_or_z_opt_(num_chars) const T* input, _In_ size_t num_chars) const
+
1906 {
+
1907 _Assume_(input || !num_chars);
+
1908 const size_t num_entities = m_entities.size();
+
1909 const T* source = m_source.data();
+
1910 std::basic_string<T, TR, AX> output;
+
1911 for (size_t i = 0; i < num_chars && input[i];) {
+
1912 if (input[i] == '%') {
+
1913 for (size_t j = 0; j < num_entities; j++) {
+
1914 auto& e = m_entities[j];
+
1915 size_t entity_size = e->name.size();
+
1916 if (i + entity_size + 1 < num_chars &&
+
1917 !stdex::strncmp(input + i + 1, source + e->name.start, entity_size) &&
+
1918 input[i + entity_size + 1] == ';')
+
1919 {
+
1920 output += e->value;
+
1921 i += entity_size + 2;
+
1922 goto next_char;
+
1923 }
+
1924 }
+
1925 throw std::runtime_error("undefined entity");
+
1926 }
+
1927 output += input[i++];
+
1928 next_char:;
+
1929 }
+
1930 return output;
+
1931 }
-
1918
-
1919 protected:
-
1920 std::basic_string<T, TR, AX> m_source;
- -
1922 stdex::charset_id m_charset;
-
1923
-
1924 // Declaration parsing data
- - - - - - - -
1932 std::vector<std::unique_ptr<entity<T, TR, AX>>> m_entities;
-
1933
-
1934 // Element parsing data
- -
1936 sequence_store m_sequences;
-
1937 std::vector<element_start*> m_element_stack;
- -
1939 };
+
1932
+
1933 protected:
+
1934 std::basic_string<T, TR, AX> m_source;
+ +
1936 stdex::charset_id m_charset;
+
1937
+
1938 // Declaration parsing data
+ + + + + + + +
1946 std::vector<std::unique_ptr<entity<T, TR, AX>>> m_entities;
+
1947
+
1948 // Element parsing data
+ +
1950 sequence_store m_sequences;
+
1951 std::vector<element_start*> m_element_stack;
+ +
1953 };
-
1940
-
1944 enum class token_t {
-
1945 root = 0,
-
1946 complete,
-
1947 starting,
-
1948 ending,
-
1949 url,
-
1950 };
-
1951
-
1955 constexpr size_t token_tag_max =
-
1956 sizeof(void*) * 2 // Memory address in hexadecimal
-
1957 + 2 // Leading and trailing parenthesis
-
1958 + 1; // Zero terminator
-
1959
-
1964 constexpr char token_tag_start = '\x12';
+
1954
+
1958 enum class token_t {
+
1959 root = 0,
+
1960 complete,
+
1961 starting,
+
1962 ending,
+
1963 url,
+
1964 };
1965
-
1970 constexpr char token_tag_end = '\x13';
-
1971
-
-
1975 class token
-
1976 {
-
1977 protected:
-
1978 token(_In_ token_t _type = token_t::root, _In_opt_ sequence* _sequence = nullptr, _In_ uintptr_t _data = 0) :
-
1979 type(_type),
-
1980 sequence(_sequence),
-
1981 data(_data)
-
1982 {}
-
1983
-
1984 template<class T, class TR, class AX>
-
1985 friend class parser;
-
1986
-
1987 public:
-
1988 virtual ~token() {} // make polymorphic
-
1989
-
1997 template<class TR = std::char_traits<char>, class AX = std::allocator<char>>
-
-
1998 size_t append_tag(_Inout_ std::basic_string<char, TR, AX>& str) const
-
1999 {
-
2000 size_t n = str.size();
-
2001 // Use %X instead of %p to omit leading zeros and save space.
-
2002 stdex::appendf(str, "%c%zX%c", stdex::locale_C, token_tag_start, reinterpret_cast<uintptr_t>(this), token_tag_end);
-
2003 return str.size() - n;
-
2004 }
-
-
2005
-
2013 template<class TR = std::char_traits<wchar_t>, class AX = std::allocator<wchar_t>>
-
-
2014 size_t append_tag(_Inout_ std::basic_string<wchar_t, TR, AX>& str) const
-
2015 {
-
2016 // Use %X instead of %p to omit leading zeros and save space.
-
2017 return stdex::appendf(str, L"%c%zX%c", stdex::locale_C, static_cast<wchar_t>(token_tag_start), reinterpret_cast<uintptr_t>(this), static_cast<wchar_t>(token_tag_end));
+
1969 constexpr size_t token_tag_max =
+
1970 sizeof(void*) * 2 // Memory address in hexadecimal
+
1971 + 2 // Leading and trailing parenthesis
+
1972 + 1; // Zero terminator
+
1973
+
1978 constexpr char token_tag_start = '\x12';
+
1979
+
1984 constexpr char token_tag_end = '\x13';
+
1985
+
+
1989 class token
+
1990 {
+
1991 protected:
+
1992 token(_In_ token_t _type = token_t::root, _In_opt_ sequence* _sequence = nullptr, _In_ uintptr_t _data = 0) :
+
1993 type(_type),
+
1994 sequence(_sequence),
+
1995 data(_data)
+
1996 {}
+
1997
+
1998 template<class T, class TR, class AX>
+
1999 friend class parser;
+
2000
+
2001 public:
+
2002 virtual ~token() {} // make polymorphic
+
2003
+
2011 template<class TR = std::char_traits<char>, class AX = std::allocator<char>>
+
+
2012 size_t append_tag(_Inout_ std::basic_string<char, TR, AX>& str) const
+
2013 {
+
2014 size_t n = str.size();
+
2015 // Use %X instead of %p to omit leading zeros and save space.
+
2016 stdex::appendf(str, "%c%zX%c", stdex::locale_C, token_tag_start, reinterpret_cast<uintptr_t>(this), token_tag_end);
+
2017 return str.size() - n;
2018 }
2019
-
2020 template<class T>
-
2021 static token* parse_tag(const T* str, size_t& offset)
-
2022 {
-
2023 if (str[offset] != static_cast<T>(token_tag_start))
-
2024 return nullptr;
-
2025
-
2026 // Locate tag end.
-
2027 size_t end;
-
2028 for (end = offset + 1; ; end++) {
-
2029 if (!str[end])
-
2030 return nullptr;
-
2031 if (str[end] == token_tag_end)
-
2032 break;
-
2033 }
-
2034
-
2035 // Parse hexadecimal token memory address.
-
2036 token* t = reinterpret_cast<token*>(stdex::strtouint<T, uintptr_t>(str + offset + 1, end - offset - 1, nullptr, 16));
-
2037 if (!t)
-
2038 throw std::invalid_argument("null token");
-
2039 offset = end + 1;
-
2040 return t;
-
2041 }
-
2042
-
2043 public:
-
2044 token_t type;
- -
2046 uintptr_t data;
-
2047 };
+
2027 template<class TR = std::char_traits<wchar_t>, class AX = std::allocator<wchar_t>>
+
+
2028 size_t append_tag(_Inout_ std::basic_string<wchar_t, TR, AX>& str) const
+
2029 {
+
2030 // Use %X instead of %p to omit leading zeros and save space.
+
2031 return stdex::appendf(str, L"%c%zX%c", stdex::locale_C, static_cast<wchar_t>(token_tag_start), reinterpret_cast<uintptr_t>(this), static_cast<wchar_t>(token_tag_end));
+
2032 }
+
2033
+
2034 template<class T>
+
2035 static token* parse_tag(const T* str, size_t& offset)
+
2036 {
+
2037 if (str[offset] != static_cast<T>(token_tag_start))
+
2038 return nullptr;
+
2039
+
2040 // Locate tag end.
+
2041 size_t end;
+
2042 for (end = offset + 1; ; end++) {
+
2043 if (!str[end])
+
2044 return nullptr;
+
2045 if (str[end] == token_tag_end)
+
2046 break;
+
2047 }
2048
-
2049 using token_vector = std::vector<std::unique_ptr<token>>;
-
2050 using token_list = std::list<token*>;
-
2051
-
2055 enum text_type_flag_t : uint32_t {
-
2056 has_tokens = 1 << 0,
-
2057 has_text = 1 << 1,
-
2058 is_title = 1 << 2,
-
2059 is_bullet = 1 << 3,
-
2060 };
-
2061
-
2065 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
-
2066 class text_token : public token
-
2067 {
-
2068 protected:
-
2069 text_token(
-
2070 _In_ token_t type = token_t::complete,
-
2071 _In_reads_or_z_opt_(num_chars) const T* _text = nullptr, _In_ size_t num_chars = 0,
-
2072 _In_ uint32_t _text_type = 0,
-
2073 _In_opt_ stdex::html::sequence* sequence = nullptr, _In_ uintptr_t data = 0) :
- -
2075 text(_text, num_chars),
-
2076 text_type(_text_type)
-
2077 {}
-
2078
-
2079 friend class parser<T, TR, AX>;
-
2080
-
2081 public:
-
2082 std::basic_string<T, TR, AX> text;
-
2083 uint32_t text_type;
-
2084 stdex::mapping_vector<size_t> mapping;
-
2085 };
+
2049 // Parse hexadecimal token memory address.
+
2050 token* t = reinterpret_cast<token*>(stdex::strtouint<T, uintptr_t>(str + offset + 1, end - offset - 1, nullptr, 16));
+
2051 if (!t)
+
2052 throw std::invalid_argument("null token");
+
2053 offset = end + 1;
+
2054 return t;
+
2055 }
+
2056
+
2057 public:
+
2058 token_t type;
+ +
2060 uintptr_t data;
+
2061 };
-
2086
-
2090 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
-
2091 class starting_token : public text_token<T, TR, AX>
-
2092 {
-
2093 protected:
- -
2095 _In_reads_or_z_opt_(num_chars_text) const T* _text = nullptr, _In_ size_t num_chars_text = 0,
-
2096 _In_reads_or_z_opt_(num_chars_name) const T* _name = nullptr, _In_ size_t num_chars_name = 0,
-
2097 _In_ uint32_t text_type = 0,
-
2098 _In_opt_ stdex::html::sequence* sequence = nullptr,
-
2099 _In_opt_ stdex::html::sequence* _end_sequence = nullptr,
-
2100 _In_ uintptr_t data = 0) :
-
2101 text_token(token_t::starting, _text, num_chars_text, text_type, sequence, data),
-
2102 name(_name, num_chars_name),
-
2103 end_sequence(_end_sequence)
-
2104 {}
-
2105
-
2106 friend class parser<T, TR, AX>;
-
2107
-
2108 public:
-
2109 std::basic_string<T, TR, AX> name;
- -
2111 };
+
2062
+
2063 using token_vector = std::vector<std::unique_ptr<token>>;
+
2064 using token_list = std::list<token*>;
+
2065
+
2069 enum text_type_flag_t : uint32_t {
+
2070 has_tokens = 1 << 0,
+
2071 has_text = 1 << 1,
+
2072 is_title = 1 << 2,
+
2073 is_bullet = 1 << 3,
+
2074 };
+
2075
+
2079 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
+
2080 class text_token : public token
+
2081 {
+
2082 protected:
+
2083 text_token(
+
2084 _In_ token_t type = token_t::complete,
+
2085 _In_reads_or_z_opt_(num_chars) const T* _text = nullptr, _In_ size_t num_chars = 0,
+
2086 _In_ uint32_t _text_type = 0,
+
2087 _In_opt_ stdex::html::sequence* sequence = nullptr, _In_ uintptr_t data = 0) :
+ +
2089 text(_text, num_chars),
+
2090 text_type(_text_type)
+
2091 {}
+
2092
+
2093 friend class parser<T, TR, AX>;
+
2094
+
2095 public:
+
2096 std::basic_string<T, TR, AX> text;
+
2097 uint32_t text_type;
+
2098 stdex::mapping_vector<size_t> mapping;
+
2099 };
-
2112
-
2116 enum class token_url_t {
-
2117 plain = 0, // URL is not using any particular encoding scheme (as-is)
-
2118 sgml, // URL is encoded using SGML entities
-
2119 css, // URL is encoded using CSS escaping scheme
-
2120 };
+
2100
+
2104 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
+
2105 class starting_token : public text_token<T, TR, AX>
+
2106 {
+
2107 protected:
+ +
2109 _In_reads_or_z_opt_(num_chars_text) const T* _text = nullptr, _In_ size_t num_chars_text = 0,
+
2110 _In_reads_or_z_opt_(num_chars_name) const T* _name = nullptr, _In_ size_t num_chars_name = 0,
+
2111 _In_ uint32_t text_type = 0,
+
2112 _In_opt_ stdex::html::sequence* sequence = nullptr,
+
2113 _In_opt_ stdex::html::sequence* _end_sequence = nullptr,
+
2114 _In_ uintptr_t data = 0) :
+
2115 text_token<T, TR, AX>(token_t::starting, _text, num_chars_text, text_type, sequence, data),
+
2116 name(_name, num_chars_name),
+
2117 end_sequence(_end_sequence)
+
2118 {}
+
2119
+
2120 friend class parser<T, TR, AX>;
2121
-
2125 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
-
2126 class url_token : public token
-
2127 {
-
2128 protected:
-
2129 url_token(
-
2130 _In_reads_or_z_opt_(num_chars) const T* _url = nullptr, _In_ size_t num_chars = 0,
-
2131 token_url_t _encoding = token_url_t::plain,
-
2132 _In_opt_ stdex::html::sequence* sequence = nullptr, _In_ uintptr_t data = 0) :
-
2133 token(token_t::url, sequence, data),
-
2134 url(_url, num_chars),
-
2135 encoding(_encoding)
-
2136 {}
-
2137
-
2138 friend class parser<T, TR, AX>;
-
2139
-
2140 public:
-
2141 std::basic_string<T, TR, AX> url;
-
2142 token_url_t encoding;
-
2143 };
+
2122 public:
+
2123 std::basic_string<T, TR, AX> name;
+ +
2125 };
-
2144
-
- - -
2150 std::list<stdex::html::token*> active_tokens;
-
2151 size_t word_index;
- -
2153 };
+
2126
+
2130 enum class token_url_t {
+
2131 plain = 0, // URL is not using any particular encoding scheme (as-is)
+
2132 sgml, // URL is encoded using SGML entities
+
2133 css, // URL is encoded using CSS escaping scheme
+
2134 };
+
2135
+
2139 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
+
2140 class url_token : public token
+
2141 {
+
2142 protected:
+
2143 url_token(
+
2144 _In_reads_or_z_opt_(num_chars) const T* _url = nullptr, _In_ size_t num_chars = 0,
+
2145 token_url_t _encoding = token_url_t::plain,
+
2146 _In_opt_ stdex::html::sequence* sequence = nullptr, _In_ uintptr_t data = 0) :
+
2147 token(token_t::url, sequence, data),
+
2148 url(_url, num_chars),
+
2149 encoding(_encoding)
+
2150 {}
+
2151
+
2152 friend class parser<T, TR, AX>;
+
2153
+
2154 public:
+
2155 std::basic_string<T, TR, AX> url;
+
2156 token_url_t encoding;
+
2157 };
-
2154
-
2155 using inserted_token_list = std::list<inserted_token>;
-
2156
-
2157 template<class T, class TR, class AX>
-
- -
2159 {
-
2160 public:
-
2161 parser(
-
2162 _In_ const document<T, TR, AX>& document,
-
2163 _In_reads_or_z_opt_(num_chars) const stdex::schar_t* url = nullptr, _In_ size_t num_chars = 0,
-
2164 _In_ bool parse_frames = false, _In_ stdex::progress<size_t>* progress = nullptr) :
- -
2166 m_url(url, stdex::strnlen(url, num_chars)),
-
2167 m_parse_frames(parse_frames),
- -
2169 m_source(nullptr)
-
2170 {}
-
2171
-
- -
2176 {
-
2177 _Assume_(m_tokens.empty());
-
2178
-
2179 if (m_progress) {
-
2180 m_progress->set_range(0, m_document.source().size());
-
2181 m_progress->set(0);
-
2182 }
-
2183
-
2184 m_source = m_document.source().data();
- -
2186 return parse(m_document.m_sequences.end());
-
2187 }
+
2158
+
+ + +
2164 std::list<stdex::html::token*> active_tokens;
+
2165 size_t word_index;
+ +
2167 };
-
2188
-
-
2195 static void link(_Inout_ std::basic_string<T, TR, AX>& source, _In_ const text_token<T, TR, AX>* t)
-
2196 {
-
2197 _Assume_(t);
-
2198 _Assume_(
-
2199 t->type == token_t::complete ||
-
2200 t->type == token_t::starting ||
-
2201 t->type == token_t::ending ||
-
2202 t->type == token_t::root);
-
2203
-
2204 if (t->text_type & has_tokens) {
-
2205 const T* root = t->text.data();
-
2206 for (size_t i = 0, num_chars = t->text.size(); i < num_chars && root[i];) {
-
2207 _Assume_(root[i] != token_tag_end);
-
2208 const token* t2 = token::parse_tag(root, i);
-
2209 if (t2) {
-
2210 switch (t2->type) {
-
2211 case token_t::complete:
-
2212 case token_t::starting:
-
2213 case token_t::ending:
-
2214 case token_t::root:
-
2215 link(source, dynamic_cast<const text_token<T, TR, AX>*>(t2));
-
2216 break;
-
2217 case token_t::url: {
-
2218 auto t2_url = dynamic_cast<const url_token<T, TR, AX>*>(t2);
-
2219 switch (t2_url->encoding) {
-
2220 case token_url_t::plain:
-
2221 source += t2_url->url;
-
2222 break;
-
2223 case token_url_t::sgml:
-
2224 escape(source, t2_url->url.data(), t2_url->url.size());
-
2225 break;
-
2226 case token_url_t::css:
-
2227 css_escape(source, t2_url->url.data(), t2_url->url.size());
-
2228 break;
-
2229 default:
-
2230 throw std::invalid_argument("unsupported URL encoding");
-
2231 }
-
2232 break;
-
2233 }
-
2234 default:
-
2235 throw std::invalid_argument("unsupported token type");
-
2236 }
-
2237 }
-
2238 else if (t->text_type & has_text) {
-
2239 escape_min(source, root[i]);
-
2240 i++;
-
2241 }
-
2242 else
-
2243 source += root[i++];
-
2244 }
-
2245 }
-
2246 else if (t->text_type & has_text) {
-
2247 // Token contains no references to other tokens. But, it does contain text that requires escaping.
-
2248 escape_min(source, t->text.data(), t->text.size());
-
2249 }
-
2250 else
-
2251 source += t->text;
-
2252 }
+
2168
+
2169 using inserted_token_list = std::list<inserted_token>;
+
2170
+
2171 template<class T, class TR, class AX>
+
+ +
2173 {
+
2174 public:
+
2175 parser(
+
2176 _In_ const document<T, TR, AX>& document,
+
2177 _In_reads_or_z_opt_(num_chars) const stdex::schar_t* url = nullptr, _In_ size_t num_chars = 0,
+
2178 _In_ bool parse_frames = false, _In_ stdex::progress<size_t>* progress = nullptr) :
+ +
2180 m_url(url, stdex::strnlen(url, num_chars)),
+
2181 m_parse_frames(parse_frames),
+ +
2183 m_source(nullptr)
+
2184 {}
+
2185
+
+ +
2190 {
+
2191 _Assume_(m_tokens.empty());
+
2192
+
2193 if (m_progress) {
+
2194 m_progress->set_range(0, m_document.source().size());
+
2195 m_progress->set(0);
+
2196 }
+
2197
+
2198 m_source = m_document.source().data();
+ +
2200 return parse(m_document.m_sequences.end());
+
2201 }
-
2253
-
-
2262 static void start_tokens(_Inout_ std::basic_string<T, TR, AX>& source, _Inout_ token_list& active_tokens, _In_ const token_list& new_tokens, _In_ token_list::const_iterator from)
-
2263 {
-
2264 for (; from != new_tokens.cend(); ++from) {
-
2265 auto t = *from;
-
2266 t->append_tag(source);
-
2267 active_tokens.push_back(t);
-
2268 }
-
2269 }
+
2202
+
+
2209 static void link(_Inout_ std::basic_string<T, TR, AX>& source, _In_ const text_token<T, TR, AX>* t)
+
2210 {
+
2211 _Assume_(t);
+
2212 _Assume_(
+
2213 t->type == token_t::complete ||
+
2214 t->type == token_t::starting ||
+
2215 t->type == token_t::ending ||
+
2216 t->type == token_t::root);
+
2217
+
2218 if (t->text_type & has_tokens) {
+
2219 const T* root = t->text.data();
+
2220 for (size_t i = 0, num_chars = t->text.size(); i < num_chars && root[i];) {
+
2221 _Assume_(root[i] != token_tag_end);
+
2222 const token* t2 = token::parse_tag(root, i);
+
2223 if (t2) {
+
2224 switch (t2->type) {
+
2225 case token_t::complete:
+
2226 case token_t::starting:
+
2227 case token_t::ending:
+
2228 case token_t::root:
+
2229 link(source, dynamic_cast<const text_token<T, TR, AX>*>(t2));
+
2230 break;
+
2231 case token_t::url: {
+
2232 auto t2_url = dynamic_cast<const url_token<T, TR, AX>*>(t2);
+
2233 switch (t2_url->encoding) {
+
2234 case token_url_t::plain:
+
2235 source += t2_url->url;
+
2236 break;
+
2237 case token_url_t::sgml:
+
2238 escape(source, t2_url->url.data(), t2_url->url.size());
+
2239 break;
+
2240 case token_url_t::css:
+
2241 css_escape(source, t2_url->url.data(), t2_url->url.size());
+
2242 break;
+
2243 default:
+
2244 throw std::invalid_argument("unsupported URL encoding");
+
2245 }
+
2246 break;
+
2247 }
+
2248 default:
+
2249 throw std::invalid_argument("unsupported token type");
+
2250 }
+
2251 }
+
2252 else if (t->text_type & has_text) {
+
2253 escape_min(source, root[i]);
+
2254 i++;
+
2255 }
+
2256 else
+
2257 source += root[i++];
+
2258 }
+
2259 }
+
2260 else if (t->text_type & has_text) {
+
2261 // Token contains no references to other tokens. But, it does contain text that requires escaping.
+
2262 escape_min(source, t->text.data(), t->text.size());
+
2263 }
+
2264 else
+
2265 source += t->text;
+
2266 }
-
2270
-
-
2280 token_list::const_iterator end_tokens(_Inout_ std::basic_string<T, TR, AX>& source, _Inout_ token_list& active_tokens, _In_ const token_list& new_tokens)
-
2281 {
-
2282 // Skip matching tokens in active_tokens and new_tokens.
-
2283 token_list::const_iterator i1, i2;
-
2284 for (i1 = active_tokens.cbegin(), i2 = new_tokens.cbegin(); i1 != active_tokens.cend(); ++i1, ++i2) {
-
2285 if (i2 == new_tokens.cend() || *i1 != *i2) {
-
2286 // Got two tokens, where lists don't match anymore, or new_tokens list is out.
-
2287 // End tokens not relevant anymore in reverse order of starting.
-
2288 for (auto i = active_tokens.cend(); i != active_tokens.cbegin(); ) {
-
2289 auto t1 = dynamic_cast<starting_token<T, TR, AX>*>(*(--i));
-
2290 _Assume_(t1 && t1->type == token_t::starting);
-
2291
-
2292 std::unique_ptr<text_token<T, TR, AX>> t2(new text_token<T, TR, AX>(token_t::ending));
-
2293 t2->text.reserve(t1->name.size() + 3);
-
2294 t2->text += '<';
-
2295 t2->text += '/';
-
2296 t2->text += t1->name;
-
2297 t2->text += '>';
-
2298 append_token(std::move(t2), source);
-
2299
-
2300 // Pop the active token.
-
2301 if (i1 == i) {
-
2302 active_tokens.erase(i);
-
2303 break;
-
2304 }
-
2305 active_tokens.erase(i);
-
2306 i = active_tokens.cend();
-
2307 }
-
2308 break;
-
2309 }
-
2310 }
-
2311 return i2;
-
2312 }
+
2267
+
+
2276 static void start_tokens(_Inout_ std::basic_string<T, TR, AX>& source, _Inout_ token_list& active_tokens, _In_ const token_list& new_tokens, _In_ token_list::const_iterator from)
+
2277 {
+
2278 for (; from != new_tokens.cend(); ++from) {
+
2279 auto t = *from;
+
2280 t->append_tag(source);
+
2281 active_tokens.push_back(t);
+
2282 }
+
2283 }
+
2284
+
+
2294 token_list::const_iterator end_tokens(_Inout_ std::basic_string<T, TR, AX>& source, _Inout_ token_list& active_tokens, _In_ const token_list& new_tokens)
+
2295 {
+
2296 // Skip matching tokens in active_tokens and new_tokens.
+
2297 token_list::const_iterator i1, i2;
+
2298 for (i1 = active_tokens.cbegin(), i2 = new_tokens.cbegin(); i1 != active_tokens.cend(); ++i1, ++i2) {
+
2299 if (i2 == new_tokens.cend() || *i1 != *i2) {
+
2300 // Got two tokens, where lists don't match anymore, or new_tokens list is out.
+
2301 // End tokens not relevant anymore in reverse order of starting.
+
2302 for (auto i = active_tokens.cend(); i != active_tokens.cbegin(); ) {
+
2303 auto t1 = dynamic_cast<starting_token<T, TR, AX>*>(*(--i));
+
2304 _Assume_(t1 && t1->type == token_t::starting);
+
2305
+
2306 std::unique_ptr<text_token<T, TR, AX>> t2(new text_token<T, TR, AX>(token_t::ending));
+
2307 t2->text.reserve(t1->name.size() + 3);
+
2308 t2->text += '<';
+
2309 t2->text += '/';
+
2310 t2->text += t1->name;
+
2311 t2->text += '>';
+
2312 append_token(std::move(t2), source);
2313
-
-
2323 void append_inserted_tokens(_Inout_ std::basic_string<T, TR, AX>& source, _Inout_ inserted_token_list& inserted_tokens,
-
2324 _In_ size_t word_index, _In_ bool after_word,
-
2325 _Inout_ token_list& active_tokens)
-
2326 {
-
2327 for (auto i = inserted_tokens.begin(); i != inserted_tokens.end(); ) {
-
2328 auto& t = *i;
-
2329 _Assume_(t.token);
-
2330 if (t.word_index == word_index && t.after_word == after_word) {
-
2331 if (t.token->type != token_t::ending)
-
2332 start_tokens(source, active_tokens, t.active_tokens, end_tokens(source, active_tokens, t.active_tokens));
-
2333 t.token->append_tag(source);
-
2334 inserted_tokens.erase(i++);
-
2335 }
-
2336 else
-
2337 ++i;
-
2338 }
-
2339 }
+
2314 // Pop the active token.
+
2315 if (i1 == i) {
+
2316 active_tokens.erase(i);
+
2317 break;
+
2318 }
+
2319 active_tokens.erase(i);
+
2320 i = active_tokens.cend();
+
2321 }
+
2322 break;
+
2323 }
+
2324 }
+
2325 return i2;
+
2326 }
-
2340
-
-
2347 static void merge(_Inout_ token_list& a, _In_ const token_list& b)
-
2348 {
-
2349 for (auto i2 = b.begin(); i2 != b.end(); ++i2) {
-
2350 auto t2 = *i2;
-
2351 for (auto i1 = a.begin(); i1 != a.end(); ++i1) {
-
2352 if (i1 == a.end()) {
-
2353 a.push_back(t2);
-
2354 break;
-
2355 }
-
2356 auto t1 = *i1;
-
2357 if (t1 == t2)
-
2358 break;
-
2359 }
-
2360 }
-
2361 }
+
2327
+
+
2337 void append_inserted_tokens(_Inout_ std::basic_string<T, TR, AX>& source, _Inout_ inserted_token_list& inserted_tokens,
+
2338 _In_ size_t word_index, _In_ bool after_word,
+
2339 _Inout_ token_list& active_tokens)
+
2340 {
+
2341 for (auto i = inserted_tokens.begin(); i != inserted_tokens.end(); ) {
+
2342 auto& t = *i;
+
2343 _Assume_(t.token);
+
2344 if (t.word_index == word_index && t.after_word == after_word) {
+
2345 if (t.token->type != token_t::ending)
+
2346 start_tokens(source, active_tokens, t.active_tokens, end_tokens(source, active_tokens, t.active_tokens));
+
2347 t.token->append_tag(source);
+
2348 inserted_tokens.erase(i++);
+
2349 }
+
2350 else
+
2351 ++i;
+
2352 }
+
2353 }
-
2362
-
-
2366 void make_absolute_url(std::basic_string<T, TR, AX>& rel)
-
2367 {
-
2368 _Unreferenced_(rel);
-
2369
-
2370 if (m_url.empty())
-
2371 return;
-
2372
-
2373 // TODO: Implement!
-
2374 }
+
2354
+
+
2361 static void merge(_Inout_ token_list& a, _In_ const token_list& b)
+
2362 {
+
2363 for (auto i2 = b.begin(); i2 != b.end(); ++i2) {
+
2364 auto t2 = *i2;
+
2365 for (auto i1 = a.begin(); i1 != a.end(); ++i1) {
+
2366 if (i1 == a.end()) {
+
2367 a.push_back(t2);
+
2368 break;
+
2369 }
+
2370 auto t1 = *i1;
+
2371 if (t1 == t2)
+
2372 break;
+
2373 }
+
2374 }
+
2375 }
-
2375
-
2379 const token_vector& tokens() const { return m_tokens; }
-
2380
-
2381 protected:
-
2389 template <class T_token>
-
-
2390 T_token* append_token(_Inout_ std::unique_ptr<T_token>&& token)
-
2391 {
-
2392 if (!token)
-
2393 return nullptr;
-
2394 auto t = token.get();
-
2395 m_tokens.push_back(std::move(token));
-
2396 return t;
-
2397 }
+
2376
+
+
2380 void make_absolute_url(std::basic_string<T, TR, AX>& rel)
+
2381 {
+
2382 _Unreferenced_(rel);
+
2383
+
2384 if (m_url.empty())
+
2385 return;
+
2386
+
2387 // TODO: Implement!
+
2388 }
-
2398
-
2407 template <class T_token>
-
-
2408 size_t append_token(_Inout_ std::unique_ptr<T_token>&& token, _Inout_ std::basic_string<T, TR, AX>& source)
-
2409 {
-
2410 if (!token)
-
2411 return 0;
-
2412 size_t n = token->append_tag(source);
-
2413 m_tokens.push_back(std::move(token));
-
2414 return n;
-
2415 }
+
2389
+
2393 const token_vector& tokens() const { return m_tokens; }
+
2394
+
2395 protected:
+
2403 template <class T_token>
+
+
2404 T_token* append_token(_Inout_ std::unique_ptr<T_token>&& token)
+
2405 {
+
2406 if (!token)
+
2407 return nullptr;
+
2408 auto t = token.get();
+
2409 m_tokens.push_back(std::move(token));
+
2410 return t;
+
2411 }
-
2416
-
-
2425 text_token<T, TR, AX>* parse(_In_ const sequence_store::const_iterator& end, _In_ uint32_t text_type = 0)
-
2426 {
- -
2428 std::unique_ptr<text_token<T, TR, AX>> token(new text_token<T, TR, AX>(
-
2429 token_t::complete,
-
2430 nullptr, 0,
-
2431 text_type,
-
2432 m_offset != end ? m_offset->get() : nullptr));
-
2433
-
2434 while (m_offset != end) {
-
2435 auto& s = *m_offset;
-
2436
-
2437 if (m_progress) {
-
2438 if (m_progress->cancel())
-
2439 throw stdex::user_cancelled();
-
2440 m_progress->set(s->interval.start);
-
2441 }
-
2442
-
2443 // No token_tag_start and token_tag_end chars, please.
-
2444 _Assume_(
-
2445 stdex::strnchr(m_source + s->interval.start, s->interval.size(), static_cast<T>(token_tag_start)) == stdex::npos &&
-
2446 stdex::strnchr(m_source + s->interval.start, s->interval.size(), static_cast<T>(token_tag_end)) == stdex::npos);
+
2412
+
2421 template <class T_token>
+
+
2422 size_t append_token(_Inout_ std::unique_ptr<T_token>&& token, _Inout_ std::basic_string<T, TR, AX>& source)
+
2423 {
+
2424 if (!token)
+
2425 return 0;
+
2426 size_t n = token->append_tag(source);
+
2427 m_tokens.push_back(std::move(token));
+
2428 return n;
+
2429 }
+
+
2430
+
+
2439 text_token<T, TR, AX>* parse(_In_ const sequence_store::const_iterator& end, _In_ uint32_t text_type = 0)
+
2440 {
+ +
2442 std::unique_ptr<text_token<T, TR, AX>> token(new text_token<T, TR, AX>(
+
2443 token_t::complete,
+
2444 nullptr, 0,
+
2445 text_type,
+
2446 m_offset != end ? m_offset->get() : nullptr));
2447
-
2448 if (s->type == stdex::parser::html_sequence_t::text) {
-
2449 rel.from = s->interval.start;
-
2450 token->mapping.push_back(rel);
-
2451 stdex::sgml2strcat(token->text, m_source + s->interval.start, s->interval.size(), 0, rel, &token->mapping);
-
2452 rel.to = token->text.size();
-
2453 if (!(token->text_type & has_text) &&
-
2454 !stdex::isblank(m_source + s->interval.start, s->interval.size()))
-
2455 token->text_type |= has_text;
-
2456 ++m_offset;
-
2457 }
-
2458 else if (s->type == stdex::parser::html_sequence_t::element || s->type == stdex::parser::html_sequence_t::element_start) {
-
2459 const element* s_el = static_cast<const element*>(s.get());
-
2460 _Assume_(s_el);
-
2461 const element_start* s_el_start = s->type == stdex::parser::html_sequence_t::element_start ? static_cast<const element_start*>(s.get()) : nullptr;
-
2462 if (s_el->code == element_t::frameset && !m_parse_frames)
-
2463 throw std::invalid_argument("<frameset> detected");
-
2464
-
2465 {
-
2466 size_t offset = s->interval.start;
-
2467 std::unique_ptr<text_token<T, TR, AX>> t(s->type == stdex::parser::html_sequence_t::element || element_traits::span(s_el_start->code) == element_span_t::immediate ?
-
2468 new text_token<T, TR, AX>(token_t::complete, nullptr, 0, 0, s.get()) :
-
2469 new starting_token<T, TR, AX>(nullptr, 0, m_source + s_el_start->name.start, s_el_start->name.size(), 0, s.get(), s_el_start->end));
-
2470
-
2471 // Copy the tag contents, but mind any attributes containing localizable text.
-
2472 for (auto& a : s_el->attributes) {
-
2473 if (a.value.empty() ||
-
2474 stdex::isblank(m_source + a.value.start, a.value.size()))
-
2475 continue;
-
2476
-
2477 if (element_traits::is_uri(s_el->code, m_source + a.name.start, a.name.size())) {
-
2478 t->text.append(m_source + offset, a.value.start - offset);
-
2479 std::unique_ptr<url_token<T, TR, AX>> t_url(new url_token<T, TR, AX>(
-
2480 nullptr, 0,
-
2481 token_url_t::sgml,
-
2482 s.get()));
-
2483 stdex::sgml2strcat(t_url->url, m_source + a.value.start, a.value.size());
-
2484 append_token(std::move(t_url), t->text);
-
2485 t->text_type |= has_tokens;
-
2486 offset = a.value.end;
-
2487 }
-
2488 else if (element_traits::is_localizable(s_el->code, m_source + a.name.start, a.name.size())) {
-
2489 t->text.append(m_source + offset, a.value.start - offset);
-
2490 std::unique_ptr<text_token<T, TR, AX>> t_value(new text_token<T, TR, AX>(
-
2491 token_t::complete,
-
2492 nullptr, 0,
-
2493 has_text | is_title,
-
2494 s.get()));
-
2495 stdex::mapping<size_t> rel_value(a.value.start, 0);
-
2496 t_value->mapping.push_back(rel_value);
-
2497 stdex::sgml2strcat(t_value->text, m_source + a.value.start, a.value.size(), 0, rel_value, &t_value->mapping);
-
2498 append_token(std::move(t_value), t->text);
+
2448 while (m_offset != end) {
+
2449 auto& s = *m_offset;
+
2450
+
2451 if (m_progress) {
+
2452 if (m_progress->cancel())
+
2453 throw stdex::user_cancelled();
+
2454 m_progress->set(s->interval.start);
+
2455 }
+
2456
+
2457 // No token_tag_start and token_tag_end chars, please.
+
2458 _Assume_(
+
2459 stdex::strnchr(m_source + s->interval.start, s->interval.size(), static_cast<T>(token_tag_start)) == stdex::npos &&
+
2460 stdex::strnchr(m_source + s->interval.start, s->interval.size(), static_cast<T>(token_tag_end)) == stdex::npos);
+
2461
+
2462 if (s->type == stdex::parser::html_sequence_t::text) {
+
2463 rel.from = s->interval.start;
+
2464 token->mapping.push_back(rel);
+
2465 stdex::sgml2strcat(token->text, m_source + s->interval.start, s->interval.size(), 0, rel, &token->mapping);
+
2466 rel.to = token->text.size();
+
2467 if (!(token->text_type & has_text) &&
+
2468 !stdex::isblank(m_source + s->interval.start, s->interval.size()))
+
2469 token->text_type |= has_text;
+
2470 ++m_offset;
+
2471 }
+
2472 else if (s->type == stdex::parser::html_sequence_t::element || s->type == stdex::parser::html_sequence_t::element_start) {
+
2473 const element* s_el = static_cast<const element*>(s.get());
+
2474 _Assume_(s_el);
+
2475 const element_start* s_el_start = s->type == stdex::parser::html_sequence_t::element_start ? static_cast<const element_start*>(s.get()) : nullptr;
+
2476 if (s_el->code == element_t::frameset && !m_parse_frames)
+
2477 throw std::invalid_argument("<frameset> detected");
+
2478
+
2479 {
+
2480 size_t offset = s->interval.start;
+
2481 std::unique_ptr<text_token<T, TR, AX>> t(s->type == stdex::parser::html_sequence_t::element || element_traits::span(s_el_start->code) == element_span_t::immediate ?
+
2482 new text_token<T, TR, AX>(token_t::complete, nullptr, 0, 0, s.get()) :
+
2483 new starting_token<T, TR, AX>(nullptr, 0, m_source + s_el_start->name.start, s_el_start->name.size(), 0, s.get(), s_el_start->end));
+
2484
+
2485 // Copy the tag contents, but mind any attributes containing localizable text.
+
2486 for (auto& a : s_el->attributes) {
+
2487 if (a.value.empty() ||
+
2488 stdex::isblank(m_source + a.value.start, a.value.size()))
+
2489 continue;
+
2490
+
2491 if (element_traits::is_uri(s_el->code, m_source + a.name.start, a.name.size())) {
+
2492 t->text.append(m_source + offset, a.value.start - offset);
+
2493 std::unique_ptr<url_token<T, TR, AX>> t_url(new url_token<T, TR, AX>(
+
2494 nullptr, 0,
+
2495 token_url_t::sgml,
+
2496 s.get()));
+
2497 stdex::sgml2strcat(t_url->url, m_source + a.value.start, a.value.size());
+
2498 append_token(std::move(t_url), t->text);
2499 t->text_type |= has_tokens;
2500 offset = a.value.end;
2501 }
-
2502 }
-
2503
-
2504 t->text.append(m_source + offset, s->interval.end - offset);
-
2505 rel.from = s->interval.start;
-
2506 token->mapping.push_back(rel);
-
2507 rel.to += append_token(std::move(t), token->text);
-
2508 token->text_type |= has_tokens;
-
2509 }
-
2510 ++m_offset;
-
2511
-
2512 if (s_el_start) {
-
2513 if (s_el_start->code == element_t::address ||
-
2514 s_el_start->code == element_t::code ||
-
2515 s_el_start->code == element_t::comment ||
-
2516 s_el_start->code == element_t::cite ||
-
2517 s_el_start->code == element_t::kbd ||
-
2518 s_el_start->code == element_t::samp ||
-
2519 s_el_start->code == element_t::script ||
-
2520 s_el_start->code == element_t::style)
-
2521 {
-
2522 // Non-localizable
-
2523 auto s_end = s_el_start->end;
-
2524 _Assume_(s_end);
+
2502 else if (element_traits::is_localizable(s_el->code, m_source + a.name.start, a.name.size())) {
+
2503 t->text.append(m_source + offset, a.value.start - offset);
+
2504 std::unique_ptr<text_token<T, TR, AX>> t_value(new text_token<T, TR, AX>(
+
2505 token_t::complete,
+
2506 nullptr, 0,
+
2507 has_text | is_title,
+
2508 s.get()));
+
2509 stdex::mapping<size_t> rel_value(a.value.start, 0);
+
2510 t_value->mapping.push_back(rel_value);
+
2511 stdex::sgml2strcat(t_value->text, m_source + a.value.start, a.value.size(), 0, rel_value, &t_value->mapping);
+
2512 append_token(std::move(t_value), t->text);
+
2513 t->text_type |= has_tokens;
+
2514 offset = a.value.end;
+
2515 }
+
2516 }
+
2517
+
2518 t->text.append(m_source + offset, s->interval.end - offset);
+
2519 rel.from = s->interval.start;
+
2520 token->mapping.push_back(rel);
+
2521 rel.to += append_token(std::move(t), token->text);
+
2522 token->text_type |= has_tokens;
+
2523 }
+
2524 ++m_offset;
2525
-
2526 if (s->interval.end < s_end->interval.start) {
-
2527 if (s_el_start->code != element_t::style) {
-
2528 rel.from = s->interval.start;
-
2529 token->mapping.push_back(rel);
-
2530 rel.to += append_token(std::move(std::unique_ptr<text_token<T, TR, AX>>(
- -
2532 token_t::complete,
-
2533 m_source + s->interval.end, s_end->interval.start - s->interval.end,
-
2534 0,
-
2535 m_offset->get()))),
-
2536 token->text);
-
2537 }
-
2538 else {
-
2539 // Partially parse CSS. It may contain URLs we need to make absolute.
-
2540 auto t = parse_css(s->interval.end, s_end->interval.start);
-
2541 _Assume_(t);
+
2526 if (s_el_start) {
+
2527 if (s_el_start->code == element_t::address ||
+
2528 s_el_start->code == element_t::code ||
+
2529 s_el_start->code == element_t::comment ||
+
2530 s_el_start->code == element_t::cite ||
+
2531 s_el_start->code == element_t::kbd ||
+
2532 s_el_start->code == element_t::samp ||
+
2533 s_el_start->code == element_t::script ||
+
2534 s_el_start->code == element_t::style)
+
2535 {
+
2536 // Non-localizable
+
2537 auto s_end = s_el_start->end;
+
2538 _Assume_(s_end);
+
2539
+
2540 if (s->interval.end < s_end->interval.start) {
+
2541 if (s_el_start->code != element_t::style) {
2542 rel.from = s->interval.start;
2543 token->mapping.push_back(rel);
-
2544 rel.to += t->append_tag(token->text);
-
2545 }
-
2546 token->text_type |= has_tokens;
-
2547 }
-
2548 while (m_offset != end && m_offset->get() != s_end)
-
2549 ++m_offset;
-
2550 }
-
2551 else if (element_traits::is_group(s_el_start->code)) {
-
2552 auto limit = m_offset;
-
2553 while (limit != end && limit->get() != s_el_start->end)
-
2554 ++limit;
-
2555 auto t = parse(limit,
-
2556 (element_traits::is_heading(s_el_start->code) || s_el_start->code == element_t::dt || s_el_start->code == element_t::title ? is_title : 0) |
-
2557 (element_traits::is_list(s_el_start->code) ? is_bullet : 0));
-
2558 rel.from = s->interval.start;
-
2559 token->mapping.push_back(rel);
-
2560 rel.to += t->append_tag(token->text);
-
2561 token->text_type |= has_tokens;
-
2562 }
-
2563 }
-
2564 }
-
2565 else if (s->type == stdex::parser::html_sequence_t::element_end) {
-
2566 rel.from = s->interval.start;
-
2567 token->mapping.push_back(rel);
-
2568 rel.to += append_token(std::move(std::unique_ptr<text_token<T, TR, AX>>(
- -
2570 token_t::ending,
-
2571 m_source + s->interval.start, s->interval.size(),
-
2572 0,
-
2573 s.get()))),
-
2574 token->text);
-
2575 token->text_type |= has_tokens;
-
2576 ++m_offset;
-
2577 }
-
2578 else {
-
2579 // Declaration, instruction, (P)CDATA section, comment...
+
2544 rel.to += append_token(std::move(std::unique_ptr<text_token<T, TR, AX>>(
+ +
2546 token_t::complete,
+
2547 m_source + s->interval.end, s_end->interval.start - s->interval.end,
+
2548 0,
+
2549 m_offset->get()))),
+
2550 token->text);
+
2551 }
+
2552 else {
+
2553 // Partially parse CSS. It may contain URLs we need to make absolute.
+
2554 auto t = parse_css(s->interval.end, s_end->interval.start);
+
2555 _Assume_(t);
+
2556 rel.from = s->interval.start;
+
2557 token->mapping.push_back(rel);
+
2558 rel.to += t->append_tag(token->text);
+
2559 }
+
2560 token->text_type |= has_tokens;
+
2561 }
+
2562 while (m_offset != end && m_offset->get() != s_end)
+
2563 ++m_offset;
+
2564 }
+
2565 else if (element_traits::is_group(s_el_start->code)) {
+
2566 auto limit = m_offset;
+
2567 while (limit != end && limit->get() != s_el_start->end)
+
2568 ++limit;
+
2569 auto t = parse(limit,
+
2570 (element_traits::is_heading(s_el_start->code) || s_el_start->code == element_t::dt || s_el_start->code == element_t::title ? is_title : 0) |
+
2571 (element_traits::is_list(s_el_start->code) ? is_bullet : 0));
+
2572 rel.from = s->interval.start;
+
2573 token->mapping.push_back(rel);
+
2574 rel.to += t->append_tag(token->text);
+
2575 token->text_type |= has_tokens;
+
2576 }
+
2577 }
+
2578 }
+
2579 else if (s->type == stdex::parser::html_sequence_t::element_end) {
2580 rel.from = s->interval.start;
2581 token->mapping.push_back(rel);
2582 rel.to += append_token(std::move(std::unique_ptr<text_token<T, TR, AX>>(
-
2584 token_t::complete,
+
2584 token_t::ending,
2585 m_source + s->interval.start, s->interval.size(),
2586 0,
2587 s.get()))),
@@ -2351,161 +2351,175 @@ $(function() { codefold.init(0); });
2589 token->text_type |= has_tokens;
2590 ++m_offset;
2591 }
-
2592 }
-
2593
-
2594 return append_token(std::move(token));
-
2595 }
+
2592 else {
+
2593 // Declaration, instruction, (P)CDATA section, comment...
+
2594 rel.from = s->interval.start;
+
2595 token->mapping.push_back(rel);
+
2596 rel.to += append_token(std::move(std::unique_ptr<text_token<T, TR, AX>>(
+ +
2598 token_t::complete,
+
2599 m_source + s->interval.start, s->interval.size(),
+
2600 0,
+
2601 s.get()))),
+
2602 token->text);
+
2603 token->text_type |= has_tokens;
+
2604 ++m_offset;
+
2605 }
+
2606 }
+
2607
+
2608 return append_token(std::move(token));
+
2609 }
-
2596
-
-
2600 text_token<T, TR, AX>* parse_css(size_t start, size_t end)
-
2601 {
-
2602 stdex::interval<size_t> section, content;
-
2603 std::unique_ptr<text_token<T, TR, AX>> token(
- -
2605 token_t::complete,
-
2606 nullptr, 0,
-
2607 0,
-
2608 m_offset->get()));
-
2609
-
2610 for (;;) {
-
2611 if (m_css_comment.match(m_source, start, end)) {
-
2612 token->text.append(m_source + start, m_css_comment.interval.end - start);
-
2613 start = m_css_comment.interval.end;
-
2614 }
-
2615 else if (m_css_cdo.match(m_source, start, end)) {
-
2616 token->text.append(m_source + start, m_css_cdo.interval.end - start);
-
2617 start = m_css_cdo.interval.end;
-
2618 }
-
2619 else if (m_css_cdc.match(m_source, start, end)) {
-
2620 token->text.append(m_source + start, m_css_cdc.interval.end - start);
-
2621 start = m_css_cdc.interval.end;
-
2622 }
-
2623 else if (
-
2624 m_css_import.match(m_source, start, end) && (section = m_css_import.interval, content = m_css_import.content, true) ||
-
2625 m_css_uri.match(m_source, start, end) && (section = m_css_uri.interval, content = m_css_uri.content, true))
-
2626 {
-
2627 std::unique_ptr<url_token<T, TR, AX>> t_url(
- -
2629 nullptr, 0,
-
2630 token_url_t::css,
-
2631 m_offset->get()));
-
2632 css_unescape(t_url->url, m_source + content.start, content.size());
-
2633 token->text.append(m_source + start, content.start - start);
-
2634 append_token(std::move(t_url), token->text);
-
2635 token->text.append(m_source + content.end, section.end - content.end);
-
2636 token->text_type |= has_tokens;
-
2637 start = section.end;
-
2638 }
-
2639 else if (m_any_char.match(m_source, start, end)) {
-
2640 token->text.append(m_source + start, m_any_char.interval.end - start);
-
2641 start = m_any_char.interval.end;
-
2642 }
-
2643 else
-
2644 break;
-
2645 }
-
2646
-
2647 return append_token(std::move(token));
-
2648 }
+
2610
+
+
2614 text_token<T, TR, AX>* parse_css(size_t start, size_t end)
+
2615 {
+
2616 stdex::interval<size_t> section, content;
+
2617 std::unique_ptr<text_token<T, TR, AX>> token(
+ +
2619 token_t::complete,
+
2620 nullptr, 0,
+
2621 0,
+
2622 m_offset->get()));
+
2623
+
2624 for (;;) {
+
2625 if (m_css_comment.match(m_source, start, end)) {
+
2626 token->text.append(m_source + start, m_css_comment.interval.end - start);
+
2627 start = m_css_comment.interval.end;
+
2628 }
+
2629 else if (m_css_cdo.match(m_source, start, end)) {
+
2630 token->text.append(m_source + start, m_css_cdo.interval.end - start);
+
2631 start = m_css_cdo.interval.end;
+
2632 }
+
2633 else if (m_css_cdc.match(m_source, start, end)) {
+
2634 token->text.append(m_source + start, m_css_cdc.interval.end - start);
+
2635 start = m_css_cdc.interval.end;
+
2636 }
+
2637 else if (
+
2638 (m_css_import.match(m_source, start, end) && ((void)(section = m_css_import.interval), (void)(content = m_css_import.content), true)) ||
+
2639 (m_css_uri.match(m_source, start, end) && ((void)(section = m_css_uri.interval), (void)(content = m_css_uri.content), true)))
+
2640 {
+
2641 std::unique_ptr<url_token<T, TR, AX>> t_url(
+ +
2643 nullptr, 0,
+
2644 token_url_t::css,
+
2645 m_offset->get()));
+
2646 css_unescape(t_url->url, m_source + content.start, content.size());
+
2647 token->text.append(m_source + start, content.start - start);
+
2648 append_token(std::move(t_url), token->text);
+
2649 token->text.append(m_source + content.end, section.end - content.end);
+
2650 token->text_type |= has_tokens;
+
2651 start = section.end;
+
2652 }
+
2653 else if (m_any_char.match(m_source, start, end)) {
+
2654 token->text.append(m_source + start, m_any_char.interval.end - start);
+
2655 start = m_any_char.interval.end;
+
2656 }
+
2657 else
+
2658 break;
+
2659 }
+
2660
+
2661 return append_token(std::move(token));
+
2662 }
-
2649
-
2650 protected:
- -
2652 const stdex::sstring m_url;
-
2653 const bool m_parse_frames;
- -
2655 const T* m_source;
-
2656 token_vector m_tokens;
-
2657 sequence_store::const_iterator m_offset;
-
2658
-
2659 // For detecting URLs in CSS
- - - - - - - -
2667 };
+
2663
+
2664 protected:
+ +
2666 const stdex::sstring m_url;
+
2667 const bool m_parse_frames;
+ +
2669 const T* m_source;
+
2670 token_vector m_tokens;
+
2671 sequence_store::const_iterator m_offset;
+
2672
+
2673 // For detecting URLs in CSS
+ + + + + + + +
2681 };
-
2668 }
-
2669}
-
HTML comment.
Definition html.hpp:1553
-
stdex::interval< size_t > content
Comment content position in source.
Definition html.hpp:1562
-
HTML declaration.
Definition html.hpp:1535
-
stdex::interval< size_t > name
Declaration name position in source.
Definition html.hpp:1545
-
std::vector< stdex::parser::html_attribute > attributes
Declaration attribute positions in source.
Definition html.hpp:1546
-
HTML document.
Definition html.hpp:1602
-
bool m_is_rcdata
Inside of RCDATA?
Definition html.hpp:1928
-
const std::basic_string< T, TR, AX > & source() const
Returns document HTML source code.
Definition html.hpp:1875
-
void append(_In_reads_or_z_opt_(num_chars) const T *source, size_t num_chars)
Parses HTML source code by chunks.
Definition html.hpp:1642
-
size_t m_num_valid_conditions
Number of started valid conditions.
Definition html.hpp:1925
-
size_t m_num_invalid_conditions
Number of started invalid conditions.
Definition html.hpp:1926
-
bool m_is_cdata
Inside of CDATA?
Definition html.hpp:1927
-
stdex::charset_id m_charset
Document charset.
Definition html.hpp:1922
-
sequence_store m_sequences
Store of sequences.
Definition html.hpp:1936
-
element_start * active_element() const
Returns starting tag of currently active element or nullptr if no element is known to be started.
Definition html.hpp:1883
-
size_t m_num_parsed
Number of characters already parsed.
Definition html.hpp:1921
-
std::vector< element_start * > m_element_stack
LIFO stack of started elements.
Definition html.hpp:1937
-
void finalize()
Finalizes document when no more appending is planned.
Definition html.hpp:1853
-
std::basic_string< T, TR, AX > replace_entities(_In_reads_or_z_opt_(num_chars) const T *input, size_t num_chars) const
Replaces entities with their content.
Definition html.hpp:1891
-
void assign(_In_reads_or_z_opt_(num_chars) const T *source, size_t num_chars)
Parses HTML document source code.
Definition html.hpp:1865
-
bool m_is_special_element
Inside of a special element (<SCRIPT>, <STYLE>, ...)?
Definition html.hpp:1938
-
std::vector< std::unique_ptr< entity< T, TR, AX > > > m_entities
Array of entities.
Definition html.hpp:1932
-
void clear()
Empties document.
Definition html.hpp:1621
-
std::basic_string< T, TR, AX > m_source
Document HTML source code.
Definition html.hpp:1920
-
Ending tag of an HTML element </...>
Definition html.hpp:1515
-
stdex::interval< size_t > name
Element name position in source.
Definition html.hpp:1527
-
element_start * start
Corresponding starting tag.
Definition html.hpp:1528
-
element_t code
Element code.
Definition html.hpp:1526
-
Starting tag of an HTML element <...>
Definition html.hpp:1499
-
sequence * end
Corresponding ending tag of type element_end; When element is ended by a start of another element,...
Definition html.hpp:1508
-
HTML element <.../>
Definition html.hpp:1320
-
stdex::interval< size_t > name
Element name position in source.
Definition html.hpp:1489
-
std::vector< stdex::parser::html_attribute > attributes
Element attribute positions in source.
Definition html.hpp:1490
-
element_t code
Element code.
Definition html.hpp:1488
-
HTML instruction.
Definition html.hpp:1569
-
stdex::interval< size_t > content
Instruction content position in source.
Definition html.hpp:1578
-
HTML parser.
Definition html.hpp:2159
-
token_vector m_tokens
HTML token storage.
Definition html.hpp:2656
-
void append_inserted_tokens(std::basic_string< T, TR, AX > &source, inserted_token_list &inserted_tokens, size_t word_index, bool after_word, token_list &active_tokens)
Adds matching inserted tokens before/after the given word in source code.
Definition html.hpp:2323
-
text_token< T, TR, AX > * parse(const sequence_store::const_iterator &end, uint32_t text_type=0)
Recursively parses HTML document.
Definition html.hpp:2425
-
const stdex::sstring m_url
Absolute document URL.
Definition html.hpp:2652
-
text_token< T, TR, AX > * parse()
Parses HTML document.
Definition html.hpp:2175
-
const document< T, TR, AX > & m_document
Document being analyzed.
Definition html.hpp:2651
-
token_list::const_iterator end_tokens(std::basic_string< T, TR, AX > &source, token_list &active_tokens, const token_list &new_tokens)
Pops ending tokens from the active token list and append their tags to the source code string.
Definition html.hpp:2280
-
static void merge(token_list &a, const token_list &b)
Adds tokens from list b to list a creating an union.
Definition html.hpp:2347
-
text_token< T, TR, AX > * parse_css(size_t start, size_t end)
Parses CSS.
Definition html.hpp:2600
-
static void start_tokens(std::basic_string< T, TR, AX > &source, token_list &active_tokens, const token_list &new_tokens, token_list::const_iterator from)
Pushes tokens to the active token list and appends their tags to the source code string.
Definition html.hpp:2262
-
static void link(std::basic_string< T, TR, AX > &source, const text_token< T, TR, AX > *t)
Rebuilds HTML source code from the token tree.
Definition html.hpp:2195
-
T_token * append_token(std::unique_ptr< T_token > &&token)
Adds token to the collection.
Definition html.hpp:2390
-
sequence_store::const_iterator m_offset
Index of active section.
Definition html.hpp:2657
-
const T * m_source
HTML source code.
Definition html.hpp:2655
-
stdex::progress< size_t > * m_progress
Progress indicator.
Definition html.hpp:2654
-
const bool m_parse_frames
Parse frames.
Definition html.hpp:2653
-
void make_absolute_url(std::basic_string< T, TR, AX > &rel)
Converts URL to absolute.
Definition html.hpp:2366
-
size_t append_token(std::unique_ptr< T_token > &&token, std::basic_string< T, TR, AX > &source)
Adds token to the collection and appends its tag to the source code string.
Definition html.hpp:2408
-
const token_vector & tokens() const
Returns collection of tokens.
Definition html.hpp:2379
-
Base class for HTML sequences.
Definition html.hpp:1301
-
stdex::interval< size_t > interval
Sequence position in source.
Definition html.hpp:1304
-
stdex::parser::html_sequence_t type
Sequence type. Enum is used for performance reasons (vs. dynamic_cast)
Definition html.hpp:1303
-
sequence * parent
Parent sequence.
Definition html.hpp:1305
-
Token representing start HTML tag.
Definition html.hpp:2092
-
stdex::html::sequence * end_sequence
Ending tag sequence.
Definition html.hpp:2110
-
std::basic_string< T, TR, AX > name
Element name allowing later recreation of ending </tag>
Definition html.hpp:2109
-
Token representing part of HTML text.
Definition html.hpp:2067
-
stdex::mapping_vector< size_t > mapping
Mapping between source and text positions.
Definition html.hpp:2084
-
uint32_t text_type
Mask of text_type_flag_t to specify text content.
Definition html.hpp:2083
-
std::basic_string< T, TR, AX > text
Token text.
Definition html.hpp:2082
-
HTML token base class.
Definition html.hpp:1976
-
sequence * sequence
Pointer to the sequence this token represents or nullptr when it doesn't trivially represent one sequ...
Definition html.hpp:2045
-
uintptr_t data
Any user-supplied data.
Definition html.hpp:2046
-
size_t append_tag(std::basic_string< wchar_t, TR, AX > &str) const
Appends token tag to the source code.
Definition html.hpp:2014
-
token_t type
Token type.
Definition html.hpp:2044
-
size_t append_tag(std::basic_string< char, TR, AX > &str) const
Appends token tag to the source code.
Definition html.hpp:1998
-
HTTP token representing an URL.
Definition html.hpp:2127
-
token_url_t encoding
URL encoding.
Definition html.hpp:2142
-
std::basic_string< T, TR, AX > url
URL.
Definition html.hpp:2141
+
2682 }
+
2683}
+
HTML comment.
Definition html.hpp:1566
+
stdex::interval< size_t > content
Comment content position in source.
Definition html.hpp:1575
+
HTML declaration.
Definition html.hpp:1548
+
stdex::interval< size_t > name
Declaration name position in source.
Definition html.hpp:1558
+
std::vector< stdex::parser::html_attribute > attributes
Declaration attribute positions in source.
Definition html.hpp:1559
+
HTML document.
Definition html.hpp:1615
+
bool m_is_rcdata
Inside of RCDATA?
Definition html.hpp:1942
+
const std::basic_string< T, TR, AX > & source() const
Returns document HTML source code.
Definition html.hpp:1889
+
void append(_In_reads_or_z_opt_(num_chars) const T *source, size_t num_chars)
Parses HTML source code by chunks.
Definition html.hpp:1655
+
size_t m_num_valid_conditions
Number of started valid conditions.
Definition html.hpp:1939
+
size_t m_num_invalid_conditions
Number of started invalid conditions.
Definition html.hpp:1940
+
bool m_is_cdata
Inside of CDATA?
Definition html.hpp:1941
+
stdex::charset_id m_charset
Document charset.
Definition html.hpp:1936
+
sequence_store m_sequences
Store of sequences.
Definition html.hpp:1950
+
element_start * active_element() const
Returns starting tag of currently active element or nullptr if no element is known to be started.
Definition html.hpp:1897
+
size_t m_num_parsed
Number of characters already parsed.
Definition html.hpp:1935
+
std::vector< element_start * > m_element_stack
LIFO stack of started elements.
Definition html.hpp:1951
+
void finalize()
Finalizes document when no more appending is planned.
Definition html.hpp:1867
+
std::basic_string< T, TR, AX > replace_entities(_In_reads_or_z_opt_(num_chars) const T *input, size_t num_chars) const
Replaces entities with their content.
Definition html.hpp:1905
+
void assign(_In_reads_or_z_opt_(num_chars) const T *source, size_t num_chars)
Parses HTML document source code.
Definition html.hpp:1879
+
bool m_is_special_element
Inside of a special element (<SCRIPT>, <STYLE>, ...)?
Definition html.hpp:1952
+
std::vector< std::unique_ptr< entity< T, TR, AX > > > m_entities
Array of entities.
Definition html.hpp:1946
+
void clear()
Empties document.
Definition html.hpp:1634
+
std::basic_string< T, TR, AX > m_source
Document HTML source code.
Definition html.hpp:1934
+
Ending tag of an HTML element </...>
Definition html.hpp:1528
+
stdex::interval< size_t > name
Element name position in source.
Definition html.hpp:1540
+
element_start * start
Corresponding starting tag.
Definition html.hpp:1541
+
element_t code
Element code.
Definition html.hpp:1539
+
Starting tag of an HTML element <...>
Definition html.hpp:1512
+
sequence * end
Corresponding ending tag of type element_end; When element is ended by a start of another element,...
Definition html.hpp:1521
+
HTML element <.../>
Definition html.hpp:1333
+
stdex::interval< size_t > name
Element name position in source.
Definition html.hpp:1502
+
std::vector< stdex::parser::html_attribute > attributes
Element attribute positions in source.
Definition html.hpp:1503
+
element_t code
Element code.
Definition html.hpp:1501
+
HTML instruction.
Definition html.hpp:1582
+
stdex::interval< size_t > content
Instruction content position in source.
Definition html.hpp:1591
+
HTML parser.
Definition html.hpp:2173
+
token_vector m_tokens
HTML token storage.
Definition html.hpp:2670
+
void append_inserted_tokens(std::basic_string< T, TR, AX > &source, inserted_token_list &inserted_tokens, size_t word_index, bool after_word, token_list &active_tokens)
Adds matching inserted tokens before/after the given word in source code.
Definition html.hpp:2337
+
text_token< T, TR, AX > * parse(const sequence_store::const_iterator &end, uint32_t text_type=0)
Recursively parses HTML document.
Definition html.hpp:2439
+
const stdex::sstring m_url
Absolute document URL.
Definition html.hpp:2666
+
text_token< T, TR, AX > * parse()
Parses HTML document.
Definition html.hpp:2189
+
const document< T, TR, AX > & m_document
Document being analyzed.
Definition html.hpp:2665
+
token_list::const_iterator end_tokens(std::basic_string< T, TR, AX > &source, token_list &active_tokens, const token_list &new_tokens)
Pops ending tokens from the active token list and append their tags to the source code string.
Definition html.hpp:2294
+
static void merge(token_list &a, const token_list &b)
Adds tokens from list b to list a creating an union.
Definition html.hpp:2361
+
text_token< T, TR, AX > * parse_css(size_t start, size_t end)
Parses CSS.
Definition html.hpp:2614
+
static void start_tokens(std::basic_string< T, TR, AX > &source, token_list &active_tokens, const token_list &new_tokens, token_list::const_iterator from)
Pushes tokens to the active token list and appends their tags to the source code string.
Definition html.hpp:2276
+
static void link(std::basic_string< T, TR, AX > &source, const text_token< T, TR, AX > *t)
Rebuilds HTML source code from the token tree.
Definition html.hpp:2209
+
T_token * append_token(std::unique_ptr< T_token > &&token)
Adds token to the collection.
Definition html.hpp:2404
+
sequence_store::const_iterator m_offset
Index of active section.
Definition html.hpp:2671
+
const T * m_source
HTML source code.
Definition html.hpp:2669
+
stdex::progress< size_t > * m_progress
Progress indicator.
Definition html.hpp:2668
+
const bool m_parse_frames
Parse frames.
Definition html.hpp:2667
+
void make_absolute_url(std::basic_string< T, TR, AX > &rel)
Converts URL to absolute.
Definition html.hpp:2380
+
size_t append_token(std::unique_ptr< T_token > &&token, std::basic_string< T, TR, AX > &source)
Adds token to the collection and appends its tag to the source code string.
Definition html.hpp:2422
+
const token_vector & tokens() const
Returns collection of tokens.
Definition html.hpp:2393
+
Base class for HTML sequences.
Definition html.hpp:1314
+
stdex::interval< size_t > interval
Sequence position in source.
Definition html.hpp:1317
+
stdex::parser::html_sequence_t type
Sequence type. Enum is used for performance reasons (vs. dynamic_cast)
Definition html.hpp:1316
+
sequence * parent
Parent sequence.
Definition html.hpp:1318
+
Token representing start HTML tag.
Definition html.hpp:2106
+
stdex::html::sequence * end_sequence
Ending tag sequence.
Definition html.hpp:2124
+
std::basic_string< T, TR, AX > name
Element name allowing later recreation of ending </tag>
Definition html.hpp:2123
+
Token representing part of HTML text.
Definition html.hpp:2081
+
stdex::mapping_vector< size_t > mapping
Mapping between source and text positions.
Definition html.hpp:2098
+
uint32_t text_type
Mask of text_type_flag_t to specify text content.
Definition html.hpp:2097
+
std::basic_string< T, TR, AX > text
Token text.
Definition html.hpp:2096
+
HTML token base class.
Definition html.hpp:1990
+
sequence * sequence
Pointer to the sequence this token represents or nullptr when it doesn't trivially represent one sequ...
Definition html.hpp:2059
+
uintptr_t data
Any user-supplied data.
Definition html.hpp:2060
+
size_t append_tag(std::basic_string< wchar_t, TR, AX > &str) const
Appends token tag to the source code.
Definition html.hpp:2028
+
token_t type
Token type.
Definition html.hpp:2058
+
size_t append_tag(std::basic_string< char, TR, AX > &str) const
Appends token tag to the source code.
Definition html.hpp:2012
+
HTTP token representing an URL.
Definition html.hpp:2141
+
token_url_t encoding
URL encoding.
Definition html.hpp:2156
+
std::basic_string< T, TR, AX > url
URL.
Definition html.hpp:2155
stdex::interval< size_t > interval
Region of the last match.
Definition parser.hpp:116
Test for given string.
Definition parser.hpp:831
Progress indicator base class.
Definition progress.hpp:22
@@ -2514,33 +2528,33 @@ $(function() { codefold.init(0); });
virtual void set_range(T start, T end)
Set progress range extent.
Definition progress.hpp:40
User cancelled exception.
Definition exception.hpp:17
Describes attributes associated with a HTML element.
Definition html.hpp:685
-
static bool is_group(element_t code)
Does element represent a separate part of text?
Definition html.hpp:1090
-
static bool is_flow(element_t code)
Does element typically represent text?
Definition html.hpp:1004
-
static bool is_heading(element_t code)
Does element represent a heading?
Definition html.hpp:922
-
static bool is_head_content(element_t code)
Is element part of the document head?
Definition html.hpp:1014
+
static bool is_group(element_t code)
Does element represent a separate part of text?
Definition html.hpp:1102
+
static bool is_flow(element_t code)
Does element typically represent text?
Definition html.hpp:1012
+
static bool is_heading(element_t code)
Does element represent a heading?
Definition html.hpp:926
+
static bool is_head_content(element_t code)
Is element part of the document head?
Definition html.hpp:1022
static bool is_fontstyle(element_t code)
Does element represent font styling?
Definition html.hpp:810
-
static bool is_block(element_t code)
Is element typically displayed as a stand-alone section of text?
Definition html.hpp:973
-
static bool is_head_misc(element_t code)
May element be a part of document head?
Definition html.hpp:1031
-
static bool is_list(element_t code)
Does element represent a list of items?
Definition html.hpp:941
-
static bool is_uri(element_t code, _In_reads_or_z_opt_(num_chars) const T *attr_name, size_t num_chars)
Checks if expected element attribute value is URI.
Definition html.hpp:1220
-
static bool is_preformatted(element_t code)
Does element represent preformatted text, source code etc.?
Definition html.hpp:958
-
static bool is_localizable(element_t code, const T *attr_name, size_t num_chars)
Checks if expected element attribute value is localizable.
Definition html.hpp:1275
-
static bool is_special(element_t code)
Does element represent non-textual item in the document?
Definition html.hpp:856
-
static bool is_pre_exclusion(element_t code)
May element be a part of.
Definition html.hpp:1049
-
static bool is_inline(element_t code)
Is element typically displayed inline with text?
Definition html.hpp:907
-
static bool is_html_content(element_t code)
Does element represent the document body?
Definition html.hpp:1074
-
static bool is_formctrl(element_t code)
Does element represent a form control?
Definition html.hpp:889
-
static bool is_phrase(element_t code)
Does element represent a phrase-of-speech?
Definition html.hpp:832
-
static bool may_contain(element_t parent, element_t child)
Checks if one element may nest inside another.
Definition html.hpp:1120
+
static bool is_block(element_t code)
Is element typically displayed as a stand-alone section of text?
Definition html.hpp:980
+
static bool is_head_misc(element_t code)
May element be a part of document head?
Definition html.hpp:1040
+
static bool is_list(element_t code)
Does element represent a list of items?
Definition html.hpp:946
+
static bool is_uri(element_t code, _In_reads_or_z_opt_(num_chars) const T *attr_name, size_t num_chars)
Checks if expected element attribute value is URI.
Definition html.hpp:1233
+
static bool is_preformatted(element_t code)
Does element represent preformatted text, source code etc.?
Definition html.hpp:964
+
static bool is_localizable(element_t code, const T *attr_name, size_t num_chars)
Checks if expected element attribute value is localizable.
Definition html.hpp:1288
+
static bool is_special(element_t code)
Does element represent non-textual item in the document?
Definition html.hpp:858
+
static bool is_pre_exclusion(element_t code)
May element be a part of <pre></pre>?
Definition html.hpp:1059
+
static bool is_inline(element_t code)
Is element typically displayed inline with text?
Definition html.hpp:911
+
static bool is_html_content(element_t code)
Does element represent the document body?
Definition html.hpp:1085
+
static bool is_formctrl(element_t code)
Does element represent a form control?
Definition html.hpp:892
+
static bool is_phrase(element_t code)
Does element represent a phrase-of-speech?
Definition html.hpp:833
+
static bool may_contain(element_t parent, element_t child)
Checks if one element may nest inside another.
Definition html.hpp:1133
static element_span_t span(element_t code)
Returns expected element span in HTML code.
Definition html.hpp:691
-
HTML entity.
Definition html.hpp:1586
-
std::basic_string< T, TR, AX > value
Entity value.
Definition html.hpp:1588
-
stdex::interval< size_t > name
Name position in source.
Definition html.hpp:1587
-
Inserted HTML token.
Definition html.hpp:2148
-
bool after_word
true if token is anchored after the word; false if anchored before the word
Definition html.hpp:2152
-
std::list< stdex::html::token * > active_tokens
List of started tokens at inserted token.
Definition html.hpp:2150
-
size_t word_index
Index of the word, token is anchored to.
Definition html.hpp:2151
-
token * token
Points to the token.
Definition html.hpp:2149
+
HTML entity.
Definition html.hpp:1599
+
std::basic_string< T, TR, AX > value
Entity value.
Definition html.hpp:1601
+
stdex::interval< size_t > name
Name position in source.
Definition html.hpp:1600
+
Inserted HTML token.
Definition html.hpp:2162
+
bool after_word
true if token is anchored after the word; false if anchored before the word
Definition html.hpp:2166
+
std::list< stdex::html::token * > active_tokens
List of started tokens at inserted token.
Definition html.hpp:2164
+
size_t word_index
Index of the word, token is anchored to.
Definition html.hpp:2165
+
token * token
Points to the token.
Definition html.hpp:2163
Numerical interval.
Definition interval.hpp:18
T size() const
Returns interval size.
Definition interval.hpp:47
T end
interval end
Definition interval.hpp:20
@@ -2551,7 +2565,7 @@ $(function() { codefold.init(0); });
diff --git a/idrec_8hpp_source.html b/idrec_8hpp_source.html index fee0a7ee0..45228efd3 100644 --- a/idrec_8hpp_source.html +++ b/idrec_8hpp_source.html @@ -480,7 +480,7 @@ $(function() { codefold.init(0); });
diff --git a/include_2stdex_2compat_8hpp_source.html b/include_2stdex_2compat_8hpp_source.html index 9e6f5ec44..c350e2047 100644 --- a/include_2stdex_2compat_8hpp_source.html +++ b/include_2stdex_2compat_8hpp_source.html @@ -298,7 +298,7 @@ $(function() { codefold.init(0); });
diff --git a/index.html b/index.html index 8ef78f2c9..a27e1381c 100644 --- a/index.html +++ b/index.html @@ -87,7 +87,7 @@ Requirements
diff --git a/interval_8hpp_source.html b/interval_8hpp_source.html index 2436de881..ecb3e90e0 100644 --- a/interval_8hpp_source.html +++ b/interval_8hpp_source.html @@ -253,7 +253,7 @@ $(function() { codefold.init(0); });
diff --git a/locale_8hpp_source.html b/locale_8hpp_source.html index f73b5b092..6488aa094 100644 --- a/locale_8hpp_source.html +++ b/locale_8hpp_source.html @@ -155,40 +155,42 @@ $(function() { codefold.init(0); });
75 {}
76
77 locale(_In_ int category, _In_z_ const char* locale) :
-
78 locale(create_locale(category, locale))
+
78 stdex::locale(create_locale(category, locale))
79 {}
80
-
81 locale(_In_ int category, _In_z_ const wchar_t* locale) :
-
82 locale(create_locale(category, locale))
-
83 {}
-
84
-
85 operator locale_t() const { return get(); }
-
86 };
+
81#ifdef _WIN32
+
82 locale(_In_ int category, _In_z_ const wchar_t* locale) :
+
83 stdex::locale(create_locale(category, locale))
+
84 {}
+
85#endif
+
86
+
87 operator locale_t() const { return get(); }
+
88 };
-
87
-
91 const inline locale locale_C(create_locale(LC_ALL, "C"));
-
92
-
96 const inline locale locale_utf8(create_locale(LC_ALL, ".UTF-8"));
-
97
-
101 const inline locale locale_default(create_locale(LC_ALL,
-
102#ifdef WIN32
-
103#ifdef _CONSOLE
-
104 ".OCP"
-
105#else
-
106 ".ACP"
-
107#endif
-
108#else
-
109 ""
-
110#endif
-
111 ));
-
112}
+
89
+
93 const inline locale locale_C(create_locale(LC_ALL, "C"));
+
94
+
98 const inline locale locale_utf8(create_locale(LC_ALL, ".UTF-8"));
+
99
+
103 const inline locale locale_default(create_locale(LC_ALL,
+
104#ifdef WIN32
+
105#ifdef _CONSOLE
+
106 ".OCP"
+
107#else
+
108 ".ACP"
+
109#endif
+
110#else
+
111 ""
+
112#endif
+
113 ));
+
114}
locale_t helper class to free_locale when going out of scope.
Definition locale.hpp:69
Deleter for unique_ptr using free_locale.
Definition locale.hpp:45
void operator()(locale_t locale) const
Delete a pointer.
Definition locale.hpp:49
diff --git a/mapping_8hpp_source.html b/mapping_8hpp_source.html index 5358cbd9e..12edff454 100644 --- a/mapping_8hpp_source.html +++ b/mapping_8hpp_source.html @@ -134,7 +134,7 @@ $(function() { codefold.init(0); });
diff --git a/math_8cpp_source.html b/math_8cpp_source.html index 6f335691c..838e32e64 100644 --- a/math_8cpp_source.html +++ b/math_8cpp_source.html @@ -131,7 +131,7 @@ $(function() { codefold.init(0); });
diff --git a/math_8hpp_source.html b/math_8hpp_source.html index 4f8b8d355..262091472 100644 --- a/math_8hpp_source.html +++ b/math_8hpp_source.html @@ -169,7 +169,7 @@ $(function() { codefold.init(0); });
diff --git a/memory_8hpp_source.html b/memory_8hpp_source.html index 93af56283..5f82c557d 100644 --- a/memory_8hpp_source.html +++ b/memory_8hpp_source.html @@ -131,7 +131,7 @@ $(function() { codefold.init(0); });
diff --git a/parser_8cpp_source.html b/parser_8cpp_source.html index 0b6b313b1..a1a1b9a8b 100644 --- a/parser_8cpp_source.html +++ b/parser_8cpp_source.html @@ -92,501 +92,497 @@ $(function() { codefold.init(0); });
6#include "pch.hpp"
7
8using namespace std;
-
9using namespace stdex;
-
10using namespace stdex::parser;
-
11#ifdef _WIN32
-
12using namespace Microsoft::VisualStudio::CppUnitTestFramework;
-
13
-
14namespace Microsoft {
-
15 namespace VisualStudio {
-
16 namespace CppUnitTestFramework {
-
17 static std::wstring ToString(const stdex::interval<size_t>& q)
-
18 {
-
19 return stdex::sprintf(L"<%zu, %zu>", nullptr, q.start, q.end);
-
20 }
-
21 }
-
22 }
-
23}
-
24#endif
-
25
-
26namespace UnitTests
-
27{
-
28 TEST_CLASS(parser)
-
29 {
-
30 public:
- -
32 {
-
33 static const wchar_t text[] = L"This is a test.\nSecond line.";
-
34
-
35 {
-
36 wnoop p;
-
37 Assert::IsTrue(p.match(text));
-
38 Assert::AreEqual((size_t)0, p.interval.start);
-
39 Assert::AreEqual((size_t)0, p.interval.end);
-
40 }
-
41
-
42 {
-
43 wcu p(L't');
-
44 Assert::IsFalse(p.match(text));
-
45 Assert::IsTrue(p.match(text, 0, _countof(text), match_case_insensitive));
-
46 Assert::AreEqual((size_t)0, p.interval.start);
-
47 Assert::AreEqual((size_t)1, p.interval.end);
-
48 }
-
49
-
50 {
-
51 wspace_cu p;
-
52 Assert::IsFalse(p.match(text));
-
53 Assert::IsTrue(p.match(text, 4));
-
54 Assert::AreEqual((size_t)4, p.interval.start);
-
55 Assert::AreEqual((size_t)5, p.interval.end);
-
56 }
-
57
-
58 {
-
59 wpunct_cu p;
-
60 Assert::IsFalse(p.match(text));
-
61 Assert::IsTrue(p.match(text, 14));
-
62 Assert::AreEqual((size_t)14, p.interval.start);
-
63 Assert::AreEqual((size_t)15, p.interval.end);
-
64 }
-
65
-
66 {
- -
68 Assert::IsFalse(p.match(text));
-
69 Assert::IsTrue(p.match(text, 4));
-
70 Assert::AreEqual((size_t)4, p.interval.start);
-
71 Assert::AreEqual((size_t)5, p.interval.end);
-
72 Assert::IsTrue(p.match(text, 14));
-
73 Assert::AreEqual((size_t)14, p.interval.start);
-
74 Assert::AreEqual((size_t)15, p.interval.end);
-
75 }
-
76
-
77 {
-
78 wbol p;
-
79 Assert::IsTrue(p.match(text));
-
80 Assert::AreEqual((size_t)0, p.interval.start);
-
81 Assert::AreEqual((size_t)0, p.interval.end);
-
82 Assert::IsFalse(p.match(text, 1));
-
83 Assert::IsFalse(p.match(text, 15));
-
84 Assert::IsTrue(p.match(text, 16));
-
85 Assert::AreEqual((size_t)16, p.interval.start);
-
86 Assert::AreEqual((size_t)16, p.interval.end);
-
87 }
-
88
-
89 {
-
90 weol p;
-
91 Assert::IsFalse(p.match(text));
-
92 Assert::IsFalse(p.match(text, 1));
-
93 Assert::IsTrue(p.match(text, 15));
-
94 Assert::AreEqual((size_t)15, p.interval.start);
-
95 Assert::AreEqual((size_t)15, p.interval.end);
-
96 Assert::IsFalse(p.match(text, 16));
-
97 }
-
98
-
99 {
-
100 wcu_set p(L"abcD");
-
101 Assert::IsFalse(p.match(text));
-
102 Assert::IsTrue(p.match(text, 8));
-
103 Assert::AreEqual((size_t)8, p.interval.start);
-
104 Assert::AreEqual((size_t)9, p.interval.end);
-
105 Assert::AreEqual((size_t)0, p.hit_offset);
-
106 Assert::IsFalse(p.match(text, 21));
-
107 Assert::IsTrue(p.match(text, 21, _countof(text), match_case_insensitive));
-
108 Assert::AreEqual((size_t)21, p.interval.start);
-
109 Assert::AreEqual((size_t)22, p.interval.end);
-
110 Assert::AreEqual((size_t)3, p.hit_offset);
-
111 }
-
112
-
113 {
-
114 stdex::parser::wstring p(L"this");
-
115 Assert::IsFalse(p.match(text));
-
116 Assert::IsTrue(p.match(text, 0, sizeof(text), match_case_insensitive));
-
117 Assert::AreEqual((size_t)0, p.interval.start);
-
118 Assert::AreEqual((size_t)4, p.interval.end);
-
119 }
-
120
-
121 {
-
122 wany_cu chr;
-
123 witerations p(make_shared_no_delete(&chr), 1, 5);
-
124 Assert::IsTrue(p.match(text));
-
125 Assert::AreEqual((size_t)0, p.interval.start);
-
126 Assert::AreEqual((size_t)5, p.interval.end);
-
127 }
-
128
-
129 {
-
130 wspace_cu nospace(true);
-
131 witerations p(make_shared_no_delete(&nospace), 1);
-
132 Assert::IsTrue(p.match(text));
-
133 Assert::AreEqual((size_t)0, p.interval.start);
-
134 Assert::AreEqual((size_t)4, p.interval.end);
-
135 }
-
136
-
137 {
-
138 wcu chr_t(L't'), chr_h(L'h'), chr_i(L'i'), chr_s(L's');
-
139 wspace_cu space;
-
140 wsequence p({
-
141 make_shared_no_delete(&chr_t),
-
142 make_shared_no_delete(&chr_h),
-
143 make_shared_no_delete(&chr_i),
-
144 make_shared_no_delete(&chr_s),
-
145 make_shared_no_delete(&space) });
-
146 Assert::IsFalse(p.match(text));
-
147 Assert::IsTrue(p.match(text, 0, _countof(text), match_case_insensitive));
-
148 Assert::AreEqual((size_t)0, p.interval.start);
-
149 Assert::AreEqual((size_t)5, p.interval.end);
-
150 }
-
151
-
152 {
-
153 stdex::parser::wstring apple(L"apple"), orange(L"orange"), _this(L"this");
-
154 wspace_cu space;
-
155 wbranch p({
-
156 make_shared_no_delete(&apple),
-
157 make_shared_no_delete(&orange),
-
158 make_shared_no_delete(&_this),
-
159 make_shared_no_delete(&space) });
-
160 Assert::IsFalse(p.match(text));
-
161 Assert::IsTrue(p.match(text, 0, _countof(text), match_case_insensitive));
-
162 Assert::AreEqual((size_t)2, p.hit_offset);
-
163 Assert::AreEqual((size_t)0, p.interval.start);
-
164 Assert::AreEqual((size_t)4, p.interval.end);
-
165 }
-
166
-
167 {
-
168 wstring_branch p(L"apple", L"orange", L"this", nullptr);
-
169 Assert::IsFalse(p.match(text));
-
170 Assert::IsTrue(p.match(text, 0, _countof(text), match_case_insensitive));
-
171 Assert::AreEqual((size_t)2, p.hit_offset);
-
172 Assert::AreEqual((size_t)0, p.interval.start);
-
173 Assert::AreEqual((size_t)4, p.interval.end);
-
174 }
-
175
-
176 {
-
177 wcu chr_s(L's'), chr_h(L'h'), chr_i(L'i'), chr_t(L't');
-
178 wpermutation p({
-
179 make_shared_no_delete(&chr_s),
-
180 make_shared_no_delete(&chr_h),
-
181 make_shared_no_delete(&chr_i),
-
182 make_shared_no_delete(&chr_t) });
-
183 Assert::IsFalse(p.match(text));
-
184 Assert::IsTrue(p.match(text, 0, _countof(text), match_case_insensitive));
-
185 Assert::AreEqual((size_t)0, p.interval.start);
-
186 Assert::AreEqual((size_t)4, p.interval.end);
-
187 }
-
188
-
189 {
-
190 std::locale locale_slSI("sl_SI");
-
191 wspace_cu space(false, locale_slSI);
-
192 wiban p(make_shared_no_delete(&space), locale_slSI);
-
193 Assert::IsTrue(p.match(L"SI56023120015226972", 0, SIZE_MAX));
-
194 Assert::IsTrue(p.is_valid);
-
195 Assert::AreEqual(L"SI", p.country);
-
196 Assert::AreEqual(L"56", p.check_digits);
-
197 Assert::AreEqual(L"023120015226972", p.bban);
-
198 Assert::IsTrue(p.match(L"SI56 0231 2001 5226 972", 0, SIZE_MAX));
-
199 Assert::IsTrue(p.is_valid);
-
200 Assert::AreEqual(L"SI", p.country);
-
201 Assert::AreEqual(L"56", p.check_digits);
-
202 Assert::AreEqual(L"023120015226972", p.bban);
-
203 Assert::IsFalse(p.match(L"si56 0231 2001 5226 972", 0, SIZE_MAX));
-
204 Assert::IsFalse(p.is_valid);
-
205 Assert::IsTrue(p.match(L"si56 0231 2001 5226 972", 0, SIZE_MAX, match_case_insensitive));
-
206 Assert::IsTrue(p.is_valid);
-
207 Assert::IsTrue(p.match(L"SI56 0231 2001 5226 9720", 0, SIZE_MAX));
-
208 Assert::AreEqual(stdex::interval<size_t>(0, 23), p.interval);
+
9#ifdef _WIN32
+
10using namespace Microsoft::VisualStudio::CppUnitTestFramework;
+
11
+
12namespace Microsoft {
+
13 namespace VisualStudio {
+
14 namespace CppUnitTestFramework {
+
15 static wstring ToString(const stdex::interval<size_t>& q)
+
16 {
+
17 return stdex::sprintf(L"<%zu, %zu>", nullptr, q.start, q.end);
+
18 }
+
19 }
+
20 }
+
21}
+
22#endif
+
23
+
24namespace UnitTests
+
25{
+
26 TEST_CLASS(parser)
+
27 {
+
28 public:
+
29 TEST_METHOD(wtest)
+
30 {
+
31 static const wchar_t text[] = L"This is a test.\nSecond line.";
+
32
+
33 {
+ +
35 Assert::IsTrue(p.match(text));
+
36 Assert::AreEqual((size_t)0, p.interval.start);
+
37 Assert::AreEqual((size_t)0, p.interval.end);
+
38 }
+
39
+
40 {
+
41 stdex::parser::wcu p(L't');
+
42 Assert::IsFalse(p.match(text));
+
43 Assert::IsTrue(p.match(text, 0, _countof(text), stdex::parser::match_case_insensitive));
+
44 Assert::AreEqual((size_t)0, p.interval.start);
+
45 Assert::AreEqual((size_t)1, p.interval.end);
+
46 }
+
47
+
48 {
+ +
50 Assert::IsFalse(p.match(text));
+
51 Assert::IsTrue(p.match(text, 4));
+
52 Assert::AreEqual((size_t)4, p.interval.start);
+
53 Assert::AreEqual((size_t)5, p.interval.end);
+
54 }
+
55
+
56 {
+ +
58 Assert::IsFalse(p.match(text));
+
59 Assert::IsTrue(p.match(text, 14));
+
60 Assert::AreEqual((size_t)14, p.interval.start);
+
61 Assert::AreEqual((size_t)15, p.interval.end);
+
62 }
+
63
+
64 {
+ +
66 Assert::IsFalse(p.match(text));
+
67 Assert::IsTrue(p.match(text, 4));
+
68 Assert::AreEqual((size_t)4, p.interval.start);
+
69 Assert::AreEqual((size_t)5, p.interval.end);
+
70 Assert::IsTrue(p.match(text, 14));
+
71 Assert::AreEqual((size_t)14, p.interval.start);
+
72 Assert::AreEqual((size_t)15, p.interval.end);
+
73 }
+
74
+
75 {
+ +
77 Assert::IsTrue(p.match(text));
+
78 Assert::AreEqual((size_t)0, p.interval.start);
+
79 Assert::AreEqual((size_t)0, p.interval.end);
+
80 Assert::IsFalse(p.match(text, 1));
+
81 Assert::IsFalse(p.match(text, 15));
+
82 Assert::IsTrue(p.match(text, 16));
+
83 Assert::AreEqual((size_t)16, p.interval.start);
+
84 Assert::AreEqual((size_t)16, p.interval.end);
+
85 }
+
86
+
87 {
+ +
89 Assert::IsFalse(p.match(text));
+
90 Assert::IsFalse(p.match(text, 1));
+
91 Assert::IsTrue(p.match(text, 15));
+
92 Assert::AreEqual((size_t)15, p.interval.start);
+
93 Assert::AreEqual((size_t)15, p.interval.end);
+
94 Assert::IsFalse(p.match(text, 16));
+
95 }
+
96
+
97 {
+
98 stdex::parser::wcu_set p(L"abcD");
+
99 Assert::IsFalse(p.match(text));
+
100 Assert::IsTrue(p.match(text, 8));
+
101 Assert::AreEqual((size_t)8, p.interval.start);
+
102 Assert::AreEqual((size_t)9, p.interval.end);
+
103 Assert::AreEqual((size_t)0, p.hit_offset);
+
104 Assert::IsFalse(p.match(text, 21));
+
105 Assert::IsTrue(p.match(text, 21, _countof(text), stdex::parser::match_case_insensitive));
+
106 Assert::AreEqual((size_t)21, p.interval.start);
+
107 Assert::AreEqual((size_t)22, p.interval.end);
+
108 Assert::AreEqual((size_t)3, p.hit_offset);
+
109 }
+
110
+
111 {
+
112 stdex::parser::wstring p(L"this");
+
113 Assert::IsFalse(p.match(text));
+
114 Assert::IsTrue(p.match(text, 0, sizeof(text), stdex::parser::match_case_insensitive));
+
115 Assert::AreEqual((size_t)0, p.interval.start);
+
116 Assert::AreEqual((size_t)4, p.interval.end);
+
117 }
+
118
+
119 {
+ +
121 stdex::parser::witerations p(stdex::make_shared_no_delete(&chr), 1, 5);
+
122 Assert::IsTrue(p.match(text));
+
123 Assert::AreEqual((size_t)0, p.interval.start);
+
124 Assert::AreEqual((size_t)5, p.interval.end);
+
125 }
+
126
+
127 {
+
128 stdex::parser::wspace_cu nospace(true);
+
129 stdex::parser::witerations p(stdex::make_shared_no_delete(&nospace), 1);
+
130 Assert::IsTrue(p.match(text));
+
131 Assert::AreEqual((size_t)0, p.interval.start);
+
132 Assert::AreEqual((size_t)4, p.interval.end);
+
133 }
+
134
+
135 {
+
136 stdex::parser::wcu chr_t(L't'), chr_h(L'h'), chr_i(L'i'), chr_s(L's');
+ + +
139 stdex::make_shared_no_delete(&chr_t),
+
140 stdex::make_shared_no_delete(&chr_h),
+
141 stdex::make_shared_no_delete(&chr_i),
+
142 stdex::make_shared_no_delete(&chr_s),
+
143 stdex::make_shared_no_delete(&space) });
+
144 Assert::IsFalse(p.match(text));
+
145 Assert::IsTrue(p.match(text, 0, _countof(text), stdex::parser::match_case_insensitive));
+
146 Assert::AreEqual((size_t)0, p.interval.start);
+
147 Assert::AreEqual((size_t)5, p.interval.end);
+
148 }
+
149
+
150 {
+
151 stdex::parser::wstring apple(L"apple"), orange(L"orange"), _this(L"this");
+ + +
154 stdex::make_shared_no_delete(&apple),
+
155 stdex::make_shared_no_delete(&orange),
+
156 stdex::make_shared_no_delete(&_this),
+
157 stdex::make_shared_no_delete(&space) });
+
158 Assert::IsFalse(p.match(text));
+
159 Assert::IsTrue(p.match(text, 0, _countof(text), stdex::parser::match_case_insensitive));
+
160 Assert::AreEqual((size_t)2, p.hit_offset);
+
161 Assert::AreEqual((size_t)0, p.interval.start);
+
162 Assert::AreEqual((size_t)4, p.interval.end);
+
163 }
+
164
+
165 {
+
166 stdex::parser::wstring_branch p(L"apple", L"orange", L"this", nullptr);
+
167 Assert::IsFalse(p.match(text));
+
168 Assert::IsTrue(p.match(text, 0, _countof(text), stdex::parser::match_case_insensitive));
+
169 Assert::AreEqual((size_t)2, p.hit_offset);
+
170 Assert::AreEqual((size_t)0, p.interval.start);
+
171 Assert::AreEqual((size_t)4, p.interval.end);
+
172 }
+
173
+
174 {
+
175 stdex::parser::wcu chr_s(L's'), chr_h(L'h'), chr_i(L'i'), chr_t(L't');
+ +
177 stdex::make_shared_no_delete(&chr_s),
+
178 stdex::make_shared_no_delete(&chr_h),
+
179 stdex::make_shared_no_delete(&chr_i),
+
180 stdex::make_shared_no_delete(&chr_t) });
+
181 Assert::IsFalse(p.match(text));
+
182 Assert::IsTrue(p.match(text, 0, _countof(text), stdex::parser::match_case_insensitive));
+
183 Assert::AreEqual((size_t)0, p.interval.start);
+
184 Assert::AreEqual((size_t)4, p.interval.end);
+
185 }
+
186
+
187 {
+
188 std::locale locale_slSI("sl_SI");
+
189 stdex::parser::wspace_cu space(false, locale_slSI);
+
190 stdex::parser::wiban p(stdex::make_shared_no_delete(&space), locale_slSI);
+
191 Assert::IsTrue(p.match(L"SI56023120015226972", 0, SIZE_MAX));
+
192 Assert::IsTrue(p.is_valid);
+
193 Assert::AreEqual(L"SI", p.country);
+
194 Assert::AreEqual(L"56", p.check_digits);
+
195 Assert::AreEqual(L"023120015226972", p.bban);
+
196 Assert::IsTrue(p.match(L"SI56 0231 2001 5226 972", 0, SIZE_MAX));
+
197 Assert::IsTrue(p.is_valid);
+
198 Assert::AreEqual(L"SI", p.country);
+
199 Assert::AreEqual(L"56", p.check_digits);
+
200 Assert::AreEqual(L"023120015226972", p.bban);
+
201 Assert::IsFalse(p.match(L"si56 0231 2001 5226 972", 0, SIZE_MAX));
+
202 Assert::IsFalse(p.is_valid);
+
203 Assert::IsTrue(p.match(L"si56 0231 2001 5226 972", 0, SIZE_MAX, stdex::parser::match_case_insensitive));
+
204 Assert::IsTrue(p.is_valid);
+
205 Assert::IsTrue(p.match(L"SI56 0231 2001 5226 9720", 0, SIZE_MAX));
+
206 Assert::AreEqual(stdex::interval<size_t>(0, 23), p.interval);
+
207 Assert::IsTrue(p.is_valid);
+
208 Assert::IsTrue(p.match(L"...SI56 0231 2001 5226 972...", 3, SIZE_MAX));
209 Assert::IsTrue(p.is_valid);
-
210 Assert::IsTrue(p.match(L"...SI56 0231 2001 5226 972...", 3, SIZE_MAX));
+
210 Assert::IsTrue(p.match(L"SI56 0231 2001 5226 972", 0, SIZE_MAX)); // no-break space
211 Assert::IsTrue(p.is_valid);
-
212 Assert::IsTrue(p.match(L"SI56 0231 2001 5226 972", 0, SIZE_MAX)); // no-break space
-
213 Assert::IsTrue(p.is_valid);
-
214
-
215 Assert::IsTrue(p.match(L"BE71 0961 2345 6769", 0, SIZE_MAX));
+
212
+
213 Assert::IsTrue(p.match(L"BE71 0961 2345 6769", 0, SIZE_MAX));
+
214 Assert::IsTrue(p.is_valid);
+
215 Assert::IsTrue(p.match(L"BR15 0000 0000 0000 1093 2840 814 P2", 0, SIZE_MAX));
216 Assert::IsTrue(p.is_valid);
-
217 Assert::IsTrue(p.match(L"BR15 0000 0000 0000 1093 2840 814 P2", 0, SIZE_MAX));
-
218 Assert::IsTrue(p.is_valid);
-
219 Assert::IsTrue(p.match(L"CR99 0000 0000 0000 8888 88", 0, SIZE_MAX));
-
220 Assert::IsFalse(p.is_valid);
-
221 Assert::IsTrue(p.match(L"FR76 3000 6000 0112 3456 7890 189", 0, SIZE_MAX));
-
222 Assert::IsTrue(p.is_valid);
-
223 Assert::IsTrue(p.match(L"IE12 BOFI 9000 0112 3456 78", 0, SIZE_MAX));
-
224 Assert::IsFalse(p.is_valid);
-
225 Assert::IsTrue(p.match(L"DE91 1000 0000 0123 4567 89", 0, SIZE_MAX));
+
217 Assert::IsTrue(p.match(L"CR99 0000 0000 0000 8888 88", 0, SIZE_MAX));
+
218 Assert::IsFalse(p.is_valid);
+
219 Assert::IsTrue(p.match(L"FR76 3000 6000 0112 3456 7890 189", 0, SIZE_MAX));
+
220 Assert::IsTrue(p.is_valid);
+
221 Assert::IsTrue(p.match(L"IE12 BOFI 9000 0112 3456 78", 0, SIZE_MAX));
+
222 Assert::IsFalse(p.is_valid);
+
223 Assert::IsTrue(p.match(L"DE91 1000 0000 0123 4567 89", 0, SIZE_MAX));
+
224 Assert::IsTrue(p.is_valid);
+
225 Assert::IsTrue(p.match(L"GR96 0810 0010 0000 0123 4567 890", 0, SIZE_MAX));
226 Assert::IsTrue(p.is_valid);
-
227 Assert::IsTrue(p.match(L"GR96 0810 0010 0000 0123 4567 890", 0, SIZE_MAX));
+
227 Assert::IsTrue(p.match(L"MU43 BOMM 0101 1234 5678 9101 000 MUR", 0, SIZE_MAX));
228 Assert::IsTrue(p.is_valid);
-
229 Assert::IsTrue(p.match(L"MU43 BOMM 0101 1234 5678 9101 000 MUR", 0, SIZE_MAX));
+
229 Assert::IsTrue(p.match(L"PK70 BANK 0000 1234 5678 9000", 0, SIZE_MAX));
230 Assert::IsTrue(p.is_valid);
-
231 Assert::IsTrue(p.match(L"PK70 BANK 0000 1234 5678 9000", 0, SIZE_MAX));
+
231 Assert::IsTrue(p.match(L"PL10 1050 0099 7603 1234 5678 9123", 0, SIZE_MAX));
232 Assert::IsTrue(p.is_valid);
-
233 Assert::IsTrue(p.match(L"PL10 1050 0099 7603 1234 5678 9123", 0, SIZE_MAX));
+
233 Assert::IsTrue(p.match(L"RO09 BCYP 0000 0012 3456 7890", 0, SIZE_MAX));
234 Assert::IsTrue(p.is_valid);
-
235 Assert::IsTrue(p.match(L"RO09 BCYP 0000 0012 3456 7890", 0, SIZE_MAX));
+
235 Assert::IsTrue(p.match(L"LC14 BOSL 1234 5678 9012 3456 7890 1234", 0, SIZE_MAX));
236 Assert::IsTrue(p.is_valid);
-
237 Assert::IsTrue(p.match(L"LC14 BOSL 1234 5678 9012 3456 7890 1234", 0, SIZE_MAX));
+
237 Assert::IsTrue(p.match(L"SA44 2000 0001 2345 6789 1234", 0, SIZE_MAX));
238 Assert::IsTrue(p.is_valid);
-
239 Assert::IsTrue(p.match(L"SA44 2000 0001 2345 6789 1234", 0, SIZE_MAX));
+
239 Assert::IsTrue(p.match(L"ES79 2100 0813 6101 2345 6789", 0, SIZE_MAX));
240 Assert::IsTrue(p.is_valid);
-
241 Assert::IsTrue(p.match(L"ES79 2100 0813 6101 2345 6789", 0, SIZE_MAX));
-
242 Assert::IsTrue(p.is_valid);
-
243 Assert::IsTrue(p.match(L"SE87 3000 0000 0101 2345 6789", 0, SIZE_MAX));
-
244 Assert::IsFalse(p.is_valid);
-
245 Assert::IsTrue(p.match(L"CH56 0483 5012 3456 7800 9", 0, SIZE_MAX));
+
241 Assert::IsTrue(p.match(L"SE87 3000 0000 0101 2345 6789", 0, SIZE_MAX));
+
242 Assert::IsFalse(p.is_valid);
+
243 Assert::IsTrue(p.match(L"CH56 0483 5012 3456 7800 9", 0, SIZE_MAX));
+
244 Assert::IsTrue(p.is_valid);
+
245 Assert::IsTrue(p.match(L"GB98 MIDL 0700 9312 3456 78", 0, SIZE_MAX));
246 Assert::IsTrue(p.is_valid);
-
247 Assert::IsTrue(p.match(L"GB98 MIDL 0700 9312 3456 78", 0, SIZE_MAX));
-
248 Assert::IsTrue(p.is_valid);
-
249 }
-
250
-
251 {
-
252 std::locale locale_slSI("sl_SI");
-
253 wspace_cu space(false, locale_slSI);
-
254 wcreditor_reference p(make_shared_no_delete(&space), locale_slSI);
-
255 Assert::IsTrue(p.match(L"RF18539007547034", 0, SIZE_MAX));
-
256 Assert::IsTrue(p.is_valid);
-
257 Assert::AreEqual(L"18", p.check_digits);
-
258 Assert::AreEqual(L"000000000539007547034", p.reference);
-
259 Assert::IsTrue(p.match(L"RF18 5390 0754 7034", 0, SIZE_MAX));
-
260 Assert::IsTrue(p.is_valid);
-
261 Assert::AreEqual(L"18", p.check_digits);
-
262 Assert::AreEqual(L"000000000539007547034", p.reference);
-
263 Assert::IsFalse(p.match(L"rf18 5390 0754 7034", 0, SIZE_MAX));
-
264 Assert::IsFalse(p.is_valid);
-
265 Assert::IsTrue(p.match(L"rf18 5390 0754 7034", 0, SIZE_MAX, match_case_insensitive));
-
266 Assert::IsTrue(p.is_valid);
-
267 Assert::IsTrue(p.match(L"RF18 5390 0754 70340", 0, SIZE_MAX));
-
268 Assert::IsFalse(p.is_valid);
-
269 Assert::IsTrue(p.match(L"...RF18 5390 0754 7034...", 3, SIZE_MAX));
+
247 }
+
248
+
249 {
+
250 std::locale locale_slSI("sl_SI");
+
251 stdex::parser::wspace_cu space(false, locale_slSI);
+
252 stdex::parser::wcreditor_reference p(stdex::make_shared_no_delete(&space), locale_slSI);
+
253 Assert::IsTrue(p.match(L"RF18539007547034", 0, SIZE_MAX));
+
254 Assert::IsTrue(p.is_valid);
+
255 Assert::AreEqual(L"18", p.check_digits);
+
256 Assert::AreEqual(L"000000000539007547034", p.reference);
+
257 Assert::IsTrue(p.match(L"RF18 5390 0754 7034", 0, SIZE_MAX));
+
258 Assert::IsTrue(p.is_valid);
+
259 Assert::AreEqual(L"18", p.check_digits);
+
260 Assert::AreEqual(L"000000000539007547034", p.reference);
+
261 Assert::IsFalse(p.match(L"rf18 5390 0754 7034", 0, SIZE_MAX));
+
262 Assert::IsFalse(p.is_valid);
+
263 Assert::IsTrue(p.match(L"rf18 5390 0754 7034", 0, SIZE_MAX, stdex::parser::match_case_insensitive));
+
264 Assert::IsTrue(p.is_valid);
+
265 Assert::IsTrue(p.match(L"RF18 5390 0754 70340", 0, SIZE_MAX));
+
266 Assert::IsFalse(p.is_valid);
+
267 Assert::IsTrue(p.match(L"...RF18 5390 0754 7034...", 3, SIZE_MAX));
+
268 Assert::IsTrue(p.is_valid);
+
269 Assert::IsTrue(p.match(L"RF18 5390 0754 7034", 0, SIZE_MAX)); // no-break space
270 Assert::IsTrue(p.is_valid);
-
271 Assert::IsTrue(p.match(L"RF18 5390 0754 7034", 0, SIZE_MAX)); // no-break space
-
272 Assert::IsTrue(p.is_valid);
-
273 }
-
274
-
275 {
-
276 std::locale locale_slSI("sl_SI");
-
277 wspace_cu space(false, locale_slSI);
-
278 wsi_reference p(make_shared_no_delete(&space), locale_slSI);
-
279 Assert::IsTrue(p.match(L"SI121234567890120", 0, SIZE_MAX));
-
280 Assert::IsTrue(p.is_valid);
-
281 Assert::AreEqual(L"12", p.model);
-
282 Assert::AreEqual(stdex::interval<size_t>(4, 17), p.part1.interval);
-
283 Assert::IsTrue(p.match(L"SI12 1234567890120", 0, SIZE_MAX));
-
284 Assert::IsTrue(p.is_valid);
-
285 Assert::AreEqual(L"12", p.model);
-
286 Assert::AreEqual(stdex::interval<size_t>(5, 18), p.part1.interval);
-
287 Assert::IsFalse(p.match(L"si12 1234567890120", 0, SIZE_MAX));
-
288 Assert::IsTrue(p.match(L"si12 1234567890120", 0, SIZE_MAX, match_case_insensitive));
-
289 Assert::IsTrue(p.match(L"...SI12 1234567890120...", 3, SIZE_MAX));
-
290 Assert::IsTrue(p.match(L"SI12 1234567890120", 0, SIZE_MAX)); // no-break space
-
291 }
-
292 }
-
293
- -
295 {
-
296 std::locale locale_slSI("sl_SI");
-
297 static const char text[] = "V ko&zcaron;u&scaron;&ccaron;ku zlobnega mizarja stopiclja fant\nin kli&ccaron;e&nbsp;1234567890.";
-
298
-
299 {
-
300 sgml_noop p;
-
301 Assert::IsTrue(p.match(text));
-
302 Assert::AreEqual((size_t)0, p.interval.start);
-
303 Assert::AreEqual((size_t)0, p.interval.end);
-
304 }
-
305
-
306 {
-
307 sgml_cp p("v");
-
308 Assert::IsFalse(p.match(text));
-
309 Assert::IsTrue(p.match(text, 0, _countof(text), match_case_insensitive));
-
310 Assert::AreEqual((size_t)0, p.interval.start);
-
311 Assert::AreEqual((size_t)1, p.interval.end);
-
312 }
-
313
-
314 {
-
315 sgml_cp p("&Zcaron;", SIZE_MAX, false, locale_slSI);
-
316 Assert::IsFalse(p.match(text, 4));
-
317 Assert::IsTrue(p.match(text, 4, _countof(text), match_case_insensitive));
-
318 Assert::AreEqual((size_t)4, p.interval.start);
-
319 Assert::AreEqual((size_t)12, p.interval.end);
-
320 }
-
321
-
322 {
-
323 sgml_space_cp p(false, locale_slSI);
-
324 Assert::IsFalse(p.match(text));
-
325 Assert::IsTrue(p.match(text, 1));
-
326 Assert::AreEqual((size_t)1, p.interval.start);
-
327 Assert::AreEqual((size_t)2, p.interval.end);
-
328 Assert::IsTrue(p.match(text, 79));
-
329 Assert::AreEqual((size_t)79, p.interval.start);
-
330 Assert::AreEqual((size_t)85, p.interval.end);
-
331 }
-
332
-
333 {
-
334 sgml_string_branch p(locale_slSI, "apple", "orange", "Ko&Zcaron;u&Scaron;&ccaron;Ku", nullptr);
-
335 Assert::IsFalse(p.match(text, 2));
-
336 Assert::IsTrue(p.match(text, 2, _countof(text), match_case_insensitive));
-
337 Assert::AreEqual((size_t)2, p.hit_offset);
-
338 Assert::AreEqual((size_t)2, p.interval.start);
-
339 Assert::AreEqual((size_t)31, p.interval.end);
-
340 }
-
341
-
342 {
-
343 sgml_space_cp space(false, locale_slSI);
-
344 sgml_iban p(make_shared_no_delete(&space), locale_slSI);
-
345 Assert::IsTrue(p.match("SI56023120015226972", 0, SIZE_MAX));
-
346 Assert::IsTrue(p.is_valid);
-
347 Assert::AreEqual("SI", p.country);
-
348 Assert::AreEqual("56", p.check_digits);
-
349 Assert::AreEqual("023120015226972", p.bban);
-
350 Assert::IsTrue(p.match("SI56 0231 2001 5226 972", 0, SIZE_MAX));
-
351 Assert::IsTrue(p.is_valid);
-
352 Assert::AreEqual("SI", p.country);
-
353 Assert::AreEqual("56", p.check_digits);
-
354 Assert::AreEqual("023120015226972", p.bban);
-
355 Assert::IsFalse(p.match("si56 0231 2001 5226 972", 0, SIZE_MAX));
-
356 Assert::IsFalse(p.is_valid);
-
357 Assert::IsTrue(p.match("si56 0231 2001 5226 972", 0, SIZE_MAX, match_case_insensitive));
-
358 Assert::IsTrue(p.is_valid);
-
359 Assert::IsTrue(p.match("SI56 0231 2001 5226 9720", 0, SIZE_MAX));
-
360 Assert::AreEqual(stdex::interval<size_t>(0, 23), p.interval);
+
271 }
+
272
+
273 {
+
274 std::locale locale_slSI("sl_SI");
+
275 stdex::parser::wspace_cu space(false, locale_slSI);
+
276 stdex::parser::wsi_reference p(stdex::make_shared_no_delete(&space), locale_slSI);
+
277 Assert::IsTrue(p.match(L"SI121234567890120", 0, SIZE_MAX));
+
278 Assert::IsTrue(p.is_valid);
+
279 Assert::AreEqual(L"12", p.model);
+
280 Assert::AreEqual(stdex::interval<size_t>(4, 17), p.part1.interval);
+
281 Assert::IsTrue(p.match(L"SI12 1234567890120", 0, SIZE_MAX));
+
282 Assert::IsTrue(p.is_valid);
+
283 Assert::AreEqual(L"12", p.model);
+
284 Assert::AreEqual(stdex::interval<size_t>(5, 18), p.part1.interval);
+
285 Assert::IsFalse(p.match(L"si12 1234567890120", 0, SIZE_MAX));
+
286 Assert::IsTrue(p.match(L"si12 1234567890120", 0, SIZE_MAX, stdex::parser::match_case_insensitive));
+
287 Assert::IsTrue(p.match(L"...SI12 1234567890120...", 3, SIZE_MAX));
+
288 Assert::IsTrue(p.match(L"SI12 1234567890120", 0, SIZE_MAX)); // no-break space
+
289 }
+
290 }
+
291
+
292 TEST_METHOD(sgml_test)
+
293 {
+
294 std::locale locale_slSI("sl_SI");
+
295 static const char text[] = "V ko&zcaron;u&scaron;&ccaron;ku zlobnega mizarja stopiclja fant\nin kli&ccaron;e&nbsp;1234567890.";
+
296
+
297 {
+ +
299 Assert::IsTrue(p.match(text));
+
300 Assert::AreEqual((size_t)0, p.interval.start);
+
301 Assert::AreEqual((size_t)0, p.interval.end);
+
302 }
+
303
+
304 {
+ +
306 Assert::IsFalse(p.match(text));
+
307 Assert::IsTrue(p.match(text, 0, _countof(text), stdex::parser::match_case_insensitive));
+
308 Assert::AreEqual((size_t)0, p.interval.start);
+
309 Assert::AreEqual((size_t)1, p.interval.end);
+
310 }
+
311
+
312 {
+
313 stdex::parser::sgml_cp p("&Zcaron;", SIZE_MAX, false, locale_slSI);
+
314 Assert::IsFalse(p.match(text, 4));
+
315 Assert::IsTrue(p.match(text, 4, _countof(text), stdex::parser::match_case_insensitive));
+
316 Assert::AreEqual((size_t)4, p.interval.start);
+
317 Assert::AreEqual((size_t)12, p.interval.end);
+
318 }
+
319
+
320 {
+
321 stdex::parser::sgml_space_cp p(false, locale_slSI);
+
322 Assert::IsFalse(p.match(text));
+
323 Assert::IsTrue(p.match(text, 1));
+
324 Assert::AreEqual((size_t)1, p.interval.start);
+
325 Assert::AreEqual((size_t)2, p.interval.end);
+
326 Assert::IsTrue(p.match(text, 79));
+
327 Assert::AreEqual((size_t)79, p.interval.start);
+
328 Assert::AreEqual((size_t)85, p.interval.end);
+
329 }
+
330
+
331 {
+
332 stdex::parser::sgml_string_branch p(locale_slSI, "apple", "orange", "Ko&Zcaron;u&Scaron;&ccaron;Ku", nullptr);
+
333 Assert::IsFalse(p.match(text, 2));
+
334 Assert::IsTrue(p.match(text, 2, _countof(text), stdex::parser::match_case_insensitive));
+
335 Assert::AreEqual((size_t)2, p.hit_offset);
+
336 Assert::AreEqual((size_t)2, p.interval.start);
+
337 Assert::AreEqual((size_t)31, p.interval.end);
+
338 }
+
339
+
340 {
+
341 stdex::parser::sgml_space_cp space(false, locale_slSI);
+
342 stdex::parser::sgml_iban p(stdex::make_shared_no_delete(&space), locale_slSI);
+
343 Assert::IsTrue(p.match("SI56023120015226972", 0, SIZE_MAX));
+
344 Assert::IsTrue(p.is_valid);
+
345 Assert::AreEqual("SI", p.country);
+
346 Assert::AreEqual("56", p.check_digits);
+
347 Assert::AreEqual("023120015226972", p.bban);
+
348 Assert::IsTrue(p.match("SI56 0231 2001 5226 972", 0, SIZE_MAX));
+
349 Assert::IsTrue(p.is_valid);
+
350 Assert::AreEqual("SI", p.country);
+
351 Assert::AreEqual("56", p.check_digits);
+
352 Assert::AreEqual("023120015226972", p.bban);
+
353 Assert::IsFalse(p.match("si56 0231 2001 5226 972", 0, SIZE_MAX));
+
354 Assert::IsFalse(p.is_valid);
+
355 Assert::IsTrue(p.match("si56 0231 2001 5226 972", 0, SIZE_MAX, stdex::parser::match_case_insensitive));
+
356 Assert::IsTrue(p.is_valid);
+
357 Assert::IsTrue(p.match("SI56 0231 2001 5226 9720", 0, SIZE_MAX));
+
358 Assert::AreEqual(stdex::interval<size_t>(0, 23), p.interval);
+
359 Assert::IsTrue(p.is_valid);
+
360 Assert::IsTrue(p.match("...SI56 0231 2001 5226 972...", 3, SIZE_MAX));
361 Assert::IsTrue(p.is_valid);
-
362 Assert::IsTrue(p.match("...SI56 0231 2001 5226 972...", 3, SIZE_MAX));
+
362 Assert::IsTrue(p.match("SI56&nbsp;0231&nbsp;2001&nbsp;5226&nbsp;972", 0, SIZE_MAX));
363 Assert::IsTrue(p.is_valid);
-
364 Assert::IsTrue(p.match("SI56&nbsp;0231&nbsp;2001&nbsp;5226&nbsp;972", 0, SIZE_MAX));
-
365 Assert::IsTrue(p.is_valid);
-
366 }
-
367
-
368 {
-
369 sgml_space_cp space(false, locale_slSI);
-
370 sgml_creditor_reference p(make_shared_no_delete(&space), locale_slSI);
-
371 Assert::IsTrue(p.match("RF18539007547034", 0, SIZE_MAX));
-
372 Assert::IsTrue(p.is_valid);
-
373 Assert::AreEqual("18", p.check_digits);
-
374 Assert::AreEqual("000000000539007547034", p.reference);
-
375 Assert::IsTrue(p.match("RF18 5390 0754 7034", 0, SIZE_MAX));
-
376 Assert::IsTrue(p.is_valid);
-
377 Assert::AreEqual("18", p.check_digits);
-
378 Assert::AreEqual("000000000539007547034", p.reference);
-
379 Assert::IsFalse(p.match("rf18 5390 0754 7034", 0, SIZE_MAX));
-
380 Assert::IsFalse(p.is_valid);
-
381 Assert::IsTrue(p.match("rf18 5390 0754 7034", 0, SIZE_MAX, match_case_insensitive));
-
382 Assert::IsTrue(p.is_valid);
-
383 Assert::IsTrue(p.match("RF18 5390 0754 70340", 0, SIZE_MAX));
-
384 Assert::IsFalse(p.is_valid);
-
385 Assert::IsTrue(p.match("...RF18 5390 0754 7034...", 3, SIZE_MAX));
+
364 }
+
365
+
366 {
+
367 stdex::parser::sgml_space_cp space(false, locale_slSI);
+
368 stdex::parser::sgml_creditor_reference p(stdex::make_shared_no_delete(&space), locale_slSI);
+
369 Assert::IsTrue(p.match("RF18539007547034", 0, SIZE_MAX));
+
370 Assert::IsTrue(p.is_valid);
+
371 Assert::AreEqual("18", p.check_digits);
+
372 Assert::AreEqual("000000000539007547034", p.reference);
+
373 Assert::IsTrue(p.match("RF18 5390 0754 7034", 0, SIZE_MAX));
+
374 Assert::IsTrue(p.is_valid);
+
375 Assert::AreEqual("18", p.check_digits);
+
376 Assert::AreEqual("000000000539007547034", p.reference);
+
377 Assert::IsFalse(p.match("rf18 5390 0754 7034", 0, SIZE_MAX));
+
378 Assert::IsFalse(p.is_valid);
+
379 Assert::IsTrue(p.match("rf18 5390 0754 7034", 0, SIZE_MAX, stdex::parser::match_case_insensitive));
+
380 Assert::IsTrue(p.is_valid);
+
381 Assert::IsTrue(p.match("RF18 5390 0754 70340", 0, SIZE_MAX));
+
382 Assert::IsFalse(p.is_valid);
+
383 Assert::IsTrue(p.match("...RF18 5390 0754 7034...", 3, SIZE_MAX));
+
384 Assert::IsTrue(p.is_valid);
+
385 Assert::IsTrue(p.match("RF18&nbsp;5390&nbsp;0754&nbsp;7034", 0, SIZE_MAX));
386 Assert::IsTrue(p.is_valid);
-
387 Assert::IsTrue(p.match("RF18&nbsp;5390&nbsp;0754&nbsp;7034", 0, SIZE_MAX));
-
388 Assert::IsTrue(p.is_valid);
-
389 }
-
390
-
391 {
-
392 sgml_space_cp space(false, locale_slSI);
-
393 sgml_si_reference p(make_shared_no_delete(&space), locale_slSI);
-
394 Assert::IsTrue(p.match("SI121234567890120", 0, SIZE_MAX));
-
395 Assert::IsTrue(p.is_valid);
-
396 Assert::AreEqual("12", p.model);
-
397 Assert::AreEqual(stdex::interval<size_t>(4, 17), p.part1.interval);
-
398 Assert::IsTrue(p.match("SI12 1234567890120", 0, SIZE_MAX));
-
399 Assert::IsTrue(p.is_valid);
-
400 Assert::AreEqual("12", p.model);
-
401 Assert::AreEqual(stdex::interval<size_t>(5, 18), p.part1.interval);
-
402 Assert::IsFalse(p.match("si12 1234567890120", 0, SIZE_MAX));
-
403 Assert::IsTrue(p.match("si12 1234567890120", 0, SIZE_MAX, match_case_insensitive));
-
404 Assert::IsTrue(p.match("...SI12 1234567890120...", 3, SIZE_MAX));
-
405 Assert::IsTrue(p.match("SI12&nbsp;1234567890120", 0, SIZE_MAX));
-
406 }
-
407 }
-
408
- -
410 {
-
411 static const std::locale locale("en_US.UTF-8");
-
412 static const char request[] =
-
413 "GET / HTTP/2\r\n"
-
414 "Host: stackoverflow.com\r\n"
-
415 "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0\r\n"
-
416 "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8\r\n"
-
417 "Accept-Language: sl,en-US;q=0.8,en;q=0.6,de-DE;q=0.4,de;q=0.2\r\n"
-
418 "Accept-Encoding: gzip, deflate, br\r\n"
-
419 "DNT: 1\r\n"
-
420 "Connection: keep-alive\r\n"
-
421 "Cookie: prov=00000000-0000-0000-0000-000000000000; acct=t=00000000000000000%2f%2f0000%2b0000%2b000&s=00000000000000000000000000000000; OptanonConsent=isGpcEnabled=0&datestamp=Fri+Feb+03+2023+11%3A11%3A08+GMT%2B0100+(Srednjeevropski+standardni+%C4%8Das)&version=6.37.0&isIABGlobal=false&hosts=&consentId=00000000-0000-0000-0000-000000000000&interactionCount=1&landingPath=NotLandingPage&groups=00000%3A0%2C00000%3A0%2C00000%3A0%2C00000%3A0; OptanonAlertBoxClosed=2023-02-03T10:11:08.683Z\r\n"
-
422 "Upgrade-Insecure-Requests: 1\r\n"
-
423 "Sec-Fetch-Dest: document\r\n"
-
424 "Sec-Fetch-Mode: navigate\r\n"
-
425 "Sec-Fetch-Site: none\r\n"
-
426 "Sec-Fetch-User: ?1\r\n"
-
427 "Pragma: no-cache\r\n"
-
428 "Cache-Control: no-cache\r\n"
-
429 "\r\n";
-
430
-
431 {
- -
433 Assert::IsTrue(p.match(request));
-
434 Assert::AreEqual((size_t)0, p.interval.start);
-
435 Assert::AreEqual((size_t)14, p.interval.end);
-
436 Assert::AreEqual((size_t)0, p.verb.start);
-
437 Assert::AreEqual((size_t)3, p.verb.end);
-
438 Assert::AreEqual((size_t)4, p.url.interval.start);
-
439 Assert::AreEqual((size_t)5, p.url.interval.end);
-
440 Assert::AreEqual((size_t)6, p.protocol.interval.start);
-
441 Assert::AreEqual((size_t)12, p.protocol.interval.end);
-
442 Assert::AreEqual((uint16_t)0x200, p.protocol.version);
-
443 }
-
444
-
445 {
-
446 std::list<http_header> hdrs;
-
447 size_t offset = 14;
-
448 for (;;) {
- -
450 if (h.match(request, offset)) {
- -
452 hdrs.push_back(std::move(h));
-
453 }
-
454 else
-
455 break;
-
456 }
-
457 Assert::AreEqual((size_t)15, hdrs.size());
- -
459 for (const auto& h : hdrs)
-
460 if (strnicmp(request + h.name.start, h.name.size(), "Accept-Language", SIZE_MAX, locale) == 0)
-
461 langs.insert(request, h.value.start, h.value.end);
-
462 Assert::IsTrue(!langs.empty());
-
463 {
- -
465 "sl", "en-US", "en", "de-DE", "de"
-
466 };
-
467 auto c = control.cbegin();
-
468 auto l = langs.cbegin();
-
469 for (; c != control.cend() && l != langs.cend(); ++c, ++l)
-
470 Assert::IsTrue(strnicmp(request + l->value.interval.start, l->value.interval.size(), c->c_str(), c->size(), locale) == 0);
-
471 Assert::IsTrue(c == control.cend());
-
472 Assert::IsTrue(l == langs.cend());
-
473 }
-
474 }
-
475
-
476 //static const char response[] =
-
477 // "HTTP/2 200 OK\r\n"
-
478 // "cache-control: private\r\n"
-
479 // "content-type: text/html; charset=utf-8\r\n"
-
480 // "content-encoding: gzip\r\n"
-
481 // "strict-transport-security: max-age=15552000\r\n"
-
482 // "x-frame-options: SAMEORIGIN\r\n"
-
483 // "set-cookie: acct=t=00000000000000000%2f%2f0000%2b0000%2b000&s=00000000000000000000000000000000; expires=Sat, 16 Sep 2023 10:23:00 GMT; domain=.stackoverflow.com; path=/; secure; samesite=none; httponly\r\n"
-
484 // "set-cookie: prov_tgt=; expires=Tue, 14 Mar 2023 10:23:00 GMT; domain=.stackoverflow.com; path=/; secure; samesite=none; httponly\r\n"
-
485 // "x-request-guid: a6536a49-b473-4c6f-b313-c1e7c0d8f600\r\n"
-
486 // "feature-policy: microphone 'none'; speaker 'none'\r\n"
-
487 // "content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com\r\n"
-
488 // "accept-ranges: bytes\r\n"
-
489 // "date: Thu, 16 Mar 2023 10:23:00 GMT\r\n"
-
490 // "via: 1.1 varnish\r\n"
-
491 // "x-served-by: cache-vie6354-VIE\r\n"
-
492 // "x-cache: MISS\r\n"
-
493 // "x-cache-hits: 0\r\n"
-
494 // "x-timer: S1678962181.533907,VS0,VE144\r\n"
-
495 // "vary: Accept-Encoding,Fastly-SSL\r\n"
-
496 // "x-dns-prefetch-control: off\r\n"
-
497 // "X-Firefox-Spdy: h2\r\n"
-
498 // "\r\n";
-
499 }
-
500 };
-
501}
-
locale_t helper class to free_locale when going out of scope.
Definition locale.hpp:69
- +
387 }
+
388
+
389 {
+
390 stdex::parser::sgml_space_cp space(false, locale_slSI);
+
391 stdex::parser::sgml_si_reference p(stdex::make_shared_no_delete(&space), locale_slSI);
+
392 Assert::IsTrue(p.match("SI121234567890120", 0, SIZE_MAX));
+
393 Assert::IsTrue(p.is_valid);
+
394 Assert::AreEqual("12", p.model);
+
395 Assert::AreEqual(stdex::interval<size_t>(4, 17), p.part1.interval);
+
396 Assert::IsTrue(p.match("SI12 1234567890120", 0, SIZE_MAX));
+
397 Assert::IsTrue(p.is_valid);
+
398 Assert::AreEqual("12", p.model);
+
399 Assert::AreEqual(stdex::interval<size_t>(5, 18), p.part1.interval);
+
400 Assert::IsFalse(p.match("si12 1234567890120", 0, SIZE_MAX));
+
401 Assert::IsTrue(p.match("si12 1234567890120", 0, SIZE_MAX, stdex::parser::match_case_insensitive));
+
402 Assert::IsTrue(p.match("...SI12 1234567890120...", 3, SIZE_MAX));
+
403 Assert::IsTrue(p.match("SI12&nbsp;1234567890120", 0, SIZE_MAX));
+
404 }
+
405 }
+
406
+
407 TEST_METHOD(http_test)
+
408 {
+
409 static const std::locale locale("en_US.UTF-8");
+
410 static const char request[] =
+
411 "GET / HTTP/2\r\n"
+
412 "Host: stackoverflow.com\r\n"
+
413 "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0\r\n"
+
414 "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8\r\n"
+
415 "Accept-Language: sl,en-US;q=0.8,en;q=0.6,de-DE;q=0.4,de;q=0.2\r\n"
+
416 "Accept-Encoding: gzip, deflate, br\r\n"
+
417 "DNT: 1\r\n"
+
418 "Connection: keep-alive\r\n"
+
419 "Cookie: prov=00000000-0000-0000-0000-000000000000; acct=t=00000000000000000%2f%2f0000%2b0000%2b000&s=00000000000000000000000000000000; OptanonConsent=isGpcEnabled=0&datestamp=Fri+Feb+03+2023+11%3A11%3A08+GMT%2B0100+(Srednjeevropski+standardni+%C4%8Das)&version=6.37.0&isIABGlobal=false&hosts=&consentId=00000000-0000-0000-0000-000000000000&interactionCount=1&landingPath=NotLandingPage&groups=00000%3A0%2C00000%3A0%2C00000%3A0%2C00000%3A0; OptanonAlertBoxClosed=2023-02-03T10:11:08.683Z\r\n"
+
420 "Upgrade-Insecure-Requests: 1\r\n"
+
421 "Sec-Fetch-Dest: document\r\n"
+
422 "Sec-Fetch-Mode: navigate\r\n"
+
423 "Sec-Fetch-Site: none\r\n"
+
424 "Sec-Fetch-User: ?1\r\n"
+
425 "Pragma: no-cache\r\n"
+
426 "Cache-Control: no-cache\r\n"
+
427 "\r\n";
+
428
+
429 {
+ +
431 Assert::IsTrue(p.match(request));
+
432 Assert::AreEqual((size_t)0, p.interval.start);
+
433 Assert::AreEqual((size_t)14, p.interval.end);
+
434 Assert::AreEqual((size_t)0, p.verb.start);
+
435 Assert::AreEqual((size_t)3, p.verb.end);
+
436 Assert::AreEqual((size_t)4, p.url.interval.start);
+
437 Assert::AreEqual((size_t)5, p.url.interval.end);
+
438 Assert::AreEqual((size_t)6, p.protocol.interval.start);
+
439 Assert::AreEqual((size_t)12, p.protocol.interval.end);
+
440 Assert::AreEqual((uint16_t)0x200, p.protocol.version);
+
441 }
+
442
+
443 {
+
444 list<stdex::parser::http_header> hdrs;
+
445 size_t offset = 14;
+
446 for (;;) {
+ +
448 if (h.match(request, offset)) {
+
449 offset = h.interval.end;
+
450 hdrs.push_back(std::move(h));
+
451 }
+
452 else
+
453 break;
+
454 }
+
455 Assert::AreEqual((size_t)15, hdrs.size());
+ +
457 for (const auto& h : hdrs)
+
458 if (stdex::strnicmp(request + h.name.start, h.name.size(), "Accept-Language", SIZE_MAX, locale) == 0)
+
459 langs.insert(request, h.value.start, h.value.end);
+
460 Assert::IsTrue(!langs.empty());
+
461 {
+
462 const vector<string> control = {
+
463 "sl", "en-US", "en", "de-DE", "de"
+
464 };
+
465 auto c = control.cbegin();
+
466 auto l = langs.cbegin();
+
467 for (; c != control.cend() && l != langs.cend(); ++c, ++l)
+
468 Assert::IsTrue(stdex::strnicmp(request + l->value.interval.start, l->value.interval.size(), c->c_str(), c->size(), locale) == 0);
+
469 Assert::IsTrue(c == control.cend());
+
470 Assert::IsTrue(l == langs.cend());
+
471 }
+
472 }
+
473
+
474 //static const char response[] =
+
475 // "HTTP/2 200 OK\r\n"
+
476 // "cache-control: private\r\n"
+
477 // "content-type: text/html; charset=utf-8\r\n"
+
478 // "content-encoding: gzip\r\n"
+
479 // "strict-transport-security: max-age=15552000\r\n"
+
480 // "x-frame-options: SAMEORIGIN\r\n"
+
481 // "set-cookie: acct=t=00000000000000000%2f%2f0000%2b0000%2b000&s=00000000000000000000000000000000; expires=Sat, 16 Sep 2023 10:23:00 GMT; domain=.stackoverflow.com; path=/; secure; samesite=none; httponly\r\n"
+
482 // "set-cookie: prov_tgt=; expires=Tue, 14 Mar 2023 10:23:00 GMT; domain=.stackoverflow.com; path=/; secure; samesite=none; httponly\r\n"
+
483 // "x-request-guid: a6536a49-b473-4c6f-b313-c1e7c0d8f600\r\n"
+
484 // "feature-policy: microphone 'none'; speaker 'none'\r\n"
+
485 // "content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com\r\n"
+
486 // "accept-ranges: bytes\r\n"
+
487 // "date: Thu, 16 Mar 2023 10:23:00 GMT\r\n"
+
488 // "via: 1.1 varnish\r\n"
+
489 // "x-served-by: cache-vie6354-VIE\r\n"
+
490 // "x-cache: MISS\r\n"
+
491 // "x-cache-hits: 0\r\n"
+
492 // "x-timer: S1678962181.533907,VS0,VE144\r\n"
+
493 // "vary: Accept-Encoding,Fastly-SSL\r\n"
+
494 // "x-dns-prefetch-control: off\r\n"
+
495 // "X-Firefox-Spdy: h2\r\n"
+
496 // "\r\n";
+
497 }
+
498 };
+
499}
stdex::interval< size_t > interval
Region of the last match.
Definition parser.hpp:116
Test for given string.
Definition parser.hpp:831
Test for HTTP header.
Definition parser.hpp:7069
@@ -594,13 +590,11 @@ $(function() { codefold.init(0); });
Test for specific SGML code point.
Definition parser.hpp:353
Test for any SGML space code point.
Definition parser.hpp:440
Numerical interval.
Definition interval.hpp:18
-
T size() const
Returns interval size.
Definition interval.hpp:47
T end
interval end
Definition interval.hpp:20
-
T start
interval start
Definition interval.hpp:19
diff --git a/parser_8hpp_source.html b/parser_8hpp_source.html index a8c7f5ea9..56fc26d1b 100644 --- a/parser_8hpp_source.html +++ b/parser_8hpp_source.html @@ -7346,7 +7346,7 @@ $(function() { codefold.init(0); });
7371 virtual void invalidate()
7372 {
7373 this->content.invalidate();
-
7374 basic_parser::invalidate();
+
7375 }
7376
@@ -7478,7 +7478,7 @@ $(function() { codefold.init(0); });
7506 virtual void invalidate()
7507 {
7508 this->content.invalidate();
-
7509 basic_parser::invalidate();
+
7510 }
7511
@@ -7544,7 +7544,7 @@ $(function() { codefold.init(0); });
7573 virtual void invalidate()
7574 {
7575 this->content.invalidate();
-
7576 basic_parser::invalidate();
+
7577 }
7578
@@ -7569,7 +7569,7 @@ $(function() { codefold.init(0); });
7598 this->interval.end = this->interval.end + 4;
7599
7600 // Skip whitespace.
-
7601 const auto& ctype = std::use_facet<std::ctype<T>>(m_locale);
+
7601 const auto& ctype = std::use_facet<std::ctype<T>>(this->m_locale);
7602 for (; this->interval.end < end && text[this->interval.end] && ctype.is(ctype.space, text[this->interval.end]); this->interval.end++);
7603
7604 if (this->interval.end < end &&
@@ -7653,7 +7653,7 @@ $(function() { codefold.init(0); });
7683 virtual void invalidate()
7684 {
7685 this->content.invalidate();
-
7686 basic_parser::invalidate();
+
7687 }
7688
@@ -7681,7 +7681,7 @@ $(function() { codefold.init(0); });
7711 this->interval.end = this->interval.end + 7;
7712
7713 // Skip whitespace.
-
7714 const auto& ctype = std::use_facet<std::ctype<T>>(m_locale);
+
7714 const auto& ctype = std::use_facet<std::ctype<T>>(this->m_locale);
7715 for (; this->interval.end < end && text[this->interval.end] && ctype.is(ctype.space, text[this->interval.end]); this->interval.end++);
7716
7717 if (this->interval.end < end &&
@@ -7738,7 +7738,7 @@ $(function() { codefold.init(0); });
7769 this->base_type.invalidate();
7770 this->sub_type.invalidate();
7771 this->charset.invalidate();
-
7772 basic_parser::invalidate();
+
7773 }
7774
@@ -7753,7 +7753,7 @@ $(function() { codefold.init(0); });
7784 _In_ int flags = match_multiline)
7785 {
7786 _Unreferenced_(flags);
-
7787 const auto& ctype = std::use_facet<std::ctype<T>>(m_locale);
+
7787 const auto& ctype = std::use_facet<std::ctype<T>>(this->m_locale);
7788
7789 this->interval.end = start;
7790 this->base_type.start = this->interval.end;
@@ -7872,7 +7872,7 @@ $(function() { codefold.init(0); });
7904 _In_ int flags = match_default)
7905 {
7906 _Unreferenced_(flags);
-
7907 const auto& ctype = std::use_facet<std::ctype<T>>(m_locale);
+
7907 const auto& ctype = std::use_facet<std::ctype<T>>(this->m_locale);
7908 this->interval.end = start;
7909 for (;;) {
7910 _Assume_(text || this->interval.end >= end);
@@ -7886,7 +7886,7 @@ $(function() { codefold.init(0); });
7918 }
7919 if (text[this->interval.end] == '>' ||
7920 text[this->interval.end] == '=' ||
-
7921 text[this->interval.end] == '/' && this->interval.end + 1 < end && text[this->interval.end + 1] == '>' ||
+
7921 (text[this->interval.end] == '/' && this->interval.end + 1 < end && text[this->interval.end + 1] == '>') ||
7922 ctype.is(ctype.space, text[this->interval.end]))
7923 {
7924 this->interval.start = start;
@@ -7914,7 +7914,7 @@ $(function() { codefold.init(0); });
7947 virtual void invalidate()
7948 {
7949 this->content.invalidate();
-
7950 basic_parser::invalidate();
+
7951 }
7952
@@ -7955,7 +7955,7 @@ $(function() { codefold.init(0); });
7988
7989 // Nonquoted
7990 this->content.start = this->interval.end;
-
7991 const auto& ctype = std::use_facet<std::ctype<T>>(m_locale);
+
7991 const auto& ctype = std::use_facet<std::ctype<T>>(this->m_locale);
7992 for (;;) {
7993 _Assume_(text || this->interval.end >= end);
7994 if (this->interval.end >= end || !text[this->interval.end]) {
@@ -7964,7 +7964,7 @@ $(function() { codefold.init(0); });
7997 return true;
7998 }
7999 if (text[this->interval.end] == '>' ||
-
8000 text[this->interval.end] == '/' && this->interval.end + 1 < end && text[this->interval.end + 1] == '>' ||
+
8000 (text[this->interval.end] == '/' && this->interval.end + 1 < end && text[this->interval.end + 1] == '>') ||
8001 ctype.is(ctype.space, text[this->interval.end]))
8002 {
8003 this->content.end = this->interval.end;
@@ -8012,7 +8012,7 @@ $(function() { codefold.init(0); });
8050 {
8051 public:
8052 basic_html_tag(_In_ const std::locale& locale = std::locale()) :
- +
8054 type(html_sequence_t::unknown)
8055 {}
8056
@@ -8021,7 +8021,7 @@ $(function() { codefold.init(0); });
8059 this->type = html_sequence_t::unknown;
8060 this->name.invalidate();
8061 this->attributes.clear();
-
8062 basic_parser::invalidate();
+
8063 }
8064
8065 html_sequence_t type;
@@ -8119,237 +8119,239 @@ $(function() { codefold.init(0); });
8157 else
8158 goto error;
8159
-
8160 // Skip whitespace.
-
8161 const auto& ctype = std::use_facet<std::ctype<T>>(m_locale);
-
8162 for (; this->interval.end < end && text[this->interval.end] && ctype.is(ctype.space, text[this->interval.end]); this->interval.end++);
-
8163
-
8164 this->attributes.clear();
-
8165 for (;;) {
-
8166 if (this->type == html_sequence_t::element_start &&
-
8167 this->interval.end + 1 < end &&
-
8168 text[this->interval.end] == '/' &&
-
8169 text[this->interval.end + 1] == '>')
-
8170 {
-
8171 // <tag .../>
-
8172 this->type = html_sequence_t::element;
-
8173 this->interval.end = this->interval.end + 2;
-
8174 break;
-
8175 }
-
8176 if (this->interval.end < end &&
-
8177 text[this->interval.end] == '>')
-
8178 {
-
8179 // <tag ...>
-
8180 this->interval.end++;
-
8181 break;
-
8182 }
-
8183 if (this->type == html_sequence_t::declaration &&
-
8184 this->interval.end + 1 < end &&
-
8185 text[this->interval.end] == '!' &&
-
8186 text[this->interval.end + 1] == '>')
-
8187 {
-
8188 // "<!...!>".
-
8189 this->interval.end = this->interval.end + 2;
-
8190 break;
-
8191 }
-
8192 if (this->type == html_sequence_t::declaration &&
-
8193 this->interval.end + 1 < end &&
-
8194 text[this->interval.end] == '-' &&
-
8195 text[this->interval.end + 1] == '-')
-
8196 {
-
8197 // "<! ... --...".
-
8198 this->interval.end = this->interval.end + 2;
-
8199 for (;;) {
-
8200 if (this->interval.end >= end || !text[this->interval.end])
-
8201 goto error;
-
8202 if (this->interval.end + 1 < end &&
-
8203 text[this->interval.end] == '-' &&
-
8204 text[this->interval.end + 1] == '-')
-
8205 {
-
8206 // "<! ... --...--".
-
8207 this->interval.end = this->interval.end + 2;
-
8208 break;
-
8209 }
-
8210 this->interval.end++;
-
8211 }
-
8212
-
8213 // Skip whitespace.
-
8214 for (; this->interval.end < end && text[this->interval.end] && ctype.is(ctype.space, text[this->interval.end]); this->interval.end++);
-
8215 continue;
-
8216 }
-
8217
-
8218 if (this->interval.end >= end || !text[this->interval.end])
-
8219 goto error;
-
8220
-
8221 // Attributes follow...
-
8222 html_attribute* a = nullptr;
-
8223 if (this->m_ident.match(text, this->interval.end, end, flags)) {
-
8224 this->attributes.push_back(std::move(html_attribute{ this->m_ident.interval }));
-
8225 a = &this->attributes.back();
-
8226 _Assume_(a);
-
8227 this->interval.end = this->m_ident.interval.end;
-
8228 }
-
8229 else {
-
8230 // What was that?! Skip.
-
8231 this->interval.end++;
-
8232 continue;
-
8233 }
-
8234
-
8235 // Skip whitespace.
-
8236 for (; this->interval.end < end && text[this->interval.end] && ctype.is(ctype.space, text[this->interval.end]); this->interval.end++);
-
8237
-
8238 if (this->interval.end < end && text[this->interval.end] == '=') {
-
8239 this->interval.end++;
-
8240
-
8241 // Skip whitespace.
-
8242 for (; this->interval.end < end && text[this->interval.end] && ctype.is(ctype.space, text[this->interval.end]); this->interval.end++);
-
8243
-
8244 if (this->m_value.match(text, this->interval.end, end, flags)) {
-
8245 // This attribute has value.
-
8246 a->value = this->m_value.content;
-
8247 this->interval.end = this->m_value.interval.end;
-
8248
-
8249 // Skip whitespace.
-
8250 for (; this->interval.end < end && text[this->interval.end] && ctype.is(ctype.space, text[this->interval.end]); this->interval.end++);
-
8251 }
-
8252 }
-
8253 else {
-
8254 // This attribute has no value.
-
8255 a->value.invalidate();
-
8256 }
-
8257 }
-
8258
-
8259 this->interval.start = start;
-
8260 return true;
-
8261
-
8262 error:
-
8263 invalidate();
-
8264 return false;
-
8265 }
-
8266
-
8267 basic_html_ident<T> m_ident;
-
8268 basic_html_value<T> m_value;
-
8269 };
+
8160 {
+
8161 // Skip whitespace.
+
8162 const auto& ctype = std::use_facet<std::ctype<T>>(this->m_locale);
+
8163 for (; this->interval.end < end && text[this->interval.end] && ctype.is(ctype.space, text[this->interval.end]); this->interval.end++);
+
8164
+
8165 this->attributes.clear();
+
8166 for (;;) {
+
8167 if (this->type == html_sequence_t::element_start &&
+
8168 this->interval.end + 1 < end &&
+
8169 text[this->interval.end] == '/' &&
+
8170 text[this->interval.end + 1] == '>')
+
8171 {
+
8172 // <tag .../>
+
8173 this->type = html_sequence_t::element;
+
8174 this->interval.end = this->interval.end + 2;
+
8175 break;
+
8176 }
+
8177 if (this->interval.end < end &&
+
8178 text[this->interval.end] == '>')
+
8179 {
+
8180 // <tag ...>
+
8181 this->interval.end++;
+
8182 break;
+
8183 }
+
8184 if (this->type == html_sequence_t::declaration &&
+
8185 this->interval.end + 1 < end &&
+
8186 text[this->interval.end] == '!' &&
+
8187 text[this->interval.end + 1] == '>')
+
8188 {
+
8189 // "<!...!>".
+
8190 this->interval.end = this->interval.end + 2;
+
8191 break;
+
8192 }
+
8193 if (this->type == html_sequence_t::declaration &&
+
8194 this->interval.end + 1 < end &&
+
8195 text[this->interval.end] == '-' &&
+
8196 text[this->interval.end + 1] == '-')
+
8197 {
+
8198 // "<! ... --...".
+
8199 this->interval.end = this->interval.end + 2;
+
8200 for (;;) {
+
8201 if (this->interval.end >= end || !text[this->interval.end])
+
8202 goto error;
+
8203 if (this->interval.end + 1 < end &&
+
8204 text[this->interval.end] == '-' &&
+
8205 text[this->interval.end + 1] == '-')
+
8206 {
+
8207 // "<! ... --...--".
+
8208 this->interval.end = this->interval.end + 2;
+
8209 break;
+
8210 }
+
8211 this->interval.end++;
+
8212 }
+
8213
+
8214 // Skip whitespace.
+
8215 for (; this->interval.end < end && text[this->interval.end] && ctype.is(ctype.space, text[this->interval.end]); this->interval.end++);
+
8216 continue;
+
8217 }
+
8218
+
8219 if (this->interval.end >= end || !text[this->interval.end])
+
8220 goto error;
+
8221
+
8222 // Attributes follow...
+
8223 html_attribute* a = nullptr;
+
8224 if (this->m_ident.match(text, this->interval.end, end, flags)) {
+
8225 this->attributes.push_back(std::move(html_attribute{ this->m_ident.interval }));
+
8226 a = &this->attributes.back();
+
8227 _Assume_(a);
+
8228 this->interval.end = this->m_ident.interval.end;
+
8229 }
+
8230 else {
+
8231 // What was that?! Skip.
+
8232 this->interval.end++;
+
8233 continue;
+
8234 }
+
8235
+
8236 // Skip whitespace.
+
8237 for (; this->interval.end < end && text[this->interval.end] && ctype.is(ctype.space, text[this->interval.end]); this->interval.end++);
+
8238
+
8239 if (this->interval.end < end && text[this->interval.end] == '=') {
+
8240 this->interval.end++;
+
8241
+
8242 // Skip whitespace.
+
8243 for (; this->interval.end < end && text[this->interval.end] && ctype.is(ctype.space, text[this->interval.end]); this->interval.end++);
+
8244
+
8245 if (this->m_value.match(text, this->interval.end, end, flags)) {
+
8246 // This attribute has value.
+
8247 a->value = this->m_value.content;
+
8248 this->interval.end = this->m_value.interval.end;
+
8249
+
8250 // Skip whitespace.
+
8251 for (; this->interval.end < end && text[this->interval.end] && ctype.is(ctype.space, text[this->interval.end]); this->interval.end++);
+
8252 }
+
8253 }
+
8254 else {
+
8255 // This attribute has no value.
+
8256 a->value.invalidate();
+
8257 }
+
8258 }
+
8259 }
+
8260
+
8261 this->interval.start = start;
+
8262 return true;
+
8263
+
8264 error:
+
8265 invalidate();
+
8266 return false;
+
8267 }
+
8268
+
8269 basic_html_ident<T> m_ident;
+
8270 basic_html_value<T> m_value;
+
8271 };
-
8270
-
8271 using html_tag = basic_html_tag<char>;
-
8272 using whtml_tag = basic_html_tag<wchar_t>;
-
8273#ifdef _UNICODE
-
8274 using thtml_tag = whtml_tag;
-
8275#else
-
8276 using thtml_tag = html_tag;
-
8277#endif
-
8278
-
8282 template <class T>
-
- -
8284 {
-
8285 public:
-
8286 virtual void invalidate()
-
8287 {
-
8288 this->condition.invalidate();
-
8289 basic_parser::invalidate();
-
8290 }
-
8291
-
8292 stdex::interval<size_t> condition;
+
8272
+
8273 using html_tag = basic_html_tag<char>;
+
8274 using whtml_tag = basic_html_tag<wchar_t>;
+
8275#ifdef _UNICODE
+
8276 using thtml_tag = whtml_tag;
+
8277#else
+
8278 using thtml_tag = html_tag;
+
8279#endif
+
8280
+
8284 template <class T>
+
+ +
8286 {
+
8287 public:
+
8288 virtual void invalidate()
+
8289 {
+
8290 this->condition.invalidate();
+ +
8292 }
8293
-
8294 protected:
-
-
8295 virtual bool do_match(
-
8296 _In_reads_or_z_opt_(end) const T* text,
-
8297 _In_ size_t start = 0,
-
8298 _In_ size_t end = SIZE_MAX,
-
8299 _In_ int flags = match_multiline)
-
8300 {
-
8301 _Unreferenced_(flags);
-
8302 _Assume_(text || start + 2 >= end);
-
8303 if (start + 2 < end &&
-
8304 text[start] == '<' &&
-
8305 text[start + 1] == '!' &&
-
8306 text[start + 2] == '[')
-
8307 {
-
8308 this->interval.end = start + 3;
-
8309
-
8310 // Skip whitespace.
-
8311 const auto& ctype = std::use_facet<std::ctype<T>>(m_locale);
-
8312 for (; this->interval.end < end && text[this->interval.end] && ctype.is(ctype.space, text[this->interval.end]); this->interval.end++);
-
8313
-
8314 this->condition.start = this->condition.end = this->interval.end;
+
8294 stdex::interval<size_t> condition;
+
8295
+
8296 protected:
+
+
8297 virtual bool do_match(
+
8298 _In_reads_or_z_opt_(end) const T* text,
+
8299 _In_ size_t start = 0,
+
8300 _In_ size_t end = SIZE_MAX,
+
8301 _In_ int flags = match_multiline)
+
8302 {
+
8303 _Unreferenced_(flags);
+
8304 _Assume_(text || start + 2 >= end);
+
8305 if (start + 2 < end &&
+
8306 text[start] == '<' &&
+
8307 text[start + 1] == '!' &&
+
8308 text[start + 2] == '[')
+
8309 {
+
8310 this->interval.end = start + 3;
+
8311
+
8312 // Skip whitespace.
+
8313 const auto& ctype = std::use_facet<std::ctype<T>>(this->m_locale);
+
8314 for (; this->interval.end < end && text[this->interval.end] && ctype.is(ctype.space, text[this->interval.end]); this->interval.end++);
8315
-
8316 for (;;) {
-
8317 if (this->interval.end >= end || !text[this->interval.end])
-
8318 break;
-
8319 if (text[this->interval.end] == '[') {
-
8320 this->interval.start = start;
-
8321 this->interval.end++;
-
8322 return true;
-
8323 }
-
8324 if (ctype.is(ctype.space, text[this->interval.end]))
-
8325 this->interval.end++;
-
8326 else
-
8327 this->condition.end = ++this->interval.end;
-
8328 }
-
8329 }
-
8330
-
8331 this->condition.invalidate();
-
8332 this->interval.invalidate();
-
8333 return false;
-
8334 }
+
8316 this->condition.start = this->condition.end = this->interval.end;
+
8317
+
8318 for (;;) {
+
8319 if (this->interval.end >= end || !text[this->interval.end])
+
8320 break;
+
8321 if (text[this->interval.end] == '[') {
+
8322 this->interval.start = start;
+
8323 this->interval.end++;
+
8324 return true;
+
8325 }
+
8326 if (ctype.is(ctype.space, text[this->interval.end]))
+
8327 this->interval.end++;
+
8328 else
+
8329 this->condition.end = ++this->interval.end;
+
8330 }
+
8331 }
+
8332
+
8333 this->condition.invalidate();
+
8334 this->interval.invalidate();
+
8335 return false;
+
8336 }
-
8335 };
+
8337 };
-
8336
-
8337 using html_declaration_condition_start = basic_html_declaration_condition_start<char>;
-
8338 using whtml_declaration_condition_start = basic_html_declaration_condition_start<wchar_t>;
-
8339#ifdef _UNICODE
-
8340 using thtml_declaration_condition_start = whtml_declaration_condition_start;
-
8341#else
-
8342 using thtml_declaration_condition_start = html_declaration_condition_start;
-
8343#endif
-
8344
-
8348 template <class T>
-
- -
8350 {
-
8351 protected:
-
8352 virtual bool do_match(
-
8353 _In_reads_or_z_opt_(end) const T* text,
-
8354 _In_ size_t start = 0,
-
8355 _In_ size_t end = SIZE_MAX,
-
8356 _In_ int flags = match_multiline)
-
8357 {
-
8358 _Unreferenced_(flags);
-
8359 _Assume_(text || start + 2 >= end);
-
8360 if (start + 2 < end &&
-
8361 text[start] == ']' &&
-
8362 text[start + 1] == ']' &&
-
8363 text[start + 2] == '>')
-
8364 {
-
8365 this->interval.start = start;
-
8366 this->interval.end = start + 3;
-
8367 return true;
-
8368 }
-
8369 this->interval.invalidate();
-
8370 return false;
-
8371 }
-
8372 };
+
8338
+
8339 using html_declaration_condition_start = basic_html_declaration_condition_start<char>;
+
8340 using whtml_declaration_condition_start = basic_html_declaration_condition_start<wchar_t>;
+
8341#ifdef _UNICODE
+
8342 using thtml_declaration_condition_start = whtml_declaration_condition_start;
+
8343#else
+
8344 using thtml_declaration_condition_start = html_declaration_condition_start;
+
8345#endif
+
8346
+
8350 template <class T>
+
+ +
8352 {
+
8353 protected:
+
8354 virtual bool do_match(
+
8355 _In_reads_or_z_opt_(end) const T* text,
+
8356 _In_ size_t start = 0,
+
8357 _In_ size_t end = SIZE_MAX,
+
8358 _In_ int flags = match_multiline)
+
8359 {
+
8360 _Unreferenced_(flags);
+
8361 _Assume_(text || start + 2 >= end);
+
8362 if (start + 2 < end &&
+
8363 text[start] == ']' &&
+
8364 text[start + 1] == ']' &&
+
8365 text[start + 2] == '>')
+
8366 {
+
8367 this->interval.start = start;
+
8368 this->interval.end = start + 3;
+
8369 return true;
+
8370 }
+
8371 this->interval.invalidate();
+
8372 return false;
+
8373 }
+
8374 };
-
8373
- - -
8376#ifdef _UNICODE
- -
8378#else
- -
8380#endif
-
8381 }
-
8382}
-
8383
-
8384#undef ENUM_FLAG_OPERATOR
-
8385#undef ENUM_FLAGS
-
8386
-
8387#ifdef _MSC_VER
-
8388#pragma warning(pop)
-
8389#endif
+
8375
+ + +
8378#ifdef _UNICODE
+ +
8380#else
+ +
8382#endif
+
8383 }
+
8384}
+
8385
+
8386#undef ENUM_FLAG_OPERATOR
+
8387#undef ENUM_FLAGS
+
8388
+
8389#ifdef _MSC_VER
+
8390#pragma warning(pop)
+
8391#endif
locale_t helper class to free_locale when going out of scope.
Definition locale.hpp:69
Test for angle in d°mm'ss.dddd form.
Definition parser.hpp:4377
Test for any code unit.
Definition parser.hpp:232
@@ -8386,9 +8388,9 @@ $(function() { codefold.init(0); });
std::shared_ptr< basic_parser< T > > emoticon
emoticon as a whole (e.g. 😀, 🤔, 😶)
Definition parser.hpp:3914
Test for end of line.
Definition parser.hpp:670
Test for fraction.
Definition parser.hpp:1702
-
End of condition ...]]>
Definition parser.hpp:8350
-
Start of condition <![condition[...
Definition parser.hpp:8284
-
virtual bool do_match(_In_reads_or_z_opt_(end) const T *text, size_t start=0, size_t end=SIZE_MAX, int flags=match_multiline)
condition position in source
Definition parser.hpp:8295
+
End of condition ...]]>
Definition parser.hpp:8352
+
Start of condition <![condition[...
Definition parser.hpp:8286
+
virtual bool do_match(_In_reads_or_z_opt_(end) const T *text, size_t start=0, size_t end=SIZE_MAX, int flags=match_multiline)
condition position in source
Definition parser.hpp:8297
Contiguous sequence of characters representing name of element, attribute etc.
Definition parser.hpp:7898
Tag.
Definition parser.hpp:8050
std::vector< html_attribute > attributes
tag attributes
Definition parser.hpp:8067
@@ -8550,7 +8552,7 @@ $(function() { codefold.init(0); });
diff --git a/pch_8hpp_source.html b/pch_8hpp_source.html index 256d7d3ba..531309008 100644 --- a/pch_8hpp_source.html +++ b/pch_8hpp_source.html @@ -128,7 +128,7 @@ $(function() { codefold.init(0); });
diff --git a/pool_8cpp_source.html b/pool_8cpp_source.html new file mode 100644 index 000000000..e19386ef5 --- /dev/null +++ b/pool_8cpp_source.html @@ -0,0 +1,136 @@ + + + + + + + +stdex: UnitTests/pool.cpp Source File + + + + + + + + + + + +
+
+ + + + + + +
+
stdex +
+
Additional custom or not Standard C++ covered algorithms
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
pool.cpp
+
+
+
1/*
+
2 SPDX-License-Identifier: MIT
+
3 Copyright © 2023-2024 Amebis
+
4*/
+
5
+
6#include "pch.hpp"
+
7
+
8using namespace std;
+
9#ifdef _WIN32
+
10using namespace Microsoft::VisualStudio::CppUnitTestFramework;
+
11#endif
+
12
+
13namespace UnitTests
+
14{
+
15 constexpr size_t pool_capacity = 50;
+
16
+
17 TEST_CLASS(pool)
+
18 {
+
19 public:
+
20 TEST_METHOD(test)
+
21 {
+
22 using worker_t = unique_ptr<int>;
+
23 using pool_t = stdex::pool<worker_t>;
+
24 pool_t pool;
+
25 list<thread> workers;
+
26 for (auto n = thread::hardware_concurrency(); n--; ) {
+
27 workers.push_back(thread([](_Inout_ pool_t& pool)
+
28 {
+
29 for (size_t n = 10000; n--; ) {
+
30 worker_t el = pool.pop();
+
31 if (!el)
+
32 el.reset(new int(1));
+
33 pool.push(std::move(el));
+
34 }
+
35 }, ref(pool)));
+
36 }
+
37
+
38 for (auto& w : workers)
+
39 w.join();
+
40 }
+
41 };
+
42}
+
Per-NUMA pool of items.
Definition pool.hpp:24
+
+ + + + diff --git a/pool_8hpp_source.html b/pool_8hpp_source.html index dce7f8f1f..5397fd351 100644 --- a/pool_8hpp_source.html +++ b/pool_8hpp_source.html @@ -93,99 +93,103 @@ $(function() { codefold.init(0); });
7
8#include "compat.hpp"
9#include "spinlock.hpp"
-
10#include "windows.h"
-
11#include <list>
-
12#include <map>
-
13#include <mutex>
-
14
-
15namespace stdex
-
16{
-
20 template <class T>
-
-
21 class pool
-
22 {
-
23 public:
-
24#ifdef _WIN32
-
25 using numaid_t = USHORT;
-
26#else
-
27 using numaid_t = int;
-
28#endif
-
29
-
30 private:
-
31 struct numaentry_t {
-
32 mutable spinlock lock;
-
33 std::list<T> list;
-
34 };
-
35
-
36 mutable std::mutex m_mutex;
-
37 std::map<numaid_t, numaentry_t> m_available;
-
38
-
39 private:
-
40 static numaid_t numa_node()
-
41 {
-
42#ifdef _WIN32
-
43 PROCESSOR_NUMBER Processor;
-
44 GetCurrentProcessorNumberEx(&Processor);
-
45 USHORT NodeNumber = 0;
-
46 return GetNumaProcessorNodeEx(&Processor, &NodeNumber) ? NodeNumber : 0;
-
47#else
-
48 return numa_node_of_cpu(sched_getcpu());
-
49#endif
-
50 }
-
51
-
52 numaentry_t& numa_entry(numaid_t numa = numa_node())
-
53 {
-
54 const std::lock_guard<std::mutex> guard(m_mutex);
-
55 return m_available[numa];
-
56 }
-
57
-
58 public:
-
-
66 T pop(_In_ numaid_t numa = numa_node())
-
67 {
-
68 auto& ne = numa_entry(numa);
-
69 const std::lock_guard<spinlock> guard(ne.lock);
-
70 if (!ne.list.empty()) {
-
71 auto r = std::move(ne.list.front());
-
72 ne.list.pop_front();
-
73 return r;
-
74 }
-
75 return T();
-
76 }
+
10#ifdef _WIN32
+
11#include "windows.h"
+
12#endif
+
13#include <list>
+
14#include <map>
+
15#include <mutex>
+
16
+
17namespace stdex
+
18{
+
22 template <class T>
+
+
23 class pool
+
24 {
+
25 public:
+
26#ifdef _WIN32
+
27 using numaid_t = USHORT;
+
28#else
+
29 using numaid_t = int;
+
30#endif
+
31
+
32 private:
+
33 struct numaentry_t {
+
34 mutable spinlock lock;
+
35 std::list<T> list;
+
36 };
+
37
+
38 mutable std::mutex m_mutex;
+
39 std::map<numaid_t, numaentry_t> m_available;
+
40
+
41 private:
+
42 static numaid_t numa_node()
+
43 {
+
44#if defined(_WIN32)
+
45 PROCESSOR_NUMBER Processor;
+
46 GetCurrentProcessorNumberEx(&Processor);
+
47 USHORT NodeNumber = 0;
+
48 return GetNumaProcessorNodeEx(&Processor, &NodeNumber) ? NodeNumber : 0;
+
49#elif defined(__APPLE__)
+
50 return 0;
+
51#else
+
52 return numa_node_of_cpu(sched_getcpu());
+
53#endif
+
54 }
+
55
+
56 numaentry_t& numa_entry(numaid_t numa = numa_node())
+
57 {
+
58 const std::lock_guard<std::mutex> guard(m_mutex);
+
59 return m_available[numa];
+
60 }
+
61
+
62 public:
+
+
70 T pop(_In_ numaid_t numa = numa_node())
+
71 {
+
72 auto& ne = numa_entry(numa);
+
73 const std::lock_guard<spinlock> guard(ne.lock);
+
74 if (!ne.list.empty()) {
+
75 auto r = std::move(ne.list.front());
+
76 ne.list.pop_front();
+
77 return r;
+
78 }
+
79 return T();
+
80 }
-
77
-
-
84 void push(_Inout_ T&& r, _In_ numaid_t numa = numa_node())
-
85 {
-
86 auto& ne = numa_entry(numa);
-
87 const std::lock_guard<spinlock> guard(ne.lock);
-
88 ne.list.push_front(std::move(r));
-
89 }
+
81
+
+
88 void push(_Inout_ T&& r, _In_ numaid_t numa = numa_node())
+
89 {
+
90 auto& ne = numa_entry(numa);
+
91 const std::lock_guard<spinlock> guard(ne.lock);
+
92 ne.list.push_front(std::move(r));
+
93 }
-
90
-
-
94 void clear()
-
95 {
-
96 const std::lock_guard<std::mutex> guard_m(m_mutex);
-
97 for (auto& ne : m_available) {
-
98 const std::lock_guard<spinlock> guard_l(ne.second.lock);
-
99 while (!ne.second.list.empty())
-
100 ne.second.list.pop_front();
-
101 }
-
102 }
+
94
+
+
98 void clear()
+
99 {
+
100 const std::lock_guard<std::mutex> guard_m(m_mutex);
+
101 for (auto& ne : m_available) {
+
102 const std::lock_guard<spinlock> guard_l(ne.second.lock);
+
103 while (!ne.second.list.empty())
+
104 ne.second.list.pop_front();
+
105 }
+
106 }
-
103 };
+
107 };
-
104}
-
Per-NUMA pool of items.
Definition pool.hpp:22
-
void clear()
Removes all items from the pool.
Definition pool.hpp:94
-
T pop(numaid_t numa=numa_node())
Removes an item from the pool.
Definition pool.hpp:66
-
void push(T &&r, numaid_t numa=numa_node())
Adds an item to the pool.
Definition pool.hpp:84
+
108}
+
Per-NUMA pool of items.
Definition pool.hpp:24
+
void clear()
Removes all items from the pool.
Definition pool.hpp:98
+
T pop(numaid_t numa=numa_node())
Removes an item from the pool.
Definition pool.hpp:70
+
void push(T &&r, numaid_t numa=numa_node())
Adds an item to the pool.
Definition pool.hpp:88
Spin-lock.
Definition spinlock.hpp:22
diff --git a/progress_8hpp_source.html b/progress_8hpp_source.html index e52523cbd..745805b5d 100644 --- a/progress_8hpp_source.html +++ b/progress_8hpp_source.html @@ -240,7 +240,7 @@ $(function() { codefold.init(0); });
207 virtual bool cancel()
208 {
209 return
-
210 m_host && m_host->cancel() ||
+
210 (m_host && m_host->cancel()) ||
211 m_deadline < std::chrono::high_resolution_clock::now();
212 }
@@ -537,7 +537,7 @@ $(function() { codefold.init(0); });
diff --git a/ring_8cpp_source.html b/ring_8cpp_source.html index 6fc90a638..d47e8b4ef 100644 --- a/ring_8cpp_source.html +++ b/ring_8cpp_source.html @@ -98,20 +98,20 @@ $(function() { codefold.init(0); });
12
13namespace UnitTests
14{
-
15 constexpr size_t capacity = 50;
+
15 constexpr size_t ring_capacity = 50;
16
17 TEST_CLASS(ring)
18 {
19 public:
20 TEST_METHOD(test)
21 {
-
22 using ring_t = stdex::ring<int, capacity>;
+
23 ring_t ring;
24 thread writer([](_Inout_ ring_t& ring)
25 {
26 int seed = 0;
27 for (size_t retries = 1000; retries--;) {
-
28 for (auto to_write = static_cast<size_t>(static_cast<uint64_t>(::rand()) * capacity / 5 / RAND_MAX); to_write;) {
+
28 for (auto to_write = static_cast<size_t>(static_cast<uint64_t>(::rand()) * ring_capacity / 5 / RAND_MAX); to_write;) {
29 int* ptr; size_t num_write;
30 tie(ptr, num_write) = ring.back();
31 if (to_write < num_write)
@@ -146,7 +146,7 @@ $(function() { codefold.init(0); });
diff --git a/ring_8hpp_source.html b/ring_8hpp_source.html index 7a1fa7bfb..16c3d745f 100644 --- a/ring_8hpp_source.html +++ b/ring_8hpp_source.html @@ -225,7 +225,7 @@ $(function() { codefold.init(0); });
diff --git a/sgml_8cpp_source.html b/sgml_8cpp_source.html index 4637a9206..efd2a114b 100644 --- a/sgml_8cpp_source.html +++ b/sgml_8cpp_source.html @@ -155,7 +155,7 @@ $(function() { codefold.init(0); });
diff --git a/sgml_8hpp_source.html b/sgml_8hpp_source.html index 482b7d4bf..660d03f6e 100644 --- a/sgml_8hpp_source.html +++ b/sgml_8hpp_source.html @@ -779,7 +779,7 @@ $(function() { codefold.init(0); });
diff --git a/sgml__unicode_8hpp_source.html b/sgml__unicode_8hpp_source.html index b8956580c..08f78b656 100644 --- a/sgml__unicode_8hpp_source.html +++ b/sgml__unicode_8hpp_source.html @@ -3177,7 +3177,7 @@ $(function() { codefold.init(0); });
diff --git a/socket_8hpp_source.html b/socket_8hpp_source.html index 13e3cba88..92f196042 100644 --- a/socket_8hpp_source.html +++ b/socket_8hpp_source.html @@ -115,7 +115,7 @@ $(function() { codefold.init(0); });
diff --git a/spinlock_8hpp_source.html b/spinlock_8hpp_source.html index 27f4ff84c..f64893586 100644 --- a/spinlock_8hpp_source.html +++ b/spinlock_8hpp_source.html @@ -123,7 +123,7 @@ $(function() { codefold.init(0); });
43#elif _M_IX86 || _M_X64
44 _mm_pause();
45#elif __aarch64__
-
46 __yield();
+
46 asm volatile("yield");
47#elif __i386__ || __x86_64__
48 __builtin_ia32_pause();
49#endif
@@ -159,7 +159,7 @@ $(function() { codefold.init(0); });
diff --git a/stream_8cpp_source.html b/stream_8cpp_source.html index dc721cd30..88358a9d8 100644 --- a/stream_8cpp_source.html +++ b/stream_8cpp_source.html @@ -92,159 +92,157 @@ $(function() { codefold.init(0); });
6#include "pch.hpp"
7
8using namespace std;
-
9using namespace stdex;
-
10using namespace stdex::stream;
-
11#ifdef _WIN32
-
12using namespace Microsoft::VisualStudio::CppUnitTestFramework;
-
13#endif
-
14
-
15namespace UnitTests
-
16{
-
17 TEST_CLASS(stream)
-
18 {
-
19 public:
-
20 TEST_METHOD(async)
-
21 {
-
22 constexpr uint32_t total = 1000;
-
23 memory_file source(mul(total, sizeof(uint32_t)));
-
24 {
-
25 async_writer<70> writer(source);
-
26 for (uint32_t i = 0; i < total; ++i) {
-
27 Assert::IsTrue(writer.ok());
-
28 writer << i;
-
29 }
-
30 }
-
31 Assert::AreEqual<stdex::stream::fpos_t>(0, source.seekbeg(0));
-
32 {
-
33 async_reader<50> reader(source);
-
34 uint32_t x;
-
35 for (uint32_t i = 0; i < total; ++i) {
-
36 reader >> x;
-
37 Assert::IsTrue(reader.ok());
-
38 Assert::AreEqual(i, x);
-
39 }
-
40 reader >> x;
-
41 Assert::IsFalse(reader.ok());
-
42 }
-
43 }
-
44
-
45 TEST_METHOD(replicator)
-
46 {
-
47 constexpr uint32_t total = 1000;
+
9#ifdef _WIN32
+
10using namespace Microsoft::VisualStudio::CppUnitTestFramework;
+
11#endif
+
12
+
13namespace UnitTests
+
14{
+
15 TEST_CLASS(stream)
+
16 {
+
17 public:
+
18 TEST_METHOD(async)
+
19 {
+
20 constexpr uint32_t total = 1000;
+
21 stdex::stream::memory_file source(stdex::mul(total, sizeof(uint32_t)));
+
22 {
+ +
24 for (uint32_t i = 0; i < total; ++i) {
+
25 Assert::IsTrue(writer.ok());
+
26 writer << i;
+
27 }
+
28 }
+
29 Assert::AreEqual<stdex::stream::fpos_t>(0, source.seekbeg(0));
+
30 {
+ +
32 uint32_t x;
+
33 for (uint32_t i = 0; i < total; ++i) {
+
34 reader >> x;
+
35 Assert::IsTrue(reader.ok());
+
36 Assert::AreEqual(i, x);
+
37 }
+
38 reader >> x;
+
39 Assert::IsFalse(reader.ok());
+
40 }
+
41 }
+
42
+
43 TEST_METHOD(replicator)
+
44 {
+
45 constexpr uint32_t total = 1000;
+
46
+
47 stdex::stream::memory_file f1(stdex::mul(total, sizeof(uint32_t)));
48
-
49 memory_file f1(mul(total, sizeof(uint32_t)));
-
50
-
51 sstring filename2, filename3;
-
52 filename2 = filename3 = temp_path();
-
53 filename2 += _T("stdex-stream-replicator-2.tmp");
-
54 file f2(
-
55 filename2.c_str(),
-
56 mode_for_reading | mode_for_writing | mode_create | mode_binary);
-
57
-
58 filename3 += _T("stdex-stream-replicator-3.tmp");
-
59 cached_file f3(
-
60 filename3.c_str(),
-
61 mode_for_reading | mode_for_writing | mode_create | mode_binary,
-
62 128);
-
63
-
64 {
- -
66 buffer f2_buf(f2, 0, 32);
-
67 writer.push_back(&f1);
-
68 writer.push_back(&f2_buf);
-
69 writer.push_back(&f3);
-
70 for (uint32_t i = 0; i < total; ++i) {
-
71 Assert::IsTrue(writer.ok());
-
72 writer << i;
-
73 }
-
74 }
-
75
-
76 f1.seekbeg(0);
-
77 f2.seekbeg(0);
-
78 f3.seekbeg(0);
-
79 {
-
80 buffer f2_buf(f2, 64, 0);
-
81 uint32_t x;
-
82 for (uint32_t i = 0; i < total; ++i) {
-
83 f1 >> x;
-
84 Assert::IsTrue(f1.ok());
-
85 Assert::AreEqual(i, x);
-
86 f2_buf >> x;
-
87 Assert::IsTrue(f2_buf.ok());
-
88 Assert::AreEqual(i, x);
-
89 f3 >> x;
-
90 Assert::IsTrue(f3.ok());
-
91 Assert::AreEqual(i, x);
-
92 }
-
93 f1 >> x;
-
94 Assert::IsFalse(f1.ok());
-
95 f2_buf >> x;
-
96 Assert::IsFalse(f2_buf.ok());
-
97 f3 >> x;
-
98 Assert::IsFalse(f3.ok());
-
99 }
-
100
-
101 f2.close();
-
102 std::filesystem::remove(filename2);
-
103 f3.close();
-
104 std::filesystem::remove(filename3);
-
105 }
-
106
-
107 TEST_METHOD(open_close)
-
108 {
-
109 cached_file dat(invalid_handle, state_t::fail, 4096);
-
110 const sstring filepath = temp_path();
-
111 constexpr uint32_t count = 3;
-
112 sstring filename[count];
-
113 stdex::stream::fpos_t start[count];
-
114 for (uint32_t i = 0; i < count; ++i) {
-
115 filename[i] = filepath + sprintf(_T("stdex-stream-open_close%u.tmp"), NULL, i);
-
116 dat.open(filename[i].c_str(), mode_for_reading | mode_for_writing | share_none | mode_preserve_existing | mode_binary);
-
117 Assert::IsTrue(dat.ok());
-
118 start[i] = dat.tell();
-
119 Assert::AreNotEqual(fpos_max, start[i]);
-
120 for (uint32_t j = 0; j < 31 + 11 * i; ++j) {
-
121 dat << j * count + i;
-
122 Assert::IsTrue(dat.ok());
-
123 }
-
124 dat.close();
-
125 }
-
126 for (uint32_t i = 0; i < count; ++i) {
-
127 dat.open(filename[i].c_str(), mode_for_reading | mode_open_existing | share_none | mode_binary);
-
128 Assert::IsTrue(dat.ok());
-
129 for (;;) {
-
130 uint32_t x;
-
131 dat >> x;
-
132 if (!dat.ok())
-
133 break;
-
134 Assert::AreEqual(i, x % count);
-
135 }
-
136 }
-
137 dat.close();
-
138 for (uint32_t i = 0; i < count; ++i)
-
139 std::filesystem::remove(filename[i]);
-
140 }
-
141
-
142 TEST_METHOD(file_stat)
-
143 {
-
144 sstring path(temp_path());
-
145 Assert::IsTrue(stdex::stream::file::exists(path));
-
146 Assert::IsFalse(stdex::stream::file::readonly(path));
-
147 }
-
148
-
149 protected:
-
150 static sstring temp_path()
-
151 {
-
152#ifdef _WIN32
-
153 TCHAR temp_path[MAX_PATH];
-
154 Assert::IsTrue(ExpandEnvironmentStrings(_T("%TEMP%\\"), temp_path, _countof(temp_path)) < MAX_PATH);
-
155 return temp_path;
-
156#else
-
157 return "/tmp/";
-
158#endif
-
159 }
-
160 };
-
161}
+
49 stdex::sstring filename2, filename3;
+
50 filename2 = filename3 = temp_path();
+
51 filename2 += _T("stdex-stream-replicator-2.tmp");
+ +
53 filename2.c_str(),
+
54 stdex::stream::mode_for_reading | stdex::stream::mode_for_writing | stdex::stream::mode_create | stdex::stream::mode_binary);
+
55
+
56 filename3 += _T("stdex-stream-replicator-3.tmp");
+ +
58 filename3.c_str(),
+
59 stdex::stream::mode_for_reading | stdex::stream::mode_for_writing | stdex::stream::mode_create | stdex::stream::mode_binary,
+
60 128);
+
61
+
62 {
+ +
64 stdex::stream::buffer f2_buf(f2, 0, 32);
+
65 writer.push_back(&f1);
+
66 writer.push_back(&f2_buf);
+
67 writer.push_back(&f3);
+
68 for (uint32_t i = 0; i < total; ++i) {
+
69 Assert::IsTrue(writer.ok());
+
70 writer << i;
+
71 }
+
72 }
+
73
+
74 f1.seekbeg(0);
+
75 f2.seekbeg(0);
+
76 f3.seekbeg(0);
+
77 {
+
78 stdex::stream::buffer f2_buf(f2, 64, 0);
+
79 uint32_t x;
+
80 for (uint32_t i = 0; i < total; ++i) {
+
81 f1 >> x;
+
82 Assert::IsTrue(f1.ok());
+
83 Assert::AreEqual(i, x);
+
84 f2_buf >> x;
+
85 Assert::IsTrue(f2_buf.ok());
+
86 Assert::AreEqual(i, x);
+
87 f3 >> x;
+
88 Assert::IsTrue(f3.ok());
+
89 Assert::AreEqual(i, x);
+
90 }
+
91 f1 >> x;
+
92 Assert::IsFalse(f1.ok());
+
93 f2_buf >> x;
+
94 Assert::IsFalse(f2_buf.ok());
+
95 f3 >> x;
+
96 Assert::IsFalse(f3.ok());
+
97 }
+
98
+
99 f2.close();
+
100 std::filesystem::remove(filename2);
+
101 f3.close();
+
102 std::filesystem::remove(filename3);
+
103 }
+
104
+
105 TEST_METHOD(open_close)
+
106 {
+
107 stdex::stream::cached_file dat(stdex::invalid_handle, stdex::stream::state_t::fail, 4096);
+
108 const stdex::sstring filepath = temp_path();
+
109 constexpr uint32_t count = 3;
+
110 stdex::sstring filename[count];
+
111 stdex::stream::fpos_t start[count];
+
112 for (uint32_t i = 0; i < count; ++i) {
+
113 filename[i] = filepath + stdex::sprintf(_T("stdex-stream-open_close%u.tmp"), NULL, i);
+
114 dat.open(filename[i].c_str(), stdex::stream::mode_for_reading | stdex::stream::mode_for_writing | stdex::stream::share_none | stdex::stream::mode_preserve_existing | stdex::stream::mode_binary);
+
115 Assert::IsTrue(dat.ok());
+
116 start[i] = dat.tell();
+
117 Assert::AreNotEqual(stdex::stream::fpos_max, start[i]);
+
118 for (uint32_t j = 0; j < 31 + 11 * i; ++j) {
+
119 dat << j * count + i;
+
120 Assert::IsTrue(dat.ok());
+
121 }
+
122 dat.close();
+
123 }
+
124 for (uint32_t i = 0; i < count; ++i) {
+
125 dat.open(filename[i].c_str(), stdex::stream::mode_for_reading | stdex::stream::mode_open_existing | stdex::stream::share_none | stdex::stream::mode_binary);
+
126 Assert::IsTrue(dat.ok());
+
127 for (;;) {
+
128 uint32_t x;
+
129 dat >> x;
+
130 if (!dat.ok())
+
131 break;
+
132 Assert::AreEqual(i, x % count);
+
133 }
+
134 }
+
135 dat.close();
+
136 for (uint32_t i = 0; i < count; ++i)
+
137 std::filesystem::remove(filename[i]);
+
138 }
+
139
+
140 TEST_METHOD(file_stat)
+
141 {
+
142 stdex::sstring path(temp_path());
+
143 Assert::IsTrue(stdex::stream::file::exists(path));
+
144 Assert::IsFalse(stdex::stream::file::readonly(path));
+
145 }
+
146
+
147 protected:
+
148 static stdex::sstring temp_path()
+
149 {
+
150#ifdef _WIN32
+
151 TCHAR temp_path[MAX_PATH];
+
152 Assert::IsTrue(ExpandEnvironmentStrings(_T("%TEMP%\\"), temp_path, _countof(temp_path)) < MAX_PATH);
+
153 return temp_path;
+
154#else
+
155 return "/tmp/";
+
156#endif
+
157 }
+
158 };
+
159}
Provides read-ahead stream capability.
Definition stream.hpp:1246
Provides write-back stream capability.
Definition stream.hpp:1313
bool ok() const
Returns true if the stream state is clean i.e. previous operation was succesful.
Definition stream.hpp:175
@@ -259,7 +257,7 @@ $(function() { codefold.init(0); });
diff --git a/stream_8hpp_source.html b/stream_8hpp_source.html index df3a822be..36a77d5c1 100644 --- a/stream_8hpp_source.html +++ b/stream_8hpp_source.html @@ -2360,8 +2360,8 @@ $(function() { codefold.init(0); });
2408 _Assume_(data || !length);
2409 constexpr int block_size = 0x10000000;
2410 for (size_t to_read = length;;) {
-
2411 int num_read = recv(m_h, reinterpret_cast<char*>(data), static_cast<int>(std::min<size_t>(to_read, block_size)), 0);
-
2412 if (num_read == SOCKET_ERROR) _Unlikely_ {
+
2411 auto num_read = recv(m_h, reinterpret_cast<char*>(data), static_cast<int>(std::min<size_t>(to_read, block_size)), 0);
+
2412 if (num_read == -1) _Unlikely_ {
2413 m_state = to_read < length ? state_t::ok : state_t::fail;
2414 return length - to_read;
2415 }
@@ -2386,8 +2386,8 @@ $(function() { codefold.init(0); });
2432 _Assume_(data || !length);
2433 constexpr int block_size = 0x10000000;
2434 for (size_t to_write = length;;) {
-
2435 int num_written = send(m_h, reinterpret_cast<const char*>(data), static_cast<int>(std::min<size_t>(to_write, block_size)), 0);
-
2436 if (num_written == SOCKET_ERROR) _Unlikely_ {
+
2435 auto num_written = send(m_h, reinterpret_cast<const char*>(data), static_cast<int>(std::min<size_t>(to_write, block_size)), 0);
+
2436 if (num_written == -1) _Unlikely_ {
2437 m_state = state_t::fail;
2438 return length - to_write;
2439 }
@@ -4345,7 +4345,7 @@ $(function() { codefold.init(0); });
diff --git a/string_8cpp_source.html b/string_8cpp_source.html new file mode 100644 index 000000000..452933489 --- /dev/null +++ b/string_8cpp_source.html @@ -0,0 +1,134 @@ + + + + + + + +stdex: UnitTests/string.cpp Source File + + + + + + + + + + + +
+
+ + + + + + +
+
stdex +
+
Additional custom or not Standard C++ covered algorithms
+
+
+ + + + + + + + + +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+
+
string.cpp
+
+
+
1/*
+
2 SPDX-License-Identifier: MIT
+
3 Copyright © 2023-2024 Amebis
+
4*/
+
5
+
6#include "pch.hpp"
+
7
+
8using namespace std;
+
9#ifdef _WIN32
+
10using namespace Microsoft::VisualStudio::CppUnitTestFramework;
+
11#endif
+
12
+
13namespace UnitTests
+
14{
+
15 TEST_CLASS(string)
+
16 {
+
17 public:
+
18 TEST_METHOD(sprintf)
+
19 {
+
20 Assert::AreEqual(L"This is a test.", stdex::sprintf(L"This is %ls.", stdex::locale_default, L"a test").c_str());
+
21 Assert::AreEqual<size_t>(15, stdex::sprintf(L"This is %ls.", stdex::locale_default, L"a test").size());
+
22 Assert::AreEqual("This is a test.", stdex::sprintf("This is %s.", stdex::locale_default, "a test").c_str());
+
23 Assert::AreEqual<size_t>(15, stdex::sprintf("This is %s.", stdex::locale_default, "a test").size());
+
24
+
25 // swprintf functions return EILSEQ when %ls inserts contain emoji on Mac. 😢
+
26 Assert::AreEqual(L"This is a tést.", stdex::sprintf(L"This is %ls.", stdex::locale_default, L"a tést").c_str());
+
27 Assert::AreEqual("This is a 🐔Test🐮.", stdex::sprintf("This is %s.", stdex::locale_default, "a 🐔Test🐮").c_str());
+
28
+
29 wstring wstr;
+
30 std::string str;
+
31 for (size_t i = 0; i < 2000; i++) {
+
32 wstr += L"tést\r\n";
+
33 str += "🐔Test🐮\r\n";
+
34 }
+
35 Assert::AreEqual(wstr.c_str(), stdex::sprintf(L"%ls", stdex::locale_default, wstr.data()).c_str());
+
36 Assert::AreEqual(wstr.size(), stdex::sprintf(L"%ls", stdex::locale_default, wstr.data()).size());
+
37 Assert::AreEqual(str.c_str(), stdex::sprintf("%s", stdex::locale_utf8, str.data()).c_str());
+
38 Assert::AreEqual(str.size(), stdex::sprintf("%s", stdex::locale_utf8, str.data()).size());
+
39 }
+
40 };
+
41}
+
+ + + + diff --git a/string_8hpp_source.html b/string_8hpp_source.html index 421b21c02..2e6276ced 100644 --- a/string_8hpp_source.html +++ b/string_8hpp_source.html @@ -1529,7 +1529,7 @@ $(function() { codefold.init(0); });
2328#pragma warning(suppress: 4996)
2329 return _vsnprintf_l(str, capacity, format, locale, arg);
2330#else
-
2331 return ::vsnprintf(str, capacity, format, arg);
+
2331 return ::vsnprintf_l(str, capacity, locale, format, arg);
2332#endif
2333 }
2334
@@ -1539,7 +1539,7 @@ $(function() { codefold.init(0); });
2338#pragma warning(suppress: 4996)
2339 return _vsnwprintf_l(str, capacity, format, locale, arg);
2340#else
-
2341 return vswprintf(str, capacity, format, arg);
+
2341 return ::vswprintf_l(str, capacity, locale, format, arg);
2342#endif
2343 }
2345
@@ -1550,436 +1550,456 @@ $(function() { codefold.init(0); });
2360
2361 // Try with stack buffer first.
2362 int count = vsnprintf(buf, _countof(buf), format, locale, arg);
-
2363 if (0 <= count && count < _countof(buf)) {
+
2363 if (0 <= count && count <= _countof(buf)) {
2364 // Copy from stack.
2365 str.append(buf, count);
2366 return count;
2367 }
-
2368 if (count < 0) {
-
2369 switch (errno) {
-
2370 case 0:
-
2371 count = vsnprintf(NULL, 0, format, locale, arg);
-
2372 _Assume_(count >= 0);
-
2373 break;
-
2374 case EINVAL: throw std::invalid_argument("invalid vsnprintf arguments");
-
2375 case EILSEQ: throw std::runtime_error("encoding error");
-
2376 default: throw std::runtime_error("failed to format string");
-
2377 }
-
2378 }
-
2379 size_t offset = str.size();
-
2380 str.resize(offset + count);
-
2381 if (vsnprintf(&str[offset], count + 1, format, locale, arg) != count) _Unlikely_
-
2382 throw std::runtime_error("failed to format string");
-
2383 return count;
-
2384 }
-
2385
-
2395 template<class T, class TR, class AX>
-
2396 inline size_t appendf(_Inout_ std::basic_string<T, TR, AX>& str, _In_z_ _Printf_format_string_params_(2) const T* format, _In_opt_ locale_t locale, ...)
-
2397 {
-
2398 va_list arg;
-
2399 va_start(arg, locale);
-
2400 size_t n = vappendf(str, format, locale, arg);
-
2401 va_end(arg);
-
2402 return n;
-
2403 }
-
2404
-
2413 template<class T, class TR, class AX>
-
2414 inline void vsprintf(_Inout_ std::basic_string<T, TR, AX>& str, _In_z_ _Printf_format_string_params_(2) const T* format, _In_opt_ locale_t locale, _In_ va_list arg)
-
2415 {
-
2416 str.clear();
-
2417 vappendf(str, format, locale, arg);
-
2418 }
-
2419
-
2427 template<class T, class TR, class AX>
-
2428 inline void sprintf(_Inout_ std::basic_string<T, TR, AX>& str, _In_z_ _Printf_format_string_params_(2) const T* format, _In_opt_ locale_t locale, ...)
-
2429 {
-
2430 va_list arg;
-
2431 va_start(arg, locale);
-
2432 vsprintf(str, format, locale, arg);
-
2433 va_end(arg);
-
2434 }
-
2435
-
2445 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
2446 inline std::basic_string<T, TR, AX> vsprintf(_In_z_ _Printf_format_string_params_(2) const T* format, _In_opt_ locale_t locale, _In_ va_list arg)
-
2447 {
-
2448 std::basic_string<T, TR, AX> str;
-
2449 vappendf(str, format, locale, arg);
-
2450 return str;
-
2451 }
-
2452
-
2461 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
2462 inline std::basic_string<T, TR, AX> sprintf(_In_z_ _Printf_format_string_params_(2) const T* format, _In_opt_ locale_t locale, ...)
-
2463 {
-
2464 va_list arg;
-
2465 va_start(arg, locale);
-
2466 auto str = vsprintf(format, locale, arg);
-
2467 va_end(arg);
-
2468 return str;
-
2469 }
-
2470
-
2472 inline size_t strftime(_Out_z_cap_(capacity) char* str, _In_ size_t capacity, _In_z_ _Printf_format_string_ const char* format, _In_ const struct tm* time, _In_opt_ locale_t locale)
-
2473 {
-
2474#ifdef _WIN32
-
2475 return _strftime_l(str, capacity, format, time, locale);
-
2476#else
-
2477 return strftime_l(str, capacity, format, time, locale);
-
2478#endif
-
2479 }
-
2480
-
2481 inline size_t strftime(_Out_z_cap_(capacity) wchar_t* str, _In_ size_t capacity, _In_z_ _Printf_format_string_ const wchar_t* format, _In_ const struct tm* time, _In_opt_ locale_t locale)
-
2482 {
-
2483#ifdef _WIN32
-
2484 return _wcsftime_l(str, capacity, format, time, locale);
-
2485#else
-
2486 return wcsftime_l(str, capacity, format, time, locale);
-
2487#endif
-
2488 }
+
2368#ifdef _WIN32
+
2369 if (count < 0) {
+
2370 switch (errno) {
+
2371 case 0:
+
2372 count = vsnprintf(NULL, 0, format, locale, arg);
+
2373 _Assume_(count >= 0);
+
2374 break;
+
2375 case EINVAL: throw std::invalid_argument("invalid vsnprintf arguments");
+
2376 case EILSEQ: throw std::runtime_error("encoding error");
+
2377 default: throw std::runtime_error("failed to format string");
+
2378 }
+
2379 }
+
2380 size_t offset = str.size();
+
2381 str.resize(offset + count);
+
2382 if (vsnprintf(&str[offset], count + 1, format, locale, arg) != count) _Unlikely_
+
2383 throw std::runtime_error("failed to format string");
+
2384#else
+
2385 size_t offset = str.size();
+
2386 for (size_t capacity = 2 * 1024 / sizeof(T);; capacity *= 2) {
+
2387 switch (errno) {
+
2388 case EOVERFLOW:
+
2389 // Allocate on heap and retry.
+
2390 str.resize(offset + capacity);
+
2391 count = vsnprintf(&str[offset], capacity, format, locale, arg);
+
2392 if (0 <= count && count <= capacity) {
+
2393 str.resize(offset + count);
+
2394 return count;
+
2395 }
+
2396 break;
+
2397 case EINVAL: throw std::invalid_argument("invalid vsnprintf arguments");
+
2398 case EILSEQ: throw std::runtime_error("encoding error");
+
2399 default: throw std::runtime_error("failed to format string");
+
2400 }
+
2401 }
+
2402#endif
+
2403 return count;
+
2404 }
+
2405
+
2415 template<class T, class TR, class AX>
+
2416 inline size_t appendf(_Inout_ std::basic_string<T, TR, AX>& str, _In_z_ _Printf_format_string_params_(2) const T* format, _In_opt_ locale_t locale, ...)
+
2417 {
+
2418 va_list arg;
+
2419 va_start(arg, locale);
+
2420 size_t n = vappendf(str, format, locale, arg);
+
2421 va_end(arg);
+
2422 return n;
+
2423 }
+
2424
+
2433 template<class T, class TR, class AX>
+
2434 inline void vsprintf(_Inout_ std::basic_string<T, TR, AX>& str, _In_z_ _Printf_format_string_params_(2) const T* format, _In_opt_ locale_t locale, _In_ va_list arg)
+
2435 {
+
2436 str.clear();
+
2437 vappendf(str, format, locale, arg);
+
2438 }
+
2439
+
2447 template<class T, class TR, class AX>
+
2448 inline void sprintf(_Inout_ std::basic_string<T, TR, AX>& str, _In_z_ _Printf_format_string_params_(2) const T* format, _In_opt_ locale_t locale, ...)
+
2449 {
+
2450 va_list arg;
+
2451 va_start(arg, locale);
+
2452 vsprintf(str, format, locale, arg);
+
2453 va_end(arg);
+
2454 }
+
2455
+
2465 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
2466 inline std::basic_string<T, TR, AX> vsprintf(_In_z_ _Printf_format_string_params_(2) const T* format, _In_opt_ locale_t locale, _In_ va_list arg)
+
2467 {
+
2468 std::basic_string<T, TR, AX> str;
+
2469 vappendf(str, format, locale, arg);
+
2470 return str;
+
2471 }
+
2472
+
2481 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
2482 inline std::basic_string<T, TR, AX> sprintf(_In_z_ _Printf_format_string_params_(2) const T* format, _In_opt_ locale_t locale, ...)
+
2483 {
+
2484 va_list arg;
+
2485 va_start(arg, locale);
+
2486 auto str = vsprintf(format, locale, arg);
+
2487 va_end(arg);
+
2488 return str;
+
2489 }
2490
-
2499 template<class T, class TR, class AX>
-
2500 inline void strcatftime(_Inout_ std::basic_string<T, TR, AX>& str, _In_z_ _Printf_format_string_ const T* format, _In_ const struct tm* time, _In_opt_ locale_t locale)
-
2501 {
-
2502 T buf[1024 / sizeof(T)];
-
2503
-
2504 // Try with stack buffer first.
-
2505 size_t count = strftime(buf, _countof(buf), format, time, locale);
-
2506 if (count) {
-
2507 // Copy from stack.
-
2508 str.append(buf, count);
-
2509 return;
-
2510 }
-
2511 size_t offset = str.size();
-
2512 for (size_t capacity = 2 * 1024 / sizeof(T);; capacity *= 2) {
-
2513 // Allocate on heap and retry.
-
2514 str.resize(offset + capacity);
-
2515 count = strftime(&str[offset], capacity + 1, format, time, locale);
-
2516 if (count) {
-
2517 str.resize(offset + count);
-
2518 return;
-
2519 }
-
2520 }
-
2521 }
-
2522
-
2531 template<class T, class TR, class AX>
-
2532 inline void strftime(_Inout_ std::basic_string<T, TR, AX>& str, _In_z_ _Printf_format_string_ const T* format, _In_ const struct tm* time, _In_opt_ locale_t locale)
-
2533 {
-
2534 str.clear();
-
2535 strcatftime(str, format, time, locale);
-
2536 }
-
2537
-
2548 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
2549 inline std::basic_string<T, TR, AX> strftime(_In_z_ _Printf_format_string_ const T* format, _In_ const struct tm* time, _In_opt_ locale_t locale)
-
2550 {
-
2551 std::basic_string<T, TR, AX> str;
-
2552 strcatftime(str, format, time, locale);
-
2553 return str;
-
2554 }
-
2555
-
2561 //template<class T>
-
2562 //inline void strlwr(_Inout_z_ T* str)
-
2563 //{
-
2564 // _Assume_(str);
-
2565 // for (size_t i = 0; str[i]; ++i)
-
2566 // str[i] = tolower(str[i]);
-
2567 //}
-
2568
-
2575 //template<class T>
-
2576 //inline void strlwr(_Inout_z_ T* str, _In_ const std::locale& locale)
-
2577 //{
-
2578 // _Assume_(str);
-
2579 // const auto& ctype = std::use_facet<std::ctype<T>>(locale);
-
2580 // for (size_t i = 0; str[i]; ++i)
-
2581 // str[i] = ctype.tolower(str[i]);
-
2582 //}
-
2583
-
2590 template<class T>
-
2591 inline void strlwr(_Inout_updates_z_(count) T* str, _In_ size_t count)
-
2592 {
-
2593 _Assume_(str || !count);
-
2594 for (size_t i = 0; i < count && str[i]; ++i)
-
2595 str[i] = tolower(str[i]);
-
2596 }
-
2597
-
2605 template<class T>
-
2606 inline void strlwr(_Inout_updates_z_(count) T* str, _In_ size_t count, _In_ const std::locale& locale)
-
2607 {
-
2608 _Assume_(str || !count);
-
2609 const auto& ctype = std::use_facet<std::ctype<T>>(locale);
-
2610 for (size_t i = 0; i < count && str[i]; ++i)
-
2611 str[i] = ctype.tolower(str[i]);
-
2612 }
-
2613
-
2619 template<class T, size_t N>
-
2620 inline void strlwr(_Inout_ T (&str)[N])
-
2621 {
-
2622 strlwr(str, count);
-
2623 }
-
2624
-
2631 template<class T, size_t N>
-
2632 inline void strlwr(_Inout_ T (&str)[N], _In_ const std::locale& locale)
-
2633 {
-
2634 strlwr(str, count, locale);
-
2635 }
-
2636
-
2642 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
2643 inline void strlwr(_Inout_ std::basic_string<T, TR, AX>& str)
-
2644 {
-
2645 for (auto& c : str)
-
2646 c = tolower(c);
-
2647 }
-
2648
-
2655 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
2656 inline void strlwr(_Inout_ std::basic_string<T, TR, AX>& str, _In_ const std::locale& locale)
-
2657 {
-
2658 const auto& ctype = std::use_facet<std::ctype<T>>(locale);
-
2659 for (auto& c : str)
-
2660 c = ctype.tolower(c);
-
2661 }
-
2662
-
2668 //template<class T>
-
2669 //inline void strupr(_Inout_z_ T* str)
-
2670 //{
-
2671 // _Assume_(str);
-
2672 // for (size_t i = 0; str[i]; ++i)
-
2673 // str[i] = toupper(str[i]);
-
2674 //}
-
2675
-
2682 //template<class T>
-
2683 //inline void strupr(_Inout_z_ T* str, _In_ const std::locale& locale)
-
2684 //{
-
2685 // _Assume_(str);
-
2686 // const auto& ctype = std::use_facet<std::ctype<T>>(locale);
-
2687 // for (size_t i = 0; str[i]; ++i)
-
2688 // str[i] = ctype.toupper(str[i]);
-
2689 //}
-
2690
-
2697 template<class T>
-
2698 inline void strupr(_Inout_updates_z_(count) T* str, _In_ size_t count)
-
2699 {
-
2700 _Assume_(str || !count);
-
2701 for (size_t i = 0; i < count && str[i]; ++i)
-
2702 str[i] = toupper(str[i]);
-
2703 }
-
2704
-
2712 template<class T>
-
2713 inline void strupr(_Inout_updates_z_(count) T* str, _In_ size_t count, _In_ const std::locale& locale)
-
2714 {
-
2715 _Assume_(str || !count);
-
2716 const auto& ctype = std::use_facet<std::ctype<T>>(locale);
-
2717 for (size_t i = 0; i < count && str[i]; ++i)
-
2718 str[i] = ctype.toupper(str[i]);
-
2719 }
-
2720
-
2726 template<class T, size_t N>
-
2727 inline void strupr(_Inout_ T (&str)[N])
-
2728 {
-
2729 return strupr(str, N);
-
2730 }
-
2731
-
2738 template<class T, size_t N>
-
2739 inline void strupr(_Inout_ T (&str)[N], _In_ const std::locale& locale)
-
2740 {
-
2741 return strupr(str, N, locale);
-
2742 }
-
2743
-
2749 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
2750 inline void strupr(_Inout_ std::basic_string<T, TR, AX>& str)
-
2751 {
-
2752 for (auto& c : str)
-
2753 c = toupper(c);
-
2754 }
-
2755
-
2762 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
2763 inline void strupr(_Inout_ std::basic_string<T, TR, AX>& str, _In_ const std::locale& locale)
-
2764 {
-
2765 const auto& ctype = std::use_facet<std::ctype<T>>(locale);
-
2766 for (auto& c : str)
-
2767 c = ctype.toupper(c);
-
2768 }
-
2769
-
2778 template<class T>
-
2779 inline size_t ltrim(
-
2780 _Inout_z_count_(count) T* str, _In_ size_t count)
-
2781 {
-
2782 for (size_t i = 0;; ++i) {
-
2783 if (i >= count) {
-
2784 if (count) str[0] = 0;
-
2785 return 0;
-
2786 }
-
2787 if (!str[i]) {
-
2788 str[0] = 0;
-
2789 return 0;
-
2790 }
-
2791 if (!isspace(str[i])) {
-
2792 if (!i)
-
2793 return strnlen(str, count);
-
2794 size_t n = count != SIZE_MAX ? strncpy(str, str + i, count - i) : strcpy(str, str + i);
-
2795 str[n] = 0;
-
2796 return n;
-
2797 }
-
2798 }
-
2799 }
-
2800
-
2810 template<class T>
-
2811 inline size_t ltrim(
-
2812 _Inout_z_count_(count) T* str, _In_ size_t count,
-
2813 _In_ const std::locale& locale)
-
2814 {
-
2815 const auto& ctype = std::use_facet<std::ctype<T>>(locale);
-
2816 for (size_t i = 0;; ++i) {
-
2817 if (i >= count) {
-
2818 if (count) str[0] = 0;
-
2819 return 0;
-
2820 }
-
2821 if (!str[i]) {
-
2822 str[0] = 0;
-
2823 return 0;
-
2824 }
-
2825 if (!ctype.is(ctype.space, str[i])) {
-
2826 if (!i)
-
2827 return strnlen(str, count);
-
2828 size_t n = count != SIZE_MAX ? strncpy(str, str + i, count - i) : strcpy(str, str + i);
-
2829 str[n] = 0;
-
2830 return n;
-
2831 }
-
2832 }
-
2833 }
-
2834
-
2840 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
2841 inline void ltrim(_Inout_ std::basic_string<T, TR, AX>& s)
-
2842 {
-
2843 s.erase(
-
2844 s.begin(),
-
2845 std::find_if(
-
2846 s.begin(),
-
2847 s.end(),
-
2848 [&](_In_ T ch) { return !isspace(ch); }));
-
2849 }
-
2850
-
2857 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
2858 inline void ltrim(_Inout_ std::basic_string<T, TR, AX>& s, _In_ const std::locale& locale)
-
2859 {
-
2860 const auto& ctype = std::use_facet<std::ctype<T>>(locale);
-
2861 s.erase(
-
2862 s.begin(),
-
2863 std::find_if(
-
2864 s.begin(),
-
2865 s.end(),
-
2866 [&](_In_ T ch) { return !ctype.is(ctype.space, ch); }));
-
2867 }
-
2868
-
2877 template<class T>
-
2878 inline size_t rtrim(
-
2879 _Inout_z_count_(count) T* str, _In_ size_t count)
-
2880 {
-
2881 for (size_t i = 0, j = 0;;) {
-
2882 if (i >= count || !str[i]) {
-
2883 if (j < count) str[j] = 0;
-
2884 return j;
-
2885 }
-
2886 if (!isspace(str[i]))
-
2887 j = ++i;
-
2888 else
-
2889 ++i;
-
2890 }
-
2891 }
-
2892
-
2902 template<class T>
-
2903 inline size_t rtrim(
-
2904 _Inout_z_count_(count) T* str, _In_ size_t count,
-
2905 _In_ const std::locale& locale)
-
2906 {
-
2907 const auto& ctype = std::use_facet<std::ctype<T>>(locale);
-
2908 for (size_t i = 0, j = 0;;) {
-
2909 if (i >= count || !str[i]) {
-
2910 if (j < count) str[j] = 0;
-
2911 return j;
-
2912 }
-
2913 if (!ctype.is(ctype.space, str[i]))
-
2914 j = ++i;
-
2915 else
-
2916 ++i;
-
2917 }
-
2918 }
-
2919
-
2925 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
2926 static inline void rtrim(_Inout_ std::basic_string<T, TR, AX>& s)
-
2927 {
-
2928 s.erase(
-
2929 std::find_if(
-
2930 s.rbegin(),
-
2931 s.rend(),
-
2932 [&](_In_ T ch) { return !isspace(ch); }).base(),
-
2933 s.end());
-
2934 }
-
2935
-
2942 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
2943 static inline void rtrim(_Inout_ std::basic_string<T, TR, AX>& s, _In_ const std::locale& locale)
-
2944 {
-
2945 const auto& ctype = std::use_facet<std::ctype<T>>(locale);
-
2946 s.erase(
-
2947 std::find_if(
-
2948 s.rbegin(),
-
2949 s.rend(),
-
2950 [&](_In_ T ch) { return !ctype.is(ctype.space, ch); }).base(),
-
2951 s.end());
-
2952 }
-
2953
-
2962 template<class T>
-
2963 inline size_t trim(
-
2964 _Inout_z_count_(count) T* str, _In_ size_t count)
-
2965 {
-
2966 return ltrim(str, rtrim(str, count));
-
2967 }
-
2968
-
2978 template<class T>
-
2979 inline size_t trim(
-
2980 _Inout_z_count_(count) T* str, _In_ size_t count,
-
2981 _In_ const std::locale& locale)
-
2982 {
-
2983 return ltrim(str, rtrim(str, count, locale), locale);
-
2984 }
-
2985
-
2991 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
2992 static inline void trim(_Inout_ std::basic_string<T, TR, AX>& s)
-
2993 {
-
2994 auto nonspace = [&](_In_ T ch) { return !isspace(ch); };
-
2995 s.erase(
-
2996 s.begin(),
-
2997 std::find_if(
-
2998 s.begin(),
-
2999 s.end(),
-
3000 nonspace));
-
3001 s.erase(
-
3002 std::find_if(
-
3003 s.rbegin(),
-
3004 s.rend(),
-
3005 nonspace).base(),
-
3006 s.end());
-
3007 }
-
3008
-
3015 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
3016 static inline void trim(_Inout_ std::basic_string<T, TR, AX>& s, _In_ const std::locale& locale)
-
3017 {
-
3018 const auto& ctype = std::use_facet<std::ctype<T>>(locale);
-
3019 auto nonspace = [&](_In_ T ch) { return !ctype.is(ctype.space, ch); };
+
2492 inline size_t strftime(_Out_z_cap_(capacity) char* str, _In_ size_t capacity, _In_z_ _Printf_format_string_ const char* format, _In_ const struct tm* time, _In_opt_ locale_t locale)
+
2493 {
+
2494#ifdef _WIN32
+
2495 return _strftime_l(str, capacity, format, time, locale);
+
2496#else
+
2497 return strftime_l(str, capacity, format, time, locale);
+
2498#endif
+
2499 }
+
2500
+
2501 inline size_t strftime(_Out_z_cap_(capacity) wchar_t* str, _In_ size_t capacity, _In_z_ _Printf_format_string_ const wchar_t* format, _In_ const struct tm* time, _In_opt_ locale_t locale)
+
2502 {
+
2503#ifdef _WIN32
+
2504 return _wcsftime_l(str, capacity, format, time, locale);
+
2505#else
+
2506 return wcsftime_l(str, capacity, format, time, locale);
+
2507#endif
+
2508 }
+
2510
+
2519 template<class T, class TR, class AX>
+
2520 inline void strcatftime(_Inout_ std::basic_string<T, TR, AX>& str, _In_z_ _Printf_format_string_ const T* format, _In_ const struct tm* time, _In_opt_ locale_t locale)
+
2521 {
+
2522 T buf[1024 / sizeof(T)];
+
2523
+
2524 // Try with stack buffer first.
+
2525 size_t count = strftime(buf, _countof(buf), format, time, locale);
+
2526 if (count) {
+
2527 // Copy from stack.
+
2528 str.append(buf, count);
+
2529 return;
+
2530 }
+
2531 size_t offset = str.size();
+
2532 for (size_t capacity = 2 * 1024 / sizeof(T);; capacity *= 2) {
+
2533 // Allocate on heap and retry.
+
2534 str.resize(offset + capacity);
+
2535 count = strftime(&str[offset], capacity + 1, format, time, locale);
+
2536 if (count) {
+
2537 str.resize(offset + count);
+
2538 return;
+
2539 }
+
2540 }
+
2541 }
+
2542
+
2551 template<class T, class TR, class AX>
+
2552 inline void strftime(_Inout_ std::basic_string<T, TR, AX>& str, _In_z_ _Printf_format_string_ const T* format, _In_ const struct tm* time, _In_opt_ locale_t locale)
+
2553 {
+
2554 str.clear();
+
2555 strcatftime(str, format, time, locale);
+
2556 }
+
2557
+
2567 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
2568 inline std::basic_string<T, TR, AX> strftime(_In_z_ _Printf_format_string_ const T* format, _In_ const struct tm* time, _In_opt_ locale_t locale)
+
2569 {
+
2570 std::basic_string<T, TR, AX> str;
+
2571 strcatftime(str, format, time, locale);
+
2572 return str;
+
2573 }
+
2574
+
2580 //template<class T>
+
2581 //inline void strlwr(_Inout_z_ T* str)
+
2582 //{
+
2583 // _Assume_(str);
+
2584 // for (size_t i = 0; str[i]; ++i)
+
2585 // str[i] = tolower(str[i]);
+
2586 //}
+
2587
+
2594 //template<class T>
+
2595 //inline void strlwr(_Inout_z_ T* str, _In_ const std::locale& locale)
+
2596 //{
+
2597 // _Assume_(str);
+
2598 // const auto& ctype = std::use_facet<std::ctype<T>>(locale);
+
2599 // for (size_t i = 0; str[i]; ++i)
+
2600 // str[i] = ctype.tolower(str[i]);
+
2601 //}
+
2602
+
2609 template<class T>
+
2610 inline void strlwr(_Inout_updates_z_(count) T* str, _In_ size_t count)
+
2611 {
+
2612 _Assume_(str || !count);
+
2613 for (size_t i = 0; i < count && str[i]; ++i)
+
2614 str[i] = tolower(str[i]);
+
2615 }
+
2616
+
2624 template<class T>
+
2625 inline void strlwr(_Inout_updates_z_(count) T* str, _In_ size_t count, _In_ const std::locale& locale)
+
2626 {
+
2627 _Assume_(str || !count);
+
2628 const auto& ctype = std::use_facet<std::ctype<T>>(locale);
+
2629 for (size_t i = 0; i < count && str[i]; ++i)
+
2630 str[i] = ctype.tolower(str[i]);
+
2631 }
+
2632
+
2638 template<class T, size_t N>
+
2639 inline void strlwr(_Inout_ T (&str)[N])
+
2640 {
+
2641 strlwr(str, N);
+
2642 }
+
2643
+
2650 template<class T, size_t N>
+
2651 inline void strlwr(_Inout_ T (&str)[N], _In_ const std::locale& locale)
+
2652 {
+
2653 strlwr(str, N, locale);
+
2654 }
+
2655
+
2661 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
2662 inline void strlwr(_Inout_ std::basic_string<T, TR, AX>& str)
+
2663 {
+
2664 for (auto& c : str)
+
2665 c = tolower(c);
+
2666 }
+
2667
+
2674 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
2675 inline void strlwr(_Inout_ std::basic_string<T, TR, AX>& str, _In_ const std::locale& locale)
+
2676 {
+
2677 const auto& ctype = std::use_facet<std::ctype<T>>(locale);
+
2678 for (auto& c : str)
+
2679 c = ctype.tolower(c);
+
2680 }
+
2681
+
2687 //template<class T>
+
2688 //inline void strupr(_Inout_z_ T* str)
+
2689 //{
+
2690 // _Assume_(str);
+
2691 // for (size_t i = 0; str[i]; ++i)
+
2692 // str[i] = toupper(str[i]);
+
2693 //}
+
2694
+
2701 //template<class T>
+
2702 //inline void strupr(_Inout_z_ T* str, _In_ const std::locale& locale)
+
2703 //{
+
2704 // _Assume_(str);
+
2705 // const auto& ctype = std::use_facet<std::ctype<T>>(locale);
+
2706 // for (size_t i = 0; str[i]; ++i)
+
2707 // str[i] = ctype.toupper(str[i]);
+
2708 //}
+
2709
+
2716 template<class T>
+
2717 inline void strupr(_Inout_updates_z_(count) T* str, _In_ size_t count)
+
2718 {
+
2719 _Assume_(str || !count);
+
2720 for (size_t i = 0; i < count && str[i]; ++i)
+
2721 str[i] = toupper(str[i]);
+
2722 }
+
2723
+
2731 template<class T>
+
2732 inline void strupr(_Inout_updates_z_(count) T* str, _In_ size_t count, _In_ const std::locale& locale)
+
2733 {
+
2734 _Assume_(str || !count);
+
2735 const auto& ctype = std::use_facet<std::ctype<T>>(locale);
+
2736 for (size_t i = 0; i < count && str[i]; ++i)
+
2737 str[i] = ctype.toupper(str[i]);
+
2738 }
+
2739
+
2745 template<class T, size_t N>
+
2746 inline void strupr(_Inout_ T (&str)[N])
+
2747 {
+
2748 return strupr(str, N);
+
2749 }
+
2750
+
2757 template<class T, size_t N>
+
2758 inline void strupr(_Inout_ T (&str)[N], _In_ const std::locale& locale)
+
2759 {
+
2760 return strupr(str, N, locale);
+
2761 }
+
2762
+
2768 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
2769 inline void strupr(_Inout_ std::basic_string<T, TR, AX>& str)
+
2770 {
+
2771 for (auto& c : str)
+
2772 c = toupper(c);
+
2773 }
+
2774
+
2781 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
2782 inline void strupr(_Inout_ std::basic_string<T, TR, AX>& str, _In_ const std::locale& locale)
+
2783 {
+
2784 const auto& ctype = std::use_facet<std::ctype<T>>(locale);
+
2785 for (auto& c : str)
+
2786 c = ctype.toupper(c);
+
2787 }
+
2788
+
2797 template<class T>
+
2798 inline size_t ltrim(
+
2799 _Inout_z_count_(count) T* str, _In_ size_t count)
+
2800 {
+
2801 for (size_t i = 0;; ++i) {
+
2802 if (i >= count) {
+
2803 if (count) str[0] = 0;
+
2804 return 0;
+
2805 }
+
2806 if (!str[i]) {
+
2807 str[0] = 0;
+
2808 return 0;
+
2809 }
+
2810 if (!isspace(str[i])) {
+
2811 if (!i)
+
2812 return strnlen(str, count);
+
2813 size_t n = count != SIZE_MAX ? strncpy(str, str + i, count - i) : strcpy(str, str + i);
+
2814 str[n] = 0;
+
2815 return n;
+
2816 }
+
2817 }
+
2818 }
+
2819
+
2829 template<class T>
+
2830 inline size_t ltrim(
+
2831 _Inout_z_count_(count) T* str, _In_ size_t count,
+
2832 _In_ const std::locale& locale)
+
2833 {
+
2834 const auto& ctype = std::use_facet<std::ctype<T>>(locale);
+
2835 for (size_t i = 0;; ++i) {
+
2836 if (i >= count) {
+
2837 if (count) str[0] = 0;
+
2838 return 0;
+
2839 }
+
2840 if (!str[i]) {
+
2841 str[0] = 0;
+
2842 return 0;
+
2843 }
+
2844 if (!ctype.is(ctype.space, str[i])) {
+
2845 if (!i)
+
2846 return strnlen(str, count);
+
2847 size_t n = count != SIZE_MAX ? strncpy(str, str + i, count - i) : strcpy(str, str + i);
+
2848 str[n] = 0;
+
2849 return n;
+
2850 }
+
2851 }
+
2852 }
+
2853
+
2859 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
2860 inline void ltrim(_Inout_ std::basic_string<T, TR, AX>& s)
+
2861 {
+
2862 s.erase(
+
2863 s.begin(),
+
2864 std::find_if(
+
2865 s.begin(),
+
2866 s.end(),
+
2867 [&](_In_ T ch) { return !isspace(ch); }));
+
2868 }
+
2869
+
2876 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
2877 inline void ltrim(_Inout_ std::basic_string<T, TR, AX>& s, _In_ const std::locale& locale)
+
2878 {
+
2879 const auto& ctype = std::use_facet<std::ctype<T>>(locale);
+
2880 s.erase(
+
2881 s.begin(),
+
2882 std::find_if(
+
2883 s.begin(),
+
2884 s.end(),
+
2885 [&](_In_ T ch) { return !ctype.is(ctype.space, ch); }));
+
2886 }
+
2887
+
2896 template<class T>
+
2897 inline size_t rtrim(
+
2898 _Inout_z_count_(count) T* str, _In_ size_t count)
+
2899 {
+
2900 for (size_t i = 0, j = 0;;) {
+
2901 if (i >= count || !str[i]) {
+
2902 if (j < count) str[j] = 0;
+
2903 return j;
+
2904 }
+
2905 if (!isspace(str[i]))
+
2906 j = ++i;
+
2907 else
+
2908 ++i;
+
2909 }
+
2910 }
+
2911
+
2921 template<class T>
+
2922 inline size_t rtrim(
+
2923 _Inout_z_count_(count) T* str, _In_ size_t count,
+
2924 _In_ const std::locale& locale)
+
2925 {
+
2926 const auto& ctype = std::use_facet<std::ctype<T>>(locale);
+
2927 for (size_t i = 0, j = 0;;) {
+
2928 if (i >= count || !str[i]) {
+
2929 if (j < count) str[j] = 0;
+
2930 return j;
+
2931 }
+
2932 if (!ctype.is(ctype.space, str[i]))
+
2933 j = ++i;
+
2934 else
+
2935 ++i;
+
2936 }
+
2937 }
+
2938
+
2944 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
2945 static inline void rtrim(_Inout_ std::basic_string<T, TR, AX>& s)
+
2946 {
+
2947 s.erase(
+
2948 std::find_if(
+
2949 s.rbegin(),
+
2950 s.rend(),
+
2951 [&](_In_ T ch) { return !isspace(ch); }).base(),
+
2952 s.end());
+
2953 }
+
2954
+
2961 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
2962 static inline void rtrim(_Inout_ std::basic_string<T, TR, AX>& s, _In_ const std::locale& locale)
+
2963 {
+
2964 const auto& ctype = std::use_facet<std::ctype<T>>(locale);
+
2965 s.erase(
+
2966 std::find_if(
+
2967 s.rbegin(),
+
2968 s.rend(),
+
2969 [&](_In_ T ch) { return !ctype.is(ctype.space, ch); }).base(),
+
2970 s.end());
+
2971 }
+
2972
+
2981 template<class T>
+
2982 inline size_t trim(
+
2983 _Inout_z_count_(count) T* str, _In_ size_t count)
+
2984 {
+
2985 return ltrim(str, rtrim(str, count));
+
2986 }
+
2987
+
2997 template<class T>
+
2998 inline size_t trim(
+
2999 _Inout_z_count_(count) T* str, _In_ size_t count,
+
3000 _In_ const std::locale& locale)
+
3001 {
+
3002 return ltrim(str, rtrim(str, count, locale), locale);
+
3003 }
+
3004
+
3010 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
3011 static inline void trim(_Inout_ std::basic_string<T, TR, AX>& s)
+
3012 {
+
3013 auto nonspace = [&](_In_ T ch) { return !isspace(ch); };
+
3014 s.erase(
+
3015 s.begin(),
+
3016 std::find_if(
+
3017 s.begin(),
+
3018 s.end(),
+
3019 nonspace));
3020 s.erase(
-
3021 s.begin(),
-
3022 std::find_if(
-
3023 s.begin(),
-
3024 s.end(),
-
3025 nonspace));
-
3026 s.erase(
-
3027 std::find_if(
-
3028 s.rbegin(),
-
3029 s.rend(),
-
3030 nonspace).base(),
-
3031 s.end());
-
3032 }
-
3033}
+
3021 std::find_if(
+
3022 s.rbegin(),
+
3023 s.rend(),
+
3024 nonspace).base(),
+
3025 s.end());
+
3026 }
+
3027
+
3034 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
3035 static inline void trim(_Inout_ std::basic_string<T, TR, AX>& s, _In_ const std::locale& locale)
+
3036 {
+
3037 const auto& ctype = std::use_facet<std::ctype<T>>(locale);
+
3038 auto nonspace = [&](_In_ T ch) { return !ctype.is(ctype.space, ch); };
+
3039 s.erase(
+
3040 s.begin(),
+
3041 std::find_if(
+
3042 s.begin(),
+
3043 s.end(),
+
3044 nonspace));
+
3045 s.erase(
+
3046 std::find_if(
+
3047 s.rbegin(),
+
3048 s.rend(),
+
3049 nonspace).base(),
+
3050 s.end());
+
3051 }
+
3052}
diff --git a/structstdex_1_1chrono_1_1aosn__date-members.html b/structstdex_1_1chrono_1_1aosn__date-members.html index 3ad660887..1c723308f 100644 --- a/structstdex_1_1chrono_1_1aosn__date-members.html +++ b/structstdex_1_1chrono_1_1aosn__date-members.html @@ -98,7 +98,7 @@ $(function() {
diff --git a/structstdex_1_1chrono_1_1aosn__date.html b/structstdex_1_1chrono_1_1aosn__date.html index fbc450bee..06ad9337c 100644 --- a/structstdex_1_1chrono_1_1aosn__date.html +++ b/structstdex_1_1chrono_1_1aosn__date.html @@ -154,7 +154,7 @@ static constexpr bool is_s
diff --git a/structstdex_1_1chrono_1_1aosn__timestamp-members.html b/structstdex_1_1chrono_1_1aosn__timestamp-members.html index 0826a01c8..10b640098 100644 --- a/structstdex_1_1chrono_1_1aosn__timestamp-members.html +++ b/structstdex_1_1chrono_1_1aosn__timestamp-members.html @@ -112,7 +112,7 @@ $(function() {
diff --git a/structstdex_1_1chrono_1_1aosn__timestamp.html b/structstdex_1_1chrono_1_1aosn__timestamp.html index 1406b9c29..30be03fb5 100644 --- a/structstdex_1_1chrono_1_1aosn__timestamp.html +++ b/structstdex_1_1chrono_1_1aosn__timestamp.html @@ -199,7 +199,7 @@ static constexpr rep one_w diff --git a/structstdex_1_1free__locale__delete-members.html b/structstdex_1_1free__locale__delete-members.html index 6d1eb5d0b..b96e61fc4 100644 --- a/structstdex_1_1free__locale__delete-members.html +++ b/structstdex_1_1free__locale__delete-members.html @@ -86,7 +86,7 @@ $(function() { diff --git a/structstdex_1_1free__locale__delete.html b/structstdex_1_1free__locale__delete.html index 916cfe165..a0cd9336c 100644 --- a/structstdex_1_1free__locale__delete.html +++ b/structstdex_1_1free__locale__delete.html @@ -103,7 +103,7 @@ void operator() (local diff --git a/structstdex_1_1html_1_1element__traits-members.html b/structstdex_1_1html_1_1element__traits-members.html index 47521e413..85ca3927d 100644 --- a/structstdex_1_1html_1_1element__traits-members.html +++ b/structstdex_1_1html_1_1element__traits-members.html @@ -104,7 +104,7 @@ $(function() { diff --git a/structstdex_1_1html_1_1element__traits.html b/structstdex_1_1html_1_1element__traits.html index a616ae797..b4ae9241e 100644 --- a/structstdex_1_1html_1_1element__traits.html +++ b/structstdex_1_1html_1_1element__traits.html @@ -130,7 +130,7 @@ Static Public Member Functions  May element be a part of document head?
  static bool is_pre_exclusion (element_t code) - May element be a part of.
+ May element be a part of <pre></pre>?
  static bool is_html_content (element_t code)  Does element represent the document body?
@@ -618,17 +618,14 @@ template<class T >
-

May element be a part of.

-
?
-
+

May element be a part of <pre></pre>?

Parameters
- +
[in]code Element code -
[in]codeElement code
-
+
@@ -821,7 +818,7 @@ template<class T > diff --git a/structstdex_1_1html_1_1entity-members.html b/structstdex_1_1html_1_1entity-members.html index 4faf4eeb1..66d88b1a2 100644 --- a/structstdex_1_1html_1_1entity-members.html +++ b/structstdex_1_1html_1_1entity-members.html @@ -87,7 +87,7 @@ $(function() { diff --git a/structstdex_1_1html_1_1entity.html b/structstdex_1_1html_1_1entity.html index 6601f7131..1be88a93f 100644 --- a/structstdex_1_1html_1_1entity.html +++ b/structstdex_1_1html_1_1entity.html @@ -108,7 +108,7 @@ struct stdex::html::entity< T, TR, AX >

HTML entity.

diff --git a/structstdex_1_1html_1_1inserted__token-members.html b/structstdex_1_1html_1_1inserted__token-members.html index 08a5bca2b..51bd4372f 100644 --- a/structstdex_1_1html_1_1inserted__token-members.html +++ b/structstdex_1_1html_1_1inserted__token-members.html @@ -89,7 +89,7 @@ $(function() { diff --git a/structstdex_1_1html_1_1inserted__token.html b/structstdex_1_1html_1_1inserted__token.html index 3934317bb..f261c092d 100644 --- a/structstdex_1_1html_1_1inserted__token.html +++ b/structstdex_1_1html_1_1inserted__token.html @@ -115,7 +115,7 @@ bool after_word diff --git a/structstdex_1_1interval-members.html b/structstdex_1_1interval-members.html index d2f2e903f..965d9cbac 100644 --- a/structstdex_1_1interval-members.html +++ b/structstdex_1_1interval-members.html @@ -107,7 +107,7 @@ $(function() { diff --git a/structstdex_1_1interval.html b/structstdex_1_1interval.html index 8760785ff..7ef9b9662 100644 --- a/structstdex_1_1interval.html +++ b/structstdex_1_1interval.html @@ -785,7 +785,7 @@ template<class T > diff --git a/structstdex_1_1mapping-members.html b/structstdex_1_1mapping-members.html index 9e94f6d64..112413cba 100644 --- a/structstdex_1_1mapping-members.html +++ b/structstdex_1_1mapping-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/structstdex_1_1mapping.html b/structstdex_1_1mapping.html index 5d44dfc43..b6bb063bb 100644 --- a/structstdex_1_1mapping.html +++ b/structstdex_1_1mapping.html @@ -314,7 +314,7 @@ template<class T > diff --git a/structstdex_1_1no__delete-members.html b/structstdex_1_1no__delete-members.html index 45c0e5ae7..5d296d5fd 100644 --- a/structstdex_1_1no__delete-members.html +++ b/structstdex_1_1no__delete-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/structstdex_1_1no__delete.html b/structstdex_1_1no__delete.html index 5db0676b9..12b68f42d 100644 --- a/structstdex_1_1no__delete.html +++ b/structstdex_1_1no__delete.html @@ -107,7 +107,7 @@ struct stdex::no_delete< T >

Noop deleter.

diff --git a/structstdex_1_1no__delete_3_01_t_0f_0e_4-members.html b/structstdex_1_1no__delete_3_01_t_0f_0e_4-members.html index ae69471cb..155d3ee40 100644 --- a/structstdex_1_1no__delete_3_01_t_0f_0e_4-members.html +++ b/structstdex_1_1no__delete_3_01_t_0f_0e_4-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/structstdex_1_1no__delete_3_01_t_0f_0e_4.html b/structstdex_1_1no__delete_3_01_t_0f_0e_4.html index 9f5d0c060..9b1c26227 100644 --- a/structstdex_1_1no__delete_3_01_t_0f_0e_4.html +++ b/structstdex_1_1no__delete_3_01_t_0f_0e_4.html @@ -108,7 +108,7 @@ struct stdex::no_delete< T[]>

Noop array deleter.

diff --git a/structstdex_1_1parser_1_1html__attribute-members.html b/structstdex_1_1parser_1_1html__attribute-members.html index 51507207a..772d24e85 100644 --- a/structstdex_1_1parser_1_1html__attribute-members.html +++ b/structstdex_1_1parser_1_1html__attribute-members.html @@ -87,7 +87,7 @@ $(function() { diff --git a/structstdex_1_1parser_1_1html__attribute.html b/structstdex_1_1parser_1_1html__attribute.html index bc95cc61f..b3df00463 100644 --- a/structstdex_1_1parser_1_1html__attribute.html +++ b/structstdex_1_1parser_1_1html__attribute.html @@ -107,7 +107,7 @@ Public Attributes diff --git a/structstdex_1_1parser_1_1http__factor__more-members.html b/structstdex_1_1parser_1_1http__factor__more-members.html index 6ff46d2c0..8191e24bc 100644 --- a/structstdex_1_1parser_1_1http__factor__more-members.html +++ b/structstdex_1_1parser_1_1http__factor__more-members.html @@ -86,7 +86,7 @@ $(function() { diff --git a/structstdex_1_1parser_1_1http__factor__more.html b/structstdex_1_1parser_1_1http__factor__more.html index 79addf010..c81995359 100644 --- a/structstdex_1_1parser_1_1http__factor__more.html +++ b/structstdex_1_1parser_1_1http__factor__more.html @@ -95,7 +95,7 @@ Public Member Functions diff --git a/structstdex_1_1stream_1_1buffer_1_1buffer__t-members.html b/structstdex_1_1stream_1_1buffer_1_1buffer__t-members.html index a2e0320aa..a959c53a7 100644 --- a/structstdex_1_1stream_1_1buffer_1_1buffer__t-members.html +++ b/structstdex_1_1stream_1_1buffer_1_1buffer__t-members.html @@ -91,7 +91,7 @@ $(function() { diff --git a/structstdex_1_1stream_1_1buffer_1_1buffer__t.html b/structstdex_1_1stream_1_1buffer_1_1buffer__t.html index 80c9ef68b..976920296 100644 --- a/structstdex_1_1stream_1_1buffer_1_1buffer__t.html +++ b/structstdex_1_1stream_1_1buffer_1_1buffer__t.html @@ -111,7 +111,7 @@ size_t capacity diff --git a/structstdex_1_1stream_1_1fifo_1_1node__t-members.html b/structstdex_1_1stream_1_1fifo_1_1node__t-members.html index 41a3d2e13..0fc6d66ac 100644 --- a/structstdex_1_1stream_1_1fifo_1_1node__t-members.html +++ b/structstdex_1_1stream_1_1fifo_1_1node__t-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/structstdex_1_1stream_1_1fifo_1_1node__t.html b/structstdex_1_1stream_1_1fifo_1_1node__t.html index 273e395fa..acfe705a9 100644 --- a/structstdex_1_1stream_1_1fifo_1_1node__t.html +++ b/structstdex_1_1stream_1_1fifo_1_1node__t.html @@ -101,7 +101,7 @@ uint8_t data [0]< diff --git a/structstdex_1_1sys__info__t-members.html b/structstdex_1_1sys__info__t-members.html index d37af003b..980bfb5db 100644 --- a/structstdex_1_1sys__info__t-members.html +++ b/structstdex_1_1sys__info__t-members.html @@ -92,7 +92,7 @@ $(function() { diff --git a/structstdex_1_1sys__info__t.html b/structstdex_1_1sys__info__t.html index 0b332c9bd..28396fef0 100644 --- a/structstdex_1_1sys__info__t.html +++ b/structstdex_1_1sys__info__t.html @@ -147,7 +147,7 @@ struct utsname m_utsn< diff --git a/structstdex_1_1wav_1_1cue-members.html b/structstdex_1_1wav_1_1cue-members.html index bf32d8795..651a05a7d 100644 --- a/structstdex_1_1wav_1_1cue-members.html +++ b/structstdex_1_1wav_1_1cue-members.html @@ -91,7 +91,7 @@ $(function() { diff --git a/structstdex_1_1wav_1_1cue.html b/structstdex_1_1wav_1_1cue.html index e692c5794..943c7efe0 100644 --- a/structstdex_1_1wav_1_1cue.html +++ b/structstdex_1_1wav_1_1cue.html @@ -132,7 +132,7 @@ uint32_t block_offset diff --git a/structstdex_1_1wav_1_1cue__ex-members.html b/structstdex_1_1wav_1_1cue__ex-members.html index 4f3821322..bf7ce3d49 100644 --- a/structstdex_1_1wav_1_1cue__ex-members.html +++ b/structstdex_1_1wav_1_1cue__ex-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/structstdex_1_1wav_1_1cue__ex.html b/structstdex_1_1wav_1_1cue__ex.html index ba8529595..10a32bb69 100644 --- a/structstdex_1_1wav_1_1cue__ex.html +++ b/structstdex_1_1wav_1_1cue__ex.html @@ -169,7 +169,7 @@ uint32_t block_offset diff --git a/structstdex_1_1wav_1_1data-members.html b/structstdex_1_1wav_1_1data-members.html index 37f0256f0..06bc56a45 100644 --- a/structstdex_1_1wav_1_1data-members.html +++ b/structstdex_1_1wav_1_1data-members.html @@ -89,7 +89,7 @@ $(function() { diff --git a/structstdex_1_1wav_1_1data.html b/structstdex_1_1wav_1_1data.html index f04cfe786..b3c422b37 100644 --- a/structstdex_1_1wav_1_1data.html +++ b/structstdex_1_1wav_1_1data.html @@ -120,7 +120,7 @@ Friends diff --git a/structstdex_1_1wav_1_1format-members.html b/structstdex_1_1wav_1_1format-members.html index 26db6bb05..a117cb4b1 100644 --- a/structstdex_1_1wav_1_1format-members.html +++ b/structstdex_1_1wav_1_1format-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/structstdex_1_1wav_1_1format.html b/structstdex_1_1wav_1_1format.html index 39c4a3cee..f1dc52af0 100644 --- a/structstdex_1_1wav_1_1format.html +++ b/structstdex_1_1wav_1_1format.html @@ -211,7 +211,7 @@ Friends diff --git a/structstdex_1_1wav_1_1header-members.html b/structstdex_1_1wav_1_1header-members.html index 8bf0d68de..ca497752b 100644 --- a/structstdex_1_1wav_1_1header-members.html +++ b/structstdex_1_1wav_1_1header-members.html @@ -89,7 +89,7 @@ $(function() { diff --git a/structstdex_1_1wav_1_1header.html b/structstdex_1_1wav_1_1header.html index 7887a2d68..c9dcc24b0 100644 --- a/structstdex_1_1wav_1_1header.html +++ b/structstdex_1_1wav_1_1header.html @@ -130,7 +130,7 @@ Friends diff --git a/structstdex_1_1wav_1_1label-members.html b/structstdex_1_1wav_1_1label-members.html index 49bd46406..6e98c5c9d 100644 --- a/structstdex_1_1wav_1_1label-members.html +++ b/structstdex_1_1wav_1_1label-members.html @@ -90,7 +90,7 @@ $(function() { diff --git a/structstdex_1_1wav_1_1label.html b/structstdex_1_1wav_1_1label.html index 00eea1fe2..f233b015e 100644 --- a/structstdex_1_1wav_1_1label.html +++ b/structstdex_1_1wav_1_1label.html @@ -124,7 +124,7 @@ Friends diff --git a/structstdex_1_1wav_1_1list-members.html b/structstdex_1_1wav_1_1list-members.html index 48d83ebfe..0f04b5f2b 100644 --- a/structstdex_1_1wav_1_1list-members.html +++ b/structstdex_1_1wav_1_1list-members.html @@ -87,7 +87,7 @@ $(function() { diff --git a/structstdex_1_1wav_1_1list.html b/structstdex_1_1wav_1_1list.html index 7eff9534d..3fb83d8c9 100644 --- a/structstdex_1_1wav_1_1list.html +++ b/structstdex_1_1wav_1_1list.html @@ -123,7 +123,7 @@ id_t type = 0 diff --git a/structstdex_1_1wav_1_1ltxt-members.html b/structstdex_1_1wav_1_1ltxt-members.html index e51d899eb..8946db6f7 100644 --- a/structstdex_1_1wav_1_1ltxt-members.html +++ b/structstdex_1_1wav_1_1ltxt-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/structstdex_1_1wav_1_1ltxt.html b/structstdex_1_1wav_1_1ltxt.html index 2ecd0264c..30b1f7ae3 100644 --- a/structstdex_1_1wav_1_1ltxt.html +++ b/structstdex_1_1wav_1_1ltxt.html @@ -148,7 +148,7 @@ Friends diff --git a/structstdex_1_1wav_1_1note-members.html b/structstdex_1_1wav_1_1note-members.html index b788b4fa1..3f005e576 100644 --- a/structstdex_1_1wav_1_1note-members.html +++ b/structstdex_1_1wav_1_1note-members.html @@ -90,7 +90,7 @@ $(function() { diff --git a/structstdex_1_1wav_1_1note.html b/structstdex_1_1wav_1_1note.html index f148ccf5b..ed9cec61d 100644 --- a/structstdex_1_1wav_1_1note.html +++ b/structstdex_1_1wav_1_1note.html @@ -124,7 +124,7 @@ Friends diff --git a/structstdex_1_1wav_1_1silence-members.html b/structstdex_1_1wav_1_1silence-members.html index f977cb308..b3779fa6e 100644 --- a/structstdex_1_1wav_1_1silence-members.html +++ b/structstdex_1_1wav_1_1silence-members.html @@ -89,7 +89,7 @@ $(function() { diff --git a/structstdex_1_1wav_1_1silence.html b/structstdex_1_1wav_1_1silence.html index bcf995b48..0be9c0388 100644 --- a/structstdex_1_1wav_1_1silence.html +++ b/structstdex_1_1wav_1_1silence.html @@ -120,7 +120,7 @@ Friends diff --git a/structstdex_1_1wav_1_1wave-members.html b/structstdex_1_1wav_1_1wave-members.html index 7d99626e1..24aec90cd 100644 --- a/structstdex_1_1wav_1_1wave-members.html +++ b/structstdex_1_1wav_1_1wave-members.html @@ -87,7 +87,7 @@ $(function() { diff --git a/structstdex_1_1wav_1_1wave.html b/structstdex_1_1wav_1_1wave.html index 850fbe0db..09450480c 100644 --- a/structstdex_1_1wav_1_1wave.html +++ b/structstdex_1_1wav_1_1wave.html @@ -123,7 +123,7 @@ id_t type = 0 diff --git a/sys__info_8hpp_source.html b/sys__info_8hpp_source.html index a44abedaf..09eca55f9 100644 --- a/sys__info_8hpp_source.html +++ b/sys__info_8hpp_source.html @@ -93,7 +93,7 @@ $(function() { codefold.init(0); });
7
8#include "compat.hpp"
9#include "system.hpp"
-
10#ifdef _WIN32
+
10#if defined(_WIN32)
11#include "windows.h"
12#include <stdlib.h>
13#include <tchar.h>
@@ -118,12 +118,12 @@ $(function() { codefold.init(0); });
35constexpr stdex::platform_id IMAGE_FILE_MACHINE_ARMNT = "arm";
36constexpr stdex::platform_id IMAGE_FILE_MACHINE_ARM64 = "aarch64";
37
-
38inline bool operator ==(_In_ const stdex::platform_id a, _In_ const stdex::platform_id b) { return a == b; }
-
39inline bool operator !=(_In_ const stdex::platform_id a, _In_ const stdex::platform_id b) { return a != b; }
-
40inline bool operator <(_In_ const stdex::platform_id a, _In_ const stdex::platform_id b) { return a == IMAGE_FILE_MACHINE_UNKNOWN && b != IMAGE_FILE_MACHINE_UNKNOWN || a != IMAGE_FILE_MACHINE_UNKNOWN && b != IMAGE_FILE_MACHINE_UNKNOWN && strcmp(a, b) < 0; }
-
41inline bool operator <=(_In_ const stdex::platform_id a, _In_ const stdex::platform_id b) { return a == IMAGE_FILE_MACHINE_UNKNOWN || a != IMAGE_FILE_MACHINE_UNKNOWN && b != IMAGE_FILE_MACHINE_UNKNOWN && strcmp(a, b) <= 0; }
-
42inline bool operator >(_In_ const stdex::platform_id a, _In_ const stdex::platform_id b) { return a != IMAGE_FILE_MACHINE_UNKNOWN && b == IMAGE_FILE_MACHINE_UNKNOWN || a != IMAGE_FILE_MACHINE_UNKNOWN && b != IMAGE_FILE_MACHINE_UNKNOWN && strcmp(a, b) > 0; }
-
43inline bool operator >=(_In_ const stdex::platform_id a, _In_ const stdex::platform_id b) { return b == IMAGE_FILE_MACHINE_UNKNOWN || a != IMAGE_FILE_MACHINE_UNKNOWN && b != IMAGE_FILE_MACHINE_UNKNOWN && strcmp(a, b) >= 0; }
+
38//inline bool operator ==(_In_ const stdex::platform_id a, _In_ const stdex::platform_id b) { return a == b; }
+
39//inline bool operator !=(_In_ const stdex::platform_id a, _In_ const stdex::platform_id b) { return a != b; }
+
40//inline bool operator <(_In_ const stdex::platform_id a, _In_ const stdex::platform_id b) { return (a == IMAGE_FILE_MACHINE_UNKNOWN && b != IMAGE_FILE_MACHINE_UNKNOWN) || (a != IMAGE_FILE_MACHINE_UNKNOWN && b != IMAGE_FILE_MACHINE_UNKNOWN && strcmp(a, b) < 0); }
+
41//inline bool operator <=(_In_ const stdex::platform_id a, _In_ const stdex::platform_id b) { return a == IMAGE_FILE_MACHINE_UNKNOWN || (a != IMAGE_FILE_MACHINE_UNKNOWN && b != IMAGE_FILE_MACHINE_UNKNOWN && strcmp(a, b) <= 0); }
+
42//inline bool operator >(_In_ const stdex::platform_id a, _In_ const stdex::platform_id b) { return (a != IMAGE_FILE_MACHINE_UNKNOWN && b == IMAGE_FILE_MACHINE_UNKNOWN) || (a != IMAGE_FILE_MACHINE_UNKNOWN && b != IMAGE_FILE_MACHINE_UNKNOWN && strcmp(a, b) > 0); }
+
43//inline bool operator >=(_In_ const stdex::platform_id a, _In_ const stdex::platform_id b) { return b == IMAGE_FILE_MACHINE_UNKNOWN || (a != IMAGE_FILE_MACHINE_UNKNOWN && b != IMAGE_FILE_MACHINE_UNKNOWN && strcmp(a, b) >= 0); }
44#endif
45
46namespace stdex
@@ -252,8 +252,8 @@ $(function() { codefold.init(0); });
189 }
190#elif defined(__APPLE__)
191 {
-
192 gid_t gids[NGROUPS + 1]; // A user cannot be member in more than NGROUPS groups, not counting the default group (hence the + 1)
-
193 for (int i = 0, n = getgroups(_countof(gids), gids); i < n; ++i) {
+
192 gid_t gids[NGROUPS_MAX];
+
193 for (int i = 0, n = getgroups(NGROUPS_MAX, gids); i < n; ++i) {
194 struct group* group = getgrgid(gids[i]);
195 if (!group) continue;
196 if (strcmp(group->gr_name, "admin") == 0) {
@@ -300,7 +300,7 @@ $(function() { codefold.init(0); }); diff --git a/system_8hpp_source.html b/system_8hpp_source.html index 5d6d10517..af6737a59 100644 --- a/system_8hpp_source.html +++ b/system_8hpp_source.html @@ -92,7 +92,7 @@ $(function() { codefold.init(0); });
6#pragma once
7
8#include "compat.hpp"
-
9#ifdef _WIN32
+
9#if defined(_WIN32)
10#include "windows.h"
11#include <oaidl.h>
12#include <tchar.h>
@@ -294,7 +294,7 @@ $(function() { codefold.init(0); }); diff --git a/unicode_8cpp_source.html b/unicode_8cpp_source.html index 1bc9cdde0..26335d32f 100644 --- a/unicode_8cpp_source.html +++ b/unicode_8cpp_source.html @@ -94,108 +94,109 @@ $(function() { codefold.init(0); });
8using namespace std;
9#ifdef _WIN32
10using namespace Microsoft::VisualStudio::CppUnitTestFramework;
-
11#else
-
12#pragma GCC diagnostic push
-
13#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-
14#endif
-
15
-
16namespace UnitTests
-
17{
-
18 TEST_CLASS(unicode)
-
19 {
-
20 public:
-
21 TEST_METHOD(str2wstr)
-
22 {
-
23 Assert::AreEqual(
-
24 L"This is a test.",
-
25 stdex::str2wstr("This is a test.", stdex::charset_id::utf8).c_str());
-
26 Assert::AreEqual(
-
27 L"Th\u00ed\u0161 i\u22c5 a te\u0073\u0304t. 😀😅",
-
28 stdex::str2wstr("Thíš i⋅ a tes̄t. 😀😅", stdex::charset_id::utf8).c_str());
-
29 std::string src;
-
30 std::wstring dst;
-
31 for (size_t i = 0; i < 2000; i++) {
-
32 src += "🐔Test🐮\r\n";
-
33 dst += L"🐔Test🐮\r\n";
-
34 }
-
35 Assert::AreEqual(dst.c_str(), stdex::str2wstr(src, stdex::charset_id::utf8).c_str());
-
36 Assert::AreEqual(
-
37 L"",
-
38 stdex::str2wstr("test", 0, stdex::charset_id::utf8).c_str());
-
39 Assert::AreEqual(
-
40 L"",
-
41 stdex::str2wstr(nullptr, 0, stdex::charset_id::utf8).c_str());
-
42 }
-
43
-
44 TEST_METHOD(wstr2str)
-
45 {
-
46 Assert::AreEqual(
-
47 "This is a test.",
-
48 stdex::wstr2str(L"This is a test.", stdex::charset_id::utf8).c_str());
-
49 Assert::AreEqual(
-
50 "Th\xc3\xad\xc5\xa1 i\xe2\x8b\x85 a tes\xcc\x84t. \xf0\x9f\x98\x80\xf0\x9f\x98\x85",
-
51 stdex::wstr2str(L"Thíš i⋅ a tes̄t. 😀😅", stdex::charset_id::utf8).c_str());
-
52 std::wstring src;
-
53 std::string dst;
-
54 for (size_t i = 0; i < 2000; i++) {
-
55 src += L"🐔Test🐮\r\n";
-
56 dst += "🐔Test🐮\r\n";
-
57 }
-
58 Assert::AreEqual(dst.c_str(), stdex::wstr2str(src, stdex::charset_id::utf8).c_str());
-
59 Assert::AreEqual(
-
60 "",
-
61 stdex::wstr2str(L"test", 0, stdex::charset_id::utf8).c_str());
-
62 Assert::AreEqual(
-
63 "",
-
64 stdex::wstr2str(nullptr, 0, stdex::charset_id::utf8).c_str());
-
65 }
-
66
-
67 TEST_METHOD(charset_encoder)
-
68 {
-
69 stdex::charset_encoder<char, char> win1250_to_utf8(stdex::charset_id::windows1250, stdex::charset_id::utf8);
-
70
-
71 Assert::AreEqual(
-
72 "This is a test.",
-
73 win1250_to_utf8.convert("This is a test.").c_str());
-
74 Assert::AreEqual(
-
75 "Thíš i· a teşt.",
-
76 win1250_to_utf8.convert("Th\xed\x9a i\xb7 a te\xbat.").c_str());
-
77 std::string src, dst;
-
78 for (size_t i = 0; i < 1000; i++) {
-
79 src += "V ko\x9eu\x9a\xe8ku zlobnega mizarja stopiclja fant in kli\xe8" "e 0123456789.\r\n";
-
80 dst += "V kožuščku zlobnega mizarja stopiclja fant in kliče 0123456789.\r\n";
-
81 }
-
82 Assert::AreEqual(dst.c_str(), win1250_to_utf8.convert(src).c_str());
-
83 Assert::AreEqual(
-
84 "",
-
85 win1250_to_utf8.convert("test", 0).c_str());
-
86 Assert::AreEqual(
-
87 "",
-
88 win1250_to_utf8.convert(nullptr, 0).c_str());
-
89 }
-
90
-
91 TEST_METHOD(normalize)
-
92 {
-
93#ifdef _WIN32
-
94 Assert::AreEqual(
-
95 L"tést",
-
96 stdex::normalize(L"tést").c_str());
-
97 Assert::AreEqual(
-
98 L"",
-
99 stdex::normalize(nullptr, 0).c_str());
-
100#endif
-
101 }
-
102 };
-
103}
-
104
-
105#ifndef _WIN32
-
106#pragma GCC diagnostic pop
-
107#endif
+
11#endif
+
12#ifdef __GNUC__
+
13#pragma GCC diagnostic push
+
14#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
15#endif
+
16
+
17namespace UnitTests
+
18{
+
19 TEST_CLASS(unicode)
+
20 {
+
21 public:
+
22 TEST_METHOD(str2wstr)
+
23 {
+
24 Assert::AreEqual(
+
25 L"This is a test.",
+
26 stdex::str2wstr("This is a test.", stdex::charset_id::utf8).c_str());
+
27 Assert::AreEqual(
+
28 L"Th\u00ed\u0161 i\u22c5 a te\u0073\u0304t. 😀😅",
+
29 stdex::str2wstr("Thíš i⋅ a tes̄t. 😀😅", stdex::charset_id::utf8).c_str());
+
30 std::string src;
+
31 std::wstring dst;
+
32 for (size_t i = 0; i < 2000; i++) {
+
33 src += "🐔Test🐮\r\n";
+
34 dst += L"🐔Test🐮\r\n";
+
35 }
+
36 Assert::AreEqual(dst.c_str(), stdex::str2wstr(src, stdex::charset_id::utf8).c_str());
+
37 Assert::AreEqual(
+
38 L"",
+
39 stdex::str2wstr("test", 0, stdex::charset_id::utf8).c_str());
+
40 Assert::AreEqual(
+
41 L"",
+
42 stdex::str2wstr(nullptr, 0, stdex::charset_id::utf8).c_str());
+
43 }
+
44
+
45 TEST_METHOD(wstr2str)
+
46 {
+
47 Assert::AreEqual(
+
48 "This is a test.",
+
49 stdex::wstr2str(L"This is a test.", stdex::charset_id::utf8).c_str());
+
50 Assert::AreEqual(
+
51 "Th\xc3\xad\xc5\xa1 i\xe2\x8b\x85 a tes\xcc\x84t. \xf0\x9f\x98\x80\xf0\x9f\x98\x85",
+
52 stdex::wstr2str(L"Thíš i⋅ a tes̄t. 😀😅", stdex::charset_id::utf8).c_str());
+
53 std::wstring src;
+
54 std::string dst;
+
55 for (size_t i = 0; i < 2000; i++) {
+
56 src += L"🐔Test🐮\r\n";
+
57 dst += "🐔Test🐮\r\n";
+
58 }
+
59 Assert::AreEqual(dst.c_str(), stdex::wstr2str(src, stdex::charset_id::utf8).c_str());
+
60 Assert::AreEqual(
+
61 "",
+
62 stdex::wstr2str(L"test", 0, stdex::charset_id::utf8).c_str());
+
63 Assert::AreEqual(
+
64 "",
+
65 stdex::wstr2str(nullptr, 0, stdex::charset_id::utf8).c_str());
+
66 }
+
67
+
68 TEST_METHOD(charset_encoder)
+
69 {
+
70 stdex::charset_encoder<char, char> win1250_to_utf8(stdex::charset_id::windows1250, stdex::charset_id::utf8);
+
71
+
72 Assert::AreEqual(
+
73 "This is a test.",
+
74 win1250_to_utf8.convert("This is a test.").c_str());
+
75 Assert::AreEqual(
+
76 "Thíš i· a teşt.",
+
77 win1250_to_utf8.convert("Th\xed\x9a i\xb7 a te\xbat.").c_str());
+
78 std::string src, dst;
+
79 for (size_t i = 0; i < 1000; i++) {
+
80 src += "V ko\x9eu\x9a\xe8ku zlobnega mizarja stopiclja fant in kli\xe8" "e 0123456789.\r\n";
+
81 dst += "V kožuščku zlobnega mizarja stopiclja fant in kliče 0123456789.\r\n";
+
82 }
+
83 Assert::AreEqual(dst.c_str(), win1250_to_utf8.convert(src).c_str());
+
84 Assert::AreEqual(
+
85 "",
+
86 win1250_to_utf8.convert("test", 0).c_str());
+
87 Assert::AreEqual(
+
88 "",
+
89 win1250_to_utf8.convert(nullptr, 0).c_str());
+
90 }
+
91
+
92 TEST_METHOD(normalize)
+
93 {
+
94#ifdef _WIN32
+
95 Assert::AreEqual(
+
96 L"tést",
+
97 stdex::normalize(L"tést").c_str());
+
98 Assert::AreEqual(
+
99 L"",
+
100 stdex::normalize(nullptr, 0).c_str());
+
101#endif
+
102 }
+
103 };
+
104}
+
105
+
106#ifdef __GNUC__
+
107#pragma GCC diagnostic pop
+
108#endif
Encoding converter context.
Definition unicode.hpp:137
diff --git a/unicode_8hpp_source.html b/unicode_8hpp_source.html index 8f47d6811..1c3f2db0c 100644 --- a/unicode_8hpp_source.html +++ b/unicode_8hpp_source.html @@ -104,7 +104,7 @@ $(function() { codefold.init(0); });
18#include <memory>
19#include <string>
20
-
21#ifndef _WIN32
+
21#ifdef __GNUC__
22#pragma GCC diagnostic push
23#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
24#endif
@@ -801,7 +801,7 @@ $(function() { codefold.init(0); });
976#endif
977}
978
-
979#ifndef _WIN32
+
979#ifdef __GNUC__
980#pragma GCC diagnostic pop
981#endif
Encoding converter context.
Definition unicode.hpp:137
@@ -817,7 +817,7 @@ $(function() { codefold.init(0); }); diff --git a/unionstdex_1_1md2__t-members.html b/unionstdex_1_1md2__t-members.html index 5cc5d07e5..2a56d4dfe 100644 --- a/unionstdex_1_1md2__t-members.html +++ b/unionstdex_1_1md2__t-members.html @@ -91,7 +91,7 @@ $(function() { diff --git a/unionstdex_1_1md2__t.html b/unionstdex_1_1md2__t.html index d2eef0404..1cc1b474c 100644 --- a/unionstdex_1_1md2__t.html +++ b/unionstdex_1_1md2__t.html @@ -125,7 +125,7 @@ Friends diff --git a/unionstdex_1_1sha256__t-members.html b/unionstdex_1_1sha256__t-members.html index 03b7261da..cb291c800 100644 --- a/unionstdex_1_1sha256__t-members.html +++ b/unionstdex_1_1sha256__t-members.html @@ -91,7 +91,7 @@ $(function() { diff --git a/unionstdex_1_1sha256__t.html b/unionstdex_1_1sha256__t.html index 357d23375..f547d2ad7 100644 --- a/unionstdex_1_1sha256__t.html +++ b/unionstdex_1_1sha256__t.html @@ -125,7 +125,7 @@ Friends diff --git a/unionstdex_1_1sha__t-members.html b/unionstdex_1_1sha__t-members.html index e18e38f2f..da2bd5baa 100644 --- a/unionstdex_1_1sha__t-members.html +++ b/unionstdex_1_1sha__t-members.html @@ -91,7 +91,7 @@ $(function() { diff --git a/unionstdex_1_1sha__t.html b/unionstdex_1_1sha__t.html index 545fbe8ad..40cc21f85 100644 --- a/unionstdex_1_1sha__t.html +++ b/unionstdex_1_1sha__t.html @@ -125,7 +125,7 @@ Friends diff --git a/uuid_8hpp_source.html b/uuid_8hpp_source.html index c3dfebd39..f0efd3b92 100644 --- a/uuid_8hpp_source.html +++ b/uuid_8hpp_source.html @@ -147,7 +147,7 @@ $(function() { codefold.init(0); }); diff --git a/vector__queue_8hpp_source.html b/vector__queue_8hpp_source.html index d3abeec3c..4ee29c90f 100644 --- a/vector__queue_8hpp_source.html +++ b/vector__queue_8hpp_source.html @@ -454,7 +454,7 @@ $(function() { codefold.init(0); }); diff --git a/watchdog_8cpp_source.html b/watchdog_8cpp_source.html index e0b808df1..79b9883b9 100644 --- a/watchdog_8cpp_source.html +++ b/watchdog_8cpp_source.html @@ -120,7 +120,7 @@ $(function() { codefold.init(0); }); diff --git a/watchdog_8hpp_source.html b/watchdog_8hpp_source.html index 71ffe1255..1dd5a4b75 100644 --- a/watchdog_8hpp_source.html +++ b/watchdog_8hpp_source.html @@ -188,7 +188,7 @@ $(function() { codefold.init(0); }); diff --git a/wav_8hpp_source.html b/wav_8hpp_source.html index b703e941e..a7eff85c1 100644 --- a/wav_8hpp_source.html +++ b/wav_8hpp_source.html @@ -789,7 +789,7 @@ $(function() { codefold.init(0); }); diff --git a/windows_8h_source.html b/windows_8h_source.html index de30d4b6a..a48a0fe11 100644 --- a/windows_8h_source.html +++ b/windows_8h_source.html @@ -111,7 +111,7 @@ $(function() { codefold.init(0); }); diff --git a/zlib_8hpp_source.html b/zlib_8hpp_source.html index 209e603aa..110f03c32 100644 --- a/zlib_8hpp_source.html +++ b/zlib_8hpp_source.html @@ -266,7 +266,7 @@ $(function() { codefold.init(0); });