X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/51b2a0fc603c8e4fe667bf7a278bd1ce151e38a3..0fae1ac4bfbf62e556f1d6a316b0a576c62d4131:/apt-pkg/orderlist.h diff --git a/apt-pkg/orderlist.h b/apt-pkg/orderlist.h index a2d7b321b..9171c45d6 100644 --- a/apt-pkg/orderlist.h +++ b/apt-pkg/orderlist.h @@ -1,6 +1,5 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: orderlist.h,v 1.9 2001/02/20 07:03:17 jgg Exp $ /* ###################################################################### Order List - Represents and Manipulates an ordered list of packages. @@ -16,13 +15,16 @@ #ifndef PKGLIB_ORDERLIST_H #define PKGLIB_ORDERLIST_H - #include +#include #include +#include + class pkgDepCache; class pkgOrderList : protected pkgCache::Namespace { + void * const d; protected: pkgDepCache &Cache; @@ -46,7 +48,7 @@ class pkgOrderList : protected pkgCache::Namespace bool Debug; // Main visit function - __deprecated bool VisitNode(PkgIterator Pkg) { return VisitNode(Pkg, "UNKNOWN"); }; + APT_DEPRECATED_MSG("Add a unique calling identifier as parameter for debugging output") bool VisitNode(PkgIterator Pkg) { return VisitNode(Pkg, "UNKNOWN"); }; bool VisitNode(PkgIterator Pkg, char const* from); bool VisitDeps(DepFunc F,PkgIterator Pkg); bool VisitRDeps(DepFunc F,PkgIterator Pkg); @@ -67,10 +69,9 @@ class pkgOrderList : protected pkgCache::Namespace bool DoRun(); // For pre sorting - static pkgOrderList *Me; - static int OrderCompareA(const void *a, const void *b); - static int OrderCompareB(const void *a, const void *b); - int FileCmp(PkgIterator A,PkgIterator B); + int OrderCompareA(Package *a, Package *b) APT_PURE; + int OrderCompareB(Package *a, Package *b) APT_PURE; + int FileCmp(PkgIterator A,PkgIterator B) APT_PURE; public: @@ -100,7 +101,7 @@ class pkgOrderList : protected pkgCache::Namespace inline void RmFlag(Package *Pkg,unsigned long F) {Flags[Pkg->ID] &= ~F;}; // IsNow will return true if the Pkg has been not been either configured or unpacked inline bool IsNow(PkgIterator Pkg) {return (Flags[Pkg->ID] & (States & (~Removed))) == 0;}; - bool IsMissing(PkgIterator Pkg); + bool IsMissing(PkgIterator Pkg) APT_PURE; void WipeFlags(unsigned long F); void SetFileList(std::string *FileList) {this->FileList = FileList;}; @@ -120,8 +121,8 @@ class pkgOrderList : protected pkgCache::Namespace int Score(PkgIterator Pkg); - pkgOrderList(pkgDepCache *Cache); - ~pkgOrderList(); + explicit pkgOrderList(pkgDepCache *Cache); + virtual ~pkgOrderList(); }; #endif