summaryrefslogtreecommitdiffstats
path: root/src/qdoc/qdoc/src/qdoc/boundaries/filesystem/filepath.cpp
blob: d8964b6a692c2c1bf4a038b40d41d88897ec0b23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#include "filepath.h"

/*!
 * \class FilePath
 *
 * \brief Represents a path to a file that was known to exist on the
 * filesystem.
 *
 * An instance of this type guarantees that, at the time of creation
 * of the instance, the contained path represented an existing,
 * readable file.
 *
 * The type is intended to be used whenever a user-provided path to a
 * file is encountered the first time, validating that it can be
 * used later on for the duration of a QDoc execution and
 * canonicalizing the original path.
 *
 * Such a usage example could be when resolving a file whose path is
 * provided by the user.
 *
 * Similarly, it is intended to be used at the API boundaries,
 * internally, to relieve the called element of the requirement to
 * check the validity of a path when a file is required and to
 * ensure that a single format of the path is encountered.
 *
 * Do note that the guarantees provided by this type do not
 * necessarily hold after the time of creation of an instance.
 * Indeed, the underlying filesystem may have changed.
 *
 * It is possible to renew the contract by obtaining a new instance:
 *
 * \code
 *     FilePath old...
 *
 *     ...
 *
 *     auto current{FilePath::refine(old.value())};
 * \endcode
 *
 * QDoc itself will not generally perform destructive operations on
 * its input files during an execution and, as such, it is never
 * required to renew a contract. Ensuring that the underlying input
 * files are indeed immutable is out-of-scope for QDoc and it is
 * allowed to consider a case where the contract was invalidated as
 * undefined behavior.
 */

/*!
 * \include boundaries/refined_typedef_members.qdocinc {wrapped_type_documentation} {FilePath}
 */

/*!
 * \include boundaries/refined_typedef_members.qdocinc {has_equality_operator_documentation} {FilePath}
 */

/*!
 * \include boundaries/refined_typedef_members.qdocinc {has_less_than_operator_documentation} {FilePath}
 */

/*!
 * \include boundaries/refined_typedef_members.qdocinc {has_strictly_less_than_operator_documentation} {FilePath}
 */

/*!
 * \include boundaries/refined_typedef_members.qdocinc {has_greater_than_operator_documentation} {FilePath}
 */

/*!
 * \include boundaries/refined_typedef_members.qdocinc {has_strictly_greater_than_operator_documentation} {FilePath}
 */

/*!
 * \include boundaries/refined_typedef_members.qdocinc {refine_documentation} {FilePath}
 */

/*!
 * \include boundaries/refined_typedef_members.qdocinc {value_documentation} {FilePath}
 */

/*!
 * \include boundaries/refined_typedef_members.qdocinc {copy_constructor_documentation} {FilePath}
 */

/*!
 * \include boundaries/refined_typedef_members.qdocinc {copy_assignment_documentation} {FilePath}
 */

/*!
 * \include boundaries/refined_typedef_members.qdocinc {move_constructor_documentation} {FilePath}
 */

/*!
 * \include boundaries/refined_typedef_members.qdocinc {move_assignment_documentation} {FilePath}
 */

/*!
 * \include boundaries/refined_typedef_members.qdocinc {conversion_documentation} {FilePath}
 */

/*!
 * \include boundaries/refined_typedef_members.qdocinc {operator_equal_documentation} {FilePath}
 */

/*!
 * \include boundaries/refined_typedef_members.qdocinc {operator_unequal_documentation} {FilePath}
 */

/*!
 * \include boundaries/refined_typedef_members.qdocinc {operator_less_than_documentation} {FilePath}
 */

/*!
 * \include boundaries/refined_typedef_members.qdocinc {operator_less_than_or_equal_documentation} {FilePath}
 */

/*!
 * \include boundaries/refined_typedef_members.qdocinc {operator_greater_than_documentation} {FilePath}
 */

/*!
 * \include boundaries/refined_typedef_members.qdocinc {operator_greater_than_or_equal_documentation} {FilePath}
 */