Code Search for Developers
 
 
  

indexfile.h from GreenSocs at Krugle


Show indexfile.h syntax highlighted

// -*- mode: cpp; mode: fold -*-
// Description								/*{{{*/
// $Id: indexfile.h,v 1.6 2002/07/08 03:13:30 jgg Exp $
/* ######################################################################

   Index File - Abstraction for an index of archive/source file.
   
   There are 3 primary sorts of index files, all represented by this 
   class:
   
   Binary index files 
   Bianry index files decribing the local system
   Source index files
   
   They are all bundled together here, and the interfaces for 
   sources.list, acquire, cache gen and record parsing all use this class
   to acess the underlying representation.
   
   ##################################################################### */
									/*}}}*/
#ifndef PKGLIB_INDEXFILE_H
#define PKGLIB_INDEXFILE_H

#ifdef __GNUG__
#pragma interface "apt-pkg/indexfile.h"
#endif

#include <string>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/srcrecords.h>
#include <apt-pkg/pkgrecords.h>
    
using std::string;

class pkgAcquire;
class pkgCacheGenerator;
class OpProgress;
class pkgIndexFile
{
   public:

   class Type
   {
      public:
      
      // Global list of Items supported
      static Type **GlobalList;
      static unsigned long GlobalListLen;
      static Type *GetType(const char *Type);

      const char *Label;

      virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator /*File*/) const {return 0;};
      Type();
   };

   virtual const Type *GetType() const = 0;
   
   // Return descriptive strings of various sorts
   virtual string ArchiveInfo(pkgCache::VerIterator Ver) const;
   virtual string SourceInfo(pkgSrcRecords::Parser const &Record,
			     pkgSrcRecords::File const &File) const;
   virtual string Describe(bool Short = false) const = 0;   

   // Interface for acquire
   virtual string ArchiveURI(string /*File*/) const {return string();};
   virtual bool GetIndexes(pkgAcquire *Owner) const;

   // Interface for the record parsers
   virtual pkgSrcRecords::Parser *CreateSrcParser() const {return 0;};
   
   // Interface for the Cache Generator
   virtual bool Exists() const = 0;
   virtual bool HasPackages() const = 0;
   virtual unsigned long Size() const = 0;
   virtual bool Merge(pkgCacheGenerator &/*Gen*/,OpProgress &/*Prog*/) const {return false;};
   virtual bool MergeFileProvides(pkgCacheGenerator &/*Gen*/,OpProgress &/*Prog*/) const {return true;};
   virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
   
   virtual ~pkgIndexFile() {};
};

#endif




See more files for this project here

GreenSocs

To develop SystemC infrustructure, basic IP, patches and add on library code for eventual standerdization.\r\nThe GreenSocs project is made up of a number of contributions (sub projects). Please visit www.greensocs.com for more information.

Project homepage: http://sourceforge.net/projects/greensocs
Programming language(s): C,C++,Java,Perl,XML
License: other

  contrib/
    cdromutl.cc
    cdromutl.h
    cmndline.cc
    cmndline.h
    configuration.cc
    configuration.h
    crc-16.cc
    crc-16.h
    error.cc
    error.h
    fileutl.cc
    fileutl.h
    hashes.cc
    hashes.h
    md5.cc
    md5.h
    mmap.cc
    mmap.h
    progress.cc
    progress.h
    sha1.cc
    sha1.h
    sptr.h
    strutl.cc
    strutl.h
    system.h
  deb/
    debindexfile.cc
    debindexfile.h
    deblistparser.cc
    deblistparser.h
    debrecords.cc
    debrecords.h
    debsrcrecords.cc
    debsrcrecords.h
    debsystem.cc
    debsystem.h
    debversion.cc
    debversion.h
    dpkgpm.cc
    dpkgpm.h
  acquire-item.cc
  acquire-item.h
  acquire-method.cc
  acquire-method.h
  acquire-worker.cc
  acquire-worker.h
  acquire.cc
  acquire.h
  algorithms.cc
  algorithms.h
  cachefile.cc
  cachefile.h
  cacheiterators.h
  clean.cc
  clean.h
  depcache.cc
  depcache.h
  indexfile.cc
  indexfile.h
  init.cc
  init.h
  makefile
  orderlist.cc
  orderlist.h
  packagemanager.cc
  packagemanager.h
  pkgcache.cc
  pkgcache.h
  pkgcachegen.cc
  pkgcachegen.h
  pkgrecords.cc
  pkgrecords.h
  pkgsystem.cc
  pkgsystem.h
  policy.cc
  policy.h
  sourcelist.cc
  sourcelist.h
  srcrecords.cc
  srcrecords.h
  tagfile.cc
  tagfile.h
  version.cc
  version.h
  versionmatch.cc
  versionmatch.h