mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 16:15:43 +00:00
30 lines
662 B
C++
30 lines
662 B
C++
#pragma once
|
|
|
|
#include <stack>
|
|
#include <fstream>
|
|
|
|
#include "Parsing/IParserLineStream.h"
|
|
|
|
class ParserFilesystemStream final : public IParserLineStream
|
|
{
|
|
class FileInfo
|
|
{
|
|
public:
|
|
std::string m_file_path;
|
|
std::ifstream m_stream;
|
|
int m_line_number;
|
|
|
|
explicit FileInfo(std::string filePath);
|
|
};
|
|
std::stack<FileInfo> m_files;
|
|
|
|
public:
|
|
explicit ParserFilesystemStream(std::string path);
|
|
|
|
ParserLine NextLine() override;
|
|
bool IncludeFile(const std::string& filename) override;
|
|
void PopCurrentFile() override;
|
|
_NODISCARD bool IsOpen() const override;
|
|
_NODISCARD bool Eof() const override;
|
|
};
|