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


C++ Identifier::toStrictUInt32方法代码示例

本文整理汇总了C++中Identifier::toStrictUInt32方法的典型用法代码示例。如果您正苦于以下问题:C++ Identifier::toStrictUInt32方法的具体用法?C++ Identifier::toStrictUInt32怎么用?C++ Identifier::toStrictUInt32使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Identifier的用法示例。


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

示例1: unMap

void IndexToNameMap::unMap(ExecState* exec, const Identifier& index)
{
    bool indexIsNumber;
    unsigned indexAsNumber = index.toStrictUInt32(&indexIsNumber);

    ASSERT(indexIsNumber && indexAsNumber < m_size);

    m_map[indexAsNumber] = exec->propertyNames().nullIdentifier;
}
开发者ID:acss,项目名称:owb-mirror,代码行数:9,代码来源:IndexToNameMap.cpp

示例2: unMap

void IndexToNameMap::unMap(const Identifier &index)
{
  bool indexIsNumber;
  int indexAsNumber = index.toStrictUInt32(&indexIsNumber);

  assert(indexIsNumber && indexAsNumber < _size);

  _map[indexAsNumber] = CommonIdentifiers::shared()->nullIdentifier;;
}
开发者ID:,项目名称:,代码行数:9,代码来源:

示例3: deleteProperty

bool StringObject::deleteProperty(ExecState* exec, const Identifier& propertyName)
{
    if (propertyName == exec->propertyNames().length)
        return false;
    bool isStrictUInt32;
    unsigned i = propertyName.toStrictUInt32(&isStrictUInt32);
    if (isStrictUInt32 && internalValue()->canGetIndex(i))
        return false;
    return JSObject::deleteProperty(exec, propertyName);
}
开发者ID:UIKit0,项目名称:WebkitAIR,代码行数:10,代码来源:StringObject.cpp

示例4: put

void ObjectPrototype::put(TiExcState* exec, const Identifier& propertyName, TiValue value, PutPropertySlot& slot)
{
    TiObject::put(exec, propertyName, value, slot);

    if (m_hasNoPropertiesWithUInt32Names) {
        bool isUInt32;
        propertyName.toStrictUInt32(&isUInt32);
        m_hasNoPropertiesWithUInt32Names = !isUInt32;
    }
}
开发者ID:rseagraves,项目名称:tijscore,代码行数:10,代码来源:ObjectPrototype.cpp

示例5: getStringPropertyAttributes

bool JSString::getStringPropertyAttributes(ExecState* exec, const Identifier& propertyName, unsigned& attributes) const
{
    if (propertyName == exec->propertyNames().length) {
        attributes = DontEnum | DontDelete | ReadOnly;
        return true;
    }
    bool isStrictUInt32;
    unsigned i = propertyName.toStrictUInt32(&isStrictUInt32);
    if (isStrictUInt32 && i < static_cast<unsigned>(m_value.size())) {
        attributes = DontDelete | ReadOnly;
        return true;
    }
    return false;
}
开发者ID:venkatarajasekhar,项目名称:ECE497,代码行数:14,代码来源:JSString.cpp

示例6: getStringPropertyDescriptor

bool JSString::getStringPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
{
    if (propertyName == exec->propertyNames().length) {
        descriptor.setDescriptor(jsNumber(exec, m_value.size()), DontEnum | DontDelete | ReadOnly);
        return true;
    }

    bool isStrictUInt32;
    unsigned i = propertyName.toStrictUInt32(&isStrictUInt32);
    if (isStrictUInt32 && i < static_cast<unsigned>(m_value.size())) {
        descriptor.setDescriptor(jsSingleCharacterSubstring(exec, m_value, i), DontDelete | ReadOnly);
        return true;
    }

    return false;
}
开发者ID:venkatarajasekhar,项目名称:ECE497,代码行数:16,代码来源:JSString.cpp

示例7: isMapped

bool IndexToNameMap::isMapped(const Identifier& index) const
{
    bool indexIsNumber;
    unsigned indexAsNumber = index.toStrictUInt32(&indexIsNumber);

    if (!indexIsNumber)
        return false;

    if (indexAsNumber >= m_size)
        return false;

    if (m_map[indexAsNumber].isNull())
        return false;

    return true;
}
开发者ID:acss,项目名称:owb-mirror,代码行数:16,代码来源:IndexToNameMap.cpp

示例8: getStringPropertyDescriptor

bool JSString::getStringPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
{
    if (propertyName == exec->propertyNames().length) {
        descriptor.setDescriptor(jsNumber(exec, m_length), DontEnum | DontDelete | ReadOnly);
        return true;
    }
    
    bool isStrictUInt32;
    unsigned i = propertyName.toStrictUInt32(&isStrictUInt32);
    if (isStrictUInt32 && i < m_length) {
        descriptor.setDescriptor(getIndex(exec, i), DontDelete | ReadOnly);
        return true;
    }
    
    return false;
}
开发者ID:galexcode,项目名称:JavaScriptCore-iOS,代码行数:16,代码来源:JSString.cpp


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