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
pathStringExcept.h
Go to the documentation of this file.
1 #line 1 "S:/jenkins/workspace/ECP/ufe/ufe-full-python3.10-windows/ufe/include/pathStringExcept.h"
2 #ifndef _pathStringExcept
3 #define _pathStringExcept
4 // ===========================================================================
5 // Copyright 2020 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 "ufe.h"
13 
14 #include <stdexcept>
15 #include <string>
16 
17 UFE_NS_DEF {
18 
19 #ifdef __clang__
20 #pragma clang diagnostic push
21 #pragma clang diagnostic ignored "-Wweak-vtables"
22 #endif
23 
25 //
26 // See \ref Ufe::InvalidRunTimeName for inline implementation details.
27 
28 class EmptyPathSegment : public std::runtime_error
29 {
30 public:
31  EmptyPathSegment(const std::string& pathString) :
32  std::runtime_error(pathString), fPathString(pathString) {}
33  EmptyPathSegment(const EmptyPathSegment&) = default;
34  ~EmptyPathSegment() override {}
35 
36  const std::string& pathString() const { return fPathString; }
37 
38 private:
40 };
41 
43 //
44 // See \ref Ufe::InvalidRunTimeName for inline implementation details.
45 
46 class InvalidPathComponentSeparator : public std::out_of_range
47 {
48 public:
49  InvalidPathComponentSeparator(char sep, const std::string& segmentString) :
50  std::out_of_range(segmentString), fSeparator(sep),
51  fPathSegmentString(segmentString) {}
54 
55  char separator() const { return fSeparator; }
56 
57  const std::string& pathSegmentString() const { return fPathSegmentString; }
58 
59 private:
60  const char fSeparator;
62 };
63 
65 //
66 // See \ref Ufe::InvalidRunTimeName for inline implementation details.
67 
68 class InvalidPath : public std::runtime_error
69 {
70 public:
71  InvalidPath(const std::string& pathString) :
72  std::runtime_error(pathString), fPathString(pathString) {}
73  InvalidPath(const InvalidPath&) = default;
74  ~InvalidPath() override {}
75 
76  const std::string& pathString() const { return fPathString; }
77 
78 private:
80 };
81 
82 #ifdef __clang__
83 #pragma clang diagnostic pop
84 #endif
85 
86 }
87 
88 #endif /* _pathStringExcept */
const std::string & pathSegmentString() const
InvalidPathComponentSeparator(char sep, const std::string &segmentString)
std::string string(const Path &path)
Definition: path.h:197
Exception class to signal empty path segment in path string.
Exception class to signal an unknown path component separator in a path string.
const std::string fPathString
~InvalidPath() override
#define UFE_NS_DEF
Definition: ufe.h:35
const std::string & pathString() const
EmptyPathSegment(const std::string &pathString)
InvalidPath(const std::string &pathString)
const std::string & pathString() const
Exception class to signal an invalid path.
const std::string fPathString