Home Units Hierarchy Routines All identifiers

Class unaEvent

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type unaEvent = class(unaObject)

Description

This is a wrapper class for Windows Events.

Hierarchy

Overview

Methods

Public constructor create(manualReset: bool = false; initialState: bool = false; const name: wString = '');
Public destructor Destroy(); override;
Public function waitFor(timeout: tTimeout = 1): bool;
Public procedure setState(signaled: bool = true);

Properties

Public property handle: tHandle read f_handle;
Public property name: wString read f_name;

Description

Methods

Public constructor create(manualReset: bool = false; initialState: bool = false; const name: wString = '');

Constructs an event. Specify initialState and manualReset parameters. Refer to MSDN documentation for more details about Windows events.

Parameters
manualReset
If manualReset is true you have to reset the event manually every time it was set to signaled state. By default this parameter is False, what means event will be reset automatically.
initialState
Specifies the initial state of event. Default value is False (non-signaled).
name
Specifies optional name of the event. You can use this name later to reopen the event.
Public destructor Destroy(); override;

Destroys an event object by closing its handle.

Public function waitFor(timeout: tTimeout = 1): bool;

Used to wait until the state of event will be set to signaled. This method blocks execution of the caller thread, so use it carefully when specifying INFINITE value for timeout.

Parameters
timeout
Specifies the timeout in milliseconds.
Returns

True if the event is now signaled or False if timeout was expired (event remains in non-signaled state).

Public procedure setState(signaled: bool = true);

Sets the state of an event to signaled or non-signaled.

Properties

Public property handle: tHandle read f_handle;

Windows handle of event.

Public property name: wString read f_name;

Event's name (if specified).

(c) 2012 Lake of Soft


Generated by PasDoc 0.12.1 on 2012-10-09