X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/308b793694774eece8765d172b8e989d8ed29925..be9b62f76406cf2546d21f3ca27587ee20e0fc37:/apt-pkg/cachefile.h diff --git a/apt-pkg/cachefile.h b/apt-pkg/cachefile.h index 1647aff8e..d07337d38 100644 --- a/apt-pkg/cachefile.h +++ b/apt-pkg/cachefile.h @@ -20,21 +20,23 @@ #include #include +#include #include -class pkgPolicy; -class pkgSourceList; class pkgCacheFile { + /** \brief dpointer placeholder (for later in case we need it) */ + void *d; + protected: MMap *Map; pkgCache *Cache; pkgDepCache *DCache; - pkgPolicy *Policy; pkgSourceList *SrcList; public: + pkgPolicy *Policy; // We look pretty much exactly like a pointer to a dep cache inline operator pkgCache &() {return *Cache;}; @@ -65,6 +67,11 @@ class pkgCacheFile inline pkgPolicy* GetPolicy() { BuildPolicy(); return Policy; }; inline pkgSourceList* GetSourceList() { BuildSourceList(); return SrcList; }; + inline bool IsPkgCacheBuilt() const { return (Cache != NULL); }; + inline bool IsDepCacheBuilt() const { return (DCache != NULL); }; + inline bool IsPolicyBuilt() const { return (Policy != NULL); }; + inline bool IsSrcListBuilt() const { return (SrcList != NULL); }; + pkgCacheFile(); virtual ~pkgCacheFile(); };