Store Sequence sequence location in a shared_ptr class
[mussa.git] / alg / sequence_location.hpp
index 12830f7a6e388aa595ccea38b59b8dbe2a33d510..a1bad12b7427ae35054d6d85758ace0a93f62386 100644 (file)
@@ -4,25 +4,34 @@
 #include <boost/shared_ptr.hpp>
 #include "alg/sequence.hpp"
 
+// FIXME: Deprecate! SeqSpan and/or Sequence should replace sequence location
 //! convenience structure for holding selected track segments
 class SequenceLocation {
   public:
-    SequenceLocation(boost::shared_ptr<Sequence> s, int l, int c);
-    SequenceLocation(const Sequence& s, int l, int c);
+    typedef size_t size_type;
+    
+    SequenceLocation(boost::shared_ptr<Sequence> s, int l, int r);
+    SequenceLocation(const Sequence& s, int l, int r);
     SequenceLocation(const SequenceLocation& );
     SequenceLocation& operator=(const SequenceLocation&);
 
+    //! get the sequence we're selecting from
     const Sequence& getSequence() const;
+    //! return the selected subsequence
+    Sequence getSelectedSequence() const;
     void setLeft(int l);
     int getLeft() const;
-    void setCount(int c);
-    int getCount() const ;
+    void setCount(size_type c);
+    size_type getCount() const;
+    //! set one past the right-most base 
     void setRight(int r);
     int getRight() const;
 
+    //! return total length of region (alias for getCount())
+    size_type size() const;
   private:
     boost::shared_ptr<Sequence> sequence;
     int left;
-    int count;
+    int right;
   };
 #endif