Added data_type property to OBIDMS_column class
This commit is contained in:
@ -94,7 +94,7 @@ def test_set_and_get(config, infos):
|
|||||||
col_name = random_column(infos)
|
col_name = random_column(infos)
|
||||||
col = infos['view'][col_name]
|
col = infos['view'][col_name]
|
||||||
element_names = col.elements_names
|
element_names = col.elements_names
|
||||||
data_type = col.get_data_type()
|
data_type = col.data_type
|
||||||
if data_type == "OBI_QUAL" :
|
if data_type == "OBI_QUAL" :
|
||||||
print_test(config, "-")
|
print_test(config, "-")
|
||||||
return
|
return
|
||||||
@ -172,7 +172,7 @@ def random_col_type():
|
|||||||
|
|
||||||
|
|
||||||
def fill_column(config, infos, col) :
|
def fill_column(config, infos, col) :
|
||||||
data_type = col.get_data_type()
|
data_type = col.data_type
|
||||||
element_names = col.elements_names
|
element_names = col.elements_names
|
||||||
|
|
||||||
if len(element_names) > 1 :
|
if len(element_names) > 1 :
|
||||||
|
@ -14,12 +14,11 @@ cdef class OBIDMS_column:
|
|||||||
cdef OBIDMS_column_p* pointer
|
cdef OBIDMS_column_p* pointer
|
||||||
cdef OBIDMS dms
|
cdef OBIDMS dms
|
||||||
cdef OBIView view
|
cdef OBIView view
|
||||||
cdef str data_type
|
cdef str data_type # associated property: data_type
|
||||||
cdef str dms_name
|
cdef str dms_name
|
||||||
cdef index_t nb_elements_per_line # associated property: nb_elements_per_line
|
cdef index_t nb_elements_per_line # associated property: nb_elements_per_line
|
||||||
cdef list elements_names # associated property: elements_names
|
cdef list elements_names # associated property: elements_names
|
||||||
|
|
||||||
cpdef str get_data_type(self)
|
|
||||||
cpdef index_t get_nb_lines_used(self)
|
cpdef index_t get_nb_lines_used(self)
|
||||||
cpdef str get_creation_date(self)
|
cpdef str get_creation_date(self)
|
||||||
cpdef str get_comments(self)
|
cpdef str get_comments(self)
|
||||||
|
@ -124,9 +124,6 @@ cdef class OBIDMS_column :
|
|||||||
lines_used = (self.pointer)[0].header.lines_used
|
lines_used = (self.pointer)[0].header.lines_used
|
||||||
for line_nb in range(lines_used):
|
for line_nb in range(lines_used):
|
||||||
yield self.get_line(line_nb)
|
yield self.get_line(line_nb)
|
||||||
|
|
||||||
cpdef str get_data_type(self):
|
|
||||||
return self.data_type
|
|
||||||
|
|
||||||
cpdef index_t get_nb_lines_used(self):
|
cpdef index_t get_nb_lines_used(self):
|
||||||
return (self.pointer)[0].header.lines_used
|
return (self.pointer)[0].header.lines_used
|
||||||
@ -175,6 +172,11 @@ cdef class OBIDMS_column :
|
|||||||
def nb_elements_per_line(self):
|
def nb_elements_per_line(self):
|
||||||
return self.nb_elements_per_line
|
return self.nb_elements_per_line
|
||||||
|
|
||||||
|
# data_type property getter
|
||||||
|
@property
|
||||||
|
def data_type(self):
|
||||||
|
return self.data_type
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
cdef object get_subclass_type(OBIDMS_column_p column_p) :
|
cdef object get_subclass_type(OBIDMS_column_p column_p) :
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user