48 template<
class T, const
int deleteOnRemove = 0>
118 void InsertAfter( ListItem* where, T& val )
120 ListItem* newItem =
new ListItem( val );
123 if( _tail == 0 && _head == 0 )
125 _tail = _head = newItem;
133 newItem->Prev( where );
134 newItem->Next( where->Next() );
136 where->Next()->Prev( newItem );
137 where->Next( newItem );
150 InsertAfter( _tail, val );
153 void InsertBefore( ListItem* where, T& val )
155 ListItem* newItem =
new ListItem( val );
158 if( _tail == 0 && _head == 0 )
160 _tail = _head = newItem;
168 newItem->Next( where );
169 newItem->Prev( where->Prev() );
171 where->Prev()->Next( newItem );
172 where->Prev( newItem );
188 void Remove( ListItem* where )
190 if( !where || _count <= 0 )
195 _head = where->Next();
199 _tail = where->Prev();
203 where->Prev()->Next( where->Next() );
205 where->Next()->Prev( where->Prev() );
A file for all GL Studio files to include.
Definition: bmpimage.h:46