ufe 7.0
Universal Front End is a DCC-agnostic component that will allow a DCC to browse and edit data in multiple data models
pathSegment.h
Go to the documentation of this file.
1#line 1 "D:/Jenkins/workspace/EMS/ECG/ufe/full/ufe-full-python3.13-windows/ufe/include/pathSegment.h"
2#ifndef UFE_PATHSEGMENT_H
3#define UFE_PATHSEGMENT_H
4
5// ===========================================================================
6// Copyright 2025 Autodesk, Inc. All rights reserved.
7//
8// The use of this software is subject to the Autodesk Terms of Use or other
9// license agreement provided at the time of installation or download, or
10// which otherwise accompanies this software.
11// ===========================================================================
12
13
14#include "rtid.h"
15#include "pathComponent.h"
16
17#include <string>
18#include <vector>
19
21 class Path;
23
37{
38public:
39
40 typedef std::vector<PathComponent> Components;
41
50 const std::string& segment,
51 Rtid runTimeId,
52 char separator
53 );
54
63 const Components& components,
64 Rtid runTimeId,
65 char separator
66 );
67
76 Components&& components,
77 Rtid runTimeId,
78 char separator
79 ) noexcept;
80
87 const PathComponent& component,
88 Rtid runTimeId,
89 char separator
90 );
91
93 PathSegment(const PathSegment&) = default;
94
96 PathSegment& operator=(const PathSegment&) = default;
97
100
102 PathSegment& operator=(PathSegment&& rhs) noexcept;
103
105 Rtid runTimeId() const;
106
108 char separator() const;
109
111 const Components& components() const;
112
115 PathSegment pop() const;
116
119 PathSegment popHead() const;
120
126 PathSegment head(int nbComponents) const;
127
130 bool operator==(const PathSegment& rhs) const;
131 bool operator!=(const PathSegment& rhs) const;
133
134 // Container of components interface.
136 Components::size_type size() const;
138 bool empty() const;
139
142 Components::const_iterator cbegin() const;
143 Components::const_iterator begin() const;
144 Components::const_iterator cend() const;
145 Components::const_iterator end() const;
146 Components::iterator begin();
147 Components::iterator end();
149
151 std::string string() const;
152
153private:
154 friend Path;
155 Components fComponents;
156 Rtid fRunTimeId;
157 char fSeparator;
158};
159
160}
161
162#endif /* UFE_PATHSEGMENT_H */
Constant string representation with fixed space and O(1) comparison.
Definition: pathComponent.h:35
Identify an object or 3D path in the scene.
Definition: path.h:40
A segment of a path within a single runtime.
Definition: pathSegment.h:37
std::vector< PathComponent > Components
Definition: pathSegment.h:40
PathSegment(Components &&components, Rtid runTimeId, char separator) noexcept
PathSegment(PathSegment &&) noexcept
Move construction. Right hand side becomes empty.
PathSegment(const PathComponent &component, Rtid runTimeId, char separator)
PathSegment(const std::string &segment, Rtid runTimeId, char separator)
PathSegment(const PathSegment &)=default
Default copy constructor.
PathSegment(const Components &components, Rtid runTimeId, char separator)
PathSegment & operator=(const PathSegment &)=default
Default assignment operator.
std::string string(const Path &path)
uint32_t Rtid
Definition: rtid.h:27
Definition: path.h:202
#define UFE_NS_DEF
Definition: ufe.h:36
#define UFE_SDK_DECL
Definition: ufeExport.h:35