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

SequentialExpressionList Class Reference

#include <sequentialexpressionlist.h>

Inheritance diagram for SequentialExpressionList:

Inheritance graph
[legend]
Collaboration diagram for SequentialExpressionList:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SequentialExpressionList (SrcPosition *position, ExpressionList *expressionList, SimpleExpressionList *simpleExpressionList)
 SequentialExpressionList (const SequentialExpressionList &sequentialExpressionList)
virtual ~SequentialExpressionList ()
ExpressionListgetExpressionList ()
SimpleExpressionListgetSimpleExpressionList ()
virtual Astoperator= (const Ast &ast)
virtual bool operator== (const Ast &ast) const
virtual VisitorReturnvisit (Visitor &visitor)
virtual Astclone () const

Private Attributes

ExpressionListexpressionList
SimpleExpressionListsimpleExpressionList

Constructor & Destructor Documentation

SequentialExpressionList::SequentialExpressionList SrcPosition position,
ExpressionList expressionList,
SimpleExpressionList simpleExpressionList
[inline]
 

Definition at line 14 of file sequentialexpressionlist.h.

Referenced by clone().

00015                         : ExpressionList(position), expressionList(expressionList), simpleExpressionList(simpleExpressionList) {}

SequentialExpressionList::SequentialExpressionList const SequentialExpressionList &  sequentialExpressionList  )  [inline]
 

Definition at line 17 of file sequentialexpressionlist.h.

References Ast::position.

00017                                                                                                    : ExpressionList(sequentialExpressionList.position) {
00018                         *(this) = sequentialExpressionList;
00019                 }

virtual SequentialExpressionList::~SequentialExpressionList  )  [inline, virtual]
 

Definition at line 21 of file sequentialexpressionlist.h.

00021                                                     {
00022                         delete this->expressionList;
00023                         delete this->simpleExpressionList;
00024                 }


Member Function Documentation

virtual Ast& SequentialExpressionList::clone  )  const [inline, virtual]
 

Implements Ast.

Definition at line 41 of file sequentialexpressionlist.h.

References SimpleExpressionList::clone(), and SequentialExpressionList().

00041                                            {
00042                         return *(new SequentialExpressionList(new SrcPosition(*(this->position)),
00043                                          this->expressionList ? dynamic_cast<ExpressionList*>(&(this->expressionList->clone())) : 0,
00044                                          this->simpleExpressionList ? dynamic_cast<SimpleExpressionList*>(&(this->simpleExpressionList->clone())) : 0));
00045                 }

ExpressionList* SequentialExpressionList::getExpressionList  )  [inline]
 

Definition at line 26 of file sequentialexpressionlist.h.

Referenced by TypeCheckerVisitor::visitSequentialExpressionList().

00026                                                     {
00027                         return this->expressionList;
00028                 }

SimpleExpressionList* SequentialExpressionList::getSimpleExpressionList  )  [inline]
 

Definition at line 30 of file sequentialexpressionlist.h.

Referenced by TypeCheckerVisitor::visitSequentialExpressionList().

00030                                                                 {
00031                         return this->simpleExpressionList;
00032                 }

Ast & SequentialExpressionList::operator= const Ast ast  )  [virtual]
 

Reimplemented from ExpressionList.

Definition at line 5 of file sequentialexpressionlist.cpp.

References SimpleExpressionList::clone(), Ast::clone(), expressionList, ExpressionList::operator=(), and simpleExpressionList.

00005                                                          {
00006         const SequentialExpressionList& sequentialExpressionList = dynamic_cast<const SequentialExpressionList&>(ast);
00007 
00008         ExpressionList::operator=(ast);
00009         this->expressionList = sequentialExpressionList.expressionList ? dynamic_cast<ExpressionList*>(&(sequentialExpressionList.expressionList->clone())) : 0;
00010         this->simpleExpressionList = sequentialExpressionList.simpleExpressionList ? dynamic_cast<SimpleExpressionList*>(&(sequentialExpressionList.simpleExpressionList->clone())) : 0;
00011 
00012         return *(this);
00013 }

bool SequentialExpressionList::operator== const Ast ast  )  const [virtual]
 

Reimplemented from ExpressionList.

Definition at line 15 of file sequentialexpressionlist.cpp.

References expressionList, ExpressionList::operator==(), and simpleExpressionList.

00015                                                                 {
00016         bool result = false;
00017         const SequentialExpressionList& sequentialExpressionList = dynamic_cast<const SequentialExpressionList&>(ast);
00018 
00019         if (typeid(ast) != typeid(SequentialExpressionList))
00020                 return false;
00021 
00022         if (this->expressionList && this->simpleExpressionList)
00023                 result = (*(this->expressionList) == *(sequentialExpressionList.expressionList) &&
00024                                   *(this->simpleExpressionList) == *(sequentialExpressionList.simpleExpressionList));
00025 
00026         return result && ExpressionList::operator==(ast);
00027 }

virtual VisitorReturn* SequentialExpressionList::visit Visitor visitor  )  [inline, virtual]
 

Implements Ast.

Definition at line 37 of file sequentialexpressionlist.h.

References Visitor::visitSequentialExpressionList().

00037                                                                {
00038                         return visitor.visitSequentialExpressionList(this);
00039                 }


Member Data Documentation

ExpressionList* SequentialExpressionList::expressionList [private]
 

Definition at line 9 of file sequentialexpressionlist.h.

Referenced by operator=(), and operator==().

SimpleExpressionList* SequentialExpressionList::simpleExpressionList [private]
 

Definition at line 10 of file sequentialexpressionlist.h.

Referenced by operator=(), and operator==().


The documentation for this class was generated from the following files:
Generated on Mon Dec 1 17:39:15 2003 for Protomake by doxygen1.3