diff --git a/_unit_tests_2compat_8hpp_source.html b/_unit_tests_2compat_8hpp_source.html index deadcc8aa..ce2b4f4ca 100644 --- a/_unit_tests_2compat_8hpp_source.html +++ b/_unit_tests_2compat_8hpp_source.html @@ -191,7 +191,7 @@ $(function(){ initResizable(false); }); diff --git a/annotated.html b/annotated.html index b1a1f7492..4d488d432 100644 --- a/annotated.html +++ b/annotated.html @@ -315,7 +315,7 @@ $(function(){ initResizable(false); }); diff --git a/assert_8hpp_source.html b/assert_8hpp_source.html index 08dfafffe..b083abbbd 100644 --- a/assert_8hpp_source.html +++ b/assert_8hpp_source.html @@ -160,7 +160,7 @@ $(function(){ initResizable(false); }); diff --git a/base64_8hpp_source.html b/base64_8hpp_source.html index c96daffff..fc75b0fa1 100644 --- a/base64_8hpp_source.html +++ b/base64_8hpp_source.html @@ -554,11 +554,11 @@ $(function(){ initResizable(false); });
stdex::stream::basic::ok
bool ok() const
Returns true if the stream state is clean i.e. previous operation was successful.
Definition stream.hpp:181
stdex::stream::basic::state
state_t state() const
Returns stream state after last operation.
Definition stream.hpp:176
stdex::stream::basic::write_array
size_t write_array(_In_reads_bytes_opt_(size *count) const void *array, size_t size, size_t count)
Writes an array of data to the stream.
Definition stream.hpp:394
-
stdex::stream::converter
Modifies data on the fly when reading from/writing to a source stream. Could also be used to modify r...
Definition stream.hpp:1024
+
stdex::stream::converter
Modifies data on the fly when reading from/writing to a source stream. Could also be used to modify r...
Definition stream.hpp:1020
diff --git a/chrono_8hpp_source.html b/chrono_8hpp_source.html index 2c38d9cc4..4d9221ccb 100644 --- a/chrono_8hpp_source.html +++ b/chrono_8hpp_source.html @@ -178,306 +178,377 @@ $(function(){ initResizable(false); });
100#endif
101
-
-
105 static time_point from_dmy(_In_ uint8_t day, _In_ uint8_t month, _In_ int32_t year) noexcept
-
106 {
-
107 int32_t mtmp, ytmp;
-
108 if (month > 2) {
-
109 mtmp = month - 3;
-
110 ytmp = year;
-
111 }
-
112 else {
-
113 mtmp = month + 9;
-
114 ytmp = year - 1;
-
115 }
-
116 int32_t ctmp = (ytmp / 100);
-
117 int32_t dtmp = ytmp - (100 * ctmp);
-
118 int32_t result1 = 146097L * ctmp / 4;
-
119 int32_t result2 = (1461 * dtmp) / 4;
-
120 int32_t result3 = (153 * mtmp + 2) / 5;
-
121 return time_point(duration(static_cast<int32_t>(result1) + day + result2 + 1721119L + result3));
-
122 }
-
-
123
-
-
127 static void to_dmy(_In_ const time_point tp, _Out_opt_ uint8_t* day, _Out_opt_ uint8_t* month, _Out_opt_ int32_t* year) noexcept
-
128 {
-
129 int32_t mtmp = tp.time_since_epoch().count() - 1721119L;
-
130 int32_t yr = (4 * mtmp - 1) / 146097L;
-
131 mtmp = 4 * mtmp - 1 - 146097L * yr;
-
132 int32_t da = mtmp / 4;
-
133 mtmp = (4 * da + 3) / 1461;
-
134 da = 4 * da + 3 - 1461 * mtmp;
-
135 da = (da + 4) / 4;
-
136 int32_t mo = (5 * da - 3) / 153;
-
137 da = 5 * da - 3 - 153 * mo;
-
138 da = (da + 5) / 5;
-
139 yr = 100 * yr + mtmp;
-
140 if (mo < 10)
-
141 mo += 3;
-
142 else {
-
143 mo -= 9;
-
144 yr++;
-
145 }
-
146 if (day) *day = static_cast<uint8_t>(da);
-
147 if (month) *month = static_cast<uint8_t>(mo);
-
148 if (year) *year = yr;
-
149 }
-
-
150
-
-
154 static uint8_t day_of_week(_In_ const time_point tp)
-
155 {
-
156 return static_cast<uint8_t>(tp.time_since_epoch().count() % 7);
-
157 }
-
-
158
-
-
162 static uint8_t day_of_week(_In_ uint8_t day, _In_ uint8_t month, _In_ int32_t year)
-
163 {
-
164 return static_cast<uint8_t>(from_dmy(day, month, year).time_since_epoch().count() % 7);
+
102#ifdef _WIN32
+
106 static void to_system(_In_ time_point tp, _Out_ SYSTEMTIME& t)
+
107 {
+
108 uint8_t day, month;
+
109 int32_t year;
+
110 to_dmy(tp, &day, &month, &year);
+
111 t.wDay = day;
+
112 t.wMonth = month;
+
113 if (year > WORD_MAX) _Unlikely_
+
114 throw std::range_error("year too big");
+
115 t.wYear = static_cast<WORD>(year);
+
116 t.wDayOfWeek = static_cast<int>(day_of_week(tp) + 1) % 7;
+
117 t.wHour = 0;
+
118 t.wMinute = 0;
+
119 t.wSecond = 0;
+
120 t.wMilliseconds = 0;
+
121 }
+
122
+
126 static void to_system(_In_ time_point tp, _Out_ FILETIME& t) noexcept
+
127 {
+
128 uint64_t x = (tp.time_since_epoch().count() - 2305814) * 864000000000; // Adjust epoch and convert 1-day interval to 100 ns
+
129 t.dwHighDateTime = static_cast<DWORD>(x >> 32);
+
130 t.dwLowDateTime = static_cast<DWORD>(x & 0xffffffff);
+
131 }
+
132
+
136 static void to_system(_In_ time_point tp, _Out_ DATE& t)
+
137 {
+
138 SYSTEMTIME st;
+
139 to_system(tp, st);
+
140 if (!SystemTimeToVariantTime(&st, &t))
+
141 throw std::invalid_argument("failed to convert date to VARIANT_DATE");
+
142 }
+
143#endif
+
144
+
+
148 static time_point from_dmy(_In_ uint8_t day, _In_ uint8_t month, _In_ int32_t year) noexcept
+
149 {
+
150 int32_t mtmp, ytmp;
+
151 if (month > 2) {
+
152 mtmp = month - 3;
+
153 ytmp = year;
+
154 }
+
155 else {
+
156 mtmp = month + 9;
+
157 ytmp = year - 1;
+
158 }
+
159 int32_t ctmp = (ytmp / 100);
+
160 int32_t dtmp = ytmp - (100 * ctmp);
+
161 int32_t result1 = 146097L * ctmp / 4;
+
162 int32_t result2 = (1461 * dtmp) / 4;
+
163 int32_t result3 = (153 * mtmp + 2) / 5;
+
164 return time_point(duration(static_cast<int32_t>(result1) + day + result2 + 1721119L + result3));
165 }
-
166 };
+
166
+
+
170 static void to_dmy(_In_ const time_point tp, _Out_opt_ uint8_t* day, _Out_opt_ uint8_t* month, _Out_opt_ int32_t* year) noexcept
+
171 {
+
172 int32_t mtmp = tp.time_since_epoch().count() - 1721119L;
+
173 int32_t yr = (4 * mtmp - 1) / 146097L;
+
174 mtmp = 4 * mtmp - 1 - 146097L * yr;
+
175 int32_t da = mtmp / 4;
+
176 mtmp = (4 * da + 3) / 1461;
+
177 da = 4 * da + 3 - 1461 * mtmp;
+
178 da = (da + 4) / 4;
+
179 int32_t mo = (5 * da - 3) / 153;
+
180 da = 5 * da - 3 - 153 * mo;
+
181 da = (da + 5) / 5;
+
182 yr = 100 * yr + mtmp;
+
183 if (mo < 10)
+
184 mo += 3;
+
185 else {
+
186 mo -= 9;
+
187 yr++;
+
188 }
+
189 if (day) *day = static_cast<uint8_t>(da);
+
190 if (month) *month = static_cast<uint8_t>(mo);
+
191 if (year) *year = yr;
+
192 }
-
167
-
- -
172 {
-
173 using rep = int64_t;
-
174 using period = std::milli;
-
175 using duration = std::chrono::duration<rep, period>;
-
176 using time_point = std::chrono::time_point<aosn_timestamp>;
-
177 static constexpr bool is_steady = false;
-
178
-
179 static constexpr rep f_second = 1000; // number of milliseconds per second
-
180 static constexpr rep f_minute = 60; // number of seconds per minute
-
181 static constexpr rep f_hour = 60; // number of minutes per hour
-
182 static constexpr rep f_day = 24; // number of hours per day
-
183 static constexpr rep f_week = 7; // number of days per week
-
184
-
185 static constexpr rep one_second = f_second; // number of milliseconds per second
-
186 static constexpr rep one_minute = f_minute * one_second; // number of milliseconds per minute
-
187 static constexpr rep one_hour = f_hour * one_minute; // number of milliseconds per hour
-
188 static constexpr rep one_day = f_day * one_hour; // number of milliseconds per day
-
189 static constexpr rep one_week = f_week * one_day; // number of milliseconds per week
-
190
-
-
194 static time_point now() noexcept
-
195 {
-
196#ifdef _WIN32
-
197 FILETIME t;
-
198 GetSystemTimeAsFileTime(&t);
-
199 return from_system(t);
-
200#else
-
201 time_t t;
-
202 time(&t);
-
203 return from_time_t(t);
-
204#endif
-
205 }
+
193
+
+
197 static uint8_t day_of_week(_In_ const time_point tp)
+
198 {
+
199 return static_cast<uint8_t>(tp.time_since_epoch().count() % 7);
+
200 }
-
206
-
-
210 static std::time_t to_time_t(_In_ const time_point tp) noexcept
-
211 {
-
212 return tp.time_since_epoch().count() / one_second - 210866803200;
-
213 }
+
201
+
+
205 static uint8_t day_of_week(_In_ uint8_t day, _In_ uint8_t month, _In_ int32_t year)
+
206 {
+
207 return static_cast<uint8_t>(from_dmy(day, month, year).time_since_epoch().count() % 7);
+
208 }
-
214
-
-
218 static time_point from_time_t(_In_ std::time_t t) noexcept
-
219 {
-
220 return time_point(duration((static_cast<rep>(t) + 210866803200) * one_second));
-
221 }
+
209 };
-
222
-
223#ifdef _WIN32
-
227 static time_point from_system(_In_ const SYSTEMTIME& t) noexcept
-
228 {
-
229 return from_dmy(
-
230 static_cast<uint8_t>(t.wDay), static_cast<uint8_t>(t.wMonth), static_cast<int32_t>(t.wYear),
-
231 static_cast<uint8_t>(t.wHour), static_cast<uint8_t>(t.wMinute), static_cast<uint8_t>(t.wSecond), static_cast<uint16_t>(t.wMilliseconds));
-
232 }
+
210
+
+ +
215 {
+
216 using rep = int64_t;
+
217 using period = std::milli;
+
218 using duration = std::chrono::duration<rep, period>;
+
219 using time_point = std::chrono::time_point<aosn_timestamp>;
+
220 static constexpr bool is_steady = false;
+
221
+
222 static constexpr rep f_second = 1000; // number of milliseconds per second
+
223 static constexpr rep f_minute = 60; // number of seconds per minute
+
224 static constexpr rep f_hour = 60; // number of minutes per hour
+
225 static constexpr rep f_day = 24; // number of hours per day
+
226 static constexpr rep f_week = 7; // number of days per week
+
227
+
228 static constexpr rep one_second = f_second; // number of milliseconds per second
+
229 static constexpr rep one_minute = f_minute * one_second; // number of milliseconds per minute
+
230 static constexpr rep one_hour = f_hour * one_minute; // number of milliseconds per hour
+
231 static constexpr rep one_day = f_day * one_hour; // number of milliseconds per day
+
232 static constexpr rep one_week = f_week * one_day; // number of milliseconds per week
233
-
237 static time_point from_system(_In_ const FILETIME& t) noexcept
+
+
237 static time_point now() noexcept
238 {
-
239 uint64_t x = ((static_cast<uint64_t>(t.dwHighDateTime)) << 32) | t.dwLowDateTime;
-
240 return time_point(duration(static_cast<rep>(x / 10000 + 199222329600000))); // Convert from 100 ns to 1 ms interval and adjust epoch
-
241 }
-
242
-
246 static time_point from_system(_In_ DATE t)
-
247 {
-
248 SYSTEMTIME st;
-
249 if (!VariantTimeToSystemTime(t, &st))
-
250 throw std::invalid_argument("failed to convert date from VARIANT_DATE");
-
251 return from_system(st);
-
252 }
-
253#else
-
-
257 static time_point from_system(_In_ const struct timespec& t) noexcept
-
258 {
-
259 return time_point(duration(static_cast<rep>(from_time_t(t.tv_sec).time_since_epoch().count() + t.tv_nsec / 1000)));
-
260 }
+
239#ifdef _WIN32
+
240 FILETIME t;
+
241 GetSystemTimeAsFileTime(&t);
+
242 return from_system(t);
+
243#else
+
244 time_t t;
+
245 time(&t);
+
246 return from_time_t(t);
+
247#endif
+
248 }
-
261#endif
-
262
-
263 static void to_system(_In_ time_point tp, _Out_ struct tm& date) noexcept
-
264 {
-
265 uint8_t day, month, hour, minute, second;
-
266 uint16_t millisecond;
-
267 int32_t year;
-
268 to_dmy(tp, &day, &month, &year, &hour, &minute, &second, &millisecond);
-
269 date.tm_sec = second;
-
270 date.tm_min = minute;
-
271 date.tm_hour = hour;
-
272 date.tm_mday = day;
-
273 date.tm_mon = month - 1;
-
274 date.tm_year = year - 1900;
-
275 date.tm_wday = (static_cast<int>(aosn_date::day_of_week(to_date(tp))) + 1) % 7;
-
276 date.tm_yday = 0;
-
277 date.tm_isdst = 0;
-
278 }
-
279
-
-
283 static aosn_date::time_point to_date(_In_ time_point tp) noexcept
-
284 {
-
285 return aosn_date::time_point(aosn_date::duration(static_cast<aosn_date::rep>(tp.time_since_epoch().count() / one_day)));
-
286 }
+
249
+
+
253 static std::time_t to_time_t(_In_ const time_point tp) noexcept
+
254 {
+
255 return tp.time_since_epoch().count() / one_second - 210866803200;
+
256 }
-
287
-
-
291 static time_point from_date(_In_ aosn_date::time_point date) noexcept
-
292 {
-
293 return time_point(duration(static_cast<rep>(date.time_since_epoch().count()) * one_day));
-
294 }
+
257
+
+
261 static time_point from_time_t(_In_ std::time_t t) noexcept
+
262 {
+
263 return time_point(duration((static_cast<rep>(t) + 210866803200) * one_second));
+
264 }
-
295
-
-
299 static time_point from_dmy(
-
300 _In_ uint8_t day, _In_ uint8_t month, _In_ int32_t year,
-
301 _In_ uint8_t hour, _In_ uint8_t minute, _In_ uint8_t second, _In_ uint16_t millisecond) noexcept
-
302 {
-
303 return time_point(duration(
-
304 (static_cast<rep>(aosn_date::from_dmy(day, month, year).time_since_epoch().count()) * one_day) +
-
305 (static_cast<rep>(hour) * one_hour + static_cast<rep>(minute) * one_minute + static_cast<rep>(second) * one_second + millisecond)));
-
306 }
+
265
+
266#ifdef _WIN32
+
270 static time_point from_system(_In_ const SYSTEMTIME& t) noexcept
+
271 {
+
272 return from_dmy(
+
273 static_cast<uint8_t>(t.wDay), static_cast<uint8_t>(t.wMonth), static_cast<int32_t>(t.wYear),
+
274 static_cast<uint8_t>(t.wHour), static_cast<uint8_t>(t.wMinute), static_cast<uint8_t>(t.wSecond), static_cast<uint16_t>(t.wMilliseconds));
+
275 }
+
276
+
280 static time_point from_system(_In_ const FILETIME& t) noexcept
+
281 {
+
282 uint64_t x = ((static_cast<uint64_t>(t.dwHighDateTime)) << 32) | t.dwLowDateTime;
+
283 return time_point(duration(static_cast<rep>(x / 10000 + 199222329600000))); // Convert from 100 ns to 1 ms interval and adjust epoch
+
284 }
+
285
+
289 static time_point from_system(_In_ DATE t)
+
290 {
+
291 SYSTEMTIME st;
+
292 if (!VariantTimeToSystemTime(t, &st))
+
293 throw std::invalid_argument("failed to convert date from VARIANT_DATE");
+
294 return from_system(st);
+
295 }
+
296#else
+
+
300 static time_point from_system(_In_ const struct timespec& t) noexcept
+
301 {
+
302 return time_point(duration(static_cast<rep>(from_time_t(t.tv_sec).time_since_epoch().count() + t.tv_nsec / 1000)));
+
303 }
-
307
-
-
311 static void to_dmy(_In_ const time_point tp,
-
312 _Out_opt_ uint8_t* day, _Out_opt_ uint8_t* month, _Out_opt_ int32_t* year,
-
313 _Out_opt_ uint8_t* hour, _Out_opt_ uint8_t* minute, _Out_opt_ uint8_t* second, _Out_opt_ uint16_t* millisecond) noexcept
-
314 {
-
315 aosn_date::to_dmy(to_date(tp), day, month, year);
-
316 int32_t u = static_cast<int32_t>(tp.time_since_epoch().count() % one_day);
-
317 if (millisecond) *millisecond = static_cast<uint16_t>(u % f_second);
-
318 u = u / f_second;
-
319 if (second) *second = static_cast<uint8_t>(u % f_minute);
-
320 u = u / f_minute;
-
321 if (minute) *minute = static_cast<uint8_t>(u % f_hour);
-
322 u = u / f_hour;
-
323 if (hour) *hour = static_cast<uint8_t>(u);
-
324 }
-
-
325
-
326 template<class TR = std::char_traits<char>, class AX = std::allocator<char>>
-
327 static std::basic_string<char, TR, AX> to_str(_In_ const time_point tp, _In_z_ const char* format, _In_opt_ locale_t locale)
+
304#endif
+
305
+
306 static void to_system(_In_ time_point tp, _Out_ struct tm& date) noexcept
+
307 {
+
308 uint8_t day, month, hour, minute, second;
+
309 uint16_t millisecond;
+
310 int32_t year;
+
311 to_dmy(tp, &day, &month, &year, &hour, &minute, &second, &millisecond);
+
312 date.tm_sec = second;
+
313 date.tm_min = minute;
+
314 date.tm_hour = hour;
+
315 date.tm_mday = day;
+
316 date.tm_mon = month - 1;
+
317 date.tm_year = year - 1900;
+
318 date.tm_wday = (static_cast<int>(aosn_date::day_of_week(to_date(tp))) + 1) % 7;
+
319 date.tm_yday = 0;
+
320 date.tm_isdst = 0;
+
321 }
+
322
+
323#ifdef _WIN32
+
327 static void to_system(_In_ time_point tp, _Out_ SYSTEMTIME& t)
328 {
-
329 struct tm date;
-
330 to_system(tp, date);
-
331 std::basic_string<char, TR, AX> str;
-
332 char stack_buffer[1024 / sizeof(char)];
-
333 size_t n;
-
334#if _WIN32
-
335 n = _strftime_l(stack_buffer, _countof(stack_buffer), format, &date, locale);
-
336#else
-
337 n = strftime_l(stack_buffer, _countof(stack_buffer), format, &date, locale);
-
338#endif
-
339 if (n) {
-
340 str.assign(stack_buffer, stack_buffer + n);
-
341 return str;
-
342 }
-
343 size_t num_chars = stdex::mul(_countof(stack_buffer), 2);
-
344 for (;;) {
-
345 std::unique_ptr<char> buf(new char[num_chars]);
-
346#if _WIN32
-
347 n = _strftime_l(buf.get(), num_chars, format, &date, locale);
-
348#else
-
349 n = strftime_l(buf.get(), num_chars, format, &date, locale);
-
350#endif
-
351 if (n) {
-
352 str.assign(buf.get(), buf.get() + n);
-
353 return str;
-
354 }
-
355 num_chars = stdex::mul(num_chars, 2);
-
356 }
-
357 }
-
358
-
359 template<class TR = std::char_traits<wchar_t>, class AX = std::allocator<wchar_t>>
-
360 static std::basic_string<wchar_t, TR, AX> to_str(_In_ const time_point tp, _In_z_ const wchar_t* format, _In_opt_ locale_t locale)
+
329 uint8_t day, month, hour, minute, second;
+
330 uint16_t millisecond;
+
331 int32_t year;
+
332 to_dmy(tp,
+
333 &day, &month, &year,
+
334 &hour, &minute, &second, &millisecond);
+
335 t.wDay = day;
+
336 t.wMonth = month;
+
337 if (year > WORD_MAX) _Unlikely_
+
338 throw std::range_error("year too big");
+
339 t.wYear = static_cast<WORD>(year);
+
340 t.wDayOfWeek = (static_cast<int>(aosn_date::day_of_week(to_date(tp))) + 1) % 7;
+
341 t.wHour = hour;
+
342 t.wMinute = minute;
+
343 t.wSecond = second;
+
344 t.wMilliseconds = millisecond;
+
345 }
+
346
+
350 static void to_system(_In_ time_point tp, _Out_ FILETIME& t) noexcept
+
351 {
+
352 uint64_t x = (tp.time_since_epoch().count() - 199222329600000) * 10000; // Adjust epoch and convert 1 ms interval to 100 ns
+
353 t.dwHighDateTime = static_cast<DWORD>(x >> 32);
+
354 t.dwLowDateTime = static_cast<DWORD>(x & 0xffffffff);
+
355 }
+
356
+
360 static void to_system(_In_ time_point tp, _Out_ DATE& t)
361 {
-
362 struct tm date;
-
363 to_system(tp, date);
-
364 std::basic_string<wchar_t, TR, AX> str;
-
365 wchar_t stack_buffer[1024 / sizeof(wchar_t)];
-
366 size_t n;
-
367#if _WIN32
-
368 n = _wcsftime_l(stack_buffer, _countof(stack_buffer), format, &date, locale);
-
369#else
-
370 n = wcsftime_l(stack_buffer, _countof(stack_buffer), format, &date, locale);
-
371#endif
-
372 if (n) {
-
373 str.assign(stack_buffer, stack_buffer + n);
-
374 return str;
-
375 }
-
376 size_t num_chars = stdex::mul(_countof(stack_buffer), 2);
-
377 for (;;) {
-
378 std::unique_ptr<wchar_t> buf(new wchar_t[num_chars]);
-
379#if _WIN32
-
380 n = _wcsftime_l(buf.get(), num_chars, format, &date, locale);
-
381#else
-
382 n = wcsftime_l(buf.get(), num_chars, format, &date, locale);
-
383#endif
-
384 if (n) {
-
385 str.assign(buf.get(), buf.get() + n);
-
386 return str;
-
387 }
-
388 num_chars = stdex::mul(num_chars, 2);
-
389 }
-
390 }
-
391
-
392 template<class TR = std::char_traits<char>, class AX = std::allocator<char>>
-
393 static std::basic_string<char, TR, AX> to_rfc822(_In_ const time_point tp)
-
394 {
-
395 return to_str(tp, "%a, %d %b %Y %H:%M:%S GMT", stdex::locale_C);
-
396 }
-
397 };
+
362 SYSTEMTIME st;
+
363 to_system(tp, st);
+
364 if (!SystemTimeToVariantTime(&st, &t))
+
365 throw std::invalid_argument("failed to convert date to VARIANT_DATE");
+
366 }
+
367#endif
+
368
+
+
372 static aosn_date::time_point to_date(_In_ time_point tp) noexcept
+
373 {
+
374 return aosn_date::time_point(aosn_date::duration(static_cast<aosn_date::rep>(tp.time_since_epoch().count() / one_day)));
+
375 }
-
398 }
-
399}
+
376
+
+
380 static time_point from_date(_In_ aosn_date::time_point date) noexcept
+
381 {
+
382 return time_point(duration(static_cast<rep>(date.time_since_epoch().count()) * one_day));
+
383 }
+
+
384
+
+
388 static time_point from_dmy(
+
389 _In_ uint8_t day, _In_ uint8_t month, _In_ int32_t year,
+
390 _In_ uint8_t hour, _In_ uint8_t minute, _In_ uint8_t second, _In_ uint16_t millisecond) noexcept
+
391 {
+
392 return time_point(duration(
+
393 (static_cast<rep>(aosn_date::from_dmy(day, month, year).time_since_epoch().count()) * one_day) +
+
394 (static_cast<rep>(hour) * one_hour + static_cast<rep>(minute) * one_minute + static_cast<rep>(second) * one_second + millisecond)));
+
395 }
+
+
396
+
+
400 static void to_dmy(_In_ const time_point tp,
+
401 _Out_opt_ uint8_t* day, _Out_opt_ uint8_t* month, _Out_opt_ int32_t* year,
+
402 _Out_opt_ uint8_t* hour, _Out_opt_ uint8_t* minute, _Out_opt_ uint8_t* second, _Out_opt_ uint16_t* millisecond) noexcept
+
403 {
+
404 aosn_date::to_dmy(to_date(tp), day, month, year);
+
405 int32_t u = static_cast<int32_t>(tp.time_since_epoch().count() % one_day);
+
406 if (millisecond) *millisecond = static_cast<uint16_t>(u % f_second);
+
407 u = u / f_second;
+
408 if (second) *second = static_cast<uint8_t>(u % f_minute);
+
409 u = u / f_minute;
+
410 if (minute) *minute = static_cast<uint8_t>(u % f_hour);
+
411 u = u / f_hour;
+
412 if (hour) *hour = static_cast<uint8_t>(u);
+
413 }
+
+
414
+
415 template<class TR = std::char_traits<char>, class AX = std::allocator<char>>
+
416 static std::basic_string<char, TR, AX> to_str(_In_ const time_point tp, _In_z_ const char* format, _In_opt_ locale_t locale)
+
417 {
+
418 struct tm date;
+
419 to_system(tp, date);
+
420 std::basic_string<char, TR, AX> str;
+
421 char stack_buffer[1024 / sizeof(char)];
+
422 size_t n;
+
423#if _WIN32
+
424 n = _strftime_l(stack_buffer, _countof(stack_buffer), format, &date, locale);
+
425#else
+
426 n = strftime_l(stack_buffer, _countof(stack_buffer), format, &date, locale);
+
427#endif
+
428 if (n) {
+
429 str.assign(stack_buffer, stack_buffer + n);
+
430 return str;
+
431 }
+
432 size_t num_chars = stdex::mul(_countof(stack_buffer), 2);
+
433 for (;;) {
+
434 std::unique_ptr<char> buf(new char[num_chars]);
+
435#if _WIN32
+
436 n = _strftime_l(buf.get(), num_chars, format, &date, locale);
+
437#else
+
438 n = strftime_l(buf.get(), num_chars, format, &date, locale);
+
439#endif
+
440 if (n) {
+
441 str.assign(buf.get(), buf.get() + n);
+
442 return str;
+
443 }
+
444 num_chars = stdex::mul(num_chars, 2);
+
445 }
+
446 }
+
447
+
448 template<class TR = std::char_traits<wchar_t>, class AX = std::allocator<wchar_t>>
+
449 static std::basic_string<wchar_t, TR, AX> to_str(_In_ const time_point tp, _In_z_ const wchar_t* format, _In_opt_ locale_t locale)
+
450 {
+
451 struct tm date;
+
452 to_system(tp, date);
+
453 std::basic_string<wchar_t, TR, AX> str;
+
454 wchar_t stack_buffer[1024 / sizeof(wchar_t)];
+
455 size_t n;
+
456#if _WIN32
+
457 n = _wcsftime_l(stack_buffer, _countof(stack_buffer), format, &date, locale);
+
458#else
+
459 n = wcsftime_l(stack_buffer, _countof(stack_buffer), format, &date, locale);
+
460#endif
+
461 if (n) {
+
462 str.assign(stack_buffer, stack_buffer + n);
+
463 return str;
+
464 }
+
465 size_t num_chars = stdex::mul(_countof(stack_buffer), 2);
+
466 for (;;) {
+
467 std::unique_ptr<wchar_t> buf(new wchar_t[num_chars]);
+
468#if _WIN32
+
469 n = _wcsftime_l(buf.get(), num_chars, format, &date, locale);
+
470#else
+
471 n = wcsftime_l(buf.get(), num_chars, format, &date, locale);
+
472#endif
+
473 if (n) {
+
474 str.assign(buf.get(), buf.get() + n);
+
475 return str;
+
476 }
+
477 num_chars = stdex::mul(num_chars, 2);
+
478 }
+
479 }
+
480
+
481 template<class TR = std::char_traits<char>, class AX = std::allocator<char>>
+
482 static std::basic_string<char, TR, AX> to_rfc822(_In_ const time_point tp)
+
483 {
+
484 return to_str(tp, "%a, %d %b %Y %H:%M:%S GMT", stdex::locale_C);
+
485 }
+
486 };
+
+
487 }
+
488}
locale_t helper class to free_locale when going out of scope.
Definition locale.hpp:74
AOsn date.
Definition chrono.hpp:25
-
static time_point from_dmy(uint8_t day, uint8_t month, int32_t year) noexcept
Returns time point from calendar day, month and year.
Definition chrono.hpp:105
-
static void to_dmy(const time_point tp, uint8_t *day, uint8_t *month, int32_t *year) noexcept
Returns calendar day, month and year from time point.
Definition chrono.hpp:127
-
static uint8_t day_of_week(const time_point tp)
Returns day-of-week from time point (0 = Mon, 1 = Tue...)
Definition chrono.hpp:154
-
static uint8_t day_of_week(uint8_t day, uint8_t month, int32_t year)
Returns day-of-week from calendar day, month and year (0 = Mon, 1 = Tue...)
Definition chrono.hpp:162
+
static time_point from_dmy(uint8_t day, uint8_t month, int32_t year) noexcept
Returns time point from calendar day, month and year.
Definition chrono.hpp:148
+
static void to_dmy(const time_point tp, uint8_t *day, uint8_t *month, int32_t *year) noexcept
Returns calendar day, month and year from time point.
Definition chrono.hpp:170
+
static uint8_t day_of_week(const time_point tp)
Returns day-of-week from time point (0 = Mon, 1 = Tue...)
Definition chrono.hpp:197
+
static uint8_t day_of_week(uint8_t day, uint8_t month, int32_t year)
Returns day-of-week from calendar day, month and year (0 = Mon, 1 = Tue...)
Definition chrono.hpp:205
static std::time_t to_time_t(const time_point tp) noexcept
Returns time_t from time point.
Definition chrono.hpp:51
static time_point from_system(const struct timespec &t) noexcept
Returns time point from struct timespec.
Definition chrono.hpp:96
static time_point now() noexcept
Gets current date.
Definition chrono.hpp:35
static time_point from_time_t(std::time_t t) noexcept
Returns time point from time_t.
Definition chrono.hpp:59
-
AOsn timestamp.
Definition chrono.hpp:172
-
static time_point from_date(aosn_date::time_point date) noexcept
Returns time point from aosn_date::time_point.
Definition chrono.hpp:291
-
static time_point from_time_t(std::time_t t) noexcept
Returns time point from time_t.
Definition chrono.hpp:218
-
static time_point from_dmy(uint8_t day, uint8_t month, int32_t year, uint8_t hour, uint8_t minute, uint8_t second, uint16_t millisecond) noexcept
Returns time point from calendar day, month, year and time.
Definition chrono.hpp:299
-
static std::time_t to_time_t(const time_point tp) noexcept
Returns time_t from time point.
Definition chrono.hpp:210
-
static aosn_date::time_point to_date(time_point tp) noexcept
Returns aosn_date::time_point from time point.
Definition chrono.hpp:283
-
static time_point from_system(const struct timespec &t) noexcept
Returns time point from struct timespec.
Definition chrono.hpp:257
-
static time_point now() noexcept
Gets current timestamp.
Definition chrono.hpp:194
-
static void to_dmy(const time_point tp, uint8_t *day, uint8_t *month, int32_t *year, uint8_t *hour, uint8_t *minute, uint8_t *second, uint16_t *millisecond) noexcept
Returns calendar day, month, year and time from time point.
Definition chrono.hpp:311
+
AOsn timestamp.
Definition chrono.hpp:215
+
static time_point from_date(aosn_date::time_point date) noexcept
Returns time point from aosn_date::time_point.
Definition chrono.hpp:380
+
static time_point from_time_t(std::time_t t) noexcept
Returns time point from time_t.
Definition chrono.hpp:261
+
static time_point from_dmy(uint8_t day, uint8_t month, int32_t year, uint8_t hour, uint8_t minute, uint8_t second, uint16_t millisecond) noexcept
Returns time point from calendar day, month, year and time.
Definition chrono.hpp:388
+
static std::time_t to_time_t(const time_point tp) noexcept
Returns time_t from time point.
Definition chrono.hpp:253
+
static aosn_date::time_point to_date(time_point tp) noexcept
Returns aosn_date::time_point from time point.
Definition chrono.hpp:372
+
static time_point from_system(const struct timespec &t) noexcept
Returns time point from struct timespec.
Definition chrono.hpp:300
+
static time_point now() noexcept
Gets current timestamp.
Definition chrono.hpp:237
+
static void to_dmy(const time_point tp, uint8_t *day, uint8_t *month, int32_t *year, uint8_t *hour, uint8_t *minute, uint8_t *second, uint16_t *millisecond) noexcept
Returns calendar day, month, year and time from time point.
Definition chrono.hpp:400
diff --git a/classes.html b/classes.html index 8f1b7361f..55ecd9047 100644 --- a/classes.html +++ b/classes.html @@ -154,7 +154,7 @@ $(function(){ initResizable(false); });
diff --git a/classstdex_1_1aggregate__progress-members.html b/classstdex_1_1aggregate__progress-members.html index 146d3ce94..57c2b555c 100644 --- a/classstdex_1_1aggregate__progress-members.html +++ b/classstdex_1_1aggregate__progress-members.html @@ -108,7 +108,7 @@ $(function(){ initResizable(false); });
diff --git a/classstdex_1_1aggregate__progress.html b/classstdex_1_1aggregate__progress.html index bcd21586f..b2f3d46bb 100644 --- a/classstdex_1_1aggregate__progress.html +++ b/classstdex_1_1aggregate__progress.html @@ -298,7 +298,7 @@ template<class T >
diff --git a/classstdex_1_1aggregate__progress_1_1worker__progress-members.html b/classstdex_1_1aggregate__progress_1_1worker__progress-members.html index 2976b42f7..94a0f90f0 100644 --- a/classstdex_1_1aggregate__progress_1_1worker__progress-members.html +++ b/classstdex_1_1aggregate__progress_1_1worker__progress-members.html @@ -109,7 +109,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1aggregate__progress_1_1worker__progress.html b/classstdex_1_1aggregate__progress_1_1worker__progress.html index fd0a5fa79..6fb9806b7 100644 --- a/classstdex_1_1aggregate__progress_1_1worker__progress.html +++ b/classstdex_1_1aggregate__progress_1_1worker__progress.html @@ -342,7 +342,7 @@ template<class T > diff --git a/classstdex_1_1base64__dec-members.html b/classstdex_1_1base64__dec-members.html index 3b8e234c4..2d082258c 100644 --- a/classstdex_1_1base64__dec-members.html +++ b/classstdex_1_1base64__dec-members.html @@ -105,7 +105,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1base64__dec.html b/classstdex_1_1base64__dec.html index 479b2388c..67048d7f1 100644 --- a/classstdex_1_1base64__dec.html +++ b/classstdex_1_1base64__dec.html @@ -244,7 +244,7 @@ template<class T_to , class AX , class T_from > diff --git a/classstdex_1_1base64__enc-members.html b/classstdex_1_1base64__enc-members.html index 9c1227b01..0024e08ac 100644 --- a/classstdex_1_1base64__enc-members.html +++ b/classstdex_1_1base64__enc-members.html @@ -106,7 +106,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1base64__enc.html b/classstdex_1_1base64__enc.html index 687a46b09..729fd1d67 100644 --- a/classstdex_1_1base64__enc.html +++ b/classstdex_1_1base64__enc.html @@ -249,7 +249,7 @@ template<class T , class TR , class AX > diff --git a/classstdex_1_1base64__reader-members.html b/classstdex_1_1base64__reader-members.html index ae4487eaa..83ac83f67 100644 --- a/classstdex_1_1base64__reader-members.html +++ b/classstdex_1_1base64__reader-members.html @@ -176,7 +176,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1base64__reader.html b/classstdex_1_1base64__reader.html index f3de9b88e..d4cb5238a 100644 --- a/classstdex_1_1base64__reader.html +++ b/classstdex_1_1base64__reader.html @@ -447,7 +447,7 @@ size_t m_num diff --git a/classstdex_1_1base64__writer-members.html b/classstdex_1_1base64__writer-members.html index 9b54d5fff..e26a7fb26 100644 --- a/classstdex_1_1base64__writer-members.html +++ b/classstdex_1_1base64__writer-members.html @@ -178,7 +178,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1base64__writer.html b/classstdex_1_1base64__writer.html index d7504620e..650d704ef 100644 --- a/classstdex_1_1base64__writer.html +++ b/classstdex_1_1base64__writer.html @@ -475,7 +475,7 @@ size_t m_num diff --git a/classstdex_1_1basic__hash-members.html b/classstdex_1_1basic__hash-members.html index 87d848941..95581bcd8 100644 --- a/classstdex_1_1basic__hash-members.html +++ b/classstdex_1_1basic__hash-members.html @@ -106,7 +106,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1basic__hash.html b/classstdex_1_1basic__hash.html index 891deef60..b6437fd28 100644 --- a/classstdex_1_1basic__hash.html +++ b/classstdex_1_1basic__hash.html @@ -259,7 +259,7 @@ template<class T > diff --git a/classstdex_1_1basic__sys__object-members.html b/classstdex_1_1basic__sys__object-members.html index 1c99c92cc..ba4d9e76a 100644 --- a/classstdex_1_1basic__sys__object-members.html +++ b/classstdex_1_1basic__sys__object-members.html @@ -108,7 +108,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1basic__sys__object.html b/classstdex_1_1basic__sys__object.html index ae2ae0c1a..6bd7854c2 100644 --- a/classstdex_1_1basic__sys__object.html +++ b/classstdex_1_1basic__sys__object.html @@ -188,7 +188,7 @@ template<class T = sys_handle, class TR = sys_object_traits> diff --git a/classstdex_1_1benchmark-members.html b/classstdex_1_1benchmark-members.html index 6428c0e72..82bdf5d08 100644 --- a/classstdex_1_1benchmark-members.html +++ b/classstdex_1_1benchmark-members.html @@ -102,7 +102,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1benchmark.html b/classstdex_1_1benchmark.html index 197795d3b..367524107 100644 --- a/classstdex_1_1benchmark.html +++ b/classstdex_1_1benchmark.html @@ -163,7 +163,7 @@ std::chrono::time_point< std::chrono::high_resolution_clock >  diff --git a/classstdex_1_1block__hash-members.html b/classstdex_1_1block__hash-members.html index 6d289e5cd..da2f97e6b 100644 --- a/classstdex_1_1block__hash-members.html +++ b/classstdex_1_1block__hash-members.html @@ -110,7 +110,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1block__hash.html b/classstdex_1_1block__hash.html index f609747e4..2a7211bc7 100644 --- a/classstdex_1_1block__hash.html +++ b/classstdex_1_1block__hash.html @@ -253,7 +253,7 @@ template<class T > diff --git a/classstdex_1_1charset__encoder-members.html b/classstdex_1_1charset__encoder-members.html index 0e853845e..668a9a1bb 100644 --- a/classstdex_1_1charset__encoder-members.html +++ b/classstdex_1_1charset__encoder-members.html @@ -117,7 +117,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1charset__encoder.html b/classstdex_1_1charset__encoder.html index f4e7eed66..3f9e439c0 100644 --- a/classstdex_1_1charset__encoder.html +++ b/classstdex_1_1charset__encoder.html @@ -569,7 +569,7 @@ template<class TR_to = std::char_traits<T_to>, class AX_to = std::all diff --git a/classstdex_1_1crc32__hash-members.html b/classstdex_1_1crc32__hash-members.html index 67f9df353..7a798a9a5 100644 --- a/classstdex_1_1crc32__hash-members.html +++ b/classstdex_1_1crc32__hash-members.html @@ -105,7 +105,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1crc32__hash.html b/classstdex_1_1crc32__hash.html index 4b85c882d..e4e1a02a4 100644 --- a/classstdex_1_1crc32__hash.html +++ b/classstdex_1_1crc32__hash.html @@ -253,7 +253,7 @@ crc32_t m_value diff --git a/classstdex_1_1curl__initializer-members.html b/classstdex_1_1curl__initializer-members.html index c8b92787b..a6917f2d3 100644 --- a/classstdex_1_1curl__initializer-members.html +++ b/classstdex_1_1curl__initializer-members.html @@ -100,7 +100,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1curl__initializer.html b/classstdex_1_1curl__initializer.html index 52248276f..6232847f8 100644 --- a/classstdex_1_1curl__initializer.html +++ b/classstdex_1_1curl__initializer.html @@ -175,7 +175,7 @@ Public Member Functions diff --git a/classstdex_1_1curl__runtime__error-members.html b/classstdex_1_1curl__runtime__error-members.html index ab758a9b8..73012d811 100644 --- a/classstdex_1_1curl__runtime__error-members.html +++ b/classstdex_1_1curl__runtime__error-members.html @@ -103,7 +103,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1curl__runtime__error.html b/classstdex_1_1curl__runtime__error.html index 346067762..b04367edf 100644 --- a/classstdex_1_1curl__runtime__error.html +++ b/classstdex_1_1curl__runtime__error.html @@ -249,7 +249,7 @@ CURLcode m_num diff --git a/classstdex_1_1global__progress-members.html b/classstdex_1_1global__progress-members.html index edae88685..cdf627df8 100644 --- a/classstdex_1_1global__progress-members.html +++ b/classstdex_1_1global__progress-members.html @@ -113,7 +113,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1global__progress.html b/classstdex_1_1global__progress.html index 2ecc5fb42..3e210b1d9 100644 --- a/classstdex_1_1global__progress.html +++ b/classstdex_1_1global__progress.html @@ -537,7 +537,7 @@ template<class T > diff --git a/classstdex_1_1hex__dec-members.html b/classstdex_1_1hex__dec-members.html index c055793fc..b632b3c28 100644 --- a/classstdex_1_1hex__dec-members.html +++ b/classstdex_1_1hex__dec-members.html @@ -104,7 +104,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1hex__dec.html b/classstdex_1_1hex__dec.html index 9a4b73a86..8b4c44e35 100644 --- a/classstdex_1_1hex__dec.html +++ b/classstdex_1_1hex__dec.html @@ -226,7 +226,7 @@ template<class T_to , class AX , class T_from > diff --git a/classstdex_1_1hex__enc-members.html b/classstdex_1_1hex__enc-members.html index 7a93ccf02..7b452059f 100644 --- a/classstdex_1_1hex__enc-members.html +++ b/classstdex_1_1hex__enc-members.html @@ -101,7 +101,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1hex__enc.html b/classstdex_1_1hex__enc.html index 5826ab5ff..7b5de0c6c 100644 --- a/classstdex_1_1hex__enc.html +++ b/classstdex_1_1hex__enc.html @@ -204,7 +204,7 @@ template<class T , class TR , class AX > diff --git a/classstdex_1_1html_1_1comment-members.html b/classstdex_1_1html_1_1comment-members.html index 576ccde6d..e1b410ac2 100644 --- a/classstdex_1_1html_1_1comment-members.html +++ b/classstdex_1_1html_1_1comment-members.html @@ -105,7 +105,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1html_1_1comment.html b/classstdex_1_1html_1_1comment.html index d9361ad57..b70b7aa9c 100644 --- a/classstdex_1_1html_1_1comment.html +++ b/classstdex_1_1html_1_1comment.html @@ -150,7 +150,7 @@ stdex::parser::html_sequence_t  diff --git a/classstdex_1_1html_1_1declaration-members.html b/classstdex_1_1html_1_1declaration-members.html index 9dc7326da..323513441 100644 --- a/classstdex_1_1html_1_1declaration-members.html +++ b/classstdex_1_1html_1_1declaration-members.html @@ -106,7 +106,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1html_1_1declaration.html b/classstdex_1_1html_1_1declaration.html index 360215001..9427b6f81 100644 --- a/classstdex_1_1html_1_1declaration.html +++ b/classstdex_1_1html_1_1declaration.html @@ -154,7 +154,7 @@ stdex::parser::html_sequence_t  diff --git a/classstdex_1_1html_1_1document-members.html b/classstdex_1_1html_1_1document-members.html index 0c6d55dd1..080025487 100644 --- a/classstdex_1_1html_1_1document-members.html +++ b/classstdex_1_1html_1_1document-members.html @@ -122,7 +122,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1html_1_1document.html b/classstdex_1_1html_1_1document.html index 8f287b04d..adebe0300 100644 --- a/classstdex_1_1html_1_1document.html +++ b/classstdex_1_1html_1_1document.html @@ -212,7 +212,7 @@ class stdex::html::document< T, TR, AX >

HTML document.

diff --git a/classstdex_1_1html_1_1element-members.html b/classstdex_1_1html_1_1element-members.html index d57493b53..ff0636f95 100644 --- a/classstdex_1_1html_1_1element-members.html +++ b/classstdex_1_1html_1_1element-members.html @@ -108,7 +108,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1html_1_1element.html b/classstdex_1_1html_1_1element.html index b412fd02d..3a61c4641 100644 --- a/classstdex_1_1html_1_1element.html +++ b/classstdex_1_1html_1_1element.html @@ -167,7 +167,7 @@ stdex::parser::html_sequence_t  diff --git a/classstdex_1_1html_1_1element__end-members.html b/classstdex_1_1html_1_1element__end-members.html index 2cf273053..547d76fb4 100644 --- a/classstdex_1_1html_1_1element__end-members.html +++ b/classstdex_1_1html_1_1element__end-members.html @@ -107,7 +107,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1html_1_1element__end.html b/classstdex_1_1html_1_1element__end.html index f8afcc7cf..3f3284282 100644 --- a/classstdex_1_1html_1_1element__end.html +++ b/classstdex_1_1html_1_1element__end.html @@ -158,7 +158,7 @@ stdex::parser::html_sequence_t  diff --git a/classstdex_1_1html_1_1element__start-members.html b/classstdex_1_1html_1_1element__start-members.html index 6b2883ad0..782d41e76 100644 --- a/classstdex_1_1html_1_1element__start-members.html +++ b/classstdex_1_1html_1_1element__start-members.html @@ -110,7 +110,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1html_1_1element__start.html b/classstdex_1_1html_1_1element__start.html index 46940bbba..b1f174ce0 100644 --- a/classstdex_1_1html_1_1element__start.html +++ b/classstdex_1_1html_1_1element__start.html @@ -177,7 +177,7 @@ template<class T > diff --git a/classstdex_1_1html_1_1instruction-members.html b/classstdex_1_1html_1_1instruction-members.html index 721b383dd..2f017258e 100644 --- a/classstdex_1_1html_1_1instruction-members.html +++ b/classstdex_1_1html_1_1instruction-members.html @@ -105,7 +105,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1html_1_1instruction.html b/classstdex_1_1html_1_1instruction.html index 4a3b1355d..d90c5addd 100644 --- a/classstdex_1_1html_1_1instruction.html +++ b/classstdex_1_1html_1_1instruction.html @@ -150,7 +150,7 @@ stdex::parser::html_sequence_t  diff --git a/classstdex_1_1html_1_1parser-members.html b/classstdex_1_1html_1_1parser-members.html index 23220de08..fc49def96 100644 --- a/classstdex_1_1html_1_1parser-members.html +++ b/classstdex_1_1html_1_1parser-members.html @@ -125,7 +125,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1html_1_1parser.html b/classstdex_1_1html_1_1parser.html index 7720aee57..247beb2dd 100644 --- a/classstdex_1_1html_1_1parser.html +++ b/classstdex_1_1html_1_1parser.html @@ -577,7 +577,7 @@ template<class T , class TR , class AX > diff --git a/classstdex_1_1html_1_1sequence-members.html b/classstdex_1_1html_1_1sequence-members.html index 82438bc1a..2eb38bd80 100644 --- a/classstdex_1_1html_1_1sequence-members.html +++ b/classstdex_1_1html_1_1sequence-members.html @@ -103,7 +103,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1html_1_1sequence.html b/classstdex_1_1html_1_1sequence.html index 40ee04673..94187a22d 100644 --- a/classstdex_1_1html_1_1sequence.html +++ b/classstdex_1_1html_1_1sequence.html @@ -145,7 +145,7 @@ stdex::parser::html_sequence_t  diff --git a/classstdex_1_1html_1_1starting__token-members.html b/classstdex_1_1html_1_1starting__token-members.html index 955612df9..76a0b00fd 100644 --- a/classstdex_1_1html_1_1starting__token-members.html +++ b/classstdex_1_1html_1_1starting__token-members.html @@ -114,7 +114,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1html_1_1starting__token.html b/classstdex_1_1html_1_1starting__token.html index 2bbe16e02..546f73481 100644 --- a/classstdex_1_1html_1_1starting__token.html +++ b/classstdex_1_1html_1_1starting__token.html @@ -196,7 +196,7 @@ class stdex::html::starting_token< T, TR, AX >

Token representing

diff --git a/classstdex_1_1html_1_1text__token-members.html b/classstdex_1_1html_1_1text__token-members.html index 5738628b7..4c85b2dca 100644 --- a/classstdex_1_1html_1_1text__token-members.html +++ b/classstdex_1_1html_1_1text__token-members.html @@ -111,7 +111,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1html_1_1text__token.html b/classstdex_1_1html_1_1text__token.html index af3de7ae5..853f6fd5d 100644 --- a/classstdex_1_1html_1_1text__token.html +++ b/classstdex_1_1html_1_1text__token.html @@ -183,7 +183,7 @@ class stdex::html::text_token< T, TR, AX >

Token representing part

diff --git a/classstdex_1_1html_1_1token-members.html b/classstdex_1_1html_1_1token-members.html index bee95fe7d..d5b714a05 100644 --- a/classstdex_1_1html_1_1token-members.html +++ b/classstdex_1_1html_1_1token-members.html @@ -107,7 +107,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1html_1_1token.html b/classstdex_1_1html_1_1token.html index 097074917..d649d53b7 100644 --- a/classstdex_1_1html_1_1token.html +++ b/classstdex_1_1html_1_1token.html @@ -244,7 +244,7 @@ template<class TR = std::char_traits<wchar_t>, class AX = std::alloca diff --git a/classstdex_1_1html_1_1url__token-members.html b/classstdex_1_1html_1_1url__token-members.html index bf0a0da22..3f1655ca4 100644 --- a/classstdex_1_1html_1_1url__token-members.html +++ b/classstdex_1_1html_1_1url__token-members.html @@ -110,7 +110,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1html_1_1url__token.html b/classstdex_1_1html_1_1url__token.html index 60276f3b1..3bf903566 100644 --- a/classstdex_1_1html_1_1url__token.html +++ b/classstdex_1_1html_1_1url__token.html @@ -178,7 +178,7 @@ class stdex::html::url_token< T, TR, AX >

HTTP token representing

diff --git a/classstdex_1_1idrec_1_1record-members.html b/classstdex_1_1idrec_1_1record-members.html index 400880728..706d33222 100644 --- a/classstdex_1_1idrec_1_1record-members.html +++ b/classstdex_1_1idrec_1_1record-members.html @@ -115,7 +115,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1idrec_1_1record.html b/classstdex_1_1idrec_1_1record.html index 265613c7e..9f368534f 100644 --- a/classstdex_1_1idrec_1_1record.html +++ b/classstdex_1_1idrec_1_1record.html @@ -777,7 +777,7 @@ template<class T , class T_id , const T_id ID, class T_size , T_size N_align& diff --git a/classstdex_1_1lazy__progress-members.html b/classstdex_1_1lazy__progress-members.html index c7aa597a5..98979f578 100644 --- a/classstdex_1_1lazy__progress-members.html +++ b/classstdex_1_1lazy__progress-members.html @@ -111,7 +111,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1lazy__progress.html b/classstdex_1_1lazy__progress.html index f2d05e352..e07d2e668 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_1locale-members.html b/classstdex_1_1locale-members.html index 718ca9dca..5b8dbbcc8 100644 --- a/classstdex_1_1locale-members.html +++ b/classstdex_1_1locale-members.html @@ -102,7 +102,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1locale.html b/classstdex_1_1locale.html index 8ff999a3e..5c5f955c7 100644 --- a/classstdex_1_1locale.html +++ b/classstdex_1_1locale.html @@ -127,7 +127,7 @@ Public Member Functions diff --git a/classstdex_1_1md5__hash-members.html b/classstdex_1_1md5__hash-members.html index 7599608d1..083e2c0e2 100644 --- a/classstdex_1_1md5__hash-members.html +++ b/classstdex_1_1md5__hash-members.html @@ -107,7 +107,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1md5__hash.html b/classstdex_1_1md5__hash.html index 295694442..17cfb5405 100644 --- a/classstdex_1_1md5__hash.html +++ b/classstdex_1_1md5__hash.html @@ -275,7 +275,7 @@ uint32_t m_temp [16] diff --git a/classstdex_1_1minisign_1_1line__break-members.html b/classstdex_1_1minisign_1_1line__break-members.html index a60353624..e4e5089b2 100644 --- a/classstdex_1_1minisign_1_1line__break-members.html +++ b/classstdex_1_1minisign_1_1line__break-members.html @@ -100,7 +100,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1minisign_1_1line__break.html b/classstdex_1_1minisign_1_1line__break.html index 9c10dd238..58ed4e783 100644 --- a/classstdex_1_1minisign_1_1line__break.html +++ b/classstdex_1_1minisign_1_1line__break.html @@ -194,7 +194,7 @@ std::locale m_locale diff --git a/classstdex_1_1minisign_1_1untrusted__comment-members.html b/classstdex_1_1minisign_1_1untrusted__comment-members.html index c9de61850..f14c169ef 100644 --- a/classstdex_1_1minisign_1_1untrusted__comment-members.html +++ b/classstdex_1_1minisign_1_1untrusted__comment-members.html @@ -100,7 +100,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1minisign_1_1untrusted__comment.html b/classstdex_1_1minisign_1_1untrusted__comment.html index 85b330810..3532aebd9 100644 --- a/classstdex_1_1minisign_1_1untrusted__comment.html +++ b/classstdex_1_1minisign_1_1untrusted__comment.html @@ -194,7 +194,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1basic__angle-members.html b/classstdex_1_1parser_1_1basic__angle-members.html index d0a64ed85..0bce369e1 100644 --- a/classstdex_1_1parser_1_1basic__angle-members.html +++ b/classstdex_1_1parser_1_1basic__angle-members.html @@ -115,7 +115,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__angle.html b/classstdex_1_1parser_1_1basic__angle.html index 476e39c41..cf160d75e 100644 --- a/classstdex_1_1parser_1_1basic__angle.html +++ b/classstdex_1_1parser_1_1basic__angle.html @@ -257,7 +257,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 962b6f000..9e5fffb14 100644 --- a/classstdex_1_1parser_1_1basic__any__cu-members.html +++ b/classstdex_1_1parser_1_1basic__any__cu-members.html @@ -108,7 +108,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__any__cu.html b/classstdex_1_1parser_1_1basic__any__cu.html index 862835115..18205b6ea 100644 --- a/classstdex_1_1parser_1_1basic__any__cu.html +++ b/classstdex_1_1parser_1_1basic__any__cu.html @@ -204,7 +204,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 b806b2294..938f6a58b 100644 --- a/classstdex_1_1parser_1_1basic__bol-members.html +++ b/classstdex_1_1parser_1_1basic__bol-members.html @@ -109,7 +109,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__bol.html b/classstdex_1_1parser_1_1basic__bol.html index 3b6105cb0..ab3d3882e 100644 --- a/classstdex_1_1parser_1_1basic__bol.html +++ b/classstdex_1_1parser_1_1basic__bol.html @@ -211,7 +211,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 9024d294c..74ed648ba 100644 --- a/classstdex_1_1parser_1_1basic__branch-members.html +++ b/classstdex_1_1parser_1_1basic__branch-members.html @@ -115,7 +115,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__branch.html b/classstdex_1_1parser_1_1basic__branch.html index 502b36af4..d899d2fe6 100644 --- a/classstdex_1_1parser_1_1basic__branch.html +++ b/classstdex_1_1parser_1_1basic__branch.html @@ -262,7 +262,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 fb21acbb7..d2d28ac87 100644 --- a/classstdex_1_1parser_1_1basic__chemical__formula-members.html +++ b/classstdex_1_1parser_1_1basic__chemical__formula-members.html @@ -113,7 +113,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__chemical__formula.html b/classstdex_1_1parser_1_1basic__chemical__formula.html index a3c75653a..372bf4563 100644 --- a/classstdex_1_1parser_1_1basic__chemical__formula.html +++ b/classstdex_1_1parser_1_1basic__chemical__formula.html @@ -252,7 +252,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__creditor__reference-members.html b/classstdex_1_1parser_1_1basic__creditor__reference-members.html index d5346b2e1..bd5bf4d60 100644 --- a/classstdex_1_1parser_1_1basic__creditor__reference-members.html +++ b/classstdex_1_1parser_1_1basic__creditor__reference-members.html @@ -112,7 +112,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__creditor__reference.html b/classstdex_1_1parser_1_1basic__creditor__reference.html index c47afccd6..06c3d7049 100644 --- a/classstdex_1_1parser_1_1basic__creditor__reference.html +++ b/classstdex_1_1parser_1_1basic__creditor__reference.html @@ -253,7 +253,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__css__cdc-members.html b/classstdex_1_1parser_1_1basic__css__cdc-members.html index 036e04c66..ecc12f274 100644 --- a/classstdex_1_1parser_1_1basic__css__cdc-members.html +++ b/classstdex_1_1parser_1_1basic__css__cdc-members.html @@ -107,7 +107,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__css__cdc.html b/classstdex_1_1parser_1_1basic__css__cdc.html index 3a79c9616..ced3af224 100644 --- a/classstdex_1_1parser_1_1basic__css__cdc.html +++ b/classstdex_1_1parser_1_1basic__css__cdc.html @@ -197,7 +197,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__css__cdo-members.html b/classstdex_1_1parser_1_1basic__css__cdo-members.html index 7d585224a..70d1ee511 100644 --- a/classstdex_1_1parser_1_1basic__css__cdo-members.html +++ b/classstdex_1_1parser_1_1basic__css__cdo-members.html @@ -107,7 +107,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__css__cdo.html b/classstdex_1_1parser_1_1basic__css__cdo.html index b3350efba..baba3a944 100644 --- a/classstdex_1_1parser_1_1basic__css__cdo.html +++ b/classstdex_1_1parser_1_1basic__css__cdo.html @@ -197,7 +197,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__css__comment-members.html b/classstdex_1_1parser_1_1basic__css__comment-members.html index 1e0b64e97..f3d609562 100644 --- a/classstdex_1_1parser_1_1basic__css__comment-members.html +++ b/classstdex_1_1parser_1_1basic__css__comment-members.html @@ -108,7 +108,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__css__comment.html b/classstdex_1_1parser_1_1basic__css__comment.html index dd91613c4..892813df8 100644 --- a/classstdex_1_1parser_1_1basic__css__comment.html +++ b/classstdex_1_1parser_1_1basic__css__comment.html @@ -237,7 +237,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__css__import-members.html b/classstdex_1_1parser_1_1basic__css__import-members.html index 8cb184314..3cbd54259 100644 --- a/classstdex_1_1parser_1_1basic__css__import-members.html +++ b/classstdex_1_1parser_1_1basic__css__import-members.html @@ -108,7 +108,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__css__import.html b/classstdex_1_1parser_1_1basic__css__import.html index c0055e0a6..a23f8a15e 100644 --- a/classstdex_1_1parser_1_1basic__css__import.html +++ b/classstdex_1_1parser_1_1basic__css__import.html @@ -237,7 +237,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__css__string-members.html b/classstdex_1_1parser_1_1basic__css__string-members.html index 25bc6635f..f4a02cefc 100644 --- a/classstdex_1_1parser_1_1basic__css__string-members.html +++ b/classstdex_1_1parser_1_1basic__css__string-members.html @@ -108,7 +108,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__css__string.html b/classstdex_1_1parser_1_1basic__css__string.html index 5f5738c5a..89a1cde67 100644 --- a/classstdex_1_1parser_1_1basic__css__string.html +++ b/classstdex_1_1parser_1_1basic__css__string.html @@ -237,7 +237,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__css__uri-members.html b/classstdex_1_1parser_1_1basic__css__uri-members.html index 3e846345b..a3234ea0b 100644 --- a/classstdex_1_1parser_1_1basic__css__uri-members.html +++ b/classstdex_1_1parser_1_1basic__css__uri-members.html @@ -108,7 +108,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__css__uri.html b/classstdex_1_1parser_1_1basic__css__uri.html index 9d21c6bcb..1e2240451 100644 --- a/classstdex_1_1parser_1_1basic__css__uri.html +++ b/classstdex_1_1parser_1_1basic__css__uri.html @@ -237,7 +237,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 827b6a197..bf06f0b7b 100644 --- a/classstdex_1_1parser_1_1basic__cu-members.html +++ b/classstdex_1_1parser_1_1basic__cu-members.html @@ -110,7 +110,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__cu.html b/classstdex_1_1parser_1_1basic__cu.html index 975bdaa76..2044c41be 100644 --- a/classstdex_1_1parser_1_1basic__cu.html +++ b/classstdex_1_1parser_1_1basic__cu.html @@ -214,7 +214,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 930d9883a..8f76c1f87 100644 --- a/classstdex_1_1parser_1_1basic__cu__set-members.html +++ b/classstdex_1_1parser_1_1basic__cu__set-members.html @@ -112,7 +112,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__cu__set.html b/classstdex_1_1parser_1_1basic__cu__set.html index f39b321c5..5c82161a0 100644 --- a/classstdex_1_1parser_1_1basic__cu__set.html +++ b/classstdex_1_1parser_1_1basic__cu__set.html @@ -224,7 +224,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 f6fca1354..0bf27bf2f 100644 --- a/classstdex_1_1parser_1_1basic__date-members.html +++ b/classstdex_1_1parser_1_1basic__date-members.html @@ -116,7 +116,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__date.html b/classstdex_1_1parser_1_1basic__date.html index 2a728e1e4..09cd8f31f 100644 --- a/classstdex_1_1parser_1_1basic__date.html +++ b/classstdex_1_1parser_1_1basic__date.html @@ -265,7 +265,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 3dd4409ee..cd43774fc 100644 --- a/classstdex_1_1parser_1_1basic__dns__domain__char-members.html +++ b/classstdex_1_1parser_1_1basic__dns__domain__char-members.html @@ -110,7 +110,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__dns__domain__char.html b/classstdex_1_1parser_1_1basic__dns__domain__char.html index dc4d5a9cf..11c92ea8c 100644 --- a/classstdex_1_1parser_1_1basic__dns__domain__char.html +++ b/classstdex_1_1parser_1_1basic__dns__domain__char.html @@ -216,7 +216,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 1dca26d83..397c6ecbd 100644 --- a/classstdex_1_1parser_1_1basic__dns__name-members.html +++ b/classstdex_1_1parser_1_1basic__dns__name-members.html @@ -111,7 +111,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__dns__name.html b/classstdex_1_1parser_1_1basic__dns__name.html index 6eb7ad54f..dbb5c63cd 100644 --- a/classstdex_1_1parser_1_1basic__dns__name.html +++ b/classstdex_1_1parser_1_1basic__dns__name.html @@ -218,7 +218,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 63de8467d..771c2e4ef 100644 --- a/classstdex_1_1parser_1_1basic__email__address-members.html +++ b/classstdex_1_1parser_1_1basic__email__address-members.html @@ -115,7 +115,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__email__address.html b/classstdex_1_1parser_1_1basic__email__address.html index f3910c583..367c48e1c 100644 --- a/classstdex_1_1parser_1_1basic__email__address.html +++ b/classstdex_1_1parser_1_1basic__email__address.html @@ -258,7 +258,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 444db2acb..d11daf444 100644 --- a/classstdex_1_1parser_1_1basic__emoticon-members.html +++ b/classstdex_1_1parser_1_1basic__emoticon-members.html @@ -113,7 +113,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__emoticon.html b/classstdex_1_1parser_1_1basic__emoticon.html index a91db60a5..cb8c123b7 100644 --- a/classstdex_1_1parser_1_1basic__emoticon.html +++ b/classstdex_1_1parser_1_1basic__emoticon.html @@ -256,7 +256,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 15d23462c..99beb8e5a 100644 --- a/classstdex_1_1parser_1_1basic__eol-members.html +++ b/classstdex_1_1parser_1_1basic__eol-members.html @@ -109,7 +109,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__eol.html b/classstdex_1_1parser_1_1basic__eol.html index c21c20740..6574046dc 100644 --- a/classstdex_1_1parser_1_1basic__eol.html +++ b/classstdex_1_1parser_1_1basic__eol.html @@ -211,7 +211,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 6c0fe57d9..8d128101b 100644 --- a/classstdex_1_1parser_1_1basic__fraction-members.html +++ b/classstdex_1_1parser_1_1basic__fraction-members.html @@ -111,7 +111,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__fraction.html b/classstdex_1_1parser_1_1basic__fraction.html index 15bef2d46..8b6a8782d 100644 --- a/classstdex_1_1parser_1_1basic__fraction.html +++ b/classstdex_1_1parser_1_1basic__fraction.html @@ -245,7 +245,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__html__declaration__condition__end-members.html b/classstdex_1_1parser_1_1basic__html__declaration__condition__end-members.html index 67d8c6ac6..641affae8 100644 --- a/classstdex_1_1parser_1_1basic__html__declaration__condition__end-members.html +++ b/classstdex_1_1parser_1_1basic__html__declaration__condition__end-members.html @@ -107,7 +107,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__html__declaration__condition__end.html b/classstdex_1_1parser_1_1basic__html__declaration__condition__end.html index 309cdb005..63a913d70 100644 --- a/classstdex_1_1parser_1_1basic__html__declaration__condition__end.html +++ b/classstdex_1_1parser_1_1basic__html__declaration__condition__end.html @@ -197,7 +197,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__html__declaration__condition__start-members.html b/classstdex_1_1parser_1_1basic__html__declaration__condition__start-members.html index 1bfa0b435..a55c0c740 100644 --- a/classstdex_1_1parser_1_1basic__html__declaration__condition__start-members.html +++ b/classstdex_1_1parser_1_1basic__html__declaration__condition__start-members.html @@ -108,7 +108,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__html__declaration__condition__start.html b/classstdex_1_1parser_1_1basic__html__declaration__condition__start.html index 8e126815f..e7d3256f3 100644 --- a/classstdex_1_1parser_1_1basic__html__declaration__condition__start.html +++ b/classstdex_1_1parser_1_1basic__html__declaration__condition__start.html @@ -239,7 +239,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__html__ident-members.html b/classstdex_1_1parser_1_1basic__html__ident-members.html index e9460c325..d5253b386 100644 --- a/classstdex_1_1parser_1_1basic__html__ident-members.html +++ b/classstdex_1_1parser_1_1basic__html__ident-members.html @@ -107,7 +107,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__html__ident.html b/classstdex_1_1parser_1_1basic__html__ident.html index 82851efd5..e6c7dc715 100644 --- a/classstdex_1_1parser_1_1basic__html__ident.html +++ b/classstdex_1_1parser_1_1basic__html__ident.html @@ -197,7 +197,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__html__tag-members.html b/classstdex_1_1parser_1_1basic__html__tag-members.html index e7a341221..97004b7ce 100644 --- a/classstdex_1_1parser_1_1basic__html__tag-members.html +++ b/classstdex_1_1parser_1_1basic__html__tag-members.html @@ -113,7 +113,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__html__tag.html b/classstdex_1_1parser_1_1basic__html__tag.html index b50ebcabd..80cab0f80 100644 --- a/classstdex_1_1parser_1_1basic__html__tag.html +++ b/classstdex_1_1parser_1_1basic__html__tag.html @@ -255,7 +255,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__html__value-members.html b/classstdex_1_1parser_1_1basic__html__value-members.html index ec1917f81..c255bb0ac 100644 --- a/classstdex_1_1parser_1_1basic__html__value-members.html +++ b/classstdex_1_1parser_1_1basic__html__value-members.html @@ -108,7 +108,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__html__value.html b/classstdex_1_1parser_1_1basic__html__value.html index 09b3187fd..12e52d381 100644 --- a/classstdex_1_1parser_1_1basic__html__value.html +++ b/classstdex_1_1parser_1_1basic__html__value.html @@ -237,7 +237,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__iban-members.html b/classstdex_1_1parser_1_1basic__iban-members.html index 16ed1d8be..6acc8f2c1 100644 --- a/classstdex_1_1parser_1_1basic__iban-members.html +++ b/classstdex_1_1parser_1_1basic__iban-members.html @@ -113,7 +113,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__iban.html b/classstdex_1_1parser_1_1basic__iban.html index e9033456a..ed4dd3ed7 100644 --- a/classstdex_1_1parser_1_1basic__iban.html +++ b/classstdex_1_1parser_1_1basic__iban.html @@ -257,7 +257,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 3c9111089..22b8584b3 100644 --- a/classstdex_1_1parser_1_1basic__integer-members.html +++ b/classstdex_1_1parser_1_1basic__integer-members.html @@ -109,7 +109,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__integer.html b/classstdex_1_1parser_1_1basic__integer.html index 0b600e1c1..281b01877 100644 --- a/classstdex_1_1parser_1_1basic__integer.html +++ b/classstdex_1_1parser_1_1basic__integer.html @@ -197,7 +197,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 5ec581a7a..e4c9b9fa2 100644 --- a/classstdex_1_1parser_1_1basic__integer10-members.html +++ b/classstdex_1_1parser_1_1basic__integer10-members.html @@ -120,7 +120,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__integer10.html b/classstdex_1_1parser_1_1basic__integer10.html index 437704375..eaa99e8e3 100644 --- a/classstdex_1_1parser_1_1basic__integer10.html +++ b/classstdex_1_1parser_1_1basic__integer10.html @@ -247,7 +247,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 db22dd047..00fa7da56 100644 --- a/classstdex_1_1parser_1_1basic__integer10ts-members.html +++ b/classstdex_1_1parser_1_1basic__integer10ts-members.html @@ -114,7 +114,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__integer10ts.html b/classstdex_1_1parser_1_1basic__integer10ts.html index 35f1fa347..c48c6dd92 100644 --- a/classstdex_1_1parser_1_1basic__integer10ts.html +++ b/classstdex_1_1parser_1_1basic__integer10ts.html @@ -261,7 +261,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 7598b6700..29af6727a 100644 --- a/classstdex_1_1parser_1_1basic__integer16-members.html +++ b/classstdex_1_1parser_1_1basic__integer16-members.html @@ -126,7 +126,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__integer16.html b/classstdex_1_1parser_1_1basic__integer16.html index 43246cccf..274dcd8da 100644 --- a/classstdex_1_1parser_1_1basic__integer16.html +++ b/classstdex_1_1parser_1_1basic__integer16.html @@ -265,7 +265,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 aaec52e38..5eb04bbb5 100644 --- a/classstdex_1_1parser_1_1basic__ipv4__address-members.html +++ b/classstdex_1_1parser_1_1basic__ipv4__address-members.html @@ -121,7 +121,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__ipv4__address.html b/classstdex_1_1parser_1_1basic__ipv4__address.html index caebe6187..1a6a2677d 100644 --- a/classstdex_1_1parser_1_1basic__ipv4__address.html +++ b/classstdex_1_1parser_1_1basic__ipv4__address.html @@ -278,7 +278,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 218e3adb8..cc87fa5c1 100644 --- a/classstdex_1_1parser_1_1basic__ipv6__address-members.html +++ b/classstdex_1_1parser_1_1basic__ipv6__address-members.html @@ -129,7 +129,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__ipv6__address.html b/classstdex_1_1parser_1_1basic__ipv6__address.html index 3e61d412e..278fe12fe 100644 --- a/classstdex_1_1parser_1_1basic__ipv6__address.html +++ b/classstdex_1_1parser_1_1basic__ipv6__address.html @@ -303,7 +303,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 94f0f52d0..dcd2adb90 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 @@ -108,7 +108,7 @@ $(function(){ initResizable(false); }); 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 ae4b7a519..11d7e9b23 100644 --- a/classstdex_1_1parser_1_1basic__ipv6__scope__id__char.html +++ b/classstdex_1_1parser_1_1basic__ipv6__scope__id__char.html @@ -204,7 +204,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 c96aa7734..e2e460e1b 100644 --- a/classstdex_1_1parser_1_1basic__iterations-members.html +++ b/classstdex_1_1parser_1_1basic__iterations-members.html @@ -112,7 +112,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__iterations.html b/classstdex_1_1parser_1_1basic__iterations.html index 678367bd1..c6643dff0 100644 --- a/classstdex_1_1parser_1_1basic__iterations.html +++ b/classstdex_1_1parser_1_1basic__iterations.html @@ -224,7 +224,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 337734a8e..14cea820f 100644 --- a/classstdex_1_1parser_1_1basic__json__string-members.html +++ b/classstdex_1_1parser_1_1basic__json__string-members.html @@ -120,7 +120,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__json__string.html b/classstdex_1_1parser_1_1basic__json__string.html index 27f05f12a..718a9bbda 100644 --- a/classstdex_1_1parser_1_1basic__json__string.html +++ b/classstdex_1_1parser_1_1basic__json__string.html @@ -273,7 +273,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__mime__type-members.html b/classstdex_1_1parser_1_1basic__mime__type-members.html index 8e1fe2d29..435da88e1 100644 --- a/classstdex_1_1parser_1_1basic__mime__type-members.html +++ b/classstdex_1_1parser_1_1basic__mime__type-members.html @@ -110,7 +110,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__mime__type.html b/classstdex_1_1parser_1_1basic__mime__type.html index a4ff8b3d3..fe99b9155 100644 --- a/classstdex_1_1parser_1_1basic__mime__type.html +++ b/classstdex_1_1parser_1_1basic__mime__type.html @@ -245,7 +245,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 8835f38a4..75c677ae1 100644 --- a/classstdex_1_1parser_1_1basic__mixed__numeral-members.html +++ b/classstdex_1_1parser_1_1basic__mixed__numeral-members.html @@ -114,7 +114,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__mixed__numeral.html b/classstdex_1_1parser_1_1basic__mixed__numeral.html index a3e157b02..713e833ed 100644 --- a/classstdex_1_1parser_1_1basic__mixed__numeral.html +++ b/classstdex_1_1parser_1_1basic__mixed__numeral.html @@ -260,7 +260,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 920731262..d573a2837 100644 --- a/classstdex_1_1parser_1_1basic__monetary__numeral-members.html +++ b/classstdex_1_1parser_1_1basic__monetary__numeral-members.html @@ -115,7 +115,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__monetary__numeral.html b/classstdex_1_1parser_1_1basic__monetary__numeral.html index 7fc1df994..ee71ca156 100644 --- a/classstdex_1_1parser_1_1basic__monetary__numeral.html +++ b/classstdex_1_1parser_1_1basic__monetary__numeral.html @@ -264,7 +264,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 ecaef5e60..ce5f10318 100644 --- a/classstdex_1_1parser_1_1basic__noop-members.html +++ b/classstdex_1_1parser_1_1basic__noop-members.html @@ -107,7 +107,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__noop.html b/classstdex_1_1parser_1_1basic__noop.html index b357804ea..22839b6d9 100644 --- a/classstdex_1_1parser_1_1basic__noop.html +++ b/classstdex_1_1parser_1_1basic__noop.html @@ -197,7 +197,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 b377ed5cd..fc97d874d 100644 --- a/classstdex_1_1parser_1_1basic__parser-members.html +++ b/classstdex_1_1parser_1_1basic__parser-members.html @@ -107,7 +107,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__parser.html b/classstdex_1_1parser_1_1basic__parser.html index bfbc9bbb7..cc5c9bc9a 100644 --- a/classstdex_1_1parser_1_1basic__parser.html +++ b/classstdex_1_1parser_1_1basic__parser.html @@ -255,7 +255,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__permutation-members.html b/classstdex_1_1parser_1_1basic__permutation-members.html index 5371c7290..f12f07c3d 100644 --- a/classstdex_1_1parser_1_1basic__permutation-members.html +++ b/classstdex_1_1parser_1_1basic__permutation-members.html @@ -114,7 +114,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__permutation.html b/classstdex_1_1parser_1_1basic__permutation.html index fb87e8a5d..f90905d72 100644 --- a/classstdex_1_1parser_1_1basic__permutation.html +++ b/classstdex_1_1parser_1_1basic__permutation.html @@ -225,7 +225,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 5072abbb6..798a697d6 100644 --- a/classstdex_1_1parser_1_1basic__phone__number-members.html +++ b/classstdex_1_1parser_1_1basic__phone__number-members.html @@ -115,7 +115,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__phone__number.html b/classstdex_1_1parser_1_1basic__phone__number.html index 4d7a0a67b..2d3a019a5 100644 --- a/classstdex_1_1parser_1_1basic__phone__number.html +++ b/classstdex_1_1parser_1_1basic__phone__number.html @@ -259,7 +259,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 f4c652a40..4a3433387 100644 --- a/classstdex_1_1parser_1_1basic__punct__cu-members.html +++ b/classstdex_1_1parser_1_1basic__punct__cu-members.html @@ -109,7 +109,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__punct__cu.html b/classstdex_1_1parser_1_1basic__punct__cu.html index f5a7a5763..de87f22a8 100644 --- a/classstdex_1_1parser_1_1basic__punct__cu.html +++ b/classstdex_1_1parser_1_1basic__punct__cu.html @@ -211,7 +211,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 e11841ac6..ce261a863 100644 --- a/classstdex_1_1parser_1_1basic__roman__numeral-members.html +++ b/classstdex_1_1parser_1_1basic__roman__numeral-members.html @@ -119,7 +119,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__roman__numeral.html b/classstdex_1_1parser_1_1basic__roman__numeral.html index 0be1a0d0e..4a8754020 100644 --- a/classstdex_1_1parser_1_1basic__roman__numeral.html +++ b/classstdex_1_1parser_1_1basic__roman__numeral.html @@ -244,7 +244,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 9fe6c00c8..ef9e3cf53 100644 --- a/classstdex_1_1parser_1_1basic__scientific__numeral-members.html +++ b/classstdex_1_1parser_1_1basic__scientific__numeral-members.html @@ -119,7 +119,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__scientific__numeral.html b/classstdex_1_1parser_1_1basic__scientific__numeral.html index c6ed10220..4ded9b561 100644 --- a/classstdex_1_1parser_1_1basic__scientific__numeral.html +++ b/classstdex_1_1parser_1_1basic__scientific__numeral.html @@ -280,7 +280,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 8480f6d99..1d786e807 100644 --- a/classstdex_1_1parser_1_1basic__score-members.html +++ b/classstdex_1_1parser_1_1basic__score-members.html @@ -112,7 +112,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__score.html b/classstdex_1_1parser_1_1basic__score.html index 510365ee9..c8274a824 100644 --- a/classstdex_1_1parser_1_1basic__score.html +++ b/classstdex_1_1parser_1_1basic__score.html @@ -249,7 +249,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 4098fea3e..8f9b7211d 100644 --- a/classstdex_1_1parser_1_1basic__sequence-members.html +++ b/classstdex_1_1parser_1_1basic__sequence-members.html @@ -113,7 +113,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__sequence.html b/classstdex_1_1parser_1_1basic__sequence.html index 9f0ff545b..cf9a8d4ac 100644 --- a/classstdex_1_1parser_1_1basic__sequence.html +++ b/classstdex_1_1parser_1_1basic__sequence.html @@ -222,7 +222,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 bdff66b17..3e3e99e87 100644 --- a/classstdex_1_1parser_1_1basic__set-members.html +++ b/classstdex_1_1parser_1_1basic__set-members.html @@ -110,7 +110,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__set.html b/classstdex_1_1parser_1_1basic__set.html index 57165ade9..b7b9edc65 100644 --- a/classstdex_1_1parser_1_1basic__set.html +++ b/classstdex_1_1parser_1_1basic__set.html @@ -236,7 +236,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__si__reference-members.html b/classstdex_1_1parser_1_1basic__si__reference-members.html index c34ef7e73..9f4e54454 100644 --- a/classstdex_1_1parser_1_1basic__si__reference-members.html +++ b/classstdex_1_1parser_1_1basic__si__reference-members.html @@ -118,7 +118,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__si__reference.html b/classstdex_1_1parser_1_1basic__si__reference.html index bab79f8db..a28a80582 100644 --- a/classstdex_1_1parser_1_1basic__si__reference.html +++ b/classstdex_1_1parser_1_1basic__si__reference.html @@ -278,7 +278,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__si__reference__delimiter-members.html b/classstdex_1_1parser_1_1basic__si__reference__delimiter-members.html index fb7f31672..caf14edc3 100644 --- a/classstdex_1_1parser_1_1basic__si__reference__delimiter-members.html +++ b/classstdex_1_1parser_1_1basic__si__reference__delimiter-members.html @@ -108,7 +108,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__si__reference__delimiter.html b/classstdex_1_1parser_1_1basic__si__reference__delimiter.html index 761b141d2..2353306ea 100644 --- a/classstdex_1_1parser_1_1basic__si__reference__delimiter.html +++ b/classstdex_1_1parser_1_1basic__si__reference__delimiter.html @@ -205,7 +205,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__si__reference__part-members.html b/classstdex_1_1parser_1_1basic__si__reference__part-members.html index 5347e7c2d..f75f08bca 100644 --- a/classstdex_1_1parser_1_1basic__si__reference__part-members.html +++ b/classstdex_1_1parser_1_1basic__si__reference__part-members.html @@ -108,7 +108,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__si__reference__part.html b/classstdex_1_1parser_1_1basic__si__reference__part.html index 031a50bc9..c54d510f8 100644 --- a/classstdex_1_1parser_1_1basic__si__reference__part.html +++ b/classstdex_1_1parser_1_1basic__si__reference__part.html @@ -205,7 +205,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 46925bdc6..e6089b27d 100644 --- a/classstdex_1_1parser_1_1basic__signed__numeral-members.html +++ b/classstdex_1_1parser_1_1basic__signed__numeral-members.html @@ -112,7 +112,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__signed__numeral.html b/classstdex_1_1parser_1_1basic__signed__numeral.html index 1468c704a..a590c08b9 100644 --- a/classstdex_1_1parser_1_1basic__signed__numeral.html +++ b/classstdex_1_1parser_1_1basic__signed__numeral.html @@ -252,7 +252,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 49d690fcb..dc5db294e 100644 --- a/classstdex_1_1parser_1_1basic__space__cu-members.html +++ b/classstdex_1_1parser_1_1basic__space__cu-members.html @@ -109,7 +109,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__space__cu.html b/classstdex_1_1parser_1_1basic__space__cu.html index c208a7b3e..03c8671e7 100644 --- a/classstdex_1_1parser_1_1basic__space__cu.html +++ b/classstdex_1_1parser_1_1basic__space__cu.html @@ -211,7 +211,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 d6ef03caa..251db606e 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 @@ -109,7 +109,7 @@ $(function(){ initResizable(false); }); 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 30de6ec7c..40fd940e2 100644 --- a/classstdex_1_1parser_1_1basic__space__or__punct__cu.html +++ b/classstdex_1_1parser_1_1basic__space__or__punct__cu.html @@ -211,7 +211,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 2010ded2c..b8e43f0d6 100644 --- a/classstdex_1_1parser_1_1basic__string-members.html +++ b/classstdex_1_1parser_1_1basic__string-members.html @@ -109,7 +109,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__string.html b/classstdex_1_1parser_1_1basic__string.html index 019f1a4ed..26a427be1 100644 --- a/classstdex_1_1parser_1_1basic__string.html +++ b/classstdex_1_1parser_1_1basic__string.html @@ -211,7 +211,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 4fdb90e99..b0cd51285 100644 --- a/classstdex_1_1parser_1_1basic__string__branch-members.html +++ b/classstdex_1_1parser_1_1basic__string__branch-members.html @@ -120,7 +120,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__string__branch.html b/classstdex_1_1parser_1_1basic__string__branch.html index 14295182c..46715a34b 100644 --- a/classstdex_1_1parser_1_1basic__string__branch.html +++ b/classstdex_1_1parser_1_1basic__string__branch.html @@ -203,7 +203,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 1e49967e6..24f283921 100644 --- a/classstdex_1_1parser_1_1basic__time-members.html +++ b/classstdex_1_1parser_1_1basic__time-members.html @@ -114,7 +114,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__time.html b/classstdex_1_1parser_1_1basic__time.html index 5500e4e41..6c1de4eb7 100644 --- a/classstdex_1_1parser_1_1basic__time.html +++ b/classstdex_1_1parser_1_1basic__time.html @@ -255,7 +255,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 e3becb8bc..5b9b0eeac 100644 --- a/classstdex_1_1parser_1_1basic__url-members.html +++ b/classstdex_1_1parser_1_1basic__url-members.html @@ -124,7 +124,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__url.html b/classstdex_1_1parser_1_1basic__url.html index d9ecb809e..b12b60faa 100644 --- a/classstdex_1_1parser_1_1basic__url.html +++ b/classstdex_1_1parser_1_1basic__url.html @@ -285,7 +285,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 5b0e1e475..dfcb115e7 100644 --- a/classstdex_1_1parser_1_1basic__url__password__char-members.html +++ b/classstdex_1_1parser_1_1basic__url__password__char-members.html @@ -108,7 +108,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__url__password__char.html b/classstdex_1_1parser_1_1basic__url__password__char.html index 8d13f6513..008cbad06 100644 --- a/classstdex_1_1parser_1_1basic__url__password__char.html +++ b/classstdex_1_1parser_1_1basic__url__password__char.html @@ -204,7 +204,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 641a03210..2893dd349 100644 --- a/classstdex_1_1parser_1_1basic__url__path-members.html +++ b/classstdex_1_1parser_1_1basic__url__path-members.html @@ -114,7 +114,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__url__path.html b/classstdex_1_1parser_1_1basic__url__path.html index d44fee527..d920d20a2 100644 --- a/classstdex_1_1parser_1_1basic__url__path.html +++ b/classstdex_1_1parser_1_1basic__url__path.html @@ -255,7 +255,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 a1af79567..050599e8b 100644 --- a/classstdex_1_1parser_1_1basic__url__path__char-members.html +++ b/classstdex_1_1parser_1_1basic__url__path__char-members.html @@ -108,7 +108,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__url__path__char.html b/classstdex_1_1parser_1_1basic__url__path__char.html index 8c39ca7fa..a0633bc00 100644 --- a/classstdex_1_1parser_1_1basic__url__path__char.html +++ b/classstdex_1_1parser_1_1basic__url__path__char.html @@ -204,7 +204,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 e387eaf3f..ddcce7d48 100644 --- a/classstdex_1_1parser_1_1basic__url__username__char-members.html +++ b/classstdex_1_1parser_1_1basic__url__username__char-members.html @@ -108,7 +108,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1basic__url__username__char.html b/classstdex_1_1parser_1_1basic__url__username__char.html index 2b8dac322..178c904b9 100644 --- a/classstdex_1_1parser_1_1basic__url__username__char.html +++ b/classstdex_1_1parser_1_1basic__url__username__char.html @@ -204,7 +204,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 727dde745..ee4efb3ae 100644 --- a/classstdex_1_1parser_1_1http__agent-members.html +++ b/classstdex_1_1parser_1_1http__agent-members.html @@ -103,7 +103,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__agent.html b/classstdex_1_1parser_1_1http__agent.html index adf0c6863..c203d40d5 100644 --- a/classstdex_1_1parser_1_1http__agent.html +++ b/classstdex_1_1parser_1_1http__agent.html @@ -197,7 +197,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 e713b4ff7..5f9f43433 100644 --- a/classstdex_1_1parser_1_1http__any__type-members.html +++ b/classstdex_1_1parser_1_1http__any__type-members.html @@ -100,7 +100,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__any__type.html b/classstdex_1_1parser_1_1http__any__type.html index f9f3948b0..4b04d9946 100644 --- a/classstdex_1_1parser_1_1http__any__type.html +++ b/classstdex_1_1parser_1_1http__any__type.html @@ -156,7 +156,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 0c29dfa27..f51af6c3a 100644 --- a/classstdex_1_1parser_1_1http__asterisk-members.html +++ b/classstdex_1_1parser_1_1http__asterisk-members.html @@ -100,7 +100,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__asterisk.html b/classstdex_1_1parser_1_1http__asterisk.html index 79086cf94..7266342cb 100644 --- a/classstdex_1_1parser_1_1http__asterisk.html +++ b/classstdex_1_1parser_1_1http__asterisk.html @@ -156,7 +156,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 cb2695103..ed4407746 100644 --- a/classstdex_1_1parser_1_1http__cookie-members.html +++ b/classstdex_1_1parser_1_1http__cookie-members.html @@ -105,7 +105,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__cookie.html b/classstdex_1_1parser_1_1http__cookie.html index 04591856f..672162f63 100644 --- a/classstdex_1_1parser_1_1http__cookie.html +++ b/classstdex_1_1parser_1_1http__cookie.html @@ -207,7 +207,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 dea13a430..c19fdd885 100644 --- a/classstdex_1_1parser_1_1http__cookie__parameter-members.html +++ b/classstdex_1_1parser_1_1http__cookie__parameter-members.html @@ -104,7 +104,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__cookie__parameter.html b/classstdex_1_1parser_1_1http__cookie__parameter.html index 367a7cf6c..e61ef431c 100644 --- a/classstdex_1_1parser_1_1http__cookie__parameter.html +++ b/classstdex_1_1parser_1_1http__cookie__parameter.html @@ -201,7 +201,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 fea9b9a70..33855c501 100644 --- a/classstdex_1_1parser_1_1http__header-members.html +++ b/classstdex_1_1parser_1_1http__header-members.html @@ -104,7 +104,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__header.html b/classstdex_1_1parser_1_1http__header.html index 1242d9f32..82bdfc117 100644 --- a/classstdex_1_1parser_1_1http__header.html +++ b/classstdex_1_1parser_1_1http__header.html @@ -201,7 +201,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 d300181fe..26b40e618 100644 --- a/classstdex_1_1parser_1_1http__language-members.html +++ b/classstdex_1_1parser_1_1http__language-members.html @@ -102,7 +102,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__language.html b/classstdex_1_1parser_1_1http__language.html index 7f6a552e8..8bac5ab03 100644 --- a/classstdex_1_1parser_1_1http__language.html +++ b/classstdex_1_1parser_1_1http__language.html @@ -194,7 +194,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 bc41a41d4..2622900e5 100644 --- a/classstdex_1_1parser_1_1http__line__break-members.html +++ b/classstdex_1_1parser_1_1http__line__break-members.html @@ -100,7 +100,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__line__break.html b/classstdex_1_1parser_1_1http__line__break.html index f74ca222f..ae389059f 100644 --- a/classstdex_1_1parser_1_1http__line__break.html +++ b/classstdex_1_1parser_1_1http__line__break.html @@ -156,7 +156,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 7483ffcfd..7ffe4bade 100644 --- a/classstdex_1_1parser_1_1http__media__range-members.html +++ b/classstdex_1_1parser_1_1http__media__range-members.html @@ -104,7 +104,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__media__range.html b/classstdex_1_1parser_1_1http__media__range.html index e44b73176..237dff0a4 100644 --- a/classstdex_1_1parser_1_1http__media__range.html +++ b/classstdex_1_1parser_1_1http__media__range.html @@ -202,7 +202,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 728005674..3809efbd3 100644 --- a/classstdex_1_1parser_1_1http__media__type-members.html +++ b/classstdex_1_1parser_1_1http__media__type-members.html @@ -105,7 +105,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__media__type.html b/classstdex_1_1parser_1_1http__media__type.html index 1f9e4a041..8abbb4e49 100644 --- a/classstdex_1_1parser_1_1http__media__type.html +++ b/classstdex_1_1parser_1_1http__media__type.html @@ -248,7 +248,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 85b415f0c..80c16a2ee 100644 --- a/classstdex_1_1parser_1_1http__parameter-members.html +++ b/classstdex_1_1parser_1_1http__parameter-members.html @@ -104,7 +104,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__parameter.html b/classstdex_1_1parser_1_1http__parameter.html index 2a1a97871..59948a7f6 100644 --- a/classstdex_1_1parser_1_1http__parameter.html +++ b/classstdex_1_1parser_1_1http__parameter.html @@ -203,7 +203,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 6130835ac..2e6bef823 100644 --- a/classstdex_1_1parser_1_1http__protocol-members.html +++ b/classstdex_1_1parser_1_1http__protocol-members.html @@ -106,7 +106,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__protocol.html b/classstdex_1_1parser_1_1http__protocol.html index 81b11e790..9aa8ade0d 100644 --- a/classstdex_1_1parser_1_1http__protocol.html +++ b/classstdex_1_1parser_1_1http__protocol.html @@ -207,7 +207,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 4ce8d2bcc..338ebc6b0 100644 --- a/classstdex_1_1parser_1_1http__quoted__string-members.html +++ b/classstdex_1_1parser_1_1http__quoted__string-members.html @@ -103,7 +103,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__quoted__string.html b/classstdex_1_1parser_1_1http__quoted__string.html index 8ab79b86a..9bd6effbc 100644 --- a/classstdex_1_1parser_1_1http__quoted__string.html +++ b/classstdex_1_1parser_1_1http__quoted__string.html @@ -199,7 +199,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 98904593e..6a0ed8ed7 100644 --- a/classstdex_1_1parser_1_1http__request-members.html +++ b/classstdex_1_1parser_1_1http__request-members.html @@ -106,7 +106,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__request.html b/classstdex_1_1parser_1_1http__request.html index 6efbbbe97..7350c1b04 100644 --- a/classstdex_1_1parser_1_1http__request.html +++ b/classstdex_1_1parser_1_1http__request.html @@ -207,7 +207,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 a9c287fdc..d4fa2e570 100644 --- a/classstdex_1_1parser_1_1http__space-members.html +++ b/classstdex_1_1parser_1_1http__space-members.html @@ -101,7 +101,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__space.html b/classstdex_1_1parser_1_1http__space.html index 275aad74c..7bf404ae0 100644 --- a/classstdex_1_1parser_1_1http__space.html +++ b/classstdex_1_1parser_1_1http__space.html @@ -163,7 +163,7 @@ virtual void invalidate diff --git a/classstdex_1_1parser_1_1http__text__char-members.html b/classstdex_1_1parser_1_1http__text__char-members.html index bde7bfa7d..d709d4ff4 100644 --- a/classstdex_1_1parser_1_1http__text__char-members.html +++ b/classstdex_1_1parser_1_1http__text__char-members.html @@ -101,7 +101,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__text__char.html b/classstdex_1_1parser_1_1http__text__char.html index 878fd986a..a5ea45105 100644 --- a/classstdex_1_1parser_1_1http__text__char.html +++ b/classstdex_1_1parser_1_1http__text__char.html @@ -163,7 +163,7 @@ virtual void invalidate diff --git a/classstdex_1_1parser_1_1http__token-members.html b/classstdex_1_1parser_1_1http__token-members.html index 6b74f1f58..8b470ae3e 100644 --- a/classstdex_1_1parser_1_1http__token-members.html +++ b/classstdex_1_1parser_1_1http__token-members.html @@ -100,7 +100,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__token.html b/classstdex_1_1parser_1_1http__token.html index b1d9b0314..88ffcbf6d 100644 --- a/classstdex_1_1parser_1_1http__token.html +++ b/classstdex_1_1parser_1_1http__token.html @@ -156,7 +156,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 003ee2a53..0248a4c4e 100644 --- a/classstdex_1_1parser_1_1http__url-members.html +++ b/classstdex_1_1parser_1_1http__url-members.html @@ -106,7 +106,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__url.html b/classstdex_1_1parser_1_1http__url.html index 1c66e14ab..719ba0af5 100644 --- a/classstdex_1_1parser_1_1http__url.html +++ b/classstdex_1_1parser_1_1http__url.html @@ -206,7 +206,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 4f3678360..14f120c0e 100644 --- a/classstdex_1_1parser_1_1http__url__parameter-members.html +++ b/classstdex_1_1parser_1_1http__url__parameter-members.html @@ -103,7 +103,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__url__parameter.html b/classstdex_1_1parser_1_1http__url__parameter.html index 091e70cdd..c65acc3a8 100644 --- a/classstdex_1_1parser_1_1http__url__parameter.html +++ b/classstdex_1_1parser_1_1http__url__parameter.html @@ -197,7 +197,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 097b76378..fb94090a9 100644 --- a/classstdex_1_1parser_1_1http__url__path-members.html +++ b/classstdex_1_1parser_1_1http__url__path-members.html @@ -102,7 +102,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__url__path.html b/classstdex_1_1parser_1_1http__url__path.html index a8101c9cf..29dc769e6 100644 --- a/classstdex_1_1parser_1_1http__url__path.html +++ b/classstdex_1_1parser_1_1http__url__path.html @@ -195,7 +195,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 bcfde1000..5b80a5700 100644 --- a/classstdex_1_1parser_1_1http__url__path__segment-members.html +++ b/classstdex_1_1parser_1_1http__url__path__segment-members.html @@ -100,7 +100,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__url__path__segment.html b/classstdex_1_1parser_1_1http__url__path__segment.html index 53fe41155..30c3baebf 100644 --- a/classstdex_1_1parser_1_1http__url__path__segment.html +++ b/classstdex_1_1parser_1_1http__url__path__segment.html @@ -156,7 +156,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 fbada1872..514984b09 100644 --- a/classstdex_1_1parser_1_1http__url__port-members.html +++ b/classstdex_1_1parser_1_1http__url__port-members.html @@ -103,7 +103,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__url__port.html b/classstdex_1_1parser_1_1http__url__port.html index e15e92108..07eb5b04f 100644 --- a/classstdex_1_1parser_1_1http__url__port.html +++ b/classstdex_1_1parser_1_1http__url__port.html @@ -197,7 +197,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 78e7ca78b..69f2cc3c7 100644 --- a/classstdex_1_1parser_1_1http__url__server-members.html +++ b/classstdex_1_1parser_1_1http__url__server-members.html @@ -100,7 +100,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__url__server.html b/classstdex_1_1parser_1_1http__url__server.html index 9db8ada5f..db7569e85 100644 --- a/classstdex_1_1parser_1_1http__url__server.html +++ b/classstdex_1_1parser_1_1http__url__server.html @@ -156,7 +156,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 05e9427d1..f8b9bee6f 100644 --- a/classstdex_1_1parser_1_1http__value-members.html +++ b/classstdex_1_1parser_1_1http__value-members.html @@ -103,7 +103,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__value.html b/classstdex_1_1parser_1_1http__value.html index 91104ef5b..5185232db 100644 --- a/classstdex_1_1parser_1_1http__value.html +++ b/classstdex_1_1parser_1_1http__value.html @@ -199,7 +199,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 0c3abf0b6..b0ad194a1 100644 --- a/classstdex_1_1parser_1_1http__value__collection-members.html +++ b/classstdex_1_1parser_1_1http__value__collection-members.html @@ -99,7 +99,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__value__collection.html b/classstdex_1_1parser_1_1http__value__collection.html index d8be8d6b8..4c1408f56 100644 --- a/classstdex_1_1parser_1_1http__value__collection.html +++ b/classstdex_1_1parser_1_1http__value__collection.html @@ -122,7 +122,7 @@ class stdex::parser::http_value_collection< KEY, T >

Collection of

diff --git a/classstdex_1_1parser_1_1http__weight-members.html b/classstdex_1_1parser_1_1http__weight-members.html index 16dcfb068..72f8e0ce9 100644 --- a/classstdex_1_1parser_1_1http__weight-members.html +++ b/classstdex_1_1parser_1_1http__weight-members.html @@ -103,7 +103,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__weight.html b/classstdex_1_1parser_1_1http__weight.html index b2b779f2b..ab0472d1f 100644 --- a/classstdex_1_1parser_1_1http__weight.html +++ b/classstdex_1_1parser_1_1http__weight.html @@ -198,7 +198,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 05fc86aca..3c51bd8c6 100644 --- a/classstdex_1_1parser_1_1http__weighted__value-members.html +++ b/classstdex_1_1parser_1_1http__weighted__value-members.html @@ -105,7 +105,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1http__weighted__value.html b/classstdex_1_1parser_1_1http__weighted__value.html index 92ddb26a9..12ae8e9b5 100644 --- a/classstdex_1_1parser_1_1http__weighted__value.html +++ b/classstdex_1_1parser_1_1http__weighted__value.html @@ -206,7 +206,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 e75cf36a5..c4d26c8bc 100644 --- a/classstdex_1_1parser_1_1parser__collection-members.html +++ b/classstdex_1_1parser_1_1parser__collection-members.html @@ -111,7 +111,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1parser__collection.html b/classstdex_1_1parser_1_1parser__collection.html index 17b1aeb13..7c8265e7c 100644 --- a/classstdex_1_1parser_1_1parser__collection.html +++ b/classstdex_1_1parser_1_1parser__collection.html @@ -206,7 +206,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 77ec97245..23129b205 100644 --- a/classstdex_1_1parser_1_1sgml__any__cp-members.html +++ b/classstdex_1_1parser_1_1sgml__any__cp-members.html @@ -101,7 +101,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1sgml__any__cp.html b/classstdex_1_1parser_1_1sgml__any__cp.html index 8c62d2f3e..0e0a8d30c 100644 --- a/classstdex_1_1parser_1_1sgml__any__cp.html +++ b/classstdex_1_1parser_1_1sgml__any__cp.html @@ -168,7 +168,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 e4dc262cd..3a5eb7565 100644 --- a/classstdex_1_1parser_1_1sgml__cp-members.html +++ b/classstdex_1_1parser_1_1sgml__cp-members.html @@ -103,7 +103,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1sgml__cp.html b/classstdex_1_1parser_1_1sgml__cp.html index fe230062c..bb6b73191 100644 --- a/classstdex_1_1parser_1_1sgml__cp.html +++ b/classstdex_1_1parser_1_1sgml__cp.html @@ -173,7 +173,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 bf412909c..87ac9df5c 100644 --- a/classstdex_1_1parser_1_1sgml__cp__set-members.html +++ b/classstdex_1_1parser_1_1sgml__cp__set-members.html @@ -102,7 +102,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1sgml__cp__set.html b/classstdex_1_1parser_1_1sgml__cp__set.html index 587fae8be..c7d7663c2 100644 --- a/classstdex_1_1parser_1_1sgml__cp__set.html +++ b/classstdex_1_1parser_1_1sgml__cp__set.html @@ -182,7 +182,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 d01c9f504..61ff09904 100644 --- a/classstdex_1_1parser_1_1sgml__dns__domain__char-members.html +++ b/classstdex_1_1parser_1_1sgml__dns__domain__char-members.html @@ -102,7 +102,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1sgml__dns__domain__char.html b/classstdex_1_1parser_1_1sgml__dns__domain__char.html index 7f2569b58..e48e22009 100644 --- a/classstdex_1_1parser_1_1sgml__dns__domain__char.html +++ b/classstdex_1_1parser_1_1sgml__dns__domain__char.html @@ -177,7 +177,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 511a43a8d..6ccf6e99c 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 @@ -101,7 +101,7 @@ $(function(){ initResizable(false); }); 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 7b332139c..176fdac63 100644 --- a/classstdex_1_1parser_1_1sgml__ipv6__scope__id__char.html +++ b/classstdex_1_1parser_1_1sgml__ipv6__scope__id__char.html @@ -163,7 +163,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 2f8cfa6f5..a4756950d 100644 --- a/classstdex_1_1parser_1_1sgml__punct__cp-members.html +++ b/classstdex_1_1parser_1_1sgml__punct__cp-members.html @@ -101,7 +101,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1sgml__punct__cp.html b/classstdex_1_1parser_1_1sgml__punct__cp.html index a888eda6f..1f5fe194d 100644 --- a/classstdex_1_1parser_1_1sgml__punct__cp.html +++ b/classstdex_1_1parser_1_1sgml__punct__cp.html @@ -172,7 +172,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 6f8475c08..d82d036e9 100644 --- a/classstdex_1_1parser_1_1sgml__space__cp-members.html +++ b/classstdex_1_1parser_1_1sgml__space__cp-members.html @@ -101,7 +101,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1sgml__space__cp.html b/classstdex_1_1parser_1_1sgml__space__cp.html index 1df89fa1f..f1accb7a6 100644 --- a/classstdex_1_1parser_1_1sgml__space__cp.html +++ b/classstdex_1_1parser_1_1sgml__space__cp.html @@ -172,7 +172,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 56ee9f8b5..7203dca30 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 @@ -101,7 +101,7 @@ $(function(){ initResizable(false); }); 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 080f7d183..579758fd3 100644 --- a/classstdex_1_1parser_1_1sgml__space__or__punct__cp.html +++ b/classstdex_1_1parser_1_1sgml__space__or__punct__cp.html @@ -172,7 +172,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 b3b7194cb..7ac0729fb 100644 --- a/classstdex_1_1parser_1_1sgml__string-members.html +++ b/classstdex_1_1parser_1_1sgml__string-members.html @@ -102,7 +102,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1sgml__string.html b/classstdex_1_1parser_1_1sgml__string.html index 094b689c9..da0513569 100644 --- a/classstdex_1_1parser_1_1sgml__string.html +++ b/classstdex_1_1parser_1_1sgml__string.html @@ -170,7 +170,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 3b8edf2e9..109c9de83 100644 --- a/classstdex_1_1parser_1_1sgml__url__password__char-members.html +++ b/classstdex_1_1parser_1_1sgml__url__password__char-members.html @@ -101,7 +101,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1sgml__url__password__char.html b/classstdex_1_1parser_1_1sgml__url__password__char.html index cd8b1e332..e2deabb27 100644 --- a/classstdex_1_1parser_1_1sgml__url__password__char.html +++ b/classstdex_1_1parser_1_1sgml__url__password__char.html @@ -168,7 +168,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 a8fd452aa..bc84f9a40 100644 --- a/classstdex_1_1parser_1_1sgml__url__path__char-members.html +++ b/classstdex_1_1parser_1_1sgml__url__path__char-members.html @@ -101,7 +101,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1sgml__url__path__char.html b/classstdex_1_1parser_1_1sgml__url__path__char.html index 9ea2428ff..b4481460d 100644 --- a/classstdex_1_1parser_1_1sgml__url__path__char.html +++ b/classstdex_1_1parser_1_1sgml__url__path__char.html @@ -168,7 +168,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 5d88f006e..8d5263c7f 100644 --- a/classstdex_1_1parser_1_1sgml__url__username__char-members.html +++ b/classstdex_1_1parser_1_1sgml__url__username__char-members.html @@ -101,7 +101,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1parser_1_1sgml__url__username__char.html b/classstdex_1_1parser_1_1sgml__url__username__char.html index 037c74fcb..3997b43ab 100644 --- a/classstdex_1_1parser_1_1sgml__url__username__char.html +++ b/classstdex_1_1parser_1_1sgml__url__username__char.html @@ -168,7 +168,7 @@ std::locale m_locale diff --git a/classstdex_1_1pool-members.html b/classstdex_1_1pool-members.html index 21514598d..650ac0552 100644 --- a/classstdex_1_1pool-members.html +++ b/classstdex_1_1pool-members.html @@ -102,7 +102,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1pool.html b/classstdex_1_1pool.html index 0f06ba9ce..b4381c490 100644 --- a/classstdex_1_1pool.html +++ b/classstdex_1_1pool.html @@ -207,7 +207,7 @@ template<class T > diff --git a/classstdex_1_1progress-members.html b/classstdex_1_1progress-members.html index 7fb4213a9..79423c892 100644 --- a/classstdex_1_1progress-members.html +++ b/classstdex_1_1progress-members.html @@ -104,7 +104,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1progress.html b/classstdex_1_1progress.html index 3994101fd..f09869eb1 100644 --- a/classstdex_1_1progress.html +++ b/classstdex_1_1progress.html @@ -326,7 +326,7 @@ template<class T > diff --git a/classstdex_1_1progress__switcher-members.html b/classstdex_1_1progress__switcher-members.html index db24151a4..3f6f06629 100644 --- a/classstdex_1_1progress__switcher-members.html +++ b/classstdex_1_1progress__switcher-members.html @@ -116,7 +116,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1progress__switcher.html b/classstdex_1_1progress__switcher.html index 256ce4cb6..2819e6548 100644 --- a/classstdex_1_1progress__switcher.html +++ b/classstdex_1_1progress__switcher.html @@ -179,7 +179,7 @@ class stdex::progress_switcher< T >

Progress indicator switcher. <

diff --git a/classstdex_1_1ref__unique__ptr-members.html b/classstdex_1_1ref__unique__ptr-members.html index 74b02c061..14b021215 100644 --- a/classstdex_1_1ref__unique__ptr-members.html +++ b/classstdex_1_1ref__unique__ptr-members.html @@ -105,7 +105,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1ref__unique__ptr.html b/classstdex_1_1ref__unique__ptr.html index 3a6dc2b53..2100e2b3d 100644 --- a/classstdex_1_1ref__unique__ptr.html +++ b/classstdex_1_1ref__unique__ptr.html @@ -273,7 +273,7 @@ template<typename T , typename D > diff --git a/classstdex_1_1ref__unique__ptr_3_01_t_0f_0e_00_01_d_01_4-members.html b/classstdex_1_1ref__unique__ptr_3_01_t_0f_0e_00_01_d_01_4-members.html index 9c3bcf103..0cee2773d 100644 --- a/classstdex_1_1ref__unique__ptr_3_01_t_0f_0e_00_01_d_01_4-members.html +++ b/classstdex_1_1ref__unique__ptr_3_01_t_0f_0e_00_01_d_01_4-members.html @@ -105,7 +105,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1ref__unique__ptr_3_01_t_0f_0e_00_01_d_01_4.html b/classstdex_1_1ref__unique__ptr_3_01_t_0f_0e_00_01_d_01_4.html index 871b743b6..3aa3c07bb 100644 --- a/classstdex_1_1ref__unique__ptr_3_01_t_0f_0e_00_01_d_01_4.html +++ b/classstdex_1_1ref__unique__ptr_3_01_t_0f_0e_00_01_d_01_4.html @@ -273,7 +273,7 @@ template<typename T , typename D > diff --git a/classstdex_1_1ring-members.html b/classstdex_1_1ring-members.html index fed78513e..73ece3c82 100644 --- a/classstdex_1_1ring-members.html +++ b/classstdex_1_1ring-members.html @@ -115,7 +115,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1ring.html b/classstdex_1_1ring.html index cadfab698..c30f7ee38 100644 --- a/classstdex_1_1ring.html +++ b/classstdex_1_1ring.html @@ -309,7 +309,7 @@ template<class T , size_t N_cap> diff --git a/classstdex_1_1sanitizing__allocator-members.html b/classstdex_1_1sanitizing__allocator-members.html index 169f1cfbb..59058f336 100644 --- a/classstdex_1_1sanitizing__allocator-members.html +++ b/classstdex_1_1sanitizing__allocator-members.html @@ -102,7 +102,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1sanitizing__allocator.html b/classstdex_1_1sanitizing__allocator.html index 66ccd6abb..a6a6b7f3e 100644 --- a/classstdex_1_1sanitizing__allocator.html +++ b/classstdex_1_1sanitizing__allocator.html @@ -144,7 +144,7 @@ class stdex::sanitizing_allocator< T >

An allocator template that

diff --git a/classstdex_1_1sanitizing__blob-members.html b/classstdex_1_1sanitizing__blob-members.html index 377dd7097..6dce4ec06 100644 --- a/classstdex_1_1sanitizing__blob-members.html +++ b/classstdex_1_1sanitizing__blob-members.html @@ -101,7 +101,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1sanitizing__blob.html b/classstdex_1_1sanitizing__blob.html index 19630929d..6e0c1bf3a 100644 --- a/classstdex_1_1sanitizing__blob.html +++ b/classstdex_1_1sanitizing__blob.html @@ -117,7 +117,7 @@ class stdex::sanitizing_blob< N >

Sanitizing BLOB.

diff --git a/classstdex_1_1scoped__executor-members.html b/classstdex_1_1scoped__executor-members.html index 3e3dc5f74..3713e5c3f 100644 --- a/classstdex_1_1scoped__executor-members.html +++ b/classstdex_1_1scoped__executor-members.html @@ -100,7 +100,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1scoped__executor.html b/classstdex_1_1scoped__executor.html index 23b7c9654..9cd1089d4 100644 --- a/classstdex_1_1scoped__executor.html +++ b/classstdex_1_1scoped__executor.html @@ -162,7 +162,7 @@ template<typename F_init , typename F_done > diff --git a/classstdex_1_1sha1__hash-members.html b/classstdex_1_1sha1__hash-members.html index e79682863..46ff901ab 100644 --- a/classstdex_1_1sha1__hash-members.html +++ b/classstdex_1_1sha1__hash-members.html @@ -107,7 +107,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1sha1__hash.html b/classstdex_1_1sha1__hash.html index fd53bfab0..84aa4d4f8 100644 --- a/classstdex_1_1sha1__hash.html +++ b/classstdex_1_1sha1__hash.html @@ -275,7 +275,7 @@ uint32_t m_temp [16] diff --git a/classstdex_1_1spinlock-members.html b/classstdex_1_1spinlock-members.html index 697207a5b..83cd082b7 100644 --- a/classstdex_1_1spinlock-members.html +++ b/classstdex_1_1spinlock-members.html @@ -101,7 +101,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1spinlock.html b/classstdex_1_1spinlock.html index 08c9a5c9c..8721ce6f6 100644 --- a/classstdex_1_1spinlock.html +++ b/classstdex_1_1spinlock.html @@ -153,7 +153,7 @@ void unlock () noexcep diff --git a/classstdex_1_1stream_1_1async__reader-members.html b/classstdex_1_1stream_1_1async__reader-members.html index 9dc5c01da..f3636be4b 100644 --- a/classstdex_1_1stream_1_1async__reader-members.html +++ b/classstdex_1_1stream_1_1async__reader-members.html @@ -169,7 +169,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1stream_1_1async__reader.html b/classstdex_1_1stream_1_1async__reader.html index 2143848ae..24e5cb492 100644 --- a/classstdex_1_1stream_1_1async__reader.html +++ b/classstdex_1_1stream_1_1async__reader.html @@ -418,7 +418,7 @@ template<size_t N_cap = default_async_limit> diff --git a/classstdex_1_1stream_1_1async__writer-members.html b/classstdex_1_1stream_1_1async__writer-members.html index 2b61f6d55..4ab67a7b5 100644 --- a/classstdex_1_1stream_1_1async__writer-members.html +++ b/classstdex_1_1stream_1_1async__writer-members.html @@ -169,7 +169,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1stream_1_1async__writer.html b/classstdex_1_1stream_1_1async__writer.html index 1cd4732bf..4aac31a63 100644 --- a/classstdex_1_1stream_1_1async__writer.html +++ b/classstdex_1_1stream_1_1async__writer.html @@ -449,7 +449,7 @@ template<size_t N_cap = default_async_limit> diff --git a/classstdex_1_1stream_1_1basic-members.html b/classstdex_1_1stream_1_1basic-members.html index b8cd72d24..b2c599736 100644 --- a/classstdex_1_1stream_1_1basic-members.html +++ b/classstdex_1_1stream_1_1basic-members.html @@ -162,7 +162,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1stream_1_1basic.html b/classstdex_1_1stream_1_1basic.html index 8ba623f4f..ccc980736 100644 --- a/classstdex_1_1stream_1_1basic.html +++ b/classstdex_1_1stream_1_1basic.html @@ -1265,7 +1265,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 ae4f05cd6..d8bb34c2b 100644 --- a/classstdex_1_1stream_1_1basic__file-members.html +++ b/classstdex_1_1stream_1_1basic__file-members.html @@ -178,7 +178,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1stream_1_1basic__file.html b/classstdex_1_1stream_1_1basic__file.html index 34ce91593..51a16a61f 100644 --- a/classstdex_1_1stream_1_1basic__file.html +++ b/classstdex_1_1stream_1_1basic__file.html @@ -942,7 +942,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 b4b0cced4..dbe8dd63d 100644 --- a/classstdex_1_1stream_1_1basic__sys-members.html +++ b/classstdex_1_1stream_1_1basic__sys-members.html @@ -172,7 +172,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1stream_1_1basic__sys.html b/classstdex_1_1stream_1_1basic__sys.html index 9899abb1a..e3d957294 100644 --- a/classstdex_1_1stream_1_1basic__sys.html +++ b/classstdex_1_1stream_1_1basic__sys.html @@ -515,7 +515,7 @@ T m_h diff --git a/classstdex_1_1stream_1_1buffer-members.html b/classstdex_1_1stream_1_1buffer-members.html index dc330654d..9746f5e13 100644 --- a/classstdex_1_1stream_1_1buffer-members.html +++ b/classstdex_1_1stream_1_1buffer-members.html @@ -169,7 +169,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1stream_1_1buffer.html b/classstdex_1_1stream_1_1buffer.html index e3666ee66..af5b1824b 100644 --- a/classstdex_1_1stream_1_1buffer.html +++ b/classstdex_1_1stream_1_1buffer.html @@ -486,7 +486,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 132675583..0d5f3cf10 100644 --- a/classstdex_1_1stream_1_1buffered__sys-members.html +++ b/classstdex_1_1stream_1_1buffered__sys-members.html @@ -171,7 +171,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1stream_1_1buffered__sys.html b/classstdex_1_1stream_1_1buffered__sys.html index 01e0b7866..ac87fabbf 100644 --- a/classstdex_1_1stream_1_1buffered__sys.html +++ b/classstdex_1_1stream_1_1buffered__sys.html @@ -376,7 +376,7 @@ void flush_write () diff --git a/classstdex_1_1stream_1_1cache-members.html b/classstdex_1_1stream_1_1cache-members.html index bd9d1d020..2f836c4de 100644 --- a/classstdex_1_1stream_1_1cache-members.html +++ b/classstdex_1_1stream_1_1cache-members.html @@ -180,7 +180,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1stream_1_1cache.html b/classstdex_1_1stream_1_1cache.html index 434c23034..5c593aa6e 100644 --- a/classstdex_1_1stream_1_1cache.html +++ b/classstdex_1_1stream_1_1cache.html @@ -898,7 +898,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1cached__file-members.html b/classstdex_1_1stream_1_1cached__file-members.html index 7896625f8..76dec15de 100644 --- a/classstdex_1_1stream_1_1cached__file-members.html +++ b/classstdex_1_1stream_1_1cached__file-members.html @@ -188,7 +188,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1stream_1_1cached__file.html b/classstdex_1_1stream_1_1cached__file.html index 165b76eda..909b8ab5a 100644 --- a/classstdex_1_1stream_1_1cached__file.html +++ b/classstdex_1_1stream_1_1cached__file.html @@ -591,7 +591,7 @@ template<class TR = std::char_traits<schar_t>, class AX = std::alloca diff --git a/classstdex_1_1stream_1_1converter-members.html b/classstdex_1_1stream_1_1converter-members.html index fdc2cced1..08e28fc38 100644 --- a/classstdex_1_1stream_1_1converter-members.html +++ b/classstdex_1_1stream_1_1converter-members.html @@ -164,7 +164,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1stream_1_1converter.html b/classstdex_1_1stream_1_1converter.html index 800a65aa0..5961e6b8b 100644 --- a/classstdex_1_1stream_1_1converter.html +++ b/classstdex_1_1stream_1_1converter.html @@ -504,7 +504,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 5108e8c10..8fe7adc00 100644 --- a/classstdex_1_1stream_1_1diag__file-members.html +++ b/classstdex_1_1stream_1_1diag__file-members.html @@ -181,7 +181,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1stream_1_1diag__file.html b/classstdex_1_1stream_1_1diag__file.html index 1f8d3d3c2..ede41fe8f 100644 --- a/classstdex_1_1stream_1_1diag__file.html +++ b/classstdex_1_1stream_1_1diag__file.html @@ -730,7 +730,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1fifo-members.html b/classstdex_1_1stream_1_1fifo-members.html index 786781f39..35c162b3e 100644 --- a/classstdex_1_1stream_1_1fifo-members.html +++ b/classstdex_1_1stream_1_1fifo-members.html @@ -169,7 +169,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1stream_1_1fifo.html b/classstdex_1_1stream_1_1fifo.html index becda9617..9d957288b 100644 --- a/classstdex_1_1stream_1_1fifo.html +++ b/classstdex_1_1stream_1_1fifo.html @@ -476,7 +476,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1file-members.html b/classstdex_1_1stream_1_1file-members.html index 94ce892a2..ff384d14b 100644 --- a/classstdex_1_1stream_1_1file-members.html +++ b/classstdex_1_1stream_1_1file-members.html @@ -197,7 +197,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1stream_1_1file.html b/classstdex_1_1stream_1_1file.html index ae979b551..27dc67644 100644 --- a/classstdex_1_1stream_1_1file.html +++ b/classstdex_1_1stream_1_1file.html @@ -1119,7 +1119,7 @@ template<class TR = std::char_traits<schar_t>, class AX = std::alloca diff --git a/classstdex_1_1stream_1_1file__window-members.html b/classstdex_1_1stream_1_1file__window-members.html index 74b748a0e..cae27d5f3 100644 --- a/classstdex_1_1stream_1_1file__window-members.html +++ b/classstdex_1_1stream_1_1file__window-members.html @@ -182,7 +182,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1stream_1_1file__window.html b/classstdex_1_1stream_1_1file__window.html index 37c7a2478..f5ccc03c5 100644 --- a/classstdex_1_1stream_1_1file__window.html +++ b/classstdex_1_1stream_1_1file__window.html @@ -762,7 +762,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1limiter-members.html b/classstdex_1_1stream_1_1limiter-members.html index f0424c071..b05f08607 100644 --- a/classstdex_1_1stream_1_1limiter-members.html +++ b/classstdex_1_1stream_1_1limiter-members.html @@ -167,7 +167,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1stream_1_1limiter.html b/classstdex_1_1stream_1_1limiter.html index 56cef9aa1..5ffd38899 100644 --- a/classstdex_1_1stream_1_1limiter.html +++ b/classstdex_1_1stream_1_1limiter.html @@ -453,7 +453,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 202be3e7d..5077c0fcf 100644 --- a/classstdex_1_1stream_1_1memory__file-members.html +++ b/classstdex_1_1stream_1_1memory__file-members.html @@ -226,7 +226,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1stream_1_1memory__file.html b/classstdex_1_1stream_1_1memory__file.html index e0aff6d32..05a869a20 100644 --- a/classstdex_1_1stream_1_1memory__file.html +++ b/classstdex_1_1stream_1_1memory__file.html @@ -1732,7 +1732,7 @@ template<class T > diff --git a/classstdex_1_1stream_1_1replicator-members.html b/classstdex_1_1stream_1_1replicator-members.html index b35551599..03c3df944 100644 --- a/classstdex_1_1stream_1_1replicator-members.html +++ b/classstdex_1_1stream_1_1replicator-members.html @@ -167,7 +167,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1stream_1_1replicator.html b/classstdex_1_1stream_1_1replicator.html index 32a23c04a..dc226a127 100644 --- a/classstdex_1_1stream_1_1replicator.html +++ b/classstdex_1_1stream_1_1replicator.html @@ -466,7 +466,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 55cba27ac..adaa0532a 100644 --- a/classstdex_1_1stream_1_1replicator_1_1worker-members.html +++ b/classstdex_1_1stream_1_1replicator_1_1worker-members.html @@ -108,7 +108,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1stream_1_1replicator_1_1worker.html b/classstdex_1_1stream_1_1replicator_1_1worker.html index cd1619804..162182f8e 100644 --- a/classstdex_1_1stream_1_1replicator_1_1worker.html +++ b/classstdex_1_1stream_1_1replicator_1_1worker.html @@ -164,7 +164,7 @@ void process_op () diff --git a/classstdex_1_1stream_1_1socket-members.html b/classstdex_1_1stream_1_1socket-members.html index 4543869a0..d5bdfcecb 100644 --- a/classstdex_1_1stream_1_1socket-members.html +++ b/classstdex_1_1stream_1_1socket-members.html @@ -170,7 +170,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1stream_1_1socket.html b/classstdex_1_1stream_1_1socket.html index e57c54f1a..9838f20fb 100644 --- a/classstdex_1_1stream_1_1socket.html +++ b/classstdex_1_1stream_1_1socket.html @@ -522,7 +522,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1window-members.html b/classstdex_1_1stream_1_1window-members.html index 216d5fe41..b9bddee95 100644 --- a/classstdex_1_1stream_1_1window-members.html +++ b/classstdex_1_1stream_1_1window-members.html @@ -170,7 +170,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1stream_1_1window.html b/classstdex_1_1stream_1_1window.html index 1da697be9..e80c68710 100644 --- a/classstdex_1_1stream_1_1window.html +++ b/classstdex_1_1stream_1_1window.html @@ -462,7 +462,7 @@ state_t m_state diff --git a/classstdex_1_1stream__hasher-members.html b/classstdex_1_1stream__hasher-members.html index 03962fc15..05826fdbd 100644 --- a/classstdex_1_1stream__hasher-members.html +++ b/classstdex_1_1stream__hasher-members.html @@ -166,7 +166,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1stream__hasher.html b/classstdex_1_1stream__hasher.html index 5f2f437da..9b83093c9 100644 --- a/classstdex_1_1stream__hasher.html +++ b/classstdex_1_1stream__hasher.html @@ -445,7 +445,7 @@ template<class T > diff --git a/classstdex_1_1timeout__progress-members.html b/classstdex_1_1timeout__progress-members.html index 9285aa8da..a7f8552fb 100644 --- a/classstdex_1_1timeout__progress-members.html +++ b/classstdex_1_1timeout__progress-members.html @@ -107,7 +107,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1timeout__progress.html b/classstdex_1_1timeout__progress.html index 786f88960..e2e222395 100644 --- a/classstdex_1_1timeout__progress.html +++ b/classstdex_1_1timeout__progress.html @@ -377,7 +377,7 @@ template<class T > diff --git a/classstdex_1_1user__cancelled-members.html b/classstdex_1_1user__cancelled-members.html index 2217b4b3f..a9ad2e2bd 100644 --- a/classstdex_1_1user__cancelled-members.html +++ b/classstdex_1_1user__cancelled-members.html @@ -99,7 +99,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1user__cancelled.html b/classstdex_1_1user__cancelled.html index 7e9bde5ff..5dc93ce9c 100644 --- a/classstdex_1_1user__cancelled.html +++ b/classstdex_1_1user__cancelled.html @@ -155,7 +155,7 @@ Public Member Functions diff --git a/classstdex_1_1vector__queue-members.html b/classstdex_1_1vector__queue-members.html index 1039e4448..b78b2386a 100644 --- a/classstdex_1_1vector__queue-members.html +++ b/classstdex_1_1vector__queue-members.html @@ -137,7 +137,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1vector__queue.html b/classstdex_1_1vector__queue.html index 1dd34242d..9923bde2d 100644 --- a/classstdex_1_1vector__queue.html +++ b/classstdex_1_1vector__queue.html @@ -795,7 +795,7 @@ template<class T > diff --git a/classstdex_1_1watchdog-members.html b/classstdex_1_1watchdog-members.html index eb191b4c3..5f94abae9 100644 --- a/classstdex_1_1watchdog-members.html +++ b/classstdex_1_1watchdog-members.html @@ -109,7 +109,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1watchdog.html b/classstdex_1_1watchdog.html index 7de3f8e00..6e28bb208 100644 --- a/classstdex_1_1watchdog.html +++ b/classstdex_1_1watchdog.html @@ -231,7 +231,7 @@ template<class _Clock , class _Duration = typename _Clock::duration> diff --git a/classstdex_1_1zlib__reader-members.html b/classstdex_1_1zlib__reader-members.html index e24c7b647..36d7ac039 100644 --- a/classstdex_1_1zlib__reader-members.html +++ b/classstdex_1_1zlib__reader-members.html @@ -169,7 +169,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1zlib__reader.html b/classstdex_1_1zlib__reader.html index a481414ae..e5d5edb0a 100644 --- a/classstdex_1_1zlib__reader.html +++ b/classstdex_1_1zlib__reader.html @@ -405,7 +405,7 @@ state_t m_state diff --git a/classstdex_1_1zlib__writer-members.html b/classstdex_1_1zlib__writer-members.html index 519001302..e1f592430 100644 --- a/classstdex_1_1zlib__writer-members.html +++ b/classstdex_1_1zlib__writer-members.html @@ -169,7 +169,7 @@ $(function(){ initResizable(false); }); diff --git a/classstdex_1_1zlib__writer.html b/classstdex_1_1zlib__writer.html index 24f829970..5c35fd469 100644 --- a/classstdex_1_1zlib__writer.html +++ b/classstdex_1_1zlib__writer.html @@ -405,7 +405,7 @@ state_t m_state diff --git a/curl_8hpp_source.html b/curl_8hpp_source.html index 2074b06a3..88316f28e 100644 --- a/curl_8hpp_source.html +++ b/curl_8hpp_source.html @@ -209,7 +209,7 @@ $(function(){ initResizable(false); }); diff --git a/debug_8hpp_source.html b/debug_8hpp_source.html index a560fb4de..465ab76b2 100644 --- a/debug_8hpp_source.html +++ b/debug_8hpp_source.html @@ -221,7 +221,7 @@ $(function(){ initResizable(false); }); diff --git a/dir_4be4f7b278e009bf0f1906cf31fb73bd.html b/dir_4be4f7b278e009bf0f1906cf31fb73bd.html index 6a8558575..eeaf483b8 100644 --- a/dir_4be4f7b278e009bf0f1906cf31fb73bd.html +++ b/dir_4be4f7b278e009bf0f1906cf31fb73bd.html @@ -103,7 +103,7 @@ Files diff --git a/dir_d44c64559bbebec7f509842c48db8b23.html b/dir_d44c64559bbebec7f509842c48db8b23.html index c4942686c..fbde1e98a 100644 --- a/dir_d44c64559bbebec7f509842c48db8b23.html +++ b/dir_d44c64559bbebec7f509842c48db8b23.html @@ -101,7 +101,7 @@ Directories diff --git a/dir_fca3c47b2ea228727bd6729832f89576.html b/dir_fca3c47b2ea228727bd6729832f89576.html index 8e649447d..2af584dea 100644 --- a/dir_fca3c47b2ea228727bd6729832f89576.html +++ b/dir_fca3c47b2ea228727bd6729832f89576.html @@ -177,7 +177,7 @@ Files diff --git a/endian_8hpp_source.html b/endian_8hpp_source.html index 0e38ca85f..fb990177f 100644 --- a/endian_8hpp_source.html +++ b/endian_8hpp_source.html @@ -236,7 +236,7 @@ $(function(){ initResizable(false); }); diff --git a/exception_8hpp_source.html b/exception_8hpp_source.html index 429656512..df96a5484 100644 --- a/exception_8hpp_source.html +++ b/exception_8hpp_source.html @@ -117,7 +117,7 @@ $(function(){ initResizable(false); }); diff --git a/files.html b/files.html index d14895aeb..646dbadfa 100644 --- a/files.html +++ b/files.html @@ -139,7 +139,7 @@ $(function(){ initResizable(false); }); diff --git a/functions.html b/functions.html index 785413ced..57cc68b79 100644 --- a/functions.html +++ b/functions.html @@ -110,7 +110,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_b.html b/functions_b.html index af5d268f5..94dc8be47 100644 --- a/functions_b.html +++ b/functions_b.html @@ -104,7 +104,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_c.html b/functions_c.html index 3ec9a6cc1..99154ff8e 100644 --- a/functions_c.html +++ b/functions_c.html @@ -115,7 +115,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_d.html b/functions_d.html index 2a1790ce0..af87efde9 100644 --- a/functions_d.html +++ b/functions_d.html @@ -107,7 +107,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_e.html b/functions_e.html index b82cec7c9..ee9f50599 100644 --- a/functions_e.html +++ b/functions_e.html @@ -106,7 +106,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_enum.html b/functions_enum.html index d0d6b3d09..2d2572211 100644 --- a/functions_enum.html +++ b/functions_enum.html @@ -91,7 +91,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_f.html b/functions_f.html index 3110b5d55..145d89dcb 100644 --- a/functions_f.html +++ b/functions_f.html @@ -102,7 +102,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_func.html b/functions_func.html index f1a70e27e..f0b96c19c 100644 --- a/functions_func.html +++ b/functions_func.html @@ -104,7 +104,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_func_b.html b/functions_func_b.html index 2793df835..55e120fab 100644 --- a/functions_func_b.html +++ b/functions_func_b.html @@ -96,7 +96,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_func_c.html b/functions_func_c.html index 788cf01a0..cb49b5ba4 100644 --- a/functions_func_c.html +++ b/functions_func_c.html @@ -102,7 +102,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_func_d.html b/functions_func_d.html index b95faf537..3c883d090 100644 --- a/functions_func_d.html +++ b/functions_func_d.html @@ -101,7 +101,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_func_e.html b/functions_func_e.html index 11cbaa07b..d10b31911 100644 --- a/functions_func_e.html +++ b/functions_func_e.html @@ -97,7 +97,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_func_f.html b/functions_func_f.html index c59af30e5..d45ddacac 100644 --- a/functions_func_f.html +++ b/functions_func_f.html @@ -101,7 +101,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_func_g.html b/functions_func_g.html index 9eb3c8592..fe1c673dc 100644 --- a/functions_func_g.html +++ b/functions_func_g.html @@ -94,7 +94,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_func_h.html b/functions_func_h.html index 7aab881d9..92dc49b0e 100644 --- a/functions_func_h.html +++ b/functions_func_h.html @@ -96,7 +96,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_func_i.html b/functions_func_i.html index e62fd63eb..a4667b1ef 100644 --- a/functions_func_i.html +++ b/functions_func_i.html @@ -114,7 +114,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_func_l.html b/functions_func_l.html index 6623cf7dc..52bd79f69 100644 --- a/functions_func_l.html +++ b/functions_func_l.html @@ -96,7 +96,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_func_m.html b/functions_func_m.html index e991d69af..4c6608504 100644 --- a/functions_func_m.html +++ b/functions_func_m.html @@ -98,7 +98,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_func_n.html b/functions_func_n.html index 519a80d6b..cd204db2c 100644 --- a/functions_func_n.html +++ b/functions_func_n.html @@ -94,7 +94,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_func_o.html b/functions_func_o.html index 963501bad..cd7f3fcec 100644 --- a/functions_func_o.html +++ b/functions_func_o.html @@ -109,7 +109,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_func_p.html b/functions_func_p.html index fa566d623..de96a61e9 100644 --- a/functions_func_p.html +++ b/functions_func_p.html @@ -100,7 +100,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_func_q.html b/functions_func_q.html index a48d6e29b..2d6443592 100644 --- a/functions_func_q.html +++ b/functions_func_q.html @@ -93,7 +93,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_func_r.html b/functions_func_r.html index 26064a3e1..01eb64491 100644 --- a/functions_func_r.html +++ b/functions_func_r.html @@ -108,7 +108,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_func_s.html b/functions_func_s.html index d0fc5d707..64c8c8e86 100644 --- a/functions_func_s.html +++ b/functions_func_s.html @@ -118,7 +118,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_func_t.html b/functions_func_t.html index e0203b14b..3aba43c71 100644 --- a/functions_func_t.html +++ b/functions_func_t.html @@ -101,7 +101,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_func_u.html b/functions_func_u.html index 1eae22810..1e3c3a5ec 100644 --- a/functions_func_u.html +++ b/functions_func_u.html @@ -94,7 +94,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_func_v.html b/functions_func_v.html index 06d95da37..e1cad2900 100644 --- a/functions_func_v.html +++ b/functions_func_v.html @@ -93,7 +93,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_func_w.html b/functions_func_w.html index c24d0d5e3..c08073c78 100644 --- a/functions_func_w.html +++ b/functions_func_w.html @@ -102,7 +102,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_func_~.html b/functions_func_~.html index 0740d5e08..dfb9677df 100644 --- a/functions_func_~.html +++ b/functions_func_~.html @@ -98,7 +98,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_g.html b/functions_g.html index 30d97d90d..37059d08c 100644 --- a/functions_g.html +++ b/functions_g.html @@ -94,7 +94,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_h.html b/functions_h.html index 60085bb6d..f2b88ce31 100644 --- a/functions_h.html +++ b/functions_h.html @@ -97,7 +97,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_i.html b/functions_i.html index 07b3831b3..f4cb4720f 100644 --- a/functions_i.html +++ b/functions_i.html @@ -117,7 +117,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_l.html b/functions_l.html index 0676f2c54..686f4b476 100644 --- a/functions_l.html +++ b/functions_l.html @@ -98,7 +98,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_m.html b/functions_m.html index 0777fafcc..4ace8a714 100644 --- a/functions_m.html +++ b/functions_m.html @@ -141,7 +141,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_n.html b/functions_n.html index ed3f8ccc9..302743261 100644 --- a/functions_n.html +++ b/functions_n.html @@ -103,7 +103,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_o.html b/functions_o.html index 9c0ade0bc..e475cda06 100644 --- a/functions_o.html +++ b/functions_o.html @@ -114,7 +114,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_p.html b/functions_p.html index f67695c58..1188665b7 100644 --- a/functions_p.html +++ b/functions_p.html @@ -110,7 +110,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_q.html b/functions_q.html index 033dcd215..006a462c5 100644 --- a/functions_q.html +++ b/functions_q.html @@ -93,7 +93,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_r.html b/functions_r.html index 613c4ec9a..f02e7d56f 100644 --- a/functions_r.html +++ b/functions_r.html @@ -111,7 +111,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_rela.html b/functions_rela.html index 01be75070..15ef5cff9 100644 --- a/functions_rela.html +++ b/functions_rela.html @@ -92,7 +92,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_s.html b/functions_s.html index 078db01dc..7e3d8b9fa 100644 --- a/functions_s.html +++ b/functions_s.html @@ -127,7 +127,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_t.html b/functions_t.html index b6c4231f1..0583b49d4 100644 --- a/functions_t.html +++ b/functions_t.html @@ -106,7 +106,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_type.html b/functions_type.html index bd4e5a89e..d50298d78 100644 --- a/functions_type.html +++ b/functions_type.html @@ -97,7 +97,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_u.html b/functions_u.html index c387daeea..358d970ab 100644 --- a/functions_u.html +++ b/functions_u.html @@ -96,7 +96,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_v.html b/functions_v.html index 58865c44e..b9f4ccc11 100644 --- a/functions_v.html +++ b/functions_v.html @@ -96,7 +96,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_vars.html b/functions_vars.html index 77e87969c..5f38a91fa 100644 --- a/functions_vars.html +++ b/functions_vars.html @@ -98,7 +98,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_vars_b.html b/functions_vars_b.html index 1a45dff60..1d71d3401 100644 --- a/functions_vars_b.html +++ b/functions_vars_b.html @@ -100,7 +100,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_vars_c.html b/functions_vars_c.html index a67d9a5d6..cec9614c4 100644 --- a/functions_vars_c.html +++ b/functions_vars_c.html @@ -102,7 +102,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_vars_d.html b/functions_vars_d.html index c9fed1767..f490be2a1 100644 --- a/functions_vars_d.html +++ b/functions_vars_d.html @@ -99,7 +99,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_vars_e.html b/functions_vars_e.html index 40b26f5cd..c2b002734 100644 --- a/functions_vars_e.html +++ b/functions_vars_e.html @@ -101,7 +101,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_vars_f.html b/functions_vars_f.html index dde3a8cfb..f587e223a 100644 --- a/functions_vars_f.html +++ b/functions_vars_f.html @@ -93,7 +93,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_vars_h.html b/functions_vars_h.html index ed72eefd2..9ea69ac9b 100644 --- a/functions_vars_h.html +++ b/functions_vars_h.html @@ -93,7 +93,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_vars_i.html b/functions_vars_i.html index 7626816c8..3bc4f4752 100644 --- a/functions_vars_i.html +++ b/functions_vars_i.html @@ -97,7 +97,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_vars_l.html b/functions_vars_l.html index 3891d5cf5..dc9fccdb7 100644 --- a/functions_vars_l.html +++ b/functions_vars_l.html @@ -94,7 +94,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_vars_m.html b/functions_vars_m.html index b4f750ed1..c7e4c93a2 100644 --- a/functions_vars_m.html +++ b/functions_vars_m.html @@ -136,7 +136,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_vars_n.html b/functions_vars_n.html index 599221c15..f8478a204 100644 --- a/functions_vars_n.html +++ b/functions_vars_n.html @@ -102,7 +102,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_vars_o.html b/functions_vars_o.html index 0f0e5c9dd..69c0f4c14 100644 --- a/functions_vars_o.html +++ b/functions_vars_o.html @@ -94,7 +94,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_vars_p.html b/functions_vars_p.html index bc3d323df..bb7128b43 100644 --- a/functions_vars_p.html +++ b/functions_vars_p.html @@ -101,7 +101,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_vars_r.html b/functions_vars_r.html index c2966d36e..b18c50013 100644 --- a/functions_vars_r.html +++ b/functions_vars_r.html @@ -95,7 +95,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_vars_s.html b/functions_vars_s.html index cc01ae1bc..ed72a4993 100644 --- a/functions_vars_s.html +++ b/functions_vars_s.html @@ -100,7 +100,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_vars_t.html b/functions_vars_t.html index bf942e815..1e2ea5930 100644 --- a/functions_vars_t.html +++ b/functions_vars_t.html @@ -97,7 +97,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_vars_u.html b/functions_vars_u.html index f162a9641..0fc29c8ca 100644 --- a/functions_vars_u.html +++ b/functions_vars_u.html @@ -94,7 +94,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_vars_v.html b/functions_vars_v.html index c5da03ad1..e42800201 100644 --- a/functions_vars_v.html +++ b/functions_vars_v.html @@ -94,7 +94,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_vars_w.html b/functions_vars_w.html index 9fb596d93..e542320ef 100644 --- a/functions_vars_w.html +++ b/functions_vars_w.html @@ -95,7 +95,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_w.html b/functions_w.html index e8638e4a7..eabc28c60 100644 --- a/functions_w.html +++ b/functions_w.html @@ -105,7 +105,7 @@ $(function(){ initResizable(false); }); diff --git a/functions_~.html b/functions_~.html index 528e85bbf..f580a5978 100644 --- a/functions_~.html +++ b/functions_~.html @@ -98,7 +98,7 @@ $(function(){ initResizable(false); }); diff --git a/hash_8hpp_source.html b/hash_8hpp_source.html index 77ca57aaa..f96db60f0 100644 --- a/hash_8hpp_source.html +++ b/hash_8hpp_source.html @@ -745,9 +745,9 @@ $(function(){ initResizable(false); });
stdex::sha1_hash::clear
virtual void clear()
Initializes hash value and internal state.
Definition hash.hpp:511
stdex::sha1_hash::finalize
virtual void finalize()
Finalizes hash value.
Definition hash.hpp:523
stdex::stream::basic
Basic stream operations.
Definition stream.hpp:85
-
stdex::stream::converter
Modifies data on the fly when reading from/writing to a source stream. Could also be used to modify r...
Definition stream.hpp:1024
-
stdex::stream::converter::read
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:1053
-
stdex::stream::converter::write
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:1061
+
stdex::stream::converter
Modifies data on the fly when reading from/writing to a source stream. Could also be used to modify r...
Definition stream.hpp:1020
+
stdex::stream::converter::read
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition stream.hpp:1049
+
stdex::stream::converter::write
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition stream.hpp:1057
stdex::stream_hasher
Hashes read to or write from data of the stream.
Definition hash.hpp:138
stdex::stream_hasher::read
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition hash.hpp:145
stdex::stream_hasher::write
virtual size_t write(_In_reads_bytes_opt_(length) const void *data, size_t length)
Writes block of data to the stream.
Definition hash.hpp:153
@@ -757,7 +757,7 @@ $(function(){ initResizable(false); }); diff --git a/hex_8hpp_source.html b/hex_8hpp_source.html index 8eeb7e6ae..efdcd34aa 100644 --- a/hex_8hpp_source.html +++ b/hex_8hpp_source.html @@ -232,7 +232,7 @@ $(function(){ initResizable(false); }); diff --git a/hierarchy.html b/hierarchy.html index 959e15229..eee67568f 100644 --- a/hierarchy.html +++ b/hierarchy.html @@ -337,7 +337,7 @@ $(function(){ initResizable(false); }); diff --git a/html_8hpp_source.html b/html_8hpp_source.html index fa9585a11..61f3370a8 100644 --- a/html_8hpp_source.html +++ b/html_8hpp_source.html @@ -2585,7 +2585,7 @@ $(function(){ initResizable(false); }); diff --git a/idrec_8hpp_source.html b/idrec_8hpp_source.html index e7b51e498..7aec95d7e 100644 --- a/idrec_8hpp_source.html +++ b/idrec_8hpp_source.html @@ -475,20 +475,20 @@ $(function(){ initResizable(false); });
stdex::idrec::record::id
static constexpr T_id id()
Returns record id.
Definition idrec.hpp:310
stdex::idrec::record::operator<<
friend std::ostream & operator<<(std::ostream &stream, const record< T, T_id, ID, T_size, N_align > r)
Writes record to a stream.
Definition idrec.hpp:418
stdex::idrec::record::open
static std::streamoff open(std::ostream &stream)
Writes record header.
Definition idrec.hpp:335
-
stdex::stream::basic_file
Basic seekable stream operations.
Definition stream.hpp:819
-
stdex::stream::basic_file::seekbeg
fpos_t seekbeg(fpos_t offset)
Seeks to absolute file position.
Definition stream.hpp:846
+
stdex::stream::basic_file
Basic seekable stream operations.
Definition stream.hpp:815
+
stdex::stream::basic_file::seekbeg
fpos_t seekbeg(fpos_t offset)
Seeks to absolute file position.
Definition stream.hpp:842
stdex::stream::basic
Basic stream operations.
Definition stream.hpp:85
stdex::stream::basic::ok
bool ok() const
Returns true if the stream state is clean i.e. previous operation was successful.
Definition stream.hpp:181
stdex::stream::basic::state
state_t state() const
Returns stream state after last operation.
Definition stream.hpp:176
stdex::stream::basic::skip
virtual void skip(fsize_t amount)
Skips given amount of bytes of data on the stream.
Definition stream.hpp:148
-
stdex::stream::limiter
Limits reading from/writing to stream to a predefined number of bytes.
Definition stream.hpp:1553
-
stdex::stream::limiter::read_limit
fsize_t read_limit
Number of bytes left that may be read from the stream.
Definition stream.hpp:1605
-
stdex::stream::memory_file
In-memory file.
Definition stream.hpp:3223
-
stdex::stream::memory_file::data
const void * data() const
Returns pointer to data.
Definition stream.hpp:3553
+
stdex::stream::limiter
Limits reading from/writing to stream to a predefined number of bytes.
Definition stream.hpp:1549
+
stdex::stream::limiter::read_limit
fsize_t read_limit
Number of bytes left that may be read from the stream.
Definition stream.hpp:1601
+
stdex::stream::memory_file
In-memory file.
Definition stream.hpp:3219
+
stdex::stream::memory_file::data
const void * data() const
Returns pointer to data.
Definition stream.hpp:3549
diff --git a/include_2stdex_2compat_8hpp_source.html b/include_2stdex_2compat_8hpp_source.html index 07fa92f3b..c75715431 100644 --- a/include_2stdex_2compat_8hpp_source.html +++ b/include_2stdex_2compat_8hpp_source.html @@ -316,7 +316,7 @@ $(function(){ initResizable(false); }); diff --git a/index.html b/index.html index 232ba49d0..41fde0efe 100644 --- a/index.html +++ b/index.html @@ -101,7 +101,7 @@ Requirements diff --git a/interval_8hpp_source.html b/interval_8hpp_source.html index 540dcce4d..86b1039b5 100644 --- a/interval_8hpp_source.html +++ b/interval_8hpp_source.html @@ -261,7 +261,7 @@ $(function(){ initResizable(false); }); diff --git a/langid_8hpp_source.html b/langid_8hpp_source.html index d6a0cfa27..3f35ad809 100644 --- a/langid_8hpp_source.html +++ b/langid_8hpp_source.html @@ -1062,7 +1062,7 @@ $(function(){ initResizable(false); }); diff --git a/locale_8hpp_source.html b/locale_8hpp_source.html index bda2d5506..7f7f96b3c 100644 --- a/locale_8hpp_source.html +++ b/locale_8hpp_source.html @@ -197,7 +197,7 @@ $(function(){ initResizable(false); }); diff --git a/mapping_8hpp_source.html b/mapping_8hpp_source.html index fd0d76494..a7d6d1e58 100644 --- a/mapping_8hpp_source.html +++ b/mapping_8hpp_source.html @@ -287,7 +287,7 @@ $(function(){ initResizable(false); }); diff --git a/math_8hpp_source.html b/math_8hpp_source.html index 10f8d7408..61beb1423 100644 --- a/math_8hpp_source.html +++ b/math_8hpp_source.html @@ -177,7 +177,7 @@ $(function(){ initResizable(false); }); diff --git a/memory_8hpp_source.html b/memory_8hpp_source.html index 21f3d1535..8e1ce3879 100644 --- a/memory_8hpp_source.html +++ b/memory_8hpp_source.html @@ -351,7 +351,7 @@ $(function(){ initResizable(false); }); diff --git a/minisign_8hpp_source.html b/minisign_8hpp_source.html index db9df3401..ae1f7abe2 100644 --- a/minisign_8hpp_source.html +++ b/minisign_8hpp_source.html @@ -223,7 +223,7 @@ $(function(){ initResizable(false); }); diff --git a/parser_8hpp_source.html b/parser_8hpp_source.html index f90eb6aab..8fb7cb7aa 100644 --- a/parser_8hpp_source.html +++ b/parser_8hpp_source.html @@ -8546,7 +8546,7 @@ $(function(){ initResizable(false); }); diff --git a/pch_8hpp_source.html b/pch_8hpp_source.html index b537af171..5deb5ec2e 100644 --- a/pch_8hpp_source.html +++ b/pch_8hpp_source.html @@ -229,7 +229,7 @@ $(function(){ initResizable(false); }); diff --git a/pool_8hpp_source.html b/pool_8hpp_source.html index 53e437573..050a80198 100644 --- a/pool_8hpp_source.html +++ b/pool_8hpp_source.html @@ -197,7 +197,7 @@ $(function(){ initResizable(false); }); diff --git a/progress_8hpp_source.html b/progress_8hpp_source.html index 14a60844d..2411f996f 100644 --- a/progress_8hpp_source.html +++ b/progress_8hpp_source.html @@ -547,7 +547,7 @@ $(function(){ initResizable(false); }); diff --git a/ring_8hpp_source.html b/ring_8hpp_source.html index e918e36f4..26cba604b 100644 --- a/ring_8hpp_source.html +++ b/ring_8hpp_source.html @@ -243,7 +243,7 @@ $(function(){ initResizable(false); }); diff --git a/scoped__executor_8hpp_source.html b/scoped__executor_8hpp_source.html index 32d5fe705..4f3ba55d1 100644 --- a/scoped__executor_8hpp_source.html +++ b/scoped__executor_8hpp_source.html @@ -132,7 +132,7 @@ $(function(){ initResizable(false); }); diff --git a/sgml_8hpp_source.html b/sgml_8hpp_source.html index c09ca2df7..10a3b6b78 100644 --- a/sgml_8hpp_source.html +++ b/sgml_8hpp_source.html @@ -805,7 +805,7 @@ $(function(){ initResizable(false); }); diff --git a/sgml__unicode_8hpp_source.html b/sgml__unicode_8hpp_source.html index bfdaa349c..ad791b4b9 100644 --- a/sgml__unicode_8hpp_source.html +++ b/sgml__unicode_8hpp_source.html @@ -3197,7 +3197,7 @@ $(function(){ initResizable(false); }); diff --git a/socket_8hpp_source.html b/socket_8hpp_source.html index 0e1039984..9731c0d49 100644 --- a/socket_8hpp_source.html +++ b/socket_8hpp_source.html @@ -192,7 +192,7 @@ $(function(){ initResizable(false); }); diff --git a/spinlock_8hpp_source.html b/spinlock_8hpp_source.html index 6a7ab2dc4..3bda87e03 100644 --- a/spinlock_8hpp_source.html +++ b/spinlock_8hpp_source.html @@ -167,7 +167,7 @@ $(function(){ initResizable(false); }); diff --git a/stream_8hpp_source.html b/stream_8hpp_source.html index 7377f8e37..92788cd8a 100644 --- a/stream_8hpp_source.html +++ b/stream_8hpp_source.html @@ -514,3714 +514,3710 @@ $(function(){ initResizable(false); });
542#ifdef _WIN32
548 size_t write_sa(_In_ LPSAFEARRAY sa)
549 {
-
550 long ubound, lbound;
-
551 if (FAILED(SafeArrayGetUBound(sa, 1, &ubound)) ||
-
552 FAILED(SafeArrayGetLBound(sa, 1, &lbound)))
-
553 throw std::invalid_argument("SafeArrayGet[UL]Bound failed");
-
554 safearray_accessor<void> a(sa);
-
555 return write(a.data(), static_cast<size_t>(ubound) - lbound + 1);
-
556 }
-
557#endif
-
558
-
-
564 fsize_t write_stream(_Inout_ basic& stream, _In_ fsize_t amount = fsize_max)
-
565 {
-
566 std::unique_ptr<uint8_t[]> data(new uint8_t[static_cast<size_t>(std::min<fsize_t>(amount, default_block_size))]);
-
567 fsize_t num_copied = 0, to_write = amount;
-
568 m_state = state_t::ok;
-
569 while (to_write) {
-
570 size_t num_read = stream.read(data.get(), static_cast<size_t>(std::min<fsize_t>(default_block_size, to_write)));
-
571 size_t num_written = write(data.get(), num_read);
-
572 num_copied += num_written;
-
573 to_write -= num_written;
-
574 if (stream.m_state == state_t::eof) {
-
575 // EOF is not an error.
-
576 m_state = state_t::ok;
+
550 safearray_accessor_with_size<uint8_t> a(sa);
+
551 return write(a.data(), a.size());
+
552 }
+
553#endif
+
554
+
+
560 fsize_t write_stream(_Inout_ basic& stream, _In_ fsize_t amount = fsize_max)
+
561 {
+
562 std::unique_ptr<uint8_t[]> data(new uint8_t[static_cast<size_t>(std::min<fsize_t>(amount, default_block_size))]);
+
563 fsize_t num_copied = 0, to_write = amount;
+
564 m_state = state_t::ok;
+
565 while (to_write) {
+
566 size_t num_read = stream.read(data.get(), static_cast<size_t>(std::min<fsize_t>(default_block_size, to_write)));
+
567 size_t num_written = write(data.get(), num_read);
+
568 num_copied += num_written;
+
569 to_write -= num_written;
+
570 if (stream.m_state == state_t::eof) {
+
571 // EOF is not an error.
+
572 m_state = state_t::ok;
+
573 break;
+
574 }
+
575 m_state = stream.m_state;
+
576 if (!ok())
577 break;
-
578 }
-
579 m_state = stream.m_state;
-
580 if (!ok())
-
581 break;
-
582 }
-
583 return num_copied;
-
584 }
+
578 }
+
579 return num_copied;
+
580 }
-
585
-
-
589 void write_charset(_In_ charset_id charset)
-
590 {
-
591 if (charset == charset_id::utf32)
-
592 write_data(utf32_bom);
-
593 else if (charset == charset_id::utf16)
-
594 write_data(utf16_bom);
-
595 else if (charset == charset_id::utf8)
-
596 write_array(utf8_bom, sizeof(utf8_bom), 1);
-
597 }
+
581
+
+
585 void write_charset(_In_ charset_id charset)
+
586 {
+
587 if (charset == charset_id::utf32)
+
588 write_data(utf32_bom);
+
589 else if (charset == charset_id::utf16)
+
590 write_data(utf16_bom);
+
591 else if (charset == charset_id::utf8)
+
592 write_array(utf8_bom, sizeof(utf8_bom), 1);
+
593 }
-
598
-
-
604 size_t write_sprintf(_In_z_ _Printf_format_string_params_(2) const char* format, _In_opt_ locale_t locale, ...)
-
605 {
-
606 va_list params;
-
607 va_start(params, locale);
-
608 size_t num_chars = write_vsprintf(format, locale, params);
-
609 va_end(params);
-
610 return num_chars;
-
611 }
+
594
+
+
600 size_t write_sprintf(_In_z_ _Printf_format_string_params_(2) const char* format, _In_opt_ locale_t locale, ...)
+
601 {
+
602 va_list params;
+
603 va_start(params, locale);
+
604 size_t num_chars = write_vsprintf(format, locale, params);
+
605 va_end(params);
+
606 return num_chars;
+
607 }
-
612
-
-
618 size_t write_sprintf(_In_z_ _Printf_format_string_params_(2) const wchar_t* format, _In_opt_ locale_t locale, ...)
-
619 {
-
620 va_list params;
-
621 va_start(params, locale);
-
622 size_t num_chars = write_vsprintf(format, locale, params);
-
623 va_end(params);
-
624 return num_chars;
-
625 }
+
608
+
+
614 size_t write_sprintf(_In_z_ _Printf_format_string_params_(2) const wchar_t* format, _In_opt_ locale_t locale, ...)
+
615 {
+
616 va_list params;
+
617 va_start(params, locale);
+
618 size_t num_chars = write_vsprintf(format, locale, params);
+
619 va_end(params);
+
620 return num_chars;
+
621 }
-
626
-
-
632 size_t write_vsprintf(_In_z_ _Printf_format_string_params_(2) const char* format, _In_opt_ locale_t locale, _In_ va_list params)
-
633 {
-
634 std::string tmp;
-
635 tmp.reserve(default_block_size);
-
636 vappendf(tmp, format, locale, params);
-
637 return write_array(tmp.data(), sizeof(char), tmp.size());
-
638 }
+
622
+
+
628 size_t write_vsprintf(_In_z_ _Printf_format_string_params_(2) const char* format, _In_opt_ locale_t locale, _In_ va_list params)
+
629 {
+
630 std::string tmp;
+
631 tmp.reserve(default_block_size);
+
632 vappendf(tmp, format, locale, params);
+
633 return write_array(tmp.data(), sizeof(char), tmp.size());
+
634 }
-
639
-
-
645 size_t write_vsprintf(_In_z_ _Printf_format_string_params_(2) const wchar_t* format, _In_opt_ locale_t locale, _In_ va_list params)
-
646 {
-
647 std::wstring tmp;
-
648 tmp.reserve(default_block_size);
-
649 vappendf(tmp, format, locale, params);
-
650 return write_array(tmp.data(), sizeof(wchar_t), tmp.size());
-
651 }
+
635
+
+
641 size_t write_vsprintf(_In_z_ _Printf_format_string_params_(2) const wchar_t* format, _In_opt_ locale_t locale, _In_ va_list params)
+
642 {
+
643 std::wstring tmp;
+
644 tmp.reserve(default_block_size);
+
645 vappendf(tmp, format, locale, params);
+
646 return write_array(tmp.data(), sizeof(wchar_t), tmp.size());
+
647 }
-
652
-
653 basic& operator >>(_Out_ int8_t& data) { return read_data(data); }
-
654 basic& operator <<(_In_ const int8_t data) { return write_data(data); }
-
655 basic& operator >>(_Out_ int16_t& data) { return read_data(data); }
-
656 basic& operator <<(_In_ const int16_t data) { return write_data(data); }
-
657 basic& operator >>(_Out_ int32_t& data) { return read_data(data); }
-
658 basic& operator <<(_In_ const int32_t data) { return write_data(data); }
-
659 basic& operator >>(_Out_ int64_t& data) { return read_data(data); }
-
660 basic& operator <<(_In_ const int64_t data) { return write_data(data); }
-
661 basic& operator >>(_Out_ uint8_t& data) { return read_data(data); }
-
662 basic& operator <<(_In_ const uint8_t data) { return write_data(data); }
-
663 basic& operator >>(_Out_ uint16_t& data) { return read_data(data); }
-
664 basic& operator <<(_In_ const uint16_t data) { return write_data(data); }
-
665 basic& operator >>(_Out_ uint32_t& data) { return read_data(data); }
-
666 basic& operator <<(_In_ const uint32_t data) { return write_data(data); }
-
667 basic& operator >>(_Out_ uint64_t& data) { return read_data(data); }
-
668 basic& operator <<(_In_ const uint64_t data) { return write_data(data); }
-
669 basic& operator >>(_Out_ float& data) { return read_data(data); }
-
670 basic& operator <<(_In_ const float data) { return write_data(data); }
-
671 basic& operator >>(_Out_ double& data) { return read_data(data); }
-
672 basic& operator <<(_In_ const double data) { return write_data(data); }
-
673 basic& operator >>(_Out_ char& data) { return read_data(data); }
-
674 basic& operator <<(_In_ const char data) { return write_data(data); }
-
675#ifdef _NATIVE_WCHAR_T_DEFINED
-
676 basic& operator >>(_Out_ wchar_t& data) { return read_data(data); }
-
677 basic& operator <<(_In_ const wchar_t data) { return write_data(data); }
-
678#endif
+
648
+
649 basic& operator >>(_Out_ int8_t& data) { return read_data(data); }
+
650 basic& operator <<(_In_ const int8_t data) { return write_data(data); }
+
651 basic& operator >>(_Out_ int16_t& data) { return read_data(data); }
+
652 basic& operator <<(_In_ const int16_t data) { return write_data(data); }
+
653 basic& operator >>(_Out_ int32_t& data) { return read_data(data); }
+
654 basic& operator <<(_In_ const int32_t data) { return write_data(data); }
+
655 basic& operator >>(_Out_ int64_t& data) { return read_data(data); }
+
656 basic& operator <<(_In_ const int64_t data) { return write_data(data); }
+
657 basic& operator >>(_Out_ uint8_t& data) { return read_data(data); }
+
658 basic& operator <<(_In_ const uint8_t data) { return write_data(data); }
+
659 basic& operator >>(_Out_ uint16_t& data) { return read_data(data); }
+
660 basic& operator <<(_In_ const uint16_t data) { return write_data(data); }
+
661 basic& operator >>(_Out_ uint32_t& data) { return read_data(data); }
+
662 basic& operator <<(_In_ const uint32_t data) { return write_data(data); }
+
663 basic& operator >>(_Out_ uint64_t& data) { return read_data(data); }
+
664 basic& operator <<(_In_ const uint64_t data) { return write_data(data); }
+
665 basic& operator >>(_Out_ float& data) { return read_data(data); }
+
666 basic& operator <<(_In_ const float data) { return write_data(data); }
+
667 basic& operator >>(_Out_ double& data) { return read_data(data); }
+
668 basic& operator <<(_In_ const double data) { return write_data(data); }
+
669 basic& operator >>(_Out_ char& data) { return read_data(data); }
+
670 basic& operator <<(_In_ const char data) { return write_data(data); }
+
671#ifdef _NATIVE_WCHAR_T_DEFINED
+
672 basic& operator >>(_Out_ wchar_t& data) { return read_data(data); }
+
673 basic& operator <<(_In_ const wchar_t data) { return write_data(data); }
+
674#endif
+
675 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
676 basic& operator >>(_Out_ std::basic_string<T, TR, AX>& data) { return read_str(data); }
+
677 template <class T>
+
678 basic& operator <<(_In_ const T* data) { return write_str(data); }
679 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
680 basic& operator >>(_Out_ std::basic_string<T, TR, AX>& data) { return read_str(data); }
-
681 template <class T>
-
682 basic& operator <<(_In_ const T* data) { return write_str(data); }
-
683 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
684 basic& operator <<(_In_ const std::basic_string<T, TR, AX>& data) { return write_str(data); }
-
685
-
686 template <class T, class AX = std::allocator<T>>
-
687 basic& operator <<(_In_ const std::vector<T, AX>& data)
-
688 {
-
689 size_t num = data.size();
-
690 if (num > UINT32_MAX) _Unlikely_
-
691 throw std::invalid_argument("collection too big");
-
692 *this << static_cast<uint32_t>(num);
-
693 for (auto& el : data)
-
694 *this << el;
-
695 return *this;
-
696 }
-
697
-
698 template <class T, class AX = std::allocator<T>>
-
699 basic& operator >>(_Out_ std::vector<T, AX>& data)
-
700 {
-
701 data.clear();
-
702 uint32_t num;
-
703 *this >> num;
-
704 if (!ok()) _Unlikely_
-
705 return *this;
-
706 data.reserve(num);
-
707 for (uint32_t i = 0; i < num; ++i) {
-
708 T el;
-
709 *this >> el;
-
710 if (!ok()) _Unlikely_
-
711 return *this;
-
712 data.push_back(std::move(el));
-
713 }
-
714 }
-
715
-
716 template <class KEY, class PR = std::less<KEY>, class AX = std::allocator<KEY>>
-
717 basic& operator <<(_In_ const std::set<KEY, PR, AX>& data)
-
718 {
-
719 size_t num = data.size();
-
720 if (num > UINT32_MAX) _Unlikely_
-
721 throw std::invalid_argument("collection too big");
-
722 *this << static_cast<uint32_t>(num);
-
723 for (auto& el : data)
-
724 *this << el;
-
725 return *this;
-
726 }
-
727
-
728 template <class KEY, class PR = std::less<KEY>, class AX = std::allocator<KEY>>
-
729 basic& operator >>(_Out_ std::set<KEY, PR, AX>& data)
-
730 {
-
731 data.clear();
-
732 uint32_t num;
-
733 *this >> num;
-
734 if (!ok()) _Unlikely_
-
735 return *this;
-
736 for (uint32_t i = 0; i < num; ++i) {
-
737 KEY el;
-
738 *this >> el;
-
739 if (!ok()) _Unlikely_
-
740 return *this;
-
741 data.insert(std::move(el));
-
742 }
-
743 }
-
744
-
745 template <class KEY, class PR = std::less<KEY>, class AX = std::allocator<KEY>>
-
746 basic& operator <<(_In_ const std::multiset<KEY, PR, AX>& data)
-
747 {
-
748 size_t num = data.size();
-
749 if (num > UINT32_MAX) _Unlikely_
-
750 throw std::invalid_argument("collection too big");
-
751 *this << static_cast<uint32_t>(num);
-
752 for (auto& el : data)
-
753 *this << el;
-
754 return *this;
-
755 }
-
756
-
757 template <class KEY, class PR = std::less<KEY>, class AX = std::allocator<KEY>>
-
758 basic& operator >>(_Out_ std::multiset<KEY, PR, AX>& data)
-
759 {
-
760 data.clear();
-
761 uint32_t num;
-
762 *this >> num;
-
763 if (!ok()) _Unlikely_
-
764 return *this;
-
765 for (uint32_t i = 0; i < num; ++i) {
-
766 KEY el;
-
767 *this >> el;
-
768 if (!ok()) _Unlikely_
-
769 return *this;
-
770 data.insert(std::move(el));
-
771 }
-
772 return *this;
-
773 }
+
680 basic& operator <<(_In_ const std::basic_string<T, TR, AX>& data) { return write_str(data); }
+
681
+
682 template <class T, class AX = std::allocator<T>>
+
683 basic& operator <<(_In_ const std::vector<T, AX>& data)
+
684 {
+
685 size_t num = data.size();
+
686 if (num > UINT32_MAX) _Unlikely_
+
687 throw std::invalid_argument("collection too big");
+
688 *this << static_cast<uint32_t>(num);
+
689 for (auto& el : data)
+
690 *this << el;
+
691 return *this;
+
692 }
+
693
+
694 template <class T, class AX = std::allocator<T>>
+
695 basic& operator >>(_Out_ std::vector<T, AX>& data)
+
696 {
+
697 data.clear();
+
698 uint32_t num;
+
699 *this >> num;
+
700 if (!ok()) _Unlikely_
+
701 return *this;
+
702 data.reserve(num);
+
703 for (uint32_t i = 0; i < num; ++i) {
+
704 T el;
+
705 *this >> el;
+
706 if (!ok()) _Unlikely_
+
707 return *this;
+
708 data.push_back(std::move(el));
+
709 }
+
710 }
+
711
+
712 template <class KEY, class PR = std::less<KEY>, class AX = std::allocator<KEY>>
+
713 basic& operator <<(_In_ const std::set<KEY, PR, AX>& data)
+
714 {
+
715 size_t num = data.size();
+
716 if (num > UINT32_MAX) _Unlikely_
+
717 throw std::invalid_argument("collection too big");
+
718 *this << static_cast<uint32_t>(num);
+
719 for (auto& el : data)
+
720 *this << el;
+
721 return *this;
+
722 }
+
723
+
724 template <class KEY, class PR = std::less<KEY>, class AX = std::allocator<KEY>>
+
725 basic& operator >>(_Out_ std::set<KEY, PR, AX>& data)
+
726 {
+
727 data.clear();
+
728 uint32_t num;
+
729 *this >> num;
+
730 if (!ok()) _Unlikely_
+
731 return *this;
+
732 for (uint32_t i = 0; i < num; ++i) {
+
733 KEY el;
+
734 *this >> el;
+
735 if (!ok()) _Unlikely_
+
736 return *this;
+
737 data.insert(std::move(el));
+
738 }
+
739 }
+
740
+
741 template <class KEY, class PR = std::less<KEY>, class AX = std::allocator<KEY>>
+
742 basic& operator <<(_In_ const std::multiset<KEY, PR, AX>& data)
+
743 {
+
744 size_t num = data.size();
+
745 if (num > UINT32_MAX) _Unlikely_
+
746 throw std::invalid_argument("collection too big");
+
747 *this << static_cast<uint32_t>(num);
+
748 for (auto& el : data)
+
749 *this << el;
+
750 return *this;
+
751 }
+
752
+
753 template <class KEY, class PR = std::less<KEY>, class AX = std::allocator<KEY>>
+
754 basic& operator >>(_Out_ std::multiset<KEY, PR, AX>& data)
+
755 {
+
756 data.clear();
+
757 uint32_t num;
+
758 *this >> num;
+
759 if (!ok()) _Unlikely_
+
760 return *this;
+
761 for (uint32_t i = 0; i < num; ++i) {
+
762 KEY el;
+
763 *this >> el;
+
764 if (!ok()) _Unlikely_
+
765 return *this;
+
766 data.insert(std::move(el));
+
767 }
+
768 return *this;
+
769 }
+
770
+
771 protected:
+
772 state_t m_state;
+
773 };
+
774
-
775 protected:
-
776 state_t m_state;
-
777 };
+
778 using fpos_t = uint64_t;
+
779 constexpr fpos_t fpos_max = UINT64_MAX;
+
780 constexpr fpos_t fpos_min = 0;
+
781
+
785 using foff_t = int64_t;
+
786 constexpr foff_t foff_max = INT64_MAX;
+
787 constexpr foff_t foff_min = INT64_MIN;
+
788
+
792 enum class seek_t {
+
793#ifdef _WIN32
+
794 beg = FILE_BEGIN,
+
795 cur = FILE_CURRENT,
+
796 end = FILE_END
+
797#else
+
798 beg = SEEK_SET,
+
799 cur = SEEK_CUR,
+
800 end = SEEK_END
+
801#endif
+
802 };
+
803
+
804#if _HAS_CXX20
+
805 using clock = std::chrono::file_clock;
+
806#else
+
807 using clock = std::chrono::system_clock;
+
808#endif
+
809 using time_point = std::chrono::time_point<clock>;
+
810
+
+
814 class basic_file : virtual public basic
+
815 {
+
816 public:
+
+
817 virtual std::vector<uint8_t> read_remainder(_In_ size_t max_length = SIZE_MAX)
+
818 {
+
819 size_t length = std::min<size_t>(max_length, static_cast<size_t>(size() - tell()));
+
820 std::vector<uint8_t> result;
+
821 try { result.resize(length); }
+
822 catch (const std::bad_alloc&) {
+
823 m_state = state_t::fail;
+
824 return result;
+
825 }
+
826 result.resize(read_array(result.data(), sizeof(uint8_t), length));
+
827 return result;
+
828 }
-
778
-
782 using fpos_t = uint64_t;
-
783 constexpr fpos_t fpos_max = UINT64_MAX;
-
784 constexpr fpos_t fpos_min = 0;
-
785
-
789 using foff_t = int64_t;
-
790 constexpr foff_t foff_max = INT64_MAX;
-
791 constexpr foff_t foff_min = INT64_MIN;
-
792
-
796 enum class seek_t {
-
797#ifdef _WIN32
-
798 beg = FILE_BEGIN,
-
799 cur = FILE_CURRENT,
-
800 end = FILE_END
-
801#else
-
802 beg = SEEK_SET,
-
803 cur = SEEK_CUR,
-
804 end = SEEK_END
-
805#endif
-
806 };
-
807
-
808#if _HAS_CXX20
-
809 using clock = std::chrono::file_clock;
-
810#else
-
811 using clock = std::chrono::system_clock;
-
812#endif
-
813 using time_point = std::chrono::time_point<clock>;
-
814
-
-
818 class basic_file : virtual public basic
-
819 {
-
820 public:
-
-
821 virtual std::vector<uint8_t> read_remainder(_In_ size_t max_length = SIZE_MAX)
-
822 {
-
823 size_t length = std::min<size_t>(max_length, static_cast<size_t>(size() - tell()));
-
824 std::vector<uint8_t> result;
-
825 try { result.resize(length); }
-
826 catch (const std::bad_alloc&) {
-
827 m_state = state_t::fail;
-
828 return result;
-
829 }
-
830 result.resize(read_array(result.data(), sizeof(uint8_t), length));
-
831 return result;
-
832 }
+
829
+
835 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg) = 0;
+
836
+
+
842 fpos_t seekbeg(_In_ fpos_t offset)
+
843 {
+
844 return seek(static_cast<foff_t>(offset), seek_t::beg);
+
845 }
-
833
-
839 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg) = 0;
-
840
-
-
846 fpos_t seekbeg(_In_ fpos_t offset)
-
847 {
-
848 return seek(static_cast<foff_t>(offset), seek_t::beg);
-
849 }
+
846
+
852 fpos_t seekcur(_In_ foff_t offset) { return seek(offset, seek_t::cur); }
+
853
+
859 fpos_t seekend(_In_ foff_t offset) { return seek(offset, seek_t::end); }
+
860
+
+
861 virtual void skip(_In_ fsize_t amount)
+
862 {
+
863 if (amount > foff_max)
+
864 throw std::invalid_argument("file offset too big");
+
865 seek(static_cast<foff_t>(amount), seek_t::cur);
+
866 }
-
850
-
856 fpos_t seekcur(_In_ foff_t offset) { return seek(offset, seek_t::cur); }
-
857
-
863 fpos_t seekend(_In_ foff_t offset) { return seek(offset, seek_t::end); }
-
864
-
-
865 virtual void skip(_In_ fsize_t amount)
-
866 {
-
867 if (amount > foff_max)
-
868 throw std::invalid_argument("file offset too big");
-
869 seek(static_cast<foff_t>(amount), seek_t::cur);
-
870 }
+
867
+
874 virtual fpos_t tell() const = 0;
+
875
+
+
879 virtual void lock(_In_ fpos_t offset, _In_ fsize_t length)
+
880 {
+
881 _Unreferenced_(offset);
+
882 _Unreferenced_(length);
+
883 throw std::domain_error("not implemented");
+
884 }
-
871
-
878 virtual fpos_t tell() const = 0;
-
879
-
-
883 virtual void lock(_In_ fpos_t offset, _In_ fsize_t length)
-
884 {
-
885 _Unreferenced_(offset);
-
886 _Unreferenced_(length);
-
887 throw std::domain_error("not implemented");
-
888 }
+
885
+
+
889 virtual void unlock(_In_ fpos_t offset, _In_ fsize_t length)
+
890 {
+
891 _Unreferenced_(offset);
+
892 _Unreferenced_(length);
+
893 throw std::domain_error("not implemented");
+
894 }
-
889
-
-
893 virtual void unlock(_In_ fpos_t offset, _In_ fsize_t length)
-
894 {
-
895 _Unreferenced_(offset);
-
896 _Unreferenced_(length);
-
897 throw std::domain_error("not implemented");
-
898 }
+
895
+
900 virtual fsize_t size() const = 0;
+
901
+
905 virtual void truncate() = 0;
+
906
+
+
910 virtual time_point ctime() const
+
911 {
+
912 return time_point::min();
+
913 }
-
899
-
904 virtual fsize_t size() const = 0;
-
905
-
909 virtual void truncate() = 0;
-
910
-
-
914 virtual time_point ctime() const
-
915 {
-
916 return time_point::min();
-
917 }
+
914
+
+
918 virtual time_point atime() const
+
919 {
+
920 return time_point::min();
+
921 }
-
918
-
-
922 virtual time_point atime() const
-
923 {
-
924 return time_point::min();
-
925 }
+
922
+
+
926 virtual time_point mtime() const
+
927 {
+
928 return time_point::min();
+
929 }
-
926
-
-
930 virtual time_point mtime() const
-
931 {
-
932 return time_point::min();
-
933 }
+
930
+
+
934 virtual void set_ctime(time_point date)
+
935 {
+
936 _Unreferenced_(date);
+
937 throw std::domain_error("not implemented");
+
938 }
-
934
-
-
938 virtual void set_ctime(time_point date)
-
939 {
-
940 _Unreferenced_(date);
-
941 throw std::domain_error("not implemented");
-
942 }
+
939
+
+
943 virtual void set_atime(time_point date)
+
944 {
+
945 _Unreferenced_(date);
+
946 throw std::domain_error("not implemented");
+
947 }
-
943
-
-
947 virtual void set_atime(time_point date)
-
948 {
-
949 _Unreferenced_(date);
-
950 throw std::domain_error("not implemented");
-
951 }
+
948
+
+
952 virtual void set_mtime(time_point date)
+
953 {
+
954 _Unreferenced_(date);
+
955 throw std::domain_error("not implemented");
+
956 }
-
952
-
-
956 virtual void set_mtime(time_point date)
-
957 {
-
958 _Unreferenced_(date);
-
959 throw std::domain_error("not implemented");
-
960 }
+
957
+
958#ifdef _WIN32
+
962 LPSAFEARRAY read_sa()
+
963 {
+
964 stdex_assert(size() <= SIZE_MAX);
+
965 if (size() > ULONG_MAX)
+
966 throw std::range_error("data too big");
+
967 ULONG length = static_cast<ULONG>(size());
+
968 std::unique_ptr<SAFEARRAY, SafeArrayDestroy_delete> sa(SafeArrayCreateVector(VT_UI1, 0, length));
+
969 if (!sa) _Unlikely_
+
970 throw std::runtime_error("SafeArrayCreateVector failed");
+
971 if (seek(0) != 0) _Unlikely_
+
972 throw std::system_error(sys_error(), std::system_category(), "failed to seek");
+
973 safearray_accessor<void> a(sa.get());
+
974 if (read_array(a.data(), 1, length) != length)
+
975 throw std::system_error(sys_error(), std::system_category(), "failed to read");
+
976 return sa.release();
+
977 }
+
978#endif
+
979
+
+
985 charset_id read_charset(_In_ charset_id default_charset = charset_id::system)
+
986 {
+
987 if (seek(0) != 0) _Unlikely_
+
988 throw std::system_error(sys_error(), std::system_category(), "failed to seek");
+
989 utf32_t id_utf32;
+
990 read_array(&id_utf32, sizeof(utf32_t), 1);
+
991 if (ok() && id_utf32 == utf32_bom)
+
992 return charset_id::utf32;
+
993
+
994 if (seek(0) != 0) _Unlikely_
+
995 throw std::system_error(sys_error(), std::system_category(), "failed to seek");
+
996 utf16_t id_utf16;
+
997 read_array(&id_utf16, sizeof(utf16_t), 1);
+
998 if (ok() && id_utf16 == utf16_bom)
+
999 return charset_id::utf16;
+
1000
+
1001 if (seek(0) != 0) _Unlikely_
+
1002 throw std::system_error(sys_error(), std::system_category(), "failed to seek");
+
1003 char id_utf8[3] = { 0 };
+
1004 read_array(id_utf8, sizeof(id_utf8), 1);
+
1005 if (ok() && strncmp(id_utf8, _countof(id_utf8), utf8_bom, _countof(utf8_bom)) == 0)
+
1006 return charset_id::utf8;
+
1007
+
1008 if (seek(0) != 0) _Unlikely_
+
1009 throw std::system_error(sys_error(), std::system_category(), "failed to seek");
+
1010 return default_charset;
+
1011 }
-
961
-
962#ifdef _WIN32
-
966 LPSAFEARRAY read_sa()
-
967 {
-
968 stdex_assert(size() <= SIZE_MAX);
-
969 if (size() > ULONG_MAX)
-
970 throw std::range_error("data too big");
-
971 ULONG length = static_cast<ULONG>(size());
-
972 std::unique_ptr<SAFEARRAY, SafeArrayDestroy_delete> sa(SafeArrayCreateVector(VT_UI1, 0, length));
-
973 if (!sa) _Unlikely_
-
974 throw std::runtime_error("SafeArrayCreateVector failed");
-
975 if (seek(0) != 0) _Unlikely_
-
976 throw std::system_error(sys_error(), std::system_category(), "failed to seek");
-
977 safearray_accessor<void> a(sa.get());
-
978 if (read_array(a.data(), 1, length) != length)
-
979 throw std::system_error(sys_error(), std::system_category(), "failed to read");
-
980 return sa.release();
-
981 }
-
982#endif
-
983
-
-
989 charset_id read_charset(_In_ charset_id default_charset = charset_id::system)
-
990 {
-
991 if (seek(0) != 0) _Unlikely_
-
992 throw std::system_error(sys_error(), std::system_category(), "failed to seek");
-
993 utf32_t id_utf32;
-
994 read_array(&id_utf32, sizeof(utf32_t), 1);
-
995 if (ok() && id_utf32 == utf32_bom)
-
996 return charset_id::utf32;
-
997
-
998 if (seek(0) != 0) _Unlikely_
-
999 throw std::system_error(sys_error(), std::system_category(), "failed to seek");
-
1000 utf16_t id_utf16;
-
1001 read_array(&id_utf16, sizeof(utf16_t), 1);
-
1002 if (ok() && id_utf16 == utf16_bom)
-
1003 return charset_id::utf16;
-
1004
-
1005 if (seek(0) != 0) _Unlikely_
-
1006 throw std::system_error(sys_error(), std::system_category(), "failed to seek");
-
1007 char id_utf8[3] = { 0 };
-
1008 read_array(id_utf8, sizeof(id_utf8), 1);
-
1009 if (ok() && strncmp(id_utf8, _countof(id_utf8), utf8_bom, _countof(utf8_bom)) == 0)
-
1010 return charset_id::utf8;
-
1011
-
1012 if (seek(0) != 0) _Unlikely_
-
1013 throw std::system_error(sys_error(), std::system_category(), "failed to seek");
-
1014 return default_charset;
-
1015 }
+
1012 };
-
1016 };
+
1013
+
+
1019 class converter : public basic
+
1020 {
+
1021 protected:
+
1023#pragma warning(suppress: 26495) // The delayed init call will finish initializing the class.
+
1024 explicit converter() : basic(state_t::fail) {}
+
1025
+
1026 void init(_Inout_ basic& source)
+
1027 {
+
1028 m_source = &source;
+
1029 init();
+
1030 }
+
1031
+
1032 void init()
+
1033 {
+
1034 m_state = m_source->state();
+
1035 }
+
1036
+
1037 void done()
+
1038 {
+
1039 m_source = nullptr;
+
1040 }
+
1042
+
1043 public:
+
1044 converter(_Inout_ basic& source) :
+
1045 basic(source.state()),
+
1046 m_source(&source)
+
1047 {}
+
1048
+
+
1049 virtual _Success_(return != 0 || length == 0) size_t read(
+
1050 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
1051 {
+
1052 size_t num_read = m_source->read(data, length);
+
1053 m_state = m_source->state();
+
1054 return num_read;
+
1055 }
-
1017
-
-
1023 class converter : public basic
-
1024 {
-
1025 protected:
-
1027#pragma warning(suppress: 26495) // The delayed init call will finish initializing the class.
-
1028 explicit converter() : basic(state_t::fail) {}
-
1029
-
1030 void init(_Inout_ basic& source)
-
1031 {
-
1032 m_source = &source;
-
1033 init();
-
1034 }
-
1035
-
1036 void init()
-
1037 {
-
1038 m_state = m_source->state();
-
1039 }
-
1040
-
1041 void done()
-
1042 {
-
1043 m_source = nullptr;
-
1044 }
-
1046
-
1047 public:
-
1048 converter(_Inout_ basic& source) :
-
1049 basic(source.state()),
-
1050 m_source(&source)
-
1051 {}
-
1052
-
-
1053 virtual _Success_(return != 0 || length == 0) size_t read(
-
1054 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
1055 {
-
1056 size_t num_read = m_source->read(data, length);
-
1057 m_state = m_source->state();
-
1058 return num_read;
-
1059 }
+
1056
+
+
1057 virtual _Success_(return != 0) size_t write(
+
1058 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
1059 {
+
1060 size_t num_written = m_source->write(data, length);
+
1061 m_state = m_source->state();
+
1062 return num_written;
+
1063 }
-
1060
-
-
1061 virtual _Success_(return != 0) size_t write(
-
1062 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
1063 {
-
1064 size_t num_written = m_source->write(data, length);
-
1065 m_state = m_source->state();
-
1066 return num_written;
-
1067 }
+
1064
+
+
1065 virtual void close()
+
1066 {
+
1067 m_source->close();
+
1068 m_state = m_source->state();
+
1069 }
-
1068
-
-
1069 virtual void close()
-
1070 {
-
1071 m_source->close();
-
1072 m_state = m_source->state();
-
1073 }
+
1070
+
+
1071 virtual void flush()
+
1072 {
+
1073 m_source->flush();
+
1074 m_state = m_source->state();
+
1075 }
-
1074
-
-
1075 virtual void flush()
-
1076 {
-
1077 m_source->flush();
-
1078 m_state = m_source->state();
-
1079 }
+
1076
+
1077 protected:
+
1078 basic* m_source;
+
1079 };
1080
-
1081 protected:
-
1082 basic* m_source;
-
1083 };
+
+
1084 class replicator : public basic
+
1085 {
+
1086 public:
+
1087 virtual ~replicator()
+
1088 {
+
1089 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w) {
+
1090 auto _w = w->get();
+
1091 {
+
1092 const std::lock_guard<std::mutex> lk(_w->mutex);
+
1093 _w->op = worker::op_t::quit;
+
1094 }
+
1095 _w->cv.notify_one();
+
1096 }
+
1097 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w)
+
1098 w->get()->join();
+
1099 }
+
1100
+
+
1104 void push_back(_In_ basic* source)
+
1105 {
+
1106 m_workers.push_back(std::unique_ptr<worker>(new worker(source)));
+
1107 }
-
1084
-
-
1088 class replicator : public basic
-
1089 {
-
1090 public:
-
1091 virtual ~replicator()
-
1092 {
-
1093 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w) {
-
1094 auto _w = w->get();
-
1095 {
-
1096 const std::lock_guard<std::mutex> lk(_w->mutex);
-
1097 _w->op = worker::op_t::quit;
-
1098 }
-
1099 _w->cv.notify_one();
-
1100 }
-
1101 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w)
-
1102 w->get()->join();
-
1103 }
-
1104
-
-
1108 void push_back(_In_ basic* source)
-
1109 {
-
1110 m_workers.push_back(std::unique_ptr<worker>(new worker(source)));
-
1111 }
+
1108
+
+
1112 void remove(basic* source)
+
1113 {
+
1114 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w) {
+
1115 auto _w = w->get();
+
1116 if (_w->source == source) {
+
1117 {
+
1118 const std::lock_guard<std::mutex> lk(_w->mutex);
+
1119 _w->op = worker::op_t::quit;
+
1120 }
+
1121 _w->cv.notify_one();
+
1122 _w->join();
+
1123 m_workers.erase(w);
+
1124 return;
+
1125 }
+
1126 }
+
1127 }
-
1112
-
-
1116 void remove(basic* source)
-
1117 {
-
1118 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w) {
-
1119 auto _w = w->get();
-
1120 if (_w->source == source) {
-
1121 {
-
1122 const std::lock_guard<std::mutex> lk(_w->mutex);
-
1123 _w->op = worker::op_t::quit;
-
1124 }
-
1125 _w->cv.notify_one();
-
1126 _w->join();
-
1127 m_workers.erase(w);
-
1128 return;
-
1129 }
-
1130 }
-
1131 }
+
1128
+
+
1129 virtual _Success_(return != 0) size_t write(
+
1130 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
1131 {
+
1132 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w) {
+
1133 auto _w = w->get();
+
1134 {
+
1135 const std::lock_guard<std::mutex> lk(_w->mutex);
+
1136 _w->op = worker::op_t::write;
+
1137 _w->data = data;
+
1138 _w->length = length;
+
1139 }
+
1140 _w->cv.notify_one();
+
1141 }
+
1142 size_t num_written = length;
+
1143 m_state = state_t::ok;
+
1144 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w) {
+
1145 auto _w = w->get();
+
1146 std::unique_lock<std::mutex> lk(_w->mutex);
+
1147 _w->cv.wait(lk, [&] {return _w->op == worker::op_t::noop; });
+
1148 if (_w->num_written < num_written)
+
1149 num_written = _w->num_written;
+
1150 if (ok() && !_w->source->ok())
+
1151 m_state = _w->source->state();
+
1152 }
+
1153 return num_written;
+
1154 }
-
1132
-
-
1133 virtual _Success_(return != 0) size_t write(
-
1134 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
1135 {
-
1136 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w) {
-
1137 auto _w = w->get();
-
1138 {
-
1139 const std::lock_guard<std::mutex> lk(_w->mutex);
-
1140 _w->op = worker::op_t::write;
-
1141 _w->data = data;
-
1142 _w->length = length;
-
1143 }
-
1144 _w->cv.notify_one();
-
1145 }
-
1146 size_t num_written = length;
-
1147 m_state = state_t::ok;
-
1148 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w) {
-
1149 auto _w = w->get();
-
1150 std::unique_lock<std::mutex> lk(_w->mutex);
-
1151 _w->cv.wait(lk, [&] {return _w->op == worker::op_t::noop; });
-
1152 if (_w->num_written < num_written)
-
1153 num_written = _w->num_written;
-
1154 if (ok() && !_w->source->ok())
-
1155 m_state = _w->source->state();
-
1156 }
-
1157 return num_written;
-
1158 }
+
1155
+
+
1156 virtual void close()
+
1157 {
+
1158 foreach_worker(worker::op_t::close);
+
1159 }
-
1159
-
-
1160 virtual void close()
-
1161 {
-
1162 foreach_worker(worker::op_t::close);
-
1163 }
+
1160
+
+
1161 virtual void flush()
+
1162 {
+
1163 foreach_worker(worker::op_t::flush);
+
1164 }
-
1164
-
-
1165 virtual void flush()
-
1166 {
-
1167 foreach_worker(worker::op_t::flush);
-
1168 }
+
1165
+
1166 protected:
+
+
1167 class worker : public std::thread
+
1168 {
+
1169 public:
+
1170 worker(_In_ basic* _source) :
+
1171 source(_source),
+
1172 op(op_t::noop),
+
1173 data(nullptr),
+
1174 length(0),
+
1175 num_written(0)
+
1176 {
+
1177 *static_cast<std::thread*>(this) = std::thread([](_Inout_ worker& w) { w.process_op(); }, std::ref(*this));
+
1178 }
+
1179
+
1180 protected:
+
1181 void process_op()
+
1182 {
+
1183 for (;;) {
+
1184 std::unique_lock<std::mutex> lk(mutex);
+
1185 cv.wait(lk, [&] {return op != op_t::noop; });
+
1186 switch (op) {
+
1187 case op_t::quit:
+
1188 return;
+
1189 case op_t::write:
+
1190 num_written = source->write(data, length);
+
1191 break;
+
1192 case op_t::close:
+
1193 source->close();
+
1194 break;
+
1195 case op_t::flush:
+
1196 source->flush();
+
1197 break;
+
1198 case op_t::noop:;
+
1199 }
+
1200 op = op_t::noop;
+
1201 lk.unlock();
+
1202 cv.notify_one();
+
1203 }
+
1204 }
+
1205
+
1206 public:
+
1207 basic* source;
+
1208 enum class op_t {
+
1209 noop = 0,
+
1210 quit,
+
1211 write,
+
1212 close,
+
1213 flush,
+
1214 } op;
+
1215 const void* data;
+
1216 size_t length;
+ +
1218 std::mutex mutex;
+
1219 std::condition_variable cv;
+
1220 };
-
1169
-
1170 protected:
-
-
1171 class worker : public std::thread
-
1172 {
-
1173 public:
-
1174 worker(_In_ basic* _source) :
-
1175 source(_source),
-
1176 op(op_t::noop),
-
1177 data(nullptr),
-
1178 length(0),
-
1179 num_written(0)
-
1180 {
-
1181 *static_cast<std::thread*>(this) = std::thread([](_Inout_ worker& w) { w.process_op(); }, std::ref(*this));
-
1182 }
-
1183
-
1184 protected:
-
1185 void process_op()
-
1186 {
-
1187 for (;;) {
-
1188 std::unique_lock<std::mutex> lk(mutex);
-
1189 cv.wait(lk, [&] {return op != op_t::noop; });
-
1190 switch (op) {
-
1191 case op_t::quit:
-
1192 return;
-
1193 case op_t::write:
-
1194 num_written = source->write(data, length);
-
1195 break;
-
1196 case op_t::close:
-
1197 source->close();
-
1198 break;
-
1199 case op_t::flush:
-
1200 source->flush();
-
1201 break;
-
1202 case op_t::noop:;
-
1203 }
-
1204 op = op_t::noop;
-
1205 lk.unlock();
-
1206 cv.notify_one();
-
1207 }
-
1208 }
-
1209
-
1210 public:
-
1211 basic* source;
-
1212 enum class op_t {
-
1213 noop = 0,
-
1214 quit,
-
1215 write,
-
1216 close,
-
1217 flush,
-
1218 } op;
-
1219 const void* data;
-
1220 size_t length;
- -
1222 std::mutex mutex;
-
1223 std::condition_variable cv;
-
1224 };
+
1221
+
1222 void foreach_worker(_In_ worker::op_t op)
+
1223 {
+
1224 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w) {
+
1225 auto _w = w->get();
+
1226 {
+
1227 const std::lock_guard<std::mutex> lk(_w->mutex);
+
1228 _w->op = op;
+
1229 }
+
1230 _w->cv.notify_one();
+
1231 }
+
1232 m_state = state_t::ok;
+
1233 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w) {
+
1234 auto _w = w->get();
+
1235 std::unique_lock<std::mutex> lk(_w->mutex);
+
1236 _w->cv.wait(lk, [&] {return _w->op == worker::op_t::noop; });
+
1237 if (ok())
+
1238 m_state = _w->source->state();
+
1239 }
+
1240 }
+
1241
+
1242 std::list<std::unique_ptr<worker>> m_workers;
+
1243 };
-
1225
-
1226 void foreach_worker(_In_ worker::op_t op)
-
1227 {
-
1228 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w) {
-
1229 auto _w = w->get();
-
1230 {
-
1231 const std::lock_guard<std::mutex> lk(_w->mutex);
-
1232 _w->op = op;
-
1233 }
-
1234 _w->cv.notify_one();
-
1235 }
-
1236 m_state = state_t::ok;
-
1237 for (auto w = m_workers.begin(), w_end = m_workers.end(); w != w_end; ++w) {
-
1238 auto _w = w->get();
-
1239 std::unique_lock<std::mutex> lk(_w->mutex);
-
1240 _w->cv.wait(lk, [&] {return _w->op == worker::op_t::noop; });
-
1241 if (ok())
-
1242 m_state = _w->source->state();
-
1243 }
-
1244 }
-
1245
-
1246 std::list<std::unique_ptr<worker>> m_workers;
-
1247 };
+
1244
+
1245 constexpr size_t default_async_limit = 0x100000;
+
1246
+
1252 template <size_t N_cap = default_async_limit>
+
+ +
1254 {
+
1255 public:
+
1256 async_reader(_Inout_ basic& source) :
+
1257 converter(source),
+
1258 m_worker([](_Inout_ async_reader& w) { w.process(); }, std::ref(*this))
+
1259 {}
+
1260
+
1261 virtual ~async_reader()
+
1262 {
+
1263 m_ring.quit();
+
1264 m_worker.join();
+
1265 }
+
1266
+
1267#pragma warning(suppress: 6101) // See [1] below
+
+
1268 virtual _Success_(return != 0 || length == 0) size_t read(
+
1269 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
1270 {
+
1271 stdex_assert(data || !length);
+
1272 for (size_t to_read = length;;) {
+
1273 uint8_t* ptr; size_t num_read;
+
1274 std::tie(ptr, num_read) = m_ring.front();
+
1275 if (!ptr) _Unlikely_ {
+
1276 m_state = to_read < length || !length ? state_t::ok : m_source->state();
+
1277 return length - to_read; // [1] Code analysis misses `length - to_read` bytes were written to data in previous loop iterations.
+
1278 }
+
1279 if (to_read < num_read)
+
1280 num_read = to_read;
+
1281 memcpy(data, ptr, num_read);
+
1282 m_ring.pop(num_read);
+
1283 to_read -= num_read;
+
1284 if (!to_read) {
+
1285 m_state = state_t::ok;
+
1286 return length;
+
1287 }
+
1288 reinterpret_cast<uint8_t*&>(data) += num_read;
+
1289 }
+
1290 }
-
1248
-
1249 constexpr size_t default_async_limit = 0x100000;
-
1250
-
1256 template <size_t N_cap = default_async_limit>
-
- -
1258 {
-
1259 public:
-
1260 async_reader(_Inout_ basic& source) :
-
1261 converter(source),
-
1262 m_worker([](_Inout_ async_reader& w) { w.process(); }, std::ref(*this))
-
1263 {}
-
1264
-
1265 virtual ~async_reader()
-
1266 {
-
1267 m_ring.quit();
-
1268 m_worker.join();
-
1269 }
-
1270
-
1271#pragma warning(suppress: 6101) // See [1] below
-
-
1272 virtual _Success_(return != 0 || length == 0) size_t read(
-
1273 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
1274 {
-
1275 stdex_assert(data || !length);
-
1276 for (size_t to_read = length;;) {
-
1277 uint8_t* ptr; size_t num_read;
-
1278 std::tie(ptr, num_read) = m_ring.front();
-
1279 if (!ptr) _Unlikely_ {
-
1280 m_state = to_read < length || !length ? state_t::ok : m_source->state();
-
1281 return length - to_read; // [1] Code analysis misses `length - to_read` bytes were written to data in previous loop iterations.
-
1282 }
-
1283 if (to_read < num_read)
-
1284 num_read = to_read;
-
1285 memcpy(data, ptr, num_read);
-
1286 m_ring.pop(num_read);
-
1287 to_read -= num_read;
-
1288 if (!to_read) {
-
1289 m_state = state_t::ok;
-
1290 return length;
-
1291 }
-
1292 reinterpret_cast<uint8_t*&>(data) += num_read;
-
1293 }
-
1294 }
+
1291
+
1292 protected:
+
1293 void process()
+
1294 {
+
1295 for (;;) {
+
1296 uint8_t* ptr; size_t num_write;
+
1297 std::tie(ptr, num_write) = m_ring.back();
+
1298 if (!ptr) _Unlikely_
+
1299 break;
+
1300 num_write = m_source->read(ptr, num_write);
+
1301 m_ring.push(num_write);
+
1302 if (!m_source->ok()) {
+
1303 m_ring.quit();
+
1304 break;
+
1305 }
+
1306 }
+
1307 }
+
1308
+
1309 protected:
+
1310 ring<uint8_t, N_cap> m_ring;
+
1311 std::thread m_worker;
+
1312 };
-
1295
-
1296 protected:
-
1297 void process()
-
1298 {
-
1299 for (;;) {
-
1300 uint8_t* ptr; size_t num_write;
-
1301 std::tie(ptr, num_write) = m_ring.back();
-
1302 if (!ptr) _Unlikely_
-
1303 break;
-
1304 num_write = m_source->read(ptr, num_write);
-
1305 m_ring.push(num_write);
-
1306 if (!m_source->ok()) {
-
1307 m_ring.quit();
-
1308 break;
-
1309 }
-
1310 }
-
1311 }
-
1312
-
1313 protected:
-
1314 ring<uint8_t, N_cap> m_ring;
-
1315 std::thread m_worker;
-
1316 };
+
1313
+
1319 template <size_t N_cap = default_async_limit>
+
+ +
1321 {
+
1322 public:
+
1323 async_writer(_Inout_ basic& source) :
+
1324 converter(source),
+
1325 m_worker([](_Inout_ async_writer& w) { w.process(); }, std::ref(*this))
+
1326 {}
+
1327
+
1328 virtual ~async_writer()
+
1329 {
+
1330 m_ring.quit();
+
1331 m_worker.join();
+
1332 }
+
1333
+
+
1334 virtual _Success_(return != 0) size_t write(
+
1335 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
1336 {
+
1337 stdex_assert(data || !length);
+
1338 for (size_t to_write = length;;) {
+
1339 uint8_t* ptr; size_t num_write;
+
1340 std::tie(ptr, num_write) = m_ring.back();
+
1341 if (!ptr) _Unlikely_ {
+
1342 m_state = state_t::fail;
+
1343 return length - to_write;
+
1344 }
+
1345 if (to_write < num_write)
+
1346 num_write = to_write;
+
1347 memcpy(ptr, data, num_write);
+
1348 m_ring.push(num_write);
+
1349 to_write -= num_write;
+
1350 if (!to_write) {
+
1351 m_state = state_t::ok;
+
1352 return length;
+
1353 }
+
1354 reinterpret_cast<const uint8_t*&>(data) += num_write;
+
1355 }
+
1356 }
-
1317
-
1323 template <size_t N_cap = default_async_limit>
-
- -
1325 {
-
1326 public:
-
1327 async_writer(_Inout_ basic& source) :
-
1328 converter(source),
-
1329 m_worker([](_Inout_ async_writer& w) { w.process(); }, std::ref(*this))
-
1330 {}
-
1331
-
1332 virtual ~async_writer()
-
1333 {
-
1334 m_ring.quit();
-
1335 m_worker.join();
-
1336 }
-
1337
-
-
1338 virtual _Success_(return != 0) size_t write(
-
1339 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
1340 {
-
1341 stdex_assert(data || !length);
-
1342 for (size_t to_write = length;;) {
-
1343 uint8_t* ptr; size_t num_write;
-
1344 std::tie(ptr, num_write) = m_ring.back();
-
1345 if (!ptr) _Unlikely_ {
-
1346 m_state = state_t::fail;
-
1347 return length - to_write;
-
1348 }
-
1349 if (to_write < num_write)
-
1350 num_write = to_write;
-
1351 memcpy(ptr, data, num_write);
-
1352 m_ring.push(num_write);
-
1353 to_write -= num_write;
-
1354 if (!to_write) {
-
1355 m_state = state_t::ok;
-
1356 return length;
-
1357 }
-
1358 reinterpret_cast<const uint8_t*&>(data) += num_write;
-
1359 }
-
1360 }
+
1357
+
+
1358 virtual void flush()
+
1359 {
+
1360 m_ring.sync();
+
1361 converter::flush();
+
1362 }
-
1361
-
-
1362 virtual void flush()
-
1363 {
-
1364 m_ring.sync();
-
1365 converter::flush();
-
1366 }
+
1363
+
1364 protected:
+
1365 void process()
+
1366 {
+
1367 for (;;) {
+
1368 uint8_t* ptr; size_t num_read;
+
1369 std::tie(ptr, num_read) = m_ring.front();
+
1370 if (!ptr)
+
1371 break;
+
1372 num_read = m_source->write(ptr, num_read);
+
1373 m_ring.pop(num_read);
+
1374 if (!m_source->ok()) {
+
1375 m_ring.quit();
+
1376 break;
+
1377 }
+
1378 }
+
1379 }
+
1380
+
1381 protected:
+
1382 ring<uint8_t, N_cap> m_ring;
+
1383 std::thread m_worker;
+
1384 };
-
1367
-
1368 protected:
-
1369 void process()
-
1370 {
-
1371 for (;;) {
-
1372 uint8_t* ptr; size_t num_read;
-
1373 std::tie(ptr, num_read) = m_ring.front();
-
1374 if (!ptr)
-
1375 break;
-
1376 num_read = m_source->write(ptr, num_read);
-
1377 m_ring.pop(num_read);
-
1378 if (!m_source->ok()) {
-
1379 m_ring.quit();
-
1380 break;
-
1381 }
-
1382 }
-
1383 }
-
1384
-
1385 protected:
-
1386 ring<uint8_t, N_cap> m_ring;
-
1387 std::thread m_worker;
-
1388 };
+
1385
+
1386 constexpr size_t default_buffer_size = 0x400;
+
1387
+
+
1391 class buffer : public converter
+
1392 {
+
1393 protected:
+
1395 explicit buffer(_In_ size_t read_buffer_size = default_buffer_size, _In_ size_t write_buffer_size = default_buffer_size) :
+
1396 converter(),
+
1397 m_read_buffer(read_buffer_size),
+
1398 m_write_buffer(write_buffer_size)
+
1399 {}
+
1400
+
1401 void done()
+
1402 {
+
1403 if (m_source)
+
1404 flush_write();
+
1405 converter::done();
+
1406 }
+
1408
+
1409 public:
+
1410 buffer(_Inout_ basic& source, _In_ size_t read_buffer_size = default_buffer_size, _In_ size_t write_buffer_size = default_buffer_size) :
+
1411 converter(source),
+
1412 m_read_buffer(read_buffer_size),
+
1413 m_write_buffer(write_buffer_size)
+
1414 {}
+
1415
+
1416 virtual ~buffer()
+
1417 {
+
1418 if (m_source)
+
1419 flush_write();
+
1420 }
+
1421
+
+
1422 virtual _Success_(return != 0 || length == 0) size_t read(
+
1423 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
1424 {
+
1425 stdex_assert(data || !length);
+
1426 for (size_t to_read = length;;) {
+
1427 size_t buffer_size = m_read_buffer.tail - m_read_buffer.head;
+
1428 if (to_read <= buffer_size) {
+
1429 memcpy(data, m_read_buffer.data + m_read_buffer.head, to_read);
+
1430 m_read_buffer.head += to_read;
+
1431 m_state = state_t::ok;
+
1432 return length;
+
1433 }
+
1434 if (buffer_size) {
+
1435 memcpy(data, m_read_buffer.data + m_read_buffer.head, buffer_size);
+
1436 reinterpret_cast<uint8_t*&>(data) += buffer_size;
+
1437 to_read -= buffer_size;
+
1438 }
+
1439 m_read_buffer.head = 0;
+
1440 if (to_read > m_read_buffer.capacity) {
+
1441 // When needing to read more data than buffer capacity, bypass the buffer.
+
1442 m_read_buffer.tail = 0;
+
1443 to_read -= m_source->read(data, to_read);
+
1444 m_state = to_read < length ? state_t::ok : m_source->state();
+
1445 return length - to_read;
+
1446 }
+
1447 m_read_buffer.tail = m_source->read(m_read_buffer.data, m_read_buffer.capacity);
+
1448 if (m_read_buffer.tail < m_read_buffer.capacity && m_read_buffer.tail < to_read) _Unlikely_ {
+
1449 memcpy(data, m_read_buffer.data, m_read_buffer.tail);
+
1450 m_read_buffer.head = m_read_buffer.tail;
+
1451 to_read -= m_read_buffer.tail;
+
1452 m_state = to_read < length ? state_t::ok : m_source->state();
+
1453 return length - to_read;
+
1454 }
+
1455 }
+
1456 }
-
1389
-
1390 constexpr size_t default_buffer_size = 0x400;
-
1391
-
-
1395 class buffer : public converter
-
1396 {
-
1397 protected:
-
1399 explicit buffer(_In_ size_t read_buffer_size = default_buffer_size, _In_ size_t write_buffer_size = default_buffer_size) :
-
1400 converter(),
-
1401 m_read_buffer(read_buffer_size),
-
1402 m_write_buffer(write_buffer_size)
-
1403 {}
-
1404
-
1405 void done()
-
1406 {
-
1407 if (m_source)
-
1408 flush_write();
-
1409 converter::done();
-
1410 }
-
1412
-
1413 public:
-
1414 buffer(_Inout_ basic& source, _In_ size_t read_buffer_size = default_buffer_size, _In_ size_t write_buffer_size = default_buffer_size) :
-
1415 converter(source),
-
1416 m_read_buffer(read_buffer_size),
-
1417 m_write_buffer(write_buffer_size)
-
1418 {}
-
1419
-
1420 virtual ~buffer()
-
1421 {
-
1422 if (m_source)
-
1423 flush_write();
-
1424 }
-
1425
-
-
1426 virtual _Success_(return != 0 || length == 0) size_t read(
-
1427 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
1428 {
-
1429 stdex_assert(data || !length);
-
1430 for (size_t to_read = length;;) {
-
1431 size_t buffer_size = m_read_buffer.tail - m_read_buffer.head;
-
1432 if (to_read <= buffer_size) {
-
1433 memcpy(data, m_read_buffer.data + m_read_buffer.head, to_read);
-
1434 m_read_buffer.head += to_read;
-
1435 m_state = state_t::ok;
-
1436 return length;
-
1437 }
-
1438 if (buffer_size) {
-
1439 memcpy(data, m_read_buffer.data + m_read_buffer.head, buffer_size);
-
1440 reinterpret_cast<uint8_t*&>(data) += buffer_size;
-
1441 to_read -= buffer_size;
-
1442 }
-
1443 m_read_buffer.head = 0;
-
1444 if (to_read > m_read_buffer.capacity) {
-
1445 // When needing to read more data than buffer capacity, bypass the buffer.
-
1446 m_read_buffer.tail = 0;
-
1447 to_read -= m_source->read(data, to_read);
-
1448 m_state = to_read < length ? state_t::ok : m_source->state();
-
1449 return length - to_read;
-
1450 }
-
1451 m_read_buffer.tail = m_source->read(m_read_buffer.data, m_read_buffer.capacity);
-
1452 if (m_read_buffer.tail < m_read_buffer.capacity && m_read_buffer.tail < to_read) _Unlikely_ {
-
1453 memcpy(data, m_read_buffer.data, m_read_buffer.tail);
-
1454 m_read_buffer.head = m_read_buffer.tail;
-
1455 to_read -= m_read_buffer.tail;
-
1456 m_state = to_read < length ? state_t::ok : m_source->state();
-
1457 return length - to_read;
-
1458 }
-
1459 }
-
1460 }
+
1457
+
+
1458 virtual _Success_(return != 0) size_t write(
+
1459 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
1460 {
+
1461 stdex_assert(data || !length);
+
1462 if (!length) _Unlikely_ {
+
1463 // Pass null writes (zero-byte length). Null write operations have special meaning with with Windows pipes.
+
1464 flush_write();
+
1465 if (!ok()) _Unlikely_
+
1466 return 0;
+
1467 converter::write(nullptr, 0);
+
1468 return 0;
+
1469 }
+
1470
+
1471 for (size_t to_write = length;;) {
+
1472 size_t available_buffer = m_write_buffer.capacity - m_write_buffer.tail;
+
1473 if (to_write <= available_buffer) {
+
1474 memcpy(m_write_buffer.data + m_write_buffer.tail, data, to_write);
+
1475 m_write_buffer.tail += to_write;
+
1476 m_state = state_t::ok;
+
1477 return length;
+
1478 }
+
1479 if (available_buffer) {
+
1480 memcpy(m_write_buffer.data + m_write_buffer.tail, data, available_buffer);
+
1481 reinterpret_cast<const uint8_t*&>(data) += available_buffer;
+
1482 to_write -= available_buffer;
+
1483 m_write_buffer.tail += available_buffer;
+
1484 }
+
1485 size_t buffer_size = m_write_buffer.tail - m_write_buffer.head;
+
1486 if (buffer_size) {
+
1487 m_write_buffer.head += converter::write(m_write_buffer.data + m_write_buffer.head, buffer_size);
+
1488 if (m_write_buffer.head == m_write_buffer.tail)
+
1489 m_write_buffer.head = m_write_buffer.tail = 0;
+
1490 else
+
1491 return length - to_write;
+
1492 }
+
1493 if (to_write > m_write_buffer.capacity) {
+
1494 // When needing to write more data than buffer capacity, bypass the buffer.
+
1495 to_write -= converter::write(data, to_write);
+
1496 return length - to_write;
+
1497 }
+
1498 }
+
1499 }
-
1461
-
-
1462 virtual _Success_(return != 0) size_t write(
-
1463 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
1464 {
-
1465 stdex_assert(data || !length);
-
1466 if (!length) _Unlikely_ {
-
1467 // Pass null writes (zero-byte length). Null write operations have special meaning with with Windows pipes.
-
1468 flush_write();
-
1469 if (!ok()) _Unlikely_
-
1470 return 0;
-
1471 converter::write(nullptr, 0);
-
1472 return 0;
-
1473 }
-
1474
-
1475 for (size_t to_write = length;;) {
-
1476 size_t available_buffer = m_write_buffer.capacity - m_write_buffer.tail;
-
1477 if (to_write <= available_buffer) {
-
1478 memcpy(m_write_buffer.data + m_write_buffer.tail, data, to_write);
-
1479 m_write_buffer.tail += to_write;
-
1480 m_state = state_t::ok;
-
1481 return length;
-
1482 }
-
1483 if (available_buffer) {
-
1484 memcpy(m_write_buffer.data + m_write_buffer.tail, data, available_buffer);
-
1485 reinterpret_cast<const uint8_t*&>(data) += available_buffer;
-
1486 to_write -= available_buffer;
-
1487 m_write_buffer.tail += available_buffer;
-
1488 }
-
1489 size_t buffer_size = m_write_buffer.tail - m_write_buffer.head;
-
1490 if (buffer_size) {
-
1491 m_write_buffer.head += converter::write(m_write_buffer.data + m_write_buffer.head, buffer_size);
-
1492 if (m_write_buffer.head == m_write_buffer.tail)
-
1493 m_write_buffer.head = m_write_buffer.tail = 0;
-
1494 else
-
1495 return length - to_write;
-
1496 }
-
1497 if (to_write > m_write_buffer.capacity) {
-
1498 // When needing to write more data than buffer capacity, bypass the buffer.
-
1499 to_write -= converter::write(data, to_write);
-
1500 return length - to_write;
-
1501 }
-
1502 }
-
1503 }
+
1500
+
+
1501 virtual void flush()
+
1502 {
+
1503 flush_write();
+
1504 if (ok())
+
1505 converter::flush();
+
1506 }
-
1504
-
-
1505 virtual void flush()
-
1506 {
-
1507 flush_write();
-
1508 if (ok())
-
1509 converter::flush();
-
1510 }
-
-
1511
-
1512 protected:
-
1513 void flush_write()
-
1514 {
-
1515 size_t buffer_size = m_write_buffer.tail - m_write_buffer.head;
-
1516 if (buffer_size) {
-
1517 m_write_buffer.head += m_source->write(m_write_buffer.data + m_write_buffer.head, buffer_size);
-
1518 if (m_write_buffer.head == m_write_buffer.tail) {
-
1519 m_write_buffer.head = 0;
-
1520 m_write_buffer.tail = 0;
+
1507
+
1508 protected:
+
1509 void flush_write()
+
1510 {
+
1511 size_t buffer_size = m_write_buffer.tail - m_write_buffer.head;
+
1512 if (buffer_size) {
+
1513 m_write_buffer.head += m_source->write(m_write_buffer.data + m_write_buffer.head, buffer_size);
+
1514 if (m_write_buffer.head == m_write_buffer.tail) {
+
1515 m_write_buffer.head = 0;
+
1516 m_write_buffer.tail = 0;
+
1517 }
+
1518 else {
+
1519 m_state = m_source->state();
+
1520 return;
1521 }
-
1522 else {
-
1523 m_state = m_source->state();
-
1524 return;
-
1525 }
-
1526 }
-
1527 m_state = state_t::ok;
-
1528 }
+
1522 }
+
1523 m_state = state_t::ok;
+
1524 }
+
1525
+
+
1526 struct buffer_t {
+
1527 uint8_t* data;
+
1528 size_t head, tail, capacity;
1529
-
-
1530 struct buffer_t {
-
1531 uint8_t* data;
-
1532 size_t head, tail, capacity;
-
1533
-
1534 buffer_t(_In_ size_t buffer_size) :
-
1535 head(0),
-
1536 tail(0),
-
1537 capacity(buffer_size),
-
1538 data(buffer_size ? new uint8_t[buffer_size] : nullptr)
-
1539 {}
-
1540
-
1541 ~buffer_t()
-
1542 {
-
1543 if (data)
-
1544 delete[] data;
-
1545 }
-
1546 } m_read_buffer, m_write_buffer;
+
1530 buffer_t(_In_ size_t buffer_size) :
+
1531 head(0),
+
1532 tail(0),
+
1533 capacity(buffer_size),
+
1534 data(buffer_size ? new uint8_t[buffer_size] : nullptr)
+
1535 {}
+
1536
+
1537 ~buffer_t()
+
1538 {
+
1539 if (data)
+
1540 delete[] data;
+
1541 }
+
1542 } m_read_buffer, m_write_buffer;
-
1547 };
+
1543 };
-
1548
-
-
1552 class limiter : public converter
-
1553 {
-
1554 public:
-
1555 limiter(_Inout_ basic& source, _In_ fsize_t _read_limit = 0, _In_ fsize_t _write_limit = 0) :
-
1556 converter(source),
-
1557 read_limit(_read_limit),
-
1558 write_limit(_write_limit)
-
1559 {}
-
1560
-
-
1561 virtual _Success_(return != 0 || length == 0) size_t read(
-
1562 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
1563 {
-
1564 size_t num_read;
-
1565 if (read_limit == fsize_max)
-
1566 num_read = converter::read(data, length);
-
1567 else if (length <= read_limit) {
-
1568 num_read = converter::read(data, length);
-
1569 read_limit -= num_read;
+
1544
+
+
1548 class limiter : public converter
+
1549 {
+
1550 public:
+
1551 limiter(_Inout_ basic& source, _In_ fsize_t _read_limit = 0, _In_ fsize_t _write_limit = 0) :
+
1552 converter(source),
+
1553 read_limit(_read_limit),
+
1554 write_limit(_write_limit)
+
1555 {}
+
1556
+
+
1557 virtual _Success_(return != 0 || length == 0) size_t read(
+
1558 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
1559 {
+
1560 size_t num_read;
+
1561 if (read_limit == fsize_max)
+
1562 num_read = converter::read(data, length);
+
1563 else if (length <= read_limit) {
+
1564 num_read = converter::read(data, length);
+
1565 read_limit -= num_read;
+
1566 }
+
1567 else if (length && !read_limit) {
+
1568 num_read = 0;
+
1569 m_state = state_t::eof;
1570 }
-
1571 else if (length && !read_limit) {
-
1572 num_read = 0;
-
1573 m_state = state_t::eof;
+
1571 else {
+
1572 num_read = converter::read(data, static_cast<size_t>(read_limit));
+
1573 read_limit -= num_read;
1574 }
-
1575 else {
-
1576 num_read = converter::read(data, static_cast<size_t>(read_limit));
-
1577 read_limit -= num_read;
-
1578 }
-
1579 return num_read;
-
1580 }
+
1575 return num_read;
+
1576 }
-
1581
-
-
1582 virtual _Success_(return != 0) size_t write(
-
1583 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
1584 {
-
1585 size_t num_written;
-
1586 if (write_limit == fsize_max)
-
1587 num_written = converter::write(data, length);
-
1588 else if (length <= write_limit) {
-
1589 num_written = converter::write(data, length);
-
1590 write_limit -= num_written;
+
1577
+
+
1578 virtual _Success_(return != 0) size_t write(
+
1579 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
1580 {
+
1581 size_t num_written;
+
1582 if (write_limit == fsize_max)
+
1583 num_written = converter::write(data, length);
+
1584 else if (length <= write_limit) {
+
1585 num_written = converter::write(data, length);
+
1586 write_limit -= num_written;
+
1587 }
+
1588 else if (length && !write_limit) {
+
1589 num_written = 0;
+
1590 m_state = state_t::fail;
1591 }
-
1592 else if (length && !write_limit) {
-
1593 num_written = 0;
-
1594 m_state = state_t::fail;
+
1592 else {
+
1593 num_written = converter::write(data, static_cast<size_t>(write_limit));
+
1594 write_limit -= num_written;
1595 }
-
1596 else {
-
1597 num_written = converter::write(data, static_cast<size_t>(write_limit));
-
1598 write_limit -= num_written;
-
1599 }
-
1600 return num_written;
-
1601 }
+
1596 return num_written;
+
1597 }
-
1602
-
1603 public:
-
1604 fsize_t
- - -
1607 };
+
1598
+
1599 public:
+
1600 fsize_t
+ + +
1603 };
-
1608
-
-
1612 class window : public limiter
-
1613 {
-
1614 public:
-
1615 window(_Inout_ basic& source, _In_ fpos_t _read_offset = 0, _In_ fsize_t read_limit = fsize_max, _In_ fpos_t _write_offset = 0, _In_ fsize_t write_limit = fsize_max) :
-
1616 limiter(source, read_limit, write_limit),
-
1617 read_offset(_read_offset),
-
1618 write_offset(_write_offset)
-
1619 {}
-
1620
-
-
1621 virtual _Success_(return != 0 || length == 0) size_t read(
-
1622 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
1623 {
-
1624 if (read_offset) {
-
1625 m_source->skip(read_offset);
-
1626 m_state = m_source->state();
-
1627 if (!ok()) _Unlikely_
-
1628 return 0;
-
1629 read_offset = 0;
-
1630 }
-
1631 size_t num_read;
-
1632 if (read_limit == fsize_max)
-
1633 num_read = converter::read(data, length);
-
1634 else if (length <= read_limit) {
-
1635 num_read = converter::read(data, length);
-
1636 read_limit -= num_read;
-
1637 }
-
1638 else if (length && !read_limit) {
-
1639 num_read = 0;
-
1640 m_source->skip(length);
-
1641 m_state = state_t::eof;
+
1604
+
+
1608 class window : public limiter
+
1609 {
+
1610 public:
+
1611 window(_Inout_ basic& source, _In_ fpos_t _read_offset = 0, _In_ fsize_t read_limit = fsize_max, _In_ fpos_t _write_offset = 0, _In_ fsize_t write_limit = fsize_max) :
+
1612 limiter(source, read_limit, write_limit),
+
1613 read_offset(_read_offset),
+
1614 write_offset(_write_offset)
+
1615 {}
+
1616
+
+
1617 virtual _Success_(return != 0 || length == 0) size_t read(
+
1618 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
1619 {
+
1620 if (read_offset) {
+
1621 m_source->skip(read_offset);
+
1622 m_state = m_source->state();
+
1623 if (!ok()) _Unlikely_
+
1624 return 0;
+
1625 read_offset = 0;
+
1626 }
+
1627 size_t num_read;
+
1628 if (read_limit == fsize_max)
+
1629 num_read = converter::read(data, length);
+
1630 else if (length <= read_limit) {
+
1631 num_read = converter::read(data, length);
+
1632 read_limit -= num_read;
+
1633 }
+
1634 else if (length && !read_limit) {
+
1635 num_read = 0;
+
1636 m_source->skip(length);
+
1637 m_state = state_t::eof;
+
1638 }
+
1639 else {
+
1640 num_read = converter::read(data, static_cast<size_t>(read_limit));
+
1641 read_limit -= num_read;
1642 }
-
1643 else {
-
1644 num_read = converter::read(data, static_cast<size_t>(read_limit));
-
1645 read_limit -= num_read;
-
1646 }
-
1647 return num_read;
-
1648 }
+
1643 return num_read;
+
1644 }
-
1649
-
-
1650 virtual _Success_(return != 0) size_t write(
-
1651 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
1652 {
-
1653 size_t num_skipped, num_written;
-
1654 if (length <= write_offset) {
-
1655 write_offset -= length;
-
1656 m_state = state_t::ok;
-
1657 return length;
-
1658 }
-
1659 if (write_offset) {
-
1660 reinterpret_cast<const uint8_t*&>(data) += static_cast<size_t>(write_offset);
-
1661 length -= static_cast<size_t>(write_offset);
-
1662 num_skipped = static_cast<size_t>(write_offset);
-
1663 write_offset = 0;
-
1664 }
-
1665 else
-
1666 num_skipped = 0;
-
1667 if (write_limit == fsize_max)
-
1668 num_written = converter::write(data, length);
-
1669 else if (length <= write_limit) {
-
1670 num_written = converter::write(data, length);
-
1671 write_limit -= num_written;
-
1672 }
-
1673 else if (length && !write_limit) {
-
1674 num_skipped += length;
-
1675 num_written = 0;
-
1676 m_state = state_t::ok;
-
1677 }
-
1678 else {
-
1679 num_skipped += length - static_cast<size_t>(write_limit);
-
1680 num_written = converter::write(data, static_cast<size_t>(write_limit));
-
1681 write_limit -= num_written;
-
1682 }
-
1683 return num_skipped + num_written;
-
1684 }
+
1645
+
+
1646 virtual _Success_(return != 0) size_t write(
+
1647 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
1648 {
+
1649 size_t num_skipped, num_written;
+
1650 if (length <= write_offset) {
+
1651 write_offset -= length;
+
1652 m_state = state_t::ok;
+
1653 return length;
+
1654 }
+
1655 if (write_offset) {
+
1656 reinterpret_cast<const uint8_t*&>(data) += static_cast<size_t>(write_offset);
+
1657 length -= static_cast<size_t>(write_offset);
+
1658 num_skipped = static_cast<size_t>(write_offset);
+
1659 write_offset = 0;
+
1660 }
+
1661 else
+
1662 num_skipped = 0;
+
1663 if (write_limit == fsize_max)
+
1664 num_written = converter::write(data, length);
+
1665 else if (length <= write_limit) {
+
1666 num_written = converter::write(data, length);
+
1667 write_limit -= num_written;
+
1668 }
+
1669 else if (length && !write_limit) {
+
1670 num_skipped += length;
+
1671 num_written = 0;
+
1672 m_state = state_t::ok;
+
1673 }
+
1674 else {
+
1675 num_skipped += length - static_cast<size_t>(write_limit);
+
1676 num_written = converter::write(data, static_cast<size_t>(write_limit));
+
1677 write_limit -= num_written;
+
1678 }
+
1679 return num_skipped + num_written;
+
1680 }
-
1685
-
1686 public:
-
1687 fpos_t
- - -
1690 };
+
1681
+
1682 public:
+
1683 fpos_t
+ + +
1686 };
-
1691
-
- -
1696 {
-
1697 public:
-
1698 file_window(_Inout_ basic_file& source, fpos_t offset = 0, fsize_t length = 0) :
-
1699 basic(source.state()),
-
1700 m_source(source),
-
1701 m_offset(source.tell()),
-
1702 m_region(offset, offset + length)
-
1703 {}
-
1704
-
-
1705 virtual _Success_(return != 0 || length == 0) size_t read(
-
1706 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
1707 {
-
1708 stdex_assert(data || !length);
-
1709 if (m_region.contains(m_offset)) {
-
1710 size_t num_read = m_source.read(data, static_cast<size_t>(std::min<fpos_t>(length, m_region.end - m_offset)));
-
1711 m_state = m_source.state();
-
1712 m_offset += num_read;
-
1713 return num_read;
-
1714 }
-
1715 m_state = length ? state_t::eof : state_t::ok;
-
1716 return 0;
-
1717 }
+
1687
+
+ +
1692 {
+
1693 public:
+
1694 file_window(_Inout_ basic_file& source, fpos_t offset = 0, fsize_t length = 0) :
+
1695 basic(source.state()),
+
1696 m_source(source),
+
1697 m_offset(source.tell()),
+
1698 m_region(offset, offset + length)
+
1699 {}
+
1700
+
+
1701 virtual _Success_(return != 0 || length == 0) size_t read(
+
1702 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
1703 {
+
1704 stdex_assert(data || !length);
+
1705 if (m_region.contains(m_offset)) {
+
1706 size_t num_read = m_source.read(data, static_cast<size_t>(std::min<fpos_t>(length, m_region.end - m_offset)));
+
1707 m_state = m_source.state();
+
1708 m_offset += num_read;
+
1709 return num_read;
+
1710 }
+
1711 m_state = length ? state_t::eof : state_t::ok;
+
1712 return 0;
+
1713 }
-
1718
-
-
1719 virtual _Success_(return != 0) size_t write(
-
1720 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
1721 {
-
1722 stdex_assert(data || !length);
-
1723 if (m_region.contains(m_offset)) {
-
1724 size_t num_written = m_source.write(data, static_cast<size_t>(std::min<fpos_t>(length, m_region.end - m_offset)));
-
1725 m_state = m_source.state();
-
1726 m_offset += num_written;
-
1727 return num_written;
-
1728 }
-
1729 m_state = state_t::fail;
-
1730 return 0;
-
1731 }
+
1714
+
+
1715 virtual _Success_(return != 0) size_t write(
+
1716 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
1717 {
+
1718 stdex_assert(data || !length);
+
1719 if (m_region.contains(m_offset)) {
+
1720 size_t num_written = m_source.write(data, static_cast<size_t>(std::min<fpos_t>(length, m_region.end - m_offset)));
+
1721 m_state = m_source.state();
+
1722 m_offset += num_written;
+
1723 return num_written;
+
1724 }
+
1725 m_state = state_t::fail;
+
1726 return 0;
+
1727 }
-
1732
-
-
1733 virtual void close()
-
1734 {
-
1735 m_source.close();
-
1736 m_state = m_source.state();
-
1737 }
+
1728
+
+
1729 virtual void close()
+
1730 {
+
1731 m_source.close();
+
1732 m_state = m_source.state();
+
1733 }
-
1738
-
-
1739 virtual void flush()
-
1740 {
-
1741 m_source.flush();
-
1742 m_state = m_source.state();
-
1743 }
+
1734
+
+
1735 virtual void flush()
+
1736 {
+
1737 m_source.flush();
+
1738 m_state = m_source.state();
+
1739 }
-
1744
-
-
1745 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
-
1746 {
-
1747 m_offset = m_source.seek(offset, how);
-
1748 m_state = m_source.state();
-
1749 return ok() ? m_offset - m_region.start : fpos_max;
-
1750 }
+
1740
+
+
1741 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
+
1742 {
+
1743 m_offset = m_source.seek(offset, how);
+
1744 m_state = m_source.state();
+
1745 return ok() ? m_offset - m_region.start : fpos_max;
+
1746 }
-
1751
-
-
1752 virtual void skip(_In_ fsize_t amount)
-
1753 {
-
1754 m_source.skip(amount);
-
1755 m_state = m_source.state();
-
1756 }
+
1747
+
+
1748 virtual void skip(_In_ fsize_t amount)
+
1749 {
+
1750 m_source.skip(amount);
+
1751 m_state = m_source.state();
+
1752 }
-
1757
-
-
1758 virtual fpos_t tell() const
-
1759 {
-
1760 fpos_t offset = m_source.tell();
-
1761 return m_region.contains(offset) ? offset - m_region.start : fpos_max;
-
1762 }
+
1753
+
+
1754 virtual fpos_t tell() const
+
1755 {
+
1756 fpos_t offset = m_source.tell();
+
1757 return m_region.contains(offset) ? offset - m_region.start : fpos_max;
+
1758 }
-
1763
-
-
1764 virtual void lock(_In_ fpos_t offset, _In_ fsize_t length)
-
1765 {
-
1766 if (m_region.contains(offset)) {
-
1767 m_source.lock(m_region.start + offset, std::min<fsize_t>(length, m_region.end - offset));
-
1768 m_state = m_source.state();
-
1769 }
-
1770 else
-
1771 m_state = state_t::fail;
-
1772 }
+
1759
+
+
1760 virtual void lock(_In_ fpos_t offset, _In_ fsize_t length)
+
1761 {
+
1762 if (m_region.contains(offset)) {
+
1763 m_source.lock(m_region.start + offset, std::min<fsize_t>(length, m_region.end - offset));
+
1764 m_state = m_source.state();
+
1765 }
+
1766 else
+
1767 m_state = state_t::fail;
+
1768 }
-
1773
-
-
1774 virtual void unlock(_In_ fpos_t offset, _In_ fsize_t length)
-
1775 {
-
1776 if (m_region.contains(offset)) {
-
1777 m_source.unlock(m_region.start + offset, std::min<fsize_t>(length, m_region.end - offset));
-
1778 m_state = m_source.state();
-
1779 }
-
1780 else
-
1781 m_state = state_t::fail;
-
1782 }
+
1769
+
+
1770 virtual void unlock(_In_ fpos_t offset, _In_ fsize_t length)
+
1771 {
+
1772 if (m_region.contains(offset)) {
+
1773 m_source.unlock(m_region.start + offset, std::min<fsize_t>(length, m_region.end - offset));
+
1774 m_state = m_source.state();
+
1775 }
+
1776 else
+
1777 m_state = state_t::fail;
+
1778 }
-
1783
-
-
1784 virtual fsize_t size() const
-
1785 {
-
1786 return m_region.size();
-
1787 }
+
1779
+
+
1780 virtual fsize_t size() const
+
1781 {
+
1782 return m_region.size();
+
1783 }
-
1788
-
-
1789 virtual void truncate()
-
1790 {
-
1791 m_state = state_t::fail;
-
1792 }
+
1784
+
+
1785 virtual void truncate()
+
1786 {
+
1787 m_state = state_t::fail;
+
1788 }
-
1793
-
1794 protected:
-
1795 basic_file& m_source;
-
1796 fpos_t m_offset;
-
1797 interval<fpos_t> m_region;
-
1798 };
+
1789
+
1790 protected:
+
1791 basic_file& m_source;
+
1792 fpos_t m_offset;
+
1793 interval<fpos_t> m_region;
+
1794 };
-
1799
-
1800 constexpr size_t default_cache_size = 0x1000;
-
1801
-
-
1805 class cache : public basic_file
-
1806 {
-
1807 protected:
-
1809#pragma warning(suppress: 26495) // The delayed init call will finish initializing the class.
-
1810 explicit cache(_In_ size_t cache_size = default_cache_size) :
-
1811 basic(state_t::fail),
-
1812 m_cache(cache_size)
-
1813 {}
-
1814
-
1815 void init(_Inout_ basic_file& source)
-
1816 {
-
1817 m_source = &source;
-
1818 init();
-
1819 }
-
1820
-
1821 void init()
-
1822 {
-
1823 m_state = m_source->state();
-
1824 m_offset = m_source->tell();
-
1825#if SET_FILE_OP_TIMES
-
1826 m_atime = m_source->atime();
-
1827 m_mtime = m_source->mtime();
-
1828#endif
-
1829 }
-
1830
-
1831 void done()
-
1832 {
-
1833 if (m_source) {
-
1834 flush_cache();
-
1835 if (!ok()) _Unlikely_
-
1836 throw std::system_error(sys_error(), std::system_category(), "failed to flush cache"); // Data loss occurred
-
1837 m_source->seekbeg(m_offset);
-
1838#if SET_FILE_OP_TIMES
-
1839 m_source->set_atime(m_atime);
-
1840 m_source->set_mtime(m_mtime);
-
1841#endif
-
1842 m_source = nullptr;
-
1843 }
-
1844 }
-
1846
-
1847 public:
-
1848 cache(_Inout_ basic_file& source, _In_ size_t cache_size = default_cache_size) :
-
1849 basic(source.state()),
-
1850 m_source(&source),
-
1851 m_cache(cache_size),
-
1852 m_offset(source.tell())
-
1853#if SET_FILE_OP_TIMES
-
1854 , m_atime(source.atime())
-
1855 , m_mtime(source.mtime())
-
1856#endif
-
1857 {}
-
1858
-
1859 virtual ~cache() noexcept(false)
-
1860 {
-
1861 if (m_source) {
-
1862 flush_cache();
-
1863 if (!ok()) _Unlikely_
-
1864 throw std::system_error(sys_error(), std::system_category(), "failed to flush cache"); // Data loss occurred
-
1865 m_source->seekbeg(m_offset);
-
1866#if SET_FILE_OP_TIMES
-
1867 m_source->set_atime(m_atime);
-
1868 m_source->set_mtime(m_mtime);
-
1869#endif
-
1870 }
-
1871 }
-
1872
-
-
1873 virtual _Success_(return != 0 || length == 0) size_t read(
-
1874 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
1875 {
-
1876 stdex_assert(data || !length);
-
1877#if SET_FILE_OP_TIMES
-
1878 m_atime = time_point::now();
-
1879#endif
-
1880 for (size_t to_read = length;;) {
-
1881 if (m_cache.status != cache_t::cache_t::status_t::empty) {
-
1882 if (m_cache.region.contains(m_offset)) {
-
1883 size_t remaining_cache = static_cast<size_t>(m_cache.region.end - m_offset);
-
1884 if (to_read <= remaining_cache) {
-
1885 memcpy(data, m_cache.data + static_cast<size_t>(m_offset - m_cache.region.start), to_read);
-
1886 m_offset += to_read;
-
1887 m_state = state_t::ok;
-
1888 return length;
-
1889 }
-
1890 memcpy(data, m_cache.data + static_cast<size_t>(m_offset - m_cache.region.start), remaining_cache);
-
1891 reinterpret_cast<uint8_t*&>(data) += remaining_cache;
-
1892 to_read -= remaining_cache;
-
1893 m_offset += remaining_cache;
-
1894 }
-
1895 flush_cache();
-
1896 if (!ok()) _Unlikely_ {
-
1897 if (to_read < length)
-
1898 m_state = state_t::ok;
-
1899 return length - to_read;
-
1900 }
-
1901 }
-
1902 {
-
1903 fpos_t end_max = m_offset + to_read;
-
1904 if (m_offset / m_cache.capacity < end_max / m_cache.capacity) {
-
1905 // Read spans multiple cache blocks. Bypass cache to the last block.
-
1906 m_source->seekbeg(m_offset);
-
1907 if (!m_source->ok()) _Unlikely_ {
-
1908 m_state = to_read < length ? state_t::ok : state_t::fail;
-
1909 return length - to_read;
-
1910 }
-
1911 size_t num_read = m_source->read(data, to_read - static_cast<size_t>(end_max % m_cache.capacity));
-
1912 m_offset += num_read;
-
1913 to_read -= num_read;
-
1914 if (!to_read) {
-
1915 m_state = state_t::ok;
-
1916 return length;
-
1917 }
-
1918 reinterpret_cast<uint8_t*&>(data) += num_read;
-
1919 m_state = m_source->state();
-
1920 if (!ok()) {
-
1921 if (to_read < length)
-
1922 m_state = state_t::ok;
-
1923 return length - to_read;
-
1924 }
-
1925 }
-
1926 }
-
1927 load_cache(m_offset);
-
1928 if (!ok()) _Unlikely_ {
-
1929 m_state = to_read < length ? state_t::ok : state_t::fail;
+
1795
+
1796 constexpr size_t default_cache_size = 0x1000;
+
1797
+
+
1801 class cache : public basic_file
+
1802 {
+
1803 protected:
+
1805#pragma warning(suppress: 26495) // The delayed init call will finish initializing the class.
+
1806 explicit cache(_In_ size_t cache_size = default_cache_size) :
+
1807 basic(state_t::fail),
+
1808 m_cache(cache_size)
+
1809 {}
+
1810
+
1811 void init(_Inout_ basic_file& source)
+
1812 {
+
1813 m_source = &source;
+
1814 init();
+
1815 }
+
1816
+
1817 void init()
+
1818 {
+
1819 m_state = m_source->state();
+
1820 m_offset = m_source->tell();
+
1821#if SET_FILE_OP_TIMES
+
1822 m_atime = m_source->atime();
+
1823 m_mtime = m_source->mtime();
+
1824#endif
+
1825 }
+
1826
+
1827 void done()
+
1828 {
+
1829 if (m_source) {
+
1830 flush_cache();
+
1831 if (!ok()) _Unlikely_
+
1832 throw std::system_error(sys_error(), std::system_category(), "failed to flush cache"); // Data loss occurred
+
1833 m_source->seekbeg(m_offset);
+
1834#if SET_FILE_OP_TIMES
+
1835 m_source->set_atime(m_atime);
+
1836 m_source->set_mtime(m_mtime);
+
1837#endif
+
1838 m_source = nullptr;
+
1839 }
+
1840 }
+
1842
+
1843 public:
+
1844 cache(_Inout_ basic_file& source, _In_ size_t cache_size = default_cache_size) :
+
1845 basic(source.state()),
+
1846 m_source(&source),
+
1847 m_cache(cache_size),
+
1848 m_offset(source.tell())
+
1849#if SET_FILE_OP_TIMES
+
1850 , m_atime(source.atime())
+
1851 , m_mtime(source.mtime())
+
1852#endif
+
1853 {}
+
1854
+
1855 virtual ~cache() noexcept(false)
+
1856 {
+
1857 if (m_source) {
+
1858 flush_cache();
+
1859 if (!ok()) _Unlikely_
+
1860 throw std::system_error(sys_error(), std::system_category(), "failed to flush cache"); // Data loss occurred
+
1861 m_source->seekbeg(m_offset);
+
1862#if SET_FILE_OP_TIMES
+
1863 m_source->set_atime(m_atime);
+
1864 m_source->set_mtime(m_mtime);
+
1865#endif
+
1866 }
+
1867 }
+
1868
+
+
1869 virtual _Success_(return != 0 || length == 0) size_t read(
+
1870 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
1871 {
+
1872 stdex_assert(data || !length);
+
1873#if SET_FILE_OP_TIMES
+
1874 m_atime = time_point::now();
+
1875#endif
+
1876 for (size_t to_read = length;;) {
+
1877 if (m_cache.status != cache_t::cache_t::status_t::empty) {
+
1878 if (m_cache.region.contains(m_offset)) {
+
1879 size_t remaining_cache = static_cast<size_t>(m_cache.region.end - m_offset);
+
1880 if (to_read <= remaining_cache) {
+
1881 memcpy(data, m_cache.data + static_cast<size_t>(m_offset - m_cache.region.start), to_read);
+
1882 m_offset += to_read;
+
1883 m_state = state_t::ok;
+
1884 return length;
+
1885 }
+
1886 memcpy(data, m_cache.data + static_cast<size_t>(m_offset - m_cache.region.start), remaining_cache);
+
1887 reinterpret_cast<uint8_t*&>(data) += remaining_cache;
+
1888 to_read -= remaining_cache;
+
1889 m_offset += remaining_cache;
+
1890 }
+
1891 flush_cache();
+
1892 if (!ok()) _Unlikely_ {
+
1893 if (to_read < length)
+
1894 m_state = state_t::ok;
+
1895 return length - to_read;
+
1896 }
+
1897 }
+
1898 {
+
1899 fpos_t end_max = m_offset + to_read;
+
1900 if (m_offset / m_cache.capacity < end_max / m_cache.capacity) {
+
1901 // Read spans multiple cache blocks. Bypass cache to the last block.
+
1902 m_source->seekbeg(m_offset);
+
1903 if (!m_source->ok()) _Unlikely_ {
+
1904 m_state = to_read < length ? state_t::ok : state_t::fail;
+
1905 return length - to_read;
+
1906 }
+
1907 size_t num_read = m_source->read(data, to_read - static_cast<size_t>(end_max % m_cache.capacity));
+
1908 m_offset += num_read;
+
1909 to_read -= num_read;
+
1910 if (!to_read) {
+
1911 m_state = state_t::ok;
+
1912 return length;
+
1913 }
+
1914 reinterpret_cast<uint8_t*&>(data) += num_read;
+
1915 m_state = m_source->state();
+
1916 if (!ok()) {
+
1917 if (to_read < length)
+
1918 m_state = state_t::ok;
+
1919 return length - to_read;
+
1920 }
+
1921 }
+
1922 }
+
1923 load_cache(m_offset);
+
1924 if (!ok()) _Unlikely_ {
+
1925 m_state = to_read < length ? state_t::ok : state_t::fail;
+
1926 return length - to_read;
+
1927 }
+
1928 if (m_cache.region.end <= m_offset) _Unlikely_ {
+
1929 m_state = to_read < length ? state_t::ok : state_t::eof;
1930 return length - to_read;
1931 }
-
1932 if (m_cache.region.end <= m_offset) _Unlikely_ {
-
1933 m_state = to_read < length ? state_t::ok : state_t::eof;
-
1934 return length - to_read;
-
1935 }
-
1936 }
-
1937 }
+
1932 }
+
1933 }
-
1938
-
-
1939 virtual _Success_(return != 0) size_t write(
-
1940 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
1941 {
-
1942 stdex_assert(data || !length);
-
1943#if SET_FILE_OP_TIMES
-
1944 m_atime = m_mtime = time_point::now();
-
1945#endif
-
1946 for (size_t to_write = length;;) {
-
1947 if (m_cache.status != cache_t::cache_t::status_t::empty) {
-
1948 fpos_t end_max = m_cache.region.start + m_cache.capacity;
-
1949 if (m_cache.region.start <= m_offset && m_offset < end_max) {
-
1950 size_t remaining_cache = static_cast<size_t>(end_max - m_offset);
-
1951 if (to_write <= remaining_cache) {
-
1952 memcpy(m_cache.data + static_cast<size_t>(m_offset - m_cache.region.start), data, to_write);
-
1953 m_offset += to_write;
-
1954 m_cache.status = cache_t::cache_t::status_t::dirty;
-
1955 m_cache.region.end = std::max(m_cache.region.end, m_offset);
-
1956 m_state = state_t::ok;
-
1957 return length;
-
1958 }
-
1959 memcpy(m_cache.data + static_cast<size_t>(m_offset - m_cache.region.start), data, remaining_cache);
-
1960 reinterpret_cast<const uint8_t*&>(data) += remaining_cache;
-
1961 to_write -= remaining_cache;
-
1962 m_offset += remaining_cache;
-
1963 m_cache.status = cache_t::cache_t::status_t::dirty;
-
1964 m_cache.region.end = end_max;
-
1965 }
-
1966 flush_cache();
-
1967 if (!ok()) _Unlikely_
-
1968 return length - to_write;
-
1969 }
-
1970 {
-
1971 fpos_t end_max = m_offset + to_write;
-
1972 if (m_offset / m_cache.capacity < end_max / m_cache.capacity) {
-
1973 // Write spans multiple cache blocks. Bypass cache to the last block.
-
1974 m_source->seekbeg(m_offset);
-
1975 if (!ok()) _Unlikely_
-
1976 return length - to_write;
-
1977 size_t num_written = m_source->write(data, to_write - static_cast<size_t>(end_max % m_cache.capacity));
-
1978 m_offset += num_written;
-
1979 m_state = m_source->state();
-
1980 to_write -= num_written;
-
1981 if (!to_write || !ok())
-
1982 return length - to_write;
-
1983 reinterpret_cast<const uint8_t*&>(data) += num_written;
-
1984 }
-
1985 }
-
1986 load_cache(m_offset);
-
1987 if (!ok()) _Unlikely_
-
1988 return length - to_write;
-
1989 }
-
1990 }
+
1934
+
+
1935 virtual _Success_(return != 0) size_t write(
+
1936 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
1937 {
+
1938 stdex_assert(data || !length);
+
1939#if SET_FILE_OP_TIMES
+
1940 m_atime = m_mtime = time_point::now();
+
1941#endif
+
1942 for (size_t to_write = length;;) {
+
1943 if (m_cache.status != cache_t::cache_t::status_t::empty) {
+
1944 fpos_t end_max = m_cache.region.start + m_cache.capacity;
+
1945 if (m_cache.region.start <= m_offset && m_offset < end_max) {
+
1946 size_t remaining_cache = static_cast<size_t>(end_max - m_offset);
+
1947 if (to_write <= remaining_cache) {
+
1948 memcpy(m_cache.data + static_cast<size_t>(m_offset - m_cache.region.start), data, to_write);
+
1949 m_offset += to_write;
+
1950 m_cache.status = cache_t::cache_t::status_t::dirty;
+
1951 m_cache.region.end = std::max(m_cache.region.end, m_offset);
+
1952 m_state = state_t::ok;
+
1953 return length;
+
1954 }
+
1955 memcpy(m_cache.data + static_cast<size_t>(m_offset - m_cache.region.start), data, remaining_cache);
+
1956 reinterpret_cast<const uint8_t*&>(data) += remaining_cache;
+
1957 to_write -= remaining_cache;
+
1958 m_offset += remaining_cache;
+
1959 m_cache.status = cache_t::cache_t::status_t::dirty;
+
1960 m_cache.region.end = end_max;
+
1961 }
+
1962 flush_cache();
+
1963 if (!ok()) _Unlikely_
+
1964 return length - to_write;
+
1965 }
+
1966 {
+
1967 fpos_t end_max = m_offset + to_write;
+
1968 if (m_offset / m_cache.capacity < end_max / m_cache.capacity) {
+
1969 // Write spans multiple cache blocks. Bypass cache to the last block.
+
1970 m_source->seekbeg(m_offset);
+
1971 if (!ok()) _Unlikely_
+
1972 return length - to_write;
+
1973 size_t num_written = m_source->write(data, to_write - static_cast<size_t>(end_max % m_cache.capacity));
+
1974 m_offset += num_written;
+
1975 m_state = m_source->state();
+
1976 to_write -= num_written;
+
1977 if (!to_write || !ok())
+
1978 return length - to_write;
+
1979 reinterpret_cast<const uint8_t*&>(data) += num_written;
+
1980 }
+
1981 }
+
1982 load_cache(m_offset);
+
1983 if (!ok()) _Unlikely_
+
1984 return length - to_write;
+
1985 }
+
1986 }
-
1991
-
-
1992 virtual void close()
-
1993 {
-
1994 invalidate_cache();
-
1995 if (!ok()) _Unlikely_
-
1996 throw std::system_error(sys_error(), std::system_category(), "failed to flush cache"); // Data loss occurred
-
1997 m_source->close();
-
1998 m_state = m_source->state();
-
1999 }
+
1987
+
+
1988 virtual void close()
+
1989 {
+
1990 invalidate_cache();
+
1991 if (!ok()) _Unlikely_
+
1992 throw std::system_error(sys_error(), std::system_category(), "failed to flush cache"); // Data loss occurred
+
1993 m_source->close();
+
1994 m_state = m_source->state();
+
1995 }
-
2000
-
-
2001 virtual void flush()
-
2002 {
-
2003#if SET_FILE_OP_TIMES
-
2004 m_atime = m_mtime = time_point::min();
-
2005#endif
-
2006 flush_cache();
-
2007 if (!ok()) _Unlikely_
-
2008 return;
-
2009 m_source->flush();
-
2010 }
+
1996
+
+
1997 virtual void flush()
+
1998 {
+
1999#if SET_FILE_OP_TIMES
+
2000 m_atime = m_mtime = time_point::min();
+
2001#endif
+
2002 flush_cache();
+
2003 if (!ok()) _Unlikely_
+
2004 return;
+
2005 m_source->flush();
+
2006 }
-
2011
-
-
2012 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
-
2013 {
-
2014 m_state = state_t::ok;
-
2015 switch (how) {
-
2016 case seek_t::beg:
-
2017 break;
-
2018 case seek_t::cur:
-
2019 offset = static_cast<foff_t>(m_offset) + offset;
-
2020 break;
-
2021 case seek_t::end: {
-
2022 auto n = size();
-
2023 if (n == fsize_max) _Unlikely_{
-
2024 m_state = state_t::fail;
-
2025 return fpos_max;
-
2026 }
-
2027 offset = static_cast<foff_t>(n) + offset;
-
2028 break;
-
2029 }
-
2030 default:
-
2031 throw std::invalid_argument("unknown seek origin");
-
2032 }
-
2033 if (offset < 0) _Unlikely_
-
2034 throw std::invalid_argument("negative file offset");
-
2035 return m_offset = static_cast<fpos_t>(offset);
-
2036 }
+
2007
+
+
2008 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
+
2009 {
+
2010 m_state = state_t::ok;
+
2011 switch (how) {
+
2012 case seek_t::beg:
+
2013 break;
+
2014 case seek_t::cur:
+
2015 offset = static_cast<foff_t>(m_offset) + offset;
+
2016 break;
+
2017 case seek_t::end: {
+
2018 auto n = size();
+
2019 if (n == fsize_max) _Unlikely_{
+
2020 m_state = state_t::fail;
+
2021 return fpos_max;
+
2022 }
+
2023 offset = static_cast<foff_t>(n) + offset;
+
2024 break;
+
2025 }
+
2026 default:
+
2027 throw std::invalid_argument("unknown seek origin");
+
2028 }
+
2029 if (offset < 0) _Unlikely_
+
2030 throw std::invalid_argument("negative file offset");
+
2031 return m_offset = static_cast<fpos_t>(offset);
+
2032 }
-
2037
-
-
2038 virtual fpos_t tell() const
-
2039 {
-
2040 return m_offset;
-
2041 }
+
2033
+
+
2034 virtual fpos_t tell() const
+
2035 {
+
2036 return m_offset;
+
2037 }
-
2042
-
-
2043 virtual void lock(_In_ fpos_t offset, _In_ fsize_t length)
-
2044 {
-
2045 m_source->lock(offset, length);
-
2046 m_state = m_source->state();
-
2047 }
+
2038
+
+
2039 virtual void lock(_In_ fpos_t offset, _In_ fsize_t length)
+
2040 {
+
2041 m_source->lock(offset, length);
+
2042 m_state = m_source->state();
+
2043 }
-
2048
-
-
2049 virtual void unlock(_In_ fpos_t offset, _In_ fsize_t length)
-
2050 {
-
2051 m_source->unlock(offset, length);
-
2052 m_state = m_source->state();
-
2053 }
+
2044
+
+
2045 virtual void unlock(_In_ fpos_t offset, _In_ fsize_t length)
+
2046 {
+
2047 m_source->unlock(offset, length);
+
2048 m_state = m_source->state();
+
2049 }
-
2054
-
-
2055 virtual fsize_t size() const
-
2056 {
-
2057 return m_cache.status != cache_t::cache_t::status_t::empty ?
-
2058 std::max(m_source->size(), m_cache.region.end) :
-
2059 m_source->size();
-
2060 }
+
2050
+
+
2051 virtual fsize_t size() const
+
2052 {
+
2053 return m_cache.status != cache_t::cache_t::status_t::empty ?
+
2054 std::max(m_source->size(), m_cache.region.end) :
+
2055 m_source->size();
+
2056 }
-
2061
-
-
2062 virtual void truncate()
-
2063 {
-
2064#if SET_FILE_OP_TIMES
-
2065 m_atime = m_mtime = time_point::now();
-
2066#endif
-
2067 m_source->seekbeg(m_offset);
-
2068 if (m_cache.region.end <= m_offset) {
-
2069 // Truncation does not affect cache.
+
2057
+
+
2058 virtual void truncate()
+
2059 {
+
2060#if SET_FILE_OP_TIMES
+
2061 m_atime = m_mtime = time_point::now();
+
2062#endif
+
2063 m_source->seekbeg(m_offset);
+
2064 if (m_cache.region.end <= m_offset) {
+
2065 // Truncation does not affect cache.
+
2066 }
+
2067 else if (m_cache.region.start <= m_offset) {
+
2068 // Truncation truncates cache.
+
2069 m_cache.region.end = m_offset;
2070 }
-
2071 else if (m_cache.region.start <= m_offset) {
-
2072 // Truncation truncates cache.
-
2073 m_cache.region.end = m_offset;
+
2071 else {
+
2072 // Truncation invalidates cache.
+
2073 m_cache.status = cache_t::cache_t::status_t::empty;
2074 }
-
2075 else {
-
2076 // Truncation invalidates cache.
-
2077 m_cache.status = cache_t::cache_t::status_t::empty;
-
2078 }
-
2079 m_source->truncate();
-
2080 m_state = m_source->state();
-
2081 }
+
2075 m_source->truncate();
+
2076 m_state = m_source->state();
+
2077 }
-
2082
-
-
2083 virtual time_point ctime() const
-
2084 {
-
2085 return m_source->ctime();
-
2086 }
+
2078
+
+
2079 virtual time_point ctime() const
+
2080 {
+
2081 return m_source->ctime();
+
2082 }
-
2087
-
-
2088 virtual time_point atime() const
-
2089 {
-
2090#if SET_FILE_OP_TIMES
-
2091 return std::max(m_atime, m_source->atime());
-
2092#else
-
2093 return m_source->atime();
-
2094#endif
-
2095 }
+
2083
+
+
2084 virtual time_point atime() const
+
2085 {
+
2086#if SET_FILE_OP_TIMES
+
2087 return std::max(m_atime, m_source->atime());
+
2088#else
+
2089 return m_source->atime();
+
2090#endif
+
2091 }
-
2096
-
-
2097 virtual time_point mtime() const
-
2098 {
-
2099#if SET_FILE_OP_TIMES
-
2100 return std::max(m_mtime, m_source->mtime());
-
2101#else
-
2102 return m_source->mtime();
-
2103#endif
-
2104 }
+
2092
+
+
2093 virtual time_point mtime() const
+
2094 {
+
2095#if SET_FILE_OP_TIMES
+
2096 return std::max(m_mtime, m_source->mtime());
+
2097#else
+
2098 return m_source->mtime();
+
2099#endif
+
2100 }
-
2105
-
-
2106 virtual void set_ctime(time_point date)
-
2107 {
-
2108 m_source->set_ctime(date);
-
2109 }
+
2101
+
+
2102 virtual void set_ctime(time_point date)
+
2103 {
+
2104 m_source->set_ctime(date);
+
2105 }
-
2110
-
-
2111 virtual void set_atime(time_point date)
-
2112 {
-
2113#if SET_FILE_OP_TIMES
-
2114 m_atime = date;
-
2115#endif
-
2116 m_source->set_atime(date);
-
2117 }
+
2106
+
+
2107 virtual void set_atime(time_point date)
+
2108 {
+
2109#if SET_FILE_OP_TIMES
+
2110 m_atime = date;
+
2111#endif
+
2112 m_source->set_atime(date);
+
2113 }
-
2118
-
-
2119 virtual void set_mtime(time_point date)
-
2120 {
-
2121#if SET_FILE_OP_TIMES
-
2122 m_mtime = date;
-
2123#endif
-
2124 m_source->set_mtime(date);
-
2125 }
+
2114
+
+
2115 virtual void set_mtime(time_point date)
+
2116 {
+
2117#if SET_FILE_OP_TIMES
+
2118 m_mtime = date;
+
2119#endif
+
2120 m_source->set_mtime(date);
+
2121 }
-
2126
-
2127 protected:
-
2129 void flush_cache()
-
2130 {
-
2131 if (m_cache.status != cache_t::cache_t::status_t::dirty)
-
2132 m_state = state_t::ok;
-
2133 else if (!m_cache.region.empty()) {
-
2134 write_cache();
-
2135 if (ok())
-
2136 m_cache.status = cache_t::cache_t::status_t::loaded;
+
2122
+
2123 protected:
+
2125 void flush_cache()
+
2126 {
+
2127 if (m_cache.status != cache_t::cache_t::status_t::dirty)
+
2128 m_state = state_t::ok;
+
2129 else if (!m_cache.region.empty()) {
+
2130 write_cache();
+
2131 if (ok())
+
2132 m_cache.status = cache_t::cache_t::status_t::loaded;
+
2133 }
+
2134 else {
+
2135 m_state = state_t::ok;
+
2136 m_cache.status = cache_t::cache_t::status_t::loaded;
2137 }
-
2138 else {
-
2139 m_state = state_t::ok;
-
2140 m_cache.status = cache_t::cache_t::status_t::loaded;
-
2141 }
-
2142 }
-
2143
-
2144 void invalidate_cache()
-
2145 {
-
2146 if (m_cache.status == cache_t::cache_t::status_t::dirty && !m_cache.region.empty()) {
-
2147 write_cache();
-
2148 if (!ok()) _Unlikely_
-
2149 return;
-
2150 } else
-
2151 m_state = state_t::ok;
-
2152 m_cache.status = cache_t::cache_t::status_t::empty;
-
2153 }
-
2154
-
2155 void load_cache(_In_ fpos_t start)
-
2156 {
-
2157 stdex_assert(m_cache.status != cache_t::cache_t::status_t::dirty);
-
2158 start -= start % m_cache.capacity; // Align to cache block size.
-
2159 m_source->seekbeg(m_cache.region.start = start);
-
2160 if (m_source->ok()) {
-
2161 m_cache.region.end = start + m_source->read(m_cache.data, m_cache.capacity);
-
2162 m_cache.status = cache_t::cache_t::status_t::loaded;
-
2163 m_state = state_t::ok; // Regardless the read failure, we still might have cached some data.
-
2164 }
-
2165 else
-
2166 m_state = state_t::fail;
-
2167 }
-
2168
-
2169 void write_cache()
-
2170 {
-
2171 stdex_assert(m_cache.status == cache_t::cache_t::status_t::dirty);
-
2172 m_source->seekbeg(m_cache.region.start);
-
2173 m_source->write(m_cache.data, static_cast<size_t>(m_cache.region.size()));
-
2174 m_state = m_source->state();
-
2175 }
-
2176
-
2177 basic_file* m_source;
-
2178 struct cache_t {
-
2179 uint8_t* data;
-
2180 size_t capacity;
-
2181 enum class status_t {
-
2182 empty = 0,
-
2183 loaded,
-
2184 dirty,
-
2185 } status;
-
2186 interval<fpos_t> region;
-
2187
-
2188 cache_t(_In_ size_t _capacity) :
-
2189 data(new uint8_t[_capacity]),
-
2190 capacity(_capacity),
-
2191 status(status_t::empty),
-
2192 region(0)
-
2193 {}
-
2194
-
2195 ~cache_t()
-
2196 {
-
2197 delete[] data;
-
2198 }
-
2199 } m_cache;
-
2200 fpos_t m_offset;
-
2201#if SET_FILE_OP_TIMES
-
2202 time_point
-
2203 m_atime,
-
2204 m_mtime;
-
2205#endif
-
2207 };
+
2138 }
+
2139
+
2140 void invalidate_cache()
+
2141 {
+
2142 if (m_cache.status == cache_t::cache_t::status_t::dirty && !m_cache.region.empty()) {
+
2143 write_cache();
+
2144 if (!ok()) _Unlikely_
+
2145 return;
+
2146 } else
+
2147 m_state = state_t::ok;
+
2148 m_cache.status = cache_t::cache_t::status_t::empty;
+
2149 }
+
2150
+
2151 void load_cache(_In_ fpos_t start)
+
2152 {
+
2153 stdex_assert(m_cache.status != cache_t::cache_t::status_t::dirty);
+
2154 start -= start % m_cache.capacity; // Align to cache block size.
+
2155 m_source->seekbeg(m_cache.region.start = start);
+
2156 if (m_source->ok()) {
+
2157 m_cache.region.end = start + m_source->read(m_cache.data, m_cache.capacity);
+
2158 m_cache.status = cache_t::cache_t::status_t::loaded;
+
2159 m_state = state_t::ok; // Regardless the read failure, we still might have cached some data.
+
2160 }
+
2161 else
+
2162 m_state = state_t::fail;
+
2163 }
+
2164
+
2165 void write_cache()
+
2166 {
+
2167 stdex_assert(m_cache.status == cache_t::cache_t::status_t::dirty);
+
2168 m_source->seekbeg(m_cache.region.start);
+
2169 m_source->write(m_cache.data, static_cast<size_t>(m_cache.region.size()));
+
2170 m_state = m_source->state();
+
2171 }
+
2172
+
2173 basic_file* m_source;
+
2174 struct cache_t {
+
2175 uint8_t* data;
+
2176 size_t capacity;
+
2177 enum class status_t {
+
2178 empty = 0,
+
2179 loaded,
+
2180 dirty,
+
2181 } status;
+
2182 interval<fpos_t> region;
+
2183
+
2184 cache_t(_In_ size_t _capacity) :
+
2185 data(new uint8_t[_capacity]),
+
2186 capacity(_capacity),
+
2187 status(status_t::empty),
+
2188 region(0)
+
2189 {}
+
2190
+
2191 ~cache_t()
+
2192 {
+
2193 delete[] data;
+
2194 }
+
2195 } m_cache;
+
2196 fpos_t m_offset;
+
2197#if SET_FILE_OP_TIMES
+
2198 time_point
+
2199 m_atime,
+
2200 m_mtime;
+
2201#endif
+
2203 };
-
2208
-
-
2212 class basic_sys : virtual public basic, public sys_object
-
2213 {
-
2214 public:
-
2215 basic_sys(_In_opt_ sys_handle h = invalid_handle, _In_ state_t state = state_t::ok) :
-
2216 basic(state),
-
2217 sys_object(h)
-
2218 {}
-
2219
-
-
2220 virtual _Success_(return != 0 || length == 0) size_t read(
-
2221 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
2222 {
-
2223 stdex_assert(data || !length);
-
2224 // Windows Server 2003 and Windows XP: Pipe write operations across a network are limited in size per write.
-
2225 // The amount varies per platform. For x86 platforms it's 63.97 MB. For x64 platforms it's 31.97 MB. For Itanium
-
2226 // it's 63.95 MB. For more information regarding pipes, see the Remarks section.
-
2227 size_t
-
2228#if defined(_WIN64)
-
2229 block_size = 0x1F80000;
-
2230#elif defined(_WIN32)
-
2231 block_size = 0x3f00000;
-
2232#else
-
2233 block_size = SSIZE_MAX;
-
2234#endif
-
2235 for (size_t to_read = length;;) {
-
2236#ifdef _WIN32
-
2237 // ReadFile() might raise exception (e.g. STATUS_FILE_BAD_FORMAT/0xE0000002).
-
2238 BOOL succeeded;
-
2239 DWORD num_read;
-
2240 __try { succeeded = ReadFile(m_h, data, static_cast<DWORD>(std::min<size_t>(to_read, block_size)), &num_read, nullptr); }
-
2241 __except (EXCEPTION_EXECUTE_HANDLER) { succeeded = FALSE; SetLastError(ERROR_UNHANDLED_EXCEPTION); num_read = 0; }
-
2242 if (!succeeded && GetLastError() == ERROR_NO_SYSTEM_RESOURCES && block_size > default_block_size) _Unlikely_ {
-
2243 // Error "Insufficient system resources exist to complete the requested service." occurs
-
2244 // occasionally, when attempting to read too much data at once (e.g. over \\TSClient).
-
2245 block_size = default_block_size;
-
2246 continue;
-
2247 }
-
2248 if (!succeeded) _Unlikely_
-
2249#else
-
2250 auto num_read = ::read(m_h, data, std::min<size_t>(to_read, block_size));
-
2251 if (num_read < 0) _Unlikely_
-
2252#endif
-
2253 {
-
2254 m_state = to_read < length ? state_t::ok : state_t::fail;
+
2204
+
+
2208 class basic_sys : virtual public basic, public sys_object
+
2209 {
+
2210 public:
+
2211 basic_sys(_In_opt_ sys_handle h = invalid_handle, _In_ state_t state = state_t::ok) :
+
2212 basic(state),
+
2213 sys_object(h)
+
2214 {}
+
2215
+
+
2216 virtual _Success_(return != 0 || length == 0) size_t read(
+
2217 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
2218 {
+
2219 stdex_assert(data || !length);
+
2220 // Windows Server 2003 and Windows XP: Pipe write operations across a network are limited in size per write.
+
2221 // The amount varies per platform. For x86 platforms it's 63.97 MB. For x64 platforms it's 31.97 MB. For Itanium
+
2222 // it's 63.95 MB. For more information regarding pipes, see the Remarks section.
+
2223 size_t
+
2224#if defined(_WIN64)
+
2225 block_size = 0x1F80000;
+
2226#elif defined(_WIN32)
+
2227 block_size = 0x3f00000;
+
2228#else
+
2229 block_size = SSIZE_MAX;
+
2230#endif
+
2231 for (size_t to_read = length;;) {
+
2232#ifdef _WIN32
+
2233 // ReadFile() might raise exception (e.g. STATUS_FILE_BAD_FORMAT/0xE0000002).
+
2234 BOOL succeeded;
+
2235 DWORD num_read;
+
2236 __try { succeeded = ReadFile(m_h, data, static_cast<DWORD>(std::min<size_t>(to_read, block_size)), &num_read, nullptr); }
+
2237 __except (EXCEPTION_EXECUTE_HANDLER) { succeeded = FALSE; SetLastError(ERROR_UNHANDLED_EXCEPTION); num_read = 0; }
+
2238 if (!succeeded && GetLastError() == ERROR_NO_SYSTEM_RESOURCES && block_size > default_block_size) _Unlikely_ {
+
2239 // Error "Insufficient system resources exist to complete the requested service." occurs
+
2240 // occasionally, when attempting to read too much data at once (e.g. over \\TSClient).
+
2241 block_size = default_block_size;
+
2242 continue;
+
2243 }
+
2244 if (!succeeded) _Unlikely_
+
2245#else
+
2246 auto num_read = ::read(m_h, data, std::min<size_t>(to_read, block_size));
+
2247 if (num_read < 0) _Unlikely_
+
2248#endif
+
2249 {
+
2250 m_state = to_read < length ? state_t::ok : state_t::fail;
+
2251 return length - to_read;
+
2252 }
+
2253 if (!num_read) _Unlikely_ {
+
2254 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
2255 return length - to_read;
2256 }
-
2257 if (!num_read) _Unlikely_ {
-
2258 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
-
2259 return length - to_read;
-
2260 }
-
2261 to_read -= static_cast<size_t>(num_read);
-
2262 if (!to_read) {
-
2263 m_state = state_t::ok;
-
2264 return length;
-
2265 }
-
2266 reinterpret_cast<uint8_t*&>(data) += num_read;
-
2267 }
-
2268 }
+
2257 to_read -= static_cast<size_t>(num_read);
+
2258 if (!to_read) {
+
2259 m_state = state_t::ok;
+
2260 return length;
+
2261 }
+
2262 reinterpret_cast<uint8_t*&>(data) += num_read;
+
2263 }
+
2264 }
-
2269
-
-
2270 virtual _Success_(return != 0) size_t write(
-
2271 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
2272 {
-
2273 // Windows Server 2003 and Windows XP: Pipe write operations across a network are limited in size per write.
-
2274 // The amount varies per platform. For x86 platforms it's 63.97 MB. For x64 platforms it's 31.97 MB. For Itanium
-
2275 // it's 63.95 MB. For more information regarding pipes, see the Remarks section.
-
2276 constexpr size_t
-
2277#if defined(_WIN64)
-
2278 block_size = 0x1F80000;
-
2279#elif defined(_WIN32)
-
2280 block_size = 0x3f00000;
-
2281#else
-
2282 block_size = SSIZE_MAX;
-
2283#endif
-
2284 for (size_t to_write = length;;) {
-
2285#ifdef _WIN32
-
2286 // ReadFile() might raise an exception. Be cautious with WriteFile() too.
-
2287 BOOL succeeded;
-
2288 DWORD num_written;
-
2289 __try { succeeded = WriteFile(m_h, data, static_cast<DWORD>(std::min<size_t>(to_write, block_size)), &num_written, nullptr); }
-
2290 __except (EXCEPTION_EXECUTE_HANDLER) { succeeded = FALSE; SetLastError(ERROR_UNHANDLED_EXCEPTION); num_written = 0; }
-
2291 to_write -= num_written;
-
2292 if (!to_write) {
-
2293 m_state = state_t::ok;
-
2294 return length;
-
2295 }
-
2296 reinterpret_cast<const uint8_t*&>(data) += num_written;
-
2297 if (!succeeded) _Unlikely_ {
-
2298 m_state = state_t::fail;
-
2299 return length - to_write;
-
2300 }
-
2301#else
-
2302 auto num_written = ::write(m_h, data, std::min<size_t>(to_write, block_size));
-
2303 if (num_written < 0) _Unlikely_ {
-
2304 m_state = state_t::fail;
-
2305 return length - to_write;
-
2306 }
-
2307 to_write -= static_cast<size_t>(num_written);
-
2308 if (!to_write) {
-
2309 m_state = state_t::ok;
-
2310 return length;
-
2311 }
-
2312 reinterpret_cast<const uint8_t*&>(data) += num_written;
-
2313#endif
-
2314 }
-
2315 }
+
2265
+
+
2266 virtual _Success_(return != 0) size_t write(
+
2267 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
2268 {
+
2269 // Windows Server 2003 and Windows XP: Pipe write operations across a network are limited in size per write.
+
2270 // The amount varies per platform. For x86 platforms it's 63.97 MB. For x64 platforms it's 31.97 MB. For Itanium
+
2271 // it's 63.95 MB. For more information regarding pipes, see the Remarks section.
+
2272 constexpr size_t
+
2273#if defined(_WIN64)
+
2274 block_size = 0x1F80000;
+
2275#elif defined(_WIN32)
+
2276 block_size = 0x3f00000;
+
2277#else
+
2278 block_size = SSIZE_MAX;
+
2279#endif
+
2280 for (size_t to_write = length;;) {
+
2281#ifdef _WIN32
+
2282 // ReadFile() might raise an exception. Be cautious with WriteFile() too.
+
2283 BOOL succeeded;
+
2284 DWORD num_written;
+
2285 __try { succeeded = WriteFile(m_h, data, static_cast<DWORD>(std::min<size_t>(to_write, block_size)), &num_written, nullptr); }
+
2286 __except (EXCEPTION_EXECUTE_HANDLER) { succeeded = FALSE; SetLastError(ERROR_UNHANDLED_EXCEPTION); num_written = 0; }
+
2287 to_write -= num_written;
+
2288 if (!to_write) {
+
2289 m_state = state_t::ok;
+
2290 return length;
+
2291 }
+
2292 reinterpret_cast<const uint8_t*&>(data) += num_written;
+
2293 if (!succeeded) _Unlikely_ {
+
2294 m_state = state_t::fail;
+
2295 return length - to_write;
+
2296 }
+
2297#else
+
2298 auto num_written = ::write(m_h, data, std::min<size_t>(to_write, block_size));
+
2299 if (num_written < 0) _Unlikely_ {
+
2300 m_state = state_t::fail;
+
2301 return length - to_write;
+
2302 }
+
2303 to_write -= static_cast<size_t>(num_written);
+
2304 if (!to_write) {
+
2305 m_state = state_t::ok;
+
2306 return length;
+
2307 }
+
2308 reinterpret_cast<const uint8_t*&>(data) += num_written;
+
2309#endif
+
2310 }
+
2311 }
-
2316
-
-
2317 virtual void close()
-
2318 {
-
2319 try {
-
2320 sys_object::close();
-
2321 m_state = state_t::ok;
-
2322 }
-
2323 catch (...) {
-
2324 m_state = state_t::fail;
-
2325 }
-
2326 }
+
2312
+
+
2313 virtual void close()
+
2314 {
+
2315 try {
+
2316 sys_object::close();
+
2317 m_state = state_t::ok;
+
2318 }
+
2319 catch (...) {
+
2320 m_state = state_t::fail;
+
2321 }
+
2322 }
-
2327
-
-
2328 virtual void flush()
-
2329 {
-
2330#ifdef _WIN32
-
2331 m_state = FlushFileBuffers(m_h) ? state_t::ok : state_t::fail;
-
2332#else
-
2333 m_state = fsync(m_h) >= 0 ? state_t::ok : state_t::fail;
-
2334#endif
-
2335 }
+
2323
+
+
2324 virtual void flush()
+
2325 {
+
2326#ifdef _WIN32
+
2327 m_state = FlushFileBuffers(m_h) ? state_t::ok : state_t::fail;
+
2328#else
+
2329 m_state = fsync(m_h) >= 0 ? state_t::ok : state_t::fail;
+
2330#endif
+
2331 }
-
2336 };
+
2332 };
+
+
2333
+
+
2337 class buffered_sys : public buffer
+
2338 {
+
2339 public:
+
2340 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) :
+
2341 buffer(read_buffer_size, write_buffer_size),
+
2342 m_source(h)
+
2343 {
+
2344 init(m_source);
+
2345 }
+
2346
+
2347 virtual ~buffered_sys()
+
2348 {
+
2349 done();
+
2350 }
+
2351
+
2352 protected:
+
2353 basic_sys m_source;
+
2354 };
-
2337
-
-
2341 class buffered_sys : public buffer
-
2342 {
-
2343 public:
-
2344 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) :
-
2345 buffer(read_buffer_size, write_buffer_size),
-
2346 m_source(h)
-
2347 {
-
2348 init(m_source);
-
2349 }
-
2350
-
2351 virtual ~buffered_sys()
-
2352 {
-
2353 done();
-
2354 }
2355
-
2356 protected:
-
2357 basic_sys m_source;
-
2358 };
-
-
2359
-
-
2363 class socket : public basic
-
2364 {
-
2365 public:
-
2366 socket(_In_opt_ socket_t h = stdex::invalid_socket, _In_ state_t state = state_t::ok) :
-
2367 basic(state),
-
2368 m_h(h)
-
2369 {}
+
+
2359 class socket : public basic
+
2360 {
+
2361 public:
+
2362 socket(_In_opt_ socket_t h = stdex::invalid_socket, _In_ state_t state = state_t::ok) :
+
2363 basic(state),
+
2364 m_h(h)
+
2365 {}
+
2366
+
2367 private:
+
2368 socket(_In_ const socket& other);
+
2369 socket& operator =(_In_ const socket& other);
2370
-
2371 private:
-
2372 socket(_In_ const socket& other);
-
2373 socket& operator =(_In_ const socket& other);
-
2374
-
2375 public:
-
2376 socket(_Inout_ socket&& other) noexcept : m_h(other.m_h)
-
2377 {
-
2378 other.m_h = stdex::invalid_socket;
-
2379 }
-
2380
-
2381 socket& operator =(_Inout_ socket&& other) noexcept
-
2382 {
-
2383 if (this != std::addressof(other)) {
-
2384 if (m_h != stdex::invalid_socket)
-
2385 closesocket(m_h);
-
2386 m_h = other.m_h;
-
2387 other.m_h = stdex::invalid_socket;
-
2388 }
-
2389 return *this;
-
2390 }
-
2391
-
-
2399 socket(_In_ int af, _In_ int type, _In_ int protocol)
-
2400 {
-
2401 m_h = ::socket(af, type, protocol);
-
2402 if (m_h == stdex::invalid_socket) _Unlikely_
-
2403 m_state = state_t::fail;
-
2404 }
+
2371 public:
+
2372 socket(_Inout_ socket&& other) noexcept : m_h(other.m_h)
+
2373 {
+
2374 other.m_h = stdex::invalid_socket;
+
2375 }
+
2376
+
2377 socket& operator =(_Inout_ socket&& other) noexcept
+
2378 {
+
2379 if (this != std::addressof(other)) {
+
2380 if (m_h != stdex::invalid_socket)
+
2381 closesocket(m_h);
+
2382 m_h = other.m_h;
+
2383 other.m_h = stdex::invalid_socket;
+
2384 }
+
2385 return *this;
+
2386 }
+
2387
+
+
2395 socket(_In_ int af, _In_ int type, _In_ int protocol)
+
2396 {
+
2397 m_h = ::socket(af, type, protocol);
+
2398 if (m_h == stdex::invalid_socket) _Unlikely_
+
2399 m_state = state_t::fail;
+
2400 }
-
2405
-
2406 virtual ~socket()
-
2407 {
-
2408 if (m_h != stdex::invalid_socket)
-
2409 closesocket(m_h);
-
2410 }
-
2411
-
2415 operator bool() const noexcept { return m_h != stdex::invalid_socket; }
-
2416
-
2420 socket_t get() const noexcept { return m_h; }
-
2421
-
-
2422 virtual _Success_(return != 0 || length == 0) size_t read(
-
2423 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
2424 {
-
2425 stdex_assert(data || !length);
-
2426 constexpr int block_size = 0x10000000;
-
2427 for (size_t to_read = length;;) {
-
2428 auto num_read = recv(m_h, reinterpret_cast<char*>(data),
-
2429#ifdef _WIN32
-
2430 static_cast<int>(std::min<size_t>(to_read, block_size)),
-
2431#else
-
2432 std::min<size_t>(to_read, block_size),
-
2433#endif
-
2434 0);
-
2435 if (num_read < 0) _Unlikely_ {
-
2436 m_state = to_read < length ? state_t::ok : state_t::fail;
+
2401
+
2402 virtual ~socket()
+
2403 {
+
2404 if (m_h != stdex::invalid_socket)
+
2405 closesocket(m_h);
+
2406 }
+
2407
+
2411 operator bool() const noexcept { return m_h != stdex::invalid_socket; }
+
2412
+
2416 socket_t get() const noexcept { return m_h; }
+
2417
+
+
2418 virtual _Success_(return != 0 || length == 0) size_t read(
+
2419 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
2420 {
+
2421 stdex_assert(data || !length);
+
2422 constexpr int block_size = 0x10000000;
+
2423 for (size_t to_read = length;;) {
+
2424 auto num_read = recv(m_h, reinterpret_cast<char*>(data),
+
2425#ifdef _WIN32
+
2426 static_cast<int>(std::min<size_t>(to_read, block_size)),
+
2427#else
+
2428 std::min<size_t>(to_read, block_size),
+
2429#endif
+
2430 0);
+
2431 if (num_read < 0) _Unlikely_ {
+
2432 m_state = to_read < length ? state_t::ok : state_t::fail;
+
2433 return length - to_read;
+
2434 }
+
2435 if (!num_read) {
+
2436 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
2437 return length - to_read;
2438 }
-
2439 if (!num_read) {
-
2440 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
-
2441 return length - to_read;
-
2442 }
-
2443 to_read -= static_cast<size_t>(num_read);
-
2444 if (!to_read) {
-
2445 m_state = state_t::ok;
-
2446 return length;
-
2447 }
-
2448 reinterpret_cast<uint8_t*&>(data) += num_read;
-
2449 }
-
2450 }
+
2439 to_read -= static_cast<size_t>(num_read);
+
2440 if (!to_read) {
+
2441 m_state = state_t::ok;
+
2442 return length;
+
2443 }
+
2444 reinterpret_cast<uint8_t*&>(data) += num_read;
+
2445 }
+
2446 }
-
2451
-
-
2452 virtual _Success_(return != 0) size_t write(
-
2453 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
2454 {
-
2455 stdex_assert(data || !length);
-
2456 constexpr int block_size = 0x10000000;
-
2457 for (size_t to_write = length;;) {
-
2458 auto num_written = send(m_h, reinterpret_cast<const char*>(data),
-
2459#ifdef _WIN32
-
2460 static_cast<int>(std::min<size_t>(to_write, block_size)),
-
2461#else
-
2462 std::min<size_t>(to_write, block_size),
-
2463#endif
-
2464 0);
-
2465 if (num_written < 0) _Unlikely_ {
-
2466 m_state = state_t::fail;
-
2467 return length - to_write;
-
2468 }
-
2469 to_write -= static_cast<size_t>(num_written);
-
2470 if (!to_write) {
-
2471 m_state = state_t::ok;
-
2472 return length;
-
2473 }
-
2474 reinterpret_cast<const uint8_t*&>(data) += num_written;
-
2475 }
-
2476 }
+
2447
+
+
2448 virtual _Success_(return != 0) size_t write(
+
2449 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
2450 {
+
2451 stdex_assert(data || !length);
+
2452 constexpr int block_size = 0x10000000;
+
2453 for (size_t to_write = length;;) {
+
2454 auto num_written = send(m_h, reinterpret_cast<const char*>(data),
+
2455#ifdef _WIN32
+
2456 static_cast<int>(std::min<size_t>(to_write, block_size)),
+
2457#else
+
2458 std::min<size_t>(to_write, block_size),
+
2459#endif
+
2460 0);
+
2461 if (num_written < 0) _Unlikely_ {
+
2462 m_state = state_t::fail;
+
2463 return length - to_write;
+
2464 }
+
2465 to_write -= static_cast<size_t>(num_written);
+
2466 if (!to_write) {
+
2467 m_state = state_t::ok;
+
2468 return length;
+
2469 }
+
2470 reinterpret_cast<const uint8_t*&>(data) += num_written;
+
2471 }
+
2472 }
-
2477
-
-
2478 virtual void close()
-
2479 {
-
2480 if (m_h != stdex::invalid_socket) {
-
2481 closesocket(m_h);
-
2482 m_h = stdex::invalid_socket;
-
2483 }
-
2484 m_state = state_t::ok;
-
2485 }
+
2473
+
+
2474 virtual void close()
+
2475 {
+
2476 if (m_h != stdex::invalid_socket) {
+
2477 closesocket(m_h);
+
2478 m_h = stdex::invalid_socket;
+
2479 }
+
2480 m_state = state_t::ok;
+
2481 }
+
+
2482
+
2483 protected:
+
2484 socket_t m_h;
+
2485 };
2486
-
2487 protected:
-
2488 socket_t m_h;
-
2489 };
-
-
2490
-
2491#ifdef _WIN32
-
2495 class sequential_stream : public basic
-
2496 {
-
2497 public:
-
2498 sequential_stream(_In_ ISequentialStream* source) : m_source(source)
-
2499 {
-
2500 m_source->AddRef();
-
2501 }
-
2502
-
2503 virtual ~sequential_stream()
-
2504 {
-
2505 m_source->Release();
-
2506 }
-
2507
-
2508 virtual _Success_(return != 0 || length == 0) size_t read(
-
2509 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
2510 {
-
2511 stdex_assert(data || !length);
-
2512 for (size_t to_read = length;;) {
-
2513 HRESULT hr;
-
2514 ULONG num_read = 0;
-
2515 __try { hr = m_source->Read(data, (ULONG)std::min<size_t>(to_read, ULONG_MAX), &num_read); }
-
2516 __except (EXCEPTION_EXECUTE_HANDLER) { hr = E_FAIL; }
-
2517 if (FAILED(hr)) _Unlikely_ {
-
2518 m_state = to_read < length ? state_t::ok : state_t::fail;
-
2519 return length - to_read;
-
2520 }
-
2521 to_read -= num_read;
-
2522 if (hr == S_FALSE) _Unlikely_ {
-
2523 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
-
2524 return length - to_read;
+
2487#ifdef _WIN32
+
2491 class sequential_stream : public basic
+
2492 {
+
2493 public:
+
2494 sequential_stream(_In_ ISequentialStream* source) : m_source(source)
+
2495 {
+
2496 m_source->AddRef();
+
2497 }
+
2498
+
2499 virtual ~sequential_stream()
+
2500 {
+
2501 m_source->Release();
+
2502 }
+
2503
+
2504 virtual _Success_(return != 0 || length == 0) size_t read(
+
2505 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
2506 {
+
2507 stdex_assert(data || !length);
+
2508 for (size_t to_read = length;;) {
+
2509 HRESULT hr;
+
2510 ULONG num_read = 0;
+
2511 __try { hr = m_source->Read(data, (ULONG)std::min<size_t>(to_read, ULONG_MAX), &num_read); }
+
2512 __except (EXCEPTION_EXECUTE_HANDLER) { hr = E_FAIL; }
+
2513 if (FAILED(hr)) _Unlikely_ {
+
2514 m_state = to_read < length ? state_t::ok : state_t::fail;
+
2515 return length - to_read;
+
2516 }
+
2517 to_read -= num_read;
+
2518 if (hr == S_FALSE) _Unlikely_ {
+
2519 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
+
2520 return length - to_read;
+
2521 }
+
2522 if (!to_read) {
+
2523 m_state = state_t::ok;
+
2524 return length;
2525 }
-
2526 if (!to_read) {
-
2527 m_state = state_t::ok;
-
2528 return length;
-
2529 }
-
2530 reinterpret_cast<uint8_t*&>(data) += num_read;
-
2531 }
-
2532 }
-
2533
-
2534 virtual _Success_(return != 0) size_t write(
-
2535 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
2536 {
-
2537 stdex_assert(data || !length);
-
2538 for (size_t to_write = length;;) {
-
2539 HRESULT hr;
-
2540 ULONG num_written = 0;
-
2541 __try { hr = m_source->Write(data, static_cast<ULONG>(std::min<size_t>(to_write, ULONG_MAX)), &num_written); }
-
2542 __except (EXCEPTION_EXECUTE_HANDLER) { hr = E_FAIL; }
-
2543 // In absence of documentation whether num_written gets set when FAILED(hr) (i.e. partially successful writes),
-
2544 // assume write failed completely.
-
2545 if (FAILED(hr)) _Unlikely_ {
-
2546 m_state = state_t::fail;
-
2547 return length - to_write;
-
2548 }
-
2549 to_write -= num_written;
-
2550 if (!to_write) {
-
2551 m_state = state_t::ok;
-
2552 return length;
-
2553 }
-
2554 reinterpret_cast<const uint8_t*&>(data) += num_written;
-
2555 }
-
2556 }
+
2526 reinterpret_cast<uint8_t*&>(data) += num_read;
+
2527 }
+
2528 }
+
2529
+
2530 virtual _Success_(return != 0) size_t write(
+
2531 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
2532 {
+
2533 stdex_assert(data || !length);
+
2534 for (size_t to_write = length;;) {
+
2535 HRESULT hr;
+
2536 ULONG num_written = 0;
+
2537 __try { hr = m_source->Write(data, static_cast<ULONG>(std::min<size_t>(to_write, ULONG_MAX)), &num_written); }
+
2538 __except (EXCEPTION_EXECUTE_HANDLER) { hr = E_FAIL; }
+
2539 // In absence of documentation whether num_written gets set when FAILED(hr) (i.e. partially successful writes),
+
2540 // assume write failed completely.
+
2541 if (FAILED(hr)) _Unlikely_ {
+
2542 m_state = state_t::fail;
+
2543 return length - to_write;
+
2544 }
+
2545 to_write -= num_written;
+
2546 if (!to_write) {
+
2547 m_state = state_t::ok;
+
2548 return length;
+
2549 }
+
2550 reinterpret_cast<const uint8_t*&>(data) += num_written;
+
2551 }
+
2552 }
+
2553
+
2554 protected:
+
2555 ISequentialStream* m_source;
+
2556 };
2557
-
2558 protected:
-
2559 ISequentialStream* m_source;
-
2560 };
-
2561
-
2565 class asp : public basic
-
2566 {
-
2567 public:
-
2568 asp(_In_opt_ IRequest* request, _In_opt_ IResponse* response) :
-
2569 m_request(request),
-
2570 m_response(response)
-
2571 {
-
2572 if (m_request)
-
2573 m_request->AddRef();
-
2574 if (m_response)
-
2575 m_response->AddRef();
-
2576 }
-
2577
-
2578 virtual ~asp()
-
2579 {
-
2580 if (m_request)
-
2581 m_request->Release();
-
2582 if (m_response)
-
2583 m_response->Release();
-
2584 }
-
2585
-
2586 virtual _Success_(return != 0 || length == 0) size_t read(
-
2587 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
2588 {
-
2589 stdex_assert(data || !length);
-
2590 if (!m_request) _Unlikely_ {
-
2591 m_state = state_t::fail;
-
2592 return 0;
-
2593 }
-
2594 for (size_t to_read = length;;) {
-
2595 VARIANT var_amount, var_data;
-
2596 V_VT(&var_amount) = VT_I4;
-
2597 V_I4(&var_amount) = (LONG)std::min<size_t>(to_read, LONG_MAX);
-
2598 V_VT(&var_data) = VT_EMPTY;
-
2599 HRESULT hr = [&]() {
-
2600 __try { return m_request->BinaryRead(&var_amount, &var_data); }
-
2601 __except (EXCEPTION_EXECUTE_HANDLER) { return E_FAIL; }
-
2602 }();
-
2603 if (FAILED(hr)) _Unlikely_ {
-
2604 m_state = to_read < length ? state_t::ok : state_t::fail;
-
2605 return length - to_read;
-
2606 }
-
2607 stdex_assert(V_VT(&var_amount) == VT_I4);
-
2608 stdex_assert(V_VT(&var_data) == (VT_ARRAY | VT_UI1));
-
2609 std::unique_ptr<SAFEARRAY, SafeArrayDestroy_delete> sa(V_ARRAY(&var_data));
-
2610 if (!V_I4(&var_amount)) _Unlikely_ {
-
2611 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
-
2612 return length - to_read;
-
2613 }
-
2614 safearray_accessor<uint8_t> a(sa.get());
-
2615 memcpy(data, a.data(), V_I4(&var_amount));
-
2616 to_read -= V_I4(&var_amount);
-
2617 if (!to_read) {
-
2618 m_state = state_t::ok;
-
2619 return length;
-
2620 }
-
2621 reinterpret_cast<uint8_t*&>(data) += V_I4(&var_amount);
-
2622 }
-
2623 }
-
2624
-
2625 virtual _Success_(return != 0) size_t write(
-
2626 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
2627 {
-
2628 if (!m_response) {
-
2629 m_state = state_t::fail;
-
2630 return 0;
-
2631 }
-
2632 for (size_t to_write = length;;) {
-
2633 UINT num_written = static_cast<UINT>(std::min<size_t>(to_write, UINT_MAX));
-
2634 std::unique_ptr<OLECHAR, SysFreeString_delete> bstr_data(SysAllocStringByteLen(reinterpret_cast<LPCSTR>(data), num_written));
-
2635 VARIANT var_data;
-
2636 V_VT(&var_data) = VT_BSTR;
-
2637 V_BSTR(&var_data) = bstr_data.get();
-
2638 HRESULT hr = [&]() {
-
2639 __try { return m_response->BinaryWrite(var_data); }
-
2640 __except (EXCEPTION_EXECUTE_HANDLER) { return E_FAIL; }
-
2641 }();
-
2642 if (FAILED(hr)) _Unlikely_ {
-
2643 m_state = state_t::fail;
-
2644 return length - to_write;
-
2645 }
-
2646 to_write -= num_written;
-
2647 if (!to_write) {
-
2648 m_state = state_t::ok;
-
2649 return length;
-
2650 }
-
2651 reinterpret_cast<const uint8_t*&>(data) += num_written;
-
2652 }
-
2653 }
-
2654
-
2655 virtual void close()
-
2656 {
-
2657 if (m_response) {
-
2658 __try { m_response->End(); }
-
2659 __except (EXCEPTION_EXECUTE_HANDLER) {}
-
2660 }
-
2661 m_state = state_t::ok;
-
2662 }
-
2663
-
2664 virtual void flush()
-
2665 {
-
2666 if (m_response) {
-
2667 HRESULT hr;
-
2668 __try { hr = m_response->Flush(); }
-
2669 __except (EXCEPTION_EXECUTE_HANDLER) { hr = E_FAIL; }
-
2670 m_state = SUCCEEDED(hr) ? state_t::ok : state_t::fail;
-
2671 }
-
2672 }
-
2673
-
2674 protected:
-
2675 IRequest* m_request;
-
2676 IResponse* m_response;
-
2677 };
-
2678#endif
-
2679
-
2683 enum mode_t
-
2684 {
-
2685 mode_for_reading = 1 << 0,
-
2686 mode_for_writing = 1 << 1,
-
2687 mode_for_chmod = 1 << 2,
-
2688
-
2689 mode_open_existing = 0 << 3,
-
2690 mode_truncate_existing = 1 << 3,
-
2691 mode_preserve_existing = 2 << 3,
-
2692 mode_create_new = 3 << 3,
-
2693 mode_create = 4 << 3,
-
2694 mode_disposition_mask = 7 << 3,
+
2561 class asp : public basic
+
2562 {
+
2563 public:
+
2564 asp(_In_opt_ IRequest* request, _In_opt_ IResponse* response) :
+
2565 m_request(request),
+
2566 m_response(response)
+
2567 {
+
2568 if (m_request)
+
2569 m_request->AddRef();
+
2570 if (m_response)
+
2571 m_response->AddRef();
+
2572 }
+
2573
+
2574 virtual ~asp()
+
2575 {
+
2576 if (m_request)
+
2577 m_request->Release();
+
2578 if (m_response)
+
2579 m_response->Release();
+
2580 }
+
2581
+
2582 virtual _Success_(return != 0 || length == 0) size_t read(
+
2583 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
2584 {
+
2585 stdex_assert(data || !length);
+
2586 if (!m_request) _Unlikely_ {
+
2587 m_state = state_t::fail;
+
2588 return 0;
+
2589 }
+
2590 for (size_t to_read = length;;) {
+
2591 VARIANT var_amount, var_data;
+
2592 V_VT(&var_amount) = VT_I4;
+
2593 V_I4(&var_amount) = (LONG)std::min<size_t>(to_read, LONG_MAX);
+
2594 V_VT(&var_data) = VT_EMPTY;
+
2595 HRESULT hr = [&]() {
+
2596 __try { return m_request->BinaryRead(&var_amount, &var_data); }
+
2597 __except (EXCEPTION_EXECUTE_HANDLER) { return E_FAIL; }
+
2598 }();
+
2599 if (FAILED(hr)) _Unlikely_ {
+
2600 m_state = to_read < length ? state_t::ok : state_t::fail;
+
2601 return length - to_read;
+
2602 }
+
2603 stdex_assert(V_VT(&var_amount) == VT_I4);
+
2604 stdex_assert(V_VT(&var_data) == (VT_ARRAY | VT_UI1));
+
2605 std::unique_ptr<SAFEARRAY, SafeArrayDestroy_delete> sa(V_ARRAY(&var_data));
+
2606 if (!V_I4(&var_amount)) _Unlikely_ {
+
2607 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
+
2608 return length - to_read;
+
2609 }
+
2610 safearray_accessor<uint8_t> a(sa.get());
+
2611 memcpy(data, a.data(), V_I4(&var_amount));
+
2612 to_read -= V_I4(&var_amount);
+
2613 if (!to_read) {
+
2614 m_state = state_t::ok;
+
2615 return length;
+
2616 }
+
2617 reinterpret_cast<uint8_t*&>(data) += V_I4(&var_amount);
+
2618 }
+
2619 }
+
2620
+
2621 virtual _Success_(return != 0) size_t write(
+
2622 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
2623 {
+
2624 if (!m_response) {
+
2625 m_state = state_t::fail;
+
2626 return 0;
+
2627 }
+
2628 for (size_t to_write = length;;) {
+
2629 UINT num_written = static_cast<UINT>(std::min<size_t>(to_write, UINT_MAX));
+
2630 std::unique_ptr<OLECHAR, SysFreeString_delete> bstr_data(SysAllocStringByteLen(reinterpret_cast<LPCSTR>(data), num_written));
+
2631 VARIANT var_data;
+
2632 V_VT(&var_data) = VT_BSTR;
+
2633 V_BSTR(&var_data) = bstr_data.get();
+
2634 HRESULT hr = [&]() {
+
2635 __try { return m_response->BinaryWrite(var_data); }
+
2636 __except (EXCEPTION_EXECUTE_HANDLER) { return E_FAIL; }
+
2637 }();
+
2638 if (FAILED(hr)) _Unlikely_ {
+
2639 m_state = state_t::fail;
+
2640 return length - to_write;
+
2641 }
+
2642 to_write -= num_written;
+
2643 if (!to_write) {
+
2644 m_state = state_t::ok;
+
2645 return length;
+
2646 }
+
2647 reinterpret_cast<const uint8_t*&>(data) += num_written;
+
2648 }
+
2649 }
+
2650
+
2651 virtual void close()
+
2652 {
+
2653 if (m_response) {
+
2654 __try { m_response->End(); }
+
2655 __except (EXCEPTION_EXECUTE_HANDLER) {}
+
2656 }
+
2657 m_state = state_t::ok;
+
2658 }
+
2659
+
2660 virtual void flush()
+
2661 {
+
2662 if (m_response) {
+
2663 HRESULT hr;
+
2664 __try { hr = m_response->Flush(); }
+
2665 __except (EXCEPTION_EXECUTE_HANDLER) { hr = E_FAIL; }
+
2666 m_state = SUCCEEDED(hr) ? state_t::ok : state_t::fail;
+
2667 }
+
2668 }
+
2669
+
2670 protected:
+
2671 IRequest* m_request;
+
2672 IResponse* m_response;
+
2673 };
+
2674#endif
+
2675
+
2679 enum mode_t
+
2680 {
+
2681 mode_for_reading = 1 << 0,
+
2682 mode_for_writing = 1 << 1,
+
2683 mode_for_chmod = 1 << 2,
+
2684
+
2685 mode_open_existing = 0 << 3,
+
2686 mode_truncate_existing = 1 << 3,
+
2687 mode_preserve_existing = 2 << 3,
+
2688 mode_create_new = 3 << 3,
+
2689 mode_create = 4 << 3,
+
2690 mode_disposition_mask = 7 << 3,
+
2691
+
2692 mode_append = 1 << 6,
+
2693 mode_text = 0,
+
2694 mode_binary = 1 << 7,
2695
-
2696 mode_append = 1 << 6,
-
2697 mode_text = 0,
-
2698 mode_binary = 1 << 7,
-
2699
-
2700 share_none = 0,
-
2701 share_reading = 1 << 8,
-
2702 share_writing = 1 << 9,
-
2703 share_deleting = 1 << 10,
-
2704 share_all = share_reading | share_writing | share_deleting, // Allow others all operations on our file
-
2705
-
2706 inherit_handle = 1 << 11,
-
2707
-
2708 hint_write_thru = 1 << 12,
-
2709 hint_no_buffering = 1 << 13,
-
2710 hint_random_access = 1 << 14,
-
2711 hint_sequential_access = 1 << 15,
-
2712 };
-
2713
-
2714#pragma warning(push)
-
2715#pragma warning(disable: 4250)
-
-
2719 class file : virtual public basic_file, virtual public basic_sys
-
2720 {
-
2721 public:
-
2722 file(_In_opt_ sys_handle h = invalid_handle, _In_ state_t state = state_t::ok) : basic_sys(h, state) {}
-
2723
-
-
2730 file(_In_z_ const schar_t* filename, _In_ int mode)
-
2731 {
-
2732 open(filename, mode);
-
2733 }
+
2696 share_none = 0,
+
2697 share_reading = 1 << 8,
+
2698 share_writing = 1 << 9,
+
2699 share_deleting = 1 << 10,
+
2700 share_all = share_reading | share_writing | share_deleting, // Allow others all operations on our file
+
2701
+
2702 inherit_handle = 1 << 11,
+
2703
+
2704 hint_write_thru = 1 << 12,
+
2705 hint_no_buffering = 1 << 13,
+
2706 hint_random_access = 1 << 14,
+
2707 hint_sequential_access = 1 << 15,
+
2708 };
+
2709
+
2710#pragma warning(push)
+
2711#pragma warning(disable: 4250)
+
+
2715 class file : virtual public basic_file, virtual public basic_sys
+
2716 {
+
2717 public:
+
2718 file(_In_opt_ sys_handle h = invalid_handle, _In_ state_t state = state_t::ok) : basic_sys(h, state) {}
+
2719
+
+
2726 file(_In_z_ const schar_t* filename, _In_ int mode)
+
2727 {
+
2728 open(filename, mode);
+
2729 }
-
2734
-
2741 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
-
2742 file(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode) : file(filename.c_str(), mode) {}
-
2743
-
-
2750 void open(_In_z_ const schar_t* filename, _In_ int mode)
-
2751 {
-
2752 if (m_h != invalid_handle)
-
2753 close();
-
2754
-
2755#ifdef _WIN32
-
2756 DWORD dwDesiredAccess = 0;
-
2757 if (mode & mode_for_reading) dwDesiredAccess |= GENERIC_READ;
-
2758 if (mode & mode_for_writing) dwDesiredAccess |= GENERIC_WRITE;
-
2759 if (mode & mode_for_chmod) dwDesiredAccess |= FILE_WRITE_ATTRIBUTES;
-
2760
-
2761 DWORD dwShareMode = 0;
-
2762 if (mode & share_reading) dwShareMode |= FILE_SHARE_READ;
-
2763 if (mode & share_writing) dwShareMode |= FILE_SHARE_WRITE;
-
2764 if (mode & share_deleting) dwShareMode |= FILE_SHARE_DELETE;
-
2765
-
2766 SECURITY_ATTRIBUTES sa = { sizeof(SECURITY_ATTRIBUTES) };
-
2767 sa.bInheritHandle = mode & inherit_handle ? true : false;
-
2768
-
2769 DWORD dwCreationDisposition;
-
2770 switch (mode & mode_disposition_mask) {
-
2771 case mode_open_existing: dwCreationDisposition = OPEN_EXISTING; break;
-
2772 case mode_truncate_existing: dwCreationDisposition = TRUNCATE_EXISTING; break;
-
2773 case mode_preserve_existing: dwCreationDisposition = OPEN_ALWAYS; break;
-
2774 case mode_create_new: dwCreationDisposition = CREATE_NEW; break;
-
2775 case mode_create: dwCreationDisposition = CREATE_ALWAYS; break;
-
2776 default: throw std::invalid_argument("invalid mode");
-
2777 }
-
2778
-
2779 DWORD dwFlagsAndAttributes = FILE_ATTRIBUTE_NORMAL;
-
2780 if (mode & hint_write_thru) dwFlagsAndAttributes |= FILE_FLAG_WRITE_THROUGH;
-
2781 if (mode & hint_no_buffering) dwFlagsAndAttributes |= FILE_FLAG_NO_BUFFERING;
-
2782 if (mode & hint_random_access) dwFlagsAndAttributes |= FILE_FLAG_RANDOM_ACCESS;
-
2783 if (mode & hint_sequential_access) dwFlagsAndAttributes |= FILE_FLAG_SEQUENTIAL_SCAN;
-
2784
-
2785 m_h = CreateFile(filename, dwDesiredAccess, dwShareMode, &sa, dwCreationDisposition, dwFlagsAndAttributes, NULL);
-
2786#else
-
2787 int flags = 0;
-
2788 switch (mode & (mode_for_reading | mode_for_writing)) {
-
2789 case mode_for_reading: flags |= O_RDONLY; break;
-
2790 case mode_for_writing: flags |= O_WRONLY; break;
-
2791 case mode_for_reading | mode_for_writing: flags |= O_RDWR; break;
-
2792 }
-
2793 switch (mode & mode_disposition_mask) {
-
2794 case mode_open_existing: break;
-
2795 case mode_truncate_existing: flags |= O_TRUNC; break;
-
2796 case mode_preserve_existing: flags |= O_CREAT; break;
-
2797 case mode_create_new: flags |= O_CREAT | O_EXCL; break;
-
2798 case mode_create: flags |= O_CREAT | O_TRUNC; break;
-
2799 default: throw std::invalid_argument("invalid mode");
-
2800 }
-
2801 if (mode & hint_write_thru) flags |= O_DSYNC;
-
2802#ifndef __APPLE__
-
2803 if (mode & hint_no_buffering) flags |= O_RSYNC;
-
2804#endif
-
2805
-
2806 m_h = ::open(filename, flags, DEFFILEMODE);
-
2807#endif
-
2808 if (m_h != invalid_handle) {
-
2809 m_state = state_t::ok;
-
2810 if (mode & mode_append)
-
2811 seek(0, seek_t::end);
-
2812 }
-
2813 else
-
2814 m_state = state_t::fail;
-
2815 }
+
2730
+
2737 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
+
2738 file(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode) : file(filename.c_str(), mode) {}
+
2739
+
+
2746 void open(_In_z_ const schar_t* filename, _In_ int mode)
+
2747 {
+
2748 if (m_h != invalid_handle)
+
2749 close();
+
2750
+
2751#ifdef _WIN32
+
2752 DWORD dwDesiredAccess = 0;
+
2753 if (mode & mode_for_reading) dwDesiredAccess |= GENERIC_READ;
+
2754 if (mode & mode_for_writing) dwDesiredAccess |= GENERIC_WRITE;
+
2755 if (mode & mode_for_chmod) dwDesiredAccess |= FILE_WRITE_ATTRIBUTES;
+
2756
+
2757 DWORD dwShareMode = 0;
+
2758 if (mode & share_reading) dwShareMode |= FILE_SHARE_READ;
+
2759 if (mode & share_writing) dwShareMode |= FILE_SHARE_WRITE;
+
2760 if (mode & share_deleting) dwShareMode |= FILE_SHARE_DELETE;
+
2761
+
2762 SECURITY_ATTRIBUTES sa = { sizeof(SECURITY_ATTRIBUTES) };
+
2763 sa.bInheritHandle = mode & inherit_handle ? true : false;
+
2764
+
2765 DWORD dwCreationDisposition;
+
2766 switch (mode & mode_disposition_mask) {
+
2767 case mode_open_existing: dwCreationDisposition = OPEN_EXISTING; break;
+
2768 case mode_truncate_existing: dwCreationDisposition = TRUNCATE_EXISTING; break;
+
2769 case mode_preserve_existing: dwCreationDisposition = OPEN_ALWAYS; break;
+
2770 case mode_create_new: dwCreationDisposition = CREATE_NEW; break;
+
2771 case mode_create: dwCreationDisposition = CREATE_ALWAYS; break;
+
2772 default: throw std::invalid_argument("invalid mode");
+
2773 }
+
2774
+
2775 DWORD dwFlagsAndAttributes = FILE_ATTRIBUTE_NORMAL;
+
2776 if (mode & hint_write_thru) dwFlagsAndAttributes |= FILE_FLAG_WRITE_THROUGH;
+
2777 if (mode & hint_no_buffering) dwFlagsAndAttributes |= FILE_FLAG_NO_BUFFERING;
+
2778 if (mode & hint_random_access) dwFlagsAndAttributes |= FILE_FLAG_RANDOM_ACCESS;
+
2779 if (mode & hint_sequential_access) dwFlagsAndAttributes |= FILE_FLAG_SEQUENTIAL_SCAN;
+
2780
+
2781 m_h = CreateFile(filename, dwDesiredAccess, dwShareMode, &sa, dwCreationDisposition, dwFlagsAndAttributes, NULL);
+
2782#else
+
2783 int flags = 0;
+
2784 switch (mode & (mode_for_reading | mode_for_writing)) {
+
2785 case mode_for_reading: flags |= O_RDONLY; break;
+
2786 case mode_for_writing: flags |= O_WRONLY; break;
+
2787 case mode_for_reading | mode_for_writing: flags |= O_RDWR; break;
+
2788 }
+
2789 switch (mode & mode_disposition_mask) {
+
2790 case mode_open_existing: break;
+
2791 case mode_truncate_existing: flags |= O_TRUNC; break;
+
2792 case mode_preserve_existing: flags |= O_CREAT; break;
+
2793 case mode_create_new: flags |= O_CREAT | O_EXCL; break;
+
2794 case mode_create: flags |= O_CREAT | O_TRUNC; break;
+
2795 default: throw std::invalid_argument("invalid mode");
+
2796 }
+
2797 if (mode & hint_write_thru) flags |= O_DSYNC;
+
2798#ifndef __APPLE__
+
2799 if (mode & hint_no_buffering) flags |= O_RSYNC;
+
2800#endif
+
2801
+
2802 m_h = ::open(filename, flags, DEFFILEMODE);
+
2803#endif
+
2804 if (m_h != invalid_handle) {
+
2805 m_state = state_t::ok;
+
2806 if (mode & mode_append)
+
2807 seek(0, seek_t::end);
+
2808 }
+
2809 else
+
2810 m_state = state_t::fail;
+
2811 }
-
2816
-
2823 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
-
-
2824 void open(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode)
-
2825 {
-
2826 open(filename.c_str(), mode);
-
2827 }
+
2812
+
2819 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
+
+
2820 void open(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode)
+
2821 {
+
2822 open(filename.c_str(), mode);
+
2823 }
-
2828
-
-
2829 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
-
2830 {
-
2831#ifdef _WIN32
-
2832 LARGE_INTEGER li;
-
2833 li.QuadPart = offset;
-
2834 li.LowPart = SetFilePointer(m_h, li.LowPart, &li.HighPart, static_cast<DWORD>(how));
-
2835 if (li.LowPart != 0xFFFFFFFF || GetLastError() == NO_ERROR) {
-
2836 m_state = state_t::ok;
-
2837 return li.QuadPart;
-
2838 }
-
2839#else
-
2840 off64_t result = lseek64(m_h, offset, static_cast<int>(how));
-
2841 if (result >= 0) {
-
2842 m_state = state_t::ok;
-
2843 return static_cast<fpos_t>(result);
-
2844 }
-
2845#endif
-
2846 m_state = state_t::fail;
-
2847 return fpos_max;
-
2848 }
+
2824
+
+
2825 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
+
2826 {
+
2827#ifdef _WIN32
+
2828 LARGE_INTEGER li;
+
2829 li.QuadPart = offset;
+
2830 li.LowPart = SetFilePointer(m_h, li.LowPart, &li.HighPart, static_cast<DWORD>(how));
+
2831 if (li.LowPart != 0xFFFFFFFF || GetLastError() == NO_ERROR) {
+
2832 m_state = state_t::ok;
+
2833 return li.QuadPart;
+
2834 }
+
2835#else
+
2836 off64_t result = lseek64(m_h, offset, static_cast<int>(how));
+
2837 if (result >= 0) {
+
2838 m_state = state_t::ok;
+
2839 return static_cast<fpos_t>(result);
+
2840 }
+
2841#endif
+
2842 m_state = state_t::fail;
+
2843 return fpos_max;
+
2844 }
-
2849
-
-
2850 virtual fpos_t tell() const
-
2851 {
-
2852 if (m_h != invalid_handle) {
-
2853#ifdef _WIN32
-
2854 LARGE_INTEGER li;
-
2855 li.QuadPart = 0;
-
2856 li.LowPart = SetFilePointer(m_h, 0, &li.HighPart, FILE_CURRENT);
-
2857 if (li.LowPart != 0xFFFFFFFF || GetLastError() == NO_ERROR)
-
2858 return li.QuadPart;
-
2859#else
-
2860 off64_t result = lseek64(m_h, 0, SEEK_CUR);
-
2861 if (result >= 0)
-
2862 return static_cast<fpos_t>(result);
-
2863#endif
-
2864 }
-
2865 return fpos_max;
-
2866 }
+
2845
+
+
2846 virtual fpos_t tell() const
+
2847 {
+
2848 if (m_h != invalid_handle) {
+
2849#ifdef _WIN32
+
2850 LARGE_INTEGER li;
+
2851 li.QuadPart = 0;
+
2852 li.LowPart = SetFilePointer(m_h, 0, &li.HighPart, FILE_CURRENT);
+
2853 if (li.LowPart != 0xFFFFFFFF || GetLastError() == NO_ERROR)
+
2854 return li.QuadPart;
+
2855#else
+
2856 off64_t result = lseek64(m_h, 0, SEEK_CUR);
+
2857 if (result >= 0)
+
2858 return static_cast<fpos_t>(result);
+
2859#endif
+
2860 }
+
2861 return fpos_max;
+
2862 }
-
2867
-
-
2868 virtual void lock(_In_ fpos_t offset, _In_ fsize_t length)
-
2869 {
-
2870#ifdef _WIN32
-
2871 LARGE_INTEGER liOffset;
-
2872 LARGE_INTEGER liSize;
-
2873 liOffset.QuadPart = offset;
-
2874 liSize.QuadPart = length;
-
2875 if (LockFile(m_h, liOffset.LowPart, liOffset.HighPart, liSize.LowPart, liSize.HighPart)) {
-
2876 m_state = state_t::ok;
-
2877 return;
-
2878 }
-
2879#else
-
2880 off64_t orig = lseek64(m_h, 0, SEEK_CUR);
-
2881 if (orig >= 0) {
-
2882 if (offset > std::numeric_limits<off64_t>::max())
-
2883 throw std::invalid_argument("file offset too big");
-
2884 if (length > std::numeric_limits<off64_t>::max())
-
2885 throw std::invalid_argument("file section length too big");
-
2886 m_state = lseek64(m_h, static_cast<off64_t>(offset), SEEK_SET) >= 0 && lockf64(m_h, F_LOCK, static_cast<off64_t>(length)) >= 0 ? state_t::ok : state_t::fail;
-
2887 lseek64(m_h, orig, SEEK_SET);
-
2888 m_state = state_t::ok;
-
2889 return;
-
2890 }
-
2891#endif
-
2892 m_state = state_t::fail;
-
2893 }
+
2863
+
+
2864 virtual void lock(_In_ fpos_t offset, _In_ fsize_t length)
+
2865 {
+
2866#ifdef _WIN32
+
2867 LARGE_INTEGER liOffset;
+
2868 LARGE_INTEGER liSize;
+
2869 liOffset.QuadPart = offset;
+
2870 liSize.QuadPart = length;
+
2871 if (LockFile(m_h, liOffset.LowPart, liOffset.HighPart, liSize.LowPart, liSize.HighPart)) {
+
2872 m_state = state_t::ok;
+
2873 return;
+
2874 }
+
2875#else
+
2876 off64_t orig = lseek64(m_h, 0, SEEK_CUR);
+
2877 if (orig >= 0) {
+
2878 if (offset > std::numeric_limits<off64_t>::max())
+
2879 throw std::invalid_argument("file offset too big");
+
2880 if (length > std::numeric_limits<off64_t>::max())
+
2881 throw std::invalid_argument("file section length too big");
+
2882 m_state = lseek64(m_h, static_cast<off64_t>(offset), SEEK_SET) >= 0 && lockf64(m_h, F_LOCK, static_cast<off64_t>(length)) >= 0 ? state_t::ok : state_t::fail;
+
2883 lseek64(m_h, orig, SEEK_SET);
+
2884 m_state = state_t::ok;
+
2885 return;
+
2886 }
+
2887#endif
+
2888 m_state = state_t::fail;
+
2889 }
-
2894
-
-
2895 virtual void unlock(_In_ fpos_t offset, _In_ fsize_t length)
-
2896 {
-
2897#ifdef _WIN32
-
2898 LARGE_INTEGER liOffset;
-
2899 LARGE_INTEGER liSize;
-
2900 liOffset.QuadPart = offset;
-
2901 liSize.QuadPart = length;
-
2902 if (UnlockFile(m_h, liOffset.LowPart, liOffset.HighPart, liSize.LowPart, liSize.HighPart)) {
-
2903 m_state = state_t::ok;
-
2904 return;
-
2905 }
-
2906#else
-
2907 off64_t orig = lseek64(m_h, 0, SEEK_CUR);
-
2908 if (orig >= 0) {
-
2909 if (offset > std::numeric_limits<off64_t>::max())
-
2910 throw std::invalid_argument("file offset too big");
-
2911 if (length > std::numeric_limits<off64_t>::max())
-
2912 throw std::invalid_argument("file section length too big");
-
2913 if (lseek64(m_h, static_cast<off64_t>(offset), SEEK_SET) >= 0 && lockf64(m_h, F_ULOCK, static_cast<off64_t>(length)) >= 0) {
-
2914 lseek64(m_h, orig, SEEK_SET);
-
2915 m_state = state_t::ok;
-
2916 return;
-
2917 }
-
2918 lseek64(m_h, orig, SEEK_SET);
-
2919 }
-
2920#endif
-
2921 m_state = state_t::fail;
-
2922 }
+
2890
+
+
2891 virtual void unlock(_In_ fpos_t offset, _In_ fsize_t length)
+
2892 {
+
2893#ifdef _WIN32
+
2894 LARGE_INTEGER liOffset;
+
2895 LARGE_INTEGER liSize;
+
2896 liOffset.QuadPart = offset;
+
2897 liSize.QuadPart = length;
+
2898 if (UnlockFile(m_h, liOffset.LowPart, liOffset.HighPart, liSize.LowPart, liSize.HighPart)) {
+
2899 m_state = state_t::ok;
+
2900 return;
+
2901 }
+
2902#else
+
2903 off64_t orig = lseek64(m_h, 0, SEEK_CUR);
+
2904 if (orig >= 0) {
+
2905 if (offset > std::numeric_limits<off64_t>::max())
+
2906 throw std::invalid_argument("file offset too big");
+
2907 if (length > std::numeric_limits<off64_t>::max())
+
2908 throw std::invalid_argument("file section length too big");
+
2909 if (lseek64(m_h, static_cast<off64_t>(offset), SEEK_SET) >= 0 && lockf64(m_h, F_ULOCK, static_cast<off64_t>(length)) >= 0) {
+
2910 lseek64(m_h, orig, SEEK_SET);
+
2911 m_state = state_t::ok;
+
2912 return;
+
2913 }
+
2914 lseek64(m_h, orig, SEEK_SET);
+
2915 }
+
2916#endif
+
2917 m_state = state_t::fail;
+
2918 }
-
2923
-
-
2924 virtual fsize_t size() const
-
2925 {
-
2926#ifdef _WIN32
-
2927 LARGE_INTEGER li;
-
2928 li.LowPart = GetFileSize(m_h, (LPDWORD)&li.HighPart);
-
2929 if (li.LowPart == 0xFFFFFFFF && GetLastError() != NO_ERROR)
-
2930 li.QuadPart = -1;
-
2931 return li.QuadPart;
-
2932#else
-
2933 off64_t orig = lseek64(m_h, 0, SEEK_CUR);
-
2934 if (orig >= 0) {
-
2935 off64_t length = lseek64(m_h, 0, SEEK_END);
-
2936 lseek64(m_h, orig, SEEK_SET);
-
2937 if (length >= 0)
-
2938 return static_cast<fsize_t>(length);
-
2939 }
-
2940 return fsize_max;
-
2941#endif
-
2942 }
+
2919
+
+
2920 virtual fsize_t size() const
+
2921 {
+
2922#ifdef _WIN32
+
2923 LARGE_INTEGER li;
+
2924 li.LowPart = GetFileSize(m_h, (LPDWORD)&li.HighPart);
+
2925 if (li.LowPart == 0xFFFFFFFF && GetLastError() != NO_ERROR)
+
2926 li.QuadPart = -1;
+
2927 return li.QuadPart;
+
2928#else
+
2929 off64_t orig = lseek64(m_h, 0, SEEK_CUR);
+
2930 if (orig >= 0) {
+
2931 off64_t length = lseek64(m_h, 0, SEEK_END);
+
2932 lseek64(m_h, orig, SEEK_SET);
+
2933 if (length >= 0)
+
2934 return static_cast<fsize_t>(length);
+
2935 }
+
2936 return fsize_max;
+
2937#endif
+
2938 }
-
2943
-
-
2944 virtual void truncate()
-
2945 {
-
2946#ifdef _WIN32
-
2947 if (SetEndOfFile(m_h)) {
-
2948 m_state = state_t::ok;
-
2949 return;
-
2950 }
-
2951#else
-
2952 off64_t length = lseek64(m_h, 0, SEEK_CUR);
-
2953 if (length >= 0 && ftruncate64(m_h, length) >= 0) {
-
2954 m_state = state_t::ok;
-
2955 return;
-
2956 }
-
2957#endif
-
2958 m_state = state_t::fail;
-
2959 }
+
2939
+
+
2940 virtual void truncate()
+
2941 {
+
2942#ifdef _WIN32
+
2943 if (SetEndOfFile(m_h)) {
+
2944 m_state = state_t::ok;
+
2945 return;
+
2946 }
+
2947#else
+
2948 off64_t length = lseek64(m_h, 0, SEEK_CUR);
+
2949 if (length >= 0 && ftruncate64(m_h, length) >= 0) {
+
2950 m_state = state_t::ok;
+
2951 return;
+
2952 }
+
2953#endif
+
2954 m_state = state_t::fail;
+
2955 }
-
2960
-
2961#ifdef _WIN32
-
2962 static time_point ft2tp(_In_ const FILETIME& ft)
-
2963 {
-
2964#if _HAS_CXX20
-
2965 uint64_t t = (static_cast<int64_t>(ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
-
2966#else
-
2967 uint64_t t = ((static_cast<int64_t>(ft.dwHighDateTime) << 32) | ft.dwLowDateTime) - 116444736000000000ll;
-
2968#endif
-
2969 return time_point(time_point::duration(t));
-
2970 }
-
2971
-
2972 static void tp2ft(_In_ time_point tp, _Out_ FILETIME& ft)
-
2973 {
-
2974#if _HAS_CXX20
-
2975 uint64_t t = tp.time_since_epoch().count();
-
2976#else
-
2977 uint64_t t = tp.time_since_epoch().count() + 116444736000000000ll;
+
2956
+
2957#ifdef _WIN32
+
2958 static time_point ft2tp(_In_ const FILETIME& ft)
+
2959 {
+
2960#if _HAS_CXX20
+
2961 uint64_t t = (static_cast<int64_t>(ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
+
2962#else
+
2963 uint64_t t = ((static_cast<int64_t>(ft.dwHighDateTime) << 32) | ft.dwLowDateTime) - 116444736000000000ll;
+
2964#endif
+
2965 return time_point(time_point::duration(t));
+
2966 }
+
2967
+
2968 static void tp2ft(_In_ time_point tp, _Out_ FILETIME& ft)
+
2969 {
+
2970#if _HAS_CXX20
+
2971 uint64_t t = tp.time_since_epoch().count();
+
2972#else
+
2973 uint64_t t = tp.time_since_epoch().count() + 116444736000000000ll;
+
2974#endif
+
2975 ft.dwHighDateTime = static_cast<DWORD>((t >> 32) & 0xffffffff);
+
2976 ft.dwLowDateTime = static_cast<DWORD>(t & 0xffffffff);
+
2977 }
2978#endif
-
2979 ft.dwHighDateTime = static_cast<DWORD>((t >> 32) & 0xffffffff);
-
2980 ft.dwLowDateTime = static_cast<DWORD>(t & 0xffffffff);
-
2981 }
-
2982#endif
-
2983
-
-
2984 virtual time_point ctime() const
-
2985 {
-
2986#ifdef _WIN32
-
2987 FILETIME ft;
-
2988 if (GetFileTime(m_h, &ft, nullptr, nullptr))
-
2989 return ft2tp(ft);
-
2990#endif
-
2991 return time_point::min();
-
2992 }
+
2979
+
+
2980 virtual time_point ctime() const
+
2981 {
+
2982#ifdef _WIN32
+
2983 FILETIME ft;
+
2984 if (GetFileTime(m_h, &ft, nullptr, nullptr))
+
2985 return ft2tp(ft);
+
2986#endif
+
2987 return time_point::min();
+
2988 }
-
2993
-
-
2994 virtual time_point atime() const
-
2995 {
-
2996#ifdef _WIN32
-
2997 FILETIME ft;
-
2998 if (GetFileTime(m_h, nullptr, &ft, nullptr))
-
2999 return ft2tp(ft);
-
3000#else
-
3001 struct stat buf;
-
3002 if (fstat(m_h, &buf) >= 0)
-
3003 return clock::from_time_t(buf.st_atime);
-
3004#endif
-
3005 return time_point::min();
-
3006 }
+
2989
+
+
2990 virtual time_point atime() const
+
2991 {
+
2992#ifdef _WIN32
+
2993 FILETIME ft;
+
2994 if (GetFileTime(m_h, nullptr, &ft, nullptr))
+
2995 return ft2tp(ft);
+
2996#else
+
2997 struct stat buf;
+
2998 if (fstat(m_h, &buf) >= 0)
+
2999 return clock::from_time_t(buf.st_atime);
+
3000#endif
+
3001 return time_point::min();
+
3002 }
-
3007
-
-
3008 virtual time_point mtime() const
-
3009 {
-
3010#ifdef _WIN32
-
3011 FILETIME ft;
-
3012 if (GetFileTime(m_h, nullptr, nullptr, &ft))
-
3013 return ft2tp(ft);
-
3014#else
-
3015 struct stat buf;
-
3016 if (fstat(m_h, &buf) >= 0)
-
3017 return clock::from_time_t(buf.st_mtime);
-
3018#endif
-
3019 return time_point::min();
-
3020 }
+
3003
+
+
3004 virtual time_point mtime() const
+
3005 {
+
3006#ifdef _WIN32
+
3007 FILETIME ft;
+
3008 if (GetFileTime(m_h, nullptr, nullptr, &ft))
+
3009 return ft2tp(ft);
+
3010#else
+
3011 struct stat buf;
+
3012 if (fstat(m_h, &buf) >= 0)
+
3013 return clock::from_time_t(buf.st_mtime);
+
3014#endif
+
3015 return time_point::min();
+
3016 }
-
3021
-
-
3022 virtual void set_ctime(time_point date)
-
3023 {
-
3024 stdex_assert(m_h != invalid_handle);
-
3025#ifdef _WIN32
-
3026 FILETIME ft;
-
3027 tp2ft(date, ft);
-
3028 if (SetFileTime(m_h, &ft, nullptr, nullptr))
-
3029 return;
-
3030 throw std::system_error(GetLastError(), std::system_category(), "SetFileTime failed");
-
3031#else
-
3032 _Unreferenced_(date);
-
3033 throw std::runtime_error("not supported");
-
3034#endif
-
3035 }
+
3017
+
+
3018 virtual void set_ctime(time_point date)
+
3019 {
+
3020 stdex_assert(m_h != invalid_handle);
+
3021#ifdef _WIN32
+
3022 FILETIME ft;
+
3023 tp2ft(date, ft);
+
3024 if (SetFileTime(m_h, &ft, nullptr, nullptr))
+
3025 return;
+
3026 throw std::system_error(GetLastError(), std::system_category(), "SetFileTime failed");
+
3027#else
+
3028 _Unreferenced_(date);
+
3029 throw std::runtime_error("not supported");
+
3030#endif
+
3031 }
-
3036
-
-
3037 virtual void set_atime(time_point date)
-
3038 {
-
3039 stdex_assert(m_h != invalid_handle);
-
3040#ifdef _WIN32
-
3041 FILETIME ft;
-
3042 tp2ft(date, ft);
-
3043 if (SetFileTime(m_h, nullptr, &ft, nullptr))
-
3044 return;
-
3045 throw std::system_error(GetLastError(), std::system_category(), "SetFileTime failed");
-
3046#else
-
3047 struct timespec ts[2] = {
-
3048 { date.time_since_epoch().count(), 0 },
-
3049 { 0, UTIME_OMIT },
-
3050 };
-
3051 if (futimens(m_h, ts) >= 0)
-
3052 return;
-
3053 throw std::system_error(errno, std::system_category(), "futimens failed");
-
3054#endif
-
3055 }
+
3032
+
+
3033 virtual void set_atime(time_point date)
+
3034 {
+
3035 stdex_assert(m_h != invalid_handle);
+
3036#ifdef _WIN32
+
3037 FILETIME ft;
+
3038 tp2ft(date, ft);
+
3039 if (SetFileTime(m_h, nullptr, &ft, nullptr))
+
3040 return;
+
3041 throw std::system_error(GetLastError(), std::system_category(), "SetFileTime failed");
+
3042#else
+
3043 struct timespec ts[2] = {
+
3044 { date.time_since_epoch().count(), 0 },
+
3045 { 0, UTIME_OMIT },
+
3046 };
+
3047 if (futimens(m_h, ts) >= 0)
+
3048 return;
+
3049 throw std::system_error(errno, std::system_category(), "futimens failed");
+
3050#endif
+
3051 }
-
3056
-
-
3057 virtual void set_mtime(time_point date)
-
3058 {
-
3059#ifdef _WIN32
-
3060 FILETIME ft;
-
3061 tp2ft(date, ft);
-
3062 if (SetFileTime(m_h, nullptr, nullptr, &ft))
-
3063 return;
-
3064 throw std::system_error(GetLastError(), std::system_category(), "SetFileTime failed");
-
3065#else
-
3066 struct timespec ts[2] = {
-
3067 { 0, UTIME_OMIT },
-
3068 { date.time_since_epoch().count(), 0 },
-
3069 };
-
3070 if (futimens(m_h, ts) >= 0)
-
3071 return;
-
3072 throw std::system_error(errno, std::system_category(), "futimens failed");
-
3073#endif
-
3074 }
+
3052
+
+
3053 virtual void set_mtime(time_point date)
+
3054 {
+
3055#ifdef _WIN32
+
3056 FILETIME ft;
+
3057 tp2ft(date, ft);
+
3058 if (SetFileTime(m_h, nullptr, nullptr, &ft))
+
3059 return;
+
3060 throw std::system_error(GetLastError(), std::system_category(), "SetFileTime failed");
+
3061#else
+
3062 struct timespec ts[2] = {
+
3063 { 0, UTIME_OMIT },
+
3064 { date.time_since_epoch().count(), 0 },
+
3065 };
+
3066 if (futimens(m_h, ts) >= 0)
+
3067 return;
+
3068 throw std::system_error(errno, std::system_category(), "futimens failed");
+
3069#endif
+
3070 }
-
3075
-
-
3081 static bool exists(_In_z_ const stdex::schar_t* filename)
-
3082 {
-
3083#ifdef _WIN32
-
3084 return GetFileAttributes(filename) != INVALID_FILE_ATTRIBUTES;
-
3085#else
-
3086 struct stat s;
-
3087 return stat(filename, &s) == 0;
-
3088#endif
-
3089 }
+
3071
+
+
3077 static bool exists(_In_z_ const stdex::schar_t* filename)
+
3078 {
+
3079#ifdef _WIN32
+
3080 return GetFileAttributes(filename) != INVALID_FILE_ATTRIBUTES;
+
3081#else
+
3082 struct stat s;
+
3083 return stat(filename, &s) == 0;
+
3084#endif
+
3085 }
-
3090
-
3096 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
-
-
3097 static bool exists(_In_ const std::basic_string<TR, AX>& filename)
-
3098 {
-
3099 return exists(filename.c_str());
-
3100 }
+
3086
+
3092 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
+
+
3093 static bool exists(_In_ const std::basic_string<TR, AX>& filename)
+
3094 {
+
3095 return exists(filename.c_str());
+
3096 }
-
3101
-
-
3109 static bool readonly(_In_z_ const stdex::schar_t* filename)
-
3110 {
-
3111#ifdef _WIN32
-
3112 DWORD dwAttr = GetFileAttributes(filename);
-
3113 return dwAttr != INVALID_FILE_ATTRIBUTES && (dwAttr & FILE_ATTRIBUTE_READONLY) != 0;
-
3114#else
-
3115 struct stat s;
-
3116 return stat(filename, &s) == 0 && (s.st_mode & (S_IWUSR|S_IWGRP|S_IWOTH)) == 0;
-
3117#endif
-
3118 }
+
3097
+
+
3105 static bool readonly(_In_z_ const stdex::schar_t* filename)
+
3106 {
+
3107#ifdef _WIN32
+
3108 DWORD dwAttr = GetFileAttributes(filename);
+
3109 return dwAttr != INVALID_FILE_ATTRIBUTES && (dwAttr & FILE_ATTRIBUTE_READONLY) != 0;
+
3110#else
+
3111 struct stat s;
+
3112 return stat(filename, &s) == 0 && (s.st_mode & (S_IWUSR|S_IWGRP|S_IWOTH)) == 0;
+
3113#endif
+
3114 }
-
3119
-
3127 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
-
-
3128 static bool readonly(_In_ const std::basic_string<TR, AX>& filename)
-
3129 {
-
3130 return readonly(filename.c_str());
-
3131 }
+
3115
+
3123 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
+
+
3124 static bool readonly(_In_ const std::basic_string<TR, AX>& filename)
+
3125 {
+
3126 return readonly(filename.c_str());
+
3127 }
-
3132 };
+
3128 };
-
3133#pragma warning(pop)
-
3134
-
-
3138 class cached_file : public cache
-
3139 {
-
3140 public:
-
3141 cached_file(_In_opt_ sys_handle h = invalid_handle, _In_ state_t state = state_t::ok, _In_ size_t cache_size = default_cache_size) :
-
3142 cache(cache_size),
-
3143 m_source(h, state)
-
3144 {
-
3145 init(m_source);
-
3146 }
-
3147
-
-
3155 cached_file(_In_z_ const schar_t* filename, _In_ int mode, _In_ size_t cache_size = default_cache_size) :
-
3156 cache(cache_size),
-
3157 m_source(filename, mode & mode_for_writing ? mode | mode_for_reading : mode)
-
3158 {
-
3159 init(m_source);
-
3160 }
+
3129#pragma warning(pop)
+
3130
+
+
3134 class cached_file : public cache
+
3135 {
+
3136 public:
+
3137 cached_file(_In_opt_ sys_handle h = invalid_handle, _In_ state_t state = state_t::ok, _In_ size_t cache_size = default_cache_size) :
+
3138 cache(cache_size),
+
3139 m_source(h, state)
+
3140 {
+
3141 init(m_source);
+
3142 }
+
3143
+
+
3151 cached_file(_In_z_ const schar_t* filename, _In_ int mode, _In_ size_t cache_size = default_cache_size) :
+
3152 cache(cache_size),
+
3153 m_source(filename, mode & mode_for_writing ? mode | mode_for_reading : mode)
+
3154 {
+
3155 init(m_source);
+
3156 }
-
3161
-
3169 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
-
3170 cached_file(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode, _In_ size_t cache_size = default_cache_size) : cached_file(filename.c_str(), mode, cache_size) {}
-
3171
-
3172 virtual ~cached_file()
-
3173 {
-
3174 done();
-
3175 }
-
3176
-
-
3183 void open(_In_z_ const schar_t* filename, _In_ int mode)
-
3184 {
-
3185 invalidate_cache();
-
3186 if (!ok()) _Unlikely_{
-
3187 m_state = state_t::fail;
-
3188 return;
-
3189 }
-
3190 m_source.open(filename, mode & mode_for_writing ? mode | mode_for_reading : mode);
-
3191 if (m_source.ok()) {
-
3192 init();
-
3193 return;
-
3194 }
-
3195 m_state = state_t::fail;
-
3196 }
+
3157
+
3165 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
+
3166 cached_file(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode, _In_ size_t cache_size = default_cache_size) : cached_file(filename.c_str(), mode, cache_size) {}
+
3167
+
3168 virtual ~cached_file()
+
3169 {
+
3170 done();
+
3171 }
+
3172
+
+
3179 void open(_In_z_ const schar_t* filename, _In_ int mode)
+
3180 {
+
3181 invalidate_cache();
+
3182 if (!ok()) _Unlikely_{
+
3183 m_state = state_t::fail;
+
3184 return;
+
3185 }
+
3186 m_source.open(filename, mode & mode_for_writing ? mode | mode_for_reading : mode);
+
3187 if (m_source.ok()) {
+
3188 init();
+
3189 return;
+
3190 }
+
3191 m_state = state_t::fail;
+
3192 }
-
3197
-
3204 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
-
-
3205 void open(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode)
-
3206 {
-
3207 open(filename.c_str(), mode);
-
3208 }
+
3193
+
3200 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
+
+
3201 void open(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode)
+
3202 {
+
3203 open(filename.c_str(), mode);
+
3204 }
+
+
3205
+
3209 operator bool() const noexcept { return m_source; }
+
3210
+
3211 protected:
+
3212 file m_source;
+
3213 };
-
3209
-
3213 operator bool() const noexcept { return m_source; }
3214
-
3215 protected:
-
3216 file m_source;
-
3217 };
+
+ +
3219 {
+
3220 public:
+
3221 memory_file(_In_ state_t state = state_t::ok) :
+
3222 basic(state),
+
3223 m_data(nullptr),
+
3224 m_offset(0),
+
3225 m_size(0),
+
3226 m_reserved(0),
+
3227 m_manage(true)
+
3228 {
+
3229#if SET_FILE_OP_TIMES
+
3230 m_ctime = m_atime = m_mtime = time_point::now();
+
3231#endif
+
3232 }
+
3233
+
+
3240 memory_file(_In_ size_t size, _In_ state_t state = state_t::ok) :
+
3241 basic(state),
+
3242 m_data(reinterpret_cast<uint8_t*>(malloc(size))),
+
3243 m_offset(0),
+
3244 m_size(0),
+
3245 m_reserved(size),
+
3246 m_manage(true)
+
3247 {
+
3248 if (!m_data) {
+
3249 m_state = state_t::fail;
+
3250 throw std::bad_alloc();
+
3251 }
+
3252#if SET_FILE_OP_TIMES
+
3253 m_ctime = m_atime = m_mtime = time_point::now();
+
3254#endif
+
3255 }
-
3218
-
- -
3223 {
-
3224 public:
-
3225 memory_file(_In_ state_t state = state_t::ok) :
-
3226 basic(state),
-
3227 m_data(nullptr),
-
3228 m_offset(0),
-
3229 m_size(0),
-
3230 m_reserved(0),
-
3231 m_manage(true)
-
3232 {
-
3233#if SET_FILE_OP_TIMES
-
3234 m_ctime = m_atime = m_mtime = time_point::now();
-
3235#endif
-
3236 }
-
3237
-
-
3244 memory_file(_In_ size_t size, _In_ state_t state = state_t::ok) :
-
3245 basic(state),
-
3246 m_data(reinterpret_cast<uint8_t*>(malloc(size))),
-
3247 m_offset(0),
-
3248 m_size(0),
-
3249 m_reserved(size),
-
3250 m_manage(true)
-
3251 {
-
3252 if (!m_data) {
-
3253 m_state = state_t::fail;
-
3254 throw std::bad_alloc();
-
3255 }
-
3256#if SET_FILE_OP_TIMES
-
3257 m_ctime = m_atime = m_mtime = time_point::now();
-
3258#endif
-
3259 }
+
3256
+
+
3266 memory_file(_Inout_ void* data, _In_ size_t size, _In_ size_t reserved, _In_ bool manage = false, _In_ state_t state = state_t::ok) :
+
3267 basic(state),
+
3268 m_data(reinterpret_cast<uint8_t*>(data)),
+
3269 m_offset(0),
+
3270 m_size(size),
+
3271 m_reserved(reserved),
+
3272 m_manage(manage)
+
3273 {
+
3274 stdex_assert(data || !size);
+
3275 stdex_assert(reserved >= size);
+
3276#if SET_FILE_OP_TIMES
+
3277 m_ctime = m_atime = m_mtime = time_point::now();
+
3278#endif
+
3279 }
-
3260
-
-
3270 memory_file(_Inout_ void* data, _In_ size_t size, _In_ size_t reserved, _In_ bool manage = false, _In_ state_t state = state_t::ok) :
-
3271 basic(state),
-
3272 m_data(reinterpret_cast<uint8_t*>(data)),
-
3273 m_offset(0),
-
3274 m_size(size),
-
3275 m_reserved(reserved),
-
3276 m_manage(manage)
-
3277 {
-
3278 stdex_assert(data || !size);
-
3279 stdex_assert(reserved >= size);
-
3280#if SET_FILE_OP_TIMES
-
3281 m_ctime = m_atime = m_mtime = time_point::now();
-
3282#endif
-
3283 }
+
3280
+
+
3289 memory_file(_Inout_ void* data, _In_ size_t size, _In_ bool manage = false, _In_ state_t state = state_t::ok) :
+
3290 memory_file(data, size, size, manage, state)
+
3291 {}
-
3284
-
-
3293 memory_file(_Inout_ void* data, _In_ size_t size, _In_ bool manage = false, _In_ state_t state = state_t::ok) :
-
3294 memory_file(data, size, size, manage, state)
-
3295 {}
+
3292
+
+
3299 memory_file(_In_z_ const schar_t* filename, _In_ int mode) : memory_file()
+
3300 {
+
3301 load(filename, mode);
+
3302 }
-
3296
-
-
3303 memory_file(_In_z_ const schar_t* filename, _In_ int mode) : memory_file()
-
3304 {
-
3305 load(filename, mode);
-
3306 }
+
3303
+
3310 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
+
3311 memory_file(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode) : memory_file(filename.c_str(), mode) {}
+
3312
+
+
3318 memory_file(_In_ const memory_file& other) :
+
3319 basic_file(other),
+
3320 m_data(reinterpret_cast<uint8_t*>(malloc(other.m_size))),
+
3321 m_offset(other.m_offset),
+
3322 m_size(other.m_size),
+
3323 m_reserved(other.m_size),
+
3324 m_manage(true)
+
3325#if SET_FILE_OP_TIMES
+
3326 , m_ctime(other.m_ctime)
+
3327 , m_atime(other.m_atime)
+
3328 , m_mtime(other.m_mtime)
+
3329#endif
+
3330 {
+
3331 if (!m_data) {
+
3332 m_state = state_t::fail;
+
3333 throw std::bad_alloc();
+
3334 }
+
3335 memcpy(m_data, other.m_data, other.m_size);
+
3336 }
-
3307
-
3314 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
-
3315 memory_file(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode) : memory_file(filename.c_str(), mode) {}
-
3316
-
-
3322 memory_file(_In_ const memory_file& other) :
-
3323 basic_file(other),
-
3324 m_data(reinterpret_cast<uint8_t*>(malloc(other.m_size))),
-
3325 m_offset(other.m_offset),
-
3326 m_size(other.m_size),
-
3327 m_reserved(other.m_size),
-
3328 m_manage(true)
-
3329#if SET_FILE_OP_TIMES
-
3330 , m_ctime(other.m_ctime)
-
3331 , m_atime(other.m_atime)
-
3332 , m_mtime(other.m_mtime)
-
3333#endif
-
3334 {
-
3335 if (!m_data) {
-
3336 m_state = state_t::fail;
-
3337 throw std::bad_alloc();
-
3338 }
-
3339 memcpy(m_data, other.m_data, other.m_size);
-
3340 }
+
3337
+
+ +
3344 {
+
3345 if (this != std::addressof(other)) {
+
3346 *static_cast<basic_file*>(this) = other;
+
3347 if (m_manage && m_data)
+
3348 free(m_data);
+
3349 m_data = reinterpret_cast<uint8_t*>(malloc(other.m_size));
+
3350 if (!m_data) {
+
3351 m_state = state_t::fail;
+
3352 throw std::bad_alloc();
+
3353 }
+
3354 memcpy(m_data, other.m_data, other.m_size);
+
3355 m_offset = other.m_offset;
+
3356 m_size = other.m_size;
+
3357 m_reserved = other.m_size;
+
3358 m_manage = true;
+
3359#if SET_FILE_OP_TIMES
+
3360 m_ctime = other.m_ctime;
+
3361 m_atime = other.m_atime;
+
3362 m_mtime = other.m_mtime;
+
3363#endif
+
3364 }
+
3365 return *this;
+
3366 }
-
3341
-
- -
3348 {
-
3349 if (this != std::addressof(other)) {
-
3350 *static_cast<basic_file*>(this) = other;
-
3351 if (m_manage && m_data)
-
3352 free(m_data);
-
3353 m_data = reinterpret_cast<uint8_t*>(malloc(other.m_size));
-
3354 if (!m_data) {
-
3355 m_state = state_t::fail;
-
3356 throw std::bad_alloc();
-
3357 }
-
3358 memcpy(m_data, other.m_data, other.m_size);
-
3359 m_offset = other.m_offset;
-
3360 m_size = other.m_size;
-
3361 m_reserved = other.m_size;
-
3362 m_manage = true;
-
3363#if SET_FILE_OP_TIMES
-
3364 m_ctime = other.m_ctime;
-
3365 m_atime = other.m_atime;
-
3366 m_mtime = other.m_mtime;
-
3367#endif
-
3368 }
-
3369 return *this;
-
3370 }
+
3367
+
+
3373 memory_file(_Inout_ memory_file&& other) noexcept :
+
3374 basic_file(std::move(other)),
+
3375 m_data(other.m_data),
+
3376 m_offset(other.m_offset),
+
3377 m_size(other.m_size),
+
3378 m_reserved(other.m_reserved),
+
3379 m_manage(other.m_manage)
+
3380#if SET_FILE_OP_TIMES
+
3381 , m_ctime(other.m_ctime)
+
3382 , m_atime(other.m_atime)
+
3383 , m_mtime(other.m_mtime)
+
3384#endif
+
3385 {
+
3386 other.m_state = state_t::ok;
+
3387 other.m_data = nullptr;
+
3388 other.m_offset = 0;
+
3389 other.m_size = 0;
+
3390 other.m_reserved = 0;
+
3391 other.m_manage = true;
+
3392#if SET_FILE_OP_TIMES
+
3393 other.m_ctime = other.m_atime = other.m_mtime = time_point::now();
+
3394#endif
+
3395 }
-
3371
-
-
3377 memory_file(_Inout_ memory_file&& other) noexcept :
-
3378 basic_file(std::move(other)),
-
3379 m_data(other.m_data),
-
3380 m_offset(other.m_offset),
-
3381 m_size(other.m_size),
-
3382 m_reserved(other.m_reserved),
-
3383 m_manage(other.m_manage)
-
3384#if SET_FILE_OP_TIMES
-
3385 , m_ctime(other.m_ctime)
-
3386 , m_atime(other.m_atime)
-
3387 , m_mtime(other.m_mtime)
-
3388#endif
-
3389 {
-
3390 other.m_state = state_t::ok;
-
3391 other.m_data = nullptr;
-
3392 other.m_offset = 0;
-
3393 other.m_size = 0;
-
3394 other.m_reserved = 0;
-
3395 other.m_manage = true;
-
3396#if SET_FILE_OP_TIMES
-
3397 other.m_ctime = other.m_atime = other.m_mtime = time_point::now();
-
3398#endif
-
3399 }
+
3396
+
+
3402 memory_file& operator=(_Inout_ memory_file&& other) noexcept
+
3403 {
+
3404 if (this != std::addressof(other)) {
+
3405 *static_cast<basic_file*>(this) = std::move(other);
+
3406 if (m_manage && m_data)
+
3407 free(m_data);
+
3408 m_data = other.m_data;
+
3409 other.m_data = nullptr;
+
3410 m_offset = other.m_offset;
+
3411 other.m_offset = 0;
+
3412 m_size = other.m_size;
+
3413 other.m_size = 0;
+
3414 m_reserved = other.m_reserved;
+
3415 other.m_reserved = 0;
+
3416 m_manage = other.m_manage;
+
3417 other.m_manage = true;
+
3418#if SET_FILE_OP_TIMES
+
3419 m_ctime = other.m_ctime;
+
3420 m_atime = other.m_atime;
+
3421 m_mtime = other.m_mtime;
+
3422 other.m_ctime = other.m_atime = other.m_mtime = time_point::now();
+
3423#endif
+
3424 }
+
3425 return *this;
+
3426 }
-
3400
-
-
3406 memory_file& operator=(_Inout_ memory_file&& other) noexcept
-
3407 {
-
3408 if (this != std::addressof(other)) {
-
3409 *static_cast<basic_file*>(this) = std::move(other);
-
3410 if (m_manage && m_data)
-
3411 free(m_data);
-
3412 m_data = other.m_data;
-
3413 other.m_data = nullptr;
-
3414 m_offset = other.m_offset;
-
3415 other.m_offset = 0;
-
3416 m_size = other.m_size;
-
3417 other.m_size = 0;
-
3418 m_reserved = other.m_reserved;
-
3419 other.m_reserved = 0;
-
3420 m_manage = other.m_manage;
-
3421 other.m_manage = true;
-
3422#if SET_FILE_OP_TIMES
-
3423 m_ctime = other.m_ctime;
-
3424 m_atime = other.m_atime;
-
3425 m_mtime = other.m_mtime;
-
3426 other.m_ctime = other.m_atime = other.m_mtime = time_point::now();
-
3427#endif
-
3428 }
-
3429 return *this;
-
3430 }
-
-
3431
-
3432 virtual ~memory_file()
-
3433 {
-
3434 if (m_manage && m_data)
-
3435 free(m_data);
-
3436 }
-
3437
-
-
3444 void reserve(_In_ size_t required, _In_ bool tight = false) noexcept
-
3445 {
-
3446 if (required <= m_reserved && (!tight || required >= m_reserved)) {
-
3447 m_state = state_t::ok;
+
3427
+
3428 virtual ~memory_file()
+
3429 {
+
3430 if (m_manage && m_data)
+
3431 free(m_data);
+
3432 }
+
3433
+
+
3440 void reserve(_In_ size_t required, _In_ bool tight = false) noexcept
+
3441 {
+
3442 if (required <= m_reserved && (!tight || required >= m_reserved)) {
+
3443 m_state = state_t::ok;
+
3444 return;
+
3445 }
+
3446 if (!m_manage) {
+
3447 m_state = state_t::fail;
3448 return;
3449 }
-
3450 if (!m_manage) {
-
3451 m_state = state_t::fail;
-
3452 return;
-
3453 }
-
3454 size_t reserved = tight ? required : ((required + required / 4 + (default_block_size - 1)) / default_block_size) * default_block_size;
-
3455 auto data = reinterpret_cast<uint8_t*>(realloc(m_data, reserved));
-
3456 if (!data && reserved) _Unlikely_ {
-
3457 m_state = state_t::fail;
-
3458 return;
-
3459 }
-
3460 m_data = data;
-
3461 if (reserved < m_size)
-
3462 m_size = reserved;
-
3463 m_reserved = reserved;
-
3464 m_state = state_t::ok;
-
3465 }
+
3450 size_t reserved = tight ? required : ((required + required / 4 + (default_block_size - 1)) / default_block_size) * default_block_size;
+
3451 auto data = reinterpret_cast<uint8_t*>(realloc(m_data, reserved));
+
3452 if (!data && reserved) _Unlikely_ {
+
3453 m_state = state_t::fail;
+
3454 return;
+
3455 }
+
3456 m_data = data;
+
3457 if (reserved < m_size)
+
3458 m_size = reserved;
+
3459 m_reserved = reserved;
+
3460 m_state = state_t::ok;
+
3461 }
-
3466
-
-
3473 void load(_In_z_ const schar_t* filename, _In_ int mode)
-
3474 {
-
3475 file f(filename, (mode & ~hint_random_access) | mode_for_reading | hint_sequential_access);
-
3476 if (!f.ok()) {
-
3477 m_state = state_t::fail;
-
3478 return;
-
3479 }
-
3480 fsize_t size = f.size();
-
3481 if (size > SIZE_MAX) {
-
3482 m_state = state_t::fail;
+
3462
+
+
3469 void load(_In_z_ const schar_t* filename, _In_ int mode)
+
3470 {
+
3471 file f(filename, (mode & ~hint_random_access) | mode_for_reading | hint_sequential_access);
+
3472 if (!f.ok()) {
+
3473 m_state = state_t::fail;
+
3474 return;
+
3475 }
+
3476 fsize_t size = f.size();
+
3477 if (size > SIZE_MAX) {
+
3478 m_state = state_t::fail;
+
3479 return;
+
3480 }
+
3481 reserve(static_cast<size_t>(size), true);
+
3482 if (!ok()) _Unlikely_ {
3483 return;
3484 }
-
3485 reserve(static_cast<size_t>(size), true);
-
3486 if (!ok()) _Unlikely_ {
-
3487 return;
-
3488 }
-
3489 m_offset = m_size = 0;
-
3490 write_stream(f);
-
3491 if (ok())
-
3492 m_offset = 0;
-
3493#if SET_FILE_OP_TIMES
-
3494 m_ctime = f.ctime();
-
3495 m_atime = f.atime();
-
3496 m_mtime = f.mtime();
-
3497#endif
-
3498 }
+
3485 m_offset = m_size = 0;
+
3486 write_stream(f);
+
3487 if (ok())
+
3488 m_offset = 0;
+
3489#if SET_FILE_OP_TIMES
+
3490 m_ctime = f.ctime();
+
3491 m_atime = f.atime();
+
3492 m_mtime = f.mtime();
+
3493#endif
+
3494 }
-
3499
-
3506 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
-
-
3507 void load(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode)
-
3508 {
-
3509 load(filename.c_str(), mode);
-
3510 }
+
3495
+
3502 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
+
+
3503 void load(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode)
+
3504 {
+
3505 load(filename.c_str(), mode);
+
3506 }
-
3511
-
-
3518 void save(_In_z_ const schar_t* filename, _In_ int mode)
-
3519 {
-
3520 file f(filename, (mode & ~hint_random_access) | mode_for_writing | hint_sequential_access);
-
3521 if (!f.ok()) {
-
3522 m_state = state_t::fail;
-
3523 return;
-
3524 }
-
3525 f.write(m_data, m_size);
-
3526 if (!f.ok()) {
-
3527 m_state = state_t::fail;
-
3528 return;
-
3529 }
-
3530 f.truncate();
-
3531#if SET_FILE_OP_TIMES
-
3532 f.set_ctime(m_ctime);
-
3533 f.set_atime(m_atime);
-
3534 f.set_mtime(m_mtime);
-
3535#endif
-
3536 }
+
3507
+
+
3514 void save(_In_z_ const schar_t* filename, _In_ int mode)
+
3515 {
+
3516 file f(filename, (mode & ~hint_random_access) | mode_for_writing | hint_sequential_access);
+
3517 if (!f.ok()) {
+
3518 m_state = state_t::fail;
+
3519 return;
+
3520 }
+
3521 f.write(m_data, m_size);
+
3522 if (!f.ok()) {
+
3523 m_state = state_t::fail;
+
3524 return;
+
3525 }
+
3526 f.truncate();
+
3527#if SET_FILE_OP_TIMES
+
3528 f.set_ctime(m_ctime);
+
3529 f.set_atime(m_atime);
+
3530 f.set_mtime(m_mtime);
+
3531#endif
+
3532 }
-
3537
-
3544 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
-
-
3545 void save(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode)
-
3546 {
-
3547 save(filename.c_str(), mode);
-
3548 }
+
3533
+
3540 template <class TR = std::char_traits<schar_t>, class AX = std::allocator<schar_t>>
+
+
3541 void save(_In_ const std::basic_string<TR, AX>& filename, _In_ int mode)
+
3542 {
+
3543 save(filename.c_str(), mode);
+
3544 }
-
3549
-
3553 const void* data() const { return m_data; }
-
3554
-
-
3555 virtual _Success_(return != 0 || length == 0) size_t read(
-
3556 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
3557 {
-
3558 stdex_assert(data || !length);
-
3559#if SET_FILE_OP_TIMES
-
3560 m_atime = time_point::now();
-
3561#endif
-
3562 size_t available = m_size - m_offset;
-
3563 if (length <= available) {
-
3564 memcpy(data, m_data + m_offset, length);
-
3565 m_offset += length;
-
3566 m_state = state_t::ok;
-
3567 return length;
+
3545
+
3549 const void* data() const { return m_data; }
+
3550
+
+
3551 virtual _Success_(return != 0 || length == 0) size_t read(
+
3552 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
3553 {
+
3554 stdex_assert(data || !length);
+
3555#if SET_FILE_OP_TIMES
+
3556 m_atime = time_point::now();
+
3557#endif
+
3558 size_t available = m_size - m_offset;
+
3559 if (length <= available) {
+
3560 memcpy(data, m_data + m_offset, length);
+
3561 m_offset += length;
+
3562 m_state = state_t::ok;
+
3563 return length;
+
3564 }
+
3565 if (length && !available) {
+
3566 m_state = state_t::eof;
+
3567 return 0;
3568 }
-
3569 if (length && !available) {
-
3570 m_state = state_t::eof;
-
3571 return 0;
-
3572 }
-
3573 memcpy(data, m_data + m_offset, available);
-
3574 m_offset += available;
-
3575 m_state = state_t::ok;
-
3576 return available;
-
3577 }
+
3569 memcpy(data, m_data + m_offset, available);
+
3570 m_offset += available;
+
3571 m_state = state_t::ok;
+
3572 return available;
+
3573 }
-
3578
-
3593 template <class T>
-
-
3594 memory_file& read_data(_Out_ T& data)
-
3595 {
-
3596#if SET_FILE_OP_TIMES
-
3597 m_atime = time_point::now();
-
3598#endif
-
3599 if (CHECK_STREAM_STATE && !ok()) _Unlikely_ {
-
3600 data = 0;
-
3601 return *this;
-
3602 }
-
3603 size_t end_offset = m_offset + sizeof(T);
-
3604 if (end_offset <= m_size) {
-
3605 data = LE2HE(*reinterpret_cast<T*>(m_data + m_offset));
-
3606 m_offset = end_offset;
-
3607#if !CHECK_STREAM_STATE
-
3608 m_state = state_t::ok;
-
3609#endif
-
3610 }
-
3611 else {
-
3612 data = 0;
-
3613 m_offset = m_size;
-
3614 m_state = state_t::eof;
-
3615 }
-
3616 return *this;
-
3617 }
+
3574
+
3589 template <class T>
+
+
3590 memory_file& read_data(_Out_ T& data)
+
3591 {
+
3592#if SET_FILE_OP_TIMES
+
3593 m_atime = time_point::now();
+
3594#endif
+
3595 if (CHECK_STREAM_STATE && !ok()) _Unlikely_ {
+
3596 data = 0;
+
3597 return *this;
+
3598 }
+
3599 size_t end_offset = m_offset + sizeof(T);
+
3600 if (end_offset <= m_size) {
+
3601 data = LE2HE(*reinterpret_cast<T*>(m_data + m_offset));
+
3602 m_offset = end_offset;
+
3603#if !CHECK_STREAM_STATE
+
3604 m_state = state_t::ok;
+
3605#endif
+
3606 }
+
3607 else {
+
3608 data = 0;
+
3609 m_offset = m_size;
+
3610 m_state = state_t::eof;
+
3611 }
+
3612 return *this;
+
3613 }
-
3618
-
3633 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
-
3634 memory_file& read_str(_Inout_ std::basic_string<T, TR, AX>&data)
-
3635 {
-
3636#if SET_FILE_OP_TIMES
-
3637 m_atime = time_point::now();
-
3638#endif
-
3639 if (CHECK_STREAM_STATE && !ok()) _Unlikely_ {
-
3640 data.clear();
-
3641 return *this;
-
3642 }
-
3643 size_t end_offset = m_offset + sizeof(uint32_t);
-
3644 if (end_offset <= m_size) {
-
3645 uint32_t num_chars = LE2HE(*reinterpret_cast<uint32_t*>(m_data + m_offset));
-
3646 m_offset = end_offset;
-
3647 end_offset = stdex::add(m_offset, stdex::mul(num_chars, sizeof(T)));
-
3648 T* start = reinterpret_cast<T*>(m_data + m_offset);
-
3649 if (end_offset <= m_size) {
-
3650 data.assign(start, start + num_chars);
-
3651 m_offset = end_offset;
-
3652#if !CHECK_STREAM_STATE
-
3653 m_state = state_t::ok;
-
3654#endif
-
3655 return *this;
-
3656 }
-
3657 if (end_offset <= m_size)
-
3658 data.assign(start, reinterpret_cast<T*>(m_data + m_size));
-
3659 }
-
3660 m_offset = m_size;
-
3661 m_state = state_t::eof;
-
3662 return *this;
-
3663 }
+
3614
+
3629 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
+
3630 memory_file& read_str(_Inout_ std::basic_string<T, TR, AX>&data)
+
3631 {
+
3632#if SET_FILE_OP_TIMES
+
3633 m_atime = time_point::now();
+
3634#endif
+
3635 if (CHECK_STREAM_STATE && !ok()) _Unlikely_ {
+
3636 data.clear();
+
3637 return *this;
+
3638 }
+
3639 size_t end_offset = m_offset + sizeof(uint32_t);
+
3640 if (end_offset <= m_size) {
+
3641 uint32_t num_chars = LE2HE(*reinterpret_cast<uint32_t*>(m_data + m_offset));
+
3642 m_offset = end_offset;
+
3643 end_offset = stdex::add(m_offset, stdex::mul(num_chars, sizeof(T)));
+
3644 T* start = reinterpret_cast<T*>(m_data + m_offset);
+
3645 if (end_offset <= m_size) {
+
3646 data.assign(start, start + num_chars);
+
3647 m_offset = end_offset;
+
3648#if !CHECK_STREAM_STATE
+
3649 m_state = state_t::ok;
+
3650#endif
+
3651 return *this;
+
3652 }
+
3653 if (end_offset <= m_size)
+
3654 data.assign(start, reinterpret_cast<T*>(m_data + m_size));
+
3655 }
+
3656 m_offset = m_size;
+
3657 m_state = state_t::eof;
+
3658 return *this;
+
3659 }
-
3664
-
-
3665 virtual _Success_(return != 0) size_t write(
-
3666 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
3667 {
-
3668 stdex_assert(data || !length);
-
3669#if SET_FILE_OP_TIMES
-
3670 m_atime = m_mtime = time_point::now();
-
3671#endif
-
3672 size_t end_offset = m_offset + length;
-
3673 if (end_offset > m_reserved) {
-
3674 reserve(end_offset);
-
3675 if (!ok()) _Unlikely_
-
3676 return 0;
-
3677 }
-
3678 memcpy(m_data + m_offset, data, length);
-
3679 m_offset = end_offset;
-
3680 if (m_offset > m_size)
-
3681 m_size = m_offset;
-
3682 m_state = state_t::ok;
-
3683 return length;
-
3684 }
+
3660
+
+
3661 virtual _Success_(return != 0) size_t write(
+
3662 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
3663 {
+
3664 stdex_assert(data || !length);
+
3665#if SET_FILE_OP_TIMES
+
3666 m_atime = m_mtime = time_point::now();
+
3667#endif
+
3668 size_t end_offset = m_offset + length;
+
3669 if (end_offset > m_reserved) {
+
3670 reserve(end_offset);
+
3671 if (!ok()) _Unlikely_
+
3672 return 0;
+
3673 }
+
3674 memcpy(m_data + m_offset, data, length);
+
3675 m_offset = end_offset;
+
3676 if (m_offset > m_size)
+
3677 m_size = m_offset;
+
3678 m_state = state_t::ok;
+
3679 return length;
+
3680 }
-
3685
-
-
3689 void write_byte(_In_ uint8_t byte, _In_ size_t amount = 1)
-
3690 {
-
3691#if SET_FILE_OP_TIMES
-
3692 m_atime = m_mtime = time_point::now();
-
3693#endif
-
3694 size_t end_offset = m_offset + amount;
-
3695 if (end_offset > m_reserved) {
-
3696 reserve(end_offset);
-
3697 if (!ok()) _Unlikely_
-
3698 return;
-
3699 }
-
3700 memset(m_data + m_offset, byte, amount);
-
3701 m_offset = end_offset;
-
3702 if (m_offset > m_size)
-
3703 m_size = m_offset;
-
3704 m_state = state_t::ok;
-
3705 }
+
3681
+
+
3685 void write_byte(_In_ uint8_t byte, _In_ size_t amount = 1)
+
3686 {
+
3687#if SET_FILE_OP_TIMES
+
3688 m_atime = m_mtime = time_point::now();
+
3689#endif
+
3690 size_t end_offset = m_offset + amount;
+
3691 if (end_offset > m_reserved) {
+
3692 reserve(end_offset);
+
3693 if (!ok()) _Unlikely_
+
3694 return;
+
3695 }
+
3696 memset(m_data + m_offset, byte, amount);
+
3697 m_offset = end_offset;
+
3698 if (m_offset > m_size)
+
3699 m_size = m_offset;
+
3700 m_state = state_t::ok;
+
3701 }
-
3706
-
3721 template <class T>
-
- -
3723 {
-
3724#if SET_FILE_OP_TIMES
-
3725 m_atime = m_mtime = time_point::now();
-
3726#endif
-
3727 if (CHECK_STREAM_STATE && !ok()) _Unlikely_
-
3728 return *this;
-
3729 size_t end_offset = m_offset + sizeof(T);
-
3730 if (end_offset > m_reserved) {
-
3731 reserve(end_offset);
-
3732 if (!ok()) _Unlikely_
-
3733 return *this;
-
3734 }
-
3735 (*reinterpret_cast<T*>(m_data + m_offset)) = HE2LE(data);
-
3736 m_offset = end_offset;
-
3737 if (m_offset > m_size)
-
3738 m_size = m_offset;
-
3739#if !CHECK_STREAM_STATE
-
3740 m_state = state_t::ok;
-
3741#endif
-
3742 return *this;
-
3743 }
+
3702
+
3717 template <class T>
+
+ +
3719 {
+
3720#if SET_FILE_OP_TIMES
+
3721 m_atime = m_mtime = time_point::now();
+
3722#endif
+
3723 if (CHECK_STREAM_STATE && !ok()) _Unlikely_
+
3724 return *this;
+
3725 size_t end_offset = m_offset + sizeof(T);
+
3726 if (end_offset > m_reserved) {
+
3727 reserve(end_offset);
+
3728 if (!ok()) _Unlikely_
+
3729 return *this;
+
3730 }
+
3731 (*reinterpret_cast<T*>(m_data + m_offset)) = HE2LE(data);
+
3732 m_offset = end_offset;
+
3733 if (m_offset > m_size)
+
3734 m_size = m_offset;
+
3735#if !CHECK_STREAM_STATE
+
3736 m_state = state_t::ok;
+
3737#endif
+
3738 return *this;
+
3739 }
-
3744
-
3759 template <class T>
-
-
3760 memory_file& write_str(_In_z_ const T * data)
-
3761 {
-
3762#if SET_FILE_OP_TIMES
-
3763 m_atime = m_mtime = time_point::now();
-
3764#endif
-
3765 if (CHECK_STREAM_STATE && !ok()) _Unlikely_
-
3766 return *this;
-
3767 size_t num_chars = stdex::strlen(data);
-
3768 if (num_chars > UINT32_MAX)
-
3769 throw std::invalid_argument("string too long");
-
3770 size_t size_chars = num_chars * sizeof(T);
-
3771 size_t size = sizeof(uint32_t) + size_chars;
-
3772 size_t end_offset = m_offset + size;
-
3773 if (end_offset > m_reserved) {
-
3774 reserve(end_offset);
-
3775 if (!ok()) _Unlikely_
-
3776 return *this;
-
3777 }
-
3778 auto p = m_data + m_offset;
-
3779 *reinterpret_cast<uint32_t*>(p) = HE2LE((uint32_t)num_chars);
-
3780 memcpy(p + sizeof(uint32_t), data, size_chars);
-
3781 m_offset = end_offset;
-
3782 if (m_offset > m_size)
-
3783 m_size = m_offset;
-
3784#if !CHECK_STREAM_STATE
-
3785 m_state = state_t::ok;
-
3786#endif
-
3787 return *this;
-
3788 }
+
3740
+
3755 template <class T>
+
+
3756 memory_file& write_str(_In_z_ const T * data)
+
3757 {
+
3758#if SET_FILE_OP_TIMES
+
3759 m_atime = m_mtime = time_point::now();
+
3760#endif
+
3761 if (CHECK_STREAM_STATE && !ok()) _Unlikely_
+
3762 return *this;
+
3763 size_t num_chars = stdex::strlen(data);
+
3764 if (num_chars > UINT32_MAX)
+
3765 throw std::invalid_argument("string too long");
+
3766 size_t size_chars = num_chars * sizeof(T);
+
3767 size_t size = sizeof(uint32_t) + size_chars;
+
3768 size_t end_offset = m_offset + size;
+
3769 if (end_offset > m_reserved) {
+
3770 reserve(end_offset);
+
3771 if (!ok()) _Unlikely_
+
3772 return *this;
+
3773 }
+
3774 auto p = m_data + m_offset;
+
3775 *reinterpret_cast<uint32_t*>(p) = HE2LE((uint32_t)num_chars);
+
3776 memcpy(p + sizeof(uint32_t), data, size_chars);
+
3777 m_offset = end_offset;
+
3778 if (m_offset > m_size)
+
3779 m_size = m_offset;
+
3780#if !CHECK_STREAM_STATE
+
3781 m_state = state_t::ok;
+
3782#endif
+
3783 return *this;
+
3784 }
-
3789
-
3804 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
-
3805 memory_file& write_str(_In_ const std::basic_string<T, TR, AX>& data)
-
3806 {
-
3807#if SET_FILE_OP_TIMES
-
3808 m_atime = m_mtime = time_point::now();
-
3809#endif
-
3810 if (CHECK_STREAM_STATE && !ok()) _Unlikely_
-
3811 return *this;
-
3812 size_t num_chars = data.size();
-
3813 if (num_chars > UINT32_MAX)
-
3814 throw std::invalid_argument("string too long");
-
3815 size_t size_chars = num_chars * sizeof(T);
-
3816 size_t size = sizeof(uint32_t) + size_chars;
-
3817 size_t end_offset = m_offset + size;
-
3818 if (end_offset > m_reserved) {
-
3819 reserve(end_offset);
-
3820 if (!ok()) _Unlikely_
-
3821 return *this;
-
3822 }
-
3823 auto p = m_data + m_offset;
-
3824 *reinterpret_cast<uint32_t*>(p) = HE2LE((uint32_t)num_chars);
-
3825 memcpy(p + sizeof(uint32_t), data.data(), size_chars);
-
3826 m_offset = end_offset;
-
3827 if (m_offset > m_size)
-
3828 m_size = m_offset;
-
3829#if !CHECK_STREAM_STATE
-
3830 m_state = state_t::ok;
-
3831#endif
-
3832 return *this;
-
3833 }
+
3785
+
3800 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
+
3801 memory_file& write_str(_In_ const std::basic_string<T, TR, AX>& data)
+
3802 {
+
3803#if SET_FILE_OP_TIMES
+
3804 m_atime = m_mtime = time_point::now();
+
3805#endif
+
3806 if (CHECK_STREAM_STATE && !ok()) _Unlikely_
+
3807 return *this;
+
3808 size_t num_chars = data.size();
+
3809 if (num_chars > UINT32_MAX)
+
3810 throw std::invalid_argument("string too long");
+
3811 size_t size_chars = num_chars * sizeof(T);
+
3812 size_t size = sizeof(uint32_t) + size_chars;
+
3813 size_t end_offset = m_offset + size;
+
3814 if (end_offset > m_reserved) {
+
3815 reserve(end_offset);
+
3816 if (!ok()) _Unlikely_
+
3817 return *this;
+
3818 }
+
3819 auto p = m_data + m_offset;
+
3820 *reinterpret_cast<uint32_t*>(p) = HE2LE((uint32_t)num_chars);
+
3821 memcpy(p + sizeof(uint32_t), data.data(), size_chars);
+
3822 m_offset = end_offset;
+
3823 if (m_offset > m_size)
+
3824 m_size = m_offset;
+
3825#if !CHECK_STREAM_STATE
+
3826 m_state = state_t::ok;
+
3827#endif
+
3828 return *this;
+
3829 }
-
3834
-
-
3840 size_t write_stream(_Inout_ basic & stream, _In_ size_t amount = SIZE_MAX)
-
3841 {
-
3842#if SET_FILE_OP_TIMES
-
3843 m_atime = m_mtime = time_point::now();
-
3844#endif
-
3845 size_t num_read, dst_offset = m_offset, dst_size = m_offset;
-
3846 size_t num_copied = 0, to_write = amount;
-
3847 m_state = state_t::ok;
-
3848 if (amount != SIZE_MAX) {
-
3849 dst_size = stdex::add(dst_size, amount);
-
3850 reserve(dst_size);
-
3851 if (!ok()) _Unlikely_
-
3852 return 0;
-
3853 while (to_write) {
-
3854 num_read = stream.read(m_data + dst_offset, to_write);
-
3855 /*dst_size =*/ dst_offset += num_read;
-
3856 num_copied += num_read;
-
3857 to_write -= num_read;
-
3858 if (!stream.ok()) {
-
3859 if (stream.state() != state_t::eof)
-
3860 m_state = state_t::fail;
-
3861 break;
-
3862 }
-
3863 };
-
3864 }
-
3865 else {
-
3866 size_t block_size;
-
3867 while (to_write) {
-
3868 block_size = std::min(to_write, default_block_size);
-
3869 dst_size = stdex::add(dst_size, block_size);
-
3870 reserve(dst_size);
-
3871 if (!ok()) _Unlikely_
-
3872 break;
-
3873 num_read = stream.read(m_data + dst_offset, block_size);
-
3874 dst_size = dst_offset += num_read;
-
3875 num_copied += num_read;
-
3876 to_write -= num_read;
-
3877 if (!stream.ok()) {
-
3878 if (stream.state() != state_t::eof)
-
3879 m_state = state_t::fail;
-
3880 break;
-
3881 }
-
3882 };
-
3883 }
-
3884 m_offset = dst_offset;
-
3885 if (m_offset > m_size)
-
3886 m_size = m_offset;
-
3887 return num_copied;
-
3888 }
+
3830
+
+
3836 size_t write_stream(_Inout_ basic & stream, _In_ size_t amount = SIZE_MAX)
+
3837 {
+
3838#if SET_FILE_OP_TIMES
+
3839 m_atime = m_mtime = time_point::now();
+
3840#endif
+
3841 size_t num_read, dst_offset = m_offset, dst_size = m_offset;
+
3842 size_t num_copied = 0, to_write = amount;
+
3843 m_state = state_t::ok;
+
3844 if (amount != SIZE_MAX) {
+
3845 dst_size = stdex::add(dst_size, amount);
+
3846 reserve(dst_size);
+
3847 if (!ok()) _Unlikely_
+
3848 return 0;
+
3849 while (to_write) {
+
3850 num_read = stream.read(m_data + dst_offset, to_write);
+
3851 /*dst_size =*/ dst_offset += num_read;
+
3852 num_copied += num_read;
+
3853 to_write -= num_read;
+
3854 if (!stream.ok()) {
+
3855 if (stream.state() != state_t::eof)
+
3856 m_state = state_t::fail;
+
3857 break;
+
3858 }
+
3859 };
+
3860 }
+
3861 else {
+
3862 size_t block_size;
+
3863 while (to_write) {
+
3864 block_size = std::min(to_write, default_block_size);
+
3865 dst_size = stdex::add(dst_size, block_size);
+
3866 reserve(dst_size);
+
3867 if (!ok()) _Unlikely_
+
3868 break;
+
3869 num_read = stream.read(m_data + dst_offset, block_size);
+
3870 dst_size = dst_offset += num_read;
+
3871 num_copied += num_read;
+
3872 to_write -= num_read;
+
3873 if (!stream.ok()) {
+
3874 if (stream.state() != state_t::eof)
+
3875 m_state = state_t::fail;
+
3876 break;
+
3877 }
+
3878 };
+
3879 }
+
3880 m_offset = dst_offset;
+
3881 if (m_offset > m_size)
+
3882 m_size = m_offset;
+
3883 return num_copied;
+
3884 }
-
3889
-
-
3890 virtual void close()
-
3891 {
-
3892 if (m_manage && m_data)
-
3893 free(m_data);
-
3894 m_data = nullptr;
-
3895 m_manage = true;
-
3896 m_offset = 0;
-
3897 m_size = m_reserved = 0;
-
3898#if SET_FILE_OP_TIMES
-
3899 m_ctime = m_atime = m_mtime = time_point::min();
-
3900#endif
-
3901 m_state = state_t::ok;
-
3902 }
+
3885
+
+
3886 virtual void close()
+
3887 {
+
3888 if (m_manage && m_data)
+
3889 free(m_data);
+
3890 m_data = nullptr;
+
3891 m_manage = true;
+
3892 m_offset = 0;
+
3893 m_size = m_reserved = 0;
+
3894#if SET_FILE_OP_TIMES
+
3895 m_ctime = m_atime = m_mtime = time_point::min();
+
3896#endif
+
3897 m_state = state_t::ok;
+
3898 }
-
3903
-
-
3904 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
-
3905 {
-
3906 switch (how) {
-
3907 case seek_t::beg: break;
-
3908 case seek_t::cur: offset = static_cast<foff_t>(m_offset) + offset; break;
-
3909 case seek_t::end: offset = static_cast<foff_t>(m_size) + offset; break;
-
3910 default: throw std::invalid_argument("unknown seek origin");
-
3911 }
-
3912 if (offset < 0) _Unlikely_
-
3913 throw std::invalid_argument("negative file offset");
-
3914 if (static_cast<fpos_t>(offset) > SIZE_MAX) _Unlikely_
-
3915 throw std::invalid_argument("file offset too big");
-
3916 m_state = state_t::ok;
-
3917 return m_offset = static_cast<size_t>(offset);
-
3918 }
+
3899
+
+
3900 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
+
3901 {
+
3902 switch (how) {
+
3903 case seek_t::beg: break;
+
3904 case seek_t::cur: offset = static_cast<foff_t>(m_offset) + offset; break;
+
3905 case seek_t::end: offset = static_cast<foff_t>(m_size) + offset; break;
+
3906 default: throw std::invalid_argument("unknown seek origin");
+
3907 }
+
3908 if (offset < 0) _Unlikely_
+
3909 throw std::invalid_argument("negative file offset");
+
3910 if (static_cast<fpos_t>(offset) > SIZE_MAX) _Unlikely_
+
3911 throw std::invalid_argument("file offset too big");
+
3912 m_state = state_t::ok;
+
3913 return m_offset = static_cast<size_t>(offset);
+
3914 }
-
3919
-
-
3920 virtual fpos_t tell() const
-
3921 {
-
3922 return m_offset;
-
3923 }
+
3915
+
+
3916 virtual fpos_t tell() const
+
3917 {
+
3918 return m_offset;
+
3919 }
-
3924
-
-
3925 virtual fsize_t size() const
-
3926 {
-
3927 return m_size;
-
3928 }
+
3920
+
+
3921 virtual fsize_t size() const
+
3922 {
+
3923 return m_size;
+
3924 }
-
3929
-
-
3930 virtual void truncate()
-
3931 {
-
3932#if SET_FILE_OP_TIMES
-
3933 m_atime = m_mtime = time_point::now();
-
3934#endif
-
3935 m_size = m_offset;
-
3936 reserve(m_offset);
-
3937 }
+
3925
+
+
3926 virtual void truncate()
+
3927 {
+
3928#if SET_FILE_OP_TIMES
+
3929 m_atime = m_mtime = time_point::now();
+
3930#endif
+
3931 m_size = m_offset;
+
3932 reserve(m_offset);
+
3933 }
-
3938
-
3939#if SET_FILE_OP_TIMES
-
3940 virtual time_point ctime() const
-
3941 {
-
3942 return m_ctime;
-
3943 }
-
3944
-
3945 virtual time_point atime() const
-
3946 {
-
3947 return m_atime;
-
3948 }
-
3949
-
3950 virtual time_point mtime() const
-
3951 {
-
3952 return m_mtime;
-
3953 }
-
3954
-
3955 virtual void set_ctime(time_point date)
-
3956 {
-
3957 m_ctime = date;
-
3958 }
-
3959
-
3960 virtual void set_atime(time_point date)
-
3961 {
-
3962 m_atime = date;
-
3963 }
-
3964
-
3965 virtual void set_mtime(time_point date)
-
3966 {
-
3967 m_mtime = date;
-
3968 }
-
3969#endif
-
3970
-
3971 protected:
-
3979 template <class T>
-
-
3980 void set(_In_ fpos_t offset, _In_ const T data)
-
3981 {
-
3982#if SET_FILE_OP_TIMES
-
3983 m_atime = m_mtime = time_point::now();
-
3984#endif
-
3985 stdex_assert(offset + sizeof(T) < m_size);
-
3986 (*reinterpret_cast<T*>(m_data + offset)) = HE2LE(data);
-
3987 }
+
3934
+
3935#if SET_FILE_OP_TIMES
+
3936 virtual time_point ctime() const
+
3937 {
+
3938 return m_ctime;
+
3939 }
+
3940
+
3941 virtual time_point atime() const
+
3942 {
+
3943 return m_atime;
+
3944 }
+
3945
+
3946 virtual time_point mtime() const
+
3947 {
+
3948 return m_mtime;
+
3949 }
+
3950
+
3951 virtual void set_ctime(time_point date)
+
3952 {
+
3953 m_ctime = date;
+
3954 }
+
3955
+
3956 virtual void set_atime(time_point date)
+
3957 {
+
3958 m_atime = date;
+
3959 }
+
3960
+
3961 virtual void set_mtime(time_point date)
+
3962 {
+
3963 m_mtime = date;
+
3964 }
+
3965#endif
+
3966
+
3967 protected:
+
3975 template <class T>
+
+
3976 void set(_In_ fpos_t offset, _In_ const T data)
+
3977 {
+
3978#if SET_FILE_OP_TIMES
+
3979 m_atime = m_mtime = time_point::now();
+
3980#endif
+
3981 stdex_assert(offset + sizeof(T) < m_size);
+
3982 (*reinterpret_cast<T*>(m_data + offset)) = HE2LE(data);
+
3983 }
-
3988
-
3989 public:
-
3990 void set(_In_ fpos_t offset, _In_ const int8_t data) { set<int8_t>(offset, data); }
-
3991 void set(_In_ fpos_t offset, _In_ const int16_t data) { set<int16_t>(offset, data); }
-
3992 void set(_In_ fpos_t offset, _In_ const int32_t data) { set<int32_t>(offset, data); }
-
3993 void set(_In_ fpos_t offset, _In_ const int64_t data) { set<int64_t>(offset, data); }
-
3994 void set(_In_ fpos_t offset, _In_ const uint8_t data) { set<uint8_t>(offset, data); }
-
3995 void set(_In_ fpos_t offset, _In_ const uint16_t data) { set<uint16_t>(offset, data); }
-
3996 void set(_In_ fpos_t offset, _In_ const uint32_t data) { set<uint32_t>(offset, data); }
-
3997 void set(_In_ fpos_t offset, _In_ const uint64_t data) { set<uint64_t>(offset, data); }
-
3998 void set(_In_ fpos_t offset, _In_ const float data) { set<float>(offset, data); }
-
3999 void set(_In_ fpos_t offset, _In_ const double data) { set<double>(offset, data); }
-
4000 void set(_In_ fpos_t offset, _In_ const char data) { set<char>(offset, data); }
-
4001#ifdef _NATIVE_WCHAR_T_DEFINED
-
4002 void set(_In_ fpos_t offset, _In_ const wchar_t data) { set<wchar_t>(offset, data); }
-
4003#endif
-
4004
-
4012 protected:
-
4013 template <class T>
-
-
4014 void get(_In_ fpos_t offset, _Out_ T & data)
-
4015 {
-
4016 stdex_assert(offset + sizeof(T) < m_size);
-
4017 data = LE2HE(*(T*)(m_data + offset));
-
4018#if SET_FILE_OP_TIMES
-
4019 m_atime = time_point::now();
-
4020#endif
-
4021 }
+
3984
+
3985 public:
+
3986 void set(_In_ fpos_t offset, _In_ const int8_t data) { set<int8_t>(offset, data); }
+
3987 void set(_In_ fpos_t offset, _In_ const int16_t data) { set<int16_t>(offset, data); }
+
3988 void set(_In_ fpos_t offset, _In_ const int32_t data) { set<int32_t>(offset, data); }
+
3989 void set(_In_ fpos_t offset, _In_ const int64_t data) { set<int64_t>(offset, data); }
+
3990 void set(_In_ fpos_t offset, _In_ const uint8_t data) { set<uint8_t>(offset, data); }
+
3991 void set(_In_ fpos_t offset, _In_ const uint16_t data) { set<uint16_t>(offset, data); }
+
3992 void set(_In_ fpos_t offset, _In_ const uint32_t data) { set<uint32_t>(offset, data); }
+
3993 void set(_In_ fpos_t offset, _In_ const uint64_t data) { set<uint64_t>(offset, data); }
+
3994 void set(_In_ fpos_t offset, _In_ const float data) { set<float>(offset, data); }
+
3995 void set(_In_ fpos_t offset, _In_ const double data) { set<double>(offset, data); }
+
3996 void set(_In_ fpos_t offset, _In_ const char data) { set<char>(offset, data); }
+
3997#ifdef _NATIVE_WCHAR_T_DEFINED
+
3998 void set(_In_ fpos_t offset, _In_ const wchar_t data) { set<wchar_t>(offset, data); }
+
3999#endif
+
4000
+
4008 protected:
+
4009 template <class T>
+
+
4010 void get(_In_ fpos_t offset, _Out_ T & data)
+
4011 {
+
4012 stdex_assert(offset + sizeof(T) < m_size);
+
4013 data = LE2HE(*(T*)(m_data + offset));
+
4014#if SET_FILE_OP_TIMES
+
4015 m_atime = time_point::now();
+
4016#endif
+
4017 }
-
4022
-
4023 public:
-
4024 void get(_In_ fpos_t offset, _Out_ int8_t & data) { get<int8_t>(offset, data); }
-
4025 void get(_In_ fpos_t offset, _Out_ int16_t & data) { get<int16_t>(offset, data); }
-
4026 void get(_In_ fpos_t offset, _Out_ int32_t & data) { get<int32_t>(offset, data); }
-
4027 void get(_In_ fpos_t offset, _Out_ int64_t & data) { get<int64_t>(offset, data); }
-
4028 void get(_In_ fpos_t offset, _Out_ uint8_t & data) { get<uint8_t>(offset, data); }
-
4029 void get(_In_ fpos_t offset, _Out_ uint16_t & data) { get<uint16_t>(offset, data); }
-
4030 void get(_In_ fpos_t offset, _Out_ uint32_t & data) { get<uint32_t>(offset, data); }
-
4031 void get(_In_ fpos_t offset, _Out_ uint64_t & data) { get<uint64_t>(offset, data); }
-
4032 void get(_In_ fpos_t offset, _Out_ float& data) { get<float>(offset, data); }
-
4033 void get(_In_ fpos_t offset, _Out_ double& data) { get<double>(offset, data); }
-
4034 void get(_In_ fpos_t offset, _Out_ char& data) { get<char>(offset, data); }
-
4035#ifdef _NATIVE_WCHAR_T_DEFINED
-
4036 void get(_In_ fpos_t offset, _Out_ wchar_t& data) { get<wchar_t>(offset, data); }
-
4037#endif
-
4038
-
4039 memory_file& operator <<(_In_ const int8_t data) { return write_data(data); }
-
4040 memory_file& operator >>(_Out_ int8_t & data) { return read_data(data); }
-
4041 memory_file& operator <<(_In_ const int16_t data) { return write_data(data); }
-
4042 memory_file& operator >>(_Out_ int16_t & data) { return read_data(data); }
-
4043 memory_file& operator <<(_In_ const int32_t data) { return write_data(data); }
-
4044 memory_file& operator >>(_Out_ int32_t & data) { return read_data(data); }
-
4045 memory_file& operator <<(_In_ const int64_t data) { return write_data(data); }
-
4046 memory_file& operator >>(_Out_ int64_t & data) { return read_data(data); }
-
4047 memory_file& operator <<(_In_ const uint8_t data) { return write_data(data); }
-
4048 memory_file& operator >>(_Out_ uint8_t & data) { return read_data(data); }
-
4049 memory_file& operator <<(_In_ const uint16_t data) { return write_data(data); }
-
4050 memory_file& operator >>(_Out_ uint16_t & data) { return read_data(data); }
-
4051 memory_file& operator <<(_In_ const uint32_t data) { return write_data(data); }
-
4052 memory_file& operator >>(_Out_ uint32_t & data) { return read_data(data); }
-
4053 memory_file& operator <<(_In_ const uint64_t data) { return write_data(data); }
-
4054 memory_file& operator >>(_Out_ uint64_t & data) { return read_data(data); }
-
4055 memory_file& operator <<(_In_ const float data) { return write_data(data); }
-
4056 memory_file& operator >>(_Out_ float& data) { return read_data(data); }
-
4057 memory_file& operator <<(_In_ const double data) { return write_data(data); }
-
4058 memory_file& operator >>(_Out_ double& data) { return read_data(data); }
-
4059 memory_file& operator <<(_In_ const char data) { return write_data(data); }
-
4060 memory_file& operator >>(_Out_ char& data) { return read_data(data); }
-
4061#ifdef _NATIVE_WCHAR_T_DEFINED
-
4062 memory_file& operator <<(_In_ const wchar_t data) { return write_data(data); }
-
4063 memory_file& operator >>(_Out_ wchar_t& data) { return read_data(data); }
-
4064#endif
+
4018
+
4019 public:
+
4020 void get(_In_ fpos_t offset, _Out_ int8_t & data) { get<int8_t>(offset, data); }
+
4021 void get(_In_ fpos_t offset, _Out_ int16_t & data) { get<int16_t>(offset, data); }
+
4022 void get(_In_ fpos_t offset, _Out_ int32_t & data) { get<int32_t>(offset, data); }
+
4023 void get(_In_ fpos_t offset, _Out_ int64_t & data) { get<int64_t>(offset, data); }
+
4024 void get(_In_ fpos_t offset, _Out_ uint8_t & data) { get<uint8_t>(offset, data); }
+
4025 void get(_In_ fpos_t offset, _Out_ uint16_t & data) { get<uint16_t>(offset, data); }
+
4026 void get(_In_ fpos_t offset, _Out_ uint32_t & data) { get<uint32_t>(offset, data); }
+
4027 void get(_In_ fpos_t offset, _Out_ uint64_t & data) { get<uint64_t>(offset, data); }
+
4028 void get(_In_ fpos_t offset, _Out_ float& data) { get<float>(offset, data); }
+
4029 void get(_In_ fpos_t offset, _Out_ double& data) { get<double>(offset, data); }
+
4030 void get(_In_ fpos_t offset, _Out_ char& data) { get<char>(offset, data); }
+
4031#ifdef _NATIVE_WCHAR_T_DEFINED
+
4032 void get(_In_ fpos_t offset, _Out_ wchar_t& data) { get<wchar_t>(offset, data); }
+
4033#endif
+
4034
+
4035 memory_file& operator <<(_In_ const int8_t data) { return write_data(data); }
+
4036 memory_file& operator >>(_Out_ int8_t & data) { return read_data(data); }
+
4037 memory_file& operator <<(_In_ const int16_t data) { return write_data(data); }
+
4038 memory_file& operator >>(_Out_ int16_t & data) { return read_data(data); }
+
4039 memory_file& operator <<(_In_ const int32_t data) { return write_data(data); }
+
4040 memory_file& operator >>(_Out_ int32_t & data) { return read_data(data); }
+
4041 memory_file& operator <<(_In_ const int64_t data) { return write_data(data); }
+
4042 memory_file& operator >>(_Out_ int64_t & data) { return read_data(data); }
+
4043 memory_file& operator <<(_In_ const uint8_t data) { return write_data(data); }
+
4044 memory_file& operator >>(_Out_ uint8_t & data) { return read_data(data); }
+
4045 memory_file& operator <<(_In_ const uint16_t data) { return write_data(data); }
+
4046 memory_file& operator >>(_Out_ uint16_t & data) { return read_data(data); }
+
4047 memory_file& operator <<(_In_ const uint32_t data) { return write_data(data); }
+
4048 memory_file& operator >>(_Out_ uint32_t & data) { return read_data(data); }
+
4049 memory_file& operator <<(_In_ const uint64_t data) { return write_data(data); }
+
4050 memory_file& operator >>(_Out_ uint64_t & data) { return read_data(data); }
+
4051 memory_file& operator <<(_In_ const float data) { return write_data(data); }
+
4052 memory_file& operator >>(_Out_ float& data) { return read_data(data); }
+
4053 memory_file& operator <<(_In_ const double data) { return write_data(data); }
+
4054 memory_file& operator >>(_Out_ double& data) { return read_data(data); }
+
4055 memory_file& operator <<(_In_ const char data) { return write_data(data); }
+
4056 memory_file& operator >>(_Out_ char& data) { return read_data(data); }
+
4057#ifdef _NATIVE_WCHAR_T_DEFINED
+
4058 memory_file& operator <<(_In_ const wchar_t data) { return write_data(data); }
+
4059 memory_file& operator >>(_Out_ wchar_t& data) { return read_data(data); }
+
4060#endif
+
4061 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
+
4062 memory_file& operator >>(_Out_ std::basic_string<T, TR, AX>&data) { return read_str(data); }
+
4063 template <class T>
+
4064 memory_file& operator <<(_In_ const T * data) { return write_str(data); }
4065 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
4066 memory_file& operator >>(_Out_ std::basic_string<T, TR, AX>&data) { return read_str(data); }
-
4067 template <class T>
-
4068 memory_file& operator <<(_In_ const T * data) { return write_str(data); }
-
4069 template<class T, class TR = std::char_traits<T>, class AX = std::allocator<T>>
-
4070 memory_file& operator <<(_In_ const std::basic_string<T, TR, AX>& data) { return write_str(data); }
-
4071
-
4072 protected:
-
4073 uint8_t* m_data;
- -
4075 size_t m_offset;
-
4076 size_t m_size;
-
4077 size_t m_reserved;
-
4078#if SET_FILE_OP_TIMES
-
4079 time_point
-
4080 m_ctime,
-
4081 m_atime,
-
4082 m_mtime;
-
4083#endif
-
4084 };
+
4066 memory_file& operator <<(_In_ const std::basic_string<T, TR, AX>& data) { return write_str(data); }
+
4067
+
4068 protected:
+
4069 uint8_t* m_data;
+ +
4071 size_t m_offset;
+
4072 size_t m_size;
+
4073 size_t m_reserved;
+
4074#if SET_FILE_OP_TIMES
+
4075 time_point
+
4076 m_ctime,
+
4077 m_atime,
+
4078 m_mtime;
+
4079#endif
+
4080 };
-
4085
-
-
4089 class fifo : public basic {
-
4090 public:
-
4091 fifo() :
-
4092 m_offset(0),
-
4093 m_size(0),
-
4094 m_head(nullptr),
-
4095 m_tail(nullptr)
-
4096 {}
-
4097
-
4098 virtual ~fifo()
-
4099 {
-
4100 while (m_head) {
-
4101 auto p = m_head;
-
4102 m_head = p->next;
-
4103 delete p;
-
4104 }
-
4105 }
-
4106
-
4107#pragma warning(suppress: 6101) // See [2] below
-
-
4108 virtual _Success_(return != 0 || length == 0) size_t read(
-
4109 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
4110 {
-
4111 stdex_assert(data || !length);
-
4112 for (size_t to_read = length;;) {
-
4113 if (!m_head) _Unlikely_ {
-
4114 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
-
4115 return length - to_read; // [2] Code analysis misses `length - to_read` bytes were written to data in previous loop iterations.
-
4116 }
-
4117 size_t remaining = m_head->size - m_offset;
-
4118 if (remaining > to_read) {
-
4119 memcpy(data, m_head->data + m_offset, to_read);
-
4120 m_offset += to_read;
-
4121 m_size -= to_read;
-
4122 m_state = state_t::ok;
-
4123 return length;
-
4124 }
-
4125 memcpy(data, m_head->data + m_offset, remaining);
-
4126 m_offset = 0;
-
4127 m_size -= remaining;
-
4128 reinterpret_cast<uint8_t*&>(data) += remaining;
-
4129 to_read -= remaining;
-
4130 auto p = m_head;
-
4131 m_head = p->next;
-
4132 delete p;
-
4133 }
-
4134 }
+
4081
+
+
4085 class fifo : public basic {
+
4086 public:
+
4087 fifo() :
+
4088 m_offset(0),
+
4089 m_size(0),
+
4090 m_head(nullptr),
+
4091 m_tail(nullptr)
+
4092 {}
+
4093
+
4094 virtual ~fifo()
+
4095 {
+
4096 while (m_head) {
+
4097 auto p = m_head;
+
4098 m_head = p->next;
+
4099 delete p;
+
4100 }
+
4101 }
+
4102
+
4103#pragma warning(suppress: 6101) // See [2] below
+
+
4104 virtual _Success_(return != 0 || length == 0) size_t read(
+
4105 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
4106 {
+
4107 stdex_assert(data || !length);
+
4108 for (size_t to_read = length;;) {
+
4109 if (!m_head) _Unlikely_ {
+
4110 m_state = to_read < length || !length ? state_t::ok : state_t::eof;
+
4111 return length - to_read; // [2] Code analysis misses `length - to_read` bytes were written to data in previous loop iterations.
+
4112 }
+
4113 size_t remaining = m_head->size - m_offset;
+
4114 if (remaining > to_read) {
+
4115 memcpy(data, m_head->data + m_offset, to_read);
+
4116 m_offset += to_read;
+
4117 m_size -= to_read;
+
4118 m_state = state_t::ok;
+
4119 return length;
+
4120 }
+
4121 memcpy(data, m_head->data + m_offset, remaining);
+
4122 m_offset = 0;
+
4123 m_size -= remaining;
+
4124 reinterpret_cast<uint8_t*&>(data) += remaining;
+
4125 to_read -= remaining;
+
4126 auto p = m_head;
+
4127 m_head = p->next;
+
4128 delete p;
+
4129 }
+
4130 }
-
4135
-
-
4136 virtual _Success_(return != 0) size_t write(
-
4137 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
4138 {
-
4139 stdex_assert(data || !length);
-
4140 try {
-
4141 std::unique_ptr<node_t> n(reinterpret_cast<node_t*>(new uint8_t[sizeof(node_t) + length]));
-
4142 n->next = nullptr;
-
4143 n->size = length;
-
4144 memcpy(n->data, data, length);
-
4145 m_size += length;
-
4146 if (m_head)
-
4147 m_tail = m_tail->next = n.release();
-
4148 else
-
4149 m_head = m_tail = n.release();
-
4150 m_state = state_t::ok;
-
4151 return length;
+
4131
+
+
4132 virtual _Success_(return != 0) size_t write(
+
4133 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
4134 {
+
4135 stdex_assert(data || !length);
+
4136 try {
+
4137 std::unique_ptr<node_t> n(reinterpret_cast<node_t*>(new uint8_t[sizeof(node_t) + length]));
+
4138 n->next = nullptr;
+
4139 n->size = length;
+
4140 memcpy(n->data, data, length);
+
4141 m_size += length;
+
4142 if (m_head)
+
4143 m_tail = m_tail->next = n.release();
+
4144 else
+
4145 m_head = m_tail = n.release();
+
4146 m_state = state_t::ok;
+
4147 return length;
+
4148 }
+
4149 catch (const std::bad_alloc&) {
+
4150 m_state = state_t::fail;
+
4151 return 0;
4152 }
-
4153 catch (const std::bad_alloc&) {
-
4154 m_state = state_t::fail;
-
4155 return 0;
-
4156 }
-
4157 }
+
4153 }
-
4158
-
-
4159 virtual void close()
-
4160 {
-
4161 m_size = m_offset = 0;
-
4162 while (m_head) {
-
4163 auto p = m_head;
-
4164 m_head = p->next;
-
4165 delete p;
-
4166 }
-
4167 m_state = state_t::ok;
-
4168 }
+
4154
+
+
4155 virtual void close()
+
4156 {
+
4157 m_size = m_offset = 0;
+
4158 while (m_head) {
+
4159 auto p = m_head;
+
4160 m_head = p->next;
+
4161 delete p;
+
4162 }
+
4163 m_state = state_t::ok;
+
4164 }
-
4169
-
4173 size_t size() const { return m_size; };
-
4174
-
4175 protected:
-
4176 size_t m_offset, m_size;
-
-
4177 struct node_t {
-
4178 node_t* next;
-
4179 size_t size;
-
4180#pragma warning(suppress:4200)
-
4181 uint8_t data[0];
-
4182 } *m_head, * m_tail;
+
4165
+
4169 size_t size() const { return m_size; };
+
4170
+
4171 protected:
+
4172 size_t m_offset, m_size;
+
+
4173 struct node_t {
+
4174 node_t* next;
+
4175 size_t size;
+
4176#pragma warning(suppress:4200)
+
4177 uint8_t data[0];
+
4178 } *m_head, * m_tail;
-
4183 };
+
4179 };
-
4184
-
-
4188 class diag_file : public basic_file {
-
4189 public:
-
4190 diag_file(_In_count_(num_files) basic_file* const* files, _In_ size_t num_files) :
-
4191 basic(num_files ? files[0]->state() : state_t::fail),
-
4192 m_files(files, files + num_files)
-
4193 {}
-
4194
-
-
4195 virtual _Success_(return != 0 || length == 0) size_t read(
-
4196 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
-
4197 {
-
4198 stdex_assert(data || !length);
-
4199 if (m_files.empty()) {
-
4200 m_state = state_t::fail;
-
4201 return 0;
-
4202 }
-
4203 size_t result = m_files[0]->read(data, length);
-
4204 stdex_assert(result <= length);
-
4205 m_state = m_files[0]->state();
-
4206 if (length > m_tmp.size())
-
4207 m_tmp.resize(length);
-
4208 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
4209 if (m_files[i]->read(m_tmp.data(), length) != result ||
-
4210 memcmp(m_tmp.data(), data, result))
-
4211 throw std::runtime_error("read mismatch");
-
4212 if (m_files[i]->state() != m_state)
-
4213 throw std::runtime_error("state mismatch");
-
4214 }
-
4215 return result;
-
4216 }
+
4180
+
+
4184 class diag_file : public basic_file {
+
4185 public:
+
4186 diag_file(_In_count_(num_files) basic_file* const* files, _In_ size_t num_files) :
+
4187 basic(num_files ? files[0]->state() : state_t::fail),
+
4188 m_files(files, files + num_files)
+
4189 {}
+
4190
+
+
4191 virtual _Success_(return != 0 || length == 0) size_t read(
+
4192 _Out_writes_bytes_to_opt_(length, return) void* data, _In_ size_t length)
+
4193 {
+
4194 stdex_assert(data || !length);
+
4195 if (m_files.empty()) {
+
4196 m_state = state_t::fail;
+
4197 return 0;
+
4198 }
+
4199 size_t result = m_files[0]->read(data, length);
+
4200 stdex_assert(result <= length);
+
4201 m_state = m_files[0]->state();
+
4202 if (length > m_tmp.size())
+
4203 m_tmp.resize(length);
+
4204 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
4205 if (m_files[i]->read(m_tmp.data(), length) != result ||
+
4206 memcmp(m_tmp.data(), data, result))
+
4207 throw std::runtime_error("read mismatch");
+
4208 if (m_files[i]->state() != m_state)
+
4209 throw std::runtime_error("state mismatch");
+
4210 }
+
4211 return result;
+
4212 }
-
4217
-
-
4218 virtual _Success_(return != 0) size_t write(
-
4219 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
-
4220 {
-
4221 if (m_files.empty()) {
-
4222 m_state = state_t::fail;
-
4223 return 0;
-
4224 }
-
4225 size_t result = m_files[0]->write(data, length);
-
4226 m_state = m_files[0]->state();
-
4227 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
4228 if (m_files[i]->write(data, length) != result)
-
4229 throw std::runtime_error("write mismatch");
-
4230 if (m_files[i]->state() != m_state)
-
4231 throw std::runtime_error("state mismatch");
-
4232 }
-
4233 return result;
-
4234 }
+
4213
+
+
4214 virtual _Success_(return != 0) size_t write(
+
4215 _In_reads_bytes_opt_(length) const void* data, _In_ size_t length)
+
4216 {
+
4217 if (m_files.empty()) {
+
4218 m_state = state_t::fail;
+
4219 return 0;
+
4220 }
+
4221 size_t result = m_files[0]->write(data, length);
+
4222 m_state = m_files[0]->state();
+
4223 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
4224 if (m_files[i]->write(data, length) != result)
+
4225 throw std::runtime_error("write mismatch");
+
4226 if (m_files[i]->state() != m_state)
+
4227 throw std::runtime_error("state mismatch");
+
4228 }
+
4229 return result;
+
4230 }
-
4235
-
-
4236 virtual void flush()
-
4237 {
-
4238 if (m_files.empty()) {
-
4239 m_state = state_t::ok;
-
4240 return;
-
4241 }
-
4242 m_files[0]->flush();
-
4243 m_state = m_files[0]->state();
-
4244 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
4245 m_files[i]->flush();
-
4246 if (m_files[i]->state() != m_state)
-
4247 throw std::runtime_error("state mismatch");
-
4248 }
-
4249 }
+
4231
+
+
4232 virtual void flush()
+
4233 {
+
4234 if (m_files.empty()) {
+
4235 m_state = state_t::ok;
+
4236 return;
+
4237 }
+
4238 m_files[0]->flush();
+
4239 m_state = m_files[0]->state();
+
4240 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
4241 m_files[i]->flush();
+
4242 if (m_files[i]->state() != m_state)
+
4243 throw std::runtime_error("state mismatch");
+
4244 }
+
4245 }
-
4250
-
-
4251 virtual void close()
-
4252 {
-
4253 if (m_files.empty()) {
-
4254 m_state = state_t::ok;
-
4255 return;
-
4256 }
-
4257 m_files[0]->close();
-
4258 m_state = m_files[0]->state();
-
4259 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
4260 m_files[i]->close();
-
4261 if (m_files[i]->state() != m_state)
-
4262 throw std::runtime_error("state mismatch");
-
4263 }
-
4264 m_tmp.clear();
-
4265 m_tmp.shrink_to_fit();
-
4266 }
+
4246
+
+
4247 virtual void close()
+
4248 {
+
4249 if (m_files.empty()) {
+
4250 m_state = state_t::ok;
+
4251 return;
+
4252 }
+
4253 m_files[0]->close();
+
4254 m_state = m_files[0]->state();
+
4255 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
4256 m_files[i]->close();
+
4257 if (m_files[i]->state() != m_state)
+
4258 throw std::runtime_error("state mismatch");
+
4259 }
+
4260 m_tmp.clear();
+
4261 m_tmp.shrink_to_fit();
+
4262 }
-
4267
-
-
4268 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
-
4269 {
-
4270 if (m_files.empty()) {
-
4271 m_state = state_t::fail;
-
4272 return fpos_max;
-
4273 }
-
4274 fpos_t result = m_files[0]->seek(offset, how);
-
4275 m_state = m_files[0]->state();
-
4276 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
4277 if (m_files[i]->seek(offset, how) != result)
-
4278 throw std::runtime_error("seek mismatch");
-
4279 if (m_files[i]->state() != m_state)
-
4280 throw std::runtime_error("state mismatch");
-
4281 }
-
4282 return result;
-
4283 }
+
4263
+
+
4264 virtual fpos_t seek(_In_ foff_t offset, _In_ seek_t how = seek_t::beg)
+
4265 {
+
4266 if (m_files.empty()) {
+
4267 m_state = state_t::fail;
+
4268 return fpos_max;
+
4269 }
+
4270 fpos_t result = m_files[0]->seek(offset, how);
+
4271 m_state = m_files[0]->state();
+
4272 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
4273 if (m_files[i]->seek(offset, how) != result)
+
4274 throw std::runtime_error("seek mismatch");
+
4275 if (m_files[i]->state() != m_state)
+
4276 throw std::runtime_error("state mismatch");
+
4277 }
+
4278 return result;
+
4279 }
-
4284
-
-
4285 virtual fpos_t tell() const
-
4286 {
-
4287 if (m_files.empty())
-
4288 return fpos_max;
-
4289 fpos_t result = m_files[0]->tell();
-
4290 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
4291 if (m_files[i]->tell() != result)
-
4292 throw std::runtime_error("tell mismatch");
-
4293 }
-
4294 return result;
-
4295 }
+
4280
+
+
4281 virtual fpos_t tell() const
+
4282 {
+
4283 if (m_files.empty())
+
4284 return fpos_max;
+
4285 fpos_t result = m_files[0]->tell();
+
4286 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
4287 if (m_files[i]->tell() != result)
+
4288 throw std::runtime_error("tell mismatch");
+
4289 }
+
4290 return result;
+
4291 }
-
4296
-
-
4297 virtual void lock(_In_ fpos_t offset, _In_ fsize_t length)
-
4298 {
-
4299 if (m_files.empty())
-
4300 m_state = state_t::fail;
-
4301 m_files[0]->lock(offset, length);
-
4302 m_state = m_files[0]->state();
-
4303 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
4304 m_files[i]->lock(offset, length);
-
4305 if (m_files[i]->state() != m_state)
-
4306 throw std::runtime_error("state mismatch");
-
4307 }
-
4308 }
+
4292
+
+
4293 virtual void lock(_In_ fpos_t offset, _In_ fsize_t length)
+
4294 {
+
4295 if (m_files.empty())
+
4296 m_state = state_t::fail;
+
4297 m_files[0]->lock(offset, length);
+
4298 m_state = m_files[0]->state();
+
4299 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
4300 m_files[i]->lock(offset, length);
+
4301 if (m_files[i]->state() != m_state)
+
4302 throw std::runtime_error("state mismatch");
+
4303 }
+
4304 }
-
4309
-
-
4310 virtual void unlock(_In_ fpos_t offset, _In_ fsize_t length)
-
4311 {
-
4312 if (m_files.empty())
-
4313 m_state = state_t::fail;
-
4314 m_files[0]->unlock(offset, length);
-
4315 m_state = m_files[0]->state();
-
4316 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
4317 m_files[i]->unlock(offset, length);
-
4318 if (m_files[i]->state() != m_state)
-
4319 throw std::runtime_error("state mismatch");
-
4320 }
-
4321 }
+
4305
+
+
4306 virtual void unlock(_In_ fpos_t offset, _In_ fsize_t length)
+
4307 {
+
4308 if (m_files.empty())
+
4309 m_state = state_t::fail;
+
4310 m_files[0]->unlock(offset, length);
+
4311 m_state = m_files[0]->state();
+
4312 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
4313 m_files[i]->unlock(offset, length);
+
4314 if (m_files[i]->state() != m_state)
+
4315 throw std::runtime_error("state mismatch");
+
4316 }
+
4317 }
-
4322
-
-
4323 virtual fsize_t size() const
-
4324 {
-
4325 if (m_files.empty())
-
4326 return fsize_max;
-
4327 fsize_t result = m_files[0]->size();
-
4328 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
4329 if (m_files[i]->size() != result)
-
4330 throw std::runtime_error("size mismatch");
-
4331 }
-
4332 return result;
-
4333 }
+
4318
+
+
4319 virtual fsize_t size() const
+
4320 {
+
4321 if (m_files.empty())
+
4322 return fsize_max;
+
4323 fsize_t result = m_files[0]->size();
+
4324 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
4325 if (m_files[i]->size() != result)
+
4326 throw std::runtime_error("size mismatch");
+
4327 }
+
4328 return result;
+
4329 }
-
4334
-
-
4335 virtual void truncate()
-
4336 {
-
4337 if (m_files.empty())
-
4338 m_state = state_t::fail;
-
4339 m_files[0]->truncate();
-
4340 m_state = m_files[0]->state();
-
4341 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
-
4342 m_files[i]->truncate();
-
4343 if (m_files[i]->state() != m_state)
-
4344 throw std::runtime_error("state mismatch");
-
4345 }
-
4346 }
+
4330
+
+
4331 virtual void truncate()
+
4332 {
+
4333 if (m_files.empty())
+
4334 m_state = state_t::fail;
+
4335 m_files[0]->truncate();
+
4336 m_state = m_files[0]->state();
+
4337 for (size_t i = 1, n = m_files.size(); i < n; ++i) {
+
4338 m_files[i]->truncate();
+
4339 if (m_files[i]->state() != m_state)
+
4340 throw std::runtime_error("state mismatch");
+
4341 }
+
4342 }
-
4347
-
4348 protected:
-
4349 std::vector<basic_file*> m_files;
-
4350 std::vector<uint8_t> m_tmp;
-
4351 };
+
4343
+
4344 protected:
+
4345 std::vector<basic_file*> m_files;
+
4346 std::vector<uint8_t> m_tmp;
+
4347 };
-
4352 }
-
4353}
-
4354
-
4355#if defined(__GNUC__)
-
4356#pragma GCC diagnostic pop
-
4357#endif
+
4348 }
+
4349}
+
4350
+
4351#if defined(__GNUC__)
+
4352#pragma GCC diagnostic pop
+
4353#endif
Operating system object base class.
Definition system.hpp:142
Encoding converter context.
Definition unicode.hpp:139
locale_t helper class to free_locale when going out of scope.
Definition locale.hpp:74
-
Provides read-ahead stream capability.
Definition stream.hpp:1258
-
Provides write-back stream capability.
Definition stream.hpp:1325
-
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1362
-
Basic seekable stream operations.
Definition stream.hpp:819
-
virtual void skip(fsize_t amount)
Skips given amount of bytes of data on the stream.
Definition stream.hpp:865
-
virtual time_point ctime() const
Returns file creation time.
Definition stream.hpp:914
-
virtual void lock(fpos_t offset, fsize_t length)
Locks file section for exclusive access.
Definition stream.hpp:883
+
Provides read-ahead stream capability.
Definition stream.hpp:1254
+
Provides write-back stream capability.
Definition stream.hpp:1321
+
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1358
+
Basic seekable stream operations.
Definition stream.hpp:815
+
virtual void skip(fsize_t amount)
Skips given amount of bytes of data on the stream.
Definition stream.hpp:861
+
virtual time_point ctime() const
Returns file creation time.
Definition stream.hpp:910
+
virtual void lock(fpos_t offset, fsize_t length)
Locks file section for exclusive access.
Definition stream.hpp:879
virtual void truncate()=0
Sets file size - truncates the remainder of file content from the current file position to the end of...
virtual fsize_t size() const =0
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
-
charset_id read_charset(charset_id default_charset=charset_id::system)
Attempts to detect text-file charset based on UTF-32, UTF-16 or UTF-8 BOM.
Definition stream.hpp:989
-
fpos_t seekbeg(fpos_t offset)
Seeks to absolute file position.
Definition stream.hpp:846
-
virtual std::vector< uint8_t > read_remainder(size_t max_length=SIZE_MAX)
Reads and returns remainder of the stream.
Definition stream.hpp:821
-
virtual void set_mtime(time_point date)
Sets file modification time.
Definition stream.hpp:956
-
fpos_t seekcur(foff_t offset)
Seeks to relative from current file position.
Definition stream.hpp:856
-
virtual time_point atime() const
Returns file access time.
Definition stream.hpp:922
-
virtual void set_ctime(time_point date)
Sets file create time.
Definition stream.hpp:938
-
virtual void unlock(fpos_t offset, fsize_t length)
Unlocks file section for exclusive access.
Definition stream.hpp:893
+
charset_id read_charset(charset_id default_charset=charset_id::system)
Attempts to detect text-file charset based on UTF-32, UTF-16 or UTF-8 BOM.
Definition stream.hpp:985
+
fpos_t seekbeg(fpos_t offset)
Seeks to absolute file position.
Definition stream.hpp:842
+
virtual std::vector< uint8_t > read_remainder(size_t max_length=SIZE_MAX)
Reads and returns remainder of the stream.
Definition stream.hpp:817
+
virtual void set_mtime(time_point date)
Sets file modification time.
Definition stream.hpp:952
+
fpos_t seekcur(foff_t offset)
Seeks to relative from current file position.
Definition stream.hpp:852
+
virtual time_point atime() const
Returns file access time.
Definition stream.hpp:918
+
virtual void set_ctime(time_point date)
Sets file create time.
Definition stream.hpp:934
+
virtual void unlock(fpos_t offset, fsize_t length)
Unlocks file section for exclusive access.
Definition stream.hpp:889
virtual fpos_t tell() const =0
Returns absolute file position in file or fpos_max if fails. This method does not update stream state...
-
virtual time_point mtime() const
Returns file modification time.
Definition stream.hpp:930
-
fpos_t seekend(foff_t offset)
Seeks to relative from end file position.
Definition stream.hpp:863
-
virtual void set_atime(time_point date)
Sets file access time.
Definition stream.hpp:947
+
virtual time_point mtime() const
Returns file modification time.
Definition stream.hpp:926
+
fpos_t seekend(foff_t offset)
Seeks to relative from end file position.
Definition stream.hpp:859
+
virtual void set_atime(time_point date)
Sets file access time.
Definition stream.hpp:943
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:2213
-
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:2270
-
virtual void flush()
Persists volatile element data.
Definition stream.hpp:2328
-
virtual void close()
Closes the stream.
Definition stream.hpp:2317
+
OS data stream (file, pipe, socket...)
Definition stream.hpp:2209
+
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:2266
+
virtual void flush()
Persists volatile element data.
Definition stream.hpp:2324
+
virtual void close()
Closes the stream.
Definition stream.hpp:2313
Basic stream operations.
Definition stream.hpp:85
size_t write_array(const T_from *str, charset_encoder< T_from, T_to > &encoder)
Writes array of characters to the stream.
Definition stream.hpp:408
bool ok() const
Returns true if the stream state is clean i.e. previous operation was successful.
Definition stream.hpp:181
size_t readln_and_attach(std::basic_string< T, TR, AX > &str)
Reads stream to the end-of-line or end-of-file and append to str.
Definition stream.hpp:340
-
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:632
+
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:628
state_t state() const
Returns stream state after last operation.
Definition stream.hpp:176
-
size_t write_sprintf(_Printf_format_string_params_(2) const wchar_t *format, locale_t locale,...)
Writes formatted string to the stream.
Definition stream.hpp:618
-
size_t write_vsprintf(_Printf_format_string_params_(2) const wchar_t *format, locale_t locale, va_list params)
Writes formatted string to the stream.
Definition stream.hpp:645
+
size_t write_sprintf(_Printf_format_string_params_(2) const wchar_t *format, locale_t locale,...)
Writes formatted string to the stream.
Definition stream.hpp:614
+
size_t write_vsprintf(_Printf_format_string_params_(2) const wchar_t *format, locale_t locale, va_list params)
Writes formatted string to the stream.
Definition stream.hpp:641
virtual void flush()
Persists volatile element data.
Definition stream.hpp:132
virtual void skip(fsize_t amount)
Skips given amount of bytes of data on the stream.
Definition stream.hpp:148
virtual void close()
Closes the stream.
Definition stream.hpp:140
uint8_t read_byte()
Reads one byte of data.
Definition stream.hpp:216
virtual std::vector< uint8_t > read_remainder(size_t max_length=SIZE_MAX)
Reads and returns remainder of the stream.
Definition stream.hpp:190
-
size_t write_sprintf(_Printf_format_string_params_(2) const char *format, locale_t locale,...)
Writes formatted string to the stream.
Definition stream.hpp:604
+
size_t write_sprintf(_Printf_format_string_params_(2) const char *format, locale_t locale,...)
Writes formatted string to the stream.
Definition stream.hpp:600
size_t readln(std::basic_string< T_to, TR, AX > &str, charset_encoder< T_from, T_to > &encoder)
Reads stream to the end-of-line or end-of-file.
Definition stream.hpp:324
size_t read_array(_Out_writes_bytes_(size *count) void *array, size_t size, size_t count)
Reads an array of data from the stream.
Definition stream.hpp:376
size_t readln(std::basic_string< T, TR, AX > &str)
Reads stream to the end-of-line or end-of-file.
Definition stream.hpp:312
@@ -4229,9 +4225,9 @@ $(function(){ initResizable(false); });
basic & write_str(const T *data)
Writes string to the stream length-prefixed.
Definition stream.hpp:504
size_t readln_and_attach(std::basic_string< T_to, TR, AX > &str, charset_encoder< T_from, T_to > &encoder)
Reads stream to the end-of-line or end-of-file and append to str.
Definition stream.hpp:361
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:102
-
void write_charset(charset_id charset)
Writes UTF8, UTF-16 or UTF-32 byte-order-mark.
Definition stream.hpp:589
+
void write_charset(charset_id charset)
Writes UTF8, UTF-16 or UTF-32 byte-order-mark.
Definition stream.hpp:585
basic & write_data(const T data)
Writes one primitive data type.
Definition stream.hpp:293
-
fsize_t write_stream(basic &stream, fsize_t amount=fsize_max)
Writes content of another stream.
Definition stream.hpp:564
+
fsize_t write_stream(basic &stream, fsize_t amount=fsize_max)
Writes content of another stream.
Definition stream.hpp:560
size_t write_array(const std::basic_string< T_from, TR, AX > &str, charset_encoder< T_from, T_to > &encoder)
Writes array of characters to the stream.
Definition stream.hpp:449
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:120
basic & write_str(const std::basic_string< T, TR, AX > &data)
Writes string to the stream length-prefixed.
Definition stream.hpp:529
@@ -4239,139 +4235,139 @@ $(function(){ initResizable(false); });
size_t write_array(_In_reads_bytes_opt_(size *count) const void *array, size_t size, size_t count)
Writes an array of data to the stream.
Definition stream.hpp:394
void write_byte(uint8_t byte, fsize_t amount=1)
Writes a byte of data.
Definition stream.hpp:227
basic & read_data(T &data)
Reads one primitive data type.
Definition stream.hpp:265
-
Buffered read/write stream.
Definition stream.hpp:1396
-
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1505
-
Buffered OS data stream (file, pipe, socket...)
Definition stream.hpp:2342
-
Cached file.
Definition stream.hpp:1806
-
virtual time_point ctime() const
Returns file creation time.
Definition stream.hpp:2083
-
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:2062
-
virtual time_point atime() const
Returns file access time.
Definition stream.hpp:2088
-
virtual void unlock(fpos_t offset, fsize_t length)
Unlocks file section for exclusive access.
Definition stream.hpp:2049
-
virtual time_point mtime() const
Returns file modification time.
Definition stream.hpp:2097
-
virtual void close()
Closes the stream.
Definition stream.hpp:1992
-
virtual void set_mtime(time_point date)
Sets file modification time.
Definition stream.hpp:2119
-
virtual void lock(fpos_t offset, fsize_t length)
Locks file section for exclusive access.
Definition stream.hpp:2043
-
virtual void flush()
Persists volatile element data.
Definition stream.hpp:2001
-
virtual fsize_t size() const
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:2055
-
virtual void set_ctime(time_point date)
Sets file create time.
Definition stream.hpp:2106
-
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:2038
-
virtual void set_atime(time_point date)
Sets file access time.
Definition stream.hpp:2111
-
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:2012
-
Cached file-system file.
Definition stream.hpp:3139
-
void open(const std::basic_string< TR, AX > &filename, int mode)
Opens file.
Definition stream.hpp:3205
-
void open(const schar_t *filename, int mode)
Opens file.
Definition stream.hpp:3183
-
cached_file(const schar_t *filename, int mode, size_t cache_size=default_cache_size)
Opens file.
Definition stream.hpp:3155
-
cached_file(const std::basic_string< TR, AX > &filename, int mode, size_t cache_size=default_cache_size)
Opens file.
Definition stream.hpp:3170
-
Modifies data on the fly when reading from/writing to a source stream. Could also be used to modify r...
Definition stream.hpp:1024
-
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1075
-
virtual void close()
Closes the stream.
Definition stream.hpp:1069
-
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:1053
-
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:1061
-
Compares multiple files to perform the same.
Definition stream.hpp:4188
-
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:4335
-
virtual void close()
Closes the stream.
Definition stream.hpp:4251
-
virtual fsize_t size() const
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:4323
-
virtual void lock(fpos_t offset, fsize_t length)
Locks file section for exclusive access.
Definition stream.hpp:4297
-
virtual void unlock(fpos_t offset, fsize_t length)
Unlocks file section for exclusive access.
Definition stream.hpp:4310
-
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:4268
-
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:4285
-
virtual void flush()
Persists volatile element data.
Definition stream.hpp:4236
-
In-memory FIFO queue.
Definition stream.hpp:4089
-
virtual void close()
Closes the stream.
Definition stream.hpp:4159
-
size_t size() const
Returns total size of pending data in the queue.
Definition stream.hpp:4173
-
Limits file reading/writing to a predefined window.
Definition stream.hpp:1696
-
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:1789
-
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1739
-
virtual void skip(fsize_t amount)
Skips given amount of bytes of data on the stream.
Definition stream.hpp:1752
-
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:1745
-
virtual void lock(fpos_t offset, fsize_t length)
Locks file section for exclusive access.
Definition stream.hpp:1764
-
virtual void unlock(fpos_t offset, fsize_t length)
Unlocks file section for exclusive access.
Definition stream.hpp:1774
-
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:1758
-
virtual void close()
Closes the stream.
Definition stream.hpp:1733
-
virtual fsize_t size() const
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:1784
-
File-system file.
Definition stream.hpp:2720
-
virtual fsize_t size() const
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:2924
-
static bool readonly(const std::basic_string< TR, AX > &filename)
Checks if file/folder/symlink is read-only.
Definition stream.hpp:3128
-
virtual time_point mtime() const
Returns file modification time.
Definition stream.hpp:3008
-
virtual void unlock(fpos_t offset, fsize_t length)
Unlocks file section for exclusive access.
Definition stream.hpp:2895
-
file(const schar_t *filename, int mode)
Opens file.
Definition stream.hpp:2730
-
virtual void set_ctime(time_point date)
Sets file create time.
Definition stream.hpp:3022
-
static bool readonly(const stdex::schar_t *filename)
Checks if file/folder/symlink is read-only.
Definition stream.hpp:3109
-
virtual time_point atime() const
Returns file access time.
Definition stream.hpp:2994
-
static bool exists(const std::basic_string< TR, AX > &filename)
Checks if file/folder/symlink likely exists.
Definition stream.hpp:3097
-
void open(const schar_t *filename, int mode)
Opens file.
Definition stream.hpp:2750
-
virtual void set_mtime(time_point date)
Sets file modification time.
Definition stream.hpp:3057
-
virtual void set_atime(time_point date)
Sets file access time.
Definition stream.hpp:3037
-
virtual void lock(fpos_t offset, fsize_t length)
Locks file section for exclusive access.
Definition stream.hpp:2868
-
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:2944
-
void open(const std::basic_string< TR, AX > &filename, int mode)
Opens file.
Definition stream.hpp:2824
-
virtual time_point ctime() const
Returns file creation time.
Definition stream.hpp:2984
-
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:2829
-
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:2850
-
file(const std::basic_string< TR, AX > &filename, int mode)
Opens file.
Definition stream.hpp:2742
-
static bool exists(const stdex::schar_t *filename)
Checks if file/folder/symlink likely exists.
Definition stream.hpp:3081
-
Limits reading from/writing to stream to a predefined number of bytes.
Definition stream.hpp:1553
-
fsize_t read_limit
Number of bytes left that may be read from the stream.
Definition stream.hpp:1605
-
fsize_t write_limit
Number of bytes left, that can be written to the stream.
Definition stream.hpp:1606
-
In-memory file.
Definition stream.hpp:3223
-
void save(const std::basic_string< TR, AX > &filename, int mode)
Saves content to a file-system file.
Definition stream.hpp:3545
-
memory_file & operator=(memory_file &&other) noexcept
Moves content from another file.
Definition stream.hpp:3406
-
virtual fsize_t size() const
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:3925
-
memory_file(const schar_t *filename, int mode)
Loads content from file-system file.
Definition stream.hpp:3303
-
memory_file & read_str(std::basic_string< T, TR, AX > &data)
Reads length-prefixed string from the stream.
Definition stream.hpp:3634
-
memory_file(const memory_file &other)
Copies content from another file.
Definition stream.hpp:3322
-
memory_file & write_str(const std::basic_string< T, TR, AX > &data)
Writes string to the stream length-prefixed.
Definition stream.hpp:3805
-
void load(const std::basic_string< TR, AX > &filename, int mode)
Loads content from a file-system file.
Definition stream.hpp:3507
-
size_t m_size
file size
Definition stream.hpp:4076
-
void get(fpos_t offset, T &data)
Reads data from specified file location This does not move file pointer. It checks for data size stde...
Definition stream.hpp:4014
-
size_t write_stream(basic &stream, size_t amount=SIZE_MAX)
Writes content of another stream.
Definition stream.hpp:3840
-
uint8_t * m_data
file data
Definition stream.hpp:4073
-
memory_file & read_data(T &data)
Reads one primitive data type.
Definition stream.hpp:3594
-
virtual void close()
Closes the stream.
Definition stream.hpp:3890
-
memory_file(const std::basic_string< TR, AX > &filename, int mode)
Loads content from file-system file.
Definition stream.hpp:3315
-
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:3920
-
size_t m_reserved
reserved file size
Definition stream.hpp:4077
-
memory_file(size_t size, state_t state=state_t::ok)
Creates an empty file of reserved size.
Definition stream.hpp:3244
-
void reserve(size_t required, bool tight=false) noexcept
Reallocates memory.
Definition stream.hpp:3444
-
memory_file(memory_file &&other) noexcept
Moves content from another file.
Definition stream.hpp:3377
-
void write_byte(uint8_t byte, size_t amount=1)
Writes a byte of data.
Definition stream.hpp:3689
-
memory_file & operator=(const memory_file &other)
Copies content from another file.
Definition stream.hpp:3347
-
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:3980
-
size_t m_offset
file pointer
Definition stream.hpp:4075
-
void save(const schar_t *filename, int mode)
Saves content to a file-system file.
Definition stream.hpp:3518
-
void load(const schar_t *filename, int mode)
Loads content from a file-system file.
Definition stream.hpp:3473
-
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:3904
-
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:3930
-
memory_file & write_data(const T data)
Writes one primitive data type.
Definition stream.hpp:3722
-
memory_file & write_str(const T *data)
Writes string to the stream length-prefixed.
Definition stream.hpp:3760
-
bool m_manage
may reallocate m_data?
Definition stream.hpp:4074
-
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:3293
-
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:3270
-
const void * data() const
Returns pointer to data.
Definition stream.hpp:3553
-
Definition stream.hpp:1172
-
size_t num_written
Number of bytes written.
Definition stream.hpp:1221
-
size_t length
Byte limit of data to write.
Definition stream.hpp:1220
-
const void * data
Data to write.
Definition stream.hpp:1219
-
Replicates writing of the same data to multiple streams.
Definition stream.hpp:1089
-
void push_back(basic *source)
Adds stream on the list.
Definition stream.hpp:1108
-
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1165
-
void remove(basic *source)
Removes stream from the list.
Definition stream.hpp:1116
-
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:1133
-
virtual void close()
Closes the stream.
Definition stream.hpp:1160
-
Socket stream.
Definition stream.hpp:2364
-
socket_t get() const noexcept
Returns socket handle.
Definition stream.hpp:2420
-
virtual void close()
Closes the stream.
Definition stream.hpp:2478
-
socket(int af, int type, int protocol)
Creates a socket.
Definition stream.hpp:2399
-
Limits reading from/writing to stream to a predefined window.
Definition stream.hpp:1613
-
fpos_t write_offset
Number of bytes to discard on write.
Definition stream.hpp:1689
-
fpos_t read_offset
Number of bytes to skip on read.
Definition stream.hpp:1688
+
Buffered read/write stream.
Definition stream.hpp:1392
+
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1501
+
Buffered OS data stream (file, pipe, socket...)
Definition stream.hpp:2338
+
Cached file.
Definition stream.hpp:1802
+
virtual time_point ctime() const
Returns file creation time.
Definition stream.hpp:2079
+
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:2058
+
virtual time_point atime() const
Returns file access time.
Definition stream.hpp:2084
+
virtual void unlock(fpos_t offset, fsize_t length)
Unlocks file section for exclusive access.
Definition stream.hpp:2045
+
virtual time_point mtime() const
Returns file modification time.
Definition stream.hpp:2093
+
virtual void close()
Closes the stream.
Definition stream.hpp:1988
+
virtual void set_mtime(time_point date)
Sets file modification time.
Definition stream.hpp:2115
+
virtual void lock(fpos_t offset, fsize_t length)
Locks file section for exclusive access.
Definition stream.hpp:2039
+
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1997
+
virtual fsize_t size() const
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:2051
+
virtual void set_ctime(time_point date)
Sets file create time.
Definition stream.hpp:2102
+
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:2034
+
virtual void set_atime(time_point date)
Sets file access time.
Definition stream.hpp:2107
+
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:2008
+
Cached file-system file.
Definition stream.hpp:3135
+
void open(const std::basic_string< TR, AX > &filename, int mode)
Opens file.
Definition stream.hpp:3201
+
void open(const schar_t *filename, int mode)
Opens file.
Definition stream.hpp:3179
+
cached_file(const schar_t *filename, int mode, size_t cache_size=default_cache_size)
Opens file.
Definition stream.hpp:3151
+
cached_file(const std::basic_string< TR, AX > &filename, int mode, size_t cache_size=default_cache_size)
Opens file.
Definition stream.hpp:3166
+
Modifies data on the fly when reading from/writing to a source stream. Could also be used to modify r...
Definition stream.hpp:1020
+
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1071
+
virtual void close()
Closes the stream.
Definition stream.hpp:1065
+
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:1049
+
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:1057
+
Compares multiple files to perform the same.
Definition stream.hpp:4184
+
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:4331
+
virtual void close()
Closes the stream.
Definition stream.hpp:4247
+
virtual fsize_t size() const
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:4319
+
virtual void lock(fpos_t offset, fsize_t length)
Locks file section for exclusive access.
Definition stream.hpp:4293
+
virtual void unlock(fpos_t offset, fsize_t length)
Unlocks file section for exclusive access.
Definition stream.hpp:4306
+
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:4264
+
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:4281
+
virtual void flush()
Persists volatile element data.
Definition stream.hpp:4232
+
In-memory FIFO queue.
Definition stream.hpp:4085
+
virtual void close()
Closes the stream.
Definition stream.hpp:4155
+
size_t size() const
Returns total size of pending data in the queue.
Definition stream.hpp:4169
+
Limits file reading/writing to a predefined window.
Definition stream.hpp:1692
+
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:1785
+
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1735
+
virtual void skip(fsize_t amount)
Skips given amount of bytes of data on the stream.
Definition stream.hpp:1748
+
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:1741
+
virtual void lock(fpos_t offset, fsize_t length)
Locks file section for exclusive access.
Definition stream.hpp:1760
+
virtual void unlock(fpos_t offset, fsize_t length)
Unlocks file section for exclusive access.
Definition stream.hpp:1770
+
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:1754
+
virtual void close()
Closes the stream.
Definition stream.hpp:1729
+
virtual fsize_t size() const
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:1780
+
File-system file.
Definition stream.hpp:2716
+
virtual fsize_t size() const
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:2920
+
static bool readonly(const std::basic_string< TR, AX > &filename)
Checks if file/folder/symlink is read-only.
Definition stream.hpp:3124
+
virtual time_point mtime() const
Returns file modification time.
Definition stream.hpp:3004
+
virtual void unlock(fpos_t offset, fsize_t length)
Unlocks file section for exclusive access.
Definition stream.hpp:2891
+
file(const schar_t *filename, int mode)
Opens file.
Definition stream.hpp:2726
+
virtual void set_ctime(time_point date)
Sets file create time.
Definition stream.hpp:3018
+
static bool readonly(const stdex::schar_t *filename)
Checks if file/folder/symlink is read-only.
Definition stream.hpp:3105
+
virtual time_point atime() const
Returns file access time.
Definition stream.hpp:2990
+
static bool exists(const std::basic_string< TR, AX > &filename)
Checks if file/folder/symlink likely exists.
Definition stream.hpp:3093
+
void open(const schar_t *filename, int mode)
Opens file.
Definition stream.hpp:2746
+
virtual void set_mtime(time_point date)
Sets file modification time.
Definition stream.hpp:3053
+
virtual void set_atime(time_point date)
Sets file access time.
Definition stream.hpp:3033
+
virtual void lock(fpos_t offset, fsize_t length)
Locks file section for exclusive access.
Definition stream.hpp:2864
+
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:2940
+
void open(const std::basic_string< TR, AX > &filename, int mode)
Opens file.
Definition stream.hpp:2820
+
virtual time_point ctime() const
Returns file creation time.
Definition stream.hpp:2980
+
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:2825
+
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:2846
+
file(const std::basic_string< TR, AX > &filename, int mode)
Opens file.
Definition stream.hpp:2738
+
static bool exists(const stdex::schar_t *filename)
Checks if file/folder/symlink likely exists.
Definition stream.hpp:3077
+
Limits reading from/writing to stream to a predefined number of bytes.
Definition stream.hpp:1549
+
fsize_t read_limit
Number of bytes left that may be read from the stream.
Definition stream.hpp:1601
+
fsize_t write_limit
Number of bytes left, that can be written to the stream.
Definition stream.hpp:1602
+
In-memory file.
Definition stream.hpp:3219
+
void save(const std::basic_string< TR, AX > &filename, int mode)
Saves content to a file-system file.
Definition stream.hpp:3541
+
memory_file & operator=(memory_file &&other) noexcept
Moves content from another file.
Definition stream.hpp:3402
+
virtual fsize_t size() const
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:3921
+
memory_file(const schar_t *filename, int mode)
Loads content from file-system file.
Definition stream.hpp:3299
+
memory_file & read_str(std::basic_string< T, TR, AX > &data)
Reads length-prefixed string from the stream.
Definition stream.hpp:3630
+
memory_file(const memory_file &other)
Copies content from another file.
Definition stream.hpp:3318
+
memory_file & write_str(const std::basic_string< T, TR, AX > &data)
Writes string to the stream length-prefixed.
Definition stream.hpp:3801
+
void load(const std::basic_string< TR, AX > &filename, int mode)
Loads content from a file-system file.
Definition stream.hpp:3503
+
size_t m_size
file size
Definition stream.hpp:4072
+
void get(fpos_t offset, T &data)
Reads data from specified file location This does not move file pointer. It checks for data size stde...
Definition stream.hpp:4010
+
size_t write_stream(basic &stream, size_t amount=SIZE_MAX)
Writes content of another stream.
Definition stream.hpp:3836
+
uint8_t * m_data
file data
Definition stream.hpp:4069
+
memory_file & read_data(T &data)
Reads one primitive data type.
Definition stream.hpp:3590
+
virtual void close()
Closes the stream.
Definition stream.hpp:3886
+
memory_file(const std::basic_string< TR, AX > &filename, int mode)
Loads content from file-system file.
Definition stream.hpp:3311
+
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:3916
+
size_t m_reserved
reserved file size
Definition stream.hpp:4073
+
memory_file(size_t size, state_t state=state_t::ok)
Creates an empty file of reserved size.
Definition stream.hpp:3240
+
void reserve(size_t required, bool tight=false) noexcept
Reallocates memory.
Definition stream.hpp:3440
+
memory_file(memory_file &&other) noexcept
Moves content from another file.
Definition stream.hpp:3373
+
void write_byte(uint8_t byte, size_t amount=1)
Writes a byte of data.
Definition stream.hpp:3685
+
memory_file & operator=(const memory_file &other)
Copies content from another file.
Definition stream.hpp:3343
+
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:3976
+
size_t m_offset
file pointer
Definition stream.hpp:4071
+
void save(const schar_t *filename, int mode)
Saves content to a file-system file.
Definition stream.hpp:3514
+
void load(const schar_t *filename, int mode)
Loads content from a file-system file.
Definition stream.hpp:3469
+
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:3900
+
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:3926
+
memory_file & write_data(const T data)
Writes one primitive data type.
Definition stream.hpp:3718
+
memory_file & write_str(const T *data)
Writes string to the stream length-prefixed.
Definition stream.hpp:3756
+
bool m_manage
may reallocate m_data?
Definition stream.hpp:4070
+
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:3289
+
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:3266
+
const void * data() const
Returns pointer to data.
Definition stream.hpp:3549
+
Definition stream.hpp:1168
+
size_t num_written
Number of bytes written.
Definition stream.hpp:1217
+
size_t length
Byte limit of data to write.
Definition stream.hpp:1216
+
const void * data
Data to write.
Definition stream.hpp:1215
+
Replicates writing of the same data to multiple streams.
Definition stream.hpp:1085
+
void push_back(basic *source)
Adds stream on the list.
Definition stream.hpp:1104
+
virtual void flush()
Persists volatile element data.
Definition stream.hpp:1161
+
void remove(basic *source)
Removes stream from the list.
Definition stream.hpp:1112
+
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:1129
+
virtual void close()
Closes the stream.
Definition stream.hpp:1156
+
Socket stream.
Definition stream.hpp:2360
+
socket_t get() const noexcept
Returns socket handle.
Definition stream.hpp:2416
+
virtual void close()
Closes the stream.
Definition stream.hpp:2474
+
socket(int af, int type, int protocol)
Creates a socket.
Definition stream.hpp:2395
+
Limits reading from/writing to stream to a predefined window.
Definition stream.hpp:1609
+
fpos_t write_offset
Number of bytes to discard on write.
Definition stream.hpp:1685
+
fpos_t read_offset
Number of bytes to skip on read.
Definition stream.hpp:1684
Numerical interval.
Definition interval.hpp:18
-
Definition stream.hpp:1530
-
Definition stream.hpp:4177
+
Definition stream.hpp:1526
+
Definition stream.hpp:4173
diff --git a/string_8hpp_source.html b/string_8hpp_source.html index 7022be337..debaabc9c 100644 --- a/string_8hpp_source.html +++ b/string_8hpp_source.html @@ -2187,7 +2187,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1chrono_1_1aosn__date-members.html b/structstdex_1_1chrono_1_1aosn__date-members.html index cb58f8159..6a46add4d 100644 --- a/structstdex_1_1chrono_1_1aosn__date-members.html +++ b/structstdex_1_1chrono_1_1aosn__date-members.html @@ -111,7 +111,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1chrono_1_1aosn__date.html b/structstdex_1_1chrono_1_1aosn__date.html index e1a16ed04..b94135646 100644 --- a/structstdex_1_1chrono_1_1aosn__date.html +++ b/structstdex_1_1chrono_1_1aosn__date.html @@ -167,7 +167,7 @@ static constexpr bool is_s
diff --git a/structstdex_1_1chrono_1_1aosn__timestamp-members.html b/structstdex_1_1chrono_1_1aosn__timestamp-members.html index e58656547..1342bc90f 100644 --- a/structstdex_1_1chrono_1_1aosn__timestamp-members.html +++ b/structstdex_1_1chrono_1_1aosn__timestamp-members.html @@ -125,7 +125,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1chrono_1_1aosn__timestamp.html b/structstdex_1_1chrono_1_1aosn__timestamp.html index 0ab79be0b..609146d32 100644 --- a/structstdex_1_1chrono_1_1aosn__timestamp.html +++ b/structstdex_1_1chrono_1_1aosn__timestamp.html @@ -212,7 +212,7 @@ static constexpr rep one_w
diff --git a/structstdex_1_1curl__easy__cleanup__delete-members.html b/structstdex_1_1curl__easy__cleanup__delete-members.html index 9e595a689..cfe03ccc0 100644 --- a/structstdex_1_1curl__easy__cleanup__delete-members.html +++ b/structstdex_1_1curl__easy__cleanup__delete-members.html @@ -99,7 +99,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1curl__easy__cleanup__delete.html b/structstdex_1_1curl__easy__cleanup__delete.html index dc8418363..fa8aa3c55 100644 --- a/structstdex_1_1curl__easy__cleanup__delete.html +++ b/structstdex_1_1curl__easy__cleanup__delete.html @@ -116,7 +116,7 @@ void operator() (CURL
diff --git a/structstdex_1_1curl__slist__free__all__delete-members.html b/structstdex_1_1curl__slist__free__all__delete-members.html index f75b1e337..cad336995 100644 --- a/structstdex_1_1curl__slist__free__all__delete-members.html +++ b/structstdex_1_1curl__slist__free__all__delete-members.html @@ -99,7 +99,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1curl__slist__free__all__delete.html b/structstdex_1_1curl__slist__free__all__delete.html index fa0f9e1f2..7440c96bc 100644 --- a/structstdex_1_1curl__slist__free__all__delete.html +++ b/structstdex_1_1curl__slist__free__all__delete.html @@ -116,7 +116,7 @@ void operator() (struc
diff --git a/structstdex_1_1free__locale__delete-members.html b/structstdex_1_1free__locale__delete-members.html index 5c2572c4f..1017083a7 100644 --- a/structstdex_1_1free__locale__delete-members.html +++ b/structstdex_1_1free__locale__delete-members.html @@ -99,7 +99,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1free__locale__delete.html b/structstdex_1_1free__locale__delete.html index 7c526a375..f323d759c 100644 --- a/structstdex_1_1free__locale__delete.html +++ b/structstdex_1_1free__locale__delete.html @@ -116,7 +116,7 @@ void operator() (local
diff --git a/structstdex_1_1freeaddrinfo__delete-members.html b/structstdex_1_1freeaddrinfo__delete-members.html index 8241d5880..8739291ff 100644 --- a/structstdex_1_1freeaddrinfo__delete-members.html +++ b/structstdex_1_1freeaddrinfo__delete-members.html @@ -99,7 +99,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1freeaddrinfo__delete.html b/structstdex_1_1freeaddrinfo__delete.html index 59960ad04..4cc5adc8c 100644 --- a/structstdex_1_1freeaddrinfo__delete.html +++ b/structstdex_1_1freeaddrinfo__delete.html @@ -116,7 +116,7 @@ void operator() (struc
diff --git a/structstdex_1_1html_1_1element__traits-members.html b/structstdex_1_1html_1_1element__traits-members.html index 01fc5f05c..a1d7c664e 100644 --- a/structstdex_1_1html_1_1element__traits-members.html +++ b/structstdex_1_1html_1_1element__traits-members.html @@ -117,7 +117,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1html_1_1element__traits.html b/structstdex_1_1html_1_1element__traits.html index aa87af298..c1ad94544 100644 --- a/structstdex_1_1html_1_1element__traits.html +++ b/structstdex_1_1html_1_1element__traits.html @@ -831,7 +831,7 @@ template<class T >
diff --git a/structstdex_1_1html_1_1entity-members.html b/structstdex_1_1html_1_1entity-members.html index ffb38255c..c658ce403 100644 --- a/structstdex_1_1html_1_1entity-members.html +++ b/structstdex_1_1html_1_1entity-members.html @@ -100,7 +100,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1html_1_1entity.html b/structstdex_1_1html_1_1entity.html index 0a688a07e..cc670e7aa 100644 --- a/structstdex_1_1html_1_1entity.html +++ b/structstdex_1_1html_1_1entity.html @@ -121,7 +121,7 @@ struct stdex::html::entity< T, TR, AX >

HTML entity.

diff --git a/structstdex_1_1html_1_1inserted__token-members.html b/structstdex_1_1html_1_1inserted__token-members.html index bcb076972..89ad5e6f1 100644 --- a/structstdex_1_1html_1_1inserted__token-members.html +++ b/structstdex_1_1html_1_1inserted__token-members.html @@ -102,7 +102,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1html_1_1inserted__token.html b/structstdex_1_1html_1_1inserted__token.html index 947344f13..9fc575876 100644 --- a/structstdex_1_1html_1_1inserted__token.html +++ b/structstdex_1_1html_1_1inserted__token.html @@ -128,7 +128,7 @@ bool after_word
diff --git a/structstdex_1_1interval-members.html b/structstdex_1_1interval-members.html index 944a0463b..7d16013d5 100644 --- a/structstdex_1_1interval-members.html +++ b/structstdex_1_1interval-members.html @@ -120,7 +120,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1interval.html b/structstdex_1_1interval.html index 7e4fbf046..3e4b7d151 100644 --- a/structstdex_1_1interval.html +++ b/structstdex_1_1interval.html @@ -798,7 +798,7 @@ template<class T >
diff --git a/structstdex_1_1mapping-members.html b/structstdex_1_1mapping-members.html index 81af488a3..b589ed6de 100644 --- a/structstdex_1_1mapping-members.html +++ b/structstdex_1_1mapping-members.html @@ -107,7 +107,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1mapping.html b/structstdex_1_1mapping.html index a2c823467..b4f4e41fc 100644 --- a/structstdex_1_1mapping.html +++ b/structstdex_1_1mapping.html @@ -331,7 +331,7 @@ template<class T >
diff --git a/structstdex_1_1no__delete-members.html b/structstdex_1_1no__delete-members.html index 879384105..3678230e7 100644 --- a/structstdex_1_1no__delete-members.html +++ b/structstdex_1_1no__delete-members.html @@ -101,7 +101,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1no__delete.html b/structstdex_1_1no__delete.html index 96ab2af0d..906b3cfdd 100644 --- a/structstdex_1_1no__delete.html +++ b/structstdex_1_1no__delete.html @@ -120,7 +120,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 f49a6ede6..fca7ec71f 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 @@ -101,7 +101,7 @@ $(function(){ initResizable(false); });
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 2f5fd7b3e..52a5a562e 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 @@ -121,7 +121,7 @@ struct stdex::no_delete< T[]>

Noop array deleter.

diff --git a/structstdex_1_1parser_1_1html__attribute-members.html b/structstdex_1_1parser_1_1html__attribute-members.html index 2a1a69e93..6647daf39 100644 --- a/structstdex_1_1parser_1_1html__attribute-members.html +++ b/structstdex_1_1parser_1_1html__attribute-members.html @@ -100,7 +100,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1parser_1_1html__attribute.html b/structstdex_1_1parser_1_1html__attribute.html index cdebbc91b..4790ab14e 100644 --- a/structstdex_1_1parser_1_1html__attribute.html +++ b/structstdex_1_1parser_1_1html__attribute.html @@ -120,7 +120,7 @@ Public Attributes
diff --git a/structstdex_1_1parser_1_1http__factor__more-members.html b/structstdex_1_1parser_1_1http__factor__more-members.html index 2545e451c..d701af66b 100644 --- a/structstdex_1_1parser_1_1http__factor__more-members.html +++ b/structstdex_1_1parser_1_1http__factor__more-members.html @@ -99,7 +99,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1parser_1_1http__factor__more.html b/structstdex_1_1parser_1_1http__factor__more.html index b7d648ec2..55fc512ba 100644 --- a/structstdex_1_1parser_1_1http__factor__more.html +++ b/structstdex_1_1parser_1_1http__factor__more.html @@ -108,7 +108,7 @@ constexpr bool operator()<
diff --git a/structstdex_1_1sanitizing__allocator_1_1rebind-members.html b/structstdex_1_1sanitizing__allocator_1_1rebind-members.html index 45e5aad42..28499df45 100644 --- a/structstdex_1_1sanitizing__allocator_1_1rebind-members.html +++ b/structstdex_1_1sanitizing__allocator_1_1rebind-members.html @@ -99,7 +99,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1sanitizing__allocator_1_1rebind.html b/structstdex_1_1sanitizing__allocator_1_1rebind.html index 98a51f070..4b6bc06a7 100644 --- a/structstdex_1_1sanitizing__allocator_1_1rebind.html +++ b/structstdex_1_1sanitizing__allocator_1_1rebind.html @@ -118,7 +118,7 @@ struct stdex::sanitizing_allocator< T >::rebind< T2 >

Conver

diff --git a/structstdex_1_1socket__traits-members.html b/structstdex_1_1socket__traits-members.html index 4cfbedc40..185b15a71 100644 --- a/structstdex_1_1socket__traits-members.html +++ b/structstdex_1_1socket__traits-members.html @@ -100,7 +100,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1socket__traits.html b/structstdex_1_1socket__traits.html index e3cf2394f..e273f2728 100644 --- a/structstdex_1_1socket__traits.html +++ b/structstdex_1_1socket__traits.html @@ -123,7 +123,7 @@ static const socket_t inva
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 b0dce0843..2e315db48 100644 --- a/structstdex_1_1stream_1_1buffer_1_1buffer__t-members.html +++ b/structstdex_1_1stream_1_1buffer_1_1buffer__t-members.html @@ -104,7 +104,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1stream_1_1buffer_1_1buffer__t.html b/structstdex_1_1stream_1_1buffer_1_1buffer__t.html index 165fc5bbc..de5da013c 100644 --- a/structstdex_1_1stream_1_1buffer_1_1buffer__t.html +++ b/structstdex_1_1stream_1_1buffer_1_1buffer__t.html @@ -124,7 +124,7 @@ size_t capacity
diff --git a/structstdex_1_1stream_1_1fifo_1_1node__t-members.html b/structstdex_1_1stream_1_1fifo_1_1node__t-members.html index 1aff51934..4c113d876 100644 --- a/structstdex_1_1stream_1_1fifo_1_1node__t-members.html +++ b/structstdex_1_1stream_1_1fifo_1_1node__t-members.html @@ -101,7 +101,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1stream_1_1fifo_1_1node__t.html b/structstdex_1_1stream_1_1fifo_1_1node__t.html index be5977fe2..9cd735ae7 100644 --- a/structstdex_1_1stream_1_1fifo_1_1node__t.html +++ b/structstdex_1_1stream_1_1fifo_1_1node__t.html @@ -114,7 +114,7 @@ uint8_t data [0]<
diff --git a/structstdex_1_1sys__info__t-members.html b/structstdex_1_1sys__info__t-members.html index 58d972ad9..afed47ba6 100644 --- a/structstdex_1_1sys__info__t-members.html +++ b/structstdex_1_1sys__info__t-members.html @@ -106,7 +106,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1sys__info__t.html b/structstdex_1_1sys__info__t.html index 62d8f0773..a15d459ac 100644 --- a/structstdex_1_1sys__info__t.html +++ b/structstdex_1_1sys__info__t.html @@ -164,7 +164,7 @@ struct utsname m_utsn<
diff --git a/structstdex_1_1sys__object__traits-members.html b/structstdex_1_1sys__object__traits-members.html index c0ad22a33..ab7980860 100644 --- a/structstdex_1_1sys__object__traits-members.html +++ b/structstdex_1_1sys__object__traits-members.html @@ -101,7 +101,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1sys__object__traits.html b/structstdex_1_1sys__object__traits.html index 83a013988..6d6487cd2 100644 --- a/structstdex_1_1sys__object__traits.html +++ b/structstdex_1_1sys__object__traits.html @@ -127,7 +127,7 @@ static const sys_handle in
diff --git a/structstdex_1_1wav_1_1cue-members.html b/structstdex_1_1wav_1_1cue-members.html index 5bd9cb8f6..eecbced66 100644 --- a/structstdex_1_1wav_1_1cue-members.html +++ b/structstdex_1_1wav_1_1cue-members.html @@ -104,7 +104,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1wav_1_1cue.html b/structstdex_1_1wav_1_1cue.html index f0bf1413f..121f6693d 100644 --- a/structstdex_1_1wav_1_1cue.html +++ b/structstdex_1_1wav_1_1cue.html @@ -145,7 +145,7 @@ uint32_t block_offset
diff --git a/structstdex_1_1wav_1_1cue__ex-members.html b/structstdex_1_1wav_1_1cue__ex-members.html index b0d3cda11..7f19f521b 100644 --- a/structstdex_1_1wav_1_1cue__ex-members.html +++ b/structstdex_1_1wav_1_1cue__ex-members.html @@ -113,7 +113,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1wav_1_1cue__ex.html b/structstdex_1_1wav_1_1cue__ex.html index 77925ac6a..d512f90a2 100644 --- a/structstdex_1_1wav_1_1cue__ex.html +++ b/structstdex_1_1wav_1_1cue__ex.html @@ -182,7 +182,7 @@ uint32_t block_offset
diff --git a/structstdex_1_1wav_1_1data-members.html b/structstdex_1_1wav_1_1data-members.html index 5097601ba..6f5a9f953 100644 --- a/structstdex_1_1wav_1_1data-members.html +++ b/structstdex_1_1wav_1_1data-members.html @@ -102,7 +102,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1wav_1_1data.html b/structstdex_1_1wav_1_1data.html index fb7901914..6cfdb19ed 100644 --- a/structstdex_1_1wav_1_1data.html +++ b/structstdex_1_1wav_1_1data.html @@ -133,7 +133,7 @@ Friends
diff --git a/structstdex_1_1wav_1_1format-members.html b/structstdex_1_1wav_1_1format-members.html index 73409c5a0..a4e815474 100644 --- a/structstdex_1_1wav_1_1format-members.html +++ b/structstdex_1_1wav_1_1format-members.html @@ -109,7 +109,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1wav_1_1format.html b/structstdex_1_1wav_1_1format.html index 16d1e5371..5c6f15b54 100644 --- a/structstdex_1_1wav_1_1format.html +++ b/structstdex_1_1wav_1_1format.html @@ -224,7 +224,7 @@ Friends
diff --git a/structstdex_1_1wav_1_1header-members.html b/structstdex_1_1wav_1_1header-members.html index 923fdc1fa..45359e956 100644 --- a/structstdex_1_1wav_1_1header-members.html +++ b/structstdex_1_1wav_1_1header-members.html @@ -102,7 +102,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1wav_1_1header.html b/structstdex_1_1wav_1_1header.html index f5800ae2a..1269a66fe 100644 --- a/structstdex_1_1wav_1_1header.html +++ b/structstdex_1_1wav_1_1header.html @@ -143,7 +143,7 @@ Friends
diff --git a/structstdex_1_1wav_1_1label-members.html b/structstdex_1_1wav_1_1label-members.html index 1258a013f..e69821541 100644 --- a/structstdex_1_1wav_1_1label-members.html +++ b/structstdex_1_1wav_1_1label-members.html @@ -103,7 +103,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1wav_1_1label.html b/structstdex_1_1wav_1_1label.html index 086af469a..ab5fb3a22 100644 --- a/structstdex_1_1wav_1_1label.html +++ b/structstdex_1_1wav_1_1label.html @@ -137,7 +137,7 @@ Friends
diff --git a/structstdex_1_1wav_1_1list-members.html b/structstdex_1_1wav_1_1list-members.html index 90a0e53be..d164f3be8 100644 --- a/structstdex_1_1wav_1_1list-members.html +++ b/structstdex_1_1wav_1_1list-members.html @@ -100,7 +100,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1wav_1_1list.html b/structstdex_1_1wav_1_1list.html index f2404b095..a6200c82e 100644 --- a/structstdex_1_1wav_1_1list.html +++ b/structstdex_1_1wav_1_1list.html @@ -136,7 +136,7 @@ id_t type = 0
diff --git a/structstdex_1_1wav_1_1ltxt-members.html b/structstdex_1_1wav_1_1ltxt-members.html index b315fa48a..e1a9bcf17 100644 --- a/structstdex_1_1wav_1_1ltxt-members.html +++ b/structstdex_1_1wav_1_1ltxt-members.html @@ -109,7 +109,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1wav_1_1ltxt.html b/structstdex_1_1wav_1_1ltxt.html index 8d61557a9..739661878 100644 --- a/structstdex_1_1wav_1_1ltxt.html +++ b/structstdex_1_1wav_1_1ltxt.html @@ -161,7 +161,7 @@ Friends
diff --git a/structstdex_1_1wav_1_1note-members.html b/structstdex_1_1wav_1_1note-members.html index 78ea7276a..73d8cab36 100644 --- a/structstdex_1_1wav_1_1note-members.html +++ b/structstdex_1_1wav_1_1note-members.html @@ -103,7 +103,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1wav_1_1note.html b/structstdex_1_1wav_1_1note.html index c6b2461fe..9ed20a509 100644 --- a/structstdex_1_1wav_1_1note.html +++ b/structstdex_1_1wav_1_1note.html @@ -137,7 +137,7 @@ Friends
diff --git a/structstdex_1_1wav_1_1silence-members.html b/structstdex_1_1wav_1_1silence-members.html index 4f7972196..704404f26 100644 --- a/structstdex_1_1wav_1_1silence-members.html +++ b/structstdex_1_1wav_1_1silence-members.html @@ -102,7 +102,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1wav_1_1silence.html b/structstdex_1_1wav_1_1silence.html index 6fd084227..23723c287 100644 --- a/structstdex_1_1wav_1_1silence.html +++ b/structstdex_1_1wav_1_1silence.html @@ -133,7 +133,7 @@ Friends
diff --git a/structstdex_1_1wav_1_1wave-members.html b/structstdex_1_1wav_1_1wave-members.html index ebbb59d6b..00187e26f 100644 --- a/structstdex_1_1wav_1_1wave-members.html +++ b/structstdex_1_1wav_1_1wave-members.html @@ -100,7 +100,7 @@ $(function(){ initResizable(false); });
diff --git a/structstdex_1_1wav_1_1wave.html b/structstdex_1_1wav_1_1wave.html index 976456471..535c3d86e 100644 --- a/structstdex_1_1wav_1_1wave.html +++ b/structstdex_1_1wav_1_1wave.html @@ -136,7 +136,7 @@ id_t type = 0
diff --git a/sys__info_8hpp_source.html b/sys__info_8hpp_source.html index f35cb666e..182c4b3bd 100644 --- a/sys__info_8hpp_source.html +++ b/sys__info_8hpp_source.html @@ -352,7 +352,7 @@ $(function(){ initResizable(false); });
diff --git a/system_8hpp_source.html b/system_8hpp_source.html index dac256aa9..dce5f53a9 100644 --- a/system_8hpp_source.html +++ b/system_8hpp_source.html @@ -285,23 +285,46 @@ $(function(){ initResizable(false); });
231 T* m_data;
232 };
233
-
237 struct SafeArrayDestroy_delete
-
238 {
-
242 void operator()(_In_ LPSAFEARRAY sa) const
-
243 {
-
244 SafeArrayDestroy(sa);
-
245 }
-
246 };
-
247
-
251 struct SysFreeString_delete
-
252 {
-
256 void operator()(_In_ BSTR sa) const
-
257 {
-
258 SysFreeString(sa);
-
259 }
-
260 };
-
261#endif
-
262}
+
234 template <class T>
+
235 class safearray_accessor_with_size : public safearray_accessor<T>
+
236 {
+
237 public:
+
238 safearray_accessor_with_size(_In_ LPSAFEARRAY sa) : safearray_accessor<T>(sa)
+
239 {
+
240 m_size = SafeArrayGetElemsize(sa);
+
241 for (UINT d = 1, dim = SafeArrayGetDim(sa); d <= dim; ++d) {
+
242 long ubound, lbound;
+
243 if (FAILED(SafeArrayGetUBound(sa, d, &ubound)) ||
+
244 FAILED(SafeArrayGetLBound(sa, d, &lbound)))
+
245 throw std::invalid_argument("SafeArrayGet[UL]Bound failed");
+
246 m_size *= static_cast<size_t>(ubound) - lbound + 1;
+
247 }
+
248 m_size /= sizeof(T);
+
249 }
+
250
+
254 size_t size() const { return m_size; }
+
255
+
256 protected:
+
257 size_t m_size;
+
258 };
+
259
+
263 struct SafeArrayDestroy_delete
+
264 {
+
268 void operator()(_In_ LPSAFEARRAY sa) const
+
269 {
+
270 SafeArrayDestroy(sa);
+
271 }
+
272 };
+
273
+
277 struct SysFreeString_delete
+
278 {
+
282 void operator()(_In_ BSTR sa) const
+
283 {
+
284 SysFreeString(sa);
+
285 }
+
286 };
+
287#endif
+
288}
Operating system object base class.
Definition system.hpp:142
virtual void close()
Closes object.
Definition system.hpp:183
T get() const noexcept
Returns object handle.
Definition system.hpp:199
@@ -311,7 +334,7 @@ $(function(){ initResizable(false); });
diff --git a/unicode_8hpp_source.html b/unicode_8hpp_source.html index c66672e94..13577404c 100644 --- a/unicode_8hpp_source.html +++ b/unicode_8hpp_source.html @@ -832,7 +832,7 @@ $(function(){ initResizable(false); });
diff --git a/unionstdex_1_1md2__t-members.html b/unionstdex_1_1md2__t-members.html index 17abbaaa8..bb18d64ea 100644 --- a/unionstdex_1_1md2__t-members.html +++ b/unionstdex_1_1md2__t-members.html @@ -104,7 +104,7 @@ $(function(){ initResizable(false); });
diff --git a/unionstdex_1_1md2__t.html b/unionstdex_1_1md2__t.html index aae93ff09..9d905a360 100644 --- a/unionstdex_1_1md2__t.html +++ b/unionstdex_1_1md2__t.html @@ -138,7 +138,7 @@ Friends
diff --git a/unionstdex_1_1sha256__t-members.html b/unionstdex_1_1sha256__t-members.html index 5fbf7a69b..813325fa9 100644 --- a/unionstdex_1_1sha256__t-members.html +++ b/unionstdex_1_1sha256__t-members.html @@ -104,7 +104,7 @@ $(function(){ initResizable(false); });
diff --git a/unionstdex_1_1sha256__t.html b/unionstdex_1_1sha256__t.html index c0b8151c8..9ee5f2a75 100644 --- a/unionstdex_1_1sha256__t.html +++ b/unionstdex_1_1sha256__t.html @@ -138,7 +138,7 @@ Friends diff --git a/unionstdex_1_1sha__t-members.html b/unionstdex_1_1sha__t-members.html index ec54d0ab1..30d88bc57 100644 --- a/unionstdex_1_1sha__t-members.html +++ b/unionstdex_1_1sha__t-members.html @@ -104,7 +104,7 @@ $(function(){ initResizable(false); }); diff --git a/unionstdex_1_1sha__t.html b/unionstdex_1_1sha__t.html index a5f59fbda..2bf43ae8e 100644 --- a/unionstdex_1_1sha__t.html +++ b/unionstdex_1_1sha__t.html @@ -138,7 +138,7 @@ Friends diff --git a/uuid_8hpp_source.html b/uuid_8hpp_source.html index 121bbb023..b1ac701b9 100644 --- a/uuid_8hpp_source.html +++ b/uuid_8hpp_source.html @@ -114,137 +114,139 @@ $(function(){ initResizable(false); });
20
21namespace stdex
22{
-
29 inline void uuidtostr(_Out_writes_z_(39) char str[39], _In_ const uuid_t& id)
-
30 {
-
31 stdex_assert(str);
-
32#ifdef _WIN32
-
33 _snprintf_s_l(str, 39, _TRUNCATE, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", NULL,
-
34 id.Data1,
-
35 static_cast<unsigned int>(id.Data2),
-
36 static_cast<unsigned int>(id.Data3),
-
37 static_cast<unsigned int>(id.Data4[0]), static_cast<unsigned int>(id.Data4[1]),
-
38 static_cast<unsigned int>(id.Data4[2]), static_cast<unsigned int>(id.Data4[3]), static_cast<unsigned int>(id.Data4[4]), static_cast<unsigned int>(id.Data4[5]), static_cast<unsigned int>(id.Data4[6]), static_cast<unsigned int>(id.Data4[7]));
-
39#else
-
40 snprintf(str, 39, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
-
41 *reinterpret_cast<const uint32_t*>(&id[0]),
-
42 static_cast<unsigned int>(*reinterpret_cast<const uint16_t*>(&id[4])),
-
43 static_cast<unsigned int>(*reinterpret_cast<const uint16_t*>(&id[6])),
-
44 static_cast<unsigned int>(id[8]), static_cast<unsigned int>(id[9]),
-
45 static_cast<unsigned int>(id[10]), static_cast<unsigned int>(id[11]), static_cast<unsigned int>(id[12]), static_cast<unsigned int>(id[13]), static_cast<unsigned int>(id[14]), static_cast<unsigned int>(id[15]));
-
46#endif
-
47 }
-
48
-
55 inline void uuidtostr(_Out_writes_z_(39) wchar_t str[39], _In_ const uuid_t& id)
-
56 {
-
57 stdex_assert(str);
-
58#ifdef _WIN32
-
59 _snwprintf_s_l(str, 39, _TRUNCATE, L"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", NULL,
-
60 id.Data1,
-
61 static_cast<unsigned int>(id.Data2),
-
62 static_cast<unsigned int>(id.Data3),
-
63 static_cast<unsigned int>(id.Data4[0]), static_cast<unsigned int>(id.Data4[1]),
-
64 static_cast<unsigned int>(id.Data4[2]), static_cast<unsigned int>(id.Data4[3]), static_cast<unsigned int>(id.Data4[4]), static_cast<unsigned int>(id.Data4[5]), static_cast<unsigned int>(id.Data4[6]), static_cast<unsigned int>(id.Data4[7]));
-
65#else
-
66 swprintf(str, 39, L"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", NULL,
-
67 *reinterpret_cast<const uint32_t*>(&id[0]),
-
68 static_cast<unsigned int>(*reinterpret_cast<const uint16_t*>(&id[4])),
-
69 static_cast<unsigned int>(*reinterpret_cast<const uint16_t*>(&id[6])),
-
70 static_cast<unsigned int>(id[8]), static_cast<unsigned int>(id[9]),
-
71 static_cast<unsigned int>(id[10]), static_cast<unsigned int>(id[11]), static_cast<unsigned int>(id[12]), static_cast<unsigned int>(id[13]), static_cast<unsigned int>(id[14]), static_cast<unsigned int>(id[15]));
-
72#endif
-
73 }
-
74
-
84 template <class T> inline _Success_(return != 0) bool strtouuid(
-
85 _In_reads_or_z_opt_(count) const T* str,
-
86 _In_ size_t count,
-
87 _Out_ uuid_t& id)
-
88 {
-
89 size_t i = 0, j;
-
90 uint64_t n;
-
91
-
92 for (; i < count && str[i] && stdex::isspace(str[i]); ++i);
-
93 if (i >= count || str[i] != '{') return false;
-
94 ++i;
-
95 for (; i < count && str[i] && stdex::isspace(str[i]); ++i);
-
96 n = stdex::strtou64(&str[i], count - i, &j, 16);
-
97 if (n > UINT32_MAX) return false;
-
98#ifdef _WIN32
-
99 id.Data1 = static_cast<unsigned long>(n);
-
100#else
-
101 * reinterpret_cast<uint32_t*>(&id[0]) = static_cast<uint32_t>(n);
-
102#endif
-
103 i += j;
-
104 for (; i < count && str[i] && stdex::isspace(str[i]); ++i);
-
105 if (i >= count || str[i] != '-') return false;
-
106 ++i;
-
107 for (; i < count && str[i] && stdex::isspace(str[i]); ++i);
-
108 n = stdex::strtou64(&str[i], count - i, &j, 16);
-
109 if (n > UINT16_MAX) return false;
-
110#ifdef _WIN32
-
111 id.Data2 = static_cast<unsigned short>(n);
-
112#else
-
113 * reinterpret_cast<uint16_t*>(&id[4]) = static_cast<uint16_t>(n);
-
114#endif
-
115 i += j;
-
116 for (; i < count && str[i] && stdex::isspace(str[i]); ++i);
-
117 if (i >= count || str[i] != '-') return false;
-
118 ++i;
-
119 for (; i < count && str[i] && stdex::isspace(str[i]); ++i);
-
120 n = stdex::strtou64(&str[i], count - i, &j, 16);
-
121 if (n > UINT16_MAX) return false;
-
122#ifdef _WIN32
-
123 id.Data3 = static_cast<unsigned short>(n);
-
124#else
-
125 * reinterpret_cast<uint16_t*>(&id[6]) = static_cast<uint16_t>(n);
-
126#endif
-
127 i += j;
-
128 for (; i < count && str[i] && stdex::isspace(str[i]); ++i);
-
129 if (i >= count || str[i] != '-') return false;
-
130 ++i;
-
131 for (; i < count && str[i] && stdex::isspace(str[i]); ++i);
-
132 n = stdex::strtou64(&str[i], count - i, &j, 16);
-
133 if (n > UINT16_MAX) return false;
-
134#ifdef _WIN32
-
135 id.Data4[0] = static_cast<unsigned char>((n >> 8) & 0xff);
-
136 id.Data4[1] = static_cast<unsigned char>((n) & 0xff);
-
137#else
-
138 id[8] = static_cast<unsigned char>((n >> 8) & 0xff);
-
139 id[9] = static_cast<unsigned char>((n) & 0xff);
-
140#endif
-
141 i += j;
-
142 for (; i < count && str[i] && stdex::isspace(str[i]); ++i);
-
143 if (i >= count && str[i] != '-') return false;
-
144 ++i;
-
145 for (; i < count && str[i] && stdex::isspace(str[i]); ++i);
-
146 n = stdex::strtou64(&str[i], count - i, &j, 16);
-
147 if (n > 0xffffffffffff) return false;
-
148#ifdef _WIN32
-
149 id.Data4[2] = static_cast<unsigned char>((n >> 40) & 0xff);
-
150 id.Data4[3] = static_cast<unsigned char>((n >> 32) & 0xff);
-
151 id.Data4[4] = static_cast<unsigned char>((n >> 24) & 0xff);
-
152 id.Data4[5] = static_cast<unsigned char>((n >> 16) & 0xff);
-
153 id.Data4[6] = static_cast<unsigned char>((n >> 8) & 0xff);
-
154 id.Data4[7] = static_cast<unsigned char>((n) & 0xff);
-
155#else
-
156 id[10] = static_cast<unsigned char>((n >> 40) & 0xff);
-
157 id[11] = static_cast<unsigned char>((n >> 32) & 0xff);
-
158 id[12] = static_cast<unsigned char>((n >> 24) & 0xff);
-
159 id[13] = static_cast<unsigned char>((n >> 16) & 0xff);
-
160 id[14] = static_cast<unsigned char>((n >> 8) & 0xff);
-
161 id[15] = static_cast<unsigned char>((n) & 0xff);
-
162#endif
-
163 i += j;
-
164 for (; i < count && str[i] && stdex::isspace(str[i]); ++i);
-
165 if (i >= count || str[i] != '}') return false;
-
166 ++i;
-
167 for (; i < count && str[i] && stdex::isspace(str[i]); ++i);
-
168 return i >= count || !str[i];
-
169 }
-
170}
+
27 constexpr size_t uuid_str_max = 39;
+
28
+
35 inline void uuidtostr(_Out_writes_z_(uuid_str_max) char str[uuid_str_max], _In_ const uuid_t& id)
+
36 {
+
37 stdex_assert(str);
+
38#ifdef _WIN32
+
39 _snprintf_s_l(str, uuid_str_max, _TRUNCATE, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", NULL,
+
40 id.Data1,
+
41 static_cast<unsigned int>(id.Data2),
+
42 static_cast<unsigned int>(id.Data3),
+
43 static_cast<unsigned int>(id.Data4[0]), static_cast<unsigned int>(id.Data4[1]),
+
44 static_cast<unsigned int>(id.Data4[2]), static_cast<unsigned int>(id.Data4[3]), static_cast<unsigned int>(id.Data4[4]), static_cast<unsigned int>(id.Data4[5]), static_cast<unsigned int>(id.Data4[6]), static_cast<unsigned int>(id.Data4[7]));
+
45#else
+
46 snprintf(str, uuid_str_max, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
+
47 *reinterpret_cast<const uint32_t*>(&id[0]),
+
48 static_cast<unsigned int>(*reinterpret_cast<const uint16_t*>(&id[4])),
+
49 static_cast<unsigned int>(*reinterpret_cast<const uint16_t*>(&id[6])),
+
50 static_cast<unsigned int>(id[8]), static_cast<unsigned int>(id[9]),
+
51 static_cast<unsigned int>(id[10]), static_cast<unsigned int>(id[11]), static_cast<unsigned int>(id[12]), static_cast<unsigned int>(id[13]), static_cast<unsigned int>(id[14]), static_cast<unsigned int>(id[15]));
+
52#endif
+
53 }
+
54
+
61 inline void uuidtostr(_Out_writes_z_(uuid_str_max) wchar_t str[uuid_str_max], _In_ const uuid_t& id)
+
62 {
+
63 stdex_assert(str);
+
64#ifdef _WIN32
+
65 _snwprintf_s_l(str, uuid_str_max, _TRUNCATE, L"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", NULL,
+
66 id.Data1,
+
67 static_cast<unsigned int>(id.Data2),
+
68 static_cast<unsigned int>(id.Data3),
+
69 static_cast<unsigned int>(id.Data4[0]), static_cast<unsigned int>(id.Data4[1]),
+
70 static_cast<unsigned int>(id.Data4[2]), static_cast<unsigned int>(id.Data4[3]), static_cast<unsigned int>(id.Data4[4]), static_cast<unsigned int>(id.Data4[5]), static_cast<unsigned int>(id.Data4[6]), static_cast<unsigned int>(id.Data4[7]));
+
71#else
+
72 swprintf(str, uuid_str_max, L"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", NULL,
+
73 *reinterpret_cast<const uint32_t*>(&id[0]),
+
74 static_cast<unsigned int>(*reinterpret_cast<const uint16_t*>(&id[4])),
+
75 static_cast<unsigned int>(*reinterpret_cast<const uint16_t*>(&id[6])),
+
76 static_cast<unsigned int>(id[8]), static_cast<unsigned int>(id[9]),
+
77 static_cast<unsigned int>(id[10]), static_cast<unsigned int>(id[11]), static_cast<unsigned int>(id[12]), static_cast<unsigned int>(id[13]), static_cast<unsigned int>(id[14]), static_cast<unsigned int>(id[15]));
+
78#endif
+
79 }
+
80
+
90 template <class T> inline _Success_(return != 0) bool strtouuid(
+
91 _In_reads_or_z_opt_(count) const T* str,
+
92 _In_ size_t count,
+
93 _Out_ uuid_t& id)
+
94 {
+
95 size_t i = 0, j;
+
96 uint64_t n;
+
97
+
98 for (; i < count && str[i] && stdex::isspace(str[i]); ++i);
+
99 if (i >= count || str[i] != '{') return false;
+
100 ++i;
+
101 for (; i < count && str[i] && stdex::isspace(str[i]); ++i);
+
102 n = stdex::strtou64(&str[i], count - i, &j, 16);
+
103 if (n > UINT32_MAX) return false;
+
104#ifdef _WIN32
+
105 id.Data1 = static_cast<unsigned long>(n);
+
106#else
+
107 * reinterpret_cast<uint32_t*>(&id[0]) = static_cast<uint32_t>(n);
+
108#endif
+
109 i += j;
+
110 for (; i < count && str[i] && stdex::isspace(str[i]); ++i);
+
111 if (i >= count || str[i] != '-') return false;
+
112 ++i;
+
113 for (; i < count && str[i] && stdex::isspace(str[i]); ++i);
+
114 n = stdex::strtou64(&str[i], count - i, &j, 16);
+
115 if (n > UINT16_MAX) return false;
+
116#ifdef _WIN32
+
117 id.Data2 = static_cast<unsigned short>(n);
+
118#else
+
119 * reinterpret_cast<uint16_t*>(&id[4]) = static_cast<uint16_t>(n);
+
120#endif
+
121 i += j;
+
122 for (; i < count && str[i] && stdex::isspace(str[i]); ++i);
+
123 if (i >= count || str[i] != '-') return false;
+
124 ++i;
+
125 for (; i < count && str[i] && stdex::isspace(str[i]); ++i);
+
126 n = stdex::strtou64(&str[i], count - i, &j, 16);
+
127 if (n > UINT16_MAX) return false;
+
128#ifdef _WIN32
+
129 id.Data3 = static_cast<unsigned short>(n);
+
130#else
+
131 * reinterpret_cast<uint16_t*>(&id[6]) = static_cast<uint16_t>(n);
+
132#endif
+
133 i += j;
+
134 for (; i < count && str[i] && stdex::isspace(str[i]); ++i);
+
135 if (i >= count || str[i] != '-') return false;
+
136 ++i;
+
137 for (; i < count && str[i] && stdex::isspace(str[i]); ++i);
+
138 n = stdex::strtou64(&str[i], count - i, &j, 16);
+
139 if (n > UINT16_MAX) return false;
+
140#ifdef _WIN32
+
141 id.Data4[0] = static_cast<unsigned char>((n >> 8) & 0xff);
+
142 id.Data4[1] = static_cast<unsigned char>((n) & 0xff);
+
143#else
+
144 id[8] = static_cast<unsigned char>((n >> 8) & 0xff);
+
145 id[9] = static_cast<unsigned char>((n) & 0xff);
+
146#endif
+
147 i += j;
+
148 for (; i < count && str[i] && stdex::isspace(str[i]); ++i);
+
149 if (i >= count && str[i] != '-') return false;
+
150 ++i;
+
151 for (; i < count && str[i] && stdex::isspace(str[i]); ++i);
+
152 n = stdex::strtou64(&str[i], count - i, &j, 16);
+
153 if (n > 0xffffffffffff) return false;
+
154#ifdef _WIN32
+
155 id.Data4[2] = static_cast<unsigned char>((n >> 40) & 0xff);
+
156 id.Data4[3] = static_cast<unsigned char>((n >> 32) & 0xff);
+
157 id.Data4[4] = static_cast<unsigned char>((n >> 24) & 0xff);
+
158 id.Data4[5] = static_cast<unsigned char>((n >> 16) & 0xff);
+
159 id.Data4[6] = static_cast<unsigned char>((n >> 8) & 0xff);
+
160 id.Data4[7] = static_cast<unsigned char>((n) & 0xff);
+
161#else
+
162 id[10] = static_cast<unsigned char>((n >> 40) & 0xff);
+
163 id[11] = static_cast<unsigned char>((n >> 32) & 0xff);
+
164 id[12] = static_cast<unsigned char>((n >> 24) & 0xff);
+
165 id[13] = static_cast<unsigned char>((n >> 16) & 0xff);
+
166 id[14] = static_cast<unsigned char>((n >> 8) & 0xff);
+
167 id[15] = static_cast<unsigned char>((n) & 0xff);
+
168#endif
+
169 i += j;
+
170 for (; i < count && str[i] && stdex::isspace(str[i]); ++i);
+
171 if (i >= count || str[i] != '}') return false;
+
172 ++i;
+
173 for (; i < count && str[i] && stdex::isspace(str[i]); ++i);
+
174 return i >= count || !str[i];
+
175 }
+
176}
diff --git a/vector__queue_8hpp_source.html b/vector__queue_8hpp_source.html index affe54675..9f641cc7c 100644 --- a/vector__queue_8hpp_source.html +++ b/vector__queue_8hpp_source.html @@ -462,7 +462,7 @@ $(function(){ initResizable(false); }); diff --git a/watchdog_8hpp_source.html b/watchdog_8hpp_source.html index 6c8be1e12..062fa326b 100644 --- a/watchdog_8hpp_source.html +++ b/watchdog_8hpp_source.html @@ -196,7 +196,7 @@ $(function(){ initResizable(false); }); diff --git a/wav_8hpp_source.html b/wav_8hpp_source.html index eb1d63d17..ae96419a9 100644 --- a/wav_8hpp_source.html +++ b/wav_8hpp_source.html @@ -725,15 +725,15 @@ $(function(){ initResizable(false); });
657}
Helper class for read/write of records to/from memory.
Definition idrec.hpp:291
static constexpr T_id id()
Returns record id.
Definition idrec.hpp:310
-
Basic seekable stream operations.
Definition stream.hpp:819
+
Basic seekable stream operations.
Definition stream.hpp:815
Basic stream operations.
Definition stream.hpp:85
-
Limits file reading/writing to a predefined window.
Definition stream.hpp:1696
-
In-memory file.
Definition stream.hpp:3223
-
virtual fsize_t size() const
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:3925
-
size_t write_stream(basic &stream, size_t amount=SIZE_MAX)
Writes content of another stream.
Definition stream.hpp:3840
-
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:3904
-
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:3930
-
const void * data() const
Returns pointer to data.
Definition stream.hpp:3553
+
Limits file reading/writing to a predefined window.
Definition stream.hpp:1692
+
In-memory file.
Definition stream.hpp:3219
+
virtual fsize_t size() const
Returns file size Should the file size cannot be determined, the method returns fsize_max and it does...
Definition stream.hpp:3921
+
size_t write_stream(basic &stream, size_t amount=SIZE_MAX)
Writes content of another stream.
Definition stream.hpp:3836
+
virtual fpos_t seek(foff_t offset, seek_t how=seek_t::beg)
Seeks to specified relative file position.
Definition stream.hpp:3900
+
virtual void truncate()
Sets file size - truncates the remainder of file content from the current file position to the end of...
Definition stream.hpp:3926
+
const void * data() const
Returns pointer to data.
Definition stream.hpp:3549
Extended cue.
Definition wav.hpp:397
uint32_t duration
How many samples from the cue point the region or section spans.
Definition wav.hpp:398
std::string note
Note text.
Definition wav.hpp:406
@@ -797,7 +797,7 @@ $(function(){ initResizable(false); }); diff --git a/windows_8h_source.html b/windows_8h_source.html index ac82fbeca..930214a19 100644 --- a/windows_8h_source.html +++ b/windows_8h_source.html @@ -119,7 +119,7 @@ $(function(){ initResizable(false); }); diff --git a/zlib_8hpp_source.html b/zlib_8hpp_source.html index da1043258..72a8bcd00 100644 --- a/zlib_8hpp_source.html +++ b/zlib_8hpp_source.html @@ -276,7 +276,7 @@ $(function(){ initResizable(false); });
state_t state() const
Returns stream state after last operation.
Definition stream.hpp:176
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:102
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:120
-
Modifies data on the fly when reading from/writing to a source stream. Could also be used to modify r...
Definition stream.hpp:1024
+
Modifies data on the fly when reading from/writing to a source stream. Could also be used to modify r...
Definition stream.hpp:1020
Decompresses data when reading from a stream.
Definition zlib.hpp:120
virtual size_t read(_Out_writes_bytes_to_opt_(length, return) void *data, size_t length)
Reads block of data from the stream.
Definition zlib.hpp:137
Compresses data when writing to a stream.
Definition zlib.hpp:51
@@ -284,7 +284,7 @@ $(function(){ initResizable(false); });