Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::svg::SVGElement::ScopedMutation< InvalidateCallback > Class Template Reference

Scoped mutation helper that runs cleanup before committing the mutation revision. More...

#include "donner/svg/SVGElement.h"

Public Member Functions

 ScopedMutation (const ElementAnchor &handle, InvalidateCallback invalidateOnScopeExit)
 Begin a mutation batch and retain the cleanup callback for scope exit.
 ScopedMutation (const ScopedMutation &other)=delete
 ScopedMutation (ScopedMutation &&other)=delete
ScopedMutationoperator= (const ScopedMutation &other)=delete
ScopedMutationoperator= (ScopedMutation &&other)=delete
DocumentWriteAccessaccess ()
 Get the active write access for this mutation.

Detailed Description

template<typename InvalidateCallback>
class donner::svg::SVGElement::ScopedMutation< InvalidateCallback >

Scoped mutation helper that runs cleanup before committing the mutation revision.

This is intended for element setters that need to invalidate cached computed state after the raw SVG attribute component is changed. The callback runs while the write access from the mutation batch is still active, and before the coalesced mutation revision is committed.

Constructor & Destructor Documentation

◆ ScopedMutation()

template<typename InvalidateCallback>
donner::svg::SVGElement::ScopedMutation< InvalidateCallback >::ScopedMutation ( const ElementAnchor & handle,
InvalidateCallback invalidateOnScopeExit )
inline

Begin a mutation batch and retain the cleanup callback for scope exit.

Parameters
handleElement anchor whose document owns the mutation batch.
invalidateOnScopeExitCleanup invoked before the batch commits its revision.

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