![]() |
RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
Public Types | |
typedef JSWrapped | root_type |
typedef Shared | root_shared_type |
Public Member Functions | |
virtual size_t | memusage (void *object) const |
void | wrap (v8::Handle< v8::Object > handle, Shared *object) |
void | wrap (v8::Handle< v8::Object > handle, std::shared_ptr< Shared > object) |
const std::shared_ptr< Shared > & | getWrappedObject () const |
void | setWrappedObject (const std::shared_ptr< Shared > &newObject) |
Static Public Member Functions | |
static JSWrapped * | getWrapper (v8::Handle< v8::Value > handle, v8::Persistent< v8::FunctionTemplate > tmpl, const char *className, const char *module) |
static JSWrapped * | getWrapper (const v8::Arguments &args, v8::Persistent< v8::FunctionTemplate > tmpl, const char *className, const char *module) |
static void | unwrappedException (const char *className, const char *module) |
static Shared * | getShared (v8::Handle< v8::Value > handle, v8::Persistent< v8::FunctionTemplate > tmpl, const char *className, const char *module) |
static Shared * | getShared (const v8::Arguments &args, v8::Persistent< v8::FunctionTemplate > tmpl, const char *className, const char *module) |
static std::shared_ptr< Shared > | getSharedPtr (v8::Handle< v8::Value > handle, v8::Persistent< v8::FunctionTemplate > tmpl, const char *className, const char *module) |
static std::shared_ptr< Shared > | getSharedPtr (const v8::Arguments &args, v8::Persistent< v8::FunctionTemplate > tmpl, const char *className, const char *module) |
static void | setShared (v8::Handle< v8::Value > handle, v8::Persistent< v8::FunctionTemplate > tmpl, const char *className, const char *module, const std::shared_ptr< Shared > &shared) |
static v8::Handle< v8::Value > | ObjectStats (const v8::Arguments &args) |
static v8::Handle< v8::Value > | cppDetach (const v8::Arguments &args) |
static v8::Handle< v8::Value > | cppType (const v8::Arguments &args) |
static v8::Handle< v8::Value > | noConstructorError (const char *class_name=0, const char *module=0) |
static v8::Handle< v8::Value > | NoConstructor (const v8::Arguments &args) |
static v8::Persistent < v8::FunctionTemplate > | RegisterBase (const char *name, const char *module, v8::InvocationCallback constructor, SetupFunction setup=Setup) |
Static Public Attributes | |
static uint64_t | created = 0 |
static uint64_t | destroyed = 0 |
Protected Member Functions | |
virtual void | onSetWrappedObject (const v8::Handle< v8::Object > &This, const std::shared_ptr< Shared > &newObject) |
virtual void | onResetWrappedObject (const v8::Handle< v8::Object > &This, const std::shared_ptr< Shared > &oldObject) |
Definition at line 294 of file js_wrapped.h.
virtual void Datacratic::JS::JSWrapped< Shared >::onResetWrappedObject | ( | const v8::Handle< v8::Object > & | This, |
const std::shared_ptr< Shared > & | oldObject | ||
) | [inline, protected, virtual] |
Function that can be overridden to be notified every time a new shared object is disassociated. Guaranteed that oldObject will not be a null pointer and that onResetShared will be called one time for every time onSetWrapperObject is called.
Definition at line 549 of file js_wrapped.h.
virtual void Datacratic::JS::JSWrapped< Shared >::onSetWrappedObject | ( | const v8::Handle< v8::Object > & | This, |
const std::shared_ptr< Shared > & | newObject | ||
) | [inline, protected, virtual] |
Function that can be overridden to be notified every time a new shared object is associated. Guaranteed that newObject will not be a null pointer.
Used (for example) as a hook to associate array data with the v8 indexed handlers.
Definition at line 538 of file js_wrapped.h.
void Datacratic::JS::JSWrapped< Shared >::setWrappedObject | ( | const std::shared_ptr< Shared > & | newObject | ) | [inline] |
Modify the wrapped object. Will notify anything that has signed up to onSetShared or onResetShared. It is valid to pass in a null pointer.
Definition at line 519 of file js_wrapped.h.