INGOR
Loading...
Searching...
No Matches
Filter.h
1/*
2 filter/Filter.{h,c} : Filter programs
3 Copyright (C) 2018, Yoshinori Tamada <tamada A T ytlab.jp>
4 All rights reserved.
5
6 This is a part of INGOR.
7
8 Redistribution and use in source and binary forms, with or without
9 modification, are permitted provided that the following conditions
10 are met:
11
12 * Redistributions of source code must retain the above copyright
13 notice, this list of conditions and the following disclaimer.
14
15 * Redistributions in binary form must reproduce the above copyright
16 notice, this list of conditions and the following disclaimer in
17 the documentation and/or other materials provided with the
18 distribution.
19
20 * Neither the name of Kyoto University nor the names of its
21 contributors may be used to endorse or promote products derived
22 from this software without specific prior written permission.
23
24 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
27 FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
28 COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
29 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
30 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
34 ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 POSSIBILITY OF SUCH DAMAGE.
36*/
37#ifndef __FILTER_H
38#define __FILTER_H
39
40#ifndef DOXY
41
42#include <stdio.h>
43#include "net/ytNetwork.h"
44#include "util/ytKeyValues.h"
45#include "util/ytParseArgs.h"
46
47typedef struct {
48 char * name;
49 char * alias;
50 char * explain;
51 ytNetwork * (*filter)(ytNetwork *, ytKeyValues *);
52 void (* help)(FILE *);
53} Filter;
54
55typedef struct {
56 ytStrArray * filters;
57 ytArray * args;
58} FilterArgs;
59
60FilterArgs * FilterArgs_new();
61void Filter_add(ytParseArgs * parser, FilterArgs * args);
62ytNetwork * Filter_perform(const char * name, ytKeyValues * args, ytNetwork * network);
63void Filter_help(char * arg);
64ytParseArgs * Filter_genParseArgs();
65
66#endif /* DOXY */
67
68#endif /* __FILTER_H */
Expandable array.
key-value pairs.
Network abstraction.
Structure for parsing command line arguments.
Expandable array.