Envision
A visual programming IDE for object-oriented languages
List of all members | Public Types | Public Member Functions | Private Attributes
OOModel::Type Class Referenceabstract
Inheritance diagram for OOModel::Type:
OOModel::ArrayType OOModel::ErrorType OOModel::FunctionType OOModel::NullType OOModel::PointerType OOModel::PrimitiveType OOModel::ReferenceType OOModel::StringType OOModel::SymbolProviderType OOModel::ThrownExceptionType

Public Types

enum  Qualifier { CONST = 0x1 , VOLATILE = 0x2 }
 
using Qualifiers = QFlags< Qualifier >
 

Public Member Functions

 Type (bool isValueType)
 
 Type (const Type &other)
 
virtual ~Type ()
 
virtual Typeclone () const =0
 
virtual bool equals (const Type *other) const =0
 
virtual bool isError () const
 Returns true if this is an error type. More...
 
bool isValueType () const
 Returns true if the this type belongs to an expression representing a value. More...
 
Qualifiers qualifiers () const
 
TypeSystem::TypeRelations relationTo (const Type *other) const
 
void setQualifiers (Qualifiers q, bool enable=true)
 
void setValueType (bool isValueType)
 

Private Attributes

bool isValueType_
 
Qualifiers qualifiers_ {}
 

Member Typedef Documentation

◆ Qualifiers

Member Enumeration Documentation

◆ Qualifier

Enumerator
CONST 
VOLATILE 

Constructor & Destructor Documentation

◆ Type() [1/2]

OOModel::Type::Type ( bool  isValueType)

◆ Type() [2/2]

OOModel::Type::Type ( const Type other)

◆ ~Type()

OOModel::Type::~Type ( )
virtual

Member Function Documentation

◆ clone()

virtual Type* OOModel::Type::clone ( ) const
pure virtual

◆ equals()

virtual bool OOModel::Type::equals ( const Type other) const
pure virtual

◆ isError()

bool OOModel::Type::isError ( ) const
virtual

Returns true if this is an error type.

The default implementation returns false.

Reimplemented in OOModel::ErrorType.

◆ isValueType()

bool OOModel::Type::isValueType ( ) const
inline

Returns true if the this type belongs to an expression representing a value.

Expressions can represent values e.g. '5', 'a+b' or types e.g. 'int[]'. If this type object represents a value expression this method returns true, otherwise it returns false.

◆ qualifiers()

Type::Qualifiers OOModel::Type::qualifiers ( ) const
inline

◆ relationTo()

TypeSystem::TypeRelations OOModel::Type::relationTo ( const Type other) const

◆ setQualifiers()

void OOModel::Type::setQualifiers ( Qualifiers  q,
bool  enable = true 
)
inline

◆ setValueType()

void OOModel::Type::setValueType ( bool  isValueType)
inline

Member Data Documentation

◆ isValueType_

bool OOModel::Type::isValueType_
private

◆ qualifiers_

Qualifiers OOModel::Type::qualifiers_ {}
private