32 lines
751 B
C++
32 lines
751 B
C++
// Copyright (c) 2023 Dominic Masters
|
|
//
|
|
// This software is released under the MIT License.
|
|
// https://opensource.org/licenses/MIT
|
|
|
|
#pragma once
|
|
#include "util/XmlParser.hpp"
|
|
|
|
namespace Dawn {
|
|
enum SceneCodeType {
|
|
SCENE_CODE_TYPE_PROPERTIES,
|
|
SCENE_CODE_TYPE_INIT
|
|
};
|
|
|
|
struct SceneCode {
|
|
enum SceneCodeType codeType;
|
|
std::string code;
|
|
};
|
|
|
|
class SceneCodeParser : public XmlParser<struct SceneCode> {
|
|
public:
|
|
virtual std::vector<std::string> getRequiredAttributes();
|
|
virtual std::map<std::string, std::string> getOptionalAttributes();
|
|
|
|
virtual int32_t onParse(
|
|
Xml *node,
|
|
std::map<std::string, std::string> values,
|
|
struct SceneCode *out,
|
|
std::string *error
|
|
);
|
|
};
|
|
} |