Move item parsing sequences for different scopes into the same class

This commit is contained in:
Jan
2021-11-06 11:03:15 +01:00
parent 321794a209
commit b15efd4a4c
45 changed files with 449 additions and 441 deletions

View File

@ -0,0 +1,26 @@
#pragma once
#include <string>
#include <functional>
#include "Parsing/Menu/MenuFileParser.h"
namespace menu
{
class GenericBoolPropertySequence final : public MenuFileParser::sequence_t
{
public:
using callback_t = std::function<void(MenuFileParserState* state, bool value)>;
private:
static constexpr auto CAPTURE_VALUE = 1;
const callback_t m_set_callback;
protected:
void ProcessMatch(MenuFileParserState* state, SequenceResult<SimpleParserValue>& result) const override;
public:
GenericBoolPropertySequence(std::string keywordName, callback_t setCallback);
};
}