// BIB_ITEM.H #include #include #include #include const int SSize = 256; // SIZE OF ALL STRINGS class Item // BASE CLASS { private : static int Count; virtual void Get_Data( void ); public : static int Total; Item( void ); // CONSTRUCTOR Item( char *, char * ); // CONSTRUCTOR ~Item( void ); // DESTRUCTOR Item *Next; // POINTER TO NEXT ITEM virtual char *Get_Author( void ); virtual char *Get_Title( void ); virtual Item *Get_Next( void ); virtual int Get_Total( void ) const; virtual void Print( void ) const; }; class Book : public Item // FRAME { private : static int Count; int ID; char Author[ SSize ]; // SLOTS char Title[ SSize ]; char Copyright[ SSize ]; char Publisher[ SSize ]; char Pub_City[ SSize ]; // SLOTS void Get_Data( void ); public : static int Total; Book( char *A, char *T, char *C, char *P, char *PC ); Book( char *A, char *T ); // CONSTRUCTORS ~Book( void ); // DESTRUCTOR Book *Next; // POINTER TO NEXT ITEM char *Get_Author( void ); char *Get_Title( void ); int Get_Total( void ) const; void Print( void ) const; }; class Mag : public Item // FRAME { private : static int Count; int ID; Mag *Next; // POINTER TO NEXT ITEM char Author[ SSize ]; // SLOTS char Title[ SSize ]; char Mag_Title[ SSize ]; char Copyright[ SSize ]; char Volume[ SSize ]; char Number[ SSize ]; char Pages[ SSize ]; // SLOTS void Get_Data( void ); public : static int Total; Mag( char *A, char *T, char *MT, char *C, char *V, char *N, char *P ); Mag( char *A, char *T ); // CONSTRUCTOR ~Mag( void ); // DESTRUCTOR char *Get_Author( void ); char *Get_Title( void ); int Get_Total( void ) const; void Print( void ) const; }; class MicroFilm : public Item // FRAME { private : static int Count; int ID; MicroFilm *Next; // POINTER TO NEXT ITEM char Author[ SSize ]; // SLOTS char Title[ SSize ]; char Copyright[ SSize ]; char Volume[ SSize ]; char Number[ SSize ]; char Footage[ SSize ]; // SLOTS void Get_Data( void ); public : static int Total; MicroFilm( char *A, char *T, char *C, char *V, char *N, char *F ); MicroFilm( char *A, char *T ); // CONSTRUCTOR ~MicroFilm( void ); // DESTRUCTOR char *Get_Author( void ); char *Get_Title( void ); int Get_Total( void ) const; void Print( void ) const; }; class Items : public Item // OBJECTS { public : char Type[ SSize ]; // USED FOR TYPE NAME Item *Head_List; // HEAD OF THIS LIST Items *Next_Item; // NEXT ITEMS CLASS IE: BOOK, MAG, ETC public : Items( char *IType ); // CONSTRUCTORS Items( char *IType, char *Author, char *Title ); ~Items( void ); // DESTRUCTOR void Print( void ) const; }; class Bib_Item { private : int found1; Items *Sort1; Item *Sort2; Items *ptr; Item *ptr2; public : Items *Head; Bib_Item( void ); ~Bib_Item( void ); void Print( void ) const; // SHOW ALL ITEMS IE: BOOK, MAG, ETC. void Print( char *Type ) const; // SHOW ALL AUTHORS AND TITLES IN LIST void Print( char *Type, char *Author, char *Title ); // SHOW A SINGLE ITEM Item *Find( char *Type, char *Author, char *Title ); Item *Add( char *Type, char *Author, char *Title ); int Delete( char *Type, char *Author, char *Title ); }; void Loader( Bib_Item *B ); #include "bib_item.cpp" // BIB_ITEM.H // END //