Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cjx_logpseudomodel.cpp
Go to the documentation of this file.
1// Copyright 2017 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#include "fxjs/xfa/cjx_logpseudomodel.h"
8
9#include "core/fxcrt/span.h"
10#include "fxjs/xfa/cfxjse_value.h"
11#include "xfa/fxfa/parser/cscript_logpseudomodel.h"
12
13const CJX_MethodSpec CJX_LogPseudoModel::MethodSpecs[] = {
14 {"message", message_static},
15 {"traceEnabled", traceEnabled_static},
16 {"traceActivate", traceActivate_static},
17 {"traceDeactivate", traceDeactivate_static},
18 {"trace", trace_static}};
19
20CJX_LogPseudoModel::CJX_LogPseudoModel(CScript_LogPseudoModel* model)
21 : CJX_Object(model) {
22 DefineMethods(MethodSpecs);
23}
24
25CJX_LogPseudoModel::~CJX_LogPseudoModel() = default;
26
27bool CJX_LogPseudoModel::DynamicTypeIs(TypeTag eType) const {
28 return eType == static_type__ || ParentType__::DynamicTypeIs(eType);
29}
30
31CJS_Result CJX_LogPseudoModel::message(
32 CFXJSE_Engine* runtime,
33 pdfium::span<v8::Local<v8::Value>> params) {
34 // Uncomment to allow using xfa.log.message(""); from JS.
35 // fprintf(stderr, "LOG\n");
36 // for (auto& val : params) {
37 // v8::String::Utf8Value str(runtime->GetIsolate(), val);
38 // fprintf(stderr, " %ls\n", WideString::FromUTF8(*str).c_str());
39 // }
40
42}
43
44CJS_Result CJX_LogPseudoModel::traceEnabled(
45 CFXJSE_Engine* runtime,
46 pdfium::span<v8::Local<v8::Value>> params) {
48}
49
50CJS_Result CJX_LogPseudoModel::traceActivate(
51 CFXJSE_Engine* runtime,
52 pdfium::span<v8::Local<v8::Value>> params) {
54}
55
56CJS_Result CJX_LogPseudoModel::traceDeactivate(
57 CFXJSE_Engine* runtime,
58 pdfium::span<v8::Local<v8::Value>> params) {
60}
61
62CJS_Result CJX_LogPseudoModel::trace(
63 CFXJSE_Engine* runtime,
64 pdfium::span<v8::Local<v8::Value>> params) {
66}
friend class EventParamScope
static CJS_Result Success()
Definition cjs_result.h:28
bool DynamicTypeIs(TypeTag eType) const override
~CJX_LogPseudoModel() override
virtual bool DynamicTypeIs(TypeTag eType) const