mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-30 19:52:18 +00:00
f417fa82a4
Simultaneously cleans up some of the naming conventions and tries to make things a bit more template-compatible.
42 lines
1017 B
C++
42 lines
1017 B
C++
//
|
|
// MultiMediaTarget.hpp
|
|
// Clock Signal
|
|
//
|
|
// Created by Thomas Harte on 29/01/2018.
|
|
// Copyright 2018 Thomas Harte. All rights reserved.
|
|
//
|
|
|
|
#ifndef MultiMediaTarget_hpp
|
|
#define MultiMediaTarget_hpp
|
|
|
|
#include "../../../../Machines/MediaTarget.hpp"
|
|
#include "../../../../Machines/DynamicMachine.hpp"
|
|
|
|
#include <memory>
|
|
#include <vector>
|
|
|
|
namespace Analyser {
|
|
namespace Dynamic {
|
|
|
|
/*!
|
|
Provides a class that multiplexes the media target interface to multiple machines.
|
|
|
|
Makes a static internal copy of the list of machines; makes no guarantees about the
|
|
order of delivered messages.
|
|
*/
|
|
struct MultiMediaTarget: public MachineTypes::MediaTarget {
|
|
public:
|
|
MultiMediaTarget(const std::vector<std::unique_ptr<::Machine::DynamicMachine>> &machines);
|
|
|
|
// Below is the standard MediaTarget::Machine interface; see there for documentation.
|
|
bool insert_media(const Analyser::Static::Media &media) final;
|
|
|
|
private:
|
|
std::vector<MachineTypes::MediaTarget *> targets_;
|
|
};
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* MultiMediaTarget_hpp */
|