Added some view class methods

This commit is contained in:
Celine Mercier
2016-09-05 12:20:00 +02:00
parent f46ea0b988
commit eb82d088cb
2 changed files with 17 additions and 2 deletions

View File

@ -67,6 +67,9 @@ cdef class OBIView:
cpdef select_line(self, index_t line_nb)
cpdef select_lines(self, list line_selection)
cpdef save_and_close(self)
cpdef str get_name(self)
cpdef dict get_columns(self)
cpdef int get_line_count(self)
cdef class OBIView_NUC_SEQS(OBIView):

View File

@ -292,7 +292,7 @@ cdef class OBIView :
self.pointer = view
self.name = bytes2str(view.infos.name)
# Go through columns to build list of corresponding python instances
# Go through columns to build dictionaries of corresponding python instances
self.columns = {}
for i in range(view.infos.column_count) :
column_p = <OBIDMS_column_p> (view.columns)[i]
@ -463,6 +463,18 @@ cdef class OBIView :
return to_print
cpdef str get_name(self):
return self.name
cpdef dict get_columns(self):
return self.columns
cpdef int get_line_count(self) :
return self.pointer.infos.line_count
#############################################
cdef class OBIView_NUC_SEQS(OBIView):