BDE 4.14.0 Production release
Loading...
Searching...
No Matches
ball::RecordBuffer Class Referenceabstract

#include <ball_recordbuffer.h>

Inheritance diagram for ball::RecordBuffer:
ball::FixedSizeRecordBuffer

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
 Return the number of record handles in this record buffer.
 

Detailed Description

Provide a protocol (or pure interface) for managing record handles (specifically instances of bsl::shared_ptr<Record>).

See ball_recordbuffer

Constructor & Destructor Documentation

◆ ~RecordBuffer()

virtual ball::RecordBuffer::~RecordBuffer ( )
virtual

Remove all record handles stored in this record buffer and destroy this record buffer.

Member Function Documentation

◆ back()

virtual const bsl::shared_ptr< Record > & ball::RecordBuffer::back ( ) const
pure virtual

Return a reference of the shared pointer referring to the record positioned at the back of this record buffer. The behavior is undefined unless this record buffer has been locked by the beginSequence method and 0 < length().

Implemented in ball::FixedSizeRecordBuffer.

◆ beginSequence()

virtual void ball::RecordBuffer::beginSequence ( )
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.

◆ endSequence()

virtual void ball::RecordBuffer::endSequence ( )
pure virtual

Unlock this record buffer, thus allowing other threads to access it. The behavior is undefined unless the buffer is already locked by beginSequence method.

Implemented in ball::FixedSizeRecordBuffer.

◆ front()

virtual const bsl::shared_ptr< Record > & ball::RecordBuffer::front ( ) const
pure virtual

Return a reference of the shared pointer referring to the record positioned at the front of this record buffer. The behavior is undefined unless this record buffer has been locked by the beginSequence method and 0 < length().

Implemented in ball::FixedSizeRecordBuffer.

◆ length()

virtual int ball::RecordBuffer::length ( ) const
pure virtual

Implemented in ball::FixedSizeRecordBuffer.

◆ popBack()

virtual void ball::RecordBuffer::popBack ( )
pure virtual

Remove from this record buffer the record handle positioned at the back of the buffer. The behavior is undefined unless 0 < length().

Implemented in ball::FixedSizeRecordBuffer.

◆ popFront()

virtual void ball::RecordBuffer::popFront ( )
pure virtual

Remove from this record buffer the record handle positioned at the front of the buffer. The behavior is undefined unless 0 < length().

Implemented in ball::FixedSizeRecordBuffer.

◆ pushBack()

virtual int ball::RecordBuffer::pushBack ( const bsl::shared_ptr< Record > &  handle)
pure virtual

Append the specified handle to the back of this record buffer. Return 0 on success, and a non-zero value otherwise. Note that concrete implementations are permitted to remove records from the buffer in order to attempt to accommodate a 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.

◆ pushFront()

virtual int ball::RecordBuffer::pushFront ( const bsl::shared_ptr< Record > &  handle)
pure virtual

Insert the specified handle at the front of this record buffer. Return 0 on success, and a non-zero value otherwise. Note that concrete implementations are permitted to remove records from the buffer in order to attempt to accommodate a 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.

◆ removeAll()

virtual void ball::RecordBuffer::removeAll ( )
pure virtual

Remove all record handles stored in this record buffer. Note that length() is now 0.

Implemented in ball::FixedSizeRecordBuffer.


The documentation for this class was generated from the following file: