comma::Type Class Reference

#include <Type.h>

Inheritance diagram for comma::Type:
Inheritance graph
[legend]
Collaboration diagram for comma::Type:
Collaboration graph
[legend]

List of all members.

Public Types

enum  Classification {
  CLASS_Scalar, CLASS_Discrete, CLASS_Enum, CLASS_Integer,
  CLASS_Composite, CLASS_Array, CLASS_String, CLASS_Access,
  CLASS_Record
}

Public Member Functions

virtual ~Type ()
bool memberOf (Classification ID) const
 Returns true if this type is a member of the given classification.
bool isScalarType () const
 Returns true if this type denotes a scalar type.
bool isDiscreteType () const
 Returns true if this type denotes a discrete type.
bool isIntegerType () const
 Returns true if this type denotes an integer type.
bool isEnumType () const
 Returns true if this type denotes an enumeration type.
bool isCompositeType () const
 Returns true if this type denotes a composite type.
bool isArrayType () const
 Returns true if this type denotes an array type.
bool isRecordType () const
 Returns true if this type denotes a record type.
bool isStringType () const
 Returns true if this type denotes a string type.
bool isAccessType () const
 Returns true if this type denotes an access type.
bool isFatAccessType () const
 Returns true if this type denotes a fat access type.
bool isThinAccessType () const
 Returns true if this type denotes a thin access type.
bool isUniversalType () const
 Returns true if this is a universal type.
bool isUniversalIntegerType () const
 Returns true if this is the universal integer type.
bool isUniversalAccessType () const
 Returns true if this is the universal access type.
bool isUniversalFixedType () const
 Returns true if this is the universal fixed type.
bool isUniversalRealType () const
 Returns true if this is the universal real type.
bool isUniversalTypeOf (const Type *type) const
ArrayTypegetAsArrayType ()
IntegerTypegetAsIntegerType ()
EnumerationTypegetAsEnumType ()
bool involvesPercent () const
bool isIndefiniteType () const
 Returns true if this is an indenfinite type.
bool isDefiniteType () const
 Returns true if this is a definite type.

Static Public Member Functions

static bool classof (const Type *node)
 Support isa and dyn_cast.
static bool classof (const Ast *node)

Protected Member Functions

 Type (AstKind kind)

Detailed Description

Definition at line 28 of file Type.h.


Member Enumeration Documentation

The following enumeration lists the "interesting" language-defined classes.

Enumerator:
CLASS_Scalar 
CLASS_Discrete 
CLASS_Enum 
CLASS_Integer 
CLASS_Composite 
CLASS_Array 
CLASS_String 
CLASS_Access 
CLASS_Record 

Definition at line 35 of file Type.h.


Constructor & Destructor Documentation

virtual comma::Type::~Type (  )  [inline, virtual]

Definition at line 31 of file Type.h.

comma::Type::Type ( AstKind  kind  )  [inline, protected]

Definition at line 132 of file Type.h.


Member Function Documentation

static bool comma::Type::classof ( const Ast node  )  [inline, static]
static bool comma::Type::classof ( const Type node  )  [inline, static]
ArrayType * Type::getAsArrayType (  ) 

Definition at line 163 of file Type.cpp.

EnumerationType * Type::getAsEnumType (  ) 

Definition at line 173 of file Type.cpp.

IntegerType * Type::getAsIntegerType (  ) 

Definition at line 168 of file Type.cpp.

bool Type::involvesPercent (  )  const

Returns true if this type involves a percent node.

More precisely, this method returns true if the node itself denotes percent, or if this is a composite, parameterized domain, or subroutine type with a component type which involves percent.

Definition at line 178 of file Type.cpp.

bool Type::isAccessType (  )  const

Returns true if this type denotes an access type.

Definition at line 99 of file Type.cpp.

bool Type::isArrayType (  )  const

Returns true if this type denotes an array type.

Definition at line 79 of file Type.cpp.

bool Type::isCompositeType (  )  const

Returns true if this type denotes a composite type.

Definition at line 74 of file Type.cpp.

bool comma::Type::isDefiniteType (  )  const [inline]

Returns true if this is a definite type.

This is the inverse of isIndefiniteType. The size of such types are statically known.

Definition at line 124 of file Type.h.

bool Type::isDiscreteType (  )  const

Returns true if this type denotes a discrete type.

Definition at line 59 of file Type.cpp.

bool Type::isEnumType (  )  const

Returns true if this type denotes an enumeration type.

Definition at line 69 of file Type.cpp.

bool Type::isFatAccessType (  )  const

Returns true if this type denotes a fat access type.

Definition at line 104 of file Type.cpp.

bool Type::isIndefiniteType (  )  const

Returns true if this is an indenfinite type.

An indefinite type is a type whose size is unknown at compile time. Currently, the only example of an indefinite type in Comma is an unconstrained array type.

Definition at line 223 of file Type.cpp.

bool Type::isIntegerType (  )  const

Returns true if this type denotes an integer type.

Definition at line 64 of file Type.cpp.

bool Type::isRecordType (  )  const

Returns true if this type denotes a record type.

Definition at line 84 of file Type.cpp.

bool Type::isScalarType (  )  const

Returns true if this type denotes a scalar type.

Definition at line 53 of file Type.cpp.

bool Type::isStringType (  )  const

Returns true if this type denotes a string type.

Definition at line 89 of file Type.cpp.

bool Type::isThinAccessType (  )  const

Returns true if this type denotes a thin access type.

Definition at line 111 of file Type.cpp.

bool Type::isUniversalAccessType (  )  const

Returns true if this is the universal access type.

Reimplemented in comma::UniversalType.

Definition at line 130 of file Type.cpp.

bool Type::isUniversalFixedType (  )  const

Returns true if this is the universal fixed type.

Reimplemented in comma::UniversalType.

Definition at line 137 of file Type.cpp.

bool Type::isUniversalIntegerType (  )  const

Returns true if this is the universal integer type.

Reimplemented in comma::UniversalType.

Definition at line 123 of file Type.cpp.

bool Type::isUniversalRealType (  )  const

Returns true if this is the universal real type.

Reimplemented in comma::UniversalType.

Definition at line 144 of file Type.cpp.

bool Type::isUniversalType (  )  const

Returns true if this is a universal type.

Definition at line 118 of file Type.cpp.

bool Type::isUniversalTypeOf ( const Type type  )  const

Returns true if this is a universal type which contains (or covers) the given type.

Definition at line 151 of file Type.cpp.

bool Type::memberOf ( Classification  ID  )  const

Returns true if this type is a member of the given classification.

Definition at line 26 of file Type.cpp.


The documentation for this class was generated from the following files:

Generated on 1 Feb 2010 for Comma by  doxygen 1.6.1