Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Intvl.C

Go to the documentation of this file.
00001 // Copyright (C) 2001, Compaq Computer Corporation
00002 // 
00003 // This file is part of Vesta.
00004 // 
00005 // Vesta is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public
00007 // License as published by the Free Software Foundation; either
00008 // version 2.1 of the License, or (at your option) any later version.
00009 // 
00010 // Vesta is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 // Lesser General Public License for more details.
00014 // 
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with Vesta; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 
00019 // Last modified on Thu Aug  5 00:02:42 EDT 2004 by ken@xorian.net
00020 //      modified on Fri Feb 27 18:44:51 PST 1998 by heydon
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 }

Generated on Mon May 8 00:48:34 2006 for Vesta by  doxygen 1.4.2