From 64781be638d8fc962adf828eabd63e51825642e1 Mon Sep 17 00:00:00 2001
From: marco <marco@5a81b35b-ba03-0410-adc8-b2c5c5119f08>
Date: Thu, 8 Apr 2010 07:03:26 +0000
Subject: [PATCH] added SetSequenceOffset() to AlignmentHandle

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@1938 5a81b35b-ba03-0410-adc8-b2c5c5119f08
---
 modules/seq/base/pymod/export_sequence.cc | 1 +
 modules/seq/base/src/alignment_handle.cc  | 6 ++++++
 modules/seq/base/src/alignment_handle.hh  | 1 +
 3 files changed, 8 insertions(+)

diff --git a/modules/seq/base/pymod/export_sequence.cc b/modules/seq/base/pymod/export_sequence.cc
index fe3502c1b..9b7071c84 100644
--- a/modules/seq/base/pymod/export_sequence.cc
+++ b/modules/seq/base/pymod/export_sequence.cc
@@ -170,6 +170,7 @@ void export_sequence()
     .def("__iter__", iterator<AlignmentHandle>())
     .add_property("sequences", &AlignmentHandle::GetSequences)
     .def("SetSequenceName",  &AlignmentHandle::SetSequenceName)
+    .def("SetSequenceOffset", &AlignmentHandle::SetSequenceOffset)
   ;
   class_<AlignedColumn>("AlignedColumn", no_init)
     .def("GetIndex", &AlignedColumn::GetIndex)
diff --git a/modules/seq/base/src/alignment_handle.cc b/modules/seq/base/src/alignment_handle.cc
index 0c9d312d2..cc0f06788 100644
--- a/modules/seq/base/src/alignment_handle.cc
+++ b/modules/seq/base/src/alignment_handle.cc
@@ -238,4 +238,10 @@ void AlignmentHandle::SetSequenceName(int seq_index, const String& name)
   impl_->GetSequence(seq_index)->SetName(name);
 }
 
+void AlignmentHandle::SetSequenceOffset(int seq_index, int offset)
+{
+  this->CheckValidity();
+  impl_->GetSequence(seq_index)->SetSequenceOffset(offset);
+}
+
 }}
diff --git a/modules/seq/base/src/alignment_handle.hh b/modules/seq/base/src/alignment_handle.hh
index d097d90bd..8523fb1d4 100644
--- a/modules/seq/base/src/alignment_handle.hh
+++ b/modules/seq/base/src/alignment_handle.hh
@@ -108,6 +108,7 @@ public:
   /// \brief set name of sequence
   void SetSequenceName(int seq_index, const String& name);
   
+  void SetSequenceOffset(int seq_index, int offset);
   /// \brief Get list of sequences (read-only)
   ConstSequenceList GetSequences() const;
   
-- 
GitLab