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 // Created on Fri Feb 28 08:55:37 PST 1997 by heydon 00020 00021 // Last modified on Mon Aug 9 17:02:09 EDT 2004 by ken@xorian.net 00022 // modified on Sun Sep 13 16:55:53 PDT 1998 by heydon 00023 00024 // PkgBuild.H -- defines a structure that uniquely represents the top-level 00025 // build of a particular version of a package. 00026 00027 #ifndef _PKG_BUILD_H 00028 #define _PKG_BUILD_H 00029 00030 #include <Basics.H> 00031 #include <FS.H> 00032 #include <FP.H> 00033 #include <Model.H> 00034 00035 class PkgBuild { 00036 public: 00037 // public fields 00038 FP::Tag pkgDirFP; // the FP of a versioned package directory 00039 Model::T modelShortId; // the ShortId of a model within that package 00040 00041 // constructors 00042 PkgBuild() throw () { /* SKIP */ } 00043 PkgBuild(const FP::Tag& pkgDirFP, Model::T modelShortId) throw () 00044 : pkgDirFP(pkgDirFP), modelShortId(modelShortId) { /* SKIP */ } 00045 PkgBuild(std::istream &ifs) throw (FS::EndOfFile, FS::Failure) 00046 { this->Read(ifs); } 00047 00048 // Table operations 00049 Word Hash() const throw (); 00050 PkgBuild& operator= (const PkgBuild& pkg) throw (); 00051 friend bool operator== (const PkgBuild& pkg1, const PkgBuild& pkg2) 00052 throw (); 00053 00054 // write/read 00055 void Write(std::ostream &ofs) const throw (FS::Failure); 00056 void Read(std::istream &ifs) throw (FS::EndOfFile, FS::Failure); 00057 00058 // print 00059 void Print(std::ostream &os, int indent = 0) const throw (); 00060 }; 00061 00062 #endif /* _PKG_BUILD_H */