本文整理汇总了C++中Local::Delete方法的典型用法代码示例。如果您正苦于以下问题:C++ Local::Delete方法的具体用法?C++ Local::Delete怎么用?C++ Local::Delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Local
的用法示例。
在下文中一共展示了Local::Delete方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getView
Ti::TiValue Ti::TiViewProxy::remove(Ti::TiValue value)
{
Ti::TiValue val;
val.setUndefined();
Ti::TiViewProxy *childProxy = static_cast<Ti::TiViewProxy*>(value.toProxy());
if(!_childViewsProxies.contains(childProxy)) return val;
Ti::TiView* childView = childProxy->getView();
Ti::TiView* thisView = getView();
childProxy->makeWeak();
thisView->remove(childView);
_childViewsProxies.removeOne(childProxy);
childProxy->_parentProxy = NULL;
Local<Value> children = _jsObject->Get(String::New("children"));
if(!children.IsEmpty() && !children->IsUndefined())
{
Local<Array> array = Local<Array>::Cast(children);
for(int i = 0, len = array->Length(); i < len; i++) {
if(array->Get(i) == value.toJSValue())
{
array->Delete(i);
break;
}
}
}
return val;
}
示例2: handle_scope
tjs_error
TJSInstance::remove(Isolate *isolate, Local<Object> &obj, const tjs_char *membername)
{
if (!membername) {
return TJS_E_NOTIMPL;
}
HandleScope handle_scope(isolate);
Context::Scope context_scope(getContext());
TryCatch try_catch;
return obj->Delete(String::NewFromTwoByte(isolate, membername)) ? TJS_S_OK : TJS_S_FALSE;
}
示例3: imp
static gboolean
gum_v8_module_handle_import_match (const GumImportDetails * details,
gpointer user_data)
{
GumV8ImportsContext * ctx =
static_cast<GumV8ImportsContext *> (user_data);
Isolate * isolate = ctx->isolate;
Local<Context> jc = isolate->GetCurrentContext ();
PropertyAttribute attrs =
static_cast<PropertyAttribute> (ReadOnly | DontDelete);
Local<Object> imp (ctx->imp->Clone ());
switch (details->type)
{
case GUM_IMPORT_FUNCTION:
{
/* the default value in our template */
break;
}
case GUM_IMPORT_VARIABLE:
{
Maybe<bool> success = imp->ForceSet (jc, ctx->type, ctx->variable, attrs);
g_assert (success.IsJust ());
break;
}
case GUM_IMPORT_UNKNOWN:
{
Maybe<bool> success = imp->Delete (jc, ctx->type);
g_assert (success.IsJust ());
break;
}
default:
{
g_assert_not_reached ();
break;
}
}
Maybe<bool> success = imp->ForceSet (jc,
ctx->name,
String::NewFromOneByte (isolate,
reinterpret_cast<const uint8_t *> (details->name)),
attrs);
g_assert (success.IsJust ());
if (details->module != NULL)
{
success = imp->ForceSet (jc,
ctx->module,
String::NewFromOneByte (isolate,
reinterpret_cast<const uint8_t *> (details->module)),
attrs);
g_assert (success.IsJust ());
}
else
{
success = imp->Delete (jc, ctx->module);
g_assert (success.IsJust ());
}
if (details->address != 0)
{
success = imp->ForceSet (jc,
ctx->address,
_gum_v8_native_pointer_new (GSIZE_TO_POINTER (details->address),
ctx->self->core),
attrs);
g_assert (success.IsJust ());
}
else
{
success = imp->Delete (jc, ctx->address);
g_assert (success.IsJust ());
}
Handle<Value> argv[] = {
imp
};
Local<Value> result = ctx->on_match->Call (ctx->receiver, 1, argv);
gboolean proceed = TRUE;
if (!result.IsEmpty () && result->IsString ())
{
String::Utf8Value str (result);
proceed = (strcmp (*str, "stop") != 0);
}
return proceed;
}