mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: simplify stream construction
- with IOstreamOption there are no cases where we need to construct top-level streams (eg, IFstream, OFstream) with additional information about the internal IOstream 'version' (eg, version: 2.0). Makes it more convenient to open files with a specified format/compression combination - no clutter of specifying the version
This commit is contained in:
@ -80,23 +80,22 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from pathname
|
||||
//- Construct from pathname (ASCII, uncompressed)
|
||||
explicit OBJstream
|
||||
(
|
||||
const fileName& pathname,
|
||||
IOstreamOption streamOpt = IOstreamOption()
|
||||
);
|
||||
|
||||
//- Construct from pathname
|
||||
//- Construct from pathname, format (uncompressed)
|
||||
OBJstream
|
||||
(
|
||||
const fileName& pathname,
|
||||
IOstreamOption::streamFormat fmt,
|
||||
IOstreamOption::versionNumber ver = IOstreamOption::currentVersion,
|
||||
IOstreamOption::compressionType cmp = IOstreamOption::UNCOMPRESSED
|
||||
)
|
||||
:
|
||||
OBJstream(pathname, IOstreamOption(fmt, ver, cmp))
|
||||
OBJstream(pathname, IOstreamOption(fmt, cmp))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user