22 return [a = std::move(a), b = std::move(b)](
Element element) {
23 return b(a(std::move(element)));
43 return compose(std::move(a),
52 output.reserve(elements.size());
53 for (
auto& it : elements) {
54 output.push_back(std::move(it) | decorator);
73 return decorator(std::move(element));
105 const int max_iteration = 20;
107 e->ComputeRequirement();
110 box.
x_max = std::min(box.
x_max, e->requirement().min_x);
111 box.
y_max = std::min(box.
y_max, e->requirement().min_y);
123 box.
x_max = std::min(e->requirement().min_x, fullsize.
dimx);
124 box.
y_max = std::min(e->requirement().min_y, fullsize.
dimy);
136 class Impl :
public Node {
137 void ComputeRequirement()
override {
138 requirement_.min_x = 0;
139 requirement_.min_y = 0;
142 return std::make_unique<Impl>();
Dimensions Fit(Element &)
std::function< Element(Element)> Decorator
Element nothing(Element element)
A decoration doing absolutely nothing.
std::shared_ptr< Node > Element
Component operator|(Component component, ComponentDecorator decorator)
std::vector< Element > Elements
Component & operator|=(Component &component, ComponentDecorator decorator)