Loading...
Searching...
No Matches
SdfAssetPath Class Reference

Contains an asset path and an optional resolved path. More...

#include <assetPath.h>

Public Member Functions

Constructors
SDF_API SdfAssetPath ()
 Construct an empty asset path.
 
SDF_API SdfAssetPath (const std::string &path)
 Construct an asset path with path and no associated resolved path.
 
SDF_API SdfAssetPath (const std::string &path, const std::string &resolvedPath)
 Construct an asset path with path and an associated resolvedPath.
 
Accessors
const std::string & GetAssetPath () const &
 Return the asset path.
 
std::string GetAssetPath () const &&
 Overload for rvalues, move out the asset path.
 
const std::string & GetResolvedPath () const &
 Return the resolved asset path, if any.
 
std::string GetResolvedPath () const &&
 Overload for rvalues, move out the asset path.
 

Friends

void swap (SdfAssetPath &lhs, SdfAssetPath &rhs)
 

Operators

bool operator== (const SdfAssetPath &rhs) const
 Equality, including the resolved path.
 
bool operator!= (const SdfAssetPath &rhs) const
 Inequality operator.
 
SDF_API bool operator< (const SdfAssetPath &rhs) const
 Ordering first by asset path, then by resolved path.
 
bool operator<= (const SdfAssetPath &rhs) const
 Less than or equal operator.
 
bool operator> (const SdfAssetPath &rhs) const
 Greater than operator.
 
bool operator>= (const SdfAssetPath &rhs) const
 Greater than or equal operator.
 
size_t GetHash () const
 Hash function.
 
size_t hash_value (const SdfAssetPath &ap)
 

Detailed Description

Contains an asset path and an optional resolved path.

Asset paths may contain non-control UTF-8 encoded characters. Specifically, U+0000..U+001F (C0 controls), U+007F (delete), and U+0080..U+009F (C1 controls) are disallowed. Attempts to construct asset paths with such characters will issue a TfError and produce the default-constructed empty asset path.

Definition at line 46 of file assetPath.h.

Constructor & Destructor Documentation

◆ SdfAssetPath() [1/3]

SDF_API SdfAssetPath ( )

Construct an empty asset path.

◆ SdfAssetPath() [2/3]

SDF_API SdfAssetPath ( const std::string &  path)
explicit

Construct an asset path with path and no associated resolved path.

If the passed path is not valid UTF-8 or contains C0 or C1 control characters, raise a TfError and return the default-constructed empty asset path.

◆ SdfAssetPath() [3/3]

SDF_API SdfAssetPath ( const std::string &  path,
const std::string &  resolvedPath 
)

Construct an asset path with path and an associated resolvedPath.

If either the passed \path or resolvedPath are not valid UTF-8 or either contain C0 or C1 control characters, raise a TfError and return the default-constructed empty asset path.

Member Function Documentation

◆ GetAssetPath() [1/2]

const std::string & GetAssetPath ( ) const &
inline

Return the asset path.

Definition at line 130 of file assetPath.h.

◆ GetAssetPath() [2/2]

std::string GetAssetPath ( ) const &&
inline

Overload for rvalues, move out the asset path.

Definition at line 135 of file assetPath.h.

◆ GetHash()

size_t GetHash ( ) const
inline

Hash function.

Definition at line 110 of file assetPath.h.

◆ GetResolvedPath() [1/2]

const std::string & GetResolvedPath ( ) const &
inline

Return the resolved asset path, if any.

Note that SdfAssetPath carries a resolved path only if its creator passed one to the constructor. SdfAssetPath never performs resolution itself.

Definition at line 144 of file assetPath.h.

◆ GetResolvedPath() [2/2]

std::string GetResolvedPath ( ) const &&
inline

Overload for rvalues, move out the asset path.

Definition at line 149 of file assetPath.h.

◆ operator!=()

bool operator!= ( const SdfAssetPath rhs) const
inline

Inequality operator.

See also
SdfAssetPath::operator==(const SdfAssetPath&)

Definition at line 84 of file assetPath.h.

◆ operator<()

SDF_API bool operator< ( const SdfAssetPath rhs) const

Ordering first by asset path, then by resolved path.

◆ operator<=()

bool operator<= ( const SdfAssetPath rhs) const
inline

Less than or equal operator.

See also
SdfAssetPath::operator<(const SdfAssetPath&)

Definition at line 93 of file assetPath.h.

◆ operator==()

bool operator== ( const SdfAssetPath rhs) const
inline

Equality, including the resolved path.

Definition at line 77 of file assetPath.h.

◆ operator>()

bool operator> ( const SdfAssetPath rhs) const
inline

Greater than operator.

See also
SdfAssetPath::operator<(const SdfAssetPath&)

Definition at line 99 of file assetPath.h.

◆ operator>=()

bool operator>= ( const SdfAssetPath rhs) const
inline

Greater than or equal operator.

See also
SdfAssetPath::operator<(const SdfAssetPath&)

Definition at line 105 of file assetPath.h.

Friends And Related Function Documentation

◆ hash_value

size_t hash_value ( const SdfAssetPath ap)
friend

Definition at line 122 of file assetPath.h.

◆ swap

void swap ( SdfAssetPath lhs,
SdfAssetPath rhs 
)
friend

Definition at line 156 of file assetPath.h.


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