Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
Buffer Class Reference#include <Buffer.h>
Detailed DescriptionBuffer.A buffer has three main properties: position, capacity and limit. Capacity is the real size of the underlying array. Position is the index of the current element in the buffer (used only by buffer filling operations at the moment). Limit is the virtual size of the buffer. Operations such as filling up the buffer, seeking and so on never go over the limit mark of the buffer. 0 <= position <= limit <= capacity. Definition at line 15 of file Buffer.h.
Constructor & Destructor Documentation
Member Function Documentation
Gets the pointer to the first element of the underlying array.
Definition at line 27 of file Buffer.h. Referenced by SpeakerServer::AddPacket(), SpeakerServer::GotSocketData(), operator=(), and SpeakerServer::ResampleForSpeaker().
Gets the capacity of the buffer.
Definition at line 31 of file Buffer.h. Referenced by SpeakerServer::AddPacket(), operator=(), and SpeakerServer::ResampleForSpeaker().
Sets the capacity of the buffer. The underlying array grows and shrinks.
Definition at line 63 of file Buffer.cc. Referenced by SpeakerServer::AddPacket(), SpeakerServer::DoStop(), SpeakerServer::GotSocketData(), and SpeakerServer::ResampleForSpeaker().
Gets the current position. position <= limit.
Definition at line 35 of file Buffer.h. Referenced by SpeakerServer::AddPacket(), and operator=().
Gets the limit mark of the buffer. limit <= capacity.
Definition at line 37 of file Buffer.h. Referenced by SpeakerServer::AddPacket(), SpeakerServer::GotSocketData(), and operator=().
Sets the current position.
Definition at line 46 of file Buffer.cc. Referenced by SpeakerServer::AddPacket(), SpeakerServer::DoStart(), and SpeakerServer::GotSocketData().
Sets the limit mark. limit <= capacity.
Definition at line 54 of file Buffer.cc. Referenced by SpeakerServer::AddPacket(), and SpeakerServer::GotSocketData().
Tries to fill the buffer from current position up to the limit mark. Advances the position, src and srcLen. Returns true if the buffer has been filled.
Definition at line 84 of file Buffer.cc. Referenced by SpeakerServer::AddPacket(), Fill(), and SpeakerServer::GotSocketData().
Checks whether the buffer is full, that is position == limit.
Definition at line 47 of file Buffer.h. Referenced by Fill(), and SpeakerServer::GotSocketData().
returns the lesser of a or b
Definition at line 55 of file Buffer.h. Referenced by SetCapacity(), SetLimit(), and SetPosition().
Member Data Documentation
the buffer itself
Definition at line 49 of file Buffer.h. Referenced by Buffer(), Fill(), GetData(), operator=(), SetCapacity(), and ~Buffer().
the the real size of the underlying array.
Definition at line 50 of file Buffer.h. Referenced by Buffer(), GetCapacity(), operator=(), SetCapacity(), and SetLimit().
Position is the index of the current element in the buffer (used only by buffer filling operations at the moment).
Definition at line 51 of file Buffer.h. Referenced by Buffer(), Fill(), GetLimit(), IsFull(), operator=(), SetCapacity(), SetLimit(), and SetPosition().
Limit is the virtual size of the buffer. Operations such as filling up the buffer, seeking and so on never go over the limit mark of the buffer.
Definition at line 52 of file Buffer.h. Referenced by Fill(), GetPosition(), IsFull(), operator=(), SetCapacity(), SetLimit(), and SetPosition().
The documentation for this class was generated from the following files: |
Tekkotsu v4.0 |
Generated Thu Nov 22 00:58:11 2007 by Doxygen 1.5.4 |