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
pathComponent.h
Go to the documentation of this file.
1 #line 1 "S:/jenkins/workspace/ECP/ufe/ufe-full-python3.10-windows/ufe/include/pathComponent.h"
2 #ifndef _ufePathComponent
3 #define _ufePathComponent
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 #include "common/ufeExport.h"
13 #include <string>
14 #include <memory>
15 #include <vector>
16 
17 UFE_NS_DEF {
18 
34 public:
35  class Data;
36 
42  static bool exists(const std::string& aString);
43 
49  static std::vector<PathComponent> toComponents(const std::vector<std::string>& strings);
50 
52  static std::size_t tableSize();
53 
56  PathComponent(const std::string& aString);
57 
59  PathComponent();
60 
62  ~PathComponent();
63 
65  operator bool() const;
66 
68  PathComponent(const PathComponent&) = default;
70  PathComponent& operator=(const PathComponent&);
72 
74  bool operator==(const PathComponent& rhs) const;
76  bool operator!=(const PathComponent& rhs) const;
77 
79  const std::string& string() const;
81  std::int64_t id() const;
82 
83 private:
84  void releaseSharedData();
85 
86  std::shared_ptr<Data> fData;
87 };
88 
89 }
90 
91 // Hashing support.
92 namespace std {
93 template<> struct hash<Ufe::PathComponent> {
94  std::size_t operator()(const Ufe::PathComponent& c) const { return c.id(); }
95 };
96 }
97 
98 #endif /* _ufePathComponent */
std::string string(const Path &path)
Definition of macros for symbol visibility.
Constant string representation with fixed space and O(1) comparison.
Definition: pathComponent.h:33
Definition: attribute.h:26
Definition: path.h:197
std::shared_ptr< Data > fData
Definition: pathComponent.h:86
#define UFE_NS_DEF
Definition: ufe.h:35
std::int64_t id() const
Access the underlying shared string, and its ID. A null PathComponent has an empty string and an ID o...
std::size_t operator()(const Ufe::PathComponent &c) const
Definition: pathComponent.h:94
#define UFE_SDK_DECL
Definition: ufeExport.h:36