Added package diagram layout hints generation
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ struct filter {
|
||||
std::vector<common::model::scope_t> scopes;
|
||||
};
|
||||
|
||||
enum class hint_t { up, down, left, right, hidden };
|
||||
enum class hint_t { up, down, left, right };
|
||||
|
||||
struct layout_hint {
|
||||
hint_t hint;
|
||||
@@ -75,6 +75,7 @@ struct layout_hint {
|
||||
using layout_hints = std::map<std::string, std::vector<layout_hint>>;
|
||||
|
||||
std::string to_string(const diagram_type t);
|
||||
std::string to_string(const hint_t t);
|
||||
|
||||
struct inheritable_diagram_options {
|
||||
option<std::vector<std::string>> glob{"glob"};
|
||||
|
||||
Reference in New Issue
Block a user