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