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 Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 #ifndef PXR_USD_PCP_TARGET_INDEX_H
25 #define PXR_USD_PCP_TARGET_INDEX_H
26 
27 #include "pxr/pxr.h"
28 #include "pxr/usd/pcp/api.h"
29 #include "pxr/usd/pcp/errors.h"
31 #include "pxr/usd/sdf/path.h"
32 
34 
36 class PcpCache;
37 class PcpPropertyIndex;
38 
39 /// \class PcpTargetIndex
40 ///
41 /// A PcpTargetIndex represents the results of indexing the target
42 /// paths of a relationship or attribute. Note that this is just
43 /// the result; it does not retain all of the input arguments used
44 /// in computing the index, such as the owning property.
45 ///
49 };
50 
51 /// Build a PcpTargetIndex representing the target paths of the given
52 /// property.
53 ///
54 /// \p propIndex is a PcpPropertyIndex of the relationship or attribute.
55 /// \p relOrAttrType indicates if the property is a relationship
56 /// or attribute.
57 /// \p allErrors will contain any errors encountered while
58 /// performing this operation.
59 ///
60 /// Note that this function will skip the validation checks performed
61 /// by PcpBuildFilteredTargetIndex. See documentation below for details.
62 PCP_API
63 void
65  const PcpSite& propSite,
66  const PcpPropertyIndex& propIndex,
67  const SdfSpecType relOrAttrType,
68  PcpTargetIndex *targetIndex,
69  PcpErrorVector *allErrors);
70 
71 /// Like PcpBuildTargetIndex, but optionally filters the result by
72 /// enforcing permissions restrictions and a stopProperty.
73 ///
74 /// If \p localOnly is \c true then this will compose relationship
75 /// targets from local nodes only. If \p stopProperty is not \c
76 /// NULL then this will stop composing relationship targets at \p
77 /// stopProperty, including \p stopProperty iff \p includeStopProperty
78 /// is \c true.
79 ///
80 /// \p cacheForValidation is a PcpCache that will be used to compute
81 /// additional prim indexes as needed for validation. NULL may be
82 /// passed in, but doing so will disable validation that relies on
83 /// this cache, which includes permissions checks.
84 ///
85 /// \p deletedPaths, if not \c NULL, will be populated with target
86 /// paths whose deletion contributed to the computed value of
87 /// \c targetIndex->paths.
88 ///
89 /// \p allErrors will contain any errors encountered while
90 /// performing this operation.
91 PCP_API
92 void
94  const PcpSite& propSite,
95  const PcpPropertyIndex& propIndex,
96  const SdfSpecType relOrAttrType,
97  const bool localOnly,
98  const SdfSpecHandle &stopProperty,
99  const bool includeStopProperty,
100  PcpCache *cacheForValidation,
101  PcpTargetIndex *targetIndex,
102  SdfPathVector *deletedPaths,
103  PcpErrorVector *allErrors);
104 
106 
107 #endif // PXR_USD_PCP_TARGET_INDEX_H
Definition: cache.h:91
Definition: spec.h:51
Definition: site.h:46
SdfPathVector paths
Definition: targetIndex.h:47
PcpErrorVector localErrors
Definition: targetIndex.h:48
std::vector< PcpErrorBasePtr > PcpErrorVector
Definition: errors.h:79
std::vector< class SdfPath > SdfPathVector
A vector of SdfPaths.
Definition: path.h:209
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1346
SdfSpecType
Definition: types.h:91
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
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:40