VSDGeometryList.h Source File documentation

VSDGeometryList.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3 * This file is part of the libvisio project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
10 #ifndef __VSDGEOMETRYLIST_H__
11 #define __VSDGEOMETRYLIST_H__
12
13 #include <map>
14 #include <memory>
15 #include <vector>
16 #include <functional>
17 #include <algorithm>
18 #include <boost/optional.hpp>
19 #include "VSDTypes.h"
20
21 namespace libvisio
22 {
23
24 class VSDCollector;
25
26 class VSDGeometryListElement
27 {
28 public:
29 VSDGeometryListElement(unsigned id, unsigned level)
30 : m_id(id), m_level(level) {}
31 virtual ~VSDGeometryListElement() {}
32 virtual void handle(VSDCollector *collector) const = 0;
33 virtual VSDGeometryListElement *clone() = 0;
34 virtual unsigned getDataID() const
35 {
36 return MINUS_ONE;
37 }
38 void setLevel(unsigned level)
39 {
40 m_level = level;
41 }
42 protected:
43 unsigned m_id;
44 unsigned m_level;
45 };
46
47 class VSDGeometryList
48 {
49 public:
50 VSDGeometryList();
51 VSDGeometryList(const VSDGeometryList &geomList);
52 ~VSDGeometryList();
53 VSDGeometryList &operator=(const VSDGeometryList &geomList);
54
55 void addGeometry(unsigned id, unsigned level, const boost::optional<bool> &noFill,
56 const boost::optional<bool> &noLine, const boost::optional<bool> &noShow);
57 void addEmpty(unsigned id, unsigned level);
58 void addMoveTo(unsigned id, unsigned level, const boost::optional<double> &x, const boost::optional<double> &y);
59 void addLineTo(unsigned id, unsigned level, const boost::optional<double> &x, const boost::optional<double> &y);
60 void addArcTo(unsigned id, unsigned level, const boost::optional<double> &x2, const boost::optional<double> &y2,
61 const boost::optional<double> &bow);
62 void addNURBSTo(unsigned id, unsigned level, double x2, double y2, unsigned char xType, unsigned char yType, unsigned degree,
63 const std::vector<std::pair<double, double> > &controlPoints, const std::vector<double> &knotVector,
64 const std::vector<double> &weights);
65 void addNURBSTo(unsigned id, unsigned level, double x2, double y2, double knot, double knotPrev, double weight, double weightPrev, unsigned dataID);
66 void addNURBSTo(unsigned id, unsigned level, const boost::optional<double> &x2, const boost::optional<double> &y2,
67 const boost::optional<double> &knot, const boost::optional<double> &knotPrev, const boost::optional<double> &weight,
68 const boost::optional<double> &weightPrev, const boost::optional<NURBSData> &data);
69 void addPolylineTo(unsigned id, unsigned level, double x, double y, unsigned char xType, unsigned char yType,
70 const std::vector<std::pair<double, double> > &points);
71 void addPolylineTo(unsigned id, unsigned level, double x, double y, unsigned dataID);
72 void addPolylineTo(unsigned id, unsigned level, boost::optional<double> &x, boost::optional<double> &y, boost::optional<PolylineData> &data);
73 void addEllipse(unsigned id, unsigned level, const boost::optional<double> &cx, const boost::optional<double> &cy,
74 const boost::optional<double> &xleft, const boost::optional<double> &yleft,
75 const boost::optional<double> &xtop, const boost::optional<double> &ytop);
76 void addEllipticalArcTo(unsigned id, unsigned level, const boost::optional<double> &x3, const boost::optional<double> &y3,
77 const boost::optional<double> &x2, const boost::optional<double> &y2,
78 const boost::optional<double> &angle, const boost::optional<double> &ecc);
79 void addSplineStart(unsigned id, unsigned level, const boost::optional<double> &x, const boost::optional<double> &y,
80 const boost::optional<double> &secondKnot, const boost::optional<double> &firstKnot,
81 const boost::optional<double> &lastKnot, const boost::optional<unsigned> &degree);
82 void addSplineKnot(unsigned id, unsigned level, const boost::optional<double> &x, const boost::optional<double> &y,
83 const boost::optional<double> &knot);
84 void addInfiniteLine(unsigned id, unsigned level, const boost::optional<double> &x1, const boost::optional<double> &y1,
85 const boost::optional<double> &x2, const boost::optional<double> &y2);
86 void addRelCubBezTo(unsigned id, unsigned level, const boost::optional<double> &x, const boost::optional<double> &y,
87 const boost::optional<double> &a, const boost::optional<double> &b,
88 const boost::optional<double> &c, const boost::optional<double> &d);
89 void addRelEllipticalArcTo(unsigned id, unsigned level, const boost::optional<double> &x3, const boost::optional<double> &y3,
90 const boost::optional<double> &x2, const boost::optional<double> &y2,
91 const boost::optional<double> &angle, const boost::optional<double> &ecc);
92 void addRelMoveTo(unsigned id, unsigned level, const boost::optional<double> &x, const boost::optional<double> &y);
93 void addRelLineTo(unsigned id, unsigned level, const boost::optional<double> &x, const boost::optional<double> &y);
94 void addRelQuadBezTo(unsigned id, unsigned level, const boost::optional<double> &x, const boost::optional<double> &y,
95 const boost::optional<double> &a, const boost::optional<double> &b);
96 void setElementsOrder(const std::vector<unsigned> &m_elementsOrder);
97 void handle(VSDCollector *collector) const;
98 void clear();
99 bool empty() const
100 {
101 return (m_elements.empty());
102 }
103 VSDGeometryListElement *getElement(unsigned index) const;
104 std::vector<unsigned> getElementsOrder() const
105 {
106 return m_elementsOrder;
107 }
108 unsigned count() const
109 {
110 return (unsigned)m_elements.size();
111 }
112 void resetLevel(unsigned level);
113 private:
114 std::map<unsigned, std::unique_ptr<VSDGeometryListElement>> m_elements;
115 std::vector<unsigned> m_elementsOrder;
116 };
117
118 } // namespace libvisio
119
120 #endif // __VSDGEOMETRYLIST_H__
121 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libvisio::VSDCollector::collectNURBSTo
virtual void collectNURBSTo(unsigned id, unsigned level, double x2, double y2, unsigned char xType, unsigned char yType, unsigned degree, const std::vector< std::pair< double, double > > &ctrlPnts, const std::vector< double > &kntVec, const std::vector< double > &weights)=0
libvisio::VSDSplineStart::m_y
double m_y
Definition: VSDGeometryList.cpp:211
libvisio::VSDGeometry::VSDGeometry
VSDGeometry(unsigned id, unsigned level, const boost::optional< bool > &noFill, const boost::optional< bool > &noLine, const boost::optional< bool > &noShow)
Definition: VSDGeometryList.cpp:22
libvisio::VSDRelLineTo
Definition: VSDGeometryList.cpp:282
libvisio::VSDCollector::collectArcTo
virtual void collectArcTo(unsigned id, unsigned level, double x2, double y2, double bow)=0
libvisio::VSDNURBSTo1::m_yType
unsigned m_yType
Definition: VSDGeometryList.cpp:117
libvisio::VSDMoveTo::handle
void handle(VSDCollector *collector) const override
Definition: VSDGeometryList.cpp:330
libvisio::VSDInfiniteLine::~VSDInfiniteLine
~VSDInfiniteLine() override
Definition: VSDGeometryList.cpp:236
libvisio::VSDInfiniteLine::VSDInfiniteLine
VSDInfiniteLine(unsigned id, unsigned level, const boost::optional< double > &x1, const boost::optional< double > &y1, const boost::optional< double > &x2, const boost::optional< double > &y2)
Definition: VSDGeometryList.cpp:232
libvisio::VSDRelEllipticalArcTo::m_x2
double m_x2
Definition: VSDGeometryList.cpp:267
VSDGeometryList.h
libvisio::VSDSplineStart::m_lastKnot
double m_lastKnot
Definition: VSDGeometryList.cpp:212
libvisio::VSDCollector::collectLineTo
virtual void collectLineTo(unsigned id, unsigned level, double x, double y)=0
libvisio::VSDPolylineTo2
Definition: VSDGeometryList.cpp:172
libvisio::VSDPolylineTo2::VSDPolylineTo2
VSDPolylineTo2(unsigned id, unsigned level, double x, double y, unsigned dataID)
Definition: VSDGeometryList.cpp:174
libvisio::VSDSplineStart::m_secondKnot
double m_secondKnot
Definition: VSDGeometryList.cpp:212
libvisio::VSDGeometryListElement::setLevel
void setLevel(unsigned level)
Definition: VSDGeometryList.h:38
libvisio::VSDPolylineTo3::VSDPolylineTo3
VSDPolylineTo3(unsigned id, unsigned level, const boost::optional< double > &x, const boost::optional< double > &y, const boost::optional< PolylineData > &data)
Definition: VSDGeometryList.cpp:188
libvisio::VSDRelCubBezTo::clone
VSDGeometryListElement * clone() override
Definition: VSDGeometryList.cpp:513
libvisio::VSDGeometryList::clear
void clear()
Definition: VSDGeometryList.cpp:936
libvisio::VSDPolylineTo1::VSDPolylineTo1
VSDPolylineTo1(unsigned id, unsigned level, double x, double y, unsigned char xType, unsigned char yType, std::vector< std::pair< double, double > > points)
Definition: VSDGeometryList.cpp:160
libvisio::VSDNURBSTo3::m_knot
double m_knot
Definition: VSDGeometryList.cpp:153
libvisio::VSDGeometryList::addMoveTo
void addMoveTo(unsigned id, unsigned level, const boost::optional< double > &x, const boost::optional< double > &y)
Definition: VSDGeometryList.cpp:618
libvisio::VSDCollector::collectRelCubBezTo
virtual void collectRelCubBezTo(unsigned id, unsigned level, double x, double y, double a, double b, double c, double d)=0
libvisio::VSDCollector::collectRelQuadBezTo
virtual void collectRelQuadBezTo(unsigned id, unsigned level, double x, double y, double a, double b)=0
libvisio::VSDPolylineTo1::handle
void handle(VSDCollector *collector) const override
Definition: VSDGeometryList.cpp:431
libvisio::VSDGeometryList::empty
bool empty() const
Definition: VSDGeometryList.h:99
libvisio::VSDPolylineTo3::m_x
double m_x
Definition: VSDGeometryList.cpp:196
libvisio::VSDGeometryList::addEllipse
void addEllipse(unsigned id, unsigned level, const boost::optional< double > &cx, const boost::optional< double > &cy, const boost::optional< double > &xleft, const boost::optional< double > &yleft, const boost::optional< double > &xtop, const boost::optional< double > &ytop)
Definition: VSDGeometryList.cpp:721
libvisio::VSDNURBSTo2::getDataID
unsigned getDataID() const override
Definition: VSDGeometryList.cpp:414
libvisio::VSDArcTo::m_y2
double m_y2
Definition: VSDGeometryList.cpp:74
libvisio::VSDCollector::collectSplineEnd
virtual void collectSplineEnd()=0
libvisio::VSDGeometryListElement::m_level
unsigned m_level
Definition: VSDGeometryList.h:44
libvisio::VSDGeometryList::addNURBSTo
void addNURBSTo(unsigned id, unsigned level, double x2, double y2, unsigned char xType, unsigned char yType, unsigned degree, const std::vector< std::pair< double, double > > &controlPoints, const std::vector< double > &knotVector, const std::vector< double > &weights)
Definition: VSDGeometryList.cpp:663
libvisio::VSDPolylineTo2::m_x
double m_x
Definition: VSDGeometryList.cpp:182
libvisio::VSDGeometryList::addLineTo
void addLineTo(unsigned id, unsigned level, const boost::optional< double > &x, const boost::optional< double > &y)
Definition: VSDGeometryList.cpp:633
libvisio::VSDNURBSTo2::m_y2
double m_y2
Definition: VSDGeometryList.cpp:134
libvisio::VSDGeometryList::getElement
VSDGeometryListElement * getElement(unsigned index) const
Definition: VSDGeometryList.cpp:942
libvisio::VSDEllipse::m_cx
double m_cx
Definition: VSDGeometryList.cpp:89
libvisio::VSDRelEllipticalArcTo::m_angle
double m_angle
Definition: VSDGeometryList.cpp:267
libvisio::VSDNURBSTo2::m_dataID
unsigned m_dataID
Definition: VSDGeometryList.cpp:133
libvisio::VSDCollector
Definition: VSDCollector.h:21
libvisio::VSDRelQuadBezTo::m_x
double m_x
Definition: VSDGeometryList.cpp:302
libvisio::VSDGeometryList::addRelQuadBezTo
void addRelQuadBezTo(unsigned id, unsigned level, const boost::optional< double > &x, const boost::optional< double > &y, const boost::optional< double > &a, const boost::optional< double > &b)
Definition: VSDGeometryList.cpp:882
libvisio::VSDRelEllipticalArcTo::clone
VSDGeometryListElement * clone() override
Definition: VSDGeometryList.cpp:525
libvisio::VSDRelLineTo::m_y
double m_y
Definition: VSDGeometryList.cpp:289
libvisio::VSDPolylineTo2::handle
void handle(VSDCollector *collector) const override
Definition: VSDGeometryList.cpp:443
libvisio::VSDCollector::collectGeometry
virtual void collectGeometry(unsigned id, unsigned level, bool noFill, bool noLine, bool noShow)=0
libvisio::VSDSplineKnot::handle
void handle(VSDCollector *collector) const override
Definition: VSDGeometryList.cpp:484
libvisio::VSDCollector::collectSplineKnot
virtual void collectSplineKnot(unsigned id, unsigned level, double x, double y, double knot)=0
libvisio::VSDGeometry::m_noShow
bool m_noShow
Definition: VSDGeometryList.cpp:31
libvisio::VSDNURBSTo3::VSDNURBSTo3
VSDNURBSTo3(unsigned id, unsigned level, const boost::optional< double > &x2, const boost::optional< double > &y2, const boost::optional< double > &knot, const boost::optional< double > &knotPrev, const boost::optional< double > &weight, const boost::optional< double > &weightPrev, const boost::optional< NURBSData > &data)
Definition: VSDGeometryList.cpp:142
libvisio::VSDNURBSTo3
Definition: VSDGeometryList.cpp:140
libvisio::VSDEllipticalArcTo::m_x2
double m_x2
Definition: VSDGeometryList.cpp:103
libvisio::VSDEllipticalArcTo::m_ecc
double m_ecc
Definition: VSDGeometryList.cpp:103
libvisio::VSDEllipse::m_cy
double m_cy
Definition: VSDGeometryList.cpp:89
libvisio::VSDRelCubBezTo::m_y
double m_y
Definition: VSDGeometryList.cpp:252
libvisio::VSDRelEllipticalArcTo::VSDRelEllipticalArcTo
VSDRelEllipticalArcTo(unsigned id, unsigned level, const boost::optional< double > &x3, const boost::optional< double > &y3, const boost::optional< double > &x2, const boost::optional< double > &y2, const boost::optional< double > &angle, const boost::optional< double > &ecc)
Definition: VSDGeometryList.cpp:258
libvisio::VSDPolylineTo1
Definition: VSDGeometryList.cpp:158
libvisio::VSDEllipticalArcTo::m_y2
double m_y2
Definition: VSDGeometryList.cpp:103
libvisio::VSDGeometry::m_noFill
bool m_noFill
Definition: VSDGeometryList.cpp:29
libvisio::VSDEllipticalArcTo::handle
void handle(VSDCollector *collector) const override
Definition: VSDGeometryList.cpp:379
libvisio::VSDInfiniteLine::m_y1
double m_y1
Definition: VSDGeometryList.cpp:239
libvisio::VSDEmpty::handle
void handle(VSDCollector *collector) const override
Definition: VSDGeometryList.cpp:320
libvisio::VSDRelEllipticalArcTo::m_ecc
double m_ecc
Definition: VSDGeometryList.cpp:267
libvisio::VSDEllipticalArcTo::m_angle
double m_angle
Definition: VSDGeometryList.cpp:103
libvisio::VSDPolylineTo3
Definition: VSDGeometryList.cpp:186
libvisio::VSDRelLineTo::handle
void handle(VSDCollector *collector) const override
Definition: VSDGeometryList.cpp:543
libvisio::VSDSplineStart::handle
void handle(VSDCollector *collector) const override
Definition: VSDGeometryList.cpp:472
libvisio::VSDPolylineTo1::~VSDPolylineTo1
~VSDPolylineTo1() override
Definition: VSDGeometryList.cpp:162
libvisio::VSDPolylineTo2::m_y
double m_y
Definition: VSDGeometryList.cpp:182
libvisio::VSDEllipse
Definition: VSDGeometryList.cpp:78
libvisio::VSDRelQuadBezTo
Definition: VSDGeometryList.cpp:293
libvisio::VSDGeometryListElement::handle
virtual void handle(VSDCollector *collector) const =0
libvisio::VSDEllipticalArcTo::m_y3
double m_y3
Definition: VSDGeometryList.cpp:103
libvisio::VSDSplineKnot::clone
VSDGeometryListElement * clone() override
Definition: VSDGeometryList.cpp:489
libvisio::VSDGeometryList::addSplineKnot
void addSplineKnot(unsigned id, unsigned level, const boost::optional< double > &x, const boost::optional< double > &y, const boost::optional< double > &knot)
Definition: VSDGeometryList.cpp:781
libvisio::clone
std::unique_ptr< T > clone(const std::unique_ptr< T > &other)
Definition: libvisio_utils.h:65
libvisio::VSDGeometryListElement::VSDGeometryListElement
VSDGeometryListElement(unsigned id, unsigned level)
Definition: VSDGeometryList.h:29
libvisio::VSDSplineStart::m_degree
unsigned m_degree
Definition: VSDGeometryList.cpp:213
libvisio::VSDArcTo
Definition: VSDGeometryList.cpp:67
libvisio::VSDSplineStart::clone
VSDGeometryListElement * clone() override
Definition: VSDGeometryList.cpp:478
libvisio::VSDSplineKnot::VSDSplineKnot
VSDSplineKnot(unsigned id, unsigned level, const boost::optional< double > &x, const boost::optional< double > &y, const boost::optional< double > &knot)
Definition: VSDGeometryList.cpp:219
libvisio::VSDPolylineTo2::getDataID
unsigned getDataID() const override
Definition: VSDGeometryList.cpp:454
libvisio::VSDSplineStart
Definition: VSDGeometryList.cpp:200
libvisio::VSDSplineStart::m_firstKnot
double m_firstKnot
Definition: VSDGeometryList.cpp:212
libvisio::VSDGeometryList::addInfiniteLine
void addInfiniteLine(unsigned id, unsigned level, const boost::optional< double > &x1, const boost::optional< double > &y1, const boost::optional< double > &x2, const boost::optional< double > &y2)
Definition: VSDGeometryList.cpp:797
libvisio::VSDRelQuadBezTo::VSDRelQuadBezTo
VSDRelQuadBezTo(unsigned id, unsigned level, const boost::optional< double > &x, const boost::optional< double > &y, const boost::optional< double > &a, const boost::optional< double > &b)
Definition: VSDGeometryList.cpp:295
libvisio::VSDSplineStart::VSDSplineStart
VSDSplineStart(unsigned id, unsigned level, const boost::optional< double > &x, const boost::optional< double > &y, const boost::optional< double > &secondKnot, const boost::optional< double > &firstKnot, const boost::optional< double > &lastKnot, const boost::optional< unsigned > &degree)
Definition: VSDGeometryList.cpp:202
libvisio::VSDCollector::collectRelEllipticalArcTo
virtual void collectRelEllipticalArcTo(unsigned id, unsigned level, double x, double y, double a, double b, double c, double d)=0
libvisio::VSDNURBSTo2::handle
void handle(VSDCollector *collector) const override
Definition: VSDGeometryList.cpp:403
libvisio::VSDRelLineTo::m_x
double m_x
Definition: VSDGeometryList.cpp:289
libvisio::VSDGeometryList::handle
void handle(VSDCollector *collector) const
Definition: VSDGeometryList.cpp:905
libvisio::VSDInfiniteLine::m_y2
double m_y2
Definition: VSDGeometryList.cpp:239
libvisio::VSDPolylineTo3::clone
VSDGeometryListElement * clone() override
Definition: VSDGeometryList.cpp:466
libvisio::VSDRelEllipticalArcTo::~VSDRelEllipticalArcTo
~VSDRelEllipticalArcTo() override
Definition: VSDGeometryList.cpp:264
libvisio::VSDRelMoveTo::~VSDRelMoveTo
~VSDRelMoveTo() override
Definition: VSDGeometryList.cpp:275
libvisio::VSDRelQuadBezTo::~VSDRelQuadBezTo
~VSDRelQuadBezTo() override
Definition: VSDGeometryList.cpp:299
libvisio::VSDPolylineTo3::m_data
PolylineData m_data
Definition: VSDGeometryList.cpp:195
libvisio::VSDLineTo::clone
VSDGeometryListElement * clone() override
Definition: VSDGeometryList.cpp:349
libvisio::VSDEllipse::m_xtop
double m_xtop
Definition: VSDGeometryList.cpp:89
libvisio::VSDGeometryList::addEllipticalArcTo
void addEllipticalArcTo(unsigned id, unsigned level, const boost::optional< double > &x3, const boost::optional< double > &y3, const boost::optional< double > &x2, const boost::optional< double > &y2, const boost::optional< double > &angle, const boost::optional< double > &ecc)
Definition: VSDGeometryList.cpp:741
VSDTypes.h
libvisio::VSDGeometryList::addGeometry
void addGeometry(unsigned id, unsigned level, const boost::optional< bool > &noFill, const boost::optional< bool > &noLine, const boost::optional< bool > &noShow)
Definition: VSDGeometryList.cpp:597
libvisio::VSDNURBSTo3::clone
VSDGeometryListElement * clone() override
Definition: VSDGeometryList.cpp:425
libvisio::VSDEllipse::m_yleft
double m_yleft
Definition: VSDGeometryList.cpp:89
libvisio::VSDMoveTo::m_x
double m_x
Definition: VSDGeometryList.cpp:52
libvisio::VSDCollector::collectPolylineTo
virtual void collectPolylineTo(unsigned id, unsigned level, double x, double y, unsigned char xType, unsigned char yType, const std::vector< std::pair< double, double > > &points)=0
VSDCollector.h
libvisio::VSDGeometryList::m_elementsOrder
std::vector< unsigned > m_elementsOrder
Definition: VSDGeometryList.h:115
libvisio::VSDPolylineTo1::m_yType
unsigned m_yType
Definition: VSDGeometryList.cpp:167
libvisio::VSDGeometryList::addPolylineTo
void addPolylineTo(unsigned id, unsigned level, double x, double y, unsigned char xType, unsigned char yType, const std::vector< std::pair< double, double > > &points)
Definition: VSDGeometryList.cpp:695
libvisio::VSDCollector::collectEllipse
virtual void collectEllipse(unsigned id, unsigned level, double cx, double cy, double xleft, double yleft, double xtop, double ytop)=0
libvisio::VSDRelCubBezTo::~VSDRelCubBezTo
~VSDRelCubBezTo() override
Definition: VSDGeometryList.cpp:249
libvisio::VSDGeometryList::addRelMoveTo
void addRelMoveTo(unsigned id, unsigned level, const boost::optional< double > &x, const boost::optional< double > &y)
Definition: VSDGeometryList.cpp:854
libvisio::VSDGeometryList::addRelEllipticalArcTo
void addRelEllipticalArcTo(unsigned id, unsigned level, const boost::optional< double > &x3, const boost::optional< double > &y3, const boost::optional< double > &x2, const boost::optional< double > &y2, const boost::optional< double > &angle, const boost::optional< double > &ecc)
Definition: VSDGeometryList.cpp:834
libvisio::VSDGeometryList::~VSDGeometryList
~VSDGeometryList()
Definition: VSDGeometryList.cpp:593
libvisio::VSDMoveTo::~VSDMoveTo
~VSDMoveTo() override
Definition: VSDGeometryList.cpp:49
libvisio::VSDGeometryListElement::clone
virtual VSDGeometryListElement * clone()=0
libvisio::VSDLineTo
Definition: VSDGeometryList.cpp:56
libvisio::VSDGeometryList::addEmpty
void addEmpty(unsigned id, unsigned level)
Definition: VSDGeometryList.cpp:613
libvisio::VSDRelCubBezTo::m_b
double m_b
Definition: VSDGeometryList.cpp:252
libvisio::VSDRelCubBezTo
Definition: VSDGeometryList.cpp:243
libvisio::VSDNURBSTo1::m_knotVector
std::vector< double > m_knotVector
Definition: VSDGeometryList.cpp:120
libvisio::VSDPolylineTo2::~VSDPolylineTo2
~VSDPolylineTo2() override
Definition: VSDGeometryList.cpp:176
libvisio::VSDArcTo::~VSDArcTo
~VSDArcTo() override
Definition: VSDGeometryList.cpp:71
libvisio::VSDGeometryList::addRelCubBezTo
void addRelCubBezTo(unsigned id, unsigned level, const boost::optional< double > &x, const boost::optional< double > &y, const boost::optional< double > &a, const boost::optional< double > &b, const boost::optional< double > &c, const boost::optional< double > &d)
Definition: VSDGeometryList.cpp:814
libvisio::VSDGeometryList::addArcTo
void addArcTo(unsigned id, unsigned level, const boost::optional< double > &x2, const boost::optional< double > &y2, const boost::optional< double > &bow)
Definition: VSDGeometryList.cpp:647
libvisio::VSDNURBSTo1::clone
VSDGeometryListElement * clone() override
Definition: VSDGeometryList.cpp:397
libvisio::VSDPolylineTo1::m_xType
unsigned m_xType
Definition: VSDGeometryList.cpp:167
libvisio::VSDRelCubBezTo::m_d
double m_d
Definition: VSDGeometryList.cpp:252
libvisio::VSDInfiniteLine::handle
void handle(VSDCollector *collector) const override
Definition: VSDGeometryList.cpp:495
libvisio::VSDRelMoveTo::handle
void handle(VSDCollector *collector) const override
Definition: VSDGeometryList.cpp:531
libvisio::VSDNURBSTo1::m_xType
unsigned m_xType
Definition: VSDGeometryList.cpp:117
libvisio::VSDMoveTo::clone
VSDGeometryListElement * clone() override
Definition: VSDGeometryList.cpp:336
libvisio::VSDCollector::collectRelLineTo
virtual void collectRelLineTo(unsigned id, unsigned level, double x, double y)=0
libvisio::VSDEmpty::clone
VSDGeometryListElement * clone() override
Definition: VSDGeometryList.cpp:325
libvisio::VSDNURBSTo1
Definition: VSDGeometryList.cpp:107
libvisio::VSDSplineKnot::m_knot
double m_knot
Definition: VSDGeometryList.cpp:226
libvisio::VSDRelEllipticalArcTo
Definition: VSDGeometryList.cpp:256
libvisio::VSDEmpty::~VSDEmpty
~VSDEmpty() override
Definition: VSDGeometryList.cpp:39
libvisio::VSDEllipticalArcTo::m_x3
double m_x3
Definition: VSDGeometryList.cpp:103
libvisio::VSDPolylineTo1::m_points
std::vector< std::pair< double, double > > m_points
Definition: VSDGeometryList.cpp:168
libvisio::VSDPolylineTo1::m_x
double m_x
Definition: VSDGeometryList.cpp:166
libvisio::VSDGeometryList::setElementsOrder
void setElementsOrder(const std::vector< unsigned > &m_elementsOrder)
Definition: VSDGeometryList.cpp:898
libvisio::VSDPolylineTo2::clone
VSDGeometryListElement * clone() override
Definition: VSDGeometryList.cpp:449
libvisio::VSDRelEllipticalArcTo::m_x3
double m_x3
Definition: VSDGeometryList.cpp:267
libvisio::VSDSplineKnot::~VSDSplineKnot
~VSDSplineKnot() override
Definition: VSDGeometryList.cpp:222
libvisio::VSDGeometryList
Definition: VSDGeometryList.h:48
libvisio::VSDGeometry::handle
void handle(VSDCollector *collector) const override
Definition: VSDGeometryList.cpp:308
libvisio::VSDGeometryListElement
Definition: VSDGeometryList.h:27
libvisio::VSDEllipticalArcTo::VSDEllipticalArcTo
VSDEllipticalArcTo(unsigned id, unsigned level, const boost::optional< double > &x3, const boost::optional< double > &y3, const boost::optional< double > &x2, const boost::optional< double > &y2, const boost::optional< double > &angle, const boost::optional< double > &ecc)
Definition: VSDGeometryList.cpp:95
libvisio::VSDGeometryListElement::getDataID
virtual unsigned getDataID() const
Definition: VSDGeometryList.h:34
libvisio::VSDRelCubBezTo::m_x
double m_x
Definition: VSDGeometryList.cpp:252
libvisio::VSDSplineKnot::m_y
double m_y
Definition: VSDGeometryList.cpp:225
libvisio::VSDNURBSTo1::VSDNURBSTo1
VSDNURBSTo1(unsigned id, unsigned level, double x2, double y2, unsigned char xType, unsigned char yType, unsigned degree, std::vector< std::pair< double, double > > controlPoints, std::vector< double > knotVector, std::vector< double > weights)
Definition: VSDGeometryList.cpp:109
libvisio::VSDNURBSTo1::m_weights
std::vector< double > m_weights
Definition: VSDGeometryList.cpp:120
libvisio::VSDEllipse::VSDEllipse
VSDEllipse(unsigned id, unsigned level, const boost::optional< double > &cx, const boost::optional< double > &cy, const boost::optional< double > &xleft, const boost::optional< double > &yleft, const boost::optional< double > &xtop, const boost::optional< double > &ytop)
Definition: VSDGeometryList.cpp:80
libvisio::VSDRelEllipticalArcTo::handle
void handle(VSDCollector *collector) const override
Definition: VSDGeometryList.cpp:519
libvisio::VSDRelMoveTo::m_y
double m_y
Definition: VSDGeometryList.cpp:278
libvisio::VSDGeometryList::operator=
VSDGeometryList & operator=(const VSDGeometryList &geomList)
Definition: VSDGeometryList.cpp:581
libvisio::VSDRelMoveTo::VSDRelMoveTo
VSDRelMoveTo(unsigned id, unsigned level, const boost::optional< double > &x, const boost::optional< double > &y)
Definition: VSDGeometryList.cpp:273
libvisio::VSDPolylineTo1::clone
VSDGeometryListElement * clone() override
Definition: VSDGeometryList.cpp:437
libvisio::PolylineData
Definition: VSDTypes.h:115
libvisio::VSDArcTo::handle
void handle(VSDCollector *collector) const override
Definition: VSDGeometryList.cpp:355
libvisio::VSDCollector::collectEllipticalArcTo
virtual void collectEllipticalArcTo(unsigned id, unsigned level, double x3, double y3, double x2, double y2, double angle, double ecc)=0
libvisio::VSDSplineKnot
Definition: VSDGeometryList.cpp:217
libvisio::VSDRelCubBezTo::m_c
double m_c
Definition: VSDGeometryList.cpp:252
libvisio::VSDGeometry::m_noLine
bool m_noLine
Definition: VSDGeometryList.cpp:30
libvisio::VSDEmpty
Definition: VSDGeometryList.cpp:35
libvisio::VSDNURBSTo1::handle
void handle(VSDCollector *collector) const override
Definition: VSDGeometryList.cpp:391
libvisio::VSDRelLineTo::VSDRelLineTo
VSDRelLineTo(unsigned id, unsigned level, const boost::optional< double > &x, const boost::optional< double > &y)
Definition: VSDGeometryList.cpp:284
libvisio::VSDPolylineTo3::handle
void handle(VSDCollector *collector) const override
Definition: VSDGeometryList.cpp:460
libvisio::VSDRelQuadBezTo::clone
VSDGeometryListElement * clone() override
Definition: VSDGeometryList.cpp:561
libvisio::VSDEllipse::m_xleft
double m_xleft
Definition: VSDGeometryList.cpp:89
libvisio::VSDEmpty::VSDEmpty
VSDEmpty(unsigned id, unsigned level)
Definition: VSDGeometryList.cpp:37
libvisio::VSDNURBSTo3::handle
void handle(VSDCollector *collector) const override
Definition: VSDGeometryList.cpp:419
libvisio::VSDArcTo::VSDArcTo
VSDArcTo(unsigned id, unsigned level, const boost::optional< double > &x2, const boost::optional< double > &y2, const boost::optional< double > &bow)
Definition: VSDGeometryList.cpp:69
libvisio::VSDRelCubBezTo::VSDRelCubBezTo
VSDRelCubBezTo(unsigned id, unsigned level, const boost::optional< double > &x, const boost::optional< double > &y, const boost::optional< double > &a, const boost::optional< double > &b, const boost::optional< double > &c, const boost::optional< double > &d)
Definition: VSDGeometryList.cpp:245
libvisio::VSDSplineKnot::m_x
double m_x
Definition: VSDGeometryList.cpp:225
libvisio::VSDArcTo::clone
VSDGeometryListElement * clone() override
Definition: VSDGeometryList.cpp:361
libvisio::VSDGeometry
Definition: VSDGeometryList.cpp:20
libvisio::VSDGeometryList::addSplineStart
void addSplineStart(unsigned id, unsigned level, const boost::optional< double > &x, const boost::optional< double > &y, const boost::optional< double > &secondKnot, const boost::optional< double > &firstKnot, const boost::optional< double > &lastKnot, const boost::optional< unsigned > &degree)
Definition: VSDGeometryList.cpp:761
libvisio::VSDNURBSTo3::m_knotPrev
double m_knotPrev
Definition: VSDGeometryList.cpp:153
libvisio::VSDNURBSTo2::clone
VSDGeometryListElement * clone() override
Definition: VSDGeometryList.cpp:409
libvisio::VSDRelQuadBezTo::m_b
double m_b
Definition: VSDGeometryList.cpp:302
libvisio::VSDRelCubBezTo::handle
void handle(VSDCollector *collector) const override
Definition: VSDGeometryList.cpp:507
libvisio::VSDNURBSTo1::m_y2
double m_y2
Definition: VSDGeometryList.cpp:116
libvisio::VSDMoveTo::m_y
double m_y
Definition: VSDGeometryList.cpp:52
libvisio::VSDRelLineTo::clone
VSDGeometryListElement * clone() override
Definition: VSDGeometryList.cpp:549
libvisio::VSDLineTo::~VSDLineTo
~VSDLineTo() override
Definition: VSDGeometryList.cpp:60
libvisio::VSDNURBSTo2
Definition: VSDGeometryList.cpp:124
libvisio::VSDRelEllipticalArcTo::m_y2
double m_y2
Definition: VSDGeometryList.cpp:267
libvisio::VSDGeometryList::getElementsOrder
std::vector< unsigned > getElementsOrder() const
Definition: VSDGeometryList.h:104
libvisio::VSDGeometryList::addRelLineTo
void addRelLineTo(unsigned id, unsigned level, const boost::optional< double > &x, const boost::optional< double > &y)
Definition: VSDGeometryList.cpp:868
libvisio::VSDGeometry::clone
VSDGeometryListElement * clone() override
Definition: VSDGeometryList.cpp:314
libvisio::VSDEllipticalArcTo::clone
VSDGeometryListElement * clone() override
Definition: VSDGeometryList.cpp:385
libvisio::VSDGeometryList::resetLevel
void resetLevel(unsigned level)
Definition: VSDGeometryList.cpp:954
libvisio::VSDRelQuadBezTo::m_y
double m_y
Definition: VSDGeometryList.cpp:302
libvisio::VSDNURBSTo3::m_data
NURBSData m_data
Definition: VSDGeometryList.cpp:151
libvisio::VSDNURBSTo1::m_x2
double m_x2
Definition: VSDGeometryList.cpp:116
libvisio::VSDRelMoveTo
Definition: VSDGeometryList.cpp:271
libvisio::VSDRelMoveTo::m_x
double m_x
Definition: VSDGeometryList.cpp:278
libvisio::VSDInfiniteLine::m_x1
double m_x1
Definition: VSDGeometryList.cpp:239
libvisio::VSDGeometry::~VSDGeometry
~VSDGeometry() override
Definition: VSDGeometryList.cpp:26
libvisio::VSDInfiniteLine
Definition: VSDGeometryList.cpp:230
libvisio::VSDNURBSTo3::m_weightPrev
double m_weightPrev
Definition: VSDGeometryList.cpp:154
libvisio::VSDGeometryListElement::~VSDGeometryListElement
virtual ~VSDGeometryListElement()
Definition: VSDGeometryList.h:31
libvisio::VSDNURBSTo2::~VSDNURBSTo2
~VSDNURBSTo2() override
Definition: VSDGeometryList.cpp:128
libvisio::VSDPolylineTo1::m_y
double m_y
Definition: VSDGeometryList.cpp:166
libvisio::VSDNURBSTo2::m_x2
double m_x2
Definition: VSDGeometryList.cpp:134
libvisio::VSDNURBSTo1::~VSDNURBSTo1
~VSDNURBSTo1() override
Definition: VSDGeometryList.cpp:112
libvisio::VSDNURBSTo2::m_weight
double m_weight
Definition: VSDGeometryList.cpp:136
libvisio::VSDEllipticalArcTo::~VSDEllipticalArcTo
~VSDEllipticalArcTo() override
Definition: VSDGeometryList.cpp:100
libvisio::VSDNURBSTo2::m_weightPrev
double m_weightPrev
Definition: VSDGeometryList.cpp:136
libvisio::VSDGeometryListElement::m_id
unsigned m_id
Definition: VSDGeometryList.h:43
libvisio::VSDInfiniteLine::m_x2
double m_x2
Definition: VSDGeometryList.cpp:239
libvisio::VSDRelMoveTo::clone
VSDGeometryListElement * clone() override
Definition: VSDGeometryList.cpp:537
libvisio::VSDRelCubBezTo::m_a
double m_a
Definition: VSDGeometryList.cpp:252
MINUS_ONE
#define MINUS_ONE
Definition: VSDTypes.h:18
libvisio::VSDCollector::collectSplineStart
virtual void collectSplineStart(unsigned id, unsigned level, double x, double y, double secondKnot, double firstKnot, double lastKnot, unsigned degree)=0
libvisio::VSDEllipticalArcTo
Definition: VSDGeometryList.cpp:93
libvisio::VSDCollector::collectRelMoveTo
virtual void collectRelMoveTo(unsigned id, unsigned level, double x, double y)=0
libvisio::VSDNURBSTo1::m_degree
unsigned m_degree
Definition: VSDGeometryList.cpp:118
libvisio::VSDNURBSTo3::m_y2
double m_y2
Definition: VSDGeometryList.cpp:152
libvisio::VSDNURBSTo3::~VSDNURBSTo3
~VSDNURBSTo3() override
Definition: VSDGeometryList.cpp:147
libvisio::VSDNURBSTo3::m_weight
double m_weight
Definition: VSDGeometryList.cpp:154
libvisio::VSDEllipse::~VSDEllipse
~VSDEllipse() override
Definition: VSDGeometryList.cpp:86
libvisio::VSDRelQuadBezTo::m_a
double m_a
Definition: VSDGeometryList.cpp:302
libvisio::VSDNURBSTo2::m_knot
double m_knot
Definition: VSDGeometryList.cpp:135
libvisio::VSDLineTo::VSDLineTo
VSDLineTo(unsigned id, unsigned level, const boost::optional< double > &x, const boost::optional< double > &y)
Definition: VSDGeometryList.cpp:58
libvisio::VSDArcTo::m_bow
double m_bow
Definition: VSDGeometryList.cpp:74
libvisio::VSDLineTo::handle
void handle(VSDCollector *collector) const override
Definition: VSDGeometryList.cpp:343
libvisio::VSDGeometryList::VSDGeometryList
VSDGeometryList()
Definition: VSDGeometryList.cpp:567
libvisio::VSDRelLineTo::~VSDRelLineTo
~VSDRelLineTo() override
Definition: VSDGeometryList.cpp:286
libvisio::VSDMoveTo
Definition: VSDGeometryList.cpp:45
libvisio_utils.h
libvisio::VSDCollector::collectMoveTo
virtual void collectMoveTo(unsigned id, unsigned level, double x, double y)=0
libvisio::VSDPolylineTo3::~VSDPolylineTo3
~VSDPolylineTo3() override
Definition: VSDGeometryList.cpp:191
libvisio::VSDMoveTo::VSDMoveTo
VSDMoveTo(unsigned id, unsigned level, const boost::optional< double > &x, const boost::optional< double > &y)
Definition: VSDGeometryList.cpp:47
libvisio::VSDPolylineTo2::m_dataID
unsigned m_dataID
Definition: VSDGeometryList.cpp:181
libvisio::VSDRelQuadBezTo::handle
void handle(VSDCollector *collector) const override
Definition: VSDGeometryList.cpp:555
libvisio::VSDRelEllipticalArcTo::m_y3
double m_y3
Definition: VSDGeometryList.cpp:267
libvisio::VSDGeometryList::m_elements
std::map< unsigned, std::unique_ptr< VSDGeometryListElement > > m_elements
Definition: VSDGeometryList.h:114
libvisio::VSDNURBSTo2::m_knotPrev
double m_knotPrev
Definition: VSDGeometryList.cpp:135
libvisio::NURBSData
Definition: VSDTypes.h:94
libvisio::VSDNURBSTo2::VSDNURBSTo2
VSDNURBSTo2(unsigned id, unsigned level, double x2, double y2, double knot, double knotPrev, double weight, double weightPrev, unsigned dataID)
Definition: VSDGeometryList.cpp:126
libvisio::VSDNURBSTo1::m_controlPoints
std::vector< std::pair< double, double > > m_controlPoints
Definition: VSDGeometryList.cpp:119
libvisio::VSDCollector::collectInfiniteLine
virtual void collectInfiniteLine(unsigned id, unsigned level, double x1, double y1, double x2, double y2)=0
libvisio::VSDEllipse::m_ytop
double m_ytop
Definition: VSDGeometryList.cpp:89
libvisio::VSDLineTo::m_x
double m_x
Definition: VSDGeometryList.cpp:63
libvisio::VSDArcTo::m_x2
double m_x2
Definition: VSDGeometryList.cpp:74
libvisio::VSDSplineStart::~VSDSplineStart
~VSDSplineStart() override
Definition: VSDGeometryList.cpp:207
ASSIGN_OPTIONAL
#define ASSIGN_OPTIONAL(t, u)
Definition: VSDTypes.h:17
libvisio::VSDNURBSTo3::m_x2
double m_x2
Definition: VSDGeometryList.cpp:152
libvisio
Definition: libvisio_utils.h:49
libvisio::VSDEllipse::clone
VSDGeometryListElement * clone() override
Definition: VSDGeometryList.cpp:373
libvisio::VSDEllipse::handle
void handle(VSDCollector *collector) const override
Definition: VSDGeometryList.cpp:367
libvisio::VSDSplineStart::m_x
double m_x
Definition: VSDGeometryList.cpp:211
libvisio::VSDGeometryList::count
unsigned count() const
Definition: VSDGeometryList.h:108
libvisio::VSDLineTo::m_y
double m_y
Definition: VSDGeometryList.cpp:63
libvisio::VSDInfiniteLine::clone
VSDGeometryListElement * clone() override
Definition: VSDGeometryList.cpp:501
libvisio::VSDPolylineTo3::m_y
double m_y
Definition: VSDGeometryList.cpp:196