chiark / gitweb /
Use rewritten class handler.
[become] / src / set.h
1 /* -*-c-*-
2  *
3  * $Id: set.h,v 1.2 1997/08/04 10:24:25 mdw Exp $
4  *
5  * Management of sets (for the use of the class expression handler)
6  *
7  * (c) 1997 EBI
8  */
9
10 /*----- Licensing notice --------------------------------------------------*
11  *
12  * This file is part of `become'
13  *
14  * `Become' is free software; you can redistribute it and/or modify
15  * it under the terms of the GNU General Public License as published by
16  * the Free Software Foundation; either version 2 of the License, or
17  * (at your option) any later version.
18  *
19  * `Become' is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22  * GNU General Public License for more details.
23  *
24  * You should have received a copy of the GNU General Public License
25  * along with `become'; if not, write to the Free Software Foundation,
26  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27  */
28
29 /*----- Revision history --------------------------------------------------*
30  *
31  * $Log: set.h,v $
32  * Revision 1.2  1997/08/04 10:24:25  mdw
33  * Sources placed under CVS control.
34  *
35  * Revision 1.1  1997/07/21  13:47:44  mdw
36  * Initial revision
37  *
38  */
39
40 #ifndef SET_H
41 #define SET_H
42
43 #ifdef __cplusplus
44   extern "C" {
45 #endif
46
47 /*----- Required headers --------------------------------------------------*/
48
49 #ifndef SYM_H
50 #  include "sym.h"
51 #endif
52
53 /*----- Functions provided ------------------------------------------------*/
54
55 /* --- @set_subtract@ --- *
56  *
57  * Arguments:   @sym_table *a@ = pointer to table @A@
58  *              @sym_table *b@ = pointer to table @B@
59  *
60  * Returns:     A symbol table containing all the elements in @A@ which don't
61  *              appear in @B@.
62  *
63  * Use:         Subtracts a symbol table from another symbol table.  Assumes
64  *              that there's no data following the actual @sym_base@ block
65  *              for each item in the table.
66  */
67
68 extern sym_table *set_subtract(sym_table */*a*/, sym_table */*b*/);
69
70 /* --- @set_intersect@ --- *
71  *
72  * Arguments:   @sym_table *a@ = pointer to table @A@
73  *              @sym_table *b@ = pointer to table @B@
74  *
75  * Returns:     A symbol table containing all the elements in @A@ which also
76  *              appear in @B@.
77  *
78  * Use:         Constructs the intersection of two symbol tables.  Assumes
79  *              that there's no data following the actual @sym_base@ block
80  *              for each item in the table.
81  */
82
83 sym_table *set_intersect(sym_table */*a*/, sym_table */*b*/);
84
85 /* --- @set_union@ --- *
86  *
87  * Arguments:   @sym_table *a@ = pointer to table @A@
88  *              @sym_table *b@ = pointer to table @B@
89  *
90  * Returns:     A symbol table containing all the elements in @A@ and those
91  *              in @B@.
92  *
93  * Use:         Constructs the union of two symbol tables.  Assumes that
94  *              there's no data following the actual @sym_base@ block for
95  *              each item in the table.
96  */
97
98 sym_table *set_union(sym_table */*a*/, sym_table */*b*/);
99
100 /* --- @set_copy@ --- *
101  *
102  * Arguments:   @sym_table *a@ = pointer to table
103  *
104  * Returns:     A copy of the symbol table.
105  *
106  * Use:         Copies a symbol table.  Same assumptions again...
107  */
108
109 sym_table *set_copy(sym_table */*a*/);
110
111 /*----- That's all, folks -------------------------------------------------*/
112
113 #ifdef __cplusplus
114   }
115 #endif
116
117 #endif