28 lines
671 B
C++
28 lines
671 B
C++
// Copyright (c) 2023 Dominic Masters
|
|
//
|
|
// This software is released under the MIT License.
|
|
// https://opensource.org/licenses/MIT
|
|
|
|
#include "PrefabParser.hpp"
|
|
|
|
using namespace Dawn;
|
|
|
|
std::vector<std::string> PrefabParser::getRequiredAttributes() {
|
|
return { "name", "type" };
|
|
}
|
|
|
|
std::map<std::string, std::string> PrefabParser::getOptionalAttributes() {
|
|
return { };
|
|
}
|
|
|
|
int32_t PrefabParser::onParse(
|
|
Xml *node,
|
|
std::map<std::string, std::string> values,
|
|
struct Prefab *out,
|
|
std::string *error
|
|
) {
|
|
out->name = values["name"];
|
|
out->type = values["type"];
|
|
out->root.registry = out->registry;
|
|
return (SceneItemParser()).parse(node, &out->root, error);
|
|
} |