public class XtypeTable extends Xnode
LHS, RHS, UNDEF_DEPTH
Constructor and Description |
---|
XtypeTable(Xnode node)
Element standard ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Xnode type)
Add a new element in the type table.
|
XtypeTable |
cloneNode()
Clone the current element with all its children.
|
java.lang.String |
generateHash(FortranType type)
Generate a unique hash in the current type table.
|
protected Xnode |
get(java.lang.String hash)
Get an element from the type table.
|
FbasicType |
getBasicType(java.lang.String hash)
Get the FbasicType associated with the given hash value.
|
FbasicType |
getBasicType(Xnode node)
Get the FbasicType associated with the node if any.
|
FfunctionType |
getFunctionType(java.lang.String hash)
Get the FfunctionType associated with the given hash value.
|
FfunctionType |
getFunctionType(Xnode node)
Get the FfunctionType associated with the node if any.
|
FstructType |
getStructType(java.lang.String hash)
Get the FstructType associated with the given hash value.
|
FstructType |
getStructType(Xnode node)
Get the FstructType associated with the node if any.
|
boolean |
hasType(java.lang.String hash)
Check if a type is present in the type table
|
boolean |
isBasicType(java.lang.String hash)
Check if the hash correspond to a FbasicType.
|
boolean |
isBasicType(Xnode node)
Check if the node is of type FbasicType.
|
boolean |
isFunctionType(java.lang.String hash)
Check if the hash correspond to a FfunctionType.
|
boolean |
isFunctionType(Xnode node)
Check if the node is of type FfunctionType.
|
boolean |
isStructType(java.lang.String hash)
Check if the hash correspond to a FstructType.
|
boolean |
isStructType(Xnode node)
Check if the hash correspond to a FstructType.
|
int |
size()
Get number of elements in the type table.
|
java.util.Collection<Xnode> |
values()
Returns a Collection view of the values contained in this XtypeTable.
|
ancestor, append, append, body, child, children, cloneRawNode, compareFirstChildValues, compareOptionalValues, compareValues, constructRepresentation, copyAttribute, copyEnhancedInfo, delete, deleteWithSiblings, depth, element, equals, filename, findParentFunction, findParentModule, firstChild, getAttribute, getBooleanAttribute, getType, hasAttribute, hasBody, hashCode, hasSameParentBlock, insert, insert, insertAfter, insertBefore, isDeleted, isDirectSibling, isNestedIn, lastChild, lineNo, matchAll, matchAllAncestor, matchAllAncestor, matchAncestor, matchDescendant, matchDirectDescendant, matchDirectDescendant, matchSeq, matchSibling, nextSibling, opcode, prevSibling, removeAttribute, setAttribute, setBooleanAttribute, setFilename, setLine, setType, setValue, toString, value
public XtypeTable(Xnode node)
node
- Raw node.public boolean isBasicType(Xnode node)
node
- Node to check.public boolean isBasicType(java.lang.String hash)
hash
- Hash of type to check.public boolean isFunctionType(Xnode node)
node
- Node to check.public boolean isFunctionType(java.lang.String hash)
hash
- Hash of type to check.public boolean isStructType(java.lang.String hash)
hash
- Hash of type to check.public boolean isStructType(Xnode node)
node
- Node to check.public int size()
public void add(Xnode type)
type
- The new type to be added.public FbasicType getBasicType(Xnode node)
node
- Node to look for type.public FbasicType getBasicType(java.lang.String hash)
hash
- Hash value to check for.public FfunctionType getFunctionType(Xnode node)
node
- Node to look for type.public FfunctionType getFunctionType(java.lang.String hash)
hash
- Hash value to check for.public FstructType getStructType(Xnode node)
node
- Node to look for type.public FstructType getStructType(java.lang.String hash)
hash
- Hash value to check for.protected Xnode get(java.lang.String hash)
hash
- Hash of type node to be retrieved.public boolean hasType(java.lang.String hash)
hash
- Hash of type node to be checked.public java.lang.String generateHash(FortranType type)
type
- Type to generate the hash.public java.util.Collection<Xnode> values()
public XtypeTable cloneNode()
Xnode