65 static void *
operator new(
size_t not_used,
void *place)
66 {(void)not_used;
return place;}
67 static void *
operator new(
size_t size)
69 p = (
void *)
walloc(
char,size);
71 static void operator delete(
void *
p)
75 static unsigned int s_nfree;
76 static unsigned int s_maxFree;
146 {
return item(nth_pointer(n)); };
149 {
return item(nth_pointer(n)); };
153 {
return item(head()); };
156 {
return item(tail()); };
161 {
return item(head()); };
164 {
return item(tail()); };
168 {
return item(ptr); };
171 {
return item(ptr); };
236 friend std::ostream& operator << (std::ostream &st, EST_TList<T>
const &list) {
238 for (ptr = list.head(); ptr != 0; ptr = ptr->
next())
239 st << list.item(ptr) <<
" ";
245 { clear_and_free(free_item); };
T & last()
return reference to last item in list
EST_Litem * remove_nth(int n)
remove nth item, return pointer to previous item
bool operator==(const EST_TList< T > &a, const EST_TList< T > &b)
#define walloc(TYPE, SIZE)
EST_Litem * insert_before(EST_Litem *ptr, const T &item)
void ptr_qsort(EST_TList< T > &a)
bool operator!=(const EST_TList< T > &a, const EST_TList< T > &b)
EST_UItem * remove(EST_UItem *ptr, void(*item_free)(EST_UItem *item))
const char * error_name(EST_TList< T > val)
EST_UItem EST_Litem
A pretty name for EST_UItem.
const T & last() const
return const reference to last item in list
EST_TList()
default constructor
T & nth(int n)
return the Nth value
int index(EST_TList< T > &l, T &val, bool(*eq)(const EST_UItem *, const EST_UItem *)=NULL)
void sort(EST_TList< T > &a, bool(*gt)(const EST_UItem *, const EST_UItem *)=NULL)
void ptr_sort(EST_TList< T > &a)
EST_TIterator< EST_TList< T >, IPointer, T > Entries
static void merge_sort_unique(EST_UList &l, EST_UList &m, bool(*eq)(const EST_UItem *item1, const EST_UItem *item2), bool(*gt)(const EST_UItem *item1, const EST_UItem *item2), void(*item_free)(EST_UItem *item))
T & points_at(const IPointer &ip)
void sort_unique(EST_TList< T > &l)
void qsort(EST_TList< T > &a, bool(*gt)(const EST_UItem *, const EST_UItem *)=NULL)
void move_pointer_forwards(IPointer &ip) const
const T & nth(int n) const
return a const Nth value
static EST_TItem * make(const T &val)
EST_Pathname & operator+=(EST_Pathname p, const EST_Pathname addition)
static void release(EST_TItem< T > *it)
static void sort(EST_UList &a, bool(*gt)(const EST_UItem *item1, const EST_UItem *item2))
const T & first() const
return const reference to first item in list
void merge_sort_unique(EST_TList< T > &l, EST_TList< T > &m)
void prepend(EST_UItem *item)
void append(const T &item)
add item onto end of list
void exchange(EST_UItem *a, EST_UItem *b)
const T & item(const EST_Litem *p) const
void append(EST_UItem *item)
T & item(const EST_Litem *p)
EST_UItem * insert_before(EST_UItem *ptr, EST_UItem *new_item)
bool points_to_something(const IPointer &ip) const
static void qsort(EST_UList &a, bool(*gt)(const EST_UItem *item1, const EST_UItem *item2), void(*exchange)(EST_UItem *item1, EST_UItem *item2))
EST_Litem * insert_after(EST_Litem *ptr, const T &item)
EST_TRwIterator< EST_TList< T >, IPointer, T > RwEntries
static void sort_unique(EST_UList &l, bool(*eq)(const EST_UItem *item1, const EST_UItem *item2), bool(*gt)(const EST_UItem *item1, const EST_UItem *item2), void(*item_free)(EST_UItem *item))
void exchange(int i, int j)
exchange 2
void exchange(EST_Litem *a, EST_Litem *b)
exchange 1
void point_to_first(IPointer &ip) const
void clear(void)
remove all items in list
EST_UItem * insert_after(EST_UItem *ptr, EST_UItem *new_item)
int index(EST_UItem *item) const
void prepend(const T &item)
add item onto start of list
static bool operator_eq(const EST_UList &a, const EST_UList &b, bool(*eq)(const EST_UItem *item1, const EST_UItem *item2))