Moved C++ tools out
This commit is contained in:
44
archive/dawntools/vnscenetool/events/VNChoiceEventParser.hpp
Normal file
44
archive/dawntools/vnscenetool/events/VNChoiceEventParser.hpp
Normal file
@ -0,0 +1,44 @@
|
||||
// Copyright (c) 2023 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "VNTextEventParser.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
struct VNChoice {
|
||||
std::vector<struct VNText> texts;
|
||||
std::string value;
|
||||
};
|
||||
|
||||
struct VNChoiceEvent {
|
||||
std::vector<struct VNText> titles;
|
||||
std::vector<struct VNChoice> choices;
|
||||
std::string key;
|
||||
};
|
||||
|
||||
class VNChoiceParser : public XmlParser<struct VNChoice> {
|
||||
protected:
|
||||
std::vector<std::string> getRequiredAttributes() override;
|
||||
std::map<std::string, std::string> getOptionalAttributes() override;
|
||||
int32_t onParse(
|
||||
Xml *node,
|
||||
std::map<std::string, std::string> values,
|
||||
struct VNChoice *out,
|
||||
std::string *error
|
||||
) override;
|
||||
};
|
||||
|
||||
class VNChoicesEventParser : public XmlParser<struct VNChoiceEvent> {
|
||||
protected:
|
||||
std::vector<std::string> getRequiredAttributes() override;
|
||||
std::map<std::string, std::string> getOptionalAttributes() override;
|
||||
int32_t onParse(
|
||||
Xml *node,
|
||||
std::map<std::string, std::string> values,
|
||||
struct VNChoiceEvent *out,
|
||||
std::string *error
|
||||
) override;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user