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 <error.h>

Public Member Functions

USDVALIDATION_API UsdValidationErrorSite (const SdfLayerHandle &layer, const SdfPath &objectPath)
 Initialize an UsdValidationErrorSite using a layer and an objectPath.
 
USDVALIDATION_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 UsdValidationValidatorErrorSite.
 
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 54 of file error.h.

Constructor & Destructor Documentation

◆ UsdValidationErrorSite() [1/2]

USDVALIDATION_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]

USDVALIDATION_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 UsdValidationValidatorErrorSite.

Definition at line 145 of file error.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 160 of file error.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 135 of file error.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 171 of file error.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 122 of file error.h.

◆ GetStage()

const UsdStagePtr & GetStage ( ) const
inline

Returns the UsdStage associated with this UsdValidationErrorSite; nullptr othewrise.

Definition at line 152 of file error.h.

◆ IsPrim()

bool IsPrim ( ) const
inline

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

Definition at line 104 of file error.h.

◆ IsProperty()

bool IsProperty ( ) const
inline

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

Definition at line 111 of file error.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 87 of file error.h.

◆ IsValidSpecInLayer()

bool IsValidSpecInLayer ( ) const
inline

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

Definition at line 94 of file error.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 189 of file error.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 181 of file error.h.


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