CompoundType Class Reference

#include <include/type.h>

Inheritance diagram for CompoundType:

Type List of all members.

Detailed Description

Definition at line 490 of file type.h.

Public Member Functions

void addType (Type *n, const char *str)
virtual Typeclone () const
 CompoundType (bool generic=false)
virtual const char * getCtype (bool final=false) const
const char * getName (unsigned n)
const char * getNameAtOffset (unsigned n)
unsigned getNumTypes ()
unsigned getOffsetRemainder (unsigned n)
unsigned getOffsetTo (const char *member)
unsigned getOffsetTo (unsigned n)
virtual unsigned getSize () const
TypegetType (const char *nam)
TypegetType (unsigned n)
TypegetTypeAtOffset (unsigned n)
virtual bool isCompatible (Type *other, bool all)
virtual bool isCompatibleWith (Type *other, bool all=false)
virtual bool isCompound () const
bool isGeneric ()
bool isSubStructOf (Type *other)
bool isSuperStructOf (Type *other)
virtual Expmatch (Type *pattern)
virtual TypemeetWith (Type *other, bool &ch, bool bHighestPtr)
virtual bool operator< (const Type &other) const
virtual bool operator== (const Type &other) const
void setNameAtOffset (unsigned n, const char *nam)
void setTypeAtOffset (unsigned n, Type *ty)
void updateGenericMember (int off, Type *ty, bool &ch)
virtual ~CompoundType ()

Private Attributes

bool generic
std::vector< std::string > names
int nextGenericMemberNum
std::vector< Type * > types

Friends

class XMLProgParser


Constructor & Destructor Documentation

CompoundType::CompoundType bool  generic = false  ) 
 

Definition at line 131 of file type.cpp.

Referenced by clone().

CompoundType::~CompoundType  )  [virtual]
 

Definition at line 159 of file type.cpp.


Member Function Documentation

void CompoundType::addType Type n,
const char *  str
[inline]
 

Definition at line 501 of file type.h.

References Type::getCtype(), Type::getNamedType(), names, and types.

Referenced by clone(), TypeTest::testDataInterval(), and TypeTest::testDataIntervalOverlaps().

Type * CompoundType::clone  )  const [virtual]
 

Implements Type.

Definition at line 222 of file type.cpp.

References addType(), CompoundType(), names, and types.

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

Implements Type.

Definition at line 831 of file type.cpp.

References names, tmp, and types.

const char* CompoundType::getName unsigned  n  )  [inline]
 

Definition at line 511 of file type.h.

References getNumTypes(), and names.

Referenced by Decompiler::getCompoundMembers().

const char * CompoundType::getNameAtOffset unsigned  n  ) 
 

Definition at line 360 of file type.cpp.

References getSize(), names, and types.

Referenced by TypeTest::testCompound().

unsigned CompoundType::getNumTypes  )  [inline]
 

Definition at line 508 of file type.h.

References types.

Referenced by PentiumFrontEnd::extraProcessCall(), Decompiler::getCompoundMembers(), getName(), getType(), and isCompatible().

unsigned CompoundType::getOffsetRemainder unsigned  n  ) 
 

Definition at line 393 of file type.cpp.

References getSize(), and types.

Referenced by Type::compForAddress().

unsigned CompoundType::getOffsetTo const char *  member  ) 
 

Definition at line 382 of file type.cpp.

References names, and types.

unsigned CompoundType::getOffsetTo unsigned  n  ) 
 

Definition at line 373 of file type.cpp.

References getSize(), and types.

Referenced by Decompiler::getCompoundMembers().

unsigned CompoundType::getSize  )  const [virtual]
 

Implements Type.

Definition at line 284 of file type.cpp.

References types.

Referenced by getNameAtOffset(), getOffsetRemainder(), getOffsetTo(), getTypeAtOffset(), operator<(), setNameAtOffset(), and setTypeAtOffset().

Type * CompoundType::getType const char *  nam  ) 
 

Definition at line 304 of file type.cpp.

References names, NULL, and types.

Type* CompoundType::getType unsigned  n  )  [inline]
 

Definition at line 509 of file type.h.

References getNumTypes(), and types.

Referenced by Type::createUnion(), PentiumFrontEnd::extraProcessCall(), and Decompiler::getCompoundMembers().

Type * CompoundType::getTypeAtOffset unsigned  n  ) 
 

Definition at line 313 of file type.cpp.

References getSize(), and types.

Referenced by DataIntervalMap::replaceComponents(), TypeTest::testCompound(), and updateGenericMember().

bool CompoundType::isCompatible Type other,
bool  all
[virtual]
 

Implements Type.

Definition at line 1444 of file dfa.cpp.

References Type::asCompound(), getNumTypes(), isCompatibleWith(), Type::isCompatibleWith(), Type::resolvesToCompound(), Type::resolvesToUnion(), Type::resolvesToVoid(), and types.

Referenced by isCompatibleWith().

virtual bool CompoundType::isCompatibleWith Type other,
bool  all = false
[inline, virtual]
 

Reimplemented from Type.

Definition at line 537 of file type.h.

References isCompatible().

Referenced by isCompatible(), and meetWith().

virtual bool CompoundType::isCompound  )  const [inline, virtual]
 

Reimplemented from Type.

Definition at line 499 of file type.h.

bool CompoundType::isGeneric  )  [inline]
 

Definition at line 516 of file type.h.

References generic.

bool CompoundType::isSubStructOf Type other  ) 
 

Definition at line 1184 of file type.cpp.

References Type::asCompound(), Type::isCompound(), and types.

bool CompoundType::isSuperStructOf Type other  ) 
 

Definition at line 1173 of file type.cpp.

References Type::asCompound(), Type::isCompound(), and types.

Exp * CompoundType::match Type pattern  )  [virtual]
 

Reimplemented from Type.

Definition at line 711 of file type.cpp.

References Type::match().

Type * CompoundType::meetWith Type other,
bool &  ch,
bool  bHighestPtr
[virtual]
 

Implements Type.

Definition at line 546 of file dfa.cpp.

References Type::createUnion(), isCompatibleWith(), Type::resolvesToCompound(), Type::resolvesToVoid(), and types.

bool CompoundType::operator< const Type other  )  const [virtual]
 

Implements Type.

Definition at line 610 of file type.cpp.

References Type::getId(), Type::getSize(), and getSize().

bool CompoundType::operator== const Type other  )  const [virtual]
 

Implements Type.

Definition at line 481 of file type.cpp.

References Type::isCompound(), and types.

void CompoundType::setNameAtOffset unsigned  n,
const char *  nam
 

Definition at line 347 of file type.cpp.

References getSize(), names, and types.

Referenced by updateGenericMember().

void CompoundType::setTypeAtOffset unsigned  n,
Type ty
 

Definition at line 325 of file type.cpp.

References Type::getSize(), getSize(), names, and types.

Referenced by DataIntervalMap::enterComponent(), DataIntervalMap::replaceComponents(), and updateGenericMember().

void CompoundType::updateGenericMember int  off,
Type ty,
bool &  ch
 

Definition at line 1518 of file type.cpp.

References generic, getTypeAtOffset(), Type::meetWith(), nextGenericMemberNum, setNameAtOffset(), and setTypeAtOffset().

Referenced by Unary::descendType().


Friends And Related Function Documentation

friend class XMLProgParser [friend]
 

Reimplemented from Type.

Definition at line 541 of file type.h.


Member Data Documentation

bool CompoundType::generic [private]
 

Definition at line 495 of file type.h.

Referenced by isGeneric(), and updateGenericMember().

std::vector<std::string> CompoundType::names [private]
 

Definition at line 493 of file type.h.

Referenced by addType(), clone(), getCtype(), getName(), getNameAtOffset(), getOffsetTo(), getType(), XMLProgParser::persistToXML(), setNameAtOffset(), and setTypeAtOffset().

int CompoundType::nextGenericMemberNum [private]
 

Definition at line 494 of file type.h.

Referenced by updateGenericMember().

std::vector<Type*> CompoundType::types [private]
 

Definition at line 492 of file type.h.

Referenced by addType(), clone(), getCtype(), getNameAtOffset(), getNumTypes(), getOffsetRemainder(), getOffsetTo(), getSize(), getType(), getTypeAtOffset(), isCompatible(), isSubStructOf(), isSuperStructOf(), meetWith(), operator==(), XMLProgParser::persistToXML(), setNameAtOffset(), and setTypeAtOffset().


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