HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
targetIndex.h
Go to the documentation of this file.
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_TARGET_INDEX_H
8 #define PXR_USD_PCP_TARGET_INDEX_H
9 
10 #include "pxr/pxr.h"
11 #include "pxr/usd/pcp/api.h"
12 #include "pxr/usd/pcp/errors.h"
14 #include "pxr/usd/sdf/path.h"
15 
17 
19 class PcpCache;
20 class PcpPropertyIndex;
21 
22 /// \class PcpTargetIndex
23 ///
24 /// A PcpTargetIndex represents the results of indexing the target
25 /// paths of a relationship or attribute. Note that this is just
26 /// the result; it does not retain all of the input arguments used
27 /// in computing the index, such as the owning property.
28 ///
32  bool hasTargetOpinions = false;
33 };
34 
35 /// Build a PcpTargetIndex representing the target paths of the given
36 /// property.
37 ///
38 /// \p propIndex is a PcpPropertyIndex of the relationship or attribute.
39 /// \p relOrAttrType indicates if the property is a relationship
40 /// or attribute.
41 /// \p allErrors will contain any errors encountered while
42 /// performing this operation.
43 ///
44 /// Note that this function will skip the validation checks performed
45 /// by PcpBuildFilteredTargetIndex. See documentation below for details.
46 PCP_API
47 void
49  const PcpSite& propSite,
50  const PcpPropertyIndex& propIndex,
51  const SdfSpecType relOrAttrType,
52  PcpTargetIndex *targetIndex,
53  PcpErrorVector *allErrors);
54 
55 /// Like PcpBuildTargetIndex, but optionally filters the result by
56 /// enforcing permissions restrictions and a stopProperty.
57 ///
58 /// If \p localOnly is \c true then this will compose relationship
59 /// targets from local nodes only. If \p stopProperty is not \c
60 /// NULL then this will stop composing relationship targets at \p
61 /// stopProperty, including \p stopProperty iff \p includeStopProperty
62 /// is \c true.
63 ///
64 /// \p cacheForValidation is a PcpCache that will be used to compute
65 /// additional prim indexes as needed for validation. NULL may be
66 /// passed in, but doing so will disable validation that relies on
67 /// this cache, which includes permissions checks.
68 ///
69 /// \p deletedPaths, if not \c NULL, will be populated with target
70 /// paths whose deletion contributed to the computed value of
71 /// \c targetIndex->paths.
72 ///
73 /// \p allErrors will contain any errors encountered while
74 /// performing this operation.
75 PCP_API
76 void
78  const PcpSite& propSite,
79  const PcpPropertyIndex& propIndex,
80  const SdfSpecType relOrAttrType,
81  const bool localOnly,
82  const SdfSpecHandle &stopProperty,
83  const bool includeStopProperty,
84  PcpCache *cacheForValidation,
85  PcpTargetIndex *targetIndex,
86  SdfPathVector *deletedPaths,
87  PcpErrorVector *allErrors);
88 
90 
91 #endif // PXR_USD_PCP_TARGET_INDEX_H
Definition: cache.h:76
Definition: spec.h:32
Definition: site.h:28
SdfPathVector paths
Definition: targetIndex.h:30
std::vector< class SdfPath > SdfPathVector
PcpErrorVector localErrors
Definition: targetIndex.h:31
std::vector< PcpErrorBasePtr > PcpErrorVector
Definition: errors.h:65
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
SdfSpecType
Definition: types.h:68
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
PCP_API void PcpBuildTargetIndex(const PcpSite &propSite, const PcpPropertyIndex &propIndex, const SdfSpecType relOrAttrType, PcpTargetIndex *targetIndex, PcpErrorVector *allErrors)
PXR_NAMESPACE_OPEN_SCOPE SDF_DECLARE_HANDLES(SdfSpec)
PCP_API void PcpBuildFilteredTargetIndex(const PcpSite &propSite, const PcpPropertyIndex &propIndex, const SdfSpecType relOrAttrType, const bool localOnly, const SdfSpecHandle &stopProperty, const bool includeStopProperty, PcpCache *cacheForValidation, PcpTargetIndex *targetIndex, SdfPathVector *deletedPaths, PcpErrorVector *allErrors)
#define PCP_API
Definition: api.h:23
bool hasTargetOpinions
Definition: targetIndex.h:32