HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UsdValidationErrorSite Class Reference

#include <error.h>

Public Member Functions

 UsdValidationErrorSite ()=default
 
USDVALIDATION_API UsdValidationErrorSite (const SdfLayerHandle &layer, const SdfPath &objectPath)
 
USDVALIDATION_API UsdValidationErrorSite (const UsdStagePtr &usdStage, const SdfPath &objectPath, const SdfLayerHandle &layer=SdfLayerHandle())
 
bool IsValid () const
 
bool IsValidSpecInLayer () const
 
bool IsPrim () const
 
bool IsProperty () const
 
const SdfPropertySpecHandle GetPropertySpec () const
 
const SdfPrimSpecHandle GetPrimSpec () const
 
const SdfLayerHandle & GetLayer () const
 
const UsdStagePtr & GetStage () const
 
UsdPrim GetPrim () const
 
UsdProperty GetProperty () const
 
bool operator== (const UsdValidationErrorSite &other) const
 
bool operator!= (const UsdValidationErrorSite &other) const
 

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 53 of file error.h.

Constructor & Destructor Documentation

UsdValidationErrorSite::UsdValidationErrorSite ( )
default
USDVALIDATION_API UsdValidationErrorSite::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.

USDVALIDATION_API UsdValidationErrorSite::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

const SdfLayerHandle& UsdValidationErrorSite::GetLayer ( ) const
inline

Returns the SdfLayerHandle associated with this UsdValidationValidatorErrorSite

Definition at line 144 of file error.h.

UsdPrim UsdValidationErrorSite::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 159 of file error.h.

const SdfPrimSpecHandle UsdValidationErrorSite::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 134 of file error.h.

UsdProperty UsdValidationErrorSite::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 170 of file error.h.

const SdfPropertySpecHandle UsdValidationErrorSite::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 121 of file error.h.

const UsdStagePtr& UsdValidationErrorSite::GetStage ( ) const
inline

Returns the UsdStage associated with this UsdValidationErrorSite; nullptr othewrise.

Definition at line 151 of file error.h.

bool UsdValidationErrorSite::IsPrim ( ) const
inline

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

Definition at line 103 of file error.h.

bool UsdValidationErrorSite::IsProperty ( ) const
inline

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

Definition at line 110 of file error.h.

bool UsdValidationErrorSite::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 86 of file error.h.

bool UsdValidationErrorSite::IsValidSpecInLayer ( ) const
inline

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

Definition at line 93 of file error.h.

bool UsdValidationErrorSite::operator!= ( const UsdValidationErrorSite other) const
inline

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

Definition at line 188 of file error.h.

bool UsdValidationErrorSite::operator== ( const UsdValidationErrorSite other) const
inline

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

Definition at line 180 of file error.h.


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