30 lines
878 B
C++
30 lines
878 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/SceneItemComponentRegistry.hpp"
|
|
#include "util/parser/TypeParsers.hpp"
|
|
|
|
namespace Dawn {
|
|
struct SceneItemComponent {
|
|
struct SceneItemComponentRegistry *registry;
|
|
std::string include;
|
|
std::string type;
|
|
std::map<std::string, std::string> values;
|
|
std::string ref;
|
|
};
|
|
|
|
class SceneItemComponentParser : public XmlParser<struct SceneItemComponent> {
|
|
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 SceneItemComponent *out,
|
|
std::string *error
|
|
) override;
|
|
};
|
|
} |