OpenLexocad  27.0
PropertyReal.h
Go to the documentation of this file.
1 #pragma once
2 #pragma warning(disable : 4251)
3 #include <Base/StringTool.h>
4 #include <Core/Property.h>
5 #include <Core/Variant.h>
6 #include <Core/core_defines2.h>
7 
8 #include <list>
9 
10 namespace Core
11 {
13 {
15 
16 public:
17  PropertyReal(void);
18  virtual ~PropertyReal(void);
19 
20  virtual void setValue(double d);
21  virtual bool setValueFromVariant(const Core::Variant& value);
22  virtual void copyValue(Core::Property* p);
23 
24  double getValue() const;
25  Core::Variant getVariant(void) const;
26 
27  virtual void save(Base::AbstractWriter& writer, Base::PersistanceVersion& save_version);
28  virtual bool createSQL(Base::AbstractWriter& writer, Base::PersistanceVersion& save_version, bool data) override;
29  virtual void restore(Base::AbstractXMLReader& reader, Base::PersistanceVersion& version);
30  virtual bool isEqual(const Property*) const;
31 
32 protected:
33  double _dValue;
34 };
35 
37 
39 //
40 // Core::PropertyRealList
41 //
42 // A list of real numbers
43 //
45 
47 {
49 
50 public:
51  PropertyRealList(void);
52  virtual ~PropertyRealList(void);
53 
54  virtual void setValue(const std::list<double>& value);
55  virtual bool setValueFromVariant(const Core::Variant& value);
56  virtual void copyValue(Core::Property* p);
57 
58  const std::list<double>& getValue() const { return _listOfReal; }
59  Core::Variant getVariant(void) const { return Core::Variant(_listOfReal); }
60 
61  virtual void save(Base::AbstractWriter& writer, Base::PersistanceVersion& save_version);
62  inline virtual void restore(Base::AbstractXMLReader& reader, Base::PersistanceVersion& version);
63  virtual bool isEqual(const Property*) const;
64 
65  double getValueAt(int index) const;
66 
67 protected:
68  std::list<double> _listOfReal;
69 };
70 
72 //
73 // Core::PropertyLength
74 //
75 // A length property contains the value of a distance.
76 //
78 
80 {
82 
83 public:
84  PropertyLength(void);
85  virtual ~PropertyLength(void);
86 };
87 
89 //
90 // Core::PropertyLengthMeasure
91 //
92 // A length property contains the value of a distance.
93 //
95 
97 {
99 
100 public:
101  PropertyLengthMeasure(void);
102  virtual ~PropertyLengthMeasure(void);
103 };
104 
106 //
107 // Core::PropertyLengthOpt
108 //
109 // An optional length property: Can contain the value of a distance.
110 //
112 
113 // DONOT USE MACRO HERE SINCE WE HAVE TO CONVERT DATA FROM
114 // AN OLDER VERSION
115 // DECLARE_OPTIONAL_PROPERTY_HEADER(Core::PropertyLengthOpt,Core::PropertyLength);
116 
118 {
120 
121 public:
122  void save(Base::AbstractWriter& writer, Base::PersistanceVersion& save_version);
123  inline void restore(Base::AbstractXMLReader& reader, Base::PersistanceVersion& version);
124  bool isOptional() const { return true; }
125 };
126 
128 //
129 // Core::PropertyPositiveLength
130 //
131 // A positive length property is a length property with a value greater than zero.
132 //
134 
136 {
138 
139 public:
141  virtual ~PropertyPositiveLength(void);
142 };
143 
145 
147 //
148 // Core::PropertyPositiveLengthMeasure
149 //
150 // A positive length property is a length property with a value greater than zero.
151 //
153 
155 {
157 
158 public:
160  virtual ~PropertyPositiveLengthMeasure(void);
161 };
162 
164 //
165 // Core::PropertyPlaneAngle
166 //
167 // A plane angle property contains the value of an angle in a plane.
168 //
170 
172 {
174 
175 public:
176  PropertyPlaneAngle(void);
177  virtual ~PropertyPlaneAngle(void);
178 };
179 
181 
183 //
184 // Core::PropertyPositivePlaneAngle
185 //
186 // Positive plane angle property is a plane angle property that is greater than zero.
187 //
189 
191 {
193 
194 public:
196  virtual ~PropertyPositivePlaneAngle(void);
197 };
198 
200 
202 //
203 // Core::PropertyRatio
204 //
205 // A ratio property contains the value of the relation between two physical quantities that are of the same kind.
206 //
208 
210 {
212 
213 public:
214  PropertyRatio(void);
215  virtual ~PropertyRatio(void);
216 };
217 
219 //
220 // Core::RatioMeasure
221 //
222 // A positive ratio property is a ratio property with a value greater than zero.
223 //
225 
227 {
229 
230 public:
231  PropertyRatioMeasure(void);
232  virtual ~PropertyRatioMeasure(void);
233 };
234 
236 //
237 // Core::PropertyPositiveRatioMeasure
238 //
239 // A positive ratio property is a ratio property with a value greater than zero.
240 //
242 
244 {
246 
247 public:
249  virtual ~PropertyPositiveRatioMeasure(void);
250 };
251 
253 //
254 // Core::PropertyPositiveRatio
255 //
256 // A positive ratio property is a ratio property with a value greater than zero.
257 //
259 
261 {
263 
264 public:
265  PropertyPositiveRatio(void);
266  virtual ~PropertyPositiveRatio(void);
267 };
268 
270 //
271 // Core::PropertyNormalisedRatio
272 //
273 // A property that contains a dimensionless measure
274 // to express ratio values ranging from 0.0 to 1.0.
275 //
277 
279 {
281 
282 public:
284  virtual ~PropertyNormalisedRatio(void);
285 };
286 
288 
290 //
291 // Core::PropertyDynamicViscosity
292 //
293 // A property that contains the viscous resistance of a medium.
294 // Usually measured in Pascal second (Pa s).
295 //
297 
299 {
301 
302 public:
304  virtual ~PropertyDynamicViscosity(void);
305 };
306 
308 //
309 // Core::PropertyModulusOfElasticity
310 //
311 // A property that contains the modulus of elasticity
312 // Usually measured in N/m2.
313 //
315 
317 {
319 
320 public:
322  virtual ~PropertyModulusOfElasticity(void);
323 };
324 
326 //
327 // Core::PropertyThermalExpansionCoefficient
328 //
329 // A property that contains the thermal expansion coefficient of a material,
330 // which expresses its elongation (as a ratio) per temperature difference.
331 // It is usually measured in 1/K. A positive elongation per (positive)
332 // rise of temperature is expressed by a positive value.
333 //
335 
337 {
339 
340 public:
343 };
344 
345 
347 //
348 // Core::PropertyPressure
349 //
350 // A property that contains the quantity of a medium acting on a unit area.
351 // Usually measured in Pascals (Pa, N/m2).
352 //
354 
356 {
358 
359 public:
360  PropertyPressure(void);
361  virtual ~PropertyPressure(void);
362 };
363 
365 //
366 // Core::PropertyThermodynamicTemperature
367 //
368 // A thermodynamic temperature property contains the value for the degree of heat of a body.
369 // Usually measured in degrees Kelvin (K).
370 //
372 
374 {
376 
377 public:
379  virtual ~PropertyThermodynamicTemperature(void);
380 };
381 
383 //
384 // Core::PropertySpecificHeatCapacity
385 //
386 // Defines the specific heat of material: The heat energy absorbed per temperature unit.
387 // Usually measured in J / kg Kelvin.
388 //
390 
392 {
394 
395 public:
397  virtual ~PropertySpecificHeatCapacity(void);
398 };
399 
401 //
402 // Core::PropertyThermalConductivity
403 //
404 // A property containing the thermal conductivity.
405 // Usually measured in Watt / m Kelvin.
406 //
408 
410 {
412 
413 public:
415  virtual ~PropertyThermalConductivity(void);
416 };
417 
419 //
420 // Core::PropertyIsothermalMoistureCapacity
421 //
422 // A property containing the isothermal moisture capacity.
423 // Usually measured in m3/kg.
424 //
426 
428 {
430 
431 public:
433  virtual ~PropertyIsothermalMoistureCapacity(void);
434 };
435 
437 //
438 // Core::PropertyVaporPermeability
439 //
440 // A property containing the vapor permeability.
441 // Usually measured in kg / s m Pascal.
442 //
444 
446 {
448 
449 public:
451  virtual ~PropertyVaporPermeability(void);
452 };
453 
455 //
456 // Core::PropertyMoistureDiffusivity
457 //
458 // A property containing the moisture diffusivity.
459 // Usually measured in m3/s.
460 //
462 
464 {
466 
467 public:
469  virtual ~PropertyMoistureDiffusivity(void);
470 };
471 
473 //
474 // Core::PropertyMolecularWeight
475 //
476 // A property containing the molecular weight of material (typically gas).
477 // Usually measured in g/mole.
478 //
480 
482 {
484 
485 public:
487  virtual ~PropertyMolecularWeight(void);
488 };
489 
491 //
492 // Core::PropertyMassDensity
493 //
494 // A property containing the density of a medium.
495 // Usually measured in kg/m3.
496 //
498 
500 {
502 
503 public:
504  PropertyMassDensity(void);
505  virtual ~PropertyMassDensity(void);
506 };
507 
509 //
510 // Core::PropertyIonConcentration
511 //
512 // A property containing the particular ion concentration in a liquid, given in mg/L.
513 //
515 
517 {
519 
520 public:
522  virtual ~PropertyIonConcentration(void);
523 };
524 
526 //
527 // Core::PropertyPHMeasure
528 //
529 // A property containing the molar hydrogen ion concentration in a liquid (usually defined as the measure of acidity).
530 //
532 
534 {
536 
537 public:
538  PropertyPHMeasure(void);
539  virtual ~PropertyPHMeasure(void);
540 };
541 
543 //
544 // Core::PropertyHeatingValue
545 //
546 // Defines the amount of energy released (usually in MJ/kg) when a fuel is burned.
547 //
549 
551 {
553 
554 public:
555  PropertyHeatingValue(void);
556  virtual ~PropertyHeatingValue(void);
557 };
558 
560 {
562 
563 public:
565  virtual ~PropertyThermalTransmittance(void);
566 };
567 
569 {
571 
572 public:
575 };
576 
578 {
580 
581 public:
583  virtual ~PropertyVolumetricFlowRateMeasure(void);
584 };
585 
586 
587 DECLARE_PROPERTY_FACTORY(PropertyReal_Factory, Core::PropertyReal);
588 DECLARE_PROPERTY_FACTORY(PropertyRealOpt_Factory, Core::PropertyRealOpt);
589 DECLARE_PROPERTY_FACTORY(PropertyRealList_Factory, Core::PropertyRealList);
590 DECLARE_PROPERTY_FACTORY(PropertyLength_Factory, Core::PropertyLength);
591 DECLARE_PROPERTY_FACTORY(PropertyLengthMeasure_Factory, Core::PropertyLengthMeasure);
592 DECLARE_PROPERTY_FACTORY(PropertyPositiveLength_Factory, Core::PropertyPositiveLength);
593 DECLARE_PROPERTY_FACTORY(PropertyLengthOpt_Factory, Core::PropertyLengthOpt);
594 DECLARE_PROPERTY_FACTORY(PropertyPlaneAngle_Factory, Core::PropertyPlaneAngle);
595 DECLARE_PROPERTY_FACTORY(PropertyPositivePlaneAngle_Factory, Core::PropertyPositivePlaneAngle);
596 DECLARE_PROPERTY_FACTORY(PropertyRatio_Factory, Core::PropertyRatio);
597 DECLARE_PROPERTY_FACTORY(PropertyPositiveRatio_Factory, Core::PropertyPositiveRatio);
598 DECLARE_PROPERTY_FACTORY(PropertyRatioMeasure_Factory, Core::PropertyRatioMeasure);
599 DECLARE_PROPERTY_FACTORY(PropertyPositiveRatioMeasure_Factory, Core::PropertyPositiveRatioMeasure);
600 DECLARE_PROPERTY_FACTORY(PropertyNormalisedRatio_Factory, Core::PropertyNormalisedRatio);
601 DECLARE_PROPERTY_FACTORY(PropertyDynamicViscosity_Factory, Core::PropertyDynamicViscosity);
602 DECLARE_PROPERTY_FACTORY(PropertyModulusOfElasticity_Factory, Core::PropertyModulusOfElasticity);
603 DECLARE_PROPERTY_FACTORY(PropertyThermalExpansionCoefficient_Factory, Core::PropertyThermalExpansionCoefficient);
604 DECLARE_PROPERTY_FACTORY(PropertyPressure_Factory, Core::PropertyPressure);
605 DECLARE_PROPERTY_FACTORY(PropertyThermodynamicTemperature_Factory, Core::PropertyThermodynamicTemperature);
606 DECLARE_PROPERTY_FACTORY(PropertySpecificHeatCapacity_Factory, Core::PropertySpecificHeatCapacity);
607 DECLARE_PROPERTY_FACTORY(PropertyThermalConductivity_Factory, Core::PropertyThermalConductivity);
608 DECLARE_PROPERTY_FACTORY(PropertyIsothermalMoistureCapacity_Factory, Core::PropertyIsothermalMoistureCapacity);
609 DECLARE_PROPERTY_FACTORY(PropertyVaporPermeability_Factory, Core::PropertyVaporPermeability);
610 DECLARE_PROPERTY_FACTORY(PropertyMoistureDiffusivity_Factory, Core::PropertyMoistureDiffusivity);
611 DECLARE_PROPERTY_FACTORY(PropertyMolecularWeight_Factory, Core::PropertyMolecularWeight);
612 DECLARE_PROPERTY_FACTORY(PropertyMassDensity_Factory, Core::PropertyMassDensity);
613 DECLARE_PROPERTY_FACTORY(PropertyIonConcentration_Factory, Core::PropertyIonConcentration);
614 DECLARE_PROPERTY_FACTORY(PropertyPHMeasure_Factory, Core::PropertyPHMeasure);
615 DECLARE_PROPERTY_FACTORY(PropertyHeatingValue_Factory, Core::PropertyHeatingValue);
616 DECLARE_PROPERTY_FACTORY(PropertyThermalTransmittance_Factory, Core::PropertyThermalTransmittance);
617 DECLARE_PROPERTY_FACTORY(PropertyThermalTransmittanceMeasure_Factory, Core::PropertyThermalTransmittanceMeasure);
618 DECLARE_PROPERTY_FACTORY(PropertyVolumetricFlowRateMeasure_Factory, Core::PropertyVolumetricFlowRateMeasure);
619 DECLARE_PROPERTY_FACTORY(PropertyPositiveLengthMeasure_Factory, Core::PropertyPositiveLengthMeasure);
620 } // namespace Core
Definition: PropertyReal.h:533
Definition: PropertyReal.h:190
Definition: PropertyReal.h:463
DECLARE_OPTIONAL_PROPERTY_HEADER(PropertyColorOpt, Core::PropertyColor)
Definition: PropertyReal.h:409
Definition: PropertyReal.h:278
#define CORE_EXPORT
Definition: core_defines2.h:10
Definition: PropertyReal.h:226
Definition: PropertyReal.h:209
Definition: PropertyReal.h:355
Definition: PropertyReal.h:550
const std::list< double > & getValue() const
Definition: PropertyReal.h:58
Definition: PropertyReal.h:445
Definition: PropertyReal.h:481
Definition: PropertyReal.h:243
Definition: PropertyReal.h:135
Definition: PropertyReal.h:499
Definition: PropertyReal.h:171
Definition: PropertyReal.h:568
Definition: PropertyReal.h:46
double _dValue
Definition: PropertyReal.h:33
Definition: Persistance.h:20
LX_CORE_EXPORT Version & version
Definition: Variant.h:90
Definition: AbstractXMLReader.h:10
Definition: PropertyReal.h:427
Definition: Base.h:19
Definition: PropertyReal.h:154
bool isOptional() const
Checks if this is an optional property.
Definition: PropertyReal.h:124
Definition: PropertyReal.h:12
Definition: PropertyReal.h:298
Definition: PropertyReal.h:577
Definition: PropertyReal.h:516
Definition: PropertyReal.h:96
Definition: Writer.h:27
Definition: PropertyReal.h:117
Definition: PropertyReal.h:336
Definition: Property.h:81
Definition: PropertyReal.h:559
std::list< double > _listOfReal
Definition: PropertyReal.h:68
Definition: PropertyReal.h:260
Core::Variant getVariant(void) const
Definition: PropertyReal.h:59
Definition: PropertyReal.h:373
TYPESYSTEM_HEADER()
Definition: PropertyReal.h:391
Definition: PropertyReal.h:79
DECLARE_PROPERTY_FACTORY(PropertyAxis1_Factory, Core::PropertyAxis1)
Definition: PropertyReal.h:316