Specification of generic package Corba.Value.Box







 ========================================================================= --
 ===                                                                   === --
 ===                 Top Graph'X CORBA Implementation                  === --
 ===                                                                   === --
 ===                 Copyright (c) 2000, Top Graph'X.                  === --
 ===                                                                   === --
 ===                     --- Copyright Notice ---                      === --
 ===                                                                   === --
 ===    This software is protected as an unpublished work under the    === --
 ===     Copyright Act of 1976.  All rights reserved.  Top Graph'X.    === --
 ===                                                                   === --
 ========================================================================= --
with Corba_Ios ;
with Corba.Impl ;
generic
   type Boxed is private;
   type Boxed_Access is access all Boxed;

   ID : Standard.String ;  Repository Id

   with procedure Iop_Read
      ( Stream : access Corba_Ios.Iop_Stream_Type ;
        Item   : out Boxed ) is <> ;

   with procedure Iop_Write
      ( Stream : access Corba_Ios.Iop_Stream_Type ;
        Item   : in Boxed ) is <> ;

package Corba.Value.Box is
   type Box_Ref is new Corba.Value.Base with null record;

    Inherited from Corba.AbstractBase.Ref
    function Is_Null (The_Ref : in Box_Ref) return Boolean;

   function Create (With_Value : in Boxed) return Box_Ref;

   function "+" (With_Value : in Boxed) return Box_Ref
      renames Create;

    The returned access value has a time to live limited to the
    time to live of the reference used to get it.
    Extreme care must be take when storing it inside a data structure
    as this may lead to a dangling reference.
   function Contents (The_Boxed : in Box_Ref) return Boxed_Access;

   function "-" (The_Boxed : in Box_Ref) return Boxed_Access renames Contents;

    Inherited from Corba.AbstractBase.Ref
    procedure Release (The_Ref : in out Box_Ref);

   procedure Iop_Read
      ( Stream : access Corba_Ios.Iop_Stream_Type ;
        Item   : out Box_Ref ) ;

   procedure Iop_Write
      ( Stream : access Corba_Ios.Iop_Stream_Type ;
        Item   : in Box_Ref ) ;

   Null_Box_Ref : constant Box_Ref := (Corba.Value.Base with null record);

private
   type Object is new Corba.Value.Impl_Base with
   record
      Impl : aliased Boxed ;
   end record ;

   type Object_Ptr is access all Object ;

   function Get_RepositoryId (Self : access Object)
      return RepositoryId ;

   function Is_A ( Self : access Object ;
                   B_Id : in RepositoryId ) return Boolean ;

   function Reader
      (Stream : access Corba_Ios.Iop_Stream_Type ;
       Start  : in Corba_Ios.Stream_Element_Offset)
      return Corba.Value.Impl_Base_Ptr ;
    Apex 4.0 bug : need constant declaration here
    as using 'access in body crashes the compiler
   Reader_Access : constant Value_Reader := Reader'access;

   procedure Writer
      ( Stream : access Corba_Ios.Iop_Stream_Type ;
        Value  : in Corba.Value.Impl_Base_Ptr ) ;
    Apex 4.0 bug : need constant declaration here
    as using 'access in body crashes the compiler
   Writer_Access : constant Value_Writer := Writer'access;
end Corba.Value.Box;



List of definition uses










This page was generated by PrismTech's ada2html on Friday Mai 12 2006 16:18