PoDoFo  0.9.1
Public Member Functions | List of all members
PoDoFo::PdfPagesTreeCache Class Reference

#include <PdfPagesTreeCache.h>

Public Member Functions

 PdfPagesTreeCache (int nInitialSize)
 
virtual ~PdfPagesTreeCache ()
 
virtual PdfPageGetPage (int nIndex)
 
virtual void AddPageObject (int nIndex, PdfPage *pPage)
 
virtual void InsertPage (int nIndex)
 
virtual void DeletePage (int nIndex)
 
virtual void ClearCache ()
 

Detailed Description

This class implements a cache infront of a PdfPagesTree

See also
PdfCachedPagesTree

Constructor & Destructor Documentation

§ PdfPagesTreeCache()

PoDoFo::PdfPagesTreeCache::PdfPagesTreeCache ( int  nInitialSize)

Construct a new PdfCachedPagesTree.

Parameters
nInitialSizeinitial size of the pagestree

§ ~PdfPagesTreeCache()

PoDoFo::PdfPagesTreeCache::~PdfPagesTreeCache ( )
virtual

Close/down destruct a PdfCachedPagesTree

Member Function Documentation

§ AddPageObject()

void PoDoFo::PdfPagesTreeCache::AddPageObject ( int  nIndex,
PdfPage pPage 
)
virtual

Add a PdfPage object to the cache

Parameters
nIndexindex of the page
pPagepage object

§ 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
nIndexindex of the page

§ 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
nIndexpage index, 0-based
Returns
a pointer to the requested page or NULL if it is not cached

§ InsertPage()

void PoDoFo::PdfPagesTreeCache::InsertPage ( int  nIndex)
virtual

A page was inserted into the pagestree, therefore the cache has to be updated

Parameters
nIndexindex where the page was inserted