Eclipse CDT
7.0

org.eclipse.cdt.core.dom.ast.cpp
Interface ICPPASTFunctionDeclarator

All Superinterfaces:
IASTDeclarator, IASTFunctionDeclarator, IASTNameOwner, IASTNode, IASTStandardFunctionDeclarator, ICPPASTDeclarator
All Known Subinterfaces:
ICPPASTFunctionTryBlockDeclarator

public interface ICPPASTFunctionDeclarator
extends IASTStandardFunctionDeclarator, ICPPASTDeclarator

C++ adds a few things to function declarators.


Field Summary
static ASTNodeProperty CONSTRUCTOR_CHAIN_MEMBER
          Deprecated. 
static ASTNodeProperty EXCEPTION_TYPEID
           
static IASTTypeId[] NO_EXCEPTION_SPECIFICATION
          Used as return value for getExceptionSpecification().
static ASTNodeProperty TRAILING_RETURN_TYPE
           
 
Fields inherited from interface org.eclipse.cdt.core.dom.ast.IASTStandardFunctionDeclarator
FUNCTION_PARAMETER
 
Fields inherited from interface org.eclipse.cdt.core.dom.ast.IASTDeclarator
DECLARATOR_NAME, EMPTY_DECLARATOR_ARRAY, INITIALIZER, NESTED_DECLARATOR, POINTER_OPERATOR
 
Fields inherited from interface org.eclipse.cdt.core.dom.ast.IASTNode
EMPTY_NODE_ARRAY
 
Fields inherited from interface org.eclipse.cdt.core.dom.ast.IASTNameOwner
r_declaration, r_definition, r_reference, r_unclear
 
Method Summary
 void addConstructorToChain(ICPPASTConstructorChainInitializer initializer)
          Deprecated. 
 void addExceptionSpecificationTypeId(IASTTypeId typeId)
          Add an exception specification type Id.
 ICPPASTFunctionDeclarator copy()
          Returns a mutable copy of the tree rooted at this node.
 ICPPASTConstructorChainInitializer[] getConstructorChain()
          Deprecated. use ICPPASTFunctionDefinition.getMemberInitializers(), instead.
 IASTTypeId[] getExceptionSpecification()
          Returns an array of type-ids representing the exception specification.
 ICPPFunctionScope getFunctionScope()
          Get function scope this node represents.
 ICPPASTParameterDeclaration[] getParameters()
          Gets the parameter declarations for the function
 IASTTypeId getTrailingReturnType()
          Returns the trailing return type as in auto f() -> int , or null.
 boolean isConst()
          Is this a const method?
 boolean isPureVirtual()
          Is the method pure virtual?
 boolean isVolatile()
          Is this a volatile method?
 void setConst(boolean value)
          Set the method to be const or not.
 void setEmptyExceptionSpecification()
          Configures the declarator with an empty exception specification (as opposed to having none).
 void setPureVirtual(boolean isPureVirtual)
          Set this method to be pure virtual.
 void setTrailingReturnType(IASTTypeId typeId)
          Trailing return type as in auto f() -> int .
 void setVolatile(boolean value)
          Set the method to be volatile or not.
 
Methods inherited from interface org.eclipse.cdt.core.dom.ast.IASTStandardFunctionDeclarator
addParameterDeclaration, setVarArgs, takesVarArgs
 
Methods inherited from interface org.eclipse.cdt.core.dom.ast.IASTDeclarator
addPointerOperator, getInitializer, getName, getNestedDeclarator, getPointerOperators, setInitializer, setName, setNestedDeclarator
 
Methods inherited from interface org.eclipse.cdt.core.dom.ast.IASTNode
accept, contains, getChildren, getContainingFilename, getFileLocation, getLeadingSyntax, getNodeLocations, getParent, getPropertyInParent, getRawSignature, getSyntax, getTrailingSyntax, getTranslationUnit, isActive, isFrozen, isPartOfTranslationUnitFile, setParent, setPropertyInParent
 
Methods inherited from interface org.eclipse.cdt.core.dom.ast.IASTNameOwner
getRoleForName
 
Methods inherited from interface org.eclipse.cdt.core.dom.ast.cpp.ICPPASTDeclarator
declaresParameterPack, setDeclaresParameterPack
 

Field Detail

NO_EXCEPTION_SPECIFICATION

static final IASTTypeId[] NO_EXCEPTION_SPECIFICATION
Used as return value for getExceptionSpecification().

Since:
5.1

EXCEPTION_TYPEID

static final ASTNodeProperty EXCEPTION_TYPEID

TRAILING_RETURN_TYPE

static final ASTNodeProperty TRAILING_RETURN_TYPE
Since:
5.2

CONSTRUCTOR_CHAIN_MEMBER

@Deprecated
static final ASTNodeProperty CONSTRUCTOR_CHAIN_MEMBER
Deprecated. 
Method Detail

isConst

boolean isConst()
Is this a const method?


setConst

void setConst(boolean value)
Set the method to be const or not.


isVolatile

boolean isVolatile()
Is this a volatile method?


setVolatile

void setVolatile(boolean value)
Set the method to be volatile or not.


isPureVirtual

boolean isPureVirtual()
Is the method pure virtual?


setPureVirtual

void setPureVirtual(boolean isPureVirtual)
Set this method to be pure virtual.


getParameters

ICPPASTParameterDeclaration[] getParameters()
Description copied from interface: IASTStandardFunctionDeclarator
Gets the parameter declarations for the function

Specified by:
getParameters in interface IASTStandardFunctionDeclarator
Returns:
array of IASTParameterDeclaration
Since:
5.2

getExceptionSpecification

IASTTypeId[] getExceptionSpecification()
Returns an array of type-ids representing the exception specification. The return value NO_EXCEPTION_SPECIFICATION indicates that no exceptions are specified, whereas IASTTypeId.EMPTY_TYPEID_ARRAY is used for an empty exception specification.


addExceptionSpecificationTypeId

void addExceptionSpecificationTypeId(IASTTypeId typeId)
Add an exception specification type Id.


setEmptyExceptionSpecification

void setEmptyExceptionSpecification()
Configures the declarator with an empty exception specification (as opposed to having none).

Since:
5.1

getTrailingReturnType

IASTTypeId getTrailingReturnType()
Returns the trailing return type as in auto f() -> int , or null.

Since:
5.2

setTrailingReturnType

void setTrailingReturnType(IASTTypeId typeId)
Trailing return type as in auto f() -> int .

Since:
5.2

getFunctionScope

ICPPFunctionScope getFunctionScope()
Get function scope this node represents. Returns null, if this declarator does not declare a function-prototype or function-definition.

Specified by:
getFunctionScope in interface IASTStandardFunctionDeclarator

getConstructorChain

@Deprecated
ICPPASTConstructorChainInitializer[] getConstructorChain()
Deprecated. use ICPPASTFunctionDefinition.getMemberInitializers(), instead.


addConstructorToChain

@Deprecated
void addConstructorToChain(ICPPASTConstructorChainInitializer initializer)
Deprecated. 


copy

ICPPASTFunctionDeclarator copy()
Description copied from interface: IASTNode
Returns a mutable copy of the tree rooted at this node. The following postconditions hold: copy.getParent() == null copy.getPropertyInParent() == null copy.isFrozen() == false Preprocessor nodes do not currently support being copied. Implicit name nodes are not copied, instead they can be regenerated if required.

Specified by:
copy in interface IASTDeclarator
Specified by:
copy in interface IASTFunctionDeclarator
Specified by:
copy in interface IASTNode
Specified by:
copy in interface IASTStandardFunctionDeclarator
Since:
5.1

Eclipse CDT
7.0

Copyright (c) IBM Corp. and others 2004, 2010. All Rights Reserved.