40package com.jogamp.gluegen.cgram.types;
44import com.jogamp.gluegen.GlueGen;
45import com.jogamp.gluegen.JavaConfiguration;
52 private final HashMap<String, Type> map =
new HashMap<String, Type>();
60 return map.put(name, type);
65 public Type get(
final String name) {
70 final List<Type> res =
new ArrayList<Type>();
71 if( !skipOpaque ||
null == cfg.
typeInfo(s) ) {
73 for(
final Iterator<Map.Entry<String,
Type>> iter = entries.iterator(); iter.hasNext(); ) {
74 final Map.Entry<String,
Type> entry = iter.next();
75 final Type t = entry.getValue();
77 if( !skipOpaque ||
null == cfg.
typeInfo(t) ) {
79 System.err.println(
" tls["+res.size()+
"]: -> "+entry.getKey()+
" -> "+t.
getDebugString());
90 if( tls.size() > 0 ) {
91 final Type res = tls.get(0);
117 public Type remove(
final String name) {
118 return map.remove(name);
129 return map.entrySet();
133 return map.containsKey(key);
137 return map.containsValue(value);
141 return map.isEmpty();
Glue code generator for C functions and data structures.
Parses and provides access to the contents of .cfg files for the JavaEmitter.
TypeInfo typeInfo(Type type)
If this type should be considered opaque, returns the TypeInfo describing the replacement type.
Utility class for recording names of typedefs and structs.
boolean containsKey(final String key)
Set< Map.Entry< String, Type > > entrySet()
List< Type > getEqualSemantics(final Type s, final JavaConfiguration cfg, final boolean skipOpaque)
Type getEqualSemantics1(final Type s, final JavaConfiguration cfg, final boolean skipOpaque)
Type put(final String name, final Type type)
Create a mapping from a type to its name.
Set< String > keySet()
Get all the names that map to Types.
boolean containsValue(final Type value)
Collection< Type > values()
Returns a collection of all the Types in the dictionary that are mapped via typedefs names.
final boolean equalSemantics(final SemanticEqualityOp arg)
Semantic equality test for Types exclusive its given name.
final String getDebugString()