This repository has been archived on 2024-07-22. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Doric/doric-Qt/doric/driver/native_driver.h
pengfei.zhou f21732f551 rename dir
2019-12-21 21:55:53 +08:00

34 lines
751 B
C++

#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;
NativeDriver();
~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;
void invokeContextEntityMethod(int contextId, QString *method, ...) override;
void invokeDoricMethod(QString *method, ...) override;
Registry * getRegistry() override;
};
#endif // NATIVE_DRIVER_H