Qt 4.8
Classes | Public Functions | Static Public Functions | Static Public Variables | Protected Variables | Static Protected Variables | List of all members
QScriptObject Class Reference

#include <qscriptobject_p.h>

Inheritance diagram for QScriptObject:
QScript::QObjectPrototype QScript::QVariantPrototype QScriptObjectPrototype

Classes

struct  Data
 

Public Functions

virtual const JSC::ClassInfo * classInfo () const
 
virtual bool compareToObject (JSC::ExecState *, JSC::JSObject *)
 
JSC::JSValue data () const
 
QScriptObjectDelegatedelegate () const
 
virtual bool deleteProperty (JSC::ExecState *, const JSC::Identifier &propertyName)
 
virtual JSC::CallType getCallData (JSC::CallData &)
 
virtual JSC::ConstructType getConstructData (JSC::ConstructData &)
 
virtual bool getOwnPropertyDescriptor (JSC::ExecState *, const JSC::Identifier &, JSC::PropertyDescriptor &)
 
virtual void getOwnPropertyNames (JSC::ExecState *, JSC::PropertyNameArray &, JSC::EnumerationMode mode=JSC::ExcludeDontEnumProperties)
 
virtual bool getOwnPropertySlot (JSC::ExecState *, const JSC::Identifier &propertyName, JSC::PropertySlot &)
 
virtual bool hasInstance (JSC::ExecState *, JSC::JSValue value, JSC::JSValue proto)
 
virtual void markChildren (JSC::MarkStack &markStack)
 
virtual void put (JSC::ExecState *exec, const JSC::Identifier &propertyName, JSC::JSValue, JSC::PutPropertySlot &)
 
 QScriptObject (WTF::PassRefPtr< JSC::Structure > sid)
 
void setData (JSC::JSValue data)
 
void setDelegate (QScriptObjectDelegate *delegate)
 
virtual ~QScriptObject ()
 

Static Public Functions

static WTF::PassRefPtr< JSC::Structure > createStructure (JSC::JSValue prototype)
 

Static Public Variables

static const JSC::ClassInfo info = { "Object", 0, 0, 0 }
 

Protected Variables

Datad
 

Static Protected Variables

static const unsigned StructureFlags = JSC::ImplementsHasInstance | JSC::OverridesHasInstance | JSC::OverridesGetOwnPropertySlot | JSC::OverridesMarkChildren | JSC::OverridesGetPropertyNames | JSObject::StructureFlags
 

Detailed Description

Definition at line 46 of file qscriptobject_p.h.

Constructors and Destructors

◆ QScriptObject()

QScriptObject::QScriptObject ( WTF::PassRefPtr< JSC::Structure >  sid)
explicit

Definition at line 45 of file qscriptobject.cpp.

Referenced by QScriptObject::Data::Data().

46  : JSC::JSObject(sid), d(0)
47 {
48 }

◆ ~QScriptObject()

QScriptObject::~QScriptObject ( )
virtual

Definition at line 50 of file qscriptobject.cpp.

Referenced by QScriptObject::Data::Data().

51 {
52  delete d;
53 }

Functions

◆ classInfo()

virtual const JSC::ClassInfo* QScriptObject::classInfo ( ) const
inlinevirtual

Definition at line 79 of file qscriptobject_p.h.

79 { return &info; }
static const JSC::ClassInfo info

◆ compareToObject()

bool QScriptObject::compareToObject ( JSC::ExecState *  exec,
JSC::JSObject *  other 
)
virtual

Definition at line 101 of file qscriptobject.cpp.

Referenced by QScriptObject::Data::Data().

102 {
103  if (!d || !d->delegate) {
104  return JSC::JSObject::compareToObject(exec, other);
105  }
106  return d->delegate->compareToObject(this, exec, other);
107 }
virtual bool compareToObject(QScriptObject *, JSC::ExecState *, JSC::JSObject *)
QScriptObjectDelegate * delegate

◆ createStructure()

static WTF::PassRefPtr<JSC::Structure> QScriptObject::createStructure ( JSC::JSValue  prototype)
inlinestatic

Definition at line 82 of file qscriptobject_p.h.

Referenced by QScriptEnginePrivate::QScriptEnginePrivate().

83  {
84  return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags));
85  }
static Expression::Ptr create(Expression *const expr, const YYLTYPE &sourceLocator, const ParserContext *const parseInfo)
static QByteArray prototype(const QList< QByteArray > &parameterTypes, const QList< QByteArray > &parameterNames, bool *ok)
Definition: qaxserver.cpp:685
static const unsigned StructureFlags

◆ data()

JSC::JSValue QScriptObject::data ( ) const
inline

Definition at line 144 of file qscriptobject_p.h.

Referenced by QScriptValue::data().

145 {
146  if (!d)
147  return JSC::JSValue();
148  return d->data;
149 }

◆ delegate()

QScriptObjectDelegate * QScriptObject::delegate ( ) const
inline

◆ deleteProperty()

bool QScriptObject::deleteProperty ( JSC::ExecState *  exec,
const JSC::Identifier &  propertyName 
)
virtual

Definition at line 83 of file qscriptobject.cpp.

Referenced by QScriptObject::Data::Data().

85 {
86  if (!d || !d->delegate)
87  return JSC::JSObject::deleteProperty(exec, propertyName);
88  return d->delegate->deleteProperty(this, exec, propertyName);
89 }
virtual bool deleteProperty(QScriptObject *, JSC::ExecState *, const JSC::Identifier &propertyName)
QScriptObjectDelegate * delegate

◆ getCallData()

JSC::CallType QScriptObject::getCallData ( JSC::CallData &  data)
virtual

Definition at line 125 of file qscriptobject.cpp.

Referenced by QScriptObject::Data::Data().

126 {
127  if (!d || !d->delegate)
128  return JSC::JSObject::getCallData(data);
129  return d->delegate->getCallData(this, data);
130 }
JSC::JSValue data() const
QScriptObjectDelegate * delegate
virtual JSC::CallType getCallData(QScriptObject *, JSC::CallData &)

◆ getConstructData()

JSC::ConstructType QScriptObject::getConstructData ( JSC::ConstructData &  data)
virtual

Definition at line 132 of file qscriptobject.cpp.

Referenced by QScriptObject::Data::Data().

133 {
134  if (!d || !d->delegate)
135  return JSC::JSObject::getConstructData(data);
136  return d->delegate->getConstructData(this, data);
137 }
virtual JSC::ConstructType getConstructData(QScriptObject *, JSC::ConstructData &)
JSC::JSValue data() const
QScriptObjectDelegate * delegate

◆ getOwnPropertyDescriptor()

bool QScriptObject::getOwnPropertyDescriptor ( JSC::ExecState *  exec,
const JSC::Identifier &  propertyName,
JSC::PropertyDescriptor &  descriptor 
)
virtual

Definition at line 64 of file qscriptobject.cpp.

Referenced by QScriptObject::Data::Data().

67 {
68  if (!d || !d->delegate)
69  return JSC::JSObject::getOwnPropertyDescriptor(exec, propertyName, descriptor);
70  return d->delegate->getOwnPropertyDescriptor(this, exec, propertyName, descriptor);
71 }
virtual bool getOwnPropertyDescriptor(QScriptObject *, JSC::ExecState *, const JSC::Identifier &propertyName, JSC::PropertyDescriptor &)
QScriptObjectDelegate * delegate

◆ getOwnPropertyNames()

void QScriptObject::getOwnPropertyNames ( JSC::ExecState *  exec,
JSC::PropertyNameArray &  propertyNames,
JSC::EnumerationMode  mode = JSC::ExcludeDontEnumProperties 
)
virtual

Definition at line 91 of file qscriptobject.cpp.

Referenced by QScriptObject::Data::Data().

93 {
94  if (!d || !d->delegate) {
95  JSC::JSObject::getOwnPropertyNames(exec, propertyNames, mode);
96  return;
97  }
98  d->delegate->getOwnPropertyNames(this, exec, propertyNames, mode);
99 }
virtual void getOwnPropertyNames(QScriptObject *, JSC::ExecState *, JSC::PropertyNameArray &, JSC::EnumerationMode mode=JSC::ExcludeDontEnumProperties)
QScriptObjectDelegate * delegate

◆ getOwnPropertySlot()

bool QScriptObject::getOwnPropertySlot ( JSC::ExecState *  exec,
const JSC::Identifier &  propertyName,
JSC::PropertySlot &  slot 
)
virtual

Definition at line 55 of file qscriptobject.cpp.

Referenced by QScriptObject::Data::Data().

58 {
59  if (!d || !d->delegate)
60  return JSC::JSObject::getOwnPropertySlot(exec, propertyName, slot);
61  return d->delegate->getOwnPropertySlot(this, exec, propertyName, slot);
62 }
virtual bool getOwnPropertySlot(QScriptObject *, JSC::ExecState *, const JSC::Identifier &propertyName, JSC::PropertySlot &)
QScriptObjectDelegate * delegate

◆ hasInstance()

bool QScriptObject::hasInstance ( JSC::ExecState *  exec,
JSC::JSValue  value,
JSC::JSValue  proto 
)
virtual

Definition at line 139 of file qscriptobject.cpp.

Referenced by QScriptObject::Data::Data().

140 {
141  if (!d || !d->delegate)
142  return JSC::JSObject::hasInstance(exec, value, proto);
143  return d->delegate->hasInstance(this, exec, value, proto);
144 }
virtual bool hasInstance(QScriptObject *, JSC::ExecState *, JSC::JSValue value, JSC::JSValue proto)
QScriptObjectDelegate * delegate

◆ markChildren()

void QScriptObject::markChildren ( JSC::MarkStack &  markStack)
virtual

Definition at line 109 of file qscriptobject.cpp.

Referenced by QScriptObject::Data::Data().

110 {
111  if (!d)
112  d = new Data();
113  if (d->isMarking)
114  return;
115  QBoolBlocker markBlocker(d->isMarking, true);
116  if (d && d->data)
117  markStack.append(d->data);
118  if (!d || !d->delegate) {
119  JSC::JSObject::markChildren(markStack);
120  return;
121  }
122  d->delegate->markChildren(this, markStack);
123 }
virtual void markChildren(QScriptObject *, JSC::MarkStack &markStack)
QScriptObjectDelegate * delegate

◆ put()

void QScriptObject::put ( JSC::ExecState *  exec,
const JSC::Identifier &  propertyName,
JSC::JSValue  value,
JSC::PutPropertySlot &  slot 
)
virtual

Definition at line 73 of file qscriptobject.cpp.

Referenced by QScriptObject::Data::Data().

75 {
76  if (!d || !d->delegate) {
77  JSC::JSObject::put(exec, propertyName, value, slot);
78  return;
79  }
80  d->delegate->put(this, exec, propertyName, value, slot);
81 }
virtual void put(QScriptObject *, JSC::ExecState *exec, const JSC::Identifier &propertyName, JSC::JSValue, JSC::PutPropertySlot &)
QScriptObjectDelegate * delegate

◆ setData()

void QScriptObject::setData ( JSC::JSValue  data)
inline

Definition at line 151 of file qscriptobject_p.h.

Referenced by createStructure(), and QScriptValue::setData().

152 {
153  if (!d)
154  d = new Data();
155  d->data = data;
156 }
JSC::JSValue data() const

◆ setDelegate()

void QScriptObject::setDelegate ( QScriptObjectDelegate delegate)
inline

Properties

◆ d

Data* QScriptObject::d
protected

◆ info

const JSC::ClassInfo QScriptObject::info = { "Object", 0, 0, 0 }
static

◆ StructureFlags

const unsigned QScriptObject::StructureFlags = JSC::ImplementsHasInstance | JSC::OverridesHasInstance | JSC::OverridesGetOwnPropertySlot | JSC::OverridesMarkChildren | JSC::OverridesGetPropertyNames | JSObject::StructureFlags
staticprotected

Definition at line 94 of file qscriptobject_p.h.

Referenced by createStructure().


The documentation for this class was generated from the following files: