The file stream class has already been quite improved with #397 , but we can do more.
file_stream
[ ] Rename to adiar::istream and adiar::levelized_istream to better match std.
[ ] Rename pull into read or get (similar to std::istream)
[ ] The private functions __read and __can_read use a constexpr conditional. But, we can encapsulate this more cleanly by specialising the template outside of the class instead.
[ ] Provide iterator-like operator overloading (*, ->, ++).
[ ] Provide std::istream like syntax operator overloading (>>).
[ ] The direction is better encapsulated as an enum with values: Forward and Backward.
[ ] Add can_seek as an overload for can_pull().
New Features
[ ] Add a third direction enum value of Bidirectional. This is a mere wrapper on tpie::file_stream.
file
[ ] Add begin() and rbegin() that creates the file stream in the desired direction.
[ ] Make end() and rend() a simple sentinel that overloads == into a can_pull check.
file_writer
[ ] Rename into adiar::ostream and adiar::levelized_ostream to better match std.
[ ] Provide std::ostream like operator overloading (<<).
The file stream class has already been quite improved with #397 , but we can do more.
file_stream
adiar::istream
andadiar::levelized_istream
to better match std.std::istream
)__read
and__can_read
use a constexpr conditional. But, we can encapsulate this more cleanly by specialising the template outside of the class instead.*
,->
,++
).>>
).can_seek
as an overload forcan_pull()
.New Features
tpie::file_stream
.file
==
into a can_pull check.file_writer
adiar::ostream
andadiar::levelized_ostream
to better match std.<<
).