[OPUS]

Null_lock - A non-functional lock object for a lockable resource that requires no locking.


Availability:

This class is available for the OPUS Blackboard API. The initial OPUS 2.0 release is described here

Constructors:
Null_lock( )
~Null_lock( )

Methods:
lock( ) a no-op
release( ) a no-op
operator==( ) compare ID's

Description

Null_lock objects are associated with resources that require no locking mechanism, but that are expected to be lockable. The lock and release methods always succeed, but actually do nothing.

Derived from

Opus_lock

See Also:


Null_lock::Null_lock - The Null_lock object constructor.

Synopsis


Null_lock::Null_lock(const int i) : id(i)

Description

The constructor sets the lock ID for the object.

Exceptions Thrown

none


Null_lock::~Null_lock - The Null_lock object destructor.

Synopsis


Null_lock::~Null_lock()

Description

This method destroys the object.

Exceptions Thrown

none


Null_lock::lock - Attempt to lock the resource.

Synopsis


void Null_lock::lock()

Description

For these objects, this operation does nothing.

Exceptions Thrown

none


Null_lock::release - Release the lock on the resource.

Synopsis


void Null_lock::release()

Description

For these objects, this operation does nothing.

Exceptions Thrown

none


Null_lock::operator== - Compare the Null_lock object with another.

Synopsis


bool Null_lock::operator==(
                           const Opus_lock* ol) // I - lock to compare to
                           const

Description

This operator compares the object with the Null_lock object argument. Two Null_lock objects are equal if the ID's are identical.

***Note that a pointer (not a reference) to the object with which the comparison is to be made is required.

Returns

    true  - if the locks are identical

false - if the locks are not identical

Exceptions Thrown

none


OPUS API index · STScI Home Page · Search · Topics · Index

Copyright © 1997-2000 The Association of Universities for Research in Astronomy, Inc. All Rights Reserved.


For more information, contact opushelp@stsci.edu

Last modified: 25 April 2000