-
Notifications
You must be signed in to change notification settings - Fork 0
/
serial.h
28 lines (22 loc) · 959 Bytes
/
serial.h
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
/**
* @file serial.h
*
* @brief Módulo de serialização e de-serialização
* @details Tem funções para gravar os dados num ficheiro e ler os dados anteriormente gravados.
* */
#ifndef SERIAL_H_INCLUDED
#define SERIAL_H_INCLUDED
#include "mod_avl_n_dimensional.h"
#include "mod_tabela_hash.h"
#include <stdio.h>
int serialize(TabelaHashPTR tabela, MainTreePt camioes, MainTreePt clientes);
int deserialize(
MainTreePt *camioes, int (*comparaCamioes[DIM])(void*,void*),
MainTreePt *clientes, int (*comparaClientes[DIM])(void*,void*),
TabelaHashPTR *localidades, int (*func_compare)(void*,void*), int(*hash_function)(void*,int) );
char* novaString(unsigned int n);
void serial_clienteRec( TreePt thisTree, FILE *file );
void serial_cliente( MainTreePt thisMainTree, FILE *file );
void serial_camiaoRec( TreePt thisTree, FILE *file );
void serial_camiao( MainTreePt thisMainTree, FILE *file );
#endif /* MENU_H_INCLUDED */