File: column.pxd

package info (click to toggle)
obitools 3.0.1~b26%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 26,788 kB
  • sloc: ansic: 24,299; python: 657; sh: 27; makefile: 20
file content (62 lines) | stat: -rwxr-xr-x 1,593 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#cython: language_level=3


from ..capi.obitypes     cimport index_t, \
                                 obitype_t
                                 
from ..capi.obidmscolumn cimport OBIDMS_column_p
                                                                 
from ..view.view cimport View
 
from ..object cimport OBIWrapper                          

 
cdef dict __OBIDMS_COLUMN_CLASS__


cdef class Column(OBIWrapper) :
 
    cdef View  _view
    cdef bytes _alias
    cdef list  _elements_names
    
    cdef inline OBIDMS_column_p pointer(self)
    cdef read_elements_names(self)
    cpdef list keys(self)
    
    @staticmethod
    cdef type get_column_class(obitype_t obitype, bint multi_elts, bint tuples)

    @staticmethod
    cdef type get_python_type(obitype_t obitype, bint multi_elts)

cdef class Column_comments(dict):
    cdef Column  _column


cdef class Column_multi_elts(Column) :

    # The type of [values] can be dict, Column_line, or any other class with values referenced by keys with an iterator [for key in values]
    cpdef set_line(self, index_t line_nb, object values)


cdef class Column_line:
 
    cdef Column    _column
    cdef index_t   _index
    
    cpdef list keys(self)
    cpdef list items(self)
    cpdef dict dict(self)
    cpdef bytes bytes(self)  
    cpdef update(self, object data)
     
    
cdef register_column_class(obitype_t obitype,
                           bint multi_elts,
                           bint tuples,
                           type obiclass, 
                           type python)

cdef register_all_column_classes()