further cleanup of lpp code
[libfirm] / ir / lpp / lpp_t.h
1
2 /**
3  * @file   lpp_t.h
4  * @date   30.07.2005
5  * @author Sebastian Hack
6  *
7  * Copyright (C) 2005 Universitaet Karlsruhe
8  * Released under the GPL
9  */
10 #ifndef LPP_T_H
11 #define LPP_T_H
12
13 #include "lpp.h"
14 #include "lpp_comm.h"
15
16 /**
17  * Serialize a lpp to a file descriptor.
18  * @param comm The file descriptor.
19  * @param lpp The lpp.
20  * @param with_names Also send the names of constraints/variables.
21  */
22 void lpp_serialize(lpp_comm_t *comm, const lpp_t *lpp, int with_names);
23
24 /**
25  * Deserialize an lpp from a file descriptor.
26  * @param comm The file descriptor.
27  * @param with_names Also receive names of constraints/variables.
28  * @return The Problem.
29  */
30 lpp_t *lpp_deserialize(lpp_comm_t *comm);
31
32 /**
33  * Serialize values of the lpps for a given value kind.
34  * This function only serializes values of the given kind.
35  * @param fd   The file descriptor to serialize to.
36  * @param lpp  The problem.
37  * @param kind The value kind.
38  */
39 void lpp_serialize_values(lpp_comm_t *comm, const lpp_t *lpp, lpp_value_kind_t kind);
40
41 /**
42  * Desrialize values from a stream.
43  * @param fd   The file descriptor to read from.
44  * @param lpp  The problem to set the values.
45  * @param kind The value kind the values shall be assigned.
46  */
47 void lpp_deserialize_values(lpp_comm_t *comm, lpp_t *lpp, lpp_value_kind_t kind);
48
49 void lpp_serialize_stats(lpp_comm_t *comm, const lpp_t *lpp);
50 void lpp_deserialize_stats(lpp_comm_t *comm, lpp_t *lpp);
51
52 #endif