fdhwlib
2.0.25
|
00001 /*************************************************************************** 00002 sltpagestatus.h - description 00003 00004 begin : Tue Jun 11 2002 00005 copyright : (C) 2002 by A Kopmann 00006 email : kopmann@ipe.fzk.de 00007 status : 00008 test : 00009 history : 00010 ***************************************************************************/ 00011 00012 00013 #ifndef SLTPAGESTATUS_H 00014 #define SLTPAGESTATUS_H 00015 00016 #include <cstdio> 00017 00018 #include <Hw/SltDef.h> 00019 00028 class SltPageStatus { 00029 public: 00030 SltPageStatus(); 00031 ~SltPageStatus(); 00032 00034 void set(int word, unsigned long status); 00035 00040 unsigned long get(int word); 00041 00044 unsigned long *get(); 00045 00048 int getLength(); 00049 00051 int getNumberOfPages(); 00052 00054 int getNumberOfFilledPages(); 00055 00057 void setPageFilled(int page); 00058 00060 void setPageFilled(); 00061 00063 void setPageFree(int page); 00064 00066 void setPageFree(); 00067 00069 bool isPageFilled(); 00070 00075 bool isPageFilled(int page); 00076 00078 void display(FILE *fout, const char *name = 0); 00079 00080 00082 bool operator==(const SltPageStatus &status) const; 00083 00085 SltPageStatus& operator=(const SltPageStatus &status); 00086 00091 SltPageStatus& operator=(unsigned long *status); 00092 00093 00095 SltPageStatus operator^(const SltPageStatus &status) const; 00096 00098 SltPageStatus& operator^=(const SltPageStatus &status); 00099 00101 SltPageStatus operator~() const; 00102 00104 SltPageStatus operator&(const SltPageStatus &status) const; 00105 00107 SltPageStatus& operator&=(const SltPageStatus &status); 00108 00110 SltPageStatus operator|(const SltPageStatus &status) const; 00111 00113 SltPageStatus& operator|=(const SltPageStatus &status); 00114 00115 //private: 00116 00119 unsigned long data[SLT_PAGES/32]; 00120 00121 int len; 00122 00123 }; 00124 00125 #endif