-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClient.h
More file actions
33 lines (27 loc) · 884 Bytes
/
Client.h
File metadata and controls
33 lines (27 loc) · 884 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
33
//////////////////////////////////////////
// Workfile : Client.h
// Author : Michael Enzelsberger
// Date : 09.01.2021
// Description : Client that connects
// Devices to RemoteControl.
//////////////////////////////////////////
#ifndef CLIENT_H
#define CLIENT_H
#include "Object.h"
#include "RemoteControl.h"
class Client: public Object
{
public:
//custom CTOR with remote control as parameter
Client(RemoteControl::SPtr const& remote);
//adds device to mDevices member and calls ProgramSlot function
void AddDevice(std::string const& slotName, size_t const slotNr,
Device::SPtr const& device, Command::SPtr const& onCmd, Command::SPtr const& offCmd);
//prints the states of all devices
void PrintDeviceInfo(std::ostream& ost) const;
private:
RemoteControl::SPtr mRemote;
//stores every device added
Device::SPtr mDevices[numOfSlots] = { nullptr };
};
#endif