Edinburgh Speech Tools  2.1-release
EST_TSortableI.h
Go to the documentation of this file.
1 
2  /************************************************************************/
3  /* */
4  /* Centre for Speech Technology Research */
5  /* University of Edinburgh, UK */
6  /* Copyright (c) 1996,1997 */
7  /* All Rights Reserved. */
8  /* */
9  /* Permission is hereby granted, free of charge, to use and distribute */
10  /* this software and its documentation without restriction, including */
11  /* without limitation the rights to use, copy, modify, merge, publish, */
12  /* distribute, sublicense, and/or sell copies of this work, and to */
13  /* permit persons to whom this work is furnished to do so, subject to */
14  /* the following conditions: */
15  /* 1. The code must retain the above copyright notice, this list of */
16  /* conditions and the following disclaimer. */
17  /* 2. Any modifications must be clearly marked as such. */
18  /* 3. Original authors' names are not deleted. */
19  /* 4. The authors' names are not used to endorse or promote products */
20  /* derived from this software without specific prior written */
21  /* permission. */
22  /* */
23  /* THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK */
24  /* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
25  /* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
26  /* SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE */
27  /* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
28  /* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
29  /* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
30  /* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
31  /* THIS SOFTWARE. */
32  /* */
33  /*************************************************************************/
34 
35 
36 #ifndef __EST_TSORTABLE_I_H__
37 #define __EST_TSORTABLE_I_H__
38 
39 /** Instantiate rules for sortable template.
40  *
41  * @author Richard Caley <rjc@cstr.ed.ac.uk>
42  * @version $Id: EST_TSortableI.h,v 1.2 2001/04/04 13:11:27 awb Exp $
43  */
44 
45 
46 // Instantiation Macros
47 
48 #define Instantiate_TSortable_T(TYPE, TAG) \
49  template class EST_TSortable<TYPE>; \
50  template class EST_TSortable<TYPE *>; \
51  \
52  template void sort(EST_TList<TYPE> &, bool (*gt)(const EST_UItem *, const EST_UItem *)); \
53  template void qsort(EST_TList<TYPE> &, bool (*gt)(const EST_UItem *, const EST_UItem *)); \
54  template void ptr_sort(EST_TList<TYPE> &a); \
55  template void ptr_qsort(EST_TList<TYPE> &a); \
56  template void sort_unique(EST_TList<TYPE> &a); \
57  template void merge_sort_unique(EST_TList<TYPE> &l, EST_TList<TYPE> &m); \
58  \
59  template bool operator==(const EST_TList<TYPE> &a, const EST_TList<TYPE> &b);
60 
61 #define Instantiate_TSortable(TYPE) Instantiate_TSortable_T(TYPE, TYPE)
62 
63 #define Declare_TSortable_T(TYPE,TAG)
64 
65 #define Declare_TSortable_Base_T(TYPE,DEFAULT,ERROR,TAG)
66 
67 #define Declare_TSortable_Class_T(TYPE,DEFAULT,ERROR,TAG)
68 
69 #define Declare_TSortable(TYPE) Declare_TSortable_T(TYPE,TYPE)
70 
71 #define Declare_TSortable_Base(TYPE,DEFAULT,ERROR) Declare_TSortable_Base_T(TYPE,DEFAULT,ERROR,TYPE)
72 #define Declare_TSortable_Class(TYPE,DEFAULT,ERROR) Declare_TSortable_Class_T(TYPE,DEFAULT,ERROR,TYPE)
73 
74 #endif
75