Moved C++ tools out
This commit is contained in:
33
archive/dawntools/util/parser/SceneCodeParser.hpp
Normal file
33
archive/dawntools/util/parser/SceneCodeParser.hpp
Normal file
@ -0,0 +1,33 @@
|
||||
// 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,
|
||||
SCENE_CODE_TYPE_INCLUDE
|
||||
};
|
||||
|
||||
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
|
||||
);
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user