-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCrowdReport.swift
More file actions
executable file
·183 lines (146 loc) · 4.22 KB
/
CrowdReport.swift
File metadata and controls
executable file
·183 lines (146 loc) · 4.22 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
//
// CrowdReport.swift
// Atmos
//
// Created by Evangelos on 24/01/16.
// Copyright © 2016 Evangelos. All rights reserved.
//
import UIKit
public class CrowdReport {
//MARK : Properties
var id: String
var type: String
var temperature: String
var weather: String
var wind: String
var humidity: String
var weatherIcon: UIImage!
var windIcon: UIImage!
var pool: String
var timestamp: String
var timeZone: String
var feelText: String//description in qualitative terms
var humidityText: String
var progressVisible: Bool;
init(){
let defaultIcon = UIImage(named: "no_data")
id = "-1"
type = "crowdReport"
temperature = "default"
weather = "default"
wind = "default"
humidity = "default"
weatherIcon = defaultIcon//setting default icon: no data
windIcon = defaultIcon//setting defaukt icon: no data
pool = "default"
timestamp = "default"
timeZone = "default"
feelText = "default"
humidityText = "default"
progressVisible = true
//super.init()
}//endInit()
public init?(id: String, type: String, temperature: String, weather: String, wind: String, humidity: String, weatherIcon: UIImage?, windIcon: UIImage?, pool: String, timestamp: String, timeZone: String, feelText: String, humidityText: String, progressVisible: Bool) {
// super.init()
self.id = id
self.type = type
self.temperature = temperature
self.weather = weather
self.wind = wind
self.humidity = humidity
self.weatherIcon = weatherIcon
self.windIcon = windIcon
self.pool = pool
self.timestamp = timestamp
self.timeZone = timeZone
self.feelText = feelText
self.humidityText = humidityText
self.progressVisible = progressVisible
}
//MARK: Setters
public func setId(_id: String){
id = _id
}
public func setType(_type: String) {
type = _type
}
public func setTemperature(_temperature: String) {
temperature = _temperature
}
public func setWeather(_weather: String) {
weather = _weather
}
public func setWind(_wind: String) {
wind = _wind
}
public func setHumidity(_humidity: String) {
humidity = _humidity
}
public func setWeatherIcon(_weatherIcon: UIImage) {
weatherIcon = _weatherIcon
}
public func setWindIcon(_windIcon: UIImage) {
windIcon = _windIcon
}
public func setPool(_pool: String) {
pool = _pool
}
public func setTimestamp(_timestamp: String) {
timestamp = _timestamp
}
public func setTimeZone(_timeZone: String) {
timeZone = _timeZone
}
public func setFeelText(_feelText: String) {
feelText = _feelText
}
public func setHumidityText(_humidityText: String) {
humidityText = _humidityText
}
public func setProgressVisible(_progressVisible: Bool) {
progressVisible = _progressVisible
}
//MARK : Getters
public func getId() -> String {
return id
}
public func getType() -> String {
return type
}
public func getTemperature() -> String {
return temperature
}
public func getWeather() -> String {
return weather
}
public func getWind() -> String {
return wind
}
public func getHumidity() -> String {
return humidity
}
public func getWeatherIcon() -> UIImage {
return weatherIcon
}
public func getWindIcon() -> UIImage {
return windIcon
}
public func getPool() -> String {
return pool
}
public func getTimestamp() -> String {
return timestamp
}
public func getTimeZone() -> String {
return timeZone
}
public func getFeelText() -> String {
return feelText
}
public func getHumidityText() -> String {
return humidityText
}
public func getProgressVisible() ->Bool {
return progressVisible
}
}//endCrowdReport.swift