IBR-DTNSuite  0.8
ibrcommon::appstreambuf Class Reference

Stream buffer for external applications. More...

#include <appstreambuf.h>

List of all members.

Public Types

enum  { BUF_SIZE = 512 }
enum  Mode { MODE_READ = 0, MODE_WRITE = 1 }

Public Member Functions

 appstreambuf (std::string command, appstreambuf::Mode mode)
virtual ~appstreambuf ()

Protected Member Functions

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

Detailed Description

Stream buffer for external applications.

A appstreambuf is a buffer provides access to the standard input / output of a system call. Embedded in an iostream objects it is possible to read and write to a external application like to a common stream object.

This stream buffer is limited to read only or write only. A bidirectional access is not possible.

Definition at line 38 of file appstreambuf.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
BUF_SIZE 

Definition at line 41 of file appstreambuf.h.

Enumerator:
MODE_READ 
MODE_WRITE 

Definition at line 43 of file appstreambuf.h.


Constructor & Destructor Documentation

ibrcommon::appstreambuf::appstreambuf ( std::string  command,
appstreambuf::Mode  mode 
)

Constructor of the appstreambuf

Parameters:
commandA command to execute and connect to with output or input.
modeSpecifies the mode to work read only or write only.

Definition at line 13 of file appstreambuf.cpp.

References MODE_READ.

Definition at line 29 of file appstreambuf.cpp.


Member Function Documentation

std::char_traits< char >::int_type ibrcommon::appstreambuf::overflow ( std::char_traits< char >::int_type  m = traits_type::eof()) [protected, virtual]

Definition at line 60 of file appstreambuf.cpp.

Referenced by sync().

int ibrcommon::appstreambuf::sync ( ) [protected, virtual]

Definition at line 52 of file appstreambuf.cpp.

References overflow().

Here is the call graph for this function:

std::char_traits< char >::int_type ibrcommon::appstreambuf::underflow ( ) [protected, virtual]

Definition at line 35 of file appstreambuf.cpp.


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