ICF 3.1.1.10
Technical documentation of ICF Libraries
CMultiLineSupplierCompBase.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#ifndef iipr_CMultiLineSupplier_included
7#define iipr_CMultiLineSupplier_included
8
9
10// ICF includes
11#include <imath/TVector.h>
12#include <i2d/CPolyline.h>
13#include <iprm/IParamsSet.h>
17
18
19namespace iipr
20{
21
22
24 public iinsp::TSupplierCompWrap< QVector<i2d::CLine2d> >,
25 virtual public iipr::IFeaturesProvider
26{
27public:
29
30 I_BEGIN_BASE_COMPONENT(CMultiLineSupplierCompBase);
31 I_REGISTER_INTERFACE(iipr::IFeaturesProvider);
32 I_END_COMPONENT;
33
34 // reimplemented (iipr::IFeaturesProvider)
35 int GetFeaturesCount() const override;
36 const imeas::INumericValue& GetFeature(int index) const override;
37
38private:
39 class Line: virtual public imeas::INumericValue
40 {
41 public:
42 Line();
43 Line(const i2d::CLine2d& line);
44
45 // reimplemented (imeas::INumericValue)
46 bool IsValueTypeSupported(ValueTypeId valueTypeId, bool editableOnly = false) const override;
47 const imeas::INumericConstraints& GetNumericConstraints() const override;
48 double GetComponentValue(ValueTypeId valueTypeId) const override;
49 bool SetComponentValue(ValueTypeId valueTypeId, double value) override;
50
51 // reimplemented (iser::ISerializable)
52 bool Serialize(iser::IArchive& archive) override;
53
54 // reimplemented (istd::IChangeable)
55 bool CopyFrom(const IChangeable& object, CompatibilityMode mode = CM_WITHOUT_REFS) override;
56
57 protected:
58 imath::TVector<4> m_values;
59 };
60
61 typedef QMap<int, Line> LinesCache;
62
63 mutable LinesCache m_linesCache;
64
65 static const imeas::CGeneralNumericConstraints::Info s_point1XInfo;
66 static const imeas::CGeneralNumericConstraints::Info s_point1YInfo;
67 static const imeas::CGeneralNumericConstraints::Info s_point2XInfo;
68 static const imeas::CGeneralNumericConstraints::Info s_point2YInfo;
69 static const imeas::CGeneralNumericConstraints s_constraints;
70};
71
72
73} // namespace iipr
74
75
76#endif // !iipr_CMultiLineSupplier_included
77
78
Definition of a line in 2D-space.
Definition CLine2d.h:26
Standard implementation of interface iinsp::ISupplier with preparation for component implementation.
iinsp::TSupplierCompWrap< QVector< i2d::CLine2d > > BaseClass
int GetFeaturesCount() const override
Get number of stored features.
const imeas::INumericValue & GetFeature(int index) const override
Get access to single feature.
Container allowing access to features.
Implementation of fixed-size mathematical vector with specified type of elements.
Definition TVector.h:32
Simple implementation of imeas::INumericConstraints interface.
Describe additional meta information for set of numeric values.
General parameter set containing list of numeric values.
INumericConstraints::ValueTypeId ValueTypeId
Represent input/output persistence archive.
Definition IArchive.h:34
CompatibilityMode
Control how relationship betweeen objects are interpreted.
@ CM_WITHOUT_REFS
External references are simple ignored.
Contains the image processing classes.

© Witold Gantzke and Kirill Lepskiy