126template <
class R,
class N, ContainerThreadSafety s=ContainerNoSafety,
int n = 0>
class SortDListInNode;
127template <
class R,
class N, ContainerThreadSafety s=ContainerNoSafety,
int n = 0>
class SortDListInRoot;
160 void remove(N& node) { Base::remove(node); }
161 void remove(N* node) { Base::remove(node); }
171 int compare(N
const& node1, N
const& node2)
const;
173 N*
first()
const {
return Base::first();}
174 N*
last()
const {
return Base::last(); }
176 bool check()
const override;
245 R*
root()
const {
return Base::root(); }
246 N*
next()
const {
return Base::next(); }
247 N*
prev()
const {
return Base::prev(); }
249 bool check()
const override;
Intrusive Double 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 Doubly Linked List, Node.
Definition DListIn.h:204
Intrusive Doubly Linked List, List.
Definition DListIn.h:137
Intrusive Doubly Linked List, Node.
Definition SortDListIn.h:229
N * prev() const
Return pointer to previous node on list.
Definition SortDListIn.h:247
unsigned writeLock(bool upgrade) const
Definition SortDListIn.h:252
void writeUnlock(unsigned save) const
Definition SortDListIn.h:253
void remove()
Definition SortDListIn.h:243
class DListInNode< R, N, s, n > Base
Definition SortDListIn.h:235
class SortDListInRoot< R, N, s, n > Root
Type of DListInRoot.
Definition SortDListIn.h:233
SortDListInNode(R *root=nullptr)
Constructor.
Definition SortDListIn.hpp:167
class SortDListInNode< R, N, s, n > Node
Type of DListIInNode.
Definition SortDListIn.h:234
unsigned readLock(bool upgrade) const
Definition SortDListIn.h:255
void addTo(R &root)
Add ourself to a list at "natural" position.
Definition SortDListIn.hpp:122
void readUnlock(unsigned save) const
Definition SortDListIn.h:256
~SortDListInNode()
Destructor.
Definition SortDListIn.hpp:189
N * next() const
Return pointer to next node on list.
Definition SortDListIn.h:246
R * root() const
Return pointer to list we are on.
Definition SortDListIn.h:245
bool check() const override
Check a DListInNode.
Definition SortDListIn.hpp:57
Intrusive Doubly Linked List, List.
Definition SortDListIn.h:146
N * first() const
Definition SortDListIn.h:173
void writeUnlock(unsigned save) const
Definition SortDListIn.h:180
void remove(N *node)
Definition SortDListIn.h:161
unsigned writeLock(bool upgrade) const
Definition SortDListIn.h:179
int compare(N const &node1, N const &node2) const
This member function to be provided by the user to define the sort order.
unsigned readLock(bool upgrade) const
Definition SortDListIn.h:182
void remove(N &node)
Definition SortDListIn.h:160
class SortDListInRoot< R, N, s, n > Root
Type of DListInRoot.
Definition SortDListIn.h:150
SortDListInRoot()
Constructor.
Definition SortDListIn.hpp:148
~SortDListInRoot()
Destructor.
Definition SortDListIn.hpp:157
class SortDListInNode< R, N, s, n > Node
Type of DListIInNode.
Definition SortDListIn.h:151
bool check() const override
Check a DListInRoot and the list connected.
Definition SortDListIn.hpp:50
void readUnlock(unsigned save) const
Definition SortDListIn.h:183
N * last() const
Definition SortDListIn.h:174
void add(N &node)
Add node to list based on sorting function in Root.
Definition SortDListIn.hpp:77
class DListInRoot< R, N, s, n > Base
Definition SortDListIn.h:152