aboutsummaryrefslogtreecommitdiff
path: root/week10/Exercise09/StringPacket.h
diff options
context:
space:
mode:
Diffstat (limited to 'week10/Exercise09/StringPacket.h')
-rw-r--r--week10/Exercise09/StringPacket.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/week10/Exercise09/StringPacket.h b/week10/Exercise09/StringPacket.h
new file mode 100644
index 0000000..b7bbc73
--- /dev/null
+++ b/week10/Exercise09/StringPacket.h
@@ -0,0 +1,19 @@
+#pragma once
+
+#include "CommunicationPacket.h"
+class StringPacket : CommunicationPacket {
+ char* data;
+
+ void free();
+ void copyFrom(const StringPacket& other);
+
+public:
+ StringPacket();
+ ~StringPacket();
+ StringPacket(const StringPacket& other);
+ StringPacket& operator=(const StringPacket& other);
+ StringPacket(StringPacket&& other);
+ StringPacket& operator=(StringPacket&& other);
+
+ StringPacket(unsigned startAddress, unsigned endAddress, const char* data);
+};