CSpline.h
Go to the documentation of this file.
1 #ifndef i2d_CSpline_included
2 #define i2d_CSpline_included
3 
4 
5 // Qt includes
6 #include <QtCore/QVector>
7 
8 // ACF includes
9 #include <i2d/CPolyline.h>
10 #include <i2d/CSplineSegment.h>
11 
12 
13 // forward declarations
14 namespace i2d{
15  class CSpline;
16 } // namespace i2d
17 
18 
19 namespace i2d
20 {
21 
22 
23 class CSpline: public i2d::CPolyline
24 {
25 public:
27 
28  CSpline();
29 
33  virtual int GetSegmentCount() const;
34 
39  virtual const CSplineSegment& GetSplineSegment(int index) const;
40 
44  virtual bool InsertSplineSegment(const CSplineSegment& segment);
45 
46  // reimplemented (istd::IChangeable)
47  virtual int GetSupportedOperations() const;
48  virtual bool CopyFrom(const IChangeable& object, CompatibilityMode mode = CM_WITHOUT_REFS);
50 
51 protected:
52  void CalcAllSegments() const;
53 
54 private:
55  static void SolveOpen(double* d,int count);
56 
57  mutable QVector<CSplineSegment> m_segments;
58  mutable bool m_isInvalidated;
59 };
60 
61 
62 } // namespace i2d
63 
64 
65 #endif // !i2d_CSpline_included
66 
virtual int GetSegmentCount() const
Get count of segments.
External references are simple ignored.
Definition: IChangeable.h:197
CompatibilityMode
Control how relationship betweeen objects are interpreted.
Definition: IChangeable.h:186
void CalcAllSegments() const
Common interface for data model objects, which can be changed.
Definition: IChangeable.h:24
virtual istd::IChangeable * CloneMe(CompatibilityMode mode=CM_WITHOUT_REFS) const
Make a copy of this object.
virtual bool InsertSplineSegment(const CSplineSegment &segment)
Insert a segment at the end of spline segment table.
virtual const CSplineSegment & GetSplineSegment(int index) const
Get segment in polynomial.
virtual bool CopyFrom(const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS)
2D-object representing a polyline.
Definition: CPolyline.h:18
i2d::CPolyline BaseClass
Definition: CSpline.h:26
virtual int GetSupportedOperations() const
Get set of flags for supported operations.

© 2007-2017 Witold Gantzke and Kirill Lepskiy