![]() |
smgl 0.11.0
Structured Metadata Engine and Graph Objects Library
|
Generic input port interface. More...
#include <smgl/Ports.hpp>
Public Member Functions | |
| std::vector< Connection > | getConnections () const |
| std::size_t | numConnections () const |
| Get the number of connections. | |
| virtual Input & | operator= (Output &op) |
| Connect an output port to an input port. | |
Public Member Functions inherited from smgl::Port | |
| virtual bool | update ()=0 |
| virtual void | notify (State s)=0 |
| State | state () const |
| void | setState (State s) |
| void | setParent (Node *p) |
| virtual Metadata | serialize ()=0 |
| virtual void | deserialize (const Metadata &m)=0 |
Public Member Functions inherited from smgl::UniquelyIdentifiable | |
| auto | uuid () const -> Uuid |
| void | setUuid (const Uuid &uuid) |
Protected Member Functions | |
| Input () | |
| ~Input () override | |
| virtual void | connect (Output *op) final |
| virtual void | disconnect (Output *op) final |
Protected Member Functions inherited from smgl::Port | |
| Port ()=default | |
| Port (State s) | |
| virtual | ~Port ()=default |
Protected Member Functions inherited from smgl::UniquelyIdentifiable | |
| UniquelyIdentifiable ()=default | |
Protected Attributes | |
| Output * | src_ {nullptr} |
| std::size_t | last_updated_ {0} |
Protected Attributes inherited from smgl::Port | |
| State | state_ {State::Idle} |
| Node * | parent_ {nullptr} |
Protected Attributes inherited from smgl::UniquelyIdentifiable | |
| Uuid | uuid_ {Uuid::Uuid4()} |
Friends | |
| template<typename OutputValType , typename... OutputArgs> | |
| class | OutputPort |
| void | connect (Output &op, Input &ip) |
| Connect an output port to an input port. | |
| void | disconnect (Output &op, Input &ip) |
| Disconnect an output port and input port. | |
Additional Inherited Members | |
Public Types inherited from smgl::Port | |
| enum class | State { Idle , Waiting , Queued , Error } |
|
protected |
Default constructor
|
overrideprotected |
Destructor performs auto-disconnect
|
finalprotectedvirtual |
Connect to an output port
|
finalprotectedvirtual |
Disconnect from an output port
| std::vector< Connection > smgl::Input::getConnections | ( | ) | const |
Get a list of port connections
| std::size_t smgl::Input::numConnections | ( | ) | const |
Get the number of connections.
1 if connected to an output port, 0 otherwise.
Connect an output port to an input port.
| smgl::bad_connection | if port instances do not share underlying type T |
Reimplemented in smgl::InputPort< T >.
Connect an output port to an input port.
Friend: smgl::connect
| smgl::bad_connection | if port instances do not share underlying type T |
Disconnect an output port and input port.
Friend: smgl::disconnect
Does nothing if ports are not connected
|
friend |
Friend: typed OutputPort class
|
protected |
|
protected |