| IGLib 1.4 The IGLib base library for development of numerical, technical and business applications.

- Main Page
- Namespaces
- Classes
- Files
- Directories

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Properties | Private Attributes

# IG::Lib::WaitConditionBase Class Reference

Base class for objects that perform waiting until a condition is fulfilled. More...

Inheritance diagram for IG::Lib::WaitConditionBase:
[legend]
Collaboration diagram for IG::Lib::WaitConditionBase:
[legend]

List of all members.

## Public Member Functions
abstract bool | Condition ()
| Returns true if unblocking condition is satisfied, and false otherwise.
virtual void | CancelOne ()
| Cancels the current waiting for the condition (if one is going on) and unblocks the thread on which waiting was called (possibly with some latency).
virtual void | CancelAll ()
| Cancel the current waiting for the condition on all threads.
abstract void | Wait ()
| Blocks until the specified condition gets satisfied. See class description for details.
## Properties
object | Lock`[get]`
| This object's central lock object to be used by other object. Do not use this object for locking in class' methods, for this you should use InternalLock.
object | InternalLock`[get]`
| Used internally for locking access to internal fields.
object | WaitLock`[get]`
| Must be used only for locking waiting the Waiting() block (since it is potentially time consuming).
virtual bool | IsWaiting`[get, set]`
| True if waiting for unblocking condition is currently performed, and false otherwise. Setting should only be done within the waiting function.
virtual bool | CancelFlag`[get, set]`
| If this flag is set then the current waiting (if one is going on) will be cancelled.
## Private Attributes
object | mainlock = new object()
object | internallock = new object()
object | waitlock = new object()
int | _numWaiting = 0
bool | _canceFlag = false

## Detailed Description

Base class for objects that perform waiting until a condition is fulfilled.

## Member Function Documentation

abstract bool IG::Lib::WaitConditionBase::Condition | ( |  | ) | `[pure virtual]`

Returns true if unblocking condition is satisfied, and false otherwise.

Implements IG::Lib::IWaitCondition.

Implemented in IG::Lib::WaitCondition, IG::Lib::WaitFileEventBase, IG::Lib::WaitFileCreation, IG::Lib::WaitFileRemoval, IG::Lib::WaitDirectoryCreation, IG::Lib::WaitDirectoryRemoval, IG::Lib::WaitFileEventBaseByProxyLatence, IG::Lib::WaitFileEventLatenceBase, IG::Lib::WaitFileCreationLatence, IG::Lib::WaitFileRemovalLatence, IG::Lib::WaitDirectoryCreationLatence, and IG::Lib::WaitDirectoryRemovalLatence.

virtual void IG::Lib::WaitConditionBase::CancelOne | ( |  | ) | `[inline, virtual]`

Cancels the current waiting for the condition (if one is going on) and unblocks the thread on which waiting was called (possibly with some latency).

Implements IG::Lib::IWaitCondition.

Reimplemented in IG::Lib::WaitFileEventBase, and IG::Lib::WaitFileEventBaseByProxyLatence.

virtual void IG::Lib::WaitConditionBase::CancelAll | ( |  | ) | `[inline, virtual]`

Cancel the current waiting for the condition on all threads.

Implements IG::Lib::IWaitCondition.

Reimplemented in IG::Lib::WaitFileEventBase.

abstract void IG::Lib::WaitConditionBase::Wait | ( |  | ) | `[pure virtual]`

Blocks until the specified condition gets satisfied. See class description for details.

This method will normally not be overridden, except with intention to change the condition check time plan. When overriding, use the original method as template.

Implements IG::Lib::IWaitCondition.

Implemented in IG::Lib::WaitCondition, IG::Lib::WaitFileEventBase, IG::Lib::WaitFileCreation, IG::Lib::WaitFileRemoval, IG::Lib::WaitDirectoryCreation, IG::Lib::WaitDirectoryRemoval, and IG::Lib::WaitFileEventBaseByProxyLatence.

## Member Data Documentation

object IG::Lib::WaitConditionBase::mainlock = new object()`[private]`

object IG::Lib::WaitConditionBase::internallock = new object()`[private]`

object IG::Lib::WaitConditionBase::waitlock = new object()`[private]`

int IG::Lib::WaitConditionBase::_numWaiting = 0`[private]`

bool IG::Lib::WaitConditionBase::_canceFlag = false`[private]`

## Property Documentation

object IG::Lib::WaitConditionBase::Lock`[get]`

This object's central lock object to be used by other object. Do not use this object for locking in class' methods, for this you should use InternalLock.

Implements IG::Lib::ILockable.

object IG::Lib::WaitConditionBase::InternalLock`[get, protected]`

Used internally for locking access to internal fields.

object IG::Lib::WaitConditionBase::WaitLock`[get, protected]`

Must be used only for locking waiting the Waiting() block (since it is potentially time consuming).

virtual bool IG::Lib::WaitConditionBase::IsWaiting`[get, set]`

True if waiting for unblocking condition is currently performed, and false otherwise. Setting should only be done within the waiting function.

Implements IG::Lib::IWaitCondition.

Reimplemented in IG::Lib::WaitFileEventBaseByProxyLatence.

virtual bool IG::Lib::WaitConditionBase::CancelFlag`[get, set, protected]`

If this flag is set then the current waiting (if one is going on) will be cancelled.

Reimplemented in IG::Lib::WaitFileEventBaseByProxyLatence.

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

- WaitCondition.cs

All Classes Namespaces Files Functions Variables Enumerations Properties Events