Regina Calculation Engine
|
An object that temporarily blocks listeners from being notified of packet change events. More...
#include <npacket.h>
Public Member Functions | |
ChangeEventBlock (NPacket *packetToBlock, bool fireOnDestruction=true) | |
Creates a new change event block for the given packet. | |
~ChangeEventBlock () | |
Destructor that removes the single change event block that was created by this object. |
An object that temporarily blocks listeners from being notified of packet change events.
As long as this object is in existence, listeners will not be notified of any changes to this packet.
It can sometimes be useful to temporarily block change events during large modifications that are likely to generate change events at inopportune times during processing.
Note that change event blocks are cumulative, i.e., if several blocks are created then all of these blocks must be destroyed before listeners will be notified of change events again.
regina::NPacket::ChangeEventBlock::ChangeEventBlock | ( | NPacket * | packetToBlock, |
bool | fireOnDestruction = true |
||
) | [inline] |
Creates a new change event block for the given packet.
As a convenience, passing true
as the parameter fireOnDestruction will cause a change event to be fired for the given packet when this block is destroyed. Note that this change event will still have no effect if other change event blocks remain active.
packetToBlock | the packet for which change events will be blocked. |
fireOnDestruction | true if a change event should be fired for the given packet when this block is destroyed. |
regina::NPacket::ChangeEventBlock::~ChangeEventBlock | ( | ) | [inline] |
Destructor that removes the single change event block that was created by this object.
In addition, a change event will be fired if it was requested upon construction.