mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-21 16:45:44 +00:00
27 lines
660 B
C++
27 lines
660 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <functional>
|
|
|
|
#include "Parsing/Menu/MenuFileParser.h"
|
|
|
|
namespace menu
|
|
{
|
|
class GenericStringPropertySequence final : public MenuFileParser::sequence_t
|
|
{
|
|
public:
|
|
using callback_t = std::function<void(MenuFileParserState* state, const std::string& 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:
|
|
GenericStringPropertySequence(std::string keywordName, callback_t setCallback);
|
|
};
|
|
}
|