// Copyright (c) 2023 Dominic Masters // // This software is released under the MIT License. // https://opensource.org/licenses/MIT #pragma once #include "util/XmlParser.hpp" #include "util/CodeGen.hpp" namespace Dawn { struct AssetInformation { std::string type; std::string name; }; class AssetParser : public XmlParser { protected: std::vector getRequiredAttributes() { return std::vector{ "name", "type" }; } std::map getOptionalAttributes() { return std::map(); } int32_t onParse( Xml *node, std::map values, struct AssetInformation *out, std::string *error ) { out->name = values["name"]; out->type = values["type"]; return 0; } std::string convert(struct AssetInformation info) { std::string out; return out; } }; class AssetGen : public CodeGen { public: static void generate( std::vector *out, struct AssetInformation *info, std::string tabs ) { return line(out, "// Asset will be generated here", tabs); } }; }