Add base for menu eventhandlerset parsing

This commit is contained in:
Jan
2021-11-06 16:28:24 +01:00
parent b15efd4a4c
commit bf19208351
19 changed files with 334 additions and 46 deletions

View File

@ -0,0 +1,27 @@
#pragma once
#include <string>
#include <functional>
#include "Parsing/Menu/MenuFileParser.h"
#include "Parsing/Menu/Domain/EventHandler/CommonEventHandlerSet.h"
namespace menu
{
class GenericMenuEventHandlerSetPropertySequence final : public MenuFileParser::sequence_t
{
public:
using callback_t = std::function<void(MenuFileParserState* state, std::unique_ptr<CommonEventHandlerSet> 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:
GenericMenuEventHandlerSetPropertySequence(std::string keywordName, callback_t setCallback);
};
}