Added namespace to common model instead of vector<string>

This commit is contained in:
Bartek Kryza
2022-02-27 14:20:35 +01:00
parent 57456705bd
commit bee20e7f26
6 changed files with 32 additions and 14 deletions

View File

@@ -114,8 +114,8 @@ std::string class_::full_name(bool relative) const
using namespace clanguml::util;
std::ostringstream ostr;
if (relative && starts_with(get_namespace(), using_namespaces()))
ostr << ns_relative(using_namespaces(), name_and_ns());
if (relative && starts_with(get_namespace(), using_namespace()))
ostr << ns_relative(using_namespace(), name_and_ns());
else
ostr << name_and_ns();
@@ -134,11 +134,11 @@ std::ostringstream &class_::render_template_params(
if (!tmplt.type().empty())
res.push_back(
util::ns_relative(using_namespaces(), tmplt.type()));
util::ns_relative(using_namespace(), tmplt.type()));
if (!tmplt.name().empty())
res.push_back(
util::ns_relative(using_namespaces(), tmplt.name()));
util::ns_relative(using_namespace(), tmplt.name()));
if (!tmplt.default_value().empty()) {
res.push_back("=");

View File

@@ -40,7 +40,7 @@ std::string enum_::full_name(bool relative) const
std::ostringstream ostr;
if (relative)
ostr << ns_relative(using_namespaces(), name());
ostr << ns_relative(using_namespace(), name());
else
ostr << name();