diff options
| author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-11 16:44:28 +0200 | 
|---|---|---|
| committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-11 16:44:28 +0200 | 
| commit | 70feb9ed564fb7f557b7ab8b8d65e6376811b6ce (patch) | |
| tree | d763d2a85475f564475624655ba5605eafb4d1e4 /FileStrategy.h | |
| parent | a842040a09cd95cf5c32f67941c7e99569a12f57 (diff) | |
rename File -> FileStrategy
Diffstat (limited to 'FileStrategy.h')
| -rw-r--r-- | FileStrategy.h | 25 | 
1 files changed, 25 insertions, 0 deletions
| diff --git a/FileStrategy.h b/FileStrategy.h new file mode 100644 index 0000000..6338d71 --- /dev/null +++ b/FileStrategy.h @@ -0,0 +1,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; +}; + |