@Override public boolean isRValueReference() { return type.isRValueReference(); }
@Override public boolean isRValueReference() { return delegate.isRValueReference(); }
@Override public boolean isRValueReference() { return type.isRValueReference(); }
@Override public boolean isRValueReference() { if (instantiationHappened()) { return originalType.isRValueReference() || instantiatedType.isRValueReference(); } else { return originalType.isRValueReference(); } }
static int getReferenceValue(CsmType type) { if (type.isRValueReference()) { return 2; } else if (type.isReference()) { return 1; } return 0; } }
public boolean isRValueReference(List<CsmInstantiation> instantiations) { CsmType type = resolve(); return type != null ? type.isRValueReference(): false; }
private static boolean isRValueReferenceImpl(CsmType type, List<CsmInstantiation> instantiations) { if (type instanceof Decltype) { return ((Decltype) type).isRValueReference(instantiations); } else if (type instanceof DeclTypeImpl) { return ((DeclTypeImpl) type).isRValueReference(instantiations); } else { return type.isRValueReference(); } } }
static int getReferenceValue(CsmType type) { return getReferenceValue(type.isReference(), type.isRValueReference()); }
@Override public boolean check(CsmType value) { if (value.isReference()) { if (value.isRValueReference()) { qualificators.add(Qualificator.RVALUE_REFERENCE); } else { qualificators.add(Qualificator.REFERENCE); } } for (int i = 0; i < value.getArrayDepth(); i++) { qualificators.add(Qualificator.ARRAY); } for (int i = 0; i < value.getPointerDepth(); i++) { qualificators.add(Qualificator.POINTER); } if (value.isConst()) { qualificators.add(Qualificator.CONST); } return false; } }
if (decorator.isRValueReference()) { sb.append("&&"); // NOI18N } else if( decorator.isReference() ) {
private static int checkReference(CsmType type) { int iteration = MAX_DEPTH; while (type != null && iteration != 0) { if (type.isReference()) { if (type.isRValueReference()) { return 2; } return 1; } CsmClassifier cls = type.getClassifier(); if (CsmKindUtilities.isTypedef(cls) || CsmKindUtilities.isTypeAlias(cls)) { CsmTypedef td = (CsmTypedef) cls; type = td.getType(); } else { break; } iteration--; } return 0; }
public static CsmType createType(CsmType type, int pointerDepth, int reference, int arrayDepth, boolean _const) { if(type.getPointerDepth() == pointerDepth && type.isReference() == (reference > 0) && type.isRValueReference() == (reference == 2) && type.getArrayDepth() == arrayDepth && type.isConst() == _const) { return type; } if(type instanceof NestedType) { return new NestedType((NestedType)type, pointerDepth, reference, arrayDepth, _const); } if(type instanceof TypeFunPtrImpl) { return new TypeFunPtrImpl((TypeFunPtrImpl)type, pointerDepth, reference, arrayDepth, _const); } if(type instanceof TemplateParameterTypeImpl) { return new TemplateParameterTypeImpl((TemplateParameterTypeImpl)type, pointerDepth, reference, arrayDepth, _const); } if(type instanceof TypeImpl) { return new TypeImpl((TypeImpl)type, pointerDepth, reference, arrayDepth, _const); } if (type instanceof CsmTemplateParameterType) { return new TemplateParameterTypeWrapper(type, pointerDepth, reference, arrayDepth, _const); } return new TypeWrapper(type, pointerDepth, reference, arrayDepth, _const); }