10#ifndef INCLUDED_SHAPEGROUPELEMENT_H
11#define INCLUDED_SHAPEGROUPELEMENT_H
17#include <boost/optional.hpp>
31 std::vector<std::shared_ptr<ShapeGroupElement>>
m_children;
36 ShapeGroupElement(
const std::shared_ptr<ShapeGroupElement> &parent,
unsigned seqNum);
40 static std::shared_ptr<ShapeGroupElement>
create(
const std::shared_ptr<ShapeGroupElement> &parent,
unsigned seqNum = 0);
45 std::function<
void(
void)>
49 std::function<
void(
void)>
52 std::shared_ptr<ShapeGroupElement>
getParent()
const;
~ShapeGroupElement()
Definition ShapeGroupElement.cpp:24
bool isGroup() const
Definition ShapeGroupElement.cpp:88
std::vector< std::shared_ptr< ShapeGroupElement > > m_children
Definition ShapeGroupElement.h:31
unsigned m_seqNum
Definition ShapeGroupElement.h:32
void setTransform(const VectorTransformation2D &transform)
Definition ShapeGroupElement.cpp:41
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
void setSeqNum(unsigned seqNum)
Definition ShapeGroupElement.cpp:98
ShapeGroupElement & operator=(const ShapeGroupElement &)=delete
std::shared_ptr< ShapeGroupElement > getParent() const
Definition ShapeGroupElement.cpp:93
VectorTransformation2D m_transform
Definition ShapeGroupElement.h:35
static std::shared_ptr< ShapeGroupElement > create(const std::shared_ptr< ShapeGroupElement > &parent, unsigned seqNum=0)
Definition ShapeGroupElement.cpp:28
ShapeGroupElement(const ShapeGroupElement &)=delete
boost::optional< ShapeInfo > m_shapeInfo
Definition ShapeGroupElement.h:29
void visit(std::function< std::function< void(void)>(const ShapeInfo &info, const Coordinate &relativeTo, const VectorTransformation2D &foldedTransform, bool isGroup, const VectorTransformation2D &thisTransform)> visitor) const
unsigned getSeqNum() const
Definition ShapeGroupElement.cpp:103
void setup(std::function< void(ShapeGroupElement &self)> visitor)
Definition ShapeGroupElement.cpp:46
std::weak_ptr< ShapeGroupElement > m_parent
Definition ShapeGroupElement.h:30
void setShapeInfo(const ShapeInfo &shapeInfo)
Definition ShapeGroupElement.cpp:36
Definition Coordinate.h:18
Definition ShapeInfo.h:38