Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

collectchangesvisitor.h

Go to the documentation of this file.
00001 // -*- mode: C++; c-file-style: "stroustrup"; c-basic-offset: 4; -*-
00002 
00003 /* libutap - Uppaal Timed Automata Parser.
00004    Copyright (C) 2003 Uppsala University and Aalborg University.
00005    
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Lesser General Public License
00008    as published by the Free Software Foundation; either version 2.1 of
00009    the License, or (at your option) any later version.
00010 
00011    This library is distributed in the hope that it will be useful, but
00012    WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Lesser General Public License for more details.
00015 
00016    You should have received a copy of the GNU Lesser General Public
00017    License along with this library; if not, write to the Free Software
00018    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00019    USA
00020 */
00021 
00022 #include <set>
00023 
00024 #include "utap/statement.h"
00025 
00026 namespace UTAP
00027 {
00028 
00029     class CollectChangesVisitor : public StatementVisitor
00030     {
00031     public:
00032         CollectChangesVisitor(std::set<symbol_t> &changes);
00033         virtual ~CollectChangesVisitor();
00034 
00035         virtual int32_t visitEmptyStatement(EmptyStatement *stat);
00036         virtual int32_t visitExprStatement(ExprStatement *stat);
00037         virtual int32_t visitForStatement(ForStatement *stat);
00038         virtual int32_t visitWhileStatement(WhileStatement *stat);
00039         virtual int32_t visitDoWhileStatement(DoWhileStatement *stat);
00040         virtual int32_t visitBlockStatement(BlockStatement *stat);
00041         virtual int32_t visitSwitchStatement(SwitchStatement *stat);
00042         virtual int32_t visitCaseStatement(CaseStatement *stat);
00043         virtual int32_t visitDefaultStatement(DefaultStatement *stat);
00044         virtual int32_t visitIfStatement(IfStatement *stat);
00045         virtual int32_t visitBreakStatement(BreakStatement *stat);
00046         virtual int32_t visitContinueStatement(ContinueStatement *stat);
00047         virtual int32_t visitReturnStatement(ReturnStatement *stat);
00048     protected:
00049         std::set<symbol_t> &changes;
00050         
00051         void collectFromExpression(expression_t);
00052     };
00053 
00054 }

Generated on Thu Feb 17 15:20:58 2005 for libutap by  doxygen 1.4.1