return rev_comp;
}
-void Sequence::set_header(std::string &header_)
+void Sequence::set_header(std::string header_)
{
header = header_;
}
-const std::string&
+std::string
Sequence::get_header() const
{
return header;
std::string::size_type size() const;
void clear();
- void set_header(std::string& header);
- const std::string& get_header() const;
+ void set_header(std::string header);
+ std::string get_header() const;
//! add a motif to our list of motifs
//! \throws motif_normalize_error if there's something wrong with a_motif
void add_motif(std::string a_motif);
#include <boost/python.hpp>
+#include <boost/python/return_internal_reference.hpp>
+#include <boost/python/return_by_value.hpp>
+#include <boost/python/return_value_policy.hpp>
using namespace boost::python;
#include <string>
.def("__str__", &Sequence::get_seq, return_value_policy<return_by_value>())
.def("size", &Sequence::size)
.def("__len__", &Sequence::size)
- //.add_property("header", &Sequence::get_header)
+ .add_property("header", &Sequence::get_header, &Sequence::set_header)
+ //.add_property("seq", &Sequence::get_seq, &Sequence::set_seq)
+ .def("rcseq", &Sequence::rev_comp, return_value_policy<return_by_value>())
;
}