17 #ifndef COM_BORA_SOFTWARE__BALAU_RESOURCE__HTTPS_UTF8_TO_32_READ_RESOURCE 18 #define COM_BORA_SOFTWARE__BALAU_RESOURCE__HTTPS_UTF8_TO_32_READ_RESOURCE 21 #include <Balau/Resource/Impl/HttpsSource.hpp> 23 #include <boost/iostreams/code_converter.hpp> 24 #include <boost/iostreams/stream.hpp> 36 private:
using idevice_utf8_utf32 = boost::iostreams::code_converter<std::istream, std::codecvt_utf8<char32_t, 0x10ffff, std::consume_header>>;
37 private:
using istream_utf8_utf32 = boost::iostreams::stream<idevice_utf8_utf32>;
47 : url(std::move(rhs.url))
48 , utf8Stream(std::move(rhs.utf8Stream))
50 , utf32Stream(std::move(rhs.utf32Stream)) {}
60 public:
const Uri &
uri()
const override;
68 private: std::unique_ptr<Https> url;
69 private: std::unique_ptr<boost::iostreams::stream<Impl::HttpsSource>> utf8Stream;
70 private: std::istream & ref;
71 private: std::unique_ptr<istream_utf8_utf32> utf32Stream;
76 #endif // COM_BORA_SOFTWARE__BALAU_RESOURCE__HTTPS_UTF8_TO_32_READ_RESOURCE A read-only UTF-8 resource which is read as UTF-32 characters.
void close() override
Close the stream(s) in the resource.
Definition: HttpsUtf8To32ReadResource.hpp:62
A read-only UTF-8 resource which is read in as UTF-32 characters.
Definition: Utf8To32ReadResource.hpp:28
An HTTPS URL.
Definition: Https.hpp:30
const Uri & uri() const override
Get the URI associated with this resource.
An abstract universal resource identifier.
Definition: Uri.hpp:131
The unified resource class hierarchy.
Definition: ByteReadResource.hpp:24
A read-only HTTP UTF-8 resource which is read as UTF-32 characters.
Definition: HttpsUtf8To32ReadResource.hpp:35
HttpsUtf8To32ReadResource(const Https &http_)
Create a new HTTPS UTF-8 to UTF-32 read resource from the supplied HTTPS URI.
std::u32istream & readStream() override
Get the input stream of the UTF-8 to UTF-32 read resource.
Definition: HttpsUtf8To32ReadResource.hpp:56