Smrender
 All Data Structures Files Functions Variables Macros
smcore.h
Go to the documentation of this file.
1 /* Copyright 2011-2015 Bernhard R. Fischer, 2048R/5C5FFD47 <bf@abenteuerland.at>
2  *
3  * This file is part of smrender.
4  *
5  * Smrender 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 of the License.
8  *
9  * Smrender 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.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with smrender. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
25 #ifndef SMCORE_H
26 #define SMCORE_H
27 
28 // return values of apply_rule()
29 #define ERULE_OUTOFBBOX 1
30 #define ERULE_WAYOPEN 2
31 #define ERULE_WAYCLOSED 3
32 #define ERULE_NOMATCH 4
33 #define ERULE_INVISIBLE 5
34 
35 #define RULES_TAG "smrender:rules"
36 
37 typedef int (*tree_func_t)(osm_obj_t*, void*);
38 
39 // indexes to object tree
40 enum {IDX_NODE, IDX_WAY, IDX_REL};
41 
42 /* smcore.c */
43 int traverse(const bx_node_t*, int, int, tree_func_t, void*);
44 int execute_rules(bx_node_t *, int );
45 int rev_index_way_nodes(osm_way_t *, bx_node_t **);
46 int rev_index_rel_nodes(osm_rel_t *, bx_node_t **);
47 int get_rev_index(osm_obj_t**, const osm_obj_t*);
48 
49 /* smthread.c */
50 void sm_wait_threads(void);
51 int traverse_queue(const bx_node_t *, int , tree_func_t , void *);
52 int sm_is_threaded(const smrule_t *);
53 
54 #endif
55 
Definition: osm_inplace.h:48
Definition: bxtree.h:28
int get_rev_index(osm_obj_t **, const osm_obj_t *)
Definition: smcore.c:536
int traverse(const bx_node_t *, int, int, tree_func_t, void *)
Definition: smcore.c:458
Definition: osm_inplace.h:79
Definition: osm_inplace.h:65