From 700a2eda088490388d75239bc2e52816dd7faecf Mon Sep 17 00:00:00 2001 From: rozmansi Date: Mon, 21 Aug 2023 08:28:11 +0000 Subject: [PATCH] deploy: 55d39b1566322683b67864dfd13ad7ae248856ef --- annotated.html | 2 +- base64_8hpp_source.html | 2 +- chrono_8hpp_source.html | 2 +- classes.html | 2 +- classstdex_1_1base64__dec-members.html | 2 +- classstdex_1_1base64__dec.html | 2 +- classstdex_1_1base64__enc-members.html | 2 +- classstdex_1_1base64__enc.html | 2 +- classstdex_1_1errno__error-members.html | 2 +- classstdex_1_1errno__error.html | 2 +- classstdex_1_1global__progress-members.html | 2 +- classstdex_1_1global__progress.html | 2 +- classstdex_1_1hex__dec-members.html | 2 +- classstdex_1_1hex__dec.html | 2 +- classstdex_1_1hex__enc-members.html | 2 +- classstdex_1_1hex__enc.html | 2 +- classstdex_1_1idrec_1_1record-members.html | 2 +- classstdex_1_1idrec_1_1record.html | 2 +- classstdex_1_1lazy__progress-members.html | 2 +- classstdex_1_1lazy__progress.html | 2 +- ...dex_1_1parser_1_1basic__angle-members.html | 2 +- classstdex_1_1parser_1_1basic__angle.html | 2 +- ...x_1_1parser_1_1basic__any__cu-members.html | 2 +- classstdex_1_1parser_1_1basic__any__cu.html | 2 +- ...stdex_1_1parser_1_1basic__bol-members.html | 2 +- classstdex_1_1parser_1_1basic__bol.html | 2 +- ...ex_1_1parser_1_1basic__branch-members.html | 2 +- classstdex_1_1parser_1_1basic__branch.html | 2 +- ...r_1_1basic__chemical__formula-members.html | 2 +- ...1_1parser_1_1basic__chemical__formula.html | 2 +- ...sstdex_1_1parser_1_1basic__cu-members.html | 2 +- classstdex_1_1parser_1_1basic__cu.html | 2 +- ...x_1_1parser_1_1basic__cu__set-members.html | 2 +- classstdex_1_1parser_1_1basic__cu__set.html | 2 +- ...tdex_1_1parser_1_1basic__date-members.html | 2 +- classstdex_1_1parser_1_1basic__date.html | 2 +- ...r_1_1basic__dns__domain__char-members.html | 2 +- ...1_1parser_1_1basic__dns__domain__char.html | 2 +- ...1_1parser_1_1basic__dns__name-members.html | 2 +- classstdex_1_1parser_1_1basic__dns__name.html | 2 +- ...rser_1_1basic__email__address-members.html | 2 +- ...ex_1_1parser_1_1basic__email__address.html | 2 +- ..._1_1parser_1_1basic__emoticon-members.html | 2 +- classstdex_1_1parser_1_1basic__emoticon.html | 2 +- ...stdex_1_1parser_1_1basic__eol-members.html | 2 +- classstdex_1_1parser_1_1basic__eol.html | 2 +- ..._1_1parser_1_1basic__fraction-members.html | 2 +- classstdex_1_1parser_1_1basic__fraction.html | 2 +- ...x_1_1parser_1_1basic__integer-members.html | 2 +- classstdex_1_1parser_1_1basic__integer.html | 2 +- ...1_1parser_1_1basic__integer10-members.html | 2 +- classstdex_1_1parser_1_1basic__integer10.html | 2 +- ...1parser_1_1basic__integer10ts-members.html | 2 +- ...stdex_1_1parser_1_1basic__integer10ts.html | 2 +- ...1_1parser_1_1basic__integer16-members.html | 2 +- classstdex_1_1parser_1_1basic__integer16.html | 2 +- ...arser_1_1basic__ipv4__address-members.html | 2 +- ...dex_1_1parser_1_1basic__ipv4__address.html | 2 +- ...arser_1_1basic__ipv6__address-members.html | 2 +- ...dex_1_1parser_1_1basic__ipv6__address.html | 2 +- ...1basic__ipv6__scope__id__char-members.html | 2 +- ...arser_1_1basic__ipv6__scope__id__char.html | 2 +- ..._1parser_1_1basic__iterations-members.html | 2 +- ...sstdex_1_1parser_1_1basic__iterations.html | 2 +- ...parser_1_1basic__json__string-members.html | 2 +- ...tdex_1_1parser_1_1basic__json__string.html | 2 +- ...rser_1_1basic__mixed__numeral-members.html | 2 +- ...ex_1_1parser_1_1basic__mixed__numeral.html | 2 +- ...r_1_1basic__monetary__numeral-members.html | 2 +- ...1_1parser_1_1basic__monetary__numeral.html | 2 +- ...tdex_1_1parser_1_1basic__noop-members.html | 2 +- classstdex_1_1parser_1_1basic__noop.html | 2 +- ...ex_1_1parser_1_1basic__parser-members.html | 2 +- classstdex_1_1parser_1_1basic__parser.html | 2 +- ...1parser_1_1basic__permutation-members.html | 2 +- ...stdex_1_1parser_1_1basic__permutation.html | 2 +- ...arser_1_1basic__phone__number-members.html | 2 +- ...dex_1_1parser_1_1basic__phone__number.html | 2 +- ...1_1parser_1_1basic__punct__cu-members.html | 2 +- classstdex_1_1parser_1_1basic__punct__cu.html | 2 +- ...rser_1_1basic__roman__numeral-members.html | 2 +- ...ex_1_1parser_1_1basic__roman__numeral.html | 2 +- ...1_1basic__scientific__numeral-members.html | 2 +- ...1parser_1_1basic__scientific__numeral.html | 2 +- ...dex_1_1parser_1_1basic__score-members.html | 2 +- classstdex_1_1parser_1_1basic__score.html | 2 +- ..._1_1parser_1_1basic__sequence-members.html | 2 +- classstdex_1_1parser_1_1basic__sequence.html | 2 +- ...stdex_1_1parser_1_1basic__set-members.html | 2 +- classstdex_1_1parser_1_1basic__set.html | 2 +- ...ser_1_1basic__signed__numeral-members.html | 2 +- ...x_1_1parser_1_1basic__signed__numeral.html | 2 +- ...1_1parser_1_1basic__space__cu-members.html | 2 +- classstdex_1_1parser_1_1basic__space__cu.html | 2 +- ..._1basic__space__or__punct__cu-members.html | 2 +- ...parser_1_1basic__space__or__punct__cu.html | 2 +- ...ex_1_1parser_1_1basic__string-members.html | 2 +- classstdex_1_1parser_1_1basic__string.html | 2 +- ...rser_1_1basic__string__branch-members.html | 2 +- ...ex_1_1parser_1_1basic__string__branch.html | 2 +- ...tdex_1_1parser_1_1basic__time-members.html | 2 +- classstdex_1_1parser_1_1basic__time.html | 2 +- ...stdex_1_1parser_1_1basic__url-members.html | 2 +- classstdex_1_1parser_1_1basic__url.html | 2 +- ...1_1basic__url__password__char-members.html | 2 +- ...1parser_1_1basic__url__password__char.html | 2 +- ...1_1parser_1_1basic__url__path-members.html | 2 +- classstdex_1_1parser_1_1basic__url__path.html | 2 +- ...ser_1_1basic__url__path__char-members.html | 2 +- ...x_1_1parser_1_1basic__url__path__char.html | 2 +- ...1_1basic__url__username__char-members.html | 2 +- ...1parser_1_1basic__url__username__char.html | 2 +- ...tdex_1_1parser_1_1http__agent-members.html | 2 +- classstdex_1_1parser_1_1http__agent.html | 2 +- ..._1_1parser_1_1http__any__type-members.html | 2 +- classstdex_1_1parser_1_1http__any__type.html | 2 +- ...x_1_1parser_1_1http__asterisk-members.html | 2 +- classstdex_1_1parser_1_1http__asterisk.html | 2 +- ...dex_1_1parser_1_1http__cookie-members.html | 2 +- classstdex_1_1parser_1_1http__cookie.html | 2 +- ...er_1_1http__cookie__parameter-members.html | 2 +- ..._1_1parser_1_1http__cookie__parameter.html | 2 +- ...dex_1_1parser_1_1http__header-members.html | 2 +- classstdex_1_1parser_1_1http__header.html | 2 +- ...x_1_1parser_1_1http__language-members.html | 2 +- classstdex_1_1parser_1_1http__language.html | 2 +- ..._1parser_1_1http__line__break-members.html | 2 +- ...sstdex_1_1parser_1_1http__line__break.html | 2 +- ...1parser_1_1http__media__range-members.html | 2 +- ...stdex_1_1parser_1_1http__media__range.html | 2 +- ..._1parser_1_1http__media__type-members.html | 2 +- ...sstdex_1_1parser_1_1http__media__type.html | 2 +- ..._1_1parser_1_1http__parameter-members.html | 2 +- classstdex_1_1parser_1_1http__parameter.html | 2 +- ...x_1_1parser_1_1http__protocol-members.html | 2 +- classstdex_1_1parser_1_1http__protocol.html | 2 +- ...arser_1_1http__quoted__string-members.html | 2 +- ...dex_1_1parser_1_1http__quoted__string.html | 2 +- ...ex_1_1parser_1_1http__request-members.html | 2 +- classstdex_1_1parser_1_1http__request.html | 2 +- ...tdex_1_1parser_1_1http__space-members.html | 2 +- classstdex_1_1parser_1_1http__space.html | 2 +- ...1_1parser_1_1http__text__char-members.html | 2 +- classstdex_1_1parser_1_1http__text__char.html | 2 +- ...tdex_1_1parser_1_1http__token-members.html | 2 +- classstdex_1_1parser_1_1http__token.html | 2 +- ...sstdex_1_1parser_1_1http__url-members.html | 2 +- classstdex_1_1parser_1_1http__url.html | 2 +- ...arser_1_1http__url__parameter-members.html | 2 +- ...dex_1_1parser_1_1http__url__parameter.html | 2 +- ..._1_1parser_1_1http__url__path-members.html | 2 +- classstdex_1_1parser_1_1http__url__path.html | 2 +- ...r_1_1http__url__path__segment-members.html | 2 +- ...1_1parser_1_1http__url__path__segment.html | 2 +- ..._1_1parser_1_1http__url__port-members.html | 2 +- classstdex_1_1parser_1_1http__url__port.html | 2 +- ..._1parser_1_1http__url__server-members.html | 2 +- ...sstdex_1_1parser_1_1http__url__server.html | 2 +- ...tdex_1_1parser_1_1http__value-members.html | 2 +- classstdex_1_1parser_1_1http__value.html | 2 +- ...er_1_1http__value__collection-members.html | 2 +- ..._1_1parser_1_1http__value__collection.html | 2 +- ...dex_1_1parser_1_1http__weight-members.html | 2 +- classstdex_1_1parser_1_1http__weight.html | 2 +- ...rser_1_1http__weighted__value-members.html | 2 +- ...ex_1_1parser_1_1http__weighted__value.html | 2 +- ...1parser_1_1parser__collection-members.html | 2 +- ...stdex_1_1parser_1_1parser__collection.html | 2 +- ...ex_1_1parser_1_1sgml__any__cp-members.html | 2 +- classstdex_1_1parser_1_1sgml__any__cp.html | 2 +- classstdex_1_1parser_1_1sgml__cp-members.html | 2 +- classstdex_1_1parser_1_1sgml__cp.html | 2 +- ...ex_1_1parser_1_1sgml__cp__set-members.html | 2 +- classstdex_1_1parser_1_1sgml__cp__set.html | 2 +- ...er_1_1sgml__dns__domain__char-members.html | 2 +- ..._1_1parser_1_1sgml__dns__domain__char.html | 2 +- ..._1sgml__ipv6__scope__id__char-members.html | 2 +- ...parser_1_1sgml__ipv6__scope__id__char.html | 2 +- ..._1_1parser_1_1sgml__punct__cp-members.html | 2 +- classstdex_1_1parser_1_1sgml__punct__cp.html | 2 +- ..._1_1parser_1_1sgml__space__cp-members.html | 2 +- classstdex_1_1parser_1_1sgml__space__cp.html | 2 +- ...1_1sgml__space__or__punct__cp-members.html | 2 +- ...1parser_1_1sgml__space__or__punct__cp.html | 2 +- ...dex_1_1parser_1_1sgml__string-members.html | 2 +- classstdex_1_1parser_1_1sgml__string.html | 2 +- ..._1_1sgml__url__password__char-members.html | 2 +- ..._1parser_1_1sgml__url__password__char.html | 2 +- ...rser_1_1sgml__url__path__char-members.html | 2 +- ...ex_1_1parser_1_1sgml__url__path__char.html | 2 +- ..._1_1sgml__url__username__char-members.html | 2 +- ..._1parser_1_1sgml__url__username__char.html | 2 +- classstdex_1_1progress-members.html | 2 +- classstdex_1_1progress.html | 2 +- classstdex_1_1progress__switcher-members.html | 2 +- classstdex_1_1progress__switcher.html | 2 +- classstdex_1_1ring-members.html | 2 +- classstdex_1_1ring.html | 2 +- ...ex_1_1stream_1_1async__reader-members.html | 2 +- classstdex_1_1stream_1_1async__reader.html | 2 +- ...ex_1_1stream_1_1async__writer-members.html | 2 +- classstdex_1_1stream_1_1async__writer.html | 2 +- classstdex_1_1stream_1_1basic-members.html | 2 +- classstdex_1_1stream_1_1basic.html | 2 +- ...tdex_1_1stream_1_1basic__file-members.html | 2 +- classstdex_1_1stream_1_1basic__file.html | 2 +- ...stdex_1_1stream_1_1basic__sys-members.html | 2 +- classstdex_1_1stream_1_1basic__sys.html | 2 +- classstdex_1_1stream_1_1buffer-members.html | 2 +- classstdex_1_1stream_1_1buffer.html | 2 +- ...ex_1_1stream_1_1buffered__sys-members.html | 2 +- classstdex_1_1stream_1_1buffered__sys.html | 2 +- classstdex_1_1stream_1_1cache-members.html | 21 +- classstdex_1_1stream_1_1cache.html | 5 +- ...dex_1_1stream_1_1cached__file-members.html | 21 +- classstdex_1_1stream_1_1cached__file.html | 5 +- ...sstdex_1_1stream_1_1converter-members.html | 2 +- classstdex_1_1stream_1_1converter.html | 2 +- ...stdex_1_1stream_1_1diag__file-members.html | 2 +- classstdex_1_1stream_1_1diag__file.html | 2 +- classstdex_1_1stream_1_1fifo-members.html | 2 +- classstdex_1_1stream_1_1fifo.html | 2 +- classstdex_1_1stream_1_1file-members.html | 2 +- classstdex_1_1stream_1_1file.html | 2 +- ...dex_1_1stream_1_1file__window-members.html | 2 +- classstdex_1_1stream_1_1file__window.html | 2 +- classstdex_1_1stream_1_1limiter-members.html | 2 +- classstdex_1_1stream_1_1limiter.html | 2 +- ...dex_1_1stream_1_1memory__file-members.html | 2 +- classstdex_1_1stream_1_1memory__file.html | 2 +- ...stdex_1_1stream_1_1replicator-members.html | 2 +- classstdex_1_1stream_1_1replicator.html | 2 +- ...tream_1_1replicator_1_1worker-members.html | 2 +- ...dex_1_1stream_1_1replicator_1_1worker.html | 2 +- classstdex_1_1stream_1_1window-members.html | 2 +- classstdex_1_1stream_1_1window.html | 2 +- classstdex_1_1sys__object-members.html | 2 +- classstdex_1_1sys__object.html | 2 +- classstdex_1_1user__cancelled-members.html | 2 +- classstdex_1_1user__cancelled.html | 2 +- classstdex_1_1vector__queue-members.html | 2 +- classstdex_1_1vector__queue.html | 2 +- dir_4be4f7b278e009bf0f1906cf31fb73bd.html | 2 +- dir_d44c64559bbebec7f509842c48db8b23.html | 2 +- dir_fca3c47b2ea228727bd6729832f89576.html | 2 +- endian_8hpp_source.html | 2 +- errno_8hpp_source.html | 2 +- exception_8hpp_source.html | 2 +- files.html | 2 +- functions.html | 2 +- functions_b.html | 2 +- functions_c.html | 2 +- functions_d.html | 2 +- functions_e.html | 2 +- functions_f.html | 2 +- functions_func.html | 2 +- functions_func_b.html | 2 +- functions_func_c.html | 2 +- functions_func_d.html | 2 +- functions_func_e.html | 2 +- functions_func_f.html | 2 +- functions_func_g.html | 2 +- functions_func_h.html | 2 +- functions_func_i.html | 2 +- functions_func_l.html | 2 +- functions_func_m.html | 2 +- functions_func_n.html | 2 +- functions_func_o.html | 2 +- functions_func_p.html | 2 +- functions_func_q.html | 2 +- functions_func_r.html | 2 +- functions_func_s.html | 2 +- functions_func_t.html | 2 +- functions_func_u.html | 2 +- functions_func_v.html | 2 +- functions_func_w.html | 2 +- functions_func_~.html | 2 +- functions_g.html | 2 +- functions_h.html | 2 +- functions_i.html | 2 +- functions_l.html | 2 +- functions_m.html | 2 +- functions_n.html | 2 +- functions_o.html | 2 +- functions_p.html | 2 +- functions_q.html | 2 +- functions_r.html | 2 +- functions_s.html | 2 +- functions_t.html | 2 +- functions_type.html | 2 +- functions_u.html | 2 +- functions_v.html | 2 +- functions_vars.html | 2 +- functions_w.html | 2 +- functions_~.html | 2 +- hex_8hpp_source.html | 2 +- hierarchy.html | 2 +- idrec_8hpp_source.html | 2 +- index.html | 2 +- interval_8hpp_source.html | 2 +- mapping_8hpp_source.html | 2 +- math_8hpp_source.html | 2 +- memory_8hpp_source.html | 2 +- parser_8hpp_source.html | 2 +- pch_8h_source.html | 2 +- progress_8hpp_source.html | 2 +- ring_8hpp_source.html | 2 +- sal_8hpp_source.html | 2 +- sgml_8hpp_source.html | 2 +- sgml__unicode_8hpp_source.html | 2 +- stream_8hpp_source.html | 3789 +++++++++-------- string_8hpp_source.html | 2 +- ...tdex_1_1chrono_1_1aosn__clock-members.html | 2 +- structstdex_1_1chrono_1_1aosn__clock.html | 2 +- structstdex_1_1interval-members.html | 2 +- structstdex_1_1interval.html | 2 +- structstdex_1_1mapping-members.html | 2 +- structstdex_1_1mapping.html | 2 +- structstdex_1_1no__delete-members.html | 2 +- structstdex_1_1no__delete.html | 2 +- ..._1_1no__delete_3_01_t_0f_0e_4-members.html | 2 +- structstdex_1_1no__delete_3_01_t_0f_0e_4.html | 2 +- ...1parser_1_1http__factor__more-members.html | 2 +- ...stdex_1_1parser_1_1http__factor__more.html | 2 +- ...stream_1_1buffer_1_1buffer__t-members.html | 2 +- ...tdex_1_1stream_1_1buffer_1_1buffer__t.html | 2 +- ..._1stream_1_1cache_1_1cache__t-members.html | 2 +- ...tstdex_1_1stream_1_1cache_1_1cache__t.html | 2 +- ..._1_1stream_1_1fifo_1_1node__t-members.html | 2 +- structstdex_1_1stream_1_1fifo_1_1node__t.html | 2 +- system_8hpp_source.html | 309 +- unicode_8hpp_source.html | 2 +- vector__queue_8hpp_source.html | 2 +- 333 files changed, 2418 insertions(+), 2386 deletions(-) diff --git a/annotated.html b/annotated.html index 67125e478..a3ef5ad7b 100644 --- a/annotated.html +++ b/annotated.html @@ -216,7 +216,7 @@ $(function() { diff --git a/base64_8hpp_source.html b/base64_8hpp_source.html index 356422975..626ec942f 100644 --- a/base64_8hpp_source.html +++ b/base64_8hpp_source.html @@ -318,7 +318,7 @@ $(function() { diff --git a/chrono_8hpp_source.html b/chrono_8hpp_source.html index d1bf9bf8c..2cc000bf7 100644 --- a/chrono_8hpp_source.html +++ b/chrono_8hpp_source.html @@ -234,7 +234,7 @@ $(function() { diff --git a/classes.html b/classes.html index 87a65ceb3..dfc45ac33 100644 --- a/classes.html +++ b/classes.html @@ -133,7 +133,7 @@ $(function() { diff --git a/classstdex_1_1base64__dec-members.html b/classstdex_1_1base64__dec-members.html index bfc50da21..649a41acc 100644 --- a/classstdex_1_1base64__dec-members.html +++ b/classstdex_1_1base64__dec-members.html @@ -90,7 +90,7 @@ $(function() { diff --git a/classstdex_1_1base64__dec.html b/classstdex_1_1base64__dec.html index a33a83b65..a80e5515d 100644 --- a/classstdex_1_1base64__dec.html +++ b/classstdex_1_1base64__dec.html @@ -230,7 +230,7 @@ template<class _Ty , class _Ax , class _Tchr > diff --git a/classstdex_1_1base64__enc-members.html b/classstdex_1_1base64__enc-members.html index 9a29aab90..44934b59b 100644 --- a/classstdex_1_1base64__enc-members.html +++ b/classstdex_1_1base64__enc-members.html @@ -91,7 +91,7 @@ $(function() { diff --git a/classstdex_1_1base64__enc.html b/classstdex_1_1base64__enc.html index 8372d0df6..7d6363438 100644 --- a/classstdex_1_1base64__enc.html +++ b/classstdex_1_1base64__enc.html @@ -235,7 +235,7 @@ template<class _Elem , class _Traits , class _Ax > diff --git a/classstdex_1_1errno__error-members.html b/classstdex_1_1errno__error-members.html index 24163a001..8486d58e9 100644 --- a/classstdex_1_1errno__error-members.html +++ b/classstdex_1_1errno__error-members.html @@ -89,7 +89,7 @@ $(function() { diff --git a/classstdex_1_1errno__error.html b/classstdex_1_1errno__error.html index f715f32a3..34fb877f8 100644 --- a/classstdex_1_1errno__error.html +++ b/classstdex_1_1errno__error.html @@ -286,7 +286,7 @@ errno_t m_num diff --git a/classstdex_1_1global__progress-members.html b/classstdex_1_1global__progress-members.html index 1ccfc543e..8d3bcdf0c 100644 --- a/classstdex_1_1global__progress-members.html +++ b/classstdex_1_1global__progress-members.html @@ -97,7 +97,7 @@ $(function() { diff --git a/classstdex_1_1global__progress.html b/classstdex_1_1global__progress.html index 72e38ae54..5d623ba75 100644 --- a/classstdex_1_1global__progress.html +++ b/classstdex_1_1global__progress.html @@ -562,7 +562,7 @@ template<class T > diff --git a/classstdex_1_1hex__dec-members.html b/classstdex_1_1hex__dec-members.html index 9cb5d951e..c4f3cc904 100644 --- a/classstdex_1_1hex__dec-members.html +++ b/classstdex_1_1hex__dec-members.html @@ -89,7 +89,7 @@ $(function() { diff --git a/classstdex_1_1hex__dec.html b/classstdex_1_1hex__dec.html index e924dc0b6..ab2039527 100644 --- a/classstdex_1_1hex__dec.html +++ b/classstdex_1_1hex__dec.html @@ -221,7 +221,7 @@ template<class _Ty , class _Ax , class _Tchr > diff --git a/classstdex_1_1hex__enc-members.html b/classstdex_1_1hex__enc-members.html index d2b6a9752..57b86978f 100644 --- a/classstdex_1_1hex__enc-members.html +++ b/classstdex_1_1hex__enc-members.html @@ -86,7 +86,7 @@ $(function() { diff --git a/classstdex_1_1hex__enc.html b/classstdex_1_1hex__enc.html index 1952b599f..b5f1bdc18 100644 --- a/classstdex_1_1hex__enc.html +++ b/classstdex_1_1hex__enc.html @@ -198,7 +198,7 @@ template<class _Elem , class _Traits , class _Ax > diff --git a/classstdex_1_1idrec_1_1record-members.html b/classstdex_1_1idrec_1_1record-members.html index bf04da367..40cc89d74 100644 --- a/classstdex_1_1idrec_1_1record-members.html +++ b/classstdex_1_1idrec_1_1record-members.html @@ -91,7 +91,7 @@ $(function() { diff --git a/classstdex_1_1idrec_1_1record.html b/classstdex_1_1idrec_1_1record.html index 402dbc282..f6744b0d1 100644 --- a/classstdex_1_1idrec_1_1record.html +++ b/classstdex_1_1idrec_1_1record.html @@ -380,7 +380,7 @@ template<class T , class T_ID , const T_ID ID, class T_SIZE , unsigned int AL diff --git a/classstdex_1_1lazy__progress-members.html b/classstdex_1_1lazy__progress-members.html index 9b0539aab..284030dbb 100644 --- a/classstdex_1_1lazy__progress-members.html +++ b/classstdex_1_1lazy__progress-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1lazy__progress.html b/classstdex_1_1lazy__progress.html index 2bb8f1e9c..65c2f1d22 100644 --- a/classstdex_1_1lazy__progress.html +++ b/classstdex_1_1lazy__progress.html @@ -285,7 +285,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__angle-members.html b/classstdex_1_1parser_1_1basic__angle-members.html index c013ed6c2..c2abe5db6 100644 --- a/classstdex_1_1parser_1_1basic__angle-members.html +++ b/classstdex_1_1parser_1_1basic__angle-members.html @@ -99,7 +99,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__angle.html b/classstdex_1_1parser_1_1basic__angle.html index 28bcee3a0..18dec43eb 100644 --- a/classstdex_1_1parser_1_1basic__angle.html +++ b/classstdex_1_1parser_1_1basic__angle.html @@ -250,7 +250,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__any__cu-members.html b/classstdex_1_1parser_1_1basic__any__cu-members.html index 6bba86167..952f50a75 100644 --- a/classstdex_1_1parser_1_1basic__any__cu-members.html +++ b/classstdex_1_1parser_1_1basic__any__cu-members.html @@ -92,7 +92,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__any__cu.html b/classstdex_1_1parser_1_1basic__any__cu.html index 636665f93..8c7ab44a4 100644 --- a/classstdex_1_1parser_1_1basic__any__cu.html +++ b/classstdex_1_1parser_1_1basic__any__cu.html @@ -194,7 +194,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__bol-members.html b/classstdex_1_1parser_1_1basic__bol-members.html index 8c02600ed..a943fae82 100644 --- a/classstdex_1_1parser_1_1basic__bol-members.html +++ b/classstdex_1_1parser_1_1basic__bol-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__bol.html b/classstdex_1_1parser_1_1basic__bol.html index 859fce841..6921fbef8 100644 --- a/classstdex_1_1parser_1_1basic__bol.html +++ b/classstdex_1_1parser_1_1basic__bol.html @@ -201,7 +201,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__branch-members.html b/classstdex_1_1parser_1_1basic__branch-members.html index f8442557b..72c350b62 100644 --- a/classstdex_1_1parser_1_1basic__branch-members.html +++ b/classstdex_1_1parser_1_1basic__branch-members.html @@ -99,7 +99,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__branch.html b/classstdex_1_1parser_1_1basic__branch.html index 8e3728b1b..a0fdd95dc 100644 --- a/classstdex_1_1parser_1_1basic__branch.html +++ b/classstdex_1_1parser_1_1basic__branch.html @@ -261,7 +261,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__chemical__formula-members.html b/classstdex_1_1parser_1_1basic__chemical__formula-members.html index 87f1d1958..484a9591b 100644 --- a/classstdex_1_1parser_1_1basic__chemical__formula-members.html +++ b/classstdex_1_1parser_1_1basic__chemical__formula-members.html @@ -97,7 +97,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__chemical__formula.html b/classstdex_1_1parser_1_1basic__chemical__formula.html index b8fcede0c..29d21510f 100644 --- a/classstdex_1_1parser_1_1basic__chemical__formula.html +++ b/classstdex_1_1parser_1_1basic__chemical__formula.html @@ -245,7 +245,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__cu-members.html b/classstdex_1_1parser_1_1basic__cu-members.html index 2d4e5d1d8..2b21ca178 100644 --- a/classstdex_1_1parser_1_1basic__cu-members.html +++ b/classstdex_1_1parser_1_1basic__cu-members.html @@ -94,7 +94,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__cu.html b/classstdex_1_1parser_1_1basic__cu.html index 41f7877dc..70b5cf8b7 100644 --- a/classstdex_1_1parser_1_1basic__cu.html +++ b/classstdex_1_1parser_1_1basic__cu.html @@ -204,7 +204,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__cu__set-members.html b/classstdex_1_1parser_1_1basic__cu__set-members.html index f31cf7a9d..c5400bcfa 100644 --- a/classstdex_1_1parser_1_1basic__cu__set-members.html +++ b/classstdex_1_1parser_1_1basic__cu__set-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__cu__set.html b/classstdex_1_1parser_1_1basic__cu__set.html index 53832e63d..cfee6f0d2 100644 --- a/classstdex_1_1parser_1_1basic__cu__set.html +++ b/classstdex_1_1parser_1_1basic__cu__set.html @@ -218,7 +218,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__date-members.html b/classstdex_1_1parser_1_1basic__date-members.html index dd391ab18..88ad78add 100644 --- a/classstdex_1_1parser_1_1basic__date-members.html +++ b/classstdex_1_1parser_1_1basic__date-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__date.html b/classstdex_1_1parser_1_1basic__date.html index 5937a2b3c..de276cd1c 100644 --- a/classstdex_1_1parser_1_1basic__date.html +++ b/classstdex_1_1parser_1_1basic__date.html @@ -258,7 +258,7 @@ template<class T > 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 6137882ac..f7eacad0c 100644 --- a/classstdex_1_1parser_1_1basic__dns__domain__char-members.html +++ b/classstdex_1_1parser_1_1basic__dns__domain__char-members.html @@ -94,7 +94,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 607a13373..c9be44270 100644 --- a/classstdex_1_1parser_1_1basic__dns__domain__char.html +++ b/classstdex_1_1parser_1_1basic__dns__domain__char.html @@ -206,7 +206,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__dns__name-members.html b/classstdex_1_1parser_1_1basic__dns__name-members.html index db5ecc459..44bc2dd8f 100644 --- a/classstdex_1_1parser_1_1basic__dns__name-members.html +++ b/classstdex_1_1parser_1_1basic__dns__name-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__dns__name.html b/classstdex_1_1parser_1_1basic__dns__name.html index 9f96a6878..e2ff5c925 100644 --- a/classstdex_1_1parser_1_1basic__dns__name.html +++ b/classstdex_1_1parser_1_1basic__dns__name.html @@ -208,7 +208,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__email__address-members.html b/classstdex_1_1parser_1_1basic__email__address-members.html index cbb599001..84bb89cb4 100644 --- a/classstdex_1_1parser_1_1basic__email__address-members.html +++ b/classstdex_1_1parser_1_1basic__email__address-members.html @@ -99,7 +99,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__email__address.html b/classstdex_1_1parser_1_1basic__email__address.html index fc3575e85..0e9f92a40 100644 --- a/classstdex_1_1parser_1_1basic__email__address.html +++ b/classstdex_1_1parser_1_1basic__email__address.html @@ -251,7 +251,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__emoticon-members.html b/classstdex_1_1parser_1_1basic__emoticon-members.html index 53964304c..dcffc3559 100644 --- a/classstdex_1_1parser_1_1basic__emoticon-members.html +++ b/classstdex_1_1parser_1_1basic__emoticon-members.html @@ -97,7 +97,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__emoticon.html b/classstdex_1_1parser_1_1basic__emoticon.html index 0dabfe0ac..20e7c2ce4 100644 --- a/classstdex_1_1parser_1_1basic__emoticon.html +++ b/classstdex_1_1parser_1_1basic__emoticon.html @@ -249,7 +249,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__eol-members.html b/classstdex_1_1parser_1_1basic__eol-members.html index 4bbed8121..6144ebef4 100644 --- a/classstdex_1_1parser_1_1basic__eol-members.html +++ b/classstdex_1_1parser_1_1basic__eol-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__eol.html b/classstdex_1_1parser_1_1basic__eol.html index 40fd99021..c59193742 100644 --- a/classstdex_1_1parser_1_1basic__eol.html +++ b/classstdex_1_1parser_1_1basic__eol.html @@ -201,7 +201,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__fraction-members.html b/classstdex_1_1parser_1_1basic__fraction-members.html index 14b7d4e86..83624e914 100644 --- a/classstdex_1_1parser_1_1basic__fraction-members.html +++ b/classstdex_1_1parser_1_1basic__fraction-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__fraction.html b/classstdex_1_1parser_1_1basic__fraction.html index 1958da79b..ef8d85758 100644 --- a/classstdex_1_1parser_1_1basic__fraction.html +++ b/classstdex_1_1parser_1_1basic__fraction.html @@ -238,7 +238,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__integer-members.html b/classstdex_1_1parser_1_1basic__integer-members.html index e5dbee890..b4f8eebcf 100644 --- a/classstdex_1_1parser_1_1basic__integer-members.html +++ b/classstdex_1_1parser_1_1basic__integer-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__integer.html b/classstdex_1_1parser_1_1basic__integer.html index 3bdfc0006..1e2e2a009 100644 --- a/classstdex_1_1parser_1_1basic__integer.html +++ b/classstdex_1_1parser_1_1basic__integer.html @@ -183,7 +183,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__integer10-members.html b/classstdex_1_1parser_1_1basic__integer10-members.html index a3e837511..de4366a0c 100644 --- a/classstdex_1_1parser_1_1basic__integer10-members.html +++ b/classstdex_1_1parser_1_1basic__integer10-members.html @@ -104,7 +104,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__integer10.html b/classstdex_1_1parser_1_1basic__integer10.html index 64607ff93..602098af7 100644 --- a/classstdex_1_1parser_1_1basic__integer10.html +++ b/classstdex_1_1parser_1_1basic__integer10.html @@ -240,7 +240,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__integer10ts-members.html b/classstdex_1_1parser_1_1basic__integer10ts-members.html index 676d277c0..944244997 100644 --- a/classstdex_1_1parser_1_1basic__integer10ts-members.html +++ b/classstdex_1_1parser_1_1basic__integer10ts-members.html @@ -98,7 +98,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__integer10ts.html b/classstdex_1_1parser_1_1basic__integer10ts.html index a326b884b..77518b06c 100644 --- a/classstdex_1_1parser_1_1basic__integer10ts.html +++ b/classstdex_1_1parser_1_1basic__integer10ts.html @@ -256,7 +256,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__integer16-members.html b/classstdex_1_1parser_1_1basic__integer16-members.html index 24bea7d52..28177e953 100644 --- a/classstdex_1_1parser_1_1basic__integer16-members.html +++ b/classstdex_1_1parser_1_1basic__integer16-members.html @@ -110,7 +110,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__integer16.html b/classstdex_1_1parser_1_1basic__integer16.html index 2af99e94b..8ed0d70d9 100644 --- a/classstdex_1_1parser_1_1basic__integer16.html +++ b/classstdex_1_1parser_1_1basic__integer16.html @@ -258,7 +258,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__ipv4__address-members.html b/classstdex_1_1parser_1_1basic__ipv4__address-members.html index 722cc27dd..e95d09ecc 100644 --- a/classstdex_1_1parser_1_1basic__ipv4__address-members.html +++ b/classstdex_1_1parser_1_1basic__ipv4__address-members.html @@ -105,7 +105,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__ipv4__address.html b/classstdex_1_1parser_1_1basic__ipv4__address.html index 15dbb7379..7d1dffa59 100644 --- a/classstdex_1_1parser_1_1basic__ipv4__address.html +++ b/classstdex_1_1parser_1_1basic__ipv4__address.html @@ -271,7 +271,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__ipv6__address-members.html b/classstdex_1_1parser_1_1basic__ipv6__address-members.html index aea60c66f..3cc8839b8 100644 --- a/classstdex_1_1parser_1_1basic__ipv6__address-members.html +++ b/classstdex_1_1parser_1_1basic__ipv6__address-members.html @@ -113,7 +113,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__ipv6__address.html b/classstdex_1_1parser_1_1basic__ipv6__address.html index 49b2b541c..3d9c012d9 100644 --- a/classstdex_1_1parser_1_1basic__ipv6__address.html +++ b/classstdex_1_1parser_1_1basic__ipv6__address.html @@ -296,7 +296,7 @@ template<class T > 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 4a16b1b84..8b88bbca9 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 @@ -92,7 +92,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 29cf9eef9..883aa61e9 100644 --- a/classstdex_1_1parser_1_1basic__ipv6__scope__id__char.html +++ b/classstdex_1_1parser_1_1basic__ipv6__scope__id__char.html @@ -194,7 +194,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__iterations-members.html b/classstdex_1_1parser_1_1basic__iterations-members.html index ff234af5d..f1a86f708 100644 --- a/classstdex_1_1parser_1_1basic__iterations-members.html +++ b/classstdex_1_1parser_1_1basic__iterations-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__iterations.html b/classstdex_1_1parser_1_1basic__iterations.html index 3848d2317..03470264a 100644 --- a/classstdex_1_1parser_1_1basic__iterations.html +++ b/classstdex_1_1parser_1_1basic__iterations.html @@ -214,7 +214,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__json__string-members.html b/classstdex_1_1parser_1_1basic__json__string-members.html index d43893e5f..fc26f24b8 100644 --- a/classstdex_1_1parser_1_1basic__json__string-members.html +++ b/classstdex_1_1parser_1_1basic__json__string-members.html @@ -104,7 +104,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__json__string.html b/classstdex_1_1parser_1_1basic__json__string.html index e4fbe6422..402a0d3c6 100644 --- a/classstdex_1_1parser_1_1basic__json__string.html +++ b/classstdex_1_1parser_1_1basic__json__string.html @@ -266,7 +266,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__mixed__numeral-members.html b/classstdex_1_1parser_1_1basic__mixed__numeral-members.html index 0155fafac..e017f21dd 100644 --- a/classstdex_1_1parser_1_1basic__mixed__numeral-members.html +++ b/classstdex_1_1parser_1_1basic__mixed__numeral-members.html @@ -98,7 +98,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__mixed__numeral.html b/classstdex_1_1parser_1_1basic__mixed__numeral.html index 7440cd333..c01ce2d20 100644 --- a/classstdex_1_1parser_1_1basic__mixed__numeral.html +++ b/classstdex_1_1parser_1_1basic__mixed__numeral.html @@ -253,7 +253,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__monetary__numeral-members.html b/classstdex_1_1parser_1_1basic__monetary__numeral-members.html index bfd178ede..f371ac6bd 100644 --- a/classstdex_1_1parser_1_1basic__monetary__numeral-members.html +++ b/classstdex_1_1parser_1_1basic__monetary__numeral-members.html @@ -99,7 +99,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__monetary__numeral.html b/classstdex_1_1parser_1_1basic__monetary__numeral.html index ef2c59c47..e80cb1acc 100644 --- a/classstdex_1_1parser_1_1basic__monetary__numeral.html +++ b/classstdex_1_1parser_1_1basic__monetary__numeral.html @@ -257,7 +257,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__noop-members.html b/classstdex_1_1parser_1_1basic__noop-members.html index df55d91cc..8b5ec038f 100644 --- a/classstdex_1_1parser_1_1basic__noop-members.html +++ b/classstdex_1_1parser_1_1basic__noop-members.html @@ -91,7 +91,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__noop.html b/classstdex_1_1parser_1_1basic__noop.html index 6a7d36198..f9550a8ca 100644 --- a/classstdex_1_1parser_1_1basic__noop.html +++ b/classstdex_1_1parser_1_1basic__noop.html @@ -191,7 +191,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__parser-members.html b/classstdex_1_1parser_1_1basic__parser-members.html index 76fb7cb5d..0c6ed45fc 100644 --- a/classstdex_1_1parser_1_1basic__parser-members.html +++ b/classstdex_1_1parser_1_1basic__parser-members.html @@ -91,7 +91,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__parser.html b/classstdex_1_1parser_1_1basic__parser.html index bab6bf7fd..32d84a5fb 100644 --- a/classstdex_1_1parser_1_1basic__parser.html +++ b/classstdex_1_1parser_1_1basic__parser.html @@ -183,7 +183,7 @@ class stdex::parser::basic_parser< T >

Base template for all parse

diff --git a/classstdex_1_1parser_1_1basic__permutation-members.html b/classstdex_1_1parser_1_1basic__permutation-members.html index 752d661fd..a0f1ec6b4 100644 --- a/classstdex_1_1parser_1_1basic__permutation-members.html +++ b/classstdex_1_1parser_1_1basic__permutation-members.html @@ -98,7 +98,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__permutation.html b/classstdex_1_1parser_1_1basic__permutation.html index 2bd711283..3d54929af 100644 --- a/classstdex_1_1parser_1_1basic__permutation.html +++ b/classstdex_1_1parser_1_1basic__permutation.html @@ -222,7 +222,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__phone__number-members.html b/classstdex_1_1parser_1_1basic__phone__number-members.html index a07636692..39e3dfc7a 100644 --- a/classstdex_1_1parser_1_1basic__phone__number-members.html +++ b/classstdex_1_1parser_1_1basic__phone__number-members.html @@ -99,7 +99,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__phone__number.html b/classstdex_1_1parser_1_1basic__phone__number.html index d9e4692fd..d66707939 100644 --- a/classstdex_1_1parser_1_1basic__phone__number.html +++ b/classstdex_1_1parser_1_1basic__phone__number.html @@ -252,7 +252,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__punct__cu-members.html b/classstdex_1_1parser_1_1basic__punct__cu-members.html index 837dd798e..7f060c80f 100644 --- a/classstdex_1_1parser_1_1basic__punct__cu-members.html +++ b/classstdex_1_1parser_1_1basic__punct__cu-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__punct__cu.html b/classstdex_1_1parser_1_1basic__punct__cu.html index c2e7ccfe3..6b83ed886 100644 --- a/classstdex_1_1parser_1_1basic__punct__cu.html +++ b/classstdex_1_1parser_1_1basic__punct__cu.html @@ -201,7 +201,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__roman__numeral-members.html b/classstdex_1_1parser_1_1basic__roman__numeral-members.html index 9c706e42f..a704c3dde 100644 --- a/classstdex_1_1parser_1_1basic__roman__numeral-members.html +++ b/classstdex_1_1parser_1_1basic__roman__numeral-members.html @@ -103,7 +103,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__roman__numeral.html b/classstdex_1_1parser_1_1basic__roman__numeral.html index b187a02d5..3ece7d45b 100644 --- a/classstdex_1_1parser_1_1basic__roman__numeral.html +++ b/classstdex_1_1parser_1_1basic__roman__numeral.html @@ -237,7 +237,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__scientific__numeral-members.html b/classstdex_1_1parser_1_1basic__scientific__numeral-members.html index ce57c7576..131733b87 100644 --- a/classstdex_1_1parser_1_1basic__scientific__numeral-members.html +++ b/classstdex_1_1parser_1_1basic__scientific__numeral-members.html @@ -103,7 +103,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__scientific__numeral.html b/classstdex_1_1parser_1_1basic__scientific__numeral.html index 880a39cec..2e768cd67 100644 --- a/classstdex_1_1parser_1_1basic__scientific__numeral.html +++ b/classstdex_1_1parser_1_1basic__scientific__numeral.html @@ -273,7 +273,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__score-members.html b/classstdex_1_1parser_1_1basic__score-members.html index 3f7ca3d3d..d5a977c39 100644 --- a/classstdex_1_1parser_1_1basic__score-members.html +++ b/classstdex_1_1parser_1_1basic__score-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__score.html b/classstdex_1_1parser_1_1basic__score.html index b38e1d25c..01ef08f60 100644 --- a/classstdex_1_1parser_1_1basic__score.html +++ b/classstdex_1_1parser_1_1basic__score.html @@ -242,7 +242,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__sequence-members.html b/classstdex_1_1parser_1_1basic__sequence-members.html index d36d84e65..759c6a14f 100644 --- a/classstdex_1_1parser_1_1basic__sequence-members.html +++ b/classstdex_1_1parser_1_1basic__sequence-members.html @@ -97,7 +97,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__sequence.html b/classstdex_1_1parser_1_1basic__sequence.html index bfd4e3b52..e0070200a 100644 --- a/classstdex_1_1parser_1_1basic__sequence.html +++ b/classstdex_1_1parser_1_1basic__sequence.html @@ -215,7 +215,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__set-members.html b/classstdex_1_1parser_1_1basic__set-members.html index efdebdd98..6f3196bea 100644 --- a/classstdex_1_1parser_1_1basic__set-members.html +++ b/classstdex_1_1parser_1_1basic__set-members.html @@ -94,7 +94,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__set.html b/classstdex_1_1parser_1_1basic__set.html index cec31960a..0842e29a2 100644 --- a/classstdex_1_1parser_1_1basic__set.html +++ b/classstdex_1_1parser_1_1basic__set.html @@ -229,7 +229,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__signed__numeral-members.html b/classstdex_1_1parser_1_1basic__signed__numeral-members.html index 8ad1c6ce3..04c1cba85 100644 --- a/classstdex_1_1parser_1_1basic__signed__numeral-members.html +++ b/classstdex_1_1parser_1_1basic__signed__numeral-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__signed__numeral.html b/classstdex_1_1parser_1_1basic__signed__numeral.html index b4fccfbeb..8cffa00c4 100644 --- a/classstdex_1_1parser_1_1basic__signed__numeral.html +++ b/classstdex_1_1parser_1_1basic__signed__numeral.html @@ -245,7 +245,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__space__cu-members.html b/classstdex_1_1parser_1_1basic__space__cu-members.html index d6c31576f..9e8829c89 100644 --- a/classstdex_1_1parser_1_1basic__space__cu-members.html +++ b/classstdex_1_1parser_1_1basic__space__cu-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__space__cu.html b/classstdex_1_1parser_1_1basic__space__cu.html index 1aef9b4e7..ccc2278dc 100644 --- a/classstdex_1_1parser_1_1basic__space__cu.html +++ b/classstdex_1_1parser_1_1basic__space__cu.html @@ -201,7 +201,7 @@ template<class T > 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 4e405f451..b2f4a4331 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 @@ -93,7 +93,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 5b32f6b9c..24271acd7 100644 --- a/classstdex_1_1parser_1_1basic__space__or__punct__cu.html +++ b/classstdex_1_1parser_1_1basic__space__or__punct__cu.html @@ -201,7 +201,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__string-members.html b/classstdex_1_1parser_1_1basic__string-members.html index af4d4b66f..5fc3d558e 100644 --- a/classstdex_1_1parser_1_1basic__string-members.html +++ b/classstdex_1_1parser_1_1basic__string-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__string.html b/classstdex_1_1parser_1_1basic__string.html index 3ba3327e9..66db48b51 100644 --- a/classstdex_1_1parser_1_1basic__string.html +++ b/classstdex_1_1parser_1_1basic__string.html @@ -201,7 +201,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__string__branch-members.html b/classstdex_1_1parser_1_1basic__string__branch-members.html index 7c0717296..3720c1ba1 100644 --- a/classstdex_1_1parser_1_1basic__string__branch-members.html +++ b/classstdex_1_1parser_1_1basic__string__branch-members.html @@ -104,7 +104,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__string__branch.html b/classstdex_1_1parser_1_1basic__string__branch.html index 247adcafd..05b00d1eb 100644 --- a/classstdex_1_1parser_1_1basic__string__branch.html +++ b/classstdex_1_1parser_1_1basic__string__branch.html @@ -193,7 +193,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 ac550a528..1fadfd5cb 100644 --- a/classstdex_1_1parser_1_1basic__time-members.html +++ b/classstdex_1_1parser_1_1basic__time-members.html @@ -98,7 +98,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__time.html b/classstdex_1_1parser_1_1basic__time.html index 855757232..f90ad22af 100644 --- a/classstdex_1_1parser_1_1basic__time.html +++ b/classstdex_1_1parser_1_1basic__time.html @@ -248,7 +248,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__url-members.html b/classstdex_1_1parser_1_1basic__url-members.html index 01ae5ff3b..39eacaba7 100644 --- a/classstdex_1_1parser_1_1basic__url-members.html +++ b/classstdex_1_1parser_1_1basic__url-members.html @@ -108,7 +108,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__url.html b/classstdex_1_1parser_1_1basic__url.html index 1d43fcdf1..dea27adf3 100644 --- a/classstdex_1_1parser_1_1basic__url.html +++ b/classstdex_1_1parser_1_1basic__url.html @@ -278,7 +278,7 @@ template<class T > 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 78ac6ae72..b97d53a29 100644 --- a/classstdex_1_1parser_1_1basic__url__password__char-members.html +++ b/classstdex_1_1parser_1_1basic__url__password__char-members.html @@ -92,7 +92,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 8b9464f3e..2442400b6 100644 --- a/classstdex_1_1parser_1_1basic__url__password__char.html +++ b/classstdex_1_1parser_1_1basic__url__password__char.html @@ -194,7 +194,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__url__path-members.html b/classstdex_1_1parser_1_1basic__url__path-members.html index 033a64b4e..884ebff36 100644 --- a/classstdex_1_1parser_1_1basic__url__path-members.html +++ b/classstdex_1_1parser_1_1basic__url__path-members.html @@ -98,7 +98,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__url__path.html b/classstdex_1_1parser_1_1basic__url__path.html index 3a3be1b38..9994685f7 100644 --- a/classstdex_1_1parser_1_1basic__url__path.html +++ b/classstdex_1_1parser_1_1basic__url__path.html @@ -248,7 +248,7 @@ template<class T > 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 750637f30..123dcb785 100644 --- a/classstdex_1_1parser_1_1basic__url__path__char-members.html +++ b/classstdex_1_1parser_1_1basic__url__path__char-members.html @@ -92,7 +92,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 f11b1633e..7b60efb03 100644 --- a/classstdex_1_1parser_1_1basic__url__path__char.html +++ b/classstdex_1_1parser_1_1basic__url__path__char.html @@ -194,7 +194,7 @@ template<class T > 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 96cfa2976..fa7237ae3 100644 --- a/classstdex_1_1parser_1_1basic__url__username__char-members.html +++ b/classstdex_1_1parser_1_1basic__url__username__char-members.html @@ -92,7 +92,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 f97e2cad1..737898f8a 100644 --- a/classstdex_1_1parser_1_1basic__url__username__char.html +++ b/classstdex_1_1parser_1_1basic__url__username__char.html @@ -194,7 +194,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1http__agent-members.html b/classstdex_1_1parser_1_1http__agent-members.html index b9d3c30b3..24481012d 100644 --- a/classstdex_1_1parser_1_1http__agent-members.html +++ b/classstdex_1_1parser_1_1http__agent-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__agent.html b/classstdex_1_1parser_1_1http__agent.html index c0242063c..2f5cf307b 100644 --- a/classstdex_1_1parser_1_1http__agent.html +++ b/classstdex_1_1parser_1_1http__agent.html @@ -226,7 +226,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 a09eecdb7..7921fdf46 100644 --- a/classstdex_1_1parser_1_1http__any__type-members.html +++ b/classstdex_1_1parser_1_1http__any__type-members.html @@ -85,7 +85,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__any__type.html b/classstdex_1_1parser_1_1http__any__type.html index 93cccbd1f..a07e99a6b 100644 --- a/classstdex_1_1parser_1_1http__any__type.html +++ b/classstdex_1_1parser_1_1http__any__type.html @@ -187,7 +187,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 a12545424..0e49d9299 100644 --- a/classstdex_1_1parser_1_1http__asterisk-members.html +++ b/classstdex_1_1parser_1_1http__asterisk-members.html @@ -85,7 +85,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__asterisk.html b/classstdex_1_1parser_1_1http__asterisk.html index 6c73c3511..128116748 100644 --- a/classstdex_1_1parser_1_1http__asterisk.html +++ b/classstdex_1_1parser_1_1http__asterisk.html @@ -187,7 +187,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 4f8055924..b79cf4c32 100644 --- a/classstdex_1_1parser_1_1http__cookie-members.html +++ b/classstdex_1_1parser_1_1http__cookie-members.html @@ -90,7 +90,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__cookie.html b/classstdex_1_1parser_1_1http__cookie.html index d77a84f16..8c29c9cb5 100644 --- a/classstdex_1_1parser_1_1http__cookie.html +++ b/classstdex_1_1parser_1_1http__cookie.html @@ -236,7 +236,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 293293ccb..ad2183b57 100644 --- a/classstdex_1_1parser_1_1http__cookie__parameter-members.html +++ b/classstdex_1_1parser_1_1http__cookie__parameter-members.html @@ -89,7 +89,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__cookie__parameter.html b/classstdex_1_1parser_1_1http__cookie__parameter.html index 24d1f680a..729a63e75 100644 --- a/classstdex_1_1parser_1_1http__cookie__parameter.html +++ b/classstdex_1_1parser_1_1http__cookie__parameter.html @@ -230,7 +230,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 8061d8639..8e554b0e2 100644 --- a/classstdex_1_1parser_1_1http__header-members.html +++ b/classstdex_1_1parser_1_1http__header-members.html @@ -89,7 +89,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__header.html b/classstdex_1_1parser_1_1http__header.html index 7427be055..39d1e694f 100644 --- a/classstdex_1_1parser_1_1http__header.html +++ b/classstdex_1_1parser_1_1http__header.html @@ -230,7 +230,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 ec2a365e9..15b44334d 100644 --- a/classstdex_1_1parser_1_1http__language-members.html +++ b/classstdex_1_1parser_1_1http__language-members.html @@ -87,7 +87,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__language.html b/classstdex_1_1parser_1_1http__language.html index 879e8e095..b55e5fa80 100644 --- a/classstdex_1_1parser_1_1http__language.html +++ b/classstdex_1_1parser_1_1http__language.html @@ -223,7 +223,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 bb42e12b6..b035f643e 100644 --- a/classstdex_1_1parser_1_1http__line__break-members.html +++ b/classstdex_1_1parser_1_1http__line__break-members.html @@ -85,7 +85,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__line__break.html b/classstdex_1_1parser_1_1http__line__break.html index e573c8699..21a84f0bd 100644 --- a/classstdex_1_1parser_1_1http__line__break.html +++ b/classstdex_1_1parser_1_1http__line__break.html @@ -187,7 +187,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 1de05fc31..64046b159 100644 --- a/classstdex_1_1parser_1_1http__media__range-members.html +++ b/classstdex_1_1parser_1_1http__media__range-members.html @@ -89,7 +89,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__media__range.html b/classstdex_1_1parser_1_1http__media__range.html index cae079e39..d8e7beaea 100644 --- a/classstdex_1_1parser_1_1http__media__range.html +++ b/classstdex_1_1parser_1_1http__media__range.html @@ -231,7 +231,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 8111208ee..fc62f5929 100644 --- a/classstdex_1_1parser_1_1http__media__type-members.html +++ b/classstdex_1_1parser_1_1http__media__type-members.html @@ -90,7 +90,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__media__type.html b/classstdex_1_1parser_1_1http__media__type.html index 1c33abce8..1632466e3 100644 --- a/classstdex_1_1parser_1_1http__media__type.html +++ b/classstdex_1_1parser_1_1http__media__type.html @@ -239,7 +239,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 72d4c702f..5b4176845 100644 --- a/classstdex_1_1parser_1_1http__parameter-members.html +++ b/classstdex_1_1parser_1_1http__parameter-members.html @@ -89,7 +89,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__parameter.html b/classstdex_1_1parser_1_1http__parameter.html index 10eb4207e..6e820d549 100644 --- a/classstdex_1_1parser_1_1http__parameter.html +++ b/classstdex_1_1parser_1_1http__parameter.html @@ -232,7 +232,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 a0a4181ff..bb8c15ed9 100644 --- a/classstdex_1_1parser_1_1http__protocol-members.html +++ b/classstdex_1_1parser_1_1http__protocol-members.html @@ -91,7 +91,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__protocol.html b/classstdex_1_1parser_1_1http__protocol.html index 652d05734..c2e0176d0 100644 --- a/classstdex_1_1parser_1_1http__protocol.html +++ b/classstdex_1_1parser_1_1http__protocol.html @@ -236,7 +236,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 6dca2966a..a60c2d533 100644 --- a/classstdex_1_1parser_1_1http__quoted__string-members.html +++ b/classstdex_1_1parser_1_1http__quoted__string-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__quoted__string.html b/classstdex_1_1parser_1_1http__quoted__string.html index 174983b7a..3cb13cbf4 100644 --- a/classstdex_1_1parser_1_1http__quoted__string.html +++ b/classstdex_1_1parser_1_1http__quoted__string.html @@ -228,7 +228,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 48c3b0d78..2718012ba 100644 --- a/classstdex_1_1parser_1_1http__request-members.html +++ b/classstdex_1_1parser_1_1http__request-members.html @@ -91,7 +91,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__request.html b/classstdex_1_1parser_1_1http__request.html index 14369afdc..8678f23aa 100644 --- a/classstdex_1_1parser_1_1http__request.html +++ b/classstdex_1_1parser_1_1http__request.html @@ -236,7 +236,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 2f0a901c0..f901da045 100644 --- a/classstdex_1_1parser_1_1http__space-members.html +++ b/classstdex_1_1parser_1_1http__space-members.html @@ -86,7 +86,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__space.html b/classstdex_1_1parser_1_1http__space.html index 98354e918..11c395e06 100644 --- a/classstdex_1_1parser_1_1http__space.html +++ b/classstdex_1_1parser_1_1http__space.html @@ -194,7 +194,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 d988ece22..4c34b5b9a 100644 --- a/classstdex_1_1parser_1_1http__text__char-members.html +++ b/classstdex_1_1parser_1_1http__text__char-members.html @@ -86,7 +86,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__text__char.html b/classstdex_1_1parser_1_1http__text__char.html index 1fd9b8364..d5bb4ae0a 100644 --- a/classstdex_1_1parser_1_1http__text__char.html +++ b/classstdex_1_1parser_1_1http__text__char.html @@ -194,7 +194,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 d0081e718..d76221b53 100644 --- a/classstdex_1_1parser_1_1http__token-members.html +++ b/classstdex_1_1parser_1_1http__token-members.html @@ -85,7 +85,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__token.html b/classstdex_1_1parser_1_1http__token.html index 8b5c9f4f6..9ab5b1dbe 100644 --- a/classstdex_1_1parser_1_1http__token.html +++ b/classstdex_1_1parser_1_1http__token.html @@ -187,7 +187,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 0acc4ded6..0d4034238 100644 --- a/classstdex_1_1parser_1_1http__url-members.html +++ b/classstdex_1_1parser_1_1http__url-members.html @@ -91,7 +91,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__url.html b/classstdex_1_1parser_1_1http__url.html index f319cd5b9..c7a4ad660 100644 --- a/classstdex_1_1parser_1_1http__url.html +++ b/classstdex_1_1parser_1_1http__url.html @@ -235,7 +235,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 fa0038192..1de116c27 100644 --- a/classstdex_1_1parser_1_1http__url__parameter-members.html +++ b/classstdex_1_1parser_1_1http__url__parameter-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__url__parameter.html b/classstdex_1_1parser_1_1http__url__parameter.html index bc96b3945..ff640d4c2 100644 --- a/classstdex_1_1parser_1_1http__url__parameter.html +++ b/classstdex_1_1parser_1_1http__url__parameter.html @@ -226,7 +226,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 0a3ea4ad5..c3bd17814 100644 --- a/classstdex_1_1parser_1_1http__url__path-members.html +++ b/classstdex_1_1parser_1_1http__url__path-members.html @@ -87,7 +87,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__url__path.html b/classstdex_1_1parser_1_1http__url__path.html index 0eefbaf31..44fe79648 100644 --- a/classstdex_1_1parser_1_1http__url__path.html +++ b/classstdex_1_1parser_1_1http__url__path.html @@ -224,7 +224,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 4e4780c34..743216ec3 100644 --- a/classstdex_1_1parser_1_1http__url__path__segment-members.html +++ b/classstdex_1_1parser_1_1http__url__path__segment-members.html @@ -85,7 +85,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 3f6f6dc0c..b39142ffe 100644 --- a/classstdex_1_1parser_1_1http__url__path__segment.html +++ b/classstdex_1_1parser_1_1http__url__path__segment.html @@ -187,7 +187,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 09dc634d6..2dc33d6eb 100644 --- a/classstdex_1_1parser_1_1http__url__port-members.html +++ b/classstdex_1_1parser_1_1http__url__port-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__url__port.html b/classstdex_1_1parser_1_1http__url__port.html index 83cb273ad..0a0a9f544 100644 --- a/classstdex_1_1parser_1_1http__url__port.html +++ b/classstdex_1_1parser_1_1http__url__port.html @@ -226,7 +226,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 02282f095..7f4609bba 100644 --- a/classstdex_1_1parser_1_1http__url__server-members.html +++ b/classstdex_1_1parser_1_1http__url__server-members.html @@ -85,7 +85,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__url__server.html b/classstdex_1_1parser_1_1http__url__server.html index 7f82e3ad7..21f1320db 100644 --- a/classstdex_1_1parser_1_1http__url__server.html +++ b/classstdex_1_1parser_1_1http__url__server.html @@ -187,7 +187,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 28c7c466e..726e6c7cb 100644 --- a/classstdex_1_1parser_1_1http__value-members.html +++ b/classstdex_1_1parser_1_1http__value-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__value.html b/classstdex_1_1parser_1_1http__value.html index 822d49196..7c9d26127 100644 --- a/classstdex_1_1parser_1_1http__value.html +++ b/classstdex_1_1parser_1_1http__value.html @@ -228,7 +228,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 cfbd120ea..3827071c0 100644 --- a/classstdex_1_1parser_1_1http__value__collection-members.html +++ b/classstdex_1_1parser_1_1http__value__collection-members.html @@ -84,7 +84,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__value__collection.html b/classstdex_1_1parser_1_1http__value__collection.html index 010cc139c..89af9a8ff 100644 --- a/classstdex_1_1parser_1_1http__value__collection.html +++ b/classstdex_1_1parser_1_1http__value__collection.html @@ -107,7 +107,7 @@ class stdex::parser::http_value_collection< T >

Collection of HTTP

diff --git a/classstdex_1_1parser_1_1http__weight-members.html b/classstdex_1_1parser_1_1http__weight-members.html index e416d249f..c1725b115 100644 --- a/classstdex_1_1parser_1_1http__weight-members.html +++ b/classstdex_1_1parser_1_1http__weight-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__weight.html b/classstdex_1_1parser_1_1http__weight.html index 9e57cc4a9..7438ab0c4 100644 --- a/classstdex_1_1parser_1_1http__weight.html +++ b/classstdex_1_1parser_1_1http__weight.html @@ -227,7 +227,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 3cbb92774..14305e577 100644 --- a/classstdex_1_1parser_1_1http__weighted__value-members.html +++ b/classstdex_1_1parser_1_1http__weighted__value-members.html @@ -90,7 +90,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__weighted__value.html b/classstdex_1_1parser_1_1http__weighted__value.html index ef233b64a..e5569a970 100644 --- a/classstdex_1_1parser_1_1http__weighted__value.html +++ b/classstdex_1_1parser_1_1http__weighted__value.html @@ -237,7 +237,7 @@ template<class T , class T_asterisk = http_asterisk> diff --git a/classstdex_1_1parser_1_1parser__collection-members.html b/classstdex_1_1parser_1_1parser__collection-members.html index 0161da4ea..bc4ff2140 100644 --- a/classstdex_1_1parser_1_1parser__collection-members.html +++ b/classstdex_1_1parser_1_1parser__collection-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1parser__collection.html b/classstdex_1_1parser_1_1parser__collection.html index 3f5c39b49..ba832ac05 100644 --- a/classstdex_1_1parser_1_1parser__collection.html +++ b/classstdex_1_1parser_1_1parser__collection.html @@ -192,7 +192,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1sgml__any__cp-members.html b/classstdex_1_1parser_1_1sgml__any__cp-members.html index 9d32e0ae7..ddefab198 100644 --- a/classstdex_1_1parser_1_1sgml__any__cp-members.html +++ b/classstdex_1_1parser_1_1sgml__any__cp-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__any__cp.html b/classstdex_1_1parser_1_1sgml__any__cp.html index 2546c8081..174bf21de 100644 --- a/classstdex_1_1parser_1_1sgml__any__cp.html +++ b/classstdex_1_1parser_1_1sgml__any__cp.html @@ -199,7 +199,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 dd6dc94fd..36185fcee 100644 --- a/classstdex_1_1parser_1_1sgml__cp-members.html +++ b/classstdex_1_1parser_1_1sgml__cp-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__cp.html b/classstdex_1_1parser_1_1sgml__cp.html index db34e5b8b..501980cdf 100644 --- a/classstdex_1_1parser_1_1sgml__cp.html +++ b/classstdex_1_1parser_1_1sgml__cp.html @@ -200,7 +200,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 06d2e3720..29c17bd27 100644 --- a/classstdex_1_1parser_1_1sgml__cp__set-members.html +++ b/classstdex_1_1parser_1_1sgml__cp__set-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__cp__set.html b/classstdex_1_1parser_1_1sgml__cp__set.html index 22453d757..62c6957bf 100644 --- a/classstdex_1_1parser_1_1sgml__cp__set.html +++ b/classstdex_1_1parser_1_1sgml__cp__set.html @@ -216,7 +216,7 @@ size_t hit_offset 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 2f43769bf..3b53bc76b 100644 --- a/classstdex_1_1parser_1_1sgml__dns__domain__char-members.html +++ b/classstdex_1_1parser_1_1sgml__dns__domain__char-members.html @@ -94,7 +94,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 f531e26eb..8e4d78796 100644 --- a/classstdex_1_1parser_1_1sgml__dns__domain__char.html +++ b/classstdex_1_1parser_1_1sgml__dns__domain__char.html @@ -208,7 +208,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 1ffaa2f57..e1de8082b 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 @@ -86,7 +86,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 8ca17442f..3dfa066ea 100644 --- a/classstdex_1_1parser_1_1sgml__ipv6__scope__id__char.html +++ b/classstdex_1_1parser_1_1sgml__ipv6__scope__id__char.html @@ -190,7 +190,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 8d5d94b87..7518f43de 100644 --- a/classstdex_1_1parser_1_1sgml__punct__cp-members.html +++ b/classstdex_1_1parser_1_1sgml__punct__cp-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__punct__cp.html b/classstdex_1_1parser_1_1sgml__punct__cp.html index 3d9671ed6..3b4be353b 100644 --- a/classstdex_1_1parser_1_1sgml__punct__cp.html +++ b/classstdex_1_1parser_1_1sgml__punct__cp.html @@ -203,7 +203,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 c422a60fc..b23d5d9b0 100644 --- a/classstdex_1_1parser_1_1sgml__space__cp-members.html +++ b/classstdex_1_1parser_1_1sgml__space__cp-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__space__cp.html b/classstdex_1_1parser_1_1sgml__space__cp.html index 3999b19de..da43fa601 100644 --- a/classstdex_1_1parser_1_1sgml__space__cp.html +++ b/classstdex_1_1parser_1_1sgml__space__cp.html @@ -203,7 +203,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 62d0a35a1..73a045589 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 @@ -93,7 +93,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 f706939f4..5246fabe9 100644 --- a/classstdex_1_1parser_1_1sgml__space__or__punct__cp.html +++ b/classstdex_1_1parser_1_1sgml__space__or__punct__cp.html @@ -203,7 +203,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 db09e0669..3a01a8c80 100644 --- a/classstdex_1_1parser_1_1sgml__string-members.html +++ b/classstdex_1_1parser_1_1sgml__string-members.html @@ -87,7 +87,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__string.html b/classstdex_1_1parser_1_1sgml__string.html index 40d7ff042..f214dfca7 100644 --- a/classstdex_1_1parser_1_1sgml__string.html +++ b/classstdex_1_1parser_1_1sgml__string.html @@ -197,7 +197,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 2325d3260..9fa3dde2c 100644 --- a/classstdex_1_1parser_1_1sgml__url__password__char-members.html +++ b/classstdex_1_1parser_1_1sgml__url__password__char-members.html @@ -93,7 +93,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 c98e3f9d3..4208b587d 100644 --- a/classstdex_1_1parser_1_1sgml__url__password__char.html +++ b/classstdex_1_1parser_1_1sgml__url__password__char.html @@ -199,7 +199,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 d689f3110..91d405a3e 100644 --- a/classstdex_1_1parser_1_1sgml__url__path__char-members.html +++ b/classstdex_1_1parser_1_1sgml__url__path__char-members.html @@ -93,7 +93,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 13f76831a..fcfbf268d 100644 --- a/classstdex_1_1parser_1_1sgml__url__path__char.html +++ b/classstdex_1_1parser_1_1sgml__url__path__char.html @@ -199,7 +199,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 2d936808f..5d07d0043 100644 --- a/classstdex_1_1parser_1_1sgml__url__username__char-members.html +++ b/classstdex_1_1parser_1_1sgml__url__username__char-members.html @@ -93,7 +93,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 b22ba8609..4d93fd20b 100644 --- a/classstdex_1_1parser_1_1sgml__url__username__char.html +++ b/classstdex_1_1parser_1_1sgml__url__username__char.html @@ -199,7 +199,7 @@ std::locale m_locale diff --git a/classstdex_1_1progress-members.html b/classstdex_1_1progress-members.html index 4ff06fc17..9d997fc12 100644 --- a/classstdex_1_1progress-members.html +++ b/classstdex_1_1progress-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/classstdex_1_1progress.html b/classstdex_1_1progress.html index 079f6b076..b726dee9c 100644 --- a/classstdex_1_1progress.html +++ b/classstdex_1_1progress.html @@ -319,7 +319,7 @@ template<class T > diff --git a/classstdex_1_1progress__switcher-members.html b/classstdex_1_1progress__switcher-members.html index 895e5618e..8325c2ffd 100644 --- a/classstdex_1_1progress__switcher-members.html +++ b/classstdex_1_1progress__switcher-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/classstdex_1_1progress__switcher.html b/classstdex_1_1progress__switcher.html index bedd27409..c3bf28d18 100644 --- a/classstdex_1_1progress__switcher.html +++ b/classstdex_1_1progress__switcher.html @@ -178,7 +178,7 @@ class stdex::progress_switcher< T >

Progress indicator switcher. <

diff --git a/classstdex_1_1ring-members.html b/classstdex_1_1ring-members.html index fc35a3c69..8bc582599 100644 --- a/classstdex_1_1ring-members.html +++ b/classstdex_1_1ring-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/classstdex_1_1ring.html b/classstdex_1_1ring.html index 32c546c7b..597261527 100644 --- a/classstdex_1_1ring.html +++ b/classstdex_1_1ring.html @@ -296,7 +296,7 @@ template<class T , size_t CAPACITY> diff --git a/classstdex_1_1stream_1_1async__reader-members.html b/classstdex_1_1stream_1_1async__reader-members.html index 3fb245002..34d351ad1 100644 --- a/classstdex_1_1stream_1_1async__reader-members.html +++ b/classstdex_1_1stream_1_1async__reader-members.html @@ -146,7 +146,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1async__reader.html b/classstdex_1_1stream_1_1async__reader.html index 4d4fd38f3..f4f231e0e 100644 --- a/classstdex_1_1stream_1_1async__reader.html +++ b/classstdex_1_1stream_1_1async__reader.html @@ -395,7 +395,7 @@ template<size_t CAPACITY = default_async_limit> diff --git a/classstdex_1_1stream_1_1async__writer-members.html b/classstdex_1_1stream_1_1async__writer-members.html index 6ed97910f..e75f2ca6d 100644 --- a/classstdex_1_1stream_1_1async__writer-members.html +++ b/classstdex_1_1stream_1_1async__writer-members.html @@ -146,7 +146,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1async__writer.html b/classstdex_1_1stream_1_1async__writer.html index aaa4d3037..53fbc0e42 100644 --- a/classstdex_1_1stream_1_1async__writer.html +++ b/classstdex_1_1stream_1_1async__writer.html @@ -429,7 +429,7 @@ template<size_t CAPACITY = default_async_limit> diff --git a/classstdex_1_1stream_1_1basic-members.html b/classstdex_1_1stream_1_1basic-members.html index 7f03a0aaf..e73a657a3 100644 --- a/classstdex_1_1stream_1_1basic-members.html +++ b/classstdex_1_1stream_1_1basic-members.html @@ -137,7 +137,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1basic.html b/classstdex_1_1stream_1_1basic.html index 0c5719bfd..5017d7bf1 100644 --- a/classstdex_1_1stream_1_1basic.html +++ b/classstdex_1_1stream_1_1basic.html @@ -1219,7 +1219,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 1134f2536..247018eb9 100644 --- a/classstdex_1_1stream_1_1basic__file-members.html +++ b/classstdex_1_1stream_1_1basic__file-members.html @@ -153,7 +153,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1basic__file.html b/classstdex_1_1stream_1_1basic__file.html index 03ed86f9d..d90049a6a 100644 --- a/classstdex_1_1stream_1_1basic__file.html +++ b/classstdex_1_1stream_1_1basic__file.html @@ -926,7 +926,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 04ea622ff..4abba2299 100644 --- a/classstdex_1_1stream_1_1basic__sys-members.html +++ b/classstdex_1_1stream_1_1basic__sys-members.html @@ -149,7 +149,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1basic__sys.html b/classstdex_1_1stream_1_1basic__sys.html index 2b8a91632..6dd429d3b 100644 --- a/classstdex_1_1stream_1_1basic__sys.html +++ b/classstdex_1_1stream_1_1basic__sys.html @@ -501,7 +501,7 @@ sys_handle m_h diff --git a/classstdex_1_1stream_1_1buffer-members.html b/classstdex_1_1stream_1_1buffer-members.html index 1b560fe93..60bd62ccd 100644 --- a/classstdex_1_1stream_1_1buffer-members.html +++ b/classstdex_1_1stream_1_1buffer-members.html @@ -147,7 +147,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1buffer.html b/classstdex_1_1stream_1_1buffer.html index 315db845c..1e072c16c 100644 --- a/classstdex_1_1stream_1_1buffer.html +++ b/classstdex_1_1stream_1_1buffer.html @@ -476,7 +476,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 7574abe00..82ef4d3ba 100644 --- a/classstdex_1_1stream_1_1buffered__sys-members.html +++ b/classstdex_1_1stream_1_1buffered__sys-members.html @@ -148,7 +148,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1buffered__sys.html b/classstdex_1_1stream_1_1buffered__sys.html index fe9612f22..23b112b51 100644 --- a/classstdex_1_1stream_1_1buffered__sys.html +++ b/classstdex_1_1stream_1_1buffered__sys.html @@ -352,7 +352,7 @@ void init ( diff --git a/classstdex_1_1stream_1_1cache-members.html b/classstdex_1_1stream_1_1cache-members.html index 6e3a45a04..156233bf9 100644 --- a/classstdex_1_1stream_1_1cache-members.html +++ b/classstdex_1_1stream_1_1cache-members.html @@ -151,19 +151,20 @@ $(function() { write_array(_In_reads_bytes_opt_(size *count) const void *array, size_t size, size_t count)stdex::stream::basicinline write_array(_In_reads_or_z_opt_(num_chars) const wchar_t *wstr, size_t num_chars, charset_id charset)stdex::stream::basicinline write_byte(uint8_t byte, fsize_t amount=1)stdex::stream::basicinline - write_charset(charset_id charset)stdex::stream::basicinline - write_data(const T data)stdex::stream::basicinline - write_sprintf(_Printf_format_string_params_(2) const char *format, locale_t locale,...)stdex::stream::basicinline - write_sprintf(_Printf_format_string_params_(2) const wchar_t *format, locale_t locale,...)stdex::stream::basicinline - write_str(const T *data)stdex::stream::basicinline - write_stream(basic &stream, fsize_t amount=fsize_max)stdex::stream::basicinline - write_vsprintf(_Printf_format_string_params_(2) const char *format, locale_t locale, va_list params)stdex::stream::basicinline - write_vsprintf(_Printf_format_string_params_(2) const wchar_t *format, locale_t locale, va_list params)stdex::stream::basicinline - ~cache() (defined in stdex::stream::cache)stdex::stream::cacheinlinevirtual + write_cache() (defined in stdex::stream::cache)stdex::stream::cacheinlineprotected + write_charset(charset_id charset)stdex::stream::basicinline + write_data(const T data)stdex::stream::basicinline + write_sprintf(_Printf_format_string_params_(2) const char *format, locale_t locale,...)stdex::stream::basicinline + write_sprintf(_Printf_format_string_params_(2) const wchar_t *format, locale_t locale,...)stdex::stream::basicinline + write_str(const T *data)stdex::stream::basicinline + write_stream(basic &stream, fsize_t amount=fsize_max)stdex::stream::basicinline + write_vsprintf(_Printf_format_string_params_(2) const char *format, locale_t locale, va_list params)stdex::stream::basicinline + write_vsprintf(_Printf_format_string_params_(2) const wchar_t *format, locale_t locale, va_list params)stdex::stream::basicinline + ~cache() noexcept(false) (defined in stdex::stream::cache)stdex::stream::cacheinlinevirtual diff --git a/classstdex_1_1stream_1_1cache.html b/classstdex_1_1stream_1_1cache.html index 1df613ccc..6c4fbd9c0 100644 --- a/classstdex_1_1stream_1_1cache.html +++ b/classstdex_1_1stream_1_1cache.html @@ -407,6 +407,9 @@ void invalidate_cache void load_cache (fpos_t start)   + +void write_cache () +  @@ -974,7 +977,7 @@ state_t  diff --git a/classstdex_1_1stream_1_1cached__file-members.html b/classstdex_1_1stream_1_1cached__file-members.html index 00a76b5a4..d740db77c 100644 --- a/classstdex_1_1stream_1_1cached__file-members.html +++ b/classstdex_1_1stream_1_1cached__file-members.html @@ -154,19 +154,20 @@ $(function() { - - - - - - - - - + + + + + + + + + +

Protected Attributes

m_state
write_array(_In_reads_bytes_opt_(size *count) const void *array, size_t size, size_t count)stdex::stream::basicinline
write_array(_In_reads_or_z_opt_(num_chars) const wchar_t *wstr, size_t num_chars, charset_id charset)stdex::stream::basicinline
write_byte(uint8_t byte, fsize_t amount=1)stdex::stream::basicinline
write_charset(charset_id charset)stdex::stream::basicinline
write_data(const T data)stdex::stream::basicinline
write_sprintf(_Printf_format_string_params_(2) const char *format, locale_t locale,...)stdex::stream::basicinline
write_sprintf(_Printf_format_string_params_(2) const wchar_t *format, locale_t locale,...)stdex::stream::basicinline
write_str(const T *data)stdex::stream::basicinline
write_stream(basic &stream, fsize_t amount=fsize_max)stdex::stream::basicinline
write_vsprintf(_Printf_format_string_params_(2) const char *format, locale_t locale, va_list params)stdex::stream::basicinline
write_vsprintf(_Printf_format_string_params_(2) const wchar_t *format, locale_t locale, va_list params)stdex::stream::basicinline
~cache() (defined in stdex::stream::cache)stdex::stream::cacheinlinevirtual
write_cache() (defined in stdex::stream::cache)stdex::stream::cacheinlineprotected
write_charset(charset_id charset)stdex::stream::basicinline
write_data(const T data)stdex::stream::basicinline
write_sprintf(_Printf_format_string_params_(2) const char *format, locale_t locale,...)stdex::stream::basicinline
write_sprintf(_Printf_format_string_params_(2) const wchar_t *format, locale_t locale,...)stdex::stream::basicinline
write_str(const T *data)stdex::stream::basicinline
write_stream(basic &stream, fsize_t amount=fsize_max)stdex::stream::basicinline
write_vsprintf(_Printf_format_string_params_(2) const char *format, locale_t locale, va_list params)stdex::stream::basicinline
write_vsprintf(_Printf_format_string_params_(2) const wchar_t *format, locale_t locale, va_list params)stdex::stream::basicinline
~cache() noexcept(false) (defined in stdex::stream::cache)stdex::stream::cacheinlinevirtual
diff --git a/classstdex_1_1stream_1_1cached__file.html b/classstdex_1_1stream_1_1cached__file.html index a5fef5907..0f4ee69af 100644 --- a/classstdex_1_1stream_1_1cached__file.html +++ b/classstdex_1_1stream_1_1cached__file.html @@ -432,6 +432,9 @@ void invalidate_cache void load_cache (fpos_t start)   + +void write_cache () + 

Detailed Description

Cached file-system file.

@@ -541,7 +544,7 @@ void load_cache (fpos_
diff --git a/classstdex_1_1stream_1_1converter-members.html b/classstdex_1_1stream_1_1converter-members.html index b39b52e0c..7302ac970 100644 --- a/classstdex_1_1stream_1_1converter-members.html +++ b/classstdex_1_1stream_1_1converter-members.html @@ -141,7 +141,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1converter.html b/classstdex_1_1stream_1_1converter.html index 6dff9fdaf..4a7c51e58 100644 --- a/classstdex_1_1stream_1_1converter.html +++ b/classstdex_1_1stream_1_1converter.html @@ -482,7 +482,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 320aa9a5b..7c0035173 100644 --- a/classstdex_1_1stream_1_1diag__file-members.html +++ b/classstdex_1_1stream_1_1diag__file-members.html @@ -156,7 +156,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1diag__file.html b/classstdex_1_1stream_1_1diag__file.html index 5ceb0d245..7cc2bc3af 100644 --- a/classstdex_1_1stream_1_1diag__file.html +++ b/classstdex_1_1stream_1_1diag__file.html @@ -749,7 +749,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1fifo-members.html b/classstdex_1_1stream_1_1fifo-members.html index 75129f888..3c55e40fb 100644 --- a/classstdex_1_1stream_1_1fifo-members.html +++ b/classstdex_1_1stream_1_1fifo-members.html @@ -144,7 +144,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1fifo.html b/classstdex_1_1stream_1_1fifo.html index 390a6fedb..062b784cf 100644 --- a/classstdex_1_1stream_1_1fifo.html +++ b/classstdex_1_1stream_1_1fifo.html @@ -447,7 +447,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1file-members.html b/classstdex_1_1stream_1_1file-members.html index 3acc49844..1954c530b 100644 --- a/classstdex_1_1stream_1_1file-members.html +++ b/classstdex_1_1stream_1_1file-members.html @@ -172,7 +172,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1file.html b/classstdex_1_1stream_1_1file.html index 998af5b30..3937fb43e 100644 --- a/classstdex_1_1stream_1_1file.html +++ b/classstdex_1_1stream_1_1file.html @@ -927,7 +927,7 @@ sys_handle m_h diff --git a/classstdex_1_1stream_1_1file__window-members.html b/classstdex_1_1stream_1_1file__window-members.html index 96689fc76..edf384ee4 100644 --- a/classstdex_1_1stream_1_1file__window-members.html +++ b/classstdex_1_1stream_1_1file__window-members.html @@ -157,7 +157,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1file__window.html b/classstdex_1_1stream_1_1file__window.html index e20da379f..10c8260da 100644 --- a/classstdex_1_1stream_1_1file__window.html +++ b/classstdex_1_1stream_1_1file__window.html @@ -785,7 +785,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1limiter-members.html b/classstdex_1_1stream_1_1limiter-members.html index 79c524963..99f5d0359 100644 --- a/classstdex_1_1stream_1_1limiter-members.html +++ b/classstdex_1_1stream_1_1limiter-members.html @@ -144,7 +144,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1limiter.html b/classstdex_1_1stream_1_1limiter.html index e93b6972f..96545c2d1 100644 --- a/classstdex_1_1stream_1_1limiter.html +++ b/classstdex_1_1stream_1_1limiter.html @@ -437,7 +437,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 c96911766..3be4fba31 100644 --- a/classstdex_1_1stream_1_1memory__file-members.html +++ b/classstdex_1_1stream_1_1memory__file-members.html @@ -194,7 +194,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1memory__file.html b/classstdex_1_1stream_1_1memory__file.html index 03c40f987..2c7c6cc9a 100644 --- a/classstdex_1_1stream_1_1memory__file.html +++ b/classstdex_1_1stream_1_1memory__file.html @@ -1485,7 +1485,7 @@ template<class T > diff --git a/classstdex_1_1stream_1_1replicator-members.html b/classstdex_1_1stream_1_1replicator-members.html index 2afbbb034..21d5e183e 100644 --- a/classstdex_1_1stream_1_1replicator-members.html +++ b/classstdex_1_1stream_1_1replicator-members.html @@ -142,7 +142,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1replicator.html b/classstdex_1_1stream_1_1replicator.html index f2885846a..950d42f9e 100644 --- a/classstdex_1_1stream_1_1replicator.html +++ b/classstdex_1_1stream_1_1replicator.html @@ -430,7 +430,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 409f9b684..5c25c0614 100644 --- a/classstdex_1_1stream_1_1replicator_1_1worker-members.html +++ b/classstdex_1_1stream_1_1replicator_1_1worker-members.html @@ -94,7 +94,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1replicator_1_1worker.html b/classstdex_1_1stream_1_1replicator_1_1worker.html index 230764697..d36cb5466 100644 --- a/classstdex_1_1stream_1_1replicator_1_1worker.html +++ b/classstdex_1_1stream_1_1replicator_1_1worker.html @@ -146,7 +146,7 @@ static void process_op diff --git a/classstdex_1_1stream_1_1window-members.html b/classstdex_1_1stream_1_1window-members.html index dd1cef1db..6b894c7a1 100644 --- a/classstdex_1_1stream_1_1window-members.html +++ b/classstdex_1_1stream_1_1window-members.html @@ -147,7 +147,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1window.html b/classstdex_1_1stream_1_1window.html index 788928444..fcf0add8b 100644 --- a/classstdex_1_1stream_1_1window.html +++ b/classstdex_1_1stream_1_1window.html @@ -452,7 +452,7 @@ state_t m_state diff --git a/classstdex_1_1sys__object-members.html b/classstdex_1_1sys__object-members.html index 39c216257..c45e2b01a 100644 --- a/classstdex_1_1sys__object-members.html +++ b/classstdex_1_1sys__object-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1sys__object.html b/classstdex_1_1sys__object.html index cc6cb3384..8d8bccca7 100644 --- a/classstdex_1_1sys__object.html +++ b/classstdex_1_1sys__object.html @@ -182,7 +182,7 @@ sys_handle m_h diff --git a/classstdex_1_1user__cancelled-members.html b/classstdex_1_1user__cancelled-members.html index b46cd8ce6..5c53e5ce6 100644 --- a/classstdex_1_1user__cancelled-members.html +++ b/classstdex_1_1user__cancelled-members.html @@ -84,7 +84,7 @@ $(function() { diff --git a/classstdex_1_1user__cancelled.html b/classstdex_1_1user__cancelled.html index 574a39b8c..2aa7a210e 100644 --- a/classstdex_1_1user__cancelled.html +++ b/classstdex_1_1user__cancelled.html @@ -141,7 +141,7 @@ Public Member Functions diff --git a/classstdex_1_1vector__queue-members.html b/classstdex_1_1vector__queue-members.html index a69140e83..1c2582fee 100644 --- a/classstdex_1_1vector__queue-members.html +++ b/classstdex_1_1vector__queue-members.html @@ -122,7 +122,7 @@ $(function() { diff --git a/classstdex_1_1vector__queue.html b/classstdex_1_1vector__queue.html index 8c971b511..aec9c5bc2 100644 --- a/classstdex_1_1vector__queue.html +++ b/classstdex_1_1vector__queue.html @@ -795,7 +795,7 @@ template<class T > diff --git a/dir_4be4f7b278e009bf0f1906cf31fb73bd.html b/dir_4be4f7b278e009bf0f1906cf31fb73bd.html index a56d8f56f..edf3e01c3 100644 --- a/dir_4be4f7b278e009bf0f1906cf31fb73bd.html +++ b/dir_4be4f7b278e009bf0f1906cf31fb73bd.html @@ -86,7 +86,7 @@ Files diff --git a/dir_d44c64559bbebec7f509842c48db8b23.html b/dir_d44c64559bbebec7f509842c48db8b23.html index 7bcd106da..f54df42fb 100644 --- a/dir_d44c64559bbebec7f509842c48db8b23.html +++ b/dir_d44c64559bbebec7f509842c48db8b23.html @@ -86,7 +86,7 @@ Directories diff --git a/dir_fca3c47b2ea228727bd6729832f89576.html b/dir_fca3c47b2ea228727bd6729832f89576.html index 087620860..d40132ea3 100644 --- a/dir_fca3c47b2ea228727bd6729832f89576.html +++ b/dir_fca3c47b2ea228727bd6729832f89576.html @@ -128,7 +128,7 @@ Files diff --git a/endian_8hpp_source.html b/endian_8hpp_source.html index 69cbc2df9..e6b76f863 100644 --- a/endian_8hpp_source.html +++ b/endian_8hpp_source.html @@ -182,7 +182,7 @@ $(function() { diff --git a/errno_8hpp_source.html b/errno_8hpp_source.html index 48cae4ffb..b6dae81e1 100644 --- a/errno_8hpp_source.html +++ b/errno_8hpp_source.html @@ -136,7 +136,7 @@ $(function() { diff --git a/exception_8hpp_source.html b/exception_8hpp_source.html index 9b180c68b..5cfcc6310 100644 --- a/exception_8hpp_source.html +++ b/exception_8hpp_source.html @@ -102,7 +102,7 @@ $(function() { diff --git a/files.html b/files.html index 9ba554867..270208c4c 100644 --- a/files.html +++ b/files.html @@ -106,7 +106,7 @@ $(function() { diff --git a/functions.html b/functions.html index 3bb6b7bd8..1396c80e6 100644 --- a/functions.html +++ b/functions.html @@ -84,7 +84,7 @@ $(function() { diff --git a/functions_b.html b/functions_b.html index 5831d59d8..f3235f1de 100644 --- a/functions_b.html +++ b/functions_b.html @@ -81,7 +81,7 @@ $(function() { diff --git a/functions_c.html b/functions_c.html index cd2930e11..b00d6de57 100644 --- a/functions_c.html +++ b/functions_c.html @@ -89,7 +89,7 @@ $(function() { diff --git a/functions_d.html b/functions_d.html index cd32def88..c90bb563d 100644 --- a/functions_d.html +++ b/functions_d.html @@ -86,7 +86,7 @@ $(function() { diff --git a/functions_e.html b/functions_e.html index 07aa1f573..56f49631a 100644 --- a/functions_e.html +++ b/functions_e.html @@ -86,7 +86,7 @@ $(function() { diff --git a/functions_f.html b/functions_f.html index 2a1c36a5c..5c8a14dba 100644 --- a/functions_f.html +++ b/functions_f.html @@ -82,7 +82,7 @@ $(function() { diff --git a/functions_func.html b/functions_func.html index 462c12fb2..698963597 100644 --- a/functions_func.html +++ b/functions_func.html @@ -82,7 +82,7 @@ $(function() { diff --git a/functions_func_b.html b/functions_func_b.html index 0847e0747..fe404b212 100644 --- a/functions_func_b.html +++ b/functions_func_b.html @@ -80,7 +80,7 @@ $(function() { diff --git a/functions_func_c.html b/functions_func_c.html index 940824ac6..d632db54a 100644 --- a/functions_func_c.html +++ b/functions_func_c.html @@ -84,7 +84,7 @@ $(function() { diff --git a/functions_func_d.html b/functions_func_d.html index 1fee0e849..9959eb5d3 100644 --- a/functions_func_d.html +++ b/functions_func_d.html @@ -83,7 +83,7 @@ $(function() { diff --git a/functions_func_e.html b/functions_func_e.html index a324651ec..7b20c9264 100644 --- a/functions_func_e.html +++ b/functions_func_e.html @@ -81,7 +81,7 @@ $(function() { diff --git a/functions_func_f.html b/functions_func_f.html index 126ea0595..451f7e797 100644 --- a/functions_func_f.html +++ b/functions_func_f.html @@ -81,7 +81,7 @@ $(function() { diff --git a/functions_func_g.html b/functions_func_g.html index e0a2820db..53f4f4100 100644 --- a/functions_func_g.html +++ b/functions_func_g.html @@ -79,7 +79,7 @@ $(function() { diff --git a/functions_func_h.html b/functions_func_h.html index 0460f575a..3c29521af 100644 --- a/functions_func_h.html +++ b/functions_func_h.html @@ -80,7 +80,7 @@ $(function() { diff --git a/functions_func_i.html b/functions_func_i.html index 9d93d9fe7..1ed73d3fa 100644 --- a/functions_func_i.html +++ b/functions_func_i.html @@ -79,7 +79,7 @@ $(function() { diff --git a/functions_func_l.html b/functions_func_l.html index 4ed62c914..bde14cdbd 100644 --- a/functions_func_l.html +++ b/functions_func_l.html @@ -80,7 +80,7 @@ $(function() { diff --git a/functions_func_m.html b/functions_func_m.html index 56475aee6..3084139d2 100644 --- a/functions_func_m.html +++ b/functions_func_m.html @@ -80,7 +80,7 @@ $(function() { diff --git a/functions_func_n.html b/functions_func_n.html index a625d6398..154a007d3 100644 --- a/functions_func_n.html +++ b/functions_func_n.html @@ -79,7 +79,7 @@ $(function() { diff --git a/functions_func_o.html b/functions_func_o.html index beacd218c..e83c766ce 100644 --- a/functions_func_o.html +++ b/functions_func_o.html @@ -84,7 +84,7 @@ $(function() { diff --git a/functions_func_p.html b/functions_func_p.html index b3e8d3619..44cb9663d 100644 --- a/functions_func_p.html +++ b/functions_func_p.html @@ -83,7 +83,7 @@ $(function() { diff --git a/functions_func_q.html b/functions_func_q.html index e5925c0f2..01f113187 100644 --- a/functions_func_q.html +++ b/functions_func_q.html @@ -78,7 +78,7 @@ $(function() { diff --git a/functions_func_r.html b/functions_func_r.html index d41b97c29..63c70d3b5 100644 --- a/functions_func_r.html +++ b/functions_func_r.html @@ -89,7 +89,7 @@ $(function() { diff --git a/functions_func_s.html b/functions_func_s.html index 4f0b37bba..d00f52eaf 100644 --- a/functions_func_s.html +++ b/functions_func_s.html @@ -95,7 +95,7 @@ $(function() { diff --git a/functions_func_t.html b/functions_func_t.html index 25f53cfed..abf800b53 100644 --- a/functions_func_t.html +++ b/functions_func_t.html @@ -80,7 +80,7 @@ $(function() { diff --git a/functions_func_u.html b/functions_func_u.html index 8dc6f1003..76c56e4cb 100644 --- a/functions_func_u.html +++ b/functions_func_u.html @@ -79,7 +79,7 @@ $(function() { diff --git a/functions_func_v.html b/functions_func_v.html index 673344b0d..61a82db98 100644 --- a/functions_func_v.html +++ b/functions_func_v.html @@ -78,7 +78,7 @@ $(function() { diff --git a/functions_func_w.html b/functions_func_w.html index ceb7f20b3..035a8a478 100644 --- a/functions_func_w.html +++ b/functions_func_w.html @@ -86,7 +86,7 @@ $(function() { diff --git a/functions_func_~.html b/functions_func_~.html index d127ec61a..2b7c86690 100644 --- a/functions_func_~.html +++ b/functions_func_~.html @@ -78,7 +78,7 @@ $(function() { diff --git a/functions_g.html b/functions_g.html index 0077f64f8..3c97f3023 100644 --- a/functions_g.html +++ b/functions_g.html @@ -79,7 +79,7 @@ $(function() { diff --git a/functions_h.html b/functions_h.html index 7834ada5b..4ee92a0d9 100644 --- a/functions_h.html +++ b/functions_h.html @@ -81,7 +81,7 @@ $(function() { diff --git a/functions_i.html b/functions_i.html index 3fe3f942b..40d8a28b7 100644 --- a/functions_i.html +++ b/functions_i.html @@ -80,7 +80,7 @@ $(function() { diff --git a/functions_l.html b/functions_l.html index 3cff336ba..9e65e8c68 100644 --- a/functions_l.html +++ b/functions_l.html @@ -81,7 +81,7 @@ $(function() { diff --git a/functions_m.html b/functions_m.html index d8f787bce..7437ece7c 100644 --- a/functions_m.html +++ b/functions_m.html @@ -95,7 +95,7 @@ $(function() { diff --git a/functions_n.html b/functions_n.html index 44ee750ad..89afeba5f 100644 --- a/functions_n.html +++ b/functions_n.html @@ -85,7 +85,7 @@ $(function() { diff --git a/functions_o.html b/functions_o.html index 536889382..478c7ae40 100644 --- a/functions_o.html +++ b/functions_o.html @@ -85,7 +85,7 @@ $(function() { diff --git a/functions_p.html b/functions_p.html index 60e3e4502..bdec7d03c 100644 --- a/functions_p.html +++ b/functions_p.html @@ -87,7 +87,7 @@ $(function() { diff --git a/functions_q.html b/functions_q.html index aa09f80a2..58e8ed8d9 100644 --- a/functions_q.html +++ b/functions_q.html @@ -78,7 +78,7 @@ $(function() { diff --git a/functions_r.html b/functions_r.html index 4627d90d9..e044c1090 100644 --- a/functions_r.html +++ b/functions_r.html @@ -93,7 +93,7 @@ $(function() { diff --git a/functions_s.html b/functions_s.html index 85928dfb4..ab453af21 100644 --- a/functions_s.html +++ b/functions_s.html @@ -101,7 +101,7 @@ $(function() { diff --git a/functions_t.html b/functions_t.html index 763e8e2f0..777f60e93 100644 --- a/functions_t.html +++ b/functions_t.html @@ -81,7 +81,7 @@ $(function() { diff --git a/functions_type.html b/functions_type.html index 44e47fc9c..e3f9d3a7d 100644 --- a/functions_type.html +++ b/functions_type.html @@ -81,7 +81,7 @@ $(function() { diff --git a/functions_u.html b/functions_u.html index 0a588699b..feb817f31 100644 --- a/functions_u.html +++ b/functions_u.html @@ -79,7 +79,7 @@ $(function() { diff --git a/functions_v.html b/functions_v.html index 11eda6c7f..3a3d995de 100644 --- a/functions_v.html +++ b/functions_v.html @@ -81,7 +81,7 @@ $(function() { diff --git a/functions_vars.html b/functions_vars.html index 678c0061a..3db0ac870 100644 --- a/functions_vars.html +++ b/functions_vars.html @@ -204,7 +204,7 @@ $(function() { diff --git a/functions_w.html b/functions_w.html index f0bd5126b..5fb5fdb0e 100644 --- a/functions_w.html +++ b/functions_w.html @@ -88,7 +88,7 @@ $(function() { diff --git a/functions_~.html b/functions_~.html index 070581b24..fc9a5d614 100644 --- a/functions_~.html +++ b/functions_~.html @@ -78,7 +78,7 @@ $(function() { diff --git a/hex_8hpp_source.html b/hex_8hpp_source.html index abc66f754..9e1a32d9c 100644 --- a/hex_8hpp_source.html +++ b/hex_8hpp_source.html @@ -209,7 +209,7 @@ $(function() { diff --git a/hierarchy.html b/hierarchy.html index e75166a8a..36a2b954d 100644 --- a/hierarchy.html +++ b/hierarchy.html @@ -229,7 +229,7 @@ $(function() { diff --git a/idrec_8hpp_source.html b/idrec_8hpp_source.html index 6df949d81..e64c359f8 100644 --- a/idrec_8hpp_source.html +++ b/idrec_8hpp_source.html @@ -275,7 +275,7 @@ $(function() { diff --git a/index.html b/index.html index acf6bfc6f..5b618cff1 100644 --- a/index.html +++ b/index.html @@ -76,7 +76,7 @@ $(function() { diff --git a/interval_8hpp_source.html b/interval_8hpp_source.html index f38b65508..f8fd43537 100644 --- a/interval_8hpp_source.html +++ b/interval_8hpp_source.html @@ -131,7 +131,7 @@ $(function() { diff --git a/mapping_8hpp_source.html b/mapping_8hpp_source.html index fa45fb5d7..8f1185915 100644 --- a/mapping_8hpp_source.html +++ b/mapping_8hpp_source.html @@ -117,7 +117,7 @@ $(function() { diff --git a/math_8hpp_source.html b/math_8hpp_source.html index 3ef05ef68..f374f1aa3 100644 --- a/math_8hpp_source.html +++ b/math_8hpp_source.html @@ -129,7 +129,7 @@ $(function() { diff --git a/memory_8hpp_source.html b/memory_8hpp_source.html index a2f5827c3..eced8b383 100644 --- a/memory_8hpp_source.html +++ b/memory_8hpp_source.html @@ -119,7 +119,7 @@ $(function() { diff --git a/parser_8hpp_source.html b/parser_8hpp_source.html index f0f3ac1bb..dc5bae4a8 100644 --- a/parser_8hpp_source.html +++ b/parser_8hpp_source.html @@ -6546,7 +6546,7 @@ $(function() { diff --git a/pch_8h_source.html b/pch_8h_source.html index 37b40be48..0946a9f91 100644 --- a/pch_8h_source.html +++ b/pch_8h_source.html @@ -114,7 +114,7 @@ $(function() { diff --git a/progress_8hpp_source.html b/progress_8hpp_source.html index dbb1582ff..a3df8c234 100644 --- a/progress_8hpp_source.html +++ b/progress_8hpp_source.html @@ -282,7 +282,7 @@ $(function() { diff --git a/ring_8hpp_source.html b/ring_8hpp_source.html index 35940f761..a080a8eab 100644 --- a/ring_8hpp_source.html +++ b/ring_8hpp_source.html @@ -205,7 +205,7 @@ $(function() { diff --git a/sal_8hpp_source.html b/sal_8hpp_source.html index 6a2d1cec4..eb646d474 100644 --- a/sal_8hpp_source.html +++ b/sal_8hpp_source.html @@ -168,7 +168,7 @@ $(function() { diff --git a/sgml_8hpp_source.html b/sgml_8hpp_source.html index 0ca841d41..4cad07fc8 100644 --- a/sgml_8hpp_source.html +++ b/sgml_8hpp_source.html @@ -423,7 +423,7 @@ $(function() { diff --git a/sgml__unicode_8hpp_source.html b/sgml__unicode_8hpp_source.html index 361f95e4b..888dfb68b 100644 --- a/sgml__unicode_8hpp_source.html +++ b/sgml__unicode_8hpp_source.html @@ -3170,7 +3170,7 @@ $(function() { diff --git a/stream_8hpp_source.html b/stream_8hpp_source.html index e3e66efed..59a4fcb4e 100644 --- a/stream_8hpp_source.html +++ b/stream_8hpp_source.html @@ -1431,1837 +1431,1858 @@ $(function() {
1644 m_state = source.state();
1645 m_source = &source;
1646 m_offset = source.tell();
-
1647 }
-
1648
-
1649 public:
-
1650 cache(_Inout_ basic_file& source, _In_ size_t cache_size = default_cache_size) :
-
1651 basic(source.state()),
-
1652 m_source(&source),
-
1653 m_cache(cache_size),
-
1654 m_offset(source.tell())
-
1655#if SET_FILE_OP_TIMES
-
1656 , m_atime(time_point::min()),
-
1657 m_mtime(time_point::min())
-
1658#endif
-
1659 {}
-
1660
-
1661 virtual ~cache()
-
1662 {
-
1663 if (m_source) {
-
1664 flush_cache();
-
1665 m_source->seek(m_offset);
-
1666 }
-
1667 }
-
1668
-
1669 virtual _Success_(return != 0 || length == 0) size_t read(
-
1670 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
1671 {
-
1672 assert(data || !length);
-
1673#if SET_FILE_OP_TIMES
-
1674 m_atime = time_point::now();
-
1675#endif
-
1676 for (size_t to_read = length;;) {
-
1677 if (m_cache.status != cache_t::cache_t::status_t::empty) {
-
1678 if (m_cache.region.contains(m_offset)) {
-
1679 size_t remaining_cache = static_cast<size_t>(m_cache.region.end - m_offset);
-
1680 if (to_read <= remaining_cache) {
-
1681 memcpy(data, m_cache.data + static_cast<size_t>(m_offset - m_cache.region.start), to_read);
-
1682 m_offset += to_read;
-
1683 m_state = state_t::ok;
-
1684 return length;
-
1685 }
-
1686 memcpy(data, m_cache.data + static_cast<size_t>(m_offset - m_cache.region.start), remaining_cache);
-
1687 reinterpret_cast<uint8_t*&>(data) += remaining_cache;
-
1688 to_read -= remaining_cache;
-
1689 m_offset += remaining_cache;
-
1690 }
-
1691 flush_cache();
-
1692 if (!ok()) _Unlikely_ {
-
1693 if (to_read < length)
-
1694 m_state = state_t::ok;
-
1695 return length - to_read;
+
1647#if SET_FILE_OP_TIMES
+
1648 m_atime = source.atime();
+
1649 m_mtime = source.mtime();
+
1650#endif
+
1651 }
+
1652
+
1653 public:
+
1654 cache(_Inout_ basic_file& source, _In_ size_t cache_size = default_cache_size) :
+
1655 basic(source.state()),
+
1656 m_source(&source),
+
1657 m_cache(cache_size),
+
1658 m_offset(source.tell())
+
1659#if SET_FILE_OP_TIMES
+
1660 , m_atime(source.atime()),
+
1661 m_mtime(source.mtime())
+
1662#endif
+
1663 {}
+
1664
+
1665 virtual ~cache() noexcept(false)
+
1666 {
+
1667 if (m_source) {
+
1668 flush_cache();
+
1669 if (!ok()) _Unlikely_
+
1670 throw std::runtime_error("cache flush failed"); // Data loss occured
+
1671 m_source->seek(m_offset);
+
1672 }
+
1673 }
+
1674
+
1675 virtual _Success_(return != 0 || length == 0) size_t read(
+
1676 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
1677 {
+
1678 assert(data || !length);
+
1679#if SET_FILE_OP_TIMES
+
1680 m_atime = time_point::now();
+
1681#endif
+
1682 for (size_t to_read = length;;) {
+
1683 if (m_cache.status != cache_t::cache_t::status_t::empty) {
+
1684 if (m_cache.region.contains(m_offset)) {
+
1685 size_t remaining_cache = static_cast<size_t>(m_cache.region.end - m_offset);
+
1686 if (to_read <= remaining_cache) {
+
1687 memcpy(data, m_cache.data + static_cast<size_t>(m_offset - m_cache.region.start), to_read);
+
1688 m_offset += to_read;
+
1689 m_state = state_t::ok;
+
1690 return length;
+
1691 }
+
1692 memcpy(data, m_cache.data + static_cast<size_t>(m_offset - m_cache.region.start), remaining_cache);
+
1693 reinterpret_cast<uint8_t*&>(data) += remaining_cache;
+
1694 to_read -= remaining_cache;
+
1695 m_offset += remaining_cache;
1696 }
-
1697 }
-
1698 {
-
1699 fpos_t end_max = m_offset + to_read;
-
1700 if (m_offset / m_cache.capacity < end_max / m_cache.capacity) {
-
1701 // Read spans multiple cache blocks. Bypass cache to the last block.
-
1702 m_source->seek(m_offset);
-
1703 if (!m_source->ok()) _Unlikely_ {
-
1704 m_state = to_read < length ? state_t::ok : state_t::fail;
-
1705 return length - to_read;
-
1706 }
-
1707 size_t num_read = m_source->read(data, to_read - static_cast<size_t>(end_max % m_cache.capacity));
-
1708 m_offset += num_read;
-
1709 to_read -= num_read;
-
1710 if (!to_read) {
-
1711 m_state = state_t::ok;
-
1712 return length;
-
1713 }
-
1714 reinterpret_cast<uint8_t*&>(data) += num_read;
-
1715 m_state = m_source->state();
-
1716 if (!ok()) {
-
1717 if (to_read < length)
-
1718 m_state = state_t::ok;
-
1719 return length - to_read;
-
1720 }
-
1721 }
-
1722 }
-
1723 load_cache(m_offset);
-
1724 if (!ok() || m_cache.region.end <= m_offset) _Unlikely_ {
-
1725 m_state = to_read < length ? state_t::ok : state_t::fail;
-
1726 return length - to_read;
-
1727 }
-
1728 }
-
1729 }
-
1730
-
1731 virtual _Success_(return != 0) size_t write(
-
1732 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
1733 {
-
1734 assert(data || !length);
-
1735#if SET_FILE_OP_TIMES
-
1736 m_atime = m_mtime = time_point::now();
-
1737#endif
-
1738 for (size_t to_write = length;;) {
-
1739 if (m_cache.status != cache_t::cache_t::status_t::empty) {
-
1740 fpos_t end_max = m_cache.region.start + m_cache.capacity;
-
1741 if (m_cache.region.start <= m_offset && m_offset < end_max) {
-
1742 size_t remaining_cache = static_cast<size_t>(end_max - m_offset);
-
1743 if (to_write <= remaining_cache) {
-
1744 memcpy(m_cache.data + static_cast<size_t>(m_offset - m_cache.region.start), data, to_write);
-
1745 m_offset += to_write;
-
1746 m_cache.status = cache_t::cache_t::status_t::dirty;
-
1747 m_cache.region.end = std::max(m_cache.region.end, m_offset);
-
1748 m_state = state_t::ok;
-
1749 return length;
-
1750 }
-
1751 memcpy(m_cache.data + static_cast<size_t>(m_offset - m_cache.region.start), data, remaining_cache);
-
1752 reinterpret_cast<const uint8_t*&>(data) += remaining_cache;
-
1753 to_write -= remaining_cache;
-
1754 m_offset += remaining_cache;
-
1755 m_cache.status = cache_t::cache_t::status_t::dirty;
-
1756 m_cache.region.end = end_max;
-
1757 }
-
1758 flush_cache();
-
1759 if (!ok()) _Unlikely_
-
1760 return length - to_write;
-
1761 }
-
1762 {
-
1763 fpos_t end_max = m_offset + to_write;
-
1764 if (m_offset / m_cache.capacity < end_max / m_cache.capacity) {
-
1765 // Write spans multiple cache blocks. Bypass cache to the last block.
-
1766 m_source->seek(m_offset);
-
1767 if (!ok()) _Unlikely_
-
1768 return length - to_write;
-
1769 size_t num_written = m_source->write(data, to_write - static_cast<size_t>(end_max % m_cache.capacity));
-
1770 reinterpret_cast<const uint8_t*&>(data) += num_written;
-
1771 to_write -= num_written;
-
1772 m_offset += num_written;
-
1773 m_state = m_source->state();
-
1774 if (!to_write || !ok())
-
1775 return length - to_write;
-
1776 }
-
1777 }
-
1778 load_cache(m_offset);
-
1779 if (!ok()) _Unlikely_
-
1780 return length - to_write;
-
1781 }
-
1782 }
-
1783
-
1784 virtual void close()
-
1785 {
-
1786 flush_cache();
-
1787 m_source->close();
-
1788 m_state = m_source->state();
-
1789 }
-
1790
-
1791 virtual void flush()
-
1792 {
-
1793#if SET_FILE_OP_TIMES
-
1794 m_atime = m_mtime = time_point::min();
-
1795#endif
-
1796 flush_cache();
-
1797 if (!ok()) _Unlikely_
-
1798 return;
-
1799 m_source->flush();
-
1800 }
-
1801
-
1802 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
-
1803 {
-
1804 m_state = state_t::ok;
-
1805 switch (how) {
-
1806 case seek_t::beg:
-
1807 return m_offset = offset;
-
1808 case seek_t::cur:
-
1809 return m_offset += offset;
-
1810 case seek_t::end:
-
1811 return m_offset = size() + offset;
-
1812 default:
-
1813 throw std::invalid_argument("unknown seek origin");
-
1814 }
-
1815 }
-
1816
-
1817 virtual fpos_t tell() const
-
1818 {
-
1819 return m_offset;
-
1820 }
-
1821
-
1822 virtual void lock(_In_ fpos_t offset, _In_ fsize_t length)
-
1823 {
-
1824 m_source->lock(offset, length);
-
1825 m_state = m_source->state();
-
1826 }
-
1827
-
1828 virtual void unlock(_In_ fpos_t offset, _In_ fsize_t length)
-
1829 {
-
1830 m_source->unlock(offset, length);
-
1831 m_state = m_source->state();
-
1832 }
-
1833
-
1834 virtual fsize_t size()
-
1835 {
-
1836 return m_cache.data ? std::max(m_source->size(), m_cache.region.end) : m_source->size();
-
1837 }
-
1838
-
1839 virtual void truncate()
-
1840 {
-
1841#if SET_FILE_OP_TIMES
-
1842 m_atime = m_mtime = time_point::now();
-
1843#endif
-
1844 m_source->seek(m_offset);
-
1845 if (m_cache.region.end <= m_offset) {
-
1846 // Truncation does not affect cache.
-
1847 }
-
1848 else if (m_cache.region.start <= m_offset) {
-
1849 // Truncation truncates cache.
-
1850 m_cache.region.end = m_offset;
-
1851 }
-
1852 else {
-
1853 // Truncation invalidates cache.
-
1854 m_cache.region = 0;
-
1855 m_cache.status = cache_t::cache_t::status_t::empty;
-
1856 }
-
1857 m_source->truncate();
-
1858 m_state = m_source->state();
-
1859 }
-
1860
-
1861 virtual time_point ctime() const
-
1862 {
-
1863 return m_source->ctime();
-
1864 }
-
1865
-
1866 virtual time_point atime() const
-
1867 {
-
1868#if SET_FILE_OP_TIMES
-
1869 return std::max(m_atime, m_source->atime());
-
1870#else
-
1871 return m_source->atime();
-
1872#endif
+
1697 flush_cache();
+
1698 if (!ok()) _Unlikely_ {
+
1699 if (to_read < length)
+
1700 m_state = state_t::ok;
+
1701 return length - to_read;
+
1702 }
+
1703 }
+
1704 {
+
1705 fpos_t end_max = m_offset + to_read;
+
1706 if (m_offset / m_cache.capacity < end_max / m_cache.capacity) {
+
1707 // Read spans multiple cache blocks. Bypass cache to the last block.
+
1708 m_source->seek(m_offset);
+
1709 if (!m_source->ok()) _Unlikely_ {
+
1710 m_state = to_read < length ? state_t::ok : state_t::fail;
+
1711 return length - to_read;
+
1712 }
+
1713 size_t num_read = m_source->read(data, to_read - static_cast<size_t>(end_max % m_cache.capacity));
+
1714 m_offset += num_read;
+
1715 to_read -= num_read;
+
1716 if (!to_read) {
+
1717 m_state = state_t::ok;
+
1718 return length;
+
1719 }
+
1720 reinterpret_cast<uint8_t*&>(data) += num_read;
+
1721 m_state = m_source->state();
+
1722 if (!ok()) {
+
1723 if (to_read < length)
+
1724 m_state = state_t::ok;
+
1725 return length - to_read;
+
1726 }
+
1727 }
+
1728 }
+
1729 load_cache(m_offset);
+
1730 if (!ok() || m_cache.region.end <= m_offset) _Unlikely_ {
+
1731 m_state = to_read < length ? state_t::ok : state_t::fail;
+
1732 return length - to_read;
+
1733 }
+
1734 }
+
1735 }
+
1736
+
1737 virtual _Success_(return != 0) size_t write(
+
1738 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
1739 {
+
1740 assert(data || !length);
+
1741#if SET_FILE_OP_TIMES
+
1742 m_atime = m_mtime = time_point::now();
+
1743#endif
+
1744 for (size_t to_write = length;;) {
+
1745 if (m_cache.status != cache_t::cache_t::status_t::empty) {
+
1746 fpos_t end_max = m_cache.region.start + m_cache.capacity;
+
1747 if (m_cache.region.start <= m_offset && m_offset < end_max) {
+
1748 size_t remaining_cache = static_cast<size_t>(end_max - m_offset);
+
1749 if (to_write <= remaining_cache) {
+
1750 memcpy(m_cache.data + static_cast<size_t>(m_offset - m_cache.region.start), data, to_write);
+
1751 m_offset += to_write;
+
1752 m_cache.status = cache_t::cache_t::status_t::dirty;
+
1753 m_cache.region.end = std::max(m_cache.region.end, m_offset);
+
1754 m_state = state_t::ok;
+
1755 return length;
+
1756 }
+
1757 memcpy(m_cache.data + static_cast<size_t>(m_offset - m_cache.region.start), data, remaining_cache);
+
1758 reinterpret_cast<const uint8_t*&>(data) += remaining_cache;
+
1759 to_write -= remaining_cache;
+
1760 m_offset += remaining_cache;
+
1761 m_cache.status = cache_t::cache_t::status_t::dirty;
+
1762 m_cache.region.end = end_max;
+
1763 }
+
1764 flush_cache();
+
1765 if (!ok()) _Unlikely_
+
1766 return length - to_write;
+
1767 }
+
1768 {
+
1769 fpos_t end_max = m_offset + to_write;
+
1770 if (m_offset / m_cache.capacity < end_max / m_cache.capacity) {
+
1771 // Write spans multiple cache blocks. Bypass cache to the last block.
+
1772 m_source->seek(m_offset);
+
1773 if (!ok()) _Unlikely_
+
1774 return length - to_write;
+
1775 size_t num_written = m_source->write(data, to_write - static_cast<size_t>(end_max % m_cache.capacity));
+
1776 m_offset += num_written;
+
1777 m_state = m_source->state();
+
1778 to_write -= num_written;
+
1779 if (!to_write || !ok())
+
1780 return length - to_write;
+
1781 reinterpret_cast<const uint8_t*&>(data) += num_written;
+
1782 }
+
1783 }
+
1784 load_cache(m_offset);
+
1785 if (!ok()) _Unlikely_
+
1786 return length - to_write;
+
1787 }
+
1788 }
+
1789
+
1790 virtual void close()
+
1791 {
+
1792 invalidate_cache();
+
1793 if (!ok()) _Unlikely_
+
1794 throw std::runtime_error("cache flush failed"); // Data loss occured
+
1795 m_source->close();
+
1796 m_state = m_source->state();
+
1797 }
+
1798
+
1799 virtual void flush()
+
1800 {
+
1801#if SET_FILE_OP_TIMES
+
1802 m_atime = m_mtime = time_point::min();
+
1803#endif
+
1804 flush_cache();
+
1805 if (!ok()) _Unlikely_
+
1806 return;
+
1807 m_source->flush();
+
1808 }
+
1809
+
1810 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
+
1811 {
+
1812 m_state = state_t::ok;
+
1813 switch (how) {
+
1814 case seek_t::beg:
+
1815 return m_offset = offset;
+
1816 case seek_t::cur:
+
1817 return m_offset += offset;
+
1818 case seek_t::end:
+
1819 return m_offset = size() + offset;
+
1820 default:
+
1821 throw std::invalid_argument("unknown seek origin");
+
1822 }
+
1823 }
+
1824
+
1825 virtual fpos_t tell() const
+
1826 {
+
1827 return m_offset;
+
1828 }
+
1829
+
1830 virtual void lock(_In_ fpos_t offset, _In_ fsize_t length)
+
1831 {
+
1832 m_source->lock(offset, length);
+
1833 m_state = m_source->state();
+
1834 }
+
1835
+
1836 virtual void unlock(_In_ fpos_t offset, _In_ fsize_t length)
+
1837 {
+
1838 m_source->unlock(offset, length);
+
1839 m_state = m_source->state();
+
1840 }
+
1841
+
1842 virtual fsize_t size()
+
1843 {
+
1844 return m_cache.status != cache_t::cache_t::status_t::empty ?
+
1845 std::max(m_source->size(), m_cache.region.end) :
+
1846 m_source->size();
+
1847 }
+
1848
+
1849 virtual void truncate()
+
1850 {
+
1851#if SET_FILE_OP_TIMES
+
1852 m_atime = m_mtime = time_point::now();
+
1853#endif
+
1854 m_source->seek(m_offset);
+
1855 if (m_cache.region.end <= m_offset) {
+
1856 // Truncation does not affect cache.
+
1857 }
+
1858 else if (m_cache.region.start <= m_offset) {
+
1859 // Truncation truncates cache.
+
1860 m_cache.region.end = m_offset;
+
1861 }
+
1862 else {
+
1863 // Truncation invalidates cache.
+
1864 m_cache.status = cache_t::cache_t::status_t::empty;
+
1865 }
+
1866 m_source->truncate();
+
1867 m_state = m_source->state();
+
1868 }
+
1869
+
1870 virtual time_point ctime() const
+
1871 {
+
1872 return m_source->ctime();
1873 }
1874
-
1875 virtual time_point mtime() const
+
1875 virtual time_point atime() const
1876 {
1877#if SET_FILE_OP_TIMES
-
1878 return std::max(m_mtime, m_source->mtime());
+
1878 return std::max(m_atime, m_source->atime());
1879#else
-
1880 return m_source->mtime();
+
1880 return m_source->atime();
1881#endif
1882 }
1883
-
1884 virtual void set_ctime(time_point date)
-
1885 {
-
1886 m_source->set_ctime(date);
-
1887 }
-
1888
-
1889 virtual void set_atime(time_point date)
-
1890 {
-
1891#if SET_FILE_OP_TIMES
-
1892 m_atime = date;
-
1893#endif
-
1894 m_source->set_atime(date);
-
1895 }
-
1896
-
1897 virtual void set_mtime(time_point date)
-
1898 {
-
1899#if SET_FILE_OP_TIMES
-
1900 m_mtime = date;
-
1901#endif
-
1902 m_source->set_mtime(date);
-
1903 }
-
1904
-
1905 protected:
-
1906 void flush_cache()
+
1884 virtual time_point mtime() const
+
1885 {
+
1886#if SET_FILE_OP_TIMES
+
1887 return std::max(m_mtime, m_source->mtime());
+
1888#else
+
1889 return m_source->mtime();
+
1890#endif
+
1891 }
+
1892
+
1893 virtual void set_ctime(time_point date)
+
1894 {
+
1895 m_source->set_ctime(date);
+
1896 }
+
1897
+
1898 virtual void set_atime(time_point date)
+
1899 {
+
1900#if SET_FILE_OP_TIMES
+
1901 m_atime = date;
+
1902#endif
+
1903 m_source->set_atime(date);
+
1904 }
+
1905
+
1906 virtual void set_mtime(time_point date)
1907 {
-
1908 if (m_cache.status != cache_t::cache_t::status_t::dirty) {
-
1909 m_state = state_t::ok;
-
1910 }
-
1911 else if (!m_cache.region.empty()) {
-
1912 m_source->seek(m_cache.region.start);
-
1913 m_source->write(m_cache.data, static_cast<size_t>(m_cache.region.size()));
-
1914 m_state = m_source->state();
-
1915 if (ok())
-
1916 m_cache.status = cache_t::cache_t::status_t::loaded;
-
1917 }
-
1918 else {
-
1919 m_state = state_t::ok;
-
1920 m_cache.status = cache_t::cache_t::status_t::loaded;
-
1921 }
-
1922 }
-
1923
-
1924 void invalidate_cache()
-
1925 {
-
1926 flush_cache();
-
1927 if (ok()) {
-
1928 m_cache.region = 0;
-
1929 m_cache.status = cache_t::cache_t::status_t::empty;
-
1930 }
-
1931 }
-
1932
-
1933 void load_cache(_In_ fpos_t start)
-
1934 {
-
1935 assert(m_cache.status != cache_t::cache_t::status_t::dirty);
-
1936 start -= start % m_cache.capacity; // Align to cache block size.
-
1937 m_source->seek(m_cache.region.start = start);
-
1938 if (m_source->ok()) {
-
1939 m_cache.region.end = start + m_source->read(m_cache.data, m_cache.capacity);
-
1940 m_cache.status = cache_t::cache_t::status_t::loaded;
-
1941 m_state = state_t::ok; // Regardless the read failure, we still might have cached some data.
-
1942 }
-
1943 else
-
1944 m_state = state_t::fail;
-
1945 }
-
1946
-
1947 basic_file* m_source;
-
1948 struct cache_t {
-
1949 uint8_t* data;
-
1950 size_t capacity;
-
1951 enum class status_t {
-
1952 empty = 0,
-
1953 loaded,
-
1954 dirty,
-
1955 } status;
-
1956 interval<fpos_t> region;
-
1957
-
1958 cache_t(_In_ size_t _capacity) :
-
1959 data(new uint8_t[_capacity]),
-
1960 capacity(_capacity),
-
1961 status(status_t::empty),
-
1962 region(0)
-
1963 {}
-
1964
-
1965 ~cache_t()
-
1966 {
-
1967 delete[] data;
-
1968 }
-
1969 } m_cache;
-
1970 fpos_t m_offset;
-
1971#if SET_FILE_OP_TIMES
-
1972 time_point
-
1973 m_atime,
-
1974 m_mtime;
-
1975#endif
-
1976 };
-
1977
-
1981 class basic_sys : virtual public basic, public sys_object
-
1982 {
-
1983 public:
-
1984 basic_sys(_In_opt_ sys_handle h = invalid_handle, _In_ state_t state = state_t::ok) :
-
1985 basic(state),
-
1986 sys_object(h)
-
1987 {}
-
1988
-
1989 virtual _Success_(return != 0 || length == 0) size_t read(
-
1990 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
1991 {
-
1992 assert(data || !length);
-
1993 // Windows Server 2003 and Windows XP: Pipe write operations across a network are limited in size per write.
-
1994 // The amount varies per platform. For x86 platforms it's 63.97 MB. For x64 platforms it's 31.97 MB. For Itanium
-
1995 // it's 63.95 MB. For more information regarding pipes, see the Remarks section.
-
1996 size_t
-
1997#if defined(_WIN64)
-
1998 block_size = 0x1F80000;
-
1999#elif defined(_WIN32)
-
2000 block_size = 0x3f00000;
-
2001#else
-
2002 block_size = SSIZE_MAX;
-
2003#endif
-
2004 for (size_t to_read = length;;) {
-
2005#ifdef _WIN32
-
2006 // ReadFile() might raise exception (e.g. STATUS_FILE_BAD_FORMAT/0xE0000002).
-
2007 BOOL succeeded;
-
2008 DWORD num_read;
-
2009 __try { succeeded = ReadFile(m_h, data, static_cast<DWORD>(std::min<size_t>(to_read, block_size)), &num_read, nullptr); }
-
2010 __except (EXCEPTION_EXECUTE_HANDLER) { succeeded = FALSE; SetLastError(ERROR_UNHANDLED_EXCEPTION); num_read = 0; }
-
2011 if (!succeeded && GetLastError() == ERROR_NO_SYSTEM_RESOURCES && block_size > default_block_size) _Unlikely_ {
-
2012 // Error "Insufficient system resources exist to complete the requested service." occurs
-
2013 // ocasionally, when attempting to read too much data at once (e.g. over \\TSClient).
-
2014 block_size = default_block_size;
-
2015 continue;
-
2016 }
-
2017 if (!succeeded) _Unlikely_
-
2018#else
-
2019 ssize_t num_read = static_cast<ssize_t>(std::min<size_t>(to_read, block_size));
-
2020 num_read = read(m_h, data, num_read);
-
2021 if (num_read < 0) _Unlikely_
-
2022#endif
-
2023 {
-
2024 m_state = to_read < length ? state_t::ok : state_t::fail;
-
2025 return length - to_read;
-
2026 }
-
2027 if (!num_read) _Unlikely_ {
-
2028 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
-
2029 return length - to_read;
-
2030 }
-
2031 to_read -= num_read;
-
2032 if (!to_read) {
-
2033 m_state = state_t::ok;
-
2034 return length;
-
2035 }
-
2036 reinterpret_cast<uint8_t*&>(data) += num_read;
-
2037 }
-
2038 }
-
2039
-
2040 virtual _Success_(return != 0) size_t write(
-
2041 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
2042 {
-
2043 // Windows Server 2003 and Windows XP: Pipe write operations across a network are limited in size per write.
-
2044 // The amount varies per platform. For x86 platforms it's 63.97 MB. For x64 platforms it's 31.97 MB. For Itanium
-
2045 // it's 63.95 MB. For more information regarding pipes, see the Remarks section.
-
2046 constexpr size_t
-
2047#if defined(_WIN64)
-
2048 block_size = 0x1F80000;
-
2049#elif defined(_WIN32)
-
2050 block_size = 0x3f00000;
-
2051#else
-
2052 block_size = SSIZE_MAX;
-
2053#endif
-
2054 for (size_t to_write = length;;) {
-
2055#ifdef _WIN32
-
2056 // ReadFile() might raise an exception. Be cautious with WriteFile() too.
-
2057 BOOL succeeded;
-
2058 DWORD num_written;
-
2059 __try { succeeded = WriteFile(m_h, data, static_cast<DWORD>(std::min<size_t>(to_write, block_size)), &num_written, nullptr); }
-
2060 __except (EXCEPTION_EXECUTE_HANDLER) { succeeded = FALSE; SetLastError(ERROR_UNHANDLED_EXCEPTION); num_written = 0; }
-
2061 to_write -= num_written;
-
2062 if (!to_write) {
-
2063 m_state = state_t::ok;
-
2064 return length;
-
2065 }
-
2066 reinterpret_cast<const uint8_t*&>(data) += num_written;
-
2067 if (!succeeded) _Unlikely_ {
-
2068 m_state = state_t::fail;
-
2069 return length - to_write;
-
2070 }
-
2071#else
-
2072 ssize_t num_written = write(m_h, data, static_cast<ssize_t>(std::min<size_t>(to_write, block_size)));
-
2073 if (num_written < 0) _Unlikely_ {
-
2074 m_state = state_t::fail;
-
2075 return length - to_write;
-
2076 }
+
1908#if SET_FILE_OP_TIMES
+
1909 m_mtime = date;
+
1910#endif
+
1911 m_source->set_mtime(date);
+
1912 }
+
1913
+
1914 protected:
+
1915 void flush_cache()
+
1916 {
+
1917 if (m_cache.status != cache_t::cache_t::status_t::dirty)
+
1918 m_state = state_t::ok;
+
1919 else if (!m_cache.region.empty()) {
+
1920 write_cache();
+
1921 if (ok())
+
1922 m_cache.status = cache_t::cache_t::status_t::loaded;
+
1923 }
+
1924 else {
+
1925 m_state = state_t::ok;
+
1926 m_cache.status = cache_t::cache_t::status_t::loaded;
+
1927 }
+
1928 }
+
1929
+
1930 void invalidate_cache()
+
1931 {
+
1932 if (m_cache.status == cache_t::cache_t::status_t::dirty && !m_cache.region.empty()) {
+
1933 write_cache();
+
1934 if (!ok()) _Unlikely_
+
1935 return;
+
1936 } else
+
1937 m_state = state_t::ok;
+
1938 m_cache.status = cache_t::cache_t::status_t::empty;
+
1939 }
+
1940
+
1941 void load_cache(_In_ fpos_t start)
+
1942 {
+
1943 assert(m_cache.status != cache_t::cache_t::status_t::dirty);
+
1944 start -= start % m_cache.capacity; // Align to cache block size.
+
1945 m_source->seek(m_cache.region.start = start);
+
1946 if (m_source->ok()) {
+
1947 m_cache.region.end = start + m_source->read(m_cache.data, m_cache.capacity);
+
1948 m_cache.status = cache_t::cache_t::status_t::loaded;
+
1949 m_state = state_t::ok; // Regardless the read failure, we still might have cached some data.
+
1950 }
+
1951 else
+
1952 m_state = state_t::fail;
+
1953 }
+
1954
+
1955 void write_cache()
+
1956 {
+
1957 assert(m_cache.status == cache_t::cache_t::status_t::dirty);
+
1958 m_source->seek(m_cache.region.start);
+
1959 m_source->write(m_cache.data, static_cast<size_t>(m_cache.region.size()));
+
1960 m_state = m_source->state();
+
1961 }
+
1962
+
1963 basic_file* m_source;
+
1964 struct cache_t {
+
1965 uint8_t* data;
+
1966 size_t capacity;
+
1967 enum class status_t {
+
1968 empty = 0,
+
1969 loaded,
+
1970 dirty,
+
1971 } status;
+
1972 interval<fpos_t> region;
+
1973
+
1974 cache_t(_In_ size_t _capacity) :
+
1975 data(new uint8_t[_capacity]),
+
1976 capacity(_capacity),
+
1977 status(status_t::empty),
+
1978 region(0)
+
1979 {}
+
1980
+
1981 ~cache_t()
+
1982 {
+
1983 delete[] data;
+
1984 }
+
1985 } m_cache;
+
1986 fpos_t m_offset;
+
1987#if SET_FILE_OP_TIMES
+
1988 time_point
+
1989 m_atime,
+
1990 m_mtime;
+
1991#endif
+
1992 };
+
1993
+
1997 class basic_sys : virtual public basic, public sys_object
+
1998 {
+
1999 public:
+
2000 basic_sys(_In_opt_ sys_handle h = invalid_handle, _In_ state_t state = state_t::ok) :
+
2001 basic(state),
+
2002 sys_object(h)
+
2003 {}
+
2004
+
2005 virtual _Success_(return != 0 || length == 0) size_t read(
+
2006 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
2007 {
+
2008 assert(data || !length);
+
2009 // Windows Server 2003 and Windows XP: Pipe write operations across a network are limited in size per write.
+
2010 // The amount varies per platform. For x86 platforms it's 63.97 MB. For x64 platforms it's 31.97 MB. For Itanium
+
2011 // it's 63.95 MB. For more information regarding pipes, see the Remarks section.
+
2012 size_t
+
2013#if defined(_WIN64)
+
2014 block_size = 0x1F80000;
+
2015#elif defined(_WIN32)
+
2016 block_size = 0x3f00000;
+
2017#else
+
2018 block_size = SSIZE_MAX;
+
2019#endif
+
2020 for (size_t to_read = length;;) {
+
2021#ifdef _WIN32
+
2022 // ReadFile() might raise exception (e.g. STATUS_FILE_BAD_FORMAT/0xE0000002).
+
2023 BOOL succeeded;
+
2024 DWORD num_read;
+
2025 __try { succeeded = ReadFile(m_h, data, static_cast<DWORD>(std::min<size_t>(to_read, block_size)), &num_read, nullptr); }
+
2026 __except (EXCEPTION_EXECUTE_HANDLER) { succeeded = FALSE; SetLastError(ERROR_UNHANDLED_EXCEPTION); num_read = 0; }
+
2027 if (!succeeded && GetLastError() == ERROR_NO_SYSTEM_RESOURCES && block_size > default_block_size) _Unlikely_ {
+
2028 // Error "Insufficient system resources exist to complete the requested service." occurs
+
2029 // ocasionally, when attempting to read too much data at once (e.g. over \\TSClient).
+
2030 block_size = default_block_size;
+
2031 continue;
+
2032 }
+
2033 if (!succeeded) _Unlikely_
+
2034#else
+
2035 ssize_t num_read = static_cast<ssize_t>(std::min<size_t>(to_read, block_size));
+
2036 num_read = read(m_h, data, num_read);
+
2037 if (num_read < 0) _Unlikely_
+
2038#endif
+
2039 {
+
2040 m_state = to_read < length ? state_t::ok : state_t::fail;
+
2041 return length - to_read;
+
2042 }
+
2043 if (!num_read) _Unlikely_ {
+
2044 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
+
2045 return length - to_read;
+
2046 }
+
2047 to_read -= num_read;
+
2048 if (!to_read) {
+
2049 m_state = state_t::ok;
+
2050 return length;
+
2051 }
+
2052 reinterpret_cast<uint8_t*&>(data) += num_read;
+
2053 }
+
2054 }
+
2055
+
2056 virtual _Success_(return != 0) size_t write(
+
2057 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
2058 {
+
2059 // Windows Server 2003 and Windows XP: Pipe write operations across a network are limited in size per write.
+
2060 // The amount varies per platform. For x86 platforms it's 63.97 MB. For x64 platforms it's 31.97 MB. For Itanium
+
2061 // it's 63.95 MB. For more information regarding pipes, see the Remarks section.
+
2062 constexpr size_t
+
2063#if defined(_WIN64)
+
2064 block_size = 0x1F80000;
+
2065#elif defined(_WIN32)
+
2066 block_size = 0x3f00000;
+
2067#else
+
2068 block_size = SSIZE_MAX;
+
2069#endif
+
2070 for (size_t to_write = length;;) {
+
2071#ifdef _WIN32
+
2072 // ReadFile() might raise an exception. Be cautious with WriteFile() too.
+
2073 BOOL succeeded;
+
2074 DWORD num_written;
+
2075 __try { succeeded = WriteFile(m_h, data, static_cast<DWORD>(std::min<size_t>(to_write, block_size)), &num_written, nullptr); }
+
2076 __except (EXCEPTION_EXECUTE_HANDLER) { succeeded = FALSE; SetLastError(ERROR_UNHANDLED_EXCEPTION); num_written = 0; }
2077 to_write -= num_written;
2078 if (!to_write) {
2079 m_state = state_t::ok;
2080 return length;
2081 }
2082 reinterpret_cast<const uint8_t*&>(data) += num_written;
-
2083#endif
-
2084 }
-
2085 }
-
2086
-
2087 virtual void close()
-
2088 {
-
2089 try {
-
2090 sys_object::close();
-
2091 m_state = state_t::ok;
-
2092 }
-
2093 catch (std::exception) {
-
2094 m_state = state_t::fail;
-
2095 }
-
2096 }
-
2097
-
2098 virtual void flush()
-
2099 {
-
2100#ifdef _WIN32
-
2101 m_state = FlushFileBuffers(m_h) ? state_t::ok : state_t::fail;
-
2102#else
-
2103 m_state = fsync(m_h) >= 0 ? state_t::ok : state_t::fail;
-
2104#endif
-
2105 }
-
2106 };
-
2107
-
2111 class buffered_sys : public buffer
-
2112 {
-
2113 public:
-
2114 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) :
-
2115 buffer(read_buffer_size, write_buffer_size),
-
2116 m_source(h)
-
2117 {
-
2118 init(m_source);
-
2119 }
-
2120
-
2121 protected:
-
2122 basic_sys m_source;
-
2123 };
-
2124
-
2125#ifdef _WIN32
-
2129 class ISequentialStream : public basic
-
2130 {
-
2131 public:
-
2132 ISequentialStream(_In_::ISequentialStream* source) : m_source(source)
+
2083 if (!succeeded) _Unlikely_ {
+
2084 m_state = state_t::fail;
+
2085 return length - to_write;
+
2086 }
+
2087#else
+
2088 ssize_t num_written = write(m_h, data, static_cast<ssize_t>(std::min<size_t>(to_write, block_size)));
+
2089 if (num_written < 0) _Unlikely_ {
+
2090 m_state = state_t::fail;
+
2091 return length - to_write;
+
2092 }
+
2093 to_write -= num_written;
+
2094 if (!to_write) {
+
2095 m_state = state_t::ok;
+
2096 return length;
+
2097 }
+
2098 reinterpret_cast<const uint8_t*&>(data) += num_written;
+
2099#endif
+
2100 }
+
2101 }
+
2102
+
2103 virtual void close()
+
2104 {
+
2105 try {
+
2106 sys_object::close();
+
2107 m_state = state_t::ok;
+
2108 }
+
2109 catch (std::exception) {
+
2110 m_state = state_t::fail;
+
2111 }
+
2112 }
+
2113
+
2114 virtual void flush()
+
2115 {
+
2116#ifdef _WIN32
+
2117 m_state = FlushFileBuffers(m_h) ? state_t::ok : state_t::fail;
+
2118#else
+
2119 m_state = fsync(m_h) >= 0 ? state_t::ok : state_t::fail;
+
2120#endif
+
2121 }
+
2122 };
+
2123
+
2127 class buffered_sys : public buffer
+
2128 {
+
2129 public:
+
2130 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) :
+
2131 buffer(read_buffer_size, write_buffer_size),
+
2132 m_source(h)
2133 {
-
2134 m_source->AddRef();
+
2134 init(m_source);
2135 }
2136
-
2137 virtual ~ISequentialStream()
-
2138 {
-
2139 m_source->Release();
-
2140 }
-
2141
-
2142 virtual _Success_(return != 0 || length == 0) size_t read(
-
2143 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
2144 {
-
2145 assert(data || !length);
-
2146 for (size_t to_read = length;;) {
-
2147 HRESULT hr;
-
2148 ULONG num_read = 0;
-
2149 __try { hr = m_source->Read(data, (ULONG)std::min<size_t>(to_read, ULONG_MAX), &num_read); }
-
2150 __except (EXCEPTION_EXECUTE_HANDLER) { hr = E_FAIL; }
-
2151 if (FAILED(hr)) _Unlikely_ {
-
2152 m_state = to_read < length ? state_t::ok : state_t::fail;
-
2153 return length - to_read;
-
2154 }
-
2155 to_read -= num_read;
-
2156 if (hr == S_FALSE) _Unlikely_ {
-
2157 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
-
2158 return length - to_read;
-
2159 }
-
2160 if (!to_read) {
-
2161 m_state = state_t::ok;
-
2162 return length;
-
2163 }
-
2164 reinterpret_cast<uint8_t*&>(data) += num_read;
-
2165 }
-
2166 }
-
2167
-
2168 virtual _Success_(return != 0) size_t write(
-
2169 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
2170 {
-
2171 assert(data || !length);
-
2172 for (size_t to_write = length;;) {
-
2173 HRESULT hr;
-
2174 ULONG num_written = 0;
-
2175 __try { hr = m_source->Write(data, static_cast<ULONG>(std::min<size_t>(to_write, ULONG_MAX)), &num_written); }
-
2176 __except (EXCEPTION_EXECUTE_HANDLER) { hr = E_FAIL; }
-
2177 // In abscence of documentation whether num_written gets set when FAILED(hr) (i.e. partially succesful writes),
-
2178 // assume write failed completely.
-
2179 if (FAILED(hr)) _Unlikely_ {
-
2180 m_state = state_t::fail;
-
2181 return length - to_write;
-
2182 }
-
2183 to_write -= num_written;
-
2184 if (!to_write) {
-
2185 m_state = state_t::ok;
-
2186 return length;
-
2187 }
-
2188 reinterpret_cast<const uint8_t*&>(data) += num_written;
-
2189 }
-
2190 }
-
2191
-
2192 protected:
-
2193 ::ISequentialStream* m_source;
-
2194 };
-
2195
-
2196#ifndef WIN32_LEAN_AND_MEAN
-
2200 class asp : public basic
-
2201 {
-
2202 public:
-
2203 asp(_In_opt_ IRequest* request, _In_opt_ IResponse* response) :
-
2204 m_request(request),
-
2205 m_response(response)
-
2206 {
-
2207 if (m_request)
-
2208 m_request->AddRef();
-
2209 if (m_response)
-
2210 m_response->AddRef();
-
2211 }
-
2212
-
2213 virtual ~asp()
-
2214 {
-
2215 if (m_request)
-
2216 m_request->Release();
-
2217 if (m_response)
-
2218 m_response->Release();
-
2219 }
-
2220
-
2221 virtual _Success_(return != 0 || length == 0) size_t read(
-
2222 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
2223 {
-
2224 assert(data || !length);
-
2225 if (!m_request) _Unlikely_ {
-
2226 m_state = state_t::fail;
-
2227 return 0;
-
2228 }
-
2229 for (size_t to_read = length;;) {
-
2230 VARIANT var_amount, var_data;
-
2231 V_VT(&var_amount) = VT_I4;
-
2232 V_I4(&var_amount) = (LONG)std::min<size_t>(to_read, LONG_MAX);
-
2233 V_VT(&var_data) = VT_EMPTY;
-
2234 HRESULT hr = [&]() {
-
2235 __try { return m_request->BinaryRead(&var_amount, &var_data); }
-
2236 __except (EXCEPTION_EXECUTE_HANDLER) { return E_FAIL; }
-
2237 }();
-
2238 if (FAILED(hr)) _Unlikely_ {
-
2239 m_state = to_read < length ? state_t::ok : state_t::fail;
-
2240 return length - to_read;
-
2241 }
-
2242 assert(V_VT(&var_amount) == VT_I4);
-
2243 assert(V_VT(&var_data) == (VT_ARRAY | VT_UI1));
-
2244 std::unique_ptr<SAFEARRAY, SafeArrayDestroy_delete> sa(V_ARRAY(&var_data));
-
2245 if (!V_I4(&var_amount)) _Unlikely_ {
-
2246 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
-
2247 return length - to_read;
-
2248 }
-
2249 safearray_accessor<uint8_t> a(sa.get());
-
2250 memcpy(data, a.data(), V_I4(&var_amount));
-
2251 to_read -= V_I4(&var_amount);
-
2252 if (!to_read) {
-
2253 m_state = state_t::ok;
-
2254 return length;
-
2255 }
-
2256 reinterpret_cast<uint8_t*&>(data) += V_I4(&var_amount);
-
2257 }
-
2258 }
-
2259
-
2260 virtual _Success_(return != 0) size_t write(
-
2261 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
2262 {
-
2263 if (!m_response) {
-
2264 m_state = state_t::fail;
-
2265 return 0;
-
2266 }
-
2267 for (size_t to_write = length;;) {
-
2268 UINT num_written = static_cast<UINT>(std::min<size_t>(to_write, UINT_MAX));
-
2269 std::unique_ptr<OLECHAR, SysFreeString_delete> bstr_data(SysAllocStringByteLen(reinterpret_cast<LPCSTR>(data), num_written));
-
2270 VARIANT var_data;
-
2271 V_VT(&var_data) = VT_BSTR;
-
2272 V_BSTR(&var_data) = bstr_data.get();
-
2273 HRESULT hr = [&]() {
-
2274 __try { return m_response->BinaryWrite(var_data); }
-
2275 __except (EXCEPTION_EXECUTE_HANDLER) { return E_FAIL; }
-
2276 }();
-
2277 if (FAILED(hr)) _Unlikely_ {
-
2278 m_state = state_t::fail;
-
2279 return length - to_write;
-
2280 }
-
2281 to_write -= num_written;
-
2282 if (!to_write) {
-
2283 m_state = state_t::ok;
-
2284 return length;
-
2285 }
-
2286 reinterpret_cast<const uint8_t*&>(data) += num_written;
-
2287 }
-
2288 }
-
2289
-
2290 virtual void close()
-
2291 {
-
2292 if (m_response) {
-
2293 __try { m_response->End(); }
-
2294 __except (EXCEPTION_EXECUTE_HANDLER) {}
-
2295 }
-
2296 m_state = state_t::ok;
-
2297 }
-
2298
-
2299 virtual void flush()
-
2300 {
-
2301 if (m_response) {
-
2302 HRESULT hr;
-
2303 __try { hr = m_response->Flush(); }
-
2304 __except (EXCEPTION_EXECUTE_HANDLER) { hr = E_FAIL; }
-
2305 m_state = SUCCEEDED(hr) ? state_t::ok : state_t::fail;
-
2306 }
-
2307 }
-
2308
-
2309 protected:
-
2310 IRequest* m_request;
-
2311 IResponse* m_response;
-
2312 };
-
2313#endif
-
2314#endif
-
2315
-
2319 enum mode_t
-
2320 {
-
2321 mode_for_reading = 1 << 0,
-
2322 mode_for_writing = 1 << 1,
-
2323 mode_for_chmod = 1 << 2,
-
2324 mode_create = 1 << 3,
-
2325 mode_preserve_existing = mode_create | (1 << 4),
-
2326 mode_append = 1 << 5,
-
2327 mode_text = 0,
-
2328 mode_binary = 1 << 6,
-
2329
-
2330 share_none = 0,
-
2331 share_reading = 1 << 7,
-
2332 share_writing = 1 << 8,
-
2333 share_deleting = 1 << 9,
-
2334 share_all = share_reading | share_writing | share_deleting, // Allow others all operations on our file
-
2335
-
2336 inherit_handle = 1 << 10,
-
2337
-
2338 hint_write_thru = 1 << 11,
-
2339 hint_no_buffering = 1 << 12,
-
2340 hint_random_access = 1 << 13,
-
2341 hint_sequential_access = 1 << 14,
-
2342 };
-
2343
-
2344#pragma warning(push)
-
2345#pragma warning(disable: 4250)
-
2349 class file : virtual public basic_file, virtual public basic_sys
-
2350 {
-
2351 public:
-
2352 file(_In_opt_ sys_handle h = invalid_handle, _In_ state_t state = state_t::ok) : basic_sys(h, state) {}
+
2137 protected:
+
2138 basic_sys m_source;
+
2139 };
+
2140
+
2141#ifdef _WIN32
+
2145 class ISequentialStream : public basic
+
2146 {
+
2147 public:
+
2148 ISequentialStream(_In_::ISequentialStream* source) : m_source(source)
+
2149 {
+
2150 m_source->AddRef();
+
2151 }
+
2152
+
2153 virtual ~ISequentialStream()
+
2154 {
+
2155 m_source->Release();
+
2156 }
+
2157
+
2158 virtual _Success_(return != 0 || length == 0) size_t read(
+
2159 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
2160 {
+
2161 assert(data || !length);
+
2162 for (size_t to_read = length;;) {
+
2163 HRESULT hr;
+
2164 ULONG num_read = 0;
+
2165 __try { hr = m_source->Read(data, (ULONG)std::min<size_t>(to_read, ULONG_MAX), &num_read); }
+
2166 __except (EXCEPTION_EXECUTE_HANDLER) { hr = E_FAIL; }
+
2167 if (FAILED(hr)) _Unlikely_ {
+
2168 m_state = to_read < length ? state_t::ok : state_t::fail;
+
2169 return length - to_read;
+
2170 }
+
2171 to_read -= num_read;
+
2172 if (hr == S_FALSE) _Unlikely_ {
+
2173 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
+
2174 return length - to_read;
+
2175 }
+
2176 if (!to_read) {
+
2177 m_state = state_t::ok;
+
2178 return length;
+
2179 }
+
2180 reinterpret_cast<uint8_t*&>(data) += num_read;
+
2181 }
+
2182 }
+
2183
+
2184 virtual _Success_(return != 0) size_t write(
+
2185 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
2186 {
+
2187 assert(data || !length);
+
2188 for (size_t to_write = length;;) {
+
2189 HRESULT hr;
+
2190 ULONG num_written = 0;
+
2191 __try { hr = m_source->Write(data, static_cast<ULONG>(std::min<size_t>(to_write, ULONG_MAX)), &num_written); }
+
2192 __except (EXCEPTION_EXECUTE_HANDLER) { hr = E_FAIL; }
+
2193 // In abscence of documentation whether num_written gets set when FAILED(hr) (i.e. partially succesful writes),
+
2194 // assume write failed completely.
+
2195 if (FAILED(hr)) _Unlikely_ {
+
2196 m_state = state_t::fail;
+
2197 return length - to_write;
+
2198 }
+
2199 to_write -= num_written;
+
2200 if (!to_write) {
+
2201 m_state = state_t::ok;
+
2202 return length;
+
2203 }
+
2204 reinterpret_cast<const uint8_t*&>(data) += num_written;
+
2205 }
+
2206 }
+
2207
+
2208 protected:
+
2209 ::ISequentialStream* m_source;
+
2210 };
+
2211
+
2212#ifndef WIN32_LEAN_AND_MEAN
+
2216 class asp : public basic
+
2217 {
+
2218 public:
+
2219 asp(_In_opt_ IRequest* request, _In_opt_ IResponse* response) :
+
2220 m_request(request),
+
2221 m_response(response)
+
2222 {
+
2223 if (m_request)
+
2224 m_request->AddRef();
+
2225 if (m_response)
+
2226 m_response->AddRef();
+
2227 }
+
2228
+
2229 virtual ~asp()
+
2230 {
+
2231 if (m_request)
+
2232 m_request->Release();
+
2233 if (m_response)
+
2234 m_response->Release();
+
2235 }
+
2236
+
2237 virtual _Success_(return != 0 || length == 0) size_t read(
+
2238 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
2239 {
+
2240 assert(data || !length);
+
2241 if (!m_request) _Unlikely_ {
+
2242 m_state = state_t::fail;
+
2243 return 0;
+
2244 }
+
2245 for (size_t to_read = length;;) {
+
2246 VARIANT var_amount, var_data;
+
2247 V_VT(&var_amount) = VT_I4;
+
2248 V_I4(&var_amount) = (LONG)std::min<size_t>(to_read, LONG_MAX);
+
2249 V_VT(&var_data) = VT_EMPTY;
+
2250 HRESULT hr = [&]() {
+
2251 __try { return m_request->BinaryRead(&var_amount, &var_data); }
+
2252 __except (EXCEPTION_EXECUTE_HANDLER) { return E_FAIL; }
+
2253 }();
+
2254 if (FAILED(hr)) _Unlikely_ {
+
2255 m_state = to_read < length ? state_t::ok : state_t::fail;
+
2256 return length - to_read;
+
2257 }
+
2258 assert(V_VT(&var_amount) == VT_I4);
+
2259 assert(V_VT(&var_data) == (VT_ARRAY | VT_UI1));
+
2260 std::unique_ptr<SAFEARRAY, SafeArrayDestroy_delete> sa(V_ARRAY(&var_data));
+
2261 if (!V_I4(&var_amount)) _Unlikely_ {
+
2262 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
+
2263 return length - to_read;
+
2264 }
+
2265 safearray_accessor<uint8_t> a(sa.get());
+
2266 memcpy(data, a.data(), V_I4(&var_amount));
+
2267 to_read -= V_I4(&var_amount);
+
2268 if (!to_read) {
+
2269 m_state = state_t::ok;
+
2270 return length;
+
2271 }
+
2272 reinterpret_cast<uint8_t*&>(data) += V_I4(&var_amount);
+
2273 }
+
2274 }
+
2275
+
2276 virtual _Success_(return != 0) size_t write(
+
2277 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
2278 {
+
2279 if (!m_response) {
+
2280 m_state = state_t::fail;
+
2281 return 0;
+
2282 }
+
2283 for (size_t to_write = length;;) {
+
2284 UINT num_written = static_cast<UINT>(std::min<size_t>(to_write, UINT_MAX));
+
2285 std::unique_ptr<OLECHAR, SysFreeString_delete> bstr_data(SysAllocStringByteLen(reinterpret_cast<LPCSTR>(data), num_written));
+
2286 VARIANT var_data;
+
2287 V_VT(&var_data) = VT_BSTR;
+
2288 V_BSTR(&var_data) = bstr_data.get();
+
2289 HRESULT hr = [&]() {
+
2290 __try { return m_response->BinaryWrite(var_data); }
+
2291 __except (EXCEPTION_EXECUTE_HANDLER) { return E_FAIL; }
+
2292 }();
+
2293 if (FAILED(hr)) _Unlikely_ {
+
2294 m_state = state_t::fail;
+
2295 return length - to_write;
+
2296 }
+
2297 to_write -= num_written;
+
2298 if (!to_write) {
+
2299 m_state = state_t::ok;
+
2300 return length;
+
2301 }
+
2302 reinterpret_cast<const uint8_t*&>(data) += num_written;
+
2303 }
+
2304 }
+
2305
+
2306 virtual void close()
+
2307 {
+
2308 if (m_response) {
+
2309 __try { m_response->End(); }
+
2310 __except (EXCEPTION_EXECUTE_HANDLER) {}
+
2311 }
+
2312 m_state = state_t::ok;
+
2313 }
+
2314
+
2315 virtual void flush()
+
2316 {
+
2317 if (m_response) {
+
2318 HRESULT hr;
+
2319 __try { hr = m_response->Flush(); }
+
2320 __except (EXCEPTION_EXECUTE_HANDLER) { hr = E_FAIL; }
+
2321 m_state = SUCCEEDED(hr) ? state_t::ok : state_t::fail;
+
2322 }
+
2323 }
+
2324
+
2325 protected:
+
2326 IRequest* m_request;
+
2327 IResponse* m_response;
+
2328 };
+
2329#endif
+
2330#endif
+
2331
+
2335 enum mode_t
+
2336 {
+
2337 mode_for_reading = 1 << 0,
+
2338 mode_for_writing = 1 << 1,
+
2339 mode_for_chmod = 1 << 2,
+
2340 mode_create = 1 << 3,
+
2341 mode_preserve_existing = mode_create | (1 << 4),
+
2342 mode_append = 1 << 5,
+
2343 mode_text = 0,
+
2344 mode_binary = 1 << 6,
+
2345
+
2346 share_none = 0,
+
2347 share_reading = 1 << 7,
+
2348 share_writing = 1 << 8,
+
2349 share_deleting = 1 << 9,
+
2350 share_all = share_reading | share_writing | share_deleting, // Allow others all operations on our file
+
2351
+
2352 inherit_handle = 1 << 10,
2353
-
2360 file(_In_z_ const sys_char* filename, _In_ int mode)
-
2361 {
-
2362 open(filename, mode);
-
2363 }
-
2364
-
2371 void open(_In_z_ const sys_char* filename, _In_ int mode)
-
2372 {
-
2373 if (m_h != invalid_handle)
-
2374 close();
-
2375
-
2376#ifdef _WIN32
-
2377 DWORD dwDesiredAccess = 0;
-
2378 if (mode & mode_for_reading) dwDesiredAccess |= GENERIC_READ;
-
2379 if (mode & mode_for_writing) dwDesiredAccess |= GENERIC_WRITE;
-
2380 if (mode & mode_for_chmod) dwDesiredAccess |= FILE_WRITE_ATTRIBUTES;
-
2381
-
2382 DWORD dwShareMode = 0;
-
2383 if (mode & share_reading) dwShareMode |= FILE_SHARE_READ;
-
2384 if (mode & share_writing) dwShareMode |= FILE_SHARE_WRITE;
-
2385 if (mode & share_deleting) dwShareMode |= FILE_SHARE_DELETE;
-
2386
-
2387 SECURITY_ATTRIBUTES sa = { sizeof(SECURITY_ATTRIBUTES) };
-
2388 sa.bInheritHandle = mode & inherit_handle ? true : false;
-
2389
-
2390 DWORD dwCreationDisposition;
-
2391 switch (mode & mode_preserve_existing) {
-
2392 case mode_create: dwCreationDisposition = CREATE_ALWAYS; break;
-
2393 case mode_preserve_existing: dwCreationDisposition = OPEN_ALWAYS; break;
-
2394 case 0: dwCreationDisposition = OPEN_EXISTING; break;
-
2395 default: throw std::invalid_argument("invalid mode");
-
2396 }
+
2354 hint_write_thru = 1 << 11,
+
2355 hint_no_buffering = 1 << 12,
+
2356 hint_random_access = 1 << 13,
+
2357 hint_sequential_access = 1 << 14,
+
2358 };
+
2359
+
2360#pragma warning(push)
+
2361#pragma warning(disable: 4250)
+
2365 class file : virtual public basic_file, virtual public basic_sys
+
2366 {
+
2367 public:
+
2368 file(_In_opt_ sys_handle h = invalid_handle, _In_ state_t state = state_t::ok) : basic_sys(h, state) {}
+
2369
+
2376 file(_In_z_ const sys_char* filename, _In_ int mode)
+
2377 {
+
2378 open(filename, mode);
+
2379 }
+
2380
+
2387 void open(_In_z_ const sys_char* filename, _In_ int mode)
+
2388 {
+
2389 if (m_h != invalid_handle)
+
2390 close();
+
2391
+
2392#ifdef _WIN32
+
2393 DWORD dwDesiredAccess = 0;
+
2394 if (mode & mode_for_reading) dwDesiredAccess |= GENERIC_READ;
+
2395 if (mode & mode_for_writing) dwDesiredAccess |= GENERIC_WRITE;
+
2396 if (mode & mode_for_chmod) dwDesiredAccess |= FILE_WRITE_ATTRIBUTES;
2397
-
2398 DWORD dwFlagsAndAttributes = FILE_ATTRIBUTE_NORMAL;
-
2399 if (mode & hint_write_thru) dwFlagsAndAttributes |= FILE_FLAG_WRITE_THROUGH;
-
2400 if (mode & hint_no_buffering) dwFlagsAndAttributes |= FILE_FLAG_NO_BUFFERING;
-
2401 if (mode & hint_random_access) dwFlagsAndAttributes |= FILE_FLAG_RANDOM_ACCESS;
-
2402 if (mode & hint_sequential_access) dwFlagsAndAttributes |= FILE_FLAG_SEQUENTIAL_SCAN;
-
2403
-
2404 m_h = CreateFile(filename, dwDesiredAccess, dwShareMode, &sa, dwCreationDisposition, dwFlagsAndAttributes, nullptr);
-
2405#else
-
2406 int flags = 0;
-
2407 if (mode & mode_for_reading) flags |= O_RDONLY;
-
2408 if (mode & mode_for_writing) flags |= O_WRONLY;
-
2409 if (mode & mode_create) flags |= mode & mode_preserve_existing ? O_CREAT : (O_CREAT | O_EXCL);
-
2410 if (mode & hint_write_thru) flags |= O_DSYNC;
-
2411 if (mode & hint_no_buffering) flags |= O_RSYNC;
-
2412
-
2413 m_h = open(filename, flags, DEFFILEMODE);
-
2414#endif
-
2415 if (m_h != invalid_handle) {
-
2416 m_state = state_t::ok;
-
2417 if (mode & mode_append)
-
2418 seek(0, seek_t::end);
-
2419 }
-
2420 else
-
2421 m_state = state_t::fail;
-
2422 }
-
2423
-
2424 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
-
2425 {
-
2426#ifdef _WIN32
-
2427 LARGE_INTEGER li;
-
2428 li.QuadPart = offset;
-
2429 li.LowPart = SetFilePointer(m_h, li.LowPart, &li.HighPart, static_cast<DWORD>(how));
-
2430 if (li.LowPart != 0xFFFFFFFF || GetLastError() == NO_ERROR) {
-
2431 m_state = state_t::ok;
-
2432 return li.QuadPart;
-
2433 }
-
2434#else
-
2435 off64_t result = lseek64(m_h, offset, how);
-
2436 if (result >= 0) {
-
2437 m_state = state_t::ok;
-
2438 return result;
-
2439 }
-
2440#endif
-
2441 m_state = state_t::fail;
-
2442 return fpos_max;
-
2443 }
-
2444
-
2445 virtual fpos_t tell() const
-
2446 {
-
2447 if (m_h != invalid_handle) {
-
2448#ifdef _WIN32
-
2449 LARGE_INTEGER li;
-
2450 li.QuadPart = 0;
-
2451 li.LowPart = SetFilePointer(m_h, 0, &li.HighPart, FILE_CURRENT);
-
2452 if (li.LowPart != 0xFFFFFFFF || GetLastError() == NO_ERROR)
-
2453 return li.QuadPart;
-
2454#else
-
2455 off64_t result = lseek64(m_h, 0, SEEK_CUR);
-
2456 if (result >= 0)
-
2457 return result;
-
2458#endif
-
2459 }
-
2460 return fpos_max;
-
2461 }
-
2462
-
2463 virtual void lock(_In_ fpos_t offset, _In_ fsize_t length)
-
2464 {
-
2465#ifdef _WIN32
-
2466 LARGE_INTEGER liOffset;
-
2467 LARGE_INTEGER liSize;
-
2468 liOffset.QuadPart = offset;
-
2469 liSize.QuadPart = length;
-
2470 if (LockFile(m_h, liOffset.LowPart, liOffset.HighPart, liSize.LowPart, liSize.HighPart)) {
-
2471 m_state = state_t::ok;
-
2472 return;
-
2473 }
-
2474#else
-
2475 off64_t orig = lseek64(m_h, 0, SEEK_CUR);
-
2476 if (orig >= 0) {
-
2477 m_state = lseek64(m_h, offset, SEEK_SET) >= 0 && lockf64(m_h, F_LOCK, length) >= 0 ? state_t::ok : state_t::fail;
-
2478 lseek64(m_h, orig, SEEK_SET);
-
2479 m_state = state_t::ok;
-
2480 return;
-
2481 }
-
2482#endif
-
2483 m_state = state_t::fail;
-
2484 }
-
2485
-
2486 virtual void unlock(_In_ fpos_t offset, _In_ fsize_t length)
-
2487 {
-
2488#ifdef _WIN32
-
2489 LARGE_INTEGER liOffset;
-
2490 LARGE_INTEGER liSize;
-
2491 liOffset.QuadPart = offset;
-
2492 liSize.QuadPart = length;
-
2493 if (UnlockFile(m_h, liOffset.LowPart, liOffset.HighPart, liSize.LowPart, liSize.HighPart)) {
-
2494 m_state = state_t::ok;
-
2495 return;
-
2496 }
-
2497#else
-
2498 off64_t orig = lseek64(m_h, 0, SEEK_CUR);
-
2499 if (orig >= 0) {
-
2500 if (lseek64(m_h, offset, SEEK_SET) >= 0 && lockf64(m_h, F_ULOCK, length) >= 0) {
-
2501 lseek64(m_h, orig, SEEK_SET);
-
2502 m_state = state_t::ok;
-
2503 return;
-
2504 }
-
2505 lseek64(m_h, orig, SEEK_SET);
-
2506 }
-
2507#endif
-
2508 m_state = state_t::fail;
-
2509 }
-
2510
-
2511 virtual fsize_t size()
-
2512 {
-
2513#ifdef _WIN32
-
2514 LARGE_INTEGER li;
-
2515 li.LowPart = GetFileSize(m_h, (LPDWORD)&li.HighPart);
-
2516 if (li.LowPart == 0xFFFFFFFF && GetLastError() != NO_ERROR)
-
2517 li.QuadPart = -1;
-
2518 return li.QuadPart;
-
2519#else
-
2520 off64_t length = -1, orig = lseek64(m_h, 0, SEEK_CUR);
-
2521 if (orig >= 0) {
-
2522 length = lseek64(m_h, 0, SEEK_END);
-
2523 lseek64(m_h, orig, SEEK_SET);
-
2524 }
-
2525 return length;
-
2526#endif
-
2527 }
-
2528
-
2529 virtual void truncate()
-
2530 {
-
2531#ifdef _WIN32
-
2532 if (SetEndOfFile(m_h)) {
-
2533 m_state = state_t::ok;
-
2534 return;
-
2535 }
-
2536#else
-
2537 off64_t length = lseek64(m_h, 0, SEEK_CUR);
-
2538 if (length >= 0 && ftruncate64(m_h, length) >= 0) {
-
2539 m_state = state_t::ok;
-
2540 return;
-
2541 }
+
2398 DWORD dwShareMode = 0;
+
2399 if (mode & share_reading) dwShareMode |= FILE_SHARE_READ;
+
2400 if (mode & share_writing) dwShareMode |= FILE_SHARE_WRITE;
+
2401 if (mode & share_deleting) dwShareMode |= FILE_SHARE_DELETE;
+
2402
+
2403 SECURITY_ATTRIBUTES sa = { sizeof(SECURITY_ATTRIBUTES) };
+
2404 sa.bInheritHandle = mode & inherit_handle ? true : false;
+
2405
+
2406 DWORD dwCreationDisposition;
+
2407 switch (mode & mode_preserve_existing) {
+
2408 case mode_create: dwCreationDisposition = CREATE_ALWAYS; break;
+
2409 case mode_preserve_existing: dwCreationDisposition = OPEN_ALWAYS; break;
+
2410 case 0: dwCreationDisposition = OPEN_EXISTING; break;
+
2411 default: throw std::invalid_argument("invalid mode");
+
2412 }
+
2413
+
2414 DWORD dwFlagsAndAttributes = FILE_ATTRIBUTE_NORMAL;
+
2415 if (mode & hint_write_thru) dwFlagsAndAttributes |= FILE_FLAG_WRITE_THROUGH;
+
2416 if (mode & hint_no_buffering) dwFlagsAndAttributes |= FILE_FLAG_NO_BUFFERING;
+
2417 if (mode & hint_random_access) dwFlagsAndAttributes |= FILE_FLAG_RANDOM_ACCESS;
+
2418 if (mode & hint_sequential_access) dwFlagsAndAttributes |= FILE_FLAG_SEQUENTIAL_SCAN;
+
2419
+
2420 m_h = CreateFile(filename, dwDesiredAccess, dwShareMode, &sa, dwCreationDisposition, dwFlagsAndAttributes, nullptr);
+
2421#else
+
2422 int flags = 0;
+
2423 if (mode & mode_for_reading) flags |= O_RDONLY;
+
2424 if (mode & mode_for_writing) flags |= O_WRONLY;
+
2425 if (mode & mode_create) flags |= mode & mode_preserve_existing ? O_CREAT : (O_CREAT | O_EXCL);
+
2426 if (mode & hint_write_thru) flags |= O_DSYNC;
+
2427 if (mode & hint_no_buffering) flags |= O_RSYNC;
+
2428
+
2429 m_h = open(filename, flags, DEFFILEMODE);
+
2430#endif
+
2431 if (m_h != invalid_handle) {
+
2432 m_state = state_t::ok;
+
2433 if (mode & mode_append)
+
2434 seek(0, seek_t::end);
+
2435 }
+
2436 else
+
2437 m_state = state_t::fail;
+
2438 }
+
2439
+
2440 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
+
2441 {
+
2442#ifdef _WIN32
+
2443 LARGE_INTEGER li;
+
2444 li.QuadPart = offset;
+
2445 li.LowPart = SetFilePointer(m_h, li.LowPart, &li.HighPart, static_cast<DWORD>(how));
+
2446 if (li.LowPart != 0xFFFFFFFF || GetLastError() == NO_ERROR) {
+
2447 m_state = state_t::ok;
+
2448 return li.QuadPart;
+
2449 }
+
2450#else
+
2451 off64_t result = lseek64(m_h, offset, how);
+
2452 if (result >= 0) {
+
2453 m_state = state_t::ok;
+
2454 return result;
+
2455 }
+
2456#endif
+
2457 m_state = state_t::fail;
+
2458 return fpos_max;
+
2459 }
+
2460
+
2461 virtual fpos_t tell() const
+
2462 {
+
2463 if (m_h != invalid_handle) {
+
2464#ifdef _WIN32
+
2465 LARGE_INTEGER li;
+
2466 li.QuadPart = 0;
+
2467 li.LowPart = SetFilePointer(m_h, 0, &li.HighPart, FILE_CURRENT);
+
2468 if (li.LowPart != 0xFFFFFFFF || GetLastError() == NO_ERROR)
+
2469 return li.QuadPart;
+
2470#else
+
2471 off64_t result = lseek64(m_h, 0, SEEK_CUR);
+
2472 if (result >= 0)
+
2473 return result;
+
2474#endif
+
2475 }
+
2476 return fpos_max;
+
2477 }
+
2478
+
2479 virtual void lock(_In_ fpos_t offset, _In_ fsize_t length)
+
2480 {
+
2481#ifdef _WIN32
+
2482 LARGE_INTEGER liOffset;
+
2483 LARGE_INTEGER liSize;
+
2484 liOffset.QuadPart = offset;
+
2485 liSize.QuadPart = length;
+
2486 if (LockFile(m_h, liOffset.LowPart, liOffset.HighPart, liSize.LowPart, liSize.HighPart)) {
+
2487 m_state = state_t::ok;
+
2488 return;
+
2489 }
+
2490#else
+
2491 off64_t orig = lseek64(m_h, 0, SEEK_CUR);
+
2492 if (orig >= 0) {
+
2493 m_state = lseek64(m_h, offset, SEEK_SET) >= 0 && lockf64(m_h, F_LOCK, length) >= 0 ? state_t::ok : state_t::fail;
+
2494 lseek64(m_h, orig, SEEK_SET);
+
2495 m_state = state_t::ok;
+
2496 return;
+
2497 }
+
2498#endif
+
2499 m_state = state_t::fail;
+
2500 }
+
2501
+
2502 virtual void unlock(_In_ fpos_t offset, _In_ fsize_t length)
+
2503 {
+
2504#ifdef _WIN32
+
2505 LARGE_INTEGER liOffset;
+
2506 LARGE_INTEGER liSize;
+
2507 liOffset.QuadPart = offset;
+
2508 liSize.QuadPart = length;
+
2509 if (UnlockFile(m_h, liOffset.LowPart, liOffset.HighPart, liSize.LowPart, liSize.HighPart)) {
+
2510 m_state = state_t::ok;
+
2511 return;
+
2512 }
+
2513#else
+
2514 off64_t orig = lseek64(m_h, 0, SEEK_CUR);
+
2515 if (orig >= 0) {
+
2516 if (lseek64(m_h, offset, SEEK_SET) >= 0 && lockf64(m_h, F_ULOCK, length) >= 0) {
+
2517 lseek64(m_h, orig, SEEK_SET);
+
2518 m_state = state_t::ok;
+
2519 return;
+
2520 }
+
2521 lseek64(m_h, orig, SEEK_SET);
+
2522 }
+
2523#endif
+
2524 m_state = state_t::fail;
+
2525 }
+
2526
+
2527 virtual fsize_t size()
+
2528 {
+
2529#ifdef _WIN32
+
2530 LARGE_INTEGER li;
+
2531 li.LowPart = GetFileSize(m_h, (LPDWORD)&li.HighPart);
+
2532 if (li.LowPart == 0xFFFFFFFF && GetLastError() != NO_ERROR)
+
2533 li.QuadPart = -1;
+
2534 return li.QuadPart;
+
2535#else
+
2536 off64_t length = -1, orig = lseek64(m_h, 0, SEEK_CUR);
+
2537 if (orig >= 0) {
+
2538 length = lseek64(m_h, 0, SEEK_END);
+
2539 lseek64(m_h, orig, SEEK_SET);
+
2540 }
+
2541 return length;
2542#endif
-
2543 m_state = state_t::fail;
-
2544 }
-
2545
-
2546#ifdef _WIN32
-
2547 static inline time_point ft2tp(_In_ const FILETIME& ft)
-
2548 {
-
2549#if _HAS_CXX20
-
2550 uint64_t t = (static_cast<int64_t>(ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
-
2551#else
-
2552 uint64_t t = ((static_cast<int64_t>(ft.dwHighDateTime) << 32) | ft.dwLowDateTime) - 116444736000000000ll;
-
2553#endif
-
2554 return time_point(time_point::duration(t));
-
2555 }
-
2556
-
2557 static inline void tp2ft(_In_ time_point tp, _Out_ FILETIME& ft)
-
2558 {
-
2559#if _HAS_CXX20
-
2560 uint64_t t = tp.time_since_epoch().count();
-
2561#else
-
2562 uint64_t t = tp.time_since_epoch().count() + 116444736000000000ll;
-
2563#endif
-
2564 ft.dwHighDateTime = static_cast<DWORD>((t >> 32) & 0xffffffff);
-
2565 ft.dwLowDateTime = static_cast<DWORD>(t & 0xffffffff);
-
2566 }
-
2567#endif
-
2568
-
2569 virtual time_point ctime() const
-
2570 {
-
2571#ifdef _WIN32
-
2572 FILETIME ft;
-
2573 if (GetFileTime(m_h, &ft, nullptr, nullptr))
-
2574 return ft2tp(ft);
-
2575#endif
-
2576 return time_point::min();
-
2577 }
-
2578
-
2579 virtual time_point atime() const
-
2580 {
-
2581#ifdef _WIN32
-
2582 FILETIME ft;
-
2583 if (GetFileTime(m_h, nullptr, &ft, nullptr))
-
2584 return ft2tp(ft);
-
2585#else
-
2586 struct stat buf;
-
2587 if (fstat(m_h, &buf) >= 0);
-
2588 return time_point::from_time_t(buf.st_atim);
-
2589#endif
-
2590 return time_point::min();
-
2591 }
-
2592
-
2593 virtual time_point mtime() const
-
2594 {
-
2595#ifdef _WIN32
-
2596 FILETIME ft;
-
2597 if (GetFileTime(m_h, nullptr, nullptr, &ft))
-
2598 return ft2tp(ft);
-
2599#else
-
2600 struct stat buf;
-
2601 if (fstat(m_h, &buf) >= 0)
-
2602 return time_point::from_time_t(buf.st_mtim);
-
2603#endif
-
2604 return time_point::min();
-
2605 }
-
2606
-
2607 virtual void set_ctime(time_point date)
-
2608 {
-
2609 assert(m_h != invalid_handle);
-
2610#ifdef _WIN32
-
2611 FILETIME ft;
-
2612 tp2ft(date, ft);
-
2613 if (SetFileTime(m_h, &ft, nullptr, nullptr))
-
2614 return;
-
2615#endif
-
2616 throw std::runtime_error("failed to set file ctime");
-
2617 }
-
2618
-
2619 virtual void set_atime(time_point date)
-
2620 {
-
2621 assert(m_h != invalid_handle);
-
2622#ifdef _WIN32
-
2623 FILETIME ft;
-
2624 tp2ft(date, ft);
-
2625 if (SetFileTime(m_h, nullptr, &ft, nullptr))
-
2626 return;
-
2627#else
-
2628 struct timespec ts[2];
-
2629 ts[0].tv_sec = date;
-
2630 ts[1].tv_nsec = UTIME_OMIT;
-
2631 if (futimens(m_h, ts) >= 0)
-
2632 return;
-
2633#endif
-
2634 throw std::runtime_error("failed to set file atime");
-
2635 }
-
2636
-
2637 virtual void set_mtime(time_point date)
-
2638 {
-
2639#ifdef _WIN32
-
2640 FILETIME ft;
-
2641 tp2ft(date, ft);
-
2642 if (SetFileTime(m_h, nullptr, nullptr, &ft))
-
2643 return;
-
2644#else
-
2645 struct timespec ts[2];
-
2646 ts[0].tv_nsec = UTIME_OMIT;
-
2647 ts[1].tv_sec = date;
-
2648 if (futimens(m_h, ts) >= 0)
-
2649 return;
-
2650#endif
-
2651 throw std::runtime_error("failed to set file mtime");
-
2652 }
-
2653 };
-
2654#pragma warning(pop)
-
2655
-
2659 class cached_file : public cache
-
2660 {
-
2661 public:
-
2662 cached_file(_In_opt_ sys_handle h = invalid_handle, _In_ state_t state = state_t::ok, _In_ size_t cache_size = default_cache_size) :
-
2663 cache(cache_size),
-
2664 m_source(h, state)
-
2665 {
-
2666 init(m_source);
-
2667 }
-
2668
-
2676 cached_file(_In_z_ const sys_char* filename, _In_ int mode, _In_ size_t cache_size = default_cache_size) :
-
2677 cache(cache_size),
-
2678 m_source(filename, mode& mode_for_writing ? mode | mode_for_reading : mode)
-
2679 {
-
2680 init(m_source);
-
2681 }
-
2682
-
2690 void open(_In_z_ const sys_char* filename, _In_ int mode)
-
2691 {
-
2692 if (mode & mode_for_writing) mode |= mode_for_reading;
-
2693 m_source.open(filename, mode);
-
2694 if (m_source.ok()) {
-
2695#if SET_FILE_OP_TIMES
-
2696 m_atime = m_mtime = time_point::min();
-
2697#endif
-
2698 m_offset = m_source.tell();
-
2699 m_state = state_t::ok;
-
2700 return;
-
2701 }
-
2702 m_state = state_t::fail;
-
2703 }
-
2704
-
2705 protected:
-
2706 file m_source;
-
2707 };
-
2708
-
2712 class memory_file : public basic_file
-
2713 {
-
2714 public:
-
2715 memory_file(_In_ state_t state = state_t::ok) :
-
2716 basic(state),
-
2717 m_data(nullptr),
-
2718 m_offset(0),
-
2719 m_size(0),
-
2720 m_reserved(0),
-
2721 m_manage(true)
-
2722 {
-
2723#if SET_FILE_OP_TIMES
-
2724 m_ctime = m_atime = m_mtime = time_point::now();
-
2725#endif
-
2726 }
-
2727
-
2734 memory_file(_In_ size_t size, _In_ state_t state = state_t::ok) :
-
2735 basic(state),
-
2736 m_data(reinterpret_cast<uint8_t*>(malloc(size))),
-
2737 m_offset(0),
-
2738 m_size(0),
-
2739 m_reserved(size),
-
2740 m_manage(true)
-
2741 {
-
2742 if (!m_data)
-
2743 throw std::bad_alloc();
+
2543 }
+
2544
+
2545 virtual void truncate()
+
2546 {
+
2547#ifdef _WIN32
+
2548 if (SetEndOfFile(m_h)) {
+
2549 m_state = state_t::ok;
+
2550 return;
+
2551 }
+
2552#else
+
2553 off64_t length = lseek64(m_h, 0, SEEK_CUR);
+
2554 if (length >= 0 && ftruncate64(m_h, length) >= 0) {
+
2555 m_state = state_t::ok;
+
2556 return;
+
2557 }
+
2558#endif
+
2559 m_state = state_t::fail;
+
2560 }
+
2561
+
2562#ifdef _WIN32
+
2563 static inline time_point ft2tp(_In_ const FILETIME& ft)
+
2564 {
+
2565#if _HAS_CXX20
+
2566 uint64_t t = (static_cast<int64_t>(ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
+
2567#else
+
2568 uint64_t t = ((static_cast<int64_t>(ft.dwHighDateTime) << 32) | ft.dwLowDateTime) - 116444736000000000ll;
+
2569#endif
+
2570 return time_point(time_point::duration(t));
+
2571 }
+
2572
+
2573 static inline void tp2ft(_In_ time_point tp, _Out_ FILETIME& ft)
+
2574 {
+
2575#if _HAS_CXX20
+
2576 uint64_t t = tp.time_since_epoch().count();
+
2577#else
+
2578 uint64_t t = tp.time_since_epoch().count() + 116444736000000000ll;
+
2579#endif
+
2580 ft.dwHighDateTime = static_cast<DWORD>((t >> 32) & 0xffffffff);
+
2581 ft.dwLowDateTime = static_cast<DWORD>(t & 0xffffffff);
+
2582 }
+
2583#endif
+
2584
+
2585 virtual time_point ctime() const
+
2586 {
+
2587#ifdef _WIN32
+
2588 FILETIME ft;
+
2589 if (GetFileTime(m_h, &ft, nullptr, nullptr))
+
2590 return ft2tp(ft);
+
2591#endif
+
2592 return time_point::min();
+
2593 }
+
2594
+
2595 virtual time_point atime() const
+
2596 {
+
2597#ifdef _WIN32
+
2598 FILETIME ft;
+
2599 if (GetFileTime(m_h, nullptr, &ft, nullptr))
+
2600 return ft2tp(ft);
+
2601#else
+
2602 struct stat buf;
+
2603 if (fstat(m_h, &buf) >= 0);
+
2604 return time_point::from_time_t(buf.st_atim);
+
2605#endif
+
2606 return time_point::min();
+
2607 }
+
2608
+
2609 virtual time_point mtime() const
+
2610 {
+
2611#ifdef _WIN32
+
2612 FILETIME ft;
+
2613 if (GetFileTime(m_h, nullptr, nullptr, &ft))
+
2614 return ft2tp(ft);
+
2615#else
+
2616 struct stat buf;
+
2617 if (fstat(m_h, &buf) >= 0)
+
2618 return time_point::from_time_t(buf.st_mtim);
+
2619#endif
+
2620 return time_point::min();
+
2621 }
+
2622
+
2623 virtual void set_ctime(time_point date)
+
2624 {
+
2625 assert(m_h != invalid_handle);
+
2626#ifdef _WIN32
+
2627 FILETIME ft;
+
2628 tp2ft(date, ft);
+
2629 if (SetFileTime(m_h, &ft, nullptr, nullptr))
+
2630 return;
+
2631#endif
+
2632 throw std::runtime_error("failed to set file ctime");
+
2633 }
+
2634
+
2635 virtual void set_atime(time_point date)
+
2636 {
+
2637 assert(m_h != invalid_handle);
+
2638#ifdef _WIN32
+
2639 FILETIME ft;
+
2640 tp2ft(date, ft);
+
2641 if (SetFileTime(m_h, nullptr, &ft, nullptr))
+
2642 return;
+
2643#else
+
2644 struct timespec ts[2];
+
2645 ts[0].tv_sec = date;
+
2646 ts[1].tv_nsec = UTIME_OMIT;
+
2647 if (futimens(m_h, ts) >= 0)
+
2648 return;
+
2649#endif
+
2650 throw std::runtime_error("failed to set file atime");
+
2651 }
+
2652
+
2653 virtual void set_mtime(time_point date)
+
2654 {
+
2655#ifdef _WIN32
+
2656 FILETIME ft;
+
2657 tp2ft(date, ft);
+
2658 if (SetFileTime(m_h, nullptr, nullptr, &ft))
+
2659 return;
+
2660#else
+
2661 struct timespec ts[2];
+
2662 ts[0].tv_nsec = UTIME_OMIT;
+
2663 ts[1].tv_sec = date;
+
2664 if (futimens(m_h, ts) >= 0)
+
2665 return;
+
2666#endif
+
2667 throw std::runtime_error("failed to set file mtime");
+
2668 }
+
2669 };
+
2670#pragma warning(pop)
+
2671
+
2675 class cached_file : public cache
+
2676 {
+
2677 public:
+
2678 cached_file(_In_opt_ sys_handle h = invalid_handle, _In_ state_t state = state_t::ok, _In_ size_t cache_size = default_cache_size) :
+
2679 cache(cache_size),
+
2680 m_source(h, state)
+
2681 {
+
2682 init(m_source);
+
2683 }
+
2684
+
2692 cached_file(_In_z_ const sys_char* filename, _In_ int mode, _In_ size_t cache_size = default_cache_size) :
+
2693 cache(cache_size),
+
2694 m_source(filename, mode & mode_for_writing ? mode | mode_for_reading : mode)
+
2695 {
+
2696 init(m_source);
+
2697 }
+
2698
+
2706 void open(_In_z_ const sys_char* filename, _In_ int mode)
+
2707 {
+
2708 invalidate_cache();
+
2709 if (!ok()) _Unlikely_{
+
2710 m_state = state_t::fail;
+
2711 return;
+
2712 }
+
2713 m_source.open(filename, mode & mode_for_writing ? mode | mode_for_reading : mode);
+
2714 if (m_source.ok()) {
+
2715#if SET_FILE_OP_TIMES
+
2716 m_atime = m_source.atime();
+
2717 m_mtime = m_source.mtime();
+
2718#endif
+
2719 m_offset = m_source.tell();
+
2720 m_state = state_t::ok;
+
2721 return;
+
2722 }
+
2723 m_state = state_t::fail;
+
2724 }
+
2725
+
2726 protected:
+
2727 file m_source;
+
2728 };
+
2729
+
2733 class memory_file : public basic_file
+
2734 {
+
2735 public:
+
2736 memory_file(_In_ state_t state = state_t::ok) :
+
2737 basic(state),
+
2738 m_data(nullptr),
+
2739 m_offset(0),
+
2740 m_size(0),
+
2741 m_reserved(0),
+
2742 m_manage(true)
+
2743 {
2744#if SET_FILE_OP_TIMES
2745 m_ctime = m_atime = m_mtime = time_point::now();
2746#endif
2747 }
2748
-
2758 memory_file(_Inout_ void* data, _In_ size_t size, _In_ size_t reserved, _In_ bool manage = false, _In_ state_t state = state_t::ok) :
-
2759 basic(state),
-
2760 m_data(reinterpret_cast<uint8_t*>(data)),
-
2761 m_offset(0),
-
2762 m_size(size),
-
2763 m_reserved(reserved),
-
2764 m_manage(manage)
-
2765 {
-
2766 assert(data || !size);
-
2767 assert(reserved >= size);
-
2768#if SET_FILE_OP_TIMES
-
2769 m_ctime = m_atime = m_mtime = time_point::now();
-
2770#endif
-
2771 }
-
2772
-
2781 memory_file(_Inout_ void* data, _In_ size_t size, _In_ bool manage = false, _In_ state_t state = state_t::ok) :
-
2782 memory_file(data, size, size, manage, state)
-
2783 {}
-
2784
-
2791 memory_file(_In_z_ const sys_char* filename, _In_ int mode) : memory_file()
-
2792 {
-
2793 load(filename, mode);
-
2794 }
-
2795
-
2796 virtual ~memory_file()
-
2797 {
-
2798 if (m_manage && m_data)
-
2799 free(m_data);
-
2800 }
-
2801
-
2808 void reserve(_In_ size_t required, _In_ bool tight = false) noexcept
-
2809 {
-
2810 if (required <= m_reserved && (!tight || required >= m_reserved)) {
-
2811 m_state = state_t::ok;
-
2812 return;
-
2813 }
-
2814 if (!m_manage) {
-
2815 m_state = state_t::fail;
-
2816 return;
-
2817 }
-
2818 size_t reserved = tight ? required : ((required + required / 4 + (default_block_size - 1)) / default_block_size) * default_block_size;
-
2819 auto data = reinterpret_cast<uint8_t*>(realloc(m_data, reserved));
-
2820 if (!data && reserved) _Unlikely_ {
-
2821 m_state = state_t::fail;
-
2822 return;
-
2823 }
-
2824 m_data = data;
-
2825 if (reserved < m_size)
-
2826 m_size = reserved;
-
2827 m_reserved = reserved;
-
2828 m_state = state_t::ok;
-
2829 }
-
2830
-
2837 void load(_In_z_ const sys_char* filename, _In_ int mode)
-
2838 {
-
2839 file f(filename, (mode & ~hint_random_access) | mode_for_reading | hint_sequential_access);
-
2840 if (!f.ok()) {
-
2841 m_state = state_t::fail;
-
2842 return;
-
2843 }
-
2844 fsize_t size = f.size();
-
2845 if (size > SIZE_MAX) {
-
2846 m_state = state_t::fail;
-
2847 return;
-
2848 }
-
2849 reserve(static_cast<size_t>(size), true);
-
2850 if (!ok()) _Unlikely_ {
-
2851 return;
-
2852 }
-
2853 m_offset = m_size = 0;
-
2854 write_stream(f);
-
2855 if (ok())
-
2856 m_offset = 0;
-
2857#if SET_FILE_OP_TIMES
-
2858 m_ctime = f.ctime();
-
2859 m_atime = f.atime();
-
2860 m_mtime = f.mtime();
-
2861#endif
-
2862 }
-
2863
-
2870 void save(_In_z_ const sys_char* filename, _In_ int mode)
-
2871 {
-
2872 file f(filename, (mode & ~hint_random_access) | mode_for_writing | hint_sequential_access);
-
2873 if (!f.ok()) {
-
2874 m_state = state_t::fail;
-
2875 return;
-
2876 }
-
2877 f.write(m_data, m_size);
-
2878 if (!f.ok()) {
-
2879 m_state = state_t::fail;
-
2880 return;
-
2881 }
-
2882 f.truncate();
-
2883#if SET_FILE_OP_TIMES
-
2884 f.set_ctime(m_ctime);
-
2885 f.set_atime(m_atime);
-
2886 f.set_mtime(m_mtime);
-
2887#endif
-
2888 }
-
2889
-
2893 inline const void* data() const { return m_data; }
-
2894
-
2895 virtual _Success_(return != 0 || length == 0) size_t read(
-
2896 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
2897 {
-
2898 assert(data || !length);
-
2899#if SET_FILE_OP_TIMES
-
2900 m_atime = time_point::now();
-
2901#endif
-
2902 size_t available = m_size - m_offset;
-
2903 if (length <= available) {
-
2904 memcpy(data, m_data + m_offset, length);
-
2905 m_offset += length;
-
2906 m_state = state_t::ok;
-
2907 return length;
-
2908 }
-
2909 if (length && !available) {
-
2910 m_state = state_t::eof;
-
2911 return 0;
-
2912 }
-
2913 memcpy(data, m_data + m_offset, available);
-
2914 m_offset += available;
-
2915 m_state = state_t::ok;
-
2916 return available;
-
2917 }
-
2918
-
2933 template <class T>
-
2934 inline memory_file& read_data(T & data)
-
2935 {
-
2936#if SET_FILE_OP_TIMES
-
2937 m_atime = time_point::now();
-
2938#endif
-
2939 if (CHECK_STREAM_STATE && !ok()) _Unlikely_ {
-
2940 data = 0;
-
2941 return *this;
-
2942 }
-
2943 size_t end_offset = m_offset + sizeof(T);
-
2944 if (end_offset <= m_size) {
-
2945 data = LE2HE(*reinterpret_cast<T*>(m_data + m_offset));
-
2946 m_offset = end_offset;
-
2947#if !CHECK_STREAM_STATE
-
2948 m_state = state_t::ok;
-
2949#endif
-
2950 }
-
2951 else {
-
2952 data = 0;
-
2953 m_offset = m_size;
-
2954 m_state = state_t::eof;
-
2955 }
-
2956 return *this;
-
2957 }
-
2958
-
2973 template<class _Elem, class _Traits = std::char_traits<_Elem>, class _Ax = std::allocator<_Elem>>
-
2974 memory_file& read_str(_Inout_ std::basic_string<_Elem, _Traits, _Ax>&data)
-
2975 {
-
2976#if SET_FILE_OP_TIMES
-
2977 m_atime = time_point::now();
-
2978#endif
-
2979 if (CHECK_STREAM_STATE && !ok()) _Unlikely_ {
-
2980 data.clear();
-
2981 return *this;
-
2982 }
-
2983 size_t end_offset = m_offset + sizeof(uint32_t);
-
2984 if (end_offset <= m_size) {
-
2985 uint32_t num_chars = LE2HE(*reinterpret_cast<uint32_t*>(m_data + m_offset));
-
2986 m_offset = end_offset;
-
2987 end_offset = stdex::add(m_offset + stdex::mul(num_chars, sizeof(_Elem)));
-
2988 _Elem* start = reinterpret_cast<_Elem*>(m_data + m_offset);
-
2989 if (end_offset <= m_size) {
-
2990 data.assign(start, start + num_chars);
-
2991 m_offset = end_offset;
-
2992#if !CHECK_STREAM_STATE
-
2993 m_state = state_t::ok;
-
2994#endif
-
2995 return *this;
-
2996 }
-
2997 if (end_offset <= m_size)
-
2998 data.assign(start, reinterpret_cast<_Elem*>(m_data + m_size));
-
2999 }
-
3000 m_offset = m_size;
-
3001 m_state = state_t::eof;
-
3002 return *this;
-
3003 }
-
3004
-
3005 virtual _Success_(return != 0) size_t write(
-
3006 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
3007 {
-
3008 assert(data || !length);
-
3009#if SET_FILE_OP_TIMES
-
3010 m_atime = m_mtime = time_point::now();
-
3011#endif
-
3012 size_t end_offset = m_offset + length;
-
3013 if (end_offset > m_reserved) {
-
3014 reserve(end_offset);
-
3015 if (!ok()) _Unlikely_
-
3016 return 0;
-
3017 }
-
3018 memcpy(m_data + m_offset, data, length);
-
3019 m_offset = end_offset;
-
3020 if (m_offset > m_size)
-
3021 m_size = m_offset;
-
3022 m_state = state_t::ok;
-
3023 return length;
+
2755 memory_file(_In_ size_t size, _In_ state_t state = state_t::ok) :
+
2756 basic(state),
+
2757 m_data(reinterpret_cast<uint8_t*>(malloc(size))),
+
2758 m_offset(0),
+
2759 m_size(0),
+
2760 m_reserved(size),
+
2761 m_manage(true)
+
2762 {
+
2763 if (!m_data)
+
2764 throw std::bad_alloc();
+
2765#if SET_FILE_OP_TIMES
+
2766 m_ctime = m_atime = m_mtime = time_point::now();
+
2767#endif
+
2768 }
+
2769
+
2779 memory_file(_Inout_ void* data, _In_ size_t size, _In_ size_t reserved, _In_ bool manage = false, _In_ state_t state = state_t::ok) :
+
2780 basic(state),
+
2781 m_data(reinterpret_cast<uint8_t*>(data)),
+
2782 m_offset(0),
+
2783 m_size(size),
+
2784 m_reserved(reserved),
+
2785 m_manage(manage)
+
2786 {
+
2787 assert(data || !size);
+
2788 assert(reserved >= size);
+
2789#if SET_FILE_OP_TIMES
+
2790 m_ctime = m_atime = m_mtime = time_point::now();
+
2791#endif
+
2792 }
+
2793
+
2802 memory_file(_Inout_ void* data, _In_ size_t size, _In_ bool manage = false, _In_ state_t state = state_t::ok) :
+
2803 memory_file(data, size, size, manage, state)
+
2804 {}
+
2805
+
2812 memory_file(_In_z_ const sys_char* filename, _In_ int mode) : memory_file()
+
2813 {
+
2814 load(filename, mode);
+
2815 }
+
2816
+
2817 virtual ~memory_file()
+
2818 {
+
2819 if (m_manage && m_data)
+
2820 free(m_data);
+
2821 }
+
2822
+
2829 void reserve(_In_ size_t required, _In_ bool tight = false) noexcept
+
2830 {
+
2831 if (required <= m_reserved && (!tight || required >= m_reserved)) {
+
2832 m_state = state_t::ok;
+
2833 return;
+
2834 }
+
2835 if (!m_manage) {
+
2836 m_state = state_t::fail;
+
2837 return;
+
2838 }
+
2839 size_t reserved = tight ? required : ((required + required / 4 + (default_block_size - 1)) / default_block_size) * default_block_size;
+
2840 auto data = reinterpret_cast<uint8_t*>(realloc(m_data, reserved));
+
2841 if (!data && reserved) _Unlikely_ {
+
2842 m_state = state_t::fail;
+
2843 return;
+
2844 }
+
2845 m_data = data;
+
2846 if (reserved < m_size)
+
2847 m_size = reserved;
+
2848 m_reserved = reserved;
+
2849 m_state = state_t::ok;
+
2850 }
+
2851
+
2858 void load(_In_z_ const sys_char* filename, _In_ int mode)
+
2859 {
+
2860 file f(filename, (mode & ~hint_random_access) | mode_for_reading | hint_sequential_access);
+
2861 if (!f.ok()) {
+
2862 m_state = state_t::fail;
+
2863 return;
+
2864 }
+
2865 fsize_t size = f.size();
+
2866 if (size > SIZE_MAX) {
+
2867 m_state = state_t::fail;
+
2868 return;
+
2869 }
+
2870 reserve(static_cast<size_t>(size), true);
+
2871 if (!ok()) _Unlikely_ {
+
2872 return;
+
2873 }
+
2874 m_offset = m_size = 0;
+
2875 write_stream(f);
+
2876 if (ok())
+
2877 m_offset = 0;
+
2878#if SET_FILE_OP_TIMES
+
2879 m_ctime = f.ctime();
+
2880 m_atime = f.atime();
+
2881 m_mtime = f.mtime();
+
2882#endif
+
2883 }
+
2884
+
2891 void save(_In_z_ const sys_char* filename, _In_ int mode)
+
2892 {
+
2893 file f(filename, (mode & ~hint_random_access) | mode_for_writing | hint_sequential_access);
+
2894 if (!f.ok()) {
+
2895 m_state = state_t::fail;
+
2896 return;
+
2897 }
+
2898 f.write(m_data, m_size);
+
2899 if (!f.ok()) {
+
2900 m_state = state_t::fail;
+
2901 return;
+
2902 }
+
2903 f.truncate();
+
2904#if SET_FILE_OP_TIMES
+
2905 f.set_ctime(m_ctime);
+
2906 f.set_atime(m_atime);
+
2907 f.set_mtime(m_mtime);
+
2908#endif
+
2909 }
+
2910
+
2914 inline const void* data() const { return m_data; }
+
2915
+
2916 virtual _Success_(return != 0 || length == 0) size_t read(
+
2917 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
2918 {
+
2919 assert(data || !length);
+
2920#if SET_FILE_OP_TIMES
+
2921 m_atime = time_point::now();
+
2922#endif
+
2923 size_t available = m_size - m_offset;
+
2924 if (length <= available) {
+
2925 memcpy(data, m_data + m_offset, length);
+
2926 m_offset += length;
+
2927 m_state = state_t::ok;
+
2928 return length;
+
2929 }
+
2930 if (length && !available) {
+
2931 m_state = state_t::eof;
+
2932 return 0;
+
2933 }
+
2934 memcpy(data, m_data + m_offset, available);
+
2935 m_offset += available;
+
2936 m_state = state_t::ok;
+
2937 return available;
+
2938 }
+
2939
+
2954 template <class T>
+
2955 inline memory_file& read_data(T & data)
+
2956 {
+
2957#if SET_FILE_OP_TIMES
+
2958 m_atime = time_point::now();
+
2959#endif
+
2960 if (CHECK_STREAM_STATE && !ok()) _Unlikely_ {
+
2961 data = 0;
+
2962 return *this;
+
2963 }
+
2964 size_t end_offset = m_offset + sizeof(T);
+
2965 if (end_offset <= m_size) {
+
2966 data = LE2HE(*reinterpret_cast<T*>(m_data + m_offset));
+
2967 m_offset = end_offset;
+
2968#if !CHECK_STREAM_STATE
+
2969 m_state = state_t::ok;
+
2970#endif
+
2971 }
+
2972 else {
+
2973 data = 0;
+
2974 m_offset = m_size;
+
2975 m_state = state_t::eof;
+
2976 }
+
2977 return *this;
+
2978 }
+
2979
+
2994 template<class _Elem, class _Traits = std::char_traits<_Elem>, class _Ax = std::allocator<_Elem>>
+
2995 memory_file& read_str(_Inout_ std::basic_string<_Elem, _Traits, _Ax>&data)
+
2996 {
+
2997#if SET_FILE_OP_TIMES
+
2998 m_atime = time_point::now();
+
2999#endif
+
3000 if (CHECK_STREAM_STATE && !ok()) _Unlikely_ {
+
3001 data.clear();
+
3002 return *this;
+
3003 }
+
3004 size_t end_offset = m_offset + sizeof(uint32_t);
+
3005 if (end_offset <= m_size) {
+
3006 uint32_t num_chars = LE2HE(*reinterpret_cast<uint32_t*>(m_data + m_offset));
+
3007 m_offset = end_offset;
+
3008 end_offset = stdex::add(m_offset + stdex::mul(num_chars, sizeof(_Elem)));
+
3009 _Elem* start = reinterpret_cast<_Elem*>(m_data + m_offset);
+
3010 if (end_offset <= m_size) {
+
3011 data.assign(start, start + num_chars);
+
3012 m_offset = end_offset;
+
3013#if !CHECK_STREAM_STATE
+
3014 m_state = state_t::ok;
+
3015#endif
+
3016 return *this;
+
3017 }
+
3018 if (end_offset <= m_size)
+
3019 data.assign(start, reinterpret_cast<_Elem*>(m_data + m_size));
+
3020 }
+
3021 m_offset = m_size;
+
3022 m_state = state_t::eof;
+
3023 return *this;
3024 }
3025
-
3029 void write_byte(_In_ uint8_t byte, _In_ size_t amount = 1)
-
3030 {
-
3031#if SET_FILE_OP_TIMES
-
3032 m_atime = m_mtime = time_point::now();
-
3033#endif
-
3034 size_t end_offset = m_offset + amount;
-
3035 if (end_offset > m_reserved) {
-
3036 reserve(end_offset);
-
3037 if (!ok()) _Unlikely_
-
3038 return;
-
3039 }
-
3040 memset(m_data + m_offset, byte, amount);
-
3041 m_offset = end_offset;
-
3042 if (m_offset > m_size)
-
3043 m_size = m_offset;
-
3044 m_state = state_t::ok;
+
3026 virtual _Success_(return != 0) size_t write(
+
3027 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
3028 {
+
3029 assert(data || !length);
+
3030#if SET_FILE_OP_TIMES
+
3031 m_atime = m_mtime = time_point::now();
+
3032#endif
+
3033 size_t end_offset = m_offset + length;
+
3034 if (end_offset > m_reserved) {
+
3035 reserve(end_offset);
+
3036 if (!ok()) _Unlikely_
+
3037 return 0;
+
3038 }
+
3039 memcpy(m_data + m_offset, data, length);
+
3040 m_offset = end_offset;
+
3041 if (m_offset > m_size)
+
3042 m_size = m_offset;
+
3043 m_state = state_t::ok;
+
3044 return length;
3045 }
3046
-
3061 template <class T>
-
3062 inline memory_file& write_data(const T data)
-
3063 {
-
3064#if SET_FILE_OP_TIMES
-
3065 m_atime = m_mtime = time_point::now();
-
3066#endif
-
3067 if (CHECK_STREAM_STATE && !ok()) _Unlikely_
-
3068 return *this;
-
3069 size_t end_offset = m_offset + sizeof(T);
-
3070 if (end_offset > m_reserved) {
-
3071 reserve(end_offset);
-
3072 if (!ok()) _Unlikely_
-
3073 return *this;
-
3074 }
-
3075 (*reinterpret_cast<T*>(m_data + m_offset)) = HE2LE(data);
-
3076 m_offset = end_offset;
-
3077 if (m_offset > m_size)
-
3078 m_size = m_offset;
-
3079#if !CHECK_STREAM_STATE
-
3080 m_state = state_t::ok;
-
3081#endif
-
3082 return *this;
-
3083 }
-
3084
-
3099 template <class T>
-
3100 inline memory_file& write_str(_In_z_ const T * data)
-
3101 {
-
3102#if SET_FILE_OP_TIMES
-
3103 m_atime = m_mtime = time_point::now();
-
3104#endif
-
3105 if (CHECK_STREAM_STATE && !ok()) _Unlikely_
-
3106 return *this;
-
3107 size_t num_chars = stdex::strlen(data);
-
3108 if (num_chars > UINT32_MAX)
-
3109 throw std::invalid_argument("string too long");
-
3110 size_t size_chars = num_chars * sizeof(T);
-
3111 size_t size = sizeof(uint32_t) + size_chars;
-
3112 size_t end_offset = m_offset + size;
-
3113 if (end_offset > m_reserved) {
-
3114 reserve(end_offset);
-
3115 if (!ok()) _Unlikely_
-
3116 return *this;
-
3117 }
-
3118 auto p = tok.m_podatki + m_offset;
-
3119 *reinterpret_cast<uint32_t*>(p) = HE2LE((uint32_t)num_chars);
-
3120 memcpy(p + sizeof(uint32_t), data, size_chars);
-
3121 m_offset = end_offset;
-
3122 if (m_offset > m_size)
-
3123 m_size = m_offset;
-
3124#if !CHECK_STREAM_STATE
-
3125 m_state = state_t::ok;
-
3126#endif
-
3127 return *this;
-
3128 }
-
3129
-
3135 size_t write_stream(_Inout_ basic & stream, _In_ size_t amount = SIZE_MAX)
-
3136 {
-
3137#if SET_FILE_OP_TIMES
-
3138 m_atime = m_mtime = time_point::now();
-
3139#endif
-
3140 size_t num_read, dst_offset = m_offset, dst_size = m_offset;
-
3141 size_t num_copied = 0, to_write = amount;
-
3142 m_state = state_t::ok;
-
3143 if (amount != SIZE_MAX) {
-
3144 dst_size = stdex::add(dst_size, amount);
-
3145 reserve(dst_size);
-
3146 if (!ok()) _Unlikely_
-
3147 return 0;
-
3148 while (to_write) {
-
3149 num_read = stream.read(m_data + dst_offset, to_write);
-
3150 dst_size = dst_offset += num_read;
-
3151 num_copied += num_read;
-
3152 to_write -= num_read;
-
3153 if (!stream.ok()) {
-
3154 if (stream.state() != state_t::eof)
-
3155 m_state = state_t::fail;
-
3156 break;
-
3157 }
-
3158 };
-
3159 }
-
3160 else {
-
3161 size_t block_size;
-
3162 while (to_write) {
-
3163 block_size = std::min(to_write, default_block_size);
-
3164 dst_size = stdex::add(dst_size, block_size);
-
3165 reserve(dst_size);
-
3166 if (!ok()) _Unlikely_
-
3167 break;
-
3168 num_read = stream.read(m_data + dst_offset, block_size);
-
3169 dst_size = dst_offset += num_read;
-
3170 num_copied += num_read;
-
3171 to_write -= num_read;
-
3172 if (!stream.ok()) {
-
3173 if (stream.state() != state_t::eof)
-
3174 m_state = state_t::fail;
-
3175 break;
-
3176 }
-
3177 };
-
3178 }
-
3179 m_offset = dst_offset;
-
3180 if (m_offset > m_size)
-
3181 m_size = m_offset;
-
3182 return num_copied;
-
3183 }
-
3184
-
3185 virtual void close()
-
3186 {
-
3187 if (m_manage && m_data)
-
3188 free(m_data);
-
3189 m_data = nullptr;
-
3190 m_manage = true;
-
3191 m_offset = 0;
-
3192 m_size = m_reserved = 0;
-
3193#if SET_FILE_OP_TIMES
-
3194 m_ctime = m_atime = m_mtime = time_point::min();
-
3195#endif
-
3196 m_state = state_t::ok;
-
3197 }
-
3198
-
3199 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
-
3200 {
-
3201 fpos_t target;
-
3202 switch (how) {
-
3203 case seek_t::beg: target = offset; break;
-
3204 case seek_t::cur: target = static_cast<fpos_t>(m_offset) + offset; break;
-
3205 case seek_t::end: target = static_cast<fpos_t>(m_size) + offset; break;
-
3206 default: throw std::invalid_argument("unknown seek origin");
-
3207 }
-
3208 if (target <= SIZE_MAX) {
-
3209 m_state = state_t::ok;
-
3210 return m_offset = static_cast<size_t>(target);
-
3211 }
-
3212 m_state = state_t::fail;
-
3213 return fpos_max;
-
3214 }
-
3215
-
3216 virtual fpos_t tell() const
-
3217 {
-
3218 return m_offset;
-
3219 }
-
3220
-
3221 virtual fsize_t size()
-
3222 {
-
3223 return m_size;
-
3224 }
-
3225
-
3226 virtual void truncate()
-
3227 {
-
3228#if SET_FILE_OP_TIMES
-
3229 m_atime = m_mtime = time_point::now();
-
3230#endif
-
3231 m_size = m_offset;
-
3232 reserve(m_offset);
-
3233 }
-
3234
-
3235#if SET_FILE_OP_TIMES
-
3236 virtual time_point ctime() const
-
3237 {
-
3238 return m_ctime;
-
3239 }
-
3240
-
3241 virtual time_point atime() const
-
3242 {
-
3243 return m_atime;
-
3244 }
-
3245
-
3246 virtual time_point mtime() const
-
3247 {
-
3248 return m_mtime;
-
3249 }
-
3250
-
3251 virtual void set_ctime(time_point date)
-
3252 {
-
3253 m_ctime = date;
+
3050 void write_byte(_In_ uint8_t byte, _In_ size_t amount = 1)
+
3051 {
+
3052#if SET_FILE_OP_TIMES
+
3053 m_atime = m_mtime = time_point::now();
+
3054#endif
+
3055 size_t end_offset = m_offset + amount;
+
3056 if (end_offset > m_reserved) {
+
3057 reserve(end_offset);
+
3058 if (!ok()) _Unlikely_
+
3059 return;
+
3060 }
+
3061 memset(m_data + m_offset, byte, amount);
+
3062 m_offset = end_offset;
+
3063 if (m_offset > m_size)
+
3064 m_size = m_offset;
+
3065 m_state = state_t::ok;
+
3066 }
+
3067
+
3082 template <class T>
+
3083 inline memory_file& write_data(const T data)
+
3084 {
+
3085#if SET_FILE_OP_TIMES
+
3086 m_atime = m_mtime = time_point::now();
+
3087#endif
+
3088 if (CHECK_STREAM_STATE && !ok()) _Unlikely_
+
3089 return *this;
+
3090 size_t end_offset = m_offset + sizeof(T);
+
3091 if (end_offset > m_reserved) {
+
3092 reserve(end_offset);
+
3093 if (!ok()) _Unlikely_
+
3094 return *this;
+
3095 }
+
3096 (*reinterpret_cast<T*>(m_data + m_offset)) = HE2LE(data);
+
3097 m_offset = end_offset;
+
3098 if (m_offset > m_size)
+
3099 m_size = m_offset;
+
3100#if !CHECK_STREAM_STATE
+
3101 m_state = state_t::ok;
+
3102#endif
+
3103 return *this;
+
3104 }
+
3105
+
3120 template <class T>
+
3121 inline memory_file& write_str(_In_z_ const T * data)
+
3122 {
+
3123#if SET_FILE_OP_TIMES
+
3124 m_atime = m_mtime = time_point::now();
+
3125#endif
+
3126 if (CHECK_STREAM_STATE && !ok()) _Unlikely_
+
3127 return *this;
+
3128 size_t num_chars = stdex::strlen(data);
+
3129 if (num_chars > UINT32_MAX)
+
3130 throw std::invalid_argument("string too long");
+
3131 size_t size_chars = num_chars * sizeof(T);
+
3132 size_t size = sizeof(uint32_t) + size_chars;
+
3133 size_t end_offset = m_offset + size;
+
3134 if (end_offset > m_reserved) {
+
3135 reserve(end_offset);
+
3136 if (!ok()) _Unlikely_
+
3137 return *this;
+
3138 }
+
3139 auto p = tok.m_podatki + m_offset;
+
3140 *reinterpret_cast<uint32_t*>(p) = HE2LE((uint32_t)num_chars);
+
3141 memcpy(p + sizeof(uint32_t), data, size_chars);
+
3142 m_offset = end_offset;
+
3143 if (m_offset > m_size)
+
3144 m_size = m_offset;
+
3145#if !CHECK_STREAM_STATE
+
3146 m_state = state_t::ok;
+
3147#endif
+
3148 return *this;
+
3149 }
+
3150
+
3156 size_t write_stream(_Inout_ basic & stream, _In_ size_t amount = SIZE_MAX)
+
3157 {
+
3158#if SET_FILE_OP_TIMES
+
3159 m_atime = m_mtime = time_point::now();
+
3160#endif
+
3161 size_t num_read, dst_offset = m_offset, dst_size = m_offset;
+
3162 size_t num_copied = 0, to_write = amount;
+
3163 m_state = state_t::ok;
+
3164 if (amount != SIZE_MAX) {
+
3165 dst_size = stdex::add(dst_size, amount);
+
3166 reserve(dst_size);
+
3167 if (!ok()) _Unlikely_
+
3168 return 0;
+
3169 while (to_write) {
+
3170 num_read = stream.read(m_data + dst_offset, to_write);
+
3171 dst_size = dst_offset += num_read;
+
3172 num_copied += num_read;
+
3173 to_write -= num_read;
+
3174 if (!stream.ok()) {
+
3175 if (stream.state() != state_t::eof)
+
3176 m_state = state_t::fail;
+
3177 break;
+
3178 }
+
3179 };
+
3180 }
+
3181 else {
+
3182 size_t block_size;
+
3183 while (to_write) {
+
3184 block_size = std::min(to_write, default_block_size);
+
3185 dst_size = stdex::add(dst_size, block_size);
+
3186 reserve(dst_size);
+
3187 if (!ok()) _Unlikely_
+
3188 break;
+
3189 num_read = stream.read(m_data + dst_offset, block_size);
+
3190 dst_size = dst_offset += num_read;
+
3191 num_copied += num_read;
+
3192 to_write -= num_read;
+
3193 if (!stream.ok()) {
+
3194 if (stream.state() != state_t::eof)
+
3195 m_state = state_t::fail;
+
3196 break;
+
3197 }
+
3198 };
+
3199 }
+
3200 m_offset = dst_offset;
+
3201 if (m_offset > m_size)
+
3202 m_size = m_offset;
+
3203 return num_copied;
+
3204 }
+
3205
+
3206 virtual void close()
+
3207 {
+
3208 if (m_manage && m_data)
+
3209 free(m_data);
+
3210 m_data = nullptr;
+
3211 m_manage = true;
+
3212 m_offset = 0;
+
3213 m_size = m_reserved = 0;
+
3214#if SET_FILE_OP_TIMES
+
3215 m_ctime = m_atime = m_mtime = time_point::min();
+
3216#endif
+
3217 m_state = state_t::ok;
+
3218 }
+
3219
+
3220 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
+
3221 {
+
3222 fpos_t target;
+
3223 switch (how) {
+
3224 case seek_t::beg: target = offset; break;
+
3225 case seek_t::cur: target = static_cast<fpos_t>(m_offset) + offset; break;
+
3226 case seek_t::end: target = static_cast<fpos_t>(m_size) + offset; break;
+
3227 default: throw std::invalid_argument("unknown seek origin");
+
3228 }
+
3229 if (target <= SIZE_MAX) {
+
3230 m_state = state_t::ok;
+
3231 return m_offset = static_cast<size_t>(target);
+
3232 }
+
3233 m_state = state_t::fail;
+
3234 return fpos_max;
+
3235 }
+
3236
+
3237 virtual fpos_t tell() const
+
3238 {
+
3239 return m_offset;
+
3240 }
+
3241
+
3242 virtual fsize_t size()
+
3243 {
+
3244 return m_size;
+
3245 }
+
3246
+
3247 virtual void truncate()
+
3248 {
+
3249#if SET_FILE_OP_TIMES
+
3250 m_atime = m_mtime = time_point::now();
+
3251#endif
+
3252 m_size = m_offset;
+
3253 reserve(m_offset);
3254 }
3255
-
3256 virtual void set_atime(time_point date)
-
3257 {
-
3258 m_atime = date;
-
3259 }
-
3260
-
3261 virtual void set_mtime(time_point date)
-
3262 {
-
3263 m_mtime = date;
-
3264 }
-
3265#endif
+
3256#if SET_FILE_OP_TIMES
+
3257 virtual time_point ctime() const
+
3258 {
+
3259 return m_ctime;
+
3260 }
+
3261
+
3262 virtual time_point atime() const
+
3263 {
+
3264 return m_atime;
+
3265 }
3266
-
3267 protected:
-
3275 template <class T>
-
3276 inline void set(_In_ fpos_t offset, _In_ const T data)
-
3277 {
-
3278#if SET_FILE_OP_TIMES
-
3279 m_atime = m_mtime = time_point::now();
-
3280#endif
-
3281 assert(offset + sizeof(T) < m_size);
-
3282 (*reinterpret_cast<T*>(m_data + offset)) = HE2LE(data);
-
3283 }
-
3284
-
3285 public:
-
3286 inline void set(_In_ fpos_t offset, _In_ const int8_t data) { set<int8_t>(offset, data); }
-
3287 inline void set(_In_ fpos_t offset, _In_ const int16_t data) { set<int16_t>(offset, data); }
-
3288 inline void set(_In_ fpos_t offset, _In_ const int32_t data) { set<int32_t>(offset, data); }
-
3289 inline void set(_In_ fpos_t offset, _In_ const int64_t data) { set<int64_t>(offset, data); }
-
3290 inline void set(_In_ fpos_t offset, _In_ const uint8_t data) { set<uint8_t>(offset, data); }
-
3291 inline void set(_In_ fpos_t offset, _In_ const uint16_t data) { set<uint16_t>(offset, data); }
-
3292 inline void set(_In_ fpos_t offset, _In_ const uint32_t data) { set<uint32_t>(offset, data); }
-
3293 inline void set(_In_ fpos_t offset, _In_ const uint64_t data) { set<uint64_t>(offset, data); }
-
3294#if defined(_WIN64) && defined(_NATIVE_SIZE_T_DEFINED)
-
3295 inline void set(_In_ fpos_t offset, _In_ const size_t data) { set<size_t>(offset, data); }
-
3296#endif
-
3297 inline void set(_In_ fpos_t offset, _In_ const float data) { set<float>(offset, data); }
-
3298 inline void set(_In_ fpos_t offset, _In_ const double data) { set<double>(offset, data); }
-
3299 inline void set(_In_ fpos_t offset, _In_ const char data) { set<char>(offset, data); }
-
3300#ifdef _NATIVE_WCHAR_T_DEFINED
-
3301 inline void set(_In_ fpos_t offset, _In_ const wchar_t data) { set<wchar_t>(offset, data); }
-
3302#endif
-
3303
-
3311 protected:
-
3312 template <class T>
-
3313 inline void get(_In_ fpos_t offset, _Out_ T & data)
-
3314 {
-
3315 assert(offset + sizeof(T) < m_size);
-
3316 data = LE2HE(*(T*)(m_data + offset));
-
3317#if SET_FILE_OP_TIMES
-
3318 m_atime = time_point::now();
-
3319#endif
-
3320 }
-
3321
-
3322 public:
-
3323 inline void get(_In_ fpos_t offset, _Out_ int8_t & data) { get<int8_t>(offset, data); }
-
3324 inline void get(_In_ fpos_t offset, _Out_ int16_t & data) { get<int16_t>(offset, data); }
-
3325 inline void get(_In_ fpos_t offset, _Out_ int32_t & data) { get<int32_t>(offset, data); }
-
3326 inline void get(_In_ fpos_t offset, _Out_ int64_t & data) { get<int64_t>(offset, data); }
-
3327 inline void get(_In_ fpos_t offset, _Out_ uint8_t & data) { get<uint8_t>(offset, data); }
-
3328 inline void get(_In_ fpos_t offset, _Out_ uint16_t & data) { get<uint16_t>(offset, data); }
-
3329 inline void get(_In_ fpos_t offset, _Out_ uint32_t & data) { get<uint32_t>(offset, data); }
-
3330 inline void get(_In_ fpos_t offset, _Out_ uint64_t & data) { get<uint64_t>(offset, data); }
-
3331#if defined(_WIN64) && defined(_NATIVE_SIZE_T_DEFINED)
-
3332 inline void get(_In_ fpos_t offset, _Out_ size_t & data) { get<size_t>(offset, data); }
-
3333#endif
-
3334 inline void get(_In_ fpos_t offset, _Out_ float& data) { get<float>(offset, data); }
-
3335 inline void get(_In_ fpos_t offset, _Out_ double& data) { get<double>(offset, data); }
-
3336 inline void get(_In_ fpos_t offset, _Out_ char& data) { get<char>(offset, data); }
-
3337#ifdef _NATIVE_WCHAR_T_DEFINED
-
3338 inline void get(_In_ fpos_t offset, _Out_ wchar_t& data) { get<wchar_t>(offset, data); }
-
3339#endif
-
3340
-
3341 inline memory_file& operator <<(_In_ const int8_t data) { return write_data(data); }
-
3342 inline memory_file& operator >>(_Out_ int8_t & data) { return read_data(data); }
-
3343 inline memory_file& operator <<(_In_ const int16_t data) { return write_data(data); }
-
3344 inline memory_file& operator >>(_Out_ int16_t & data) { return read_data(data); }
-
3345 inline memory_file& operator <<(_In_ const int32_t data) { return write_data(data); }
-
3346 inline memory_file& operator >>(_Out_ int32_t & data) { return read_data(data); }
-
3347 inline memory_file& operator <<(_In_ const int64_t data) { return write_data(data); }
-
3348 inline memory_file& operator >>(_Out_ int64_t & data) { return read_data(data); }
-
3349 inline memory_file& operator <<(_In_ const uint8_t data) { return write_data(data); }
-
3350 inline memory_file& operator >>(_Out_ uint8_t & data) { return read_data(data); }
-
3351 inline memory_file& operator <<(_In_ const uint16_t data) { return write_data(data); }
-
3352 inline memory_file& operator >>(_Out_ uint16_t & data) { return read_data(data); }
-
3353 inline memory_file& operator <<(_In_ const uint32_t data) { return write_data(data); }
-
3354 inline memory_file& operator >>(_Out_ uint32_t & data) { return read_data(data); }
-
3355 inline memory_file& operator <<(_In_ const uint64_t data) { return write_data(data); }
-
3356 inline memory_file& operator >>(_Out_ uint64_t & data) { return read_data(data); }
-
3357#if defined(_WIN64) && defined(_NATIVE_SIZE_T_DEFINED)
-
3358 inline memory_file& operator <<(_In_ const size_t data) { return write_data(data); }
-
3359 inline memory_file& operator >>(_Out_ size_t & data) { return read_data(data); }
+
3267 virtual time_point mtime() const
+
3268 {
+
3269 return m_mtime;
+
3270 }
+
3271
+
3272 virtual void set_ctime(time_point date)
+
3273 {
+
3274 m_ctime = date;
+
3275 }
+
3276
+
3277 virtual void set_atime(time_point date)
+
3278 {
+
3279 m_atime = date;
+
3280 }
+
3281
+
3282 virtual void set_mtime(time_point date)
+
3283 {
+
3284 m_mtime = date;
+
3285 }
+
3286#endif
+
3287
+
3288 protected:
+
3296 template <class T>
+
3297 inline void set(_In_ fpos_t offset, _In_ const T data)
+
3298 {
+
3299#if SET_FILE_OP_TIMES
+
3300 m_atime = m_mtime = time_point::now();
+
3301#endif
+
3302 assert(offset + sizeof(T) < m_size);
+
3303 (*reinterpret_cast<T*>(m_data + offset)) = HE2LE(data);
+
3304 }
+
3305
+
3306 public:
+
3307 inline void set(_In_ fpos_t offset, _In_ const int8_t data) { set<int8_t>(offset, data); }
+
3308 inline void set(_In_ fpos_t offset, _In_ const int16_t data) { set<int16_t>(offset, data); }
+
3309 inline void set(_In_ fpos_t offset, _In_ const int32_t data) { set<int32_t>(offset, data); }
+
3310 inline void set(_In_ fpos_t offset, _In_ const int64_t data) { set<int64_t>(offset, data); }
+
3311 inline void set(_In_ fpos_t offset, _In_ const uint8_t data) { set<uint8_t>(offset, data); }
+
3312 inline void set(_In_ fpos_t offset, _In_ const uint16_t data) { set<uint16_t>(offset, data); }
+
3313 inline void set(_In_ fpos_t offset, _In_ const uint32_t data) { set<uint32_t>(offset, data); }
+
3314 inline void set(_In_ fpos_t offset, _In_ const uint64_t data) { set<uint64_t>(offset, data); }
+
3315#if defined(_WIN64) && defined(_NATIVE_SIZE_T_DEFINED)
+
3316 inline void set(_In_ fpos_t offset, _In_ const size_t data) { set<size_t>(offset, data); }
+
3317#endif
+
3318 inline void set(_In_ fpos_t offset, _In_ const float data) { set<float>(offset, data); }
+
3319 inline void set(_In_ fpos_t offset, _In_ const double data) { set<double>(offset, data); }
+
3320 inline void set(_In_ fpos_t offset, _In_ const char data) { set<char>(offset, data); }
+
3321#ifdef _NATIVE_WCHAR_T_DEFINED
+
3322 inline void set(_In_ fpos_t offset, _In_ const wchar_t data) { set<wchar_t>(offset, data); }
+
3323#endif
+
3324
+
3332 protected:
+
3333 template <class T>
+
3334 inline void get(_In_ fpos_t offset, _Out_ T & data)
+
3335 {
+
3336 assert(offset + sizeof(T) < m_size);
+
3337 data = LE2HE(*(T*)(m_data + offset));
+
3338#if SET_FILE_OP_TIMES
+
3339 m_atime = time_point::now();
+
3340#endif
+
3341 }
+
3342
+
3343 public:
+
3344 inline void get(_In_ fpos_t offset, _Out_ int8_t & data) { get<int8_t>(offset, data); }
+
3345 inline void get(_In_ fpos_t offset, _Out_ int16_t & data) { get<int16_t>(offset, data); }
+
3346 inline void get(_In_ fpos_t offset, _Out_ int32_t & data) { get<int32_t>(offset, data); }
+
3347 inline void get(_In_ fpos_t offset, _Out_ int64_t & data) { get<int64_t>(offset, data); }
+
3348 inline void get(_In_ fpos_t offset, _Out_ uint8_t & data) { get<uint8_t>(offset, data); }
+
3349 inline void get(_In_ fpos_t offset, _Out_ uint16_t & data) { get<uint16_t>(offset, data); }
+
3350 inline void get(_In_ fpos_t offset, _Out_ uint32_t & data) { get<uint32_t>(offset, data); }
+
3351 inline void get(_In_ fpos_t offset, _Out_ uint64_t & data) { get<uint64_t>(offset, data); }
+
3352#if defined(_WIN64) && defined(_NATIVE_SIZE_T_DEFINED)
+
3353 inline void get(_In_ fpos_t offset, _Out_ size_t & data) { get<size_t>(offset, data); }
+
3354#endif
+
3355 inline void get(_In_ fpos_t offset, _Out_ float& data) { get<float>(offset, data); }
+
3356 inline void get(_In_ fpos_t offset, _Out_ double& data) { get<double>(offset, data); }
+
3357 inline void get(_In_ fpos_t offset, _Out_ char& data) { get<char>(offset, data); }
+
3358#ifdef _NATIVE_WCHAR_T_DEFINED
+
3359 inline void get(_In_ fpos_t offset, _Out_ wchar_t& data) { get<wchar_t>(offset, data); }
3360#endif
-
3361 inline memory_file& operator <<(_In_ const float data) { return write_data(data); }
-
3362 inline memory_file& operator >>(_Out_ float& data) { return read_data(data); }
-
3363 inline memory_file& operator <<(_In_ const double data) { return write_data(data); }
-
3364 inline memory_file& operator >>(_Out_ double& data) { return read_data(data); }
-
3365 inline memory_file& operator <<(_In_ const char data) { return write_data(data); }
-
3366 inline memory_file& operator >>(_Out_ char& data) { return read_data(data); }
-
3367#ifdef _NATIVE_WCHAR_T_DEFINED
-
3368 inline memory_file& operator <<(_In_ const wchar_t data) { return write_data(data); }
-
3369 inline memory_file& operator >>(_Out_ wchar_t& data) { return read_data(data); }
-
3370#endif
-
3371 template <class T>
-
3372 inline memory_file& operator <<(_In_ const T * data) { return write_str(data); }
-
3373 template<class _Elem, class _Traits = std::char_traits<_Elem>, class _Ax = std::allocator<_Elem>>
-
3374 inline memory_file& operator >>(_Inout_ std::basic_string<_Elem, _Traits, _Ax>&data) { return read_str(data); }
-
3375
-
3376 protected:
-
3377 uint8_t* m_data;
-
3378 bool m_manage;
-
3379 size_t m_offset;
-
3380 size_t m_size;
-
3381 size_t m_reserved;
-
3382#if SET_FILE_OP_TIMES
-
3383 time_point
-
3384 m_ctime,
-
3385 m_atime,
-
3386 m_mtime;
-
3387#endif
-
3388 };
-
3389
-
3393 class fifo : public basic {
-
3394 public:
-
3395 fifo() :
-
3396 m_offset(0),
-
3397 m_size(0),
-
3398 m_head(nullptr),
-
3399 m_tail(nullptr)
-
3400 {}
-
3401
-
3402 virtual ~fifo()
-
3403 {
-
3404 while (m_head) {
-
3405 auto p = m_head;
-
3406 m_head = p->next;
-
3407 delete p;
-
3408 }
-
3409 }
+
3361
+
3362 inline memory_file& operator <<(_In_ const int8_t data) { return write_data(data); }
+
3363 inline memory_file& operator >>(_Out_ int8_t & data) { return read_data(data); }
+
3364 inline memory_file& operator <<(_In_ const int16_t data) { return write_data(data); }
+
3365 inline memory_file& operator >>(_Out_ int16_t & data) { return read_data(data); }
+
3366 inline memory_file& operator <<(_In_ const int32_t data) { return write_data(data); }
+
3367 inline memory_file& operator >>(_Out_ int32_t & data) { return read_data(data); }
+
3368 inline memory_file& operator <<(_In_ const int64_t data) { return write_data(data); }
+
3369 inline memory_file& operator >>(_Out_ int64_t & data) { return read_data(data); }
+
3370 inline memory_file& operator <<(_In_ const uint8_t data) { return write_data(data); }
+
3371 inline memory_file& operator >>(_Out_ uint8_t & data) { return read_data(data); }
+
3372 inline memory_file& operator <<(_In_ const uint16_t data) { return write_data(data); }
+
3373 inline memory_file& operator >>(_Out_ uint16_t & data) { return read_data(data); }
+
3374 inline memory_file& operator <<(_In_ const uint32_t data) { return write_data(data); }
+
3375 inline memory_file& operator >>(_Out_ uint32_t & data) { return read_data(data); }
+
3376 inline memory_file& operator <<(_In_ const uint64_t data) { return write_data(data); }
+
3377 inline memory_file& operator >>(_Out_ uint64_t & data) { return read_data(data); }
+
3378#if defined(_WIN64) && defined(_NATIVE_SIZE_T_DEFINED)
+
3379 inline memory_file& operator <<(_In_ const size_t data) { return write_data(data); }
+
3380 inline memory_file& operator >>(_Out_ size_t & data) { return read_data(data); }
+
3381#endif
+
3382 inline memory_file& operator <<(_In_ const float data) { return write_data(data); }
+
3383 inline memory_file& operator >>(_Out_ float& data) { return read_data(data); }
+
3384 inline memory_file& operator <<(_In_ const double data) { return write_data(data); }
+
3385 inline memory_file& operator >>(_Out_ double& data) { return read_data(data); }
+
3386 inline memory_file& operator <<(_In_ const char data) { return write_data(data); }
+
3387 inline memory_file& operator >>(_Out_ char& data) { return read_data(data); }
+
3388#ifdef _NATIVE_WCHAR_T_DEFINED
+
3389 inline memory_file& operator <<(_In_ const wchar_t data) { return write_data(data); }
+
3390 inline memory_file& operator >>(_Out_ wchar_t& data) { return read_data(data); }
+
3391#endif
+
3392 template <class T>
+
3393 inline memory_file& operator <<(_In_ const T * data) { return write_str(data); }
+
3394 template<class _Elem, class _Traits = std::char_traits<_Elem>, class _Ax = std::allocator<_Elem>>
+
3395 inline memory_file& operator >>(_Inout_ std::basic_string<_Elem, _Traits, _Ax>&data) { return read_str(data); }
+
3396
+
3397 protected:
+
3398 uint8_t* m_data;
+
3399 bool m_manage;
+
3400 size_t m_offset;
+
3401 size_t m_size;
+
3402 size_t m_reserved;
+
3403#if SET_FILE_OP_TIMES
+
3404 time_point
+
3405 m_ctime,
+
3406 m_atime,
+
3407 m_mtime;
+
3408#endif
+
3409 };
3410
-
3411#pragma warning(suppress: 6101) // See [2] below
-
3412 virtual _Success_(return != 0 || length == 0) size_t read(
-
3413 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
3414 {
-
3415 assert(data || !length);
-
3416 for (size_t to_read = length;;) {
-
3417 if (!m_head) _Unlikely_ {
-
3418 // [1] Code analysis misses length - to_read bytes were written to data in previous loop iterations.
-
3419 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
-
3420 return length - to_read;
-
3421 }
-
3422 size_t remaining = m_head->size - m_offset;
-
3423 if (remaining > to_read) {
-
3424 memcpy(data, m_head->data + m_offset, to_read);
-
3425 m_offset += to_read;
-
3426 m_size -= to_read;
-
3427 m_state = state_t::ok;
-
3428 return length;
-
3429 }
-
3430 memcpy(data, m_head->data + m_offset, remaining);
-
3431 m_offset = 0;
-
3432 m_size -= remaining;
-
3433 reinterpret_cast<uint8_t*&>(data) += remaining;
-
3434 to_read -= remaining;
-
3435 auto p = m_head;
-
3436 m_head = p->next;
-
3437 delete p;
-
3438 }
-
3439 }
-
3440
-
3441 virtual _Success_(return != 0) size_t write(
-
3442 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
3443 {
-
3444 assert(data || !length);
-
3445 try {
-
3446 std::unique_ptr<node_t> n(reinterpret_cast<node_t*>(new uint8_t[sizeof(node_t) + length]));
-
3447 n->next = nullptr;
-
3448 n->size = length;
-
3449 memcpy(n->data, data, length);
-
3450 m_size += length;
-
3451 if (m_head)
-
3452 m_tail = m_tail->next = n.release();
-
3453 else
-
3454 m_head = m_tail = n.release();
-
3455 m_state = state_t::ok;
-
3456 return length;
-
3457 }
-
3458 catch (std::bad_alloc) {
-
3459 m_state = state_t::fail;
-
3460 return 0;
-
3461 }
-
3462 }
-
3463
-
3464 virtual void close()
-
3465 {
-
3466 m_size = m_offset = 0;
-
3467 while (m_head) {
-
3468 auto p = m_head;
-
3469 m_head = p->next;
-
3470 delete p;
-
3471 }
-
3472 m_state = state_t::ok;
-
3473 }
-
3474
-
3478 inline size_t size() const { return m_size; };
-
3479
-
3480 protected:
-
3481 size_t m_offset, m_size;
-
3482 struct node_t {
-
3483 node_t* next;
-
3484 size_t size;
-
3485#pragma warning(suppress:4200)
-
3486 uint8_t data[0];
-
3487 } *m_head, * m_tail;
-
3488 };
-
3489
-
3493 class diag_file : public basic_file {
-
3494 public:
-
3495 diag_file(_In_count_(num_files) basic_file* const* files, _In_ size_t num_files) :
-
3496 basic(num_files ? files[0]->state() : state_t::fail),
-
3497 m_files(files, files + num_files)
-
3498 {
-
3499 }
+
3414 class fifo : public basic {
+
3415 public:
+
3416 fifo() :
+
3417 m_offset(0),
+
3418 m_size(0),
+
3419 m_head(nullptr),
+
3420 m_tail(nullptr)
+
3421 {}
+
3422
+
3423 virtual ~fifo()
+
3424 {
+
3425 while (m_head) {
+
3426 auto p = m_head;
+
3427 m_head = p->next;
+
3428 delete p;
+
3429 }
+
3430 }
+
3431
+
3432#pragma warning(suppress: 6101) // See [2] below
+
3433 virtual _Success_(return != 0 || length == 0) size_t read(
+
3434 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
3435 {
+
3436 assert(data || !length);
+
3437 for (size_t to_read = length;;) {
+
3438 if (!m_head) _Unlikely_ {
+
3439 // [1] Code analysis misses length - to_read bytes were written to data in previous loop iterations.
+
3440 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
+
3441 return length - to_read;
+
3442 }
+
3443 size_t remaining = m_head->size - m_offset;
+
3444 if (remaining > to_read) {
+
3445 memcpy(data, m_head->data + m_offset, to_read);
+
3446 m_offset += to_read;
+
3447 m_size -= to_read;
+
3448 m_state = state_t::ok;
+
3449 return length;
+
3450 }
+
3451 memcpy(data, m_head->data + m_offset, remaining);
+
3452 m_offset = 0;
+
3453 m_size -= remaining;
+
3454 reinterpret_cast<uint8_t*&>(data) += remaining;
+
3455 to_read -= remaining;
+
3456 auto p = m_head;
+
3457 m_head = p->next;
+
3458 delete p;
+
3459 }
+
3460 }
+
3461
+
3462 virtual _Success_(return != 0) size_t write(
+
3463 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
3464 {
+
3465 assert(data || !length);
+
3466 try {
+
3467 std::unique_ptr<node_t> n(reinterpret_cast<node_t*>(new uint8_t[sizeof(node_t) + length]));
+
3468 n->next = nullptr;
+
3469 n->size = length;
+
3470 memcpy(n->data, data, length);
+
3471 m_size += length;
+
3472 if (m_head)
+
3473 m_tail = m_tail->next = n.release();
+
3474 else
+
3475 m_head = m_tail = n.release();
+
3476 m_state = state_t::ok;
+
3477 return length;
+
3478 }
+
3479 catch (std::bad_alloc) {
+
3480 m_state = state_t::fail;
+
3481 return 0;
+
3482 }
+
3483 }
+
3484
+
3485 virtual void close()
+
3486 {
+
3487 m_size = m_offset = 0;
+
3488 while (m_head) {
+
3489 auto p = m_head;
+
3490 m_head = p->next;
+
3491 delete p;
+
3492 }
+
3493 m_state = state_t::ok;
+
3494 }
+
3495
+
3499 inline size_t size() const { return m_size; };
3500
-
3501 virtual _Success_(return != 0 || length == 0) size_t read(
-
3502 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
3503 {
-
3504 assert(data || !length);
-
3505 if (m_files.empty()) {
-
3506 m_state = state_t::fail;
-
3507 return 0;
-
3508 }
-
3509 size_t result = m_files[0]->read(data, length);
-
3510 _Analysis_assume_(result <= length);
-
3511 m_state = m_files[0]->state();
-
3512 if (length > m_tmp.size())
-
3513 m_tmp.resize(length);
-
3514 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
3515 if (m_files[i]->read(m_tmp.data(), length) != result ||
-
3516 memcmp(m_tmp.data(), data, result))
-
3517 throw std::runtime_error("read mismatch");
-
3518 if (m_files[i]->state() != m_state)
-
3519 throw std::runtime_error("state mismatch");
-
3520 }
-
3521 return result;
-
3522 }
-
3523
-
3524 virtual _Success_(return != 0) size_t write(
-
3525 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
3526 {
-
3527 if (m_files.empty()) {
-
3528 m_state = state_t::fail;
-
3529 return 0;
-
3530 }
-
3531 size_t result = m_files[0]->write(data, length);
+
3501 protected:
+
3502 size_t m_offset, m_size;
+
3503 struct node_t {
+
3504 node_t* next;
+
3505 size_t size;
+
3506#pragma warning(suppress:4200)
+
3507 uint8_t data[0];
+
3508 } *m_head, * m_tail;
+
3509 };
+
3510
+
3514 class diag_file : public basic_file {
+
3515 public:
+
3516 diag_file(_In_count_(num_files) basic_file* const* files, _In_ size_t num_files) :
+
3517 basic(num_files ? files[0]->state() : state_t::fail),
+
3518 m_files(files, files + num_files)
+
3519 {
+
3520 }
+
3521
+
3522 virtual _Success_(return != 0 || length == 0) size_t read(
+
3523 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
3524 {
+
3525 assert(data || !length);
+
3526 if (m_files.empty()) {
+
3527 m_state = state_t::fail;
+
3528 return 0;
+
3529 }
+
3530 size_t result = m_files[0]->read(data, length);
+
3531 _Analysis_assume_(result <= length);
3532 m_state = m_files[0]->state();
-
3533 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
3534 if (m_files[i]->write(data, length) != result)
-
3535 throw std::runtime_error("write mismatch");
-
3536 if (m_files[i]->state() != m_state)
-
3537 throw std::runtime_error("state mismatch");
-
3538 }
-
3539 return result;
-
3540 }
-
3541
-
3542 virtual void flush()
-
3543 {
-
3544 if (m_files.empty()) {
-
3545 m_state = state_t::ok;
-
3546 return;
-
3547 }
-
3548 m_files[0]->flush();
-
3549 m_state = m_files[0]->state();
-
3550 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
3551 m_files[i]->flush();
-
3552 if (m_files[i]->state() != m_state)
-
3553 throw std::runtime_error("state mismatch");
-
3554 }
-
3555 }
-
3556
-
3557 virtual void close()
-
3558 {
-
3559 if (m_files.empty()) {
-
3560 m_state = state_t::ok;
-
3561 return;
-
3562 }
-
3563 m_files[0]->close();
-
3564 m_state = m_files[0]->state();
-
3565 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
3566 m_files[i]->close();
-
3567 if (m_files[i]->state() != m_state)
-
3568 throw std::runtime_error("state mismatch");
-
3569 }
-
3570 m_tmp.clear();
-
3571 m_tmp.shrink_to_fit();
-
3572 }
-
3573
-
3574 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
-
3575 {
-
3576 if (m_files.empty()) {
-
3577 m_state = state_t::fail;
-
3578 return fpos_max;
-
3579 }
-
3580 fpos_t result = m_files[0]->seek(offset, how);
-
3581 m_state = m_files[0]->state();
-
3582 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
3583 if (m_files[i]->seek(offset, how) != result)
-
3584 throw std::runtime_error("seek mismatch");
-
3585 if (m_files[i]->state() != m_state)
-
3586 throw std::runtime_error("state mismatch");
-
3587 }
-
3588 return result;
-
3589 }
-
3590
-
3591 virtual fpos_t tell() const
-
3592 {
-
3593 if (m_files.empty())
-
3594 return fpos_max;
-
3595 fpos_t result = m_files[0]->tell();
-
3596 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
3597 if (m_files[i]->tell() != result)
-
3598 throw std::runtime_error("tell mismatch");
-
3599 }
-
3600 return result;
-
3601 }
-
3602
-
3603 virtual void lock(_In_ fpos_t offset, _In_ fsize_t length)
-
3604 {
-
3605 if (m_files.empty())
-
3606 m_state = state_t::fail;
-
3607 m_files[0]->lock(offset, length);
-
3608 m_state = m_files[0]->state();
-
3609 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
3610 m_files[i]->lock(offset, length);
-
3611 if (m_files[i]->state() != m_state)
-
3612 throw std::runtime_error("state mismatch");
-
3613 }
-
3614 }
-
3615
-
3616 virtual void unlock(_In_ fpos_t offset, _In_ fsize_t length)
-
3617 {
-
3618 if (m_files.empty())
-
3619 m_state = state_t::fail;
-
3620 m_files[0]->unlock(offset, length);
-
3621 m_state = m_files[0]->state();
-
3622 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
3623 m_files[i]->unlock(offset, length);
-
3624 if (m_files[i]->state() != m_state)
-
3625 throw std::runtime_error("state mismatch");
-
3626 }
-
3627 }
-
3628
-
3629 virtual fsize_t size()
-
3630 {
-
3631 if (m_files.empty()) {
-
3632 m_state = state_t::fail;
-
3633 return 0;
+
3533 if (length > m_tmp.size())
+
3534 m_tmp.resize(length);
+
3535 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
3536 if (m_files[i]->read(m_tmp.data(), length) != result ||
+
3537 memcmp(m_tmp.data(), data, result))
+
3538 throw std::runtime_error("read mismatch");
+
3539 if (m_files[i]->state() != m_state)
+
3540 throw std::runtime_error("state mismatch");
+
3541 }
+
3542 return result;
+
3543 }
+
3544
+
3545 virtual _Success_(return != 0) size_t write(
+
3546 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
3547 {
+
3548 if (m_files.empty()) {
+
3549 m_state = state_t::fail;
+
3550 return 0;
+
3551 }
+
3552 size_t result = m_files[0]->write(data, length);
+
3553 m_state = m_files[0]->state();
+
3554 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
3555 if (m_files[i]->write(data, length) != result)
+
3556 throw std::runtime_error("write mismatch");
+
3557 if (m_files[i]->state() != m_state)
+
3558 throw std::runtime_error("state mismatch");
+
3559 }
+
3560 return result;
+
3561 }
+
3562
+
3563 virtual void flush()
+
3564 {
+
3565 if (m_files.empty()) {
+
3566 m_state = state_t::ok;
+
3567 return;
+
3568 }
+
3569 m_files[0]->flush();
+
3570 m_state = m_files[0]->state();
+
3571 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
3572 m_files[i]->flush();
+
3573 if (m_files[i]->state() != m_state)
+
3574 throw std::runtime_error("state mismatch");
+
3575 }
+
3576 }
+
3577
+
3578 virtual void close()
+
3579 {
+
3580 if (m_files.empty()) {
+
3581 m_state = state_t::ok;
+
3582 return;
+
3583 }
+
3584 m_files[0]->close();
+
3585 m_state = m_files[0]->state();
+
3586 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
3587 m_files[i]->close();
+
3588 if (m_files[i]->state() != m_state)
+
3589 throw std::runtime_error("state mismatch");
+
3590 }
+
3591 m_tmp.clear();
+
3592 m_tmp.shrink_to_fit();
+
3593 }
+
3594
+
3595 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
+
3596 {
+
3597 if (m_files.empty()) {
+
3598 m_state = state_t::fail;
+
3599 return fpos_max;
+
3600 }
+
3601 fpos_t result = m_files[0]->seek(offset, how);
+
3602 m_state = m_files[0]->state();
+
3603 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
3604 if (m_files[i]->seek(offset, how) != result)
+
3605 throw std::runtime_error("seek mismatch");
+
3606 if (m_files[i]->state() != m_state)
+
3607 throw std::runtime_error("state mismatch");
+
3608 }
+
3609 return result;
+
3610 }
+
3611
+
3612 virtual fpos_t tell() const
+
3613 {
+
3614 if (m_files.empty())
+
3615 return fpos_max;
+
3616 fpos_t result = m_files[0]->tell();
+
3617 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
3618 if (m_files[i]->tell() != result)
+
3619 throw std::runtime_error("tell mismatch");
+
3620 }
+
3621 return result;
+
3622 }
+
3623
+
3624 virtual void lock(_In_ fpos_t offset, _In_ fsize_t length)
+
3625 {
+
3626 if (m_files.empty())
+
3627 m_state = state_t::fail;
+
3628 m_files[0]->lock(offset, length);
+
3629 m_state = m_files[0]->state();
+
3630 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
3631 m_files[i]->lock(offset, length);
+
3632 if (m_files[i]->state() != m_state)
+
3633 throw std::runtime_error("state mismatch");
3634 }
-
3635 fsize_t result = m_files[0]->size();
-
3636 m_state = m_files[0]->state();
-
3637 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
3638 if (m_files[i]->size() != result)
-
3639 throw std::runtime_error("size mismatch");
-
3640 if (m_files[i]->state() != m_state)
-
3641 throw std::runtime_error("state mismatch");
-
3642 }
-
3643 return result;
-
3644 }
-
3645
-
3646 virtual void truncate()
-
3647 {
-
3648 if (m_files.empty())
-
3649 m_state = state_t::fail;
-
3650 m_files[0]->truncate();
-
3651 m_state = m_files[0]->state();
-
3652 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
3653 m_files[i]->truncate();
-
3654 if (m_files[i]->state() != m_state)
-
3655 throw std::runtime_error("state mismatch");
-
3656 }
-
3657 }
-
3658
-
3659 protected:
-
3660 std::vector<basic_file*> m_files;
-
3661 std::vector<uint8_t> m_tmp;
-
3662 };
-
3663 }
-
3664}
+
3635 }
+
3636
+
3637 virtual void unlock(_In_ fpos_t offset, _In_ fsize_t length)
+
3638 {
+
3639 if (m_files.empty())
+
3640 m_state = state_t::fail;
+
3641 m_files[0]->unlock(offset, length);
+
3642 m_state = m_files[0]->state();
+
3643 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
3644 m_files[i]->unlock(offset, length);
+
3645 if (m_files[i]->state() != m_state)
+
3646 throw std::runtime_error("state mismatch");
+
3647 }
+
3648 }
+
3649
+
3650 virtual fsize_t size()
+
3651 {
+
3652 if (m_files.empty()) {
+
3653 m_state = state_t::fail;
+
3654 return 0;
+
3655 }
+
3656 fsize_t result = m_files[0]->size();
+
3657 m_state = m_files[0]->state();
+
3658 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
3659 if (m_files[i]->size() != result)
+
3660 throw std::runtime_error("size mismatch");
+
3661 if (m_files[i]->state() != m_state)
+
3662 throw std::runtime_error("state mismatch");
+
3663 }
+
3664 return result;
+
3665 }
+
3666
+
3667 virtual void truncate()
+
3668 {
+
3669 if (m_files.empty())
+
3670 m_state = state_t::fail;
+
3671 m_files[0]->truncate();
+
3672 m_state = m_files[0]->state();
+
3673 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
3674 m_files[i]->truncate();
+
3675 if (m_files[i]->state() != m_state)
+
3676 throw std::runtime_error("state mismatch");
+
3677 }
+
3678 }
+
3679
+
3680 protected:
+
3681 std::vector<basic_file*> m_files;
+
3682 std::vector<uint8_t> m_tmp;
+
3683 };
+
3684 }
+
3685}
Provides read-ahead stream capability.
Definition stream.hpp:1070
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:1084
Provides write-back stream capability.
Definition stream.hpp:1138
@@ -3286,11 +3307,11 @@ $(function() {
fpos_t seekend(foff_t offset)
Seeks to relative from end file position.
Definition stream.hpp:695
virtual void set_atime(time_point date)
Sets file access time.
Definition stream.hpp:777
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:1982
-
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:2040
-
virtual void flush()
Persists volatile element data.
Definition stream.hpp:2098
-
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:1989
-
virtual void close()
Closes the stream.
Definition stream.hpp:2087
+
OS data stream (file, pipe, socket...)
Definition stream.hpp:1998
+
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:2056
+
virtual void flush()
Persists volatile element data.
Definition stream.hpp:2114
+
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:2005
+
virtual void close()
Closes the stream.
Definition stream.hpp:2103
‍UTF-8 byte-order-mark
Definition stream.hpp:71
bool ok() const
Returns true if the stream state is clean i.e. previous operation was succesful.
Definition stream.hpp:165
size_t write_vsprintf(_Printf_format_string_params_(2) const char *format, locale_t locale, va_list params)
Writes formatted string to the stream.
Definition stream.hpp:555
@@ -3324,49 +3345,49 @@ $(function() {
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1312
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:1230
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:1266
-
Buffered OS data stream (file, pipe, socket...)
Definition stream.hpp:2112
+
Buffered OS data stream (file, pipe, socket...)
Definition stream.hpp:2128
Cached file.
Definition stream.hpp:1629
-
virtual time_point ctime() const
Returns file creation time.
Definition stream.hpp:1861
-
fpos_t m_offset
Logical absolute file position.
Definition stream.hpp:1970
-
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:1839
-
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:1669
-
virtual time_point atime() const
Returns file access time.
Definition stream.hpp:1866
-
virtual fsize_t size()
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:1834
-
virtual void unlock(fpos_t offset, fsize_t length)
Unlocks file section for exclusive access.
Definition stream.hpp:1828
-
virtual time_point mtime() const
Returns file modification time.
Definition stream.hpp:1875
-
virtual void close()
Closes the stream.
Definition stream.hpp:1784
-
virtual void set_mtime(time_point date)
Sets file modification time.
Definition stream.hpp:1897
-
virtual void lock(fpos_t offset, fsize_t length)
Locks file section for exclusive access.
Definition stream.hpp:1822
-
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1791
-
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:1731
-
virtual void set_ctime(time_point date)
Sets file create time.
Definition stream.hpp:1884
-
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:1817
-
virtual void set_atime(time_point date)
Sets file access time.
Definition stream.hpp:1889
-
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:1802
-
Cached file-system file.
Definition stream.hpp:2660
-
cached_file(const sys_char *filename, int mode, size_t cache_size=default_cache_size)
Opens file.
Definition stream.hpp:2676
-
void open(const sys_char *filename, int mode)
Opens file.
Definition stream.hpp:2690
+
virtual time_point ctime() const
Returns file creation time.
Definition stream.hpp:1870
+
fpos_t m_offset
Logical absolute file position.
Definition stream.hpp:1986
+
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:1849
+
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:1675
+
virtual time_point atime() const
Returns file access time.
Definition stream.hpp:1875
+
virtual fsize_t size()
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:1842
+
virtual void unlock(fpos_t offset, fsize_t length)
Unlocks file section for exclusive access.
Definition stream.hpp:1836
+
virtual time_point mtime() const
Returns file modification time.
Definition stream.hpp:1884
+
virtual void close()
Closes the stream.
Definition stream.hpp:1790
+
virtual void set_mtime(time_point date)
Sets file modification time.
Definition stream.hpp:1906
+
virtual void lock(fpos_t offset, fsize_t length)
Locks file section for exclusive access.
Definition stream.hpp:1830
+
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1799
+
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:1737
+
virtual void set_ctime(time_point date)
Sets file create time.
Definition stream.hpp:1893
+
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:1825
+
virtual void set_atime(time_point date)
Sets file access time.
Definition stream.hpp:1898
+
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:1810
+
Cached file-system file.
Definition stream.hpp:2676
+
cached_file(const sys_char *filename, int mode, size_t cache_size=default_cache_size)
Opens file.
Definition stream.hpp:2692
+
void open(const sys_char *filename, int mode)
Opens file.
Definition stream.hpp:2706
Modifies data on the fly when reading from/writing to a source stream.
Definition stream.hpp:847
virtual void flush()
Persists volatile element data.
Definition stream.hpp:888
virtual void close()
Closes the stream.
Definition stream.hpp:882
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:866
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:874
-
Compares multiple files to perform the same.
Definition stream.hpp:3493
-
virtual fsize_t size()
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:3629
-
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:3646
-
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:3524
-
virtual void close()
Closes the stream.
Definition stream.hpp:3557
-
virtual void lock(fpos_t offset, fsize_t length)
Locks file section for exclusive access.
Definition stream.hpp:3603
-
virtual void unlock(fpos_t offset, fsize_t length)
Unlocks file section for exclusive access.
Definition stream.hpp:3616
-
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:3574
-
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:3591
-
virtual void flush()
Persists volatile element data.
Definition stream.hpp:3542
-
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:3501
-
In-memory FIFO queue.
Definition stream.hpp:3393
-
virtual void close()
Closes the stream.
Definition stream.hpp:3464
-
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:3441
-
size_t size() const
Returns total size of pending data in the queue.
Definition stream.hpp:3478
-
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:3412
+
Compares multiple files to perform the same.
Definition stream.hpp:3514
+
virtual fsize_t size()
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:3650
+
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:3667
+
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:3545
+
virtual void close()
Closes the stream.
Definition stream.hpp:3578
+
virtual void lock(fpos_t offset, fsize_t length)
Locks file section for exclusive access.
Definition stream.hpp:3624
+
virtual void unlock(fpos_t offset, fsize_t length)
Unlocks file section for exclusive access.
Definition stream.hpp:3637
+
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:3595
+
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:3612
+
virtual void flush()
Persists volatile element data.
Definition stream.hpp:3563
+
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:3522
+
In-memory FIFO queue.
Definition stream.hpp:3414
+
virtual void close()
Closes the stream.
Definition stream.hpp:3485
+
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:3462
+
size_t size() const
Returns total size of pending data in the queue.
Definition stream.hpp:3499
+
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:3433
Limits file reading/writing to a predefined window.
Definition stream.hpp:1519
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:1612
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1562
@@ -3379,55 +3400,55 @@ $(function() {
virtual void unlock(fpos_t offset, fsize_t length)
Unlocks file section for exclusive access.
Definition stream.hpp:1597
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:1581
virtual void close()
Closes the stream.
Definition stream.hpp:1556
-
File-system file.
Definition stream.hpp:2350
-
virtual time_point mtime() const
Returns file modification time.
Definition stream.hpp:2593
-
virtual void unlock(fpos_t offset, fsize_t length)
Unlocks file section for exclusive access.
Definition stream.hpp:2486
-
file(const sys_char *filename, int mode)
Opens file.
Definition stream.hpp:2360
-
virtual void set_ctime(time_point date)
Sets file create time.
Definition stream.hpp:2607
-
virtual time_point atime() const
Returns file access time.
Definition stream.hpp:2579
-
virtual void set_mtime(time_point date)
Sets file modification time.
Definition stream.hpp:2637
-
virtual void set_atime(time_point date)
Sets file access time.
Definition stream.hpp:2619
-
void open(const sys_char *filename, int mode)
Opens file.
Definition stream.hpp:2371
-
virtual void lock(fpos_t offset, fsize_t length)
Locks file section for exclusive access.
Definition stream.hpp:2463
-
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:2529
-
virtual time_point ctime() const
Returns file creation time.
Definition stream.hpp:2569
-
virtual fsize_t size()
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:2511
-
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:2424
-
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:2445
+
File-system file.
Definition stream.hpp:2366
+
virtual time_point mtime() const
Returns file modification time.
Definition stream.hpp:2609
+
virtual void unlock(fpos_t offset, fsize_t length)
Unlocks file section for exclusive access.
Definition stream.hpp:2502
+
file(const sys_char *filename, int mode)
Opens file.
Definition stream.hpp:2376
+
virtual void set_ctime(time_point date)
Sets file create time.
Definition stream.hpp:2623
+
virtual time_point atime() const
Returns file access time.
Definition stream.hpp:2595
+
virtual void set_mtime(time_point date)
Sets file modification time.
Definition stream.hpp:2653
+
virtual void set_atime(time_point date)
Sets file access time.
Definition stream.hpp:2635
+
void open(const sys_char *filename, int mode)
Opens file.
Definition stream.hpp:2387
+
virtual void lock(fpos_t offset, fsize_t length)
Locks file section for exclusive access.
Definition stream.hpp:2479
+
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:2545
+
virtual time_point ctime() const
Returns file creation time.
Definition stream.hpp:2585
+
virtual fsize_t size()
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:2527
+
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:2440
+
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:2461
Limits reading from/writing to stream to a predefined number of bytes.
Definition stream.hpp:1360
fsize_t read_limit
Number of bytes left that may be read from the stream.
Definition stream.hpp:1420
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:1368
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:1393
fsize_t write_limit
Number of bytes left, that can be written to the stream.
Definition stream.hpp:1421
-
In-memory file.
Definition stream.hpp:2713
-
void load(const sys_char *filename, int mode)
Loads content from a file-system file.
Definition stream.hpp:2837
-
size_t m_size
file size
Definition stream.hpp:3380
-
void get(fpos_t offset, T &data)
Reads data from specified file location This does not move file pointer. It checks for data size asse...
Definition stream.hpp:3313
-
size_t write_stream(basic &stream, size_t amount=SIZE_MAX)
Writes content of another stream.
Definition stream.hpp:3135
-
uint8_t * m_data
file data
Definition stream.hpp:3377
-
memory_file & read_data(T &data)
Reads one primitive data type.
Definition stream.hpp:2934
-
virtual void close()
Closes the stream.
Definition stream.hpp:3185
-
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:2895
-
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:3216
-
size_t m_reserved
reserved file size
Definition stream.hpp:3381
-
memory_file(size_t size, state_t state=state_t::ok)
Creates an empty file of reserved size.
Definition stream.hpp:2734
-
void reserve(size_t required, bool tight=false) noexcept
Reallocates memory.
Definition stream.hpp:2808
-
memory_file & read_str(std::basic_string< _Elem, _Traits, _Ax > &data)
Reads length-prefixed string from the stream.
Definition stream.hpp:2974
-
void write_byte(uint8_t byte, size_t amount=1)
Writes a byte of data.
Definition stream.hpp:3029
-
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:3276
-
size_t m_offset
file pointer
Definition stream.hpp:3379
-
memory_file(const sys_char *filename, int mode)
Loads content from file-system file.
Definition stream.hpp:2791
-
virtual fsize_t size()
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:3221
-
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:3199
-
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:3226
-
memory_file & write_data(const T data)
Writes one primitive data type.
Definition stream.hpp:3062
-
memory_file & write_str(const T *data)
Writes string to the stream length-prefixed.
Definition stream.hpp:3100
-
bool m_manage
may reallocate m_data?
Definition stream.hpp:3378
-
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:2781
-
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:3005
-
void save(const sys_char *filename, int mode)
Saves content to a file-system file.
Definition stream.hpp:2870
-
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:2758
-
const void * data() const
Returns pointer to data.
Definition stream.hpp:2893
+
In-memory file.
Definition stream.hpp:2734
+
void load(const sys_char *filename, int mode)
Loads content from a file-system file.
Definition stream.hpp:2858
+
size_t m_size
file size
Definition stream.hpp:3401
+
void get(fpos_t offset, T &data)
Reads data from specified file location This does not move file pointer. It checks for data size asse...
Definition stream.hpp:3334
+
size_t write_stream(basic &stream, size_t amount=SIZE_MAX)
Writes content of another stream.
Definition stream.hpp:3156
+
uint8_t * m_data
file data
Definition stream.hpp:3398
+
memory_file & read_data(T &data)
Reads one primitive data type.
Definition stream.hpp:2955
+
virtual void close()
Closes the stream.
Definition stream.hpp:3206
+
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:2916
+
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:3237
+
size_t m_reserved
reserved file size
Definition stream.hpp:3402
+
memory_file(size_t size, state_t state=state_t::ok)
Creates an empty file of reserved size.
Definition stream.hpp:2755
+
void reserve(size_t required, bool tight=false) noexcept
Reallocates memory.
Definition stream.hpp:2829
+
memory_file & read_str(std::basic_string< _Elem, _Traits, _Ax > &data)
Reads length-prefixed string from the stream.
Definition stream.hpp:2995
+
void write_byte(uint8_t byte, size_t amount=1)
Writes a byte of data.
Definition stream.hpp:3050
+
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:3297
+
size_t m_offset
file pointer
Definition stream.hpp:3400
+
memory_file(const sys_char *filename, int mode)
Loads content from file-system file.
Definition stream.hpp:2812
+
virtual fsize_t size()
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:3242
+
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:3220
+
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:3247
+
memory_file & write_data(const T data)
Writes one primitive data type.
Definition stream.hpp:3083
+
memory_file & write_str(const T *data)
Writes string to the stream length-prefixed.
Definition stream.hpp:3121
+
bool m_manage
may reallocate m_data?
Definition stream.hpp:3399
+
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:2802
+
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:3026
+
void save(const sys_char *filename, int mode)
Saves content to a file-system file.
Definition stream.hpp:2891
+
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:2779
+
const void * data() const
Returns pointer to data.
Definition stream.hpp:2914
Definition stream.hpp:985
enum stdex::stream::replicator::worker::op_t op
Operation to perform.
size_t num_written
Number of bytes written.
Definition stream.hpp:1032
@@ -3444,8 +3465,8 @@ $(function() {
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:1469
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:1436
fpos_t read_offset
Number of bytes to skip on read.
Definition stream.hpp:1511
-
Operating system object (file, pipe, anything with an OS handle etc.)
Definition system.hpp:57
-
virtual void close()
Closes object.
Definition system.hpp:98
+
Operating system object (file, pipe, anything with an OS handle etc.)
Definition system.hpp:63
+
virtual void close()
Closes object.
Definition system.hpp:104
Numerical interval.
Definition interval.hpp:18
bool contains(T x) const
Is value in interval?
Definition interval.hpp:88
bool empty() const
Is interval empty?
Definition interval.hpp:54
@@ -3453,13 +3474,13 @@ $(function() {
T end
interval end
Definition interval.hpp:20
T start
interval start
Definition interval.hpp:19
Definition stream.hpp:1337
-
Definition stream.hpp:1948
-
interval< fpos_t > region
valid data region
Definition stream.hpp:1956
-
Definition stream.hpp:3482
+
Definition stream.hpp:1964
+
interval< fpos_t > region
valid data region
Definition stream.hpp:1972
+
Definition stream.hpp:3503
diff --git a/string_8hpp_source.html b/string_8hpp_source.html index 4ac090807..460d32ae7 100644 --- a/string_8hpp_source.html +++ b/string_8hpp_source.html @@ -798,7 +798,7 @@ $(function() { diff --git a/structstdex_1_1chrono_1_1aosn__clock-members.html b/structstdex_1_1chrono_1_1aosn__clock-members.html index 7be1f573a..65ae782bd 100644 --- a/structstdex_1_1chrono_1_1aosn__clock-members.html +++ b/structstdex_1_1chrono_1_1aosn__clock-members.html @@ -105,7 +105,7 @@ $(function() { diff --git a/structstdex_1_1chrono_1_1aosn__clock.html b/structstdex_1_1chrono_1_1aosn__clock.html index d8ba608b9..07743778b 100644 --- a/structstdex_1_1chrono_1_1aosn__clock.html +++ b/structstdex_1_1chrono_1_1aosn__clock.html @@ -165,7 +165,7 @@ static constexpr rep week< diff --git a/structstdex_1_1interval-members.html b/structstdex_1_1interval-members.html index c5a71ef18..29f98288a 100644 --- a/structstdex_1_1interval-members.html +++ b/structstdex_1_1interval-members.html @@ -94,7 +94,7 @@ $(function() { diff --git a/structstdex_1_1interval.html b/structstdex_1_1interval.html index 50c8c21ca..edda5e70e 100644 --- a/structstdex_1_1interval.html +++ b/structstdex_1_1interval.html @@ -424,7 +424,7 @@ template<class T > diff --git a/structstdex_1_1mapping-members.html b/structstdex_1_1mapping-members.html index a6d47b85a..da7edbbf5 100644 --- a/structstdex_1_1mapping-members.html +++ b/structstdex_1_1mapping-members.html @@ -90,7 +90,7 @@ $(function() { diff --git a/structstdex_1_1mapping.html b/structstdex_1_1mapping.html index c44f276bd..aa569fbd5 100644 --- a/structstdex_1_1mapping.html +++ b/structstdex_1_1mapping.html @@ -283,7 +283,7 @@ template<class T > diff --git a/structstdex_1_1no__delete-members.html b/structstdex_1_1no__delete-members.html index 9d546abaa..b332a1a4d 100644 --- a/structstdex_1_1no__delete-members.html +++ b/structstdex_1_1no__delete-members.html @@ -86,7 +86,7 @@ $(function() { diff --git a/structstdex_1_1no__delete.html b/structstdex_1_1no__delete.html index c963f39f6..e45cac235 100644 --- a/structstdex_1_1no__delete.html +++ b/structstdex_1_1no__delete.html @@ -105,7 +105,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 c1f19850d..386c9d89a 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 @@ -86,7 +86,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 71cdef1fc..ee12627f5 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 @@ -106,7 +106,7 @@ struct stdex::no_delete< T[]>

Noop array deleter.

diff --git a/structstdex_1_1parser_1_1http__factor__more-members.html b/structstdex_1_1parser_1_1http__factor__more-members.html index 6c754cffe..295a88c84 100644 --- a/structstdex_1_1parser_1_1http__factor__more-members.html +++ b/structstdex_1_1parser_1_1http__factor__more-members.html @@ -84,7 +84,7 @@ $(function() { diff --git a/structstdex_1_1parser_1_1http__factor__more.html b/structstdex_1_1parser_1_1http__factor__more.html index c757aec8b..1249a92e4 100644 --- a/structstdex_1_1parser_1_1http__factor__more.html +++ b/structstdex_1_1parser_1_1http__factor__more.html @@ -93,7 +93,7 @@ constexpr bool operator()< 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 3737c0b57..cedd3369e 100644 --- a/structstdex_1_1stream_1_1buffer_1_1buffer__t-members.html +++ b/structstdex_1_1stream_1_1buffer_1_1buffer__t-members.html @@ -89,7 +89,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 988a30d9e..3c8bacfbe 100644 --- a/structstdex_1_1stream_1_1buffer_1_1buffer__t.html +++ b/structstdex_1_1stream_1_1buffer_1_1buffer__t.html @@ -109,7 +109,7 @@ size_t capacity diff --git a/structstdex_1_1stream_1_1cache_1_1cache__t-members.html b/structstdex_1_1stream_1_1cache_1_1cache__t-members.html index 89f793693..96dad22a8 100644 --- a/structstdex_1_1stream_1_1cache_1_1cache__t-members.html +++ b/structstdex_1_1stream_1_1cache_1_1cache__t-members.html @@ -90,7 +90,7 @@ $(function() { diff --git a/structstdex_1_1stream_1_1cache_1_1cache__t.html b/structstdex_1_1stream_1_1cache_1_1cache__t.html index b804739f1..f706decbd 100644 --- a/structstdex_1_1stream_1_1cache_1_1cache__t.html +++ b/structstdex_1_1stream_1_1cache_1_1cache__t.html @@ -119,7 +119,7 @@ enum stdex::stream::cache::cache_t::status_t  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 d0f86d249..bb2d9da7c 100644 --- a/structstdex_1_1stream_1_1fifo_1_1node__t-members.html +++ b/structstdex_1_1stream_1_1fifo_1_1node__t-members.html @@ -86,7 +86,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 f5de38c8e..0ed66a2af 100644 --- a/structstdex_1_1stream_1_1fifo_1_1node__t.html +++ b/structstdex_1_1stream_1_1fifo_1_1node__t.html @@ -99,7 +99,7 @@ uint8_t data [0]< diff --git a/system_8hpp_source.html b/system_8hpp_source.html index 766330fa7..3a7d84e6e 100644 --- a/system_8hpp_source.html +++ b/system_8hpp_source.html @@ -95,165 +95,168 @@ $(function() {
16#include "sal.hpp"
17#include <assert.h>
18#include <stdexcept>
-
19
-
20// In case somebody #included <windows.h> before us and didn't #define NOMINMAX
-
21#ifdef _WIN32
-
22#ifdef min
-
23#undef min
-
24#endif
-
25#ifdef max
-
26#undef max
-
27#endif
+
19#include <string>
+
20
+
21// In case somebody #included <windows.h> before us and didn't #define NOMINMAX
+
22#ifdef _WIN32
+
23#ifdef min
+
24#undef min
+
25#endif
+
26#ifdef max
+
27#undef max
28#endif
-
29
-
30namespace stdex
-
31{
-
35#if defined(_WIN32)
-
36 using sys_handle = HANDLE;
-
37 const sys_handle invalid_handle = INVALID_HANDLE_VALUE;
-
38#else
-
39 using sys_handle = int;
-
40 const sys_handle invalid_handle = (sys_handle)-1;
-
41#endif
-
42
-
46#if defined(_WIN32)
-
47 using sys_char = TCHAR;
-
48#else
-
49 using sys_char = char;
-
50#define _T(x) x
-
51#endif
-
52
- -
57 {
-
58 public:
-
59 sys_object(_In_opt_ sys_handle h = invalid_handle) : m_h(h) {}
-
60
-
61 sys_object(_In_ const sys_object& other) : m_h(other.m_h != invalid_handle ? duplicate(other.m_h, false) : invalid_handle) {}
-
62
-
63 sys_object& operator =(_In_ const sys_object& other)
-
64 {
-
65 if (this != std::addressof(other)) {
-
66 if (m_h != invalid_handle)
-
67 close(m_h);
-
68 m_h = other.m_h != invalid_handle ? duplicate(other.m_h, false) : invalid_handle;
-
69 }
-
70 return *this;
-
71 }
-
72
-
73 sys_object(_Inout_ sys_object&& other) noexcept : m_h(other.m_h)
-
74 {
-
75 other.m_h = invalid_handle;
-
76 }
-
77
-
78 sys_object& operator =(_Inout_ sys_object&& other) noexcept
-
79 {
-
80 if (this != std::addressof(other)) {
-
81 if (m_h != invalid_handle)
-
82 close(m_h);
-
83 m_h = other.m_h;
-
84 other.m_h = invalid_handle;
-
85 }
-
86 return *this;
-
87 }
-
88
-
89 virtual ~sys_object()
-
90 {
-
91 if (m_h != invalid_handle)
-
92 close(m_h);
+
29#endif
+
30
+
31namespace stdex
+
32{
+
36#if defined(_WIN32)
+
37 using sys_handle = HANDLE;
+
38 const sys_handle invalid_handle = INVALID_HANDLE_VALUE;
+
39#else
+
40 using sys_handle = int;
+
41 const sys_handle invalid_handle = (sys_handle)-1;
+
42#endif
+
43
+
47#if defined(_WIN32)
+
48 using sys_char = TCHAR;
+
49#else
+
50 using sys_char = char;
+
51#define _T(x) x
+
52#endif
+
53
+
57 using sys_string = std::basic_string<stdex::sys_char>;
+
58
+ +
63 {
+
64 public:
+
65 sys_object(_In_opt_ sys_handle h = invalid_handle) : m_h(h) {}
+
66
+
67 sys_object(_In_ const sys_object& other) : m_h(other.m_h != invalid_handle ? duplicate(other.m_h, false) : invalid_handle) {}
+
68
+
69 sys_object& operator =(_In_ const sys_object& other)
+
70 {
+
71 if (this != std::addressof(other)) {
+
72 if (m_h != invalid_handle)
+
73 close(m_h);
+
74 m_h = other.m_h != invalid_handle ? duplicate(other.m_h, false) : invalid_handle;
+
75 }
+
76 return *this;
+
77 }
+
78
+
79 sys_object(_Inout_ sys_object&& other) noexcept : m_h(other.m_h)
+
80 {
+
81 other.m_h = invalid_handle;
+
82 }
+
83
+
84 sys_object& operator =(_Inout_ sys_object&& other) noexcept
+
85 {
+
86 if (this != std::addressof(other)) {
+
87 if (m_h != invalid_handle)
+
88 close(m_h);
+
89 m_h = other.m_h;
+
90 other.m_h = invalid_handle;
+
91 }
+
92 return *this;
93 }
94
-
98 virtual void close()
-
99 {
-
100 if (m_h != invalid_handle) {
-
101 close(m_h);
-
102 m_h = invalid_handle;
-
103 }
-
104 }
-
105
-
109 inline operator bool() const noexcept { return m_h != invalid_handle; }
-
110
-
114 inline sys_handle get() const noexcept { return m_h; }
-
115
-
116 protected:
-
120 static void close(sys_handle h)
-
121 {
-
122#ifdef _WIN32
-
123 if (CloseHandle(h) || GetLastError() == ERROR_INVALID_HANDLE)
-
124#else
-
125 if (close(h) >= 0 || errno == EBADF)
-
126#endif
-
127 return;
-
128 throw std::runtime_error("failed to close handle");
-
129 }
-
130
-
134 static sys_handle duplicate(_In_ sys_handle h, _In_ bool inherit)
-
135 {
-
136 sys_handle h_new;
-
137#ifdef _WIN32
-
138 HANDLE process = GetCurrentProcess();
-
139 if (DuplicateHandle(process, h, process, &h_new, 0, inherit, DUPLICATE_SAME_ACCESS))
-
140#else
-
141 UNREFERENCED_PARAMETER(inherit);
-
142 if ((h_new = dup(h)) >= 0)
-
143#endif
-
144 return h_new;
-
145 throw std::runtime_error("failed to duplicate handle");
-
146 }
-
147
-
148 protected:
-
149 sys_handle m_h;
-
150 };
-
151
-
152#ifdef _WIN32
-
153 template <class T>
-
154 class safearray_accessor
-
155 {
-
156 public:
-
157 safearray_accessor(_In_ LPSAFEARRAY sa) : m_sa(sa)
-
158 {
-
159 HRESULT hr = SafeArrayAccessData(sa, reinterpret_cast<void HUGEP**>(&m_data));
-
160 if (FAILED(hr))
-
161 throw std::invalid_argument("SafeArrayAccessData failed");
-
162 }
-
163
-
164 ~safearray_accessor()
-
165 {
-
166 SafeArrayUnaccessData(m_sa);
-
167 }
-
168
-
169 T* data() const { return m_data; }
-
170
-
171 protected:
-
172 LPSAFEARRAY m_sa;
-
173 T* m_data;
-
174 };
-
175
-
179 struct SafeArrayDestroy_delete
-
180 {
-
184 void operator()(_In_ LPSAFEARRAY sa) const
-
185 {
-
186 SafeArrayDestroy(sa);
-
187 }
-
188 };
-
189
-
193 struct SysFreeString_delete
-
194 {
-
198 void operator()(_In_ BSTR sa) const
-
199 {
-
200 SysFreeString(sa);
-
201 }
-
202 };
-
203#endif
-
204}
-
Operating system object (file, pipe, anything with an OS handle etc.)
Definition system.hpp:57
-
sys_handle get() const noexcept
Returns object handle.
Definition system.hpp:114
-
virtual void close()
Closes object.
Definition system.hpp:98
-
static sys_handle duplicate(sys_handle h, bool inherit)
Duplicates given object.
Definition system.hpp:134
-
static void close(sys_handle h)
Closes object.
Definition system.hpp:120
+
95 virtual ~sys_object()
+
96 {
+
97 if (m_h != invalid_handle)
+
98 close(m_h);
+
99 }
+
100
+
104 virtual void close()
+
105 {
+
106 if (m_h != invalid_handle) {
+
107 close(m_h);
+
108 m_h = invalid_handle;
+
109 }
+
110 }
+
111
+
115 inline operator bool() const noexcept { return m_h != invalid_handle; }
+
116
+
120 inline sys_handle get() const noexcept { return m_h; }
+
121
+
122 protected:
+
126 static void close(sys_handle h)
+
127 {
+
128#ifdef _WIN32
+
129 if (CloseHandle(h) || GetLastError() == ERROR_INVALID_HANDLE)
+
130#else
+
131 if (close(h) >= 0 || errno == EBADF)
+
132#endif
+
133 return;
+
134 throw std::runtime_error("failed to close handle");
+
135 }
+
136
+
140 static sys_handle duplicate(_In_ sys_handle h, _In_ bool inherit)
+
141 {
+
142 sys_handle h_new;
+
143#ifdef _WIN32
+
144 HANDLE process = GetCurrentProcess();
+
145 if (DuplicateHandle(process, h, process, &h_new, 0, inherit, DUPLICATE_SAME_ACCESS))
+
146#else
+
147 UNREFERENCED_PARAMETER(inherit);
+
148 if ((h_new = dup(h)) >= 0)
+
149#endif
+
150 return h_new;
+
151 throw std::runtime_error("failed to duplicate handle");
+
152 }
+
153
+
154 protected:
+
155 sys_handle m_h;
+
156 };
+
157
+
158#ifdef _WIN32
+
159 template <class T>
+
160 class safearray_accessor
+
161 {
+
162 public:
+
163 safearray_accessor(_In_ LPSAFEARRAY sa) : m_sa(sa)
+
164 {
+
165 HRESULT hr = SafeArrayAccessData(sa, reinterpret_cast<void HUGEP**>(&m_data));
+
166 if (FAILED(hr))
+
167 throw std::invalid_argument("SafeArrayAccessData failed");
+
168 }
+
169
+
170 ~safearray_accessor()
+
171 {
+
172 SafeArrayUnaccessData(m_sa);
+
173 }
+
174
+
175 T* data() const { return m_data; }
+
176
+
177 protected:
+
178 LPSAFEARRAY m_sa;
+
179 T* m_data;
+
180 };
+
181
+
185 struct SafeArrayDestroy_delete
+
186 {
+
190 void operator()(_In_ LPSAFEARRAY sa) const
+
191 {
+
192 SafeArrayDestroy(sa);
+
193 }
+
194 };
+
195
+
199 struct SysFreeString_delete
+
200 {
+
204 void operator()(_In_ BSTR sa) const
+
205 {
+
206 SysFreeString(sa);
+
207 }
+
208 };
+
209#endif
+
210}
+
Operating system object (file, pipe, anything with an OS handle etc.)
Definition system.hpp:63
+
sys_handle get() const noexcept
Returns object handle.
Definition system.hpp:120
+
virtual void close()
Closes object.
Definition system.hpp:104
+
static sys_handle duplicate(sys_handle h, bool inherit)
Duplicates given object.
Definition system.hpp:140
+
static void close(sys_handle h)
Closes object.
Definition system.hpp:126
diff --git a/unicode_8hpp_source.html b/unicode_8hpp_source.html index 90220f1cd..167da18b6 100644 --- a/unicode_8hpp_source.html +++ b/unicode_8hpp_source.html @@ -215,7 +215,7 @@ $(function() { diff --git a/vector__queue_8hpp_source.html b/vector__queue_8hpp_source.html index 42989ef0e..f040d7096 100644 --- a/vector__queue_8hpp_source.html +++ b/vector__queue_8hpp_source.html @@ -386,7 +386,7 @@ $(function() {