|
virtual | ~IPQbuffer () |
| Destructor. More...
|
|
int | getElementSize () const |
| Returns the size of each element in the queue in bytes. More...
|
|
::std::string | getFileName () const |
| Get the filename. More...
|
|
unsigned int | getGetOffset () const |
| Useful only for debugging. More...
|
|
unsigned int | getLostElementCount () const |
| Get the number of elements lost on the last read. More...
|
|
unsigned int | getMaxOffset () const |
| Useful only for debugging. More...
|
|
int | getNumAvailable () const |
| Gets the number of unread elements available in the queue. More...
|
|
unsigned int | getPutOffset () const |
| Used internally, but made public for debugging. More...
|
|
int | getQueueSize () const |
| Returns the allocated size of the queue. More...
|
|
bool | isDataAvailable () const |
| Checks to see if there are any unread elements (would a read not block?). More...
|
|
bool | isEmpty () const |
| Checks to see if the queue is empty. More...
|
|
unsigned int | read () |
| Read the oldest unread element from the queue. More...
|
|
bool | readNewest () |
| Get the newest element from the queue (with locking). More...
|
|
bool | readNewestConditionalCopy () |
| Reads and copies the newest element from the queue into the localElement buffer, but only if has not been previously read. More...
|
|
void | setNoneAvailable () |
| Sets the number of available (unread) elements to zero (catches up) More...
|
|
virtual | ~IPQbufferBase () |
| Destructor Making this d'tor virtual causes the d'tors of inheriting classes to be called first when the d'tor is called on this base class (polymorphic), followed by the base class d'tor. More...
|
|
virtual int | getElementSize () const =0 |
| Returns the size of each element in the queue in bytes. More...
|
|
virtual ::std::string | getFileName () const =0 |
| Get the filename. More...
|
|
virtual unsigned int | getGetOffset () const =0 |
| Useful only for debugging. More...
|
|
virtual unsigned int | getLostElementCount () const =0 |
| Get the number of elements lost on the last read. More...
|
|
virtual unsigned int | getMaxOffset () const =0 |
| Useful only for debugging. More...
|
|
virtual int | getNumAvailable () const =0 |
| Gets the number of unread elements available in the queue. More...
|
|
virtual unsigned int | getPutOffset () const =0 |
|
virtual int | getQueueSize () const =0 |
| Returns the allocated size of the queue. More...
|
|
virtual bool | isDataAvailable () const =0 |
| Checks to see if there are any unread elements (would a read not block?). More...
|
|
virtual bool | isEmpty () const =0 |
| Checks to see if the queue is empty. More...
|
|
virtual unsigned int | read ()=0 |
| Read the oldest unread element from the queue. More...
|
|
virtual bool | readNewest ()=0 |
| Get the newest element from the queue (with locking). More...
|
|
virtual bool | readNewestConditionalCopy ()=0 |
| Reads and copies the newest element from the queue into the localElement buffer, but only if has not been previously read. More...
|
|
virtual void | setNoneAvailable ()=0 |
| Sets the number of available (unread) elements to zero (catches up) More...
|
|
virtual | ~IPQinterface ()=0 |
| Destructor Making this d'tor virtual causes the d'tors of inheriting classes to be called first when the d'tor is called on this base class (polymorphic), followed by the base class d'tor. More...
|
|
|
| IPQbuffer (void *localElement, int elementSize, const ::std::string &filename, bool isCreator=false, int nElements=0, unsigned int testOffset=0) |
| Constructor. More...
|
|
::std::string | getTrimmedFilename () |
| Get the trimmed filename. More...
|
|
void | init () |
| This does all the real constructor work. More...
|
|
| IPQbufferBase (void *localElement, int elementSize, const ::std::string &filename, bool isCreator=false, int nElements=0, unsigned int testOffset=0) |
| Constructor for a read/write queue. More...
|
|
void | trimShmemFilename () |
| Shared memory filenames must contain only one '/' and it must be the first character; this routine fixes up the filename. More...
|
|
void | write () |
| Put an element into the queue. More...
|
|
virtual void | write ()=0 |
| Useful only for debugging. More...
|
|
Shared memory storage mechanism for an IPQ buffer.
Once the shared memory is formed it persists as a file in /dev/shm. It can be manually deleted if so desired (say, if it corrupted). On Linux 2.4 kernels it can have a maximum size of one half of physical memory.
This class is a base class for reader and writer classes. See for e.g.
- See Also
- IPQreader, IPQwriter
Definition at line 37 of file IPQbuffer.h.