All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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  UsdValidator
 UsdValidator is a class describing a single test. More...
 
class  UsdValidatorSuite
 UsdValidatorSuite 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 UsdValidatorMetadataVector = std::vector< UsdValidatorMetadata >
 
using UsdValidateLayerTaskFn = std::function< UsdValidationErrorVector(const SdfLayerHandle &)>
 UsdValidateLayerTaskFn: Validation logic operating on a given SdfLayerHandle.
 
using UsdValidateStageTaskFn = std::function< UsdValidationErrorVector(const UsdStagePtr &)>
 UsdValidateStageTaskFn: Validation logic operating on a given UsdStage.
 
using UsdValidatePrimTaskFn = std::function< UsdValidationErrorVector(const UsdPrim &)>
 UsdValidatePrimTaskFn: Validation logic operating on a given UsdPrim.
 

Class Documentation

◆ UsdValidatorMetadata

class UsdValidatorMetadata

A structure which describes metadata for a UsdValidator.

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.
  • isSuite: If the validator represents a suite of validators.

Definition at line 45 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
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 24 of file validator.h.

◆ UsdValidatorMetadataVector

using UsdValidatorMetadataVector = std::vector<UsdValidatorMetadata>

Definition at line 76 of file validator.h.