#include <cpdf.h>
Public Member Functions | |
| PageTreeKidsObserver (CPdf *_pdf) | |
| virtual | ~PageTreeKidsObserver () 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 node kids array synchronization.
This observer is registered on Kids array and all referecence elementes from this array. Change notified to this observer is allways page tree node insertion, delete or replacement.
Note that this observer is used for Kids array content or member value change, not for whole Kids array property change (like
| pdfobjects::CPdf::PageTreeKidsObserver::PageTreeKidsObserver | ( | CPdf * | _pdf | ) | [inline] |
| virtual pdfobjects::CPdf::PageTreeKidsObserver::~PageTreeKidsObserver | ( | ) | throw () [inline, virtual] |
Empty destructor.
| virtual observer::IObserver<IProperty>::priority_t pdfobjects::CPdf::PageTreeKidsObserver::getPriority | ( | ) | const throw () [inline, virtual] |
Reurns observer priority.
Implements observer::IObserver< IProperty >.
| void pdfobjects::CPdf::PageTreeKidsObserver::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. |
Checks given context type and if it is ComplexChangeContextType then Kids array has changed. If oldValue is reference property, unregisters this observer from property and if newValue is reference registers this observer property.
If given context is BasicChangeContext, Kids array reference element has changed its value.
In any case:
References observer::BasicChangeContextType, observer::ComplexChangeContextType, debug::DBG_CRIT, debug::DBG_DBG, debug::DBG_ERR, debug::DBG_WARN, observer::IObserver< IProperty >::isActive(), pdfobjects::isRef(), kernelPrintDbg, pdfobjects::pDict, pdfobjects::pNull, pdfobjects::pRef, REGISTER_SHAREDPTR_OBSERVER, and UNREGISTER_SHAREDPTR_OBSERVER.
CPdf* pdfobjects::CPdf::PageTreeKidsObserver::pdf [private] |
Pdf instance. This instance is used as page tree holder, so watch dog uses it to handle changes.