|
Haio 0.2.X
Homebrew Asset IO/CDN
|
Namespaces | |
| namespace | Detail |
Classes | |
| struct | Stage |
Functions | |
| template<typename A, typename B> | |
| constexpr auto | operator| (Stage< A > first, Stage< B > second) |
| template<typename Fn> | |
| auto | operator>> (std::istream &in, const Stage< Fn > &stage) |
Variables | |
| constexpr auto | Decode |
| template<Color To> | |
| constexpr auto | Convert |
| template<Format F> | |
| constexpr auto | Encode |
lazily composed conversions, checked when the chain is built rather than when it runs. a stage is a callable returning Result<T>, and chaining two short circuits: the second never runs if the first failed, and the error rides through untouched.
const auto pipeline = Decode | Convert<Color::ETC1> | Encode<Format::KTX2>; const auto result = pipeline(bytes);
the names repeat those in Haio::Codecs on purpose: a stage is a value that composes, not a function that runs, so Pipe::Encode<Format::KTX2> is a thing you hold and Codecs::Encode<Format::KTX2, Color::ETC1> is a thing you call.
| auto Haio::Pipe::operator>> | ( | std::istream & | in, |
| const Stage< Fn > & | stage ) |
the result type follows whatever the chain ends in, image or blob
Definition at line 80 of file haio_pipe.hpp.

|
inlineconstexpr |
the target colour is named, the source is deduced from whatever arrives
Definition at line 66 of file haio_pipe.hpp.
|
inlineconstexpr |
the bytes say what they are, nobody has to know beforehand.
Definition at line 60 of file haio_pipe.hpp.
|
inlineconstexpr |
the container is named, the colour comes from the image in hand
Definition at line 73 of file haio_pipe.hpp.