node_any: add a C api to match strvec attributes
[protos/libecoli.git] / include / ecoli_node_int.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright 2016, Olivier MATZ <zer0@droids-corp.org>
3  */
4
5 #ifndef ECOLI_NODE_INT_
6 #define ECOLI_NODE_INT_
7
8 #include <stdint.h>
9
10 #include <ecoli_node.h>
11
12 /* ec_node("int", ...) can be used too
13  * default is no limit, base 10 */
14
15 struct ec_node *ec_node_int(const char *id, int64_t min,
16                         int64_t max, unsigned int base);
17
18 int ec_node_int_getval(const struct ec_node *node, const char *str,
19                         int64_t *result);
20
21
22
23 struct ec_node *ec_node_uint(const char *id, uint64_t min,
24                         uint64_t max, unsigned int base);
25
26 int ec_node_uint_getval(const struct ec_node *node, const char *str,
27                         uint64_t *result);
28
29
30 #endif