OpenIndy-Core  0.2.0.43
featurewrapper.h
Go to the documentation of this file.
1 #ifndef FEATUREWRAPPER_H
2 #define FEATUREWRAPPER_H
3 
4 #include <QObject>
5 #include <QPointer>
6 
7 #include "types.h"
8 #include "util.h"
9 #include "feature.h"
10 #include "geometry.h"
11 #include "coordinatesystem.h"
12 #include "trafoparam.h"
13 #include "station.h"
14 #include "point.h"
15 #include "line.h"
16 #include "plane.h"
17 #include "sphere.h"
18 #include "circle.h"
19 #include "cone.h"
20 #include "cylinder.h"
21 #include "ellipsoid.h"
22 #include "paraboloid.h"
23 #include "hyperboloid.h"
24 #include "pointcloud.h"
25 #include "nurbs.h"
26 #include "ellipse.h"
27 #include "slottedhole.h"
28 #include "torus.h"
29 #include "scalarentityangle.h"
30 #include "scalarentitydistance.h"
33 
34 namespace oi{
35 
36 class OI_CORE_EXPORT FeatureWrapper : public QObject
37 {
38  Q_OBJECT
39 
40 public:
41  explicit FeatureWrapper(QObject *parent = 0);
42 
43  bool operator==(const FeatureWrapper &other);
44 
45  //################
46  //type information
47  //################
48 
49  QString getFeatureTypeString() const;
50  const FeatureTypes &getFeatureTypeEnum() const;
51 
52  //###################
53  //get feature pointer
54  //###################
55 
56  const QPointer<Feature> &getFeature() const;
57  const QPointer<Geometry> &getGeometry() const;
58 
59  const QPointer<CoordinateSystem> &getCoordinateSystem() const;
60  const QPointer<TrafoParam> &getTrafoParam() const;
61  const QPointer<Station> &getStation() const;
62 
63  const QPointer<Point> &getPoint() const;
64  const QPointer<Line> &getLine() const;
65  const QPointer<Plane> &getPlane() const;
66  const QPointer<Sphere> &getSphere() const;
67  const QPointer<Circle> &getCircle() const;
68  const QPointer<Cone> &getCone() const;
69  const QPointer<Cylinder> &getCylinder() const;
70  const QPointer<Ellipsoid> &getEllipsoid() const;
71  const QPointer<Hyperboloid> &getHyperboloid() const;
72  const QPointer<Paraboloid> &getParaboloid() const;
73  const QPointer<PointCloud> &getPointCloud() const;
74  const QPointer<Nurbs> &getNurbs() const;
75  const QPointer<Ellipse> &getEllipse() const;
76  const QPointer<SlottedHole> &getSlottedHole() const;
77  const QPointer<Torus> &getTorus() const;
78 
79  const QPointer<ScalarEntityAngle> &getScalarEntityAngle() const;
80  const QPointer<ScalarEntityDistance> &getScalarEntityDistance() const;
81  const QPointer<ScalarEntityTemperature> &getScalarEntityTemperature() const;
82  const QPointer<ScalarEntityMeasurementSeries> &getScalarEntityMeasurementSeries() const;
83 
84  //###################
85  //set feature pointer
86  //###################
87 
88  void setCoordinateSystem(const QPointer<CoordinateSystem> &coordSystem);
89  void setTrafoParam(const QPointer<TrafoParam> &trafoParam);
90  void setStation(const QPointer<Station> &station);
91 
92  void setPoint(const QPointer<Point> &point);
93  void setLine(const QPointer<Line> &line);
94  void setPlane(const QPointer<Plane> &plane);
95  void setSphere(const QPointer<Sphere> &sphere);
96  void setCircle(const QPointer<Circle> &circle);
97  void setCone(const QPointer<Cone> &cone);
98  void setCylinder(const QPointer<Cylinder> &cylinder);
99  void setEllipsoid(const QPointer<Ellipsoid> &ellipsoid);
100  void setHyperboloid(const QPointer<Hyperboloid> &hyperboloid);
101  void setParaboloid(const QPointer<Paraboloid> &paraboloid);
102  void setPointCloud(const QPointer<PointCloud> &pointCloud);
103  void setNurbs(const QPointer<Nurbs> &nurbs);
104  void setEllipse(const QPointer<Ellipse> &ellipse);
105  void setSlottedHole(const QPointer<SlottedHole> &slottedHole);
106  void setTorus(const QPointer<Torus> &torus);
107 
108  void setScalarEntityAngle(const QPointer<ScalarEntityAngle> &angle);
109  void setScalarEntityDistance(const QPointer<ScalarEntityDistance> &distance);
110  void setScalarEntityTemperature(const QPointer<ScalarEntityTemperature> &temperature);
111  void setScalarEntityMeasurementSeries(const QPointer<ScalarEntityMeasurementSeries> &measurementSeries);
112 
113 private:
114 
115  //#################################################################
116  //private feature pointer that hold a feature or are set to invalid
117  //#################################################################
118 
119  QPointer<Feature> feature;
120  QPointer<Geometry> geometry;
121 
122  QPointer<CoordinateSystem> coordinateSystem;
123  QPointer<TrafoParam> trafoParam;
124 
125  QPointer<Station> station;
126 
127  QPointer<Point> point;
128  QPointer<Line> line;
129  QPointer<Plane> plane;
130  QPointer<Sphere> sphere;
131  QPointer<Circle> circle;
132  QPointer<Cone> cone;
133  QPointer<Cylinder> cylinder;
134  QPointer<Ellipsoid> ellipsoid;
135  QPointer<Hyperboloid> hyperboloid;
136  QPointer<Paraboloid> paraboloid;
137  QPointer<PointCloud> pointCloud;
138  QPointer<Nurbs> nurbs;
139  QPointer<Ellipse> ellipse;
140  QPointer<SlottedHole> slottedHole;
141  QPointer<Torus> torus;
142  QPointer<ScalarEntityAngle> angle;
143  QPointer<ScalarEntityDistance> distance;
144  QPointer<ScalarEntityTemperature> temperature;
145  QPointer<ScalarEntityMeasurementSeries> measurementSeries;
146 
147  FeatureTypes typeOfFeature;
148 
149 };
150 
151 }
152 
153 Q_DECLARE_METATYPE( oi::FeatureWrapper* )
154 
155 #endif // FEATUREWRAPPER_H
FeatureTypes
all OpenIndy feature types
Definition: types.h:95
Definition: coordinatesystem.h:15
Definition: featurewrapper.h:36
FeatureTypes OI_CORE_EXPORT getFeatureTypeEnum(const QString &name)
getFeatureTypeEnum
Definition: util.cpp:696
#define OI_CORE_EXPORT
Definition: types.h:11