OpenLexocad  28.0
PropertyLinkBase.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <Core/Object_Hnd.h>
5 
6 
7 namespace Core
8 {
9 class DbgInfo;
10 class DocObject;
11 
12 
13 
14 class LX_CORE_EXPORT PropertyLinkBase : public PropertyLinkBaseBase
15 {
17 
18 public:
19  virtual void setValue(Core::DocObject* o);
20  bool setValueFromVariant(const Core::Variant& value) override;
21  bool setKeyValue(const std::string& key, const Core::Variant& value) override;
22  std::map<std::string, Core::Variant> getKeyValueMap() const override;
23 
25  Core::Variant getVariant(void) const override;
26 
28  void copyValue(Core::Property* p) override;
29  void deepCopy(Core::Property* p, Core::CoreDocument* dest_doc, DocObjectMap& copyMap) override;
30 
31  bool createSQL(Base::AbstractWriter& writer, Base::PersistenceVersion& save_version, bool data) override;
32  void save(Base::AbstractWriter& writer, Base::PersistenceVersion& save_version) override;
34  const Core::PropertyKind getPropertyKind(void) const override;
35  bool isEqual(const Property*) const override;
36  bool isLink() const override { return true; }
37  std::shared_ptr<Core::DbgInfo> getDbgInfo() const override;
38  Core::Property* copy(void) const override;
39  void paste(const Core::Property& from) override;
40 
41  // Tries to resolve the link from the object handle. Returns 'true' if successful, 'false' if it failed
42  bool resolveLink();
43 
44  bool removeLink(DocObject*) override { return true; }
45  bool addLink(DocObject*) override { return true; }
46 
47  std::vector<Core::DocObject*> getLinks() override;
48 
49 protected:
51 };
52 } // namespace Core
Core::CoreDocument
Definition: CoreDocument.h:269
Core::PropertyKind
PropertyKind
Definition: Property.h:42
Core::DocObjectMap
std::map< Core::DocObject *, Core::DocObject * > DocObjectMap
Definition: DocObject.h:50
Core::DocObject
Definition: DocObject.h:54
Base::PersistenceVersion
Definition: Persistence.h:13
Core
Definition: Base.h:5
Core::Variant
Definition: Variant.h:78
Base::AbstractWriter
Definition: Writer.h:13
Base::AbstractXMLReader
Definition: AbstractXMLReader.h:7
Object_Hnd.h
Core::version
LX_CORE_EXPORT Version & version
Core::Property
Definition: Property.h:72
TYPESYSTEM_HEADER
#define TYPESYSTEM_HEADER()
define for subclassing Base::BaseClass
Definition: Base.h:12
Core::Object_Hnd
Definition: Object_Hnd.h:9