- soft renames (ie, old names still available via typedefs) for more reasonable names and more coverage with std stream variants. The old names could be a bit cryptic. For example, uiliststream (== an unallocated/external list storage), which is written as std::ispanstream for C++23. Could similarly argue that IListStream is better named as ICharStream, since it is an input stream of characters and the internal storage mechanism (List or something else) is mostly irrelevant. Extending the coverage to include all std stream variants, and simply rewrap them for OpenFOAM IOstream types. This simplifies the inheritance patterns and allows reuse of icharstream/ocharstream as a drop-in replace for istringstream/ostringstream in other wrappers. Classes: * icharstream / ICharStream [old: none / IListStream] * ocharstream / OCharStream [old: none / OListStream] * ispanstream / ISpanStream [old: uiliststream / UIListStream] * ospanstream / OSpanStream [old: none / UOListStream] Possible new uses : read file contents into a buffer, broadcast buffer contents to other ranks and then transfer into an icharstream to be read from. This avoid the multiple intermediate copies that would be associated when using an istringstream. - Use size doubling instead of block-wise incremental for ocharstream (OCharStream). This corresponds to the sizing behaviour as per std::stringstream (according to gcc-11 includes) STYLE: drop Foam_IOstream_extras constructors for memory streams - transitional/legacy constructors but not used in any code
11 lines
209 B
C
11 lines
209 B
C
// Compatibility include.
|
|
|
|
#ifndef FoamCompat_UOListStream_H
|
|
#define FoamCompat_UOListStream_H
|
|
|
|
#include "SpanStream.H"
|
|
|
|
#endif
|
|
|
|
// ************************************************************************* //
|