QScriptString Class ReferenceThe QScriptString class acts as a handle to "interned" strings in a QScriptEngine. Далее... #include <QScriptString> Этот класс был введён в Qt 4.4. Открытые функции
Подробное описаниеThe QScriptString class acts as a handle to "interned" strings in a QScriptEngine. QScriptString can be used to achieve faster (repeated) property getting/setting, and comparison of property names, of script objects. To get a QScriptString representation of a string, pass the string to QScriptEngine::toStringHandle(). The typical usage pattern is to register one or more pre-defined strings when setting up your script environment, then subsequently use the relevant QScriptString as argument to e.g. QScriptValue::property(). Call the toString() function to obtain the string that a QScriptString represents. Call the toArrayIndex() function to convert a QScriptString to an array index. This is useful when using QScriptClass to implement array-like objects. Описание функций-членовQScriptString::QScriptString ()Constructs an invalid QScriptString. QScriptString::QScriptString ( const QScriptString & other )Constructs a new QScriptString that is a copy of other. QScriptString::~QScriptString ()Destroys this QScriptString. bool QScriptString::isValid () constReturns true if this QScriptString is valid; otherwise returns false. quint32 QScriptString::toArrayIndex ( bool * ok = 0 ) constAttempts to convert this QScriptString to a QtScript array index, and returns the result. Если во время преобразования возникает ошибка, то *ok устанавливается в false; в противном случае *ok будет установлен в true. Эта функция была введена в Qt 4.6. QString QScriptString::toString () constReturns the string that this QScriptString represents, or a null string if this QScriptString is not valid. Смотрите также isValid(). QScriptString::operator QString () constReturns the string that this QScriptString represents, or a null string if this QScriptString is not valid. Смотрите также toString(). bool QScriptString::operator!= ( const QScriptString & other ) constReturns true if this QScriptString is not equal to other; otherwise returns false. QScriptString & QScriptString::operator= ( const QScriptString & other )Assigns the other value to this QScriptString. bool QScriptString::operator== ( const QScriptString & other ) constReturns true if this QScriptString is equal to other; otherwise returns false. |
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |