show where the Ns are
[mussa.git] / alg / seq_span.hpp
index f5e574814c532b7ea95246695fc837e7d534bd40..cf2723ea928d7bfc80034bba4d3d811940b226bb 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <string>
 #include <map>
+#include <list>
 
 #include <boost/serialization/base_object.hpp>
 #include <boost/serialization/export.hpp>
@@ -24,6 +25,8 @@
 
 class SeqSpan;
 typedef boost::shared_ptr<SeqSpan> SeqSpanRef;
+typedef std::list<SeqSpanRef> SeqSpanRefList;
+typedef boost::shared_ptr<SeqSpanRefList> SeqSpanRefListRef; 
 
 //! Track what segment of a sequence we're looking at
 class SeqSpan : public boost::enable_shared_from_this<SeqSpan> {
@@ -120,7 +123,8 @@ public:
   size_type parentStop() const;
   //! set stop position relative to parent sequence
   void setParentStop(size_type);
-  size_type parentSize() const { return (parent) ? parent->size() : size(); }
+  size_type parentSize() const { return (parent_seq) ? parent_seq->size() : size(); }
+  SeqSpanRef parent() { return parent_seq; }
   
 
   //! return a subsequence, copying over any appropriate annotation
@@ -155,7 +159,7 @@ protected:
   strand_type seq_strand;
   
   //! keep a reference to who our parent span is 
-  SeqSpanRef parent;
+  SeqSpanRef parent_seq;
   
   //! hold a reverse complement version of our sequence if needed
   SeqStringRef rc_seq;  
@@ -176,7 +180,7 @@ protected:
     ar & BOOST_SERIALIZATION_NVP(seq_start);
     ar & BOOST_SERIALIZATION_NVP(seq_count);
     ar & BOOST_SERIALIZATION_NVP(seq_strand);
-    ar & BOOST_SERIALIZATION_NVP(parent);
+    ar & BOOST_SERIALIZATION_NVP(parent_seq);
   }
 };
 #endif /*SEQ_SPAN_HPP_*/