00001 // pbitmap.h 00002 // Data structures defining a "persistent" bitmap -- a bitmap 00003 // that can be stored and fetched off of disk 00004 // 00005 // A persistent bitmap can either be initialized from the disk 00006 // when it is created, or it can be initialized later using 00007 // the FetchFrom method 00008 // 00009 // Copyright (c) 1992,1993,1995 The Regents of the University of California. 00010 // All rights reserved. See copyright.h for copyright notice and limitation 00011 // of liability and disclaimer of warranty provisions. 00012 00013 #ifndef PBITMAP_H 00014 #define PBITMAP_H 00015 00016 #include "copyright.h" 00017 #include "bitmap.h" 00018 #include "openfile.h" 00019 00020 // The following class defines a persistent bitmap. It inherits all 00021 // the behavior of a bitmap (see bitmap.h), adding the ability to 00022 // be read from and stored to the disk. 00023 00024 class PersistentBitmap : public Bitmap { 00025 public: 00026 PersistentBitmap(OpenFile *file,int numItems); //initialize bitmap from disk 00027 PersistentBitmap(int numItems); // or don't... 00028 00029 ~PersistentBitmap(); // deallocate bitmap 00030 00031 void FetchFrom(OpenFile *file); // read bitmap from the disk 00032 void WriteBack(OpenFile *file); // write bitmap contents to disk 00033 }; 00034 00035 #endif // PBITMAP_H