Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
id.c File Reference
#include <assert.h>
#include <stdbool.h>
#include <stdio.h>
#include <cgraph/cghdr.h>
#include <inttypes.h>
#include <stdint.h>
#include <stdlib.h>
#include <util/alloc.h>
Include dependency graph for id.c:

Go to the source code of this file.

Data Structures

struct  state_t
 information the ID allocator needs to do its job More...
 

Functions

static void * idopen (Agraph_t *g, Agdisc_t *disc)
 
static long idmap (void *state, int objtype, char *str, IDTYPE *id, int createflag)
 
static long idalloc (void *state, int objtype, IDTYPE request)
 
static void idfree (void *state, int objtype, IDTYPE id)
 
static char * idprint (void *state, int objtype, IDTYPE id)
 
static void idregister (void *state, int objtype, void *obj)
 
int agmapnametoid (Agraph_t *g, int objtype, char *str, IDTYPE *result, bool createflag)
 
int agallocid (Agraph_t *g, int objtype, IDTYPE request)
 
void agfreeid (Agraph_t *g, int objtype, IDTYPE id)
 
char * agnameof (void *obj)
 returns a string descriptor for the object.
 
void agregister (Agraph_t *g, int objtype, void *obj)
 

Variables

Agiddisc_t AgIdDisc
 

Function Documentation

◆ agallocid()

int agallocid ( Agraph_t g,
int  objtype,
IDTYPE  request 
)

Definition at line 141 of file id.c.

References AGCLOS, and AGDISC.

Referenced by agidedge(), agidnode(), and agidsubg().

Here is the caller graph for this function:

◆ agfreeid()

void agfreeid ( Agraph_t g,
int  objtype,
IDTYPE  id 
)

Definition at line 146 of file id.c.

References AGCLOS, AGDISC, aginternalmapdelete(), and id.

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

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

◆ agmapnametoid()

int agmapnametoid ( Agraph_t g,
int  objtype,
char *  str,
IDTYPE result,
bool  createflag 
)

Definition at line 112 of file id.c.

References AGCLOS, AGDISC, aginternalmapinsert(), aginternalmaplookup(), LOCALNAMEPREFIX, Agiddisc_s::map, NULL, and str.

Referenced by agedge(), agfindnode_by_name(), agnode(), agopen(), agrelabel_node(), agrename(), and agsubg().

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

◆ agregister()

void agregister ( Agraph_t g,
int  objtype,
void *  obj 
)

Definition at line 185 of file id.c.

References AGCLOS, and AGDISC.

Referenced by agedge(), agnode(), agopen(), and agsubg().

Here is the caller graph for this function:

◆ idalloc()

static long idalloc ( void *  state,
int  objtype,
IDTYPE  request 
)
static

Definition at line 67 of file id.c.

◆ idfree()

static void idfree ( void *  state,
int  objtype,
IDTYPE  id 
)
static

Definition at line 75 of file id.c.

References agstrfree(), and state_t::g.

Here is the call graph for this function:

◆ idmap()

static long idmap ( void *  state,
int  objtype,
char *  str,
IDTYPE id,
int  createflag 
)
static

Definition at line 41 of file id.c.

References agstrbind(), agstrdup(), state_t::counter, state_t::g, and str.

Here is the call graph for this function:

◆ idopen()

static void * idopen ( Agraph_t g,
Agdisc_t disc 
)
static

Definition at line 32 of file id.c.

References disc, and gv_alloc().

Here is the call graph for this function:

◆ idprint()

static char * idprint ( void *  state,
int  objtype,
IDTYPE  id 
)
static

Definition at line 83 of file id.c.

References NULL.

◆ idregister()

static void idregister ( void *  state,
int  objtype,
void *  obj 
)
static

Definition at line 93 of file id.c.