#include <inttypes.h>
#include <signal.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include "smrender.h"
#include "smcore.h"
#include "smaction.h"
#include "rdata.h"
#include "lists.h"
Functions | |
int | apply_rule (osm_obj_t *o, smrule_t *r, int *ret) |
int | apply_smrules0 (osm_obj_t *o, smrule_t *r) |
int | call_fini (smrule_t *r) |
int | apply_smrules (smrule_t *r, long ver) |
int | execute_rules (bx_node_t *rules, int version) |
int | traverse (const bx_node_t *nt, int d, int idx, tree_func_t dhandler, void *p) |
int | get_rev_index (osm_obj_t **optr, const osm_obj_t *o) |
int | add_rev_ptr (bx_node_t **idx_root, int64_t id, int idx, osm_obj_t *o) |
int | rev_index_way_nodes (osm_way_t *w, bx_node_t **idx_root) |
int | rev_index_rel_nodes (osm_rel_t *r, bx_node_t **idx_root) |
Variables | |
volatile sig_atomic_t | int_ |
int | render_all_nodes_ |
This file contains the code of the main execution process.
int apply_rule | ( | osm_obj_t * | o, |
smrule_t * | r, | ||
int * | ret | ||
) |
Match and apply ruleset to object if it is visible.
o | Object which should be rendered (to which to action is applied). |
r | Rule. |
ret | This variable receives the return value of the rule's act_XXX_main() function. It may be set to NULL. |
Find OSM object in object list and return index.
optr | Pointer to NULL-terminated object list. |
o | Pointer to object. |
int traverse | ( | const bx_node_t * | nt, |
int | d, | ||
int | idx, | ||
tree_func_t | dhandler, | ||
void * | p | ||
) |
Recursively traverse tree and call function dhandler for all leaf nodes which are not NULL.
nt | Pointer to tree root. |
d | Depth of traversal. This should be 0 if called at the root of the tree. |
idx | The tree actually allows to be an overlapped tree of several trees. idx is the index of the tree which should be traversed. |
dhandler | This is the function called at the leaf node. |
p | This is a generic argument which is passed to dhandler upon call. |