Skip to content
Snippets Groups Projects
Commit 61c1f3ff authored by marco's avatar marco
Browse files

export __str__ for SecStructure

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2135 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent 4799c403
No related branches found
No related tags found
No related merge requests found
......@@ -29,6 +29,13 @@ using namespace ost::mol;
#include <ost/export_helper/generic_property_def.hh>
namespace {
String sec_structure_as_string(SecStructure& s)
{
return String(1, char(s));
}
typedef EntityView (ResidueHandle::*QueryMethod)(const Query&, uint) const;
typedef EntityView (ResidueHandle::*StringMethod)(const String&, uint) const;
QueryMethod select_query=&ResidueHandle::Select;
......@@ -70,7 +77,8 @@ void export_Residue()
.def(init<SecStructure::Type>())
.def("IsHelical", &SecStructure::IsHelical)
.def("IsExtended", &SecStructure::IsExtended)
.def("IsCoil", &SecStructure::IsCoil)
.def("IsCoil", &SecStructure::IsCoil)
.def("__str__", &sec_structure_as_string)
;
enum_<SecStructure::Type>("Type")
.value("EXTENDED", SecStructure::EXTENDED)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment