.TH "ost::FixedBuffer" 3 "Sun Dec 27 2020" "GNU CommonC++" \" -*- nroff -*- .ad l .nh .SH NAME ost::FixedBuffer \- A buffer class that holds a known capacity of fixed sized objects defined during creation\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBost::Buffer\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBFixedBuffer\fP (size_t capacity, size_t objsize)" .br .RI "Create a buffer of known capacity for objects of a specified size\&. " .ti -1c .RI "\fBFixedBuffer\fP (const \fBFixedBuffer\fP &fb)" .br .RI "Create a copy of an existing fixed size buffer and duplicate it's contents\&. " .ti -1c .RI "virtual \fB~FixedBuffer\fP ()" .br .RI "Destroy the fixed buffer and free the memory used to store objects\&. " .ti -1c .RI "\fBFixedBuffer\fP & \fBoperator=\fP (const \fBFixedBuffer\fP &fb)" .br .ti -1c .RI "bool \fBisValid\fP (void)" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "size_t \fBonPeek\fP (void *buf)" .br .RI "Return the first object in the buffer\&. " .ti -1c .RI "size_t \fBonWait\fP (void *buf)" .br .RI "Wait for and return a fixed object in the buffer\&. " .ti -1c .RI "size_t \fBonPost\fP (void *buf)" .br .RI "Post an object of the appropriate size into the buffer\&. " .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP A buffer class that holds a known capacity of fixed sized objects defined during creation\&. .PP \fBAuthor\fP .RS 4 David Sugar dyfet@ostel.com .RE .PP producer/consumer buffer for fixed size objects\&. .SH "Constructor & Destructor Documentation" .PP .SS "ost::FixedBuffer::FixedBuffer (size_t capacity, size_t objsize)" .PP Create a buffer of known capacity for objects of a specified size\&. .PP \fBParameters\fP .RS 4 \fIcapacity\fP of the buffer\&. .br \fIobjsize\fP for each object held in the buffer\&. .RE .PP .SS "ost::FixedBuffer::FixedBuffer (const \fBFixedBuffer\fP & fb)" .PP Create a copy of an existing fixed size buffer and duplicate it's contents\&. .PP \fBParameters\fP .RS 4 \fIfb\fP existing \fBFixedBuffer\fP object\&. .RE .PP .SS "virtual ost::FixedBuffer::~FixedBuffer ()\fC [virtual]\fP" .PP Destroy the fixed buffer and free the memory used to store objects\&. .SH "Member Function Documentation" .PP .SS "bool ost::FixedBuffer::isValid (void)\fC [virtual]\fP" .PP Reimplemented from \fBost::Buffer\fP\&. .SS "size_t ost::FixedBuffer::onPeek (void * buf)\fC [protected]\fP, \fC [virtual]\fP" .PP Return the first object in the buffer\&. .PP \fBReturns\fP .RS 4 predefined size of this buffers objects\&. .RE .PP \fBParameters\fP .RS 4 \fIbuf\fP pointer to copy contents of head of buffer to\&. .RE .PP .PP Implements \fBost::Buffer\fP\&. .SS "size_t ost::FixedBuffer::onPost (void * buf)\fC [protected]\fP, \fC [virtual]\fP" .PP Post an object of the appropriate size into the buffer\&. .PP \fBReturns\fP .RS 4 predefined size of this buffers objects\&. .RE .PP \fBParameters\fP .RS 4 \fIbuf\fP pointer to data to copy into the buffer\&. .RE .PP .PP Implements \fBost::Buffer\fP\&. .SS "size_t ost::FixedBuffer::onWait (void * buf)\fC [protected]\fP, \fC [virtual]\fP" .PP Wait for and return a fixed object in the buffer\&. .PP \fBReturns\fP .RS 4 predefined size of this buffers objects\&. .RE .PP \fBParameters\fP .RS 4 \fIbuf\fP pointer to hold object returned from the buffer\&. .RE .PP .PP Implements \fBost::Buffer\fP\&. .SS "\fBFixedBuffer\fP& ost::FixedBuffer::operator= (const \fBFixedBuffer\fP & fb)" .SH "Author" .PP Generated automatically by Doxygen for GNU CommonC++ from the source code\&.