com.jogamp.gluegen.cgram.types

## Class FunctionSymbol

- java.lang.Object
- - com.jogamp.gluegen.cgram.types.FunctionSymbol

-     public class FunctionSymbol
      extends Object

  Describes a function symbol, which includes the name and type. Since we are currently only concerned with processing functions this is the only symbol type, though plausibly more types should be added and a true symbol table constructed during parsing.

  Note: Since C does not support method-overloading polymorphism like C++ or Java, we ignore the `FunctionType` attribute in `equals(Object)` and `hashCode()`.
  Hence we assume all method occurrences w/ same name are of equal or compatible type.
  Deep comparison can be performed via `isCompletelyEqual(Object o)`;

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FunctionSymbol(String name, FunctionType type)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addArgument(Type argumentType, String argumentName)` Add an argument's name and type.
    `boolean` | `equals(Object arg)`
    `String` | `getArgumentName(int i)` Returns the name of the ith argument.
    `Type` | `getArgumentType(int i)` Returns the type of the ith argument.
    `String` | `getName()`
    `int` | `getNumArguments()`
    `Type` | `getReturnType()` Returns the return type of this function.
    `FunctionType` | `getType()` Returns the type of this function.
    `int` | `hashCode()`
    `boolean` | `isCompletelyEqual(Object arg)` Compares the function type as well, since `equals(Object)` and `hashCode()` won't.
    `String` | `toString()`
    `String` | `toString(boolean emitNativeTag)` Helper routine for emitting native javadoc tags

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### FunctionSymbol

          public FunctionSymbol(String name,
                        FunctionType type)

  - ### Method Detail

    - #### getName

          public String getName()

    - #### getType

          public FunctionType getType()

      Returns the type of this function. Do not add arguments to it directly; use addArgument instead.

    - #### getReturnType

          public Type getReturnType()

      Returns the return type of this function.

    - #### getNumArguments

          public int getNumArguments()

    - #### getArgumentName

          public String getArgumentName(int i)

      Returns the name of the ith argument. May return null if no argument names were available during parsing.

    - #### getArgumentType

          public Type getArgumentType(int i)

      Returns the type of the ith argument.

    - #### addArgument

          public void addArgument(Type argumentType,
                         String argumentName)

      Add an argument's name and type. Use null for unknown argument names.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### toString

          public String toString(boolean emitNativeTag)

      Helper routine for emitting native javadoc tags

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object arg)

      Overrides:
        `equals` in class `Object`

    - #### isCompletelyEqual

          public boolean isCompletelyEqual(Object arg)

      Compares the function type as well, since `equals(Object)` and `hashCode()` won't.