TaPAS  0.2
ccl-serializer.h
Go to the documentation of this file.
1 /*
2  * ccl-serializer.h -- Serialization function for basic C types
3  *
4  * This file is a part of the C Common Library (CCL) project.
5  *
6  * Copyright (C) 2010 CNRS UMR 5800 & Universit√© Bordeaux I (see AUTHORS file).
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the AltaRica Public License that comes with this
10  * package.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15  */
16 
45 #ifndef __CCL_SERIALIZER_H__
46 # define __CCL_SERIALIZER_H__
47 
48 # include <ccl/ccl-common.h>
49 
50 BEGIN_C_DECLS
51 
63 
64 
65 
69 extern void
70 ccl_serializer_write_uint8 (uint8_t n, FILE *out, ccl_serializer_status *p_err);
71 
75 extern void
76 ccl_serializer_write_int8 (int8_t n, FILE *out, ccl_serializer_status *p_err);
77 
81 extern void
82 ccl_serializer_write_uint16 (uint16_t n, FILE *out,
83  ccl_serializer_status *p_err);
84 
88 extern void
89 ccl_serializer_write_int16 (int16_t n, FILE *out, ccl_serializer_status *p_err);
90 
94 extern void
95 ccl_serializer_write_uint32 (uint32_t n, FILE *out,
96  ccl_serializer_status *p_err);
97 
101 extern void
102 ccl_serializer_write_int32 (int32_t n, FILE *out, ccl_serializer_status *p_err);
103 
107 extern void
108 ccl_serializer_write_string (const char *s, FILE *out,
109  ccl_serializer_status *p_err);
110 
114 extern void
115 ccl_serializer_read_uint8 (uint8_t *p_n, FILE *in,
116  ccl_serializer_status *p_err);
117 
121 extern void
122 ccl_serializer_read_int8 (int8_t *p_n, FILE *in,
123  ccl_serializer_status *p_err);
124 
128 extern void
129 ccl_serializer_read_uint16 (uint16_t *p_n, FILE *in,
130  ccl_serializer_status *p_err);
131 
135 extern void
136 ccl_serializer_read_int16 (int16_t *p_n, FILE *in,
137  ccl_serializer_status *p_err);
138 
142 extern void
143 ccl_serializer_read_uint32 (uint32_t *p_n, FILE *in,
144  ccl_serializer_status *p_err);
145 
149 extern void
150 ccl_serializer_read_int32 (int32_t *p_n, FILE *in,
151  ccl_serializer_status *p_err);
152 
156 extern void
157 ccl_serializer_read_string (char **p_s, FILE *in, ccl_serializer_status *p_err);
158 
159 END_C_DECLS
160 
161 #endif /* ! __CCL_SERIALIZER_H__ */
void ccl_serializer_read_int8(int8_t *p_n, FILE *in, ccl_serializer_status *p_err)
void ccl_serializer_read_uint8(uint8_t *p_n, FILE *in, ccl_serializer_status *p_err)
void ccl_serializer_read_int16(int16_t *p_n, FILE *in, ccl_serializer_status *p_err)
void ccl_serializer_write_int8(int8_t n, FILE *out, ccl_serializer_status *p_err)
void ccl_serializer_write_uint8(uint8_t n, FILE *out, ccl_serializer_status *p_err)
void ccl_serializer_write_uint32(uint32_t n, FILE *out, ccl_serializer_status *p_err)
void ccl_serializer_read_uint16(uint16_t *p_n, FILE *in, ccl_serializer_status *p_err)
enum ccl_serializer_status_enum ccl_serializer_status
Error code returned by serialization functions.
void ccl_serializer_read_uint32(uint32_t *p_n, FILE *in, ccl_serializer_status *p_err)
void ccl_serializer_write_uint16(uint16_t n, FILE *out, ccl_serializer_status *p_err)
void ccl_serializer_write_int32(int32_t n, FILE *out, ccl_serializer_status *p_err)
ccl_serializer_status_enum
Error code returned by serialization functions.
void ccl_serializer_read_int32(int32_t *p_n, FILE *in, ccl_serializer_status *p_err)
Some useful and common macros.
void ccl_serializer_write_string(const char *s, FILE *out, ccl_serializer_status *p_err)
void ccl_serializer_read_string(char **p_s, FILE *in, ccl_serializer_status *p_err)
void ccl_serializer_write_int16(int16_t n, FILE *out, ccl_serializer_status *p_err)