Browse Source

chennels prototyped

devel
Ludovic 'Archivist' Lagouardette 3 years ago
parent
commit
86226c67c1
1 changed files with 15 additions and 1 deletions
  1. +15
    -1
      include/gp/vfs/channel_fs.hpp

+ 15
- 1
include/gp/vfs/channel_fs.hpp View File

@ -9,7 +9,21 @@ namespace gp {
class self_filling_channel{
error_function on_error;
pop_function filler;
public:
gp::buffer<char>::associated_iterator push(gp::buffer<char> input) {
return filler(input);
}
gp::buffer<char>::associated_iterator pop(gp::buffer<char> dest) {
on_error();
return dest.begin();
}
};
template<typename error_function, typename push_function>
class input_channel{
error_function on_error;
push_function filler;
gp::buffer<char>::associated_iterator push(gp::buffer<char> input) {
on_error();
return input.begin();

Loading…
Cancel
Save