home *** CD-ROM | disk | FTP | other *** search
/ Solo Programadores 22 / SOLO_22.iso / packages / win32ada / data.z / extensible.ads < prev    next >
Encoding:
Text File  |  1995-11-17  |  1.8 KB  |  58 lines

  1. -- $Source: /home/harp/1/proto/monoBANK/winnt/extensible.ads,v $ 
  2. -- $Revision: 1.3 $ $Date: 95/02/02 15:49:56 $ $Author: mg $ 
  3.  
  4. with Interfaces.C;
  5.  
  6. generic
  7.     type Fixed_Rec is private;
  8.     type Extensible_Elem is private;
  9.     Position_Of_Extensible_Array: Natural;
  10. package Extensible is
  11.     Max: constant := Interfaces.C.Unsigned'Last;            -- GNAT
  12.     -- Max: constant := 1000;                           -- Alsys, Verdix
  13.  
  14.     subtype Big_Range is Interfaces.C.Unsigned range 0..Max;
  15.  
  16.     type Big_Array is array (Big_Range) of aliased Extensible_Elem;
  17.  
  18.     type Big_Array_Ptr is access all Big_Array;
  19.  
  20.     type Fixed_Ptr is access all Fixed_Rec;
  21.  
  22.     type Extended_Ptr is private;
  23.  
  24.     function Allocate (Actual_Elems: Big_Range) return Extended_Ptr;
  25.  
  26.     procedure Free (Ptr: in out Extended_Ptr);
  27.  
  28.     function Fixed_Part (Ptr: Extended_Ptr) return Fixed_Ptr;
  29.  
  30.     function Array_Part (Ptr: Extended_Ptr) return Big_Array_Ptr;
  31.  
  32. private
  33.  
  34.     type Extended_Rec;
  35.     type Extended_Ptr is access Extended_Rec;
  36.  
  37.     pragma Inline(Allocate);
  38.     pragma Inline(Free);
  39.     pragma Inline(Fixed_Part);
  40.     pragma Inline(Array_Part);
  41.  
  42. -------------------------------------------------------------------------------
  43. --
  44. -- THIS FILE AND ANY ASSOCIATED DOCUMENTATION IS FURNISHED "AS IS" WITHOUT 
  45. -- WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 
  46. -- TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR 
  47. -- PURPOSE.  The user assumes the entire risk as to the accuracy and the 
  48. -- use of this file.
  49. --
  50. -- Copyright (c) Intermetrics, Inc. 1995
  51. -- Royalty-free, unlimited, worldwide, non-exclusive use, modification, 
  52. -- reproduction and further distribution of this file is permitted.
  53. --
  54. -------------------------------------------------------------------------------
  55.  
  56.  
  57. end Extensible;
  58.