class documentation
class TitlePointerList(OrderedPointerList):
Known subclasses: pyzim.pointerlist.OnDiskTitlePointerList
Constructor: TitlePointerList(pointers, key_func)
A pointer list used by the ZIM title listings.
Unlike other pointer lists, these pointers do not refer to offsets but to entry IDs.
| Constant | POINTER |
Undocumented |
Inherited from OrderedPointerList:
| Class Method | from |
Load a pointer list from the provided bytestring |
| Class Method | from |
Load a pointer list from a file. |
| Class Method | from |
Load a pointer list from an entry inside a ZIM archive. |
| Class Method | from |
Load a pointer list from a ZIM file at the specified offset. |
| Class Method | new |
Instantiate a new, empty pointerlist. |
| Method | __init__ |
The default constructor. |
| Method | add |
Add a key/pointer pair to this pointer list. |
| Method | check |
Check that this list is actually ordered correctly. |
| Method | find |
Return the index of the first value greater or equal to the key. |
| Method | get |
Return the pointer for the specified key. |
| Method | get |
Return the index of the pointer for the specified key. |
| Method | has |
Check if this pointer list has a pointer matching the key. |
| Method | iter |
Iterate over all values referenced by the pointers in this pointer list. |
| Method | print |
Print the content of this pointerlist, including the keys. |
| Method | remove |
Remove a pointer from this pointer list. |
| Instance Variable | _keyf |
a function that returns the bytestring by which this pointer list is sorted |
Inherited from SimplePointerList (via OrderedPointerList):
| Method | __getitem__ |
Get the pointer at the specified index. |
| Method | __len__ |
The length of this pointer list. |
| Method | append |
Append a pointer to the end of pointerlist. |
| Method | get |
Return the pointer for the specified index. |
| Method | get |
Return the index of pointer in this list. |
| Method | get |
Calculate the size of this object when written to a file. |
| Method | iter |
Iterate over all pointers in this pointer list. |
| Method | mass |
Perform a mass update on all pointers in the specified range, changing their value as specified. |
| Method | remove |
Remove the pointer at the specified index. |
| Method | set |
Set the pointer at the specified index. |
| Method | to |
Dump this pointer list into a bytestring and return it. |
| Instance Variable | _lock |
Undocumented |
| Instance Variable | _pointers |
list of pointers in this pointer list |
Inherited from ModifiableMixIn (via OrderedPointerList, SimplePointerList):
| Method | add |
Add another modifiable object as a child of this one. |
| Method | after |
This method should be called after this object has been read and/or flushed to disk. In other words, it should be called at least once whenever this object matches the state of the object on the disk. |
| Method | dirty |
Setter for ModifiableMixIn.dirty |
| Method | ensure |
If this object is non-mutable, raise an Exception. |
| Method | get |
Return the size of this object on disk as it has been read. |
| Method | get |
Return the size of this object when written to a file before any modifications has been made since the last read/flush. |
| Method | mark |
Convenience function to mark this object as dirty. |
| Method | remove |
Remove a submodifiable from this object. |
| Instance Variable | dirty |
True if this object or a sub-modifiable has been modified. |
| Instance Variable | mutable |
if not nonzero, prevent modifications of this object. |
| Instance Variable | _dirty |
a boolean flag that's nonzero if this object has been modified |
| Instance Variable | _old |
the size of this object on disk before any modifications since the last flush/read |
| Instance Variable | _submodifiables |
a list of child objects, whose dirty state will affect this objects dirty state. |