OpenLexocad  27.0
PropertyUser.h
Go to the documentation of this file.
1 #pragma once
2 #include <Core/core_defines2.h>
3 
4 #include "Core/Property.h"
5 #include "Core/Variant.h"
6 
7 
8 
9 namespace Core
10 {
18 {
20 
21 public:
22  PropertyUser(void);
23  virtual ~PropertyUser(void);
24 
25 
26  bool setValue(const Core::Variant& value);
27  bool setValueFromVariant(const Core::Variant& value) { return setValue(value); }
28  bool setTextValue(const Base::String& text);
29  Base::String getTextValue(bool* ok = 0);
30  virtual void copyValue(Core::Property* p) override;
31 
32  const Core::Variant& getValue() const;
33  Core::Variant getVariant(void) const override;
34 
35  virtual void save(Base::AbstractWriter& writer, Base::PersistanceVersion& save_version);
36  virtual void restore(Base::AbstractXMLReader& reader, Base::PersistanceVersion& version);
37  virtual bool isEqual(const Property*) const;
38 
39 protected:
41 };
42 
43 DECLARE_PROPERTY_FACTORY(PropertyUser_Factory, Core::PropertyUser);
44 
46 {
48 
49 public:
50  PropertyIfc(void);
51  virtual ~PropertyIfc(void);
52 };
53 
54 DECLARE_PROPERTY_FACTORY(PropertyIfc_Factory, Core::PropertyIfc);
55 
56 } // namespace Core
#define CORE_EXPORT
Definition: core_defines2.h:10
A Utf-16 (windows) or ucs4 (unix) encoded string class.
Definition: String.h:29
Definition: Persistance.h:20
LX_CORE_EXPORT Version & version
Definition: PropertyUser.h:45
Definition: Variant.h:90
Definition: AbstractXMLReader.h:10
Definition: Base.h:19
Definition: Writer.h:27
Core::Variant _value
Definition: PropertyUser.h:40
Definition: Property.h:81
Core::PropertyUser is a class that can hold properties defined by the user. Its value member is a Cor...
Definition: PropertyUser.h:17
bool setValueFromVariant(const Core::Variant &value)
Definition: PropertyUser.h:27
TYPESYSTEM_HEADER()
DECLARE_PROPERTY_FACTORY(PropertyAxis1_Factory, Core::PropertyAxis1)