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
pathStringExcept.h
Go to the documentation of this file.
1#line 1 "S:/jenkins/workspace/ECP/ufe/ufe-full-python3.11-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
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
28class EmptyPathSegment : public std::runtime_error
29{
30public:
31 EmptyPathSegment(const std::string& pathString) :
32 std::runtime_error(pathString), fPathString(pathString) {}
34 ~EmptyPathSegment() override {}
35
36 const std::string& pathString() const { return fPathString; }
37
38private:
40};
41
43//
44// See \ref Ufe::InvalidRunTimeName for inline implementation details.
45
46class InvalidPathComponentSeparator : public std::out_of_range
47{
48public:
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
59private:
60 const char fSeparator;
62};
63
65//
66// See \ref Ufe::InvalidRunTimeName for inline implementation details.
67
68class InvalidPath : public std::runtime_error
69{
70public:
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
78private:
80};
81
82#ifdef __clang__
83#pragma clang diagnostic pop
84#endif
85
86}
87
88#endif /* _pathStringExcept */
Exception class to signal empty path segment in path string.
EmptyPathSegment(const std::string &pathString)
const std::string fPathString
EmptyPathSegment(const EmptyPathSegment &)=default
const std::string & pathString() const
Exception class to signal an unknown path component separator in a path string.
InvalidPathComponentSeparator(char sep, const std::string &segmentString)
InvalidPathComponentSeparator(const InvalidPathComponentSeparator &)=default
const std::string & pathSegmentString() const
Exception class to signal an invalid path.
InvalidPath(const InvalidPath &)=default
~InvalidPath() override
InvalidPath(const std::string &pathString)
const std::string fPathString
const std::string & pathString() const
std::string string(const Path &path)
Definition: path.h:201
#define UFE_NS_DEF
Definition: ufe.h:35