Loading...
Searching...
No Matches
userProcessingFunc.h
Go to the documentation of this file.
1//
2// Copyright 2023 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
25#ifndef PXR_USD_USD_UTILS_USER_PROCESSING_FUNC
26#define PXR_USD_USD_UTILS_USER_PROCESSING_FUNC
27
29
30#include "pxr/usd/sdf/layer.h"
31#include "pxr/usd/usdUtils/api.h"
32
33#include <functional>
34#include <string>
35#include <vector>
36
37PXR_NAMESPACE_OPEN_SCOPE
38
46public:
47 USDUTILS_API UsdUtilsDependencyInfo() = default;
48 USDUTILS_API explicit UsdUtilsDependencyInfo(const std::string &assetPath)
49 : _assetPath(assetPath) {}
50
51 USDUTILS_API UsdUtilsDependencyInfo(
52 const std::string &assetPath,
53 const std::vector<std::string> &dependencies)
54 : _assetPath(assetPath), _dependencies(dependencies) {}
55
74 USDUTILS_API const std::string& GetAssetPath() const {
75 return _assetPath;
76 }
77
88 USDUTILS_API const std::vector<std::string>& GetDependencies() const {
89 return _dependencies;
90 }
91
93 bool operator==(const UsdUtilsDependencyInfo &rhs) const {
94 return _assetPath == rhs._assetPath &&
95 _dependencies == rhs._dependencies;
96 }
97
100 bool operator!=(const UsdUtilsDependencyInfo& rhs) const {
101 return !(*this == rhs);
102 }
103
104private:
105 std::string _assetPath;
106 std::vector<std::string> _dependencies;
107};
108
113 const SdfLayerHandle &layer,
114 const UsdUtilsDependencyInfo &dependencyInfo);
115
116PXR_NAMESPACE_CLOSE_SCOPE
117
118#endif // PXR_USD_USD_UTILS_USER_PROCESSING_FUNC
Class containing information from a processed dependency.
USDUTILS_API const std::string & GetAssetPath() const
Returns the asset value path for the dependency.
USDUTILS_API const std::vector< std::string > & GetDependencies() const
Returns a list of dependencies related to the asset path.
bool operator==(const UsdUtilsDependencyInfo &rhs) const
Equality: Asset path and dependencies are the same.
bool operator!=(const UsdUtilsDependencyInfo &rhs) const
Inequality operator.
UsdUtilsDependencyInfo(const SdfLayerHandle &layer, const UsdUtilsDependencyInfo &dependencyInfo) UsdUtilsProcessingFunc
Signature for user supplied processing function.