#include <program.h>
Inheritance diagram for Program:
Public Member Functions | |
Program (SrcPosition *position, Import *import, Behavior *behavior, Message *message, Process *process) | |
Program (const Program &program) | |
virtual | ~Program () |
Import * | getImport () |
Behavior * | getBehavior () |
Message * | getMessage () |
Process * | getProcess () |
virtual Ast & | operator= (const Ast &ast) |
virtual bool | operator== (const Ast &ast) const |
virtual VisitorReturn * | visit (Visitor &visitor) |
virtual Ast & | clone () const |
Private Attributes | |
Import * | import |
Behavior * | behavior |
Message * | message |
Process * | process |
|
Definition at line 18 of file program.h. Referenced by clone().
|
|
Definition at line 21 of file program.h. References Ast::position.
|
|
Definition at line 25 of file program.h.
|
|
Implements Ast. Definition at line 55 of file program.h. References Ast::clone(), and Program().
00055 { 00056 return *(new Program(new SrcPosition(*(this->position)), 00057 this->import ? dynamic_cast<Import*>(&(this->import->clone())) : 0, 00058 this->behavior ? dynamic_cast<Behavior*>(&(this->behavior->clone())) : 0, 00059 this->message ? dynamic_cast<Message*>(&(this->message->clone())) : 0, 00060 this->process ? dynamic_cast<Process*>(&(this->process->clone())) : 0)); 00061 } |
|
Definition at line 36 of file program.h. Referenced by TypeCheckerVisitor::visitProgram(), and CCodeGeneratorVisitor::visitProgram().
00036 { 00037 return this->behavior; 00038 } |
|
Definition at line 32 of file program.h. Referenced by TypeCheckerVisitor::visitProgram(), and CCodeGeneratorVisitor::visitProgram().
00032 { 00033 return this->import; 00034 } |
|
Definition at line 40 of file program.h. Referenced by TypeCheckerVisitor::visitProgram(), JavaCodeGeneratorVisitor::visitProgram(), and CCodeGeneratorVisitor::visitProgram().
00040 { 00041 return this->message; 00042 } |
|
Definition at line 44 of file program.h. Referenced by TypeCheckerVisitor::visitProgram().
00044 { 00045 return this->process; 00046 } |
|
Reimplemented from Ast. Definition at line 5 of file program.cpp. References behavior, Ast::clone(), import, message, Ast::operator=(), and process.
00005 { 00006 const Program& program = dynamic_cast<const Program&>(ast); 00007 00008 Ast::operator=(ast); 00009 this->import = program.import ? dynamic_cast<Import*>(&(program.import->clone())) : 0; 00010 this->behavior = program.behavior ? dynamic_cast<Behavior*>(&(program.behavior->clone())) : 0; 00011 this->message = program.message ? dynamic_cast<Message*>(&(program.message->clone())) : 0; 00012 this->process = program.process ? dynamic_cast<Process*>(&(program.process->clone())) : 0; 00013 00014 return *(this); 00015 } |
|
Reimplemented from Ast. Definition at line 17 of file program.cpp. References behavior, import, message, and process.
00017 { 00018 bool result = false; 00019 const Program& program = dynamic_cast<const Program&>(ast); 00020 00021 if (typeid(ast) != typeid(Program)) 00022 return false; 00023 00024 if (this->import && this->behavior && this->message && this->process) 00025 result = (*(this->import) == *(program.import) && 00026 *(this->behavior) == *(program.behavior) && 00027 *(this->message) == *(program.message) && 00028 *(this->process) == *(program.process)); 00029 00030 return result; 00031 } |
|
Implements Ast. Definition at line 51 of file program.h. References Visitor::visitProgram().
00051 { 00052 return visitor.visitProgram(this); 00053 } |
|
Definition at line 13 of file program.h. Referenced by operator=(), and operator==(). |
|
Definition at line 12 of file program.h. Referenced by operator=(), and operator==(). |
|
Definition at line 14 of file program.h. Referenced by operator=(), and operator==(). |
|
Definition at line 15 of file program.h. Referenced by operator=(), and operator==(). |