aboutsummaryrefslogtreecommitdiff
path: root/week08/Exercise7.h
blob: 05d63c7a5a3002e574c1990fd581415994a32c45 (plain) (blame)
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
#include <iostream>

class UserError {
	char* className;
	char* propertyName;

	void free();
	void copyFrom(const UserError& other);

	inline static int createdCount = 0;

public:
	UserError();
	~UserError();
	UserError(const UserError& other);
	UserError& operator=(const UserError& other);
	UserError(UserError&& other);
	UserError& operator=(UserError&& other);

	UserError(const char* className, const char* propertyName);

	friend std::ostream& operator<<(std::ostream& ostr, const UserError& right);

	static int GetCreatedCount();
};

class NumberInput {
	int value;

public:
	NumberInput(int min, int max);
	int GetValue();
};