ufe  4.2
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 "S:/jenkins/workspace/ECP/ufe/ufe-full-python3.10-windows/ufe/include/pathSegment.h"
2 #ifndef _ufePathSegment
3 #define _ufePathSegment
4 // ===========================================================================
5 // Copyright 2018 Autodesk, Inc. All rights reserved.
6 //
7 // Use of this software is subject to the terms of the Autodesk license
8 // agreement provided at the time of installation or download, or which
9 // otherwise accompanies this software in either electronic or hard copy form.
10 // ===========================================================================
11 
12 
13 #include "rtid.h"
14 #include "pathComponent.h"
15 
16 #include <string>
17 #include <vector>
18 
19 UFE_NS_DEF {
20  class Path;
22 
36 {
37 public:
38 
39  typedef std::vector<PathComponent> Components;
40 
49  const std::string& segment,
50  Rtid runTimeId,
51  char separator
52  );
53 
62  const Components& components,
63  Rtid runTimeId,
64  char separator
65  );
66 
75  Components&& components,
76  Rtid runTimeId,
77  char separator
78  ) noexcept;
79 
86  const PathComponent& component,
87  Rtid runTimeId,
88  char separator
89  );
90 
92  PathSegment(const PathSegment&) = default;
93 
95  PathSegment& operator=(const PathSegment&) = default;
96 
98  PathSegment(PathSegment&&) noexcept;
99 
101  PathSegment& operator=(PathSegment&& rhs) noexcept;
102 
104  Rtid runTimeId() const;
105 
107  char separator() const;
108 
110  const Components& components() const;
111 
114  PathSegment pop() const;
115 
118  PathSegment popHead() const;
119 
125  PathSegment head(int nbComponents) const;
126 
128  bool operator==(const PathSegment& rhs) const;
130  bool operator!=(const PathSegment& rhs) const;
132 
133  // Container of components interface.
135  Components::size_type size() const;
137  bool empty() const;
138 
140  Components::const_iterator cbegin() const;
142  Components::const_iterator begin() const;
143  Components::const_iterator cend() const;
144  Components::const_iterator end() const;
145  Components::iterator begin();
146  Components::iterator end();
148 
150  std::string string() const;
151 
152 private:
153  friend Path;
154  Components fComponents;
155  Rtid fRunTimeId;
156  char fSeparator;
157 };
158 
159 }
160 
161 #endif /* _ufePathSegment */
A segment of a path within a single runtime.
Definition: pathSegment.h:35
std::string string(const Path &path)
Constant string representation with fixed space and O(1) comparison.
Definition: pathComponent.h:33
Definition: path.h:197
Identify an object or 3D path in the scene.
Definition: path.h:37
uint32_t Rtid
Definition: rtid.h:26
std::vector< PathComponent > Components
Definition: pathSegment.h:39
#define UFE_NS_DEF
Definition: ufe.h:35
#define UFE_SDK_DECL
Definition: ufeExport.h:36