~ubuntu-branches/debian/sid/adabrowse/sid

« back to all changes in this revision

Viewing changes to gal-adt.ads

  • Committer: Bazaar Package Importer
  • Author(s): Ludovic Brenta
  • Date: 2004-02-14 13:22:40 UTC
  • Revision ID: james.westby@ubuntu.com-20040214132240-cqumhiq1677pkvzo
Tags: upstream-4.0.2
ImportĀ upstreamĀ versionĀ 4.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-------------------------------------------------------------------------------
 
2
--
 
3
-- <STRONG>Copyright (c) 2001, 2002 by Thomas Wolf.</STRONG>
 
4
-- <BLOCKQUOTE>
 
5
--    This piece of software is free software; you can redistribute it and/or
 
6
--    modify it under the terms of the  GNU General Public License as published
 
7
--    by the Free Software  Foundation; either version 2, or (at your option)
 
8
--    any later version. This unit is distributed in the hope that it will be
 
9
--    useful, but <EM>without any warranty</EM>; without even the implied
 
10
--    warranty of <EM>merchantability or fitness for a particular purpose.</EM>
 
11
--    See the GNU General Public License for  more details. You should have
 
12
--    received a copy of the GNU General Public License with this distribution,
 
13
--    see file "<A HREF="GPL.txt">GPL.txt</A>". If not, write to the Free
 
14
--    Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 
15
--    USA.
 
16
-- </BLOCKQUOTE>
 
17
-- <BLOCKQUOTE>
 
18
--   As a special exception from the GPL, if other files instantiate generics
 
19
--   from this unit, or you link this unit with other files to produce an
 
20
--   executable, this unit does not by itself cause the resulting executable
 
21
--   to be covered by the GPL. This exception does not however invalidate any
 
22
--   other reasons why the executable file might be covered by the GPL.
 
23
-- </BLOCKQUOTE>
 
24
--
 
25
-- <DL><DT><STRONG>
 
26
-- Author:</STRONG><DD>
 
27
--   Thomas Wolf  (TW)
 
28
--   <ADDRESS><A HREF="mailto:twolf@acm.org">twolf@acm.org</A></ADDRESS></DL>
 
29
--
 
30
-- <DL><DT><STRONG>
 
31
-- Purpose:</STRONG><DD>
 
32
--   Root package for GAL's "raw ADT" subsystem. The "raw ADTs" are used in the
 
33
--   <CODE><A HREF="gal-containers.html">Containers</A></CODE> subsystem to
 
34
--   implement containers.</DL>
 
35
--
 
36
-- <!--
 
37
-- Revision History
 
38
--
 
39
--   27-OCT-2001   TW  Initial version.
 
40
--   16-NOV-2001   TW  Added boiler-plate comments.
 
41
--   20-NOV-2001   TW  Added Unordered_Error.
 
42
-- -->
 
43
-------------------------------------------------------------------------------
 
44
 
 
45
pragma License (Modified_GPL);
 
46
 
 
47
package GAL.ADT is
 
48
 
 
49
   pragma Pure;
 
50
 
 
51
   Container_Empty  : exception;
 
52
   --  May be raised by some ADTs when an illegal operation is attempted on
 
53
   --  an empty ADT object, e.g. trying to delete an item from an empty tree
 
54
   --  or list.
 
55
 
 
56
   Container_Full   : exception;
 
57
   --  May be raised by bounded ADTs when an item should be added to an ADT
 
58
   --  that is already full.
 
59
 
 
60
   Range_Error      : exception;
 
61
   --  Raised by operations that support ranges of some kind if the range is
 
62
   --  invalid, e.g. there are some list operations where ranges can be
 
63
   --  specified using two positions -- these operations raise Range_Error
 
64
   --  if the two positions are not on the same list, or one of them is null.
 
65
 
 
66
   Not_Found        : exception;
 
67
   --  Raised if an item we looked for in an ADT was not found, and the ADT
 
68
   --  object is not empty. (If it is empty, Container_Empty should be raised
 
69
   --  instead.)
 
70
 
 
71
   Duplicate_Key    : exception;
 
72
   --  Raised by asome ADTs that don't allow duplicates when a second item
 
73
   --  that is considered equal to an item already in the ADT is about to be
 
74
   --  added.
 
75
 
 
76
   Container_Error  : exception;
 
77
   --  General consistency error. Raised e.g. when an iterator is used that
 
78
   --  has becomes invalid because the item it was referencing has vanished.
 
79
 
 
80
   Navigation_Error : exception;
 
81
   --  Raised when a semantically illegal operation through a position is
 
82
   --  attempted, such as inserting an element after a position that already
 
83
   --  is beyond the end of a list.
 
84
 
 
85
   Unordered_Error  : exception;
 
86
   --  Raised by relational operators (<,>,<=,>=) if the two objects to be
 
87
   --  compared are unordered. This can e.g. happen for list positions, if
 
88
   --  the two positions are on different lists, or if one of them is null.
 
89
 
 
90
   --  In addition to these exceptions, any ADT may potentially raise
 
91
   --
 
92
   --  Constraint_Error   if an operation through a null-iterator is attempted.
 
93
   --  Storage_Error      if a dynamic storage allocation has failed.
 
94
 
 
95
end GAL.ADT;