1 /* PSPP - a program for statistical analysis.
2 Copyright (C) 2018 Free Software Foundation, Inc.
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
17 #ifndef OUTPUT_SPV_SELECT_H
18 #define OUTPUT_SPV_SELECT_H 1
20 #include "libpspp/string-set.h"
29 #define SPV_ALL_CLASSES ((1u << SPV_N_CLASSES) - 1)
32 struct spv_command_match *commands;
35 struct string_set subtypes;
37 struct spv_label_match *labels;
46 #define SPV_CRITERIA_INITIALIZER(CRITERIA) \
48 .classes = SPV_ALL_CLASSES, \
49 .subtypes = STRING_SET_INITIALIZER (CRITERIA.subtypes), \
52 struct spv_command_match
58 enum spv_label_match_op
60 SPV_LABEL_MATCH_EQUALS,
61 SPV_LABEL_MATCH_CONTAINS,
62 SPV_LABEL_MATCH_STARTS,
66 struct spv_label_match
68 enum spv_label_match_op op;
72 void spv_select (const struct spv_reader *, const struct spv_criteria *,
73 struct spv_item ***items, size_t *n_items);
75 #endif /* output/spv/spv-select.h */