Name

SynchronizedObject::ExclusiveZone

Description

The class ExclusiveZone (see Figure C-14) is a nested class belonging to SynchronizedObject. It locks a SynchronizationObject (mutex) upon construction and unlocks it upon destruction, thus providing protection during the scope of its existence.

ExclusiveZone belongs to the namespace CppUnit. It is declared and implemented in SynchronizedObject.h.

The nested class SynchronizedObject::ExclusiveZone
Figure C-14. The nested class SynchronizedObject::ExclusiveZone

Declaration

class ExclusiveZone

Constructors/Destructors

ExclusiveZone(SynchronizationObject *syncObject)

Constructs ExclusiveZone and locks syncObject.

~ExclusiveZone( )

Destroys ExclusiveZone and unlocks syncObject.

Public Methods

None.

Protected/Private Methods

None.

Attributes

SynchronizationObject *m_syncObject

A pointer to the SynchronizationObject for this ExclusiveZone (public).

Get Unit Test Frameworks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.