Interface ICPPASTFunctionDeclarator

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

public interface ICPPASTFunctionDeclarator extends IASTStandardFunctionDeclarator, ICPPASTDeclarator
C++ adds a few things to function declarators.
Restriction:
This interface is not intended to be implemented by clients.
Restriction:
This interface is not intended to be extended by clients.
  • Field Details

  • Method Details

    • isConst

      boolean isConst()
      Is this a const method?
    • setConst

      void setConst(boolean value)
      Sets the method to be const or not.
    • isVolatile

      boolean isVolatile()
      Is this a volatile method?
    • setVolatile

      void setVolatile(boolean value)
      Sets the method to be volatile or not.
    • isMutable

      boolean isMutable()
      When used as a lambda declarator, it can be mutable.
      Since:
      5.3
    • setMutable

      void setMutable(boolean value)
      When used as a lambda declarator, it can be mutable.
      Since:
      5.3
    • isConstexpr

      boolean isConstexpr()
      When used as a lambda declarator, it can be constexpr.
      Since:
      7.0
    • setConstexpr

      void setConstexpr(boolean value)
      When used as a lambda declarator, it can be constexpr.
      Since:
      7.0
    • isPureVirtual

      boolean isPureVirtual()
      Is the method pure virtual?
    • setPureVirtual

      void setPureVirtual(boolean isPureVirtual)
      Sets this method to be pure virtual.
    • getRefQualifier

      Returns the ref-qualifier.
      Since:
      5.9
    • setRefQualifier

      void setRefQualifier(ICPPASTFunctionDeclarator.RefQualifier value)
      Sets the ref-qualifier.
      Since:
      5.9
    • 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
    • getNoexceptExpression

      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. See C++11 5.4.1.
      Since:
      5.5
    • getNoexceptEvaluation

      org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation getNoexceptEvaluation()
      Returns the noexcept evaluation, or null if no noexcept specification is present, or or an evaluation representing noexcept(true) in case of an empty exception specification.
      Since:
      6.7
      Restriction:
      This method is not intended to be referenced by clients.
    • setNoexceptExpression

      void setNoexceptExpression(ICPPASTExpression expression)
      Sets the noexcept expression.
      Since:
      5.5
    • getTrailingReturnType

      IASTTypeId getTrailingReturnType()
      Returns the trailing return type as in auto f() -gt; 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
    • 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.

      Calling this method is equivalent to copy(CopyStyle.withoutLocations).

      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
    • 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
      Parameters:
      style - IASTNode.CopyStyle create a copy with or without locations. Please see IASTNode.CopyStyle for restrictions on copies with Locations.
      Since:
      5.3
    • isOverride

      boolean isOverride()
      Returns whether this function is declared override.
      Since:
      5.5
    • isFinal

      boolean isFinal()
      Returns whether this function is declared final.
      Since:
      5.5
    • getVirtSpecifiers

      ICPPASTVirtSpecifier[] getVirtSpecifiers()
      Returns the virt-specifiers of this function.
      Since:
      5.7
    • addVirtSpecifier

      void addVirtSpecifier(ICPPASTVirtSpecifier virtSpecifier)
      Add a virt-specifiers to this function.
      Since:
      5.7
    • setVirtSpecifiers

      void setVirtSpecifiers(ICPPASTVirtSpecifier[] newVirtSpecifiers)
      Set virt-specifiers of this function.
      Since:
      6.6
    • getConstructorChain

      Restriction:
      This method is not intended to be referenced by clients.
    • addConstructorToChain

      @Deprecated void addConstructorToChain(ICPPASTConstructorChainInitializer initializer)
      Restriction:
      This method is not intended to be referenced by clients.
    • setFinal

      @Deprecated void setFinal(boolean isFinal)
      Deprecated.
      Since:
      5.5
      Restriction:
      This method is not intended to be referenced by clients.
    • setOverride

      @Deprecated void setOverride(boolean isOverride)
      Deprecated.
      Since:
      5.5
      Restriction:
      This method is not intended to be referenced by clients.