com.veromodo.tempo.sem.type
Class TypeFactory

java.lang.Object
  extended by com.veromodo.tempo.sem.type.TypeFactory

public class TypeFactory
extends java.lang.Object

For hashing, comparision, and vocabulary loading purposes it is useful if there is only one instance of each base type. The TypeFactory is used by the semantic enviorment to ensure that this is the case.

Author:
Carleton

Constructor Summary
TypeFactory()
           
 
Method Summary
 TypeTuple close(TypeTuple t)
          tracks existing tuple types ensures duplicate instances of tuple types do not exist thus helping short curkit tuple comparison if the given tuple already exists in the hashtable, the orginal tuple is returned instead of the new tuple This method should be called after each new tuple type is created.
 TypeAugmentedReal getAugmentedReal()
           
 TypeBool getBool()
           
 TypeChar getChar()
           
 TypeDiscreteReal getDiscreteReal()
           
 TypeError getError()
           
 TypeFloat getFloat()
           
 TypeVariable getInfer()
           
 TypeInt getInt()
           
 TypeInt32 getInt32()
           
 TypeMeta getMeta()
           
 TypeNat getNat()
           
 TypeReal getReal()
           
 TypeVoid getVoid()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeFactory

public TypeFactory()
Method Detail

getVoid

public TypeVoid getVoid()

getBool

public TypeBool getBool()

getChar

public TypeChar getChar()

getInt

public TypeInt getInt()

getInt32

public TypeInt32 getInt32()

getNat

public TypeNat getNat()

getFloat

public TypeFloat getFloat()

getReal

public TypeReal getReal()

getDiscreteReal

public TypeDiscreteReal getDiscreteReal()

getInfer

public TypeVariable getInfer()

getMeta

public TypeMeta getMeta()

getError

public TypeError getError()

getAugmentedReal

public TypeAugmentedReal getAugmentedReal()

close

public TypeTuple close(TypeTuple t)
tracks existing tuple types ensures duplicate instances of tuple types do not exist thus helping short curkit tuple comparison if the given tuple already exists in the hashtable, the orginal tuple is returned instead of the new tuple This method should be called after each new tuple type is created. Generally the GenericizeType will take care of calling this method.

Parameters:
t - tuple type to check for
Returns:
an equivalent tuple