Moved C++ tools out
This commit is contained in:
30
archive/dawntools/vnscenetool/events/VNIfEventParser.cpp
Normal file
30
archive/dawntools/vnscenetool/events/VNIfEventParser.cpp
Normal file
@ -0,0 +1,30 @@
|
||||
// Copyright (c) 2023 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#include "VNIfEventParser.hpp"
|
||||
#include "VNSceneEventsParser.hpp"
|
||||
|
||||
using namespace Dawn;
|
||||
|
||||
std::vector<std::string> VNIfEventParser::getRequiredAttributes() {
|
||||
return { "key", "value" };
|
||||
}
|
||||
|
||||
std::map<std::string, std::string> VNIfEventParser::getOptionalAttributes() {
|
||||
return {};
|
||||
}
|
||||
|
||||
int32_t VNIfEventParser::onParse(
|
||||
Xml *node,
|
||||
std::map<std::string, std::string> values,
|
||||
struct VNIfEvent *out,
|
||||
std::string *error
|
||||
) {
|
||||
//Get the key and value
|
||||
out->key = values["key"];
|
||||
out->value = values["value"];
|
||||
|
||||
return (VNSceneEventsParser()).parse(node, &out->events, error);
|
||||
}
|
Reference in New Issue
Block a user