IBR-DTNSuite  0.10
ibrcommon::iobuffer Class Reference

#include <iobuffer.h>

Inheritance diagram for ibrcommon::iobuffer:
Inheritance graph
Collaboration diagram for ibrcommon::iobuffer:
Collaboration graph

Public Member Functions

 iobuffer (const size_t buffer=2048)
 
virtual ~iobuffer ()
 
void finalize ()
 

Protected Member Functions

virtual int sync ()
 
virtual std::char_traits< char >
::int_type 
overflow (std::char_traits< char >::int_type=std::char_traits< char >::eof())
 
virtual std::char_traits< char >
::int_type 
underflow ()
 

Detailed Description

This class provided a way to exchange buffered data between two threads where one thread is writing to the buffer and the other is reading from.

Definition at line 36 of file iobuffer.h.

Constructor & Destructor Documentation

ibrcommon::iobuffer::iobuffer ( const size_t  buffer = 2048)

Definition at line 28 of file iobuffer.cpp.

ibrcommon::iobuffer::~iobuffer ( )
virtual

Definition at line 36 of file iobuffer.cpp.

Member Function Documentation

void ibrcommon::iobuffer::finalize ( )

finalize the stream an set the EOF flag

Definition at line 40 of file iobuffer.cpp.

References ibrcommon::Conditional::signal().

Referenced by dtn::net::HTTPConvergenceLayer::__cancellation(), and dtn::net::HTTPConvergenceLayer::componentRun().

Here is the call graph for this function:

std::char_traits< char >::int_type ibrcommon::iobuffer::overflow ( std::char_traits< char >::int_type  c = std::char_traits<char>::eof())
protectedvirtual

Definition at line 56 of file iobuffer.cpp.

References ibrcommon::Conditional::signal(), and ibrcommon::Conditional::wait().

Referenced by sync().

Here is the call graph for this function:

int ibrcommon::iobuffer::sync ( )
protectedvirtual

Definition at line 47 of file iobuffer.cpp.

References overflow().

Here is the call graph for this function:

std::char_traits< char >::int_type ibrcommon::iobuffer::underflow ( )
protectedvirtual

Definition at line 96 of file iobuffer.cpp.

References ibrcommon::Conditional::signal(), and ibrcommon::Conditional::wait().

Here is the call graph for this function:


The documentation for this class was generated from the following files: