Add the return type as parameter to the macros set_find() and set_insert().
[libfirm] / ir / lpp / lpp_t.h
1 /*
2  * Copyright (C) 2005-2011 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
6  * This file may be distributed and/or modified under the terms of the
7  * GNU General Public License version 2 as published by the Free Software
8  * Foundation and appearing in the file LICENSE.GPL included in the
9  * packaging of this file.
10  *
11  * Licensees holding valid libFirm Professional Edition licenses may use
12  * this file in accordance with the libFirm Commercial License.
13  * Agreement provided with the Software.
14  *
15  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE.
18  */
19
20 /**
21  * @file
22  * @author  Sebastian Hack
23  */
24 #ifndef LPP_LPP_T_H
25 #define LPP_LPP_T_H
26
27 #include "lpp.h"
28 #include "lpp_comm.h"
29
30 /**
31  * Serialize a lpp to a file descriptor.
32  * @param comm The file descriptor.
33  * @param lpp The lpp.
34  * @param with_names Also send the names of constraints/variables.
35  */
36 void lpp_serialize(lpp_comm_t *comm, const lpp_t *lpp, int with_names);
37
38 /**
39  * Deserialize an lpp from a file descriptor.
40  * @param comm The file descriptor.
41  * @param with_names Also receive names of constraints/variables.
42  * @return The Problem.
43  */
44 lpp_t *lpp_deserialize(lpp_comm_t *comm);
45
46 /**
47  * Serialize values of the lpps for a given value kind.
48  * This function only serializes values of the given kind.
49  * @param fd   The file descriptor to serialize to.
50  * @param lpp  The problem.
51  * @param kind The value kind.
52  */
53 void lpp_serialize_values(lpp_comm_t *comm, const lpp_t *lpp, lpp_value_kind_t kind);
54
55 /**
56  * Desrialize values from a stream.
57  * @param fd   The file descriptor to read from.
58  * @param lpp  The problem to set the values.
59  * @param kind The value kind the values shall be assigned.
60  */
61 void lpp_deserialize_values(lpp_comm_t *comm, lpp_t *lpp, lpp_value_kind_t kind);
62
63 void lpp_serialize_stats(lpp_comm_t *comm, const lpp_t *lpp);
64 void lpp_deserialize_stats(lpp_comm_t *comm, lpp_t *lpp);
65
66 #endif