This is the documentation for Enlighten.

class Geo GeoScopedCSection

class Geo::GeoScopedCSection

A simple utility for aquiring a lock for the duration of a function.

Allocate a GeoCriticalSection object in advance then create one of these on the stack to manage the lock/unlock sequence.

Functions

Name Description
~GeoScopedCSection()

Unlock the critical section given at construction.

GeoScopedCSection(GeoCriticalSection &)

Lock the specified critical section for the duration of this object.


Geo::GeoScopedCSection::~GeoScopedCSection


public: ~GeoScopedCSection()


Unlock the critical section given at construction.


Geo::GeoScopedCSection::GeoScopedCSection


public: GeoScopedCSection
(
    GeoCriticalSection & criticalSection
)


Lock the specified critical section for the duration of this object.

It will be unlocked when this object is destructed. The critical section object must remain in scope for the lifetime of this object.