2018-01-29 21:49:49 -05:00
|
|
|
//
|
|
|
|
// MultiConfigurationTarget.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 29/01/2018.
|
|
|
|
// Copyright © 2018 Thomas Harte. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef MultiConfigurationTarget_hpp
|
|
|
|
#define MultiConfigurationTarget_hpp
|
|
|
|
|
|
|
|
#include "../../../../Machines/ConfigurationTarget.hpp"
|
|
|
|
#include "../../../../Machines/DynamicMachine.hpp"
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace Analyser {
|
|
|
|
namespace Dynamic {
|
|
|
|
|
2018-02-19 16:03:17 -05:00
|
|
|
/*!
|
|
|
|
Provides a class that multiplexes the configuration target interface to multiple machines.
|
|
|
|
|
|
|
|
Makes a static internal copy of the list of machines; makes no guarantees about the
|
|
|
|
order of delivered messages.
|
|
|
|
*/
|
2018-02-10 19:38:26 -05:00
|
|
|
struct MultiConfigurationTarget: public ConfigurationTarget::Machine {
|
2018-01-29 21:49:49 -05:00
|
|
|
public:
|
|
|
|
MultiConfigurationTarget(const std::vector<std::unique_ptr<::Machine::DynamicMachine>> &machines);
|
|
|
|
|
2018-02-19 16:03:17 -05:00
|
|
|
// Below is the standard ConfigurationTarget::Machine interface; see there for documentation.
|
2018-01-29 21:49:49 -05:00
|
|
|
void configure_as_target(const Analyser::Static::Target &target) override;
|
|
|
|
bool insert_media(const Analyser::Static::Media &media) override;
|
|
|
|
|
|
|
|
private:
|
2018-02-10 19:38:26 -05:00
|
|
|
std::vector<ConfigurationTarget::Machine *> targets_;
|
2018-01-29 21:49:49 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* MultiConfigurationTarget_hpp */
|