classPiiProxySocket
#include <PiiProxySocket.h>
An input-output socket.
Inherits PiiSocket, PiiAbstractOutputSocket, PiiAbstractInputSocket, PiiInputController
Description
This socket implements both PiiAbstractOutputSocket and PiiAbstractInputSocket, and works as a PiiInputController for itself. It merely passes all incoming objects to the output.
Constructors and destructor
|
( )
|
|
|
( )
|
Public member functions
|
virtual PiiAbstractInputSocket
*
|
( )
Returns a pointer to this socket as PiiAbstractInputSocket,
if this socket is either an |
|
virtual PiiAbstractOutputSocket
*
|
( )
Returns a pointer to this socket as PiiAbstractOutputSocket,
if this socket is either an |
|
virtual PiiInputController *
|
( )
Returns the input controller. |
|
virtual void
|
Indicates this output socket that |
|
void
|
( )
|
|
( )
Finds (backwards) the most distant output connected to this socket through proxies. |
|
|
bool
|
(
|
|
virtual PiiProxySocket *
|
( )
Returns a pointer to this socket as a PiiSocket. |
|
virtual bool
|
Activate any functionality that should be performed when a new object arrives into an input. |
|
virtual Type
|
( )
Returns |
Protected member functions
|
virtual void
|
Called by connectInput() when an input has been connected. |
|
virtual void
|
Called by disconnectInput() when an input has been disconnected. |
Function details
-
PiiProxySocket
() -
~PiiProxySocket
() -
Returns a pointer to this socket as PiiAbstractInputSocket, if this socket is either an
Inputor aProxy.Otherwise returns zero.
Reimplemented from PiiSocket.
-
Returns a pointer to this socket as PiiAbstractOutputSocket, if this socket is either an
Outputor aProxy.Otherwise returns zero.
Reimplemented from PiiSocket.
-
Returns the input controller.
Input controller is responsible for handling all incoming objects to this socket. Typically, a single controller is shared by all inputs within an operation. This allows the controller to synchronize inputs with respect to each other.
Reimplemented from PiiAbstractInputSocket.
-
Indicates this output socket that
inputis ready to receive new objects.Used in communications between socket pairs.
Reimplemented from PiiAbstractOutputSocket.
-
void reset
() -
PiiAbstractOutputSocket * rootOutput
()Finds (backwards) the most distant output connected to this socket through proxies.
If the output is connected to an operation, this function returns
this. Otherwise it goes recursively back through all proxies until it finds an output that is connected to an operation. If there is no such output, returns 0.Reimplemented from PiiAbstractOutputSocket.
-
bool setInputConnected
(- bool connected
-
Returns a pointer to this socket as a PiiSocket.
This is the preferred way of performing a cross-cast, even if
dynamic_castwould work in most cases.Reimplemented from PiiAbstractSocket.
-
Activate any functionality that should be performed when a new object arrives into an input.
This method is called by an input socket whenever a new object is received on it.
Note that the function may not throw exceptions. If your implementation passes the incoming objects right away, you must catch the exceptions thrown by PiiOutputSocket::emitObject(), for example.
Parameters
- sender
-
a pointer to the socket that received the object
- object
-
the object that was received
Returns
trueif the object was accepted,falseotherwise. Typically, an object is accepted if there is no blocking object insenderby calling PiiInputSocket::receive(). Note thattrueshould be returned whenever the object is accepted for processing, even if the processing itself will fail.Reimplemented from PiiInputController.
-
Returns
Proxy.Reimplemented from PiiSocket.
-
Called by connectInput() when an input has been connected.
The default implementation does nothing.
Reimplemented from PiiAbstractOutputSocket.
-
Called by disconnectInput() when an input has been disconnected.
The default implementation does nothing.
Reimplemented from PiiAbstractOutputSocket.
Add a note
Not a single note added yet. Be the first, add yours.