]> ruin.nu Git - germs.git/blobdiff - src/sortaction.h
Basic implementation of threaded sorting
[germs.git] / src / sortaction.h
index a99f786988b88a9cb238fc77122fb6a14aa5d4f2..a1c5566acb16673368d5c3fc9260f9c68a055311 100644 (file)
@@ -44,7 +44,12 @@ class SortActionImpl{
                 * Compares sort actions.
                 */
                virtual bool operator==(const SortActionImpl& sa) const = 0;
-               
+
+               /**
+                * Compares sort actions.
+                */
+               virtual bool operator<(const SortActionImpl& sa) const = 0;
+
                /**
                 * Gives a string representation of the action, for output
                 */
@@ -92,6 +97,13 @@ class SortAction{
                        return (*_action) == (*sa._action);
                }
 
+               /**
+                * Compares sort actions.
+                */
+               bool operator<(const SortAction& sa) const{
+                       return (*_action) < (*sa._action);
+               }
+
                /**
                 * Compares sort actions.
                 */