Dawn/src/dawntools/prefabtool/PrefabComponentParser.hpp

30 lines
792 B
C++

// Copyright (c) 2023 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#pragma once
#include "PrefabRegistry.hpp"
namespace Dawn {
struct PrefabComponent {
struct PrefabRegistry *registry;
std::string include;
std::string type;
std::map<std::string, std::string> values;
std::string ref;
};
class PrefabComponentParser : public XmlParser<struct PrefabComponent> {
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 PrefabComponent *out,
std::string *error
) override;
};
}