12 includes_.push_back(file_contents);
18 subscriber_types_.push_back(std::move(subscriber_type));
25 "\nDI_CONSTEXPR auto build_di_container()\n"
27 "\tstd::tuple concatenated_configs = std::tuple_cat(\n";
31 "#include \"fast_di/udil/FastDI.hpp\"\n\n";
33 for (
const auto& include_path: includes_)
35 file_content +=
"#include \"" + include_path.string() +
"\"\n";
38 file_content += build_di_container_fn_begin;
40 for (std::size_t i = 0u; i < subscriber_types_.size(); ++i)
42 file_content +=
"\t\t" + namespace_name +
"::DI_SUBSCRIBER("
43 + subscriber_types_[i]
44 + (i != subscriber_types_.size() - 1 ?
"),\n" :
")\n");
47 file_content +=
"\t);\n"
49 "\treturn fast_di::udil::form_di_container(concatenated_configs);\n"
58 std::vector<FileSystem::PathType> includes_;
59 std::vector<FileSystem::FileContentType> subscriber_types_;
Definition HppTarget.hpp:8
FileSystem::FileContentType to_file_content() const
Definition HppTarget.hpp:21
void add_subscriber_type(FileSystem::FileContentType &&subscriber_type)
Definition HppTarget.hpp:15
void include(const FileSystem::PathType &file_contents)
Definition HppTarget.hpp:10
std::filesystem::path PathType
Definition FileSystem.hpp:9
std::string FileContentType
Definition FileSystem.hpp:12