smntc
an in-memory multimodal graph database
Main Page
Data Structures
Files
File List
Globals
Loading...
Searching...
No Matches
src
Shape.c
Go to the documentation of this file.
1
#include "
errors.h
"
2
#include "
Shape.h
"
3
#include "
Colors.h
"
4
#include "
Graph.h
"
5
#include "
Frame.h
"
6
7
struct
Frame
Shape_addFrame
(const struct
Shape
*
this
,
int
*error)
8
{
9
unsigned
int
vertex
=
Graph_addVertex
(this->
graph
, error);
10
11
if
(*error) {
12
struct
Frame
frame = {0};
13
return
frame;
14
}
15
16
Graph_addEdge
(this->
graph
, this->vertex,
vertex
, error);
17
18
if
(*error) {
19
struct
Frame
frame = {0};
20
return
frame;
21
}
22
23
struct
Frame
frame = {
24
.
vertex
=
vertex
,
25
.graph = this->
graph
,
26
.colors = this->
colors
27
};
28
29
return
frame;
30
}
Colors.h
Frame.h
Graph_addEdge
void Graph_addEdge(struct Graph *this, unsigned int source, unsigned int target, int *error)
It adds a directed edge from a source vertex to a target vertex.
Definition
Graph.c:298
Graph_addVertex
unsigned int Graph_addVertex(struct Graph *this, int *error)
It adds a vertex into a graph storage.
Definition
Graph.c:136
Graph.h
Shape_addFrame
struct Frame Shape_addFrame(const struct Shape *this, int *error)
Definition
Shape.c:7
Shape.h
errors.h
Frame
Definition
Frame.h:6
Frame::graph
struct Graph * graph
Definition
Frame.h:8
Frame::colors
struct Colors * colors
Definition
Frame.h:9
Frame::vertex
unsigned int vertex
Definition
Frame.h:7
Shape
Definition
Shape.h:8
Generated by
1.10.0