Struct jac::ProtoBuilder::Callable
ClassList > jac > ProtoBuilder > Callable
A base class for javascript classes with callable instances. More...
#include <class.h>
Public Static Functions
| Type | Name |
|---|---|
| Value | callConstructor (ContextRef, ValueWeak, ValueWeak, std::vector< ValueWeak >) Process a call to the wrapped class as a constructor. |
| Value | callFunction (ContextRef, ValueWeak, ValueWeak, std::vector< ValueWeak >) 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,
std::vector< ValueWeak >
)
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,
std::vector< ValueWeak >
)
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