mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 08:05:45 +00:00
Update ZCG new console output
This commit is contained in:
parent
e33250a2de
commit
5290d3a768
@ -88,6 +88,7 @@ bool CodeGenerator::GenerateCode(IDataRepository* repository)
|
|||||||
assets.push_back(info);
|
assets.push_back(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const auto start = std::chrono::steady_clock::now();
|
||||||
for (const auto& generationTask : m_args->m_generation_tasks)
|
for (const auto& generationTask : m_args->m_generation_tasks)
|
||||||
{
|
{
|
||||||
auto templateName = generationTask.m_template_name;
|
auto templateName = generationTask.m_template_name;
|
||||||
@ -107,7 +108,12 @@ bool CodeGenerator::GenerateCode(IDataRepository* repository)
|
|||||||
{
|
{
|
||||||
auto context = RenderingContext::BuildContext(repository, asset);
|
auto context = RenderingContext::BuildContext(repository, asset);
|
||||||
if (!GenerateCodeForTemplate(context.get(), foundTemplate->second.get()))
|
if (!GenerateCodeForTemplate(context.get(), foundTemplate->second.get()))
|
||||||
|
{
|
||||||
|
std::cout << "Failed to generate code for asset '" << asset->m_definition->GetFullName() << "' with preset '" << foundTemplate->first << "'\n";
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cout << "Successfully generated code for asset '" << asset->m_definition->GetFullName() << "' with preset '" << foundTemplate->first << "'\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -121,6 +127,11 @@ bool CodeGenerator::GenerateCode(IDataRepository* repository)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const auto end = std::chrono::steady_clock::now();
|
||||||
|
if (m_args->m_verbose)
|
||||||
|
{
|
||||||
|
std::cout << "Generating code took " << std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count() << "ms" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,10 @@ void CommandsFileReader::SetupPostProcessors()
|
|||||||
|
|
||||||
bool CommandsFileReader::ReadCommandsFile(IDataRepository* repository)
|
bool CommandsFileReader::ReadCommandsFile(IDataRepository* repository)
|
||||||
{
|
{
|
||||||
std::cout << "Reading commands file: " << m_filename << std::endl;
|
if(m_args->m_verbose)
|
||||||
|
{
|
||||||
|
std::cout << "Reading commands file: " << m_filename << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
if (!OpenBaseStream())
|
if (!OpenBaseStream())
|
||||||
return false;
|
return false;
|
||||||
@ -77,7 +80,11 @@ bool CommandsFileReader::ReadCommandsFile(IDataRepository* repository)
|
|||||||
const auto start = std::chrono::steady_clock::now();
|
const auto start = std::chrono::steady_clock::now();
|
||||||
const auto result = parser->Parse();
|
const auto result = parser->Parse();
|
||||||
const auto end = std::chrono::steady_clock::now();
|
const auto end = std::chrono::steady_clock::now();
|
||||||
std::cout << "Processing commands took " << std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count() << "ms" << std::endl;
|
|
||||||
|
if(m_args->m_verbose)
|
||||||
|
{
|
||||||
|
std::cout << "Processing commands took " << std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count() << "ms" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
if (!result)
|
if (!result)
|
||||||
return false;
|
return false;
|
||||||
|
@ -64,7 +64,10 @@ void HeaderFileReader::SetupPostProcessors()
|
|||||||
|
|
||||||
bool HeaderFileReader::ReadHeaderFile(IDataRepository* repository)
|
bool HeaderFileReader::ReadHeaderFile(IDataRepository* repository)
|
||||||
{
|
{
|
||||||
std::cout << "Reading header file: " << m_filename << std::endl;
|
if (m_args->m_verbose)
|
||||||
|
{
|
||||||
|
std::cout << "Reading header file: " << m_filename << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
if (!OpenBaseStream())
|
if (!OpenBaseStream())
|
||||||
return false;
|
return false;
|
||||||
@ -79,7 +82,11 @@ bool HeaderFileReader::ReadHeaderFile(IDataRepository* repository)
|
|||||||
if (result)
|
if (result)
|
||||||
result = parser->SaveToRepository(repository);
|
result = parser->SaveToRepository(repository);
|
||||||
const auto end = std::chrono::steady_clock::now();
|
const auto end = std::chrono::steady_clock::now();
|
||||||
std::cout << "Processing header took " << std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count() << "ms" << std::endl;
|
|
||||||
|
if(m_args->m_verbose)
|
||||||
|
{
|
||||||
|
std::cout << "Processing header took " << std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count() << "ms" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
if (!result)
|
if (!result)
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user