Files
Dawn/src/dawntools/prefabtool/PrefabChildParser.hpp
2023-04-02 13:22:29 -07:00

33 lines
913 B
C++

// Copyright (c) 2023 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#pragma once
#include "PrefabComponentParser.hpp"
#include "PrefabAssetParser.hpp"
namespace Dawn {
struct PrefabChild {
struct PrefabRegistry *registry;
std::string ref;
std::string position;
std::string scale;
std::vector<struct PrefabComponent> components;
std::vector<struct PrefabChild> children;
std::vector<struct PrefabAsset> assets;
};
class PrefabChildParser : public XmlParser<struct PrefabChild> {
protected:
std::vector<std::string> getRequiredAttributes() override;
std::map<std::string, std::string> getOptionalAttributes() override;
int32_t onParse(
Xml *node,
std::map<std::string, std::string> values,
struct PrefabChild *out,
std::string *error
) override;
};
}