mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-05-09 14:04:57 +00:00
Adjust templater output
This commit is contained in:
parent
d0155d426a
commit
e8baf65134
@ -218,6 +218,8 @@ namespace templating
|
||||
m_output_stream << cachedData;
|
||||
}
|
||||
|
||||
std::cout << "Templated file \"" << m_output_file << "\"\n";
|
||||
|
||||
m_first_line = true;
|
||||
m_write_output_to_file = false;
|
||||
m_output_cache.clear();
|
||||
@ -325,7 +327,7 @@ Templater::Templater(std::istream& stream, std::string fileName)
|
||||
{
|
||||
}
|
||||
|
||||
bool Templater::TemplateToDirectory(const std::string& outputDirectory)
|
||||
bool Templater::TemplateToDirectory(const std::string& outputDirectory) const
|
||||
{
|
||||
TemplaterControlImpl control(m_stream, m_file_name, outputDirectory);
|
||||
|
||||
|
@ -10,7 +10,7 @@ namespace templating
|
||||
public:
|
||||
Templater(std::istream& stream, std::string fileName);
|
||||
|
||||
bool TemplateToDirectory(const std::string& outputDirectory);
|
||||
bool TemplateToDirectory(const std::string& outputDirectory) const;
|
||||
|
||||
private:
|
||||
std::istream& m_stream;
|
||||
|
@ -42,8 +42,7 @@ bool TemplatingStreamProxy::MatchSwitchDirective(const ParserLine& line, const u
|
||||
throw ParsingException(CreatePos(line, currentPosition), "Invalid switch directive.");
|
||||
|
||||
auto name = line.m_line.substr(nameStartPosition, currentPosition - nameStartPosition);
|
||||
|
||||
std::cout << "Switch: \"" << name << "\"\n";
|
||||
|
||||
m_templater_control->AddSwitch(std::move(name));
|
||||
return true;
|
||||
}
|
||||
@ -100,10 +99,6 @@ bool TemplatingStreamProxy::MatchOptionsDirective(const ParserLine& line, const
|
||||
firstArg = false;
|
||||
}
|
||||
|
||||
std::cout << "Options: \"" << name << "\" with values:\n";
|
||||
for (const auto& option : options)
|
||||
std::cout << " Value: " << option << "\n";
|
||||
|
||||
m_templater_control->AddOptions(std::move(name), std::move(options));
|
||||
return true;
|
||||
}
|
||||
@ -145,8 +140,7 @@ bool TemplatingStreamProxy::MatchFilenameDirective(const ParserLine& line, const
|
||||
|
||||
if (value.m_type != SimpleExpressionValue::Type::STRING)
|
||||
throw ParsingException(CreatePos(line, currentPosition), "pragma filename expression must evaluate to string");
|
||||
|
||||
std::cout << "Filename: \"" << *value.m_string_value << "\"\n";
|
||||
|
||||
m_templater_control->SetFileName(*value.m_string_value);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user