mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-15 01:07:58 -05:00
27 lines
684 B
C++
27 lines
684 B
C++
#pragma once
|
|
|
|
#include "Parsing/Menu/MenuFileParser.h"
|
|
|
|
#include <functional>
|
|
#include <string>
|
|
|
|
namespace menu
|
|
{
|
|
class GenericIntPropertySequence final : public MenuFileParser::sequence_t
|
|
{
|
|
public:
|
|
using callback_t = std::function<void(MenuFileParserState* state, const TokenPos& pos, int value)>;
|
|
|
|
private:
|
|
static constexpr auto CAPTURE_FIRST_TOKEN = 1;
|
|
|
|
const callback_t m_set_callback;
|
|
|
|
protected:
|
|
void ProcessMatch(MenuFileParserState* state, SequenceResult<SimpleParserValue>& result) const override;
|
|
|
|
public:
|
|
GenericIntPropertySequence(std::string keywordName, callback_t setCallback);
|
|
};
|
|
} // namespace menu
|