// FILE: LineList.h -- Specification of a list of lines of text. // BY: John Zelle // LineList is an abstraction of a list of lines of text. // All operations are performed relative to the "current" Line. #ifndef _LINELIST_H #define _LINELIST_H #includeclass LineList { public: LineList(); LineList(const LineList& value); // Not implemented ~LineList(); void advance(int n); void backup(int n); void display() const; // From current through end. void display_current() const; // Just display current. void insert(char* line); // Insert _before_ current. void remove(); // Remove current, next bcomes current. friend ostream& operator<<(ostream& stream, const LineList& list); // Mainly for debugging private: struct ListNode; // Actual structure hidden in implementation. ListNode* _head; ListNode* _current; }; #endif