ufe 6.2
Universal Front End is a DCC-agnostic component that will allow a DCC to browse and edit data in multiple data models
Ufe::PathString Namespace Reference

Typedefs

typedef std::function< Path(const Path::Segments &)> CreatePathFn
 
typedef std::function< Path(const std::string &)> CreateSingleSegmentPathFn
 
typedef std::function< std::string(const Path &)> StringFn
 

Functions

Path path (const std::string &pathString)
 
std::string string (const Path &path)
 
std::string pathSegmentSeparator ()
 
void setPathSegmentSeparator (const std::string &separator)
 
CreatePathFn createPathFn ()
 
void setCreatePathFn (const CreatePathFn &fn)
 
CreateSingleSegmentPathFn createSingleSegmentPathFn (const Rtid &rtId)
 
void setCreateSingleSegmentPathFn (const Rtid &rtId, const CreateSingleSegmentPathFn &fn)
 
StringFn stringFn ()
 
void setStringFn (const StringFn &fn)
 
void registerPathComponentSeparator (const Rtid &rtId, char sep)
 
void unregisterPathComponentSeparator (const Rtid &rtId, char sep)
 
std::list< Ufe::RtidpathComponentSeparatorRunTimeIds (char sep)
 

Typedef Documentation

◆ CreatePathFn

typedef std::function<Path(const Path::Segments&)> Ufe::PathString::CreatePathFn

Definition at line 59 of file pathString.h.

◆ CreateSingleSegmentPathFn

typedef std::function<Path(const std::string&)> Ufe::PathString::CreateSingleSegmentPathFn

Definition at line 60 of file pathString.h.

◆ StringFn

typedef std::function<std::string(const Path&)> Ufe::PathString::StringFn

Definition at line 61 of file pathString.h.

Function Documentation

◆ createPathFn()

CreatePathFn Ufe::PathString::createPathFn ( )
Returns
The general path creation function.

◆ createSingleSegmentPathFn()

CreateSingleSegmentPathFn Ufe::PathString::createSingleSegmentPathFn ( const Rtid rtId)

Return the single-segment path creation function for the argument runtime.

Parameters
rtIdthe ID of the runtime
Returns
rtId The single segment path creator for the argument runtime.
Exceptions
std::out_of_rangeIf the argument rtId has no creator function.

◆ path()

Path Ufe::PathString::path ( const std::string &  pathString)
Parameters
pathStringA string with path segments separated by the path segment separator.
Exceptions
EmptyPathSegmentIf the path segment is an empty string, or a degenerate single path component separator (e.g. "/a/b,|", where "|" is a degenerate path segment).
InvalidPathComponentSeparatorIf the leading character or the character following the path segment separator is not a path component separator (e.g. "/a/b,foo", where "f" is not a path component separator).
InvalidPathIf multiple runtimes register the same path component separator, each will be asked to create a scene item for the argument path string. If none succeeds, InvalidPath is thrown.
Returns
The UFE path corresponding to the input string.

Referenced by Ufe::Trie< T >::add(), Ufe::Trie< T >::contains(), Ufe::Trie< T >::createNode(), Ufe::Trie< T >::find(), Ufe::Trie< T >::node(), std::hash< Ufe_v6 ::Path >::operator()(), Ufe::BaseUndoableCommand::sceneItem(), and Ufe::BaseUndoableCommand::setPath().

Here is the caller graph for this function:

◆ pathComponentSeparatorRunTimeIds()

std::list< Ufe::Rtid > Ufe::PathString::pathComponentSeparatorRunTimeIds ( char  sep)

Return the runtimes corresponding to a path component separator.

Parameters
septhe path component separator character.

◆ pathSegmentSeparator()

std::string Ufe::PathString::pathSegmentSeparator ( )
Returns
The current path segment string separator.

◆ registerPathComponentSeparator()

void Ufe::PathString::registerPathComponentSeparator ( const Rtid rtId,
char  sep 
)

Register a path component separator for the argument runtime. It is legal for multiple runtimes to register the same path component separator.

Parameters
rtIdthe ID of the runtime for the path component separator.
septhe path component separator character.
Exceptions
InvalidRunTimeIdThrown if argument runtime ID does not exist.

◆ setCreatePathFn()

void Ufe::PathString::setCreatePathFn ( const CreatePathFn fn)

Set the general path creation function. It cannot be empty.

Exceptions
std::invalid_argumentIf fn is empty.

◆ setCreateSingleSegmentPathFn()

void Ufe::PathString::setCreateSingleSegmentPathFn ( const Rtid rtId,
const CreateSingleSegmentPathFn fn 
)

Set the single-segment path creation function for the argument runtime.

Parameters
rtIdthe ID of the runtime for the single segment path creator.
fnthe single-segment path creation function.
Exceptions
InvalidRunTimeIdThrown if argument runtime ID does not exist.

◆ setPathSegmentSeparator()

void Ufe::PathString::setPathSegmentSeparator ( const std::string &  separator)

Set the path segment string separator. Cannot be an empty string.

Exceptions
std::invalid_argumentIf separator is empty.

◆ setStringFn()

void Ufe::PathString::setStringFn ( const StringFn fn)

Set the path to string creation function. It cannot be empty.

Exceptions
std::invalid_argumentIf fn is empty.

◆ string()

std::string Ufe::PathString::string ( const Path path)
Parameters
pathPath to a scene item.
Returns
The path string corresponding to the input path, with path segments separated by the path segment separator.

Referenced by Peptide::VersionFormat< VersionTrait >::getVersionInfo().

Here is the caller graph for this function:

◆ stringFn()

StringFn Ufe::PathString::stringFn ( )
Returns
The path to string creation function.

◆ unregisterPathComponentSeparator()

void Ufe::PathString::unregisterPathComponentSeparator ( const Rtid rtId,
char  sep 
)

Unregister a path component separator for the argument runtime.

Parameters
rtIdthe ID of the runtime for the path component separator.
septhe path component separator character.
Exceptions
std::out_of_rangeIf no such separator is registered.