ufe  2.0
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 run-time.

Parameters
rtIdthe ID of the run-time
Returns
rtId The single segment path creator for the argument run-time.
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.
Returns
The UFE path corresponding to the input string.

Referenced by Ufe::Trie< T >::add(), Ufe::Trie< T >::contains(), Ufe::Trie< T >::containsDescendant(), Ufe::Trie< T >::find(), Ufe::Trie< T >::node(), std::hash< Ufe_v2 ::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 run-times 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 run-time. It is legal for multiple run-times to register the same path component separator.

Parameters
rtIdthe ID of the run-time for the path component separator.
septhe path component separator character.
Exceptions
InvalidRunTimeIdThrown if argument run-time 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 run-time.

Parameters
rtIdthe ID of the run-time for the single segment path creator.
fnthe single-segment path creation function.
Exceptions
InvalidRunTimeIdThrown if argument run-time 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 run-time.

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