Template Class Outlet

Class Documentation

template<typename ImplSpec_>
class uit::Outlet

Output from conduit transmission.

Allows user to initiate

  • potentially-blocking, strictly-sequential of the next unread received transmission, or

  • non-blocking fetch of the latest received transmission via JumpGet.

An Outlet holds a std::shared_ptr to a Duct object, which manages data transmission to the Outlet.

An Outlet’s underlying Duct may be altered or replaced at runtime, for example to provide thread-safe or process-safe transmission.

  • EmplaceDuct emplaces a new transmission implementation within the existing Duct object. (See include/ducts/Duct.hpp for details.)

  • SplitDuct makes a new Duct and points the Outlet’s std::shared_ptr to that Duct.

If an Inlet holds a std::shared_ptr to the Outlet’s Duct, under an EmplaceDuct call the Duct’s change in transmission implementation will be visible to the Inlet and the Inlet and Outlet will still share a Duct. However, under a SplitDuct call that Inlet’s Duct will be unaffected. After a SplitDuct call, the Inlet and Outlet will hold std::shared_ptr’s to separate Ducts.

Note

End users should probably never have to directly instantiate this class. The Conduit, Sink, and Source classes take care of creating a Duct and tying it to an Inlet and/or Outlet. Better yet, the MeshTopology interface allows end users to construct a conduit network in terms of a connection topology and a mapping to assign nodes to threads and processes without having to manually construct Conduits and emplace necessary thread-safe and/or process-safe Duct implementations.

Template Parameters
  • ImplSpec: class with static and typedef members specifying implementation details for the conduit framework. See include/config/ImplSpec.hpp.

Public Types

using ImplSpec = ImplSpec_
using optional_ref_t = emp::optional<std::reference_wrapper<const T>>

Public Functions

Outlet(std::shared_ptr<duct_t> duct_)

TODO.

size_t TryStep(const size_t num_steps = 1)
size_t Jump()
const T &Get() const

TODO.

Return

TODO.

T &Get()

TODO.

Return

TODO.

const T &JumpGet()

TODO.

Return

TODO.

const T &GetNext()

Get next received value.

Blocking.

Return

TODO.

optional_ref_t GetNextOrNullopt()

Get next if available.

Non-blocking.

Return

TODO.

size_t GetReadCount() const

TODO.

Return

TODO.

size_t GetRevisionCount() const

TODO.

Return

TODO.

size_t GetNetFlux() const

TODO.

Return

TODO.

template<typename WhichDuct, typename ...Args>
void EmplaceDuct(Args&&... args)

TODO.

Template Parameters
  • WhichDuct: TODO

  • Args: TODO

Parameters
  • args: TODO

template<typename WhichDuct, typename ...Args>
void SplitDuct(Args&&... args)

TODO.

Template Parameters
  • WhichDuct: TODO

  • Args: TODO

Parameters
  • args: TODO

duct_t::uid_t GetDuctUID() const

TODO.

Return

TODO.

emp::optional<bool> HoldsIntraImpl() const
emp::optional<bool> HoldsThreadImpl() const
emp::optional<bool> HoldsProcImpl() const
bool CanStep() const
std::string ToString() const

TODO.

Return

TODO.