]> ruin.nu Git - germs.git/blobdiff - src/sortaction.h
Added progress information for the search
[germs.git] / src / sortaction.h
index ec9a023710961ee0978651fe46f1520d6d18039d..a1c5566acb16673368d5c3fc9260f9c68a055311 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef __SORTACTION_H__
 #define __SORTACTION_H__
 
-#include <tr1/memory>
+#include "shared_ptr.h"
 #include <string>
 class GeneOrder;
 
@@ -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
                 */
@@ -58,7 +63,7 @@ class SortActionImpl{
  */
 class SortAction{
        public:
-               typedef std::tr1::shared_ptr<SortActionImpl> ActionPointer;
+               typedef shared_ptr<SortActionImpl> ActionPointer;
 
                /**
                 * Creates a new sort action, given a specified action.
@@ -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.
                 */