#include <boost/shared_ptr.hpp>
+#include "alphabet.hpp"
//! These classes provide for the internal implementation for the Sequence class
/** the only purpose of this class is that the shared_ptr template
* functions need the serialization support to be in-class.
*/
+
class SeqString : public std::string
{
public:
typedef std::string::value_type value_type;
static const size_type npos = std::string::npos;
- SeqString() : std::string() {};
- SeqString(const std::string &s) : std::string(s) {};
+ SeqString(AlphabetRef a=reduced_nucleic_alphabet) :
+ std::string(),
+ alphabet(a)
+ {}
+ SeqString(const std::string &s, AlphabetRef a=reduced_nucleic_alphabet) :
+ std::string(s),
+ alphabet(a)
+ {}
+
+ AlphabetRef get_alphabet_ref() { return alphabet; }
+ const Alphabet& get_alphabet() const;
+ std::string create_reverse_complement_map() const;
private:
+ AlphabetRef alphabet;
friend class boost::serialization::access;
template<class Archive>
void serialize(Archive& ar, const unsigned int /*version*/) {
//ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(std::string);
ar & boost::serialization::make_nvp("bases",
- boost::serialization::base_object<std::string>(*this)
+ boost::serialization::base_object<std::string>(*this)
);
+ ar & BOOST_SERIALIZATION_NVP(alphabet);
}
};
typedef boost::shared_ptr<SeqString> SeqStringRef;