Graphviz 12.0.1~dev.20240715.2254
Loading...
Searching...
No Matches
id.c File Reference
#include <assert.h>
#include <stdbool.h>
#include <stdio.h>
#include <cgraph/alloc.h>
#include <cgraph/cghdr.h>
#include <inttypes.h>
#include <stdint.h>
#include <stdlib.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.

References state.

◆ idfree()

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

Definition at line 75 of file id.c.

References agstrfree(), state_t::g, and state.

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, state, 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 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, and state.

◆ idregister()

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

Definition at line 93 of file id.c.

References state.