FnUsdAbstractionLib 0.6.0
|
A wrapper for SdfPath. More...
#include <Path.h>
Public Member Functions | |
Path () | |
Abstraction handle for casting to underlying implementation type. | |
Path (const char *text) | |
Path (const std::string &text) | |
Path (const Path::Handle &handle) | |
Path (Path &&rhs) noexcept | |
Path & | operator= (Path &&rhs) noexcept |
Path (const Path &rhs) | |
Path & | operator= (const Path &rhs) |
const std::string & | name () const |
Return the last part of the path, usually the prim or attribute name. | |
Token | nameToken () const |
Return the last part of the path, usually the prim or attribute name, as a token. | |
Path | parent () const |
Return the parent portion of the path. | |
void | clear () |
Clear the path to empty. | |
bool | empty () const |
Return true if the path is empty. | |
std::string | asString () const |
Return the path as a string. | |
const std::string & | string () const |
Return a const reference to the path string in persistent storage, which is built on demand. | |
Path | appendChild (const Token &suffix) const |
Return a new path consisting of appending a child component to the path. | |
Path | appendChild (const char *suffix) const |
Return a new path consisting of appending a child component to the path. | |
Path | appendChild (const std::string &suffix) const |
Return a new path consisting of appending a child component to the path. | |
Path | appendPath (const Path &path) const |
Return a new path consisting of appending another path to this path. | |
Path | appendProperty (const Token &property) const |
Return a new path consisting of appending a property component to the path. | |
Path | makeAbsolutePath (const Path &anchor) const |
Returns a new absolute path resolved against the anchor path. | |
Path | makeRelativePath (const Path &anchor) const |
Returns a new path relative to the anchor path. | |
Path | getPrimPath () const |
bool | hasPrefix (const Path &prefix) const |
Path | replacePrefix (const Path &oldPrefix, const Path &newPrefix, bool fixTargetPaths=true) const |
bool | operator== (const Path &rhs) const |
bool | operator!= (const Path &rhs) const |
bool | operator< (const Path &rhs) const |
Path::Handle & | getPath (int usd_version) |
Get the underlying SdfPath. | |
const Path::Handle & | getPath (int usd_version) const |
uint64_t | hash () const |
Get the hash of the underlying SdfPath. | |
void | append (fdk::Hash &hash) const |
Add the path's hash to a fdk::Hash object. | |
bool | isValidPath (std::string *errorMsg=nullptr) const |
Checks if path contents are valid, and if not return false and pass the error string into the subsystem. | |
bool | isAbsolutePath () const |
Returns true if the path is absolute. | |
int | handleIndex () const |
Returns the index of the underlying handle. For internal use only! | |
Path (int handleIndex) | |
Assign from a pre-known handle index. For internal use only! | |
Static Public Member Functions | |
static bool | IsValidPathString (const std::string &pathString, std::string *errorMsg=nullptr) |
Checks if string is a valid Path, and if not return false and pass the error string into the subsystem. | |
static const Path & | AbsoluteRootPath () |
A wrapper for SdfPath.
Path usg::Path::getPrimPath | ( | ) | const |
Creates a path by stripping all relational attributes, targets, properties, and variant selections from the leafmost prim path. If the path is already a prim path, the same path is returned.
bool usg::Path::hasPrefix | ( | const Path & | prefix | ) | const |
Return true if both this path and prefix are not empty and this path has prefix as a prefix.
©2025 The Foundry Visionmongers, Ltd. All Rights Reserved. |