Main Page | Class Hierarchy | Class List | File List | Class Members

RIPCEvent Class Reference

#include <RIPCEvent.h>

Inheritance diagram for RIPCEvent:

RIPCPrimitive List of all members.

Public Types

enum  RIPCPrimitiveType {
  RIPC_MUTEX, RIPC_EVENT, RIPC_SEMAPHORE, RIPC_BARRIER,
  RIPC_LOCK, RIPC_SHARED_MEMORY, RIPC_QUEUE
}
enum  RIPCRanks { DEFAULT_RANK = 0 }

Public Member Functions

virtual void signal ()=0
virtual void pulse ()=0
RIPCPrimitiveType getType ()
char const * getTypeName ()
virtual char const * getName ()=0
virtual bool alreadyExists ()=0
void waitFor ()
bool waitFor (unsigned timeout)
virtual void priorityWait (int rank)=0
virtual bool priorityWait (int rank, unsigned timeout)=0
virtual void reset ()=0
virtual void close ()=0
virtual void * allocate (size_t size)
virtual void deallocate (void *obj, size_t size=0)

Static Public Member Functions

void deallocator (RIPCObject const &objDesc)

Detailed Description

Event synchronization object. It provides the same functionality as event object in Win32. Event can be either with manual reset or with automatic reset. In first case evet remains in signaled state until been explcitely reset by user. Evet with automatic reset is switched to non-signled state after first wait request.

Semantic of methods inherited from RIPCPrimitive:

waitFor
Wait until event is set to signaled state. If event is already in signaled state then method immediatly returns and event with automatic reset is switched to non-signaled state
reset
Switch event to non-signaled state


Member Enumeration Documentation

enum RIPCPrimitive::RIPCPrimitiveType [inherited]
 

Primitive types


Member Function Documentation

virtual void* RIPCPrimitive::allocate size_t  size  )  [virtual, inherited]
 

Method for allocation memory for container elements (currently queue and shared memory). This method can be overriden by derived class* to provide custom allocation policy.

virtual bool RIPCPrimitive::alreadyExists  )  [pure virtual, inherited]
 

Primitive returned by createXXX method already exists This method should be call immediatly after createXXX to check if new primitive was created or existed one was returned.

Returns:
true if createXXX method doesn't create new primitive

virtual void RIPCPrimitive::close  )  [pure virtual, inherited]
 

Close primitive. This method decrease access counter of the primitive and once it becomes zero, primitive is destroyed.

virtual void RIPCPrimitive::deallocate void *  obj,
size_t  size = 0
[virtual, inherited]
 

Method for deallocation memory for container elements (currently queue and shared memory). This method can be overriden by derived class to provide custom allocation policy.

virtual char const* RIPCPrimitive::getName  )  [pure virtual, inherited]
 

Get primitive name. Name of the primitive is unique with primitives of the same type (events, semaphores,...). It is possible that, for example, event and mutex has the same name.

Returns:
primitive name

RIPCPrimitiveType RIPCEvent::getType  )  [inline, virtual]
 

Get RIPC primitive type

Returns:
one of the constants from RIPCPrimitiveType enum

Implements RIPCPrimitive.

char const* RIPCPrimitive::getTypeName  )  [inherited]
 

Get RIPC primitive type name

Returns:
name of primitive type

virtual bool RIPCPrimitive::priorityWait int  rank,
unsigned  timeout
[pure virtual, inherited]
 

Priority wait until state of primitive is switched with timeout. Requests with the lowest rank value will be satisfied first. Semantic of this method depends on particular primitive type and is explained in specification of each primitive.

Parameters:
rank processes will be placed in wait queue in the order of increasing rank value and in the same order will be taken from the queue.
timeout operation timeout in millisoconds
Returns:
false if timeout is expired before primitive state is changed

virtual void RIPCPrimitive::priorityWait int  rank  )  [pure virtual, inherited]
 

Priority wait until state of primitive is switched. Requests with the lowest rank value will be satisfied first. Semantic of this method depends on particular primitive type and is explained in specification of each primitive.

Parameters:
rank processes will be placed in wait queue in the order of increasing rank value and in the same order will be taken from the queue.

virtual void RIPCEvent::pulse  )  [pure virtual]
 

Wakeup one or all waiting sessions.

  • For event with manual reset policy, this method wakes up all waiting sessions.
  • For even with automatic reset policy, this method invokes exactly one waiting session if such exists

virtual void RIPCPrimitive::reset  )  [pure virtual, inherited]
 

Reset primitive. Semantic of this method depends on particular primitive type and is explained in specification of each primitive.

virtual void RIPCEvent::signal  )  [pure virtual]
 

Set event to the signaled state.

  • For event with manual reset policy, this method wakes up all waiting sessions and switch event to the signaled state
  • For even with automatic reset policy, this method invokes exactly one waiting session if such exists, otherwise switcheds event to the signled state

bool RIPCPrimitive::waitFor unsigned  timeout  )  [inline, inherited]
 

Wait until state of primitive is switched with timeout. Semantic of this method depends on particular primitive type and is explained in specification of each primitive.

Returns:
false if timeout is expired before primitive state is changed

void RIPCPrimitive::waitFor  )  [inline, inherited]
 

Wait until state of primitive is switched. Semantic of this method depends on particular primitive type and is explained in specification of each primitive.


The documentation for this class was generated from the following file:
Generated on Wed Nov 26 14:58:18 2003 for RIPC by doxygen 1.3.5