mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-03 22:35:43 +02:00
Add JavaDoc.
Formatted public interfaces. Restructured some public interfaces.
This commit is contained in:
parent
512e196451
commit
db73140257
60 changed files with 1733 additions and 455 deletions
|
@ -10,5 +10,6 @@
|
|||
<classpathentry kind="src" path="browser"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry sourcepath="ECLIPSE_HOME/plugins/org.eclipse.jdt.source_3.0.0/src/org.junit_3.8.1/junitsrc.zip" kind="var" path="JUNIT_HOME/junit.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
|
|
@ -17,13 +17,56 @@ package org.eclipse.cdt.core.dom.ast.cpp;
|
|||
import org.eclipse.cdt.core.dom.ast.ASTVisitor;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier;
|
||||
|
||||
/**
|
||||
* C++ specific visitor class.
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public abstract class CPPASTVisitor extends ASTVisitor {
|
||||
|
||||
public abstract class CPPASTVisitor extends ASTVisitor{
|
||||
/**
|
||||
* Overide this value if you wish to visit base specifiers off composite
|
||||
* types.
|
||||
*/
|
||||
public boolean shouldVisitBaseSpecifiers = false;
|
||||
public boolean shouldVisitNamespaces = false;
|
||||
|
||||
/**
|
||||
* Overide this value if you wish to visit namespaces.
|
||||
*/
|
||||
public boolean shouldVisitNamespaces = false;
|
||||
|
||||
/**
|
||||
* Overide this value if you wish to visit template parameters.
|
||||
*/
|
||||
public boolean shouldVisitTemplateParameters = false;
|
||||
|
||||
public int visit( ICPPASTBaseSpecifier specifier ) { return PROCESS_CONTINUE; }
|
||||
public int visit( ICPPASTNamespaceDefinition namespace ){ return PROCESS_CONTINUE; }
|
||||
public int visit( ICPPASTTemplateParameter parameter ) { return PROCESS_CONTINUE; }
|
||||
|
||||
/**
|
||||
* Visit BaseSpecifiers.
|
||||
*
|
||||
* @param specifier
|
||||
* @return
|
||||
*/
|
||||
public int visit(ICPPASTBaseSpecifier specifier) {
|
||||
return PROCESS_CONTINUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Visit namespace definitions.
|
||||
*
|
||||
* @param namespace
|
||||
* @return
|
||||
*/
|
||||
public int visit(ICPPASTNamespaceDefinition namespace) {
|
||||
return PROCESS_CONTINUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Visit template parameter.
|
||||
*
|
||||
* @param parameter
|
||||
* @return
|
||||
*/
|
||||
public int visit(ICPPASTTemplateParameter parameter) {
|
||||
return PROCESS_CONTINUE;
|
||||
}
|
||||
}
|
|
@ -13,11 +13,24 @@ package org.eclipse.cdt.core.dom.ast.cpp;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTBinaryExpression;
|
||||
|
||||
/**
|
||||
* C++ adds a few more binary expressions over C.
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTBinaryExpression extends IASTBinaryExpression {
|
||||
|
||||
public static final int op_pmdot = IASTBinaryExpression.op_last + 1;
|
||||
public static final int op_pmarrow = IASTBinaryExpression.op_last + 2;
|
||||
public static final int op_last = op_pmarrow;
|
||||
/**
|
||||
* <code>op_pmdot</code> pointer-to-member field dereference.
|
||||
*/
|
||||
public static final int op_pmdot = IASTBinaryExpression.op_last + 1;
|
||||
|
||||
/**
|
||||
* <code>op_pmarrow</code> pointer-to-member pointer dereference.
|
||||
*/
|
||||
public static final int op_pmarrow = IASTBinaryExpression.op_last + 2;
|
||||
|
||||
/**
|
||||
* <code>op_last</code> is defined for subinterfaces to further extend.
|
||||
*/
|
||||
public static final int op_last = op_pmarrow;
|
||||
}
|
||||
|
|
|
@ -13,13 +13,34 @@ package org.eclipse.cdt.core.dom.ast.cpp;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTCastExpression;
|
||||
|
||||
/**
|
||||
* C++ adds in additional cast-style expressions.
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTCastExpression extends IASTCastExpression {
|
||||
|
||||
public static final int op_dynamic_cast = IASTCastExpression.op_last + 1;
|
||||
public static final int op_static_cast = IASTCastExpression.op_last + 2;
|
||||
public static final int op_reinterpret_cast = IASTCastExpression.op_last + 3;
|
||||
public static final int op_const_cast = IASTCastExpression.op_last + 4;
|
||||
public static final int op_last = op_const_cast;
|
||||
/**
|
||||
* <code>op_dynamic_cast</code> is used for dynamic_cast<>'s.
|
||||
*/
|
||||
public static final int op_dynamic_cast = IASTCastExpression.op_last + 1;
|
||||
|
||||
/**
|
||||
* <code>op_static_cast</code> is used for static_cast<>'s.
|
||||
*/
|
||||
public static final int op_static_cast = IASTCastExpression.op_last + 2;
|
||||
|
||||
/**
|
||||
* <oode>op_reinterpret_cast</code> is used for reinterpret_cast<>'s.
|
||||
*/
|
||||
public static final int op_reinterpret_cast = IASTCastExpression.op_last + 3;
|
||||
|
||||
/**
|
||||
* <code>op_const_cast</code> is used for const_cast<>'s.
|
||||
*/
|
||||
public static final int op_const_cast = IASTCastExpression.op_last + 4;
|
||||
|
||||
/**
|
||||
* <code>op_last</code> is for subinterfaces to extend.
|
||||
*/
|
||||
public static final int op_last = op_const_cast;
|
||||
}
|
||||
|
|
|
@ -15,32 +15,73 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTStatement;
|
||||
|
||||
/**
|
||||
* Catch handler serves as a standalone stage.
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTCatchHandler extends IASTStatement {
|
||||
|
||||
public static final ICPPASTCatchHandler [] EMPTY_CATCHHANDLER_ARRAY = new ICPPASTCatchHandler[0];
|
||||
|
||||
public static final ASTNodeProperty DECLARATION = new ASTNodeProperty( "Declaration"); //$NON-NLS-1$
|
||||
public static final ASTNodeProperty CATCH_BODY = new ASTNodeProperty( "Catch Body"); //$NON-NLS-1$
|
||||
/**
|
||||
* Constant
|
||||
*/
|
||||
public static final ICPPASTCatchHandler[] EMPTY_CATCHHANDLER_ARRAY = new ICPPASTCatchHandler[0];
|
||||
|
||||
/**
|
||||
* @param isEllipsis
|
||||
*/
|
||||
public void setIsCatchAll(boolean isEllipsis);
|
||||
public boolean isCatchAll();
|
||||
/**
|
||||
* <code>DECLARATION</code> represnts the nested declaration within the
|
||||
* catch handler.
|
||||
*/
|
||||
public static final ASTNodeProperty DECLARATION = new ASTNodeProperty(
|
||||
"Declaration"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* @param compoundStatement
|
||||
*/
|
||||
public void setCatchBody(IASTStatement compoundStatement);
|
||||
public IASTStatement getCatchBody();
|
||||
/**
|
||||
* <code>CATCH_BODY</code> represents the nested (compound) statement.
|
||||
*/
|
||||
public static final ASTNodeProperty CATCH_BODY = new ASTNodeProperty(
|
||||
"Catch Body"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* @param decl
|
||||
*/
|
||||
public void setDeclaration(IASTDeclaration decl);
|
||||
public IASTDeclaration getDeclaration();
|
||||
|
||||
/**
|
||||
* Set is catch all handler.
|
||||
*
|
||||
* @param isEllipsis
|
||||
* boolean
|
||||
*/
|
||||
public void setIsCatchAll(boolean isEllipsis);
|
||||
|
||||
/**
|
||||
* Is this catch handler for all exceptions?
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isCatchAll();
|
||||
|
||||
/**
|
||||
* Set the catch body.
|
||||
*
|
||||
* @param compoundStatement
|
||||
* <code>IASTStatement</code>
|
||||
*/
|
||||
public void setCatchBody(IASTStatement compoundStatement);
|
||||
|
||||
/**
|
||||
* Get the cathc body.
|
||||
*
|
||||
* @return <code>IASTStatement</code>
|
||||
*/
|
||||
public IASTStatement getCatchBody();
|
||||
|
||||
/**
|
||||
* Set the declaration.
|
||||
*
|
||||
* @param decl
|
||||
* <code>IASTDeclaration</code>
|
||||
*/
|
||||
public void setDeclaration(IASTDeclaration decl);
|
||||
|
||||
/**
|
||||
* Get the declaration.
|
||||
*
|
||||
* @return <code>IASTDeclaration</code>
|
||||
*/
|
||||
public IASTDeclaration getDeclaration();
|
||||
|
||||
}
|
||||
|
|
|
@ -18,35 +18,126 @@ import org.eclipse.cdt.core.dom.ast.IASTNode;
|
|||
/**
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTCompositeTypeSpecifier extends IASTCompositeTypeSpecifier,
|
||||
ICPPASTDeclSpecifier {
|
||||
public interface ICPPASTCompositeTypeSpecifier extends
|
||||
IASTCompositeTypeSpecifier, ICPPASTDeclSpecifier {
|
||||
|
||||
/**
|
||||
* <code>k_class</code> C++ introduces the class concept for composite
|
||||
* types.
|
||||
*/
|
||||
public static final int k_class = IASTCompositeTypeSpecifier.k_last + 1;
|
||||
|
||||
/**
|
||||
* <code>k_last</code> allows for subinterfaces to extend the kind type.
|
||||
*/
|
||||
public static final int k_last = k_class;
|
||||
|
||||
/**
|
||||
* <code>VISIBILITY_LABEL</code> is used to express the relationship for a
|
||||
* visibility label "declaration".
|
||||
*/
|
||||
public static final ASTNodeProperty VISIBILITY_LABEL = new ASTNodeProperty(
|
||||
"Visibility Label"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* <code>BASE_SPECIFIER</code> expresses the subclass role.
|
||||
*/
|
||||
public static final ASTNodeProperty BASE_SPECIFIER = new ASTNodeProperty(
|
||||
"Base Specifier"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Base Specifiers are where a class expresses from whom it inherits.
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public static interface ICPPASTBaseSpecifier extends IASTNode {
|
||||
/**
|
||||
* Constant.
|
||||
*/
|
||||
public static final ICPPASTBaseSpecifier[] EMPTY_BASESPECIFIER_ARRAY = new ICPPASTBaseSpecifier[0];
|
||||
|
||||
/**
|
||||
* Is the keyword virtual used?
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isVirtual();
|
||||
|
||||
/**
|
||||
* Set the virtual flag on/off.
|
||||
*
|
||||
* @param value
|
||||
* boolean
|
||||
*/
|
||||
public void setVirtual(boolean value);
|
||||
|
||||
/**
|
||||
* <code>v_public</code> was public keyword used in describing this
|
||||
* base class?
|
||||
*/
|
||||
public static final int v_public = 1;
|
||||
|
||||
/**
|
||||
* <code>v_protected</code> was protected keyword used in describing
|
||||
* this base class?
|
||||
*/
|
||||
public static final int v_protected = 2;
|
||||
|
||||
/**
|
||||
* <code>v_private</code> was private keyword used in describing this
|
||||
* base class?
|
||||
*/
|
||||
public static final int v_private = 3;
|
||||
|
||||
/**
|
||||
* Get the visibility.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public int getVisibility();
|
||||
|
||||
/**
|
||||
* Set the visibility.
|
||||
*
|
||||
* @param visibility
|
||||
*/
|
||||
public void setVisibility(int visibility);
|
||||
|
||||
/**
|
||||
* <code>NAME</code> is the name of the base class.
|
||||
*/
|
||||
public static final ASTNodeProperty NAME = new ASTNodeProperty(
|
||||
"BaseSpec 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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the base specifiers.
|
||||
*
|
||||
* @return <code>ICPPASTBaseSpecifier []</code>
|
||||
*/
|
||||
public ICPPASTBaseSpecifier[] getBaseSpecifiers();
|
||||
|
||||
/**
|
||||
* Add a base specifier.
|
||||
*
|
||||
* @param baseSpec
|
||||
* <code>ICPPASTBaseSpecifier</code>
|
||||
*/
|
||||
public void addBaseSpecifier(ICPPASTBaseSpecifier baseSpec);
|
||||
|
||||
public static final int k_class = IASTCompositeTypeSpecifier.k_last + 1;
|
||||
public static final int k_last = k_class;
|
||||
|
||||
public static final ASTNodeProperty VISIBILITY_LABEL = new ASTNodeProperty( "Visibility Label"); //$NON-NLS-1$
|
||||
public static final ASTNodeProperty BASE_SPECIFIER = new ASTNodeProperty( "Base Specifier"); //$NON-NLS-1$
|
||||
|
||||
public static interface ICPPASTBaseSpecifier extends IASTNode
|
||||
{
|
||||
public static final ICPPASTBaseSpecifier[] EMPTY_BASESPECIFIER_ARRAY = new ICPPASTBaseSpecifier[0];
|
||||
|
||||
public boolean isVirtual();
|
||||
public void setVirtual( boolean value );
|
||||
|
||||
public static final int v_public = 1;
|
||||
public static final int v_protected = 2;
|
||||
public static final int v_private = 3;
|
||||
|
||||
public int getVisibility();
|
||||
public void setVisibility( int visibility );
|
||||
|
||||
public static final ASTNodeProperty NAME = new ASTNodeProperty( "BaseSpec Name"); //$NON-NLS-1$
|
||||
public IASTName getName();
|
||||
public void setName( IASTName name );
|
||||
}
|
||||
|
||||
public ICPPASTBaseSpecifier[] getBaseSpecifiers();
|
||||
public void addBaseSpecifier( ICPPASTBaseSpecifier baseSpec );
|
||||
|
||||
}
|
||||
|
|
|
@ -19,14 +19,52 @@ import org.eclipse.cdt.core.dom.ast.IASTNode;
|
|||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTConstructorChainInitializer extends IASTNode {
|
||||
public static final ICPPASTConstructorChainInitializer [] EMPTY_CONSTRUCTORCHAININITIALIZER_ARRAY = new ICPPASTConstructorChainInitializer[0];
|
||||
|
||||
public static final ASTNodeProperty MEMBER_ID = new ASTNodeProperty( "Member Initializer Id"); //$NON-NLS-1$
|
||||
public IASTName getMemberInitializerId();
|
||||
public void setMemberInitializerId( IASTName name );
|
||||
|
||||
public static final ASTNodeProperty INITIALIZER = new ASTNodeProperty( "Expression Initializer"); //$NON-NLS-1$
|
||||
public IASTExpression getInitializerValue();
|
||||
public void setInitializerValue( IASTExpression expression );
|
||||
/**
|
||||
* Constant.
|
||||
*/
|
||||
public static final ICPPASTConstructorChainInitializer[] EMPTY_CONSTRUCTORCHAININITIALIZER_ARRAY = new ICPPASTConstructorChainInitializer[0];
|
||||
|
||||
/**
|
||||
* <code>MEMBER_ID</code> represents the class field name being
|
||||
* initialized.
|
||||
*/
|
||||
public static final ASTNodeProperty MEMBER_ID = new ASTNodeProperty(
|
||||
"Member Initializer Id"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Get the field name.
|
||||
*
|
||||
* @return <code>IASTName</code>
|
||||
*/
|
||||
public IASTName getMemberInitializerId();
|
||||
|
||||
/**
|
||||
* Set the field name.
|
||||
*
|
||||
* @param name
|
||||
* <code>IASTName</code>
|
||||
*/
|
||||
public void setMemberInitializerId(IASTName name);
|
||||
|
||||
/**
|
||||
* <code>Expression field is being initialized to.</code>
|
||||
*/
|
||||
public static final ASTNodeProperty INITIALIZER = new ASTNodeProperty(
|
||||
"Expression Initializer"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Get the initializer value.
|
||||
*
|
||||
* @return <code>IASTExpression</code>
|
||||
*/
|
||||
public IASTExpression getInitializerValue();
|
||||
|
||||
/**
|
||||
* Set the initializer value.
|
||||
*
|
||||
* @param expression
|
||||
* <code>IASTExpression</code>
|
||||
*/
|
||||
public void setInitializerValue(IASTExpression expression);
|
||||
|
||||
}
|
||||
|
|
|
@ -15,20 +15,31 @@ import org.eclipse.cdt.core.dom.ast.IASTExpression;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTInitializer;
|
||||
|
||||
/**
|
||||
* This is an initializer that is a call to the constructor for the
|
||||
* declarator.
|
||||
* This is an initializer that is a call to the constructor for the declarator.
|
||||
*
|
||||
* @author Doug Schaefer
|
||||
*/
|
||||
public interface ICPPASTConstructorInitializer extends IASTInitializer {
|
||||
|
||||
/**
|
||||
* <code>EXPRESSION</code> represents the expression being conusmed in a
|
||||
* constructor.
|
||||
*/
|
||||
public static final ASTNodeProperty EXPRESSION = new ASTNodeProperty(
|
||||
"Expression"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Get the arguments to the constructor.
|
||||
*
|
||||
* @return IASTExpression
|
||||
*/
|
||||
public static final ASTNodeProperty EXPRESSION = new ASTNodeProperty( "Expression"); //$NON-NLS-1$
|
||||
public IASTExpression getExpression();
|
||||
public void setExpression( IASTExpression expression );
|
||||
|
||||
|
||||
/**
|
||||
* Set the arguments to the constructor.
|
||||
*
|
||||
* @param expression
|
||||
*/
|
||||
public void setExpression(IASTExpression expression);
|
||||
|
||||
}
|
||||
|
|
|
@ -13,22 +13,67 @@ package org.eclipse.cdt.core.dom.ast.cpp;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
|
||||
|
||||
/**
|
||||
* C++ adds additional modifiers and types for decl specifier sequence.
|
||||
*
|
||||
* @author Doug Schaefer
|
||||
*/
|
||||
public interface ICPPASTDeclSpecifier extends IASTDeclSpecifier {
|
||||
|
||||
// Extra storage class in C++
|
||||
/**
|
||||
* <code>sc_mutable</code> represents a mutable storage representation.
|
||||
*/
|
||||
public static final int sc_mutable = IASTDeclSpecifier.sc_last + 1;
|
||||
|
||||
/**
|
||||
* <code>sc_last</code> is overwritten to allow extensibility.
|
||||
*/
|
||||
public static final int sc_last = sc_mutable;
|
||||
|
||||
// A declaration in C++ can be a friend declaration
|
||||
/**
|
||||
* Is this a friend declaration?
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isFriend();
|
||||
public void setFriend( boolean value );
|
||||
|
||||
|
||||
/**
|
||||
* Set this to be a friend declaration true/false.
|
||||
*
|
||||
* @param value
|
||||
* boolean
|
||||
*/
|
||||
public void setFriend(boolean value);
|
||||
|
||||
/**
|
||||
* Is this a virtual function?
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isVirtual();
|
||||
public void setVirtual( boolean value );
|
||||
|
||||
|
||||
/**
|
||||
* Set this declaration to be virutal.
|
||||
*
|
||||
* @param value
|
||||
* boolean
|
||||
*/
|
||||
public void setVirtual(boolean value);
|
||||
|
||||
/**
|
||||
* Is this an explicit constructor?
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isExplicit();
|
||||
public void setExplicit( boolean value );
|
||||
|
||||
|
||||
/**
|
||||
* Set this to be an explicit constructor.
|
||||
*
|
||||
* @param value
|
||||
* boolean
|
||||
*/
|
||||
public void setExplicit(boolean value);
|
||||
|
||||
}
|
||||
|
|
|
@ -14,23 +14,59 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTExpression;
|
||||
|
||||
/**
|
||||
* This interface represents a delete expression. delete [] operand;
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTDeleteExpression extends IASTExpression {
|
||||
|
||||
public static final ASTNodeProperty OPERAND = new ASTNodeProperty( "Operand"); //$NON-NLS-1$
|
||||
public IASTExpression getOperand();
|
||||
public void setOperand( IASTExpression expression );
|
||||
/**
|
||||
* @param global
|
||||
*/
|
||||
public void setIsGlobal(boolean global);
|
||||
public boolean isGlobal();
|
||||
/**
|
||||
* <code>OPERAND</code> is the expression representing the pointer being
|
||||
* deleted.
|
||||
*/
|
||||
public static final ASTNodeProperty OPERAND = new ASTNodeProperty("Operand"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* @param vectored
|
||||
*/
|
||||
public void setIsVectored(boolean vectored);
|
||||
public boolean isVectored();
|
||||
/**
|
||||
* Get the operand.
|
||||
*
|
||||
* @return <code>IASTExpression</code>
|
||||
*/
|
||||
public IASTExpression getOperand();
|
||||
|
||||
/**
|
||||
* @param expression
|
||||
* <code>IASTExpression</code>
|
||||
*/
|
||||
public void setOperand(IASTExpression expression);
|
||||
|
||||
/**
|
||||
* Set this to be the global delete function called.
|
||||
*
|
||||
* @param global
|
||||
* boolean
|
||||
*/
|
||||
public void setIsGlobal(boolean global);
|
||||
|
||||
/**
|
||||
* Is this the global delete function called?
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isGlobal();
|
||||
|
||||
/**
|
||||
* Set this to be a vector delete. ([])
|
||||
*
|
||||
* @param vectored
|
||||
* boolean
|
||||
*/
|
||||
public void setIsVectored(boolean vectored);
|
||||
|
||||
/**
|
||||
* Is this a delete [] ?
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isVectored();
|
||||
|
||||
}
|
||||
|
|
|
@ -13,12 +13,21 @@ package org.eclipse.cdt.core.dom.ast.cpp;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTElaboratedTypeSpecifier;
|
||||
|
||||
/**
|
||||
* Elaborated types in C++ include classes.
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTElaboratedTypeSpecifier extends
|
||||
IASTElaboratedTypeSpecifier, ICPPASTDeclSpecifier {
|
||||
IASTElaboratedTypeSpecifier, ICPPASTDeclSpecifier {
|
||||
|
||||
/**
|
||||
* <code>k_class</code> represents elaborated class declaration
|
||||
*/
|
||||
public static final int k_class = IASTElaboratedTypeSpecifier.k_last + 1;
|
||||
|
||||
/**
|
||||
* <code>k_last</code> is defined for subinterfaces.
|
||||
*/
|
||||
public static final int k_last = k_class;
|
||||
|
||||
public static final int k_class = IASTElaboratedTypeSpecifier.k_last + 1;
|
||||
public static final int k_last = k_class;
|
||||
|
||||
}
|
||||
|
|
|
@ -14,12 +14,32 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
|
||||
|
||||
/**
|
||||
* This interface represents an explict template instantiation.
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTExplicitTemplateInstantiation extends IASTDeclaration {
|
||||
|
||||
public static final ASTNodeProperty OWNED_DECLARATION = new ASTNodeProperty( "Owned Declaration"); //$NON-NLS-1$
|
||||
public IASTDeclaration getDeclaration();
|
||||
public void setDeclaration( IASTDeclaration declaration );
|
||||
/**
|
||||
* <code>OWNED_DECLARATION</code> represents the role of the inner
|
||||
* declaration that this template refers to.
|
||||
*/
|
||||
public static final ASTNodeProperty OWNED_DECLARATION = new ASTNodeProperty(
|
||||
"Owned Declaration"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Get the owned declaration.
|
||||
*
|
||||
* @return <code>IASTDeclaration</code>
|
||||
*/
|
||||
public IASTDeclaration getDeclaration();
|
||||
|
||||
/**
|
||||
* Set the owned declaration.
|
||||
*
|
||||
* @param declaration
|
||||
* <code>IASTDeclaration</code>
|
||||
*/
|
||||
public void setDeclaration(IASTDeclaration declaration);
|
||||
|
||||
}
|
||||
|
|
|
@ -13,12 +13,25 @@ package org.eclipse.cdt.core.dom.ast.cpp;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTFieldReference;
|
||||
|
||||
/**
|
||||
* Certain field references in C++ require the use the keyword template to
|
||||
* specify the parse.
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTFieldReference extends IASTFieldReference {
|
||||
|
||||
public boolean isTemplate();
|
||||
public void setIsTemplate( boolean value );
|
||||
|
||||
|
||||
/**
|
||||
* Was template keyword used?
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isTemplate();
|
||||
|
||||
/**
|
||||
* Set the template keyword used.
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
public void setIsTemplate(boolean value);
|
||||
|
||||
}
|
||||
|
|
|
@ -16,30 +16,106 @@ import org.eclipse.cdt.core.dom.ast.IASTTypeId;
|
|||
|
||||
/**
|
||||
* C++ adds a few things to function declarators.
|
||||
*
|
||||
*
|
||||
* @author Doug Schaefer
|
||||
*/
|
||||
public interface ICPPASTFunctionDeclarator extends IASTStandardFunctionDeclarator {
|
||||
public interface ICPPASTFunctionDeclarator extends
|
||||
IASTStandardFunctionDeclarator {
|
||||
|
||||
|
||||
public boolean isConst();
|
||||
public void setConst( boolean value );
|
||||
|
||||
/**
|
||||
* Is this a const method?
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isConst();
|
||||
|
||||
/**
|
||||
* Set the method to be const or not.
|
||||
*
|
||||
* @param value
|
||||
* boolean
|
||||
*/
|
||||
public void setConst(boolean value);
|
||||
|
||||
/**
|
||||
* Is this a volatile method?
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isVolatile();
|
||||
public void setVolatile( boolean value );
|
||||
|
||||
public static final ASTNodeProperty EXCEPTION_TYPEID = new ASTNodeProperty( "Exception TypeId"); //$NON-NLS-1$
|
||||
public IASTTypeId [] getExceptionSpecification();
|
||||
public void addExceptionSpecificationTypeId( IASTTypeId typeId );
|
||||
/**
|
||||
* @param isPureVirtual
|
||||
*/
|
||||
public boolean isPureVirtual();
|
||||
public void setPureVirtual(boolean isPureVirtual);
|
||||
|
||||
public static final ASTNodeProperty CONSTRUCTOR_CHAIN_MEMBER = new ASTNodeProperty( "Constructor Chain Member"); //$NON-NLS-1$
|
||||
public ICPPASTConstructorChainInitializer[] getConstructorChain();
|
||||
public void addConstructorToChain( ICPPASTConstructorChainInitializer initializer );
|
||||
|
||||
public ICPPFunctionScope getFunctionScope();
|
||||
/**
|
||||
* Set the method to be volatile or not.
|
||||
*
|
||||
* @param value
|
||||
* boolean
|
||||
*/
|
||||
public void setVolatile(boolean value);
|
||||
|
||||
/**
|
||||
* <code>EXCEPTION_TYPEID</code> represents the type IDs throws in the
|
||||
* exception specification.
|
||||
*/
|
||||
public static final ASTNodeProperty EXCEPTION_TYPEID = new ASTNodeProperty(
|
||||
"Exception TypeId"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Get the exception specification.
|
||||
*
|
||||
* @return <code>IASTTypeId []</code>
|
||||
*/
|
||||
public IASTTypeId[] getExceptionSpecification();
|
||||
|
||||
/**
|
||||
* Add an exception specification type Id.
|
||||
*
|
||||
* @param typeId
|
||||
* <code>IASTTypeId</code>
|
||||
*/
|
||||
public void addExceptionSpecificationTypeId(IASTTypeId typeId);
|
||||
|
||||
/**
|
||||
* Is the method pure virtual?
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isPureVirtual();
|
||||
|
||||
/**
|
||||
* Set thid method to be pure virtual.
|
||||
*
|
||||
* @param isPureVirtual
|
||||
* boolean
|
||||
*/
|
||||
public void setPureVirtual(boolean isPureVirtual);
|
||||
|
||||
/**
|
||||
* <code>CONSTRUCTOR_CHAIN_MEMBER</code> is the role of a constructor
|
||||
* chain initializer.
|
||||
*/
|
||||
public static final ASTNodeProperty CONSTRUCTOR_CHAIN_MEMBER = new ASTNodeProperty(
|
||||
"Constructor Chain Member"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Get constructor chain.
|
||||
*
|
||||
* @return <code>ICPPASTConstructorChainInitializer[]</code>
|
||||
*/
|
||||
public ICPPASTConstructorChainInitializer[] getConstructorChain();
|
||||
|
||||
/**
|
||||
* Add a constructor chain initializer to constructor chain.
|
||||
*
|
||||
* @param initializer
|
||||
* ICPPASTConstructorChainInitializer
|
||||
*/
|
||||
public void addConstructorToChain(
|
||||
ICPPASTConstructorChainInitializer initializer);
|
||||
|
||||
/**
|
||||
* Get function scope this node represents.
|
||||
*
|
||||
* @return ICPPFunctionScope scope
|
||||
*/
|
||||
public ICPPFunctionScope getFunctionScope();
|
||||
}
|
||||
|
|
|
@ -13,12 +13,32 @@ package org.eclipse.cdt.core.dom.ast.cpp;
|
|||
import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
|
||||
|
||||
/**
|
||||
* This is a function try block declarator.
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTFunctionTryBlockDeclarator extends
|
||||
ICPPASTFunctionDeclarator {
|
||||
ICPPASTFunctionDeclarator {
|
||||
|
||||
public static final ASTNodeProperty CATCH_HANDLER = new ASTNodeProperty( "Catch Handler"); //$NON-NLS-1$
|
||||
public void addCatchHandler( ICPPASTCatchHandler statement );
|
||||
public ICPPASTCatchHandler [] getCatchHandlers();
|
||||
/**
|
||||
* A <code>CATCH_HANDLER</code> is the role of an ICPPASTCatchHandler in
|
||||
* this interface.
|
||||
*/
|
||||
public static final ASTNodeProperty CATCH_HANDLER = new ASTNodeProperty(
|
||||
"Catch Handler"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Add a catch handler.
|
||||
*
|
||||
* @param statement
|
||||
* <code>ICPPASTCatchHandler</code>
|
||||
*/
|
||||
public void addCatchHandler(ICPPASTCatchHandler statement);
|
||||
|
||||
/**
|
||||
* Get catch handlers.
|
||||
*
|
||||
* @return <code>ICPPASTCatchHandler</code>
|
||||
*/
|
||||
public ICPPASTCatchHandler[] getCatchHandlers();
|
||||
}
|
||||
|
|
|
@ -14,14 +14,46 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
|
||||
|
||||
/**
|
||||
* This interface represents a linkage specification. e.g. extern "C" { ... }
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTLinkageSpecification extends IASTDeclaration {
|
||||
|
||||
public String getLiteral();
|
||||
public void setLiteral( String value );
|
||||
|
||||
public static final ASTNodeProperty OWNED_DECLARATION = new ASTNodeProperty( "Owned Declaration"); //$NON-NLS-1$
|
||||
public IASTDeclaration [] getDeclarations();
|
||||
public void addDeclaration( IASTDeclaration declaration );
|
||||
/**
|
||||
* Get the "literal" that represents the linkage.
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String getLiteral();
|
||||
|
||||
/**
|
||||
* Set the "literal" that represents the linkage.
|
||||
*
|
||||
* @param value
|
||||
* String
|
||||
*/
|
||||
public void setLiteral(String value);
|
||||
|
||||
/**
|
||||
* <code>OWNED_DECLARATION</code> is the owned declaration role for
|
||||
* linkages.
|
||||
*/
|
||||
public static final ASTNodeProperty OWNED_DECLARATION = new ASTNodeProperty(
|
||||
"Owned Declaration"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Get all of the declarations.
|
||||
*
|
||||
* @return <code>IASTDeclaration[] </code>
|
||||
*/
|
||||
public IASTDeclaration[] getDeclarations();
|
||||
|
||||
/**
|
||||
* Add another declaration to the linkage.
|
||||
*
|
||||
* @param declaration
|
||||
* <code>IASTDeclaration</code>
|
||||
*/
|
||||
public void addDeclaration(IASTDeclaration declaration);
|
||||
}
|
||||
|
|
|
@ -13,12 +13,29 @@ package org.eclipse.cdt.core.dom.ast.cpp;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTLiteralExpression;
|
||||
|
||||
/**
|
||||
* C++ adds additional literal types to primary expression.
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTLiteralExpression extends IASTLiteralExpression {
|
||||
|
||||
public static final int lk_this = IASTLiteralExpression.lk_last + 1;
|
||||
public static final int lk_true = IASTLiteralExpression.lk_last + 2;
|
||||
public static final int lk_false = IASTLiteralExpression.lk_last + 3;
|
||||
public static final int lk_last = lk_false;
|
||||
/**
|
||||
* <code>lk_this</code> represents the 'this' keyword.
|
||||
*/
|
||||
public static final int lk_this = IASTLiteralExpression.lk_last + 1;
|
||||
|
||||
/**
|
||||
* <code>lk_true</code> represents the 'true' keyword.
|
||||
*/
|
||||
public static final int lk_true = IASTLiteralExpression.lk_last + 2;
|
||||
|
||||
/**
|
||||
* <code>lk_false</code> represents the 'false' keyword.
|
||||
*/
|
||||
public static final int lk_false = IASTLiteralExpression.lk_last + 3;
|
||||
|
||||
/**
|
||||
* <code>lk_last</code> is maintained for future subinterfaces.
|
||||
*/
|
||||
public static final int lk_last = lk_false;
|
||||
}
|
||||
|
|
|
@ -13,11 +13,27 @@ package org.eclipse.cdt.core.dom.ast.cpp;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTNamedTypeSpecifier;
|
||||
|
||||
/**
|
||||
* C++ adds the capability of qualifying a named type specifier w/the keyword
|
||||
* typename.
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTNamedTypeSpecifier extends IASTNamedTypeSpecifier, ICPPASTDeclSpecifier {
|
||||
|
||||
public boolean isTypename();
|
||||
public void setIsTypename( boolean value );
|
||||
public interface ICPPASTNamedTypeSpecifier extends IASTNamedTypeSpecifier,
|
||||
ICPPASTDeclSpecifier {
|
||||
|
||||
/**
|
||||
* Was typename token consumed?
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isTypename();
|
||||
|
||||
/**
|
||||
* Set this value.
|
||||
*
|
||||
* @param value
|
||||
* boolean
|
||||
*/
|
||||
public void setIsTypename(boolean value);
|
||||
|
||||
}
|
||||
|
|
|
@ -15,17 +15,55 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
|
||||
/**
|
||||
* This interface represents a namespace alias in C++. e.g. namespace ABC { int
|
||||
* x; } namspace DEF = ABC;
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTNamespaceAlias extends IASTDeclaration {
|
||||
|
||||
public static final ASTNodeProperty ALIAS_NAME = new ASTNodeProperty( "Alias name"); //$NON-NLS-1$
|
||||
public static final ASTNodeProperty MAPPING_NAME = new ASTNodeProperty( "Mapping name"); //$NON-NLS-1$
|
||||
|
||||
public IASTName getAlias();
|
||||
public void setAlias( IASTName name );
|
||||
|
||||
public IASTName getQualifiedName();
|
||||
public void setQualifiedName( IASTName qualifiedName );
|
||||
|
||||
/**
|
||||
* <code>ALIAS_NAME</code> represents the new namespace name being
|
||||
* introduced.
|
||||
*/
|
||||
public static final ASTNodeProperty ALIAS_NAME = new ASTNodeProperty(
|
||||
"Alias name"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* <code>MAPPING_NAME</code> represents the pre-existing namespace which
|
||||
* the new symbol aliases.
|
||||
*/
|
||||
public static final ASTNodeProperty MAPPING_NAME = new ASTNodeProperty(
|
||||
"Mapping name"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Get the new alias name.
|
||||
*
|
||||
* @return <code>IASTName</code>
|
||||
*/
|
||||
public IASTName getAlias();
|
||||
|
||||
/**
|
||||
* Set the new alias name.
|
||||
*
|
||||
* @param name
|
||||
* <code>IASTName</code>
|
||||
*/
|
||||
public void setAlias(IASTName name);
|
||||
|
||||
/**
|
||||
* Get the mapping name.
|
||||
*
|
||||
* @return <code>IASTName</code>
|
||||
*/
|
||||
public IASTName getMappingName();
|
||||
|
||||
/**
|
||||
* Set the mapping name.
|
||||
*
|
||||
* @param qualifiedName
|
||||
* <code>IASTName</code>
|
||||
*/
|
||||
public void setMappingName(IASTName qualifiedName);
|
||||
|
||||
}
|
||||
|
|
|
@ -16,24 +16,60 @@ import org.eclipse.cdt.core.dom.ast.IASTName;
|
|||
import org.eclipse.cdt.core.dom.ast.IScope;
|
||||
|
||||
/**
|
||||
* This interface repesents a namespace definition in C++.
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTNamespaceDefinition extends IASTDeclaration {
|
||||
|
||||
public static final ASTNodeProperty OWNED_DECLARATION = new ASTNodeProperty( "Owned" ); //$NON-NLS-1$
|
||||
public static final ASTNodeProperty NAMESPACE_NAME = new ASTNodeProperty( "Name"); //$NON-NLS-1$
|
||||
|
||||
|
||||
public IASTName getName();
|
||||
public void setName( IASTName name );
|
||||
|
||||
/**
|
||||
/**
|
||||
* <code>OWNED_DECLARATION</code> is the role served by all the nested
|
||||
* declarations.
|
||||
*/
|
||||
public static final ASTNodeProperty OWNED_DECLARATION = new ASTNodeProperty(
|
||||
"Owned"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* <code>NAMESPACE_NAME</code> is the role served by the name in this
|
||||
* interface.
|
||||
*/
|
||||
public static final ASTNodeProperty NAMESPACE_NAME = new ASTNodeProperty(
|
||||
"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);
|
||||
|
||||
/**
|
||||
* A translation unit contains an ordered sequence of declarations.
|
||||
*
|
||||
* @return List of IASTDeclaration
|
||||
* @return <code>IASTDeclaration []</code>
|
||||
*/
|
||||
public IASTDeclaration[] getDeclarations();
|
||||
|
||||
/**
|
||||
* Add a declaration to the namespace.
|
||||
*
|
||||
* @param declaration
|
||||
* <code>IASTDeclaration</code>
|
||||
*/
|
||||
public void addDeclaration(IASTDeclaration declaration);
|
||||
|
||||
/**
|
||||
* Get the scope object represented by this construct.
|
||||
*
|
||||
* @return <code>IScope</code>
|
||||
*/
|
||||
public IASTDeclaration [] getDeclarations();
|
||||
|
||||
public void addDeclaration( IASTDeclaration declaration );
|
||||
public IScope getScope();
|
||||
}
|
||||
|
|
|
@ -15,30 +15,120 @@ import org.eclipse.cdt.core.dom.ast.IASTExpression;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTTypeId;
|
||||
|
||||
/**
|
||||
* This interface represents a new expression.
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTNewExpression extends IASTExpression {
|
||||
|
||||
public boolean isGlobal();
|
||||
public void setIsGlobal( boolean value );
|
||||
|
||||
public static final ASTNodeProperty NEW_PLACEMENT = new ASTNodeProperty( "New Placement"); //$NON-NLS-1$
|
||||
public IASTExpression getNewPlacement();
|
||||
public void setNewPlacement( IASTExpression expression );
|
||||
|
||||
public static final ASTNodeProperty NEW_INITIALIZER = new ASTNodeProperty( "New Initializer"); //$NON-NLS-1$
|
||||
public IASTExpression getNewInitializer();
|
||||
public void setNewInitializer( IASTExpression expression );
|
||||
|
||||
public static final ASTNodeProperty TYPE_ID = new ASTNodeProperty( "Type Id"); //$NON-NLS-1$
|
||||
public IASTTypeId getTypeId();
|
||||
public void setTypeId( IASTTypeId typeId );
|
||||
/**
|
||||
* Is this a ::new expression?
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isGlobal();
|
||||
|
||||
public boolean isNewTypeId();
|
||||
public void setIsNewTypeId( boolean value );
|
||||
|
||||
public static final ASTNodeProperty NEW_TYPEID_ARRAY_EXPRESSION = new ASTNodeProperty( "Array Size Expression"); //$NON-NLS-1$
|
||||
public IASTExpression [] getNewTypeIdArrayExpressions();
|
||||
public void addNewTypeIdArrayExpression( IASTExpression expression );
|
||||
/**
|
||||
* Set this expression to bea global ::new expression (or not).
|
||||
*
|
||||
* @param value
|
||||
* boolean
|
||||
*/
|
||||
public void setIsGlobal(boolean value);
|
||||
|
||||
/**
|
||||
* NEW_PLACEMENT is a role for an expression to represent the location of
|
||||
* where the memory should be allocated.
|
||||
*/
|
||||
public static final ASTNodeProperty NEW_PLACEMENT = new ASTNodeProperty(
|
||||
"New Placement"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Get the new placement (optional).
|
||||
*
|
||||
* @return <code>IASTExpression</code>
|
||||
*/
|
||||
public IASTExpression getNewPlacement();
|
||||
|
||||
/**
|
||||
* Set the new placement expression.
|
||||
*
|
||||
* @param expression
|
||||
* <code>IASTExpression</code>
|
||||
*/
|
||||
public void setNewPlacement(IASTExpression expression);
|
||||
|
||||
/**
|
||||
* <code>NEW_INITIALIZER</code>
|
||||
*/
|
||||
public static final ASTNodeProperty NEW_INITIALIZER = new ASTNodeProperty(
|
||||
"New Initializer"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* @return <code>IASTExpression</code>
|
||||
*/
|
||||
public IASTExpression getNewInitializer();
|
||||
|
||||
/**
|
||||
* @param expression
|
||||
* <code>IASTExpression</code>
|
||||
*/
|
||||
public void setNewInitializer(IASTExpression expression);
|
||||
|
||||
/**
|
||||
* TYPE_ID is the type being 'newed'.
|
||||
*/
|
||||
public static final ASTNodeProperty TYPE_ID = new ASTNodeProperty("Type Id"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Get the type Id.
|
||||
*
|
||||
* @return <code>IASTTypeId</code>
|
||||
*/
|
||||
public IASTTypeId getTypeId();
|
||||
|
||||
/**
|
||||
* Set the type Id.
|
||||
*
|
||||
* @param typeId
|
||||
* <code>IASTTypeId</code>
|
||||
*/
|
||||
public void setTypeId(IASTTypeId typeId);
|
||||
|
||||
/**
|
||||
* Is the typeID a new type ID?
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isNewTypeId();
|
||||
|
||||
/**
|
||||
* Set the type ID to be a new type ID.
|
||||
*
|
||||
* @param value
|
||||
* boolean
|
||||
*/
|
||||
public void setIsNewTypeId(boolean value);
|
||||
|
||||
/**
|
||||
* Expressions that go inside array brackets.
|
||||
*/
|
||||
public static final ASTNodeProperty NEW_TYPEID_ARRAY_EXPRESSION = new ASTNodeProperty(
|
||||
"Array Size Expression"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Get the new array size expressions.
|
||||
*
|
||||
* @return <code>IASTExpression []</code>
|
||||
*/
|
||||
public IASTExpression[] getNewTypeIdArrayExpressions();
|
||||
|
||||
/**
|
||||
* Add another array size expression.
|
||||
*
|
||||
* @param expression
|
||||
* <code>IASTExpression</code>
|
||||
*/
|
||||
public void addNewTypeIdArrayExpression(IASTExpression expression);
|
||||
|
||||
}
|
||||
|
|
|
@ -16,6 +16,6 @@ import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
|
|||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTParameterDeclaration extends ICPPASTTemplateParameter,
|
||||
IASTParameterDeclaration {
|
||||
IASTParameterDeclaration {
|
||||
|
||||
}
|
||||
|
|
|
@ -21,8 +21,24 @@ import org.eclipse.cdt.core.dom.ast.IASTPointer;
|
|||
*/
|
||||
public interface ICPPASTPointerToMember extends IASTPointer {
|
||||
|
||||
public static final ASTNodeProperty NAME = new ASTNodeProperty( "Name"); //$NON-NLS-1$
|
||||
public void setName( IASTName name );
|
||||
public IASTName getName();
|
||||
|
||||
/**
|
||||
* This property refers to the nested name.
|
||||
*/
|
||||
public static final ASTNodeProperty NAME = new ASTNodeProperty("Name"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Set the name.
|
||||
*
|
||||
* @param name
|
||||
* <code>IASTName</code>
|
||||
*/
|
||||
public void setName(IASTName name);
|
||||
|
||||
/**
|
||||
* Get the name.
|
||||
*
|
||||
* @return <code>IASTName</code>
|
||||
*/
|
||||
public IASTName getName();
|
||||
|
||||
}
|
||||
|
|
|
@ -14,14 +14,45 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
|
||||
/**
|
||||
* This interface is a qualified name in C++.
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTQualifiedName extends IASTName {
|
||||
|
||||
public static final ASTNodeProperty SEGMENT_NAME = new ASTNodeProperty( "Segment"); //$NON-NLS-1$
|
||||
public void addName( IASTName name );
|
||||
public IASTName [] getNames();
|
||||
|
||||
public boolean isFullyQualified();
|
||||
public void setFullyQualified( boolean value );
|
||||
/**
|
||||
* Each IASTName segment has property being <code>SEGMENT_NAME</code>.
|
||||
*/
|
||||
public static final ASTNodeProperty SEGMENT_NAME = new ASTNodeProperty(
|
||||
"Segment"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Add a subname.
|
||||
*
|
||||
* @param name
|
||||
* <code>IASTName</code>
|
||||
*/
|
||||
public void addName(IASTName name);
|
||||
|
||||
/**
|
||||
* Get all subnames.
|
||||
*
|
||||
* @return <code>IASTName []</code>
|
||||
*/
|
||||
public IASTName[] getNames();
|
||||
|
||||
/**
|
||||
* Is this name fully qualified?
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isFullyQualified();
|
||||
|
||||
/**
|
||||
* Set this name to be fully qualified or not (true/false).
|
||||
*
|
||||
* @param value
|
||||
* boolean
|
||||
*/
|
||||
public void setFullyQualified(boolean value);
|
||||
}
|
||||
|
|
|
@ -17,10 +17,22 @@ import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier;
|
|||
*
|
||||
* @author Doug Schaefer
|
||||
*/
|
||||
public interface ICPPASTSimpleDeclSpecifier extends IASTSimpleDeclSpecifier, ICPPASTDeclSpecifier {
|
||||
public interface ICPPASTSimpleDeclSpecifier extends IASTSimpleDeclSpecifier,
|
||||
ICPPASTDeclSpecifier {
|
||||
// Extra types
|
||||
/**
|
||||
* <code>t_bool</code> bool
|
||||
*/
|
||||
public static final int t_bool = IASTSimpleDeclSpecifier.t_last + 1;
|
||||
|
||||
/**
|
||||
* <code>t_wchar_t</code> wchar_t
|
||||
*/
|
||||
public static final int t_wchar_t = IASTSimpleDeclSpecifier.t_last + 2;
|
||||
|
||||
/**
|
||||
* <code>t_last</code> is specified for subinterfaces.
|
||||
*/
|
||||
public static final int t_last = t_wchar_t;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -14,30 +14,111 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTExpression;
|
||||
|
||||
/**
|
||||
* Simple type constructor postfix expression.
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTSimpleTypeConstructorExpression extends IASTExpression {
|
||||
|
||||
/**
|
||||
* t_unspecified (error)
|
||||
*/
|
||||
public static final int t_unspecified = 0;
|
||||
|
||||
/**
|
||||
* t_void == void
|
||||
*/
|
||||
public static final int t_void = 1;
|
||||
|
||||
/**
|
||||
* t_char == char
|
||||
*/
|
||||
public static final int t_char = 2;
|
||||
|
||||
/**
|
||||
* t_int == int
|
||||
*/
|
||||
public static final int t_int = 3;
|
||||
|
||||
/**
|
||||
* t_float == float
|
||||
*/
|
||||
public static final int t_float = 4;
|
||||
|
||||
/**
|
||||
* t_double == double
|
||||
*/
|
||||
public static final int t_double = 5;
|
||||
|
||||
/**
|
||||
* t_bool = bool
|
||||
*/
|
||||
public static final int t_bool = 6;
|
||||
|
||||
/**
|
||||
* t_wchar_t = wchar_t
|
||||
*/
|
||||
public static final int t_wchar_t = 7;
|
||||
|
||||
/**
|
||||
* t_short = short
|
||||
*/
|
||||
public static final int t_short = 8;
|
||||
|
||||
/**
|
||||
* t_long = long
|
||||
*/
|
||||
public static final int t_long = 9;
|
||||
|
||||
/**
|
||||
* t_signed = signed
|
||||
*/
|
||||
public static final int t_signed = 10;
|
||||
|
||||
/**
|
||||
* t_unsigned = unsigned
|
||||
*/
|
||||
public static final int t_unsigned = 11;
|
||||
|
||||
/**
|
||||
* t_last is provided for subinterfaces.
|
||||
*/
|
||||
public static final int t_last = t_unsigned;
|
||||
|
||||
/**
|
||||
* Get the simple type.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public int getSimpleType();
|
||||
public void setSimpleType( int value );
|
||||
|
||||
public static final ASTNodeProperty INITIALIZER_VALUE = new ASTNodeProperty( "Initializer Value"); //$NON-NLS-1$
|
||||
|
||||
|
||||
/**
|
||||
* Set the simple type.
|
||||
*
|
||||
* @param value
|
||||
* int
|
||||
*/
|
||||
public void setSimpleType(int value);
|
||||
|
||||
/**
|
||||
* INITIALIZER_VALUE is the value passed into the constructor.
|
||||
*/
|
||||
public static final ASTNodeProperty INITIALIZER_VALUE = new ASTNodeProperty(
|
||||
"Initializer Value"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Get the initial value.
|
||||
*
|
||||
* @return <code>IASTExpression</code>
|
||||
*/
|
||||
public IASTExpression getInitialValue();
|
||||
public void setInitialValue( IASTExpression expression );
|
||||
|
||||
|
||||
/**
|
||||
* Set the initial value.
|
||||
*
|
||||
* @param expression
|
||||
* <code>IASTExpression</code>
|
||||
*/
|
||||
public void setInitialValue(IASTExpression expression);
|
||||
|
||||
}
|
||||
|
|
|
@ -15,23 +15,78 @@ import org.eclipse.cdt.core.dom.ast.IASTName;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTTypeId;
|
||||
|
||||
/**
|
||||
* This interface represents a simple type template parameter.
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTSimpleTypeTemplateParameter extends
|
||||
ICPPASTTemplateParameter {
|
||||
ICPPASTTemplateParameter {
|
||||
|
||||
public static final int st_class = 1;
|
||||
public static final int st_typename = 2;
|
||||
|
||||
public int getParameterType();
|
||||
public void setParameterType( int value );
|
||||
|
||||
public static final ASTNodeProperty PARAMETER_NAME = new ASTNodeProperty( "Name" ); //$NON-NLS-1$
|
||||
public IASTName getName();
|
||||
public void setName( IASTName name );
|
||||
/**
|
||||
* <code>st_class</code> represents a class.
|
||||
*/
|
||||
public static final int st_class = 1;
|
||||
|
||||
public static final ASTNodeProperty DEFAULT_TYPE = new ASTNodeProperty( "Default Type"); //$NON-NLS-1$
|
||||
public IASTTypeId getDefaultType();
|
||||
public void setDefaultType( IASTTypeId typeId );
|
||||
/**
|
||||
* <code>st_typename</code> represents a typename.
|
||||
*/
|
||||
public static final int st_typename = 2;
|
||||
|
||||
/**
|
||||
* Get the parameter type.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public int getParameterType();
|
||||
|
||||
/**
|
||||
* Set the parameter type.
|
||||
*
|
||||
* @param value
|
||||
* int
|
||||
*/
|
||||
public void setParameterType(int value);
|
||||
|
||||
/**
|
||||
* The parameter name.
|
||||
*/
|
||||
public static final ASTNodeProperty PARAMETER_NAME = new ASTNodeProperty(
|
||||
"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);
|
||||
|
||||
/**
|
||||
* DEFAULT_TYPE is the optional default typeId value
|
||||
*/
|
||||
public static final ASTNodeProperty DEFAULT_TYPE = new ASTNodeProperty(
|
||||
"Default Type"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Get the default type.
|
||||
*
|
||||
* @return <code>IASTTypeId</code>
|
||||
*/
|
||||
public IASTTypeId getDefaultType();
|
||||
|
||||
/**
|
||||
* Set the default type.
|
||||
*
|
||||
* @param typeId
|
||||
* <code>IASTTypeId</code>
|
||||
*/
|
||||
public void setDefaultType(IASTTypeId typeId);
|
||||
|
||||
}
|
||||
|
|
|
@ -14,18 +14,67 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
|
||||
|
||||
/**
|
||||
* Template declaration.
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTTemplateDeclaration extends IASTDeclaration {
|
||||
|
||||
public boolean isExported();
|
||||
public void setExported( boolean value );
|
||||
|
||||
public static final ASTNodeProperty OWNED_DECLARATION = new ASTNodeProperty( "Owned Declaration"); //$NON-NLS-1$
|
||||
public IASTDeclaration getDeclaration();
|
||||
public void setDeclaration( IASTDeclaration declaration );
|
||||
|
||||
public static final ASTNodeProperty PARAMETER = new ASTNodeProperty( "Template Parameter"); //$NON-NLS-1$
|
||||
public ICPPASTTemplateParameter [] getTemplateParameters();
|
||||
public void addTemplateParamter( ICPPASTTemplateParameter parm );
|
||||
/**
|
||||
* Is the export keyword used?
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isExported();
|
||||
|
||||
/**
|
||||
* Should the export keyword be used?
|
||||
*
|
||||
* @param value
|
||||
* boolean
|
||||
*/
|
||||
public void setExported(boolean value);
|
||||
|
||||
/**
|
||||
* <code>OWNED_DECLARATION</code> is the subdeclaration that we maintain
|
||||
* grammatically.
|
||||
*/
|
||||
public static final ASTNodeProperty OWNED_DECLARATION = new ASTNodeProperty(
|
||||
"Owned Declaration"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Get templated declaration.
|
||||
*
|
||||
* @return <code>IASTDeclaration</code>
|
||||
*/
|
||||
public IASTDeclaration getDeclaration();
|
||||
|
||||
/**
|
||||
* Set the templated declaration.
|
||||
*
|
||||
* @param declaration
|
||||
* <code>IASTDeclaration</code>
|
||||
*/
|
||||
public void setDeclaration(IASTDeclaration declaration);
|
||||
|
||||
/**
|
||||
* <code>PARAMETER</code> is used for template parameters.
|
||||
*/
|
||||
public static final ASTNodeProperty PARAMETER = new ASTNodeProperty(
|
||||
"Template Parameter"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Get template parameters.
|
||||
*
|
||||
* @return <code>ICPPASTTemplateParameter []</code>
|
||||
*/
|
||||
public ICPPASTTemplateParameter[] getTemplateParameters();
|
||||
|
||||
/**
|
||||
* Add a template parameter.
|
||||
*
|
||||
* @param parm
|
||||
* <code>ICPPASTTemplateParameter</code>
|
||||
*/
|
||||
public void addTemplateParamter(ICPPASTTemplateParameter parm);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
**********************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast.cpp;
|
||||
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTExpression;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
|
@ -22,14 +21,59 @@ import org.eclipse.cdt.core.dom.ast.IASTTypeId;
|
|||
*/
|
||||
public interface ICPPASTTemplateId extends IASTName {
|
||||
|
||||
public static final ASTNodeProperty TEMPLATE_NAME = new ASTNodeProperty( "TemplateId Name"); //$NON-NLS-1$
|
||||
public IASTName getTemplateName();
|
||||
public void setTemplateName( IASTName name );
|
||||
|
||||
public static final ASTNodeProperty TEMPLATE_ID_ARGUMENT = new ASTNodeProperty( "TemplateId Arg"); //$NON-NLS-1$
|
||||
public static final IASTNode[] EMPTY_ARG_ARRAY = new IASTNode[0];
|
||||
public void addTemplateArgument( IASTTypeId typeId );
|
||||
public void addTemplateArgument( IASTExpression expression );
|
||||
public IASTNode[] getTemplateArguments();
|
||||
|
||||
/**
|
||||
* TEMPLATE_NAME is the IASTName.
|
||||
*/
|
||||
public static final ASTNodeProperty TEMPLATE_NAME = new ASTNodeProperty(
|
||||
"TemplateId Name"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Get the name.
|
||||
*
|
||||
* @return <code>IASTName</code>
|
||||
*/
|
||||
public IASTName getTemplateName();
|
||||
|
||||
/**
|
||||
* Set the name.
|
||||
*
|
||||
* @param name
|
||||
* <code>IASTName</code>
|
||||
*/
|
||||
public void setTemplateName(IASTName name);
|
||||
|
||||
/**
|
||||
* TEMPLATE_ID_ARGUMENT = template id argument.
|
||||
*/
|
||||
public static final ASTNodeProperty TEMPLATE_ID_ARGUMENT = new ASTNodeProperty(
|
||||
"TemplateId Arg"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Constant.
|
||||
*/
|
||||
public static final IASTNode[] EMPTY_ARG_ARRAY = new IASTNode[0];
|
||||
|
||||
/**
|
||||
* Add template argument.
|
||||
*
|
||||
* @param typeId
|
||||
* <code>IASTTypeId</code>
|
||||
*/
|
||||
public void addTemplateArgument(IASTTypeId typeId);
|
||||
|
||||
/**
|
||||
* Add template argument.
|
||||
*
|
||||
* @param expression
|
||||
* <code>IASTExpression</code>
|
||||
*/
|
||||
public void addTemplateArgument(IASTExpression expression);
|
||||
|
||||
/**
|
||||
* Get all template arguments. (as nodes)
|
||||
*
|
||||
* @return <code>IASTNode []</code>
|
||||
*/
|
||||
public IASTNode[] getTemplateArguments();
|
||||
|
||||
}
|
||||
|
|
|
@ -13,9 +13,14 @@ package org.eclipse.cdt.core.dom.ast.cpp;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTNode;
|
||||
|
||||
/**
|
||||
* Base interface for all template parameters.
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTTemplateParameter extends IASTNode {
|
||||
public static final ICPPASTTemplateParameter [] EMPTY_TEMPLATEPARAMETER_ARRAY = new ICPPASTTemplateParameter[0];
|
||||
/**
|
||||
* Constant
|
||||
*/
|
||||
public static final ICPPASTTemplateParameter[] EMPTY_TEMPLATEPARAMETER_ARRAY = new ICPPASTTemplateParameter[0];
|
||||
|
||||
}
|
||||
|
|
|
@ -14,12 +14,31 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
|
||||
|
||||
/**
|
||||
* This interface represents a template specialization.
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTTemplateSpecialization extends IASTDeclaration {
|
||||
|
||||
public static final ASTNodeProperty OWNED_DECLARATION = new ASTNodeProperty( "Owned Declaration"); //$NON-NLS-1$
|
||||
public IASTDeclaration getDeclaration();
|
||||
public void setDeclaration( IASTDeclaration declaration );
|
||||
/**
|
||||
* The declaration that the specialization affects.
|
||||
*/
|
||||
public static final ASTNodeProperty OWNED_DECLARATION = new ASTNodeProperty(
|
||||
"Owned Declaration"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Get the declaration.
|
||||
*
|
||||
* @return <code>IASTDeclaration</code>
|
||||
*/
|
||||
public IASTDeclaration getDeclaration();
|
||||
|
||||
/**
|
||||
* Set the declaration.
|
||||
*
|
||||
* @param declaration
|
||||
* <code>IASTDeclaration</code>
|
||||
*/
|
||||
public void setDeclaration(IASTDeclaration declaration);
|
||||
|
||||
}
|
||||
|
|
|
@ -10,26 +10,78 @@
|
|||
**********************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast.cpp;
|
||||
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTExpression;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
|
||||
/**
|
||||
* This is a templated template parameter.
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTTemplatedTypeTemplateParameter extends
|
||||
ICPPASTTemplateParameter {
|
||||
ICPPASTTemplateParameter {
|
||||
|
||||
public static final ASTNodeProperty PARAMETER = new ASTNodeProperty( "Template Parameter"); //$NON-NLS-1$
|
||||
public ICPPASTTemplateParameter[] getTemplateParameters();
|
||||
public void addTemplateParamter( ICPPASTTemplateParameter parm );
|
||||
/**
|
||||
* PARAMETER
|
||||
*/
|
||||
public static final ASTNodeProperty PARAMETER = new ASTNodeProperty(
|
||||
"Template Parameter"); //$NON-NLS-1$
|
||||
|
||||
public static final ASTNodeProperty PARAMETER_NAME = new ASTNodeProperty( "Name" ); //$NON-NLS-1$
|
||||
public IASTName getName();
|
||||
public void setName( IASTName name );
|
||||
/**
|
||||
* Get all template parameters.
|
||||
*
|
||||
* @return <code>ICPPASTTemplateParameter []</code>
|
||||
*/
|
||||
public ICPPASTTemplateParameter[] getTemplateParameters();
|
||||
|
||||
public static final ASTNodeProperty DEFAULT_VALUE = new ASTNodeProperty( "Default Value"); //$NON-NLS-1$
|
||||
public IASTExpression getDefaultValue();
|
||||
public void setDefaultValue( IASTExpression expression );
|
||||
/**
|
||||
* Add a parameter.
|
||||
*
|
||||
* @param parm
|
||||
* <code>ICPPASTTemplateParameter</code>
|
||||
*/
|
||||
public void addTemplateParamter(ICPPASTTemplateParameter parm);
|
||||
|
||||
/**
|
||||
* This parameter's name.
|
||||
*/
|
||||
public static final ASTNodeProperty PARAMETER_NAME = new ASTNodeProperty(
|
||||
"Name"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Get name.
|
||||
*
|
||||
* @return <code>IASTName</code>
|
||||
*/
|
||||
public IASTName getName();
|
||||
|
||||
/**
|
||||
* Set name.
|
||||
*
|
||||
* @param name
|
||||
* <code>IASTName</code>
|
||||
*/
|
||||
public void setName(IASTName name);
|
||||
|
||||
/**
|
||||
* DEFAULT_VALUE is an expession.
|
||||
*/
|
||||
public static final ASTNodeProperty DEFAULT_VALUE = new ASTNodeProperty(
|
||||
"Default Value"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Get default value for template type.
|
||||
*
|
||||
* @return <code>IASTExpression</code>
|
||||
*/
|
||||
public IASTExpression getDefaultValue();
|
||||
|
||||
/**
|
||||
* Set default value for template type.
|
||||
*
|
||||
* @param expression
|
||||
* <code>IASTExpression</code>
|
||||
*/
|
||||
public void setDefaultValue(IASTExpression expression);
|
||||
}
|
||||
|
|
|
@ -20,5 +20,12 @@ import org.eclipse.cdt.core.dom.ast.IBinding;
|
|||
* @author aniefer
|
||||
*/
|
||||
public interface ICPPASTTranslationUnit extends IASTTranslationUnit {
|
||||
|
||||
/**
|
||||
* Resolve the binding for translation unit.
|
||||
*
|
||||
* @return <code>IBinding</code>
|
||||
*/
|
||||
public IBinding resolveBinding();
|
||||
|
||||
}
|
||||
|
|
|
@ -14,26 +14,54 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTStatement;
|
||||
|
||||
/**
|
||||
* This interface represents the try block statement. try { //body } catch( Exc
|
||||
* e ) { // handler } catch( ... ) {
|
||||
* }
|
||||
*
|
||||
* @author jcamelon
|
||||
*
|
||||
*/
|
||||
public interface ICPPASTTryBlockStatement extends IASTStatement {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* <code>BODY</code> is the body of the try block.
|
||||
*/
|
||||
public static final ASTNodeProperty BODY = new ASTNodeProperty("Body"); //$NON-NLS-1$
|
||||
|
||||
public static final ASTNodeProperty BODY = new ASTNodeProperty( "Body"); //$NON-NLS-1$
|
||||
/**
|
||||
* @param tryBlock
|
||||
*/
|
||||
public void setTryBody(IASTStatement tryBlock);
|
||||
public IASTStatement getTryBody();
|
||||
|
||||
/**
|
||||
* Set try body.
|
||||
*
|
||||
* @param tryBlock
|
||||
* <code>IASTStatement</code>
|
||||
*/
|
||||
public void setTryBody(IASTStatement tryBlock);
|
||||
|
||||
public static final ASTNodeProperty CATCH_HANDLER = new ASTNodeProperty( "Catch Handler"); //$NON-NLS-1$
|
||||
/**
|
||||
* @param handler
|
||||
*/
|
||||
public void addCatchHandler(ICPPASTCatchHandler handler);
|
||||
public ICPPASTCatchHandler [] getCatchHandlers();
|
||||
/**
|
||||
* Get try body.
|
||||
*
|
||||
* @return <code>IASTStatement</code>
|
||||
*/
|
||||
public IASTStatement getTryBody();
|
||||
|
||||
/**
|
||||
* <code>CATCH_HANDLER</code> are the exception catching handlers.
|
||||
*/
|
||||
public static final ASTNodeProperty CATCH_HANDLER = new ASTNodeProperty(
|
||||
"Catch Handler"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Add catch handler.
|
||||
*
|
||||
* @param handler
|
||||
* <code>ICPPASTCatchHandler</code>
|
||||
*/
|
||||
public void addCatchHandler(ICPPASTCatchHandler handler);
|
||||
|
||||
/**
|
||||
* Get the catch handlers.
|
||||
*
|
||||
* @return <code>ICPPASTCatchHandler []</code>
|
||||
*/
|
||||
public ICPPASTCatchHandler[] getCatchHandlers();
|
||||
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ import org.eclipse.cdt.core.dom.ast.IASTTypeIdExpression;
|
|||
*/
|
||||
public interface ICPPASTTypeIdExpression extends IASTTypeIdExpression {
|
||||
|
||||
public static final int op_typeid = IASTTypeIdExpression.op_last + 1;
|
||||
public static final int op_last = op_typeid;
|
||||
public static final int op_typeid = IASTTypeIdExpression.op_last + 1;
|
||||
|
||||
public static final int op_last = op_typeid;
|
||||
}
|
||||
|
|
|
@ -19,24 +19,61 @@ import org.eclipse.cdt.core.dom.ast.IASTName;
|
|||
*/
|
||||
public interface ICPPASTTypenameExpression extends IASTExpression {
|
||||
|
||||
/**
|
||||
* @param templateTokenConsumed
|
||||
*/
|
||||
public void setIsTemplate(boolean templateTokenConsumed);
|
||||
public boolean isTemplate();
|
||||
/**
|
||||
* Was template token consumed?
|
||||
*
|
||||
* @param templateTokenConsumed
|
||||
* boolean
|
||||
*/
|
||||
public void setIsTemplate(boolean templateTokenConsumed);
|
||||
|
||||
public static final ASTNodeProperty TYPENAME = new ASTNodeProperty( "Typename" ); //$NON-NLS-1$
|
||||
/**
|
||||
* @param name
|
||||
*/
|
||||
public void setName(IASTName name);
|
||||
public IASTName getName();
|
||||
/**
|
||||
* Was template token consumed?
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isTemplate();
|
||||
|
||||
public static final ASTNodeProperty INITIAL_VALUE = new ASTNodeProperty( "Initial Value"); //$NON-NLS-1$
|
||||
/**
|
||||
* @param expressionList
|
||||
*/
|
||||
public void setInitialValue(IASTExpression expressionList);
|
||||
public IASTExpression getInitialValue();
|
||||
/**
|
||||
* <code>TYPENAME</code> is the name of the type.
|
||||
*/
|
||||
public static final ASTNodeProperty TYPENAME = new ASTNodeProperty(
|
||||
"Typename"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Set the name.
|
||||
*
|
||||
* @param name
|
||||
* <code>IASTName</code>
|
||||
*/
|
||||
public void setName(IASTName name);
|
||||
|
||||
/**
|
||||
* Get the name.
|
||||
*
|
||||
* @return <code>IASTName</code>
|
||||
*/
|
||||
public IASTName getName();
|
||||
|
||||
/**
|
||||
* <code>INITIAL_VALUE</code> is an expression.
|
||||
*/
|
||||
public static final ASTNodeProperty INITIAL_VALUE = new ASTNodeProperty(
|
||||
"Initial Value"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Set initial value.
|
||||
*
|
||||
* @param expressionList
|
||||
* <code>IASTExpression</code>
|
||||
*/
|
||||
public void setInitialValue(IASTExpression expressionList);
|
||||
|
||||
/**
|
||||
* Get initial value.
|
||||
*
|
||||
* @return <code>IASTExpression</code>
|
||||
*/
|
||||
public IASTExpression getInitialValue();
|
||||
|
||||
}
|
||||
|
|
|
@ -17,8 +17,19 @@ import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression;
|
|||
*/
|
||||
public interface ICPPASTUnaryExpression extends IASTUnaryExpression {
|
||||
|
||||
public static final int op_throw = IASTUnaryExpression.op_last + 1;
|
||||
public static final int op_typeid = IASTUnaryExpression.op_last + 2;
|
||||
public static final int op_last = op_typeid;
|
||||
|
||||
/**
|
||||
* <code>op_throw</code> throw exp
|
||||
*/
|
||||
public static final int op_throw = IASTUnaryExpression.op_last + 1;
|
||||
|
||||
/**
|
||||
* <code>op_typeid</code> = typeid( exp )
|
||||
*/
|
||||
public static final int op_typeid = IASTUnaryExpression.op_last + 2;
|
||||
|
||||
/**
|
||||
* <code>op_last</code> is provided for subinterfaces.
|
||||
*/
|
||||
public static final int op_last = op_typeid;
|
||||
|
||||
}
|
||||
|
|
|
@ -15,16 +15,45 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
|
||||
/**
|
||||
* This interface represents a using declaration.
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTUsingDeclaration extends IASTDeclaration {
|
||||
|
||||
public static final ASTNodeProperty NAME = new ASTNodeProperty( "Name"); //$NON-NLS-1$
|
||||
|
||||
public void setIsTypename( boolean value );
|
||||
public boolean isTypename();
|
||||
/**
|
||||
* <code>NAME</code> is the qualified name brought into scope.
|
||||
*/
|
||||
public static final ASTNodeProperty NAME = new ASTNodeProperty("Name"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Was the typename keyword used?
|
||||
*
|
||||
* @param value
|
||||
* boolean
|
||||
*/
|
||||
public void setIsTypename(boolean value);
|
||||
|
||||
/**
|
||||
* Set that the typename keyword was/wasn't used.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isTypename();
|
||||
|
||||
/**
|
||||
* Get the name.
|
||||
*
|
||||
* @return <code>IASTName</code>
|
||||
*/
|
||||
public IASTName getName();
|
||||
|
||||
/**
|
||||
* Set the name.
|
||||
*
|
||||
* @param name
|
||||
* <code>IASTName</code>
|
||||
*/
|
||||
public void setName(IASTName name);
|
||||
|
||||
public IASTName getName();
|
||||
public void setName(IASTName name);
|
||||
|
||||
}
|
||||
|
|
|
@ -15,13 +15,36 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
|
||||
/**
|
||||
* This interface represents a C++ using directive.
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTUsingDirective extends IASTDeclaration {
|
||||
public static final ICPPASTUsingDirective [] EMPTY_USINGDIRECTIVE_ARRAY = new ICPPASTUsingDirective[0];
|
||||
public static final ASTNodeProperty QUALIFIED_NAME = new ASTNodeProperty( "Name"); //$NON-NLS-1$
|
||||
|
||||
public IASTName getQualifiedName();
|
||||
public void setQualifiedName( IASTName qualifiedName );
|
||||
|
||||
/**
|
||||
* Constant.
|
||||
*/
|
||||
public static final ICPPASTUsingDirective[] EMPTY_USINGDIRECTIVE_ARRAY = new ICPPASTUsingDirective[0];
|
||||
|
||||
/**
|
||||
* <code>QUALIFIED_NAME</code> is the name that is brought into local
|
||||
* scope.
|
||||
*/
|
||||
public static final ASTNodeProperty QUALIFIED_NAME = new ASTNodeProperty(
|
||||
"Name"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Get the qualified name.
|
||||
*
|
||||
* @return <code>IASTName</code>
|
||||
*/
|
||||
public IASTName getQualifiedName();
|
||||
|
||||
/**
|
||||
* Set the qualified name.
|
||||
*
|
||||
* @param qualifiedName
|
||||
* <code>IASTName</code>
|
||||
*/
|
||||
public void setQualifiedName(IASTName qualifiedName);
|
||||
|
||||
}
|
||||
|
|
|
@ -13,15 +13,41 @@ package org.eclipse.cdt.core.dom.ast.cpp;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
|
||||
|
||||
/**
|
||||
* C++ allows for visibility labels to be mixed interdeclaration in class
|
||||
* specifiers.
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface ICPPASTVisiblityLabel extends IASTDeclaration {
|
||||
|
||||
public static final int v_public = 1;
|
||||
public static final int v_protected = 2;
|
||||
public static final int v_private = 3;
|
||||
|
||||
public int getVisibility();
|
||||
public void setVisibility( int visibility );
|
||||
|
||||
/**
|
||||
* <code>v_public</code> == public:
|
||||
*/
|
||||
public static final int v_public = 1;
|
||||
|
||||
/**
|
||||
* <code>v_protected</code> == protected:
|
||||
*/
|
||||
public static final int v_protected = 2;
|
||||
|
||||
/**
|
||||
* <code>v_private</code> == private:
|
||||
*/
|
||||
public static final int v_private = 3;
|
||||
|
||||
/**
|
||||
* Get the visibility.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public int getVisibility();
|
||||
|
||||
/**
|
||||
* Set visibility.
|
||||
*
|
||||
* @param visibility
|
||||
* int
|
||||
*/
|
||||
public void setVisibility(int visibility);
|
||||
|
||||
}
|
||||
|
|
|
@ -15,13 +15,31 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTWhileStatement;
|
||||
|
||||
/**
|
||||
* This inteface accommodates C++ allows for broader while loop syntax.
|
||||
*
|
||||
* @author jcamelon
|
||||
*
|
||||
*/
|
||||
public interface ICPPASTWhileStatement extends IASTWhileStatement {
|
||||
|
||||
public static final ASTNodeProperty CONDITIONDECLARATION = new ASTNodeProperty("initDeclaration"); //$NON-NLS-1$
|
||||
public IASTDeclaration getConditionDeclaration();
|
||||
/**
|
||||
* In C++ conditions can be declarations w/side effects.
|
||||
*/
|
||||
public static final ASTNodeProperty CONDITIONDECLARATION = new ASTNodeProperty(
|
||||
"initDeclaration"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Get the condition declaration.
|
||||
*
|
||||
* @return <code>IASTDeclaration</code>
|
||||
*/
|
||||
public IASTDeclaration getConditionDeclaration();
|
||||
|
||||
/**
|
||||
* Set the condition declaration.
|
||||
*
|
||||
* @param declaration
|
||||
* <code>IASTDeclaration</code>
|
||||
*/
|
||||
public void setConditionDeclaration(IASTDeclaration declaration);
|
||||
|
||||
}
|
||||
|
|
|
@ -19,24 +19,26 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBas
|
|||
* @author Doug Schaefer
|
||||
*/
|
||||
public interface ICPPBase {
|
||||
public static final ICPPBase [] EMPTY_BASE_ARRAY = new ICPPBase[0];
|
||||
|
||||
public static final ICPPBase[] EMPTY_BASE_ARRAY = new ICPPBase[0];
|
||||
|
||||
/**
|
||||
* The base class.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public ICPPClassType getBaseClass() throws DOMException;
|
||||
|
||||
|
||||
/**
|
||||
* The visibility qualifier applied to the base class.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public int getVisibility() throws DOMException;
|
||||
|
||||
|
||||
public static final int v_private = ICPPASTBaseSpecifier.v_private;
|
||||
|
||||
public static final int v_protected = ICPPASTBaseSpecifier.v_protected;
|
||||
|
||||
public static final int v_public = ICPPASTBaseSpecifier.v_public;
|
||||
|
||||
/**
|
||||
|
|
|
@ -19,7 +19,8 @@ import org.eclipse.cdt.core.dom.ast.IBasicType;
|
|||
* @author aniefer
|
||||
*/
|
||||
public interface ICPPBasicType extends IBasicType {
|
||||
//Extra types
|
||||
// Extra types
|
||||
public static final int t_bool = ICPPASTSimpleDeclSpecifier.t_bool;
|
||||
|
||||
public static final int t_wchar_t = ICPPASTSimpleDeclSpecifier.t_wchar_t;
|
||||
}
|
||||
|
|
|
@ -17,18 +17,20 @@ package org.eclipse.cdt.core.dom.ast.cpp;
|
|||
* @author aniefer
|
||||
*/
|
||||
public interface ICPPClassScope extends ICPPScope {
|
||||
/**
|
||||
* Get the binding for the class this scope is associated with
|
||||
* @return
|
||||
*/
|
||||
ICPPClassType getClassType();
|
||||
|
||||
/**
|
||||
* Returns an array of methods that were implicitly added to this class scope.
|
||||
* These methods may or may not have been explicitly declared in the code.
|
||||
* The methods that will be implicitly declared are: the default constructor,
|
||||
* copy constructor, copy assignment operator, and destructor
|
||||
* Get the binding for the class this scope is associated with
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public ICPPMethod [] getImplicitMethods();
|
||||
ICPPClassType getClassType();
|
||||
|
||||
/**
|
||||
* Returns an array of methods that were implicitly added to this class
|
||||
* scope. These methods may or may not have been explicitly declared in the
|
||||
* code. The methods that will be implicitly declared are: the default
|
||||
* constructor, copy constructor, copy assignment operator, and destructor
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public ICPPMethod[] getImplicitMethods();
|
||||
}
|
||||
|
|
|
@ -23,30 +23,32 @@ import org.eclipse.cdt.core.dom.ast.IField;
|
|||
public interface ICPPClassType extends ICompositeType {
|
||||
|
||||
public static final int k_class = ICPPASTCompositeTypeSpecifier.k_class;
|
||||
|
||||
/**
|
||||
* Returns a list of base class relationships. The list is empty if
|
||||
* there are none.
|
||||
* Returns a list of base class relationships. The list is empty if there
|
||||
* are none.
|
||||
*
|
||||
* @return List of ICPPBase
|
||||
*/
|
||||
public ICPPBase [] getBases() throws DOMException;
|
||||
public ICPPBase[] getBases() throws DOMException;
|
||||
|
||||
/**
|
||||
* Get fields is restated here just to point out that this method returns
|
||||
* a list of ICPPField objects representing all fields, declared or inherited.
|
||||
* Get fields is restated here just to point out that this method returns a
|
||||
* list of ICPPField objects representing all fields, declared or inherited.
|
||||
*/
|
||||
public IField[] getFields() throws DOMException;
|
||||
|
||||
|
||||
/**
|
||||
* findField is restated here to point out that this method looks through the
|
||||
* inheritance tree of this class while looking for a field with the given name
|
||||
* If no field is found, null is returned, if the name is found to be ambiguous
|
||||
* a IProblemBinding is returned.
|
||||
* findField is restated here to point out that this method looks through
|
||||
* the inheritance tree of this class while looking for a field with the
|
||||
* given name If no field is found, null is returned, if the name is found
|
||||
* to be ambiguous a IProblemBinding is returned.
|
||||
*
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
public IField findField( String name ) throws DOMException;
|
||||
|
||||
public IField findField(String name) throws DOMException;
|
||||
|
||||
/**
|
||||
* Returns a list of ICPPField objects representing fields declared in this
|
||||
* class. It does not include fields inherited from base classes.
|
||||
|
@ -54,11 +56,11 @@ public interface ICPPClassType extends ICompositeType {
|
|||
* @return List of ICPPField
|
||||
*/
|
||||
public ICPPField[] getDeclaredFields() throws DOMException;
|
||||
|
||||
|
||||
/**
|
||||
* Returns a list of ICPPMethod objects representing all methods defined for
|
||||
* this class including those declared, inherited, or generated (e.g. default
|
||||
* constructors and the like).
|
||||
* this class including those declared, inherited, or generated (e.g.
|
||||
* default constructors and the like).
|
||||
*
|
||||
* @return List of ICPPMethod
|
||||
*/
|
||||
|
@ -66,34 +68,37 @@ public interface ICPPClassType extends ICompositeType {
|
|||
|
||||
/**
|
||||
* Returns a list of ICPPMethod objects representing all method explicitly
|
||||
* declared by this class and inherited from base classes. It does not include
|
||||
* automatically generated methods.
|
||||
* declared by this class and inherited from base classes. It does not
|
||||
* include automatically generated methods.
|
||||
*
|
||||
* @return List of ICPPMethod
|
||||
*/
|
||||
public ICPPMethod[] getAllDeclaredMethods() throws DOMException;
|
||||
|
||||
|
||||
/**
|
||||
* Returns a list of ICPPMethod objects representing all methods explicitly
|
||||
* declared by this class. It does not include inherited methods or automatically
|
||||
* generated methods.
|
||||
* declared by this class. It does not include inherited methods or
|
||||
* automatically generated methods.
|
||||
*
|
||||
* @return List of ICPPMethod
|
||||
*/
|
||||
public ICPPMethod[] getDeclaredMethods() throws DOMException;
|
||||
|
||||
/**
|
||||
* Returns an array of ICPPConstructor objects representing the contructors for this
|
||||
* class. This list includes both declared and implicit constructors.
|
||||
* @return
|
||||
*/
|
||||
public ICPPConstructor[] getConstructors() throws DOMException;
|
||||
|
||||
/**
|
||||
* return an array of bindings for those classes/functions declared as friends of this
|
||||
* class.
|
||||
* @return
|
||||
* @throws DOMException
|
||||
*/
|
||||
public IBinding [] getFriends() throws DOMException;
|
||||
/**
|
||||
* Returns an array of ICPPConstructor objects representing the contructors
|
||||
* for this class. This list includes both declared and implicit
|
||||
* constructors.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public ICPPConstructor[] getConstructors() throws DOMException;
|
||||
|
||||
/**
|
||||
* return an array of bindings for those classes/functions declared as
|
||||
* friends of this class.
|
||||
*
|
||||
* @return
|
||||
* @throws DOMException
|
||||
*/
|
||||
public IBinding[] getFriends() throws DOMException;
|
||||
}
|
||||
|
|
|
@ -17,16 +17,18 @@ import org.eclipse.cdt.core.dom.ast.DOMException;
|
|||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||
|
||||
/**
|
||||
* This binding is a container for other bindings. It is used in instances
|
||||
* where an IASTName refers to more than one binding, for example a using declaration
|
||||
* refering to a set of overloaded functions.
|
||||
* This binding is a container for other bindings. It is used in instances where
|
||||
* an IASTName refers to more than one binding, for example a using declaration
|
||||
* refering to a set of overloaded functions.
|
||||
*
|
||||
* @author aniefer
|
||||
*/
|
||||
public interface ICPPCompositeBinding extends IBinding {
|
||||
/**
|
||||
* get the bindings
|
||||
* @return
|
||||
* @throws DOMException
|
||||
*/
|
||||
IBinding [] getBindings() throws DOMException;
|
||||
/**
|
||||
* get the bindings
|
||||
*
|
||||
* @return
|
||||
* @throws DOMException
|
||||
*/
|
||||
IBinding[] getBindings() throws DOMException;
|
||||
}
|
||||
|
|
|
@ -20,11 +20,12 @@ import org.eclipse.cdt.core.dom.ast.DOMException;
|
|||
*/
|
||||
public interface ICPPConstructor extends ICPPMethod {
|
||||
|
||||
/**
|
||||
* Whether or not this constructor was declared as explicit
|
||||
* @return
|
||||
* @throws DOMException
|
||||
*/
|
||||
boolean isExplicit() throws DOMException;
|
||||
/**
|
||||
* Whether or not this constructor was declared as explicit
|
||||
*
|
||||
* @return
|
||||
* @throws DOMException
|
||||
*/
|
||||
boolean isExplicit() throws DOMException;
|
||||
|
||||
}
|
||||
|
|
|
@ -21,11 +21,12 @@ import org.eclipse.cdt.core.dom.ast.IScope;
|
|||
*/
|
||||
public interface ICPPFunctionScope extends ICPPScope {
|
||||
|
||||
/**
|
||||
* Get the scope representing the function body.
|
||||
* returns null if there is no function definition
|
||||
* @return
|
||||
* @throws DOMException
|
||||
*/
|
||||
public IScope getBodyScope() throws DOMException;
|
||||
/**
|
||||
* Get the scope representing the function body. returns null if there is no
|
||||
* function definition
|
||||
*
|
||||
* @return
|
||||
* @throws DOMException
|
||||
*/
|
||||
public IScope getBodyScope() throws DOMException;
|
||||
}
|
||||
|
|
|
@ -21,13 +21,15 @@ public interface ICPPMember {
|
|||
|
||||
/**
|
||||
* The visibility.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public int getVisibility() throws DOMException;
|
||||
|
||||
|
||||
public static final int v_private = ICPPASTVisiblityLabel.v_private;
|
||||
|
||||
public static final int v_protected = ICPPASTVisiblityLabel.v_protected;
|
||||
|
||||
public static final int v_public = ICPPASTVisiblityLabel.v_public;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -18,13 +18,15 @@ import org.eclipse.cdt.core.dom.ast.IBinding;
|
|||
|
||||
/**
|
||||
* This interface represents a C++ namespace
|
||||
*
|
||||
* @author aniefer
|
||||
*/
|
||||
public interface ICPPNamespace extends IBinding {
|
||||
/**
|
||||
* get the scope object associated with this namespace
|
||||
* @return
|
||||
* @throws DOMException
|
||||
*/
|
||||
/**
|
||||
* get the scope object associated with this namespace
|
||||
*
|
||||
* @return
|
||||
* @throws DOMException
|
||||
*/
|
||||
public ICPPNamespaceScope getNamespaceScope() throws DOMException;
|
||||
}
|
||||
|
|
|
@ -16,25 +16,27 @@ package org.eclipse.cdt.core.dom.ast.cpp;
|
|||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTNode;
|
||||
|
||||
|
||||
/**
|
||||
* @author aniefer
|
||||
*/
|
||||
public interface ICPPNamespaceScope extends ICPPScope {
|
||||
|
||||
/**
|
||||
* Add an IASTNode that nominates another namespace to this scope
|
||||
* Most commonly, ICPPASTUsingDirectives, but in the case of unnamed namespaces,
|
||||
* it could be an ICPPASTNamespaceDefinition
|
||||
* Add an IASTNode that nominates another namespace to this scope Most
|
||||
* commonly, ICPPASTUsingDirectives, but in the case of unnamed namespaces,
|
||||
* it could be an ICPPASTNamespaceDefinition
|
||||
*
|
||||
* @param directive
|
||||
*/
|
||||
public void addUsingDirective( IASTNode directive ) throws DOMException;
|
||||
|
||||
public void addUsingDirective(IASTNode directive) throws DOMException;
|
||||
|
||||
/**
|
||||
* Get the IASTNodes that have been added to this scope to nominate other
|
||||
* namespaces during lookup. (ICPPASTUsingDirective or ICPPASTNamespaceDefinition)
|
||||
* Get the IASTNodes that have been added to this scope to nominate other
|
||||
* namespaces during lookup. (ICPPASTUsingDirective or
|
||||
* ICPPASTNamespaceDefinition)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public IASTNode[] getUsingDirectives() throws DOMException;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -20,10 +20,11 @@ import org.eclipse.cdt.core.dom.ast.IPointerType;
|
|||
* @author aniefer
|
||||
*/
|
||||
public interface ICPPPointerToMemberType extends IPointerType {
|
||||
|
||||
/**
|
||||
* Get the class to whose members this points to
|
||||
* @return
|
||||
*/
|
||||
public ICPPClassType getMemberOfClass();
|
||||
|
||||
/**
|
||||
* Get the class to whose members this points to
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public ICPPClassType getMemberOfClass();
|
||||
}
|
||||
|
|
|
@ -21,10 +21,11 @@ import org.eclipse.cdt.core.dom.ast.IType;
|
|||
* @author aniefer
|
||||
*/
|
||||
public interface ICPPReferenceType extends IType {
|
||||
/**
|
||||
* get the type that this is a reference of
|
||||
* @return
|
||||
* @throws DOMException
|
||||
*/
|
||||
public IType getType() throws DOMException;
|
||||
/**
|
||||
* get the type that this is a reference of
|
||||
*
|
||||
* @return
|
||||
* @throws DOMException
|
||||
*/
|
||||
public IType getType() throws DOMException;
|
||||
}
|
||||
|
|
|
@ -19,8 +19,8 @@ import org.eclipse.cdt.core.dom.ast.IBinding;
|
|||
import org.eclipse.cdt.core.dom.ast.IScope;
|
||||
|
||||
/**
|
||||
* The ICPPScope serves as a mechanism for caching IASTNames and
|
||||
* bindings to speed up resolution.
|
||||
* The ICPPScope serves as a mechanism for caching IASTNames and bindings to
|
||||
* speed up resolution.
|
||||
*
|
||||
* @author aniefer
|
||||
*/
|
||||
|
@ -28,33 +28,37 @@ public interface ICPPScope extends IScope {
|
|||
|
||||
/**
|
||||
* Add an IASTName to be cached in this scope
|
||||
*
|
||||
* @param name
|
||||
* @throws DOMException
|
||||
*/
|
||||
public void addName( IASTName name ) throws DOMException;
|
||||
|
||||
/**
|
||||
* Get the binding that the given name would resolve to in this scope.
|
||||
* Could return null if there is no matching binding in this scope,
|
||||
* or if resolve == false and the appropriate binding has not yet been
|
||||
* resolved.
|
||||
*
|
||||
* @param name
|
||||
* @param resolve : whether or not to resolve the matching binding if it
|
||||
* has not been so already.
|
||||
* @return : the binding in this scope that matches the name, or null
|
||||
* @throws DOMException
|
||||
*/
|
||||
public IBinding getBinding( IASTName name, boolean resolve ) throws DOMException;
|
||||
|
||||
public void addName(IASTName name) throws DOMException;
|
||||
|
||||
/**
|
||||
* Get the binding that the given name would resolve to in this scope. Could
|
||||
* return null if there is no matching binding in this scope, or if resolve ==
|
||||
* false and the appropriate binding has not yet been resolved.
|
||||
*
|
||||
* @param name
|
||||
* @param resolve :
|
||||
* whether or not to resolve the matching binding if it has not
|
||||
* been so already.
|
||||
* @return : the binding in this scope that matches the name, or null
|
||||
* @throws DOMException
|
||||
*/
|
||||
public IBinding getBinding(IASTName name, boolean resolve)
|
||||
throws DOMException;
|
||||
|
||||
/**
|
||||
* Set whether or not all the names in this scope have been cached
|
||||
*
|
||||
* @param b
|
||||
*/
|
||||
public void setFullyCached(boolean b) throws DOMException;
|
||||
|
||||
|
||||
/**
|
||||
* whether or not this scope's cache contains all the names
|
||||
* whether or not this scope's cache contains all the names
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isFullyCached() throws DOMException;
|
||||
|
|
|
@ -20,24 +20,24 @@ public interface ICPPTemplateDefinition {
|
|||
/**
|
||||
* Returns the list of template parameters. If this is a template
|
||||
* specialization, the parameters will be substituted by the arguments
|
||||
* determined in the specialization.
|
||||
* determined in the specialization.
|
||||
*
|
||||
* @return List of ICPPTemplateParameter, IType, or IASTExpression.
|
||||
* The type or expression are arguments in a specialization.
|
||||
* @return List of ICPPTemplateParameter, IType, or IASTExpression. The type
|
||||
* or expression are arguments in a specialization.
|
||||
*/
|
||||
public List getParameters();
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether this is a template specialization.
|
||||
*
|
||||
* @return is this a template specialization
|
||||
*/
|
||||
public boolean isSpecialization();
|
||||
|
||||
|
||||
/**
|
||||
* If this is a template specialization, this returns the template
|
||||
* definition this is specializing. It returns null if this template
|
||||
* is not a specialization.
|
||||
* definition this is specializing. It returns null if this template is not
|
||||
* a specialization.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
|
|
@ -16,13 +16,14 @@ import org.eclipse.cdt.core.dom.ast.IVariable;
|
|||
/**
|
||||
* @author Doug Schaefer
|
||||
*/
|
||||
public interface ICPPTemplateNonTypeParameter extends ICPPTemplateParameter, IVariable {
|
||||
public interface ICPPTemplateNonTypeParameter extends ICPPTemplateParameter,
|
||||
IVariable {
|
||||
|
||||
/**
|
||||
* The default value for this parameter.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public IASTExpression getDefault();
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -19,10 +19,10 @@ import org.eclipse.cdt.core.dom.ast.IType;
|
|||
public interface ICPPTemplateTypeParameter extends ICPPTemplateParameter, IType {
|
||||
|
||||
/**
|
||||
* The default type for this parameter.
|
||||
* May be null
|
||||
* The default type for this parameter. May be null
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public IType getDefault() throws DOMException;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -40,14 +40,14 @@ public class CPPASTNamespaceAlias extends CPPASTNode implements
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceAlias#getQualifiedName()
|
||||
*/
|
||||
public IASTName getQualifiedName() {
|
||||
public IASTName getMappingName() {
|
||||
return qualifiedName;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceAlias#setQualifiedName(org.eclipse.cdt.core.dom.ast.cpp.ICPPASTQualifiedName)
|
||||
*/
|
||||
public void setQualifiedName(IASTName qualifiedName) {
|
||||
public void setMappingName(IASTName qualifiedName) {
|
||||
this.qualifiedName = qualifiedName;
|
||||
}
|
||||
|
||||
|
|
|
@ -346,7 +346,7 @@ public class CPPVisitor {
|
|||
return CPPSemantics.resolveBinding( ((ICPPASTUsingDirective) declaration).getQualifiedName() );
|
||||
} else if( declaration instanceof ICPPASTNamespaceAlias ) {
|
||||
ICPPASTNamespaceAlias alias = (ICPPASTNamespaceAlias) declaration;
|
||||
return CPPSemantics.resolveBinding( alias.getQualifiedName() );
|
||||
return CPPSemantics.resolveBinding( alias.getMappingName() );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2495,7 +2495,7 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
|
|||
alias.setAlias(name);
|
||||
name.setParent(alias);
|
||||
name.setPropertyInParent(ICPPASTNamespaceAlias.ALIAS_NAME);
|
||||
alias.setQualifiedName(qualifiedName);
|
||||
alias.setMappingName(qualifiedName);
|
||||
qualifiedName.setParent(alias);
|
||||
qualifiedName.setPropertyInParent(ICPPASTNamespaceAlias.MAPPING_NAME);
|
||||
return alias;
|
||||
|
|
Loading…
Add table
Reference in a new issue