#include <stdlib.h>
#include "errors.h"
#include "Graph.h"
#include "Binary.h"
#include "Utf8.h"
#include <stdio.h>
Go to the source code of this file.
|
| struct | Words |
| | A managing object for all words in a graph. More...
|
| |
|
| struct Words * | Words_construct (unsigned int wordType, struct Binary *binary, struct Utf8 *utf8, struct Graph *graph, int *error) |
| | It constructs a new managing object for all words in a graph.
|
| |
| struct Words * | Words_destruct (struct Words *this) |
| | It destructs a managing object for all words in a graph.
|
| |
| unsigned int | Words_writeWord (struct Words *this, unsigned int length, unsigned int *characters, int *error) |
| | It writes one word into a graph.
|
| |
| void | Words_readWord (struct Words *this, unsigned int word, unsigned int length, unsigned int *characters, int *error) |
| | It reads a word from a graph.
|
| |
◆ BUFFER_LENGTH
| #define BUFFER_LENGTH 256 |
◆ WORD_CLUSTER_LENGTH
| #define WORD_CLUSTER_LENGTH 3 |
◆ Words_construct()
| struct Words * Words_construct |
( |
unsigned int |
wordType, |
|
|
struct Binary * |
binary, |
|
|
struct Utf8 * |
utf8, |
|
|
struct Graph * |
graph, |
|
|
int * |
error |
|
) |
| |
It constructs a new managing object for all words in a graph.
- Parameters
-
| wordType | a vertex that all word clusters will be connected to |
| binary | a manging object for binary character codes |
| utf8 | a UTF8 converter |
| graph | a graph storage with needed managing objects |
| error | error tracking (0 means no error) |
Definition at line 57 of file Words.c.
◆ Words_destruct()
| struct Words * Words_destruct |
( |
struct Words * |
this | ) |
|
It destructs a managing object for all words in a graph.
It triggers destruction of the binary manager. Other references are left intact.
- Parameters
-
| this | a managing object for all words in a graph |
Definition at line 74 of file Words.c.
◆ Words_readWord()
| void Words_readWord |
( |
struct Words * |
this, |
|
|
unsigned int |
word, |
|
|
unsigned int |
length, |
|
|
unsigned int * |
characters, |
|
|
int * |
error |
|
) |
| |
It reads a word from a graph.
- Parameters
-
| this | a managing object for all words in a graph |
| word | the type vertex of a word cluster |
| length | the buffer length |
| characters | a buffer for the charcters to be read |
| error | error tracking (0 means no error) |
Definition at line 251 of file Words.c.
◆ Words_writeWord()
| unsigned int Words_writeWord |
( |
struct Words * |
this, |
|
|
unsigned int |
length, |
|
|
unsigned int * |
characters, |
|
|
int * |
error |
|
) |
| |
It writes one word into a graph.
- Parameters
-
| this | a managing object for all words in a graph |
| length | the number of characters in the buffer |
| characters | a buffer with the charcters to be written |
| error | error tracking (0 means no error) |
Definition at line 85 of file Words.c.