#include <iSMbuf.hh>
Public Types | |
| typedef std::ios::openmode | openmode_type |
| typedef std::ios::seekdir | seekdir_type |
| typedef std::streamoff | off_type |
| typedef std::streampos | pos_type |
Public Member Functions | |
| iSMbuf () | |
| iSMbuf (const char *partition, openmode_type mode=std::ios::in) | |
| ~iSMbuf () | |
| int | eventid (void) const |
| bool | latest (void) const |
| iSMbuf * | open (const char *partition, openmode_type mode=std::ios::in) |
| void | setBCount (int nbuf) |
| bool | waitBuf (bool nowait=false) |
| void | relse (void) |
| int | doallocate (void) |
| int | overflow (int c) |
| int | underflow (void) |
| pos_type | seekoff (off_type off, seekdir_type dir, openmode_type mode) |
| pos_type | seekpos (pos_type off, openmode_type mode) |
| int | sync () |
| typedef std::streamoff iSMbuf::off_type |
Get the offset type from the STL streambuf.
| typedef std::streampos iSMbuf::pos_type |
Get the position type from the STL streambuf.
| iSMbuf::iSMbuf | ( | ) |
Default constructor. The default constructor builds an unopened shared memory stream buffer.
| iSMbuf::iSMbuf | ( | const char * | partition, | |
| openmode_type | mode = std::ios::in | |||
| ) |
Construct an opened shared memory stream buffer. A shared memory stream buffer is created and attached (if possible) to the specified shared memory partition. The partition to be attached is specified by 'partition'. The mode flag is kept for compatibility with the file stream and must be set to ios::in.
| iSMbuf::~iSMbuf | ( | ) |
Shared memory stream buffer destructor.
| int iSMbuf::eventid | ( | void | ) | const |
Get the current buffer event id.
| bool iSMbuf::latest | ( | void | ) | const |
Test for latest buffer in partition.
| iSMbuf* iSMbuf::open | ( | const char * | partition, | |
| openmode_type | mode = std::ios::in | |||
| ) |
Attach a shared memory partition to a stream buffer. The named partition is attached to the stream buffer.
| void iSMbuf::setBCount | ( | int | nbuf | ) |
This parameter controls what fraction of the data read into the shared memory will be copied to the data stream and what part of the shared memory resources can be held allocated the stream. 'nbuf' == 0 indicates data is taken as requested. 'nbuf' == -1 indicates that all data written to the shared memory must be copied to the data stream. 'nbuf'==N indicates that up to N buffers (frames) of data should be held until the stream is ready for them. brief Set the number of segments to be reserved by this consumer.
| bool iSMbuf::waitBuf | ( | bool | nowait = false |
) |
Test whether data are available. If data are available, waitBuf returns true. If data are not immediately available and the nowait argument is true, waitData returns false. Otherwise waitBuf waits for data to arrive or the semaphore wait to be interrupted by a signal. brief Wait for data.
| nowait | If true, waitBuf returns immediately. |
| void iSMbuf::relse | ( | void | ) |
Release a shared memory buffer. brief Release shared memory buffer.
| int iSMbuf::doallocate | ( | void | ) |
Standard streambuf allocation function.
| int iSMbuf::overflow | ( | int | c | ) | [inline] |
Standard streambuf overflow function.
| int iSMbuf::underflow | ( | void | ) |
Standard streambuf read function.
Standard streambuf seek offset function.
| iSMbuf::pos_type iSMbuf::seekpos | ( | pos_type | off, | |
| openmode_type | mode | |||
| ) | [inline] |
Standard streambuf seek position function.
| int iSMbuf::sync | ( | void | ) | [inline] |
Standard streambuf synchronization function.
1.5.4