7#ifndef PXR_USD_USD_VALIDATION_CONTEXT_H
8#define PXR_USD_USD_VALIDATION_CONTEXT_H
13#include "pxr/usd/usd/api.h"
15#include "pxr/base/plug/plugin.h"
18#include "pxr/usd/usd/primRange.h"
20#include "pxr/usd/usd/validationError.h"
24PXR_NAMESPACE_OPEN_SCOPE
92 bool includeAllAncestors =
true);
109 bool includeAllAncestors =
true);
125 bool includeAllAncestors =
true);
147 const std::vector<const UsdValidator*> &validators);
156 const std::vector<const UsdValidatorSuite*> &suites);
175 UsdValidationErrorVector
Validate(
const SdfLayerHandle &layer)
const;
196 UsdValidationErrorVector
Validate(
const UsdStagePtr &stage)
const;
214 UsdValidationErrorVector
Validate(
const std::vector<UsdPrim> &prims)
const;
237 void _InitializeFromValidatorMetadata(
238 const UsdValidatorMetadataVector &metadata,
bool includeAllAncestors);
244 void _DistributeValidators(
245 const std::vector<const UsdValidator*> &validators);
249 const SdfLayerHandle &layer,
250 UsdValidationErrorVector *errors,
251 std::mutex *errorsMutex)
const;
254 const UsdStagePtr &stage,
255 UsdValidationErrorVector *errors,
256 std::mutex *errorsMutex)
const;
260 template <
typename T>
263 UsdValidationErrorVector *errors,
264 std::mutex *errorsMutex)
const;
267 using _SchemaTypeValidatorPair =
268 std::pair<TfToken, std::vector<const UsdValidator*>>;
269 using _SchemaTypeValidatorPairVector =
270 std::vector<_SchemaTypeValidatorPair>;
276 std::vector<const UsdValidator*> _layerValidators;
277 std::vector<const UsdValidator*> _stageValidators;
278 std::vector<const UsdValidator*> _primValidators;
288 _SchemaTypeValidatorPairVector _schemaTypeValidators;
291PXR_NAMESPACE_CLOSE_SCOPE
TfType represents a dynamic runtime type.
An forward-iterable range that traverses a subtree of prims rooted at a given prim in depth-first ord...
UsdValidationContext provides an interface for managing and running validators on USD layers,...
USD_API UsdValidationErrorVector Validate(const SdfLayerHandle &layer) const
Run validation on the given valid layer by executing the selected validators for this UsdValidationCo...
USD_API UsdValidationContext(const std::vector< TfType > &schemaTypes)
Create a UsdValidationContext by collecting validators using the specified schema types.
USD_API UsdValidationContext(const UsdValidatorMetadataVector &metadata, bool includeAllAncestors=true)
Create a UsdValidationContext by collecting validators using the specified vector of validator metada...
USD_API UsdValidationContext(const PlugPluginPtrVector &plugins, bool includeAllAncestors=true)
Create a UsdValidationContext by collecting validators using the specified vector of plugins.
USD_API UsdValidationErrorVector Validate(const UsdStagePtr &stage) const
Run validation on the given valid stage by executing the selected validators for this UsdValidationCo...
USD_API UsdValidationContext(const std::vector< const UsdValidator * > &validators)
Create a UsdValidationContext by collecting validators using the specified vector of validators.
USD_API UsdValidationContext(const TfTokenVector &keywords, bool includeAllAncestors=true)
Create a UsdValidationContext by collecting validators using the specified keywords.
USD_API UsdValidationErrorVector Validate(const UsdPrimRange &prims) const
Run validation on the given valid prims by executing the selected validators for this UsdValidationCo...
USD_API UsdValidationContext(const std::vector< const UsdValidatorSuite * > &suites)
Create a UsdValidationContext by collecting validators from the specified vector of validator suites.
USD_API UsdValidationErrorVector Validate(const std::vector< UsdPrim > &prims) const
Run validation on the given valid prims by executing the selected validators for this UsdValidationCo...
A work dispatcher runs concurrent tasks.
Definitions of basic string utilities in tf.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
std::vector< TfToken > TfTokenVector
Convenience types.