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

A segment of a path within a single runtime. More...

#include <pathSegment.h>

Public Types

typedef std::vector< PathComponentComponents
 

Public Member Functions

 PathSegment (const std::string &segment, Rtid runTimeId, char separator)
 
 PathSegment (const Components &components, Rtid runTimeId, char separator)
 
 PathSegment (Components &&components, Rtid runTimeId, char separator) noexcept
 
 PathSegment (const PathComponent &component, Rtid runTimeId, char separator)
 
 PathSegment (const PathSegment &)=default
 Default copy constructor. More...
 
PathSegmentoperator= (const PathSegment &)=default
 Default assignment operator. More...
 
 PathSegment (PathSegment &&) noexcept
 Move construction. Right hand side becomes empty. More...
 
PathSegmentoperator= (PathSegment &&rhs) noexcept
 Move assignment. Right hand side becomes empty. More...
 
Rtid runTimeId () const
 
char separator () const
 
const Componentscomponents () const
 
PathSegment pop () const
 
PathSegment popHead () const
 
PathSegment head (int nbComponents) const
 
bool operator== (const PathSegment &rhs) const
 Unfortunately no compiler-generated default equality operators. More...
 
bool operator!= (const PathSegment &rhs) const
 
Components::size_type size () const
 
bool empty () const
 
Components::const_iterator cbegin () const
 Iteration interface on PathComponents. More...
 
Components::const_iterator begin () const
 
Components::const_iterator cend () const
 
Components::const_iterator end () const
 
Components::iterator begin ()
 
Components::iterator end ()
 
std::string string () const
 

Private Attributes

friend Path
 
Components fComponents
 
Rtid fRunTimeId
 
char fSeparator
 

Detailed Description

A segment of a path within a single runtime.

A path segment is part of a path to an object (either containment or 3D hierarchy) where all objects on the path segment live in a single runtime.

By itself, a path segment cannot be considered relative or absolute. The result of concatenating one or more path segments into a path will result in an absolute or relative path.

The separator character can be '\0', which is interpreted as meaning no separator. This can be used to represent a path segment with a single component, where there is no hierarchy.

Definition at line 35 of file pathSegment.h.

Member Typedef Documentation

◆ Components

Definition at line 39 of file pathSegment.h.

Constructor & Destructor Documentation

◆ PathSegment() [1/6]

Ufe::PathSegment::PathSegment ( const std::string &  segment,
Rtid  runTimeId,
char  separator 
)

Creates a PathSegment for the argument runtime.

Parameters
[in]segmentString representation of segment, with separators.
[in]runTimeIdID of runtime for this segment.
[in]separatorSeparator character for segment string.

◆ PathSegment() [2/6]

Ufe::PathSegment::PathSegment ( const Components components,
Rtid  runTimeId,
char  separator 
)

Creates a PathSegment for the argument runtime.

Parameters
[in]componentsVector of PathComponents.
[in]runTimeIdID of runtime for this segment.
[in]separatorSeparator character for segment string.

◆ PathSegment() [3/6]

Ufe::PathSegment::PathSegment ( Components &&  components,
Rtid  runTimeId,
char  separator 
)
noexcept

Creates a PathSegment for the argument runtime [noexcept]. Move construction. Right hand side becomes empty.

Parameters
[in]componentsVector of path components.
[in]runTimeIdID of runtime for this segment.
[in]separatorSeparator character for segment string.

◆ PathSegment() [4/6]

Ufe::PathSegment::PathSegment ( const PathComponent component,
Rtid  runTimeId,
char  separator 
)

Convenience for single-component path.

Parameters
[in]componentSingle path components.
[in]runTimeIdID of runtime for this segment.
[in]separatorSeparator character for segment string.

◆ PathSegment() [5/6]

Ufe::PathSegment::PathSegment ( const PathSegment )
default

Default copy constructor.

◆ PathSegment() [6/6]

Ufe::PathSegment::PathSegment ( PathSegment &&  )
noexcept

Move construction. Right hand side becomes empty.

Member Function Documentation

◆ begin() [1/2]

Components::iterator Ufe::PathSegment::begin ( )

◆ begin() [2/2]

Components::const_iterator Ufe::PathSegment::begin ( ) const

◆ cbegin()

Components::const_iterator Ufe::PathSegment::cbegin ( ) const

Iteration interface on PathComponents.

◆ cend()

Components::const_iterator Ufe::PathSegment::cend ( ) const

◆ components()

const Components & Ufe::PathSegment::components ( ) const
Returns
PathComponents list.

◆ empty()

bool Ufe::PathSegment::empty ( ) const
Returns
True if there are no PathComponents.

◆ end() [1/2]

Components::iterator Ufe::PathSegment::end ( )

◆ end() [2/2]

Components::const_iterator Ufe::PathSegment::end ( ) const

◆ head()

PathSegment Ufe::PathSegment::head ( int  nbComponents) const
Parameters
nbComponentsThe first n PathComponent to retrieve.
Returns
A copy of the PathSegment that includes only the first n PathComponents. If n is negative, the last n PathComponents are removed.
Exceptions
InvalidOperationOnPathSegmentIf argument is 0, > size(), <= -size().

◆ operator!=()

bool Ufe::PathSegment::operator!= ( const PathSegment rhs) const

◆ operator=() [1/2]

PathSegment & Ufe::PathSegment::operator= ( const PathSegment )
default

Default assignment operator.

◆ operator=() [2/2]

PathSegment & Ufe::PathSegment::operator= ( PathSegment &&  rhs)
noexcept

Move assignment. Right hand side becomes empty.

◆ operator==()

bool Ufe::PathSegment::operator== ( const PathSegment rhs) const

Unfortunately no compiler-generated default equality operators.

◆ pop()

PathSegment Ufe::PathSegment::pop ( ) const
Returns
A copy of the PathSegment with the tail PathComponent removed.
Exceptions
InvalidOperationOnPathSegmentIf PathSegment is empty.

◆ popHead()

PathSegment Ufe::PathSegment::popHead ( ) const
Returns
A copy of the PathSegment with the head PathComponent removed.
Exceptions
InvalidOperationOnPathSegmentIf PathSegment is empty.

◆ runTimeId()

Rtid Ufe::PathSegment::runTimeId ( ) const
Returns
Segment runtime ID.

◆ separator()

char Ufe::PathSegment::separator ( ) const
Returns
Segment separator.

◆ size()

Components::size_type Ufe::PathSegment::size ( ) const
Returns
Size of PathComponents.

◆ string()

std::string Ufe::PathSegment::string ( ) const
Returns
The string representation of the PathSegment.

Member Data Documentation

◆ fComponents

Components Ufe::PathSegment::fComponents
private

Definition at line 154 of file pathSegment.h.

◆ fRunTimeId

Rtid Ufe::PathSegment::fRunTimeId
private

Definition at line 155 of file pathSegment.h.

◆ fSeparator

char Ufe::PathSegment::fSeparator
private

Definition at line 156 of file pathSegment.h.

◆ Path

friend Ufe::PathSegment::Path
private

Definition at line 153 of file pathSegment.h.


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