|
BDE 4.39.x Production Release
|
#include <ball_recordbuffer.h>
Provide a protocol (or pure interface) for managing record handles (specifically instances of bsl::shared_ptr<Record>).
Public Member Functions | |
| virtual | ~RecordBuffer () |
| virtual void | popBack ()=0 |
| virtual void | popFront ()=0 |
| virtual int | pushBack (const bsl::shared_ptr< Record > &handle)=0 |
| virtual int | pushFront (const bsl::shared_ptr< Record > &handle)=0 |
| virtual void | removeAll ()=0 |
| virtual void | beginSequence ()=0 |
| virtual void | endSequence ()=0 |
| virtual const bsl::shared_ptr< Record > & | back () const =0 |
| virtual const bsl::shared_ptr< Record > & | front () const =0 |
| virtual int | length () const =0 |
|
virtual |
Remove all record handles stored in this record buffer and destroy this record buffer.
|
pure virtual |
Return a reference of the shared pointer referring to the record positioned at the back of this record buffer.
beginSequence method and 0 < length(). Implemented in ball::FixedSizeRecordBuffer.
|
pure virtual |
Lock this record buffer so that a sequence of method invocations on this record buffer can occur uninterrupted by other threads. The buffer will remain locked until endSequence is called.
Implemented in ball::FixedSizeRecordBuffer.
|
pure virtual |
Unlock this record buffer, thus allowing other threads to access it.
beginSequence method. Implemented in ball::FixedSizeRecordBuffer.
|
pure virtual |
Return a reference of the shared pointer referring to the record positioned at the front of this record buffer.
beginSequence method and 0 < length(). Implemented in ball::FixedSizeRecordBuffer.
|
pure virtual |
Return the number of record handles in this record buffer.
Implemented in ball::FixedSizeRecordBuffer.
|
pure virtual |
Remove from this record buffer the record handle positioned at the back of the buffer.
0 < length(). Implemented in ball::FixedSizeRecordBuffer.
|
pure virtual |
Remove from this record buffer the record handle positioned at the front of the buffer.
0 < length(). Implemented in ball::FixedSizeRecordBuffer.
|
pure virtual |
Append the specified handle to the back of this record buffer. Return 0 on success, and a non-zero value otherwise.
pushBack request (which implies that, after a successful call to pushBack, length is not guaranteed to be more than one, and an unsuccessful call to pushBack is permitted to leave the buffer empty). Implemented in ball::FixedSizeRecordBuffer.
|
pure virtual |
Insert the specified handle at the front of this record buffer. Return 0 on success, and a non-zero value otherwise.
pushFront request (which implies that, after a successful call to pushFront, length is not guaranteed to be more than one, and an unsuccessful call to pushFront is permitted to leave the buffer empty). Implemented in ball::FixedSizeRecordBuffer.
|
pure virtual |
Remove all record handles stored in this record buffer.
length() is now 0. Implemented in ball::FixedSizeRecordBuffer.