17 #ifndef COM_BORA_SOFTWARE__BALAU_RESOURCE__ZIP_ENTRY_UTF8_TO_32_READ_RESOURCE 18 #define COM_BORA_SOFTWARE__BALAU_RESOURCE__ZIP_ENTRY_UTF8_TO_32_READ_RESOURCE 22 #include <Balau/Resource/Impl/ZipEntrySource.hpp> 24 #include <boost/iostreams/code_converter.hpp> 25 #include <boost/iostreams/stream.hpp> 39 private:
using idevice_utf8_utf32 = boost::iostreams::code_converter<std::istream, std::codecvt_utf8<char32_t, 0x10ffff, std::consume_header>>;
40 private:
using istream_utf8_utf32 = boost::iostreams::stream<idevice_utf8_utf32>;
46 , utf8Stream(std::move(rhs.utf8Stream))
48 , utf32Stream(std::move(rhs.utf32Stream)) {}
54 public:
const Uri &
uri()
const override;
70 private: std::unique_ptr<boost::iostreams::stream<Impl::ZipEntrySource>> utf8Stream;
71 private: std::istream & ref;
72 private: std::unique_ptr<istream_utf8_utf32> utf32Stream;
77 #endif // COM_BORA_SOFTWARE__BALAU_RESOURCE__ZIP_ENTRY_UTF8_TO_32_READ_RESOURCE A read-only UTF-8 resource which is read as UTF-32 characters.
A read-only UTF-8 resource which is read in as UTF-32 characters.
Definition: Utf8To32ReadResource.hpp:28
An abstract universal resource identifier.
Definition: Uri.hpp:131
const Uri & uri() const override
Get the URI associated with this resource.
void close() override
Close the stream(s) in the resource.
Definition: ZipEntryUtf8To32ReadResource.hpp:50
The unified resource class hierarchy.
Definition: ByteReadResource.hpp:24
std::u32istream & readStream() override
Get the input stream of the UTF-8 to UTF-32 read resource.
Definition: ZipEntryUtf8To32ReadResource.hpp:56
An entry in a zip archive on the local file system.
Definition: ZipEntry.hpp:35
A read-only entry in a zip file which is read as UTF-8 characters and implicitly converted to UTF-32 ...
Definition: ZipEntryUtf8To32ReadResource.hpp:38
A read-only resource which is read as bytes.