IBR-DTNSuite
0.8
|
Stream buffer for external applications. More...
#include <appstreambuf.h>
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()) |
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.
anonymous enum |
Definition at line 41 of file appstreambuf.h.
Definition at line 43 of file appstreambuf.h.
ibrcommon::appstreambuf::appstreambuf | ( | std::string | command, |
appstreambuf::Mode | mode | ||
) |
Constructor of the appstreambuf
command | A command to execute and connect to with output or input. |
mode | Specifies the mode to work read only or write only. |
Definition at line 13 of file appstreambuf.cpp.
References MODE_READ.
ibrcommon::appstreambuf::~appstreambuf | ( | ) | [virtual] |
Definition at line 29 of file appstreambuf.cpp.
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().
std::char_traits< char >::int_type ibrcommon::appstreambuf::underflow | ( | ) | [protected, virtual] |
Definition at line 35 of file appstreambuf.cpp.