Developer documentation | Axl-2.5.1

axlFieldReadersFactory.h
Go to the documentation of this file.
1 /* axlFieldReadersFactory.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 AXLFIELDREADERSFACTORY_H
17 #define AXLFIELDREADERSFACTORY_H
18 
19 #include "axlCoreExport.h"
20 
22 
23 #include <QtWidgets>
24 
26 
27 // /////////////////////////////////////////////////////////////////
28 //
29 // /////////////////////////////////////////////////////////////////
30 
32 {
33  Q_OBJECT
34 public:
35  axlFieldReadersInterface(QWidget *parent = 0);
36  virtual ~axlFieldReadersInterface(void);
37 
38  void setActorFactorySingleton(axlFieldReadersFactory *actorFactorySingleton);
39  axlFieldReadersFactory *actorFactorySingleton(void);
40 
41 
42 protected :
44 };
45 
46 // /////////////////////////////////////////////////////////////////
47 //
48 // /////////////////////////////////////////////////////////////////
49 
50 class axlFieldReadersFactoryPrivate;
51 
52 class AXLCORE_EXPORT axlFieldReadersFactory : public QObject
53 {
54  Q_OBJECT
55 
56 public:
57  typedef dtkAbstractDataReader *(*axlFieldReadersCreator)(void);
58 
59  typedef QHash<QString, axlFieldReadersCreator> axlFieldReadersCreatorHash;
60 
61 public:
62  static axlFieldReadersFactory *instance(void);
63 
64  bool registerFieldReaders(const QString& interface_name, axlFieldReadersCreator func);
65 
66  dtkAbstractDataReader *create(const QString& interface_name);
67  void initialize(void);
68 
69 protected:
71 
72 private:
75 
76 private:
77  axlFieldReadersFactoryPrivate *d;
78 };
79 
80 #endif // AXLFIELDREADERSFACTORY_H
QHash< QString, axlFieldReadersCreator > axlFieldReadersCreatorHash
axlFieldReadersFactory * m_actorFactorySingleton
#define AXLCORE_EXPORT
static axlFieldReadersFactory * s_instance