|
ESA JPIP server
0.1
|
Class base of all the IPC classes that has the basic operations (Init, Wait and Dispose) to be overloaded.
More...
#include <ipc_object.h>
Public Types | |
| typedef SHARED_PTR< IPCObject > | Ptr |
| 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... | |
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.
| typedef SHARED_PTR<IPCObject> ipc::IPCObject::Ptr |
Pointer to an IPC object.
|
inline |
Initializes the internal status to false.
|
inlinevirtual |
The desctructor calls the method Dispose.
|
inlinevirtual |
Release the resources associated to the IPC object and sets the internal status to false.
true if successful. If it is not overloaded, it always returns true. Reimplemented in ipc::Event, ipc::Mutex, and ipc::RdWrLock.
|
inlinevirtual |
Sets the internal status to true
true if successful. If it is not overloaded, it always returns true . Reimplemented in ipc::Event, ipc::Mutex, and ipc::RdWrLock.
|
inline |
Returns true if the object is valid, that is, the internal status value is true.
|
inlinevirtual |
Performs a wait operation with the object to get it.
| time_out | Time out (infinite by default). |
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.
|
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.