5 #include <libutl/ListNode.h> 18 int list_compare(
const ListNode* lhs,
const ListNode* rhs,
const Ordering* ordering =
nullptr);
29 void list_clone(ListNode*& outList, ListNode** outTail,
const ListNode* list,
bool owner =
true);
57 void list_clear(ListNode*& list, ListNode** tail,
bool owner =
true);
84 const ListNode*
list_tail(
const ListNode* list);
100 const Ordering* ordering =
nullptr);
119 const Ordering* ordering =
nullptr);
130 void list_removeNode(ListNode*& list, ListNode** tail, ListNode* node,
bool owner);
144 const Ordering* ordering =
nullptr);
160 const Ordering* ordering =
nullptr,
161 int* cmpRes =
nullptr);
176 const Ordering* ordering =
nullptr);
void list_clone(ListNode *&outList, ListNode **outTail, const ListNode *list, bool owner=true)
Make a copy of a list.
Object * list_find(ListNode *list, const Object &key, bool sorted=false, const Ordering *ordering=nullptr)
Find the object matching the given key in the given list.
void list_clear(ListNode *&list, ListNode **tail, bool owner=true)
Clear a list.
default representation (via getSerializeMode())
int list_compare(const ListNode *lhs, const ListNode *rhs, const Ordering *ordering=nullptr)
Compare two lists.
void list_serialize(ListNode *&list, ListNode **tail, bool owner, Stream &stream, uint_t io, uint_t mode=ser_default)
Serialize a list.
ListNode * list_findNode(ListNode *list, const Object &key, bool sorted=false, const Ordering *ordering=nullptr)
Find the node whose object matches the given key.
size_t list_items(const ListNode *list)
Count the number of items in a list.
unsigned int uint_t
Unsigned integer.
ListNode * list_findInsertionPoint(ListNode *list, const Object &key, bool sorted=false, const Ordering *ordering=nullptr, int *cmpRes=nullptr)
Find the insertion point for the given key in the given list.
void list_removeNode(ListNode *&list, ListNode **tail, ListNode *node, bool owner)
Remove the given node from the given list.
ListNode * list_tail(ListNode *list)
Determine the tail node.
void list_add(ListNode *&list, ListNode **tail, const Object *object, bool sorted=false, const Ordering *ordering=nullptr)
Add an object to a list.
bool list_remove(ListNode *&list, ListNode **tail, const Object &key, bool owner=true, bool sorted=false, const Ordering *ordering=nullptr)
Remove the object matching the given key from the list.