-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHeating.cpp
More file actions
36 lines (31 loc) · 754 Bytes
/
Heating.cpp
File metadata and controls
36 lines (31 loc) · 754 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
34
35
36
//////////////////////////////////////////
// Workfile : Heating.cpp
// Author : Sebastian Mueck
// Date : 09.01.2021
// Description : Implementation for concrete Device
//////////////////////////////////////////
#include "Heating.h"
using namespace std;
void Heating::Info(std::ostream& ost) const
{
ost << "Heating is ";
//Prints the information
//if the Heating is on or off
switch(mState){
case TStatePower::eOn: ost << "on" << endl;
break;
case TStatePower::eOff: ost << "off" << endl;
break;
}
}
//returns the state of the Heating
TStatePower Heating::GetState() const
{
return mState;
}
//chages the state of Heating if a button is
//pressed on the remote
void Heating::SetState(TStatePower const& state)
{
mState = state;
}