// Copyright (C) 2022 Jérôme "Lynix" Leclercq (lynix680@gmail.com) // This file is part of the "Nazara Engine - Shader module" // For conditions of distribution and use, see copyright notice in Config.hpp #pragma once #ifndef NAZARA_SHADER_AST_MODULE_HPP #define NAZARA_SHADER_AST_MODULE_HPP #include #include #include #include #include namespace Nz::ShaderAst { class Module; using ModulePtr = std::shared_ptr; class Module { public: struct ImportedModule; struct Metadata; inline Module(UInt32 shaderLangVersion, std::string moduleName = std::string(), const Uuid& moduleId = Uuid::Generate()); inline Module(std::shared_ptr metadata, std::vector importedModules = {}); inline Module(std::shared_ptr metadata, MultiStatementPtr rootNode, std::vector importedModules = {}); Module(const Module&) = delete; Module(Module&&) noexcept = default; ~Module() = default; Module& operator=(const Module&) = delete; Module& operator=(Module&&) noexcept = default; struct ImportedModule { std::string identifier; ModulePtr module; }; struct Metadata { std::string moduleName; UInt32 shaderLangVersion; Uuid moduleId; }; std::shared_ptr metadata; std::vector importedModules; MultiStatementPtr rootNode; }; } #include #endif // NAZARA_SHADER_AST_MODULE_HPP