Loading...
Searching...
No Matches
UsdValidationErrorSite Class Reference

UsdValidationErrorSite is important information available from a ValidationError, which annotates the site where the Error was reported by a validation task. More...

#include <validationError.h>

Public Member Functions

USD_API UsdValidationErrorSite (const SdfLayerHandle &layer, const SdfPath &objectPath)
 Initialize an UsdValidationErrorSite using a layer and an objectPath.
 
USD_API UsdValidationErrorSite (const UsdStagePtr &usdStage, const SdfPath &objectPath, const SdfLayerHandle &layer=SdfLayerHandle())
 Initialize an UsdValidationErrorSite using a usdStage and an objectPath.
 
bool IsValid () const
 Returns true if UsdValidationErrorSite instance can either point to a prim or property spec in a layer or a prim or property on a stage.
 
bool IsValidSpecInLayer () const
 Returns true if the objectPath and layer represent a spec in the layer; false otherwise.
 
bool IsPrim () const
 Returns true if UsdValidationErrorSite represents a prim on a stage, false otherwise.
 
bool IsProperty () const
 Returns true if UsdValidationErrorSite represents a property on a stage, false otherwise.
 
const SdfPropertySpecHandle GetPropertySpec () const
 Returns the SdfPropertySpecHandle associated with this ValidationErrorSite's layer and objectPath.
 
const SdfPrimSpecHandle GetPrimSpec () const
 Returns the SdfPrimSpecHandle associated with this ValidationErrorSite's layer and objectPath.
 
const SdfLayerHandle & GetLayer () const
 Returns the SdfLayerHandle associated with this UsdValidatorErrorSite.
 
const UsdStagePtr & GetStage () const
 Returns the UsdStage associated with this UsdValidationErrorSite; nullptr othewrise.
 
UsdPrim GetPrim () const
 Returns UsdPrim associated with this UsdValidationErrorSite, that is when UsdStage is present and objectPath represents a prim path on this stage; if not, an invalid prim is returned.
 
UsdProperty GetProperty () const
 Returns UsdProperty associated with this UsdValidationErrorSite, that is when UsdStage is present and objectPath represents a property path on this stage; if not, an invalid property is returned.
 
bool operator== (const UsdValidationErrorSite &other) const
 Returns true if other UsdValidationErrorSite has same valued members as this UsdValidationErrorSite, false otherwise.
 
bool operator!= (const UsdValidationErrorSite &other) const
 Returns false if other UsdValidationErrorSite has same valued members as this UsdValidationErrorSite, true otherwise.
 

Detailed Description

UsdValidationErrorSite is important information available from a ValidationError, which annotates the site where the Error was reported by a validation task.

An Error could be reported in a SdfLayer (in layer metadata, for example), or a UsdStage (in stage metadata, for example) or a Prim within a stage, or a property of a prim.

Definition at line 51 of file validationError.h.

Constructor & Destructor Documentation

◆ UsdValidationErrorSite() [1/2]

USD_API UsdValidationErrorSite ( const SdfLayerHandle &  layer,
const SdfPath objectPath 
)

Initialize an UsdValidationErrorSite using a layer and an objectPath.

Object Path here could be a prim or a property spec path.

Note that to identify a layer metadata, objectPath can be set as the pseudoRoot.

◆ UsdValidationErrorSite() [2/2]

USD_API UsdValidationErrorSite ( const UsdStagePtr &  usdStage,
const SdfPath objectPath,
const SdfLayerHandle &  layer = SdfLayerHandle() 
)

Initialize an UsdValidationErrorSite using a usdStage and an objectPath.

An option layer can also be provided to provide information about a specific layer the erroring objectPath is found in the property stack.

Object Path here could be a prim path or a property path. Note that to identify stage's root layer metadata, objectPath can be set as the pseudoRoot.

Member Function Documentation

◆ GetLayer()

const SdfLayerHandle & GetLayer ( ) const
inline

Returns the SdfLayerHandle associated with this UsdValidatorErrorSite.

Definition at line 141 of file validationError.h.

◆ GetPrim()

UsdPrim GetPrim ( ) const
inline

Returns UsdPrim associated with this UsdValidationErrorSite, that is when UsdStage is present and objectPath represents a prim path on this stage; if not, an invalid prim is returned.

Definition at line 156 of file validationError.h.

◆ GetPrimSpec()

const SdfPrimSpecHandle GetPrimSpec ( ) const
inline

Returns the SdfPrimSpecHandle associated with this ValidationErrorSite's layer and objectPath.

Returns an invalid SdfPrimSpecHandle if no valid prim spec is found, or when UsdValidationErrorSite instance doesn't have a layer.

Definition at line 132 of file validationError.h.

◆ GetProperty()

UsdProperty GetProperty ( ) const
inline

Returns UsdProperty associated with this UsdValidationErrorSite, that is when UsdStage is present and objectPath represents a property path on this stage; if not, an invalid property is returned.

Definition at line 167 of file validationError.h.

◆ GetPropertySpec()

const SdfPropertySpecHandle GetPropertySpec ( ) const
inline

Returns the SdfPropertySpecHandle associated with this ValidationErrorSite's layer and objectPath.

Returns an invalid SdfPropertySpecHandle if no valid property spec is found, or when UsdValidationErrorSite instance doesn't have a layer.

Definition at line 119 of file validationError.h.

◆ GetStage()

const UsdStagePtr & GetStage ( ) const
inline

Returns the UsdStage associated with this UsdValidationErrorSite; nullptr othewrise.

Definition at line 148 of file validationError.h.

◆ IsPrim()

bool IsPrim ( ) const
inline

Returns true if UsdValidationErrorSite represents a prim on a stage, false otherwise.

Definition at line 101 of file validationError.h.

◆ IsProperty()

bool IsProperty ( ) const
inline

Returns true if UsdValidationErrorSite represents a property on a stage, false otherwise.

Definition at line 108 of file validationError.h.

◆ IsValid()

bool IsValid ( ) const
inline

Returns true if UsdValidationErrorSite instance can either point to a prim or property spec in a layer or a prim or property on a stage.

Definition at line 84 of file validationError.h.

◆ IsValidSpecInLayer()

bool IsValidSpecInLayer ( ) const
inline

Returns true if the objectPath and layer represent a spec in the layer; false otherwise.

Definition at line 91 of file validationError.h.

◆ operator!=()

bool operator!= ( const UsdValidationErrorSite other) const
inline

Returns false if other UsdValidationErrorSite has same valued members as this UsdValidationErrorSite, true otherwise.

Definition at line 185 of file validationError.h.

◆ operator==()

bool operator== ( const UsdValidationErrorSite other) const
inline

Returns true if other UsdValidationErrorSite has same valued members as this UsdValidationErrorSite, false otherwise.

Definition at line 177 of file validationError.h.


The documentation for this class was generated from the following file: