Index

Package: Applications

Description

package Applications is

Classes

Application (abstract)

type Application is abstract new Limited_Object with private;

Ancestors:

Immediate Children:

Applications.Shell.Shell_Application

Primitive operations:

Close
Construct
Delete (overriding Objects.Delete)
Init
Objects.Construct (Inherited)
Objects.To_String (Inherited)
Run
An Application is a global singleton object that implements an application's initialization, runtime, and shutdown behavior and provides some meta information about it.

Types

A_Application

type A_Application is access all Application'Class;

Constants & Global variables

NO_ERROR

NO_ERROR                   : constant := 0;
Predefined values returned by Run

ERROR_UNEXPECTED_EXCEPTION

ERROR_UNEXPECTED_EXCEPTION : constant := 1;

INIT_EXCEPTION

INIT_EXCEPTION : exception;
This can be raised by initialization code in other packages to indicate that application initialization has failed. This exception is not raised by the Application class.

USE_ERROR

USE_ERROR : exception;
This can be raised by the Application class to indicate that it is being misused. For example, calling Create_Application without registering an Application object allocator will raise USE_ERROR.

Subprograms & Entries

Get_Company

function Get_Company
( this: not null access Application'Class ) return String;
Returns the name of the company or individual that produced this application.

Get_Name

function Get_Name
( this: not null access Application'Class ) return String;
Returns the short name of the application. This can be used to determine the names of application-specific files, etc. Special characters should be avoided.

Run

procedure Run
( this: not null access Application'Class;
returnCode: in out Integer );
Initializes, runs and finalizes the application runtime. 'returnCode' contains the numeric code that should be returned to the OS on exit.

Create_Application

procedure Create_Application;
Forces creation of the global application without returning a reference. If the application already exists, nothing will happen.

Get_Application

function Get_Application return A_Application;
Returns a reference to the global application or null if it has not been created.

Delete_Application

procedure Delete_Application;
Deletes the global application if it exists.