X-Git-Url: http://git.droids-corp.org/?p=protos%2Flibecoli.git;a=blobdiff_plain;f=include%2Fecoli_node.h;fp=include%2Fecoli_node.h;h=38e25e42dd0d55a815936e17c9c89509e1008562;hp=894e64f8fbe146cf64ae9d8142b0f7110e99f47d;hb=376f5016e3979247bf0db515e47df49ba1eb82ac;hpb=249ab86786242560a3da422eb59b96479d47859a diff --git a/include/ecoli_node.h b/include/ecoli_node.h index 894e64f..38e25e4 100644 --- a/include/ecoli_node.h +++ b/include/ecoli_node.h @@ -158,20 +158,6 @@ enum ec_node_free_state { EC_NODE_FREE_STATE_FREEING, }; -struct ec_node { - const struct ec_node_type *type; - struct ec_config *config; /**< Generic configuration. */ - char *id; - char *desc; - struct ec_dict *attrs; - unsigned int refcnt; - struct { - enum ec_node_free_state state; /**< State of loop detection */ - unsigned int refcnt; /**< Number of reachable references - * starting from node beeing freed */ - } free; /**< Freeing state: used for loop detection */ -}; - /* create a new node when the type is known, typically called from the node * code */ struct ec_node *ec_node_from_type(const struct ec_node_type *type, const char *id); @@ -209,6 +195,18 @@ struct ec_node *ec_node_find(struct ec_node *node, const char *id); int ec_node_check_type(const struct ec_node *node, const struct ec_node_type *type); +const char *ec_node_get_type_name(const struct ec_node *node); + +/** + * Get the pointer to the node private area. + * + * @param node + * The grammar node. + * @return + * The pointer to the node private area. + */ +void *ec_node_priv(const struct ec_node *node); + #endif /** @} */