8#ifndef PXR_USD_SDR_DISCOVERY_PLUGIN_H
9#define PXR_USD_SDR_DISCOVERY_PLUGIN_H
14#include "pxr/usd/sdr/api.h"
16#include "pxr/base/tf/type.h"
21PXR_NAMESPACE_OPEN_SCOPE
26#define SDR_REGISTER_DISCOVERY_PLUGIN(DiscoveryPluginClass) \
27TF_REGISTRY_FUNCTION(TfType) \
29 TfType::Define<DiscoveryPluginClass, TfType::Bases<SdrDiscoveryPlugin>>() \
30 .SetFactory<SdrDiscoveryPluginFactory<DiscoveryPluginClass>>(); \
44 virtual TfToken GetSourceType(
const TfToken& discoveryType)
const = 0;
151 virtual SdrDiscoveryPluginRefPtr New()
const = 0;
155class SdrDiscoveryPluginFactory :
public SdrDiscoveryPluginFactoryBase
158 SdrDiscoveryPluginRefPtr New()
const override
160 return TfCreateRefPtr(
new T);
166PXR_NAMESPACE_CLOSE_SCOPE
Interface for discovery plugins for finding shader nodes.
virtual SDR_API SdrShaderNodeDiscoveryResultVec DiscoverShaderNodes(const Context &)=0
Finds and returns all nodes that the implementing plugin should be aware of.
virtual SDR_API const SdrStringVec & GetSearchURIs() const =0
Gets the URIs that this plugin is searching for nodes in.
Enable a concrete base class for use with TfRefPtr.
Token for efficient comparison, assignment, and hashing of known strings.
Base class of all factory types.
Enable a concrete base class for use with TfWeakPtr.
Standard pointer typedefs.
#define TF_DECLARE_WEAK_AND_REF_PTRS(type)
Define standard weak, ref, and vector pointer types.