#ifndef LIBRARY_H #define LIBRARY_H #ifndef __CSTRING_H #include #endif #ifndef __FSTREAM_H #include #endif #ifndef DARRY_H #include "darray.h" #endif #ifndef RCPOINTE_H #include "rcpointe.h" #endif class Book { public: Book(){} Book(const string &a, const string &b):_author(a),_title(b){} void read(istream &s); void write(ostream &s)const; int operator== (const Book &b)const; int operator != (const Book &b) {return _author!= b._author || _title != b._title;} void windowString(char *buff)const;//returns string for window listing void tabString(char *buff)const;//returns string for tabbed listbox private: string _author; string _title; }; typedef Array BookList; // used to make lists of books found class Library { public: // we won't read whole file since window needs to access each book as it's read void write(ostream &); void addBook(const Book&); int deleteBook(int); //location determined by interface BookList findAuthor(const string&); BookList findTitle(const string&); int find(const Book&)const; void clearArray(); private: Array _books; }; typedef RcPointer LibPtr; #endif