00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <Basics.H>
00023 #include <VestaLog.H>
00024 #include <Recovery.H>
00025
00026 #include "CacheEntry.H"
00027 #include "Intvl.H"
00028
00029 using std::ostream;
00030 using std::endl;
00031
00032 void Intvl::T::Log(VestaLog &log) const throw (VestaLog::Error)
00033 {
00034 log.write((char *)(&(this->op)), sizeof(this->op));
00035 log.write((char *)(&(this->lo)), sizeof(this->lo));
00036 log.write((char *)(&(this->hi)), sizeof(this->hi));
00037 }
00038
00039 void Intvl::T::Recover(RecoveryReader &rd)
00040 throw (VestaLog::Error, VestaLog::Eof)
00041 {
00042 rd.readAll((char *)(&(this->op)), sizeof(this->op));
00043 rd.readAll((char *)(&(this->lo)), sizeof(this->lo));
00044 rd.readAll((char *)(&(this->hi)), sizeof(this->hi));
00045 }
00046
00047 void Intvl::T::Debug(ostream &s) const throw ()
00048 {
00049 s << " interval = " << ((op == Intvl::Add) ? "+" : "-")
00050 << " [" << lo << ", " << hi << "]" << endl;
00051 }