117template <
class R,
class N, ContainerThreadSafety s=ContainerNoSafety,
int n = 0>
class SortListInNode;
118template <
class R,
class N, ContainerThreadSafety s=ContainerNoSafety,
int n = 0>
class SortListInRoot;
145template <
class R,
class N, ContainerThreadSafety s,
int n>
class SortListInRoot :
174 N*
first()
const {
return Base::first(); }
175 N*
last()
const {
return Base::last(); }
177 bool check()
const override;
219template <
class R,
class N, ContainerThreadSafety s,
int n>
class SortListInNode :
237 R*
root()
const {
return Base::root(); }
238 N*
next()
const {
return Base::next(); }
239 N*
prev()
const {
return Base::prev(); }
241 bool check()
const override;
Intrusive Singly Linked List.
unsigned writeLock(bool upgrade) const
Obtain a write lock.
unsigned readLock(bool upgradable) const
Obtain a read lock.
void readUnlock(unsigned code) const
Release the read lock that was held.
void writeUnlock(unsigned code) const
Release write lock.
Intrusive Singly Linked List, Node.
Definition ListIn.h:194
friend R
Definition ListIn.h:196
Intrusive Singly Linked List, List.
Definition ListIn.h:131
friend N
Definition ListIn.h:133
Intrusive Doubly Linked List, Node.
Definition SortListIn.h:221
void addTo(R &root)
Add ourself to a list at "natural" position.
Definition SortListIn.hpp:122
N * prev() const
Return pointer to previous node on list.
Definition SortListIn.h:239
void readUnlock(unsigned save) const
Definition SortListIn.h:248
class SortListInNode< R, N, s, n > Node
Type of DListIInNode.
Definition SortListIn.h:226
SortListInNode(R *root=nullptr)
Constructor.
Definition SortListIn.hpp:167
class ListInNode< R, N, s, n > Base
Definition SortListIn.h:227
class SortListInRoot< R, N, s, n > Root
Type of DListInRoot.
Definition SortListIn.h:225
R * root() const
Return pointer to list we are on.
Definition SortListIn.h:237
void writeUnlock(unsigned save) const
Definition SortListIn.h:245
bool check() const override
Definition SortListIn.hpp:59
unsigned readLock(bool upgrade) const
Definition SortListIn.h:247
void remove()
Definition SortListIn.h:235
~SortListInNode()
Destructor.
Definition SortListIn.hpp:189
N * next() const
Return pointer to next node on list.
Definition SortListIn.h:238
unsigned writeLock(bool upgrade) const
Definition SortListIn.h:244
Intrusive Doubly Linked List, List.
Definition SortListIn.h:147
void remove(N *node)
Definition SortListIn.h:162
N * last() const
Definition SortListIn.h:175
class ListInRoot< R, N, s, n > Base
Definition SortListIn.h:153
unsigned readLock(bool upgrade) const
Definition SortListIn.h:183
void add(N &node)
Add node to list based on sorting function in Root.
Definition SortListIn.hpp:76
class SortListInRoot< R, N, s, n > Root
Type of DListInRoot.
Definition SortListIn.h:151
void writeUnlock(unsigned save) const
Definition SortListIn.h:181
void readUnlock(unsigned save) const
Definition SortListIn.h:184
~SortListInRoot()
Destructor.
Definition SortListIn.hpp:157
void remove(N &node)
Definition SortListIn.h:161
SortListInRoot()
Constructor.
Definition SortListIn.hpp:148
N * first() const
Definition SortListIn.h:174
class SortListInNode< R, N, s, n > Node
Type of DListIInNode.
Definition SortListIn.h:152
int compare(N const &node1, N const &node2) const
This member function to be provided by the user to define the sort order.
unsigned writeLock(bool upgrade) const
Definition SortListIn.h:180
bool check() const override
Definition SortListIn.hpp:52