GlueGen: com.jogamp.gluegen.cgram.types.FunctionSymbol Class Reference

GlueGen v2.6.0-rc-20250712 GlueGen, Native Binding Generator for Java™ (public API).

Public Member Functions | Static Public Member Functions | List of all members
com.jogamp.gluegen.cgram.types.FunctionSymbol Class Reference

Describes a function symbol, which includes the name and type. More...

Inheritance diagram for com.jogamp.gluegen.cgram.types.FunctionSymbol:
Collaboration diagram for com.jogamp.gluegen.cgram.types.FunctionSymbol:

## Public Member Functions

| FunctionSymbol (final String name, final FunctionType type)
| FunctionSymbol (final String name, final FunctionType type, final ASTLocusTag locus)
ASTLocusTag | getASTLocusTag ()
| Returns this instance's `ASTLocusTag`, if available, otherwise returns `null`. More...
FunctionType | getType ()
| Returns the type of this function. More...
Type | getReturnType ()
| Returns the return type of this function. More...
int | getNumArguments ()
String | getArgumentName (final int i)
| Returns the name of the ith argument. More...
Type | getArgumentType (final int i)
| Returns the type of the ith argument. More...
void | addArgument (final Type argumentType, final String argumentName)
| Add an argument's name and type. More...
String | toString ()
String | toString (final boolean emitNativeTag)
| Helper routine for emitting native javadoc tags. More...
int | hashCode ()
boolean | equals (final Object arg)
int | hashCodeSemantics ()
| Semantic hashcode for Types exclusive its given `name`. More...
final boolean | equalSemantics (final SemanticEqualityOp arg)
| Semantic equality test for Types exclusive its given `name`. More...
boolean | exactlyEqual (final Object arg)
| Compares the function type as well, since `equals(Object)` and `hashCode()` won't. More...
Public Member Functions inherited from com.jogamp.gluegen.cgram.types.AliasedSymbol.AliasedSymbolImpl
| AliasedSymbolImpl (final String origName)
| AliasedSymbolImpl (final AliasedSymbolImpl o)
void | rename (final String newName)
| Rename this symbol with the given `newName` if not equal `current-name`. More...
void | addAliasedName (final String origName)
| Add the given `origName` to the list of `aliases` if not equal `current-name`. More...
boolean | hasAliases ()
| Returns `true` if this symbol has aliases, i.e. More...
Set< String > | getAliasedNames ()
| Return all aliases for this symbol, i.e. More...
String | getOrigName ()
| Return the original-name as set at creation. More...
String | getName ()
| Return the current-name, which is the last `renamed-name` if issued, or the `original-name`. More...
String | getAliasedString ()
| Return this object's `toString()` wrapped w/ the `current-name` and all `aliases`. More...
void | rename (final String newName)
| Rename this symbol with the given `newName` if not equal `current-name`. More...
void | addAliasedName (final String origName)
| Add the given `origName` to the list of `aliases` if not equal `current-name`. More...
boolean | hasAliases ()
| Returns `true` if this symbol has aliases, i.e. More...
Set< String > | getAliasedNames ()
| Return all aliases for this symbol, i.e. More...
String | getOrigName ()
| Return the original-name as set at creation. More...
String | getName ()
| Return the current-name, which is the last `renamed-name` if issued, or the `original-name`. More...
String | getAliasedString ()
| Return this object's `toString()` wrapped w/ the `current-name` and all `aliases`. More...
int | hashCodeSemantics ()
| Semantic hashcode for Types exclusive its given `name`. More...
boolean | equalSemantics (final SemanticEqualityOp arg)
| Semantic equality test for Types exclusive its given `name`. More...
ASTLocusTag | getASTLocusTag ()
| Returns this instance's `ASTLocusTag`, if available, otherwise returns `null`. More...

## Static Public Member Functions

static FunctionSymbol | cloneWithDeepAliases (final FunctionSymbol o)
| Shallow'ish copy, only aliased names are re-created. More...
static boolean | containsExactly (final List< FunctionSymbol > l, final FunctionSymbol s)
static int | exactIndexOf (final List< FunctionSymbol > l, final FunctionSymbol s)

## Detailed Description

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)`;

Definition at line 63 of file FunctionSymbol.java.

## Constructor & Destructor Documentation

## ◆ FunctionSymbol() [1/2]

com.jogamp.gluegen.cgram.types.FunctionSymbol.FunctionSymbol | ( | final String | name,
|  | final FunctionType | type
| ) |  |

Definition at line 68 of file FunctionSymbol.java.

Here is the caller graph for this function:

## ◆ FunctionSymbol() [2/2]

com.jogamp.gluegen.cgram.types.FunctionSymbol.FunctionSymbol | ( | final String | name,
|  | final FunctionType | type,
|  | final ASTLocusTag | locus
| ) |  |

Definition at line 72 of file FunctionSymbol.java.

Here is the call graph for this function:

## Member Function Documentation

## ◆ addArgument()

void com.jogamp.gluegen.cgram.types.FunctionSymbol.addArgument | ( | final Type | argumentType,
|  | final String | argumentName
| ) |  |

Add an argument's name and type.

Use null for unknown argument names.

Definition at line 121 of file FunctionSymbol.java.

Here is the call graph for this function:

## ◆ cloneWithDeepAliases()

static FunctionSymbol com.jogamp.gluegen.cgram.types.FunctionSymbol.cloneWithDeepAliases | ( | final FunctionSymbol | o | ) |

static

Shallow'ish copy, only aliased names are re-created.

Definition at line 80 of file FunctionSymbol.java.

Here is the call graph for this function:

## ◆ containsExactly()

static boolean com.jogamp.gluegen.cgram.types.FunctionSymbol.containsExactly | ( | final List< FunctionSymbol > | l,
|  | final FunctionSymbol | s
| ) |  |

static

Definition at line 175 of file FunctionSymbol.java.

Here is the call graph for this function:

## ◆ equals()

boolean com.jogamp.gluegen.cgram.types.FunctionSymbol.equals | ( | final Object | arg | ) |

Definition at line 144 of file FunctionSymbol.java.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ equalSemantics()

final boolean com.jogamp.gluegen.cgram.types.FunctionSymbol.equalSemantics | ( | final SemanticEqualityOp | arg | ) |

Semantic equality test for Types exclusive its given `name`.

See also
  hashCodeSemantics()

Implements com.jogamp.gluegen.cgram.types.TypeComparator.SemanticEqualityOp.

Definition at line 163 of file FunctionSymbol.java.

Here is the call graph for this function:

## ◆ exactIndexOf()

static int com.jogamp.gluegen.cgram.types.FunctionSymbol.exactIndexOf | ( | final List< FunctionSymbol > | l,
|  | final FunctionSymbol | s
| ) |  |

static

Definition at line 179 of file FunctionSymbol.java.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ exactlyEqual()

boolean com.jogamp.gluegen.cgram.types.FunctionSymbol.exactlyEqual | ( | final Object | arg | ) |

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

Definition at line 195 of file FunctionSymbol.java.

Here is the call graph for this function:

## ◆ getArgumentName()

String com.jogamp.gluegen.cgram.types.FunctionSymbol.getArgumentName | ( | final int | i | ) |

Returns the name of the ith argument.

May return null if no argument names were available during parsing.

Definition at line 110 of file FunctionSymbol.java.

Here is the call graph for this function:

## ◆ getArgumentType()

Type com.jogamp.gluegen.cgram.types.FunctionSymbol.getArgumentType | ( | final int | i | ) |

Returns the type of the ith argument.

Definition at line 115 of file FunctionSymbol.java.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ getASTLocusTag()

ASTLocusTag com.jogamp.gluegen.cgram.types.FunctionSymbol.getASTLocusTag | ( |  | ) |

Returns this instance's `ASTLocusTag`, if available, otherwise returns `null`.

Implements com.jogamp.gluegen.ASTLocusTag.ASTLocusTagProvider.

Definition at line 91 of file FunctionSymbol.java.

Here is the caller graph for this function:

## ◆ getNumArguments()

int com.jogamp.gluegen.cgram.types.FunctionSymbol.getNumArguments | ( |  | ) |

Definition at line 104 of file FunctionSymbol.java.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ getReturnType()

Type com.jogamp.gluegen.cgram.types.FunctionSymbol.getReturnType | ( |  | ) |

Returns the return type of this function.

Definition at line 100 of file FunctionSymbol.java.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ getType()

FunctionType com.jogamp.gluegen.cgram.types.FunctionSymbol.getType | ( |  | ) |

Returns the type of this function.

Do not add arguments to it directly; use addArgument instead.

Definition at line 95 of file FunctionSymbol.java.

Here is the caller graph for this function:

## ◆ hashCode()

int com.jogamp.gluegen.cgram.types.FunctionSymbol.hashCode | ( |  | ) |

Definition at line 136 of file FunctionSymbol.java.

Here is the call graph for this function:

## ◆ hashCodeSemantics()

int com.jogamp.gluegen.cgram.types.FunctionSymbol.hashCodeSemantics | ( |  | ) |

Semantic hashcode for Types exclusive its given `name`.

See also
  equalSemantics(SemanticEqualityOp)

Implements com.jogamp.gluegen.cgram.types.TypeComparator.SemanticEqualityOp.

Definition at line 159 of file FunctionSymbol.java.

Here is the call graph for this function:

## ◆ toString() [1/2]

String com.jogamp.gluegen.cgram.types.FunctionSymbol.toString | ( |  | ) |

Definition at line 126 of file FunctionSymbol.java.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ toString() [2/2]

String com.jogamp.gluegen.cgram.types.FunctionSymbol.toString | ( | final boolean | emitNativeTag | ) |

Helper routine for emitting native javadoc tags.

Definition at line 131 of file FunctionSymbol.java.

Here is the call graph for this function:

The documentation for this class was generated from the following file:

- src/java/com/jogamp/gluegen/cgram/types/FunctionSymbol.java