Graphviz 12.0.1~dev.20240715.2254
Loading...
Searching...
No Matches

virtual methods of initialization, modification, and finalization of graph objects More...

Collaboration diagram for callbacks:

Data Structures

struct  Agcbdisc_s
 client event callbacks, used in Agcbstack_s More...
 
struct  Agcbstack_s
 object event callbacks More...
 

Typedefs

typedef struct Agcbdisc_s Agcbdisc_t
 client event callbacks
 
typedef struct Agcbstack_s Agcbstack_t
 enclosing state for Agcbdisc_t
 

Functions

void agmethod_init (Agraph_t *g, void *obj)
 
void agmethod_upd (Agraph_t *g, void *obj, Agsym_t *sym)
 
void agmethod_delete (Agraph_t *g, void *obj)
 
void aginitcb (Agraph_t *g, void *obj, Agcbstack_t *disc)
 
void agupdcb (Agraph_t *g, void *obj, Agsym_t *sym, Agcbstack_t *disc)
 
void agdelcb (Agraph_t *g, void *obj, Agcbstack_t *disc)
 
void agpushdisc (Agraph_t *g, Agcbdisc_t *disc, void *state)
 
int agpopdisc (Agraph_t *g, Agcbdisc_t *disc)
 

Detailed Description

An Agcbdisc_t defines callbacks to be invoked by Libcgraph when initializing, modifying, or finalizing graph objects. Disciplines are kept on a stack. Libcgraph automatically calls the methods on the stack, top-down. Callbacks are installed with agpushdisc, uninstalled with agpopdisc.

Typedef Documentation

◆ Agcbdisc_t

typedef struct Agcbdisc_s Agcbdisc_t

Definition at line 102 of file cgraph.h.

◆ Agcbstack_t

typedef struct Agcbstack_s Agcbstack_t

Definition at line 103 of file cgraph.h.

Function Documentation

◆ agdelcb()

void agdelcb ( Agraph_t g,
void *  obj,
Agcbstack_t disc 
)

Definition at line 142 of file obj.c.

References agdelcb(), AGEDGE, AGNODE, AGRAPH, AGTYPE, Agcbdisc_s::del, Agcbdisc_s::edge, Agcbstack_s::f, Agcbdisc_s::graph, Agcbdisc_s::node, NULL, Agcbstack_s::prev, and Agcbstack_s::state.

Referenced by agdelcb(), and agmethod_delete().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ aginitcb()

void aginitcb ( Agraph_t g,
void *  obj,
Agcbstack_t disc 
)

Definition at line 82 of file obj.c.

References AGEDGE, aginitcb(), AGNODE, AGRAPH, AGTYPE, Agcbdisc_s::edge, Agcbstack_s::f, Agcbdisc_s::graph, Agcbdisc_s::ins, Agcbdisc_s::node, NULL, Agcbstack_s::prev, and Agcbstack_s::state.

Referenced by aginitcb(), and agmethod_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ agmethod_delete()

void agmethod_delete ( Agraph_t g,
void *  obj 
)

Definition at line 137 of file obj.c.

References agdelcb(), Agclos_s::cb, and Agraph_s::clos.

Referenced by agclose(), agdeledge(), and agdelnode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ agmethod_init()

void agmethod_init ( Agraph_t g,
void *  obj 
)

Definition at line 77 of file obj.c.

References aginitcb(), Agclos_s::cb, and Agraph_s::clos.

Referenced by agopen1(), initnode(), and newedge().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ agmethod_upd()

void agmethod_upd ( Agraph_t g,
void *  obj,
Agsym_t sym 
)

Definition at line 107 of file obj.c.

References agupdcb(), Agclos_s::cb, and Agraph_s::clos.

Referenced by agxset(), and setattr().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ agpopdisc()

int agpopdisc ( Agraph_t g,
Agcbdisc_t disc 
)

Definition at line 212 of file obj.c.

References agfree(), Agclos_s::cb, Agraph_s::clos, Agcbstack_s::f, FAILURE, Agcbstack_s::prev, and SUCCESS.

Referenced by agclose().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ agpushdisc()

void agpushdisc ( Agraph_t g,
Agcbdisc_t disc,
void *  state 
)

Definition at line 201 of file obj.c.

References AGNEW, Agclos_s::cb, Agraph_s::clos, Agcbstack_s::f, Agcbstack_s::prev, Agcbstack_s::state, and state.

Referenced by dot2_rank().

Here is the caller graph for this function:

◆ agupdcb()

void agupdcb ( Agraph_t g,
void *  obj,
Agsym_t sym,
Agcbstack_t disc 
)

Definition at line 112 of file obj.c.

References AGEDGE, AGNODE, AGRAPH, AGTYPE, agupdcb(), Agcbdisc_s::edge, Agcbstack_s::f, Agcbdisc_s::graph, Agcbdisc_s::mod, Agcbdisc_s::node, NULL, Agcbstack_s::prev, and Agcbstack_s::state.

Referenced by agmethod_upd(), and agupdcb().

Here is the call graph for this function:
Here is the caller graph for this function: