OpenLexocad  27.1
Result.h
Go to the documentation of this file.
1 // //
3 // LEXOCAD API //
4 // //
5 // ©2005-2016 Cadwork Informatik. All rights reserved. //
6 // //
7 // ONLY INCLUDE OTHER INTERFACES! //
8 // Lexocad provides API Classes for public use and //
9 // Implementation Classes for private use. //
10 // //
11 // - Do ONLY include and use the LEXOCAD API in this header. //
12 // - Do not change existing interfaces. //
13 // - Document your code! //
14 // //
15 // - All types from Base, Core, Geom, Topo are allowed here. //
16 // - In the Gui modules the use of Qt types is allowed. //
17 // //
19 
20 #pragma once
21 
22 #include <Base/String.h>
24 #include <Geom/Pnt.h>
25 
26 namespace Core
27 {
28 class LX_CORE_EXPORT DoubleResult
29 {
30 public:
31  bool isNull() const { return _isNull; }
32  double getValue() { return _value; }
33  void setValue(double aValue)
34  {
35  _value = aValue;
36  _isNull = false;
37  }
38 
39 private:
40  bool _isNull = true;
41  double _value;
42 };
43 
44 class LX_CORE_EXPORT IntegerResult
45 {
46 public:
47  bool isNull() const { return _isNull; }
48  int getValue() { return _value; }
49  void setValue(int aValue)
50  {
51  _value = aValue;
52  _isNull = false;
53  }
54 
55 private:
56  bool _isNull = true;
57  int _value;
58 };
59 
60 class LX_CORE_EXPORT StringResult
61 {
62 public:
63  bool isNull() const { return _isNull; }
64  Base::String getValue() { return _value; }
65  void setValue(const Base::String& aValue)
66  {
67  _value = aValue;
68  _isNull = false;
69  }
70 
71 private:
72  bool _isNull = true;
73  Base::String _value;
74 };
75 
76 class LX_CORE_EXPORT PntResult
77 {
78 public:
79  bool isNull() const { return _isNull; }
80  Geom::Pnt getValue() { return _value; }
81  void setValue(const Geom::Pnt& aValue)
82  {
83  _value = aValue;
84  _isNull = false;
85  }
86 
87 private:
88  bool _isNull = true;
89  Geom::Pnt _value;
90 };
91 
92 class LX_CORE_EXPORT StandardManipulatorPolicyResult
93 {
94 public:
95  bool isNull() const { return _isNull; }
98  {
99  _value = aValue;
100  _isNull = false;
101  }
102 
103 private:
104  bool _isNull = true;
106 };
107 } // namespace Core
Definition: Result.h:60
bool isNull() const
Definition: Result.h:31
void setValue(double aValue)
Definition: Result.h:33
Defines a non-persistent 3D Cartesian point.
Definition: Pnt.h:43
bool isNull() const
Definition: Result.h:63
bool isNull() const
Definition: Result.h:47
bool isNull() const
Definition: Result.h:79
A Utf-16 (windows) or ucs4 (unix) encoded string class.
Definition: String.h:23
int getValue()
Definition: Result.h:48
Definition: Result.h:76
Geom::Pnt getValue()
Definition: Result.h:80
void setValue(int aValue)
Definition: Result.h:49
Definition: StandardManipulatorPolicy.h:9
Core::StandardManipulatorPolicy getValue()
Definition: Result.h:96
Definition: Base.h:12
void setValue(const Core::StandardManipulatorPolicy &aValue)
Definition: Result.h:97
void setValue(const Base::String &aValue)
Definition: Result.h:65
Definition: Result.h:44
void setValue(const Geom::Pnt &aValue)
Definition: Result.h:81
bool isNull() const
Definition: Result.h:95
Definition: Result.h:28
Base::String getValue()
Definition: Result.h:64
double getValue()
Definition: Result.h:32