2
* Picviz - Parallel coordinates ploter
3
* Copyright (C) 2008 Sebastien Tricaud <toady@gscore.org>
5
* This program 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 version 3.
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
* $Id: filter.h 318 2008-11-12 19:30:30Z toady $
27
#include "linuxlist.h"
31
typedef enum picviz_filter_options_t {
33
PF_OPTIONS_PLOTPERCENT /* We have plot > 90% */
34
} picviz_filter_options_t;
35
typedef enum picviz_filter_options_t PicvizFilterOptions;
37
typedef enum picviz_filter_display_t {
41
} picviz_filter_display_t;
42
typedef enum picviz_filter_display_t PicvizFilterDisplay;
44
typedef enum picviz_filter_type_t {
46
/* filter data as they are */
48
/* rendering engine filter */
52
/* what we can filter when there is no relation
53
* among axes and should not wait for other lines
54
* to be applied first */
55
PF_PRE_LINE_FILTER = 8,
56
/* most cpu consuming filter, we first add lines
57
* to then remove them */
58
PF_POST_LINE_FILTER = 16,
59
/* Filter a line frequency */
61
} picviz_filter_type_t;
62
typedef enum picviz_filter_type_t PicvizFilterType;
64
typedef enum picviz_filter_relation_t {
70
PF_RELATION_LESS_OR_EQUAL,
71
PF_RELATION_GREATER_OR_EQUAL
72
} picviz_filter_relation_t;
73
typedef enum picviz_filter_relation_t PicvizFilterRelation;
75
struct picviz_filter_plot_t {
76
unsigned char active; /* Set to one if the axis is concerned by the filter (-1 on unsigned long long does not work ;))*/
79
} picviz_filter_plot_t;
82
typedef struct picviz_filter {
83
PicvizFilterDisplay display;
85
PicvizFilterType type;
86
struct picviz_filter_plot_t plot[PICVIZ_MAX_AXES];
87
PicvizFilterRelation relation;
88
PicvizFilterOptions options;
90
struct picviz_filter *and;
94
typedef struct picviz_filter_criterion {
95
PicvizFilterType type;
96
PicvizFilterRelation relation;
97
PicvizFilterOptions options;
105
struct picviz_filter_criterion *and, *or;
106
} picviz_filter_criterion_t;
109
typedef struct picviz_filter {
110
PicvizFilterDisplay display;
111
picviz_filter_criterion_t *criterion;
114
typedef struct picviz_filter PicvizFilter;
116
PicvizFilter *picviz_filter_new(void);
117
picviz_filter_criterion_t *picviz_filter_criterion_new(void);
118
PicvizFilterType picviz_filter_validate(PcvString string);
120
picviz_filter_criterion_t *picviz_filter_and_criterion(picviz_filter_criterion_t *c1, picviz_filter_criterion_t *c2);
121
picviz_filter_criterion_t *picviz_filter_or_criterion(picviz_filter_criterion_t *c1, picviz_filter_criterion_t *c2);
124
void picviz_filter_set_string(PicvizFilter *filter, char *string);
126
/* defined in filter/filter.yac.y */
127
PicvizFilter *picviz_filter_build(char *filter);
129
int picviz_filter_display(picviz_filter_t *filter, pcimage_t *image, struct axisplot_t **axisplot, int axis_max);
135
#endif /* _FILTER_H_ */