Libecoli 0.11.1
Extensible COmmand LIne library
Loading...
Searching...
No Matches
node_subset.h
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright 2016, Olivier MATZ <zer0@droids-corp.org>
3 */
4
12
13#pragma once
14
15#include <ecoli/node.h>
16
30#define EC_NODE_SUBSET(args...) __ec_node_subset(args, EC_VA_END)
31
32/* list must be terminated with EC_VA_END */
33/* all nodes given in the list will be freed when freeing this one */
34/* avoid using this function directly, prefer the macro EC_NODE_SUBSET() or
35 * ec_node_subset() + ec_node_subset_add() */
36struct ec_node *__ec_node_subset(const char *id, ...);
37
48struct ec_node *ec_node_subset(const char *id);
49
62struct ec_node *ec_node_subset_min(const char *id, unsigned int min);
63
75int ec_node_subset_add(struct ec_node *node, struct ec_node *child);
76
91int ec_node_subset_set_min(struct ec_node *node, unsigned int min);
92
101unsigned int ec_node_subset_get_min(const struct ec_node *node);
102
int ec_node_subset_add(struct ec_node *node, struct ec_node *child)
unsigned int ec_node_subset_get_min(const struct ec_node *node)
int ec_node_subset_set_min(struct ec_node *node, unsigned int min)
struct ec_node * ec_node_subset_min(const char *id, unsigned int min)
struct ec_node * ec_node_subset(const char *id)
struct ec_node * ec_node(const char *typename, const char *id)