本文整理汇总了C++中Arguments::GetIsolate方法的典型用法代码示例。如果您正苦于以下问题:C++ Arguments::GetIsolate方法的具体用法?C++ Arguments::GetIsolate怎么用?C++ Arguments::GetIsolate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Arguments
的用法示例。
在下文中一共展示了Arguments::GetIsolate方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getInterpretedCode
void getInterpretedCode(const Arguments & args) {
DEBUG_MARKER(UDEB_DETAIL);
EscapableHandleScope scope(args.GetIsolate());
typedef NativeConstMethodCall_0_<const NdbInterpretedCode *, NdbScanFilter> NCALL;
NCALL ncall(& NdbScanFilter::getInterpretedCode, args);
ncall.wrapReturnValueAs(getConstNdbInterpretedCodeEnvelope());
ncall.run();
args.GetReturnValue().Set(scope.Escape(ncall.jsReturnVal()));
}
示例2: GetTableCall
/* Constructor */
GetTableCall(const Arguments &args) :
NativeCFunctionCall_3_<int, SessionImpl *, const char *, const char *>(NULL, args),
ndb_table(0), per_table_ndb(0), idx_list(), fk_list(), fk_count(0),
isolate(args.GetIsolate())
{
ndb = arg0->ndb;
dbName = arg1;
tableName = arg2;
}
示例3: queryFetchAllResults
// fetchAllResults()
// ASYNC
void queryFetchAllResults(const Arguments &args) {
EscapableHandleScope scope(args.GetIsolate());
REQUIRE_ARGS_LENGTH(1);
typedef NativeMethodCall_0_<int, QueryOperation> MCALL;
MCALL * mcallptr = new MCALL(& QueryOperation::fetchAllResults, args);
mcallptr->errorHandler = getNdbErrorIfLessThanZero;
mcallptr->runAsync();
args.GetReturnValue().SetUndefined();
}
示例4: queryPrepareAndExecute
// void prepareAndExecute()
// ASYNC
void queryPrepareAndExecute(const Arguments &args) {
EscapableHandleScope scope(args.GetIsolate());
DEBUG_MARKER(UDEB_DEBUG);
REQUIRE_ARGS_LENGTH(1);
typedef NativeMethodCall_0_<int, QueryOperation> MCALL;
MCALL * mcallptr = new MCALL(& QueryOperation::prepareAndExecute, args);
mcallptr->errorHandler = getNdbErrorIfLessThanZero;
mcallptr->runAsync();
args.GetReturnValue().SetUndefined();
}
示例5: Ndb_cluster_connection_node_id
/* unsigned node_id();
IMMEDIATE
*/
void Ndb_cluster_connection_node_id(const Arguments &args) {
DEBUG_MARKER(UDEB_DETAIL);
EscapableHandleScope scope(args.GetIsolate());
REQUIRE_ARGS_LENGTH(0);
typedef NativeMethodCall_0_<unsigned int, Ndb_cluster_connection> MCALL;
MCALL mcall(& Ndb_cluster_connection::node_id, args);
mcall.run();
args.GetReturnValue().Set(mcall.jsReturnVal());
}
示例6: setNull_wrapper
void setNull_wrapper(const Arguments &args) {
DEBUG_MARKER(UDEB_DEBUG);
EscapableHandleScope scope(args.GetIsolate());
REQUIRE_ARGS_LENGTH(2);
typedef NativeVoidConstMethodCall_2_<const Record, int, char *> NCALL;
NCALL ncall(& Record::setNull, args);
ncall.run();
args.GetReturnValue().Set(scope.Escape(ncall.jsReturnVal()));
}
示例7: getBufferSize_wrapper
void getBufferSize_wrapper(const Arguments &args) {
DEBUG_MARKER(UDEB_DETAIL);
EscapableHandleScope scope(args.GetIsolate());
REQUIRE_ARGS_LENGTH(0);
typedef NativeConstMethodCall_0_<size_t, const Record> NCALL;
NCALL ncall(& Record::getBufferSize, args);
ncall.run();
args.GetReturnValue().Set(scope.Escape(ncall.jsReturnVal()));
}
示例8: get_latest_error_msg_wrapper
void get_latest_error_msg_wrapper(const Arguments &args) {
DEBUG_MARKER(UDEB_DETAIL);
EscapableHandleScope scope(args.GetIsolate());
REQUIRE_ARGS_LENGTH(0);
typedef NativeConstMethodCall_0_<const char *, Ndb_cluster_connection> MCALL;
MCALL mcall(& Ndb_cluster_connection::get_latest_error_msg, args);
mcall.wrapReturnValueAs(& ErrorMessageEnvelope);
mcall.run();
args.GetReturnValue().Set(mcall.jsReturnVal());
}
示例9: record_encoderRead
/* read(columnNumber, buffer)
*/
void record_encoderRead(const Arguments & args) {
EscapableHandleScope scope(args.GetIsolate());
const Record * record = unwrapPointer<Record *>(args.Holder());
int columnNumber = args[0]->Uint32Value();
char * buffer = node::Buffer::Data(args[1]->ToObject());
const NdbDictionary::Column * col = record->getColumn(columnNumber);
size_t offset = record->getColumnOffset(columnNumber);
const NdbTypeEncoder * encoder = getEncoderForColumn(col);
Local<Value> read = encoder->read(col, buffer, offset);
args.GetReturnValue().Set(scope.Escape(read));
}
示例10: newNdbScanFilter
void newNdbScanFilter(const Arguments & args) {
DEBUG_MARKER(UDEB_DETAIL);
EscapableHandleScope scope(args.GetIsolate());
PROHIBIT_CONSTRUCTOR_CALL();
REQUIRE_ARGS_LENGTH(1);
JsValueConverter<NdbInterpretedCode *> arg0(args[0]);
NdbScanFilter * f = new NdbScanFilter(arg0.toC());
Local<Value> jsObject = NdbScanFilterEnvelope.wrap(f);
NdbScanFilterEnvelope.freeFromGC(f, jsObject);
args.GetReturnValue().Set(scope.Escape(jsObject));
}
示例11: handle_scope
Handle<Value> JSN_Print(const Arguments& args) {
HandleScope handle_scope(args.GetIsolate());
bool first = true;
for (int i = 0; i < args.Length(); i++) {
if (first) {
first = false;
} else {
printf(" ");
}
String::Utf8Value str(args[i]);
const char* cstr = ToCString(str);
printf("%s", cstr);
}
printf("\n");
fflush(stdout);
return Undefined();
}
示例12: getRecordForMapping
/* arg0: TableMetadata wrapping NdbDictionary::Table *
arg1: Ndb *
arg2: number of columns
arg3: array of NdbDictionary::Column *
*/
void getRecordForMapping(const Arguments &args) {
DEBUG_MARKER(UDEB_DEBUG);
EscapableHandleScope scope(args.GetIsolate());
const NdbDictionary::Table *table =
unwrapPointer<const NdbDictionary::Table *>(args[0]->ToObject());
Ndb * ndb = unwrapPointer<Ndb *>(args[1]->ToObject());
unsigned int nColumns = args[2]->Int32Value();
Record * record = new Record(ndb->getDictionary(), nColumns);
for(unsigned int i = 0 ; i < nColumns ; i++) {
const NdbDictionary::Column * col =
unwrapPointer<const NdbDictionary::Column *>
(args[3]->ToObject()->Get(i)->ToObject());
record->addColumn(col);
}
record->completeTableRecord(table);
args.GetReturnValue().Set(scope.Escape(Record_Wrapper(record)));
}
示例13: Ndb_cluster_connection_wait_until_ready
/* int wait_until_ready(int timeout_for_first_alive,
int timeout_after_first_alive,
callback);
2 args SYNC / 3 args ASYNC
*/
void Ndb_cluster_connection_wait_until_ready(const Arguments &args) {
DEBUG_MARKER(UDEB_DETAIL);
EscapableHandleScope scope(args.GetIsolate());
args.GetReturnValue().SetUndefined();
REQUIRE_MIN_ARGS(2);
REQUIRE_MAX_ARGS(3);
typedef NativeMethodCall_2_<int, Ndb_cluster_connection, int, int> MCALL;
if(args.Length() == 3) {
MCALL * mcallptr = new MCALL(& Ndb_cluster_connection::wait_until_ready, args);
mcallptr->runAsync();
}
else {
MCALL mcall(& Ndb_cluster_connection::wait_until_ready, args);
mcall.run();
args.GetReturnValue().Set(mcall.jsReturnVal());
};
}
示例14: Ndb_cluster_connection_new_wrapper
/* Ndb_cluster_connection(const char * connectstring = 0);
*/
void Ndb_cluster_connection_new_wrapper(const Arguments &args) {
DEBUG_MARKER(UDEB_DETAIL);
EscapableHandleScope scope(args.GetIsolate());
REQUIRE_CONSTRUCTOR_CALL();
REQUIRE_ARGS_LENGTH(1);
JsValueConverter<const char *> arg0(args[0]);
Ndb_cluster_connection * c = new Ndb_cluster_connection(arg0.toC());
/* We do not expose set_max_adaptive_send_time() to JavaScript nor even
consider using the default value of 10 ms.
*/
c->set_max_adaptive_send_time(1);
Local<Value> wrapper = NdbccEnvelope.wrap(c);
NdbccEnvelope.freeFromGC(c, wrapper);
args.GetReturnValue().Set(wrapper);
}
示例15: Ndb_cluster_connection_connect
/* int connect(int no_retries=30, int retry_delay_in_seconds=1, int verbose=0);
3 args SYNC / 4 args ASYNC
*/
void Ndb_cluster_connection_connect(const Arguments &args) {
DEBUG_MARKER(UDEB_DETAIL);
EscapableHandleScope scope(args.GetIsolate());
args.GetReturnValue().SetUndefined();
REQUIRE_MIN_ARGS(3);
REQUIRE_MAX_ARGS(4);
typedef NativeMethodCall_3_ <int, Ndb_cluster_connection, int, int, int> MCALL;
if(args.Length() == 4) {
DEBUG_PRINT_DETAIL("async");
MCALL * mcallptr = new MCALL(& Ndb_cluster_connection::connect, args);
mcallptr->runAsync();
}
else {
DEBUG_PRINT_DETAIL("sync");
MCALL mcall(& Ndb_cluster_connection::connect, args);
mcall.run();
args.GetReturnValue().Set(mcall.jsReturnVal());
}
}