/src/CMake/Source/cmConstStack.tcc
Line | Count | Source |
1 | | /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying |
2 | | file LICENSE.rst or https://cmake.org/licensing for details. */ |
3 | | |
4 | | #include <cassert> |
5 | | #include <memory> |
6 | | #include <utility> |
7 | | |
8 | | template <typename T, typename Stack> |
9 | | struct cmConstStack<T, Stack>::Entry |
10 | | { |
11 | | Entry(std::shared_ptr<Entry const> parent, T value) |
12 | 2 | : Value(std::move(value)) |
13 | 2 | , Parent(std::move(parent)) |
14 | 2 | { |
15 | 2 | } cmConstStack<cmListFileContext, cmListFileBacktrace>::Entry::Entry(std::__1::shared_ptr<cmConstStack<cmListFileContext, cmListFileBacktrace>::Entry const>, cmListFileContext) Line | Count | Source | 12 | 2 | : Value(std::move(value)) | 13 | 2 | , Parent(std::move(parent)) | 14 | 2 | { | 15 | 2 | } |
Unexecuted instantiation: cmConstStack<cmFindPackageCall, cmFindPackageStack>::Entry::Entry(std::__1::shared_ptr<cmConstStack<cmFindPackageCall, cmFindPackageStack>::Entry const>, cmFindPackageCall) |
16 | | |
17 | | T Value; |
18 | | std::shared_ptr<Entry const> Parent; |
19 | | }; |
20 | | |
21 | | template <typename T, typename Stack> |
22 | 6 | cmConstStack<T, Stack>::cmConstStack() = default; cmConstStack<cmListFileContext, cmListFileBacktrace>::cmConstStack() Line | Count | Source | 22 | 5 | cmConstStack<T, Stack>::cmConstStack() = default; |
cmConstStack<cmFindPackageCall, cmFindPackageStack>::cmConstStack() Line | Count | Source | 22 | 1 | cmConstStack<T, Stack>::cmConstStack() = default; |
|
23 | | |
24 | | template <typename T, typename Stack> |
25 | | Stack cmConstStack<T, Stack>::Push(T value) const |
26 | 2 | { |
27 | 2 | return Stack(this->TopEntry, std::move(value)); |
28 | 2 | } cmConstStack<cmListFileContext, cmListFileBacktrace>::Push(cmListFileContext) const Line | Count | Source | 26 | 2 | { | 27 | 2 | return Stack(this->TopEntry, std::move(value)); | 28 | 2 | } |
Unexecuted instantiation: cmConstStack<cmFindPackageCall, cmFindPackageStack>::Push(cmFindPackageCall) const |
29 | | |
30 | | template <typename T, typename Stack> |
31 | | Stack cmConstStack<T, Stack>::Pop() const |
32 | 3 | { |
33 | 3 | assert(this->TopEntry); |
34 | 3 | return Stack(this->TopEntry->Parent); |
35 | 3 | } cmConstStack<cmListFileContext, cmListFileBacktrace>::Pop() const Line | Count | Source | 32 | 3 | { | 33 | | assert(this->TopEntry); | 34 | 3 | return Stack(this->TopEntry->Parent); | 35 | 3 | } |
Unexecuted instantiation: cmConstStack<cmFindPackageCall, cmFindPackageStack>::Pop() const |
36 | | |
37 | | template <typename T, typename Stack> |
38 | | T const& cmConstStack<T, Stack>::Top() const |
39 | 5 | { |
40 | 5 | assert(this->TopEntry); |
41 | 5 | return this->TopEntry->Value; |
42 | 5 | } cmConstStack<cmListFileContext, cmListFileBacktrace>::Top() const Line | Count | Source | 39 | 5 | { | 40 | | assert(this->TopEntry); | 41 | 5 | return this->TopEntry->Value; | 42 | 5 | } |
Unexecuted instantiation: cmConstStack<cmFindPackageCall, cmFindPackageStack>::Top() const |
43 | | |
44 | | template <typename T, typename Stack> |
45 | | bool cmConstStack<T, Stack>::Empty() const |
46 | 7 | { |
47 | 7 | return !this->TopEntry; |
48 | 7 | } cmConstStack<cmListFileContext, cmListFileBacktrace>::Empty() const Line | Count | Source | 46 | 7 | { | 47 | 7 | return !this->TopEntry; | 48 | 7 | } |
Unexecuted instantiation: cmConstStack<cmFindPackageCall, cmFindPackageStack>::Empty() const |
49 | | |
50 | | template <typename T, typename Stack> |
51 | | cmConstStack<T, Stack>::cmConstStack(std::shared_ptr<Entry const> parent, |
52 | | T value) |
53 | | : TopEntry( |
54 | 2 | std::make_shared<Entry const>(std::move(parent), std::move(value))) |
55 | 2 | { |
56 | 2 | } cmConstStack<cmListFileContext, cmListFileBacktrace>::cmConstStack(std::__1::shared_ptr<cmConstStack<cmListFileContext, cmListFileBacktrace>::Entry const>, cmListFileContext) Line | Count | Source | 54 | 2 | std::make_shared<Entry const>(std::move(parent), std::move(value))) | 55 | 2 | { | 56 | 2 | } |
Unexecuted instantiation: cmConstStack<cmFindPackageCall, cmFindPackageStack>::cmConstStack(std::__1::shared_ptr<cmConstStack<cmFindPackageCall, cmFindPackageStack>::Entry const>, cmFindPackageCall) |
57 | | |
58 | | template <typename T, typename Stack> |
59 | | cmConstStack<T, Stack>::cmConstStack(std::shared_ptr<Entry const> top) |
60 | 3 | : TopEntry(std::move(top)) |
61 | 3 | { |
62 | 3 | } cmConstStack<cmListFileContext, cmListFileBacktrace>::cmConstStack(std::__1::shared_ptr<cmConstStack<cmListFileContext, cmListFileBacktrace>::Entry const>) Line | Count | Source | 60 | 3 | : TopEntry(std::move(top)) | 61 | 3 | { | 62 | 3 | } |
Unexecuted instantiation: cmConstStack<cmFindPackageCall, cmFindPackageStack>::cmConstStack(std::__1::shared_ptr<cmConstStack<cmFindPackageCall, cmFindPackageStack>::Entry const>) |