26 lines
452 B
C++
26 lines
452 B
C++
#pragma once
|
|
|
|
#include <filesystem>
|
|
#include <fstream>
|
|
|
|
#include "shapes/group.hpp"
|
|
|
|
/**
|
|
* @brief Input file parser
|
|
*
|
|
* Parses an input file containing drawing commands and constructs a `Group` of shapes.
|
|
*/
|
|
class InputFile
|
|
{
|
|
public:
|
|
InputFile(const std::filesystem::path& path);
|
|
|
|
shapes::Group Parse();
|
|
|
|
size_t GetNumProcessedCmds() const { return m_cmdsProcessed; }
|
|
|
|
private:
|
|
std::ifstream m_file;
|
|
size_t m_cmdsProcessed;
|
|
};
|