Commit 24b1dab5 by Celine Mercier

Cython: Columns: added a keys() method that returns all element names

parent 7593673f
...@@ -22,6 +22,7 @@ cdef class Column(OBIWrapper) : ...@@ -22,6 +22,7 @@ cdef class Column(OBIWrapper) :
cdef inline OBIDMS_column_p pointer(self) cdef inline OBIDMS_column_p pointer(self)
cdef read_elements_names(self) cdef read_elements_names(self)
cpdef list keys(self)
@staticmethod @staticmethod
cdef type get_column_class(obitype_t obitype, bint multi_elts, bint tuples) cdef type get_column_class(obitype_t obitype, bint multi_elts, bint tuples)
......
...@@ -323,7 +323,10 @@ cdef class Column(OBIWrapper) : ...@@ -323,7 +323,10 @@ cdef class Column(OBIWrapper) :
free(elts_names_b) free(elts_names_b)
return elts_names_list return elts_names_list
cpdef list keys(self):
return self._elements_names
# Column alias property getter and setter # Column alias property getter and setter
@property @property
def name(self): def name(self):
...@@ -340,7 +343,7 @@ cdef class Column(OBIWrapper) : ...@@ -340,7 +343,7 @@ cdef class Column(OBIWrapper) :
@property @property
def elements_names(self): def elements_names(self):
return self._elements_names return self._elements_names
# nb_elements_per_line property getter # nb_elements_per_line property getter
@property @property
def nb_elements_per_line(self): def nb_elements_per_line(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment