#include <string>
#include <map>
+#include <list>
#include <boost/serialization/base_object.hpp>
#include <boost/serialization/export.hpp>
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> {
enum strand_type { UnknownStrand, MinusStrand, PlusStrand,
BothStrand, SameStrand, OppositeStrand, SingleStrand };
-public:
SeqSpan(const SeqSpan &);
SeqSpan(const SeqSpan *);
explicit SeqSpan(const std::string &,
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
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;
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_*/