50 #include "EST_common.h"
51 #include "EST_UList.h"
52 #include "EST_TSortable.h"
53 #include "EST_TIterator.h"
55 #include "instantiate/EST_TListI.h"
63 static void *
operator new(
size_t not_used,
void *place)
64 {(void)not_used;
return place;}
65 static void *
operator new(
size_t size)
67 p = (
void *)walloc(
char,size);
69 static void operator delete(
void *p)
73 static unsigned int s_nfree;
74 static unsigned int s_maxFree;
113 void init() { EST_UList::init(); };
122 ~
EST_TList() { clear_and_free(free_item); }
140 {
return item(nth_pointer(n)); };
143 {
return item(nth_pointer(n)); };
147 {
return item(head()); };
150 {
return item(tail()); };
155 {
return item(head()); };
158 {
return item(tail()); };
162 {
return item(ptr); };
165 {
return item(ptr); };
176 {
return EST_UList::remove(ptr, free_item); };
180 {
return EST_UList::remove(n, free_item); };
215 { EST_UList::exchange(a, b); };
218 { EST_UList::exchange(i,j); };
233 for (ptr = list.head(); ptr != 0; ptr = ptr->next())
234 st << list.
item(ptr) <<
" ";
240 { clear_and_free(free_item); };
248 void point_to_first(
IPointer &ip)
const { ip.p = head(); }
249 void move_pointer_forwards(IPointer &ip)
const { ip.p = ip.p->next(); }
250 bool points_to_something(
const IPointer &ip)
const {
return ip.p != NULL; }
251 T &points_at(
const IPointer &ip) {
return item(ip.p); }
310 EST_UList::sort_unique(l,
319 EST_UList::merge_sort_unique(l, m,
326 const char *error_name(
EST_TList<T> val) { (void)val;
return "<<TLIST>>"; }