Stream
API reference
- Base
- streams
- details
- helpers
- free functions/objects
rili::stream::flushrili::stream::endlReadable& rili::stream::cin()Writable& rili::stream::cout()Writable& rili::stream::cerr()
- "Buffering"/"in memory" streams
std::istream/std::ostreamcompatibility:C FILE*/cstdiocompatibility:
Description
rili/stream is alternative for C++ streams. We hope it have much better error handling
and is easier to correctly extand, specialize and use with user defined types than C++ native streams.
Aditionally our streams seems to be very abstract, so there was no problem to easely implement
for example rili/service/socket synchronous API just by extanding rili/stream for network operation details.
There are 3 main categories of streams: Readable, Writable and Duplex
For conveniance there are implemented basic wrappers for C and C++ native stream API, so you can use them to mix usage of for example
std::ostream and rili::stream::Writable easely in two ways.
Example
#include <rili/Stream.hpp>
void hello(){
rili::stream::cout() << "hello!" << rili::stream::endl;
}