24#ifndef PXR_USD_PCP_EXPRESSION_VARIABLES_H
25#define PXR_USD_PCP_EXPRESSION_VARIABLES_H
28#include "pxr/usd/pcp/api.h"
30#include "pxr/usd/pcp/expressionVariablesSource.h"
35#include <unordered_map>
37PXR_NAMESPACE_OPEN_SCOPE
77 : _source(
std::move(source))
78 , _expressionVariables(
std::move(expressionVariables))
85 return (
this == &rhs) ||
86 (std::tie(_source, _expressionVariables) ==
87 std::tie(rhs._source, rhs._expressionVariables));
92 return !(*
this == rhs);
102 {
return _expressionVariables; }
106 { _expressionVariables = variables; }
138 using _IdentifierToExpressionVarsMap = std::unordered_map<
140 _IdentifierToExpressionVarsMap _identifierToExpressionVars;
143PXR_NAMESPACE_CLOSE_SCOPE
Helper object for computing PcpExpressionVariable objects.
PCP_API const PcpExpressionVariables & ComputeExpressionVariables(const PcpLayerStackIdentifier &id)
Compute the composed expression variables for the layer stack with the given id.
Object containing composed expression variables associated with a given layer stack,...
PcpExpressionVariables()=default
Create a new object with no expression variables and the source set to the root layer stack.
const VtDictionary & GetVariables() const
Returns the composed expression variables dictionary.
PcpExpressionVariables(PcpExpressionVariablesSource &&source, VtDictionary &&expressionVariables)
Creates a new object for source with the given expressionVariables.
PcpExpressionVariables(const PcpExpressionVariablesSource &source, const VtDictionary &expressionVariables)
Creates a new object for source with the given expressionVariables.
static PCP_API PcpExpressionVariables Compute(const PcpLayerStackIdentifier &sourceLayerStackId, const PcpLayerStackIdentifier &rootLayerStackId, const PcpExpressionVariables *overrideExpressionVars=nullptr)
Compute the composed expression variables for sourceLayerStackId, recursively computing and composing...
void SetVariables(const VtDictionary &variables)
Set the composed expression variables to variables.
const PcpExpressionVariablesSource & GetSource() const
Return the source of the composed expression variables.
Represents the layer stack associated with a set of expression variables.
Arguments used to identify a layer stack.
A user-extensible hashing mechanism for use with runtime hash tables.
A map with string keys and VtValue values.