12#include "../messages/Message.hpp"
MIME type value object.
Definition MimeType.hpp:44
@ Any
"" (empty string), meaning "accept anything"
Definition MimeType.hpp:67
MimeType const & mimeType() const noexcept
Declared MIME type emitted by this port.
Definition OutputPort.hpp:60
void sendMessage(MessagePtr msg)
Send a message through this output port.
bool isMimeTypeSupported(MimeType const &mimeType) const noexcept
Test whether a MIME type is compatible with this port.
OutputPort(Id id, NodeWPtr node, std::string name, Kind kind, MimeType mimeType=MimeType::Any, std::optional< bool > allowsMimeTypePropagation=std::nullopt)
Construct an output port.
Port(Id id, NodeWPtr node, Mode mode, Kind kind, std::string name, std::optional< bool > allowsMimeTypePropagation)
Construct a port.
NodePtr node() const noexcept
Get the owning node.
Definition Port.hpp:87
std::string const & name() const noexcept
Get the port name.
Definition Port.hpp:95
Kind kind() const noexcept
Get the port kind.
Definition Port.hpp:99
std::optional< bool > allowsMimeTypePropagation() const noexcept
Check if this node allow mime-type propagation.
Definition Port.hpp:106
uint32_t Id
Identifier type of a port (unique within a node by not unique accross a graph).
Definition Port.hpp:69
Definition Channel.hpp:22
std::unique_ptr< Message > MessagePtr
Unique ownership handle for messages.
Definition Message.hpp:27
std::weak_ptr< Node > NodeWPtr
Weak pointer type for Nodes.
Definition Node.hpp:63
Kind
Port kind (connection domain).
Definition Kind.hpp:29