Open 3D Engine GraphModel Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
GraphModel::ModuleGraphManager Class Reference

#include <ModuleGraphManager.h>

Inherits AzToolsFramework::AssetSystemBus::Handler.

Public Member Functions

 AZ_CLASS_ALLOCATOR (ModuleGraphManager, AZ::SystemAllocator)
 
 AZ_RTTI (ModuleGraphManager, "{68476353-C672-4408-9B34-A409CC63858E}")
 
 ModuleGraphManager (GraphContextPtr graphContext, AZ::SerializeContext *serializeContext=nullptr)
 
AZ::Outcome< ConstGraphPtr, AZStd::string > GetModuleGraph (AZ::Uuid sourceFileId)
 

Protected Member Functions

virtual ConstGraphPtr LoadGraph (AZ::IO::FileIOStream &stream)
 Loads a module graph from the given stream.
 
void SourceFileChanged (AZStd::string relativePath, AZStd::string scanFolder, AZ::Uuid sourceUUID) override
 WHen a module graph source file is added or changed, this will cause the Graph to be reloaded.
 

Detailed Description

This is a manager that exists to support ModuleNode. A ModuleNode is a node that contains another node graph to be reused as a single node. If there are multiple ModuleNode instances that all use the same graph, we should only need one copy of the referenced graph in memory. The collection of available modules graphs will be managed here. The graphs stored here are const/immutable, and used only for instancing ModuleNodes, which do not make any changes to the underlying module graph.

Member Function Documentation

◆ GetModuleGraph()

AZ::Outcome< ConstGraphPtr, AZStd::string > GraphModel::ModuleGraphManager::GetModuleGraph ( AZ::Uuid  sourceFileId)

Returns the Graph loaded from a module source file. If the file has already been loaded, it simply returns the Graph. If it has not been loaded yet, this function will first load the Graph from the source file.

Parameters
sourceFileIdUnique Id of the sourfe file that contains a module graph

The documentation for this class was generated from the following file: