1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-05 16:56:04 +02:00

Add JavaDoc.

This commit is contained in:
John Camelon 2005-03-10 16:48:19 +00:00
parent 022627d408
commit 4b7952f19c
5 changed files with 123 additions and 1 deletions

View file

@ -10,21 +10,57 @@
package org.eclipse.cdt.core.dom.ast;
/**
* This represents an elaborated type specifier in the C & C++ language grammar.
*
* @author jcamelon
*/
public interface IASTElaboratedTypeSpecifier extends IASTDeclSpecifier {
//these should agree with IASTCompositeType keys
/**
* Enumeration.
*/
public static final int k_enum = 0;
/**
* Structure.
*/
public static final int k_struct = 1;
/**
* Union.
*/
public static final int k_union = 2;
/**
* Constant for extensibility in sub-interfaces.
*/
public static final int k_last = k_union;
/**
* Get the kind.
*
* @return int (kind).
*/
public int getKind();
/**
* Set the kind.
* @param value int (kind)
*/
public void setKind( int value );
/**
* <code>TYPE_NAME</code> describes the relationship between <code>IASTElaboratedTypeSpecifier</code> and <code>IASTName</code>.
*/
public static final ASTNodeProperty TYPE_NAME = new ASTNodeProperty( "Type Name"); //$NON-NLS-1$
/**
* Get the name.
*
* @return <code>IASTName</code>
*/
public IASTName getName();
/**
* Set the name.
*
* @param name <code>IASTName</code>
*/
public void setName( IASTName name );
}

View file

@ -11,32 +11,90 @@ package org.eclipse.cdt.core.dom.ast;
/**
* This interface represents enumerations in C and C++.
*
* @author jcamelon
*/
public interface IASTEnumerationSpecifier extends IASTDeclSpecifier {
/**
* This interface represents an enumerator member of an enum specifier.
* @author jcamelon
*/
public interface IASTEnumerator extends IASTNode {
/**
* Empty array (constant).
*/
public static final IASTEnumerator[] EMPTY_ENUMERATOR_ARRAY = new IASTEnumerator[0];
/**
* <code>ENUMERATOR_NAME</code> describes the relationship between <code>IASTEnumerator</code> and <code>IASTName</code>.
*/
public static final ASTNodeProperty ENUMERATOR_NAME = new ASTNodeProperty( "Enumerator Name"); //$NON-NLS-1$
/**
* Set the enumerator's name.
*
* @param name
*/
public void setName( IASTName name );
/**
* Get the enumerator's name.
*
* @return <code>IASTName</code>
*/
public IASTName getName();
/**
* <code>ENUMERATOR_VALUE</code> describes the relationship between <code>IASTEnumerator</code> and <code>IASTExpression</code>.
*/
public static final ASTNodeProperty ENUMERATOR_VALUE = new ASTNodeProperty( "Enumerator Value"); //$NON-NLS-1$
/**
* Set enumerator value.
*
* @param expression
*/
public void setValue( IASTExpression expression );
/**
* Get enumerator value.
*
* @return <code>IASTExpression</code> value
*/
public IASTExpression getValue();
}
/**
* <code>ENUMERATOR</code> describes the relationship between <code>IASTEnumerationSpecifier</code> and the nested <code>IASTEnumerator</code>s.
*/
public static final ASTNodeProperty ENUMERATOR = new ASTNodeProperty( "Enumerator" ); //$NON-NLS-1$
/**
* Add an enumerator.
*
* @param enumerator <code>IASTEnumerator</code>
*/
public void addEnumerator( IASTEnumerator enumerator );
/**
* Get enumerators.
* @return <code>IASTEnumerator []</code> array
*/
public IASTEnumerator[] getEnumerators();
/**
* <code>ENUMERATION_NAME</code> describes the relationship between <code>IASTEnumerationSpecifier</code> and its <code>IASTName</code>.
*/
public static final ASTNodeProperty ENUMERATION_NAME = new ASTNodeProperty( "Enum Name"); //$NON-NLS-1$
/**
* Set the enum's name.
*
* @param name
*/
public void setName( IASTName name );
/**
* Get the enum's name.
*
* @return
*/
public IASTName getName();
}

View file

@ -16,5 +16,8 @@ package org.eclipse.cdt.core.dom.ast;
* @author Doug Schaefer
*/
public interface IASTExpression extends IASTNode {
/**
* Empty expression array.
*/
public static final IASTExpression [] EMPTY_EXPRESSION_ARRAY = new IASTExpression[0];
}

View file

@ -11,13 +11,28 @@ package org.eclipse.cdt.core.dom.ast;
/**
* Expression List (Comma separated list of expressions).
*
* @author jcamelon
*/
public interface IASTExpressionList extends IASTExpression {
/**
* <code>NESTED_EXPRESSION</code> describes the relationship between <code>IASTExpressionList</code> and the nested <code>IASTExpression</code>s.
*/
public static final ASTNodeProperty NESTED_EXPRESSION = new ASTNodeProperty( "Nested Expression"); //$NON-NLS-1$
/**
* Get nested expressions.
*
* @return <code>IASTExpression [] </code> nested expressions
*/
public IASTExpression [] getExpressions();
/**
* Add nested expression.
*
* @param expression <code>IASTExpression</code> value to be added.
*/
public void addExpression( IASTExpression expression );
}

View file

@ -12,10 +12,15 @@ package org.eclipse.cdt.core.dom.ast;
/**
* Expression statement.
*
* @author Doug Schaefer
*/
public interface IASTExpressionStatement extends IASTStatement {
/**
* <code>EXPRESSION</code> is the relationship between an <code>IASTExpressionStatement</code> and an <code>IASTExpression</code>.
*/
public static final ASTNodeProperty EXPFRESSION = new ASTNodeProperty( "Expression"); //$NON-NLS-1$
/**
* Get the expression in this statement.
@ -24,5 +29,10 @@ public interface IASTExpressionStatement extends IASTStatement {
*/
public IASTExpression getExpression();
/**
* Set the expression statement.
*
* @param expression
*/
public void setExpression( IASTExpression expression );
}