-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLaunchCaretaker.h
101 lines (87 loc) · 1.78 KB
/
LaunchCaretaker.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
94
95
96
97
98
99
100
101
/**
* @file LaunchCaretaker.h
* @author James Butler
* @class LaunchCaretaker
* @brief Design Pattern: Memento, Participant: Caretaker
*/
#ifndef LAUNCHCARETAKER_H
#define LAUNCHCARETAKER_H
using namespace std;
#include "LaunchFile.h"
class LaunchCaretaker {
public:
/**
* @brief Construct a new Launch Caretaker object
*
*/
LaunchCaretaker();
/**
* @brief Destroy the Launch Caretaker object
*
*/
virtual ~LaunchCaretaker();
/**
* @brief Get the File object at index i
*
* @param i the index to select it
* @return LaunchFile*
*/
LaunchFile* getFile(int i);
/**
* @brief Set the File object
*
* @param newfile The file to store
*/
void setFile(LaunchFile* newfile);
/**
* @brief Get the Description of the file at index i
*
* @param i The index
* @return string
*/
string getDesc(int i);
/**
* @brief Remove the file at index i
*
* @param i The index
*/
void removeFile(int i);
/**
* @brief Returns true if the provided LaunchFile is stored, else false
*
* @param f The launchFile to search for
* @return bool
*/
bool contains(LaunchFile* f);
/**
* @brief Returns true if the Rocketship array passed in is stored
*
* @param r The Rocketship array to check
* @param k The size of the array
* @return bool
*/
bool contains(Rocketship** r,int k);
/**
* @brief Get the number of stored files
*
* @return int
*/
int getSize();
private:
/**
* @brief An array of LaunchFiles being stored
*
*/
LaunchFile** file;
/**
* @brief A description of the stored rockets in this object
*
*/
string* desc;
/**
* @brief The number of stored LaunchFiles
*
*/
int FileSize;
};
#endif