|
DocWire SDK
DocWire SDK: Award-winning modern data processing in C++20. SourceForge Community Choice & Microsoft support. AI-driven processing. Supports nearly 100 data formats, including email boxes and OCR. Boost efficiency in text extraction, web data extraction, data mining, document analysis. Offline processing possible for security and confidentiality
|
imemorystream is a stream that wraps a std::span of const std::byte and provides a compatible interface with std::istream. More...
#include <memorystream.h>
Public Member Functions | |
| imemorystream (std::span< const std::byte > source) | |
| Construct a new imemorystream object. More... | |
imemorystream is a stream that wraps a std::span of const std::byte and provides a compatible interface with std::istream.
C++20 introduced std::span, which is a utility class that provides a way to access a contiguous sequence of elements. imemorystream is a stream that wraps std::span<const std::byte> and provides a compatible interface with std::istream.
Unlike std::istringstream, imemorystream does not make a copy of the underlying data. It uses a std::span to provide a way to access the data.
There are several alternatives to using imemorystream, such as std::istringstream, but they have a few limitations:
imemorystream is a drop-in replacement for std::istrstream and is compatible with C++20 and later.
Definition at line 112 of file memorystream.h.
|
inlineexplicit |
Construct a new imemorystream object.
| source | The source data to be used by the stream. |
Definition at line 120 of file memorystream.h.