This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-Qt/doric/DoricRegistry.h

29 lines
519 B
C
Raw Normal View History

2021-02-04 16:59:58 +08:00
#ifndef REGISTRY_H
#define REGISTRY_H
#include <QString>
#include "utils/DoricObjectFactory.h"
class DoricRegistry {
public:
2021-02-20 16:20:18 +08:00
DoricObjectFactory plugins;
DoricObjectFactory nodes;
2021-02-04 16:59:58 +08:00
DoricRegistry();
template <typename T> void registerNativePlugin(QString name) {
2021-02-20 16:20:18 +08:00
plugins.registerClass<T>(name);
}
template <typename T> void registerViewNode(QString name) {
nodes.registerClass<T>(name);
2021-02-04 16:59:58 +08:00
}
bool acquirePluginInfo(QString name);
bool acquireNodeInfo(QString name);
2021-02-04 16:59:58 +08:00
};
#endif // REGISTRY_H