Exemple #1
0
    StdProperty* TypeBasic::FindProperty( const wchar_t* name )
    {
        StdProperty*    prop = NULL;

        if ( IsIntegral() )
        {
            prop = FindIntProperty( name );
            if ( prop != NULL )
                return prop;
        }

        if ( IsFloatingPoint() )
        {
            prop = FindFloatProperty( name );
            if ( prop != NULL )
                return prop;
        }

        return Type::FindProperty( name );
    }
Exemple #2
0
bool ezVariant::operator==(const ezVariant& other) const
{
  if (IsFloatingPoint(m_Type) && IsNumber(other.m_Type))
  {
    return ConvertNumber<double>() == other.ConvertNumber<double>();
  }
  else if (IsNumber(m_Type) && IsNumber(other.m_Type))
  {
    return ConvertNumber<ezInt64>() == other.ConvertNumber<ezInt64>();
  }
  else if (m_Type == other.m_Type)
  {
    CompareFunc compareFunc;
    compareFunc.m_pThis = this;
    compareFunc.m_pOther = &other;

    DispatchTo(compareFunc, GetType());

    return compareFunc.m_bResult;
  }
    
  return false;
}