1 using TypeSystem.Operations;
6 using System.Collections.Generic;
7 using CodeGeneration.ExceptionManagement;
8 namespace CodeGeneration.Operations {
17 private T codeGenerator;
24 public CGCastOperation(T codeGenerator,
int indent) {
25 this.codeGenerator = codeGenerator;
29 public override object Exec(
ClassType ct,
object arg) {
30 this.codeGenerator.castclass(this.indent, ct);
33 public override object Exec(
IntType it,
object arg) {
34 this.codeGenerator.convToInt(this.indent);
38 public override object Exec(
DoubleType dt,
object arg) {
39 this.codeGenerator.convToDouble(this.indent);
44 ErrorManager.Instance.NotifyError(
new CodeGenerationError(
"No se ha definido la operación solicitada"));
This class represent the entry wnen sending a message to an operation object derived from TypeExpress...
Abstract class that represents all different types.
Represent a integer type.
Represents a error produced when a MethodType has class information and tries to assign other class i...
Represents a double type.