Mark Olesen
33f9ae5080
ENH: improvements to IOstreamOption
...
* Support default values for format/compress enum lookups.
- Avoids situations where the preferred default format is not ASCII.
For example, with dictionary input:
format binar;
The typing mistake would previously have caused formatEnum to
default to ASCII. We can now properly control its behaviour.
IOstream::formatEnum
(
dict.get<word>("format"), IOstream::BINARY
);
Allowing us to switch ascii/binary, using BINARY by default even in
the case of spelling mistakes. The mistakes are flagged, but the
return value can be non-ASCII.
* The format/compression lookup behave as pass-through if the lookup
string is empty.
- Allows the following to work without complaint
IOstream::formatEnum
(
dict.getOrDefault("format", word::null), IOstream::BINARY
);
- Or use constructor-like failsafe method
IOstream::formatEnum("format", dict, IOstream::BINARY);
- Apply the same behaviour with setting stream format/compression
from a word.
is.format("binar");
will emit a warning, but leave the stream format UNCHANGED
* Rationalize versionNumber construction
- constexpr constructors where possible.
Default construct is the "currentVersion"
- Construct from token to shift the burden to versionNumber.
Support token as argument to version().
Now:
is.version(headerDict.get<token>("version"));
or failsafe constructor method
is.version
(
IOstreamOption::versionNumber("version", headerDict)
);
Before (controlled input):
is.version
(
IOstreamOption::versionNumber
(
headerDict.get<float>("version")
)
);
Old, uncontrolled input - has been removed:
is.version(headerDict.lookup("version"));
* improve consistency, default behaviour for IOstreamOption construct
- constexpr constructors where possible
- add copy construct with change of format.
- construct IOstreamOption from streamFormat is now non-explicit.
This is a commonly expected result with no ill-effects
2020-02-18 21:51:35 +01:00
..
2020-02-06 10:06:20 +01:00
2019-04-03 20:24:30 +02:00
2019-11-26 21:07:11 +01:00
2019-11-18 09:13:58 +01:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-12-05 11:47:19 +00:00
2019-12-05 11:47:19 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-11-26 21:07:11 +01:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-12-23 09:49:23 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-11-15 11:26:45 +01:00
2019-12-05 11:47:19 +00:00
2019-12-23 09:49:23 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-11-26 21:07:11 +01:00
2019-10-31 14:48:44 +00:00
2020-02-18 12:21:01 +00:00
2019-12-23 09:49:23 +00:00
2019-10-31 14:48:44 +00:00
2019-12-05 11:47:19 +00:00
2019-10-31 14:48:44 +00:00
2019-12-05 11:47:19 +00:00
2019-12-05 11:47:19 +00:00
2019-10-31 14:48:44 +00:00
2019-11-11 18:50:00 +01:00
2019-10-31 14:48:44 +00:00
2019-12-05 11:47:19 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-12-05 11:47:19 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-11-25 18:15:31 +01:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-12-14 00:11:28 +01:00
2019-10-31 14:48:44 +00:00
2019-11-26 21:07:11 +01:00
2019-10-31 14:48:44 +00:00
2019-12-13 12:33:23 +01:00
2019-10-31 14:48:44 +00:00
2019-12-23 09:49:23 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-12-05 11:47:19 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-12-05 11:47:19 +00:00
2019-12-23 09:49:23 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-12-05 11:47:19 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-12-05 11:47:19 +00:00
2019-12-23 09:49:23 +00:00
2017-10-26 23:59:18 +02:00
2019-12-05 11:47:19 +00:00
2019-12-05 11:47:19 +00:00
2019-10-31 14:48:44 +00:00
2019-12-05 11:47:19 +00:00
2019-12-05 11:47:19 +00:00
2019-10-31 14:48:44 +00:00
2019-12-23 09:49:23 +00:00
2019-12-05 11:47:19 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-11-13 18:54:10 +01:00
2019-12-05 11:47:19 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-12-05 11:47:19 +00:00
2019-10-31 14:48:44 +00:00
2019-12-05 11:47:19 +00:00
2019-10-31 14:48:44 +00:00
2019-12-05 11:47:19 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-12-23 09:49:23 +00:00
2019-10-31 14:48:44 +00:00
2019-12-12 11:22:13 +00:00
2019-04-03 20:24:30 +02:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-11-26 21:07:11 +01:00
2019-10-31 14:48:44 +00:00
2020-02-18 13:51:20 +01:00
2019-12-05 11:47:19 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-12-05 11:47:19 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-12-06 17:23:59 +01:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-12-23 09:49:23 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-12-23 09:49:23 +00:00
2019-12-23 09:49:23 +00:00
2020-02-18 13:51:20 +01:00
2019-12-23 09:49:23 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2020-02-18 12:21:01 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2020-01-22 10:00:03 +01:00
2019-10-31 14:48:44 +00:00
2019-12-05 11:47:19 +00:00
2019-10-31 14:48:44 +00:00
2019-12-05 11:47:19 +00:00
2019-12-16 11:22:15 +01:00
2019-10-31 14:48:44 +00:00
2019-11-21 09:40:00 +01:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-12-23 09:49:23 +00:00
2019-12-23 09:49:23 +00:00
2019-12-23 09:49:23 +00:00
2019-12-07 16:55:18 +01:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2020-02-18 21:51:35 +01:00
2019-10-31 14:48:44 +00:00
2020-01-31 17:01:22 +01:00
2019-12-05 11:47:19 +00:00
2019-12-05 11:47:19 +00:00
2018-11-13 15:21:13 +01:00
2020-02-18 12:21:01 +00:00
2020-02-18 12:21:01 +00:00
2019-12-23 09:49:23 +00:00
2019-11-11 18:50:00 +01:00
2019-12-13 12:10:53 +01:00
2019-10-31 14:48:44 +00:00
2019-11-26 21:07:11 +01:00
2019-12-13 12:33:23 +01:00
2020-02-18 13:51:20 +01:00
2019-11-26 21:07:11 +01:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2020-02-18 12:21:01 +00:00
2020-02-18 12:21:01 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-11-15 11:26:45 +01:00
2020-02-18 12:21:01 +00:00
2020-02-18 12:21:01 +00:00
2019-11-15 13:32:27 +01:00
2019-11-15 12:56:23 +01:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-12-13 10:05:28 +01:00
2019-10-31 14:48:44 +00:00
2019-11-26 21:07:11 +01:00
2018-11-13 15:21:13 +01:00
2019-11-05 13:08:21 +01:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-12-05 11:47:19 +00:00
2019-02-24 17:32:13 +01:00
2019-10-31 14:48:44 +00:00
2019-12-05 11:47:19 +00:00
2017-04-07 08:17:43 +02:00
2019-12-23 09:49:23 +00:00
2019-10-31 14:48:44 +00:00
2019-11-26 21:07:11 +01:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-10-31 14:48:44 +00:00
2019-12-23 09:49:23 +00:00