Index

Package: Events

Description

package Events is

Classes

Event (abstract)

type Event is abstract new Object with private;

Ancestors:

Immediate Children:

Primitive operations:

Construct
Objects.Adjust (Inherited)
Objects.Construct (Inherited)
Objects.Delete (Inherited)
Objects.Object_Read (Inherited)
Objects.Object_Write (Inherited)
To_String (overriding Objects.To_String)
An Event object indicates an event/change has taken place and it contains all of the information required to describe that change.

Types

Event_Id

type Event_Id is private;

Event_Type

type Event_Type is private;

Response_Type

type Response_Type is private;
A Response_Type respresents a response to an event by an event listener.

A_Event

type A_Event is access all Event'Class;

Constants & Global variables

No_Response (Response_Type)

No_Response : constant Response_Type;
The default no-response with a status of NONE and no message.

Subprograms & Entries

=

function "="
( l, r: Event_Id ) return Boolean;

To_Event_Id

function To_Event_Id
( evtName: String ) return Event_Id;

=

function "="
( l, r: Event_Type ) return Boolean;

Get_Message

function Get_Message
( response: Response_Type ) return String;
Returns the message string returned by the event listener in it's response.

Get_Status

function Get_Status
( response: Response_Type ) return Status;
Returns the status returned by the event listener in it's response.

Set_Response

procedure Set_Response
( response: in out Response_Type;
stat: Status;
msg: String := "" );
Sets the Response's status and message. This is to be called by an event listener returning a response.

Get_Name

function Get_Name
( this: not null access Event'Class ) return String;
Returns the name of the event which ocurred. All event instances of the same class share the same name.

Get_Id

function Get_Id
( this: not null access Event'Class ) return Event_Id;
Returns the event identifier. This is a hash of the event's name for quick event type comparison. All event instances of the same class share the same event identifier. However, in the case of a hash collision, it is not correct to assume that instances of one event class will not have the same id as instances of another event class with a different name.

Copy

function Copy
( src: A_Event ) return A_Event;
Returns a deep copy of Event 'src'. All events are required to be copyable.

Delete

procedure Delete
( this: in out A_Event );
Deletes the Event.