ArrayTypeInfo Class Reference

This holds info about the array type. More...

#include <ArrayTypeInfo.hh>

Inheritance diagram for ArrayTypeInfo:

Inheritance graph
[legend]
Collaboration diagram for ArrayTypeInfo:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ArrayTypeInfo ()
 ArrayTypeInfo (const TypeInfo &initElementTypeInfo, const ScalarTypeInfo &initBound)
 Main constructor.
 ArrayTypeInfo (const ArrayTypeInfo &that)
 ~ArrayTypeInfo ()
bool operator== (const TypeInfo &that) const
 This is here for testing.
TypeInfoclone () const
 Clone this TypeInfo.
bool isCompositeType () const
bool isConstrained () const
bool isUnconstrained () const
bool isCharacterType () const
 Returns true if this is an enumeration type whose elements all belong to the character enumeration.
int numDimensions () const
ArrayTypeInfooperator= (const ArrayTypeInfo &)
const TypeInfogetElementTypeInfo (const RValue &index=defaultIndex()) const
const ScalarTypeInfogetIndexTypeInfo (const RValue &index=defaultIndex()) const
virtual RValuecreate (const SubElementFactory *) const
 This method is used to create an object of the appropriate type given that we are the typeInfo.
string getSubFieldName (const string &prefix, int d) const
 Returns the field name of a subelement in a composite type.
const TypeInfogetFieldInfo (int fieldIndex) const
void constructFields (vector< RValue * > &elements, const SubElementFactory *subElementFactory, int numElements=-1) const
virtual int storageIndex (int elementIndex) const
Value value (const string &initValue) const
const RValueleft (const RValue &dimension=defaultIndex()) const
 Array type attributes.
const RValueright (const RValue &dimension=defaultIndex()) const
 For scalar types returns the right element of the range.
virtual const ScalarTypeInforange (const RValue &index=defaultIndex()) const
virtual const ScalarTypeInforeverse_range (const RValue &index=defaultIndex()) const
UniversalInteger length (const RValue &index=defaultIndex()) const
 The 'length attribute.

Private Member Functions

Value valueFromAggregate (const string &initValue) const
 When the initialization string passed in is in the form of an aggregate, this method is used to do the processing.
Value valueFromString (const string &initValue) const
 When the initialization string passed in is in the form of a string, this method is used to do the processing.

Private Attributes

const ScalarTypeInfomyIndexTypeInfo
const TypeInfomyElementTypeInfo

Friends

class CompositeLiteral

Detailed Description

This holds info about the array type.


Constructor & Destructor Documentation

ArrayTypeInfo::ArrayTypeInfo  ) 
 

ArrayTypeInfo::ArrayTypeInfo const TypeInfo initElementTypeInfo,
const ScalarTypeInfo initBound
 

Main constructor.

Does not take ownership

ArrayTypeInfo::ArrayTypeInfo const ArrayTypeInfo that  ) 
 

ArrayTypeInfo::~ArrayTypeInfo  ) 
 


Member Function Documentation

TypeInfo* ArrayTypeInfo::clone  )  const [virtual]
 

Clone this TypeInfo.

Reimplemented from TypeInfo.

void ArrayTypeInfo::constructFields vector< RValue * > &  elements,
const SubElementFactory subElementFactory,
int  numElements = -1
const [virtual]
 

Implements CompositeTypeInfo.

virtual RValue* ArrayTypeInfo::create const SubElementFactory  )  const [virtual]
 

This method is used to create an object of the appropriate type given that we are the typeInfo.

The arguments are the (possibly not fully constructed) parent and the kind of object that we want for any subelements. For scalar types these arguments are completely ignored.

Reimplemented from TypeInfo.

const TypeInfo& ArrayTypeInfo::getElementTypeInfo const RValue index = defaultIndex()  )  const [virtual]
 

Implements CompositeTypeInfo.

const TypeInfo& ArrayTypeInfo::getFieldInfo int  fieldIndex  )  const [virtual]
 

Reimplemented from TypeInfo.

const ScalarTypeInfo& ArrayTypeInfo::getIndexTypeInfo const RValue index = defaultIndex()  )  const [virtual]
 

Implements CompositeTypeInfo.

string ArrayTypeInfo::getSubFieldName const string &  prefix,
int  d
const [virtual]
 

Returns the field name of a subelement in a composite type.

Record types return the name of a field; array types return "<prefix>(fieldNumber)".

Reimplemented from TypeInfo.

bool ArrayTypeInfo::isCharacterType  )  const [virtual]
 

Returns true if this is an enumeration type whose elements all belong to the character enumeration.

Reimplemented from TypeInfo.

bool ArrayTypeInfo::isCompositeType  )  const [inline, virtual]
 

Reimplemented from TypeInfo.

bool ArrayTypeInfo::isConstrained  )  const [virtual]
 

Reimplemented from CompositeTypeInfo.

bool ArrayTypeInfo::isUnconstrained  )  const [virtual]
 

Reimplemented from CompositeTypeInfo.

const RValue& ArrayTypeInfo::left const RValue dimension = defaultIndex()  )  const [virtual]
 

Array type attributes.

Reimplemented from TypeInfo.

UniversalInteger ArrayTypeInfo::length const RValue index = defaultIndex()  )  const [virtual]
 

The 'length attribute.

Reimplemented from TypeInfo.

int ArrayTypeInfo::numDimensions  )  const
 

ArrayTypeInfo& ArrayTypeInfo::operator= const ArrayTypeInfo  ) 
 

bool ArrayTypeInfo::operator== const TypeInfo that  )  const [virtual]
 

This is here for testing.

Reimplemented from TypeInfo.

virtual const ScalarTypeInfo& ArrayTypeInfo::range const RValue index = defaultIndex()  )  const [virtual]
 

Reimplemented from TypeInfo.

virtual const ScalarTypeInfo& ArrayTypeInfo::reverse_range const RValue index = defaultIndex()  )  const [virtual]
 

Reimplemented from TypeInfo.

const RValue& ArrayTypeInfo::right const RValue dimension = defaultIndex()  )  const [virtual]
 

For scalar types returns the right element of the range.

For array types, returns the right element of the index passed in.

Reimplemented from TypeInfo.

virtual int ArrayTypeInfo::storageIndex int  elementIndex  )  const [virtual]
 

Reimplemented from CompositeTypeInfo.

Value ArrayTypeInfo::value const string &  initValue  )  const [virtual]
 

Reimplemented from TypeInfo.

Value ArrayTypeInfo::valueFromAggregate const string &  initValue  )  const [private]
 

When the initialization string passed in is in the form of an aggregate, this method is used to do the processing.

Value ArrayTypeInfo::valueFromString const string &  initValue  )  const [private]
 

When the initialization string passed in is in the form of a string, this method is used to do the processing.


Friends And Related Function Documentation

friend class CompositeLiteral [friend]
 


Member Data Documentation

const TypeInfo* ArrayTypeInfo::myElementTypeInfo [private]
 

const ScalarTypeInfo* ArrayTypeInfo::myIndexTypeInfo [private]
 


The documentation for this class was generated from the following file:
Generated on Fri Mar 31 11:12:13 2006 for Tyvis by  doxygen 1.4.6