#include <OTC/collctn/listi.hh> class OTC_ListI {
public:
~OTC_ListI();
OTC_ListI();
OTC_ListI(OTC_ListI const& theList);
inline OTC_LinkList* list() const;
inline OTC_AVLTree* tree() const;
inline u_int population() const;
inline OTC_Boolean isEmpty() const;
inline void removeAll();
inline void removeFirst();
inline void removeLast();
void removeItem(int theIndex);
void removeRange(int theStart, u_int theLength);
inline void removeRange(OTC_Range theRange);
OTC_Link* first() const;
OTC_Link* last() const;
OTC_Link* item(int theIndex) const;
inline void addFirst(OTC_Link* theLink);
inline void addLast(OTC_Link* theLink);
void addBeforeItem(OTC_Link* theLink, int theIndex);
};
OTC_ListI
class encapsulates the base functionality
for implementing OTC_List
.
OTC_ListI();
OTC_ListI(OTC_ListI const& theList);
theList
. Ie., each shares and access
the same implementation.
inline OTC_LinkList* list() const;
inline OTC_AVLTree* tree() const;
inline u_int population() const;
inline OTC_Boolean isEmpty() const;
OTCLIB_TRUE
if the the list
is empty.
inline void removeAll();
inline void removeFirst();
inline void removeLast();
void removeItem(int theIndex);
theIndex
.
Raises an exception if there is no link at
location theIndex
.
void removeRange(int theStart, u_int theLength);
theLength
links starting at
location theStart
. Raises an exception
of the index or link are invalid.
inline void removeRange(OTC_Range theRange);
theLength
links starting at
location theStart
. Raises an exception
of the index or link are invalid.
OTC_Link* first() const;
OTC_Link* last() const;
OTC_Link* item(int theIndex) const;
theIndex
.
Raises an exception if theIndex
is
invalid.
inline void addFirst(OTC_Link* theLink);
theLink
at the start of the
the list.
inline void addLast(OTC_Link* theLink);
theLink
at the end of the
the list.
void addBeforeItem(OTC_Link* theLink, int theIndex);
theLink
in the list at a location
theIndex
.