• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

kjsembed

  • sources
  • kde-4.12
  • kdelibs
  • kjsembed
  • kjsembed
Classes | Namespaces | Macros | Functions
value_binding.h File Reference
#include <kjs/object.h>
#include <kjs/interpreter.h>
#include "static_binding.h"
#include "pointer.h"
Include dependency graph for value_binding.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  KJSEmbed::ValueBinding
 
class  KJSEmbed::ValueFactory
 

Namespaces

 KJSEmbed
 

Macros

#define END_VALUE_METHOD
 
#define KJSO_VALUE_DERIVED_BINDING_CTOR(NAME, JSNAME, TYPE, BASENAME)
 
#define KJSO_VALUE_SIMPLE_BINDING_CTOR(NAME, JSNAME, TYPE, BASENAME)
 
#define START_VALUE_METHOD(METHODNAME, TYPE)
 

Functions

template<typename T >
KJS::JSValue * KJSEmbed::createValue (KJS::ExecState *exec, const KJS::UString &className, const T &value)
 
template<typename T >
T KJSEmbed::extractValue (KJS::ExecState *exec, KJS::JSValue *arg, const T &defaultValue)
 
template<typename T >
T KJSEmbed::extractValue (KJS::ExecState *exec, const KJS::List &args, int idx, const T &defaultValue=T())
 

Macro Definition Documentation

#define END_VALUE_METHOD
Value:
imp->setValue(value); \
} \
else { \
KJS::throwError(exec, KJS::GeneralError, "Problem in ValueBinding here");\
}\
return result; \
}
else
else
Definition: qaction_binding.cpp:58
BrushNS::result
result
Definition: brush.cpp:48
value
QVariant value
Definition: settings.cpp:35
KJS::throwError
JSObject * throwError(ExecState *e, ErrorType t, const QString &m)
Definition: binding_support.h:241

End a variant method started by START_VALUE_METHOD.

Definition at line 53 of file value_binding.h.

#define KJSO_VALUE_DERIVED_BINDING_CTOR (   NAME,
  JSNAME,
  TYPE,
  BASENAME 
)
Value:
NAME::NAME(KJS::ExecState *exec, const char* typeName ) \
: BASENAME( exec, typeName ) \
{ \
StaticBinding::publish( exec, this, NAME::methods() ); \
} \
NAME::NAME(KJS::ExecState *exec, const TYPE & value) \
: BASENAME( exec, #JSNAME ) \
{ \
setValue(value); \
StaticBinding::publish( exec, this, NAME::methods() ); \
}
setValue
object setValue(key, value)
value
QVariant value
Definition: settings.cpp:35

Definition at line 74 of file value_binding.h.

#define KJSO_VALUE_SIMPLE_BINDING_CTOR (   NAME,
  JSNAME,
  TYPE,
  BASENAME 
)
Value:
NAME::NAME(KJS::ExecState *exec, const char* typeName ) \
: BASENAME( exec, typeName ) \
{ \
StaticBinding::publish( exec, this, NAME::methods() ); \
} \
NAME::NAME(KJS::ExecState *exec, const TYPE & value) \
: BASENAME( exec, #JSNAME , value ) \
{ \
StaticBinding::publish( exec, this, NAME::methods() ); \
}
value
QVariant value
Definition: settings.cpp:35

Definition at line 62 of file value_binding.h.

#define START_VALUE_METHOD (   METHODNAME,
  TYPE 
)
Value:
KJS::JSValue *METHODNAME( KJS::ExecState *exec, KJS::JSObject *self, const KJS::List &args ) \
{ \
Q_UNUSED(exec);\
Q_UNUSED(self);\
Q_UNUSED(args);\
KJS::JSValue *result = KJS::jsNull(); \
KJSEmbed::ValueBinding *imp = KJSEmbed::extractBindingImp<KJSEmbed::ValueBinding>(exec, self ); \
if( imp ) \
{ \
TYPE value = imp->value<TYPE>();
DomDocumentNS::if
if(!success)
Definition: dom.cpp:363
BrushNS::result
result
Definition: brush.cpp:48
List
Definition: variant_binding.cpp:130
value
QVariant value
Definition: settings.cpp:35

A simple variant syle method.

This will extract the value, cast it to the native type and place it in "value". Any data that should be returned from this method should be placed into "result";

Definition at line 39 of file value_binding.h.

This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kjsembed

Skip menu "kjsembed"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal