tdesktop/Telegram/SourceFiles/codegen/lang/processor.h

41 lines
865 B
C
Raw Normal View History

/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
2017-04-12 19:17:55 +00:00
#pragma once
2017-04-12 19:17:55 +00:00
#include <memory>
#include <QtCore/QString>
#include "codegen/lang/options.h"
namespace codegen {
namespace lang {
class ParsedFile;
struct LangPack;
2017-04-12 19:17:55 +00:00
// Walks through a file, parses it and generates the output.
class Processor {
public:
explicit Processor(const Options &options);
Processor(const Processor &other) = delete;
Processor &operator=(const Processor &other) = delete;
// Returns 0 on success.
int launch();
~Processor();
private:
bool write(const LangPack &langpack) const;
2017-04-12 19:17:55 +00:00
std::unique_ptr<ParsedFile> parser_;
const Options &options_;
};
} // namespace lang
} // namespace codegen