1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Whitespace.

This commit is contained in:
Sergey Prigogin 2012-10-23 21:52:21 +02:00
parent 422dd2eb1d
commit eaecec4781
3 changed files with 30 additions and 30 deletions

View file

@ -7,7 +7,7 @@
* *
* Contributors: * Contributors:
* Markus Schorn - initial API and implementation * Markus Schorn - initial API and implementation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.dom.ast.cpp; package org.eclipse.cdt.core.dom.ast.cpp;
import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.IType;
@ -15,53 +15,53 @@ import org.eclipse.cdt.core.dom.ast.IValue;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
/** /**
* Models the value of a template parameter or for the argument of a template-id. * Models the value of a template parameter or for the argument of a template-id.
* Such a value can either be a type-value, or an integral value. * Such a value can either be a type-value, or an integral value.
* *
* @since 5.1 * @since 5.1
* @noextend This interface is not intended to be extended by clients. * @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients. * @noimplement This interface is not intended to be implemented by clients.
*/ */
public interface ICPPTemplateArgument { public interface ICPPTemplateArgument {
ICPPTemplateArgument[] EMPTY_ARGUMENTS = {}; ICPPTemplateArgument[] EMPTY_ARGUMENTS = {};
/** /**
* Returns whether this is an integral value, suitable for a template non-type parameter. * Returns whether this is an integral value, suitable for a template non-type parameter.
*/ */
boolean isNonTypeValue(); boolean isNonTypeValue();
/** /**
* Returns whether this is a type value, suitable for either a template type or a * Returns whether this is a type value, suitable for either a template type or a
* template template parameter. * template template parameter.
*/ */
boolean isTypeValue(); boolean isTypeValue();
/** /**
* If this is a type value (suitable for a template type and template template parameters), * If this is a type value (suitable for a template type and template template parameters),
* the type used as a value is returned. * the type used as a value is returned.
* For non-type values, <code>null</code> is returned. * For non-type values, <code>null</code> is returned.
*/ */
IType getTypeValue(); IType getTypeValue();
/** /**
* If this is a non-type value (suitable for a template non-type parameters), * If this is a non-type value (suitable for a template non-type parameters),
* the evaluation object is returned. * the evaluation object is returned.
* For type values, <code>null</code> is returned. * For type values, <code>null</code> is returned.
* @noreference This method is not intended to be referenced by clients. * @noreference This method is not intended to be referenced by clients.
*/ */
ICPPEvaluation getNonTypeEvaluation(); ICPPEvaluation getNonTypeEvaluation();
/** /**
* If this is a non-type value (suitable for a template non-type parameters), * If this is a non-type value (suitable for a template non-type parameters),
* the value is returned. * the value is returned.
* For type values, <code>null</code> is returned. * For type values, <code>null</code> is returned.
*/ */
IValue getNonTypeValue(); IValue getNonTypeValue();
/** /**
* If this is a non-type value (suitable for a template non-type parameter), * If this is a non-type value (suitable for a template non-type parameter),
* the type of the value is returned. * the type of the value is returned.
* For type values, <code>null</code> is returned. * For type values, <code>null</code> is returned.
*/ */
IType getTypeOfNonTypeValue(); IType getTypeOfNonTypeValue();
@ -69,7 +69,7 @@ public interface ICPPTemplateArgument {
* Checks whether two arguments denote the same value. * Checks whether two arguments denote the same value.
*/ */
boolean isSameValue(ICPPTemplateArgument arg); boolean isSameValue(ICPPTemplateArgument arg);
/** /**
* Returns whether this template argument is a pack expansion or not. * Returns whether this template argument is a pack expansion or not.
* @since 5.2 * @since 5.2

View file

@ -8,7 +8,7 @@
* Contributors: * Contributors:
* Markus Schorn - initial API and implementation * Markus Schorn - initial API and implementation
* Sergey Prigogin (Google) * Sergey Prigogin (Google)
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.cpp; package org.eclipse.cdt.internal.core.dom.parser.cpp;
import static org.eclipse.cdt.core.dom.ast.IASTExpression.ValueCategory.PRVALUE; import static org.eclipse.cdt.core.dom.ast.IASTExpression.ValueCategory.PRVALUE;
@ -34,11 +34,11 @@ public class CPPTemplateNonTypeArgument implements ICPPTemplateArgument {
evaluation.isTypeDependent() || evaluation.isValueDependent()) { evaluation.isTypeDependent() || evaluation.isValueDependent()) {
fEvaluation= evaluation; fEvaluation= evaluation;
} else { } else {
fEvaluation= new EvalFixed(evaluation.getTypeOrFunctionSet(point), fEvaluation= new EvalFixed(evaluation.getTypeOrFunctionSet(point),
evaluation.getValueCategory(point), evaluation.getValue(point)); evaluation.getValueCategory(point), evaluation.getValue(point));
} }
} }
public CPPTemplateNonTypeArgument(IValue value, IType type) { public CPPTemplateNonTypeArgument(IValue value, IType type) {
fEvaluation = new EvalFixed(type, PRVALUE, value); fEvaluation = new EvalFixed(type, PRVALUE, value);
} }
@ -67,12 +67,12 @@ public class CPPTemplateNonTypeArgument implements ICPPTemplateArgument {
public IValue getNonTypeValue() { public IValue getNonTypeValue() {
return fEvaluation.getValue(null); return fEvaluation.getValue(null);
} }
@Override @Override
public IType getTypeOfNonTypeValue() { public IType getTypeOfNonTypeValue() {
return fEvaluation.getTypeOrFunctionSet(null); return fEvaluation.getTypeOrFunctionSet(null);
} }
@Override @Override
public boolean isPackExpansion() { public boolean isPackExpansion() {
return fEvaluation.getTypeOrFunctionSet(null) instanceof ICPPParameterPackType; return fEvaluation.getTypeOrFunctionSet(null) instanceof ICPPParameterPackType;

View file

@ -8,7 +8,7 @@
* Contributors: * Contributors:
* Markus Schorn - initial API and implementation * Markus Schorn - initial API and implementation
* Sergey Prigogin (Google) * Sergey Prigogin (Google)
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.cpp; package org.eclipse.cdt.internal.core.dom.parser.cpp;
import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.IType;
@ -27,7 +27,7 @@ public class CPPTemplateTypeArgument implements ICPPTemplateArgument {
Assert.isNotNull(type); Assert.isNotNull(type);
fType= type; fType= type;
} }
@Override @Override
public boolean isTypeValue() { public boolean isTypeValue() {
return true; return true;
@ -47,17 +47,17 @@ public class CPPTemplateTypeArgument implements ICPPTemplateArgument {
public ICPPEvaluation getNonTypeEvaluation() { public ICPPEvaluation getNonTypeEvaluation() {
return null; return null;
} }
@Override @Override
public IValue getNonTypeValue() { public IValue getNonTypeValue() {
return null; return null;
} }
@Override @Override
public IType getTypeOfNonTypeValue() { public IType getTypeOfNonTypeValue() {
return null; return null;
} }
@Override @Override
public boolean isPackExpansion() { public boolean isPackExpansion() {
return fType instanceof ICPPParameterPackType; return fType instanceof ICPPParameterPackType;