|
Eclipse CDT 7.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ICPPASTFunctionDeclarator
C++ adds a few things to function declarators.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.eclipse.cdt.core.dom.ast.IASTNode |
---|
IASTNode.CopyStyle |
Field Summary | |
---|---|
static ASTNodeProperty |
CONSTRUCTOR_CHAIN_MEMBER
Deprecated. |
static ASTNodeProperty |
EXCEPTION_TYPEID
|
static IASTTypeId[] |
NO_EXCEPTION_SPECIFICATION
Used as return value for getExceptionSpecification() . |
static ICPPASTLiteralExpression |
NOEXCEPT_DEFAULT
Represents a 'noexcept' specification without an expression. |
static ASTNodeProperty |
NOEXCEPT_EXPRESSION
|
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.IASTNameOwner |
---|
r_declaration, r_definition, r_reference, r_unclear |
Fields inherited from interface org.eclipse.cdt.core.dom.ast.IASTAttributeOwner |
---|
ATTRIBUTE |
Fields inherited from interface org.eclipse.cdt.core.dom.ast.IASTNode |
---|
EMPTY_NODE_ARRAY |
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. |
ICPPASTFunctionDeclarator |
copy(IASTNode.CopyStyle style)
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. |
ICPPASTExpression |
getNoexceptExpression()
Returns the noexcept expression, NOEXCEPT_DEFAULT if the noexcept specification
does not contain an expression, or null the noexcept specification is not present. |
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 |
isFinal()
Returns whether this function is declared final. |
boolean |
isMutable()
When used as a lambda declarator, it can be mutable. |
boolean |
isOverride()
Returns whether this function is declared override. |
boolean |
isPureVirtual()
Is the method pure virtual? |
boolean |
isVolatile()
Is this a volatile method? |
void |
setConst(boolean value)
Sets the method to be const or not. |
void |
setEmptyExceptionSpecification()
Configures the declarator with an empty exception specification (as opposed to having none). |
void |
setFinal(boolean isFinal)
Sets whether this function is declared final. |
void |
setMutable(boolean value)
When used as a lambda declarator, it can be mutable. |
void |
setNoexceptExpression(ICPPASTExpression expression)
Sets the noexcept expression. |
void |
setOverride(boolean isOverride)
Sets whether this function is declared override. |
void |
setPureVirtual(boolean isPureVirtual)
Sets this method to be pure virtual. |
void |
setTrailingReturnType(IASTTypeId typeId)
Trailing return type as in auto f() -> int . |
void |
setVolatile(boolean value)
Sets 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.IASTNameOwner |
---|
getRoleForName |
Methods inherited from interface org.eclipse.cdt.core.dom.ast.IASTAttributeOwner |
---|
addAttribute, getAttributes |
Methods inherited from interface org.eclipse.cdt.core.dom.ast.IASTNode |
---|
accept, contains, getChildren, getContainingFilename, getFileLocation, getLeadingSyntax, getNodeLocations, getOriginalNode, getParent, getPropertyInParent, getRawSignature, getSyntax, getTrailingSyntax, getTranslationUnit, isActive, isFrozen, isPartOfTranslationUnitFile, setParent, setPropertyInParent |
Methods inherited from interface org.eclipse.cdt.core.dom.ast.cpp.ICPPASTDeclarator |
---|
declaresParameterPack, setDeclaresParameterPack |
Field Detail |
---|
static final IASTTypeId[] NO_EXCEPTION_SPECIFICATION
getExceptionSpecification()
.
static final ICPPASTLiteralExpression NOEXCEPT_DEFAULT
static final ASTNodeProperty EXCEPTION_TYPEID
static final ASTNodeProperty NOEXCEPT_EXPRESSION
static final ASTNodeProperty TRAILING_RETURN_TYPE
@Deprecated static final ASTNodeProperty CONSTRUCTOR_CHAIN_MEMBER
Method Detail |
---|
boolean isConst()
void setConst(boolean value)
boolean isVolatile()
void setVolatile(boolean value)
boolean isMutable()
void setMutable(boolean value)
boolean isPureVirtual()
void setPureVirtual(boolean isPureVirtual)
ICPPASTParameterDeclaration[] getParameters()
IASTStandardFunctionDeclarator
getParameters
in interface IASTStandardFunctionDeclarator
IASTTypeId[] getExceptionSpecification()
NO_EXCEPTION_SPECIFICATION
indicates that no exceptions are specified, whereas
IASTTypeId.EMPTY_TYPEID_ARRAY
is used for an empty exception specification.
void addExceptionSpecificationTypeId(IASTTypeId typeId)
void setEmptyExceptionSpecification()
ICPPASTExpression getNoexceptExpression()
NOEXCEPT_DEFAULT
if the noexcept specification
does not contain an expression, or null
the noexcept specification is not present.
See C++11 5.4.1.
void setNoexceptExpression(ICPPASTExpression expression)
IASTTypeId getTrailingReturnType()
auto f() -> int
, or null
.
void setTrailingReturnType(IASTTypeId typeId)
auto f() -> int
.
ICPPFunctionScope getFunctionScope()
null
, if this declarator
does not declare a function-prototype or function-definition.
getFunctionScope
in interface IASTStandardFunctionDeclarator
@Deprecated ICPPASTConstructorChainInitializer[] getConstructorChain()
ICPPASTFunctionDefinition.getMemberInitializers()
, instead.
@Deprecated void addConstructorToChain(ICPPASTConstructorChainInitializer initializer)
ICPPASTFunctionDeclarator copy()
IASTNode
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.
Calling this method is equivalent
copy
in interface IASTDeclarator
copy
in interface IASTFunctionDeclarator
copy
in interface IASTNode
copy
in interface IASTStandardFunctionDeclarator
ICPPASTFunctionDeclarator copy(IASTNode.CopyStyle style)
IASTNode
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.
copy
in interface IASTDeclarator
copy
in interface IASTFunctionDeclarator
copy
in interface IASTNode
copy
in interface IASTStandardFunctionDeclarator
style
- IASTNode.CopyStyle
create a copy with or without locations. Please see
IASTNode.CopyStyle
for restrictions on copies with Locations.boolean isOverride()
void setOverride(boolean isOverride)
boolean isFinal()
void setFinal(boolean isFinal)
|
Eclipse CDT 7.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |