API Reference

Generic Package Parameter(s)

   type Shared_Instance_Type is private; 
   Nbr_Of_Instances  : Positive; 
   Shared_Memory_Key : Natural; 
   Server            : Boolean := False; 
 
   with procedure Initialize( item : in out Shared_Instance_Type); 
 

procedure Finalize; , type Iterator_Type , procedure Execute, procedure Perform

   procedure Finalize;  
 
 
 
   generic 
      type Iterator_Type is private; 
      with 
         procedure Execute( 
            Data   : in out Iterator_Type; 
            Item   : in out Shared_Instance_Type; 
            Result : in out Boolean); 
 
   procedure Perform( itt : in out Iterator_Type ); 
 
 
   Plattform_Error : exception ; 
   Out_Of_Memory   : exception ; 
   Unknown_Object  : exception ; 

function Value

   function  Value( item : Handle ) return Shared_Instance_Type;  
 
Description

Get the current value of the item. During access the item is locked.

Preconditions

P1 - Item is allocated in the shared memory

Postconditions

C1 - Result is a copy of the shared memory instance

Exceptions

Unknown_Object

Notes

None

procedure Value

   procedure Value( item : Handle; value : Shared_Instance_Type );  
 
Description

Copy the value into the shared memory instance point to the handle item. All other accesses are locked during this time, assuming that Lock/Unlock or Value is used to access the instance.

Preconditions

P1 - Item is allocated in the shared memory

Postconditions

C1 - Contents of item is equal to the value.

Exceptions

Unknown_Object

Notes

None

procedure Lock

   procedure Lock( item : Handle );  
 
Description

Lock the given handle for exclusive use. If the item is alrady locked, the call will block.

Preconditions

Item has been allocated from the shared memory pool.

Postconditions

Item is locked. Any following lock to the same object will block.

Exceptions

Unknown_Object - Object is not in the shared memeory

Notes

The lock time is 2-4 seconds. This is still hard coded limit and will be made flexible later.

procedure Unlock

   procedure Unlock( item : Handle );  
Description

Preconditions :

Postconditions

Exceptions :