// 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 Metadata; inline Module(UInt32 shaderLangVersion, const Uuid& moduleId = Uuid::Generate()); inline Module(std::shared_ptr metadata); inline Module(std::shared_ptr metadata, MultiStatementPtr rootNode); Module(const Module&) = default; Module(Module&&) noexcept = default; ~Module() = default; Module& operator=(const Module&) = default; Module& operator=(Module&&) noexcept = default; struct ImportedModule { std::string identifier; std::vector dependencies; ModulePtr module; }; struct Metadata { UInt32 shaderLangVersion; Uuid moduleId; }; std::shared_ptr metadata; std::vector importedModules; MultiStatementPtr rootNode; }; } #include #endif // NAZARA_SHADER_AST_MODULE_HPP