+ APT_PUBLIC static bool MakeStatusCache(pkgSourceList &List,OpProgress *Progress,
+ MMap **OutMap = 0,bool AllowMem = false);
+ APT_PUBLIC static bool MakeOnlyStatusCache(OpProgress *Progress,DynamicMMap **OutMap);
+
+ void ReMap(void const * const oldMap, void const * const newMap);
+
+ pkgCacheGenerator(DynamicMMap *Map,OpProgress *Progress);
+ virtual ~pkgCacheGenerator();
+
+ private:
+ void * const d;
+ APT_HIDDEN bool MergeListGroup(ListParser &List, std::string const &GrpName);
+ APT_HIDDEN bool MergeListPackage(ListParser &List, pkgCache::PkgIterator &Pkg);
+ APT_HIDDEN bool MergeListVersion(ListParser &List, pkgCache::PkgIterator &Pkg,
+ std::string const &Version, pkgCache::VerIterator* &OutVer);
+
+ APT_HIDDEN bool AddImplicitDepends(pkgCache::GrpIterator &G, pkgCache::PkgIterator &P,
+ pkgCache::VerIterator &V);
+ APT_HIDDEN bool AddImplicitDepends(pkgCache::VerIterator &V, pkgCache::PkgIterator &D);
+
+ APT_HIDDEN bool AddNewDescription(ListParser &List, pkgCache::VerIterator &Ver,
+ std::string const &lang, MD5SumValue const &CurMd5, map_stringitem_t &md5idx);
+};
+ /*}}}*/
+// This is the abstract package list parser class. /*{{{*/
+class APT_HIDDEN pkgCacheListParser
+{
+ pkgCacheGenerator *Owner;
+ friend class pkgCacheGenerator;
+
+ // Some cache items
+ pkgCache::VerIterator OldDepVer;
+ map_pointer_t *OldDepLast;
+
+ void * const d;
+
+ protected:
+
+ inline map_stringitem_t StoreString(pkgCacheGenerator::StringType const type, std::string const &S) {return Owner->StoreString(type, S);};
+ inline map_stringitem_t StoreString(pkgCacheGenerator::StringType const type, const char *S,unsigned int Size) {return Owner->StoreString(type, S, Size);};
+
+ inline map_stringitem_t WriteString(const std::string &S) {return Owner->WriteStringInMap(S);};
+ inline map_stringitem_t WriteString(const char *S,unsigned int Size) {return Owner->WriteStringInMap(S,Size);};
+ bool NewDepends(pkgCache::VerIterator &Ver,const std::string &Package, const std::string &Arch,
+ const std::string &Version,uint8_t const Op,
+ uint8_t const Type);
+ bool NewProvides(pkgCache::VerIterator &Ver,const std::string &PkgName,
+ const std::string &PkgArch, const std::string &Version,
+ uint8_t const Flags);
+ bool NewProvidesAllArch(pkgCache::VerIterator &Ver, std::string const &Package,
+ std::string const &Version, uint8_t const Flags);
+
+ public: