Moved C++ tools out
This commit is contained in:
41
archive/dawntools/util/parser/SceneItemComponentRegistry.hpp
Normal file
41
archive/dawntools/util/parser/SceneItemComponentRegistry.hpp
Normal file
@ -0,0 +1,41 @@
|
||||
// Copyright (c) 2023 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "util/DawnTool.hpp"
|
||||
#include "util/Directory.hpp"
|
||||
#include "util/XmlParser.hpp"
|
||||
#include "util/CodeGen.hpp"
|
||||
#include "util/string.hpp"
|
||||
#include <regex>
|
||||
|
||||
namespace Dawn {
|
||||
struct SceneItemComponentRuleset {
|
||||
std::string name;
|
||||
std::string include;
|
||||
std::map<std::string, std::string> selfOptional;
|
||||
std::map<std::string, std::string> innerXml;
|
||||
std::map<std::string, std::string> optional;
|
||||
std::vector<std::string> extends;
|
||||
};
|
||||
|
||||
struct SceneItemComponentRegistry {
|
||||
std::string sources;
|
||||
std::map<std::string, struct SceneItemComponentRuleset> rulesets;
|
||||
|
||||
struct SceneItemComponentRuleset parseFile(
|
||||
File *file,
|
||||
std::string clazz
|
||||
);
|
||||
|
||||
/**
|
||||
* Gets a prefab component ruleset for a specific scene item component type.
|
||||
*
|
||||
* @param type Scene Item Component Type to get ruleset for.
|
||||
* @return The found ruleset, or an empty ruleset if not found.
|
||||
*/
|
||||
struct SceneItemComponentRuleset getRuleset(std::string type);
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user