some more thoughts for refactoring
This commit is contained in:
parent
b92b66c101
commit
78b7407368
11 changed files with 169 additions and 43 deletions
|
@ -1,40 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <filesystem>
|
||||
|
||||
#include "loggger.h"
|
||||
#include "collection.h"
|
||||
|
||||
class Component {
|
||||
public:
|
||||
enum State {
|
||||
initial,
|
||||
reading,
|
||||
building,
|
||||
ready
|
||||
};
|
||||
|
||||
enum Type {
|
||||
unknown,
|
||||
file,
|
||||
directory,
|
||||
mason
|
||||
};
|
||||
|
||||
Component(Logger* logger, Collection* collection);
|
||||
virtual ~Component();
|
||||
|
||||
Type getType() const;
|
||||
Type getState() const;
|
||||
|
||||
virtual void read(const std::filesystem::path& path) = 0;
|
||||
virtual void build(const std::filesystem::path& destination, const std::string& target) = 0;
|
||||
|
||||
protected:
|
||||
State state;
|
||||
Type type;
|
||||
Logger* logger;
|
||||
Collection* collection;
|
||||
std::filesystem::path location;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue