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


C++ putDirect函数代码示例

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


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

示例1: DOMConstructorWithDocument

JSAudioConstructor::JSAudioConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
    : DOMConstructorWithDocument(JSAudioConstructor::createStructure(globalObject->objectPrototype()), globalObject)
{
    putDirect(exec->propertyNames().prototype, JSHTMLAudioElementPrototype::self(exec, globalObject), None);
    putDirect(exec->propertyNames().length, jsNumber(exec, 1), ReadOnly | DontDelete | DontEnum);
}
开发者ID:Treeeater,项目名称:Chromium_on_windows,代码行数:6,代码来源:JSAudioConstructor.cpp

示例2: DOMConstructorObject

JSSVGPathSegClosePathConstructor::JSSVGPathSegClosePathConstructor(ExecState* exec, Structure* structure, JSDOMGlobalObject* globalObject)
    : DOMConstructorObject(structure, globalObject)
{
    ASSERT(inherits(&s_info));
    putDirect(exec->globalData(), exec->propertyNames().prototype, JSSVGPathSegClosePathPrototype::self(exec, globalObject), DontDelete | ReadOnly);
}
开发者ID:13W,项目名称:phantomjs,代码行数:6,代码来源:JSSVGPathSegClosePath.cpp

示例3: ASSERT

void JSMessagePortConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
{
    Base::finishCreation(exec->globalData());
    ASSERT(inherits(&s_info));
    putDirect(exec->globalData(), exec->propertyNames().prototype, JSMessagePortPrototype::self(exec, globalObject), DontDelete | ReadOnly);
}
开发者ID:Xertz,项目名称:EAWebKit,代码行数:6,代码来源:JSMessagePort.cpp

示例4: JSCSSCharsetRuleConstructor

 JSCSSCharsetRuleConstructor(ExecState* exec)
 {
     setPrototype(exec->lexicalInterpreter()->builtinObjectPrototype());
     putDirect(exec->propertyNames().prototype, JSCSSCharsetRulePrototype::self(exec), None);
 }
开发者ID:pk-codebox-evo,项目名称:remixos-usb-tool,代码行数:5,代码来源:JSCSSCharsetRule.cpp

示例5: JSXMLHttpRequestProgressEventConstructor

 JSXMLHttpRequestProgressEventConstructor(ExecState* exec)
     : DOMObject(exec->lexicalGlobalObject()->objectPrototype())
 {
     putDirect(exec->propertyNames().prototype, JSXMLHttpRequestProgressEventPrototype::self(exec), None);
 }
开发者ID:Gin-Rye,项目名称:duibrowser,代码行数:5,代码来源:JSXMLHttpRequestProgressEvent.cpp

示例6: JSHTMLTableColElementConstructor

 JSHTMLTableColElementConstructor(ExecState* exec)
 {
     setPrototype(exec->lexicalInterpreter()->builtinObjectPrototype());
     putDirect(exec->propertyNames().prototype, JSHTMLTableColElementPrototype::self(exec), None);
 }
开发者ID:Crawping,项目名称:davinci,代码行数:5,代码来源:JSHTMLTableColElement.cpp

示例7: putDescriptor


//.........这里部分代码省略.........

    if (current.equalTo(descriptor))
        return true;

    // Filter out invalid changes
    if (!current.configurable()) {
        if (descriptor.configurable()) {
            if (throwException)
                throwError(exec, TypeError, "Attempting to configurable attribute of unconfigurable property.");
            return false;
        }
        if (descriptor.enumerablePresent() && descriptor.enumerable() != current.enumerable()) {
            if (throwException)
                throwError(exec, TypeError, "Attempting to change enumerable attribute of unconfigurable property.");
            return false;
        }
    }

    // A generic descriptor is simply changing the attributes of an existing property
    if (descriptor.isGenericDescriptor()) {
        if (!current.attributesEqual(descriptor)) {
            deleteProperty(exec, propertyName);
            putDescriptor(exec, this, propertyName, descriptor, current.attributesWithOverride(descriptor), current.value());
        }
        return true;
    }

    // Changing between a normal property or an accessor property
    if (descriptor.isDataDescriptor() != current.isDataDescriptor()) {
        if (!current.configurable()) {
            if (throwException)
                throwError(exec, TypeError, "Attempting to change access mechanism for an unconfigurable property.");
            return false;
        }
        deleteProperty(exec, propertyName);
        return putDescriptor(exec, this, propertyName, descriptor, current.attributesWithOverride(descriptor), current.value() ? current.value() : jsUndefined());
    }

    // Changing the value and attributes of an existing property
    if (descriptor.isDataDescriptor()) {
        if (!current.configurable()) {
            if (!current.writable() && descriptor.writable()) {
                if (throwException)
                    throwError(exec, TypeError, "Attempting to change writable attribute of unconfigurable property.");
                return false;
            }
            if (!current.writable()) {
                if (descriptor.value() || !TiValue::strictEqual(current.value(), descriptor.value())) {
                    if (throwException)
                        throwError(exec, TypeError, "Attempting to change value of a readonly property.");
                    return false;
                }
            }
        } else if (current.attributesEqual(descriptor)) {
            if (!descriptor.value())
                return true;
            PutPropertySlot slot;
            put(exec, propertyName, descriptor.value(), slot);
            if (exec->hadException())
                return false;
            return true;
        }
        deleteProperty(exec, propertyName);
        return putDescriptor(exec, this, propertyName, descriptor, current.attributesWithOverride(descriptor), current.value());
    }

    // Changing the accessor functions of an existing accessor property
    ASSERT(descriptor.isAccessorDescriptor());
    if (!current.configurable()) {
        if (descriptor.setterPresent() && !(current.setter() && TiValue::strictEqual(current.setter(), descriptor.setter()))) {
            if (throwException)
                throwError(exec, TypeError, "Attempting to change the setter of an unconfigurable property.");
            return false;
        }
        if (descriptor.getterPresent() && !(current.getter() && TiValue::strictEqual(current.getter(), descriptor.getter()))) {
            if (throwException)
                throwError(exec, TypeError, "Attempting to change the getter of an unconfigurable property.");
            return false;
        }
    }
    TiValue accessor = getDirect(propertyName);
    if (!accessor)
        return false;
    GetterSetter* getterSetter = asGetterSetter(accessor);
    if (current.attributesEqual(descriptor)) {
        if (descriptor.setter())
            getterSetter->setSetter(asObject(descriptor.setter()));
        if (descriptor.getter())
            getterSetter->setGetter(asObject(descriptor.getter()));
        return true;
    }
    deleteProperty(exec, propertyName);
    unsigned attrs = current.attributesWithOverride(descriptor);
    if (descriptor.setter())
        attrs |= Setter;
    if (descriptor.getter())
        attrs |= Getter;
    putDirect(propertyName, getterSetter, attrs);
    return true;
}
开发者ID:rseagraves,项目名称:tijscore,代码行数:101,代码来源:TiObject.cpp

示例8: DOMObject

JSWebKitCSSMatrixConstructor::JSWebKitCSSMatrixConstructor(ExecState* exec)
    : DOMObject(JSWebKitCSSMatrixConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype()))
{
    putDirect(exec->propertyNames().prototype, JSWebKitCSSMatrixPrototype::self(exec, exec->lexicalGlobalObject()), None);
    putDirect(exec->propertyNames().length, jsNumber(exec, 1), ReadOnly|DontDelete|DontEnum);
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:6,代码来源:JSWebKitCSSMatrixConstructor.cpp

示例9: JSCharacterDataConstructor

 JSCharacterDataConstructor(ExecState* exec)
     : DOMObject(exec->lexicalGlobalObject()->objectPrototype())
 {
     putDirect(exec->propertyNames().prototype, JSCharacterDataPrototype::self(exec), None);
 }
开发者ID:Gin-Rye,项目名称:duibrowser,代码行数:5,代码来源:JSCharacterData.cpp

示例10: JSCSSVariablesRuleConstructor

 JSCSSVariablesRuleConstructor(ExecState* exec)
     : DOMObject(exec->lexicalGlobalObject()->objectPrototype())
 {
     putDirect(exec->propertyNames().prototype, JSCSSVariablesRulePrototype::self(exec), None);
 }
开发者ID:Chingliu,项目名称:EAWebkit,代码行数:5,代码来源:JSCSSVariablesRule.cpp

示例11: DOMObject

JSAudioConstructor::JSAudioConstructor(ExecState* exec, Document* document)
    : DOMObject(exec->lexicalGlobalObject()->objectPrototype())
    , m_document(document)
{
    putDirect(exec->propertyNames().length, jsNumber(exec, 1), ReadOnly|DontDelete|DontEnum);
}
开发者ID:Gin-Rye,项目名称:duibrowser,代码行数:6,代码来源:JSAudioConstructor.cpp

示例12: JSObject

InternalFunction::InternalFunction(JSGlobalData* globalData, NonNullPassRefPtr<Structure> structure, const Identifier& name)
    : JSObject(structure)
{
    putDirect(globalData->propertyNames->name, jsString(globalData, name.ustring()), DontDelete | ReadOnly | DontEnum);
}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:5,代码来源:InternalFunction.cpp

示例13: putDirect

template<> void JSImageConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
{
    putDirect(vm, vm.propertyNames->prototype, JSHTMLImageElement::prototype(vm, &globalObject), None);
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:4,代码来源:JSImageConstructor.cpp

示例14: putDirect

void JSDollarVMPrototype::addFunction(VM& vm, JSGlobalObject* globalObject, const char* name, NativeFunction function, unsigned arguments)
{
    Identifier identifier = Identifier::fromString(&vm, name);
    putDirect(vm, identifier, JSFunction::create(vm, globalObject, arguments, identifier.string(), function));
}
开发者ID:mjparme,项目名称:openjdk-jfx,代码行数:5,代码来源:JSDollarVMPrototype.cpp

示例15: JSProcessingInstructionConstructor

 JSProcessingInstructionConstructor(ExecState* exec)
     : DOMObject(exec->lexicalGlobalObject()->objectPrototype())
 {
     putDirect(exec->propertyNames().prototype, JSProcessingInstructionPrototype::self(exec), None);
 }
开发者ID:Gin-Rye,项目名称:duibrowser,代码行数:5,代码来源:JSProcessingInstruction.cpp


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