ESA JPIP server  0.1
ipc::IPCObject Class Reference

Class base of all the IPC classes that has the basic operations (Init, Wait and Dispose) to be overloaded. More...

#include <ipc_object.h>

Inheritance diagram for ipc::IPCObject:
Collaboration diagram for ipc::IPCObject:

Public Types

typedef SHARED_PTR< IPCObjectPtr
 Pointer to an IPC object. More...
 

Public Member Functions

 IPCObject ()
 Initializes the internal status to false. More...
 
virtual bool Init ()
 Sets the internal status to true More...
 
virtual WaitResult Wait (int time_out=-1)
 Performs a wait operation with the object to get it. More...
 
bool IsValid ()
 Returns true if the object is valid, that is, the internal status value is true. More...
 
virtual bool Dispose ()
 Release the resources associated to the IPC object and sets the internal status to false. More...
 
virtual ~IPCObject ()
 The desctructor calls the method Dispose. More...
 

Private Attributes

bool valid
 Internal status of the object. More...
 

Detailed Description

Class base of all the IPC classes that has the basic operations (Init, Wait and Dispose) to be overloaded.

It has also an internal boolean value to set the object status.

For the IPC objects the Windows IPC philosophy has been adopted because of its simplicity and flexibility. Under this philosophy, the main operation that can be performed to an IPC object is Wait, to wait for getting the control of the object. Depending on the type of the IPC object (mutex, event, etc.), the meaning of "getting" the control of the object can be different.

Member Typedef Documentation

Pointer to an IPC object.

Constructor & Destructor Documentation

ipc::IPCObject::IPCObject ( )
inline

Initializes the internal status to false.

virtual ipc::IPCObject::~IPCObject ( )
inlinevirtual

The desctructor calls the method Dispose.

Here is the call graph for this function:

Member Function Documentation

virtual bool ipc::IPCObject::Dispose ( )
inlinevirtual

Release the resources associated to the IPC object and sets the internal status to false.

Returns
true if successful. If it is not overloaded, it always returns true.

Reimplemented in ipc::Event, ipc::Mutex, and ipc::RdWrLock.

Here is the caller graph for this function:

virtual bool ipc::IPCObject::Init ( )
inlinevirtual

Sets the internal status to true

Returns
true if successful. If it is not overloaded, it always returns true .

Reimplemented in ipc::Event, ipc::Mutex, and ipc::RdWrLock.

Here is the caller graph for this function:

bool ipc::IPCObject::IsValid ( )
inline

Returns true if the object is valid, that is, the internal status value is true.

Here is the caller graph for this function:

virtual WaitResult ipc::IPCObject::Wait ( int  time_out = -1)
inlinevirtual

Performs a wait operation with the object to get it.

Parameters
time_outTime out (infinite by default).
Returns
WAIT_OBJECT if successful, WAIT_TIMEOUT if time out or WAIT_ERROR is error. If it is not overloaded, it always returns WAIT_ERROR.

Reimplemented in ipc::Event, ipc::Mutex, and ipc::RdWrLock.

Member Data Documentation

bool ipc::IPCObject::valid
private

Internal status of the object.

As it is a private member, the derived classes must use the methods Init and Dispose to set the value of this status.


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