本文整理汇总了C++中CObjRef::o_instanceof方法的典型用法代码示例。如果您正苦于以下问题:C++ CObjRef::o_instanceof方法的具体用法?C++ CObjRef::o_instanceof怎么用?C++ CObjRef::o_instanceof使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CObjRef
的用法示例。
在下文中一共展示了CObjRef::o_instanceof方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: f_hphp_recursiveiteratoriterator___construct
Object f_hphp_recursiveiteratoriterator___construct(CObjRef obj, CObjRef iterator, int64 mode, int64 flags) {
if (iterator->o_instanceof("RecursiveDirectoryIterator")) {
CVarRef rsrc = iterator->o_get("rsrc", true, "SplFileInfo");
obj->o_set("rsrc", NEWOBJ(RecursiveIteratorIterator)(rsrc, mode, flags),
"RecursiveIteratorIterator");
return obj;
}
throw NotImplementedException("this type of iterator");
}
示例2: f_hphp_unpack_continuation
void f_hphp_unpack_continuation(CObjRef continuation) {
if (hhvm) {
throw_fatal("hphp_unpack_continuation is not supported under hhvm");
}
if (UNLIKELY(!continuation->o_instanceof("GenericContinuation"))) {
throw_fatal(
"Cannot call hphp_unpack_continuation with a "
"non-GenericContinuation object");
}
Eval::VariableEnvironment *env =
FrameInjection::GetVariableEnvironment(true);
if (UNLIKELY(!env)) {
throw_fatal("Invalid call hphp_unpack_continuation");
}
p_GenericContinuation c(
static_cast<c_GenericContinuation*>(continuation.get()));
extract(env, c->t_getvars(), 256 /* EXTR_REFS */);
}
示例3: f_hphp_pack_continuation
void f_hphp_pack_continuation(CObjRef continuation,
int64 label, CVarRef value) {
if (hhvm) {
throw_fatal("hphp_pack_continuation is not supported under hhvm");
}
if (UNLIKELY(!continuation->o_instanceof("GenericContinuation"))) {
throw_fatal(
"Cannot call hphp_pack_continuation with a "
"non-GenericContinuation object");
}
Array definedVariables;
Eval::VariableEnvironment *env =
FrameInjection::GetVariableEnvironment(true);
if (UNLIKELY(!env)) {
throw_fatal("Invalid call hphp_pack_continuation");
}
definedVariables = env->getDefinedVariables();
p_GenericContinuation c(
static_cast<c_GenericContinuation*>(continuation.get()));
c->t_update(label, value, definedVariables);
}