2018-02-09 21:31:05 +00:00
|
|
|
//
|
|
|
|
// MultiJoystickMachine.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 09/02/2018.
|
2018-05-13 19:19:52 +00:00
|
|
|
// Copyright 2018 Thomas Harte. All rights reserved.
|
2018-02-09 21:31:05 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef MultiJoystickMachine_hpp
|
|
|
|
#define MultiJoystickMachine_hpp
|
|
|
|
|
|
|
|
#include "../../../../Machines/DynamicMachine.hpp"
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace Analyser {
|
|
|
|
namespace Dynamic {
|
|
|
|
|
2018-02-19 21:03:17 +00:00
|
|
|
/*!
|
|
|
|
Provides a class that multiplexes the joystick machine interface to multiple machines.
|
|
|
|
|
|
|
|
Makes a static internal copy of the list of machines; makes no guarantees about the
|
|
|
|
order of delivered messages.
|
|
|
|
*/
|
2020-04-02 03:19:34 +00:00
|
|
|
class MultiJoystickMachine: public MachineTypes::JoystickMachine {
|
2018-02-09 21:31:05 +00:00
|
|
|
public:
|
|
|
|
MultiJoystickMachine(const std::vector<std::unique_ptr<::Machine::DynamicMachine>> &machines);
|
|
|
|
|
2018-02-19 21:03:17 +00:00
|
|
|
// Below is the standard JoystickMachine::Machine interface; see there for documentation.
|
2020-01-24 03:57:51 +00:00
|
|
|
const std::vector<std::unique_ptr<Inputs::Joystick>> &get_joysticks() final;
|
2018-02-09 21:31:05 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::vector<std::unique_ptr<Inputs::Joystick>> joysticks_;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* MultiJoystickMachine_hpp */
|