#include <cpdf.h>
Public Member Functions | |
| PageTreeRootObserver (CPdf *_pdf) | |
| virtual | ~PageTreeRootObserver () throw () |
| virtual void | notify (boost::shared_ptr< IProperty > newValue, boost::shared_ptr< const observer::IChangeContext< IProperty > > context) const throw () |
| virtual observer::IObserver < IProperty >::priority_t | getPriority () const throw () |
Private Attributes | |
| CPdf * | |
Observer for page tree root synchronization.
This observer is registered on Document catalog and if Pages property is reference (as it should be) also to this reference property. Whenever document catalog is changed and this change is done either in Pages property or directly in reference value, notify method will handle this situation and synchronize pdf internal structures with new state.
| pdfobjects::CPdf::PageTreeRootObserver::PageTreeRootObserver | ( | CPdf * | _pdf | ) | [inline] |
| virtual pdfobjects::CPdf::PageTreeRootObserver::~PageTreeRootObserver | ( | ) | throw () [inline, virtual] |
Empty destructor.
| virtual observer::IObserver<IProperty>::priority_t pdfobjects::CPdf::PageTreeRootObserver::getPriority | ( | ) | const throw () [inline, virtual] |
Reurns observer priority.
Implements observer::IObserver< IProperty >.
| void pdfobjects::CPdf::PageTreeRootObserver::notify | ( | boost::shared_ptr< IProperty > | newValue, | |
| boost::shared_ptr< const observer::IChangeContext< IProperty > > | context | |||
| ) | const throw () [virtual] |
Observer handler.
| newValue | New value of changed property. | |
| context | Context of the change. |
This observer handles change in page tree root which is represented by Pages property of Document catalog dictionary.
Handling depends on given context type:
In any case:
References observer::BasicChangeContextType, observer::ComplexChangeContextType, debug::DBG_DBG, debug::DBG_ERR, debug::DBG_WARN, observer::IObserver< IProperty >::isActive(), pdfobjects::isDict(), pdfobjects::isRef(), kernelPrintDbg, REGISTER_SHAREDPTR_OBSERVER, and UNREGISTER_SHAREDPTR_OBSERVER.
CPdf* pdfobjects::CPdf::PageTreeRootObserver::pdf [private] |
Pdf instance. This instance is used as page tree holder, so watch dog uses it to handle changes.