Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
x_set_func.h
Go to the documentation of this file.
00001 /*
00002 
00003   Copyright (C) 2000, 2001 Silicon Graphics, Inc.  All Rights Reserved.
00004 
00005   This program is free software; you can redistribute it and/or modify it
00006   under the terms of version 2 of the GNU General Public License as
00007   published by the Free Software Foundation.
00008 
00009   This program is distributed in the hope that it would be useful, but
00010   WITHOUT ANY WARRANTY; without even the implied warranty of
00011   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
00012 
00013   Further, this software is distributed without any warranty that it is
00014   free of the rightful claim of any third person regarding infringement 
00015   or the like.  Any license provided herein, whether implied or 
00016   otherwise, applies only to this software file.  Patent licenses, if 
00017   any, provided herein do not apply to combinations of this program with 
00018   other software, or any other product whatsoever.  
00019 
00020   You should have received a copy of the GNU General Public License along
00021   with this program; if not, write the Free Software Foundation, Inc., 59
00022   Temple Place - Suite 330, Boston MA 02111-1307, USA.
00023 
00024   Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
00025   Mountain View, CA 94043, or:
00026 
00027   http://www.sgi.com
00028 
00029   For further information regarding this notice, see:
00030 
00031   http://oss.sgi.com/projects/GenInfo/NoticeExplan
00032 
00033 */
00034 
00035 
00036 /* ====================================================================
00037  * ====================================================================
00038  *
00039  *
00040  * Revision history:
00041  *  05-05-93 - Original Version
00042  *
00043  * Description:
00044  *
00045  *      Template for functional interface to sets of objects.  This is
00046  *      processed by common/util/gen_x_set into a particular
00047  *      instantiation for a particular base type.  See below for a
00048  *      complete interface documentation.
00049  *
00050  * ====================================================================
00051  * ====================================================================
00052  */
00053 
00054 BEGIN
00055 
00056 
00057 #ifndef #uset#_INCLUDED
00058 #define #uset#_INCLUDED
00059 #ifdef __cplusplus
00060 extern "C" {
00061 #endif
00062 
00063 
00064 #include "bitset.h"     /* to avoid clients having to know about it */
00065 
00066 typedef struct dont_use_this_tag_#lset# #uset#;
00067 
00068 BEGIN SUBUNIVERSES
00069 class #uset#_SUBUNIVERSE;
00070 END SUBUNIVERSES
00071 
00072 #define #uset#_CHOOSE_FAILURE ((#base_type#) -1)
00073 #define #uset#_ITER_DONE      ((#base_type#) -1)
00074 
00075 extern #uset# *#uset#_Create(
00076   size_t    size,
00077   MEM_POOL *pool
00078 );
00079 extern size_t #uset#_Size_Alloc_Size(
00080   size_t    size
00081 );
00082 extern size_t #uset#_Alloc_Size(
00083   #uset# *set
00084 );
00085 extern #uset# *#uset#_ClearD(
00086   #uset# *set
00087 );
00088 extern #uset# *#uset#_Create_Empty(
00089   size_t size,
00090   MEM_POOL *pool
00091 );
00092 extern #uset# *#uset#_Range(
00093   BS_ELT      low,
00094   BS_ELT      high,
00095   MEM_POOL   *pool
00096 );
00097 extern #uset# *#uset#_RangeD(
00098   #uset#     *set,
00099   BS_ELT      low,
00100   BS_ELT      high,
00101   MEM_POOL   *pool
00102 );
00103 extern #uset# *#uset#_Singleton(
00104   #base_type# element,
00105   MEM_POOL   *pool
00106 );
00107 extern #uset# *#uset#_SingletonD(
00108   #uset#     *set,
00109   #base_type# element,
00110   MEM_POOL   *pool
00111 );
00112 BEGIN SUBUNIVERSES
00113 extern #uset# *#uset#_SingletonS(
00114   #base_type# element,
00115   MEM_POOL   *pool,
00116   #uset#_SUBUNIVERSE *sub
00117 );
00118 extern #uset# *#uset#_SingletonDS(
00119   #uset#     *set,
00120   #base_type# element,
00121   MEM_POOL   *pool,
00122   #uset#_SUBUNIVERSE *sub
00123 );
00124 END SUBUNIVERSES
00125 extern #uset# *#uset#_Universe(
00126   size_t    size,
00127   MEM_POOL *pool
00128 );
00129 extern #uset# *#uset#_UniverseD(
00130   #uset#   *set,
00131   size_t    size,
00132   MEM_POOL *pool
00133 );
00134 extern #uset# *#uset#_Copy(
00135   #uset#   *set,
00136   MEM_POOL *pool
00137 );
00138 extern #uset# *#uset#_CopyD(
00139   #uset#   *set1,
00140   #uset#   *set2,
00141   MEM_POOL *pool
00142 );
00143 extern #base_type# #uset#_Choose(
00144   #uset# *set
00145 );
00146 extern #base_type# #uset#_Intersection_Choose(
00147   #uset# *set1,
00148   #uset# *set2
00149 );
00150 extern #base_type# #uset#_Choose_Next(
00151   #uset#     *set,
00152   #base_type# x
00153 );
00154 extern #base_type# #uset#_Intersection_Choose_Next(
00155   #uset#     *set1,
00156   #uset#     *set2,
00157   #base_type# x
00158 );
00159 extern #base_type# #uset#_Choose_Range(
00160   #uset#   *set,
00161   BS_ELT    low,
00162   BS_ELT    high
00163 );
00164 BEGIN SUBUNIVERSES
00165 extern #base_type# #uset#_ChooseS(
00166   #uset# *set,
00167   #uset#_SUBUNIVERSE *sub
00168 );
00169 extern #base_type# #uset#_Intersection_ChooseS(
00170   #uset# *set1,
00171   #uset# *set2,
00172   #uset#_SUBUNIVERSE *sub
00173 );
00174 extern #base_type# #uset#_Choose_NextS(
00175   #uset#     *set,
00176   #base_type# x,
00177   #uset#_SUBUNIVERSE *sub
00178 );
00179 extern #base_type# #uset#_Intersection_Choose_NextS(
00180   #uset#     *set1,
00181   #uset#     *set2,
00182   #base_type# x,
00183   #uset#_SUBUNIVERSE *sub
00184 );
00185 extern #base_type# #uset#_Choose_RangeS(
00186   #uset#   *set,
00187   BS_ELT    low,
00188   BS_ELT    high,
00189   #uset#_SUBUNIVERSE *sub
00190 );
00191 END SUBUNIVERSES
00192 extern #uset# *#uset#_Difference(
00193   #uset#   *set1,
00194   #uset#   *set2,
00195   MEM_POOL *pool
00196 );
00197 extern #uset# *#uset#_DifferenceD(
00198   #uset# *set1,
00199   #uset# *set2
00200 );
00201 extern #uset# *#uset#_Difference1(
00202   #uset#     *set,
00203   #base_type# x,
00204   MEM_POOL   *pool
00205 );
00206 extern #uset# *#uset#_Difference1D(
00207   #uset#     *set,
00208   #base_type# x
00209 );
00210 BEGIN SUBUNIVERSES
00211 extern #uset# *#uset#_Difference1S(
00212   #uset#     *set,
00213   #base_type# x,
00214   MEM_POOL   *pool,
00215   #uset#_SUBUNIVERSE *sub
00216 );
00217 extern #uset# *#uset#_Difference1DS(
00218   #uset#     *set,
00219   #base_type# x,
00220   #uset#_SUBUNIVERSE *sub
00221 );
00222 END SUBUNIVERSES
00223 extern #uset# *#uset#_Intersection(
00224   #uset#   *set1,
00225   #uset#   *set2,
00226   MEM_POOL *pool
00227 );
00228 extern #uset# *#uset#_IntersectionD(
00229   #uset# *set1,
00230   #uset# *set2
00231 );
00232 extern size_t #uset#_Size(
00233   #uset# *set
00234 );
00235 extern #uset# *#uset#_Union(
00236   #uset#   *set1,
00237   #uset#   *set2,
00238   MEM_POOL *pool
00239 );
00240 extern #uset# *#uset#_UnionD(
00241   #uset#   *set1,
00242   #uset#   *set2,
00243   MEM_POOL *pool
00244 );
00245 extern #uset# *#uset#_Union1(
00246   #uset#     *set,
00247   #base_type# x,
00248   MEM_POOL   *pool
00249 );
00250 extern #uset# *#uset#_Union1D(
00251   #uset#     *set,
00252   #base_type# x,
00253   MEM_POOL   *pool
00254 );
00255 extern #uset# *#uset#_UnionD_Intersection(
00256   #uset#     *set1,
00257   #uset#     *set2,
00258   #uset#     *set3,
00259   MEM_POOL   *pool
00260 );
00261 BEGIN SUBUNIVERSES
00262 extern #uset# *#uset#_Union1S(
00263   #uset#     *set,
00264   #base_type# x,
00265   MEM_POOL   *pool,
00266   #uset#_SUBUNIVERSE *sub
00267 );
00268 extern #uset# *#uset#_Union1DS(
00269   #uset#     *set,
00270   #base_type# x,
00271   MEM_POOL   *pool,
00272   #uset#_SUBUNIVERSE *sub
00273 );
00274 END SUBUNIVERSES
00275 extern BOOL #uset#_ContainsP(
00276   #uset# *set1,
00277   #uset# *set2
00278 );
00279 extern BOOL #uset#_EmptyP(
00280   #uset# *set
00281 );
00282 extern BOOL #uset#_EqualP(
00283   #uset# *set1,
00284   #uset# *set2
00285 );
00286 extern BOOL #uset#_IntersectsP(
00287   #uset# *set1,
00288   #uset# *set2
00289 );
00290 extern BOOL #uset#_MemberP(
00291   #uset#     *set,
00292   #base_type# x
00293 );
00294 extern BOOL #uset#_Intersection_MemberP(
00295   #uset#     *set1,
00296   #uset#     *set2,
00297   #base_type# x
00298 );
00299 BEGIN SUBUNIVERSES
00300 extern BOOL #uset#_MemberPS(
00301   #uset#     *set,
00302   #base_type# x,
00303   #uset#_SUBUNIVERSE *sub
00304 );
00305 extern BOOL #uset#_Intersection_MemberPS(
00306   #uset#     *set1,
00307   #uset#     *set2,
00308   #base_type# x,
00309   #uset#_SUBUNIVERSE *sub
00310 );
00311 END SUBUNIVERSES
00312 extern void #uset#_Print(
00313   #uset# *set,
00314   FILE   *f
00315 );
00316 
00317 #ifdef __cplusplus
00318 }
00319 #endif
00320 #endif /* #uset#_INCLUDED */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines