All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
userProcessingFunc.h
Go to the documentation of this file.
1//
2// Copyright 2023 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7
8#ifndef PXR_USD_USD_UTILS_USER_PROCESSING_FUNC
9#define PXR_USD_USD_UTILS_USER_PROCESSING_FUNC
10
12
13#include "pxr/usd/sdf/layer.h"
14#include "pxr/usd/usdUtils/api.h"
15
16#include <functional>
17#include <string>
18#include <vector>
19
20PXR_NAMESPACE_OPEN_SCOPE
21
29public:
30 USDUTILS_API UsdUtilsDependencyInfo() = default;
31 USDUTILS_API explicit UsdUtilsDependencyInfo(const std::string &assetPath)
32 : _assetPath(assetPath) {}
33
34 USDUTILS_API UsdUtilsDependencyInfo(
35 const std::string &assetPath,
36 const std::vector<std::string> &dependencies)
37 : _assetPath(assetPath), _dependencies(dependencies) {}
38
57 USDUTILS_API const std::string& GetAssetPath() const {
58 return _assetPath;
59 }
60
71 USDUTILS_API const std::vector<std::string>& GetDependencies() const {
72 return _dependencies;
73 }
74
76 bool operator==(const UsdUtilsDependencyInfo &rhs) const {
77 return _assetPath == rhs._assetPath &&
78 _dependencies == rhs._dependencies;
79 }
80
83 bool operator!=(const UsdUtilsDependencyInfo& rhs) const {
84 return !(*this == rhs);
85 }
86
87private:
88 std::string _assetPath;
89 std::vector<std::string> _dependencies;
90};
91
96 const SdfLayerHandle &layer,
97 const UsdUtilsDependencyInfo &dependencyInfo);
98
99PXR_NAMESPACE_CLOSE_SCOPE
100
101#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.