Added test case for configurable type aliases
This commit is contained in:
@@ -102,6 +102,18 @@ void inheritable_diagram_options::inherit(
|
||||
relative_to.override(parent.relative_to);
|
||||
}
|
||||
|
||||
std::string inheritable_diagram_options::simplify_template_type(
|
||||
std::string full_name) const
|
||||
{
|
||||
const auto &aliases = template_aliases();
|
||||
|
||||
for (const auto &[pattern, replacement] : aliases) {
|
||||
util::replace_all(full_name, pattern, replacement);
|
||||
}
|
||||
|
||||
return full_name;
|
||||
}
|
||||
|
||||
std::vector<std::string> diagram::get_translation_units(
|
||||
const std::filesystem::path &root_directory) const
|
||||
{
|
||||
|
||||
@@ -140,6 +140,8 @@ struct inheritable_diagram_options {
|
||||
option<template_aliases_t> template_aliases{"template_aliases"};
|
||||
|
||||
void inherit(const inheritable_diagram_options &parent);
|
||||
|
||||
std::string simplify_template_type(std::string full_name) const;
|
||||
};
|
||||
|
||||
struct diagram : public inheritable_diagram_options {
|
||||
|
||||
Reference in New Issue
Block a user