Struct jac::ProtoBuilder::Callable
ClassList > jac > ProtoBuilder > Callable
A base class for javascript classes with callable instances. More...
#include <class.h>
Inherited by the following classes: jac::detail::CallableProtoBuilder
Public Static Functions
| Type | Name |
|---|---|
| Value | callConstructor (ContextRef, ValueWeak, ValueWeak, ValueVectorWeak) Process a call to the wrapped class as a constructor. |
| Value | callFunction (ContextRef, ValueWeak, ValueWeak, ValueVectorWeak) Process a call to the wrapped class. |
Detailed Description
The functions callFunction and callConstructor can be overriden to provide custom handling of the class instance when it's called as a function or as a constructor (with new).
Public Static Functions Documentation
function callConstructor
Process a call to the wrapped class as a constructor.
static inline Value jac::ProtoBuilder::Callable::callConstructor (
ContextRef,
ValueWeak,
ValueWeak,
ValueVectorWeak
)
Parameters:
ctxcontext to work infuncObjinstance of the classtargetvalue ofnew.targetin the functionargsarguments passed to the function
Returns:
Result of the call
function callFunction
Process a call to the wrapped class.
static inline Value jac::ProtoBuilder::Callable::callFunction (
ContextRef,
ValueWeak,
ValueWeak,
ValueVectorWeak
)
Parameters:
ctxcontext to work infuncObjinstance of the classthisValvalue ofthisin the functionargsarguments passed to the function
Returns:
result of the call
The documentation for this class was generated from the following file src/jac/machine/class.h