ENH: direct access to wrapped ifstream/ofstream with compression (#1805)
- previously hidden as Detail::[IO]FstreamAllocator, now exposed directly as [io]fstreamPointer, which allows reuse for std::ifstream, std::ofstream wrapping, without the additional ISstream, OSstream layers. These stream pointers have some characteristics similar to a unique_ptr. - restrict direct gzstream usage to two files (fstreamPointers.C, gzstream.C) which improves localization and makes it simpler to enable/disable with the `HAVE_LIBZ` define. The HAVE_LIBZ define is currently simply hard-coded in the Make/options. If compiled WITHOUT libz support: - reading gz files : FatalError - writing gz files : emit warning and downgrade to uncompressed - warn if compression is specified in the case controlDict and downgrade to uncompressed ENH: minor updates to gzstream interface for C++11 - support construct/open with std::string for the file names. CONFIG: provisioning for have_libz detection as wmake/script
Showing
- applications/test/fstreamPointer/Make/files 3 additions, 0 deletionsapplications/test/fstreamPointer/Make/files
- applications/test/fstreamPointer/Make/options 2 additions, 0 deletionsapplications/test/fstreamPointer/Make/options
- applications/test/fstreamPointer/Test-fstreamPointer.C 114 additions, 0 deletionsapplications/test/fstreamPointer/Test-fstreamPointer.C
- src/OpenFOAM/Make/files 1 addition, 0 deletionssrc/OpenFOAM/Make/files
- src/OpenFOAM/Make/options 4 additions, 2 deletionssrc/OpenFOAM/Make/options
- src/OpenFOAM/db/IOstreams/Fstreams/Fstream.H 4 additions, 19 deletionssrc/OpenFOAM/db/IOstreams/Fstreams/Fstream.H
- src/OpenFOAM/db/IOstreams/Fstreams/IFstream.C 46 additions, 76 deletionssrc/OpenFOAM/db/IOstreams/Fstreams/IFstream.C
- src/OpenFOAM/db/IOstreams/Fstreams/IFstream.H 7 additions, 38 deletionssrc/OpenFOAM/db/IOstreams/Fstreams/IFstream.H
- src/OpenFOAM/db/IOstreams/Fstreams/OFstream.C 34 additions, 85 deletionssrc/OpenFOAM/db/IOstreams/Fstreams/OFstream.C
- src/OpenFOAM/db/IOstreams/Fstreams/OFstream.H 6 additions, 42 deletionssrc/OpenFOAM/db/IOstreams/Fstreams/OFstream.H
- src/OpenFOAM/db/IOstreams/Fstreams/fstreamPointer.H 262 additions, 0 deletionssrc/OpenFOAM/db/IOstreams/Fstreams/fstreamPointer.H
- src/OpenFOAM/db/IOstreams/Fstreams/fstreamPointers.C 231 additions, 0 deletionssrc/OpenFOAM/db/IOstreams/Fstreams/fstreamPointers.C
- src/OpenFOAM/db/IOstreams/IOstreams/Istream.C 1 addition, 1 deletionsrc/OpenFOAM/db/IOstreams/IOstreams/Istream.C
- src/OpenFOAM/db/IOstreams/gzstream/gzstream.C 21 additions, 7 deletionssrc/OpenFOAM/db/IOstreams/gzstream/gzstream.C
- src/OpenFOAM/db/IOstreams/gzstream/gzstream.h 24 additions, 1 deletionsrc/OpenFOAM/db/IOstreams/gzstream/gzstream.h
- src/OpenFOAM/db/Time/TimeIO.C 20 additions, 11 deletionssrc/OpenFOAM/db/Time/TimeIO.C
- src/fileFormats/stl/STLCore.C 43 additions, 61 deletionssrc/fileFormats/stl/STLCore.C
- wmake/scripts/have_libz 126 additions, 0 deletionswmake/scripts/have_libz