-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconnection.hpp
44 lines (32 loc) · 1008 Bytes
/
connection.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef SCHLAZICONTROL_CONNECTION_HPP
#define SCHLAZICONTROL_CONNECTION_HPP
#include <memory>
#include <string>
#include <vector>
#include "core/input.hpp"
#include "core/output.hpp"
#include "transition.hpp"
#include "types.hpp"
namespace sc {
class Manager;
class PropertyNode;
class Connection final
: public Output
, public Input
{
public:
Connection( std::string&& id, Manager& manager, PropertyNode const& properties );
bool acceptsChannels( std::size_t channels ) const override;
std::size_t emitsChannels() const override { return channels_; }
void transfer();
protected:
void set( Input const& input, ChannelBuffer const& values ) override;
void doStatistics( std::ostream& os ) const override;
private:
std::vector< std::unique_ptr< TransitionInstance > > instances_;
std::size_t channels_;
ChannelBuffer input_;
ChannelBuffer output_;
};
} // namespace sc
#endif // SCHLAZICONTROL_CONNECTION_HPP