docs/Writerside/topics/list.h.md

Fri, 24 Jan 2025 21:12:09 +0100

author
Mike Becker <universe@uap-core.de>
date
Fri, 24 Jan 2025 21:12:09 +0100
branch
docs/3.1
changeset 1143
0559812df10c
parent 1142
9437530176bc
child 1146
151c057faf7c
permissions
-rw-r--r--

assign proper names to the documentation topics

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
a06a2d27c043 create new page structure
Mike Becker <universe@uap-core.de>
parents:
diff changeset
3 This header defines a common interface for all list implementations.
a06a2d27c043 create new page structure
Mike Becker <universe@uap-core.de>
parents:
diff changeset
4
a06a2d27c043 create new page structure
Mike Becker <universe@uap-core.de>
parents:
diff changeset
5 UCX already comes with two common list implementations (linked list and array list) that should cover most use cases.
a06a2d27c043 create new page structure
Mike Becker <universe@uap-core.de>
parents:
diff changeset
6 But if you feel the need to implement an own list, the only thing you need to do is to define a struct with a
a06a2d27c043 create new page structure
Mike Becker <universe@uap-core.de>
parents:
diff changeset
7 `struct cx_list_s` as first member, and set an appropriate list class that implements the functionality.
a06a2d27c043 create new page structure
Mike Becker <universe@uap-core.de>
parents:
diff changeset
8 It is strongly recommended that this class is shared among all instances of the same list type, because otherwise
a06a2d27c043 create new page structure
Mike Becker <universe@uap-core.de>
parents:
diff changeset
9 the `cxListCompare` function cannot use the optimized implementation of your class and will instead fall back to
a06a2d27c043 create new page structure
Mike Becker <universe@uap-core.de>
parents:
diff changeset
10 using iterators to compare the contents element-wise.
1142
9437530176bc add symbols that need documentation as TODOs
Mike Becker <universe@uap-core.de>
parents: 1141
diff changeset
11
9437530176bc add symbols that need documentation as TODOs
Mike Becker <universe@uap-core.de>
parents: 1141
diff changeset
12 ## Undocumented Symbols (TODO)
9437530176bc add symbols that need documentation as TODOs
Mike Becker <universe@uap-core.de>
parents: 1141
diff changeset
13 ### cx_empty_list
9437530176bc add symbols that need documentation as TODOs
Mike Becker <universe@uap-core.de>
parents: 1141
diff changeset
14 ### cxEmptyList
9437530176bc add symbols that need documentation as TODOs
Mike Becker <universe@uap-core.de>
parents: 1141
diff changeset
15 ### cxListCompare
9437530176bc add symbols that need documentation as TODOs
Mike Becker <universe@uap-core.de>
parents: 1141
diff changeset
16 ### cx_list_default_insert_array
9437530176bc add symbols that need documentation as TODOs
Mike Becker <universe@uap-core.de>
parents: 1141
diff changeset
17 ### cx_list_default_insert_sorted
9437530176bc add symbols that need documentation as TODOs
Mike Becker <universe@uap-core.de>
parents: 1141
diff changeset
18 ### cx_list_default_sort
9437530176bc add symbols that need documentation as TODOs
Mike Becker <universe@uap-core.de>
parents: 1141
diff changeset
19 ### cx_list_default_swap
9437530176bc add symbols that need documentation as TODOs
Mike Becker <universe@uap-core.de>
parents: 1141
diff changeset
20 ### cxListFree
9437530176bc add symbols that need documentation as TODOs
Mike Becker <universe@uap-core.de>
parents: 1141
diff changeset
21 ### cx_list_init
9437530176bc add symbols that need documentation as TODOs
Mike Becker <universe@uap-core.de>
parents: 1141
diff changeset
22 ### cxListMutBackwardsIteratorAt
9437530176bc add symbols that need documentation as TODOs
Mike Becker <universe@uap-core.de>
parents: 1141
diff changeset
23 ### cxListMutIteratorAt
9437530176bc add symbols that need documentation as TODOs
Mike Becker <universe@uap-core.de>
parents: 1141
diff changeset
24

mercurial