summaryrefslogtreecommitdiffstats
path: root/Source/cmListFileCache.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-01-25 13:35:56 (GMT)
committerBrad King <brad.king@kitware.com>2022-01-25 13:36:06 (GMT)
commit3c4fa4c8924c1e219981bbc30ad02a89fd144ab6 (patch)
tree142e52b6c23e4ef893e5e0ba2ba8519ebb29024b /Source/cmListFileCache.h
parentfccdf99c39e38dd7637e7721b2196a47cf7ac31c (diff)
downloadCMake-3c4fa4c8924c1e219981bbc30ad02a89fd144ab6.zip
CMake-3c4fa4c8924c1e219981bbc30ad02a89fd144ab6.tar.gz
CMake-3c4fa4c8924c1e219981bbc30ad02a89fd144ab6.tar.bz2
cmListFileCache: Move cmListFileFunction earlier
Diffstat (limited to 'Source/cmListFileCache.h')
-rw-r--r--Source/cmListFileCache.h88
1 files changed, 44 insertions, 44 deletions
diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h
index 4a52876..16ba2c2 100644
--- a/Source/cmListFileCache.h
+++ b/Source/cmListFileCache.h
@@ -70,6 +70,50 @@ struct cmListFileArgument
long Line = 0;
};
+class cmListFileFunction
+{
+public:
+ cmListFileFunction(std::string name, long line,
+ std::vector<cmListFileArgument> args)
+ : Impl{ std::make_shared<Implementation>(std::move(name), line,
+ std::move(args)) }
+ {
+ }
+
+ std::string const& OriginalName() const noexcept
+ {
+ return this->Impl->Name.Original;
+ }
+
+ std::string const& LowerCaseName() const noexcept
+ {
+ return this->Impl->Name.Lower;
+ }
+
+ long Line() const noexcept { return this->Impl->Line; }
+
+ std::vector<cmListFileArgument> const& Arguments() const noexcept
+ {
+ return this->Impl->Arguments;
+ }
+
+ operator cmCommandContext const&() const noexcept { return *this->Impl; }
+
+private:
+ struct Implementation : public cmCommandContext
+ {
+ Implementation(std::string name, long line,
+ std::vector<cmListFileArgument> args)
+ : cmCommandContext{ std::move(name), line }
+ , Arguments{ std::move(args) }
+ {
+ }
+ std::vector<cmListFileArgument> Arguments;
+ };
+
+ std::shared_ptr<Implementation const> Impl;
+};
+
class cmListFileContext
{
public:
@@ -117,50 +161,6 @@ bool operator<(const cmListFileContext& lhs, const cmListFileContext& rhs);
bool operator==(cmListFileContext const& lhs, cmListFileContext const& rhs);
bool operator!=(cmListFileContext const& lhs, cmListFileContext const& rhs);
-class cmListFileFunction
-{
-public:
- cmListFileFunction(std::string name, long line,
- std::vector<cmListFileArgument> args)
- : Impl{ std::make_shared<Implementation>(std::move(name), line,
- std::move(args)) }
- {
- }
-
- std::string const& OriginalName() const noexcept
- {
- return this->Impl->Name.Original;
- }
-
- std::string const& LowerCaseName() const noexcept
- {
- return this->Impl->Name.Lower;
- }
-
- long Line() const noexcept { return this->Impl->Line; }
-
- std::vector<cmListFileArgument> const& Arguments() const noexcept
- {
- return this->Impl->Arguments;
- }
-
- operator cmCommandContext const&() const noexcept { return *this->Impl; }
-
-private:
- struct Implementation : public cmCommandContext
- {
- Implementation(std::string name, long line,
- std::vector<cmListFileArgument> args)
- : cmCommandContext{ std::move(name), line }
- , Arguments{ std::move(args) }
- {
- }
- std::vector<cmListFileArgument> Arguments;
- };
-
- std::shared_ptr<Implementation const> Impl;
-};
-
// Represent a backtrace (call stack). Provide value semantics
// but use efficient reference-counting underneath to avoid copies.
class cmListFileBacktrace