docs/Writerside/topics/list.h.md

Mon, 03 Mar 2025 21:41:59 +0100

author
Mike Becker <universe@uap-core.de>
date
Mon, 03 Mar 2025 21:41:59 +0100
changeset 1236
f392f27a1dc6
parent 1190
a7b913d5d589
permissions
-rw-r--r--

list all function from list.h that need to be documented

relates to #451

1143
0559812df10c assign proper names to the documentation topics
Mike Becker <universe@uap-core.de>
parents: 1142
diff changeset
1 # List Interface
1141
a06a2d27c043 create new page structure
Mike Becker <universe@uap-core.de>
parents:
diff changeset
2
1146
151c057faf7c add marker to every incomplete page
Mike Becker <universe@uap-core.de>
parents: 1143
diff changeset
3 <warning>
1190
a7b913d5d589 bring incomplete docs into a shape that can be released
Mike Becker <universe@uap-core.de>
parents: 1146
diff changeset
4 Outdated Section - will be updated soon!
1146
151c057faf7c add marker to every incomplete page
Mike Becker <universe@uap-core.de>
parents: 1143
diff changeset
5 </warning>
151c057faf7c add marker to every incomplete page
Mike Becker <universe@uap-core.de>
parents: 1143
diff changeset
6
1236
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
7 The `list.h` header defines a common interface for all list implementations.
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
8
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
9 UCX already comes with two common list implementations ([linked list](linked_list.h.md) and [array list](array_list.h.md))
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
10 that should cover most use cases.
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
11 But if you feel the need to implement an own list, you will find instructions [below](#implementing-own-list-structures).
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
12
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
13 ## Overview
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
14
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
15 ```C
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
16 size_t cxListSize(const CxList *list);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
17
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
18 int cxListAdd(CxList *list, const void *elem);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
19
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
20 size_t cxListAddArray(CxList *list, const void *array, size_t n);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
21
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
22 int cxListInsert(CxList *list, size_t index, const void *elem);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
23
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
24 int cxListInsertSorted(CxList *list, const void *elem);
1141
a06a2d27c043 create new page structure
Mike Becker <universe@uap-core.de>
parents:
diff changeset
25
1236
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
26 size_t cxListInsertArray(CxList *list, size_t index,
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
27 const void *array, size_t n);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
28
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
29 size_t cxListInsertSortedArray(CxList *list,
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
30 const void *array, size_t n);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
31
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
32 int cxListInsertAfter(CxIterator *iter, const void *elem);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
33
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
34 int cxListInsertBefore(CxIterator *iter, const void *elem);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
35
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
36 int cxListRemove(CxList *list, size_t index);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
37
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
38 int cxListRemoveAndGet(CxList *list, size_t index, void *targetbuf);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
39
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
40 size_t cxListRemoveArray(CxList *list, size_t index, size_t num);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
41
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
42 size_t cxListRemoveArrayAndGet(CxList *list, size_t index, size_t num,
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
43 void *targetbuf);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
44
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
45 void cxListClear(CxList *list);
1142
9437530176bc add symbols that need documentation as TODOs
Mike Becker <universe@uap-core.de>
parents: 1141
diff changeset
46
1236
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
47 int cxListSwap(CxList *list, size_t i, size_t j);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
48
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
49 void *cxListAt(const CxList *list, size_t index);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
50
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
51 CxIterator cxListIteratorAt(const CxList *list, size_t index);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
52
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
53 CxIterator cxListBackwardsIteratorAt(const CxList *list, size_t index);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
54
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
55 CxIterator cxListMutIteratorAt(CxList *list, size_t index);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
56
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
57 CxIterator cxListMutBackwardsIteratorAt(CxList *list, size_t index);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
58
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
59 CxIterator cxListIterator(const CxList *list);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
60
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
61 CxIterator cxListMutIterator(CxList *list);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
62
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
63 CxIterator cxListBackwardsIterator(const CxList *list);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
64
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
65 CxIterator cxListMutBackwardsIterator(CxList *list);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
66
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
67 size_t cxListFind(const CxList *list, const void *elem);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
68
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
69 bool cxListIndexValid(const CxList *list, size_t index);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
70
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
71 size_t cxListFindRemove(CxList *list, const void *elem);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
72
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
73 void cxListSort(CxList *list);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
74
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
75 void cxListReverse(CxList *list);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
76
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
77 int cxListCompare(const CxList *list, const CxList *other);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
78
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
79 void cxListFree(CxList *list);
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
80
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
81 extern CxList *const cxEmptyList;
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
82 ```
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
83
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
84
f392f27a1dc6 list all function from list.h that need to be documented
Mike Becker <universe@uap-core.de>
parents: 1190
diff changeset
85 ## Implementing own List Structures
1142
9437530176bc add symbols that need documentation as TODOs
Mike Becker <universe@uap-core.de>
parents: 1141
diff changeset
86
1190
a7b913d5d589 bring incomplete docs into a shape that can be released
Mike Becker <universe@uap-core.de>
parents: 1146
diff changeset
87 <seealso>
a7b913d5d589 bring incomplete docs into a shape that can be released
Mike Becker <universe@uap-core.de>
parents: 1146
diff changeset
88 <category ref="apidoc">
a7b913d5d589 bring incomplete docs into a shape that can be released
Mike Becker <universe@uap-core.de>
parents: 1146
diff changeset
89 <a href="https://ucx.sourceforge.io/api/list_8h.html">list.h</a>
a7b913d5d589 bring incomplete docs into a shape that can be released
Mike Becker <universe@uap-core.de>
parents: 1146
diff changeset
90 </category>
a7b913d5d589 bring incomplete docs into a shape that can be released
Mike Becker <universe@uap-core.de>
parents: 1146
diff changeset
91 </seealso>

mercurial