src/cx/list.h

changeset 666
b5dd654deb3b
parent 664
af5bf4603a5d
child 667
2f88a7c13a28
equal deleted inserted replaced
665:c4041b07165e 666:b5dd654deb3b
225 * Common type for all list implementations. 225 * Common type for all list implementations.
226 */ 226 */
227 typedef struct cx_list_s CxList; 227 typedef struct cx_list_s CxList;
228 228
229 /** 229 /**
230 * Invokes the destructor function for a specific element. 230 * Invokes the configured destructor function for a specific element.
231 * 231 *
232 * Usually only used by list implementations. There should be no need 232 * Usually only used by list implementations. There should be no need
233 * to invoke this function manually. 233 * to invoke this function manually.
234 * 234 *
235 * @param list the list 235 * @param list the list
240 struct cx_list_s const *list, 240 struct cx_list_s const *list,
241 void *elem 241 void *elem
242 ); 242 );
243 243
244 /** 244 /**
245 * Invokes the simple destructor function for a specific element.
246 *
247 * Usually only used by list implementations. There should be no need
248 * to invoke this function manually.
249 *
250 * @param list the list
251 * @param elem the element
252 */
253 __attribute__((__nonnull__))
254 void cx_list_invoke_simple_destructor(
255 struct cx_list_s const *list,
256 void *elem
257 );
258
259 /**
260 * Invokes the advanced destructor function for a specific element.
261 *
262 * Usually only used by list implementations. There should be no need
263 * to invoke this function manually.
264 *
265 * @param list the list
266 * @param elem the element
267 */
268 __attribute__((__nonnull__))
269 void cx_list_invoke_advanced_destructor(
270 struct cx_list_s const *list,
271 void *elem
272 );
273
274 /**
245 * Advises the list to store copies of the objects (default mode of operation). 275 * Advises the list to store copies of the objects (default mode of operation).
246 * 276 *
247 * Retrieving objects from this list will yield pointers to the copies stored 277 * Retrieving objects from this list will yield pointers to the copies stored
248 * within this list. 278 * within this list.
249 * 279 *
274 * @param list 304 * @param list
275 * @return 305 * @return
276 * @see cxListStorePointers() 306 * @see cxListStorePointers()
277 */ 307 */
278 __attribute__((__nonnull__)) 308 __attribute__((__nonnull__))
279 bool cxListIsStoringPointers(CxList *list); 309 bool cxListIsStoringPointers(CxList const *list);
280 310
281 /** 311 /**
282 * Adds an item to the end of the list. 312 * Adds an item to the end of the list.
283 * 313 *
284 * @param list the list 314 * @param list the list

mercurial