docs/Writerside/topics/list.h.md

branch
docs/3.1
changeset 1141
a06a2d27c043
child 1142
9437530176bc
equal deleted inserted replaced
1140:88a9ee79c102 1141:a06a2d27c043
1 # list.h
2
3 This header defines a common interface for all list implementations.
4
5 UCX already comes with two common list implementations (linked list and array list) that should cover most use cases.
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
7 `struct cx_list_s` as first member, and set an appropriate list class that implements the functionality.
8 It is strongly recommended that this class is shared among all instances of the same list type, because otherwise
9 the `cxListCompare` function cannot use the optimized implementation of your class and will instead fall back to
10 using iterators to compare the contents element-wise.

mercurial