Moved C++ tools out
This commit is contained in:
@ -0,0 +1,33 @@
|
||||
// Copyright (c) 2023 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#include "VNPositionEventParser.hpp"
|
||||
|
||||
using namespace Dawn;
|
||||
|
||||
std::vector<std::string> VNPositionEventParser::getRequiredAttributes() {
|
||||
return { "item" };
|
||||
}
|
||||
|
||||
std::map<std::string, std::string> VNPositionEventParser::getOptionalAttributes() {
|
||||
return {
|
||||
{ "x", "" },
|
||||
{ "y", "" },
|
||||
{ "z", "" }
|
||||
};
|
||||
}
|
||||
|
||||
int32_t VNPositionEventParser::onParse(
|
||||
Xml *node,
|
||||
std::map<std::string, std::string> values,
|
||||
struct VNPositionEvent *out,
|
||||
std::string *error
|
||||
) {
|
||||
out->x = values["x"];
|
||||
out->y = values["y"];
|
||||
out->z = values["z"];
|
||||
out->item = values["item"];
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user