public interface ICPPASTFunctionDeclarator extends IASTStandardFunctionDeclarator, ICPPASTDeclarator
| Modifier and Type | Interface and Description |
|---|---|
static class |
ICPPASTFunctionDeclarator.RefQualifier |
IASTNode.CopyStyle| Modifier and Type | Field and Description |
|---|---|
static ASTNodeProperty |
CONSTRUCTOR_CHAIN_MEMBER
Deprecated.
|
static ASTNodeProperty |
EXCEPTION_TYPEID |
static IASTTypeId[] |
NO_EXCEPTION_SPECIFICATION
Used as return value for
getExceptionSpecification(). |
static ICPPASTVirtSpecifier[] |
NO_VIRT_SPECIFIERS
Used as return value for
getVirtSpecifiers(). |
static ICPPASTLiteralExpression |
NOEXCEPT_DEFAULT
Represents a 'noexcept' specification without an expression.
|
static ASTNodeProperty |
NOEXCEPT_EXPRESSION |
static ASTNodeProperty |
TRAILING_RETURN_TYPE |
static ASTNodeProperty |
VIRT_SPECIFIER |
FUNCTION_PARAMETERDECLARATOR_NAME, EMPTY_DECLARATOR_ARRAY, INITIALIZER, NESTED_DECLARATOR, POINTER_OPERATORr_declaration, r_definition, r_reference, r_unclearATTRIBUTE, ATTRIBUTE_SPECIFIEREMPTY_NODE_ARRAY| Modifier and Type | Method and Description |
|---|---|
void |
addConstructorToChain(ICPPASTConstructorChainInitializer initializer)
Deprecated.
|
void |
addExceptionSpecificationTypeId(IASTTypeId typeId)
Add an exception specification type Id.
|
void |
addVirtSpecifier(ICPPASTVirtSpecifier virtSpecifier)
Add a virt-specifiers to this function.
|
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
|
ICPPASTFunctionDeclarator.RefQualifier |
getRefQualifier()
Returns the ref-qualifier.
|
IASTTypeId |
getTrailingReturnType()
Returns the trailing return type as in
auto f() -> int , or null. |
ICPPASTVirtSpecifier[] |
getVirtSpecifiers()
Returns the virt-specifiers of this function.
|
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)
Deprecated.
Use addVirtSpecifier() instead.
|
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)
Deprecated.
Use addVirtSpecifier() instead.
|
void |
setPureVirtual(boolean isPureVirtual)
Sets this method to be pure virtual.
|
void |
setRefQualifier(ICPPASTFunctionDeclarator.RefQualifier value)
Sets the ref-qualifier.
|
void |
setTrailingReturnType(IASTTypeId typeId)
Trailing return type as in
auto f() -> int . |
void |
setVolatile(boolean value)
Sets the method to be volatile or not.
|
addParameterDeclaration, setVarArgs, takesVarArgsaddPointerOperator, getInitializer, getName, getNestedDeclarator, getPointerOperators, setInitializer, setName, setNestedDeclaratorgetRoleForNameaddAttribute, addAttributeSpecifier, getAttributes, getAttributeSpecifiersaccept, contains, getChildren, getContainingFilename, getFileLocation, getLeadingSyntax, getNodeLocations, getOriginalNode, getParent, getPropertyInParent, getRawSignature, getSyntax, getTrailingSyntax, getTranslationUnit, isActive, isFrozen, isPartOfTranslationUnitFile, setParent, setPropertyInParentdeclaresParameterPack, setDeclaresParameterPackstatic final IASTTypeId[] NO_EXCEPTION_SPECIFICATION
getExceptionSpecification().static final ICPPASTVirtSpecifier[] NO_VIRT_SPECIFIERS
getVirtSpecifiers().static final ICPPASTLiteralExpression NOEXCEPT_DEFAULT
static final ASTNodeProperty EXCEPTION_TYPEID
static final ASTNodeProperty NOEXCEPT_EXPRESSION
static final ASTNodeProperty TRAILING_RETURN_TYPE
static final ASTNodeProperty VIRT_SPECIFIER
@Deprecated static final ASTNodeProperty CONSTRUCTOR_CHAIN_MEMBER
boolean isConst()
void setConst(boolean value)
boolean isVolatile()
void setVolatile(boolean value)
boolean isMutable()
void setMutable(boolean value)
boolean isPureVirtual()
void setPureVirtual(boolean isPureVirtual)
ICPPASTFunctionDeclarator.RefQualifier getRefQualifier()
void setRefQualifier(ICPPASTFunctionDeclarator.RefQualifier value)
ICPPASTParameterDeclaration[] getParameters()
IASTStandardFunctionDeclaratorgetParameters in interface IASTStandardFunctionDeclaratorIASTTypeId[] 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()
IASTNodecopy.getParent() == null copy.getPropertyInParent() == null copy.isFrozen() == falsePreprocessor 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 to copy(CopyStyle.withoutLocations).
copy in interface IASTDeclaratorcopy in interface IASTFunctionDeclaratorcopy in interface IASTNodecopy in interface IASTStandardFunctionDeclaratorICPPASTFunctionDeclarator copy(IASTNode.CopyStyle style)
IASTNodecopy.getParent() == null copy.getPropertyInParent() == null copy.isFrozen() == falsePreprocessor nodes do not currently support being copied. Implicit name nodes are not copied, instead they can be regenerated if required.
copy in interface IASTDeclaratorcopy in interface IASTFunctionDeclaratorcopy in interface IASTNodecopy in interface IASTStandardFunctionDeclaratorstyle - IASTNode.CopyStyle create a copy with or without locations. Please see
IASTNode.CopyStyle for restrictions on copies with Locations.boolean isOverride()
@Deprecated void setOverride(boolean isOverride)
boolean isFinal()
@Deprecated void setFinal(boolean isFinal)
ICPPASTVirtSpecifier[] getVirtSpecifiers()
void addVirtSpecifier(ICPPASTVirtSpecifier virtSpecifier)
Copyright (c) IBM Corp. and others 2004, 2014. All Rights Reserved.