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