[Aptitude-devel] r3033 - in branches/aptitude-0.3/aptitude: . src/generic/problemresolver

Daniel Burrows dburrows@costa.debian.org
Fri, 22 Apr 2005 02:29:21 +0000


Author: dburrows
Date: Fri Apr 22 02:29:18 2005
New Revision: 3033

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h
Log:
Add a way to check whether a resolver is exhausted.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Fri Apr 22 02:29:18 2005
@@ -2,6 +2,11 @@
 
 	* src/generic/problemresolver/problemresolver.h:
 
+	  Add a function that returns "true" if the open queue has been
+	  exhausted.
+
+	* src/generic/problemresolver/problemresolver.h:
+
 	  Once a resolver examines all possible solutions, it now returns
 	  "no more solutions" permanently until you call a "reset" method
 	  (which clears out all scores and empties the open and closed

Modified: branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h	(original)
+++ branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h	Fri Apr 22 02:29:18 2005
@@ -707,6 +707,12 @@
       version_scores[i]=0;
   }
 
+  /** \return \b true if the open queue is empty. */
+  bool exhausted() const
+  {
+    return open.empty();
+  }
+
   /** Tells the resolver how highly to value a particular package
    *  version.  All scores are relative, and a higher score will
    *  result in a bias towards that version appearing in the final