Example #1
0
  @Override
  public boolean isSameType(IType t) {
    if (t == this) return true;

    if (t instanceof ITypedef) return type.isSameType(((ITypedef) t).getType());
    return type.isSameType(t);
  }
Example #2
0
  @Override
  public boolean isSameType(IType type) {
    if (type == this) return true;
    if (type instanceof ITypedef) return type.isSameType(this);

    return false;
  }
  @Override
  public boolean isSameType(IType type) {
    if (type instanceof ITypedef) {
      return type.isSameType(this);
    }

    if (type instanceof PDOMNode) {
      PDOMNode node = (PDOMNode) type;
      if (node.getPDOM() == getPDOM()) {
        return node.getRecord() == getRecord();
      }
    }

    if (type instanceof IEnumeration) {
      IEnumeration etype = (IEnumeration) type;
      char[] nchars = etype.getNameCharArray();
      if (nchars.length == 0) {
        nchars = ASTTypeUtil.createNameForAnonymous(etype);
      }
      if (nchars == null || !CharArrayUtils.equals(nchars, getNameCharArray())) return false;

      return SemanticUtil.haveSameOwner(this, etype);
    }
    return false;
  }
  @Override
  public boolean isSameType(IType type) {
    if (type instanceof ITypedef) {
      return type.isSameType(this);
    }

    if (!(type instanceof ICPPTemplateTypeParameter)) return false;

    return getParameterID() == ((ICPPTemplateParameter) type).getParameterID();
  }
Example #5
0
  @Override
  public boolean isSameType(IType type) {
    IType myrtype = getType();
    if (myrtype == null) return false;

    if (type instanceof ITypedef) {
      type = ((ITypedef) type).getType();
    }
    return myrtype.isSameType(type);
  }
  @Override
  public boolean isSameType(IType type) {
    if (type == this) return true;
    if (type instanceof ITypedef) return type.isSameType(this);

    if (type instanceof ICPPClassTemplatePartialSpecializationSpecialization) {
      return CPPClassTemplatePartialSpecialization.isSamePartialClassSpecialization(
          this, (ICPPClassTemplatePartialSpecializationSpecialization) type);
    }
    return false;
  }
Example #7
0
  @Override
  public boolean isSameType(IType obj) {
    if (obj == this) return true;
    if (obj instanceof ITypedef) return ((ITypedef) obj).isSameType(this);

    if (obj instanceof ICPPParameterPackType) {
      final ICPPParameterPackType rhs = (ICPPParameterPackType) obj;
      IType t1 = getType();
      IType t2 = rhs.getType();
      return t1 != null && t1.isSameType(t2);
    }
    return false;
  }
Example #8
0
 public boolean isSameType(IType t) {
   if (t == this) return true;
   if (t instanceof ITypedef) return t.isSameType(this);
   if (t instanceof ICArrayType) {
     ICArrayType at = (ICArrayType) t;
     if (at.isConst() == isConst
         && at.isRestrict() == isRestrict
         && at.isStatic() == isStatic
         && at.isVolatile() == isVolatile
         && at.isVariableLength() == isVariableLength) {
       return at.isSameType(type);
     }
   }
   return false;
 }
  @Override
  public boolean isSameType(IType type) {
    if (type == this) return true;

    if (type instanceof ITypedef) return type.isSameType(this);

    if (type instanceof PDOMNode) {
      PDOMNode node = (PDOMNode) type;
      if (node.getPDOM() == getPDOM()) {
        return node.getRecord() == getRecord();
      }
    }

    // require a class specialization
    if (!(type instanceof ICPPClassSpecialization)) return false;

    return CPPClassSpecialization.isSameClassSpecialization(this, (ICPPClassSpecialization) type);
  }
Example #10
0
 @Override
 public boolean isSameType(IType other) {
   return type.isSameType(other);
 }
 public boolean isSameValue(ICPPTemplateArgument arg) {
   if (fValue != null) {
     return fValue.equals(arg.getNonTypeValue());
   }
   return fType.isSameType(arg.getTypeValue());
 }