feat: Add 1 and update 3 files
This commit is contained in:
@@ -440,6 +440,21 @@
|
||||
return templates;
|
||||
}
|
||||
|
||||
std::vector<std::pair<std::string, std::string>> template_manager::get_template_list_with_source() const
|
||||
{
|
||||
ASSERT(mLoaded && mSources.size() > 0, "Template manager not loaded, or no template sources found.");
|
||||
std::vector<std::pair<std::string, std::string>> result;
|
||||
std::set<std::string> seen;
|
||||
for (const auto& source : mSources) {
|
||||
auto source_templates = source->get_template_list();
|
||||
for (const auto& t : source_templates) {
|
||||
if (seen.insert(t).second)
|
||||
result.push_back({t, source->get_description()});
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
bool template_manager::has_template(const std::string &template_name) const
|
||||
{
|
||||
ASSERT(mLoaded && mSources.size() > 0, "Template manager not loaded, or no template sources found.");
|
||||
|
||||
Reference in New Issue
Block a user