#include <stdarg.h>
#include <gr/types.h>
#include <gr/set.h>
#include <gr/error.h>
#include <gr/dump.h>
Go to the source code of this file.
Definition in file graph.h.
|
|
A macro to elegantly obtain the private data pointer from a graph.
|
|
|
Get the backend of a graph.
|
|
|
Get the model of a graph.
|
|
|
|
|
|
The available attribute type kinds. |
|
|
Generic Graph listener for changed ID's |
|
|
The generic listener struct. |
|
|
The Graph model, which different grgen backends must implement. |
|
|
The graph instance. |
|
|
Additional flags for model::init. |
|
|
Possible listener events for generic listener |
|
|
The Validate Statements |
|
|
The available attribute type kinds. |
|
|
Additional flags for model::init. |
|
|
|
|
|
||||||||||||||||||||
|
Add an edge to the graph.
Definition at line 216 of file graph.c. References ASSERT_FKT, ASSERT_GR, ASSERT_MODEL, GR_LISTENER_ADD_EDGE, and run_graph_listener(). Referenced by cm_add_edge(), and gr_copy_edges(). |
|
||||||||||||
|
Add a node to the graph.
Definition at line 201 of file graph.c. References ASSERT_FKT, ASSERT_GR, ASSERT_MODEL, GR_LISTENER_ADD_NODE, and run_graph_listener(). Referenced by add_nodes(), cm_add_node(), and gr_copy_nodes(). |
|
||||||||||||||||
|
Allocate temporary ID's. These ID's are only valid until the next operation that may change the graph. This function should only be used by dumpers that need to insert virtual nodes.
Definition at line 561 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_alloc_temp_ids(), and gr_dump_match(). |
|
||||||||||||
|
Duplicates a graph. The new graph will use the same model and backend as the other.
Definition at line 1460 of file graph.c. References ASSERT_FKT, ASSERT_GR, ASSERT_MODEL, _gr_graph_model_t::clone, and _gr_graph_t::model. |
|
||||||||||||
|
Dump the graph with a graph dumper.
Definition at line 1365 of file graph.c. References gr_dump_match(). Referenced by vcg_dump(). |
|
||||||||||||||||
|
Check, if an edge is an instance of a given edge type.
Definition at line 131 of file graph.c. References gr_edge_type_is_a(), and gr_get_type_of_edge(). |
|
||||||||||||||||
|
Check, if an edge type is compatible to another node type.
Definition at line 119 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_edge_type_is_a(), edge_attrs_conf_factory(), gr_dump_edge_attr(), and gr_edge_instanceof(). |
|
||||||||||||||||
|
Get all nodes in the graph, that are instance of a certain node type.
Definition at line 174 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by check_incoming(), check_outgoing(), cm_get_all_nodes_instance_of(), dump_groups(), get_all_edges(), gr_dump_match(), and gr_get_all_nodes(). |
|
|
Get the error reporting domain from a graph.
Definition at line 94 of file graph.c. References ASSERT_GR. |
|
||||||||||||||||||||
|
Get an attribute's value of an edge.
Definition at line 306 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_edge_attr(), edge_attrs_conf_factory(), and gr_dump_edge_attr(). |
|
||||||||||||||||
|
Get the ID of an edge type attribute type with a given attribute name.
Definition at line 437 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_edge_attr_id(). |
|
||||||||||||
|
Get the set of valid edge attribute ids.
Definition at line 165 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_edge_attr_ids(), edge_attrs_conf_factory(), and gr_dump_edge_attr(). |
|
||||||||||||
|
Get the name of an edge attribute.
Definition at line 418 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_edge_attr_name(), edge_attrs_conf_factory(), and gr_dump_edge_attr(). |
|
||||||||||||||||
|
Get the type kind of an edge attribute.
Definition at line 474 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_edge_attr_type_kind(), and gr_dump_edge_attr(). |
|
|
Get the edge root type (called Edge).
Definition at line 192 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_edge_root_type(), get_all_edges(), gr_dump_match(), and gr_get_outgoing_edges(). |
|
||||||||||||
|
Get the ID of a edge type with a given type name.
Definition at line 400 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_edge_type_id(). |
|
||||||||||||
|
Get the set of valid edge type ids.
Definition at line 147 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_edge_type_ids(). |
|
||||||||||||
|
Get the name of an edge type.
Definition at line 382 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_edge_type_name(), gr_dump_edge_attr(), gr_edge_label(), print_edges_error(), and validate(). |
|
||||||||||||||||
|
Get the type id of the direct super type of a edge type.
Definition at line 545 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_edge_type_super_type(). |
|
||||||||||||
|
Definition at line 554 of file graph.c. References gr_id_invalid. |
|
||||||||||||||||
|
Get the name of an enum member.
Definition at line 511 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_enum_member_name(). |
|
||||||||||||||||
|
Get the value of an enum member.
Definition at line 501 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_enum_member_value(). |
|
||||||||||||||||
|
Get all valid member ids for an enum type.
Definition at line 492 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_enum_members(). |
|
||||||||||||
|
Get the name of a enum type.
Definition at line 483 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_enum_type_name(), gr_dump_edge_attr(), and gr_dump_node_attr(). |
|
||||||||||||||||||||
|
Get the incoming edges of a node.
Definition at line 345 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by check_incoming(), cm_get_incoming(), and dump_get_leaf_nodes(). |
|
||||||||||||||||||||
|
Get an attribute's value of a node.
Definition at line 297 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_node_attr(), gr_dump_node_attr(), gr_get_node_infotag(), and node_attrs_conf_factory(). |
|
||||||||||||||||
|
Get the ID of a node type attribute type with a given attribute name.
Definition at line 427 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_node_attr_id(), and vcg_dump(). |
|
||||||||||||
|
Get the set of valid node attribute ids.
Definition at line 156 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_node_attr_ids(), gr_dump_node_attr(), and node_attrs_conf_factory(). |
|
||||||||||||
|
Get the name of a node attribute.
Definition at line 409 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_node_attr_name(), gr_dump_node_attr(), and node_attrs_conf_factory(). |
|
||||||||||||||||
|
Get the type kind of a node attribute.
Definition at line 465 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_node_attr_type_kind(), and gr_dump_node_attr(). |
|
|
Get the node root type (called Node).
Definition at line 183 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_node_root_type(), get_all_edges(), gr_dump_match(), and gr_get_all_nodes(). |
|
||||||||||||
|
Get the ID of a node type with a given type name.
Definition at line 391 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by add_nodes(), and cm_get_node_type_id(). |
|
||||||||||||
|
Get the set of valid node type ids.
Definition at line 138 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_node_type_ids(). |
|
||||||||||||
|
Get the name of a node type.
Definition at line 373 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_node_type_name(), gr_dump_node_attr(), gr_node_label(), print_edges_error(), and validate(). |
|
||||||||||||||||
|
Get the type id of the direct super type(s) of a node type.
Definition at line 521 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_node_type_super_type(). |
|
||||||||||||
|
Definition at line 540 of file graph.c. References gr_id_invalid. |
|
||||||||||||||||||||
|
Get the outgoing edges of a node.
Definition at line 335 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by check_outgoing(), cm_get_outgoing(), dump_edges_from_node(), get_all_edges(), and gr_get_outgoing_edges(). |
|
||||||||||||
|
Get the owner type of a edge attribute.
Definition at line 456 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_owner_type_of_edge_attr(), edge_attrs_conf_factory(), and gr_dump_edge_attr(). |
|
||||||||||||
|
Get the owner type of a node attribute.
Definition at line 447 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_owner_type_of_node_attr(), gr_dump_node_attr(), and node_attrs_conf_factory(). |
|
||||||||||||
|
Get the source node of an edge.
Definition at line 355 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_source(), dump_get_leaf_nodes(), gr_copy_edges(), gr_dump_match(), and print_edges_error(). |
|
||||||||||||||||
|
Get a string describing some status information about the graph.
Definition at line 85 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_stat(). |
|
||||||||||||
|
Get the target node of an edge.
Definition at line 364 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_target(), dump_edges_from_node(), gr_copy_edges(), gr_dump_match(), and print_edges_error(). |
|
||||||||||||
|
Get the type of a edge.
Definition at line 288 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by edge_attrs_conf_factory(), gr_copy_edges(), gr_dump_edge_attr(), gr_edge_instanceof(), gr_edge_label(), gr_get_def_edge_color(), and print_edges_error(). |
|
||||||||||||
|
Get the type of a node.
Definition at line 279 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_get_type_of_edge(), cm_get_type_of_node(), gr_copy_nodes(), gr_dump_node_attr(), gr_get_def_node_color(), gr_get_node_infotag(), gr_node_instanceof(), gr_node_label(), node_attrs_conf_factory(), and print_edges_error(). |
|
||||||||||||||||||||
|
Add a new listener function.
Definition at line 1397 of file graph.c. References ASSERT_GR, _gr_generic_listener_t::context, GR_LISTENER_MAX, GR_RANGE_CHECK, _gr_generic_listener_t::listener_func, _gr_generic_listener_t::next, and _gr_generic_listener_t::prev. Referenced by gr_install_generations(). |
|
||||||||||||||||
|
Do a graph-backend dependent thing.
Definition at line 1449 of file graph.c. References ASSERT_GR, and ASSERT_MODEL. Referenced by cm_custom(). |
|
|
Delete a graph. This frees all memory used by the graph.
Definition at line 76 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_del(). |
|
|
Get the name of the graph.
|
|
||||||||||||
|
Load an actions model from a file.
Definition at line 47 of file graph_ld_unx.c. References ASSERT_GR, and gr_error(). |
|
|
Mature a graph. This method should be invoked after adding all nodes and edges to the graph. The backend may implement analyses on the graph to speed up matching and so on. The backend may also do nothing upon invoking this function. further on, the graph may not be modifyied by this functions.
Definition at line 530 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_mature(). |
|
||||||||||||
|
Deletes a listener function.
Definition at line 1428 of file graph.c. References ASSERT_GR, _gr_generic_listener_t::next, and _gr_generic_listener_t::prev. |
|
||||||||||||
|
Checks whether a graph meets the connection assertions of not. In strict mode all occouring connections must be specified by a connection assertion.
Definition at line 1674 of file graph.c. References ASSERT_GR, ASSERT_MODEL, and validate(). |
|
||||||||||||
|
Instantiate an action model from a graph.
|
|
||||||||||||||||
|
Check, if a node is an instance of a given node type.
Definition at line 112 of file graph.c. References gr_get_type_of_node(), and gr_node_type_is_a(). |
|
||||||||||||||||
|
Check, if a node type is compatible to another node type.
Definition at line 100 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_node_type_is_a(), gr_dump_node_attr(), gr_node_instanceof(), and node_attrs_conf_factory(). |
|
||||||||||||
|
Remove an edge.
Definition at line 242 of file graph.c. References ASSERT_FKT, ASSERT_GR, ASSERT_MODEL, GR_LISTENER_DEL_EDGE, and run_graph_listener(). Referenced by cm_remove_edge(). |
|
||||||||||||
|
Remove all edges, that end in or leave a node.
Definition at line 253 of file graph.c. References ASSERT_FKT, ASSERT_GR, ASSERT_MODEL, GR_LISTENER_DEL_EDGES, and run_graph_listener(). Referenced by cm_remove_edges_of_node(). |
|
||||||||||||
|
Remove a node from the graph.
Definition at line 231 of file graph.c. References ASSERT_FKT, ASSERT_GR, ASSERT_MODEL, GR_LISTENER_DEL_NODE, and run_graph_listener(). Referenced by cm_remove_node(). |
|
||||||||||||||||||||
|
Set an attribute's value of a edge.
Definition at line 325 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_set_edge_attr(), edge_attrs_conf_factory(), gr_act_match(), and gr_graph_add_edge(). |
|
||||||||||||||||||||
|
Set an attribute's value of a node.
Definition at line 315 of file graph.c. References ASSERT_FKT, ASSERT_GR, and ASSERT_MODEL. Referenced by cm_set_node_attr(), gr_act_match(), gr_graph_add_node(), gr_graph_set_node_type(), and node_attrs_conf_factory(). |
|
||||||||||||||||
|
Set the type of a node.
Definition at line 264 of file graph.c. References ASSERT_FKT, ASSERT_GR, ASSERT_MODEL, GR_LISTENER_SET_NODE_TYPE, and run_graph_listener(). Referenced by cm_set_type_of_node(). |
1.4.1