| User's Guide: Small Ada 95 Object Database; Version 0.1.0; Document Revision $Revision: 1.9 $ | ||
|---|---|---|
| Prev | Chapter 8. Implementing Server Classes | Next |
The code fragment below show the declaration of the server part of the server class implementation for the Collection class.
Example 8-1. Server Side Units
with OOS.Abstract_Plugin; use OOS.Abstract_Plugin; with OOS.Server_Interface; use OOS.Server_Interface; use OOS; package OOS.Collection.Server is type Object( Size : Natural ) is new Abstract_Class.Object with private;function Initialize(
Interface : in Server_Interface.Handle ) return Abstract_Plugin.Handle; pragma Export_Function(Internal => Initialize, External => initialize, Parameter_Types => (Server_Interface.Handle),
Result_Type => Abstract_Plugin.Handle ); procedure Execute( This : in out Object; Buffer : in Buffer_Access; Length : in out Natural; Method : in Unbounded_String ); procedure Store(
This : in Object; Data : in Buffer_Access; Length : out Natural ) ; procedure Load( This : in out Object; Data : in Buffer_Access; Length : in Natural ) ; private type Bag_Type is array( Natural range <>) of Object_ID; -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- -- This object contains the persistent data of the server class -- -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- type Object ( Size : Natural ) is new Abstract_Class.Object with record Bag : Bag_Type( 1..size ) := (others => Null_Object_ID); end record; end OOS.Collection.Server;



