#include <wvmagiccircle.h>
Inherits WvError.
Collaboration diagram for WvMagicCircle:
Definition at line 14 of file wvmagiccircle.h.
Public Member Functions | |
WvMagicCircle (size_t size) | |
Creates a shared memory circular queue. | |
~WvMagicCircle () | |
size_t | used () |
size_t | left () |
size_t | put (const void *data, size_t len) |
size_t | get (void *data, size_t len) |
size_t | skip (size_t len) |
virtual bool | isok () const |
By default, returns true if geterr() == 0. | |
virtual int | geterr () const |
If isok() is false, return the system error number corresponding to the error, -1 for a special error string (which you can obtain with errstr()) or 0 on end of file. | |
virtual WvString | errstr () const |
virtual void | seterr (int _errnum) |
Set the errnum variable -- we have an error. | |
void | seterr (WvStringParm specialerr) |
void | seterr (WVSTRING_FORMAT_DECL) |
void | seterr (const WvError &err) |
void | noerr () |
Reset our error state - there's no error condition anymore. | |
Protected Attributes | |
WvShmZone | shm |
volatile int & | head |
volatile int & | tail |
int | size |
char * | circle |
int | errnum |
WvString | errstring |
|
Creates a shared memory circular queue. "size" is the number of elements to store Definition at line 11 of file wvmagiccircle.cc. References WvShmZone::cbuf, circle, WvError::geterr(), head, WvError::seterr(), shm, size, and tail. |
|
Definition at line 26 of file wvmagiccircle.cc. |
|
Reimplemented in WvHTTPStream, and WvStreamClone. Definition at line 20 of file wverror.cc. References WvError::errnum, and WvError::errstring. Referenced by UniIniGen::commit(), WvStreamClone::errstr(), main(), UniIniGen::refresh(), WvError::seterr(), UniConfDaemon::setupsslsocket(), UniConfDaemon::setuptcpsocket(), UniConfDaemon::setupunixsocket(), WvX509Mgr::WvX509Mgr(), and WvHttpPool::~WvHttpPool(). |
|
Definition at line 72 of file wvmagiccircle.cc. References circle, head, size, and used(). Referenced by WvDsp::uread(). |
|
If isok() is false, return the system error number corresponding to the error, -1 for a special error string (which you can obtain with errstr()) or 0 on end of file. If isok() is true, returns an undefined number. Reimplemented in WvHTTPStream, and WvStreamClone. Definition at line 44 of file wverror.h. References WvError::errnum. Referenced by UniIniGen::commit(), WvStreamClone::geterr(), WvEncoderStream::isok(), WvConf::load_file(), WvLockDev::lock(), main(), WvHTTPStream::pre_select(), UniIniGen::refresh(), WvConf::save(), WvError::seterr(), WvMagicCircle(), and WvHttpPool::~WvHttpPool(). |
|
By default, returns true if geterr() == 0. Might be overridden so that isok() == false even though no error code has been specified. Reimplemented in UniClientConn, WvBufStream, WvDailyEvent, WvDsp, WvEncoderStream, WvFDStream, WvHTTPStream, WvIStreamList, WvLog, WvPamStream, WvSSLStream, IWvStream, WvStream, WvStreamClone, WvStreamList, WvTCPConn, WvTimeoutStream, WvTimeStream, WvFileWatcher, and UniConfDaemon. Definition at line 35 of file wverror.h. References WvError::errnum. Referenced by WvBdbHashBase::add(), WvBdbHashBase::exists(), WvBdbHashBase::find(), WvStreamList::isok(), WvStream::isok(), main(), WvBdbHash< K, D >::Iter::next(), WvBdbHashBase::IterBase::next(), WvBdbHashBase::remove(), WvRSAEncoder::WvRSAEncoder(), WvRSAStream::WvRSAStream(), WvX509Mgr::WvX509Mgr(), and WvBdbHashBase::zap(). |
|
Definition at line 34 of file wvmagiccircle.h. Referenced by put(), and WvDsp::uwrite(). |
|
Reset our error state - there's no error condition anymore.
Definition at line 65 of file wverror.h. References WvError::errnum. Referenced by WvBdbHashBase::opendb(), and WvError::WvError(). |
|
Definition at line 44 of file wvmagiccircle.cc. References circle, head, left(), log, size, and tail. Referenced by WvDsp::uwrite(). |
|
Definition at line 64 of file wverror.cc. References WvError::errstr(), WvError::geterr(), and WvError::seterr(). |
|
Reimplemented in WvStream. Definition at line 60 of file wverror.h. References WvError::seterr(), and WVSTRING_FORMAT_CALL. |
|
Reimplemented in WvStream. Definition at line 54 of file wverror.cc. References WvError::errnum, WvError::errstring, WvError::seterr(), and WvStringParm. |
|
Set the errnum variable -- we have an error. If called more than once, seterr() doesn't change the error code away from the previous one. That way, we remember the _original_ cause of our problems. Subclasses may want to override seterr(int) to shut themselves down (eg. WvStream::close()) when an error condition is set. Note that seterr(WvString) will call seterr(-1). Reimplemented in WvStream. Definition at line 47 of file wverror.cc. References WvError::errnum. Referenced by WvBdbHashBase::add(), WvBdbHashBase::closedb(), WvBdbHashBase::exists(), WvBdbHashBase::find(), main(), WvBdbHashBase::IterBase::next(), WvBdbHashBase::opendb(), WvBdbHashBase::remove(), WvStream::seterr(), WvError::seterr(), WvMagicCircle(), WvRSAKey::WvRSAKey(), WvShmZone::WvShmZone(), and WvBdbHashBase::zap(). |
|
Definition at line 94 of file wvmagiccircle.cc. |
|
Definition at line 32 of file wvmagiccircle.cc. References head, size, and tail. Referenced by get(), left(), WvDsp::post_select(), WvDsp::pre_select(), skip(), and WvDsp::uread(). |
|
Definition at line 30 of file wvmagiccircle.h. Referenced by get(), put(), and WvMagicCircle(). |
|
Definition at line 22 of file wverror.h. Referenced by WvError::errstr(), WvError::geterr(), WvError::isok(), WvError::noerr(), and WvError::seterr(). |
|
Definition at line 23 of file wverror.h. Referenced by WvError::errstr(), and WvError::seterr(). |
|
Definition at line 28 of file wvmagiccircle.h. Referenced by get(), put(), skip(), used(), and WvMagicCircle(). |
|
Definition at line 26 of file wvmagiccircle.h. Referenced by WvMagicCircle(). |
|
Definition at line 29 of file wvmagiccircle.h. Referenced by get(), left(), put(), skip(), used(), and WvMagicCircle(). |
|
Definition at line 28 of file wvmagiccircle.h. Referenced by put(), used(), and WvMagicCircle(). |