Minor improvements in _obidms Cython layer
This commit is contained in:
@ -240,14 +240,14 @@ cdef class OBIView :
|
|||||||
|
|
||||||
def __init__(self, OBIDMS dms, str view_name, bint new=False, object view_to_clone=None, list line_selection=None, str comments=""):
|
def __init__(self, OBIDMS dms, str view_name, bint new=False, object view_to_clone=None, list line_selection=None, str comments=""):
|
||||||
|
|
||||||
cdef Obiview_p view = NULL
|
cdef Obiview_p view = NULL
|
||||||
cdef int i
|
cdef int i
|
||||||
cdef list col_list
|
cdef list col_list
|
||||||
cdef str col_name
|
cdef str col_name
|
||||||
cdef OBIDMS_column column
|
cdef OBIDMS_column column
|
||||||
cdef OBIDMS_column_p column_p
|
cdef OBIDMS_column_p column_p
|
||||||
cdef OBIDMS_column_header_p header
|
cdef OBIDMS_column_header_p header
|
||||||
cdef index_t* line_selection_p
|
cdef index_t* line_selection_p
|
||||||
|
|
||||||
self.dms = dms
|
self.dms = dms
|
||||||
|
|
||||||
@ -293,13 +293,8 @@ cdef class OBIView :
|
|||||||
|
|
||||||
|
|
||||||
def __repr__(self) :
|
def __repr__(self) :
|
||||||
|
|
||||||
cdef str s
|
cdef str s
|
||||||
cdef OBIDMS_column column
|
s = str(self.name) + ", " + str(self.comments) + ", " + str(self.pointer.line_count) + " lines\n"
|
||||||
cdef OBIDMS_column_p column_p
|
|
||||||
|
|
||||||
s = self.name
|
|
||||||
s = s + ", " + self.comments + ", " + str(self.pointer.line_count) + " lines\n"
|
|
||||||
for column_name in self.columns :
|
for column_name in self.columns :
|
||||||
s = s + self.columns[column_name].__repr__() + '\n'
|
s = s + self.columns[column_name].__repr__() + '\n'
|
||||||
return s
|
return s
|
||||||
@ -646,14 +641,14 @@ cdef class OBIDMS :
|
|||||||
cpdef dict read_views(self) : # TODO function that prints the dic nicely and function that prints 1 view nicely. Add column type in col ref
|
cpdef dict read_views(self) : # TODO function that prints the dic nicely and function that prints 1 view nicely. Add column type in col ref
|
||||||
|
|
||||||
cdef Obiviews_infos_all_p all_views_p
|
cdef Obiviews_infos_all_p all_views_p
|
||||||
cdef Obiview_infos_p view_p
|
cdef Obiview_infos_p view_p
|
||||||
cdef Column_reference_p column_refs
|
cdef Column_reference_p column_refs
|
||||||
cdef int nb_views
|
cdef int nb_views
|
||||||
cdef int i, j
|
cdef int i, j
|
||||||
cdef str view_name
|
cdef str view_name
|
||||||
cdef str column_name
|
cdef str column_name
|
||||||
cdef dict views
|
cdef dict views
|
||||||
cdef bytes name_b
|
cdef bytes name_b
|
||||||
|
|
||||||
views = {}
|
views = {}
|
||||||
all_views_p = obi_read_view_infos(self.pointer)
|
all_views_p = obi_read_view_infos(self.pointer)
|
||||||
|
Reference in New Issue
Block a user