#include <ConnFactory.hpp>
Public Member Functions | |
virtual base::ChannelElementBase::shared_ptr | buildChannelInput (base::OutputPortInterface &port, ConnPolicy const &policy) const =0 |
virtual base::ChannelElementBase::shared_ptr | buildChannelOutput (base::InputPortInterface &port, ConnPolicy const &policy) const =0 |
virtual base::ChannelElementBase::shared_ptr | buildDataStorage (ConnPolicy const &policy) const =0 |
virtual internal::SharedConnectionBase::shared_ptr | buildSharedConnection (base::OutputPortInterface *output_port, base::InputPortInterface *input_port, ConnPolicy const &policy) const =0 |
virtual base::InputPortInterface * | inputPort (std::string const &name) const =0 |
virtual base::OutputPortInterface * | outputPort (std::string const &name) const =0 |
virtual | ~ConnFactory () |
Static Public Member Functions | |
template<typename T > | |
static base::ChannelElementBase::shared_ptr | buildChannelInput (OutputPort< T > &port, ConnPolicy const &policy, bool force_unbuffered=false) |
template<typename T > | |
static base::ChannelElementBase::shared_ptr | buildChannelOutput (InputPort< T > &port, ConnPolicy const &policy, T const &initial_value=T()) |
template<typename T > | |
static base::ChannelElement< T > * | buildDataStorage (ConnPolicy const &policy, const T &initial_value=T()) |
template<typename T > | |
static SharedConnectionBase::shared_ptr | buildSharedConnection (OutputPort< T > *output_port, base::InputPortInterface *input_port, ConnPolicy const &policy) |
template<typename T > | |
static bool | createConnection (OutputPort< T > &output_port, base::InputPortInterface &input_port, ConnPolicy const &policy) |
static bool | createSharedConnection (base::OutputPortInterface *output_port, base::InputPortInterface *input_port, SharedConnectionBase::shared_ptr shared_connection, ConnPolicy const &policy) |
template<class T > | |
static bool | createStream (OutputPort< T > &output_port, ConnPolicy const &policy) |
template<class T > | |
static bool | createStream (InputPort< T > &input_port, ConnPolicy const &policy) |
static bool | findSharedConnection (base::OutputPortInterface *output_port, base::InputPortInterface *input_port, ConnPolicy const &policy, SharedConnectionBase::shared_ptr &shared_connection) |
This class provides the basic tools to create channels that represent connections between two ports.
The ports and type transports use these functions to setup connections. The interface may change as the needs of these 'users' change.
Definition at line 95 of file ConnFactory.hpp.
|
inlinevirtual |
Definition at line 98 of file ConnFactory.hpp.
|
pure virtual |
Creates the input endpoint (starting point) of a communication channel and adds it to an OutputPort.
port | The output port to connect the channel's input end to. |
policy | Describes the kind of connection requested by the user |
|
inlinestatic |
During the process of building a connection between two ports, this method builds the input half (starting from the OutputPort).
The ConnPolicy may require to install a buffer at the output side of the channel.
port | The output port to which the connection is added. |
policy | The policy dictating which kind of buffer must be installed. The transport and other parameters are ignored. |
Definition at line 220 of file ConnFactory.hpp.
|
pure virtual |
Creates the output endpoint of a communication channel and adds it to an InputPort.
port | The input port to connect the channel's output end to. |
policy | Describes the kind of connection requested by the user |
|
inlinestatic |
During the process of building a connection between two ports, this method builds the output part of the channel, that is the half that is connected to the input port. The returned value is the connection element that should be connected to the end of the input-half.
The ConnPolicy may require to install a buffer at the output side of the channel.
port | The input port to which the connection is added. |
policy | The policy dictating which kind of buffer must be installed. The transport and other parameters are ignored. |
initial_value | The value to use to initialize the connection's storage buffer. |
Definition at line 302 of file ConnFactory.hpp.
|
pure virtual |
Creates single data or buffered storage for this type.
policy | Describes the kind of storage requested by the user |
|
inlinestatic |
This method creates the connection element that will store data inside the connection, based on the given policy
: shouldn't this belong in the template type info ? This allows the type lib to choose which locked/lockfree algorithms are implemented and leaves out 4x code generation for each alternative in each compilation unit. Contra: needs T in typelib.
: since setDataSample, initial_value is no longer needed.
Definition at line 158 of file ConnFactory.hpp.
|
staticprotected |
Definition at line 73 of file ConnFactory.cpp.
|
pure virtual |
Tries to find an existing or creates a new shared connection object for the given output port, input port and connection policy. If an existing shared connection has been found, also checks if it matches the given policy and output an error otherwise. The input and output port arguments are optional and can be NULL pointers.
output_port | The output port to connect the channel's input end to (optional). |
input_port | The output port to connect the channel's output end to (optional). |
policy | Describes the kind of storage requested by the user |
|
inlinestatic |
Tries to find an existing or creates a new shared connection object for the given output port, input port and connection policy. If an existing shared connection has been found, also checks if it matches the given policy and output an error otherwise. The input and output port arguments are optional and can be NULL pointers.
output_port | The output port to connect the channel's input end to (optional). |
input_port | The output port to connect the channel's output end to (optional). |
policy | Describes the kind of storage requested by the user |
Definition at line 392 of file ConnFactory.hpp.
|
staticprotected |
Definition at line 100 of file ConnFactory.cpp.
|
staticprotected |
Definition at line 221 of file ConnFactory.cpp.
|
staticprotected |
Definition at line 139 of file ConnFactory.cpp.
|
staticprotected |
Definition at line 178 of file ConnFactory.cpp.
|
inlinestatic |
Creates a connection from a local output_port to a local or remote input_port. This function contains all logic to decide on how connections must be created to local or remote input ports.
In order to set up out-of-band communication between input_port and output_port, use a different transport number in the policy parameter than the transport of the input port.
Definition at line 458 of file ConnFactory.hpp.
|
inlinestaticprotected |
This code is for setting up an in-process out-of-band connection. This means that both input and output port are present in the same process. This function is used when the policy dictates a transport protocol, but both ports are local.
Definition at line 593 of file ConnFactory.hpp.
|
static |
Definition at line 214 of file ConnFactory.cpp.
|
inlinestatic |
Creates, attaches and checks an outbound stream to an Output port.
output_port | The port to connect the stream to. |
policy | The policy dictating which transport to use. |
Definition at line 535 of file ConnFactory.hpp.
|
inlinestatic |
Creates, attaches and checks an inbound stream to an Input port.
input_port | The port to connect the stream to. |
policy | The policy dictating which transport to use. |
Definition at line 558 of file ConnFactory.hpp.
|
static |
Tries to find an existing or creates a new shared connection object for the given output port, input port and connection policy. If an existing shared connection has been found, also checks if it matches the given policy and output an error otherwise. The input and output port arguments are optional and can be NULL pointers.
output_port | The output port to connect the channel's input end to (optional). |
input_port | The output port to connect the channel's output end to (optional). |
policy | Describes the kind of storage requested by the user |
shared_connection | A reference to a SharedConnectionBase pointer that will point to the found instance or an empty pointer, if either no connection has been found or the found connection was invalid for the given ports and policy. |
Definition at line 269 of file ConnFactory.cpp.
|
pure virtual |
Returns a new InputPort<T> object where T is the type represented by this TypeInfo object.
|
pure virtual |
Returns a new OutputPort<T> object where T is the type represented by this TypeInfo object.