Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
rec.c File Reference
#include <cgraph/cghdr.h>
#include <stdbool.h>
#include <stdlib.h>
#include <util/streq.h>
#include <util/alloc.h>
#include <util/unreachable.h>
Include dependency graph for rec.c:

Go to the source code of this file.

Functions

static void set_data (Agobj_t *obj, Agrec_t *data, bool mtflock)
 
Agrec_taggetrec (void *obj, const char *name, int mtf)
 find record in circular list and do optional move-to-front and lock
 
static void objputrec (Agobj_t *obj, void *arg)
 
void * agbindrec (void *arg_obj, const char *recname, unsigned int recsize, int move_to_front)
 attaches a new record of the given size to the object
 
static void objdelrec (Agraph_t *g, Agobj_t *obj, void *arg_rec)
 
static void listdelrec (Agobj_t *obj, Agrec_t *rec)
 
int agdelrec (void *arg_obj, const char *name)
 deletes a named record from one object
 
static void simple_delrec (Agraph_t *g, Agobj_t *obj, void *rec_name)
 
void aginit (Agraph_t *g, int kind, const char *rec_name, int arg_rec_size, int mtf)
 attach new records to objects of specified kind
 
void agclean (Agraph_t *g, int kind, char *rec_name)
 calls agdelrec for all objects of the same class in an entire graph
 
void agrecclose (Agobj_t *obj)
 

Function Documentation

◆ agrecclose()

void agrecclose ( Agobj_t obj)

Definition at line 227 of file rec.c.

References agraphof(), agstrfree(), Agobj_s::data, free(), Agrec_s::name, Agrec_s::next, and NULL.

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

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

◆ listdelrec()

static void listdelrec ( Agobj_t obj,
Agrec_t rec 
)
static

Definition at line 124 of file rec.c.

References Agobj_s::data, Agrec_s::next, and prev.

Referenced by agdelrec().

Here is the caller graph for this function:

◆ objdelrec()

static void objdelrec ( Agraph_t g,
Agobj_t obj,
void *  arg_rec 
)
static

Definition at line 110 of file rec.c.

References Agobj_s::data, Agrec_s::next, NULL, and set_data().

Referenced by agdelrec().

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

◆ objputrec()

static void objputrec ( Agobj_t obj,
void *  arg 
)
static

Definition at line 66 of file rec.c.

References Agobj_s::data, Agtag_s::mtflock, Agrec_s::next, NULL, set_data(), and Agobj_s::tag.

Referenced by agbindrec().

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

◆ set_data()

static void set_data ( Agobj_t obj,
Agrec_t data,
bool  mtflock 
)
static

Definition at line 27 of file rec.c.

References AGDATA, AGINEDGE, agopp, AGOUTEDGE, AGTYPE, Agedge_s::base, Agobj_s::data, Agtag_s::mtflock, and Agobj_s::tag.

Referenced by aggetrec(), objdelrec(), and objputrec().

Here is the caller graph for this function:

◆ simple_delrec()

static void simple_delrec ( Agraph_t g,
Agobj_t obj,
void *  rec_name 
)
static

Definition at line 164 of file rec.c.

References agdelrec().

Referenced by agclean().

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