EC_NODE_TYPE_REGISTER(3)

NAME
ec_node_type_register - Register a node type.

SYNOPSIS
#include <ecoli/node.h>

int ec_node_type_register(
    struct ec_node_type   *type,      /* The node type to be registered. */
    bool                   override   /* Allow the registration of an existing type. */
);

DESCRIPTION

The name of the type being registered is a unique identifier. However, it is possible to force the registration of a type with an existing name by setting "override" to true. Note that the initial type is not removed from the list, instead the new one is added before in the list.

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

0 on success, negative value 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_from_type(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_set_config(3), ec_node_iter_get_node(3), ec_node_get_child(3)

COPYRIGHT

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