#include <PdfPagesTreeCache.h>
This class implements a cache infront of a PdfPagesTree
- See also
- PdfCachedPagesTree
◆ PdfPagesTreeCache()
PoDoFo::PdfPagesTreeCache::PdfPagesTreeCache |
( |
int |
nInitialSize | ) |
|
Construct a new PdfCachedPagesTree.
- Parameters
-
nInitialSize | initial size of the pagestree |
◆ ~PdfPagesTreeCache()
PoDoFo::PdfPagesTreeCache::~PdfPagesTreeCache |
( |
| ) |
|
|
virtual |
Close/down destruct a PdfCachedPagesTree
◆ AddPageObject()
void PoDoFo::PdfPagesTreeCache::AddPageObject |
( |
int |
nIndex, |
|
|
PdfPage * |
pPage |
|
) |
| |
|
virtual |
Add a PdfPage object to the cache
- Parameters
-
nIndex | index of the page |
pPage | page object |
◆ AddPageObjects()
void PoDoFo::PdfPagesTreeCache::AddPageObjects |
( |
int |
nIndex, |
|
|
std::vector< PdfPage * > |
vecPages |
|
) |
| |
|
virtual |
Add several PdfPage objects to the cache, replacing any existing at the given index
- Parameters
-
nIndex | zero based index of where the first page will be placed |
vecPages | vector of the page objects to add |
◆ ClearCache()
void PoDoFo::PdfPagesTreeCache::ClearCache |
( |
| ) |
|
|
virtual |
Clear cache, i.e. remove all elements from the cache.
◆ DeletePage()
void PoDoFo::PdfPagesTreeCache::DeletePage |
( |
int |
nIndex | ) |
|
|
virtual |
Delete a PdfPage from the cache
- Parameters
-
◆ GetPage()
PdfPage * PoDoFo::PdfPagesTreeCache::GetPage |
( |
int |
nIndex | ) |
|
|
virtual |
Return a PdfPage for the specified Page index The returned page is owned by the pages tree and deleted along with it.
- Parameters
-
nIndex | page index, 0-based |
- Returns
- a pointer to the requested page or NULL if it is not cached
◆ InsertPage()
void PoDoFo::PdfPagesTreeCache::InsertPage |
( |
int |
nAfterPageIndex | ) |
|
|
virtual |
A page was inserted into the pagestree, therefore the cache has to be updated
- Parameters
-
nAfterPageIndex | zero based index of the page we are inserting after
- may be one of the special values from EPdfPageInsertionPoint.
|
◆ InsertPages()
void PoDoFo::PdfPagesTreeCache::InsertPages |
( |
int |
nAfterPageIndex, |
|
|
int |
nCount |
|
) |
| |
|
virtual |
Insert several pages into the pagestree, after the given index therefore the cache has to be updated
- Parameters
-
nAfterPageIndex | zero based index of the page we are inserting after
- may be one of the special values from EPdfPageInsertionPoint.
|
nCount | number of pages that were inserted |