loom
1/*
2MIT License
3
4Copyright (c) 2019 МГТУ им. Н.Э. Баумана, кафедра ИУ-6, Михаил Фетисов,
5
6https://bmstu.codes/lsx/simodo/loom
7*/
8
9#include "simodo/inout/token/RegularInputStreamSupplier.h"
10#include "simodo/inout/token/FileStream.h"
11
12namespace simodo::inout
13{
14std::shared_ptr<InputStream_interface> RegularInputStreamSupplier::supply(const std::string & path) const
15{
16std::shared_ptr<InputStream_interface> in = std::make_shared<FileStream>(path);
17
18if (in->good())
19return in;
20
21return std::shared_ptr<InputStream_interface>();
22}
23
24}