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/example/doric/loader/DoricJSLoaderManager.h
2021-07-21 19:03:29 +08:00

36 lines
731 B
C++

#ifndef DORICJSLOADERMANAGER_H
#define DORICJSLOADERMANAGER_H
#include <QDebug>
#include "DoricExport.h"
#include "DoricInterfaceLoader.h"
class DORIC_EXPORT DoricJSLoaderManager {
private:
static DoricJSLoaderManager *local_instance;
DoricJSLoaderManager();
~DoricJSLoaderManager() { qDebug() << "DoricJSLoaderManager destructor"; }
public:
static DoricJSLoaderManager *getInstance() {
static DoricJSLoaderManager instance;
return &instance;
}
private:
QSet<DoricInterfaceLoader *> jsLoaders;
public:
void addJSLoader(DoricInterfaceLoader *jsLoader);
QSet<DoricInterfaceLoader *> *getJSLoaders();
std::shared_ptr<DoricAsyncResult> request(QString source);
};
#endif // DORICJSLOADERMANAGER_H