diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-05-13 15:34:25 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-09-29 16:13:03 -0700 |
commit | 634152ae43f37a62a67de5a5d5fc4e6b02829ce0 (patch) | |
tree | 2fa04e8a9a00196bb2a1bbfff47c08330e28963c /core/file.h | |
parent | 0b7ba197751ea6ba57db1f9ec116dd791c3b53b7 (diff) | |
download | subsurface-634152ae43f37a62a67de5a5d5fc4e6b02829ce0.tar.gz |
filter: add filter constraint object to the core
Adds a filter constraint object to the core, which represents one
constraint the user can filter dives with. The plan is to write these
constraints to the XML and git logs. Therefore, this code is written
in C-style except when it comes to handling strings and dates, which
is just too painful in plain C.
There is one pointer to QStringList in the class, though when compiled
with C, this is simply transformed into a pointer to void. Granted,
that smells of an ugly hack. However it's more pragmatic than
self-flaggelation with C string and list handling.
A filter constraint is supposed to be a very general thing, which can
filter for strings, multiple-choice lists, numerical ranges and date
ranges.
Range constraints have a range mode: less-or-equal, greater-or-equal
or in-range. Text constraints have a string mode: startswith, substring
or exact.
All the data are accessed via setter and getter functions for
at least basic levels of isolation, despite being written with
a C-interface in mind.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/file.h')
0 files changed, 0 insertions, 0 deletions