25 #ifndef PXR_USD_NDR_PARSER_PLUGIN_H 26 #define PXR_USD_NDR_PARSER_PLUGIN_H 31 #include "pxr/usd/ndr/api.h" 32 #include "pxr/base/tf/type.h" 37 PXR_NAMESPACE_OPEN_SCOPE
43 #define NDR_REGISTER_PARSER_PLUGIN(ParserPluginClass) \ 44 TF_REGISTRY_FUNCTION(TfType) \ 46 TfType::Define<ParserPluginClass, TfType::Bases<NdrParserPlugin>>() \ 47 .SetFactory<NdrParserPluginFactory<ParserPluginClass>>(); \ 137 virtual NdrNodeUniquePtr
Parse(
177 class NdrParserPluginFactory :
public NdrParserPluginFactoryBase
188 PXR_NAMESPACE_CLOSE_SCOPE
190 #endif // PXR_USD_NDR_PARSER_PLUGIN_H virtual NDR_API const TfToken & GetSourceType() const =0
Returns the source type that this parser operates on.
Interface for parser plugins.
Pointer storage with deletion detection.
Base class of all factory types.
Token for efficient comparison, assignment, and hashing of known strings.
virtual NDR_API NdrNodeUniquePtr Parse(const NdrNodeDiscoveryResult &discoveryResult)=0
Takes the specified NdrNodeDiscoveryResult instance, which was a result of the discovery process,...
Represents the raw data of a node, and some other bits of metadata, that were determined via a NdrDis...
static NDR_API NdrNodeUniquePtr GetInvalidNode(const NdrNodeDiscoveryResult &dr)
Gets an invalid node based on the discovery result provided.
virtual NDR_API const NdrTokenVec & GetDiscoveryTypes() const =0
Returns the types of nodes that this plugin can parse.
Enable a concrete base class for use with TfWeakPtr.