regina::NPacket::ChangeEventBlock Class Reference

An object that temporarily blocks listeners from being notified of packet change events. More...

#include <npacket.h>

Inheritance diagram for regina::NPacket::ChangeEventBlock:

regina::boost::noncopyable

List of all members.

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.


Detailed Description

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.


Constructor & Destructor Documentation

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.

Parameters:
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.


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

Copyright © 1999-2009, Ben Burton
This software is released under the GNU General Public License.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@debian.org).