src/cx/list.h

changeset 490
e66551b47466
parent 489
af6be1e123aa
child 494
6ce8cfa10a96
equal deleted inserted replaced
489:af6be1e123aa 490:e66551b47466
112 */ 112 */
113 int (*compare)( 113 int (*compare)(
114 cx_list_s const *list, 114 cx_list_s const *list,
115 cx_list_s const *other 115 cx_list_s const *other
116 ); 116 );
117
118 /**
119 * Member function for reversing the order of the items.
120 */
121 void (*reverse)(cx_list_s *list);
117 } cx_list_class; 122 } cx_list_class;
118 123
119 /** 124 /**
120 * Structure for holding the base data of a list. 125 * Structure for holding the base data of a list.
121 */ 126 */
247 static inline void cxListSort(CxList list) { 252 static inline void cxListSort(CxList list) {
248 list->cl->sort(list); 253 list->cl->sort(list);
249 } 254 }
250 255
251 /** 256 /**
257 * Reverses the order of the items.
258 *
259 * @param list the list
260 */
261 static inline void cxListReverse(CxList list) {
262 list->cl->reverse(list);
263 }
264
265 /**
252 * Compares a list to another list of the same type. 266 * Compares a list to another list of the same type.
253 * 267 *
254 * First, the list sizes are compared. If they match, the lists are compared element-wise. 268 * First, the list sizes are compared. If they match, the lists are compared element-wise.
255 * 269 *
256 * @param list the list 270 * @param list the list

mercurial