Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

generation.h File Reference

Handler for node/edge generations. More...

#include "graph.h"
#include "actions.h"

Go to the source code of this file.

Typedefs

typedef enum _gr_generation_flags_t gr_generation_flags_t
typedef _gr_generation_t gr_generation_t

Enumerations

enum  _gr_generation_flags_t {
  GR_GENERATION_INC_ON_MATCH_FLAG = 0x00000001, GR_GENERATION_UPD_ON_MATCH_FLAG = 0x00000002, GR_GENERATION_INC_BEFORE_FINISH_FLAG = 0x00000004, GR_GENERATION_INC_AFTER_FINISH_FLAG = 0x00000008,
  GR_GENERATION_DEFAULT_FLAGS
}

Functions

void gr_install_generations (gr_graph_t *gr, gr_actions_t *acts, gr_id_t node_gen_attr, gr_id_t edge_gen_attr, unsigned flags)
int gr_get_cur_generation (gr_graph_t *gr)
int gr_get_next_generation (gr_graph_t *gr)
void gr_set_cur_generation (gr_graph_t *gr, int count)


Detailed Description

Handler for node/edge generations.

Date:
23.01.2004
Id
generation.h,v 1.5 2005/10/10 14:16:44 rubino Exp

Definition in file generation.h.


Typedef Documentation

typedef enum _gr_generation_flags_t gr_generation_flags_t
 

Generation control flags.

typedef struct _gr_generation_t gr_generation_t
 

The generation type.


Enumeration Type Documentation

enum _gr_generation_flags_t
 

Generation control flags.

Enumeration values:
GR_GENERATION_INC_ON_MATCH_FLAG  generations are automatically increased on matches
GR_GENERATION_UPD_ON_MATCH_FLAG  generations are automatically updated on matches
GR_GENERATION_INC_BEFORE_FINISH_FLAG  generations are automatically increased before an action finished
GR_GENERATION_INC_AFTER_FINISH_FLAG  generations are automatically increased after an action finish
GR_GENERATION_DEFAULT_FLAGS 

Definition at line 41 of file generation.h.


Function Documentation

int gr_get_cur_generation gr_graph_t gr  ) 
 

Gets the current generation count.

Parameters:
gr The graph.
Returns:
The current generation count

Definition at line 206 of file generation.c.

References ASSERT_GR, ASSERT_INST, and _gr_generation_t::generation.

Referenced by gr_graph_add_edge(), gr_graph_add_node(), and gr_graph_set_node_type().

int gr_get_next_generation gr_graph_t gr  ) 
 

Gets the next generation count. Can be used to increase the generation manualy.

Parameters:
gr The graph.
Returns:
The next generation count

Definition at line 214 of file generation.c.

References ASSERT_GR, ASSERT_INST, and _gr_generation_t::generation.

void gr_install_generations gr_graph_t gr,
gr_actions_t acts,
gr_id_t  node_gen_attr,
gr_id_t  edge_gen_attr,
unsigned  flags
 

Install generation tracking support.

Parameters:
gr The graph.
acts The actions, iff NULL, actions will not be tracked.
node_gen_attr The attribute id for the node generation attribute.
edge_gen_attr The attribute id for the edge generation attribute.
flags A bitmask of gr_generation_flags_t containing the flags.
Remarks:
node_gen_attr or edge_gen_attr can be set to gr_invalid_id to disable tracking.

Definition at line 162 of file generation.c.

References _gr_generation_t::action_after_finish_listener, _gr_generation_t::action_before_finish_listener, _gr_generation_t::action_match_listener, _gr_generation_t::add_edge_listener, _gr_generation_t::add_node_listener, _gr_generation_t::edge_generation_attr, _gr_generation_t::flags, _gr_generation_t::generation, gr_act_after_finish(), gr_act_before_finish(), gr_act_match(), gr_action_add_listener(), GR_GENERATION_MAGIC, gr_graph_add_edge(), gr_graph_add_listener(), gr_graph_add_node(), gr_graph_set_node_type(), gr_id_is_valid, GR_LISTENER_ACT_AFTER_FINISH, GR_LISTENER_ACT_AFTER_MATCH, GR_LISTENER_ACT_BEFORE_FINISH, GR_LISTENER_ADD_EDGE, GR_LISTENER_ADD_NODE, GR_LISTENER_SET_NODE_TYPE, _gr_generation_t::magic, _gr_generation_t::node_generation_attr, and _gr_generation_t::set_node_type_listener.

void gr_set_cur_generation gr_graph_t gr,
int  count
 

Sets the current generation count.

Parameters:
gr The graph.
count The next generation count.

Definition at line 222 of file generation.c.

References ASSERT_GR, ASSERT_INST, and _gr_generation_t::generation.


Generated on Wed Apr 5 15:28:19 2006 for libgr by  doxygen 1.4.1