AYON Usd Resolver  1.0.0
Loading...
Searching...
No Matches
AssetIdentifier Class Reference

cache element class used to represent an Usd asset in cache for the resolver More...

#include <assetIdentifierDef.h>

Collaboration diagram for AssetIdentifier:

Public Member Functions

 AssetIdentifier ()
 
 AssetIdentifier (bool is_static)
 
 AssetIdentifier (const std::string &assetIdentifier)
 
 AssetIdentifier (const ArResolvedPath &path, const std::string &identifier, bool is_static)
 
ArResolvedPath getResolvedAssetPath () const
 returns the ResolvedAssetPath for this AssetIdentifier More...
 
bool setResolvedAssetPath (const ArResolvedPath &inResolvedAssetPath)
 allows setting the ResolvedAssetPath More...
 
bool setResolvedAssetPath (const std::string &inResolvedAssetPath)
 
std::string getAssetIdentifier () const
 returns the asset identifier More...
 
bool setAssetIdentifier (const std::string &inAssetIdentifier)
 allows you to set the internal m_assetIdentifier More...
 
bool isEmpty () const
 can be used to know if given AssetIdentifier has data in it More...
 
bool isValid () const
 this function allows you to know if an given AssetIdentifier's cache is still valid. More...
 
void invalidate ()
 allows you to invalidate this AssetIdentifier. More...
 
void validate ()
 allows you to validate this AssetIdentifier. More...
 
bool isModifiable () const
 allows you to know if you can modify the data in this AssetIdentifier it is also used in getAssetIdentifier and getResolvedAssetPath to keep you from modifying data you should not touch. More...
 
void printInfo () const
 this function will print out all debug info about this AssetIdentifier instance More...
 
bool operator== (const AssetIdentifier &other) const
 
AssetIdentifieroperator= (const AssetIdentifier &other)
 

Private Attributes

const bool m_static
 
bool m_invalidated
 
ArResolvedPath m_resolvedAssetPath
 
std::string m_assetIdentifier
 

Detailed Description

cache element class used to represent an Usd asset in cache for the resolver

Parameters
is_static
Returns

Constructor & Destructor Documentation

◆ AssetIdentifier() [1/4]

AssetIdentifier::AssetIdentifier ( )
inline

◆ AssetIdentifier() [2/4]

AssetIdentifier::AssetIdentifier ( bool  is_static)
inline

◆ AssetIdentifier() [3/4]

AssetIdentifier::AssetIdentifier ( const std::string &  assetIdentifier)
inline

◆ AssetIdentifier() [4/4]

AssetIdentifier::AssetIdentifier ( const ArResolvedPath &  path,
const std::string &  identifier,
bool  is_static 
)
inline

Member Function Documentation

◆ getAssetIdentifier()

std::string AssetIdentifier::getAssetIdentifier ( ) const

returns the asset identifier

Here is the caller graph for this function:

◆ getResolvedAssetPath()

PXR_NAMESPACE_USING_DIRECTIVE ArResolvedPath AssetIdentifier::getResolvedAssetPath ( ) const

returns the ResolvedAssetPath for this AssetIdentifier

Returns
Pxr ArResolvedPath
Here is the caller graph for this function:

◆ invalidate()

void AssetIdentifier::invalidate ( )

allows you to invalidate this AssetIdentifier.

It is not possible to invalidate an AssetIdentifier that is not modifiable in this case the function will simply return

Here is the call graph for this function:

◆ isEmpty()

bool AssetIdentifier::isEmpty ( ) const

can be used to know if given AssetIdentifier has data in it

Returns
bool: true if neither m_resolvedAssetPath or m_assetIdentifier have any data in them
Here is the caller graph for this function:

◆ isModifiable()

bool AssetIdentifier::isModifiable ( ) const

allows you to know if you can modify the data in this AssetIdentifier it is also used in getAssetIdentifier and getResolvedAssetPath to keep you from modifying data you should not touch.

This will be the case if this AssetIdentifier is marked as static

Returns
true if you are allowed to modify the AssetIdentifier, false if the modification is not allowed for what ever reason
Here is the caller graph for this function:

◆ isValid()

bool AssetIdentifier::isValid ( ) const

this function allows you to know if an given AssetIdentifier's cache is still valid.

This can be use full for TTL or cache invalidation as we use lazy reaching for cached objects

Returns
true if the current data can safely be used. false if the data is out of data or should in be re-cached

◆ operator=()

AssetIdentifier & AssetIdentifier::operator= ( const AssetIdentifier other)

◆ operator==()

bool AssetIdentifier::operator== ( const AssetIdentifier other) const

◆ printInfo()

void AssetIdentifier::printInfo ( ) const

this function will print out all debug info about this AssetIdentifier instance

◆ setAssetIdentifier()

bool AssetIdentifier::setAssetIdentifier ( const std::string &  inAssetIdentifier)

allows you to set the internal m_assetIdentifier

Parameters
inAssetIdentifier
Returns
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setResolvedAssetPath() [1/2]

bool AssetIdentifier::setResolvedAssetPath ( const ArResolvedPath &  inResolvedAssetPath)

allows setting the ResolvedAssetPath

Parameters
inResolvedAssetPath
Returns
false if AssetIdentifier can't be modified (eg. isValid)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setResolvedAssetPath() [2/2]

bool AssetIdentifier::setResolvedAssetPath ( const std::string &  inResolvedAssetPath)
Here is the call graph for this function:

◆ validate()

void AssetIdentifier::validate ( )

allows you to validate this AssetIdentifier.

This function will return while doing nothing if isModifiable returns false

Here is the call graph for this function:

Member Data Documentation

◆ m_assetIdentifier

std::string AssetIdentifier::m_assetIdentifier
private

◆ m_invalidated

bool AssetIdentifier::m_invalidated
private

◆ m_resolvedAssetPath

ArResolvedPath AssetIdentifier::m_resolvedAssetPath
private

◆ m_static

const bool AssetIdentifier::m_static
private

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