#include <arraytype.h>
Inheritance diagram for ArrayType:
Public Member Functions | |
ArrayType (SrcPosition *position, types typeCode, Type *type, int size) | |
ArrayType (const ArrayType &arrayType) | |
virtual | ~ArrayType () |
Type * | getType () |
int | getSize () const |
virtual Ast & | operator= (const Ast &ast) |
virtual bool | operator== (const Ast &ast) const |
virtual VisitorReturn * | visit (Visitor &visitor) |
virtual Ast & | clone () const |
Private Attributes | |
Type * | type |
int | size |
|
Definition at line 12 of file arraytype.h. Referenced by clone().
|
|
Definition at line 15 of file arraytype.h. References Ast::position, and Type::typeCode.
|
|
Definition at line 19 of file arraytype.h.
00019 { 00020 delete this->type; 00021 } |
|
Reimplemented from Type. Definition at line 38 of file arraytype.h. References ArrayType().
00038 { 00039 return *(new ArrayType(new SrcPosition(*(this->position)), 00040 this->typeCode, 00041 this->type ? dynamic_cast<Type*>(&(this->type->clone())) : 0, 00042 this->size)); 00043 } |
|
Definition at line 27 of file arraytype.h.
00027 { 00028 return this->size; 00029 } |
|
Definition at line 23 of file arraytype.h. Referenced by TypeCheckerVisitor::visitSimpleArrayReference().
00023 { 00024 return this->type; 00025 } |
|
Reimplemented from Type. Definition at line 5 of file arraytype.cpp. References Type::clone(), Type::operator=(), size, and type.
|
|
Reimplemented from Type. Definition at line 15 of file arraytype.cpp. References Type::operator==(), size, and type.
00015 { 00016 bool result = false; 00017 const ArrayType& arrayType = dynamic_cast<const ArrayType&>(ast); 00018 00019 if (typeid(ast) != typeid(ArrayType)) 00020 return false; 00021 00022 if (this->type) 00023 result = (*(this->type) == *(arrayType.type) && 00024 this->size == arrayType.size); 00025 00026 return result && Type::operator==(ast); 00027 } |
|
Reimplemented from Type. Definition at line 34 of file arraytype.h. References Visitor::visitArrayType().
00034 { 00035 return visitor.visitArrayType(this); 00036 } |
|
Definition at line 9 of file arraytype.h. Referenced by operator=(), and operator==(). |
|
Definition at line 8 of file arraytype.h. Referenced by operator=(), and operator==(). |