2018-02-09 16:31:05 -05:00
|
|
|
//
|
|
|
|
// MultiJoystickMachine.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 09/02/2018.
|
2018-05-13 15:19:52 -04:00
|
|
|
// Copyright 2018 Thomas Harte. All rights reserved.
|
2018-02-09 16:31:05 -05:00
|
|
|
//
|
|
|
|
|
2024-01-16 23:34:46 -05:00
|
|
|
#pragma once
|
2018-02-09 16:31:05 -05:00
|
|
|
|
|
|
|
#include "../../../../Machines/DynamicMachine.hpp"
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
#include <vector>
|
|
|
|
|
2023-05-10 16:02:18 -05:00
|
|
|
namespace Analyser::Dynamic {
|
2018-02-09 16:31:05 -05:00
|
|
|
|
2018-02-19 16:03:17 -05: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-01 23:19:34 -04:00
|
|
|
class MultiJoystickMachine: public MachineTypes::JoystickMachine {
|
2018-02-09 16:31:05 -05:00
|
|
|
public:
|
|
|
|
MultiJoystickMachine(const std::vector<std::unique_ptr<::Machine::DynamicMachine>> &machines);
|
|
|
|
|
2018-02-19 16:03:17 -05:00
|
|
|
// Below is the standard JoystickMachine::Machine interface; see there for documentation.
|
2020-01-23 22:57:51 -05:00
|
|
|
const std::vector<std::unique_ptr<Inputs::Joystick>> &get_joysticks() final;
|
2018-02-09 16:31:05 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::vector<std::unique_ptr<Inputs::Joystick>> joysticks_;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|