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