// Copyright (c) 2023 Dominic Masters // // This software is released under the MIT License. // https://opensource.org/licenses/MIT #include "VNSceneChangeEventParser.hpp" using namespace Dawn; std::vector VNSceneChangeEventParser::getRequiredAttributes() { return { "scene" }; } std::map VNSceneChangeEventParser::getOptionalAttributes() { return {}; } int32_t VNSceneChangeEventParser::onParse( Xml *node, std::map values, struct VNSceneChangeEvent *out, std::string *error ) { out->include = values["scene"] + ".hpp"; // Find last slash and take all string after that size_t lastSlash = values["scene"].find_last_of('/'); if(lastSlash != std::string::npos) { out->scene = values["scene"].substr(lastSlash+1); } return 0; }