aboutsummaryrefslogtreecommitdiff
path: root/FileStrategy.h
blob: 6338d71483febff8697347ea22bf1499df452026 (plain)
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
#pragma once

class FileReader;

#include <string>

class FileStrategy {
protected:
	virtual void open(const std::string url) = 0;
public:
	virtual void close() = 0;
	virtual const std::string read() = 0;

public:
	virtual ~FileStrategy() = default;

protected:
	FileStrategy() = default;
	virtual FileStrategy * clone() const = 0;

protected:
	FileStrategy(const std::string protocol);
	friend FileReader;
};