Class Hierarchy   Compound List   File List   Header Files   Compound Members   File Members  

TypeHelper Class Reference

This class contains methods to manipulate type objects. More...

#include <utils/type_utils.h>

List of all members.


Static Public Members

list<Type*> get_arguments (CProcedureType *proc)
Get the list of arguments for the procedure type proc. More...

bool is_unknown_bound (ArrayType *arr)
bool is_unknown_but_compatible_bound (ArrayType *a1, ArrayType *a2)
bool is_unknown_int (Expression *exp)
bool is_same_qualified (QualifiedType *qt1, QualifiedType *qt2)
bool is_isomorphic_type (Type* t1, Type *t2, TypePairStack *st = NULL)
bool is_isomorphic_bound (ArrayType* a1, ArrayType* a2)
bool is_isomorphic_int (Expression* e1, Expression *e2)
Type* find_isomorphic_type (Type* oldtype, SymbolTable *symtab)
FieldSymbol* lookup_field (const GroupSymbolTable *gatb, const String& fieldname)


Detailed Description

This class contains methods to manipulate type objects.


Member Function Documentation

list<Type *> TypeHelper::get_arguments (CProcedureType * proc) [static]

Get the list of arguments for the procedure type proc.

Returns:
a list of Type*. If proc has no prototype, returns an empty list.

bool TypeHelper::is_unknown_bound (ArrayType * arr) [static]

Returns:
true iff the array type arr has unknown lower and upper bound.

bool TypeHelper::is_unknown_but_compatible_bound (ArrayType * a1, ArrayType * a2) [static]

Returns:
true iff a1 has unknown bounds but still compatible with a2

bool TypeHelper::is_unknown_int (Expression * exp) [static]

Returns:
true if exp describes an undetermined integer.

bool TypeHelper::is_same_qualified (QualifiedType * qt1, QualifiedType * qt2) [static]

Returns:
true iff qt1 and qt2 have the same set of qualifications.

bool TypeHelper::is_isomorphic_type (Type * t1, Type * t2, TypePairStack * st = NULL) [static]

Returns:
true iff t1 and t2 are isomorphic structurally.

bool TypeHelper::is_isomorphic_bound (ArrayType * a1, ArrayType * a2) [static]

Returns:
true if the upper- and lower-bounds of a1 and a2 are isomorphic.

bool TypeHelper::is_isomorphic_int (Expression * e1, Expression * e2) [static]

Returns:
true if e1 and e2 describes the same integer constant.

Type * TypeHelper::find_isomorphic_type (Type * oldtype, SymbolTable * symtab) [static]

Returns:
a Type* from symtab that is isomorphic with t1. Return NULL if symtab contains no such type object.

FieldSymbol * TypeHelper::lookup_field (const GroupSymbolTable * gatb, const String & fieldname) [static]

Returns:
the FieldSymbol from gtab with name fieldname. return NULL if not found.

The documentation for this class was generated from the following files:
Generated at Wed Apr 25 17:35:08 2001 for NCI SUIF by doxygen  written by Dimitri van Heesch, © 1997-1999