#include <futilities.h>
Inheritance diagram for rpa::streambuf_visitor:
Public Member Functions | |
streambuf_visitor (strmbuf_t *aStrmBuf) | |
virtual void | visit (const char *aPtr, size_t aLen) const |
Private Types | |
typedef std::basic_streambuf< char > | strmbuf_t |
Private Attributes | |
strmbuf_t * | _StrmBuf |
Necessary because the data may not be written in one go, if it requests too much mapped memory. So, 'mmap_ctrl' takes this object, maps the file piece by piece, and calls the visitor each time a segment is mapped.
typedef std::basic_streambuf<char> rpa::streambuf_visitor::strmbuf_t [private] |
rpa::streambuf_visitor::streambuf_visitor | ( | strmbuf_t * | aStrmBuf | ) | [inline] |
The streambuf is used later : The functor writes into it the content of a segment.
void rpa::streambuf_visitor::visit | ( | const char * | aPtr, | |
size_t | aLen | |||
) | const [virtual] |
This is called for each segment of file mapped into memory. It is not possible to assume that all the file can be mapped in one go.
Implements rpa::visitor.
strmbuf_t* rpa::streambuf_visitor::_StrmBuf [private] |