aboutsummaryrefslogtreecommitdiff
path: root/CST 126/Homework 1/CST126_Structures.hpp
diff options
context:
space:
mode:
authorArthur Spears <[email protected]>2024-04-25 20:19:57 -0700
committerArthur Spears <[email protected]>2024-04-25 20:19:57 -0700
commitd65138f2e040fe4193ea3fb4e2908bd0b161aadd (patch)
tree821fc4ca98777efd74334829599ea0876fe79b08 /CST 126/Homework 1/CST126_Structures.hpp
parentmergine develop after PR (diff)
downloadhomework-1-arthurtspears-Homework2.tar.xz
homework-1-arthurtspears-Homework2.zip
Started Homework2. Stubbed out main and worker threads. Organized other source files better.Homework2
Diffstat (limited to 'CST 126/Homework 1/CST126_Structures.hpp')
-rw-r--r--CST 126/Homework 1/CST126_Structures.hpp67
1 files changed, 67 insertions, 0 deletions
diff --git a/CST 126/Homework 1/CST126_Structures.hpp b/CST 126/Homework 1/CST126_Structures.hpp
new file mode 100644
index 0000000..5a57b88
--- /dev/null
+++ b/CST 126/Homework 1/CST126_Structures.hpp
@@ -0,0 +1,67 @@
+#ifndef CST126_STRUCTURES_HPP
+#define CST126_STRUCTURES_HPP
+
+#include <cstdint>
+#include <ios>
+
+typedef unsigned long long uLLong;
+
+typedef unsigned char BYTE;
+
+constexpr size_t MAX_STREAM_SIZE = std::numeric_limits<std::streamsize>::max();
+
+constexpr uLLong MAX_CHAR = 101;
+
+union FloatIntUnion
+{
+ float intFloat;
+ uint32_t uInt;
+};
+
+enum TemperatureType
+{
+ Fahrenheit,
+ Celsius
+};
+
+struct DailyTemperature
+{
+ float highTemp{};
+ float lowTemp{};
+ TemperatureType tempType{};
+};
+
+enum DayOfTheWeek
+{
+ Sunday = 0,
+ Monday,
+ Tuesday,
+ Wednesday,
+ Thursday,
+ Friday,
+ Saturday = 6
+};
+
+enum Month
+{
+ January = 1,
+ February,
+ March,
+ April,
+ May,
+ June,
+ July,
+ August,
+ September,
+ October,
+ November,
+ December
+};
+
+struct Date
+{
+ Month month;
+ uint8_t day;
+ uint16_t year;
+};
+#endif