Waitable Class Referenceabstract

Interface for objects that can be waited on. More...

Inheritance diagram for Waitable:

## Public Member Functions

virtual unsigned int | GetMaxWaitObjectCount () const =0
| Maximum number of wait objects that this object can return. More...
virtual void | GetWaitObjects (WaitObjectContainer &container, CallStack const &callStack)=0
| Retrieves waitable objects. More...
bool | Wait (unsigned long milliseconds, CallStack const &callStack)
| Wait on this object. More...

## Detailed Description

Interface for objects that can be waited on.

Definition at line 1295 of file cryptlib.h.

## Member Function Documentation

## GetMaxWaitObjectCount()

virtual unsigned int Waitable::GetMaxWaitObjectCount | ( |  | ) | const

pure virtual

Maximum number of wait objects that this object can return.

Returns
  the maximum number of wait objects

Implemented in BufferedTransformation, Redirector, NetworkSink, SocketSender, NetworkSource, SocketReceiver, WindowsPipeSender, and WindowsPipeReceiver.

## GetWaitObjects()

virtual void Waitable::GetWaitObjects | ( | WaitObjectContainer & | container,
|  | CallStack const & | callStack
| ) |  |

pure virtual

Retrieves waitable objects.

Parameters

  container | the wait container to receive the references to the objects.
  callStack | CallStack object used to select waitable objects

GetWaitObjects is usually called in one of two ways. First, it can be called like `something.GetWaitObjects(c, CallStack("my func after X", 0));`. Second, if in an outer GetWaitObjects() method that itself takes a callStack parameter, it can be called like `innerThing.GetWaitObjects(c, CallStack("MyClass::GetWaitObjects at X", &callStack));`.

Implemented in BufferedTransformation, Redirector, NetworkSink, SocketSender, NetworkSource, SocketReceiver, WindowsPipeSender, and WindowsPipeReceiver.

## Wait()

bool Waitable::Wait | ( | unsigned long | milliseconds,
|  | CallStack const & | callStack
| ) |  |

Wait on this object.

Returns
  true if the wait succeeded, false otherwise

Wait() is the same as creating an empty container, calling GetWaitObjects(), and then calling Wait() on the container.

Definition at line 469 of file wait.cpp.

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

- cryptlib.h
- wait.cpp