24 lines
489 B
C++
24 lines
489 B
C++
#include "component.h"
|
|
|
|
Component::Component(const std::shared_ptr<Collection>& collection, const std::shared_ptr<Logger>& logger):
|
|
Loggable(logger),
|
|
collection(collection)
|
|
{}
|
|
|
|
void Component::read(const std::filesystem::path& path) {
|
|
if (state != initial)
|
|
throw WrongState(state, "read");
|
|
|
|
location = path;
|
|
state = reading;
|
|
}
|
|
|
|
|
|
Component::State Component::getState() const {
|
|
return state;
|
|
}
|
|
|
|
Component::Type Component::getType() const {
|
|
return type;
|
|
}
|