struct listNode; // defined later typedef listNode* ptrType; class listClass : public baseListClass { public: // constructors and destructor: listClass(); listClass(const listClass& L); virtual ~listClass(); // list operations: virtual bool ListIsEmpty() const; virtual int ListLength() const; virtual void ListInsert(int NewPosition, listItemType NewItem, bool& Success); virtual void ListDelete(int Position, bool& Success); virtual void ListRetrieve(int Position, listItemType& DataItem, bool& Success) const; virtual void DisplayList() const; protected: void SetSize(int NewSize); // sets Size ptrType ListHead() const; // returns Head void SetHead(ptrType NewHead); // sets Head // the next two functions return the list item and // Next pointer of a node in the linked list listItemType ListItem(ptrType P) const; ptrType ListNext(ptrType P) const; private: int Size; // number of items in the list ptrType Head; // pointer to the linked list ptrType PtrTo(int Position) const; }; // end class