![]() |
|
Contains an asset path and optional evaluated and resolved paths. More...
#include <assetPath.h>
Public Member Functions | |
Constructors | |
SDF_API | SdfAssetPath () |
Construct an empty asset path. | |
SDF_API | SdfAssetPath (const std::string &authoredPath) |
Construct an asset path with authoredPath and no associated evaluated or resolved path. | |
SDF_API | SdfAssetPath (const std::string &authoredPath, const std::string &resolvedPath) |
Construct an asset path with authoredPath and an associated resolvedPath . | |
SDF_API | SdfAssetPath (const SdfAssetPathParams ¶ms) |
Construct an asset path using a SdfAssetPathParams object. | |
Accessors | |
const std::string & | GetAuthoredPath () const & |
Returns the asset path as it was authored in the original layer. | |
std::string | GetAuthoredPath () const && |
Overload for rvalues, move out the asset path. | |
const std::string & | GetEvaluatedPath () const & |
Return the evaluated asset path, if any. | |
std::string | GetEvaluatedPath () const && |
Overload for rvalues, move out the evaluated path. | |
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. | |
Setters | |
void | SetAuthoredPath (const std::string &authoredPath) |
Sets the authored path. | |
void | SetEvaluatedPath (const std::string &evaluatedPath) |
Sets the evaluated path. | |
void | SetResolvedPath (const std::string &resolvedPath) |
Sets the resolved path. This value is the result of asset resolution. | |
Friends | |
void | swap (SdfAssetPath &lhs, SdfAssetPath &rhs) |
Operators | |
bool | operator== (const SdfAssetPath &rhs) const |
Equality, including the evaluated and resolved paths. | |
bool | operator!= (const SdfAssetPath &rhs) const |
Inequality operator. | |
SDF_API bool | operator< (const SdfAssetPath &rhs) const |
Ordering first by asset path, resolved path, then by evaluated 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) |
Contains an asset path and optional evaluated and resolved paths.
When this class is used to author scene description, the value returned by GetAssetPath() is serialized out, all other fields are ignored. 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 72 of file assetPath.h.
SDF_API SdfAssetPath | ( | ) |
Construct an empty asset path.
|
explicit |
Construct an asset path with authoredPath
and no associated evaluated or resolved path.
If the passed authoredPath
is not valid UTF-8 or contains C0 or C1 control characters, raise a TfError and return the default-constructed empty asset path.
SDF_API SdfAssetPath | ( | const std::string & | authoredPath, |
const std::string & | resolvedPath | ||
) |
Construct an asset path with authoredPath
and an associated resolvedPath
.
If either the passed authoredPath
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.
SDF_API SdfAssetPath | ( | const SdfAssetPathParams & | params | ) |
Construct an asset path using a SdfAssetPathParams object.
If any fields of the passed in structure are not valid UTF-8 or either contain C0 or C1 control, characters, raise a TfError and return the default-constructed empty asset path.
|
inline |
Return the asset path.
If the the evaluated path is not empty, it will be returned, otherwise the raw, authored path is returned. The value this function returns is the exact input that is passed to asset resolution.
Definition at line 199 of file assetPath.h.
|
inline |
Overload for rvalues, move out the asset path.
Definition at line 204 of file assetPath.h.
|
inline |
Returns the asset path as it was authored in the original layer.
When authoring scene description, this value is used for serialization.
Definition at line 169 of file assetPath.h.
|
inline |
Overload for rvalues, move out the asset path.
Definition at line 174 of file assetPath.h.
|
inline |
Return the evaluated asset path, if any.
The evaluated path's value consists of the authored path with any expression variables evaluated. If the authored path does not contain any expression variables, this field will be empty.
Note that SdfAssetPath carries an evaluated path only if its creator passed one to the constructor. SdfAssetPath never performs variable expression evaluation itself.
Definition at line 186 of file assetPath.h.
|
inline |
Overload for rvalues, move out the evaluated path.
Definition at line 191 of file assetPath.h.
|
inline |
Hash function.
Definition at line 148 of file assetPath.h.
|
inline |
Return the resolved asset path, if any.
This is the resolved value of GetAssetPath()
Note that SdfAssetPath carries a resolved path only if its creator passed one to the constructor. SdfAssetPath never performs resolution itself.
Definition at line 215 of file assetPath.h.
|
inline |
Overload for rvalues, move out the asset path.
Definition at line 220 of file assetPath.h.
|
inline |
Inequality operator.
Definition at line 122 of file assetPath.h.
SDF_API bool operator< | ( | const SdfAssetPath & | rhs | ) | const |
Ordering first by asset path, resolved path, then by evaluated path.
|
inline |
Less than or equal operator.
Definition at line 131 of file assetPath.h.
|
inline |
Equality, including the evaluated and resolved paths.
Definition at line 114 of file assetPath.h.
|
inline |
Greater than operator.
Definition at line 137 of file assetPath.h.
|
inline |
Greater than or equal operator.
Definition at line 143 of file assetPath.h.
|
inline |
Sets the authored path.
This value is the path exactly as it is authored in the layer.
Definition at line 231 of file assetPath.h.
|
inline |
Sets the evaluated path.
This value is the result of performing variable expression resolution on the authored path.
Definition at line 237 of file assetPath.h.
|
inline |
Sets the resolved path. This value is the result of asset resolution.
Definition at line 242 of file assetPath.h.
|
friend |
Definition at line 160 of file assetPath.h.
|
friend |
Definition at line 249 of file assetPath.h.