1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-05 15:25:49 +02:00

Add JavaDoc.

Formatted public interfaces.
Restructured some public interfaces.
This commit is contained in:
John Camelon 2005-03-14 03:15:22 +00:00
parent 512e196451
commit db73140257
60 changed files with 1733 additions and 455 deletions

View file

@ -10,5 +10,6 @@
<classpathentry kind="src" path="browser"/> <classpathentry kind="src" path="browser"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <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"/> <classpathentry kind="output" path="bin"/>
</classpath> </classpath>

View file

@ -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.ASTVisitor;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier; 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 shouldVisitBaseSpecifiers = false;
/**
* Overide this value if you wish to visit namespaces.
*/
public boolean shouldVisitNamespaces = false; public boolean shouldVisitNamespaces = false;
/**
* Overide this value if you wish to visit template parameters.
*/
public boolean shouldVisitTemplateParameters = false; public boolean shouldVisitTemplateParameters = false;
public int visit( ICPPASTBaseSpecifier specifier ) { return PROCESS_CONTINUE; } /**
public int visit( ICPPASTNamespaceDefinition namespace ){ return PROCESS_CONTINUE; } * Visit BaseSpecifiers.
public int visit( ICPPASTTemplateParameter parameter ) { return PROCESS_CONTINUE; } *
* @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;
}
} }

View file

@ -13,11 +13,24 @@ package org.eclipse.cdt.core.dom.ast.cpp;
import org.eclipse.cdt.core.dom.ast.IASTBinaryExpression; import org.eclipse.cdt.core.dom.ast.IASTBinaryExpression;
/** /**
* C++ adds a few more binary expressions over C.
*
* @author jcamelon * @author jcamelon
*/ */
public interface ICPPASTBinaryExpression extends IASTBinaryExpression { public interface ICPPASTBinaryExpression extends IASTBinaryExpression {
/**
* <code>op_pmdot</code> pointer-to-member field dereference.
*/
public static final int op_pmdot = IASTBinaryExpression.op_last + 1; 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; 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; public static final int op_last = op_pmarrow;
} }

View file

@ -13,13 +13,34 @@ package org.eclipse.cdt.core.dom.ast.cpp;
import org.eclipse.cdt.core.dom.ast.IASTCastExpression; import org.eclipse.cdt.core.dom.ast.IASTCastExpression;
/** /**
* C++ adds in additional cast-style expressions.
*
* @author jcamelon * @author jcamelon
*/ */
public interface ICPPASTCastExpression extends IASTCastExpression { public interface ICPPASTCastExpression extends IASTCastExpression {
/**
* <code>op_dynamic_cast</code> is used for dynamic_cast<>'s.
*/
public static final int op_dynamic_cast = IASTCastExpression.op_last + 1; 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; 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; 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; 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; public static final int op_last = op_const_cast;
} }

View file

@ -15,32 +15,73 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
import org.eclipse.cdt.core.dom.ast.IASTStatement; import org.eclipse.cdt.core.dom.ast.IASTStatement;
/** /**
* Catch handler serves as a standalone stage.
*
* @author jcamelon * @author jcamelon
*/ */
public interface ICPPASTCatchHandler extends IASTStatement { public interface ICPPASTCatchHandler extends IASTStatement {
/**
* Constant
*/
public static final ICPPASTCatchHandler[] EMPTY_CATCHHANDLER_ARRAY = new ICPPASTCatchHandler[0]; 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$ * <code>DECLARATION</code> represnts the nested declaration within the
* catch handler.
*/
public static final ASTNodeProperty DECLARATION = new ASTNodeProperty(
"Declaration"); //$NON-NLS-1$
/** /**
* <code>CATCH_BODY</code> represents the nested (compound) statement.
*/
public static final ASTNodeProperty CATCH_BODY = new ASTNodeProperty(
"Catch Body"); //$NON-NLS-1$
/**
* Set is catch all handler.
*
* @param isEllipsis * @param isEllipsis
* boolean
*/ */
public void setIsCatchAll(boolean isEllipsis); public void setIsCatchAll(boolean isEllipsis);
/**
* Is this catch handler for all exceptions?
*
* @return boolean
*/
public boolean isCatchAll(); public boolean isCatchAll();
/** /**
* Set the catch body.
*
* @param compoundStatement * @param compoundStatement
* <code>IASTStatement</code>
*/ */
public void setCatchBody(IASTStatement compoundStatement); public void setCatchBody(IASTStatement compoundStatement);
/**
* Get the cathc body.
*
* @return <code>IASTStatement</code>
*/
public IASTStatement getCatchBody(); public IASTStatement getCatchBody();
/** /**
* Set the declaration.
*
* @param decl * @param decl
* <code>IASTDeclaration</code>
*/ */
public void setDeclaration(IASTDeclaration decl); public void setDeclaration(IASTDeclaration decl);
/**
* Get the declaration.
*
* @return <code>IASTDeclaration</code>
*/
public IASTDeclaration getDeclaration(); public IASTDeclaration getDeclaration();
} }

View file

@ -18,35 +18,126 @@ import org.eclipse.cdt.core.dom.ast.IASTNode;
/** /**
* @author jcamelon * @author jcamelon
*/ */
public interface ICPPASTCompositeTypeSpecifier extends IASTCompositeTypeSpecifier, public interface ICPPASTCompositeTypeSpecifier extends
ICPPASTDeclSpecifier { IASTCompositeTypeSpecifier, ICPPASTDeclSpecifier {
/**
* <code>k_class</code> C++ introduces the class concept for composite
* types.
*/
public static final int k_class = IASTCompositeTypeSpecifier.k_last + 1; 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; 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$ * <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$
public static interface ICPPASTBaseSpecifier extends IASTNode /**
{ * <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]; public static final ICPPASTBaseSpecifier[] EMPTY_BASESPECIFIER_ARRAY = new ICPPASTBaseSpecifier[0];
/**
* Is the keyword virtual used?
*
* @return boolean
*/
public boolean isVirtual(); public boolean isVirtual();
/**
* Set the virtual flag on/off.
*
* @param value
* boolean
*/
public void setVirtual(boolean value); 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; 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; 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; public static final int v_private = 3;
/**
* Get the visibility.
*
* @return int
*/
public int getVisibility(); public int getVisibility();
/**
* Set the visibility.
*
* @param visibility
*/
public void setVisibility(int visibility); public void setVisibility(int visibility);
public static final ASTNodeProperty NAME = new ASTNodeProperty( "BaseSpec Name"); //$NON-NLS-1$ /**
* <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(); public IASTName getName();
/**
* Set the name.
*
* @param name
* <code>IASTName</code>
*/
public void setName(IASTName name); public void setName(IASTName name);
} }
/**
* Get the base specifiers.
*
* @return <code>ICPPASTBaseSpecifier []</code>
*/
public ICPPASTBaseSpecifier[] getBaseSpecifiers(); public ICPPASTBaseSpecifier[] getBaseSpecifiers();
/**
* Add a base specifier.
*
* @param baseSpec
* <code>ICPPASTBaseSpecifier</code>
*/
public void addBaseSpecifier(ICPPASTBaseSpecifier baseSpec); public void addBaseSpecifier(ICPPASTBaseSpecifier baseSpec);
} }

View file

@ -19,14 +19,52 @@ import org.eclipse.cdt.core.dom.ast.IASTNode;
* @author jcamelon * @author jcamelon
*/ */
public interface ICPPASTConstructorChainInitializer extends IASTNode { public interface ICPPASTConstructorChainInitializer extends IASTNode {
/**
* Constant.
*/
public static final ICPPASTConstructorChainInitializer[] EMPTY_CONSTRUCTORCHAININITIALIZER_ARRAY = new ICPPASTConstructorChainInitializer[0]; public static final ICPPASTConstructorChainInitializer[] EMPTY_CONSTRUCTORCHAININITIALIZER_ARRAY = new ICPPASTConstructorChainInitializer[0];
public static final ASTNodeProperty MEMBER_ID = new ASTNodeProperty( "Member Initializer Id"); //$NON-NLS-1$ /**
* <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(); public IASTName getMemberInitializerId();
/**
* Set the field name.
*
* @param name
* <code>IASTName</code>
*/
public void setMemberInitializerId(IASTName name); public void setMemberInitializerId(IASTName name);
public static final ASTNodeProperty INITIALIZER = new ASTNodeProperty( "Expression Initializer"); //$NON-NLS-1$ /**
* <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(); public IASTExpression getInitializerValue();
/**
* Set the initializer value.
*
* @param expression
* <code>IASTExpression</code>
*/
public void setInitializerValue(IASTExpression expression); public void setInitializerValue(IASTExpression expression);
} }

View file

@ -15,20 +15,31 @@ import org.eclipse.cdt.core.dom.ast.IASTExpression;
import org.eclipse.cdt.core.dom.ast.IASTInitializer; import org.eclipse.cdt.core.dom.ast.IASTInitializer;
/** /**
* This is an initializer that is a call to the constructor for the * This is an initializer that is a call to the constructor for the declarator.
* declarator.
* *
* @author Doug Schaefer * @author Doug Schaefer
*/ */
public interface ICPPASTConstructorInitializer extends IASTInitializer { 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. * Get the arguments to the constructor.
* *
* @return IASTExpression * @return IASTExpression
*/ */
public static final ASTNodeProperty EXPRESSION = new ASTNodeProperty( "Expression"); //$NON-NLS-1$
public IASTExpression getExpression(); public IASTExpression getExpression();
/**
* Set the arguments to the constructor.
*
* @param expression
*/
public void setExpression(IASTExpression expression); public void setExpression(IASTExpression expression);
} }

View file

@ -13,22 +13,67 @@ package org.eclipse.cdt.core.dom.ast.cpp;
import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier; import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
/** /**
* C++ adds additional modifiers and types for decl specifier sequence.
*
* @author Doug Schaefer * @author Doug Schaefer
*/ */
public interface ICPPASTDeclSpecifier extends IASTDeclSpecifier { public interface ICPPASTDeclSpecifier extends IASTDeclSpecifier {
// Extra storage class in C++ // Extra storage class in C++
/**
* <code>sc_mutable</code> represents a mutable storage representation.
*/
public static final int sc_mutable = IASTDeclSpecifier.sc_last + 1; 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; public static final int sc_last = sc_mutable;
// A declaration in C++ can be a friend declaration // A declaration in C++ can be a friend declaration
/**
* Is this a friend declaration?
*
* @return boolean
*/
public boolean isFriend(); public boolean isFriend();
/**
* Set this to be a friend declaration true/false.
*
* @param value
* boolean
*/
public void setFriend(boolean value); public void setFriend(boolean value);
/**
* Is this a virtual function?
*
* @return boolean
*/
public boolean isVirtual(); public boolean isVirtual();
/**
* Set this declaration to be virutal.
*
* @param value
* boolean
*/
public void setVirtual(boolean value); public void setVirtual(boolean value);
/**
* Is this an explicit constructor?
*
* @return boolean
*/
public boolean isExplicit(); public boolean isExplicit();
/**
* Set this to be an explicit constructor.
*
* @param value
* boolean
*/
public void setExplicit(boolean value); public void setExplicit(boolean value);
} }

View file

@ -14,23 +14,59 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
import org.eclipse.cdt.core.dom.ast.IASTExpression; import org.eclipse.cdt.core.dom.ast.IASTExpression;
/** /**
* This interface represents a delete expression. delete [] operand;
*
* @author jcamelon * @author jcamelon
*/ */
public interface ICPPASTDeleteExpression extends IASTExpression { public interface ICPPASTDeleteExpression extends IASTExpression {
public static final ASTNodeProperty OPERAND = new ASTNodeProperty( "Operand"); //$NON-NLS-1$
public IASTExpression getOperand();
public void setOperand( IASTExpression expression );
/** /**
* <code>OPERAND</code> is the expression representing the pointer being
* deleted.
*/
public static final ASTNodeProperty OPERAND = new ASTNodeProperty("Operand"); //$NON-NLS-1$
/**
* 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 * @param global
* boolean
*/ */
public void setIsGlobal(boolean global); public void setIsGlobal(boolean global);
/**
* Is this the global delete function called?
*
* @return boolean
*/
public boolean isGlobal(); public boolean isGlobal();
/** /**
* Set this to be a vector delete. ([])
*
* @param vectored * @param vectored
* boolean
*/ */
public void setIsVectored(boolean vectored); public void setIsVectored(boolean vectored);
/**
* Is this a delete [] ?
*
* @return boolean
*/
public boolean isVectored(); public boolean isVectored();
} }

View file

@ -13,12 +13,21 @@ package org.eclipse.cdt.core.dom.ast.cpp;
import org.eclipse.cdt.core.dom.ast.IASTElaboratedTypeSpecifier; import org.eclipse.cdt.core.dom.ast.IASTElaboratedTypeSpecifier;
/** /**
* Elaborated types in C++ include classes.
*
* @author jcamelon * @author jcamelon
*/ */
public interface ICPPASTElaboratedTypeSpecifier extends 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; 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_last = k_class;
} }

View file

@ -14,12 +14,32 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
import org.eclipse.cdt.core.dom.ast.IASTDeclaration; import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
/** /**
* This interface represents an explict template instantiation.
*
* @author jcamelon * @author jcamelon
*/ */
public interface ICPPASTExplicitTemplateInstantiation extends IASTDeclaration { public interface ICPPASTExplicitTemplateInstantiation extends IASTDeclaration {
public static final ASTNodeProperty OWNED_DECLARATION = new ASTNodeProperty( "Owned Declaration"); //$NON-NLS-1$ /**
* <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(); public IASTDeclaration getDeclaration();
/**
* Set the owned declaration.
*
* @param declaration
* <code>IASTDeclaration</code>
*/
public void setDeclaration(IASTDeclaration declaration); public void setDeclaration(IASTDeclaration declaration);
} }

View file

@ -13,12 +13,25 @@ package org.eclipse.cdt.core.dom.ast.cpp;
import org.eclipse.cdt.core.dom.ast.IASTFieldReference; 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 * @author jcamelon
*/ */
public interface ICPPASTFieldReference extends IASTFieldReference { public interface ICPPASTFieldReference extends IASTFieldReference {
/**
* Was template keyword used?
*
* @return
*/
public boolean isTemplate(); public boolean isTemplate();
/**
* Set the template keyword used.
*
* @param value
*/
public void setIsTemplate(boolean value); public void setIsTemplate(boolean value);
} }

View file

@ -19,27 +19,103 @@ import org.eclipse.cdt.core.dom.ast.IASTTypeId;
* *
* @author Doug Schaefer * @author Doug Schaefer
*/ */
public interface ICPPASTFunctionDeclarator extends IASTStandardFunctionDeclarator { public interface ICPPASTFunctionDeclarator extends
IASTStandardFunctionDeclarator {
/**
* Is this a const method?
*
* @return boolean
*/
public boolean isConst(); public boolean isConst();
/**
* Set the method to be const or not.
*
* @param value
* boolean
*/
public void setConst(boolean value); public void setConst(boolean value);
/**
* Is this a volatile method?
*
* @return boolean
*/
public boolean isVolatile(); public boolean isVolatile();
/**
* Set the method to be volatile or not.
*
* @param value
* boolean
*/
public void setVolatile(boolean value); 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 * <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(); public boolean isPureVirtual();
/**
* Set thid method to be pure virtual.
*
* @param isPureVirtual
* boolean
*/
public void setPureVirtual(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(); * <code>CONSTRUCTOR_CHAIN_MEMBER</code> is the role of a constructor
public void addConstructorToChain( ICPPASTConstructorChainInitializer initializer ); * 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(); public ICPPFunctionScope getFunctionScope();
} }

View file

@ -13,12 +13,32 @@ package org.eclipse.cdt.core.dom.ast.cpp;
import org.eclipse.cdt.core.dom.ast.ASTNodeProperty; import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
/** /**
* This is a function try block declarator.
*
* @author jcamelon * @author jcamelon
*/ */
public interface ICPPASTFunctionTryBlockDeclarator extends public interface ICPPASTFunctionTryBlockDeclarator extends
ICPPASTFunctionDeclarator { ICPPASTFunctionDeclarator {
public static final ASTNodeProperty CATCH_HANDLER = new ASTNodeProperty( "Catch Handler"); //$NON-NLS-1$ /**
* 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); public void addCatchHandler(ICPPASTCatchHandler statement);
/**
* Get catch handlers.
*
* @return <code>ICPPASTCatchHandler</code>
*/
public ICPPASTCatchHandler[] getCatchHandlers(); public ICPPASTCatchHandler[] getCatchHandlers();
} }

View file

@ -14,14 +14,46 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
import org.eclipse.cdt.core.dom.ast.IASTDeclaration; import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
/** /**
* This interface represents a linkage specification. e.g. extern "C" { ... }
*
* @author jcamelon * @author jcamelon
*/ */
public interface ICPPASTLinkageSpecification extends IASTDeclaration { public interface ICPPASTLinkageSpecification extends IASTDeclaration {
/**
* Get the "literal" that represents the linkage.
*
* @return String
*/
public String getLiteral(); public String getLiteral();
/**
* Set the "literal" that represents the linkage.
*
* @param value
* String
*/
public void setLiteral(String value); public void setLiteral(String value);
public static final ASTNodeProperty OWNED_DECLARATION = new ASTNodeProperty( "Owned Declaration"); //$NON-NLS-1$ /**
* <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(); public IASTDeclaration[] getDeclarations();
/**
* Add another declaration to the linkage.
*
* @param declaration
* <code>IASTDeclaration</code>
*/
public void addDeclaration(IASTDeclaration declaration); public void addDeclaration(IASTDeclaration declaration);
} }

View file

@ -13,12 +13,29 @@ package org.eclipse.cdt.core.dom.ast.cpp;
import org.eclipse.cdt.core.dom.ast.IASTLiteralExpression; import org.eclipse.cdt.core.dom.ast.IASTLiteralExpression;
/** /**
* C++ adds additional literal types to primary expression.
*
* @author jcamelon * @author jcamelon
*/ */
public interface ICPPASTLiteralExpression extends IASTLiteralExpression { public interface ICPPASTLiteralExpression extends IASTLiteralExpression {
/**
* <code>lk_this</code> represents the 'this' keyword.
*/
public static final int lk_this = IASTLiteralExpression.lk_last + 1; 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; 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; 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; public static final int lk_last = lk_false;
} }

View file

@ -13,11 +13,27 @@ package org.eclipse.cdt.core.dom.ast.cpp;
import org.eclipse.cdt.core.dom.ast.IASTNamedTypeSpecifier; import org.eclipse.cdt.core.dom.ast.IASTNamedTypeSpecifier;
/** /**
* C++ adds the capability of qualifying a named type specifier w/the keyword
* typename.
*
* @author jcamelon * @author jcamelon
*/ */
public interface ICPPASTNamedTypeSpecifier extends IASTNamedTypeSpecifier, ICPPASTDeclSpecifier { public interface ICPPASTNamedTypeSpecifier extends IASTNamedTypeSpecifier,
ICPPASTDeclSpecifier {
/**
* Was typename token consumed?
*
* @return boolean
*/
public boolean isTypename(); public boolean isTypename();
/**
* Set this value.
*
* @param value
* boolean
*/
public void setIsTypename(boolean value); public void setIsTypename(boolean value);
} }

View file

@ -15,17 +15,55 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
import org.eclipse.cdt.core.dom.ast.IASTName; 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 * @author jcamelon
*/ */
public interface ICPPASTNamespaceAlias extends IASTDeclaration { 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$ * <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(); public IASTName getAlias();
/**
* Set the new alias name.
*
* @param name
* <code>IASTName</code>
*/
public void setAlias(IASTName name); public void setAlias(IASTName name);
public IASTName getQualifiedName(); /**
public void setQualifiedName( IASTName qualifiedName ); * 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);
} }

View file

@ -16,24 +16,60 @@ import org.eclipse.cdt.core.dom.ast.IASTName;
import org.eclipse.cdt.core.dom.ast.IScope; import org.eclipse.cdt.core.dom.ast.IScope;
/** /**
* This interface repesents a namespace definition in C++.
*
* @author jcamelon * @author jcamelon
*/ */
public interface ICPPASTNamespaceDefinition extends IASTDeclaration { 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$ * <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(); public IASTName getName();
/**
* Set the name.
*
* @param name
* <code>IASTName</code>
*/
public void setName(IASTName name); public void setName(IASTName name);
/** /**
* A translation unit contains an ordered sequence of declarations. * A translation unit contains an ordered sequence of declarations.
* *
* @return List of IASTDeclaration * @return <code>IASTDeclaration []</code>
*/ */
public IASTDeclaration[] getDeclarations(); public IASTDeclaration[] getDeclarations();
/**
* Add a declaration to the namespace.
*
* @param declaration
* <code>IASTDeclaration</code>
*/
public void addDeclaration(IASTDeclaration declaration); public void addDeclaration(IASTDeclaration declaration);
/**
* Get the scope object represented by this construct.
*
* @return <code>IScope</code>
*/
public IScope getScope(); public IScope getScope();
} }

View file

@ -15,30 +15,120 @@ import org.eclipse.cdt.core.dom.ast.IASTExpression;
import org.eclipse.cdt.core.dom.ast.IASTTypeId; import org.eclipse.cdt.core.dom.ast.IASTTypeId;
/** /**
* This interface represents a new expression.
*
* @author jcamelon * @author jcamelon
*/ */
public interface ICPPASTNewExpression extends IASTExpression { public interface ICPPASTNewExpression extends IASTExpression {
/**
* Is this a ::new expression?
*
* @return boolean
*/
public boolean isGlobal(); public boolean isGlobal();
/**
* Set this expression to bea global ::new expression (or not).
*
* @param value
* boolean
*/
public void setIsGlobal(boolean value); public void setIsGlobal(boolean value);
public static final ASTNodeProperty NEW_PLACEMENT = new ASTNodeProperty( "New Placement"); //$NON-NLS-1$ /**
* 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(); public IASTExpression getNewPlacement();
/**
* Set the new placement expression.
*
* @param expression
* <code>IASTExpression</code>
*/
public void setNewPlacement(IASTExpression expression); public void setNewPlacement(IASTExpression expression);
public static final ASTNodeProperty NEW_INITIALIZER = new ASTNodeProperty( "New Initializer"); //$NON-NLS-1$ /**
* <code>NEW_INITIALIZER</code>
*/
public static final ASTNodeProperty NEW_INITIALIZER = new ASTNodeProperty(
"New Initializer"); //$NON-NLS-1$
/**
* @return <code>IASTExpression</code>
*/
public IASTExpression getNewInitializer(); public IASTExpression getNewInitializer();
/**
* @param expression
* <code>IASTExpression</code>
*/
public void setNewInitializer(IASTExpression expression); 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$ public static final ASTNodeProperty TYPE_ID = new ASTNodeProperty("Type Id"); //$NON-NLS-1$
/**
* Get the type Id.
*
* @return <code>IASTTypeId</code>
*/
public IASTTypeId getTypeId(); public IASTTypeId getTypeId();
/**
* Set the type Id.
*
* @param typeId
* <code>IASTTypeId</code>
*/
public void setTypeId(IASTTypeId typeId); public void setTypeId(IASTTypeId typeId);
/**
* Is the typeID a new type ID?
*
* @return boolean
*/
public boolean isNewTypeId(); public boolean isNewTypeId();
/**
* Set the type ID to be a new type ID.
*
* @param value
* boolean
*/
public void setIsNewTypeId(boolean value); public void setIsNewTypeId(boolean value);
public static final ASTNodeProperty NEW_TYPEID_ARRAY_EXPRESSION = new ASTNodeProperty( "Array Size Expression"); //$NON-NLS-1$ /**
* 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(); public IASTExpression[] getNewTypeIdArrayExpressions();
/**
* Add another array size expression.
*
* @param expression
* <code>IASTExpression</code>
*/
public void addNewTypeIdArrayExpression(IASTExpression expression); public void addNewTypeIdArrayExpression(IASTExpression expression);
} }

View file

@ -21,8 +21,24 @@ import org.eclipse.cdt.core.dom.ast.IASTPointer;
*/ */
public interface ICPPASTPointerToMember extends IASTPointer { public interface ICPPASTPointerToMember extends IASTPointer {
/**
* This property refers to the nested name.
*/
public static final ASTNodeProperty NAME = new ASTNodeProperty("Name"); //$NON-NLS-1$ public static final ASTNodeProperty NAME = new ASTNodeProperty("Name"); //$NON-NLS-1$
/**
* Set the name.
*
* @param name
* <code>IASTName</code>
*/
public void setName(IASTName name); public void setName(IASTName name);
/**
* Get the name.
*
* @return <code>IASTName</code>
*/
public IASTName getName(); public IASTName getName();
} }

View file

@ -14,14 +14,45 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
import org.eclipse.cdt.core.dom.ast.IASTName; import org.eclipse.cdt.core.dom.ast.IASTName;
/** /**
* This interface is a qualified name in C++.
*
* @author jcamelon * @author jcamelon
*/ */
public interface ICPPASTQualifiedName extends IASTName { public interface ICPPASTQualifiedName extends IASTName {
public static final ASTNodeProperty SEGMENT_NAME = new ASTNodeProperty( "Segment"); //$NON-NLS-1$ /**
* 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); public void addName(IASTName name);
/**
* Get all subnames.
*
* @return <code>IASTName []</code>
*/
public IASTName[] getNames(); public IASTName[] getNames();
/**
* Is this name fully qualified?
*
* @return boolean
*/
public boolean isFullyQualified(); public boolean isFullyQualified();
/**
* Set this name to be fully qualified or not (true/false).
*
* @param value
* boolean
*/
public void setFullyQualified(boolean value); public void setFullyQualified(boolean value);
} }

View file

@ -17,10 +17,22 @@ import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier;
* *
* @author Doug Schaefer * @author Doug Schaefer
*/ */
public interface ICPPASTSimpleDeclSpecifier extends IASTSimpleDeclSpecifier, ICPPASTDeclSpecifier { public interface ICPPASTSimpleDeclSpecifier extends IASTSimpleDeclSpecifier,
ICPPASTDeclSpecifier {
// Extra types // Extra types
/**
* <code>t_bool</code> bool
*/
public static final int t_bool = IASTSimpleDeclSpecifier.t_last + 1; 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; 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; public static final int t_last = t_wchar_t;
} }

View file

@ -14,30 +14,111 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
import org.eclipse.cdt.core.dom.ast.IASTExpression; import org.eclipse.cdt.core.dom.ast.IASTExpression;
/** /**
* Simple type constructor postfix expression.
*
* @author jcamelon * @author jcamelon
*/ */
public interface ICPPASTSimpleTypeConstructorExpression extends IASTExpression { public interface ICPPASTSimpleTypeConstructorExpression extends IASTExpression {
/**
* t_unspecified (error)
*/
public static final int t_unspecified = 0; public static final int t_unspecified = 0;
/**
* t_void == void
*/
public static final int t_void = 1; public static final int t_void = 1;
/**
* t_char == char
*/
public static final int t_char = 2; public static final int t_char = 2;
/**
* t_int == int
*/
public static final int t_int = 3; public static final int t_int = 3;
/**
* t_float == float
*/
public static final int t_float = 4; public static final int t_float = 4;
/**
* t_double == double
*/
public static final int t_double = 5; public static final int t_double = 5;
/**
* t_bool = bool
*/
public static final int t_bool = 6; public static final int t_bool = 6;
/**
* t_wchar_t = wchar_t
*/
public static final int t_wchar_t = 7; public static final int t_wchar_t = 7;
/**
* t_short = short
*/
public static final int t_short = 8; public static final int t_short = 8;
/**
* t_long = long
*/
public static final int t_long = 9; public static final int t_long = 9;
/**
* t_signed = signed
*/
public static final int t_signed = 10; public static final int t_signed = 10;
/**
* t_unsigned = unsigned
*/
public static final int t_unsigned = 11; public static final int t_unsigned = 11;
/**
* t_last is provided for subinterfaces.
*/
public static final int t_last = t_unsigned; public static final int t_last = t_unsigned;
/**
* Get the simple type.
*
* @return int
*/
public int getSimpleType(); public int getSimpleType();
/**
* Set the simple type.
*
* @param value
* int
*/
public void setSimpleType(int value); public void setSimpleType(int value);
public static final ASTNodeProperty INITIALIZER_VALUE = new ASTNodeProperty( "Initializer Value"); //$NON-NLS-1$ /**
* 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 IASTExpression getInitialValue();
/**
* Set the initial value.
*
* @param expression
* <code>IASTExpression</code>
*/
public void setInitialValue(IASTExpression expression); public void setInitialValue(IASTExpression expression);
} }

View file

@ -15,23 +15,78 @@ import org.eclipse.cdt.core.dom.ast.IASTName;
import org.eclipse.cdt.core.dom.ast.IASTTypeId; import org.eclipse.cdt.core.dom.ast.IASTTypeId;
/** /**
* This interface represents a simple type template parameter.
*
* @author jcamelon * @author jcamelon
*/ */
public interface ICPPASTSimpleTypeTemplateParameter extends public interface ICPPASTSimpleTypeTemplateParameter extends
ICPPASTTemplateParameter { ICPPASTTemplateParameter {
/**
* <code>st_class</code> represents a class.
*/
public static final int st_class = 1; public static final int st_class = 1;
/**
* <code>st_typename</code> represents a typename.
*/
public static final int st_typename = 2; public static final int st_typename = 2;
/**
* Get the parameter type.
*
* @return int
*/
public int getParameterType(); public int getParameterType();
/**
* Set the parameter type.
*
* @param value
* int
*/
public void setParameterType(int value); public void setParameterType(int value);
public static final ASTNodeProperty PARAMETER_NAME = new ASTNodeProperty( "Name" ); //$NON-NLS-1$ /**
* 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(); public IASTName getName();
/**
* Set the name.
*
* @param name
* <code>IASTName</code>
*/
public void setName(IASTName name); public void setName(IASTName name);
public static final ASTNodeProperty DEFAULT_TYPE = new ASTNodeProperty( "Default Type"); //$NON-NLS-1$ /**
* 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(); public IASTTypeId getDefaultType();
/**
* Set the default type.
*
* @param typeId
* <code>IASTTypeId</code>
*/
public void setDefaultType(IASTTypeId typeId); public void setDefaultType(IASTTypeId typeId);
} }

View file

@ -14,18 +14,67 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
import org.eclipse.cdt.core.dom.ast.IASTDeclaration; import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
/** /**
* Template declaration.
*
* @author jcamelon * @author jcamelon
*/ */
public interface ICPPASTTemplateDeclaration extends IASTDeclaration { public interface ICPPASTTemplateDeclaration extends IASTDeclaration {
/**
* Is the export keyword used?
*
* @return boolean
*/
public boolean isExported(); public boolean isExported();
/**
* Should the export keyword be used?
*
* @param value
* boolean
*/
public void setExported(boolean value); public void setExported(boolean value);
public static final ASTNodeProperty OWNED_DECLARATION = new ASTNodeProperty( "Owned Declaration"); //$NON-NLS-1$ /**
* <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(); public IASTDeclaration getDeclaration();
/**
* Set the templated declaration.
*
* @param declaration
* <code>IASTDeclaration</code>
*/
public void setDeclaration(IASTDeclaration declaration); public void setDeclaration(IASTDeclaration declaration);
public static final ASTNodeProperty PARAMETER = new ASTNodeProperty( "Template Parameter"); //$NON-NLS-1$ /**
* <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(); public ICPPASTTemplateParameter[] getTemplateParameters();
/**
* Add a template parameter.
*
* @param parm
* <code>ICPPASTTemplateParameter</code>
*/
public void addTemplateParamter(ICPPASTTemplateParameter parm); public void addTemplateParamter(ICPPASTTemplateParameter parm);
} }

View file

@ -10,7 +10,6 @@
**********************************************************************/ **********************************************************************/
package org.eclipse.cdt.core.dom.ast.cpp; package org.eclipse.cdt.core.dom.ast.cpp;
import org.eclipse.cdt.core.dom.ast.ASTNodeProperty; import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
import org.eclipse.cdt.core.dom.ast.IASTExpression; import org.eclipse.cdt.core.dom.ast.IASTExpression;
import org.eclipse.cdt.core.dom.ast.IASTName; 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 interface ICPPASTTemplateId extends IASTName {
public static final ASTNodeProperty TEMPLATE_NAME = new ASTNodeProperty( "TemplateId Name"); //$NON-NLS-1$ /**
* 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(); public IASTName getTemplateName();
/**
* Set the name.
*
* @param name
* <code>IASTName</code>
*/
public void setTemplateName(IASTName name); public void setTemplateName(IASTName name);
public static final ASTNodeProperty TEMPLATE_ID_ARGUMENT = new ASTNodeProperty( "TemplateId Arg"); //$NON-NLS-1$ /**
* 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]; public static final IASTNode[] EMPTY_ARG_ARRAY = new IASTNode[0];
/**
* Add template argument.
*
* @param typeId
* <code>IASTTypeId</code>
*/
public void addTemplateArgument(IASTTypeId typeId); public void addTemplateArgument(IASTTypeId typeId);
/**
* Add template argument.
*
* @param expression
* <code>IASTExpression</code>
*/
public void addTemplateArgument(IASTExpression expression); public void addTemplateArgument(IASTExpression expression);
/**
* Get all template arguments. (as nodes)
*
* @return <code>IASTNode []</code>
*/
public IASTNode[] getTemplateArguments(); public IASTNode[] getTemplateArguments();
} }

View file

@ -13,9 +13,14 @@ package org.eclipse.cdt.core.dom.ast.cpp;
import org.eclipse.cdt.core.dom.ast.IASTNode; import org.eclipse.cdt.core.dom.ast.IASTNode;
/** /**
* Base interface for all template parameters.
*
* @author jcamelon * @author jcamelon
*/ */
public interface ICPPASTTemplateParameter extends IASTNode { public interface ICPPASTTemplateParameter extends IASTNode {
/**
* Constant
*/
public static final ICPPASTTemplateParameter[] EMPTY_TEMPLATEPARAMETER_ARRAY = new ICPPASTTemplateParameter[0]; public static final ICPPASTTemplateParameter[] EMPTY_TEMPLATEPARAMETER_ARRAY = new ICPPASTTemplateParameter[0];
} }

View file

@ -14,12 +14,31 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
import org.eclipse.cdt.core.dom.ast.IASTDeclaration; import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
/** /**
* This interface represents a template specialization.
*
* @author jcamelon * @author jcamelon
*/ */
public interface ICPPASTTemplateSpecialization extends IASTDeclaration { public interface ICPPASTTemplateSpecialization extends IASTDeclaration {
public static final ASTNodeProperty OWNED_DECLARATION = new ASTNodeProperty( "Owned Declaration"); //$NON-NLS-1$ /**
* 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(); public IASTDeclaration getDeclaration();
/**
* Set the declaration.
*
* @param declaration
* <code>IASTDeclaration</code>
*/
public void setDeclaration(IASTDeclaration declaration); public void setDeclaration(IASTDeclaration declaration);
} }

View file

@ -10,26 +10,78 @@
**********************************************************************/ **********************************************************************/
package org.eclipse.cdt.core.dom.ast.cpp; package org.eclipse.cdt.core.dom.ast.cpp;
import org.eclipse.cdt.core.dom.ast.ASTNodeProperty; import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
import org.eclipse.cdt.core.dom.ast.IASTExpression; import org.eclipse.cdt.core.dom.ast.IASTExpression;
import org.eclipse.cdt.core.dom.ast.IASTName; import org.eclipse.cdt.core.dom.ast.IASTName;
/** /**
* This is a templated template parameter.
*
* @author jcamelon * @author jcamelon
*/ */
public interface ICPPASTTemplatedTypeTemplateParameter extends public interface ICPPASTTemplatedTypeTemplateParameter extends
ICPPASTTemplateParameter { ICPPASTTemplateParameter {
public static final ASTNodeProperty PARAMETER = new ASTNodeProperty( "Template Parameter"); //$NON-NLS-1$ /**
* PARAMETER
*/
public static final ASTNodeProperty PARAMETER = new ASTNodeProperty(
"Template Parameter"); //$NON-NLS-1$
/**
* Get all template parameters.
*
* @return <code>ICPPASTTemplateParameter []</code>
*/
public ICPPASTTemplateParameter[] getTemplateParameters(); public ICPPASTTemplateParameter[] getTemplateParameters();
/**
* Add a parameter.
*
* @param parm
* <code>ICPPASTTemplateParameter</code>
*/
public void addTemplateParamter(ICPPASTTemplateParameter parm); public void addTemplateParamter(ICPPASTTemplateParameter parm);
public static final ASTNodeProperty PARAMETER_NAME = new ASTNodeProperty( "Name" ); //$NON-NLS-1$ /**
* 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(); public IASTName getName();
/**
* Set name.
*
* @param name
* <code>IASTName</code>
*/
public void setName(IASTName name); public void setName(IASTName name);
public static final ASTNodeProperty DEFAULT_VALUE = new ASTNodeProperty( "Default Value"); //$NON-NLS-1$ /**
* 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(); public IASTExpression getDefaultValue();
/**
* Set default value for template type.
*
* @param expression
* <code>IASTExpression</code>
*/
public void setDefaultValue(IASTExpression expression); public void setDefaultValue(IASTExpression expression);
} }

View file

@ -20,5 +20,12 @@ import org.eclipse.cdt.core.dom.ast.IBinding;
* @author aniefer * @author aniefer
*/ */
public interface ICPPASTTranslationUnit extends IASTTranslationUnit { public interface ICPPASTTranslationUnit extends IASTTranslationUnit {
/**
* Resolve the binding for translation unit.
*
* @return <code>IBinding</code>
*/
public IBinding resolveBinding(); public IBinding resolveBinding();
} }

View file

@ -14,26 +14,54 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
import org.eclipse.cdt.core.dom.ast.IASTStatement; import org.eclipse.cdt.core.dom.ast.IASTStatement;
/** /**
* This interface represents the try block statement. try { //body } catch( Exc
* e ) { // handler } catch( ... ) {
* }
*
* @author jcamelon * @author jcamelon
*
*/ */
public interface ICPPASTTryBlockStatement extends IASTStatement { public interface ICPPASTTryBlockStatement extends IASTStatement {
public static final ASTNodeProperty BODY = new ASTNodeProperty( "Body"); //$NON-NLS-1$
/** /**
* <code>BODY</code> is the body of the try block.
*/
public static final ASTNodeProperty BODY = new ASTNodeProperty("Body"); //$NON-NLS-1$
/**
* Set try body.
*
* @param tryBlock * @param tryBlock
* <code>IASTStatement</code>
*/ */
public void setTryBody(IASTStatement tryBlock); public void setTryBody(IASTStatement tryBlock);
/**
* Get try body.
*
* @return <code>IASTStatement</code>
*/
public IASTStatement getTryBody(); public IASTStatement getTryBody();
public static final ASTNodeProperty CATCH_HANDLER = new ASTNodeProperty( "Catch Handler"); //$NON-NLS-1$
/** /**
* <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 * @param handler
* <code>ICPPASTCatchHandler</code>
*/ */
public void addCatchHandler(ICPPASTCatchHandler handler); public void addCatchHandler(ICPPASTCatchHandler handler);
/**
* Get the catch handlers.
*
* @return <code>ICPPASTCatchHandler []</code>
*/
public ICPPASTCatchHandler[] getCatchHandlers(); public ICPPASTCatchHandler[] getCatchHandlers();
} }

View file

@ -18,5 +18,6 @@ import org.eclipse.cdt.core.dom.ast.IASTTypeIdExpression;
public interface ICPPASTTypeIdExpression extends IASTTypeIdExpression { public interface ICPPASTTypeIdExpression extends IASTTypeIdExpression {
public static final int op_typeid = IASTTypeIdExpression.op_last + 1; public static final int op_typeid = IASTTypeIdExpression.op_last + 1;
public static final int op_last = op_typeid; public static final int op_last = op_typeid;
} }

View file

@ -20,23 +20,60 @@ import org.eclipse.cdt.core.dom.ast.IASTName;
public interface ICPPASTTypenameExpression extends IASTExpression { public interface ICPPASTTypenameExpression extends IASTExpression {
/** /**
* Was template token consumed?
*
* @param templateTokenConsumed * @param templateTokenConsumed
* boolean
*/ */
public void setIsTemplate(boolean templateTokenConsumed); public void setIsTemplate(boolean templateTokenConsumed);
/**
* Was template token consumed?
*
* @return boolean
*/
public boolean isTemplate(); public boolean isTemplate();
public static final ASTNodeProperty TYPENAME = new ASTNodeProperty( "Typename" ); //$NON-NLS-1$
/** /**
* <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 * @param name
* <code>IASTName</code>
*/ */
public void setName(IASTName name); public void setName(IASTName name);
/**
* Get the name.
*
* @return <code>IASTName</code>
*/
public IASTName getName(); public IASTName getName();
public static final ASTNodeProperty INITIAL_VALUE = new ASTNodeProperty( "Initial Value"); //$NON-NLS-1$
/** /**
* <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 * @param expressionList
* <code>IASTExpression</code>
*/ */
public void setInitialValue(IASTExpression expressionList); public void setInitialValue(IASTExpression expressionList);
/**
* Get initial value.
*
* @return <code>IASTExpression</code>
*/
public IASTExpression getInitialValue(); public IASTExpression getInitialValue();
} }

View file

@ -17,8 +17,19 @@ import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression;
*/ */
public interface ICPPASTUnaryExpression extends IASTUnaryExpression { public interface ICPPASTUnaryExpression extends IASTUnaryExpression {
/**
* <code>op_throw</code> throw exp
*/
public static final int op_throw = IASTUnaryExpression.op_last + 1; 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; 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; public static final int op_last = op_typeid;
} }

View file

@ -15,16 +15,45 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
import org.eclipse.cdt.core.dom.ast.IASTName; import org.eclipse.cdt.core.dom.ast.IASTName;
/** /**
* This interface represents a using declaration.
*
* @author jcamelon * @author jcamelon
*/ */
public interface ICPPASTUsingDeclaration extends IASTDeclaration { public interface ICPPASTUsingDeclaration extends IASTDeclaration {
/**
* <code>NAME</code> is the qualified name brought into scope.
*/
public static final ASTNodeProperty NAME = new ASTNodeProperty("Name"); //$NON-NLS-1$ public static final ASTNodeProperty NAME = new ASTNodeProperty("Name"); //$NON-NLS-1$
/**
* Was the typename keyword used?
*
* @param value
* boolean
*/
public void setIsTypename(boolean value); public void setIsTypename(boolean value);
/**
* Set that the typename keyword was/wasn't used.
*
* @return boolean
*/
public boolean isTypename(); public boolean isTypename();
/**
* Get the name.
*
* @return <code>IASTName</code>
*/
public IASTName getName(); public IASTName getName();
/**
* Set the name.
*
* @param name
* <code>IASTName</code>
*/
public void setName(IASTName name); public void setName(IASTName name);
} }

View file

@ -15,13 +15,36 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
import org.eclipse.cdt.core.dom.ast.IASTName; import org.eclipse.cdt.core.dom.ast.IASTName;
/** /**
* This interface represents a C++ using directive.
*
* @author jcamelon * @author jcamelon
*/ */
public interface ICPPASTUsingDirective extends IASTDeclaration { public interface ICPPASTUsingDirective extends IASTDeclaration {
/**
* Constant.
*/
public static final ICPPASTUsingDirective[] EMPTY_USINGDIRECTIVE_ARRAY = new ICPPASTUsingDirective[0]; public static final ICPPASTUsingDirective[] EMPTY_USINGDIRECTIVE_ARRAY = new ICPPASTUsingDirective[0];
public static final ASTNodeProperty QUALIFIED_NAME = new ASTNodeProperty( "Name"); //$NON-NLS-1$
/**
* <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(); public IASTName getQualifiedName();
/**
* Set the qualified name.
*
* @param qualifiedName
* <code>IASTName</code>
*/
public void setQualifiedName(IASTName qualifiedName); public void setQualifiedName(IASTName qualifiedName);
} }

View file

@ -13,15 +13,41 @@ package org.eclipse.cdt.core.dom.ast.cpp;
import org.eclipse.cdt.core.dom.ast.IASTDeclaration; import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
/** /**
* C++ allows for visibility labels to be mixed interdeclaration in class
* specifiers.
*
* @author jcamelon * @author jcamelon
*/ */
public interface ICPPASTVisiblityLabel extends IASTDeclaration { public interface ICPPASTVisiblityLabel extends IASTDeclaration {
/**
* <code>v_public</code> == public:
*/
public static final int v_public = 1; public static final int v_public = 1;
/**
* <code>v_protected</code> == protected:
*/
public static final int v_protected = 2; public static final int v_protected = 2;
/**
* <code>v_private</code> == private:
*/
public static final int v_private = 3; public static final int v_private = 3;
/**
* Get the visibility.
*
* @return int
*/
public int getVisibility(); public int getVisibility();
/**
* Set visibility.
*
* @param visibility
* int
*/
public void setVisibility(int visibility); public void setVisibility(int visibility);
} }

View file

@ -15,13 +15,31 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
import org.eclipse.cdt.core.dom.ast.IASTWhileStatement; import org.eclipse.cdt.core.dom.ast.IASTWhileStatement;
/** /**
* @author jcamelon * This inteface accommodates C++ allows for broader while loop syntax.
* *
* @author jcamelon
*/ */
public interface ICPPASTWhileStatement extends IASTWhileStatement { public interface ICPPASTWhileStatement extends IASTWhileStatement {
public static final ASTNodeProperty CONDITIONDECLARATION = new ASTNodeProperty("initDeclaration"); //$NON-NLS-1$ /**
* 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(); public IASTDeclaration getConditionDeclaration();
/**
* Set the condition declaration.
*
* @param declaration
* <code>IASTDeclaration</code>
*/
public void setConditionDeclaration(IASTDeclaration declaration); public void setConditionDeclaration(IASTDeclaration declaration);
} }

View file

@ -36,7 +36,9 @@ public interface ICPPBase {
public int getVisibility() throws DOMException; public int getVisibility() throws DOMException;
public static final int v_private = ICPPASTBaseSpecifier.v_private; public static final int v_private = ICPPASTBaseSpecifier.v_private;
public static final int v_protected = ICPPASTBaseSpecifier.v_protected; public static final int v_protected = ICPPASTBaseSpecifier.v_protected;
public static final int v_public = ICPPASTBaseSpecifier.v_public; public static final int v_public = ICPPASTBaseSpecifier.v_public;
/** /**

View file

@ -21,5 +21,6 @@ import org.eclipse.cdt.core.dom.ast.IBasicType;
public interface ICPPBasicType extends IBasicType { public interface ICPPBasicType extends IBasicType {
// Extra types // Extra types
public static final int t_bool = ICPPASTSimpleDeclSpecifier.t_bool; public static final int t_bool = ICPPASTSimpleDeclSpecifier.t_bool;
public static final int t_wchar_t = ICPPASTSimpleDeclSpecifier.t_wchar_t; public static final int t_wchar_t = ICPPASTSimpleDeclSpecifier.t_wchar_t;
} }

View file

@ -19,15 +19,17 @@ package org.eclipse.cdt.core.dom.ast.cpp;
public interface ICPPClassScope extends ICPPScope { public interface ICPPClassScope extends ICPPScope {
/** /**
* Get the binding for the class this scope is associated with * Get the binding for the class this scope is associated with
*
* @return * @return
*/ */
ICPPClassType getClassType(); ICPPClassType getClassType();
/** /**
* Returns an array of methods that were implicitly added to this class scope. * Returns an array of methods that were implicitly added to this class
* These methods may or may not have been explicitly declared in the code. * scope. These methods may or may not have been explicitly declared in the
* The methods that will be implicitly declared are: the default constructor, * code. The methods that will be implicitly declared are: the default
* copy constructor, copy assignment operator, and destructor * constructor, copy constructor, copy assignment operator, and destructor
*
* @return * @return
*/ */
public ICPPMethod[] getImplicitMethods(); public ICPPMethod[] getImplicitMethods();

View file

@ -23,25 +23,27 @@ import org.eclipse.cdt.core.dom.ast.IField;
public interface ICPPClassType extends ICompositeType { public interface ICPPClassType extends ICompositeType {
public static final int k_class = ICPPASTCompositeTypeSpecifier.k_class; public static final int k_class = ICPPASTCompositeTypeSpecifier.k_class;
/** /**
* Returns a list of base class relationships. The list is empty if * Returns a list of base class relationships. The list is empty if there
* there are none. * are none.
* *
* @return List of ICPPBase * @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 * Get fields is restated here just to point out that this method returns a
* a list of ICPPField objects representing all fields, declared or inherited. * list of ICPPField objects representing all fields, declared or inherited.
*/ */
public IField[] getFields() throws DOMException; public IField[] getFields() throws DOMException;
/** /**
* findField is restated here to point out that this method looks through the * findField is restated here to point out that this method looks through
* inheritance tree of this class while looking for a field with the given name * the inheritance tree of this class while looking for a field with the
* If no field is found, null is returned, if the name is found to be ambiguous * given name If no field is found, null is returned, if the name is found
* a IProblemBinding is returned. * to be ambiguous a IProblemBinding is returned.
*
* @param name * @param name
* @return * @return
*/ */
@ -57,8 +59,8 @@ public interface ICPPClassType extends ICompositeType {
/** /**
* Returns a list of ICPPMethod objects representing all methods defined for * Returns a list of ICPPMethod objects representing all methods defined for
* this class including those declared, inherited, or generated (e.g. default * this class including those declared, inherited, or generated (e.g.
* constructors and the like). * default constructors and the like).
* *
* @return List of ICPPMethod * @return List of ICPPMethod
*/ */
@ -66,8 +68,8 @@ public interface ICPPClassType extends ICompositeType {
/** /**
* Returns a list of ICPPMethod objects representing all method explicitly * Returns a list of ICPPMethod objects representing all method explicitly
* declared by this class and inherited from base classes. It does not include * declared by this class and inherited from base classes. It does not
* automatically generated methods. * include automatically generated methods.
* *
* @return List of ICPPMethod * @return List of ICPPMethod
*/ */
@ -75,23 +77,26 @@ public interface ICPPClassType extends ICompositeType {
/** /**
* Returns a list of ICPPMethod objects representing all methods explicitly * Returns a list of ICPPMethod objects representing all methods explicitly
* declared by this class. It does not include inherited methods or automatically * declared by this class. It does not include inherited methods or
* generated methods. * automatically generated methods.
* *
* @return List of ICPPMethod * @return List of ICPPMethod
*/ */
public ICPPMethod[] getDeclaredMethods() throws DOMException; public ICPPMethod[] getDeclaredMethods() throws DOMException;
/** /**
* Returns an array of ICPPConstructor objects representing the contructors for this * Returns an array of ICPPConstructor objects representing the contructors
* class. This list includes both declared and implicit constructors. * for this class. This list includes both declared and implicit
* constructors.
*
* @return * @return
*/ */
public ICPPConstructor[] getConstructors() throws DOMException; public ICPPConstructor[] getConstructors() throws DOMException;
/** /**
* return an array of bindings for those classes/functions declared as friends of this * return an array of bindings for those classes/functions declared as
* class. * friends of this class.
*
* @return * @return
* @throws DOMException * @throws DOMException
*/ */

View file

@ -17,14 +17,16 @@ import org.eclipse.cdt.core.dom.ast.DOMException;
import org.eclipse.cdt.core.dom.ast.IBinding; import org.eclipse.cdt.core.dom.ast.IBinding;
/** /**
* This binding is a container for other bindings. It is used in instances * This binding is a container for other bindings. It is used in instances where
* where an IASTName refers to more than one binding, for example a using declaration * an IASTName refers to more than one binding, for example a using declaration
* refering to a set of overloaded functions. * refering to a set of overloaded functions.
*
* @author aniefer * @author aniefer
*/ */
public interface ICPPCompositeBinding extends IBinding { public interface ICPPCompositeBinding extends IBinding {
/** /**
* get the bindings * get the bindings
*
* @return * @return
* @throws DOMException * @throws DOMException
*/ */

View file

@ -22,6 +22,7 @@ public interface ICPPConstructor extends ICPPMethod {
/** /**
* Whether or not this constructor was declared as explicit * Whether or not this constructor was declared as explicit
*
* @return * @return
* @throws DOMException * @throws DOMException
*/ */

View file

@ -22,8 +22,9 @@ import org.eclipse.cdt.core.dom.ast.IScope;
public interface ICPPFunctionScope extends ICPPScope { public interface ICPPFunctionScope extends ICPPScope {
/** /**
* Get the scope representing the function body. * Get the scope representing the function body. returns null if there is no
* returns null if there is no function definition * function definition
*
* @return * @return
* @throws DOMException * @throws DOMException
*/ */

View file

@ -27,7 +27,9 @@ public interface ICPPMember {
public int getVisibility() throws DOMException; public int getVisibility() throws DOMException;
public static final int v_private = ICPPASTVisiblityLabel.v_private; public static final int v_private = ICPPASTVisiblityLabel.v_private;
public static final int v_protected = ICPPASTVisiblityLabel.v_protected; public static final int v_protected = ICPPASTVisiblityLabel.v_protected;
public static final int v_public = ICPPASTVisiblityLabel.v_public; public static final int v_public = ICPPASTVisiblityLabel.v_public;
} }

View file

@ -18,11 +18,13 @@ import org.eclipse.cdt.core.dom.ast.IBinding;
/** /**
* This interface represents a C++ namespace * This interface represents a C++ namespace
*
* @author aniefer * @author aniefer
*/ */
public interface ICPPNamespace extends IBinding { public interface ICPPNamespace extends IBinding {
/** /**
* get the scope object associated with this namespace * get the scope object associated with this namespace
*
* @return * @return
* @throws DOMException * @throws DOMException
*/ */

View file

@ -16,23 +16,25 @@ package org.eclipse.cdt.core.dom.ast.cpp;
import org.eclipse.cdt.core.dom.ast.DOMException; import org.eclipse.cdt.core.dom.ast.DOMException;
import org.eclipse.cdt.core.dom.ast.IASTNode; import org.eclipse.cdt.core.dom.ast.IASTNode;
/** /**
* @author aniefer * @author aniefer
*/ */
public interface ICPPNamespaceScope extends ICPPScope { public interface ICPPNamespaceScope extends ICPPScope {
/** /**
* Add an IASTNode that nominates another namespace to this scope * Add an IASTNode that nominates another namespace to this scope Most
* Most commonly, ICPPASTUsingDirectives, but in the case of unnamed namespaces, * commonly, ICPPASTUsingDirectives, but in the case of unnamed namespaces,
* it could be an ICPPASTNamespaceDefinition * it could be an ICPPASTNamespaceDefinition
*
* @param directive * @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 * Get the IASTNodes that have been added to this scope to nominate other
* namespaces during lookup. (ICPPASTUsingDirective or ICPPASTNamespaceDefinition) * namespaces during lookup. (ICPPASTUsingDirective or
* ICPPASTNamespaceDefinition)
*
* @return * @return
*/ */
public IASTNode[] getUsingDirectives() throws DOMException; public IASTNode[] getUsingDirectives() throws DOMException;

View file

@ -23,6 +23,7 @@ public interface ICPPPointerToMemberType extends IPointerType {
/** /**
* Get the class to whose members this points to * Get the class to whose members this points to
*
* @return * @return
*/ */
public ICPPClassType getMemberOfClass(); public ICPPClassType getMemberOfClass();

View file

@ -23,6 +23,7 @@ import org.eclipse.cdt.core.dom.ast.IType;
public interface ICPPReferenceType extends IType { public interface ICPPReferenceType extends IType {
/** /**
* get the type that this is a reference of * get the type that this is a reference of
*
* @return * @return
* @throws DOMException * @throws DOMException
*/ */

View file

@ -19,8 +19,8 @@ import org.eclipse.cdt.core.dom.ast.IBinding;
import org.eclipse.cdt.core.dom.ast.IScope; import org.eclipse.cdt.core.dom.ast.IScope;
/** /**
* The ICPPScope serves as a mechanism for caching IASTNames and * The ICPPScope serves as a mechanism for caching IASTNames and bindings to
* bindings to speed up resolution. * speed up resolution.
* *
* @author aniefer * @author aniefer
*/ */
@ -28,33 +28,37 @@ public interface ICPPScope extends IScope {
/** /**
* Add an IASTName to be cached in this scope * Add an IASTName to be cached in this scope
*
* @param name * @param name
* @throws DOMException * @throws DOMException
*/ */
public void addName(IASTName name) throws DOMException; public void addName(IASTName name) throws DOMException;
/** /**
* Get the binding that the given name would resolve to in this scope. * Get the binding that the given name would resolve to in this scope. Could
* Could return null if there is no matching binding in this scope, * return null if there is no matching binding in this scope, or if resolve ==
* or if resolve == false and the appropriate binding has not yet been * false and the appropriate binding has not yet been resolved.
* resolved.
* *
* @param name * @param name
* @param resolve : whether or not to resolve the matching binding if it * @param resolve :
* has not been so already. * 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 * @return : the binding in this scope that matches the name, or null
* @throws DOMException * @throws DOMException
*/ */
public IBinding getBinding( IASTName name, boolean resolve ) throws DOMException; public IBinding getBinding(IASTName name, boolean resolve)
throws DOMException;
/** /**
* Set whether or not all the names in this scope have been cached * Set whether or not all the names in this scope have been cached
*
* @param b * @param b
*/ */
public void setFullyCached(boolean b) throws DOMException; 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 * @return
*/ */
public boolean isFullyCached() throws DOMException; public boolean isFullyCached() throws DOMException;

View file

@ -22,8 +22,8 @@ public interface ICPPTemplateDefinition {
* specialization, the parameters will be substituted by the arguments * specialization, the parameters will be substituted by the arguments
* determined in the specialization. * determined in the specialization.
* *
* @return List of ICPPTemplateParameter, IType, or IASTExpression. * @return List of ICPPTemplateParameter, IType, or IASTExpression. The type
* The type or expression are arguments in a specialization. * or expression are arguments in a specialization.
*/ */
public List getParameters(); public List getParameters();
@ -36,8 +36,8 @@ public interface ICPPTemplateDefinition {
/** /**
* If this is a template specialization, this returns the template * If this is a template specialization, this returns the template
* definition this is specializing. It returns null if this template * definition this is specializing. It returns null if this template is not
* is not a specialization. * a specialization.
* *
* @return * @return
*/ */

View file

@ -16,7 +16,8 @@ import org.eclipse.cdt.core.dom.ast.IVariable;
/** /**
* @author Doug Schaefer * @author Doug Schaefer
*/ */
public interface ICPPTemplateNonTypeParameter extends ICPPTemplateParameter, IVariable { public interface ICPPTemplateNonTypeParameter extends ICPPTemplateParameter,
IVariable {
/** /**
* The default value for this parameter. * The default value for this parameter.

View file

@ -19,8 +19,8 @@ import org.eclipse.cdt.core.dom.ast.IType;
public interface ICPPTemplateTypeParameter extends ICPPTemplateParameter, IType { public interface ICPPTemplateTypeParameter extends ICPPTemplateParameter, IType {
/** /**
* The default type for this parameter. * The default type for this parameter. May be null
* May be null *
* @return * @return
*/ */
public IType getDefault() throws DOMException; public IType getDefault() throws DOMException;

View file

@ -40,14 +40,14 @@ public class CPPASTNamespaceAlias extends CPPASTNode implements
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceAlias#getQualifiedName() * @see org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceAlias#getQualifiedName()
*/ */
public IASTName getQualifiedName() { public IASTName getMappingName() {
return qualifiedName; return qualifiedName;
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceAlias#setQualifiedName(org.eclipse.cdt.core.dom.ast.cpp.ICPPASTQualifiedName) * @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; this.qualifiedName = qualifiedName;
} }

View file

@ -346,7 +346,7 @@ public class CPPVisitor {
return CPPSemantics.resolveBinding( ((ICPPASTUsingDirective) declaration).getQualifiedName() ); return CPPSemantics.resolveBinding( ((ICPPASTUsingDirective) declaration).getQualifiedName() );
} else if( declaration instanceof ICPPASTNamespaceAlias ) { } else if( declaration instanceof ICPPASTNamespaceAlias ) {
ICPPASTNamespaceAlias alias = (ICPPASTNamespaceAlias) declaration; ICPPASTNamespaceAlias alias = (ICPPASTNamespaceAlias) declaration;
return CPPSemantics.resolveBinding( alias.getQualifiedName() ); return CPPSemantics.resolveBinding( alias.getMappingName() );
} }

View file

@ -2495,7 +2495,7 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
alias.setAlias(name); alias.setAlias(name);
name.setParent(alias); name.setParent(alias);
name.setPropertyInParent(ICPPASTNamespaceAlias.ALIAS_NAME); name.setPropertyInParent(ICPPASTNamespaceAlias.ALIAS_NAME);
alias.setQualifiedName(qualifiedName); alias.setMappingName(qualifiedName);
qualifiedName.setParent(alias); qualifiedName.setParent(alias);
qualifiedName.setPropertyInParent(ICPPASTNamespaceAlias.MAPPING_NAME); qualifiedName.setPropertyInParent(ICPPASTNamespaceAlias.MAPPING_NAME);
return alias; return alias;