当前位置: 首页>>代码示例>>C++>>正文


C++ TestTypedefs类代码示例

本文整理汇总了C++中TestTypedefs的典型用法代码示例。如果您正苦于以下问题:C++ TestTypedefs类的具体用法?C++ TestTypedefs怎么用?C++ TestTypedefs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了TestTypedefs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: unsignedLongLongAttrAttributeSetter

static void unsignedLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
    ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLongAttr", "TestTypedefs", info.Holder(), info.GetIsolate());
    TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
    V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(jsValue, exceptionState), exceptionState);
    imp->setUnsignedLongLongAttr(cppValue);
}
开发者ID:kublaj,项目名称:blink,代码行数:7,代码来源:V8TestTypedefs.cpp

示例2: attrWithGetterExceptionAttributeSetter

static void attrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
    ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithGetterException", "TestTypedefs", info.Holder(), info.GetIsolate());
    TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
    V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
    imp->setAttrWithGetterException(cppValue);
}
开发者ID:kublaj,项目名称:blink,代码行数:7,代码来源:V8TestTypedefs.cpp

示例3: domStringOrDoubleMethodMethod

static void domStringOrDoubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
    TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder());
    StringOrDouble result;
    impl->domStringOrDoubleMethod(result);
    v8SetReturnValue(info, result);
}
开发者ID:kingysu,项目名称:blink-crosswalk,代码行数:7,代码来源:V8TestTypedefs.cpp

示例4: testInterfaceOrTestInterfaceEmptyMethodMethod

static void testInterfaceOrTestInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
    TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder());
    TestInterfaceOrTestInterfaceEmpty result;
    impl->testInterfaceOrTestInterfaceEmptyMethod(result);
    v8SetReturnValue(info, result);
}
开发者ID:kingysu,项目名称:blink-crosswalk,代码行数:7,代码来源:V8TestTypedefs.cpp

示例5: stringAttrWithSetterExceptionAttributeSetter

static void stringAttrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
    ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttrWithSetterException", "TestTypedefs", info.Holder(), info.GetIsolate());
    TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
    V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
    imp->setStringAttrWithSetterException(cppValue, exceptionState);
    exceptionState.throwIfNeeded();
}
开发者ID:,项目名称:,代码行数:8,代码来源:

示例6: methodWithExceptionMethod

static void methodWithExceptionMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
    ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithException", "TestTypedefs", info.Holder(), info.GetIsolate());
    TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
    imp->methodWithException(exceptionState);
    if (exceptionState.throwIfNeeded())
        return;
}
开发者ID:,项目名称:,代码行数:8,代码来源:

示例7: uLongLongAttributeAttributeSetter

static void uLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
{
    v8::Handle<v8::Object> holder = info.Holder();
    ExceptionState exceptionState(ExceptionState::SetterContext, "uLongLongAttribute", "TestTypedefs", holder, info.GetIsolate());
    TestTypedefs* impl = V8TestTypedefs::toNative(holder);
    TONATIVE_VOID_EXCEPTIONSTATE(unsigned long long, cppValue, toUInt64(v8Value, exceptionState), exceptionState);
    impl->setULongLongAttribute(cppValue);
}
开发者ID:PDi-Communication-Systems-Inc,项目名称:lollipop_external_chromium_org,代码行数:8,代码来源:V8TestTypedefs.cpp

示例8: stringAttrWithGetterExceptionAttributeGetter

static void stringAttrWithGetterExceptionAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
    TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
    ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttrWithGetterException", "TestTypedefs", info.Holder(), info.GetIsolate());
    String jsValue = imp->stringAttrWithGetterException(exceptionState);
    if (UNLIKELY(exceptionState.throwIfNeeded()))
        return;
    v8SetReturnValueString(info, jsValue, info.GetIsolate());
}
开发者ID:,项目名称:,代码行数:9,代码来源:

示例9: methodWithSequenceArgMethod

static void methodWithSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
    if (UNLIKELY(info.Length() < 1)) {
        throwTypeError(ExceptionMessages::failedToExecute("methodWithSequenceArg", "TestTypedefs", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
        return;
    }
    TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
    V8TRYCATCH_VOID(Vector<RefPtr<SerializedScriptValue> >, sequenceArg, (toRefPtrNativeArray<SerializedScriptValue, V8SerializedScriptValue>(info[0], 1, info.GetIsolate())));
    v8SetReturnValue(info, static_cast<double>(imp->methodWithSequenceArg(sequenceArg)));
}
开发者ID:,项目名称:,代码行数:10,代码来源:

示例10: uLongLongAttributeAttributeSetter

static void uLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
    v8::Local<v8::Object> holder = info.Holder();
    ExceptionState exceptionState(ExceptionState::SetterContext, "uLongLongAttribute", "TestTypedefs", holder, info.GetIsolate());
    TestTypedefs* impl = V8TestTypedefs::toImpl(holder);
    unsigned long long cppValue = toUInt64(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
    if (exceptionState.throwIfNeeded())
        return;
    impl->setULongLongAttribute(cppValue);
}
开发者ID:kingysu,项目名称:blink-crosswalk,代码行数:10,代码来源:V8TestTypedefs.cpp

示例11: funcMethod

static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
    TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
    if (UNLIKELY(info.Length() <= 0)) {
        imp->func();
        return;
    }
    V8TRYCATCH_VOID(Vector<int>, x, toNativeArray<int>(info[0], 1, info.GetIsolate()));
    imp->func(x);
}
开发者ID:,项目名称:,代码行数:10,代码来源:

示例12: nullableArrayArgMethod

static void nullableArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
    if (UNLIKELY(info.Length() < 1)) {
        throwTypeError(ExceptionMessages::failedToExecute("nullableArrayArg", "TestTypedefs", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
        return;
    }
    TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
    bool arrayArgIsNull = info[0]->IsNull();
    V8TRYCATCH_VOID(Vector<String>, arrayArg, toNativeArray<String>(info[0], 1, info.GetIsolate()));
    imp->nullableArrayArg(arrayArgIsNull ? 0 : &arrayArg);
}
开发者ID:,项目名称:,代码行数:11,代码来源:

示例13: voidMethodTestCallbackInterfaceArgumentMethod

static void voidMethodTestCallbackInterfaceArgumentMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
    if (UNLIKELY(info.Length() < 1)) {
        throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestCallbackInterfaceArgument", "TestTypedefs", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
        return;
    }
    TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
    if (info.Length() <= 0 || !info[0]->IsFunction()) {
        throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestCallbackInterfaceArgument", "TestTypedefs", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
        return;
    }
    OwnPtr<TestCallbackInterface> testCallbackInterface = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
    imp->voidMethodTestCallbackInterfaceArgument(testCallbackInterface.release());
}
开发者ID:kublaj,项目名称:blink,代码行数:14,代码来源:V8TestTypedefs.cpp

示例14: voidMethodArrayOfLongsArgMethod

static void voidMethodArrayOfLongsArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
    TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder());
    Vector<int> arrayOfLongsArg;
    {
        v8::TryCatch block;
        V8RethrowTryCatchScope rethrow(block);
        if (UNLIKELY(info.Length() <= 0)) {
            impl->voidMethodArrayOfLongsArg();
            return;
        }
        TONATIVE_VOID_INTERNAL(arrayOfLongsArg, toNativeArray<int>(info[0], 1, info.GetIsolate()));
    }
    impl->voidMethodArrayOfLongsArg(arrayOfLongsArg);
}
开发者ID:PDi-Communication-Systems-Inc,项目名称:lollipop_external_chromium_org,代码行数:15,代码来源:V8TestTypedefs.cpp

示例15: stringArrayMethodStringArrayArgMethod

static void stringArrayMethodStringArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
    if (UNLIKELY(info.Length() < 1)) {
        throwMinimumArityTypeErrorForMethod("stringArrayMethodStringArrayArg", "TestTypedefs", 1, info.Length(), info.GetIsolate());
        return;
    }
    TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder());
    Vector<String> stringArrayArg;
    {
        v8::TryCatch block;
        V8RethrowTryCatchScope rethrow(block);
        TONATIVE_VOID_INTERNAL(stringArrayArg, toNativeArray<String>(info[0], 1, info.GetIsolate()));
    }
    v8SetReturnValue(info, v8Array(impl->stringArrayMethodStringArrayArg(stringArrayArg), info.Holder(), info.GetIsolate()));
}
开发者ID:PDi-Communication-Systems-Inc,项目名称:lollipop_external_chromium_org,代码行数:15,代码来源:V8TestTypedefs.cpp


注:本文中的TestTypedefs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。