BasicScheduledStreambuf< C, T > Class Template Reference

A streambuf implementation working with this library. More...

#include <iostream_decls.h>

List of all members.

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.


Detailed Description

template<class C = char, class T = std::char_traits<C>>
class BasicScheduledStreambuf< C, T >

A streambuf implementation working with this library.

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.


Constructor & Destructor Documentation

template<class C, class T>
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.

Parameters:
f is the file descriptor to do IO on
s is the scheduler to work with
m is the open mode.
See also:
std::ios_base
Parameters:
insize is the buffer size for reading
outsize is the buffer size for writing


Member Function Documentation

template<class C, class T>
BasicScheduledStreambuf< C, T >::int_type BasicScheduledStreambuf< C, T >::underflow (  )  [protected]

std::basic_streambuf::underflow implementation.

Returns:
-1 on error, 0 otherwise

template<class C, class T>
BasicScheduledStreambuf< C, T >::int_type BasicScheduledStreambuf< C, T >::pbackfail ( int_type  ch  )  [protected]

std::basic_streambuf::pbackfail implementation.

Parameters:
ch is the character to be prepended
Returns:
eof() on failure not_eof(ch) otherwise

template<class C, class T>
int BasicScheduledStreambuf< C, T >::sync (  )  [protected]

std::basic_streambuf::sync implementation.

Returns:
-1 on error, 0 otherwise

template<class C, class T>
BasicScheduledStreambuf< C, T >::int_type BasicScheduledStreambuf< C, T >::overflow ( int_type  ch = traits_type::eof()  )  [protected]

std::basic_streambuf::overflow implementation.

Parameters:
ch is the character to be appended
Returns:
eof() on failure not_eof(ch) otherwise

template<class C, class T>
BasicScheduledStreambuf< C, T >::operator int (  )  const [inline]

Cast operator to get the file descriptor.

Returns:
the file descriptor


The documentation for this class was generated from the following files:
Generated on Sat Feb 7 01:26:51 2009 by  doxygen 1.5.1