本文整理汇总了C++中Identifier::toUInt32方法的典型用法代码示例。如果您正苦于以下问题:C++ Identifier::toUInt32方法的具体用法?C++ Identifier::toUInt32怎么用?C++ Identifier::toUInt32使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Identifier
的用法示例。
在下文中一共展示了Identifier::toUInt32方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getOwnPropertySlot
bool JSCSSValueList::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
const HashEntry* entry = JSCSSValueListTable.entry(exec, propertyName);
if (entry) {
slot.setStaticEntry(this, entry, staticValueGetter<JSCSSValueList>);
return true;
}
bool ok;
unsigned index = propertyName.toUInt32(&ok, false);
if (ok && index < static_cast<CSSValueList*>(impl())->length()) {
slot.setCustomIndex(this, index, indexGetter);
return true;
}
return getStaticValueSlot<JSCSSValueList, Base>(exec, &JSCSSValueListTable, this, propertyName, slot);
}
示例2: getOwnPropertySlot
bool JSMediaList::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
const HashEntry* entry = Lookup::findEntry(&JSMediaListTable, propertyName);
if (entry) {
slot.setStaticEntry(this, entry, staticValueGetter<JSMediaList>);
return true;
}
bool ok;
unsigned index = propertyName.toUInt32(&ok, false);
if (ok && index < static_cast<MediaList*>(impl())->length()) {
slot.setCustomIndex(this, index, indexGetter);
return true;
}
return KJS::DOMObject::getOwnPropertySlot(exec, propertyName, slot);
}
示例3: getOwnPropertySlot
bool JSMediaList::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
const HashEntry* entry = JSMediaListTable.entry(exec, propertyName);
if (entry) {
slot.setCustom(this, entry->propertyGetter());
return true;
}
bool ok;
unsigned index = propertyName.toUInt32(ok);
if (ok) {
slot.setCustomIndex(this, index, indexGetter);
return true;
}
return getStaticValueSlot<JSMediaList, Base>(exec, &JSMediaListTable, this, propertyName, slot);
}
示例4: getOwnPropertySlot
bool JSHTMLSelectElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
const HashEntry* entry = JSHTMLSelectElementTable.entry(exec, propertyName);
if (entry) {
slot.setCustom(this, entry->propertyGetter());
return true;
}
bool ok;
unsigned index = propertyName.toUInt32(ok);
if (ok && index < static_cast<HTMLSelectElement*>(impl())->length()) {
slot.setCustomIndex(this, index, indexGetter);
return true;
}
return getStaticValueSlot<JSHTMLSelectElement, Base>(exec, &JSHTMLSelectElementTable, this, propertyName, slot);
}
示例5: getOwnPropertySlot
bool JSTouchList::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
ASSERT_GC_OBJECT_INHERITS(this, &s_info);
const HashEntry* entry = JSTouchListTable.entry(exec, propertyName);
if (entry) {
slot.setCustom(this, entry->propertyGetter());
return true;
}
bool ok;
unsigned index = propertyName.toUInt32(ok);
if (ok && index < static_cast<TouchList*>(impl())->length()) {
slot.setCustomIndex(this, index, indexGetter);
return true;
}
return getStaticValueSlot<JSTouchList, Base>(exec, &JSTouchListTable, this, propertyName, slot);
}
示例6: getStringPropertyDescriptor
bool JSString::getStringPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
{
if (propertyName == exec->propertyNames().length) {
descriptor.setDescriptor(jsNumber(m_length), DontEnum | DontDelete | ReadOnly);
return true;
}
bool isStrictUInt32;
unsigned i = propertyName.toUInt32(isStrictUInt32);
if (isStrictUInt32 && i < m_length) {
descriptor.setDescriptor(getIndex(exec, i), DontDelete | ReadOnly);
return true;
}
return false;
}
示例7: deleteProperty
bool ArrayInstanceImp::deleteProperty(ExecState *exec, const Identifier &propertyName)
{
if (propertyName == lengthPropertyName)
return false;
bool ok;
uint32_t index = propertyName.toUInt32(&ok);
if (ok) {
if (index >= length)
return true;
if (index < storageLength) {
storage[index] = 0;
return true;
}
}
return ObjectImp::deleteProperty(exec, propertyName);
}
示例8: getOwnPropertyDescriptor
bool JSEntryArray::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
{
const HashEntry* entry = JSEntryArrayTable.entry(exec, propertyName);
if (entry) {
PropertySlot slot;
slot.setCustom(this, entry->propertyGetter());
descriptor.setDescriptor(slot.getValue(exec, propertyName), entry->attributes());
return true;
}
bool ok;
unsigned index = propertyName.toUInt32(ok);
if (ok && index < static_cast<EntryArray*>(impl())->length()) {
PropertySlot slot;
slot.setCustomIndex(this, index, indexGetter);
descriptor.setDescriptor(slot.getValue(exec, propertyName), DontDelete | ReadOnly);
return true;
}
return getStaticValueDescriptor<JSEntryArray, Base>(exec, getJSEntryArrayTable(exec), this, propertyName, descriptor);
}
示例9: getOwnPropertySlot
bool JSCSSStyleDeclaration::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
const HashEntry* entry = JSCSSStyleDeclarationTable.entry(exec, propertyName);
if (entry) {
slot.setCustom(this, entry->propertyGetter());
return true;
}
bool ok;
unsigned index = propertyName.toUInt32(ok);
if (ok) {
slot.setCustomIndex(this, index, indexGetter);
return true;
}
if (canGetItemsForName(exec, static_cast<CSSStyleDeclaration*>(impl()), propertyName)) {
slot.setCustom(this, nameGetter);
return true;
}
return getStaticValueSlot<JSCSSStyleDeclaration, Base>(exec, &JSCSSStyleDeclarationTable, this, propertyName, slot);
}
示例10: getOwnPropertySlot
bool JSCSSStyleDeclaration::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
const HashEntry* entry = Lookup::findEntry(&JSCSSStyleDeclarationTable, propertyName);
if (entry) {
slot.setStaticEntry(this, entry, staticValueGetter<JSCSSStyleDeclaration>);
return true;
}
bool ok;
unsigned index = propertyName.toUInt32(&ok, false);
if (ok && index < static_cast<CSSStyleDeclaration*>(impl())->length()) {
slot.setCustomIndex(this, index, indexGetter);
return true;
}
if (canGetItemsForName(exec, static_cast<CSSStyleDeclaration*>(impl()), propertyName)) {
slot.setCustom(this, nameGetter);
return true;
}
return KJS::DOMObject::getOwnPropertySlot(exec, propertyName, slot);
}
示例11: getOwnPropertySlot
bool JSHTMLFormElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
if (canGetItemsForName(exec, static_cast<HTMLFormElement*>(impl()), propertyName)) {
slot.setCustom(this, nameGetter);
return true;
}
const HashEntry* entry = Lookup::findEntry(&JSHTMLFormElementTable, propertyName);
if (entry) {
slot.setStaticEntry(this, entry, staticValueGetter<JSHTMLFormElement>);
return true;
}
bool ok;
unsigned index = propertyName.toUInt32(&ok, false);
if (ok && index < static_cast<HTMLFormElement*>(impl())->length()) {
slot.setCustomIndex(this, index, indexGetter);
return true;
}
return JSHTMLElement::getOwnPropertySlot(exec, propertyName, slot);
}
示例12: getOwnPropertyDescriptor
bool JSTouchList::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
{
ASSERT_GC_OBJECT_INHERITS(this, &s_info);
const HashEntry* entry = JSTouchListTable.entry(exec, propertyName);
if (entry) {
PropertySlot slot;
slot.setCustom(this, entry->propertyGetter());
descriptor.setDescriptor(slot.getValue(exec, propertyName), entry->attributes());
return true;
}
bool ok;
unsigned index = propertyName.toUInt32(ok);
if (ok && index < static_cast<TouchList*>(impl())->length()) {
PropertySlot slot;
slot.setCustomIndex(this, index, indexGetter);
descriptor.setDescriptor(slot.getValue(exec, propertyName), DontDelete | ReadOnly);
return true;
}
return getStaticValueDescriptor<JSTouchList, Base>(exec, &JSTouchListTable, this, propertyName, descriptor);
}
示例13: getOwnPropertySlot
bool JSNamedNodeMap::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
JSValue proto = prototype();
if (proto.isObject() && static_cast<JSObject*>(asObject(proto))->hasProperty(exec, propertyName))
return false;
const HashEntry* entry = JSNamedNodeMapTable.entry(exec, propertyName);
if (entry) {
slot.setCustom(this, entry->propertyGetter());
return true;
}
bool ok;
unsigned index = propertyName.toUInt32(ok);
if (ok && index < static_cast<NamedNodeMap*>(impl())->length()) {
slot.setCustomIndex(this, index, indexGetter);
return true;
}
if (canGetItemsForName(exec, static_cast<NamedNodeMap*>(impl()), propertyName)) {
slot.setCustom(this, nameGetter);
return true;
}
return getStaticValueSlot<JSNamedNodeMap, Base>(exec, &JSNamedNodeMapTable, this, propertyName, slot);
}