DocumentDelegateFactory.hpp
1 #pragma once
2 #include <score/plugins/InterfaceList.hpp>
3 
4 #include <score_lib_base_export.h>
5 
6 struct VisitorVariant;
7 class QObject;
8 namespace score
9 {
10 class DocumentDelegateModel;
11 class DocumentDelegatePresenter;
12 class DocumentDelegateView;
13 class DocumentModel;
14 class DocumentPresenter;
15 class DocumentView;
16 struct GUIApplicationContext;
17 struct DocumentContext;
18 
25 class SCORE_LIB_BASE_EXPORT DocumentDelegateFactory : public score::InterfaceBase
26 {
27  SCORE_INTERFACE(DocumentDelegateFactory, "127ea824-f623-4f68-8deb-7c8c930a262b")
28 public:
29  ~DocumentDelegateFactory() override;
30 
31  virtual DocumentDelegateView*
32  makeView(const score::DocumentContext& ctx, QObject* parent)
33  = 0;
34 
35  virtual DocumentDelegatePresenter* makePresenter(
36  const score::DocumentContext& ctx, DocumentPresenter* parent_presenter,
37  const DocumentDelegateModel& model, DocumentDelegateView& view)
38  = 0;
39 
40  virtual void make(
42  DocumentModel* parent)
43  = 0;
44  virtual void load(
45  const VisitorVariant&, const score::DocumentContext& ctx,
46  DocumentDelegateModel*& ptr, DocumentModel* parent)
47  = 0;
48 };
49 
50 class SCORE_LIB_BASE_EXPORT DocumentDelegateList final
51  : public InterfaceList<score::DocumentDelegateFactory>
52 {
53 public:
54  ~DocumentDelegateList() override;
55 
57 };
58 }
Used to provide custom document types.
Definition: DocumentDelegateFactory.hpp:26
Definition: DocumentDelegateFactory.hpp:52
Definition: DocumentDelegateModel.hpp:11
Definition: DocumentDelegatePresenter.hpp:16
Definition: DocumentDelegateView.hpp:10
Model part of a document.
Definition: DocumentModel.hpp:29
Interface between the DocumentModel and the DocumentView.
Definition: DocumentPresenter.hpp:20
Base class for plug-in interfaces.
Definition: Interface.hpp:52
InterfaceList Default implementation of InterfaceListBase.
Definition: InterfaceList.hpp:80
Base toolkit upon which the software is built.
Definition: Application.cpp:90
The VisitorVariant struct.
Definition: VisitorInterface.hpp:26
Definition: DocumentContext.hpp:18