pdfobjects::CPageAnnots::ArrayWatchDog Class Reference

Inheritance diagram for pdfobjects::CPageAnnots::ArrayWatchDog:
observer::IObserver< IProperty >

List of all members.

Public Types

typedef
observer::BasicChangeContext
< IProperty
BasicObserverContext

Public Member Functions

 ArrayWatchDog (CPageAnnots *annots)
virtual ~ArrayWatchDog () throw ()
virtual void notify (boost::shared_ptr< IProperty > newValue, boost::shared_ptr< const IProperty::ObserverContext > context) const throw ()
virtual priority_t getPriority () const throw ()

Private Attributes

CPageAnnots_annots

Detailed Description

Observer for Annots array synchronization. This observer is registered on Annots array property and all its reference typed elements. It handles change in Annots array content - this means either element is added, removed or replaced, or any of its reference elements changes its value.


Member Typedef Documentation


Constructor & Destructor Documentation

pdfobjects::CPageAnnots::ArrayWatchDog::ArrayWatchDog ( CPageAnnots annots  )  [inline]

Initialization constructor. Sets page field according parameter.

Parameters:
_page CPage instance.

References _annots.

virtual pdfobjects::CPageAnnots::ArrayWatchDog::~ArrayWatchDog (  )  throw () [inline, virtual]

Empty destructor.


Member Function Documentation

virtual priority_t pdfobjects::CPageAnnots::ArrayWatchDog::getPriority (  )  const throw () [inline, virtual]

Returns observer priority.

Implements observer::IObserver< IProperty >.

void pdfobjects::CPageAnnots::ArrayWatchDog::notify ( boost::shared_ptr< IProperty newValue,
boost::shared_ptr< const IProperty::ObserverContext context 
) const throw () [virtual]

Observer handler.

Checks given context type:

  • BasicObserverContext means that Annots array reference element has changed its value.
  • ComplexChangeContext means that Annots array content has changed. If original value is reference, then unregisters this obsever from it. If newValue is reference registers this observer to it.
  • Different context is not supported and so method immediatelly returns.

In both situations calls consolidateAnnotsStorage with original and new value parameters.

Parameters:
newValue New value of changed property.
context Context of the change.

References observer::BasicChangeContextType, observer::ComplexChangeContextType, debug::DBG_DBG, debug::DBG_INFO, debug::DBG_WARN, pdfobjects::isRef(), kernelPrintDbg, REGISTER_SHAREDPTR_OBSERVER, and UNREGISTER_SHAREDPTR_OBSERVER.


Member Data Documentation

Page owner of this observer.

Referenced by ArrayWatchDog().


The documentation for this class was generated from the following files: