26#ifndef BOARD_SHAPE_VISITOR_H
27#define BOARD_SHAPE_VISITOR_H
85 virtual void visit(
const Dot &)
const;
154 std::size_t
value()
const;
178 const std::set<Color> &
colors()
const;
181 std::set<Color> _colors;
199 const std::set<Color> &
colors()
const;
202 std::set<Color> _colors;
The Color structure. @copyright This source code is part of the Board project, a C++ library whose pu...
@copyright This source code is part of the Board project, a C++ library whose purpose is to allow sim...
@copyright This source code is part of the Board project, a C++ library whose purpose is to allow sim...
Structure representing an RGB triple.
Definition Color.h:43
LineStyle
Definition Style.h:47
ColorSpecification
The ColorSpecification enum.
Definition Globals.h:92
LineCap
Definition Style.h:35
LineJoin
Definition Style.h:41
A line between two points with an arrow at one extremity.
Definition Arrow.h:38
A Bezier curve described by two series of 2D points (curve points and control points).
Definition Bezier.h:42
The BoundingBoxViewer struct may be used to display the bounding boxes of the shapes in a composite t...
Definition ShapeVisitor.h:142
void visit(const Shape &) override
Definition ShapeVisitor.cpp:51
Leaf visitor may be used to apply a function on each leaf, in back-to-front order.
Definition ShapeVisitor.h:208
void visit(const Shape &) override
Definition ShapeVisitor.cpp:428
std::function< void(const Shape &)> Function
Definition ShapeVisitor.h:209
A ConstShapeVisitor may visit const shapes of a composite shape tree in back-to-front order.
Definition ShapeVisitor.h:79
virtual void visit(const Shape &shape)=0
virtual void visit(const Shape &shape) const =0
virtual ~ConstShapeVisitor()
Definition ShapeVisitor.cpp:169
A line between two points.
Definition Dot.h:42
An ellipse.
Definition Ellipse.h:38
Leaf visitor may be used to apply a function on each leaf, in back-to-front order.
Definition ShapeVisitor.h:228
std::function< void(Shape &)> Function
Definition ShapeVisitor.h:229
void visit(Shape &) override
Definition ShapeVisitor.cpp:469
A line between two points.
Definition Line.h:38
A polygonal line described by a series of 2D points.
Definition Polyline.h:38
The ShapeCounter struct may be used to count shapes in the composite shapes tree.
Definition ShapeVisitor.h:151
std::size_t value() const
Definition ShapeVisitor.cpp:70
ShapeCounter()
Definition ShapeVisitor.cpp:63
void clear()
Definition ShapeVisitor.cpp:65
void visit(const Shape &) override
Definition ShapeVisitor.cpp:75
A group of shapes.
Definition ShapeList.h:47
A ShapeVisitor visits all shapes in a composite shape tree in back-to-front order.
Definition ShapeVisitor.h:54
virtual void visit(Shape &shape)=0
virtual ~ShapeVisitor()
Definition ShapeVisitor.cpp:167
virtual void visit(Shape &shape) const =0
Leaf visitor may be used to apply a function on each Shape with style, in back-to-front order.
Definition ShapeVisitor.h:248
ShapeWithStyleVisitor(Function f)
void visit(Shape &) override
Definition ShapeVisitor.cpp:550
std::function< void(ShapeWithStyle &)> Function
Definition ShapeVisitor.h:249
Abstract structure for a 2D shape.
Definition ShapeWithStyle.h:38
Abstract structure for a 2D shape.
Definition Shape.h:64
A piece of text.
Definition Text.h:40