nux-1.14.0
nux::NScopeLock Class Reference

Scope Lock class. More...

#include <NuxCore/ThreadGNU.h>

List of all members.

Public Member Functions

 NScopeLock (NCriticalSection *CriticalSectionObject)
 The constructor locks the critical section object.
 ~NScopeLock (void)

Detailed Description

Scope Lock class.

Takes a critical section object as parameter of the constructor. The constructor locks the critical section. The destructor unlocks the critical section.

Definition at line 126 of file ThreadGNU.h.


Constructor & Destructor Documentation

nux::NScopeLock::NScopeLock ( NCriticalSection CriticalSectionObject) [inline]

The constructor locks the critical section object.

The constructor locks the critical section object.

Parameters:
LockObjectCritical section object.

Definition at line 134 of file ThreadGNU.h.

References nux::NCriticalSection::Lock().

      : m_CriticalSectionObject (CriticalSectionObject)
    {
      nuxAssert (m_CriticalSectionObject);
      m_CriticalSectionObject->Lock();
    }
nux::NScopeLock::~NScopeLock ( void  ) [inline]

The destructor unlocks the critical section object.

Definition at line 145 of file ThreadGNU.h.

References nux::NCriticalSection::Unlock().

    {
      nuxAssert (m_CriticalSectionObject);
      m_CriticalSectionObject->Unlock();
    }

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends