mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-15 17:27:57 -05:00
Move item parsing sequences for different scopes into the same class
This commit is contained in:
@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <functional>
|
||||
|
||||
#include "Parsing/Menu/MenuFileParser.h"
|
||||
|
||||
namespace menu
|
||||
{
|
||||
class GenericIntPropertySequence final : public MenuFileParser::sequence_t
|
||||
{
|
||||
public:
|
||||
using callback_t = std::function<void(MenuFileParserState* state, int 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:
|
||||
GenericIntPropertySequence(std::string keywordName, callback_t setCallback);
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user