Added package diagram layout hints generation

This commit is contained in:
Bartek Kryza
2022-02-14 23:49:53 +01:00
parent 5835f230e4
commit db56949da3
4 changed files with 47 additions and 5 deletions

View File

@@ -58,6 +58,22 @@ std::string to_string(const diagram_type t)
}
}
std::string to_string(const hint_t t)
{
switch (t) {
case hint_t::up:
return "up";
case hint_t::down:
return "down";
case hint_t::left:
return "left";
case hint_t::right:
return "right";
default:
assert(false);
}
}
void plantuml::append(const plantuml &r)
{
before.insert(before.end(), r.before.begin(), r.before.end());
@@ -439,10 +455,6 @@ template <> struct convert<layout_hint> {
rhs.hint = hint_t::right;
rhs.entity = node["right"].as<std::string>();
}
else if (node["hidden"]) {
rhs.hint = hint_t::hidden;
rhs.entity = node["hidden"].as<std::string>();
}
else
return false;