Loading...
Searching...
No Matches
validator.h File Reference
+ Include dependency graph for validator.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  UsdValidationValidator
 UsdValidationValidator is a class describing a single test. More...
 
class  UsdValidationValidatorSuite
 UsdValidationValidatorSuite acts like a suite for a collection of tests, which clients can use to bundle all tests relevant to test their concepts. More...
 

Typedefs

using UsdValidationErrorVector = std::vector< UsdValidationError >
 
using UsdValidationValidatorMetadataVector = std::vector< UsdValidationValidatorMetadata >
 
using UsdValidateLayerTaskFn = std::function< UsdValidationErrorVector(const SdfLayerHandle &)>
 UsdValidateLayerTaskFn: Validation logic operating on a given SdfLayerHandle.
 
using UsdValidateStageTaskFn = std::function< UsdValidationErrorVector(const UsdStagePtr &, const UsdValidationTimeRange)>
 UsdValidateStageTaskFn: Validation logic operating on a given UsdStage.
 
using UsdValidatePrimTaskFn = std::function< UsdValidationErrorVector(const UsdPrim &, const UsdValidationTimeRange)>
 UsdValidatePrimTaskFn: Validation logic operating on a given UsdPrim.
 

Class Documentation

◆ UsdValidationValidatorMetadata

class UsdValidationValidatorMetadata

A structure which describes metadata for a UsdValidationValidator.

The metadata values are populated from the plugInfo.json associated with a validator's plugin. PlugInfo can provide the following validator metadata:

  • name: A required field. This metadatum stores the validator name. For validators defined in a plugin, the name must be a fully qualified name which includes the pluginName as well, separated by ":". This ensures, plugin provided validator names are guaranteed to be unique.
  • pluginPtr: Pointer to the plugin where a plugin based validator is defined. nullptr for a non-plugin based validator.
  • keywords: Keywords associated with this validator.
  • doc: Doc string explaining the purpose of the validator.
  • schemaTypes: If the validator is associated with specific schemaTypes.
  • isTimeDependent: If the validator is testing rules which are time dependent. Note that only PrimValidators and StageValidators can be time dependent, as these are the ones which can evaluate time dependent properties. Note that its still recommended to use PrimValidators for time dependent properties. Default is false.
  • isSuite: If the validator represents a suite of validators.

Definition at line 55 of file validator.h.

Class Members
string doc doc string extracted from plugInfo.json This is a mandatory field for a ValidatorMetadata.
bool isSuite whether this test represents a test suite or not
bool isTimeDependent whether this test is time dependent or not.

Only PrimValidators and StageValidators can be time dependent. By default this is false.

TfTokenVector keywords list of keywords extracted for this test from the plugInfo.json
TfToken name Name of the validator.

For plugin provided validators, this is prefixed with the pluginName, like "pluginName:testName" in order to uniquely identify these plugin provided validators.

This is a mandatory field for a ValidatorMetadata.

PlugPluginPtr pluginPtr Pointer to the plugin to which a plugin based validator belongs.

For non-plugin based validator, pluginPtr is nullptr.

TfTokenVector schemaTypes list of schemaTypes names this test applies to, extracted from plugInfo.json

Typedef Documentation

◆ UsdValidationErrorVector

using UsdValidationErrorVector = std::vector<UsdValidationError>

Definition at line 29 of file validator.h.

◆ UsdValidationValidatorMetadataVector

using UsdValidationValidatorMetadataVector = std::vector<UsdValidationValidatorMetadata>

Definition at line 91 of file validator.h.