Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

simpleprocess.h

Go to the documentation of this file.
00001 #ifndef SIMPLE_PROCESS_H
00002 #define SIMPLE_PROCESS_H
00003 
00004 #include "process.h"
00005 #include "identifier.h"
00006 #include "declaration.h"
00007 #include "action.h"
00008 
00009 class SimpleProcess : public Process {
00010         private:
00011                 Identifier *identifier;
00012                 Declaration *declaration;
00013                 Action *action;
00014                 bool server;
00015 
00016         public:
00017                 SimpleProcess(SrcPosition *position, Identifier *identifier, Declaration *declaration, Action *action, bool server)
00018                         : Process(position), identifier(identifier), declaration(declaration), action(action), server(server) {}
00019 
00020                 SimpleProcess(const SimpleProcess& simpleProcess) : Process(simpleProcess.position) {
00021                         *(this) = simpleProcess;
00022                 }
00023 
00024                 virtual ~SimpleProcess() {
00025                         delete this->identifier;
00026                         delete this->declaration;
00027                         delete this->action;
00028                 }
00029 
00030                 Identifier *getIdentifier() {
00031                         return this->identifier;
00032                 }
00033 
00034                 Declaration *getDeclaration() {
00035                         return this->declaration;
00036                 }
00037 
00038                 Action *getAction() {
00039                         return this->action;
00040                 }
00041                 
00042                 bool isServer() const {
00043                         return this->server;
00044                 }
00045 
00046                 virtual Ast& operator = (const Ast& ast);
00047                 virtual bool operator == (const Ast& ast) const;
00048 
00049                 virtual VisitorReturn *visit(Visitor& visitor) {
00050                         return visitor.visitSimpleProcess(this);
00051                 }
00052 
00053                 virtual Ast& clone() const {
00054                         return *(new SimpleProcess(new SrcPosition(*(this->position)),
00055                                          this->identifier ? dynamic_cast<Identifier*>(&(this->identifier->clone())) : 0,
00056                                          this->declaration ? dynamic_cast<Declaration*>(&(this->declaration->clone())) : 0,
00057                                          this->action ? dynamic_cast<Action*>(&(this->action->clone())) : 0, this->server));
00058                 }
00059 };
00060 
00061 #endif

Generated on Mon Dec 1 17:36:38 2003 for Protomake by doxygen1.3