/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk

« back to all changes in this revision

Viewing changes to libssts/DynamicArray.h

  • Committer: Gustav Hartvigsson
  • Date: 2016-01-30 21:23:29 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20160130212329-cjpxy0vn851li8f3
* added S_EXPERTED to public functions.
* renamed -  internal_s_box_set_err_on_missmatch () to _internal_s_box_set_err_on_missmatch ().
* Replaced some tabs with spaces.

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
 * The free function should have the the signature <tt> (DynamicArray * self,
71
71
 * spointer item, spointer data) </tt> should be used but cast to FreeFunc.
72
72
 */
 
73
S_EXPORTED
73
74
SDynamicArray *
74
75
s_dynamic_array_new (size_t len,
75
76
                     FreeFunc free_func);
76
77
 
 
78
S_EXPORTED
77
79
SDynamicArray *
78
80
s_dynamic_array_new_full (size_t len,
79
81
                          FreeFunc free_func,
98
100
 * If this function is not set, the s_matrix_deserialize_json() function will
99
101
 * not work.
100
102
 */
 
103
S_EXPORTED
101
104
SDynamicArray *
102
105
s_dynamic_array_new_json (size_t len,
103
106
                          FreeFunc free_func,
109
112
 *
110
113
 * after this is run the data will be lost.
111
114
 */
 
115
S_EXPORTED
112
116
void
113
117
s_dynamic_array_free (SDynamicArray * self,
114
118
                      sboolean free_data);
128
132
 * @param index The index at which to set the item.
129
133
 * @para item The item to put in the array.
130
134
 */
 
135
S_EXPORTED
131
136
void
132
137
s_dynamic_array_set (SDynamicArray * self,
133
138
                     size_t index,
140
145
 * @param self The dynamic array to add the item to.
141
146
 * @param item The item to add.
142
147
 */
 
148
S_EXPORTED
143
149
void
144
150
s_dynamic_array_append (SDynamicArray * self,
145
151
                        spointer item);
151
157
 *
152
158
 * To get the length of the array use s_dynamic_array_len ().
153
159
 */
 
160
S_EXPORTED
154
161
size_t
155
162
s_dynamic_array_size (SDynamicArray * self);
156
163
 
161
168
 * This is not the last item added to the array, necessary, it is the index
162
169
 * of the item that has the highest position in the array.
163
170
 */
 
171
S_EXPORTED
164
172
size_t
165
173
s_dynamic_array_last_item (SDynamicArray * self);
166
174
 
171
179
 *
172
180
 * Is null-terminated.
173
181
 */
 
182
S_EXPORTED
174
183
spointer *
175
184
s_dynamic_array_dump_array (SDynamicArray * self);
176
185
 
177
186
/**
178
187
 * Use a function on the array.
179
188
 */
 
189
S_EXPORTED
180
190
void
181
191
s_dynamic_array_for_each (SDynamicArray * self, ForEachFunc func,
182
192
                          spointer data);
203
213
 *
204
214
 * @return a string with the JSON representation of the SDynamicArray.
205
215
 */
 
216
S_EXPORTED
206
217
char *
207
218
s_dynamic_array_serialize_json (SDynamicArray * self);
208
219
 
211
222
 *
212
223
 * If the from_json function is not set, this will couse undefined behaviour.
213
224
 */
 
225
S_EXPORTED
214
226
void
215
227
s_dynamic_array_deserialize_json (SDynamicArray * self, char * json);
216
228