29 lines
790 B
C++
29 lines
790 B
C++
// Copyright (c) 2023 Dominic Masters
|
|
//
|
|
// This software is released under the MIT License.
|
|
// https://opensource.org/licenses/MIT
|
|
|
|
#pragma once
|
|
#include "util/parser/SceneItemComponentParser.hpp"
|
|
#include "util/parser/SceneItemParser.hpp"
|
|
|
|
namespace Dawn {
|
|
struct Prefab {
|
|
struct SceneItemComponentRegistry *registry;
|
|
struct SceneItem root;
|
|
std::string name;
|
|
std::string type;
|
|
};
|
|
|
|
class PrefabParser : public XmlParser<struct Prefab> {
|
|
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 Prefab *out,
|
|
std::string *error
|
|
) override;
|
|
};
|
|
} |