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
namespaceEdits.h
1//
2// Copyright 2016 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_PCP_NAMESPACE_EDITS_H
8#define PXR_USD_PCP_NAMESPACE_EDITS_H
9
10#include "pxr/pxr.h"
11#include "pxr/usd/pcp/api.h"
12#include "pxr/usd/pcp/cache.h"
13#include "pxr/base/tf/hashset.h"
14
15#include <string>
16#include <vector>
17
18PXR_NAMESPACE_OPEN_SCOPE
19
20// Forward declarations:
21class PcpChanges;
22class PcpCacheChanges;
23class Pcp_Dependencies;
25class PcpLifeboat;
26class PcpNodeRef;
27class PcpMapFunction;
28
30TF_DECLARE_WEAK_AND_REF_PTRS(Pcp_LayerStackRegistry);
31SDF_DECLARE_HANDLES(SdfSpec);
32
35
38 enum EditType {
45 };
46
47 void Swap(PcpNamespaceEdits& rhs)
48 {
49 cacheSites.swap(rhs.cacheSites);
52 }
53
55 struct CacheSite {
56 size_t cacheIndex;
59 };
60 typedef std::vector<CacheSite> CacheSites;
61
65 size_t cacheIndex;
67 PcpLayerStackPtr layerStack;
71 };
72 typedef std::vector<LayerStackSite> LayerStackSites;
73
75 CacheSites cacheSites;
76
78 LayerStackSites layerStackSites;
79
84 LayerStackSites invalidLayerStackSites;
85};
86
119PCP_API
121PcpComputeNamespaceEdits(const PcpCache *primaryCache,
122 const std::vector<PcpCache*>& caches,
123 const SdfPath& curPath,
124 const SdfPath& newPath,
125 const SdfLayerHandle& relocatesLayer);
126
127PXR_NAMESPACE_CLOSE_SCOPE
128
129#endif // PXR_USD_PCP_NAMESPACE_EDITS_H
Types of changes per cache.
Definition: changes.h:101
PcpCache is the context required to make requests of the Pcp composition algorithm and cache the resu...
Definition: cache.h:77
Describes Pcp changes.
Definition: changes.h:198
Represents a stack of layers that contribute opinions to composition.
Definition: layerStack.h:50
Arguments used to identify a layer stack.
Structure used to temporarily retain layers and layerStacks within a code block.
Definition: changes.h:166
A function that maps values from one namespace (and time domain) to another.
Definition: mapFunction.h:65
PcpNode represents a node in an expression tree for compositing scene description.
Definition: node.h:47
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
Base class for all Sdf spec classes.
Definition: spec.h:33
#define TF_DECLARE_WEAK_AND_REF_PTRS(type)
Define standard weak, ref, and vector pointer types.
Definition: declarePtrs.h:72
Sites that must respond to a namespace edit.
SdfPath newPath
New path of site.
LayerStackSites layerStackSites
Layer stack sites that must respond to a namespace edit.
CacheSites cacheSites
Cache sites that must respond to a namespace edit.
size_t cacheIndex
Index of cache of site.
SdfPath sitePath
Path of site needing fix.
PcpLayerStackPtr layerStack
Layer stack needing fix.
SdfPath oldPath
Old path of site.
EditType
Types of namespace edits that a given layer stack site could need to perform to respond to a namespac...
@ EditSpecializes
Must fixup specializes.
@ EditRelocate
Must fixup relocates.
@ EditReference
Must fixup references.
@ EditPath
Must namespace edit spec.
@ EditInherit
Must fixup inherits.
@ EditPayload
Must fixup payload.
LayerStackSites invalidLayerStackSites
Layer stack sites that are affected by a namespace edit but cannot respond properly.
Cache site that must respond to a namespace edit.
Layer stack site that must respond to a namespace edit.