8 #ifndef PXR_USD_VALIDATION_USD_VALIDATION_FIXER_H 9 #define PXR_USD_VALIDATION_USD_VALIDATION_FIXER_H 13 #include "pxr/usd/usd/timeCode.h" 14 #include "pxr/usdValidation/usdValidation/api.h" 18 PXR_NAMESPACE_OPEN_SCOPE
28 using FixerCanApplyFn =
86 const TfToken &name,
const std::string &description,
87 const FixerImplFn &fixerImplFn,
const FixerCanApplyFn &canApplyFn,
102 return std::move(_name);
114 return std::move(_description);
126 return std::move(_errorName);
142 return std::move(_keywords);
176 std::string _description;
177 FixerImplFn _fixerImplFn;
178 FixerCanApplyFn _canApplyFn;
183 PXR_NAMESPACE_CLOSE_SCOPE
185 #endif // PXR_USD_VALIDATION_USD_VALIDATION_FIXER_H TfToken GetErrorName() &&
Returns the error name that this fixer can fix, if any, by-value.
USDVALIDATION_API bool HasKeyword(const TfToken &keyword) const
Returns true if this fixer has the given keyword.
A UsdValidationFixer represents a fix that can be applied to fix a specific validation error.
UsdValidationError is an entity returned by a validation task, which is associated with a UsdValidati...
const std::string & GetDescription() const &
Returns the description of this fixer.
USDVALIDATION_API bool ApplyFix(const UsdValidationError &error, const UsdEditTarget &editTarget, const UsdTimeCode &timeCode=UsdTimeCode::Default()) const
Applies the fix for the given error at the given time code and edit target.
Token for efficient comparison, assignment, and hashing of known strings.
Represent a time value, which may be either numeric, holding a double value, or a sentinel value UsdT...
Defines a mapping from scene graph paths to Sdf spec paths in a SdfLayer where edits should be direct...
TfToken GetName() &&
Return the name of this fixer by-value.
std::vector< TfToken > TfTokenVector
Convenience types.
const TfTokenVector & GetKeywords() const &
Returns the keywords associated with this fixer.
const TfToken & GetName() const &
Returns the name of this fixer.
USDVALIDATION_API bool IsAssociatedWithErrorName(const TfToken &errorName) const
Returns true if this fixer is associated with the given error name.
static constexpr UsdTimeCode Default()
Produce a UsdTimeCode representing the sentinel value for 'default'.
TfTokenVector GetKeywords() &&
Return the keywords associated with this fixer by-value.
const TfToken & GetErrorName() const &
Returns the error name that this fixer can fix, if any.
USDVALIDATION_API bool CanApplyFix(const UsdValidationError &error, const UsdEditTarget &editTarget, const UsdTimeCode &timeCode=UsdTimeCode::Default()) const
Returns true if this fixer can be applied to the given error and edit target; false otherwise.
std::string GetDescription() &&
Return the description of this fixer by-value.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...