This document is for a version of USD that is under development. See this page for the current release.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
shaderDefParser.h
1//
2// Copyright 2018 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_USD_USD_SHADE_SHADER_DEF_PARSER_H
8#define PXR_USD_USD_SHADE_SHADER_DEF_PARSER_H
9
10#include "pxr/usd/usdShade/api.h"
11
12#include "pxr/usd/ndr/declare.h"
13#include "pxr/usd/ndr/discoveryPlugin.h"
15
16PXR_NAMESPACE_OPEN_SCOPE
17
18class UsdStageCache;
19
26{
27public:
28 USDSHADE_API
30
31 USDSHADE_API
32 ~UsdShadeShaderDefParserPlugin() override = default;
33
34 USDSHADE_API
35 NdrNodeUniquePtr Parse(const NdrNodeDiscoveryResult &discoveryResult)
36 override;
37
38 USDSHADE_API
39 const NdrTokenVec &GetDiscoveryTypes() const override;
40
41 USDSHADE_API
42 const TfToken &GetSourceType() const override;
43
44private:
45 static UsdStageCache _cache;
46};
47
48PXR_NAMESPACE_CLOSE_SCOPE
49
50#endif // PXR_USD_USD_SHADE_SHADER_DEF_PARSER_H
Interface for parser plugins.
Definition: parserPlugin.h:109
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71
Parses shader definitions represented using USD scene description using the schemas provided by UsdSh...
USDSHADE_API const TfToken & GetSourceType() const override
Returns the source type that this parser operates on.
USDSHADE_API NdrNodeUniquePtr Parse(const NdrNodeDiscoveryResult &discoveryResult) override
Takes the specified NdrNodeDiscoveryResult instance, which was a result of the discovery process,...
USDSHADE_API const NdrTokenVec & GetDiscoveryTypes() const override
Returns the types of nodes that this plugin can parse.
A strongly concurrency safe collection of UsdStageRefPtr s, enabling sharing across multiple clients ...
Definition: stageCache.h:68
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.