Class TAdBufferBucket
Unit
AdBuffer
Declaration
type TAdBufferBucket = class(TObject)
Description
TAdBufferBucket represents a single buffer bucket in the buffer bucket list. Buffer buckets are used to seperate the memory into serveral sections, in order to reorder the buckets. Data is read from the bucket until it is "empty". If the bucket is empty, it may be refilled and added to the buffer queue/list again. Every bucket may contain a differtent amout of data.
See also
- TAdBufferBucketList
- TAdBufferBucketList is a list class that contains serveral TAdBufferBucket elements.
Hierarchy
Overview
Methods
 |
constructor Create; |
 |
destructor Destroy; override; |
 |
procedure WriteData(ABuf: PByte; ASize: Integer); |
 |
function ReadData(ABuf: PByte; ASize: Integer): Integer; |
 |
function Seek(AOffset: integer): integer; |
Properties
 |
property IsFree: boolean read FIsFree; |
 |
property FilledSize: Integer read FFilledSize; |
 |
property Tag: Cardinal read FTag write FTag; |
 |
property Position: int64 read FPosition write FPosition; |
 |
property ReadPos: Integer read FReadPos; |
 |
property DataSize: integer read FDataSize; |
Description
Methods
 |
constructor Create; |
Creates an instance of TAdBufferBucket.
|
 |
destructor Destroy; override; |
Destroys the instance of TAdBufferBucket and frees all reserved memory.
|
 |
procedure WriteData(ABuf: PByte; ASize: Integer); |
Writes data to the bucket. The memory of the bucket is enlarged, if size is bigger than the last size.
|
 |
function ReadData(ABuf: PByte; ASize: Integer): Integer; |
Reads data from the bucket. Returns the count of bytes that were actually read from the bucket. Every call of ReadData increments a internal pointer, so that the next call will read the data from that position.
|
 |
function Seek(AOffset: integer): integer; |
Seeks the internall read pointer of the bucket forward or backward.
|
Properties
 |
property IsFree: boolean read FIsFree; |
Returns whether all data from the item has been read.
|
 |
property FilledSize: Integer read FFilledSize; |
Returns the count of bytes that are still in the bucket. "FilledSize" gets decremented with each call of "ReadData".
|
 |
property Tag: Cardinal read FTag write FTag; |
May contain a user defined tag. This tag may be usefull if you want to use the buffer in a audio application to store the current position of this element.
|
 |
property Position: int64 read FPosition write FPosition; |
Position is used internally by the buffer classes for seeking and contains the byte position of the buffer bucket since the last "Clear".
|
 |
property ReadPos: Integer read FReadPos; |
Specifies the position of the internal read pointer.
|
 |
property DataSize: integer read FDataSize; |
The size of the data that was written to the bucket with the last write access.
|

Generated by PasDoc 0.11.0 on 2008-12-31 14:31:58