// Copyright (c) 2023 Dominic Masters // // This software is released under the MIT License. // https://opensource.org/licenses/MIT #include "VNWaitEventParser.hpp" using namespace Dawn; std::vector VNWaitEventParser::getRequiredAttributes() { return { }; } std::map VNWaitEventParser::getOptionalAttributes() { return { { "duration", "" }, { "time", "" } }; } int32_t VNWaitEventParser::onParse( Xml *node, std::map values, VNWaitEvent *out, std::string *error ) { //Get the duration if(!values["duration"].empty()) { out->duration = values["duration"]; } else if(!values["time"].empty()) { out->duration = values["time"]; } else { *error = "No duration specified."; return -1; } return 0; }