mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Whitespace.
This commit is contained in:
parent
422dd2eb1d
commit
eaecec4781
3 changed files with 30 additions and 30 deletions
|
@ -7,7 +7,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* Markus Schorn - initial API and implementation
|
||||
*******************************************************************************/
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast.cpp;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
*
|
||||
* @since 5.1
|
||||
* @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 {
|
||||
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();
|
||||
|
||||
/**
|
||||
* Returns whether this is a type value, suitable for either a template type or a
|
||||
* template template parameter.
|
||||
* Returns whether this is a type value, suitable for either a template type or a
|
||||
* template template parameter.
|
||||
*/
|
||||
boolean isTypeValue();
|
||||
|
||||
/**
|
||||
* If this is a type value (suitable for a template type and template template parameters),
|
||||
* the type used as a value is returned.
|
||||
* For non-type values, <code>null</code> is returned.
|
||||
* If this is a type value (suitable for a template type and template template parameters),
|
||||
* the type used as a value is returned.
|
||||
* For non-type values, <code>null</code> is returned.
|
||||
*/
|
||||
IType getTypeValue();
|
||||
|
||||
|
||||
/**
|
||||
* If this is a non-type value (suitable for a template non-type parameters),
|
||||
* the evaluation object is returned.
|
||||
* For type values, <code>null</code> is returned.
|
||||
* If this is a non-type value (suitable for a template non-type parameters),
|
||||
* the evaluation object is returned.
|
||||
* For type values, <code>null</code> is returned.
|
||||
* @noreference This method is not intended to be referenced by clients.
|
||||
*/
|
||||
ICPPEvaluation getNonTypeEvaluation();
|
||||
|
||||
|
||||
/**
|
||||
* If this is a non-type value (suitable for a template non-type parameters),
|
||||
* the value is returned.
|
||||
* For type values, <code>null</code> is returned.
|
||||
* If this is a non-type value (suitable for a template non-type parameters),
|
||||
* the value is returned.
|
||||
* For type values, <code>null</code> is returned.
|
||||
*/
|
||||
IValue getNonTypeValue();
|
||||
|
||||
/**
|
||||
* If this is a non-type value (suitable for a template non-type parameter),
|
||||
* 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();
|
||||
|
||||
|
@ -69,7 +69,7 @@ public interface ICPPTemplateArgument {
|
|||
* Checks whether two arguments denote the same value.
|
||||
*/
|
||||
boolean isSameValue(ICPPTemplateArgument arg);
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether this template argument is a pack expansion or not.
|
||||
* @since 5.2
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* Contributors:
|
||||
* Markus Schorn - initial API and implementation
|
||||
* Sergey Prigogin (Google)
|
||||
*******************************************************************************/
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
||||
|
||||
import static org.eclipse.cdt.core.dom.ast.IASTExpression.ValueCategory.PRVALUE;
|
||||
|
@ -34,11 +34,11 @@ public class CPPTemplateNonTypeArgument implements ICPPTemplateArgument {
|
|||
evaluation.isTypeDependent() || evaluation.isValueDependent()) {
|
||||
fEvaluation= evaluation;
|
||||
} else {
|
||||
fEvaluation= new EvalFixed(evaluation.getTypeOrFunctionSet(point),
|
||||
fEvaluation= new EvalFixed(evaluation.getTypeOrFunctionSet(point),
|
||||
evaluation.getValueCategory(point), evaluation.getValue(point));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public CPPTemplateNonTypeArgument(IValue value, IType type) {
|
||||
fEvaluation = new EvalFixed(type, PRVALUE, value);
|
||||
}
|
||||
|
@ -67,12 +67,12 @@ public class CPPTemplateNonTypeArgument implements ICPPTemplateArgument {
|
|||
public IValue getNonTypeValue() {
|
||||
return fEvaluation.getValue(null);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IType getTypeOfNonTypeValue() {
|
||||
return fEvaluation.getTypeOrFunctionSet(null);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isPackExpansion() {
|
||||
return fEvaluation.getTypeOrFunctionSet(null) instanceof ICPPParameterPackType;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* Contributors:
|
||||
* Markus Schorn - initial API and implementation
|
||||
* Sergey Prigogin (Google)
|
||||
*******************************************************************************/
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
|
@ -27,7 +27,7 @@ public class CPPTemplateTypeArgument implements ICPPTemplateArgument {
|
|||
Assert.isNotNull(type);
|
||||
fType= type;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isTypeValue() {
|
||||
return true;
|
||||
|
@ -47,17 +47,17 @@ public class CPPTemplateTypeArgument implements ICPPTemplateArgument {
|
|||
public ICPPEvaluation getNonTypeEvaluation() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IValue getNonTypeValue() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IType getTypeOfNonTypeValue() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isPackExpansion() {
|
||||
return fType instanceof ICPPParameterPackType;
|
||||
|
|
Loading…
Add table
Reference in a new issue