------------------------------------------------------------------------------
--                                                                          --
--                           POLYORB COMPONENTS                             --
--                                                                          --
--                        C O R B A . F O R W A R D                         --
--                                                                          --
--                                 S p e c                                  --
--                                                                          --
--         Copyright (C) 2001-2012, Free Software Foundation, Inc.          --
--                                                                          --
-- This specification is derived from the CORBA Specification, and adapted  --
-- for use with PolyORB. The copyright notice above, and the license        --
-- provisions that follow apply solely to the contents neither explicitly   --
-- nor implicitly specified by the CORBA Specification defined by the OMG.  --
--                                                                          --
-- This is free software;  you can redistribute it  and/or modify it  under --
-- terms of the  GNU General Public License as published  by the Free Soft- --
-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
-- sion.  This software is distributed in the hope  that it will be useful, --
-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
-- License for  more details.                                               --
--                                                                          --
--                                                                          --
-- You should have received a copy of the GNU General Public License and    --
-- a copy of the GCC Runtime Library Exception along with this program;     --
-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
-- <http://www.gnu.org/licenses/>.                                          --
--                                                                          --
--                  PolyORB is maintained by AdaCore                        --
--                     (email: sales@adacore.com)                           --
--                                                                          --
------------------------------------------------------------------------------

with CORBA.Object;

generic
package CORBA.Forward is

   pragma Elaborate_Body;

   type Ref is new CORBA.Object.Ref with null record;
   --  A forward reference to some object

   --  Package Convert is instantiated once the real (full) reference type
   --  declaration has been encountered.

   generic
      type Ref_Type is new CORBA.Object.Ref with private;
      --  The full reference type corresponding to this forward type

   package Convert is

      --  Conversion between the forward reference type Ref and the full
      --  reference type Ref_Type.

      function From_Forward (The_Forward : Ref) return Ref_Type;
      function To_Ref (The_Forward : Ref) return Ref_Type
        renames From_Forward;

      function To_Forward (The_Ref : Ref_Type) return Ref;

   end Convert;

end CORBA.Forward;
