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

#include <layerStack.h>

+ Inheritance diagram for PcpLayerStack:

Public Member Functions

virtual PCP_API ~PcpLayerStack ()
 
PCP_API const
PcpLayerStackIdentifier
GetIdentifier () const
 Returns the identifier for this layer stack. More...
 
PCP_API const
SdfLayerRefPtrVector
GetLayers () const
 
PCP_API SdfLayerHandleVector GetSessionLayers () const
 
PCP_API const SdfLayerTreeHandleGetLayerTree () const
 
PCP_API const SdfLayerOffsetGetLayerOffsetForLayer (const SdfLayerHandle &) const
 
PCP_API const SdfLayerOffsetGetLayerOffsetForLayer (const SdfLayerRefPtr &) const
 
PCP_API const SdfLayerOffsetGetLayerOffsetForLayer (size_t layerIdx) const
 
PCP_API const std::set
< std::string > & 
GetMutedLayers () const
 
PcpErrorVector GetLocalErrors () const
 Return the list of errors local to this layer stack. More...
 
PCP_API bool HasLayer (const SdfLayerHandle &layer) const
 
PCP_API bool HasLayer (const SdfLayerRefPtr &layer) const
 
const PcpExpressionVariablesGetExpressionVariables () const
 Return the composed expression variables for this layer stack. More...
 
const std::unordered_set
< std::string > & 
GetExpressionVariableDependencies () const
 
double GetTimeCodesPerSecond () const
 
PCP_API const SdfRelocatesMapGetRelocatesSourceToTarget () const
 
PCP_API const SdfRelocatesMapGetRelocatesTargetToSource () const
 
PCP_API const SdfRelocatesMapGetIncrementalRelocatesSourceToTarget () const
 
PCP_API const SdfRelocatesMapGetIncrementalRelocatesTargetToSource () const
 
PCP_API const SdfPathVectorGetPathsToPrimsWithRelocates () const
 
PCP_API void Apply (const PcpLayerStackChanges &changes, PcpLifeboat *lifeboat)
 
PCP_API PcpMapExpression GetExpressionForRelocatesAtPath (const SdfPath &path)
 
- Public Member Functions inherited from TfRefBase
 TfRefBase ()
 
 TfRefBase (TfRefBase const &)
 
TfRefBaseoperator= (TfRefBase const &)
 
size_t GetCurrentCount () const
 Return the current reference count of this object. More...
 
bool IsUnique () const
 Return true if only one TfRefPtr points to this object. More...
 
void SetShouldInvokeUniqueChangedListener (bool shouldCall)
 
- Public Member Functions inherited from TfWeakBase
 TfWeakBase ()
 
 TfWeakBase (const TfWeakBase &)
 
const TfWeakBase__GetTfWeakBase__ () const
 
const TfWeakBaseoperator= (const TfWeakBase &)
 
void EnableNotification2 () const
 
TF_API void const * GetUniqueIdentifier () const
 

Friends

class Pcp_LayerStackRegistry
 
class PcpCache
 
bool Pcp_NeedToRecomputeDueToAssetPathChange (const PcpLayerStackPtr &)
 

Additional Inherited Members

- Public Types inherited from TfRefBase
typedef void(* UniqueChangedFuncPtr )(TfRefBase const *, bool)
 
- Static Public Member Functions inherited from TfRefBase
static TF_API void SetUniqueChangedListener (UniqueChangedListener listener)
 
- Protected Member Functions inherited from TfRefBase
virtual TF_API ~TfRefBase ()
 
- Protected Member Functions inherited from TfWeakBase
 ~TfWeakBase ()
 
TfRefPtr< Tf_Remnant_Register () const
 
template<class T >
TfRefPtr< Tf_Remnant_Register (T *tempRmnt) const
 
bool _HasRemnant () const
 

Detailed Description

Represents a stack of layers that contribute opinions to composition.

Each PcpLayerStack is identified by a PcpLayerStackIdentifier. This identifier contains all of the parameters needed to construct a layer stack, such as the root layer, session layer, and path resolver context.

PcpLayerStacks are constructed and managed by a Pcp_LayerStackRegistry.

Definition at line 67 of file layerStack.h.

Constructor & Destructor Documentation

virtual PCP_API PcpLayerStack::~PcpLayerStack ( )
virtual

Member Function Documentation

PCP_API void PcpLayerStack::Apply ( const PcpLayerStackChanges changes,
PcpLifeboat lifeboat 
)

Apply the changes in changes. This blows caches. It's up to the client to pull on those caches again as needed.

Objects that are no longer needed and would be destroyed are retained in lifeboat and won't be destroyed until lifeboat is itself destroyed. This gives the client control over the timing of the destruction of those objects. Clients may choose to pull on the caches before destroying lifeboat. That may cause the caches to again retain the objects, meaning they won't be destroyed when lifeboat is destroyed.

For example, if blowing a cache means an SdfLayer is no longer needed then lifeboat will hold an SdfLayerRefPtr to that layer. The client can then pull on that cache, which could cause the cache to hold an SdfLayerRefPtr to the layer again. If so then destroying changes will not destroy the layer. In any case, we don't destroy the layer and then read it again. However, if the client destroys lifeboat before pulling on the cache then we would destroy the layer then read it again.

PCP_API PcpMapExpression PcpLayerStack::GetExpressionForRelocatesAtPath ( const SdfPath path)

Return a PcpMapExpression representing the relocations that affect namespace at and below the given path. The value of this expression will continue to track the effective relocations if they are changed later.

const std::unordered_set<std::string>& PcpLayerStack::GetExpressionVariableDependencies ( ) const
inline

Return the set of expression variables used during the computation of this layer stack. For example, this may include the variables used in expression variable expressions in sublayer asset paths.

Definition at line 136 of file layerStack.h.

const PcpExpressionVariables& PcpLayerStack::GetExpressionVariables ( ) const
inline

Return the composed expression variables for this layer stack.

Definition at line 129 of file layerStack.h.

PCP_API const PcpLayerStackIdentifier& PcpLayerStack::GetIdentifier ( ) const

Returns the identifier for this layer stack.

PCP_API const SdfRelocatesMap& PcpLayerStack::GetIncrementalRelocatesSourceToTarget ( ) const

Returns incremental relocation source-to-target mapping for this layer stack.

This map contains the individual relocation entries found across all layers in this layer stack; it does not combine ancestral entries with descendant entries. For instance, if this layer stack contains relocations { /A: /B } and { /A/C: /A/D }, this map will contain { /A: /B } and { /A/C: /A/D }.

PCP_API const SdfRelocatesMap& PcpLayerStack::GetIncrementalRelocatesTargetToSource ( ) const

Returns incremental relocation target-to-source mapping for this layer stack.

See GetIncrementalRelocatesTargetToSource for more details.

PCP_API const SdfLayerOffset* PcpLayerStack::GetLayerOffsetForLayer ( const SdfLayerHandle &  ) const

Returns the layer offset for the given layer, or NULL if the layer can't be found or is the identity.

PCP_API const SdfLayerOffset* PcpLayerStack::GetLayerOffsetForLayer ( const SdfLayerRefPtr ) const

Return the layer offset for the given layer, or NULL if the layer can't be found or is the identity.

PCP_API const SdfLayerOffset* PcpLayerStack::GetLayerOffsetForLayer ( size_t  layerIdx) const

Returns the layer offset for the layer at the given index in this layer stack. Returns NULL if the offset is the identity.

PCP_API const SdfLayerRefPtrVector& PcpLayerStack::GetLayers ( ) const

Returns the layers in this layer stack in strong-to-weak order. Note that this is only the local layer stack – it does not include any layers brought in by references inside prims.

PCP_API const SdfLayerTreeHandle& PcpLayerStack::GetLayerTree ( ) const

Returns the layer tree representing the structure of this layer stack.

PcpErrorVector PcpLayerStack::GetLocalErrors ( ) const
inline

Return the list of errors local to this layer stack.

Definition at line 117 of file layerStack.h.

PCP_API const std::set<std::string>& PcpLayerStack::GetMutedLayers ( ) const

Returns the set of layers that were muted in this layer stack.

PCP_API const SdfPathVector& PcpLayerStack::GetPathsToPrimsWithRelocates ( ) const

Returns a list of paths to all prims across all layers in this layer stack that contained relocates.

PCP_API const SdfRelocatesMap& PcpLayerStack::GetRelocatesSourceToTarget ( ) const

Returns relocation source-to-target mapping for this layer stack.

This map combines the individual relocation entries found across all layers in this layer stack; multiple entries that affect a single prim will be combined into a single entry. For instance, if this layer stack contains relocations { /A: /B } and { /A/C: /A/D }, this map will contain { /A: /B } and { /B/C: /B/D }. This allows consumers to go from unrelocated namespace to relocated namespace in a single step.

PCP_API const SdfRelocatesMap& PcpLayerStack::GetRelocatesTargetToSource ( ) const

Returns relocation target-to-source mapping for this layer stack.

See GetRelocatesSourceToTarget for more details.

PCP_API SdfLayerHandleVector PcpLayerStack::GetSessionLayers ( ) const

Returns only the session layers in the layer stack in strong-to-weak order.

double PcpLayerStack::GetTimeCodesPerSecond ( ) const
inline

Return the time codes per second value of the layer stack. This is usually the same as the computed time codes per second of the root layer but may be computed from the session layer when its present.

Definition at line 142 of file layerStack.h.

PCP_API bool PcpLayerStack::HasLayer ( const SdfLayerHandle &  layer) const

Returns true if this layer stack contains the given layer, false otherwise.

PCP_API bool PcpLayerStack::HasLayer ( const SdfLayerRefPtr layer) const

Friends And Related Function Documentation

friend class Pcp_LayerStackRegistry
friend

Definition at line 216 of file layerStack.h.

bool Pcp_NeedToRecomputeDueToAssetPathChange ( const PcpLayerStackPtr &  )
friend
friend class PcpCache
friend

Definition at line 218 of file layerStack.h.


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