27 return classStyle(NodeName<NodeT>());
36template <
typename... Args>
39 static_assert(
sizeof...(args) > 0,
"Missing arguments");
40 using namespace type_traits;
41#if __cplusplus >= 201703L
43 (is_ptr_to_base_v<
decltype(args),
Node> && ...),
44 "Argument is not a Node pointer");
45 (
rankMin_.insert(args->uuid()), ...);
46#elif __cplusplus > 201103L
48 all_true_v<(is_ptr_to_base_v<
decltype(args),
Node>)...>,
49 "Argument is not a Node pointer");
54template <
typename... Args>
57 static_assert(
sizeof...(args) > 0,
"Missing arguments");
58 using namespace type_traits;
59#if __cplusplus >= 201703L
61 (is_ptr_to_base_v<
decltype(args),
Node> && ...),
62 "Argument is not a Node pointer");
63 (
rankSrc_.insert(args->uuid()), ...);
64#elif __cplusplus > 201103L
66 all_true_v<(is_ptr_to_base_v<
decltype(args),
Node>)...>,
67 "Argument is not a Node pointer");
72template <
typename... Args>
75 static_assert(
sizeof...(args) > 0,
"Missing arguments");
76 using namespace type_traits;
77#if __cplusplus >= 201703L
79 (is_ptr_to_base_v<
decltype(args),
Node> && ...),
80 "Argument is not a Node pointer");
81 (
rankMax_.insert(args->uuid()), ...);
82#elif __cplusplus > 201103L
84 all_true_v<(is_ptr_to_base_v<
decltype(args),
Node>)...>,
85 "Argument is not a Node pointer");
90template <
typename... Args>
93 static_assert(
sizeof...(args) > 0,
"Missing arguments");
94 using namespace type_traits;
95#if __cplusplus >= 201703L
97 (is_ptr_to_base_v<
decltype(args),
Node> && ...),
98 "Argument is not a Node pointer");
100#elif __cplusplus > 201103L
102 all_true_v<(is_ptr_to_base_v<
decltype(args),
Node>)...>,
103 "Argument is not a Node pointer");
108template <
typename... Args>
111 static_assert(
sizeof...(args) > 0,
"Missing arguments");
112 using namespace type_traits;
113 auto idx = rankSame_.size();
115#if __cplusplus >= 201703L
117 (is_ptr_to_base_v<
decltype(args),
Node> && ...),
118 "Argument is not a Node pointer");
120#elif __cplusplus > 201103L
122 all_true_v<(is_ptr_to_base_v<
decltype(args),
Node>)...>,
123 "Argument is not a Node pointer");
126 rankSame_.push_back(same);
130template <
typename T,
typename... Args>
133 static_assert(
sizeof...(args) > 0,
"Missing arguments");
134 using namespace type_traits;
135#if __cplusplus >= 201703L
137 (is_ptr_to_base_v<
decltype(args),
Node> && ...),
138 "Argument is not a Node pointer");
139 (
rankSame_.at(idx).push_back(args->uuid()), ...);
140#elif __cplusplus > 201103L
142 all_true_v<(is_ptr_to_base_v<
decltype(args),
Node>)...>,
143 "Argument is not a Node pointer");
void setRankMin(const Args &... args)
Assign node(s) to the minimum rank.
auto hasClassStyle(const std::string &name) const -> bool
Check if a class of nodes has an associated style.
void appendRankSame(T idx, const Args &... args)
Assign node(s) to an existing group ranking.
void setRankMax(const Args &... args)
Assigns node(s) to the maximum rank.
void setRankSource(const Args &... args)
Assign node(s) to the minimum rank and limits the minimum rank to nodes with rank=min or rank=source.
auto setRankSame(const Args &... args) -> std::size_t
Assign node(s) to a new group ranking.
std::unordered_set< Uuid > rankMax_
void setRankSink(const Args &... args)
Assign node(s) to the maximum rank and limits the maximum rank to nodes with rank=max or rank=sink.
std::unordered_set< Uuid > rankMin_
std::unordered_set< Uuid > rankSink_
std::unordered_set< Uuid > rankSrc_
void eraseClassStyle(const std::string &name)
Erase the style associated with a class of nodes.
void eraseClassStyle() const
Erase the style associated with a class of nodes.
std::vector< std::vector< Uuid > > rankSame_
auto classStyle() -> NodeStyle &
Access the style for a class of nodes.
auto hasClassStyle() const -> bool
Check if a class of nodes has an associated style.
void setClassStyle(const std::string &name, const NodeStyle &style)
Set a class-specific node style.
Project top-level namespace.
Style struct containing all sub-styles for a node.
Helper class for calling function iteratively on parameter pack.