forked from ElektraInitiative/libelektra
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreferencegraph.h
More file actions
31 lines (17 loc) · 752 Bytes
/
referencegraph.h
File metadata and controls
31 lines (17 loc) · 752 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef ELEKTRA_REFERENCEGRAPH_H
#define ELEKTRA_REFERENCEGRAPH_H
#include <kdb.h>
#include <stdbool.h>
typedef struct _RefGraph RefGraph;
RefGraph * rgNew (void);
RefGraph * rgDup (const RefGraph * source);
void rgDel (RefGraph * graph);
bool rgEmpty (const RefGraph * graph);
bool rgHasLeaf (const RefGraph * graph);
bool rgContains (const RefGraph * graph, const char * nodeName);
void rgAddNode (RefGraph * graph, const char * nodeName);
bool rgAddEdge (RefGraph * graph, const char * fromNode, const char * toNode);
const char * rgGetEdge (RefGraph * graph, const char * fromNode, int index);
size_t rgGetEdgeCount (RefGraph * graph, const char * fromNode);
void rgRemoveLeaves (RefGraph * graph);
#endif // ELEKTRA_REFERENCEGRAPH_H