|
GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java (public API).
|
Describes a function symbol, which includes the name and type. More...
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) |
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.
| com.jogamp.gluegen.cgram.types.FunctionSymbol.FunctionSymbol | ( | final String | name, |
| final FunctionType | type | ||
| ) |
| com.jogamp.gluegen.cgram.types.FunctionSymbol.FunctionSymbol | ( | final String | name, |
| final FunctionType | type, | ||
| final ASTLocusTag | locus | ||
| ) |
| 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.
|
static |
Shallow'ish copy, only aliased names are re-created.
Definition at line 80 of file FunctionSymbol.java.
|
static |
| boolean com.jogamp.gluegen.cgram.types.FunctionSymbol.equals | ( | final Object | arg | ) |
Definition at line 144 of file FunctionSymbol.java.
| final boolean com.jogamp.gluegen.cgram.types.FunctionSymbol.equalSemantics | ( | final SemanticEqualityOp | arg | ) |
Semantic equality test for Types exclusive its given name.
Implements com.jogamp.gluegen.cgram.types.TypeComparator.SemanticEqualityOp.
Definition at line 163 of file FunctionSymbol.java.
|
static |
Definition at line 179 of file FunctionSymbol.java.
| 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.
| 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.
| 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.
| 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.
| int com.jogamp.gluegen.cgram.types.FunctionSymbol.getNumArguments | ( | ) |
Definition at line 104 of file FunctionSymbol.java.
| Type com.jogamp.gluegen.cgram.types.FunctionSymbol.getReturnType | ( | ) |
Returns the return type of this function.
Definition at line 100 of file FunctionSymbol.java.
| 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.
| int com.jogamp.gluegen.cgram.types.FunctionSymbol.hashCode | ( | ) |
| int com.jogamp.gluegen.cgram.types.FunctionSymbol.hashCodeSemantics | ( | ) |
Semantic hashcode for Types exclusive its given name.
Implements com.jogamp.gluegen.cgram.types.TypeComparator.SemanticEqualityOp.
Definition at line 159 of file FunctionSymbol.java.
| String com.jogamp.gluegen.cgram.types.FunctionSymbol.toString | ( | ) |
Definition at line 126 of file FunctionSymbol.java.
| 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.