Store Sequence sequence location in a shared_ptr class
[mussa.git] / alg / sequence_location.hpp
index 3aca443b4164352817ff84e5edfb7e6abe6477e5..a1bad12b7427ae35054d6d85758ace0a93f62386 100644 (file)
@@ -4,9 +4,12 @@
 #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:
+    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& );
@@ -18,12 +21,14 @@ class SequenceLocation {
     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;