Qyoto  4.0.5
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Properties
QtScript.QScriptString Class Reference

The QScriptString class acts as a handle to "interned" strings in a QScriptEngine. More...

Inheritance diagram for QtScript.QScriptString:
Collaboration diagram for QtScript.QScriptString:

Public Member Functions

override bool Equals (object o)
 
override int GetHashCode ()
 
 QScriptString ()
 
 
 QScriptString (QScriptString other)
 
 
virtual void CreateProxy ()
 
new bool IsValid ()
 
 
new uint ToArrayIndex ()
 
 
new uint ToArrayIndex (ref bool ok)
 
 
override string ToString ()
 
 
new void Dispose ()
 

Static Public Member Functions

static operator System.String (QScriptString arg1)
 
 
static bool operator!= (QScriptString arg1, QScriptString arg2)
 
 
static bool operator== (QScriptString arg1, QScriptString arg2)
 
 

Protected Member Functions

 QScriptString (System.Type dummy)
 

Protected Attributes

SmokeInvocation interceptor
 

Properties

virtual System.IntPtr SmokeObject [get, set]
 

Detailed Description

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.

Constructor & Destructor Documentation

QtScript.QScriptString.QScriptString ( System.Type  dummy)
protected
QtScript.QScriptString.QScriptString ( )

Constructs an invalid QScriptString.

QtScript.QScriptString.QScriptString ( QScriptString  other)

Constructs a new QScriptString that is a copy of other.

Member Function Documentation

virtual void QtScript.QScriptString.CreateProxy ( )
virtual
new void QtScript.QScriptString.Dispose ( )
override bool QtScript.QScriptString.Equals ( object  o)
override int QtScript.QScriptString.GetHashCode ( )
new bool QtScript.QScriptString.IsValid ( )

Returns true if this QScriptString is valid; otherwise returns false.

static QtScript.QScriptString.operator System.String ( QScriptString  arg1)
explicitstatic

Returns the string that this QScriptString represents, or a null string if this QScriptString is not valid.

See also toString().

static bool QtScript.QScriptString.operator!= ( QScriptString  arg1,
QScriptString  arg2 
)
static

Returns true if this QScriptString is not equal to other; otherwise returns false.

static bool QtScript.QScriptString.operator== ( QScriptString  arg1,
QScriptString  arg2 
)
static

Returns true if this QScriptString is equal to other; otherwise returns false.

new uint QtScript.QScriptString.ToArrayIndex ( )

Attempts to convert this QScriptString to a QtScript array index, and returns the result.

If a conversion error occurs, *ok is set to false; otherwise *ok is set to true.

This function was introduced in Qt 4.6.

new uint QtScript.QScriptString.ToArrayIndex ( ref bool  ok)

Attempts to convert this QScriptString to a QtScript array index, and returns the result.

If a conversion error occurs, *ok is set to false; otherwise *ok is set to true.

This function was introduced in Qt 4.6.

override string QtScript.QScriptString.ToString ( )

Returns the string that this QScriptString represents, or a null string if this QScriptString is not valid.

See also isValid().

Member Data Documentation

SmokeInvocation QtScript.QScriptString.interceptor
protected

Property Documentation

virtual System.IntPtr QtScript.QScriptString.SmokeObject
getset