diff --git a/_unit_tests_2compat_8hpp_source.html b/_unit_tests_2compat_8hpp_source.html index 3d38a347a..7bccf596c 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 5bd0d9ee3..b567784f4 100644 --- a/annotated.html +++ b/annotated.html @@ -285,7 +285,7 @@ $(function() { diff --git a/base64_8hpp_source.html b/base64_8hpp_source.html index b37aff248..7cacc464d 100644 --- a/base64_8hpp_source.html +++ b/base64_8hpp_source.html @@ -539,11 +539,11 @@ $(function() { codefold.init(0); });
stdex::stream::basic::ok
bool ok() const
Returns true if the stream state is clean i.e. previous operation was succesful.
Definition stream.hpp:175
stdex::stream::basic::state
state_t state() const
Returns stream state after last operation.
Definition stream.hpp:170
stdex::stream::basic::write_array
size_t write_array(_In_reads_bytes_opt_(size *count) const void *array, size_t size, size_t count)
Writes an array of data to the stream.
Definition stream.hpp:388
-
stdex::stream::converter
Modifies data on the fly when reading from/writing to a source stream. Could also be used to modify r...
Definition stream.hpp:1010
+
stdex::stream::converter
Modifies data on the fly when reading from/writing to a source stream. Could also be used to modify r...
Definition stream.hpp:1012
diff --git a/chrono_8hpp_source.html b/chrono_8hpp_source.html index a6bef7f46..ddef007e9 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 15d786322..2d981c468 100644 --- a/classes.html +++ b/classes.html @@ -141,7 +141,7 @@ $(function() { diff --git a/classstdex_1_1base64__dec-members.html b/classstdex_1_1base64__dec-members.html index a39cf87ec..5b46ab9b1 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 065b7154a..fa9ce5825 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 848dc92e4..a18be152f 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 ce7139241..217bc40ee 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 3df032a53..36b5d3073 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 33bb9b193..e87cab1f9 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 f900a2393..0f060342c 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 47ac955d9..3c5c99019 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 bde6a1df2..849d85cb0 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 506cf563a..dbca42ffc 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_1block__hash-members.html b/classstdex_1_1block__hash-members.html index 158acc01e..d24b56d4b 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 763533b54..0e78600f2 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 53df914d4..b41e6542e 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 cfdab0374..e812fc9fb 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 7320f1f18..e06a90b0c 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 01bcad1bf..7e57da5a9 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 229f72c17..384cedbdf 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 7c11350c6..2745933a6 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 4e1ebe4b8..aad6616ba 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 87e62e39a..1d577d2a2 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 5e7bbab89..a83ca7349 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 a9470719f..a063dc835 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 afefded74..263488845 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 fb20d37dc..f363758ab 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 c0be638d5..7e7c0400d 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 49ef151d7..0a96fe568 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 f6c8afdca..94a8900ff 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 5d2311150..c0c0e92c8 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 f400d1507..64c4ec0ae 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 296efa762..2939081ba 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 67e8cc7b5..a15cbce74 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 7ba9d4ec4..8c16d6419 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 5bc5e1673..35ae3dad3 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 356c87337..eeb82ff21 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 5104ddb15..3b5d72ad0 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 1e45c3e05..3dbb3c875 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 89d4d5430..f8777171b 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 1b0037ef8..ff89a6366 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 8a687ed16..e24dfd875 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 8763eb663..803abd928 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 96e127314..411077263 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 7886ca7d0..e053def73 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 25a5d169d..306fac23d 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 48c070282..c3828ac7d 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 8dbff7bec..09ac4d91b 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 1ec32fbc7..d6944361a 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 807298829..be33284f6 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 07509c2ca..12324878a 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 d29c0e3e9..2e04af5d1 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 97815a898..6be888f1d 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 eaf84bd19..b20589670 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 ab5da26c5..a4ffc35b3 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 d66b8a3ee..baad03a6e 100644 --- a/classstdex_1_1locale-members.html +++ b/classstdex_1_1locale-members.html @@ -90,7 +90,7 @@ $(function() { diff --git a/classstdex_1_1locale.html b/classstdex_1_1locale.html index 9690a79eb..f4fda4c7f 100644 --- a/classstdex_1_1locale.html +++ b/classstdex_1_1locale.html @@ -117,7 +117,7 @@ Public Member Functions diff --git a/classstdex_1_1md5__hash-members.html b/classstdex_1_1md5__hash-members.html index 7e6928eea..cf61ea912 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 db4780562..d331630d3 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 8bf244a8b..06b368f91 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 11b35b3a0..9acb1af4c 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 3d81b9a06..a8639a172 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 173c6757d..f5511d522 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 6dd03bf16..0beea09b9 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 fefea5c49..b11439b72 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 44ae3529d..cf5c0aeee 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 a6f5e1ecd..ac5e07f75 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 891127ac0..87d9ba5d2 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 2e4abf0c5..e0e041c21 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 120b67d59..d6fdcc260 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 e171c2cf1..f97f366db 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 b7933d2ec..851d9687b 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 374a66ee1..4dfebb915 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 c039b53eb..dbf406f1a 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 8ca64f651..706eb0b24 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 fd2b6b0d2..72fe72cd9 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 d81ff5b1d..2e870b890 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 f42e1c972..e9bc8be79 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 417c7090c..3643d0071 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 c041bc161..831d1858f 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 919c50bf5..bfb458dc9 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 b6408049c..f327d1cdb 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 3d9f47c62..b0f949da8 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 db84f7ab8..6eaa1e54a 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 193e01484..c108f060b 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 522d1b74e..3a1dda9a9 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 0b371747e..c0a9d7140 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 4d63785be..4078daf83 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 2786c8144..d0ba9efd7 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 b4ac1ca9f..1db9e628d 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 cb0066a8c..0b819d26a 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 397618f57..0eb30ec67 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 81c7380fb..9bdca5036 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 3b44e0f64..40370df5c 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 e27a8053f..05f3f69c5 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 bf45ccb72..bcae74e4f 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 8f17c897b..c2d61b852 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 9e85f5d32..07eaaeb6e 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 98964f729..9019a3576 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 e827206f6..74009b840 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 3c8edff7d..0340f96ec 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 740dc1838..d7165c1d4 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 4504b9ccc..20443a076 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 fe698614f..720e65d75 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 465f9841e..3662b608f 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 fd7f868b6..b555b498e 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 518539020..06e215cc7 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 52b911217..317093905 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 540a6d664..eb711a3d3 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 6f80a1877..639b50e85 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 7ac0b75dd..627ccd5a9 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 522470aea..c80cf2e34 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 6d069221f..0d573a4d4 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 3f5f2b513..d78881729 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 a7e93bb52..5ff5f8ab6 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 f5be9538b..95342804a 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 bb41967f7..b0a11c798 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 db1437426..efa1ba307 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 99be3890a..23ef08329 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 fce2aa274..08211af88 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 c40939311..1f9b33319 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 6692637a0..2b310bbea 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 cdbe1f6ab..74bfd7dfd 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 59acd98cc..0ce9019c2 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 1767dd6ba..f7e4f1e51 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 c0c12b224..e55374d7d 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 27837ba44..ab76be45b 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 26037be02..c714d7e03 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 3dbfd9731..20852df2a 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 19c35adca..c37c51edb 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 5390416e9..377e571b1 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 043d74c42..836455ac5 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 72a375928..ed40cf427 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 46901b8cf..bc17435ac 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 2968b358d..0a0cd9915 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 00eb4f2b5..fb819d92f 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 66c279f53..dc5da0d40 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 5dd457cfc..fbaf53acf 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 d355a64f6..3dce63764 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 67cdef7b4..e0771c3e9 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 e658760bc..a7ac6b208 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 a539297d1..4c7ea158b 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 37663e061..36c628440 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 79a37f007..6e5cc557e 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 782de17a0..87ba74a55 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 6b3aa6a9c..bc5c374f5 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 6cc205cd7..2e4f42cc7 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 77397ce8e..42b413729 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 279961931..0fee3571a 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 62168547f..7bfda8d7b 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 e0e2e604c..76db57a62 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 7817c8ff9..9b27948a7 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 7691300c7..67a6944ac 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 7ce94553f..5e6c8eca6 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 3f074777e..780b05f95 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 819a9841e..92c8f1bc6 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 5fa91865f..a413c1563 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 713bdf3f8..b32c34f4a 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 4d4052c74..97e951f40 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 6095cbecc..4260942aa 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 601f42d4b..2424fbb07 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 6431b4eea..331816ff9 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 8566935c1..57b05928c 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 91bd47c63..2618b8f3a 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 b3cea3d0e..b9f838ba8 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 0fb95bec0..072006efd 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 245a61e79..aeb83360f 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 e861407c6..229021f37 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 3576c6d09..d046a4f6e 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 16ddf5493..2f484ae13 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 325792694..eb6db6839 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 c267a8e35..599c3973a 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 60bc85ce0..27a9d4e19 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 6ffe15943..33a396d51 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 8bfd15382..e9ba47550 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 3df6f0580..148e34619 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 8b23b374d..b63e20fb7 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 cdef14600..7e1e7bd8f 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 f4fa9e652..7cc67aae1 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 78106284e..1ac6a5d67 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 63f42bb2a..60af6f235 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 5962d3bf0..1b5ef8ab6 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 04ac8fa0a..31c570351 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 bcab47189..b15575f0b 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 b865e92ad..4f0d5e574 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 01af3882a..167e40594 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 41a49d094..1de8051dd 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 0840dea84..a1bb58ad5 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 feb529025..90511152f 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 41aeea609..0cccec46e 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 6578c59f6..385c3bfd6 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 f61b9d3ed..ca64bd8b3 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 c926ea4c0..a15bee46b 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 0bf5dadfe..21c220b69 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 18e76cf7a..39873d1bd 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 71e4da8b8..9323fad6a 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 763a785ec..14bfe9d83 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 7d1ac8726..0387b4938 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 05b962b52..57d1faa8e 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 afb8fcf9c..1a973540b 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 73b35635d..e51a384ed 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 30d02f8ca..5b43eeba6 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 780816960..12b9c6111 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 d277a82fb..443182e09 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 78188a874..3655d020f 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 af22382d4..232301766 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 107350a91..fe7cbd560 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 5353b5cae..d968a3b0f 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 24639257f..519d215c4 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 df9cc7183..669275509 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 940acc75b..3637e4765 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 2d3bd50f1..e9773432f 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 84f68b57a..0bf40940f 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 bb6ceb47a..318b2d4b3 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 576a0dff8..f5ee469a2 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 d6e30bb8b..bf9d3a685 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 404a8030d..11877590d 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 e0400424c..99277454c 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 1f49685a2..5130a0798 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 667fe9c9b..4e1732323 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 30d3ad588..2f6ddf6c7 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 d295c764e..59207f8fa 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 969bca088..fd3cf6946 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 2c806418c..5e418c553 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 8d0d53007..efa67fff4 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 e72f35f3b..4ad53598c 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 798bf47fb..142158d1c 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 fba5e0511..79535a8c0 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 ac00671bc..fe8c1d189 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 0eae2bd12..0ca9b3119 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 0a740a4b9..5a8bccc6f 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 1c149dcf4..bdd5473cb 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 f37d761f5..2270714f7 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 50f094838..68d2ffa89 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 476716659..9540eb64d 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 9491d2c2a..06a19dc85 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 6e66aec74..eeb57327d 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 743227275..c79b02198 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 0f0c9fce7..b8828ca48 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 b3c0d4de2..28d7f9759 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 92fa09d80..d8200b23b 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 783ef3973..22da3bc7c 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 8b2bbe365..868e6cd55 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 aa9eca708..6fb50b25b 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 19e0d9908..5939bdeed 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 12e7af0f8..517caf746 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 3b402d891..c8e557918 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 a433d72a1..ce28f9c70 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 49b7c2cf2..60773bdca 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 42eb31ee0..131c0f15e 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 6e0ef8e14..b6023ae9c 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 f0623273e..590d22aec 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 1c2d2ffc3..ad3c71682 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 043641d64..d15c60df1 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 16869a59e..1cb67687c 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 26d6ab738..2051868d1 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 3955b63cb..2aa5c058c 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 8313c2c02..ffadf712a 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 1feb43526..929528712 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 e0f64f652..244f7da71 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 77b9bdd1f..fc76168f3 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 f7969c5f8..abcf864f8 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 0d1a95472..42595341a 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 5f41b1632..c3179ddee 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 0f30c3ee5..101422df8 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 065c9f3e8..89b2fdbdd 100644 --- a/classstdex_1_1pool-members.html +++ b/classstdex_1_1pool-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/classstdex_1_1pool.html b/classstdex_1_1pool.html index ac481a484..02c835c9a 100644 --- a/classstdex_1_1pool.html +++ b/classstdex_1_1pool.html @@ -190,7 +190,7 @@ template<class T > diff --git a/classstdex_1_1progress-members.html b/classstdex_1_1progress-members.html index 83d4be2e8..04612926b 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 6de7a239a..01a3173b9 100644 --- a/classstdex_1_1progress.html +++ b/classstdex_1_1progress.html @@ -311,7 +311,7 @@ template<class T > diff --git a/classstdex_1_1progress__switcher-members.html b/classstdex_1_1progress__switcher-members.html index 7ad349aaa..3cc214763 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 0706bae83..0c318b6de 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 801258bcb..5716fb814 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 505e932ce..03b27cf4e 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 95a1e51c3..17ea0e46f 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 3ff774fa8..70217a58e 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 77326e70b..06c7a123a 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 4facc20db..65e339ba4 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 de6ba9786..4fe79b8c5 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 29798c3a3..c685dff17 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 795380a3e..fc7eb9f4b 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 899f83ea2..aed0767ec 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 b9aa2cf18..24c400261 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 5c931d7a6..747a114a9 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 b6011fff1..36c93f9dd 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 b3a7343ee..2c887d71a 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 0ca41c5fc..1db4f2908 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 69b695c71..fe5731c25 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 96cb5f9bc..f7163de62 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 9f04d2c96..3b413a0b6 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 4cfc23cb7..6b4c339bb 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 df2f5228e..b00437a24 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 8d7d62675..87553e920 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 c75364307..4321fc602 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 058ac4ae6..5c39529f5 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 89cfa7b8a..dc5d30743 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 f8a9209ce..a7d10d0fe 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 7b3fa7e10..c42e7b174 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 d74c84102..47676b5e3 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 2b99c9022..9ebb29397 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 d99feb231..bd7994932 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 7902e9cba..aa6bdfc21 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 e0a6cd8ed..2d6c9a987 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 7010dd6ff..eee7378af 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 ab57522c0..98ef43b40 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 43fa84296..e92e1c8f5 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 c49470269..9f9a69ef0 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 22cd9b67f..6d2bb2aa4 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 42e70837b..43f003886 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 09308911d..952fcd454 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 e5288a138..30b251939 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 e7a246866..4075e3071 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 c104f4939..7e235427c 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 224a109c9..2c9635adf 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 230bbd1af..84bd1d481 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 87186308f..24de810d6 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 957a27439..ef5a4ce0c 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 2c4a07787..ee1c5ac3c 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 e4d685637..de7619a10 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 ddc8746f9..39bd753c0 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 13ea416ed..48e920c58 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 c01d610d9..ba77a5da9 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_1user__cancelled-members.html b/classstdex_1_1user__cancelled-members.html index 655ffba14..ec28e904e 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 47ebfa183..1f7e58f01 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 76827be58..704ef98b8 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 78cb343e2..8de4a327b 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 a4e3ee00e..0e0463b9a 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 bb5ca6fd9..3508ac78a 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 971a19a8b..323e1296b 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 93eda316d..d472b1554 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 619d429c2..d5c7ee16c 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 bb2b341ce..0d37e91cf 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 5186aa234..b7347e75d 100644 --- a/debug_8hpp_source.html +++ b/debug_8hpp_source.html @@ -183,7 +183,7 @@ $(function() { codefold.init(0); }); diff --git a/dir_4be4f7b278e009bf0f1906cf31fb73bd.html b/dir_4be4f7b278e009bf0f1906cf31fb73bd.html index 1ce763174..a8c45bffb 100644 --- a/dir_4be4f7b278e009bf0f1906cf31fb73bd.html +++ b/dir_4be4f7b278e009bf0f1906cf31fb73bd.html @@ -106,7 +106,7 @@ Files diff --git a/dir_d44c64559bbebec7f509842c48db8b23.html b/dir_d44c64559bbebec7f509842c48db8b23.html index 7b10c12e8..1c9b783eb 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 f552930bf..e88541f1b 100644 --- a/dir_fca3c47b2ea228727bd6729832f89576.html +++ b/dir_fca3c47b2ea228727bd6729832f89576.html @@ -154,7 +154,7 @@ Files diff --git a/endian_8hpp_source.html b/endian_8hpp_source.html index e2d6383a7..697addec7 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 931365726..97c4dc66e 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 7d36a41c3..99a04119f 100644 --- a/files.html +++ b/files.html @@ -129,7 +129,7 @@ $(function() { diff --git a/functions.html b/functions.html index 3c9a0e085..da5cf3543 100644 --- a/functions.html +++ b/functions.html @@ -96,7 +96,7 @@ $(function() { diff --git a/functions_b.html b/functions_b.html index 2d04bb72d..7e6c0fbd1 100644 --- a/functions_b.html +++ b/functions_b.html @@ -90,7 +90,7 @@ $(function() { diff --git a/functions_c.html b/functions_c.html index 1f68c5c88..115ec2ae2 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 29c26ebb2..6571ceaa9 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 8bb8d1bd5..5813a0b68 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 7eb638d8a..02877cfaf 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 55130caef..f214a1672 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 9e51d0565..08b0027a7 100644 --- a/functions_func.html +++ b/functions_func.html @@ -90,7 +90,7 @@ $(function() { diff --git a/functions_func_b.html b/functions_func_b.html index 46b29d068..2c2678839 100644 --- a/functions_func_b.html +++ b/functions_func_b.html @@ -82,7 +82,7 @@ $(function() { diff --git a/functions_func_c.html b/functions_func_c.html index e9085dbba..64b3f6dc6 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 e39a6eec9..f6c5e551f 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 2b12eaa10..e3226e9ea 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 6c0a175a0..e54cd012b 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 5bbf50cb5..54c72cba7 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 0a85aa325..d253d6c09 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 7eac05f2f..657067caf 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 2b6043508..49ef21802 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 0f98f1e15..a74ffa9ad 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 dfe8bbde1..1f18fc156 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 0d92eab16..d3e1eb4ed 100644 --- a/functions_func_o.html +++ b/functions_func_o.html @@ -92,7 +92,7 @@ $(function() { diff --git a/functions_func_p.html b/functions_func_p.html index 50ce2d61d..91cf0a902 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 16fe9ca7c..a88dcd0ae 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 852735769..5ad496ae3 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 200704159..d70758264 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 858d7ee73..1bc069dbe 100644 --- a/functions_func_t.html +++ b/functions_func_t.html @@ -87,7 +87,7 @@ $(function() { diff --git a/functions_func_u.html b/functions_func_u.html index 906a3a99d..2874b6e99 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 2d8ae9bd1..ca486c9b3 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 db8a59cb6..b31d58997 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 b40675ad8..1c441d749 100644 --- a/functions_func_~.html +++ b/functions_func_~.html @@ -81,7 +81,7 @@ $(function() { diff --git a/functions_g.html b/functions_g.html index 2c81ea4f8..8f29599e8 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 b3461fc68..e7f030821 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 7072a1f6b..d886cfe1f 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 34f6c0742..643f567c1 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 6207e8039..0a9a51c13 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 ef7e10dba..ca5cd5f98 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 e0dbc9bf1..293a2967f 100644 --- a/functions_o.html +++ b/functions_o.html @@ -96,7 +96,7 @@ $(function() { diff --git a/functions_p.html b/functions_p.html index 171bc7a42..e00979e5a 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 17b87c6a6..79d7cee88 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 aa16ca77a..385baa61f 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 cc182cac8..7960033c9 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 e4b192530..5547f3409 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 51ca21f6c..a34b56848 100644 --- a/functions_t.html +++ b/functions_t.html @@ -92,7 +92,7 @@ $(function() { diff --git a/functions_type.html b/functions_type.html index c84e70e88..a530d4380 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 3903c9f6d..e8ec3ad82 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 8be58e966..59812bfd5 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 f5d4b40c0..6bb2e31ed 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 7d8e4b763..fd2c255cf 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 480c22e40..b8d0940b7 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 6467b3575..8c90b5f73 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 c44f1b54c..0a692afb3 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 f4b4cd6c1..efb4b68c3 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 b175e2df4..96a568695 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 bdae9147f..dbc8717c4 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 3a6848d05..df09d79c1 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 33e2df860..71988a7af 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 fbc95de8e..45aa84c66 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 c4c27595a..93bd59cf0 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 eccfe459f..5b296461d 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 53933c6dc..96d8deb52 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 ebf8143b3..a8b13675e 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 8b927824c..1a1a2b7b2 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 e597e3028..6a31aa287 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 a28043e3c..c8e9d4f51 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 57274ba49..f16b88b62 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 c9fcc30f5..2a7edc97c 100644 --- a/functions_w.html +++ b/functions_w.html @@ -92,7 +92,7 @@ $(function() { diff --git a/functions_~.html b/functions_~.html index 71155dce7..4c7a3005e 100644 --- a/functions_~.html +++ b/functions_~.html @@ -81,7 +81,7 @@ $(function() { diff --git a/hash_8cpp_source.html b/hash_8cpp_source.html index b46efaae0..113a4c0cd 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 19f019114..87baddce8 100644 --- a/hash_8hpp_source.html +++ b/hash_8hpp_source.html @@ -733,9 +733,9 @@ $(function() { codefold.init(0); });
stdex::sha1_hash::clear
virtual void clear()
Initializes hash value and internal state.
Definition hash.hpp:511
stdex::sha1_hash::finalize
virtual void finalize()
Finalizes hash value.
Definition hash.hpp:523
stdex::stream::basic
‍UTF-8 byte-order-mark
Definition stream.hpp:79
-
stdex::stream::converter
Modifies data on the fly when reading from/writing to a source stream. Could also be used to modify r...
Definition stream.hpp:1010
-
stdex::stream::converter::read
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:1039
-
stdex::stream::converter::write
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:1047
+
stdex::stream::converter
Modifies data on the fly when reading from/writing to a source stream. Could also be used to modify r...
Definition stream.hpp:1012
+
stdex::stream::converter::read
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:1041
+
stdex::stream::converter::write
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:1049
stdex::stream_hasher
Hashes read to or write from data of the stream.
Definition hash.hpp:138
stdex::stream_hasher::read
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition hash.hpp:145
stdex::stream_hasher::write
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition hash.hpp:153
@@ -745,7 +745,7 @@ $(function() { codefold.init(0); }); diff --git a/hex_8hpp_source.html b/hex_8hpp_source.html index de36a567c..0a6e78590 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 58411d3ce..bcb11def6 100644 --- a/hierarchy.html +++ b/hierarchy.html @@ -307,7 +307,7 @@ $(function() { diff --git a/html_8hpp_source.html b/html_8hpp_source.html index a0ff2fde2..711deb9ca 100644 --- a/html_8hpp_source.html +++ b/html_8hpp_source.html @@ -2551,7 +2551,7 @@ $(function() { codefold.init(0); }); diff --git a/idrec_8hpp_source.html b/idrec_8hpp_source.html index d06b1ff00..489e191db 100644 --- a/idrec_8hpp_source.html +++ b/idrec_8hpp_source.html @@ -472,15 +472,15 @@ $(function() { codefold.init(0); });
stdex::stream::basic::ok
bool ok() const
Returns true if the stream state is clean i.e. previous operation was succesful.
Definition stream.hpp:175
stdex::stream::basic::state
state_t state() const
Returns stream state after last operation.
Definition stream.hpp:170
stdex::stream::basic::skip
virtual void skip(fsize_t amount)
Skips given amount of bytes of data on the stream.
Definition stream.hpp:142
-
stdex::stream::limiter
Limits reading from/writing to stream to a predefined number of bytes.
Definition stream.hpp:1539
-
stdex::stream::limiter::read_limit
fsize_t read_limit
Number of bytes left that may be read from the stream.
Definition stream.hpp:1591
-
stdex::stream::memory_file
In-memory file.
Definition stream.hpp:3181
-
stdex::stream::memory_file::seek
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:3862
-
stdex::stream::memory_file::data
const void * data() const
Returns pointer to data.
Definition stream.hpp:3511
+
stdex::stream::limiter
Limits reading from/writing to stream to a predefined number of bytes.
Definition stream.hpp:1541
+
stdex::stream::limiter::read_limit
fsize_t read_limit
Number of bytes left that may be read from the stream.
Definition stream.hpp:1593
+
stdex::stream::memory_file
In-memory file.
Definition stream.hpp:3183
+
stdex::stream::memory_file::seek
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:3864
+
stdex::stream::memory_file::data
const void * data() const
Returns pointer to data.
Definition stream.hpp:3513
diff --git a/include_2stdex_2compat_8hpp_source.html b/include_2stdex_2compat_8hpp_source.html index 3ff9e57f3..9ca24be2f 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 b27c7bfb7..db737f6ec 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 1843e41f8..0879e4956 100644 --- a/interval_8hpp_source.html +++ b/interval_8hpp_source.html @@ -233,7 +233,7 @@ $(function() { codefold.init(0); }); diff --git a/locale_8hpp_source.html b/locale_8hpp_source.html index 490b822f4..2d2ee2542 100644 --- a/locale_8hpp_source.html +++ b/locale_8hpp_source.html @@ -188,7 +188,7 @@ $(function() { codefold.init(0); }); diff --git a/mapping_8hpp_source.html b/mapping_8hpp_source.html index 5cdcc396e..ddb3ff8c3 100644 --- a/mapping_8hpp_source.html +++ b/mapping_8hpp_source.html @@ -126,7 +126,7 @@ $(function() { codefold.init(0); }); diff --git a/math_8cpp_source.html b/math_8cpp_source.html index 562a93fac..829c2b854 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 92d7995b9..dd69afabf 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 6d1fec97f..c0ed7db61 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 e2bfc5a90..30ff7a51c 100644 --- a/parser_8cpp_source.html +++ b/parser_8cpp_source.html @@ -600,7 +600,7 @@ $(function() { codefold.init(0); }); diff --git a/parser_8hpp_source.html b/parser_8hpp_source.html index e5fa59359..7555d7500 100644 --- a/parser_8hpp_source.html +++ b/parser_8hpp_source.html @@ -8548,7 +8548,7 @@ $(function() { codefold.init(0); }); diff --git a/pch_8hpp_source.html b/pch_8hpp_source.html index 1b5e56c87..71175ef2b 100644 --- a/pch_8hpp_source.html +++ b/pch_8hpp_source.html @@ -128,7 +128,7 @@ $(function() { codefold.init(0); }); diff --git a/pool_8hpp_source.html b/pool_8hpp_source.html index 24c10615a..f8f68ccbd 100644 --- a/pool_8hpp_source.html +++ b/pool_8hpp_source.html @@ -172,7 +172,7 @@ $(function() { codefold.init(0); }); diff --git a/progress_8hpp_source.html b/progress_8hpp_source.html index 245492ff2..696c1e501 100644 --- a/progress_8hpp_source.html +++ b/progress_8hpp_source.html @@ -333,7 +333,7 @@ $(function() { codefold.init(0); }); diff --git a/ring_8cpp_source.html b/ring_8cpp_source.html index 6e0327de4..e627ea271 100644 --- a/ring_8cpp_source.html +++ b/ring_8cpp_source.html @@ -146,7 +146,7 @@ $(function() { codefold.init(0); }); diff --git a/ring_8hpp_source.html b/ring_8hpp_source.html index 2806d7933..e5a612fa3 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 325bafb89..ee4c9950e 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 13d0d0cc3..16b25e5ee 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 58798561d..69f8a64cc 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 3de53fc6a..6fe7f6c8a 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 e8003891d..88ebe598d 100644 --- a/spinlock_8hpp_source.html +++ b/spinlock_8hpp_source.html @@ -159,7 +159,7 @@ $(function() { codefold.init(0); }); diff --git a/stream_8cpp_source.html b/stream_8cpp_source.html index e05016db0..b4dd8740b 100644 --- a/stream_8cpp_source.html +++ b/stream_8cpp_source.html @@ -245,21 +245,21 @@ $(function() { codefold.init(0); });
159 }
160 };
161}
-
stdex::stream::async_reader
Provides read-ahead stream capability.
Definition stream.hpp:1244
-
stdex::stream::async_writer
Provides write-back stream capability.
Definition stream.hpp:1311
+
stdex::stream::async_reader
Provides read-ahead stream capability.
Definition stream.hpp:1246
+
stdex::stream::async_writer
Provides write-back stream capability.
Definition stream.hpp:1313
stdex::stream::basic::ok
bool ok() const
Returns true if the stream state is clean i.e. previous operation was succesful.
Definition stream.hpp:175
-
stdex::stream::buffer
Buffered read/write stream.
Definition stream.hpp:1382
-
stdex::stream::cached_file
Cached file-system file.
Definition stream.hpp:3097
-
stdex::stream::file
File-system file.
Definition stream.hpp:2689
-
stdex::stream::file::readonly
static bool readonly(const stdex::schar_t *filename)
Checks if file/folder/symlink is read-only.
Definition stream.hpp:3067
-
stdex::stream::file::exists
static bool exists(const stdex::schar_t *filename)
Checks if file/folder/symlink likely exists.
Definition stream.hpp:3039
-
stdex::stream::memory_file
In-memory file.
Definition stream.hpp:3181
-
stdex::stream::replicator
Replicates writing of the same data to multiple streams.
Definition stream.hpp:1075
-
stdex::stream::replicator::push_back
void push_back(basic *source)
Adds stream on the list.
Definition stream.hpp:1094
+
stdex::stream::buffer
Buffered read/write stream.
Definition stream.hpp:1384
+
stdex::stream::cached_file
Cached file-system file.
Definition stream.hpp:3099
+
stdex::stream::file
File-system file.
Definition stream.hpp:2691
+
stdex::stream::file::readonly
static bool readonly(const stdex::schar_t *filename)
Checks if file/folder/symlink is read-only.
Definition stream.hpp:3069
+
stdex::stream::file::exists
static bool exists(const stdex::schar_t *filename)
Checks if file/folder/symlink likely exists.
Definition stream.hpp:3041
+
stdex::stream::memory_file
In-memory file.
Definition stream.hpp:3183
+
stdex::stream::replicator
Replicates writing of the same data to multiple streams.
Definition stream.hpp:1077
+
stdex::stream::replicator::push_back
void push_back(basic *source)
Adds stream on the list.
Definition stream.hpp:1096
diff --git a/stream_8hpp_source.html b/stream_8hpp_source.html index f9f8f0474..b065a2fcd 100644 --- a/stream_8hpp_source.html +++ b/stream_8hpp_source.html @@ -499,11 +499,11 @@ $(function() { codefold.init(0); });
535#ifdef _WIN32
541 size_t write_sa(_In_ LPSAFEARRAY sa)
542 {
-
543 safearray_accessor<void> a(sa);
-
544 long ubound, lbound;
-
545 if (FAILED(SafeArrayGetUBound(sa, 1, &ubound)) ||
-
546 FAILED(SafeArrayGetLBound(sa, 1, &lbound)))
-
547 throw std::invalid_argument("SafeArrayGet[UL]Bound failed");
+
543 long ubound, lbound;
+
544 if (FAILED(SafeArrayGetUBound(sa, 1, &ubound)) ||
+
545 FAILED(SafeArrayGetLBound(sa, 1, &lbound)))
+
546 throw std::invalid_argument("SafeArrayGet[UL]Bound failed");
+
547 safearray_accessor<void> a(sa);
548 return write(a.data(), static_cast<size_t>(ubound) - lbound + 1);
549 }
550#endif
@@ -847,3297 +847,3299 @@ $(function() { codefold.init(0); });
954 LPSAFEARRAY read_sa()
955 {
956 _Assume_(size() <= SIZE_MAX);
-
957 size_t length = static_cast<size_t>(size());
-
958 std::unique_ptr<SAFEARRAY, SafeArrayDestroy_delete> sa(SafeArrayCreateVector(VT_UI1, 0, (ULONG)length));
-
959 if (!sa) _Unlikely_
-
960 throw std::runtime_error("SafeArrayCreateVector failed");
-
961 safearray_accessor<void> a(sa.get());
-
962 if (seek(0) != 0) _Unlikely_
-
963 throw std::system_error(sys_error(), std::system_category(), "failed to seek");
-
964 if (read_array(a.data(), 1, length) != length)
-
965 throw std::system_error(sys_error(), std::system_category(), "failed to read");
-
966 return sa.release();
-
967 }
-
968#endif
-
969
-
-
975 charset_id read_charset(_In_ charset_id default_charset = charset_id::system)
-
976 {
-
977 if (seek(0) != 0) _Unlikely_
-
978 throw std::system_error(sys_error(), std::system_category(), "failed to seek");
-
979 char32_t id_utf32;
-
980 read_array(&id_utf32, sizeof(char32_t), 1);
-
981 if (ok() && id_utf32 == utf32_bom)
-
982 return charset_id::utf32;
-
983
-
984 if (seek(0) != 0) _Unlikely_
-
985 throw std::system_error(sys_error(), std::system_category(), "failed to seek");
-
986 char16_t id_utf16;
-
987 read_array(&id_utf16, sizeof(char16_t), 1);
-
988 if (ok() && id_utf16 == utf16_bom)
-
989 return charset_id::utf16;
-
990
-
991 if (seek(0) != 0) _Unlikely_
-
992 throw std::system_error(sys_error(), std::system_category(), "failed to seek");
-
993 char id_utf8[3] = { 0 };
-
994 read_array(id_utf8, sizeof(id_utf8), 1);
-
995 if (ok() && strncmp(id_utf8, _countof(id_utf8), utf8_bom, _countof(utf8_bom)) == 0)
-
996 return charset_id::utf8;
-
997
-
998 if (seek(0) != 0) _Unlikely_
-
999 throw std::system_error(sys_error(), std::system_category(), "failed to seek");
-
1000 return default_charset;
-
1001 }
+
957 if (size() > ULONG_MAX)
+
958 throw std::range_error("data too big");
+
959 ULONG length = static_cast<ULONG>(size());
+
960 std::unique_ptr<SAFEARRAY, SafeArrayDestroy_delete> sa(SafeArrayCreateVector(VT_UI1, 0, length));
+
961 if (!sa) _Unlikely_
+
962 throw std::runtime_error("SafeArrayCreateVector failed");
+
963 if (seek(0) != 0) _Unlikely_
+
964 throw std::system_error(sys_error(), std::system_category(), "failed to seek");
+
965 safearray_accessor<void> a(sa.get());
+
966 if (read_array(a.data(), 1, length) != length)
+
967 throw std::system_error(sys_error(), std::system_category(), "failed to read");
+
968 return sa.release();
+
969 }
+
970#endif
+
971
+
+
977 charset_id read_charset(_In_ charset_id default_charset = charset_id::system)
+
978 {
+
979 if (seek(0) != 0) _Unlikely_
+
980 throw std::system_error(sys_error(), std::system_category(), "failed to seek");
+
981 char32_t id_utf32;
+
982 read_array(&id_utf32, sizeof(char32_t), 1);
+
983 if (ok() && id_utf32 == utf32_bom)
+
984 return charset_id::utf32;
+
985
+
986 if (seek(0) != 0) _Unlikely_
+
987 throw std::system_error(sys_error(), std::system_category(), "failed to seek");
+
988 char16_t id_utf16;
+
989 read_array(&id_utf16, sizeof(char16_t), 1);
+
990 if (ok() && id_utf16 == utf16_bom)
+
991 return charset_id::utf16;
+
992
+
993 if (seek(0) != 0) _Unlikely_
+
994 throw std::system_error(sys_error(), std::system_category(), "failed to seek");
+
995 char id_utf8[3] = { 0 };
+
996 read_array(id_utf8, sizeof(id_utf8), 1);
+
997 if (ok() && strncmp(id_utf8, _countof(id_utf8), utf8_bom, _countof(utf8_bom)) == 0)
+
998 return charset_id::utf8;
+
999
+
1000 if (seek(0) != 0) _Unlikely_
+
1001 throw std::system_error(sys_error(), std::system_category(), "failed to seek");
+
1002 return default_charset;
+
1003 }
-
1002 };
+
1004 };
-
1003
-
-
1009 class converter : public basic
-
1010 {
-
1011 protected:
-
1013#pragma warning(suppress: 26495) // The delayed init call will finish initializing the class.
-
1014 explicit converter() : basic(state_t::fail) {}
-
1015
-
1016 void init(_Inout_ basic& source)
-
1017 {
-
1018 m_source = &source;
-
1019 init();
-
1020 }
-
1021
-
1022 void init()
-
1023 {
-
1024 m_state = m_source->state();
-
1025 }
-
1026
-
1027 void done()
-
1028 {
-
1029 m_source = nullptr;
-
1030 }
-
1032
-
1033 public:
-
1034 converter(_Inout_ basic& source) :
-
1035 basic(source.state()),
-
1036 m_source(&source)
-
1037 {}
-
1038
-
-
1039 virtual _Success_(return != 0 || length == 0) size_t read(
-
1040 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
1041 {
-
1042 size_t num_read = m_source->read(data, length);
-
1043 m_state = m_source->state();
-
1044 return num_read;
-
1045 }
+
1005
+
+
1011 class converter : public basic
+
1012 {
+
1013 protected:
+
1015#pragma warning(suppress: 26495) // The delayed init call will finish initializing the class.
+
1016 explicit converter() : basic(state_t::fail) {}
+
1017
+
1018 void init(_Inout_ basic& source)
+
1019 {
+
1020 m_source = &source;
+
1021 init();
+
1022 }
+
1023
+
1024 void init()
+
1025 {
+
1026 m_state = m_source->state();
+
1027 }
+
1028
+
1029 void done()
+
1030 {
+
1031 m_source = nullptr;
+
1032 }
+
1034
+
1035 public:
+
1036 converter(_Inout_ basic& source) :
+
1037 basic(source.state()),
+
1038 m_source(&source)
+
1039 {}
+
1040
+
+
1041 virtual _Success_(return != 0 || length == 0) size_t read(
+
1042 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
1043 {
+
1044 size_t num_read = m_source->read(data, length);
+
1045 m_state = m_source->state();
+
1046 return num_read;
+
1047 }
-
1046
-
-
1047 virtual _Success_(return != 0) size_t write(
-
1048 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
1049 {
-
1050 size_t num_written = m_source->write(data, length);
-
1051 m_state = m_source->state();
-
1052 return num_written;
-
1053 }
+
1048
+
+
1049 virtual _Success_(return != 0) size_t write(
+
1050 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
1051 {
+
1052 size_t num_written = m_source->write(data, length);
+
1053 m_state = m_source->state();
+
1054 return num_written;
+
1055 }
-
1054
-
-
1055 virtual void close()
-
1056 {
-
1057 m_source->close();
-
1058 m_state = m_source->state();
-
1059 }
+
1056
+
+
1057 virtual void close()
+
1058 {
+
1059 m_source->close();
+
1060 m_state = m_source->state();
+
1061 }
-
1060
-
-
1061 virtual void flush()
-
1062 {
-
1063 m_source->flush();
-
1064 m_state = m_source->state();
-
1065 }
+
1062
+
+
1063 virtual void flush()
+
1064 {
+
1065 m_source->flush();
+
1066 m_state = m_source->state();
+
1067 }
-
1066
-
1067 protected:
-
1068 basic* m_source;
-
1069 };
+
1068
+
1069 protected:
+
1070 basic* m_source;
+
1071 };
-
1070
-
-
1074 class replicator : public basic
-
1075 {
-
1076 public:
-
1077 virtual ~replicator()
-
1078 {
-
1079 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w) {
-
1080 auto _w = w->get();
-
1081 {
-
1082 const std::lock_guard<std::mutex> lk(_w->mutex);
-
1083 _w->op = worker::op_t::quit;
-
1084 }
-
1085 _w->cv.notify_one();
-
1086 }
-
1087 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w)
-
1088 w->get()->join();
-
1089 }
-
1090
-
-
1094 void push_back(_In_ basic* source)
-
1095 {
-
1096 m_workers.push_back(std::unique_ptr<worker>(new worker(source)));
-
1097 }
+
1072
+
+
1076 class replicator : public basic
+
1077 {
+
1078 public:
+
1079 virtual ~replicator()
+
1080 {
+
1081 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w) {
+
1082 auto _w = w->get();
+
1083 {
+
1084 const std::lock_guard<std::mutex> lk(_w->mutex);
+
1085 _w->op = worker::op_t::quit;
+
1086 }
+
1087 _w->cv.notify_one();
+
1088 }
+
1089 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w)
+
1090 w->get()->join();
+
1091 }
+
1092
+
+
1096 void push_back(_In_ basic* source)
+
1097 {
+
1098 m_workers.push_back(std::unique_ptr<worker>(new worker(source)));
+
1099 }
-
1098
-
-
1102 void remove(basic* source)
-
1103 {
-
1104 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w) {
-
1105 auto _w = w->get();
-
1106 if (_w->source == source) {
-
1107 {
-
1108 const std::lock_guard<std::mutex> lk(_w->mutex);
-
1109 _w->op = worker::op_t::quit;
-
1110 }
-
1111 _w->cv.notify_one();
-
1112 _w->join();
-
1113 m_workers.erase(w);
-
1114 return;
-
1115 }
-
1116 }
-
1117 }
+
1100
+
+
1104 void remove(basic* source)
+
1105 {
+
1106 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w) {
+
1107 auto _w = w->get();
+
1108 if (_w->source == source) {
+
1109 {
+
1110 const std::lock_guard<std::mutex> lk(_w->mutex);
+
1111 _w->op = worker::op_t::quit;
+
1112 }
+
1113 _w->cv.notify_one();
+
1114 _w->join();
+
1115 m_workers.erase(w);
+
1116 return;
+
1117 }
+
1118 }
+
1119 }
-
1118
-
-
1119 virtual _Success_(return != 0) size_t write(
-
1120 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
1121 {
-
1122 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w) {
-
1123 auto _w = w->get();
-
1124 {
-
1125 const std::lock_guard<std::mutex> lk(_w->mutex);
-
1126 _w->op = worker::op_t::write;
-
1127 _w->data = data;
-
1128 _w->length = length;
-
1129 }
-
1130 _w->cv.notify_one();
-
1131 }
-
1132 size_t num_written = length;
-
1133 m_state = state_t::ok;
-
1134 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w) {
-
1135 auto _w = w->get();
-
1136 std::unique_lock<std::mutex> lk(_w->mutex);
-
1137 _w->cv.wait(lk, [&] {return _w->op == worker::op_t::noop; });
-
1138 if (_w->num_written < num_written)
-
1139 num_written = _w->num_written;
-
1140 if (ok() && !_w->source->ok())
-
1141 m_state = _w->source->state();
-
1142 }
-
1143 return num_written;
-
1144 }
+
1120
+
+
1121 virtual _Success_(return != 0) size_t write(
+
1122 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
1123 {
+
1124 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w) {
+
1125 auto _w = w->get();
+
1126 {
+
1127 const std::lock_guard<std::mutex> lk(_w->mutex);
+
1128 _w->op = worker::op_t::write;
+
1129 _w->data = data;
+
1130 _w->length = length;
+
1131 }
+
1132 _w->cv.notify_one();
+
1133 }
+
1134 size_t num_written = length;
+
1135 m_state = state_t::ok;
+
1136 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w) {
+
1137 auto _w = w->get();
+
1138 std::unique_lock<std::mutex> lk(_w->mutex);
+
1139 _w->cv.wait(lk, [&] {return _w->op == worker::op_t::noop; });
+
1140 if (_w->num_written < num_written)
+
1141 num_written = _w->num_written;
+
1142 if (ok() && !_w->source->ok())
+
1143 m_state = _w->source->state();
+
1144 }
+
1145 return num_written;
+
1146 }
-
1145
-
-
1146 virtual void close()
-
1147 {
-
1148 foreach_worker(worker::op_t::close);
-
1149 }
+
1147
+
+
1148 virtual void close()
+
1149 {
+
1150 foreach_worker(worker::op_t::close);
+
1151 }
-
1150
-
-
1151 virtual void flush()
-
1152 {
-
1153 foreach_worker(worker::op_t::flush);
-
1154 }
+
1152
+
+
1153 virtual void flush()
+
1154 {
+
1155 foreach_worker(worker::op_t::flush);
+
1156 }
-
1155
-
1156 protected:
-
-
1157 class worker : public std::thread
-
1158 {
-
1159 public:
-
1160 worker(_In_ basic* _source) :
-
1161 source(_source),
-
1162 op(op_t::noop),
-
1163 data(nullptr),
-
1164 length(0),
-
1165 num_written(0)
-
1166 {
-
1167 *static_cast<std::thread*>(this) = std::thread([](_Inout_ worker& w) { w.process_op(); }, std::ref(*this));
-
1168 }
-
1169
-
1170 protected:
-
1171 void process_op()
-
1172 {
-
1173 for (;;) {
-
1174 std::unique_lock<std::mutex> lk(mutex);
-
1175 cv.wait(lk, [&] {return op != op_t::noop; });
-
1176 switch (op) {
-
1177 case op_t::quit:
-
1178 return;
-
1179 case op_t::write:
-
1180 num_written = source->write(data, length);
-
1181 break;
-
1182 case op_t::close:
-
1183 source->close();
-
1184 break;
-
1185 case op_t::flush:
-
1186 source->flush();
-
1187 break;
-
1188 case op_t::noop:;
-
1189 }
-
1190 op = op_t::noop;
-
1191 lk.unlock();
-
1192 cv.notify_one();
-
1193 }
-
1194 }
-
1195
-
1196 public:
-
1197 basic* source;
-
1198 enum class op_t {
-
1199 noop = 0,
-
1200 quit,
-
1201 write,
-
1202 close,
-
1203 flush,
-
1204 } op;
-
1205 const void* data;
-
1206 size_t length;
- -
1208 std::mutex mutex;
-
1209 std::condition_variable cv;
-
1210 };
+
1157
+
1158 protected:
+
+
1159 class worker : public std::thread
+
1160 {
+
1161 public:
+
1162 worker(_In_ basic* _source) :
+
1163 source(_source),
+
1164 op(op_t::noop),
+
1165 data(nullptr),
+
1166 length(0),
+
1167 num_written(0)
+
1168 {
+
1169 *static_cast<std::thread*>(this) = std::thread([](_Inout_ worker& w) { w.process_op(); }, std::ref(*this));
+
1170 }
+
1171
+
1172 protected:
+
1173 void process_op()
+
1174 {
+
1175 for (;;) {
+
1176 std::unique_lock<std::mutex> lk(mutex);
+
1177 cv.wait(lk, [&] {return op != op_t::noop; });
+
1178 switch (op) {
+
1179 case op_t::quit:
+
1180 return;
+
1181 case op_t::write:
+
1182 num_written = source->write(data, length);
+
1183 break;
+
1184 case op_t::close:
+
1185 source->close();
+
1186 break;
+
1187 case op_t::flush:
+
1188 source->flush();
+
1189 break;
+
1190 case op_t::noop:;
+
1191 }
+
1192 op = op_t::noop;
+
1193 lk.unlock();
+
1194 cv.notify_one();
+
1195 }
+
1196 }
+
1197
+
1198 public:
+
1199 basic* source;
+
1200 enum class op_t {
+
1201 noop = 0,
+
1202 quit,
+
1203 write,
+
1204 close,
+
1205 flush,
+
1206 } op;
+
1207 const void* data;
+
1208 size_t length;
+ +
1210 std::mutex mutex;
+
1211 std::condition_variable cv;
+
1212 };
-
1211
-
1212 void foreach_worker(_In_ worker::op_t op)
-
1213 {
-
1214 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w) {
-
1215 auto _w = w->get();
-
1216 {
-
1217 const std::lock_guard<std::mutex> lk(_w->mutex);
-
1218 _w->op = op;
-
1219 }
-
1220 _w->cv.notify_one();
-
1221 }
-
1222 m_state = state_t::ok;
-
1223 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w) {
-
1224 auto _w = w->get();
-
1225 std::unique_lock<std::mutex> lk(_w->mutex);
-
1226 _w->cv.wait(lk, [&] {return _w->op == worker::op_t::noop; });
-
1227 if (ok())
-
1228 m_state = _w->source->state();
-
1229 }
-
1230 }
-
1231
-
1232 std::list<std::unique_ptr<worker>> m_workers;
-
1233 };
+
1213
+
1214 void foreach_worker(_In_ worker::op_t op)
+
1215 {
+
1216 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w) {
+
1217 auto _w = w->get();
+
1218 {
+
1219 const std::lock_guard<std::mutex> lk(_w->mutex);
+
1220 _w->op = op;
+
1221 }
+
1222 _w->cv.notify_one();
+
1223 }
+
1224 m_state = state_t::ok;
+
1225 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w) {
+
1226 auto _w = w->get();
+
1227 std::unique_lock<std::mutex> lk(_w->mutex);
+
1228 _w->cv.wait(lk, [&] {return _w->op == worker::op_t::noop; });
+
1229 if (ok())
+
1230 m_state = _w->source->state();
+
1231 }
+
1232 }
+
1233
+
1234 std::list<std::unique_ptr<worker>> m_workers;
+
1235 };
-
1234
-
1235 constexpr size_t default_async_limit = 0x100000;
1236
-
1242 template <size_t N_cap = default_async_limit>
-
- -
1244 {
-
1245 public:
-
1246 async_reader(_Inout_ basic& source) :
-
1247 converter(source),
-
1248 m_worker([](_Inout_ async_reader& w) { w.process(); }, std::ref(*this))
-
1249 {}
-
1250
-
1251 virtual ~async_reader()
-
1252 {
-
1253 m_ring.quit();
-
1254 m_worker.join();
-
1255 }
-
1256
-
1257#pragma warning(suppress: 6101) // See [1] below
-
-
1258 virtual _Success_(return != 0 || length == 0) size_t read(
-
1259 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
1260 {
-
1261 _Assume_(data || !length);
-
1262 for (size_t to_read = length;;) {
-
1263 uint8_t* ptr; size_t num_read;
-
1264 std::tie(ptr, num_read) = m_ring.front();
-
1265 if (!ptr) _Unlikely_ {
-
1266 m_state = to_read < length || !length ? state_t::ok : m_source->state();
-
1267 return length - to_read; // [1] Code analysis misses `length - to_read` bytes were written to data in previous loop iterations.
-
1268 }
-
1269 if (to_read < num_read)
-
1270 num_read = to_read;
-
1271 memcpy(data, ptr, num_read);
-
1272 m_ring.pop(num_read);
-
1273 to_read -= num_read;
-
1274 if (!to_read) {
-
1275 m_state = state_t::ok;
-
1276 return length;
-
1277 }
-
1278 reinterpret_cast<uint8_t*&>(data) += num_read;
-
1279 }
-
1280 }
+
1237 constexpr size_t default_async_limit = 0x100000;
+
1238
+
1244 template <size_t N_cap = default_async_limit>
+
+ +
1246 {
+
1247 public:
+
1248 async_reader(_Inout_ basic& source) :
+
1249 converter(source),
+
1250 m_worker([](_Inout_ async_reader& w) { w.process(); }, std::ref(*this))
+
1251 {}
+
1252
+
1253 virtual ~async_reader()
+
1254 {
+
1255 m_ring.quit();
+
1256 m_worker.join();
+
1257 }
+
1258
+
1259#pragma warning(suppress: 6101) // See [1] below
+
+
1260 virtual _Success_(return != 0 || length == 0) size_t read(
+
1261 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
1262 {
+
1263 _Assume_(data || !length);
+
1264 for (size_t to_read = length;;) {
+
1265 uint8_t* ptr; size_t num_read;
+
1266 std::tie(ptr, num_read) = m_ring.front();
+
1267 if (!ptr) _Unlikely_ {
+
1268 m_state = to_read < length || !length ? state_t::ok : m_source->state();
+
1269 return length - to_read; // [1] Code analysis misses `length - to_read` bytes were written to data in previous loop iterations.
+
1270 }
+
1271 if (to_read < num_read)
+
1272 num_read = to_read;
+
1273 memcpy(data, ptr, num_read);
+
1274 m_ring.pop(num_read);
+
1275 to_read -= num_read;
+
1276 if (!to_read) {
+
1277 m_state = state_t::ok;
+
1278 return length;
+
1279 }
+
1280 reinterpret_cast<uint8_t*&>(data) += num_read;
+
1281 }
+
1282 }
-
1281
-
1282 protected:
-
1283 void process()
-
1284 {
-
1285 for (;;) {
-
1286 uint8_t* ptr; size_t num_write;
-
1287 std::tie(ptr, num_write) = m_ring.back();
-
1288 if (!ptr) _Unlikely_
-
1289 break;
-
1290 num_write = m_source->read(ptr, num_write);
-
1291 m_ring.push(num_write);
-
1292 if (!m_source->ok()) {
-
1293 m_ring.quit();
-
1294 break;
-
1295 }
-
1296 }
-
1297 }
-
1298
-
1299 protected:
-
1300 ring<uint8_t, N_cap> m_ring;
-
1301 std::thread m_worker;
-
1302 };
+
1283
+
1284 protected:
+
1285 void process()
+
1286 {
+
1287 for (;;) {
+
1288 uint8_t* ptr; size_t num_write;
+
1289 std::tie(ptr, num_write) = m_ring.back();
+
1290 if (!ptr) _Unlikely_
+
1291 break;
+
1292 num_write = m_source->read(ptr, num_write);
+
1293 m_ring.push(num_write);
+
1294 if (!m_source->ok()) {
+
1295 m_ring.quit();
+
1296 break;
+
1297 }
+
1298 }
+
1299 }
+
1300
+
1301 protected:
+
1302 ring<uint8_t, N_cap> m_ring;
+
1303 std::thread m_worker;
+
1304 };
-
1303
-
1309 template <size_t N_cap = default_async_limit>
-
- -
1311 {
-
1312 public:
-
1313 async_writer(_Inout_ basic& source) :
-
1314 converter(source),
-
1315 m_worker([](_Inout_ async_writer& w) { w.process(); }, std::ref(*this))
-
1316 {}
-
1317
-
1318 virtual ~async_writer()
-
1319 {
-
1320 m_ring.quit();
-
1321 m_worker.join();
-
1322 }
-
1323
-
-
1324 virtual _Success_(return != 0) size_t write(
-
1325 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
1326 {
-
1327 _Assume_(data || !length);
-
1328 for (size_t to_write = length;;) {
-
1329 uint8_t* ptr; size_t num_write;
-
1330 std::tie(ptr, num_write) = m_ring.back();
-
1331 if (!ptr) _Unlikely_ {
-
1332 m_state = state_t::fail;
-
1333 return length - to_write;
-
1334 }
-
1335 if (to_write < num_write)
-
1336 num_write = to_write;
-
1337 memcpy(ptr, data, num_write);
-
1338 m_ring.push(num_write);
-
1339 to_write -= num_write;
-
1340 if (!to_write) {
-
1341 m_state = state_t::ok;
-
1342 return length;
-
1343 }
-
1344 reinterpret_cast<const uint8_t*&>(data) += num_write;
-
1345 }
-
1346 }
+
1305
+
1311 template <size_t N_cap = default_async_limit>
+
+ +
1313 {
+
1314 public:
+
1315 async_writer(_Inout_ basic& source) :
+
1316 converter(source),
+
1317 m_worker([](_Inout_ async_writer& w) { w.process(); }, std::ref(*this))
+
1318 {}
+
1319
+
1320 virtual ~async_writer()
+
1321 {
+
1322 m_ring.quit();
+
1323 m_worker.join();
+
1324 }
+
1325
+
+
1326 virtual _Success_(return != 0) size_t write(
+
1327 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
1328 {
+
1329 _Assume_(data || !length);
+
1330 for (size_t to_write = length;;) {
+
1331 uint8_t* ptr; size_t num_write;
+
1332 std::tie(ptr, num_write) = m_ring.back();
+
1333 if (!ptr) _Unlikely_ {
+
1334 m_state = state_t::fail;
+
1335 return length - to_write;
+
1336 }
+
1337 if (to_write < num_write)
+
1338 num_write = to_write;
+
1339 memcpy(ptr, data, num_write);
+
1340 m_ring.push(num_write);
+
1341 to_write -= num_write;
+
1342 if (!to_write) {
+
1343 m_state = state_t::ok;
+
1344 return length;
+
1345 }
+
1346 reinterpret_cast<const uint8_t*&>(data) += num_write;
+
1347 }
+
1348 }
-
1347
-
-
1348 virtual void flush()
-
1349 {
-
1350 m_ring.sync();
- -
1352 }
+
1349
+
+
1350 virtual void flush()
+
1351 {
+
1352 m_ring.sync();
+ +
1354 }
-
1353
-
1354 protected:
-
1355 void process()
-
1356 {
-
1357 for (;;) {
-
1358 uint8_t* ptr; size_t num_read;
-
1359 std::tie(ptr, num_read) = m_ring.front();
-
1360 if (!ptr)
-
1361 break;
-
1362 num_read = m_source->write(ptr, num_read);
-
1363 m_ring.pop(num_read);
-
1364 if (!m_source->ok()) {
-
1365 m_ring.quit();
-
1366 break;
-
1367 }
-
1368 }
-
1369 }
-
1370
-
1371 protected:
-
1372 ring<uint8_t, N_cap> m_ring;
-
1373 std::thread m_worker;
-
1374 };
+
1355
+
1356 protected:
+
1357 void process()
+
1358 {
+
1359 for (;;) {
+
1360 uint8_t* ptr; size_t num_read;
+
1361 std::tie(ptr, num_read) = m_ring.front();
+
1362 if (!ptr)
+
1363 break;
+
1364 num_read = m_source->write(ptr, num_read);
+
1365 m_ring.pop(num_read);
+
1366 if (!m_source->ok()) {
+
1367 m_ring.quit();
+
1368 break;
+
1369 }
+
1370 }
+
1371 }
+
1372
+
1373 protected:
+
1374 ring<uint8_t, N_cap> m_ring;
+
1375 std::thread m_worker;
+
1376 };
-
1375
-
1376 constexpr size_t default_buffer_size = 0x400;
1377
-
-
1381 class buffer : public converter
-
1382 {
-
1383 protected:
-
1385 explicit buffer(_In_ size_t read_buffer_size = default_buffer_size, _In_ size_t write_buffer_size = default_buffer_size) :
-
1386 converter(),
-
1387 m_read_buffer(read_buffer_size),
-
1388 m_write_buffer(write_buffer_size)
-
1389 {}
-
1390
-
1391 void done()
-
1392 {
-
1393 if (m_source)
-
1394 flush_write();
-
1395 converter::done();
-
1396 }
-
1398
-
1399 public:
-
1400 buffer(_Inout_ basic& source, _In_ size_t read_buffer_size = default_buffer_size, _In_ size_t write_buffer_size = default_buffer_size) :
-
1401 converter(source),
-
1402 m_read_buffer(read_buffer_size),
-
1403 m_write_buffer(write_buffer_size)
-
1404 {}
-
1405
-
1406 virtual ~buffer()
-
1407 {
-
1408 if (m_source)
-
1409 flush_write();
-
1410 }
-
1411
-
-
1412 virtual _Success_(return != 0 || length == 0) size_t read(
-
1413 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
1414 {
-
1415 _Assume_(data || !length);
-
1416 for (size_t to_read = length;;) {
-
1417 size_t buffer_size = m_read_buffer.tail - m_read_buffer.head;
-
1418 if (to_read <= buffer_size) {
-
1419 memcpy(data, m_read_buffer.data + m_read_buffer.head, to_read);
-
1420 m_read_buffer.head += to_read;
-
1421 m_state = state_t::ok;
-
1422 return length;
-
1423 }
-
1424 if (buffer_size) {
-
1425 memcpy(data, m_read_buffer.data + m_read_buffer.head, buffer_size);
-
1426 reinterpret_cast<uint8_t*&>(data) += buffer_size;
-
1427 to_read -= buffer_size;
-
1428 }
-
1429 m_read_buffer.head = 0;
-
1430 if (to_read > m_read_buffer.capacity) {
-
1431 // When needing to read more data than buffer capacity, bypass the buffer.
-
1432 m_read_buffer.tail = 0;
-
1433 to_read -= m_source->read(data, to_read);
-
1434 m_state = to_read < length ? state_t::ok : m_source->state();
-
1435 return length - to_read;
-
1436 }
-
1437 m_read_buffer.tail = m_source->read(m_read_buffer.data, m_read_buffer.capacity);
-
1438 if (m_read_buffer.tail < m_read_buffer.capacity && m_read_buffer.tail < to_read) _Unlikely_ {
-
1439 memcpy(data, m_read_buffer.data, m_read_buffer.tail);
-
1440 m_read_buffer.head = m_read_buffer.tail;
-
1441 to_read -= m_read_buffer.tail;
-
1442 m_state = to_read < length ? state_t::ok : m_source->state();
-
1443 return length - to_read;
-
1444 }
-
1445 }
-
1446 }
+
1378 constexpr size_t default_buffer_size = 0x400;
+
1379
+
+
1383 class buffer : public converter
+
1384 {
+
1385 protected:
+
1387 explicit buffer(_In_ size_t read_buffer_size = default_buffer_size, _In_ size_t write_buffer_size = default_buffer_size) :
+
1388 converter(),
+
1389 m_read_buffer(read_buffer_size),
+
1390 m_write_buffer(write_buffer_size)
+
1391 {}
+
1392
+
1393 void done()
+
1394 {
+
1395 if (m_source)
+
1396 flush_write();
+
1397 converter::done();
+
1398 }
+
1400
+
1401 public:
+
1402 buffer(_Inout_ basic& source, _In_ size_t read_buffer_size = default_buffer_size, _In_ size_t write_buffer_size = default_buffer_size) :
+
1403 converter(source),
+
1404 m_read_buffer(read_buffer_size),
+
1405 m_write_buffer(write_buffer_size)
+
1406 {}
+
1407
+
1408 virtual ~buffer()
+
1409 {
+
1410 if (m_source)
+
1411 flush_write();
+
1412 }
+
1413
+
+
1414 virtual _Success_(return != 0 || length == 0) size_t read(
+
1415 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
1416 {
+
1417 _Assume_(data || !length);
+
1418 for (size_t to_read = length;;) {
+
1419 size_t buffer_size = m_read_buffer.tail - m_read_buffer.head;
+
1420 if (to_read <= buffer_size) {
+
1421 memcpy(data, m_read_buffer.data + m_read_buffer.head, to_read);
+
1422 m_read_buffer.head += to_read;
+
1423 m_state = state_t::ok;
+
1424 return length;
+
1425 }
+
1426 if (buffer_size) {
+
1427 memcpy(data, m_read_buffer.data + m_read_buffer.head, buffer_size);
+
1428 reinterpret_cast<uint8_t*&>(data) += buffer_size;
+
1429 to_read -= buffer_size;
+
1430 }
+
1431 m_read_buffer.head = 0;
+
1432 if (to_read > m_read_buffer.capacity) {
+
1433 // When needing to read more data than buffer capacity, bypass the buffer.
+
1434 m_read_buffer.tail = 0;
+
1435 to_read -= m_source->read(data, to_read);
+
1436 m_state = to_read < length ? state_t::ok : m_source->state();
+
1437 return length - to_read;
+
1438 }
+
1439 m_read_buffer.tail = m_source->read(m_read_buffer.data, m_read_buffer.capacity);
+
1440 if (m_read_buffer.tail < m_read_buffer.capacity && m_read_buffer.tail < to_read) _Unlikely_ {
+
1441 memcpy(data, m_read_buffer.data, m_read_buffer.tail);
+
1442 m_read_buffer.head = m_read_buffer.tail;
+
1443 to_read -= m_read_buffer.tail;
+
1444 m_state = to_read < length ? state_t::ok : m_source->state();
+
1445 return length - to_read;
+
1446 }
+
1447 }
+
1448 }
-
1447
-
-
1448 virtual _Success_(return != 0) size_t write(
-
1449 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
1450 {
-
1451 _Assume_(data || !length);
-
1452 if (!length) _Unlikely_ {
-
1453 // Pass null writes (zero-byte length). Null write operations have special meaning with with Windows pipes.
-
1454 flush_write();
-
1455 if (!ok()) _Unlikely_
-
1456 return 0;
-
1457 converter::write(nullptr, 0);
-
1458 return 0;
-
1459 }
-
1460
-
1461 for (size_t to_write = length;;) {
-
1462 size_t available_buffer = m_write_buffer.capacity - m_write_buffer.tail;
-
1463 if (to_write <= available_buffer) {
-
1464 memcpy(m_write_buffer.data + m_write_buffer.tail, data, to_write);
-
1465 m_write_buffer.tail += to_write;
-
1466 m_state = state_t::ok;
-
1467 return length;
-
1468 }
-
1469 if (available_buffer) {
-
1470 memcpy(m_write_buffer.data + m_write_buffer.tail, data, available_buffer);
-
1471 reinterpret_cast<const uint8_t*&>(data) += available_buffer;
-
1472 to_write -= available_buffer;
-
1473 m_write_buffer.tail += available_buffer;
-
1474 }
-
1475 size_t buffer_size = m_write_buffer.tail - m_write_buffer.head;
-
1476 if (buffer_size) {
-
1477 m_write_buffer.head += converter::write(m_write_buffer.data + m_write_buffer.head, buffer_size);
-
1478 if (m_write_buffer.head == m_write_buffer.tail)
-
1479 m_write_buffer.head = m_write_buffer.tail = 0;
-
1480 else
-
1481 return length - to_write;
-
1482 }
-
1483 if (to_write > m_write_buffer.capacity) {
-
1484 // When needing to write more data than buffer capacity, bypass the buffer.
-
1485 to_write -= converter::write(data, to_write);
-
1486 return length - to_write;
-
1487 }
-
1488 }
-
1489 }
+
1449
+
+
1450 virtual _Success_(return != 0) size_t write(
+
1451 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
1452 {
+
1453 _Assume_(data || !length);
+
1454 if (!length) _Unlikely_ {
+
1455 // Pass null writes (zero-byte length). Null write operations have special meaning with with Windows pipes.
+
1456 flush_write();
+
1457 if (!ok()) _Unlikely_
+
1458 return 0;
+
1459 converter::write(nullptr, 0);
+
1460 return 0;
+
1461 }
+
1462
+
1463 for (size_t to_write = length;;) {
+
1464 size_t available_buffer = m_write_buffer.capacity - m_write_buffer.tail;
+
1465 if (to_write <= available_buffer) {
+
1466 memcpy(m_write_buffer.data + m_write_buffer.tail, data, to_write);
+
1467 m_write_buffer.tail += to_write;
+
1468 m_state = state_t::ok;
+
1469 return length;
+
1470 }
+
1471 if (available_buffer) {
+
1472 memcpy(m_write_buffer.data + m_write_buffer.tail, data, available_buffer);
+
1473 reinterpret_cast<const uint8_t*&>(data) += available_buffer;
+
1474 to_write -= available_buffer;
+
1475 m_write_buffer.tail += available_buffer;
+
1476 }
+
1477 size_t buffer_size = m_write_buffer.tail - m_write_buffer.head;
+
1478 if (buffer_size) {
+
1479 m_write_buffer.head += converter::write(m_write_buffer.data + m_write_buffer.head, buffer_size);
+
1480 if (m_write_buffer.head == m_write_buffer.tail)
+
1481 m_write_buffer.head = m_write_buffer.tail = 0;
+
1482 else
+
1483 return length - to_write;
+
1484 }
+
1485 if (to_write > m_write_buffer.capacity) {
+
1486 // When needing to write more data than buffer capacity, bypass the buffer.
+
1487 to_write -= converter::write(data, to_write);
+
1488 return length - to_write;
+
1489 }
+
1490 }
+
1491 }
-
1490
-
-
1491 virtual void flush()
-
1492 {
-
1493 flush_write();
-
1494 if (ok())
- -
1496 }
+
1492
+
+
1493 virtual void flush()
+
1494 {
+
1495 flush_write();
+
1496 if (ok())
+ +
1498 }
-
1497
-
1498 protected:
-
1499 void flush_write()
-
1500 {
-
1501 size_t buffer_size = m_write_buffer.tail - m_write_buffer.head;
-
1502 if (buffer_size) {
-
1503 m_write_buffer.head += m_source->write(m_write_buffer.data + m_write_buffer.head, buffer_size);
-
1504 if (m_write_buffer.head == m_write_buffer.tail) {
-
1505 m_write_buffer.head = 0;
-
1506 m_write_buffer.tail = 0;
-
1507 }
-
1508 else {
-
1509 m_state = m_source->state();
-
1510 return;
-
1511 }
-
1512 }
-
1513 m_state = state_t::ok;
-
1514 }
-
1515
-
-
1516 struct buffer_t {
-
1517 uint8_t* data;
-
1518 size_t head, tail, capacity;
-
1519
-
1520 buffer_t(_In_ size_t buffer_size) :
-
1521 head(0),
-
1522 tail(0),
-
1523 capacity(buffer_size),
-
1524 data(buffer_size ? new uint8_t[buffer_size] : nullptr)
-
1525 {}
-
1526
-
1527 ~buffer_t()
-
1528 {
-
1529 if (data)
-
1530 delete[] data;
-
1531 }
-
1532 } m_read_buffer, m_write_buffer;
+
1499
+
1500 protected:
+
1501 void flush_write()
+
1502 {
+
1503 size_t buffer_size = m_write_buffer.tail - m_write_buffer.head;
+
1504 if (buffer_size) {
+
1505 m_write_buffer.head += m_source->write(m_write_buffer.data + m_write_buffer.head, buffer_size);
+
1506 if (m_write_buffer.head == m_write_buffer.tail) {
+
1507 m_write_buffer.head = 0;
+
1508 m_write_buffer.tail = 0;
+
1509 }
+
1510 else {
+
1511 m_state = m_source->state();
+
1512 return;
+
1513 }
+
1514 }
+
1515 m_state = state_t::ok;
+
1516 }
+
1517
+
+
1518 struct buffer_t {
+
1519 uint8_t* data;
+
1520 size_t head, tail, capacity;
+
1521
+
1522 buffer_t(_In_ size_t buffer_size) :
+
1523 head(0),
+
1524 tail(0),
+
1525 capacity(buffer_size),
+
1526 data(buffer_size ? new uint8_t[buffer_size] : nullptr)
+
1527 {}
+
1528
+
1529 ~buffer_t()
+
1530 {
+
1531 if (data)
+
1532 delete[] data;
+
1533 }
+
1534 } m_read_buffer, m_write_buffer;
-
1533 };
+
1535 };
-
1534
-
-
1538 class limiter : public converter
-
1539 {
-
1540 public:
-
1541 limiter(_Inout_ basic& source, _In_ fsize_t _read_limit = 0, _In_ fsize_t _write_limit = 0) :
-
1542 converter(source),
-
1543 read_limit(_read_limit),
-
1544 write_limit(_write_limit)
-
1545 {}
-
1546
-
-
1547 virtual _Success_(return != 0 || length == 0) size_t read(
-
1548 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
1549 {
-
1550 size_t num_read;
-
1551 if (read_limit == fsize_max)
-
1552 num_read = converter::read(data, length);
-
1553 else if (length <= read_limit) {
+
1536
+
+
1540 class limiter : public converter
+
1541 {
+
1542 public:
+
1543 limiter(_Inout_ basic& source, _In_ fsize_t _read_limit = 0, _In_ fsize_t _write_limit = 0) :
+
1544 converter(source),
+
1545 read_limit(_read_limit),
+
1546 write_limit(_write_limit)
+
1547 {}
+
1548
+
+
1549 virtual _Success_(return != 0 || length == 0) size_t read(
+
1550 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
1551 {
+
1552 size_t num_read;
+
1553 if (read_limit == fsize_max)
1554 num_read = converter::read(data, length);
-
1555 read_limit -= num_read;
-
1556 }
-
1557 else if (length && !read_limit) {
-
1558 num_read = 0;
-
1559 m_state = state_t::eof;
-
1560 }
-
1561 else {
-
1562 num_read = converter::read(data, static_cast<size_t>(read_limit));
-
1563 read_limit -= num_read;
-
1564 }
-
1565 return num_read;
-
1566 }
+
1555 else if (length <= read_limit) {
+
1556 num_read = converter::read(data, length);
+
1557 read_limit -= num_read;
+
1558 }
+
1559 else if (length && !read_limit) {
+
1560 num_read = 0;
+
1561 m_state = state_t::eof;
+
1562 }
+
1563 else {
+
1564 num_read = converter::read(data, static_cast<size_t>(read_limit));
+
1565 read_limit -= num_read;
+
1566 }
+
1567 return num_read;
+
1568 }
-
1567
-
-
1568 virtual _Success_(return != 0) size_t write(
-
1569 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
1570 {
-
1571 size_t num_written;
-
1572 if (write_limit == fsize_max)
-
1573 num_written = converter::write(data, length);
-
1574 else if (length <= write_limit) {
+
1569
+
+
1570 virtual _Success_(return != 0) size_t write(
+
1571 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
1572 {
+
1573 size_t num_written;
+
1574 if (write_limit == fsize_max)
1575 num_written = converter::write(data, length);
-
1576 write_limit -= num_written;
-
1577 }
-
1578 else if (length && !write_limit) {
-
1579 num_written = 0;
-
1580 m_state = state_t::fail;
-
1581 }
-
1582 else {
-
1583 num_written = converter::write(data, static_cast<size_t>(write_limit));
-
1584 write_limit -= num_written;
-
1585 }
-
1586 return num_written;
-
1587 }
+
1576 else if (length <= write_limit) {
+
1577 num_written = converter::write(data, length);
+
1578 write_limit -= num_written;
+
1579 }
+
1580 else if (length && !write_limit) {
+
1581 num_written = 0;
+
1582 m_state = state_t::fail;
+
1583 }
+
1584 else {
+
1585 num_written = converter::write(data, static_cast<size_t>(write_limit));
+
1586 write_limit -= num_written;
+
1587 }
+
1588 return num_written;
+
1589 }
-
1588
-
1589 public:
-
1590 fsize_t
- - -
1593 };
+
1590
+
1591 public:
+
1592 fsize_t
+ + +
1595 };
-
1594
-
-
1598 class window : public limiter
-
1599 {
-
1600 public:
-
1601 window(_Inout_ basic& source, _In_ fpos_t _read_offset = 0, _In_ fsize_t read_limit = fsize_max, _In_ fpos_t _write_offset = 0, _In_ fsize_t write_limit = fsize_max) :
-
1602 limiter(source, read_limit, write_limit),
-
1603 read_offset(_read_offset),
-
1604 write_offset(_write_offset)
-
1605 {}
-
1606
-
-
1607 virtual _Success_(return != 0 || length == 0) size_t read(
-
1608 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
1609 {
-
1610 if (read_offset) {
-
1611 m_source->skip(read_offset);
-
1612 m_state = m_source->state();
-
1613 if (!ok()) _Unlikely_
-
1614 return 0;
-
1615 read_offset = 0;
-
1616 }
-
1617 size_t num_read;
-
1618 if (read_limit == fsize_max)
-
1619 num_read = converter::read(data, length);
-
1620 else if (length <= read_limit) {
+
1596
+
+
1600 class window : public limiter
+
1601 {
+
1602 public:
+
1603 window(_Inout_ basic& source, _In_ fpos_t _read_offset = 0, _In_ fsize_t read_limit = fsize_max, _In_ fpos_t _write_offset = 0, _In_ fsize_t write_limit = fsize_max) :
+
1604 limiter(source, read_limit, write_limit),
+
1605 read_offset(_read_offset),
+
1606 write_offset(_write_offset)
+
1607 {}
+
1608
+
+
1609 virtual _Success_(return != 0 || length == 0) size_t read(
+
1610 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
1611 {
+
1612 if (read_offset) {
+
1613 m_source->skip(read_offset);
+
1614 m_state = m_source->state();
+
1615 if (!ok()) _Unlikely_
+
1616 return 0;
+
1617 read_offset = 0;
+
1618 }
+
1619 size_t num_read;
+
1620 if (read_limit == fsize_max)
1621 num_read = converter::read(data, length);
-
1622 read_limit -= num_read;
-
1623 }
-
1624 else if (length && !read_limit) {
-
1625 num_read = 0;
-
1626 m_source->skip(length);
-
1627 m_state = state_t::eof;
-
1628 }
-
1629 else {
-
1630 num_read = converter::read(data, static_cast<size_t>(read_limit));
-
1631 read_limit -= num_read;
-
1632 }
-
1633 return num_read;
-
1634 }
+
1622 else if (length <= read_limit) {
+
1623 num_read = converter::read(data, length);
+
1624 read_limit -= num_read;
+
1625 }
+
1626 else if (length && !read_limit) {
+
1627 num_read = 0;
+
1628 m_source->skip(length);
+
1629 m_state = state_t::eof;
+
1630 }
+
1631 else {
+
1632 num_read = converter::read(data, static_cast<size_t>(read_limit));
+
1633 read_limit -= num_read;
+
1634 }
+
1635 return num_read;
+
1636 }
-
1635
-
-
1636 virtual _Success_(return != 0) size_t write(
-
1637 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
1638 {
-
1639 size_t num_skipped, num_written;
-
1640 if (length <= write_offset) {
-
1641 write_offset -= length;
-
1642 m_state = state_t::ok;
-
1643 return length;
-
1644 }
-
1645 if (write_offset) {
-
1646 reinterpret_cast<const uint8_t*&>(data) += static_cast<size_t>(write_offset);
-
1647 length -= static_cast<size_t>(write_offset);
-
1648 num_skipped = static_cast<size_t>(write_offset);
-
1649 write_offset = 0;
-
1650 }
-
1651 else
-
1652 num_skipped = 0;
-
1653 if (write_limit == fsize_max)
-
1654 num_written = converter::write(data, length);
-
1655 else if (length <= write_limit) {
+
1637
+
+
1638 virtual _Success_(return != 0) size_t write(
+
1639 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
1640 {
+
1641 size_t num_skipped, num_written;
+
1642 if (length <= write_offset) {
+
1643 write_offset -= length;
+
1644 m_state = state_t::ok;
+
1645 return length;
+
1646 }
+
1647 if (write_offset) {
+
1648 reinterpret_cast<const uint8_t*&>(data) += static_cast<size_t>(write_offset);
+
1649 length -= static_cast<size_t>(write_offset);
+
1650 num_skipped = static_cast<size_t>(write_offset);
+
1651 write_offset = 0;
+
1652 }
+
1653 else
+
1654 num_skipped = 0;
+
1655 if (write_limit == fsize_max)
1656 num_written = converter::write(data, length);
-
1657 write_limit -= num_written;
-
1658 }
-
1659 else if (length && !write_limit) {
-
1660 num_skipped += length;
-
1661 num_written = 0;
-
1662 m_state = state_t::ok;
-
1663 }
-
1664 else {
-
1665 num_skipped += length - static_cast<size_t>(write_limit);
-
1666 num_written = converter::write(data, static_cast<size_t>(write_limit));
-
1667 write_limit -= num_written;
-
1668 }
-
1669 return num_skipped + num_written;
-
1670 }
+
1657 else if (length <= write_limit) {
+
1658 num_written = converter::write(data, length);
+
1659 write_limit -= num_written;
+
1660 }
+
1661 else if (length && !write_limit) {
+
1662 num_skipped += length;
+
1663 num_written = 0;
+
1664 m_state = state_t::ok;
+
1665 }
+
1666 else {
+
1667 num_skipped += length - static_cast<size_t>(write_limit);
+
1668 num_written = converter::write(data, static_cast<size_t>(write_limit));
+
1669 write_limit -= num_written;
+
1670 }
+
1671 return num_skipped + num_written;
+
1672 }
-
1671
-
1672 public:
-
1673 fpos_t
- - -
1676 };
+
1673
+
1674 public:
+
1675 fpos_t
+ + +
1678 };
-
1677
-
- -
1682 {
-
1683 public:
-
1684 file_window(_Inout_ basic_file& source, fpos_t offset = 0, fsize_t length = 0) :
-
1685 basic(source.state()),
-
1686 m_source(source),
-
1687 m_offset(source.tell()),
-
1688 m_region(offset, offset + length)
-
1689 {}
-
1690
-
-
1691 virtual _Success_(return != 0 || length == 0) size_t read(
-
1692 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
1693 {
-
1694 _Assume_(data || !length);
-
1695 if (m_region.contains(m_offset)) {
-
1696 size_t num_read = m_source.read(data, static_cast<size_t>(std::min<fpos_t>(length, m_region.end - m_offset)));
-
1697 m_state = m_source.state();
-
1698 m_offset += num_read;
-
1699 return num_read;
-
1700 }
-
1701 m_state = length ? state_t::eof : state_t::ok;
-
1702 return 0;
-
1703 }
+
1679
+
+ +
1684 {
+
1685 public:
+
1686 file_window(_Inout_ basic_file& source, fpos_t offset = 0, fsize_t length = 0) :
+
1687 basic(source.state()),
+
1688 m_source(source),
+
1689 m_offset(source.tell()),
+
1690 m_region(offset, offset + length)
+
1691 {}
+
1692
+
+
1693 virtual _Success_(return != 0 || length == 0) size_t read(
+
1694 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
1695 {
+
1696 _Assume_(data || !length);
+
1697 if (m_region.contains(m_offset)) {
+
1698 size_t num_read = m_source.read(data, static_cast<size_t>(std::min<fpos_t>(length, m_region.end - m_offset)));
+
1699 m_state = m_source.state();
+
1700 m_offset += num_read;
+
1701 return num_read;
+
1702 }
+
1703 m_state = length ? state_t::eof : state_t::ok;
+
1704 return 0;
+
1705 }
-
1704
-
-
1705 virtual _Success_(return != 0) size_t write(
-
1706 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
1707 {
-
1708 _Assume_(data || !length);
-
1709 if (m_region.contains(m_offset)) {
-
1710 size_t num_written = m_source.write(data, static_cast<size_t>(std::min<fpos_t>(length, m_region.end - m_offset)));
-
1711 m_state = m_source.state();
-
1712 m_offset += num_written;
-
1713 return num_written;
-
1714 }
-
1715 m_state = state_t::fail;
-
1716 return 0;
-
1717 }
+
1706
+
+
1707 virtual _Success_(return != 0) size_t write(
+
1708 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
1709 {
+
1710 _Assume_(data || !length);
+
1711 if (m_region.contains(m_offset)) {
+
1712 size_t num_written = m_source.write(data, static_cast<size_t>(std::min<fpos_t>(length, m_region.end - m_offset)));
+
1713 m_state = m_source.state();
+
1714 m_offset += num_written;
+
1715 return num_written;
+
1716 }
+
1717 m_state = state_t::fail;
+
1718 return 0;
+
1719 }
-
1718
-
-
1719 virtual void close()
-
1720 {
-
1721 m_source.close();
-
1722 m_state = m_source.state();
-
1723 }
+
1720
+
+
1721 virtual void close()
+
1722 {
+
1723 m_source.close();
+
1724 m_state = m_source.state();
+
1725 }
-
1724
-
-
1725 virtual void flush()
-
1726 {
-
1727 m_source.flush();
-
1728 m_state = m_source.state();
-
1729 }
+
1726
+
+
1727 virtual void flush()
+
1728 {
+
1729 m_source.flush();
+
1730 m_state = m_source.state();
+
1731 }
-
1730
-
-
1731 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
-
1732 {
-
1733 m_offset = m_source.seek(offset, how);
-
1734 m_state = m_source.state();
-
1735 return ok() ? m_offset - m_region.start : fpos_max;
-
1736 }
+
1732
+
+
1733 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
+
1734 {
+
1735 m_offset = m_source.seek(offset, how);
+
1736 m_state = m_source.state();
+
1737 return ok() ? m_offset - m_region.start : fpos_max;
+
1738 }
-
1737
-
-
1738 virtual void skip(_In_ fsize_t amount)
-
1739 {
-
1740 m_source.skip(amount);
-
1741 m_state = m_source.state();
-
1742 }
+
1739
+
+
1740 virtual void skip(_In_ fsize_t amount)
+
1741 {
+
1742 m_source.skip(amount);
+
1743 m_state = m_source.state();
+
1744 }
-
1743
-
-
1744 virtual fpos_t tell() const
-
1745 {
-
1746 fpos_t offset = m_source.tell();
-
1747 return m_region.contains(offset) ? offset - m_region.start : fpos_max;
-
1748 }
+
1745
+
+
1746 virtual fpos_t tell() const
+
1747 {
+
1748 fpos_t offset = m_source.tell();
+
1749 return m_region.contains(offset) ? offset - m_region.start : fpos_max;
+
1750 }
-
1749
-
-
1750 virtual void lock(_In_ fpos_t offset, _In_ fsize_t length)
-
1751 {
-
1752 if (m_region.contains(offset)) {
-
1753 m_source.lock(m_region.start + offset, std::min<fsize_t>(length, m_region.end - offset));
-
1754 m_state = m_source.state();
-
1755 }
-
1756 else
-
1757 m_state = state_t::fail;
-
1758 }
+
1751
+
+
1752 virtual void lock(_In_ fpos_t offset, _In_ fsize_t length)
+
1753 {
+
1754 if (m_region.contains(offset)) {
+
1755 m_source.lock(m_region.start + offset, std::min<fsize_t>(length, m_region.end - offset));
+
1756 m_state = m_source.state();
+
1757 }
+
1758 else
+
1759 m_state = state_t::fail;
+
1760 }
-
1759
-
-
1760 virtual void unlock(_In_ fpos_t offset, _In_ fsize_t length)
-
1761 {
-
1762 if (m_region.contains(offset)) {
-
1763 m_source.unlock(m_region.start + offset, std::min<fsize_t>(length, m_region.end - offset));
-
1764 m_state = m_source.state();
-
1765 }
-
1766 else
-
1767 m_state = state_t::fail;
-
1768 }
+
1761
+
+
1762 virtual void unlock(_In_ fpos_t offset, _In_ fsize_t length)
+
1763 {
+
1764 if (m_region.contains(offset)) {
+
1765 m_source.unlock(m_region.start + offset, std::min<fsize_t>(length, m_region.end - offset));
+
1766 m_state = m_source.state();
+
1767 }
+
1768 else
+
1769 m_state = state_t::fail;
+
1770 }
-
1769
-
-
1770 virtual fsize_t size() const
-
1771 {
-
1772 return m_region.size();
-
1773 }
+
1771
+
+
1772 virtual fsize_t size() const
+
1773 {
+
1774 return m_region.size();
+
1775 }
-
1774
-
-
1775 virtual void truncate()
-
1776 {
-
1777 m_state = state_t::fail;
-
1778 }
+
1776
+
+
1777 virtual void truncate()
+
1778 {
+
1779 m_state = state_t::fail;
+
1780 }
-
1779
-
1780 protected:
-
1781 basic_file& m_source;
-
1782 fpos_t m_offset;
-
1783 interval<fpos_t> m_region;
-
1784 };
+
1781
+
1782 protected:
+
1783 basic_file& m_source;
+
1784 fpos_t m_offset;
+
1785 interval<fpos_t> m_region;
+
1786 };
-
1785
-
1786 constexpr size_t default_cache_size = 0x1000;
1787
-
-
1791 class cache : public basic_file
-
1792 {
-
1793 protected:
-
1795#pragma warning(suppress: 26495) // The delayed init call will finish initializing the class.
-
1796 explicit cache(_In_ size_t cache_size = default_cache_size) :
-
1797 basic(state_t::fail),
-
1798 m_cache(cache_size)
-
1799 {}
-
1800
-
1801 void init(_Inout_ basic_file& source)
-
1802 {
-
1803 m_source = &source;
-
1804 init();
-
1805 }
-
1806
-
1807 void init()
-
1808 {
-
1809 m_state = m_source->state();
-
1810 m_offset = m_source->tell();
-
1811#if SET_FILE_OP_TIMES
-
1812 m_atime = m_source->atime();
-
1813 m_mtime = m_source->mtime();
-
1814#endif
-
1815 }
-
1816
-
1817 void done()
-
1818 {
-
1819 if (m_source) {
-
1820 flush_cache();
-
1821 if (!ok()) _Unlikely_
-
1822 throw std::system_error(sys_error(), std::system_category(), "failed to flush cache"); // Data loss occured
-
1823 m_source->seek(m_offset);
-
1824#if SET_FILE_OP_TIMES
-
1825 m_source->set_atime(m_atime);
-
1826 m_source->set_mtime(m_mtime);
-
1827#endif
-
1828 m_source = nullptr;
-
1829 }
-
1830 }
-
1832
-
1833 public:
-
1834 cache(_Inout_ basic_file& source, _In_ size_t cache_size = default_cache_size) :
-
1835 basic(source.state()),
-
1836 m_source(&source),
-
1837 m_cache(cache_size),
-
1838 m_offset(source.tell())
-
1839#if SET_FILE_OP_TIMES
-
1840 , m_atime(source.atime())
-
1841 , m_mtime(source.mtime())
-
1842#endif
-
1843 {}
-
1844
-
1845 virtual ~cache() noexcept(false)
-
1846 {
-
1847 if (m_source) {
-
1848 flush_cache();
-
1849 if (!ok()) _Unlikely_
-
1850 throw std::system_error(sys_error(), std::system_category(), "failed to flush cache"); // Data loss occured
-
1851 m_source->seek(m_offset);
-
1852#if SET_FILE_OP_TIMES
-
1853 m_source->set_atime(m_atime);
-
1854 m_source->set_mtime(m_mtime);
-
1855#endif
-
1856 }
-
1857 }
-
1858
-
-
1859 virtual _Success_(return != 0 || length == 0) size_t read(
-
1860 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
1861 {
-
1862 _Assume_(data || !length);
-
1863#if SET_FILE_OP_TIMES
-
1864 m_atime = time_point::now();
-
1865#endif
-
1866 for (size_t to_read = length;;) {
-
1867 if (m_cache.status != cache_t::cache_t::status_t::empty) {
-
1868 if (m_cache.region.contains(m_offset)) {
-
1869 size_t remaining_cache = static_cast<size_t>(m_cache.region.end - m_offset);
-
1870 if (to_read <= remaining_cache) {
-
1871 memcpy(data, m_cache.data + static_cast<size_t>(m_offset - m_cache.region.start), to_read);
-
1872 m_offset += to_read;
-
1873 m_state = state_t::ok;
-
1874 return length;
-
1875 }
-
1876 memcpy(data, m_cache.data + static_cast<size_t>(m_offset - m_cache.region.start), remaining_cache);
-
1877 reinterpret_cast<uint8_t*&>(data) += remaining_cache;
-
1878 to_read -= remaining_cache;
-
1879 m_offset += remaining_cache;
-
1880 }
-
1881 flush_cache();
-
1882 if (!ok()) _Unlikely_ {
-
1883 if (to_read < length)
-
1884 m_state = state_t::ok;
-
1885 return length - to_read;
-
1886 }
-
1887 }
-
1888 {
-
1889 fpos_t end_max = m_offset + to_read;
-
1890 if (m_offset / m_cache.capacity < end_max / m_cache.capacity) {
-
1891 // Read spans multiple cache blocks. Bypass cache to the last block.
-
1892 m_source->seek(m_offset);
-
1893 if (!m_source->ok()) _Unlikely_ {
-
1894 m_state = to_read < length ? state_t::ok : state_t::fail;
-
1895 return length - to_read;
-
1896 }
-
1897 size_t num_read = m_source->read(data, to_read - static_cast<size_t>(end_max % m_cache.capacity));
-
1898 m_offset += num_read;
-
1899 to_read -= num_read;
-
1900 if (!to_read) {
-
1901 m_state = state_t::ok;
-
1902 return length;
-
1903 }
-
1904 reinterpret_cast<uint8_t*&>(data) += num_read;
-
1905 m_state = m_source->state();
-
1906 if (!ok()) {
-
1907 if (to_read < length)
-
1908 m_state = state_t::ok;
-
1909 return length - to_read;
-
1910 }
-
1911 }
-
1912 }
-
1913 load_cache(m_offset);
-
1914 if (!ok()) _Unlikely_ {
-
1915 m_state = to_read < length ? state_t::ok : state_t::fail;
-
1916 return length - to_read;
-
1917 }
-
1918 if (m_cache.region.end <= m_offset) _Unlikely_ {
-
1919 m_state = to_read < length ? state_t::ok : state_t::eof;
-
1920 return length - to_read;
-
1921 }
-
1922 }
-
1923 }
+
1788 constexpr size_t default_cache_size = 0x1000;
+
1789
+
+
1793 class cache : public basic_file
+
1794 {
+
1795 protected:
+
1797#pragma warning(suppress: 26495) // The delayed init call will finish initializing the class.
+
1798 explicit cache(_In_ size_t cache_size = default_cache_size) :
+
1799 basic(state_t::fail),
+
1800 m_cache(cache_size)
+
1801 {}
+
1802
+
1803 void init(_Inout_ basic_file& source)
+
1804 {
+
1805 m_source = &source;
+
1806 init();
+
1807 }
+
1808
+
1809 void init()
+
1810 {
+
1811 m_state = m_source->state();
+
1812 m_offset = m_source->tell();
+
1813#if SET_FILE_OP_TIMES
+
1814 m_atime = m_source->atime();
+
1815 m_mtime = m_source->mtime();
+
1816#endif
+
1817 }
+
1818
+
1819 void done()
+
1820 {
+
1821 if (m_source) {
+
1822 flush_cache();
+
1823 if (!ok()) _Unlikely_
+
1824 throw std::system_error(sys_error(), std::system_category(), "failed to flush cache"); // Data loss occured
+
1825 m_source->seek(m_offset);
+
1826#if SET_FILE_OP_TIMES
+
1827 m_source->set_atime(m_atime);
+
1828 m_source->set_mtime(m_mtime);
+
1829#endif
+
1830 m_source = nullptr;
+
1831 }
+
1832 }
+
1834
+
1835 public:
+
1836 cache(_Inout_ basic_file& source, _In_ size_t cache_size = default_cache_size) :
+
1837 basic(source.state()),
+
1838 m_source(&source),
+
1839 m_cache(cache_size),
+
1840 m_offset(source.tell())
+
1841#if SET_FILE_OP_TIMES
+
1842 , m_atime(source.atime())
+
1843 , m_mtime(source.mtime())
+
1844#endif
+
1845 {}
+
1846
+
1847 virtual ~cache() noexcept(false)
+
1848 {
+
1849 if (m_source) {
+
1850 flush_cache();
+
1851 if (!ok()) _Unlikely_
+
1852 throw std::system_error(sys_error(), std::system_category(), "failed to flush cache"); // Data loss occured
+
1853 m_source->seek(m_offset);
+
1854#if SET_FILE_OP_TIMES
+
1855 m_source->set_atime(m_atime);
+
1856 m_source->set_mtime(m_mtime);
+
1857#endif
+
1858 }
+
1859 }
+
1860
+
+
1861 virtual _Success_(return != 0 || length == 0) size_t read(
+
1862 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
1863 {
+
1864 _Assume_(data || !length);
+
1865#if SET_FILE_OP_TIMES
+
1866 m_atime = time_point::now();
+
1867#endif
+
1868 for (size_t to_read = length;;) {
+
1869 if (m_cache.status != cache_t::cache_t::status_t::empty) {
+
1870 if (m_cache.region.contains(m_offset)) {
+
1871 size_t remaining_cache = static_cast<size_t>(m_cache.region.end - m_offset);
+
1872 if (to_read <= remaining_cache) {
+
1873 memcpy(data, m_cache.data + static_cast<size_t>(m_offset - m_cache.region.start), to_read);
+
1874 m_offset += to_read;
+
1875 m_state = state_t::ok;
+
1876 return length;
+
1877 }
+
1878 memcpy(data, m_cache.data + static_cast<size_t>(m_offset - m_cache.region.start), remaining_cache);
+
1879 reinterpret_cast<uint8_t*&>(data) += remaining_cache;
+
1880 to_read -= remaining_cache;
+
1881 m_offset += remaining_cache;
+
1882 }
+
1883 flush_cache();
+
1884 if (!ok()) _Unlikely_ {
+
1885 if (to_read < length)
+
1886 m_state = state_t::ok;
+
1887 return length - to_read;
+
1888 }
+
1889 }
+
1890 {
+
1891 fpos_t end_max = m_offset + to_read;
+
1892 if (m_offset / m_cache.capacity < end_max / m_cache.capacity) {
+
1893 // Read spans multiple cache blocks. Bypass cache to the last block.
+
1894 m_source->seek(m_offset);
+
1895 if (!m_source->ok()) _Unlikely_ {
+
1896 m_state = to_read < length ? state_t::ok : state_t::fail;
+
1897 return length - to_read;
+
1898 }
+
1899 size_t num_read = m_source->read(data, to_read - static_cast<size_t>(end_max % m_cache.capacity));
+
1900 m_offset += num_read;
+
1901 to_read -= num_read;
+
1902 if (!to_read) {
+
1903 m_state = state_t::ok;
+
1904 return length;
+
1905 }
+
1906 reinterpret_cast<uint8_t*&>(data) += num_read;
+
1907 m_state = m_source->state();
+
1908 if (!ok()) {
+
1909 if (to_read < length)
+
1910 m_state = state_t::ok;
+
1911 return length - to_read;
+
1912 }
+
1913 }
+
1914 }
+
1915 load_cache(m_offset);
+
1916 if (!ok()) _Unlikely_ {
+
1917 m_state = to_read < length ? state_t::ok : state_t::fail;
+
1918 return length - to_read;
+
1919 }
+
1920 if (m_cache.region.end <= m_offset) _Unlikely_ {
+
1921 m_state = to_read < length ? state_t::ok : state_t::eof;
+
1922 return length - to_read;
+
1923 }
+
1924 }
+
1925 }
-
1924
-
-
1925 virtual _Success_(return != 0) size_t write(
-
1926 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
1927 {
-
1928 _Assume_(data || !length);
-
1929#if SET_FILE_OP_TIMES
-
1930 m_atime = m_mtime = time_point::now();
-
1931#endif
-
1932 for (size_t to_write = length;;) {
-
1933 if (m_cache.status != cache_t::cache_t::status_t::empty) {
-
1934 fpos_t end_max = m_cache.region.start + m_cache.capacity;
-
1935 if (m_cache.region.start <= m_offset && m_offset < end_max) {
-
1936 size_t remaining_cache = static_cast<size_t>(end_max - m_offset);
-
1937 if (to_write <= remaining_cache) {
-
1938 memcpy(m_cache.data + static_cast<size_t>(m_offset - m_cache.region.start), data, to_write);
-
1939 m_offset += to_write;
-
1940 m_cache.status = cache_t::cache_t::status_t::dirty;
-
1941 m_cache.region.end = std::max(m_cache.region.end, m_offset);
-
1942 m_state = state_t::ok;
-
1943 return length;
-
1944 }
-
1945 memcpy(m_cache.data + static_cast<size_t>(m_offset - m_cache.region.start), data, remaining_cache);
-
1946 reinterpret_cast<const uint8_t*&>(data) += remaining_cache;
-
1947 to_write -= remaining_cache;
-
1948 m_offset += remaining_cache;
-
1949 m_cache.status = cache_t::cache_t::status_t::dirty;
-
1950 m_cache.region.end = end_max;
-
1951 }
-
1952 flush_cache();
-
1953 if (!ok()) _Unlikely_
-
1954 return length - to_write;
-
1955 }
-
1956 {
-
1957 fpos_t end_max = m_offset + to_write;
-
1958 if (m_offset / m_cache.capacity < end_max / m_cache.capacity) {
-
1959 // Write spans multiple cache blocks. Bypass cache to the last block.
-
1960 m_source->seek(m_offset);
-
1961 if (!ok()) _Unlikely_
-
1962 return length - to_write;
-
1963 size_t num_written = m_source->write(data, to_write - static_cast<size_t>(end_max % m_cache.capacity));
-
1964 m_offset += num_written;
-
1965 m_state = m_source->state();
-
1966 to_write -= num_written;
-
1967 if (!to_write || !ok())
-
1968 return length - to_write;
-
1969 reinterpret_cast<const uint8_t*&>(data) += num_written;
-
1970 }
-
1971 }
-
1972 load_cache(m_offset);
-
1973 if (!ok()) _Unlikely_
-
1974 return length - to_write;
-
1975 }
-
1976 }
+
1926
+
+
1927 virtual _Success_(return != 0) size_t write(
+
1928 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
1929 {
+
1930 _Assume_(data || !length);
+
1931#if SET_FILE_OP_TIMES
+
1932 m_atime = m_mtime = time_point::now();
+
1933#endif
+
1934 for (size_t to_write = length;;) {
+
1935 if (m_cache.status != cache_t::cache_t::status_t::empty) {
+
1936 fpos_t end_max = m_cache.region.start + m_cache.capacity;
+
1937 if (m_cache.region.start <= m_offset && m_offset < end_max) {
+
1938 size_t remaining_cache = static_cast<size_t>(end_max - m_offset);
+
1939 if (to_write <= remaining_cache) {
+
1940 memcpy(m_cache.data + static_cast<size_t>(m_offset - m_cache.region.start), data, to_write);
+
1941 m_offset += to_write;
+
1942 m_cache.status = cache_t::cache_t::status_t::dirty;
+
1943 m_cache.region.end = std::max(m_cache.region.end, m_offset);
+
1944 m_state = state_t::ok;
+
1945 return length;
+
1946 }
+
1947 memcpy(m_cache.data + static_cast<size_t>(m_offset - m_cache.region.start), data, remaining_cache);
+
1948 reinterpret_cast<const uint8_t*&>(data) += remaining_cache;
+
1949 to_write -= remaining_cache;
+
1950 m_offset += remaining_cache;
+
1951 m_cache.status = cache_t::cache_t::status_t::dirty;
+
1952 m_cache.region.end = end_max;
+
1953 }
+
1954 flush_cache();
+
1955 if (!ok()) _Unlikely_
+
1956 return length - to_write;
+
1957 }
+
1958 {
+
1959 fpos_t end_max = m_offset + to_write;
+
1960 if (m_offset / m_cache.capacity < end_max / m_cache.capacity) {
+
1961 // Write spans multiple cache blocks. Bypass cache to the last block.
+
1962 m_source->seek(m_offset);
+
1963 if (!ok()) _Unlikely_
+
1964 return length - to_write;
+
1965 size_t num_written = m_source->write(data, to_write - static_cast<size_t>(end_max % m_cache.capacity));
+
1966 m_offset += num_written;
+
1967 m_state = m_source->state();
+
1968 to_write -= num_written;
+
1969 if (!to_write || !ok())
+
1970 return length - to_write;
+
1971 reinterpret_cast<const uint8_t*&>(data) += num_written;
+
1972 }
+
1973 }
+
1974 load_cache(m_offset);
+
1975 if (!ok()) _Unlikely_
+
1976 return length - to_write;
+
1977 }
+
1978 }
-
1977
-
-
1978 virtual void close()
-
1979 {
-
1980 invalidate_cache();
-
1981 if (!ok()) _Unlikely_
-
1982 throw std::system_error(sys_error(), std::system_category(), "failed to flush cache"); // Data loss occured
-
1983 m_source->close();
-
1984 m_state = m_source->state();
-
1985 }
+
1979
+
+
1980 virtual void close()
+
1981 {
+
1982 invalidate_cache();
+
1983 if (!ok()) _Unlikely_
+
1984 throw std::system_error(sys_error(), std::system_category(), "failed to flush cache"); // Data loss occured
+
1985 m_source->close();
+
1986 m_state = m_source->state();
+
1987 }
-
1986
-
-
1987 virtual void flush()
-
1988 {
-
1989#if SET_FILE_OP_TIMES
-
1990 m_atime = m_mtime = time_point::min();
-
1991#endif
-
1992 flush_cache();
-
1993 if (!ok()) _Unlikely_
-
1994 return;
-
1995 m_source->flush();
-
1996 }
+
1988
+
+
1989 virtual void flush()
+
1990 {
+
1991#if SET_FILE_OP_TIMES
+
1992 m_atime = m_mtime = time_point::min();
+
1993#endif
+
1994 flush_cache();
+
1995 if (!ok()) _Unlikely_
+
1996 return;
+
1997 m_source->flush();
+
1998 }
-
1997
-
-
1998 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
-
1999 {
-
2000 m_state = state_t::ok;
-
2001 switch (how) {
-
2002 case seek_t::beg:
-
2003 return m_offset = offset;
-
2004 case seek_t::cur:
-
2005 return m_offset += offset;
-
2006 case seek_t::end: {
-
2007 auto n = size();
-
2008 if (n == fsize_max) _Unlikely_{
-
2009 m_state = state_t::fail;
-
2010 return fpos_max;
-
2011 }
-
2012 return m_offset = n + offset;
-
2013 }
-
2014 default:
-
2015 throw std::invalid_argument("unknown seek origin");
-
2016 }
-
2017 }
+
1999
+
+
2000 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
+
2001 {
+
2002 m_state = state_t::ok;
+
2003 switch (how) {
+
2004 case seek_t::beg:
+
2005 return m_offset = offset;
+
2006 case seek_t::cur:
+
2007 return m_offset += offset;
+
2008 case seek_t::end: {
+
2009 auto n = size();
+
2010 if (n == fsize_max) _Unlikely_{
+
2011 m_state = state_t::fail;
+
2012 return fpos_max;
+
2013 }
+
2014 return m_offset = n + offset;
+
2015 }
+
2016 default:
+
2017 throw std::invalid_argument("unknown seek origin");
+
2018 }
+
2019 }
-
2018
-
-
2019 virtual fpos_t tell() const
-
2020 {
-
2021 return m_offset;
-
2022 }
+
2020
+
+
2021 virtual fpos_t tell() const
+
2022 {
+
2023 return m_offset;
+
2024 }
-
2023
-
-
2024 virtual void lock(_In_ fpos_t offset, _In_ fsize_t length)
-
2025 {
-
2026 m_source->lock(offset, length);
-
2027 m_state = m_source->state();
-
2028 }
+
2025
+
+
2026 virtual void lock(_In_ fpos_t offset, _In_ fsize_t length)
+
2027 {
+
2028 m_source->lock(offset, length);
+
2029 m_state = m_source->state();
+
2030 }
-
2029
-
-
2030 virtual void unlock(_In_ fpos_t offset, _In_ fsize_t length)
-
2031 {
-
2032 m_source->unlock(offset, length);
-
2033 m_state = m_source->state();
-
2034 }
+
2031
+
+
2032 virtual void unlock(_In_ fpos_t offset, _In_ fsize_t length)
+
2033 {
+
2034 m_source->unlock(offset, length);
+
2035 m_state = m_source->state();
+
2036 }
-
2035
-
-
2036 virtual fsize_t size() const
-
2037 {
-
2038 return m_cache.status != cache_t::cache_t::status_t::empty ?
-
2039 std::max(m_source->size(), m_cache.region.end) :
-
2040 m_source->size();
-
2041 }
+
2037
+
+
2038 virtual fsize_t size() const
+
2039 {
+
2040 return m_cache.status != cache_t::cache_t::status_t::empty ?
+
2041 std::max(m_source->size(), m_cache.region.end) :
+
2042 m_source->size();
+
2043 }
-
2042
-
-
2043 virtual void truncate()
-
2044 {
-
2045#if SET_FILE_OP_TIMES
-
2046 m_atime = m_mtime = time_point::now();
-
2047#endif
-
2048 m_source->seek(m_offset);
-
2049 if (m_cache.region.end <= m_offset) {
-
2050 // Truncation does not affect cache.
-
2051 }
-
2052 else if (m_cache.region.start <= m_offset) {
-
2053 // Truncation truncates cache.
-
2054 m_cache.region.end = m_offset;
-
2055 }
-
2056 else {
-
2057 // Truncation invalidates cache.
-
2058 m_cache.status = cache_t::cache_t::status_t::empty;
-
2059 }
-
2060 m_source->truncate();
-
2061 m_state = m_source->state();
-
2062 }
+
2044
+
+
2045 virtual void truncate()
+
2046 {
+
2047#if SET_FILE_OP_TIMES
+
2048 m_atime = m_mtime = time_point::now();
+
2049#endif
+
2050 m_source->seek(m_offset);
+
2051 if (m_cache.region.end <= m_offset) {
+
2052 // Truncation does not affect cache.
+
2053 }
+
2054 else if (m_cache.region.start <= m_offset) {
+
2055 // Truncation truncates cache.
+
2056 m_cache.region.end = m_offset;
+
2057 }
+
2058 else {
+
2059 // Truncation invalidates cache.
+
2060 m_cache.status = cache_t::cache_t::status_t::empty;
+
2061 }
+
2062 m_source->truncate();
+
2063 m_state = m_source->state();
+
2064 }
-
2063
-
-
2064 virtual time_point ctime() const
-
2065 {
-
2066 return m_source->ctime();
-
2067 }
+
2065
+
+
2066 virtual time_point ctime() const
+
2067 {
+
2068 return m_source->ctime();
+
2069 }
-
2068
-
-
2069 virtual time_point atime() const
-
2070 {
-
2071#if SET_FILE_OP_TIMES
-
2072 return std::max(m_atime, m_source->atime());
-
2073#else
-
2074 return m_source->atime();
-
2075#endif
-
2076 }
+
2070
+
+
2071 virtual time_point atime() const
+
2072 {
+
2073#if SET_FILE_OP_TIMES
+
2074 return std::max(m_atime, m_source->atime());
+
2075#else
+
2076 return m_source->atime();
+
2077#endif
+
2078 }
-
2077
-
-
2078 virtual time_point mtime() const
-
2079 {
-
2080#if SET_FILE_OP_TIMES
-
2081 return std::max(m_mtime, m_source->mtime());
-
2082#else
-
2083 return m_source->mtime();
-
2084#endif
-
2085 }
+
2079
+
+
2080 virtual time_point mtime() const
+
2081 {
+
2082#if SET_FILE_OP_TIMES
+
2083 return std::max(m_mtime, m_source->mtime());
+
2084#else
+
2085 return m_source->mtime();
+
2086#endif
+
2087 }
-
2086
-
-
2087 virtual void set_ctime(time_point date)
-
2088 {
-
2089 m_source->set_ctime(date);
-
2090 }
+
2088
+
+
2089 virtual void set_ctime(time_point date)
+
2090 {
+
2091 m_source->set_ctime(date);
+
2092 }
-
2091
-
-
2092 virtual void set_atime(time_point date)
-
2093 {
-
2094#if SET_FILE_OP_TIMES
-
2095 m_atime = date;
-
2096#endif
-
2097 m_source->set_atime(date);
-
2098 }
+
2093
+
+
2094 virtual void set_atime(time_point date)
+
2095 {
+
2096#if SET_FILE_OP_TIMES
+
2097 m_atime = date;
+
2098#endif
+
2099 m_source->set_atime(date);
+
2100 }
-
2099
-
-
2100 virtual void set_mtime(time_point date)
-
2101 {
-
2102#if SET_FILE_OP_TIMES
-
2103 m_mtime = date;
-
2104#endif
-
2105 m_source->set_mtime(date);
-
2106 }
+
2101
+
+
2102 virtual void set_mtime(time_point date)
+
2103 {
+
2104#if SET_FILE_OP_TIMES
+
2105 m_mtime = date;
+
2106#endif
+
2107 m_source->set_mtime(date);
+
2108 }
-
2107
-
2108 protected:
-
2110 void flush_cache()
-
2111 {
-
2112 if (m_cache.status != cache_t::cache_t::status_t::dirty)
-
2113 m_state = state_t::ok;
-
2114 else if (!m_cache.region.empty()) {
-
2115 write_cache();
-
2116 if (ok())
-
2117 m_cache.status = cache_t::cache_t::status_t::loaded;
-
2118 }
-
2119 else {
-
2120 m_state = state_t::ok;
-
2121 m_cache.status = cache_t::cache_t::status_t::loaded;
-
2122 }
-
2123 }
-
2124
-
2125 void invalidate_cache()
-
2126 {
-
2127 if (m_cache.status == cache_t::cache_t::status_t::dirty && !m_cache.region.empty()) {
-
2128 write_cache();
-
2129 if (!ok()) _Unlikely_
-
2130 return;
-
2131 } else
-
2132 m_state = state_t::ok;
-
2133 m_cache.status = cache_t::cache_t::status_t::empty;
-
2134 }
-
2135
-
2136 void load_cache(_In_ fpos_t start)
-
2137 {
-
2138 _Assume_(m_cache.status != cache_t::cache_t::status_t::dirty);
-
2139 start -= start % m_cache.capacity; // Align to cache block size.
-
2140 m_source->seek(m_cache.region.start = start);
-
2141 if (m_source->ok()) {
-
2142 m_cache.region.end = start + m_source->read(m_cache.data, m_cache.capacity);
-
2143 m_cache.status = cache_t::cache_t::status_t::loaded;
-
2144 m_state = state_t::ok; // Regardless the read failure, we still might have cached some data.
-
2145 }
-
2146 else
-
2147 m_state = state_t::fail;
-
2148 }
-
2149
-
2150 void write_cache()
-
2151 {
-
2152 _Assume_(m_cache.status == cache_t::cache_t::status_t::dirty);
-
2153 m_source->seek(m_cache.region.start);
-
2154 m_source->write(m_cache.data, static_cast<size_t>(m_cache.region.size()));
-
2155 m_state = m_source->state();
-
2156 }
-
2157
-
2158 basic_file* m_source;
-
2159 struct cache_t {
-
2160 uint8_t* data;
-
2161 size_t capacity;
-
2162 enum class status_t {
-
2163 empty = 0,
-
2164 loaded,
-
2165 dirty,
-
2166 } status;
-
2167 interval<fpos_t> region;
-
2168
-
2169 cache_t(_In_ size_t _capacity) :
-
2170 data(new uint8_t[_capacity]),
-
2171 capacity(_capacity),
-
2172 status(status_t::empty),
-
2173 region(0)
-
2174 {}
-
2175
-
2176 ~cache_t()
-
2177 {
-
2178 delete[] data;
-
2179 }
-
2180 } m_cache;
-
2181 fpos_t m_offset;
-
2182#if SET_FILE_OP_TIMES
-
2183 time_point
-
2184 m_atime,
-
2185 m_mtime;
-
2186#endif
-
2188 };
+
2109
+
2110 protected:
+
2112 void flush_cache()
+
2113 {
+
2114 if (m_cache.status != cache_t::cache_t::status_t::dirty)
+
2115 m_state = state_t::ok;
+
2116 else if (!m_cache.region.empty()) {
+
2117 write_cache();
+
2118 if (ok())
+
2119 m_cache.status = cache_t::cache_t::status_t::loaded;
+
2120 }
+
2121 else {
+
2122 m_state = state_t::ok;
+
2123 m_cache.status = cache_t::cache_t::status_t::loaded;
+
2124 }
+
2125 }
+
2126
+
2127 void invalidate_cache()
+
2128 {
+
2129 if (m_cache.status == cache_t::cache_t::status_t::dirty && !m_cache.region.empty()) {
+
2130 write_cache();
+
2131 if (!ok()) _Unlikely_
+
2132 return;
+
2133 } else
+
2134 m_state = state_t::ok;
+
2135 m_cache.status = cache_t::cache_t::status_t::empty;
+
2136 }
+
2137
+
2138 void load_cache(_In_ fpos_t start)
+
2139 {
+
2140 _Assume_(m_cache.status != cache_t::cache_t::status_t::dirty);
+
2141 start -= start % m_cache.capacity; // Align to cache block size.
+
2142 m_source->seek(m_cache.region.start = start);
+
2143 if (m_source->ok()) {
+
2144 m_cache.region.end = start + m_source->read(m_cache.data, m_cache.capacity);
+
2145 m_cache.status = cache_t::cache_t::status_t::loaded;
+
2146 m_state = state_t::ok; // Regardless the read failure, we still might have cached some data.
+
2147 }
+
2148 else
+
2149 m_state = state_t::fail;
+
2150 }
+
2151
+
2152 void write_cache()
+
2153 {
+
2154 _Assume_(m_cache.status == cache_t::cache_t::status_t::dirty);
+
2155 m_source->seek(m_cache.region.start);
+
2156 m_source->write(m_cache.data, static_cast<size_t>(m_cache.region.size()));
+
2157 m_state = m_source->state();
+
2158 }
+
2159
+
2160 basic_file* m_source;
+
2161 struct cache_t {
+
2162 uint8_t* data;
+
2163 size_t capacity;
+
2164 enum class status_t {
+
2165 empty = 0,
+
2166 loaded,
+
2167 dirty,
+
2168 } status;
+
2169 interval<fpos_t> region;
+
2170
+
2171 cache_t(_In_ size_t _capacity) :
+
2172 data(new uint8_t[_capacity]),
+
2173 capacity(_capacity),
+
2174 status(status_t::empty),
+
2175 region(0)
+
2176 {}
+
2177
+
2178 ~cache_t()
+
2179 {
+
2180 delete[] data;
+
2181 }
+
2182 } m_cache;
+
2183 fpos_t m_offset;
+
2184#if SET_FILE_OP_TIMES
+
2185 time_point
+
2186 m_atime,
+
2187 m_mtime;
+
2188#endif
+
2190 };
-
2189
-
-
2193 class basic_sys : virtual public basic, public sys_object
-
2194 {
-
2195 public:
-
2196 basic_sys(_In_opt_ sys_handle h = invalid_handle, _In_ state_t state = state_t::ok) :
-
2197 basic(state),
-
2198 sys_object(h)
-
2199 {}
-
2200
-
-
2201 virtual _Success_(return != 0 || length == 0) size_t read(
-
2202 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
2203 {
-
2204 _Assume_(data || !length);
-
2205 // Windows Server 2003 and Windows XP: Pipe write operations across a network are limited in size per write.
-
2206 // The amount varies per platform. For x86 platforms it's 63.97 MB. For x64 platforms it's 31.97 MB. For Itanium
-
2207 // it's 63.95 MB. For more information regarding pipes, see the Remarks section.
-
2208 size_t
-
2209#if defined(_WIN64)
-
2210 block_size = 0x1F80000;
-
2211#elif defined(_WIN32)
-
2212 block_size = 0x3f00000;
-
2213#else
-
2214 block_size = SSIZE_MAX;
-
2215#endif
-
2216 for (size_t to_read = length;;) {
-
2217#ifdef _WIN32
-
2218 // ReadFile() might raise exception (e.g. STATUS_FILE_BAD_FORMAT/0xE0000002).
-
2219 BOOL succeeded;
-
2220 DWORD num_read;
-
2221 __try { succeeded = ReadFile(m_h, data, static_cast<DWORD>(std::min<size_t>(to_read, block_size)), &num_read, nullptr); }
-
2222 __except (EXCEPTION_EXECUTE_HANDLER) { succeeded = FALSE; SetLastError(ERROR_UNHANDLED_EXCEPTION); num_read = 0; }
-
2223 if (!succeeded && GetLastError() == ERROR_NO_SYSTEM_RESOURCES && block_size > default_block_size) _Unlikely_ {
-
2224 // Error "Insufficient system resources exist to complete the requested service." occurs
-
2225 // ocasionally, when attempting to read too much data at once (e.g. over \\TSClient).
-
2226 block_size = default_block_size;
-
2227 continue;
-
2228 }
-
2229 if (!succeeded) _Unlikely_
-
2230#else
-
2231 ssize_t num_read = ::read(m_h, data, static_cast<ssize_t>(std::min<size_t>(to_read, block_size)));
-
2232 if (num_read < 0) _Unlikely_
-
2233#endif
-
2234 {
-
2235 m_state = to_read < length ? state_t::ok : state_t::fail;
-
2236 return length - to_read;
-
2237 }
-
2238 if (!num_read) _Unlikely_ {
-
2239 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
-
2240 return length - to_read;
-
2241 }
-
2242 to_read -= num_read;
-
2243 if (!to_read) {
-
2244 m_state = state_t::ok;
-
2245 return length;
-
2246 }
-
2247 reinterpret_cast<uint8_t*&>(data) += num_read;
-
2248 }
-
2249 }
+
2191
+
+
2195 class basic_sys : virtual public basic, public sys_object
+
2196 {
+
2197 public:
+
2198 basic_sys(_In_opt_ sys_handle h = invalid_handle, _In_ state_t state = state_t::ok) :
+
2199 basic(state),
+
2200 sys_object(h)
+
2201 {}
+
2202
+
+
2203 virtual _Success_(return != 0 || length == 0) size_t read(
+
2204 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
2205 {
+
2206 _Assume_(data || !length);
+
2207 // Windows Server 2003 and Windows XP: Pipe write operations across a network are limited in size per write.
+
2208 // The amount varies per platform. For x86 platforms it's 63.97 MB. For x64 platforms it's 31.97 MB. For Itanium
+
2209 // it's 63.95 MB. For more information regarding pipes, see the Remarks section.
+
2210 size_t
+
2211#if defined(_WIN64)
+
2212 block_size = 0x1F80000;
+
2213#elif defined(_WIN32)
+
2214 block_size = 0x3f00000;
+
2215#else
+
2216 block_size = SSIZE_MAX;
+
2217#endif
+
2218 for (size_t to_read = length;;) {
+
2219#ifdef _WIN32
+
2220 // ReadFile() might raise exception (e.g. STATUS_FILE_BAD_FORMAT/0xE0000002).
+
2221 BOOL succeeded;
+
2222 DWORD num_read;
+
2223 __try { succeeded = ReadFile(m_h, data, static_cast<DWORD>(std::min<size_t>(to_read, block_size)), &num_read, nullptr); }
+
2224 __except (EXCEPTION_EXECUTE_HANDLER) { succeeded = FALSE; SetLastError(ERROR_UNHANDLED_EXCEPTION); num_read = 0; }
+
2225 if (!succeeded && GetLastError() == ERROR_NO_SYSTEM_RESOURCES && block_size > default_block_size) _Unlikely_ {
+
2226 // Error "Insufficient system resources exist to complete the requested service." occurs
+
2227 // ocasionally, when attempting to read too much data at once (e.g. over \\TSClient).
+
2228 block_size = default_block_size;
+
2229 continue;
+
2230 }
+
2231 if (!succeeded) _Unlikely_
+
2232#else
+
2233 ssize_t num_read = ::read(m_h, data, static_cast<ssize_t>(std::min<size_t>(to_read, block_size)));
+
2234 if (num_read < 0) _Unlikely_
+
2235#endif
+
2236 {
+
2237 m_state = to_read < length ? state_t::ok : state_t::fail;
+
2238 return length - to_read;
+
2239 }
+
2240 if (!num_read) _Unlikely_ {
+
2241 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
+
2242 return length - to_read;
+
2243 }
+
2244 to_read -= num_read;
+
2245 if (!to_read) {
+
2246 m_state = state_t::ok;
+
2247 return length;
+
2248 }
+
2249 reinterpret_cast<uint8_t*&>(data) += num_read;
+
2250 }
+
2251 }
-
2250
-
-
2251 virtual _Success_(return != 0) size_t write(
-
2252 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
2253 {
-
2254 // Windows Server 2003 and Windows XP: Pipe write operations across a network are limited in size per write.
-
2255 // The amount varies per platform. For x86 platforms it's 63.97 MB. For x64 platforms it's 31.97 MB. For Itanium
-
2256 // it's 63.95 MB. For more information regarding pipes, see the Remarks section.
-
2257 constexpr size_t
-
2258#if defined(_WIN64)
-
2259 block_size = 0x1F80000;
-
2260#elif defined(_WIN32)
-
2261 block_size = 0x3f00000;
-
2262#else
-
2263 block_size = SSIZE_MAX;
-
2264#endif
-
2265 for (size_t to_write = length;;) {
-
2266#ifdef _WIN32
-
2267 // ReadFile() might raise an exception. Be cautious with WriteFile() too.
-
2268 BOOL succeeded;
-
2269 DWORD num_written;
-
2270 __try { succeeded = WriteFile(m_h, data, static_cast<DWORD>(std::min<size_t>(to_write, block_size)), &num_written, nullptr); }
-
2271 __except (EXCEPTION_EXECUTE_HANDLER) { succeeded = FALSE; SetLastError(ERROR_UNHANDLED_EXCEPTION); num_written = 0; }
-
2272 to_write -= num_written;
-
2273 if (!to_write) {
-
2274 m_state = state_t::ok;
-
2275 return length;
-
2276 }
-
2277 reinterpret_cast<const uint8_t*&>(data) += num_written;
-
2278 if (!succeeded) _Unlikely_ {
-
2279 m_state = state_t::fail;
-
2280 return length - to_write;
-
2281 }
-
2282#else
-
2283 ssize_t num_written = ::write(m_h, data, static_cast<ssize_t>(std::min<size_t>(to_write, block_size)));
-
2284 if (num_written < 0) _Unlikely_ {
-
2285 m_state = state_t::fail;
-
2286 return length - to_write;
-
2287 }
-
2288 to_write -= num_written;
-
2289 if (!to_write) {
-
2290 m_state = state_t::ok;
-
2291 return length;
-
2292 }
-
2293 reinterpret_cast<const uint8_t*&>(data) += num_written;
-
2294#endif
-
2295 }
-
2296 }
+
2252
+
+
2253 virtual _Success_(return != 0) size_t write(
+
2254 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
2255 {
+
2256 // Windows Server 2003 and Windows XP: Pipe write operations across a network are limited in size per write.
+
2257 // The amount varies per platform. For x86 platforms it's 63.97 MB. For x64 platforms it's 31.97 MB. For Itanium
+
2258 // it's 63.95 MB. For more information regarding pipes, see the Remarks section.
+
2259 constexpr size_t
+
2260#if defined(_WIN64)
+
2261 block_size = 0x1F80000;
+
2262#elif defined(_WIN32)
+
2263 block_size = 0x3f00000;
+
2264#else
+
2265 block_size = SSIZE_MAX;
+
2266#endif
+
2267 for (size_t to_write = length;;) {
+
2268#ifdef _WIN32
+
2269 // ReadFile() might raise an exception. Be cautious with WriteFile() too.
+
2270 BOOL succeeded;
+
2271 DWORD num_written;
+
2272 __try { succeeded = WriteFile(m_h, data, static_cast<DWORD>(std::min<size_t>(to_write, block_size)), &num_written, nullptr); }
+
2273 __except (EXCEPTION_EXECUTE_HANDLER) { succeeded = FALSE; SetLastError(ERROR_UNHANDLED_EXCEPTION); num_written = 0; }
+
2274 to_write -= num_written;
+
2275 if (!to_write) {
+
2276 m_state = state_t::ok;
+
2277 return length;
+
2278 }
+
2279 reinterpret_cast<const uint8_t*&>(data) += num_written;
+
2280 if (!succeeded) _Unlikely_ {
+
2281 m_state = state_t::fail;
+
2282 return length - to_write;
+
2283 }
+
2284#else
+
2285 ssize_t num_written = ::write(m_h, data, static_cast<ssize_t>(std::min<size_t>(to_write, block_size)));
+
2286 if (num_written < 0) _Unlikely_ {
+
2287 m_state = state_t::fail;
+
2288 return length - to_write;
+
2289 }
+
2290 to_write -= num_written;
+
2291 if (!to_write) {
+
2292 m_state = state_t::ok;
+
2293 return length;
+
2294 }
+
2295 reinterpret_cast<const uint8_t*&>(data) += num_written;
+
2296#endif
+
2297 }
+
2298 }
-
2297
-
-
2298 virtual void close()
-
2299 {
-
2300 try {
- -
2302 m_state = state_t::ok;
-
2303 }
-
2304 catch (...) {
-
2305 m_state = state_t::fail;
-
2306 }
-
2307 }
+
2299
+
+
2300 virtual void close()
+
2301 {
+
2302 try {
+ +
2304 m_state = state_t::ok;
+
2305 }
+
2306 catch (...) {
+
2307 m_state = state_t::fail;
+
2308 }
+
2309 }
-
2308
-
-
2309 virtual void flush()
-
2310 {
-
2311#ifdef _WIN32
-
2312 m_state = FlushFileBuffers(m_h) ? state_t::ok : state_t::fail;
-
2313#else
-
2314 m_state = fsync(m_h) >= 0 ? state_t::ok : state_t::fail;
-
2315#endif
-
2316 }
+
2310
+
+
2311 virtual void flush()
+
2312 {
+
2313#ifdef _WIN32
+
2314 m_state = FlushFileBuffers(m_h) ? state_t::ok : state_t::fail;
+
2315#else
+
2316 m_state = fsync(m_h) >= 0 ? state_t::ok : state_t::fail;
+
2317#endif
+
2318 }
-
2317 };
+
2319 };
-
2318
-
-
2322 class buffered_sys : public buffer
-
2323 {
-
2324 public:
-
2325 buffered_sys(_In_opt_ sys_handle h = invalid_handle, size_t read_buffer_size = default_buffer_size, size_t write_buffer_size = default_buffer_size) :
-
2326 buffer(read_buffer_size, write_buffer_size),
-
2327 m_source(h)
-
2328 {
-
2329 init(m_source);
-
2330 }
-
2331
-
2332 virtual ~buffered_sys()
-
2333 {
-
2334 done();
-
2335 }
-
2336
-
2337 protected:
-
2338 basic_sys m_source;
-
2339 };
+
2320
+
+
2324 class buffered_sys : public buffer
+
2325 {
+
2326 public:
+
2327 buffered_sys(_In_opt_ sys_handle h = invalid_handle, size_t read_buffer_size = default_buffer_size, size_t write_buffer_size = default_buffer_size) :
+
2328 buffer(read_buffer_size, write_buffer_size),
+
2329 m_source(h)
+
2330 {
+
2331 init(m_source);
+
2332 }
+
2333
+
2334 virtual ~buffered_sys()
+
2335 {
+
2336 done();
+
2337 }
+
2338
+
2339 protected:
+
2340 basic_sys m_source;
+
2341 };
-
2340
-
-
2344 class socket : public basic
-
2345 {
-
2346 public:
-
2347 socket(_In_opt_ socket_t h = invalid_socket, _In_ state_t state = state_t::ok) :
-
2348 basic(state),
-
2349 m_h(h)
-
2350 {}
-
2351
-
2352 private:
-
2353 socket(_In_ const socket& other);
-
2354 socket& operator =(_In_ const socket& other);
-
2355
-
2356 public:
-
2357 socket(_Inout_ socket&& other) noexcept : m_h(other.m_h)
-
2358 {
-
2359 other.m_h = invalid_socket;
-
2360 }
-
2361
-
2362 socket& operator =(_Inout_ socket&& other) noexcept
-
2363 {
-
2364 if (this != std::addressof(other)) {
-
2365 if (m_h != invalid_socket)
-
2366 closesocket(m_h);
-
2367 m_h = other.m_h;
-
2368 other.m_h = invalid_socket;
-
2369 }
-
2370 return *this;
-
2371 }
-
2372
-
-
2380 socket(_In_ int af, _In_ int type, _In_ int protocol)
-
2381 {
-
2382 m_h = ::socket(af, type, protocol);
-
2383 if (m_h == invalid_socket) _Unlikely_
-
2384 m_state = state_t::fail;
-
2385 }
+
2342
+
+
2346 class socket : public basic
+
2347 {
+
2348 public:
+
2349 socket(_In_opt_ socket_t h = invalid_socket, _In_ state_t state = state_t::ok) :
+
2350 basic(state),
+
2351 m_h(h)
+
2352 {}
+
2353
+
2354 private:
+
2355 socket(_In_ const socket& other);
+
2356 socket& operator =(_In_ const socket& other);
+
2357
+
2358 public:
+
2359 socket(_Inout_ socket&& other) noexcept : m_h(other.m_h)
+
2360 {
+
2361 other.m_h = invalid_socket;
+
2362 }
+
2363
+
2364 socket& operator =(_Inout_ socket&& other) noexcept
+
2365 {
+
2366 if (this != std::addressof(other)) {
+
2367 if (m_h != invalid_socket)
+
2368 closesocket(m_h);
+
2369 m_h = other.m_h;
+
2370 other.m_h = invalid_socket;
+
2371 }
+
2372 return *this;
+
2373 }
+
2374
+
+
2382 socket(_In_ int af, _In_ int type, _In_ int protocol)
+
2383 {
+
2384 m_h = ::socket(af, type, protocol);
+
2385 if (m_h == invalid_socket) _Unlikely_
+
2386 m_state = state_t::fail;
+
2387 }
-
2386
-
2387 virtual ~socket()
-
2388 {
-
2389 if (m_h != invalid_socket)
-
2390 closesocket(m_h);
-
2391 }
-
2392
-
2396 operator bool() const noexcept { return m_h != invalid_socket; }
-
2397
-
2401 socket_t get() const noexcept { return m_h; }
-
2402
-
-
2403 virtual _Success_(return != 0 || length == 0) size_t read(
-
2404 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
2405 {
-
2406 _Assume_(data || !length);
-
2407 constexpr int block_size = 0x10000000;
-
2408 for (size_t to_read = length;;) {
-
2409 int num_read = recv(m_h, reinterpret_cast<char*>(data), static_cast<int>(std::min<size_t>(to_read, block_size)), 0);
-
2410 if (num_read == SOCKET_ERROR) _Unlikely_ {
-
2411 m_state = to_read < length ? state_t::ok : state_t::fail;
-
2412 return length - to_read;
-
2413 }
-
2414 if (!num_read) {
-
2415 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
-
2416 return length - to_read;
-
2417 }
-
2418 to_read -= num_read;
-
2419 if (!to_read) {
-
2420 m_state = state_t::ok;
-
2421 return length;
-
2422 }
-
2423 reinterpret_cast<uint8_t*&>(data) += num_read;
-
2424 }
-
2425 }
+
2388
+
2389 virtual ~socket()
+
2390 {
+
2391 if (m_h != invalid_socket)
+
2392 closesocket(m_h);
+
2393 }
+
2394
+
2398 operator bool() const noexcept { return m_h != invalid_socket; }
+
2399
+
2403 socket_t get() const noexcept { return m_h; }
+
2404
+
+
2405 virtual _Success_(return != 0 || length == 0) size_t read(
+
2406 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
2407 {
+
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_ {
+
2413 m_state = to_read < length ? state_t::ok : state_t::fail;
+
2414 return length - to_read;
+
2415 }
+
2416 if (!num_read) {
+
2417 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
+
2418 return length - to_read;
+
2419 }
+
2420 to_read -= num_read;
+
2421 if (!to_read) {
+
2422 m_state = state_t::ok;
+
2423 return length;
+
2424 }
+
2425 reinterpret_cast<uint8_t*&>(data) += num_read;
+
2426 }
+
2427 }
-
2426
-
-
2427 virtual _Success_(return != 0) size_t write(
-
2428 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
2429 {
-
2430 _Assume_(data || !length);
-
2431 constexpr int block_size = 0x10000000;
-
2432 for (size_t to_write = length;;) {
-
2433 int num_written = send(m_h, reinterpret_cast<const char*>(data), static_cast<int>(std::min<size_t>(to_write, block_size)), 0);
-
2434 if (num_written == SOCKET_ERROR) _Unlikely_ {
-
2435 m_state = state_t::fail;
-
2436 return length - to_write;
-
2437 }
-
2438 to_write -= num_written;
-
2439 if (!to_write) {
-
2440 m_state = state_t::ok;
-
2441 return length;
-
2442 }
-
2443 reinterpret_cast<const uint8_t*&>(data) += num_written;
-
2444 }
-
2445 }
+
2428
+
+
2429 virtual _Success_(return != 0) size_t write(
+
2430 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
2431 {
+
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_ {
+
2437 m_state = state_t::fail;
+
2438 return length - to_write;
+
2439 }
+
2440 to_write -= num_written;
+
2441 if (!to_write) {
+
2442 m_state = state_t::ok;
+
2443 return length;
+
2444 }
+
2445 reinterpret_cast<const uint8_t*&>(data) += num_written;
+
2446 }
+
2447 }
-
2446
-
-
2447 virtual void close()
-
2448 {
-
2449 if (m_h != invalid_socket) {
-
2450 closesocket(m_h);
-
2451 m_h = invalid_socket;
-
2452 }
-
2453 m_state = state_t::ok;
-
2454 }
+
2448
+
+
2449 virtual void close()
+
2450 {
+
2451 if (m_h != invalid_socket) {
+
2452 closesocket(m_h);
+
2453 m_h = invalid_socket;
+
2454 }
+
2455 m_state = state_t::ok;
+
2456 }
-
2455
-
2456 protected:
-
2457 socket_t m_h;
-
2458 };
+
2457
+
2458 protected:
+
2459 socket_t m_h;
+
2460 };
-
2459
-
2460#ifdef _WIN32
-
2464 class sequential_stream : public basic
-
2465 {
-
2466 public:
-
2467 sequential_stream(_In_ ISequentialStream* source) : m_source(source)
-
2468 {
-
2469 m_source->AddRef();
-
2470 }
-
2471
-
2472 virtual ~sequential_stream()
-
2473 {
-
2474 m_source->Release();
-
2475 }
-
2476
-
2477 virtual _Success_(return != 0 || length == 0) size_t read(
-
2478 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
2479 {
-
2480 _Assume_(data || !length);
-
2481 for (size_t to_read = length;;) {
-
2482 HRESULT hr;
-
2483 ULONG num_read = 0;
-
2484 __try { hr = m_source->Read(data, (ULONG)std::min<size_t>(to_read, ULONG_MAX), &num_read); }
-
2485 __except (EXCEPTION_EXECUTE_HANDLER) { hr = E_FAIL; }
-
2486 if (FAILED(hr)) _Unlikely_ {
-
2487 m_state = to_read < length ? state_t::ok : state_t::fail;
-
2488 return length - to_read;
-
2489 }
-
2490 to_read -= num_read;
-
2491 if (hr == S_FALSE) _Unlikely_ {
-
2492 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
-
2493 return length - to_read;
-
2494 }
-
2495 if (!to_read) {
-
2496 m_state = state_t::ok;
-
2497 return length;
-
2498 }
-
2499 reinterpret_cast<uint8_t*&>(data) += num_read;
-
2500 }
-
2501 }
-
2502
-
2503 virtual _Success_(return != 0) size_t write(
-
2504 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
2505 {
-
2506 _Assume_(data || !length);
-
2507 for (size_t to_write = length;;) {
-
2508 HRESULT hr;
-
2509 ULONG num_written = 0;
-
2510 __try { hr = m_source->Write(data, static_cast<ULONG>(std::min<size_t>(to_write, ULONG_MAX)), &num_written); }
-
2511 __except (EXCEPTION_EXECUTE_HANDLER) { hr = E_FAIL; }
-
2512 // In abscence of documentation whether num_written gets set when FAILED(hr) (i.e. partially succesful writes),
-
2513 // assume write failed completely.
-
2514 if (FAILED(hr)) _Unlikely_ {
-
2515 m_state = state_t::fail;
-
2516 return length - to_write;
-
2517 }
-
2518 to_write -= num_written;
-
2519 if (!to_write) {
-
2520 m_state = state_t::ok;
-
2521 return length;
-
2522 }
-
2523 reinterpret_cast<const uint8_t*&>(data) += num_written;
-
2524 }
-
2525 }
-
2526
-
2527 protected:
-
2528 ISequentialStream* m_source;
-
2529 };
-
2530
-
2534 class asp : public basic
-
2535 {
-
2536 public:
-
2537 asp(_In_opt_ IRequest* request, _In_opt_ IResponse* response) :
-
2538 m_request(request),
-
2539 m_response(response)
-
2540 {
-
2541 if (m_request)
-
2542 m_request->AddRef();
-
2543 if (m_response)
-
2544 m_response->AddRef();
-
2545 }
-
2546
-
2547 virtual ~asp()
-
2548 {
-
2549 if (m_request)
-
2550 m_request->Release();
-
2551 if (m_response)
-
2552 m_response->Release();
-
2553 }
-
2554
-
2555 virtual _Success_(return != 0 || length == 0) size_t read(
-
2556 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
2557 {
-
2558 _Assume_(data || !length);
-
2559 if (!m_request) _Unlikely_ {
-
2560 m_state = state_t::fail;
-
2561 return 0;
-
2562 }
-
2563 for (size_t to_read = length;;) {
-
2564 VARIANT var_amount, var_data;
-
2565 V_VT(&var_amount) = VT_I4;
-
2566 V_I4(&var_amount) = (LONG)std::min<size_t>(to_read, LONG_MAX);
-
2567 V_VT(&var_data) = VT_EMPTY;
-
2568 HRESULT hr = [&]() {
-
2569 __try { return m_request->BinaryRead(&var_amount, &var_data); }
-
2570 __except (EXCEPTION_EXECUTE_HANDLER) { return E_FAIL; }
-
2571 }();
-
2572 if (FAILED(hr)) _Unlikely_ {
-
2573 m_state = to_read < length ? state_t::ok : state_t::fail;
-
2574 return length - to_read;
-
2575 }
-
2576 _Assume_(V_VT(&var_amount) == VT_I4);
-
2577 _Assume_(V_VT(&var_data) == (VT_ARRAY | VT_UI1));
-
2578 std::unique_ptr<SAFEARRAY, SafeArrayDestroy_delete> sa(V_ARRAY(&var_data));
-
2579 if (!V_I4(&var_amount)) _Unlikely_ {
-
2580 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
-
2581 return length - to_read;
-
2582 }
-
2583 safearray_accessor<uint8_t> a(sa.get());
-
2584 memcpy(data, a.data(), V_I4(&var_amount));
-
2585 to_read -= V_I4(&var_amount);
-
2586 if (!to_read) {
-
2587 m_state = state_t::ok;
-
2588 return length;
-
2589 }
-
2590 reinterpret_cast<uint8_t*&>(data) += V_I4(&var_amount);
-
2591 }
-
2592 }
-
2593
-
2594 virtual _Success_(return != 0) size_t write(
-
2595 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
2596 {
-
2597 if (!m_response) {
-
2598 m_state = state_t::fail;
-
2599 return 0;
-
2600 }
-
2601 for (size_t to_write = length;;) {
-
2602 UINT num_written = static_cast<UINT>(std::min<size_t>(to_write, UINT_MAX));
-
2603 std::unique_ptr<OLECHAR, SysFreeString_delete> bstr_data(SysAllocStringByteLen(reinterpret_cast<LPCSTR>(data), num_written));
-
2604 VARIANT var_data;
-
2605 V_VT(&var_data) = VT_BSTR;
-
2606 V_BSTR(&var_data) = bstr_data.get();
-
2607 HRESULT hr = [&]() {
-
2608 __try { return m_response->BinaryWrite(var_data); }
-
2609 __except (EXCEPTION_EXECUTE_HANDLER) { return E_FAIL; }
-
2610 }();
-
2611 if (FAILED(hr)) _Unlikely_ {
-
2612 m_state = state_t::fail;
-
2613 return length - to_write;
-
2614 }
-
2615 to_write -= num_written;
-
2616 if (!to_write) {
-
2617 m_state = state_t::ok;
-
2618 return length;
-
2619 }
-
2620 reinterpret_cast<const uint8_t*&>(data) += num_written;
-
2621 }
-
2622 }
-
2623
-
2624 virtual void close()
-
2625 {
-
2626 if (m_response) {
-
2627 __try { m_response->End(); }
-
2628 __except (EXCEPTION_EXECUTE_HANDLER) {}
-
2629 }
-
2630 m_state = state_t::ok;
-
2631 }
-
2632
-
2633 virtual void flush()
-
2634 {
-
2635 if (m_response) {
-
2636 HRESULT hr;
-
2637 __try { hr = m_response->Flush(); }
-
2638 __except (EXCEPTION_EXECUTE_HANDLER) { hr = E_FAIL; }
-
2639 m_state = SUCCEEDED(hr) ? state_t::ok : state_t::fail;
-
2640 }
-
2641 }
-
2642
-
2643 protected:
-
2644 IRequest* m_request;
-
2645 IResponse* m_response;
-
2646 };
-
2647#endif
-
2648
-
2652 enum mode_t
-
2653 {
-
2654 mode_for_reading = 1 << 0,
-
2655 mode_for_writing = 1 << 1,
-
2656 mode_for_chmod = 1 << 2,
-
2657
-
2658 mode_open_existing = 0 << 3,
-
2659 mode_truncate_existing = 1 << 3,
-
2660 mode_preserve_existing = 2 << 3,
-
2661 mode_create_new = 3 << 3,
-
2662 mode_create = 4 << 3,
-
2663 mode_disposition_mask = 7 << 3,
-
2664
-
2665 mode_append = 1 << 6,
-
2666 mode_text = 0,
-
2667 mode_binary = 1 << 7,
-
2668
-
2669 share_none = 0,
-
2670 share_reading = 1 << 8,
-
2671 share_writing = 1 << 9,
-
2672 share_deleting = 1 << 10,
-
2673 share_all = share_reading | share_writing | share_deleting, // Allow others all operations on our file
-
2674
-
2675 inherit_handle = 1 << 11,
+
2461
+
2462#ifdef _WIN32
+
2466 class sequential_stream : public basic
+
2467 {
+
2468 public:
+
2469 sequential_stream(_In_ ISequentialStream* source) : m_source(source)
+
2470 {
+
2471 m_source->AddRef();
+
2472 }
+
2473
+
2474 virtual ~sequential_stream()
+
2475 {
+
2476 m_source->Release();
+
2477 }
+
2478
+
2479 virtual _Success_(return != 0 || length == 0) size_t read(
+
2480 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
2481 {
+
2482 _Assume_(data || !length);
+
2483 for (size_t to_read = length;;) {
+
2484 HRESULT hr;
+
2485 ULONG num_read = 0;
+
2486 __try { hr = m_source->Read(data, (ULONG)std::min<size_t>(to_read, ULONG_MAX), &num_read); }
+
2487 __except (EXCEPTION_EXECUTE_HANDLER) { hr = E_FAIL; }
+
2488 if (FAILED(hr)) _Unlikely_ {
+
2489 m_state = to_read < length ? state_t::ok : state_t::fail;
+
2490 return length - to_read;
+
2491 }
+
2492 to_read -= num_read;
+
2493 if (hr == S_FALSE) _Unlikely_ {
+
2494 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
+
2495 return length - to_read;
+
2496 }
+
2497 if (!to_read) {
+
2498 m_state = state_t::ok;
+
2499 return length;
+
2500 }
+
2501 reinterpret_cast<uint8_t*&>(data) += num_read;
+
2502 }
+
2503 }
+
2504
+
2505 virtual _Success_(return != 0) size_t write(
+
2506 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
2507 {
+
2508 _Assume_(data || !length);
+
2509 for (size_t to_write = length;;) {
+
2510 HRESULT hr;
+
2511 ULONG num_written = 0;
+
2512 __try { hr = m_source->Write(data, static_cast<ULONG>(std::min<size_t>(to_write, ULONG_MAX)), &num_written); }
+
2513 __except (EXCEPTION_EXECUTE_HANDLER) { hr = E_FAIL; }
+
2514 // In abscence of documentation whether num_written gets set when FAILED(hr) (i.e. partially succesful writes),
+
2515 // assume write failed completely.
+
2516 if (FAILED(hr)) _Unlikely_ {
+
2517 m_state = state_t::fail;
+
2518 return length - to_write;
+
2519 }
+
2520 to_write -= num_written;
+
2521 if (!to_write) {
+
2522 m_state = state_t::ok;
+
2523 return length;
+
2524 }
+
2525 reinterpret_cast<const uint8_t*&>(data) += num_written;
+
2526 }
+
2527 }
+
2528
+
2529 protected:
+
2530 ISequentialStream* m_source;
+
2531 };
+
2532
+
2536 class asp : public basic
+
2537 {
+
2538 public:
+
2539 asp(_In_opt_ IRequest* request, _In_opt_ IResponse* response) :
+
2540 m_request(request),
+
2541 m_response(response)
+
2542 {
+
2543 if (m_request)
+
2544 m_request->AddRef();
+
2545 if (m_response)
+
2546 m_response->AddRef();
+
2547 }
+
2548
+
2549 virtual ~asp()
+
2550 {
+
2551 if (m_request)
+
2552 m_request->Release();
+
2553 if (m_response)
+
2554 m_response->Release();
+
2555 }
+
2556
+
2557 virtual _Success_(return != 0 || length == 0) size_t read(
+
2558 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
2559 {
+
2560 _Assume_(data || !length);
+
2561 if (!m_request) _Unlikely_ {
+
2562 m_state = state_t::fail;
+
2563 return 0;
+
2564 }
+
2565 for (size_t to_read = length;;) {
+
2566 VARIANT var_amount, var_data;
+
2567 V_VT(&var_amount) = VT_I4;
+
2568 V_I4(&var_amount) = (LONG)std::min<size_t>(to_read, LONG_MAX);
+
2569 V_VT(&var_data) = VT_EMPTY;
+
2570 HRESULT hr = [&]() {
+
2571 __try { return m_request->BinaryRead(&var_amount, &var_data); }
+
2572 __except (EXCEPTION_EXECUTE_HANDLER) { return E_FAIL; }
+
2573 }();
+
2574 if (FAILED(hr)) _Unlikely_ {
+
2575 m_state = to_read < length ? state_t::ok : state_t::fail;
+
2576 return length - to_read;
+
2577 }
+
2578 _Assume_(V_VT(&var_amount) == VT_I4);
+
2579 _Assume_(V_VT(&var_data) == (VT_ARRAY | VT_UI1));
+
2580 std::unique_ptr<SAFEARRAY, SafeArrayDestroy_delete> sa(V_ARRAY(&var_data));
+
2581 if (!V_I4(&var_amount)) _Unlikely_ {
+
2582 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
+
2583 return length - to_read;
+
2584 }
+
2585 safearray_accessor<uint8_t> a(sa.get());
+
2586 memcpy(data, a.data(), V_I4(&var_amount));
+
2587 to_read -= V_I4(&var_amount);
+
2588 if (!to_read) {
+
2589 m_state = state_t::ok;
+
2590 return length;
+
2591 }
+
2592 reinterpret_cast<uint8_t*&>(data) += V_I4(&var_amount);
+
2593 }
+
2594 }
+
2595
+
2596 virtual _Success_(return != 0) size_t write(
+
2597 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
2598 {
+
2599 if (!m_response) {
+
2600 m_state = state_t::fail;
+
2601 return 0;
+
2602 }
+
2603 for (size_t to_write = length;;) {
+
2604 UINT num_written = static_cast<UINT>(std::min<size_t>(to_write, UINT_MAX));
+
2605 std::unique_ptr<OLECHAR, SysFreeString_delete> bstr_data(SysAllocStringByteLen(reinterpret_cast<LPCSTR>(data), num_written));
+
2606 VARIANT var_data;
+
2607 V_VT(&var_data) = VT_BSTR;
+
2608 V_BSTR(&var_data) = bstr_data.get();
+
2609 HRESULT hr = [&]() {
+
2610 __try { return m_response->BinaryWrite(var_data); }
+
2611 __except (EXCEPTION_EXECUTE_HANDLER) { return E_FAIL; }
+
2612 }();
+
2613 if (FAILED(hr)) _Unlikely_ {
+
2614 m_state = state_t::fail;
+
2615 return length - to_write;
+
2616 }
+
2617 to_write -= num_written;
+
2618 if (!to_write) {
+
2619 m_state = state_t::ok;
+
2620 return length;
+
2621 }
+
2622 reinterpret_cast<const uint8_t*&>(data) += num_written;
+
2623 }
+
2624 }
+
2625
+
2626 virtual void close()
+
2627 {
+
2628 if (m_response) {
+
2629 __try { m_response->End(); }
+
2630 __except (EXCEPTION_EXECUTE_HANDLER) {}
+
2631 }
+
2632 m_state = state_t::ok;
+
2633 }
+
2634
+
2635 virtual void flush()
+
2636 {
+
2637 if (m_response) {
+
2638 HRESULT hr;
+
2639 __try { hr = m_response->Flush(); }
+
2640 __except (EXCEPTION_EXECUTE_HANDLER) { hr = E_FAIL; }
+
2641 m_state = SUCCEEDED(hr) ? state_t::ok : state_t::fail;
+
2642 }
+
2643 }
+
2644
+
2645 protected:
+
2646 IRequest* m_request;
+
2647 IResponse* m_response;
+
2648 };
+
2649#endif
+
2650
+
2654 enum mode_t
+
2655 {
+
2656 mode_for_reading = 1 << 0,
+
2657 mode_for_writing = 1 << 1,
+
2658 mode_for_chmod = 1 << 2,
+
2659
+
2660 mode_open_existing = 0 << 3,
+
2661 mode_truncate_existing = 1 << 3,
+
2662 mode_preserve_existing = 2 << 3,
+
2663 mode_create_new = 3 << 3,
+
2664 mode_create = 4 << 3,
+
2665 mode_disposition_mask = 7 << 3,
+
2666
+
2667 mode_append = 1 << 6,
+
2668 mode_text = 0,
+
2669 mode_binary = 1 << 7,
+
2670
+
2671 share_none = 0,
+
2672 share_reading = 1 << 8,
+
2673 share_writing = 1 << 9,
+
2674 share_deleting = 1 << 10,
+
2675 share_all = share_reading | share_writing | share_deleting, // Allow others all operations on our file
2676
-
2677 hint_write_thru = 1 << 12,
-
2678 hint_no_buffering = 1 << 13,
-
2679 hint_random_access = 1 << 14,
-
2680 hint_sequential_access = 1 << 15,
-
2681 };
-
2682
-
2683#pragma warning(push)
-
2684#pragma warning(disable: 4250)
-
-
2688 class file : virtual public basic_file, virtual public basic_sys
-
2689 {
-
2690 public:
-
2691 file(_In_opt_ sys_handle h = invalid_handle, _In_ state_t state = state_t::ok) : basic_sys(h, state) {}
-
2692
-
-
2699 file(_In_z_ const schar_t* filename, _In_ int mode)
-
2700 {
-
2701 open(filename, mode);
-
2702 }
-
-
2703
-
2710 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
-
2711 file(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode) : file(filename.c_str(), mode) {}
-
2712
-
-
2719 void open(_In_z_ const schar_t* filename, _In_ int mode)
-
2720 {
-
2721 if (m_h != invalid_handle)
-
2722 close();
-
2723
-
2724#ifdef _WIN32
-
2725 DWORD dwDesiredAccess = 0;
-
2726 if (mode & mode_for_reading) dwDesiredAccess |= GENERIC_READ;
-
2727 if (mode & mode_for_writing) dwDesiredAccess |= GENERIC_WRITE;
-
2728 if (mode & mode_for_chmod) dwDesiredAccess |= FILE_WRITE_ATTRIBUTES;
-
2729
-
2730 DWORD dwShareMode = 0;
-
2731 if (mode & share_reading) dwShareMode |= FILE_SHARE_READ;
-
2732 if (mode & share_writing) dwShareMode |= FILE_SHARE_WRITE;
-
2733 if (mode & share_deleting) dwShareMode |= FILE_SHARE_DELETE;
-
2734
-
2735 SECURITY_ATTRIBUTES sa = { sizeof(SECURITY_ATTRIBUTES) };
-
2736 sa.bInheritHandle = mode & inherit_handle ? true : false;
-
2737
-
2738 DWORD dwCreationDisposition;
-
2739 switch (mode & mode_disposition_mask) {
-
2740 case mode_open_existing: dwCreationDisposition = OPEN_EXISTING; break;
-
2741 case mode_truncate_existing: dwCreationDisposition = TRUNCATE_EXISTING; break;
-
2742 case mode_preserve_existing: dwCreationDisposition = OPEN_ALWAYS; break;
-
2743 case mode_create_new: dwCreationDisposition = CREATE_NEW; break;
-
2744 case mode_create: dwCreationDisposition = CREATE_ALWAYS; break;
-
2745 default: throw std::invalid_argument("invalid mode");
-
2746 }
-
2747
-
2748 DWORD dwFlagsAndAttributes = FILE_ATTRIBUTE_NORMAL;
-
2749 if (mode & hint_write_thru) dwFlagsAndAttributes |= FILE_FLAG_WRITE_THROUGH;
-
2750 if (mode & hint_no_buffering) dwFlagsAndAttributes |= FILE_FLAG_NO_BUFFERING;
-
2751 if (mode & hint_random_access) dwFlagsAndAttributes |= FILE_FLAG_RANDOM_ACCESS;
-
2752 if (mode & hint_sequential_access) dwFlagsAndAttributes |= FILE_FLAG_SEQUENTIAL_SCAN;
-
2753
-
2754 m_h = CreateFile(filename, dwDesiredAccess, dwShareMode, &sa, dwCreationDisposition, dwFlagsAndAttributes, NULL);
-
2755#else
-
2756 int flags = 0;
-
2757 switch (mode & (mode_for_reading | mode_for_writing)) {
-
2758 case mode_for_reading: flags |= O_RDONLY; break;
-
2759 case mode_for_writing: flags |= O_WRONLY; break;
-
2760 case mode_for_reading | mode_for_writing: flags |= O_RDWR; break;
-
2761 }
-
2762 switch (mode & mode_disposition_mask) {
-
2763 case mode_open_existing: break;
-
2764 case mode_truncate_existing: flags |= O_TRUNC; break;
-
2765 case mode_preserve_existing: flags |= O_CREAT; break;
-
2766 case mode_create_new: flags |= O_CREAT | O_EXCL; break;
-
2767 case mode_create: flags |= O_CREAT | O_TRUNC; break;
-
2768 default: throw std::invalid_argument("invalid mode");
-
2769 }
-
2770 if (mode & hint_write_thru) flags |= O_DSYNC;
-
2771#ifndef __APPLE__
-
2772 if (mode & hint_no_buffering) flags |= O_RSYNC;
-
2773#endif
-
2774
-
2775 m_h = ::open(filename, flags, DEFFILEMODE);
-
2776#endif
-
2777 if (m_h != invalid_handle) {
-
2778 m_state = state_t::ok;
-
2779 if (mode & mode_append)
-
2780 seek(0, seek_t::end);
-
2781 }
-
2782 else
-
2783 m_state = state_t::fail;
-
2784 }
-
-
2785
-
2792 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
-
-
2793 void open(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode)
-
2794 {
-
2795 open(filename.c_str(), mode);
-
2796 }
-
-
2797
-
-
2798 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
-
2799 {
-
2800#ifdef _WIN32
-
2801 LARGE_INTEGER li;
-
2802 li.QuadPart = offset;
-
2803 li.LowPart = SetFilePointer(m_h, li.LowPart, &li.HighPart, static_cast<DWORD>(how));
-
2804 if (li.LowPart != 0xFFFFFFFF || GetLastError() == NO_ERROR) {
-
2805 m_state = state_t::ok;
-
2806 return li.QuadPart;
-
2807 }
-
2808#else
-
2809 off64_t result = lseek64(m_h, offset, static_cast<int>(how));
-
2810 if (result >= 0) {
-
2811 m_state = state_t::ok;
-
2812 return result;
-
2813 }
-
2814#endif
-
2815 m_state = state_t::fail;
-
2816 return fpos_max;
-
2817 }
-
-
2818
-
-
2819 virtual fpos_t tell() const
-
2820 {
-
2821 if (m_h != invalid_handle) {
-
2822#ifdef _WIN32
-
2823 LARGE_INTEGER li;
-
2824 li.QuadPart = 0;
-
2825 li.LowPart = SetFilePointer(m_h, 0, &li.HighPart, FILE_CURRENT);
-
2826 if (li.LowPart != 0xFFFFFFFF || GetLastError() == NO_ERROR)
-
2827 return li.QuadPart;
-
2828#else
-
2829 off64_t result = lseek64(m_h, 0, SEEK_CUR);
-
2830 if (result >= 0)
-
2831 return result;
-
2832#endif
-
2833 }
-
2834 return fpos_max;
-
2835 }
-
-
2836
-
-
2837 virtual void lock(_In_ fpos_t offset, _In_ fsize_t length)
-
2838 {
-
2839#ifdef _WIN32
-
2840 LARGE_INTEGER liOffset;
-
2841 LARGE_INTEGER liSize;
-
2842 liOffset.QuadPart = offset;
-
2843 liSize.QuadPart = length;
-
2844 if (LockFile(m_h, liOffset.LowPart, liOffset.HighPart, liSize.LowPart, liSize.HighPart)) {
-
2845 m_state = state_t::ok;
-
2846 return;
-
2847 }
-
2848#else
-
2849 off64_t orig = lseek64(m_h, 0, SEEK_CUR);
-
2850 if (orig >= 0) {
-
2851 m_state = lseek64(m_h, offset, SEEK_SET) >= 0 && lockf64(m_h, F_LOCK, length) >= 0 ? state_t::ok : state_t::fail;
-
2852 lseek64(m_h, orig, SEEK_SET);
-
2853 m_state = state_t::ok;
-
2854 return;
-
2855 }
-
2856#endif
-
2857 m_state = state_t::fail;
-
2858 }
-
-
2859
-
-
2860 virtual void unlock(_In_ fpos_t offset, _In_ fsize_t length)
-
2861 {
-
2862#ifdef _WIN32
-
2863 LARGE_INTEGER liOffset;
-
2864 LARGE_INTEGER liSize;
-
2865 liOffset.QuadPart = offset;
-
2866 liSize.QuadPart = length;
-
2867 if (UnlockFile(m_h, liOffset.LowPart, liOffset.HighPart, liSize.LowPart, liSize.HighPart)) {
-
2868 m_state = state_t::ok;
-
2869 return;
-
2870 }
-
2871#else
-
2872 off64_t orig = lseek64(m_h, 0, SEEK_CUR);
-
2873 if (orig >= 0) {
-
2874 if (lseek64(m_h, offset, SEEK_SET) >= 0 && lockf64(m_h, F_ULOCK, length) >= 0) {
-
2875 lseek64(m_h, orig, SEEK_SET);
-
2876 m_state = state_t::ok;
-
2877 return;
-
2878 }
-
2879 lseek64(m_h, orig, SEEK_SET);
-
2880 }
-
2881#endif
-
2882 m_state = state_t::fail;
-
2883 }
-
-
2884
-
-
2885 virtual fsize_t size() const
-
2886 {
-
2887#ifdef _WIN32
-
2888 LARGE_INTEGER li;
-
2889 li.LowPart = GetFileSize(m_h, (LPDWORD)&li.HighPart);
-
2890 if (li.LowPart == 0xFFFFFFFF && GetLastError() != NO_ERROR)
-
2891 li.QuadPart = -1;
-
2892 return li.QuadPart;
-
2893#else
-
2894 off64_t length = -1, orig = lseek64(m_h, 0, SEEK_CUR);
-
2895 if (orig >= 0) {
-
2896 length = lseek64(m_h, 0, SEEK_END);
-
2897 lseek64(m_h, orig, SEEK_SET);
-
2898 }
-
2899 return length;
-
2900#endif
-
2901 }
-
-
2902
-
-
2903 virtual void truncate()
-
2904 {
-
2905#ifdef _WIN32
-
2906 if (SetEndOfFile(m_h)) {
-
2907 m_state = state_t::ok;
-
2908 return;
-
2909 }
-
2910#else
-
2911 off64_t length = lseek64(m_h, 0, SEEK_CUR);
-
2912 if (length >= 0 && ftruncate64(m_h, length) >= 0) {
-
2913 m_state = state_t::ok;
-
2914 return;
-
2915 }
-
2916#endif
-
2917 m_state = state_t::fail;
-
2918 }
-
-
2919
-
2920#ifdef _WIN32
-
2921 static time_point ft2tp(_In_ const FILETIME& ft)
-
2922 {
-
2923#if _HAS_CXX20
-
2924 uint64_t t = (static_cast<int64_t>(ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
-
2925#else
-
2926 uint64_t t = ((static_cast<int64_t>(ft.dwHighDateTime) << 32) | ft.dwLowDateTime) - 116444736000000000ll;
-
2927#endif
-
2928 return time_point(time_point::duration(t));
-
2929 }
-
2930
-
2931 static void tp2ft(_In_ time_point tp, _Out_ FILETIME& ft)
-
2932 {
-
2933#if _HAS_CXX20
-
2934 uint64_t t = tp.time_since_epoch().count();
-
2935#else
-
2936 uint64_t t = tp.time_since_epoch().count() + 116444736000000000ll;
-
2937#endif
-
2938 ft.dwHighDateTime = static_cast<DWORD>((t >> 32) & 0xffffffff);
-
2939 ft.dwLowDateTime = static_cast<DWORD>(t & 0xffffffff);
-
2940 }
-
2941#endif
-
2942
-
-
2943 virtual time_point ctime() const
-
2944 {
-
2945#ifdef _WIN32
-
2946 FILETIME ft;
-
2947 if (GetFileTime(m_h, &ft, nullptr, nullptr))
-
2948 return ft2tp(ft);
-
2949#endif
-
2950 return time_point::min();
-
2951 }
-
-
2952
-
-
2953 virtual time_point atime() const
-
2954 {
-
2955#ifdef _WIN32
-
2956 FILETIME ft;
-
2957 if (GetFileTime(m_h, nullptr, &ft, nullptr))
-
2958 return ft2tp(ft);
-
2959#else
-
2960 struct stat buf;
-
2961 if (fstat(m_h, &buf) >= 0)
-
2962 return clock::from_time_t(buf.st_atime);
-
2963#endif
-
2964 return time_point::min();
-
2965 }
-
-
2966
-
-
2967 virtual time_point mtime() const
-
2968 {
-
2969#ifdef _WIN32
-
2970 FILETIME ft;
-
2971 if (GetFileTime(m_h, nullptr, nullptr, &ft))
-
2972 return ft2tp(ft);
-
2973#else
-
2974 struct stat buf;
-
2975 if (fstat(m_h, &buf) >= 0)
-
2976 return clock::from_time_t(buf.st_mtime);
-
2977#endif
-
2978 return time_point::min();
-
2979 }
-
-
2980
-
-
2981 virtual void set_ctime(time_point date)
-
2982 {
-
2983 _Assume_(m_h != invalid_handle);
-
2984#ifdef _WIN32
-
2985 FILETIME ft;
-
2986 tp2ft(date, ft);
-
2987 if (SetFileTime(m_h, &ft, nullptr, nullptr))
-
2988 return;
-
2989 throw std::system_error(GetLastError(), std::system_category(), "SetFileTime failed");
-
2990#else
-
2991 throw std::runtime_error("not supported");
-
2992#endif
-
2993 }
-
-
2994
-
-
2995 virtual void set_atime(time_point date)
-
2996 {
-
2997 _Assume_(m_h != invalid_handle);
-
2998#ifdef _WIN32
-
2999 FILETIME ft;
-
3000 tp2ft(date, ft);
-
3001 if (SetFileTime(m_h, nullptr, &ft, nullptr))
-
3002 return;
-
3003 throw std::system_error(GetLastError(), std::system_category(), "SetFileTime failed");
-
3004#else
-
3005 struct timespec ts[2] = {
-
3006 { date.time_since_epoch().count(), 0 },
-
3007 { 0, UTIME_OMIT },
-
3008 };
-
3009 if (futimens(m_h, ts) >= 0)
-
3010 return;
-
3011 throw std::system_error(errno, std::system_category(), "futimens failed");
-
3012#endif
-
3013 }
-
-
3014
-
-
3015 virtual void set_mtime(time_point date)
-
3016 {
-
3017#ifdef _WIN32
-
3018 FILETIME ft;
-
3019 tp2ft(date, ft);
-
3020 if (SetFileTime(m_h, nullptr, nullptr, &ft))
-
3021 return;
-
3022 throw std::system_error(GetLastError(), std::system_category(), "SetFileTime failed");
-
3023#else
-
3024 struct timespec ts[2] = {
-
3025 { 0, UTIME_OMIT },
-
3026 { date.time_since_epoch().count(), 0 },
-
3027 };
-
3028 if (futimens(m_h, ts) >= 0)
-
3029 return;
-
3030 throw std::system_error(errno, std::system_category(), "futimens failed");
-
3031#endif
-
3032 }
-
-
3033
-
-
3039 static bool exists(_In_z_ const stdex::schar_t* filename)
-
3040 {
-
3041#ifdef _WIN32
-
3042 return GetFileAttributes(filename) != INVALID_FILE_ATTRIBUTES;
-
3043#else
-
3044 struct stat s;
-
3045 return stat(filename, &s) == 0;
-
3046#endif
-
3047 }
-
-
3048
-
3054 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
-
-
3055 static bool exists(_In_ const std::basic_string<TR, AX>& filename)
-
3056 {
-
3057 return exists(filename.c_str());
-
3058 }
-
-
3059
-
-
3067 static bool readonly(_In_z_ const stdex::schar_t* filename)
-
3068 {
-
3069#ifdef _WIN32
-
3070 DWORD dwAttr = GetFileAttributes(filename);
-
3071 return dwAttr != INVALID_FILE_ATTRIBUTES && (dwAttr & FILE_ATTRIBUTE_READONLY) != 0;
-
3072#else
-
3073 struct stat s;
-
3074 return stat(filename, &s) == 0 && (s.st_mode & (S_IWUSR|S_IWGRP|S_IWOTH)) == 0;
-
3075#endif
-
3076 }
-
-
3077
-
3085 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
-
-
3086 static bool readonly(_In_ const std::basic_string<TR, AX>& filename)
-
3087 {
-
3088 return readonly(filename.c_str());
-
3089 }
-
-
3090 };
-
-
3091#pragma warning(pop)
-
3092
-
-
3096 class cached_file : public cache
-
3097 {
-
3098 public:
-
3099 cached_file(_In_opt_ sys_handle h = invalid_handle, _In_ state_t state = state_t::ok, _In_ size_t cache_size = default_cache_size) :
-
3100 cache(cache_size),
-
3101 m_source(h, state)
-
3102 {
-
3103 init(m_source);
-
3104 }
-
3105
-
-
3113 cached_file(_In_z_ const schar_t* filename, _In_ int mode, _In_ size_t cache_size = default_cache_size) :
-
3114 cache(cache_size),
-
3115 m_source(filename, mode & mode_for_writing ? mode | mode_for_reading : mode)
-
3116 {
-
3117 init(m_source);
-
3118 }
-
-
3119
-
3127 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
-
3128 cached_file(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode, _In_ size_t cache_size = default_cache_size) : cached_file(filename.c_str(), mode, cache_size) {}
-
3129
-
3130 virtual ~cached_file()
-
3131 {
-
3132 done();
-
3133 }
-
3134
-
-
3141 void open(_In_z_ const schar_t* filename, _In_ int mode)
-
3142 {
-
3143 invalidate_cache();
-
3144 if (!ok()) _Unlikely_{
-
3145 m_state = state_t::fail;
-
3146 return;
-
3147 }
-
3148 m_source.open(filename, mode & mode_for_writing ? mode | mode_for_reading : mode);
-
3149 if (m_source.ok()) {
-
3150 init();
-
3151 return;
-
3152 }
-
3153 m_state = state_t::fail;
-
3154 }
-
-
3155
-
3162 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
-
-
3163 void open(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode)
-
3164 {
-
3165 open(filename.c_str(), mode);
-
3166 }
-
-
3167
-
3171 operator bool() const noexcept { return m_source; }
-
3172
-
3173 protected:
-
3174 file m_source;
-
3175 };
-
-
3176
-
- -
3181 {
-
3182 public:
-
3183 memory_file(_In_ state_t state = state_t::ok) :
-
3184 basic(state),
-
3185 m_data(nullptr),
-
3186 m_offset(0),
-
3187 m_size(0),
-
3188 m_reserved(0),
-
3189 m_manage(true)
-
3190 {
-
3191#if SET_FILE_OP_TIMES
-
3192 m_ctime = m_atime = m_mtime = time_point::now();
-
3193#endif
-
3194 }
-
3195
-
-
3202 memory_file(_In_ size_t size, _In_ state_t state = state_t::ok) :
-
3203 basic(state),
-
3204 m_data(reinterpret_cast<uint8_t*>(malloc(size))),
-
3205 m_offset(0),
-
3206 m_size(0),
- -
3208 m_manage(true)
-
3209 {
-
3210 if (!m_data) {
-
3211 m_state = state_t::fail;
-
3212 throw std::bad_alloc();
-
3213 }
-
3214#if SET_FILE_OP_TIMES
-
3215 m_ctime = m_atime = m_mtime = time_point::now();
-
3216#endif
-
3217 }
-
-
3218
-
-
3228 memory_file(_Inout_ void* data, _In_ size_t size, _In_ size_t reserved, _In_ bool manage = false, _In_ state_t state = state_t::ok) :
-
3229 basic(state),
-
3230 m_data(reinterpret_cast<uint8_t*>(data)),
-
3231 m_offset(0),
-
3232 m_size(size),
-
3233 m_reserved(reserved),
-
3234 m_manage(manage)
-
3235 {
-
3236 _Assume_(data || !size);
-
3237 _Assume_(reserved >= size);
-
3238#if SET_FILE_OP_TIMES
-
3239 m_ctime = m_atime = m_mtime = time_point::now();
-
3240#endif
-
3241 }
-
-
3242
-
-
3251 memory_file(_Inout_ void* data, _In_ size_t size, _In_ bool manage = false, _In_ state_t state = state_t::ok) :
-
3252 memory_file(data, size, size, manage, state)
-
3253 {}
-
-
3254
-
-
3261 memory_file(_In_z_ const schar_t* filename, _In_ int mode) : memory_file()
-
3262 {
-
3263 load(filename, mode);
-
3264 }
-
-
3265
-
3272 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
-
3273 memory_file(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode) : memory_file(filename.c_str(), mode) {}
-
3274
-
-
3280 memory_file(_In_ const memory_file& other) :
-
3281 basic_file(other),
-
3282 m_data(reinterpret_cast<uint8_t*>(malloc(other.m_size))),
-
3283 m_offset(other.m_offset),
-
3284 m_size(other.m_size),
-
3285 m_reserved(other.m_size),
-
3286 m_manage(true)
-
3287#if SET_FILE_OP_TIMES
-
3288 , m_ctime(other.m_ctime)
-
3289 , m_atime(other.m_atime)
-
3290 , m_mtime(other.m_mtime)
-
3291#endif
-
3292 {
-
3293 if (!m_data) {
-
3294 m_state = state_t::fail;
-
3295 throw std::bad_alloc();
-
3296 }
-
3297 memcpy(m_data, other.m_data, other.m_size);
-
3298 }
-
-
3299
-
- -
3306 {
-
3307 if (this != std::addressof(other)) {
-
3308 *static_cast<basic_file*>(this) = other;
-
3309 if (m_manage && m_data)
-
3310 free(m_data);
-
3311 m_data = reinterpret_cast<uint8_t*>(malloc(other.m_size));
-
3312 if (!m_data) {
-
3313 m_state = state_t::fail;
-
3314 throw std::bad_alloc();
-
3315 }
-
3316 memcpy(m_data, other.m_data, other.m_size);
-
3317 m_offset = other.m_offset;
-
3318 m_size = other.m_size;
-
3319 m_reserved = other.m_size;
-
3320 m_manage = true;
-
3321#if SET_FILE_OP_TIMES
-
3322 m_ctime = other.m_ctime;
-
3323 m_atime = other.m_atime;
-
3324 m_mtime = other.m_mtime;
-
3325#endif
-
3326 }
-
3327 return *this;
-
3328 }
-
-
3329
-
-
3335 memory_file(_Inout_ memory_file&& other) noexcept :
-
3336 basic_file(std::move(other)),
-
3337 m_data(other.m_data),
-
3338 m_offset(other.m_offset),
-
3339 m_size(other.m_size),
-
3340 m_reserved(other.m_reserved),
-
3341 m_manage(other.m_manage)
-
3342#if SET_FILE_OP_TIMES
-
3343 , m_ctime(other.m_ctime)
-
3344 , m_atime(other.m_atime)
-
3345 , m_mtime(other.m_mtime)
-
3346#endif
-
3347 {
-
3348 other.m_state = state_t::ok;
-
3349 other.m_data = nullptr;
-
3350 other.m_offset = 0;
-
3351 other.m_size = 0;
-
3352 other.m_reserved = 0;
-
3353 other.m_manage = true;
-
3354#if SET_FILE_OP_TIMES
-
3355 other.m_ctime = other.m_atime = other.m_mtime = time_point::now();
-
3356#endif
-
3357 }
-
-
3358
-
-
3364 memory_file& operator=(_Inout_ memory_file&& other) noexcept
-
3365 {
-
3366 if (this != std::addressof(other)) {
-
3367 *static_cast<basic_file*>(this) = std::move(other);
-
3368 if (m_manage && m_data)
-
3369 free(m_data);
-
3370 m_data = other.m_data;
-
3371 other.m_data = nullptr;
-
3372 m_offset = other.m_offset;
-
3373 other.m_offset = 0;
-
3374 m_size = other.m_size;
-
3375 other.m_size = 0;
-
3376 m_reserved = other.m_reserved;
-
3377 other.m_reserved = 0;
-
3378 m_manage = other.m_manage;
-
3379 other.m_manage = true;
-
3380#if SET_FILE_OP_TIMES
-
3381 m_ctime = other.m_ctime;
-
3382 m_atime = other.m_atime;
-
3383 m_mtime = other.m_mtime;
-
3384 other.m_ctime = other.m_atime = other.m_mtime = time_point::now();
-
3385#endif
-
3386 }
-
3387 return *this;
-
3388 }
-
-
3389
-
3390 virtual ~memory_file()
-
3391 {
-
3392 if (m_manage && m_data)
-
3393 free(m_data);
-
3394 }
-
3395
-
-
3402 void reserve(_In_ size_t required, _In_ bool tight = false) noexcept
-
3403 {
-
3404 if (required <= m_reserved && (!tight || required >= m_reserved)) {
-
3405 m_state = state_t::ok;
-
3406 return;
-
3407 }
-
3408 if (!m_manage) {
-
3409 m_state = state_t::fail;
-
3410 return;
-
3411 }
-
3412 size_t reserved = tight ? required : ((required + required / 4 + (default_block_size - 1)) / default_block_size) * default_block_size;
-
3413 auto data = reinterpret_cast<uint8_t*>(realloc(m_data, reserved));
-
3414 if (!data && reserved) _Unlikely_ {
-
3415 m_state = state_t::fail;
-
3416 return;
-
3417 }
-
3418 m_data = data;
-
3419 if (reserved < m_size)
-
3420 m_size = reserved;
-
3421 m_reserved = reserved;
-
3422 m_state = state_t::ok;
-
3423 }
-
-
3424
-
-
3431 void load(_In_z_ const schar_t* filename, _In_ int mode)
-
3432 {
-
3433 file f(filename, (mode & ~hint_random_access) | mode_for_reading | hint_sequential_access);
-
3434 if (!f.ok()) {
-
3435 m_state = state_t::fail;
-
3436 return;
-
3437 }
-
3438 fsize_t size = f.size();
-
3439 if (size > SIZE_MAX) {
-
3440 m_state = state_t::fail;
-
3441 return;
-
3442 }
-
3443 reserve(static_cast<size_t>(size), true);
-
3444 if (!ok()) _Unlikely_ {
-
3445 return;
-
3446 }
-
3447 m_offset = m_size = 0;
-
3448 write_stream(f);
-
3449 if (ok())
-
3450 m_offset = 0;
-
3451#if SET_FILE_OP_TIMES
-
3452 m_ctime = f.ctime();
-
3453 m_atime = f.atime();
-
3454 m_mtime = f.mtime();
-
3455#endif
-
3456 }
-
-
3457
-
3464 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
-
-
3465 void load(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode)
-
3466 {
-
3467 load(filename.c_str(), mode);
-
3468 }
-
-
3469
-
-
3476 void save(_In_z_ const schar_t* filename, _In_ int mode)
-
3477 {
-
3478 file f(filename, (mode & ~hint_random_access) | mode_for_writing | hint_sequential_access);
-
3479 if (!f.ok()) {
-
3480 m_state = state_t::fail;
-
3481 return;
-
3482 }
-
3483 f.write(m_data, m_size);
-
3484 if (!f.ok()) {
-
3485 m_state = state_t::fail;
-
3486 return;
-
3487 }
-
3488 f.truncate();
-
3489#if SET_FILE_OP_TIMES
-
3490 f.set_ctime(m_ctime);
-
3491 f.set_atime(m_atime);
-
3492 f.set_mtime(m_mtime);
-
3493#endif
-
3494 }
-
-
3495
-
3502 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
-
-
3503 void save(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode)
-
3504 {
-
3505 save(filename.c_str(), mode);
-
3506 }
-
-
3507
-
3511 const void* data() const { return m_data; }
-
3512
-
-
3513 virtual _Success_(return != 0 || length == 0) size_t read(
-
3514 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
3515 {
-
3516 _Assume_(data || !length);
-
3517#if SET_FILE_OP_TIMES
-
3518 m_atime = time_point::now();
-
3519#endif
-
3520 size_t available = m_size - m_offset;
-
3521 if (length <= available) {
-
3522 memcpy(data, m_data + m_offset, length);
-
3523 m_offset += length;
-
3524 m_state = state_t::ok;
-
3525 return length;
-
3526 }
-
3527 if (length && !available) {
-
3528 m_state = state_t::eof;
-
3529 return 0;
-
3530 }
-
3531 memcpy(data, m_data + m_offset, available);
-
3532 m_offset += available;
-
3533 m_state = state_t::ok;
-
3534 return available;
-
3535 }
-
-
3536
-
3551 template <class T>
-
- -
3553 {
-
3554#if SET_FILE_OP_TIMES
-
3555 m_atime = time_point::now();
-
3556#endif
-
3557 if (CHECK_STREAM_STATE && !ok()) _Unlikely_ {
-
3558 data = 0;
-
3559 return *this;
-
3560 }
-
3561 size_t end_offset = m_offset + sizeof(T);
-
3562 if (end_offset <= m_size) {
-
3563 data = LE2HE(*reinterpret_cast<T*>(m_data + m_offset));
-
3564 m_offset = end_offset;
-
3565#if !CHECK_STREAM_STATE
-
3566 m_state = state_t::ok;
-
3567#endif
-
3568 }
-
3569 else {
-
3570 data = 0;
-
3571 m_offset = m_size;
-
3572 m_state = state_t::eof;
-
3573 }
-
3574 return *this;
-
3575 }
-
-
3576
-
3591 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
-
3592 memory_file& read_str(_Inout_ std::basic_string<T, TR, AX>&data)
-
3593 {
-
3594#if SET_FILE_OP_TIMES
-
3595 m_atime = time_point::now();
-
3596#endif
-
3597 if (CHECK_STREAM_STATE && !ok()) _Unlikely_ {
-
3598 data.clear();
-
3599 return *this;
-
3600 }
-
3601 size_t end_offset = m_offset + sizeof(uint32_t);
-
3602 if (end_offset <= m_size) {
-
3603 uint32_t num_chars = LE2HE(*reinterpret_cast<uint32_t*>(m_data + m_offset));
-
3604 m_offset = end_offset;
-
3605 end_offset = stdex::add(m_offset, stdex::mul(num_chars, sizeof(T)));
-
3606 T* start = reinterpret_cast<T*>(m_data + m_offset);
-
3607 if (end_offset <= m_size) {
-
3608 data.assign(start, start + num_chars);
-
3609 m_offset = end_offset;
-
3610#if !CHECK_STREAM_STATE
-
3611 m_state = state_t::ok;
-
3612#endif
-
3613 return *this;
-
3614 }
-
3615 if (end_offset <= m_size)
-
3616 data.assign(start, reinterpret_cast<T*>(m_data + m_size));
-
3617 }
-
3618 m_offset = m_size;
-
3619 m_state = state_t::eof;
-
3620 return *this;
-
3621 }
-
-
3622
-
-
3623 virtual _Success_(return != 0) size_t write(
-
3624 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
3625 {
-
3626 _Assume_(data || !length);
-
3627#if SET_FILE_OP_TIMES
-
3628 m_atime = m_mtime = time_point::now();
-
3629#endif
-
3630 size_t end_offset = m_offset + length;
-
3631 if (end_offset > m_reserved) {
-
3632 reserve(end_offset);
-
3633 if (!ok()) _Unlikely_
-
3634 return 0;
-
3635 }
-
3636 memcpy(m_data + m_offset, data, length);
-
3637 m_offset = end_offset;
-
3638 if (m_offset > m_size)
-
3639 m_size = m_offset;
-
3640 m_state = state_t::ok;
-
3641 return length;
-
3642 }
-
-
3643
-
-
3647 void write_byte(_In_ uint8_t byte, _In_ size_t amount = 1)
-
3648 {
-
3649#if SET_FILE_OP_TIMES
-
3650 m_atime = m_mtime = time_point::now();
-
3651#endif
-
3652 size_t end_offset = m_offset + amount;
-
3653 if (end_offset > m_reserved) {
-
3654 reserve(end_offset);
-
3655 if (!ok()) _Unlikely_
-
3656 return;
-
3657 }
-
3658 memset(m_data + m_offset, byte, amount);
-
3659 m_offset = end_offset;
-
3660 if (m_offset > m_size)
-
3661 m_size = m_offset;
-
3662 m_state = state_t::ok;
-
3663 }
-
-
3664
-
3679 template <class T>
-
- -
3681 {
-
3682#if SET_FILE_OP_TIMES
-
3683 m_atime = m_mtime = time_point::now();
-
3684#endif
-
3685 if (CHECK_STREAM_STATE && !ok()) _Unlikely_
-
3686 return *this;
-
3687 size_t end_offset = m_offset + sizeof(T);
-
3688 if (end_offset > m_reserved) {
-
3689 reserve(end_offset);
-
3690 if (!ok()) _Unlikely_
-
3691 return *this;
-
3692 }
-
3693 (*reinterpret_cast<T*>(m_data + m_offset)) = HE2LE(data);
-
3694 m_offset = end_offset;
-
3695 if (m_offset > m_size)
-
3696 m_size = m_offset;
-
3697#if !CHECK_STREAM_STATE
-
3698 m_state = state_t::ok;
-
3699#endif
-
3700 return *this;
-
3701 }
-
-
3702
-
3717 template <class T>
-
-
3718 memory_file& write_str(_In_z_ const T * data)
-
3719 {
-
3720#if SET_FILE_OP_TIMES
-
3721 m_atime = m_mtime = time_point::now();
-
3722#endif
-
3723 if (CHECK_STREAM_STATE && !ok()) _Unlikely_
-
3724 return *this;
-
3725 size_t num_chars = stdex::strlen(data);
-
3726 if (num_chars > UINT32_MAX)
-
3727 throw std::invalid_argument("string too long");
-
3728 size_t size_chars = num_chars * sizeof(T);
-
3729 size_t size = sizeof(uint32_t) + size_chars;
-
3730 size_t end_offset = m_offset + size;
-
3731 if (end_offset > m_reserved) {
-
3732 reserve(end_offset);
-
3733 if (!ok()) _Unlikely_
-
3734 return *this;
-
3735 }
-
3736 auto p = m_data + m_offset;
-
3737 *reinterpret_cast<uint32_t*>(p) = HE2LE((uint32_t)num_chars);
-
3738 memcpy(p + sizeof(uint32_t), data, size_chars);
-
3739 m_offset = end_offset;
-
3740 if (m_offset > m_size)
-
3741 m_size = m_offset;
-
3742#if !CHECK_STREAM_STATE
-
3743 m_state = state_t::ok;
-
3744#endif
-
3745 return *this;
-
3746 }
-
-
3747
-
3762 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
-
3763 memory_file& write_str(_In_ const std::basic_string<T, TR, AX>& data)
-
3764 {
-
3765#if SET_FILE_OP_TIMES
-
3766 m_atime = m_mtime = time_point::now();
-
3767#endif
-
3768 if (CHECK_STREAM_STATE && !ok()) _Unlikely_
-
3769 return *this;
-
3770 size_t num_chars = data.size();
-
3771 if (num_chars > UINT32_MAX)
-
3772 throw std::invalid_argument("string too long");
-
3773 size_t size_chars = num_chars * sizeof(T);
-
3774 size_t size = sizeof(uint32_t) + size_chars;
-
3775 size_t end_offset = m_offset + size;
-
3776 if (end_offset > m_reserved) {
-
3777 reserve(end_offset);
-
3778 if (!ok()) _Unlikely_
-
3779 return *this;
-
3780 }
-
3781 auto p = m_data + m_offset;
-
3782 *reinterpret_cast<uint32_t*>(p) = HE2LE((uint32_t)num_chars);
-
3783 memcpy(p + sizeof(uint32_t), data.data(), size_chars);
-
3784 m_offset = end_offset;
-
3785 if (m_offset > m_size)
-
3786 m_size = m_offset;
-
3787#if !CHECK_STREAM_STATE
-
3788 m_state = state_t::ok;
-
3789#endif
-
3790 return *this;
-
3791 }
-
-
3792
-
-
3798 size_t write_stream(_Inout_ basic & stream, _In_ size_t amount = SIZE_MAX)
-
3799 {
-
3800#if SET_FILE_OP_TIMES
-
3801 m_atime = m_mtime = time_point::now();
-
3802#endif
-
3803 size_t num_read, dst_offset = m_offset, dst_size = m_offset;
-
3804 size_t num_copied = 0, to_write = amount;
-
3805 m_state = state_t::ok;
-
3806 if (amount != SIZE_MAX) {
-
3807 dst_size = stdex::add(dst_size, amount);
-
3808 reserve(dst_size);
-
3809 if (!ok()) _Unlikely_
-
3810 return 0;
-
3811 while (to_write) {
-
3812 num_read = stream.read(m_data + dst_offset, to_write);
-
3813 dst_size = dst_offset += num_read;
-
3814 num_copied += num_read;
-
3815 to_write -= num_read;
-
3816 if (!stream.ok()) {
-
3817 if (stream.state() != state_t::eof)
-
3818 m_state = state_t::fail;
-
3819 break;
-
3820 }
-
3821 };
-
3822 }
-
3823 else {
-
3824 size_t block_size;
-
3825 while (to_write) {
-
3826 block_size = std::min(to_write, default_block_size);
-
3827 dst_size = stdex::add(dst_size, block_size);
-
3828 reserve(dst_size);
-
3829 if (!ok()) _Unlikely_
-
3830 break;
-
3831 num_read = stream.read(m_data + dst_offset, block_size);
-
3832 dst_size = dst_offset += num_read;
-
3833 num_copied += num_read;
-
3834 to_write -= num_read;
-
3835 if (!stream.ok()) {
-
3836 if (stream.state() != state_t::eof)
-
3837 m_state = state_t::fail;
-
3838 break;
-
3839 }
-
3840 };
-
3841 }
-
3842 m_offset = dst_offset;
-
3843 if (m_offset > m_size)
-
3844 m_size = m_offset;
-
3845 return num_copied;
-
3846 }
-
-
3847
-
-
3848 virtual void close()
-
3849 {
-
3850 if (m_manage && m_data)
-
3851 free(m_data);
-
3852 m_data = nullptr;
-
3853 m_manage = true;
-
3854 m_offset = 0;
-
3855 m_size = m_reserved = 0;
-
3856#if SET_FILE_OP_TIMES
-
3857 m_ctime = m_atime = m_mtime = time_point::min();
-
3858#endif
-
3859 m_state = state_t::ok;
-
3860 }
-
-
3861
-
-
3862 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
-
3863 {
-
3864 fpos_t target;
-
3865 switch (how) {
-
3866 case seek_t::beg: target = offset; break;
-
3867 case seek_t::cur: target = static_cast<fpos_t>(m_offset) + offset; break;
-
3868 case seek_t::end: target = static_cast<fpos_t>(m_size) + offset; break;
-
3869 default: throw std::invalid_argument("unknown seek origin");
-
3870 }
-
3871 if (target <= SIZE_MAX) {
-
3872 m_state = state_t::ok;
-
3873 return m_offset = static_cast<size_t>(target);
-
3874 }
-
3875 m_state = state_t::fail;
-
3876 return fpos_max;
-
3877 }
-
-
3878
-
-
3879 virtual fpos_t tell() const
-
3880 {
-
3881 return m_offset;
-
3882 }
-
-
3883
-
-
3884 virtual fsize_t size() const
-
3885 {
-
3886 return m_size;
-
3887 }
-
-
3888
-
-
3889 virtual void truncate()
-
3890 {
-
3891#if SET_FILE_OP_TIMES
-
3892 m_atime = m_mtime = time_point::now();
-
3893#endif
-
3894 m_size = m_offset;
- -
3896 }
-
-
3897
-
3898#if SET_FILE_OP_TIMES
-
3899 virtual time_point ctime() const
-
3900 {
-
3901 return m_ctime;
-
3902 }
-
3903
-
3904 virtual time_point atime() const
-
3905 {
-
3906 return m_atime;
-
3907 }
-
3908
-
3909 virtual time_point mtime() const
-
3910 {
-
3911 return m_mtime;
-
3912 }
-
3913
-
3914 virtual void set_ctime(time_point date)
-
3915 {
-
3916 m_ctime = date;
-
3917 }
-
3918
-
3919 virtual void set_atime(time_point date)
-
3920 {
-
3921 m_atime = date;
-
3922 }
-
3923
-
3924 virtual void set_mtime(time_point date)
-
3925 {
-
3926 m_mtime = date;
-
3927 }
-
3928#endif
-
3929
-
3930 protected:
-
3938 template <class T>
-
-
3939 void set(_In_ fpos_t offset, _In_ const T data)
-
3940 {
-
3941#if SET_FILE_OP_TIMES
-
3942 m_atime = m_mtime = time_point::now();
-
3943#endif
-
3944 _Assume_(offset + sizeof(T) < m_size);
-
3945 (*reinterpret_cast<T*>(m_data + offset)) = HE2LE(data);
-
3946 }
-
-
3947
-
3948 public:
-
3949 void set(_In_ fpos_t offset, _In_ const int8_t data) { set<int8_t>(offset, data); }
-
3950 void set(_In_ fpos_t offset, _In_ const int16_t data) { set<int16_t>(offset, data); }
-
3951 void set(_In_ fpos_t offset, _In_ const int32_t data) { set<int32_t>(offset, data); }
-
3952 void set(_In_ fpos_t offset, _In_ const int64_t data) { set<int64_t>(offset, data); }
-
3953 void set(_In_ fpos_t offset, _In_ const uint8_t data) { set<uint8_t>(offset, data); }
-
3954 void set(_In_ fpos_t offset, _In_ const uint16_t data) { set<uint16_t>(offset, data); }
-
3955 void set(_In_ fpos_t offset, _In_ const uint32_t data) { set<uint32_t>(offset, data); }
-
3956 void set(_In_ fpos_t offset, _In_ const uint64_t data) { set<uint64_t>(offset, data); }
-
3957 void set(_In_ fpos_t offset, _In_ const float data) { set<float>(offset, data); }
-
3958 void set(_In_ fpos_t offset, _In_ const double data) { set<double>(offset, data); }
-
3959 void set(_In_ fpos_t offset, _In_ const char data) { set<char>(offset, data); }
-
3960#ifdef _NATIVE_WCHAR_T_DEFINED
-
3961 void set(_In_ fpos_t offset, _In_ const wchar_t data) { set<wchar_t>(offset, data); }
-
3962#endif
-
3963
-
3971 protected:
-
3972 template <class T>
-
-
3973 void get(_In_ fpos_t offset, _Out_ T & data)
-
3974 {
-
3975 _Assume_(offset + sizeof(T) < m_size);
-
3976 data = LE2HE(*(T*)(m_data + offset));
-
3977#if SET_FILE_OP_TIMES
-
3978 m_atime = time_point::now();
-
3979#endif
-
3980 }
-
-
3981
-
3982 public:
-
3983 void get(_In_ fpos_t offset, _Out_ int8_t & data) { get<int8_t>(offset, data); }
-
3984 void get(_In_ fpos_t offset, _Out_ int16_t & data) { get<int16_t>(offset, data); }
-
3985 void get(_In_ fpos_t offset, _Out_ int32_t & data) { get<int32_t>(offset, data); }
-
3986 void get(_In_ fpos_t offset, _Out_ int64_t & data) { get<int64_t>(offset, data); }
-
3987 void get(_In_ fpos_t offset, _Out_ uint8_t & data) { get<uint8_t>(offset, data); }
-
3988 void get(_In_ fpos_t offset, _Out_ uint16_t & data) { get<uint16_t>(offset, data); }
-
3989 void get(_In_ fpos_t offset, _Out_ uint32_t & data) { get<uint32_t>(offset, data); }
-
3990 void get(_In_ fpos_t offset, _Out_ uint64_t & data) { get<uint64_t>(offset, data); }
-
3991 void get(_In_ fpos_t offset, _Out_ float& data) { get<float>(offset, data); }
-
3992 void get(_In_ fpos_t offset, _Out_ double& data) { get<double>(offset, data); }
-
3993 void get(_In_ fpos_t offset, _Out_ char& data) { get<char>(offset, data); }
-
3994#ifdef _NATIVE_WCHAR_T_DEFINED
-
3995 void get(_In_ fpos_t offset, _Out_ wchar_t& data) { get<wchar_t>(offset, data); }
-
3996#endif
-
3997
-
3998 memory_file& operator <<(_In_ const int8_t data) { return write_data(data); }
-
3999 memory_file& operator >>(_Out_ int8_t & data) { return read_data(data); }
-
4000 memory_file& operator <<(_In_ const int16_t data) { return write_data(data); }
-
4001 memory_file& operator >>(_Out_ int16_t & data) { return read_data(data); }
-
4002 memory_file& operator <<(_In_ const int32_t data) { return write_data(data); }
-
4003 memory_file& operator >>(_Out_ int32_t & data) { return read_data(data); }
-
4004 memory_file& operator <<(_In_ const int64_t data) { return write_data(data); }
-
4005 memory_file& operator >>(_Out_ int64_t & data) { return read_data(data); }
-
4006 memory_file& operator <<(_In_ const uint8_t data) { return write_data(data); }
-
4007 memory_file& operator >>(_Out_ uint8_t & data) { return read_data(data); }
-
4008 memory_file& operator <<(_In_ const uint16_t data) { return write_data(data); }
-
4009 memory_file& operator >>(_Out_ uint16_t & data) { return read_data(data); }
-
4010 memory_file& operator <<(_In_ const uint32_t data) { return write_data(data); }
-
4011 memory_file& operator >>(_Out_ uint32_t & data) { return read_data(data); }
-
4012 memory_file& operator <<(_In_ const uint64_t data) { return write_data(data); }
-
4013 memory_file& operator >>(_Out_ uint64_t & data) { return read_data(data); }
-
4014 memory_file& operator <<(_In_ const float data) { return write_data(data); }
-
4015 memory_file& operator >>(_Out_ float& data) { return read_data(data); }
-
4016 memory_file& operator <<(_In_ const double data) { return write_data(data); }
-
4017 memory_file& operator >>(_Out_ double& data) { return read_data(data); }
-
4018 memory_file& operator <<(_In_ const char data) { return write_data(data); }
-
4019 memory_file& operator >>(_Out_ char& data) { return read_data(data); }
-
4020#ifdef _NATIVE_WCHAR_T_DEFINED
-
4021 memory_file& operator <<(_In_ const wchar_t data) { return write_data(data); }
-
4022 memory_file& operator >>(_Out_ wchar_t& data) { return read_data(data); }
-
4023#endif
-
4024 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
4025 memory_file& operator >>(_Out_ std::basic_string<T, TR, AX>&data) { return read_str(data); }
-
4026 template <class T>
-
4027 memory_file& operator <<(_In_ const T * data) { return write_str(data); }
-
4028 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
4029 memory_file& operator <<(_In_ const std::basic_string<T, TR, AX>& data) { return write_str(data); }
-
4030
-
4031 protected:
-
4032 uint8_t* m_data;
- -
4034 size_t m_offset;
-
4035 size_t m_size;
-
4036 size_t m_reserved;
-
4037#if SET_FILE_OP_TIMES
-
4038 time_point
-
4039 m_ctime,
-
4040 m_atime,
-
4041 m_mtime;
-
4042#endif
-
4043 };
-
-
4044
-
-
4048 class fifo : public basic {
-
4049 public:
-
4050 fifo() :
-
4051 m_offset(0),
-
4052 m_size(0),
-
4053 m_head(nullptr),
-
4054 m_tail(nullptr)
-
4055 {}
-
4056
-
4057 virtual ~fifo()
-
4058 {
-
4059 while (m_head) {
-
4060 auto p = m_head;
-
4061 m_head = p->next;
-
4062 delete p;
-
4063 }
-
4064 }
-
4065
-
4066#pragma warning(suppress: 6101) // See [2] below
-
-
4067 virtual _Success_(return != 0 || length == 0) size_t read(
-
4068 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
4069 {
-
4070 _Assume_(data || !length);
-
4071 for (size_t to_read = length;;) {
-
4072 if (!m_head) _Unlikely_ {
-
4073 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
-
4074 return length - to_read; // [2] Code analysis misses `length - to_read` bytes were written to data in previous loop iterations.
-
4075 }
-
4076 size_t remaining = m_head->size - m_offset;
-
4077 if (remaining > to_read) {
-
4078 memcpy(data, m_head->data + m_offset, to_read);
-
4079 m_offset += to_read;
-
4080 m_size -= to_read;
-
4081 m_state = state_t::ok;
-
4082 return length;
-
4083 }
-
4084 memcpy(data, m_head->data + m_offset, remaining);
-
4085 m_offset = 0;
-
4086 m_size -= remaining;
-
4087 reinterpret_cast<uint8_t*&>(data) += remaining;
-
4088 to_read -= remaining;
-
4089 auto p = m_head;
-
4090 m_head = p->next;
-
4091 delete p;
-
4092 }
-
4093 }
-
-
4094
-
-
4095 virtual _Success_(return != 0) size_t write(
-
4096 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
4097 {
-
4098 _Assume_(data || !length);
-
4099 try {
-
4100 std::unique_ptr<node_t> n(reinterpret_cast<node_t*>(new uint8_t[sizeof(node_t) + length]));
-
4101 n->next = nullptr;
-
4102 n->size = length;
-
4103 memcpy(n->data, data, length);
-
4104 m_size += length;
-
4105 if (m_head)
-
4106 m_tail = m_tail->next = n.release();
-
4107 else
-
4108 m_head = m_tail = n.release();
-
4109 m_state = state_t::ok;
-
4110 return length;
-
4111 }
-
4112 catch (const std::bad_alloc&) {
-
4113 m_state = state_t::fail;
-
4114 return 0;
-
4115 }
-
4116 }
-
-
4117
-
-
4118 virtual void close()
-
4119 {
-
4120 m_size = m_offset = 0;
-
4121 while (m_head) {
-
4122 auto p = m_head;
-
4123 m_head = p->next;
-
4124 delete p;
-
4125 }
-
4126 m_state = state_t::ok;
-
4127 }
-
-
4128
-
4132 size_t size() const { return m_size; };
-
4133
-
4134 protected:
-
4135 size_t m_offset, m_size;
-
-
4136 struct node_t {
-
4137 node_t* next;
-
4138 size_t size;
-
4139#pragma warning(suppress:4200)
-
4140 uint8_t data[0];
-
4141 } *m_head, * m_tail;
-
-
4142 };
-
-
4143
-
-
4147 class diag_file : public basic_file {
-
4148 public:
-
4149 diag_file(_In_count_(num_files) basic_file* const* files, _In_ size_t num_files) :
-
4150 basic(num_files ? files[0]->state() : state_t::fail),
-
4151 m_files(files, files + num_files)
-
4152 {}
-
4153
-
-
4154 virtual _Success_(return != 0 || length == 0) size_t read(
-
4155 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
4156 {
-
4157 _Assume_(data || !length);
-
4158 if (m_files.empty()) {
-
4159 m_state = state_t::fail;
-
4160 return 0;
-
4161 }
-
4162 size_t result = m_files[0]->read(data, length);
-
4163 _Assume_(result <= length);
-
4164 m_state = m_files[0]->state();
-
4165 if (length > m_tmp.size())
-
4166 m_tmp.resize(length);
-
4167 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
4168 if (m_files[i]->read(m_tmp.data(), length) != result ||
-
4169 memcmp(m_tmp.data(), data, result))
-
4170 throw std::runtime_error("read mismatch");
-
4171 if (m_files[i]->state() != m_state)
-
4172 throw std::runtime_error("state mismatch");
-
4173 }
-
4174 return result;
-
4175 }
-
-
4176
-
-
4177 virtual _Success_(return != 0) size_t write(
-
4178 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
4179 {
-
4180 if (m_files.empty()) {
-
4181 m_state = state_t::fail;
-
4182 return 0;
-
4183 }
-
4184 size_t result = m_files[0]->write(data, length);
-
4185 m_state = m_files[0]->state();
-
4186 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
4187 if (m_files[i]->write(data, length) != result)
-
4188 throw std::runtime_error("write mismatch");
-
4189 if (m_files[i]->state() != m_state)
-
4190 throw std::runtime_error("state mismatch");
-
4191 }
-
4192 return result;
-
4193 }
-
-
4194
-
-
4195 virtual void flush()
-
4196 {
-
4197 if (m_files.empty()) {
-
4198 m_state = state_t::ok;
-
4199 return;
-
4200 }
-
4201 m_files[0]->flush();
-
4202 m_state = m_files[0]->state();
-
4203 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
4204 m_files[i]->flush();
-
4205 if (m_files[i]->state() != m_state)
-
4206 throw std::runtime_error("state mismatch");
-
4207 }
-
4208 }
-
-
4209
-
-
4210 virtual void close()
-
4211 {
-
4212 if (m_files.empty()) {
-
4213 m_state = state_t::ok;
-
4214 return;
-
4215 }
-
4216 m_files[0]->close();
-
4217 m_state = m_files[0]->state();
-
4218 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
4219 m_files[i]->close();
-
4220 if (m_files[i]->state() != m_state)
-
4221 throw std::runtime_error("state mismatch");
-
4222 }
-
4223 m_tmp.clear();
-
4224 m_tmp.shrink_to_fit();
-
4225 }
-
-
4226
-
-
4227 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
-
4228 {
-
4229 if (m_files.empty()) {
-
4230 m_state = state_t::fail;
-
4231 return fpos_max;
-
4232 }
-
4233 fpos_t result = m_files[0]->seek(offset, how);
-
4234 m_state = m_files[0]->state();
-
4235 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
4236 if (m_files[i]->seek(offset, how) != result)
-
4237 throw std::runtime_error("seek mismatch");
-
4238 if (m_files[i]->state() != m_state)
-
4239 throw std::runtime_error("state mismatch");
-
4240 }
-
4241 return result;
-
4242 }
-
-
4243
-
-
4244 virtual fpos_t tell() const
-
4245 {
-
4246 if (m_files.empty())
-
4247 return fpos_max;
-
4248 fpos_t result = m_files[0]->tell();
-
4249 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
4250 if (m_files[i]->tell() != result)
-
4251 throw std::runtime_error("tell mismatch");
-
4252 }
-
4253 return result;
-
4254 }
-
-
4255
-
-
4256 virtual void lock(_In_ fpos_t offset, _In_ fsize_t length)
-
4257 {
-
4258 if (m_files.empty())
-
4259 m_state = state_t::fail;
-
4260 m_files[0]->lock(offset, length);
-
4261 m_state = m_files[0]->state();
-
4262 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
4263 m_files[i]->lock(offset, length);
-
4264 if (m_files[i]->state() != m_state)
-
4265 throw std::runtime_error("state mismatch");
-
4266 }
-
4267 }
-
-
4268
-
-
4269 virtual void unlock(_In_ fpos_t offset, _In_ fsize_t length)
-
4270 {
-
4271 if (m_files.empty())
-
4272 m_state = state_t::fail;
-
4273 m_files[0]->unlock(offset, length);
-
4274 m_state = m_files[0]->state();
-
4275 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
4276 m_files[i]->unlock(offset, length);
-
4277 if (m_files[i]->state() != m_state)
-
4278 throw std::runtime_error("state mismatch");
-
4279 }
-
4280 }
-
-
4281
-
-
4282 virtual fsize_t size() const
-
4283 {
-
4284 if (m_files.empty())
-
4285 return fsize_max;
-
4286 fsize_t result = m_files[0]->size();
-
4287 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
4288 if (m_files[i]->size() != result)
-
4289 throw std::runtime_error("size mismatch");
-
4290 }
-
4291 return result;
-
4292 }
-
-
4293
-
-
4294 virtual void truncate()
-
4295 {
-
4296 if (m_files.empty())
-
4297 m_state = state_t::fail;
-
4298 m_files[0]->truncate();
-
4299 m_state = m_files[0]->state();
-
4300 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
4301 m_files[i]->truncate();
-
4302 if (m_files[i]->state() != m_state)
-
4303 throw std::runtime_error("state mismatch");
-
4304 }
-
4305 }
-
-
4306
-
4307 protected:
-
4308 std::vector<basic_file*> m_files;
-
4309 std::vector<uint8_t> m_tmp;
-
4310 };
-
-
4311 }
-
4312}
+
2677 inherit_handle = 1 << 11,
+
2678
+
2679 hint_write_thru = 1 << 12,
+
2680 hint_no_buffering = 1 << 13,
+
2681 hint_random_access = 1 << 14,
+
2682 hint_sequential_access = 1 << 15,
+
2683 };
+
2684
+
2685#pragma warning(push)
+
2686#pragma warning(disable: 4250)
+
+
2690 class file : virtual public basic_file, virtual public basic_sys
+
2691 {
+
2692 public:
+
2693 file(_In_opt_ sys_handle h = invalid_handle, _In_ state_t state = state_t::ok) : basic_sys(h, state) {}
+
2694
+
+
2701 file(_In_z_ const schar_t* filename, _In_ int mode)
+
2702 {
+
2703 open(filename, mode);
+
2704 }
+
+
2705
+
2712 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
+
2713 file(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode) : file(filename.c_str(), mode) {}
+
2714
+
+
2721 void open(_In_z_ const schar_t* filename, _In_ int mode)
+
2722 {
+
2723 if (m_h != invalid_handle)
+
2724 close();
+
2725
+
2726#ifdef _WIN32
+
2727 DWORD dwDesiredAccess = 0;
+
2728 if (mode & mode_for_reading) dwDesiredAccess |= GENERIC_READ;
+
2729 if (mode & mode_for_writing) dwDesiredAccess |= GENERIC_WRITE;
+
2730 if (mode & mode_for_chmod) dwDesiredAccess |= FILE_WRITE_ATTRIBUTES;
+
2731
+
2732 DWORD dwShareMode = 0;
+
2733 if (mode & share_reading) dwShareMode |= FILE_SHARE_READ;
+
2734 if (mode & share_writing) dwShareMode |= FILE_SHARE_WRITE;
+
2735 if (mode & share_deleting) dwShareMode |= FILE_SHARE_DELETE;
+
2736
+
2737 SECURITY_ATTRIBUTES sa = { sizeof(SECURITY_ATTRIBUTES) };
+
2738 sa.bInheritHandle = mode & inherit_handle ? true : false;
+
2739
+
2740 DWORD dwCreationDisposition;
+
2741 switch (mode & mode_disposition_mask) {
+
2742 case mode_open_existing: dwCreationDisposition = OPEN_EXISTING; break;
+
2743 case mode_truncate_existing: dwCreationDisposition = TRUNCATE_EXISTING; break;
+
2744 case mode_preserve_existing: dwCreationDisposition = OPEN_ALWAYS; break;
+
2745 case mode_create_new: dwCreationDisposition = CREATE_NEW; break;
+
2746 case mode_create: dwCreationDisposition = CREATE_ALWAYS; break;
+
2747 default: throw std::invalid_argument("invalid mode");
+
2748 }
+
2749
+
2750 DWORD dwFlagsAndAttributes = FILE_ATTRIBUTE_NORMAL;
+
2751 if (mode & hint_write_thru) dwFlagsAndAttributes |= FILE_FLAG_WRITE_THROUGH;
+
2752 if (mode & hint_no_buffering) dwFlagsAndAttributes |= FILE_FLAG_NO_BUFFERING;
+
2753 if (mode & hint_random_access) dwFlagsAndAttributes |= FILE_FLAG_RANDOM_ACCESS;
+
2754 if (mode & hint_sequential_access) dwFlagsAndAttributes |= FILE_FLAG_SEQUENTIAL_SCAN;
+
2755
+
2756 m_h = CreateFile(filename, dwDesiredAccess, dwShareMode, &sa, dwCreationDisposition, dwFlagsAndAttributes, NULL);
+
2757#else
+
2758 int flags = 0;
+
2759 switch (mode & (mode_for_reading | mode_for_writing)) {
+
2760 case mode_for_reading: flags |= O_RDONLY; break;
+
2761 case mode_for_writing: flags |= O_WRONLY; break;
+
2762 case mode_for_reading | mode_for_writing: flags |= O_RDWR; break;
+
2763 }
+
2764 switch (mode & mode_disposition_mask) {
+
2765 case mode_open_existing: break;
+
2766 case mode_truncate_existing: flags |= O_TRUNC; break;
+
2767 case mode_preserve_existing: flags |= O_CREAT; break;
+
2768 case mode_create_new: flags |= O_CREAT | O_EXCL; break;
+
2769 case mode_create: flags |= O_CREAT | O_TRUNC; break;
+
2770 default: throw std::invalid_argument("invalid mode");
+
2771 }
+
2772 if (mode & hint_write_thru) flags |= O_DSYNC;
+
2773#ifndef __APPLE__
+
2774 if (mode & hint_no_buffering) flags |= O_RSYNC;
+
2775#endif
+
2776
+
2777 m_h = ::open(filename, flags, DEFFILEMODE);
+
2778#endif
+
2779 if (m_h != invalid_handle) {
+
2780 m_state = state_t::ok;
+
2781 if (mode & mode_append)
+
2782 seek(0, seek_t::end);
+
2783 }
+
2784 else
+
2785 m_state = state_t::fail;
+
2786 }
+
+
2787
+
2794 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
+
+
2795 void open(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode)
+
2796 {
+
2797 open(filename.c_str(), mode);
+
2798 }
+
+
2799
+
+
2800 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
+
2801 {
+
2802#ifdef _WIN32
+
2803 LARGE_INTEGER li;
+
2804 li.QuadPart = offset;
+
2805 li.LowPart = SetFilePointer(m_h, li.LowPart, &li.HighPart, static_cast<DWORD>(how));
+
2806 if (li.LowPart != 0xFFFFFFFF || GetLastError() == NO_ERROR) {
+
2807 m_state = state_t::ok;
+
2808 return li.QuadPart;
+
2809 }
+
2810#else
+
2811 off64_t result = lseek64(m_h, offset, static_cast<int>(how));
+
2812 if (result >= 0) {
+
2813 m_state = state_t::ok;
+
2814 return result;
+
2815 }
+
2816#endif
+
2817 m_state = state_t::fail;
+
2818 return fpos_max;
+
2819 }
+
+
2820
+
+
2821 virtual fpos_t tell() const
+
2822 {
+
2823 if (m_h != invalid_handle) {
+
2824#ifdef _WIN32
+
2825 LARGE_INTEGER li;
+
2826 li.QuadPart = 0;
+
2827 li.LowPart = SetFilePointer(m_h, 0, &li.HighPart, FILE_CURRENT);
+
2828 if (li.LowPart != 0xFFFFFFFF || GetLastError() == NO_ERROR)
+
2829 return li.QuadPart;
+
2830#else
+
2831 off64_t result = lseek64(m_h, 0, SEEK_CUR);
+
2832 if (result >= 0)
+
2833 return result;
+
2834#endif
+
2835 }
+
2836 return fpos_max;
+
2837 }
+
+
2838
+
+
2839 virtual void lock(_In_ fpos_t offset, _In_ fsize_t length)
+
2840 {
+
2841#ifdef _WIN32
+
2842 LARGE_INTEGER liOffset;
+
2843 LARGE_INTEGER liSize;
+
2844 liOffset.QuadPart = offset;
+
2845 liSize.QuadPart = length;
+
2846 if (LockFile(m_h, liOffset.LowPart, liOffset.HighPart, liSize.LowPart, liSize.HighPart)) {
+
2847 m_state = state_t::ok;
+
2848 return;
+
2849 }
+
2850#else
+
2851 off64_t orig = lseek64(m_h, 0, SEEK_CUR);
+
2852 if (orig >= 0) {
+
2853 m_state = lseek64(m_h, offset, SEEK_SET) >= 0 && lockf64(m_h, F_LOCK, length) >= 0 ? state_t::ok : state_t::fail;
+
2854 lseek64(m_h, orig, SEEK_SET);
+
2855 m_state = state_t::ok;
+
2856 return;
+
2857 }
+
2858#endif
+
2859 m_state = state_t::fail;
+
2860 }
+
+
2861
+
+
2862 virtual void unlock(_In_ fpos_t offset, _In_ fsize_t length)
+
2863 {
+
2864#ifdef _WIN32
+
2865 LARGE_INTEGER liOffset;
+
2866 LARGE_INTEGER liSize;
+
2867 liOffset.QuadPart = offset;
+
2868 liSize.QuadPart = length;
+
2869 if (UnlockFile(m_h, liOffset.LowPart, liOffset.HighPart, liSize.LowPart, liSize.HighPart)) {
+
2870 m_state = state_t::ok;
+
2871 return;
+
2872 }
+
2873#else
+
2874 off64_t orig = lseek64(m_h, 0, SEEK_CUR);
+
2875 if (orig >= 0) {
+
2876 if (lseek64(m_h, offset, SEEK_SET) >= 0 && lockf64(m_h, F_ULOCK, length) >= 0) {
+
2877 lseek64(m_h, orig, SEEK_SET);
+
2878 m_state = state_t::ok;
+
2879 return;
+
2880 }
+
2881 lseek64(m_h, orig, SEEK_SET);
+
2882 }
+
2883#endif
+
2884 m_state = state_t::fail;
+
2885 }
+
+
2886
+
+
2887 virtual fsize_t size() const
+
2888 {
+
2889#ifdef _WIN32
+
2890 LARGE_INTEGER li;
+
2891 li.LowPart = GetFileSize(m_h, (LPDWORD)&li.HighPart);
+
2892 if (li.LowPart == 0xFFFFFFFF && GetLastError() != NO_ERROR)
+
2893 li.QuadPart = -1;
+
2894 return li.QuadPart;
+
2895#else
+
2896 off64_t length = -1, orig = lseek64(m_h, 0, SEEK_CUR);
+
2897 if (orig >= 0) {
+
2898 length = lseek64(m_h, 0, SEEK_END);
+
2899 lseek64(m_h, orig, SEEK_SET);
+
2900 }
+
2901 return length;
+
2902#endif
+
2903 }
+
+
2904
+
+
2905 virtual void truncate()
+
2906 {
+
2907#ifdef _WIN32
+
2908 if (SetEndOfFile(m_h)) {
+
2909 m_state = state_t::ok;
+
2910 return;
+
2911 }
+
2912#else
+
2913 off64_t length = lseek64(m_h, 0, SEEK_CUR);
+
2914 if (length >= 0 && ftruncate64(m_h, length) >= 0) {
+
2915 m_state = state_t::ok;
+
2916 return;
+
2917 }
+
2918#endif
+
2919 m_state = state_t::fail;
+
2920 }
+
+
2921
+
2922#ifdef _WIN32
+
2923 static time_point ft2tp(_In_ const FILETIME& ft)
+
2924 {
+
2925#if _HAS_CXX20
+
2926 uint64_t t = (static_cast<int64_t>(ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
+
2927#else
+
2928 uint64_t t = ((static_cast<int64_t>(ft.dwHighDateTime) << 32) | ft.dwLowDateTime) - 116444736000000000ll;
+
2929#endif
+
2930 return time_point(time_point::duration(t));
+
2931 }
+
2932
+
2933 static void tp2ft(_In_ time_point tp, _Out_ FILETIME& ft)
+
2934 {
+
2935#if _HAS_CXX20
+
2936 uint64_t t = tp.time_since_epoch().count();
+
2937#else
+
2938 uint64_t t = tp.time_since_epoch().count() + 116444736000000000ll;
+
2939#endif
+
2940 ft.dwHighDateTime = static_cast<DWORD>((t >> 32) & 0xffffffff);
+
2941 ft.dwLowDateTime = static_cast<DWORD>(t & 0xffffffff);
+
2942 }
+
2943#endif
+
2944
+
+
2945 virtual time_point ctime() const
+
2946 {
+
2947#ifdef _WIN32
+
2948 FILETIME ft;
+
2949 if (GetFileTime(m_h, &ft, nullptr, nullptr))
+
2950 return ft2tp(ft);
+
2951#endif
+
2952 return time_point::min();
+
2953 }
+
+
2954
+
+
2955 virtual time_point atime() const
+
2956 {
+
2957#ifdef _WIN32
+
2958 FILETIME ft;
+
2959 if (GetFileTime(m_h, nullptr, &ft, nullptr))
+
2960 return ft2tp(ft);
+
2961#else
+
2962 struct stat buf;
+
2963 if (fstat(m_h, &buf) >= 0)
+
2964 return clock::from_time_t(buf.st_atime);
+
2965#endif
+
2966 return time_point::min();
+
2967 }
+
+
2968
+
+
2969 virtual time_point mtime() const
+
2970 {
+
2971#ifdef _WIN32
+
2972 FILETIME ft;
+
2973 if (GetFileTime(m_h, nullptr, nullptr, &ft))
+
2974 return ft2tp(ft);
+
2975#else
+
2976 struct stat buf;
+
2977 if (fstat(m_h, &buf) >= 0)
+
2978 return clock::from_time_t(buf.st_mtime);
+
2979#endif
+
2980 return time_point::min();
+
2981 }
+
+
2982
+
+
2983 virtual void set_ctime(time_point date)
+
2984 {
+
2985 _Assume_(m_h != invalid_handle);
+
2986#ifdef _WIN32
+
2987 FILETIME ft;
+
2988 tp2ft(date, ft);
+
2989 if (SetFileTime(m_h, &ft, nullptr, nullptr))
+
2990 return;
+
2991 throw std::system_error(GetLastError(), std::system_category(), "SetFileTime failed");
+
2992#else
+
2993 throw std::runtime_error("not supported");
+
2994#endif
+
2995 }
+
+
2996
+
+
2997 virtual void set_atime(time_point date)
+
2998 {
+
2999 _Assume_(m_h != invalid_handle);
+
3000#ifdef _WIN32
+
3001 FILETIME ft;
+
3002 tp2ft(date, ft);
+
3003 if (SetFileTime(m_h, nullptr, &ft, nullptr))
+
3004 return;
+
3005 throw std::system_error(GetLastError(), std::system_category(), "SetFileTime failed");
+
3006#else
+
3007 struct timespec ts[2] = {
+
3008 { date.time_since_epoch().count(), 0 },
+
3009 { 0, UTIME_OMIT },
+
3010 };
+
3011 if (futimens(m_h, ts) >= 0)
+
3012 return;
+
3013 throw std::system_error(errno, std::system_category(), "futimens failed");
+
3014#endif
+
3015 }
+
+
3016
+
+
3017 virtual void set_mtime(time_point date)
+
3018 {
+
3019#ifdef _WIN32
+
3020 FILETIME ft;
+
3021 tp2ft(date, ft);
+
3022 if (SetFileTime(m_h, nullptr, nullptr, &ft))
+
3023 return;
+
3024 throw std::system_error(GetLastError(), std::system_category(), "SetFileTime failed");
+
3025#else
+
3026 struct timespec ts[2] = {
+
3027 { 0, UTIME_OMIT },
+
3028 { date.time_since_epoch().count(), 0 },
+
3029 };
+
3030 if (futimens(m_h, ts) >= 0)
+
3031 return;
+
3032 throw std::system_error(errno, std::system_category(), "futimens failed");
+
3033#endif
+
3034 }
+
+
3035
+
+
3041 static bool exists(_In_z_ const stdex::schar_t* filename)
+
3042 {
+
3043#ifdef _WIN32
+
3044 return GetFileAttributes(filename) != INVALID_FILE_ATTRIBUTES;
+
3045#else
+
3046 struct stat s;
+
3047 return stat(filename, &s) == 0;
+
3048#endif
+
3049 }
+
+
3050
+
3056 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
+
+
3057 static bool exists(_In_ const std::basic_string<TR, AX>& filename)
+
3058 {
+
3059 return exists(filename.c_str());
+
3060 }
+
+
3061
+
+
3069 static bool readonly(_In_z_ const stdex::schar_t* filename)
+
3070 {
+
3071#ifdef _WIN32
+
3072 DWORD dwAttr = GetFileAttributes(filename);
+
3073 return dwAttr != INVALID_FILE_ATTRIBUTES && (dwAttr & FILE_ATTRIBUTE_READONLY) != 0;
+
3074#else
+
3075 struct stat s;
+
3076 return stat(filename, &s) == 0 && (s.st_mode & (S_IWUSR|S_IWGRP|S_IWOTH)) == 0;
+
3077#endif
+
3078 }
+
+
3079
+
3087 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
+
+
3088 static bool readonly(_In_ const std::basic_string<TR, AX>& filename)
+
3089 {
+
3090 return readonly(filename.c_str());
+
3091 }
+
+
3092 };
+
+
3093#pragma warning(pop)
+
3094
+
+
3098 class cached_file : public cache
+
3099 {
+
3100 public:
+
3101 cached_file(_In_opt_ sys_handle h = invalid_handle, _In_ state_t state = state_t::ok, _In_ size_t cache_size = default_cache_size) :
+
3102 cache(cache_size),
+
3103 m_source(h, state)
+
3104 {
+
3105 init(m_source);
+
3106 }
+
3107
+
+
3115 cached_file(_In_z_ const schar_t* filename, _In_ int mode, _In_ size_t cache_size = default_cache_size) :
+
3116 cache(cache_size),
+
3117 m_source(filename, mode & mode_for_writing ? mode | mode_for_reading : mode)
+
3118 {
+
3119 init(m_source);
+
3120 }
+
+
3121
+
3129 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
+
3130 cached_file(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode, _In_ size_t cache_size = default_cache_size) : cached_file(filename.c_str(), mode, cache_size) {}
+
3131
+
3132 virtual ~cached_file()
+
3133 {
+
3134 done();
+
3135 }
+
3136
+
+
3143 void open(_In_z_ const schar_t* filename, _In_ int mode)
+
3144 {
+
3145 invalidate_cache();
+
3146 if (!ok()) _Unlikely_{
+
3147 m_state = state_t::fail;
+
3148 return;
+
3149 }
+
3150 m_source.open(filename, mode & mode_for_writing ? mode | mode_for_reading : mode);
+
3151 if (m_source.ok()) {
+
3152 init();
+
3153 return;
+
3154 }
+
3155 m_state = state_t::fail;
+
3156 }
+
+
3157
+
3164 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
+
+
3165 void open(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode)
+
3166 {
+
3167 open(filename.c_str(), mode);
+
3168 }
+
+
3169
+
3173 operator bool() const noexcept { return m_source; }
+
3174
+
3175 protected:
+
3176 file m_source;
+
3177 };
+
+
3178
+
+ +
3183 {
+
3184 public:
+
3185 memory_file(_In_ state_t state = state_t::ok) :
+
3186 basic(state),
+
3187 m_data(nullptr),
+
3188 m_offset(0),
+
3189 m_size(0),
+
3190 m_reserved(0),
+
3191 m_manage(true)
+
3192 {
+
3193#if SET_FILE_OP_TIMES
+
3194 m_ctime = m_atime = m_mtime = time_point::now();
+
3195#endif
+
3196 }
+
3197
+
+
3204 memory_file(_In_ size_t size, _In_ state_t state = state_t::ok) :
+
3205 basic(state),
+
3206 m_data(reinterpret_cast<uint8_t*>(malloc(size))),
+
3207 m_offset(0),
+
3208 m_size(0),
+ +
3210 m_manage(true)
+
3211 {
+
3212 if (!m_data) {
+
3213 m_state = state_t::fail;
+
3214 throw std::bad_alloc();
+
3215 }
+
3216#if SET_FILE_OP_TIMES
+
3217 m_ctime = m_atime = m_mtime = time_point::now();
+
3218#endif
+
3219 }
+
+
3220
+
+
3230 memory_file(_Inout_ void* data, _In_ size_t size, _In_ size_t reserved, _In_ bool manage = false, _In_ state_t state = state_t::ok) :
+
3231 basic(state),
+
3232 m_data(reinterpret_cast<uint8_t*>(data)),
+
3233 m_offset(0),
+
3234 m_size(size),
+
3235 m_reserved(reserved),
+
3236 m_manage(manage)
+
3237 {
+
3238 _Assume_(data || !size);
+
3239 _Assume_(reserved >= size);
+
3240#if SET_FILE_OP_TIMES
+
3241 m_ctime = m_atime = m_mtime = time_point::now();
+
3242#endif
+
3243 }
+
+
3244
+
+
3253 memory_file(_Inout_ void* data, _In_ size_t size, _In_ bool manage = false, _In_ state_t state = state_t::ok) :
+
3254 memory_file(data, size, size, manage, state)
+
3255 {}
+
+
3256
+
+
3263 memory_file(_In_z_ const schar_t* filename, _In_ int mode) : memory_file()
+
3264 {
+
3265 load(filename, mode);
+
3266 }
+
+
3267
+
3274 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
+
3275 memory_file(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode) : memory_file(filename.c_str(), mode) {}
+
3276
+
+
3282 memory_file(_In_ const memory_file& other) :
+
3283 basic_file(other),
+
3284 m_data(reinterpret_cast<uint8_t*>(malloc(other.m_size))),
+
3285 m_offset(other.m_offset),
+
3286 m_size(other.m_size),
+
3287 m_reserved(other.m_size),
+
3288 m_manage(true)
+
3289#if SET_FILE_OP_TIMES
+
3290 , m_ctime(other.m_ctime)
+
3291 , m_atime(other.m_atime)
+
3292 , m_mtime(other.m_mtime)
+
3293#endif
+
3294 {
+
3295 if (!m_data) {
+
3296 m_state = state_t::fail;
+
3297 throw std::bad_alloc();
+
3298 }
+
3299 memcpy(m_data, other.m_data, other.m_size);
+
3300 }
+
+
3301
+
+ +
3308 {
+
3309 if (this != std::addressof(other)) {
+
3310 *static_cast<basic_file*>(this) = other;
+
3311 if (m_manage && m_data)
+
3312 free(m_data);
+
3313 m_data = reinterpret_cast<uint8_t*>(malloc(other.m_size));
+
3314 if (!m_data) {
+
3315 m_state = state_t::fail;
+
3316 throw std::bad_alloc();
+
3317 }
+
3318 memcpy(m_data, other.m_data, other.m_size);
+
3319 m_offset = other.m_offset;
+
3320 m_size = other.m_size;
+
3321 m_reserved = other.m_size;
+
3322 m_manage = true;
+
3323#if SET_FILE_OP_TIMES
+
3324 m_ctime = other.m_ctime;
+
3325 m_atime = other.m_atime;
+
3326 m_mtime = other.m_mtime;
+
3327#endif
+
3328 }
+
3329 return *this;
+
3330 }
+
+
3331
+
+
3337 memory_file(_Inout_ memory_file&& other) noexcept :
+
3338 basic_file(std::move(other)),
+
3339 m_data(other.m_data),
+
3340 m_offset(other.m_offset),
+
3341 m_size(other.m_size),
+
3342 m_reserved(other.m_reserved),
+
3343 m_manage(other.m_manage)
+
3344#if SET_FILE_OP_TIMES
+
3345 , m_ctime(other.m_ctime)
+
3346 , m_atime(other.m_atime)
+
3347 , m_mtime(other.m_mtime)
+
3348#endif
+
3349 {
+
3350 other.m_state = state_t::ok;
+
3351 other.m_data = nullptr;
+
3352 other.m_offset = 0;
+
3353 other.m_size = 0;
+
3354 other.m_reserved = 0;
+
3355 other.m_manage = true;
+
3356#if SET_FILE_OP_TIMES
+
3357 other.m_ctime = other.m_atime = other.m_mtime = time_point::now();
+
3358#endif
+
3359 }
+
+
3360
+
+
3366 memory_file& operator=(_Inout_ memory_file&& other) noexcept
+
3367 {
+
3368 if (this != std::addressof(other)) {
+
3369 *static_cast<basic_file*>(this) = std::move(other);
+
3370 if (m_manage && m_data)
+
3371 free(m_data);
+
3372 m_data = other.m_data;
+
3373 other.m_data = nullptr;
+
3374 m_offset = other.m_offset;
+
3375 other.m_offset = 0;
+
3376 m_size = other.m_size;
+
3377 other.m_size = 0;
+
3378 m_reserved = other.m_reserved;
+
3379 other.m_reserved = 0;
+
3380 m_manage = other.m_manage;
+
3381 other.m_manage = true;
+
3382#if SET_FILE_OP_TIMES
+
3383 m_ctime = other.m_ctime;
+
3384 m_atime = other.m_atime;
+
3385 m_mtime = other.m_mtime;
+
3386 other.m_ctime = other.m_atime = other.m_mtime = time_point::now();
+
3387#endif
+
3388 }
+
3389 return *this;
+
3390 }
+
+
3391
+
3392 virtual ~memory_file()
+
3393 {
+
3394 if (m_manage && m_data)
+
3395 free(m_data);
+
3396 }
+
3397
+
+
3404 void reserve(_In_ size_t required, _In_ bool tight = false) noexcept
+
3405 {
+
3406 if (required <= m_reserved && (!tight || required >= m_reserved)) {
+
3407 m_state = state_t::ok;
+
3408 return;
+
3409 }
+
3410 if (!m_manage) {
+
3411 m_state = state_t::fail;
+
3412 return;
+
3413 }
+
3414 size_t reserved = tight ? required : ((required + required / 4 + (default_block_size - 1)) / default_block_size) * default_block_size;
+
3415 auto data = reinterpret_cast<uint8_t*>(realloc(m_data, reserved));
+
3416 if (!data && reserved) _Unlikely_ {
+
3417 m_state = state_t::fail;
+
3418 return;
+
3419 }
+
3420 m_data = data;
+
3421 if (reserved < m_size)
+
3422 m_size = reserved;
+
3423 m_reserved = reserved;
+
3424 m_state = state_t::ok;
+
3425 }
+
+
3426
+
+
3433 void load(_In_z_ const schar_t* filename, _In_ int mode)
+
3434 {
+
3435 file f(filename, (mode & ~hint_random_access) | mode_for_reading | hint_sequential_access);
+
3436 if (!f.ok()) {
+
3437 m_state = state_t::fail;
+
3438 return;
+
3439 }
+
3440 fsize_t size = f.size();
+
3441 if (size > SIZE_MAX) {
+
3442 m_state = state_t::fail;
+
3443 return;
+
3444 }
+
3445 reserve(static_cast<size_t>(size), true);
+
3446 if (!ok()) _Unlikely_ {
+
3447 return;
+
3448 }
+
3449 m_offset = m_size = 0;
+
3450 write_stream(f);
+
3451 if (ok())
+
3452 m_offset = 0;
+
3453#if SET_FILE_OP_TIMES
+
3454 m_ctime = f.ctime();
+
3455 m_atime = f.atime();
+
3456 m_mtime = f.mtime();
+
3457#endif
+
3458 }
+
+
3459
+
3466 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
+
+
3467 void load(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode)
+
3468 {
+
3469 load(filename.c_str(), mode);
+
3470 }
+
+
3471
+
+
3478 void save(_In_z_ const schar_t* filename, _In_ int mode)
+
3479 {
+
3480 file f(filename, (mode & ~hint_random_access) | mode_for_writing | hint_sequential_access);
+
3481 if (!f.ok()) {
+
3482 m_state = state_t::fail;
+
3483 return;
+
3484 }
+
3485 f.write(m_data, m_size);
+
3486 if (!f.ok()) {
+
3487 m_state = state_t::fail;
+
3488 return;
+
3489 }
+
3490 f.truncate();
+
3491#if SET_FILE_OP_TIMES
+
3492 f.set_ctime(m_ctime);
+
3493 f.set_atime(m_atime);
+
3494 f.set_mtime(m_mtime);
+
3495#endif
+
3496 }
+
+
3497
+
3504 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
+
+
3505 void save(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode)
+
3506 {
+
3507 save(filename.c_str(), mode);
+
3508 }
+
+
3509
+
3513 const void* data() const { return m_data; }
+
3514
+
+
3515 virtual _Success_(return != 0 || length == 0) size_t read(
+
3516 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
3517 {
+
3518 _Assume_(data || !length);
+
3519#if SET_FILE_OP_TIMES
+
3520 m_atime = time_point::now();
+
3521#endif
+
3522 size_t available = m_size - m_offset;
+
3523 if (length <= available) {
+
3524 memcpy(data, m_data + m_offset, length);
+
3525 m_offset += length;
+
3526 m_state = state_t::ok;
+
3527 return length;
+
3528 }
+
3529 if (length && !available) {
+
3530 m_state = state_t::eof;
+
3531 return 0;
+
3532 }
+
3533 memcpy(data, m_data + m_offset, available);
+
3534 m_offset += available;
+
3535 m_state = state_t::ok;
+
3536 return available;
+
3537 }
+
+
3538
+
3553 template <class T>
+
+ +
3555 {
+
3556#if SET_FILE_OP_TIMES
+
3557 m_atime = time_point::now();
+
3558#endif
+
3559 if (CHECK_STREAM_STATE && !ok()) _Unlikely_ {
+
3560 data = 0;
+
3561 return *this;
+
3562 }
+
3563 size_t end_offset = m_offset + sizeof(T);
+
3564 if (end_offset <= m_size) {
+
3565 data = LE2HE(*reinterpret_cast<T*>(m_data + m_offset));
+
3566 m_offset = end_offset;
+
3567#if !CHECK_STREAM_STATE
+
3568 m_state = state_t::ok;
+
3569#endif
+
3570 }
+
3571 else {
+
3572 data = 0;
+
3573 m_offset = m_size;
+
3574 m_state = state_t::eof;
+
3575 }
+
3576 return *this;
+
3577 }
+
+
3578
+
3593 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
+
3594 memory_file& read_str(_Inout_ std::basic_string<T, TR, AX>&data)
+
3595 {
+
3596#if SET_FILE_OP_TIMES
+
3597 m_atime = time_point::now();
+
3598#endif
+
3599 if (CHECK_STREAM_STATE && !ok()) _Unlikely_ {
+
3600 data.clear();
+
3601 return *this;
+
3602 }
+
3603 size_t end_offset = m_offset + sizeof(uint32_t);
+
3604 if (end_offset <= m_size) {
+
3605 uint32_t num_chars = LE2HE(*reinterpret_cast<uint32_t*>(m_data + m_offset));
+
3606 m_offset = end_offset;
+
3607 end_offset = stdex::add(m_offset, stdex::mul(num_chars, sizeof(T)));
+
3608 T* start = reinterpret_cast<T*>(m_data + m_offset);
+
3609 if (end_offset <= m_size) {
+
3610 data.assign(start, start + num_chars);
+
3611 m_offset = end_offset;
+
3612#if !CHECK_STREAM_STATE
+
3613 m_state = state_t::ok;
+
3614#endif
+
3615 return *this;
+
3616 }
+
3617 if (end_offset <= m_size)
+
3618 data.assign(start, reinterpret_cast<T*>(m_data + m_size));
+
3619 }
+
3620 m_offset = m_size;
+
3621 m_state = state_t::eof;
+
3622 return *this;
+
3623 }
+
+
3624
+
+
3625 virtual _Success_(return != 0) size_t write(
+
3626 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
3627 {
+
3628 _Assume_(data || !length);
+
3629#if SET_FILE_OP_TIMES
+
3630 m_atime = m_mtime = time_point::now();
+
3631#endif
+
3632 size_t end_offset = m_offset + length;
+
3633 if (end_offset > m_reserved) {
+
3634 reserve(end_offset);
+
3635 if (!ok()) _Unlikely_
+
3636 return 0;
+
3637 }
+
3638 memcpy(m_data + m_offset, data, length);
+
3639 m_offset = end_offset;
+
3640 if (m_offset > m_size)
+
3641 m_size = m_offset;
+
3642 m_state = state_t::ok;
+
3643 return length;
+
3644 }
+
+
3645
+
+
3649 void write_byte(_In_ uint8_t byte, _In_ size_t amount = 1)
+
3650 {
+
3651#if SET_FILE_OP_TIMES
+
3652 m_atime = m_mtime = time_point::now();
+
3653#endif
+
3654 size_t end_offset = m_offset + amount;
+
3655 if (end_offset > m_reserved) {
+
3656 reserve(end_offset);
+
3657 if (!ok()) _Unlikely_
+
3658 return;
+
3659 }
+
3660 memset(m_data + m_offset, byte, amount);
+
3661 m_offset = end_offset;
+
3662 if (m_offset > m_size)
+
3663 m_size = m_offset;
+
3664 m_state = state_t::ok;
+
3665 }
+
+
3666
+
3681 template <class T>
+
+ +
3683 {
+
3684#if SET_FILE_OP_TIMES
+
3685 m_atime = m_mtime = time_point::now();
+
3686#endif
+
3687 if (CHECK_STREAM_STATE && !ok()) _Unlikely_
+
3688 return *this;
+
3689 size_t end_offset = m_offset + sizeof(T);
+
3690 if (end_offset > m_reserved) {
+
3691 reserve(end_offset);
+
3692 if (!ok()) _Unlikely_
+
3693 return *this;
+
3694 }
+
3695 (*reinterpret_cast<T*>(m_data + m_offset)) = HE2LE(data);
+
3696 m_offset = end_offset;
+
3697 if (m_offset > m_size)
+
3698 m_size = m_offset;
+
3699#if !CHECK_STREAM_STATE
+
3700 m_state = state_t::ok;
+
3701#endif
+
3702 return *this;
+
3703 }
+
+
3704
+
3719 template <class T>
+
+
3720 memory_file& write_str(_In_z_ const T * data)
+
3721 {
+
3722#if SET_FILE_OP_TIMES
+
3723 m_atime = m_mtime = time_point::now();
+
3724#endif
+
3725 if (CHECK_STREAM_STATE && !ok()) _Unlikely_
+
3726 return *this;
+
3727 size_t num_chars = stdex::strlen(data);
+
3728 if (num_chars > UINT32_MAX)
+
3729 throw std::invalid_argument("string too long");
+
3730 size_t size_chars = num_chars * sizeof(T);
+
3731 size_t size = sizeof(uint32_t) + size_chars;
+
3732 size_t end_offset = m_offset + size;
+
3733 if (end_offset > m_reserved) {
+
3734 reserve(end_offset);
+
3735 if (!ok()) _Unlikely_
+
3736 return *this;
+
3737 }
+
3738 auto p = m_data + m_offset;
+
3739 *reinterpret_cast<uint32_t*>(p) = HE2LE((uint32_t)num_chars);
+
3740 memcpy(p + sizeof(uint32_t), data, size_chars);
+
3741 m_offset = end_offset;
+
3742 if (m_offset > m_size)
+
3743 m_size = m_offset;
+
3744#if !CHECK_STREAM_STATE
+
3745 m_state = state_t::ok;
+
3746#endif
+
3747 return *this;
+
3748 }
+
+
3749
+
3764 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
+
3765 memory_file& write_str(_In_ const std::basic_string<T, TR, AX>& data)
+
3766 {
+
3767#if SET_FILE_OP_TIMES
+
3768 m_atime = m_mtime = time_point::now();
+
3769#endif
+
3770 if (CHECK_STREAM_STATE && !ok()) _Unlikely_
+
3771 return *this;
+
3772 size_t num_chars = data.size();
+
3773 if (num_chars > UINT32_MAX)
+
3774 throw std::invalid_argument("string too long");
+
3775 size_t size_chars = num_chars * sizeof(T);
+
3776 size_t size = sizeof(uint32_t) + size_chars;
+
3777 size_t end_offset = m_offset + size;
+
3778 if (end_offset > m_reserved) {
+
3779 reserve(end_offset);
+
3780 if (!ok()) _Unlikely_
+
3781 return *this;
+
3782 }
+
3783 auto p = m_data + m_offset;
+
3784 *reinterpret_cast<uint32_t*>(p) = HE2LE((uint32_t)num_chars);
+
3785 memcpy(p + sizeof(uint32_t), data.data(), size_chars);
+
3786 m_offset = end_offset;
+
3787 if (m_offset > m_size)
+
3788 m_size = m_offset;
+
3789#if !CHECK_STREAM_STATE
+
3790 m_state = state_t::ok;
+
3791#endif
+
3792 return *this;
+
3793 }
+
+
3794
+
+
3800 size_t write_stream(_Inout_ basic & stream, _In_ size_t amount = SIZE_MAX)
+
3801 {
+
3802#if SET_FILE_OP_TIMES
+
3803 m_atime = m_mtime = time_point::now();
+
3804#endif
+
3805 size_t num_read, dst_offset = m_offset, dst_size = m_offset;
+
3806 size_t num_copied = 0, to_write = amount;
+
3807 m_state = state_t::ok;
+
3808 if (amount != SIZE_MAX) {
+
3809 dst_size = stdex::add(dst_size, amount);
+
3810 reserve(dst_size);
+
3811 if (!ok()) _Unlikely_
+
3812 return 0;
+
3813 while (to_write) {
+
3814 num_read = stream.read(m_data + dst_offset, to_write);
+
3815 dst_size = dst_offset += num_read;
+
3816 num_copied += num_read;
+
3817 to_write -= num_read;
+
3818 if (!stream.ok()) {
+
3819 if (stream.state() != state_t::eof)
+
3820 m_state = state_t::fail;
+
3821 break;
+
3822 }
+
3823 };
+
3824 }
+
3825 else {
+
3826 size_t block_size;
+
3827 while (to_write) {
+
3828 block_size = std::min(to_write, default_block_size);
+
3829 dst_size = stdex::add(dst_size, block_size);
+
3830 reserve(dst_size);
+
3831 if (!ok()) _Unlikely_
+
3832 break;
+
3833 num_read = stream.read(m_data + dst_offset, block_size);
+
3834 dst_size = dst_offset += num_read;
+
3835 num_copied += num_read;
+
3836 to_write -= num_read;
+
3837 if (!stream.ok()) {
+
3838 if (stream.state() != state_t::eof)
+
3839 m_state = state_t::fail;
+
3840 break;
+
3841 }
+
3842 };
+
3843 }
+
3844 m_offset = dst_offset;
+
3845 if (m_offset > m_size)
+
3846 m_size = m_offset;
+
3847 return num_copied;
+
3848 }
+
+
3849
+
+
3850 virtual void close()
+
3851 {
+
3852 if (m_manage && m_data)
+
3853 free(m_data);
+
3854 m_data = nullptr;
+
3855 m_manage = true;
+
3856 m_offset = 0;
+
3857 m_size = m_reserved = 0;
+
3858#if SET_FILE_OP_TIMES
+
3859 m_ctime = m_atime = m_mtime = time_point::min();
+
3860#endif
+
3861 m_state = state_t::ok;
+
3862 }
+
+
3863
+
+
3864 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
+
3865 {
+
3866 fpos_t target;
+
3867 switch (how) {
+
3868 case seek_t::beg: target = offset; break;
+
3869 case seek_t::cur: target = static_cast<fpos_t>(m_offset) + offset; break;
+
3870 case seek_t::end: target = static_cast<fpos_t>(m_size) + offset; break;
+
3871 default: throw std::invalid_argument("unknown seek origin");
+
3872 }
+
3873 if (target <= SIZE_MAX) {
+
3874 m_state = state_t::ok;
+
3875 return m_offset = static_cast<size_t>(target);
+
3876 }
+
3877 m_state = state_t::fail;
+
3878 return fpos_max;
+
3879 }
+
+
3880
+
+
3881 virtual fpos_t tell() const
+
3882 {
+
3883 return m_offset;
+
3884 }
+
+
3885
+
+
3886 virtual fsize_t size() const
+
3887 {
+
3888 return m_size;
+
3889 }
+
+
3890
+
+
3891 virtual void truncate()
+
3892 {
+
3893#if SET_FILE_OP_TIMES
+
3894 m_atime = m_mtime = time_point::now();
+
3895#endif
+
3896 m_size = m_offset;
+ +
3898 }
+
+
3899
+
3900#if SET_FILE_OP_TIMES
+
3901 virtual time_point ctime() const
+
3902 {
+
3903 return m_ctime;
+
3904 }
+
3905
+
3906 virtual time_point atime() const
+
3907 {
+
3908 return m_atime;
+
3909 }
+
3910
+
3911 virtual time_point mtime() const
+
3912 {
+
3913 return m_mtime;
+
3914 }
+
3915
+
3916 virtual void set_ctime(time_point date)
+
3917 {
+
3918 m_ctime = date;
+
3919 }
+
3920
+
3921 virtual void set_atime(time_point date)
+
3922 {
+
3923 m_atime = date;
+
3924 }
+
3925
+
3926 virtual void set_mtime(time_point date)
+
3927 {
+
3928 m_mtime = date;
+
3929 }
+
3930#endif
+
3931
+
3932 protected:
+
3940 template <class T>
+
+
3941 void set(_In_ fpos_t offset, _In_ const T data)
+
3942 {
+
3943#if SET_FILE_OP_TIMES
+
3944 m_atime = m_mtime = time_point::now();
+
3945#endif
+
3946 _Assume_(offset + sizeof(T) < m_size);
+
3947 (*reinterpret_cast<T*>(m_data + offset)) = HE2LE(data);
+
3948 }
+
+
3949
+
3950 public:
+
3951 void set(_In_ fpos_t offset, _In_ const int8_t data) { set<int8_t>(offset, data); }
+
3952 void set(_In_ fpos_t offset, _In_ const int16_t data) { set<int16_t>(offset, data); }
+
3953 void set(_In_ fpos_t offset, _In_ const int32_t data) { set<int32_t>(offset, data); }
+
3954 void set(_In_ fpos_t offset, _In_ const int64_t data) { set<int64_t>(offset, data); }
+
3955 void set(_In_ fpos_t offset, _In_ const uint8_t data) { set<uint8_t>(offset, data); }
+
3956 void set(_In_ fpos_t offset, _In_ const uint16_t data) { set<uint16_t>(offset, data); }
+
3957 void set(_In_ fpos_t offset, _In_ const uint32_t data) { set<uint32_t>(offset, data); }
+
3958 void set(_In_ fpos_t offset, _In_ const uint64_t data) { set<uint64_t>(offset, data); }
+
3959 void set(_In_ fpos_t offset, _In_ const float data) { set<float>(offset, data); }
+
3960 void set(_In_ fpos_t offset, _In_ const double data) { set<double>(offset, data); }
+
3961 void set(_In_ fpos_t offset, _In_ const char data) { set<char>(offset, data); }
+
3962#ifdef _NATIVE_WCHAR_T_DEFINED
+
3963 void set(_In_ fpos_t offset, _In_ const wchar_t data) { set<wchar_t>(offset, data); }
+
3964#endif
+
3965
+
3973 protected:
+
3974 template <class T>
+
+
3975 void get(_In_ fpos_t offset, _Out_ T & data)
+
3976 {
+
3977 _Assume_(offset + sizeof(T) < m_size);
+
3978 data = LE2HE(*(T*)(m_data + offset));
+
3979#if SET_FILE_OP_TIMES
+
3980 m_atime = time_point::now();
+
3981#endif
+
3982 }
+
+
3983
+
3984 public:
+
3985 void get(_In_ fpos_t offset, _Out_ int8_t & data) { get<int8_t>(offset, data); }
+
3986 void get(_In_ fpos_t offset, _Out_ int16_t & data) { get<int16_t>(offset, data); }
+
3987 void get(_In_ fpos_t offset, _Out_ int32_t & data) { get<int32_t>(offset, data); }
+
3988 void get(_In_ fpos_t offset, _Out_ int64_t & data) { get<int64_t>(offset, data); }
+
3989 void get(_In_ fpos_t offset, _Out_ uint8_t & data) { get<uint8_t>(offset, data); }
+
3990 void get(_In_ fpos_t offset, _Out_ uint16_t & data) { get<uint16_t>(offset, data); }
+
3991 void get(_In_ fpos_t offset, _Out_ uint32_t & data) { get<uint32_t>(offset, data); }
+
3992 void get(_In_ fpos_t offset, _Out_ uint64_t & data) { get<uint64_t>(offset, data); }
+
3993 void get(_In_ fpos_t offset, _Out_ float& data) { get<float>(offset, data); }
+
3994 void get(_In_ fpos_t offset, _Out_ double& data) { get<double>(offset, data); }
+
3995 void get(_In_ fpos_t offset, _Out_ char& data) { get<char>(offset, data); }
+
3996#ifdef _NATIVE_WCHAR_T_DEFINED
+
3997 void get(_In_ fpos_t offset, _Out_ wchar_t& data) { get<wchar_t>(offset, data); }
+
3998#endif
+
3999
+
4000 memory_file& operator <<(_In_ const int8_t data) { return write_data(data); }
+
4001 memory_file& operator >>(_Out_ int8_t & data) { return read_data(data); }
+
4002 memory_file& operator <<(_In_ const int16_t data) { return write_data(data); }
+
4003 memory_file& operator >>(_Out_ int16_t & data) { return read_data(data); }
+
4004 memory_file& operator <<(_In_ const int32_t data) { return write_data(data); }
+
4005 memory_file& operator >>(_Out_ int32_t & data) { return read_data(data); }
+
4006 memory_file& operator <<(_In_ const int64_t data) { return write_data(data); }
+
4007 memory_file& operator >>(_Out_ int64_t & data) { return read_data(data); }
+
4008 memory_file& operator <<(_In_ const uint8_t data) { return write_data(data); }
+
4009 memory_file& operator >>(_Out_ uint8_t & data) { return read_data(data); }
+
4010 memory_file& operator <<(_In_ const uint16_t data) { return write_data(data); }
+
4011 memory_file& operator >>(_Out_ uint16_t & data) { return read_data(data); }
+
4012 memory_file& operator <<(_In_ const uint32_t data) { return write_data(data); }
+
4013 memory_file& operator >>(_Out_ uint32_t & data) { return read_data(data); }
+
4014 memory_file& operator <<(_In_ const uint64_t data) { return write_data(data); }
+
4015 memory_file& operator >>(_Out_ uint64_t & data) { return read_data(data); }
+
4016 memory_file& operator <<(_In_ const float data) { return write_data(data); }
+
4017 memory_file& operator >>(_Out_ float& data) { return read_data(data); }
+
4018 memory_file& operator <<(_In_ const double data) { return write_data(data); }
+
4019 memory_file& operator >>(_Out_ double& data) { return read_data(data); }
+
4020 memory_file& operator <<(_In_ const char data) { return write_data(data); }
+
4021 memory_file& operator >>(_Out_ char& data) { return read_data(data); }
+
4022#ifdef _NATIVE_WCHAR_T_DEFINED
+
4023 memory_file& operator <<(_In_ const wchar_t data) { return write_data(data); }
+
4024 memory_file& operator >>(_Out_ wchar_t& data) { return read_data(data); }
+
4025#endif
+
4026 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
4027 memory_file& operator >>(_Out_ std::basic_string<T, TR, AX>&data) { return read_str(data); }
+
4028 template <class T>
+
4029 memory_file& operator <<(_In_ const T * data) { return write_str(data); }
+
4030 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
4031 memory_file& operator <<(_In_ const std::basic_string<T, TR, AX>& data) { return write_str(data); }
+
4032
+
4033 protected:
+
4034 uint8_t* m_data;
+ +
4036 size_t m_offset;
+
4037 size_t m_size;
+
4038 size_t m_reserved;
+
4039#if SET_FILE_OP_TIMES
+
4040 time_point
+
4041 m_ctime,
+
4042 m_atime,
+
4043 m_mtime;
+
4044#endif
+
4045 };
+
+
4046
+
+
4050 class fifo : public basic {
+
4051 public:
+
4052 fifo() :
+
4053 m_offset(0),
+
4054 m_size(0),
+
4055 m_head(nullptr),
+
4056 m_tail(nullptr)
+
4057 {}
+
4058
+
4059 virtual ~fifo()
+
4060 {
+
4061 while (m_head) {
+
4062 auto p = m_head;
+
4063 m_head = p->next;
+
4064 delete p;
+
4065 }
+
4066 }
+
4067
+
4068#pragma warning(suppress: 6101) // See [2] below
+
+
4069 virtual _Success_(return != 0 || length == 0) size_t read(
+
4070 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
4071 {
+
4072 _Assume_(data || !length);
+
4073 for (size_t to_read = length;;) {
+
4074 if (!m_head) _Unlikely_ {
+
4075 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
+
4076 return length - to_read; // [2] Code analysis misses `length - to_read` bytes were written to data in previous loop iterations.
+
4077 }
+
4078 size_t remaining = m_head->size - m_offset;
+
4079 if (remaining > to_read) {
+
4080 memcpy(data, m_head->data + m_offset, to_read);
+
4081 m_offset += to_read;
+
4082 m_size -= to_read;
+
4083 m_state = state_t::ok;
+
4084 return length;
+
4085 }
+
4086 memcpy(data, m_head->data + m_offset, remaining);
+
4087 m_offset = 0;
+
4088 m_size -= remaining;
+
4089 reinterpret_cast<uint8_t*&>(data) += remaining;
+
4090 to_read -= remaining;
+
4091 auto p = m_head;
+
4092 m_head = p->next;
+
4093 delete p;
+
4094 }
+
4095 }
+
+
4096
+
+
4097 virtual _Success_(return != 0) size_t write(
+
4098 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
4099 {
+
4100 _Assume_(data || !length);
+
4101 try {
+
4102 std::unique_ptr<node_t> n(reinterpret_cast<node_t*>(new uint8_t[sizeof(node_t) + length]));
+
4103 n->next = nullptr;
+
4104 n->size = length;
+
4105 memcpy(n->data, data, length);
+
4106 m_size += length;
+
4107 if (m_head)
+
4108 m_tail = m_tail->next = n.release();
+
4109 else
+
4110 m_head = m_tail = n.release();
+
4111 m_state = state_t::ok;
+
4112 return length;
+
4113 }
+
4114 catch (const std::bad_alloc&) {
+
4115 m_state = state_t::fail;
+
4116 return 0;
+
4117 }
+
4118 }
+
+
4119
+
+
4120 virtual void close()
+
4121 {
+
4122 m_size = m_offset = 0;
+
4123 while (m_head) {
+
4124 auto p = m_head;
+
4125 m_head = p->next;
+
4126 delete p;
+
4127 }
+
4128 m_state = state_t::ok;
+
4129 }
+
+
4130
+
4134 size_t size() const { return m_size; };
+
4135
+
4136 protected:
+
4137 size_t m_offset, m_size;
+
+
4138 struct node_t {
+
4139 node_t* next;
+
4140 size_t size;
+
4141#pragma warning(suppress:4200)
+
4142 uint8_t data[0];
+
4143 } *m_head, * m_tail;
+
+
4144 };
+
+
4145
+
+
4149 class diag_file : public basic_file {
+
4150 public:
+
4151 diag_file(_In_count_(num_files) basic_file* const* files, _In_ size_t num_files) :
+
4152 basic(num_files ? files[0]->state() : state_t::fail),
+
4153 m_files(files, files + num_files)
+
4154 {}
+
4155
+
+
4156 virtual _Success_(return != 0 || length == 0) size_t read(
+
4157 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
4158 {
+
4159 _Assume_(data || !length);
+
4160 if (m_files.empty()) {
+
4161 m_state = state_t::fail;
+
4162 return 0;
+
4163 }
+
4164 size_t result = m_files[0]->read(data, length);
+
4165 _Assume_(result <= length);
+
4166 m_state = m_files[0]->state();
+
4167 if (length > m_tmp.size())
+
4168 m_tmp.resize(length);
+
4169 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
4170 if (m_files[i]->read(m_tmp.data(), length) != result ||
+
4171 memcmp(m_tmp.data(), data, result))
+
4172 throw std::runtime_error("read mismatch");
+
4173 if (m_files[i]->state() != m_state)
+
4174 throw std::runtime_error("state mismatch");
+
4175 }
+
4176 return result;
+
4177 }
+
+
4178
+
+
4179 virtual _Success_(return != 0) size_t write(
+
4180 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
4181 {
+
4182 if (m_files.empty()) {
+
4183 m_state = state_t::fail;
+
4184 return 0;
+
4185 }
+
4186 size_t result = m_files[0]->write(data, length);
+
4187 m_state = m_files[0]->state();
+
4188 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
4189 if (m_files[i]->write(data, length) != result)
+
4190 throw std::runtime_error("write mismatch");
+
4191 if (m_files[i]->state() != m_state)
+
4192 throw std::runtime_error("state mismatch");
+
4193 }
+
4194 return result;
+
4195 }
+
+
4196
+
+
4197 virtual void flush()
+
4198 {
+
4199 if (m_files.empty()) {
+
4200 m_state = state_t::ok;
+
4201 return;
+
4202 }
+
4203 m_files[0]->flush();
+
4204 m_state = m_files[0]->state();
+
4205 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
4206 m_files[i]->flush();
+
4207 if (m_files[i]->state() != m_state)
+
4208 throw std::runtime_error("state mismatch");
+
4209 }
+
4210 }
+
+
4211
+
+
4212 virtual void close()
+
4213 {
+
4214 if (m_files.empty()) {
+
4215 m_state = state_t::ok;
+
4216 return;
+
4217 }
+
4218 m_files[0]->close();
+
4219 m_state = m_files[0]->state();
+
4220 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
4221 m_files[i]->close();
+
4222 if (m_files[i]->state() != m_state)
+
4223 throw std::runtime_error("state mismatch");
+
4224 }
+
4225 m_tmp.clear();
+
4226 m_tmp.shrink_to_fit();
+
4227 }
+
+
4228
+
+
4229 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
+
4230 {
+
4231 if (m_files.empty()) {
+
4232 m_state = state_t::fail;
+
4233 return fpos_max;
+
4234 }
+
4235 fpos_t result = m_files[0]->seek(offset, how);
+
4236 m_state = m_files[0]->state();
+
4237 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
4238 if (m_files[i]->seek(offset, how) != result)
+
4239 throw std::runtime_error("seek mismatch");
+
4240 if (m_files[i]->state() != m_state)
+
4241 throw std::runtime_error("state mismatch");
+
4242 }
+
4243 return result;
+
4244 }
+
+
4245
+
+
4246 virtual fpos_t tell() const
+
4247 {
+
4248 if (m_files.empty())
+
4249 return fpos_max;
+
4250 fpos_t result = m_files[0]->tell();
+
4251 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
4252 if (m_files[i]->tell() != result)
+
4253 throw std::runtime_error("tell mismatch");
+
4254 }
+
4255 return result;
+
4256 }
+
+
4257
+
+
4258 virtual void lock(_In_ fpos_t offset, _In_ fsize_t length)
+
4259 {
+
4260 if (m_files.empty())
+
4261 m_state = state_t::fail;
+
4262 m_files[0]->lock(offset, length);
+
4263 m_state = m_files[0]->state();
+
4264 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
4265 m_files[i]->lock(offset, length);
+
4266 if (m_files[i]->state() != m_state)
+
4267 throw std::runtime_error("state mismatch");
+
4268 }
+
4269 }
+
+
4270
+
+
4271 virtual void unlock(_In_ fpos_t offset, _In_ fsize_t length)
+
4272 {
+
4273 if (m_files.empty())
+
4274 m_state = state_t::fail;
+
4275 m_files[0]->unlock(offset, length);
+
4276 m_state = m_files[0]->state();
+
4277 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
4278 m_files[i]->unlock(offset, length);
+
4279 if (m_files[i]->state() != m_state)
+
4280 throw std::runtime_error("state mismatch");
+
4281 }
+
4282 }
+
+
4283
+
+
4284 virtual fsize_t size() const
+
4285 {
+
4286 if (m_files.empty())
+
4287 return fsize_max;
+
4288 fsize_t result = m_files[0]->size();
+
4289 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
4290 if (m_files[i]->size() != result)
+
4291 throw std::runtime_error("size mismatch");
+
4292 }
+
4293 return result;
+
4294 }
+
+
4295
+
+
4296 virtual void truncate()
+
4297 {
+
4298 if (m_files.empty())
+
4299 m_state = state_t::fail;
+
4300 m_files[0]->truncate();
+
4301 m_state = m_files[0]->state();
+
4302 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
4303 m_files[i]->truncate();
+
4304 if (m_files[i]->state() != m_state)
+
4305 throw std::runtime_error("state mismatch");
+
4306 }
+
4307 }
+
+
4308
+
4309 protected:
+
4310 std::vector<basic_file*> m_files;
+
4311 std::vector<uint8_t> m_tmp;
+
4312 };
+
+
4313 }
+
4314}
Encoding converter context.
Definition unicode.hpp:137
locale_t helper class to free_locale when going out of scope.
Definition locale.hpp:69
-
Provides read-ahead stream capability.
Definition stream.hpp:1244
-
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:1258
-
Provides write-back stream capability.
Definition stream.hpp:1311
-
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:1324
-
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1348
+
Provides read-ahead stream capability.
Definition stream.hpp:1246
+
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:1260
+
Provides write-back stream capability.
Definition stream.hpp:1313
+
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:1326
+
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1350
Basic seekable stream operations.
Definition stream.hpp:812
virtual void skip(fsize_t amount)
Skips given amount of bytes of data on the stream.
Definition stream.hpp:855
virtual time_point ctime() const
Returns file creation time.
Definition stream.hpp:902
virtual void lock(fpos_t offset, fsize_t length)
Locks file section for exclusive access.
Definition stream.hpp:871
virtual void truncate()=0
Sets file size - truncates the remainder of file content from the current file position to the end of...
virtual fsize_t size() const =0
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
-
charset_id read_charset(charset_id default_charset=charset_id::system)
Attempts to detect textfile charset based on UTF-32, UTF-16 or UTF-8 BOM.
Definition stream.hpp:975
+
charset_id read_charset(charset_id default_charset=charset_id::system)
Attempts to detect textfile charset based on UTF-32, UTF-16 or UTF-8 BOM.
Definition stream.hpp:977
fpos_t seekbeg(fpos_t offset)
Seeks to absolute file position.
Definition stream.hpp:839
virtual std::vector< uint8_t > read_remainder(size_t max_length=SIZE_MAX)
Reads and returns remainder of the stream.
Definition stream.hpp:814
virtual void set_mtime(time_point date)
Sets file modification time.
Definition stream.hpp:944
@@ -4150,11 +4152,11 @@ $(function() { codefold.init(0); });
fpos_t seekend(foff_t offset)
Seeks to relative from end file position.
Definition stream.hpp:853
virtual void set_atime(time_point date)
Sets file access time.
Definition stream.hpp:935
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)=0
Seeks to specified relative file position.
-
OS data stream (file, pipe, socket...)
Definition stream.hpp:2194
-
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:2251
-
virtual void flush()
Persists volatile element data.
Definition stream.hpp:2309
-
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:2201
-
virtual void close()
Closes the stream.
Definition stream.hpp:2298
+
OS data stream (file, pipe, socket...)
Definition stream.hpp:2196
+
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:2253
+
virtual void flush()
Persists volatile element data.
Definition stream.hpp:2311
+
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:2203
+
virtual void close()
Closes the stream.
Definition stream.hpp:2300
‍UTF-8 byte-order-mark
Definition stream.hpp:79
size_t write_array(const T_from *str, charset_encoder< T_from, T_to > &encoder)
Writes array of characters to the stream.
Definition stream.hpp:402
bool ok() const
Returns true if the stream state is clean i.e. previous operation was succesful.
Definition stream.hpp:175
@@ -4186,151 +4188,151 @@ $(function() { codefold.init(0); });
size_t write_array(_In_reads_bytes_opt_(size *count) const void *array, size_t size, size_t count)
Writes an array of data to the stream.
Definition stream.hpp:388
void write_byte(uint8_t byte, fsize_t amount=1)
Writes a byte of data.
Definition stream.hpp:221
basic & read_data(T &data)
Reads one primitive data type.
Definition stream.hpp:259
-
Buffered read/write stream.
Definition stream.hpp:1382
-
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1491
-
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:1412
-
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:1448
-
Buffered OS data stream (file, pipe, socket...)
Definition stream.hpp:2323
-
Cached file.
Definition stream.hpp:1792
-
virtual time_point ctime() const
Returns file creation time.
Definition stream.hpp:2064
-
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:2043
-
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:1859
-
virtual time_point atime() const
Returns file access time.
Definition stream.hpp:2069
-
virtual void unlock(fpos_t offset, fsize_t length)
Unlocks file section for exclusive access.
Definition stream.hpp:2030
-
virtual time_point mtime() const
Returns file modification time.
Definition stream.hpp:2078
-
virtual void close()
Closes the stream.
Definition stream.hpp:1978
-
virtual void set_mtime(time_point date)
Sets file modification time.
Definition stream.hpp:2100
-
virtual void lock(fpos_t offset, fsize_t length)
Locks file section for exclusive access.
Definition stream.hpp:2024
-
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1987
-
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:1925
-
virtual fsize_t size() const
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:2036
-
virtual void set_ctime(time_point date)
Sets file create time.
Definition stream.hpp:2087
-
virtual fpos_t tell() const
Returns absolute file position in file or fpos_max if fails. This method does not update stream state...
Definition stream.hpp:2019
-
virtual void set_atime(time_point date)
Sets file access time.
Definition stream.hpp:2092
-
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:1998
-
Cached file-system file.
Definition stream.hpp:3097
-
void open(const std::basic_string< TR, AX > &filename, int mode)
Opens file.
Definition stream.hpp:3163
-
void open(const schar_t *filename, int mode)
Opens file.
Definition stream.hpp:3141
-
cached_file(const schar_t *filename, int mode, size_t cache_size=default_cache_size)
Opens file.
Definition stream.hpp:3113
-
cached_file(const std::basic_string< TR, AX > &filename, int mode, size_t cache_size=default_cache_size)
Opens file.
Definition stream.hpp:3128
-
Modifies data on the fly when reading from/writing to a source stream. Could also be used to modify r...
Definition stream.hpp:1010
-
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1061
-
virtual void close()
Closes the stream.
Definition stream.hpp:1055
-
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:1039
-
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:1047
-
Compares multiple files to perform the same.
Definition stream.hpp:4147
-
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:4294
-
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:4177
-
virtual void close()
Closes the stream.
Definition stream.hpp:4210
-
virtual fsize_t size() const
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:4282
-
virtual void lock(fpos_t offset, fsize_t length)
Locks file section for exclusive access.
Definition stream.hpp:4256
-
virtual void unlock(fpos_t offset, fsize_t length)
Unlocks file section for exclusive access.
Definition stream.hpp:4269
-
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:4227
-
virtual fpos_t tell() const
Returns absolute file position in file or fpos_max if fails. This method does not update stream state...
Definition stream.hpp:4244
-
virtual void flush()
Persists volatile element data.
Definition stream.hpp:4195
-
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:4154
-
In-memory FIFO queue.
Definition stream.hpp:4048
-
virtual void close()
Closes the stream.
Definition stream.hpp:4118
-
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:4095
-
size_t size() const
Returns total size of pending data in the queue.
Definition stream.hpp:4132
-
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:4067
-
Limits file reading/writing to a predefined window.
Definition stream.hpp:1682
-
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:1775
-
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1725
-
virtual void skip(fsize_t amount)
Skips given amount of bytes of data on the stream.
Definition stream.hpp:1738
-
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:1731
-
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:1705
-
virtual void lock(fpos_t offset, fsize_t length)
Locks file section for exclusive access.
Definition stream.hpp:1750
-
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:1691
-
virtual void unlock(fpos_t offset, fsize_t length)
Unlocks file section for exclusive access.
Definition stream.hpp:1760
-
virtual fpos_t tell() const
Returns absolute file position in file or fpos_max if fails. This method does not update stream state...
Definition stream.hpp:1744
-
virtual void close()
Closes the stream.
Definition stream.hpp:1719
-
virtual fsize_t size() const
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:1770
-
File-system file.
Definition stream.hpp:2689
-
virtual fsize_t size() const
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:2885
-
static bool readonly(const std::basic_string< TR, AX > &filename)
Checks if file/folder/symlink is read-only.
Definition stream.hpp:3086
-
virtual time_point mtime() const
Returns file modification time.
Definition stream.hpp:2967
-
virtual void unlock(fpos_t offset, fsize_t length)
Unlocks file section for exclusive access.
Definition stream.hpp:2860
-
file(const schar_t *filename, int mode)
Opens file.
Definition stream.hpp:2699
-
virtual void set_ctime(time_point date)
Sets file create time.
Definition stream.hpp:2981
-
static bool readonly(const stdex::schar_t *filename)
Checks if file/folder/symlink is read-only.
Definition stream.hpp:3067
-
virtual time_point atime() const
Returns file access time.
Definition stream.hpp:2953
-
static bool exists(const std::basic_string< TR, AX > &filename)
Checks if file/folder/symlink likely exists.
Definition stream.hpp:3055
-
void open(const schar_t *filename, int mode)
Opens file.
Definition stream.hpp:2719
-
virtual void set_mtime(time_point date)
Sets file modification time.
Definition stream.hpp:3015
-
virtual void set_atime(time_point date)
Sets file access time.
Definition stream.hpp:2995
-
virtual void lock(fpos_t offset, fsize_t length)
Locks file section for exclusive access.
Definition stream.hpp:2837
-
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:2903
-
void open(const std::basic_string< TR, AX > &filename, int mode)
Opens file.
Definition stream.hpp:2793
-
virtual time_point ctime() const
Returns file creation time.
Definition stream.hpp:2943
-
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:2798
-
virtual fpos_t tell() const
Returns absolute file position in file or fpos_max if fails. This method does not update stream state...
Definition stream.hpp:2819
-
file(const std::basic_string< TR, AX > &filename, int mode)
Opens file.
Definition stream.hpp:2711
-
static bool exists(const stdex::schar_t *filename)
Checks if file/folder/symlink likely exists.
Definition stream.hpp:3039
-
Limits reading from/writing to stream to a predefined number of bytes.
Definition stream.hpp:1539
-
fsize_t read_limit
Number of bytes left that may be read from the stream.
Definition stream.hpp:1591
-
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:1547
-
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:1568
-
fsize_t write_limit
Number of bytes left, that can be written to the stream.
Definition stream.hpp:1592
-
In-memory file.
Definition stream.hpp:3181
-
void save(const std::basic_string< TR, AX > &filename, int mode)
Saves content to a file-system file.
Definition stream.hpp:3503
-
memory_file & operator=(memory_file &&other) noexcept
Moves content from another file.
Definition stream.hpp:3364
-
virtual fsize_t size() const
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:3884
-
memory_file(const schar_t *filename, int mode)
Loads content from file-system file.
Definition stream.hpp:3261
-
memory_file & read_str(std::basic_string< T, TR, AX > &data)
Reads length-prefixed string from the stream.
Definition stream.hpp:3592
-
memory_file(const memory_file &other)
Copies content from another file.
Definition stream.hpp:3280
-
memory_file & write_str(const std::basic_string< T, TR, AX > &data)
Writes string to the stream length-prefixed.
Definition stream.hpp:3763
-
void load(const std::basic_string< TR, AX > &filename, int mode)
Loads content from a file-system file.
Definition stream.hpp:3465
-
size_t m_size
file size
Definition stream.hpp:4035
-
void get(fpos_t offset, T &data)
Reads data from specified file location This does not move file pointer. It checks for data size Assu...
Definition stream.hpp:3973
-
size_t write_stream(basic &stream, size_t amount=SIZE_MAX)
Writes content of another stream.
Definition stream.hpp:3798
-
uint8_t * m_data
file data
Definition stream.hpp:4032
-
memory_file & read_data(T &data)
Reads one primitive data type.
Definition stream.hpp:3552
-
virtual void close()
Closes the stream.
Definition stream.hpp:3848
-
memory_file(const std::basic_string< TR, AX > &filename, int mode)
Loads content from file-system file.
Definition stream.hpp:3273
-
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:3513
-
virtual fpos_t tell() const
Returns absolute file position in file or fpos_max if fails. This method does not update stream state...
Definition stream.hpp:3879
-
size_t m_reserved
reserved file size
Definition stream.hpp:4036
-
memory_file(size_t size, state_t state=state_t::ok)
Creates an empty file of reserved size.
Definition stream.hpp:3202
-
void reserve(size_t required, bool tight=false) noexcept
Reallocates memory.
Definition stream.hpp:3402
-
memory_file(memory_file &&other) noexcept
Moves content from another file.
Definition stream.hpp:3335
-
void write_byte(uint8_t byte, size_t amount=1)
Writes a byte of data.
Definition stream.hpp:3647
-
memory_file & operator=(const memory_file &other)
Copies content from another file.
Definition stream.hpp:3305
-
void set(fpos_t offset, const T data)
Writes data to specified file location This does not move file pointer nor update file size....
Definition stream.hpp:3939
-
size_t m_offset
file pointer
Definition stream.hpp:4034
-
void save(const schar_t *filename, int mode)
Saves content to a file-system file.
Definition stream.hpp:3476
-
void load(const schar_t *filename, int mode)
Loads content from a file-system file.
Definition stream.hpp:3431
-
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:3862
-
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:3889
-
memory_file & write_data(const T data)
Writes one primitive data type.
Definition stream.hpp:3680
-
memory_file & write_str(const T *data)
Writes string to the stream length-prefixed.
Definition stream.hpp:3718
-
bool m_manage
may reallocate m_data?
Definition stream.hpp:4033
-
memory_file(void *data, size_t size, bool manage=false, state_t state=state_t::ok)
Creates a file based on available data.
Definition stream.hpp:3251
-
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:3623
-
memory_file(void *data, size_t size, size_t reserved, bool manage=false, state_t state=state_t::ok)
Creates a file based on available data.
Definition stream.hpp:3228
-
const void * data() const
Returns pointer to data.
Definition stream.hpp:3511
-
Definition stream.hpp:1158
+
Buffered read/write stream.
Definition stream.hpp:1384
+
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1493
+
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:1414
+
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:1450
+
Buffered OS data stream (file, pipe, socket...)
Definition stream.hpp:2325
+
Cached file.
Definition stream.hpp:1794
+
virtual time_point ctime() const
Returns file creation time.
Definition stream.hpp:2066
+
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:2045
+
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:1861
+
virtual time_point atime() const
Returns file access time.
Definition stream.hpp:2071
+
virtual void unlock(fpos_t offset, fsize_t length)
Unlocks file section for exclusive access.
Definition stream.hpp:2032
+
virtual time_point mtime() const
Returns file modification time.
Definition stream.hpp:2080
+
virtual void close()
Closes the stream.
Definition stream.hpp:1980
+
virtual void set_mtime(time_point date)
Sets file modification time.
Definition stream.hpp:2102
+
virtual void lock(fpos_t offset, fsize_t length)
Locks file section for exclusive access.
Definition stream.hpp:2026
+
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1989
+
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:1927
+
virtual fsize_t size() const
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:2038
+
virtual void set_ctime(time_point date)
Sets file create time.
Definition stream.hpp:2089
+
virtual fpos_t tell() const
Returns absolute file position in file or fpos_max if fails. This method does not update stream state...
Definition stream.hpp:2021
+
virtual void set_atime(time_point date)
Sets file access time.
Definition stream.hpp:2094
+
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:2000
+
Cached file-system file.
Definition stream.hpp:3099
+
void open(const std::basic_string< TR, AX > &filename, int mode)
Opens file.
Definition stream.hpp:3165
+
void open(const schar_t *filename, int mode)
Opens file.
Definition stream.hpp:3143
+
cached_file(const schar_t *filename, int mode, size_t cache_size=default_cache_size)
Opens file.
Definition stream.hpp:3115
+
cached_file(const std::basic_string< TR, AX > &filename, int mode, size_t cache_size=default_cache_size)
Opens file.
Definition stream.hpp:3130
+
Modifies data on the fly when reading from/writing to a source stream. Could also be used to modify r...
Definition stream.hpp:1012
+
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1063
+
virtual void close()
Closes the stream.
Definition stream.hpp:1057
+
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:1041
+
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:1049
+
Compares multiple files to perform the same.
Definition stream.hpp:4149
+
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:4296
+
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:4179
+
virtual void close()
Closes the stream.
Definition stream.hpp:4212
+
virtual fsize_t size() const
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:4284
+
virtual void lock(fpos_t offset, fsize_t length)
Locks file section for exclusive access.
Definition stream.hpp:4258
+
virtual void unlock(fpos_t offset, fsize_t length)
Unlocks file section for exclusive access.
Definition stream.hpp:4271
+
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:4229
+
virtual fpos_t tell() const
Returns absolute file position in file or fpos_max if fails. This method does not update stream state...
Definition stream.hpp:4246
+
virtual void flush()
Persists volatile element data.
Definition stream.hpp:4197
+
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:4156
+
In-memory FIFO queue.
Definition stream.hpp:4050
+
virtual void close()
Closes the stream.
Definition stream.hpp:4120
+
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:4097
+
size_t size() const
Returns total size of pending data in the queue.
Definition stream.hpp:4134
+
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:4069
+
Limits file reading/writing to a predefined window.
Definition stream.hpp:1684
+
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:1777
+
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1727
+
virtual void skip(fsize_t amount)
Skips given amount of bytes of data on the stream.
Definition stream.hpp:1740
+
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:1733
+
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:1707
+
virtual void lock(fpos_t offset, fsize_t length)
Locks file section for exclusive access.
Definition stream.hpp:1752
+
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:1693
+
virtual void unlock(fpos_t offset, fsize_t length)
Unlocks file section for exclusive access.
Definition stream.hpp:1762
+
virtual fpos_t tell() const
Returns absolute file position in file or fpos_max if fails. This method does not update stream state...
Definition stream.hpp:1746
+
virtual void close()
Closes the stream.
Definition stream.hpp:1721
+
virtual fsize_t size() const
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:1772
+
File-system file.
Definition stream.hpp:2691
+
virtual fsize_t size() const
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:2887
+
static bool readonly(const std::basic_string< TR, AX > &filename)
Checks if file/folder/symlink is read-only.
Definition stream.hpp:3088
+
virtual time_point mtime() const
Returns file modification time.
Definition stream.hpp:2969
+
virtual void unlock(fpos_t offset, fsize_t length)
Unlocks file section for exclusive access.
Definition stream.hpp:2862
+
file(const schar_t *filename, int mode)
Opens file.
Definition stream.hpp:2701
+
virtual void set_ctime(time_point date)
Sets file create time.
Definition stream.hpp:2983
+
static bool readonly(const stdex::schar_t *filename)
Checks if file/folder/symlink is read-only.
Definition stream.hpp:3069
+
virtual time_point atime() const
Returns file access time.
Definition stream.hpp:2955
+
static bool exists(const std::basic_string< TR, AX > &filename)
Checks if file/folder/symlink likely exists.
Definition stream.hpp:3057
+
void open(const schar_t *filename, int mode)
Opens file.
Definition stream.hpp:2721
+
virtual void set_mtime(time_point date)
Sets file modification time.
Definition stream.hpp:3017
+
virtual void set_atime(time_point date)
Sets file access time.
Definition stream.hpp:2997
+
virtual void lock(fpos_t offset, fsize_t length)
Locks file section for exclusive access.
Definition stream.hpp:2839
+
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:2905
+
void open(const std::basic_string< TR, AX > &filename, int mode)
Opens file.
Definition stream.hpp:2795
+
virtual time_point ctime() const
Returns file creation time.
Definition stream.hpp:2945
+
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:2800
+
virtual fpos_t tell() const
Returns absolute file position in file or fpos_max if fails. This method does not update stream state...
Definition stream.hpp:2821
+
file(const std::basic_string< TR, AX > &filename, int mode)
Opens file.
Definition stream.hpp:2713
+
static bool exists(const stdex::schar_t *filename)
Checks if file/folder/symlink likely exists.
Definition stream.hpp:3041
+
Limits reading from/writing to stream to a predefined number of bytes.
Definition stream.hpp:1541
+
fsize_t read_limit
Number of bytes left that may be read from the stream.
Definition stream.hpp:1593
+
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:1549
+
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:1570
+
fsize_t write_limit
Number of bytes left, that can be written to the stream.
Definition stream.hpp:1594
+
In-memory file.
Definition stream.hpp:3183
+
void save(const std::basic_string< TR, AX > &filename, int mode)
Saves content to a file-system file.
Definition stream.hpp:3505
+
memory_file & operator=(memory_file &&other) noexcept
Moves content from another file.
Definition stream.hpp:3366
+
virtual fsize_t size() const
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:3886
+
memory_file(const schar_t *filename, int mode)
Loads content from file-system file.
Definition stream.hpp:3263
+
memory_file & read_str(std::basic_string< T, TR, AX > &data)
Reads length-prefixed string from the stream.
Definition stream.hpp:3594
+
memory_file(const memory_file &other)
Copies content from another file.
Definition stream.hpp:3282
+
memory_file & write_str(const std::basic_string< T, TR, AX > &data)
Writes string to the stream length-prefixed.
Definition stream.hpp:3765
+
void load(const std::basic_string< TR, AX > &filename, int mode)
Loads content from a file-system file.
Definition stream.hpp:3467
+
size_t m_size
file size
Definition stream.hpp:4037
+
void get(fpos_t offset, T &data)
Reads data from specified file location This does not move file pointer. It checks for data size Assu...
Definition stream.hpp:3975
+
size_t write_stream(basic &stream, size_t amount=SIZE_MAX)
Writes content of another stream.
Definition stream.hpp:3800
+
uint8_t * m_data
file data
Definition stream.hpp:4034
+
memory_file & read_data(T &data)
Reads one primitive data type.
Definition stream.hpp:3554
+
virtual void close()
Closes the stream.
Definition stream.hpp:3850
+
memory_file(const std::basic_string< TR, AX > &filename, int mode)
Loads content from file-system file.
Definition stream.hpp:3275
+
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:3515
+
virtual fpos_t tell() const
Returns absolute file position in file or fpos_max if fails. This method does not update stream state...
Definition stream.hpp:3881
+
size_t m_reserved
reserved file size
Definition stream.hpp:4038
+
memory_file(size_t size, state_t state=state_t::ok)
Creates an empty file of reserved size.
Definition stream.hpp:3204
+
void reserve(size_t required, bool tight=false) noexcept
Reallocates memory.
Definition stream.hpp:3404
+
memory_file(memory_file &&other) noexcept
Moves content from another file.
Definition stream.hpp:3337
+
void write_byte(uint8_t byte, size_t amount=1)
Writes a byte of data.
Definition stream.hpp:3649
+
memory_file & operator=(const memory_file &other)
Copies content from another file.
Definition stream.hpp:3307
+
void set(fpos_t offset, const T data)
Writes data to specified file location This does not move file pointer nor update file size....
Definition stream.hpp:3941
+
size_t m_offset
file pointer
Definition stream.hpp:4036
+
void save(const schar_t *filename, int mode)
Saves content to a file-system file.
Definition stream.hpp:3478
+
void load(const schar_t *filename, int mode)
Loads content from a file-system file.
Definition stream.hpp:3433
+
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:3864
+
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:3891
+
memory_file & write_data(const T data)
Writes one primitive data type.
Definition stream.hpp:3682
+
memory_file & write_str(const T *data)
Writes string to the stream length-prefixed.
Definition stream.hpp:3720
+
bool m_manage
may reallocate m_data?
Definition stream.hpp:4035
+
memory_file(void *data, size_t size, bool manage=false, state_t state=state_t::ok)
Creates a file based on available data.
Definition stream.hpp:3253
+
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:3625
+
memory_file(void *data, size_t size, size_t reserved, bool manage=false, state_t state=state_t::ok)
Creates a file based on available data.
Definition stream.hpp:3230
+
const void * data() const
Returns pointer to data.
Definition stream.hpp:3513
+
Definition stream.hpp:1160
enum stdex::stream::replicator::worker::op_t op
Operation to perform.
-
size_t num_written
Number of bytes written.
Definition stream.hpp:1207
-
size_t length
Byte limit of data to write.
Definition stream.hpp:1206
-
const void * data
Data to write.
Definition stream.hpp:1205
-
Replicates writing of the same data to multiple streams.
Definition stream.hpp:1075
-
void push_back(basic *source)
Adds stream on the list.
Definition stream.hpp:1094
-
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1151
-
void remove(basic *source)
Removes stream from the list.
Definition stream.hpp:1102
-
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:1119
-
virtual void close()
Closes the stream.
Definition stream.hpp:1146
-
Socket stream.
Definition stream.hpp:2345
-
socket_t get() const noexcept
Returns socket handle.
Definition stream.hpp:2401
-
virtual void close()
Closes the stream.
Definition stream.hpp:2447
-
socket(int af, int type, int protocol)
Creates a socket.
Definition stream.hpp:2380
-
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:2403
-
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:2427
-
Limits reading from/writing to stream to a predefined window.
Definition stream.hpp:1599
-
fpos_t write_offset
Number of bytes to discard on write.
Definition stream.hpp:1675
-
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:1636
-
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:1607
-
fpos_t read_offset
Number of bytes to skip on read.
Definition stream.hpp:1674
+
size_t num_written
Number of bytes written.
Definition stream.hpp:1209
+
size_t length
Byte limit of data to write.
Definition stream.hpp:1208
+
const void * data
Data to write.
Definition stream.hpp:1207
+
Replicates writing of the same data to multiple streams.
Definition stream.hpp:1077
+
void push_back(basic *source)
Adds stream on the list.
Definition stream.hpp:1096
+
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1153
+
void remove(basic *source)
Removes stream from the list.
Definition stream.hpp:1104
+
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:1121
+
virtual void close()
Closes the stream.
Definition stream.hpp:1148
+
Socket stream.
Definition stream.hpp:2347
+
socket_t get() const noexcept
Returns socket handle.
Definition stream.hpp:2403
+
virtual void close()
Closes the stream.
Definition stream.hpp:2449
+
socket(int af, int type, int protocol)
Creates a socket.
Definition stream.hpp:2382
+
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:2405
+
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:2429
+
Limits reading from/writing to stream to a predefined window.
Definition stream.hpp:1601
+
fpos_t write_offset
Number of bytes to discard on write.
Definition stream.hpp:1677
+
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:1638
+
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:1609
+
fpos_t read_offset
Number of bytes to skip on read.
Definition stream.hpp:1676
Operating system object (file, pipe, anything with an OS handle etc.)
Definition system.hpp:99
virtual void close()
Closes object.
Definition system.hpp:140
Numerical interval.
Definition interval.hpp:18
@@ -4338,12 +4340,12 @@ $(function() { codefold.init(0); });
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
-
Definition stream.hpp:1516
-
Definition stream.hpp:4136
+
Definition stream.hpp:1518
+
Definition stream.hpp:4138
diff --git a/string_8hpp_source.html b/string_8hpp_source.html index 12cfd3886..2e078cdbd 100644 --- a/string_8hpp_source.html +++ b/string_8hpp_source.html @@ -1979,7 +1979,7 @@ $(function() { codefold.init(0); });
diff --git a/structstdex_1_1chrono_1_1aosn__date-members.html b/structstdex_1_1chrono_1_1aosn__date-members.html index 9b63212e0..df1ccf1f7 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 81a2cf429..a83dfda53 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 efdeed5c1..8f1695228 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 acf868f9c..a53975040 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 ddf780bdb..1f883e691 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 1ec302094..efdd84013 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 56307c98d..ff323fc46 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 5582d669b..97954d39d 100644 --- a/structstdex_1_1html_1_1element__traits.html +++ b/structstdex_1_1html_1_1element__traits.html @@ -821,7 +821,7 @@ template<class T >
diff --git a/structstdex_1_1html_1_1entity-members.html b/structstdex_1_1html_1_1entity-members.html index f0a20c62e..34cd6c1a9 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 5a18c6352..7d0d2caac 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 955185bb7..0c7fb9dbe 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 a14e5aed5..7a2ef72cd 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 1cce37628..623254de8 100644 --- a/structstdex_1_1interval-members.html +++ b/structstdex_1_1interval-members.html @@ -105,7 +105,7 @@ $(function() {
diff --git a/structstdex_1_1interval.html b/structstdex_1_1interval.html index 725759df9..1289c29dd 100644 --- a/structstdex_1_1interval.html +++ b/structstdex_1_1interval.html @@ -707,7 +707,7 @@ template<class T >
diff --git a/structstdex_1_1mapping-members.html b/structstdex_1_1mapping-members.html index 1c01fb906..e7f15ab7f 100644 --- a/structstdex_1_1mapping-members.html +++ b/structstdex_1_1mapping-members.html @@ -92,7 +92,7 @@ $(function() {
diff --git a/structstdex_1_1mapping.html b/structstdex_1_1mapping.html index c912c09b1..0234d4f4e 100644 --- a/structstdex_1_1mapping.html +++ b/structstdex_1_1mapping.html @@ -275,7 +275,7 @@ template<class T >
diff --git a/structstdex_1_1no__delete-members.html b/structstdex_1_1no__delete-members.html index f2c896af8..1a2a56182 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 b0fc08989..469eb5f96 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 163cd3d39..8542f67c9 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 ef7fc81b4..05a0f87ed 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 79ae7a129..09e8b6066 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 a2f91360b..0b3e0be18 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 d72c98212..c36598c30 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 6a25fdb39..9bc58c88e 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 372fd6bbe..25fbb0bf3 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 296f8d4a2..3b98f5d23 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 c528e1003..d82751366 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 3e1da8bda..d262ccdb0 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 441d77cca..fb0f893cc 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 040e9842d..12b8cfe1e 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 efdedc155..1e49d6336 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 64c9fe011..91d047dd7 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 e20b12fdc..9126a5c51 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 ece3904d2..4aa4e7295 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 e76883210..f092fa894 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 ec85ee23f..fdebb9ae2 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 3a6fdd8d6..a5b00e050 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 8e3566470..7ecaa5af5 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 de8571ba3..3b5c312b0 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 87880b762..56a1e109b 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 d4e4390c5..a9d7aac62 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 f47116ec1..5fefe567a 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 c09c9bad5..d8659675d 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 049d4ec51..ac28e434f 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 31b2f8fdb..89efca552 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 6f292438c..7893e89c9 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 a30248658..b606d7eb9 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 f57ab3dbe..8ef7cf2e5 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 65e7b335b..2e7a94bbb 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 0e28dccb6..4eb8eea8c 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 cf8d0b3c6..8031c42cf 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 6fa826a88..9b439f2ac 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 314da910b..b4fcc3a55 100644 --- a/sys__info_8hpp_source.html +++ b/sys__info_8hpp_source.html @@ -300,7 +300,7 @@ $(function() { codefold.init(0); });
diff --git a/system_8hpp_source.html b/system_8hpp_source.html index 0db08fa77..25c314f5c 100644 --- a/system_8hpp_source.html +++ b/system_8hpp_source.html @@ -294,7 +294,7 @@ $(function() { codefold.init(0); });
diff --git a/unicode_8cpp_source.html b/unicode_8cpp_source.html index 05e67f400..96b4b198b 100644 --- a/unicode_8cpp_source.html +++ b/unicode_8cpp_source.html @@ -195,7 +195,7 @@ $(function() { codefold.init(0); });
diff --git a/unicode_8hpp_source.html b/unicode_8hpp_source.html index 08a625245..4a37683ae 100644 --- a/unicode_8hpp_source.html +++ b/unicode_8hpp_source.html @@ -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 2cdaef2d5..b7a236e7a 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 11b6f29cc..dbadb2ef0 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 f1dfb3f93..6fec38556 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 392f221c2..b2660bdba 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 cbcf8db03..2093cf04e 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 68942d8c3..5e5ce9486 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 619a95035..2f8d3dfe1 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 414c80e87..66bfd4747 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 3e538a0ae..c5fe004ea 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 bd32737b2..c78718cb4 100644 --- a/watchdog_8hpp_source.html +++ b/watchdog_8hpp_source.html @@ -178,7 +178,7 @@ $(function() { codefold.init(0); }); diff --git a/wav_8hpp_source.html b/wav_8hpp_source.html index a78196d68..1909ff7b9 100644 --- a/wav_8hpp_source.html +++ b/wav_8hpp_source.html @@ -719,13 +719,13 @@ $(function() { codefold.init(0); });
static constexpr T_id id()
Returns record id.
Definition idrec.hpp:310
Basic seekable stream operations.
Definition stream.hpp:812
‍UTF-8 byte-order-mark
Definition stream.hpp:79
-
Limits file reading/writing to a predefined window.
Definition stream.hpp:1682
-
In-memory file.
Definition stream.hpp:3181
-
virtual fsize_t size() const
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:3884
-
size_t write_stream(basic &stream, size_t amount=SIZE_MAX)
Writes content of another stream.
Definition stream.hpp:3798
-
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:3862
-
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:3889
-
const void * data() const
Returns pointer to data.
Definition stream.hpp:3511
+
Limits file reading/writing to a predefined window.
Definition stream.hpp:1684
+
In-memory file.
Definition stream.hpp:3183
+
virtual fsize_t size() const
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:3886
+
size_t write_stream(basic &stream, size_t amount=SIZE_MAX)
Writes content of another stream.
Definition stream.hpp:3800
+
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:3864
+
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:3891
+
const void * data() const
Returns pointer to data.
Definition stream.hpp:3513
Extended cue.
Definition wav.hpp:397
uint32_t duration
How many samples from the cue point the region or section spans.
Definition wav.hpp:398
std::string note
Note text.
Definition wav.hpp:406
@@ -789,7 +789,7 @@ $(function() { codefold.init(0); }); diff --git a/windows_8h_source.html b/windows_8h_source.html index b2519ae28..f12b19b11 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 bbb06555c..7a4465c27 100644 --- a/zlib_8hpp_source.html +++ b/zlib_8hpp_source.html @@ -258,7 +258,7 @@ $(function() { codefold.init(0); });
state_t state() const
Returns stream state after last operation.
Definition stream.hpp:170
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:96
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:114
-
Modifies data on the fly when reading from/writing to a source stream. Could also be used to modify r...
Definition stream.hpp:1010
+
Modifies data on the fly when reading from/writing to a source stream. Could also be used to modify r...
Definition stream.hpp:1012
Decompresses data when reading from a stream.
Definition zlib.hpp:114
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition zlib.hpp:131
Compresses data when writing to a stream.
Definition zlib.hpp:45
@@ -266,7 +266,7 @@ $(function() { codefold.init(0); });