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

Add JavaDoc.

Formatted public interfaces.
This commit is contained in:
John Camelon 2005-03-12 21:11:42 +00:00
parent 3e9255da5f
commit a939d75b5d
12 changed files with 252 additions and 53 deletions

View file

@ -18,17 +18,61 @@ import org.eclipse.cdt.core.dom.ast.IASTName;
/**
* This is the declarator for a K&R C Function.
*
*
* @author dsteffle
*/
public interface ICASTKnRFunctionDeclarator extends IASTFunctionDeclarator {
public static final ASTNodeProperty PARAMETER_NAME = new ASTNodeProperty( "Parameter Name"); //$NON-NLS-1$
/**
* <code>PARAMETER_NAME</code> refers to the names qualified in a K&R C
* function definition.
*/
public static final ASTNodeProperty PARAMETER_NAME = new ASTNodeProperty(
"Parameter Name"); //$NON-NLS-1$
/**
* Overwrite the parameter names. TODO - this should change to add
*
* @param names
* <code>IASTName []</code>
*/
public void setParameterNames(IASTName[] names);
/**
* Get parameter names.
*
* @return <code>IASTName []</code>
*/
public IASTName[] getParameterNames();
public static final ASTNodeProperty FUNCTION_PARAMETER = new ASTNodeProperty( "Parameter"); //$NON-NLS-1$
/**
* <code>FUNCTION_PARAMETER</code> represents the relationship between an
* K&R function declarator and the full parameter declarations.
*/
public static final ASTNodeProperty FUNCTION_PARAMETER = new ASTNodeProperty(
"Parameter"); //$NON-NLS-1$
/**
* Overrwrite the parameter lists.
*
* @param decls
* TODO - replace w/zadd
*/
public void setParameterDeclarations(IASTDeclaration[] decls);
/**
* Get parameters declarations.
*
* @return <code>IASTDeclaration []</code>
*/
public IASTDeclaration[] getParameterDeclarations();
/**
* Map declarator to IASTName.
*
* @param name
* <code>IASTName</code>
* @return
*/
public IASTDeclarator getDeclaratorForParameterName(IASTName name);
}

View file

@ -14,15 +14,56 @@ import org.eclipse.cdt.core.dom.ast.IASTExpression;
import org.eclipse.cdt.core.dom.ast.c.ICASTDesignator;
/**
* GCC-specific designator that allows for shorthand array range to be specified
* in a designated initializer.
*
* struct ABC { int def[10]; } abc = { def[4...10] = 3 };
*
* @author jcamelon
*/
public interface IGCCASTArrayRangeDesignator extends ICASTDesignator {
public static final ASTNodeProperty SUBSCRIPT_FLOOR_EXPRESSION = new ASTNodeProperty( "Subscript Floor Expression"); //$NON-NLS-1$
public static final ASTNodeProperty SUBSCRIPT_CEILING_EXPRESSION = new ASTNodeProperty( "Subscript Ceiling Expression"); //$NON-NLS-1$
public IASTExpression getRangeFloor();
public void setRangeFloor( IASTExpression expression );
public IASTExpression getRangeCeiling();
public void setRangeCeiling( IASTExpression expression );
/**
* <code>SUSBCRIPT_FLOOR_EXPRESSION</code> represents the lower value in
* the range of expressions.
*/
public static final ASTNodeProperty SUBSCRIPT_FLOOR_EXPRESSION = new ASTNodeProperty(
"Subscript Floor Expression"); //$NON-NLS-1$
/**
* <code>SUSBCRIPT_CEILING_EXPRESSION</code> represents the higher value
* in the range of expressions.
*/
public static final ASTNodeProperty SUBSCRIPT_CEILING_EXPRESSION = new ASTNodeProperty(
"Subscript Ceiling Expression"); //$NON-NLS-1$
/**
* Get the floor expression of the range.
*
* @return the floor expression <code>IASTExpression</code>
*/
public IASTExpression getRangeFloor();
/**
* Set the floor expression of the range.
*
* @param expression
* <code>IASTExpression</code>
*/
public void setRangeFloor(IASTExpression expression);
/**
* Get the range ceiling expression.
*
* @return <code>IASTExpression</code>
*/
public IASTExpression getRangeCeiling();
/**
* Set the ceiling expression of the range.
*
* @param expression
* <code>IASTExpression</code>
*/
public void setRangeCeiling(IASTExpression expression);
}

View file

@ -12,12 +12,25 @@ package org.eclipse.cdt.core.dom.ast.gnu.cpp;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTBinaryExpression;
/**
* G++ introduces additional operators.
*
* @author jcamelon
*/
public interface IGPPASTBinaryExpression extends ICPPASTBinaryExpression {
public static final int op_max = ICPPASTBinaryExpression.op_last + 1;
public static final int op_min = ICPPASTBinaryExpression.op_last + 2;
public static final int op_last = op_min;
/**
* <code>op_max</code> represents >?
*/
public static final int op_max = ICPPASTBinaryExpression.op_last + 1;
/**
* <code>op_min</code> represents <?
*/
public static final int op_min = ICPPASTBinaryExpression.op_last + 2;
/**
* <code>op_last</code> provided for sub-interfaces to extend.
*/
public static final int op_last = op_min;
}

View file

@ -13,13 +13,25 @@ package org.eclipse.cdt.core.dom.ast.gnu.cpp;
import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
/**
* G++ allows for restrict to be a modifier for the decl spec.
*
* @author jcamelon
*/
public interface IGPPASTDeclSpecifier extends IASTDeclSpecifier {
// Extra type qualifier in C
/**
* Was restrict keyword encountered?
*
* @return boolean
*/
public boolean isRestrict();
public void setRestrict( boolean value );
/**
* Set restrict-modifier-encountered to value.
*
* @param value
* boolean
*/
public void setRestrict(boolean value);
}

View file

@ -13,15 +13,40 @@ package org.eclipse.cdt.core.dom.ast.gnu.cpp;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTExplicitTemplateInstantiation;
/**
* G++ allows for instantiations to be qualified w/modifiers for scoping.
*
* @author jcamelon
*/
public interface IGPPASTExplicitTemplateInstantiation extends
ICPPASTExplicitTemplateInstantiation {
ICPPASTExplicitTemplateInstantiation {
public static final int ti_static = 1;
public static final int ti_inline = 2;
public static final int ti_extern = 3;
public int getModifier();
public void setModifier( int value );
/**
* <code>ti_static</code> implies 'static' keyword is used.
*/
public static final int ti_static = 1;
/**
* <code>ti_inline</code> implies 'inline' keyword is used.
*/
public static final int ti_inline = 2;
/**
* <code>ti_extern</code> implies 'extern' keyword is used.
*/
public static final int ti_extern = 3;
/**
* Get the modifier.
*
* @return int
*/
public int getModifier();
/**
* Set the modifier value.
*
* @param value
* (int)
*/
public void setModifier(int value);
}

View file

@ -13,10 +13,24 @@ package org.eclipse.cdt.core.dom.ast.gnu.cpp;
import org.eclipse.cdt.core.dom.ast.IASTPointer;
/**
* g++ allows for restrict pointers.
*
* @author jcamelon
*/
public interface IGPPASTPointer extends IASTPointer {
public boolean isRestrict();
public void setRestrict( boolean value );
/**
* Is this pointer a restrict pointer?
*
* @return boolean
*/
public boolean isRestrict();
/**
* Set restrict-keyword-encountered to true or false.
*
* @param value
* boolean
*/
public void setRestrict(boolean value);
}

View file

@ -13,9 +13,11 @@ package org.eclipse.cdt.core.dom.ast.gnu.cpp;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTPointerToMember;
/**
* G++ Pointer 2 Members accept the restrict qualified as well.
*
* @author jcamelon
*/
public interface IGPPASTPointerToMember extends IGPPASTPointer,
ICPPASTPointerToMember {
ICPPASTPointerToMember {
}

View file

@ -15,24 +15,68 @@ import org.eclipse.cdt.core.dom.ast.IASTExpression;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTSimpleDeclSpecifier;
/**
* G++ adds its own modifiers and types to the Simple Decl Specifier.
*
* @author jcamelon
*/
public interface IGPPASTSimpleDeclSpecifier extends IGPPASTDeclSpecifier,
ICPPASTSimpleDeclSpecifier {
ICPPASTSimpleDeclSpecifier {
/**
* <code>t_Complex</code> represents a _Complex type.
*/
public static final int t_Complex = ICPPASTSimpleDeclSpecifier.t_last + 1;
/**
* <code>t_Imaginary</code> represents an _Imaginary type.
*/
public static final int t_Imaginary = ICPPASTSimpleDeclSpecifier.t_last + 2;
/**
* <code>t_typeof</code> represents a typeof() expression type.
*/
public static final int t_typeof = ICPPASTSimpleDeclSpecifier.t_last + 3;
/**
* <code>t_last</code> is for subinterfaces to extend these types.
*/
public static final int t_last = t_typeof;
public static final ASTNodeProperty TYPEOF_EXPRESSION = new ASTNodeProperty( "Typeof Expression"); //$NON-NLS-1$
/**
* <code>TYPEOF_EXPRESSION</code> represents the relationship between the
* decl spec & the expression for typeof().
*/
public static final ASTNodeProperty TYPEOF_EXPRESSION = new ASTNodeProperty(
"Typeof Expression"); //$NON-NLS-1$
/**
* Did we encounter "long long" as a modifier?
*
* @return boolean
*/
public boolean isLongLong();
public void setLongLong( boolean value );
/**
* @param typeofExpression
*/
public void setTypeofExpression(IASTExpression typeofExpression);
public IASTExpression getTypeofExpression();
/**
* Encountered "long long" - set true or false.
*
* @param value
* boolean
*/
public void setLongLong(boolean value);
/**
* Set the typeof() expression.
*
* @param typeofExpression
* <code>IASTExpression</code>
*/
public void setTypeofExpression(IASTExpression typeofExpression);
/**
* Get the typeof expression.
*
* @return <code>IASTExpression</code>
*/
public IASTExpression getTypeofExpression();
}

View file

@ -23,10 +23,12 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPBasicType;
public interface IGPPBasicType extends ICPPBasicType {
public static final int t_Complex = IGPPASTSimpleDeclSpecifier.t_Complex;
public static final int t_Imaginary = IGPPASTSimpleDeclSpecifier.t_Imaginary;
public static final int t_typeof = IGPPASTSimpleDeclSpecifier.t_typeof;
public boolean isLongLong() throws DOMException;
public IType getTypeofType() throws DOMException;
}

View file

@ -20,6 +20,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPPointerToMemberType;
* @author aniefer
*/
public interface IGPPPointerToMemberType extends ICPPPointerToMemberType,
IGPPPointerType {
IGPPPointerType {
}

View file

@ -20,9 +20,10 @@ import org.eclipse.cdt.core.dom.ast.IPointerType;
* @author aniefer
*/
public interface IGPPPointerType extends IPointerType {
/**
* is this a restrict pointer
* @return
*/
boolean isRestrict();
/**
* is this a restrict pointer
*
* @return
*/
boolean isRestrict();
}

View file

@ -20,9 +20,10 @@ import org.eclipse.cdt.core.dom.ast.IQualifierType;
* @author aniefer
*/
public interface IGPPQualifierType extends IQualifierType {
/**
* is this a restrict type
* @return
*/
public boolean isRestrict();
/**
* is this a restrict type
*
* @return
*/
public boolean isRestrict();
}