From a474391b27e96224781a9ca34634bdb699809f0c Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Mon, 26 Sep 2016 17:01:13 +0200 Subject: [PATCH] Added nb_elements_per_line property to OBIDMS_column class --- python/obitools3/obidms/_obidms.pxd | 6 +++--- python/obitools3/obidms/_obidms.pyx | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/python/obitools3/obidms/_obidms.pxd b/python/obitools3/obidms/_obidms.pxd index 01dce97..2fe4986 100644 --- a/python/obitools3/obidms/_obidms.pxd +++ b/python/obitools3/obidms/_obidms.pxd @@ -10,14 +10,14 @@ from ._obitaxo cimport OBI_Taxonomy cdef class OBIDMS_column: cdef str column_name - cdef str column_alias # associated property: alias + cdef str column_alias # associated property: alias cdef OBIDMS_column_p* pointer cdef OBIDMS dms cdef OBIView view cdef str data_type cdef str dms_name - cdef index_t nb_elements_per_line - cdef list elements_names # associated property: elements_names + cdef index_t nb_elements_per_line # associated property: nb_elements_per_line + cdef list elements_names # associated property: elements_names cpdef str get_data_type(self) cpdef index_t get_nb_lines_used(self) diff --git a/python/obitools3/obidms/_obidms.pyx b/python/obitools3/obidms/_obidms.pyx index 19fb0af..47ba9c2 100644 --- a/python/obitools3/obidms/_obidms.pyx +++ b/python/obitools3/obidms/_obidms.pyx @@ -165,11 +165,16 @@ cdef class OBIDMS_column : def alias(self, new_alias): self.view.change_column_alias(self.column_alias, new_alias) - # Element names property getter + # elements_names property getter @property def elements_names(self): return self.elements_names + # nb_elements_per_line property getter + @property + def nb_elements_per_line(self): + return self.nb_elements_per_line + @staticmethod cdef object get_subclass_type(OBIDMS_column_p column_p) :