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/driver/native_driver.h

34 lines
751 B
C
Raw Normal View History

2019-12-04 15:51:46 +08:00
#ifndef NATIVE_DRIVER_H
#define NATIVE_DRIVER_H
#include "driver.h"
#include "engine/js_engine.h"
class NativeDriver : public Driver {
Q_INTERFACES(Driver)
private:
static NativeDriver *local_instance;
2019-12-14 10:04:17 +08:00
NativeDriver();
2019-12-04 15:51:46 +08:00
~NativeDriver() override;
JSEngine *jsEngine = new JSEngine();
public:
static NativeDriver *getInstance() {
static NativeDriver locla_s;
return &locla_s;
}
void createContext(int contextId, QString *script) override;
void destroyContext(int contextId) override;
2019-12-04 16:44:30 +08:00
2019-12-13 17:45:27 +08:00
void invokeContextEntityMethod(int contextId, QString *method, ...) override;
void invokeDoricMethod(QString *method, ...) override;
2019-12-14 11:30:12 +08:00
Registry * getRegistry() override;
2019-12-04 15:51:46 +08:00
};
#endif // NATIVE_DRIVER_H