-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathqiodevice_implement.h
More file actions
32 lines (28 loc) · 1.07 KB
/
Copy pathqiodevice_implement.h
File metadata and controls
32 lines (28 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once
#include "framework.h"
#include <QIODevice>
#include "core_module.h"
#include "qiodevice_p.h"
#include "qiodevice_wrapper.h"
namespace shelllet {
namespace core {
class IODevice : public QIODeviceWrapper<QIODevice, IODevice, true>
{
using ReturnType = QIODevicePrivate<QIODevice, true>;
using ReturnType2 = QIODevicePrivate<QIODevice, false>;
ReturnType* Private(const v8::FunctionCallbackInfo<v8::Value>& args) {
return new ReturnType(args.GetIsolate(), args.This());
}
public:
IODevice(const v8::FunctionCallbackInfo<v8::Value>& args) : QIODeviceWrapper(*Private(args), args) {}
IODevice(QIODevice* p, const v8::FunctionCallbackInfo<v8::Value>& args) : QIODeviceWrapper(*new ReturnType2(args.GetIsolate(), args.This(), p), args)
{
}
IODevice(v8::Isolate* isolate, const v8::Local<v8::FunctionTemplate>& tpl) : QIODeviceWrapper(isolate, tpl) {}
IODevice(v8::Isolate* isolate, const v8::Local<v8::ObjectTemplate>& proto) : QIODeviceWrapper(isolate, proto) {
}
static const char* Name() { return "QIODevice"; }
public:
};
}
}