|
|
| UsdValidationFixer (const UsdValidationFixer &)=default |
| |
|
UsdValidationFixer & | operator= (const UsdValidationFixer &)=default |
| |
|
| UsdValidationFixer (UsdValidationFixer &&) noexcept=default |
| |
|
UsdValidationFixer & | operator= (UsdValidationFixer &&) noexcept=default |
| |
| USDVALIDATION_API | UsdValidationFixer (const TfToken &name, const std::string &description, const FixerImplFn &fixerImplFn, const FixerCanApplyFn &canApplyFn, const TfTokenVector &keywords=TfTokenVector(), const TfToken &errorName=TfToken()) |
| | Construct a UsdValidationFixer with the given name and description.
|
| |
| const TfToken & | GetName () const & |
| | Returns the name of this fixer.
|
| |
| TfToken | GetName () && |
| | Return the name of this fixer by-value.
|
| |
| const std::string & | GetDescription () const & |
| | Returns the description of this fixer.
|
| |
| std::string | GetDescription () && |
| | Return the description of this fixer by-value.
|
| |
| const TfToken & | GetErrorName () const & |
| | Returns the error name that this fixer can fix, if any.
|
| |
| TfToken | GetErrorName () && |
| | Returns the error name that this fixer can fix, if any, by-value.
|
| |
| USDVALIDATION_API bool | IsAssociatedWithErrorName (const TfToken &errorName) const |
| | Returns true if this fixer is associated with the given error name.
|
| |
| const TfTokenVector & | GetKeywords () const & |
| | Returns the keywords associated with this fixer.
|
| |
| TfTokenVector | GetKeywords () && |
| | Return the keywords associated with this fixer by-value.
|
| |
| USDVALIDATION_API bool | HasKeyword (const TfToken &keyword) const |
| | Returns true if this fixer has the given keyword.
|
| |
| 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.
|
| |
| 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.
|
| |
A UsdValidationFixer represents a fix that can be applied to fix a specific validation error.
A fixer is associated with a specific validator, and can be associated with a specific error name, or can be generic to any error associated with the corresponding validator.
A fixer has a name, description, and a set of keywords associated with it. The name must be unique among all fixers associated with a specific validator. The keywords can be used to group fixers by department, show, etc.
A fixer has two functions associated with it:
- The
FixerImplFn is the function that will be called to apply the fix for a given error.
- The
FixerCanApplyFn is the function that will be called to determine if the fixer can be applied to a given error.
Note that the Validation framework will not apply any fixers automatically. It's the responsibility of the client to pick and apply a fix for a given error, by specifically calling the ApplyFix() method on an appropriate UsdEditTarget.
Appropriate fixers can be retrieved from UsdValidationValidator or UsdValidationError itself via the GetFixers(), GetFixersWithKeyword(), GetFixerByName(), GetFixersByErrorName(), etc.
Definition at line 62 of file fixer.h.