template class OutputPort

Overview

Implementation of an output port in the computation graph. More…

#include <output_port.h>

template <class T>
class OutputPort: public Port {
public:
    // construction

    OutputPort(const std::string& id, ComputationalNode* parent);

    // methods

    void publish(const T* msg);
    virtual size_t subscriptionsSize();
};

Inherited Members

public:
    // methods

    const std::string& id();
    ComputationalNode* parent() const;
    virtual size_t subscriptionsSize() = 0;

Detailed Documentation

Implementation of an output port in the computation graph.

It forwards msgs to subscribed ports via its ‘publish’ method

Construction

OutputPort(const std::string& id, ComputationalNode* parent)

Constructor.

Methods

void publish(const T* msg)

Publish a msg to all subscribers.

virtual size_t subscriptionsSize()

Return the number the number of ports subscribed to this port.