Graphviz 13.0.0~dev.20241220.2304
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 143 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 83 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 138 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 78 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 108 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 211 of file obj.c.

References Agclos_s::cb, Agraph_s::clos, Agcbstack_s::f, FAILURE, free(), 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 202 of file obj.c.

References Agclos_s::cb, Agraph_s::clos, Agcbstack_s::f, gv_alloc(), Agcbstack_s::prev, and Agcbstack_s::state.

Referenced by dot2_rank().

Here is the call graph for this function:
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 113 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: