Class DemangledFunctionIndirect

  • All Implemented Interfaces:
    ParameterReceiver

    public class DemangledFunctionIndirect
    extends DemangledDataType
    implements ParameterReceiver
    A class to represent a demangled function indirect. A function indirect is similar to a function pointer or a function reference except that it does not have the start (*) for a pointer or ampersand (&) for a reference, but is still an indirect definition (not a regular function definition). The function indirect is prevalent in the Microsoft model, if not other models.
    • Field Detail

      • callingConvention

        protected java.lang.String callingConvention
      • modifier

        protected java.lang.String modifier
      • isConstPointer

        protected boolean isConstPointer
    • Constructor Detail

      • DemangledFunctionIndirect

        public DemangledFunctionIndirect()
        Constructs a new demangled function definition.
    • Method Detail

      • getReturnType

        public DemangledDataType getReturnType()
        Returns the return type.
        Returns:
        the return type
      • setReturnType

        public void setReturnType​(DemangledDataType returnType)
        Sets the return type.
        Parameters:
        returnType - the return type
      • getCallingConvention

        public java.lang.String getCallingConvention()
        Returns the calling convention or null, if unspecified.
        Returns:
        the calling convention or null, if unspecified
      • setCallingConvention

        public void setCallingConvention​(java.lang.String callingConvention)
        Sets the function calling convention. For example, "__cdecl".
        Parameters:
        callingConvention - the function calling convention
      • setModifier

        public void setModifier​(java.lang.String modifier)
        Sets the function __ modifier. For example, "namespace::".
        Parameters:
        modifier - the function modifier
      • isConstPointer

        public boolean isConstPointer()
      • setConstPointer

        public void setConstPointer()
      • isTrailingPointer64

        public boolean isTrailingPointer64()
      • setTrailingPointer64

        public void setTrailingPointer64()
      • isTrailingUnaligned

        public boolean isTrailingUnaligned()
      • setTrailingUnaligned

        public void setTrailingUnaligned()
      • isTrailingRestrict

        public boolean isTrailingRestrict()
      • setTrailingRestrict

        public void setTrailingRestrict()
      • setDisplayFunctionPointerParens

        public void setDisplayFunctionPointerParens​(boolean b)
      • addParameter

        public void addParameter​(DemangledDataType parameter)
        Adds a parameters to the end of the parameter list for this demangled function.
        Specified by:
        addParameter in interface ParameterReceiver
        Parameters:
        parameter - the new parameter to add
      • getParameters

        public java.util.List<DemangledDataType> getParameters()
        Returns a list of the parameters for this demangled functions.
        Specified by:
        getParameters in interface ParameterReceiver
        Returns:
        a list of the parameters for this demangled functions
      • toSignature

        public java.lang.String toSignature​(java.lang.String name)
      • getDataType

        public DataType getDataType​(DataTypeManager dataTypeManager)
        Description copied from class: DemangledDataType
        Converts this demangled datatype into the corresponding Ghidra datatype.
        Overrides:
        getDataType in class DemangledDataType
        Parameters:
        dataTypeManager - the data type manager to be searched and whose data organization should be used
        Returns:
        the Ghidra datatype corresponding to the demangled datatype