#include <objectstorage.h>
Public Types | |
| typedef Mapping::iterator | Iterator |
| typedef Mapping::const_iterator | ConstIterator |
Public Member Functions | |
| ObjectStorage () | |
| void | clear () |
| V | put (K key, V value) |
| V | get (K &key) const |
| bool | contains (K &key) const |
| V | remove (K key) |
| size_t | size () const |
| Iterator | begin () |
| ConstIterator | begin () const |
| Iterator | end () |
| ConstIterator | end () const |
Private Types | |
| typedef std::map< K, V, Comp > | Mapping |
| typedef Mapping::value_type | Association |
Private Attributes | |
| Mapping | mapping |
typedef Mapping::value_type ObjectStorage< K, V, Comp >::Association [private] |
| typedef Mapping::const_iterator ObjectStorage< K, V, Comp >::ConstIterator |
Constant iterator type.
| typedef Mapping::iterator ObjectStorage< K, V, Comp >::Iterator |
Iterator type.
typedef std::map<K, V, Comp> ObjectStorage< K, V, Comp >::Mapping [private] |
| ObjectStorage< K, V, Comp >::ObjectStorage | ( | ) | [inline] |
Empty constructor.
| ConstIterator ObjectStorage< K, V, Comp >::begin | ( | ) | const [inline] |
Returns const iterator to first element.
| Iterator ObjectStorage< K, V, Comp >::begin | ( | ) | [inline] |
Returns iterator to first element.
Referenced by pdfobjects::CXref::cleanUp(), pdfobjects::CXref::getNumObjects(), and pdfobjects::XRefWriter::saveChanges().
| void ObjectStorage< K, V, Comp >::clear | ( | ) | [inline] |
| bool ObjectStorage< K, V, Comp >::contains | ( | K & | key | ) | const [inline] |
Checks of given key is in the storage.
| key | Key object. |
Referenced by pdfobjects::CXref::changeObject(), and pdfobjects::CXref::reserveRef().
| ConstIterator ObjectStorage< K, V, Comp >::end | ( | ) | const [inline] |
Returns const iterator to end iterator.
| Iterator ObjectStorage< K, V, Comp >::end | ( | ) | [inline] |
Returns iterator to end iterator.
Referenced by pdfobjects::CXref::cleanUp(), pdfobjects::CXref::getNumObjects(), and pdfobjects::XRefWriter::saveChanges().
| V ObjectStorage< K, V, Comp >::get | ( | K & | key | ) | const [inline] |
Finds value with the key.
| key | Key of the value. |
Gets value associated with the key.
Referenced by pdfobjects::CXref::changeObject(), pdfobjects::CXref::fetch(), and pdfobjects::CXref::knowsRef().
| V ObjectStorage< K, V, Comp >::put | ( | K | key, | |
| V | value | |||
| ) | [inline] |
Add/change mapping.
| key | Key of the mapping. | |
| value | Value of the mapping (must be non null). |
If the key is not in the mapping yet, associates it with the value and puts to the mapping. Otherwise update value of the previous mapping.
This method doesn't invalidate existing (if any) iterator pointing to the association.
Referenced by pdfobjects::CXref::changeObject(), and pdfobjects::CXref::reserveRef().
| V ObjectStorage< K, V, Comp >::remove | ( | K | key | ) | [inline] |
Removes association.
| key | Key of the value. |
Gets value of the key and removes association from mapping.
This method doesn't invalidate interators, except one which points to the removed element.
| size_t ObjectStorage< K, V, Comp >::size | ( | ) | const [inline] |
Number of elements.
Referenced by pdfobjects::CXref::cleanUp(), and pdfobjects::XRefWriter::saveChanges().
Mapping ObjectStorage< K, V, Comp >::mapping [private] |
Referenced by ObjectStorage< const ::Ref, ObjectEntry *, xpdf::RefComparator >::begin(), ObjectStorage< const ::Ref, ObjectEntry *, xpdf::RefComparator >::clear(), ObjectStorage< const ::Ref, ObjectEntry *, xpdf::RefComparator >::contains(), ObjectStorage< const ::Ref, ObjectEntry *, xpdf::RefComparator >::end(), ObjectStorage< const ::Ref, ObjectEntry *, xpdf::RefComparator >::get(), ObjectStorage< const ::Ref, ObjectEntry *, xpdf::RefComparator >::put(), ObjectStorage< const ::Ref, ObjectEntry *, xpdf::RefComparator >::remove(), and ObjectStorage< const ::Ref, ObjectEntry *, xpdf::RefComparator >::size().