1--  Copyright 1994 Grady Booch
2--  Copyright 1994-1997 David Weller
3--  Copyright 1998-2014 Simon Wright <simon@pushface.org>
4
5--  This package is free software; you can redistribute it and/or
6--  modify it under terms of the GNU General Public License as
7--  published by the Free Software Foundation; either version 2, or
8--  (at your option) any later version. This package is distributed in
9--  the hope that it will be useful, but WITHOUT ANY WARRANTY; without
10--  even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11--  PARTICULAR PURPOSE. See the GNU General Public License for more
12--  details. You should have received a copy of the GNU General Public
13--  License distributed with this package; see file COPYING.  If not,
14--  write to the Free Software Foundation, 59 Temple Place - Suite
15--  330, Boston, MA 02111-1307, USA.
16
17--  As a special exception, if other files instantiate generics from
18--  this unit, or you link this unit with other files to produce an
19--  executable, this unit does not by itself cause the resulting
20--  executable to be covered by the GNU General Public License.  This
21--  exception does not however invalidate any other reasons why the
22--  executable file might be covered by the GNU Public License.
23
24--  This is the top level package in the Booch Component Hierarchy.
25
26package BC is
27
28   pragma Pure;
29
30   --  The following exceptions may be raised by improper use of the
31   --  Components.
32
33   Duplicate : exception;
34   --  Attempt to insert an item in a Map under a  duplicate key.
35
36   Is_Null : exception;
37   --  A Graph, List, or Tree isn't designating any actual Container.
38
39   Not_Found : exception;
40   --  Raised when a "done" Iterator is used.
41
42   Not_Root : exception;
43   --  Attempt to insert, append or join Lists or Trees other than at
44   --  an "end".
45
46   Overflow : exception;
47   --  Attempt to fill a bounded Container beyond its capacity.
48
49   Range_Error : exception;
50   --  Attempt to Insert or Append at an invalid position.
51
52   Referenced : exception;
53   --  Attempt to Remove a List element that's aliased by another
54   --  List.
55
56   Sort_Error : exception;
57   --  Attempt to sort an inappropriate Container (Bag, Map, Set).
58
59   Storage_Error : exception;
60   --  Raised by BC.Support.Managed_Storage when the requested size is
61   --  too large or zero.
62
63   Underflow : exception;
64   --  Raised on attempts to access elements in an empty Container.
65
66private
67
68   --  Implementation errors: please report
69
70   Implementation_Error : exception;
71
72   Graph_Error : exception renames Implementation_Error;
73   --  The internal structure of a graph is corrupt.
74
75   Hash_Table_Error : exception renames Implementation_Error;
76   --  The internal structure of a hash table is corrupt.
77
78   Pool_Error : exception renames Implementation_Error;
79   --  The internal structure of a Managed Storage pool is corrupt.
80
81   Should_Have_Been_Overridden : exception renames Implementation_Error;
82   --  Raised if the Components have failed to override a primitive
83   --  subprogram that should have been overridden for a derived type.
84   --  Used only where the subprogram is private (and therefore can't
85   --  be abstract).
86
87   Not_Yet_Implemented : exception renames Implementation_Error;
88   --  Raised when a feature hasn't yet been implemented.
89
90end BC;
91