From 56184710a7c1669b55b145290fa55d912fd222d2 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 4 May 2025 20:38:04 +1200 Subject: [PATCH] Tidying --- src/templates.cpp | 83 +++++++++++++++++++++++++++++------------------ 1 file changed, 51 insertions(+), 32 deletions(-) diff --git a/src/templates.cpp b/src/templates.cpp index 814f991..7cd6c7f 100644 --- a/src/templates.cpp +++ b/src/templates.cpp @@ -16,6 +16,10 @@ namespace dropshell { + // ------------------------------------------------------------------------------------------------ + // template_source_local + // ------------------------------------------------------------------------------------------------ + std::set template_source_local::get_template_list() { std::set templates; @@ -55,6 +59,50 @@ ); } + + + // ------------------------------------------------------------------------------------------------ + // template_source_registry + // ------------------------------------------------------------------------------------------------ + + std::set template_source_registry::get_template_list() + { + #pragma message("TODO: Implement template_source_registry::get_template_list") + return std::set(); + } + + bool template_source_registry::has_template(const std::string& template_name) + { + #pragma message("TODO: Implement template_source_registry::has_template") + return false; + } + + template_info template_source_registry::get_template_info(const std::string& template_name) + { + #pragma message("TODO: Implement template_source_registry::get_template_info") + return template_info(); + } + + bool template_source_registry::template_command_exists(const std::string& template_name, const std::string& command) + { + #pragma message("TODO: Implement template_source_registry::template_command_exists") + return false; + } + + std::filesystem::path template_source_registry::get_cache_dir() + { + #pragma message("TODO: Implement template_source_registry::get_cache_dir") + return std::filesystem::path(); + } + + + + + + // ------------------------------------------------------------------------------------------------ + // template_manager + // ------------------------------------------------------------------------------------------------ + void template_manager::list_templates() const { auto templates = get_template_list(); @@ -214,10 +262,11 @@ mSources.push_back(std::make_unique(url)); } - std::cout << "Loaded " << mSources.size() << " template sources:" << std::endl; + std::cout << "Template sources: "; for (const auto& source : mSources) { - std::cout << source->get_description() << std::endl; + std::cout << "[" << source->get_description() << "] "; } + std::cout << std::endl; mLoaded = true; } @@ -303,34 +352,4 @@ return instance; } - std::set template_source_registry::get_template_list() - { - #pragma message("TODO: Implement template_source_registry::get_template_list") - return std::set(); - } - - bool template_source_registry::has_template(const std::string& template_name) - { - #pragma message("TODO: Implement template_source_registry::has_template") - return false; - } - - template_info template_source_registry::get_template_info(const std::string& template_name) - { - #pragma message("TODO: Implement template_source_registry::get_template_info") - return template_info(); - } - - bool template_source_registry::template_command_exists(const std::string& template_name, const std::string& command) - { - #pragma message("TODO: Implement template_source_registry::template_command_exists") - return false; - } - - std::filesystem::path template_source_registry::get_cache_dir() - { - #pragma message("TODO: Implement template_source_registry::get_cache_dir") - return std::filesystem::path(); - } - } // namespace dropshell