![]() |
RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
#include <slot.h>
Public Member Functions | |
| Slot (Slot &&other) | |
| Slot & | operator= (Slot &&other) |
| void | swap (Slot &other) |
| Slot (const Slot &other) | |
| Slot & | operator= (const Slot &other) |
| template<typename Fn > | |
| Slot (const boost::function< Fn > &fn, Operations ops=FunctionOps< Fn >::ops, JS::JSOperations jsops=JS::getOps(typeid(Fn))) | |
| Slot (const v8::Handle< v8::Function > &fn) | |
| Slot (const v8::Handle< v8::Value > &fn) | |
| std::string | print () const |
| bool | isEmpty () const |
| template<typename CallAs , typename... Args> | |
| boost::function< CallAs > ::result_type | call (Args...args) const |
| v8::Handle< v8::Value > | call (const v8::Arguments &args) const |
| v8::Handle< v8::Value > | call (const v8::Handle< v8::Object > &This, int argc, v8::Handle< v8::Value > argv[]) const |
| v8::Local< v8::Function > | toJsFunction () const |
| const std::type_info & | type () const |
| template<typename Fn > | |
| boost::function< Fn > | as (JS::JSOperations jsops=0) const |
| template<typename Fn > | |
| operator boost::function< Fn > () const | |
| template<typename R > | |
| operator boost::function0< R > () const | |
Static Public Member Functions | |
| template<typename Fn , typename F > | |
| static Slot | fromF (const boost::function< F > &fn, Operations ops=FunctionOps< Fn >::ops, JS::JSOperations jsops=JS::getOps(typeid(Fn))) |
| template<typename Fn , typename F > | |
| static Slot | fromF (F fn, Operations ops=FunctionOps< Fn >::ops, JS::JSOperations jsops=JS::getOps(typeid(Fn))) |
Encapsulates a function that can be called with a specific argument list, without knowing the actual argument list.
Note that in the C++ world, the signatures under which we are calling and the signature of the wrapped function must match exactly (ie, no type coersion.
These can be:
| Datacratic::Slot::Slot | ( | const v8::Handle< v8::Function > & | fn | ) |
| Datacratic::Slot::Slot | ( | const v8::Handle< v8::Value > & | fn | ) |
| boost::function<Fn> Datacratic::Slot::as | ( | JS::JSOperations | jsops = 0 | ) | const [inline] |
| boost::function<CallAs>::result_type Datacratic::Slot::call | ( | Args... | args | ) | const [inline] |
Call from C++, knowing exactly what kinds of parameters there are.
Reimplemented in Datacratic::SlotT< Fn >, Datacratic::SlotT< void()>, and Datacratic::SlotT< void(std::string, std::string)>.
| v8::Handle< v8::Value > Datacratic::Slot::call | ( | const v8::Arguments & | args | ) | const |
| bool Datacratic::Slot::isEmpty | ( | ) | const [inline] |
| Datacratic::Slot::operator boost::function< Fn > | ( | ) | const [inline] |
Implicit conversion to boost::function<x>
Reimplemented in Datacratic::SlotT< Fn >.
| std::string Datacratic::Slot::print | ( | ) | const |
Print a string representation giving information about the slot.
Reimplemented in Datacratic::SlotT< Fn >, Datacratic::SlotT< void()>, and Datacratic::SlotT< void(std::string, std::string)>.
| v8::Local< v8::Function > Datacratic::Slot::toJsFunction | ( | ) | const |
Convert directly into a JS function. NOTE: this is slow; due to v8 limitations we need to actually parse a JS file each time.
If it was already a JS function, then that function is simply returned.
Definition at line 117 of file slot_js.cc.
| const std::type_info & Datacratic::Slot::type | ( | ) | const |
1.7.6.1