当前位置: 首页>>代码示例>>C++>>正文


C++ CObjRef::o_instanceof方法代码示例

本文整理汇总了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");
}
开发者ID:DenisBazhan,项目名称:hiphop-php,代码行数:9,代码来源:ext_iterator.cpp

示例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 */);
}
开发者ID:hashaash,项目名称:hiphop-php,代码行数:18,代码来源:ext_continuation.cpp

示例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);
}
开发者ID:hashaash,项目名称:hiphop-php,代码行数:21,代码来源:ext_continuation.cpp


注:本文中的CObjRef::o_instanceof方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。