#include <qsobject.h>
Lista de todos los miembros.
Métodos públicos |
| QSObject () |
| QSObject (const QSClass *c) |
| QSObject (const QSClass *c, QSShared *s) |
| QSObject (const QSObject &) |
QSObject & | operator= (const QSObject &) |
bool | operator== (const QSObject &a) const |
| ~QSObject () |
bool | isValid () const |
void | invalidate () |
bool | isDefined () const |
QString | typeName () const |
ValueType | valueType () const |
const QSClass * | objectType () const |
void | setType (QSClass *c) |
bool | isA (const QSClass *c) const |
bool | isA (const char *s) const |
bool | isObject () const |
bool | isNull () const |
bool | isUndefined () const |
bool | isNumber () const |
bool | isString () const |
bool | isBoolean () const |
bool | isFunction () const |
bool | isPrimitive () const |
bool | equals (const QSObject &other) const |
bool | strictEquals (const QSObject &other) const |
QSCompareResult | compareTo (const QSObject &other) const |
QSEnv * | env () const |
QSObject | toPrimitive (const QSClass *preferred=0) const |
bool | toBoolean () const |
double | toNumber () const |
QVariant | toVariant (QVariant::Type t) const |
double | round () const |
int | toInteger () const |
int | toInt32 () const |
unsigned int | toUInt32 () const |
unsigned short | toUInt16 () const |
QString | toString () const |
QSObject | getQualified (const QString &name) const |
QSObject | get (const QString &p) const |
bool | hasProperty (const QString &p) const |
void | put (const QString &p, const QSObject &v) |
bool | deleteProperty (const QString &p) |
void | put (const QString &p, double d) |
void | put (const QString &p, int i) |
void | put (const QString &p, unsigned int u) |
bool | isExecutable () const |
QSObject | executeCall (QSObject *thisV, const QSList *args) |
QSObject | execute (const QSList &args) |
QSObject | invoke (const QSMember &mem, const QSList &args) |
QSObject | fetchValue (const QSMember &mem) |
void | write (const QSMember &mem, const QSObject &val) |
void | mark () |
const QSClass * | resolveMember (const QString &name, QSMember *mem, const QSClass *owner=0, int *offset=0) const |
int | iVal () const |
void | setVal (int v) |
double | dVal () const |
void | setVal (double v) |
bool | bVal () const |
void | setVal (bool v) |
QString | sVal () const |
void | setVal (const QString &v) |
void * | oVal () const |
void | setVal (void *v) |
QSShared * | shVal () const |
void | setVal (QSShared *s) |
QString | debugString () const |
Atributos protegidos |
const QSClass * | clss |
Amigas |
class | QSStringClass |
class | QSEnv |
Documentación del constructor y destructor
QSObject::QSObject |
( |
const QSClass * |
c | ) |
|
QSObject::QSObject |
( |
const QSObject & |
o | ) |
|
Documentación de las funciones miembro
bool QSObject::bVal |
( |
| ) |
const [inline] |
QString QSObject::debugString |
( |
| ) |
const |
- Ver también:
- Imp::debugString
The internal [[Delete]] method. Removes the specified property from the object.
- Parámetros:
-
- Devuelve:
- True if the property was deleted successfully or didn't exist in the first place. False if the DontDelete attribute was set.
double QSObject::dVal |
( |
| ) |
const [inline] |
QSEnv * QSObject::env |
( |
| ) |
const |
Returns the environment this object belongs to.
Returns true if this object equals . In the case that this object does not know how to compare itself to other, other will try to compare itself to this.
Execute function implemented via the Function::execute() method.
Note: check availability via implementsCall() beforehand.
- Parámetros:
-
thisV | Object serving as the 'this' value. |
args | Pointer to the list of arguments or null. |
- Devuelve:
- Result of the function call.
The internal [[Get]] method.
- Devuelve:
- The value of property p.
The internal [[HasProperty]] method.
- Parámetros:
-
- Devuelve:
- Boolean value indicating whether the object already has a member with the given name p.
QSObject::invalidate |
( |
| ) |
[inline] |
Returns true if this object is valid i.e. has a type and data attached. Return false otherwise.
Invalidates this object.
- Ver también:
- isValid
Invoke member function mem on this object passing args as arguments. The 'this' value will point to this object during function execution.
bool QSObject::isA |
( |
const char * |
s | ) |
const |
Check whether object is of a certain type. Allows checking of host objects, too.
- Parámetros:
-
type | name (Number, Boolean etc.) |
Returns TRUE if this object is an instance of the type
; FALSE otherwise.
bool QSObject::isBoolean |
( |
| ) |
const |
Returns true if the object is a boolean
bool QSObject::isDefined |
( |
| ) |
const |
- Devuelve:
- True if this objects is of any other value than Undefined.
bool QSObject::isExecutable |
( |
| ) |
const |
bool QSObject::isFunction |
( |
| ) |
const |
Returns true if this object is a function object
bool QSObject::isNull |
( |
| ) |
const |
Returns true if the object is a null object
bool QSObject::isNumber |
( |
| ) |
const |
Returns true if the object is a number
bool QSObject::isObject |
( |
| ) |
const |
Returns true if the object is not a primitive
bool QSObject::isPrimitive |
( |
| ) |
const |
Returns true if the object is a primitive, either a bool, number or string
bool QSObject::isString |
( |
| ) |
const |
Returns true if the object is a string
bool QSObject::isUndefined |
( |
| ) |
const |
Returns true if the object is a undefined
bool QSObject::isValid |
( |
void |
| ) |
const [inline] |
int QSObject::iVal |
( |
| ) |
const [inline] |
const QSClass * QSObject::objectType |
( |
| ) |
const [inline] |
Return the object's most specific type
void* QSObject::oVal |
( |
| ) |
const [inline] |
void QSObject::put |
( |
const QString & |
p, |
|
|
double |
d |
|
) |
| |
Convenience function for adding a Number property constructed from a double value.
Convenience function for adding a Number property constructed from an integer value.
void QSObject::put |
( |
const QString & |
p, |
|
|
unsigned int |
u |
|
) |
| |
Convenience function for adding a Number property constructed from an unsigned integer value.
Tries to resolve a member named name. If it is found mem is initialized with the result and the class defining this member is returned. In case of a failed search, 0 is returned and the content of mem is undefined.
double QSObject::round |
( |
| ) |
const |
- Devuelve:
- Conversion to double. 0.0 if conversion failed.
void QSObject::setType |
( |
QSClass * |
c | ) |
|
void QSObject::setVal |
( |
bool |
v | ) |
[inline] |
void QSObject::setVal |
( |
int |
v | ) |
[inline] |
void QSObject::setVal |
( |
double |
v | ) |
[inline] |
void QSObject::setVal |
( |
void * |
v | ) |
[inline] |
void QSObject::setVal |
( |
const QString & |
v | ) |
[inline] |
void QSObject::setVal |
( |
QSShared * |
s | ) |
[inline] |
QSShared* QSObject::shVal |
( |
| ) |
const [inline] |
QString QSObject::sVal |
( |
| ) |
const [inline] |
bool QSObject::toBoolean |
( |
| ) |
const |
- Devuelve:
- Conversion to Boolean type.
int QSObject::toInt32 |
( |
| ) |
const |
- Devuelve:
- Conversion to signed integer value.
int QSObject::toInteger |
( |
| ) |
const |
- Devuelve:
- Conversion to Number type containing an integer value.
double QSObject::toNumber |
( |
| ) |
const |
- Devuelve:
- Conversion to Number type.
Examine the inheritance structure of this object.
- Parámetros:
-
- Devuelve:
- True if object is of type t or a derived from such a type.
-
Conversion to primitive type (Undefined, Boolean, Number or String)
- Parámetros:
-
preferred | Optional hint. Either StringType or NumberType. |
QString QSObject::toString |
( |
| ) |
const |
- Devuelve:
- Conversion to String type.
unsigned short QSObject::toUInt16 |
( |
| ) |
const |
- Devuelve:
- Conversion to unsigned short value.
unsigned int QSObject::toUInt32 |
( |
| ) |
const |
- Devuelve:
- Conversion to unsigned integer value.
Return this object's value converted to a QVariant. If this is not possible, or the object is invalid, an invalid QVariant will be returned. In case several conversion are possible t can be used to indicate the preferred type. Specifying QVariant::Invalid is good enough for most cases.
QString QSObject::typeName |
( |
| ) |
const |
- Devuelve:
- the type of the object. One of the Type enums.
Documentación de las funciones relacionadas y clases amigas
friend class QSEnv [friend] |
Documentación de los datos miembro
La documentación para esta clase fue generada a partir de los siguientes ficheros: