IF(BOOST_PYTHON_LIBRARY)
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH} ${QT_INCLUDES})
SET(SOURCES
+ annotation_colors.cpp
conserved_path.cpp
glsequence.cpp
module.cpp
--- /dev/null
+#include <boost/python.hpp>
+#include <boost/python/register_ptr_to_python.hpp>
+using namespace boost::python;
+
+#include <boost/shared_ptr.hpp>
+
+#include "alg/annotation_colors.hpp"
+
+void export_annotation_colors()
+{
+ class_<AnnotationColors>("AnnotationColors")
+ .def("clear", &AnnotationColors::clear)
+ .add_property("color", &AnnotationColors::color,
+ &AnnotationColors::setColor,
+ "access default color for this color mapper")
+ ;
+
+ register_ptr_to_python< boost::shared_ptr<AnnotationColors> >();
+}
#include <boost/python.hpp>
using namespace boost::python;
+#include <boost/shared_ptr.hpp>
#include "alg/annotation_colors.hpp"
#include "alg/glsequence.hpp"
void export_glsequence()
{
- /*
- class_<GlSequence>("GlSequence", init<Sequence &, AnnotationColors &>())
+ class_<GlSequence>("GlSequence",
+ init<
+ boost::shared_ptr<Sequence>,
+ boost::shared_ptr<AnnotationColors>
+ >())
.def(init<GlSequence &>())
.def("draw", &GlSequence::draw)
.def("sequence", &GlSequence::sequence,
.add_property("y", &GlSequence::y, &GlSequence::setY)
.add_property("length", &GlSequence::length)
;
- */
}
#include <boost/python.hpp>
using namespace boost::python;
+void export_annotation_colors();
void export_conserved_path();
void export_glsequence();
void export_mussa();
BOOST_PYTHON_MODULE(mussa)
{
+ export_annotation_colors();
export_conserved_path();
export_glsequence();
export_mussa();
#include <boost/python/return_internal_reference.hpp>
#include <boost/python/return_by_value.hpp>
#include <boost/python/return_value_policy.hpp>
+#include <boost/python/register_ptr_to_python.hpp>
using namespace boost::python;
+#include <boost/shared_ptr.hpp>
+
#include <string>
#include "alg/glsequence.hpp"
.add_property("species", &Sequence::get_species, &Sequence::set_species)
.def("rcseq", &Sequence::rev_comp, return_value_policy<return_by_value>())
;
+
+ register_ptr_to_python< boost::shared_ptr<Sequence> >();
}