ArrayType Class Reference

#include <include/type.h>

Inheritance diagram for ArrayType:

Type List of all members.

Detailed Description

Definition at line 420 of file type.h.

Public Member Functions

 ArrayType (Type *p)
 ArrayType (Type *p, unsigned length)
virtual Type * clone () const
void fixBaseType (Type *b)
Type * getBaseType ()
virtual const char * getCtype (bool final=false) const
unsigned getLength ()
virtual unsigned getSize () const
virtual bool isArray () const
virtual bool isCompatible (Type *other, bool all)
virtual bool isCompatibleWith (Type *other, bool all=false)
bool isUnbounded () const
virtual Exp * match (Type *pattern)
virtual Type * meetWith (Type *other, bool &ch, bool bHighestPtr)
virtual bool operator< (const Type &other) const
virtual bool operator== (const Type &other) const
void setBaseType (Type *b)
void setLength (unsigned n)
virtual ~ArrayType ()

Protected Member Functions

 ArrayType ()

Private Attributes

Type * base_type
unsigned length

Friends

class XMLProgParser


Constructor & Destructor Documentation

ArrayType::ArrayType (  Type *  p,
unsigned  length
) 
 

Definition at line 96 of file type.cpp.

ArrayType::ArrayType (  Type *  p  ) 
 

Definition at line 105 of file type.cpp.

ArrayType::~ArrayType (   )  [virtual]
 

Definition at line 155 of file type.cpp.

ArrayType::ArrayType (   )  [inline, protected]
 

Definition at line 454 of file type.h.

Referenced by clone().


Member Function Documentation

Type * ArrayType::clone (   )  const [virtual]
 

Implements Type.

Definition at line 210 of file type.cpp.

References ArrayType(), base_type, Type::clone(), and length.

Referenced by UserProc::mapExpressionsToLocals().

void ArrayType::fixBaseType (  Type *  b  ) 
 

Definition at line 1037 of file type.cpp.

References Type::asArray(), base_type, fixBaseType(), Type::isArray(), and NULL.

Referenced by fixBaseType().

Type* ArrayType::getBaseType (   )  [inline]
 

Definition at line 430 of file type.h.

References base_type.

Referenced by CHLLCode::appendType(), CHLLCode::appendTypeIdent(), Type::compForAddress(), and Type::isCString().

const char * ArrayType::getCtype (  bool  final = false  )  const [virtual]
 

Implements Type.

Definition at line 818 of file type.cpp.

References base_type, Type::getCtype(), isUnbounded(), and length.

unsigned ArrayType::getLength (   )  [inline]
 

Definition at line 433 of file type.h.

References length.

Referenced by meetWith().

unsigned ArrayType::getSize (   )  const [virtual]
 

Implements Type.

Definition at line 273 of file type.cpp.

References base_type, Type::getSize(), and length.

virtual bool ArrayType::isArray (   )  const [inline, virtual]
 

Reimplemented from Type.

Definition at line 429 of file type.h.

bool ArrayType::isCompatible (  Type *  other,
bool  all
)  [virtual]
 

Implements Type.

Definition at line 1412 of file dfa.cpp.

References Type::asArray(), base_type, Type::isCompatibleWith(), Type::resolvesToArray(), Type::resolvesToUnion(), and Type::resolvesToVoid().

Referenced by isCompatibleWith().

virtual bool ArrayType::isCompatibleWith (  Type *  other,
bool  all = false
)  [inline, virtual]
 

Reimplemented from Type.

Definition at line 449 of file type.h.

References isCompatible().

bool ArrayType::isUnbounded (   )  const
 

Definition at line 109 of file type.cpp.

References length, and NO_BOUND.

Referenced by getCtype(), and UserProc::mapExpressionsToLocals().

Exp * ArrayType::match (  Type *  pattern  )  [virtual]
 

Reimplemented from Type.

Definition at line 699 of file type.cpp.

References base_type, Type::isArray(), and Type::match().

Type * ArrayType::meetWith (  Type *  other,
bool &  ch,
bool  bHighestPtr
)  [virtual]
 

Implements Type.

Definition at line 512 of file dfa.cpp.

References Type::asArray(), base_type, Type::clone(), getLength(), Type::meetWith(), Type::resolvesToArray(), Type::resolvesToVoid(), and setBaseType().

bool ArrayType::operator< (  const Type &  other  )  const [virtual]
 

Implements Type.

Definition at line 598 of file type.cpp.

References base_type, and Type::getId().

bool ArrayType::operator== (  const Type &  other  )  const [virtual]
 

Implements Type.

Definition at line 472 of file type.cpp.

References base_type, Type::isArray(), and length.

void ArrayType::setBaseType (  Type *  b  ) 
 

Definition at line 113 of file type.cpp.

References base_type, Type::getSize(), length, and NO_BOUND.

Referenced by meetWith().

void ArrayType::setLength (  unsigned  n  )  [inline]
 

Definition at line 434 of file type.h.

References length.


Friends And Related Function Documentation

friend class XMLProgParser [friend]
 

Reimplemented from Type.

Definition at line 453 of file type.h.


Member Data Documentation

Type* ArrayType::base_type [private]
 

Definition at line 422 of file type.h.

Referenced by clone(), fixBaseType(), getBaseType(), getCtype(), getSize(), isCompatible(), match(), meetWith(), operator<(), operator==(), XMLProgParser::persistToXML(), and setBaseType().

unsigned ArrayType::length [private]
 

Definition at line 423 of file type.h.

Referenced by clone(), getCtype(), getLength(), getSize(), isUnbounded(), operator==(), XMLProgParser::persistToXML(), setBaseType(), and setLength().


The documentation for this class was generated from the following files:
Generated on Tue Sep 19 21:18:39 2006 for Boomerang by  doxygen 1.4.6