public class CASTFunctionDefinition extends ASTNode implements IASTFunctionDefinition, IASTAmbiguityParent
IASTNode.CopyStyleDECL_SPECIFIER, DECLARATOR, FUNCTION_BODYEMPTY_DECLARATION_ARRAYEMPTY_NODE_ARRAY| Constructor and Description |
|---|
CASTFunctionDefinition() |
CASTFunctionDefinition(IASTDeclSpecifier declSpecifier,
IASTFunctionDeclarator declarator,
IASTStatement bodyStatement) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(ASTVisitor action)
Abstract method to be overridden by all subclasses.
|
CASTFunctionDefinition |
copy()
Returns a mutable copy of the tree rooted at this node.
|
CASTFunctionDefinition |
copy(IASTNode.CopyStyle style)
Returns a mutable copy of the tree rooted at this node.
|
IASTStatement |
getBody()
Returns the body of the function.
|
IASTFunctionDeclarator |
getDeclarator()
Returns the function declarator of the function.
|
IASTDeclSpecifier |
getDeclSpecifier()
Returns the decl specifier for the function.
|
IScope |
getScope()
Get the logical IScope that the function definition body represents.
|
void |
replace(IASTNode child,
IASTNode other) |
void |
setBody(IASTStatement statement)
Sets the body of the function.
|
void |
setDeclarator(IASTFunctionDeclarator declarator)
Sets the declarator for the function.
|
void |
setDeclSpecifier(IASTDeclSpecifier declSpec)
Set the decl specifier for the function.
|
acceptByNodes, assertNotFrozen, contains, copy, getChildren, getContainingFilename, getFileLocation, getImageLocation, getLeadingSyntax, getLength, getNodeLocations, getOffset, getOriginalNode, getParent, getPropertyInParent, getRawSignature, getRawSignatureChars, getSyntax, getTrailingSyntax, getTranslationUnit, isActive, isFrozen, isPartOfSourceFile, isPartOfTranslationUnitFile, resolvePendingAmbiguities, setInactive, setLength, setOffset, setOffsetAndLength, setOffsetAndLength, setParent, setPropertyInParentclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontains, getChildren, getContainingFilename, getFileLocation, getLeadingSyntax, getNodeLocations, getOriginalNode, getParent, getPropertyInParent, getRawSignature, getSyntax, getTrailingSyntax, getTranslationUnit, isActive, isFrozen, isPartOfTranslationUnitFile, setParent, setPropertyInParentpublic CASTFunctionDefinition()
public CASTFunctionDefinition(IASTDeclSpecifier declSpecifier, IASTFunctionDeclarator declarator, IASTStatement bodyStatement)
public CASTFunctionDefinition 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 IASTDeclarationcopy in interface IASTFunctionDefinitioncopy in interface IASTNodepublic CASTFunctionDefinition 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 IASTDeclarationcopy in interface IASTFunctionDefinitioncopy in interface IASTNodestyle - IASTNode.CopyStyle create a copy with or without locations. Please see
IASTNode.CopyStyle for restrictions on copies with Locations.public IASTDeclSpecifier getDeclSpecifier()
IASTFunctionDefinitiongetDeclSpecifier in interface IASTFunctionDefinitionpublic void setDeclSpecifier(IASTDeclSpecifier declSpec)
IASTFunctionDefinitionsetDeclSpecifier in interface IASTFunctionDefinitionpublic IASTFunctionDeclarator getDeclarator()
IASTFunctionDefinitionvoid (f)(int a); // has nested declarator void (f(int a)); // is nested in another declarator
getDeclarator in interface IASTFunctionDefinitionpublic void setDeclarator(IASTFunctionDeclarator declarator)
IASTFunctionDefinitionvoid (f)(int a); // has nested declarator void (f(int a)); // is nested in another declarator
setDeclarator in interface IASTFunctionDefinitionpublic IASTStatement getBody()
IASTFunctionDefinitiongetBody in interface IASTFunctionDefinitionpublic void setBody(IASTStatement statement)
IASTFunctionDefinitionsetBody in interface IASTFunctionDefinitionpublic IScope getScope()
IASTFunctionDefinitiongetScope in interface IASTFunctionDefinitionIScope representing function body.public boolean accept(ASTVisitor action)
IASTNodeASTVisitor.public void replace(IASTNode child, IASTNode other)
replace in interface IASTAmbiguityParent