Eneboo - Documentación para desarrolladores
|
#include <qsclass.h>
Métodos públicos | |
QSClass (QSEnv *e, int a=AttributeNone) | |
QSClass (QSClass *b, int a=AttributeNone) | |
virtual | ~QSClass () |
virtual void | clear () |
QSEnv * | env () const |
QSClass * | base () const |
void | setBase (QSClass *base) |
virtual QString | name () const =0 |
virtual QString | identifier () const |
QSClassClass * | asClass () const |
bool | inherits (const QSClass *c) const |
QSClass * | enclosingClass () const |
void | setEnclosingClass (QSClass *cl) |
bool | isFinal () const |
bool | isExecutable () const |
bool | isAbstract () const |
virtual QSCompareResult | compare (const QSObject &a, const QSObject &b) const |
virtual void | ref (QSObject *o) const |
virtual void | deref (QSObject *o) const |
virtual void | mark (QSObject *o) const |
virtual bool | toBoolean (const QSObject *obj) const |
virtual double | toNumber (const QSObject *obj) const |
virtual QString | toString (const QSObject *obj) const |
virtual QSObject | toPrimitive (const QSObject *obj, const QSClass *preferred=0) const |
virtual QVariant | toVariant (const QSObject *obj, QVariant::Type pref) const |
virtual QString | debugString (const QSObject *obj) const |
virtual bool | deleteProperty (QSObject *obj, const QSMember &mem) const |
virtual bool | member (const QSObject *o, const QString &n, QSMember *m) const |
virtual QSObject | fetchValue (const QSObject *objPtr, const QSMember &mem) const |
virtual void | write (QSObject *objPtr, const QSMember &mem, const QSObject &val) const |
void | write (QSObject *objPtr, int index, const QSObject &val) const |
void | addFunctionMember (const QString &n, QSFunctionBodyNode *f, int attributes) |
int | addVariableMember (const QString &n, int attributes) |
void | addStaticVariableMember (const QString &n, const QSObject &v, int attr) |
void | addMember (const QString &n, const QSMember &m) |
virtual void | addMember (const QString &n, const QSMember &m, const QSObject &stVal) |
void | replaceMember (const QString &n, QSMember *m) |
void | setNumVariables (int count) |
int | numVariables () const |
int | numStaticVariables () const |
virtual QSObject | execute (const QSObject *o, QSObject *thisValue, const QSList &args) const |
virtual QSMemberMap * | definedMembers () const |
void | setStaticMember (int idx, const QSObject &val) |
QSObject | staticMember (int idx) const |
int | attributes () const |
virtual ValueType | valueType () const |
virtual void | finalize () |
. If deletion was not possible, FALSE | |
Deletes the member under name is returned | |
bool | hasProperty (const QSObject *obj, const QString &prop) const |
QSObject | get (const QSObject *obj, const QString &prop) const |
void | put (QSObject *obj, const QString &prop, const QSObject &v) const |
virtual bool | deleteMember (const QString &n) |
virtual QSObject | construct (const QSList &args) const |
virtual QSObject | cast (const QSList &args) const |
virtual QSMemberMap | members (const QSObject *obj) const |
void | throwError (ErrorType e, const QString &msg) const |
QSObject | createString (const QString &s) const |
QSObject | createNumber (double d) const |
QSObject | createBoolean (bool b) const |
QSObject | createUndefined () const |
QSObject | createNull () const |
with \member. \stVal can contain the value if the | |
Replaces the member member is a static variable. | |
virtual void | replaceMember (const QString &n, QSMember *m, const QSObject &stVal) |
Métodos protegidos | |
virtual QSEqualsResult | isEqual (const QSObject &a, const QSObject &b) const |
virtual QSEqualsResult | isStrictEqual (const QSObject &a, const QSObject &b) const |
virtual QSObject | invoke (QSObject *objPtr, const QSMember &mem) const |
Amigas | |
class | QSObject |
Abstract base class for all objects.
QSClass::~QSClass | ( | ) | [virtual] |
void QSClass::addFunctionMember | ( | const QString & | n, |
QSFunctionBodyNode * | f, | ||
int | attributes | ||
) |
void QSClass::addMember | ( | const QString & | n, |
const QSMember & | member, | ||
const QSObject & | stVal | ||
) | [virtual] |
Add member member with name n to this class. contains the value if the member is a static variable.
QSClassClass * QSClass::asClass | ( | ) | const |
int QSClass::attributes | ( | ) | const [inline] |
QSClass* QSClass::base | ( | ) | const [inline] |
Reimplementado en QSArrayClass, QSObjectClass, QSBooleanClass, QSNumberClass, QSStringClass, QSDateClass, QSErrorClass, QSFuncRefClass, QSRegExpClass y QSObjectConstructor.
void QSClass::clear | ( | void | ) | [virtual] |
Reimplementado en QSFunctionScopeClass.
QSCompareResult QSClass::compare | ( | const QSObject & | a, |
const QSObject & | b | ||
) | const [virtual] |
Reimplementado en QSArrayClass, QSObjectClass, QSBooleanClass, QSNumberClass, QSStringClass, QSClassClass, QSFunctionScopeClass, QSEvalScopeClass, QSDateClass, QSErrorClass, QSFuncRefClass, QSRegExpClass, QSByteArrayClass, QSColorClass, QSPaletteClass, QSColorGroupClass, QSPointClass, QSSizeClass, QSRectClass, QSFontClass, QSObjectConstructor, QSVariantClass y QSPixmapClass.
QSObject QSClass::createNull | ( | ) | const |
QSObject QSClass::createNumber | ( | double | d | ) | const |
QSObject QSClass::createUndefined | ( | ) | const |
Reimplementado en QSByteArrayClass, QSColorClass, QSPointClass, QSSizeClass, QSRectClass, QSFontClass, QSWrapperClass, QSPointerClass, QSVariantClass y QSPixmapClass.
virtual QSMemberMap* QSClass::definedMembers | ( | ) | const [inline, virtual] |
Reimplementado en QSWritableClass.
void QSClass::deref | ( | QSObject * | o | ) | const [virtual] |
Reimplementado en QSStringClass, QSSharedClass y QSWrapperClass.
QSClass* QSClass::enclosingClass | ( | ) | const [inline] |
QSEnv* QSClass::env | ( | ) | const [inline] |
QSObject QSClass::execute | ( | const QSObject * | o, |
QSObject * | thisValue, | ||
const QSList & | args | ||
) | const [virtual] |
Reimplementado en QSStringClass, QSWritableClass, QSTypeClass, QSRegExpClass, QSByteArrayClass, QSColorClass, QSPaletteClass, QSColorGroupClass, QSPointClass, QSSizeClass, QSRectClass, QSFontClass, QSWrapperClass, QSFactoryObjectProxy, QSObjectConstructor, QSVariantClass, QSApplicationClass y QSPixmapClass.
void QSClass::finalize | ( | void | ) | [virtual] |
Reimplementado en QSFactoryObjectProxy.
virtual QString QSClass::identifier | ( | ) | const [inline, virtual] |
Reimplementado en QSClassClass, QSFunctionScopeClass, QSAbstractBaseClass y QSObjectConstructor.
Returns TRUE if this class is a subclass of ; FALSE otherwise. A class is defined to be a subclass of itself.
Reimplementado en QSWritableClass, QSTypeClass, QSFuncRefClass, QSWrapperClass, QSFactoryObjectProxy y QSVariantClass.
bool QSClass::isAbstract | ( | ) | const [inline] |
QSEqualsResult QSClass::isEqual | ( | const QSObject & | a, |
const QSObject & | b | ||
) | const [protected, virtual] |
Checks if the two objects are equal. Returns positive if equal, 0 if not equal and negative if the class is unable to determine.
Reimplementado en QSUndefinedClass, QSNullClass, QSBooleanClass, QSNumberClass, QSStringClass, QSClassClass, QSWritableClass, QSTypeClass, QSDateClass, QSFuncRefClass, QSPointClass, QSRectClass y QSWrapperClass.
bool QSClass::isExecutable | ( | ) | const [inline] |
bool QSClass::isFinal | ( | ) | const [inline] |
QSEqualsResult QSClass::isStrictEqual | ( | const QSObject & | a, |
const QSObject & | b | ||
) | const [protected, virtual] |
Checks if two objects are strictly equal, meaning that they are exactly the same object.
void QSClass::mark | ( | QSObject * | o | ) | const [virtual] |
Mark o and its sub-properties as referenced. This is used for the mark & sweep garbage collection.
The default implementation does nothing but you should reimplement this function if objects of this class contain other objects or references to them.
Reimplementado en QSWritableClass.
Retrieves a pointer to the class member n; 0 if no such member exists.
Reimplementado en QSWritableClass, QSTypeClass, QSWrapperClass, QSFactoryObjectProxy, QSObjectConstructor, QSVariantClass y QSApplicationClass.
QSMemberMap QSClass::members | ( | const QSObject * | obj | ) | const [virtual] |
Returns the map of members of obj or class members if obj is 0. The default implementation will list all members pre-defined via the addMember() function or one of its specializations. Class inherting from QSClass can reimplement this function to also give information about custom properties.
Reimplementado en QSWritableClass, QSBlockScopeClass, QSTypeClass y QSFactoryObjectProxy.
virtual QString QSClass::name | ( | ) | const [pure virtual] |
Implementado en QSArrayClass, QSObjectClass, QSUndefinedClass, QSNullClass, QSBooleanClass, QSNumberClass, QSStringClass, QSCharacterClass, QSClassClass, QSFunctionScopeClass, QSEvalScopeClass, QSBlockScopeClass, QSDynamicClass, QSTypeClass, QSGlobalClass, QSDebugClass, QSSystemClass, QSAbstractBaseClass, QSDateClass, QSErrorClass, QSFuncRefClass, QSArgumentsClass, QSMathClass, QSRegExpClass, QSByteArrayClass, QSColorClass, QSPaletteClass, QSColorGroupClass, QSPointClass, QSSizeClass, QSRectClass, QSFontClass, QSWrapperClass, QSPointerClass, QSFactoryObjectProxy, QSObjectConstructor, QSVariantClass, QSApplicationClass y QSPixmapClass.
int QSClass::numStaticVariables | ( | ) | const [inline] |
int QSClass::numVariables | ( | ) | const [inline] |
void QSClass::ref | ( | QSObject * | o | ) | const [virtual] |
Reimplementado en QSStringClass y QSSharedClass.
void QSClass::setBase | ( | QSClass * | base | ) | [inline] |
void QSClass::setEnclosingClass | ( | QSClass * | cl | ) | [inline] |
void QSClass::setNumVariables | ( | int | count | ) | [inline] |
Convenience function to throw an error of type a with the user visible message msg.
Returns obj converted to a boolean value.
The default implementation returns TRUE.
Reimplementado en QSObjectClass, QSUndefinedClass, QSNullClass, QSBooleanClass, QSNumberClass, QSStringClass, QSCharacterClass, QSClassClass, QSDateClass, QSFuncRefClass, QSWrapperClass, QSPointerClass y QSVariantClass.
double QSClass::toNumber | ( | const QSObject * | obj | ) | const [virtual] |
Return obj converted to a floating point number; NaN if the conversion failed.
The default implementation returns NaN.
Reimplementado en QSObjectClass, QSUndefinedClass, QSNullClass, QSBooleanClass, QSNumberClass, QSStringClass, QSCharacterClass, QSClassClass, QSDateClass, QSFuncRefClass, QSColorClass, QSPointerClass y QSVariantClass.
QSObject QSClass::toPrimitive | ( | const QSObject * | obj, |
const QSClass * | preferred = 0 |
||
) | const [virtual] |
Reimplementado en QSArrayClass, QSUndefinedClass, QSNullClass, QSBooleanClass, QSNumberClass, QSStringClass y QSVariantClass.
Return obj converted to a string.
The default implementation returns "[object N]" where N is the name of this class as retrieved by name().
Reimplementado en QSArrayClass, QSObjectClass, QSUndefinedClass, QSNullClass, QSBooleanClass, QSNumberClass, QSStringClass, QSCharacterClass, QSClassClass, QSDateClass, QSErrorClass, QSFuncRefClass, QSRegExpClass, QSByteArrayClass, QSColorClass, QSPointClass, QSSizeClass, QSRectClass, QSFontClass, QSWrapperClass, QSPointerClass y QSVariantClass.
QVariant QSClass::toVariant | ( | const QSObject * | obj, |
QVariant::Type | pref | ||
) | const [virtual] |
Convert obj to an equivalent QVariant. The default implementation returns in invalid QVariant which may also be the case where no mapping for an equivalent type exists.
Reimplementado en QSArrayClass, QSBooleanClass, QSNumberClass, QSStringClass, QSDateClass, QSByteArrayClass, QSColorClass, QSPaletteClass, QSColorGroupClass, QSPointClass, QSSizeClass, QSRectClass, QSFontClass, QSWrapperClass, QSPointerClass, QSVariantClass y QSPixmapClass.
virtual ValueType QSClass::valueType | ( | ) | const [inline, virtual] |
Reimplementado en QSBooleanClass, QSNumberClass, QSStringClass, QSCharacterClass, QSSharedClass, QSTypeClass y QSFactoryObjectProxy.
Only use for objPtr's that absolutly have QSInstanceData
friend class QSObject [friend] |