82 : m_entry(std::exchange(entry, {}))
94 const std::filesystem::path& path,
96 : m_entry(path, style)
108 std::filesystem::path&& path,
110 : m_entry(path, style)
121 writer <<
"#include ";
123 std::string path = m_entry.
path.string();
125 switch (includeStyle)
129 writer <<
"\"" << path <<
"\"";
133 writer <<
"'" << path <<
"'";
137 writer <<
"<" << path <<
">";
Base class for commands.
Definition: Command.hpp:44
Command for outputting an include statement for C++.
Definition: Include.hpp:65
void Visit(Writer &writer) override
Definition: Include.hpp:114
Include(const std::filesystem::path &path, IncludeStyle style=IncludeStyle::Inherit)
Definition: Include.hpp:93
Include(std::filesystem::path &&path, IncludeStyle style=IncludeStyle::Inherit) noexcept
Definition: Include.hpp:107
Include(IncludeEntry &&entry) noexcept
Definition: Include.hpp:81
Include(const IncludeEntry &entry)
Definition: Include.hpp:72
Pure virtual interface for writers.
Definition: Writer.hpp:44
virtual IncludeStyle GetIncludeStyle() const =0
IncludeStyle
Include style to use when writing to output.
Definition: IncludeStyle.hpp:36
@ DoubleQuotes
Output double quotation marks "".
@ Inherit
Inherit setting from the config, not valid on Writer.
@ SingleQuotes
Output single quotation marks '' (not valid for C++)
@ AngularBrackets
Output angular brackets <>
Definition: Braces.hpp:29
Data for includes.
Definition: IncludeEntry.hpp:36
IncludeStyle style
Definition: IncludeEntry.hpp:75
std::filesystem::path path
Definition: IncludeEntry.hpp:70