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


C++ TypeCode_ptr::length方法代码示例

本文整理汇总了C++中corba::TypeCode_ptr::length方法的典型用法代码示例。如果您正苦于以下问题:C++ TypeCode_ptr::length方法的具体用法?C++ TypeCode_ptr::length怎么用?C++ TypeCode_ptr::length使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在corba::TypeCode_ptr的用法示例。


在下文中一共展示了TypeCode_ptr::length方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: NO_IMPLEMENT

CORBA::TypeCode_ptr
TAO_Repository_i::get_canonical_typecode_i (CORBA::TypeCode_ptr tc)
{
  CORBA::TCKind kind = tc->kind ();

  switch (kind)
  {
    // For all the TCKinds not covered below, no change is needed.
    default:
      return CORBA::TypeCode::_duplicate (tc);
    case CORBA::tk_fixed:
      throw CORBA::NO_IMPLEMENT ();
    case CORBA::tk_array:
    {
      CORBA::ULong length = tc->length ();

      CORBA::TypeCode_var ctype = tc->content_type ();

      CORBA::TypeCode_var canon_ctype =
        this->get_canonical_typecode_i (ctype.in ());

      return this->tc_factory ()->create_array_tc (length,
                                                   canon_ctype.in ());
    }
    case CORBA::tk_sequence:
    {
      CORBA::ULong length = tc->length ();

      CORBA::TypeCode_var ctype = tc->content_type ();

      CORBA::TypeCode_var canon_ctype =
        this->get_canonical_typecode_i (ctype.in ());

      return this->tc_factory ()->create_sequence_tc (length,
                                                      canon_ctype.in ());
    }
    case CORBA::tk_alias:
    case CORBA::tk_objref:
    case CORBA::tk_struct:
    case CORBA::tk_union:
    case CORBA::tk_enum:
    case CORBA::tk_except:
    case CORBA::tk_value:
    case CORBA::tk_value_box:
    case CORBA::tk_native:
    case CORBA::tk_abstract_interface:
    case CORBA::tk_component:
    case CORBA::tk_home:
    {
      CORBA::String_var id = tc->id ();

      ACE_TString path;
      int status =
        this->config ()->get_string_value (this->repo_ids_key (),
                                           id.in (),
                                           path);

      // TODO - something in case the repo id is an empty string,
      //        or if it is not found in this repository
      if (status != 0)
        {
          return CORBA::TypeCode::_nil ();
        }

      ACE_Configuration_Section_Key key;
      this->config ()->expand_path (this->root_key (),
                                    path,
                                    key,
                                    0);

      // An ExceptionDef is not an IDLType.
      if (kind == CORBA::tk_except)
        {
          TAO_ExceptionDef_i impl (this->repo_);
          impl.section_key (key);
          return impl.type_i ();
        }
      else
        {
          TAO_IDLType_i *impl =
            TAO_IFR_Service_Utils::path_to_idltype (path,
                                                    this);
          impl->section_key (key);
          return impl->type_i ();
        }
    }
  }
}
开发者ID:asdlei00,项目名称:ACE,代码行数:88,代码来源:Repository_i.cpp

示例2: return

CORBA::Boolean
TAO::TypeCode::String<RefCountPolicy>::equal_i (CORBA::TypeCode_ptr tc) const
{
  // The following call won't throw since CORBA::TypeCode::equal() has
  // already established the kind of tc is the same as our kind.
  CORBA::ULong const tc_length = tc->length ();

  return (this->length_ == tc_length);
}
开发者ID:CCJY,项目名称:ATCD,代码行数:9,代码来源:String_TypeCode.cpp

示例3: BAD_TYPECODE

DynArrayImpl::DynArrayImpl(DynamicAny::DynAnyFactory_ptr factory, TIDorb::core::TIDORB* orb,
                           CORBA::TypeCode_ptr type, CORBA::TypeCode_ptr real_type)
  throw(CORBA::SystemException)
  : DynComposite(factory, orb, type, real_type)
{
  try {
        _component_count = real_type->length();
  } catch (const CORBA::TypeCode::BadKind& bk) {
        throw CORBA::BAD_TYPECODE();
  }
  this->TIDThr::RefCounter::_add_ref();
}
开发者ID:AlvaroVega,项目名称:TIDorbC,代码行数:12,代码来源:DynArrayImpl.C


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