X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/3f8621c5effb167a51944b86334867e2fe8fedb3..cec8c646c79e40d928464b08a6f2e3ea62bb1611:/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(); };