aboutsummaryrefslogtreecommitdiff
path: root/week10/Exercise09/StringPacket.h
blob: b7bbc73503f0e6b89dbedded945557013ed3ca12 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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);
};