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

41 lines
844 B
C
Raw Normal View History

2021-01-28 17:06:40 +08:00
#ifndef NATIVEDRIVER_H
#define NATIVEDRIVER_H
#include <QDebug>
#include "interface_driver.h"
#include "engine/js_engine.h"
class NativeDriver : public InterfaceDriver
{
private:
static NativeDriver *local_instance;
NativeDriver()
{
qDebug() << "constructor";
}
~NativeDriver()
{
qDebug() << "destructor";
}
JSEngine jsEngine;
public:
static NativeDriver *getInstance()
{
static NativeDriver instance;
return &instance;
}
2021-02-02 20:42:37 +08:00
void invokeContextEntityMethod(QString contextId, QString method, QVariantList args) override;
2021-01-28 17:06:40 +08:00
2021-02-02 20:42:37 +08:00
void invokeDoricMethod(QString method, QVariantList args) override;
2021-01-28 17:06:40 +08:00
void createContext(QString contextId, QString script, QString source) override;
void destroyContext(QString contextId) override;
};
#endif // NATIVEDRIVER_H