OpenLexocad  27.1
PropertyAxis1.h
Go to the documentation of this file.
1 #pragma once
2 #include <Geom/Ax1.h>
3 #include <Geom/Ax2d.h>
4 
5 #include <vector>
6 
7 #include "Core/Property.h"
8 #include "Core/Variant.h"
9 
10 namespace Core
11 {
12 class LX_CORE_EXPORT PropertyAxis1 : public Core::Property
13 {
15 
16 public:
17  PropertyAxis1(void);
18  virtual ~PropertyAxis1(void);
19 
20  void setValue(const Geom::Ax1& ax1);
21  bool setValueFromVariant(const Core::Variant& value);
22 
23  void setLocation(const Geom::Pnt& loc);
24  void setDirection(const Geom::Dir& dir);
25 
26  void copyValue(Core::Property* p);
27 
28  const Geom::Ax1& getValue() const;
29  Core::Variant getVariant(void) const;
30 
31  virtual void save(Base::AbstractWriter& writer, Base::PersistenceVersion& save_version);
32 
34  virtual void restore(Base::AbstractXMLReader& reader, Base::PersistenceVersion& version);
35  virtual bool isEqual(const Property*) const;
36  virtual Core::Property* copy(void) const override;
37  virtual void paste(const Core::Property& from) override;
38 
39 protected:
41 };
42 
43 class LX_CORE_EXPORT PropertyAxis2D : public Core::Property
44 {
46 
47 public:
48  PropertyAxis2D(void);
49  ~PropertyAxis2D(void);
50 
51  void setValue(const Geom::Ax2d& ax);
52  bool setValueFromVariant(const Core::Variant& value);
53  void copyValue(Core::Property* p);
54 
55  const Geom::Ax2d& getValue() const;
56  Core::Variant getVariant(void) const;
57 
58  void save(Base::AbstractWriter& writer, Base::PersistenceVersion& save_version);
59 
62  virtual bool isEqual(const Property*) const;
63  virtual Core::Property* copy(void) const override;
64  virtual void paste(const Core::Property& from) override;
65 
66 protected:
68 };
69 
70 
71 DECLARE_PROPERTY_FACTORY(PropertyAxis1_Factory, Core::PropertyAxis1);
72 DECLARE_PROPERTY_FACTORY(PropertyAxis2D_Factory, PropertyAxis2D);
73 
74 } // namespace Core
Definition: PropertyAxis1.h:12
Definition: Persistence.h:14
Defines a non-persistent 3D Cartesian point.
Definition: Pnt.h:43
Definition: Ax2d.h:48
LX_CORE_EXPORT Version & version
Definition: Variant.h:87
Definition: AbstractXMLReader.h:7
Definition: Dir.h:45
Definition: PropertyAxis1.h:43
Definition: Base.h:12
Definition: Writer.h:16
Definition: Ax1.h:50
Definition: Property.h:77
Geom::Ax1 _ax1
Definition: PropertyAxis1.h:40
TYPESYSTEM_HEADER()
DECLARE_PROPERTY_FACTORY(PropertyAxis1_Factory, Core::PropertyAxis1)
Geom::Ax2d _ax
Definition: PropertyAxis1.h:67