#include <iostream_decls.h>
Public Member Functions | |
| BasicScheduledStreambuf (int f, BaseScheduler &s, std::ios_base::openmode m=std::ios_base::in|std::ios_base::out, std::streamsize insize=4096, std::streamsize outsize=4096) | |
| Constructor. | |
| operator int () const | |
| Cast operator to get the file descriptor. | |
Protected Member Functions | |
| int_type | underflow () |
| std::basic_streambuf::underflow implementation. | |
| int_type | pbackfail (int_type ch) |
| std::basic_streambuf::pbackfail implementation. | |
| int | sync () |
| std::basic_streambuf::sync implementation. | |
| int_type | overflow (int_type ch=traits_type::eof()) |
| std::basic_streambuf::overflow implementation. | |
It takes the interface of std::basic_streambuf and implements all the necessary methods to do non-blocking IO in a way that seems to be blocking.
| BasicScheduledStreambuf< C, T >::BasicScheduledStreambuf | ( | int | f, | |
| BaseScheduler & | s, | |||
| std::ios_base::openmode | m = std::ios_base::in|std::ios_base::out, |
|||
| std::streamsize | insize = 4096, |
|||
| std::streamsize | outsize = 4096 | |||
| ) |
Constructor.
| f | is the file descriptor to do IO on | |
| s | is the scheduler to work with | |
| m | is the open mode. |
| insize | is the buffer size for reading | |
| outsize | is the buffer size for writing |
| BasicScheduledStreambuf< C, T >::int_type BasicScheduledStreambuf< C, T >::underflow | ( | ) | [protected] |
std::basic_streambuf::underflow implementation.
| BasicScheduledStreambuf< C, T >::int_type BasicScheduledStreambuf< C, T >::pbackfail | ( | int_type | ch | ) | [protected] |
std::basic_streambuf::pbackfail implementation.
| ch | is the character to be prepended |
| int BasicScheduledStreambuf< C, T >::sync | ( | ) | [protected] |
std::basic_streambuf::sync implementation.
| BasicScheduledStreambuf< C, T >::int_type BasicScheduledStreambuf< C, T >::overflow | ( | int_type | ch = traits_type::eof() |
) | [protected] |
std::basic_streambuf::overflow implementation.
| ch | is the character to be appended |
| BasicScheduledStreambuf< C, T >::operator int | ( | ) | const [inline] |
Cast operator to get the file descriptor.
1.5.1