Lib:Architecture/Base Layer/List Module
From GNUpdf
| Library Module | |
|---|---|
| List Module | |
| Layer | Base |
| API Documentation | Reference Manual |
| Source Files | src/base/pdf-list.h |
Contents |
Overview
This module provides an implementation of dynamic lists and vectors.
Basic operations
These operations are for unsorted lists and some of them have its sorted version. When dealing with sorted lists their sorted versions should be used. For more information see the GNU PDF Library Reference Manual
Creation and Destruction of Lists
Procedures to create a new empty list are defined. As well as procedures to destroy it, freeing all used resources (the elements of the list are disposed first).
Management of List Properties
Procedures to get list properties are defined, like the list size.
Search of List Elements
Procedures to search an element in a list are defined given it's value, node or position in the list. It's also possible to get the next or previous node given another one.
Setting and Getting the Value of List Elements
Procedures to get an element are defined given it's containing node or position. It's also possible to replace an element at a given position.
Adding and Removing List Elements
Procedures to add an element in a list are defined, at the beginning, final or a given position. Also it's possible to add an element after or before a given node.
Procedures to remove an element are also defined, given it's containing node, element or position.
Iterator operations
Procedures to create and destroy an iterator are defined given a list. They can be created to traverse a given position range (default is from first to last element).
Note: The list contents must not be modified while the iterator is in use, except for replacing or removing the last returned element.



