25 #ifndef PXR_USD_NDR_REGISTRY_H
26 #define PXR_USD_NDR_REGISTRY_H
304 using _TypeToParserPluginMap =
305 std::unordered_map<TfToken, NdrParserPlugin*, TfToken::HashFunctor>;
309 using _NodeMapKey = std::pair<NdrIdentifier, TfToken>;
310 using _NodeMap = std::unordered_map<_NodeMapKey, NdrNodeUniquePtr, TfHash>;
314 using _DiscoveryResultsByIdentifier = std::unordered_multimap<
316 using _DiscoveryResultsByIdentifierRange =
317 std::pair<_DiscoveryResultsByIdentifier::const_iterator,
318 _DiscoveryResultsByIdentifier::const_iterator>;
323 using _DiscoveryResultPtrsByName = std::unordered_multimap<
325 using _DiscoveryResultPtrsByNameRange =
326 std::pair<_DiscoveryResultPtrsByName::const_iterator,
327 _DiscoveryResultPtrsByName::const_iterator>;
331 mutable std::mutex _discoveryResultMutex;
335 mutable std::mutex _nodeMapMutex;
346 void _FindAndInstantiateDiscoveryPlugins();
349 void _FindAndInstantiateParserPlugins();
353 void _InstantiateParserPlugins(
const std::set<TfType>& parserPluginTypes);
365 _DiscoveryResultsByIdentifierRange
range,
const TfToken& sourceType);
371 _DiscoveryResultPtrsByNameRange
range,
const TfToken& sourceType,
393 _GetParserForDiscoveryType(
const TfToken& discoveryType)
const;
401 _TypeToParserPluginMap _parserPluginMap;
404 std::vector<std::unique_ptr<NdrParserPlugin>> _parserPlugins;
409 _DiscoveryResultsByIdentifier _discoveryResultsByIdentifier;
410 _DiscoveryResultPtrsByName _discoveryResultPtrsByName;
424 #endif // PXR_USD_NDR_REGISTRY_H
NDR_API void AddDiscoveryResult(NdrNodeDiscoveryResult &&discoveryResult)
NDR_API NdrStringVec GetSearchURIs() const
NdrVersionFilter
Enumeration used to select nodes by version.
std::vector< TfToken > NdrTokenVec
NDR_API NdrNodeConstPtr GetNodeByNameAndType(const std::string &name, const TfToken &sourceType, NdrVersionFilter filter=NdrVersionFilterDefaultOnly)
NdrNode const * NdrNodeConstPtr
GLsizei const GLchar *const * string
std::vector< NdrNodeConstPtr > NdrNodeConstPtrVec
NdrRegistry & operator=(const NdrRegistry &)=delete
NDR_API NdrNodeConstPtr GetNodeByIdentifier(const NdrIdentifier &identifier, const NdrTokenVec &sourceTypePriority=NdrTokenVec())
friend class _DiscoveryContext
NDR_API NdrNodeConstPtr GetNodeByIdentifierAndType(const NdrIdentifier &identifier, const TfToken &sourceType)
std::vector< NdrIdentifier > NdrIdentifierVec
NDR_API NdrNodeConstPtr GetNodeByName(const std::string &name, const NdrTokenVec &sourceTypePriority=NdrTokenVec(), NdrVersionFilter filter=NdrVersionFilterDefaultOnly)
NDR_API NdrIdentifierVec GetNodeIdentifiers(const TfToken &family=TfToken(), NdrVersionFilter filter=NdrVersionFilterDefaultOnly) const
std::vector< std::string > NdrStringVec
NDR_API NdrNodeConstPtr GetNodeFromSourceCode(const std::string &sourceCode, const TfToken &sourceType, const NdrTokenMap &metadata)
NdrDiscoveryPluginRefPtrVector DiscoveryPluginRefPtrVec
GLuint const GLchar * name
NDR_API NdrNodeConstPtrVec GetNodesByIdentifier(const NdrIdentifier &identifier)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
NDR_API void SetExtraDiscoveryPlugins(DiscoveryPluginRefPtrVec plugins)
std::unique_ptr< NdrNode > NdrNodeUniquePtr
#define PXR_NAMESPACE_CLOSE_SCOPE
NDR_API NdrStringVec GetNodeNames(const TfToken &family=TfToken()) const
std::unordered_map< TfToken, std::string, TfToken::HashFunctor > NdrTokenMap
NDR_API void SetExtraParserPlugins(const std::vector< TfType > &pluginTypes)
NDR_API NdrNodeConstPtr GetNodeFromAsset(const SdfAssetPath &asset, const NdrTokenMap &metadata, const TfToken &subIdentifier=TfToken(), const TfToken &sourceType=TfToken())
std::set< TfToken, TfTokenFastArbitraryLessThan > Set
NDR_API NdrNodeConstPtrVec GetNodesByName(const std::string &name, NdrVersionFilter filter=NdrVersionFilterDefaultOnly)
NDR_API NdrNodeConstPtrVec GetNodesByFamily(const TfToken &family=TfToken(), NdrVersionFilter filter=NdrVersionFilterDefaultOnly)
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
NDR_API NdrTokenVec GetAllNodeSourceTypes() const