@Override public int getStartOffset() { return lastType.getStartOffset(); }
@Override public int getStartOffset() { return instantiatedType.getStartOffset(); }
@Override public int getStartOffset() { return type.getStartOffset(); }
@Override public int getStartOffset() { return type.getStartOffset(); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o instanceof CsmType) { CsmType t = (CsmType) o; return delegate.equals(t) && container.equals(t.getContainingFile()) && (start == t.getStartOffset()) && (end == t.getEndOffset()); } return false; }
public TypeBasedSpecializationParameterImpl(CsmType type, CsmScope scope) { super(type.getContainingFile(), type.getStartOffset(), type.getEndOffset()); this.type = type; if ((scope instanceof CsmIdentifiable)) { this.scope = UIDCsmConverter.scopeToUID(scope); } else { this.scope = null; } }
protected CsmClassifier getCastOperatorCastEntity(CsmFunction operator) { assert CsmKindUtilities.isCastOperator(operator) : "Must be cast operator!"; // NOI18N CsmType retType = operator.getReturnType(); CsmClassifier castClassifier = retType != null ? CsmClassifierResolver.getDefault().getTypeClassifier(retType, retType.getContainingFile(), retType.getStartOffset(), true) : null; if (!checkResolvedClassifier(castClassifier) || (CsmKindUtilities.isTemplateParameter(castClassifier) && !retType.isTemplateBased())) { retType = CsmExpressionResolver.resolveType(retType.getText(), retType.getContainingFile(), retType.getStartOffset(), null); castClassifier = retType != null ? CsmClassifierResolver.getDefault().getTypeClassifier(retType, retType.getContainingFile(), retType.getStartOffset(), true) : null; } if (!checkResolvedClassifier(castClassifier)) { castClassifier = null; } return castClassifier; }
retType.getClassifierText(), retType.getContainingFile(), retType.getStartOffset(), ctx.getContextScope(), instantiations
private static CsmType getOverloadedOperatorReturnType(CsmType type, CsmFile contextFile, int offset, CsmFunction.OperatorKind operator, int level) { if (type == null || type.isPointer() || type.getArrayDepth() > 0) { return null; } CsmType opType = null; CsmClassifier cls = getClassifier(type, contextFile, offset); if (CsmKindUtilities.isClass(cls)) { CsmFunction op = CsmCompletionQuery.getOperator((CsmClass) cls, contextFile, offset, operator); if (op != null) { opType = op.getReturnType(); if ((!type.equals(opType)) && (level > 0)) { if (operator == CsmFunction.OperatorKind.ARROW) { // recursion only for -> CsmType opType2 = getOverloadedOperatorReturnType(opType, contextFile, offset, operator, level - 1); if (opType2 != null) { opType = opType2; } } } else { CsmFile typeFile = type.getContainingFile(); System.err.printf("circular pointer delegation detected:%s, line %d/n", (typeFile != null ? typeFile.getAbsolutePath() : type), type.getStartOffset());//NOI18N CndUtils.assertTrueInConsole(false, "Infinite recursion in file " + typeFile + " type " + type); //NOI18N } } } return opType; }
TypeImpl(CsmType type) { super(type.getContainingFile(), type.getStartOffset(), type.getEndOffset()); this.pointerDepth = (byte) type.getPointerDepth(); this.constQualifiers = type.isConst() ? 1 : 0; setFlags(FLAGS_REFERENCE, type.isReference()); this.arrayDepth = (byte) type.getArrayDepth(); setFlags(FLAGS_CONST, type.isConst()); if (type instanceof TypeImpl) { TypeImpl ti = (TypeImpl) type; setFlags(FLAGS_TYPE_OF_TYPEDEF, ti.isTypeOfTypedef()); setFlags(FLAGS_TYPE_WITH_CLASSIFIER, ti.isTypeWithClassifier()); this.classifierUID = ti.classifierUID; this.qname = ti.qname; this.classifierText = ti.classifierText; addAllInstantiationParams(ti.instantiationParams); } trimInstantiationParams(); }
type = new DeclTypeImpl(typeStart, file, scope, pointerDepth, refence, arrayDepth, TypeImpl.initConstQualifiers(ast), TypeImpl.getStartOffset(ast), TypeImpl.getEndOffset(ast, inFunctionParameters)); } else if (parent != null) { type = NestedType.create(parent, file, parent.getPointerDepth(), getReferenceValue(parent), parent.getArrayDepth(), parent.isConst(), parent.getStartOffset(), parent.getEndOffset()); } else if (TypeFunPtrImpl.isFunctionPointerParamList(asts, inFunctionParameters, inTypedef)) { type = new TypeFunPtrImpl(file, returnTypePointerDepth, refence, arrayDepth, TypeImpl.initIsConst(ast), TypeImpl.getStartOffset(ast), TypeFunPtrImpl.getEndOffset(ast));
returnType.getArrayDepth(), returnType.isConst(), returnType.getStartOffset(), parametersList.getEndOffset(), parameters,