Home Units Hierarchy Routines All identifiers

Class unaObject

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type unaObject = class(TObject)

Description

Base class for all objects defined in this unit.

Hierarchy

Overview

Methods

Public constructor create();
Public destructor Destroy(); override;
Public function acquire(ro: bool; timeout: tTimeout; fsn: bool = false): bool; overload;
Public class function acquireStatic(timeout: tTimeout): bool; overload;
Public function releaseRO(): bool;
Public function releaseWO(): bool;
Public class function releseStatic(): bool;
Protected function release(): bool;
Public procedure acquire(ro: bool); overload;
Public class procedure acquireStatic(); overload;
Public procedure AfterConstruction(); override;
Public procedure BeforeDestruction(); override;

Properties

Public property destroying: bool read f_destroying;
Public property _classID: string read getClassID;
Public property _this: unaObject read getThis;

Description

Methods

Public constructor create();

Creates an object.

Public destructor Destroy(); override;
 
Public function acquire(ro: bool; timeout: tTimeout; fsn: bool = false): bool; overload;

Exclusive acquire.

False for "write-only" access acquire. Succeeds when thread acquires "write-only" lock.

Parameters
ro
True for "read-only" access acquire. Succeeds when "write-only" lock is not acquired by any other threads.
timeout
timeout
fsn
Internal, do not use
Returns

True if object was acquired (locked) then desired access. Make sure releseRO()/releaseWO() is called to unlock the object.

Public class function acquireStatic(timeout: tTimeout): bool; overload;

Static version of acquire(). Always uses WO access level.

Parameters
timeout
timeout
Public function releaseRO(): bool;

Releases the object after successfull RO acquisition.

Public function releaseWO(): bool;

Releases the object after successfull WO acquisition.

Public class function releseStatic(): bool;

Static version of releaseWO().

Protected function release(): bool;

Release either after successfull RO or WO acquire.

Public procedure acquire(ro: bool); overload;

Non-exclusive (unconditional) acquire. Always succeed. Do not forget to call releaseRO()/releaseWO().

Parameters
ro
Desired access level, True for "read-only".
Public class procedure acquireStatic(); overload;

Static version of unconditional acquire().

Public procedure AfterConstruction(); override;

Makes sure "inherited" create() was called during object's creation.

Public procedure BeforeDestruction(); override;

Sets f_destroying to true.

Properties

Public property destroying: bool read f_destroying;

True when object is being destroyed.

Public property _classID: string read getClassID;

Returns string description of this instance.

Public property _this: unaObject read getThis;

Returns pointer to self (this instance of object). Useful is some cases where self will refer to method's owner object instead.

(c) 2012 Lake of Soft


Generated by PasDoc 0.12.1 on 2012-10-09