summaryrefslogtreecommitdiffstats
path: root/Source/cmListFileCache.h
diff options
context:
space:
mode:
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