Hall-D Software
alpha
|
#include <async_filebuf.h>
Public Member Functions | |
async_filebuf (int segsize=1000000, int segcount=3, int lookback=1) | |
virtual | ~async_filebuf () |
async_filebuf * | open (const std::string fname, std::ios::openmode mode) |
async_filebuf * | close () |
std::streamsize | in_avail () |
int | snextc () |
int | sbumpc () |
int | sgetc () |
int | sputbackc (int c) |
int | sungetc () |
Protected Types | |
enum | segment_state { sFull, sEmptying, sEmpty, sFilling } |
Protected Member Functions | |
int | pbackfail (char c=EOF) |
virtual std::streambuf * | setbuf (char *s, std::streamsize n) |
virtual std::streamsize | showmanyc () |
virtual int | uflow () |
virtual int | underflow () |
virtual std::streamsize | xsgetn (char *s, std::streamsize n) |
virtual std::streampos | seekoff (std::streamoff off, std::ios::seekdir way, std::ios::openmode which) |
virtual std::streampos | seekpos (std::streampos pos, std::ios::openmode which) |
int | readloop_initiate () |
int | readloop_terminate () |
int | readloop () |
int | segment () |
int | segoff () |
std::streampos | getpos () |
Protected Attributes | |
char * | buffer |
char * | buffer_start |
char * | buffer_end |
char * | buffer_eback |
char * | buffer_gptr |
char * | buffer_egptr |
std::vector< segment_state > | segment_cond |
std::vector< std::streampos > | segment_pos |
std::vector< std::streamsize > | segment_len |
int | segment_size |
int | segment_count |
int | segment_lookback |
int | segment_backstop |
int | readloop_active |
std::mutex | readloop_lock |
std::condition_variable | readloop_wake |
std::condition_variable | readloop_woke |
std::thread * | readloop_thread |
Definition at line 23 of file async_filebuf.h.
|
protected |
Enumerator | |
---|---|
sFull | |
sEmptying | |
sEmpty | |
sFilling |
Definition at line 180 of file async_filebuf.h.
async_filebuf::async_filebuf | ( | int | segsize = 1000000 , |
int | segcount = 3 , |
||
int | lookback = 1 |
||
) |
Definition at line 20 of file async_filebuf.cc.
References buffer, segment_count, segment_lookback, segment_size, setbuf(), string, and THIS_ASYNCFB.
|
virtual |
Definition at line 40 of file async_filebuf.cc.
References buffer, close(), and THIS_ASYNCFB.
|
inline |
Definition at line 40 of file async_filebuf.h.
References close(), readloop_active, readloop_terminate(), and THIS_ASYNCFB.
Referenced by ~async_filebuf().
|
inlineprotected |
Definition at line 206 of file async_filebuf.h.
References buffer_egptr, buffer_gptr, readloop_active, segment(), segment_len, segment_pos, segoff(), THIS_ASYNCFB, and underflow().
Referenced by readloop_terminate(), seekoff(), seekpos(), and xsgetn().
|
inline |
Definition at line 53 of file async_filebuf.h.
References buffer_egptr, buffer_gptr, readloop_active, and THIS_ASYNCFB.
|
inline |
Definition at line 29 of file async_filebuf.h.
References open(), and THIS_ASYNCFB.
Referenced by HDEVIO::HDEVIO().
|
inlineprotected |
Definition at line 122 of file async_filebuf.h.
References c, and readloop_active.
Referenced by sputbackc(), and sungetc().
|
protected |
Definition at line 100 of file async_filebuf.cc.
References buffer_end, buffer_start, readloop_active, readloop_lock, readloop_wake, readloop_woke, segment_cond, segment_count, segment_len, segment_pos, segment_size, sEmpty, sFilling, sFull, and THIS_ASYNCFB.
Referenced by readloop_initiate().
|
protected |
Definition at line 50 of file async_filebuf.cc.
References buffer_eback, buffer_egptr, buffer_end, buffer_gptr, buffer_start, readloop(), readloop_active, readloop_thread, segment_backstop, segment_cond, segment_count, segment_len, segment_pos, segment_size, sEmpty, and THIS_ASYNCFB.
Referenced by underflow().
|
protected |
Definition at line 73 of file async_filebuf.cc.
References buffer_eback, buffer_egptr, buffer_end, buffer_gptr, getpos(), readloop_active, readloop_lock, readloop_thread, readloop_wake, segment_cond, segment_len, segment_pos, and THIS_ASYNCFB.
|
inline |
Definition at line 76 of file async_filebuf.h.
References buffer_egptr, buffer_gptr, readloop_active, and underflow().
|
protectedvirtual |
Definition at line 161 of file async_filebuf.cc.
References getpos(), readloop_active, readloop_terminate(), seekpos(), segment_lookback, and THIS_ASYNCFB.
|
protectedvirtual |
Definition at line 178 of file async_filebuf.cc.
References buffer_eback, buffer_egptr, buffer_gptr, buffer_start, getpos(), readloop_active, readloop_terminate(), segment(), segment_cond, segment_count, segment_len, segment_lookback, segment_pos, segment_size, sEmptying, sFull, THIS_ASYNCFB, and underflow().
Referenced by seekoff().
|
inlineprotected |
Definition at line 203 of file async_filebuf.h.
References buffer_gptr, buffer_start, and segment_size.
Referenced by getpos(), seekpos(), and underflow().
|
inlineprotected |
Definition at line 204 of file async_filebuf.h.
References buffer_gptr, buffer_start, and segment_size.
Referenced by getpos(), and underflow().
|
inlineprotectedvirtual |
Definition at line 128 of file async_filebuf.h.
References buffer_eback, buffer_egptr, buffer_end, buffer_gptr, buffer_start, readloop_active, and THIS_ASYNCFB.
Referenced by async_filebuf().
|
inline |
Definition at line 87 of file async_filebuf.h.
References buffer_egptr, buffer_gptr, readloop_active, and underflow().
|
inlineprotectedvirtual |
Definition at line 142 of file async_filebuf.h.
References buffer_egptr, buffer_gptr, readloop_active, and underflow().
|
inline |
Definition at line 62 of file async_filebuf.h.
References buffer_egptr, buffer_gptr, readloop_active, THIS_ASYNCFB, and underflow().
|
inline |
Definition at line 97 of file async_filebuf.h.
References buffer_gptr, buffer_start, pbackfail(), readloop_active, and segment_size.
|
inline |
Definition at line 109 of file async_filebuf.h.
References buffer_gptr, buffer_start, pbackfail(), readloop_active, and segment_size.
|
inlineprotectedvirtual |
Definition at line 151 of file async_filebuf.h.
References buffer_gptr, readloop_active, THIS_ASYNCFB, and underflow().
|
protectedvirtual |
Definition at line 128 of file async_filebuf.cc.
References buffer_eback, buffer_egptr, buffer_gptr, buffer_start, readloop_active, readloop_initiate(), readloop_lock, readloop_wake, readloop_woke, segment(), segment_backstop, segment_cond, segment_count, segment_len, segment_lookback, segment_size, segoff(), sEmpty, sEmptying, sFull, and THIS_ASYNCFB.
Referenced by getpos(), sbumpc(), seekpos(), sgetc(), showmanyc(), snextc(), uflow(), and xsgetn().
|
protectedvirtual |
Definition at line 219 of file async_filebuf.cc.
References buffer_egptr, buffer_gptr, getpos(), segment_lookback, THIS_ASYNCFB, and underflow().
|
protected |
Definition at line 173 of file async_filebuf.h.
Referenced by async_filebuf(), and ~async_filebuf().
|
protected |
Definition at line 176 of file async_filebuf.h.
Referenced by readloop_initiate(), readloop_terminate(), seekpos(), setbuf(), and underflow().
|
protected |
Definition at line 178 of file async_filebuf.h.
Referenced by getpos(), in_avail(), readloop_initiate(), readloop_terminate(), sbumpc(), seekpos(), setbuf(), sgetc(), showmanyc(), snextc(), underflow(), and xsgetn().
|
protected |
Definition at line 175 of file async_filebuf.h.
Referenced by readloop(), readloop_initiate(), readloop_terminate(), and setbuf().
|
protected |
Definition at line 177 of file async_filebuf.h.
Referenced by getpos(), in_avail(), readloop_initiate(), readloop_terminate(), sbumpc(), seekpos(), segment(), segoff(), setbuf(), sgetc(), showmanyc(), snextc(), sputbackc(), sungetc(), uflow(), underflow(), and xsgetn().
|
protected |
Definition at line 174 of file async_filebuf.h.
Referenced by readloop(), readloop_initiate(), seekpos(), segment(), segoff(), setbuf(), sputbackc(), sungetc(), and underflow().
|
protected |
Definition at line 188 of file async_filebuf.h.
Referenced by close(), getpos(), in_avail(), pbackfail(), readloop(), readloop_initiate(), readloop_terminate(), sbumpc(), seekoff(), seekpos(), setbuf(), sgetc(), showmanyc(), snextc(), sputbackc(), sungetc(), uflow(), and underflow().
|
protected |
Definition at line 189 of file async_filebuf.h.
Referenced by readloop(), readloop_terminate(), and underflow().
|
protected |
Definition at line 192 of file async_filebuf.h.
Referenced by readloop_initiate(), and readloop_terminate().
|
protected |
Definition at line 190 of file async_filebuf.h.
Referenced by readloop(), readloop_terminate(), and underflow().
|
protected |
Definition at line 191 of file async_filebuf.h.
Referenced by readloop(), and underflow().
|
protected |
Definition at line 187 of file async_filebuf.h.
Referenced by readloop_initiate(), and underflow().
|
protected |
Definition at line 181 of file async_filebuf.h.
Referenced by readloop(), readloop_initiate(), readloop_terminate(), seekpos(), and underflow().
|
protected |
Definition at line 185 of file async_filebuf.h.
Referenced by async_filebuf(), readloop(), readloop_initiate(), seekpos(), and underflow().
|
protected |
Definition at line 183 of file async_filebuf.h.
Referenced by getpos(), readloop(), readloop_initiate(), readloop_terminate(), seekpos(), and underflow().
|
protected |
Definition at line 186 of file async_filebuf.h.
Referenced by async_filebuf(), seekoff(), seekpos(), underflow(), and xsgetn().
|
protected |
Definition at line 182 of file async_filebuf.h.
Referenced by getpos(), readloop(), readloop_initiate(), readloop_terminate(), and seekpos().
|
protected |
Definition at line 184 of file async_filebuf.h.
Referenced by async_filebuf(), readloop(), readloop_initiate(), seekpos(), segment(), segoff(), sputbackc(), sungetc(), and underflow().