Template Class DataPort

Inheritance Relationships

Base Type

Class Documentation

template<typename T>
class DataPort : public eat::framework::DataPortBase

non-streaming data port for a specific type, T

T should be copyable and movable (value semantics), so that processes will not interact (i.e. see changes from non-upstream processes), and don’t have to copy manually

for heavy types (e.g. vector) it may be more efficient to use a smart pointer with const contents (like std::shared_ptr<const std::vector<…>>) to avoid copying unnecessarily

for types with RAII behaviour, readers should move from get_value to ensure that resources are freed as soon as possible

Public Functions

virtual bool compatible(const PortPtr &other) const override

are connections between this and other valid (i.e. the same type)

template<typename U>
void set_value(U &&value)

set the value &#8212; use this from a process for which this port is an output

const T &get_value() const

get the value &#8212; use this from a process for which this port is an input

T &get_value()
virtual void move_to(DataPortBase &other) override
virtual void copy_to(DataPortBase &other) override