This is a PCondMutex for which the conditional is the value of an integer
Inheritance:
Public Methods
| Overrides from class PObject
|
| Condition access functions
|
Public Members
| Construction
|
Public Methods
-
virtual void WaitCondition()
-
virtual void Signal()
-
virtual BOOL Condition()
-
virtual void OnWait()
Inherited from PMutex:
Public Methods
-
Operations
Inherited from PObject:
Public Methods
-
Run Time Type functions
-
I/O functions
Public Members
-
Comparison functions
Documentation
This is a PCondMutex for which the conditional is the value of an integer
Construction
enum Operation
- defines possible operators on current value and target value
LT
- Less than
LE
- Less than or equal to
EQ
- Equal to
GE
- Greater than or equal to
GT
- Greater than
PIntCondMutex( int value = 0, int target = 0, Operation operation = LE )
-
Create a cond mutex using an integer
- Parameters:
- - value initial value if the integer
target - target vaue which causes the mutex to unlock
operation - comparison operator
Overrides from class PObject
void PrintOn(ostream & strm) const
- Print the object on the stream. This will be of the form
"(value < target)".
Condition access functions
virtual BOOL Condition()
- This is the condition that must be met for the WaitCondition() function
to acquire the mutex.
- Returns:
- TRUE if condition is met.
operator int() const
- Get the current value of the condition variable.
- Returns:
- Current condition variable value.
PIntCondMutex& operator=(int newval)
- Assign new condition value.
Use the Wait() function to acquire the mutex, modify the value, then
release the mutex, possibly releasing the thread in the WaitCondition()
function if the condition was met by the operation.
- Returns:
- The object reference for consecutive operations in the same statement.
PIntCondMutex& operator++()
- Increment condition value.
Use the Wait() function to acquire the mutex, modify the value, then
release the mutex, possibly releasing the thread in the WaitCondition()
function if the condition was met by the operation.
- Returns:
- The object reference for consecutive operations in the same statement.
PIntCondMutex& operator+=(int inc)
- Add to condition value.
Use the Wait() function to acquire the mutex, modify the value, then
release the mutex, possibly releasing the thread in the WaitCondition()
function if the condition was met by the operation.
- Returns:
- The object reference for consecutive operations in the same statement.
PIntCondMutex& operator--()
- Decrement condition value.
Use the Wait() function to acquire the mutex, modify the value, then
release the mutex, possibly releasing the thread in the WaitCondition()
function if the condition was met by the operation.
- Returns:
- The object reference for consecutive operations in the same statement.
PIntCondMutex& operator-=(int dec)
- Subtract from condition value.
Use the Wait() function to acquire the mutex, modify the value, then
release the mutex, possibly releasing the thread in the WaitCondition()
function if the condition was met by the operation.
- Returns:
- The object reference for consecutive operations in the same statement.
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.