Class Connector
Defined in File Connector.h
Class Documentation
-
class Connector
An inter-component connection abstraction mechanism. Connector is exposed by a controlled Component and passed to a controlling Component’s Port.
Note
It is meant to be passed around using a smart observing pointer, such as std::weak_ptr to keep track of “connections”.
Public Functions
-
Connector() = default
-
explicit Connector(DataInterface interface)
-
explicit Connector(SignalInterface interface)
-
bool hasDataInterface() const
Check whether the Connector contains a data interface.
- Returns
true If there is a data interface.
-
bool hasSignalInterface() const
Check whether the Connector contains a signal interface.
- Returns
true If there is a signal interface.
-
const DataInterface &getDataInterface()
Get data interface reference.
- Throws
std::logic_error – There is not data interface stored.
- Returns
Data interface.
-
const SignalInterface &getSignalInterface()
Get signal interface reference.
- Throws
std::logic_error – There is not signal interface stored.
- Returns
Signal interface.
-
void setInterface(DataInterface interface)
Store a data interface.
- Parameters
interface – Data interface to store.
-
void setInterface(SignalInterface interface)
Store a signal interface.
- Parameters
interface – Signal interface to store.
-
Connector() = default