1-- Copyright 1994 Grady Booch 2-- Copyright 1998-2014 Simon Wright <simon@pushface.org> 3 4-- This package is free software; you can redistribute it and/or 5-- modify it under terms of the GNU General Public License as 6-- published by the Free Software Foundation; either version 2, or 7-- (at your option) any later version. This package is distributed in 8-- the hope that it will be useful, but WITHOUT ANY WARRANTY; without 9-- even the implied warranty of MERCHANTABILITY or FITNESS FOR A 10-- PARTICULAR PURPOSE. See the GNU General Public License for more 11-- details. You should have received a copy of the GNU General Public 12-- License distributed with this package; see file COPYING. If not, 13-- write to the Free Software Foundation, 59 Temple Place - Suite 14-- 330, Boston, MA 02111-1307, USA. 15 16-- As a special exception, if other files instantiate generics from 17-- this unit, or you link this unit with other files to produce an 18-- executable, this unit does not by itself cause the resulting 19-- executable to be covered by the GNU General Public License. This 20-- exception does not however invalidate any other reasons why the 21-- executable file might be covered by the GNU Public License. 22 23generic 24 25 with function "<" (L, R : Item) return Boolean is <>; 26 -- Must define a strict ordering; if A "<" B and B "<" C, A must 27 -- be "<" C. If A is not "<" B and B is not "<" A, A and B are 28 -- said to be equivalent (they need not be "="). 29 30package BC.Containers.Collections.Ordered is 31 32 pragma Preelaborate; 33 34 type Abstract_Ordered_Collection 35 is abstract new Abstract_Collection with private; 36 37 -- An ordered collection denotes a sorted indexed collection of 38 -- items, drawn from some well-defined universe. An ordered 39 -- collection may contain duplicate (equivalent) items; it owns a 40 -- copy of each item. 41 42private 43 44 -- Suppress "unreferenced" warnings here (GNAT 5.02). Can't use 45 -- pragma Unreferenced, because then we get warnings in child 46 -- packages. 47 pragma Warnings (Off, "<"); 48 49 type Abstract_Ordered_Collection 50 is abstract new Abstract_Collection with null record; 51 52end BC.Containers.Collections.Ordered; 53