OpenLexocad  28.0
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 {
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 
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 
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 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 
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
Core::StandardManipulatorPolicyResult::setValue
void setValue(const Core::StandardManipulatorPolicy &aValue)
Definition: Result.h:97
Core::DoubleResult::setValue
void setValue(double aValue)
Definition: Result.h:33
Core::StringResult::isNull
bool isNull() const
Definition: Result.h:63
Core::PntResult::setValue
void setValue(const Geom::Pnt &aValue)
Definition: Result.h:81
Core::StandardManipulatorPolicy
Definition: StandardManipulatorPolicy.h:8
Core::StringResult
Definition: Result.h:61
Core::StandardManipulatorPolicyResult::getValue
Core::StandardManipulatorPolicy getValue()
Definition: Result.h:96
Core
Definition: Base.h:5
Core::PntResult
Definition: Result.h:77
Geom::Pnt
Defines a non-persistent 3D Cartesian point.
Definition: Pnt.h:44
Core::StandardManipulatorPolicyResult::isNull
bool isNull() const
Definition: Result.h:95
Pnt.h
Core::StringResult::setValue
void setValue(const Base::String &aValue)
Definition: Result.h:65
String.h
Core::IntegerResult::setValue
void setValue(int aValue)
Definition: Result.h:49
Core::PntResult::getValue
Geom::Pnt getValue()
Definition: Result.h:80
Core::StandardManipulatorPolicyResult
Definition: Result.h:93
StandardManipulatorPolicy.h
Core::IntegerResult::isNull
bool isNull() const
Definition: Result.h:47
Core::StringResult::getValue
Base::String getValue()
Definition: Result.h:64
Core::DoubleResult
Definition: Result.h:29
Core::IntegerResult::getValue
int getValue()
Definition: Result.h:48
Base::String
A Utf-16 (windows) or ucs4 (unix) encoded string class.
Definition: String.h:18
Core::DoubleResult::getValue
double getValue()
Definition: Result.h:32
Core::DoubleResult::isNull
bool isNull() const
Definition: Result.h:31
Core::PntResult::isNull
bool isNull() const
Definition: Result.h:79
Core::IntegerResult
Definition: Result.h:45