]> ruin.nu Git - germs.git/blobdiff - src/sortaction.h
toString for actions
[germs.git] / src / sortaction.h
index 0e59cd385e1701eff4b2a592fbd0dc9aae2c73bb..66c337ca625cac468b113debc86c1cd224029a76 100644 (file)
@@ -22,6 +22,7 @@
 #define __SORTACTION_H__
 
 #include <tr1/memory>
+#include <string>
 class GeneOrder;
 /**
  * Abstraction of a sort action, all child actions has to be immutable.
@@ -63,6 +64,13 @@ class SortAction{
                virtual bool operator==(const SortAction& sa) const{
                        return (*_action) == (sa._action.get() == 0 ? sa : *sa._action);
                }
+               
+               /**
+                * Gives a string representation of the action, for output
+                */
+               virtual std::string toString() const{
+                       return _action->toString();
+               }
        private:
                ActionPointer _action;