10 #ifndef INCLUDED_SHAPEGROUPELEMENT_H 11 #define INCLUDED_SHAPEGROUPELEMENT_H 17 #include <boost/optional.hpp> 28 std::vector<std::shared_ptr<ShapeGroupElement>>
m_children;
33 ShapeGroupElement(
const std::shared_ptr<ShapeGroupElement> &parent,
unsigned seqNum);
37 static std::shared_ptr<ShapeGroupElement>
create(
const std::shared_ptr<ShapeGroupElement> &parent,
unsigned seqNum = 0);
41 void visit(std::function<
42 std::function<
void(
void)>
45 void visit(std::function<
46 std::function<
void(
void)>
49 std::shared_ptr<ShapeGroupElement>
getParent()
const;
void setShapeInfo(const ShapeInfo &shapeInfo)
Definition: ShapeGroupElement.cpp:31
static std::shared_ptr< ShapeGroupElement > create(const std::shared_ptr< ShapeGroupElement > &parent, unsigned seqNum=0)
Definition: ShapeGroupElement.cpp:23
ShapeGroupElement(const ShapeGroupElement &)=delete
ShapeGroupElement & operator=(const ShapeGroupElement &)=delete
void visit(std::function< std::function< void(void)>(const ShapeInfo &info, const Coordinate &relativeTo, const VectorTransformation2D &foldedTransform, bool isGroup, const VectorTransformation2D &thisTransform)> visitor, const Coordinate &relativeTo, const VectorTransformation2D &foldedTransform) const
VectorTransformation2D m_transform
Definition: ShapeGroupElement.h:32
void setTransform(const VectorTransformation2D &transform)
Definition: ShapeGroupElement.cpp:36
std::weak_ptr< ShapeGroupElement > m_parent
Definition: ShapeGroupElement.h:27
boost::optional< ShapeInfo > m_shapeInfo
Definition: ShapeGroupElement.h:26
std::vector< std::shared_ptr< ShapeGroupElement > > m_children
Definition: ShapeGroupElement.h:28
Definition: Coordinate.h:17
~ShapeGroupElement()
Definition: ShapeGroupElement.cpp:19
void setup(std::function< void(ShapeGroupElement &self)> visitor)
Definition: ShapeGroupElement.cpp:41
unsigned getSeqNum() const
Definition: ShapeGroupElement.cpp:98
unsigned m_seqNum
Definition: ShapeGroupElement.h:29
std::shared_ptr< ShapeGroupElement > getParent() const
Definition: ShapeGroupElement.cpp:88
Definition: ShapeGroupElement.h:24
Definition: ShapeInfo.h:37
bool isGroup() const
Definition: ShapeGroupElement.cpp:83
void setSeqNum(unsigned seqNum)
Definition: ShapeGroupElement.cpp:93