void StringObject::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) { int size = internalValue()->value().size(); for (int i = 0; i < size; i++) propertyNames.add(Identifier(exec, UString::from(i))); return JSObject::getPropertyNames(exec, propertyNames); }
void StringObject::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, bool includeNonEnumerable) { int size = internalValue()->value().size(); for (int i = 0; i < size; ++i) propertyNames.add(Identifier(exec, UString::from(i))); return JSObject::getOwnPropertyNames(exec, propertyNames); }
void StringObject::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode) { int size = internalValue()->length(); for (int i = 0; i < size; ++i) propertyNames.add(Identifier(exec, UString::from(i))); if (mode == IncludeDontEnumProperties) propertyNames.add(exec->propertyNames().length); return JSObject::getOwnPropertyNames(exec, propertyNames, mode); }
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); }
void ZLWin32ApplicationWindow::TextEditParameter::setValueList(const std::vector<std::string> &values) { std::string oldValue = internalValue(); if (myParameterItem.type() == ZLToolbar::Item::TEXT_FIELD) { return; } SendMessage(myComboBox, CB_RESETCONTENT, 0, 0); ZLUnicodeUtil::Ucs2String buffer; for (std::vector<std::string>::const_iterator it = values.begin(); it != values.end(); ++it) { SendMessage(myComboBox, CB_ADDSTRING, 0, (LPARAM)::wchar(::createNTWCHARString(buffer, *it))); } if (values.size() > 0) { SendMessage(myComboBox, CB_SETMINVISIBLE, std::min((int)values.size(), 7), 0); } internalSetValue(oldValue); }
bool StringObject::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) { if (internalValue()->getStringPropertyDescriptor(exec, propertyName, descriptor)) return true; return JSObject::getOwnPropertyDescriptor(exec, propertyName, descriptor); }
bool StringObject::getOwnPropertySlot(ExecState* exec, unsigned propertyName, PropertySlot& slot) { if (internalValue()->getStringPropertySlot(exec, propertyName, slot)) return true; return JSObject::getOwnPropertySlot(exec, Identifier::from(exec, propertyName), slot); }
bool StringObject::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { if (internalValue()->getStringPropertySlot(exec, propertyName, slot)) return true; return JSObject::getOwnPropertySlot(exec, propertyName, slot); }
JSString* StringObject::toThisJSString(ExecState*) { return internalValue(); }
UString StringObject::toThisString(ExecState*) const { return internalValue()->value(); }
virtual boost::units::quantity<InternalUnit, NumericType> toInternalValue(NumericType value) const { boost::units::quantity<InternalUnit, NumericType> internalValue(value * Unit()); return internalValue; }
const std::string &ZLApplicationWindow::VisualParameter::value() const { myValue = internalValue(); return myValue; }
JSValue* NumberObject::getJSNumber() { return internalValue(); }