EC_NODE_FROM_TYPE(3)

NAME
ec_node_from_type - Create a new node when the type is known.

SYNOPSIS
#include <ecoli/node.h>

struct ec_node * ec_node_from_type(
    const struct ec_node_type   *type,  /* The type of the node to create. */
    const char                  *id     /* The node identifier. */
);

DESCRIPTION

This function is typically called from the node constructor.

STRUCTURES
A structure describing a grammar node type.

It is usually defined as a static const structure in the code defining a new grammar node type. Examples can be found in ecoli_node_<type>.c files.

struct ec_node_type {

};

RETURN VALUE

The new node on success, or NULL on error.

SEE ALSO

ec_node_check_type(3), ec_node_iter(3), ec_node_attrs(3), ec_node_find(3), ec_node_type_name(3), ec_node_free(3), ec_node_id(3), ec_node_type_dump(3), ec_node_get_config(3), ec_node_schema_dump(3), ec_node_priv(3), ec_node_type_lookup(3), ec_node_clone(3), ec_node_dump(3), ec_node_desc(3), ec_node_iter_free(3), ec_node_iter_get_parent(3), ec_node_type(3), ec_node_iter_next(3), ec_node_type_schema(3), ec_node(3), ec_node_get_children_count(3), ec_node_get_type_name(3), ec_node_type_register(3), ec_node_set_config(3), ec_node_iter_get_node(3), ec_node_get_child(3)

COPYRIGHT

Copyright (C) 2010-2026 Olivier Matz, Robin Jarry.