X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/9d4c8f671af479cba90e1db2f68d9abf9daaa4a4..92d956ea4d68789fa6d15702a4c2336039dcdb0f:/apt-pkg/orderlist.h?ds=sidebyside diff --git a/apt-pkg/orderlist.h b/apt-pkg/orderlist.h index 7e1b8efbc..bbceb3879 100644 --- a/apt-pkg/orderlist.h +++ b/apt-pkg/orderlist.h @@ -1,42 +1,30 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: orderlist.h,v 1.7 1999/08/12 05:59:54 jgg Exp $ +// $Id: orderlist.h,v 1.9 2001/02/20 07:03:17 jgg Exp $ /* ###################################################################### Order List - Represents and Manipulates an ordered list of packages. A list of packages can be ordered by a number of conflicting criteria each given a specific priority. Each package also has a set of flags - indicating some usefull things about it that are derived in the + indicating some useful things about it that are derived in the course of sorting. The pkgPackageManager class uses this class for all of it's installation ordering needs. ##################################################################### */ /*}}}*/ -// Header section: pkglib #ifndef PKGLIB_ORDERLIST_H #define PKGLIB_ORDERLIST_H -#ifdef __GNUG__ -#pragma interface "apt-pkg/orderlist.h" -#endif #include class pkgDepCache; -class pkgOrderList +class pkgOrderList : protected pkgCache::Namespace { protected: - pkgDepCache &Cache; - - // Bring some usefull types into the local scope - typedef pkgCache::PkgIterator PkgIterator; - typedef pkgCache::VerIterator VerIterator; - typedef pkgCache::DepIterator DepIterator; - typedef pkgCache::PrvIterator PrvIterator; - typedef pkgCache::Package Package; - typedef pkgCache::Version Version; + pkgDepCache &Cache; typedef bool (pkgOrderList::*DepFunc)(DepIterator D); // These are the currently selected ordering functions @@ -48,11 +36,13 @@ class pkgOrderList // State Package **End; Package **List; + Package **AfterEnd; string *FileList; DepIterator Loops[20]; int LoopCount; int Depth; - unsigned char *Flags; + unsigned short *Flags; + bool Debug; // Main visit function bool VisitNode(PkgIterator Pkg); @@ -90,6 +80,7 @@ class pkgOrderList UnPacked = (1 << 4), Configured = (1 << 5), Removed = (1 << 6), // Early Remove InList = (1 << 7), + After = (1 << 8), States = (UnPacked | Configured | Removed)}; // Flag manipulators @@ -119,7 +110,7 @@ class pkgOrderList int Score(PkgIterator Pkg); - pkgOrderList(pkgDepCache &Cache); + pkgOrderList(pkgDepCache *Cache); ~pkgOrderList(); };