Developer documentation | Axl-2.5.1

axlInspectorActorFactory.h
Go to the documentation of this file.
1 /* axlInspectorActorFactory.h ---
2  *
3  * Author: Anais Ducoffe
4  * Copyright (C) 2013 - Anais Ducoffe, Inria.
5  */
6 
7 /* Commentary:
8  *
9  */
10 
11 /* Change log:
12  *
13  */
14 
15 
16 #ifndef AXLINSPECTORACTORFACTORY_H
17 #define AXLINSPECTORACTORFACTORY_H
18 
19 #include "axlVtkViewPluginExport.h"
20 
22 
23 #include <QtWidgets>
24 
26 
27 // /////////////////////////////////////////////////////////////////
28 //
29 // /////////////////////////////////////////////////////////////////
30 
32 {
33  Q_OBJECT
34 public:
35  axlInspectorActorInterface(QWidget *parent = 0);
36  virtual ~axlInspectorActorInterface(void);
37 
38  void setActorFactorySingleton(axlInspectorActorFactory *actorFactorySingleton);
39  axlInspectorActorFactory *actorFactorySingleton(void);
40 
41 public slots:
42  virtual void setData(axlAbstractActor *data);
43 
44 protected :
46 };
47 
48 // /////////////////////////////////////////////////////////////////
49 //
50 // /////////////////////////////////////////////////////////////////
51 
52 class axlInspectorActorFactoryPrivate;
53 
55 {
56  Q_OBJECT
57 
58 public:
59  typedef axlAbstractActor *(*axlInspectorActorCreator)(void);
60 
61  typedef QHash<QString, axlInspectorActorCreator> axlInspectorActorCreatorHash;
62 
63 public:
64  static axlInspectorActorFactory *instance(void);
65 
66  bool registerInspectorActor(const QString& interface_name, axlInspectorActorCreator func);
67 
68  axlAbstractActor *create(const QString& interface_name);
69  void initialize(void);
70 
71 protected:
73 
74 private:
77 
78 private:
79  axlInspectorActorFactoryPrivate *d;
80 };
81 
82 #endif // AXLINSPECTORACTORFACTORY_H
#define AXLVTKVIEWPLUGIN_EXPORT
static axlInspectorActorFactory * s_instance
axlInspectorActorFactory * m_actorFactorySingleton
QHash< QString, axlInspectorActorCreator > axlInspectorActorCreatorHash