-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevicemanager.h
More file actions
32 lines (23 loc) · 837 Bytes
/
devicemanager.h
File metadata and controls
32 lines (23 loc) · 837 Bytes
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
#pragma once
#include <vector>
#include <memory>
#include <deviceconfigs/display.h>
#include "matrix.h"
#include "utility/singleton.hpp"
#include "deviceconfigs/device.h"
class DeviceManager : public Singleton<DeviceManager> {
public:
DeviceManager();
void addDevice(int type, int id);
void addConnection(int sourceDevId, int sourceOut,
int destDevId, int destInput);
void removeDevice(int idDevice);
void removeConnection(int sourceDevId, int sourceOut,
int destDevId, int destInput);
void changeVariables(int id, VarList vars);
std::shared_ptr<Device> getDeviceById(int id);
private:
std::vector<std::shared_ptr<Device>>::iterator getDeviceIterById(int id);
std::vector<int> _types;
std::vector<std::shared_ptr<Device>> _devices;
};