Debian Codegraph @

stat/Table_def.h

raw
1 /* Table_def.h
2 *
3 * Copyright (C) 2002-2007,2011,2012,2014-2019,2022,2023 Paul Boersma
4 *
5 * This code is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or (at
8 * your option) any later version.
9 *
10 * This code is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this work. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19
20 #define ooSTRUCT TableCell
21 oo_DEFINE_STRUCT (TableCell)
22
23 oo_STRING (string)
24
25 #if oo_DECLARING || oo_COPYING
26 oo_DOUBLE (number)
27 #endif
28
29 oo_END_STRUCT (TableCell)
30 #undef ooSTRUCT
31
32
33 #define ooSTRUCT TableRow
34 oo_DEFINE_CLASS (TableRow, Daata)
35
36 oo_INTEGER (numberOfColumns)
37 oo_STRUCTVEC (TableCell, cells, numberOfColumns)
38
39 #if oo_DECLARING || oo_COPYING
40 oo_INTEGER (sortingIndex)
41 #endif
42
43 oo_END_CLASS (TableRow)
44 #undef ooSTRUCT
45
46
47 #define ooSTRUCT TableColumnHeader
48 oo_DEFINE_STRUCT (TableColumnHeader)
49
50 oo_STRING (label)
51
52 #if oo_DECLARING || oo_COPYING
53 oo_INT16 (numericized)
54 #endif
55
56 oo_END_STRUCT (TableColumnHeader)
57 #undef ooSTRUCT
58
59
60 #define ooSTRUCT Table
61 oo_DEFINE_CLASS (Table, Daata)
62
63 oo_INTEGER (numberOfColumns)
64 oo_STRUCTVEC (TableColumnHeader, columnHeaders, numberOfColumns)
65 oo_COLLECTION_OF (OrderedOf, rows, TableRow, 0)
66
67 #if oo_DECLARING
68 void v1_info ()
69 override;
70 bool v_hasGetNrow () const
71 override { return true; }
72 double v_getNrow () const
73 override { return rows.size; }
74 bool v_hasGetNcol () const
75 override { return true; }
76 double v_getNcol () const
77 override { return numberOfColumns; }
78 bool v_hasGetColStr () const
79 override { return true; }
80 conststring32 v_getColStr (integer columnNumber) const
81 override;
82 bool v_hasGetMatrix () const
83 override { return true; }
84 double v_getMatrix (integer rowNumber, integer columnNumber) const
85 override;
86 bool v_hasGetMatrixStr () const
87 override { return true; }
88 conststring32 v_getMatrixStr (integer rowNumber, integer columnNumber) const
89 override;
90 bool v_hasGetColIndex () const
91 override { return true; }
92 double v_getColIndex (conststring32 columnLabel) const
93 override;
94 #endif
95
96 oo_END_CLASS (Table)
97 #undef ooSTRUCT
98
99
100 /* End of file Table_def.h */