5 #include <libutl/Collection.h> 6 #include <libutl/SlistNode.h> 21 int slist_compare(
const SlistNode* lhs,
const SlistNode* rhs,
const Ordering* ordering =
nullptr);
33 slist_clone(SlistNode*& outList, SlistNode** outTail,
const SlistNode* list,
bool owner =
true);
61 void slist_clear(SlistNode*& list, SlistNode** tail,
bool owner =
true);
88 const SlistNode*
slist_tail(
const SlistNode* list);
102 const Object*
object,
104 const Ordering* ordering =
nullptr);
123 const Ordering* ordering =
nullptr);
136 slist_removeNode(SlistNode*& list, SlistNode** tail, SlistNode* node, SlistNode* prev,
bool owner);
150 const Ordering* ordering =
nullptr);
167 const Ordering* ordering =
nullptr,
168 int* cmpRes =
nullptr,
169 SlistNode** prev =
nullptr);
185 const Ordering* ordering =
nullptr,
186 SlistNode** prev =
nullptr);
SlistNode * slist_findNode(SlistNode *list, const Object &key, bool sorted=false, const Ordering *ordering=nullptr, SlistNode **prev=nullptr)
Find the node whose object matches the given key.
bool slist_remove(SlistNode *&list, SlistNode **tail, const Object &key, bool owner=true, bool sorted=false, const Ordering *ordering=nullptr)
Remove the object matching the given key from the list.
Object * slist_find(SlistNode *list, const Object &key, bool sorted=false, const Ordering *ordering=nullptr)
Find the object matching the given key in the given list.
default representation (via getSerializeMode())
SlistNode * slist_findInsertionPoint(SlistNode *list, const Object &key, bool sorted=false, const Ordering *ordering=nullptr, int *cmpRes=nullptr, SlistNode **prev=nullptr)
Find the insertion point for the given key in the given list.
void slist_clear(SlistNode *&list, SlistNode **tail, bool owner=true)
Clear a list.
size_t slist_items(const SlistNode *list)
Count the number of items in a list.
void slist_clone(SlistNode *&outList, SlistNode **outTail, const SlistNode *list, bool owner=true)
Make a copy of a list.
void slist_removeNode(SlistNode *&list, SlistNode **tail, SlistNode *node, SlistNode *prev, bool owner)
Remove the given node from the given list.
void slist_add(SlistNode *&list, SlistNode **tail, const Object *object, bool sorted=false, const Ordering *ordering=nullptr)
Add an object to a list.
void slist_serialize(SlistNode *&list, SlistNode **tail, bool owner, Stream &stream, uint_t io, uint_t mode=ser_default)
Serialize a list.
unsigned int uint_t
Unsigned integer.
int slist_compare(const SlistNode *lhs, const SlistNode *rhs, const Ordering *ordering=nullptr)
Compare two lists.
SlistNode * slist_tail(SlistNode *list)
Determine the tail node.