Store Sequence sequence location in a shared_ptr class
[mussa.git] / py / glsequence.cpp
index 811e0dce7245770ae57c2c1e495aab43f9e5056c..017a94633d0145daa5f84a30fbf9d0034ca07174 100644 (file)
@@ -1,5 +1,6 @@
 #include <boost/python.hpp>
 using namespace boost::python;
+#include <boost/shared_ptr.hpp>
 
 #include "alg/annotation_colors.hpp"
 #include "alg/glsequence.hpp"
@@ -7,15 +8,15 @@ using namespace boost::python;
 
 void export_glsequence()
 {
-  /*
-  class_<GlSequence>("GlSequence", init<Sequence &, AnnotationColors &>())
+  class_<GlSequence, bases<Sequence> >("GlSequence", 
+      init<
+        const Sequence &, 
+        boost::shared_ptr<AnnotationColors> 
+      >())
     .def(init<GlSequence &>())
     .def("draw", &GlSequence::draw)
-    .def("sequence", &GlSequence::sequence, 
-                  return_internal_reference<>())
     .add_property("x", &GlSequence::x, &GlSequence::setX)
     .add_property("y", &GlSequence::y, &GlSequence::setY)
-    .add_property("length", &GlSequence::length)
+    .add_property("size", &GlSequence::size)
   ;
-  */
 }