Files
UnrealEngineUWP/Engine/Plugins/Runtime/Metasound/Source/MetasoundFrontend/Public/MetasoundFrontendSearchEngine.h
phil popp 39239bef3a Updates to Metasound Frontend Query system.
- Simplified and removed a bunch of code.
- Reworked queries to include the concept of a "Partition" mapped to a Key
- Added more unit tests to ensure it works correctly.
- Fixed some bugs around incremental updates.

#rb Rob.Gay
#jira UE-132803
#preflight 61af81f4b12ed605818b24c3

#ROBOMERGE-AUTHOR: phil.popp
#ROBOMERGE-SOURCE: CL 18400273 in //UE5/Release-5.0/... via CL 18400298
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v896-18170469)

[CL 18400305 by phil popp in ue5-release-engine-test branch]
2021-12-07 16:32:38 -05:00

56 lines
2.2 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "MetasoundFrontendArchetypeRegistry.h"
#include "MetasoundFrontendDocument.h"
#include "MetasoundNodeInterface.h"
namespace Metasound
{
namespace Frontend
{
/** Interface for frontend search engine. A frontend search engine provides
* a simple interface for common frontend queries. It also serves as an
* opportunity to cache queries to reduce CPU load.
*/
class METASOUNDFRONTEND_API ISearchEngine
{
public:
/** Return an instance of a search engine. */
static ISearchEngine& Get();
/** Find all FMetasoundFrontendClasses.
* (Optional) Include deprecated classes (i.e. versions of classes that are not the highest major version).
*/
virtual TArray<FMetasoundFrontendClass> FindAllClasses(bool bInIncludeDeprecated) = 0;
/** Find all classes with the given ClassName.
* (Optional) Sort matches based on version.
*/
virtual TArray<FMetasoundFrontendClass> FindClassesWithName(const FMetasoundFrontendClassName& InName, bool bInSortByVersion) = 0;
/** Find the highest version of a class with the given ClassName. Returns false if not found, true if found. */
virtual bool FindClassWithHighestVersion(const FMetasoundFrontendClassName& InName, FMetasoundFrontendClass& OutClass) = 0;
/** Find the class with the given ClassName & Major Version. Returns false if not found, true if found. */
virtual bool FindClassWithMajorVersion(const FMetasoundFrontendClassName& InName, int32 InMajorVersion, FMetasoundFrontendClass& OutClass) = 0;
virtual TArray<FMetasoundFrontendInterface> FindAllInterfaces(bool bInIncludeDeprecated = false) = 0;
virtual TArray<FMetasoundFrontendInterface> FindUClassDefaultInterfaces(FName InUClassName) = 0;
virtual TArray<FMetasoundFrontendVersion> FindAllRegisteredInterfacesWithName(FName InInterfaceName) = 0;
virtual bool FindInterfaceWithHighestVersion(FName InInterfaceName, FMetasoundFrontendInterface& OutInterface) = 0;
virtual bool FindInterfaceWithMajorVersion(FName InInterfaceName, int32 InMajorVersion, FMetasoundFrontendInterface& OutInterface) = 0;
virtual ~ISearchEngine() = default;
protected:
ISearchEngine() = default;
};
}
}