-
Notifications
You must be signed in to change notification settings - Fork 0
/
multiconnection.hpp
38 lines (27 loc) · 1011 Bytes
/
multiconnection.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
#ifndef SCHLAZICONTROL_MULTICONNECTION_HPP
#define SCHLAZICONTROL_MULTICONNECTION_HPP
#include <unordered_map>
#include "core/input.hpp"
#include "core/output.hpp"
#include "types.hpp"
namespace sc {
class Manager;
class PropertyNode;
class MultiConnection final
: public Output
, public Input
{
public:
MultiConnection( std::string&& id, Manager& manager, PropertyNode const& properties );
virtual bool acceptsChannels( std::size_t channels ) const override { return true; }
virtual std::size_t emitsChannels() const override { return channels_; }
protected:
virtual void set( Input const& input, ChannelBuffer const& values ) override;
virtual void doStatistics( std::ostream& os ) const override;
private:
std::size_t channels_;
ChannelBuffer values_;
std::unordered_map< std::string, ChannelBuffer > buffers_;
};
} // namespace sc
#endif // SCHLAZICONTROL_MULTICONNECTION_HPP