kangaroo  1.0
the cbls library
regularConstant.hpp
Go to the documentation of this file.
1 
12 #ifndef RegularConstantHppIncluded
13 #define RegularConstantHppIncluded
14 
15 
16 
18 
19 
20 
22 
23 
24 
31 template<typename value>
32 class RegularConstant : public Constant
33 {
36 
37  public:
38 
39  typedef value ValueType;
40 
41  virtual Wrap ExecWrappedValue() const override final;
42  virtual Wrap SimulWrappedValue() const override final;
43 
44  value ExecValue() const;
45  value SimulValue() const;
46 
47  virtual ValueRecord<value> const * ExprValueRecord() const override final;
48  virtual Serial ValueTypeSerial() const override final;
49 
51 
54 
55  protected:
56 
57  RegularConstant(System * const pSystem);
58  ~RegularConstant();
59 
60  RegularConstant(RegularConstant<value> const & that) = delete;
61  RegularConstant(RegularConstant<value> && that) noexcept = delete;
62  RegularConstant<value> & operator = (RegularConstant<value> const & that) = delete;
63  RegularConstant<value> & operator = (RegularConstant<value> && that) noexcept = delete;
64 
67 
68  protected:
69 
71  void defineExprValueRecord();
72 
74 };
75 
76 
77 
81 template<typename value>
82 inline RegularConstant<value>::RegularConstant(System * const pSystem) :
83  Constant(pSystem), mExprValueRecord(nullptr)
84 {
85  WatchError
87  CatchError
88 }
89 
90 
91 
95 template<typename value>
97 {
98  WatchError
99  if (mExprValueRecord)
100  delete mExprValueRecord;
101  CatchError
102 }
103 
104 
105 
109 template <typename value>
111 {
112  WatchError
113  return Wrap(mExprValueRecord->ExecData());
114  CatchError
115 }
116 
117 
118 
122 template <typename value>
124 {
125  WatchError
126  return Wrap(mExprValueRecord->ExecData());
127  CatchError
128 }
129 
130 
131 
135 template<typename value>
137 {
138  WatchError
139  return mExprValueRecord->ExecData();
140  CatchError
141 }
142 
143 
144 
148 template<typename value>
150 {
151  WatchError
152  return mExprValueRecord->ExecData();
153  CatchError
154 }
155 
156 
157 
161 template<typename value>
163 {
164  WatchError
165  return mExprValueRecord;
166  CatchError
167 }
168 
169 
170 
174 template<typename value>
176 {
177  WatchError
179  CatchError
180 }
181 
182 
183 
187 template<typename value>
189 {
190  WatchError
192  CatchError
193 }
194 
195 
196 
198 
199 
200 
201 #endif//RegularConstantHppIncluded
void defineExprValueRecord()
Define expression value record.
Definition: regularConstant.hpp:188
Constant that represents abstract constants
virtual Wrap SimulWrappedValue() const overridefinal
Simulation value wrap.
Definition: regularConstant.hpp:123
void setExprModel(Identifier const pModel)
Set expression model.
Definition: expression1.hpp:592
value ValueType
Value type.
Definition: regularConstant.hpp:39
#define openKangarooSpace
Open the project namespace.
Definition: project.hpp:74
value SimulValue() const
Simulation value.
Definition: regularConstant.hpp:149
~RegularConstant()
Destructor.
Definition: regularConstant.hpp:96
data const & ExecData() const
Return execution data in execution buffer.
Definition: scalarrecord.hpp:287
virtual Serial ValueTypeSerial() const overridefinal
Value type serial.
Definition: regularConstant.hpp:175
Abstract constant expressions.
Definition: constant0.hpp:32
ValueRecord< value > * mExprValueRecord
Expression value record.
Definition: regularConstant.hpp:70
Unique identifier of a class.
value ExecValue() const
Execution value.
Definition: regularConstant.hpp:136
Constraint-based local search systems.
Definition: system0.hpp:45
virtual ValueRecord< value > const * ExprValueRecord() const overridefinal
Expression value.
Definition: regularConstant.hpp:162
#define closeKangarooSpace
Close the project namespace.
Definition: project.hpp:75
Wrappers for values.
Definition: wrapper.hpp:68
virtual Wrap ExecWrappedValue() const overridefinal
Execution value wrap.
Definition: regularConstant.hpp:110
Wrapper Wrap
Shortcut for Wrapper.
Definition: wrapper.hpp:321
Represents data type meta.
Definition: datatypes.hpp:73
Value records store expression values.
Definition: valuerecord.hpp:32
Regular constant model.
Definition: regularConstant.hpp:32