OpenLexocad  27.0
PropertyBoolean.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <Core/core_defines2.h>
4 
5 #include <string>
6 
7 #include "Core/Property.h"
8 #include "Core/Variant.h"
9 
10 
11 namespace Core
12 {
14 {
16 
17 public:
18  PropertyBoolean(void);
19  virtual ~PropertyBoolean(void);
20 
21  inline void setValue(bool b);
22  bool setValueFromVariant(const Core::Variant& value);
23  void copyValue(Core::Property* p);
24 
25  bool getValue() const;
26  Core::Variant getVariant(void) const;
27 
28  virtual void save(Base::AbstractWriter& writer, Base::PersistanceVersion& save_version);
29  virtual bool createSQL(Base::AbstractWriter& writer, Base::PersistanceVersion& save_version, bool data) override;
30  inline virtual void restore(Base::AbstractXMLReader& reader, Base::PersistanceVersion& version);
31  virtual bool isEqual(const Property*) const;
32 
33 protected:
34  bool _nValue;
35 };
36 
37 DECLARE_PROPERTY_FACTORY(PropertyBoolean_Factory, Core::PropertyBoolean);
38 
39 } // namespace Core
#define CORE_EXPORT
Definition: core_defines2.h:10
Definition: Persistance.h:20
LX_CORE_EXPORT Version & version
Definition: Variant.h:90
Definition: AbstractXMLReader.h:10
Definition: Base.h:19
Definition: Writer.h:27
Definition: PropertyBoolean.h:13
Definition: Property.h:81
TYPESYSTEM_HEADER()
bool _nValue
Definition: PropertyBoolean.h:34
DECLARE_PROPERTY_FACTORY(PropertyAxis1_Factory, Core::PropertyAxis1)