#ifndef NODELIST_H #define NODELIST_H #include"dnode.h" class ListContainer { public: // these are actually implimented ListContainer( void ); bool Empty( void ); // virtual methods // this means they are implimented here // but may be implimented in the derived class virtual void LongName( void ); // destructors should be virtual // if there are any virtual functions virtual ~ListContainer( void ); // pure virtual methods // the " = 0" indicates pure virtual // so all derived classes MUST impliment these // since they are not done here in the base class virtual void Name( void ) = 0; virtual void Insert( int ) = 0; virtual void Delete( int ) = 0; virtual int Delete( void ) = 0; protected: // implimented list operations // put in protected to prevent use outside inheritance void InsertOrder( int ); void DeleteOrder( int ); int DeleteFirst( void ); int DeleteLast( void ); void InsertFront( int ); void InsertBack( int ); // assingment declared here just to prevent use ListContainer & operator=( const ListContainer & ); // doubly linked list with dummy head and tail DNode head; DNode tail; }; #endif