Code Search for Developers
 
 
  

cachefile.h from GreenSocs at Krugle


Show cachefile.h syntax highlighted

// -*- mode: cpp; mode: fold -*-
// Description								/*{{{*/
// $Id: cachefile.h,v 1.5 2002/04/27 04:28:04 jgg Exp $
/* ######################################################################
   
   CacheFile - Simple wrapper class for opening, generating and whatnot
   
   This class implements a simple 2 line mechanism to open various sorts
   of caches. It can operate as root, as not root, show progress and so on,
   it transparently handles everything necessary.
   
   This means it can rebuild caches from the source list and instantiates
   and prepares the standard policy mechanism.
   
   ##################################################################### */
									/*}}}*/
#ifndef PKGLIB_CACHEFILE_H
#define PKGLIB_CACHEFILE_H

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

#include <apt-pkg/depcache.h>

class pkgPolicy;
class pkgCacheFile
{
   protected:
   
   MMap *Map;
   pkgCache *Cache;
   pkgDepCache *DCache;
   
   public:

   pkgPolicy *Policy;
      
   // We look pretty much exactly like a pointer to a dep cache
   inline operator pkgCache &() {return *Cache;};
   inline operator pkgCache *() {return Cache;};
   inline operator pkgDepCache &() {return *DCache;};
   inline operator pkgDepCache *() {return DCache;};
   inline pkgDepCache *operator ->() {return DCache;};
   inline pkgDepCache &operator *() {return *DCache;};
   inline pkgDepCache::StateCache &operator [](pkgCache::PkgIterator const &I) {return (*DCache)[I];};
   inline unsigned char &operator [](pkgCache::DepIterator const &I) {return (*DCache)[I];};

   bool BuildCaches(OpProgress &Progress,bool WithLock = true);
   bool Open(OpProgress &Progress,bool WithLock = true);
   void Close();
   
   pkgCacheFile();
   ~pkgCacheFile();
};

#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