kjsembed
binding_support.h
Go to the documentation of this file.
160 #JSNAME, ARGS, KJS::DontDelete|KJS::ReadOnly, 0, &TYPE::ctorMethod, p_statics, p_enums, p_methods };\
172 #JSNAME, ARGS, KJS::DontDelete|KJS::ReadOnly, &TYPE::bindMethod, &TYPE::ctorMethod, p_statics, p_enums, p_methods };\
386 QString KJSEMBED_EXPORT extractQString( KJS::ExecState *exec, const KJS::List &args, int idx, const QString defaultValue = QString() );
391 QString KJSEMBED_EXPORT extractQString( KJS::ExecState *exec, KJS::JSValue *value, const QString defaultValue = QString() );
402 QByteArray KJSEMBED_EXPORT extractQByteArray( KJS::ExecState *exec, const KJS::List &args, int idx, const QByteArray &defaultValue = QByteArray() );
407 QByteArray KJSEMBED_EXPORT extractQByteArray( KJS::ExecState *exec, KJS::JSValue *value, const QByteArray &defaultValue = QByteArray() );
416 inline T KJSEMBED_EXPORT extractString(KJS::ExecState *exec, KJS::JSValue *value, T defaultValue = T())
425 inline T KJSEMBED_EXPORT extractString(KJS::ExecState *exec, const KJS::List &args, int idx, T defaultValue = T())
438 inline T KJSEMBED_EXPORT extractNumber(KJS::ExecState *exec, KJS::JSValue *value, T defaultValue = T(0))
451 inline T KJSEMBED_EXPORT extractNumber(KJS::ExecState *exec, const KJS::List &args, int idx, T defaultValue = T(0))
465 inline T KJSEMBED_EXPORT extractInteger(KJS::ExecState *exec, KJS::JSValue *value, T defaultValue)
480 inline qint32 KJSEMBED_EXPORT extractInteger<qint32>(KJS::ExecState *exec, KJS::JSValue *value, qint32 defaultValue)
490 inline quint32 KJSEMBED_EXPORT extractInteger<quint32>(KJS::ExecState *exec, KJS::JSValue *value, quint32 defaultValue)
500 inline quint16 KJSEMBED_EXPORT extractInteger<quint16>(KJS::ExecState *exec, KJS::JSValue *value, quint16 defaultValue)
513 inline T KJSEMBED_EXPORT extractInteger(KJS::ExecState *exec, const KJS::List &args, int idx, T defaultValue = T(0))
527 int KJSEMBED_EXPORT extractInt( KJS::ExecState *exec, const KJS::List &args, int idx, int defaultValue = 0 );
531 int KJSEMBED_EXPORT extractInt( KJS::ExecState *exec, KJS::JSValue *value, int defaultValue = 0 );
541 double KJSEMBED_EXPORT extractDouble( KJS::ExecState *exec, const KJS::List &args, int idx, double defaultValue = 0 );
545 double KJSEMBED_EXPORT extractDouble( KJS::ExecState *exec, KJS::JSValue *value, double defaultValue = 0 );
555 float KJSEMBED_EXPORT extractFloat( KJS::ExecState *exec, const KJS::List &args, int idx, float defaultValue = 0 );
559 float KJSEMBED_EXPORT extractFloat( KJS::ExecState *exec, KJS::JSValue *value, float defaultValue = 0 );
569 bool KJSEMBED_EXPORT extractBool( KJS::ExecState *exec, const KJS::List &args, int idx, bool defaultValue = false );
583 QDateTime KJSEMBED_EXPORT extractQDateTime( KJS::ExecState *exec, const KJS::List &args, int idx, const QDateTime &defaultValue = QDateTime() );
587 QDateTime KJSEMBED_EXPORT extractQDateTime( KJS::ExecState *exec, KJS::JSValue *value, const QDateTime &defaultValue = QDateTime() );
597 QDate KJSEMBED_EXPORT extractQDate( KJS::ExecState *exec, const KJS::List &args, int idx, const QDate &defaultValue = QDate() );
601 QDate KJSEMBED_EXPORT extractQDate( KJS::ExecState *exec, KJS::JSValue *value, const QDate &defaultValue = QDate() );
611 QTime KJSEMBED_EXPORT extractQTime( KJS::ExecState *exec, const KJS::List &args, int idx, const QTime &defaultValue = QTime() );
615 QTime KJSEMBED_EXPORT extractQTime( KJS::ExecState *exec, KJS::JSValue *value, const QTime &defaultValue = QTime() );
625 QStringList KJSEMBED_EXPORT extractQStringList( KJS::ExecState *exec, const KJS::List &args, int idx, const QStringList &defaultValue = QStringList() );
629 QStringList KJSEMBED_EXPORT extractQStringList( KJS::ExecState *exec, KJS::JSValue *value, const QStringList &defaultValue = QStringList() );
KJS::JSValue * createQString(KJS::ExecState *exec, const QString &value)
Create a new KJS::JSValue with the value of the QString.
Definition: binding_support.cpp:88
KJS::JSValue * createQTime(KJS::ExecState *exec, const QTime &value)
Create a new KJS::JSValue with the value of the QTime.
Definition: binding_support.cpp:224
float KJSEMBED_EXPORT extractFloat(KJS::ExecState *exec, KJS::JSValue *value, float defaultValue=0)
Extract a float from a value.
Definition: binding_support.cpp:134
KJS::JSObject *(* callBind)(KJS::ExecState *, PointerBase &)
Bind signature.
Definition: binding_support.h:335
QDateTime KJSEMBED_EXPORT extractQDateTime(KJS::ExecState *exec, KJS::JSValue *value, const QDateTime &defaultValue=QDateTime())
Extract a bool from a value.
Definition: binding_support.cpp:180
Definition: binding_support.h:247
KJS::JSValue * createQByteArray(KJS::ExecState *exec, const QByteArray &value)
Create a new KJS::JSValue with the value of the QString.
Definition: binding_support.cpp:66
T KJSEMBED_EXPORT extractInteger(KJS::ExecState *exec, const KJS::List &args, int idx, T defaultValue=T(0))
Extracts an integer from an arguments list.
Definition: binding_support.h:513
T * extractBindingImp(KJS::JSObject *obj)
This is just a helper function similar to the one above, only it takes a KJS::JSObject.
Definition: binding_support.h:277
double KJSEMBED_EXPORT extractDouble(KJS::ExecState *exec, KJS::JSValue *value, double defaultValue=0)
Extract a double from a value.
Definition: binding_support.cpp:109
bool implementsConstruct() const
Definition: binding_support.h:254
QString KJSEMBED_EXPORT extractQString(KJS::ExecState *exec, KJS::JSValue *value, const QString defaultValue=QString())
Extract a QString from a value.
Definition: binding_support.cpp:43
QTime KJSEMBED_EXPORT extractQTime(KJS::ExecState *exec, KJS::JSValue *value, const QTime &defaultValue=QTime())
Extract a QTime from a value.
Definition: binding_support.cpp:218
Definition: pointer.h:31
KJS::JSValue * createBool(KJS::ExecState *exec, bool value)
Create a new KJS::JSValue with the value of the bool.
Definition: binding_support.cpp:167
KJS::JSValue * createQStringList(KJS::ExecState *exec, const QStringList &value)
Create a new KJS::JSValue with the value of the QStringList.
Definition: binding_support.cpp:243
Definition: binding_support.h:345
KJS::JSValue *(* callMethod)(KJS::ExecState *, KJS::JSObject *, const KJS::List &)
Method callback signature.
Definition: binding_support.h:289
quint32 KJSEMBED_EXPORT extractInteger< quint32 >(KJS::ExecState *exec, KJS::JSValue *value, quint32 defaultValue)
Definition: binding_support.h:490
qint32 KJSEMBED_EXPORT extractInteger< qint32 >(KJS::ExecState *exec, KJS::JSValue *value, qint32 defaultValue)
Definition: binding_support.h:480
KJS::JSValue * createInt(KJS::ExecState *exec, int value)
Create a new KJS::JSValue with the value of the integer.
Definition: binding_support.cpp:94
QByteArray KJSEMBED_EXPORT extractQByteArray(KJS::ExecState *exec, KJS::JSValue *value, const QByteArray &defaultValue=QByteArray())
Extract a QString from a value.
Definition: binding_support.cpp:59
KJS::JSValue * createFloat(KJS::ExecState *exec, float value)
Create a new KJS::JSValue with the value of the float.
Definition: binding_support.cpp:142
const char * name
The constructor name as it will appear in Javascript.
Definition: binding_support.h:351
QStringList KJSEMBED_EXPORT extractQStringList(KJS::ExecState *exec, KJS::JSValue *value, const QStringList &defaultValue=QStringList())
Extract a QStringList from a value.
Definition: binding_support.cpp:237
KJS::JSValue * createQDateTime(KJS::ExecState *exec, const QDateTime &value)
Create a new KJS::JSValue with the value of the QDateTime.
Definition: binding_support.cpp:186
quint16 KJSEMBED_EXPORT extractInteger< quint16 >(KJS::ExecState *exec, KJS::JSValue *value, quint16 defaultValue)
Definition: binding_support.h:500
T KJSEMBED_EXPORT extractString(KJS::ExecState *exec, const KJS::List &args, int idx, T defaultValue=T())
Definition: binding_support.h:425
bool extractBool(KJS::ExecState *exec, KJS::JSValue *value, bool defaultValue=false)
Extract a bool from a value.
Definition: binding_support.cpp:159
Definition: variant_binding.cpp:130
KJS::JSValue * createQDate(KJS::ExecState *exec, const QDate &value)
Create a new KJS::JSValue with the value of the QDate.
Definition: binding_support.cpp:205
KJS::JSValue * createDouble(KJS::ExecState *exec, double value)
Create a new KJS::JSValue with the value of the double.
Definition: binding_support.cpp:117
KJS::JSObject *(* callConstructor)(KJS::ExecState *, const KJS::List &)
Constructor signature.
Definition: binding_support.h:343
int KJSEMBED_EXPORT extractInt(KJS::ExecState *exec, KJS::JSValue *value, int defaultValue=0)
Extract an integer from a value.
Definition: binding_support.cpp:81
Definition: application.h:32
JSObject * throwError(ExecState *e, ErrorType t, const QString &m)
Definition: binding_support.h:241
QDate KJSEMBED_EXPORT extractQDate(KJS::ExecState *exec, KJS::JSValue *value, const QDate &defaultValue=QDate())
Extract a QDate from a value.
Definition: binding_support.cpp:199
T KJSEMBED_EXPORT extractNumber(KJS::ExecState *exec, const KJS::List &args, int idx, T defaultValue=T(0))
Extracts a number from an arguments list.
Definition: binding_support.h:451
This file is part of the KDE documentation.
Documentation copyright © 1996-2016 The KDE developers.
Generated on Wed Oct 19 2016 23:24:43 by doxygen 1.8.12 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2016 The KDE developers.
Generated on Wed Oct 19 2016 23:24:43 by doxygen 1.8.12 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.