Osmium
0.1
|
#include <template.hpp>
Public Member Functions | |
v8::Local< v8::Object > | create_instance (void *wrapped) |
template<class TWrapped > | |
v8::Persistent< v8::Object > | create_persistent_instance (TWrapped *wrapped) |
v8::Handle< v8::Value > | js_undefined (const v8::Arguments &) |
Static Public Member Functions | |
template<class T > | |
static T & | get () |
template<class TWrapped > | |
static void | free_instance (v8::Persistent< v8::Value > instance, void *obj) |
template<class TObject , v8::Handle< v8::Value >(TObject::*)() const func> | |
static v8::Handle< v8::Value > | accessor_getter (v8::Local< v8::String >, const v8::AccessorInfo &info) |
template<class TObject , v8::Handle< v8::Value >(TObject::*)(v8::Local< v8::String >) const func> | |
static v8::Handle< v8::Value > | named_property_getter (v8::Local< v8::String > property, const v8::AccessorInfo &info) |
template<class TObject , v8::Handle< v8::Value >(TObject::*)(uint32_t) const func> | |
static v8::Handle< v8::Value > | indexed_property_getter (uint32_t index, const v8::AccessorInfo &info) |
template<class TObject , v8::Handle< v8::Value >(TObject::*)(uint32_t) func> | |
static v8::Handle< v8::Value > | indexed_property_getter (uint32_t index, const v8::AccessorInfo &info) |
template<class TObject , v8::Handle< v8::Array >(TObject::*)() const func> | |
static v8::Handle< v8::Array > | property_enumerator (const v8::AccessorInfo &info) |
template<class TObject , v8::Handle< v8::Value >(TObject::*)(const v8::Arguments &) func> | |
static v8::Handle< v8::Value > | function_template (const v8::Arguments &args) |
Protected Member Functions | |
Template (int field_count=1) | |
~Template () | |
Protected Attributes | |
v8::Persistent < v8::ObjectTemplate > | js_template |
Private Member Functions | |
Template (const Template &) | |
Template & | operator= (const Template &) |
Base class for all Javascript template classes. Javascript template classes describe templates from which Javascript objects can be created, so for every C++ class that should be accessible from Javascript there is a corresponding template class.
Note that Javascript templates have nothing to do with C++ templates.
Osmium::Javascript::Template::Template | ( | int | field_count = 1 | ) | [inline, protected] |
Constructor.
Osmium::Javascript::Template::~Template | ( | ) | [inline, protected] |
Osmium::Javascript::Template::Template | ( | const Template & | ) | [private] |
static v8::Handle<v8::Value> Osmium::Javascript::Template::accessor_getter | ( | v8::Local< v8::String > | , |
const v8::AccessorInfo & | info | ||
) | [inline, static] |
v8::Local<v8::Object> Osmium::Javascript::Template::create_instance | ( | void * | wrapped | ) | [inline] |
Create a Javascript object instance from the Javascript template wrapping a C++ object.
v8::Persistent<v8::Object> Osmium::Javascript::Template::create_persistent_instance | ( | TWrapped * | wrapped | ) | [inline] |
static void Osmium::Javascript::Template::free_instance | ( | v8::Persistent< v8::Value > | instance, |
void * | obj | ||
) | [inline, static] |
static v8::Handle<v8::Value> Osmium::Javascript::Template::function_template | ( | const v8::Arguments & | args | ) | [inline, static] |
static T& Osmium::Javascript::Template::get | ( | ) | [inline, static] |
static v8::Handle<v8::Value> Osmium::Javascript::Template::indexed_property_getter | ( | uint32_t | index, |
const v8::AccessorInfo & | info | ||
) | [inline, static] |
static v8::Handle<v8::Value> Osmium::Javascript::Template::indexed_property_getter | ( | uint32_t | index, |
const v8::AccessorInfo & | info | ||
) | [inline, static] |
v8::Handle<v8::Value> Osmium::Javascript::Template::js_undefined | ( | const v8::Arguments & | ) | [inline] |
Function that always returns undefined.
static v8::Handle<v8::Value> Osmium::Javascript::Template::named_property_getter | ( | v8::Local< v8::String > | property, |
const v8::AccessorInfo & | info | ||
) | [inline, static] |
static v8::Handle<v8::Array> Osmium::Javascript::Template::property_enumerator | ( | const v8::AccessorInfo & | info | ) | [inline, static] |
v8::Persistent<v8::ObjectTemplate> Osmium::Javascript::Template::js_template [protected] |