-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsatellite.h
93 lines (85 loc) · 2.5 KB
/
satellite.h
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
//
// Created by micha on 2021/11/08.
//
#ifndef SATELLITE_H
#define SATELLITE_H
# include <string>
#include "observer.h"
//#include "Mediator.h"
class Mediator;
using namespace std;
///This is the satellite class.
///
///It has a string name, bool inorbit, an object of type observer and a bool System_online as a private member
class satellite
{
private:
string name;
bool inorbit;
observer* observ;
bool System_online;
public:
/// this is the getName function.
///
/// This used as an accessor method to private member name
/// @return a string containing the name of the satellite
string getName();
/// this is the setOrbit function.
///
/// This used as an modifier method to private member bool
///@param tf the bool value that is going to be passed in.
/// @return nothing
void setOrbit(bool);
/// this is the getOrbit function.
///
/// This used as an accessor method to private member inorbit
/// @return a bool value
bool getOrbit();
/// this is the attach function.
///
///This used to attach the satellite
///@param o is an object of type observer
/// @return nothing
void attach(observer*);
/// this is the detach function.
///
/// This used to detach the satellite
/// @return nothing
void detach();
/// this is the setSO function.
///
/// This used as an modifier method to private member System_online
///@param tf the bool value that is going to be passed in.
/// @return nothing
void setSO(bool);
/// this is the getS0 function.
///
/// This used as an accessor method to private member System_online
/// @return a bool value
bool getS0();
/// this is the setSOandUpdate function.
///
/// This used as an accessor method to private member System_online and updates observers
///@param tf the bool value that is going to be passed in.
/// @return nothing
void setSOandUpdate(bool);
/// this is the notify function.
///
/// This used to notify observers
/// @return nothing
void notify();
/// this is the getObserv function.
///
/// This used as an accessor method to private member observ
///@return an object of type observer
observer* getObserv();
/// this is the satellite constructor.
///
///@param n is for the a string name
///@param med is an object of type observer
///@return a string containing the name of the satellite
satellite(string, Mediator*);
void workLoad(bool);
void setName(string s);
};
#endif //SATELLITE_H