Description | Hierarchy | Fields | Methods | Properties |
type unaAbstractStream = class(unaObject)
Simple First In First Out (FIFO) stream. It is multi-threaded safe, so you can use it from several threads without any special care.
constructor create(lockTimeout: tTimeout = 1000); virtual; |
|
destructor Destroy(); override; |
|
function clear(): unaAbstractStream; |
|
class function copyStream(source, dest: unaAbstractStream): int; |
|
function enter(ro: bool; timeout: tTimeout = 10000): bool; |
|
function getAvailableSize(): int; |
|
function getSize(): int; |
|
function read(def: boolean; remove: bool = true): bool; overload; |
|
function read(buf: pointer; size: int; remove: bool = true): int; overload; |
|
function read(def: unsigned; remove: bool = true): unsigned; overload; |
|
function read(const def: aString; remove: bool = true): aString; overload; |
|
function read(def: int; remove: bool = true): int; overload; |
|
function read(def: byte; remove: bool = true): byte; overload; |
|
function read(def: word; remove: bool = true): word; overload; |
|
function readFrom(const fileName: wString; offset: int = 0): int; overload; |
|
function readFrom(source: unaAbstractStream): int; overload; |
|
function remove(size: int): int; |
|
function waitForData(timeout: tTimeout = 1000): bool; |
|
function write(value: int): int; overload; |
|
function write(value: unsigned): int; overload; |
|
function write(const value: aString): int; overload; |
|
function write(value: boolean): int; overload; |
|
function write(buf: pointer; size: int): int; overload; |
|
function write(value: word): int; overload; |
|
function write(value: byte): int; overload; |
|
function writeTo(dest: unaAbstractStream): int; overload; |
|
function writeTo(const fileName: wString; append: bool = true; size: int = 0): int; overload; |
|
function clear2(): unaAbstractStream; virtual; |
|
function getAvailableSize2(): int; virtual; |
|
function getPosition(): int; virtual; |
|
function getSize2(): int; virtual; |
|
function read2(buf: pointer; size: int; remove: bool = true): int; virtual; abstract; |
|
function remove2(size: int): int; virtual; |
|
function seek(position: int; fromBeggining: bool = true): int; overload; virtual; |
|
function seekD(delta: int): int; overload; virtual; |
|
function write2(buf: pointer; size: int): int; virtual; |
|
procedure AfterConstruction(); override; |
|
procedure leaveRO(); |
|
procedure leaveWO(); |
property dataEvent: unaEvent read f_dataEvent; |
|
property isEmpty: bool read getIsEmpty; |
|
property isValid: bool read f_isValid; |
|
property lockTimeout: tTimeout read f_lockTimeout write f_lockTimeout default 1000; |
|
property maxSize: int read f_maxSize write f_maxSize default 0; |
constructor create(lockTimeout: tTimeout = 1000); virtual; |
|
destructor Destroy(); override; |
|
function clear(): unaAbstractStream; |
|
class function copyStream(source, dest: unaAbstractStream): int; |
|
function enter(ro: bool; timeout: tTimeout = 10000): bool; |
|
function getAvailableSize(): int; |
|
function getSize(): int; |
|
function read(def: boolean; remove: bool = true): bool; overload; |
|
function read(buf: pointer; size: int; remove: bool = true): int; overload; |
|
function read(def: unsigned; remove: bool = true): unsigned; overload; |
|
function read(const def: aString; remove: bool = true): aString; overload; |
|
function read(def: int; remove: bool = true): int; overload; |
|
function read(def: byte; remove: bool = true): byte; overload; |
|
function read(def: word; remove: bool = true): word; overload; |
|
function readFrom(const fileName: wString; offset: int = 0): int; overload; |
|
function readFrom(source: unaAbstractStream): int; overload; |
|
function remove(size: int): int; |
|
function waitForData(timeout: tTimeout = 1000): bool; |
|
function write(value: int): int; overload; |
|
function write(value: unsigned): int; overload; |
|
function write(const value: aString): int; overload; |
|
function write(value: boolean): int; overload; |
|
function write(buf: pointer; size: int): int; overload; |
|
function write(value: word): int; overload; |
|
function write(value: byte): int; overload; |
|
function writeTo(dest: unaAbstractStream): int; overload; |
|
function writeTo(const fileName: wString; append: bool = true; size: int = 0): int; overload; |
|
function clear2(): unaAbstractStream; virtual; |
|
function getAvailableSize2(): int; virtual; |
|
function getPosition(): int; virtual; |
|
function getSize2(): int; virtual; |
|
function read2(buf: pointer; size: int; remove: bool = true): int; virtual; abstract; |
|
function remove2(size: int): int; virtual; |
|
function seek(position: int; fromBeggining: bool = true): int; overload; virtual; |
|
function seekD(delta: int): int; overload; virtual; |
|
function write2(buf: pointer; size: int): int; virtual; |
|
procedure AfterConstruction(); override; |
|
procedure leaveRO(); |
|
procedure leaveWO(); |
|
property dataEvent: unaEvent read f_dataEvent; |
|
property isEmpty: bool read getIsEmpty; |
|
property isValid: bool read f_isValid; |
|
property lockTimeout: tTimeout read f_lockTimeout write f_lockTimeout default 1000; |
|
property maxSize: int read f_maxSize write f_maxSize default 0; |
|
(c) 2012 Lake of Soft