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


C++ base_type::get_type_id方法代码示例

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


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

示例1: if

bool date_type::operator==(const base_type& rhs) const
{
    if (this == &rhs) {
        return true;
    } else if (rhs.get_type_id() != date_type_id) {
        return false;
    } else {
        // There is only one possibility for the date type (TODO: timezones!)
        return true;
    }
}
开发者ID:garaud,项目名称:libdynd,代码行数:11,代码来源:date_type.cpp

示例2: if

bool ndt::option_type::operator==(const base_type &rhs) const
{
  if (this == &rhs) {
    return true;
  } else if (rhs.get_type_id() != option_type_id) {
    return false;
  } else {
    const option_type *ot = static_cast<const option_type *>(&rhs);
    return m_value_tp == ot->m_value_tp;
  }
}
开发者ID:Laeeth,项目名称:libdynd,代码行数:11,代码来源:option_type.cpp

示例3: if

bool groupby_type::operator==(const base_type& rhs) const
{
    if (this == &rhs) {
        return true;
    } else if (rhs.get_type_id() != groupby_type_id) {
        return false;
    } else {
        const groupby_type *dt = static_cast<const groupby_type*>(&rhs);
        return m_value_type == dt->m_value_type && m_operand_type == dt->m_operand_type;
    }
}
开发者ID:aterrel,项目名称:libdynd,代码行数:11,代码来源:groupby_type.cpp

示例4: if

bool ndt::fixed_string_type::operator==(const base_type &rhs) const
{
  if (this == &rhs) {
    return true;
  } else if (rhs.get_type_id() != fixed_string_type_id) {
    return false;
  } else {
    const fixed_string_type *dt = static_cast<const fixed_string_type *>(&rhs);
    return m_encoding == dt->m_encoding && m_stringsize == dt->m_stringsize;
  }
}
开发者ID:Laeeth,项目名称:libdynd,代码行数:11,代码来源:fixed_string_type.cpp

示例5: if

bool byteswap_type::operator==(const base_type& rhs) const
{
    if (this == &rhs) {
        return true;
    } else if (rhs.get_type_id() != byteswap_type_id) {
        return false;
    } else {
        const byteswap_type *dt = static_cast<const byteswap_type*>(&rhs);
        return m_value_type == dt->m_value_type;
    }
}
开发者ID:nevermindewe,项目名称:libdynd,代码行数:11,代码来源:byteswap_type.cpp

示例6: if

bool ndt::callable_type::operator==(const base_type &rhs) const
{
  if (this == &rhs) {
    return true;
  } else if (rhs.get_type_id() != callable_type_id) {
    return false;
  } else {
    const callable_type *fpt = static_cast<const callable_type *>(&rhs);
    return m_return_type == fpt->m_return_type && m_pos_tuple == fpt->m_pos_tuple && m_kwd_struct == fpt->m_kwd_struct;
  }
}
开发者ID:michaelpacer,项目名称:libdynd,代码行数:11,代码来源:callable_type.cpp

示例7: if

bool ndt::typevar_type::operator==(const base_type &rhs) const
{
  if (this == &rhs) {
    return true;
  } else if (rhs.get_type_id() != typevar_type_id) {
    return false;
  } else {
    const typevar_type *tvt = static_cast<const typevar_type *>(&rhs);
    return m_name == tvt->m_name;
  }
}
开发者ID:gitter-badger,项目名称:libdynd,代码行数:11,代码来源:typevar_type.cpp

示例8: if

bool ndt::bytes_type::operator==(const base_type &rhs) const
{
  if (this == &rhs) {
    return true;
  } else if (rhs.get_type_id() != bytes_type_id) {
    return false;
  } else {
    const bytes_type *dt = static_cast<const bytes_type *>(&rhs);
    return m_alignment == dt->m_alignment;
  }
}
开发者ID:gitter-badger,项目名称:libdynd,代码行数:11,代码来源:bytes_type.cpp

示例9: if

bool ndt::pointer_type::operator==(const base_type &rhs) const
{
    if (this == &rhs) {
        return true;
    } else if (rhs.get_type_id() != pointer_type_id) {
        return false;
    } else {
        const pointer_type *dt = static_cast<const pointer_type *>(&rhs);
        return m_target_tp == dt->m_target_tp;
    }
}
开发者ID:gitter-badger,项目名称:libdynd,代码行数:11,代码来源:pointer_type.cpp

示例10: get_data_size

bool fixedbytes_type::operator==(const base_type& rhs) const
{
    if (this == &rhs) {
        return true;
    } else if (rhs.get_type_id() != fixedbytes_type_id) {
        return false;
    } else {
        const fixedbytes_type *dt = static_cast<const fixedbytes_type*>(&rhs);
        return get_data_size() == dt->get_data_size() && get_data_alignment() == dt->get_data_alignment();
    }
}
开发者ID:nevermindewe,项目名称:libdynd,代码行数:11,代码来源:fixedbytes_type.cpp

示例11: if

bool ndt::var_dim_type::operator==(const base_type &rhs) const
{
  if (this == &rhs) {
    return true;
  } else if (rhs.get_type_id() != var_dim_type_id) {
    return false;
  } else {
    const var_dim_type *dt = static_cast<const var_dim_type *>(&rhs);
    return m_element_tp == dt->m_element_tp;
  }
}
开发者ID:melodylail,项目名称:libdynd,代码行数:11,代码来源:var_dim_type.cpp

示例12: get_data_alignment

bool ndt::struct_type::operator==(const base_type &rhs) const
{
  if (this == &rhs) {
    return true;
  } else if (rhs.get_type_id() != struct_type_id) {
    return false;
  } else {
    const struct_type *dt = static_cast<const struct_type *>(&rhs);
    return get_data_alignment() == dt->get_data_alignment() && m_field_types.equals_exact(dt->m_field_types) &&
           m_field_names.equals_exact(dt->m_field_names) && m_variadic == dt->m_variadic;
  }
}
开发者ID:hainm,项目名称:libdynd,代码行数:12,代码来源:struct_type.cpp

示例13: if

bool cfixed_dim_type::operator==(const base_type &rhs) const
{
  if (this == &rhs) {
    return true;
  } else if (rhs.get_type_id() != cfixed_dim_type_id) {
    return false;
  } else {
    const cfixed_dim_type *dt = static_cast<const cfixed_dim_type *>(&rhs);
    return m_element_tp == dt->m_element_tp && m_dim_size == dt->m_dim_size &&
           m_stride == dt->m_stride;
  }
}
开发者ID:nevermindewe,项目名称:libdynd,代码行数:12,代码来源:cfixed_dim_type.cpp

示例14: if

bool ndt::pow_dimsym_type::operator==(const base_type &rhs) const
{
  if (this == &rhs) {
    return true;
  } else if (rhs.get_type_id() != pow_dimsym_type_id) {
    return false;
  } else {
    const pow_dimsym_type *tvt = static_cast<const pow_dimsym_type *>(&rhs);
    return m_exponent == tvt->m_exponent && m_base_tp == tvt->m_base_tp &&
           m_element_tp == tvt->m_element_tp;
  }
}
开发者ID:gmarkall,项目名称:libdynd,代码行数:12,代码来源:pow_dimsym_type.cpp

示例15: if

bool datetime_type::operator==(const base_type& rhs) const
{
    if (this == &rhs) {
        return true;
    } else if (rhs.get_type_id() != datetime_type_id) {
        return false;
    } else {
        const datetime_type& r = static_cast<const datetime_type &>(rhs);
        // TODO: When "other" timezone data is supported, need to compare them too
        return m_unit == r.m_unit && m_timezone == r.m_timezone;
    }
}
开发者ID:pombredanne,项目名称:libdynd,代码行数:12,代码来源:datetime_type.cpp


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