Files
UnrealEngineUWP/Engine/Plugins/Runtime/Metasound/Source/MetasoundFrontend/Public/MetasoundFrontendSearchEngine.h
T

57 lines
2.2 KiB
C++
Raw Normal View History

2021-03-30 18:22:10 -04:00
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "MetasoundFrontendArchetypeRegistry.h"
2021-03-30 18:22:10 -04:00
#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();
2021-12-07 18:37:04 -05:00
/** Updates internal state to speed up queries. */
virtual void Prime() = 0;
/** Find all FMetasoundFrontendClasses.
* (Optional) Include all versions (i.e. deprecated classes and versions of classes that are not the highest major version).
*/
virtual TArray<FMetasoundFrontendClass> FindAllClasses(bool bInIncludeAllVersions) = 0;
/** Find all classes with the given ClassName.
* (Optional) Sort matches based on version.
*/
2021-12-07 16:32:38 -05:00
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. */
2021-12-07 16:32:38 -05:00
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. */
2021-12-07 16:32:38 -05:00
virtual bool FindClassWithMajorVersion(const FMetasoundFrontendClassName& InName, int32 InMajorVersion, FMetasoundFrontendClass& OutClass) = 0;
2021-03-30 18:22:10 -04:00
virtual TArray<FMetasoundFrontendInterface> FindAllInterfaces(bool bInIncludeAllVersions = false) = 0;
2021-11-22 15:55:50 -05:00
virtual TArray<FMetasoundFrontendInterface> FindUClassDefaultInterfaces(FName InUClassName) = 0;
2021-11-22 15:55:50 -05:00
virtual TArray<FMetasoundFrontendVersion> FindAllRegisteredInterfacesWithName(FName InInterfaceName) = 0;
2021-11-22 15:55:50 -05:00
virtual bool FindInterfaceWithHighestVersion(FName InInterfaceName, FMetasoundFrontendInterface& OutInterface) = 0;
2021-03-30 18:22:10 -04:00
virtual ~ISearchEngine() = default;
protected:
ISearchEngine() = default;
};
}
}