30 lines
535 B
C++
30 lines
535 B
C++
#ifndef CONVERTER_H
|
|
#define CONVERTER_H
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
class Converter {
|
|
public:
|
|
explicit Converter (std::string input_file_name);
|
|
~Converter();
|
|
|
|
Converter (const Converter &) = delete;
|
|
Converter &operator= (const Converter &) = delete;
|
|
|
|
bool save (const std::string &output_file_name);
|
|
[[nodiscard]] int error_code() const noexcept;
|
|
|
|
protected:
|
|
bool parse();
|
|
|
|
private:
|
|
struct Impl;
|
|
|
|
std::string input_file_name_;
|
|
std::unique_ptr<Impl> impl_;
|
|
int error_code_ = 0;
|
|
};
|
|
|
|
#endif // CONVERTER_H
|