ShapeGroupElement.h
Go to the documentation of this file.
1 #ifndef __SHAPEGROUPELEMENT_H__
2 #define __SHAPEGROUPELEMENT_H__
3 #include <boost/optional.hpp>
4 #include <boost/function.hpp>
5 #include <vector>
6 
7 #include "ShapeInfo.h"
9 
10 namespace libmspub
11 {
13 {
14  boost::optional<ShapeInfo> m_shapeInfo;
16  std::vector<ShapeGroupElement *> m_children;
17  unsigned m_seqNum;
18  ShapeGroupElement &operator=(const ShapeGroupElement &); //not implemented
19  ShapeGroupElement(const ShapeGroupElement &); //not implemented
21 public:
23  ShapeGroupElement(ShapeGroupElement *parent, unsigned seqNum);
25  void setShapeInfo(const ShapeInfo &shapeInfo);
26  void setup(boost::function<void(ShapeGroupElement &self)> visitor);
27  void visit(boost::function<
28  boost::function<void(void)>
29  (const ShapeInfo &info, const Coordinate &relativeTo, const VectorTransformation2D &foldedTransform, bool isGroup, const VectorTransformation2D &thisTransform)> visitor,
30  const Coordinate &relativeTo, const VectorTransformation2D &foldedTransform) const;
31  void visit(boost::function<
32  boost::function<void(void)>
33  (const ShapeInfo &info, const Coordinate &relativeTo, const VectorTransformation2D &foldedTransform, bool isGroup, const VectorTransformation2D &thisTransform)> visitor) const;
34  bool isGroup() const;
36  const ShapeGroupElement *getParent() const;
37  void setSeqNum(unsigned seqNum);
38  void setTransform(const VectorTransformation2D &transform);
39  unsigned getSeqNum() const;
40 };
41 }
42 
43 #endif
44 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
void setShapeInfo(const ShapeInfo &shapeInfo)
Definition: ShapeGroupElement.cpp:55
VectorTransformation2D m_transform
Definition: ShapeGroupElement.h:20
void setTransform(const VectorTransformation2D &transform)
Definition: ShapeGroupElement.cpp:60
boost::optional< ShapeInfo > m_shapeInfo
Definition: ShapeGroupElement.h:14
ShapeGroupElement & operator=(const ShapeGroupElement &)
Definition: Coordinate.h:34
~ShapeGroupElement()
Definition: ShapeGroupElement.cpp:39
std::vector< ShapeGroupElement * > m_children
Definition: ShapeGroupElement.h:16
bool isGroup() const
Definition: ShapeGroupElement.cpp:107
void setup(boost::function< void(ShapeGroupElement &self)> visitor)
Definition: ShapeGroupElement.cpp:65
ShapeGroupElement(const ShapeGroupElement &)
unsigned getSeqNum() const
Definition: ShapeGroupElement.cpp:127
Definition: VectorTransformation2D.h:44
unsigned m_seqNum
Definition: ShapeGroupElement.h:17
ShapeGroupElement * m_parent
Definition: ShapeGroupElement.h:15
ShapeGroupElement * getParent()
Definition: ShapeGroupElement.cpp:112
Definition: ShapeGroupElement.h:12
Definition: ShapeInfo.h:52
void setSeqNum(unsigned seqNum)
Definition: ShapeGroupElement.cpp:122
void visit(boost::function< boost::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

Generated for libmspub by doxygen 1.8.6