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

34 lines
692 B
C
Raw Normal View History

2021-06-09 18:06:56 +08:00
#ifndef DORICJSLOADERMANAGER_H
#define DORICJSLOADERMANAGER_H
#include <QDebug>
#include "DoricInterfaceLoader.h"
class 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