cfront::BasicType Class Reference

#include <BasicType.hpp>

Inheritance diagram for cfront::BasicType:

Inheritance graph
[legend]
Collaboration diagram for cfront::BasicType:

Collaboration graph
[legend]

Public Types

enum  PrimitiveTag {
  NONE, BOOL, CHAR, SCHAR,
  UCHAR, SSHORT, USHORT, SINT,
  UINT, SLONG, ULONG, SLLONG,
  ULLONG, FLOAT, DOUBLE, LDOUBLE,
  VOID, VA_LIST
}

Public Member Functions

 BasicType (PrimitiveTag primitiveTag, QualFlags qualFlags=0)
 BasicType (const BasicType &other)
virtual ~BasicType ()
virtual BasicTypeclone () const
virtual bool isCompatibleType (const Type *other) const
virtual bool isScalarType () const
virtual bool isArithmeticType () const
virtual bool isIntegerType () const
virtual bool isVoidType () const
virtual size_t getSize (const TargetInfo &targetInfo) const
virtual size_t getAlign (const TargetInfo &targetInfo) const
PrimitiveTag getPrimitiveTag () const
QualFlags getQualFlags () const
void setQualFlags (QualFlags qf)

Static Public Member Functions

static bool isArithmeticTypeTag (PrimitiveTag t)
static bool isIntegerTypeTag (PrimitiveTag t)

Protected Member Functions

TargetInfo::Type getTargetType (PrimitiveTag pt) const

Protected Attributes

PrimitiveTag primitiveTag_
QualFlags qualFlags_

Detailed Description

This class represents the type that specified by the simple type specifiers such as 'void', 'char', 'int', 'float', 'Bool_'...

Definition at line 46 of file BasicType.hpp.


Member Enumeration Documentation

Enumerator:
NONE 
BOOL 
CHAR 
SCHAR 
UCHAR 
SSHORT 
USHORT 
SINT 
UINT 
SLONG 
ULONG 
SLLONG 
ULLONG 
FLOAT 
DOUBLE 
LDOUBLE 
VOID 
VA_LIST 

Definition at line 49 of file BasicType.hpp.


Constructor & Destructor Documentation

cfront::BasicType::BasicType ( PrimitiveTag  primitiveTag,
QualFlags  qualFlags = 0 
) [inline]

Definition at line 80 of file BasicType.hpp.

Referenced by clone().

cfront::BasicType::BasicType ( const BasicType other  )  [inline]

Definition at line 82 of file BasicType.hpp.

virtual cfront::BasicType::~BasicType (  )  [inline, virtual]

Definition at line 86 of file BasicType.hpp.


Member Function Documentation

static bool cfront::BasicType::isArithmeticTypeTag ( PrimitiveTag  t  )  [inline, static]

Definition at line 70 of file BasicType.hpp.

References BOOL, and LDOUBLE.

Referenced by cfront::CAnalyzer::getArithmeticTypeTag(), and isArithmeticType().

static bool cfront::BasicType::isIntegerTypeTag ( PrimitiveTag  t  )  [inline, static]

Definition at line 75 of file BasicType.hpp.

References BOOL, and ULLONG.

Referenced by cfront::CAnalyzer::isConstantZeroValue(), and isIntegerType().

virtual BasicType* cfront::BasicType::clone (  )  const [inline, virtual]

Return the copy of self.

Implements cfront::Type.

Definition at line 88 of file BasicType.hpp.

References BasicType().

virtual bool cfront::BasicType::isCompatibleType ( const Type other  )  const [inline, virtual]

Tests whether this type is compatible to the given one.

Implements cfront::Type.

Definition at line 93 of file BasicType.hpp.

References primitiveTag_.

virtual bool cfront::BasicType::isScalarType (  )  const [inline, virtual]

Reimplemented from cfront::Type.

Definition at line 100 of file BasicType.hpp.

References isArithmeticType().

virtual bool cfront::BasicType::isArithmeticType (  )  const [inline, virtual]

Reimplemented from cfront::Type.

Definition at line 105 of file BasicType.hpp.

References isArithmeticTypeTag(), and primitiveTag_.

Referenced by isScalarType().

virtual bool cfront::BasicType::isIntegerType (  )  const [inline, virtual]

Reimplemented from cfront::Type.

Definition at line 110 of file BasicType.hpp.

References isIntegerTypeTag(), and primitiveTag_.

virtual bool cfront::BasicType::isVoidType (  )  const [inline, virtual]

Tests whether this type is 'void' type.

Reimplemented from cfront::Type.

Definition at line 115 of file BasicType.hpp.

References primitiveTag_, and VOID.

virtual size_t cfront::BasicType::getSize ( const TargetInfo targetInfo  )  const [inline, virtual]

Implements cfront::Type.

Definition at line 120 of file BasicType.hpp.

References cfront::TargetInfo::getSize(), getTargetType(), and primitiveTag_.

virtual size_t cfront::BasicType::getAlign ( const TargetInfo targetInfo  )  const [inline, virtual]

Implements cfront::Type.

Definition at line 126 of file BasicType.hpp.

References cfront::TargetInfo::getAlign(), getTargetType(), and primitiveTag_.

PrimitiveTag cfront::BasicType::getPrimitiveTag (  )  const [inline]

QualFlags cfront::BasicType::getQualFlags (  )  const [inline]

Definition at line 137 of file BasicType.hpp.

References qualFlags_.

Referenced by cfront::CAnalyzer::checkAssignment().

void cfront::BasicType::setQualFlags ( QualFlags  qf  )  [inline]

Definition at line 142 of file BasicType.hpp.

References qualFlags_.

TargetInfo::Type cfront::BasicType::getTargetType ( PrimitiveTag  pt  )  const [inline, protected]


Field Documentation

Definition at line 159 of file BasicType.hpp.

Referenced by getQualFlags(), and setQualFlags().


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

Generated on Tue Mar 31 20:19:53 2009 for ctrump by  doxygen 1.5.6