8#ifndef PXR_USD_NDR_PARSER_PLUGIN_H
9#define PXR_USD_NDR_PARSER_PLUGIN_H
14#include "pxr/usd/ndr/api.h"
15#include "pxr/base/tf/type.h"
20PXR_NAMESPACE_OPEN_SCOPE
26#define NDR_REGISTER_PARSER_PLUGIN(ParserPluginClass) \
27TF_REGISTRY_FUNCTION(TfType) \
29 TfType::Define<ParserPluginClass, TfType::Bases<NdrParserPlugin>>() \
30 .SetFactory<NdrParserPluginFactory<ParserPluginClass>>(); \
160class NdrParserPluginFactory :
public NdrParserPluginFactoryBase
171PXR_NAMESPACE_CLOSE_SCOPE
Interface for parser plugins.
virtual NDR_API NdrNodeUniquePtr Parse(const NdrNodeDiscoveryResult &discoveryResult)=0
Takes the specified NdrNodeDiscoveryResult instance, which was a result of the discovery process,...
virtual NDR_API const NdrTokenVec & GetDiscoveryTypes() const =0
Returns the types of nodes that this plugin can parse.
static NDR_API NdrNodeUniquePtr GetInvalidNode(const NdrNodeDiscoveryResult &dr)
Gets an invalid node based on the discovery result provided.
virtual NDR_API const TfToken & GetSourceType() const =0
Returns the source type that this parser operates on.
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.
Represents the raw data of a node, and some other bits of metadata, that were determined via a NdrDis...
Common typedefs that are used throughout the NDR library.
Pointer storage with deletion detection.